From cf58ff40fa4f5c77f5eb1a7a6565297a90bcbf1b Mon Sep 17 00:00:00 2001 From: TIANHE Date: Fri, 27 Feb 2026 23:34:13 +0800 Subject: [PATCH] v2.2.1 Signed-off-by: TIANHE --- .../app/routes/global_market.py | 54 +++++++++++++++---- backend_api_python/app/routes/quick_trade.py | 14 ++++- .../app/services/pending_order_worker.py | 26 +++++++++ frontend/dist/css/243.0b55d10c.css | 1 + frontend/dist/css/254.3729a915.css | 1 - frontend/dist/css/346.a278841f.css | 1 + frontend/dist/css/378.3729a915.css | 1 - frontend/dist/css/771.17b34efc.css | 1 - frontend/dist/css/808.0b55d10c.css | 1 + frontend/dist/css/870.a278841f.css | 1 + frontend/dist/css/946.17b34efc.css | 1 - ...450f8a43.css => theme-colors-1b8042ec.css} | 2 +- frontend/dist/index.html | 2 +- frontend/dist/js/243.60d94895.js | 18 +++++++ frontend/dist/js/254-legacy.3def965c.js | 18 ------- frontend/dist/js/283.d010ce34.js | 1 - frontend/dist/js/346-legacy.7ad5baed.js | 1 + frontend/dist/js/362-legacy.20fd3e98.js | 1 + frontend/dist/js/378.fc194de3.js | 18 ------- frontend/dist/js/700-legacy.6aa2b167.js | 1 - frontend/dist/js/771.e7c20ea7.js | 1 - frontend/dist/js/808-legacy.d05b1865.js | 18 +++++++ frontend/dist/js/870.458b18a3.js | 1 + frontend/dist/js/916.2eba6bc6.js | 1 + frontend/dist/js/946-legacy.9345bb3c.js | 1 - ...acy.b9bb3b91.js => app-legacy.56c65dc3.js} | 2 +- .../js/{app.78319175.js => app.e81906b1.js} | 2 +- ...69.js => chunk-vendors-legacy.36882298.js} | 4 +- ....6f65f877.js => chunk-vendors.8e02e3db.js} | 4 +- ...b1131.js => lang-zh-CN-legacy.2e06e29a.js} | 2 +- ...-CN.07d39770.js => lang-zh-CN.3b685fe4.js} | 2 +- 31 files changed, 138 insertions(+), 64 deletions(-) create mode 100644 frontend/dist/css/243.0b55d10c.css delete mode 100644 frontend/dist/css/254.3729a915.css create mode 100644 frontend/dist/css/346.a278841f.css delete mode 100644 frontend/dist/css/378.3729a915.css delete mode 100644 frontend/dist/css/771.17b34efc.css create mode 100644 frontend/dist/css/808.0b55d10c.css create mode 100644 frontend/dist/css/870.a278841f.css delete mode 100644 frontend/dist/css/946.17b34efc.css rename frontend/dist/css/{theme-colors-450f8a43.css => theme-colors-1b8042ec.css} (94%) create mode 100644 frontend/dist/js/243.60d94895.js delete mode 100644 frontend/dist/js/254-legacy.3def965c.js delete mode 100644 frontend/dist/js/283.d010ce34.js create mode 100644 frontend/dist/js/346-legacy.7ad5baed.js create mode 100644 frontend/dist/js/362-legacy.20fd3e98.js delete mode 100644 frontend/dist/js/378.fc194de3.js delete mode 100644 frontend/dist/js/700-legacy.6aa2b167.js delete mode 100644 frontend/dist/js/771.e7c20ea7.js create mode 100644 frontend/dist/js/808-legacy.d05b1865.js create mode 100644 frontend/dist/js/870.458b18a3.js create mode 100644 frontend/dist/js/916.2eba6bc6.js delete mode 100644 frontend/dist/js/946-legacy.9345bb3c.js rename frontend/dist/js/{app-legacy.b9bb3b91.js => app-legacy.56c65dc3.js} (69%) rename frontend/dist/js/{app.78319175.js => app.e81906b1.js} (94%) rename frontend/dist/js/{chunk-vendors-legacy.9d679269.js => chunk-vendors-legacy.36882298.js} (99%) rename frontend/dist/js/{chunk-vendors.6f65f877.js => chunk-vendors.8e02e3db.js} (99%) rename frontend/dist/js/{lang-zh-CN-legacy.058b1131.js => lang-zh-CN-legacy.2e06e29a.js} (97%) rename frontend/dist/js/{lang-zh-CN.07d39770.js => lang-zh-CN.3b685fe4.js} (97%) diff --git a/backend_api_python/app/routes/global_market.py b/backend_api_python/app/routes/global_market.py index 3f2c65f..2afb665 100644 --- a/backend_api_python/app/routes/global_market.py +++ b/backend_api_python/app/routes/global_market.py @@ -1656,6 +1656,12 @@ def _analyze_opportunities_crypto(opportunities: list): crypto_data = _fetch_crypto_prices() if crypto_data: _set_cached("crypto_prices", crypto_data) + + if not crypto_data: + logger.warning("_analyze_opportunities_crypto: No crypto data available") + return + + logger.debug(f"_analyze_opportunities_crypto: Analyzing {len(crypto_data)} crypto coins") for coin in (crypto_data or [])[:20]: change = _safe_float(coin.get("change_24h", 0)) @@ -1669,12 +1675,13 @@ def _analyze_opportunities_crypto(opportunities: list): reason = "" impact = "neutral" + # Lower thresholds to show more opportunities if change > 15: signal = "overbought" strength = "strong" reason = f"24h涨幅{change:.1f}%,7日涨幅{change_7d:.1f}%,短期超买风险" impact = "bearish" - elif change > 8: + elif change > 5: # Lowered from 8 to 5 signal = "bullish_momentum" strength = "medium" reason = f"24h涨幅{change:.1f}%,上涨动能强劲" @@ -1684,7 +1691,7 @@ def _analyze_opportunities_crypto(opportunities: list): strength = "strong" reason = f"24h跌幅{abs(change):.1f}%,可能超卖反弹" impact = "bullish" - elif change < -8: + elif change < -5: # Lowered from -8 to -5 signal = "bearish_momentum" strength = "medium" reason = f"24h跌幅{abs(change):.1f}%,下跌趋势明显" @@ -1713,6 +1720,12 @@ def _analyze_opportunities_stocks(opportunities: list): stock_data = _fetch_stock_opportunity_prices() if stock_data: _set_cached("stock_opportunity_prices", stock_data, 3600) + + if not stock_data: + logger.warning("_analyze_opportunities_stocks: No stock data available") + return + + logger.debug(f"_analyze_opportunities_stocks: Analyzing {len(stock_data)} stocks") for stock in (stock_data or []): change = _safe_float(stock.get("change", 0)) @@ -1731,7 +1744,7 @@ def _analyze_opportunities_stocks(opportunities: list): strength = "strong" reason = f"日涨幅{change:.1f}%,短期涨幅较大,注意回调风险" impact = "bearish" - elif change > 3: + elif change > 2: # Lowered from 3 to 2 signal = "bullish_momentum" strength = "medium" reason = f"日涨幅{change:.1f}%,上涨动能强劲" @@ -1741,7 +1754,7 @@ def _analyze_opportunities_stocks(opportunities: list): strength = "strong" reason = f"日跌幅{abs(change):.1f}%,可能超卖反弹" impact = "bullish" - elif change < -3: + elif change < -2: # Lowered from -3 to -2 signal = "bearish_momentum" strength = "medium" reason = f"日跌幅{abs(change):.1f}%,下跌趋势明显" @@ -1769,6 +1782,12 @@ def _analyze_opportunities_forex(opportunities: list): forex_data = _fetch_forex_pairs() if forex_data: _set_cached("forex_pairs", forex_data, 3600) + + if not forex_data: + logger.warning("_analyze_opportunities_forex: No forex data available") + return + + logger.debug(f"_analyze_opportunities_forex: Analyzing {len(forex_data)} forex pairs") for pair in (forex_data or []): change = _safe_float(pair.get("change", 0)) @@ -1787,7 +1806,7 @@ def _analyze_opportunities_forex(opportunities: list): strength = "strong" reason = f"日涨幅{change:.2f}%,汇率波动剧烈,注意回调" impact = "bearish" - elif change > 0.8: + elif change > 0.5: # Lowered from 0.8 to 0.5 signal = "bullish_momentum" strength = "medium" reason = f"日涨幅{change:.2f}%,上涨动能较强" @@ -1797,7 +1816,7 @@ def _analyze_opportunities_forex(opportunities: list): strength = "strong" reason = f"日跌幅{abs(change):.2f}%,汇率波动剧烈,可能反弹" impact = "bullish" - elif change < -0.8: + elif change < -0.5: # Lowered from -0.8 to -0.5 signal = "bearish_momentum" strength = "medium" reason = f"日跌幅{abs(change):.2f}%,下跌趋势明显" @@ -1836,17 +1855,34 @@ def trading_opportunities(): opportunities = [] # 1) Crypto - _analyze_opportunities_crypto(opportunities) + try: + _analyze_opportunities_crypto(opportunities) + crypto_count = len([o for o in opportunities if o.get("market") == "Crypto"]) + logger.info(f"Trading opportunities: found {crypto_count} crypto opportunities") + except Exception as e: + logger.error(f"Failed to analyze crypto opportunities: {e}", exc_info=True) # 2) US Stocks - _analyze_opportunities_stocks(opportunities) + try: + _analyze_opportunities_stocks(opportunities) + stock_count = len([o for o in opportunities if o.get("market") == "USStock"]) + logger.info(f"Trading opportunities: found {stock_count} US stock opportunities") + except Exception as e: + logger.error(f"Failed to analyze stock opportunities: {e}", exc_info=True) # 3) Forex - _analyze_opportunities_forex(opportunities) + try: + _analyze_opportunities_forex(opportunities) + forex_count = len([o for o in opportunities if o.get("market") == "Forex"]) + logger.info(f"Trading opportunities: found {forex_count} forex opportunities") + except Exception as e: + logger.error(f"Failed to analyze forex opportunities: {e}", exc_info=True) # Sort by absolute change descending opportunities.sort(key=lambda x: abs(x.get("change_24h", 0)), reverse=True) + logger.info(f"Trading opportunities: total {len(opportunities)} opportunities found (Crypto: {len([o for o in opportunities if o.get('market') == 'Crypto'])}, USStock: {len([o for o in opportunities if o.get('market') == 'USStock'])}, Forex: {len([o for o in opportunities if o.get('market') == 'Forex'])})") + _set_cached("trading_opportunities", opportunities, 3600) return jsonify({"code": 1, "msg": "success", "data": opportunities}) diff --git a/backend_api_python/app/routes/quick_trade.py b/backend_api_python/app/routes/quick_trade.py index d01c323..ae44cd2 100644 --- a/backend_api_python/app/routes/quick_trade.py +++ b/backend_api_python/app/routes/quick_trade.py @@ -830,6 +830,18 @@ def close_position(): avg_fill = float(getattr(result, "avg_price", 0) or 0) raw = getattr(result, "raw", {}) or {} + # ---- calculate USDT amount for recording ---- + # Convert base asset quantity to USDT amount for consistent recording + # amount (USDT) = base_qty * price + usdt_amount = actual_close_size * avg_fill if avg_fill > 0 else 0 + # If price is not available, try to use entry price or mark price as fallback + if usdt_amount <= 0: + entry_price = float(position.get("entry_price") or 0) + mark_price = float(position.get("mark_price") or 0) + fallback_price = mark_price if mark_price > 0 else entry_price + if fallback_price > 0: + usdt_amount = actual_close_size * fallback_price + # ---- record trade ---- trade_id = _record_quick_trade( user_id=user_id, @@ -838,7 +850,7 @@ def close_position(): symbol=symbol, side="sell" if position_side == "long" else "buy", # Opposite of position side order_type="market", - amount=actual_close_size, # Record position size + amount=usdt_amount, # Record USDT amount, not base asset quantity price=avg_fill, leverage=float(position.get("leverage") or 1), market_type=market_type, diff --git a/backend_api_python/app/services/pending_order_worker.py b/backend_api_python/app/services/pending_order_worker.py index 03998f1..3e5d4f0 100644 --- a/backend_api_python/app/services/pending_order_worker.py +++ b/backend_api_python/app/services/pending_order_worker.py @@ -214,6 +214,19 @@ class PendingOrderWorker: market_type = str(market_type or "swap").strip().lower() if market_type in ("futures", "future", "perp", "perpetual"): market_type = "swap" + + # Get strategy's trading symbol(s) to filter positions + # Only sync positions for symbols that this strategy actually trades + strategy_symbol = (sc.get("symbol") or "").strip() + trading_config = sc.get("trading_config") or {} + symbol_list = trading_config.get("symbol_list") or [] + # Normalize symbol list: convert to set for fast lookup + allowed_symbols = set() + if strategy_symbol: + allowed_symbols.add(strategy_symbol.upper()) + for sym in symbol_list: + if sym and isinstance(sym, str): + allowed_symbols.add(sym.strip().upper()) # Lazy import MT5 here to allow elif chain later global MT5Client @@ -500,10 +513,23 @@ class PendingOrderWorker: to_update.append({"id": rid, "size": exch_qty, "entry_price": exch_price}) # [New Feature] Detect positions that exist on exchange but not in local DB, and insert them. + # IMPORTANT: Only insert positions for symbols that this strategy actually trades + # This prevents syncing positions from quick trade or other sources to_insert: List[Dict[str, Any]] = [] local_symbols_sides = {(str(r.get("symbol") or "").strip(), str(r.get("side") or "").strip().lower()) for r in plist} for _sym, _sides_map in exch_size.items(): + # Filter: only sync positions for symbols that this strategy trades + # If strategy has no symbol configured, skip auto-insert to prevent syncing quick trade positions + _sym_upper = _sym.strip().upper() + if allowed_symbols and _sym_upper not in allowed_symbols: + logger.debug(f"[PositionSync] Skipping {_sym}: not in strategy's symbol list (strategy trades: {allowed_symbols})") + continue + elif not allowed_symbols: + # Strategy has no symbol configured - skip to prevent syncing unrelated positions + logger.debug(f"[PositionSync] Skipping {_sym}: strategy has no symbol configured (preventing quick trade position sync)") + continue + for _side, _qty in _sides_map.items(): if _qty > 1e-12 and (_sym, _side) not in local_symbols_sides: # Exchange has this position but local DB does not diff --git a/frontend/dist/css/243.0b55d10c.css b/frontend/dist/css/243.0b55d10c.css new file mode 100644 index 0000000..35b7f05 --- /dev/null +++ b/frontend/dist/css/243.0b55d10c.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}[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-466e34db]{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-466e34db]{background:#131722;border-right-color:#2a2e39}.chart-wrapper[data-v-466e34db]{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-466e34db]{background:#131722}.drawing-toolbar[data-v-466e34db]{-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-466e34db]{background:#131722;border-right-color:#2a2e39}.drawing-tool-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc}.drawing-tool-btn[data-v-466e34db]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-466e34db]:hover{background:#1f2943;color:#13c2c2}.drawing-tool-btn.active[data-v-466e34db]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-466e34db]{background:#1f2943;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-466e34db]{margin:8px 0;height:20px}.indicator-toolbar[data-v-466e34db]{-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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-466e34db]{-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-466e34db]{background:#131722;border-bottom-color:#2a2e39}.indicator-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc;background:#1f2943;border-color:#2a2e39}.indicator-btn[data-v-466e34db]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-466e34db]:hover{color:#13c2c2;border-color:#13c2c2;background:#1f2943}.indicator-btn.active[data-v-466e34db]{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-466e34db]{color:#13c2c2;background:#1f2943;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-466e34db]{-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-466e34db]{background:#131722}.chart-overlay[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.95)}.error-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-466e34db]{background:rgba(19,23,34,.98)}.hint-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-466e34db]{background:rgba(19,23,34,.98)}.warning-box[data-v-466e34db]{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-466e34db]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-466e34db]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-466e34db]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-466e34db]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-466e34db]{color:#868993}.chart-left.theme-dark .hint-box[data-v-466e34db]{color:#d1d4dc}.hint-title[data-v-466e34db]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-466e34db]{color:#d1d4dc}.hint-desc[data-v-466e34db]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-466e34db]{color:#787b86}.history-loading-hint[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.98)!important;border-color:#2a2e39;color:#d1d4dc!important}.loading-text[data-v-466e34db]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-466e34db]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{padding-left:12px}.kline-chart-container[data-v-466e34db]{margin-left:0}.chart-left[data-v-466e34db]{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-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-466e34db]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-466e34db]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-466e34db]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}[data-v-9d8ac1fc] .ant-form-item-label{white-space:normal;line-height:1.2}[data-v-9d8ac1fc] .ant-form-item-label>label{white-space:normal}[data-v-9d8ac1fc] .ant-form-item-control{min-width:0}.backtest-modal[data-v-9d8ac1fc] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.backtest-content[data-v-9d8ac1fc]{position:relative}.field-hint[data-v-9d8ac1fc]{margin-top:4px;font-size:12px;line-height:1.4;color:#8c8c8c}.section-title[data-v-9d8ac1fc]{font-size:15px;font-weight:600;color:#262626;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #f0f0f0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.section-title .anticon[data-v-9d8ac1fc]{color:#1890ff}.config-section[data-v-9d8ac1fc]{margin-bottom:24px}.precision-info[data-v-9d8ac1fc]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.date-quick-select[data-v-9d8ac1fc],.precision-info[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.date-quick-select[data-v-9d8ac1fc]{padding:8px 12px;background:#fafafa;border-radius:6px;border:1px solid #f0f0f0}.result-section[data-v-9d8ac1fc]{margin-top:24px}.metrics-cards[data-v-9d8ac1fc]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px}@media (max-width:1200px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(4,1fr)}}@media (max-width:992px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(3,1fr)}}@media (max-width:576px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-9d8ac1fc]{background:#fafafa;border-radius:8px;padding:16px;text-align:center;-webkit-transition:all .3s;transition:all .3s}.metric-card[data-v-9d8ac1fc]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.1);box-shadow:0 2px 8px rgba(0,0,0,.1)}.metric-card.positive[data-v-9d8ac1fc]{background:linear-gradient(135deg,#f6ffed,#d9f7be)}.metric-card.positive .metric-value[data-v-9d8ac1fc]{color:#52c41a}.metric-card.negative[data-v-9d8ac1fc]{background:linear-gradient(135deg,#fff2f0,#ffccc7)}.metric-card.negative .metric-value[data-v-9d8ac1fc]{color:#f5222d}.metric-card .metric-label[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-bottom:8px}.metric-card .metric-value[data-v-9d8ac1fc]{font-size:20px;font-weight:700;color:#262626}.metric-card .metric-amount[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-top:4px}.chart-section[data-v-9d8ac1fc]{margin-bottom:24px}.chart-title[data-v-9d8ac1fc]{font-size:14px;font-weight:600;color:#595959;margin-bottom:12px}.equity-chart[data-v-9d8ac1fc]{width:100%;height:300px;border:1px solid #f0f0f0;border-radius:8px}.trades-section[data-v-9d8ac1fc]{margin-top:24px}.loading-overlay[data-v-9d8ac1fc]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.9);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;z-index:100;border-radius:8px}.loading-overlay .loading-content[data-v-9d8ac1fc]{text-align:center}.loading-overlay .loading-animation[data-v-9d8ac1fc]{margin-bottom:20px}.loading-overlay .chart-bars[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;height:60px;gap:6px}.loading-overlay .bar[data-v-9d8ac1fc]{width:8px;background:-webkit-gradient(linear,left top,left bottom,from(#1890ff),to(#52c41a));background:linear-gradient(180deg,#1890ff,#52c41a);border-radius:4px;-webkit-animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite;animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite}.loading-overlay .bar1[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:0s;animation-delay:0s}.loading-overlay .bar2[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.1s;animation-delay:.1s}.loading-overlay .bar3[data-v-9d8ac1fc]{height:50px;-webkit-animation-delay:.2s;animation-delay:.2s}.loading-overlay .bar4[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.3s;animation-delay:.3s}.loading-overlay .bar5[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:.4s;animation-delay:.4s}@-webkit-keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}@keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}.loading-overlay .loading-text[data-v-9d8ac1fc]{font-size:16px;font-weight:500;color:#1890ff;margin-bottom:8px}.loading-overlay .loading-subtext[data-v-9d8ac1fc]{font-size:13px;color:#666;-webkit-animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite;animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite}@-webkit-keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}@keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}.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}.quick-trade-drawer[data-v-0d547552] .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-0d547552]{-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-0d547552],.qt-header[data-v-0d547552]{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-0d547552]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0d547552]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0d547552]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0d547552]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0d547552]:hover{color:#333}.qt-symbol-bar[data-v-0d547552]{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-0d547552],.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-0d547552]{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-0d547552]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999;font-size:12px}.qt-section[data-v-0d547552]{padding:8px 20px}.qt-section .qt-label[data-v-0d547552]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0d547552]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0d547552]{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-0d547552]{color:#999}.qt-balance .qt-balance-value[data-v-0d547552]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0d547552]{-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-0d547552]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0d547552]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0d547552]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0d547552]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0d547552]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:active{background:#cf1322!important}.qt-position-section[data-v-0d547552]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-0d547552]{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-0d547552]{padding:8px 20px 12px}.qt-history-section[data-v-0d547552] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-0d547552] .ant-collapse-item{border:none}.qt-history-section[data-v-0d547552] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-0d547552] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-0d547552] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-0d547552] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-0d547552]{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-0d547552]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0d547552]{border-left-color:#52c41a}.qt-position-card.short[data-v-0d547552]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0d547552]{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-0d547552]:first-child{color:#999}.qt-position-empty[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0d547552]{color:#52c41a!important}.qt-red[data-v-0d547552]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0d547552]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0d547552]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0d547552]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0d547552]{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-0d547552]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0d547552]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0d547552]{color:#666}.theme-dark .qt-header .qt-close[data-v-0d547552]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0d547552]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999}.theme-dark .qt-section .qt-label[data-v-0d547552]{color:#777}.theme-dark .qt-position-card[data-v-0d547552]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-0d547552],.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-0d547552]{color:#888}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-0d547552]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0d547552]{color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0d547552] .ant-drawer-content{background:#141414}.theme-dark[data-v-0d547552] .ant-input-number,.theme-dark[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0d547552] .ant-slider-rail{background:#303030}.theme-dark[data-v-0d547552] .ant-slider-track{background:#1890ff}.chart-container[data-v-b17e86c2]{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-b17e86c2],.chart-header[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-b17e86c2],.header-top[data-v-b17e86c2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-b17e86c2]{gap:20px}.symbol-select[data-v-b17e86c2]{width:220px}.symbol-select[data-v-b17e86c2] .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-b17e86c2] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-b17e86c2] .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-b17e86c2] .ant-select-arrow,.symbol-select[data-v-b17e86c2] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-b17e86c2]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-b17e86c2]{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-b17e86c2]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{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-b17e86c2]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-b17e86c2]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-b17e86c2]{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-b17e86c2]{color:#0ecb81}.price-info.color-down[data-v-b17e86c2]{color:#f6465d}.symbol-price[data-v-b17e86c2]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-b17e86c2]{font-size:12px}.mobile-symbol-price[data-v-b17e86c2]{display:none}.panel-header .theme-switcher[data-v-b17e86c2]{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-b17e86c2],.panel-header .theme-toggle-btn[data-v-b17e86c2]{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-b17e86c2]:hover,.panel-header .theme-toggle-btn[data-v-b17e86c2]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-b17e86c2],.panel-header .theme-toggle-btn.active[data-v-b17e86c2]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-b17e86c2],.panel-header .theme-toggle-btn .anticon[data-v-b17e86c2]{font-size:16px}.chart-content[data-v-b17e86c2]{-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-b17e86c2],.chart-main-row[data-v-b17e86c2]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-b17e86c2]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-b17e86c2]{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-b17e86c2],.indicators-panel[data-v-b17e86c2]{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-b17e86c2]{height:100%}.panel-header[data-v-b17e86c2]{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-b17e86c2]{margin-right:0}.panel-body[data-v-b17e86c2]{padding:0;overflow:hidden}.indicator-section[data-v-b17e86c2],.panel-body[data-v-b17e86c2]{-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-b17e86c2]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-b17e86c2]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-b17e86c2]{min-height:200px}.section-label[data-v-b17e86c2]{-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-b17e86c2],.section-label[data-v-b17e86c2]{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-b17e86c2]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-b17e86c2]{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-b17e86c2]{font-weight:500}.section-label .buy-indicator-btn[data-v-b17e86c2]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-b17e86c2]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-b17e86c2]{display:none!important}}.section-content[data-v-b17e86c2]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-b17e86c2]{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-b17e86c2]: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-b17e86c2]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-b17e86c2]{color:#1890ff}.indicator-card.indicator-active[data-v-b17e86c2]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-b17e86c2]: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-b17e86c2]{color:#52c41a}.indicator-card.disabled[data-v-b17e86c2]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-b17e86c2]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-b17e86c2]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-b17e86c2]{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-b17e86c2]{color:#999;font-size:12px}.card-action[data-v-b17e86c2]:hover{color:#1890ff}.card-actions[data-v-b17e86c2]{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-b17e86c2]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-b17e86c2]{color:#1890ff}.action-icon.edit-icon[data-v-b17e86c2]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-b17e86c2]{color:#ff4d4f}.action-icon.delete-icon[data-v-b17e86c2]:hover{color:#ff7875}.action-icon[data-v-b17e86c2]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-b17e86c2]{color:#52c41a}.action-icon.backtest-icon[data-v-b17e86c2]{color:#722ed1}.action-icon.backtest-icon[data-v-b17e86c2]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-b17e86c2]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-b17e86c2]:hover{color:#08979c}.action-icon.publish-icon[data-v-b17e86c2]{color:#1890ff}.action-icon.publish-icon[data-v-b17e86c2]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-b17e86c2]{color:#52c41a}.action-icon.publish-icon.published[data-v-b17e86c2]:hover{color:#73d13d}.action-icon.status-icon.status-normal[data-v-b17e86c2]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-b17e86c2]{color:#ff4d4f}.action-icon.expiry-icon[data-v-b17e86c2]{color:#1890ff}.empty-indicators[data-v-b17e86c2]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-b17e86c2],.loading-indicators[data-v-b17e86c2]{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-b17e86c2]{padding:20px}.custom-scrollbar[data-v-b17e86c2]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-b17e86c2]::-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-b17e86c2]{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-b17e86c2]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-b17e86c2]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-b17e86c2]{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-b17e86c2]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-b17e86c2]{padding:12px}.chart-header .header-top[data-v-b17e86c2],.chart-header[data-v-b17e86c2]{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-b17e86c2]{padding:0}.chart-header .header-left[data-v-b17e86c2]{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-b17e86c2]{width:100%}.chart-header .search-section .symbol-select[data-v-b17e86c2]{width:100%!important}.chart-header .timeframe-group[data-v-b17e86c2]{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-b17e86c2]{-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-b17e86c2]{display:none}.chart-content[data-v-b17e86c2]{overflow-y:auto}.chart-content[data-v-b17e86c2],.chart-main-row[data-v-b17e86c2]{-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-b17e86c2]{-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-b17e86c2],.mobile-symbol-price[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-b17e86c2]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-b17e86c2]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-b17e86c2]{font-size:14px;font-weight:500}kline-chart[data-v-b17e86c2]{-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-b17e86c2] .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-b17e86c2]{-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-b17e86c2]{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-b17e86c2]{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-b17e86c2]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-b17e86c2]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2],.chart-right .indicators-panel .panel-body[data-v-b17e86c2]{-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-b17e86c2]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .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-b17e86c2] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .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-b17e86c2] .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-b17e86c2] .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-b17e86c2],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .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-b17e86c2]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-b17e86c2]{-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-b17e86c2],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-b17e86c2]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-b17e86c2]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-b17e86c2]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-b17e86c2]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-b17e86c2]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-b17e86c2],.chart-right .indicators-panel .indicator-card .card-params[data-v-b17e86c2]{font-size:11px}}.qt-header-btn[data-v-b17e86c2]{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-b17e86c2]:focus,.qt-header-btn[data-v-b17e86c2]: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-b17e86c2]{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-b17e86c2]: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-b17e86c2],body.dark,body.realdark{background:#131722;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;-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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#868993;background:#2a2e39}.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-b17e86c2],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-b17e86c2],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-b17e86c2],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-b17e86c2]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2] .ant-select-selection,body.dark,body.realdark{background-color:#1e222d;border-color:#2a2e39;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-b17e86c2] .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-b17e86c2] .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-b17e86c2] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-b17e86c2] .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-b17e86c2],body.dark,body.realdark{background:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-b17e86c2],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-b17e86c2]:hover,body.dark,body.realdark{color:#1890ff;background:#1e222d}.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-b17e86c2],body.dark,body.realdark{color:#1890ff;background:#1e222d;-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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#868993;background:#21283c}.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-b17e86c2],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-b17e86c2],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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-left-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-b17e86c2],body.dark,body.realdark{background:#1e222d}.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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;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-b17e86c2],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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-b17e86c2]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2e39}.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-b17e86c2],body.dark,body.realdark{background:#1e222d}.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-b17e86c2],body.dark,body.realdark{border-bottom-color:#2a2e39}.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-b17e86c2],body.dark,body.realdark{color:#868993;background:#2a2e39;border-bottom-color:#2a2e39}.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-b17e86c2],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-b17e86c2],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-b17e86c2],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-b17e86c2]: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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-color:#2a2e39}.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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-b17e86c2]:hover,body.dark,body.realdark{background:#2a2e39;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-b17e86c2],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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2],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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-b17e86c2],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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-b17e86c2]: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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2],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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-b17e86c2],body.dark,body.realdark{border-top-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-b17e86c2],body.dark,body.realdark{border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-b17e86c2],body.dark,body.realdark{border-top-color:#2a2e39;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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-b17e86c2] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2e39}.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-b17e86c2] .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-b17e86c2] .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-b17e86c2] .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-b17e86c2],body.dark,body.realdark{background:#1e222d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-b17e86c2],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-b17e86c2],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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-b17e86c2]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-b17e86c2],.add-stock-modal-content .search-results-section[data-v-b17e86c2],.add-stock-modal-content .symbol-search-section[data-v-b17e86c2]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-b17e86c2],.add-stock-modal-content .search-results-section .section-title[data-v-b17e86c2]{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-b17e86c2]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-b17e86c2]{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-b17e86c2]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-b17e86c2]{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-b17e86c2]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-b17e86c2]{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-b17e86c2]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-b17e86c2]{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-b17e86c2],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-b17e86c2],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-b17e86c2],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2e39}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-b17e86c2]: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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-b17e86c2]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-b17e86c2]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-b17e86c2]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-b17e86c2]{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-b17e86c2]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-b17e86c2]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-b17e86c2]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/254.3729a915.css b/frontend/dist/css/254.3729a915.css deleted file mode 100644 index a152d14..0000000 --- a/frontend/dist/css/254.3729a915.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-466e34db]{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-466e34db]{background:#131722;border-right-color:#2a2e39}.chart-wrapper[data-v-466e34db]{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-466e34db]{background:#131722}.drawing-toolbar[data-v-466e34db]{-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-466e34db]{background:#131722;border-right-color:#2a2e39}.drawing-tool-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc}.drawing-tool-btn[data-v-466e34db]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-466e34db]:hover{background:#1f2943;color:#13c2c2}.drawing-tool-btn.active[data-v-466e34db]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-466e34db]{background:#1f2943;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-466e34db]{margin:8px 0;height:20px}.indicator-toolbar[data-v-466e34db]{-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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-466e34db]{-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-466e34db]{background:#131722;border-bottom-color:#2a2e39}.indicator-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc;background:#1f2943;border-color:#2a2e39}.indicator-btn[data-v-466e34db]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-466e34db]:hover{color:#13c2c2;border-color:#13c2c2;background:#1f2943}.indicator-btn.active[data-v-466e34db]{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-466e34db]{color:#13c2c2;background:#1f2943;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-466e34db]{-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-466e34db]{background:#131722}.chart-overlay[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.95)}.error-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-466e34db]{background:rgba(19,23,34,.98)}.hint-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-466e34db]{background:rgba(19,23,34,.98)}.warning-box[data-v-466e34db]{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-466e34db]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-466e34db]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-466e34db]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-466e34db]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-466e34db]{color:#868993}.chart-left.theme-dark .hint-box[data-v-466e34db]{color:#d1d4dc}.hint-title[data-v-466e34db]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-466e34db]{color:#d1d4dc}.hint-desc[data-v-466e34db]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-466e34db]{color:#787b86}.history-loading-hint[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.98)!important;border-color:#2a2e39;color:#d1d4dc!important}.loading-text[data-v-466e34db]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-466e34db]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{padding-left:12px}.kline-chart-container[data-v-466e34db]{margin-left:0}.chart-left[data-v-466e34db]{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-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-466e34db]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-466e34db]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-466e34db]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}[data-v-9d8ac1fc] .ant-form-item-label{white-space:normal;line-height:1.2}[data-v-9d8ac1fc] .ant-form-item-label>label{white-space:normal}[data-v-9d8ac1fc] .ant-form-item-control{min-width:0}.backtest-modal[data-v-9d8ac1fc] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.backtest-content[data-v-9d8ac1fc]{position:relative}.field-hint[data-v-9d8ac1fc]{margin-top:4px;font-size:12px;line-height:1.4;color:#8c8c8c}.section-title[data-v-9d8ac1fc]{font-size:15px;font-weight:600;color:#262626;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #f0f0f0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.section-title .anticon[data-v-9d8ac1fc]{color:#1890ff}.config-section[data-v-9d8ac1fc]{margin-bottom:24px}.precision-info[data-v-9d8ac1fc]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.date-quick-select[data-v-9d8ac1fc],.precision-info[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.date-quick-select[data-v-9d8ac1fc]{padding:8px 12px;background:#fafafa;border-radius:6px;border:1px solid #f0f0f0}.result-section[data-v-9d8ac1fc]{margin-top:24px}.metrics-cards[data-v-9d8ac1fc]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px}@media (max-width:1200px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(4,1fr)}}@media (max-width:992px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(3,1fr)}}@media (max-width:576px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-9d8ac1fc]{background:#fafafa;border-radius:8px;padding:16px;text-align:center;-webkit-transition:all .3s;transition:all .3s}.metric-card[data-v-9d8ac1fc]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.1);box-shadow:0 2px 8px rgba(0,0,0,.1)}.metric-card.positive[data-v-9d8ac1fc]{background:linear-gradient(135deg,#f6ffed,#d9f7be)}.metric-card.positive .metric-value[data-v-9d8ac1fc]{color:#52c41a}.metric-card.negative[data-v-9d8ac1fc]{background:linear-gradient(135deg,#fff2f0,#ffccc7)}.metric-card.negative .metric-value[data-v-9d8ac1fc]{color:#f5222d}.metric-card .metric-label[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-bottom:8px}.metric-card .metric-value[data-v-9d8ac1fc]{font-size:20px;font-weight:700;color:#262626}.metric-card .metric-amount[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-top:4px}.chart-section[data-v-9d8ac1fc]{margin-bottom:24px}.chart-title[data-v-9d8ac1fc]{font-size:14px;font-weight:600;color:#595959;margin-bottom:12px}.equity-chart[data-v-9d8ac1fc]{width:100%;height:300px;border:1px solid #f0f0f0;border-radius:8px}.trades-section[data-v-9d8ac1fc]{margin-top:24px}.loading-overlay[data-v-9d8ac1fc]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.9);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;z-index:100;border-radius:8px}.loading-overlay .loading-content[data-v-9d8ac1fc]{text-align:center}.loading-overlay .loading-animation[data-v-9d8ac1fc]{margin-bottom:20px}.loading-overlay .chart-bars[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;height:60px;gap:6px}.loading-overlay .bar[data-v-9d8ac1fc]{width:8px;background:-webkit-gradient(linear,left top,left bottom,from(#1890ff),to(#52c41a));background:linear-gradient(180deg,#1890ff,#52c41a);border-radius:4px;-webkit-animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite;animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite}.loading-overlay .bar1[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:0s;animation-delay:0s}.loading-overlay .bar2[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.1s;animation-delay:.1s}.loading-overlay .bar3[data-v-9d8ac1fc]{height:50px;-webkit-animation-delay:.2s;animation-delay:.2s}.loading-overlay .bar4[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.3s;animation-delay:.3s}.loading-overlay .bar5[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:.4s;animation-delay:.4s}@-webkit-keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}@keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}.loading-overlay .loading-text[data-v-9d8ac1fc]{font-size:16px;font-weight:500;color:#1890ff;margin-bottom:8px}.loading-overlay .loading-subtext[data-v-9d8ac1fc]{font-size:13px;color:#666;-webkit-animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite;animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite}@-webkit-keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}@keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}.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}.quick-trade-drawer[data-v-0f7d87dc] .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-0f7d87dc]{-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-0f7d87dc],.qt-header[data-v-0f7d87dc]{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-0f7d87dc]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0f7d87dc]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0f7d87dc]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0f7d87dc]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0f7d87dc]:hover{color:#333}.qt-symbol-bar[data-v-0f7d87dc]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc],.qt-symbol-bar[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc]{gap:8px}.qt-symbol-bar .qt-symbol-info .qt-symbol-name[data-v-0f7d87dc]{font-size:18px;font-weight:700;letter-spacing:.5px}.qt-symbol-bar .qt-current-price[data-v-0f7d87dc]{font-size:18px;font-weight:600;color:#333}.qt-section[data-v-0f7d87dc]{padding:8px 20px}.qt-section .qt-label[data-v-0f7d87dc]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0f7d87dc]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0f7d87dc]{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-0f7d87dc]{color:#999}.qt-balance .qt-balance-value[data-v-0f7d87dc]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0f7d87dc]{-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-0f7d87dc]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0f7d87dc]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0f7d87dc]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0f7d87dc]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:active{background:#cf1322!important}.qt-history-section[data-v-0f7d87dc],.qt-position-section[data-v-0f7d87dc]{padding:8px 20px 12px}.qt-history-section .qt-section-header[data-v-0f7d87dc],.qt-position-section .qt-section-header[data-v-0f7d87dc]{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-position-card[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0f7d87dc]{border-left-color:#52c41a}.qt-position-card.short[data-v-0f7d87dc]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0f7d87dc]{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-0f7d87dc]:first-child{color:#999}.qt-position-empty[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0f7d87dc]{color:#52c41a!important}.qt-red[data-v-0f7d87dc]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0f7d87dc]{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-0f7d87dc]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0f7d87dc]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0f7d87dc]{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-0f7d87dc]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0f7d87dc]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]{color:#666}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0f7d87dc]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0f7d87dc],.theme-dark .qt-symbol-bar .qt-symbol-name[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-section .qt-label[data-v-0f7d87dc]{color:#777}.theme-dark .qt-position-card[data-v-0f7d87dc]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:first-child{color:#777}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:last-child{color:#ccc}.theme-dark .qt-trade-item[data-v-0f7d87dc]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0f7d87dc]{color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-drawer-content{background:#141414}.theme-dark[data-v-0f7d87dc] .ant-input-number,.theme-dark[data-v-0f7d87dc] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0f7d87dc] .ant-slider-rail{background:#303030}.theme-dark[data-v-0f7d87dc] .ant-slider-track{background:#1890ff}.chart-container[data-v-1895bd90]{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-1895bd90],.chart-header[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-1895bd90],.header-top[data-v-1895bd90]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-1895bd90]{gap:20px}.symbol-select[data-v-1895bd90]{width:220px}.symbol-select[data-v-1895bd90] .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-1895bd90] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-1895bd90] .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-1895bd90] .ant-select-arrow,.symbol-select[data-v-1895bd90] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-1895bd90]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-1895bd90]{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-1895bd90]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{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-1895bd90]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-1895bd90]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-1895bd90]{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-1895bd90]{color:#0ecb81}.price-info.color-down[data-v-1895bd90]{color:#f6465d}.symbol-price[data-v-1895bd90]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-1895bd90]{font-size:12px}.mobile-symbol-price[data-v-1895bd90]{display:none}.panel-header .theme-switcher[data-v-1895bd90]{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-1895bd90],.panel-header .theme-toggle-btn[data-v-1895bd90]{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-1895bd90]:hover,.panel-header .theme-toggle-btn[data-v-1895bd90]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-1895bd90],.panel-header .theme-toggle-btn.active[data-v-1895bd90]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-1895bd90],.panel-header .theme-toggle-btn .anticon[data-v-1895bd90]{font-size:16px}.chart-content[data-v-1895bd90]{-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-1895bd90],.chart-main-row[data-v-1895bd90]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-1895bd90]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-1895bd90]{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-1895bd90],.indicators-panel[data-v-1895bd90]{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-1895bd90]{height:100%}.panel-header[data-v-1895bd90]{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-1895bd90]{margin-right:0}.panel-body[data-v-1895bd90]{padding:0;overflow:hidden}.indicator-section[data-v-1895bd90],.panel-body[data-v-1895bd90]{-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-1895bd90]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-1895bd90]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-1895bd90]{min-height:200px}.section-label[data-v-1895bd90]{-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-1895bd90],.section-label[data-v-1895bd90]{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-1895bd90]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-1895bd90]{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-1895bd90]{font-weight:500}.section-label .buy-indicator-btn[data-v-1895bd90]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-1895bd90]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-1895bd90]{display:none!important}}.section-content[data-v-1895bd90]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-1895bd90]{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-1895bd90]: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-1895bd90]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-1895bd90]{color:#1890ff}.indicator-card.indicator-active[data-v-1895bd90]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-1895bd90]: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-1895bd90]{color:#52c41a}.indicator-card.disabled[data-v-1895bd90]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-1895bd90]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-1895bd90]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-1895bd90]{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-1895bd90]{color:#999;font-size:12px}.card-action[data-v-1895bd90]:hover{color:#1890ff}.card-actions[data-v-1895bd90]{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-1895bd90]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-1895bd90]{color:#1890ff}.action-icon.edit-icon[data-v-1895bd90]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-1895bd90]{color:#ff4d4f}.action-icon.delete-icon[data-v-1895bd90]:hover{color:#ff7875}.action-icon[data-v-1895bd90]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-1895bd90]{color:#52c41a}.action-icon.backtest-icon[data-v-1895bd90]{color:#722ed1}.action-icon.backtest-icon[data-v-1895bd90]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-1895bd90]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-1895bd90]:hover{color:#08979c}.action-icon.publish-icon[data-v-1895bd90]{color:#1890ff}.action-icon.publish-icon[data-v-1895bd90]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-1895bd90]{color:#52c41a}.action-icon.publish-icon.published[data-v-1895bd90]:hover{color:#73d13d}.action-icon.status-icon.status-normal[data-v-1895bd90]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-1895bd90]{color:#ff4d4f}.action-icon.expiry-icon[data-v-1895bd90]{color:#1890ff}.empty-indicators[data-v-1895bd90]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-1895bd90],.loading-indicators[data-v-1895bd90]{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-1895bd90]{padding:20px}.custom-scrollbar[data-v-1895bd90]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-1895bd90]::-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-1895bd90]{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-1895bd90]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-1895bd90]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-1895bd90]{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-1895bd90]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-1895bd90]{padding:12px}.chart-header .header-top[data-v-1895bd90],.chart-header[data-v-1895bd90]{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-1895bd90]{padding:0}.chart-header .header-left[data-v-1895bd90]{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-1895bd90]{width:100%}.chart-header .search-section .symbol-select[data-v-1895bd90]{width:100%!important}.chart-header .timeframe-group[data-v-1895bd90]{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-1895bd90]{-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-1895bd90]{display:none}.chart-content[data-v-1895bd90]{overflow-y:auto}.chart-content[data-v-1895bd90],.chart-main-row[data-v-1895bd90]{-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-1895bd90]{-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-1895bd90],.mobile-symbol-price[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-1895bd90]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-1895bd90]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-1895bd90]{font-size:14px;font-weight:500}kline-chart[data-v-1895bd90]{-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-1895bd90] .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-1895bd90]{-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-1895bd90]{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-1895bd90]{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-1895bd90]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-1895bd90]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90],.chart-right .indicators-panel .panel-body[data-v-1895bd90]{-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-1895bd90]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .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-1895bd90] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .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-1895bd90] .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-1895bd90] .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-1895bd90],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .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-1895bd90]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-1895bd90]{-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-1895bd90],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-1895bd90]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-1895bd90]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-1895bd90]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-1895bd90]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-1895bd90]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-1895bd90],.chart-right .indicators-panel .indicator-card .card-params[data-v-1895bd90]{font-size:11px}}.qt-header-btn[data-v-1895bd90]{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-1895bd90]:focus,.qt-header-btn[data-v-1895bd90]: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-1895bd90]{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-1895bd90]: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-1895bd90],body.dark,body.realdark{background:#131722;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;-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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#868993;background:#2a2e39}.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-1895bd90],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-1895bd90],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-1895bd90],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-1895bd90]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90] .ant-select-selection,body.dark,body.realdark{background-color:#1e222d;border-color:#2a2e39;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-1895bd90] .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-1895bd90] .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-1895bd90] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-1895bd90] .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-1895bd90],body.dark,body.realdark{background:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-1895bd90],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-1895bd90]:hover,body.dark,body.realdark{color:#1890ff;background:#1e222d}.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-1895bd90],body.dark,body.realdark{color:#1890ff;background:#1e222d;-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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#868993;background:#21283c}.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-1895bd90],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-1895bd90],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-1895bd90],body.dark,body.realdark{background:#1e222d;border-left-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-1895bd90],body.dark,body.realdark{background:#1e222d}.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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;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-1895bd90],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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-1895bd90]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2e39}.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-1895bd90],body.dark,body.realdark{background:#1e222d}.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-1895bd90],body.dark,body.realdark{border-bottom-color:#2a2e39}.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-1895bd90],body.dark,body.realdark{color:#868993;background:#2a2e39;border-bottom-color:#2a2e39}.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-1895bd90],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-1895bd90],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-1895bd90],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-1895bd90]: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-1895bd90],body.dark,body.realdark{background:#1e222d;border-color:#2a2e39}.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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-1895bd90]:hover,body.dark,body.realdark{background:#2a2e39;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-1895bd90],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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90],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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-1895bd90],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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-1895bd90]: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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90],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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-1895bd90],body.dark,body.realdark{border-top-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-1895bd90],body.dark,body.realdark{border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-1895bd90],body.dark,body.realdark{border-top-color:#2a2e39;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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-1895bd90] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2e39}.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-1895bd90] .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-1895bd90] .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-1895bd90] .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-1895bd90],body.dark,body.realdark{background:#1e222d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-1895bd90],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-1895bd90],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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-1895bd90]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-1895bd90],.add-stock-modal-content .search-results-section[data-v-1895bd90],.add-stock-modal-content .symbol-search-section[data-v-1895bd90]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-1895bd90],.add-stock-modal-content .search-results-section .section-title[data-v-1895bd90]{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-1895bd90]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-1895bd90]{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-1895bd90]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-1895bd90]{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-1895bd90]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-1895bd90]{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-1895bd90]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-1895bd90]{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-1895bd90],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-1895bd90],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-1895bd90],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2e39}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-1895bd90]: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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-1895bd90]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-1895bd90]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-1895bd90]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-1895bd90]{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-1895bd90]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-1895bd90]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-1895bd90]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/346.a278841f.css b/frontend/dist/css/346.a278841f.css new file mode 100644 index 0000000..0f11daa --- /dev/null +++ b/frontend/dist/css/346.a278841f.css @@ -0,0 +1 @@ +.quick-trade-drawer[data-v-0d547552] .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-0d547552]{-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-0d547552],.qt-header[data-v-0d547552]{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-0d547552]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0d547552]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0d547552]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0d547552]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0d547552]:hover{color:#333}.qt-symbol-bar[data-v-0d547552]{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-0d547552],.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-0d547552]{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-0d547552]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999;font-size:12px}.qt-section[data-v-0d547552]{padding:8px 20px}.qt-section .qt-label[data-v-0d547552]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0d547552]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0d547552]{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-0d547552]{color:#999}.qt-balance .qt-balance-value[data-v-0d547552]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0d547552]{-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-0d547552]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0d547552]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0d547552]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0d547552]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0d547552]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:active{background:#cf1322!important}.qt-position-section[data-v-0d547552]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-0d547552]{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-0d547552]{padding:8px 20px 12px}.qt-history-section[data-v-0d547552] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-0d547552] .ant-collapse-item{border:none}.qt-history-section[data-v-0d547552] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-0d547552] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-0d547552] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-0d547552] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-0d547552]{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-0d547552]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0d547552]{border-left-color:#52c41a}.qt-position-card.short[data-v-0d547552]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0d547552]{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-0d547552]:first-child{color:#999}.qt-position-empty[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0d547552]{color:#52c41a!important}.qt-red[data-v-0d547552]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0d547552]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0d547552]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0d547552]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0d547552]{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-0d547552]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0d547552]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0d547552]{color:#666}.theme-dark .qt-header .qt-close[data-v-0d547552]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0d547552]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999}.theme-dark .qt-section .qt-label[data-v-0d547552]{color:#777}.theme-dark .qt-position-card[data-v-0d547552]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-0d547552],.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-0d547552]{color:#888}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-0d547552]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0d547552]{color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0d547552] .ant-drawer-content{background:#141414}.theme-dark[data-v-0d547552] .ant-input-number,.theme-dark[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0d547552] .ant-slider-rail{background:#303030}.theme-dark[data-v-0d547552] .ant-slider-track{background:#1890ff}.ai-asset-analysis-page[data-v-3b2ffb77]{padding:16px;min-height:calc(100vh - 120px);background:#f0f2f5}.ai-asset-analysis-page .opp-section[data-v-3b2ffb77]{margin-bottom:12px}.ai-asset-analysis-page .opp-section .opp-header[data-v-3b2ffb77]{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;padding:0 4px}.ai-asset-analysis-page .opp-section .opp-header .opp-title[data-v-3b2ffb77]{font-size:14px;font-weight:600;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-header .opp-header-right[data-v-3b2ffb77]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.ai-asset-analysis-page .opp-section .opp-header .opp-update-hint[data-v-3b2ffb77]{font-size:12px;color:#8c8c8c}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]{overflow:hidden;position:relative;border-radius:10px}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:after,.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:before{content:"";position:absolute;top:0;bottom:0;width:40px;z-index:2;pointer-events:none}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]: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 .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]: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 .opp-section .opp-track[data-v-3b2ffb77]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;-webkit-animation:opp-scroll-left-3b2ffb77 60s linear infinite;animation:opp-scroll-left-3b2ffb77 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .opp-section .opp-track.paused[data-v-3b2ffb77]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes opp-scroll-left-3b2ffb77{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes opp-scroll-left-3b2ffb77{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .opp-section .opp-card[data-v-3b2ffb77]{width:190px;background:#fff;border-radius:10px;padding:12px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.06);box-shadow:0 1px 3px rgba(0,0,0,.06);cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-left:3px solid #d9d9d9;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .opp-section .opp-card.bullish[data-v-3b2ffb77]{border-left-color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card.bearish[data-v-3b2ffb77]{border-left-color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card[data-v-3b2ffb77]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.1);box-shadow:0 4px 12px rgba(0,0,0,.1)}.ai-asset-analysis-page .opp-section .opp-card .opp-top[data-v-3b2ffb77]{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}.ai-asset-analysis-page .opp-section .opp-card .opp-symbol[data-v-3b2ffb77]{font-weight:700;font-size:14px;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-card .opp-market-tag[data-v-3b2ffb77]{font-size:11px}.ai-asset-analysis-page .opp-section .opp-card .opp-price[data-v-3b2ffb77]{font-size:13px;color:#595959}.ai-asset-analysis-page .opp-section .opp-card .opp-change[data-v-3b2ffb77]{font-size:15px;font-weight:600}.ai-asset-analysis-page .opp-section .opp-card .opp-change.up[data-v-3b2ffb77]{color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card .opp-change.down[data-v-3b2ffb77]{color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card .opp-signal[data-v-3b2ffb77]{margin-top:4px}.ai-asset-analysis-page .opp-section .opp-card .opp-reason[data-v-3b2ffb77]{font-size:11px;color:#8c8c8c;margin-top:4px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .opp-section .opp-card .opp-actions[data-v-3b2ffb77]{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-top:6px;gap:6px}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-3b2ffb77]{font-size:12px;color:#1890ff;font-weight:500;cursor:pointer}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-3b2ffb77]:hover{text-decoration:underline}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-3b2ffb77]{font-size:11px;color:#fff;background:linear-gradient(135deg,#1890ff,#722ed1);padding:2px 8px;border-radius:10px;font-weight:600;cursor:pointer;white-space:nowrap;-webkit-transition:all .2s;transition:all .2s}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-3b2ffb77]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 8px rgba(114,46,209,.3);box-shadow:0 2px 8px rgba(114,46,209,.3)}.ai-asset-analysis-page .qt-floating-btn[data-v-3b2ffb77]{position:fixed;right:24px;bottom:80px;width:52px;height:52px;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;font-size:24px;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:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-3b2ffb77 2s ease-in-out infinite;animation:qt-float-pulse-3b2ffb77 2s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-3b2ffb77]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(114,46,209,.5);box-shadow:0 6px 24px rgba(114,46,209,.5)}@-webkit-keyframes qt-float-pulse-3b2ffb77{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-3b2ffb77{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-3b2ffb77]{border-radius:12px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06)}.ai-asset-analysis-page .workspace-card[data-v-3b2ffb77] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-bar{margin-bottom:0;padding:0 16px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab{font-size:15px;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-3b2ffb77] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-3b2ffb77] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page.theme-dark[data-v-3b2ffb77]{background:#0d1117}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-title[data-v-3b2ffb77]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-update-hint[data-v-3b2ffb77]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:before{background:-webkit-gradient(linear,left top,right top,from(#0d1117),to(transparent));background:linear-gradient(90deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:after{background:-webkit-gradient(linear,right top,left top,from(#0d1117),to(transparent));background:linear-gradient(270deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-3b2ffb77]{background:#161b22;border-color:#30363d;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.3);box-shadow:0 1px 3px rgba(0,0,0,.3)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-symbol[data-v-3b2ffb77]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-price[data-v-3b2ffb77],.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-reason[data-v-3b2ffb77]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-action[data-v-3b2ffb77]{color:#58a6ff}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-trade-btn[data-v-3b2ffb77]{background:linear-gradient(135deg,#58a6ff,#8957e5)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-3b2ffb77]:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-3b2ffb77]{background:#161b22;border-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-bar{border-bottom-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab-active{color:#58a6ff}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-ink-bar{background-color:#58a6ff} \ No newline at end of file diff --git a/frontend/dist/css/378.3729a915.css b/frontend/dist/css/378.3729a915.css deleted file mode 100644 index a152d14..0000000 --- a/frontend/dist/css/378.3729a915.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-466e34db]{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-466e34db]{background:#131722;border-right-color:#2a2e39}.chart-wrapper[data-v-466e34db]{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-466e34db]{background:#131722}.drawing-toolbar[data-v-466e34db]{-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-466e34db]{background:#131722;border-right-color:#2a2e39}.drawing-tool-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc}.drawing-tool-btn[data-v-466e34db]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-466e34db]:hover{background:#1f2943;color:#13c2c2}.drawing-tool-btn.active[data-v-466e34db]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-466e34db]{background:#1f2943;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-466e34db]{margin:8px 0;height:20px}.indicator-toolbar[data-v-466e34db]{-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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-466e34db]{-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-466e34db]{background:#131722;border-bottom-color:#2a2e39}.indicator-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc;background:#1f2943;border-color:#2a2e39}.indicator-btn[data-v-466e34db]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-466e34db]:hover{color:#13c2c2;border-color:#13c2c2;background:#1f2943}.indicator-btn.active[data-v-466e34db]{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-466e34db]{color:#13c2c2;background:#1f2943;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-466e34db]{-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-466e34db]{background:#131722}.chart-overlay[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.95)}.error-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-466e34db]{background:rgba(19,23,34,.98)}.hint-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-466e34db]{background:rgba(19,23,34,.98)}.warning-box[data-v-466e34db]{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-466e34db]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-466e34db]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-466e34db]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-466e34db]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-466e34db]{color:#868993}.chart-left.theme-dark .hint-box[data-v-466e34db]{color:#d1d4dc}.hint-title[data-v-466e34db]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-466e34db]{color:#d1d4dc}.hint-desc[data-v-466e34db]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-466e34db]{color:#787b86}.history-loading-hint[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.98)!important;border-color:#2a2e39;color:#d1d4dc!important}.loading-text[data-v-466e34db]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-466e34db]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{padding-left:12px}.kline-chart-container[data-v-466e34db]{margin-left:0}.chart-left[data-v-466e34db]{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-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-466e34db]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-466e34db]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-466e34db]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}[data-v-9d8ac1fc] .ant-form-item-label{white-space:normal;line-height:1.2}[data-v-9d8ac1fc] .ant-form-item-label>label{white-space:normal}[data-v-9d8ac1fc] .ant-form-item-control{min-width:0}.backtest-modal[data-v-9d8ac1fc] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.backtest-content[data-v-9d8ac1fc]{position:relative}.field-hint[data-v-9d8ac1fc]{margin-top:4px;font-size:12px;line-height:1.4;color:#8c8c8c}.section-title[data-v-9d8ac1fc]{font-size:15px;font-weight:600;color:#262626;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #f0f0f0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.section-title .anticon[data-v-9d8ac1fc]{color:#1890ff}.config-section[data-v-9d8ac1fc]{margin-bottom:24px}.precision-info[data-v-9d8ac1fc]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.date-quick-select[data-v-9d8ac1fc],.precision-info[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.date-quick-select[data-v-9d8ac1fc]{padding:8px 12px;background:#fafafa;border-radius:6px;border:1px solid #f0f0f0}.result-section[data-v-9d8ac1fc]{margin-top:24px}.metrics-cards[data-v-9d8ac1fc]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px}@media (max-width:1200px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(4,1fr)}}@media (max-width:992px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(3,1fr)}}@media (max-width:576px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-9d8ac1fc]{background:#fafafa;border-radius:8px;padding:16px;text-align:center;-webkit-transition:all .3s;transition:all .3s}.metric-card[data-v-9d8ac1fc]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.1);box-shadow:0 2px 8px rgba(0,0,0,.1)}.metric-card.positive[data-v-9d8ac1fc]{background:linear-gradient(135deg,#f6ffed,#d9f7be)}.metric-card.positive .metric-value[data-v-9d8ac1fc]{color:#52c41a}.metric-card.negative[data-v-9d8ac1fc]{background:linear-gradient(135deg,#fff2f0,#ffccc7)}.metric-card.negative .metric-value[data-v-9d8ac1fc]{color:#f5222d}.metric-card .metric-label[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-bottom:8px}.metric-card .metric-value[data-v-9d8ac1fc]{font-size:20px;font-weight:700;color:#262626}.metric-card .metric-amount[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-top:4px}.chart-section[data-v-9d8ac1fc]{margin-bottom:24px}.chart-title[data-v-9d8ac1fc]{font-size:14px;font-weight:600;color:#595959;margin-bottom:12px}.equity-chart[data-v-9d8ac1fc]{width:100%;height:300px;border:1px solid #f0f0f0;border-radius:8px}.trades-section[data-v-9d8ac1fc]{margin-top:24px}.loading-overlay[data-v-9d8ac1fc]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.9);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;z-index:100;border-radius:8px}.loading-overlay .loading-content[data-v-9d8ac1fc]{text-align:center}.loading-overlay .loading-animation[data-v-9d8ac1fc]{margin-bottom:20px}.loading-overlay .chart-bars[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;height:60px;gap:6px}.loading-overlay .bar[data-v-9d8ac1fc]{width:8px;background:-webkit-gradient(linear,left top,left bottom,from(#1890ff),to(#52c41a));background:linear-gradient(180deg,#1890ff,#52c41a);border-radius:4px;-webkit-animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite;animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite}.loading-overlay .bar1[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:0s;animation-delay:0s}.loading-overlay .bar2[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.1s;animation-delay:.1s}.loading-overlay .bar3[data-v-9d8ac1fc]{height:50px;-webkit-animation-delay:.2s;animation-delay:.2s}.loading-overlay .bar4[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.3s;animation-delay:.3s}.loading-overlay .bar5[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:.4s;animation-delay:.4s}@-webkit-keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}@keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}.loading-overlay .loading-text[data-v-9d8ac1fc]{font-size:16px;font-weight:500;color:#1890ff;margin-bottom:8px}.loading-overlay .loading-subtext[data-v-9d8ac1fc]{font-size:13px;color:#666;-webkit-animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite;animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite}@-webkit-keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}@keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}.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}.quick-trade-drawer[data-v-0f7d87dc] .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-0f7d87dc]{-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-0f7d87dc],.qt-header[data-v-0f7d87dc]{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-0f7d87dc]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0f7d87dc]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0f7d87dc]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0f7d87dc]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0f7d87dc]:hover{color:#333}.qt-symbol-bar[data-v-0f7d87dc]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc],.qt-symbol-bar[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc]{gap:8px}.qt-symbol-bar .qt-symbol-info .qt-symbol-name[data-v-0f7d87dc]{font-size:18px;font-weight:700;letter-spacing:.5px}.qt-symbol-bar .qt-current-price[data-v-0f7d87dc]{font-size:18px;font-weight:600;color:#333}.qt-section[data-v-0f7d87dc]{padding:8px 20px}.qt-section .qt-label[data-v-0f7d87dc]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0f7d87dc]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0f7d87dc]{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-0f7d87dc]{color:#999}.qt-balance .qt-balance-value[data-v-0f7d87dc]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0f7d87dc]{-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-0f7d87dc]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0f7d87dc]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0f7d87dc]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0f7d87dc]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:active{background:#cf1322!important}.qt-history-section[data-v-0f7d87dc],.qt-position-section[data-v-0f7d87dc]{padding:8px 20px 12px}.qt-history-section .qt-section-header[data-v-0f7d87dc],.qt-position-section .qt-section-header[data-v-0f7d87dc]{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-position-card[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0f7d87dc]{border-left-color:#52c41a}.qt-position-card.short[data-v-0f7d87dc]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0f7d87dc]{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-0f7d87dc]:first-child{color:#999}.qt-position-empty[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0f7d87dc]{color:#52c41a!important}.qt-red[data-v-0f7d87dc]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0f7d87dc]{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-0f7d87dc]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0f7d87dc]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0f7d87dc]{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-0f7d87dc]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0f7d87dc]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]{color:#666}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0f7d87dc]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0f7d87dc],.theme-dark .qt-symbol-bar .qt-symbol-name[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-section .qt-label[data-v-0f7d87dc]{color:#777}.theme-dark .qt-position-card[data-v-0f7d87dc]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:first-child{color:#777}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:last-child{color:#ccc}.theme-dark .qt-trade-item[data-v-0f7d87dc]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0f7d87dc]{color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-drawer-content{background:#141414}.theme-dark[data-v-0f7d87dc] .ant-input-number,.theme-dark[data-v-0f7d87dc] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0f7d87dc] .ant-slider-rail{background:#303030}.theme-dark[data-v-0f7d87dc] .ant-slider-track{background:#1890ff}.chart-container[data-v-1895bd90]{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-1895bd90],.chart-header[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-1895bd90],.header-top[data-v-1895bd90]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-1895bd90]{gap:20px}.symbol-select[data-v-1895bd90]{width:220px}.symbol-select[data-v-1895bd90] .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-1895bd90] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-1895bd90] .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-1895bd90] .ant-select-arrow,.symbol-select[data-v-1895bd90] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-1895bd90]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-1895bd90]{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-1895bd90]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{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-1895bd90]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-1895bd90]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-1895bd90]{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-1895bd90]{color:#0ecb81}.price-info.color-down[data-v-1895bd90]{color:#f6465d}.symbol-price[data-v-1895bd90]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-1895bd90]{font-size:12px}.mobile-symbol-price[data-v-1895bd90]{display:none}.panel-header .theme-switcher[data-v-1895bd90]{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-1895bd90],.panel-header .theme-toggle-btn[data-v-1895bd90]{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-1895bd90]:hover,.panel-header .theme-toggle-btn[data-v-1895bd90]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-1895bd90],.panel-header .theme-toggle-btn.active[data-v-1895bd90]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-1895bd90],.panel-header .theme-toggle-btn .anticon[data-v-1895bd90]{font-size:16px}.chart-content[data-v-1895bd90]{-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-1895bd90],.chart-main-row[data-v-1895bd90]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-1895bd90]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-1895bd90]{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-1895bd90],.indicators-panel[data-v-1895bd90]{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-1895bd90]{height:100%}.panel-header[data-v-1895bd90]{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-1895bd90]{margin-right:0}.panel-body[data-v-1895bd90]{padding:0;overflow:hidden}.indicator-section[data-v-1895bd90],.panel-body[data-v-1895bd90]{-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-1895bd90]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-1895bd90]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-1895bd90]{min-height:200px}.section-label[data-v-1895bd90]{-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-1895bd90],.section-label[data-v-1895bd90]{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-1895bd90]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-1895bd90]{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-1895bd90]{font-weight:500}.section-label .buy-indicator-btn[data-v-1895bd90]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-1895bd90]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-1895bd90]{display:none!important}}.section-content[data-v-1895bd90]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-1895bd90]{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-1895bd90]: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-1895bd90]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-1895bd90]{color:#1890ff}.indicator-card.indicator-active[data-v-1895bd90]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-1895bd90]: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-1895bd90]{color:#52c41a}.indicator-card.disabled[data-v-1895bd90]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-1895bd90]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-1895bd90]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-1895bd90]{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-1895bd90]{color:#999;font-size:12px}.card-action[data-v-1895bd90]:hover{color:#1890ff}.card-actions[data-v-1895bd90]{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-1895bd90]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-1895bd90]{color:#1890ff}.action-icon.edit-icon[data-v-1895bd90]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-1895bd90]{color:#ff4d4f}.action-icon.delete-icon[data-v-1895bd90]:hover{color:#ff7875}.action-icon[data-v-1895bd90]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-1895bd90]{color:#52c41a}.action-icon.backtest-icon[data-v-1895bd90]{color:#722ed1}.action-icon.backtest-icon[data-v-1895bd90]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-1895bd90]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-1895bd90]:hover{color:#08979c}.action-icon.publish-icon[data-v-1895bd90]{color:#1890ff}.action-icon.publish-icon[data-v-1895bd90]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-1895bd90]{color:#52c41a}.action-icon.publish-icon.published[data-v-1895bd90]:hover{color:#73d13d}.action-icon.status-icon.status-normal[data-v-1895bd90]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-1895bd90]{color:#ff4d4f}.action-icon.expiry-icon[data-v-1895bd90]{color:#1890ff}.empty-indicators[data-v-1895bd90]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-1895bd90],.loading-indicators[data-v-1895bd90]{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-1895bd90]{padding:20px}.custom-scrollbar[data-v-1895bd90]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-1895bd90]::-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-1895bd90]{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-1895bd90]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-1895bd90]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-1895bd90]{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-1895bd90]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-1895bd90]{padding:12px}.chart-header .header-top[data-v-1895bd90],.chart-header[data-v-1895bd90]{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-1895bd90]{padding:0}.chart-header .header-left[data-v-1895bd90]{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-1895bd90]{width:100%}.chart-header .search-section .symbol-select[data-v-1895bd90]{width:100%!important}.chart-header .timeframe-group[data-v-1895bd90]{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-1895bd90]{-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-1895bd90]{display:none}.chart-content[data-v-1895bd90]{overflow-y:auto}.chart-content[data-v-1895bd90],.chart-main-row[data-v-1895bd90]{-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-1895bd90]{-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-1895bd90],.mobile-symbol-price[data-v-1895bd90]{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-1895bd90]{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-1895bd90]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-1895bd90]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-1895bd90]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-1895bd90]{font-size:14px;font-weight:500}kline-chart[data-v-1895bd90]{-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-1895bd90] .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-1895bd90]{-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-1895bd90]{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-1895bd90]{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-1895bd90]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-1895bd90]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90],.chart-right .indicators-panel .panel-body[data-v-1895bd90]{-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-1895bd90]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .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-1895bd90] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .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-1895bd90] .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-1895bd90] .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-1895bd90],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-1895bd90] .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-1895bd90]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-1895bd90]{-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-1895bd90],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-1895bd90]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-1895bd90]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-1895bd90]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-1895bd90]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-1895bd90]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-1895bd90],.chart-right .indicators-panel .indicator-card .card-params[data-v-1895bd90]{font-size:11px}}.qt-header-btn[data-v-1895bd90]{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-1895bd90]:focus,.qt-header-btn[data-v-1895bd90]: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-1895bd90]{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-1895bd90]: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-1895bd90],body.dark,body.realdark{background:#131722;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;-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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#868993;background:#2a2e39}.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-1895bd90],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-1895bd90],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-1895bd90],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-1895bd90]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90] .ant-select-selection,body.dark,body.realdark{background-color:#1e222d;border-color:#2a2e39;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-1895bd90] .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-1895bd90] .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-1895bd90] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-1895bd90] .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-1895bd90],body.dark,body.realdark{background:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-1895bd90],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-1895bd90]:hover,body.dark,body.realdark{color:#1890ff;background:#1e222d}.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-1895bd90],body.dark,body.realdark{color:#1890ff;background:#1e222d;-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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#868993;background:#21283c}.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-1895bd90],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-1895bd90],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-1895bd90],body.dark,body.realdark{background:#1e222d;border-left-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-1895bd90],body.dark,body.realdark{background:#1e222d}.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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;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-1895bd90],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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-1895bd90]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2e39}.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-1895bd90],body.dark,body.realdark{background:#1e222d}.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-1895bd90],body.dark,body.realdark{border-bottom-color:#2a2e39}.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-1895bd90],body.dark,body.realdark{color:#868993;background:#2a2e39;border-bottom-color:#2a2e39}.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-1895bd90],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-1895bd90],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-1895bd90],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-1895bd90]: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-1895bd90],body.dark,body.realdark{background:#1e222d;border-color:#2a2e39}.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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-1895bd90]:hover,body.dark,body.realdark{background:#2a2e39;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-1895bd90],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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90],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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-1895bd90],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-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-1895bd90]: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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90],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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-1895bd90],body.dark,body.realdark{border-top-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-1895bd90],body.dark,body.realdark{border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-1895bd90],body.dark,body.realdark{border-top-color:#2a2e39;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-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-1895bd90] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2e39}.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-1895bd90] .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-1895bd90] .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-1895bd90] .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-1895bd90],body.dark,body.realdark{background:#1e222d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-1895bd90],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-1895bd90],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-1895bd90],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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-1895bd90]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-1895bd90],.add-stock-modal-content .search-results-section[data-v-1895bd90],.add-stock-modal-content .symbol-search-section[data-v-1895bd90]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-1895bd90],.add-stock-modal-content .search-results-section .section-title[data-v-1895bd90]{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-1895bd90]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-1895bd90]{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-1895bd90]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-1895bd90]{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-1895bd90]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-1895bd90]{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-1895bd90]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-1895bd90]{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-1895bd90],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-1895bd90],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-1895bd90],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2e39}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-1895bd90]: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-1895bd90],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-1895bd90],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-1895bd90]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-1895bd90]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-1895bd90]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-1895bd90]{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-1895bd90]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-1895bd90]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-1895bd90]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/771.17b34efc.css b/frontend/dist/css/771.17b34efc.css deleted file mode 100644 index 9c5de82..0000000 --- a/frontend/dist/css/771.17b34efc.css +++ /dev/null @@ -1 +0,0 @@ -.quick-trade-drawer[data-v-0f7d87dc] .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-0f7d87dc]{-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-0f7d87dc],.qt-header[data-v-0f7d87dc]{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-0f7d87dc]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0f7d87dc]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0f7d87dc]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0f7d87dc]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0f7d87dc]:hover{color:#333}.qt-symbol-bar[data-v-0f7d87dc]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc],.qt-symbol-bar[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc]{gap:8px}.qt-symbol-bar .qt-symbol-info .qt-symbol-name[data-v-0f7d87dc]{font-size:18px;font-weight:700;letter-spacing:.5px}.qt-symbol-bar .qt-current-price[data-v-0f7d87dc]{font-size:18px;font-weight:600;color:#333}.qt-section[data-v-0f7d87dc]{padding:8px 20px}.qt-section .qt-label[data-v-0f7d87dc]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0f7d87dc]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0f7d87dc]{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-0f7d87dc]{color:#999}.qt-balance .qt-balance-value[data-v-0f7d87dc]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0f7d87dc]{-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-0f7d87dc]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0f7d87dc]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0f7d87dc]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0f7d87dc]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:active{background:#cf1322!important}.qt-history-section[data-v-0f7d87dc],.qt-position-section[data-v-0f7d87dc]{padding:8px 20px 12px}.qt-history-section .qt-section-header[data-v-0f7d87dc],.qt-position-section .qt-section-header[data-v-0f7d87dc]{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-position-card[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0f7d87dc]{border-left-color:#52c41a}.qt-position-card.short[data-v-0f7d87dc]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0f7d87dc]{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-0f7d87dc]:first-child{color:#999}.qt-position-empty[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0f7d87dc]{color:#52c41a!important}.qt-red[data-v-0f7d87dc]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0f7d87dc]{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-0f7d87dc]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0f7d87dc]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0f7d87dc]{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-0f7d87dc]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0f7d87dc]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]{color:#666}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0f7d87dc]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0f7d87dc],.theme-dark .qt-symbol-bar .qt-symbol-name[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-section .qt-label[data-v-0f7d87dc]{color:#777}.theme-dark .qt-position-card[data-v-0f7d87dc]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:first-child{color:#777}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:last-child{color:#ccc}.theme-dark .qt-trade-item[data-v-0f7d87dc]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0f7d87dc]{color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-drawer-content{background:#141414}.theme-dark[data-v-0f7d87dc] .ant-input-number,.theme-dark[data-v-0f7d87dc] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0f7d87dc] .ant-slider-rail{background:#303030}.theme-dark[data-v-0f7d87dc] .ant-slider-track{background:#1890ff}.ai-asset-analysis-page[data-v-68efba62]{padding:16px;min-height:calc(100vh - 120px);background:#f0f2f5}.ai-asset-analysis-page .opp-section[data-v-68efba62]{margin-bottom:12px}.ai-asset-analysis-page .opp-section .opp-header[data-v-68efba62]{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;padding:0 4px}.ai-asset-analysis-page .opp-section .opp-header .opp-title[data-v-68efba62]{font-size:14px;font-weight:600;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-header .opp-header-right[data-v-68efba62]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.ai-asset-analysis-page .opp-section .opp-header .opp-update-hint[data-v-68efba62]{font-size:12px;color:#8c8c8c}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]{overflow:hidden;position:relative;border-radius:10px}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]:after,.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]:before{content:"";position:absolute;top:0;bottom:0;width:40px;z-index:2;pointer-events:none}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]: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 .opp-section .opp-carousel-wrapper[data-v-68efba62]: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 .opp-section .opp-track[data-v-68efba62]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;-webkit-animation:opp-scroll-left-68efba62 60s linear infinite;animation:opp-scroll-left-68efba62 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .opp-section .opp-track.paused[data-v-68efba62]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes opp-scroll-left-68efba62{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes opp-scroll-left-68efba62{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .opp-section .opp-card[data-v-68efba62]{width:190px;background:#fff;border-radius:10px;padding:12px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.06);box-shadow:0 1px 3px rgba(0,0,0,.06);cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-left:3px solid #d9d9d9;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .opp-section .opp-card.bullish[data-v-68efba62]{border-left-color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card.bearish[data-v-68efba62]{border-left-color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card[data-v-68efba62]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.1);box-shadow:0 4px 12px rgba(0,0,0,.1)}.ai-asset-analysis-page .opp-section .opp-card .opp-top[data-v-68efba62]{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}.ai-asset-analysis-page .opp-section .opp-card .opp-symbol[data-v-68efba62]{font-weight:700;font-size:14px;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-card .opp-market-tag[data-v-68efba62]{font-size:11px}.ai-asset-analysis-page .opp-section .opp-card .opp-price[data-v-68efba62]{font-size:13px;color:#595959}.ai-asset-analysis-page .opp-section .opp-card .opp-change[data-v-68efba62]{font-size:15px;font-weight:600}.ai-asset-analysis-page .opp-section .opp-card .opp-change.up[data-v-68efba62]{color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card .opp-change.down[data-v-68efba62]{color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card .opp-signal[data-v-68efba62]{margin-top:4px}.ai-asset-analysis-page .opp-section .opp-card .opp-reason[data-v-68efba62]{font-size:11px;color:#8c8c8c;margin-top:4px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .opp-section .opp-card .opp-actions[data-v-68efba62]{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-top:6px;gap:6px}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-68efba62]{font-size:12px;color:#1890ff;font-weight:500;cursor:pointer}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-68efba62]:hover{text-decoration:underline}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-68efba62]{font-size:11px;color:#fff;background:linear-gradient(135deg,#1890ff,#722ed1);padding:2px 8px;border-radius:10px;font-weight:600;cursor:pointer;white-space:nowrap;-webkit-transition:all .2s;transition:all .2s}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-68efba62]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 8px rgba(114,46,209,.3);box-shadow:0 2px 8px rgba(114,46,209,.3)}.ai-asset-analysis-page .qt-floating-btn[data-v-68efba62]{position:fixed;right:24px;bottom:80px;width:52px;height:52px;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;font-size:24px;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:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-68efba62 2s ease-in-out infinite;animation:qt-float-pulse-68efba62 2s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-68efba62]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(114,46,209,.5);box-shadow:0 6px 24px rgba(114,46,209,.5)}@-webkit-keyframes qt-float-pulse-68efba62{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-68efba62{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-68efba62]{border-radius:12px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06)}.ai-asset-analysis-page .workspace-card[data-v-68efba62] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-bar{margin-bottom:0;padding:0 16px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab{font-size:15px;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-68efba62] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-68efba62] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page.theme-dark[data-v-68efba62]{background:#0d1117}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-title[data-v-68efba62]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-update-hint[data-v-68efba62]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-68efba62]:before{background:-webkit-gradient(linear,left top,right top,from(#0d1117),to(transparent));background:linear-gradient(90deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-68efba62]:after{background:-webkit-gradient(linear,right top,left top,from(#0d1117),to(transparent));background:linear-gradient(270deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-68efba62]{background:#161b22;border-color:#30363d;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.3);box-shadow:0 1px 3px rgba(0,0,0,.3)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-symbol[data-v-68efba62]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-price[data-v-68efba62],.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-reason[data-v-68efba62]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-action[data-v-68efba62]{color:#58a6ff}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-trade-btn[data-v-68efba62]{background:linear-gradient(135deg,#58a6ff,#8957e5)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-68efba62]:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-68efba62]{background:#161b22;border-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-bar{border-bottom-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab-active{color:#58a6ff}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-ink-bar{background-color:#58a6ff} \ No newline at end of file diff --git a/frontend/dist/css/808.0b55d10c.css b/frontend/dist/css/808.0b55d10c.css new file mode 100644 index 0000000..35b7f05 --- /dev/null +++ b/frontend/dist/css/808.0b55d10c.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}[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-466e34db]{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-466e34db]{background:#131722;border-right-color:#2a2e39}.chart-wrapper[data-v-466e34db]{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-466e34db]{background:#131722}.drawing-toolbar[data-v-466e34db]{-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-466e34db]{background:#131722;border-right-color:#2a2e39}.drawing-tool-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc}.drawing-tool-btn[data-v-466e34db]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-466e34db]:hover{background:#1f2943;color:#13c2c2}.drawing-tool-btn.active[data-v-466e34db]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-466e34db]{background:#1f2943;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-466e34db]{margin:8px 0;height:20px}.indicator-toolbar[data-v-466e34db]{-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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-466e34db]{-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-466e34db]{background:#131722;border-bottom-color:#2a2e39}.indicator-btn[data-v-466e34db]{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-466e34db]{color:#d1d4dc;background:#1f2943;border-color:#2a2e39}.indicator-btn[data-v-466e34db]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-466e34db]:hover{color:#13c2c2;border-color:#13c2c2;background:#1f2943}.indicator-btn.active[data-v-466e34db]{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-466e34db]{color:#13c2c2;background:#1f2943;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-466e34db]{-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-466e34db]{background:#131722}.chart-overlay[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.95)}.error-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-466e34db]{background:rgba(19,23,34,.98)}.hint-box[data-v-466e34db]{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-466e34db]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-466e34db]{background:rgba(19,23,34,.98)}.warning-box[data-v-466e34db]{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-466e34db]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-466e34db]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-466e34db]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-466e34db]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-466e34db]{color:#868993}.chart-left.theme-dark .hint-box[data-v-466e34db]{color:#d1d4dc}.hint-title[data-v-466e34db]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-466e34db]{color:#d1d4dc}.hint-desc[data-v-466e34db]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-466e34db]{color:#787b86}.history-loading-hint[data-v-466e34db]{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-466e34db]{background:rgba(19,23,34,.98)!important;border-color:#2a2e39;color:#d1d4dc!important}.loading-text[data-v-466e34db]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{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-466e34db]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-466e34db]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-466e34db]{display:none}.indicator-toolbar[data-v-466e34db]{padding-left:12px}.kline-chart-container[data-v-466e34db]{margin-left:0}.chart-left[data-v-466e34db]{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-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-466e34db]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-466e34db],.kline-chart-container[data-v-466e34db]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-466e34db]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-466e34db]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-466e34db]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-466e34db]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}[data-v-9d8ac1fc] .ant-form-item-label{white-space:normal;line-height:1.2}[data-v-9d8ac1fc] .ant-form-item-label>label{white-space:normal}[data-v-9d8ac1fc] .ant-form-item-control{min-width:0}.backtest-modal[data-v-9d8ac1fc] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.backtest-content[data-v-9d8ac1fc]{position:relative}.field-hint[data-v-9d8ac1fc]{margin-top:4px;font-size:12px;line-height:1.4;color:#8c8c8c}.section-title[data-v-9d8ac1fc]{font-size:15px;font-weight:600;color:#262626;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #f0f0f0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.section-title .anticon[data-v-9d8ac1fc]{color:#1890ff}.config-section[data-v-9d8ac1fc]{margin-bottom:24px}.precision-info[data-v-9d8ac1fc]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.date-quick-select[data-v-9d8ac1fc],.precision-info[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.date-quick-select[data-v-9d8ac1fc]{padding:8px 12px;background:#fafafa;border-radius:6px;border:1px solid #f0f0f0}.result-section[data-v-9d8ac1fc]{margin-top:24px}.metrics-cards[data-v-9d8ac1fc]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px}@media (max-width:1200px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(4,1fr)}}@media (max-width:992px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(3,1fr)}}@media (max-width:576px){.metrics-cards[data-v-9d8ac1fc]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-9d8ac1fc]{background:#fafafa;border-radius:8px;padding:16px;text-align:center;-webkit-transition:all .3s;transition:all .3s}.metric-card[data-v-9d8ac1fc]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.1);box-shadow:0 2px 8px rgba(0,0,0,.1)}.metric-card.positive[data-v-9d8ac1fc]{background:linear-gradient(135deg,#f6ffed,#d9f7be)}.metric-card.positive .metric-value[data-v-9d8ac1fc]{color:#52c41a}.metric-card.negative[data-v-9d8ac1fc]{background:linear-gradient(135deg,#fff2f0,#ffccc7)}.metric-card.negative .metric-value[data-v-9d8ac1fc]{color:#f5222d}.metric-card .metric-label[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-bottom:8px}.metric-card .metric-value[data-v-9d8ac1fc]{font-size:20px;font-weight:700;color:#262626}.metric-card .metric-amount[data-v-9d8ac1fc]{font-size:12px;color:#8c8c8c;margin-top:4px}.chart-section[data-v-9d8ac1fc]{margin-bottom:24px}.chart-title[data-v-9d8ac1fc]{font-size:14px;font-weight:600;color:#595959;margin-bottom:12px}.equity-chart[data-v-9d8ac1fc]{width:100%;height:300px;border:1px solid #f0f0f0;border-radius:8px}.trades-section[data-v-9d8ac1fc]{margin-top:24px}.loading-overlay[data-v-9d8ac1fc]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.9);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;z-index:100;border-radius:8px}.loading-overlay .loading-content[data-v-9d8ac1fc]{text-align:center}.loading-overlay .loading-animation[data-v-9d8ac1fc]{margin-bottom:20px}.loading-overlay .chart-bars[data-v-9d8ac1fc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;height:60px;gap:6px}.loading-overlay .bar[data-v-9d8ac1fc]{width:8px;background:-webkit-gradient(linear,left top,left bottom,from(#1890ff),to(#52c41a));background:linear-gradient(180deg,#1890ff,#52c41a);border-radius:4px;-webkit-animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite;animation:barPulse-9d8ac1fc 1.2s ease-in-out infinite}.loading-overlay .bar1[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:0s;animation-delay:0s}.loading-overlay .bar2[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.1s;animation-delay:.1s}.loading-overlay .bar3[data-v-9d8ac1fc]{height:50px;-webkit-animation-delay:.2s;animation-delay:.2s}.loading-overlay .bar4[data-v-9d8ac1fc]{height:35px;-webkit-animation-delay:.3s;animation-delay:.3s}.loading-overlay .bar5[data-v-9d8ac1fc]{height:20px;-webkit-animation-delay:.4s;animation-delay:.4s}@-webkit-keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}@keyframes barPulse-9d8ac1fc{0%,to{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:.7}50%{-webkit-transform:scaleY(1.5);transform:scaleY(1.5);opacity:1}}.loading-overlay .loading-text[data-v-9d8ac1fc]{font-size:16px;font-weight:500;color:#1890ff;margin-bottom:8px}.loading-overlay .loading-subtext[data-v-9d8ac1fc]{font-size:13px;color:#666;-webkit-animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite;animation:fadeInOut-9d8ac1fc 2s ease-in-out infinite}@-webkit-keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}@keyframes fadeInOut-9d8ac1fc{0%,to{opacity:.5}50%{opacity:1}}.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}.quick-trade-drawer[data-v-0d547552] .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-0d547552]{-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-0d547552],.qt-header[data-v-0d547552]{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-0d547552]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0d547552]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0d547552]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0d547552]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0d547552]:hover{color:#333}.qt-symbol-bar[data-v-0d547552]{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-0d547552],.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-0d547552]{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-0d547552]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999;font-size:12px}.qt-section[data-v-0d547552]{padding:8px 20px}.qt-section .qt-label[data-v-0d547552]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0d547552]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0d547552]{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-0d547552]{color:#999}.qt-balance .qt-balance-value[data-v-0d547552]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0d547552]{-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-0d547552]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0d547552]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0d547552]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0d547552]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0d547552]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:active{background:#cf1322!important}.qt-position-section[data-v-0d547552]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-0d547552]{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-0d547552]{padding:8px 20px 12px}.qt-history-section[data-v-0d547552] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-0d547552] .ant-collapse-item{border:none}.qt-history-section[data-v-0d547552] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-0d547552] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-0d547552] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-0d547552] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-0d547552]{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-0d547552]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0d547552]{border-left-color:#52c41a}.qt-position-card.short[data-v-0d547552]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0d547552]{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-0d547552]:first-child{color:#999}.qt-position-empty[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0d547552]{color:#52c41a!important}.qt-red[data-v-0d547552]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0d547552]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0d547552]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0d547552]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0d547552]{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-0d547552]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0d547552]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0d547552]{color:#666}.theme-dark .qt-header .qt-close[data-v-0d547552]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0d547552]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999}.theme-dark .qt-section .qt-label[data-v-0d547552]{color:#777}.theme-dark .qt-position-card[data-v-0d547552]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-0d547552],.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-0d547552]{color:#888}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-0d547552]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0d547552]{color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0d547552] .ant-drawer-content{background:#141414}.theme-dark[data-v-0d547552] .ant-input-number,.theme-dark[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0d547552] .ant-slider-rail{background:#303030}.theme-dark[data-v-0d547552] .ant-slider-track{background:#1890ff}.chart-container[data-v-b17e86c2]{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-b17e86c2],.chart-header[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-b17e86c2],.header-top[data-v-b17e86c2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-b17e86c2]{gap:20px}.symbol-select[data-v-b17e86c2]{width:220px}.symbol-select[data-v-b17e86c2] .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-b17e86c2] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-b17e86c2] .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-b17e86c2] .ant-select-arrow,.symbol-select[data-v-b17e86c2] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-b17e86c2]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-b17e86c2]{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-b17e86c2]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{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-b17e86c2]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-b17e86c2]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-b17e86c2]{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-b17e86c2]{color:#0ecb81}.price-info.color-down[data-v-b17e86c2]{color:#f6465d}.symbol-price[data-v-b17e86c2]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-b17e86c2]{font-size:12px}.mobile-symbol-price[data-v-b17e86c2]{display:none}.panel-header .theme-switcher[data-v-b17e86c2]{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-b17e86c2],.panel-header .theme-toggle-btn[data-v-b17e86c2]{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-b17e86c2]:hover,.panel-header .theme-toggle-btn[data-v-b17e86c2]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-b17e86c2],.panel-header .theme-toggle-btn.active[data-v-b17e86c2]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-b17e86c2],.panel-header .theme-toggle-btn .anticon[data-v-b17e86c2]{font-size:16px}.chart-content[data-v-b17e86c2]{-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-b17e86c2],.chart-main-row[data-v-b17e86c2]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-b17e86c2]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-b17e86c2]{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-b17e86c2],.indicators-panel[data-v-b17e86c2]{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-b17e86c2]{height:100%}.panel-header[data-v-b17e86c2]{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-b17e86c2]{margin-right:0}.panel-body[data-v-b17e86c2]{padding:0;overflow:hidden}.indicator-section[data-v-b17e86c2],.panel-body[data-v-b17e86c2]{-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-b17e86c2]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-b17e86c2]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-b17e86c2]{min-height:200px}.section-label[data-v-b17e86c2]{-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-b17e86c2],.section-label[data-v-b17e86c2]{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-b17e86c2]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-b17e86c2]{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-b17e86c2]{font-weight:500}.section-label .buy-indicator-btn[data-v-b17e86c2]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-b17e86c2]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-b17e86c2]{display:none!important}}.section-content[data-v-b17e86c2]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-b17e86c2]{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-b17e86c2]: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-b17e86c2]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-b17e86c2]{color:#1890ff}.indicator-card.indicator-active[data-v-b17e86c2]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-b17e86c2]: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-b17e86c2]{color:#52c41a}.indicator-card.disabled[data-v-b17e86c2]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-b17e86c2]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-b17e86c2]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-b17e86c2]{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-b17e86c2]{color:#999;font-size:12px}.card-action[data-v-b17e86c2]:hover{color:#1890ff}.card-actions[data-v-b17e86c2]{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-b17e86c2]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-b17e86c2]{color:#1890ff}.action-icon.edit-icon[data-v-b17e86c2]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-b17e86c2]{color:#ff4d4f}.action-icon.delete-icon[data-v-b17e86c2]:hover{color:#ff7875}.action-icon[data-v-b17e86c2]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-b17e86c2]{color:#52c41a}.action-icon.backtest-icon[data-v-b17e86c2]{color:#722ed1}.action-icon.backtest-icon[data-v-b17e86c2]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-b17e86c2]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-b17e86c2]:hover{color:#08979c}.action-icon.publish-icon[data-v-b17e86c2]{color:#1890ff}.action-icon.publish-icon[data-v-b17e86c2]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-b17e86c2]{color:#52c41a}.action-icon.publish-icon.published[data-v-b17e86c2]:hover{color:#73d13d}.action-icon.status-icon.status-normal[data-v-b17e86c2]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-b17e86c2]{color:#ff4d4f}.action-icon.expiry-icon[data-v-b17e86c2]{color:#1890ff}.empty-indicators[data-v-b17e86c2]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-b17e86c2],.loading-indicators[data-v-b17e86c2]{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-b17e86c2]{padding:20px}.custom-scrollbar[data-v-b17e86c2]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-b17e86c2]::-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-b17e86c2]{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-b17e86c2]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-b17e86c2]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-b17e86c2]{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-b17e86c2]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-b17e86c2]{padding:12px}.chart-header .header-top[data-v-b17e86c2],.chart-header[data-v-b17e86c2]{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-b17e86c2]{padding:0}.chart-header .header-left[data-v-b17e86c2]{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-b17e86c2]{width:100%}.chart-header .search-section .symbol-select[data-v-b17e86c2]{width:100%!important}.chart-header .timeframe-group[data-v-b17e86c2]{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-b17e86c2]{-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-b17e86c2]{display:none}.chart-content[data-v-b17e86c2]{overflow-y:auto}.chart-content[data-v-b17e86c2],.chart-main-row[data-v-b17e86c2]{-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-b17e86c2]{-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-b17e86c2],.mobile-symbol-price[data-v-b17e86c2]{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-b17e86c2]{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-b17e86c2]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-b17e86c2]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-b17e86c2]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-b17e86c2]{font-size:14px;font-weight:500}kline-chart[data-v-b17e86c2]{-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-b17e86c2] .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-b17e86c2]{-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-b17e86c2]{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-b17e86c2]{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-b17e86c2]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-b17e86c2]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2],.chart-right .indicators-panel .panel-body[data-v-b17e86c2]{-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-b17e86c2]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .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-b17e86c2] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .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-b17e86c2] .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-b17e86c2] .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-b17e86c2],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-b17e86c2] .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-b17e86c2]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-b17e86c2]{-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-b17e86c2],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-b17e86c2]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-b17e86c2]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-b17e86c2]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-b17e86c2]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-b17e86c2]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-b17e86c2],.chart-right .indicators-panel .indicator-card .card-params[data-v-b17e86c2]{font-size:11px}}.qt-header-btn[data-v-b17e86c2]{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-b17e86c2]:focus,.qt-header-btn[data-v-b17e86c2]: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-b17e86c2]{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-b17e86c2]: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-b17e86c2],body.dark,body.realdark{background:#131722;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;-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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#868993;background:#2a2e39}.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-b17e86c2],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-b17e86c2],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-b17e86c2],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-b17e86c2]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2] .ant-select-selection,body.dark,body.realdark{background-color:#1e222d;border-color:#2a2e39;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-b17e86c2] .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-b17e86c2] .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-b17e86c2] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-b17e86c2] .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-b17e86c2],body.dark,body.realdark{background:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-b17e86c2],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-b17e86c2]:hover,body.dark,body.realdark{color:#1890ff;background:#1e222d}.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-b17e86c2],body.dark,body.realdark{color:#1890ff;background:#1e222d;-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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#868993;background:#21283c}.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-b17e86c2],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-b17e86c2],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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-left-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-b17e86c2],body.dark,body.realdark{background:#1e222d}.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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39;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-b17e86c2],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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-b17e86c2]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2e39}.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-b17e86c2],body.dark,body.realdark{background:#1e222d}.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-b17e86c2],body.dark,body.realdark{border-bottom-color:#2a2e39}.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-b17e86c2],body.dark,body.realdark{color:#868993;background:#2a2e39;border-bottom-color:#2a2e39}.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-b17e86c2],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-b17e86c2],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-b17e86c2],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-b17e86c2]: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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-color:#2a2e39}.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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-b17e86c2]:hover,body.dark,body.realdark{background:#2a2e39;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-b17e86c2],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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2],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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-b17e86c2],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-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-b17e86c2]: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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2],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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-b17e86c2],body.dark,body.realdark{border-top-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-b17e86c2],body.dark,body.realdark{border-bottom-color:#2a2e39}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-b17e86c2],body.dark,body.realdark{border-top-color:#2a2e39;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-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-b17e86c2] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2e39}.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-b17e86c2] .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-b17e86c2] .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-b17e86c2] .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-b17e86c2],body.dark,body.realdark{background:#1e222d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-b17e86c2],body.dark,body.realdark{background:#1e222d;border-bottom-color:#2a2e39}.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-b17e86c2],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-b17e86c2],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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-b17e86c2]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-b17e86c2],.add-stock-modal-content .search-results-section[data-v-b17e86c2],.add-stock-modal-content .symbol-search-section[data-v-b17e86c2]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-b17e86c2],.add-stock-modal-content .search-results-section .section-title[data-v-b17e86c2]{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-b17e86c2]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-b17e86c2]{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-b17e86c2]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-b17e86c2]{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-b17e86c2]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-b17e86c2]{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-b17e86c2]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-b17e86c2]{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-b17e86c2],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-b17e86c2],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-b17e86c2],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2e39}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-b17e86c2]: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-b17e86c2],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-b17e86c2],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-b17e86c2]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-b17e86c2]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-b17e86c2]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-b17e86c2]{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-b17e86c2]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-b17e86c2]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-b17e86c2]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/870.a278841f.css b/frontend/dist/css/870.a278841f.css new file mode 100644 index 0000000..0f11daa --- /dev/null +++ b/frontend/dist/css/870.a278841f.css @@ -0,0 +1 @@ +.quick-trade-drawer[data-v-0d547552] .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-0d547552]{-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-0d547552],.qt-header[data-v-0d547552]{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-0d547552]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0d547552]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0d547552]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0d547552]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0d547552]:hover{color:#333}.qt-symbol-bar[data-v-0d547552]{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-0d547552],.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-0d547552] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-0d547552]{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-0d547552]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999;font-size:12px}.qt-section[data-v-0d547552]{padding:8px 20px}.qt-section .qt-label[data-v-0d547552]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0d547552]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0d547552]{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-0d547552]{color:#999}.qt-balance .qt-balance-value[data-v-0d547552]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0d547552]{-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-0d547552]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0d547552]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0d547552]{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-0d547552]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0d547552]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0d547552]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0d547552]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0d547552]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0d547552]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0d547552]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0d547552]:active{background:#cf1322!important}.qt-position-section[data-v-0d547552]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-0d547552]{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-0d547552]{padding:8px 20px 12px}.qt-history-section[data-v-0d547552] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-0d547552] .ant-collapse-item{border:none}.qt-history-section[data-v-0d547552] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-0d547552] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-0d547552] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-0d547552] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-0d547552]{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-0d547552]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0d547552]{border-left-color:#52c41a}.qt-position-card.short[data-v-0d547552]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0d547552]{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-0d547552]:first-child{color:#999}.qt-position-empty[data-v-0d547552]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0d547552]{color:#52c41a!important}.qt-red[data-v-0d547552]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0d547552]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0d547552]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0d547552]{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-0d547552]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0d547552]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0d547552]{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-0d547552]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0d547552]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0d547552]{color:#666}.theme-dark .qt-header .qt-close[data-v-0d547552]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0d547552]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-0d547552] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-0d547552]{color:#999}.theme-dark .qt-section .qt-label[data-v-0d547552]{color:#777}.theme-dark .qt-position-card[data-v-0d547552]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-0d547552],.theme-dark .qt-position-card .qt-pos-row span[data-v-0d547552]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-0d547552]{color:#888}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-0d547552]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0d547552]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0d547552]{color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0d547552] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0d547552] .ant-drawer-content{background:#141414}.theme-dark[data-v-0d547552] .ant-input-number,.theme-dark[data-v-0d547552] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0d547552] .ant-slider-rail{background:#303030}.theme-dark[data-v-0d547552] .ant-slider-track{background:#1890ff}.ai-asset-analysis-page[data-v-3b2ffb77]{padding:16px;min-height:calc(100vh - 120px);background:#f0f2f5}.ai-asset-analysis-page .opp-section[data-v-3b2ffb77]{margin-bottom:12px}.ai-asset-analysis-page .opp-section .opp-header[data-v-3b2ffb77]{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;padding:0 4px}.ai-asset-analysis-page .opp-section .opp-header .opp-title[data-v-3b2ffb77]{font-size:14px;font-weight:600;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-header .opp-header-right[data-v-3b2ffb77]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.ai-asset-analysis-page .opp-section .opp-header .opp-update-hint[data-v-3b2ffb77]{font-size:12px;color:#8c8c8c}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]{overflow:hidden;position:relative;border-radius:10px}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:after,.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:before{content:"";position:absolute;top:0;bottom:0;width:40px;z-index:2;pointer-events:none}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]: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 .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]: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 .opp-section .opp-track[data-v-3b2ffb77]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;-webkit-animation:opp-scroll-left-3b2ffb77 60s linear infinite;animation:opp-scroll-left-3b2ffb77 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .opp-section .opp-track.paused[data-v-3b2ffb77]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes opp-scroll-left-3b2ffb77{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes opp-scroll-left-3b2ffb77{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .opp-section .opp-card[data-v-3b2ffb77]{width:190px;background:#fff;border-radius:10px;padding:12px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.06);box-shadow:0 1px 3px rgba(0,0,0,.06);cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-left:3px solid #d9d9d9;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .opp-section .opp-card.bullish[data-v-3b2ffb77]{border-left-color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card.bearish[data-v-3b2ffb77]{border-left-color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card[data-v-3b2ffb77]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.1);box-shadow:0 4px 12px rgba(0,0,0,.1)}.ai-asset-analysis-page .opp-section .opp-card .opp-top[data-v-3b2ffb77]{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}.ai-asset-analysis-page .opp-section .opp-card .opp-symbol[data-v-3b2ffb77]{font-weight:700;font-size:14px;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-card .opp-market-tag[data-v-3b2ffb77]{font-size:11px}.ai-asset-analysis-page .opp-section .opp-card .opp-price[data-v-3b2ffb77]{font-size:13px;color:#595959}.ai-asset-analysis-page .opp-section .opp-card .opp-change[data-v-3b2ffb77]{font-size:15px;font-weight:600}.ai-asset-analysis-page .opp-section .opp-card .opp-change.up[data-v-3b2ffb77]{color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card .opp-change.down[data-v-3b2ffb77]{color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card .opp-signal[data-v-3b2ffb77]{margin-top:4px}.ai-asset-analysis-page .opp-section .opp-card .opp-reason[data-v-3b2ffb77]{font-size:11px;color:#8c8c8c;margin-top:4px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .opp-section .opp-card .opp-actions[data-v-3b2ffb77]{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-top:6px;gap:6px}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-3b2ffb77]{font-size:12px;color:#1890ff;font-weight:500;cursor:pointer}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-3b2ffb77]:hover{text-decoration:underline}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-3b2ffb77]{font-size:11px;color:#fff;background:linear-gradient(135deg,#1890ff,#722ed1);padding:2px 8px;border-radius:10px;font-weight:600;cursor:pointer;white-space:nowrap;-webkit-transition:all .2s;transition:all .2s}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-3b2ffb77]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 8px rgba(114,46,209,.3);box-shadow:0 2px 8px rgba(114,46,209,.3)}.ai-asset-analysis-page .qt-floating-btn[data-v-3b2ffb77]{position:fixed;right:24px;bottom:80px;width:52px;height:52px;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;font-size:24px;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:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-3b2ffb77 2s ease-in-out infinite;animation:qt-float-pulse-3b2ffb77 2s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-3b2ffb77]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(114,46,209,.5);box-shadow:0 6px 24px rgba(114,46,209,.5)}@-webkit-keyframes qt-float-pulse-3b2ffb77{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-3b2ffb77{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-3b2ffb77]{border-radius:12px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06)}.ai-asset-analysis-page .workspace-card[data-v-3b2ffb77] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-bar{margin-bottom:0;padding:0 16px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab{font-size:15px;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-3b2ffb77] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-3b2ffb77] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page.theme-dark[data-v-3b2ffb77]{background:#0d1117}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-title[data-v-3b2ffb77]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-update-hint[data-v-3b2ffb77]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:before{background:-webkit-gradient(linear,left top,right top,from(#0d1117),to(transparent));background:linear-gradient(90deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-3b2ffb77]:after{background:-webkit-gradient(linear,right top,left top,from(#0d1117),to(transparent));background:linear-gradient(270deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-3b2ffb77]{background:#161b22;border-color:#30363d;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.3);box-shadow:0 1px 3px rgba(0,0,0,.3)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-symbol[data-v-3b2ffb77]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-price[data-v-3b2ffb77],.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-reason[data-v-3b2ffb77]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-action[data-v-3b2ffb77]{color:#58a6ff}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-trade-btn[data-v-3b2ffb77]{background:linear-gradient(135deg,#58a6ff,#8957e5)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-3b2ffb77]:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-3b2ffb77]{background:#161b22;border-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-bar{border-bottom-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-tab-active{color:#58a6ff}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-3b2ffb77] .ant-tabs-ink-bar{background-color:#58a6ff} \ No newline at end of file diff --git a/frontend/dist/css/946.17b34efc.css b/frontend/dist/css/946.17b34efc.css deleted file mode 100644 index 9c5de82..0000000 --- a/frontend/dist/css/946.17b34efc.css +++ /dev/null @@ -1 +0,0 @@ -.quick-trade-drawer[data-v-0f7d87dc] .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-0f7d87dc]{-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-0f7d87dc],.qt-header[data-v-0f7d87dc]{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-0f7d87dc]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-0f7d87dc]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-0f7d87dc]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-0f7d87dc]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-0f7d87dc]:hover{color:#333}.qt-symbol-bar[data-v-0f7d87dc]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc],.qt-symbol-bar[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-symbol-bar .qt-symbol-info[data-v-0f7d87dc]{gap:8px}.qt-symbol-bar .qt-symbol-info .qt-symbol-name[data-v-0f7d87dc]{font-size:18px;font-weight:700;letter-spacing:.5px}.qt-symbol-bar .qt-current-price[data-v-0f7d87dc]{font-size:18px;font-weight:600;color:#333}.qt-section[data-v-0f7d87dc]{padding:8px 20px}.qt-section .qt-label[data-v-0f7d87dc]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-0f7d87dc]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-0f7d87dc]{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-0f7d87dc]{color:#999}.qt-balance .qt-balance-value[data-v-0f7d87dc]{color:#52c41a;font-weight:600}.qt-direction-toggle[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-0f7d87dc]{-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-0f7d87dc]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-0f7d87dc]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-0f7d87dc]{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-0f7d87dc]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-0f7d87dc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-0f7d87dc]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-0f7d87dc]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-0f7d87dc]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-0f7d87dc]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-0f7d87dc]:active{background:#cf1322!important}.qt-history-section[data-v-0f7d87dc],.qt-position-section[data-v-0f7d87dc]{padding:8px 20px 12px}.qt-history-section .qt-section-header[data-v-0f7d87dc],.qt-position-section .qt-section-header[data-v-0f7d87dc]{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-position-card[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-0f7d87dc]{border-left-color:#52c41a}.qt-position-card.short[data-v-0f7d87dc]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-0f7d87dc]{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-0f7d87dc]:first-child{color:#999}.qt-position-empty[data-v-0f7d87dc]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-0f7d87dc]{color:#52c41a!important}.qt-red[data-v-0f7d87dc]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-0f7d87dc]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-0f7d87dc]{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-0f7d87dc]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-0f7d87dc]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-0f7d87dc]{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-0f7d87dc]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-0f7d87dc]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]{color:#666}.theme-dark .qt-header .qt-close[data-v-0f7d87dc]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-0f7d87dc]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-0f7d87dc],.theme-dark .qt-symbol-bar .qt-symbol-name[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-section .qt-label[data-v-0f7d87dc]{color:#777}.theme-dark .qt-position-card[data-v-0f7d87dc]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:first-child{color:#777}.theme-dark .qt-position-card .qt-pos-row span[data-v-0f7d87dc]:last-child{color:#ccc}.theme-dark .qt-trade-item[data-v-0f7d87dc]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-0f7d87dc]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-0f7d87dc]{color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-0f7d87dc] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-drawer-content{background:#141414}.theme-dark[data-v-0f7d87dc] .ant-input-number,.theme-dark[data-v-0f7d87dc] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-0f7d87dc] .ant-slider-rail{background:#303030}.theme-dark[data-v-0f7d87dc] .ant-slider-track{background:#1890ff}.ai-asset-analysis-page[data-v-68efba62]{padding:16px;min-height:calc(100vh - 120px);background:#f0f2f5}.ai-asset-analysis-page .opp-section[data-v-68efba62]{margin-bottom:12px}.ai-asset-analysis-page .opp-section .opp-header[data-v-68efba62]{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;padding:0 4px}.ai-asset-analysis-page .opp-section .opp-header .opp-title[data-v-68efba62]{font-size:14px;font-weight:600;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-header .opp-header-right[data-v-68efba62]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.ai-asset-analysis-page .opp-section .opp-header .opp-update-hint[data-v-68efba62]{font-size:12px;color:#8c8c8c}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]{overflow:hidden;position:relative;border-radius:10px}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]:after,.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]:before{content:"";position:absolute;top:0;bottom:0;width:40px;z-index:2;pointer-events:none}.ai-asset-analysis-page .opp-section .opp-carousel-wrapper[data-v-68efba62]: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 .opp-section .opp-carousel-wrapper[data-v-68efba62]: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 .opp-section .opp-track[data-v-68efba62]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;-webkit-animation:opp-scroll-left-68efba62 60s linear infinite;animation:opp-scroll-left-68efba62 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .opp-section .opp-track.paused[data-v-68efba62]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes opp-scroll-left-68efba62{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes opp-scroll-left-68efba62{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .opp-section .opp-card[data-v-68efba62]{width:190px;background:#fff;border-radius:10px;padding:12px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.06);box-shadow:0 1px 3px rgba(0,0,0,.06);cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-left:3px solid #d9d9d9;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .opp-section .opp-card.bullish[data-v-68efba62]{border-left-color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card.bearish[data-v-68efba62]{border-left-color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card[data-v-68efba62]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.1);box-shadow:0 4px 12px rgba(0,0,0,.1)}.ai-asset-analysis-page .opp-section .opp-card .opp-top[data-v-68efba62]{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}.ai-asset-analysis-page .opp-section .opp-card .opp-symbol[data-v-68efba62]{font-weight:700;font-size:14px;color:#1a1a2e}.ai-asset-analysis-page .opp-section .opp-card .opp-market-tag[data-v-68efba62]{font-size:11px}.ai-asset-analysis-page .opp-section .opp-card .opp-price[data-v-68efba62]{font-size:13px;color:#595959}.ai-asset-analysis-page .opp-section .opp-card .opp-change[data-v-68efba62]{font-size:15px;font-weight:600}.ai-asset-analysis-page .opp-section .opp-card .opp-change.up[data-v-68efba62]{color:#52c41a}.ai-asset-analysis-page .opp-section .opp-card .opp-change.down[data-v-68efba62]{color:#ff4d4f}.ai-asset-analysis-page .opp-section .opp-card .opp-signal[data-v-68efba62]{margin-top:4px}.ai-asset-analysis-page .opp-section .opp-card .opp-reason[data-v-68efba62]{font-size:11px;color:#8c8c8c;margin-top:4px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .opp-section .opp-card .opp-actions[data-v-68efba62]{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-top:6px;gap:6px}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-68efba62]{font-size:12px;color:#1890ff;font-weight:500;cursor:pointer}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-68efba62]:hover{text-decoration:underline}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-68efba62]{font-size:11px;color:#fff;background:linear-gradient(135deg,#1890ff,#722ed1);padding:2px 8px;border-radius:10px;font-weight:600;cursor:pointer;white-space:nowrap;-webkit-transition:all .2s;transition:all .2s}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-68efba62]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 8px rgba(114,46,209,.3);box-shadow:0 2px 8px rgba(114,46,209,.3)}.ai-asset-analysis-page .qt-floating-btn[data-v-68efba62]{position:fixed;right:24px;bottom:80px;width:52px;height:52px;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;font-size:24px;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:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-68efba62 2s ease-in-out infinite;animation:qt-float-pulse-68efba62 2s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-68efba62]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(114,46,209,.5);box-shadow:0 6px 24px rgba(114,46,209,.5)}@-webkit-keyframes qt-float-pulse-68efba62{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-68efba62{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-68efba62]{border-radius:12px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06)}.ai-asset-analysis-page .workspace-card[data-v-68efba62] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-bar{margin-bottom:0;padding:0 16px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab{font-size:15px;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-68efba62] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-68efba62] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page.theme-dark[data-v-68efba62]{background:#0d1117}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-title[data-v-68efba62]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-header .opp-update-hint[data-v-68efba62]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-68efba62]:before{background:-webkit-gradient(linear,left top,right top,from(#0d1117),to(transparent));background:linear-gradient(90deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-carousel-wrapper[data-v-68efba62]:after{background:-webkit-gradient(linear,right top,left top,from(#0d1117),to(transparent));background:linear-gradient(270deg,#0d1117,transparent)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-68efba62]{background:#161b22;border-color:#30363d;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.3);box-shadow:0 1px 3px rgba(0,0,0,.3)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-symbol[data-v-68efba62]{color:#e6edf3}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-price[data-v-68efba62],.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-reason[data-v-68efba62]{color:#8b949e}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-action[data-v-68efba62]{color:#58a6ff}.ai-asset-analysis-page.theme-dark .opp-section .opp-card .opp-trade-btn[data-v-68efba62]{background:linear-gradient(135deg,#58a6ff,#8957e5)}.ai-asset-analysis-page.theme-dark .opp-section .opp-card[data-v-68efba62]:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-68efba62]{background:#161b22;border-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-bar{border-bottom-color:#30363d}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-tab-active{color:#58a6ff}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-68efba62] .ant-tabs-ink-bar{background-color:#58a6ff} \ No newline at end of file diff --git a/frontend/dist/css/theme-colors-450f8a43.css b/frontend/dist/css/theme-colors-1b8042ec.css similarity index 94% rename from frontend/dist/css/theme-colors-450f8a43.css rename to frontend/dist/css/theme-colors-1b8042ec.css index 0eec634..feaceb5 100644 --- a/frontend/dist/css/theme-colors-450f8a43.css +++ b/frontend/dist/css/theme-colors-1b8042ec.css @@ -1 +1 @@ -.ant-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.ant-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.ant-pro-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-pro-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.ant-pro-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-pro-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.notice-header .notice-action[data-v-4726fe78],body.dark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,body.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,body.realdark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,body.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover{color:#1890ff}.notice-header .notice-action[data-v-4726fe78]:hover{color:#40a9ff}.notice-item.unread[data-v-4726fe78]{background:#e6f7ff}.notice-item.unread[data-v-4726fe78]:hover{background:#bae7ff}.notice-footer a[data-v-4726fe78]{color:#1890ff}.notice-footer a[data-v-4726fe78]:hover{color:#40a9ff}.ant-layout.dark .header-notice-wrapper .notice-item.unread,.ant-layout.realdark .header-notice-wrapper .notice-item.unread,body.dark .header-notice-wrapper .notice-item.unread,body.realdark .header-notice-wrapper .notice-item.unread{background:rgba(24,144,255,.15)}.ant-layout.dark .header-notice-wrapper .notice-item.unread:hover,.ant-layout.realdark .header-notice-wrapper .notice-item.unread:hover,body.dark .header-notice-wrapper .notice-item.unread:hover,body.realdark .header-notice-wrapper .notice-item.unread:hover{background:rgba(24,144,255,.25)}.ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover{color:#1890ff}.ant-layout.dark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-layout.dark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-layout.dark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,.ant-layout.realdark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-layout.realdark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-layout.realdark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,.ant-pro-layout.dark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-pro-layout.dark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-pro-layout.dark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,.ant-pro-layout.realdark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-pro-layout.realdark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-pro-layout.realdark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,body.dark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,body.dark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,body.dark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,body.realdark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,body.realdark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,body.realdark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover{color:#1890ff!important}.setting-drawer-index-content .setting-drawer-index-blockChecbox .setting-drawer-index-item .setting-drawer-index-selectIcon[data-v-940007f2]{color:#1890ff}:global .ant-layout.dark .ant-layout-header .anticon:hover,:global .ant-layout.realdark .ant-layout-header .anticon:hover,:global .ant-pro-layout.dark .ant-layout-header .anticon:hover,:global .ant-pro-layout.realdark .ant-layout-header .anticon:hover,:global body.dark .ant-layout-header .anticon:hover,:global body.realdark .ant-layout-header .anticon:hover{color:#1890ff!important}:global .ant-layout.dark .ant-layout-header a:hover,:global .ant-layout.realdark .ant-layout-header a:hover,:global .ant-pro-layout.dark .ant-layout-header a:hover,:global .ant-pro-layout.realdark .ant-layout-header a:hover,:global body.dark .ant-layout-header a:hover,:global body.realdark .ant-layout-header a:hover{color:#1890ff!important}:global .ant-pro-global-header-content .anticon:hover{color:#1890ff!important}:global .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover{color:#1890ff!important}:global .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,:global .ant-pro-global-header-index-right .ant-pro-drop-down:hover{color:#1890ff!important}:global a:hover{color:#1890ff!important}:global .anticon:hover{color:#1890ff!important}.ant-pro-global-header-index-right.ant-pro-global-header-index-dark .ant-pro-global-header-index-action:hover{background:#1890ff}.ant-pro-global-header-index-right .ant-pro-account-avatar .antd-pro-global-header-index-avatar,.ant-pro-global-header-index-right.ant-pro-global-header-index-dark .ant-pro-drop-down:hover{color:#1890ff}:global .ant-pro-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,:global .ant-pro-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover{color:#1890ff!important}a{color:#1890ff}a:hover{color:#40a9ff}a:active{color:#096dd9}::-moz-selection{background:#1890ff}::selection{background:#1890ff}html{--antd-wave-shadow-color:#1890ff}.ant-click-animating-node,[ant-click-animating-without-extra-node=true]:after{-webkit-box-shadow:0 0 0 0 #1890ff;box-shadow:0 0 0 0 #1890ff}#nprogress .bar{background:#1890ff}#nprogress .peg{-webkit-box-shadow:0 0 10px #1890ff,0 0 5px #1890ff;box-shadow:0 0 10px #1890ff,0 0 5px #1890ff}#nprogress .spinner-icon{border-top-color:#1890ff;border-left-color:#1890ff}.fast-analysis-report .loading-container .loading-content-pro .current-step[data-v-33397338],.fast-analysis-report .loading-container .loading-content-pro .loading-header .loading-icon-pro[data-v-33397338],.fast-analysis-report .loading-container .loading-content-pro .progress-wrapper .progress-text[data-v-33397338]{color:#1890ff}.fast-analysis-report .loading-container .loading-content-pro .steps-list .step-item.active[data-v-33397338]{background:#e6f7ff;color:#1890ff}.fast-analysis-report .loading-container .loading-content-pro .steps-list .step-item.active .step-dot[data-v-33397338]{background:#1890ff;-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.2);box-shadow:0 0 0 3px rgba(24,144,255,.2)}.fast-analysis-report .result-container .decision-card[data-v-33397338]{border-left:6px solid #1890ff}.fast-analysis-report .result-container .price-info-row .price-card.current[data-v-33397338]{border-top:3px solid #1890ff}.fast-analysis-report .result-container .scores-row .score-item .score-header .anticon[data-v-33397338]{color:#1890ff}.fast-analysis-report .result-container .scores-row .score-item.overall[data-v-33397338]{background:linear-gradient(135deg,#e6f7ff,#fff);border:1px solid #91d5ff}.fast-analysis-report .result-container .detailed-analysis .analysis-card[data-v-33397338]{border-left:4px solid #1890ff}.fast-analysis-report .result-container .detailed-analysis .analysis-card.technical[data-v-33397338]{border-left-color:#1890ff}.fast-analysis-report .result-container .analysis-details .detail-section .detail-list li[data-v-33397338]:before,.fast-analysis-report .result-container .detailed-analysis .analysis-card .analysis-card-header.technical .anticon[data-v-33397338],.fast-analysis-report .result-container .indicators-section .section-title .anticon[data-v-33397338]{color:#1890ff}.fast-analysis-report.theme-dark .decision-card[data-v-33397338],.fast-analysis-report.theme-dark .detailed-analysis .analysis-card.technical[data-v-33397338]{border-left-color:#1890ff}.fast-analysis-report.theme-dark .score-item.overall[data-v-33397338]{background:linear-gradient(135deg,rgba(24,144,255,.1),#2a2e39);border-color:#1890ff}.left-panel .heatmap-box .box-header[data-v-76a3e064] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:var(--primary-color,#1890ff);border-color:var(--primary-color,#1890ff)}.left-panel .calendar-box .box-header .box-title .anticon[data-v-76a3e064]{color:var(--primary-color,#1890ff)}.right-panel .analysis-toolbar .analyze-button[data-v-76a3e064]{background:var(--primary-color,#1890ff);border-color:var(--primary-color,#1890ff)}.right-panel .analysis-main .analysis-placeholder .placeholder-content .placeholder-icon[data-v-76a3e064]{color:var(--primary-color,#1890ff)}.watchlist-panel .watchlist-list .watchlist-item.active[data-v-76a3e064]{background:#e6f7ff;border:1px solid #91d5ff}.ai-analysis-container.theme-dark .watchlist-panel .watchlist-list .watchlist-item.active[data-v-76a3e064]{background:rgba(24,144,255,.1);border-color:#1890ff}.ai-analysis-container.theme-dark .watchlist-bar-compat .stock-chip.active[data-v-76a3e064],.ai-analysis-container.theme-dark .watchlist-bar-compat .stock-chip[data-v-76a3e064]:hover,.ai-analysis-container.theme-dark .watchlist-bar-legacy .stock-chip.active[data-v-76a3e064],.ai-analysis-container.theme-dark .watchlist-bar-legacy .stock-chip[data-v-76a3e064]:hover{border-color:var(--primary-color,#1890ff);background:rgba(24,144,255,.1)}.qt-header .qt-header-left .qt-icon[data-v-0f7d87dc]{color:#1890ff}.theme-dark[data-v-0f7d87dc] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff}.theme-dark[data-v-0f7d87dc] .ant-slider-track{background:#1890ff}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-68efba62]{color:#1890ff}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-68efba62]{background:linear-gradient(135deg,#1890ff,#722ed1)}.ai-asset-analysis-page .qt-floating-btn[data-v-68efba62]{background:linear-gradient(135deg,#1890ff,#722ed1);-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4)}.code-section .section-header .section-title[data-v-4fea1865]:before{background:#1890ff}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link{color:#1890ff}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link:hover{color:#40a9ff}.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-cursor{border-left:2px solid #1890ff}.code-editor-container[data-v-4fea1865] .CodeMirror-selected{background:#e6f7ff}.editor-footer[data-v-4fea1865] .ant-btn:not(.ant-btn-primary):hover{border-color:#40a9ff;color:#40a9ff;-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)}.drawing-tool-btn[data-v-466e34db]:hover{color:#1890ff}.drawing-tool-btn.active[data-v-466e34db]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.indicator-btn[data-v-466e34db]:hover{color:#1890ff;border-color:#1890ff}.indicator-btn.active[data-v-466e34db]{color:#1890ff;border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.1);box-shadow:0 0 0 2px rgba(24,144,255,.1)}.section-title .anticon[data-v-9d8ac1fc]{color:#1890ff}.loading-overlay .bar[data-v-9d8ac1fc]{background:-webkit-gradient(linear,left top,left bottom,from(#1890ff),to(#52c41a));background:linear-gradient(180deg,#1890ff,#52c41a)}.loading-overlay .loading-text[data-v-9d8ac1fc]{color:#1890ff}.symbol-select[data-v-1895bd90] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-1895bd90] .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)}.panel-header .realtime-toggle-btn[data-v-1895bd90]:hover,.panel-header .theme-toggle-btn[data-v-1895bd90]:hover,.timeframe-item.active[data-v-1895bd90],.timeframe-item[data-v-1895bd90]:hover{color:#1890ff}.panel-header .realtime-toggle-btn.active[data-v-1895bd90],.panel-header .theme-toggle-btn.active[data-v-1895bd90]{color:#1890ff;background:#e6f7ff}.indicator-card[data-v-1895bd90]:hover{border-color:#1890ff}.indicator-card.active[data-v-1895bd90]{background:#e6f7ff;border-color:#1890ff}.action-icon.edit-icon[data-v-1895bd90],.card-action[data-v-1895bd90]:hover,.indicator-card.active .card-name[data-v-1895bd90]{color:#1890ff}.action-icon.edit-icon[data-v-1895bd90]:hover{color:#40a9ff}.action-icon.publish-icon[data-v-1895bd90],.action-icon[data-v-1895bd90]:hover{color:#1890ff}.action-icon.publish-icon[data-v-1895bd90]:hover{color:#40a9ff}.action-icon.expiry-icon[data-v-1895bd90]{color:#1890ff}.dark-dropdown .ant-select-dropdown-menu-item-active{background-color:#e6f7ff;color:#1890ff}.qt-header-btn[data-v-1895bd90]{background:linear-gradient(135deg,#1890ff,#722ed1);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)}.qt-header-btn[data-v-1895bd90]:focus,.qt-header-btn[data-v-1895bd90]:hover{background:linear-gradient(135deg,#40a9ff,#9254de);-webkit-box-shadow:0 4px 12px rgba(24,144,255,.45);box-shadow:0 4px 12px rgba(24,144,255,.45)}.qt-floating-btn[data-v-1895bd90]{background:linear-gradient(135deg,#1890ff,#722ed1);-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4)}.qt-floating-btn[data-v-1895bd90]:hover{-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 .symbol-select[data-v-1895bd90] .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-1895bd90] .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 .chart-right .indicators-panel .panel-header .realtime-toggle-btn.active[data-v-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-1895bd90]:hover,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-1895bd90],.chart-container.theme-dark .timeframe-group .timeframe-item.active[data-v-1895bd90],.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-1895bd90]: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 .section-label .buy-indicator-btn[data-v-1895bd90]: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.active[data-v-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-1895bd90]: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 .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-1895bd90],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-1895bd90]:hover,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active .card-name[data-v-1895bd90],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-1895bd90]: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-1895bd90],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-1895bd90]:hover,body.dark,body.realdark{color:#40a9ff}.comment-list .comment-form .form-header .edit-label[data-v-4973cae6]{color:#1890ff}.comment-list .comments .comment-item.is-mine[data-v-4973cae6]{background:rgba(24,144,255,.02)}[data-theme=dark] .comment-list .comments .comment-item.is-mine[data-v-4973cae6]{background:rgba(24,144,255,.05)}.indicator-community-container .market-header .header-left .page-title .anticon[data-v-9342b380]{color:#1890ff}.indicator-community-container.theme-dark .admin-tabs[data-v-9342b380] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active,.indicator-community-container.theme-dark[data-v-9342b380] .ant-btn-link,.indicator-community-container.theme-dark[data-v-9342b380] .ant-modal-content .ant-list-item-meta-title a,.indicator-community-container.theme-dark[data-v-9342b380] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff}.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}.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-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: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-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 ::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-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}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-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}.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-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}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-0cc1c552]{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-0cc1c552]: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-0cc1c552]{color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-0cc1c552],.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-0cc1c552]:hover{border-left-color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-0cc1c552]: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-0cc1c552]{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-0cc1c552]: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-0cc1c552]{color:#1890ff}.trading-assistant.theme-dark .creation-mode-toggle[data-v-0cc1c552]{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-0cc1c552]: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-0cc1c552]{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-0cc1c552]: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-0cc1c552] .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-0cc1c552] .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)}.ai-filter-title .anticon[data-v-0cc1c552]{color:#1890ff}.creation-mode-toggle[data-v-0cc1c552]{background:rgba(24,144,255,.04);border:1px solid rgba(24,144,255,.12)}.strategy-type-selector .strategy-type-card[data-v-0cc1c552]: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-0cc1c552]{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-0cc1c552]{color:#1890ff}.ip-whitelist-tip[data-v-0cc1c552]{background-color:#e6f7ff;border:1px solid #91d5ff;color:#1890ff}.ip-whitelist-tip .anticon[data-v-0cc1c552],.summary-card .card-icon.sync.syncing[data-v-398d904c]{color:#1890ff}.monitor-card .monitor-body .scope-selected[data-v-398d904c]{color:#1890ff;border-bottom:1px dashed #1890ff}.alert-symbol-info .current-price-info[data-v-398d904c]{background:linear-gradient(135deg,#e6f7ff,#f0f5ff)}.alert-symbol-info .current-price-info .price[data-v-398d904c]{color:#1890ff}.position-checkbox-group .position-checkbox-item[data-v-398d904c]:hover{background:rgba(24,144,255,.05)}.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-22a6f70e],.profile-page .profile-card .profile-info .info-item .anticon[data-v-22a6f70e],.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-tabs-tab-active,.user-manage-page .address-text[data-v-7b696034],.user-manage-page .current-credits-info .value[data-v-7b696034],.user-manage-page .current-vip-info .value[data-v-7b696034],.user-manage-page .hash-text[data-v-7b696034],.user-manage-page .page-header .page-title .anticon[data-v-7b696034],.user-manage-page.theme-dark .manage-tabs[data-v-7b696034] .ant-tabs-tab-active{color:#1890ff}.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input:hover{border-color:#1890ff}.billing-page .plan-card.highlight[data-v-7f69db26]{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}.theme-dark .usdt-checkout .checkout-body .info-section .addr-box .copy-btn:hover,.theme-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}.settings-page .settings-header .page-title .anticon[data-v-20857e25]{color:#1890ff}.settings-page .openrouter-balance-card .ant-card[data-v-20857e25]{background:linear-gradient(135deg,#e6f7ff,#f0f5ff);border:1px solid #91d5ff}.settings-page .openrouter-balance-card .balance-header .balance-title[data-v-20857e25],.settings-page .settings-collapse[data-v-20857e25] .ant-collapse-item .ant-collapse-header .ant-collapse-arrow,.settings-page .settings-collapse[data-v-20857e25] .ant-collapse-item .ant-collapse-header .panel-header .panel-icon-left,.settings-page .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .help-icon:hover{color:#1890ff}.settings-page .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link{color:#1890ff;background:rgba(24,144,255,.08)}.settings-page .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link{background:rgba(24,144,255,.15)}.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link:hover{background:rgba(24,144,255,.25)}.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-number:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-number:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-password:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-password:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-select-selection:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-select-selection:hover{border-color:#1890ff}.main .login-method-switch a[data-v-de9678f6]:hover,.turnstile-container .turnstile-error a[data-v-20437450]{color:#1890ff}.main .login-method-switch a.active[data-v-de9678f6]{color:#1890ff;border-bottom-color:#1890ff}.main .auth-links a[data-v-de9678f6],.main .code-login-hint .anticon[data-v-de9678f6],.main .legal-wrap .legal-toggle[data-v-de9678f6]{color:#1890ff}.ant-dropdown-menu-item-selected,.ant-dropdown-menu-item-selected>a,.ant-dropdown-menu-submenu-title-selected,.ant-dropdown-menu-submenu-title-selected>a{color:#1890ff;background-color:#e6f7ff}.ant-dropdown-menu-item:hover,.ant-dropdown-menu-submenu-title:hover{background-color:#e6f7ff}.ant-dropdown-menu-submenu-selected .ant-dropdown-menu-submenu-title{color:#1890ff}.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected>a{background:#1890ff}.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){color:#40a9ff;border-color:#40a9ff}.ant-btn.active:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:active:not(.ant-btn-primary):not(.ant-btn-danger){color:#096dd9;border-color:#096dd9}.ant-btn-primary{background-color:#1890ff;border-color:#1890ff}.ant-btn-primary:focus,.ant-btn-primary:hover{background-color:#40a9ff;border-color:#40a9ff}.ant-btn-primary.active,.ant-btn-primary:active{background-color:#096dd9;border-color:#096dd9}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child){border-right-color:#40a9ff;border-left-color:#40a9ff}.ant-btn-group .ant-btn-primary:first-child:not(:last-child){border-right-color:#40a9ff}.ant-btn-group .ant-btn-primary+.ant-btn-primary,.ant-btn-group .ant-btn-primary:last-child:not(:first-child){border-left-color:#40a9ff}.ant-btn-ghost:focus,.ant-btn-ghost:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-ghost.active,.ant-btn-ghost:active{color:#096dd9;border-color:#096dd9}.ant-btn-dashed:focus,.ant-btn-dashed:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-dashed.active,.ant-btn-dashed:active{color:#096dd9;border-color:#096dd9}.ant-btn-link{color:#1890ff}.ant-btn-link:focus,.ant-btn-link:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-link.active,.ant-btn-link:active{color:#096dd9;border-color:#096dd9}.ant-btn-background-ghost.ant-btn-primary{color:#1890ff;border-color:#1890ff}.ant-btn-background-ghost.ant-btn-primary:focus,.ant-btn-background-ghost.ant-btn-primary:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-background-ghost.ant-btn-primary.active,.ant-btn-background-ghost.ant-btn-primary:active{color:#096dd9;border-color:#096dd9}.ant-btn-background-ghost.ant-btn-link{color:#1890ff}.ant-btn-background-ghost.ant-btn-link:focus,.ant-btn-background-ghost.ant-btn-link:hover{color:#40a9ff}.ant-btn-background-ghost.ant-btn-link.active,.ant-btn-background-ghost.ant-btn-link:active{color:#096dd9}.ant-menu-submenu-selected{color:#1890ff}.ant-menu-item:active,.ant-menu-submenu-title:active{background:#e6f7ff}.ant-menu-item-active,.ant-menu-item-selected,.ant-menu-item-selected>a,.ant-menu-item-selected>a:hover,.ant-menu-item:hover,.ant-menu-item>.ant-badge>a:hover,.ant-menu-item>a:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:#1890ff}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#e6f7ff}.ant-menu-submenu-inline>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-inline>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#1890ff));background:linear-gradient(90deg,#1890ff,#1890ff)}.ant-menu-vertical .ant-menu-submenu-selected,.ant-menu-vertical .ant-menu-submenu-selected>a,.ant-menu-vertical-left .ant-menu-submenu-selected,.ant-menu-vertical-left .ant-menu-submenu-selected>a,.ant-menu-vertical-right .ant-menu-submenu-selected,.ant-menu-vertical-right .ant-menu-submenu-selected>a{color:#1890ff}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item:hover,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-selected,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu:hover,.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item-open,.ant-menu-horizontal>.ant-menu-item-selected,.ant-menu-horizontal>.ant-menu-submenu-active,.ant-menu-horizontal>.ant-menu-submenu-open{color:#1890ff;border-bottom:2px solid #1890ff}.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark)>.ant-menu-item-selected>a,.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark)>.ant-menu-item>a:hover{color:#1890ff}.ant-menu-inline .ant-menu-item:after,.ant-menu-vertical .ant-menu-item:after,.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-vertical-right .ant-menu-item:after{border-right:3px solid #1890ff}.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected,.ant-menu.ant-menu-dark .ant-menu-item-selected{background-color:#1890ff}.ant-modal-confirm-info .ant-modal-confirm-body>.anticon,.ant-page-header-back-button,.ant-pro-basicLayout .trigger:hover,.ant-pro-sider-menu-sider.light .ant-pro-sider-menu-logo h1{color:#1890ff}.ant-page-header-back-button:focus,.ant-page-header-back-button:hover{color:#40a9ff}.ant-page-header-back-button:active{color:#096dd9}.ant-breadcrumb a:hover{color:#40a9ff}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active,.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-disabled{color:#1890ff}.ant-tabs-extra-content .ant-tabs-new-tab:hover{color:#1890ff;border-color:#1890ff}.ant-tabs .ant-tabs-card-bar.ant-tabs-bottom-bar .ant-tabs-tab-active{color:#1890ff}.ant-tabs-ink-bar{background-color:#1890ff}.ant-tabs-nav .ant-tabs-tab:hover{color:#40a9ff}.ant-tabs-nav .ant-tabs-tab:active{color:#096dd9}.ant-tabs-nav .ant-tabs-tab-active{color:#1890ff}.ant-pro-global-header .dark .action.opened,.ant-pro-global-header .dark .action:hover{background:#1890ff}.ant-pro-setting-drawer-block-checbox-selectIcon,.ant-pro-setting-drawer-block-checbox-selectIcon .action{color:#1890ff}.ant-pro-setting-drawer-handle{background:#1890ff}.ant-list-item-meta-title>a:hover,.ant-spin{color:#1890ff}.ant-spin-dot-item{background-color:#1890ff}.ant-pagination-item:focus,.ant-pagination-item:hover{border-color:#1890ff}.ant-pagination-item:focus a,.ant-pagination-item:hover a{color:#1890ff}.ant-pagination-item-active{border-color:#1890ff}.ant-pagination-item-active a{color:#1890ff}.ant-pagination-item-active:focus,.ant-pagination-item-active:hover{border-color:#40a9ff}.ant-pagination-item-active:focus a,.ant-pagination-item-active:hover a{color:#40a9ff}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon{color:#1890ff}.ant-pagination-next:hover a,.ant-pagination-prev:hover a{border-color:#40a9ff}.ant-pagination-next:focus .ant-pagination-item-link,.ant-pagination-next:hover .ant-pagination-item-link,.ant-pagination-prev:focus .ant-pagination-item-link,.ant-pagination-prev:hover .ant-pagination-item-link{color:#1890ff;border-color:#1890ff}.ant-pagination-options-quick-jumper input:hover{border-color:#40a9ff}.ant-pagination-options-quick-jumper input:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-pagination-simple .ant-pagination-simple-pager input:hover{border-color:#1890ff}.ant-select-selection:hover{border-color:#40a9ff}.ant-select-focused .ant-select-selection,.ant-select-open .ant-select-selection,.ant-select-selection:active,.ant-select-selection:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled),.ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled){background-color:#e6f7ff}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected .ant-select-selected-icon,.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected:hover .ant-select-selected-icon,.ant-switch-checked.ant-switch-loading .ant-switch-loading-icon{color:#1890ff}.ant-switch:focus{-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-switch-checked{background-color:#1890ff}.ant-alert-info{background-color:#e6f7ff;border:1px solid #91d5ff}.ant-alert-info .ant-alert-icon,.ant-message-info .anticon,.ant-message-loading .anticon,.anticon.ant-notification-notice-icon-info{color:#1890ff}.ant-input:focus,.ant-input:hover,.ant-select-auto-complete.ant-select .ant-input:focus,.ant-select-auto-complete.ant-select .ant-input:hover{border-color:#40a9ff}.ant-input:focus{-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-input-group-addon .ant-select-focused .ant-select-selection,.ant-input-group-addon .ant-select-open .ant-select-selection{color:#1890ff}.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){border-color:#40a9ff}.ant-result-info .ant-result-icon>.anticon{color:#1890ff}.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#1890ff}.ant-progress-bg,.ant-progress-success-bg{background-color:#1890ff}.ant-upload.ant-upload-select-picture-card:hover{border-color:#1890ff}.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled){border-color:#096dd9}.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover{border-color:#40a9ff}.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon{color:#40a9ff}.ant-upload-list-item:hover .ant-upload-list-item-info{background-color:#e6f7ff}.ant-time-picker-panel-select li:focus{color:#1890ff}.ant-time-picker-panel-select li:hover{background:#e6f7ff}.ant-time-picker-input:hover{border-color:#40a9ff}.ant-time-picker-input:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-calendar-picker:hover .ant-calendar-picker-input:not(.ant-input-disabled){border-color:#40a9ff}.ant-calendar-picker:focus .ant-calendar-picker-input:not(.ant-input-disabled){border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-calendar-header a:hover{color:#40a9ff}.ant-calendar-date:hover{background:#e6f7ff}.ant-calendar-date:active{background:#40a9ff}:not(.ant-calendar-selected-date):not(.ant-calendar-selected-day).ant-calendar-today .ant-calendar-date{color:#1890ff;border-color:#1890ff}.ant-calendar-selected-day .ant-calendar-date{background:#bae7ff}.ant-calendar .ant-calendar-ok-btn{background-color:#1890ff;border-color:#1890ff}.ant-calendar .ant-calendar-ok-btn:focus,.ant-calendar .ant-calendar-ok-btn:hover{background-color:#40a9ff;border-color:#40a9ff}.ant-calendar .ant-calendar-ok-btn.active,.ant-calendar .ant-calendar-ok-btn:active{background-color:#096dd9;border-color:#096dd9}.ant-calendar-range .ant-calendar-today :not(.ant-calendar-disabled-cell) :not(.ant-calendar-last-month-cell) :not(.ant-calendar-next-month-btn-day) .ant-calendar-date{color:#1890ff;background:#bae7ff;border-color:#1890ff}.ant-calendar-range .ant-calendar-selected-end-date .ant-calendar-date,.ant-calendar-range .ant-calendar-selected-end-date .ant-calendar-date:hover,.ant-calendar-range .ant-calendar-selected-start-date .ant-calendar-date,.ant-calendar-range .ant-calendar-selected-start-date .ant-calendar-date:hover{background:#1890ff}.ant-calendar-range .ant-calendar-input:hover,.ant-calendar-range .ant-calendar-time-picker-input:hover{border-color:#40a9ff}.ant-calendar-range .ant-calendar-input:focus,.ant-calendar-range .ant-calendar-time-picker-input:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-calendar-range .ant-calendar-in-range-cell:before,.ant-calendar-time-picker-select li:hover{background:#e6f7ff}.ant-calendar-time-picker-select li:focus{color:#1890ff}.ant-calendar-month-panel-header a:hover{color:#40a9ff}.ant-calendar-month-panel-selected-cell .ant-calendar-month-panel-month,.ant-calendar-month-panel-selected-cell .ant-calendar-month-panel-month:hover{background:#1890ff}.ant-calendar-month-panel-month:hover{background:#e6f7ff}.ant-calendar-year-panel-header a:hover{color:#40a9ff}.ant-calendar-year-panel-year:hover{background:#e6f7ff}.ant-calendar-year-panel-selected-cell .ant-calendar-year-panel-year,.ant-calendar-year-panel-selected-cell .ant-calendar-year-panel-year:hover{background:#1890ff}.ant-calendar-decade-panel-header a:hover{color:#40a9ff}.ant-calendar-decade-panel-decade:hover{background:#e6f7ff}.ant-calendar-decade-panel-selected-cell .ant-calendar-decade-panel-decade,.ant-calendar-decade-panel-selected-cell .ant-calendar-decade-panel-decade:hover{background:#1890ff}.ant-calendar-week-number .ant-calendar-body tr:hover{background:#e6f7ff}.ant-calendar-week-number .ant-calendar-body tr.ant-calendar-active-week{background:#bae7ff}.ant-tag-checkable:not(.ant-tag-checkable-checked):hover{color:#1890ff}.ant-tag-checkable-checked{background-color:#1890ff}.ant-tag-checkable:active{background-color:#096dd9}.ant-tag-blue{color:#1890ff;background:#e6f7ff;border-color:#91d5ff}.ant-tag-blue-inverse{background:#1890ff;border-color:#1890ff}.ant-steps-item-icon>.ant-steps-icon{color:#1890ff}:not(.ant-steps-item-custom).ant-steps-item-process .ant-steps-item-icon{border-color:#1890ff}:not(.ant-steps-item-process).ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#1890ff}.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot,:not(.ant-steps-item-custom).ant-steps-item-process .ant-steps-item-icon{background:#1890ff}.ant-steps-item-finish .ant-steps-item-icon{border-color:#1890ff}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon{color:#1890ff}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#1890ff}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after,.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#1890ff}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-description,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-subtitle,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-title{color:#1890ff}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon{border-color:#1890ff}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon .ant-steps-icon,.ant-steps-item-custom.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#1890ff}.ant-badge-status-processing,.ant-steps-navigation .ant-steps-item:before{background-color:#1890ff}.ant-badge-status-processing:after{border:1px solid #1890ff}.ant-badge-status-blue{background:#1890ff}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-down.on,.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-up.on,.ant-table-thead>tr>th .ant-table-filter-selected.anticon{color:#1890ff}.ant-table-tbody>tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-thead>tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-thead>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td{background:#e6f7ff}.ant-table-filter-dropdown .ant-dropdown-menu .ant-dropdown-submenu-contain-selected .ant-dropdown-menu-submenu-title:after{color:#1890ff;text-shadow:0 0 2px #bae7ff}.ant-table-filter-dropdown-link{color:#1890ff}.ant-table-filter-dropdown-link:hover{color:#40a9ff}.ant-table-filter-dropdown-link:active{color:#096dd9}.ant-table-row-expand-icon{color:#1890ff}.ant-table-row-expand-icon:focus,.ant-table-row-expand-icon:hover{color:#40a9ff}.ant-table-row-expand-icon:active{color:#096dd9}.ant-radio-input:focus+.ant-radio-inner,.ant-radio-wrapper:hover .ant-radio,.ant-radio:hover .ant-radio-inner{border-color:#1890ff}.ant-radio-input:focus+.ant-radio-inner{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-radio-checked:after{border:1px solid #1890ff}.ant-radio-inner:after{background-color:#1890ff}.ant-radio-checked .ant-radio-inner{border-color:#1890ff}.ant-radio-button-wrapper:hover{color:#1890ff}.ant-radio-button-wrapper:focus-within{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){color:#1890ff;border-color:#1890ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):before{background-color:#1890ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):first-child{border-color:#1890ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{color:#40a9ff;border-color:#40a9ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover:before{background-color:#40a9ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{color:#096dd9;border-color:#096dd9}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active:before{background-color:#096dd9}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){background:#1890ff;border-color:#1890ff}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{background:#40a9ff;border-color:#40a9ff}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{background:#096dd9;border-color:#096dd9}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-checkbox-input:focus+.ant-checkbox-inner,.ant-checkbox-wrapper:hover .ant-checkbox-inner,.ant-checkbox:hover .ant-checkbox-inner{border-color:#1890ff}.ant-checkbox-checked:after{border:1px solid #1890ff}.ant-checkbox-checked .ant-checkbox-inner{background-color:#1890ff;border-color:#1890ff}.ant-checkbox-indeterminate .ant-checkbox-inner:after{background-color:#1890ff}.has-error .ant-transfer-list-search:not([disabled]):hover{border-color:#40a9ff}.has-error .ant-transfer-list-search:not([disabled]):focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-card-actions>li>span a:not(.ant-btn):hover,.ant-card-actions>li>span:hover,.ant-card-actions>li>span>.anticon:hover,.is-validating.has-feedback .ant-form-item-children-icon{color:#1890ff}.ant-input-number:hover{border-color:#40a9ff}.ant-input-number:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-input-number-handler:hover .ant-input-number-handler-down-inner,.ant-input-number-handler:hover .ant-input-number-handler-up-inner{color:#40a9ff}.ant-input-number-focused{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)} \ No newline at end of file +.ant-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.ant-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.ant-pro-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-pro-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.ant-pro-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,.ant-pro-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover,.notice-header .notice-action[data-v-4726fe78],body.dark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,body.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,body.realdark .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-selected,body.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover{color:#1890ff}.notice-header .notice-action[data-v-4726fe78]:hover{color:#40a9ff}.notice-item.unread[data-v-4726fe78]{background:#e6f7ff}.notice-item.unread[data-v-4726fe78]:hover{background:#bae7ff}.notice-footer a[data-v-4726fe78]{color:#1890ff}.notice-footer a[data-v-4726fe78]:hover{color:#40a9ff}.ant-layout.dark .header-notice-wrapper .notice-item.unread,.ant-layout.realdark .header-notice-wrapper .notice-item.unread,body.dark .header-notice-wrapper .notice-item.unread,body.realdark .header-notice-wrapper .notice-item.unread{background:rgba(24,144,255,.15)}.ant-layout.dark .header-notice-wrapper .notice-item.unread:hover,.ant-layout.realdark .header-notice-wrapper .notice-item.unread:hover,body.dark .header-notice-wrapper .notice-item.unread:hover,body.realdark .header-notice-wrapper .notice-item.unread:hover{background:rgba(24,144,255,.25)}.ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover{color:#1890ff}.ant-layout.dark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-layout.dark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-layout.dark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,.ant-layout.realdark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-layout.realdark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-layout.realdark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,.ant-pro-layout.dark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-pro-layout.dark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-pro-layout.dark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,.ant-pro-layout.realdark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,.ant-pro-layout.realdark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,.ant-pro-layout.realdark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,body.dark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,body.dark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,body.dark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover,body.realdark .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,body.realdark .ant-pro-global-header-index-right .ant-pro-drop-down:hover,body.realdark .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover{color:#1890ff!important}.setting-drawer-index-content .setting-drawer-index-blockChecbox .setting-drawer-index-item .setting-drawer-index-selectIcon[data-v-940007f2]{color:#1890ff}:global .ant-layout.dark .ant-layout-header .anticon:hover,:global .ant-layout.realdark .ant-layout-header .anticon:hover,:global .ant-pro-layout.dark .ant-layout-header .anticon:hover,:global .ant-pro-layout.realdark .ant-layout-header .anticon:hover,:global body.dark .ant-layout-header .anticon:hover,:global body.realdark .ant-layout-header .anticon:hover{color:#1890ff!important}:global .ant-layout.dark .ant-layout-header a:hover,:global .ant-layout.realdark .ant-layout-header a:hover,:global .ant-pro-layout.dark .ant-layout-header a:hover,:global .ant-pro-layout.realdark .ant-layout-header a:hover,:global body.dark .ant-layout-header a:hover,:global body.realdark .ant-layout-header a:hover{color:#1890ff!important}:global .ant-pro-global-header-content .anticon:hover{color:#1890ff!important}:global .ant-pro-global-header-index-right .ant-pro-global-header-index-action:hover{color:#1890ff!important}:global .ant-pro-global-header-index-right .ant-dropdown-trigger:hover,:global .ant-pro-global-header-index-right .ant-pro-drop-down:hover{color:#1890ff!important}:global a:hover{color:#1890ff!important}:global .anticon:hover{color:#1890ff!important}.ant-pro-global-header-index-right.ant-pro-global-header-index-dark .ant-pro-global-header-index-action:hover{background:#1890ff}.ant-pro-global-header-index-right .ant-pro-account-avatar .antd-pro-global-header-index-avatar,.ant-pro-global-header-index-right.ant-pro-global-header-index-dark .ant-pro-drop-down:hover{color:#1890ff}:global .ant-pro-layout.dark .ant-dropdown-menu .ant-dropdown-menu-item:hover,:global .ant-pro-layout.realdark .ant-dropdown-menu .ant-dropdown-menu-item:hover{color:#1890ff!important}a{color:#1890ff}a:hover{color:#40a9ff}a:active{color:#096dd9}::-moz-selection{background:#1890ff}::selection{background:#1890ff}html{--antd-wave-shadow-color:#1890ff}.ant-click-animating-node,[ant-click-animating-without-extra-node=true]:after{-webkit-box-shadow:0 0 0 0 #1890ff;box-shadow:0 0 0 0 #1890ff}#nprogress .bar{background:#1890ff}#nprogress .peg{-webkit-box-shadow:0 0 10px #1890ff,0 0 5px #1890ff;box-shadow:0 0 10px #1890ff,0 0 5px #1890ff}#nprogress .spinner-icon{border-top-color:#1890ff;border-left-color:#1890ff}.fast-analysis-report .loading-container .loading-content-pro .current-step[data-v-33397338],.fast-analysis-report .loading-container .loading-content-pro .loading-header .loading-icon-pro[data-v-33397338],.fast-analysis-report .loading-container .loading-content-pro .progress-wrapper .progress-text[data-v-33397338]{color:#1890ff}.fast-analysis-report .loading-container .loading-content-pro .steps-list .step-item.active[data-v-33397338]{background:#e6f7ff;color:#1890ff}.fast-analysis-report .loading-container .loading-content-pro .steps-list .step-item.active .step-dot[data-v-33397338]{background:#1890ff;-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.2);box-shadow:0 0 0 3px rgba(24,144,255,.2)}.fast-analysis-report .result-container .decision-card[data-v-33397338]{border-left:6px solid #1890ff}.fast-analysis-report .result-container .price-info-row .price-card.current[data-v-33397338]{border-top:3px solid #1890ff}.fast-analysis-report .result-container .scores-row .score-item .score-header .anticon[data-v-33397338]{color:#1890ff}.fast-analysis-report .result-container .scores-row .score-item.overall[data-v-33397338]{background:linear-gradient(135deg,#e6f7ff,#fff);border:1px solid #91d5ff}.fast-analysis-report .result-container .detailed-analysis .analysis-card[data-v-33397338]{border-left:4px solid #1890ff}.fast-analysis-report .result-container .detailed-analysis .analysis-card.technical[data-v-33397338]{border-left-color:#1890ff}.fast-analysis-report .result-container .analysis-details .detail-section .detail-list li[data-v-33397338]:before,.fast-analysis-report .result-container .detailed-analysis .analysis-card .analysis-card-header.technical .anticon[data-v-33397338],.fast-analysis-report .result-container .indicators-section .section-title .anticon[data-v-33397338]{color:#1890ff}.fast-analysis-report.theme-dark .decision-card[data-v-33397338],.fast-analysis-report.theme-dark .detailed-analysis .analysis-card.technical[data-v-33397338]{border-left-color:#1890ff}.fast-analysis-report.theme-dark .score-item.overall[data-v-33397338]{background:linear-gradient(135deg,rgba(24,144,255,.1),#2a2e39);border-color:#1890ff}.left-panel .heatmap-box .box-header[data-v-76a3e064] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:var(--primary-color,#1890ff);border-color:var(--primary-color,#1890ff)}.left-panel .calendar-box .box-header .box-title .anticon[data-v-76a3e064]{color:var(--primary-color,#1890ff)}.right-panel .analysis-toolbar .analyze-button[data-v-76a3e064]{background:var(--primary-color,#1890ff);border-color:var(--primary-color,#1890ff)}.right-panel .analysis-main .analysis-placeholder .placeholder-content .placeholder-icon[data-v-76a3e064]{color:var(--primary-color,#1890ff)}.watchlist-panel .watchlist-list .watchlist-item.active[data-v-76a3e064]{background:#e6f7ff;border:1px solid #91d5ff}.ai-analysis-container.theme-dark .watchlist-panel .watchlist-list .watchlist-item.active[data-v-76a3e064]{background:rgba(24,144,255,.1);border-color:#1890ff}.ai-analysis-container.theme-dark .watchlist-bar-compat .stock-chip.active[data-v-76a3e064],.ai-analysis-container.theme-dark .watchlist-bar-compat .stock-chip[data-v-76a3e064]:hover,.ai-analysis-container.theme-dark .watchlist-bar-legacy .stock-chip.active[data-v-76a3e064],.ai-analysis-container.theme-dark .watchlist-bar-legacy .stock-chip[data-v-76a3e064]:hover{border-color:var(--primary-color,#1890ff);background:rgba(24,144,255,.1)}.qt-header .qt-header-left .qt-icon[data-v-0d547552]{color:#1890ff}.theme-dark[data-v-0d547552] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff}.theme-dark[data-v-0d547552] .ant-slider-track{background:#1890ff}.ai-asset-analysis-page .opp-section .opp-card .opp-action[data-v-3b2ffb77]{color:#1890ff}.ai-asset-analysis-page .opp-section .opp-card .opp-trade-btn[data-v-3b2ffb77]{background:linear-gradient(135deg,#1890ff,#722ed1)}.ai-asset-analysis-page .qt-floating-btn[data-v-3b2ffb77]{background:linear-gradient(135deg,#1890ff,#722ed1);-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4)}.code-section .section-header .section-title[data-v-4fea1865]:before{background:#1890ff}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link{color:#1890ff}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link:hover{color:#40a9ff}.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-cursor{border-left:2px solid #1890ff}.code-editor-container[data-v-4fea1865] .CodeMirror-selected{background:#e6f7ff}.editor-footer[data-v-4fea1865] .ant-btn:not(.ant-btn-primary):hover{border-color:#40a9ff;color:#40a9ff;-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)}.drawing-tool-btn[data-v-466e34db]:hover{color:#1890ff}.drawing-tool-btn.active[data-v-466e34db]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.indicator-btn[data-v-466e34db]:hover{color:#1890ff;border-color:#1890ff}.indicator-btn.active[data-v-466e34db]{color:#1890ff;border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.1);box-shadow:0 0 0 2px rgba(24,144,255,.1)}.section-title .anticon[data-v-9d8ac1fc]{color:#1890ff}.loading-overlay .bar[data-v-9d8ac1fc]{background:-webkit-gradient(linear,left top,left bottom,from(#1890ff),to(#52c41a));background:linear-gradient(180deg,#1890ff,#52c41a)}.loading-overlay .loading-text[data-v-9d8ac1fc]{color:#1890ff}.symbol-select[data-v-b17e86c2] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-b17e86c2] .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)}.panel-header .realtime-toggle-btn[data-v-b17e86c2]:hover,.panel-header .theme-toggle-btn[data-v-b17e86c2]:hover,.timeframe-item.active[data-v-b17e86c2],.timeframe-item[data-v-b17e86c2]:hover{color:#1890ff}.panel-header .realtime-toggle-btn.active[data-v-b17e86c2],.panel-header .theme-toggle-btn.active[data-v-b17e86c2]{color:#1890ff;background:#e6f7ff}.indicator-card[data-v-b17e86c2]:hover{border-color:#1890ff}.indicator-card.active[data-v-b17e86c2]{background:#e6f7ff;border-color:#1890ff}.action-icon.edit-icon[data-v-b17e86c2],.card-action[data-v-b17e86c2]:hover,.indicator-card.active .card-name[data-v-b17e86c2]{color:#1890ff}.action-icon.edit-icon[data-v-b17e86c2]:hover{color:#40a9ff}.action-icon.publish-icon[data-v-b17e86c2],.action-icon[data-v-b17e86c2]:hover{color:#1890ff}.action-icon.publish-icon[data-v-b17e86c2]:hover{color:#40a9ff}.action-icon.expiry-icon[data-v-b17e86c2]{color:#1890ff}.dark-dropdown .ant-select-dropdown-menu-item-active{background-color:#e6f7ff;color:#1890ff}.qt-header-btn[data-v-b17e86c2]{background:linear-gradient(135deg,#1890ff,#722ed1);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)}.qt-header-btn[data-v-b17e86c2]:focus,.qt-header-btn[data-v-b17e86c2]:hover{background:linear-gradient(135deg,#40a9ff,#9254de);-webkit-box-shadow:0 4px 12px rgba(24,144,255,.45);box-shadow:0 4px 12px rgba(24,144,255,.45)}.qt-floating-btn[data-v-b17e86c2]{background:linear-gradient(135deg,#1890ff,#722ed1);-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4)}.qt-floating-btn[data-v-b17e86c2]:hover{-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 .symbol-select[data-v-b17e86c2] .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-b17e86c2] .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 .chart-right .indicators-panel .panel-header .realtime-toggle-btn.active[data-v-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-b17e86c2]:hover,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-b17e86c2],.chart-container.theme-dark .timeframe-group .timeframe-item.active[data-v-b17e86c2],.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-b17e86c2]: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 .section-label .buy-indicator-btn[data-v-b17e86c2]: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.active[data-v-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-b17e86c2]: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 .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-b17e86c2],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-b17e86c2]:hover,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active .card-name[data-v-b17e86c2],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-b17e86c2]: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-b17e86c2],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-b17e86c2]:hover,body.dark,body.realdark{color:#40a9ff}.comment-list .comment-form .form-header .edit-label[data-v-4973cae6]{color:#1890ff}.comment-list .comments .comment-item.is-mine[data-v-4973cae6]{background:rgba(24,144,255,.02)}[data-theme=dark] .comment-list .comments .comment-item.is-mine[data-v-4973cae6]{background:rgba(24,144,255,.05)}.indicator-community-container .market-header .header-left .page-title .anticon[data-v-9342b380]{color:#1890ff}.indicator-community-container.theme-dark .admin-tabs[data-v-9342b380] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active,.indicator-community-container.theme-dark[data-v-9342b380] .ant-btn-link,.indicator-community-container.theme-dark[data-v-9342b380] .ant-modal-content .ant-list-item-meta-title a,.indicator-community-container.theme-dark[data-v-9342b380] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff}.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}.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-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: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-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 ::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-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}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-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}.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-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}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-0cc1c552]{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-0cc1c552]: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-0cc1c552]{color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-0cc1c552],.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-0cc1c552]:hover{border-left-color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-0cc1c552]: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-0cc1c552]{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-0cc1c552]: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-0cc1c552]{color:#1890ff}.trading-assistant.theme-dark .creation-mode-toggle[data-v-0cc1c552]{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-0cc1c552]: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-0cc1c552]{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-0cc1c552]: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-0cc1c552] .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-0cc1c552] .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)}.ai-filter-title .anticon[data-v-0cc1c552]{color:#1890ff}.creation-mode-toggle[data-v-0cc1c552]{background:rgba(24,144,255,.04);border:1px solid rgba(24,144,255,.12)}.strategy-type-selector .strategy-type-card[data-v-0cc1c552]: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-0cc1c552]{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-0cc1c552]{color:#1890ff}.ip-whitelist-tip[data-v-0cc1c552]{background-color:#e6f7ff;border:1px solid #91d5ff;color:#1890ff}.ip-whitelist-tip .anticon[data-v-0cc1c552],.summary-card .card-icon.sync.syncing[data-v-398d904c]{color:#1890ff}.monitor-card .monitor-body .scope-selected[data-v-398d904c]{color:#1890ff;border-bottom:1px dashed #1890ff}.alert-symbol-info .current-price-info[data-v-398d904c]{background:linear-gradient(135deg,#e6f7ff,#f0f5ff)}.alert-symbol-info .current-price-info .price[data-v-398d904c]{color:#1890ff}.position-checkbox-group .position-checkbox-item[data-v-398d904c]:hover{background:rgba(24,144,255,.05)}.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-22a6f70e],.profile-page .profile-card .profile-info .info-item .anticon[data-v-22a6f70e],.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-tabs-tab-active,.user-manage-page .address-text[data-v-7b696034],.user-manage-page .current-credits-info .value[data-v-7b696034],.user-manage-page .current-vip-info .value[data-v-7b696034],.user-manage-page .hash-text[data-v-7b696034],.user-manage-page .page-header .page-title .anticon[data-v-7b696034],.user-manage-page.theme-dark .manage-tabs[data-v-7b696034] .ant-tabs-tab-active{color:#1890ff}.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-22a6f70e] .ant-input:hover{border-color:#1890ff}.billing-page .plan-card.highlight[data-v-7f69db26]{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}.theme-dark .usdt-checkout .checkout-body .info-section .addr-box .copy-btn:hover,.theme-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}.settings-page .settings-header .page-title .anticon[data-v-20857e25]{color:#1890ff}.settings-page .openrouter-balance-card .ant-card[data-v-20857e25]{background:linear-gradient(135deg,#e6f7ff,#f0f5ff);border:1px solid #91d5ff}.settings-page .openrouter-balance-card .balance-header .balance-title[data-v-20857e25],.settings-page .settings-collapse[data-v-20857e25] .ant-collapse-item .ant-collapse-header .ant-collapse-arrow,.settings-page .settings-collapse[data-v-20857e25] .ant-collapse-item .ant-collapse-header .panel-header .panel-icon-left,.settings-page .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .help-icon:hover{color:#1890ff}.settings-page .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link{color:#1890ff;background:rgba(24,144,255,.08)}.settings-page .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link{background:rgba(24,144,255,.15)}.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-form-item-label .form-label-with-tooltip .api-link:hover{background:rgba(24,144,255,.25)}.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-number:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-number:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-password:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input-password:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-input:hover,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-select-selection:focus,.settings-page.theme-dark .settings-form[data-v-20857e25] .ant-select-selection:hover{border-color:#1890ff}.main .login-method-switch a[data-v-de9678f6]:hover,.turnstile-container .turnstile-error a[data-v-20437450]{color:#1890ff}.main .login-method-switch a.active[data-v-de9678f6]{color:#1890ff;border-bottom-color:#1890ff}.main .auth-links a[data-v-de9678f6],.main .code-login-hint .anticon[data-v-de9678f6],.main .legal-wrap .legal-toggle[data-v-de9678f6]{color:#1890ff}.ant-dropdown-menu-item-selected,.ant-dropdown-menu-item-selected>a,.ant-dropdown-menu-submenu-title-selected,.ant-dropdown-menu-submenu-title-selected>a{color:#1890ff;background-color:#e6f7ff}.ant-dropdown-menu-item:hover,.ant-dropdown-menu-submenu-title:hover{background-color:#e6f7ff}.ant-dropdown-menu-submenu-selected .ant-dropdown-menu-submenu-title{color:#1890ff}.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected>a{background:#1890ff}.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){color:#40a9ff;border-color:#40a9ff}.ant-btn.active:not(.ant-btn-primary):not(.ant-btn-danger),.ant-btn:active:not(.ant-btn-primary):not(.ant-btn-danger){color:#096dd9;border-color:#096dd9}.ant-btn-primary{background-color:#1890ff;border-color:#1890ff}.ant-btn-primary:focus,.ant-btn-primary:hover{background-color:#40a9ff;border-color:#40a9ff}.ant-btn-primary.active,.ant-btn-primary:active{background-color:#096dd9;border-color:#096dd9}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child){border-right-color:#40a9ff;border-left-color:#40a9ff}.ant-btn-group .ant-btn-primary:first-child:not(:last-child){border-right-color:#40a9ff}.ant-btn-group .ant-btn-primary+.ant-btn-primary,.ant-btn-group .ant-btn-primary:last-child:not(:first-child){border-left-color:#40a9ff}.ant-btn-ghost:focus,.ant-btn-ghost:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-ghost.active,.ant-btn-ghost:active{color:#096dd9;border-color:#096dd9}.ant-btn-dashed:focus,.ant-btn-dashed:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-dashed.active,.ant-btn-dashed:active{color:#096dd9;border-color:#096dd9}.ant-btn-link{color:#1890ff}.ant-btn-link:focus,.ant-btn-link:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-link.active,.ant-btn-link:active{color:#096dd9;border-color:#096dd9}.ant-btn-background-ghost.ant-btn-primary{color:#1890ff;border-color:#1890ff}.ant-btn-background-ghost.ant-btn-primary:focus,.ant-btn-background-ghost.ant-btn-primary:hover{color:#40a9ff;border-color:#40a9ff}.ant-btn-background-ghost.ant-btn-primary.active,.ant-btn-background-ghost.ant-btn-primary:active{color:#096dd9;border-color:#096dd9}.ant-btn-background-ghost.ant-btn-link{color:#1890ff}.ant-btn-background-ghost.ant-btn-link:focus,.ant-btn-background-ghost.ant-btn-link:hover{color:#40a9ff}.ant-btn-background-ghost.ant-btn-link.active,.ant-btn-background-ghost.ant-btn-link:active{color:#096dd9}.ant-menu-submenu-selected{color:#1890ff}.ant-menu-item:active,.ant-menu-submenu-title:active{background:#e6f7ff}.ant-menu-item-active,.ant-menu-item-selected,.ant-menu-item-selected>a,.ant-menu-item-selected>a:hover,.ant-menu-item:hover,.ant-menu-item>.ant-badge>a:hover,.ant-menu-item>a:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:#1890ff}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#e6f7ff}.ant-menu-submenu-inline>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-inline>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#1890ff));background:linear-gradient(90deg,#1890ff,#1890ff)}.ant-menu-vertical .ant-menu-submenu-selected,.ant-menu-vertical .ant-menu-submenu-selected>a,.ant-menu-vertical-left .ant-menu-submenu-selected,.ant-menu-vertical-left .ant-menu-submenu-selected>a,.ant-menu-vertical-right .ant-menu-submenu-selected,.ant-menu-vertical-right .ant-menu-submenu-selected>a{color:#1890ff}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item:hover,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-selected,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu:hover,.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item-open,.ant-menu-horizontal>.ant-menu-item-selected,.ant-menu-horizontal>.ant-menu-submenu-active,.ant-menu-horizontal>.ant-menu-submenu-open{color:#1890ff;border-bottom:2px solid #1890ff}.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark)>.ant-menu-item-selected>a,.ant-menu-horizontal:not(ant-menu-light):not(.ant-menu-dark)>.ant-menu-item>a:hover{color:#1890ff}.ant-menu-inline .ant-menu-item:after,.ant-menu-vertical .ant-menu-item:after,.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-vertical-right .ant-menu-item:after{border-right:3px solid #1890ff}.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected,.ant-menu.ant-menu-dark .ant-menu-item-selected{background-color:#1890ff}.ant-modal-confirm-info .ant-modal-confirm-body>.anticon,.ant-page-header-back-button,.ant-pro-basicLayout .trigger:hover,.ant-pro-sider-menu-sider.light .ant-pro-sider-menu-logo h1{color:#1890ff}.ant-page-header-back-button:focus,.ant-page-header-back-button:hover{color:#40a9ff}.ant-page-header-back-button:active{color:#096dd9}.ant-breadcrumb a:hover{color:#40a9ff}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active,.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-disabled{color:#1890ff}.ant-tabs-extra-content .ant-tabs-new-tab:hover{color:#1890ff;border-color:#1890ff}.ant-tabs .ant-tabs-card-bar.ant-tabs-bottom-bar .ant-tabs-tab-active{color:#1890ff}.ant-tabs-ink-bar{background-color:#1890ff}.ant-tabs-nav .ant-tabs-tab:hover{color:#40a9ff}.ant-tabs-nav .ant-tabs-tab:active{color:#096dd9}.ant-tabs-nav .ant-tabs-tab-active{color:#1890ff}.ant-pro-global-header .dark .action.opened,.ant-pro-global-header .dark .action:hover{background:#1890ff}.ant-pro-setting-drawer-block-checbox-selectIcon,.ant-pro-setting-drawer-block-checbox-selectIcon .action{color:#1890ff}.ant-pro-setting-drawer-handle{background:#1890ff}.ant-list-item-meta-title>a:hover,.ant-spin{color:#1890ff}.ant-spin-dot-item{background-color:#1890ff}.ant-pagination-item:focus,.ant-pagination-item:hover{border-color:#1890ff}.ant-pagination-item:focus a,.ant-pagination-item:hover a{color:#1890ff}.ant-pagination-item-active{border-color:#1890ff}.ant-pagination-item-active a{color:#1890ff}.ant-pagination-item-active:focus,.ant-pagination-item-active:hover{border-color:#40a9ff}.ant-pagination-item-active:focus a,.ant-pagination-item-active:hover a{color:#40a9ff}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon{color:#1890ff}.ant-pagination-next:hover a,.ant-pagination-prev:hover a{border-color:#40a9ff}.ant-pagination-next:focus .ant-pagination-item-link,.ant-pagination-next:hover .ant-pagination-item-link,.ant-pagination-prev:focus .ant-pagination-item-link,.ant-pagination-prev:hover .ant-pagination-item-link{color:#1890ff;border-color:#1890ff}.ant-pagination-options-quick-jumper input:hover{border-color:#40a9ff}.ant-pagination-options-quick-jumper input:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-pagination-simple .ant-pagination-simple-pager input:hover{border-color:#1890ff}.ant-select-selection:hover{border-color:#40a9ff}.ant-select-focused .ant-select-selection,.ant-select-open .ant-select-selection,.ant-select-selection:active,.ant-select-selection:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled),.ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled){background-color:#e6f7ff}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected .ant-select-selected-icon,.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected:hover .ant-select-selected-icon,.ant-switch-checked.ant-switch-loading .ant-switch-loading-icon{color:#1890ff}.ant-switch:focus{-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-switch-checked{background-color:#1890ff}.ant-alert-info{background-color:#e6f7ff;border:1px solid #91d5ff}.ant-alert-info .ant-alert-icon,.ant-message-info .anticon,.ant-message-loading .anticon,.anticon.ant-notification-notice-icon-info{color:#1890ff}.ant-input:focus,.ant-input:hover,.ant-select-auto-complete.ant-select .ant-input:focus,.ant-select-auto-complete.ant-select .ant-input:hover{border-color:#40a9ff}.ant-input:focus{-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-input-group-addon .ant-select-focused .ant-select-selection,.ant-input-group-addon .ant-select-open .ant-select-selection{color:#1890ff}.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){border-color:#40a9ff}.ant-result-info .ant-result-icon>.anticon{color:#1890ff}.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#1890ff}.ant-progress-bg,.ant-progress-success-bg{background-color:#1890ff}.ant-upload.ant-upload-select-picture-card:hover{border-color:#1890ff}.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled){border-color:#096dd9}.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover{border-color:#40a9ff}.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon{color:#40a9ff}.ant-upload-list-item:hover .ant-upload-list-item-info{background-color:#e6f7ff}.ant-time-picker-panel-select li:focus{color:#1890ff}.ant-time-picker-panel-select li:hover{background:#e6f7ff}.ant-time-picker-input:hover{border-color:#40a9ff}.ant-time-picker-input:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-calendar-picker:hover .ant-calendar-picker-input:not(.ant-input-disabled){border-color:#40a9ff}.ant-calendar-picker:focus .ant-calendar-picker-input:not(.ant-input-disabled){border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-calendar-header a:hover{color:#40a9ff}.ant-calendar-date:hover{background:#e6f7ff}.ant-calendar-date:active{background:#40a9ff}:not(.ant-calendar-selected-date):not(.ant-calendar-selected-day).ant-calendar-today .ant-calendar-date{color:#1890ff;border-color:#1890ff}.ant-calendar-selected-day .ant-calendar-date{background:#bae7ff}.ant-calendar .ant-calendar-ok-btn{background-color:#1890ff;border-color:#1890ff}.ant-calendar .ant-calendar-ok-btn:focus,.ant-calendar .ant-calendar-ok-btn:hover{background-color:#40a9ff;border-color:#40a9ff}.ant-calendar .ant-calendar-ok-btn.active,.ant-calendar .ant-calendar-ok-btn:active{background-color:#096dd9;border-color:#096dd9}.ant-calendar-range .ant-calendar-today :not(.ant-calendar-disabled-cell) :not(.ant-calendar-last-month-cell) :not(.ant-calendar-next-month-btn-day) .ant-calendar-date{color:#1890ff;background:#bae7ff;border-color:#1890ff}.ant-calendar-range .ant-calendar-selected-end-date .ant-calendar-date,.ant-calendar-range .ant-calendar-selected-end-date .ant-calendar-date:hover,.ant-calendar-range .ant-calendar-selected-start-date .ant-calendar-date,.ant-calendar-range .ant-calendar-selected-start-date .ant-calendar-date:hover{background:#1890ff}.ant-calendar-range .ant-calendar-input:hover,.ant-calendar-range .ant-calendar-time-picker-input:hover{border-color:#40a9ff}.ant-calendar-range .ant-calendar-input:focus,.ant-calendar-range .ant-calendar-time-picker-input:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-calendar-range .ant-calendar-in-range-cell:before,.ant-calendar-time-picker-select li:hover{background:#e6f7ff}.ant-calendar-time-picker-select li:focus{color:#1890ff}.ant-calendar-month-panel-header a:hover{color:#40a9ff}.ant-calendar-month-panel-selected-cell .ant-calendar-month-panel-month,.ant-calendar-month-panel-selected-cell .ant-calendar-month-panel-month:hover{background:#1890ff}.ant-calendar-month-panel-month:hover{background:#e6f7ff}.ant-calendar-year-panel-header a:hover{color:#40a9ff}.ant-calendar-year-panel-year:hover{background:#e6f7ff}.ant-calendar-year-panel-selected-cell .ant-calendar-year-panel-year,.ant-calendar-year-panel-selected-cell .ant-calendar-year-panel-year:hover{background:#1890ff}.ant-calendar-decade-panel-header a:hover{color:#40a9ff}.ant-calendar-decade-panel-decade:hover{background:#e6f7ff}.ant-calendar-decade-panel-selected-cell .ant-calendar-decade-panel-decade,.ant-calendar-decade-panel-selected-cell .ant-calendar-decade-panel-decade:hover{background:#1890ff}.ant-calendar-week-number .ant-calendar-body tr:hover{background:#e6f7ff}.ant-calendar-week-number .ant-calendar-body tr.ant-calendar-active-week{background:#bae7ff}.ant-tag-checkable:not(.ant-tag-checkable-checked):hover{color:#1890ff}.ant-tag-checkable-checked{background-color:#1890ff}.ant-tag-checkable:active{background-color:#096dd9}.ant-tag-blue{color:#1890ff;background:#e6f7ff;border-color:#91d5ff}.ant-tag-blue-inverse{background:#1890ff;border-color:#1890ff}.ant-steps-item-icon>.ant-steps-icon{color:#1890ff}:not(.ant-steps-item-custom).ant-steps-item-process .ant-steps-item-icon{border-color:#1890ff}:not(.ant-steps-item-process).ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#1890ff}.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot,:not(.ant-steps-item-custom).ant-steps-item-process .ant-steps-item-icon{background:#1890ff}.ant-steps-item-finish .ant-steps-item-icon{border-color:#1890ff}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon{color:#1890ff}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#1890ff}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after,.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#1890ff}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-description,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-subtitle,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-title{color:#1890ff}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon{border-color:#1890ff}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon .ant-steps-icon,.ant-steps-item-custom.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#1890ff}.ant-badge-status-processing,.ant-steps-navigation .ant-steps-item:before{background-color:#1890ff}.ant-badge-status-processing:after{border:1px solid #1890ff}.ant-badge-status-blue{background:#1890ff}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-down.on,.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-up.on,.ant-table-thead>tr>th .ant-table-filter-selected.anticon{color:#1890ff}.ant-table-tbody>tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-thead>tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td,.ant-table-thead>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td{background:#e6f7ff}.ant-table-filter-dropdown .ant-dropdown-menu .ant-dropdown-submenu-contain-selected .ant-dropdown-menu-submenu-title:after{color:#1890ff;text-shadow:0 0 2px #bae7ff}.ant-table-filter-dropdown-link{color:#1890ff}.ant-table-filter-dropdown-link:hover{color:#40a9ff}.ant-table-filter-dropdown-link:active{color:#096dd9}.ant-table-row-expand-icon{color:#1890ff}.ant-table-row-expand-icon:focus,.ant-table-row-expand-icon:hover{color:#40a9ff}.ant-table-row-expand-icon:active{color:#096dd9}.ant-radio-input:focus+.ant-radio-inner,.ant-radio-wrapper:hover .ant-radio,.ant-radio:hover .ant-radio-inner{border-color:#1890ff}.ant-radio-input:focus+.ant-radio-inner{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-radio-checked:after{border:1px solid #1890ff}.ant-radio-inner:after{background-color:#1890ff}.ant-radio-checked .ant-radio-inner{border-color:#1890ff}.ant-radio-button-wrapper:hover{color:#1890ff}.ant-radio-button-wrapper:focus-within{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){color:#1890ff;border-color:#1890ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):before{background-color:#1890ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):first-child{border-color:#1890ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{color:#40a9ff;border-color:#40a9ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover:before{background-color:#40a9ff}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{color:#096dd9;border-color:#096dd9}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active:before{background-color:#096dd9}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){background:#1890ff;border-color:#1890ff}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{background:#40a9ff;border-color:#40a9ff}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{background:#096dd9;border-color:#096dd9}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{-webkit-box-shadow:0 0 0 3px rgba(24,144,255,.08);box-shadow:0 0 0 3px rgba(24,144,255,.08)}.ant-checkbox-input:focus+.ant-checkbox-inner,.ant-checkbox-wrapper:hover .ant-checkbox-inner,.ant-checkbox:hover .ant-checkbox-inner{border-color:#1890ff}.ant-checkbox-checked:after{border:1px solid #1890ff}.ant-checkbox-checked .ant-checkbox-inner{background-color:#1890ff;border-color:#1890ff}.ant-checkbox-indeterminate .ant-checkbox-inner:after{background-color:#1890ff}.has-error .ant-transfer-list-search:not([disabled]):hover{border-color:#40a9ff}.has-error .ant-transfer-list-search:not([disabled]):focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-card-actions>li>span a:not(.ant-btn):hover,.ant-card-actions>li>span:hover,.ant-card-actions>li>span>.anticon:hover,.is-validating.has-feedback .ant-form-item-children-icon{color:#1890ff}.ant-input-number:hover{border-color:#40a9ff}.ant-input-number:focus{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.ant-input-number-handler:hover .ant-input-number-handler-down-inner,.ant-input-number-handler:hover .ant-input-number-handler-up-inner{color:#40a9ff}.ant-input-number-focused{border-color:#40a9ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)} \ No newline at end of file diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 2a8ab09..edc22b4 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/243.60d94895.js b/frontend/dist/js/243.60d94895.js new file mode 100644 index 0000000..1f7332b --- /dev/null +++ b/frontend/dist/js/243.60d94895.js @@ -0,0 +1,18 @@ +(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[243],{6372:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){ +/** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ +return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function i(t){if(255===(t>>24&255)){var e=t>>16&255,i=t>>8&255,n=255&t;255===e?(e=0,255===i?(i=0,255===n?n=0:++n):++i):++e,t=0,t+=e<<16,t+=i<<8,t+=n}else t+=1<<24;return t}function n(t){return 0===(t[0]=i(t[0]))&&(t[1]=i(t[1])),t}var r=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,r=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),n(o);var s=o.slice(0);i.encryptBlock(s,0);for(var l=0;l>>2]|=t[n]<<24-n%4*8;r.call(this,i,e)}else r.apply(this,arguments)};a.prototype=n}}(),t.lib.WordArray})},7628: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.WordArray,r=i.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=r.extend({_doReset:function(){for(var t=this._key,e=t.words,i=[],n=0;n<56;n++){var r=o[n]-1;i[n]=e[r>>>5]>>>31-r%32&1}for(var a=this._subKeys=[],c=0;c<16;c++){var u=a[c]=[],d=l[c];for(n=0;n<24;n++)u[n/6|0]|=i[(s[n]-1+d)%28]<<31-n%6,u[4+(n/6|0)]|=i[28+(s[n+24]-1+d)%28]<<31-n%6;u[0]=u[0]<<1|u[0]>>>31;for(n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=a[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,i){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=i[n],a=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((o^r[l])&u[l])>>>0];this._lBlock=o,this._rBlock=a^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var i=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=i,this._lBlock^=i<>>t^this._lBlock)&e;this._lBlock^=i,this._rBlock^=i<192.");var i=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(i)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(a))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(f)}(),t.TripleDES})},10482:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso97971={pad:function(e,i){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,i)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})},15237:function(t){(function(e,i){t.exports=i()})(0,function(){"use strict";var t=navigator.userAgent,e=navigator.platform,i=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),a=/Edge\/(\d+)/.exec(t),o=n||r||a,s=o&&(n?document.documentMode||6:+(a||r)[1]),l=!a&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!a&&/Chrome\/(\d+)/.exec(t),d=u&&+u[1],h=/Opera\//.test(t),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),v=/PhantomJS/.test(t),g=p&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),m=/Android/.test(t),y=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),x=/\bCrOS\b/.test(t),_=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=b&&(c||h&&(null==w||w<12.11)),S=i||o&&s>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var A,T=function(t,e){var i=t.className,n=k(e).exec(i);if(n){var r=i.slice(n.index+n[0].length);t.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function I(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function M(t,e){return I(t).appendChild(e)}function E(t,e,i,n){var r=document.createElement(t);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var a=0;a=e)return o+(e-a);o+=s-a,o+=i-o%i,a=s+1}}g?B=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(B=function(t){try{t.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=$(this.onTimeout,this)};function Y(t,e){for(var i=0;i=e)return n+Math.min(o,e-r);if(r+=a-n,r+=i-r%i,n=a+1,r>=e)return n}}var J=[""];function Q(t){while(J.length<=t)J.push(tt(J)+" ");return J[t]}function tt(t){return t[t.length-1]}function et(t,e){for(var i=[],n=0;n"€"&&(t.toUpperCase()!=t.toLowerCase()||at.test(t))}function st(t,e){return e?!!(e.source.indexOf("\\w")>-1&&ot(t))||e.test(t):ot(t)}function lt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var ct=/[\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 ut(t){return t.charCodeAt(0)>=768&&ct.test(t)}function dt(t,e,i){while((i<0?e>0:ei?-1:1;;){if(e==i)return e;var r=(e+i)/2,a=n<0?Math.ceil(r):Math.floor(r);if(a==e)return t(a)?e:i;t(a)?i=a:e=a+n}}function pt(t,e,i,n){if(!t)return n(e,i,"ltr",0);for(var r=!1,a=0;ae||e==i&&o.to==e)&&(n(Math.max(o.from,e),Math.min(o.to,i),1==o.level?"rtl":"ltr",a),r=!0)}r||n(e,i,"ltr")}var ft=null;function vt(t,e,i){var n;ft=null;for(var r=0;re)return r;a.to==e&&(a.from!=a.to&&"before"==i?n=r:ft=r),a.from==e&&(a.from!=a.to&&"before"!=i?n=r:ft=r)}return null!=n?n:ft}var gt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(i){return i<=247?t.charAt(i):1424<=i&&i<=1524?"R":1536<=i&&i<=1785?e.charAt(i-1536):1774<=i&&i<=2220?"r":8192<=i&&i<=8203?"w":8204==i?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(t,e,i){this.level=t,this.from=e,this.to=i}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!n.test(t))return!1;for(var u=t.length,d=[],h=0;h-1&&(n[e]=r.slice(0,a).concat(r.slice(a+1)))}}}function wt(t,e){var i=xt(t,e);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r0}function At(t){t.prototype.on=function(t,e){bt(this,t,e)},t.prototype.off=function(t,e){_t(this,t,e)}}function Tt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function It(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Mt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Et(t){Tt(t),It(t)}function Dt(t){return t.target||t.srcElement}function Pt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var Lt,Rt,Ft=function(){if(o&&s<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function Bt(t){if(null==Lt){var e=E("span","​");M(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&s<8))}var i=Lt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Nt(t){if(null!=Rt)return Rt;var e=M(t,document.createTextNode("AخA")),i=A(e,0,1).getBoundingClientRect(),n=A(e,1,2).getBoundingClientRect();return I(t),!(!i||i.left==i.right)&&(Rt=n.right-i.right<3)}var Ot=3!="\n\nb".split(/\n/).length?function(t){var e=0,i=[],n=t.length;while(e<=n){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var a=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),o=a.indexOf("\r");-1!=o?(i.push(a.slice(0,o)),e+=o+1):(i.push(a),e=r+1)}return i}:function(t){return t.split(/\r\n?|\n/)},zt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(i){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Wt=function(){var t=E("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),$t=null;function Ht(t){if(null!=$t)return $t;var e=M(t,E("span","x")),i=e.getBoundingClientRect(),n=A(e,0,1).getBoundingClientRect();return $t=Math.abs(i.left-n.left)>1}var Vt={},Kt={};function Yt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Vt[t]=e}function Xt(t,e){Kt[t]=e}function Ut(t){if("string"==typeof t&&Kt.hasOwnProperty(t))t=Kt[t];else if(t&&"string"==typeof t.name&&Kt.hasOwnProperty(t.name)){var e=Kt[t.name];"string"==typeof e&&(e={name:e}),t=rt(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Gt(t,e){e=Ut(e);var i=Vt[e.name];if(!i)return Gt(t,"text/plain");var n=i(t,e);if(jt.hasOwnProperty(e.name)){var r=jt[e.name];for(var a in r)r.hasOwnProperty(a)&&(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=r[a])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)n[o]=e.modeProps[o];return n}var jt={};function qt(t,e){var i=jt.hasOwnProperty(t)?jt[t]:jt[t]={};H(e,i)}function Zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var n in e){var r=e[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Jt(t,e){var i;while(t.innerMode){if(i=t.innerMode(e),!i||i.mode==t)break;e=i.state,t=i.mode}return i||{mode:t,state:e}}function Qt(t,e,i){return!t.startState||t.startState(e,i)}var te=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function ee(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");var i=t;while(!i.lines)for(var n=0;;++n){var r=i.children[n],a=r.chunkSize();if(e=t.first&&ei?ce(i,ee(t,i).text.length):me(e,ee(t,e.line).text.length)}function me(t,e){var i=t.ch;return null==i||i>e?ce(t.line,e):i<0?ce(t.line,0):t}function ye(t,e){for(var i=[],n=0;n=this.string.length},te.prototype.sol=function(){return this.pos==this.lineStart},te.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},te.prototype.next=function(){if(this.pose},te.prototype.eatSpace=function(){var t=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>t},te.prototype.skipToEnd=function(){this.pos=this.string.length},te.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},te.prototype.backUp=function(t){this.pos-=t},te.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var r=function(t){return i?t.toLowerCase():t},a=this.string.substr(this.pos,t.length);if(r(a)==r(t))return!1!==e&&(this.pos+=t.length),!0},te.prototype.current=function(){return this.string.slice(this.start,this.pos)},te.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},te.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},te.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var be=function(t,e){this.state=t,this.lookAhead=e},xe=function(t,e,i,n){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function _e(t,e,i,n){var r=[t.state.modeGen],a={};Ee(t,e.text,t.doc.mode,i,function(t,e){return r.push(t,e)},a,n);for(var o=i.state,s=function(n){i.baseTokens=r;var s=t.state.overlays[n],l=1,c=0;i.state=!0,Ee(t,e.text,s.mode,i,function(t,e){var i=l;while(ct&&r.splice(l,1,t,r[l+1],n),l+=2,c=Math.min(t,n)}if(e)if(s.opaque)r.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;it.options.maxHighlightLength&&Zt(t.doc.mode,n.state),a=_e(t,e,n);r&&(n.state=r),e.stateAfter=n.save(!r),e.styles=a.styles,a.classes?e.styleClasses=a.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Ce(t,e,i){var n=t.doc,r=t.display;if(!n.mode.startState)return new xe(n,!0,e);var a=De(t,e,i),o=a>n.first&&ee(n,a-1).stateAfter,s=o?xe.fromSaved(n,o,a):new xe(n,Qt(n.mode),a);return n.iter(a,e,function(i){Se(t,i.text,s);var n=s.line;i.stateAfter=n==e-1||n%5==0||n>=r.viewFrom&&ne.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}xe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},xe.prototype.baseToken=function(t){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=t)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},xe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xe.fromSaved=function(t,e,i){return e instanceof be?new xe(t,Zt(t.mode,e.state),i,e.lookAhead):new xe(t,Zt(t.mode,e),i)},xe.prototype.save=function(t){var e=!1!==t?Zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new be(e,this.maxLookAhead):e};var Te=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i};function Ie(t,e,i,n){var r,a=t.doc,o=a.mode;e=ge(a,e);var s,l=ee(a,e.line),c=Ce(t,e.line,i),u=new te(l.text,t.options.tabSize,c);n&&(s=[]);while((n||u.post.options.maxHighlightLength?(s=!1,o&&Se(t,e,n,d.pos),d.pos=e.length,l=null):l=Me(Ae(i,d,n.state,h),a),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){while(co;--s){if(s<=a.first)return a.first;var l=ee(a,s-1),c=l.stateAfter;if(c&&(!i||s+(c instanceof be?c.lookAhead:0)<=a.modeFrontier))return s;var u=V(l.text,null,t.options.tabSize);(null==r||n>u)&&(r=s-1,n=u)}return r}function Pe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontieri;n--){var r=ee(t,n).stateAfter;if(r&&(!(r instanceof be)||n+r.lookAhead=e:a.to>e);(n||(n=[])).push(new Ne(o,a.from,l?null:a.to))}}return n}function He(t,e,i){var n;if(t)for(var r=0;r=e:a.to>e);if(s||a.from==e&&"bookmark"==o.type&&(!i||a.marker.insertLeft)){var l=null==a.from||(o.inclusiveLeft?a.from<=e:a.from0&&s)for(var x=0;x0)){var u=[l,1],d=ue(c.from,s.from),h=ue(c.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!o.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function Xe(t){var e=t.markedSpans;if(e){for(var i=0;ie)&&(!i||qe(i,a.marker)<0)&&(i=a.marker)}return i}function ei(t,e,i,n,r){var a=ee(t,e),o=Re&&a.markedSpans;if(o)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.to,i)>=0:ue(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.from,n)<=0:ue(c.from,n)<0)))return!0}}}function ii(t){var e;while(e=Je(t))t=e.find(-1,!0).line;return t}function ni(t){var e;while(e=Qe(t))t=e.find(1,!0).line;return t}function ri(t){var e,i;while(e=Qe(t))t=e.find(1,!0).line,(i||(i=[])).push(t);return i}function ai(t,e){var i=ee(t,e),n=ii(i);return i==n?e:ae(n)}function oi(t,e){if(e>t.lastLine())return e;var i,n=ee(t,e);if(!si(t,n))return e;while(i=Qe(n))n=i.find(1,!0).line;return ae(n)+1}function si(t,e){var i=Re&&e.markedSpans;if(i)for(var n=void 0,r=0;re.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)})}var hi=function(t,e,i){this.text=t,Ue(this,e),this.height=i?i(this):1};function pi(t,e,i,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Xe(t),Ue(t,i);var r=n?n(t):1;r!=t.height&&re(t,r)}function fi(t){t.parent=null,Xe(t)}hi.prototype.lineNo=function(){return ae(this)},At(hi);var vi={},gi={};function mi(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?gi:vi;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function yi(t,e){var i=D("span",null,null,l?"padding-right: .1px":null),n={pre:D("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var a=r?e.rest[r-1]:e.line,o=void 0;n.pos=0,n.addToken=xi,Nt(t.display.measure)&&(o=mt(a,t.doc.direction))&&(n.addToken=wi(n.addToken,o)),n.map=[];var s=e!=t.display.externalMeasured&&ae(a);Si(a,n,we(t,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=F(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=F(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Bt(t.display.measure))),0==r?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return wt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function bi(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function xi(t,e,i,n,r,a,l){if(e){var c,u=t.splitSpaces?_i(e,t.trailingSpace):e,d=t.cm.state.specialChars,h=!1;if(d.test(e)){c=document.createDocumentFragment();var p=0;while(1){d.lastIndex=p;var f=d.exec(e),v=f?f.index-p:e.length-p;if(v){var g=document.createTextNode(u.slice(p,p+v));o&&s<9?c.appendChild(E("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+v,g),t.col+=v,t.pos+=v}if(!f)break;p+=v+1;var m=void 0;if("\t"==f[0]){var y=t.cm.options.tabSize,b=y-t.col%y;m=c.appendChild(E("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=b}else"\r"==f[0]||"\n"==f[0]?(m=c.appendChild(E("span","\r"==f[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",f[0]),t.col+=1):(m=t.cm.options.specialCharPlaceholder(f[0]),m.setAttribute("cm-text",f[0]),o&&s<9?c.appendChild(E("span",[m])):c.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),o&&s<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),i||n||r||h||a||l){var x=i||"";n&&(x+=n),r&&(x+=r);var _=E("span",[c],x,a);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&_.setAttribute(w,l[w]);return t.content.appendChild(_)}t.content.appendChild(c)}}function _i(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,n="",r=0;rc&&d.from<=c)break;if(d.to>=u)return t(i,n,r,a,o,s,l);t(i,n.slice(0,d.to-c),r,a,null,s,l),a=null,n=n.slice(d.to-c),c=d.to}}}function Ci(t,e,i,n){var r=!n&&i.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!n&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function Si(t,e,i){var n=t.markedSpans,r=t.text,a=0;if(n)for(var o,s,l,c,u,d,h,p=r.length,f=0,v=1,g="",m=0;;){if(m==f){l=c=u=s="",h=null,d=null,m=1/0;for(var y=[],b=void 0,x=0;xf||w.collapsed&&_.to==f&&_.from==f)){if(null!=_.to&&_.to!=f&&m>_.to&&(m=_.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&_.from==f&&(u+=" "+w.startStyle),w.endStyle&&_.to==m&&(b||(b=[])).push(w.endStyle,_.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||qe(d.marker,w)<0)&&(d=_)}else _.from>f&&m>_.from&&(m=_.from)}if(b)for(var S=0;S=p)break;var A=Math.min(p,m);while(1){if(g){var T=f+g.length;if(!d){var I=T>A?g.slice(0,A-f):g;e.addToken(e,I,o?o+l:l,u,f+I.length==m?c:"",s,h)}if(T>=A){g=g.slice(A-f),f=A;break}f=T,u=""}g=r.slice(a,a=i[v++]),o=mi(i[v++],e.cm.options)}}else for(var M=1;M2&&a.push((l.bottom+c.top)/2-i.top)}}a.push(i.bottom-i.top)}}function en(t,e,i){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var n=0;ni)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function nn(t,e){e=ii(e);var i=ae(e),n=t.display.externalMeasured=new ki(t.doc,e,i);n.lineN=i;var r=n.built=yi(t,n);return n.text=r.pre,M(t.display.lineMeasure,r.pre),n}function rn(t,e,i,n){return sn(t,on(t,e),i,n)}function an(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&ee)&&(a=l-s,r=a-1,e>=l&&(o="right")),null!=r){if(n=t[c+2],s==l&&i==(n.insertLeft?"left":"right")&&(o=i),"left"==i&&0==r)while(c&&t[c-2]==t[c-3]&&t[c-1].insertLeft)n=t[2+(c-=3)],o="left";if("right"==i&&r==l-s)while(c=0;r--)if((i=t[r]).left!=i.right)break;return i}function hn(t,e,i,n){var r,a=un(e.map,i,n),l=a.node,c=a.start,u=a.end,d=a.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){while(c&&ut(e.line.text.charAt(a.coverStart+c)))--c;while(a.coverStart+u0&&(d=n="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==n?p.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Rn(t.display),top:f.top,bottom:f.bottom}:cn}for(var v=r.top-e.rect.top,g=r.bottom-e.rect.top,m=(v+g)/2,y=e.view.measure.heights,b=0;b=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(t,e,i){var n=s[e],r=1==n.level;return o(i?t-1:t,r!=i)}var d=vt(s,l,c),h=ft,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function Sn(t,e){var i=0;e=ge(t.doc,e),t.options.lineWrapping||(i=Rn(t.display)*e.ch);var n=ee(t.doc,e.line),r=ci(n)+Gi(t.display);return{left:i,right:i,top:r,bottom:r+n.height}}function kn(t,e,i,n,r){var a=ce(t,e,i);return a.xRel=r,n&&(a.outside=n),a}function An(t,e,i){var n=t.doc;if(i+=t.display.viewOffset,i<0)return kn(n.first,0,null,-1,-1);var r=oe(n,i),a=n.first+n.size-1;if(r>a)return kn(n.first+n.size-1,ee(n,a).text.length,null,1,1);e<0&&(e=0);for(var o=ee(n,r);;){var s=En(t,o,r,e,i),l=ti(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;o=ee(n,r=c.line)}}function Tn(t,e,i,n){n-=bn(e);var r=e.text.length,a=ht(function(e){return sn(t,i,e-1).bottom<=n},r,0);return r=ht(function(e){return sn(t,i,e).top>n},a,r),{begin:a,end:r}}function In(t,e,i,n){i||(i=on(t,e));var r=xn(t,e,sn(t,i,n),"line").top;return Tn(t,e,i,r)}function Mn(t,e,i,n){return!(t.bottom<=i)&&(t.top>i||(n?t.left:t.right)>e)}function En(t,e,i,n,r){r-=ci(e);var a=on(t,e),o=bn(e),s=0,l=e.text.length,c=!0,u=mt(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?Pn:Dn)(t,e,i,a,u,n,r);c=1!=d.level,s=c?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,v=null,g=ht(function(e){var i=sn(t,a,e);return i.top+=o,i.bottom+=o,!!Mn(i,n,r,!1)&&(i.top<=r&&i.left<=n&&(f=e,v=i),!0)},s,l),m=!1;if(v){var y=n-v.left=x.bottom?1:0}return g=dt(e.text,g,1),kn(i,g,p,m,n-h)}function Dn(t,e,i,n,r,a,o){var s=ht(function(s){var l=r[s],c=1!=l.level;return Mn(Cn(t,ce(i,c?l.to:l.from,c?"before":"after"),"line",e,n),a,o,!0)},0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=Cn(t,ce(i,c?l.from:l.to,c?"after":"before"),"line",e,n);Mn(u,a,o,!0)&&u.top>o&&(l=r[s-1])}return l}function Pn(t,e,i,n,r,a,o){var s=Tn(t,e,n,o),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||p.to<=l)){var f=1!=p.level,v=sn(t,n,f?Math.min(c,p.to)-1:Math.max(l,p.from)).right,g=vg)&&(u=p,d=g)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function Ln(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ln){ln=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ln.appendChild(document.createTextNode("x")),ln.appendChild(E("br"));ln.appendChild(document.createTextNode("x"))}M(t.measure,ln);var i=ln.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),I(t.measure),i||1}function Rn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),i=E("pre",[e],"CodeMirror-line-like");M(t.measure,i);var n=e.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Fn(t){for(var e=t.display,i={},n={},r=e.gutters.clientLeft,a=e.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=t.display.gutterSpecs[o].className;i[s]=a.offsetLeft+a.clientLeft+r,n[s]=a.clientWidth}return{fixedPos:Bn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function Bn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Nn(t){var e=Ln(t.display),i=t.options.lineWrapping,n=i&&Math.max(5,t.display.scroller.clientWidth/Rn(t.display)-3);return function(r){if(si(t.doc,r))return 0;var a=0;if(r.widgets)for(var o=0;o0&&(l=ee(t.doc,c.line).text).length==c.ch){var u=V(l,l.length,t.options.tabSize)-l.length;c=ce(c.line,Math.max(0,Math.round((a-qi(t.display).left)/Rn(t.display))-u))}return c}function Wn(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var i=t.display.view,n=0;ne)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Re&&ai(t.doc,e)r.viewFrom?Vn(t):(r.viewFrom+=n,r.viewTo+=n);else if(e<=r.viewFrom&&i>=r.viewTo)Vn(t);else if(e<=r.viewFrom){var a=Kn(t,i,i+n,1);a?(r.view=r.view.slice(a.index),r.viewFrom=a.lineN,r.viewTo+=n):Vn(t)}else if(i>=r.viewTo){var o=Kn(t,e,e,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Vn(t)}else{var s=Kn(t,e,e,-1),l=Kn(t,i,i+n,1);s&&l?(r.view=r.view.slice(0,s.index).concat(Ai(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):Vn(t)}var c=r.externalMeasured;c&&(i=r.lineN&&e=n.viewTo)){var a=n.view[Wn(t,e)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==Y(o,i)&&o.push(i)}}}function Vn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Kn(t,e,i,n){var r,a=Wn(t,e),o=t.display.view;if(!Re||i==t.doc.first+t.doc.size)return{index:a,lineN:i};for(var s=t.display.viewFrom,l=0;l0){if(a==o.length-1)return null;r=s+o[a].size-e,a++}else r=s-e;e+=r,i+=r}while(ai(t.doc,i)!=i){if(a==(n<0?0:o.length-1))return null;i+=n*o[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:i}}function Yn(t,e,i){var n=t.display,r=n.view;0==r.length||e>=n.viewTo||i<=n.viewFrom?(n.view=Ai(t,e,i),n.viewFrom=e):(n.viewFrom>e?n.view=Ai(t,e,n.viewFrom).concat(n.view):n.viewFromi&&(n.view=n.view.slice(0,Wn(t,i)))),n.viewTo=i}function Xn(t){for(var e=t.display.view,i=0,n=0;n=t.display.viewTo||l.to().line0?o:t.defaultCharWidth())+"px"}if(n.other){var s=i.appendChild(E("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function qn(t,e){return t.top-e.top||t.left-e.left}function Zn(t,e,i){var n=t.display,r=t.doc,a=document.createDocumentFragment(),o=qi(t.display),s=o.left,l=Math.max(n.sizerWidth,Ji(t)-n.sizer.offsetLeft)-o.right,c="ltr"==r.direction;function u(t,e,i,n){e<0&&(e=0),e=Math.round(e),n=Math.round(n),a.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==i?l-t:i)+"px;\n height: "+(n-e)+"px"))}function d(e,i,n){var a,o,d=ee(r,e),h=d.text.length;function p(i,n){return wn(t,ce(e,i),"div",d,n)}function f(e,i,n){var r=In(t,d,null,e),a="ltr"==i==("after"==n)?"left":"right",o="after"==n?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1);return p(o,a)[a]}var v=mt(d,r.direction);return pt(v,i||0,null==n?h:n,function(t,e,r,d){var g="ltr"==r,m=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==i&&0==t,x=null==n&&e==h,_=0==d,w=!v||d==v.length-1;if(y.top-m.top<=3){var C=(c?b:x)&&_,S=(c?x:b)&&w,k=C?s:(g?m:y).left,A=S?l:(g?y:m).right;u(k,m.top,A-k,m.bottom)}else{var T,I,M,E;g?(T=c&&b&&_?s:m.left,I=c?l:f(t,r,"before"),M=c?s:f(e,r,"after"),E=c&&x&&w?l:y.right):(T=c?f(t,r,"before"):s,I=!c&&b&&_?l:m.right,M=!c&&x&&w?s:y.left,E=c?f(e,r,"after"):l),u(T,m.top,I-T,m.bottom),m.bottom0?e.blinker=setInterval(function(){t.hasFocus()||ir(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Qn(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||er(t))}function tr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&ir(t))},100)}function er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(wt(t,"focus",t,e),t.state.focused=!0,R(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Jn(t))}function ir(t,e){t.state.delayingBlurEvent||(t.state.focused&&(wt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function nr(t){for(var e=t.display,i=e.lineDiv.offsetTop,n=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||v<-.005)&&(rt.display.sizerWidth){var m=Math.ceil(h/Rn(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=c.line,t.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(e.scroller.scrollTop+=a)}function rr(t){if(t.widgets)for(var e=0;e=o&&(a=oe(e,ci(ee(e,l))-t.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function or(t,e){if(!Ct(t,"scrollCursorIntoView")){var i=t.display,n=i.sizer.getBoundingClientRect(),r=null,a=i.wrapper.ownerDocument;if(e.top+n.top<0?r=!0:e.bottom+n.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(r=!1),null!=r&&!v){var o=E("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Gi(t.display))+"px;\n height: "+(e.bottom-e.top+Zi(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function sr(t,e,i,n){var r;null==n&&(n=0),t.options.lineWrapping||e!=i||(i="before"==e.sticky?ce(e.line,e.ch+1,"before"):e,e=e.ch?ce(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var a=0;a<5;a++){var o=!1,s=Cn(t,e),l=i&&i!=e?Cn(t,i):s;r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var c=cr(t,r),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(gr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(yr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return r}function lr(t,e){var i=cr(t,e);null!=i.scrollTop&&gr(t,i.scrollTop),null!=i.scrollLeft&&yr(t,i.scrollLeft)}function cr(t,e){var i=t.display,n=Ln(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,a=Qi(t),o={};e.bottom-e.top>a&&(e.bottom=e.top+a);var s=t.doc.height+ji(i),l=e.tops-n;if(e.topr+a){var u=Math.min(e.top,(c?s:e.bottom)-a);u!=r&&(o.scrollTop=u)}var d=t.options.fixedGutter?0:i.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft-d,p=Ji(t)-i.gutters.offsetWidth,f=e.right-e.left>p;return f&&(e.right=e.left+p),e.left<10?o.scrollLeft=0:e.leftp+h-3&&(o.scrollLeft=e.right+(f?0:10)-p),o}function ur(t,e){null!=e&&(fr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function dr(t){fr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function hr(t,e,i){null==e&&null==i||fr(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function pr(t,e){fr(t),t.curOp.scrollToPos=e}function fr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var i=Sn(t,e.from),n=Sn(t,e.to);vr(t,i,n,e.margin)}}function vr(t,e,i,n){var r=cr(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-n,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+n});hr(t,r.scrollLeft,r.scrollTop)}function gr(t,e){Math.abs(t.doc.scrollTop-e)<2||(i||Ur(t,{top:e}),mr(t,e,!0),i&&Ur(t),zr(t,100))}function mr(t,e,i){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function yr(t,e,i,n){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,Zr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function br(t){var e=t.display,i=e.gutters.offsetWidth,n=Math.round(t.doc.height+ji(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Zi(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var xr=function(t,e,i){this.cm=i;var n=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,t(n),t(r),bt(n,"scroll",function(){n.clientHeight&&e(n.scrollTop,"vertical")}),bt(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var r=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var a=t.viewWidth-t.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:e?n:0}},xr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var t=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},xr.prototype.enableZeroWidthBar=function(t,e,i){function n(){var r=t.getBoundingClientRect(),a="vert"==i?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);a!=t?t.style.visibility="hidden":e.set(1e3,n)}t.style.visibility="",e.set(1e3,n)},xr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var _r=function(){};function wr(t,e){e||(e=br(t));var i=t.display.barWidth,n=t.display.barHeight;Cr(t,e);for(var r=0;r<4&&i!=t.display.barWidth||n!=t.display.barHeight;r++)i!=t.display.barWidth&&t.options.lineWrapping&&nr(t),Cr(t,br(t)),i=t.display.barWidth,n=t.display.barHeight}function Cr(t,e){var i=t.display,n=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}_r.prototype.update=function(){return{bottom:0,right:0}},_r.prototype.setScrollLeft=function(){},_r.prototype.setScrollTop=function(){},_r.prototype.clear=function(){};var Sr={native:xr,null:_r};function kr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Sr[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),bt(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,i){"horizontal"==i?yr(t,e):gr(t,e)},t),t.display.scrollbars.addClass&&R(t.display.wrapper,t.display.scrollbars.addClass)}var Ar=0;function Tr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++Ar,markArrays:null},Ii(t.curOp)}function Ir(t){var e=t.curOp;e&&Ei(e,function(t){for(var e=0;e=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new $r(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Dr(t){t.updatedDisplay=t.mustUpdate&&Yr(t.cm,t.update)}function Pr(t){var e=t.cm,i=e.display;t.updatedDisplay&&nr(e),t.barMeasure=br(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=rn(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Zi(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-Ji(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function Lr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var i=+new Date+t.options.workTime,n=Ce(t,e.highlightFrontier),r=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),function(a){if(n.line>=t.display.viewFrom){var o=a.styles,s=a.text.length>t.options.maxHighlightLength?Zt(e.mode,n.state):null,l=_e(t,a,n,!0);s&&(n.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hi)return zr(t,t.options.workDelay),!0}),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),r.length&&Fr(t,function(){for(var e=0;e=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==Xn(t))return!1;Jr(t)&&(Vn(t),e.dims=Fn(t));var r=n.first+n.size,a=Math.max(e.visible.from-t.options.viewportMargin,n.first),o=Math.min(r,e.visible.to+t.options.viewportMargin);i.viewFromo&&i.viewTo-o<20&&(o=Math.min(r,i.viewTo)),Re&&(a=ai(t.doc,a),o=oi(t.doc,o));var s=a!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;Yn(t,a,o),i.viewOffset=ci(ee(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var l=Xn(t);if(!s&&0==l&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var c=Vr(t);return l>4&&(i.lineDiv.style.display="none"),Gr(t,i.updateLineNumbers,e.dims),l>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Kr(c),I(i.cursorDiv),I(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,s&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,zr(t,400)),i.updateLineNumbers=null,!0}function Xr(t,e){for(var i=e.viewport,n=!0;;n=!1){if(n&&t.options.lineWrapping&&e.oldDisplayWidth!=Ji(t))n&&(e.visible=ar(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+ji(t.display)-Qi(t),i.top)}),e.visible=ar(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Yr(t,e))break;nr(t);var r=br(t);Un(t),wr(t,r),qr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Ur(t,e){var i=new $r(t,e);if(Yr(t,i)){nr(t),Xr(t,i);var n=br(t);Un(t),wr(t,n),qr(t,n),i.finish()}}function Gr(t,e,i){var n=t.display,r=t.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(e){var i=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var c=n.view,u=n.viewFrom,d=0;d-1&&(p=!1),Ri(t,h,u,i)),p&&(I(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(le(t.options,u)))),o=h.node.nextSibling}else{var f=Hi(t,h,u,i);a.insertBefore(f,o)}u+=h.size}while(o)o=s(o)}function jr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",Pi(t,"gutterChanged",t)}function qr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Zi(t)+"px"}function Zr(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=Bn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,a=n+"px",o=0;o=105&&(a.wrapper.style.clipPath="inset(0px)"),a.wrapper.setAttribute("translate","no"),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),l||i&&y||(a.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(a.wrapper):t(a.wrapper)),a.viewFrom=a.viewTo=e.first,a.reportedViewFrom=a.reportedViewTo=e.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=Qr(r.gutters,r.lineNumbers),ta(a),n.init(a)}$r.prototype.signal=function(t,e){kt(t,e)&&this.events.push(arguments)},$r.prototype.finish=function(){for(var t=0;tc.clientWidth,f=c.scrollHeight>c.clientHeight;if(r&&p||a&&f){if(a&&b&&l)t:for(var v=e.target,g=s.view;v!=c;v=v.parentNode)for(var m=0;m=0&&ue(t,n.to())<=0)return i}return-1};var ca=function(t,e){this.anchor=t,this.head=e};function ua(t,e,i){var n=t&&t.options.selectionsMayTouch,r=e[i];e.sort(function(t,e){return ue(t.from(),e.from())}),i=Y(e,r);for(var a=1;a0:l>=0){var c=fe(s.from(),o.from()),u=pe(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=i&&--i,e.splice(--a,2,new ca(d?u:c,d?c:u))}}return new la(e,i)}function da(t,e){return new la([new ca(t,e||t)],0)}function ha(t){return t.text?ce(t.from.line+t.text.length-1,tt(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function pa(t,e){if(ue(t,e.from)<0)return t;if(ue(t,e.to)<=0)return ha(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=ha(e).ch-e.to.ch),ce(i,n)}function fa(t,e){for(var i=[],n=0;n1&&t.remove(s.line+1,f-1),t.insert(s.line+1,m)}Pi(t,"change",t,e)}function _a(t,e,i){function n(t,r,a){if(t.linked)for(var o=0;o1&&!t.done[t.done.length-2].ranges?(t.done.pop(),tt(t.done)):void 0}function Ma(t,e,i,n){var r=t.history;r.undone.length=0;var a,o,s=+new Date;if((r.lastOp==n||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=Ia(r,r.lastOp==n)))o=tt(a.changes),0==ue(e.from,e.to)&&0==ue(e.from,o.to)?o.to=ha(e):a.changes.push(Aa(t,e));else{var l=tt(r.done);l&&l.ranges||Pa(t.sel,r.done),a={changes:[Aa(t,e)],generation:r.generation},r.done.push(a);while(r.done.length>r.undoDepth)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=e.origin,o||wt(t,"historyAdded")}function Ea(t,e,i,n){var r=e.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Da(t,e,i,n){var r=t.history,a=n&&n.origin;i==r.lastSelOp||a&&r.lastSelOrigin==a&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==a||Ea(t,a,tt(r.done),e))?r.done[r.done.length-1]=e:Pa(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=a,r.lastSelOp=i,n&&!1!==n.clearRedo&&Ta(r.undone)}function Pa(t,e){var i=tt(e);i&&i.ranges&&i.equals(t)||e.push(t)}function La(t,e,i,n){var r=e["spans_"+t.id],a=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,n),function(i){i.markedSpans&&((r||(r=e["spans_"+t.id]={}))[a]=i.markedSpans),++a})}function Ra(t){if(!t)return null;for(var e,i=0;i-1&&(tt(s)[d]=c[d],delete c[d])}}}return n}function Oa(t,e,i,n){if(n){var r=t.anchor;if(i){var a=ue(e,r)<0;a!=ue(i,r)<0?(r=e,e=i):a!=ue(e,i)<0&&(e=i)}return new ca(r,e)}return new ca(i||e,e)}function za(t,e,i,n,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Ya(t,new la([Oa(t.sel.primary(),e,i,r)],0),n)}function Wa(t,e,i){for(var n=[],r=t.cm&&(t.cm.display.shift||t.extend),a=0;a=e.ch:s.to>e.ch))){if(r&&(wt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(i){var d=l.find(n<0?1:-1),h=void 0;if((n<0?u:c)&&(d=Ja(t,d,-n,d&&d.line==e.line?a:null)),d&&d.line==e.line&&(h=ue(d,i))&&(n<0?h<0:h>0))return qa(t,d,e,n,r)}var p=l.find(n<0?-1:1);return(n<0?c:u)&&(p=Ja(t,p,n,p.line==e.line?a:null)),p?qa(t,p,e,n,r):null}}return e}function Za(t,e,i,n,r){var a=n||1,o=qa(t,e,i,a,r)||!r&&qa(t,e,i,a,!0)||qa(t,e,i,-a,r)||!r&&qa(t,e,i,-a,!0);return o||(t.cantEdit=!0,ce(t.first,0))}function Ja(t,e,i,n){return i<0&&0==e.ch?e.line>t.first?ge(t,ce(e.line-1)):null:i>0&&e.ch==(n||ee(t,e.line)).text.length?e.line=0;--r)io(t,{from:n[r].from,to:n[r].to,text:r?[""]:e.text,origin:e.origin});else io(t,e)}}function io(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ue(e.from,e.to)){var i=fa(t,e);Ma(t,e,i,t.cm?t.cm.curOp.id:NaN),ao(t,e,i,Ve(t,e));var n=[];_a(t,function(t,i){i||-1!=Y(n,t.history)||(uo(t.history,e),n.push(t.history)),ao(t,e,null,Ve(t,e))})}}function no(t,e,i){var n=t.cm&&t.cm.state.suppressEdits;if(!n||i){for(var r,a=t.history,o=t.sel,s="undo"==e?a.done:a.undone,l="undo"==e?a.undone:a.done,c=0;c=0;--p){var f=h(p);if(f)return f.v}}}}function ro(t,e){if(0!=e&&(t.first+=e,t.sel=new la(et(t.sel.ranges,function(t){return new ca(ce(t.anchor.line+e,t.anchor.ch),ce(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){$n(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,n=i.viewFrom;nt.lastLine())){if(e.from.linea&&(e={from:e.from,to:ce(a,ee(t,a).text.length),text:[e.text[0]],origin:e.origin}),e.removed=ie(t,e.from,e.to),i||(i=fa(t,e)),t.cm?oo(t.cm,e,n):xa(t,e,n),Xa(t,i,G),t.cantEdit&&Za(t,ce(t.firstLine(),0))&&(t.cantEdit=!1)}}function oo(t,e,i){var n=t.doc,r=t.display,a=e.from,o=e.to,s=!1,l=a.line;t.options.lineWrapping||(l=ae(ii(ee(n,a.line))),n.iter(l,o.line+1,function(t){if(t==r.maxLine)return s=!0,!0})),n.sel.contains(e.from,e.to)>-1&&St(t),xa(n,e,i,Nn(t)),t.options.lineWrapping||(n.iter(l,a.line+e.text.length,function(t){var e=ui(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),Pe(n,a.line),zr(t,400);var c=e.text.length-(o.line-a.line)-1;e.full?$n(t):a.line!=o.line||1!=e.text.length||ba(t.doc,e)?$n(t,a.line,o.line+1,c):Hn(t,a.line,"text");var u=kt(t,"changes"),d=kt(t,"change");if(d||u){var h={from:a,to:o,text:e.text,removed:e.removed,origin:e.origin};d&&Pi(t,"change",t,h),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}function so(t,e,i,n,r){var a;n||(n=i),ue(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),"string"==typeof e&&(e=t.splitLines(e)),eo(t,{from:i,to:n,text:e,origin:r})}function lo(t,e,i,n){i1||!(this.children[0]instanceof po))){var s=[];this.collapse(s),this.children=[new po(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=r.lines.length%25+25,s=o;s10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var n=0;n0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=D("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ei(t,e.line,e,i,a)||e.line!=i.line&&ei(t,i.line,e,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Be()}a.addToHistory&&Ma(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,i.line+1,function(n){c&&a.collapsed&&!c.options.lineWrapping&&ii(n)==c.display.maxLine&&(s=!0),a.collapsed&&l!=e.line&&re(n,0),We(n,new Ne(a,l==e.line?e.ch:null,l==i.line?i.ch:null),t.cm&&t.cm.curOp),++l}),a.collapsed&&t.iter(e.line,i.line+1,function(e){si(t,e)&&re(e,0)}),a.clearOnEnter&&bt(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Fe(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++yo,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)$n(c,e.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=i.line;u++)Hn(c,u,"text");a.atomic&&Ga(c.doc),Pi(c,"markerAdded",c,a)}return a}bo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Tr(t),kt(this,"clear")){var i=this.find();i&&Pi(this,"clear",i.from,i.to)}for(var n=null,r=null,a=0;at.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=n&&t&&this.collapsed&&$n(t,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ga(t.doc)),t&&Pi(t,"markerCleared",t,this,n,r),e&&Ir(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(t,e){var i,n;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)eo(this,n[l]);s?Ka(this,s):this.cm&&dr(this.cm)}),undo:Or(function(){no(this,"undo")}),redo:Or(function(){no(this,"redo")}),undoSelection:Or(function(){no(this,"undo",!0)}),redoSelection:Or(function(){no(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,n=0;n=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,i){t=ge(this,t),e=ge(this,e);var n=[],r=t.line;return this.iter(t.line,e.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r}),n},getAllMarks:function(){var t=[];return this.iter(function(e){var i=e.markedSpans;if(i)for(var n=0;nt)return e=t,!0;t-=a,++i}),ge(this,ce(i,e))},indexFromPos:function(t){t=ge(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var d=t.dataTransfer.getData("Text");if(d){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Xa(e.doc,da(i,i)),h)for(var p=0;p=0;e--)so(t.doc,"",n[e].from,n[e].to,"+delete");dr(t)})}function Zo(t,e,i){var n=dt(t.text,e+i,i);return n<0||n>t.text.length?null:n}function Jo(t,e,i){var n=Zo(t,e.ch,i);return null==n?null:new ce(e.line,n,i<0?"after":"before")}function Qo(t,e,i,n,r){if(t){"rtl"==e.doc.direction&&(r=-r);var a=mt(i,e.doc.direction);if(a){var o,s=r<0?tt(a):a[0],l=r<0==(1==s.level),c=l?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var u=on(e,i);o=r<0?i.text.length-1:0;var d=sn(e,u,o).top;o=ht(function(t){return sn(e,u,t).top==d},r<0==(1==s.level)?s.from:s.to-1,o),"before"==c&&(o=Zo(i,o,1))}else o=r<0?s.to:s.from;return new ce(n,o,c)}}return new ce(n,r<0?i.text.length:0,r<0?"before":"after")}function ts(t,e,i,n){var r=mt(e,t.doc.direction);if(!r)return Jo(e,i,n);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=vt(r,i.ch,i.sticky),o=r[a];if("ltr"==t.doc.direction&&o.level%2==0&&(n>0?o.to>i.ch:o.from=o.from&&h>=u.begin)){var p=d?"before":"after";return new ce(i.line,h,p)}}var f=function(t,e,n){for(var a=function(t,e){return e?new ce(i.line,l(t,1),"before"):new ce(i.line,t,"after")};t>=0&&t0==(1!=o.level),c=s?n.begin:l(n.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||n>0&&g==e.text.length||(v=f(n>0?0:r.length-1,n,c(g)),!v)?null:v}Ho.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"},Ho.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"},Ho.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"},Ho.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"]},Ho["default"]=b?Ho.macDefault:Ho.pcDefault;var es={selectAll:Qa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return qo(t,function(e){if(e.empty()){var i=ee(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line0)r=new ce(r.line,r.ch+1),t.replaceRange(a.charAt(r.ch-1)+a.charAt(r.ch-2),ce(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var o=ee(t.doc,r.line-1).text;o&&(r=new ce(r.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ce(r.line-1,o.length-1),r,"+transpose"))}i.push(new ca(r,r))}t.setSelections(i)})},newlineAndIndent:function(t){return Fr(t,function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var n=0;n-1&&(ue((r=s.ranges[r]).from(),e)<0||e.xRel>0)&&(ue(r.to(),e)>0||e.xRel<0)?As(t,n,e,a):Is(t,n,e,a)}function As(t,e,i,n){var r=t.display,a=!1,c=Br(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:tr(t)),_t(r.wrapper.ownerDocument,"mouseup",c),_t(r.wrapper.ownerDocument,"mousemove",u),_t(r.scroller,"dragstart",d),_t(r.scroller,"drop",c),a||(Tt(e),n.addNew||za(t.doc,i,null,null,n.extend),l&&!p||o&&9==s?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return a=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!n.moveOnDrag,bt(r.wrapper.ownerDocument,"mouseup",c),bt(r.wrapper.ownerDocument,"mousemove",u),bt(r.scroller,"dragstart",d),bt(r.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout(function(){return r.input.focus()},20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Ts(t,e,i){if("char"==i)return new ca(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new ca(ce(e.line,0),ge(t.doc,ce(e.line+1,0)));var n=i(t,e);return new ca(n.from,n.to)}function Is(t,e,i,n){o&&tr(t);var r=t.display,a=t.doc;Tt(e);var s,l,c=a.sel,u=c.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(i),s=l>-1?u[l]:new ca(i,i)):(s=a.sel.primary(),l=a.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new ca(i,i)),i=zn(t,e,!0,!0),l=-1;else{var d=Ts(t,i,n.unit);s=n.extend?Oa(s,d.anchor,d.head,n.extend):d}n.addNew?-1==l?(l=u.length,Ya(a,ua(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==n.unit&&!n.extend?(Ya(a,ua(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):$a(a,l,s,j):(l=0,Ya(a,new la([s],0),j),c=a.sel);var h=i;function p(e){if(0!=ue(h,e))if(h=e,"rectangle"==n.unit){for(var r=[],o=t.options.tabSize,u=V(ee(a,i.line).text,i.ch,o),d=V(ee(a,e.line).text,e.ch,o),p=Math.min(u,d),f=Math.max(u,d),v=Math.min(i.line,e.line),g=Math.min(t.lastLine(),Math.max(i.line,e.line));v<=g;v++){var m=ee(a,v).text,y=Z(m,p,o);p==f?r.push(new ca(ce(v,y),ce(v,y))):m.length>y&&r.push(new ca(ce(v,y),ce(v,Z(m,f,o))))}r.length||r.push(new ca(i,i)),Ya(a,ua(t,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,_=Ts(t,e,n.unit),w=x.anchor;ue(_.anchor,w)>0?(b=_.head,w=fe(x.from(),_.anchor)):(b=_.anchor,w=pe(x.to(),_.head));var C=c.ranges.slice(0);C[l]=Ms(t,new ca(ge(a,w),b)),Ya(a,ua(t,C,l),j)}}var f=r.wrapper.getBoundingClientRect(),v=0;function g(e){var i=++v,o=zn(t,e,!0,"rectangle"==n.unit);if(o)if(0!=ue(o,h)){t.curOp.focus=L(O(t)),p(o);var s=ar(r,a);(o.line>=s.to||o.linef.bottom?20:0;l&&setTimeout(Br(t,function(){v==i&&(r.scroller.scrollTop+=l,g(e))}),50)}}function m(e){t.state.selectingText=!1,v=1/0,e&&(Tt(e),r.input.focus()),_t(r.wrapper.ownerDocument,"mousemove",y),_t(r.wrapper.ownerDocument,"mouseup",b),a.history.lastSelOrigin=null}var y=Br(t,function(t){0!==t.buttons&&Pt(t)?g(t):m(t)}),b=Br(t,m);t.state.selectingText=b,bt(r.wrapper.ownerDocument,"mousemove",y),bt(r.wrapper.ownerDocument,"mouseup",b)}function Ms(t,e){var i=e.anchor,n=e.head,r=ee(t.doc,i.line);if(0==ue(i,n)&&i.sticky==n.sticky)return e;var a=mt(r);if(!a)return e;var o=vt(a,i.ch,i.sticky),s=a[o];if(s.from!=i.ch&&s.to!=i.ch)return e;var l,c=o+(s.from==i.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return e;if(n.line!=i.line)l=(n.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=vt(a,n.ch,n.sticky),d=u-o||(n.ch-i.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=a[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,v=p?"after":"before";return i.ch==f&&i.sticky==v?e:new ca(new ce(i.line,f,v),n)}function Es(t,e,i,n){var r,a;if(e.touches)r=e.touches[0].clientX,a=e.touches[0].clientY;else try{r=e.clientX,a=e.clientY}catch(h){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&Tt(e);var o=t.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!kt(t,i))return Mt(e);a-=s.top-o.viewOffset;for(var l=0;l=r){var u=oe(t.doc,a),d=t.display.gutterSpecs[l];return wt(t,i,t,u,d.className,e),Mt(e)}}}function Ds(t,e){return Es(t,e,"gutterClick",!0)}function Ps(t,e){Ui(t.display,e)||Ls(t,e)||Ct(t,e,"contextmenu")||S||t.display.input.onContextMenu(e)}function Ls(t,e){return!!kt(t,"gutterContextMenu")&&Es(t,e,"gutterContextMenu",!1)}function Rs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(t)}xs.prototype.compare=function(t,e,i){return this.time+bs>t&&0==ue(e,this.pos)&&i==this.button};var Fs={toString:function(){return"CodeMirror.Init"}},Bs={},Ns={};function Os(t){var e=t.optionHandlers;function i(i,n,r,a){t.defaults[i]=n,r&&(e[i]=a?function(t,e,i){i!=Fs&&r(t,e,i)}:r)}t.defineOption=i,t.Init=Fs,i("value","",function(t,e){return t.setValue(e)},!0),i("mode",null,function(t,e){t.doc.modeOption=e,ma(t)},!0),i("indentUnit",2,ma,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(t){ya(t),gn(t),$n(t)},!0),i("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var i=[],n=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var a=t.text.indexOf(e,r);if(-1==a)break;r=a+e.length,i.push(ce(n,a))}n++});for(var r=i.length-1;r>=0;r--)so(t.doc,e,i[r],ce(i[r].line,i[r].ch+e.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=Fs&&t.refresh()}),i("specialCharPlaceholder",bi,function(t){return t.refresh()},!0),i("electricChars",!0),i("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),i("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),i("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),i("rtlMoveVisually",!_),i("wholeLineUpdateBefore",!0),i("theme","default",function(t){Rs(t),ea(t)},!0),i("keyMap","default",function(t,e,i){var n=jo(e),r=i!=Fs&&jo(i);r&&r.detach&&r.detach(t,n),n.attach&&n.attach(t,r||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Ws,!0),i("gutters",[],function(t,e){t.display.gutterSpecs=Qr(e,t.options.lineNumbers),ea(t)},!0),i("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Bn(t.display)+"px":"0",t.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(t){return wr(t)},!0),i("scrollbarStyle","native",function(t){kr(t),wr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),i("lineNumbers",!1,function(t,e){t.display.gutterSpecs=Qr(t.options.gutters,e),ea(t)},!0),i("firstLineNumber",1,ea,!0),i("lineNumberFormatter",function(t){return t},ea,!0),i("showCursorWhenSelecting",!1,Un,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(t,e){"nocursor"==e&&(ir(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),i("screenReaderLabel",null,function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)}),i("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),i("dragDrop",!0,zs),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Un,!0),i("singleCursorHeightPerLine",!0,Un,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,ya,!0),i("addModeClass",!1,ya,!0),i("pollInterval",100),i("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),i("historyEventDelay",1250),i("viewportMargin",10,function(t){return t.refresh()},!0),i("maxHighlightLength",1e4,ya,!0),i("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),i("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),i("autofocus",null),i("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),i("phrases",null)}function zs(t,e,i){var n=i&&i!=Fs;if(!e!=!n){var r=t.display.dragFunctions,a=e?bt:_t;a(t.display.scroller,"dragstart",r.start),a(t.display.scroller,"dragenter",r.enter),a(t.display.scroller,"dragover",r.over),a(t.display.scroller,"dragleave",r.leave),a(t.display.scroller,"drop",r.drop)}}function Ws(t){t.options.lineWrapping?(R(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),di(t)),On(t),$n(t),gn(t),setTimeout(function(){return wr(t)},100)}function $s(t,e){var i=this;if(!(this instanceof $s))return new $s(t,e);this.options=e=e?H(e):{},H(Bs,e,!1);var n=e.value;"string"==typeof n?n=new To(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var r=new $s.inputStyles[e.inputStyle](this),a=this.display=new ia(t,n,r,e);for(var c in a.wrapper.CodeMirror=this,Rs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),kr(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 K,keySeq:null,specialChars:null},e.autofocus&&!y&&a.input.focus(),o&&s<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Hs(this),Fo(),Tr(this),this.curOp.forceUpdate=!0,wa(this,n),e.autofocus&&!y||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&er(i)},20):ir(this),Ns)Ns.hasOwnProperty(c)&&Ns[c](this,e[c],Fs);Jr(this),e.finishInit&&e.finishInit(this);for(var u=0;u400}bt(e.scroller,"touchstart",function(r){if(!Ct(t,r)&&!a(r)&&!Ds(t,r)){e.input.ensurePolled(),clearTimeout(i);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),bt(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),bt(e.scroller,"touchend",function(i){var n=e.activeTouch;if(n&&!Ui(e,i)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,o=t.coordsChar(e.activeTouch,"page");a=!n.prev||l(n,n.prev)?new ca(o,o):!n.prev.prev||l(n,n.prev.prev)?t.findWordAt(o):new ca(ce(o.line,0),ge(t.doc,ce(o.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Tt(i)}r()}),bt(e.scroller,"touchcancel",r),bt(e.scroller,"scroll",function(){e.scroller.clientHeight&&(gr(t,e.scroller.scrollTop),yr(t,e.scroller.scrollLeft,!0),wt(t,"scroll",t))}),bt(e.scroller,"mousewheel",function(e){return sa(t,e)}),bt(e.scroller,"DOMMouseScroll",function(e){return sa(t,e)}),bt(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){Ct(t,e)||Et(e)},over:function(e){Ct(t,e)||(Do(t,e),Et(e))},start:function(e){return Eo(t,e)},drop:Br(t,Mo),leave:function(e){Ct(t,e)||Po(t)}};var c=e.input.getField();bt(c,"keyup",function(e){return vs.call(t,e)}),bt(c,"keydown",Br(t,ps)),bt(c,"keypress",Br(t,gs)),bt(c,"focus",function(e){return er(t,e)}),bt(c,"blur",function(e){return ir(t,e)})}$s.defaults=Bs,$s.optionHandlers=Ns;var Vs=[];function Ks(t,e,i,n){var r,a=t.doc;null==i&&(i="add"),"smart"==i&&(a.mode.indent?r=Ce(t,e).state:i="prev");var o=t.options.tabSize,s=ee(a,e),l=V(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==i&&(c=a.mode.indent(r,s.text.slice(u.length),s.text),c==U||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>a.first?V(ee(a,e-1).text,null,o):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)h+=o,d+="\t";if(ho,l=Ot(e),c=null;if(s&&n.ranges.length>1)if(Ys&&Ys.text.join("\n")==e){if(n.ranges.length%Ys.text.length==0){c=[];for(var u=0;u=0;h--){var p=n.ranges[h],f=p.from(),v=p.to();p.empty()&&(i&&i>0?f=ce(f.line,f.ch-i):t.state.overwrite&&!s?v=ce(v.line,Math.min(ee(a,v.line).text.length,v.ch+tt(l).length)):s&&Ys&&Ys.lineWise&&Ys.text.join("\n")==l.join("\n")&&(f=v=ce(f.line,0)));var g={from:f,to:v,text:c?c[h%c.length]:l,origin:r||(s?"paste":t.state.cutIncoming>o?"cut":"+input")};eo(t.doc,g),Pi(t,"inputRead",t,g)}e&&!s&&js(t,e),dr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Gs(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||Fr(e,function(){return Us(e,i,0,null,"paste")}),!0}function js(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var a=t.getModeAt(r.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Ks(t,r.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(ee(t.doc,r.head.line).text.slice(0,r.head.ch))&&(o=Ks(t,r.head.line,"smart"));o&&Pi(t,"electricInput",t,r.head.line)}}}function qs(t){for(var e=[],i=[],n=0;ni&&(Ks(this,r.head.line,t,!0),i=r.head.line,n==this.doc.sel.primIndex&&dr(this));else{var a=r.from(),o=r.to(),s=Math.max(i,a.line);i=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$a(this.doc,n,new ca(a,c[n].to()),G)}}}),getTokenAt:function(t,e){return Ie(this,t,e)},getLineTokens:function(t,e){return Ie(this,ce(t),e,!0)},getTokenTypeAt:function(t){t=ge(this.doc,t);var e,i=we(this,ee(this.doc,t.line)),n=0,r=(i.length-1)/2,a=t.ch;if(0==a)e=i[2];else for(;;){var o=n+r>>1;if((o?i[2*o-1]:0)>=a)r=o;else{if(!(i[2*o+1]a&&(t=a,r=!0),n=ee(this.doc,t)}else n=t;return xn(this,n,{top:0,left:0},e||"page",i||r).top+(r?this.doc.height-ci(n):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,n,r){var a=this.display;t=Cn(this,ge(this.doc,t));var o=t.bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),a.sizer.appendChild(e),"over"==n)o=t.top;else if("above"==n||"near"==n){var l=Math.max(a.wrapper.clientHeight,this.doc.height),c=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(o=t.bottom),s+e.offsetWidth>c&&(s=c-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==r?(s=a.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(a.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),i&&lr(this,{left:s,top:o,right:s+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:Nr(ps),triggerOnKeyPress:Nr(gs),triggerOnKeyUp:vs,triggerOnMouseDown:Nr(ws),execCommand:function(t){if(es.hasOwnProperty(t))return es[t].call(null,this)},triggerElectric:Nr(function(t){js(this,t)}),findPosH:function(t,e,i,n){var r=1;e<0&&(r=-1,e=-e);for(var a=ge(this.doc,t),o=0;o0&&s(i.charAt(n-1)))--n;while(r.5||this.options.lineWrapping)&&On(this),wt(this,"refresh",this)}),swapDoc:Nr(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,t),gn(this),this.display.input.reset(),hr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Pi(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},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}},At(t),t.registerHelper=function(e,n,r){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][n]=r},t.registerGlobalHelper=function(e,n,r,a){t.registerHelper(e,n,a),i[e]._global.push({pred:r,val:a})}}function tl(t,e,i,n,r){var a=e,o=i,s=ee(t,e.line),l=r&&"rtl"==t.direction?-i:i;function c(){var i=e.line+l;return!(i=t.first+t.size)&&(e=new ce(i,e.ch,e.sticky),s=ee(t,i))}function u(a){var o;if("codepoint"==n){var u=s.text.charCodeAt(e.ch+(i>0?0:-1));if(isNaN(u))o=null;else{var d=i>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new ce(e.line,Math.max(0,Math.min(s.text.length,e.ch+i*(d?2:1))),-i)}}else o=r?ts(t.cm,s,e,i):Jo(s,e,i);if(null==o){if(a||!c())return!1;e=Qo(r,t.cm,s,e.line,l)}else e=o;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,p=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;;f=!1){if(i<0&&!u(!f))break;var v=s.text.charAt(e.ch)||"\n",g=st(v,p)?"w":h&&"\n"==v?"n":!h||/\s/.test(v)?null:"p";if(!h||f||g||(g="s"),d&&d!=g){i<0&&(i=1,u(),e.sticky="after");break}if(g&&(d=g),i>0&&!u(!f))break}var m=Za(t,e,a,o,!0);return de(a,m)&&(m.hitSide=!0),m}function el(t,e,i,n){var r,a,o=t.doc,s=e.left;if("page"==n){var l=Math.min(t.display.wrapper.clientHeight,W(t).innerHeight||o(t).documentElement.clientHeight),c=Math.max(l-.5*Ln(t.display),3);r=(i>0?e.bottom:e.top)+i*c}else"line"==n&&(r=i>0?e.bottom+3:e.top-3);for(;;){if(a=An(t,s,r),!a.outside)break;if(i<0?r<=0:r>=o.height){a.hitSide=!0;break}r+=5*i}return a}var il=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function nl(t,e){var i=an(t,e.line);if(!i||i.hidden)return null;var n=ee(t.doc,e.line),r=en(i,n,e.line),a=mt(n,t.doc.direction),o="left";if(a){var s=vt(a,e.ch);o=s%2?"right":"left"}var l=un(r.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function rl(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function al(t,e){return e&&(t.bad=!0),t}function ol(t,e,i,n,r){var a="",o=!1,s=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function u(){o&&(a+=s,l&&(a+=s),o=l=!1)}function d(t){t&&(u(),a+=t)}function h(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void d(i);var a,p=e.getAttribute("cm-marker");if(p){var f=t.findMarks(ce(n,0),ce(r+1,0),c(+p));return void(f.length&&(a=f[0].find(0))&&d(ie(t.doc,a.from,a.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var v=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;v&&u();for(var g=0;g=e.display.viewTo||a.line=e.display.viewFrom&&nl(e,r)||{node:l[0].measure.map[2],offset:0},u=a.linen.firstLine()&&(o=ce(o.line-1,ee(n.doc,o.line-1).length)),s.ch==ee(n.doc,s.line).text.length&&s.liner.viewTo-1)return!1;o.line==r.viewFrom||0==(t=Wn(n,o.line))?(e=ae(r.view[0].line),i=r.view[0].node):(e=ae(r.view[t].line),i=r.view[t-1].node.nextSibling);var l,c,u=Wn(n,s.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ae(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!i)return!1;var d=n.doc.splitLines(ol(n,i,c,e,l)),h=ie(n.doc,ce(e,0),ce(l,ee(n.doc,l).text.length));while(d.length>1&&h.length>1)if(tt(d)==tt(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}var p=0,f=0,v=d[0],g=h[0],m=Math.min(v.length,g.length);while(po.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1))p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var _=ce(e,p),w=ce(l,h.length?tt(h).length-f:0);return d.length>1||d[0]||ue(_,w)?(so(n.doc,d,_,w,"+input"),!0):void 0},il.prototype.ensurePolled=function(){this.forceCompositionEnd()},il.prototype.reset=function(){this.forceCompositionEnd()},il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},il.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},il.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Fr(this.cm,function(){return $n(t.cm)})},il.prototype.setUneditable=function(t){t.contentEditable="false"},il.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Br(this.cm,Us)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},il.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},il.prototype.onContextMenu=function(){},il.prototype.resetPosition=function(){},il.prototype.needsContentAttribute=!0;var cl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ul(t,e){if(e=e?H(e):{},e.value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=L(z(t));e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function n(){t.value=s.getValue()}var r;if(t.form&&(bt(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var a=t.form;r=a.submit;try{var o=a.submit=function(){n(),a.submit=r,a.submit(),a.submit=o}}catch(l){}}e.finishInit=function(i){i.save=n,i.getTextArea=function(){return t},i.toTextArea=function(){i.toTextArea=isNaN,n(),t.parentNode.removeChild(i.getWrapperElement()),t.style.display="",t.form&&(_t(t.form,"submit",n),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var s=$s(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s}function dl(t){t.off=_t,t.on=bt,t.wheelEventPixels=oa,t.Doc=To,t.splitLines=Ot,t.countColumn=V,t.findColumn=Z,t.isWordChar=ot,t.Pass=U,t.signal=wt,t.Line=hi,t.changeEnd=ha,t.scrollbarModel=Sr,t.Pos=ce,t.cmpPos=ue,t.modes=Vt,t.mimeModes=Kt,t.resolveMode=Ut,t.getMode=Gt,t.modeExtensions=jt,t.extendMode=qt,t.copyState=Zt,t.startState=Qt,t.innerMode=Jt,t.commands=es,t.keyMap=Ho,t.keyName=Go,t.isModifierKey=Xo,t.lookupKey=Yo,t.normalizeKeyMap=Ko,t.StringStream=te,t.SharedTextMarker=_o,t.TextMarker=bo,t.LineWidget=vo,t.e_preventDefault=Tt,t.e_stopPropagation=It,t.e_stop=Et,t.addClass=R,t.contains=P,t.rmClass=T,t.keyNames=Oo}cl.prototype.init=function(t){var e=this,i=this,n=this.cm;this.createField(t);var r=this.textarea;function a(t){if(!Ct(n,t)){if(n.somethingSelected())Xs({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var e=qs(n);Xs({lineWise:!0,text:e.text}),"cut"==t.type?n.setSelections(e.ranges,null,G):(i.prevInput="",r.value=e.text.join("\n"),B(r))}"cut"==t.type&&(n.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),bt(r,"input",function(){o&&s>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()}),bt(r,"paste",function(t){Ct(n,t)||Gs(t,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())}),bt(r,"cut",a),bt(r,"copy",a),bt(t.scroller,"paste",function(e){if(!Ui(t,e)&&!Ct(n,e)){if(!r.dispatchEvent)return n.state.pasteIncoming=+new Date,void i.focus();var a=new Event("paste");a.clipboardData=e.clipboardData,r.dispatchEvent(a)}}),bt(t.lineSpace,"selectstart",function(e){Ui(t,e)||Tt(e)}),bt(r,"compositionstart",function(){var t=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:n.markText(t,n.getCursor("to"),{className:"CodeMirror-composing"})}}),bt(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},cl.prototype.createField=function(t){this.wrapper=Js(),this.textarea=this.wrapper.firstChild;var e=this.cm.options;Zs(this.textarea,e.spellcheck,e.autocorrect,e.autocapitalize)},cl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},cl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,n=Gn(t);if(t.options.moveInputWithCursor){var r=Cn(t,i.sel.primary().head,"div"),a=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+o.left-a.left))}return n},cl.prototype.showSelection=function(t){var e=this.cm,i=e.display;M(i.cursorDiv,t.cursors),M(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},cl.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var e=this.cm;if(this.resetting=!0,e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&B(this.textarea),o&&s>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},cl.prototype.getField=function(){return this.textarea},cl.prototype.supportsTouch=function(){return!1},cl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||L(z(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(t){}},cl.prototype.blur=function(){this.textarea.blur()},cl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cl.prototype.receivedFocus=function(){this.slowPoll()},cl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},cl.prototype.fastPoll=function(){var t=!1,e=this;function i(){var n=e.poll();n||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,i))}e.pollingFast=!0,e.polling.set(20,i)},cl.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!e.state.focused||zt(i)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=i.value;if(r==n&&!e.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===r||b&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=r.charCodeAt(0);if(8203!=a||n||(n="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}var l=0,c=Math.min(n.length,r.length);while(l1e3||r.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},cl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cl.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},cl.prototype.onContextMenu=function(t){var e=this,i=e.cm,n=i.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=zn(i,t),c=n.scroller.scrollTop;if(a&&!h){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(a)&&Br(i,Ya)(i.doc,da(a),G);var d,p=r.style.cssText,f=e.wrapper.style.cssText,v=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-v.top-5)+"px; left: "+(t.clientX-v.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(d=r.ownerDocument.defaultView.scrollY),n.input.focus(),l&&r.ownerDocument.defaultView.scrollTo(null,d),n.input.reset(),i.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=y,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll),o&&s>=9&&m(),S){Et(t);var g=function(){_t(window,"mouseup",g),setTimeout(y,20)};bt(window,"mouseup",g)}else setTimeout(y,50)}function m(){if(null!=r.selectionStart){var t=i.somethingSelected(),a="​"+(t?r.value:"");r.value="⇚",r.value=a,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=a.length,n.selForContextMenu=i.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=p,o&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=r.selectionStart)){(!o||o&&s<9)&&m();var t=0,a=function(){n.selForContextMenu==i.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Br(i,Qa)(i):t++<10?n.detectingSelectAll=setTimeout(a,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(a,200)}}},cl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},cl.prototype.setUneditable=function(){},cl.prototype.needsContentAttribute=!1,Os($s),Qs($s);var hl="iter insert remove copy getEditor constructor".split(" ");for(var pl in To.prototype)To.prototype.hasOwnProperty(pl)&&Y(hl,pl)<0&&($s.prototype[pl]=function(t){return function(){return t.apply(this.doc,arguments)}}(To.prototype[pl]));return At(To),$s.inputStyles={textarea:cl,contenteditable:il},$s.defineMode=function(t){$s.defaults.mode||"null"==t||($s.defaults.mode=t),Yt.apply(this,arguments)},$s.defineMIME=Xt,$s.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),$s.defineMIME("text/plain","null"),$s.defineExtension=function(t,e){$s.prototype[t]=e},$s.defineDocExtension=function(t,e){To.prototype[t]=e},$s.fromTextArea=ul,dl($s),$s.version="5.65.16",$s})},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 r=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.")},a=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=a(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,r=t.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;e[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=r,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-r%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).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=[],r=0;r>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(a))}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)))}},f=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,r=n.words,a=n.sigBytes,o=this.blockSize,s=4*o,l=a/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,a);if(u){for(var h=0;h>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=h,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=h;for(r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=n._createHelper(l)}(),t.RabbitLegacy})},27960:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return la}});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)],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("backtest-modal",{attrs:{visible:t.showBacktestModal,userId:t.userId,indicator:t.backtestIndicator,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe},on:{cancel:function(e){t.showBacktestModal=!1,t.backtestIndicator=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("backtest-history-drawer",{attrs:{visible:t.showBacktestHistoryDrawer,userId:t.userId,indicatorId:t.backtestHistoryIndicator?t.backtestHistoryIndicator.id:null,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe,isMobile:t.isMobile},on:{cancel:function(e){t.showBacktestHistoryDrawer=!1,t.backtestHistoryIndicator=null},view:t.handleViewBacktestRun}}),e("backtest-run-viewer",{attrs:{visible:t.showBacktestRunViewer,run:t.selectedBacktestRun},on:{cancel:function(e){t.showBacktestRunViewer=!1,t.selectedBacktestRun=null}}}),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)},r=[],a=(i(96305),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(89999),i(18787)),d=i(76338),h=i(85471),p=i(95353),f=i(75769),v=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=[],b=i(57532),x=i(15237),_=i.n(x),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),C=i.n(w),S=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,f.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=_()(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,r,a,o,s,c,u,d,h,p,f,v,g,m,y,x,_,w,k,A,T,I,M,E;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,r="/api/indicator/aiGenerate",a=C().get(S.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:a?"Bearer ".concat(a):"","Access-Token":a||"",Token:a||""},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,f=p.done,v=p.value,!f){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(v,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,b.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(x=y.value,x.trim()&&x.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(_=x.substring(6),"[DONE]"!==_){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(_),!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),A=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:A-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,M=e.v,m.e(M);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(T=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(T),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,E=e.v,t.$message.error(E.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(I=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(I));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]])}))()}}},A=k,T=i(81656),I=(0,T.A)(A,m,y,!1,null,"4fea1865",null),M=I.exports,E=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=[];function P(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],i=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}throw new TypeError((0,o.A)(t)+" is not iterable")}var L=i(26297),R=i(2403),F=function(t,e){return F=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])},F(t,e)};function B(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}F(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,W,$,H,V,K,Y,X=function(){return X=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&r[r.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[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 q(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=a.next()).done)o.push(n.value)}catch(s){r={error:s}}finally{try{n&&!n.done&&(i=a["return"])&&i.call(a)}finally{if(r)throw r.error}}return o}function Z(t,e,i){if(i||2===arguments.length)for(var n,r=0,a=e.length;r1e9)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 Wt(t,e){var i="".concat(t),n=i.match(/\.0*(\d+)/);if(It(n)&&parseInt(n[1])>0){var r=n[0].length-1-n[1].length;if(r>=e)return i.replace(/\.0*/,".0{".concat(r,"}"))}return i}function $t(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 Vt(t,e,i,n){if(!It(Dt)){var r=document.createElement("canvas"),a=$t(r);Dt=r.getContext("2d"),Dt.scale(a,a)}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"})(Pt||(Pt={}));var Kt,Yt=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 Xt(t,e,i,n,r){var a,o=e.result,s=e.figures,l=e.styles,c=Ft(l,"circles",n.circles),u=c.length,d=Ft(l,"bars",n.bars),h=d.length,p=Ft(l,"lines",n.lines),f=p.length,v=0,g=0,m=0;s.forEach(function(s){var l;switch(s.type){case"circle":var y=c[v%u];a=X(X({},y),{color:y.noChangeColor}),v++;break;case"bar":var b=d[g%h];a=X(X({},b),{color:b.noChangeColor}),g++;break;case"line":a=p[m%f],m++;break}if(It(a)){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]}},_=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);r(s,X(X({},a),_))}})}(function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"})(Kt||(Kt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,r=t.calcParams,a=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,f=t.extendData,v=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:Kt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==r&&void 0!==r?r:[],this.figures=null!==a&&void 0!==a?a:[],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=Ct(null!==p&&void 0!==p?p:{}),this.extendData=f,this.regenerateFigures=null!==v&&void 0!==v?v: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 U(this,void 0,void 0,function(){var e;return G(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 B(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function jt(){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,Zt=1,Jt=-1,Qt="overlay_",te="overlay_figure_",ee=Number.MAX_SAFE_INTEGER,ie=function(){function t(t){this.currentStep=Zt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,r=t.styles,a=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,f=t.createXAxisFigures,v=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,b=t.onDrawing,x=t.onDrawEnd,_=t.onClick,w=t.onDoubleClick,C=t.onRightClick,S=t.onPressedMoveStart,k=t.onPressedMoving,A=t.onPressedMoveEnd,T=t.onMouseEnter,I=t.onMouseLeave,M=t.onRemoved,E=t.onSelected,D=t.onDeselected;this.name=a,this.totalStep=!Tt(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=Ct(null!==r&&void 0!==r?r:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==f&&void 0!==f?f:null,this.createYAxisFigures=null!==v&&void 0!==v?v: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!==b&&void 0!==b?b:null,this.onDrawEnd=null!==x&&void 0!==x?x:null,this.onClick=null!==_&&void 0!==_?_:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==C&&void 0!==C?C:null,this.onPressedMoveStart=null!==S&&void 0!==S?S:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==A&&void 0!==A?A:null,this.onMouseEnter=null!==T&&void 0!==T?T:null,this.onMouseLeave=null!==I&&void 0!==I?I:null,this.onRemoved=null!==M&&void 0!==M?M:null,this.onSelected=null!==E&&void 0!==E?E:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Et(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Et(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=Z([],q(t),!1),t.length>=this.totalStep-1?(this.currentStep=Jt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=a:r=a,o<=2)break}return n}function de(t){var e=Math.floor(ve(t)),i=ge(e),n=t/i,r=0;return r=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=r*i,e>=-20?+t.toFixed(e<0?-e:0):t}function he(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function pe(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function fe(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var r,a;n[0]=Math.max(null!==(r=t[e])&&void 0!==r?r:t,n[0]),n[1]=Math.min(null!==(a=t[i])&&void 0!==a?a:t,n[1])}),n}function ve(t){return Math.log(t)/Math.log(10)}function ge(t){return Math.pow(10,t)}function me(){return{from:0,to:0,realFrom:0,realTo:0}}(function(t){t["Forward"]="forward",t["Backward"]="backward"})(re||(re={}));var ye={MIN:1,MAX:50},be=6,xe=50,_e=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=be,this._offsetRightDistance=xe,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=me(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t=Math.floor(.82*this._barSpace),e=Math.floor(this._barSpace),i=Math.min(t,e-1);return Math.max(1,i)},t.prototype.adjustVisibleRange=function(){var t,e,i,n,r=this._chartStore.getDataList(),a=r.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,a);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-a+Math.min(n,a);this._lastBarRightSideDiffBarCounta&&(c=a);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(a+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Pt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=r[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:re.Forward,data:null!==p&&void 0!==p?p:null})}c===a&&this._chartStore.executeLoadDataCallback({type:re.Backward,data:null!==(e=r[a-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"};Et(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){bt("","","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:this._gapBarSpace/2}},t.prototype.setBarSpace=function(t,e){tye.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;this._chartStore.getActionStore().execute(Pt.OnScroll),this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)}},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:ue(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)-.5},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 r=null!==e&&void 0!==e?e:null;if(!Tt(null===r||void 0===r?void 0:r.x)){var a=this._chartStore.getTooltipStore().getCrosshair();r={x:null!==(i=null===a||void 0===a?void 0:a.x)&&void 0!==i?i:this._totalBarSpace/2}}this._chartStore.getActionStore().execute(Pt.OnZoom);var o=r.x,s=this.coordinateToFloatIndex(o),l=this._barSpace+t*(this._barSpace/10);this.setBarSpace(l,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)})}},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=me()},t}(),we={name:"AVP",shortName:"AVP",series:Kt.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,r,a={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(r=null===t||void 0===t?void 0:t.volume)&&void 0!==r?r:0;return e+=o,i+=s,0!==i&&(a.avp=e/i),a})}},Ce={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):Ft(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]),r=0,a=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(r+=u,a+=u,l>=i[0]-1){o=r/i[0];var d=t[l-(i[0]-1)];r-=(d.low+d.high)/2}if(l>=i[1]-1){s=a/i[1];d=t[l-(i[1]-1)];a-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Se={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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,l){var c;if(r[l]=(null!==(c=r[l])&&void 0!==c?c:0)+s,a>=e-1){var u=r[l]/i[l];o[n[l].key]=(s-u)/u*100,r[l]-=t[a-(e-1)].close}}),o})}};function ke(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 Ae={name:"BOLL",shortName:"BOLL",series:Kt.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,r=0;return t.map(function(e,a){var o=e.close,s={};if(r+=o,a>=n){s.mid=r/i[0];var l=ke(t.slice(a-n,a+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,r-=t[a-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,r=0,a=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,f=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(a+=d-p,o+=p-h,n+=d-f,r+=f-h,s>=i[0]-1){u.ar=0!==o?a/o*100:0,u.br=0!==r?n/r*100:0;var v=t[s-(i[0]-1)],g=v.high,m=v.low,y=v.open,b=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-b,r-=b-m,a-=g-y,o-=y-m}return u})}},Ie={name:"BBI",shortName:"BBI",series:Kt.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,Z([],q(i),!1)),r=[],a=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;r[i]=(null!==(n=r[i])&&void 0!==n?n:0)+l,o>=e-1&&(a[i]=r[i]/e,r[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;a.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Me={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,r=0,a=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(r+=l,a.push(l),o>=n){var c=r/i[0],u=a.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;r-=p}return s})}},Ee={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),r=Math.ceil(i[2]/2.5+1),a=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,f=[],v=[];return t.forEach(function(e,g){var m,y,b,x,_,w={},C=null!==(m=t[g-1])&&void 0!==m?m:e,S=(C.high+C.close+C.low+C.open)/4,k=Math.max(0,e.high-S),A=Math.max(0,S-e.low);g>=i[0]-1&&(w.cr=0!==A?k/A*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=v[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]+r-3&&(w.ma2=u[u.length-1-r]),c-=null!==(b=v[g-(i[2]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+a-3&&(w.ma3=h[h.length-1-a]),d-=null!==(x=v[g-(i[3]-1)].cr)&&void 0!==x?x:0),g>=i[0]+i[4]-2&&(f.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=f[f.length-1-o]),p-=null!==(_=v[g-(i[4]-1)].cr)&&void 0!==_?_:0)),v.push(w)}),v}},De={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]),r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;r+=d,a+=d;var h=0,p=0;if(l>=i[0]-1&&(h=r/i[0],r-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=a/i[1],a-=t[l-(i[1]-1)].close),l>=n-1){var f=h-p;u.dma=f,o+=f,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}},Pe={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,r=0,a=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,f,v={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,b=e.low,x=y-b,_=Math.abs(y-m),w=Math.abs(m-b),C=y-g.high,S=g.low-b,k=Math.max(Math.max(x,_),w),A=C>0&&C>S?C:0,T=S>0&&S>C?S:0;if(n+=k,r+=A,a+=T,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+A,l=l-l/i[0]+T):(o=n,s=r,l=a);var I=0,M=0;0!==o&&(I=100*s/o,M=100*l/o),v.pdi=I,v.mdi=M;var E=0;M+I!==0&&(E=Math.abs(M-I)/(M+I)*100),c+=E,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+E)/i[0]:c/i[0],v.adx=u,h>=2*i[0]+i[1]-3&&(v.adxr=((null!==(f=d[h-(i[1]-1)].adx)&&void 0!==f?f:0)+u)/2))}d.push(v)}),d}},Le={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,r=[];return t.map(function(e,a){var o,s={};if(a>0){var l=t[a-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,r.push(s.emv),a>=i[0]&&(s.maEmv=n/i[0],n-=r[a-i[0]])}return s})}},Re={name:"EMA",shortName:"EMA",series:Kt.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,r=0,a=[];return t.map(function(t,e){var o={},s=t.close;return r+=s,i.forEach(function(t,i){e>=t-1&&(a[i]=e>t-1?(2*s+(t-1)*a[i])/(t+1):r/t,o[n[i].key]=a[i])}),o})}},Fe={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,r=[];return t.forEach(function(e,a){var o,s={};if(a>=i[0]){var l=e.close,c=t[a-i[0]].close;s.mtm=l-c,n+=s.mtm,a>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=r[a-(i[1]-1)].mtm)&&void 0!==o?o:0)}r.push(s)}),r}},Be={name:"MA",shortName:"MA",series:Kt.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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,i){var l;r[i]=(null!==(l=r[i])&&void 0!==l?l:0)+s,a>=e-1&&(o[n[i].key]=r[i]/e,r[i]-=t[a-(e-1)].close)}),o})}},Ne={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,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Ft(e.styles,"bars[0].downColor",i.bars[0].downColor):Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=r[0]-1&&(i=e>r[0]-1?(2*d+(r[0]-1)*i)/(r[0]+1):a/r[0]),e>=r[1]-1&&(n=e>r[1]-1?(2*d+(r[1]-1)*n)/(r[1]+1):a/r[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+r[2]-2&&(l=e>c+r[2]-2?(2*o+l*(r[2]-1))/(r[2]+1):s/r[2],u.macd=2*(o-l),u.dea=l)),u})}},Oe={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,r=0,a=[];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&&(r+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:r};n+=r,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=a[o-(i[0]-1)].obv)&&void 0!==u?u:0),a.push(h)}),a}},ze={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var r,a,o={},s=i.close,l=null!==(r=i.volume)&&void 0!==r?r:1,c=(null!==(a=t[n-1])&&void 0!==a?a:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},We={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,r=0,a=[],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;a.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,r+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=r/i[1],r-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=a[s-(i[0]-1)]),o.push(u)}),o}},$e={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=[],r=0;return t.forEach(function(e,a){var o,s,l={};if(a>=i[0]-1){var c=e.close,u=(null!==(o=t[a-i[0]])&&void 0!==o?o:t[a-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,r+=l.roc,a>=i[0]-1+i[1]-1&&(l.maRoc=r/i[1],r-=null!==(s=n[a-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},He={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,r=[],a=[];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?r[i]=(null!==(s=r[i])&&void 0!==s?s:0)+u:a[i]=(null!==(c=a[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==a[i]?l[n[i].key]=100-100/(1+r[i]/a[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,f=h.close-p.close;f>0?r[i]-=f:a[i]-=Math.abs(f)}}),l})}},Ve={name:"SMA",shortName:"SMA",series:Kt.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,r=0;return t.map(function(t,e){var a={},o=t.close;return n+=o,e>=i[0]-1&&(r=e>i[0]-1?(o*i[1]+r*(i[0]-i[1]+1))/(i[0]+1):n/i[0],a.sma=r),a})}},Ke={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,r){var a,o,s,l,c={},u=e.close;if(r>=i[0]-1){var d=fe(t.slice(r-(i[0]-1),r+1),"high","low"),h=d[0],p=d[1],f=h-p,v=(u-p)/(0===f?1:f)*100;c.k=((i[1]-1)*(null!==(o=null===(a=n[r-1])||void 0===a?void 0:a.k)&&void 0!==o?o:50)+v)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[r-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}},Ye={name:"SAR",shortName:"SAR",series:Kt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,r,a=t.current,o=null!==(r=null===(n=a.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,s=a.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+r,a)),c=u+o*(s-u);var f=Math.max(t[Math.max(1,i)-1].high,d);c=a[0]-1&&(i=e>a[0]-1?(2*p+(a[0]-1)*i)/(a[0]+1):o/a[0],s+=i,e>=2*a[0]-2&&(n=e>2*a[0]-2?(2*i+(a[0]-1)*n)/(a[0]+1):s/a[0],l+=n,e>=3*a[0]-3))){var f=void 0,v=0;e>3*a[0]-3?(f=(2*n+(a[0]-1)*r)/(a[0]+1),v=(f-r)/r*100):f=l/a[0],r=f,h.trix=v,c+=v,e>=3*a[0]+a[1]-4&&(h.maTrix=c/a[1],c-=null!==(d=u[e-(a[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}},Ue={name:"VOL",shortName:"VOL",series:Kt.Volume,calcParams:[5,10,20],shouldFormatBigNumber:!0,precision:0,minValue:0,figures:[{key:"ma1",title:"MA5: ",type:"line"},{key:"ma2",title:"MA10: ",type:"line"},{key:"ma3",title:"MA20: ",type:"line"},{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,r=Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return It(n)&&(n.close>n.open?r=Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):n.closer.open?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):r.close=e-1&&(l[n[i].key]=r[i]/e,r[i]-=null!==(c=t[a-(e-1)].volume)&&void 0!==c?c:0)}),l})}},Ge={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,r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,f={},v=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(v>g?n+=m:v=i[0]-1){var y=a/2;f.vr=r+y===0?0:(n+y)/(r+y)*100,o+=f.vr,l>=i[0]+i[1]-2&&(f.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var b=t[l-(i[0]-1)],x=null!==(h=t[l-i[0]])&&void 0!==h?h:b,_=b.close,w=null!==(p=b.volume)&&void 0!==p?p:0;_>x.close?n-=w:_=s){var l=fe(t.slice(r-s,r+1),"high","low"),c=l[0],u=l[1],d=c-u;a[n[i].key]=0===d?0:(o-c)/d*100}}),a})}},qe={},Ze=[we,Ce,Se,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je];function Je(t){qe[t.name]=Gt.extend(t)}function Qe(t){var e;return null!==(e=qe[t])&&void 0!==e?e:null}Ze.forEach(function(t){qe[t.name]=Gt.extend(t)});var ti=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,r=e.calcParams,a=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,f=e.extendData,v=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,b=!1;Et(i)&&t.setShortName(i)&&(b=!0),It(n)&&t.setSeries(n)&&(b=!0);var x=!1;St(r)&&t.setCalcParams(r)&&(b=!0,x=!0),St(o)&&t.setFigures(o)&&(b=!0,x=!0),void 0!==s&&t.setMinValue(s)&&(b=!0),void 0!==l&&t.setMinValue(l)&&(b=!0),Tt(a)&&t.setPrecision(a)&&(b=!0),Mt(c)&&t.setShouldOhlc(c)&&(b=!0),Mt(u)&&t.setShouldFormatBigNumber(u)&&(b=!0),Mt(d)&&t.setVisible(d)&&(b=!0);var _=!1;return Tt(h)&&t.setZLevel(h)&&(b=!0,_=!0),It(p)&&t.setStyles(p)&&(b=!0),t.setExtendData(f)&&(b=!0,x=!0),void 0!==v&&t.setRegenerateFigures(v)&&(b=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(b=!0),void 0!==m&&t.setDraw(m)&&(b=!0),kt(y)&&(t.calc=y,x=!0),[b,x,_]},t.prototype._sort=function(t){var e;Et(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 U(this,void 0,void 0,function(){var n,r,a,o,s;return G(this,function(l){switch(l.label){case 0:return n=t.name,r=this._instances.get(e),It(r)?(a=r.find(function(t){return t.name===n}),It(a)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return It(r)||(r=[]),o=Qe(n),s=new o,this._overrideInstance(s,t),i||(r=[]),r.push(s),this._instances.set(e,r),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,r=this._instances.get(t);if(It(r)){if(Et(e)){var a=r.findIndex(function(t){return t.name===e});a>-1&&(r.splice(a,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 U(this,void 0,void 0,function(){var i,n,r,a,o=this;return G(this,function(s){switch(s.label){case 0:return i=[],Et(t)?Et(e)?(n=this._instances.get(e),It(n)&&(r=n.find(function(e){return e.name===t}),It(r)&&i.push(r.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});It(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 a=s.sent(),[2,a.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,r=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Et(t)){var a=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Et(e)?null!==(n=null===a||void 0===a?void 0:a.find(function(t){return t.name===e}))&&void 0!==n?n:null:r(a)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,r(t))}),o},t.prototype.setSeriesPrecision=function(t){this._instances.forEach(function(e){e.forEach(function(e){e.series===Kt.Price&&e.setPrecision(t.price,!0),e.series===Kt.Volume&&e.setPrecision(t.volume,!0)})})},t.prototype.override=function(t,e){return U(this,void 0,void 0,function(){var i,n,r,a,o,s,l,c=this;return G(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(r=this._instances.get(e),It(r)&&n.set(e,r)):n=this._instances,a=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(It(n)){var r=c._overrideInstance(n,t);r[2]&&(s=!0),r[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):r[0]&&(a=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[a,l.includes(!0)]]}})})},t}(),ei=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,r=this._chartStore.getDataList(),a=null!==t&&void 0!==t?t:{};Tt(a.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(a.x),n=i<0?0:i>r.length-1?r.length-1:i):(i=r.length-1,n=i);var o=r[n],s=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),l={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=X(X({},a),{realX:s,kLineData:o,realDataIndex:i,dataIndex:n}),l.x===a.x&&l.y===a.y&&l.paneId===a.paneId||(null!==o&&this._chartStore.getChart().crosshairChange(this._crosshair),null!==e&&void 0!==e&&e||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,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({},!0),this.setActiveIcon()},t}(),ii={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n=t.overlay,r=t.precision,a=t.thousandsSeparator,o=t.decimalFoldThreshold,s=n.points;if(e.length>0){var l=[],c=[],u=0,d=i.width;if(e.length>1&&Tt(s[0].value)&&Tt(s[1].value)){var h=[1,.786,.618,.5,.382,.236,0],p=e[0].y-e[1].y,f=s[0].value-s[1].value;h.forEach(function(t){var i,n=e[1].y+p*t,h=Wt(zt(((null!==(i=s[1].value)&&void 0!==i?i:0)+f*t).toFixed(r.price),a),o);l.push({coordinates:[{x:u,y:n},{x:d,y:n}]}),c.push({x:u,y:n,text:"".concat(h," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:l},{type:"text",isCheckEvent:!1,attrs:c}]}return[]}},ni={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 It(e[1])&&e[0].x-1)for(var r=n;r>-1;r--)if(this._children[r].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}(),si=2,li=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return B(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},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 B(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}(oi);function ci(t,e){return Math.sqrt(Math.pow(t.x+e.x,2)+Math.pow(t.y+e.y,2))}function ui(t){var e=ci(t[0],t[1]),i=ci(t[1],t[2]),n=e+i,r=[t[2].x-t[0].x,t[2].y-t[0].y];return[{x:t[1].x-.5*r[0]*e/n,y:t[1].y-.5*r[1]*e/n},{x:t[1].x+.5*r[0]*e/n,y:t[1].y+.5*r[1]*e/n}]}function di(t,e){var i=e.coordinates;if(i.length>1)for(var n=1;n1){var a=i.style,o=void 0===a?N.Solid:a,s=i.smooth,l=i.size,c=void 0===l?1:l,u=i.color,d=void 0===u?"currentColor":u,h=i.dashedValue,p=void 0===h?[2,2]:h;if(t.lineWidth=c,t.strokeStyle=d,o===N.Dashed?t.setLineDash(p):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y),null!==s&&void 0!==s&&s){for(var f=[],v=1;v1)if(t[0].x===t[1].x){var a=0,o=e.height;if(r.push({coordinates:[{x:t[0].x,y:a},{x:t[0].x,y:o}]}),t.length>2){r.push({coordinates:[{x:t[2].x,y:a},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var v=t[2].y-p*t[2].x;r.push({coordinates:[{x:u,y:u*p+v},{x:d,y:d*p+v}]});for(s=f-v,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:pi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:pi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var wi={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:_i(e,i)}]}},Ci={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}}]:[]}},Si={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:pi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:pi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},ki={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=j(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(f){e={error:f}}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){a.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(a.length>0){var p=this._chartStore.getChart();a.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Bi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,r=this._hoverInstanceInfo,a=r.instance,o=r.figureType,s=r.figureKey,l=r.figureIndex;if(((null===a||void 0===a?void 0:a.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===a||void 0===a?void 0:a.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==a&&(u=!0,kt(a.onMouseLeave)&&(a.onMouseLeave(X({overlay:a,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,t.instance.setZLevel(ee),kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(X({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,r,a,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,f=d.figureType,v=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(a=null===(r=t.instance)||void 0===r?void 0:r.onClick)||void 0===a||a.call(r,X({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)||f!==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,X({overlay:p,figureKey:v,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,X({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,Bi.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}(),Oi=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 Yt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);It(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return It(e)&&!e.isEmpty()},t}(),zi={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"}}}},Wi={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"}}}},$i={light:zi,dark:Wi};function Hi(t){var e;return null!==(e=$i[t])&&void 0!==e?e:null}var Vi=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 _e(this),this._indicatorStore=new ti(this),this._overlayStore=new Ni(this),this._tooltipStore=new ei(this),this._actionStore=new Oi,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;no?(this._dataList.push(t),s=this._timeScaleStore.getLastBarRightSideDiffBarCount(),s<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--s),n=!0):a===o&&(this._dataList[r-1]=t,n=!0)),!n)return[3,4];this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this._indicatorStore.calcInstance()];case 2:return l.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),this._actionStore.execute(Pt.OnDataReady),[3,4];case 3:return l.sent(),[3,4];case 4:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&It(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&&It(this._loadDataCallback)&&(this._forwardMore&&t.type===re.Forward||this._backwardMore&&t.type===re.Backward)){var i=function(i,n){var r=[];t.type===re.Backward?(r=e._dataList.concat(i),e._backwardMore=null!==n&&void 0!==n&&n):(r=i.concat(e._dataList),e._forwardMore=null!==n&&void 0!==n&&n),e.addData(r,!1).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(X(X({},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}(),Ki={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Yi=7,Xi=-1;function Ui(t){return kt(window.requestAnimationFrame)?window.requestAnimationFrame(t):window.setTimeout(t,20)}function Gi(t){kt(window.cancelAnimationFrame)?window.cancelAnimationFrame(t):window.clearTimeout(t)}function ji(){return U(this,void 0,void 0,function(){return G(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 qi=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._requestAnimationId=Xi,this._mediaQueryListener=function(){var t=$t(i._element);i._resetPixelRatio(Math.round(i._element.clientWidth*t),Math.round(i._element.clientHeight*t),t,t)},this._listener=e,this._element=ce("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),ji().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}),r=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];if(It(r)){var a=r.inlineSize,o=r.blockSize;i._pixelWidth===a&&i._pixelHeight===o||i._resetPixelRatio(a,o,a/i._element.clientWidth,o/i._element.clientHeight)}}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat($t(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(t,e,i,n){var r=this;this._executeListener(function(){var a=r._element.clientWidth,o=r._element.clientHeight;r._width=a,r._height=o,r._pixelWidth=t,r._pixelHeight=e,r._element.width=t,r._element.height=e,r._ctx.scale(i,n)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId!==Xi&&(Gi(this._requestAnimationId),this._requestAnimationId=Xi),this._requestAnimationId=Ui(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener()})},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=$t(this._element);this._resetPixelRatio(Math.round(t*i),Math.round(e*i),i,i)}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){var t,e;null===(t=this._resizeObserver)||void 0===t||t.unobserve(this._element),null===(e=this._mediaQueryList)||void 0===e||e.removeListener(this._mediaQueryListener)},t}();function Zi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return It(t)&&wt(e,t),e}var Ji=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Zi(),n._pane=i,n.init(e),n}return B(e,t),e.prototype.init=function(t){this._rootContainer=t,this._container=this.createContainer(),t.appendChild(this._container)},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}(oi),Qi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.init=function(e){var i=this;t.prototype.init.call(this,e),this._mainCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateMain(i._mainCanvas.getContext())}),this._overlayCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateOverlay(i._overlayCanvas.getContext())});var n=this.getContainer();n.appendChild(this._mainCanvas.getElement()),n.appendChild(this._overlayCanvas.getElement())},e.prototype.createContainer=function(){return ce("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,r=e.height,a=e.left;t.style.left="".concat(a,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&r===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(r,"px"),o=3),o){case 0:this._mainCanvas.update(n,r);break;case 1:this._overlayCanvas.update(n,r);break;case 3:case 4:this._mainCanvas.update(n,r),this._overlayCanvas.update(n,r);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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);return r.width=i*o,r.height=n*o,a.scale(o,o),a.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&a.drawImage(this._overlayCanvas.getElement(),0,0,i,n),r},e}(Ji);function tn(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 en(t,e){var i=t.x-e.x,n=t.y-e.y,r=e.r;return!(i*i+n*n>r*r)}function nn(t,e,i){var n=e.x,r=e.y,a=e.r,o=i.style,s=void 0===o?O.Fill:o,l=i.color,c=void 0===l?"currentColor":l,u=i.borderSize,d=void 0===u?1:u,h=i.borderColor,p=void 0===h?"currentColor":h,f=i.borderStyle,v=void 0===f?N.Solid:f,g=i.borderDashedValue,m=void 0===g?[2,2]:g;s!==O.Fill&&i.style!==O.StrokeFill||Et(c)&&tn(c)||(t.fillStyle=c,t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.fill()),(s===O.Stroke||i.style===O.StrokeFill)&&d>0&&!tn(p)&&(t.strokeStyle=p,t.lineWidth=d,v===N.Dashed?t.setLineDash(m):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.stroke())}var rn={name:"circle",checkEventOn:en,draw:function(t,e,i){nn(t,e,i)}};function an(t,e){for(var i=!1,n=e.coordinates,r=0,a=n.length-1;rt.y!==n[a].y>t.y&&t.x<(n[a].x-n[r].x)*(t.y-n[r].y)/(n[a].y-n[r].y)+n[r].x&&(i=!i);return i}function on(t,e,i){var n=e.coordinates,r=i.style,a=void 0===r?O.Fill:r,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,f=i.borderDashedValue,v=void 0===f?[2,2]:f;if((a===O.Fill||i.style===O.StrokeFill)&&(!Et(s)||!tn(s))){t.fillStyle=s,t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var g=1;g0&&!tn(d)){t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y);for(g=1;g=i&&t.x<=i+n&&t.y>=r&&t.y<=r+a}function cn(t,e,i){var n=e.x,r=e.y,a=e.width,o=e.height,s=i.style,l=void 0===s?O.Fill:s,c=i.color,u=void 0===c?"transparent":c,d=i.borderSize,h=void 0===d?1:d,p=i.borderColor,f=void 0===p?"transparent":p,v=i.borderStyle,g=void 0===v?N.Solid:v,m=i.borderRadius,y=void 0===m?0:m,b=i.borderDashedValue,x=void 0===b?[2,2]:b;l!==O.Fill&&i.style!==O.StrokeFill||Et(u)&&tn(u)||(t.fillStyle=u,t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.fill()),(l===O.Stroke||i.style===O.StrokeFill)&&h>0&&!tn(f)&&(t.strokeStyle=f,t.lineWidth=h,g===N.Dashed?t.setLineDash(x):t.setLineDash([]),t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.stroke())}var un={name:"rect",checkEventOn:ln,draw:function(t,e,i){cn(t,e,i)}};function dn(t,e){var i,n,r=e.size,a=void 0===r?12:r,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,f=e.weight,v=void 0===f?"normal":f,g=e.family,m=t.x,y=t.y,b=t.text,x=t.align,_=void 0===x?"left":x,w=t.baseline,C=void 0===w?"top":w,S=t.width,k=t.height,A=null!==S&&void 0!==S?S:s+Vt(b,a,v,g)+d,T=null!==k&&void 0!==k?k:c+a+p;switch(_){case"left":case"start":i=m;break;case"right":case"end":i=m-A;break;default:i=m-A/2;break}switch(C){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-T;break;default:n=y-T/2;break}return{x:i,y:n,width:A,height:T}}function hn(t,e,i){var n=dn(e,i),r=n.x,a=n.y,o=n.width,s=n.height;return t.x>=r&&t.x<=r+o&&t.y>=a&&t.y<=a+s}function pn(t,e,i){var n=e.text,r=i.color,a=void 0===r?"currentColor":r,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,f=i.paddingRight,v=void 0===f?0:f,g=dn(e,i);cn(t,g,X(X({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=a,t.fillText(n,g.x+d,g.y+p,g.width-d-v)}var fn={name:"text",checkEventOn:function(t,e,i){return hn(t,e,i)},draw:function(t,e,i){pn(t,e,i)}},vn=fn;function gn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function mn(t,e){if(Math.abs(gn(t,e)-e.r)=Math.min(a,s)-si&&t.y<=Math.max(o,l)+si&&t.y>=Math.min(o,l)-si}return!1}function yn(t,e,i){var n=e.x,r=e.y,a=e.r,o=e.startAngle,s=e.endAngle,l=i.style,c=void 0===l?N.Solid:l,u=i.size,d=void 0===u?1:u,h=i.color,p=void 0===h?"currentColor":h,f=i.dashedValue,v=void 0===f?[2,2]:f;t.lineWidth=d,t.strokeStyle=p,c===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,o,s),t.stroke(),t.closePath()}var bn={name:"arc",checkEventOn:mn,draw:function(t,e,i){yn(t,e,i)}},xn={},_n=[rn,gi,sn,un,fn,vn,bn];function wn(t){var e;return null!==(e=xn[t])&&void 0!==e?e:null}_n.forEach(function(t){xn[t.name]=li.extend(t)});var Cn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return B(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=wn(t.name);if(null!==i){var n=new i(t);if(It(e)){for(var r in e)e.hasOwnProperty(r)&&n.registerEvent(r,e[r]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(oi),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget(),n=this.getWidget().getPane(),r=n.getChart(),a=i.getBounding(),o=r.getStyles().grid,s=o.show;if(s){t.save(),t.globalCompositeOperation="destination-over";var l=o.horizontal,c=l.show;if(c){var u=n.getAxisComponent();u.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:0,y:i.coord},{x:a.width,y:i.coord}]},styles:l}))||void 0===n||n.draw(t)})}var d=o.vertical,h=d.show;if(h){var p=r.getXAxisPane().getAxisComponent();p.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:i.coord,y:0},{x:i.coord,y:a.height}]},styles:d}))||void 0===n||n.draw(t)})}t.restore()}},e}(Cn),kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),r=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,r,i)})},e}(Cn),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(Pt.OnCandleBarClick,t),!1}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Bi.CANDLE,r=i.getChart().getChartStore(),a=this.getCandleBarOptions(r);if(null!==a){var o=i.getAxisComponent();this.eachChildren(function(i,r){var s=i.data,l=i.x;if(It(s)){var c=s.open,u=s.high,d=s.low,h=s.close,p=a.type,f=a.styles,v=[];h>c?(v[0]=f.upColor,v[1]=f.upBorderColor,v[2]=f.upWickColor):hc?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.CandleDownStroke:b=c>h?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.Ohlc:var x=Math.min(Math.max(Math.round(.2*r.gapBar),1),7);b=[{name:"rect",attrs:{x:l-x/2,y:y[0],width:x,height:y[3]-y[0]},styles:{color:v[0]}},{name:"rect",attrs:{x:l-r.halfGapBar,y:g+x>y[3]?y[3]-x:g,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}},{name:"rect",attrs:{x:l+x/2,y:m+x>y[3]?y[3]-x:m,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}}];break}b.forEach(function(r){var a,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(a=e.createFigure(r,o))||void 0===a||a.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-.5,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,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-.5,y:e[0],width:1,height:e[1]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}},{name:"rect",attrs:{x:t-.5,y:e[2],width:1,height:e[3]-e[2]},styles:{color:n[2]}}]},e}(kn),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),r=n.getAxisComponent();if(!r.isInCandle()){var a=t.getIndicatorStore().getInstances(n.getId());try{for(var o=j(a),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=Ft(c,"ohlc.upColor",u.ohlc.upColor),h=Ft(c,"ohlc.downColor",u.ohlc.downColor),p=Ft(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:V.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(f){e={error:f}}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(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=a.getXAxisPane().getAxisComponent(),l=r.getAxisComponent(),c=a.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(r.getId()),f=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 r=!1;if(null!==t.draw&&(e.save(),r=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:f,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!r){var a=t.result;i.eachChildren(function(n,r){var c,d,h,p=r.halfGapBar,v=r.gapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),b=s.convertToPixel(g+1),x=null!==(c=a[g-1])&&void 0!==c?c:{},_=null!==(d=a[g])&&void 0!==d?d:{},w=null!==(h=a[g+1])&&void 0!==h?h:{},C={x:y},S={x:m},k={x:b};t.figures.forEach(function(t){var e=t.key,i=x[e];Tt(i)&&(C[e]=l.convertToPixel(i));var n=_[e];Tt(n)&&(S[e]=l.convertToPixel(n));var r=w[e];Tt(r)&&(k[e]=l.convertToPixel(r))}),Xt(u,t,g,f,function(t,n){var a,c,u;if(It(_[t.key])){var d=S[t.key],h=null===(a=t.attrs)||void 0===a?void 0:a.call(t,{coordinate:{prev:C,current:S,next:k},bounding:o,barSpace:r,xAxis:s,yAxis:l});if(!It(h))switch(t.type){case"circle":h={x:m,y:d,r:p};break;case"rect":case"bar":var f=null!==(c=t.baseValue)&&void 0!==c?c:l.getRange().from,g=l.convertToPixel(f),y=Math.abs(g-d);f!==_[t.key]&&(y=Math.max(1,y));var b=void 0;b=d>g?g:d,h={x:m-p,y:b,width:v,height:y};break;case"line":Tt(S[t.key])&&Tt(k[t.key])&&(h={coordinates:[{x:S.x,y:S[t.key]},{x:k.x,y:k[t.key]}]});break}if(It(h)){var x=t.type;null===(u=i.createFigure({name:"bar"===x?"rect":x,attrs:h,styles:n}))||void 0===u||u.draw(e)}}})})}}}),e.restore()},e}(An),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=e.getBounding(),r=e.getPane().getChart().getChartStore(),a=r.getTooltipStore().getCrosshair(),o=r.getStyles().crosshair;if(Et(a.paneId)&&o.show){if(a.paneId===i.getId()){var s=a.y;this._drawLine(t,[{x:0,y:s},{x:n.width,y:s}],o.horizontal)}var l=a.realX;this._drawLine(t,[{x:l,y:0},{x:l,y:n.height}],o.vertical)}},e.prototype._drawLine=function(t,e,i){var n;if(i.show){var r=i.line;r.show&&(null===(n=this.createFigure({name:"line",attrs:{coordinates:e},styles:r}))||void 0===n||n.draw(t))}},e}(Cn),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundIconClickEvent=function(t,i){return function(){var n=e.getWidget().getPane();return n.getChart().getChartStore().getActionStore().execute(Pt.OnTooltipIconClick,X(X({},t),{iconId:i})),!0}},e._boundIconMouseMoveEvent=function(t,i){return function(){var n=e.getWidget().getPane(),r=n.getChart().getChartStore().getTooltipStore();return r.setActiveIcon(X(X({},t),{iconId:i})),!0}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getTooltipStore().getCrosshair();if(It(r.kLineData)){var a=e.getBounding(),o=n.getCustomApi(),s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getIndicatorStore().getInstances(i.getId()),u=n.getTooltipStore().getActiveIcon(),d=n.getStyles().indicator;this.drawIndicatorTooltip(t,i.getId(),n.getDataList(),r,u,c,o,s,l,a,d)}},e.prototype.drawIndicatorTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d){var h=this,p=u.tooltip,f=0;if(this.isDrawTooltip(n,p)){var v=p.text,g=0,m=null!==d&&void 0!==d?d:0,y=0;a.forEach(function(a){var d=h.getIndicatorTooltipData(i,n,a,o,s,l,u),p=d.name,b=d.calcParamsText,x=d.values,_=d.icons,w=p.length>0,C=x.length>0;if(w||C){var S=q(h.classifyTooltipIcons(_),3),k=S[0],A=S[1],T=S[2],I=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,k,g,m,y),4),M=I[0],E=I[1],D=I[2],P=I[3];if(g=M,m=E,f+=P,y=D,w){var L=p;b.length>0&&(L="".concat(L).concat(b));var R=q(h.drawStandardTooltipLabels(t,c,[{title:{text:"",color:v.color},value:{text:L,color:v.color}}],g,m,y,v),4),F=R[0],B=R[1],N=R[2],O=R[3];g=F,m=B,f+=O,y=N}var z=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,A,g,m,y),4),W=z[0],$=z[1],H=z[2],V=z[3];if(g=W,m=$,f+=V,y=H,C){var K=q(h.drawStandardTooltipLabels(t,c,x,g,m,y,v),4),Y=K[0],X=K[1],U=K[2],G=K[3];g=Y,m=X,f+=G,y=U}var j=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,T,g,m,y),4),Z=j[1],J=j[2],Q=j[3];g=0,f+=Q,m=Z+J,y=0}})}return f},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,r,a,o,s){var l=this,c=a,u=o,d=0,h=0,p=0;return r.length>0&&(r.forEach(function(e){var i=e.marginLeft,n=e.marginTop,r=e.marginRight,a=e.marginBottom,o=e.paddingLeft,s=e.paddingTop,l=e.paddingRight,c=e.paddingBottom,u=e.size,p=e.fontFamily,f=e.icon;t.font=Ht(u,"normal",p),d+=i+o+t.measureText(f).width+l+r,h=Math.max(h,n+s+u+c+a)}),c+d>e.width?(c=r[0].marginLeft,u+=s,p=h):p=Math.max(0,h-s),r.forEach(function(e){var r,a=e.marginLeft,o=e.marginTop,s=e.marginRight,d=e.paddingLeft,h=e.paddingTop,p=e.paddingRight,f=e.paddingBottom,v=e.color,g=e.activeColor,m=e.size,y=e.fontFamily,b=e.icon,x=e.backgroundColor,_=e.activeBackgroundColor;c+=a;var w=(null===n||void 0===n?void 0:n.paneId)===i.paneId&&(null===n||void 0===n?void 0:n.indicatorName)===i.indicatorName&&(null===n||void 0===n?void 0:n.iconId)===e.id;null===(r=l.createFigure({name:"text",attrs:{text:b,x:c,y:u+o},styles:{paddingLeft:d,paddingTop:h,paddingRight:p,paddingBottom:f,color:w?g:v,size:m,family:y,backgroundColor:w?_:x}},{mouseClickEvent:l._boundIconClickEvent(i,e.id),mouseMoveEvent:l._boundIconMouseMoveEvent(i,e.id)}))||void 0===r||r.draw(t),c+=d+t.measureText(b).width+p+s})),[c,u,Math.max(s,h),p]},e.prototype.drawStandardTooltipLabels=function(t,e,i,n,r,a,o){var s=this,l=n,c=r,u=0,d=0,h=a;if(i.length>0){var p=o.marginLeft,f=o.marginTop,v=o.marginRight,g=o.marginBottom,m=o.size,y=o.family,b=o.weight;t.font=Ht(m,b,y),i.forEach(function(i){var n,r,a=i.title,o=i.value,x=t.measureText(a.text).width,_=t.measureText(o.text).width,w=x+_,C=m+f+g;l+p+w+v>e.width?(l=p,c+=C,d+=C):(l+=p,d+=Math.max(0,C-h)),u=Math.max(h,C),h=u,a.text.length>0&&(null===(n=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:a.text},styles:{color:a.color,size:m,family:y,weight:b}}))||void 0===n||n.draw(t),l+=x),null===(r=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:o.text},styles:{color:o.color,size:m,family:y,weight:b}}))||void 0===r||r.draw(t),l+=_+v})}return[l,c,u,d]},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Et(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,r,a,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},f=e.dataIndex,v=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=v[f])&&void 0!==l?l:{};Xt(t,i,f,o,function(t,e){if(Et(t.title)){var o=e.color,s=m[t.key];Tt(s)&&(s=Nt(s,i.precision),i.shouldFormatBigNumber&&(s=n.formatBigNumber(s))),g.push({title:{text:t.title,color:o},value:{text:Wt(zt(null!==s&&void 0!==s?s:c.defaultValue,r),a),color:o}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),b=y.getPane(),x=b.getChart().getChartStore(),_=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:x.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:b.getChart().getXAxisPane().getAxisComponent(),yAxis:b.getAxisComponent()}),w=_.name,C=_.calcParamsText,S=_.values,k=_.icons;if(Et(w)&&c.showName&&(p.name=w),Et(C)&&c.showParams&&(p.calcParamsText=C),It(k)&&(p.icons=k),It(S)&&i.visible){var A=[],T=o.tooltip.text.color;S.forEach(function(t){var e={text:"",color:T};At(t.title)?e=t.title:e.text=t.title;var i={text:"",color:T};At(t.value)?i=t.value:i.text=t.value,i.text=Wt(zt(i.text,r),a),A.push({title:e,value:i})}),p.values=A}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case $.Left:e.push(t);break;case $.Middle:i.push(t);break;case $.Right:n.push(t);break}}),[e,i,n]},e}(Cn),En=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return B(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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(te,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(a.instance,e)),null===(r=o.onDrawing)||void 0===r||r.call(o,X({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 r,a,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(te,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(r=s.onDrawing)||void 0===r||r.call(s,X({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(a=s.onDrawEnd)||void 0===a||a.call(s,X({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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(te,"point_").concat(l);null===(r=o.onDrawEnd)||void 0===r||r.call(o,X({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(te,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var r=i.instance;if(r.isDrawing()){var a=r.points.length-1;return t._figureMouseRightClickEvent(r,1,"".concat(te,"point_").concat(a),a,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,r=n.getPressedInstanceInfo(),a=r.instance,o=r.figureIndex,s=r.figureKey;return null!==a&&(null===(e=a.onPressedMoveEnd)||void 0===e||e.call(a,X({overlay:a,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,r,a=n.getPressedInstanceInfo(),o=a.instance,s=a.figureType,l=a.figureIndex,c=a.figureKey;if(null!==o){if(!o.lock&&(null===(r=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,X({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===r||!r)){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,r,a){var o;if(!t.isDrawing()){var s=[];if(It(a)&&(Mt(a)?a&&(s=jt()):s=a),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,r),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,r),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,r),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,r),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,r)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,r)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,r)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,r)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,r)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,r))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,r){var a=this;return function(o){var s,l=a.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(a._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,X({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,r){return function(e){var r;return null===(r=t.onDoubleClick)||void 0===r||r.call(t,X(X({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,r){var a=this;return function(e){var r,o;if(null===(o=null===(r=t.onRightClick)||void 0===r?void 0:r.call(t,X({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},r=this.getWidget().getPane(),a=r.getChart(),o=r.getId(),s=a.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=a.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=r.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Bi.CANDLE&&Tt(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var f=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var v=d.convertToPixel(p.high),g=d.convertFromPixel(v-f);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),b=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,r,s,l,a,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,r,a,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var r=this;i.forEach(function(i,a){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,f=r._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",a,u,c),v=X(X(X({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=r.createFigure({name:o,attrs:l,styles:v},f))||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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p){var f,v,g=this;if(e.needDefaultPointFigure&&((null===(f=h.instance)||void 0===f?void 0:f.id)===e.id&&0!==h.figureType||(null===(v=p.instance)||void 0===v?void 0:v.id)===e.id&&0!==p.figureType)){var m=e.styles,y=X(X({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var r,a,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(r=h.instance)||void 0===r?void 0:r.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(a=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(te,"point_").concat(n),n,0)))||void 0===a||a.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}(Cn),Dn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new Sn(n),n._indicatorView=new Tn(n),n._crosshairLineView=new In(n),n._tooltipView=n.createTooltipView(),n._overlayView=new En(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 B(e,t),e.prototype.getName=function(){return Ki.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Mn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(Qi),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=r.getAxisComponent(),l=a.getStyles().candle.area,c=[],u=[],d=Number.MAX_SAFE_INTEGER;this.eachChildren(function(t,e,i){var n=t.data,r=t.x,a=e.halfGapBar,h=null===n||void 0===n?void 0:n[l.value];if(Tt(h)){var p=s.convertToPixel(h);if(0===i){var f=r-a;u.push({x:f,y:o.height}),u.push({x:f,y:p}),c.push({x:f,y:p})}c.push({x:r,y:p}),u.push({x:r,y:p}),d=Math.min(d,p)}});var h=u.length;if(h>0){var p=u[h-1],f=p.x;c.push({x:f,y:p.y}),u.push({x:f,y:p.y}),u.push({x:f,y:o.height})}if(c.length>0&&(null===(e=this.createFigure({name:"line",attrs:{coordinates:c},styles:{color:l.lineColor,size:l.lineSize}}))||void 0===e||e.draw(t)),u.length>0){var v=l.backgroundColor,g=void 0;if(St(v)){var m=t.createLinearGradient(0,o.height,0,d);try{v.forEach(function(t){var e=t.offset,i=t.color;m.addColorStop(e,i)})}catch(y){}g=m}else g=v;null===(i=this.createFigure({name:"polygon",attrs:{coordinates:u},styles:{color:g}}))||void 0===i||i.draw(t)}},e}(kn),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getStyles().candle.priceMark,a=r.high,o=r.low;if(r.show&&(a.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,f=0;this.eachChildren(function(t){var e=t.data,i=t.x;It(e)&&(de.low&&(p=e.low,f=i))});var v=u.convertToPixel(d),g=u.convertToPixel(p);a.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Wt(zt(Nt(d,c.price),s),l),{x:h,y:v},vp/2?(l=d-5,c=l-r.textOffset,u="right"):(l=d+5,u="left",c=l+r.textOffset);var f=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:f},{x:l,y:f}]},styles:{color:r.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:f,text:e,align:u,baseline:"middle"},styles:{color:r.color,size:r.textSize,family:r.textFamily,weight:r.textWeight}}))||void 0===s||s.draw(t)},e}(kn),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=a.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,f=c.convertToNicePixel(h),v=void 0;v=h>p?s.upColor:h0){var O=q(this.drawStandardTooltipLabels(t,n,x,_,w,C,m),4),z=O[0],W=O[1],$=O[2],H=O[3];_=z,w=W,y+=H,C=$}var V=q(this.drawStandardTooltipIcons(t,n,{paneId:i,indicatorName:"",iconId:""},a,T,_,w,C),4),K=V[0],Y=V[1],X=V[2],U=V[3];_=K,w=Y,y+=U,C=X}return y},e.prototype._drawRectTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p,f,v){var g,m,y,b,x,_=this,w=f.candle,C=f.indicator,S=w.tooltip,k=C.tooltip;if(h||p){var A=null!==(g=a.dataIndex)&&void 0!==g?g:0,T=this._getCandleTooltipData({prev:null!==(m=e[A-1])&&void 0!==m?m:null,current:a.kLineData,next:null!==(y=e[A+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),I=S.text,M=I.marginLeft,E=I.marginRight,D=I.marginTop,P=I.marginBottom,L=I.size,R=I.weight,F=I.family,B=S.rect,N=B.position,z=B.paddingLeft,W=B.paddingRight,$=B.paddingTop,V=B.paddingBottom,Y=B.offsetLeft,X=B.offsetRight,U=B.offsetTop,G=B.offsetBottom,j=B.borderSize,q=B.borderRadius,Z=B.borderColor,J=B.color,Q=0,tt=0,et=0;h&&(t.font=Ht(L,R,F),T.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+M+E;Q=Math.max(Q,a)}),et+=(P+D+L)*T.length);var it=k.text,nt=it.marginLeft,rt=it.marginRight,at=it.marginTop,ot=it.marginBottom,st=it.size,lt=it.weight,ct=it.family,ut=[];if(p&&(t.font=Ht(st,lt,ct),i.forEach(function(i){var n,r=null!==(n=_.getIndicatorTooltipData(e,a,i,c,u,d,C).values)&&void 0!==n?n:[];ut.push(r),r.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+nt+rt;Q=Math.max(Q,a),et+=at+ot+st})})),tt+=Q,0!==tt&&0!==et){tt+=2*j+z+W,et+=2*j+$+V;var dt=n.width/2,ht=N===H.Pointer&&a.paneId===Bi.CANDLE,pt=(null!==(b=a.realX)&&void 0!==b?b:0)>dt,ft=0;if(ht){var vt=a.realX;ft=pt?vt-X-tt:vt+Y}else pt?(ft=Y,f.yAxis.inside&&f.yAxis.position===K.Left&&(ft+=r.width)):(ft=n.width-X-tt,f.yAxis.inside&&f.yAxis.position===K.Right&&(ft-=r.width));var gt=v+U;if(ht){var mt=a.y;gt=mt-et/2,gt+et>n.height-G&&(gt=n.height-G-et),gt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=_[c])&&void 0!==e?e:f.defaultValue),"{change}"===c&&(o.color=0===y?s.priceMark.last.noChangeColor:y>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:a,value:o}})},e}(Mn),Wn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Pn(n),n._candleHighLowPriceView=new Ln(n),n._candleLastPriceLineView=new Rn(n),n.addChild(n._candleBarView),n}return B(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==V.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t)):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new zn(this)},e}(Dn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this,n=this.getWidget(),r=n.getPane(),a=n.getBounding(),o=r.getAxisComponent(),s=this.getAxisStyles(r.getChart().getStyles());if(s.show){s.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(a,s),styles:s.axisLine}))||void 0===e||e.draw(t));var l=o.getTicks();if(s.tickLine.show){var c=this.createTickLines(l,a,s);c.forEach(function(e){var n;null===(n=i.createFigure({name:"line",attrs:e,styles:s.tickLine}))||void 0===n||n.draw(t)})}if(s.tickText.show){var u=this.createTickTexts(l,a,s);u.forEach(function(e){var n;null===(n=i.createFigure({name:"text",attrs:e,styles:s.tickText}))||void 0===n||n.draw(t)})}}},e}(Cn),Hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),r=e.axisLine.size;return i=n.isFromZero()?r/2:t.width-r,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),r=i.axisLine,a=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,r.show&&(o+=r.size),s=o+a.length):(o=e.width,r.show&&(o-=r.size),s=o-a.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(),r=i.axisLine,a=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,r.show&&(s+=r.size),a.show&&(s+=a.length)):(s=e.width-o.marginEnd,r.show&&(s-=r.size),a.show&&(s-=a.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),Vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=a.getPrecision(),u=n.getAxisComponent(),d=a.getDataList(),h=a.getVisibleDataList(),p=d[d.length-1];if(It(p)){var f=p.close,v=p.open,g=u.convertToNicePixel(f),m=void 0;m=f>v?s.upColor:f1&&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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(En),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=i.getPane().getChart().getChartStore(),o=a.getTooltipStore().getCrosshair(),s=a.getStyles().crosshair;if(Et(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,a,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,r,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,r,a=i,o=i.convertFromPixel(t.y);if(a.getType()===Y.Percentage){var s=e.getVisibleDataList(),l=null===(n=s[0])||void 0===n?void 0:n.data;r="".concat(((o-l.close)/l.close*100).toFixed(2),"%")}else{var c=e.getIndicatorStore().getInstances(t.paneId),u=0,d=!1;a.isInCandle()?u=e.getPrecision().price:c.forEach(function(t){u=Math.max(t.precision,u),d||(d=t.shouldFormatBigNumber)}),r=Nt(o,u),d&&(r=e.getCustomApi().formatBigNumber(r))}return Wt(zt(r,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,r,a){var o,s,l=r;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(Cn),Un=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Hn(n),n._candleLastPriceLabelView=new Vn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new Yn(n),n._crosshairHorizontalLabelView=new Xn(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),Gn=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,r=[];if(n>=0){var a=q(this._calcTickInterval(n),2),o=a[0],s=a[1],l=he(Math.ceil(e/o)*o,s),c=he(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);r[u]={text:h,coord:0,value:h},++u,d+=o}}return r},t.prototype._calcTickInterval=function(t){var e=de(t/8),i=pe(e);return[e,i]},t}(),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t,e,i,n,r,a=this.getParent(),o=a.getChart(),s=o.getChartStore(),l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=[],d=!1,h=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER,v=s.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;d||(d=null!==(e=t.shouldOhlc)&&void 0!==e&&e),f=Math.min(f,t.precision),Tt(t.minValue)&&(h=Math.min(h,t.minValue)),Tt(t.maxValue)&&(p=Math.max(p,t.maxValue)),u.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var g=4,m=this.isInCandle();if(m){var y=s.getPrecision().price;g=f!==Number.MAX_SAFE_INTEGER?Math.min(f,y):y}else f!==Number.MAX_SAFE_INTEGER&&(g=f);var b=s.getVisibleDataList(),x=o.getStyles().candle,_=x.type===V.Area,w=x.area.value,C=m&&!_||!m&&d;b.forEach(function(t){var e=t.dataIndex,i=t.data;if(It(i)&&(C&&(l=Math.min(l,i.low),c=Math.max(c,i.high)),m&&_)){var n=i[w];Tt(n)&&(l=Math.min(l,n),c=Math.max(c,n))}u.forEach(function(t){var i,n=t.figures,r=t.result,a=null!==(i=r[e])&&void 0!==i?i:{};n.forEach(function(t){var e=a[t.key];Tt(e)&&(l=Math.min(l,e),c=Math.max(c,e))})})}),l!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER?(l=Math.min(h,l),c=Math.max(p,c)):(l=0,c=10);var S,k=this.getType();switch(k){case Y.Percentage:var A=null===(t=b[0])||void 0===t?void 0:t.data;It(A)&&Tt(A.close)&&(l=(l-A.close)/A.close*100,c=(c-A.close)/A.close*100),S=Math.pow(10,-2);break;case Y.Log:l=ve(l),c=ve(c),S=.05*ge(-g);break;default:S=ge(-g)}if(l===c||Math.abs(l-c)=1&&(D/=M);var P=null!==(r=null===E||void 0===E?void 0:E.bottom)&&void 0!==r?r:.1;P>=1&&(P/=M);var L,R,F,B=Math.abs(c-l);return l-=B*P,c+=B*D,B=Math.abs(c-l),k===Y.Log?(L=ge(l),R=ge(c),F=Math.abs(R-L)):(L=l,R=c,F=B),{from:l,to:c,range:B,realFrom:L,realTo:R,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,r=this.getRange(),a=r.from,o=r.range,s=(t-a)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Bi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:Y.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===K.Left&&e||t.position===K.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,r=this.getParent(),a=null!==(i=null===(e=r.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=r.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(r.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,f=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),f||(f=t.shouldFormatBigNumber)});var v,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,r=n._innerConvertToPixel(+i);switch(c){case Y.Percentage:e="".concat(Nt(i,2),"%");break;case Y.Log:r=n._innerConvertToPixel(ve(+i)),e=Nt(i,p);break;default:e=Nt(i,p),f&&(e=s.formatBigNumber(i));break}e=Wt(zt(e,d),h);var o=Tt(v);r>g&&r2*g||!o)&&(l.push({text:e,coord:r,value:i}),v=r)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,r=n.size;if("auto"!==r)return r;var a=e.getChartStore(),o=a.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,Vt(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=a.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var f=2;if(this.getType()!==Y.Percentage)if(this.isInCandle()){var v=a.getPrecision().price,g=i.indicator.lastValueMark;f=g.show&&g.text.show?Math.max(h,v):v}else f=h;var m=Nt(this.getRange().to,f);p&&(m=o.formatBigNumber(m)),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+Vt(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,r=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),o=a.from,s=a.range,l=this.isReverse()?t/r:1-t/r,c=l*s+o;switch(this.getType()){case Y.Percentage:var u=this.getParent().getChart().getChartStore(),d=u.getVisibleDataList(),h=null===(n=d[0])||void 0===n?void 0:n.data;return It(h)&&Tt(h.close)?h.close*c/100+h.close:0;case Y.Log:return ge(c);default:return c}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===Y.Log&&(e=ge(t)),e},e.prototype.convertToPixel=function(t){var e,i=t;switch(this.getType()){case Y.Percentage:var n=this.getParent().getChart().getChartStore(),r=n.getVisibleDataList(),a=null===(e=r[0])||void 0===e?void 0:e.data;It(a)&&Tt(a.close)&&(i=(t-a.close)/a.close*100);break;case Y.Log:i=ve(t);break;default:i=t}return this._innerConvertToPixel(i)},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,r=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(r,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return B(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Gn),qn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Zn={default:jn.extend(qn)};function Jn(t){var e;return null!==(e=Zn[t])&&void 0!==e?e:Zn.default}var Qn=function(){function t(t,e,i,n){this._bounding=Zi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=ce("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}(),tr=function(t){function e(e,i,n,r,a){var o=t.call(this,e,i,n,r)||this;o._yAxisWidget=null,o._options={minHeight:Ri,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(a),o}return B(e,t),e.prototype.setOptions=function(t){var e,i,n,r,a,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Et(o)||!It(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Bi.X_AXIS?(r=this.getMainWidget().getContainer(),a="ew-resize"):(r=this.getYAxisWidget().getContainer(),a="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?r.style.cursor=a:r.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,r;wt(this.getBounding(),t);var a={};return It(t.height)&&(a.height=t.height),It(t.top)&&(a.top=t.top),this._mainWidget.setBounding(a),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(a),It(e)&&this._mainWidget.setBounding(e),It(i)&&(null===(r=this._yAxisWidget)||void 0===r||r.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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);r.width=i*o,r.height=n*o,a.scale(o,o);var s=this._mainWidget.getBounding();if(a.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();a.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return r},e.prototype.createYAxisWidget=function(t){return null},e}(Qn),er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createAxisComponent=function(t){var e=Jn(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Dn(t,this)},e.prototype.createYAxisWidget=function(t){return new Un(t,this)},e}(tr),ir=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createMainWidget=function(t){return new Wn(t,this)},e}(er),nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t,e){var i=e.axisLine.size/2;return{coordinates:[{x:0,y:i},{x:t.width,y:i}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,r=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:r+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,r=i.axisLine.size,a=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:r+a+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(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,r,a,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,f=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),f=Math.max(f,e.x);var n=t.points[i];if(Tt(n.timestamp)){var o=a.formatDate(r,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:f-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Yn),ar=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.compare=function(t){return It(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,r,a){var o,s=i.realX,l="center";return s-e/2-a.paddingLeft<0?(o=0,l="left"):s+e/2+a.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Xn),or=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new nr(n),n._overlayXAxisView=new rr(n),n._crosshairVerticalLabelView=new ar(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),sr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,r=i,a=n-1,o=n-i;return{from:r,to:a,range:o,realFrom:r,realTo:a,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),r=n.getChartStore(),a=r.getCustomApi().formatDate,o=[],s=t.length,l=r.getDataList();if(s>0){var c=r.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=Vt("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),f=1;if(s>1){var v=parseInt(t[1].value,10),g=this.convertToPixel(v),m=Math.abs(g-p);m(null!==e&&void 0!==e?e:20)&&(t.apply(this,arguments),i=n)}}var pr=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=hr(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 B(e,t),e.prototype.getName=function(){return Ki.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(),r=i.getBottomPane(),a=e<0;if(null!==n&&null!==r&&r.getOptions().dragEnabled){var o=void 0,s=void 0,l=void 0,c=void 0;a?(o=n,s=r,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=r,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(Pt.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(),r=n.getStyles().separator;return this.getContainer().style.background=r.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return ce("div",{width:"100%",height:"".concat(Yi,"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((Yi-n.size)/2),"px"),t.style.height="".concat(Yi,"px")}},e}(Ji),fr=function(t){function e(e,i,n,r,a,o){var s=t.call(this,e,i,n,r)||this;return s.getContainer().style.overflow="",s._topPane=a,s._bottomPane=o,s._separatorWidget=new pr(s.getContainer(),s),s}return B(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,r=this.getChart().getStyles().separator,a=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=a.getContext("2d"),s=$t(a);return a.width=i*s,a.height=n*s,o.scale(s,s),o.fillStyle=r.color,o.fillRect(0,0,i,n),a},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}(Qn);function vr(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function gr(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var mr,yr=10,br=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=!gr(),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,r=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 a=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){r._target.removeEventListener("mousemove",a)},this._target.addEventListener("mousemove",a);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){r._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){r._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(!It(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!It(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,r=i.yOffset,a=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(a<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=r>=o&&!this._options.treatVertDragAsPageScroll(),l=o>r&&!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),r=i+n;return{xOffset:i,yOffset:n,manhattanDistance:r}},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),It(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),vr()){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),r=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",r)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",r,{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;vr()&&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}),gr()&&(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;(It(this._handler.pinchStartEvent)||It(this._handler.pinchEvent)||It(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&&It(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(X(X({},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]),It(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,It(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=!gr())},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 It(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 Ki.X_AXIS:case Ki.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),r=i.getName();switch(r){case Ki.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var a=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(a>0?a:1)*20;if(a<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=Ui(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(Gi(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Ki.X_AXIS:case Ki.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,r=!1;if(null!==n){var a=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",a);if(n.getName()===Ki.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,!0),r=!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()},!0),r=!0),this._touchCancelCrosshair=!1)}(r||o)&&this._chart.updatePane(1)}return r},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()===Ki.MAIN){var r=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:r.x,y:r.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:r.x,y:r.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,r,a=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=j(s),u=c.next();!u.done;u=c.next()){var d=q(u.value,2),h=d[1],p=h.getBounding(),f=p.top-Math.round((Yi-l)/2);if(a>=p.left&&a<=p.left+p.width&&o>=f&&o<=f+Yi)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 v=this._chart.getAllDrawPanes(),g=null;try{for(var m=j(v),y=m.next();!y.done;y=m.next()){var b=y.value;p=b.getBounding();if(a>=p.left&&a<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=b;break}}}catch(A){n={error:A}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var x=null;if(null!==g){if(null===x){var _=g.getMainWidget(),w=_.getBounding();a>=w.left&&a<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(x=_)}if(null===x){var C=g.getYAxisWidget();if(null!==C){var S=C.getBounding();a>=S.left&&a<=S.left+S.width&&o>=S.top&&o<=S.top+S.height&&(x=C)}}}return{pane:g,widget:x}},t.prototype._makeWidgetEvent=function(t,e){var i,n,r,a=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return X(X({},t),{x:t.x-(null!==(n=null===a||void 0===a?void 0:a.left)&&void 0!==n?n:0),y:t.y-(null!==(r=null===a||void 0===a?void 0:a.top)&&void 0!==r?r: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"})(mr||(mr={}));var _r=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new xr(this._chartContainer,this),this._chartStore=new Vi(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=ce("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"}],r=!1,a=!1,o=function(t){if(!a){var e=i._createPane(dr,Bi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,a=!0}};n.forEach(function(t){var e,n,a;switch(t.type){case"candle":if(!r){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Bi.CANDLE});var l=i._createPane(ir,Bi.CANDLE,s);i._candlePane=l;var c=null!==(n=t.content)&&void 0!==n?n:[];c.forEach(function(t){i.createIndicator(t,!0,s)}),r=!0}break;case"indicator":var u;c=null!==(a=t.content)&&void 0!==a?a:[];if(c.length>0)c.forEach(function(e){It(u)?i.createIndicator(e,!0,{id:u}):u=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options)}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,r=null,a=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];It(s)&&(a=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=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];"bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)&&(a=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=l)}}if(It(a)||(a=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),It(r)?(this._drawPanes.splice(r,0,a),n=r):(this._drawPanes.push(a),n=this._drawPanes.length-1),a.getId()!==Bi.X_AXIS){var d=this._drawPanes[n+1];if(It(d)&&d.getId()===Bi.X_AXIS&&(d=this._drawPanes[n+2]),It(d)){var h=this._separatorPanes.get(d);It(h)?h.setTopPane(a):(h=new fr(this._chartContainer,d.getContainer(),this,"",a,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(It(p)&&p.getId()===Bi.X_AXIS&&(p=this._drawPanes[n-2]),It(p)){h=new fr(this._chartContainer,a.getContainer(),this,"",p,a);this._separatorPanes.set(a,h)}}return a},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,r=this._xAxisPane.getAxisComponent().getAutoSize(),a=i-r-this._separatorPanes.size*n;a<0&&(a=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Bi.CANDLE&&t.getId()!==Bi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;ea?(o=a,e=Math.max(a-o,0)):o+=e,t.setBounding({height:e})}});var s=a-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:r});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);It(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,r=n.position===K.Left,a=!n.inside,o=0,s=Number.MIN_SAFE_INTEGER,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Bi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),a?(o=e-s,r?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=r?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},f=i.separator.fill;u=a&&!f?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(Et(t.id)){var r=this.getDrawPaneById(t.id),a=!1;if(null!==r){var o=e;if(t.id!==Bi.CANDLE&&Tt(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:r.getOptions().minHeight,0),l=Math.max(s,t.height);r.setBounding({height:l}),o=!0,a=!0}(Et(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||It(t.gap))&&(o=!0),r.setOptions(t),o&&this.adjustPaneViewport(a,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Bi.CANDLE)return this._candlePane;if(t===Bi.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.getCandlePane=function(){return this._candlePane},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,r){t&&this._measurePaneHeight();var a=e,o=null!==n&&void 0!==n&&n,s=null!==r&&void 0!==r&&r;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);a||(a=e)}),a&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(It(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(Pt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var r=i.getId(),a={},o=e._chartStore.getIndicatorStore().getInstances(r);o.forEach(function(e){var i,n=e.result;a[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[r]=a}),Et(t.paneId)&&i.execute(Pt.OnCrosshairChange,X(X({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Et(t))return this._chartContainer;var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getContainer();case mr.Main:return r.getMainWidget().getContainer();case mr.YAxis:return null!==(n=null===(i=r.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(!It(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getBounding();case mr.Main:return r.getMainWidget().getBounding();case mr.YAxis:return null!==(n=null===(i=r.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=Et(t)?Hi(t):t,It(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?bt("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?bt("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?bt("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?bt("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){It(i)&&bt("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!0,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){bt("","","Api `applyMoreData` has been deprecated since version 9.8.0.");var n=t.concat(this._chartStore.getDataList());this._chartStore.addData(n,!1,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){It(e)&&bt("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!1).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){bt("","","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 r,a=this,o=Et(t)?{name:t}:t;if(null===Qe(o.name))return bt("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;a._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=le(Bi.INDICATOR));var c=this._createPane(er,s,null!==i&&void 0!==i?i:{}),u=null!==(r=null===i||void 0===i?void 0:i.height)&&void 0!==r?r:Fi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){a.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=q(t,2),r=e[0],a=e[1];(r||a)&&(n.adjustPaneViewport(!1,a,!0,a),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,r,a=this._chartStore.getIndicatorStore(),o=a.removeInstance(t,e);if(o){var s=!1;if(t!==Bi.CANDLE&&!a.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(It(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=j(this._separatorPanes),p=h.next();!p.done;p=h.next()){var f=p.value;if(f[1].getTopPane().getId()===l.getId()){f[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 v=this._drawPanes[0];It(v)&&v.getId()===Bi.X_AXIS&&(v=this._drawPanes[1]),null===(r=this._separatorPanes.get(v))||void 0===r||r.destroy(),this._separatorPanes.delete(v)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Et(t))i=[{name:t}];else if(St(t))i=t.map(function(t){return Et(t)?{name:t}:t});else{var n=t;i=[n]}var r=!0;It(e)&&null!==this.getDrawPaneById(e)||(e=Bi.CANDLE,r=!1);var a=this._chartStore.getOverlayStore().addInstances(i,e,r);return St(t)?a:a[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;It(t)&&(e=Et(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=Tt(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(i>0){n.startScroll();var r=(new Date).getTime(),a=function(){var e=((new Date).getTime()-r)/i,o=e>=1,s=o?t:t*e;n.scroll(s),o||requestAnimationFrame(a)};a()}else n.startScroll(),n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,r=n*i;this.scrollByDistance(r,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=ue(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Tt(i)&&i>0?i:0,r=this._chartStore.getTimeScaleStore();if(n>0){var a=r.getBarSpace().bar,o=a*t,s=o-a,l=(new Date).getTime(),c=function(){var t=((new Date).getTime()-l)/n,i=t>=1,o=i?s:s*t;r.zoom(o/a,e),i||requestAnimationFrame(c)};c()}else r.zoom(t,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=ue(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Tt(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Tt(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 St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.x)){var r=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=r,n.timestamp=null!==(i=c.dataIndexToTimestamp(r))&&void 0!==i?i:void 0}if(Tt(t.y)){var a=o?t.y-u.top:t.y;n.value=p.convertFromPixel(a)}return n})}}return St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Pt.OnCrosshairChange:var n=X({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Bi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n);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,r=this._chartContainer.clientWidth,a=this._chartContainer.clientHeight,o=ce("canvas",{width:"".concat(r,"px"),height:"".concat(a,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=$t(o);o.width=r*l,o.height=a*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,r,a);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(It(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var a=t.getBounding();s.drawImage(t.getImage(c),0,a.top,r,a.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}(),wr=new Map,Cr=1;function Sr(t,e){var i;if(_t(),i=Et(t)?document.getElementById(t):t,null===i)return xt("","","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=wr.get(i.id);if(It(n))return bt("","","The chart has been initialized on the dom!!!"),n;var r="k_line_chart_".concat(Cr++);return n=new _r(i,e),n.id=r,i.setAttribute("k-line-chart-id",r),wr.set(r,n),n}var kr=i(21396),Ar=i.n(kr);function Tr(t,e,i,n){if(!t||!e||!i||!n)return t;try{var r=Ar().enc.Base64.parse(t),a=Ar().lib.WordArray.create(r.words.slice(0,4)),o=Ar().lib.WordArray.create(r.words.slice(4)),s=Ar().enc.Base64.parse(n),l=Ar().AES.decrypt({ciphertext:o},s,{iv:a,mode:Ar().mode.CBC,padding:Ar().pad.Pkcs7}),c=l.toString(Ar().enc.Utf8);return c||t}catch(u){return t}}function Ir(t,e){return Mr.apply(this,arguments)}function Mr(){return Mr=(0,c.A)((0,l.A)().m(function t(e,i){var n,r;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,f.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,r=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(r.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Mr.apply(this,arguments)}function Er(t,e,i){return Dr.apply(this,arguments)}function Dr(){return Dr=(0,c.A)((0,l.A)().m(function t(e,i,n){var r;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ir(i,n);case 1:return r=t.v,t.a(2,Tr(e,i,n,r))}},t)})),Dr.apply(this,arguments)}function Pr(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 Lr={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)([]),r=(0,h.KR)(!1),a=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,v=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),x=(0,h.KR)(5e3),_=(0,h.KR)(!1),w=(0,h.KR)(1e4),C=(0,h.KR)(0),S=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||!C.value||e-C.value>=i)&&(C.value=e,_t())}},k=(0,h.KR)([]),A=(0,h.KR)([]),T=(0,h.KR)([]),I=(0,h.KR)(null),M=(0,h.nI)(),E=M.proxy,D=(0,h.EW)(function(){return[{name:"line",title:E.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:E.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:E.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:E.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:E.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:E.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:E.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:E.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:E.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"}]}),F=(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}}]),B=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"},i=e[t]||t;if(I.value!==t){I.value=t;try{var n={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(n);r?T.value.push(r):I.value=null}catch(a){I.value=null}}else{I.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(o){}}}},O=function(){if(g.value)try{T.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){}}),T.value=[],I.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=B(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})}},W=(0,h.KR)(null),$=(0,h.KR)(!1),H=(0,h.KR)(!1),V=(0,h.KR)(!1),K=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#131722",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2e39",gridLineColor:"#1f2943",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:"#2a2e39",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#1f2943"}:{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"}}),Y=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},X=function(){return new Promise(function(t,e){if(window.pyodide)return W.value=window.pyodide,H.value=!0,void t(window.pyodide);$.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},r="/assets/pyodide/v".concat(i,"/full/"),a="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||r),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||a),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 r=document.createElement("script");r.dataset.pyodideSrc=t,r.src=t,r.onload=function(){return e()},r.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(r)})},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:W.value=window.pyodide,H.value=!0,$.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){$.value=!1,V.value=!0,e(t)})})},U=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(),r=parseFloat(i[1].trim());isNaN(r)||(e[n]=r)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},G=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,s,c,u,d,h,p,f,v,g,m,y,b,x,_,w,C,S=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(r=S.length>2&&void 0!==S[2]?S[2]:{},a=S.length>3&&void 0!==S[3]?S[3]:{},H.value&&W.value){e.n=5;break}if(!$.value){e.n=4;break}s=0;case 1:if(!($.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||!W.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&W.value){e.n=5;break}throw $.value?($.value=!1,V.value=!0):V.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=a.is_encrypted||a.isEncrypted||0,!u&&!Pr(i,u)){e.n=11;break}if(d=a.user_id||a.userId||t.userId||r.userId,h=a.originalId||a.id||r.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Er(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,_=e.v,new Error("代码解密失败,无法执行指标: "+(_.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}}),f=JSON.stringify(p),v=JSON.stringify(r||{}),g=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=v.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,W.value.runPythonAsync(y);case 12:if(b=e.v,b&&"string"===typeof b){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(b)));case 13:e.p=13,x=JSON.parse(b),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(x){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return x.plots&&Array.isArray(x.plots)||(x.plots=[]),x.plots=x.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}),x.signals&&Array.isArray(x.signals)&&(x.signals=x.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})),x.calculatedVars||(x.calculatedVars={}),e.a(2,x);case 17:throw e.p=17,C=e.v,new Error("Python 执行失败: ".concat(C.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 j(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?r+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var f=[],v=[],g=[],m=0;m=e-1){var w=f[m],C=v[m],S=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(C/w*100),n.push(S/w*100)),m>=e-1){var k=i[m]+n[m],A=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)r.push(A);else if(m===e){var T=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;r.push((T+A)/2)}else r.push((r[m-1]*(e-1)+A)/e)}}}return{adx:r,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=f+2*p,b=(null===(i=a.extendData)||void 0===i?void 0:i.side)||(null===(n=a.extendData)||void 0===n?void 0:n.type)||"buy",x="buy"===b,_=x?u:u-y,w=d,C=w,S=x?_:_+y;return[{type:"line",attrs:{coordinates:[{x:c,y:C},{x:c,y:S}]},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:_,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:_+y/2,text:v,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:f,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}});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],r=e.close.toFixed(2),a=(e.close-n.close)/n.close*100;i("price-change",{price:r,change:a})}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),r=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&n.getMinutes()===r.getMinutes();case"5m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(r.getMinutes()/5);case"15m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(r.getMinutes()/15);case"30m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(r.getMinutes()/30);case"1H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours();case"4H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&Math.floor(n.getHours()/4)===Math.floor(r.getHours()/4);case"1D":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate();case"1W":var a=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((r.getTime()-new Date(r.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===r.getFullYear()&&a===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,v,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(!r.value||i){e.n=2;break}return e.a(2);case 2:return r.value=!0,a.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,f.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=E.$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&&_t()},100)}}else mt();t.realtimeEnabled&&(gt(),vt())}),e.n=12;break;case 11:if(e.p=11,v=e.v,a.value=E.$t("dashboard.indicator.error.loadDataFailed")+": "+(v.message||E.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,r.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 r,a,o,c,d,v;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,r=Math.floor(i/1e3),e.n=2,(0,f.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:r}});case 2:if(a=e.v,1!==a.code||!a.data||!Array.isArray(a.data)){e.n=5;break}if(o=st(a.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&&(r=st(i.data),a=(0,R.A)(n.value),r.length>0&&(o=Math.floor(r[r.length-1].timestamp/1e3),s=Math.floor(a[a.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=a[a.length-1],u=r[r.length-1],a[a.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=a,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(a[h]),S(!1)):g.value&&(g.value.applyNewData(n.value),S(!1))):o>s&&(p=r.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!a.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,R.A)(a),(0,R.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),v=ct(n.value),lt(v),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),S(!0)):g.value&&(g.value.applyNewData(n.value),S(!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)}}(),vt=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;x.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!r.value&&t.symbol&&n.value&&n.value.length>0&&ft()},x.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=Sr(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Sr(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)),bt(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(I.value&&t&&t.id){T.value.push(t.id),I.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){I.value&&t&&t.id&&(T.value.push(t.id),I.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=T.value.indexOf(t);e>-1&&T.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,r=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,o,c,d,h,f;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(r){t.n=1;break}return i=e.from,r=!0,setTimeout(function(){v.value=!0},1e3),t.a(2);case 1:if(v.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&&(a=n.value.length,a>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*a/100),d=.1,h=Math.min(100,d+c/a*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&v.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 f=n.value[0].timestamp,t.n=4,ht(f);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(b){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){_t()})}}window.addEventListener("resize",yt)}catch(a){a.value=E.$t("dashboard.indicator.error.chartInitFailed")+": "+(a.message||"未知错误")}}else{var d=0,f=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},bt=function(){if(g.value){var t=K.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:[E.$t("dashboard.indicator.tooltip.time"),E.$t("dashboard.indicator.tooltip.open"),E.$t("dashboard.indicator.tooltip.high"),E.$t("dashboard.indicator.tooltip.low"),E.$t("dashboard.indicator.tooltip.close"),E.$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}})}},xt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:r,series:a?"price":"normal"};return Je(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},_t=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,r,a,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!_.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:_.value=!0,e.p=3;try{A.value.length>0&&g.value&&(A.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){}}),A.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),r=(0,l.A)().m(function e(){var n,r,a,s,c,u,d,h,p,f,v,m,y,x,_,w,C,S,T,I,M,E,D,P,F,B,N,O,z,W,H,K,X,U,st,lt,ct,ut,dt,ht,pt,ft,vt,gt,mt,yt,bt,_t,wt,Ct,St,kt,At,Tt,It,Mt,Et,Dt,Pt,Lt,Rt,Ft,Bt,Nt,Ot,zt,Wt,$t,Ht,Vt,Kt,Yt,Xt,Ut,Gt,jt,qt,Zt,Jt,Qt,te,ee,ie,ne,re,ae,oe,se,le,ce,ue,de,he,pe,fe,ve,ge,me,ye,be,xe,_e,we,Ce,Se,ke,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je,qe,Ze,Je,Qe,ti,ei,ii,ni,ri,ai,oi,si,li,ci,ui,di,hi,pi,fi,vi,gi,mi,yi,bi;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(r=e.v,a=[],r&&r.plots&&Array.isArray(r.plots)&&(a=(0,R.A)(r.plots)),!(r&&r.signals&&Array.isArray(r.signals))){e.n=14;break}s=(0,b.A)(r.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){E=(0,b.A)(f);try{for(E.s();!(D=E.n()).done;){P=D.value;try{F=P.timestamp,F<1e10&&(F*=1e3),B=P.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:F,value:P.price},{timestamp:F,value:P.anchorPrice}],extendData:{text:B,color:P.color,side:P.side,action:P.action,price:P.price},lock:!0},"candle_pane"),N&&A.value.push(N))}catch(l){}}}catch(xi){E.e(xi)}finally{E.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(a.length>0&&(O=a.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],W={},H=0;H0)){e.n=23;break}for(_t=[],wt=0;wt0&&g.value){Bt=(0,b.A)(St);try{for(Bt.s();!(Nt=Bt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Wt=Ot.text,"function"===typeof g.value.createOverlay&&($t=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Wt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),$t&&A.value.push($t))}catch(l){}}}catch(xi){Bt.e(xi)}finally{Bt.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(Vt=[],Kt={},Yt=0;Yt0&&(0,h.dY)(function(){g.value&&_t()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?vt():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,X();case 3:e.n=5;break;case 4:e.p=4,e.v,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:r,error:a,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:K,getIndicatorColor:Y,handleRetry:wt,loadingPython:$,pythonReady:H,pyodideLoadFailed:V,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:ft,startRealtime:vt,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:bt,updateIndicators:_t,executePythonStrategy:G,parsePythonStrategy:U,indicatorButtons:F,isIndicatorActive:B,toggleIndicator:z,drawingTools:D,activeDrawingTool:I,selectDrawingTool:N,clearAllDrawings:O}}},Rr=Lr,Fr=(0,T.A)(Rr,E,D,!1,null,"466e34db",null),Br=Fr.exports,Nr=function(){var t=this,e=t._self._c;return e("a-modal",{staticClass:"backtest-modal",attrs:{title:t.$t("dashboard.indicator.backtest.title"),visible:t.visible,width:1100,maskClosable:!1},on:{cancel:t.handleCancel}},[e("div",{staticClass:"backtest-content"},[e("a-steps",{staticStyle:{"margin-bottom":"16px"},attrs:{current:t.currentStep,size:"small"}},[e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.strategy.title"),description:t.$t("dashboard.indicator.backtest.steps.strategy.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.trading.title"),description:t.$t("dashboard.indicator.backtest.steps.trading.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.results.title"),description:t.$t("dashboard.indicator.backtest.steps.results.desc")}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2!==t.currentStep,expression:"currentStep !== 2"}],staticClass:"config-section"},[e("a-form",{attrs:{form:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[e("div",{directives:[{name:"show",rawName:"v-show",value:0===t.currentStep,expression:"currentStep === 0"}]},[e("a-collapse",{staticStyle:{background:"#fafafa"},attrs:{bordered:!1},model:{value:t.step1CollapseKeys,callback:function(e){t.step1CollapseKeys=e},expression:"step1CollapseKeys"}},[e("a-collapse-panel",{key:"risk",attrs:{header:t.$t("dashboard.indicator.backtest.panel.risk")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.stopLossPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stopLossPct",{initialValue:0}],expression:"['stopLossPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["takeProfitPct",{initialValue:0}],expression:"['takeProfitPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailingEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrailingToggle}})],1)],1),e("a-col",{attrs:{span:12}})],1),t.trailingEnabledUi?[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingStopPct",{initialValue:0}],expression:"['trailingStopPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingActivationPct",{initialValue:0}],expression:"['trailingActivationPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:t._e()],2),e("a-collapse-panel",{key:"scale",attrs:{header:t.$t("dashboard.indicator.backtest.panel.scale")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrendAddToggle}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['dcaAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onDcaAddToggle}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddStepPct",{initialValue:0}],expression:"['trendAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddStepPct",{initialValue:0}],expression:"['dcaAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddSizePct",{initialValue:0}],expression:"['trendAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddSizePct",{initialValue:0}],expression:"['dcaAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddMaxTimes",{initialValue:0}],expression:"['trendAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddMaxTimes",{initialValue:0}],expression:"['dcaAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1)],1)],1),e("a-collapse-panel",{key:"reduce",attrs:{header:t.$t("dashboard.indicator.backtest.panel.reduce")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverseReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceStepPct",{initialValue:0}],expression:"['trendReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceStepPct",{initialValue:0}],expression:"['adverseReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceSizePct",{initialValue:0}],expression:"['trendReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceSizePct",{initialValue:0}],expression:"['adverseReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceMaxTimes",{initialValue:0}],expression:"['trendReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceMaxTimes",{initialValue:0}],expression:"['adverseReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),e("a-collapse-panel",{key:"position",attrs:{header:t.$t("dashboard.indicator.backtest.panel.position")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.entryPct"),help:t.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(t.entryPctMaxUi||0).toFixed(0)})}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entryPct",{initialValue:100}],expression:"['entryPct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:t.entryPctMaxUi,step:.1,precision:4},on:{change:t.onEntryPctChange}})],1)],1),e("a-col",{attrs:{span:12}})],1)],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:1===t.currentStep,expression:"currentStep === 1"}]},[e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:t.combinedAlertType,"show-icon":""}},[e("template",{slot:"message"},[e("div",{staticStyle:{display:"flex","align-items":"center","flex-wrap":"wrap",gap:"8px"}},[e("span",[e("strong",[t._v("Symbol:")]),t._v(" "+t._s(t.symbol||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Market:")]),t._v(" "+t._s(t.market||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Timeframe:")]),t._v(" "+t._s(t.selectedTimeframe||t.timeframe||"-")+" ")]),t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"high"===t.precisionInfo.precision?"thunderbolt":"clock-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.precisionMode"))+": "),e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"high"===t.precisionInfo.precision?"green":"blue",size:"small"}},[t._v(" "+t._s(t.precisionInfo.timeframe)+" ")]),e("span",{staticStyle:{color:"#666","margin-left":"6px"}},[t._v(" ("+t._s(t.$t("dashboard.indicator.backtest.estimatedCandles",{count:t.precisionInfo.estimated_candles?t.precisionInfo.estimated_candles.toLocaleString():"-"}))+") ")])],1):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px",color:"#faad14"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"warning"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.standardModeWarning"))+" ")],1):t._e()])]),e("template",{slot:"description"},[t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s("high"===t.precisionInfo.precision?t.$t("dashboard.indicator.backtest.highPrecisionDesc"):t.$t("dashboard.indicator.backtest.mediumPrecisionDesc"))+" ")]):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s(t.precisionInfo.message||t.$t("dashboard.indicator.backtest.standardModeDesc"))+" ")]):t._e()])],2),e("div",{staticClass:"date-quick-select",staticStyle:{"margin-bottom":"12px"}},[e("span",{staticStyle:{"margin-right":"8px",color:"#666","font-size":"13px"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.quickSelect")||"快速选择")+":")]),e("a-button-group",{attrs:{size:"small"}},t._l(t.datePresets,function(i){return e("a-button",{key:i.key,attrs:{type:t.selectedDatePreset===i.key?"primary":"default"},on:{click:function(e){return t.applyDatePreset(i)}}},[t._v(t._s(i.label))])}),1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.startDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["startDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.startDateRequired")}],initialValue:t.defaultStartDate}],expression:"['startDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.startDateRequired') }], initialValue: defaultStartDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledStartDate,placeholder:t.$t("dashboard.indicator.backtest.selectStartDate")},on:{change:t.onDateChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.endDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["endDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.endDateRequired")}],initialValue:t.defaultEndDate}],expression:"['endDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.endDateRequired') }], initialValue: defaultEndDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledEndDate,placeholder:t.$t("dashboard.indicator.backtest.selectEndDate")},on:{change:t.onDateChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.initialCapital")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initialCapital",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.initialCapitalRequired")}],initialValue:1e4}],expression:"['initialCapital', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.initialCapitalRequired') }], initialValue: 10000 }]"}],staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.commission")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission",{initialValue:.02}],expression:"['commission', { initialValue: 0.02 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}}),e("div",{staticClass:"field-hint"},[t._v(t._s(t.$t("dashboard.indicator.backtest.commissionHint")))])],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.slippage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["slippage",{initialValue:0}],expression:"['slippage', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.leverage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:1}],expression:"['leverage', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.tradeDirection")}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["tradeDirection",{initialValue:"long"}],expression:"['tradeDirection', { initialValue: 'long' }]"}],staticStyle:{width:"100%"}},[e("a-select-option",{attrs:{value:"long"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.longOnly"))+" ")]),e("a-select-option",{attrs:{value:"short"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.shortOnly"))+" ")]),e("a-select-option",{attrs:{value:"both"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.both"))+" ")])],1)],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.timeframe")}},[e("a-select",{staticStyle:{width:"100%"},on:{change:t.onTimeframeChange},model:{value:t.selectedTimeframe,callback:function(e){t.selectedTimeframe=e},expression:"selectedTimeframe"}},[e("a-select-option",{attrs:{value:"1m"}},[t._v("1m")]),e("a-select-option",{attrs:{value:"5m"}},[t._v("5m")]),e("a-select-option",{attrs:{value:"15m"}},[t._v("15m")]),e("a-select-option",{attrs:{value:"30m"}},[t._v("30m")]),e("a-select-option",{attrs:{value:"1H"}},[t._v("1H")]),e("a-select-option",{attrs:{value:"4H"}},[t._v("4H")]),e("a-select-option",{attrs:{value:"1D"}},[t._v("1D")]),e("a-select-option",{attrs:{value:"1W"}},[t._v("1W")])],1)],1)],1)],1)],1)])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2===t.currentStep&&t.hasResult,expression:"currentStep === 2 && hasResult"}],staticClass:"result-section"},[t.backtestRunId?e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"success","show-icon":"",message:t.$t("dashboard.indicator.backtest.savedRunId",{id:t.backtestRunId})}}):t._e(),e("div",{staticClass:"metrics-cards"},[e("div",{staticClass:"metric-card",class:{positive:t.result.totalReturn>0,negative:t.result.totalReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.totalReturn)))]),e("div",{staticClass:"metric-amount"},[t._v(t._s(t.formatMoney(t.result.totalProfit)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.annualReturn>0,negative:t.result.annualReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.sharpeRatio")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.sharpeRatio.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.winRate)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.profitFactor>=1.5,negative:t.result.profitFactor<1}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.profitFactor.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.totalTrades))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalCommission")))]),e("div",{staticClass:"metric-value"},[t._v("-$"+t._s(t.result.totalCommission?t.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.equityCurve")))]),e("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),e("div",{staticClass:"trades-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.tradeHistory")))]),e("a-table",{attrs:{columns:t.tradeColumns,"data-source":t.result.trades,pagination:{pageSize:5,size:"small"},size:"small",scroll:{x:600}},scopedSlots:t._u([{key:"type",fn:function(i){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(i)}},[t._v(" "+t._s(t.getTradeTypeText(i))+" ")])]}},{key:"balance",fn:function(i){return[e("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[t._v(" $"+t._s(i?i.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(i){return[e("span",{style:{color:i>0?"#52c41a":i<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatMoney(i))+" ")])]}}])})],1)],1),t.loading?e("div",{staticClass:"loading-overlay"},[e("div",{staticClass:"loading-content"},[e("div",{staticClass:"loading-animation"},[e("div",{staticClass:"chart-bars"},[e("div",{staticClass:"bar bar1"}),e("div",{staticClass:"bar bar2"}),e("div",{staticClass:"bar bar3"}),e("div",{staticClass:"bar bar4"}),e("div",{staticClass:"bar bar5"})])]),e("div",{staticClass:"loading-text"},[t._v(t._s(t.$t("dashboard.indicator.backtest.running")))]),e("div",{staticClass:"loading-subtext"},[t._v(t._s(t.loadingTip))])])]):t._e()],1),e("template",{slot:"footer"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center",width:"100%"}},[e("div",[t.currentStep>0?e("a-button",{attrs:{disabled:t.loading},on:{click:t.handlePrev}},[t._v(t._s(t.$t("dashboard.indicator.backtest.prev")))]):t._e()],1),e("div",[e("a-button",{attrs:{disabled:t.loading},on:{click:t.handleCancel}},[t._v(t._s(t.$t("dashboard.indicator.backtest.close")))]),t.currentStep<1?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleNext}},[t._v(t._s(t.$t("dashboard.indicator.backtest.next")))]):1===t.currentStep?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",loading:t.loading},on:{click:t.handleRunBacktest}},[t._v(t._s(t.$t("dashboard.indicator.backtest.run")))]):e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleRerun}},[t._v(t._s(t.$t("dashboard.indicator.backtest.rerun")))])],1)])])],2)},Or=[],zr=i(95093),Wr=i.n(zr),$r=i(86529),Hr={name:"BacktestModal",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicator:{type:Object,default:null},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1D"}},data:function(){return{form:this.$form.createForm(this),loading:!1,loadingTip:"",loadingTimer:null,currentStep:0,hasResult:!1,backtestRunId:null,step1CollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,precisionInfo:null,selectedDatePreset:null,selectedTimeframe:"1D",result:{totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},equityChart:null,tradeColumns:[]}},computed:{maxBacktestRange:function(){var t=this.selectedTimeframe||this.timeframe||"1D";return"1m"===t?{days:30,label:"1个月"}:"5m"===t?{days:180,label:"6个月"}:["15m","30m"].includes(t)?{days:365,label:"1年"}:{days:1095,label:"3年"}},recommendedRange:function(){return{days:30,label:"30天",key:"30d"}},combinedAlertType:function(){return this.precisionInfo&&this.precisionInfo.enabled?"high"===this.precisionInfo.precision?"success":"info":this.precisionInfo&&!this.precisionInfo.enabled&&this.market&&"crypto"===this.market.toLowerCase()?"warning":"info"},datePresets:function(){var t=[],e=this.selectedTimeframe||this.timeframe||"1D";return"1m"===e?(t.push({key:"7d",days:7,label:"7D"}),t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"})):"5m"===e?(t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"})):(["15m","30m"].includes(e),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"}),t.push({key:"365d",days:365,label:"1Y"})),t},defaultStartDate:function(){return Wr()().subtract(this.recommendedRange.days,"days")},defaultEndDate:function(){return Wr()()},earliestDate:function(){return Wr()().subtract(this.maxBacktestRange.days,"days")},labelCol:function(){return 0===this.currentStep?{span:9}:{span:6}},wrapperCol:function(){return 0===this.currentStep?{span:15}:{span:18}}},watch:{visible:function(t){var e=this;t?(this.currentStep=0,this.hasResult=!1,this.backtestRunId=null,this.step1CollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.precisionInfo=null,this.selectedDatePreset=null,this.selectedTimeframe=this.timeframe||"1D",this.result={totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},this.$nextTick(function(){e.form&&(e.form.resetFields(),e.trailingEnabledUi=!!e.form.getFieldValue("trailingEnabled"),e.recalcEntryPctMaxUi(),e.selectedDatePreset="30d",e.fetchPrecisionInfo())})):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},created:function(){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:120,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,customRender:function(t){return t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):"--"}},{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:130,scopedSlots:{customRender:"balance"}}]},methods:{recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trendAddEnabled"),e=!!this.form.getFieldValue("dcaAddEnabled"),i=Number(this.form.getFieldValue("trendAddMaxTimes")||0),n=Number(this.form.getFieldValue("dcaAddMaxTimes")||0),r=Number(this.form.getFieldValue("trendAddSizePct")||0),a=Number(this.form.getFieldValue("dcaAddSizePct")||0),o=(t?i*r:0)+(e?n*a:0),s=Math.max(0,Math.min(100,100-o));this.entryPctMaxUi=s}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entryPct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entryPct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dcaAddEnabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trendAddEnabled:!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({trailingStopPct:0,trailingActivationPct:0}))},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={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"),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")};return e[t]||t},disabledStartDate:function(t){return!!t&&(t>Wr()().endOf("day")||tWr()().endOf("day"))return!0;if(tn.endOf("day"))return!0}return!1},applyDatePreset:function(t){this.selectedDatePreset=t.key;var e=Wr()(),i=Wr()().subtract(t.days,"days");this.form.setFieldsValue({startDate:i,endDate:e}),this.fetchPrecisionInfo(i,e)},fetchPrecisionInfo:function(t,e){var i=this;return(0,c.A)((0,l.A)().m(function n(){var r;return(0,l.A)().w(function(n){while(1)switch(n.p=n.n){case 0:if(t&&e||(t=i.form?i.form.getFieldValue("startDate"):null,e=i.form?i.form.getFieldValue("endDate"):null),t||(t=i.defaultStartDate),e||(e=i.defaultEndDate),i.market&&"crypto"===i.market.toLowerCase()){n.n=1;break}return i.precisionInfo={enabled:!1,reason:"only_crypto",message:i.$t("dashboard.indicator.backtest.onlyCryptoSupported")},n.a(2);case 1:return n.p=1,n.n=2,(0,f.Ay)({url:"/api/indicator/backtest/precision-info",method:"post",data:{market:i.market,startDate:t.format("YYYY-MM-DD"),endDate:e.format("YYYY-MM-DD")}});case 2:r=n.v,1===r.code&&r.data&&(i.precisionInfo=r.data),n.n=4;break;case 3:n.p=3,n.v,i.precisionInfo=null;case 4:return n.a(2)}},n,null,[[1,3]])}))()},onTimeframeChange:function(){this.selectedDatePreset="30d";var t=Wr()(),e=Wr()().subtract(30,"days");this.form.setFieldsValue({startDate:e,endDate:t}),this.fetchPrecisionInfo(e,t)},onDateChange:function(){var t=this;this.selectedDatePreset=null,this.$nextTick(function(){t.fetchPrecisionInfo()})},validateDateRange:function(t,e){if(!t||!e)return!0;var i=e.diff(t,"days"),n=this.maxBacktestRange.days||365;return!(i>n)||(this.$message.error(this.$t("dashboard.indicator.backtest.dateRangeExceededDays",{timeframe:this.selectedTimeframe||this.timeframe,maxRange:this.maxBacktestRange.label,maxDays:n})),!1)},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(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}))},handleCancel:function(){this.$emit("cancel")},handlePrev:function(){this.loading||this.currentStep>0&&(this.currentStep-=1)},handleNext:function(){this.loading||(0!==this.currentStep?1===this.currentStep&&this.handleRunBacktest():this.currentStep=1)},handleRerun:function(){this.loading||(this.currentStep=1,this.hasResult=!1,this.backtestRunId=null)},startLoadingAnimation:function(){var t=this,e=[this.$t("dashboard.indicator.backtest.loadingTip1")||"正在获取历史K线数据...",this.$t("dashboard.indicator.backtest.loadingTip2")||"正在执行策略信号计算...",this.$t("dashboard.indicator.backtest.loadingTip3")||"正在模拟交易执行...",this.$t("dashboard.indicator.backtest.loadingTip4")||"正在计算回测指标...",this.$t("dashboard.indicator.backtest.loadingTip5")||"即将完成,请稍候..."],i=0;this.loadingTip=e[0],this.loadingTimer=setInterval(function(){i=(i+1)%e.length,t.loadingTip=e[i]},2e3)},stopLoadingAnimation:function(){this.loadingTimer&&(clearInterval(this.loadingTimer),this.loadingTimer=null),this.loadingTip=""},handleRunBacktest:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i;return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:i=["startDate","endDate","initialCapital","commission","leverage","tradeDirection","slippage"],t.form.validateFields(i,function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,o,s,c;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!i){e.n=1;break}return e.a(2);case 1:if(r=(0,d.A)((0,d.A)({},t.form.getFieldsValue()||{}),n||{}),t.indicator&&t.indicator.id){e.n=2;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noIndicatorCode")),e.a(2);case 2:if(t.symbol){e.n=3;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noSymbol")),e.a(2);case 3:if(t.validateDateRange(n.startDate,n.endDate)){e.n=4;break}return e.a(2);case 4:return t.loading=!0,t.hasResult=!1,t.startLoadingAnimation(),e.p=5,a=function(t){return Number(t||0)/100},o={risk:{stopLossPct:a(r.stopLossPct),takeProfitPct:a(r.takeProfitPct),trailing:{enabled:!!r.trailingEnabled,pct:a(r.trailingStopPct),activationPct:a(r.trailingActivationPct)}},position:{entryPct:a(r.entryPct||0)},scale:{trendAdd:{enabled:!!r.trendAddEnabled,stepPct:a(r.trendAddStepPct),sizePct:a(r.trendAddSizePct),maxTimes:r.trendAddMaxTimes||0},dcaAdd:{enabled:!!r.dcaAddEnabled,stepPct:a(r.dcaAddStepPct),sizePct:a(r.dcaAddSizePct),maxTimes:r.dcaAddMaxTimes||0},trendReduce:{enabled:!!r.trendReduceEnabled,stepPct:a(r.trendReduceStepPct),sizePct:a(r.trendReduceSizePct),maxTimes:r.trendReduceMaxTimes||0},adverseReduce:{enabled:!!r.adverseReduceEnabled,stepPct:a(r.adverseReduceStepPct),sizePct:a(r.adverseReduceSizePct),maxTimes:r.adverseReduceMaxTimes||0}}},s={userid:t.userId||1,indicatorId:t.indicator.id,symbol:t.symbol,market:t.market,timeframe:t.selectedTimeframe||t.timeframe,startDate:n.startDate.format("YYYY-MM-DD"),endDate:n.endDate.format("YYYY-MM-DD"),initialCapital:n.initialCapital,commission:a(n.commission||0),slippage:a(n.slippage||0),leverage:n.leverage||1,tradeDirection:n.tradeDirection||"long",strategyConfig:o,enableMtf:t.market&&"crypto"===t.market.toLowerCase()},e.n=6,(0,f.Ay)({url:"/api/indicator/backtest",method:"post",data:s});case 6:c=e.v,1===c.code&&c.data?(c.data.runId&&(t.backtestRunId=c.data.runId),t.result=c.data.result||c.data,t.hasResult=!0,t.currentStep=2,t.$nextTick(function(){t.renderEquityChart()}),t.$message.success(t.$t("dashboard.indicator.backtest.success"))):t.$message.error(c.msg||t.$t("dashboard.indicator.backtest.failed")),e.n=8;break;case 7:e.p=7,e.v,t.$message.error(t.$t("dashboard.indicator.backtest.failed"));case 8:return e.p=8,t.stopLoadingAnimation(),t.loading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[5,7,8,9]])}));return function(t,i){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.96)",borderColor:"#e8e8e8",borderWidth:1,textStyle:{color:"#333"},formatter:function(t){var e='
'.concat(t[0].axisValue,"
");return t.forEach(function(t){if(void 0!==t.value&&null!==t.value){var i=t.value.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});e+='
\n '.concat(t.marker," ").concat(t.seriesName,'\n $').concat(i,"\n
")}}),e}},legend:{show:!1},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1,axisLine:{lineStyle:{color:"#e8e8e8"}},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,rotate:0,interval:Math.floor(i.length/6)}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#f5f5f5",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,formatter:function(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(0)+"K":t}}},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s,cap:"round",join:"round"},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)},emphasis:{lineStyle:{width:3}}}],animation:!0,animationDuration:800,animationEasing:"cubicOut"};this.equityChart.setOption(c),window.addEventListener("resize",function(){t.equityChart&&t.equityChart.resize()})}}},beforeDestroy:function(){this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},Vr=Hr,Kr=(0,T.A)(Vr,Nr,Or,!1,null,"9d8ac1fc",null),Yr=Kr.exports,Xr=function(){var t=this,e=t._self._c;return e("a-drawer",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":980,maskClosable:!0},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-switch",{model:{value:t.useCurrentFilters,callback:function(e){t.useCurrentFilters=e},expression:"useCurrentFilters"}}),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyUseCurrent"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.loading},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIAnalyze"))+" ")])],1),t.useCurrentFilters?t._e():e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-input",{staticStyle:{width:"220px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"140px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),allowClear:""},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(i){return e("a-select-option",{key:i,attrs:{value:i}},[t._v(t._s(i))])}),1),e("a-button",{attrs:{loading:t.loading},on:{click:t.loadRuns}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyApply")))]),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(t._s(t.filterLabel))])],1),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:10,size:"small"},rowKey:"id",scroll:{x:900},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"range",fn:function(i,n){return[e("span",[t._v(t._s(n.start_date||"")+" ~ "+t._s(n.end_date||""))])]}},{key:"status",fn:function(i){return[e("a-tag",{attrs:{color:"success"===i?"green":"failed"===i?"red":"blue"}},[t._v(" "+t._s("success"===i?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===i?t.$t("dashboard.indicator.backtest.historyStatusFailed"):i)+" ")])]}},{key:"actions",fn:function(i,n){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===n.id},on:{click:function(e){return t.viewRun(n)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")])]}}])}),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.historyAIAnalyzeTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"12px 0"}},[e("a-spin")],1):e("div",{staticStyle:{"white-space":"pre-wrap","font-family":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"}},[t._v(" "+t._s(t.aiResult||t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])],1)},Ur=[],Gr={name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},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:"",useCurrentFilters:!0,filterSymbol:"",filterTimeframe:"",timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[]}},computed:{filterLabel:function(){var t=[];this.indicatorId&&t.push("indicatorId=".concat(this.indicatorId));var e=this.useCurrentFilters?this.market:this.market||"",i=this.useCurrentFilters?this.symbol:this.filterSymbol||"",n=this.useCurrentFilters?this.timeframe:this.filterTimeframe||"";return e&&t.push("market=".concat(e)),i&&t.push("symbol=".concat(i)),n&&t.push("timeframe=".concat(n)),t.length?t.join(" | "):""}},watch:{visible:function(t){t&&(this.initColumns(),this.useCurrentFilters=!0,this.filterSymbol=this.symbol||"",this.filterTimeframe=this.timeframe||"",this.selectedRowKeys=[],this.aiResult="",this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},initColumns:function(){this.columns.length||(this.columns=[{title:this.$t("dashboard.indicator.backtest.historyRunId"),dataIndex:"id",key:"id",width:90},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:140},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:90},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:90},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:220,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyActions"),key:"actions",width:90,scopedSlots:{customRender:"actions"}}])},loadRuns:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,r,a;return(0,l.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,i=t.useCurrentFilters?t.symbol:t.filterSymbol||"",n=t.useCurrentFilters?t.timeframe:t.filterTimeframe||"",r=t.market||"",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/history",method:"get",params:{userid:t.userId,limit:100,offset:0,indicatorId:t.indicatorId,symbol:i,market:r,timeframe:n}});case 3:a=e.v,a&&1===a.code&&Array.isArray(a.data)?t.runs=a.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,l.A)().m(function i(){var n;return(0,l.A)().w(function(i){while(1)switch(i.p=i.n){case 0:if(t&&t.id){i.n=1;break}return i.a(2);case 1:return e.detailLoadingId=t.id,i.p=2,i.n=3,(0,f.Ay)({url:"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:n=i.v,n&&1===n.code&&n.data&&e.$emit("view",n.data);case 4:return i.p=4,e.detailLoadingId=null,i.f(4);case 5:return i.a(2)}},i,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId&&t.selectedRowKeys.length){e.n=1;break}return e.a(2);case 1:return t.analyzing=!0,t.showAIResult=!0,t.aiResult="",e.p=2,i=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",data:{userid:t.userId,runIds:t.selectedRowKeys,lang:i}});case 3:n=e.v,n&&1===n.code&&n.data&&n.data.analysis?t.aiResult=n.data.analysis:t.aiResult=n.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult");case 4:return e.p=4,t.analyzing=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()}}},jr=Gr,qr=(0,T.A)(jr,Xr,Ur,!1,null,null,null),Zr=qr.exports,Jr=function(){var t,e,i,n=this,r=n._self._c;return r("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:n.modalTitle,visible:n.visible,width:1100,maskClosable:!1},on:{cancel:function(t){return n.$emit("cancel")}}},[n.run&&n.run.result?r("div",[n.run.id?r("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:n.$t("dashboard.indicator.backtest.savedRunId",{id:n.run.id})}}):n._e(),r("div",{staticClass:"metrics-cards"},[r("div",{staticClass:"metric-card",class:{positive:n.result.totalReturn>0,negative:n.result.totalReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.totalReturn)))]),r("div",{staticClass:"metric-amount"},[n._v(n._s(n.formatMoney(n.result.totalProfit)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.annualReturn>0,negative:n.result.annualReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.annualReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.annualReturn)))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.maxDrawdown")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.maxDrawdown)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.sharpeRatio")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(t=n.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.winRate")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.winRate)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.profitFactor>=1.5,negative:n.result.profitFactor<1}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.profitFactor")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(e=n.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalTrades")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(null!==(i=n.result.totalTrades)&&void 0!==i?i:0))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalCommission")))]),r("div",{staticClass:"metric-value"},[n._v("-$"+n._s(n.result.totalCommission?n.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),r("div",{staticClass:"chart-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.equityCurve")))]),r("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),r("div",{staticClass:"trades-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.tradeHistory")))]),r("a-table",{attrs:{columns:n.tradeColumns,"data-source":n.result.trades||[],pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:n.rowKey},scopedSlots:n._u([{key:"type",fn:function(t){return[r("a-tag",{attrs:{color:n.getTradeTypeColor(t)}},[n._v(" "+n._s(n.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[r("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[n._v(" $"+n._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[r("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":"#666"}},[n._v(" "+n._s(n.formatMoney(t))+" ")])]}}])})],1)],1):r("div",{staticStyle:{padding:"12px 0"}},[r("a-empty",{attrs:{description:n.$t("dashboard.indicator.backtest.historyNoData")}})],1),r("template",{slot:"footer"},[r("a-button",{on:{click:function(t){return n.$emit("cancel")}}},[n._v(n._s(n.$t("dashboard.indicator.backtest.close")))])],1)],2)},Qr=[],ta={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=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1},yAxis:{type:"value"},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)}}]};this.equityChart.setOption(c),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},ea=ta,ia=(0,T.A)(ea,Jr,Qr,!1,null,"a484239a",null),na=ia.exports,ra=i(85916),aa={name:"DashboardIndicator",components:{IndicatorEditor:M,KlineChart:Br,BacktestModal:Yr,BacktestHistoryDrawer:Zr,BacktestRunViewer:na,QuickTradePanel:ra.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),r=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),b=(0,h.KR)(!1),x=(0,h.KR)(""),_=(0,h.KR)(!1),w=(0,h.KR)(!1),C=(0,h.KR)(!1),S=(0,h.KR)(""),k=(0,h.KR)(""),A=(0,h.KR)([]),T=(0,h.KR)(!1),I=(0,h.KR)([]),M=(0,h.KR)(!1),E=(0,h.KR)(null),D=(0,h.KR)(null),P=(0,h.KR)([]),L=(0,h.KR)(!1),R=(0,h.KR)(!1),F=(0,h.KR)(""),B=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(K.value||"").toLowerCase()}),z=function(){O.value?(F.value=V.value||"",N.value=parseFloat(Y.value)||0,B.value="",R.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},W=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},$=function(t){t&&O.value&&(F.value=t)},H=function(){i&&i.$router&&i.$router.push("/indicator-community")},V=(0,h.KR)(""),K=(0,h.KR)(""),Y=(0,h.KR)("--"),X=(0,h.KR)(0),U=(0,h.EW)(function(){return X.value>0?"color-up":X.value<0?"color-down":""}),G=(0,h.KR)("1D"),j=(0,h.KR)([]),q=(0,h.KR)(!1),Z=[{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),rt=(0,h.KR)(""),at=(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),ft=(0,h.KR)(null),vt=(0,h.KR)(!1),gt=(0,h.KR)(null),mt=(0,h.KR)(!1),yt=(0,h.KR)(null),bt=(0,h.KR)(!1),xt=(0,h.KR)(null),_t=(0,h.KR)(!1),wt=(0,h.KR)(!1),Ct=(0,h.KR)("free"),St=(0,h.KR)(10),kt=(0,h.KR)(""),At=(0,h.KR)(!1),Tt={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},It=(0,h.KR)(!1),Mt=function(t){var e=t.price,i=t.change;Y.value=e,X.value=i},Et=function(){},Dt=(0,h.KR)([]),Pt=(0,h.KR)([]),Lt=function(t){G.value=t},Rt=function(t){return t?Object.values(t).join(", "):""},Ft=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r.value=!0,t.p=1,a=(0,h.nI)(),o=null===a||void 0===a||null===(e=a.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,r.value=!1,Bt(),re(),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),Bt(),re()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,r.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Bt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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 b.value=!0,t.p=2,t.n=3,(0,v.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&&!V.value&&(r=y.value[0],K.value=r.market,V.value=r.symbol,p.value=r.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,b.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(){x.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(x.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(x.value.toLowerCase())}):m.value=y.value},Ot=function(t){x.value=t,0===y.value.length&&t&&(_.value=!0),Nt()},zt=function(t){_.value=t,t||(x.value="")},Wt=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),r=n[0],a=n[1];e={market:r,symbol:a,value:t}}e&&(K.value=e.market,V.value=e.symbol,p.value=e.value)}},$t=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,v.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?P.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)?P.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):P.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"}],P.value.length>0&&!S.value&&(S.value=P.value[0].value),t.n=3;break;case 2:t.p=2,t.v,P.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)}}(),Vt=function(){w.value=!1,E.value=null,k.value="",A.value=[],L.value=!1,S.value=P.value.length>0?P.value[0].value:""},Kt=function(t){S.value=t,k.value="",A.value=[],E.value=null,L.value=!1,qt(t)},Yt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return A.value=[],L.value=!1,void(E.value=null);D.value=setTimeout(function(){Ut(e)},500)},Xt=function(t){t&&t.trim()&&(S.value?A.value.length>0||(L.value&&0===A.value.length?Gt():Ut(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},Ut=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 A.value=[],L.value=!1,t.a(2);case 1:if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return T.value=!0,L.value=!0,t.p=3,t.n=4,(0,v._3)({market:S.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?A.value=n.data:(A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,T.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)}}(),Gt=function(){k.value&&k.value.trim()?S.value?E.value={market:S.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"))},jt=function(t){E.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},qt=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=S.value||(P.value.length>0?P.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return M.value=!0,t.p=2,t.n=3,(0,v.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?I.value=i.data:I.value=[],t.n=5;break;case 4:t.p=4,t.v,I.value=[];case 5:return t.p=5,M.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)}}(),Zt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",r="",!E.value){t.n=1;break}e=E.value.market,r=E.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=S.value,r=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 C.value=!0,t.p=5,t.n=6,(0,v.dp)({userid:n.value,market:e,symbol:r});case 6:if(a=t.v,!a||1!==a.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),Vt(),t.n=7,Bt();case 7:t.n=9;break;case 8:u.A.error((null===a||void 0===a?void 0:a.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,C.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||{};j.value.push((0,d.A)((0,d.A)({},t),{},{id:t.id,params:(0,d.A)({},e)}))}},Qt=function(t){j.value=j.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?Z.some(function(t){return j.value.some(function(e){return e.id===t.id})}):"ema"===t?J.some(function(t){return j.value.some(function(e){return e.id===t.id})}):j.value.some(function(e){return e.id===t})},ne=function(){var t=new Set;return Z.forEach(function(e){return t.add(e.id)}),J.forEach(function(e){return t.add(e.id)}),j.value.filter(function(e){return!t.has(e.id)})},re=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r;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,f.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}),r=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=r.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)}}(),ae=(0,h.KR)(null),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var r,a,o,s,c,h,p,f,v;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ie(r)){t.n=1;break}return Qt(r),t.a(2);case 1:if(t.p=1,a=e.code||"",ae.value){t.n=2;break}return u.A.error(i.$t("dashboard.indicator.error.chartNotReady")),t.a(2);case 2:if("function"===typeof ae.value.parsePythonStrategy){t.n=3;break}return u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady")),t.a(2);case 3:if("function"===typeof ae.value.executePythonStrategy){t.n=4;break}return u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady")),t.a(2);case 4:if(o=ae.value.parsePythonStrategy(a),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=a,h=(0,d.A)({},s),p={id:r,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 ae.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})}},f=(0,d.A)((0,d.A)({},o.params),s),j.value.push((0,d.A)((0,d.A)({},p),{},{params:f})),t.n=7;break;case 6:t.p=6,v=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(v.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 r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ie(r)){t.n=1;break}Qt(r),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:a=t.v,a&&1===a.code&&Array.isArray(a.data)&&a.data.length>0?(at.value=a.data,o="".concat(n,"-").concat(e.id),s=lt.value[o],c={},a.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,rt.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(rt.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,rt.value)}it.value=!1,nt.value=null,rt.value=""},ce=function(){ue(),it.value=!1,setTimeout(function(){nt.value=null,rt.value=""},100)},ue=function(){if(nt.value&&rt.value){var t="".concat(rt.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(!ae.value)return void u.A.error(i.$t("dashboard.indicator.error.chartNotReady"));if("function"!==typeof ae.value.parsePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady"));if("function"!==typeof ae.value.executePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady"));var r=ae.value.parsePythonStrategy(e);if(!r)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var a={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:r,calculate:function(t,i){var n=e;return ae.value.executePythonStrategy(n,t,i)}},o=j.value.findIndex(function(t){return"temp-editor-indicator"===t.id});o>=0&&j.value.splice(o,1),j.value.push((0,d.A)((0,d.A)({},a),{},{params:(0,d.A)({},r.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},fe=function(t){ht.value=t,dt.value=!0},ve=function(){ct.value=!ct.value},ge=function(t){a.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 r,a,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,f.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(r=e.v,1!==r.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),a="custom-"+t.id,ie(a)&&Qt(a),e.n=2,re();case 2:e.n=4;break;case 3:u.A.error(r.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 r(){return e.apply(this,arguments)}return r}()})},me=function(t){ft.value=(0,d.A)({},t),pt.value=!0},ye=function(t){gt.value=(0,d.A)({},t),vt.value=!0},be=function(t){yt.value=t,mt.value=!0},xe=function(t){xt.value=(0,d.A)({},t),Ct.value=t.pricing_type||"free",St.value=t.price||10,kt.value=t.description||"",At.value=!!t.vip_free,bt.value=!0},_e=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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 _t.value=!0,t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:xt.value.id,code:xt.value.code,name:xt.value.name,description:kt.value,publishToCommunity:!0,pricingType:Ct.value,price:"paid"===Ct.value?St.value:0,vipFree:"paid"===Ct.value&&At.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),bt.value=!1,xt.value=null,t.n=4,re();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,r=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(r.message||""));case 8:return t.p=8,_t.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),we=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&&xt.value){t.n=1;break}return t.a(2);case 1:return wt.value=!0,t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:xt.value.id,code:xt.value.code,name:xt.value.name,description:xt.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")),bt.value=!1,xt.value=null,t.n=4,re();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 r,a,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 r=i.$refs.indicatorEditor,r&&(r.saving=!0),t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(a=t.v,1!==a.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),dt.value=!1,ht.value=null,t.n=4,re();case 4:t.n=6;break;case 5:u.A.error(a.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,r&&(r.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)}}(),Se=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&&!S.value&&(S.value=P.value[0].value),S.value&&qt(S.value)):(E.value=null,k.value="",A.value=[],L.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return ot.value},function(t){if(it.value&&nt.value&&rt.value){var e="".concat(rt.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:ae,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:x,symbolSearchOpen:_,currentSymbol:V,currentMarket:K,currentPrice:Y,priceChange:X,priceChangeClass:U,timeframe:G,loadingWatchlist:b,activeIndicators:j,trendIndicators:Dt,oscillatorIndicators:Pt,customIndicators:Q,purchasedIndicators:tt,loadingIndicators:et,realtimeEnabled:It,toggleRealtime:Ee,handleSymbolSearch:Ot,handleSymbolSelect:Wt,handleDropdownVisibleChange:zt,filterSymbolOption:$t,getMarketName:Ie,getMarketColor:Me,setTimeframe:Lt,addIndicator:Jt,removeIndicator:Qt,isIndicatorActive:ie,loadIndicators:re,addPythonIndicator:oe,toggleIndicator:se,getIndicatorStatus:Se,getIndicatorStatusIcon:ke,getIndicatorStatusClass:Ae,getExpiryTimeText:Te,formatParams:Rt,loadWatchlist:Bt,getCustomActiveIndicators:ne,showIndicatorEditor:dt,editingIndicator:ht,handleCreateIndicator:pe,handleRunIndicator:he,handleSaveIndicator:Ce,handleEditIndicator:fe,handleDeleteIndicator:ge,toggleCustomSection:ve,customSectionCollapsed:ct,purchasedSectionCollapsed:ut,handlePriceChange:Mt,handleChartRetry:Et,handleIndicatorToggle:te,showParamsModal:it,pendingIndicator:nt,indicatorParams:at,indicatorParamValues:ot,loadingParams:st,confirmIndicatorParams:le,cancelIndicatorParams:ce,handleParamsModalAfterClose:de,showBacktestModal:pt,backtestIndicator:ft,handleOpenBacktest:me,showBacktestHistoryDrawer:vt,backtestHistoryIndicator:gt,handleOpenBacktestHistory:ye,showBacktestRunViewer:mt,selectedBacktestRun:yt,handleViewBacktestRun:be,showPublishModal:bt,publishIndicator:xt,publishing:_t,unpublishing:wt,publishPricingType:Ct,publishPrice:St,publishDescription:kt,publishVipFree:At,publishRules:Tt,handlePublishIndicator:xe,handleConfirmPublish:_e,handleUnpublish:we,selectedSymbol:V,selectedMarket:K,selectedTimeframe:G,isMobile:q,showAddStockModal:w,addingStock:C,selectedMarketTab:S,symbolSearchKeyword:k,symbolSearchResults:A,searchingSymbols:T,hotSymbols:I,loadingHotSymbols:M,selectedSymbolForAdd:E,marketTypes:P,hasSearched:L,handleCloseAddStockModal:Vt,handleMarketTabChange:Kt,handleSymbolSearchInput:Yt,handleSearchOrInput:Xt,searchSymbolsInModal:Ut,selectSymbol:jt,loadHotSymbols:qt,handleAddStock:Zt,handleDirectAdd:Gt,loadMarketTypes:Ht,showQuickTrade:R,qtSymbol:F,qtSide:B,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:W,handleQuickTradeSymbolChange:$,goToIndicatorMarket:H}}},oa=aa,sa=(0,T.A)(oa,n,r,!1,null,"b17e86c2",null),la=sa.exports},35038:function(t,e,i){"use strict";i.d(e,{Qo:function(){return a},_3:function(){return u},dp:function(){return o},iO:function(){return c},mk:function(){return s},ms:function(){return l},z6:function(){return d}});var n=i(75769),r={GetWatchlist:"/api/market/watchlist/get",AddWatchlist:"/api/market/watchlist/add",RemoveWatchlist:"/api/market/watchlist/remove",GetWatchlistPrices:"/api/market/watchlist/prices",MultiAnalysis:"/api/analysis/multiAnalysis",CreateAnalysisTask:"/api/analysis/createTask",GetAnalysisTaskStatus:"/api/analysis/getTaskStatus",GetAnalysisHistoryList:"/api/analysis/getHistoryList",DeleteAnalysisTask:"/api/analysis/deleteTask",ReflectAnalysis:"/api/analysis/reflect",ChatMessage:"/api/ai/chat/message",GetChatHistory:"/api/ai/chat/history",SaveChatHistory:"/api/ai/chat/history/save",GetConfig:"/api/market/config",GetMenuFooterConfig:"/api/market/menuFooterConfig",GetMarketTypes:"/api/market/types",SearchSymbols:"/api/market/symbols/search",GetHotSymbols:"/api/market/symbols/hot"};function a(t){return(0,n.Ay)({url:r.GetWatchlist,method:"get",params:t})}function o(t){return(0,n.Ay)({url:r.AddWatchlist,method:"post",data:t})}function s(t){return(0,n.Ay)({url:r.RemoveWatchlist,method:"post",data:t})}function l(t){return(0,n.Ay)({url:r.GetWatchlistPrices,method:"get",params:{watchlist:JSON.stringify(t.watchlist||[])}})}function c(){return(0,n.Ay)({url:r.GetMarketTypes,method:"get"})}function u(t){return(0,n.Ay)({url:r.SearchSymbols,method:"get",params:t})}function d(t){return(0,n.Ay)({url:r.GetHotSymbols,method:"get",params:t})}},36308:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,r=e.algo,a=r.SHA256,o=r.SHA224=a.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=a._createHelper(o),e.HmacSHA224=a._createHmacHelper(o)}(),t.SHA224})},38454:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e}(),t.mode.ECB})},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,r=i.WordArray,a=e.algo,o=a.MD5,s=a.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,a=n.hasher.create(),o=r.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.length>>8^255&r^99,a[i]=r,o[r]=i;var v=t[i],g=t[v],m=t[g],y=257*t[r]^16843008*r;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*v^16843008*i;d[r]=y<<24|y>>>8,h[r]=y<<16|y>>>16,p[r]=y<<8|y>>>24,f[r]=y,i?(i=v^t[t[t[m^v]]],n^=t[t[n]]):i=n=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],g=r.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,r=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u]):(u=u<<8|u>>>24,u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u],u^=v[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[a[u>>>16&255]]^p[a[u>>>8&255]]^f[a[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,a)},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,f,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,r,a,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,f=1;f>>24]^r[u>>>16&255]^a[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^r[d>>>16&255]^a[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^r[h>>>16&255]^a[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^r[c>>>16&255]^a[u>>>8&255]^o[255&d]^i[p++];c=v,u=g,d=m,h=y}v=(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]=v,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},42073:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.AnsiX923={pad:function(t,e){var i=t.sigBytes,n=4*e,r=n-i%n,a=i+r-1;t.clamp(),t.words[a>>>2]|=r<<24-a%4*8,t.sigBytes+=r},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923})},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,r=e.algo;const a=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,r=e>>8&255,a=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][r],o+=t.sbox[3][a],o}function u(t,e,i){let n,r=e,o=i;for(let s=0;s1;--s)r^=t.pbox[s],o=c(t,r)^o,n=r,r=o,o=n;return n=r,r=o,o=n,o^=t.pbox[1],r^=t.pbox[0],{left:r,right:o}}function h(t,e,i){for(let a=0;a<4;a++){t.sbox[a]=[];for(let e=0;e<256;e++)t.sbox[a][e]=s[a][e]}let n=0;for(let s=0;s=i&&(n=0);let r=0,l=0,c=0;for(let o=0;o>>31}var d=(n<<5|n>>>27)+l+o[c];d+=c<20?1518500249+(r&a|~r&s):c<40?1859775393+(r^a^s):c<60?(r&a|r&s|a&s)-1894007588:(r^a^s)-899497514,l=s,s=a,a=r<<30|r>>>2,r=n,n=d}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+s|0,i[4]=i[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(i/4294967296),e[15+(n+64>>>9<<4)]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s)}(),t.SHA1})},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,r=e.enc;r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=t.charCodeAt(r)<<16-r%2*16;return n.create(i,2*e)}};function a(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=a(t.charCodeAt(r)<<16-r%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},45953:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.x64,s=o.Word,l=i.algo,c=[],u=[],d=[];(function(){for(var t=1,e=0,i=0;i<24;i++){c[t+5*e]=(i+1)*(i+2)/2%64;var n=e%5,r=(2*t+3*e)%5;t=n,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var a=1,o=0;o<24;o++){for(var l=0,h=0,p=0;p<7;p++){if(1&a){var f=(1<>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);var s=i[r];s.high^=o,s.low^=a}for(var l=0;l<24;l++){for(var p=0;p<5;p++){for(var f=0,v=0,g=0;g<5;g++){s=i[p+5*g];f^=s.high,v^=s.low}var m=h[p];m.high=f,m.low=v}for(p=0;p<5;p++){var y=h[(p+4)%5],b=h[(p+1)%5],x=b.high,_=b.low;for(f=y.high^(x<<1|_>>>31),v=y.low^(_<<1|x>>>31),g=0;g<5;g++){s=i[p+5*g];s.high^=f,s.low^=v}}for(var w=1;w<25;w++){s=i[w];var C=s.high,S=s.low,k=c[w];k<32?(f=C<>>32-k,v=S<>>32-k):(f=S<>>64-k,v=C<>>64-k);var A=h[u[w]];A.high=f,A.low=v}var T=h[0],I=i[0];T.high=I.high,T.low=I.low;for(p=0;p<5;p++)for(g=0;g<5;g++){w=p+5*g,s=i[w];var M=h[w],E=h[(p+1)%5+5*g],D=h[(p+2)%5+5*g];s.high=M.high^~E.high&D.high,s.low=M.low^~E.low&D.low}s=i[0];var P=d[l];s.high^=P.high,s.low^=P.low}},_doFinalize:function(){var t=this._data,i=t.words,n=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;i[n>>>5]|=1<<24-n%32,i[(e.ceil((n+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*i.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new r.init(c,s)},clone:function(){for(var t=a.clone.call(this),e=t._state=this._state.slice(0),i=0;i<25;i++)e[i]=e[i].clone();return t}});i.SHA3=a._createHelper(p),i.HmacSHA3=a._createHmacHelper(p)}(Math),t.SHA3})},50436:function(t,e,i){(function(t){t(i(15237))})(function(t){"use strict";var e="CodeMirror-activeline",i="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function r(t){for(var r=0;rn&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),o=this._iKey=e.clone(),s=r.words,l=o.words,c=0;c=0;i--)if(e[i>>>2]>>>24-i%4*8&255){t.sigBytes=i+1;break}}},t.pad.ZeroPadding})},54905:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso10126={pad:function(e,i){var n=4*i,r=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(r-1)).concat(t.lib.WordArray.create([r<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126})},55218:function(t,e,i){(function(t){t(i(15237))})(function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},i=t.Pos;function n(t,i){return"pairs"==i&&"string"==typeof t?t:"object"==typeof t&&null!=t[i]?t[i]:e[i]}t.defineOption("autoCloseBrackets",!1,function(e,i,o){o&&o!=t.Init&&(e.removeKeyMap(r),e.state.closeBrackets=null),i&&(a(n(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(r))});var r={Backspace:l,Enter:c};function a(t){for(var e=0;e=0;l--){var u=o[l].head;e.replaceRange("",i(u.line,u.ch-1),i(u.line,u.ch+1),"+delete")}}function c(e){var i=s(e),r=i&&n(i,"explode");if(!r||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),o=0;o0?{line:o.head.line,ch:o.head.ch+e}:{line:o.head.line-1};i.push({anchor:s,head:s})}t.setSelections(i,r)}function d(e){var n=t.cmpPos(e.anchor,e.head)>0;return{anchor:new i(e.anchor.line,e.anchor.ch+(n?-1:1)),head:new i(e.head.line,e.head.ch+(n?1:-1))}}function h(e,r){var a=s(e);if(!a||e.getOption("disableInput"))return t.Pass;var o=n(a,"pairs"),l=o.indexOf(r);if(-1==l)return t.Pass;for(var c,h=n(a,"closeBefore"),p=n(a,"triples"),v=o.charAt(l+1)==r,g=e.listSelections(),m=l%2==0,y=0;y1&&p.indexOf(r)>=0&&e.getRange(i(_.line,_.ch-2),_)==r+r){if(_.ch>2&&/\bstring/.test(e.getTokenTypeAt(i(_.line,_.ch-2))))return t.Pass;b="addFour"}else if(v){var C=0==_.ch?" ":e.getRange(i(_.line,_.ch-1),_);if(t.isWordChar(w)||C==r||t.isWordChar(C))return t.Pass;b="both"}else{if(!m||!(0===w.length||/\s/.test(w)||h.indexOf(w)>-1))return t.Pass;b="both"}else b=v&&f(e,_)?"both":p.indexOf(r)>=0&&e.getRange(_,i(_.line,_.ch+3))==r+r+r?"skipThree":"skip";if(c){if(c!=b)return t.Pass}else c=b}var S=l%2?o.charAt(l-1):r,k=l%2?r:o.charAt(l+1);e.operation(function(){if("skip"==c)u(e,1);else if("skipThree"==c)u(e,3);else if("surround"==c){for(var t=e.getSelections(),i=0;i>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:f,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=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},b=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?a.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=a.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},x=n.SerializableCipher=r.extend({cfg:r.extend({format:b}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=t.createEncryptor(i,n),a=r.finalize(e),o=r.cfg;return m.create({ciphertext:a,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 r=t.createDecryptor(i,n).finalize(e.ciphertext);return r},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),_=i.kdf={},w=_.OpenSSL={execute:function(t,e,i,n,r){if(n||(n=a.random(8)),r)o=u.create({keySize:e+i,hasher:r}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=a.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},C=n.PasswordBasedCipher=x.extend({cfg:x.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=r.iv;var a=x.encrypt.call(this,t,e,r.key,n);return a.mixIn(r),a},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var r=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=r.iv;var a=x.decrypt.call(this,t,e,r.key,n);return a}})}()})},58124:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})},63009:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.algo,s=[],l=[];(function(){function t(t){for(var i=e.sqrt(t),n=2;n<=i;n++)if(!(t%n))return!1;return!0}function i(t){return 4294967296*(t-(0|t))|0}var n=2,r=0;while(r<64)t(n)&&(r<8&&(s[r]=i(e.pow(n,.5))),l[r]=i(e.pow(n,1/3)),r++),n++})();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],u=i[5],d=i[6],h=i[7],p=0;p<64;p++){if(p<16)c[p]=0|t[e+p];else{var f=c[p-15],v=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[p-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=v+c[p-7]+m+c[p-16]}var y=s&u^~s&d,b=n&r^n&a^r&a,x=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),_=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),w=h+_+y+l[p]+c[p],C=x+b;h=d,d=u,u=s,s=o+w|0,o=a,a=r,r=n,n=w+C|0}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+s|0,i[5]=i[5]+u|0,i[6]=i[6]+d|0,i[7]=i[7]+h|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=e.floor(n/4294967296),i[15+(r+64>>>9<<4)]=n,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=a._createHelper(u),i.HmacSHA256=a._createHmacHelper(u)}(Math),t.SHA256})},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,r=e.enc;r.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,r=e?this._safe_map:this._map;t.clamp();for(var a=[],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=r.charAt(64);if(h)while(a.length%4)a.push(h);return a.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64url})},70019:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,r=i.WordArray,a=e.algo,o=a.SHA256,s=a.HMAC,l=a.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i=this.cfg,n=s.create(i.hasher,t),a=r.create(),o=r.create([1]),l=a.words,c=o.words,u=i.keySize,d=i.iterations;while(l.length=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;dn?S(e):r0&&A(t,e)&&(o+=" "+l),o}return _(t,e)}function _(t,e,n){if(t.eatSpace())return null;if(!n&&t.match(/^#.*/))return"comment";if(t.match(/^[0-9\.]/,!1)){var r=!1;if(t.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),t.match(/^[\d_]+\.\d*/)&&(r=!0),t.match(/^\.\d+/)&&(r=!0),r)return t.eat(/J/i),"number";var a=!1;if(t.match(/^0x[0-9a-f_]+/i)&&(a=!0),t.match(/^0b[01_]+/i)&&(a=!0),t.match(/^0o[0-7_]+/i)&&(a=!0),t.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(t.eat(/J/i),a=!0),t.match(/^0(?![\dx])/i)&&(a=!0),a)return t.eat(/L/i),"number"}if(t.match(m)){var o=-1!==t.current().toLowerCase().indexOf("f");return o?(e.tokenize=w(t.current(),e.tokenize),e.tokenize(t,e)):(e.tokenize=C(t.current(),e.tokenize),e.tokenize(t,e))}for(var s=0;s=0)t=t.substr(1);var i=1==t.length,n="string";function r(t){return function(e,i){var n=_(e,i,!0);return"punctuation"==n&&("{"==e.current()?i.tokenize=r(t+1):"}"==e.current()&&(i.tokenize=t>1?r(t-1):a)),n}}function a(a,o){while(!a.eol())if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),i&&a.eol())return n}else{if(a.match(t))return o.tokenize=e,n;if(a.match("{{"))return n;if(a.match("{",!1))return o.tokenize=r(0),a.current()?n:o.tokenize(a,o);if(a.match("}}"))return n;if(a.match("}"))return l;a.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;o.tokenize=e}return n}return a.isString=!0,a}function C(t,e){while("rubf".indexOf(t.charAt(0).toLowerCase())>=0)t=t.substr(1);var i=1==t.length,n="string";function r(r,a){while(!r.eol())if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),i&&r.eol())return n}else{if(r.match(t))return a.tokenize=e,n;r.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;a.tokenize=e}return n}return r.isString=!0,r}function S(t){while("py"!=a(t).type)t.scopes.pop();t.scopes.push({offset:a(t).offset+o.indentUnit,type:"py",align:null})}function k(t,e,i){var n=t.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:t.column()+1;e.scopes.push({offset:e.indent+h,type:i,align:n})}function A(t,e){var i=t.indentation();while(e.scopes.length>1&&a(e).offset>i){if("py"!=a(e).type)return!0;e.scopes.pop()}return a(e).offset!=i}function T(t,e){t.sol()&&(e.beginningOfLine=!0,e.dedent=!1);var i=e.tokenize(t,e),n=t.current();if(e.beginningOfLine&&"@"==n)return t.match(g,!1)?"meta":v?"operator":l;if(/\S/.test(n)&&(e.beginningOfLine=!1),"variable"!=i&&"builtin"!=i||"meta"!=e.lastToken||(i="meta"),"pass"!=n&&"return"!=n||(e.dedent=!0),"lambda"==n&&(e.lambda=!0),":"==n&&!e.lambda&&"py"==a(e).type&&t.match(/^\s*(?:#|$)/,!1)&&S(e),1==n.length&&!/string|comment/.test(i)){var r="[({".indexOf(n);if(-1!=r&&k(t,e,"])}".slice(r,r+1)),r="])}".indexOf(n),-1!=r){if(a(e).type!=n)return l;e.indent=e.scopes.pop().offset-h}}return e.dedent&&t.eol()&&"py"==a(e).type&&e.scopes.length>1&&e.scopes.pop(),i}var I={startState:function(t){return{tokenize:x,scopes:[{offset:t||0,type:"py",align:null}],indent:t||0,lastToken:null,lambda:!1,dedent:0}},token:function(t,e){var i=e.errorToken;i&&(e.errorToken=!1);var n=T(t,e);return n&&"comment"!=n&&(e.lastToken="keyword"==n||"punctuation"==n?t.current():n),"punctuation"==n&&(n=null),t.eol()&&e.lambda&&(e.lambda=!1),i?n+" "+l:n},indent:function(e,i){if(e.tokenize!=x)return e.tokenize.isString?t.Pass:0;var n=a(e),r=n.type==i.charAt(0)||"py"==n.type&&!e.dedent&&/^(else:|elif |except |finally:)/.test(i);return null!=n.align?n.align-(r?1:0):n.offset-(r?h:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return I}),t.defineMIME("text/x-python","python");var o=function(t){return t.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:o("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})},77193: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.StreamCipher,r=e.algo,a=r.RC4=n.extend({_doReset:function(){for(var t=this._key,e=t.words,i=t.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var a=0;r<256;r++){var o=r%i,s=e[o>>>2]>>>24-o%4*8&255;a=(a+n[r]+s)%256;var l=n[r];n[r]=n[a],n[a]=l}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,i=this._j,n=0,r=0;r<4;r++){e=(e+1)%256,i=(i+t[e])%256;var a=t[e];t[e]=t[i],t[i]=a,n|=t[(t[e]+t[i])%256]<<24-8*r}return this._i=e,this._j=i,n}e.RC4=n._createHelper(a);var s=r.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});e.RC4Drop=n._createHelper(s)}(),t.RC4})},78056:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){ +/** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +return function(){var e=t,i=e.lib,n=i.WordArray,r=i.Hasher,a=e.algo,o=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,r=t[n];t[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a,h,b,x,_,w,C,S,k,A,T,I=this._hash.words,M=u.words,E=d.words,D=o.words,P=s.words,L=l.words,R=c.words;w=a=I[0],C=h=I[1],S=b=I[2],k=x=I[3],A=_=I[4];for(i=0;i<80;i+=1)T=a+t[e+D[i]]|0,T+=i<16?p(h,b,x)+M[0]:i<32?f(h,b,x)+M[1]:i<48?v(h,b,x)+M[2]:i<64?g(h,b,x)+M[3]:m(h,b,x)+M[4],T|=0,T=y(T,L[i]),T=T+_|0,a=_,_=x,x=y(b,10),b=h,h=T,T=w+t[e+P[i]]|0,T+=i<16?m(C,S,k)+E[0]:i<32?g(C,S,k)+E[1]:i<48?v(C,S,k)+E[2]:i<64?f(C,S,k)+E[3]:p(C,S,k)+E[4],T|=0,T=y(T,R[i]),T=T+A|0,w=A,A=k,k=y(S,10),S=C,C=T;T=I[1]+b+k|0,I[1]=I[2]+x+A|0,I[2]=I[3]+_+w|0,I[3]=I[4]+a+C|0,I[4]=I[0]+h+S|0,I[0]=T},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(e.length+1),this._process();for(var r=this._hash,a=r.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,i){return t^e^i}function f(t,e,i){return t&e|~t&i}function v(t,e,i){return(t|~e)^i}function g(t,e,i){return t&i|e&~i}function m(t,e,i){return t^(e|~i)}function y(t,e){return t<>>32-e}e.RIPEMD160=r._createHelper(h),e.HmacRIPEMD160=r._createHmacHelper(h)}(Math),t.RIPEMD160})},80754: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,r=e.enc;r.Base64={stringify:function(t){var e=t.words,i=t.sigBytes,n=this._map;t.clamp();for(var r=[],a=0;a>>2]>>>24-a%4*8&255,s=e[a+1>>>2]>>>24-(a+1)%4*8&255,l=e[a+2>>>2]>>>24-(a+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&a+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(r.length%4)r.push(d);return r.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var r=0;r>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64})},81380:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Hasher,r=e.x64,a=r.Word,o=r.WordArray,s=e.algo;function l(){return a.create.apply(a,arguments)}var c=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var t=0;t<80;t++)u[t]=l()})();var d=s.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],l=i[5],d=i[6],h=i[7],p=n.high,f=n.low,v=r.high,g=r.low,m=a.high,y=a.low,b=o.high,x=o.low,_=s.high,w=s.low,C=l.high,S=l.low,k=d.high,A=d.low,T=h.high,I=h.low,M=p,E=f,D=v,P=g,L=m,R=y,F=b,B=x,N=_,O=w,z=C,W=S,$=k,H=A,V=T,K=I,Y=0;Y<80;Y++){var X,U,G=u[Y];if(Y<16)U=G.high=0|t[e+2*Y],X=G.low=0|t[e+2*Y+1];else{var j=u[Y-15],q=j.high,Z=j.low,J=(q>>>1|Z<<31)^(q>>>8|Z<<24)^q>>>7,Q=(Z>>>1|q<<31)^(Z>>>8|q<<24)^(Z>>>7|q<<25),tt=u[Y-2],et=tt.high,it=tt.low,nt=(et>>>19|it<<13)^(et<<3|it>>>29)^et>>>6,rt=(it>>>19|et<<13)^(it<<3|et>>>29)^(it>>>6|et<<26),at=u[Y-7],ot=at.high,st=at.low,lt=u[Y-16],ct=lt.high,ut=lt.low;X=Q+st,U=J+ot+(X>>>0>>0?1:0),X+=rt,U=U+nt+(X>>>0>>0?1:0),X+=ut,U=U+ct+(X>>>0>>0?1:0),G.high=U,G.low=X}var dt=N&z^~N&$,ht=O&W^~O&H,pt=M&D^M&L^D&L,ft=E&P^E&R^P&R,vt=(M>>>28|E<<4)^(M<<30|E>>>2)^(M<<25|E>>>7),gt=(E>>>28|M<<4)^(E<<30|M>>>2)^(E<<25|M>>>7),mt=(N>>>14|O<<18)^(N>>>18|O<<14)^(N<<23|O>>>9),yt=(O>>>14|N<<18)^(O>>>18|N<<14)^(O<<23|N>>>9),bt=c[Y],xt=bt.high,_t=bt.low,wt=K+yt,Ct=V+mt+(wt>>>0>>0?1:0),St=(wt=wt+ht,Ct=Ct+dt+(wt>>>0>>0?1:0),wt=wt+_t,Ct=Ct+xt+(wt>>>0<_t>>>0?1:0),wt=wt+X,Ct=Ct+U+(wt>>>0>>0?1:0),gt+ft),kt=vt+pt+(St>>>0>>0?1:0);V=$,K=H,$=z,H=W,z=N,W=O,O=B+wt|0,N=F+Ct+(O>>>0>>0?1:0)|0,F=L,B=R,L=D,R=P,D=M,P=E,E=wt+St|0,M=Ct+kt+(E>>>0>>0?1:0)|0}f=n.low=f+E,n.high=p+M+(f>>>0>>0?1:0),g=r.low=g+P,r.high=v+D+(g>>>0

>>0?1:0),y=a.low=y+R,a.high=m+L+(y>>>0>>0?1:0),x=o.low=x+B,o.high=b+F+(x>>>0>>0?1:0),w=s.low=w+O,s.high=_+N+(w>>>0>>0?1:0),S=l.low=S+W,l.high=C+z+(S>>>0>>0?1:0),A=d.low=A+H,d.high=k+$+(A>>>0>>0?1:0),I=h.low=I+K,h.high=T+V+(I>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(i/4294967296),e[31+(n+128>>>10<<5)]=i,t.sigBytes=4*e.length,this._process();var r=this._hash.toX32();return r},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(d),e.HmacSHA512=n._createHmacHelper(d)}(),t.SHA512})},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 r,a=this._iv;a?(r=a.slice(0),this._iv=void 0):r=this._prevBlock,n.encryptBlock(r,0);for(var o=0;o>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],f=t[e+3],v=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],b=t[e+8],x=t[e+9],_=t[e+10],w=t[e+11],C=t[e+12],S=t[e+13],k=t[e+14],A=t[e+15],T=a[0],I=a[1],M=a[2],E=a[3];T=c(T,I,M,E,o,7,s[0]),E=c(E,T,I,M,l,12,s[1]),M=c(M,E,T,I,p,17,s[2]),I=c(I,M,E,T,f,22,s[3]),T=c(T,I,M,E,v,7,s[4]),E=c(E,T,I,M,g,12,s[5]),M=c(M,E,T,I,m,17,s[6]),I=c(I,M,E,T,y,22,s[7]),T=c(T,I,M,E,b,7,s[8]),E=c(E,T,I,M,x,12,s[9]),M=c(M,E,T,I,_,17,s[10]),I=c(I,M,E,T,w,22,s[11]),T=c(T,I,M,E,C,7,s[12]),E=c(E,T,I,M,S,12,s[13]),M=c(M,E,T,I,k,17,s[14]),I=c(I,M,E,T,A,22,s[15]),T=u(T,I,M,E,l,5,s[16]),E=u(E,T,I,M,m,9,s[17]),M=u(M,E,T,I,w,14,s[18]),I=u(I,M,E,T,o,20,s[19]),T=u(T,I,M,E,g,5,s[20]),E=u(E,T,I,M,_,9,s[21]),M=u(M,E,T,I,A,14,s[22]),I=u(I,M,E,T,v,20,s[23]),T=u(T,I,M,E,x,5,s[24]),E=u(E,T,I,M,k,9,s[25]),M=u(M,E,T,I,f,14,s[26]),I=u(I,M,E,T,b,20,s[27]),T=u(T,I,M,E,S,5,s[28]),E=u(E,T,I,M,p,9,s[29]),M=u(M,E,T,I,y,14,s[30]),I=u(I,M,E,T,C,20,s[31]),T=d(T,I,M,E,g,4,s[32]),E=d(E,T,I,M,b,11,s[33]),M=d(M,E,T,I,w,16,s[34]),I=d(I,M,E,T,k,23,s[35]),T=d(T,I,M,E,l,4,s[36]),E=d(E,T,I,M,v,11,s[37]),M=d(M,E,T,I,y,16,s[38]),I=d(I,M,E,T,_,23,s[39]),T=d(T,I,M,E,S,4,s[40]),E=d(E,T,I,M,o,11,s[41]),M=d(M,E,T,I,f,16,s[42]),I=d(I,M,E,T,m,23,s[43]),T=d(T,I,M,E,x,4,s[44]),E=d(E,T,I,M,C,11,s[45]),M=d(M,E,T,I,A,16,s[46]),I=d(I,M,E,T,p,23,s[47]),T=h(T,I,M,E,o,6,s[48]),E=h(E,T,I,M,y,10,s[49]),M=h(M,E,T,I,k,15,s[50]),I=h(I,M,E,T,g,21,s[51]),T=h(T,I,M,E,C,6,s[52]),E=h(E,T,I,M,f,10,s[53]),M=h(M,E,T,I,_,15,s[54]),I=h(I,M,E,T,l,21,s[55]),T=h(T,I,M,E,b,6,s[56]),E=h(E,T,I,M,A,10,s[57]),M=h(M,E,T,I,m,15,s[58]),I=h(I,M,E,T,S,21,s[59]),T=h(T,I,M,E,v,6,s[60]),E=h(E,T,I,M,w,10,s[61]),M=h(M,E,T,I,p,15,s[62]),I=h(I,M,E,T,x,21,s[63]),a[0]=a[0]+T|0,a[1]=a[1]+I|0,a[2]=a[2]+M|0,a[3]=a[3]+E|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32;var a=e.floor(n/4294967296),o=n;i[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(r+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=a.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,r,a,o){var s=t+(e&i|~e&n)+r+o;return(s<>>32-a)+e}function u(t,e,i,n,r,a,o){var s=t+(e&n|i&~n)+r+o;return(s<>>32-a)+e}function d(t,e,i,n,r,a,o){var s=t+(e^i^n)+r+o;return(s<>>32-a)+e}function h(t,e,i,n,r,a,o){var s=t+(i^(e|~n))+r+o;return(s<>>32-a)+e}i.MD5=a._createHelper(l),i.HmacMD5=a._createHmacHelper(l)}(Math),t.MD5})},89557:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240),i(81380))})(0,function(t){return function(){var e=t,i=e.x64,n=i.Word,r=i.WordArray,a=e.algo,o=a.SHA512,s=a.SHA384=o.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=o._createHelper(s),e.HmacSHA384=o._createHmacHelper(s)}(),t.SHA384})},96298: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.StreamCipher,r=e.algo,a=[],o=[],s=[],l=r.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;r[0]^=l,r[1]^=d,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=d,r[6]^=u,r[7]^=h;for(i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=n._createHelper(l)}(),t.Rabbit})},96939:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CTR=function(){var e=t.lib.BlockCipherMode.extend(),i=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0);var o=a.slice(0);i.encryptBlock(o,0),a[n-1]=a[n-1]+1|0;for(var s=0;s",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function r(t){return t&&t.bracketRegex||/[(){}[\]]/}function a(t,e,a){var s=t.getLineHandle(e.line),l=e.ch-1,c=a&&a.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var u=r(a),d=!c&&l>=0&&u.test(s.text.charAt(l))&&n[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&n[s.text.charAt(++l)];if(!d)return null;var h=">"==d.charAt(1)?1:-1;if(a&&a.strict&&h>0!=(l==e.ch))return null;var p=t.getTokenTypeAt(i(e.line,l+1)),f=o(t,i(e.line,l+(h>0?1:0)),h,p,a);return null==f?null:{from:i(e.line,l),to:f&&f.pos,match:f&&f.ch==d.charAt(0),forward:h>0}}function o(t,e,a,o,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=r(s),h=a>0?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),p=e.line;p!=h;p+=a){var f=t.getLine(p);if(f){var v=a>0?0:f.length-1,g=a>0?f.length:-1;if(!(f.length>l))for(p==e.line&&(v=e.ch-(a<0?1:0));v!=g;v+=a){var m=f.charAt(v);if(d.test(m)&&(void 0===o||(t.getTokenTypeAt(i(p,v+1))||"")==(o||""))){var y=n[m];if(y&&">"==y.charAt(1)==a>0)u.push(m);else{if(!u.length)return{pos:i(p,v),ch:m};u.pop()}}}}}return p-a!=(a>0?t.lastLine():t.firstLine())&&null}function s(t,n,r){for(var o=t.state.matchBrackets.maxHighlightLineLength||1e3,s=r&&r.highlightNonMatching,l=[],c=t.listSelections(),u=0;u>24&255)){var e=t>>16&255,i=t>>8&255,n=255&t;255===e?(e=0,255===i?(i=0,255===n?n=0:++n):++i):++e,t=0,t+=e<<16,t+=i<<8,t+=n}else t+=1<<24;return t}function n(t){return 0===(t[0]=i(t[0]))&&(t[1]=i(t[1])),t}var r=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,r=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),n(o);var s=o.slice(0);i.encryptBlock(s,0);for(var l=0;l>>2]|=t[n]<<24-n%4*8;r.call(this,i,e)}else r.apply(this,arguments)};a.prototype=n}}(),t.lib.WordArray})},7628: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.WordArray,r=i.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=r.extend({_doReset:function(){for(var t=this._key,e=t.words,i=[],n=0;n<56;n++){var r=o[n]-1;i[n]=e[r>>>5]>>>31-r%32&1}for(var a=this._subKeys=[],c=0;c<16;c++){var u=a[c]=[],d=l[c];for(n=0;n<24;n++)u[n/6|0]|=i[(s[n]-1+d)%28]<<31-n%6,u[4+(n/6|0)]|=i[28+(s[n+24]-1+d)%28]<<31-n%6;u[0]=u[0]<<1|u[0]>>>31;for(n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=a[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,i){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=i[n],a=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((o^r[l])&u[l])>>>0];this._lBlock=o,this._rBlock=a^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var i=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=i,this._lBlock^=i<>>t^this._lBlock)&e;this._lBlock^=i,this._rBlock^=i<192.");var i=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(i)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(a))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(f)}(),t.TripleDES})},10482:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso97971={pad:function(e,i){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,i)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})},15237:function(t){(function(e,i){t.exports=i()})(0,function(){"use strict";var t=navigator.userAgent,e=navigator.platform,i=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),a=/Edge\/(\d+)/.exec(t),o=n||r||a,s=o&&(n?document.documentMode||6:+(a||r)[1]),l=!a&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!a&&/Chrome\/(\d+)/.exec(t),d=u&&+u[1],h=/Opera\//.test(t),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),v=/PhantomJS/.test(t),g=p&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),m=/Android/.test(t),y=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),x=/\bCrOS\b/.test(t),_=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=b&&(c||h&&(null==w||w<12.11)),S=i||o&&s>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var A,T=function(t,e){var i=t.className,n=k(e).exec(i);if(n){var r=i.slice(n.index+n[0].length);t.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function I(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function M(t,e){return I(t).appendChild(e)}function E(t,e,i,n){var r=document.createElement(t);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var a=0;a=e)return o+(e-a);o+=s-a,o+=i-o%i,a=s+1}}g?B=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(B=function(t){try{t.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=$(this.onTimeout,this)};function Y(t,e){for(var i=0;i=e)return n+Math.min(o,e-r);if(r+=a-n,r+=i-r%i,n=a+1,r>=e)return n}}var J=[""];function Q(t){while(J.length<=t)J.push(tt(J)+" ");return J[t]}function tt(t){return t[t.length-1]}function et(t,e){for(var i=[],n=0;n"€"&&(t.toUpperCase()!=t.toLowerCase()||at.test(t))}function st(t,e){return e?!!(e.source.indexOf("\\w")>-1&&ot(t))||e.test(t):ot(t)}function lt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var ct=/[\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 ut(t){return t.charCodeAt(0)>=768&&ct.test(t)}function dt(t,e,i){while((i<0?e>0:ei?-1:1;;){if(e==i)return e;var r=(e+i)/2,a=n<0?Math.ceil(r):Math.floor(r);if(a==e)return t(a)?e:i;t(a)?i=a:e=a+n}}function pt(t,e,i,n){if(!t)return n(e,i,"ltr",0);for(var r=!1,a=0;ae||e==i&&o.to==e)&&(n(Math.max(o.from,e),Math.min(o.to,i),1==o.level?"rtl":"ltr",a),r=!0)}r||n(e,i,"ltr")}var ft=null;function vt(t,e,i){var n;ft=null;for(var r=0;re)return r;a.to==e&&(a.from!=a.to&&"before"==i?n=r:ft=r),a.from==e&&(a.from!=a.to&&"before"!=i?n=r:ft=r)}return null!=n?n:ft}var gt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(i){return i<=247?t.charAt(i):1424<=i&&i<=1524?"R":1536<=i&&i<=1785?e.charAt(i-1536):1774<=i&&i<=2220?"r":8192<=i&&i<=8203?"w":8204==i?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(t,e,i){this.level=t,this.from=e,this.to=i}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!n.test(t))return!1;for(var u=t.length,d=[],h=0;h-1&&(n[e]=r.slice(0,a).concat(r.slice(a+1)))}}}function wt(t,e){var i=xt(t,e);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r0}function At(t){t.prototype.on=function(t,e){bt(this,t,e)},t.prototype.off=function(t,e){_t(this,t,e)}}function Tt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function It(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Mt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Et(t){Tt(t),It(t)}function Dt(t){return t.target||t.srcElement}function Pt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var Lt,Rt,Ft=function(){if(o&&s<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function Bt(t){if(null==Lt){var e=E("span","​");M(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&s<8))}var i=Lt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Nt(t){if(null!=Rt)return Rt;var e=M(t,document.createTextNode("AخA")),i=A(e,0,1).getBoundingClientRect(),n=A(e,1,2).getBoundingClientRect();return I(t),!(!i||i.left==i.right)&&(Rt=n.right-i.right<3)}var Ot=3!="\n\nb".split(/\n/).length?function(t){var e=0,i=[],n=t.length;while(e<=n){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var a=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),o=a.indexOf("\r");-1!=o?(i.push(a.slice(0,o)),e+=o+1):(i.push(a),e=r+1)}return i}:function(t){return t.split(/\r\n?|\n/)},zt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(i){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Wt=function(){var t=E("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),$t=null;function Ht(t){if(null!=$t)return $t;var e=M(t,E("span","x")),i=e.getBoundingClientRect(),n=A(e,0,1).getBoundingClientRect();return $t=Math.abs(i.left-n.left)>1}var Vt={},Kt={};function Yt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Vt[t]=e}function Xt(t,e){Kt[t]=e}function Ut(t){if("string"==typeof t&&Kt.hasOwnProperty(t))t=Kt[t];else if(t&&"string"==typeof t.name&&Kt.hasOwnProperty(t.name)){var e=Kt[t.name];"string"==typeof e&&(e={name:e}),t=rt(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Gt(t,e){e=Ut(e);var i=Vt[e.name];if(!i)return Gt(t,"text/plain");var n=i(t,e);if(jt.hasOwnProperty(e.name)){var r=jt[e.name];for(var a in r)r.hasOwnProperty(a)&&(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=r[a])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)n[o]=e.modeProps[o];return n}var jt={};function qt(t,e){var i=jt.hasOwnProperty(t)?jt[t]:jt[t]={};H(e,i)}function Zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var n in e){var r=e[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Jt(t,e){var i;while(t.innerMode){if(i=t.innerMode(e),!i||i.mode==t)break;e=i.state,t=i.mode}return i||{mode:t,state:e}}function Qt(t,e,i){return!t.startState||t.startState(e,i)}var te=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function ee(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");var i=t;while(!i.lines)for(var n=0;;++n){var r=i.children[n],a=r.chunkSize();if(e=t.first&&ei?ce(i,ee(t,i).text.length):me(e,ee(t,e.line).text.length)}function me(t,e){var i=t.ch;return null==i||i>e?ce(t.line,e):i<0?ce(t.line,0):t}function ye(t,e){for(var i=[],n=0;n=this.string.length},te.prototype.sol=function(){return this.pos==this.lineStart},te.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},te.prototype.next=function(){if(this.pose},te.prototype.eatSpace=function(){var t=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>t},te.prototype.skipToEnd=function(){this.pos=this.string.length},te.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},te.prototype.backUp=function(t){this.pos-=t},te.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var r=function(t){return i?t.toLowerCase():t},a=this.string.substr(this.pos,t.length);if(r(a)==r(t))return!1!==e&&(this.pos+=t.length),!0},te.prototype.current=function(){return this.string.slice(this.start,this.pos)},te.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},te.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},te.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var be=function(t,e){this.state=t,this.lookAhead=e},xe=function(t,e,i,n){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function _e(t,e,i,n){var r=[t.state.modeGen],a={};Ee(t,e.text,t.doc.mode,i,function(t,e){return r.push(t,e)},a,n);for(var o=i.state,s=function(n){i.baseTokens=r;var s=t.state.overlays[n],l=1,c=0;i.state=!0,Ee(t,e.text,s.mode,i,function(t,e){var i=l;while(ct&&r.splice(l,1,t,r[l+1],n),l+=2,c=Math.min(t,n)}if(e)if(s.opaque)r.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;it.options.maxHighlightLength&&Zt(t.doc.mode,n.state),a=_e(t,e,n);r&&(n.state=r),e.stateAfter=n.save(!r),e.styles=a.styles,a.classes?e.styleClasses=a.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Ce(t,e,i){var n=t.doc,r=t.display;if(!n.mode.startState)return new xe(n,!0,e);var a=De(t,e,i),o=a>n.first&&ee(n,a-1).stateAfter,s=o?xe.fromSaved(n,o,a):new xe(n,Qt(n.mode),a);return n.iter(a,e,function(i){Se(t,i.text,s);var n=s.line;i.stateAfter=n==e-1||n%5==0||n>=r.viewFrom&&ne.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}xe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},xe.prototype.baseToken=function(t){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=t)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},xe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xe.fromSaved=function(t,e,i){return e instanceof be?new xe(t,Zt(t.mode,e.state),i,e.lookAhead):new xe(t,Zt(t.mode,e),i)},xe.prototype.save=function(t){var e=!1!==t?Zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new be(e,this.maxLookAhead):e};var Te=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i};function Ie(t,e,i,n){var r,a=t.doc,o=a.mode;e=ge(a,e);var s,l=ee(a,e.line),c=Ce(t,e.line,i),u=new te(l.text,t.options.tabSize,c);n&&(s=[]);while((n||u.post.options.maxHighlightLength?(s=!1,o&&Se(t,e,n,d.pos),d.pos=e.length,l=null):l=Me(Ae(i,d,n.state,h),a),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){while(co;--s){if(s<=a.first)return a.first;var l=ee(a,s-1),c=l.stateAfter;if(c&&(!i||s+(c instanceof be?c.lookAhead:0)<=a.modeFrontier))return s;var u=V(l.text,null,t.options.tabSize);(null==r||n>u)&&(r=s-1,n=u)}return r}function Pe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontieri;n--){var r=ee(t,n).stateAfter;if(r&&(!(r instanceof be)||n+r.lookAhead=e:a.to>e);(n||(n=[])).push(new Ne(o,a.from,l?null:a.to))}}return n}function He(t,e,i){var n;if(t)for(var r=0;r=e:a.to>e);if(s||a.from==e&&"bookmark"==o.type&&(!i||a.marker.insertLeft)){var l=null==a.from||(o.inclusiveLeft?a.from<=e:a.from0&&s)for(var x=0;x0)){var u=[l,1],d=ue(c.from,s.from),h=ue(c.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!o.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function Xe(t){var e=t.markedSpans;if(e){for(var i=0;ie)&&(!i||qe(i,a.marker)<0)&&(i=a.marker)}return i}function ei(t,e,i,n,r){var a=ee(t,e),o=Re&&a.markedSpans;if(o)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.to,i)>=0:ue(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.from,n)<=0:ue(c.from,n)<0)))return!0}}}function ii(t){var e;while(e=Je(t))t=e.find(-1,!0).line;return t}function ni(t){var e;while(e=Qe(t))t=e.find(1,!0).line;return t}function ri(t){var e,i;while(e=Qe(t))t=e.find(1,!0).line,(i||(i=[])).push(t);return i}function ai(t,e){var i=ee(t,e),n=ii(i);return i==n?e:ae(n)}function oi(t,e){if(e>t.lastLine())return e;var i,n=ee(t,e);if(!si(t,n))return e;while(i=Qe(n))n=i.find(1,!0).line;return ae(n)+1}function si(t,e){var i=Re&&e.markedSpans;if(i)for(var n=void 0,r=0;re.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)})}var hi=function(t,e,i){this.text=t,Ue(this,e),this.height=i?i(this):1};function pi(t,e,i,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Xe(t),Ue(t,i);var r=n?n(t):1;r!=t.height&&re(t,r)}function fi(t){t.parent=null,Xe(t)}hi.prototype.lineNo=function(){return ae(this)},At(hi);var vi={},gi={};function mi(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?gi:vi;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function yi(t,e){var i=D("span",null,null,l?"padding-right: .1px":null),n={pre:D("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var a=r?e.rest[r-1]:e.line,o=void 0;n.pos=0,n.addToken=xi,Nt(t.display.measure)&&(o=mt(a,t.doc.direction))&&(n.addToken=wi(n.addToken,o)),n.map=[];var s=e!=t.display.externalMeasured&&ae(a);Si(a,n,we(t,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=F(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=F(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Bt(t.display.measure))),0==r?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return wt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function bi(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function xi(t,e,i,n,r,a,l){if(e){var c,u=t.splitSpaces?_i(e,t.trailingSpace):e,d=t.cm.state.specialChars,h=!1;if(d.test(e)){c=document.createDocumentFragment();var p=0;while(1){d.lastIndex=p;var f=d.exec(e),v=f?f.index-p:e.length-p;if(v){var g=document.createTextNode(u.slice(p,p+v));o&&s<9?c.appendChild(E("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+v,g),t.col+=v,t.pos+=v}if(!f)break;p+=v+1;var m=void 0;if("\t"==f[0]){var y=t.cm.options.tabSize,b=y-t.col%y;m=c.appendChild(E("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=b}else"\r"==f[0]||"\n"==f[0]?(m=c.appendChild(E("span","\r"==f[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",f[0]),t.col+=1):(m=t.cm.options.specialCharPlaceholder(f[0]),m.setAttribute("cm-text",f[0]),o&&s<9?c.appendChild(E("span",[m])):c.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),o&&s<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),i||n||r||h||a||l){var x=i||"";n&&(x+=n),r&&(x+=r);var _=E("span",[c],x,a);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&_.setAttribute(w,l[w]);return t.content.appendChild(_)}t.content.appendChild(c)}}function _i(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,n="",r=0;rc&&d.from<=c)break;if(d.to>=u)return t(i,n,r,a,o,s,l);t(i,n.slice(0,d.to-c),r,a,null,s,l),a=null,n=n.slice(d.to-c),c=d.to}}}function Ci(t,e,i,n){var r=!n&&i.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!n&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function Si(t,e,i){var n=t.markedSpans,r=t.text,a=0;if(n)for(var o,s,l,c,u,d,h,p=r.length,f=0,v=1,g="",m=0;;){if(m==f){l=c=u=s="",h=null,d=null,m=1/0;for(var y=[],b=void 0,x=0;xf||w.collapsed&&_.to==f&&_.from==f)){if(null!=_.to&&_.to!=f&&m>_.to&&(m=_.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&_.from==f&&(u+=" "+w.startStyle),w.endStyle&&_.to==m&&(b||(b=[])).push(w.endStyle,_.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||qe(d.marker,w)<0)&&(d=_)}else _.from>f&&m>_.from&&(m=_.from)}if(b)for(var S=0;S=p)break;var A=Math.min(p,m);while(1){if(g){var T=f+g.length;if(!d){var I=T>A?g.slice(0,A-f):g;e.addToken(e,I,o?o+l:l,u,f+I.length==m?c:"",s,h)}if(T>=A){g=g.slice(A-f),f=A;break}f=T,u=""}g=r.slice(a,a=i[v++]),o=mi(i[v++],e.cm.options)}}else for(var M=1;M2&&a.push((l.bottom+c.top)/2-i.top)}}a.push(i.bottom-i.top)}}function en(t,e,i){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var n=0;ni)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function nn(t,e){e=ii(e);var i=ae(e),n=t.display.externalMeasured=new ki(t.doc,e,i);n.lineN=i;var r=n.built=yi(t,n);return n.text=r.pre,M(t.display.lineMeasure,r.pre),n}function rn(t,e,i,n){return sn(t,on(t,e),i,n)}function an(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&ee)&&(a=l-s,r=a-1,e>=l&&(o="right")),null!=r){if(n=t[c+2],s==l&&i==(n.insertLeft?"left":"right")&&(o=i),"left"==i&&0==r)while(c&&t[c-2]==t[c-3]&&t[c-1].insertLeft)n=t[2+(c-=3)],o="left";if("right"==i&&r==l-s)while(c=0;r--)if((i=t[r]).left!=i.right)break;return i}function hn(t,e,i,n){var r,a=un(e.map,i,n),l=a.node,c=a.start,u=a.end,d=a.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){while(c&&ut(e.line.text.charAt(a.coverStart+c)))--c;while(a.coverStart+u0&&(d=n="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==n?p.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Rn(t.display),top:f.top,bottom:f.bottom}:cn}for(var v=r.top-e.rect.top,g=r.bottom-e.rect.top,m=(v+g)/2,y=e.view.measure.heights,b=0;b=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(t,e,i){var n=s[e],r=1==n.level;return o(i?t-1:t,r!=i)}var d=vt(s,l,c),h=ft,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function Sn(t,e){var i=0;e=ge(t.doc,e),t.options.lineWrapping||(i=Rn(t.display)*e.ch);var n=ee(t.doc,e.line),r=ci(n)+Gi(t.display);return{left:i,right:i,top:r,bottom:r+n.height}}function kn(t,e,i,n,r){var a=ce(t,e,i);return a.xRel=r,n&&(a.outside=n),a}function An(t,e,i){var n=t.doc;if(i+=t.display.viewOffset,i<0)return kn(n.first,0,null,-1,-1);var r=oe(n,i),a=n.first+n.size-1;if(r>a)return kn(n.first+n.size-1,ee(n,a).text.length,null,1,1);e<0&&(e=0);for(var o=ee(n,r);;){var s=En(t,o,r,e,i),l=ti(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;o=ee(n,r=c.line)}}function Tn(t,e,i,n){n-=bn(e);var r=e.text.length,a=ht(function(e){return sn(t,i,e-1).bottom<=n},r,0);return r=ht(function(e){return sn(t,i,e).top>n},a,r),{begin:a,end:r}}function In(t,e,i,n){i||(i=on(t,e));var r=xn(t,e,sn(t,i,n),"line").top;return Tn(t,e,i,r)}function Mn(t,e,i,n){return!(t.bottom<=i)&&(t.top>i||(n?t.left:t.right)>e)}function En(t,e,i,n,r){r-=ci(e);var a=on(t,e),o=bn(e),s=0,l=e.text.length,c=!0,u=mt(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?Pn:Dn)(t,e,i,a,u,n,r);c=1!=d.level,s=c?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,v=null,g=ht(function(e){var i=sn(t,a,e);return i.top+=o,i.bottom+=o,!!Mn(i,n,r,!1)&&(i.top<=r&&i.left<=n&&(f=e,v=i),!0)},s,l),m=!1;if(v){var y=n-v.left=x.bottom?1:0}return g=dt(e.text,g,1),kn(i,g,p,m,n-h)}function Dn(t,e,i,n,r,a,o){var s=ht(function(s){var l=r[s],c=1!=l.level;return Mn(Cn(t,ce(i,c?l.to:l.from,c?"before":"after"),"line",e,n),a,o,!0)},0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=Cn(t,ce(i,c?l.from:l.to,c?"after":"before"),"line",e,n);Mn(u,a,o,!0)&&u.top>o&&(l=r[s-1])}return l}function Pn(t,e,i,n,r,a,o){var s=Tn(t,e,n,o),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||p.to<=l)){var f=1!=p.level,v=sn(t,n,f?Math.min(c,p.to)-1:Math.max(l,p.from)).right,g=vg)&&(u=p,d=g)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function Ln(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ln){ln=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ln.appendChild(document.createTextNode("x")),ln.appendChild(E("br"));ln.appendChild(document.createTextNode("x"))}M(t.measure,ln);var i=ln.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),I(t.measure),i||1}function Rn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),i=E("pre",[e],"CodeMirror-line-like");M(t.measure,i);var n=e.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Fn(t){for(var e=t.display,i={},n={},r=e.gutters.clientLeft,a=e.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=t.display.gutterSpecs[o].className;i[s]=a.offsetLeft+a.clientLeft+r,n[s]=a.clientWidth}return{fixedPos:Bn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function Bn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Nn(t){var e=Ln(t.display),i=t.options.lineWrapping,n=i&&Math.max(5,t.display.scroller.clientWidth/Rn(t.display)-3);return function(r){if(si(t.doc,r))return 0;var a=0;if(r.widgets)for(var o=0;o0&&(l=ee(t.doc,c.line).text).length==c.ch){var u=V(l,l.length,t.options.tabSize)-l.length;c=ce(c.line,Math.max(0,Math.round((a-qi(t.display).left)/Rn(t.display))-u))}return c}function Wn(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var i=t.display.view,n=0;ne)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Re&&ai(t.doc,e)r.viewFrom?Vn(t):(r.viewFrom+=n,r.viewTo+=n);else if(e<=r.viewFrom&&i>=r.viewTo)Vn(t);else if(e<=r.viewFrom){var a=Kn(t,i,i+n,1);a?(r.view=r.view.slice(a.index),r.viewFrom=a.lineN,r.viewTo+=n):Vn(t)}else if(i>=r.viewTo){var o=Kn(t,e,e,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Vn(t)}else{var s=Kn(t,e,e,-1),l=Kn(t,i,i+n,1);s&&l?(r.view=r.view.slice(0,s.index).concat(Ai(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):Vn(t)}var c=r.externalMeasured;c&&(i=r.lineN&&e=n.viewTo)){var a=n.view[Wn(t,e)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==Y(o,i)&&o.push(i)}}}function Vn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Kn(t,e,i,n){var r,a=Wn(t,e),o=t.display.view;if(!Re||i==t.doc.first+t.doc.size)return{index:a,lineN:i};for(var s=t.display.viewFrom,l=0;l0){if(a==o.length-1)return null;r=s+o[a].size-e,a++}else r=s-e;e+=r,i+=r}while(ai(t.doc,i)!=i){if(a==(n<0?0:o.length-1))return null;i+=n*o[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:i}}function Yn(t,e,i){var n=t.display,r=n.view;0==r.length||e>=n.viewTo||i<=n.viewFrom?(n.view=Ai(t,e,i),n.viewFrom=e):(n.viewFrom>e?n.view=Ai(t,e,n.viewFrom).concat(n.view):n.viewFromi&&(n.view=n.view.slice(0,Wn(t,i)))),n.viewTo=i}function Xn(t){for(var e=t.display.view,i=0,n=0;n=t.display.viewTo||l.to().line0?o:t.defaultCharWidth())+"px"}if(n.other){var s=i.appendChild(E("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function qn(t,e){return t.top-e.top||t.left-e.left}function Zn(t,e,i){var n=t.display,r=t.doc,a=document.createDocumentFragment(),o=qi(t.display),s=o.left,l=Math.max(n.sizerWidth,Ji(t)-n.sizer.offsetLeft)-o.right,c="ltr"==r.direction;function u(t,e,i,n){e<0&&(e=0),e=Math.round(e),n=Math.round(n),a.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==i?l-t:i)+"px;\n height: "+(n-e)+"px"))}function d(e,i,n){var a,o,d=ee(r,e),h=d.text.length;function p(i,n){return wn(t,ce(e,i),"div",d,n)}function f(e,i,n){var r=In(t,d,null,e),a="ltr"==i==("after"==n)?"left":"right",o="after"==n?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1);return p(o,a)[a]}var v=mt(d,r.direction);return pt(v,i||0,null==n?h:n,function(t,e,r,d){var g="ltr"==r,m=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==i&&0==t,x=null==n&&e==h,_=0==d,w=!v||d==v.length-1;if(y.top-m.top<=3){var C=(c?b:x)&&_,S=(c?x:b)&&w,k=C?s:(g?m:y).left,A=S?l:(g?y:m).right;u(k,m.top,A-k,m.bottom)}else{var T,I,M,E;g?(T=c&&b&&_?s:m.left,I=c?l:f(t,r,"before"),M=c?s:f(e,r,"after"),E=c&&x&&w?l:y.right):(T=c?f(t,r,"before"):s,I=!c&&b&&_?l:m.right,M=!c&&x&&w?s:y.left,E=c?f(e,r,"after"):l),u(T,m.top,I-T,m.bottom),m.bottom0?e.blinker=setInterval(function(){t.hasFocus()||ir(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Qn(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||er(t))}function tr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&ir(t))},100)}function er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(wt(t,"focus",t,e),t.state.focused=!0,R(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Jn(t))}function ir(t,e){t.state.delayingBlurEvent||(t.state.focused&&(wt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function nr(t){for(var e=t.display,i=e.lineDiv.offsetTop,n=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||v<-.005)&&(rt.display.sizerWidth){var m=Math.ceil(h/Rn(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=c.line,t.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(e.scroller.scrollTop+=a)}function rr(t){if(t.widgets)for(var e=0;e=o&&(a=oe(e,ci(ee(e,l))-t.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function or(t,e){if(!Ct(t,"scrollCursorIntoView")){var i=t.display,n=i.sizer.getBoundingClientRect(),r=null,a=i.wrapper.ownerDocument;if(e.top+n.top<0?r=!0:e.bottom+n.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(r=!1),null!=r&&!v){var o=E("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Gi(t.display))+"px;\n height: "+(e.bottom-e.top+Zi(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function sr(t,e,i,n){var r;null==n&&(n=0),t.options.lineWrapping||e!=i||(i="before"==e.sticky?ce(e.line,e.ch+1,"before"):e,e=e.ch?ce(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var a=0;a<5;a++){var o=!1,s=Cn(t,e),l=i&&i!=e?Cn(t,i):s;r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var c=cr(t,r),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(gr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(yr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return r}function lr(t,e){var i=cr(t,e);null!=i.scrollTop&&gr(t,i.scrollTop),null!=i.scrollLeft&&yr(t,i.scrollLeft)}function cr(t,e){var i=t.display,n=Ln(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,a=Qi(t),o={};e.bottom-e.top>a&&(e.bottom=e.top+a);var s=t.doc.height+ji(i),l=e.tops-n;if(e.topr+a){var u=Math.min(e.top,(c?s:e.bottom)-a);u!=r&&(o.scrollTop=u)}var d=t.options.fixedGutter?0:i.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft-d,p=Ji(t)-i.gutters.offsetWidth,f=e.right-e.left>p;return f&&(e.right=e.left+p),e.left<10?o.scrollLeft=0:e.leftp+h-3&&(o.scrollLeft=e.right+(f?0:10)-p),o}function ur(t,e){null!=e&&(fr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function dr(t){fr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function hr(t,e,i){null==e&&null==i||fr(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function pr(t,e){fr(t),t.curOp.scrollToPos=e}function fr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var i=Sn(t,e.from),n=Sn(t,e.to);vr(t,i,n,e.margin)}}function vr(t,e,i,n){var r=cr(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-n,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+n});hr(t,r.scrollLeft,r.scrollTop)}function gr(t,e){Math.abs(t.doc.scrollTop-e)<2||(i||Ur(t,{top:e}),mr(t,e,!0),i&&Ur(t),zr(t,100))}function mr(t,e,i){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function yr(t,e,i,n){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,Zr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function br(t){var e=t.display,i=e.gutters.offsetWidth,n=Math.round(t.doc.height+ji(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Zi(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var xr=function(t,e,i){this.cm=i;var n=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,t(n),t(r),bt(n,"scroll",function(){n.clientHeight&&e(n.scrollTop,"vertical")}),bt(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var r=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var a=t.viewWidth-t.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:e?n:0}},xr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var t=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},xr.prototype.enableZeroWidthBar=function(t,e,i){function n(){var r=t.getBoundingClientRect(),a="vert"==i?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);a!=t?t.style.visibility="hidden":e.set(1e3,n)}t.style.visibility="",e.set(1e3,n)},xr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var _r=function(){};function wr(t,e){e||(e=br(t));var i=t.display.barWidth,n=t.display.barHeight;Cr(t,e);for(var r=0;r<4&&i!=t.display.barWidth||n!=t.display.barHeight;r++)i!=t.display.barWidth&&t.options.lineWrapping&&nr(t),Cr(t,br(t)),i=t.display.barWidth,n=t.display.barHeight}function Cr(t,e){var i=t.display,n=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}_r.prototype.update=function(){return{bottom:0,right:0}},_r.prototype.setScrollLeft=function(){},_r.prototype.setScrollTop=function(){},_r.prototype.clear=function(){};var Sr={native:xr,null:_r};function kr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Sr[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),bt(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,i){"horizontal"==i?yr(t,e):gr(t,e)},t),t.display.scrollbars.addClass&&R(t.display.wrapper,t.display.scrollbars.addClass)}var Ar=0;function Tr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++Ar,markArrays:null},Ii(t.curOp)}function Ir(t){var e=t.curOp;e&&Ei(e,function(t){for(var e=0;e=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new $r(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Dr(t){t.updatedDisplay=t.mustUpdate&&Yr(t.cm,t.update)}function Pr(t){var e=t.cm,i=e.display;t.updatedDisplay&&nr(e),t.barMeasure=br(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=rn(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Zi(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-Ji(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function Lr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var i=+new Date+t.options.workTime,n=Ce(t,e.highlightFrontier),r=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),function(a){if(n.line>=t.display.viewFrom){var o=a.styles,s=a.text.length>t.options.maxHighlightLength?Zt(e.mode,n.state):null,l=_e(t,a,n,!0);s&&(n.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hi)return zr(t,t.options.workDelay),!0}),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),r.length&&Fr(t,function(){for(var e=0;e=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==Xn(t))return!1;Jr(t)&&(Vn(t),e.dims=Fn(t));var r=n.first+n.size,a=Math.max(e.visible.from-t.options.viewportMargin,n.first),o=Math.min(r,e.visible.to+t.options.viewportMargin);i.viewFromo&&i.viewTo-o<20&&(o=Math.min(r,i.viewTo)),Re&&(a=ai(t.doc,a),o=oi(t.doc,o));var s=a!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;Yn(t,a,o),i.viewOffset=ci(ee(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var l=Xn(t);if(!s&&0==l&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var c=Vr(t);return l>4&&(i.lineDiv.style.display="none"),Gr(t,i.updateLineNumbers,e.dims),l>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Kr(c),I(i.cursorDiv),I(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,s&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,zr(t,400)),i.updateLineNumbers=null,!0}function Xr(t,e){for(var i=e.viewport,n=!0;;n=!1){if(n&&t.options.lineWrapping&&e.oldDisplayWidth!=Ji(t))n&&(e.visible=ar(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+ji(t.display)-Qi(t),i.top)}),e.visible=ar(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Yr(t,e))break;nr(t);var r=br(t);Un(t),wr(t,r),qr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Ur(t,e){var i=new $r(t,e);if(Yr(t,i)){nr(t),Xr(t,i);var n=br(t);Un(t),wr(t,n),qr(t,n),i.finish()}}function Gr(t,e,i){var n=t.display,r=t.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(e){var i=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var c=n.view,u=n.viewFrom,d=0;d-1&&(p=!1),Ri(t,h,u,i)),p&&(I(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(le(t.options,u)))),o=h.node.nextSibling}else{var f=Hi(t,h,u,i);a.insertBefore(f,o)}u+=h.size}while(o)o=s(o)}function jr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",Pi(t,"gutterChanged",t)}function qr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Zi(t)+"px"}function Zr(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=Bn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,a=n+"px",o=0;o=105&&(a.wrapper.style.clipPath="inset(0px)"),a.wrapper.setAttribute("translate","no"),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),l||i&&y||(a.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(a.wrapper):t(a.wrapper)),a.viewFrom=a.viewTo=e.first,a.reportedViewFrom=a.reportedViewTo=e.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=Qr(r.gutters,r.lineNumbers),ta(a),n.init(a)}$r.prototype.signal=function(t,e){kt(t,e)&&this.events.push(arguments)},$r.prototype.finish=function(){for(var t=0;tc.clientWidth,f=c.scrollHeight>c.clientHeight;if(r&&p||a&&f){if(a&&b&&l)t:for(var v=e.target,g=s.view;v!=c;v=v.parentNode)for(var m=0;m=0&&ue(t,n.to())<=0)return i}return-1};var ca=function(t,e){this.anchor=t,this.head=e};function ua(t,e,i){var n=t&&t.options.selectionsMayTouch,r=e[i];e.sort(function(t,e){return ue(t.from(),e.from())}),i=Y(e,r);for(var a=1;a0:l>=0){var c=fe(s.from(),o.from()),u=pe(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=i&&--i,e.splice(--a,2,new ca(d?u:c,d?c:u))}}return new la(e,i)}function da(t,e){return new la([new ca(t,e||t)],0)}function ha(t){return t.text?ce(t.from.line+t.text.length-1,tt(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function pa(t,e){if(ue(t,e.from)<0)return t;if(ue(t,e.to)<=0)return ha(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=ha(e).ch-e.to.ch),ce(i,n)}function fa(t,e){for(var i=[],n=0;n1&&t.remove(s.line+1,f-1),t.insert(s.line+1,m)}Pi(t,"change",t,e)}function _a(t,e,i){function n(t,r,a){if(t.linked)for(var o=0;o1&&!t.done[t.done.length-2].ranges?(t.done.pop(),tt(t.done)):void 0}function Ma(t,e,i,n){var r=t.history;r.undone.length=0;var a,o,s=+new Date;if((r.lastOp==n||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=Ia(r,r.lastOp==n)))o=tt(a.changes),0==ue(e.from,e.to)&&0==ue(e.from,o.to)?o.to=ha(e):a.changes.push(Aa(t,e));else{var l=tt(r.done);l&&l.ranges||Pa(t.sel,r.done),a={changes:[Aa(t,e)],generation:r.generation},r.done.push(a);while(r.done.length>r.undoDepth)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=e.origin,o||wt(t,"historyAdded")}function Ea(t,e,i,n){var r=e.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Da(t,e,i,n){var r=t.history,a=n&&n.origin;i==r.lastSelOp||a&&r.lastSelOrigin==a&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==a||Ea(t,a,tt(r.done),e))?r.done[r.done.length-1]=e:Pa(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=a,r.lastSelOp=i,n&&!1!==n.clearRedo&&Ta(r.undone)}function Pa(t,e){var i=tt(e);i&&i.ranges&&i.equals(t)||e.push(t)}function La(t,e,i,n){var r=e["spans_"+t.id],a=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,n),function(i){i.markedSpans&&((r||(r=e["spans_"+t.id]={}))[a]=i.markedSpans),++a})}function Ra(t){if(!t)return null;for(var e,i=0;i-1&&(tt(s)[d]=c[d],delete c[d])}}}return n}function Oa(t,e,i,n){if(n){var r=t.anchor;if(i){var a=ue(e,r)<0;a!=ue(i,r)<0?(r=e,e=i):a!=ue(e,i)<0&&(e=i)}return new ca(r,e)}return new ca(i||e,e)}function za(t,e,i,n,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Ya(t,new la([Oa(t.sel.primary(),e,i,r)],0),n)}function Wa(t,e,i){for(var n=[],r=t.cm&&(t.cm.display.shift||t.extend),a=0;a=e.ch:s.to>e.ch))){if(r&&(wt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(i){var d=l.find(n<0?1:-1),h=void 0;if((n<0?u:c)&&(d=Ja(t,d,-n,d&&d.line==e.line?a:null)),d&&d.line==e.line&&(h=ue(d,i))&&(n<0?h<0:h>0))return qa(t,d,e,n,r)}var p=l.find(n<0?-1:1);return(n<0?c:u)&&(p=Ja(t,p,n,p.line==e.line?a:null)),p?qa(t,p,e,n,r):null}}return e}function Za(t,e,i,n,r){var a=n||1,o=qa(t,e,i,a,r)||!r&&qa(t,e,i,a,!0)||qa(t,e,i,-a,r)||!r&&qa(t,e,i,-a,!0);return o||(t.cantEdit=!0,ce(t.first,0))}function Ja(t,e,i,n){return i<0&&0==e.ch?e.line>t.first?ge(t,ce(e.line-1)):null:i>0&&e.ch==(n||ee(t,e.line)).text.length?e.line=0;--r)io(t,{from:n[r].from,to:n[r].to,text:r?[""]:e.text,origin:e.origin});else io(t,e)}}function io(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ue(e.from,e.to)){var i=fa(t,e);Ma(t,e,i,t.cm?t.cm.curOp.id:NaN),ao(t,e,i,Ve(t,e));var n=[];_a(t,function(t,i){i||-1!=Y(n,t.history)||(uo(t.history,e),n.push(t.history)),ao(t,e,null,Ve(t,e))})}}function no(t,e,i){var n=t.cm&&t.cm.state.suppressEdits;if(!n||i){for(var r,a=t.history,o=t.sel,s="undo"==e?a.done:a.undone,l="undo"==e?a.undone:a.done,c=0;c=0;--p){var f=h(p);if(f)return f.v}}}}function ro(t,e){if(0!=e&&(t.first+=e,t.sel=new la(et(t.sel.ranges,function(t){return new ca(ce(t.anchor.line+e,t.anchor.ch),ce(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){$n(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,n=i.viewFrom;nt.lastLine())){if(e.from.linea&&(e={from:e.from,to:ce(a,ee(t,a).text.length),text:[e.text[0]],origin:e.origin}),e.removed=ie(t,e.from,e.to),i||(i=fa(t,e)),t.cm?oo(t.cm,e,n):xa(t,e,n),Xa(t,i,G),t.cantEdit&&Za(t,ce(t.firstLine(),0))&&(t.cantEdit=!1)}}function oo(t,e,i){var n=t.doc,r=t.display,a=e.from,o=e.to,s=!1,l=a.line;t.options.lineWrapping||(l=ae(ii(ee(n,a.line))),n.iter(l,o.line+1,function(t){if(t==r.maxLine)return s=!0,!0})),n.sel.contains(e.from,e.to)>-1&&St(t),xa(n,e,i,Nn(t)),t.options.lineWrapping||(n.iter(l,a.line+e.text.length,function(t){var e=ui(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),Pe(n,a.line),zr(t,400);var c=e.text.length-(o.line-a.line)-1;e.full?$n(t):a.line!=o.line||1!=e.text.length||ba(t.doc,e)?$n(t,a.line,o.line+1,c):Hn(t,a.line,"text");var u=kt(t,"changes"),d=kt(t,"change");if(d||u){var h={from:a,to:o,text:e.text,removed:e.removed,origin:e.origin};d&&Pi(t,"change",t,h),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}function so(t,e,i,n,r){var a;n||(n=i),ue(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),"string"==typeof e&&(e=t.splitLines(e)),eo(t,{from:i,to:n,text:e,origin:r})}function lo(t,e,i,n){i1||!(this.children[0]instanceof po))){var s=[];this.collapse(s),this.children=[new po(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=r.lines.length%25+25,s=o;s10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var n=0;n0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=D("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ei(t,e.line,e,i,a)||e.line!=i.line&&ei(t,i.line,e,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Be()}a.addToHistory&&Ma(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,i.line+1,function(n){c&&a.collapsed&&!c.options.lineWrapping&&ii(n)==c.display.maxLine&&(s=!0),a.collapsed&&l!=e.line&&re(n,0),We(n,new Ne(a,l==e.line?e.ch:null,l==i.line?i.ch:null),t.cm&&t.cm.curOp),++l}),a.collapsed&&t.iter(e.line,i.line+1,function(e){si(t,e)&&re(e,0)}),a.clearOnEnter&&bt(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Fe(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++yo,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)$n(c,e.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=i.line;u++)Hn(c,u,"text");a.atomic&&Ga(c.doc),Pi(c,"markerAdded",c,a)}return a}bo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Tr(t),kt(this,"clear")){var i=this.find();i&&Pi(this,"clear",i.from,i.to)}for(var n=null,r=null,a=0;at.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=n&&t&&this.collapsed&&$n(t,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ga(t.doc)),t&&Pi(t,"markerCleared",t,this,n,r),e&&Ir(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(t,e){var i,n;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)eo(this,n[l]);s?Ka(this,s):this.cm&&dr(this.cm)}),undo:Or(function(){no(this,"undo")}),redo:Or(function(){no(this,"redo")}),undoSelection:Or(function(){no(this,"undo",!0)}),redoSelection:Or(function(){no(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,n=0;n=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,i){t=ge(this,t),e=ge(this,e);var n=[],r=t.line;return this.iter(t.line,e.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r}),n},getAllMarks:function(){var t=[];return this.iter(function(e){var i=e.markedSpans;if(i)for(var n=0;nt)return e=t,!0;t-=a,++i}),ge(this,ce(i,e))},indexFromPos:function(t){t=ge(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var d=t.dataTransfer.getData("Text");if(d){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Xa(e.doc,da(i,i)),h)for(var p=0;p=0;e--)so(t.doc,"",n[e].from,n[e].to,"+delete");dr(t)})}function Zo(t,e,i){var n=dt(t.text,e+i,i);return n<0||n>t.text.length?null:n}function Jo(t,e,i){var n=Zo(t,e.ch,i);return null==n?null:new ce(e.line,n,i<0?"after":"before")}function Qo(t,e,i,n,r){if(t){"rtl"==e.doc.direction&&(r=-r);var a=mt(i,e.doc.direction);if(a){var o,s=r<0?tt(a):a[0],l=r<0==(1==s.level),c=l?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var u=on(e,i);o=r<0?i.text.length-1:0;var d=sn(e,u,o).top;o=ht(function(t){return sn(e,u,t).top==d},r<0==(1==s.level)?s.from:s.to-1,o),"before"==c&&(o=Zo(i,o,1))}else o=r<0?s.to:s.from;return new ce(n,o,c)}}return new ce(n,r<0?i.text.length:0,r<0?"before":"after")}function ts(t,e,i,n){var r=mt(e,t.doc.direction);if(!r)return Jo(e,i,n);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=vt(r,i.ch,i.sticky),o=r[a];if("ltr"==t.doc.direction&&o.level%2==0&&(n>0?o.to>i.ch:o.from=o.from&&h>=u.begin)){var p=d?"before":"after";return new ce(i.line,h,p)}}var f=function(t,e,n){for(var a=function(t,e){return e?new ce(i.line,l(t,1),"before"):new ce(i.line,t,"after")};t>=0&&t0==(1!=o.level),c=s?n.begin:l(n.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||n>0&&g==e.text.length||(v=f(n>0?0:r.length-1,n,c(g)),!v)?null:v}Ho.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"},Ho.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"},Ho.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"},Ho.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"]},Ho["default"]=b?Ho.macDefault:Ho.pcDefault;var es={selectAll:Qa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return qo(t,function(e){if(e.empty()){var i=ee(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line0)r=new ce(r.line,r.ch+1),t.replaceRange(a.charAt(r.ch-1)+a.charAt(r.ch-2),ce(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var o=ee(t.doc,r.line-1).text;o&&(r=new ce(r.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ce(r.line-1,o.length-1),r,"+transpose"))}i.push(new ca(r,r))}t.setSelections(i)})},newlineAndIndent:function(t){return Fr(t,function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var n=0;n-1&&(ue((r=s.ranges[r]).from(),e)<0||e.xRel>0)&&(ue(r.to(),e)>0||e.xRel<0)?As(t,n,e,a):Is(t,n,e,a)}function As(t,e,i,n){var r=t.display,a=!1,c=Br(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:tr(t)),_t(r.wrapper.ownerDocument,"mouseup",c),_t(r.wrapper.ownerDocument,"mousemove",u),_t(r.scroller,"dragstart",d),_t(r.scroller,"drop",c),a||(Tt(e),n.addNew||za(t.doc,i,null,null,n.extend),l&&!p||o&&9==s?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return a=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!n.moveOnDrag,bt(r.wrapper.ownerDocument,"mouseup",c),bt(r.wrapper.ownerDocument,"mousemove",u),bt(r.scroller,"dragstart",d),bt(r.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout(function(){return r.input.focus()},20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Ts(t,e,i){if("char"==i)return new ca(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new ca(ce(e.line,0),ge(t.doc,ce(e.line+1,0)));var n=i(t,e);return new ca(n.from,n.to)}function Is(t,e,i,n){o&&tr(t);var r=t.display,a=t.doc;Tt(e);var s,l,c=a.sel,u=c.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(i),s=l>-1?u[l]:new ca(i,i)):(s=a.sel.primary(),l=a.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new ca(i,i)),i=zn(t,e,!0,!0),l=-1;else{var d=Ts(t,i,n.unit);s=n.extend?Oa(s,d.anchor,d.head,n.extend):d}n.addNew?-1==l?(l=u.length,Ya(a,ua(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==n.unit&&!n.extend?(Ya(a,ua(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):$a(a,l,s,j):(l=0,Ya(a,new la([s],0),j),c=a.sel);var h=i;function p(e){if(0!=ue(h,e))if(h=e,"rectangle"==n.unit){for(var r=[],o=t.options.tabSize,u=V(ee(a,i.line).text,i.ch,o),d=V(ee(a,e.line).text,e.ch,o),p=Math.min(u,d),f=Math.max(u,d),v=Math.min(i.line,e.line),g=Math.min(t.lastLine(),Math.max(i.line,e.line));v<=g;v++){var m=ee(a,v).text,y=Z(m,p,o);p==f?r.push(new ca(ce(v,y),ce(v,y))):m.length>y&&r.push(new ca(ce(v,y),ce(v,Z(m,f,o))))}r.length||r.push(new ca(i,i)),Ya(a,ua(t,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,_=Ts(t,e,n.unit),w=x.anchor;ue(_.anchor,w)>0?(b=_.head,w=fe(x.from(),_.anchor)):(b=_.anchor,w=pe(x.to(),_.head));var C=c.ranges.slice(0);C[l]=Ms(t,new ca(ge(a,w),b)),Ya(a,ua(t,C,l),j)}}var f=r.wrapper.getBoundingClientRect(),v=0;function g(e){var i=++v,o=zn(t,e,!0,"rectangle"==n.unit);if(o)if(0!=ue(o,h)){t.curOp.focus=L(O(t)),p(o);var s=ar(r,a);(o.line>=s.to||o.linef.bottom?20:0;l&&setTimeout(Br(t,function(){v==i&&(r.scroller.scrollTop+=l,g(e))}),50)}}function m(e){t.state.selectingText=!1,v=1/0,e&&(Tt(e),r.input.focus()),_t(r.wrapper.ownerDocument,"mousemove",y),_t(r.wrapper.ownerDocument,"mouseup",b),a.history.lastSelOrigin=null}var y=Br(t,function(t){0!==t.buttons&&Pt(t)?g(t):m(t)}),b=Br(t,m);t.state.selectingText=b,bt(r.wrapper.ownerDocument,"mousemove",y),bt(r.wrapper.ownerDocument,"mouseup",b)}function Ms(t,e){var i=e.anchor,n=e.head,r=ee(t.doc,i.line);if(0==ue(i,n)&&i.sticky==n.sticky)return e;var a=mt(r);if(!a)return e;var o=vt(a,i.ch,i.sticky),s=a[o];if(s.from!=i.ch&&s.to!=i.ch)return e;var l,c=o+(s.from==i.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return e;if(n.line!=i.line)l=(n.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=vt(a,n.ch,n.sticky),d=u-o||(n.ch-i.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=a[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,v=p?"after":"before";return i.ch==f&&i.sticky==v?e:new ca(new ce(i.line,f,v),n)}function Es(t,e,i,n){var r,a;if(e.touches)r=e.touches[0].clientX,a=e.touches[0].clientY;else try{r=e.clientX,a=e.clientY}catch(h){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&Tt(e);var o=t.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!kt(t,i))return Mt(e);a-=s.top-o.viewOffset;for(var l=0;l=r){var u=oe(t.doc,a),d=t.display.gutterSpecs[l];return wt(t,i,t,u,d.className,e),Mt(e)}}}function Ds(t,e){return Es(t,e,"gutterClick",!0)}function Ps(t,e){Ui(t.display,e)||Ls(t,e)||Ct(t,e,"contextmenu")||S||t.display.input.onContextMenu(e)}function Ls(t,e){return!!kt(t,"gutterContextMenu")&&Es(t,e,"gutterContextMenu",!1)}function Rs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(t)}xs.prototype.compare=function(t,e,i){return this.time+bs>t&&0==ue(e,this.pos)&&i==this.button};var Fs={toString:function(){return"CodeMirror.Init"}},Bs={},Ns={};function Os(t){var e=t.optionHandlers;function i(i,n,r,a){t.defaults[i]=n,r&&(e[i]=a?function(t,e,i){i!=Fs&&r(t,e,i)}:r)}t.defineOption=i,t.Init=Fs,i("value","",function(t,e){return t.setValue(e)},!0),i("mode",null,function(t,e){t.doc.modeOption=e,ma(t)},!0),i("indentUnit",2,ma,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(t){ya(t),gn(t),$n(t)},!0),i("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var i=[],n=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var a=t.text.indexOf(e,r);if(-1==a)break;r=a+e.length,i.push(ce(n,a))}n++});for(var r=i.length-1;r>=0;r--)so(t.doc,e,i[r],ce(i[r].line,i[r].ch+e.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=Fs&&t.refresh()}),i("specialCharPlaceholder",bi,function(t){return t.refresh()},!0),i("electricChars",!0),i("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),i("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),i("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),i("rtlMoveVisually",!_),i("wholeLineUpdateBefore",!0),i("theme","default",function(t){Rs(t),ea(t)},!0),i("keyMap","default",function(t,e,i){var n=jo(e),r=i!=Fs&&jo(i);r&&r.detach&&r.detach(t,n),n.attach&&n.attach(t,r||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Ws,!0),i("gutters",[],function(t,e){t.display.gutterSpecs=Qr(e,t.options.lineNumbers),ea(t)},!0),i("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Bn(t.display)+"px":"0",t.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(t){return wr(t)},!0),i("scrollbarStyle","native",function(t){kr(t),wr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),i("lineNumbers",!1,function(t,e){t.display.gutterSpecs=Qr(t.options.gutters,e),ea(t)},!0),i("firstLineNumber",1,ea,!0),i("lineNumberFormatter",function(t){return t},ea,!0),i("showCursorWhenSelecting",!1,Un,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(t,e){"nocursor"==e&&(ir(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),i("screenReaderLabel",null,function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)}),i("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),i("dragDrop",!0,zs),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Un,!0),i("singleCursorHeightPerLine",!0,Un,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,ya,!0),i("addModeClass",!1,ya,!0),i("pollInterval",100),i("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),i("historyEventDelay",1250),i("viewportMargin",10,function(t){return t.refresh()},!0),i("maxHighlightLength",1e4,ya,!0),i("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),i("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),i("autofocus",null),i("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),i("phrases",null)}function zs(t,e,i){var n=i&&i!=Fs;if(!e!=!n){var r=t.display.dragFunctions,a=e?bt:_t;a(t.display.scroller,"dragstart",r.start),a(t.display.scroller,"dragenter",r.enter),a(t.display.scroller,"dragover",r.over),a(t.display.scroller,"dragleave",r.leave),a(t.display.scroller,"drop",r.drop)}}function Ws(t){t.options.lineWrapping?(R(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),di(t)),On(t),$n(t),gn(t),setTimeout(function(){return wr(t)},100)}function $s(t,e){var i=this;if(!(this instanceof $s))return new $s(t,e);this.options=e=e?H(e):{},H(Bs,e,!1);var n=e.value;"string"==typeof n?n=new To(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var r=new $s.inputStyles[e.inputStyle](this),a=this.display=new ia(t,n,r,e);for(var c in a.wrapper.CodeMirror=this,Rs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),kr(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 K,keySeq:null,specialChars:null},e.autofocus&&!y&&a.input.focus(),o&&s<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Hs(this),Fo(),Tr(this),this.curOp.forceUpdate=!0,wa(this,n),e.autofocus&&!y||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&er(i)},20):ir(this),Ns)Ns.hasOwnProperty(c)&&Ns[c](this,e[c],Fs);Jr(this),e.finishInit&&e.finishInit(this);for(var u=0;u400}bt(e.scroller,"touchstart",function(r){if(!Ct(t,r)&&!a(r)&&!Ds(t,r)){e.input.ensurePolled(),clearTimeout(i);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),bt(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),bt(e.scroller,"touchend",function(i){var n=e.activeTouch;if(n&&!Ui(e,i)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,o=t.coordsChar(e.activeTouch,"page");a=!n.prev||l(n,n.prev)?new ca(o,o):!n.prev.prev||l(n,n.prev.prev)?t.findWordAt(o):new ca(ce(o.line,0),ge(t.doc,ce(o.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Tt(i)}r()}),bt(e.scroller,"touchcancel",r),bt(e.scroller,"scroll",function(){e.scroller.clientHeight&&(gr(t,e.scroller.scrollTop),yr(t,e.scroller.scrollLeft,!0),wt(t,"scroll",t))}),bt(e.scroller,"mousewheel",function(e){return sa(t,e)}),bt(e.scroller,"DOMMouseScroll",function(e){return sa(t,e)}),bt(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){Ct(t,e)||Et(e)},over:function(e){Ct(t,e)||(Do(t,e),Et(e))},start:function(e){return Eo(t,e)},drop:Br(t,Mo),leave:function(e){Ct(t,e)||Po(t)}};var c=e.input.getField();bt(c,"keyup",function(e){return vs.call(t,e)}),bt(c,"keydown",Br(t,ps)),bt(c,"keypress",Br(t,gs)),bt(c,"focus",function(e){return er(t,e)}),bt(c,"blur",function(e){return ir(t,e)})}$s.defaults=Bs,$s.optionHandlers=Ns;var Vs=[];function Ks(t,e,i,n){var r,a=t.doc;null==i&&(i="add"),"smart"==i&&(a.mode.indent?r=Ce(t,e).state:i="prev");var o=t.options.tabSize,s=ee(a,e),l=V(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==i&&(c=a.mode.indent(r,s.text.slice(u.length),s.text),c==U||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>a.first?V(ee(a,e-1).text,null,o):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)h+=o,d+="\t";if(ho,l=Ot(e),c=null;if(s&&n.ranges.length>1)if(Ys&&Ys.text.join("\n")==e){if(n.ranges.length%Ys.text.length==0){c=[];for(var u=0;u=0;h--){var p=n.ranges[h],f=p.from(),v=p.to();p.empty()&&(i&&i>0?f=ce(f.line,f.ch-i):t.state.overwrite&&!s?v=ce(v.line,Math.min(ee(a,v.line).text.length,v.ch+tt(l).length)):s&&Ys&&Ys.lineWise&&Ys.text.join("\n")==l.join("\n")&&(f=v=ce(f.line,0)));var g={from:f,to:v,text:c?c[h%c.length]:l,origin:r||(s?"paste":t.state.cutIncoming>o?"cut":"+input")};eo(t.doc,g),Pi(t,"inputRead",t,g)}e&&!s&&js(t,e),dr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Gs(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||Fr(e,function(){return Us(e,i,0,null,"paste")}),!0}function js(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var a=t.getModeAt(r.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Ks(t,r.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(ee(t.doc,r.head.line).text.slice(0,r.head.ch))&&(o=Ks(t,r.head.line,"smart"));o&&Pi(t,"electricInput",t,r.head.line)}}}function qs(t){for(var e=[],i=[],n=0;ni&&(Ks(this,r.head.line,t,!0),i=r.head.line,n==this.doc.sel.primIndex&&dr(this));else{var a=r.from(),o=r.to(),s=Math.max(i,a.line);i=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$a(this.doc,n,new ca(a,c[n].to()),G)}}}),getTokenAt:function(t,e){return Ie(this,t,e)},getLineTokens:function(t,e){return Ie(this,ce(t),e,!0)},getTokenTypeAt:function(t){t=ge(this.doc,t);var e,i=we(this,ee(this.doc,t.line)),n=0,r=(i.length-1)/2,a=t.ch;if(0==a)e=i[2];else for(;;){var o=n+r>>1;if((o?i[2*o-1]:0)>=a)r=o;else{if(!(i[2*o+1]a&&(t=a,r=!0),n=ee(this.doc,t)}else n=t;return xn(this,n,{top:0,left:0},e||"page",i||r).top+(r?this.doc.height-ci(n):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,n,r){var a=this.display;t=Cn(this,ge(this.doc,t));var o=t.bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),a.sizer.appendChild(e),"over"==n)o=t.top;else if("above"==n||"near"==n){var l=Math.max(a.wrapper.clientHeight,this.doc.height),c=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(o=t.bottom),s+e.offsetWidth>c&&(s=c-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==r?(s=a.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(a.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),i&&lr(this,{left:s,top:o,right:s+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:Nr(ps),triggerOnKeyPress:Nr(gs),triggerOnKeyUp:vs,triggerOnMouseDown:Nr(ws),execCommand:function(t){if(es.hasOwnProperty(t))return es[t].call(null,this)},triggerElectric:Nr(function(t){js(this,t)}),findPosH:function(t,e,i,n){var r=1;e<0&&(r=-1,e=-e);for(var a=ge(this.doc,t),o=0;o0&&s(i.charAt(n-1)))--n;while(r.5||this.options.lineWrapping)&&On(this),wt(this,"refresh",this)}),swapDoc:Nr(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,t),gn(this),this.display.input.reset(),hr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Pi(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},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}},At(t),t.registerHelper=function(e,n,r){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][n]=r},t.registerGlobalHelper=function(e,n,r,a){t.registerHelper(e,n,a),i[e]._global.push({pred:r,val:a})}}function tl(t,e,i,n,r){var a=e,o=i,s=ee(t,e.line),l=r&&"rtl"==t.direction?-i:i;function c(){var i=e.line+l;return!(i=t.first+t.size)&&(e=new ce(i,e.ch,e.sticky),s=ee(t,i))}function u(a){var o;if("codepoint"==n){var u=s.text.charCodeAt(e.ch+(i>0?0:-1));if(isNaN(u))o=null;else{var d=i>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new ce(e.line,Math.max(0,Math.min(s.text.length,e.ch+i*(d?2:1))),-i)}}else o=r?ts(t.cm,s,e,i):Jo(s,e,i);if(null==o){if(a||!c())return!1;e=Qo(r,t.cm,s,e.line,l)}else e=o;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,p=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;;f=!1){if(i<0&&!u(!f))break;var v=s.text.charAt(e.ch)||"\n",g=st(v,p)?"w":h&&"\n"==v?"n":!h||/\s/.test(v)?null:"p";if(!h||f||g||(g="s"),d&&d!=g){i<0&&(i=1,u(),e.sticky="after");break}if(g&&(d=g),i>0&&!u(!f))break}var m=Za(t,e,a,o,!0);return de(a,m)&&(m.hitSide=!0),m}function el(t,e,i,n){var r,a,o=t.doc,s=e.left;if("page"==n){var l=Math.min(t.display.wrapper.clientHeight,W(t).innerHeight||o(t).documentElement.clientHeight),c=Math.max(l-.5*Ln(t.display),3);r=(i>0?e.bottom:e.top)+i*c}else"line"==n&&(r=i>0?e.bottom+3:e.top-3);for(;;){if(a=An(t,s,r),!a.outside)break;if(i<0?r<=0:r>=o.height){a.hitSide=!0;break}r+=5*i}return a}var il=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function nl(t,e){var i=an(t,e.line);if(!i||i.hidden)return null;var n=ee(t.doc,e.line),r=en(i,n,e.line),a=mt(n,t.doc.direction),o="left";if(a){var s=vt(a,e.ch);o=s%2?"right":"left"}var l=un(r.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function rl(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function al(t,e){return e&&(t.bad=!0),t}function ol(t,e,i,n,r){var a="",o=!1,s=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function u(){o&&(a+=s,l&&(a+=s),o=l=!1)}function d(t){t&&(u(),a+=t)}function h(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void d(i);var a,p=e.getAttribute("cm-marker");if(p){var f=t.findMarks(ce(n,0),ce(r+1,0),c(+p));return void(f.length&&(a=f[0].find(0))&&d(ie(t.doc,a.from,a.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var v=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;v&&u();for(var g=0;g=e.display.viewTo||a.line=e.display.viewFrom&&nl(e,r)||{node:l[0].measure.map[2],offset:0},u=a.linen.firstLine()&&(o=ce(o.line-1,ee(n.doc,o.line-1).length)),s.ch==ee(n.doc,s.line).text.length&&s.liner.viewTo-1)return!1;o.line==r.viewFrom||0==(t=Wn(n,o.line))?(e=ae(r.view[0].line),i=r.view[0].node):(e=ae(r.view[t].line),i=r.view[t-1].node.nextSibling);var l,c,u=Wn(n,s.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ae(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!i)return!1;var d=n.doc.splitLines(ol(n,i,c,e,l)),h=ie(n.doc,ce(e,0),ce(l,ee(n.doc,l).text.length));while(d.length>1&&h.length>1)if(tt(d)==tt(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}var p=0,f=0,v=d[0],g=h[0],m=Math.min(v.length,g.length);while(po.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1))p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var _=ce(e,p),w=ce(l,h.length?tt(h).length-f:0);return d.length>1||d[0]||ue(_,w)?(so(n.doc,d,_,w,"+input"),!0):void 0},il.prototype.ensurePolled=function(){this.forceCompositionEnd()},il.prototype.reset=function(){this.forceCompositionEnd()},il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},il.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},il.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Fr(this.cm,function(){return $n(t.cm)})},il.prototype.setUneditable=function(t){t.contentEditable="false"},il.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Br(this.cm,Us)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},il.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},il.prototype.onContextMenu=function(){},il.prototype.resetPosition=function(){},il.prototype.needsContentAttribute=!0;var cl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ul(t,e){if(e=e?H(e):{},e.value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=L(z(t));e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function n(){t.value=s.getValue()}var r;if(t.form&&(bt(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var a=t.form;r=a.submit;try{var o=a.submit=function(){n(),a.submit=r,a.submit(),a.submit=o}}catch(l){}}e.finishInit=function(i){i.save=n,i.getTextArea=function(){return t},i.toTextArea=function(){i.toTextArea=isNaN,n(),t.parentNode.removeChild(i.getWrapperElement()),t.style.display="",t.form&&(_t(t.form,"submit",n),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var s=$s(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s}function dl(t){t.off=_t,t.on=bt,t.wheelEventPixels=oa,t.Doc=To,t.splitLines=Ot,t.countColumn=V,t.findColumn=Z,t.isWordChar=ot,t.Pass=U,t.signal=wt,t.Line=hi,t.changeEnd=ha,t.scrollbarModel=Sr,t.Pos=ce,t.cmpPos=ue,t.modes=Vt,t.mimeModes=Kt,t.resolveMode=Ut,t.getMode=Gt,t.modeExtensions=jt,t.extendMode=qt,t.copyState=Zt,t.startState=Qt,t.innerMode=Jt,t.commands=es,t.keyMap=Ho,t.keyName=Go,t.isModifierKey=Xo,t.lookupKey=Yo,t.normalizeKeyMap=Ko,t.StringStream=te,t.SharedTextMarker=_o,t.TextMarker=bo,t.LineWidget=vo,t.e_preventDefault=Tt,t.e_stopPropagation=It,t.e_stop=Et,t.addClass=R,t.contains=P,t.rmClass=T,t.keyNames=Oo}cl.prototype.init=function(t){var e=this,i=this,n=this.cm;this.createField(t);var r=this.textarea;function a(t){if(!Ct(n,t)){if(n.somethingSelected())Xs({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var e=qs(n);Xs({lineWise:!0,text:e.text}),"cut"==t.type?n.setSelections(e.ranges,null,G):(i.prevInput="",r.value=e.text.join("\n"),B(r))}"cut"==t.type&&(n.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),bt(r,"input",function(){o&&s>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()}),bt(r,"paste",function(t){Ct(n,t)||Gs(t,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())}),bt(r,"cut",a),bt(r,"copy",a),bt(t.scroller,"paste",function(e){if(!Ui(t,e)&&!Ct(n,e)){if(!r.dispatchEvent)return n.state.pasteIncoming=+new Date,void i.focus();var a=new Event("paste");a.clipboardData=e.clipboardData,r.dispatchEvent(a)}}),bt(t.lineSpace,"selectstart",function(e){Ui(t,e)||Tt(e)}),bt(r,"compositionstart",function(){var t=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:n.markText(t,n.getCursor("to"),{className:"CodeMirror-composing"})}}),bt(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},cl.prototype.createField=function(t){this.wrapper=Js(),this.textarea=this.wrapper.firstChild;var e=this.cm.options;Zs(this.textarea,e.spellcheck,e.autocorrect,e.autocapitalize)},cl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},cl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,n=Gn(t);if(t.options.moveInputWithCursor){var r=Cn(t,i.sel.primary().head,"div"),a=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+o.left-a.left))}return n},cl.prototype.showSelection=function(t){var e=this.cm,i=e.display;M(i.cursorDiv,t.cursors),M(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},cl.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var e=this.cm;if(this.resetting=!0,e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&B(this.textarea),o&&s>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},cl.prototype.getField=function(){return this.textarea},cl.prototype.supportsTouch=function(){return!1},cl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||L(z(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(t){}},cl.prototype.blur=function(){this.textarea.blur()},cl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cl.prototype.receivedFocus=function(){this.slowPoll()},cl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},cl.prototype.fastPoll=function(){var t=!1,e=this;function i(){var n=e.poll();n||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,i))}e.pollingFast=!0,e.polling.set(20,i)},cl.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!e.state.focused||zt(i)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=i.value;if(r==n&&!e.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===r||b&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=r.charCodeAt(0);if(8203!=a||n||(n="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}var l=0,c=Math.min(n.length,r.length);while(l1e3||r.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},cl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cl.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},cl.prototype.onContextMenu=function(t){var e=this,i=e.cm,n=i.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=zn(i,t),c=n.scroller.scrollTop;if(a&&!h){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(a)&&Br(i,Ya)(i.doc,da(a),G);var d,p=r.style.cssText,f=e.wrapper.style.cssText,v=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-v.top-5)+"px; left: "+(t.clientX-v.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(d=r.ownerDocument.defaultView.scrollY),n.input.focus(),l&&r.ownerDocument.defaultView.scrollTo(null,d),n.input.reset(),i.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=y,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll),o&&s>=9&&m(),S){Et(t);var g=function(){_t(window,"mouseup",g),setTimeout(y,20)};bt(window,"mouseup",g)}else setTimeout(y,50)}function m(){if(null!=r.selectionStart){var t=i.somethingSelected(),a="​"+(t?r.value:"");r.value="⇚",r.value=a,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=a.length,n.selForContextMenu=i.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=p,o&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=r.selectionStart)){(!o||o&&s<9)&&m();var t=0,a=function(){n.selForContextMenu==i.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Br(i,Qa)(i):t++<10?n.detectingSelectAll=setTimeout(a,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(a,200)}}},cl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},cl.prototype.setUneditable=function(){},cl.prototype.needsContentAttribute=!1,Os($s),Qs($s);var hl="iter insert remove copy getEditor constructor".split(" ");for(var pl in To.prototype)To.prototype.hasOwnProperty(pl)&&Y(hl,pl)<0&&($s.prototype[pl]=function(t){return function(){return t.apply(this.doc,arguments)}}(To.prototype[pl]));return At(To),$s.inputStyles={textarea:cl,contenteditable:il},$s.defineMode=function(t){$s.defaults.mode||"null"==t||($s.defaults.mode=t),Yt.apply(this,arguments)},$s.defineMIME=Xt,$s.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),$s.defineMIME("text/plain","null"),$s.defineExtension=function(t,e){$s.prototype[t]=e},$s.defineDocExtension=function(t,e){To.prototype[t]=e},$s.fromTextArea=ul,dl($s),$s.version="5.65.16",$s})},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 r=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.")},a=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=a(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,r=t.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;e[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=r,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-r%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).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=[],r=0;r>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(a))}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)))}},f=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,r=n.words,a=n.sigBytes,o=this.blockSize,s=4*o,l=a/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,a);if(u){for(var h=0;h>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=h,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=h;for(r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=n._createHelper(l)}(),t.RabbitLegacy})},35038:function(t,e,i){"use strict";i.d(e,{Qo:function(){return a},_3:function(){return u},dp:function(){return o},iO:function(){return c},mk:function(){return s},ms:function(){return l},z6:function(){return d}});var n=i(75769),r={GetWatchlist:"/api/market/watchlist/get",AddWatchlist:"/api/market/watchlist/add",RemoveWatchlist:"/api/market/watchlist/remove",GetWatchlistPrices:"/api/market/watchlist/prices",MultiAnalysis:"/api/analysis/multiAnalysis",CreateAnalysisTask:"/api/analysis/createTask",GetAnalysisTaskStatus:"/api/analysis/getTaskStatus",GetAnalysisHistoryList:"/api/analysis/getHistoryList",DeleteAnalysisTask:"/api/analysis/deleteTask",ReflectAnalysis:"/api/analysis/reflect",ChatMessage:"/api/ai/chat/message",GetChatHistory:"/api/ai/chat/history",SaveChatHistory:"/api/ai/chat/history/save",GetConfig:"/api/market/config",GetMenuFooterConfig:"/api/market/menuFooterConfig",GetMarketTypes:"/api/market/types",SearchSymbols:"/api/market/symbols/search",GetHotSymbols:"/api/market/symbols/hot"};function a(t){return(0,n.Ay)({url:r.GetWatchlist,method:"get",params:t})}function o(t){return(0,n.Ay)({url:r.AddWatchlist,method:"post",data:t})}function s(t){return(0,n.Ay)({url:r.RemoveWatchlist,method:"post",data:t})}function l(t){return(0,n.Ay)({url:r.GetWatchlistPrices,method:"get",params:{watchlist:JSON.stringify(t.watchlist||[])}})}function c(){return(0,n.Ay)({url:r.GetMarketTypes,method:"get"})}function u(t){return(0,n.Ay)({url:r.SearchSymbols,method:"get",params:t})}function d(t){return(0,n.Ay)({url:r.GetHotSymbols,method:"get",params:t})}},36308:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,r=e.algo,a=r.SHA256,o=r.SHA224=a.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=a._createHelper(o),e.HmacSHA224=a._createHmacHelper(o)}(),t.SHA224})},38096:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return la}});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)],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("backtest-modal",{attrs:{visible:t.showBacktestModal,userId:t.userId,indicator:t.backtestIndicator,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe},on:{cancel:function(e){t.showBacktestModal=!1,t.backtestIndicator=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("backtest-history-drawer",{attrs:{visible:t.showBacktestHistoryDrawer,userId:t.userId,indicatorId:t.backtestHistoryIndicator?t.backtestHistoryIndicator.id:null,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe,isMobile:t.isMobile},on:{cancel:function(e){t.showBacktestHistoryDrawer=!1,t.backtestHistoryIndicator=null},view:t.handleViewBacktestRun}}),e("backtest-run-viewer",{attrs:{visible:t.showBacktestRunViewer,run:t.selectedBacktestRun},on:{cancel:function(e){t.showBacktestRunViewer=!1,t.selectedBacktestRun=null}}}),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}})],1)},r=[],a=(i(96305),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(89999),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),f=i(75769),v=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=[],b=i(57532),x=(i(2892),i(27495),i(99449),i(25440),i(11392),i(15237)),_=i.n(x),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),C=i.n(w),S=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,f.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=_()(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,r,a,o,s,c,u,d,h,p,f,v,g,m,y,x,_,w,k,A,T,I,M,E;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,r="/api/indicator/aiGenerate",a=C().get(S.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:a?"Bearer ".concat(a):"","Access-Token":a||"",Token:a||""},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,f=p.done,v=p.value,!f){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(v,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,b.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(x=y.value,x.trim()&&x.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(_=x.substring(6),"[DONE]"!==_){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(_),!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),A=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:A-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,M=e.v,m.e(M);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(T=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(T),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,E=e.v,t.$message.error(E.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(I=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(I));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]])}))()}}},A=k,T=i(81656),I=(0,T.A)(A,m,y,!1,null,"4fea1865",null),M=I.exports,E=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=[];i(2259);function P(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],i=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}throw new TypeError((0,o.A)(t)+" is not iterable")}var L=i(26297),R=i(2403),F=(i(34782),i(26910),i(71761),function(t,e){return F=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])},F(t,e)});function B(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}F(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,W,$,H,V,K,Y,X=function(){return X=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&r[r.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[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 q(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=a.next()).done)o.push(n.value)}catch(s){r={error:s}}finally{try{n&&!n.done&&(i=a["return"])&&i.call(a)}finally{if(r)throw r.error}}return o}function Z(t,e,i){if(i||2===arguments.length)for(var n,r=0,a=e.length;r1e9)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 Wt(t,e){var i="".concat(t),n=i.match(/\.0*(\d+)/);if(It(n)&&parseInt(n[1])>0){var r=n[0].length-1-n[1].length;if(r>=e)return i.replace(/\.0*/,".0{".concat(r,"}"))}return i}function $t(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 Vt(t,e,i,n){if(!It(Dt)){var r=document.createElement("canvas"),a=$t(r);Dt=r.getContext("2d"),Dt.scale(a,a)}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"})(Pt||(Pt={}));var Kt,Yt=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 Xt(t,e,i,n,r){var a,o=e.result,s=e.figures,l=e.styles,c=Ft(l,"circles",n.circles),u=c.length,d=Ft(l,"bars",n.bars),h=d.length,p=Ft(l,"lines",n.lines),f=p.length,v=0,g=0,m=0;s.forEach(function(s){var l;switch(s.type){case"circle":var y=c[v%u];a=X(X({},y),{color:y.noChangeColor}),v++;break;case"bar":var b=d[g%h];a=X(X({},b),{color:b.noChangeColor}),g++;break;case"line":a=p[m%f],m++;break}if(It(a)){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]}},_=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);r(s,X(X({},a),_))}})}(function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"})(Kt||(Kt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,r=t.calcParams,a=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,f=t.extendData,v=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:Kt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==r&&void 0!==r?r:[],this.figures=null!==a&&void 0!==a?a:[],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=Ct(null!==p&&void 0!==p?p:{}),this.extendData=f,this.regenerateFigures=null!==v&&void 0!==v?v: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 U(this,void 0,void 0,function(){var e;return G(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 B(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function jt(){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,Zt=1,Jt=-1,Qt="overlay_",te="overlay_figure_",ee=Number.MAX_SAFE_INTEGER,ie=function(){function t(t){this.currentStep=Zt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,r=t.styles,a=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,f=t.createXAxisFigures,v=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,b=t.onDrawing,x=t.onDrawEnd,_=t.onClick,w=t.onDoubleClick,C=t.onRightClick,S=t.onPressedMoveStart,k=t.onPressedMoving,A=t.onPressedMoveEnd,T=t.onMouseEnter,I=t.onMouseLeave,M=t.onRemoved,E=t.onSelected,D=t.onDeselected;this.name=a,this.totalStep=!Tt(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=Ct(null!==r&&void 0!==r?r:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==f&&void 0!==f?f:null,this.createYAxisFigures=null!==v&&void 0!==v?v: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!==b&&void 0!==b?b:null,this.onDrawEnd=null!==x&&void 0!==x?x:null,this.onClick=null!==_&&void 0!==_?_:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==C&&void 0!==C?C:null,this.onPressedMoveStart=null!==S&&void 0!==S?S:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==A&&void 0!==A?A:null,this.onMouseEnter=null!==T&&void 0!==T?T:null,this.onMouseLeave=null!==I&&void 0!==I?I:null,this.onRemoved=null!==M&&void 0!==M?M:null,this.onSelected=null!==E&&void 0!==E?E:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Et(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Et(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=Z([],q(t),!1),t.length>=this.totalStep-1?(this.currentStep=Jt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=a:r=a,o<=2)break}return n}function de(t){var e=Math.floor(ve(t)),i=ge(e),n=t/i,r=0;return r=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=r*i,e>=-20?+t.toFixed(e<0?-e:0):t}function he(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function pe(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function fe(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var r,a;n[0]=Math.max(null!==(r=t[e])&&void 0!==r?r:t,n[0]),n[1]=Math.min(null!==(a=t[i])&&void 0!==a?a:t,n[1])}),n}function ve(t){return Math.log(t)/Math.log(10)}function ge(t){return Math.pow(10,t)}function me(){return{from:0,to:0,realFrom:0,realTo:0}}(function(t){t["Forward"]="forward",t["Backward"]="backward"})(re||(re={}));var ye={MIN:1,MAX:50},be=6,xe=50,_e=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=be,this._offsetRightDistance=xe,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=me(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t=Math.floor(.82*this._barSpace),e=Math.floor(this._barSpace),i=Math.min(t,e-1);return Math.max(1,i)},t.prototype.adjustVisibleRange=function(){var t,e,i,n,r=this._chartStore.getDataList(),a=r.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,a);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-a+Math.min(n,a);this._lastBarRightSideDiffBarCounta&&(c=a);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(a+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Pt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=r[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:re.Forward,data:null!==p&&void 0!==p?p:null})}c===a&&this._chartStore.executeLoadDataCallback({type:re.Backward,data:null!==(e=r[a-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"};Et(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){bt("","","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:this._gapBarSpace/2}},t.prototype.setBarSpace=function(t,e){tye.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;this._chartStore.getActionStore().execute(Pt.OnScroll),this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)}},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:ue(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)-.5},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 r=null!==e&&void 0!==e?e:null;if(!Tt(null===r||void 0===r?void 0:r.x)){var a=this._chartStore.getTooltipStore().getCrosshair();r={x:null!==(i=null===a||void 0===a?void 0:a.x)&&void 0!==i?i:this._totalBarSpace/2}}this._chartStore.getActionStore().execute(Pt.OnZoom);var o=r.x,s=this.coordinateToFloatIndex(o),l=this._barSpace+t*(this._barSpace/10);this.setBarSpace(l,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)})}},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=me()},t}(),we={name:"AVP",shortName:"AVP",series:Kt.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,r,a={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(r=null===t||void 0===t?void 0:t.volume)&&void 0!==r?r:0;return e+=o,i+=s,0!==i&&(a.avp=e/i),a})}},Ce={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):Ft(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]),r=0,a=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(r+=u,a+=u,l>=i[0]-1){o=r/i[0];var d=t[l-(i[0]-1)];r-=(d.low+d.high)/2}if(l>=i[1]-1){s=a/i[1];d=t[l-(i[1]-1)];a-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Se={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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,l){var c;if(r[l]=(null!==(c=r[l])&&void 0!==c?c:0)+s,a>=e-1){var u=r[l]/i[l];o[n[l].key]=(s-u)/u*100,r[l]-=t[a-(e-1)].close}}),o})}};function ke(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 Ae={name:"BOLL",shortName:"BOLL",series:Kt.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,r=0;return t.map(function(e,a){var o=e.close,s={};if(r+=o,a>=n){s.mid=r/i[0];var l=ke(t.slice(a-n,a+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,r-=t[a-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,r=0,a=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,f=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(a+=d-p,o+=p-h,n+=d-f,r+=f-h,s>=i[0]-1){u.ar=0!==o?a/o*100:0,u.br=0!==r?n/r*100:0;var v=t[s-(i[0]-1)],g=v.high,m=v.low,y=v.open,b=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-b,r-=b-m,a-=g-y,o-=y-m}return u})}},Ie={name:"BBI",shortName:"BBI",series:Kt.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,Z([],q(i),!1)),r=[],a=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;r[i]=(null!==(n=r[i])&&void 0!==n?n:0)+l,o>=e-1&&(a[i]=r[i]/e,r[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;a.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Me={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,r=0,a=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(r+=l,a.push(l),o>=n){var c=r/i[0],u=a.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;r-=p}return s})}},Ee={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),r=Math.ceil(i[2]/2.5+1),a=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,f=[],v=[];return t.forEach(function(e,g){var m,y,b,x,_,w={},C=null!==(m=t[g-1])&&void 0!==m?m:e,S=(C.high+C.close+C.low+C.open)/4,k=Math.max(0,e.high-S),A=Math.max(0,S-e.low);g>=i[0]-1&&(w.cr=0!==A?k/A*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=v[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]+r-3&&(w.ma2=u[u.length-1-r]),c-=null!==(b=v[g-(i[2]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+a-3&&(w.ma3=h[h.length-1-a]),d-=null!==(x=v[g-(i[3]-1)].cr)&&void 0!==x?x:0),g>=i[0]+i[4]-2&&(f.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=f[f.length-1-o]),p-=null!==(_=v[g-(i[4]-1)].cr)&&void 0!==_?_:0)),v.push(w)}),v}},De={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]),r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;r+=d,a+=d;var h=0,p=0;if(l>=i[0]-1&&(h=r/i[0],r-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=a/i[1],a-=t[l-(i[1]-1)].close),l>=n-1){var f=h-p;u.dma=f,o+=f,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}},Pe={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,r=0,a=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,f,v={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,b=e.low,x=y-b,_=Math.abs(y-m),w=Math.abs(m-b),C=y-g.high,S=g.low-b,k=Math.max(Math.max(x,_),w),A=C>0&&C>S?C:0,T=S>0&&S>C?S:0;if(n+=k,r+=A,a+=T,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+A,l=l-l/i[0]+T):(o=n,s=r,l=a);var I=0,M=0;0!==o&&(I=100*s/o,M=100*l/o),v.pdi=I,v.mdi=M;var E=0;M+I!==0&&(E=Math.abs(M-I)/(M+I)*100),c+=E,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+E)/i[0]:c/i[0],v.adx=u,h>=2*i[0]+i[1]-3&&(v.adxr=((null!==(f=d[h-(i[1]-1)].adx)&&void 0!==f?f:0)+u)/2))}d.push(v)}),d}},Le={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,r=[];return t.map(function(e,a){var o,s={};if(a>0){var l=t[a-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,r.push(s.emv),a>=i[0]&&(s.maEmv=n/i[0],n-=r[a-i[0]])}return s})}},Re={name:"EMA",shortName:"EMA",series:Kt.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,r=0,a=[];return t.map(function(t,e){var o={},s=t.close;return r+=s,i.forEach(function(t,i){e>=t-1&&(a[i]=e>t-1?(2*s+(t-1)*a[i])/(t+1):r/t,o[n[i].key]=a[i])}),o})}},Fe={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,r=[];return t.forEach(function(e,a){var o,s={};if(a>=i[0]){var l=e.close,c=t[a-i[0]].close;s.mtm=l-c,n+=s.mtm,a>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=r[a-(i[1]-1)].mtm)&&void 0!==o?o:0)}r.push(s)}),r}},Be={name:"MA",shortName:"MA",series:Kt.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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,i){var l;r[i]=(null!==(l=r[i])&&void 0!==l?l:0)+s,a>=e-1&&(o[n[i].key]=r[i]/e,r[i]-=t[a-(e-1)].close)}),o})}},Ne={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,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Ft(e.styles,"bars[0].downColor",i.bars[0].downColor):Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=r[0]-1&&(i=e>r[0]-1?(2*d+(r[0]-1)*i)/(r[0]+1):a/r[0]),e>=r[1]-1&&(n=e>r[1]-1?(2*d+(r[1]-1)*n)/(r[1]+1):a/r[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+r[2]-2&&(l=e>c+r[2]-2?(2*o+l*(r[2]-1))/(r[2]+1):s/r[2],u.macd=2*(o-l),u.dea=l)),u})}},Oe={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,r=0,a=[];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&&(r+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:r};n+=r,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=a[o-(i[0]-1)].obv)&&void 0!==u?u:0),a.push(h)}),a}},ze={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var r,a,o={},s=i.close,l=null!==(r=i.volume)&&void 0!==r?r:1,c=(null!==(a=t[n-1])&&void 0!==a?a:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},We={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,r=0,a=[],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;a.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,r+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=r/i[1],r-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=a[s-(i[0]-1)]),o.push(u)}),o}},$e={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=[],r=0;return t.forEach(function(e,a){var o,s,l={};if(a>=i[0]-1){var c=e.close,u=(null!==(o=t[a-i[0]])&&void 0!==o?o:t[a-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,r+=l.roc,a>=i[0]-1+i[1]-1&&(l.maRoc=r/i[1],r-=null!==(s=n[a-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},He={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,r=[],a=[];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?r[i]=(null!==(s=r[i])&&void 0!==s?s:0)+u:a[i]=(null!==(c=a[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==a[i]?l[n[i].key]=100-100/(1+r[i]/a[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,f=h.close-p.close;f>0?r[i]-=f:a[i]-=Math.abs(f)}}),l})}},Ve={name:"SMA",shortName:"SMA",series:Kt.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,r=0;return t.map(function(t,e){var a={},o=t.close;return n+=o,e>=i[0]-1&&(r=e>i[0]-1?(o*i[1]+r*(i[0]-i[1]+1))/(i[0]+1):n/i[0],a.sma=r),a})}},Ke={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,r){var a,o,s,l,c={},u=e.close;if(r>=i[0]-1){var d=fe(t.slice(r-(i[0]-1),r+1),"high","low"),h=d[0],p=d[1],f=h-p,v=(u-p)/(0===f?1:f)*100;c.k=((i[1]-1)*(null!==(o=null===(a=n[r-1])||void 0===a?void 0:a.k)&&void 0!==o?o:50)+v)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[r-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}},Ye={name:"SAR",shortName:"SAR",series:Kt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,r,a=t.current,o=null!==(r=null===(n=a.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,s=a.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+r,a)),c=u+o*(s-u);var f=Math.max(t[Math.max(1,i)-1].high,d);c=a[0]-1&&(i=e>a[0]-1?(2*p+(a[0]-1)*i)/(a[0]+1):o/a[0],s+=i,e>=2*a[0]-2&&(n=e>2*a[0]-2?(2*i+(a[0]-1)*n)/(a[0]+1):s/a[0],l+=n,e>=3*a[0]-3))){var f=void 0,v=0;e>3*a[0]-3?(f=(2*n+(a[0]-1)*r)/(a[0]+1),v=(f-r)/r*100):f=l/a[0],r=f,h.trix=v,c+=v,e>=3*a[0]+a[1]-4&&(h.maTrix=c/a[1],c-=null!==(d=u[e-(a[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}},Ue={name:"VOL",shortName:"VOL",series:Kt.Volume,calcParams:[5,10,20],shouldFormatBigNumber:!0,precision:0,minValue:0,figures:[{key:"ma1",title:"MA5: ",type:"line"},{key:"ma2",title:"MA10: ",type:"line"},{key:"ma3",title:"MA20: ",type:"line"},{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,r=Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return It(n)&&(n.close>n.open?r=Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):n.closer.open?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):r.close=e-1&&(l[n[i].key]=r[i]/e,r[i]-=null!==(c=t[a-(e-1)].volume)&&void 0!==c?c:0)}),l})}},Ge={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,r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,f={},v=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(v>g?n+=m:v=i[0]-1){var y=a/2;f.vr=r+y===0?0:(n+y)/(r+y)*100,o+=f.vr,l>=i[0]+i[1]-2&&(f.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var b=t[l-(i[0]-1)],x=null!==(h=t[l-i[0]])&&void 0!==h?h:b,_=b.close,w=null!==(p=b.volume)&&void 0!==p?p:0;_>x.close?n-=w:_=s){var l=fe(t.slice(r-s,r+1),"high","low"),c=l[0],u=l[1],d=c-u;a[n[i].key]=0===d?0:(o-c)/d*100}}),a})}},qe={},Ze=[we,Ce,Se,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je];function Je(t){qe[t.name]=Gt.extend(t)}function Qe(t){var e;return null!==(e=qe[t])&&void 0!==e?e:null}Ze.forEach(function(t){qe[t.name]=Gt.extend(t)});var ti=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,r=e.calcParams,a=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,f=e.extendData,v=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,b=!1;Et(i)&&t.setShortName(i)&&(b=!0),It(n)&&t.setSeries(n)&&(b=!0);var x=!1;St(r)&&t.setCalcParams(r)&&(b=!0,x=!0),St(o)&&t.setFigures(o)&&(b=!0,x=!0),void 0!==s&&t.setMinValue(s)&&(b=!0),void 0!==l&&t.setMinValue(l)&&(b=!0),Tt(a)&&t.setPrecision(a)&&(b=!0),Mt(c)&&t.setShouldOhlc(c)&&(b=!0),Mt(u)&&t.setShouldFormatBigNumber(u)&&(b=!0),Mt(d)&&t.setVisible(d)&&(b=!0);var _=!1;return Tt(h)&&t.setZLevel(h)&&(b=!0,_=!0),It(p)&&t.setStyles(p)&&(b=!0),t.setExtendData(f)&&(b=!0,x=!0),void 0!==v&&t.setRegenerateFigures(v)&&(b=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(b=!0),void 0!==m&&t.setDraw(m)&&(b=!0),kt(y)&&(t.calc=y,x=!0),[b,x,_]},t.prototype._sort=function(t){var e;Et(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 U(this,void 0,void 0,function(){var n,r,a,o,s;return G(this,function(l){switch(l.label){case 0:return n=t.name,r=this._instances.get(e),It(r)?(a=r.find(function(t){return t.name===n}),It(a)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return It(r)||(r=[]),o=Qe(n),s=new o,this._overrideInstance(s,t),i||(r=[]),r.push(s),this._instances.set(e,r),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,r=this._instances.get(t);if(It(r)){if(Et(e)){var a=r.findIndex(function(t){return t.name===e});a>-1&&(r.splice(a,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 U(this,void 0,void 0,function(){var i,n,r,a,o=this;return G(this,function(s){switch(s.label){case 0:return i=[],Et(t)?Et(e)?(n=this._instances.get(e),It(n)&&(r=n.find(function(e){return e.name===t}),It(r)&&i.push(r.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});It(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 a=s.sent(),[2,a.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,r=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Et(t)){var a=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Et(e)?null!==(n=null===a||void 0===a?void 0:a.find(function(t){return t.name===e}))&&void 0!==n?n:null:r(a)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,r(t))}),o},t.prototype.setSeriesPrecision=function(t){this._instances.forEach(function(e){e.forEach(function(e){e.series===Kt.Price&&e.setPrecision(t.price,!0),e.series===Kt.Volume&&e.setPrecision(t.volume,!0)})})},t.prototype.override=function(t,e){return U(this,void 0,void 0,function(){var i,n,r,a,o,s,l,c=this;return G(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(r=this._instances.get(e),It(r)&&n.set(e,r)):n=this._instances,a=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(It(n)){var r=c._overrideInstance(n,t);r[2]&&(s=!0),r[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):r[0]&&(a=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[a,l.includes(!0)]]}})})},t}(),ei=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,r=this._chartStore.getDataList(),a=null!==t&&void 0!==t?t:{};Tt(a.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(a.x),n=i<0?0:i>r.length-1?r.length-1:i):(i=r.length-1,n=i);var o=r[n],s=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),l={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=X(X({},a),{realX:s,kLineData:o,realDataIndex:i,dataIndex:n}),l.x===a.x&&l.y===a.y&&l.paneId===a.paneId||(null!==o&&this._chartStore.getChart().crosshairChange(this._crosshair),null!==e&&void 0!==e&&e||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,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({},!0),this.setActiveIcon()},t}(),ii={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n=t.overlay,r=t.precision,a=t.thousandsSeparator,o=t.decimalFoldThreshold,s=n.points;if(e.length>0){var l=[],c=[],u=0,d=i.width;if(e.length>1&&Tt(s[0].value)&&Tt(s[1].value)){var h=[1,.786,.618,.5,.382,.236,0],p=e[0].y-e[1].y,f=s[0].value-s[1].value;h.forEach(function(t){var i,n=e[1].y+p*t,h=Wt(zt(((null!==(i=s[1].value)&&void 0!==i?i:0)+f*t).toFixed(r.price),a),o);l.push({coordinates:[{x:u,y:n},{x:d,y:n}]}),c.push({x:u,y:n,text:"".concat(h," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:l},{type:"text",isCheckEvent:!1,attrs:c}]}return[]}},ni={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 It(e[1])&&e[0].x-1)for(var r=n;r>-1;r--)if(this._children[r].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}(),si=2,li=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return B(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},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 B(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}(oi);function ci(t,e){return Math.sqrt(Math.pow(t.x+e.x,2)+Math.pow(t.y+e.y,2))}function ui(t){var e=ci(t[0],t[1]),i=ci(t[1],t[2]),n=e+i,r=[t[2].x-t[0].x,t[2].y-t[0].y];return[{x:t[1].x-.5*r[0]*e/n,y:t[1].y-.5*r[1]*e/n},{x:t[1].x+.5*r[0]*e/n,y:t[1].y+.5*r[1]*e/n}]}function di(t,e){var i=e.coordinates;if(i.length>1)for(var n=1;n1){var a=i.style,o=void 0===a?N.Solid:a,s=i.smooth,l=i.size,c=void 0===l?1:l,u=i.color,d=void 0===u?"currentColor":u,h=i.dashedValue,p=void 0===h?[2,2]:h;if(t.lineWidth=c,t.strokeStyle=d,o===N.Dashed?t.setLineDash(p):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y),null!==s&&void 0!==s&&s){for(var f=[],v=1;v1)if(t[0].x===t[1].x){var a=0,o=e.height;if(r.push({coordinates:[{x:t[0].x,y:a},{x:t[0].x,y:o}]}),t.length>2){r.push({coordinates:[{x:t[2].x,y:a},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var v=t[2].y-p*t[2].x;r.push({coordinates:[{x:u,y:u*p+v},{x:d,y:d*p+v}]});for(s=f-v,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:pi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:pi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var wi={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:_i(e,i)}]}},Ci={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}}]:[]}},Si={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:pi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:pi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},ki={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=j(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(f){e={error:f}}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){a.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(a.length>0){var p=this._chartStore.getChart();a.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Bi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,r=this._hoverInstanceInfo,a=r.instance,o=r.figureType,s=r.figureKey,l=r.figureIndex;if(((null===a||void 0===a?void 0:a.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===a||void 0===a?void 0:a.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==a&&(u=!0,kt(a.onMouseLeave)&&(a.onMouseLeave(X({overlay:a,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,t.instance.setZLevel(ee),kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(X({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,r,a,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,f=d.figureType,v=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(a=null===(r=t.instance)||void 0===r?void 0:r.onClick)||void 0===a||a.call(r,X({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)||f!==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,X({overlay:p,figureKey:v,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,X({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,Bi.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}(),Oi=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 Yt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);It(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return It(e)&&!e.isEmpty()},t}(),zi={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"}}}},Wi={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"}}}},$i={light:zi,dark:Wi};function Hi(t){var e;return null!==(e=$i[t])&&void 0!==e?e:null}var Vi=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 _e(this),this._indicatorStore=new ti(this),this._overlayStore=new Ni(this),this._tooltipStore=new ei(this),this._actionStore=new Oi,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;no?(this._dataList.push(t),s=this._timeScaleStore.getLastBarRightSideDiffBarCount(),s<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--s),n=!0):a===o&&(this._dataList[r-1]=t,n=!0)),!n)return[3,4];this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this._indicatorStore.calcInstance()];case 2:return l.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),this._actionStore.execute(Pt.OnDataReady),[3,4];case 3:return l.sent(),[3,4];case 4:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&It(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&&It(this._loadDataCallback)&&(this._forwardMore&&t.type===re.Forward||this._backwardMore&&t.type===re.Backward)){var i=function(i,n){var r=[];t.type===re.Backward?(r=e._dataList.concat(i),e._backwardMore=null!==n&&void 0!==n&&n):(r=i.concat(e._dataList),e._forwardMore=null!==n&&void 0!==n&&n),e.addData(r,!1).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(X(X({},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}(),Ki={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Yi=7,Xi=-1;function Ui(t){return kt(window.requestAnimationFrame)?window.requestAnimationFrame(t):window.setTimeout(t,20)}function Gi(t){kt(window.cancelAnimationFrame)?window.cancelAnimationFrame(t):window.clearTimeout(t)}function ji(){return U(this,void 0,void 0,function(){return G(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 qi=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._requestAnimationId=Xi,this._mediaQueryListener=function(){var t=$t(i._element);i._resetPixelRatio(Math.round(i._element.clientWidth*t),Math.round(i._element.clientHeight*t),t,t)},this._listener=e,this._element=ce("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),ji().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}),r=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];if(It(r)){var a=r.inlineSize,o=r.blockSize;i._pixelWidth===a&&i._pixelHeight===o||i._resetPixelRatio(a,o,a/i._element.clientWidth,o/i._element.clientHeight)}}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat($t(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(t,e,i,n){var r=this;this._executeListener(function(){var a=r._element.clientWidth,o=r._element.clientHeight;r._width=a,r._height=o,r._pixelWidth=t,r._pixelHeight=e,r._element.width=t,r._element.height=e,r._ctx.scale(i,n)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId!==Xi&&(Gi(this._requestAnimationId),this._requestAnimationId=Xi),this._requestAnimationId=Ui(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener()})},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=$t(this._element);this._resetPixelRatio(Math.round(t*i),Math.round(e*i),i,i)}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){var t,e;null===(t=this._resizeObserver)||void 0===t||t.unobserve(this._element),null===(e=this._mediaQueryList)||void 0===e||e.removeListener(this._mediaQueryListener)},t}();function Zi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return It(t)&&wt(e,t),e}var Ji=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Zi(),n._pane=i,n.init(e),n}return B(e,t),e.prototype.init=function(t){this._rootContainer=t,this._container=this.createContainer(),t.appendChild(this._container)},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}(oi),Qi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.init=function(e){var i=this;t.prototype.init.call(this,e),this._mainCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateMain(i._mainCanvas.getContext())}),this._overlayCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateOverlay(i._overlayCanvas.getContext())});var n=this.getContainer();n.appendChild(this._mainCanvas.getElement()),n.appendChild(this._overlayCanvas.getElement())},e.prototype.createContainer=function(){return ce("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,r=e.height,a=e.left;t.style.left="".concat(a,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&r===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(r,"px"),o=3),o){case 0:this._mainCanvas.update(n,r);break;case 1:this._overlayCanvas.update(n,r);break;case 3:case 4:this._mainCanvas.update(n,r),this._overlayCanvas.update(n,r);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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);return r.width=i*o,r.height=n*o,a.scale(o,o),a.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&a.drawImage(this._overlayCanvas.getElement(),0,0,i,n),r},e}(Ji);function tn(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 en(t,e){var i=t.x-e.x,n=t.y-e.y,r=e.r;return!(i*i+n*n>r*r)}function nn(t,e,i){var n=e.x,r=e.y,a=e.r,o=i.style,s=void 0===o?O.Fill:o,l=i.color,c=void 0===l?"currentColor":l,u=i.borderSize,d=void 0===u?1:u,h=i.borderColor,p=void 0===h?"currentColor":h,f=i.borderStyle,v=void 0===f?N.Solid:f,g=i.borderDashedValue,m=void 0===g?[2,2]:g;s!==O.Fill&&i.style!==O.StrokeFill||Et(c)&&tn(c)||(t.fillStyle=c,t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.fill()),(s===O.Stroke||i.style===O.StrokeFill)&&d>0&&!tn(p)&&(t.strokeStyle=p,t.lineWidth=d,v===N.Dashed?t.setLineDash(m):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.stroke())}var rn={name:"circle",checkEventOn:en,draw:function(t,e,i){nn(t,e,i)}};function an(t,e){for(var i=!1,n=e.coordinates,r=0,a=n.length-1;rt.y!==n[a].y>t.y&&t.x<(n[a].x-n[r].x)*(t.y-n[r].y)/(n[a].y-n[r].y)+n[r].x&&(i=!i);return i}function on(t,e,i){var n=e.coordinates,r=i.style,a=void 0===r?O.Fill:r,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,f=i.borderDashedValue,v=void 0===f?[2,2]:f;if((a===O.Fill||i.style===O.StrokeFill)&&(!Et(s)||!tn(s))){t.fillStyle=s,t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var g=1;g0&&!tn(d)){t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y);for(g=1;g=i&&t.x<=i+n&&t.y>=r&&t.y<=r+a}function cn(t,e,i){var n=e.x,r=e.y,a=e.width,o=e.height,s=i.style,l=void 0===s?O.Fill:s,c=i.color,u=void 0===c?"transparent":c,d=i.borderSize,h=void 0===d?1:d,p=i.borderColor,f=void 0===p?"transparent":p,v=i.borderStyle,g=void 0===v?N.Solid:v,m=i.borderRadius,y=void 0===m?0:m,b=i.borderDashedValue,x=void 0===b?[2,2]:b;l!==O.Fill&&i.style!==O.StrokeFill||Et(u)&&tn(u)||(t.fillStyle=u,t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.fill()),(l===O.Stroke||i.style===O.StrokeFill)&&h>0&&!tn(f)&&(t.strokeStyle=f,t.lineWidth=h,g===N.Dashed?t.setLineDash(x):t.setLineDash([]),t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.stroke())}var un={name:"rect",checkEventOn:ln,draw:function(t,e,i){cn(t,e,i)}};function dn(t,e){var i,n,r=e.size,a=void 0===r?12:r,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,f=e.weight,v=void 0===f?"normal":f,g=e.family,m=t.x,y=t.y,b=t.text,x=t.align,_=void 0===x?"left":x,w=t.baseline,C=void 0===w?"top":w,S=t.width,k=t.height,A=null!==S&&void 0!==S?S:s+Vt(b,a,v,g)+d,T=null!==k&&void 0!==k?k:c+a+p;switch(_){case"left":case"start":i=m;break;case"right":case"end":i=m-A;break;default:i=m-A/2;break}switch(C){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-T;break;default:n=y-T/2;break}return{x:i,y:n,width:A,height:T}}function hn(t,e,i){var n=dn(e,i),r=n.x,a=n.y,o=n.width,s=n.height;return t.x>=r&&t.x<=r+o&&t.y>=a&&t.y<=a+s}function pn(t,e,i){var n=e.text,r=i.color,a=void 0===r?"currentColor":r,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,f=i.paddingRight,v=void 0===f?0:f,g=dn(e,i);cn(t,g,X(X({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=a,t.fillText(n,g.x+d,g.y+p,g.width-d-v)}var fn={name:"text",checkEventOn:function(t,e,i){return hn(t,e,i)},draw:function(t,e,i){pn(t,e,i)}},vn=fn;function gn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function mn(t,e){if(Math.abs(gn(t,e)-e.r)=Math.min(a,s)-si&&t.y<=Math.max(o,l)+si&&t.y>=Math.min(o,l)-si}return!1}function yn(t,e,i){var n=e.x,r=e.y,a=e.r,o=e.startAngle,s=e.endAngle,l=i.style,c=void 0===l?N.Solid:l,u=i.size,d=void 0===u?1:u,h=i.color,p=void 0===h?"currentColor":h,f=i.dashedValue,v=void 0===f?[2,2]:f;t.lineWidth=d,t.strokeStyle=p,c===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,o,s),t.stroke(),t.closePath()}var bn={name:"arc",checkEventOn:mn,draw:function(t,e,i){yn(t,e,i)}},xn={},_n=[rn,gi,sn,un,fn,vn,bn];function wn(t){var e;return null!==(e=xn[t])&&void 0!==e?e:null}_n.forEach(function(t){xn[t.name]=li.extend(t)});var Cn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return B(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=wn(t.name);if(null!==i){var n=new i(t);if(It(e)){for(var r in e)e.hasOwnProperty(r)&&n.registerEvent(r,e[r]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(oi),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget(),n=this.getWidget().getPane(),r=n.getChart(),a=i.getBounding(),o=r.getStyles().grid,s=o.show;if(s){t.save(),t.globalCompositeOperation="destination-over";var l=o.horizontal,c=l.show;if(c){var u=n.getAxisComponent();u.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:0,y:i.coord},{x:a.width,y:i.coord}]},styles:l}))||void 0===n||n.draw(t)})}var d=o.vertical,h=d.show;if(h){var p=r.getXAxisPane().getAxisComponent();p.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:i.coord,y:0},{x:i.coord,y:a.height}]},styles:d}))||void 0===n||n.draw(t)})}t.restore()}},e}(Cn),kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),r=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,r,i)})},e}(Cn),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(Pt.OnCandleBarClick,t),!1}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Bi.CANDLE,r=i.getChart().getChartStore(),a=this.getCandleBarOptions(r);if(null!==a){var o=i.getAxisComponent();this.eachChildren(function(i,r){var s=i.data,l=i.x;if(It(s)){var c=s.open,u=s.high,d=s.low,h=s.close,p=a.type,f=a.styles,v=[];h>c?(v[0]=f.upColor,v[1]=f.upBorderColor,v[2]=f.upWickColor):hc?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.CandleDownStroke:b=c>h?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.Ohlc:var x=Math.min(Math.max(Math.round(.2*r.gapBar),1),7);b=[{name:"rect",attrs:{x:l-x/2,y:y[0],width:x,height:y[3]-y[0]},styles:{color:v[0]}},{name:"rect",attrs:{x:l-r.halfGapBar,y:g+x>y[3]?y[3]-x:g,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}},{name:"rect",attrs:{x:l+x/2,y:m+x>y[3]?y[3]-x:m,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}}];break}b.forEach(function(r){var a,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(a=e.createFigure(r,o))||void 0===a||a.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-.5,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,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-.5,y:e[0],width:1,height:e[1]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}},{name:"rect",attrs:{x:t-.5,y:e[2],width:1,height:e[3]-e[2]},styles:{color:n[2]}}]},e}(kn),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),r=n.getAxisComponent();if(!r.isInCandle()){var a=t.getIndicatorStore().getInstances(n.getId());try{for(var o=j(a),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=Ft(c,"ohlc.upColor",u.ohlc.upColor),h=Ft(c,"ohlc.downColor",u.ohlc.downColor),p=Ft(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:V.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(f){e={error:f}}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(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=a.getXAxisPane().getAxisComponent(),l=r.getAxisComponent(),c=a.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(r.getId()),f=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 r=!1;if(null!==t.draw&&(e.save(),r=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:f,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!r){var a=t.result;i.eachChildren(function(n,r){var c,d,h,p=r.halfGapBar,v=r.gapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),b=s.convertToPixel(g+1),x=null!==(c=a[g-1])&&void 0!==c?c:{},_=null!==(d=a[g])&&void 0!==d?d:{},w=null!==(h=a[g+1])&&void 0!==h?h:{},C={x:y},S={x:m},k={x:b};t.figures.forEach(function(t){var e=t.key,i=x[e];Tt(i)&&(C[e]=l.convertToPixel(i));var n=_[e];Tt(n)&&(S[e]=l.convertToPixel(n));var r=w[e];Tt(r)&&(k[e]=l.convertToPixel(r))}),Xt(u,t,g,f,function(t,n){var a,c,u;if(It(_[t.key])){var d=S[t.key],h=null===(a=t.attrs)||void 0===a?void 0:a.call(t,{coordinate:{prev:C,current:S,next:k},bounding:o,barSpace:r,xAxis:s,yAxis:l});if(!It(h))switch(t.type){case"circle":h={x:m,y:d,r:p};break;case"rect":case"bar":var f=null!==(c=t.baseValue)&&void 0!==c?c:l.getRange().from,g=l.convertToPixel(f),y=Math.abs(g-d);f!==_[t.key]&&(y=Math.max(1,y));var b=void 0;b=d>g?g:d,h={x:m-p,y:b,width:v,height:y};break;case"line":Tt(S[t.key])&&Tt(k[t.key])&&(h={coordinates:[{x:S.x,y:S[t.key]},{x:k.x,y:k[t.key]}]});break}if(It(h)){var x=t.type;null===(u=i.createFigure({name:"bar"===x?"rect":x,attrs:h,styles:n}))||void 0===u||u.draw(e)}}})})}}}),e.restore()},e}(An),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=e.getBounding(),r=e.getPane().getChart().getChartStore(),a=r.getTooltipStore().getCrosshair(),o=r.getStyles().crosshair;if(Et(a.paneId)&&o.show){if(a.paneId===i.getId()){var s=a.y;this._drawLine(t,[{x:0,y:s},{x:n.width,y:s}],o.horizontal)}var l=a.realX;this._drawLine(t,[{x:l,y:0},{x:l,y:n.height}],o.vertical)}},e.prototype._drawLine=function(t,e,i){var n;if(i.show){var r=i.line;r.show&&(null===(n=this.createFigure({name:"line",attrs:{coordinates:e},styles:r}))||void 0===n||n.draw(t))}},e}(Cn),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundIconClickEvent=function(t,i){return function(){var n=e.getWidget().getPane();return n.getChart().getChartStore().getActionStore().execute(Pt.OnTooltipIconClick,X(X({},t),{iconId:i})),!0}},e._boundIconMouseMoveEvent=function(t,i){return function(){var n=e.getWidget().getPane(),r=n.getChart().getChartStore().getTooltipStore();return r.setActiveIcon(X(X({},t),{iconId:i})),!0}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getTooltipStore().getCrosshair();if(It(r.kLineData)){var a=e.getBounding(),o=n.getCustomApi(),s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getIndicatorStore().getInstances(i.getId()),u=n.getTooltipStore().getActiveIcon(),d=n.getStyles().indicator;this.drawIndicatorTooltip(t,i.getId(),n.getDataList(),r,u,c,o,s,l,a,d)}},e.prototype.drawIndicatorTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d){var h=this,p=u.tooltip,f=0;if(this.isDrawTooltip(n,p)){var v=p.text,g=0,m=null!==d&&void 0!==d?d:0,y=0;a.forEach(function(a){var d=h.getIndicatorTooltipData(i,n,a,o,s,l,u),p=d.name,b=d.calcParamsText,x=d.values,_=d.icons,w=p.length>0,C=x.length>0;if(w||C){var S=q(h.classifyTooltipIcons(_),3),k=S[0],A=S[1],T=S[2],I=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,k,g,m,y),4),M=I[0],E=I[1],D=I[2],P=I[3];if(g=M,m=E,f+=P,y=D,w){var L=p;b.length>0&&(L="".concat(L).concat(b));var R=q(h.drawStandardTooltipLabels(t,c,[{title:{text:"",color:v.color},value:{text:L,color:v.color}}],g,m,y,v),4),F=R[0],B=R[1],N=R[2],O=R[3];g=F,m=B,f+=O,y=N}var z=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,A,g,m,y),4),W=z[0],$=z[1],H=z[2],V=z[3];if(g=W,m=$,f+=V,y=H,C){var K=q(h.drawStandardTooltipLabels(t,c,x,g,m,y,v),4),Y=K[0],X=K[1],U=K[2],G=K[3];g=Y,m=X,f+=G,y=U}var j=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,T,g,m,y),4),Z=j[1],J=j[2],Q=j[3];g=0,f+=Q,m=Z+J,y=0}})}return f},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,r,a,o,s){var l=this,c=a,u=o,d=0,h=0,p=0;return r.length>0&&(r.forEach(function(e){var i=e.marginLeft,n=e.marginTop,r=e.marginRight,a=e.marginBottom,o=e.paddingLeft,s=e.paddingTop,l=e.paddingRight,c=e.paddingBottom,u=e.size,p=e.fontFamily,f=e.icon;t.font=Ht(u,"normal",p),d+=i+o+t.measureText(f).width+l+r,h=Math.max(h,n+s+u+c+a)}),c+d>e.width?(c=r[0].marginLeft,u+=s,p=h):p=Math.max(0,h-s),r.forEach(function(e){var r,a=e.marginLeft,o=e.marginTop,s=e.marginRight,d=e.paddingLeft,h=e.paddingTop,p=e.paddingRight,f=e.paddingBottom,v=e.color,g=e.activeColor,m=e.size,y=e.fontFamily,b=e.icon,x=e.backgroundColor,_=e.activeBackgroundColor;c+=a;var w=(null===n||void 0===n?void 0:n.paneId)===i.paneId&&(null===n||void 0===n?void 0:n.indicatorName)===i.indicatorName&&(null===n||void 0===n?void 0:n.iconId)===e.id;null===(r=l.createFigure({name:"text",attrs:{text:b,x:c,y:u+o},styles:{paddingLeft:d,paddingTop:h,paddingRight:p,paddingBottom:f,color:w?g:v,size:m,family:y,backgroundColor:w?_:x}},{mouseClickEvent:l._boundIconClickEvent(i,e.id),mouseMoveEvent:l._boundIconMouseMoveEvent(i,e.id)}))||void 0===r||r.draw(t),c+=d+t.measureText(b).width+p+s})),[c,u,Math.max(s,h),p]},e.prototype.drawStandardTooltipLabels=function(t,e,i,n,r,a,o){var s=this,l=n,c=r,u=0,d=0,h=a;if(i.length>0){var p=o.marginLeft,f=o.marginTop,v=o.marginRight,g=o.marginBottom,m=o.size,y=o.family,b=o.weight;t.font=Ht(m,b,y),i.forEach(function(i){var n,r,a=i.title,o=i.value,x=t.measureText(a.text).width,_=t.measureText(o.text).width,w=x+_,C=m+f+g;l+p+w+v>e.width?(l=p,c+=C,d+=C):(l+=p,d+=Math.max(0,C-h)),u=Math.max(h,C),h=u,a.text.length>0&&(null===(n=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:a.text},styles:{color:a.color,size:m,family:y,weight:b}}))||void 0===n||n.draw(t),l+=x),null===(r=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:o.text},styles:{color:o.color,size:m,family:y,weight:b}}))||void 0===r||r.draw(t),l+=_+v})}return[l,c,u,d]},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Et(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,r,a,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},f=e.dataIndex,v=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=v[f])&&void 0!==l?l:{};Xt(t,i,f,o,function(t,e){if(Et(t.title)){var o=e.color,s=m[t.key];Tt(s)&&(s=Nt(s,i.precision),i.shouldFormatBigNumber&&(s=n.formatBigNumber(s))),g.push({title:{text:t.title,color:o},value:{text:Wt(zt(null!==s&&void 0!==s?s:c.defaultValue,r),a),color:o}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),b=y.getPane(),x=b.getChart().getChartStore(),_=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:x.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:b.getChart().getXAxisPane().getAxisComponent(),yAxis:b.getAxisComponent()}),w=_.name,C=_.calcParamsText,S=_.values,k=_.icons;if(Et(w)&&c.showName&&(p.name=w),Et(C)&&c.showParams&&(p.calcParamsText=C),It(k)&&(p.icons=k),It(S)&&i.visible){var A=[],T=o.tooltip.text.color;S.forEach(function(t){var e={text:"",color:T};At(t.title)?e=t.title:e.text=t.title;var i={text:"",color:T};At(t.value)?i=t.value:i.text=t.value,i.text=Wt(zt(i.text,r),a),A.push({title:e,value:i})}),p.values=A}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case $.Left:e.push(t);break;case $.Middle:i.push(t);break;case $.Right:n.push(t);break}}),[e,i,n]},e}(Cn),En=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return B(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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(te,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(a.instance,e)),null===(r=o.onDrawing)||void 0===r||r.call(o,X({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 r,a,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(te,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(r=s.onDrawing)||void 0===r||r.call(s,X({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(a=s.onDrawEnd)||void 0===a||a.call(s,X({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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(te,"point_").concat(l);null===(r=o.onDrawEnd)||void 0===r||r.call(o,X({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(te,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var r=i.instance;if(r.isDrawing()){var a=r.points.length-1;return t._figureMouseRightClickEvent(r,1,"".concat(te,"point_").concat(a),a,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,r=n.getPressedInstanceInfo(),a=r.instance,o=r.figureIndex,s=r.figureKey;return null!==a&&(null===(e=a.onPressedMoveEnd)||void 0===e||e.call(a,X({overlay:a,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,r,a=n.getPressedInstanceInfo(),o=a.instance,s=a.figureType,l=a.figureIndex,c=a.figureKey;if(null!==o){if(!o.lock&&(null===(r=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,X({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===r||!r)){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,r,a){var o;if(!t.isDrawing()){var s=[];if(It(a)&&(Mt(a)?a&&(s=jt()):s=a),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,r),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,r),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,r),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,r),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,r)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,r)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,r)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,r)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,r)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,r))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,r){var a=this;return function(o){var s,l=a.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(a._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,X({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,r){return function(e){var r;return null===(r=t.onDoubleClick)||void 0===r||r.call(t,X(X({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,r){var a=this;return function(e){var r,o;if(null===(o=null===(r=t.onRightClick)||void 0===r?void 0:r.call(t,X({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},r=this.getWidget().getPane(),a=r.getChart(),o=r.getId(),s=a.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=a.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=r.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Bi.CANDLE&&Tt(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var f=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var v=d.convertToPixel(p.high),g=d.convertFromPixel(v-f);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),b=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,r,s,l,a,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,r,a,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var r=this;i.forEach(function(i,a){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,f=r._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",a,u,c),v=X(X(X({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=r.createFigure({name:o,attrs:l,styles:v},f))||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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p){var f,v,g=this;if(e.needDefaultPointFigure&&((null===(f=h.instance)||void 0===f?void 0:f.id)===e.id&&0!==h.figureType||(null===(v=p.instance)||void 0===v?void 0:v.id)===e.id&&0!==p.figureType)){var m=e.styles,y=X(X({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var r,a,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(r=h.instance)||void 0===r?void 0:r.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(a=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(te,"point_").concat(n),n,0)))||void 0===a||a.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}(Cn),Dn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new Sn(n),n._indicatorView=new Tn(n),n._crosshairLineView=new In(n),n._tooltipView=n.createTooltipView(),n._overlayView=new En(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 B(e,t),e.prototype.getName=function(){return Ki.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Mn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(Qi),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=r.getAxisComponent(),l=a.getStyles().candle.area,c=[],u=[],d=Number.MAX_SAFE_INTEGER;this.eachChildren(function(t,e,i){var n=t.data,r=t.x,a=e.halfGapBar,h=null===n||void 0===n?void 0:n[l.value];if(Tt(h)){var p=s.convertToPixel(h);if(0===i){var f=r-a;u.push({x:f,y:o.height}),u.push({x:f,y:p}),c.push({x:f,y:p})}c.push({x:r,y:p}),u.push({x:r,y:p}),d=Math.min(d,p)}});var h=u.length;if(h>0){var p=u[h-1],f=p.x;c.push({x:f,y:p.y}),u.push({x:f,y:p.y}),u.push({x:f,y:o.height})}if(c.length>0&&(null===(e=this.createFigure({name:"line",attrs:{coordinates:c},styles:{color:l.lineColor,size:l.lineSize}}))||void 0===e||e.draw(t)),u.length>0){var v=l.backgroundColor,g=void 0;if(St(v)){var m=t.createLinearGradient(0,o.height,0,d);try{v.forEach(function(t){var e=t.offset,i=t.color;m.addColorStop(e,i)})}catch(y){}g=m}else g=v;null===(i=this.createFigure({name:"polygon",attrs:{coordinates:u},styles:{color:g}}))||void 0===i||i.draw(t)}},e}(kn),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getStyles().candle.priceMark,a=r.high,o=r.low;if(r.show&&(a.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,f=0;this.eachChildren(function(t){var e=t.data,i=t.x;It(e)&&(de.low&&(p=e.low,f=i))});var v=u.convertToPixel(d),g=u.convertToPixel(p);a.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Wt(zt(Nt(d,c.price),s),l),{x:h,y:v},vp/2?(l=d-5,c=l-r.textOffset,u="right"):(l=d+5,u="left",c=l+r.textOffset);var f=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:f},{x:l,y:f}]},styles:{color:r.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:f,text:e,align:u,baseline:"middle"},styles:{color:r.color,size:r.textSize,family:r.textFamily,weight:r.textWeight}}))||void 0===s||s.draw(t)},e}(kn),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=a.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,f=c.convertToNicePixel(h),v=void 0;v=h>p?s.upColor:h0){var O=q(this.drawStandardTooltipLabels(t,n,x,_,w,C,m),4),z=O[0],W=O[1],$=O[2],H=O[3];_=z,w=W,y+=H,C=$}var V=q(this.drawStandardTooltipIcons(t,n,{paneId:i,indicatorName:"",iconId:""},a,T,_,w,C),4),K=V[0],Y=V[1],X=V[2],U=V[3];_=K,w=Y,y+=U,C=X}return y},e.prototype._drawRectTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p,f,v){var g,m,y,b,x,_=this,w=f.candle,C=f.indicator,S=w.tooltip,k=C.tooltip;if(h||p){var A=null!==(g=a.dataIndex)&&void 0!==g?g:0,T=this._getCandleTooltipData({prev:null!==(m=e[A-1])&&void 0!==m?m:null,current:a.kLineData,next:null!==(y=e[A+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),I=S.text,M=I.marginLeft,E=I.marginRight,D=I.marginTop,P=I.marginBottom,L=I.size,R=I.weight,F=I.family,B=S.rect,N=B.position,z=B.paddingLeft,W=B.paddingRight,$=B.paddingTop,V=B.paddingBottom,Y=B.offsetLeft,X=B.offsetRight,U=B.offsetTop,G=B.offsetBottom,j=B.borderSize,q=B.borderRadius,Z=B.borderColor,J=B.color,Q=0,tt=0,et=0;h&&(t.font=Ht(L,R,F),T.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+M+E;Q=Math.max(Q,a)}),et+=(P+D+L)*T.length);var it=k.text,nt=it.marginLeft,rt=it.marginRight,at=it.marginTop,ot=it.marginBottom,st=it.size,lt=it.weight,ct=it.family,ut=[];if(p&&(t.font=Ht(st,lt,ct),i.forEach(function(i){var n,r=null!==(n=_.getIndicatorTooltipData(e,a,i,c,u,d,C).values)&&void 0!==n?n:[];ut.push(r),r.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+nt+rt;Q=Math.max(Q,a),et+=at+ot+st})})),tt+=Q,0!==tt&&0!==et){tt+=2*j+z+W,et+=2*j+$+V;var dt=n.width/2,ht=N===H.Pointer&&a.paneId===Bi.CANDLE,pt=(null!==(b=a.realX)&&void 0!==b?b:0)>dt,ft=0;if(ht){var vt=a.realX;ft=pt?vt-X-tt:vt+Y}else pt?(ft=Y,f.yAxis.inside&&f.yAxis.position===K.Left&&(ft+=r.width)):(ft=n.width-X-tt,f.yAxis.inside&&f.yAxis.position===K.Right&&(ft-=r.width));var gt=v+U;if(ht){var mt=a.y;gt=mt-et/2,gt+et>n.height-G&&(gt=n.height-G-et),gt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=_[c])&&void 0!==e?e:f.defaultValue),"{change}"===c&&(o.color=0===y?s.priceMark.last.noChangeColor:y>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:a,value:o}})},e}(Mn),Wn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Pn(n),n._candleHighLowPriceView=new Ln(n),n._candleLastPriceLineView=new Rn(n),n.addChild(n._candleBarView),n}return B(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==V.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t)):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new zn(this)},e}(Dn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this,n=this.getWidget(),r=n.getPane(),a=n.getBounding(),o=r.getAxisComponent(),s=this.getAxisStyles(r.getChart().getStyles());if(s.show){s.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(a,s),styles:s.axisLine}))||void 0===e||e.draw(t));var l=o.getTicks();if(s.tickLine.show){var c=this.createTickLines(l,a,s);c.forEach(function(e){var n;null===(n=i.createFigure({name:"line",attrs:e,styles:s.tickLine}))||void 0===n||n.draw(t)})}if(s.tickText.show){var u=this.createTickTexts(l,a,s);u.forEach(function(e){var n;null===(n=i.createFigure({name:"text",attrs:e,styles:s.tickText}))||void 0===n||n.draw(t)})}}},e}(Cn),Hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),r=e.axisLine.size;return i=n.isFromZero()?r/2:t.width-r,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),r=i.axisLine,a=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,r.show&&(o+=r.size),s=o+a.length):(o=e.width,r.show&&(o-=r.size),s=o-a.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(),r=i.axisLine,a=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,r.show&&(s+=r.size),a.show&&(s+=a.length)):(s=e.width-o.marginEnd,r.show&&(s-=r.size),a.show&&(s-=a.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),Vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=a.getPrecision(),u=n.getAxisComponent(),d=a.getDataList(),h=a.getVisibleDataList(),p=d[d.length-1];if(It(p)){var f=p.close,v=p.open,g=u.convertToNicePixel(f),m=void 0;m=f>v?s.upColor:f1&&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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(En),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=i.getPane().getChart().getChartStore(),o=a.getTooltipStore().getCrosshair(),s=a.getStyles().crosshair;if(Et(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,a,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,r,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,r,a=i,o=i.convertFromPixel(t.y);if(a.getType()===Y.Percentage){var s=e.getVisibleDataList(),l=null===(n=s[0])||void 0===n?void 0:n.data;r="".concat(((o-l.close)/l.close*100).toFixed(2),"%")}else{var c=e.getIndicatorStore().getInstances(t.paneId),u=0,d=!1;a.isInCandle()?u=e.getPrecision().price:c.forEach(function(t){u=Math.max(t.precision,u),d||(d=t.shouldFormatBigNumber)}),r=Nt(o,u),d&&(r=e.getCustomApi().formatBigNumber(r))}return Wt(zt(r,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,r,a){var o,s,l=r;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(Cn),Un=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Hn(n),n._candleLastPriceLabelView=new Vn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new Yn(n),n._crosshairHorizontalLabelView=new Xn(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),Gn=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,r=[];if(n>=0){var a=q(this._calcTickInterval(n),2),o=a[0],s=a[1],l=he(Math.ceil(e/o)*o,s),c=he(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);r[u]={text:h,coord:0,value:h},++u,d+=o}}return r},t.prototype._calcTickInterval=function(t){var e=de(t/8),i=pe(e);return[e,i]},t}(),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t,e,i,n,r,a=this.getParent(),o=a.getChart(),s=o.getChartStore(),l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=[],d=!1,h=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER,v=s.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;d||(d=null!==(e=t.shouldOhlc)&&void 0!==e&&e),f=Math.min(f,t.precision),Tt(t.minValue)&&(h=Math.min(h,t.minValue)),Tt(t.maxValue)&&(p=Math.max(p,t.maxValue)),u.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var g=4,m=this.isInCandle();if(m){var y=s.getPrecision().price;g=f!==Number.MAX_SAFE_INTEGER?Math.min(f,y):y}else f!==Number.MAX_SAFE_INTEGER&&(g=f);var b=s.getVisibleDataList(),x=o.getStyles().candle,_=x.type===V.Area,w=x.area.value,C=m&&!_||!m&&d;b.forEach(function(t){var e=t.dataIndex,i=t.data;if(It(i)&&(C&&(l=Math.min(l,i.low),c=Math.max(c,i.high)),m&&_)){var n=i[w];Tt(n)&&(l=Math.min(l,n),c=Math.max(c,n))}u.forEach(function(t){var i,n=t.figures,r=t.result,a=null!==(i=r[e])&&void 0!==i?i:{};n.forEach(function(t){var e=a[t.key];Tt(e)&&(l=Math.min(l,e),c=Math.max(c,e))})})}),l!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER?(l=Math.min(h,l),c=Math.max(p,c)):(l=0,c=10);var S,k=this.getType();switch(k){case Y.Percentage:var A=null===(t=b[0])||void 0===t?void 0:t.data;It(A)&&Tt(A.close)&&(l=(l-A.close)/A.close*100,c=(c-A.close)/A.close*100),S=Math.pow(10,-2);break;case Y.Log:l=ve(l),c=ve(c),S=.05*ge(-g);break;default:S=ge(-g)}if(l===c||Math.abs(l-c)=1&&(D/=M);var P=null!==(r=null===E||void 0===E?void 0:E.bottom)&&void 0!==r?r:.1;P>=1&&(P/=M);var L,R,F,B=Math.abs(c-l);return l-=B*P,c+=B*D,B=Math.abs(c-l),k===Y.Log?(L=ge(l),R=ge(c),F=Math.abs(R-L)):(L=l,R=c,F=B),{from:l,to:c,range:B,realFrom:L,realTo:R,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,r=this.getRange(),a=r.from,o=r.range,s=(t-a)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Bi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:Y.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===K.Left&&e||t.position===K.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,r=this.getParent(),a=null!==(i=null===(e=r.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=r.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(r.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,f=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),f||(f=t.shouldFormatBigNumber)});var v,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,r=n._innerConvertToPixel(+i);switch(c){case Y.Percentage:e="".concat(Nt(i,2),"%");break;case Y.Log:r=n._innerConvertToPixel(ve(+i)),e=Nt(i,p);break;default:e=Nt(i,p),f&&(e=s.formatBigNumber(i));break}e=Wt(zt(e,d),h);var o=Tt(v);r>g&&r2*g||!o)&&(l.push({text:e,coord:r,value:i}),v=r)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,r=n.size;if("auto"!==r)return r;var a=e.getChartStore(),o=a.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,Vt(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=a.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var f=2;if(this.getType()!==Y.Percentage)if(this.isInCandle()){var v=a.getPrecision().price,g=i.indicator.lastValueMark;f=g.show&&g.text.show?Math.max(h,v):v}else f=h;var m=Nt(this.getRange().to,f);p&&(m=o.formatBigNumber(m)),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+Vt(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,r=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),o=a.from,s=a.range,l=this.isReverse()?t/r:1-t/r,c=l*s+o;switch(this.getType()){case Y.Percentage:var u=this.getParent().getChart().getChartStore(),d=u.getVisibleDataList(),h=null===(n=d[0])||void 0===n?void 0:n.data;return It(h)&&Tt(h.close)?h.close*c/100+h.close:0;case Y.Log:return ge(c);default:return c}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===Y.Log&&(e=ge(t)),e},e.prototype.convertToPixel=function(t){var e,i=t;switch(this.getType()){case Y.Percentage:var n=this.getParent().getChart().getChartStore(),r=n.getVisibleDataList(),a=null===(e=r[0])||void 0===e?void 0:e.data;It(a)&&Tt(a.close)&&(i=(t-a.close)/a.close*100);break;case Y.Log:i=ve(t);break;default:i=t}return this._innerConvertToPixel(i)},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,r=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(r,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return B(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Gn),qn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Zn={default:jn.extend(qn)};function Jn(t){var e;return null!==(e=Zn[t])&&void 0!==e?e:Zn.default}var Qn=function(){function t(t,e,i,n){this._bounding=Zi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=ce("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}(),tr=function(t){function e(e,i,n,r,a){var o=t.call(this,e,i,n,r)||this;o._yAxisWidget=null,o._options={minHeight:Ri,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(a),o}return B(e,t),e.prototype.setOptions=function(t){var e,i,n,r,a,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Et(o)||!It(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Bi.X_AXIS?(r=this.getMainWidget().getContainer(),a="ew-resize"):(r=this.getYAxisWidget().getContainer(),a="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?r.style.cursor=a:r.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,r;wt(this.getBounding(),t);var a={};return It(t.height)&&(a.height=t.height),It(t.top)&&(a.top=t.top),this._mainWidget.setBounding(a),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(a),It(e)&&this._mainWidget.setBounding(e),It(i)&&(null===(r=this._yAxisWidget)||void 0===r||r.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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);r.width=i*o,r.height=n*o,a.scale(o,o);var s=this._mainWidget.getBounding();if(a.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();a.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return r},e.prototype.createYAxisWidget=function(t){return null},e}(Qn),er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createAxisComponent=function(t){var e=Jn(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Dn(t,this)},e.prototype.createYAxisWidget=function(t){return new Un(t,this)},e}(tr),ir=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createMainWidget=function(t){return new Wn(t,this)},e}(er),nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t,e){var i=e.axisLine.size/2;return{coordinates:[{x:0,y:i},{x:t.width,y:i}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,r=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:r+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,r=i.axisLine.size,a=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:r+a+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(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,r,a,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,f=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),f=Math.max(f,e.x);var n=t.points[i];if(Tt(n.timestamp)){var o=a.formatDate(r,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:f-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Yn),ar=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.compare=function(t){return It(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,r,a){var o,s=i.realX,l="center";return s-e/2-a.paddingLeft<0?(o=0,l="left"):s+e/2+a.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Xn),or=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new nr(n),n._overlayXAxisView=new rr(n),n._crosshairVerticalLabelView=new ar(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),sr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,r=i,a=n-1,o=n-i;return{from:r,to:a,range:o,realFrom:r,realTo:a,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),r=n.getChartStore(),a=r.getCustomApi().formatDate,o=[],s=t.length,l=r.getDataList();if(s>0){var c=r.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=Vt("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),f=1;if(s>1){var v=parseInt(t[1].value,10),g=this.convertToPixel(v),m=Math.abs(g-p);m(null!==e&&void 0!==e?e:20)&&(t.apply(this,arguments),i=n)}}var pr=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=hr(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 B(e,t),e.prototype.getName=function(){return Ki.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(),r=i.getBottomPane(),a=e<0;if(null!==n&&null!==r&&r.getOptions().dragEnabled){var o=void 0,s=void 0,l=void 0,c=void 0;a?(o=n,s=r,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=r,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(Pt.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(),r=n.getStyles().separator;return this.getContainer().style.background=r.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return ce("div",{width:"100%",height:"".concat(Yi,"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((Yi-n.size)/2),"px"),t.style.height="".concat(Yi,"px")}},e}(Ji),fr=function(t){function e(e,i,n,r,a,o){var s=t.call(this,e,i,n,r)||this;return s.getContainer().style.overflow="",s._topPane=a,s._bottomPane=o,s._separatorWidget=new pr(s.getContainer(),s),s}return B(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,r=this.getChart().getStyles().separator,a=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=a.getContext("2d"),s=$t(a);return a.width=i*s,a.height=n*s,o.scale(s,s),o.fillStyle=r.color,o.fillRect(0,0,i,n),a},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}(Qn);function vr(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function gr(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var mr,yr=10,br=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=!gr(),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,r=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 a=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){r._target.removeEventListener("mousemove",a)},this._target.addEventListener("mousemove",a);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){r._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){r._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(!It(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!It(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,r=i.yOffset,a=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(a<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=r>=o&&!this._options.treatVertDragAsPageScroll(),l=o>r&&!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),r=i+n;return{xOffset:i,yOffset:n,manhattanDistance:r}},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),It(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),vr()){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),r=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",r)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",r,{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;vr()&&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}),gr()&&(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;(It(this._handler.pinchStartEvent)||It(this._handler.pinchEvent)||It(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&&It(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(X(X({},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]),It(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,It(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=!gr())},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 It(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 Ki.X_AXIS:case Ki.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),r=i.getName();switch(r){case Ki.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var a=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(a>0?a:1)*20;if(a<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=Ui(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(Gi(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Ki.X_AXIS:case Ki.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,r=!1;if(null!==n){var a=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",a);if(n.getName()===Ki.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,!0),r=!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()},!0),r=!0),this._touchCancelCrosshair=!1)}(r||o)&&this._chart.updatePane(1)}return r},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()===Ki.MAIN){var r=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:r.x,y:r.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:r.x,y:r.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,r,a=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=j(s),u=c.next();!u.done;u=c.next()){var d=q(u.value,2),h=d[1],p=h.getBounding(),f=p.top-Math.round((Yi-l)/2);if(a>=p.left&&a<=p.left+p.width&&o>=f&&o<=f+Yi)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 v=this._chart.getAllDrawPanes(),g=null;try{for(var m=j(v),y=m.next();!y.done;y=m.next()){var b=y.value;p=b.getBounding();if(a>=p.left&&a<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=b;break}}}catch(A){n={error:A}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var x=null;if(null!==g){if(null===x){var _=g.getMainWidget(),w=_.getBounding();a>=w.left&&a<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(x=_)}if(null===x){var C=g.getYAxisWidget();if(null!==C){var S=C.getBounding();a>=S.left&&a<=S.left+S.width&&o>=S.top&&o<=S.top+S.height&&(x=C)}}}return{pane:g,widget:x}},t.prototype._makeWidgetEvent=function(t,e){var i,n,r,a=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return X(X({},t),{x:t.x-(null!==(n=null===a||void 0===a?void 0:a.left)&&void 0!==n?n:0),y:t.y-(null!==(r=null===a||void 0===a?void 0:a.top)&&void 0!==r?r: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"})(mr||(mr={}));var _r=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new xr(this._chartContainer,this),this._chartStore=new Vi(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=ce("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"}],r=!1,a=!1,o=function(t){if(!a){var e=i._createPane(dr,Bi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,a=!0}};n.forEach(function(t){var e,n,a;switch(t.type){case"candle":if(!r){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Bi.CANDLE});var l=i._createPane(ir,Bi.CANDLE,s);i._candlePane=l;var c=null!==(n=t.content)&&void 0!==n?n:[];c.forEach(function(t){i.createIndicator(t,!0,s)}),r=!0}break;case"indicator":var u;c=null!==(a=t.content)&&void 0!==a?a:[];if(c.length>0)c.forEach(function(e){It(u)?i.createIndicator(e,!0,{id:u}):u=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options)}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,r=null,a=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];It(s)&&(a=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=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];"bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)&&(a=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=l)}}if(It(a)||(a=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),It(r)?(this._drawPanes.splice(r,0,a),n=r):(this._drawPanes.push(a),n=this._drawPanes.length-1),a.getId()!==Bi.X_AXIS){var d=this._drawPanes[n+1];if(It(d)&&d.getId()===Bi.X_AXIS&&(d=this._drawPanes[n+2]),It(d)){var h=this._separatorPanes.get(d);It(h)?h.setTopPane(a):(h=new fr(this._chartContainer,d.getContainer(),this,"",a,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(It(p)&&p.getId()===Bi.X_AXIS&&(p=this._drawPanes[n-2]),It(p)){h=new fr(this._chartContainer,a.getContainer(),this,"",p,a);this._separatorPanes.set(a,h)}}return a},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,r=this._xAxisPane.getAxisComponent().getAutoSize(),a=i-r-this._separatorPanes.size*n;a<0&&(a=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Bi.CANDLE&&t.getId()!==Bi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;ea?(o=a,e=Math.max(a-o,0)):o+=e,t.setBounding({height:e})}});var s=a-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:r});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);It(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,r=n.position===K.Left,a=!n.inside,o=0,s=Number.MIN_SAFE_INTEGER,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Bi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),a?(o=e-s,r?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=r?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},f=i.separator.fill;u=a&&!f?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(Et(t.id)){var r=this.getDrawPaneById(t.id),a=!1;if(null!==r){var o=e;if(t.id!==Bi.CANDLE&&Tt(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:r.getOptions().minHeight,0),l=Math.max(s,t.height);r.setBounding({height:l}),o=!0,a=!0}(Et(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||It(t.gap))&&(o=!0),r.setOptions(t),o&&this.adjustPaneViewport(a,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Bi.CANDLE)return this._candlePane;if(t===Bi.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.getCandlePane=function(){return this._candlePane},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,r){t&&this._measurePaneHeight();var a=e,o=null!==n&&void 0!==n&&n,s=null!==r&&void 0!==r&&r;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);a||(a=e)}),a&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(It(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(Pt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var r=i.getId(),a={},o=e._chartStore.getIndicatorStore().getInstances(r);o.forEach(function(e){var i,n=e.result;a[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[r]=a}),Et(t.paneId)&&i.execute(Pt.OnCrosshairChange,X(X({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Et(t))return this._chartContainer;var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getContainer();case mr.Main:return r.getMainWidget().getContainer();case mr.YAxis:return null!==(n=null===(i=r.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(!It(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getBounding();case mr.Main:return r.getMainWidget().getBounding();case mr.YAxis:return null!==(n=null===(i=r.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=Et(t)?Hi(t):t,It(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?bt("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?bt("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?bt("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?bt("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){It(i)&&bt("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!0,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){bt("","","Api `applyMoreData` has been deprecated since version 9.8.0.");var n=t.concat(this._chartStore.getDataList());this._chartStore.addData(n,!1,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){It(e)&&bt("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!1).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){bt("","","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 r,a=this,o=Et(t)?{name:t}:t;if(null===Qe(o.name))return bt("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;a._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=le(Bi.INDICATOR));var c=this._createPane(er,s,null!==i&&void 0!==i?i:{}),u=null!==(r=null===i||void 0===i?void 0:i.height)&&void 0!==r?r:Fi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){a.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=q(t,2),r=e[0],a=e[1];(r||a)&&(n.adjustPaneViewport(!1,a,!0,a),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,r,a=this._chartStore.getIndicatorStore(),o=a.removeInstance(t,e);if(o){var s=!1;if(t!==Bi.CANDLE&&!a.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(It(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=j(this._separatorPanes),p=h.next();!p.done;p=h.next()){var f=p.value;if(f[1].getTopPane().getId()===l.getId()){f[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 v=this._drawPanes[0];It(v)&&v.getId()===Bi.X_AXIS&&(v=this._drawPanes[1]),null===(r=this._separatorPanes.get(v))||void 0===r||r.destroy(),this._separatorPanes.delete(v)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Et(t))i=[{name:t}];else if(St(t))i=t.map(function(t){return Et(t)?{name:t}:t});else{var n=t;i=[n]}var r=!0;It(e)&&null!==this.getDrawPaneById(e)||(e=Bi.CANDLE,r=!1);var a=this._chartStore.getOverlayStore().addInstances(i,e,r);return St(t)?a:a[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;It(t)&&(e=Et(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=Tt(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(i>0){n.startScroll();var r=(new Date).getTime(),a=function(){var e=((new Date).getTime()-r)/i,o=e>=1,s=o?t:t*e;n.scroll(s),o||requestAnimationFrame(a)};a()}else n.startScroll(),n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,r=n*i;this.scrollByDistance(r,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=ue(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Tt(i)&&i>0?i:0,r=this._chartStore.getTimeScaleStore();if(n>0){var a=r.getBarSpace().bar,o=a*t,s=o-a,l=(new Date).getTime(),c=function(){var t=((new Date).getTime()-l)/n,i=t>=1,o=i?s:s*t;r.zoom(o/a,e),i||requestAnimationFrame(c)};c()}else r.zoom(t,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=ue(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Tt(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Tt(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 St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.x)){var r=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=r,n.timestamp=null!==(i=c.dataIndexToTimestamp(r))&&void 0!==i?i:void 0}if(Tt(t.y)){var a=o?t.y-u.top:t.y;n.value=p.convertFromPixel(a)}return n})}}return St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Pt.OnCrosshairChange:var n=X({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Bi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n);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,r=this._chartContainer.clientWidth,a=this._chartContainer.clientHeight,o=ce("canvas",{width:"".concat(r,"px"),height:"".concat(a,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=$t(o);o.width=r*l,o.height=a*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,r,a);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(It(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var a=t.getBounding();s.drawImage(t.getImage(c),0,a.top,r,a.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}(),wr=new Map,Cr=1;function Sr(t,e){var i;if(_t(),i=Et(t)?document.getElementById(t):t,null===i)return xt("","","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=wr.get(i.id);if(It(n))return bt("","","The chart has been initialized on the dom!!!"),n;var r="k_line_chart_".concat(Cr++);return n=new _r(i,e),n.id=r,i.setAttribute("k-line-chart-id",r),wr.set(r,n),n}var kr=i(21396),Ar=i.n(kr);function Tr(t,e,i,n){if(!t||!e||!i||!n)return t;try{var r=Ar().enc.Base64.parse(t),a=Ar().lib.WordArray.create(r.words.slice(0,4)),o=Ar().lib.WordArray.create(r.words.slice(4)),s=Ar().enc.Base64.parse(n),l=Ar().AES.decrypt({ciphertext:o},s,{iv:a,mode:Ar().mode.CBC,padding:Ar().pad.Pkcs7}),c=l.toString(Ar().enc.Utf8);return c||t}catch(u){return t}}function Ir(t,e){return Mr.apply(this,arguments)}function Mr(){return Mr=(0,c.A)((0,l.A)().m(function t(e,i){var n,r;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,f.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,r=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(r.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Mr.apply(this,arguments)}function Er(t,e,i){return Dr.apply(this,arguments)}function Dr(){return Dr=(0,c.A)((0,l.A)().m(function t(e,i,n){var r;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ir(i,n);case 1:return r=t.v,t.a(2,Tr(e,i,n,r))}},t)})),Dr.apply(this,arguments)}function Pr(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 Lr={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)([]),r=(0,h.KR)(!1),a=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,v=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),x=(0,h.KR)(5e3),_=(0,h.KR)(!1),w=(0,h.KR)(1e4),C=(0,h.KR)(0),S=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||!C.value||e-C.value>=i)&&(C.value=e,_t())}},k=(0,h.KR)([]),A=(0,h.KR)([]),T=(0,h.KR)([]),I=(0,h.KR)(null),M=(0,h.nI)(),E=M.proxy,D=(0,h.EW)(function(){return[{name:"line",title:E.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:E.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:E.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:E.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:E.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:E.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:E.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:E.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:E.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"}]}),F=(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}}]),B=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"},i=e[t]||t;if(I.value!==t){I.value=t;try{var n={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(n);r?T.value.push(r):I.value=null}catch(a){I.value=null}}else{I.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(o){}}}},O=function(){if(g.value)try{T.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){}}),T.value=[],I.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=B(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})}},W=(0,h.KR)(null),$=(0,h.KR)(!1),H=(0,h.KR)(!1),V=(0,h.KR)(!1),K=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#131722",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2e39",gridLineColor:"#1f2943",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:"#2a2e39",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#1f2943"}:{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"}}),Y=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},X=function(){return new Promise(function(t,e){if(window.pyodide)return W.value=window.pyodide,H.value=!0,void t(window.pyodide);$.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},r="/assets/pyodide/v".concat(i,"/full/"),a="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||r),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||a),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 r=document.createElement("script");r.dataset.pyodideSrc=t,r.src=t,r.onload=function(){return e()},r.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(r)})},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:W.value=window.pyodide,H.value=!0,$.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){$.value=!1,V.value=!0,e(t)})})},U=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(),r=parseFloat(i[1].trim());isNaN(r)||(e[n]=r)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},G=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,s,c,u,d,h,p,f,v,g,m,y,b,x,_,w,C,S=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(r=S.length>2&&void 0!==S[2]?S[2]:{},a=S.length>3&&void 0!==S[3]?S[3]:{},H.value&&W.value){e.n=5;break}if(!$.value){e.n=4;break}s=0;case 1:if(!($.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||!W.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&W.value){e.n=5;break}throw $.value?($.value=!1,V.value=!0):V.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=a.is_encrypted||a.isEncrypted||0,!u&&!Pr(i,u)){e.n=11;break}if(d=a.user_id||a.userId||t.userId||r.userId,h=a.originalId||a.id||r.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Er(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,_=e.v,new Error("代码解密失败,无法执行指标: "+(_.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}}),f=JSON.stringify(p),v=JSON.stringify(r||{}),g=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=v.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,W.value.runPythonAsync(y);case 12:if(b=e.v,b&&"string"===typeof b){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(b)));case 13:e.p=13,x=JSON.parse(b),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(x){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return x.plots&&Array.isArray(x.plots)||(x.plots=[]),x.plots=x.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}),x.signals&&Array.isArray(x.signals)&&(x.signals=x.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})),x.calculatedVars||(x.calculatedVars={}),e.a(2,x);case 17:throw e.p=17,C=e.v,new Error("Python 执行失败: ".concat(C.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 j(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?r+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var f=[],v=[],g=[],m=0;m=e-1){var w=f[m],C=v[m],S=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(C/w*100),n.push(S/w*100)),m>=e-1){var k=i[m]+n[m],A=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)r.push(A);else if(m===e){var T=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;r.push((T+A)/2)}else r.push((r[m-1]*(e-1)+A)/e)}}}return{adx:r,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=f+2*p,b=(null===(i=a.extendData)||void 0===i?void 0:i.side)||(null===(n=a.extendData)||void 0===n?void 0:n.type)||"buy",x="buy"===b,_=x?u:u-y,w=d,C=w,S=x?_:_+y;return[{type:"line",attrs:{coordinates:[{x:c,y:C},{x:c,y:S}]},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:_,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:_+y/2,text:v,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:f,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}});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],r=e.close.toFixed(2),a=(e.close-n.close)/n.close*100;i("price-change",{price:r,change:a})}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),r=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&n.getMinutes()===r.getMinutes();case"5m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(r.getMinutes()/5);case"15m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(r.getMinutes()/15);case"30m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(r.getMinutes()/30);case"1H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours();case"4H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&Math.floor(n.getHours()/4)===Math.floor(r.getHours()/4);case"1D":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate();case"1W":var a=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((r.getTime()-new Date(r.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===r.getFullYear()&&a===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,v,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(!r.value||i){e.n=2;break}return e.a(2);case 2:return r.value=!0,a.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,f.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=E.$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&&_t()},100)}}else mt();t.realtimeEnabled&&(gt(),vt())}),e.n=12;break;case 11:if(e.p=11,v=e.v,a.value=E.$t("dashboard.indicator.error.loadDataFailed")+": "+(v.message||E.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,r.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 r,a,o,c,d,v;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,r=Math.floor(i/1e3),e.n=2,(0,f.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:r}});case 2:if(a=e.v,1!==a.code||!a.data||!Array.isArray(a.data)){e.n=5;break}if(o=st(a.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&&(r=st(i.data),a=(0,R.A)(n.value),r.length>0&&(o=Math.floor(r[r.length-1].timestamp/1e3),s=Math.floor(a[a.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=a[a.length-1],u=r[r.length-1],a[a.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=a,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(a[h]),S(!1)):g.value&&(g.value.applyNewData(n.value),S(!1))):o>s&&(p=r.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!a.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,R.A)(a),(0,R.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),v=ct(n.value),lt(v),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),S(!0)):g.value&&(g.value.applyNewData(n.value),S(!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)}}(),vt=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;x.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!r.value&&t.symbol&&n.value&&n.value.length>0&&ft()},x.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=Sr(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Sr(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)),bt(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(I.value&&t&&t.id){T.value.push(t.id),I.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){I.value&&t&&t.id&&(T.value.push(t.id),I.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=T.value.indexOf(t);e>-1&&T.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,r=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,o,c,d,h,f;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(r){t.n=1;break}return i=e.from,r=!0,setTimeout(function(){v.value=!0},1e3),t.a(2);case 1:if(v.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&&(a=n.value.length,a>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*a/100),d=.1,h=Math.min(100,d+c/a*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&v.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 f=n.value[0].timestamp,t.n=4,ht(f);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(b){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){_t()})}}window.addEventListener("resize",yt)}catch(a){a.value=E.$t("dashboard.indicator.error.chartInitFailed")+": "+(a.message||"未知错误")}}else{var d=0,f=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},bt=function(){if(g.value){var t=K.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:[E.$t("dashboard.indicator.tooltip.time"),E.$t("dashboard.indicator.tooltip.open"),E.$t("dashboard.indicator.tooltip.high"),E.$t("dashboard.indicator.tooltip.low"),E.$t("dashboard.indicator.tooltip.close"),E.$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}})}},xt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:r,series:a?"price":"normal"};return Je(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},_t=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,r,a,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!_.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:_.value=!0,e.p=3;try{A.value.length>0&&g.value&&(A.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){}}),A.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),r=(0,l.A)().m(function e(){var n,r,a,s,c,u,d,h,p,f,v,m,y,x,_,w,C,S,T,I,M,E,D,P,F,B,N,O,z,W,H,K,X,U,st,lt,ct,ut,dt,ht,pt,ft,vt,gt,mt,yt,bt,_t,wt,Ct,St,kt,At,Tt,It,Mt,Et,Dt,Pt,Lt,Rt,Ft,Bt,Nt,Ot,zt,Wt,$t,Ht,Vt,Kt,Yt,Xt,Ut,Gt,jt,qt,Zt,Jt,Qt,te,ee,ie,ne,re,ae,oe,se,le,ce,ue,de,he,pe,fe,ve,ge,me,ye,be,xe,_e,we,Ce,Se,ke,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je,qe,Ze,Je,Qe,ti,ei,ii,ni,ri,ai,oi,si,li,ci,ui,di,hi,pi,fi,vi,gi,mi,yi,bi;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(r=e.v,a=[],r&&r.plots&&Array.isArray(r.plots)&&(a=(0,R.A)(r.plots)),!(r&&r.signals&&Array.isArray(r.signals))){e.n=14;break}s=(0,b.A)(r.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){E=(0,b.A)(f);try{for(E.s();!(D=E.n()).done;){P=D.value;try{F=P.timestamp,F<1e10&&(F*=1e3),B=P.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:F,value:P.price},{timestamp:F,value:P.anchorPrice}],extendData:{text:B,color:P.color,side:P.side,action:P.action,price:P.price},lock:!0},"candle_pane"),N&&A.value.push(N))}catch(l){}}}catch(xi){E.e(xi)}finally{E.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(a.length>0&&(O=a.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],W={},H=0;H0)){e.n=23;break}for(_t=[],wt=0;wt0&&g.value){Bt=(0,b.A)(St);try{for(Bt.s();!(Nt=Bt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Wt=Ot.text,"function"===typeof g.value.createOverlay&&($t=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Wt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),$t&&A.value.push($t))}catch(l){}}}catch(xi){Bt.e(xi)}finally{Bt.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(Vt=[],Kt={},Yt=0;Yt0&&(0,h.dY)(function(){g.value&&_t()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?vt():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,X();case 3:e.n=5;break;case 4:e.p=4,e.v,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:r,error:a,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:K,getIndicatorColor:Y,handleRetry:wt,loadingPython:$,pythonReady:H,pyodideLoadFailed:V,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:ft,startRealtime:vt,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:bt,updateIndicators:_t,executePythonStrategy:G,parsePythonStrategy:U,indicatorButtons:F,isIndicatorActive:B,toggleIndicator:z,drawingTools:D,activeDrawingTool:I,selectDrawingTool:N,clearAllDrawings:O}}},Rr=Lr,Fr=(0,T.A)(Rr,E,D,!1,null,"466e34db",null),Br=Fr.exports,Nr=function(){var t=this,e=t._self._c;return e("a-modal",{staticClass:"backtest-modal",attrs:{title:t.$t("dashboard.indicator.backtest.title"),visible:t.visible,width:1100,maskClosable:!1},on:{cancel:t.handleCancel}},[e("div",{staticClass:"backtest-content"},[e("a-steps",{staticStyle:{"margin-bottom":"16px"},attrs:{current:t.currentStep,size:"small"}},[e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.strategy.title"),description:t.$t("dashboard.indicator.backtest.steps.strategy.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.trading.title"),description:t.$t("dashboard.indicator.backtest.steps.trading.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.results.title"),description:t.$t("dashboard.indicator.backtest.steps.results.desc")}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2!==t.currentStep,expression:"currentStep !== 2"}],staticClass:"config-section"},[e("a-form",{attrs:{form:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[e("div",{directives:[{name:"show",rawName:"v-show",value:0===t.currentStep,expression:"currentStep === 0"}]},[e("a-collapse",{staticStyle:{background:"#fafafa"},attrs:{bordered:!1},model:{value:t.step1CollapseKeys,callback:function(e){t.step1CollapseKeys=e},expression:"step1CollapseKeys"}},[e("a-collapse-panel",{key:"risk",attrs:{header:t.$t("dashboard.indicator.backtest.panel.risk")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.stopLossPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stopLossPct",{initialValue:0}],expression:"['stopLossPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["takeProfitPct",{initialValue:0}],expression:"['takeProfitPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailingEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrailingToggle}})],1)],1),e("a-col",{attrs:{span:12}})],1),t.trailingEnabledUi?[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingStopPct",{initialValue:0}],expression:"['trailingStopPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingActivationPct",{initialValue:0}],expression:"['trailingActivationPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:t._e()],2),e("a-collapse-panel",{key:"scale",attrs:{header:t.$t("dashboard.indicator.backtest.panel.scale")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrendAddToggle}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['dcaAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onDcaAddToggle}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddStepPct",{initialValue:0}],expression:"['trendAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddStepPct",{initialValue:0}],expression:"['dcaAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddSizePct",{initialValue:0}],expression:"['trendAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddSizePct",{initialValue:0}],expression:"['dcaAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddMaxTimes",{initialValue:0}],expression:"['trendAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddMaxTimes",{initialValue:0}],expression:"['dcaAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1)],1)],1),e("a-collapse-panel",{key:"reduce",attrs:{header:t.$t("dashboard.indicator.backtest.panel.reduce")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverseReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceStepPct",{initialValue:0}],expression:"['trendReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceStepPct",{initialValue:0}],expression:"['adverseReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceSizePct",{initialValue:0}],expression:"['trendReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceSizePct",{initialValue:0}],expression:"['adverseReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceMaxTimes",{initialValue:0}],expression:"['trendReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceMaxTimes",{initialValue:0}],expression:"['adverseReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),e("a-collapse-panel",{key:"position",attrs:{header:t.$t("dashboard.indicator.backtest.panel.position")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.entryPct"),help:t.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(t.entryPctMaxUi||0).toFixed(0)})}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entryPct",{initialValue:100}],expression:"['entryPct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:t.entryPctMaxUi,step:.1,precision:4},on:{change:t.onEntryPctChange}})],1)],1),e("a-col",{attrs:{span:12}})],1)],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:1===t.currentStep,expression:"currentStep === 1"}]},[e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:t.combinedAlertType,"show-icon":""}},[e("template",{slot:"message"},[e("div",{staticStyle:{display:"flex","align-items":"center","flex-wrap":"wrap",gap:"8px"}},[e("span",[e("strong",[t._v("Symbol:")]),t._v(" "+t._s(t.symbol||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Market:")]),t._v(" "+t._s(t.market||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Timeframe:")]),t._v(" "+t._s(t.selectedTimeframe||t.timeframe||"-")+" ")]),t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"high"===t.precisionInfo.precision?"thunderbolt":"clock-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.precisionMode"))+": "),e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"high"===t.precisionInfo.precision?"green":"blue",size:"small"}},[t._v(" "+t._s(t.precisionInfo.timeframe)+" ")]),e("span",{staticStyle:{color:"#666","margin-left":"6px"}},[t._v(" ("+t._s(t.$t("dashboard.indicator.backtest.estimatedCandles",{count:t.precisionInfo.estimated_candles?t.precisionInfo.estimated_candles.toLocaleString():"-"}))+") ")])],1):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px",color:"#faad14"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"warning"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.standardModeWarning"))+" ")],1):t._e()])]),e("template",{slot:"description"},[t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s("high"===t.precisionInfo.precision?t.$t("dashboard.indicator.backtest.highPrecisionDesc"):t.$t("dashboard.indicator.backtest.mediumPrecisionDesc"))+" ")]):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s(t.precisionInfo.message||t.$t("dashboard.indicator.backtest.standardModeDesc"))+" ")]):t._e()])],2),e("div",{staticClass:"date-quick-select",staticStyle:{"margin-bottom":"12px"}},[e("span",{staticStyle:{"margin-right":"8px",color:"#666","font-size":"13px"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.quickSelect")||"快速选择")+":")]),e("a-button-group",{attrs:{size:"small"}},t._l(t.datePresets,function(i){return e("a-button",{key:i.key,attrs:{type:t.selectedDatePreset===i.key?"primary":"default"},on:{click:function(e){return t.applyDatePreset(i)}}},[t._v(t._s(i.label))])}),1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.startDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["startDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.startDateRequired")}],initialValue:t.defaultStartDate}],expression:"['startDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.startDateRequired') }], initialValue: defaultStartDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledStartDate,placeholder:t.$t("dashboard.indicator.backtest.selectStartDate")},on:{change:t.onDateChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.endDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["endDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.endDateRequired")}],initialValue:t.defaultEndDate}],expression:"['endDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.endDateRequired') }], initialValue: defaultEndDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledEndDate,placeholder:t.$t("dashboard.indicator.backtest.selectEndDate")},on:{change:t.onDateChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.initialCapital")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initialCapital",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.initialCapitalRequired")}],initialValue:1e4}],expression:"['initialCapital', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.initialCapitalRequired') }], initialValue: 10000 }]"}],staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.commission")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission",{initialValue:.02}],expression:"['commission', { initialValue: 0.02 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}}),e("div",{staticClass:"field-hint"},[t._v(t._s(t.$t("dashboard.indicator.backtest.commissionHint")))])],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.slippage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["slippage",{initialValue:0}],expression:"['slippage', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.leverage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:1}],expression:"['leverage', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.tradeDirection")}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["tradeDirection",{initialValue:"long"}],expression:"['tradeDirection', { initialValue: 'long' }]"}],staticStyle:{width:"100%"}},[e("a-select-option",{attrs:{value:"long"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.longOnly"))+" ")]),e("a-select-option",{attrs:{value:"short"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.shortOnly"))+" ")]),e("a-select-option",{attrs:{value:"both"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.both"))+" ")])],1)],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.timeframe")}},[e("a-select",{staticStyle:{width:"100%"},on:{change:t.onTimeframeChange},model:{value:t.selectedTimeframe,callback:function(e){t.selectedTimeframe=e},expression:"selectedTimeframe"}},[e("a-select-option",{attrs:{value:"1m"}},[t._v("1m")]),e("a-select-option",{attrs:{value:"5m"}},[t._v("5m")]),e("a-select-option",{attrs:{value:"15m"}},[t._v("15m")]),e("a-select-option",{attrs:{value:"30m"}},[t._v("30m")]),e("a-select-option",{attrs:{value:"1H"}},[t._v("1H")]),e("a-select-option",{attrs:{value:"4H"}},[t._v("4H")]),e("a-select-option",{attrs:{value:"1D"}},[t._v("1D")]),e("a-select-option",{attrs:{value:"1W"}},[t._v("1W")])],1)],1)],1)],1)],1)])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2===t.currentStep&&t.hasResult,expression:"currentStep === 2 && hasResult"}],staticClass:"result-section"},[t.backtestRunId?e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"success","show-icon":"",message:t.$t("dashboard.indicator.backtest.savedRunId",{id:t.backtestRunId})}}):t._e(),e("div",{staticClass:"metrics-cards"},[e("div",{staticClass:"metric-card",class:{positive:t.result.totalReturn>0,negative:t.result.totalReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.totalReturn)))]),e("div",{staticClass:"metric-amount"},[t._v(t._s(t.formatMoney(t.result.totalProfit)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.annualReturn>0,negative:t.result.annualReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.sharpeRatio")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.sharpeRatio.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.winRate)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.profitFactor>=1.5,negative:t.result.profitFactor<1}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.profitFactor.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.totalTrades))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalCommission")))]),e("div",{staticClass:"metric-value"},[t._v("-$"+t._s(t.result.totalCommission?t.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.equityCurve")))]),e("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),e("div",{staticClass:"trades-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.tradeHistory")))]),e("a-table",{attrs:{columns:t.tradeColumns,"data-source":t.result.trades,pagination:{pageSize:5,size:"small"},size:"small",scroll:{x:600}},scopedSlots:t._u([{key:"type",fn:function(i){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(i)}},[t._v(" "+t._s(t.getTradeTypeText(i))+" ")])]}},{key:"balance",fn:function(i){return[e("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[t._v(" $"+t._s(i?i.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(i){return[e("span",{style:{color:i>0?"#52c41a":i<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatMoney(i))+" ")])]}}])})],1)],1),t.loading?e("div",{staticClass:"loading-overlay"},[e("div",{staticClass:"loading-content"},[e("div",{staticClass:"loading-animation"},[e("div",{staticClass:"chart-bars"},[e("div",{staticClass:"bar bar1"}),e("div",{staticClass:"bar bar2"}),e("div",{staticClass:"bar bar3"}),e("div",{staticClass:"bar bar4"}),e("div",{staticClass:"bar bar5"})])]),e("div",{staticClass:"loading-text"},[t._v(t._s(t.$t("dashboard.indicator.backtest.running")))]),e("div",{staticClass:"loading-subtext"},[t._v(t._s(t.loadingTip))])])]):t._e()],1),e("template",{slot:"footer"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center",width:"100%"}},[e("div",[t.currentStep>0?e("a-button",{attrs:{disabled:t.loading},on:{click:t.handlePrev}},[t._v(t._s(t.$t("dashboard.indicator.backtest.prev")))]):t._e()],1),e("div",[e("a-button",{attrs:{disabled:t.loading},on:{click:t.handleCancel}},[t._v(t._s(t.$t("dashboard.indicator.backtest.close")))]),t.currentStep<1?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleNext}},[t._v(t._s(t.$t("dashboard.indicator.backtest.next")))]):1===t.currentStep?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",loading:t.loading},on:{click:t.handleRunBacktest}},[t._v(t._s(t.$t("dashboard.indicator.backtest.run")))]):e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleRerun}},[t._v(t._s(t.$t("dashboard.indicator.backtest.rerun")))])],1)])])],2)},Or=[],zr=i(95093),Wr=i.n(zr),$r=i(86529),Hr={name:"BacktestModal",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicator:{type:Object,default:null},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1D"}},data:function(){return{form:this.$form.createForm(this),loading:!1,loadingTip:"",loadingTimer:null,currentStep:0,hasResult:!1,backtestRunId:null,step1CollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,precisionInfo:null,selectedDatePreset:null,selectedTimeframe:"1D",result:{totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},equityChart:null,tradeColumns:[]}},computed:{maxBacktestRange:function(){var t=this.selectedTimeframe||this.timeframe||"1D";return"1m"===t?{days:30,label:"1个月"}:"5m"===t?{days:180,label:"6个月"}:["15m","30m"].includes(t)?{days:365,label:"1年"}:{days:1095,label:"3年"}},recommendedRange:function(){return{days:30,label:"30天",key:"30d"}},combinedAlertType:function(){return this.precisionInfo&&this.precisionInfo.enabled?"high"===this.precisionInfo.precision?"success":"info":this.precisionInfo&&!this.precisionInfo.enabled&&this.market&&"crypto"===this.market.toLowerCase()?"warning":"info"},datePresets:function(){var t=[],e=this.selectedTimeframe||this.timeframe||"1D";return"1m"===e?(t.push({key:"7d",days:7,label:"7D"}),t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"})):"5m"===e?(t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"})):(["15m","30m"].includes(e),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"}),t.push({key:"365d",days:365,label:"1Y"})),t},defaultStartDate:function(){return Wr()().subtract(this.recommendedRange.days,"days")},defaultEndDate:function(){return Wr()()},earliestDate:function(){return Wr()().subtract(this.maxBacktestRange.days,"days")},labelCol:function(){return 0===this.currentStep?{span:9}:{span:6}},wrapperCol:function(){return 0===this.currentStep?{span:15}:{span:18}}},watch:{visible:function(t){var e=this;t?(this.currentStep=0,this.hasResult=!1,this.backtestRunId=null,this.step1CollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.precisionInfo=null,this.selectedDatePreset=null,this.selectedTimeframe=this.timeframe||"1D",this.result={totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},this.$nextTick(function(){e.form&&(e.form.resetFields(),e.trailingEnabledUi=!!e.form.getFieldValue("trailingEnabled"),e.recalcEntryPctMaxUi(),e.selectedDatePreset="30d",e.fetchPrecisionInfo())})):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},created:function(){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:120,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,customRender:function(t){return t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):"--"}},{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:130,scopedSlots:{customRender:"balance"}}]},methods:{recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trendAddEnabled"),e=!!this.form.getFieldValue("dcaAddEnabled"),i=Number(this.form.getFieldValue("trendAddMaxTimes")||0),n=Number(this.form.getFieldValue("dcaAddMaxTimes")||0),r=Number(this.form.getFieldValue("trendAddSizePct")||0),a=Number(this.form.getFieldValue("dcaAddSizePct")||0),o=(t?i*r:0)+(e?n*a:0),s=Math.max(0,Math.min(100,100-o));this.entryPctMaxUi=s}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entryPct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entryPct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dcaAddEnabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trendAddEnabled:!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({trailingStopPct:0,trailingActivationPct:0}))},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={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"),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")};return e[t]||t},disabledStartDate:function(t){return!!t&&(t>Wr()().endOf("day")||tWr()().endOf("day"))return!0;if(tn.endOf("day"))return!0}return!1},applyDatePreset:function(t){this.selectedDatePreset=t.key;var e=Wr()(),i=Wr()().subtract(t.days,"days");this.form.setFieldsValue({startDate:i,endDate:e}),this.fetchPrecisionInfo(i,e)},fetchPrecisionInfo:function(t,e){var i=this;return(0,c.A)((0,l.A)().m(function n(){var r;return(0,l.A)().w(function(n){while(1)switch(n.p=n.n){case 0:if(t&&e||(t=i.form?i.form.getFieldValue("startDate"):null,e=i.form?i.form.getFieldValue("endDate"):null),t||(t=i.defaultStartDate),e||(e=i.defaultEndDate),i.market&&"crypto"===i.market.toLowerCase()){n.n=1;break}return i.precisionInfo={enabled:!1,reason:"only_crypto",message:i.$t("dashboard.indicator.backtest.onlyCryptoSupported")},n.a(2);case 1:return n.p=1,n.n=2,(0,f.Ay)({url:"/api/indicator/backtest/precision-info",method:"post",data:{market:i.market,startDate:t.format("YYYY-MM-DD"),endDate:e.format("YYYY-MM-DD")}});case 2:r=n.v,1===r.code&&r.data&&(i.precisionInfo=r.data),n.n=4;break;case 3:n.p=3,n.v,i.precisionInfo=null;case 4:return n.a(2)}},n,null,[[1,3]])}))()},onTimeframeChange:function(){this.selectedDatePreset="30d";var t=Wr()(),e=Wr()().subtract(30,"days");this.form.setFieldsValue({startDate:e,endDate:t}),this.fetchPrecisionInfo(e,t)},onDateChange:function(){var t=this;this.selectedDatePreset=null,this.$nextTick(function(){t.fetchPrecisionInfo()})},validateDateRange:function(t,e){if(!t||!e)return!0;var i=e.diff(t,"days"),n=this.maxBacktestRange.days||365;return!(i>n)||(this.$message.error(this.$t("dashboard.indicator.backtest.dateRangeExceededDays",{timeframe:this.selectedTimeframe||this.timeframe,maxRange:this.maxBacktestRange.label,maxDays:n})),!1)},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(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}))},handleCancel:function(){this.$emit("cancel")},handlePrev:function(){this.loading||this.currentStep>0&&(this.currentStep-=1)},handleNext:function(){this.loading||(0!==this.currentStep?1===this.currentStep&&this.handleRunBacktest():this.currentStep=1)},handleRerun:function(){this.loading||(this.currentStep=1,this.hasResult=!1,this.backtestRunId=null)},startLoadingAnimation:function(){var t=this,e=[this.$t("dashboard.indicator.backtest.loadingTip1")||"正在获取历史K线数据...",this.$t("dashboard.indicator.backtest.loadingTip2")||"正在执行策略信号计算...",this.$t("dashboard.indicator.backtest.loadingTip3")||"正在模拟交易执行...",this.$t("dashboard.indicator.backtest.loadingTip4")||"正在计算回测指标...",this.$t("dashboard.indicator.backtest.loadingTip5")||"即将完成,请稍候..."],i=0;this.loadingTip=e[0],this.loadingTimer=setInterval(function(){i=(i+1)%e.length,t.loadingTip=e[i]},2e3)},stopLoadingAnimation:function(){this.loadingTimer&&(clearInterval(this.loadingTimer),this.loadingTimer=null),this.loadingTip=""},handleRunBacktest:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i;return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:i=["startDate","endDate","initialCapital","commission","leverage","tradeDirection","slippage"],t.form.validateFields(i,function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,o,s,c;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!i){e.n=1;break}return e.a(2);case 1:if(r=(0,d.A)((0,d.A)({},t.form.getFieldsValue()||{}),n||{}),t.indicator&&t.indicator.id){e.n=2;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noIndicatorCode")),e.a(2);case 2:if(t.symbol){e.n=3;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noSymbol")),e.a(2);case 3:if(t.validateDateRange(n.startDate,n.endDate)){e.n=4;break}return e.a(2);case 4:return t.loading=!0,t.hasResult=!1,t.startLoadingAnimation(),e.p=5,a=function(t){return Number(t||0)/100},o={risk:{stopLossPct:a(r.stopLossPct),takeProfitPct:a(r.takeProfitPct),trailing:{enabled:!!r.trailingEnabled,pct:a(r.trailingStopPct),activationPct:a(r.trailingActivationPct)}},position:{entryPct:a(r.entryPct||0)},scale:{trendAdd:{enabled:!!r.trendAddEnabled,stepPct:a(r.trendAddStepPct),sizePct:a(r.trendAddSizePct),maxTimes:r.trendAddMaxTimes||0},dcaAdd:{enabled:!!r.dcaAddEnabled,stepPct:a(r.dcaAddStepPct),sizePct:a(r.dcaAddSizePct),maxTimes:r.dcaAddMaxTimes||0},trendReduce:{enabled:!!r.trendReduceEnabled,stepPct:a(r.trendReduceStepPct),sizePct:a(r.trendReduceSizePct),maxTimes:r.trendReduceMaxTimes||0},adverseReduce:{enabled:!!r.adverseReduceEnabled,stepPct:a(r.adverseReduceStepPct),sizePct:a(r.adverseReduceSizePct),maxTimes:r.adverseReduceMaxTimes||0}}},s={userid:t.userId||1,indicatorId:t.indicator.id,symbol:t.symbol,market:t.market,timeframe:t.selectedTimeframe||t.timeframe,startDate:n.startDate.format("YYYY-MM-DD"),endDate:n.endDate.format("YYYY-MM-DD"),initialCapital:n.initialCapital,commission:a(n.commission||0),slippage:a(n.slippage||0),leverage:n.leverage||1,tradeDirection:n.tradeDirection||"long",strategyConfig:o,enableMtf:t.market&&"crypto"===t.market.toLowerCase()},e.n=6,(0,f.Ay)({url:"/api/indicator/backtest",method:"post",data:s});case 6:c=e.v,1===c.code&&c.data?(c.data.runId&&(t.backtestRunId=c.data.runId),t.result=c.data.result||c.data,t.hasResult=!0,t.currentStep=2,t.$nextTick(function(){t.renderEquityChart()}),t.$message.success(t.$t("dashboard.indicator.backtest.success"))):t.$message.error(c.msg||t.$t("dashboard.indicator.backtest.failed")),e.n=8;break;case 7:e.p=7,e.v,t.$message.error(t.$t("dashboard.indicator.backtest.failed"));case 8:return e.p=8,t.stopLoadingAnimation(),t.loading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[5,7,8,9]])}));return function(t,i){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.96)",borderColor:"#e8e8e8",borderWidth:1,textStyle:{color:"#333"},formatter:function(t){var e='

'.concat(t[0].axisValue,"
");return t.forEach(function(t){if(void 0!==t.value&&null!==t.value){var i=t.value.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});e+='
\n '.concat(t.marker," ").concat(t.seriesName,'\n $').concat(i,"\n
")}}),e}},legend:{show:!1},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1,axisLine:{lineStyle:{color:"#e8e8e8"}},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,rotate:0,interval:Math.floor(i.length/6)}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#f5f5f5",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,formatter:function(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(0)+"K":t}}},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s,cap:"round",join:"round"},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)},emphasis:{lineStyle:{width:3}}}],animation:!0,animationDuration:800,animationEasing:"cubicOut"};this.equityChart.setOption(c),window.addEventListener("resize",function(){t.equityChart&&t.equityChart.resize()})}}},beforeDestroy:function(){this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},Vr=Hr,Kr=(0,T.A)(Vr,Nr,Or,!1,null,"9d8ac1fc",null),Yr=Kr.exports,Xr=function(){var t=this,e=t._self._c;return e("a-drawer",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":980,maskClosable:!0},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-switch",{model:{value:t.useCurrentFilters,callback:function(e){t.useCurrentFilters=e},expression:"useCurrentFilters"}}),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyUseCurrent"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.loading},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIAnalyze"))+" ")])],1),t.useCurrentFilters?t._e():e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-input",{staticStyle:{width:"220px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"140px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),allowClear:""},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(i){return e("a-select-option",{key:i,attrs:{value:i}},[t._v(t._s(i))])}),1),e("a-button",{attrs:{loading:t.loading},on:{click:t.loadRuns}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyApply")))]),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(t._s(t.filterLabel))])],1),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:10,size:"small"},rowKey:"id",scroll:{x:900},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"range",fn:function(i,n){return[e("span",[t._v(t._s(n.start_date||"")+" ~ "+t._s(n.end_date||""))])]}},{key:"status",fn:function(i){return[e("a-tag",{attrs:{color:"success"===i?"green":"failed"===i?"red":"blue"}},[t._v(" "+t._s("success"===i?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===i?t.$t("dashboard.indicator.backtest.historyStatusFailed"):i)+" ")])]}},{key:"actions",fn:function(i,n){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===n.id},on:{click:function(e){return t.viewRun(n)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")])]}}])}),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.historyAIAnalyzeTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"12px 0"}},[e("a-spin")],1):e("div",{staticStyle:{"white-space":"pre-wrap","font-family":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"}},[t._v(" "+t._s(t.aiResult||t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])],1)},Ur=[],Gr={name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},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:"",useCurrentFilters:!0,filterSymbol:"",filterTimeframe:"",timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[]}},computed:{filterLabel:function(){var t=[];this.indicatorId&&t.push("indicatorId=".concat(this.indicatorId));var e=this.useCurrentFilters?this.market:this.market||"",i=this.useCurrentFilters?this.symbol:this.filterSymbol||"",n=this.useCurrentFilters?this.timeframe:this.filterTimeframe||"";return e&&t.push("market=".concat(e)),i&&t.push("symbol=".concat(i)),n&&t.push("timeframe=".concat(n)),t.length?t.join(" | "):""}},watch:{visible:function(t){t&&(this.initColumns(),this.useCurrentFilters=!0,this.filterSymbol=this.symbol||"",this.filterTimeframe=this.timeframe||"",this.selectedRowKeys=[],this.aiResult="",this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},initColumns:function(){this.columns.length||(this.columns=[{title:this.$t("dashboard.indicator.backtest.historyRunId"),dataIndex:"id",key:"id",width:90},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:140},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:90},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:90},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:220,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyActions"),key:"actions",width:90,scopedSlots:{customRender:"actions"}}])},loadRuns:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,r,a;return(0,l.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,i=t.useCurrentFilters?t.symbol:t.filterSymbol||"",n=t.useCurrentFilters?t.timeframe:t.filterTimeframe||"",r=t.market||"",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/history",method:"get",params:{userid:t.userId,limit:100,offset:0,indicatorId:t.indicatorId,symbol:i,market:r,timeframe:n}});case 3:a=e.v,a&&1===a.code&&Array.isArray(a.data)?t.runs=a.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,l.A)().m(function i(){var n;return(0,l.A)().w(function(i){while(1)switch(i.p=i.n){case 0:if(t&&t.id){i.n=1;break}return i.a(2);case 1:return e.detailLoadingId=t.id,i.p=2,i.n=3,(0,f.Ay)({url:"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:n=i.v,n&&1===n.code&&n.data&&e.$emit("view",n.data);case 4:return i.p=4,e.detailLoadingId=null,i.f(4);case 5:return i.a(2)}},i,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId&&t.selectedRowKeys.length){e.n=1;break}return e.a(2);case 1:return t.analyzing=!0,t.showAIResult=!0,t.aiResult="",e.p=2,i=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",data:{userid:t.userId,runIds:t.selectedRowKeys,lang:i}});case 3:n=e.v,n&&1===n.code&&n.data&&n.data.analysis?t.aiResult=n.data.analysis:t.aiResult=n.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult");case 4:return e.p=4,t.analyzing=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()}}},jr=Gr,qr=(0,T.A)(jr,Xr,Ur,!1,null,null,null),Zr=qr.exports,Jr=function(){var t,e,i,n=this,r=n._self._c;return r("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:n.modalTitle,visible:n.visible,width:1100,maskClosable:!1},on:{cancel:function(t){return n.$emit("cancel")}}},[n.run&&n.run.result?r("div",[n.run.id?r("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:n.$t("dashboard.indicator.backtest.savedRunId",{id:n.run.id})}}):n._e(),r("div",{staticClass:"metrics-cards"},[r("div",{staticClass:"metric-card",class:{positive:n.result.totalReturn>0,negative:n.result.totalReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.totalReturn)))]),r("div",{staticClass:"metric-amount"},[n._v(n._s(n.formatMoney(n.result.totalProfit)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.annualReturn>0,negative:n.result.annualReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.annualReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.annualReturn)))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.maxDrawdown")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.maxDrawdown)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.sharpeRatio")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(t=n.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.winRate")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.winRate)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.profitFactor>=1.5,negative:n.result.profitFactor<1}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.profitFactor")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(e=n.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalTrades")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(null!==(i=n.result.totalTrades)&&void 0!==i?i:0))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalCommission")))]),r("div",{staticClass:"metric-value"},[n._v("-$"+n._s(n.result.totalCommission?n.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),r("div",{staticClass:"chart-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.equityCurve")))]),r("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),r("div",{staticClass:"trades-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.tradeHistory")))]),r("a-table",{attrs:{columns:n.tradeColumns,"data-source":n.result.trades||[],pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:n.rowKey},scopedSlots:n._u([{key:"type",fn:function(t){return[r("a-tag",{attrs:{color:n.getTradeTypeColor(t)}},[n._v(" "+n._s(n.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[r("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[n._v(" $"+n._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[r("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":"#666"}},[n._v(" "+n._s(n.formatMoney(t))+" ")])]}}])})],1)],1):r("div",{staticStyle:{padding:"12px 0"}},[r("a-empty",{attrs:{description:n.$t("dashboard.indicator.backtest.historyNoData")}})],1),r("template",{slot:"footer"},[r("a-button",{on:{click:function(t){return n.$emit("cancel")}}},[n._v(n._s(n.$t("dashboard.indicator.backtest.close")))])],1)],2)},Qr=[],ta={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=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1},yAxis:{type:"value"},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)}}]};this.equityChart.setOption(c),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},ea=ta,ia=(0,T.A)(ea,Jr,Qr,!1,null,"a484239a",null),na=ia.exports,ra=i(8700),aa={name:"DashboardIndicator",components:{IndicatorEditor:M,KlineChart:Br,BacktestModal:Yr,BacktestHistoryDrawer:Zr,BacktestRunViewer:na,QuickTradePanel:ra.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),r=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),b=(0,h.KR)(!1),x=(0,h.KR)(""),_=(0,h.KR)(!1),w=(0,h.KR)(!1),C=(0,h.KR)(!1),S=(0,h.KR)(""),k=(0,h.KR)(""),A=(0,h.KR)([]),T=(0,h.KR)(!1),I=(0,h.KR)([]),M=(0,h.KR)(!1),E=(0,h.KR)(null),D=(0,h.KR)(null),P=(0,h.KR)([]),L=(0,h.KR)(!1),R=(0,h.KR)(!1),F=(0,h.KR)(""),B=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(V.value||"").toLowerCase()}),z=function(){O.value?(F.value=H.value||"",N.value=parseFloat(K.value)||0,B.value="",R.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},W=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},$=function(){i&&i.$router&&i.$router.push("/indicator-community")},H=(0,h.KR)(""),V=(0,h.KR)(""),K=(0,h.KR)("--"),Y=(0,h.KR)(0),X=(0,h.EW)(function(){return Y.value>0?"color-up":Y.value<0?"color-down":""}),U=(0,h.KR)("1D"),G=(0,h.KR)([]),j=(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}}],Z=[{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}}],J=(0,h.KR)([]),Q=(0,h.KR)([]),tt=(0,h.KR)(!1),et=(0,h.KR)(!1),it=(0,h.KR)(null),nt=(0,h.KR)(""),rt=(0,h.KR)([]),at=(0,h.KR)({}),ot=(0,h.KR)(!1),st=(0,h.KR)({}),lt=(0,h.KR)(!1),ct=(0,h.KR)(!1),ut=(0,h.KR)(!1),dt=(0,h.KR)(null),ht=(0,h.KR)(!1),pt=(0,h.KR)(null),ft=(0,h.KR)(!1),vt=(0,h.KR)(null),gt=(0,h.KR)(!1),mt=(0,h.KR)(null),yt=(0,h.KR)(!1),bt=(0,h.KR)(null),xt=(0,h.KR)(!1),_t=(0,h.KR)(!1),wt=(0,h.KR)("free"),Ct=(0,h.KR)(10),St=(0,h.KR)(""),kt=(0,h.KR)(!1),At={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},Tt=(0,h.KR)(!1),It=function(t){var e=t.price,i=t.change;K.value=e,Y.value=i},Mt=function(){},Et=(0,h.KR)([]),Dt=(0,h.KR)([]),Pt=function(t){U.value=t},Lt=function(t){return t?Object.values(t).join(", "):""},Rt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r.value=!0,t.p=1,a=(0,h.nI)(),o=null===a||void 0===a||null===(e=a.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,r.value=!1,Ft(),ne(),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),Ft(),ne()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,r.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Ft=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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 b.value=!0,t.p=2,t.n=3,(0,v.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)})}),Bt(),y.value.length>0&&!H.value&&(r=y.value[0],V.value=r.market,H.value=r.symbol,p.value=r.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,b.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Bt=function(){x.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(x.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(x.value.toLowerCase())}):m.value=y.value},Nt=function(t){x.value=t,0===y.value.length&&t&&(_.value=!0),Bt()},Ot=function(t){_.value=t,t||(x.value="")},zt=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),r=n[0],a=n[1];e={market:r,symbol:a,value:t}}e&&(V.value=e.market,H.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())},$t=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,v.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?P.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)?P.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):P.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"}],P.value.length>0&&!S.value&&(S.value=P.value[0].value),t.n=3;break;case 2:t.p=2,t.v,P.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)}}(),Ht=function(){w.value=!1,E.value=null,k.value="",A.value=[],L.value=!1,S.value=P.value.length>0?P.value[0].value:""},Vt=function(t){S.value=t,k.value="",A.value=[],E.value=null,L.value=!1,jt(t)},Kt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return A.value=[],L.value=!1,void(E.value=null);D.value=setTimeout(function(){Xt(e)},500)},Yt=function(t){t&&t.trim()&&(S.value?A.value.length>0||(L.value&&0===A.value.length?Ut():Xt(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},Xt=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 A.value=[],L.value=!1,t.a(2);case 1:if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return T.value=!0,L.value=!0,t.p=3,t.n=4,(0,v._3)({market:S.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?A.value=n.data:(A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,T.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()?S.value?E.value={market:S.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){E.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},jt=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=S.value||(P.value.length>0?P.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return M.value=!0,t.p=2,t.n=3,(0,v.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?I.value=i.data:I.value=[],t.n=5;break;case 4:t.p=4,t.v,I.value=[];case 5:return t.p=5,M.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,r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",r="",!E.value){t.n=1;break}e=E.value.market,r=E.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=S.value,r=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 C.value=!0,t.p=5,t.n=6,(0,v.dp)({userid:n.value,market:e,symbol:r});case 6:if(a=t.v,!a||1!==a.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),Ht(),t.n=7,Ft();case 7:t.n=9;break;case 8:u.A.error((null===a||void 0===a?void 0:a.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,C.value=!1,t.f(11);case 12:return t.a(2)}},t,null,[[5,10,11,12]])}));return function(){return t.apply(this,arguments)}}(),Zt=function(t){if(!ee(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)}))}},Jt=function(t){G.value=G.value.filter(function(e){return e.id!==t})},Qt=function(t){var e=t.action,i=t.indicator;if("add"===e){var n=(0,d.A)((0,d.A)({},i),{},{calculate:te(i.id)});Zt(n)}else"remove"===e&&Jt(i.id)},te=function(t){return null},ee=function(t){return"sma"===t?q.some(function(t){return G.value.some(function(e){return e.id===t.id})}):"ema"===t?Z.some(function(t){return G.value.some(function(e){return e.id===t.id})}):G.value.some(function(e){return e.id===t})},ie=function(){var t=new Set;return q.forEach(function(e){return t.add(e.id)}),Z.forEach(function(e){return t.add(e.id)}),G.value.filter(function(e){return!t.has(e.id)})},ne=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r;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 tt.value=!0,t.p=2,t.n=3,(0,f.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}),r=e.data.filter(function(t){return 1===t.is_buy||"1"===t.is_buy}),J.value=i.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"custom"})}),Q.value=r.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,tt.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),ae=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var r,a,o,s,c,h,p,f,v;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ee(r)){t.n=1;break}return Jt(r),t.a(2);case 1:if(t.p=1,a=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(a),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=a,h=(0,d.A)({},s),p={id:r,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})}},f=(0,d.A)((0,d.A)({},o.params),s),G.value.push((0,d.A)((0,d.A)({},p),{},{params:f})),t.n=7;break;case 6:t.p=6,v=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(v.message||"未知错误"));case 7:return t.a(2)}},t,null,[[1,6]])}));return function(e,i){return t.apply(this,arguments)}}(),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ee(r)){t.n=1;break}Jt(r),t.n=5;break;case 1:return t.p=1,ot.value=!0,t.n=2,i.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:e.id}});case 2:a=t.v,a&&1===a.code&&Array.isArray(a.data)&&a.data.length>0?(rt.value=a.data,o="".concat(n,"-").concat(e.id),s=st.value[o],c={},a.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}),at.value=c,it.value=e,nt.value=n,et.value=!0):ae(e,n),t.n=4;break;case 3:t.p=3,t.v,ae(e,n);case 4:return t.p=4,ot.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)}}(),se=function(){if(it.value){var t="".concat(nt.value,"-").concat(it.value.id);st.value[t]=(0,d.A)({},at.value);var e=(0,d.A)((0,d.A)({},it.value),{},{userParams:(0,d.A)({},at.value)});ae(e,nt.value)}et.value=!1,it.value=null,nt.value=""},le=function(){ce(),et.value=!1,setTimeout(function(){it.value=null,nt.value=""},100)},ce=function(){if(it.value&&nt.value){var t="".concat(nt.value,"-").concat(it.value.id);st.value[t]=JSON.parse(JSON.stringify(at.value))}},ue=function(){ce()},de=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 r=re.value.parsePythonStrategy(e);if(!r)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var a={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:r,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)({},a),{},{params:(0,d.A)({},r.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"))},he=function(){dt.value=null,ut.value=!0},pe=function(t){dt.value=t,ut.value=!0},fe=function(){lt.value=!lt.value},ve=function(t){a.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 r,a,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,f.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(r=e.v,1!==r.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),a="custom-"+t.id,ee(a)&&Jt(a),e.n=2,ne();case 2:e.n=4;break;case 3:u.A.error(r.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 r(){return e.apply(this,arguments)}return r}()})},ge=function(t){pt.value=(0,d.A)({},t),ht.value=!0},me=function(t){vt.value=(0,d.A)({},t),ft.value=!0},ye=function(t){mt.value=t,gt.value=!0},be=function(t){bt.value=(0,d.A)({},t),wt.value=t.pricing_type||"free",Ct.value=t.price||10,St.value=t.description||"",kt.value=!!t.vip_free,yt.value=!0},xe=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:St.value,publishToCommunity:!0,pricingType:wt.value,price:"paid"===wt.value?Ct.value:0,vipFree:"paid"===wt.value&&kt.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),yt.value=!1,bt.value=null,t.n=4,ne();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,r=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(r.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)}}(),_e=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 _t.value=!0,t.p=2,t.n=3,(0,f.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")),yt.value=!1,bt.value=null,t.n=4,ne();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,_t.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),we=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var r,a,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 r=i.$refs.indicatorEditor,r&&(r.saving=!0),t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(a=t.v,1!==a.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),ut.value=!1,dt.value=null,t.n=4,ne();case 4:t.n=6;break;case 5:u.A.error(a.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,r&&(r.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)}}(),Ce=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&&!S.value&&(S.value=P.value[0].value),S.value&&jt(S.value)):(E.value=null,k.value="",A.value=[],L.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return at.value},function(t){if(et.value&&it.value&&nt.value){var e="".concat(nt.value,"-").concat(it.value.id);st.value[e]=JSON.parse(JSON.stringify(t))}},{deep:!0,immediate:!1}),(0,h.wB)(et,function(t){t||ce()}),{userId:n,klineChart:re,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:x,symbolSearchOpen:_,currentSymbol:H,currentMarket:V,currentPrice:K,priceChange:Y,priceChangeClass:X,timeframe:U,loadingWatchlist:b,activeIndicators:G,trendIndicators:Et,oscillatorIndicators:Dt,customIndicators:J,purchasedIndicators:Q,loadingIndicators:tt,realtimeEnabled:Tt,toggleRealtime:Me,handleSymbolSearch:Nt,handleSymbolSelect:zt,handleDropdownVisibleChange:Ot,filterSymbolOption:Wt,getMarketName:Te,getMarketColor:Ie,setTimeframe:Pt,addIndicator:Zt,removeIndicator:Jt,isIndicatorActive:ee,loadIndicators:ne,addPythonIndicator:ae,toggleIndicator:oe,getIndicatorStatus:Ce,getIndicatorStatusIcon:Se,getIndicatorStatusClass:ke,getExpiryTimeText:Ae,formatParams:Lt,loadWatchlist:Ft,getCustomActiveIndicators:ie,showIndicatorEditor:ut,editingIndicator:dt,handleCreateIndicator:he,handleRunIndicator:de,handleSaveIndicator:we,handleEditIndicator:pe,handleDeleteIndicator:ve,toggleCustomSection:fe,customSectionCollapsed:lt,purchasedSectionCollapsed:ct,handlePriceChange:It,handleChartRetry:Mt,handleIndicatorToggle:Qt,showParamsModal:et,pendingIndicator:it,indicatorParams:rt,indicatorParamValues:at,loadingParams:ot,confirmIndicatorParams:se,cancelIndicatorParams:le,handleParamsModalAfterClose:ue,showBacktestModal:ht,backtestIndicator:pt,handleOpenBacktest:ge,showBacktestHistoryDrawer:ft,backtestHistoryIndicator:vt,handleOpenBacktestHistory:me,showBacktestRunViewer:gt,selectedBacktestRun:mt,handleViewBacktestRun:ye,showPublishModal:yt,publishIndicator:bt,publishing:xt,unpublishing:_t,publishPricingType:wt,publishPrice:Ct,publishDescription:St,publishVipFree:kt,publishRules:At,handlePublishIndicator:be,handleConfirmPublish:xe,handleUnpublish:_e,selectedSymbol:H,selectedMarket:V,selectedTimeframe:U,isMobile:j,showAddStockModal:w,addingStock:C,selectedMarketTab:S,symbolSearchKeyword:k,symbolSearchResults:A,searchingSymbols:T,hotSymbols:I,loadingHotSymbols:M,selectedSymbolForAdd:E,marketTypes:P,hasSearched:L,handleCloseAddStockModal:Ht,handleMarketTabChange:Vt,handleSymbolSearchInput:Kt,handleSearchOrInput:Yt,searchSymbolsInModal:Xt,selectSymbol:Gt,loadHotSymbols:jt,handleAddStock:qt,handleDirectAdd:Ut,loadMarketTypes:$t,showQuickTrade:R,qtSymbol:F,qtSide:B,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:W,goToIndicatorMarket:$}}},oa=aa,sa=(0,T.A)(oa,n,r,!1,null,"1895bd90",null),la=sa.exports},38454:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e}(),t.mode.ECB})},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,r=i.WordArray,a=e.algo,o=a.MD5,s=a.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,a=n.hasher.create(),o=r.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.length>>8^255&r^99,a[i]=r,o[r]=i;var v=t[i],g=t[v],m=t[g],y=257*t[r]^16843008*r;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*v^16843008*i;d[r]=y<<24|y>>>8,h[r]=y<<16|y>>>16,p[r]=y<<8|y>>>24,f[r]=y,i?(i=v^t[t[t[m^v]]],n^=t[t[n]]):i=n=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],g=r.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,r=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u]):(u=u<<8|u>>>24,u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u],u^=v[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[a[u>>>16&255]]^p[a[u>>>8&255]]^f[a[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,a)},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,f,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,r,a,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,f=1;f>>24]^r[u>>>16&255]^a[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^r[d>>>16&255]^a[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^r[h>>>16&255]^a[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^r[c>>>16&255]^a[u>>>8&255]^o[255&d]^i[p++];c=v,u=g,d=m,h=y}v=(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]=v,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},42073:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.AnsiX923={pad:function(t,e){var i=t.sigBytes,n=4*e,r=n-i%n,a=i+r-1;t.clamp(),t.words[a>>>2]|=r<<24-a%4*8,t.sigBytes+=r},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923})},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,r=e.algo;const a=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,r=e>>8&255,a=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][r],o+=t.sbox[3][a],o}function u(t,e,i){let n,r=e,o=i;for(let s=0;s1;--s)r^=t.pbox[s],o=c(t,r)^o,n=r,r=o,o=n;return n=r,r=o,o=n,o^=t.pbox[1],r^=t.pbox[0],{left:r,right:o}}function h(t,e,i){for(let a=0;a<4;a++){t.sbox[a]=[];for(let e=0;e<256;e++)t.sbox[a][e]=s[a][e]}let n=0;for(let s=0;s=i&&(n=0);let r=0,l=0,c=0;for(let o=0;o>>31}var d=(n<<5|n>>>27)+l+o[c];d+=c<20?1518500249+(r&a|~r&s):c<40?1859775393+(r^a^s):c<60?(r&a|r&s|a&s)-1894007588:(r^a^s)-899497514,l=s,s=a,a=r<<30|r>>>2,r=n,n=d}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+s|0,i[4]=i[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(i/4294967296),e[15+(n+64>>>9<<4)]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s)}(),t.SHA1})},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,r=e.enc;r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=t.charCodeAt(r)<<16-r%2*16;return n.create(i,2*e)}};function a(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=a(t.charCodeAt(r)<<16-r%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},45953:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.x64,s=o.Word,l=i.algo,c=[],u=[],d=[];(function(){for(var t=1,e=0,i=0;i<24;i++){c[t+5*e]=(i+1)*(i+2)/2%64;var n=e%5,r=(2*t+3*e)%5;t=n,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var a=1,o=0;o<24;o++){for(var l=0,h=0,p=0;p<7;p++){if(1&a){var f=(1<>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);var s=i[r];s.high^=o,s.low^=a}for(var l=0;l<24;l++){for(var p=0;p<5;p++){for(var f=0,v=0,g=0;g<5;g++){s=i[p+5*g];f^=s.high,v^=s.low}var m=h[p];m.high=f,m.low=v}for(p=0;p<5;p++){var y=h[(p+4)%5],b=h[(p+1)%5],x=b.high,_=b.low;for(f=y.high^(x<<1|_>>>31),v=y.low^(_<<1|x>>>31),g=0;g<5;g++){s=i[p+5*g];s.high^=f,s.low^=v}}for(var w=1;w<25;w++){s=i[w];var C=s.high,S=s.low,k=c[w];k<32?(f=C<>>32-k,v=S<>>32-k):(f=S<>>64-k,v=C<>>64-k);var A=h[u[w]];A.high=f,A.low=v}var T=h[0],I=i[0];T.high=I.high,T.low=I.low;for(p=0;p<5;p++)for(g=0;g<5;g++){w=p+5*g,s=i[w];var M=h[w],E=h[(p+1)%5+5*g],D=h[(p+2)%5+5*g];s.high=M.high^~E.high&D.high,s.low=M.low^~E.low&D.low}s=i[0];var P=d[l];s.high^=P.high,s.low^=P.low}},_doFinalize:function(){var t=this._data,i=t.words,n=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;i[n>>>5]|=1<<24-n%32,i[(e.ceil((n+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*i.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new r.init(c,s)},clone:function(){for(var t=a.clone.call(this),e=t._state=this._state.slice(0),i=0;i<25;i++)e[i]=e[i].clone();return t}});i.SHA3=a._createHelper(p),i.HmacSHA3=a._createHmacHelper(p)}(Math),t.SHA3})},50436:function(t,e,i){(function(t){t(i(15237))})(function(t){"use strict";var e="CodeMirror-activeline",i="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function r(t){for(var r=0;rn&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),o=this._iKey=e.clone(),s=r.words,l=o.words,c=0;c=0;i--)if(e[i>>>2]>>>24-i%4*8&255){t.sigBytes=i+1;break}}},t.pad.ZeroPadding})},54905:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso10126={pad:function(e,i){var n=4*i,r=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(r-1)).concat(t.lib.WordArray.create([r<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126})},55218:function(t,e,i){(function(t){t(i(15237))})(function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},i=t.Pos;function n(t,i){return"pairs"==i&&"string"==typeof t?t:"object"==typeof t&&null!=t[i]?t[i]:e[i]}t.defineOption("autoCloseBrackets",!1,function(e,i,o){o&&o!=t.Init&&(e.removeKeyMap(r),e.state.closeBrackets=null),i&&(a(n(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(r))});var r={Backspace:l,Enter:c};function a(t){for(var e=0;e=0;l--){var u=o[l].head;e.replaceRange("",i(u.line,u.ch-1),i(u.line,u.ch+1),"+delete")}}function c(e){var i=s(e),r=i&&n(i,"explode");if(!r||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),o=0;o0?{line:o.head.line,ch:o.head.ch+e}:{line:o.head.line-1};i.push({anchor:s,head:s})}t.setSelections(i,r)}function d(e){var n=t.cmpPos(e.anchor,e.head)>0;return{anchor:new i(e.anchor.line,e.anchor.ch+(n?-1:1)),head:new i(e.head.line,e.head.ch+(n?1:-1))}}function h(e,r){var a=s(e);if(!a||e.getOption("disableInput"))return t.Pass;var o=n(a,"pairs"),l=o.indexOf(r);if(-1==l)return t.Pass;for(var c,h=n(a,"closeBefore"),p=n(a,"triples"),v=o.charAt(l+1)==r,g=e.listSelections(),m=l%2==0,y=0;y1&&p.indexOf(r)>=0&&e.getRange(i(_.line,_.ch-2),_)==r+r){if(_.ch>2&&/\bstring/.test(e.getTokenTypeAt(i(_.line,_.ch-2))))return t.Pass;b="addFour"}else if(v){var C=0==_.ch?" ":e.getRange(i(_.line,_.ch-1),_);if(t.isWordChar(w)||C==r||t.isWordChar(C))return t.Pass;b="both"}else{if(!m||!(0===w.length||/\s/.test(w)||h.indexOf(w)>-1))return t.Pass;b="both"}else b=v&&f(e,_)?"both":p.indexOf(r)>=0&&e.getRange(_,i(_.line,_.ch+3))==r+r+r?"skipThree":"skip";if(c){if(c!=b)return t.Pass}else c=b}var S=l%2?o.charAt(l-1):r,k=l%2?r:o.charAt(l+1);e.operation(function(){if("skip"==c)u(e,1);else if("skipThree"==c)u(e,3);else if("surround"==c){for(var t=e.getSelections(),i=0;i>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:f,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=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},b=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?a.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=a.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},x=n.SerializableCipher=r.extend({cfg:r.extend({format:b}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=t.createEncryptor(i,n),a=r.finalize(e),o=r.cfg;return m.create({ciphertext:a,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 r=t.createDecryptor(i,n).finalize(e.ciphertext);return r},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),_=i.kdf={},w=_.OpenSSL={execute:function(t,e,i,n,r){if(n||(n=a.random(8)),r)o=u.create({keySize:e+i,hasher:r}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=a.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},C=n.PasswordBasedCipher=x.extend({cfg:x.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=r.iv;var a=x.encrypt.call(this,t,e,r.key,n);return a.mixIn(r),a},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var r=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=r.iv;var a=x.decrypt.call(this,t,e,r.key,n);return a}})}()})},58124:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})},63009:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.algo,s=[],l=[];(function(){function t(t){for(var i=e.sqrt(t),n=2;n<=i;n++)if(!(t%n))return!1;return!0}function i(t){return 4294967296*(t-(0|t))|0}var n=2,r=0;while(r<64)t(n)&&(r<8&&(s[r]=i(e.pow(n,.5))),l[r]=i(e.pow(n,1/3)),r++),n++})();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],u=i[5],d=i[6],h=i[7],p=0;p<64;p++){if(p<16)c[p]=0|t[e+p];else{var f=c[p-15],v=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[p-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=v+c[p-7]+m+c[p-16]}var y=s&u^~s&d,b=n&r^n&a^r&a,x=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),_=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),w=h+_+y+l[p]+c[p],C=x+b;h=d,d=u,u=s,s=o+w|0,o=a,a=r,r=n,n=w+C|0}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+s|0,i[5]=i[5]+u|0,i[6]=i[6]+d|0,i[7]=i[7]+h|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=e.floor(n/4294967296),i[15+(r+64>>>9<<4)]=n,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=a._createHelper(u),i.HmacSHA256=a._createHmacHelper(u)}(Math),t.SHA256})},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,r=e.enc;r.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,r=e?this._safe_map:this._map;t.clamp();for(var a=[],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=r.charAt(64);if(h)while(a.length%4)a.push(h);return a.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64url})},70019:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,r=i.WordArray,a=e.algo,o=a.SHA256,s=a.HMAC,l=a.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i=this.cfg,n=s.create(i.hasher,t),a=r.create(),o=r.create([1]),l=a.words,c=o.words,u=i.keySize,d=i.iterations;while(l.length=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;dn?S(e):r0&&A(t,e)&&(o+=" "+l),o}return _(t,e)}function _(t,e,n){if(t.eatSpace())return null;if(!n&&t.match(/^#.*/))return"comment";if(t.match(/^[0-9\.]/,!1)){var r=!1;if(t.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),t.match(/^[\d_]+\.\d*/)&&(r=!0),t.match(/^\.\d+/)&&(r=!0),r)return t.eat(/J/i),"number";var a=!1;if(t.match(/^0x[0-9a-f_]+/i)&&(a=!0),t.match(/^0b[01_]+/i)&&(a=!0),t.match(/^0o[0-7_]+/i)&&(a=!0),t.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(t.eat(/J/i),a=!0),t.match(/^0(?![\dx])/i)&&(a=!0),a)return t.eat(/L/i),"number"}if(t.match(m)){var o=-1!==t.current().toLowerCase().indexOf("f");return o?(e.tokenize=w(t.current(),e.tokenize),e.tokenize(t,e)):(e.tokenize=C(t.current(),e.tokenize),e.tokenize(t,e))}for(var s=0;s=0)t=t.substr(1);var i=1==t.length,n="string";function r(t){return function(e,i){var n=_(e,i,!0);return"punctuation"==n&&("{"==e.current()?i.tokenize=r(t+1):"}"==e.current()&&(i.tokenize=t>1?r(t-1):a)),n}}function a(a,o){while(!a.eol())if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),i&&a.eol())return n}else{if(a.match(t))return o.tokenize=e,n;if(a.match("{{"))return n;if(a.match("{",!1))return o.tokenize=r(0),a.current()?n:o.tokenize(a,o);if(a.match("}}"))return n;if(a.match("}"))return l;a.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;o.tokenize=e}return n}return a.isString=!0,a}function C(t,e){while("rubf".indexOf(t.charAt(0).toLowerCase())>=0)t=t.substr(1);var i=1==t.length,n="string";function r(r,a){while(!r.eol())if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),i&&r.eol())return n}else{if(r.match(t))return a.tokenize=e,n;r.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;a.tokenize=e}return n}return r.isString=!0,r}function S(t){while("py"!=a(t).type)t.scopes.pop();t.scopes.push({offset:a(t).offset+o.indentUnit,type:"py",align:null})}function k(t,e,i){var n=t.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:t.column()+1;e.scopes.push({offset:e.indent+h,type:i,align:n})}function A(t,e){var i=t.indentation();while(e.scopes.length>1&&a(e).offset>i){if("py"!=a(e).type)return!0;e.scopes.pop()}return a(e).offset!=i}function T(t,e){t.sol()&&(e.beginningOfLine=!0,e.dedent=!1);var i=e.tokenize(t,e),n=t.current();if(e.beginningOfLine&&"@"==n)return t.match(g,!1)?"meta":v?"operator":l;if(/\S/.test(n)&&(e.beginningOfLine=!1),"variable"!=i&&"builtin"!=i||"meta"!=e.lastToken||(i="meta"),"pass"!=n&&"return"!=n||(e.dedent=!0),"lambda"==n&&(e.lambda=!0),":"==n&&!e.lambda&&"py"==a(e).type&&t.match(/^\s*(?:#|$)/,!1)&&S(e),1==n.length&&!/string|comment/.test(i)){var r="[({".indexOf(n);if(-1!=r&&k(t,e,"])}".slice(r,r+1)),r="])}".indexOf(n),-1!=r){if(a(e).type!=n)return l;e.indent=e.scopes.pop().offset-h}}return e.dedent&&t.eol()&&"py"==a(e).type&&e.scopes.length>1&&e.scopes.pop(),i}var I={startState:function(t){return{tokenize:x,scopes:[{offset:t||0,type:"py",align:null}],indent:t||0,lastToken:null,lambda:!1,dedent:0}},token:function(t,e){var i=e.errorToken;i&&(e.errorToken=!1);var n=T(t,e);return n&&"comment"!=n&&(e.lastToken="keyword"==n||"punctuation"==n?t.current():n),"punctuation"==n&&(n=null),t.eol()&&e.lambda&&(e.lambda=!1),i?n+" "+l:n},indent:function(e,i){if(e.tokenize!=x)return e.tokenize.isString?t.Pass:0;var n=a(e),r=n.type==i.charAt(0)||"py"==n.type&&!e.dedent&&/^(else:|elif |except |finally:)/.test(i);return null!=n.align?n.align-(r?1:0):n.offset-(r?h:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return I}),t.defineMIME("text/x-python","python");var o=function(t){return t.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:o("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})},77193: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.StreamCipher,r=e.algo,a=r.RC4=n.extend({_doReset:function(){for(var t=this._key,e=t.words,i=t.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var a=0;r<256;r++){var o=r%i,s=e[o>>>2]>>>24-o%4*8&255;a=(a+n[r]+s)%256;var l=n[r];n[r]=n[a],n[a]=l}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,i=this._j,n=0,r=0;r<4;r++){e=(e+1)%256,i=(i+t[e])%256;var a=t[e];t[e]=t[i],t[i]=a,n|=t[(t[e]+t[i])%256]<<24-8*r}return this._i=e,this._j=i,n}e.RC4=n._createHelper(a);var s=r.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});e.RC4Drop=n._createHelper(s)}(),t.RC4})},78056:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){ -/** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -return function(){var e=t,i=e.lib,n=i.WordArray,r=i.Hasher,a=e.algo,o=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,r=t[n];t[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a,h,b,x,_,w,C,S,k,A,T,I=this._hash.words,M=u.words,E=d.words,D=o.words,P=s.words,L=l.words,R=c.words;w=a=I[0],C=h=I[1],S=b=I[2],k=x=I[3],A=_=I[4];for(i=0;i<80;i+=1)T=a+t[e+D[i]]|0,T+=i<16?p(h,b,x)+M[0]:i<32?f(h,b,x)+M[1]:i<48?v(h,b,x)+M[2]:i<64?g(h,b,x)+M[3]:m(h,b,x)+M[4],T|=0,T=y(T,L[i]),T=T+_|0,a=_,_=x,x=y(b,10),b=h,h=T,T=w+t[e+P[i]]|0,T+=i<16?m(C,S,k)+E[0]:i<32?g(C,S,k)+E[1]:i<48?v(C,S,k)+E[2]:i<64?f(C,S,k)+E[3]:p(C,S,k)+E[4],T|=0,T=y(T,R[i]),T=T+A|0,w=A,A=k,k=y(S,10),S=C,C=T;T=I[1]+b+k|0,I[1]=I[2]+x+A|0,I[2]=I[3]+_+w|0,I[3]=I[4]+a+C|0,I[4]=I[0]+h+S|0,I[0]=T},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(e.length+1),this._process();for(var r=this._hash,a=r.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,i){return t^e^i}function f(t,e,i){return t&e|~t&i}function v(t,e,i){return(t|~e)^i}function g(t,e,i){return t&i|e&~i}function m(t,e,i){return t^(e|~i)}function y(t,e){return t<>>32-e}e.RIPEMD160=r._createHelper(h),e.HmacRIPEMD160=r._createHmacHelper(h)}(Math),t.RIPEMD160})},80754: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,r=e.enc;r.Base64={stringify:function(t){var e=t.words,i=t.sigBytes,n=this._map;t.clamp();for(var r=[],a=0;a>>2]>>>24-a%4*8&255,s=e[a+1>>>2]>>>24-(a+1)%4*8&255,l=e[a+2>>>2]>>>24-(a+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&a+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(r.length%4)r.push(d);return r.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var r=0;r>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64})},81380:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Hasher,r=e.x64,a=r.Word,o=r.WordArray,s=e.algo;function l(){return a.create.apply(a,arguments)}var c=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var t=0;t<80;t++)u[t]=l()})();var d=s.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],l=i[5],d=i[6],h=i[7],p=n.high,f=n.low,v=r.high,g=r.low,m=a.high,y=a.low,b=o.high,x=o.low,_=s.high,w=s.low,C=l.high,S=l.low,k=d.high,A=d.low,T=h.high,I=h.low,M=p,E=f,D=v,P=g,L=m,R=y,F=b,B=x,N=_,O=w,z=C,W=S,$=k,H=A,V=T,K=I,Y=0;Y<80;Y++){var X,U,G=u[Y];if(Y<16)U=G.high=0|t[e+2*Y],X=G.low=0|t[e+2*Y+1];else{var j=u[Y-15],q=j.high,Z=j.low,J=(q>>>1|Z<<31)^(q>>>8|Z<<24)^q>>>7,Q=(Z>>>1|q<<31)^(Z>>>8|q<<24)^(Z>>>7|q<<25),tt=u[Y-2],et=tt.high,it=tt.low,nt=(et>>>19|it<<13)^(et<<3|it>>>29)^et>>>6,rt=(it>>>19|et<<13)^(it<<3|et>>>29)^(it>>>6|et<<26),at=u[Y-7],ot=at.high,st=at.low,lt=u[Y-16],ct=lt.high,ut=lt.low;X=Q+st,U=J+ot+(X>>>0>>0?1:0),X+=rt,U=U+nt+(X>>>0>>0?1:0),X+=ut,U=U+ct+(X>>>0>>0?1:0),G.high=U,G.low=X}var dt=N&z^~N&$,ht=O&W^~O&H,pt=M&D^M&L^D&L,ft=E&P^E&R^P&R,vt=(M>>>28|E<<4)^(M<<30|E>>>2)^(M<<25|E>>>7),gt=(E>>>28|M<<4)^(E<<30|M>>>2)^(E<<25|M>>>7),mt=(N>>>14|O<<18)^(N>>>18|O<<14)^(N<<23|O>>>9),yt=(O>>>14|N<<18)^(O>>>18|N<<14)^(O<<23|N>>>9),bt=c[Y],xt=bt.high,_t=bt.low,wt=K+yt,Ct=V+mt+(wt>>>0>>0?1:0),St=(wt=wt+ht,Ct=Ct+dt+(wt>>>0>>0?1:0),wt=wt+_t,Ct=Ct+xt+(wt>>>0<_t>>>0?1:0),wt=wt+X,Ct=Ct+U+(wt>>>0>>0?1:0),gt+ft),kt=vt+pt+(St>>>0>>0?1:0);V=$,K=H,$=z,H=W,z=N,W=O,O=B+wt|0,N=F+Ct+(O>>>0>>0?1:0)|0,F=L,B=R,L=D,R=P,D=M,P=E,E=wt+St|0,M=Ct+kt+(E>>>0>>0?1:0)|0}f=n.low=f+E,n.high=p+M+(f>>>0>>0?1:0),g=r.low=g+P,r.high=v+D+(g>>>0

>>0?1:0),y=a.low=y+R,a.high=m+L+(y>>>0>>0?1:0),x=o.low=x+B,o.high=b+F+(x>>>0>>0?1:0),w=s.low=w+O,s.high=_+N+(w>>>0>>0?1:0),S=l.low=S+W,l.high=C+z+(S>>>0>>0?1:0),A=d.low=A+H,d.high=k+$+(A>>>0>>0?1:0),I=h.low=I+K,h.high=T+V+(I>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(i/4294967296),e[31+(n+128>>>10<<5)]=i,t.sigBytes=4*e.length,this._process();var r=this._hash.toX32();return r},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(d),e.HmacSHA512=n._createHmacHelper(d)}(),t.SHA512})},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 r,a=this._iv;a?(r=a.slice(0),this._iv=void 0):r=this._prevBlock,n.encryptBlock(r,0);for(var o=0;o>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],f=t[e+3],v=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],b=t[e+8],x=t[e+9],_=t[e+10],w=t[e+11],C=t[e+12],S=t[e+13],k=t[e+14],A=t[e+15],T=a[0],I=a[1],M=a[2],E=a[3];T=c(T,I,M,E,o,7,s[0]),E=c(E,T,I,M,l,12,s[1]),M=c(M,E,T,I,p,17,s[2]),I=c(I,M,E,T,f,22,s[3]),T=c(T,I,M,E,v,7,s[4]),E=c(E,T,I,M,g,12,s[5]),M=c(M,E,T,I,m,17,s[6]),I=c(I,M,E,T,y,22,s[7]),T=c(T,I,M,E,b,7,s[8]),E=c(E,T,I,M,x,12,s[9]),M=c(M,E,T,I,_,17,s[10]),I=c(I,M,E,T,w,22,s[11]),T=c(T,I,M,E,C,7,s[12]),E=c(E,T,I,M,S,12,s[13]),M=c(M,E,T,I,k,17,s[14]),I=c(I,M,E,T,A,22,s[15]),T=u(T,I,M,E,l,5,s[16]),E=u(E,T,I,M,m,9,s[17]),M=u(M,E,T,I,w,14,s[18]),I=u(I,M,E,T,o,20,s[19]),T=u(T,I,M,E,g,5,s[20]),E=u(E,T,I,M,_,9,s[21]),M=u(M,E,T,I,A,14,s[22]),I=u(I,M,E,T,v,20,s[23]),T=u(T,I,M,E,x,5,s[24]),E=u(E,T,I,M,k,9,s[25]),M=u(M,E,T,I,f,14,s[26]),I=u(I,M,E,T,b,20,s[27]),T=u(T,I,M,E,S,5,s[28]),E=u(E,T,I,M,p,9,s[29]),M=u(M,E,T,I,y,14,s[30]),I=u(I,M,E,T,C,20,s[31]),T=d(T,I,M,E,g,4,s[32]),E=d(E,T,I,M,b,11,s[33]),M=d(M,E,T,I,w,16,s[34]),I=d(I,M,E,T,k,23,s[35]),T=d(T,I,M,E,l,4,s[36]),E=d(E,T,I,M,v,11,s[37]),M=d(M,E,T,I,y,16,s[38]),I=d(I,M,E,T,_,23,s[39]),T=d(T,I,M,E,S,4,s[40]),E=d(E,T,I,M,o,11,s[41]),M=d(M,E,T,I,f,16,s[42]),I=d(I,M,E,T,m,23,s[43]),T=d(T,I,M,E,x,4,s[44]),E=d(E,T,I,M,C,11,s[45]),M=d(M,E,T,I,A,16,s[46]),I=d(I,M,E,T,p,23,s[47]),T=h(T,I,M,E,o,6,s[48]),E=h(E,T,I,M,y,10,s[49]),M=h(M,E,T,I,k,15,s[50]),I=h(I,M,E,T,g,21,s[51]),T=h(T,I,M,E,C,6,s[52]),E=h(E,T,I,M,f,10,s[53]),M=h(M,E,T,I,_,15,s[54]),I=h(I,M,E,T,l,21,s[55]),T=h(T,I,M,E,b,6,s[56]),E=h(E,T,I,M,A,10,s[57]),M=h(M,E,T,I,m,15,s[58]),I=h(I,M,E,T,S,21,s[59]),T=h(T,I,M,E,v,6,s[60]),E=h(E,T,I,M,w,10,s[61]),M=h(M,E,T,I,p,15,s[62]),I=h(I,M,E,T,x,21,s[63]),a[0]=a[0]+T|0,a[1]=a[1]+I|0,a[2]=a[2]+M|0,a[3]=a[3]+E|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32;var a=e.floor(n/4294967296),o=n;i[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(r+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=a.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,r,a,o){var s=t+(e&i|~e&n)+r+o;return(s<>>32-a)+e}function u(t,e,i,n,r,a,o){var s=t+(e&n|i&~n)+r+o;return(s<>>32-a)+e}function d(t,e,i,n,r,a,o){var s=t+(e^i^n)+r+o;return(s<>>32-a)+e}function h(t,e,i,n,r,a,o){var s=t+(i^(e|~n))+r+o;return(s<>>32-a)+e}i.MD5=a._createHelper(l),i.HmacMD5=a._createHmacHelper(l)}(Math),t.MD5})},89557:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240),i(81380))})(0,function(t){return function(){var e=t,i=e.x64,n=i.Word,r=i.WordArray,a=e.algo,o=a.SHA512,s=a.SHA384=o.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=o._createHelper(s),e.HmacSHA384=o._createHmacHelper(s)}(),t.SHA384})},96298: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.StreamCipher,r=e.algo,a=[],o=[],s=[],l=r.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;r[0]^=l,r[1]^=d,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=d,r[6]^=u,r[7]^=h;for(i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=n._createHelper(l)}(),t.Rabbit})},96939:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CTR=function(){var e=t.lib.BlockCipherMode.extend(),i=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0);var o=a.slice(0);i.encryptBlock(o,0),a[n-1]=a[n-1]+1|0;for(var s=0;s",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function r(t){return t&&t.bracketRegex||/[(){}[\]]/}function a(t,e,a){var s=t.getLineHandle(e.line),l=e.ch-1,c=a&&a.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var u=r(a),d=!c&&l>=0&&u.test(s.text.charAt(l))&&n[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&n[s.text.charAt(++l)];if(!d)return null;var h=">"==d.charAt(1)?1:-1;if(a&&a.strict&&h>0!=(l==e.ch))return null;var p=t.getTokenTypeAt(i(e.line,l+1)),f=o(t,i(e.line,l+(h>0?1:0)),h,p,a);return null==f?null:{from:i(e.line,l),to:f&&f.pos,match:f&&f.ch==d.charAt(0),forward:h>0}}function o(t,e,a,o,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=r(s),h=a>0?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),p=e.line;p!=h;p+=a){var f=t.getLine(p);if(f){var v=a>0?0:f.length-1,g=a>0?f.length:-1;if(!(f.length>l))for(p==e.line&&(v=e.ch-(a<0?1:0));v!=g;v+=a){var m=f.charAt(v);if(d.test(m)&&(void 0===o||(t.getTokenTypeAt(i(p,v+1))||"")==(o||""))){var y=n[m];if(y&&">"==y.charAt(1)==a>0)u.push(m);else{if(!u.length)return{pos:i(p,v),ch:m};u.pop()}}}}}return p-a!=(a>0?t.lastLine():t.firstLine())&&null}function s(t,n,r){for(var o=t.state.matchBrackets.maxHighlightLineLength||1e3,s=r&&r.highlightNonMatching,l=[],c=t.listSelections(),u=0;u0?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("div",{staticClass:"qt-section-header"},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("quickTrade.recentTrades"))+" ")],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)]):t._e()],1)},s=[],r=a(81127),n=a(56252),c=a(76338),l=a(95353),o=a(42430),d=a(75769);function u(t){return(0,d.Ay)({url:"/api/quick-trade/place-order",method:"post",data:t})}function p(t){return(0,d.Ay)({url:"/api/quick-trade/balance",method:"get",params:t})}function m(t){return(0,d.Ay)({url:"/api/quick-trade/position",method:"get",params:t})}function v(t){return(0,d.Ay)({url:"/api/quick-trade/history",method:"get",params:t})}function h(t){return(0,d.Ay)({url:"/api/quick-trade/close-position",method:"post",data:t})}var b={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:[],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.symbol&&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.selectedCredentialId&&this.loadPosition()},selectedCredentialId:function(t){t&&this.symbol&&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,r.A)().m(function e(){return(0,r.A)().w(function(e){while(1)switch(e.n){case 0:return t.presetSide&&(t.side=t.presetSide),t.presetPrice>0&&(t.currentPrice=t.presetPrice,t.limitPrice=t.presetPrice),e.n=1,t.loadCredentials();case 1:if(!t.selectedCredentialId||!t.symbol){e.n=2;break}return e.n=2,t.loadPosition();case 2:t.loadHistory(),t.startPolling();case 3:return e.a(2)}},e)}))()},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]])}))()},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;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 e.p=1,e.n=2,p({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,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.symbol){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,m({credential_id:t.selectedCredentialId,symbol:t.symbol,market_type:t.marketType});case 2:a=e.v,1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0?t.currentPosition=a.data.positions[0]:t.currentPosition=null,e.n=4;break;case 3:e.p=3,e.v,t.currentPosition=null;case 4:return e.a(2)}},e,null,[[1,3]])}))()},loadHistory: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:return e.p=0,e.n=1,v({limit:5});case 1:a=e.v,1===a.code&&a.data&&(t.recentTrades=a.data.trades||[]),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},setAmountByPercent:function(t){this.balance.available>0&&(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.symbol,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,u(a);case 3:if(i=e.v,1!==i.code){e.n=7;break}return t.$message.success(t.$t("quickTrade.orderSuccess")),t.$emit("order-success",i.data),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadPosition();case 5:return e.n=6,t.loadHistory();case 6:i.data&&i.data.exchange_order_id&&setTimeout(function(){t.loadPosition()},2e3),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.symbol,market_type:t.marketType,size:0,source:"manual"},e.n=3,h(a);case 3:i=e.v,1===i.code?(t.$message.success(t.$t("quickTrade.positionClosed")),t.currentPosition=null,t.loadBalance(),t.loadPosition(),t.loadHistory()):t.$message.error(i.msg||t.$t("quickTrade.orderFailed")),e.n=5;break;case 4:e.p=4,s=e.v,t.$message.error(s.message||t.$t("quickTrade.orderFailed"));case 5:return e.p=5,t.closingPosition=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},startPolling:function(){var t=this;this.stopPolling(),this.pollTimer=setInterval(function(){t.selectedCredentialId&&(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)},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()}},f=b,g=a(81656),_=(0,g.A)(f,i,s,!1,null,"0f7d87dc",null),k=_.exports},42430:function(t,e,a){a.d(e,{IA:function(){return n},PR:function(){return c},kI:function(){return l}});var i=a(76338),s=a(75769),r={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete"};function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.Ay)({url:r.list,method:"get",params:t})}function c(t){return(0,s.Ay)({url:r.create,method:"post",data:t})}function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.Ay)({url:r.delete,method:"delete",params:(0,i.A)({id:t},e)})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/346-legacy.7ad5baed.js b/frontend/dist/js/346-legacy.7ad5baed.js new file mode 100644 index 0000000..457019e --- /dev/null +++ b/frontend/dist/js/346-legacy.7ad5baed.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[346],{30009:function(t,a,e){e.r(a),e.d(a,{default:function(){return k}});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:"opp-section"},[a("div",{staticClass:"opp-header"},[a("span",{staticClass:"opp-title"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.title")))],1),a("span",{staticClass:"opp-header-right"},[a("span",{staticClass:"opp-update-hint"},[a("a-icon",{attrs:{type:"clock-circle"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.updateHint"))+" ")],1),a("a-button",{attrs:{type:"link",size:"small",icon:"reload",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[t._v(" "+t._s(t.$t("common.refresh")||"刷新")+" ")])],1)]),a("div",{staticClass:"opp-carousel-wrapper",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"opp-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(e,s){return a("div",{key:"opp-"+s,staticClass:"opp-card",class:[e.impact,"market-"+(e.market||"").toLowerCase()],on:{click:function(a){return t.analyzeOpportunity(e)}}},[a("div",{staticClass:"opp-top"},[a("span",{staticClass:"opp-symbol"},[t._v(t._s(e.symbol))]),a("a-tag",{staticClass:"opp-market-tag",attrs:{color:t.getMarketTagColor(e.market),size:"small"}},[t._v(" "+t._s(t.getMarketLabel(e.market))+" ")])],1),a("div",{staticClass:"opp-price"},[t._v("$"+t._s(t.formatOppPrice(e.price)))]),a("div",{staticClass:"opp-change",class:e.change_24h>=0?"up":"down"},[t._v(" "+t._s(e.change_24h>=0?"+":"")+t._s((e.change_24h||0).toFixed(1))+"% ")]),a("div",{staticClass:"opp-signal"},[a("a-tag",{attrs:{color:t.getSignalColor(e.signal),size:"small"}},[t._v(t._s(t.getSignalLabel(e.signal)))])],1),a("div",{staticClass:"opp-reason"},[t._v(t._s(t.getReasonText(e)))]),a("div",{staticClass:"opp-actions"},[a("span",{staticClass:"opp-action",on:{click:function(a){return a.stopPropagation(),t.analyzeOpportunity(e)}}},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.analyze"))+" ")],1),"Crypto"===e.market?a("span",{staticClass:"opp-trade-btn",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:"monitor"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"eye"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.monitor"))+" ")],1),a("div",{staticClass:"tab-body"},["monitor"===t.activeTab?a("PortfolioView",{attrs:{embedded:!0}}):t._e()],1)])],1)],1)],1)},i=[],o=e(81127),n=e(56252),r=e(2403),c=e(76338),l=(e(28706),e(74423),e(34782),e(27495),e(21699),e(25440),e(95353)),p=e(91950),u=e(21494),d=e(44146),h=e(38362),y={name:"AIAssetAnalysis",components:{AnalysisView:p["default"],PortfolioView:u["default"],QuickTradePanel:h.A},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:""}},computed:(0,c.A)((0,c.A)({},(0,l.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,r.A)(this.opportunities),(0,r.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,n.A)((0,o.A)().m(function e(){var s,i,n;return(0,o.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:n=e.v,n&&1===n.code&&Array.isArray(n.data)&&(a.opportunities=n.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"};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 o=Math.abs(t.change_24h||0).toFixed(1),n=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",o).replace("{change7d}",n)},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;this.activeTab="quick";var e=t.market||"Crypto";this.presetSymbol="".concat(e,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},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)}}},m=y,b=e(81656),v=(0,b.A)(m,s,i,!1,null,"3b2ffb77",null),k=v.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/362-legacy.20fd3e98.js b/frontend/dist/js/362-legacy.20fd3e98.js new file mode 100644 index 0000000..9eb7357 --- /dev/null +++ b/frontend/dist/js/362-legacy.20fd3e98.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[362],{38362:function(e,t,a){a.d(t,{A:function(){return P}});a(62010),a(27495),a(25440);var i=function(){var e=this,t=e._self._c;return t("a-drawer",{staticClass:"quick-trade-drawer",class:{"theme-dark":e.isDark},attrs:{title:null,width:380,visible:e.visible,closable:!1,bodyStyle:{padding:0},maskStyle:{background:"rgba(0,0,0,0.45)"}},on:{close:e.handleClose}},[t("div",{staticClass:"qt-header"},[t("div",{staticClass:"qt-header-left"},[t("a-icon",{staticClass:"qt-icon",attrs:{type:"thunderbolt",theme:"filled"}}),t("span",{staticClass:"qt-header-title"},[e._v(e._s(e.$t("quickTrade.title")))])],1),t("a-icon",{staticClass:"qt-close",attrs:{type:"close"},on:{click:e.handleClose}})],1),t("div",{staticClass:"qt-symbol-bar"},[t("div",{staticClass:"qt-symbol-selector"},[t("a-select",{staticStyle:{width:"100%"},attrs:{"show-search":"",placeholder:e.$t("quickTrade.selectSymbol"),"filter-option":!1,"not-found-content":e.symbolSearching?null:void 0,loading:e.symbolSearching},on:{search:e.handleSymbolSearch,change:e.handleSymbolChange,focus:e.handleSymbolFocus},model:{value:e.currentSymbol,callback:function(t){e.currentSymbol=t},expression:"currentSymbol"}},[t("a-icon",{staticStyle:{color:"#999"},attrs:{slot:"suffixIcon",type:"search"},slot:"suffixIcon"}),e._l(e.symbolSuggestions,function(a){return t("a-select-option",{key:a.value,attrs:{value:a.value}},[t("div",{staticClass:"qt-symbol-option"},[t("span",{staticClass:"qt-symbol-option-name"},[e._v(e._s(a.symbol))]),a.name?t("span",{staticClass:"qt-symbol-option-desc"},[e._v(e._s(a.name))]):e._e()])])})],2)],1),t("div",{staticClass:"qt-price-display",class:e.priceChangeClass},[t("span",{staticClass:"qt-current-price"},[e._v("$"+e._s(e.formatPrice(e.currentPrice)))])])]),t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.exchange"))+" "),t("span",{staticClass:"qt-crypto-hint"},[e._v(e._s(e.$t("quickTrade.cryptoOnly")))])]),t("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("quickTrade.selectExchange"),loading:e.credLoading,notFoundContent:e.$t("quickTrade.noExchange")},on:{change:e.onCredentialChange},model:{value:e.selectedCredentialId,callback:function(t){e.selectedCredentialId=t},expression:"selectedCredentialId"}},e._l(e.credentials,function(a){return t("a-select-option",{key:a.id,attrs:{value:a.id}},[t("span",{staticStyle:{"text-transform":"capitalize"}},[e._v(e._s(a.exchange_id||a.name))]),a.market_type?t("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{size:"small"}},[e._v(e._s(a.market_type))]):e._e()],1)}),1),e.balance.available>0?t("div",{staticClass:"qt-balance"},[t("span",{staticClass:"qt-balance-label"},[e._v(e._s(e.$t("quickTrade.available"))+":")]),t("span",{staticClass:"qt-balance-value"},[e._v("$"+e._s(e.formatPrice(e.balance.available)))])]):e._e()],1),t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-direction-toggle"},[t("div",{staticClass:"qt-dir-btn qt-dir-long",class:{active:"buy"===e.side},on:{click:function(t){e.side="buy"}}},[t("a-icon",{attrs:{type:"arrow-up"}}),e._v(" "+e._s(e.$t("quickTrade.long"))+" ")],1),t("div",{staticClass:"qt-dir-btn qt-dir-short",class:{active:"sell"===e.side},on:{click:function(t){e.side="sell"}}},[t("a-icon",{attrs:{type:"arrow-down"}}),e._v(" "+e._s(e.$t("quickTrade.short"))+" ")],1)])]),t("div",{staticClass:"qt-section"},[t("a-radio-group",{staticStyle:{width:"100%"},attrs:{"button-style":"solid",size:"small"},model:{value:e.orderType,callback:function(t){e.orderType=t},expression:"orderType"}},[t("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"market"}},[e._v(" "+e._s(e.$t("quickTrade.market"))+" ")]),t("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"limit"}},[e._v(" "+e._s(e.$t("quickTrade.limit"))+" ")])],1)],1),"limit"===e.orderType?t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.limitPrice")))]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:e.priceStep,precision:e.pricePrecision,placeholder:e.$t("quickTrade.enterPrice")},model:{value:e.limitPrice,callback:function(t){e.limitPrice=t},expression:"limitPrice"}})],1):e._e(),t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.amount"))+" (USDT)")]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,step:10,precision:2,placeholder:e.$t("quickTrade.enterAmount")},model:{value:e.amount,callback:function(t){e.amount=t},expression:"amount"}}),t("div",{staticClass:"qt-quick-amounts"},e._l(e.quickAmountPcts,function(a){return t("a-button",{key:a,attrs:{size:"small",disabled:e.balance.available<=0},on:{click:function(t){return e.setAmountByPercent(a)}}},[e._v(" "+e._s(a)+"% ")])}),1)],1),"spot"!==e.marketType?t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.leverage")))]),t("div",{staticClass:"qt-leverage-row"},[t("a-slider",{staticStyle:{flex:"1","margin-right":"12px"},attrs:{min:1,max:125,marks:e.leverageMarks,tipFormatter:function(e){return e+"x"}},model:{value:e.leverage,callback:function(t){e.leverage=t},expression:"leverage"}}),t("a-input-number",{staticStyle:{width:"80px"},attrs:{min:1,max:125,formatter:function(e){return"".concat(e,"x")},parser:function(e){return e.replace("x","")}},model:{value:e.leverage,callback:function(t){e.leverage=t},expression:"leverage"}})],1)]):e._e(),t("a-collapse",{staticStyle:{background:"transparent",margin:"0 16px"},attrs:{bordered:!1}},[t("a-collapse-panel",{key:"tpsl",style:e.collapseStyle,attrs:{header:e.$t("quickTrade.tpsl")}},[t("div",{staticClass:"qt-tpsl-row"},[t("div",{staticClass:"qt-tpsl-item"},[t("span",{staticClass:"qt-label",staticStyle:{color:"#52c41a"}},[e._v(e._s(e.$t("quickTrade.tp")))]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:e.priceStep,precision:e.pricePrecision,placeholder:e.$t("quickTrade.tpPlaceholder")},model:{value:e.tpPrice,callback:function(t){e.tpPrice=t},expression:"tpPrice"}})],1),t("div",{staticClass:"qt-tpsl-item"},[t("span",{staticClass:"qt-label",staticStyle:{color:"#f5222d"}},[e._v(e._s(e.$t("quickTrade.sl")))]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:e.priceStep,precision:e.pricePrecision,placeholder:e.$t("quickTrade.slPlaceholder")},model:{value:e.slPrice,callback:function(t){e.slPrice=t},expression:"slPrice"}})],1)])])],1),t("div",{staticClass:"qt-submit-section"},[t("a-button",{staticClass:"qt-submit-btn",class:["buy"===e.side?"qt-btn-long":"qt-btn-short"],attrs:{type:"buy"===e.side?"primary":"danger",size:"large",block:"",loading:e.submitting,disabled:!e.canSubmit},on:{click:e.handleSubmit}},[t("a-icon",{attrs:{type:"buy"===e.side?"arrow-up":"arrow-down"}}),e._v(" "+e._s("buy"===e.side?e.$t("quickTrade.buyLong"):e.$t("quickTrade.sellShort"))+" "+e._s(e.symbol)+" ")],1)],1),t("div",{staticClass:"qt-position-section"},[t("div",{staticClass:"qt-section-header"},[t("a-icon",{attrs:{type:"wallet"}}),e._v(" "+e._s(e.$t("quickTrade.currentPosition"))+" ")],1),e.currentPosition?t("div",{staticClass:"qt-position-card",class:e.currentPosition.side},[t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.side")))]),t("a-tag",{attrs:{color:"long"===e.currentPosition.side?"#52c41a":"#f5222d",size:"small"}},[e._v(" "+e._s("long"===e.currentPosition.side?e.$t("quickTrade.long"):e.$t("quickTrade.short"))+" ")])],1),t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.posSize")))]),t("span",[e._v(e._s(e.currentPosition.size))])]),t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.entryPrice")))]),t("span",[e._v("$"+e._s(e.formatPrice(e.currentPosition.entry_price)))])]),e.currentPosition.mark_price?t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.markPrice")))]),t("span",[e._v("$"+e._s(e.formatPrice(e.currentPosition.mark_price)))])]):e._e(),e.currentPosition.leverage&&e.currentPosition.leverage>1?t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.leverage")))]),t("span",[e._v(e._s(e.currentPosition.leverage)+"x")])]):e._e(),t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.unrealizedPnl")))]),t("span",{class:e.currentPosition.unrealized_pnl>=0?"qt-green":"qt-red"},[e._v(" $"+e._s(e.formatPrice(e.currentPosition.unrealized_pnl))+" ")])]),t("a-button",{staticStyle:{"margin-top":"8px"},attrs:{type:"danger",size:"small",block:"",ghost:"",loading:e.closingPosition},on:{click:e.handleClosePosition}},[e._v(" "+e._s(e.$t("quickTrade.closePosition"))+" ")])],1):t("div",{staticClass:"qt-position-empty"},[t("a-empty",{staticStyle:{padding:"20px 0"},attrs:{description:e.$t("quickTrade.noPosition"),image:!1}},[t("template",{slot:"description"},[t("span",{staticStyle:{color:"#999","font-size":"12px"}},[e._v(e._s(e.$t("quickTrade.noPositionHint")))])])],2)],1)]),e.recentTrades.length>0?t("div",{staticClass:"qt-history-section"},[t("a-collapse",{attrs:{bordered:!1,activeKey:e.historyCollapsed?[]:["history"]},on:{change:e.handleHistoryCollapse}},[t("a-collapse-panel",{key:"history",style:e.collapseStyle,attrs:{showArrow:!1}},[t("template",{slot:"header"},[t("div",{staticClass:"qt-section-header",staticStyle:{margin:"0",padding:"0"}},[t("a-icon",{attrs:{type:"history"}}),e._v(" "+e._s(e.$t("quickTrade.recentTrades"))+" "),t("span",{staticClass:"qt-history-count"},[e._v("("+e._s(e.recentTrades.length)+")")])],1)]),t("div",{staticClass:"qt-trade-list"},e._l(e.recentTrades,function(a){return t("div",{key:a.id,staticClass:"qt-trade-item"},[t("div",{staticClass:"qt-trade-main"},[t("a-tag",{attrs:{color:"buy"===a.side?"#52c41a":"#f5222d",size:"small"}},[e._v(" "+e._s("buy"===a.side?"LONG":"SHORT")+" ")]),t("span",{staticClass:"qt-trade-symbol"},[e._v(e._s(a.symbol))]),t("span",{staticClass:"qt-trade-amount"},[e._v("$"+e._s(e.formatPrice(a.amount)))])],1),t("div",{staticClass:"qt-trade-meta"},[t("a-tag",{attrs:{color:"filled"===a.status?"#52c41a":"failed"===a.status?"#f5222d":"#faad14",size:"small"}},[e._v(" "+e._s(a.status)+" ")]),t("span",{staticClass:"qt-trade-time"},[e._v(e._s(e.formatTime(a.created_at)))])],1)])}),0)],2)],1)],1):e._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(e){return(0,u.Ay)({url:"/api/quick-trade/place-order",method:"post",data:e})}function m(e){return(0,u.Ay)({url:"/api/quick-trade/balance",method:"get",params:e})}function p(e){return(0,u.Ay)({url:"/api/quick-trade/position",method:"get",params:e})}function h(e){return(0,u.Ay)({url:"/api/quick-trade/history",method:"get",params:e})}function v(e){return(0,u.Ay)({url:"/api/quick-trade/close-position",method:"post",data:e})}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(e){return e.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(e){e?this.init():this.stopPolling()},symbol:function(e){e&&(this.currentSymbol=e)},currentSymbol:function(e){e&&(this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",e))},selectedCredentialId:function(e){e&&this.currentSymbol&&this.loadPosition()},presetSide:function(e){e&&(this.side=e)},presetPrice:function(e){e>0&&(this.currentPrice=e,this.limitPrice=e)}},methods:{init:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){return(0,s.A)().w(function(t){while(1)switch(t.n){case 0:return e.currentSymbol=e.symbol||"",e.presetSide&&(e.side=e.presetSide),e.presetPrice>0&&(e.currentPrice=e.presetPrice,e.limitPrice=e.presetPrice),t.n=1,e.loadCredentials();case 1:return t.n=2,e.loadUserInfo();case 2:return t.n=3,e.loadWatchlistSymbols();case 3:if(!e.currentSymbol){t.n=4;break}return t.n=4,e.loadPrice();case 4:if(!e.selectedCredentialId||!e.currentSymbol){t.n=5;break}return t.n=5,e.loadPosition();case 5:e.loadHistory(),e.startPolling();case 6:return t.a(2)}},t)}))()},loadUserInfo:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r,n;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(t.p=0,i=e.$store,r=(null===i||void 0===i||null===(a=i.getters)||void 0===a?void 0:a.userInfo)||{},!r||!r.id){t.n=1;break}return e.userId=r.id,t.a(2);case 1:return t.n=2,(0,y.ug)();case 2:n=t.v,n&&1===n.code&&n.data&&(e.userId=n.data.id,i&&i.commit("SET_INFO",n.data)),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[0,3]])}))()},loadWatchlistSymbols:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.userId){t.n=2;break}return t.n=1,e.loadUserInfo();case 1:if(e.userId){t.n=2;break}return t.a(2);case 2:return t.p=2,t.n=3,(0,b.Qo)({userid:e.userId});case 3:a=t.v,a&&1===a.code&&a.data&&(i=(a.data||[]).filter(function(e){return"crypto"===(e.market||"").toLowerCase()}).map(function(e){return{value:e.symbol||"",symbol:e.symbol||"",name:e.name||""}}).filter(function(e){return e.value}),e.symbolSuggestions=i),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.a(2)}},t,null,[[2,4]])}))()},handleSymbolSearch:function(e){var t=this;this.symbolSearchTimer&&clearTimeout(this.symbolSearchTimer),e&&""!==e.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 t.symbolSearching=!0,a.p=1,a.n=2,(0,b._3)({market:"Crypto",keyword:e.trim(),limit:20});case 2:i=a.v,i&&1===i.code&&i.data?t.symbolSuggestions=(i.data.items||i.data||[]).map(function(e){return{value:e.symbol||"",symbol:e.symbol||"",name:e.name||""}}).filter(function(e){return e.value}):t.symbolSuggestions=[],a.n=4;break;case 3:a.p=3,a.v,t.symbolSuggestions=[];case 4:return a.p=4,t.symbolSearching=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])})),300):this.loadWatchlistSymbols()},handleSymbolChange:function(e){e&&e!==this.currentSymbol&&(this.currentSymbol=e,this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",e))},loadPrice:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.currentSymbol){t.n=1;break}return e.currentPrice=0,t.a(2);case 1:return t.p=1,t.n=2,(0,u.Ay)({url:"/api/market/price",method:"get",params:{market:"Crypto",symbol:e.currentSymbol}});case 2:a=t.v,a&&1===a.code&&a.data&&(i=parseFloat(a.data.price||0),i>0&&(e.currentPrice=i,0!==e.limitPrice&&e.limitPrice!==e.presetPrice||(e.limitPrice=i))),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},handleSymbolFocus:function(){0===this.symbolSuggestions.length&&this.loadWatchlistSymbols()},loadCredentials:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.credLoading=!0,t.p=1,t.n=2,(0,o.IA)();case 2:a=t.v,1===a.code&&a.data&&(i=a.data.items||a.data||[],r=["ibkr","mt5"],e.credentials=i.filter(function(e){var t=(e.exchange_id||e.name||"").toLowerCase();return!r.includes(t)}),!e.selectedCredentialId&&e.credentials.length>0&&(e.selectedCredentialId=e.credentials[0].id,e.onCredentialChange(e.selectedCredentialId))),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.p=4,e.credLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},onCredentialChange:function(e){var t=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 t.selectedCredentialId=e,a.n=1,t.loadBalance();case 1:return a.n=2,t.loadPosition();case 2:return a.a(2)}},a)}))()},loadBalance:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.selectedCredentialId){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,m({credential_id:e.selectedCredentialId,market_type:e.marketType});case 2:a=t.v,1===a.code&&a.data&&(e.balance=a.data),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},loadPosition:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.selectedCredentialId&&e.currentSymbol){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,p({credential_id:e.selectedCredentialId,symbol:e.currentSymbol,market_type:e.marketType});case 2:if(a=t.v,!(1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0)){t.n=3;break}return e.currentPosition=a.data.positions[0],t.a(2,!0);case 3:return e.currentPosition=null,t.a(2,!1);case 4:t.n=6;break;case 5:return t.p=5,t.v,e.currentPosition=null,t.a(2,!1);case 6:return t.a(2)}},t,null,[[1,5]])}))()},loadPositionWithRetry:function(){var e=arguments,t=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=e.length>0&&void 0!==e[0]?e[0]:3,r=e.length>1&&void 0!==e[1]?e[1]:2e3,a.n=1,t.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*e/100*100)/100)},handleSubmit:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.canSubmit){t.n=1;break}return t.a(2);case 1:return e.submitting=!0,t.p=2,a={credential_id:e.selectedCredentialId,symbol:e.currentSymbol,side:e.side,order_type:e.orderType,amount:e.amount,price:"limit"===e.orderType?e.limitPrice:0,leverage:"spot"!==e.marketType?e.leverage:1,market_type:e.marketType,tp_price:e.tpPrice||0,sl_price:e.slPrice||0,source:e.source},t.n=3,d(a);case 3:if(i=t.v,1!==i.code){t.n=7;break}return e.$emit("order-success",i.data),t.n=4,e.loadBalance();case 4:return t.n=5,e.loadHistory();case 5:return t.n=6,e.loadPositionWithRetry();case 6:t.n=8;break;case 7:e.$message.error(i.msg||e.$t("quickTrade.orderFailed"));case 8:t.n=10;break;case 9:t.p=9,r=t.v,e.$message.error(r.message||e.$t("quickTrade.orderFailed"));case 10:return t.p=10,e.submitting=!1,t.f(10);case 11:return t.a(2)}},t,null,[[2,9,10,11]])}))()},handleClosePosition:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.currentPosition&&e.selectedCredentialId){t.n=1;break}return t.a(2);case 1:return e.closingPosition=!0,t.p=2,a={credential_id:e.selectedCredentialId,symbol:e.currentSymbol,market_type:e.marketType,size:0,source:"manual"},t.n=3,v(a);case 3:if(i=t.v,1!==i.code){t.n=6;break}return e.$message.success(e.$t("quickTrade.positionClosed")),t.n=4,e.loadBalance();case 4:return t.n=5,e.loadHistory();case 5:e.currentPosition=null,setTimeout((0,n.A)((0,s.A)().m(function t(){return(0,s.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,e.loadPosition();case 1:return t.a(2)}},t)})),2e3),t.n=7;break;case 6:e.$message.error(i.msg||e.$t("quickTrade.orderFailed"));case 7:t.n=9;break;case 8:t.p=8,r=t.v,e.$message.error(r.message||e.$t("quickTrade.orderFailed"));case 9:return t.p=9,e.closingPosition=!1,t.f(9);case 10:return t.a(2)}},t,null,[[2,8,9,10]])}))()},startPolling:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval(function(){e.currentSymbol&&e.loadPrice(),e.selectedCredentialId&&e.currentSymbol&&(e.loadBalance(),e.loadPosition())},1e4)},stopPolling:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)},handleClose:function(){this.$emit("close"),this.$emit("update:visible",!1)},handleHistoryCollapse:function(e){this.historyCollapsed=!e.includes("history")},formatPrice:function(e){var t=parseFloat(e||0);return Math.abs(t)>=1e4?t.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}):Math.abs(t)>=100?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(t)>=1?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):t.toLocaleString("en-US",{minimumFractionDigits:4,maximumFractionDigits:6})},formatTime:function(e){if(!e)return"";var t=new Date(e),a=function(e){return String(e).padStart(2,"0")};return"".concat(a(t.getMonth()+1),"-").concat(a(t.getDate())," ").concat(a(t.getHours()),":").concat(a(t.getMinutes()))}},beforeDestroy:function(){this.stopPolling()}},g=f,k=a(81656),_=(0,k.A)(g,i,r,!1,null,"0d547552",null),P=_.exports},42430:function(e,t,a){a.d(t,{IA:function(){return n},PR:function(){return c},kI:function(){return l}});var i=a(76338),r=a(75769),s={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete"};function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.Ay)({url:s.list,method:"get",params:e})}function c(e){return(0,r.Ay)({url:s.create,method:"post",data:e})}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.Ay)({url:s.delete,method:"delete",params:(0,i.A)({id:e},t)})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/378.fc194de3.js b/frontend/dist/js/378.fc194de3.js deleted file mode 100644 index 11a3454..0000000 --- a/frontend/dist/js/378.fc194de3.js +++ /dev/null @@ -1,18 +0,0 @@ -(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[378],{6372:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){ -/** @preserve - * Counter block mode compatible with Dr Brian Gladman fileenc.c - * derived from CryptoJS.mode.CTR - * Jan Hruby jhruby.web@gmail.com - */ -return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function i(t){if(255===(t>>24&255)){var e=t>>16&255,i=t>>8&255,n=255&t;255===e?(e=0,255===i?(i=0,255===n?n=0:++n):++i):++e,t=0,t+=e<<16,t+=i<<8,t+=n}else t+=1<<24;return t}function n(t){return 0===(t[0]=i(t[0]))&&(t[1]=i(t[1])),t}var r=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,r=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),n(o);var s=o.slice(0);i.encryptBlock(s,0);for(var l=0;l>>2]|=t[n]<<24-n%4*8;r.call(this,i,e)}else r.apply(this,arguments)};a.prototype=n}}(),t.lib.WordArray})},7628: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.WordArray,r=i.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=r.extend({_doReset:function(){for(var t=this._key,e=t.words,i=[],n=0;n<56;n++){var r=o[n]-1;i[n]=e[r>>>5]>>>31-r%32&1}for(var a=this._subKeys=[],c=0;c<16;c++){var u=a[c]=[],d=l[c];for(n=0;n<24;n++)u[n/6|0]|=i[(s[n]-1+d)%28]<<31-n%6,u[4+(n/6|0)]|=i[28+(s[n+24]-1+d)%28]<<31-n%6;u[0]=u[0]<<1|u[0]>>>31;for(n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=a[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,i){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=i[n],a=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((o^r[l])&u[l])>>>0];this._lBlock=o,this._rBlock=a^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var i=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=i,this._lBlock^=i<>>t^this._lBlock)&e;this._lBlock^=i,this._rBlock^=i<192.");var i=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(i)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(a))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(f)}(),t.TripleDES})},10482:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso97971={pad:function(e,i){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,i)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})},15237:function(t){(function(e,i){t.exports=i()})(0,function(){"use strict";var t=navigator.userAgent,e=navigator.platform,i=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),a=/Edge\/(\d+)/.exec(t),o=n||r||a,s=o&&(n?document.documentMode||6:+(a||r)[1]),l=!a&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!a&&/Chrome\/(\d+)/.exec(t),d=u&&+u[1],h=/Opera\//.test(t),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),v=/PhantomJS/.test(t),g=p&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),m=/Android/.test(t),y=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),x=/\bCrOS\b/.test(t),_=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=b&&(c||h&&(null==w||w<12.11)),S=i||o&&s>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var A,T=function(t,e){var i=t.className,n=k(e).exec(i);if(n){var r=i.slice(n.index+n[0].length);t.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function I(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function M(t,e){return I(t).appendChild(e)}function E(t,e,i,n){var r=document.createElement(t);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var a=0;a=e)return o+(e-a);o+=s-a,o+=i-o%i,a=s+1}}g?B=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(B=function(t){try{t.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=$(this.onTimeout,this)};function Y(t,e){for(var i=0;i=e)return n+Math.min(o,e-r);if(r+=a-n,r+=i-r%i,n=a+1,r>=e)return n}}var J=[""];function Q(t){while(J.length<=t)J.push(tt(J)+" ");return J[t]}function tt(t){return t[t.length-1]}function et(t,e){for(var i=[],n=0;n"€"&&(t.toUpperCase()!=t.toLowerCase()||at.test(t))}function st(t,e){return e?!!(e.source.indexOf("\\w")>-1&&ot(t))||e.test(t):ot(t)}function lt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var ct=/[\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 ut(t){return t.charCodeAt(0)>=768&&ct.test(t)}function dt(t,e,i){while((i<0?e>0:ei?-1:1;;){if(e==i)return e;var r=(e+i)/2,a=n<0?Math.ceil(r):Math.floor(r);if(a==e)return t(a)?e:i;t(a)?i=a:e=a+n}}function pt(t,e,i,n){if(!t)return n(e,i,"ltr",0);for(var r=!1,a=0;ae||e==i&&o.to==e)&&(n(Math.max(o.from,e),Math.min(o.to,i),1==o.level?"rtl":"ltr",a),r=!0)}r||n(e,i,"ltr")}var ft=null;function vt(t,e,i){var n;ft=null;for(var r=0;re)return r;a.to==e&&(a.from!=a.to&&"before"==i?n=r:ft=r),a.from==e&&(a.from!=a.to&&"before"!=i?n=r:ft=r)}return null!=n?n:ft}var gt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(i){return i<=247?t.charAt(i):1424<=i&&i<=1524?"R":1536<=i&&i<=1785?e.charAt(i-1536):1774<=i&&i<=2220?"r":8192<=i&&i<=8203?"w":8204==i?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(t,e,i){this.level=t,this.from=e,this.to=i}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!n.test(t))return!1;for(var u=t.length,d=[],h=0;h-1&&(n[e]=r.slice(0,a).concat(r.slice(a+1)))}}}function wt(t,e){var i=xt(t,e);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r0}function At(t){t.prototype.on=function(t,e){bt(this,t,e)},t.prototype.off=function(t,e){_t(this,t,e)}}function Tt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function It(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Mt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Et(t){Tt(t),It(t)}function Dt(t){return t.target||t.srcElement}function Pt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var Lt,Rt,Ft=function(){if(o&&s<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function Bt(t){if(null==Lt){var e=E("span","​");M(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&s<8))}var i=Lt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Nt(t){if(null!=Rt)return Rt;var e=M(t,document.createTextNode("AخA")),i=A(e,0,1).getBoundingClientRect(),n=A(e,1,2).getBoundingClientRect();return I(t),!(!i||i.left==i.right)&&(Rt=n.right-i.right<3)}var Ot=3!="\n\nb".split(/\n/).length?function(t){var e=0,i=[],n=t.length;while(e<=n){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var a=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),o=a.indexOf("\r");-1!=o?(i.push(a.slice(0,o)),e+=o+1):(i.push(a),e=r+1)}return i}:function(t){return t.split(/\r\n?|\n/)},zt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(i){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Wt=function(){var t=E("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),$t=null;function Ht(t){if(null!=$t)return $t;var e=M(t,E("span","x")),i=e.getBoundingClientRect(),n=A(e,0,1).getBoundingClientRect();return $t=Math.abs(i.left-n.left)>1}var Vt={},Kt={};function Yt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Vt[t]=e}function Xt(t,e){Kt[t]=e}function Ut(t){if("string"==typeof t&&Kt.hasOwnProperty(t))t=Kt[t];else if(t&&"string"==typeof t.name&&Kt.hasOwnProperty(t.name)){var e=Kt[t.name];"string"==typeof e&&(e={name:e}),t=rt(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Gt(t,e){e=Ut(e);var i=Vt[e.name];if(!i)return Gt(t,"text/plain");var n=i(t,e);if(jt.hasOwnProperty(e.name)){var r=jt[e.name];for(var a in r)r.hasOwnProperty(a)&&(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=r[a])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)n[o]=e.modeProps[o];return n}var jt={};function qt(t,e){var i=jt.hasOwnProperty(t)?jt[t]:jt[t]={};H(e,i)}function Zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var n in e){var r=e[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Jt(t,e){var i;while(t.innerMode){if(i=t.innerMode(e),!i||i.mode==t)break;e=i.state,t=i.mode}return i||{mode:t,state:e}}function Qt(t,e,i){return!t.startState||t.startState(e,i)}var te=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function ee(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");var i=t;while(!i.lines)for(var n=0;;++n){var r=i.children[n],a=r.chunkSize();if(e=t.first&&ei?ce(i,ee(t,i).text.length):me(e,ee(t,e.line).text.length)}function me(t,e){var i=t.ch;return null==i||i>e?ce(t.line,e):i<0?ce(t.line,0):t}function ye(t,e){for(var i=[],n=0;n=this.string.length},te.prototype.sol=function(){return this.pos==this.lineStart},te.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},te.prototype.next=function(){if(this.pose},te.prototype.eatSpace=function(){var t=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>t},te.prototype.skipToEnd=function(){this.pos=this.string.length},te.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},te.prototype.backUp=function(t){this.pos-=t},te.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var r=function(t){return i?t.toLowerCase():t},a=this.string.substr(this.pos,t.length);if(r(a)==r(t))return!1!==e&&(this.pos+=t.length),!0},te.prototype.current=function(){return this.string.slice(this.start,this.pos)},te.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},te.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},te.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var be=function(t,e){this.state=t,this.lookAhead=e},xe=function(t,e,i,n){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function _e(t,e,i,n){var r=[t.state.modeGen],a={};Ee(t,e.text,t.doc.mode,i,function(t,e){return r.push(t,e)},a,n);for(var o=i.state,s=function(n){i.baseTokens=r;var s=t.state.overlays[n],l=1,c=0;i.state=!0,Ee(t,e.text,s.mode,i,function(t,e){var i=l;while(ct&&r.splice(l,1,t,r[l+1],n),l+=2,c=Math.min(t,n)}if(e)if(s.opaque)r.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;it.options.maxHighlightLength&&Zt(t.doc.mode,n.state),a=_e(t,e,n);r&&(n.state=r),e.stateAfter=n.save(!r),e.styles=a.styles,a.classes?e.styleClasses=a.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Ce(t,e,i){var n=t.doc,r=t.display;if(!n.mode.startState)return new xe(n,!0,e);var a=De(t,e,i),o=a>n.first&&ee(n,a-1).stateAfter,s=o?xe.fromSaved(n,o,a):new xe(n,Qt(n.mode),a);return n.iter(a,e,function(i){Se(t,i.text,s);var n=s.line;i.stateAfter=n==e-1||n%5==0||n>=r.viewFrom&&ne.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}xe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},xe.prototype.baseToken=function(t){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=t)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},xe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xe.fromSaved=function(t,e,i){return e instanceof be?new xe(t,Zt(t.mode,e.state),i,e.lookAhead):new xe(t,Zt(t.mode,e),i)},xe.prototype.save=function(t){var e=!1!==t?Zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new be(e,this.maxLookAhead):e};var Te=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i};function Ie(t,e,i,n){var r,a=t.doc,o=a.mode;e=ge(a,e);var s,l=ee(a,e.line),c=Ce(t,e.line,i),u=new te(l.text,t.options.tabSize,c);n&&(s=[]);while((n||u.post.options.maxHighlightLength?(s=!1,o&&Se(t,e,n,d.pos),d.pos=e.length,l=null):l=Me(Ae(i,d,n.state,h),a),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){while(co;--s){if(s<=a.first)return a.first;var l=ee(a,s-1),c=l.stateAfter;if(c&&(!i||s+(c instanceof be?c.lookAhead:0)<=a.modeFrontier))return s;var u=V(l.text,null,t.options.tabSize);(null==r||n>u)&&(r=s-1,n=u)}return r}function Pe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontieri;n--){var r=ee(t,n).stateAfter;if(r&&(!(r instanceof be)||n+r.lookAhead=e:a.to>e);(n||(n=[])).push(new Ne(o,a.from,l?null:a.to))}}return n}function He(t,e,i){var n;if(t)for(var r=0;r=e:a.to>e);if(s||a.from==e&&"bookmark"==o.type&&(!i||a.marker.insertLeft)){var l=null==a.from||(o.inclusiveLeft?a.from<=e:a.from0&&s)for(var x=0;x0)){var u=[l,1],d=ue(c.from,s.from),h=ue(c.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!o.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function Xe(t){var e=t.markedSpans;if(e){for(var i=0;ie)&&(!i||qe(i,a.marker)<0)&&(i=a.marker)}return i}function ei(t,e,i,n,r){var a=ee(t,e),o=Re&&a.markedSpans;if(o)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.to,i)>=0:ue(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.from,n)<=0:ue(c.from,n)<0)))return!0}}}function ii(t){var e;while(e=Je(t))t=e.find(-1,!0).line;return t}function ni(t){var e;while(e=Qe(t))t=e.find(1,!0).line;return t}function ri(t){var e,i;while(e=Qe(t))t=e.find(1,!0).line,(i||(i=[])).push(t);return i}function ai(t,e){var i=ee(t,e),n=ii(i);return i==n?e:ae(n)}function oi(t,e){if(e>t.lastLine())return e;var i,n=ee(t,e);if(!si(t,n))return e;while(i=Qe(n))n=i.find(1,!0).line;return ae(n)+1}function si(t,e){var i=Re&&e.markedSpans;if(i)for(var n=void 0,r=0;re.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)})}var hi=function(t,e,i){this.text=t,Ue(this,e),this.height=i?i(this):1};function pi(t,e,i,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Xe(t),Ue(t,i);var r=n?n(t):1;r!=t.height&&re(t,r)}function fi(t){t.parent=null,Xe(t)}hi.prototype.lineNo=function(){return ae(this)},At(hi);var vi={},gi={};function mi(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?gi:vi;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function yi(t,e){var i=D("span",null,null,l?"padding-right: .1px":null),n={pre:D("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var a=r?e.rest[r-1]:e.line,o=void 0;n.pos=0,n.addToken=xi,Nt(t.display.measure)&&(o=mt(a,t.doc.direction))&&(n.addToken=wi(n.addToken,o)),n.map=[];var s=e!=t.display.externalMeasured&&ae(a);Si(a,n,we(t,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=F(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=F(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Bt(t.display.measure))),0==r?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return wt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function bi(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function xi(t,e,i,n,r,a,l){if(e){var c,u=t.splitSpaces?_i(e,t.trailingSpace):e,d=t.cm.state.specialChars,h=!1;if(d.test(e)){c=document.createDocumentFragment();var p=0;while(1){d.lastIndex=p;var f=d.exec(e),v=f?f.index-p:e.length-p;if(v){var g=document.createTextNode(u.slice(p,p+v));o&&s<9?c.appendChild(E("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+v,g),t.col+=v,t.pos+=v}if(!f)break;p+=v+1;var m=void 0;if("\t"==f[0]){var y=t.cm.options.tabSize,b=y-t.col%y;m=c.appendChild(E("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=b}else"\r"==f[0]||"\n"==f[0]?(m=c.appendChild(E("span","\r"==f[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",f[0]),t.col+=1):(m=t.cm.options.specialCharPlaceholder(f[0]),m.setAttribute("cm-text",f[0]),o&&s<9?c.appendChild(E("span",[m])):c.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),o&&s<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),i||n||r||h||a||l){var x=i||"";n&&(x+=n),r&&(x+=r);var _=E("span",[c],x,a);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&_.setAttribute(w,l[w]);return t.content.appendChild(_)}t.content.appendChild(c)}}function _i(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,n="",r=0;rc&&d.from<=c)break;if(d.to>=u)return t(i,n,r,a,o,s,l);t(i,n.slice(0,d.to-c),r,a,null,s,l),a=null,n=n.slice(d.to-c),c=d.to}}}function Ci(t,e,i,n){var r=!n&&i.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!n&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function Si(t,e,i){var n=t.markedSpans,r=t.text,a=0;if(n)for(var o,s,l,c,u,d,h,p=r.length,f=0,v=1,g="",m=0;;){if(m==f){l=c=u=s="",h=null,d=null,m=1/0;for(var y=[],b=void 0,x=0;xf||w.collapsed&&_.to==f&&_.from==f)){if(null!=_.to&&_.to!=f&&m>_.to&&(m=_.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&_.from==f&&(u+=" "+w.startStyle),w.endStyle&&_.to==m&&(b||(b=[])).push(w.endStyle,_.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||qe(d.marker,w)<0)&&(d=_)}else _.from>f&&m>_.from&&(m=_.from)}if(b)for(var S=0;S=p)break;var A=Math.min(p,m);while(1){if(g){var T=f+g.length;if(!d){var I=T>A?g.slice(0,A-f):g;e.addToken(e,I,o?o+l:l,u,f+I.length==m?c:"",s,h)}if(T>=A){g=g.slice(A-f),f=A;break}f=T,u=""}g=r.slice(a,a=i[v++]),o=mi(i[v++],e.cm.options)}}else for(var M=1;M2&&a.push((l.bottom+c.top)/2-i.top)}}a.push(i.bottom-i.top)}}function en(t,e,i){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var n=0;ni)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function nn(t,e){e=ii(e);var i=ae(e),n=t.display.externalMeasured=new ki(t.doc,e,i);n.lineN=i;var r=n.built=yi(t,n);return n.text=r.pre,M(t.display.lineMeasure,r.pre),n}function rn(t,e,i,n){return sn(t,on(t,e),i,n)}function an(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&ee)&&(a=l-s,r=a-1,e>=l&&(o="right")),null!=r){if(n=t[c+2],s==l&&i==(n.insertLeft?"left":"right")&&(o=i),"left"==i&&0==r)while(c&&t[c-2]==t[c-3]&&t[c-1].insertLeft)n=t[2+(c-=3)],o="left";if("right"==i&&r==l-s)while(c=0;r--)if((i=t[r]).left!=i.right)break;return i}function hn(t,e,i,n){var r,a=un(e.map,i,n),l=a.node,c=a.start,u=a.end,d=a.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){while(c&&ut(e.line.text.charAt(a.coverStart+c)))--c;while(a.coverStart+u0&&(d=n="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==n?p.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Rn(t.display),top:f.top,bottom:f.bottom}:cn}for(var v=r.top-e.rect.top,g=r.bottom-e.rect.top,m=(v+g)/2,y=e.view.measure.heights,b=0;b=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(t,e,i){var n=s[e],r=1==n.level;return o(i?t-1:t,r!=i)}var d=vt(s,l,c),h=ft,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function Sn(t,e){var i=0;e=ge(t.doc,e),t.options.lineWrapping||(i=Rn(t.display)*e.ch);var n=ee(t.doc,e.line),r=ci(n)+Gi(t.display);return{left:i,right:i,top:r,bottom:r+n.height}}function kn(t,e,i,n,r){var a=ce(t,e,i);return a.xRel=r,n&&(a.outside=n),a}function An(t,e,i){var n=t.doc;if(i+=t.display.viewOffset,i<0)return kn(n.first,0,null,-1,-1);var r=oe(n,i),a=n.first+n.size-1;if(r>a)return kn(n.first+n.size-1,ee(n,a).text.length,null,1,1);e<0&&(e=0);for(var o=ee(n,r);;){var s=En(t,o,r,e,i),l=ti(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;o=ee(n,r=c.line)}}function Tn(t,e,i,n){n-=bn(e);var r=e.text.length,a=ht(function(e){return sn(t,i,e-1).bottom<=n},r,0);return r=ht(function(e){return sn(t,i,e).top>n},a,r),{begin:a,end:r}}function In(t,e,i,n){i||(i=on(t,e));var r=xn(t,e,sn(t,i,n),"line").top;return Tn(t,e,i,r)}function Mn(t,e,i,n){return!(t.bottom<=i)&&(t.top>i||(n?t.left:t.right)>e)}function En(t,e,i,n,r){r-=ci(e);var a=on(t,e),o=bn(e),s=0,l=e.text.length,c=!0,u=mt(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?Pn:Dn)(t,e,i,a,u,n,r);c=1!=d.level,s=c?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,v=null,g=ht(function(e){var i=sn(t,a,e);return i.top+=o,i.bottom+=o,!!Mn(i,n,r,!1)&&(i.top<=r&&i.left<=n&&(f=e,v=i),!0)},s,l),m=!1;if(v){var y=n-v.left=x.bottom?1:0}return g=dt(e.text,g,1),kn(i,g,p,m,n-h)}function Dn(t,e,i,n,r,a,o){var s=ht(function(s){var l=r[s],c=1!=l.level;return Mn(Cn(t,ce(i,c?l.to:l.from,c?"before":"after"),"line",e,n),a,o,!0)},0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=Cn(t,ce(i,c?l.from:l.to,c?"after":"before"),"line",e,n);Mn(u,a,o,!0)&&u.top>o&&(l=r[s-1])}return l}function Pn(t,e,i,n,r,a,o){var s=Tn(t,e,n,o),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||p.to<=l)){var f=1!=p.level,v=sn(t,n,f?Math.min(c,p.to)-1:Math.max(l,p.from)).right,g=vg)&&(u=p,d=g)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function Ln(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ln){ln=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ln.appendChild(document.createTextNode("x")),ln.appendChild(E("br"));ln.appendChild(document.createTextNode("x"))}M(t.measure,ln);var i=ln.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),I(t.measure),i||1}function Rn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),i=E("pre",[e],"CodeMirror-line-like");M(t.measure,i);var n=e.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Fn(t){for(var e=t.display,i={},n={},r=e.gutters.clientLeft,a=e.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=t.display.gutterSpecs[o].className;i[s]=a.offsetLeft+a.clientLeft+r,n[s]=a.clientWidth}return{fixedPos:Bn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function Bn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Nn(t){var e=Ln(t.display),i=t.options.lineWrapping,n=i&&Math.max(5,t.display.scroller.clientWidth/Rn(t.display)-3);return function(r){if(si(t.doc,r))return 0;var a=0;if(r.widgets)for(var o=0;o0&&(l=ee(t.doc,c.line).text).length==c.ch){var u=V(l,l.length,t.options.tabSize)-l.length;c=ce(c.line,Math.max(0,Math.round((a-qi(t.display).left)/Rn(t.display))-u))}return c}function Wn(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var i=t.display.view,n=0;ne)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Re&&ai(t.doc,e)r.viewFrom?Vn(t):(r.viewFrom+=n,r.viewTo+=n);else if(e<=r.viewFrom&&i>=r.viewTo)Vn(t);else if(e<=r.viewFrom){var a=Kn(t,i,i+n,1);a?(r.view=r.view.slice(a.index),r.viewFrom=a.lineN,r.viewTo+=n):Vn(t)}else if(i>=r.viewTo){var o=Kn(t,e,e,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Vn(t)}else{var s=Kn(t,e,e,-1),l=Kn(t,i,i+n,1);s&&l?(r.view=r.view.slice(0,s.index).concat(Ai(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):Vn(t)}var c=r.externalMeasured;c&&(i=r.lineN&&e=n.viewTo)){var a=n.view[Wn(t,e)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==Y(o,i)&&o.push(i)}}}function Vn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Kn(t,e,i,n){var r,a=Wn(t,e),o=t.display.view;if(!Re||i==t.doc.first+t.doc.size)return{index:a,lineN:i};for(var s=t.display.viewFrom,l=0;l0){if(a==o.length-1)return null;r=s+o[a].size-e,a++}else r=s-e;e+=r,i+=r}while(ai(t.doc,i)!=i){if(a==(n<0?0:o.length-1))return null;i+=n*o[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:i}}function Yn(t,e,i){var n=t.display,r=n.view;0==r.length||e>=n.viewTo||i<=n.viewFrom?(n.view=Ai(t,e,i),n.viewFrom=e):(n.viewFrom>e?n.view=Ai(t,e,n.viewFrom).concat(n.view):n.viewFromi&&(n.view=n.view.slice(0,Wn(t,i)))),n.viewTo=i}function Xn(t){for(var e=t.display.view,i=0,n=0;n=t.display.viewTo||l.to().line0?o:t.defaultCharWidth())+"px"}if(n.other){var s=i.appendChild(E("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function qn(t,e){return t.top-e.top||t.left-e.left}function Zn(t,e,i){var n=t.display,r=t.doc,a=document.createDocumentFragment(),o=qi(t.display),s=o.left,l=Math.max(n.sizerWidth,Ji(t)-n.sizer.offsetLeft)-o.right,c="ltr"==r.direction;function u(t,e,i,n){e<0&&(e=0),e=Math.round(e),n=Math.round(n),a.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==i?l-t:i)+"px;\n height: "+(n-e)+"px"))}function d(e,i,n){var a,o,d=ee(r,e),h=d.text.length;function p(i,n){return wn(t,ce(e,i),"div",d,n)}function f(e,i,n){var r=In(t,d,null,e),a="ltr"==i==("after"==n)?"left":"right",o="after"==n?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1);return p(o,a)[a]}var v=mt(d,r.direction);return pt(v,i||0,null==n?h:n,function(t,e,r,d){var g="ltr"==r,m=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==i&&0==t,x=null==n&&e==h,_=0==d,w=!v||d==v.length-1;if(y.top-m.top<=3){var C=(c?b:x)&&_,S=(c?x:b)&&w,k=C?s:(g?m:y).left,A=S?l:(g?y:m).right;u(k,m.top,A-k,m.bottom)}else{var T,I,M,E;g?(T=c&&b&&_?s:m.left,I=c?l:f(t,r,"before"),M=c?s:f(e,r,"after"),E=c&&x&&w?l:y.right):(T=c?f(t,r,"before"):s,I=!c&&b&&_?l:m.right,M=!c&&x&&w?s:y.left,E=c?f(e,r,"after"):l),u(T,m.top,I-T,m.bottom),m.bottom0?e.blinker=setInterval(function(){t.hasFocus()||ir(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Qn(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||er(t))}function tr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&ir(t))},100)}function er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(wt(t,"focus",t,e),t.state.focused=!0,R(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Jn(t))}function ir(t,e){t.state.delayingBlurEvent||(t.state.focused&&(wt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function nr(t){for(var e=t.display,i=e.lineDiv.offsetTop,n=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||v<-.005)&&(rt.display.sizerWidth){var m=Math.ceil(h/Rn(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=c.line,t.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(e.scroller.scrollTop+=a)}function rr(t){if(t.widgets)for(var e=0;e=o&&(a=oe(e,ci(ee(e,l))-t.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function or(t,e){if(!Ct(t,"scrollCursorIntoView")){var i=t.display,n=i.sizer.getBoundingClientRect(),r=null,a=i.wrapper.ownerDocument;if(e.top+n.top<0?r=!0:e.bottom+n.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(r=!1),null!=r&&!v){var o=E("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Gi(t.display))+"px;\n height: "+(e.bottom-e.top+Zi(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function sr(t,e,i,n){var r;null==n&&(n=0),t.options.lineWrapping||e!=i||(i="before"==e.sticky?ce(e.line,e.ch+1,"before"):e,e=e.ch?ce(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var a=0;a<5;a++){var o=!1,s=Cn(t,e),l=i&&i!=e?Cn(t,i):s;r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var c=cr(t,r),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(gr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(yr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return r}function lr(t,e){var i=cr(t,e);null!=i.scrollTop&&gr(t,i.scrollTop),null!=i.scrollLeft&&yr(t,i.scrollLeft)}function cr(t,e){var i=t.display,n=Ln(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,a=Qi(t),o={};e.bottom-e.top>a&&(e.bottom=e.top+a);var s=t.doc.height+ji(i),l=e.tops-n;if(e.topr+a){var u=Math.min(e.top,(c?s:e.bottom)-a);u!=r&&(o.scrollTop=u)}var d=t.options.fixedGutter?0:i.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft-d,p=Ji(t)-i.gutters.offsetWidth,f=e.right-e.left>p;return f&&(e.right=e.left+p),e.left<10?o.scrollLeft=0:e.leftp+h-3&&(o.scrollLeft=e.right+(f?0:10)-p),o}function ur(t,e){null!=e&&(fr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function dr(t){fr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function hr(t,e,i){null==e&&null==i||fr(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function pr(t,e){fr(t),t.curOp.scrollToPos=e}function fr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var i=Sn(t,e.from),n=Sn(t,e.to);vr(t,i,n,e.margin)}}function vr(t,e,i,n){var r=cr(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-n,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+n});hr(t,r.scrollLeft,r.scrollTop)}function gr(t,e){Math.abs(t.doc.scrollTop-e)<2||(i||Ur(t,{top:e}),mr(t,e,!0),i&&Ur(t),zr(t,100))}function mr(t,e,i){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function yr(t,e,i,n){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,Zr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function br(t){var e=t.display,i=e.gutters.offsetWidth,n=Math.round(t.doc.height+ji(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Zi(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var xr=function(t,e,i){this.cm=i;var n=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,t(n),t(r),bt(n,"scroll",function(){n.clientHeight&&e(n.scrollTop,"vertical")}),bt(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var r=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var a=t.viewWidth-t.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:e?n:0}},xr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var t=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},xr.prototype.enableZeroWidthBar=function(t,e,i){function n(){var r=t.getBoundingClientRect(),a="vert"==i?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);a!=t?t.style.visibility="hidden":e.set(1e3,n)}t.style.visibility="",e.set(1e3,n)},xr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var _r=function(){};function wr(t,e){e||(e=br(t));var i=t.display.barWidth,n=t.display.barHeight;Cr(t,e);for(var r=0;r<4&&i!=t.display.barWidth||n!=t.display.barHeight;r++)i!=t.display.barWidth&&t.options.lineWrapping&&nr(t),Cr(t,br(t)),i=t.display.barWidth,n=t.display.barHeight}function Cr(t,e){var i=t.display,n=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}_r.prototype.update=function(){return{bottom:0,right:0}},_r.prototype.setScrollLeft=function(){},_r.prototype.setScrollTop=function(){},_r.prototype.clear=function(){};var Sr={native:xr,null:_r};function kr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Sr[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),bt(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,i){"horizontal"==i?yr(t,e):gr(t,e)},t),t.display.scrollbars.addClass&&R(t.display.wrapper,t.display.scrollbars.addClass)}var Ar=0;function Tr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++Ar,markArrays:null},Ii(t.curOp)}function Ir(t){var e=t.curOp;e&&Ei(e,function(t){for(var e=0;e=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new $r(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Dr(t){t.updatedDisplay=t.mustUpdate&&Yr(t.cm,t.update)}function Pr(t){var e=t.cm,i=e.display;t.updatedDisplay&&nr(e),t.barMeasure=br(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=rn(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Zi(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-Ji(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function Lr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var i=+new Date+t.options.workTime,n=Ce(t,e.highlightFrontier),r=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),function(a){if(n.line>=t.display.viewFrom){var o=a.styles,s=a.text.length>t.options.maxHighlightLength?Zt(e.mode,n.state):null,l=_e(t,a,n,!0);s&&(n.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hi)return zr(t,t.options.workDelay),!0}),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),r.length&&Fr(t,function(){for(var e=0;e=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==Xn(t))return!1;Jr(t)&&(Vn(t),e.dims=Fn(t));var r=n.first+n.size,a=Math.max(e.visible.from-t.options.viewportMargin,n.first),o=Math.min(r,e.visible.to+t.options.viewportMargin);i.viewFromo&&i.viewTo-o<20&&(o=Math.min(r,i.viewTo)),Re&&(a=ai(t.doc,a),o=oi(t.doc,o));var s=a!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;Yn(t,a,o),i.viewOffset=ci(ee(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var l=Xn(t);if(!s&&0==l&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var c=Vr(t);return l>4&&(i.lineDiv.style.display="none"),Gr(t,i.updateLineNumbers,e.dims),l>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Kr(c),I(i.cursorDiv),I(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,s&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,zr(t,400)),i.updateLineNumbers=null,!0}function Xr(t,e){for(var i=e.viewport,n=!0;;n=!1){if(n&&t.options.lineWrapping&&e.oldDisplayWidth!=Ji(t))n&&(e.visible=ar(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+ji(t.display)-Qi(t),i.top)}),e.visible=ar(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Yr(t,e))break;nr(t);var r=br(t);Un(t),wr(t,r),qr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Ur(t,e){var i=new $r(t,e);if(Yr(t,i)){nr(t),Xr(t,i);var n=br(t);Un(t),wr(t,n),qr(t,n),i.finish()}}function Gr(t,e,i){var n=t.display,r=t.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(e){var i=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var c=n.view,u=n.viewFrom,d=0;d-1&&(p=!1),Ri(t,h,u,i)),p&&(I(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(le(t.options,u)))),o=h.node.nextSibling}else{var f=Hi(t,h,u,i);a.insertBefore(f,o)}u+=h.size}while(o)o=s(o)}function jr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",Pi(t,"gutterChanged",t)}function qr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Zi(t)+"px"}function Zr(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=Bn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,a=n+"px",o=0;o=105&&(a.wrapper.style.clipPath="inset(0px)"),a.wrapper.setAttribute("translate","no"),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),l||i&&y||(a.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(a.wrapper):t(a.wrapper)),a.viewFrom=a.viewTo=e.first,a.reportedViewFrom=a.reportedViewTo=e.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=Qr(r.gutters,r.lineNumbers),ta(a),n.init(a)}$r.prototype.signal=function(t,e){kt(t,e)&&this.events.push(arguments)},$r.prototype.finish=function(){for(var t=0;tc.clientWidth,f=c.scrollHeight>c.clientHeight;if(r&&p||a&&f){if(a&&b&&l)t:for(var v=e.target,g=s.view;v!=c;v=v.parentNode)for(var m=0;m=0&&ue(t,n.to())<=0)return i}return-1};var ca=function(t,e){this.anchor=t,this.head=e};function ua(t,e,i){var n=t&&t.options.selectionsMayTouch,r=e[i];e.sort(function(t,e){return ue(t.from(),e.from())}),i=Y(e,r);for(var a=1;a0:l>=0){var c=fe(s.from(),o.from()),u=pe(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=i&&--i,e.splice(--a,2,new ca(d?u:c,d?c:u))}}return new la(e,i)}function da(t,e){return new la([new ca(t,e||t)],0)}function ha(t){return t.text?ce(t.from.line+t.text.length-1,tt(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function pa(t,e){if(ue(t,e.from)<0)return t;if(ue(t,e.to)<=0)return ha(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=ha(e).ch-e.to.ch),ce(i,n)}function fa(t,e){for(var i=[],n=0;n1&&t.remove(s.line+1,f-1),t.insert(s.line+1,m)}Pi(t,"change",t,e)}function _a(t,e,i){function n(t,r,a){if(t.linked)for(var o=0;o1&&!t.done[t.done.length-2].ranges?(t.done.pop(),tt(t.done)):void 0}function Ma(t,e,i,n){var r=t.history;r.undone.length=0;var a,o,s=+new Date;if((r.lastOp==n||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=Ia(r,r.lastOp==n)))o=tt(a.changes),0==ue(e.from,e.to)&&0==ue(e.from,o.to)?o.to=ha(e):a.changes.push(Aa(t,e));else{var l=tt(r.done);l&&l.ranges||Pa(t.sel,r.done),a={changes:[Aa(t,e)],generation:r.generation},r.done.push(a);while(r.done.length>r.undoDepth)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=e.origin,o||wt(t,"historyAdded")}function Ea(t,e,i,n){var r=e.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Da(t,e,i,n){var r=t.history,a=n&&n.origin;i==r.lastSelOp||a&&r.lastSelOrigin==a&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==a||Ea(t,a,tt(r.done),e))?r.done[r.done.length-1]=e:Pa(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=a,r.lastSelOp=i,n&&!1!==n.clearRedo&&Ta(r.undone)}function Pa(t,e){var i=tt(e);i&&i.ranges&&i.equals(t)||e.push(t)}function La(t,e,i,n){var r=e["spans_"+t.id],a=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,n),function(i){i.markedSpans&&((r||(r=e["spans_"+t.id]={}))[a]=i.markedSpans),++a})}function Ra(t){if(!t)return null;for(var e,i=0;i-1&&(tt(s)[d]=c[d],delete c[d])}}}return n}function Oa(t,e,i,n){if(n){var r=t.anchor;if(i){var a=ue(e,r)<0;a!=ue(i,r)<0?(r=e,e=i):a!=ue(e,i)<0&&(e=i)}return new ca(r,e)}return new ca(i||e,e)}function za(t,e,i,n,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Ya(t,new la([Oa(t.sel.primary(),e,i,r)],0),n)}function Wa(t,e,i){for(var n=[],r=t.cm&&(t.cm.display.shift||t.extend),a=0;a=e.ch:s.to>e.ch))){if(r&&(wt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(i){var d=l.find(n<0?1:-1),h=void 0;if((n<0?u:c)&&(d=Ja(t,d,-n,d&&d.line==e.line?a:null)),d&&d.line==e.line&&(h=ue(d,i))&&(n<0?h<0:h>0))return qa(t,d,e,n,r)}var p=l.find(n<0?-1:1);return(n<0?c:u)&&(p=Ja(t,p,n,p.line==e.line?a:null)),p?qa(t,p,e,n,r):null}}return e}function Za(t,e,i,n,r){var a=n||1,o=qa(t,e,i,a,r)||!r&&qa(t,e,i,a,!0)||qa(t,e,i,-a,r)||!r&&qa(t,e,i,-a,!0);return o||(t.cantEdit=!0,ce(t.first,0))}function Ja(t,e,i,n){return i<0&&0==e.ch?e.line>t.first?ge(t,ce(e.line-1)):null:i>0&&e.ch==(n||ee(t,e.line)).text.length?e.line=0;--r)io(t,{from:n[r].from,to:n[r].to,text:r?[""]:e.text,origin:e.origin});else io(t,e)}}function io(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ue(e.from,e.to)){var i=fa(t,e);Ma(t,e,i,t.cm?t.cm.curOp.id:NaN),ao(t,e,i,Ve(t,e));var n=[];_a(t,function(t,i){i||-1!=Y(n,t.history)||(uo(t.history,e),n.push(t.history)),ao(t,e,null,Ve(t,e))})}}function no(t,e,i){var n=t.cm&&t.cm.state.suppressEdits;if(!n||i){for(var r,a=t.history,o=t.sel,s="undo"==e?a.done:a.undone,l="undo"==e?a.undone:a.done,c=0;c=0;--p){var f=h(p);if(f)return f.v}}}}function ro(t,e){if(0!=e&&(t.first+=e,t.sel=new la(et(t.sel.ranges,function(t){return new ca(ce(t.anchor.line+e,t.anchor.ch),ce(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){$n(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,n=i.viewFrom;nt.lastLine())){if(e.from.linea&&(e={from:e.from,to:ce(a,ee(t,a).text.length),text:[e.text[0]],origin:e.origin}),e.removed=ie(t,e.from,e.to),i||(i=fa(t,e)),t.cm?oo(t.cm,e,n):xa(t,e,n),Xa(t,i,G),t.cantEdit&&Za(t,ce(t.firstLine(),0))&&(t.cantEdit=!1)}}function oo(t,e,i){var n=t.doc,r=t.display,a=e.from,o=e.to,s=!1,l=a.line;t.options.lineWrapping||(l=ae(ii(ee(n,a.line))),n.iter(l,o.line+1,function(t){if(t==r.maxLine)return s=!0,!0})),n.sel.contains(e.from,e.to)>-1&&St(t),xa(n,e,i,Nn(t)),t.options.lineWrapping||(n.iter(l,a.line+e.text.length,function(t){var e=ui(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),Pe(n,a.line),zr(t,400);var c=e.text.length-(o.line-a.line)-1;e.full?$n(t):a.line!=o.line||1!=e.text.length||ba(t.doc,e)?$n(t,a.line,o.line+1,c):Hn(t,a.line,"text");var u=kt(t,"changes"),d=kt(t,"change");if(d||u){var h={from:a,to:o,text:e.text,removed:e.removed,origin:e.origin};d&&Pi(t,"change",t,h),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}function so(t,e,i,n,r){var a;n||(n=i),ue(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),"string"==typeof e&&(e=t.splitLines(e)),eo(t,{from:i,to:n,text:e,origin:r})}function lo(t,e,i,n){i1||!(this.children[0]instanceof po))){var s=[];this.collapse(s),this.children=[new po(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=r.lines.length%25+25,s=o;s10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var n=0;n0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=D("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ei(t,e.line,e,i,a)||e.line!=i.line&&ei(t,i.line,e,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Be()}a.addToHistory&&Ma(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,i.line+1,function(n){c&&a.collapsed&&!c.options.lineWrapping&&ii(n)==c.display.maxLine&&(s=!0),a.collapsed&&l!=e.line&&re(n,0),We(n,new Ne(a,l==e.line?e.ch:null,l==i.line?i.ch:null),t.cm&&t.cm.curOp),++l}),a.collapsed&&t.iter(e.line,i.line+1,function(e){si(t,e)&&re(e,0)}),a.clearOnEnter&&bt(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Fe(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++yo,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)$n(c,e.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=i.line;u++)Hn(c,u,"text");a.atomic&&Ga(c.doc),Pi(c,"markerAdded",c,a)}return a}bo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Tr(t),kt(this,"clear")){var i=this.find();i&&Pi(this,"clear",i.from,i.to)}for(var n=null,r=null,a=0;at.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=n&&t&&this.collapsed&&$n(t,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ga(t.doc)),t&&Pi(t,"markerCleared",t,this,n,r),e&&Ir(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(t,e){var i,n;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)eo(this,n[l]);s?Ka(this,s):this.cm&&dr(this.cm)}),undo:Or(function(){no(this,"undo")}),redo:Or(function(){no(this,"redo")}),undoSelection:Or(function(){no(this,"undo",!0)}),redoSelection:Or(function(){no(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,n=0;n=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,i){t=ge(this,t),e=ge(this,e);var n=[],r=t.line;return this.iter(t.line,e.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r}),n},getAllMarks:function(){var t=[];return this.iter(function(e){var i=e.markedSpans;if(i)for(var n=0;nt)return e=t,!0;t-=a,++i}),ge(this,ce(i,e))},indexFromPos:function(t){t=ge(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var d=t.dataTransfer.getData("Text");if(d){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Xa(e.doc,da(i,i)),h)for(var p=0;p=0;e--)so(t.doc,"",n[e].from,n[e].to,"+delete");dr(t)})}function Zo(t,e,i){var n=dt(t.text,e+i,i);return n<0||n>t.text.length?null:n}function Jo(t,e,i){var n=Zo(t,e.ch,i);return null==n?null:new ce(e.line,n,i<0?"after":"before")}function Qo(t,e,i,n,r){if(t){"rtl"==e.doc.direction&&(r=-r);var a=mt(i,e.doc.direction);if(a){var o,s=r<0?tt(a):a[0],l=r<0==(1==s.level),c=l?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var u=on(e,i);o=r<0?i.text.length-1:0;var d=sn(e,u,o).top;o=ht(function(t){return sn(e,u,t).top==d},r<0==(1==s.level)?s.from:s.to-1,o),"before"==c&&(o=Zo(i,o,1))}else o=r<0?s.to:s.from;return new ce(n,o,c)}}return new ce(n,r<0?i.text.length:0,r<0?"before":"after")}function ts(t,e,i,n){var r=mt(e,t.doc.direction);if(!r)return Jo(e,i,n);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=vt(r,i.ch,i.sticky),o=r[a];if("ltr"==t.doc.direction&&o.level%2==0&&(n>0?o.to>i.ch:o.from=o.from&&h>=u.begin)){var p=d?"before":"after";return new ce(i.line,h,p)}}var f=function(t,e,n){for(var a=function(t,e){return e?new ce(i.line,l(t,1),"before"):new ce(i.line,t,"after")};t>=0&&t0==(1!=o.level),c=s?n.begin:l(n.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||n>0&&g==e.text.length||(v=f(n>0?0:r.length-1,n,c(g)),!v)?null:v}Ho.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"},Ho.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"},Ho.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"},Ho.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"]},Ho["default"]=b?Ho.macDefault:Ho.pcDefault;var es={selectAll:Qa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return qo(t,function(e){if(e.empty()){var i=ee(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line0)r=new ce(r.line,r.ch+1),t.replaceRange(a.charAt(r.ch-1)+a.charAt(r.ch-2),ce(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var o=ee(t.doc,r.line-1).text;o&&(r=new ce(r.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ce(r.line-1,o.length-1),r,"+transpose"))}i.push(new ca(r,r))}t.setSelections(i)})},newlineAndIndent:function(t){return Fr(t,function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var n=0;n-1&&(ue((r=s.ranges[r]).from(),e)<0||e.xRel>0)&&(ue(r.to(),e)>0||e.xRel<0)?As(t,n,e,a):Is(t,n,e,a)}function As(t,e,i,n){var r=t.display,a=!1,c=Br(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:tr(t)),_t(r.wrapper.ownerDocument,"mouseup",c),_t(r.wrapper.ownerDocument,"mousemove",u),_t(r.scroller,"dragstart",d),_t(r.scroller,"drop",c),a||(Tt(e),n.addNew||za(t.doc,i,null,null,n.extend),l&&!p||o&&9==s?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return a=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!n.moveOnDrag,bt(r.wrapper.ownerDocument,"mouseup",c),bt(r.wrapper.ownerDocument,"mousemove",u),bt(r.scroller,"dragstart",d),bt(r.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout(function(){return r.input.focus()},20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Ts(t,e,i){if("char"==i)return new ca(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new ca(ce(e.line,0),ge(t.doc,ce(e.line+1,0)));var n=i(t,e);return new ca(n.from,n.to)}function Is(t,e,i,n){o&&tr(t);var r=t.display,a=t.doc;Tt(e);var s,l,c=a.sel,u=c.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(i),s=l>-1?u[l]:new ca(i,i)):(s=a.sel.primary(),l=a.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new ca(i,i)),i=zn(t,e,!0,!0),l=-1;else{var d=Ts(t,i,n.unit);s=n.extend?Oa(s,d.anchor,d.head,n.extend):d}n.addNew?-1==l?(l=u.length,Ya(a,ua(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==n.unit&&!n.extend?(Ya(a,ua(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):$a(a,l,s,j):(l=0,Ya(a,new la([s],0),j),c=a.sel);var h=i;function p(e){if(0!=ue(h,e))if(h=e,"rectangle"==n.unit){for(var r=[],o=t.options.tabSize,u=V(ee(a,i.line).text,i.ch,o),d=V(ee(a,e.line).text,e.ch,o),p=Math.min(u,d),f=Math.max(u,d),v=Math.min(i.line,e.line),g=Math.min(t.lastLine(),Math.max(i.line,e.line));v<=g;v++){var m=ee(a,v).text,y=Z(m,p,o);p==f?r.push(new ca(ce(v,y),ce(v,y))):m.length>y&&r.push(new ca(ce(v,y),ce(v,Z(m,f,o))))}r.length||r.push(new ca(i,i)),Ya(a,ua(t,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,_=Ts(t,e,n.unit),w=x.anchor;ue(_.anchor,w)>0?(b=_.head,w=fe(x.from(),_.anchor)):(b=_.anchor,w=pe(x.to(),_.head));var C=c.ranges.slice(0);C[l]=Ms(t,new ca(ge(a,w),b)),Ya(a,ua(t,C,l),j)}}var f=r.wrapper.getBoundingClientRect(),v=0;function g(e){var i=++v,o=zn(t,e,!0,"rectangle"==n.unit);if(o)if(0!=ue(o,h)){t.curOp.focus=L(O(t)),p(o);var s=ar(r,a);(o.line>=s.to||o.linef.bottom?20:0;l&&setTimeout(Br(t,function(){v==i&&(r.scroller.scrollTop+=l,g(e))}),50)}}function m(e){t.state.selectingText=!1,v=1/0,e&&(Tt(e),r.input.focus()),_t(r.wrapper.ownerDocument,"mousemove",y),_t(r.wrapper.ownerDocument,"mouseup",b),a.history.lastSelOrigin=null}var y=Br(t,function(t){0!==t.buttons&&Pt(t)?g(t):m(t)}),b=Br(t,m);t.state.selectingText=b,bt(r.wrapper.ownerDocument,"mousemove",y),bt(r.wrapper.ownerDocument,"mouseup",b)}function Ms(t,e){var i=e.anchor,n=e.head,r=ee(t.doc,i.line);if(0==ue(i,n)&&i.sticky==n.sticky)return e;var a=mt(r);if(!a)return e;var o=vt(a,i.ch,i.sticky),s=a[o];if(s.from!=i.ch&&s.to!=i.ch)return e;var l,c=o+(s.from==i.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return e;if(n.line!=i.line)l=(n.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=vt(a,n.ch,n.sticky),d=u-o||(n.ch-i.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=a[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,v=p?"after":"before";return i.ch==f&&i.sticky==v?e:new ca(new ce(i.line,f,v),n)}function Es(t,e,i,n){var r,a;if(e.touches)r=e.touches[0].clientX,a=e.touches[0].clientY;else try{r=e.clientX,a=e.clientY}catch(h){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&Tt(e);var o=t.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!kt(t,i))return Mt(e);a-=s.top-o.viewOffset;for(var l=0;l=r){var u=oe(t.doc,a),d=t.display.gutterSpecs[l];return wt(t,i,t,u,d.className,e),Mt(e)}}}function Ds(t,e){return Es(t,e,"gutterClick",!0)}function Ps(t,e){Ui(t.display,e)||Ls(t,e)||Ct(t,e,"contextmenu")||S||t.display.input.onContextMenu(e)}function Ls(t,e){return!!kt(t,"gutterContextMenu")&&Es(t,e,"gutterContextMenu",!1)}function Rs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(t)}xs.prototype.compare=function(t,e,i){return this.time+bs>t&&0==ue(e,this.pos)&&i==this.button};var Fs={toString:function(){return"CodeMirror.Init"}},Bs={},Ns={};function Os(t){var e=t.optionHandlers;function i(i,n,r,a){t.defaults[i]=n,r&&(e[i]=a?function(t,e,i){i!=Fs&&r(t,e,i)}:r)}t.defineOption=i,t.Init=Fs,i("value","",function(t,e){return t.setValue(e)},!0),i("mode",null,function(t,e){t.doc.modeOption=e,ma(t)},!0),i("indentUnit",2,ma,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(t){ya(t),gn(t),$n(t)},!0),i("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var i=[],n=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var a=t.text.indexOf(e,r);if(-1==a)break;r=a+e.length,i.push(ce(n,a))}n++});for(var r=i.length-1;r>=0;r--)so(t.doc,e,i[r],ce(i[r].line,i[r].ch+e.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=Fs&&t.refresh()}),i("specialCharPlaceholder",bi,function(t){return t.refresh()},!0),i("electricChars",!0),i("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),i("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),i("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),i("rtlMoveVisually",!_),i("wholeLineUpdateBefore",!0),i("theme","default",function(t){Rs(t),ea(t)},!0),i("keyMap","default",function(t,e,i){var n=jo(e),r=i!=Fs&&jo(i);r&&r.detach&&r.detach(t,n),n.attach&&n.attach(t,r||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Ws,!0),i("gutters",[],function(t,e){t.display.gutterSpecs=Qr(e,t.options.lineNumbers),ea(t)},!0),i("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Bn(t.display)+"px":"0",t.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(t){return wr(t)},!0),i("scrollbarStyle","native",function(t){kr(t),wr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),i("lineNumbers",!1,function(t,e){t.display.gutterSpecs=Qr(t.options.gutters,e),ea(t)},!0),i("firstLineNumber",1,ea,!0),i("lineNumberFormatter",function(t){return t},ea,!0),i("showCursorWhenSelecting",!1,Un,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(t,e){"nocursor"==e&&(ir(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),i("screenReaderLabel",null,function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)}),i("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),i("dragDrop",!0,zs),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Un,!0),i("singleCursorHeightPerLine",!0,Un,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,ya,!0),i("addModeClass",!1,ya,!0),i("pollInterval",100),i("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),i("historyEventDelay",1250),i("viewportMargin",10,function(t){return t.refresh()},!0),i("maxHighlightLength",1e4,ya,!0),i("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),i("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),i("autofocus",null),i("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),i("phrases",null)}function zs(t,e,i){var n=i&&i!=Fs;if(!e!=!n){var r=t.display.dragFunctions,a=e?bt:_t;a(t.display.scroller,"dragstart",r.start),a(t.display.scroller,"dragenter",r.enter),a(t.display.scroller,"dragover",r.over),a(t.display.scroller,"dragleave",r.leave),a(t.display.scroller,"drop",r.drop)}}function Ws(t){t.options.lineWrapping?(R(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),di(t)),On(t),$n(t),gn(t),setTimeout(function(){return wr(t)},100)}function $s(t,e){var i=this;if(!(this instanceof $s))return new $s(t,e);this.options=e=e?H(e):{},H(Bs,e,!1);var n=e.value;"string"==typeof n?n=new To(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var r=new $s.inputStyles[e.inputStyle](this),a=this.display=new ia(t,n,r,e);for(var c in a.wrapper.CodeMirror=this,Rs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),kr(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 K,keySeq:null,specialChars:null},e.autofocus&&!y&&a.input.focus(),o&&s<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Hs(this),Fo(),Tr(this),this.curOp.forceUpdate=!0,wa(this,n),e.autofocus&&!y||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&er(i)},20):ir(this),Ns)Ns.hasOwnProperty(c)&&Ns[c](this,e[c],Fs);Jr(this),e.finishInit&&e.finishInit(this);for(var u=0;u400}bt(e.scroller,"touchstart",function(r){if(!Ct(t,r)&&!a(r)&&!Ds(t,r)){e.input.ensurePolled(),clearTimeout(i);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),bt(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),bt(e.scroller,"touchend",function(i){var n=e.activeTouch;if(n&&!Ui(e,i)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,o=t.coordsChar(e.activeTouch,"page");a=!n.prev||l(n,n.prev)?new ca(o,o):!n.prev.prev||l(n,n.prev.prev)?t.findWordAt(o):new ca(ce(o.line,0),ge(t.doc,ce(o.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Tt(i)}r()}),bt(e.scroller,"touchcancel",r),bt(e.scroller,"scroll",function(){e.scroller.clientHeight&&(gr(t,e.scroller.scrollTop),yr(t,e.scroller.scrollLeft,!0),wt(t,"scroll",t))}),bt(e.scroller,"mousewheel",function(e){return sa(t,e)}),bt(e.scroller,"DOMMouseScroll",function(e){return sa(t,e)}),bt(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){Ct(t,e)||Et(e)},over:function(e){Ct(t,e)||(Do(t,e),Et(e))},start:function(e){return Eo(t,e)},drop:Br(t,Mo),leave:function(e){Ct(t,e)||Po(t)}};var c=e.input.getField();bt(c,"keyup",function(e){return vs.call(t,e)}),bt(c,"keydown",Br(t,ps)),bt(c,"keypress",Br(t,gs)),bt(c,"focus",function(e){return er(t,e)}),bt(c,"blur",function(e){return ir(t,e)})}$s.defaults=Bs,$s.optionHandlers=Ns;var Vs=[];function Ks(t,e,i,n){var r,a=t.doc;null==i&&(i="add"),"smart"==i&&(a.mode.indent?r=Ce(t,e).state:i="prev");var o=t.options.tabSize,s=ee(a,e),l=V(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==i&&(c=a.mode.indent(r,s.text.slice(u.length),s.text),c==U||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>a.first?V(ee(a,e-1).text,null,o):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)h+=o,d+="\t";if(ho,l=Ot(e),c=null;if(s&&n.ranges.length>1)if(Ys&&Ys.text.join("\n")==e){if(n.ranges.length%Ys.text.length==0){c=[];for(var u=0;u=0;h--){var p=n.ranges[h],f=p.from(),v=p.to();p.empty()&&(i&&i>0?f=ce(f.line,f.ch-i):t.state.overwrite&&!s?v=ce(v.line,Math.min(ee(a,v.line).text.length,v.ch+tt(l).length)):s&&Ys&&Ys.lineWise&&Ys.text.join("\n")==l.join("\n")&&(f=v=ce(f.line,0)));var g={from:f,to:v,text:c?c[h%c.length]:l,origin:r||(s?"paste":t.state.cutIncoming>o?"cut":"+input")};eo(t.doc,g),Pi(t,"inputRead",t,g)}e&&!s&&js(t,e),dr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Gs(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||Fr(e,function(){return Us(e,i,0,null,"paste")}),!0}function js(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var a=t.getModeAt(r.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Ks(t,r.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(ee(t.doc,r.head.line).text.slice(0,r.head.ch))&&(o=Ks(t,r.head.line,"smart"));o&&Pi(t,"electricInput",t,r.head.line)}}}function qs(t){for(var e=[],i=[],n=0;ni&&(Ks(this,r.head.line,t,!0),i=r.head.line,n==this.doc.sel.primIndex&&dr(this));else{var a=r.from(),o=r.to(),s=Math.max(i,a.line);i=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$a(this.doc,n,new ca(a,c[n].to()),G)}}}),getTokenAt:function(t,e){return Ie(this,t,e)},getLineTokens:function(t,e){return Ie(this,ce(t),e,!0)},getTokenTypeAt:function(t){t=ge(this.doc,t);var e,i=we(this,ee(this.doc,t.line)),n=0,r=(i.length-1)/2,a=t.ch;if(0==a)e=i[2];else for(;;){var o=n+r>>1;if((o?i[2*o-1]:0)>=a)r=o;else{if(!(i[2*o+1]a&&(t=a,r=!0),n=ee(this.doc,t)}else n=t;return xn(this,n,{top:0,left:0},e||"page",i||r).top+(r?this.doc.height-ci(n):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,n,r){var a=this.display;t=Cn(this,ge(this.doc,t));var o=t.bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),a.sizer.appendChild(e),"over"==n)o=t.top;else if("above"==n||"near"==n){var l=Math.max(a.wrapper.clientHeight,this.doc.height),c=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(o=t.bottom),s+e.offsetWidth>c&&(s=c-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==r?(s=a.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(a.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),i&&lr(this,{left:s,top:o,right:s+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:Nr(ps),triggerOnKeyPress:Nr(gs),triggerOnKeyUp:vs,triggerOnMouseDown:Nr(ws),execCommand:function(t){if(es.hasOwnProperty(t))return es[t].call(null,this)},triggerElectric:Nr(function(t){js(this,t)}),findPosH:function(t,e,i,n){var r=1;e<0&&(r=-1,e=-e);for(var a=ge(this.doc,t),o=0;o0&&s(i.charAt(n-1)))--n;while(r.5||this.options.lineWrapping)&&On(this),wt(this,"refresh",this)}),swapDoc:Nr(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,t),gn(this),this.display.input.reset(),hr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Pi(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},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}},At(t),t.registerHelper=function(e,n,r){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][n]=r},t.registerGlobalHelper=function(e,n,r,a){t.registerHelper(e,n,a),i[e]._global.push({pred:r,val:a})}}function tl(t,e,i,n,r){var a=e,o=i,s=ee(t,e.line),l=r&&"rtl"==t.direction?-i:i;function c(){var i=e.line+l;return!(i=t.first+t.size)&&(e=new ce(i,e.ch,e.sticky),s=ee(t,i))}function u(a){var o;if("codepoint"==n){var u=s.text.charCodeAt(e.ch+(i>0?0:-1));if(isNaN(u))o=null;else{var d=i>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new ce(e.line,Math.max(0,Math.min(s.text.length,e.ch+i*(d?2:1))),-i)}}else o=r?ts(t.cm,s,e,i):Jo(s,e,i);if(null==o){if(a||!c())return!1;e=Qo(r,t.cm,s,e.line,l)}else e=o;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,p=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;;f=!1){if(i<0&&!u(!f))break;var v=s.text.charAt(e.ch)||"\n",g=st(v,p)?"w":h&&"\n"==v?"n":!h||/\s/.test(v)?null:"p";if(!h||f||g||(g="s"),d&&d!=g){i<0&&(i=1,u(),e.sticky="after");break}if(g&&(d=g),i>0&&!u(!f))break}var m=Za(t,e,a,o,!0);return de(a,m)&&(m.hitSide=!0),m}function el(t,e,i,n){var r,a,o=t.doc,s=e.left;if("page"==n){var l=Math.min(t.display.wrapper.clientHeight,W(t).innerHeight||o(t).documentElement.clientHeight),c=Math.max(l-.5*Ln(t.display),3);r=(i>0?e.bottom:e.top)+i*c}else"line"==n&&(r=i>0?e.bottom+3:e.top-3);for(;;){if(a=An(t,s,r),!a.outside)break;if(i<0?r<=0:r>=o.height){a.hitSide=!0;break}r+=5*i}return a}var il=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function nl(t,e){var i=an(t,e.line);if(!i||i.hidden)return null;var n=ee(t.doc,e.line),r=en(i,n,e.line),a=mt(n,t.doc.direction),o="left";if(a){var s=vt(a,e.ch);o=s%2?"right":"left"}var l=un(r.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function rl(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function al(t,e){return e&&(t.bad=!0),t}function ol(t,e,i,n,r){var a="",o=!1,s=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function u(){o&&(a+=s,l&&(a+=s),o=l=!1)}function d(t){t&&(u(),a+=t)}function h(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void d(i);var a,p=e.getAttribute("cm-marker");if(p){var f=t.findMarks(ce(n,0),ce(r+1,0),c(+p));return void(f.length&&(a=f[0].find(0))&&d(ie(t.doc,a.from,a.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var v=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;v&&u();for(var g=0;g=e.display.viewTo||a.line=e.display.viewFrom&&nl(e,r)||{node:l[0].measure.map[2],offset:0},u=a.linen.firstLine()&&(o=ce(o.line-1,ee(n.doc,o.line-1).length)),s.ch==ee(n.doc,s.line).text.length&&s.liner.viewTo-1)return!1;o.line==r.viewFrom||0==(t=Wn(n,o.line))?(e=ae(r.view[0].line),i=r.view[0].node):(e=ae(r.view[t].line),i=r.view[t-1].node.nextSibling);var l,c,u=Wn(n,s.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ae(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!i)return!1;var d=n.doc.splitLines(ol(n,i,c,e,l)),h=ie(n.doc,ce(e,0),ce(l,ee(n.doc,l).text.length));while(d.length>1&&h.length>1)if(tt(d)==tt(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}var p=0,f=0,v=d[0],g=h[0],m=Math.min(v.length,g.length);while(po.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1))p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var _=ce(e,p),w=ce(l,h.length?tt(h).length-f:0);return d.length>1||d[0]||ue(_,w)?(so(n.doc,d,_,w,"+input"),!0):void 0},il.prototype.ensurePolled=function(){this.forceCompositionEnd()},il.prototype.reset=function(){this.forceCompositionEnd()},il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},il.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},il.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Fr(this.cm,function(){return $n(t.cm)})},il.prototype.setUneditable=function(t){t.contentEditable="false"},il.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Br(this.cm,Us)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},il.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},il.prototype.onContextMenu=function(){},il.prototype.resetPosition=function(){},il.prototype.needsContentAttribute=!0;var cl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ul(t,e){if(e=e?H(e):{},e.value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=L(z(t));e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function n(){t.value=s.getValue()}var r;if(t.form&&(bt(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var a=t.form;r=a.submit;try{var o=a.submit=function(){n(),a.submit=r,a.submit(),a.submit=o}}catch(l){}}e.finishInit=function(i){i.save=n,i.getTextArea=function(){return t},i.toTextArea=function(){i.toTextArea=isNaN,n(),t.parentNode.removeChild(i.getWrapperElement()),t.style.display="",t.form&&(_t(t.form,"submit",n),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var s=$s(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s}function dl(t){t.off=_t,t.on=bt,t.wheelEventPixels=oa,t.Doc=To,t.splitLines=Ot,t.countColumn=V,t.findColumn=Z,t.isWordChar=ot,t.Pass=U,t.signal=wt,t.Line=hi,t.changeEnd=ha,t.scrollbarModel=Sr,t.Pos=ce,t.cmpPos=ue,t.modes=Vt,t.mimeModes=Kt,t.resolveMode=Ut,t.getMode=Gt,t.modeExtensions=jt,t.extendMode=qt,t.copyState=Zt,t.startState=Qt,t.innerMode=Jt,t.commands=es,t.keyMap=Ho,t.keyName=Go,t.isModifierKey=Xo,t.lookupKey=Yo,t.normalizeKeyMap=Ko,t.StringStream=te,t.SharedTextMarker=_o,t.TextMarker=bo,t.LineWidget=vo,t.e_preventDefault=Tt,t.e_stopPropagation=It,t.e_stop=Et,t.addClass=R,t.contains=P,t.rmClass=T,t.keyNames=Oo}cl.prototype.init=function(t){var e=this,i=this,n=this.cm;this.createField(t);var r=this.textarea;function a(t){if(!Ct(n,t)){if(n.somethingSelected())Xs({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var e=qs(n);Xs({lineWise:!0,text:e.text}),"cut"==t.type?n.setSelections(e.ranges,null,G):(i.prevInput="",r.value=e.text.join("\n"),B(r))}"cut"==t.type&&(n.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),bt(r,"input",function(){o&&s>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()}),bt(r,"paste",function(t){Ct(n,t)||Gs(t,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())}),bt(r,"cut",a),bt(r,"copy",a),bt(t.scroller,"paste",function(e){if(!Ui(t,e)&&!Ct(n,e)){if(!r.dispatchEvent)return n.state.pasteIncoming=+new Date,void i.focus();var a=new Event("paste");a.clipboardData=e.clipboardData,r.dispatchEvent(a)}}),bt(t.lineSpace,"selectstart",function(e){Ui(t,e)||Tt(e)}),bt(r,"compositionstart",function(){var t=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:n.markText(t,n.getCursor("to"),{className:"CodeMirror-composing"})}}),bt(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},cl.prototype.createField=function(t){this.wrapper=Js(),this.textarea=this.wrapper.firstChild;var e=this.cm.options;Zs(this.textarea,e.spellcheck,e.autocorrect,e.autocapitalize)},cl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},cl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,n=Gn(t);if(t.options.moveInputWithCursor){var r=Cn(t,i.sel.primary().head,"div"),a=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+o.left-a.left))}return n},cl.prototype.showSelection=function(t){var e=this.cm,i=e.display;M(i.cursorDiv,t.cursors),M(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},cl.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var e=this.cm;if(this.resetting=!0,e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&B(this.textarea),o&&s>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},cl.prototype.getField=function(){return this.textarea},cl.prototype.supportsTouch=function(){return!1},cl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||L(z(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(t){}},cl.prototype.blur=function(){this.textarea.blur()},cl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cl.prototype.receivedFocus=function(){this.slowPoll()},cl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},cl.prototype.fastPoll=function(){var t=!1,e=this;function i(){var n=e.poll();n||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,i))}e.pollingFast=!0,e.polling.set(20,i)},cl.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!e.state.focused||zt(i)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=i.value;if(r==n&&!e.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===r||b&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=r.charCodeAt(0);if(8203!=a||n||(n="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}var l=0,c=Math.min(n.length,r.length);while(l1e3||r.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},cl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cl.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},cl.prototype.onContextMenu=function(t){var e=this,i=e.cm,n=i.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=zn(i,t),c=n.scroller.scrollTop;if(a&&!h){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(a)&&Br(i,Ya)(i.doc,da(a),G);var d,p=r.style.cssText,f=e.wrapper.style.cssText,v=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-v.top-5)+"px; left: "+(t.clientX-v.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(d=r.ownerDocument.defaultView.scrollY),n.input.focus(),l&&r.ownerDocument.defaultView.scrollTo(null,d),n.input.reset(),i.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=y,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll),o&&s>=9&&m(),S){Et(t);var g=function(){_t(window,"mouseup",g),setTimeout(y,20)};bt(window,"mouseup",g)}else setTimeout(y,50)}function m(){if(null!=r.selectionStart){var t=i.somethingSelected(),a="​"+(t?r.value:"");r.value="⇚",r.value=a,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=a.length,n.selForContextMenu=i.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=p,o&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=r.selectionStart)){(!o||o&&s<9)&&m();var t=0,a=function(){n.selForContextMenu==i.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Br(i,Qa)(i):t++<10?n.detectingSelectAll=setTimeout(a,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(a,200)}}},cl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},cl.prototype.setUneditable=function(){},cl.prototype.needsContentAttribute=!1,Os($s),Qs($s);var hl="iter insert remove copy getEditor constructor".split(" ");for(var pl in To.prototype)To.prototype.hasOwnProperty(pl)&&Y(hl,pl)<0&&($s.prototype[pl]=function(t){return function(){return t.apply(this.doc,arguments)}}(To.prototype[pl]));return At(To),$s.inputStyles={textarea:cl,contenteditable:il},$s.defineMode=function(t){$s.defaults.mode||"null"==t||($s.defaults.mode=t),Yt.apply(this,arguments)},$s.defineMIME=Xt,$s.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),$s.defineMIME("text/plain","null"),$s.defineExtension=function(t,e){$s.prototype[t]=e},$s.defineDocExtension=function(t,e){To.prototype[t]=e},$s.fromTextArea=ul,dl($s),$s.version="5.65.16",$s})},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 r=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.")},a=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=a(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,r=t.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;e[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=r,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-r%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).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=[],r=0;r>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(a))}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)))}},f=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,r=n.words,a=n.sigBytes,o=this.blockSize,s=4*o,l=a/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,a);if(u){for(var h=0;h>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=h,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=h;for(r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=n._createHelper(l)}(),t.RabbitLegacy})},35038:function(t,e,i){"use strict";i.d(e,{Qo:function(){return a},_3:function(){return u},dp:function(){return o},iO:function(){return c},mk:function(){return s},ms:function(){return l},z6:function(){return d}});var n=i(75769),r={GetWatchlist:"/api/market/watchlist/get",AddWatchlist:"/api/market/watchlist/add",RemoveWatchlist:"/api/market/watchlist/remove",GetWatchlistPrices:"/api/market/watchlist/prices",MultiAnalysis:"/api/analysis/multiAnalysis",CreateAnalysisTask:"/api/analysis/createTask",GetAnalysisTaskStatus:"/api/analysis/getTaskStatus",GetAnalysisHistoryList:"/api/analysis/getHistoryList",DeleteAnalysisTask:"/api/analysis/deleteTask",ReflectAnalysis:"/api/analysis/reflect",ChatMessage:"/api/ai/chat/message",GetChatHistory:"/api/ai/chat/history",SaveChatHistory:"/api/ai/chat/history/save",GetConfig:"/api/market/config",GetMenuFooterConfig:"/api/market/menuFooterConfig",GetMarketTypes:"/api/market/types",SearchSymbols:"/api/market/symbols/search",GetHotSymbols:"/api/market/symbols/hot"};function a(t){return(0,n.Ay)({url:r.GetWatchlist,method:"get",params:t})}function o(t){return(0,n.Ay)({url:r.AddWatchlist,method:"post",data:t})}function s(t){return(0,n.Ay)({url:r.RemoveWatchlist,method:"post",data:t})}function l(t){return(0,n.Ay)({url:r.GetWatchlistPrices,method:"get",params:{watchlist:JSON.stringify(t.watchlist||[])}})}function c(){return(0,n.Ay)({url:r.GetMarketTypes,method:"get"})}function u(t){return(0,n.Ay)({url:r.SearchSymbols,method:"get",params:t})}function d(t){return(0,n.Ay)({url:r.GetHotSymbols,method:"get",params:t})}},36308:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,r=e.algo,a=r.SHA256,o=r.SHA224=a.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=a._createHelper(o),e.HmacSHA224=a._createHmacHelper(o)}(),t.SHA224})},38454:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e}(),t.mode.ECB})},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,r=i.WordArray,a=e.algo,o=a.MD5,s=a.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,a=n.hasher.create(),o=r.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.length>>8^255&r^99,a[i]=r,o[r]=i;var v=t[i],g=t[v],m=t[g],y=257*t[r]^16843008*r;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*v^16843008*i;d[r]=y<<24|y>>>8,h[r]=y<<16|y>>>16,p[r]=y<<8|y>>>24,f[r]=y,i?(i=v^t[t[t[m^v]]],n^=t[t[n]]):i=n=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],g=r.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,r=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u]):(u=u<<8|u>>>24,u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u],u^=v[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[a[u>>>16&255]]^p[a[u>>>8&255]]^f[a[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,a)},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,f,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,r,a,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,f=1;f>>24]^r[u>>>16&255]^a[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^r[d>>>16&255]^a[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^r[h>>>16&255]^a[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^r[c>>>16&255]^a[u>>>8&255]^o[255&d]^i[p++];c=v,u=g,d=m,h=y}v=(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]=v,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},42073:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.AnsiX923={pad:function(t,e){var i=t.sigBytes,n=4*e,r=n-i%n,a=i+r-1;t.clamp(),t.words[a>>>2]|=r<<24-a%4*8,t.sigBytes+=r},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923})},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,r=e.algo;const a=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,r=e>>8&255,a=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][r],o+=t.sbox[3][a],o}function u(t,e,i){let n,r=e,o=i;for(let s=0;s1;--s)r^=t.pbox[s],o=c(t,r)^o,n=r,r=o,o=n;return n=r,r=o,o=n,o^=t.pbox[1],r^=t.pbox[0],{left:r,right:o}}function h(t,e,i){for(let a=0;a<4;a++){t.sbox[a]=[];for(let e=0;e<256;e++)t.sbox[a][e]=s[a][e]}let n=0;for(let s=0;s=i&&(n=0);let r=0,l=0,c=0;for(let o=0;o>>31}var d=(n<<5|n>>>27)+l+o[c];d+=c<20?1518500249+(r&a|~r&s):c<40?1859775393+(r^a^s):c<60?(r&a|r&s|a&s)-1894007588:(r^a^s)-899497514,l=s,s=a,a=r<<30|r>>>2,r=n,n=d}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+s|0,i[4]=i[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(i/4294967296),e[15+(n+64>>>9<<4)]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s)}(),t.SHA1})},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,r=e.enc;r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=t.charCodeAt(r)<<16-r%2*16;return n.create(i,2*e)}};function a(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=a(t.charCodeAt(r)<<16-r%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},45953:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.x64,s=o.Word,l=i.algo,c=[],u=[],d=[];(function(){for(var t=1,e=0,i=0;i<24;i++){c[t+5*e]=(i+1)*(i+2)/2%64;var n=e%5,r=(2*t+3*e)%5;t=n,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var a=1,o=0;o<24;o++){for(var l=0,h=0,p=0;p<7;p++){if(1&a){var f=(1<>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);var s=i[r];s.high^=o,s.low^=a}for(var l=0;l<24;l++){for(var p=0;p<5;p++){for(var f=0,v=0,g=0;g<5;g++){s=i[p+5*g];f^=s.high,v^=s.low}var m=h[p];m.high=f,m.low=v}for(p=0;p<5;p++){var y=h[(p+4)%5],b=h[(p+1)%5],x=b.high,_=b.low;for(f=y.high^(x<<1|_>>>31),v=y.low^(_<<1|x>>>31),g=0;g<5;g++){s=i[p+5*g];s.high^=f,s.low^=v}}for(var w=1;w<25;w++){s=i[w];var C=s.high,S=s.low,k=c[w];k<32?(f=C<>>32-k,v=S<>>32-k):(f=S<>>64-k,v=C<>>64-k);var A=h[u[w]];A.high=f,A.low=v}var T=h[0],I=i[0];T.high=I.high,T.low=I.low;for(p=0;p<5;p++)for(g=0;g<5;g++){w=p+5*g,s=i[w];var M=h[w],E=h[(p+1)%5+5*g],D=h[(p+2)%5+5*g];s.high=M.high^~E.high&D.high,s.low=M.low^~E.low&D.low}s=i[0];var P=d[l];s.high^=P.high,s.low^=P.low}},_doFinalize:function(){var t=this._data,i=t.words,n=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;i[n>>>5]|=1<<24-n%32,i[(e.ceil((n+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*i.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new r.init(c,s)},clone:function(){for(var t=a.clone.call(this),e=t._state=this._state.slice(0),i=0;i<25;i++)e[i]=e[i].clone();return t}});i.SHA3=a._createHelper(p),i.HmacSHA3=a._createHmacHelper(p)}(Math),t.SHA3})},50436:function(t,e,i){(function(t){t(i(15237))})(function(t){"use strict";var e="CodeMirror-activeline",i="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function r(t){for(var r=0;rn&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),o=this._iKey=e.clone(),s=r.words,l=o.words,c=0;c=0;i--)if(e[i>>>2]>>>24-i%4*8&255){t.sigBytes=i+1;break}}},t.pad.ZeroPadding})},54905:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso10126={pad:function(e,i){var n=4*i,r=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(r-1)).concat(t.lib.WordArray.create([r<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126})},55218:function(t,e,i){(function(t){t(i(15237))})(function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},i=t.Pos;function n(t,i){return"pairs"==i&&"string"==typeof t?t:"object"==typeof t&&null!=t[i]?t[i]:e[i]}t.defineOption("autoCloseBrackets",!1,function(e,i,o){o&&o!=t.Init&&(e.removeKeyMap(r),e.state.closeBrackets=null),i&&(a(n(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(r))});var r={Backspace:l,Enter:c};function a(t){for(var e=0;e=0;l--){var u=o[l].head;e.replaceRange("",i(u.line,u.ch-1),i(u.line,u.ch+1),"+delete")}}function c(e){var i=s(e),r=i&&n(i,"explode");if(!r||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),o=0;o0?{line:o.head.line,ch:o.head.ch+e}:{line:o.head.line-1};i.push({anchor:s,head:s})}t.setSelections(i,r)}function d(e){var n=t.cmpPos(e.anchor,e.head)>0;return{anchor:new i(e.anchor.line,e.anchor.ch+(n?-1:1)),head:new i(e.head.line,e.head.ch+(n?1:-1))}}function h(e,r){var a=s(e);if(!a||e.getOption("disableInput"))return t.Pass;var o=n(a,"pairs"),l=o.indexOf(r);if(-1==l)return t.Pass;for(var c,h=n(a,"closeBefore"),p=n(a,"triples"),v=o.charAt(l+1)==r,g=e.listSelections(),m=l%2==0,y=0;y1&&p.indexOf(r)>=0&&e.getRange(i(_.line,_.ch-2),_)==r+r){if(_.ch>2&&/\bstring/.test(e.getTokenTypeAt(i(_.line,_.ch-2))))return t.Pass;b="addFour"}else if(v){var C=0==_.ch?" ":e.getRange(i(_.line,_.ch-1),_);if(t.isWordChar(w)||C==r||t.isWordChar(C))return t.Pass;b="both"}else{if(!m||!(0===w.length||/\s/.test(w)||h.indexOf(w)>-1))return t.Pass;b="both"}else b=v&&f(e,_)?"both":p.indexOf(r)>=0&&e.getRange(_,i(_.line,_.ch+3))==r+r+r?"skipThree":"skip";if(c){if(c!=b)return t.Pass}else c=b}var S=l%2?o.charAt(l-1):r,k=l%2?r:o.charAt(l+1);e.operation(function(){if("skip"==c)u(e,1);else if("skipThree"==c)u(e,3);else if("surround"==c){for(var t=e.getSelections(),i=0;i>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:f,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=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},b=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?a.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=a.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},x=n.SerializableCipher=r.extend({cfg:r.extend({format:b}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=t.createEncryptor(i,n),a=r.finalize(e),o=r.cfg;return m.create({ciphertext:a,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 r=t.createDecryptor(i,n).finalize(e.ciphertext);return r},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),_=i.kdf={},w=_.OpenSSL={execute:function(t,e,i,n,r){if(n||(n=a.random(8)),r)o=u.create({keySize:e+i,hasher:r}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=a.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},C=n.PasswordBasedCipher=x.extend({cfg:x.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=r.iv;var a=x.encrypt.call(this,t,e,r.key,n);return a.mixIn(r),a},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var r=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=r.iv;var a=x.decrypt.call(this,t,e,r.key,n);return a}})}()})},58124:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})},61756:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return la}});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)],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("backtest-modal",{attrs:{visible:t.showBacktestModal,userId:t.userId,indicator:t.backtestIndicator,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe},on:{cancel:function(e){t.showBacktestModal=!1,t.backtestIndicator=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("backtest-history-drawer",{attrs:{visible:t.showBacktestHistoryDrawer,userId:t.userId,indicatorId:t.backtestHistoryIndicator?t.backtestHistoryIndicator.id:null,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe,isMobile:t.isMobile},on:{cancel:function(e){t.showBacktestHistoryDrawer=!1,t.backtestHistoryIndicator=null},view:t.handleViewBacktestRun}}),e("backtest-run-viewer",{attrs:{visible:t.showBacktestRunViewer,run:t.selectedBacktestRun},on:{cancel:function(e){t.showBacktestRunViewer=!1,t.selectedBacktestRun=null}}}),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}})],1)},r=[],a=(i(96305),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(89999),i(18787)),d=i(76338),h=i(85471),p=i(95353),f=i(75769),v=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=[],b=i(57532),x=i(15237),_=i.n(x),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),C=i.n(w),S=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,f.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=_()(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,r,a,o,s,c,u,d,h,p,f,v,g,m,y,x,_,w,k,A,T,I,M,E;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,r="/api/indicator/aiGenerate",a=C().get(S.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:a?"Bearer ".concat(a):"","Access-Token":a||"",Token:a||""},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,f=p.done,v=p.value,!f){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(v,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,b.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(x=y.value,x.trim()&&x.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(_=x.substring(6),"[DONE]"!==_){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(_),!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),A=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:A-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,M=e.v,m.e(M);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(T=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(T),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,E=e.v,t.$message.error(E.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(I=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(I));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]])}))()}}},A=k,T=i(81656),I=(0,T.A)(A,m,y,!1,null,"4fea1865",null),M=I.exports,E=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=[];function P(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],i=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}throw new TypeError((0,o.A)(t)+" is not iterable")}var L=i(26297),R=i(2403),F=function(t,e){return F=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])},F(t,e)};function B(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}F(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,W,$,H,V,K,Y,X=function(){return X=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&r[r.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[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 q(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=a.next()).done)o.push(n.value)}catch(s){r={error:s}}finally{try{n&&!n.done&&(i=a["return"])&&i.call(a)}finally{if(r)throw r.error}}return o}function Z(t,e,i){if(i||2===arguments.length)for(var n,r=0,a=e.length;r1e9)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 Wt(t,e){var i="".concat(t),n=i.match(/\.0*(\d+)/);if(It(n)&&parseInt(n[1])>0){var r=n[0].length-1-n[1].length;if(r>=e)return i.replace(/\.0*/,".0{".concat(r,"}"))}return i}function $t(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 Vt(t,e,i,n){if(!It(Dt)){var r=document.createElement("canvas"),a=$t(r);Dt=r.getContext("2d"),Dt.scale(a,a)}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"})(Pt||(Pt={}));var Kt,Yt=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 Xt(t,e,i,n,r){var a,o=e.result,s=e.figures,l=e.styles,c=Ft(l,"circles",n.circles),u=c.length,d=Ft(l,"bars",n.bars),h=d.length,p=Ft(l,"lines",n.lines),f=p.length,v=0,g=0,m=0;s.forEach(function(s){var l;switch(s.type){case"circle":var y=c[v%u];a=X(X({},y),{color:y.noChangeColor}),v++;break;case"bar":var b=d[g%h];a=X(X({},b),{color:b.noChangeColor}),g++;break;case"line":a=p[m%f],m++;break}if(It(a)){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]}},_=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);r(s,X(X({},a),_))}})}(function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"})(Kt||(Kt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,r=t.calcParams,a=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,f=t.extendData,v=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:Kt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==r&&void 0!==r?r:[],this.figures=null!==a&&void 0!==a?a:[],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=Ct(null!==p&&void 0!==p?p:{}),this.extendData=f,this.regenerateFigures=null!==v&&void 0!==v?v: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 U(this,void 0,void 0,function(){var e;return G(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 B(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function jt(){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,Zt=1,Jt=-1,Qt="overlay_",te="overlay_figure_",ee=Number.MAX_SAFE_INTEGER,ie=function(){function t(t){this.currentStep=Zt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,r=t.styles,a=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,f=t.createXAxisFigures,v=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,b=t.onDrawing,x=t.onDrawEnd,_=t.onClick,w=t.onDoubleClick,C=t.onRightClick,S=t.onPressedMoveStart,k=t.onPressedMoving,A=t.onPressedMoveEnd,T=t.onMouseEnter,I=t.onMouseLeave,M=t.onRemoved,E=t.onSelected,D=t.onDeselected;this.name=a,this.totalStep=!Tt(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=Ct(null!==r&&void 0!==r?r:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==f&&void 0!==f?f:null,this.createYAxisFigures=null!==v&&void 0!==v?v: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!==b&&void 0!==b?b:null,this.onDrawEnd=null!==x&&void 0!==x?x:null,this.onClick=null!==_&&void 0!==_?_:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==C&&void 0!==C?C:null,this.onPressedMoveStart=null!==S&&void 0!==S?S:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==A&&void 0!==A?A:null,this.onMouseEnter=null!==T&&void 0!==T?T:null,this.onMouseLeave=null!==I&&void 0!==I?I:null,this.onRemoved=null!==M&&void 0!==M?M:null,this.onSelected=null!==E&&void 0!==E?E:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Et(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Et(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=Z([],q(t),!1),t.length>=this.totalStep-1?(this.currentStep=Jt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=a:r=a,o<=2)break}return n}function de(t){var e=Math.floor(ve(t)),i=ge(e),n=t/i,r=0;return r=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=r*i,e>=-20?+t.toFixed(e<0?-e:0):t}function he(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function pe(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function fe(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var r,a;n[0]=Math.max(null!==(r=t[e])&&void 0!==r?r:t,n[0]),n[1]=Math.min(null!==(a=t[i])&&void 0!==a?a:t,n[1])}),n}function ve(t){return Math.log(t)/Math.log(10)}function ge(t){return Math.pow(10,t)}function me(){return{from:0,to:0,realFrom:0,realTo:0}}(function(t){t["Forward"]="forward",t["Backward"]="backward"})(re||(re={}));var ye={MIN:1,MAX:50},be=6,xe=50,_e=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=be,this._offsetRightDistance=xe,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=me(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t=Math.floor(.82*this._barSpace),e=Math.floor(this._barSpace),i=Math.min(t,e-1);return Math.max(1,i)},t.prototype.adjustVisibleRange=function(){var t,e,i,n,r=this._chartStore.getDataList(),a=r.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,a);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-a+Math.min(n,a);this._lastBarRightSideDiffBarCounta&&(c=a);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(a+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Pt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=r[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:re.Forward,data:null!==p&&void 0!==p?p:null})}c===a&&this._chartStore.executeLoadDataCallback({type:re.Backward,data:null!==(e=r[a-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"};Et(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){bt("","","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:this._gapBarSpace/2}},t.prototype.setBarSpace=function(t,e){tye.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;this._chartStore.getActionStore().execute(Pt.OnScroll),this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)}},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:ue(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)-.5},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 r=null!==e&&void 0!==e?e:null;if(!Tt(null===r||void 0===r?void 0:r.x)){var a=this._chartStore.getTooltipStore().getCrosshair();r={x:null!==(i=null===a||void 0===a?void 0:a.x)&&void 0!==i?i:this._totalBarSpace/2}}this._chartStore.getActionStore().execute(Pt.OnZoom);var o=r.x,s=this.coordinateToFloatIndex(o),l=this._barSpace+t*(this._barSpace/10);this.setBarSpace(l,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)})}},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=me()},t}(),we={name:"AVP",shortName:"AVP",series:Kt.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,r,a={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(r=null===t||void 0===t?void 0:t.volume)&&void 0!==r?r:0;return e+=o,i+=s,0!==i&&(a.avp=e/i),a})}},Ce={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):Ft(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]),r=0,a=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(r+=u,a+=u,l>=i[0]-1){o=r/i[0];var d=t[l-(i[0]-1)];r-=(d.low+d.high)/2}if(l>=i[1]-1){s=a/i[1];d=t[l-(i[1]-1)];a-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Se={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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,l){var c;if(r[l]=(null!==(c=r[l])&&void 0!==c?c:0)+s,a>=e-1){var u=r[l]/i[l];o[n[l].key]=(s-u)/u*100,r[l]-=t[a-(e-1)].close}}),o})}};function ke(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 Ae={name:"BOLL",shortName:"BOLL",series:Kt.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,r=0;return t.map(function(e,a){var o=e.close,s={};if(r+=o,a>=n){s.mid=r/i[0];var l=ke(t.slice(a-n,a+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,r-=t[a-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,r=0,a=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,f=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(a+=d-p,o+=p-h,n+=d-f,r+=f-h,s>=i[0]-1){u.ar=0!==o?a/o*100:0,u.br=0!==r?n/r*100:0;var v=t[s-(i[0]-1)],g=v.high,m=v.low,y=v.open,b=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-b,r-=b-m,a-=g-y,o-=y-m}return u})}},Ie={name:"BBI",shortName:"BBI",series:Kt.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,Z([],q(i),!1)),r=[],a=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;r[i]=(null!==(n=r[i])&&void 0!==n?n:0)+l,o>=e-1&&(a[i]=r[i]/e,r[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;a.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Me={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,r=0,a=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(r+=l,a.push(l),o>=n){var c=r/i[0],u=a.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;r-=p}return s})}},Ee={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),r=Math.ceil(i[2]/2.5+1),a=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,f=[],v=[];return t.forEach(function(e,g){var m,y,b,x,_,w={},C=null!==(m=t[g-1])&&void 0!==m?m:e,S=(C.high+C.close+C.low+C.open)/4,k=Math.max(0,e.high-S),A=Math.max(0,S-e.low);g>=i[0]-1&&(w.cr=0!==A?k/A*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=v[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]+r-3&&(w.ma2=u[u.length-1-r]),c-=null!==(b=v[g-(i[2]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+a-3&&(w.ma3=h[h.length-1-a]),d-=null!==(x=v[g-(i[3]-1)].cr)&&void 0!==x?x:0),g>=i[0]+i[4]-2&&(f.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=f[f.length-1-o]),p-=null!==(_=v[g-(i[4]-1)].cr)&&void 0!==_?_:0)),v.push(w)}),v}},De={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]),r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;r+=d,a+=d;var h=0,p=0;if(l>=i[0]-1&&(h=r/i[0],r-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=a/i[1],a-=t[l-(i[1]-1)].close),l>=n-1){var f=h-p;u.dma=f,o+=f,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}},Pe={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,r=0,a=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,f,v={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,b=e.low,x=y-b,_=Math.abs(y-m),w=Math.abs(m-b),C=y-g.high,S=g.low-b,k=Math.max(Math.max(x,_),w),A=C>0&&C>S?C:0,T=S>0&&S>C?S:0;if(n+=k,r+=A,a+=T,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+A,l=l-l/i[0]+T):(o=n,s=r,l=a);var I=0,M=0;0!==o&&(I=100*s/o,M=100*l/o),v.pdi=I,v.mdi=M;var E=0;M+I!==0&&(E=Math.abs(M-I)/(M+I)*100),c+=E,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+E)/i[0]:c/i[0],v.adx=u,h>=2*i[0]+i[1]-3&&(v.adxr=((null!==(f=d[h-(i[1]-1)].adx)&&void 0!==f?f:0)+u)/2))}d.push(v)}),d}},Le={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,r=[];return t.map(function(e,a){var o,s={};if(a>0){var l=t[a-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,r.push(s.emv),a>=i[0]&&(s.maEmv=n/i[0],n-=r[a-i[0]])}return s})}},Re={name:"EMA",shortName:"EMA",series:Kt.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,r=0,a=[];return t.map(function(t,e){var o={},s=t.close;return r+=s,i.forEach(function(t,i){e>=t-1&&(a[i]=e>t-1?(2*s+(t-1)*a[i])/(t+1):r/t,o[n[i].key]=a[i])}),o})}},Fe={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,r=[];return t.forEach(function(e,a){var o,s={};if(a>=i[0]){var l=e.close,c=t[a-i[0]].close;s.mtm=l-c,n+=s.mtm,a>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=r[a-(i[1]-1)].mtm)&&void 0!==o?o:0)}r.push(s)}),r}},Be={name:"MA",shortName:"MA",series:Kt.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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,i){var l;r[i]=(null!==(l=r[i])&&void 0!==l?l:0)+s,a>=e-1&&(o[n[i].key]=r[i]/e,r[i]-=t[a-(e-1)].close)}),o})}},Ne={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,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Ft(e.styles,"bars[0].downColor",i.bars[0].downColor):Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=r[0]-1&&(i=e>r[0]-1?(2*d+(r[0]-1)*i)/(r[0]+1):a/r[0]),e>=r[1]-1&&(n=e>r[1]-1?(2*d+(r[1]-1)*n)/(r[1]+1):a/r[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+r[2]-2&&(l=e>c+r[2]-2?(2*o+l*(r[2]-1))/(r[2]+1):s/r[2],u.macd=2*(o-l),u.dea=l)),u})}},Oe={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,r=0,a=[];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&&(r+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:r};n+=r,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=a[o-(i[0]-1)].obv)&&void 0!==u?u:0),a.push(h)}),a}},ze={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var r,a,o={},s=i.close,l=null!==(r=i.volume)&&void 0!==r?r:1,c=(null!==(a=t[n-1])&&void 0!==a?a:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},We={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,r=0,a=[],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;a.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,r+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=r/i[1],r-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=a[s-(i[0]-1)]),o.push(u)}),o}},$e={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=[],r=0;return t.forEach(function(e,a){var o,s,l={};if(a>=i[0]-1){var c=e.close,u=(null!==(o=t[a-i[0]])&&void 0!==o?o:t[a-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,r+=l.roc,a>=i[0]-1+i[1]-1&&(l.maRoc=r/i[1],r-=null!==(s=n[a-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},He={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,r=[],a=[];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?r[i]=(null!==(s=r[i])&&void 0!==s?s:0)+u:a[i]=(null!==(c=a[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==a[i]?l[n[i].key]=100-100/(1+r[i]/a[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,f=h.close-p.close;f>0?r[i]-=f:a[i]-=Math.abs(f)}}),l})}},Ve={name:"SMA",shortName:"SMA",series:Kt.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,r=0;return t.map(function(t,e){var a={},o=t.close;return n+=o,e>=i[0]-1&&(r=e>i[0]-1?(o*i[1]+r*(i[0]-i[1]+1))/(i[0]+1):n/i[0],a.sma=r),a})}},Ke={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,r){var a,o,s,l,c={},u=e.close;if(r>=i[0]-1){var d=fe(t.slice(r-(i[0]-1),r+1),"high","low"),h=d[0],p=d[1],f=h-p,v=(u-p)/(0===f?1:f)*100;c.k=((i[1]-1)*(null!==(o=null===(a=n[r-1])||void 0===a?void 0:a.k)&&void 0!==o?o:50)+v)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[r-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}},Ye={name:"SAR",shortName:"SAR",series:Kt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,r,a=t.current,o=null!==(r=null===(n=a.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,s=a.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+r,a)),c=u+o*(s-u);var f=Math.max(t[Math.max(1,i)-1].high,d);c=a[0]-1&&(i=e>a[0]-1?(2*p+(a[0]-1)*i)/(a[0]+1):o/a[0],s+=i,e>=2*a[0]-2&&(n=e>2*a[0]-2?(2*i+(a[0]-1)*n)/(a[0]+1):s/a[0],l+=n,e>=3*a[0]-3))){var f=void 0,v=0;e>3*a[0]-3?(f=(2*n+(a[0]-1)*r)/(a[0]+1),v=(f-r)/r*100):f=l/a[0],r=f,h.trix=v,c+=v,e>=3*a[0]+a[1]-4&&(h.maTrix=c/a[1],c-=null!==(d=u[e-(a[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}},Ue={name:"VOL",shortName:"VOL",series:Kt.Volume,calcParams:[5,10,20],shouldFormatBigNumber:!0,precision:0,minValue:0,figures:[{key:"ma1",title:"MA5: ",type:"line"},{key:"ma2",title:"MA10: ",type:"line"},{key:"ma3",title:"MA20: ",type:"line"},{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,r=Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return It(n)&&(n.close>n.open?r=Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):n.closer.open?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):r.close=e-1&&(l[n[i].key]=r[i]/e,r[i]-=null!==(c=t[a-(e-1)].volume)&&void 0!==c?c:0)}),l})}},Ge={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,r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,f={},v=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(v>g?n+=m:v=i[0]-1){var y=a/2;f.vr=r+y===0?0:(n+y)/(r+y)*100,o+=f.vr,l>=i[0]+i[1]-2&&(f.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var b=t[l-(i[0]-1)],x=null!==(h=t[l-i[0]])&&void 0!==h?h:b,_=b.close,w=null!==(p=b.volume)&&void 0!==p?p:0;_>x.close?n-=w:_=s){var l=fe(t.slice(r-s,r+1),"high","low"),c=l[0],u=l[1],d=c-u;a[n[i].key]=0===d?0:(o-c)/d*100}}),a})}},qe={},Ze=[we,Ce,Se,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je];function Je(t){qe[t.name]=Gt.extend(t)}function Qe(t){var e;return null!==(e=qe[t])&&void 0!==e?e:null}Ze.forEach(function(t){qe[t.name]=Gt.extend(t)});var ti=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,r=e.calcParams,a=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,f=e.extendData,v=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,b=!1;Et(i)&&t.setShortName(i)&&(b=!0),It(n)&&t.setSeries(n)&&(b=!0);var x=!1;St(r)&&t.setCalcParams(r)&&(b=!0,x=!0),St(o)&&t.setFigures(o)&&(b=!0,x=!0),void 0!==s&&t.setMinValue(s)&&(b=!0),void 0!==l&&t.setMinValue(l)&&(b=!0),Tt(a)&&t.setPrecision(a)&&(b=!0),Mt(c)&&t.setShouldOhlc(c)&&(b=!0),Mt(u)&&t.setShouldFormatBigNumber(u)&&(b=!0),Mt(d)&&t.setVisible(d)&&(b=!0);var _=!1;return Tt(h)&&t.setZLevel(h)&&(b=!0,_=!0),It(p)&&t.setStyles(p)&&(b=!0),t.setExtendData(f)&&(b=!0,x=!0),void 0!==v&&t.setRegenerateFigures(v)&&(b=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(b=!0),void 0!==m&&t.setDraw(m)&&(b=!0),kt(y)&&(t.calc=y,x=!0),[b,x,_]},t.prototype._sort=function(t){var e;Et(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 U(this,void 0,void 0,function(){var n,r,a,o,s;return G(this,function(l){switch(l.label){case 0:return n=t.name,r=this._instances.get(e),It(r)?(a=r.find(function(t){return t.name===n}),It(a)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return It(r)||(r=[]),o=Qe(n),s=new o,this._overrideInstance(s,t),i||(r=[]),r.push(s),this._instances.set(e,r),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,r=this._instances.get(t);if(It(r)){if(Et(e)){var a=r.findIndex(function(t){return t.name===e});a>-1&&(r.splice(a,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 U(this,void 0,void 0,function(){var i,n,r,a,o=this;return G(this,function(s){switch(s.label){case 0:return i=[],Et(t)?Et(e)?(n=this._instances.get(e),It(n)&&(r=n.find(function(e){return e.name===t}),It(r)&&i.push(r.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});It(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 a=s.sent(),[2,a.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,r=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Et(t)){var a=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Et(e)?null!==(n=null===a||void 0===a?void 0:a.find(function(t){return t.name===e}))&&void 0!==n?n:null:r(a)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,r(t))}),o},t.prototype.setSeriesPrecision=function(t){this._instances.forEach(function(e){e.forEach(function(e){e.series===Kt.Price&&e.setPrecision(t.price,!0),e.series===Kt.Volume&&e.setPrecision(t.volume,!0)})})},t.prototype.override=function(t,e){return U(this,void 0,void 0,function(){var i,n,r,a,o,s,l,c=this;return G(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(r=this._instances.get(e),It(r)&&n.set(e,r)):n=this._instances,a=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(It(n)){var r=c._overrideInstance(n,t);r[2]&&(s=!0),r[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):r[0]&&(a=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[a,l.includes(!0)]]}})})},t}(),ei=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,r=this._chartStore.getDataList(),a=null!==t&&void 0!==t?t:{};Tt(a.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(a.x),n=i<0?0:i>r.length-1?r.length-1:i):(i=r.length-1,n=i);var o=r[n],s=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),l={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=X(X({},a),{realX:s,kLineData:o,realDataIndex:i,dataIndex:n}),l.x===a.x&&l.y===a.y&&l.paneId===a.paneId||(null!==o&&this._chartStore.getChart().crosshairChange(this._crosshair),null!==e&&void 0!==e&&e||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,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({},!0),this.setActiveIcon()},t}(),ii={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n=t.overlay,r=t.precision,a=t.thousandsSeparator,o=t.decimalFoldThreshold,s=n.points;if(e.length>0){var l=[],c=[],u=0,d=i.width;if(e.length>1&&Tt(s[0].value)&&Tt(s[1].value)){var h=[1,.786,.618,.5,.382,.236,0],p=e[0].y-e[1].y,f=s[0].value-s[1].value;h.forEach(function(t){var i,n=e[1].y+p*t,h=Wt(zt(((null!==(i=s[1].value)&&void 0!==i?i:0)+f*t).toFixed(r.price),a),o);l.push({coordinates:[{x:u,y:n},{x:d,y:n}]}),c.push({x:u,y:n,text:"".concat(h," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:l},{type:"text",isCheckEvent:!1,attrs:c}]}return[]}},ni={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 It(e[1])&&e[0].x-1)for(var r=n;r>-1;r--)if(this._children[r].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}(),si=2,li=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return B(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},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 B(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}(oi);function ci(t,e){return Math.sqrt(Math.pow(t.x+e.x,2)+Math.pow(t.y+e.y,2))}function ui(t){var e=ci(t[0],t[1]),i=ci(t[1],t[2]),n=e+i,r=[t[2].x-t[0].x,t[2].y-t[0].y];return[{x:t[1].x-.5*r[0]*e/n,y:t[1].y-.5*r[1]*e/n},{x:t[1].x+.5*r[0]*e/n,y:t[1].y+.5*r[1]*e/n}]}function di(t,e){var i=e.coordinates;if(i.length>1)for(var n=1;n1){var a=i.style,o=void 0===a?N.Solid:a,s=i.smooth,l=i.size,c=void 0===l?1:l,u=i.color,d=void 0===u?"currentColor":u,h=i.dashedValue,p=void 0===h?[2,2]:h;if(t.lineWidth=c,t.strokeStyle=d,o===N.Dashed?t.setLineDash(p):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y),null!==s&&void 0!==s&&s){for(var f=[],v=1;v1)if(t[0].x===t[1].x){var a=0,o=e.height;if(r.push({coordinates:[{x:t[0].x,y:a},{x:t[0].x,y:o}]}),t.length>2){r.push({coordinates:[{x:t[2].x,y:a},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var v=t[2].y-p*t[2].x;r.push({coordinates:[{x:u,y:u*p+v},{x:d,y:d*p+v}]});for(s=f-v,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:pi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:pi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var wi={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:_i(e,i)}]}},Ci={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}}]:[]}},Si={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:pi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:pi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},ki={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=j(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(f){e={error:f}}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){a.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(a.length>0){var p=this._chartStore.getChart();a.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Bi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,r=this._hoverInstanceInfo,a=r.instance,o=r.figureType,s=r.figureKey,l=r.figureIndex;if(((null===a||void 0===a?void 0:a.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===a||void 0===a?void 0:a.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==a&&(u=!0,kt(a.onMouseLeave)&&(a.onMouseLeave(X({overlay:a,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,t.instance.setZLevel(ee),kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(X({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,r,a,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,f=d.figureType,v=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(a=null===(r=t.instance)||void 0===r?void 0:r.onClick)||void 0===a||a.call(r,X({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)||f!==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,X({overlay:p,figureKey:v,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,X({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,Bi.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}(),Oi=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 Yt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);It(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return It(e)&&!e.isEmpty()},t}(),zi={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"}}}},Wi={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"}}}},$i={light:zi,dark:Wi};function Hi(t){var e;return null!==(e=$i[t])&&void 0!==e?e:null}var Vi=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 _e(this),this._indicatorStore=new ti(this),this._overlayStore=new Ni(this),this._tooltipStore=new ei(this),this._actionStore=new Oi,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;no?(this._dataList.push(t),s=this._timeScaleStore.getLastBarRightSideDiffBarCount(),s<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--s),n=!0):a===o&&(this._dataList[r-1]=t,n=!0)),!n)return[3,4];this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this._indicatorStore.calcInstance()];case 2:return l.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),this._actionStore.execute(Pt.OnDataReady),[3,4];case 3:return l.sent(),[3,4];case 4:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&It(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&&It(this._loadDataCallback)&&(this._forwardMore&&t.type===re.Forward||this._backwardMore&&t.type===re.Backward)){var i=function(i,n){var r=[];t.type===re.Backward?(r=e._dataList.concat(i),e._backwardMore=null!==n&&void 0!==n&&n):(r=i.concat(e._dataList),e._forwardMore=null!==n&&void 0!==n&&n),e.addData(r,!1).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(X(X({},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}(),Ki={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Yi=7,Xi=-1;function Ui(t){return kt(window.requestAnimationFrame)?window.requestAnimationFrame(t):window.setTimeout(t,20)}function Gi(t){kt(window.cancelAnimationFrame)?window.cancelAnimationFrame(t):window.clearTimeout(t)}function ji(){return U(this,void 0,void 0,function(){return G(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 qi=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._requestAnimationId=Xi,this._mediaQueryListener=function(){var t=$t(i._element);i._resetPixelRatio(Math.round(i._element.clientWidth*t),Math.round(i._element.clientHeight*t),t,t)},this._listener=e,this._element=ce("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),ji().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}),r=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];if(It(r)){var a=r.inlineSize,o=r.blockSize;i._pixelWidth===a&&i._pixelHeight===o||i._resetPixelRatio(a,o,a/i._element.clientWidth,o/i._element.clientHeight)}}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat($t(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(t,e,i,n){var r=this;this._executeListener(function(){var a=r._element.clientWidth,o=r._element.clientHeight;r._width=a,r._height=o,r._pixelWidth=t,r._pixelHeight=e,r._element.width=t,r._element.height=e,r._ctx.scale(i,n)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId!==Xi&&(Gi(this._requestAnimationId),this._requestAnimationId=Xi),this._requestAnimationId=Ui(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener()})},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=$t(this._element);this._resetPixelRatio(Math.round(t*i),Math.round(e*i),i,i)}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){var t,e;null===(t=this._resizeObserver)||void 0===t||t.unobserve(this._element),null===(e=this._mediaQueryList)||void 0===e||e.removeListener(this._mediaQueryListener)},t}();function Zi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return It(t)&&wt(e,t),e}var Ji=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Zi(),n._pane=i,n.init(e),n}return B(e,t),e.prototype.init=function(t){this._rootContainer=t,this._container=this.createContainer(),t.appendChild(this._container)},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}(oi),Qi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.init=function(e){var i=this;t.prototype.init.call(this,e),this._mainCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateMain(i._mainCanvas.getContext())}),this._overlayCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateOverlay(i._overlayCanvas.getContext())});var n=this.getContainer();n.appendChild(this._mainCanvas.getElement()),n.appendChild(this._overlayCanvas.getElement())},e.prototype.createContainer=function(){return ce("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,r=e.height,a=e.left;t.style.left="".concat(a,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&r===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(r,"px"),o=3),o){case 0:this._mainCanvas.update(n,r);break;case 1:this._overlayCanvas.update(n,r);break;case 3:case 4:this._mainCanvas.update(n,r),this._overlayCanvas.update(n,r);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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);return r.width=i*o,r.height=n*o,a.scale(o,o),a.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&a.drawImage(this._overlayCanvas.getElement(),0,0,i,n),r},e}(Ji);function tn(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 en(t,e){var i=t.x-e.x,n=t.y-e.y,r=e.r;return!(i*i+n*n>r*r)}function nn(t,e,i){var n=e.x,r=e.y,a=e.r,o=i.style,s=void 0===o?O.Fill:o,l=i.color,c=void 0===l?"currentColor":l,u=i.borderSize,d=void 0===u?1:u,h=i.borderColor,p=void 0===h?"currentColor":h,f=i.borderStyle,v=void 0===f?N.Solid:f,g=i.borderDashedValue,m=void 0===g?[2,2]:g;s!==O.Fill&&i.style!==O.StrokeFill||Et(c)&&tn(c)||(t.fillStyle=c,t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.fill()),(s===O.Stroke||i.style===O.StrokeFill)&&d>0&&!tn(p)&&(t.strokeStyle=p,t.lineWidth=d,v===N.Dashed?t.setLineDash(m):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.stroke())}var rn={name:"circle",checkEventOn:en,draw:function(t,e,i){nn(t,e,i)}};function an(t,e){for(var i=!1,n=e.coordinates,r=0,a=n.length-1;rt.y!==n[a].y>t.y&&t.x<(n[a].x-n[r].x)*(t.y-n[r].y)/(n[a].y-n[r].y)+n[r].x&&(i=!i);return i}function on(t,e,i){var n=e.coordinates,r=i.style,a=void 0===r?O.Fill:r,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,f=i.borderDashedValue,v=void 0===f?[2,2]:f;if((a===O.Fill||i.style===O.StrokeFill)&&(!Et(s)||!tn(s))){t.fillStyle=s,t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var g=1;g0&&!tn(d)){t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y);for(g=1;g=i&&t.x<=i+n&&t.y>=r&&t.y<=r+a}function cn(t,e,i){var n=e.x,r=e.y,a=e.width,o=e.height,s=i.style,l=void 0===s?O.Fill:s,c=i.color,u=void 0===c?"transparent":c,d=i.borderSize,h=void 0===d?1:d,p=i.borderColor,f=void 0===p?"transparent":p,v=i.borderStyle,g=void 0===v?N.Solid:v,m=i.borderRadius,y=void 0===m?0:m,b=i.borderDashedValue,x=void 0===b?[2,2]:b;l!==O.Fill&&i.style!==O.StrokeFill||Et(u)&&tn(u)||(t.fillStyle=u,t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.fill()),(l===O.Stroke||i.style===O.StrokeFill)&&h>0&&!tn(f)&&(t.strokeStyle=f,t.lineWidth=h,g===N.Dashed?t.setLineDash(x):t.setLineDash([]),t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.stroke())}var un={name:"rect",checkEventOn:ln,draw:function(t,e,i){cn(t,e,i)}};function dn(t,e){var i,n,r=e.size,a=void 0===r?12:r,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,f=e.weight,v=void 0===f?"normal":f,g=e.family,m=t.x,y=t.y,b=t.text,x=t.align,_=void 0===x?"left":x,w=t.baseline,C=void 0===w?"top":w,S=t.width,k=t.height,A=null!==S&&void 0!==S?S:s+Vt(b,a,v,g)+d,T=null!==k&&void 0!==k?k:c+a+p;switch(_){case"left":case"start":i=m;break;case"right":case"end":i=m-A;break;default:i=m-A/2;break}switch(C){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-T;break;default:n=y-T/2;break}return{x:i,y:n,width:A,height:T}}function hn(t,e,i){var n=dn(e,i),r=n.x,a=n.y,o=n.width,s=n.height;return t.x>=r&&t.x<=r+o&&t.y>=a&&t.y<=a+s}function pn(t,e,i){var n=e.text,r=i.color,a=void 0===r?"currentColor":r,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,f=i.paddingRight,v=void 0===f?0:f,g=dn(e,i);cn(t,g,X(X({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=a,t.fillText(n,g.x+d,g.y+p,g.width-d-v)}var fn={name:"text",checkEventOn:function(t,e,i){return hn(t,e,i)},draw:function(t,e,i){pn(t,e,i)}},vn=fn;function gn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function mn(t,e){if(Math.abs(gn(t,e)-e.r)=Math.min(a,s)-si&&t.y<=Math.max(o,l)+si&&t.y>=Math.min(o,l)-si}return!1}function yn(t,e,i){var n=e.x,r=e.y,a=e.r,o=e.startAngle,s=e.endAngle,l=i.style,c=void 0===l?N.Solid:l,u=i.size,d=void 0===u?1:u,h=i.color,p=void 0===h?"currentColor":h,f=i.dashedValue,v=void 0===f?[2,2]:f;t.lineWidth=d,t.strokeStyle=p,c===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,o,s),t.stroke(),t.closePath()}var bn={name:"arc",checkEventOn:mn,draw:function(t,e,i){yn(t,e,i)}},xn={},_n=[rn,gi,sn,un,fn,vn,bn];function wn(t){var e;return null!==(e=xn[t])&&void 0!==e?e:null}_n.forEach(function(t){xn[t.name]=li.extend(t)});var Cn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return B(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=wn(t.name);if(null!==i){var n=new i(t);if(It(e)){for(var r in e)e.hasOwnProperty(r)&&n.registerEvent(r,e[r]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(oi),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget(),n=this.getWidget().getPane(),r=n.getChart(),a=i.getBounding(),o=r.getStyles().grid,s=o.show;if(s){t.save(),t.globalCompositeOperation="destination-over";var l=o.horizontal,c=l.show;if(c){var u=n.getAxisComponent();u.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:0,y:i.coord},{x:a.width,y:i.coord}]},styles:l}))||void 0===n||n.draw(t)})}var d=o.vertical,h=d.show;if(h){var p=r.getXAxisPane().getAxisComponent();p.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:i.coord,y:0},{x:i.coord,y:a.height}]},styles:d}))||void 0===n||n.draw(t)})}t.restore()}},e}(Cn),kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),r=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,r,i)})},e}(Cn),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(Pt.OnCandleBarClick,t),!1}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Bi.CANDLE,r=i.getChart().getChartStore(),a=this.getCandleBarOptions(r);if(null!==a){var o=i.getAxisComponent();this.eachChildren(function(i,r){var s=i.data,l=i.x;if(It(s)){var c=s.open,u=s.high,d=s.low,h=s.close,p=a.type,f=a.styles,v=[];h>c?(v[0]=f.upColor,v[1]=f.upBorderColor,v[2]=f.upWickColor):hc?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.CandleDownStroke:b=c>h?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.Ohlc:var x=Math.min(Math.max(Math.round(.2*r.gapBar),1),7);b=[{name:"rect",attrs:{x:l-x/2,y:y[0],width:x,height:y[3]-y[0]},styles:{color:v[0]}},{name:"rect",attrs:{x:l-r.halfGapBar,y:g+x>y[3]?y[3]-x:g,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}},{name:"rect",attrs:{x:l+x/2,y:m+x>y[3]?y[3]-x:m,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}}];break}b.forEach(function(r){var a,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(a=e.createFigure(r,o))||void 0===a||a.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-.5,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,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-.5,y:e[0],width:1,height:e[1]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}},{name:"rect",attrs:{x:t-.5,y:e[2],width:1,height:e[3]-e[2]},styles:{color:n[2]}}]},e}(kn),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),r=n.getAxisComponent();if(!r.isInCandle()){var a=t.getIndicatorStore().getInstances(n.getId());try{for(var o=j(a),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=Ft(c,"ohlc.upColor",u.ohlc.upColor),h=Ft(c,"ohlc.downColor",u.ohlc.downColor),p=Ft(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:V.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(f){e={error:f}}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(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=a.getXAxisPane().getAxisComponent(),l=r.getAxisComponent(),c=a.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(r.getId()),f=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 r=!1;if(null!==t.draw&&(e.save(),r=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:f,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!r){var a=t.result;i.eachChildren(function(n,r){var c,d,h,p=r.halfGapBar,v=r.gapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),b=s.convertToPixel(g+1),x=null!==(c=a[g-1])&&void 0!==c?c:{},_=null!==(d=a[g])&&void 0!==d?d:{},w=null!==(h=a[g+1])&&void 0!==h?h:{},C={x:y},S={x:m},k={x:b};t.figures.forEach(function(t){var e=t.key,i=x[e];Tt(i)&&(C[e]=l.convertToPixel(i));var n=_[e];Tt(n)&&(S[e]=l.convertToPixel(n));var r=w[e];Tt(r)&&(k[e]=l.convertToPixel(r))}),Xt(u,t,g,f,function(t,n){var a,c,u;if(It(_[t.key])){var d=S[t.key],h=null===(a=t.attrs)||void 0===a?void 0:a.call(t,{coordinate:{prev:C,current:S,next:k},bounding:o,barSpace:r,xAxis:s,yAxis:l});if(!It(h))switch(t.type){case"circle":h={x:m,y:d,r:p};break;case"rect":case"bar":var f=null!==(c=t.baseValue)&&void 0!==c?c:l.getRange().from,g=l.convertToPixel(f),y=Math.abs(g-d);f!==_[t.key]&&(y=Math.max(1,y));var b=void 0;b=d>g?g:d,h={x:m-p,y:b,width:v,height:y};break;case"line":Tt(S[t.key])&&Tt(k[t.key])&&(h={coordinates:[{x:S.x,y:S[t.key]},{x:k.x,y:k[t.key]}]});break}if(It(h)){var x=t.type;null===(u=i.createFigure({name:"bar"===x?"rect":x,attrs:h,styles:n}))||void 0===u||u.draw(e)}}})})}}}),e.restore()},e}(An),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=e.getBounding(),r=e.getPane().getChart().getChartStore(),a=r.getTooltipStore().getCrosshair(),o=r.getStyles().crosshair;if(Et(a.paneId)&&o.show){if(a.paneId===i.getId()){var s=a.y;this._drawLine(t,[{x:0,y:s},{x:n.width,y:s}],o.horizontal)}var l=a.realX;this._drawLine(t,[{x:l,y:0},{x:l,y:n.height}],o.vertical)}},e.prototype._drawLine=function(t,e,i){var n;if(i.show){var r=i.line;r.show&&(null===(n=this.createFigure({name:"line",attrs:{coordinates:e},styles:r}))||void 0===n||n.draw(t))}},e}(Cn),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundIconClickEvent=function(t,i){return function(){var n=e.getWidget().getPane();return n.getChart().getChartStore().getActionStore().execute(Pt.OnTooltipIconClick,X(X({},t),{iconId:i})),!0}},e._boundIconMouseMoveEvent=function(t,i){return function(){var n=e.getWidget().getPane(),r=n.getChart().getChartStore().getTooltipStore();return r.setActiveIcon(X(X({},t),{iconId:i})),!0}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getTooltipStore().getCrosshair();if(It(r.kLineData)){var a=e.getBounding(),o=n.getCustomApi(),s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getIndicatorStore().getInstances(i.getId()),u=n.getTooltipStore().getActiveIcon(),d=n.getStyles().indicator;this.drawIndicatorTooltip(t,i.getId(),n.getDataList(),r,u,c,o,s,l,a,d)}},e.prototype.drawIndicatorTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d){var h=this,p=u.tooltip,f=0;if(this.isDrawTooltip(n,p)){var v=p.text,g=0,m=null!==d&&void 0!==d?d:0,y=0;a.forEach(function(a){var d=h.getIndicatorTooltipData(i,n,a,o,s,l,u),p=d.name,b=d.calcParamsText,x=d.values,_=d.icons,w=p.length>0,C=x.length>0;if(w||C){var S=q(h.classifyTooltipIcons(_),3),k=S[0],A=S[1],T=S[2],I=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,k,g,m,y),4),M=I[0],E=I[1],D=I[2],P=I[3];if(g=M,m=E,f+=P,y=D,w){var L=p;b.length>0&&(L="".concat(L).concat(b));var R=q(h.drawStandardTooltipLabels(t,c,[{title:{text:"",color:v.color},value:{text:L,color:v.color}}],g,m,y,v),4),F=R[0],B=R[1],N=R[2],O=R[3];g=F,m=B,f+=O,y=N}var z=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,A,g,m,y),4),W=z[0],$=z[1],H=z[2],V=z[3];if(g=W,m=$,f+=V,y=H,C){var K=q(h.drawStandardTooltipLabels(t,c,x,g,m,y,v),4),Y=K[0],X=K[1],U=K[2],G=K[3];g=Y,m=X,f+=G,y=U}var j=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,T,g,m,y),4),Z=j[1],J=j[2],Q=j[3];g=0,f+=Q,m=Z+J,y=0}})}return f},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,r,a,o,s){var l=this,c=a,u=o,d=0,h=0,p=0;return r.length>0&&(r.forEach(function(e){var i=e.marginLeft,n=e.marginTop,r=e.marginRight,a=e.marginBottom,o=e.paddingLeft,s=e.paddingTop,l=e.paddingRight,c=e.paddingBottom,u=e.size,p=e.fontFamily,f=e.icon;t.font=Ht(u,"normal",p),d+=i+o+t.measureText(f).width+l+r,h=Math.max(h,n+s+u+c+a)}),c+d>e.width?(c=r[0].marginLeft,u+=s,p=h):p=Math.max(0,h-s),r.forEach(function(e){var r,a=e.marginLeft,o=e.marginTop,s=e.marginRight,d=e.paddingLeft,h=e.paddingTop,p=e.paddingRight,f=e.paddingBottom,v=e.color,g=e.activeColor,m=e.size,y=e.fontFamily,b=e.icon,x=e.backgroundColor,_=e.activeBackgroundColor;c+=a;var w=(null===n||void 0===n?void 0:n.paneId)===i.paneId&&(null===n||void 0===n?void 0:n.indicatorName)===i.indicatorName&&(null===n||void 0===n?void 0:n.iconId)===e.id;null===(r=l.createFigure({name:"text",attrs:{text:b,x:c,y:u+o},styles:{paddingLeft:d,paddingTop:h,paddingRight:p,paddingBottom:f,color:w?g:v,size:m,family:y,backgroundColor:w?_:x}},{mouseClickEvent:l._boundIconClickEvent(i,e.id),mouseMoveEvent:l._boundIconMouseMoveEvent(i,e.id)}))||void 0===r||r.draw(t),c+=d+t.measureText(b).width+p+s})),[c,u,Math.max(s,h),p]},e.prototype.drawStandardTooltipLabels=function(t,e,i,n,r,a,o){var s=this,l=n,c=r,u=0,d=0,h=a;if(i.length>0){var p=o.marginLeft,f=o.marginTop,v=o.marginRight,g=o.marginBottom,m=o.size,y=o.family,b=o.weight;t.font=Ht(m,b,y),i.forEach(function(i){var n,r,a=i.title,o=i.value,x=t.measureText(a.text).width,_=t.measureText(o.text).width,w=x+_,C=m+f+g;l+p+w+v>e.width?(l=p,c+=C,d+=C):(l+=p,d+=Math.max(0,C-h)),u=Math.max(h,C),h=u,a.text.length>0&&(null===(n=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:a.text},styles:{color:a.color,size:m,family:y,weight:b}}))||void 0===n||n.draw(t),l+=x),null===(r=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:o.text},styles:{color:o.color,size:m,family:y,weight:b}}))||void 0===r||r.draw(t),l+=_+v})}return[l,c,u,d]},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Et(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,r,a,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},f=e.dataIndex,v=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=v[f])&&void 0!==l?l:{};Xt(t,i,f,o,function(t,e){if(Et(t.title)){var o=e.color,s=m[t.key];Tt(s)&&(s=Nt(s,i.precision),i.shouldFormatBigNumber&&(s=n.formatBigNumber(s))),g.push({title:{text:t.title,color:o},value:{text:Wt(zt(null!==s&&void 0!==s?s:c.defaultValue,r),a),color:o}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),b=y.getPane(),x=b.getChart().getChartStore(),_=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:x.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:b.getChart().getXAxisPane().getAxisComponent(),yAxis:b.getAxisComponent()}),w=_.name,C=_.calcParamsText,S=_.values,k=_.icons;if(Et(w)&&c.showName&&(p.name=w),Et(C)&&c.showParams&&(p.calcParamsText=C),It(k)&&(p.icons=k),It(S)&&i.visible){var A=[],T=o.tooltip.text.color;S.forEach(function(t){var e={text:"",color:T};At(t.title)?e=t.title:e.text=t.title;var i={text:"",color:T};At(t.value)?i=t.value:i.text=t.value,i.text=Wt(zt(i.text,r),a),A.push({title:e,value:i})}),p.values=A}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case $.Left:e.push(t);break;case $.Middle:i.push(t);break;case $.Right:n.push(t);break}}),[e,i,n]},e}(Cn),En=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return B(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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(te,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(a.instance,e)),null===(r=o.onDrawing)||void 0===r||r.call(o,X({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 r,a,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(te,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(r=s.onDrawing)||void 0===r||r.call(s,X({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(a=s.onDrawEnd)||void 0===a||a.call(s,X({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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(te,"point_").concat(l);null===(r=o.onDrawEnd)||void 0===r||r.call(o,X({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(te,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var r=i.instance;if(r.isDrawing()){var a=r.points.length-1;return t._figureMouseRightClickEvent(r,1,"".concat(te,"point_").concat(a),a,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,r=n.getPressedInstanceInfo(),a=r.instance,o=r.figureIndex,s=r.figureKey;return null!==a&&(null===(e=a.onPressedMoveEnd)||void 0===e||e.call(a,X({overlay:a,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,r,a=n.getPressedInstanceInfo(),o=a.instance,s=a.figureType,l=a.figureIndex,c=a.figureKey;if(null!==o){if(!o.lock&&(null===(r=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,X({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===r||!r)){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,r,a){var o;if(!t.isDrawing()){var s=[];if(It(a)&&(Mt(a)?a&&(s=jt()):s=a),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,r),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,r),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,r),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,r),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,r)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,r)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,r)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,r)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,r)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,r))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,r){var a=this;return function(o){var s,l=a.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(a._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,X({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,r){return function(e){var r;return null===(r=t.onDoubleClick)||void 0===r||r.call(t,X(X({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,r){var a=this;return function(e){var r,o;if(null===(o=null===(r=t.onRightClick)||void 0===r?void 0:r.call(t,X({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},r=this.getWidget().getPane(),a=r.getChart(),o=r.getId(),s=a.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=a.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=r.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Bi.CANDLE&&Tt(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var f=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var v=d.convertToPixel(p.high),g=d.convertFromPixel(v-f);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),b=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,r,s,l,a,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,r,a,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var r=this;i.forEach(function(i,a){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,f=r._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",a,u,c),v=X(X(X({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=r.createFigure({name:o,attrs:l,styles:v},f))||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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p){var f,v,g=this;if(e.needDefaultPointFigure&&((null===(f=h.instance)||void 0===f?void 0:f.id)===e.id&&0!==h.figureType||(null===(v=p.instance)||void 0===v?void 0:v.id)===e.id&&0!==p.figureType)){var m=e.styles,y=X(X({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var r,a,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(r=h.instance)||void 0===r?void 0:r.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(a=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(te,"point_").concat(n),n,0)))||void 0===a||a.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}(Cn),Dn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new Sn(n),n._indicatorView=new Tn(n),n._crosshairLineView=new In(n),n._tooltipView=n.createTooltipView(),n._overlayView=new En(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 B(e,t),e.prototype.getName=function(){return Ki.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Mn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(Qi),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=r.getAxisComponent(),l=a.getStyles().candle.area,c=[],u=[],d=Number.MAX_SAFE_INTEGER;this.eachChildren(function(t,e,i){var n=t.data,r=t.x,a=e.halfGapBar,h=null===n||void 0===n?void 0:n[l.value];if(Tt(h)){var p=s.convertToPixel(h);if(0===i){var f=r-a;u.push({x:f,y:o.height}),u.push({x:f,y:p}),c.push({x:f,y:p})}c.push({x:r,y:p}),u.push({x:r,y:p}),d=Math.min(d,p)}});var h=u.length;if(h>0){var p=u[h-1],f=p.x;c.push({x:f,y:p.y}),u.push({x:f,y:p.y}),u.push({x:f,y:o.height})}if(c.length>0&&(null===(e=this.createFigure({name:"line",attrs:{coordinates:c},styles:{color:l.lineColor,size:l.lineSize}}))||void 0===e||e.draw(t)),u.length>0){var v=l.backgroundColor,g=void 0;if(St(v)){var m=t.createLinearGradient(0,o.height,0,d);try{v.forEach(function(t){var e=t.offset,i=t.color;m.addColorStop(e,i)})}catch(y){}g=m}else g=v;null===(i=this.createFigure({name:"polygon",attrs:{coordinates:u},styles:{color:g}}))||void 0===i||i.draw(t)}},e}(kn),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getStyles().candle.priceMark,a=r.high,o=r.low;if(r.show&&(a.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,f=0;this.eachChildren(function(t){var e=t.data,i=t.x;It(e)&&(de.low&&(p=e.low,f=i))});var v=u.convertToPixel(d),g=u.convertToPixel(p);a.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Wt(zt(Nt(d,c.price),s),l),{x:h,y:v},vp/2?(l=d-5,c=l-r.textOffset,u="right"):(l=d+5,u="left",c=l+r.textOffset);var f=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:f},{x:l,y:f}]},styles:{color:r.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:f,text:e,align:u,baseline:"middle"},styles:{color:r.color,size:r.textSize,family:r.textFamily,weight:r.textWeight}}))||void 0===s||s.draw(t)},e}(kn),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=a.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,f=c.convertToNicePixel(h),v=void 0;v=h>p?s.upColor:h0){var O=q(this.drawStandardTooltipLabels(t,n,x,_,w,C,m),4),z=O[0],W=O[1],$=O[2],H=O[3];_=z,w=W,y+=H,C=$}var V=q(this.drawStandardTooltipIcons(t,n,{paneId:i,indicatorName:"",iconId:""},a,T,_,w,C),4),K=V[0],Y=V[1],X=V[2],U=V[3];_=K,w=Y,y+=U,C=X}return y},e.prototype._drawRectTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p,f,v){var g,m,y,b,x,_=this,w=f.candle,C=f.indicator,S=w.tooltip,k=C.tooltip;if(h||p){var A=null!==(g=a.dataIndex)&&void 0!==g?g:0,T=this._getCandleTooltipData({prev:null!==(m=e[A-1])&&void 0!==m?m:null,current:a.kLineData,next:null!==(y=e[A+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),I=S.text,M=I.marginLeft,E=I.marginRight,D=I.marginTop,P=I.marginBottom,L=I.size,R=I.weight,F=I.family,B=S.rect,N=B.position,z=B.paddingLeft,W=B.paddingRight,$=B.paddingTop,V=B.paddingBottom,Y=B.offsetLeft,X=B.offsetRight,U=B.offsetTop,G=B.offsetBottom,j=B.borderSize,q=B.borderRadius,Z=B.borderColor,J=B.color,Q=0,tt=0,et=0;h&&(t.font=Ht(L,R,F),T.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+M+E;Q=Math.max(Q,a)}),et+=(P+D+L)*T.length);var it=k.text,nt=it.marginLeft,rt=it.marginRight,at=it.marginTop,ot=it.marginBottom,st=it.size,lt=it.weight,ct=it.family,ut=[];if(p&&(t.font=Ht(st,lt,ct),i.forEach(function(i){var n,r=null!==(n=_.getIndicatorTooltipData(e,a,i,c,u,d,C).values)&&void 0!==n?n:[];ut.push(r),r.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+nt+rt;Q=Math.max(Q,a),et+=at+ot+st})})),tt+=Q,0!==tt&&0!==et){tt+=2*j+z+W,et+=2*j+$+V;var dt=n.width/2,ht=N===H.Pointer&&a.paneId===Bi.CANDLE,pt=(null!==(b=a.realX)&&void 0!==b?b:0)>dt,ft=0;if(ht){var vt=a.realX;ft=pt?vt-X-tt:vt+Y}else pt?(ft=Y,f.yAxis.inside&&f.yAxis.position===K.Left&&(ft+=r.width)):(ft=n.width-X-tt,f.yAxis.inside&&f.yAxis.position===K.Right&&(ft-=r.width));var gt=v+U;if(ht){var mt=a.y;gt=mt-et/2,gt+et>n.height-G&&(gt=n.height-G-et),gt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=_[c])&&void 0!==e?e:f.defaultValue),"{change}"===c&&(o.color=0===y?s.priceMark.last.noChangeColor:y>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:a,value:o}})},e}(Mn),Wn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Pn(n),n._candleHighLowPriceView=new Ln(n),n._candleLastPriceLineView=new Rn(n),n.addChild(n._candleBarView),n}return B(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==V.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t)):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new zn(this)},e}(Dn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this,n=this.getWidget(),r=n.getPane(),a=n.getBounding(),o=r.getAxisComponent(),s=this.getAxisStyles(r.getChart().getStyles());if(s.show){s.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(a,s),styles:s.axisLine}))||void 0===e||e.draw(t));var l=o.getTicks();if(s.tickLine.show){var c=this.createTickLines(l,a,s);c.forEach(function(e){var n;null===(n=i.createFigure({name:"line",attrs:e,styles:s.tickLine}))||void 0===n||n.draw(t)})}if(s.tickText.show){var u=this.createTickTexts(l,a,s);u.forEach(function(e){var n;null===(n=i.createFigure({name:"text",attrs:e,styles:s.tickText}))||void 0===n||n.draw(t)})}}},e}(Cn),Hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),r=e.axisLine.size;return i=n.isFromZero()?r/2:t.width-r,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),r=i.axisLine,a=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,r.show&&(o+=r.size),s=o+a.length):(o=e.width,r.show&&(o-=r.size),s=o-a.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(),r=i.axisLine,a=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,r.show&&(s+=r.size),a.show&&(s+=a.length)):(s=e.width-o.marginEnd,r.show&&(s-=r.size),a.show&&(s-=a.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),Vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=a.getPrecision(),u=n.getAxisComponent(),d=a.getDataList(),h=a.getVisibleDataList(),p=d[d.length-1];if(It(p)){var f=p.close,v=p.open,g=u.convertToNicePixel(f),m=void 0;m=f>v?s.upColor:f1&&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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(En),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=i.getPane().getChart().getChartStore(),o=a.getTooltipStore().getCrosshair(),s=a.getStyles().crosshair;if(Et(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,a,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,r,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,r,a=i,o=i.convertFromPixel(t.y);if(a.getType()===Y.Percentage){var s=e.getVisibleDataList(),l=null===(n=s[0])||void 0===n?void 0:n.data;r="".concat(((o-l.close)/l.close*100).toFixed(2),"%")}else{var c=e.getIndicatorStore().getInstances(t.paneId),u=0,d=!1;a.isInCandle()?u=e.getPrecision().price:c.forEach(function(t){u=Math.max(t.precision,u),d||(d=t.shouldFormatBigNumber)}),r=Nt(o,u),d&&(r=e.getCustomApi().formatBigNumber(r))}return Wt(zt(r,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,r,a){var o,s,l=r;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(Cn),Un=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Hn(n),n._candleLastPriceLabelView=new Vn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new Yn(n),n._crosshairHorizontalLabelView=new Xn(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),Gn=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,r=[];if(n>=0){var a=q(this._calcTickInterval(n),2),o=a[0],s=a[1],l=he(Math.ceil(e/o)*o,s),c=he(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);r[u]={text:h,coord:0,value:h},++u,d+=o}}return r},t.prototype._calcTickInterval=function(t){var e=de(t/8),i=pe(e);return[e,i]},t}(),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t,e,i,n,r,a=this.getParent(),o=a.getChart(),s=o.getChartStore(),l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=[],d=!1,h=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER,v=s.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;d||(d=null!==(e=t.shouldOhlc)&&void 0!==e&&e),f=Math.min(f,t.precision),Tt(t.minValue)&&(h=Math.min(h,t.minValue)),Tt(t.maxValue)&&(p=Math.max(p,t.maxValue)),u.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var g=4,m=this.isInCandle();if(m){var y=s.getPrecision().price;g=f!==Number.MAX_SAFE_INTEGER?Math.min(f,y):y}else f!==Number.MAX_SAFE_INTEGER&&(g=f);var b=s.getVisibleDataList(),x=o.getStyles().candle,_=x.type===V.Area,w=x.area.value,C=m&&!_||!m&&d;b.forEach(function(t){var e=t.dataIndex,i=t.data;if(It(i)&&(C&&(l=Math.min(l,i.low),c=Math.max(c,i.high)),m&&_)){var n=i[w];Tt(n)&&(l=Math.min(l,n),c=Math.max(c,n))}u.forEach(function(t){var i,n=t.figures,r=t.result,a=null!==(i=r[e])&&void 0!==i?i:{};n.forEach(function(t){var e=a[t.key];Tt(e)&&(l=Math.min(l,e),c=Math.max(c,e))})})}),l!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER?(l=Math.min(h,l),c=Math.max(p,c)):(l=0,c=10);var S,k=this.getType();switch(k){case Y.Percentage:var A=null===(t=b[0])||void 0===t?void 0:t.data;It(A)&&Tt(A.close)&&(l=(l-A.close)/A.close*100,c=(c-A.close)/A.close*100),S=Math.pow(10,-2);break;case Y.Log:l=ve(l),c=ve(c),S=.05*ge(-g);break;default:S=ge(-g)}if(l===c||Math.abs(l-c)=1&&(D/=M);var P=null!==(r=null===E||void 0===E?void 0:E.bottom)&&void 0!==r?r:.1;P>=1&&(P/=M);var L,R,F,B=Math.abs(c-l);return l-=B*P,c+=B*D,B=Math.abs(c-l),k===Y.Log?(L=ge(l),R=ge(c),F=Math.abs(R-L)):(L=l,R=c,F=B),{from:l,to:c,range:B,realFrom:L,realTo:R,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,r=this.getRange(),a=r.from,o=r.range,s=(t-a)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Bi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:Y.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===K.Left&&e||t.position===K.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,r=this.getParent(),a=null!==(i=null===(e=r.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=r.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(r.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,f=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),f||(f=t.shouldFormatBigNumber)});var v,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,r=n._innerConvertToPixel(+i);switch(c){case Y.Percentage:e="".concat(Nt(i,2),"%");break;case Y.Log:r=n._innerConvertToPixel(ve(+i)),e=Nt(i,p);break;default:e=Nt(i,p),f&&(e=s.formatBigNumber(i));break}e=Wt(zt(e,d),h);var o=Tt(v);r>g&&r2*g||!o)&&(l.push({text:e,coord:r,value:i}),v=r)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,r=n.size;if("auto"!==r)return r;var a=e.getChartStore(),o=a.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,Vt(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=a.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var f=2;if(this.getType()!==Y.Percentage)if(this.isInCandle()){var v=a.getPrecision().price,g=i.indicator.lastValueMark;f=g.show&&g.text.show?Math.max(h,v):v}else f=h;var m=Nt(this.getRange().to,f);p&&(m=o.formatBigNumber(m)),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+Vt(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,r=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),o=a.from,s=a.range,l=this.isReverse()?t/r:1-t/r,c=l*s+o;switch(this.getType()){case Y.Percentage:var u=this.getParent().getChart().getChartStore(),d=u.getVisibleDataList(),h=null===(n=d[0])||void 0===n?void 0:n.data;return It(h)&&Tt(h.close)?h.close*c/100+h.close:0;case Y.Log:return ge(c);default:return c}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===Y.Log&&(e=ge(t)),e},e.prototype.convertToPixel=function(t){var e,i=t;switch(this.getType()){case Y.Percentage:var n=this.getParent().getChart().getChartStore(),r=n.getVisibleDataList(),a=null===(e=r[0])||void 0===e?void 0:e.data;It(a)&&Tt(a.close)&&(i=(t-a.close)/a.close*100);break;case Y.Log:i=ve(t);break;default:i=t}return this._innerConvertToPixel(i)},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,r=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(r,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return B(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Gn),qn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Zn={default:jn.extend(qn)};function Jn(t){var e;return null!==(e=Zn[t])&&void 0!==e?e:Zn.default}var Qn=function(){function t(t,e,i,n){this._bounding=Zi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=ce("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}(),tr=function(t){function e(e,i,n,r,a){var o=t.call(this,e,i,n,r)||this;o._yAxisWidget=null,o._options={minHeight:Ri,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(a),o}return B(e,t),e.prototype.setOptions=function(t){var e,i,n,r,a,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Et(o)||!It(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Bi.X_AXIS?(r=this.getMainWidget().getContainer(),a="ew-resize"):(r=this.getYAxisWidget().getContainer(),a="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?r.style.cursor=a:r.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,r;wt(this.getBounding(),t);var a={};return It(t.height)&&(a.height=t.height),It(t.top)&&(a.top=t.top),this._mainWidget.setBounding(a),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(a),It(e)&&this._mainWidget.setBounding(e),It(i)&&(null===(r=this._yAxisWidget)||void 0===r||r.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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);r.width=i*o,r.height=n*o,a.scale(o,o);var s=this._mainWidget.getBounding();if(a.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();a.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return r},e.prototype.createYAxisWidget=function(t){return null},e}(Qn),er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createAxisComponent=function(t){var e=Jn(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Dn(t,this)},e.prototype.createYAxisWidget=function(t){return new Un(t,this)},e}(tr),ir=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createMainWidget=function(t){return new Wn(t,this)},e}(er),nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t,e){var i=e.axisLine.size/2;return{coordinates:[{x:0,y:i},{x:t.width,y:i}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,r=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:r+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,r=i.axisLine.size,a=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:r+a+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(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,r,a,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,f=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),f=Math.max(f,e.x);var n=t.points[i];if(Tt(n.timestamp)){var o=a.formatDate(r,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:f-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Yn),ar=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.compare=function(t){return It(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,r,a){var o,s=i.realX,l="center";return s-e/2-a.paddingLeft<0?(o=0,l="left"):s+e/2+a.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Xn),or=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new nr(n),n._overlayXAxisView=new rr(n),n._crosshairVerticalLabelView=new ar(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),sr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,r=i,a=n-1,o=n-i;return{from:r,to:a,range:o,realFrom:r,realTo:a,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),r=n.getChartStore(),a=r.getCustomApi().formatDate,o=[],s=t.length,l=r.getDataList();if(s>0){var c=r.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=Vt("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),f=1;if(s>1){var v=parseInt(t[1].value,10),g=this.convertToPixel(v),m=Math.abs(g-p);m(null!==e&&void 0!==e?e:20)&&(t.apply(this,arguments),i=n)}}var pr=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=hr(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 B(e,t),e.prototype.getName=function(){return Ki.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(),r=i.getBottomPane(),a=e<0;if(null!==n&&null!==r&&r.getOptions().dragEnabled){var o=void 0,s=void 0,l=void 0,c=void 0;a?(o=n,s=r,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=r,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(Pt.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(),r=n.getStyles().separator;return this.getContainer().style.background=r.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return ce("div",{width:"100%",height:"".concat(Yi,"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((Yi-n.size)/2),"px"),t.style.height="".concat(Yi,"px")}},e}(Ji),fr=function(t){function e(e,i,n,r,a,o){var s=t.call(this,e,i,n,r)||this;return s.getContainer().style.overflow="",s._topPane=a,s._bottomPane=o,s._separatorWidget=new pr(s.getContainer(),s),s}return B(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,r=this.getChart().getStyles().separator,a=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=a.getContext("2d"),s=$t(a);return a.width=i*s,a.height=n*s,o.scale(s,s),o.fillStyle=r.color,o.fillRect(0,0,i,n),a},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}(Qn);function vr(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function gr(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var mr,yr=10,br=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=!gr(),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,r=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 a=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){r._target.removeEventListener("mousemove",a)},this._target.addEventListener("mousemove",a);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){r._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){r._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(!It(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!It(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,r=i.yOffset,a=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(a<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=r>=o&&!this._options.treatVertDragAsPageScroll(),l=o>r&&!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),r=i+n;return{xOffset:i,yOffset:n,manhattanDistance:r}},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),It(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),vr()){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),r=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",r)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",r,{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;vr()&&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}),gr()&&(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;(It(this._handler.pinchStartEvent)||It(this._handler.pinchEvent)||It(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&&It(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(X(X({},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]),It(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,It(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=!gr())},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 It(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 Ki.X_AXIS:case Ki.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),r=i.getName();switch(r){case Ki.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var a=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(a>0?a:1)*20;if(a<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=Ui(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(Gi(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Ki.X_AXIS:case Ki.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,r=!1;if(null!==n){var a=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",a);if(n.getName()===Ki.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,!0),r=!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()},!0),r=!0),this._touchCancelCrosshair=!1)}(r||o)&&this._chart.updatePane(1)}return r},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()===Ki.MAIN){var r=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:r.x,y:r.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:r.x,y:r.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,r,a=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=j(s),u=c.next();!u.done;u=c.next()){var d=q(u.value,2),h=d[1],p=h.getBounding(),f=p.top-Math.round((Yi-l)/2);if(a>=p.left&&a<=p.left+p.width&&o>=f&&o<=f+Yi)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 v=this._chart.getAllDrawPanes(),g=null;try{for(var m=j(v),y=m.next();!y.done;y=m.next()){var b=y.value;p=b.getBounding();if(a>=p.left&&a<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=b;break}}}catch(A){n={error:A}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var x=null;if(null!==g){if(null===x){var _=g.getMainWidget(),w=_.getBounding();a>=w.left&&a<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(x=_)}if(null===x){var C=g.getYAxisWidget();if(null!==C){var S=C.getBounding();a>=S.left&&a<=S.left+S.width&&o>=S.top&&o<=S.top+S.height&&(x=C)}}}return{pane:g,widget:x}},t.prototype._makeWidgetEvent=function(t,e){var i,n,r,a=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return X(X({},t),{x:t.x-(null!==(n=null===a||void 0===a?void 0:a.left)&&void 0!==n?n:0),y:t.y-(null!==(r=null===a||void 0===a?void 0:a.top)&&void 0!==r?r: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"})(mr||(mr={}));var _r=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new xr(this._chartContainer,this),this._chartStore=new Vi(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=ce("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"}],r=!1,a=!1,o=function(t){if(!a){var e=i._createPane(dr,Bi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,a=!0}};n.forEach(function(t){var e,n,a;switch(t.type){case"candle":if(!r){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Bi.CANDLE});var l=i._createPane(ir,Bi.CANDLE,s);i._candlePane=l;var c=null!==(n=t.content)&&void 0!==n?n:[];c.forEach(function(t){i.createIndicator(t,!0,s)}),r=!0}break;case"indicator":var u;c=null!==(a=t.content)&&void 0!==a?a:[];if(c.length>0)c.forEach(function(e){It(u)?i.createIndicator(e,!0,{id:u}):u=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options)}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,r=null,a=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];It(s)&&(a=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=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];"bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)&&(a=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=l)}}if(It(a)||(a=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),It(r)?(this._drawPanes.splice(r,0,a),n=r):(this._drawPanes.push(a),n=this._drawPanes.length-1),a.getId()!==Bi.X_AXIS){var d=this._drawPanes[n+1];if(It(d)&&d.getId()===Bi.X_AXIS&&(d=this._drawPanes[n+2]),It(d)){var h=this._separatorPanes.get(d);It(h)?h.setTopPane(a):(h=new fr(this._chartContainer,d.getContainer(),this,"",a,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(It(p)&&p.getId()===Bi.X_AXIS&&(p=this._drawPanes[n-2]),It(p)){h=new fr(this._chartContainer,a.getContainer(),this,"",p,a);this._separatorPanes.set(a,h)}}return a},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,r=this._xAxisPane.getAxisComponent().getAutoSize(),a=i-r-this._separatorPanes.size*n;a<0&&(a=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Bi.CANDLE&&t.getId()!==Bi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;ea?(o=a,e=Math.max(a-o,0)):o+=e,t.setBounding({height:e})}});var s=a-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:r});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);It(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,r=n.position===K.Left,a=!n.inside,o=0,s=Number.MIN_SAFE_INTEGER,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Bi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),a?(o=e-s,r?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=r?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},f=i.separator.fill;u=a&&!f?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(Et(t.id)){var r=this.getDrawPaneById(t.id),a=!1;if(null!==r){var o=e;if(t.id!==Bi.CANDLE&&Tt(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:r.getOptions().minHeight,0),l=Math.max(s,t.height);r.setBounding({height:l}),o=!0,a=!0}(Et(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||It(t.gap))&&(o=!0),r.setOptions(t),o&&this.adjustPaneViewport(a,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Bi.CANDLE)return this._candlePane;if(t===Bi.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.getCandlePane=function(){return this._candlePane},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,r){t&&this._measurePaneHeight();var a=e,o=null!==n&&void 0!==n&&n,s=null!==r&&void 0!==r&&r;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);a||(a=e)}),a&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(It(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(Pt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var r=i.getId(),a={},o=e._chartStore.getIndicatorStore().getInstances(r);o.forEach(function(e){var i,n=e.result;a[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[r]=a}),Et(t.paneId)&&i.execute(Pt.OnCrosshairChange,X(X({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Et(t))return this._chartContainer;var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getContainer();case mr.Main:return r.getMainWidget().getContainer();case mr.YAxis:return null!==(n=null===(i=r.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(!It(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getBounding();case mr.Main:return r.getMainWidget().getBounding();case mr.YAxis:return null!==(n=null===(i=r.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=Et(t)?Hi(t):t,It(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?bt("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?bt("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?bt("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?bt("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){It(i)&&bt("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!0,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){bt("","","Api `applyMoreData` has been deprecated since version 9.8.0.");var n=t.concat(this._chartStore.getDataList());this._chartStore.addData(n,!1,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){It(e)&&bt("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!1).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){bt("","","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 r,a=this,o=Et(t)?{name:t}:t;if(null===Qe(o.name))return bt("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;a._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=le(Bi.INDICATOR));var c=this._createPane(er,s,null!==i&&void 0!==i?i:{}),u=null!==(r=null===i||void 0===i?void 0:i.height)&&void 0!==r?r:Fi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){a.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=q(t,2),r=e[0],a=e[1];(r||a)&&(n.adjustPaneViewport(!1,a,!0,a),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,r,a=this._chartStore.getIndicatorStore(),o=a.removeInstance(t,e);if(o){var s=!1;if(t!==Bi.CANDLE&&!a.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(It(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=j(this._separatorPanes),p=h.next();!p.done;p=h.next()){var f=p.value;if(f[1].getTopPane().getId()===l.getId()){f[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 v=this._drawPanes[0];It(v)&&v.getId()===Bi.X_AXIS&&(v=this._drawPanes[1]),null===(r=this._separatorPanes.get(v))||void 0===r||r.destroy(),this._separatorPanes.delete(v)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Et(t))i=[{name:t}];else if(St(t))i=t.map(function(t){return Et(t)?{name:t}:t});else{var n=t;i=[n]}var r=!0;It(e)&&null!==this.getDrawPaneById(e)||(e=Bi.CANDLE,r=!1);var a=this._chartStore.getOverlayStore().addInstances(i,e,r);return St(t)?a:a[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;It(t)&&(e=Et(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=Tt(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(i>0){n.startScroll();var r=(new Date).getTime(),a=function(){var e=((new Date).getTime()-r)/i,o=e>=1,s=o?t:t*e;n.scroll(s),o||requestAnimationFrame(a)};a()}else n.startScroll(),n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,r=n*i;this.scrollByDistance(r,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=ue(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Tt(i)&&i>0?i:0,r=this._chartStore.getTimeScaleStore();if(n>0){var a=r.getBarSpace().bar,o=a*t,s=o-a,l=(new Date).getTime(),c=function(){var t=((new Date).getTime()-l)/n,i=t>=1,o=i?s:s*t;r.zoom(o/a,e),i||requestAnimationFrame(c)};c()}else r.zoom(t,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=ue(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Tt(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Tt(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 St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.x)){var r=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=r,n.timestamp=null!==(i=c.dataIndexToTimestamp(r))&&void 0!==i?i:void 0}if(Tt(t.y)){var a=o?t.y-u.top:t.y;n.value=p.convertFromPixel(a)}return n})}}return St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Pt.OnCrosshairChange:var n=X({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Bi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n);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,r=this._chartContainer.clientWidth,a=this._chartContainer.clientHeight,o=ce("canvas",{width:"".concat(r,"px"),height:"".concat(a,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=$t(o);o.width=r*l,o.height=a*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,r,a);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(It(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var a=t.getBounding();s.drawImage(t.getImage(c),0,a.top,r,a.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}(),wr=new Map,Cr=1;function Sr(t,e){var i;if(_t(),i=Et(t)?document.getElementById(t):t,null===i)return xt("","","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=wr.get(i.id);if(It(n))return bt("","","The chart has been initialized on the dom!!!"),n;var r="k_line_chart_".concat(Cr++);return n=new _r(i,e),n.id=r,i.setAttribute("k-line-chart-id",r),wr.set(r,n),n}var kr=i(21396),Ar=i.n(kr);function Tr(t,e,i,n){if(!t||!e||!i||!n)return t;try{var r=Ar().enc.Base64.parse(t),a=Ar().lib.WordArray.create(r.words.slice(0,4)),o=Ar().lib.WordArray.create(r.words.slice(4)),s=Ar().enc.Base64.parse(n),l=Ar().AES.decrypt({ciphertext:o},s,{iv:a,mode:Ar().mode.CBC,padding:Ar().pad.Pkcs7}),c=l.toString(Ar().enc.Utf8);return c||t}catch(u){return t}}function Ir(t,e){return Mr.apply(this,arguments)}function Mr(){return Mr=(0,c.A)((0,l.A)().m(function t(e,i){var n,r;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,f.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,r=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(r.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Mr.apply(this,arguments)}function Er(t,e,i){return Dr.apply(this,arguments)}function Dr(){return Dr=(0,c.A)((0,l.A)().m(function t(e,i,n){var r;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ir(i,n);case 1:return r=t.v,t.a(2,Tr(e,i,n,r))}},t)})),Dr.apply(this,arguments)}function Pr(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 Lr={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)([]),r=(0,h.KR)(!1),a=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,v=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),x=(0,h.KR)(5e3),_=(0,h.KR)(!1),w=(0,h.KR)(1e4),C=(0,h.KR)(0),S=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||!C.value||e-C.value>=i)&&(C.value=e,_t())}},k=(0,h.KR)([]),A=(0,h.KR)([]),T=(0,h.KR)([]),I=(0,h.KR)(null),M=(0,h.nI)(),E=M.proxy,D=(0,h.EW)(function(){return[{name:"line",title:E.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:E.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:E.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:E.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:E.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:E.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:E.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:E.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:E.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"}]}),F=(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}}]),B=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"},i=e[t]||t;if(I.value!==t){I.value=t;try{var n={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(n);r?T.value.push(r):I.value=null}catch(a){I.value=null}}else{I.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(o){}}}},O=function(){if(g.value)try{T.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){}}),T.value=[],I.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=B(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})}},W=(0,h.KR)(null),$=(0,h.KR)(!1),H=(0,h.KR)(!1),V=(0,h.KR)(!1),K=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#131722",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2e39",gridLineColor:"#1f2943",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:"#2a2e39",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#1f2943"}:{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"}}),Y=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},X=function(){return new Promise(function(t,e){if(window.pyodide)return W.value=window.pyodide,H.value=!0,void t(window.pyodide);$.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},r="/assets/pyodide/v".concat(i,"/full/"),a="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||r),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||a),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 r=document.createElement("script");r.dataset.pyodideSrc=t,r.src=t,r.onload=function(){return e()},r.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(r)})},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:W.value=window.pyodide,H.value=!0,$.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){$.value=!1,V.value=!0,e(t)})})},U=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(),r=parseFloat(i[1].trim());isNaN(r)||(e[n]=r)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},G=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,s,c,u,d,h,p,f,v,g,m,y,b,x,_,w,C,S=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(r=S.length>2&&void 0!==S[2]?S[2]:{},a=S.length>3&&void 0!==S[3]?S[3]:{},H.value&&W.value){e.n=5;break}if(!$.value){e.n=4;break}s=0;case 1:if(!($.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||!W.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&W.value){e.n=5;break}throw $.value?($.value=!1,V.value=!0):V.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=a.is_encrypted||a.isEncrypted||0,!u&&!Pr(i,u)){e.n=11;break}if(d=a.user_id||a.userId||t.userId||r.userId,h=a.originalId||a.id||r.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Er(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,_=e.v,new Error("代码解密失败,无法执行指标: "+(_.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}}),f=JSON.stringify(p),v=JSON.stringify(r||{}),g=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=v.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,W.value.runPythonAsync(y);case 12:if(b=e.v,b&&"string"===typeof b){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(b)));case 13:e.p=13,x=JSON.parse(b),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(x){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return x.plots&&Array.isArray(x.plots)||(x.plots=[]),x.plots=x.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}),x.signals&&Array.isArray(x.signals)&&(x.signals=x.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})),x.calculatedVars||(x.calculatedVars={}),e.a(2,x);case 17:throw e.p=17,C=e.v,new Error("Python 执行失败: ".concat(C.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 j(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?r+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var f=[],v=[],g=[],m=0;m=e-1){var w=f[m],C=v[m],S=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(C/w*100),n.push(S/w*100)),m>=e-1){var k=i[m]+n[m],A=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)r.push(A);else if(m===e){var T=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;r.push((T+A)/2)}else r.push((r[m-1]*(e-1)+A)/e)}}}return{adx:r,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=f+2*p,b=(null===(i=a.extendData)||void 0===i?void 0:i.side)||(null===(n=a.extendData)||void 0===n?void 0:n.type)||"buy",x="buy"===b,_=x?u:u-y,w=d,C=w,S=x?_:_+y;return[{type:"line",attrs:{coordinates:[{x:c,y:C},{x:c,y:S}]},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:_,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:_+y/2,text:v,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:f,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}});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],r=e.close.toFixed(2),a=(e.close-n.close)/n.close*100;i("price-change",{price:r,change:a})}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),r=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&n.getMinutes()===r.getMinutes();case"5m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(r.getMinutes()/5);case"15m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(r.getMinutes()/15);case"30m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(r.getMinutes()/30);case"1H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours();case"4H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&Math.floor(n.getHours()/4)===Math.floor(r.getHours()/4);case"1D":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate();case"1W":var a=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((r.getTime()-new Date(r.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===r.getFullYear()&&a===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,v,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(!r.value||i){e.n=2;break}return e.a(2);case 2:return r.value=!0,a.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,f.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=E.$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&&_t()},100)}}else mt();t.realtimeEnabled&&(gt(),vt())}),e.n=12;break;case 11:if(e.p=11,v=e.v,a.value=E.$t("dashboard.indicator.error.loadDataFailed")+": "+(v.message||E.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,r.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 r,a,o,c,d,v;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,r=Math.floor(i/1e3),e.n=2,(0,f.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:r}});case 2:if(a=e.v,1!==a.code||!a.data||!Array.isArray(a.data)){e.n=5;break}if(o=st(a.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&&(r=st(i.data),a=(0,R.A)(n.value),r.length>0&&(o=Math.floor(r[r.length-1].timestamp/1e3),s=Math.floor(a[a.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=a[a.length-1],u=r[r.length-1],a[a.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=a,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(a[h]),S(!1)):g.value&&(g.value.applyNewData(n.value),S(!1))):o>s&&(p=r.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!a.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,R.A)(a),(0,R.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),v=ct(n.value),lt(v),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),S(!0)):g.value&&(g.value.applyNewData(n.value),S(!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)}}(),vt=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;x.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!r.value&&t.symbol&&n.value&&n.value.length>0&&ft()},x.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=Sr(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Sr(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)),bt(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(I.value&&t&&t.id){T.value.push(t.id),I.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){I.value&&t&&t.id&&(T.value.push(t.id),I.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=T.value.indexOf(t);e>-1&&T.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,r=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,o,c,d,h,f;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(r){t.n=1;break}return i=e.from,r=!0,setTimeout(function(){v.value=!0},1e3),t.a(2);case 1:if(v.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&&(a=n.value.length,a>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*a/100),d=.1,h=Math.min(100,d+c/a*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&v.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 f=n.value[0].timestamp,t.n=4,ht(f);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(b){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){_t()})}}window.addEventListener("resize",yt)}catch(a){a.value=E.$t("dashboard.indicator.error.chartInitFailed")+": "+(a.message||"未知错误")}}else{var d=0,f=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},bt=function(){if(g.value){var t=K.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:[E.$t("dashboard.indicator.tooltip.time"),E.$t("dashboard.indicator.tooltip.open"),E.$t("dashboard.indicator.tooltip.high"),E.$t("dashboard.indicator.tooltip.low"),E.$t("dashboard.indicator.tooltip.close"),E.$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}})}},xt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:r,series:a?"price":"normal"};return Je(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},_t=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,r,a,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!_.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:_.value=!0,e.p=3;try{A.value.length>0&&g.value&&(A.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){}}),A.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),r=(0,l.A)().m(function e(){var n,r,a,s,c,u,d,h,p,f,v,m,y,x,_,w,C,S,T,I,M,E,D,P,F,B,N,O,z,W,H,K,X,U,st,lt,ct,ut,dt,ht,pt,ft,vt,gt,mt,yt,bt,_t,wt,Ct,St,kt,At,Tt,It,Mt,Et,Dt,Pt,Lt,Rt,Ft,Bt,Nt,Ot,zt,Wt,$t,Ht,Vt,Kt,Yt,Xt,Ut,Gt,jt,qt,Zt,Jt,Qt,te,ee,ie,ne,re,ae,oe,se,le,ce,ue,de,he,pe,fe,ve,ge,me,ye,be,xe,_e,we,Ce,Se,ke,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je,qe,Ze,Je,Qe,ti,ei,ii,ni,ri,ai,oi,si,li,ci,ui,di,hi,pi,fi,vi,gi,mi,yi,bi;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(r=e.v,a=[],r&&r.plots&&Array.isArray(r.plots)&&(a=(0,R.A)(r.plots)),!(r&&r.signals&&Array.isArray(r.signals))){e.n=14;break}s=(0,b.A)(r.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){E=(0,b.A)(f);try{for(E.s();!(D=E.n()).done;){P=D.value;try{F=P.timestamp,F<1e10&&(F*=1e3),B=P.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:F,value:P.price},{timestamp:F,value:P.anchorPrice}],extendData:{text:B,color:P.color,side:P.side,action:P.action,price:P.price},lock:!0},"candle_pane"),N&&A.value.push(N))}catch(l){}}}catch(xi){E.e(xi)}finally{E.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(a.length>0&&(O=a.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],W={},H=0;H0)){e.n=23;break}for(_t=[],wt=0;wt0&&g.value){Bt=(0,b.A)(St);try{for(Bt.s();!(Nt=Bt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Wt=Ot.text,"function"===typeof g.value.createOverlay&&($t=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Wt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),$t&&A.value.push($t))}catch(l){}}}catch(xi){Bt.e(xi)}finally{Bt.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(Vt=[],Kt={},Yt=0;Yt0&&(0,h.dY)(function(){g.value&&_t()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?vt():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,X();case 3:e.n=5;break;case 4:e.p=4,e.v,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:r,error:a,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:K,getIndicatorColor:Y,handleRetry:wt,loadingPython:$,pythonReady:H,pyodideLoadFailed:V,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:ft,startRealtime:vt,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:bt,updateIndicators:_t,executePythonStrategy:G,parsePythonStrategy:U,indicatorButtons:F,isIndicatorActive:B,toggleIndicator:z,drawingTools:D,activeDrawingTool:I,selectDrawingTool:N,clearAllDrawings:O}}},Rr=Lr,Fr=(0,T.A)(Rr,E,D,!1,null,"466e34db",null),Br=Fr.exports,Nr=function(){var t=this,e=t._self._c;return e("a-modal",{staticClass:"backtest-modal",attrs:{title:t.$t("dashboard.indicator.backtest.title"),visible:t.visible,width:1100,maskClosable:!1},on:{cancel:t.handleCancel}},[e("div",{staticClass:"backtest-content"},[e("a-steps",{staticStyle:{"margin-bottom":"16px"},attrs:{current:t.currentStep,size:"small"}},[e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.strategy.title"),description:t.$t("dashboard.indicator.backtest.steps.strategy.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.trading.title"),description:t.$t("dashboard.indicator.backtest.steps.trading.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.results.title"),description:t.$t("dashboard.indicator.backtest.steps.results.desc")}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2!==t.currentStep,expression:"currentStep !== 2"}],staticClass:"config-section"},[e("a-form",{attrs:{form:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[e("div",{directives:[{name:"show",rawName:"v-show",value:0===t.currentStep,expression:"currentStep === 0"}]},[e("a-collapse",{staticStyle:{background:"#fafafa"},attrs:{bordered:!1},model:{value:t.step1CollapseKeys,callback:function(e){t.step1CollapseKeys=e},expression:"step1CollapseKeys"}},[e("a-collapse-panel",{key:"risk",attrs:{header:t.$t("dashboard.indicator.backtest.panel.risk")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.stopLossPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stopLossPct",{initialValue:0}],expression:"['stopLossPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["takeProfitPct",{initialValue:0}],expression:"['takeProfitPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailingEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrailingToggle}})],1)],1),e("a-col",{attrs:{span:12}})],1),t.trailingEnabledUi?[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingStopPct",{initialValue:0}],expression:"['trailingStopPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingActivationPct",{initialValue:0}],expression:"['trailingActivationPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:t._e()],2),e("a-collapse-panel",{key:"scale",attrs:{header:t.$t("dashboard.indicator.backtest.panel.scale")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrendAddToggle}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['dcaAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onDcaAddToggle}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddStepPct",{initialValue:0}],expression:"['trendAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddStepPct",{initialValue:0}],expression:"['dcaAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddSizePct",{initialValue:0}],expression:"['trendAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddSizePct",{initialValue:0}],expression:"['dcaAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddMaxTimes",{initialValue:0}],expression:"['trendAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddMaxTimes",{initialValue:0}],expression:"['dcaAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1)],1)],1),e("a-collapse-panel",{key:"reduce",attrs:{header:t.$t("dashboard.indicator.backtest.panel.reduce")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverseReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceStepPct",{initialValue:0}],expression:"['trendReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceStepPct",{initialValue:0}],expression:"['adverseReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceSizePct",{initialValue:0}],expression:"['trendReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceSizePct",{initialValue:0}],expression:"['adverseReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceMaxTimes",{initialValue:0}],expression:"['trendReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceMaxTimes",{initialValue:0}],expression:"['adverseReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),e("a-collapse-panel",{key:"position",attrs:{header:t.$t("dashboard.indicator.backtest.panel.position")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.entryPct"),help:t.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(t.entryPctMaxUi||0).toFixed(0)})}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entryPct",{initialValue:100}],expression:"['entryPct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:t.entryPctMaxUi,step:.1,precision:4},on:{change:t.onEntryPctChange}})],1)],1),e("a-col",{attrs:{span:12}})],1)],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:1===t.currentStep,expression:"currentStep === 1"}]},[e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:t.combinedAlertType,"show-icon":""}},[e("template",{slot:"message"},[e("div",{staticStyle:{display:"flex","align-items":"center","flex-wrap":"wrap",gap:"8px"}},[e("span",[e("strong",[t._v("Symbol:")]),t._v(" "+t._s(t.symbol||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Market:")]),t._v(" "+t._s(t.market||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Timeframe:")]),t._v(" "+t._s(t.selectedTimeframe||t.timeframe||"-")+" ")]),t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"high"===t.precisionInfo.precision?"thunderbolt":"clock-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.precisionMode"))+": "),e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"high"===t.precisionInfo.precision?"green":"blue",size:"small"}},[t._v(" "+t._s(t.precisionInfo.timeframe)+" ")]),e("span",{staticStyle:{color:"#666","margin-left":"6px"}},[t._v(" ("+t._s(t.$t("dashboard.indicator.backtest.estimatedCandles",{count:t.precisionInfo.estimated_candles?t.precisionInfo.estimated_candles.toLocaleString():"-"}))+") ")])],1):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px",color:"#faad14"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"warning"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.standardModeWarning"))+" ")],1):t._e()])]),e("template",{slot:"description"},[t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s("high"===t.precisionInfo.precision?t.$t("dashboard.indicator.backtest.highPrecisionDesc"):t.$t("dashboard.indicator.backtest.mediumPrecisionDesc"))+" ")]):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s(t.precisionInfo.message||t.$t("dashboard.indicator.backtest.standardModeDesc"))+" ")]):t._e()])],2),e("div",{staticClass:"date-quick-select",staticStyle:{"margin-bottom":"12px"}},[e("span",{staticStyle:{"margin-right":"8px",color:"#666","font-size":"13px"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.quickSelect")||"快速选择")+":")]),e("a-button-group",{attrs:{size:"small"}},t._l(t.datePresets,function(i){return e("a-button",{key:i.key,attrs:{type:t.selectedDatePreset===i.key?"primary":"default"},on:{click:function(e){return t.applyDatePreset(i)}}},[t._v(t._s(i.label))])}),1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.startDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["startDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.startDateRequired")}],initialValue:t.defaultStartDate}],expression:"['startDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.startDateRequired') }], initialValue: defaultStartDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledStartDate,placeholder:t.$t("dashboard.indicator.backtest.selectStartDate")},on:{change:t.onDateChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.endDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["endDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.endDateRequired")}],initialValue:t.defaultEndDate}],expression:"['endDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.endDateRequired') }], initialValue: defaultEndDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledEndDate,placeholder:t.$t("dashboard.indicator.backtest.selectEndDate")},on:{change:t.onDateChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.initialCapital")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initialCapital",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.initialCapitalRequired")}],initialValue:1e4}],expression:"['initialCapital', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.initialCapitalRequired') }], initialValue: 10000 }]"}],staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.commission")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission",{initialValue:.02}],expression:"['commission', { initialValue: 0.02 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}}),e("div",{staticClass:"field-hint"},[t._v(t._s(t.$t("dashboard.indicator.backtest.commissionHint")))])],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.slippage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["slippage",{initialValue:0}],expression:"['slippage', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.leverage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:1}],expression:"['leverage', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.tradeDirection")}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["tradeDirection",{initialValue:"long"}],expression:"['tradeDirection', { initialValue: 'long' }]"}],staticStyle:{width:"100%"}},[e("a-select-option",{attrs:{value:"long"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.longOnly"))+" ")]),e("a-select-option",{attrs:{value:"short"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.shortOnly"))+" ")]),e("a-select-option",{attrs:{value:"both"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.both"))+" ")])],1)],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.timeframe")}},[e("a-select",{staticStyle:{width:"100%"},on:{change:t.onTimeframeChange},model:{value:t.selectedTimeframe,callback:function(e){t.selectedTimeframe=e},expression:"selectedTimeframe"}},[e("a-select-option",{attrs:{value:"1m"}},[t._v("1m")]),e("a-select-option",{attrs:{value:"5m"}},[t._v("5m")]),e("a-select-option",{attrs:{value:"15m"}},[t._v("15m")]),e("a-select-option",{attrs:{value:"30m"}},[t._v("30m")]),e("a-select-option",{attrs:{value:"1H"}},[t._v("1H")]),e("a-select-option",{attrs:{value:"4H"}},[t._v("4H")]),e("a-select-option",{attrs:{value:"1D"}},[t._v("1D")]),e("a-select-option",{attrs:{value:"1W"}},[t._v("1W")])],1)],1)],1)],1)],1)])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2===t.currentStep&&t.hasResult,expression:"currentStep === 2 && hasResult"}],staticClass:"result-section"},[t.backtestRunId?e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"success","show-icon":"",message:t.$t("dashboard.indicator.backtest.savedRunId",{id:t.backtestRunId})}}):t._e(),e("div",{staticClass:"metrics-cards"},[e("div",{staticClass:"metric-card",class:{positive:t.result.totalReturn>0,negative:t.result.totalReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.totalReturn)))]),e("div",{staticClass:"metric-amount"},[t._v(t._s(t.formatMoney(t.result.totalProfit)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.annualReturn>0,negative:t.result.annualReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.sharpeRatio")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.sharpeRatio.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.winRate)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.profitFactor>=1.5,negative:t.result.profitFactor<1}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.profitFactor.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.totalTrades))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalCommission")))]),e("div",{staticClass:"metric-value"},[t._v("-$"+t._s(t.result.totalCommission?t.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.equityCurve")))]),e("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),e("div",{staticClass:"trades-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.tradeHistory")))]),e("a-table",{attrs:{columns:t.tradeColumns,"data-source":t.result.trades,pagination:{pageSize:5,size:"small"},size:"small",scroll:{x:600}},scopedSlots:t._u([{key:"type",fn:function(i){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(i)}},[t._v(" "+t._s(t.getTradeTypeText(i))+" ")])]}},{key:"balance",fn:function(i){return[e("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[t._v(" $"+t._s(i?i.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(i){return[e("span",{style:{color:i>0?"#52c41a":i<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatMoney(i))+" ")])]}}])})],1)],1),t.loading?e("div",{staticClass:"loading-overlay"},[e("div",{staticClass:"loading-content"},[e("div",{staticClass:"loading-animation"},[e("div",{staticClass:"chart-bars"},[e("div",{staticClass:"bar bar1"}),e("div",{staticClass:"bar bar2"}),e("div",{staticClass:"bar bar3"}),e("div",{staticClass:"bar bar4"}),e("div",{staticClass:"bar bar5"})])]),e("div",{staticClass:"loading-text"},[t._v(t._s(t.$t("dashboard.indicator.backtest.running")))]),e("div",{staticClass:"loading-subtext"},[t._v(t._s(t.loadingTip))])])]):t._e()],1),e("template",{slot:"footer"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center",width:"100%"}},[e("div",[t.currentStep>0?e("a-button",{attrs:{disabled:t.loading},on:{click:t.handlePrev}},[t._v(t._s(t.$t("dashboard.indicator.backtest.prev")))]):t._e()],1),e("div",[e("a-button",{attrs:{disabled:t.loading},on:{click:t.handleCancel}},[t._v(t._s(t.$t("dashboard.indicator.backtest.close")))]),t.currentStep<1?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleNext}},[t._v(t._s(t.$t("dashboard.indicator.backtest.next")))]):1===t.currentStep?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",loading:t.loading},on:{click:t.handleRunBacktest}},[t._v(t._s(t.$t("dashboard.indicator.backtest.run")))]):e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleRerun}},[t._v(t._s(t.$t("dashboard.indicator.backtest.rerun")))])],1)])])],2)},Or=[],zr=i(95093),Wr=i.n(zr),$r=i(86529),Hr={name:"BacktestModal",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicator:{type:Object,default:null},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1D"}},data:function(){return{form:this.$form.createForm(this),loading:!1,loadingTip:"",loadingTimer:null,currentStep:0,hasResult:!1,backtestRunId:null,step1CollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,precisionInfo:null,selectedDatePreset:null,selectedTimeframe:"1D",result:{totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},equityChart:null,tradeColumns:[]}},computed:{maxBacktestRange:function(){var t=this.selectedTimeframe||this.timeframe||"1D";return"1m"===t?{days:30,label:"1个月"}:"5m"===t?{days:180,label:"6个月"}:["15m","30m"].includes(t)?{days:365,label:"1年"}:{days:1095,label:"3年"}},recommendedRange:function(){return{days:30,label:"30天",key:"30d"}},combinedAlertType:function(){return this.precisionInfo&&this.precisionInfo.enabled?"high"===this.precisionInfo.precision?"success":"info":this.precisionInfo&&!this.precisionInfo.enabled&&this.market&&"crypto"===this.market.toLowerCase()?"warning":"info"},datePresets:function(){var t=[],e=this.selectedTimeframe||this.timeframe||"1D";return"1m"===e?(t.push({key:"7d",days:7,label:"7D"}),t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"})):"5m"===e?(t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"})):(["15m","30m"].includes(e),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"}),t.push({key:"365d",days:365,label:"1Y"})),t},defaultStartDate:function(){return Wr()().subtract(this.recommendedRange.days,"days")},defaultEndDate:function(){return Wr()()},earliestDate:function(){return Wr()().subtract(this.maxBacktestRange.days,"days")},labelCol:function(){return 0===this.currentStep?{span:9}:{span:6}},wrapperCol:function(){return 0===this.currentStep?{span:15}:{span:18}}},watch:{visible:function(t){var e=this;t?(this.currentStep=0,this.hasResult=!1,this.backtestRunId=null,this.step1CollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.precisionInfo=null,this.selectedDatePreset=null,this.selectedTimeframe=this.timeframe||"1D",this.result={totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},this.$nextTick(function(){e.form&&(e.form.resetFields(),e.trailingEnabledUi=!!e.form.getFieldValue("trailingEnabled"),e.recalcEntryPctMaxUi(),e.selectedDatePreset="30d",e.fetchPrecisionInfo())})):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},created:function(){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:120,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,customRender:function(t){return t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):"--"}},{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:130,scopedSlots:{customRender:"balance"}}]},methods:{recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trendAddEnabled"),e=!!this.form.getFieldValue("dcaAddEnabled"),i=Number(this.form.getFieldValue("trendAddMaxTimes")||0),n=Number(this.form.getFieldValue("dcaAddMaxTimes")||0),r=Number(this.form.getFieldValue("trendAddSizePct")||0),a=Number(this.form.getFieldValue("dcaAddSizePct")||0),o=(t?i*r:0)+(e?n*a:0),s=Math.max(0,Math.min(100,100-o));this.entryPctMaxUi=s}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entryPct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entryPct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dcaAddEnabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trendAddEnabled:!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({trailingStopPct:0,trailingActivationPct:0}))},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={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"),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")};return e[t]||t},disabledStartDate:function(t){return!!t&&(t>Wr()().endOf("day")||tWr()().endOf("day"))return!0;if(tn.endOf("day"))return!0}return!1},applyDatePreset:function(t){this.selectedDatePreset=t.key;var e=Wr()(),i=Wr()().subtract(t.days,"days");this.form.setFieldsValue({startDate:i,endDate:e}),this.fetchPrecisionInfo(i,e)},fetchPrecisionInfo:function(t,e){var i=this;return(0,c.A)((0,l.A)().m(function n(){var r;return(0,l.A)().w(function(n){while(1)switch(n.p=n.n){case 0:if(t&&e||(t=i.form?i.form.getFieldValue("startDate"):null,e=i.form?i.form.getFieldValue("endDate"):null),t||(t=i.defaultStartDate),e||(e=i.defaultEndDate),i.market&&"crypto"===i.market.toLowerCase()){n.n=1;break}return i.precisionInfo={enabled:!1,reason:"only_crypto",message:i.$t("dashboard.indicator.backtest.onlyCryptoSupported")},n.a(2);case 1:return n.p=1,n.n=2,(0,f.Ay)({url:"/api/indicator/backtest/precision-info",method:"post",data:{market:i.market,startDate:t.format("YYYY-MM-DD"),endDate:e.format("YYYY-MM-DD")}});case 2:r=n.v,1===r.code&&r.data&&(i.precisionInfo=r.data),n.n=4;break;case 3:n.p=3,n.v,i.precisionInfo=null;case 4:return n.a(2)}},n,null,[[1,3]])}))()},onTimeframeChange:function(){this.selectedDatePreset="30d";var t=Wr()(),e=Wr()().subtract(30,"days");this.form.setFieldsValue({startDate:e,endDate:t}),this.fetchPrecisionInfo(e,t)},onDateChange:function(){var t=this;this.selectedDatePreset=null,this.$nextTick(function(){t.fetchPrecisionInfo()})},validateDateRange:function(t,e){if(!t||!e)return!0;var i=e.diff(t,"days"),n=this.maxBacktestRange.days||365;return!(i>n)||(this.$message.error(this.$t("dashboard.indicator.backtest.dateRangeExceededDays",{timeframe:this.selectedTimeframe||this.timeframe,maxRange:this.maxBacktestRange.label,maxDays:n})),!1)},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(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}))},handleCancel:function(){this.$emit("cancel")},handlePrev:function(){this.loading||this.currentStep>0&&(this.currentStep-=1)},handleNext:function(){this.loading||(0!==this.currentStep?1===this.currentStep&&this.handleRunBacktest():this.currentStep=1)},handleRerun:function(){this.loading||(this.currentStep=1,this.hasResult=!1,this.backtestRunId=null)},startLoadingAnimation:function(){var t=this,e=[this.$t("dashboard.indicator.backtest.loadingTip1")||"正在获取历史K线数据...",this.$t("dashboard.indicator.backtest.loadingTip2")||"正在执行策略信号计算...",this.$t("dashboard.indicator.backtest.loadingTip3")||"正在模拟交易执行...",this.$t("dashboard.indicator.backtest.loadingTip4")||"正在计算回测指标...",this.$t("dashboard.indicator.backtest.loadingTip5")||"即将完成,请稍候..."],i=0;this.loadingTip=e[0],this.loadingTimer=setInterval(function(){i=(i+1)%e.length,t.loadingTip=e[i]},2e3)},stopLoadingAnimation:function(){this.loadingTimer&&(clearInterval(this.loadingTimer),this.loadingTimer=null),this.loadingTip=""},handleRunBacktest:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i;return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:i=["startDate","endDate","initialCapital","commission","leverage","tradeDirection","slippage"],t.form.validateFields(i,function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,o,s,c;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!i){e.n=1;break}return e.a(2);case 1:if(r=(0,d.A)((0,d.A)({},t.form.getFieldsValue()||{}),n||{}),t.indicator&&t.indicator.id){e.n=2;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noIndicatorCode")),e.a(2);case 2:if(t.symbol){e.n=3;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noSymbol")),e.a(2);case 3:if(t.validateDateRange(n.startDate,n.endDate)){e.n=4;break}return e.a(2);case 4:return t.loading=!0,t.hasResult=!1,t.startLoadingAnimation(),e.p=5,a=function(t){return Number(t||0)/100},o={risk:{stopLossPct:a(r.stopLossPct),takeProfitPct:a(r.takeProfitPct),trailing:{enabled:!!r.trailingEnabled,pct:a(r.trailingStopPct),activationPct:a(r.trailingActivationPct)}},position:{entryPct:a(r.entryPct||0)},scale:{trendAdd:{enabled:!!r.trendAddEnabled,stepPct:a(r.trendAddStepPct),sizePct:a(r.trendAddSizePct),maxTimes:r.trendAddMaxTimes||0},dcaAdd:{enabled:!!r.dcaAddEnabled,stepPct:a(r.dcaAddStepPct),sizePct:a(r.dcaAddSizePct),maxTimes:r.dcaAddMaxTimes||0},trendReduce:{enabled:!!r.trendReduceEnabled,stepPct:a(r.trendReduceStepPct),sizePct:a(r.trendReduceSizePct),maxTimes:r.trendReduceMaxTimes||0},adverseReduce:{enabled:!!r.adverseReduceEnabled,stepPct:a(r.adverseReduceStepPct),sizePct:a(r.adverseReduceSizePct),maxTimes:r.adverseReduceMaxTimes||0}}},s={userid:t.userId||1,indicatorId:t.indicator.id,symbol:t.symbol,market:t.market,timeframe:t.selectedTimeframe||t.timeframe,startDate:n.startDate.format("YYYY-MM-DD"),endDate:n.endDate.format("YYYY-MM-DD"),initialCapital:n.initialCapital,commission:a(n.commission||0),slippage:a(n.slippage||0),leverage:n.leverage||1,tradeDirection:n.tradeDirection||"long",strategyConfig:o,enableMtf:t.market&&"crypto"===t.market.toLowerCase()},e.n=6,(0,f.Ay)({url:"/api/indicator/backtest",method:"post",data:s});case 6:c=e.v,1===c.code&&c.data?(c.data.runId&&(t.backtestRunId=c.data.runId),t.result=c.data.result||c.data,t.hasResult=!0,t.currentStep=2,t.$nextTick(function(){t.renderEquityChart()}),t.$message.success(t.$t("dashboard.indicator.backtest.success"))):t.$message.error(c.msg||t.$t("dashboard.indicator.backtest.failed")),e.n=8;break;case 7:e.p=7,e.v,t.$message.error(t.$t("dashboard.indicator.backtest.failed"));case 8:return e.p=8,t.stopLoadingAnimation(),t.loading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[5,7,8,9]])}));return function(t,i){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.96)",borderColor:"#e8e8e8",borderWidth:1,textStyle:{color:"#333"},formatter:function(t){var e='

'.concat(t[0].axisValue,"
");return t.forEach(function(t){if(void 0!==t.value&&null!==t.value){var i=t.value.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});e+='
\n '.concat(t.marker," ").concat(t.seriesName,'\n $').concat(i,"\n
")}}),e}},legend:{show:!1},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1,axisLine:{lineStyle:{color:"#e8e8e8"}},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,rotate:0,interval:Math.floor(i.length/6)}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#f5f5f5",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,formatter:function(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(0)+"K":t}}},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s,cap:"round",join:"round"},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)},emphasis:{lineStyle:{width:3}}}],animation:!0,animationDuration:800,animationEasing:"cubicOut"};this.equityChart.setOption(c),window.addEventListener("resize",function(){t.equityChart&&t.equityChart.resize()})}}},beforeDestroy:function(){this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},Vr=Hr,Kr=(0,T.A)(Vr,Nr,Or,!1,null,"9d8ac1fc",null),Yr=Kr.exports,Xr=function(){var t=this,e=t._self._c;return e("a-drawer",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":980,maskClosable:!0},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-switch",{model:{value:t.useCurrentFilters,callback:function(e){t.useCurrentFilters=e},expression:"useCurrentFilters"}}),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyUseCurrent"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.loading},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIAnalyze"))+" ")])],1),t.useCurrentFilters?t._e():e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-input",{staticStyle:{width:"220px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"140px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),allowClear:""},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(i){return e("a-select-option",{key:i,attrs:{value:i}},[t._v(t._s(i))])}),1),e("a-button",{attrs:{loading:t.loading},on:{click:t.loadRuns}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyApply")))]),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(t._s(t.filterLabel))])],1),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:10,size:"small"},rowKey:"id",scroll:{x:900},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"range",fn:function(i,n){return[e("span",[t._v(t._s(n.start_date||"")+" ~ "+t._s(n.end_date||""))])]}},{key:"status",fn:function(i){return[e("a-tag",{attrs:{color:"success"===i?"green":"failed"===i?"red":"blue"}},[t._v(" "+t._s("success"===i?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===i?t.$t("dashboard.indicator.backtest.historyStatusFailed"):i)+" ")])]}},{key:"actions",fn:function(i,n){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===n.id},on:{click:function(e){return t.viewRun(n)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")])]}}])}),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.historyAIAnalyzeTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"12px 0"}},[e("a-spin")],1):e("div",{staticStyle:{"white-space":"pre-wrap","font-family":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"}},[t._v(" "+t._s(t.aiResult||t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])],1)},Ur=[],Gr={name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},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:"",useCurrentFilters:!0,filterSymbol:"",filterTimeframe:"",timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[]}},computed:{filterLabel:function(){var t=[];this.indicatorId&&t.push("indicatorId=".concat(this.indicatorId));var e=this.useCurrentFilters?this.market:this.market||"",i=this.useCurrentFilters?this.symbol:this.filterSymbol||"",n=this.useCurrentFilters?this.timeframe:this.filterTimeframe||"";return e&&t.push("market=".concat(e)),i&&t.push("symbol=".concat(i)),n&&t.push("timeframe=".concat(n)),t.length?t.join(" | "):""}},watch:{visible:function(t){t&&(this.initColumns(),this.useCurrentFilters=!0,this.filterSymbol=this.symbol||"",this.filterTimeframe=this.timeframe||"",this.selectedRowKeys=[],this.aiResult="",this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},initColumns:function(){this.columns.length||(this.columns=[{title:this.$t("dashboard.indicator.backtest.historyRunId"),dataIndex:"id",key:"id",width:90},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:140},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:90},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:90},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:220,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyActions"),key:"actions",width:90,scopedSlots:{customRender:"actions"}}])},loadRuns:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,r,a;return(0,l.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,i=t.useCurrentFilters?t.symbol:t.filterSymbol||"",n=t.useCurrentFilters?t.timeframe:t.filterTimeframe||"",r=t.market||"",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/history",method:"get",params:{userid:t.userId,limit:100,offset:0,indicatorId:t.indicatorId,symbol:i,market:r,timeframe:n}});case 3:a=e.v,a&&1===a.code&&Array.isArray(a.data)?t.runs=a.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,l.A)().m(function i(){var n;return(0,l.A)().w(function(i){while(1)switch(i.p=i.n){case 0:if(t&&t.id){i.n=1;break}return i.a(2);case 1:return e.detailLoadingId=t.id,i.p=2,i.n=3,(0,f.Ay)({url:"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:n=i.v,n&&1===n.code&&n.data&&e.$emit("view",n.data);case 4:return i.p=4,e.detailLoadingId=null,i.f(4);case 5:return i.a(2)}},i,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId&&t.selectedRowKeys.length){e.n=1;break}return e.a(2);case 1:return t.analyzing=!0,t.showAIResult=!0,t.aiResult="",e.p=2,i=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",data:{userid:t.userId,runIds:t.selectedRowKeys,lang:i}});case 3:n=e.v,n&&1===n.code&&n.data&&n.data.analysis?t.aiResult=n.data.analysis:t.aiResult=n.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult");case 4:return e.p=4,t.analyzing=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()}}},jr=Gr,qr=(0,T.A)(jr,Xr,Ur,!1,null,null,null),Zr=qr.exports,Jr=function(){var t,e,i,n=this,r=n._self._c;return r("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:n.modalTitle,visible:n.visible,width:1100,maskClosable:!1},on:{cancel:function(t){return n.$emit("cancel")}}},[n.run&&n.run.result?r("div",[n.run.id?r("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:n.$t("dashboard.indicator.backtest.savedRunId",{id:n.run.id})}}):n._e(),r("div",{staticClass:"metrics-cards"},[r("div",{staticClass:"metric-card",class:{positive:n.result.totalReturn>0,negative:n.result.totalReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.totalReturn)))]),r("div",{staticClass:"metric-amount"},[n._v(n._s(n.formatMoney(n.result.totalProfit)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.annualReturn>0,negative:n.result.annualReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.annualReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.annualReturn)))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.maxDrawdown")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.maxDrawdown)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.sharpeRatio")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(t=n.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.winRate")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.winRate)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.profitFactor>=1.5,negative:n.result.profitFactor<1}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.profitFactor")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(e=n.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalTrades")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(null!==(i=n.result.totalTrades)&&void 0!==i?i:0))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalCommission")))]),r("div",{staticClass:"metric-value"},[n._v("-$"+n._s(n.result.totalCommission?n.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),r("div",{staticClass:"chart-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.equityCurve")))]),r("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),r("div",{staticClass:"trades-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.tradeHistory")))]),r("a-table",{attrs:{columns:n.tradeColumns,"data-source":n.result.trades||[],pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:n.rowKey},scopedSlots:n._u([{key:"type",fn:function(t){return[r("a-tag",{attrs:{color:n.getTradeTypeColor(t)}},[n._v(" "+n._s(n.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[r("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[n._v(" $"+n._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[r("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":"#666"}},[n._v(" "+n._s(n.formatMoney(t))+" ")])]}}])})],1)],1):r("div",{staticStyle:{padding:"12px 0"}},[r("a-empty",{attrs:{description:n.$t("dashboard.indicator.backtest.historyNoData")}})],1),r("template",{slot:"footer"},[r("a-button",{on:{click:function(t){return n.$emit("cancel")}}},[n._v(n._s(n.$t("dashboard.indicator.backtest.close")))])],1)],2)},Qr=[],ta={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=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1},yAxis:{type:"value"},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)}}]};this.equityChart.setOption(c),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},ea=ta,ia=(0,T.A)(ea,Jr,Qr,!1,null,"a484239a",null),na=ia.exports,ra=i(39283),aa={name:"DashboardIndicator",components:{IndicatorEditor:M,KlineChart:Br,BacktestModal:Yr,BacktestHistoryDrawer:Zr,BacktestRunViewer:na,QuickTradePanel:ra.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),r=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),b=(0,h.KR)(!1),x=(0,h.KR)(""),_=(0,h.KR)(!1),w=(0,h.KR)(!1),C=(0,h.KR)(!1),S=(0,h.KR)(""),k=(0,h.KR)(""),A=(0,h.KR)([]),T=(0,h.KR)(!1),I=(0,h.KR)([]),M=(0,h.KR)(!1),E=(0,h.KR)(null),D=(0,h.KR)(null),P=(0,h.KR)([]),L=(0,h.KR)(!1),R=(0,h.KR)(!1),F=(0,h.KR)(""),B=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(V.value||"").toLowerCase()}),z=function(){O.value?(F.value=H.value||"",N.value=parseFloat(K.value)||0,B.value="",R.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},W=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},$=function(){i&&i.$router&&i.$router.push("/indicator-community")},H=(0,h.KR)(""),V=(0,h.KR)(""),K=(0,h.KR)("--"),Y=(0,h.KR)(0),X=(0,h.EW)(function(){return Y.value>0?"color-up":Y.value<0?"color-down":""}),U=(0,h.KR)("1D"),G=(0,h.KR)([]),j=(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}}],Z=[{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}}],J=(0,h.KR)([]),Q=(0,h.KR)([]),tt=(0,h.KR)(!1),et=(0,h.KR)(!1),it=(0,h.KR)(null),nt=(0,h.KR)(""),rt=(0,h.KR)([]),at=(0,h.KR)({}),ot=(0,h.KR)(!1),st=(0,h.KR)({}),lt=(0,h.KR)(!1),ct=(0,h.KR)(!1),ut=(0,h.KR)(!1),dt=(0,h.KR)(null),ht=(0,h.KR)(!1),pt=(0,h.KR)(null),ft=(0,h.KR)(!1),vt=(0,h.KR)(null),gt=(0,h.KR)(!1),mt=(0,h.KR)(null),yt=(0,h.KR)(!1),bt=(0,h.KR)(null),xt=(0,h.KR)(!1),_t=(0,h.KR)(!1),wt=(0,h.KR)("free"),Ct=(0,h.KR)(10),St=(0,h.KR)(""),kt=(0,h.KR)(!1),At={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},Tt=(0,h.KR)(!1),It=function(t){var e=t.price,i=t.change;K.value=e,Y.value=i},Mt=function(){},Et=(0,h.KR)([]),Dt=(0,h.KR)([]),Pt=function(t){U.value=t},Lt=function(t){return t?Object.values(t).join(", "):""},Rt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r.value=!0,t.p=1,a=(0,h.nI)(),o=null===a||void 0===a||null===(e=a.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,r.value=!1,Ft(),ne(),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),Ft(),ne()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,r.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Ft=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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 b.value=!0,t.p=2,t.n=3,(0,v.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)})}),Bt(),y.value.length>0&&!H.value&&(r=y.value[0],V.value=r.market,H.value=r.symbol,p.value=r.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,b.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Bt=function(){x.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(x.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(x.value.toLowerCase())}):m.value=y.value},Nt=function(t){x.value=t,0===y.value.length&&t&&(_.value=!0),Bt()},Ot=function(t){_.value=t,t||(x.value="")},zt=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),r=n[0],a=n[1];e={market:r,symbol:a,value:t}}e&&(V.value=e.market,H.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())},$t=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,v.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?P.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)?P.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):P.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"}],P.value.length>0&&!S.value&&(S.value=P.value[0].value),t.n=3;break;case 2:t.p=2,t.v,P.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)}}(),Ht=function(){w.value=!1,E.value=null,k.value="",A.value=[],L.value=!1,S.value=P.value.length>0?P.value[0].value:""},Vt=function(t){S.value=t,k.value="",A.value=[],E.value=null,L.value=!1,jt(t)},Kt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return A.value=[],L.value=!1,void(E.value=null);D.value=setTimeout(function(){Xt(e)},500)},Yt=function(t){t&&t.trim()&&(S.value?A.value.length>0||(L.value&&0===A.value.length?Ut():Xt(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},Xt=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 A.value=[],L.value=!1,t.a(2);case 1:if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return T.value=!0,L.value=!0,t.p=3,t.n=4,(0,v._3)({market:S.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?A.value=n.data:(A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,T.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()?S.value?E.value={market:S.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){E.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},jt=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=S.value||(P.value.length>0?P.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return M.value=!0,t.p=2,t.n=3,(0,v.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?I.value=i.data:I.value=[],t.n=5;break;case 4:t.p=4,t.v,I.value=[];case 5:return t.p=5,M.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,r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",r="",!E.value){t.n=1;break}e=E.value.market,r=E.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=S.value,r=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 C.value=!0,t.p=5,t.n=6,(0,v.dp)({userid:n.value,market:e,symbol:r});case 6:if(a=t.v,!a||1!==a.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),Ht(),t.n=7,Ft();case 7:t.n=9;break;case 8:u.A.error((null===a||void 0===a?void 0:a.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,C.value=!1,t.f(11);case 12:return t.a(2)}},t,null,[[5,10,11,12]])}));return function(){return t.apply(this,arguments)}}(),Zt=function(t){if(!ee(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)}))}},Jt=function(t){G.value=G.value.filter(function(e){return e.id!==t})},Qt=function(t){var e=t.action,i=t.indicator;if("add"===e){var n=(0,d.A)((0,d.A)({},i),{},{calculate:te(i.id)});Zt(n)}else"remove"===e&&Jt(i.id)},te=function(t){return null},ee=function(t){return"sma"===t?q.some(function(t){return G.value.some(function(e){return e.id===t.id})}):"ema"===t?Z.some(function(t){return G.value.some(function(e){return e.id===t.id})}):G.value.some(function(e){return e.id===t})},ie=function(){var t=new Set;return q.forEach(function(e){return t.add(e.id)}),Z.forEach(function(e){return t.add(e.id)}),G.value.filter(function(e){return!t.has(e.id)})},ne=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r;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 tt.value=!0,t.p=2,t.n=3,(0,f.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}),r=e.data.filter(function(t){return 1===t.is_buy||"1"===t.is_buy}),J.value=i.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"custom"})}),Q.value=r.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,tt.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),ae=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var r,a,o,s,c,h,p,f,v;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ee(r)){t.n=1;break}return Jt(r),t.a(2);case 1:if(t.p=1,a=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(a),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=a,h=(0,d.A)({},s),p={id:r,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})}},f=(0,d.A)((0,d.A)({},o.params),s),G.value.push((0,d.A)((0,d.A)({},p),{},{params:f})),t.n=7;break;case 6:t.p=6,v=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(v.message||"未知错误"));case 7:return t.a(2)}},t,null,[[1,6]])}));return function(e,i){return t.apply(this,arguments)}}(),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ee(r)){t.n=1;break}Jt(r),t.n=5;break;case 1:return t.p=1,ot.value=!0,t.n=2,i.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:e.id}});case 2:a=t.v,a&&1===a.code&&Array.isArray(a.data)&&a.data.length>0?(rt.value=a.data,o="".concat(n,"-").concat(e.id),s=st.value[o],c={},a.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}),at.value=c,it.value=e,nt.value=n,et.value=!0):ae(e,n),t.n=4;break;case 3:t.p=3,t.v,ae(e,n);case 4:return t.p=4,ot.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)}}(),se=function(){if(it.value){var t="".concat(nt.value,"-").concat(it.value.id);st.value[t]=(0,d.A)({},at.value);var e=(0,d.A)((0,d.A)({},it.value),{},{userParams:(0,d.A)({},at.value)});ae(e,nt.value)}et.value=!1,it.value=null,nt.value=""},le=function(){ce(),et.value=!1,setTimeout(function(){it.value=null,nt.value=""},100)},ce=function(){if(it.value&&nt.value){var t="".concat(nt.value,"-").concat(it.value.id);st.value[t]=JSON.parse(JSON.stringify(at.value))}},ue=function(){ce()},de=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 r=re.value.parsePythonStrategy(e);if(!r)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var a={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:r,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)({},a),{},{params:(0,d.A)({},r.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"))},he=function(){dt.value=null,ut.value=!0},pe=function(t){dt.value=t,ut.value=!0},fe=function(){lt.value=!lt.value},ve=function(t){a.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 r,a,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,f.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(r=e.v,1!==r.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),a="custom-"+t.id,ee(a)&&Jt(a),e.n=2,ne();case 2:e.n=4;break;case 3:u.A.error(r.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 r(){return e.apply(this,arguments)}return r}()})},ge=function(t){pt.value=(0,d.A)({},t),ht.value=!0},me=function(t){vt.value=(0,d.A)({},t),ft.value=!0},ye=function(t){mt.value=t,gt.value=!0},be=function(t){bt.value=(0,d.A)({},t),wt.value=t.pricing_type||"free",Ct.value=t.price||10,St.value=t.description||"",kt.value=!!t.vip_free,yt.value=!0},xe=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:St.value,publishToCommunity:!0,pricingType:wt.value,price:"paid"===wt.value?Ct.value:0,vipFree:"paid"===wt.value&&kt.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),yt.value=!1,bt.value=null,t.n=4,ne();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,r=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(r.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)}}(),_e=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 _t.value=!0,t.p=2,t.n=3,(0,f.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")),yt.value=!1,bt.value=null,t.n=4,ne();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,_t.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),we=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var r,a,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 r=i.$refs.indicatorEditor,r&&(r.saving=!0),t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(a=t.v,1!==a.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),ut.value=!1,dt.value=null,t.n=4,ne();case 4:t.n=6;break;case 5:u.A.error(a.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,r&&(r.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)}}(),Ce=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&&!S.value&&(S.value=P.value[0].value),S.value&&jt(S.value)):(E.value=null,k.value="",A.value=[],L.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return at.value},function(t){if(et.value&&it.value&&nt.value){var e="".concat(nt.value,"-").concat(it.value.id);st.value[e]=JSON.parse(JSON.stringify(t))}},{deep:!0,immediate:!1}),(0,h.wB)(et,function(t){t||ce()}),{userId:n,klineChart:re,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:x,symbolSearchOpen:_,currentSymbol:H,currentMarket:V,currentPrice:K,priceChange:Y,priceChangeClass:X,timeframe:U,loadingWatchlist:b,activeIndicators:G,trendIndicators:Et,oscillatorIndicators:Dt,customIndicators:J,purchasedIndicators:Q,loadingIndicators:tt,realtimeEnabled:Tt,toggleRealtime:Me,handleSymbolSearch:Nt,handleSymbolSelect:zt,handleDropdownVisibleChange:Ot,filterSymbolOption:Wt,getMarketName:Te,getMarketColor:Ie,setTimeframe:Pt,addIndicator:Zt,removeIndicator:Jt,isIndicatorActive:ee,loadIndicators:ne,addPythonIndicator:ae,toggleIndicator:oe,getIndicatorStatus:Ce,getIndicatorStatusIcon:Se,getIndicatorStatusClass:ke,getExpiryTimeText:Ae,formatParams:Lt,loadWatchlist:Ft,getCustomActiveIndicators:ie,showIndicatorEditor:ut,editingIndicator:dt,handleCreateIndicator:he,handleRunIndicator:de,handleSaveIndicator:we,handleEditIndicator:pe,handleDeleteIndicator:ve,toggleCustomSection:fe,customSectionCollapsed:lt,purchasedSectionCollapsed:ct,handlePriceChange:It,handleChartRetry:Mt,handleIndicatorToggle:Qt,showParamsModal:et,pendingIndicator:it,indicatorParams:rt,indicatorParamValues:at,loadingParams:ot,confirmIndicatorParams:se,cancelIndicatorParams:le,handleParamsModalAfterClose:ue,showBacktestModal:ht,backtestIndicator:pt,handleOpenBacktest:ge,showBacktestHistoryDrawer:ft,backtestHistoryIndicator:vt,handleOpenBacktestHistory:me,showBacktestRunViewer:gt,selectedBacktestRun:mt,handleViewBacktestRun:ye,showPublishModal:yt,publishIndicator:bt,publishing:xt,unpublishing:_t,publishPricingType:wt,publishPrice:Ct,publishDescription:St,publishVipFree:kt,publishRules:At,handlePublishIndicator:be,handleConfirmPublish:xe,handleUnpublish:_e,selectedSymbol:H,selectedMarket:V,selectedTimeframe:U,isMobile:j,showAddStockModal:w,addingStock:C,selectedMarketTab:S,symbolSearchKeyword:k,symbolSearchResults:A,searchingSymbols:T,hotSymbols:I,loadingHotSymbols:M,selectedSymbolForAdd:E,marketTypes:P,hasSearched:L,handleCloseAddStockModal:Ht,handleMarketTabChange:Vt,handleSymbolSearchInput:Kt,handleSearchOrInput:Yt,searchSymbolsInModal:Xt,selectSymbol:Gt,loadHotSymbols:jt,handleAddStock:qt,handleDirectAdd:Ut,loadMarketTypes:$t,showQuickTrade:R,qtSymbol:F,qtSide:B,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:W,goToIndicatorMarket:$}}},oa=aa,sa=(0,T.A)(oa,n,r,!1,null,"1895bd90",null),la=sa.exports},63009:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.algo,s=[],l=[];(function(){function t(t){for(var i=e.sqrt(t),n=2;n<=i;n++)if(!(t%n))return!1;return!0}function i(t){return 4294967296*(t-(0|t))|0}var n=2,r=0;while(r<64)t(n)&&(r<8&&(s[r]=i(e.pow(n,.5))),l[r]=i(e.pow(n,1/3)),r++),n++})();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],u=i[5],d=i[6],h=i[7],p=0;p<64;p++){if(p<16)c[p]=0|t[e+p];else{var f=c[p-15],v=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[p-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=v+c[p-7]+m+c[p-16]}var y=s&u^~s&d,b=n&r^n&a^r&a,x=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),_=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),w=h+_+y+l[p]+c[p],C=x+b;h=d,d=u,u=s,s=o+w|0,o=a,a=r,r=n,n=w+C|0}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+s|0,i[5]=i[5]+u|0,i[6]=i[6]+d|0,i[7]=i[7]+h|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=e.floor(n/4294967296),i[15+(r+64>>>9<<4)]=n,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=a._createHelper(u),i.HmacSHA256=a._createHmacHelper(u)}(Math),t.SHA256})},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,r=e.enc;r.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,r=e?this._safe_map:this._map;t.clamp();for(var a=[],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=r.charAt(64);if(h)while(a.length%4)a.push(h);return a.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64url})},70019:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,r=i.WordArray,a=e.algo,o=a.SHA256,s=a.HMAC,l=a.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i=this.cfg,n=s.create(i.hasher,t),a=r.create(),o=r.create([1]),l=a.words,c=o.words,u=i.keySize,d=i.iterations;while(l.length=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;dn?S(e):r0&&A(t,e)&&(o+=" "+l),o}return _(t,e)}function _(t,e,n){if(t.eatSpace())return null;if(!n&&t.match(/^#.*/))return"comment";if(t.match(/^[0-9\.]/,!1)){var r=!1;if(t.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),t.match(/^[\d_]+\.\d*/)&&(r=!0),t.match(/^\.\d+/)&&(r=!0),r)return t.eat(/J/i),"number";var a=!1;if(t.match(/^0x[0-9a-f_]+/i)&&(a=!0),t.match(/^0b[01_]+/i)&&(a=!0),t.match(/^0o[0-7_]+/i)&&(a=!0),t.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(t.eat(/J/i),a=!0),t.match(/^0(?![\dx])/i)&&(a=!0),a)return t.eat(/L/i),"number"}if(t.match(m)){var o=-1!==t.current().toLowerCase().indexOf("f");return o?(e.tokenize=w(t.current(),e.tokenize),e.tokenize(t,e)):(e.tokenize=C(t.current(),e.tokenize),e.tokenize(t,e))}for(var s=0;s=0)t=t.substr(1);var i=1==t.length,n="string";function r(t){return function(e,i){var n=_(e,i,!0);return"punctuation"==n&&("{"==e.current()?i.tokenize=r(t+1):"}"==e.current()&&(i.tokenize=t>1?r(t-1):a)),n}}function a(a,o){while(!a.eol())if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),i&&a.eol())return n}else{if(a.match(t))return o.tokenize=e,n;if(a.match("{{"))return n;if(a.match("{",!1))return o.tokenize=r(0),a.current()?n:o.tokenize(a,o);if(a.match("}}"))return n;if(a.match("}"))return l;a.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;o.tokenize=e}return n}return a.isString=!0,a}function C(t,e){while("rubf".indexOf(t.charAt(0).toLowerCase())>=0)t=t.substr(1);var i=1==t.length,n="string";function r(r,a){while(!r.eol())if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),i&&r.eol())return n}else{if(r.match(t))return a.tokenize=e,n;r.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;a.tokenize=e}return n}return r.isString=!0,r}function S(t){while("py"!=a(t).type)t.scopes.pop();t.scopes.push({offset:a(t).offset+o.indentUnit,type:"py",align:null})}function k(t,e,i){var n=t.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:t.column()+1;e.scopes.push({offset:e.indent+h,type:i,align:n})}function A(t,e){var i=t.indentation();while(e.scopes.length>1&&a(e).offset>i){if("py"!=a(e).type)return!0;e.scopes.pop()}return a(e).offset!=i}function T(t,e){t.sol()&&(e.beginningOfLine=!0,e.dedent=!1);var i=e.tokenize(t,e),n=t.current();if(e.beginningOfLine&&"@"==n)return t.match(g,!1)?"meta":v?"operator":l;if(/\S/.test(n)&&(e.beginningOfLine=!1),"variable"!=i&&"builtin"!=i||"meta"!=e.lastToken||(i="meta"),"pass"!=n&&"return"!=n||(e.dedent=!0),"lambda"==n&&(e.lambda=!0),":"==n&&!e.lambda&&"py"==a(e).type&&t.match(/^\s*(?:#|$)/,!1)&&S(e),1==n.length&&!/string|comment/.test(i)){var r="[({".indexOf(n);if(-1!=r&&k(t,e,"])}".slice(r,r+1)),r="])}".indexOf(n),-1!=r){if(a(e).type!=n)return l;e.indent=e.scopes.pop().offset-h}}return e.dedent&&t.eol()&&"py"==a(e).type&&e.scopes.length>1&&e.scopes.pop(),i}var I={startState:function(t){return{tokenize:x,scopes:[{offset:t||0,type:"py",align:null}],indent:t||0,lastToken:null,lambda:!1,dedent:0}},token:function(t,e){var i=e.errorToken;i&&(e.errorToken=!1);var n=T(t,e);return n&&"comment"!=n&&(e.lastToken="keyword"==n||"punctuation"==n?t.current():n),"punctuation"==n&&(n=null),t.eol()&&e.lambda&&(e.lambda=!1),i?n+" "+l:n},indent:function(e,i){if(e.tokenize!=x)return e.tokenize.isString?t.Pass:0;var n=a(e),r=n.type==i.charAt(0)||"py"==n.type&&!e.dedent&&/^(else:|elif |except |finally:)/.test(i);return null!=n.align?n.align-(r?1:0):n.offset-(r?h:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return I}),t.defineMIME("text/x-python","python");var o=function(t){return t.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:o("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})},77193: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.StreamCipher,r=e.algo,a=r.RC4=n.extend({_doReset:function(){for(var t=this._key,e=t.words,i=t.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var a=0;r<256;r++){var o=r%i,s=e[o>>>2]>>>24-o%4*8&255;a=(a+n[r]+s)%256;var l=n[r];n[r]=n[a],n[a]=l}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,i=this._j,n=0,r=0;r<4;r++){e=(e+1)%256,i=(i+t[e])%256;var a=t[e];t[e]=t[i],t[i]=a,n|=t[(t[e]+t[i])%256]<<24-8*r}return this._i=e,this._j=i,n}e.RC4=n._createHelper(a);var s=r.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});e.RC4Drop=n._createHelper(s)}(),t.RC4})},78056:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){ -/** @preserve - (c) 2012 by Cédric Mesnil. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -return function(){var e=t,i=e.lib,n=i.WordArray,r=i.Hasher,a=e.algo,o=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,r=t[n];t[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a,h,b,x,_,w,C,S,k,A,T,I=this._hash.words,M=u.words,E=d.words,D=o.words,P=s.words,L=l.words,R=c.words;w=a=I[0],C=h=I[1],S=b=I[2],k=x=I[3],A=_=I[4];for(i=0;i<80;i+=1)T=a+t[e+D[i]]|0,T+=i<16?p(h,b,x)+M[0]:i<32?f(h,b,x)+M[1]:i<48?v(h,b,x)+M[2]:i<64?g(h,b,x)+M[3]:m(h,b,x)+M[4],T|=0,T=y(T,L[i]),T=T+_|0,a=_,_=x,x=y(b,10),b=h,h=T,T=w+t[e+P[i]]|0,T+=i<16?m(C,S,k)+E[0]:i<32?g(C,S,k)+E[1]:i<48?v(C,S,k)+E[2]:i<64?f(C,S,k)+E[3]:p(C,S,k)+E[4],T|=0,T=y(T,R[i]),T=T+A|0,w=A,A=k,k=y(S,10),S=C,C=T;T=I[1]+b+k|0,I[1]=I[2]+x+A|0,I[2]=I[3]+_+w|0,I[3]=I[4]+a+C|0,I[4]=I[0]+h+S|0,I[0]=T},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(e.length+1),this._process();for(var r=this._hash,a=r.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,i){return t^e^i}function f(t,e,i){return t&e|~t&i}function v(t,e,i){return(t|~e)^i}function g(t,e,i){return t&i|e&~i}function m(t,e,i){return t^(e|~i)}function y(t,e){return t<>>32-e}e.RIPEMD160=r._createHelper(h),e.HmacRIPEMD160=r._createHmacHelper(h)}(Math),t.RIPEMD160})},80754: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,r=e.enc;r.Base64={stringify:function(t){var e=t.words,i=t.sigBytes,n=this._map;t.clamp();for(var r=[],a=0;a>>2]>>>24-a%4*8&255,s=e[a+1>>>2]>>>24-(a+1)%4*8&255,l=e[a+2>>>2]>>>24-(a+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&a+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(r.length%4)r.push(d);return r.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var r=0;r>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64})},81380:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Hasher,r=e.x64,a=r.Word,o=r.WordArray,s=e.algo;function l(){return a.create.apply(a,arguments)}var c=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var t=0;t<80;t++)u[t]=l()})();var d=s.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],l=i[5],d=i[6],h=i[7],p=n.high,f=n.low,v=r.high,g=r.low,m=a.high,y=a.low,b=o.high,x=o.low,_=s.high,w=s.low,C=l.high,S=l.low,k=d.high,A=d.low,T=h.high,I=h.low,M=p,E=f,D=v,P=g,L=m,R=y,F=b,B=x,N=_,O=w,z=C,W=S,$=k,H=A,V=T,K=I,Y=0;Y<80;Y++){var X,U,G=u[Y];if(Y<16)U=G.high=0|t[e+2*Y],X=G.low=0|t[e+2*Y+1];else{var j=u[Y-15],q=j.high,Z=j.low,J=(q>>>1|Z<<31)^(q>>>8|Z<<24)^q>>>7,Q=(Z>>>1|q<<31)^(Z>>>8|q<<24)^(Z>>>7|q<<25),tt=u[Y-2],et=tt.high,it=tt.low,nt=(et>>>19|it<<13)^(et<<3|it>>>29)^et>>>6,rt=(it>>>19|et<<13)^(it<<3|et>>>29)^(it>>>6|et<<26),at=u[Y-7],ot=at.high,st=at.low,lt=u[Y-16],ct=lt.high,ut=lt.low;X=Q+st,U=J+ot+(X>>>0>>0?1:0),X+=rt,U=U+nt+(X>>>0>>0?1:0),X+=ut,U=U+ct+(X>>>0>>0?1:0),G.high=U,G.low=X}var dt=N&z^~N&$,ht=O&W^~O&H,pt=M&D^M&L^D&L,ft=E&P^E&R^P&R,vt=(M>>>28|E<<4)^(M<<30|E>>>2)^(M<<25|E>>>7),gt=(E>>>28|M<<4)^(E<<30|M>>>2)^(E<<25|M>>>7),mt=(N>>>14|O<<18)^(N>>>18|O<<14)^(N<<23|O>>>9),yt=(O>>>14|N<<18)^(O>>>18|N<<14)^(O<<23|N>>>9),bt=c[Y],xt=bt.high,_t=bt.low,wt=K+yt,Ct=V+mt+(wt>>>0>>0?1:0),St=(wt=wt+ht,Ct=Ct+dt+(wt>>>0>>0?1:0),wt=wt+_t,Ct=Ct+xt+(wt>>>0<_t>>>0?1:0),wt=wt+X,Ct=Ct+U+(wt>>>0>>0?1:0),gt+ft),kt=vt+pt+(St>>>0>>0?1:0);V=$,K=H,$=z,H=W,z=N,W=O,O=B+wt|0,N=F+Ct+(O>>>0>>0?1:0)|0,F=L,B=R,L=D,R=P,D=M,P=E,E=wt+St|0,M=Ct+kt+(E>>>0>>0?1:0)|0}f=n.low=f+E,n.high=p+M+(f>>>0>>0?1:0),g=r.low=g+P,r.high=v+D+(g>>>0

>>0?1:0),y=a.low=y+R,a.high=m+L+(y>>>0>>0?1:0),x=o.low=x+B,o.high=b+F+(x>>>0>>0?1:0),w=s.low=w+O,s.high=_+N+(w>>>0>>0?1:0),S=l.low=S+W,l.high=C+z+(S>>>0>>0?1:0),A=d.low=A+H,d.high=k+$+(A>>>0>>0?1:0),I=h.low=I+K,h.high=T+V+(I>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(i/4294967296),e[31+(n+128>>>10<<5)]=i,t.sigBytes=4*e.length,this._process();var r=this._hash.toX32();return r},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(d),e.HmacSHA512=n._createHmacHelper(d)}(),t.SHA512})},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 r,a=this._iv;a?(r=a.slice(0),this._iv=void 0):r=this._prevBlock,n.encryptBlock(r,0);for(var o=0;o>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],f=t[e+3],v=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],b=t[e+8],x=t[e+9],_=t[e+10],w=t[e+11],C=t[e+12],S=t[e+13],k=t[e+14],A=t[e+15],T=a[0],I=a[1],M=a[2],E=a[3];T=c(T,I,M,E,o,7,s[0]),E=c(E,T,I,M,l,12,s[1]),M=c(M,E,T,I,p,17,s[2]),I=c(I,M,E,T,f,22,s[3]),T=c(T,I,M,E,v,7,s[4]),E=c(E,T,I,M,g,12,s[5]),M=c(M,E,T,I,m,17,s[6]),I=c(I,M,E,T,y,22,s[7]),T=c(T,I,M,E,b,7,s[8]),E=c(E,T,I,M,x,12,s[9]),M=c(M,E,T,I,_,17,s[10]),I=c(I,M,E,T,w,22,s[11]),T=c(T,I,M,E,C,7,s[12]),E=c(E,T,I,M,S,12,s[13]),M=c(M,E,T,I,k,17,s[14]),I=c(I,M,E,T,A,22,s[15]),T=u(T,I,M,E,l,5,s[16]),E=u(E,T,I,M,m,9,s[17]),M=u(M,E,T,I,w,14,s[18]),I=u(I,M,E,T,o,20,s[19]),T=u(T,I,M,E,g,5,s[20]),E=u(E,T,I,M,_,9,s[21]),M=u(M,E,T,I,A,14,s[22]),I=u(I,M,E,T,v,20,s[23]),T=u(T,I,M,E,x,5,s[24]),E=u(E,T,I,M,k,9,s[25]),M=u(M,E,T,I,f,14,s[26]),I=u(I,M,E,T,b,20,s[27]),T=u(T,I,M,E,S,5,s[28]),E=u(E,T,I,M,p,9,s[29]),M=u(M,E,T,I,y,14,s[30]),I=u(I,M,E,T,C,20,s[31]),T=d(T,I,M,E,g,4,s[32]),E=d(E,T,I,M,b,11,s[33]),M=d(M,E,T,I,w,16,s[34]),I=d(I,M,E,T,k,23,s[35]),T=d(T,I,M,E,l,4,s[36]),E=d(E,T,I,M,v,11,s[37]),M=d(M,E,T,I,y,16,s[38]),I=d(I,M,E,T,_,23,s[39]),T=d(T,I,M,E,S,4,s[40]),E=d(E,T,I,M,o,11,s[41]),M=d(M,E,T,I,f,16,s[42]),I=d(I,M,E,T,m,23,s[43]),T=d(T,I,M,E,x,4,s[44]),E=d(E,T,I,M,C,11,s[45]),M=d(M,E,T,I,A,16,s[46]),I=d(I,M,E,T,p,23,s[47]),T=h(T,I,M,E,o,6,s[48]),E=h(E,T,I,M,y,10,s[49]),M=h(M,E,T,I,k,15,s[50]),I=h(I,M,E,T,g,21,s[51]),T=h(T,I,M,E,C,6,s[52]),E=h(E,T,I,M,f,10,s[53]),M=h(M,E,T,I,_,15,s[54]),I=h(I,M,E,T,l,21,s[55]),T=h(T,I,M,E,b,6,s[56]),E=h(E,T,I,M,A,10,s[57]),M=h(M,E,T,I,m,15,s[58]),I=h(I,M,E,T,S,21,s[59]),T=h(T,I,M,E,v,6,s[60]),E=h(E,T,I,M,w,10,s[61]),M=h(M,E,T,I,p,15,s[62]),I=h(I,M,E,T,x,21,s[63]),a[0]=a[0]+T|0,a[1]=a[1]+I|0,a[2]=a[2]+M|0,a[3]=a[3]+E|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32;var a=e.floor(n/4294967296),o=n;i[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(r+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=a.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,r,a,o){var s=t+(e&i|~e&n)+r+o;return(s<>>32-a)+e}function u(t,e,i,n,r,a,o){var s=t+(e&n|i&~n)+r+o;return(s<>>32-a)+e}function d(t,e,i,n,r,a,o){var s=t+(e^i^n)+r+o;return(s<>>32-a)+e}function h(t,e,i,n,r,a,o){var s=t+(i^(e|~n))+r+o;return(s<>>32-a)+e}i.MD5=a._createHelper(l),i.HmacMD5=a._createHmacHelper(l)}(Math),t.MD5})},89557:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240),i(81380))})(0,function(t){return function(){var e=t,i=e.x64,n=i.Word,r=i.WordArray,a=e.algo,o=a.SHA512,s=a.SHA384=o.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=o._createHelper(s),e.HmacSHA384=o._createHmacHelper(s)}(),t.SHA384})},96298: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.StreamCipher,r=e.algo,a=[],o=[],s=[],l=r.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;r[0]^=l,r[1]^=d,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=d,r[6]^=u,r[7]^=h;for(i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=n._createHelper(l)}(),t.Rabbit})},96939:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CTR=function(){var e=t.lib.BlockCipherMode.extend(),i=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0);var o=a.slice(0);i.encryptBlock(o,0),a[n-1]=a[n-1]+1|0;for(var s=0;s",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function r(t){return t&&t.bracketRegex||/[(){}[\]]/}function a(t,e,a){var s=t.getLineHandle(e.line),l=e.ch-1,c=a&&a.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var u=r(a),d=!c&&l>=0&&u.test(s.text.charAt(l))&&n[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&n[s.text.charAt(++l)];if(!d)return null;var h=">"==d.charAt(1)?1:-1;if(a&&a.strict&&h>0!=(l==e.ch))return null;var p=t.getTokenTypeAt(i(e.line,l+1)),f=o(t,i(e.line,l+(h>0?1:0)),h,p,a);return null==f?null:{from:i(e.line,l),to:f&&f.pos,match:f&&f.ch==d.charAt(0),forward:h>0}}function o(t,e,a,o,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=r(s),h=a>0?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),p=e.line;p!=h;p+=a){var f=t.getLine(p);if(f){var v=a>0?0:f.length-1,g=a>0?f.length:-1;if(!(f.length>l))for(p==e.line&&(v=e.ch-(a<0?1:0));v!=g;v+=a){var m=f.charAt(v);if(d.test(m)&&(void 0===o||(t.getTokenTypeAt(i(p,v+1))||"")==(o||""))){var y=n[m];if(y&&">"==y.charAt(1)==a>0)u.push(m);else{if(!u.length)return{pos:i(p,v),ch:m};u.pop()}}}}}return p-a!=(a>0?t.lastLine():t.firstLine())&&null}function s(t,n,r){for(var o=t.state.matchBrackets.maxHighlightLineLength||1e3,s=r&&r.highlightNonMatching,l=[],c=t.listSelections(),u=0;u0?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("div",{staticClass:"qt-section-header"},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("quickTrade.recentTrades"))+" ")],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)]):t._e()],1)},s=[],r=a(81127),n=a(56252),c=a(76338),l=(a(28706),a(2008),a(74423),a(2892),a(26099),a(21699),a(68156),a(95353)),o=a(42430),d=a(75769);function u(t){return(0,d.Ay)({url:"/api/quick-trade/place-order",method:"post",data:t})}function p(t){return(0,d.Ay)({url:"/api/quick-trade/balance",method:"get",params:t})}function m(t){return(0,d.Ay)({url:"/api/quick-trade/position",method:"get",params:t})}function v(t){return(0,d.Ay)({url:"/api/quick-trade/history",method:"get",params:t})}function h(t){return(0,d.Ay)({url:"/api/quick-trade/close-position",method:"post",data:t})}var b={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:[],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.symbol&&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.selectedCredentialId&&this.loadPosition()},selectedCredentialId:function(t){t&&this.symbol&&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,r.A)().m(function e(){return(0,r.A)().w(function(e){while(1)switch(e.n){case 0:return t.presetSide&&(t.side=t.presetSide),t.presetPrice>0&&(t.currentPrice=t.presetPrice,t.limitPrice=t.presetPrice),e.n=1,t.loadCredentials();case 1:if(!t.selectedCredentialId||!t.symbol){e.n=2;break}return e.n=2,t.loadPosition();case 2:t.loadHistory(),t.startPolling();case 3:return e.a(2)}},e)}))()},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]])}))()},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;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 e.p=1,e.n=2,p({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,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.symbol){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,m({credential_id:t.selectedCredentialId,symbol:t.symbol,market_type:t.marketType});case 2:a=e.v,1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0?t.currentPosition=a.data.positions[0]:t.currentPosition=null,e.n=4;break;case 3:e.p=3,e.v,t.currentPosition=null;case 4:return e.a(2)}},e,null,[[1,3]])}))()},loadHistory: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:return e.p=0,e.n=1,v({limit:5});case 1:a=e.v,1===a.code&&a.data&&(t.recentTrades=a.data.trades||[]),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},setAmountByPercent:function(t){this.balance.available>0&&(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.symbol,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,u(a);case 3:if(i=e.v,1!==i.code){e.n=7;break}return t.$message.success(t.$t("quickTrade.orderSuccess")),t.$emit("order-success",i.data),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadPosition();case 5:return e.n=6,t.loadHistory();case 6:i.data&&i.data.exchange_order_id&&setTimeout(function(){t.loadPosition()},2e3),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.symbol,market_type:t.marketType,size:0,source:"manual"},e.n=3,h(a);case 3:i=e.v,1===i.code?(t.$message.success(t.$t("quickTrade.positionClosed")),t.currentPosition=null,t.loadBalance(),t.loadPosition(),t.loadHistory()):t.$message.error(i.msg||t.$t("quickTrade.orderFailed")),e.n=5;break;case 4:e.p=4,s=e.v,t.$message.error(s.message||t.$t("quickTrade.orderFailed"));case 5:return e.p=5,t.closingPosition=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},startPolling:function(){var t=this;this.stopPolling(),this.pollTimer=setInterval(function(){t.selectedCredentialId&&(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)},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()}},f=b,g=a(81656),_=(0,g.A)(f,i,s,!1,null,"0f7d87dc",null),k=_.exports},42430:function(t,e,a){a.d(e,{IA:function(){return n},PR:function(){return c},kI:function(){return l}});var i=a(76338),s=a(75769),r={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete"};function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.Ay)({url:r.list,method:"get",params:t})}function c(t){return(0,s.Ay)({url:r.create,method:"post",data:t})}function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.Ay)({url:r.delete,method:"delete",params:(0,i.A)({id:t},e)})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/771.e7c20ea7.js b/frontend/dist/js/771.e7c20ea7.js deleted file mode 100644 index 8c97643..0000000 --- a/frontend/dist/js/771.e7c20ea7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[771],{38357:function(t,a,e){e.r(a),e.d(a,{default:function(){return k}});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:"opp-section"},[a("div",{staticClass:"opp-header"},[a("span",{staticClass:"opp-title"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.title")))],1),a("span",{staticClass:"opp-header-right"},[a("span",{staticClass:"opp-update-hint"},[a("a-icon",{attrs:{type:"clock-circle"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.updateHint"))+" ")],1),a("a-button",{attrs:{type:"link",size:"small",icon:"reload",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[t._v(" "+t._s(t.$t("common.refresh")||"刷新")+" ")])],1)]),a("div",{staticClass:"opp-carousel-wrapper",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"opp-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(e,s){return a("div",{key:"opp-"+s,staticClass:"opp-card",class:[e.impact,"market-"+(e.market||"").toLowerCase()],on:{click:function(a){return t.analyzeOpportunity(e)}}},[a("div",{staticClass:"opp-top"},[a("span",{staticClass:"opp-symbol"},[t._v(t._s(e.symbol))]),a("a-tag",{staticClass:"opp-market-tag",attrs:{color:t.getMarketTagColor(e.market),size:"small"}},[t._v(" "+t._s(t.getMarketLabel(e.market))+" ")])],1),a("div",{staticClass:"opp-price"},[t._v("$"+t._s(t.formatOppPrice(e.price)))]),a("div",{staticClass:"opp-change",class:e.change_24h>=0?"up":"down"},[t._v(" "+t._s(e.change_24h>=0?"+":"")+t._s((e.change_24h||0).toFixed(1))+"% ")]),a("div",{staticClass:"opp-signal"},[a("a-tag",{attrs:{color:t.getSignalColor(e.signal),size:"small"}},[t._v(t._s(t.getSignalLabel(e.signal)))])],1),a("div",{staticClass:"opp-reason"},[t._v(t._s(t.getReasonText(e)))]),a("div",{staticClass:"opp-actions"},[a("span",{staticClass:"opp-action",on:{click:function(a){return a.stopPropagation(),t.analyzeOpportunity(e)}}},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.analyze"))+" ")],1),"Crypto"===e.market?a("span",{staticClass:"opp-trade-btn",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}}),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:"monitor"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"eye"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.monitor"))+" ")],1),a("div",{staticClass:"tab-body"},["monitor"===t.activeTab?a("PortfolioView",{attrs:{embedded:!0}}):t._e()],1)])],1)],1)],1)},i=[],o=e(81127),n=e(56252),r=e(2403),c=e(76338),l=e(95353),p=e(4929),u=e(514),d=e(44146),h=e(39283),y={name:"AIAssetAnalysis",components:{AnalysisView:p["default"],PortfolioView:u["default"],QuickTradePanel:h.A},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:""}},computed:(0,c.A)((0,c.A)({},(0,l.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,r.A)(this.opportunities),(0,r.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,n.A)((0,o.A)().m(function e(){var s,i,n;return(0,o.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:n=e.v,n&&1===n.code&&Array.isArray(n.data)&&(a.opportunities=n.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"};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 o=Math.abs(t.change_24h||0).toFixed(1),n=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",o).replace("{change7d}",n)},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;this.activeTab="quick";var e=t.market||"Crypto";this.presetSymbol="".concat(e,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},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"))}}},m=y,b=e(81656),v=(0,b.A)(m,s,i,!1,null,"68efba62",null),k=v.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/808-legacy.d05b1865.js b/frontend/dist/js/808-legacy.d05b1865.js new file mode 100644 index 0000000..1994a76 --- /dev/null +++ b/frontend/dist/js/808-legacy.d05b1865.js @@ -0,0 +1,18 @@ +(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[808],{6372:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){ +/** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ +return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function i(t){if(255===(t>>24&255)){var e=t>>16&255,i=t>>8&255,n=255&t;255===e?(e=0,255===i?(i=0,255===n?n=0:++n):++i):++e,t=0,t+=e<<16,t+=i<<8,t+=n}else t+=1<<24;return t}function n(t){return 0===(t[0]=i(t[0]))&&(t[1]=i(t[1])),t}var r=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,r=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),n(o);var s=o.slice(0);i.encryptBlock(s,0);for(var l=0;l>>2]|=t[n]<<24-n%4*8;r.call(this,i,e)}else r.apply(this,arguments)};a.prototype=n}}(),t.lib.WordArray})},7628: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.WordArray,r=i.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=r.extend({_doReset:function(){for(var t=this._key,e=t.words,i=[],n=0;n<56;n++){var r=o[n]-1;i[n]=e[r>>>5]>>>31-r%32&1}for(var a=this._subKeys=[],c=0;c<16;c++){var u=a[c]=[],d=l[c];for(n=0;n<24;n++)u[n/6|0]|=i[(s[n]-1+d)%28]<<31-n%6,u[4+(n/6|0)]|=i[28+(s[n+24]-1+d)%28]<<31-n%6;u[0]=u[0]<<1|u[0]>>>31;for(n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=a[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,i){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=i[n],a=this._lBlock,o=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((o^r[l])&u[l])>>>0];this._lBlock=o,this._rBlock=a^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var i=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=i,this._lBlock^=i<>>t^this._lBlock)&e;this._lBlock^=i,this._rBlock^=i<192.");var i=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(i)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(a))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(f)}(),t.TripleDES})},10482:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso97971={pad:function(e,i){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,i)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})},15237:function(t){(function(e,i){t.exports=i()})(0,function(){"use strict";var t=navigator.userAgent,e=navigator.platform,i=/gecko\/\d/i.test(t),n=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),a=/Edge\/(\d+)/.exec(t),o=n||r||a,s=o&&(n?document.documentMode||6:+(a||r)[1]),l=!a&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!a&&/Chrome\/(\d+)/.exec(t),d=u&&+u[1],h=/Opera\//.test(t),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),v=/PhantomJS/.test(t),g=p&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),m=/Android/.test(t),y=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),x=/\bCrOS\b/.test(t),_=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=b&&(c||h&&(null==w||w<12.11)),S=i||o&&s>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var A,T=function(t,e){var i=t.className,n=k(e).exec(i);if(n){var r=i.slice(n.index+n[0].length);t.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function I(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function M(t,e){return I(t).appendChild(e)}function E(t,e,i,n){var r=document.createElement(t);if(i&&(r.className=i),n&&(r.style.cssText=n),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var a=0;a=e)return o+(e-a);o+=s-a,o+=i-o%i,a=s+1}}g?B=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(B=function(t){try{t.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=$(this.onTimeout,this)};function Y(t,e){for(var i=0;i=e)return n+Math.min(o,e-r);if(r+=a-n,r+=i-r%i,n=a+1,r>=e)return n}}var J=[""];function Q(t){while(J.length<=t)J.push(tt(J)+" ");return J[t]}function tt(t){return t[t.length-1]}function et(t,e){for(var i=[],n=0;n"€"&&(t.toUpperCase()!=t.toLowerCase()||at.test(t))}function st(t,e){return e?!!(e.source.indexOf("\\w")>-1&&ot(t))||e.test(t):ot(t)}function lt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var ct=/[\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 ut(t){return t.charCodeAt(0)>=768&&ct.test(t)}function dt(t,e,i){while((i<0?e>0:ei?-1:1;;){if(e==i)return e;var r=(e+i)/2,a=n<0?Math.ceil(r):Math.floor(r);if(a==e)return t(a)?e:i;t(a)?i=a:e=a+n}}function pt(t,e,i,n){if(!t)return n(e,i,"ltr",0);for(var r=!1,a=0;ae||e==i&&o.to==e)&&(n(Math.max(o.from,e),Math.min(o.to,i),1==o.level?"rtl":"ltr",a),r=!0)}r||n(e,i,"ltr")}var ft=null;function vt(t,e,i){var n;ft=null;for(var r=0;re)return r;a.to==e&&(a.from!=a.to&&"before"==i?n=r:ft=r),a.from==e&&(a.from!=a.to&&"before"!=i?n=r:ft=r)}return null!=n?n:ft}var gt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(i){return i<=247?t.charAt(i):1424<=i&&i<=1524?"R":1536<=i&&i<=1785?e.charAt(i-1536):1774<=i&&i<=2220?"r":8192<=i&&i<=8203?"w":8204==i?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(t,e,i){this.level=t,this.from=e,this.to=i}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!n.test(t))return!1;for(var u=t.length,d=[],h=0;h-1&&(n[e]=r.slice(0,a).concat(r.slice(a+1)))}}}function wt(t,e){var i=xt(t,e);if(i.length)for(var n=Array.prototype.slice.call(arguments,2),r=0;r0}function At(t){t.prototype.on=function(t,e){bt(this,t,e)},t.prototype.off=function(t,e){_t(this,t,e)}}function Tt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function It(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Mt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Et(t){Tt(t),It(t)}function Dt(t){return t.target||t.srcElement}function Pt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var Lt,Rt,Ft=function(){if(o&&s<9)return!1;var t=E("div");return"draggable"in t||"dragDrop"in t}();function Bt(t){if(null==Lt){var e=E("span","​");M(t,E("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&s<8))}var i=Lt?E("span","​"):E("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Nt(t){if(null!=Rt)return Rt;var e=M(t,document.createTextNode("AخA")),i=A(e,0,1).getBoundingClientRect(),n=A(e,1,2).getBoundingClientRect();return I(t),!(!i||i.left==i.right)&&(Rt=n.right-i.right<3)}var Ot=3!="\n\nb".split(/\n/).length?function(t){var e=0,i=[],n=t.length;while(e<=n){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var a=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),o=a.indexOf("\r");-1!=o?(i.push(a.slice(0,o)),e+=o+1):(i.push(a),e=r+1)}return i}:function(t){return t.split(/\r\n?|\n/)},zt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(i){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Wt=function(){var t=E("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),$t=null;function Ht(t){if(null!=$t)return $t;var e=M(t,E("span","x")),i=e.getBoundingClientRect(),n=A(e,0,1).getBoundingClientRect();return $t=Math.abs(i.left-n.left)>1}var Vt={},Kt={};function Yt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Vt[t]=e}function Xt(t,e){Kt[t]=e}function Ut(t){if("string"==typeof t&&Kt.hasOwnProperty(t))t=Kt[t];else if(t&&"string"==typeof t.name&&Kt.hasOwnProperty(t.name)){var e=Kt[t.name];"string"==typeof e&&(e={name:e}),t=rt(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ut("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ut("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Gt(t,e){e=Ut(e);var i=Vt[e.name];if(!i)return Gt(t,"text/plain");var n=i(t,e);if(jt.hasOwnProperty(e.name)){var r=jt[e.name];for(var a in r)r.hasOwnProperty(a)&&(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=r[a])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)n[o]=e.modeProps[o];return n}var jt={};function qt(t,e){var i=jt.hasOwnProperty(t)?jt[t]:jt[t]={};H(e,i)}function Zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var n in e){var r=e[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Jt(t,e){var i;while(t.innerMode){if(i=t.innerMode(e),!i||i.mode==t)break;e=i.state,t=i.mode}return i||{mode:t,state:e}}function Qt(t,e,i){return!t.startState||t.startState(e,i)}var te=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function ee(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");var i=t;while(!i.lines)for(var n=0;;++n){var r=i.children[n],a=r.chunkSize();if(e=t.first&&ei?ce(i,ee(t,i).text.length):me(e,ee(t,e.line).text.length)}function me(t,e){var i=t.ch;return null==i||i>e?ce(t.line,e):i<0?ce(t.line,0):t}function ye(t,e){for(var i=[],n=0;n=this.string.length},te.prototype.sol=function(){return this.pos==this.lineStart},te.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},te.prototype.next=function(){if(this.pose},te.prototype.eatSpace=function(){var t=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>t},te.prototype.skipToEnd=function(){this.pos=this.string.length},te.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},te.prototype.backUp=function(t){this.pos-=t},te.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var r=function(t){return i?t.toLowerCase():t},a=this.string.substr(this.pos,t.length);if(r(a)==r(t))return!1!==e&&(this.pos+=t.length),!0},te.prototype.current=function(){return this.string.slice(this.start,this.pos)},te.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},te.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},te.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var be=function(t,e){this.state=t,this.lookAhead=e},xe=function(t,e,i,n){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function _e(t,e,i,n){var r=[t.state.modeGen],a={};Ee(t,e.text,t.doc.mode,i,function(t,e){return r.push(t,e)},a,n);for(var o=i.state,s=function(n){i.baseTokens=r;var s=t.state.overlays[n],l=1,c=0;i.state=!0,Ee(t,e.text,s.mode,i,function(t,e){var i=l;while(ct&&r.splice(l,1,t,r[l+1],n),l+=2,c=Math.min(t,n)}if(e)if(s.opaque)r.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;it.options.maxHighlightLength&&Zt(t.doc.mode,n.state),a=_e(t,e,n);r&&(n.state=r),e.stateAfter=n.save(!r),e.styles=a.styles,a.classes?e.styleClasses=a.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Ce(t,e,i){var n=t.doc,r=t.display;if(!n.mode.startState)return new xe(n,!0,e);var a=De(t,e,i),o=a>n.first&&ee(n,a-1).stateAfter,s=o?xe.fromSaved(n,o,a):new xe(n,Qt(n.mode),a);return n.iter(a,e,function(i){Se(t,i.text,s);var n=s.line;i.stateAfter=n==e-1||n%5==0||n>=r.viewFrom&&ne.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}xe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},xe.prototype.baseToken=function(t){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=t)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},xe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xe.fromSaved=function(t,e,i){return e instanceof be?new xe(t,Zt(t.mode,e.state),i,e.lookAhead):new xe(t,Zt(t.mode,e),i)},xe.prototype.save=function(t){var e=!1!==t?Zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new be(e,this.maxLookAhead):e};var Te=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i};function Ie(t,e,i,n){var r,a=t.doc,o=a.mode;e=ge(a,e);var s,l=ee(a,e.line),c=Ce(t,e.line,i),u=new te(l.text,t.options.tabSize,c);n&&(s=[]);while((n||u.post.options.maxHighlightLength?(s=!1,o&&Se(t,e,n,d.pos),d.pos=e.length,l=null):l=Me(Ae(i,d,n.state,h),a),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){while(co;--s){if(s<=a.first)return a.first;var l=ee(a,s-1),c=l.stateAfter;if(c&&(!i||s+(c instanceof be?c.lookAhead:0)<=a.modeFrontier))return s;var u=V(l.text,null,t.options.tabSize);(null==r||n>u)&&(r=s-1,n=u)}return r}function Pe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontieri;n--){var r=ee(t,n).stateAfter;if(r&&(!(r instanceof be)||n+r.lookAhead=e:a.to>e);(n||(n=[])).push(new Ne(o,a.from,l?null:a.to))}}return n}function He(t,e,i){var n;if(t)for(var r=0;r=e:a.to>e);if(s||a.from==e&&"bookmark"==o.type&&(!i||a.marker.insertLeft)){var l=null==a.from||(o.inclusiveLeft?a.from<=e:a.from0&&s)for(var x=0;x0)){var u=[l,1],d=ue(c.from,s.from),h=ue(c.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!o.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function Xe(t){var e=t.markedSpans;if(e){for(var i=0;ie)&&(!i||qe(i,a.marker)<0)&&(i=a.marker)}return i}function ei(t,e,i,n,r){var a=ee(t,e),o=Re&&a.markedSpans;if(o)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.to,i)>=0:ue(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ue(c.from,n)<=0:ue(c.from,n)<0)))return!0}}}function ii(t){var e;while(e=Je(t))t=e.find(-1,!0).line;return t}function ni(t){var e;while(e=Qe(t))t=e.find(1,!0).line;return t}function ri(t){var e,i;while(e=Qe(t))t=e.find(1,!0).line,(i||(i=[])).push(t);return i}function ai(t,e){var i=ee(t,e),n=ii(i);return i==n?e:ae(n)}function oi(t,e){if(e>t.lastLine())return e;var i,n=ee(t,e);if(!si(t,n))return e;while(i=Qe(n))n=i.find(1,!0).line;return ae(n)+1}function si(t,e){var i=Re&&e.markedSpans;if(i)for(var n=void 0,r=0;re.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)})}var hi=function(t,e,i){this.text=t,Ue(this,e),this.height=i?i(this):1};function pi(t,e,i,n){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Xe(t),Ue(t,i);var r=n?n(t):1;r!=t.height&&re(t,r)}function fi(t){t.parent=null,Xe(t)}hi.prototype.lineNo=function(){return ae(this)},At(hi);var vi={},gi={};function mi(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?gi:vi;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function yi(t,e){var i=D("span",null,null,l?"padding-right: .1px":null),n={pre:D("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var a=r?e.rest[r-1]:e.line,o=void 0;n.pos=0,n.addToken=xi,Nt(t.display.measure)&&(o=mt(a,t.doc.direction))&&(n.addToken=wi(n.addToken,o)),n.map=[];var s=e!=t.display.externalMeasured&&ae(a);Si(a,n,we(t,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=F(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=F(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Bt(t.display.measure))),0==r?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return wt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function bi(t){var e=E("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function xi(t,e,i,n,r,a,l){if(e){var c,u=t.splitSpaces?_i(e,t.trailingSpace):e,d=t.cm.state.specialChars,h=!1;if(d.test(e)){c=document.createDocumentFragment();var p=0;while(1){d.lastIndex=p;var f=d.exec(e),v=f?f.index-p:e.length-p;if(v){var g=document.createTextNode(u.slice(p,p+v));o&&s<9?c.appendChild(E("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+v,g),t.col+=v,t.pos+=v}if(!f)break;p+=v+1;var m=void 0;if("\t"==f[0]){var y=t.cm.options.tabSize,b=y-t.col%y;m=c.appendChild(E("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=b}else"\r"==f[0]||"\n"==f[0]?(m=c.appendChild(E("span","\r"==f[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",f[0]),t.col+=1):(m=t.cm.options.specialCharPlaceholder(f[0]),m.setAttribute("cm-text",f[0]),o&&s<9?c.appendChild(E("span",[m])):c.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),o&&s<9&&(h=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),i||n||r||h||a||l){var x=i||"";n&&(x+=n),r&&(x+=r);var _=E("span",[c],x,a);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&_.setAttribute(w,l[w]);return t.content.appendChild(_)}t.content.appendChild(c)}}function _i(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,n="",r=0;rc&&d.from<=c)break;if(d.to>=u)return t(i,n,r,a,o,s,l);t(i,n.slice(0,d.to-c),r,a,null,s,l),a=null,n=n.slice(d.to-c),c=d.to}}}function Ci(t,e,i,n){var r=!n&&i.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!n&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function Si(t,e,i){var n=t.markedSpans,r=t.text,a=0;if(n)for(var o,s,l,c,u,d,h,p=r.length,f=0,v=1,g="",m=0;;){if(m==f){l=c=u=s="",h=null,d=null,m=1/0;for(var y=[],b=void 0,x=0;xf||w.collapsed&&_.to==f&&_.from==f)){if(null!=_.to&&_.to!=f&&m>_.to&&(m=_.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&_.from==f&&(u+=" "+w.startStyle),w.endStyle&&_.to==m&&(b||(b=[])).push(w.endStyle,_.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||qe(d.marker,w)<0)&&(d=_)}else _.from>f&&m>_.from&&(m=_.from)}if(b)for(var S=0;S=p)break;var A=Math.min(p,m);while(1){if(g){var T=f+g.length;if(!d){var I=T>A?g.slice(0,A-f):g;e.addToken(e,I,o?o+l:l,u,f+I.length==m?c:"",s,h)}if(T>=A){g=g.slice(A-f),f=A;break}f=T,u=""}g=r.slice(a,a=i[v++]),o=mi(i[v++],e.cm.options)}}else for(var M=1;M2&&a.push((l.bottom+c.top)/2-i.top)}}a.push(i.bottom-i.top)}}function en(t,e,i){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var n=0;ni)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function nn(t,e){e=ii(e);var i=ae(e),n=t.display.externalMeasured=new ki(t.doc,e,i);n.lineN=i;var r=n.built=yi(t,n);return n.text=r.pre,M(t.display.lineMeasure,r.pre),n}function rn(t,e,i,n){return sn(t,on(t,e),i,n)}function an(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&ee)&&(a=l-s,r=a-1,e>=l&&(o="right")),null!=r){if(n=t[c+2],s==l&&i==(n.insertLeft?"left":"right")&&(o=i),"left"==i&&0==r)while(c&&t[c-2]==t[c-3]&&t[c-1].insertLeft)n=t[2+(c-=3)],o="left";if("right"==i&&r==l-s)while(c=0;r--)if((i=t[r]).left!=i.right)break;return i}function hn(t,e,i,n){var r,a=un(e.map,i,n),l=a.node,c=a.start,u=a.end,d=a.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){while(c&&ut(e.line.text.charAt(a.coverStart+c)))--c;while(a.coverStart+u0&&(d=n="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==n?p.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Rn(t.display),top:f.top,bottom:f.bottom}:cn}for(var v=r.top-e.rect.top,g=r.bottom-e.rect.top,m=(v+g)/2,y=e.view.measure.heights,b=0;b=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(t,e,i){var n=s[e],r=1==n.level;return o(i?t-1:t,r!=i)}var d=vt(s,l,c),h=ft,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function Sn(t,e){var i=0;e=ge(t.doc,e),t.options.lineWrapping||(i=Rn(t.display)*e.ch);var n=ee(t.doc,e.line),r=ci(n)+Gi(t.display);return{left:i,right:i,top:r,bottom:r+n.height}}function kn(t,e,i,n,r){var a=ce(t,e,i);return a.xRel=r,n&&(a.outside=n),a}function An(t,e,i){var n=t.doc;if(i+=t.display.viewOffset,i<0)return kn(n.first,0,null,-1,-1);var r=oe(n,i),a=n.first+n.size-1;if(r>a)return kn(n.first+n.size-1,ee(n,a).text.length,null,1,1);e<0&&(e=0);for(var o=ee(n,r);;){var s=En(t,o,r,e,i),l=ti(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;o=ee(n,r=c.line)}}function Tn(t,e,i,n){n-=bn(e);var r=e.text.length,a=ht(function(e){return sn(t,i,e-1).bottom<=n},r,0);return r=ht(function(e){return sn(t,i,e).top>n},a,r),{begin:a,end:r}}function In(t,e,i,n){i||(i=on(t,e));var r=xn(t,e,sn(t,i,n),"line").top;return Tn(t,e,i,r)}function Mn(t,e,i,n){return!(t.bottom<=i)&&(t.top>i||(n?t.left:t.right)>e)}function En(t,e,i,n,r){r-=ci(e);var a=on(t,e),o=bn(e),s=0,l=e.text.length,c=!0,u=mt(e,t.doc.direction);if(u){var d=(t.options.lineWrapping?Pn:Dn)(t,e,i,a,u,n,r);c=1!=d.level,s=c?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,v=null,g=ht(function(e){var i=sn(t,a,e);return i.top+=o,i.bottom+=o,!!Mn(i,n,r,!1)&&(i.top<=r&&i.left<=n&&(f=e,v=i),!0)},s,l),m=!1;if(v){var y=n-v.left=x.bottom?1:0}return g=dt(e.text,g,1),kn(i,g,p,m,n-h)}function Dn(t,e,i,n,r,a,o){var s=ht(function(s){var l=r[s],c=1!=l.level;return Mn(Cn(t,ce(i,c?l.to:l.from,c?"before":"after"),"line",e,n),a,o,!0)},0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=Cn(t,ce(i,c?l.from:l.to,c?"after":"before"),"line",e,n);Mn(u,a,o,!0)&&u.top>o&&(l=r[s-1])}return l}function Pn(t,e,i,n,r,a,o){var s=Tn(t,e,n,o),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||p.to<=l)){var f=1!=p.level,v=sn(t,n,f?Math.min(c,p.to)-1:Math.max(l,p.from)).right,g=vg)&&(u=p,d=g)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function Ln(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ln){ln=E("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ln.appendChild(document.createTextNode("x")),ln.appendChild(E("br"));ln.appendChild(document.createTextNode("x"))}M(t.measure,ln);var i=ln.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),I(t.measure),i||1}function Rn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=E("span","xxxxxxxxxx"),i=E("pre",[e],"CodeMirror-line-like");M(t.measure,i);var n=e.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Fn(t){for(var e=t.display,i={},n={},r=e.gutters.clientLeft,a=e.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=t.display.gutterSpecs[o].className;i[s]=a.offsetLeft+a.clientLeft+r,n[s]=a.clientWidth}return{fixedPos:Bn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function Bn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Nn(t){var e=Ln(t.display),i=t.options.lineWrapping,n=i&&Math.max(5,t.display.scroller.clientWidth/Rn(t.display)-3);return function(r){if(si(t.doc,r))return 0;var a=0;if(r.widgets)for(var o=0;o0&&(l=ee(t.doc,c.line).text).length==c.ch){var u=V(l,l.length,t.options.tabSize)-l.length;c=ce(c.line,Math.max(0,Math.round((a-qi(t.display).left)/Rn(t.display))-u))}return c}function Wn(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var i=t.display.view,n=0;ne)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Re&&ai(t.doc,e)r.viewFrom?Vn(t):(r.viewFrom+=n,r.viewTo+=n);else if(e<=r.viewFrom&&i>=r.viewTo)Vn(t);else if(e<=r.viewFrom){var a=Kn(t,i,i+n,1);a?(r.view=r.view.slice(a.index),r.viewFrom=a.lineN,r.viewTo+=n):Vn(t)}else if(i>=r.viewTo){var o=Kn(t,e,e,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Vn(t)}else{var s=Kn(t,e,e,-1),l=Kn(t,i,i+n,1);s&&l?(r.view=r.view.slice(0,s.index).concat(Ai(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=n):Vn(t)}var c=r.externalMeasured;c&&(i=r.lineN&&e=n.viewTo)){var a=n.view[Wn(t,e)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==Y(o,i)&&o.push(i)}}}function Vn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Kn(t,e,i,n){var r,a=Wn(t,e),o=t.display.view;if(!Re||i==t.doc.first+t.doc.size)return{index:a,lineN:i};for(var s=t.display.viewFrom,l=0;l0){if(a==o.length-1)return null;r=s+o[a].size-e,a++}else r=s-e;e+=r,i+=r}while(ai(t.doc,i)!=i){if(a==(n<0?0:o.length-1))return null;i+=n*o[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:i}}function Yn(t,e,i){var n=t.display,r=n.view;0==r.length||e>=n.viewTo||i<=n.viewFrom?(n.view=Ai(t,e,i),n.viewFrom=e):(n.viewFrom>e?n.view=Ai(t,e,n.viewFrom).concat(n.view):n.viewFromi&&(n.view=n.view.slice(0,Wn(t,i)))),n.viewTo=i}function Xn(t){for(var e=t.display.view,i=0,n=0;n=t.display.viewTo||l.to().line0?o:t.defaultCharWidth())+"px"}if(n.other){var s=i.appendChild(E("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function qn(t,e){return t.top-e.top||t.left-e.left}function Zn(t,e,i){var n=t.display,r=t.doc,a=document.createDocumentFragment(),o=qi(t.display),s=o.left,l=Math.max(n.sizerWidth,Ji(t)-n.sizer.offsetLeft)-o.right,c="ltr"==r.direction;function u(t,e,i,n){e<0&&(e=0),e=Math.round(e),n=Math.round(n),a.appendChild(E("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==i?l-t:i)+"px;\n height: "+(n-e)+"px"))}function d(e,i,n){var a,o,d=ee(r,e),h=d.text.length;function p(i,n){return wn(t,ce(e,i),"div",d,n)}function f(e,i,n){var r=In(t,d,null,e),a="ltr"==i==("after"==n)?"left":"right",o="after"==n?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1);return p(o,a)[a]}var v=mt(d,r.direction);return pt(v,i||0,null==n?h:n,function(t,e,r,d){var g="ltr"==r,m=p(t,g?"left":"right"),y=p(e-1,g?"right":"left"),b=null==i&&0==t,x=null==n&&e==h,_=0==d,w=!v||d==v.length-1;if(y.top-m.top<=3){var C=(c?b:x)&&_,S=(c?x:b)&&w,k=C?s:(g?m:y).left,A=S?l:(g?y:m).right;u(k,m.top,A-k,m.bottom)}else{var T,I,M,E;g?(T=c&&b&&_?s:m.left,I=c?l:f(t,r,"before"),M=c?s:f(e,r,"after"),E=c&&x&&w?l:y.right):(T=c?f(t,r,"before"):s,I=!c&&b&&_?l:m.right,M=!c&&x&&w?s:y.left,E=c?f(e,r,"after"):l),u(T,m.top,I-T,m.bottom),m.bottom0?e.blinker=setInterval(function(){t.hasFocus()||ir(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Qn(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||er(t))}function tr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&ir(t))},100)}function er(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(wt(t,"focus",t,e),t.state.focused=!0,R(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Jn(t))}function ir(t,e){t.state.delayingBlurEvent||(t.state.focused&&(wt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function nr(t){for(var e=t.display,i=e.lineDiv.offsetTop,n=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||v<-.005)&&(rt.display.sizerWidth){var m=Math.ceil(h/Rn(t.display));m>t.display.maxLineLength&&(t.display.maxLineLength=m,t.display.maxLine=c.line,t.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(e.scroller.scrollTop+=a)}function rr(t){if(t.widgets)for(var e=0;e=o&&(a=oe(e,ci(ee(e,l))-t.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function or(t,e){if(!Ct(t,"scrollCursorIntoView")){var i=t.display,n=i.sizer.getBoundingClientRect(),r=null,a=i.wrapper.ownerDocument;if(e.top+n.top<0?r=!0:e.bottom+n.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(r=!1),null!=r&&!v){var o=E("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Gi(t.display))+"px;\n height: "+(e.bottom-e.top+Zi(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function sr(t,e,i,n){var r;null==n&&(n=0),t.options.lineWrapping||e!=i||(i="before"==e.sticky?ce(e.line,e.ch+1,"before"):e,e=e.ch?ce(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var a=0;a<5;a++){var o=!1,s=Cn(t,e),l=i&&i!=e?Cn(t,i):s;r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var c=cr(t,r),u=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=c.scrollTop&&(gr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(yr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return r}function lr(t,e){var i=cr(t,e);null!=i.scrollTop&&gr(t,i.scrollTop),null!=i.scrollLeft&&yr(t,i.scrollLeft)}function cr(t,e){var i=t.display,n=Ln(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,a=Qi(t),o={};e.bottom-e.top>a&&(e.bottom=e.top+a);var s=t.doc.height+ji(i),l=e.tops-n;if(e.topr+a){var u=Math.min(e.top,(c?s:e.bottom)-a);u!=r&&(o.scrollTop=u)}var d=t.options.fixedGutter?0:i.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft-d,p=Ji(t)-i.gutters.offsetWidth,f=e.right-e.left>p;return f&&(e.right=e.left+p),e.left<10?o.scrollLeft=0:e.leftp+h-3&&(o.scrollLeft=e.right+(f?0:10)-p),o}function ur(t,e){null!=e&&(fr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function dr(t){fr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function hr(t,e,i){null==e&&null==i||fr(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function pr(t,e){fr(t),t.curOp.scrollToPos=e}function fr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var i=Sn(t,e.from),n=Sn(t,e.to);vr(t,i,n,e.margin)}}function vr(t,e,i,n){var r=cr(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-n,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+n});hr(t,r.scrollLeft,r.scrollTop)}function gr(t,e){Math.abs(t.doc.scrollTop-e)<2||(i||Ur(t,{top:e}),mr(t,e,!0),i&&Ur(t),zr(t,100))}function mr(t,e,i){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function yr(t,e,i,n){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,Zr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function br(t){var e=t.display,i=e.gutters.offsetWidth,n=Math.round(t.doc.height+ji(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Zi(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var xr=function(t,e,i){this.cm=i;var n=this.vert=E("div",[E("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=E("div",[E("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,t(n),t(r),bt(n,"scroll",function(){n.clientHeight&&e(n.scrollTop,"vertical")}),bt(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var r=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var a=t.viewWidth-t.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:e?n:0}},xr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xr.prototype.zeroWidthHack=function(){var t=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},xr.prototype.enableZeroWidthBar=function(t,e,i){function n(){var r=t.getBoundingClientRect(),a="vert"==i?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);a!=t?t.style.visibility="hidden":e.set(1e3,n)}t.style.visibility="",e.set(1e3,n)},xr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var _r=function(){};function wr(t,e){e||(e=br(t));var i=t.display.barWidth,n=t.display.barHeight;Cr(t,e);for(var r=0;r<4&&i!=t.display.barWidth||n!=t.display.barHeight;r++)i!=t.display.barWidth&&t.options.lineWrapping&&nr(t),Cr(t,br(t)),i=t.display.barWidth,n=t.display.barHeight}function Cr(t,e){var i=t.display,n=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}_r.prototype.update=function(){return{bottom:0,right:0}},_r.prototype.setScrollLeft=function(){},_r.prototype.setScrollTop=function(){},_r.prototype.clear=function(){};var Sr={native:xr,null:_r};function kr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Sr[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),bt(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,i){"horizontal"==i?yr(t,e):gr(t,e)},t),t.display.scrollbars.addClass&&R(t.display.wrapper,t.display.scrollbars.addClass)}var Ar=0;function Tr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++Ar,markArrays:null},Ii(t.curOp)}function Ir(t){var e=t.curOp;e&&Ei(e,function(t){for(var e=0;e=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new $r(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Dr(t){t.updatedDisplay=t.mustUpdate&&Yr(t.cm,t.update)}function Pr(t){var e=t.cm,i=e.display;t.updatedDisplay&&nr(e),t.barMeasure=br(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=rn(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Zi(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-Ji(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function Lr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var i=+new Date+t.options.workTime,n=Ce(t,e.highlightFrontier),r=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),function(a){if(n.line>=t.display.viewFrom){var o=a.styles,s=a.text.length>t.options.maxHighlightLength?Zt(e.mode,n.state):null,l=_e(t,a,n,!0);s&&(n.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hi)return zr(t,t.options.workDelay),!0}),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),r.length&&Fr(t,function(){for(var e=0;e=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==Xn(t))return!1;Jr(t)&&(Vn(t),e.dims=Fn(t));var r=n.first+n.size,a=Math.max(e.visible.from-t.options.viewportMargin,n.first),o=Math.min(r,e.visible.to+t.options.viewportMargin);i.viewFromo&&i.viewTo-o<20&&(o=Math.min(r,i.viewTo)),Re&&(a=ai(t.doc,a),o=oi(t.doc,o));var s=a!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;Yn(t,a,o),i.viewOffset=ci(ee(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var l=Xn(t);if(!s&&0==l&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var c=Vr(t);return l>4&&(i.lineDiv.style.display="none"),Gr(t,i.updateLineNumbers,e.dims),l>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Kr(c),I(i.cursorDiv),I(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,s&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,zr(t,400)),i.updateLineNumbers=null,!0}function Xr(t,e){for(var i=e.viewport,n=!0;;n=!1){if(n&&t.options.lineWrapping&&e.oldDisplayWidth!=Ji(t))n&&(e.visible=ar(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+ji(t.display)-Qi(t),i.top)}),e.visible=ar(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Yr(t,e))break;nr(t);var r=br(t);Un(t),wr(t,r),qr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Ur(t,e){var i=new $r(t,e);if(Yr(t,i)){nr(t),Xr(t,i);var n=br(t);Un(t),wr(t,n),qr(t,n),i.finish()}}function Gr(t,e,i){var n=t.display,r=t.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(e){var i=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var c=n.view,u=n.viewFrom,d=0;d-1&&(p=!1),Ri(t,h,u,i)),p&&(I(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(le(t.options,u)))),o=h.node.nextSibling}else{var f=Hi(t,h,u,i);a.insertBefore(f,o)}u+=h.size}while(o)o=s(o)}function jr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",Pi(t,"gutterChanged",t)}function qr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Zi(t)+"px"}function Zr(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=Bn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,a=n+"px",o=0;o=105&&(a.wrapper.style.clipPath="inset(0px)"),a.wrapper.setAttribute("translate","no"),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),l||i&&y||(a.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(a.wrapper):t(a.wrapper)),a.viewFrom=a.viewTo=e.first,a.reportedViewFrom=a.reportedViewTo=e.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=Qr(r.gutters,r.lineNumbers),ta(a),n.init(a)}$r.prototype.signal=function(t,e){kt(t,e)&&this.events.push(arguments)},$r.prototype.finish=function(){for(var t=0;tc.clientWidth,f=c.scrollHeight>c.clientHeight;if(r&&p||a&&f){if(a&&b&&l)t:for(var v=e.target,g=s.view;v!=c;v=v.parentNode)for(var m=0;m=0&&ue(t,n.to())<=0)return i}return-1};var ca=function(t,e){this.anchor=t,this.head=e};function ua(t,e,i){var n=t&&t.options.selectionsMayTouch,r=e[i];e.sort(function(t,e){return ue(t.from(),e.from())}),i=Y(e,r);for(var a=1;a0:l>=0){var c=fe(s.from(),o.from()),u=pe(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=i&&--i,e.splice(--a,2,new ca(d?u:c,d?c:u))}}return new la(e,i)}function da(t,e){return new la([new ca(t,e||t)],0)}function ha(t){return t.text?ce(t.from.line+t.text.length-1,tt(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function pa(t,e){if(ue(t,e.from)<0)return t;if(ue(t,e.to)<=0)return ha(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=ha(e).ch-e.to.ch),ce(i,n)}function fa(t,e){for(var i=[],n=0;n1&&t.remove(s.line+1,f-1),t.insert(s.line+1,m)}Pi(t,"change",t,e)}function _a(t,e,i){function n(t,r,a){if(t.linked)for(var o=0;o1&&!t.done[t.done.length-2].ranges?(t.done.pop(),tt(t.done)):void 0}function Ma(t,e,i,n){var r=t.history;r.undone.length=0;var a,o,s=+new Date;if((r.lastOp==n||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=Ia(r,r.lastOp==n)))o=tt(a.changes),0==ue(e.from,e.to)&&0==ue(e.from,o.to)?o.to=ha(e):a.changes.push(Aa(t,e));else{var l=tt(r.done);l&&l.ranges||Pa(t.sel,r.done),a={changes:[Aa(t,e)],generation:r.generation},r.done.push(a);while(r.done.length>r.undoDepth)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=e.origin,o||wt(t,"historyAdded")}function Ea(t,e,i,n){var r=e.charAt(0);return"*"==r||"+"==r&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Da(t,e,i,n){var r=t.history,a=n&&n.origin;i==r.lastSelOp||a&&r.lastSelOrigin==a&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==a||Ea(t,a,tt(r.done),e))?r.done[r.done.length-1]=e:Pa(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=a,r.lastSelOp=i,n&&!1!==n.clearRedo&&Ta(r.undone)}function Pa(t,e){var i=tt(e);i&&i.ranges&&i.equals(t)||e.push(t)}function La(t,e,i,n){var r=e["spans_"+t.id],a=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,n),function(i){i.markedSpans&&((r||(r=e["spans_"+t.id]={}))[a]=i.markedSpans),++a})}function Ra(t){if(!t)return null;for(var e,i=0;i-1&&(tt(s)[d]=c[d],delete c[d])}}}return n}function Oa(t,e,i,n){if(n){var r=t.anchor;if(i){var a=ue(e,r)<0;a!=ue(i,r)<0?(r=e,e=i):a!=ue(e,i)<0&&(e=i)}return new ca(r,e)}return new ca(i||e,e)}function za(t,e,i,n,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Ya(t,new la([Oa(t.sel.primary(),e,i,r)],0),n)}function Wa(t,e,i){for(var n=[],r=t.cm&&(t.cm.display.shift||t.extend),a=0;a=e.ch:s.to>e.ch))){if(r&&(wt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(i){var d=l.find(n<0?1:-1),h=void 0;if((n<0?u:c)&&(d=Ja(t,d,-n,d&&d.line==e.line?a:null)),d&&d.line==e.line&&(h=ue(d,i))&&(n<0?h<0:h>0))return qa(t,d,e,n,r)}var p=l.find(n<0?-1:1);return(n<0?c:u)&&(p=Ja(t,p,n,p.line==e.line?a:null)),p?qa(t,p,e,n,r):null}}return e}function Za(t,e,i,n,r){var a=n||1,o=qa(t,e,i,a,r)||!r&&qa(t,e,i,a,!0)||qa(t,e,i,-a,r)||!r&&qa(t,e,i,-a,!0);return o||(t.cantEdit=!0,ce(t.first,0))}function Ja(t,e,i,n){return i<0&&0==e.ch?e.line>t.first?ge(t,ce(e.line-1)):null:i>0&&e.ch==(n||ee(t,e.line)).text.length?e.line=0;--r)io(t,{from:n[r].from,to:n[r].to,text:r?[""]:e.text,origin:e.origin});else io(t,e)}}function io(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ue(e.from,e.to)){var i=fa(t,e);Ma(t,e,i,t.cm?t.cm.curOp.id:NaN),ao(t,e,i,Ve(t,e));var n=[];_a(t,function(t,i){i||-1!=Y(n,t.history)||(uo(t.history,e),n.push(t.history)),ao(t,e,null,Ve(t,e))})}}function no(t,e,i){var n=t.cm&&t.cm.state.suppressEdits;if(!n||i){for(var r,a=t.history,o=t.sel,s="undo"==e?a.done:a.undone,l="undo"==e?a.undone:a.done,c=0;c=0;--p){var f=h(p);if(f)return f.v}}}}function ro(t,e){if(0!=e&&(t.first+=e,t.sel=new la(et(t.sel.ranges,function(t){return new ca(ce(t.anchor.line+e,t.anchor.ch),ce(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){$n(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,n=i.viewFrom;nt.lastLine())){if(e.from.linea&&(e={from:e.from,to:ce(a,ee(t,a).text.length),text:[e.text[0]],origin:e.origin}),e.removed=ie(t,e.from,e.to),i||(i=fa(t,e)),t.cm?oo(t.cm,e,n):xa(t,e,n),Xa(t,i,G),t.cantEdit&&Za(t,ce(t.firstLine(),0))&&(t.cantEdit=!1)}}function oo(t,e,i){var n=t.doc,r=t.display,a=e.from,o=e.to,s=!1,l=a.line;t.options.lineWrapping||(l=ae(ii(ee(n,a.line))),n.iter(l,o.line+1,function(t){if(t==r.maxLine)return s=!0,!0})),n.sel.contains(e.from,e.to)>-1&&St(t),xa(n,e,i,Nn(t)),t.options.lineWrapping||(n.iter(l,a.line+e.text.length,function(t){var e=ui(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),Pe(n,a.line),zr(t,400);var c=e.text.length-(o.line-a.line)-1;e.full?$n(t):a.line!=o.line||1!=e.text.length||ba(t.doc,e)?$n(t,a.line,o.line+1,c):Hn(t,a.line,"text");var u=kt(t,"changes"),d=kt(t,"change");if(d||u){var h={from:a,to:o,text:e.text,removed:e.removed,origin:e.origin};d&&Pi(t,"change",t,h),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}function so(t,e,i,n,r){var a;n||(n=i),ue(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),"string"==typeof e&&(e=t.splitLines(e)),eo(t,{from:i,to:n,text:e,origin:r})}function lo(t,e,i,n){i1||!(this.children[0]instanceof po))){var s=[];this.collapse(s),this.children=[new po(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=r.lines.length%25+25,s=o;s10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var n=0;n0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=D("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ei(t,e.line,e,i,a)||e.line!=i.line&&ei(t,i.line,e,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Be()}a.addToHistory&&Ma(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,i.line+1,function(n){c&&a.collapsed&&!c.options.lineWrapping&&ii(n)==c.display.maxLine&&(s=!0),a.collapsed&&l!=e.line&&re(n,0),We(n,new Ne(a,l==e.line?e.ch:null,l==i.line?i.ch:null),t.cm&&t.cm.curOp),++l}),a.collapsed&&t.iter(e.line,i.line+1,function(e){si(t,e)&&re(e,0)}),a.clearOnEnter&&bt(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Fe(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++yo,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)$n(c,e.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=i.line;u++)Hn(c,u,"text");a.atomic&&Ga(c.doc),Pi(c,"markerAdded",c,a)}return a}bo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Tr(t),kt(this,"clear")){var i=this.find();i&&Pi(this,"clear",i.from,i.to)}for(var n=null,r=null,a=0;at.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=n&&t&&this.collapsed&&$n(t,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ga(t.doc)),t&&Pi(t,"markerCleared",t,this,n,r),e&&Ir(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(t,e){var i,n;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)eo(this,n[l]);s?Ka(this,s):this.cm&&dr(this.cm)}),undo:Or(function(){no(this,"undo")}),redo:Or(function(){no(this,"redo")}),undoSelection:Or(function(){no(this,"undo",!0)}),redoSelection:Or(function(){no(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,n=0;n=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,i){t=ge(this,t),e=ge(this,e);var n=[],r=t.line;return this.iter(t.line,e.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||i&&!i(l.marker)||n.push(l.marker.parent||l.marker)}++r}),n},getAllMarks:function(){var t=[];return this.iter(function(e){var i=e.markedSpans;if(i)for(var n=0;nt)return e=t,!0;t-=a,++i}),ge(this,ce(i,e))},indexFromPos:function(t){t=ge(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var d=t.dataTransfer.getData("Text");if(d){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Xa(e.doc,da(i,i)),h)for(var p=0;p=0;e--)so(t.doc,"",n[e].from,n[e].to,"+delete");dr(t)})}function Zo(t,e,i){var n=dt(t.text,e+i,i);return n<0||n>t.text.length?null:n}function Jo(t,e,i){var n=Zo(t,e.ch,i);return null==n?null:new ce(e.line,n,i<0?"after":"before")}function Qo(t,e,i,n,r){if(t){"rtl"==e.doc.direction&&(r=-r);var a=mt(i,e.doc.direction);if(a){var o,s=r<0?tt(a):a[0],l=r<0==(1==s.level),c=l?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var u=on(e,i);o=r<0?i.text.length-1:0;var d=sn(e,u,o).top;o=ht(function(t){return sn(e,u,t).top==d},r<0==(1==s.level)?s.from:s.to-1,o),"before"==c&&(o=Zo(i,o,1))}else o=r<0?s.to:s.from;return new ce(n,o,c)}}return new ce(n,r<0?i.text.length:0,r<0?"before":"after")}function ts(t,e,i,n){var r=mt(e,t.doc.direction);if(!r)return Jo(e,i,n);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=vt(r,i.ch,i.sticky),o=r[a];if("ltr"==t.doc.direction&&o.level%2==0&&(n>0?o.to>i.ch:o.from=o.from&&h>=u.begin)){var p=d?"before":"after";return new ce(i.line,h,p)}}var f=function(t,e,n){for(var a=function(t,e){return e?new ce(i.line,l(t,1),"before"):new ce(i.line,t,"after")};t>=0&&t0==(1!=o.level),c=s?n.begin:l(n.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||n>0&&g==e.text.length||(v=f(n>0?0:r.length-1,n,c(g)),!v)?null:v}Ho.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"},Ho.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"},Ho.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"},Ho.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"]},Ho["default"]=b?Ho.macDefault:Ho.pcDefault;var es={selectAll:Qa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return qo(t,function(e){if(e.empty()){var i=ee(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line0)r=new ce(r.line,r.ch+1),t.replaceRange(a.charAt(r.ch-1)+a.charAt(r.ch-2),ce(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var o=ee(t.doc,r.line-1).text;o&&(r=new ce(r.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ce(r.line-1,o.length-1),r,"+transpose"))}i.push(new ca(r,r))}t.setSelections(i)})},newlineAndIndent:function(t){return Fr(t,function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var n=0;n-1&&(ue((r=s.ranges[r]).from(),e)<0||e.xRel>0)&&(ue(r.to(),e)>0||e.xRel<0)?As(t,n,e,a):Is(t,n,e,a)}function As(t,e,i,n){var r=t.display,a=!1,c=Br(t,function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:tr(t)),_t(r.wrapper.ownerDocument,"mouseup",c),_t(r.wrapper.ownerDocument,"mousemove",u),_t(r.scroller,"dragstart",d),_t(r.scroller,"drop",c),a||(Tt(e),n.addNew||za(t.doc,i,null,null,n.extend),l&&!p||o&&9==s?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},d=function(){return a=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!n.moveOnDrag,bt(r.wrapper.ownerDocument,"mouseup",c),bt(r.wrapper.ownerDocument,"mousemove",u),bt(r.scroller,"dragstart",d),bt(r.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout(function(){return r.input.focus()},20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Ts(t,e,i){if("char"==i)return new ca(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new ca(ce(e.line,0),ge(t.doc,ce(e.line+1,0)));var n=i(t,e);return new ca(n.from,n.to)}function Is(t,e,i,n){o&&tr(t);var r=t.display,a=t.doc;Tt(e);var s,l,c=a.sel,u=c.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(i),s=l>-1?u[l]:new ca(i,i)):(s=a.sel.primary(),l=a.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new ca(i,i)),i=zn(t,e,!0,!0),l=-1;else{var d=Ts(t,i,n.unit);s=n.extend?Oa(s,d.anchor,d.head,n.extend):d}n.addNew?-1==l?(l=u.length,Ya(a,ua(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==n.unit&&!n.extend?(Ya(a,ua(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):$a(a,l,s,j):(l=0,Ya(a,new la([s],0),j),c=a.sel);var h=i;function p(e){if(0!=ue(h,e))if(h=e,"rectangle"==n.unit){for(var r=[],o=t.options.tabSize,u=V(ee(a,i.line).text,i.ch,o),d=V(ee(a,e.line).text,e.ch,o),p=Math.min(u,d),f=Math.max(u,d),v=Math.min(i.line,e.line),g=Math.min(t.lastLine(),Math.max(i.line,e.line));v<=g;v++){var m=ee(a,v).text,y=Z(m,p,o);p==f?r.push(new ca(ce(v,y),ce(v,y))):m.length>y&&r.push(new ca(ce(v,y),ce(v,Z(m,f,o))))}r.length||r.push(new ca(i,i)),Ya(a,ua(t,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,_=Ts(t,e,n.unit),w=x.anchor;ue(_.anchor,w)>0?(b=_.head,w=fe(x.from(),_.anchor)):(b=_.anchor,w=pe(x.to(),_.head));var C=c.ranges.slice(0);C[l]=Ms(t,new ca(ge(a,w),b)),Ya(a,ua(t,C,l),j)}}var f=r.wrapper.getBoundingClientRect(),v=0;function g(e){var i=++v,o=zn(t,e,!0,"rectangle"==n.unit);if(o)if(0!=ue(o,h)){t.curOp.focus=L(O(t)),p(o);var s=ar(r,a);(o.line>=s.to||o.linef.bottom?20:0;l&&setTimeout(Br(t,function(){v==i&&(r.scroller.scrollTop+=l,g(e))}),50)}}function m(e){t.state.selectingText=!1,v=1/0,e&&(Tt(e),r.input.focus()),_t(r.wrapper.ownerDocument,"mousemove",y),_t(r.wrapper.ownerDocument,"mouseup",b),a.history.lastSelOrigin=null}var y=Br(t,function(t){0!==t.buttons&&Pt(t)?g(t):m(t)}),b=Br(t,m);t.state.selectingText=b,bt(r.wrapper.ownerDocument,"mousemove",y),bt(r.wrapper.ownerDocument,"mouseup",b)}function Ms(t,e){var i=e.anchor,n=e.head,r=ee(t.doc,i.line);if(0==ue(i,n)&&i.sticky==n.sticky)return e;var a=mt(r);if(!a)return e;var o=vt(a,i.ch,i.sticky),s=a[o];if(s.from!=i.ch&&s.to!=i.ch)return e;var l,c=o+(s.from==i.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return e;if(n.line!=i.line)l=(n.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=vt(a,n.ch,n.sticky),d=u-o||(n.ch-i.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=a[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,v=p?"after":"before";return i.ch==f&&i.sticky==v?e:new ca(new ce(i.line,f,v),n)}function Es(t,e,i,n){var r,a;if(e.touches)r=e.touches[0].clientX,a=e.touches[0].clientY;else try{r=e.clientX,a=e.clientY}catch(h){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&Tt(e);var o=t.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!kt(t,i))return Mt(e);a-=s.top-o.viewOffset;for(var l=0;l=r){var u=oe(t.doc,a),d=t.display.gutterSpecs[l];return wt(t,i,t,u,d.className,e),Mt(e)}}}function Ds(t,e){return Es(t,e,"gutterClick",!0)}function Ps(t,e){Ui(t.display,e)||Ls(t,e)||Ct(t,e,"contextmenu")||S||t.display.input.onContextMenu(e)}function Ls(t,e){return!!kt(t,"gutterContextMenu")&&Es(t,e,"gutterContextMenu",!1)}function Rs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(t)}xs.prototype.compare=function(t,e,i){return this.time+bs>t&&0==ue(e,this.pos)&&i==this.button};var Fs={toString:function(){return"CodeMirror.Init"}},Bs={},Ns={};function Os(t){var e=t.optionHandlers;function i(i,n,r,a){t.defaults[i]=n,r&&(e[i]=a?function(t,e,i){i!=Fs&&r(t,e,i)}:r)}t.defineOption=i,t.Init=Fs,i("value","",function(t,e){return t.setValue(e)},!0),i("mode",null,function(t,e){t.doc.modeOption=e,ma(t)},!0),i("indentUnit",2,ma,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(t){ya(t),gn(t),$n(t)},!0),i("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var i=[],n=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var a=t.text.indexOf(e,r);if(-1==a)break;r=a+e.length,i.push(ce(n,a))}n++});for(var r=i.length-1;r>=0;r--)so(t.doc,e,i[r],ce(i[r].line,i[r].ch+e.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=Fs&&t.refresh()}),i("specialCharPlaceholder",bi,function(t){return t.refresh()},!0),i("electricChars",!0),i("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),i("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),i("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),i("rtlMoveVisually",!_),i("wholeLineUpdateBefore",!0),i("theme","default",function(t){Rs(t),ea(t)},!0),i("keyMap","default",function(t,e,i){var n=jo(e),r=i!=Fs&&jo(i);r&&r.detach&&r.detach(t,n),n.attach&&n.attach(t,r||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Ws,!0),i("gutters",[],function(t,e){t.display.gutterSpecs=Qr(e,t.options.lineNumbers),ea(t)},!0),i("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Bn(t.display)+"px":"0",t.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(t){return wr(t)},!0),i("scrollbarStyle","native",function(t){kr(t),wr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),i("lineNumbers",!1,function(t,e){t.display.gutterSpecs=Qr(t.options.gutters,e),ea(t)},!0),i("firstLineNumber",1,ea,!0),i("lineNumberFormatter",function(t){return t},ea,!0),i("showCursorWhenSelecting",!1,Un,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(t,e){"nocursor"==e&&(ir(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),i("screenReaderLabel",null,function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)}),i("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),i("dragDrop",!0,zs),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Un,!0),i("singleCursorHeightPerLine",!0,Un,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,ya,!0),i("addModeClass",!1,ya,!0),i("pollInterval",100),i("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),i("historyEventDelay",1250),i("viewportMargin",10,function(t){return t.refresh()},!0),i("maxHighlightLength",1e4,ya,!0),i("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),i("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),i("autofocus",null),i("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),i("phrases",null)}function zs(t,e,i){var n=i&&i!=Fs;if(!e!=!n){var r=t.display.dragFunctions,a=e?bt:_t;a(t.display.scroller,"dragstart",r.start),a(t.display.scroller,"dragenter",r.enter),a(t.display.scroller,"dragover",r.over),a(t.display.scroller,"dragleave",r.leave),a(t.display.scroller,"drop",r.drop)}}function Ws(t){t.options.lineWrapping?(R(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),di(t)),On(t),$n(t),gn(t),setTimeout(function(){return wr(t)},100)}function $s(t,e){var i=this;if(!(this instanceof $s))return new $s(t,e);this.options=e=e?H(e):{},H(Bs,e,!1);var n=e.value;"string"==typeof n?n=new To(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var r=new $s.inputStyles[e.inputStyle](this),a=this.display=new ia(t,n,r,e);for(var c in a.wrapper.CodeMirror=this,Rs(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),kr(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 K,keySeq:null,specialChars:null},e.autofocus&&!y&&a.input.focus(),o&&s<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Hs(this),Fo(),Tr(this),this.curOp.forceUpdate=!0,wa(this,n),e.autofocus&&!y||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&er(i)},20):ir(this),Ns)Ns.hasOwnProperty(c)&&Ns[c](this,e[c],Fs);Jr(this),e.finishInit&&e.finishInit(this);for(var u=0;u400}bt(e.scroller,"touchstart",function(r){if(!Ct(t,r)&&!a(r)&&!Ds(t,r)){e.input.ensurePolled(),clearTimeout(i);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),bt(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),bt(e.scroller,"touchend",function(i){var n=e.activeTouch;if(n&&!Ui(e,i)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,o=t.coordsChar(e.activeTouch,"page");a=!n.prev||l(n,n.prev)?new ca(o,o):!n.prev.prev||l(n,n.prev.prev)?t.findWordAt(o):new ca(ce(o.line,0),ge(t.doc,ce(o.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Tt(i)}r()}),bt(e.scroller,"touchcancel",r),bt(e.scroller,"scroll",function(){e.scroller.clientHeight&&(gr(t,e.scroller.scrollTop),yr(t,e.scroller.scrollLeft,!0),wt(t,"scroll",t))}),bt(e.scroller,"mousewheel",function(e){return sa(t,e)}),bt(e.scroller,"DOMMouseScroll",function(e){return sa(t,e)}),bt(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){Ct(t,e)||Et(e)},over:function(e){Ct(t,e)||(Do(t,e),Et(e))},start:function(e){return Eo(t,e)},drop:Br(t,Mo),leave:function(e){Ct(t,e)||Po(t)}};var c=e.input.getField();bt(c,"keyup",function(e){return vs.call(t,e)}),bt(c,"keydown",Br(t,ps)),bt(c,"keypress",Br(t,gs)),bt(c,"focus",function(e){return er(t,e)}),bt(c,"blur",function(e){return ir(t,e)})}$s.defaults=Bs,$s.optionHandlers=Ns;var Vs=[];function Ks(t,e,i,n){var r,a=t.doc;null==i&&(i="add"),"smart"==i&&(a.mode.indent?r=Ce(t,e).state:i="prev");var o=t.options.tabSize,s=ee(a,e),l=V(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==i&&(c=a.mode.indent(r,s.text.slice(u.length),s.text),c==U||c>150)){if(!n)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>a.first?V(ee(a,e-1).text,null,o):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var d="",h=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/o);p;--p)h+=o,d+="\t";if(ho,l=Ot(e),c=null;if(s&&n.ranges.length>1)if(Ys&&Ys.text.join("\n")==e){if(n.ranges.length%Ys.text.length==0){c=[];for(var u=0;u=0;h--){var p=n.ranges[h],f=p.from(),v=p.to();p.empty()&&(i&&i>0?f=ce(f.line,f.ch-i):t.state.overwrite&&!s?v=ce(v.line,Math.min(ee(a,v.line).text.length,v.ch+tt(l).length)):s&&Ys&&Ys.lineWise&&Ys.text.join("\n")==l.join("\n")&&(f=v=ce(f.line,0)));var g={from:f,to:v,text:c?c[h%c.length]:l,origin:r||(s?"paste":t.state.cutIncoming>o?"cut":"+input")};eo(t.doc,g),Pi(t,"inputRead",t,g)}e&&!s&&js(t,e),dr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Gs(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||Fr(e,function(){return Us(e,i,0,null,"paste")}),!0}function js(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(!(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)){var a=t.getModeAt(r.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Ks(t,r.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(ee(t.doc,r.head.line).text.slice(0,r.head.ch))&&(o=Ks(t,r.head.line,"smart"));o&&Pi(t,"electricInput",t,r.head.line)}}}function qs(t){for(var e=[],i=[],n=0;ni&&(Ks(this,r.head.line,t,!0),i=r.head.line,n==this.doc.sel.primIndex&&dr(this));else{var a=r.from(),o=r.to(),s=Math.max(i,a.line);i=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$a(this.doc,n,new ca(a,c[n].to()),G)}}}),getTokenAt:function(t,e){return Ie(this,t,e)},getLineTokens:function(t,e){return Ie(this,ce(t),e,!0)},getTokenTypeAt:function(t){t=ge(this.doc,t);var e,i=we(this,ee(this.doc,t.line)),n=0,r=(i.length-1)/2,a=t.ch;if(0==a)e=i[2];else for(;;){var o=n+r>>1;if((o?i[2*o-1]:0)>=a)r=o;else{if(!(i[2*o+1]a&&(t=a,r=!0),n=ee(this.doc,t)}else n=t;return xn(this,n,{top:0,left:0},e||"page",i||r).top+(r?this.doc.height-ci(n):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,n,r){var a=this.display;t=Cn(this,ge(this.doc,t));var o=t.bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),a.sizer.appendChild(e),"over"==n)o=t.top;else if("above"==n||"near"==n){var l=Math.max(a.wrapper.clientHeight,this.doc.height),c=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(o=t.bottom),s+e.offsetWidth>c&&(s=c-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==r?(s=a.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(a.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),i&&lr(this,{left:s,top:o,right:s+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:Nr(ps),triggerOnKeyPress:Nr(gs),triggerOnKeyUp:vs,triggerOnMouseDown:Nr(ws),execCommand:function(t){if(es.hasOwnProperty(t))return es[t].call(null,this)},triggerElectric:Nr(function(t){js(this,t)}),findPosH:function(t,e,i,n){var r=1;e<0&&(r=-1,e=-e);for(var a=ge(this.doc,t),o=0;o0&&s(i.charAt(n-1)))--n;while(r.5||this.options.lineWrapping)&&On(this),wt(this,"refresh",this)}),swapDoc:Nr(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,t),gn(this),this.display.input.reset(),hr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Pi(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},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}},At(t),t.registerHelper=function(e,n,r){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][n]=r},t.registerGlobalHelper=function(e,n,r,a){t.registerHelper(e,n,a),i[e]._global.push({pred:r,val:a})}}function tl(t,e,i,n,r){var a=e,o=i,s=ee(t,e.line),l=r&&"rtl"==t.direction?-i:i;function c(){var i=e.line+l;return!(i=t.first+t.size)&&(e=new ce(i,e.ch,e.sticky),s=ee(t,i))}function u(a){var o;if("codepoint"==n){var u=s.text.charCodeAt(e.ch+(i>0?0:-1));if(isNaN(u))o=null;else{var d=i>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new ce(e.line,Math.max(0,Math.min(s.text.length,e.ch+i*(d?2:1))),-i)}}else o=r?ts(t.cm,s,e,i):Jo(s,e,i);if(null==o){if(a||!c())return!1;e=Qo(r,t.cm,s,e.line,l)}else e=o;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,p=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;;f=!1){if(i<0&&!u(!f))break;var v=s.text.charAt(e.ch)||"\n",g=st(v,p)?"w":h&&"\n"==v?"n":!h||/\s/.test(v)?null:"p";if(!h||f||g||(g="s"),d&&d!=g){i<0&&(i=1,u(),e.sticky="after");break}if(g&&(d=g),i>0&&!u(!f))break}var m=Za(t,e,a,o,!0);return de(a,m)&&(m.hitSide=!0),m}function el(t,e,i,n){var r,a,o=t.doc,s=e.left;if("page"==n){var l=Math.min(t.display.wrapper.clientHeight,W(t).innerHeight||o(t).documentElement.clientHeight),c=Math.max(l-.5*Ln(t.display),3);r=(i>0?e.bottom:e.top)+i*c}else"line"==n&&(r=i>0?e.bottom+3:e.top-3);for(;;){if(a=An(t,s,r),!a.outside)break;if(i<0?r<=0:r>=o.height){a.hitSide=!0;break}r+=5*i}return a}var il=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function nl(t,e){var i=an(t,e.line);if(!i||i.hidden)return null;var n=ee(t.doc,e.line),r=en(i,n,e.line),a=mt(n,t.doc.direction),o="left";if(a){var s=vt(a,e.ch);o=s%2?"right":"left"}var l=un(r.map,e.ch,o);return l.offset="right"==l.collapse?l.end:l.start,l}function rl(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function al(t,e){return e&&(t.bad=!0),t}function ol(t,e,i,n,r){var a="",o=!1,s=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function u(){o&&(a+=s,l&&(a+=s),o=l=!1)}function d(t){t&&(u(),a+=t)}function h(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void d(i);var a,p=e.getAttribute("cm-marker");if(p){var f=t.findMarks(ce(n,0),ce(r+1,0),c(+p));return void(f.length&&(a=f[0].find(0))&&d(ie(t.doc,a.from,a.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var v=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;v&&u();for(var g=0;g=e.display.viewTo||a.line=e.display.viewFrom&&nl(e,r)||{node:l[0].measure.map[2],offset:0},u=a.linen.firstLine()&&(o=ce(o.line-1,ee(n.doc,o.line-1).length)),s.ch==ee(n.doc,s.line).text.length&&s.liner.viewTo-1)return!1;o.line==r.viewFrom||0==(t=Wn(n,o.line))?(e=ae(r.view[0].line),i=r.view[0].node):(e=ae(r.view[t].line),i=r.view[t-1].node.nextSibling);var l,c,u=Wn(n,s.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ae(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!i)return!1;var d=n.doc.splitLines(ol(n,i,c,e,l)),h=ie(n.doc,ce(e,0),ce(l,ee(n.doc,l).text.length));while(d.length>1&&h.length>1)if(tt(d)==tt(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}var p=0,f=0,v=d[0],g=h[0],m=Math.min(v.length,g.length);while(po.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1))p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var _=ce(e,p),w=ce(l,h.length?tt(h).length-f:0);return d.length>1||d[0]||ue(_,w)?(so(n.doc,d,_,w,"+input"),!0):void 0},il.prototype.ensurePolled=function(){this.forceCompositionEnd()},il.prototype.reset=function(){this.forceCompositionEnd()},il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},il.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},il.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Fr(this.cm,function(){return $n(t.cm)})},il.prototype.setUneditable=function(t){t.contentEditable="false"},il.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Br(this.cm,Us)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},il.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},il.prototype.onContextMenu=function(){},il.prototype.resetPosition=function(){},il.prototype.needsContentAttribute=!0;var cl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ul(t,e){if(e=e?H(e):{},e.value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=L(z(t));e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function n(){t.value=s.getValue()}var r;if(t.form&&(bt(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var a=t.form;r=a.submit;try{var o=a.submit=function(){n(),a.submit=r,a.submit(),a.submit=o}}catch(l){}}e.finishInit=function(i){i.save=n,i.getTextArea=function(){return t},i.toTextArea=function(){i.toTextArea=isNaN,n(),t.parentNode.removeChild(i.getWrapperElement()),t.style.display="",t.form&&(_t(t.form,"submit",n),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var s=$s(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s}function dl(t){t.off=_t,t.on=bt,t.wheelEventPixels=oa,t.Doc=To,t.splitLines=Ot,t.countColumn=V,t.findColumn=Z,t.isWordChar=ot,t.Pass=U,t.signal=wt,t.Line=hi,t.changeEnd=ha,t.scrollbarModel=Sr,t.Pos=ce,t.cmpPos=ue,t.modes=Vt,t.mimeModes=Kt,t.resolveMode=Ut,t.getMode=Gt,t.modeExtensions=jt,t.extendMode=qt,t.copyState=Zt,t.startState=Qt,t.innerMode=Jt,t.commands=es,t.keyMap=Ho,t.keyName=Go,t.isModifierKey=Xo,t.lookupKey=Yo,t.normalizeKeyMap=Ko,t.StringStream=te,t.SharedTextMarker=_o,t.TextMarker=bo,t.LineWidget=vo,t.e_preventDefault=Tt,t.e_stopPropagation=It,t.e_stop=Et,t.addClass=R,t.contains=P,t.rmClass=T,t.keyNames=Oo}cl.prototype.init=function(t){var e=this,i=this,n=this.cm;this.createField(t);var r=this.textarea;function a(t){if(!Ct(n,t)){if(n.somethingSelected())Xs({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var e=qs(n);Xs({lineWise:!0,text:e.text}),"cut"==t.type?n.setSelections(e.ranges,null,G):(i.prevInput="",r.value=e.text.join("\n"),B(r))}"cut"==t.type&&(n.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(r.style.width="0px"),bt(r,"input",function(){o&&s>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()}),bt(r,"paste",function(t){Ct(n,t)||Gs(t,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())}),bt(r,"cut",a),bt(r,"copy",a),bt(t.scroller,"paste",function(e){if(!Ui(t,e)&&!Ct(n,e)){if(!r.dispatchEvent)return n.state.pasteIncoming=+new Date,void i.focus();var a=new Event("paste");a.clipboardData=e.clipboardData,r.dispatchEvent(a)}}),bt(t.lineSpace,"selectstart",function(e){Ui(t,e)||Tt(e)}),bt(r,"compositionstart",function(){var t=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:n.markText(t,n.getCursor("to"),{className:"CodeMirror-composing"})}}),bt(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},cl.prototype.createField=function(t){this.wrapper=Js(),this.textarea=this.wrapper.firstChild;var e=this.cm.options;Zs(this.textarea,e.spellcheck,e.autocorrect,e.autocapitalize)},cl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},cl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,n=Gn(t);if(t.options.moveInputWithCursor){var r=Cn(t,i.sel.primary().head,"div"),a=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+o.left-a.left))}return n},cl.prototype.showSelection=function(t){var e=this.cm,i=e.display;M(i.cursorDiv,t.cursors),M(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},cl.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var e=this.cm;if(this.resetting=!0,e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&B(this.textarea),o&&s>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},cl.prototype.getField=function(){return this.textarea},cl.prototype.supportsTouch=function(){return!1},cl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||L(z(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(t){}},cl.prototype.blur=function(){this.textarea.blur()},cl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cl.prototype.receivedFocus=function(){this.slowPoll()},cl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},cl.prototype.fastPoll=function(){var t=!1,e=this;function i(){var n=e.poll();n||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,i))}e.pollingFast=!0,e.polling.set(20,i)},cl.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!e.state.focused||zt(i)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=i.value;if(r==n&&!e.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===r||b&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=r.charCodeAt(0);if(8203!=a||n||(n="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}var l=0,c=Math.min(n.length,r.length);while(l1e3||r.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},cl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cl.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},cl.prototype.onContextMenu=function(t){var e=this,i=e.cm,n=i.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=zn(i,t),c=n.scroller.scrollTop;if(a&&!h){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(a)&&Br(i,Ya)(i.doc,da(a),G);var d,p=r.style.cssText,f=e.wrapper.style.cssText,v=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-v.top-5)+"px; left: "+(t.clientX-v.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(d=r.ownerDocument.defaultView.scrollY),n.input.focus(),l&&r.ownerDocument.defaultView.scrollTo(null,d),n.input.reset(),i.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=y,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll),o&&s>=9&&m(),S){Et(t);var g=function(){_t(window,"mouseup",g),setTimeout(y,20)};bt(window,"mouseup",g)}else setTimeout(y,50)}function m(){if(null!=r.selectionStart){var t=i.somethingSelected(),a="​"+(t?r.value:"");r.value="⇚",r.value=a,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=a.length,n.selForContextMenu=i.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=p,o&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=r.selectionStart)){(!o||o&&s<9)&&m();var t=0,a=function(){n.selForContextMenu==i.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Br(i,Qa)(i):t++<10?n.detectingSelectAll=setTimeout(a,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(a,200)}}},cl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},cl.prototype.setUneditable=function(){},cl.prototype.needsContentAttribute=!1,Os($s),Qs($s);var hl="iter insert remove copy getEditor constructor".split(" ");for(var pl in To.prototype)To.prototype.hasOwnProperty(pl)&&Y(hl,pl)<0&&($s.prototype[pl]=function(t){return function(){return t.apply(this.doc,arguments)}}(To.prototype[pl]));return At(To),$s.inputStyles={textarea:cl,contenteditable:il},$s.defineMode=function(t){$s.defaults.mode||"null"==t||($s.defaults.mode=t),Yt.apply(this,arguments)},$s.defineMIME=Xt,$s.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),$s.defineMIME("text/plain","null"),$s.defineExtension=function(t,e){$s.prototype[t]=e},$s.defineDocExtension=function(t,e){To.prototype[t]=e},$s.fromTextArea=ul,dl($s),$s.version="5.65.16",$s})},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 r=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.")},a=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=a(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,r=t.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;e[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=r,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-r%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).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=[],r=0;r>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(a))}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)))}},f=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,r=n.words,a=n.sigBytes,o=this.blockSize,s=4*o,l=a/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,a);if(u){for(var h=0;h>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=h,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=h;for(r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=n._createHelper(l)}(),t.RabbitLegacy})},35038:function(t,e,i){"use strict";i.d(e,{Qo:function(){return a},_3:function(){return u},dp:function(){return o},iO:function(){return c},mk:function(){return s},ms:function(){return l},z6:function(){return d}});var n=i(75769),r={GetWatchlist:"/api/market/watchlist/get",AddWatchlist:"/api/market/watchlist/add",RemoveWatchlist:"/api/market/watchlist/remove",GetWatchlistPrices:"/api/market/watchlist/prices",MultiAnalysis:"/api/analysis/multiAnalysis",CreateAnalysisTask:"/api/analysis/createTask",GetAnalysisTaskStatus:"/api/analysis/getTaskStatus",GetAnalysisHistoryList:"/api/analysis/getHistoryList",DeleteAnalysisTask:"/api/analysis/deleteTask",ReflectAnalysis:"/api/analysis/reflect",ChatMessage:"/api/ai/chat/message",GetChatHistory:"/api/ai/chat/history",SaveChatHistory:"/api/ai/chat/history/save",GetConfig:"/api/market/config",GetMenuFooterConfig:"/api/market/menuFooterConfig",GetMarketTypes:"/api/market/types",SearchSymbols:"/api/market/symbols/search",GetHotSymbols:"/api/market/symbols/hot"};function a(t){return(0,n.Ay)({url:r.GetWatchlist,method:"get",params:t})}function o(t){return(0,n.Ay)({url:r.AddWatchlist,method:"post",data:t})}function s(t){return(0,n.Ay)({url:r.RemoveWatchlist,method:"post",data:t})}function l(t){return(0,n.Ay)({url:r.GetWatchlistPrices,method:"get",params:{watchlist:JSON.stringify(t.watchlist||[])}})}function c(){return(0,n.Ay)({url:r.GetMarketTypes,method:"get"})}function u(t){return(0,n.Ay)({url:r.SearchSymbols,method:"get",params:t})}function d(t){return(0,n.Ay)({url:r.GetHotSymbols,method:"get",params:t})}},36308:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,r=e.algo,a=r.SHA256,o=r.SHA224=a.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=a._createHelper(o),e.HmacSHA224=a._createHmacHelper(o)}(),t.SHA224})},38454:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e}(),t.mode.ECB})},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,r=i.WordArray,a=e.algo,o=a.MD5,s=a.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,a=n.hasher.create(),o=r.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.length>>8^255&r^99,a[i]=r,o[r]=i;var v=t[i],g=t[v],m=t[g],y=257*t[r]^16843008*r;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*v^16843008*i;d[r]=y<<24|y>>>8,h[r]=y<<16|y>>>16,p[r]=y<<8|y>>>24,f[r]=y,i?(i=v^t[t[t[m^v]]],n^=t[t[n]]):i=n=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],g=r.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,r=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u]):(u=u<<8|u>>>24,u=a[u>>>24]<<24|a[u>>>16&255]<<16|a[u>>>8&255]<<8|a[255&u],u^=v[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[a[u>>>16&255]]^p[a[u>>>8&255]]^f[a[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,a)},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,f,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,r,a,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,f=1;f>>24]^r[u>>>16&255]^a[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^r[d>>>16&255]^a[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^r[h>>>16&255]^a[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^r[c>>>16&255]^a[u>>>8&255]^o[255&d]^i[p++];c=v,u=g,d=m,h=y}v=(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]=v,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},42073:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.AnsiX923={pad:function(t,e){var i=t.sigBytes,n=4*e,r=n-i%n,a=i+r-1;t.clamp(),t.words[a>>>2]|=r<<24-a%4*8,t.sigBytes+=r},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923})},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,r=e.algo;const a=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,r=e>>8&255,a=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][r],o+=t.sbox[3][a],o}function u(t,e,i){let n,r=e,o=i;for(let s=0;s1;--s)r^=t.pbox[s],o=c(t,r)^o,n=r,r=o,o=n;return n=r,r=o,o=n,o^=t.pbox[1],r^=t.pbox[0],{left:r,right:o}}function h(t,e,i){for(let a=0;a<4;a++){t.sbox[a]=[];for(let e=0;e<256;e++)t.sbox[a][e]=s[a][e]}let n=0;for(let s=0;s=i&&(n=0);let r=0,l=0,c=0;for(let o=0;o>>31}var d=(n<<5|n>>>27)+l+o[c];d+=c<20?1518500249+(r&a|~r&s):c<40?1859775393+(r^a^s):c<60?(r&a|r&s|a&s)-1894007588:(r^a^s)-899497514,l=s,s=a,a=r<<30|r>>>2,r=n,n=d}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+s|0,i[4]=i[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(i/4294967296),e[15+(n+64>>>9<<4)]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s)}(),t.SHA1})},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,r=e.enc;r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=t.charCodeAt(r)<<16-r%2*16;return n.create(i,2*e)}};function a(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r>>2]>>>16-r%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r>>1]|=a(t.charCodeAt(r)<<16-r%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},45953:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.x64,s=o.Word,l=i.algo,c=[],u=[],d=[];(function(){for(var t=1,e=0,i=0;i<24;i++){c[t+5*e]=(i+1)*(i+2)/2%64;var n=e%5,r=(2*t+3*e)%5;t=n,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var a=1,o=0;o<24;o++){for(var l=0,h=0,p=0;p<7;p++){if(1&a){var f=(1<>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);var s=i[r];s.high^=o,s.low^=a}for(var l=0;l<24;l++){for(var p=0;p<5;p++){for(var f=0,v=0,g=0;g<5;g++){s=i[p+5*g];f^=s.high,v^=s.low}var m=h[p];m.high=f,m.low=v}for(p=0;p<5;p++){var y=h[(p+4)%5],b=h[(p+1)%5],x=b.high,_=b.low;for(f=y.high^(x<<1|_>>>31),v=y.low^(_<<1|x>>>31),g=0;g<5;g++){s=i[p+5*g];s.high^=f,s.low^=v}}for(var w=1;w<25;w++){s=i[w];var C=s.high,S=s.low,k=c[w];k<32?(f=C<>>32-k,v=S<>>32-k):(f=S<>>64-k,v=C<>>64-k);var A=h[u[w]];A.high=f,A.low=v}var T=h[0],I=i[0];T.high=I.high,T.low=I.low;for(p=0;p<5;p++)for(g=0;g<5;g++){w=p+5*g,s=i[w];var M=h[w],E=h[(p+1)%5+5*g],D=h[(p+2)%5+5*g];s.high=M.high^~E.high&D.high,s.low=M.low^~E.low&D.low}s=i[0];var P=d[l];s.high^=P.high,s.low^=P.low}},_doFinalize:function(){var t=this._data,i=t.words,n=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;i[n>>>5]|=1<<24-n%32,i[(e.ceil((n+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*i.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new r.init(c,s)},clone:function(){for(var t=a.clone.call(this),e=t._state=this._state.slice(0),i=0;i<25;i++)e[i]=e[i].clone();return t}});i.SHA3=a._createHelper(p),i.HmacSHA3=a._createHmacHelper(p)}(Math),t.SHA3})},50436:function(t,e,i){(function(t){t(i(15237))})(function(t){"use strict";var e="CodeMirror-activeline",i="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function r(t){for(var r=0;rn&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),o=this._iKey=e.clone(),s=r.words,l=o.words,c=0;c=0;i--)if(e[i>>>2]>>>24-i%4*8&255){t.sigBytes=i+1;break}}},t.pad.ZeroPadding})},54905:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.Iso10126={pad:function(e,i){var n=4*i,r=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(r-1)).concat(t.lib.WordArray.create([r<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126})},55218:function(t,e,i){(function(t){t(i(15237))})(function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},i=t.Pos;function n(t,i){return"pairs"==i&&"string"==typeof t?t:"object"==typeof t&&null!=t[i]?t[i]:e[i]}t.defineOption("autoCloseBrackets",!1,function(e,i,o){o&&o!=t.Init&&(e.removeKeyMap(r),e.state.closeBrackets=null),i&&(a(n(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(r))});var r={Backspace:l,Enter:c};function a(t){for(var e=0;e=0;l--){var u=o[l].head;e.replaceRange("",i(u.line,u.ch-1),i(u.line,u.ch+1),"+delete")}}function c(e){var i=s(e),r=i&&n(i,"explode");if(!r||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),o=0;o0?{line:o.head.line,ch:o.head.ch+e}:{line:o.head.line-1};i.push({anchor:s,head:s})}t.setSelections(i,r)}function d(e){var n=t.cmpPos(e.anchor,e.head)>0;return{anchor:new i(e.anchor.line,e.anchor.ch+(n?-1:1)),head:new i(e.head.line,e.head.ch+(n?1:-1))}}function h(e,r){var a=s(e);if(!a||e.getOption("disableInput"))return t.Pass;var o=n(a,"pairs"),l=o.indexOf(r);if(-1==l)return t.Pass;for(var c,h=n(a,"closeBefore"),p=n(a,"triples"),v=o.charAt(l+1)==r,g=e.listSelections(),m=l%2==0,y=0;y1&&p.indexOf(r)>=0&&e.getRange(i(_.line,_.ch-2),_)==r+r){if(_.ch>2&&/\bstring/.test(e.getTokenTypeAt(i(_.line,_.ch-2))))return t.Pass;b="addFour"}else if(v){var C=0==_.ch?" ":e.getRange(i(_.line,_.ch-1),_);if(t.isWordChar(w)||C==r||t.isWordChar(C))return t.Pass;b="both"}else{if(!m||!(0===w.length||/\s/.test(w)||h.indexOf(w)>-1))return t.Pass;b="both"}else b=v&&f(e,_)?"both":p.indexOf(r)>=0&&e.getRange(_,i(_.line,_.ch+3))==r+r+r?"skipThree":"skip";if(c){if(c!=b)return t.Pass}else c=b}var S=l%2?o.charAt(l-1):r,k=l%2?r:o.charAt(l+1);e.operation(function(){if("skip"==c)u(e,1);else if("skipThree"==c)u(e,3);else if("surround"==c){for(var t=e.getSelections(),i=0;i>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:f,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=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},b=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?a.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=a.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},x=n.SerializableCipher=r.extend({cfg:r.extend({format:b}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=t.createEncryptor(i,n),a=r.finalize(e),o=r.cfg;return m.create({ciphertext:a,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 r=t.createDecryptor(i,n).finalize(e.ciphertext);return r},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),_=i.kdf={},w=_.OpenSSL={execute:function(t,e,i,n,r){if(n||(n=a.random(8)),r)o=u.create({keySize:e+i,hasher:r}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=a.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},C=n.PasswordBasedCipher=x.extend({cfg:x.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=r.iv;var a=x.encrypt.call(this,t,e,r.key,n);return a.mixIn(r),a},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var r=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=r.iv;var a=x.decrypt.call(this,t,e,r.key,n);return a}})}()})},58124:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})},63009:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,a=n.Hasher,o=i.algo,s=[],l=[];(function(){function t(t){for(var i=e.sqrt(t),n=2;n<=i;n++)if(!(t%n))return!1;return!0}function i(t){return 4294967296*(t-(0|t))|0}var n=2,r=0;while(r<64)t(n)&&(r<8&&(s[r]=i(e.pow(n,.5))),l[r]=i(e.pow(n,1/3)),r++),n++})();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],u=i[5],d=i[6],h=i[7],p=0;p<64;p++){if(p<16)c[p]=0|t[e+p];else{var f=c[p-15],v=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[p-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=v+c[p-7]+m+c[p-16]}var y=s&u^~s&d,b=n&r^n&a^r&a,x=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),_=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),w=h+_+y+l[p]+c[p],C=x+b;h=d,d=u,u=s,s=o+w|0,o=a,a=r,r=n,n=w+C|0}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+s|0,i[5]=i[5]+u|0,i[6]=i[6]+d|0,i[7]=i[7]+h|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=e.floor(n/4294967296),i[15+(r+64>>>9<<4)]=n,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=a._createHelper(u),i.HmacSHA256=a._createHmacHelper(u)}(Math),t.SHA256})},63527:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return la}});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)],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("backtest-modal",{attrs:{visible:t.showBacktestModal,userId:t.userId,indicator:t.backtestIndicator,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe},on:{cancel:function(e){t.showBacktestModal=!1,t.backtestIndicator=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("backtest-history-drawer",{attrs:{visible:t.showBacktestHistoryDrawer,userId:t.userId,indicatorId:t.backtestHistoryIndicator?t.backtestHistoryIndicator.id:null,symbol:t.selectedSymbol,market:t.selectedMarket,timeframe:t.selectedTimeframe,isMobile:t.isMobile},on:{cancel:function(e){t.showBacktestHistoryDrawer=!1,t.backtestHistoryIndicator=null},view:t.handleViewBacktestRun}}),e("backtest-run-viewer",{attrs:{visible:t.showBacktestRunViewer,run:t.selectedBacktestRun},on:{cancel:function(e){t.showBacktestRunViewer=!1,t.selectedBacktestRun=null}}}),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)},r=[],a=(i(96305),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(89999),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),f=i(75769),v=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=[],b=i(57532),x=(i(2892),i(27495),i(99449),i(25440),i(11392),i(15237)),_=i.n(x),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),C=i.n(w),S=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,f.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=_()(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,r,a,o,s,c,u,d,h,p,f,v,g,m,y,x,_,w,k,A,T,I,M,E;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,r="/api/indicator/aiGenerate",a=C().get(S.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:a?"Bearer ".concat(a):"","Access-Token":a||"",Token:a||""},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,f=p.done,v=p.value,!f){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(v,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,b.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(x=y.value,x.trim()&&x.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(_=x.substring(6),"[DONE]"!==_){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(_),!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),A=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:A-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,M=e.v,m.e(M);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(T=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(T),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,E=e.v,t.$message.error(E.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(I=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(I));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]])}))()}}},A=k,T=i(81656),I=(0,T.A)(A,m,y,!1,null,"4fea1865",null),M=I.exports,E=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=[];i(2259);function P(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],i=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}throw new TypeError((0,o.A)(t)+" is not iterable")}var L=i(26297),R=i(2403),F=(i(34782),i(26910),i(71761),function(t,e){return F=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])},F(t,e)});function B(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}F(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,W,$,H,V,K,Y,X=function(){return X=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&r[r.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[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 q(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=a.next()).done)o.push(n.value)}catch(s){r={error:s}}finally{try{n&&!n.done&&(i=a["return"])&&i.call(a)}finally{if(r)throw r.error}}return o}function Z(t,e,i){if(i||2===arguments.length)for(var n,r=0,a=e.length;r1e9)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 Wt(t,e){var i="".concat(t),n=i.match(/\.0*(\d+)/);if(It(n)&&parseInt(n[1])>0){var r=n[0].length-1-n[1].length;if(r>=e)return i.replace(/\.0*/,".0{".concat(r,"}"))}return i}function $t(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 Vt(t,e,i,n){if(!It(Dt)){var r=document.createElement("canvas"),a=$t(r);Dt=r.getContext("2d"),Dt.scale(a,a)}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"})(Pt||(Pt={}));var Kt,Yt=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 Xt(t,e,i,n,r){var a,o=e.result,s=e.figures,l=e.styles,c=Ft(l,"circles",n.circles),u=c.length,d=Ft(l,"bars",n.bars),h=d.length,p=Ft(l,"lines",n.lines),f=p.length,v=0,g=0,m=0;s.forEach(function(s){var l;switch(s.type){case"circle":var y=c[v%u];a=X(X({},y),{color:y.noChangeColor}),v++;break;case"bar":var b=d[g%h];a=X(X({},b),{color:b.noChangeColor}),g++;break;case"line":a=p[m%f],m++;break}if(It(a)){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]}},_=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);r(s,X(X({},a),_))}})}(function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"})(Kt||(Kt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,r=t.calcParams,a=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,f=t.extendData,v=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:Kt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==r&&void 0!==r?r:[],this.figures=null!==a&&void 0!==a?a:[],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=Ct(null!==p&&void 0!==p?p:{}),this.extendData=f,this.regenerateFigures=null!==v&&void 0!==v?v: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 U(this,void 0,void 0,function(){var e;return G(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 B(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function jt(){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,Zt=1,Jt=-1,Qt="overlay_",te="overlay_figure_",ee=Number.MAX_SAFE_INTEGER,ie=function(){function t(t){this.currentStep=Zt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,r=t.styles,a=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,f=t.createXAxisFigures,v=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,b=t.onDrawing,x=t.onDrawEnd,_=t.onClick,w=t.onDoubleClick,C=t.onRightClick,S=t.onPressedMoveStart,k=t.onPressedMoving,A=t.onPressedMoveEnd,T=t.onMouseEnter,I=t.onMouseLeave,M=t.onRemoved,E=t.onSelected,D=t.onDeselected;this.name=a,this.totalStep=!Tt(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=Ct(null!==r&&void 0!==r?r:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==f&&void 0!==f?f:null,this.createYAxisFigures=null!==v&&void 0!==v?v: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!==b&&void 0!==b?b:null,this.onDrawEnd=null!==x&&void 0!==x?x:null,this.onClick=null!==_&&void 0!==_?_:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==C&&void 0!==C?C:null,this.onPressedMoveStart=null!==S&&void 0!==S?S:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==A&&void 0!==A?A:null,this.onMouseEnter=null!==T&&void 0!==T?T:null,this.onMouseLeave=null!==I&&void 0!==I?I:null,this.onRemoved=null!==M&&void 0!==M?M:null,this.onSelected=null!==E&&void 0!==E?E:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Et(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Et(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=Z([],q(t),!1),t.length>=this.totalStep-1?(this.currentStep=Jt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=a:r=a,o<=2)break}return n}function de(t){var e=Math.floor(ve(t)),i=ge(e),n=t/i,r=0;return r=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=r*i,e>=-20?+t.toFixed(e<0?-e:0):t}function he(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function pe(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function fe(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var r,a;n[0]=Math.max(null!==(r=t[e])&&void 0!==r?r:t,n[0]),n[1]=Math.min(null!==(a=t[i])&&void 0!==a?a:t,n[1])}),n}function ve(t){return Math.log(t)/Math.log(10)}function ge(t){return Math.pow(10,t)}function me(){return{from:0,to:0,realFrom:0,realTo:0}}(function(t){t["Forward"]="forward",t["Backward"]="backward"})(re||(re={}));var ye={MIN:1,MAX:50},be=6,xe=50,_e=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=be,this._offsetRightDistance=xe,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=me(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t=Math.floor(.82*this._barSpace),e=Math.floor(this._barSpace),i=Math.min(t,e-1);return Math.max(1,i)},t.prototype.adjustVisibleRange=function(){var t,e,i,n,r=this._chartStore.getDataList(),a=r.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,a);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-a+Math.min(n,a);this._lastBarRightSideDiffBarCounta&&(c=a);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(a+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Pt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=r[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:re.Forward,data:null!==p&&void 0!==p?p:null})}c===a&&this._chartStore.executeLoadDataCallback({type:re.Backward,data:null!==(e=r[a-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"};Et(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){bt("","","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:this._gapBarSpace/2}},t.prototype.setBarSpace=function(t,e){tye.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;this._chartStore.getActionStore().execute(Pt.OnScroll),this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)}},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:ue(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)-.5},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 r=null!==e&&void 0!==e?e:null;if(!Tt(null===r||void 0===r?void 0:r.x)){var a=this._chartStore.getTooltipStore().getCrosshair();r={x:null!==(i=null===a||void 0===a?void 0:a.x)&&void 0!==i?i:this._totalBarSpace/2}}this._chartStore.getActionStore().execute(Pt.OnZoom);var o=r.x,s=this.coordinateToFloatIndex(o),l=this._barSpace+t*(this._barSpace/10);this.setBarSpace(l,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)})}},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=me()},t}(),we={name:"AVP",shortName:"AVP",series:Kt.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,r,a={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(r=null===t||void 0===t?void 0:t.volume)&&void 0!==r?r:0;return e+=o,i+=s,0!==i&&(a.avp=e/i),a})}},Ce={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):Ft(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]),r=0,a=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(r+=u,a+=u,l>=i[0]-1){o=r/i[0];var d=t[l-(i[0]-1)];r-=(d.low+d.high)/2}if(l>=i[1]-1){s=a/i[1];d=t[l-(i[1]-1)];a-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Se={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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,l){var c;if(r[l]=(null!==(c=r[l])&&void 0!==c?c:0)+s,a>=e-1){var u=r[l]/i[l];o[n[l].key]=(s-u)/u*100,r[l]-=t[a-(e-1)].close}}),o})}};function ke(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 Ae={name:"BOLL",shortName:"BOLL",series:Kt.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,r=0;return t.map(function(e,a){var o=e.close,s={};if(r+=o,a>=n){s.mid=r/i[0];var l=ke(t.slice(a-n,a+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,r-=t[a-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,r=0,a=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,f=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(a+=d-p,o+=p-h,n+=d-f,r+=f-h,s>=i[0]-1){u.ar=0!==o?a/o*100:0,u.br=0!==r?n/r*100:0;var v=t[s-(i[0]-1)],g=v.high,m=v.low,y=v.open,b=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-b,r-=b-m,a-=g-y,o-=y-m}return u})}},Ie={name:"BBI",shortName:"BBI",series:Kt.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,Z([],q(i),!1)),r=[],a=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;r[i]=(null!==(n=r[i])&&void 0!==n?n:0)+l,o>=e-1&&(a[i]=r[i]/e,r[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;a.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Me={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,r=0,a=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(r+=l,a.push(l),o>=n){var c=r/i[0],u=a.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;r-=p}return s})}},Ee={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),r=Math.ceil(i[2]/2.5+1),a=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,f=[],v=[];return t.forEach(function(e,g){var m,y,b,x,_,w={},C=null!==(m=t[g-1])&&void 0!==m?m:e,S=(C.high+C.close+C.low+C.open)/4,k=Math.max(0,e.high-S),A=Math.max(0,S-e.low);g>=i[0]-1&&(w.cr=0!==A?k/A*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=v[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]+r-3&&(w.ma2=u[u.length-1-r]),c-=null!==(b=v[g-(i[2]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+a-3&&(w.ma3=h[h.length-1-a]),d-=null!==(x=v[g-(i[3]-1)].cr)&&void 0!==x?x:0),g>=i[0]+i[4]-2&&(f.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=f[f.length-1-o]),p-=null!==(_=v[g-(i[4]-1)].cr)&&void 0!==_?_:0)),v.push(w)}),v}},De={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]),r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;r+=d,a+=d;var h=0,p=0;if(l>=i[0]-1&&(h=r/i[0],r-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=a/i[1],a-=t[l-(i[1]-1)].close),l>=n-1){var f=h-p;u.dma=f,o+=f,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}},Pe={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,r=0,a=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,f,v={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,b=e.low,x=y-b,_=Math.abs(y-m),w=Math.abs(m-b),C=y-g.high,S=g.low-b,k=Math.max(Math.max(x,_),w),A=C>0&&C>S?C:0,T=S>0&&S>C?S:0;if(n+=k,r+=A,a+=T,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+A,l=l-l/i[0]+T):(o=n,s=r,l=a);var I=0,M=0;0!==o&&(I=100*s/o,M=100*l/o),v.pdi=I,v.mdi=M;var E=0;M+I!==0&&(E=Math.abs(M-I)/(M+I)*100),c+=E,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+E)/i[0]:c/i[0],v.adx=u,h>=2*i[0]+i[1]-3&&(v.adxr=((null!==(f=d[h-(i[1]-1)].adx)&&void 0!==f?f:0)+u)/2))}d.push(v)}),d}},Le={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,r=[];return t.map(function(e,a){var o,s={};if(a>0){var l=t[a-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,r.push(s.emv),a>=i[0]&&(s.maEmv=n/i[0],n-=r[a-i[0]])}return s})}},Re={name:"EMA",shortName:"EMA",series:Kt.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,r=0,a=[];return t.map(function(t,e){var o={},s=t.close;return r+=s,i.forEach(function(t,i){e>=t-1&&(a[i]=e>t-1?(2*s+(t-1)*a[i])/(t+1):r/t,o[n[i].key]=a[i])}),o})}},Fe={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,r=[];return t.forEach(function(e,a){var o,s={};if(a>=i[0]){var l=e.close,c=t[a-i[0]].close;s.mtm=l-c,n+=s.mtm,a>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=r[a-(i[1]-1)].mtm)&&void 0!==o?o:0)}r.push(s)}),r}},Be={name:"MA",shortName:"MA",series:Kt.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,r=[];return t.map(function(e,a){var o={},s=e.close;return i.forEach(function(e,i){var l;r[i]=(null!==(l=r[i])&&void 0!==l?l:0)+s,a>=e-1&&(o[n[i].key]=r[i]/e,r[i]-=t[a-(e-1)].close)}),o})}},Ne={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,r,a,o,s,l=t.prev,c=t.current,u=null!==(r=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(a=c.indicatorData)||void 0===a?void 0:a.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Ft(e.styles,"bars[0].downColor",i.bars[0].downColor):Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=r[0]-1&&(i=e>r[0]-1?(2*d+(r[0]-1)*i)/(r[0]+1):a/r[0]),e>=r[1]-1&&(n=e>r[1]-1?(2*d+(r[1]-1)*n)/(r[1]+1):a/r[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+r[2]-2&&(l=e>c+r[2]-2?(2*o+l*(r[2]-1))/(r[2]+1):s/r[2],u.macd=2*(o-l),u.dea=l)),u})}},Oe={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,r=0,a=[];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&&(r+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:r};n+=r,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=a[o-(i[0]-1)].obv)&&void 0!==u?u:0),a.push(h)}),a}},ze={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var r,a,o={},s=i.close,l=null!==(r=i.volume)&&void 0!==r?r:1,c=(null!==(a=t[n-1])&&void 0!==a?a:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},We={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,r=0,a=[],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;a.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,r+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=r/i[1],r-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=a[s-(i[0]-1)]),o.push(u)}),o}},$e={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=[],r=0;return t.forEach(function(e,a){var o,s,l={};if(a>=i[0]-1){var c=e.close,u=(null!==(o=t[a-i[0]])&&void 0!==o?o:t[a-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,r+=l.roc,a>=i[0]-1+i[1]-1&&(l.maRoc=r/i[1],r-=null!==(s=n[a-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},He={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,r=[],a=[];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?r[i]=(null!==(s=r[i])&&void 0!==s?s:0)+u:a[i]=(null!==(c=a[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==a[i]?l[n[i].key]=100-100/(1+r[i]/a[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,f=h.close-p.close;f>0?r[i]-=f:a[i]-=Math.abs(f)}}),l})}},Ve={name:"SMA",shortName:"SMA",series:Kt.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,r=0;return t.map(function(t,e){var a={},o=t.close;return n+=o,e>=i[0]-1&&(r=e>i[0]-1?(o*i[1]+r*(i[0]-i[1]+1))/(i[0]+1):n/i[0],a.sma=r),a})}},Ke={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,r){var a,o,s,l,c={},u=e.close;if(r>=i[0]-1){var d=fe(t.slice(r-(i[0]-1),r+1),"high","low"),h=d[0],p=d[1],f=h-p,v=(u-p)/(0===f?1:f)*100;c.k=((i[1]-1)*(null!==(o=null===(a=n[r-1])||void 0===a?void 0:a.k)&&void 0!==o?o:50)+v)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[r-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}},Ye={name:"SAR",shortName:"SAR",series:Kt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,r,a=t.current,o=null!==(r=null===(n=a.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==r?r:Number.MIN_SAFE_INTEGER,s=a.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+r,a)),c=u+o*(s-u);var f=Math.max(t[Math.max(1,i)-1].high,d);c=a[0]-1&&(i=e>a[0]-1?(2*p+(a[0]-1)*i)/(a[0]+1):o/a[0],s+=i,e>=2*a[0]-2&&(n=e>2*a[0]-2?(2*i+(a[0]-1)*n)/(a[0]+1):s/a[0],l+=n,e>=3*a[0]-3))){var f=void 0,v=0;e>3*a[0]-3?(f=(2*n+(a[0]-1)*r)/(a[0]+1),v=(f-r)/r*100):f=l/a[0],r=f,h.trix=v,c+=v,e>=3*a[0]+a[1]-4&&(h.maTrix=c/a[1],c-=null!==(d=u[e-(a[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}},Ue={name:"VOL",shortName:"VOL",series:Kt.Volume,calcParams:[5,10,20],shouldFormatBigNumber:!0,precision:0,minValue:0,figures:[{key:"ma1",title:"MA5: ",type:"line"},{key:"ma2",title:"MA10: ",type:"line"},{key:"ma3",title:"MA20: ",type:"line"},{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,r=Ft(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return It(n)&&(n.close>n.open?r=Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):n.closer.open?Ft(e.styles,"bars[0].upColor",i.bars[0].upColor):r.close=e-1&&(l[n[i].key]=r[i]/e,r[i]-=null!==(c=t[a-(e-1)].volume)&&void 0!==c?c:0)}),l})}},Ge={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,r=0,a=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,f={},v=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(v>g?n+=m:v=i[0]-1){var y=a/2;f.vr=r+y===0?0:(n+y)/(r+y)*100,o+=f.vr,l>=i[0]+i[1]-2&&(f.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var b=t[l-(i[0]-1)],x=null!==(h=t[l-i[0]])&&void 0!==h?h:b,_=b.close,w=null!==(p=b.volume)&&void 0!==p?p:0;_>x.close?n-=w:_=s){var l=fe(t.slice(r-s,r+1),"high","low"),c=l[0],u=l[1],d=c-u;a[n[i].key]=0===d?0:(o-c)/d*100}}),a})}},qe={},Ze=[we,Ce,Se,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je];function Je(t){qe[t.name]=Gt.extend(t)}function Qe(t){var e;return null!==(e=qe[t])&&void 0!==e?e:null}Ze.forEach(function(t){qe[t.name]=Gt.extend(t)});var ti=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,r=e.calcParams,a=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,f=e.extendData,v=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,b=!1;Et(i)&&t.setShortName(i)&&(b=!0),It(n)&&t.setSeries(n)&&(b=!0);var x=!1;St(r)&&t.setCalcParams(r)&&(b=!0,x=!0),St(o)&&t.setFigures(o)&&(b=!0,x=!0),void 0!==s&&t.setMinValue(s)&&(b=!0),void 0!==l&&t.setMinValue(l)&&(b=!0),Tt(a)&&t.setPrecision(a)&&(b=!0),Mt(c)&&t.setShouldOhlc(c)&&(b=!0),Mt(u)&&t.setShouldFormatBigNumber(u)&&(b=!0),Mt(d)&&t.setVisible(d)&&(b=!0);var _=!1;return Tt(h)&&t.setZLevel(h)&&(b=!0,_=!0),It(p)&&t.setStyles(p)&&(b=!0),t.setExtendData(f)&&(b=!0,x=!0),void 0!==v&&t.setRegenerateFigures(v)&&(b=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(b=!0),void 0!==m&&t.setDraw(m)&&(b=!0),kt(y)&&(t.calc=y,x=!0),[b,x,_]},t.prototype._sort=function(t){var e;Et(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 U(this,void 0,void 0,function(){var n,r,a,o,s;return G(this,function(l){switch(l.label){case 0:return n=t.name,r=this._instances.get(e),It(r)?(a=r.find(function(t){return t.name===n}),It(a)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return It(r)||(r=[]),o=Qe(n),s=new o,this._overrideInstance(s,t),i||(r=[]),r.push(s),this._instances.set(e,r),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,r=this._instances.get(t);if(It(r)){if(Et(e)){var a=r.findIndex(function(t){return t.name===e});a>-1&&(r.splice(a,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 U(this,void 0,void 0,function(){var i,n,r,a,o=this;return G(this,function(s){switch(s.label){case 0:return i=[],Et(t)?Et(e)?(n=this._instances.get(e),It(n)&&(r=n.find(function(e){return e.name===t}),It(r)&&i.push(r.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});It(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 a=s.sent(),[2,a.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,r=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Et(t)){var a=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Et(e)?null!==(n=null===a||void 0===a?void 0:a.find(function(t){return t.name===e}))&&void 0!==n?n:null:r(a)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,r(t))}),o},t.prototype.setSeriesPrecision=function(t){this._instances.forEach(function(e){e.forEach(function(e){e.series===Kt.Price&&e.setPrecision(t.price,!0),e.series===Kt.Volume&&e.setPrecision(t.volume,!0)})})},t.prototype.override=function(t,e){return U(this,void 0,void 0,function(){var i,n,r,a,o,s,l,c=this;return G(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(r=this._instances.get(e),It(r)&&n.set(e,r)):n=this._instances,a=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(It(n)){var r=c._overrideInstance(n,t);r[2]&&(s=!0),r[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):r[0]&&(a=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[a,l.includes(!0)]]}})})},t}(),ei=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,r=this._chartStore.getDataList(),a=null!==t&&void 0!==t?t:{};Tt(a.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(a.x),n=i<0?0:i>r.length-1?r.length-1:i):(i=r.length-1,n=i);var o=r[n],s=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),l={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=X(X({},a),{realX:s,kLineData:o,realDataIndex:i,dataIndex:n}),l.x===a.x&&l.y===a.y&&l.paneId===a.paneId||(null!==o&&this._chartStore.getChart().crosshairChange(this._crosshair),null!==e&&void 0!==e&&e||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,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({},!0),this.setActiveIcon()},t}(),ii={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n=t.overlay,r=t.precision,a=t.thousandsSeparator,o=t.decimalFoldThreshold,s=n.points;if(e.length>0){var l=[],c=[],u=0,d=i.width;if(e.length>1&&Tt(s[0].value)&&Tt(s[1].value)){var h=[1,.786,.618,.5,.382,.236,0],p=e[0].y-e[1].y,f=s[0].value-s[1].value;h.forEach(function(t){var i,n=e[1].y+p*t,h=Wt(zt(((null!==(i=s[1].value)&&void 0!==i?i:0)+f*t).toFixed(r.price),a),o);l.push({coordinates:[{x:u,y:n},{x:d,y:n}]}),c.push({x:u,y:n,text:"".concat(h," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:l},{type:"text",isCheckEvent:!1,attrs:c}]}return[]}},ni={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 It(e[1])&&e[0].x-1)for(var r=n;r>-1;r--)if(this._children[r].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}(),si=2,li=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return B(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},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 B(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}(oi);function ci(t,e){return Math.sqrt(Math.pow(t.x+e.x,2)+Math.pow(t.y+e.y,2))}function ui(t){var e=ci(t[0],t[1]),i=ci(t[1],t[2]),n=e+i,r=[t[2].x-t[0].x,t[2].y-t[0].y];return[{x:t[1].x-.5*r[0]*e/n,y:t[1].y-.5*r[1]*e/n},{x:t[1].x+.5*r[0]*e/n,y:t[1].y+.5*r[1]*e/n}]}function di(t,e){var i=e.coordinates;if(i.length>1)for(var n=1;n1){var a=i.style,o=void 0===a?N.Solid:a,s=i.smooth,l=i.size,c=void 0===l?1:l,u=i.color,d=void 0===u?"currentColor":u,h=i.dashedValue,p=void 0===h?[2,2]:h;if(t.lineWidth=c,t.strokeStyle=d,o===N.Dashed?t.setLineDash(p):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y),null!==s&&void 0!==s&&s){for(var f=[],v=1;v1)if(t[0].x===t[1].x){var a=0,o=e.height;if(r.push({coordinates:[{x:t[0].x,y:a},{x:t[0].x,y:o}]}),t.length>2){r.push({coordinates:[{x:t[2].x,y:a},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var v=t[2].y-p*t[2].x;r.push({coordinates:[{x:u,y:u*p+v},{x:d,y:d*p+v}]});for(s=f-v,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:pi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:pi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var wi={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:_i(e,i)}]}},Ci={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}}]:[]}},Si={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:pi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:pi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},ki={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=j(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(f){e={error:f}}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){a.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(a.length>0){var p=this._chartStore.getChart();a.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Bi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,r=this._hoverInstanceInfo,a=r.instance,o=r.figureType,s=r.figureKey,l=r.figureIndex;if(((null===a||void 0===a?void 0:a.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===a||void 0===a?void 0:a.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==a&&(u=!0,kt(a.onMouseLeave)&&(a.onMouseLeave(X({overlay:a,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,t.instance.setZLevel(ee),kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(X({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,r,a,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,f=d.figureType,v=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(a=null===(r=t.instance)||void 0===r?void 0:r.onClick)||void 0===a||a.call(r,X({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)||f!==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,X({overlay:p,figureKey:v,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,X({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,Bi.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}(),Oi=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 Yt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);It(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return It(e)&&!e.isEmpty()},t}(),zi={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"}}}},Wi={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"}}}},$i={light:zi,dark:Wi};function Hi(t){var e;return null!==(e=$i[t])&&void 0!==e?e:null}var Vi=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 _e(this),this._indicatorStore=new ti(this),this._overlayStore=new Ni(this),this._tooltipStore=new ei(this),this._actionStore=new Oi,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;no?(this._dataList.push(t),s=this._timeScaleStore.getLastBarRightSideDiffBarCount(),s<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--s),n=!0):a===o&&(this._dataList[r-1]=t,n=!0)),!n)return[3,4];this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this._indicatorStore.calcInstance()];case 2:return l.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),this._actionStore.execute(Pt.OnDataReady),[3,4];case 3:return l.sent(),[3,4];case 4:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&It(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&&It(this._loadDataCallback)&&(this._forwardMore&&t.type===re.Forward||this._backwardMore&&t.type===re.Backward)){var i=function(i,n){var r=[];t.type===re.Backward?(r=e._dataList.concat(i),e._backwardMore=null!==n&&void 0!==n&&n):(r=i.concat(e._dataList),e._forwardMore=null!==n&&void 0!==n&&n),e.addData(r,!1).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(X(X({},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}(),Ki={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Yi=7,Xi=-1;function Ui(t){return kt(window.requestAnimationFrame)?window.requestAnimationFrame(t):window.setTimeout(t,20)}function Gi(t){kt(window.cancelAnimationFrame)?window.cancelAnimationFrame(t):window.clearTimeout(t)}function ji(){return U(this,void 0,void 0,function(){return G(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 qi=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._requestAnimationId=Xi,this._mediaQueryListener=function(){var t=$t(i._element);i._resetPixelRatio(Math.round(i._element.clientWidth*t),Math.round(i._element.clientHeight*t),t,t)},this._listener=e,this._element=ce("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),ji().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}),r=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];if(It(r)){var a=r.inlineSize,o=r.blockSize;i._pixelWidth===a&&i._pixelHeight===o||i._resetPixelRatio(a,o,a/i._element.clientWidth,o/i._element.clientHeight)}}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat($t(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(t,e,i,n){var r=this;this._executeListener(function(){var a=r._element.clientWidth,o=r._element.clientHeight;r._width=a,r._height=o,r._pixelWidth=t,r._pixelHeight=e,r._element.width=t,r._element.height=e,r._ctx.scale(i,n)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId!==Xi&&(Gi(this._requestAnimationId),this._requestAnimationId=Xi),this._requestAnimationId=Ui(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener()})},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=$t(this._element);this._resetPixelRatio(Math.round(t*i),Math.round(e*i),i,i)}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){var t,e;null===(t=this._resizeObserver)||void 0===t||t.unobserve(this._element),null===(e=this._mediaQueryList)||void 0===e||e.removeListener(this._mediaQueryListener)},t}();function Zi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return It(t)&&wt(e,t),e}var Ji=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Zi(),n._pane=i,n.init(e),n}return B(e,t),e.prototype.init=function(t){this._rootContainer=t,this._container=this.createContainer(),t.appendChild(this._container)},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}(oi),Qi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.init=function(e){var i=this;t.prototype.init.call(this,e),this._mainCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateMain(i._mainCanvas.getContext())}),this._overlayCanvas=new qi({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){i.updateOverlay(i._overlayCanvas.getContext())});var n=this.getContainer();n.appendChild(this._mainCanvas.getElement()),n.appendChild(this._overlayCanvas.getElement())},e.prototype.createContainer=function(){return ce("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,r=e.height,a=e.left;t.style.left="".concat(a,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&r===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(r,"px"),o=3),o){case 0:this._mainCanvas.update(n,r);break;case 1:this._overlayCanvas.update(n,r);break;case 3:case 4:this._mainCanvas.update(n,r),this._overlayCanvas.update(n,r);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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);return r.width=i*o,r.height=n*o,a.scale(o,o),a.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&a.drawImage(this._overlayCanvas.getElement(),0,0,i,n),r},e}(Ji);function tn(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 en(t,e){var i=t.x-e.x,n=t.y-e.y,r=e.r;return!(i*i+n*n>r*r)}function nn(t,e,i){var n=e.x,r=e.y,a=e.r,o=i.style,s=void 0===o?O.Fill:o,l=i.color,c=void 0===l?"currentColor":l,u=i.borderSize,d=void 0===u?1:u,h=i.borderColor,p=void 0===h?"currentColor":h,f=i.borderStyle,v=void 0===f?N.Solid:f,g=i.borderDashedValue,m=void 0===g?[2,2]:g;s!==O.Fill&&i.style!==O.StrokeFill||Et(c)&&tn(c)||(t.fillStyle=c,t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.fill()),(s===O.Stroke||i.style===O.StrokeFill)&&d>0&&!tn(p)&&(t.strokeStyle=p,t.lineWidth=d,v===N.Dashed?t.setLineDash(m):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,0,2*Math.PI),t.closePath(),t.stroke())}var rn={name:"circle",checkEventOn:en,draw:function(t,e,i){nn(t,e,i)}};function an(t,e){for(var i=!1,n=e.coordinates,r=0,a=n.length-1;rt.y!==n[a].y>t.y&&t.x<(n[a].x-n[r].x)*(t.y-n[r].y)/(n[a].y-n[r].y)+n[r].x&&(i=!i);return i}function on(t,e,i){var n=e.coordinates,r=i.style,a=void 0===r?O.Fill:r,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,f=i.borderDashedValue,v=void 0===f?[2,2]:f;if((a===O.Fill||i.style===O.StrokeFill)&&(!Et(s)||!tn(s))){t.fillStyle=s,t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var g=1;g0&&!tn(d)){t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.moveTo(n[0].x,n[0].y);for(g=1;g=i&&t.x<=i+n&&t.y>=r&&t.y<=r+a}function cn(t,e,i){var n=e.x,r=e.y,a=e.width,o=e.height,s=i.style,l=void 0===s?O.Fill:s,c=i.color,u=void 0===c?"transparent":c,d=i.borderSize,h=void 0===d?1:d,p=i.borderColor,f=void 0===p?"transparent":p,v=i.borderStyle,g=void 0===v?N.Solid:v,m=i.borderRadius,y=void 0===m?0:m,b=i.borderDashedValue,x=void 0===b?[2,2]:b;l!==O.Fill&&i.style!==O.StrokeFill||Et(u)&&tn(u)||(t.fillStyle=u,t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.fill()),(l===O.Stroke||i.style===O.StrokeFill)&&h>0&&!tn(f)&&(t.strokeStyle=f,t.lineWidth=h,g===N.Dashed?t.setLineDash(x):t.setLineDash([]),t.beginPath(),t.moveTo(n+y,r),t.arcTo(n+a,r,n+a,r+o,y),t.arcTo(n+a,r+o,n,r+o,y),t.arcTo(n,r+o,n,r,y),t.arcTo(n,r,n+a,r,y),t.closePath(),t.stroke())}var un={name:"rect",checkEventOn:ln,draw:function(t,e,i){cn(t,e,i)}};function dn(t,e){var i,n,r=e.size,a=void 0===r?12:r,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,f=e.weight,v=void 0===f?"normal":f,g=e.family,m=t.x,y=t.y,b=t.text,x=t.align,_=void 0===x?"left":x,w=t.baseline,C=void 0===w?"top":w,S=t.width,k=t.height,A=null!==S&&void 0!==S?S:s+Vt(b,a,v,g)+d,T=null!==k&&void 0!==k?k:c+a+p;switch(_){case"left":case"start":i=m;break;case"right":case"end":i=m-A;break;default:i=m-A/2;break}switch(C){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-T;break;default:n=y-T/2;break}return{x:i,y:n,width:A,height:T}}function hn(t,e,i){var n=dn(e,i),r=n.x,a=n.y,o=n.width,s=n.height;return t.x>=r&&t.x<=r+o&&t.y>=a&&t.y<=a+s}function pn(t,e,i){var n=e.text,r=i.color,a=void 0===r?"currentColor":r,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,f=i.paddingRight,v=void 0===f?0:f,g=dn(e,i);cn(t,g,X(X({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=a,t.fillText(n,g.x+d,g.y+p,g.width-d-v)}var fn={name:"text",checkEventOn:function(t,e,i){return hn(t,e,i)},draw:function(t,e,i){pn(t,e,i)}},vn=fn;function gn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function mn(t,e){if(Math.abs(gn(t,e)-e.r)=Math.min(a,s)-si&&t.y<=Math.max(o,l)+si&&t.y>=Math.min(o,l)-si}return!1}function yn(t,e,i){var n=e.x,r=e.y,a=e.r,o=e.startAngle,s=e.endAngle,l=i.style,c=void 0===l?N.Solid:l,u=i.size,d=void 0===u?1:u,h=i.color,p=void 0===h?"currentColor":h,f=i.dashedValue,v=void 0===f?[2,2]:f;t.lineWidth=d,t.strokeStyle=p,c===N.Dashed?t.setLineDash(v):t.setLineDash([]),t.beginPath(),t.arc(n,r,a,o,s),t.stroke(),t.closePath()}var bn={name:"arc",checkEventOn:mn,draw:function(t,e,i){yn(t,e,i)}},xn={},_n=[rn,gi,sn,un,fn,vn,bn];function wn(t){var e;return null!==(e=xn[t])&&void 0!==e?e:null}_n.forEach(function(t){xn[t.name]=li.extend(t)});var Cn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return B(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=wn(t.name);if(null!==i){var n=new i(t);if(It(e)){for(var r in e)e.hasOwnProperty(r)&&n.registerEvent(r,e[r]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(oi),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget(),n=this.getWidget().getPane(),r=n.getChart(),a=i.getBounding(),o=r.getStyles().grid,s=o.show;if(s){t.save(),t.globalCompositeOperation="destination-over";var l=o.horizontal,c=l.show;if(c){var u=n.getAxisComponent();u.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:0,y:i.coord},{x:a.width,y:i.coord}]},styles:l}))||void 0===n||n.draw(t)})}var d=o.vertical,h=d.show;if(h){var p=r.getXAxisPane().getAxisComponent();p.getTicks().forEach(function(i){var n;null===(n=e.createFigure({name:"line",attrs:{coordinates:[{x:i.coord,y:0},{x:i.coord,y:a.height}]},styles:d}))||void 0===n||n.draw(t)})}t.restore()}},e}(Cn),kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),r=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,r,i)})},e}(Cn),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(Pt.OnCandleBarClick,t),!1}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Bi.CANDLE,r=i.getChart().getChartStore(),a=this.getCandleBarOptions(r);if(null!==a){var o=i.getAxisComponent();this.eachChildren(function(i,r){var s=i.data,l=i.x;if(It(s)){var c=s.open,u=s.high,d=s.low,h=s.close,p=a.type,f=a.styles,v=[];h>c?(v[0]=f.upColor,v[1]=f.upBorderColor,v[2]=f.upWickColor):hc?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.CandleDownStroke:b=c>h?e._createStrokeBar(l,y,r,v):e._createSolidBar(l,y,r,v);break;case V.Ohlc:var x=Math.min(Math.max(Math.round(.2*r.gapBar),1),7);b=[{name:"rect",attrs:{x:l-x/2,y:y[0],width:x,height:y[3]-y[0]},styles:{color:v[0]}},{name:"rect",attrs:{x:l-r.halfGapBar,y:g+x>y[3]?y[3]-x:g,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}},{name:"rect",attrs:{x:l+x/2,y:m+x>y[3]?y[3]-x:m,width:r.halfGapBar-x/2,height:x},styles:{color:v[0]}}];break}b.forEach(function(r){var a,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(a=e.createFigure(r,o))||void 0===a||a.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-.5,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,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-.5,y:e[0],width:1,height:e[1]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar+.5,y:e[1],width:i.gapBar-1,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}},{name:"rect",attrs:{x:t-.5,y:e[2],width:1,height:e[3]-e[2]},styles:{color:n[2]}}]},e}(kn),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),r=n.getAxisComponent();if(!r.isInCandle()){var a=t.getIndicatorStore().getInstances(n.getId());try{for(var o=j(a),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=Ft(c,"ohlc.upColor",u.ohlc.upColor),h=Ft(c,"ohlc.downColor",u.ohlc.downColor),p=Ft(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:V.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(f){e={error:f}}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(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=a.getXAxisPane().getAxisComponent(),l=r.getAxisComponent(),c=a.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(r.getId()),f=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 r=!1;if(null!==t.draw&&(e.save(),r=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:f,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!r){var a=t.result;i.eachChildren(function(n,r){var c,d,h,p=r.halfGapBar,v=r.gapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),b=s.convertToPixel(g+1),x=null!==(c=a[g-1])&&void 0!==c?c:{},_=null!==(d=a[g])&&void 0!==d?d:{},w=null!==(h=a[g+1])&&void 0!==h?h:{},C={x:y},S={x:m},k={x:b};t.figures.forEach(function(t){var e=t.key,i=x[e];Tt(i)&&(C[e]=l.convertToPixel(i));var n=_[e];Tt(n)&&(S[e]=l.convertToPixel(n));var r=w[e];Tt(r)&&(k[e]=l.convertToPixel(r))}),Xt(u,t,g,f,function(t,n){var a,c,u;if(It(_[t.key])){var d=S[t.key],h=null===(a=t.attrs)||void 0===a?void 0:a.call(t,{coordinate:{prev:C,current:S,next:k},bounding:o,barSpace:r,xAxis:s,yAxis:l});if(!It(h))switch(t.type){case"circle":h={x:m,y:d,r:p};break;case"rect":case"bar":var f=null!==(c=t.baseValue)&&void 0!==c?c:l.getRange().from,g=l.convertToPixel(f),y=Math.abs(g-d);f!==_[t.key]&&(y=Math.max(1,y));var b=void 0;b=d>g?g:d,h={x:m-p,y:b,width:v,height:y};break;case"line":Tt(S[t.key])&&Tt(k[t.key])&&(h={coordinates:[{x:S.x,y:S[t.key]},{x:k.x,y:k[t.key]}]});break}if(It(h)){var x=t.type;null===(u=i.createFigure({name:"bar"===x?"rect":x,attrs:h,styles:n}))||void 0===u||u.draw(e)}}})})}}}),e.restore()},e}(An),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=e.getBounding(),r=e.getPane().getChart().getChartStore(),a=r.getTooltipStore().getCrosshair(),o=r.getStyles().crosshair;if(Et(a.paneId)&&o.show){if(a.paneId===i.getId()){var s=a.y;this._drawLine(t,[{x:0,y:s},{x:n.width,y:s}],o.horizontal)}var l=a.realX;this._drawLine(t,[{x:l,y:0},{x:l,y:n.height}],o.vertical)}},e.prototype._drawLine=function(t,e,i){var n;if(i.show){var r=i.line;r.show&&(null===(n=this.createFigure({name:"line",attrs:{coordinates:e},styles:r}))||void 0===n||n.draw(t))}},e}(Cn),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundIconClickEvent=function(t,i){return function(){var n=e.getWidget().getPane();return n.getChart().getChartStore().getActionStore().execute(Pt.OnTooltipIconClick,X(X({},t),{iconId:i})),!0}},e._boundIconMouseMoveEvent=function(t,i){return function(){var n=e.getWidget().getPane(),r=n.getChart().getChartStore().getTooltipStore();return r.setActiveIcon(X(X({},t),{iconId:i})),!0}},e}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getTooltipStore().getCrosshair();if(It(r.kLineData)){var a=e.getBounding(),o=n.getCustomApi(),s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getIndicatorStore().getInstances(i.getId()),u=n.getTooltipStore().getActiveIcon(),d=n.getStyles().indicator;this.drawIndicatorTooltip(t,i.getId(),n.getDataList(),r,u,c,o,s,l,a,d)}},e.prototype.drawIndicatorTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d){var h=this,p=u.tooltip,f=0;if(this.isDrawTooltip(n,p)){var v=p.text,g=0,m=null!==d&&void 0!==d?d:0,y=0;a.forEach(function(a){var d=h.getIndicatorTooltipData(i,n,a,o,s,l,u),p=d.name,b=d.calcParamsText,x=d.values,_=d.icons,w=p.length>0,C=x.length>0;if(w||C){var S=q(h.classifyTooltipIcons(_),3),k=S[0],A=S[1],T=S[2],I=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,k,g,m,y),4),M=I[0],E=I[1],D=I[2],P=I[3];if(g=M,m=E,f+=P,y=D,w){var L=p;b.length>0&&(L="".concat(L).concat(b));var R=q(h.drawStandardTooltipLabels(t,c,[{title:{text:"",color:v.color},value:{text:L,color:v.color}}],g,m,y,v),4),F=R[0],B=R[1],N=R[2],O=R[3];g=F,m=B,f+=O,y=N}var z=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,A,g,m,y),4),W=z[0],$=z[1],H=z[2],V=z[3];if(g=W,m=$,f+=V,y=H,C){var K=q(h.drawStandardTooltipLabels(t,c,x,g,m,y,v),4),Y=K[0],X=K[1],U=K[2],G=K[3];g=Y,m=X,f+=G,y=U}var j=q(h.drawStandardTooltipIcons(t,c,{paneId:e,indicatorName:a.name,iconId:""},r,T,g,m,y),4),Z=j[1],J=j[2],Q=j[3];g=0,f+=Q,m=Z+J,y=0}})}return f},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,r,a,o,s){var l=this,c=a,u=o,d=0,h=0,p=0;return r.length>0&&(r.forEach(function(e){var i=e.marginLeft,n=e.marginTop,r=e.marginRight,a=e.marginBottom,o=e.paddingLeft,s=e.paddingTop,l=e.paddingRight,c=e.paddingBottom,u=e.size,p=e.fontFamily,f=e.icon;t.font=Ht(u,"normal",p),d+=i+o+t.measureText(f).width+l+r,h=Math.max(h,n+s+u+c+a)}),c+d>e.width?(c=r[0].marginLeft,u+=s,p=h):p=Math.max(0,h-s),r.forEach(function(e){var r,a=e.marginLeft,o=e.marginTop,s=e.marginRight,d=e.paddingLeft,h=e.paddingTop,p=e.paddingRight,f=e.paddingBottom,v=e.color,g=e.activeColor,m=e.size,y=e.fontFamily,b=e.icon,x=e.backgroundColor,_=e.activeBackgroundColor;c+=a;var w=(null===n||void 0===n?void 0:n.paneId)===i.paneId&&(null===n||void 0===n?void 0:n.indicatorName)===i.indicatorName&&(null===n||void 0===n?void 0:n.iconId)===e.id;null===(r=l.createFigure({name:"text",attrs:{text:b,x:c,y:u+o},styles:{paddingLeft:d,paddingTop:h,paddingRight:p,paddingBottom:f,color:w?g:v,size:m,family:y,backgroundColor:w?_:x}},{mouseClickEvent:l._boundIconClickEvent(i,e.id),mouseMoveEvent:l._boundIconMouseMoveEvent(i,e.id)}))||void 0===r||r.draw(t),c+=d+t.measureText(b).width+p+s})),[c,u,Math.max(s,h),p]},e.prototype.drawStandardTooltipLabels=function(t,e,i,n,r,a,o){var s=this,l=n,c=r,u=0,d=0,h=a;if(i.length>0){var p=o.marginLeft,f=o.marginTop,v=o.marginRight,g=o.marginBottom,m=o.size,y=o.family,b=o.weight;t.font=Ht(m,b,y),i.forEach(function(i){var n,r,a=i.title,o=i.value,x=t.measureText(a.text).width,_=t.measureText(o.text).width,w=x+_,C=m+f+g;l+p+w+v>e.width?(l=p,c+=C,d+=C):(l+=p,d+=Math.max(0,C-h)),u=Math.max(h,C),h=u,a.text.length>0&&(null===(n=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:a.text},styles:{color:a.color,size:m,family:y,weight:b}}))||void 0===n||n.draw(t),l+=x),null===(r=s.createFigure({name:"text",attrs:{x:l,y:c+f,text:o.text},styles:{color:o.color,size:m,family:y,weight:b}}))||void 0===r||r.draw(t),l+=_+v})}return[l,c,u,d]},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Et(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,r,a,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},f=e.dataIndex,v=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=v[f])&&void 0!==l?l:{};Xt(t,i,f,o,function(t,e){if(Et(t.title)){var o=e.color,s=m[t.key];Tt(s)&&(s=Nt(s,i.precision),i.shouldFormatBigNumber&&(s=n.formatBigNumber(s))),g.push({title:{text:t.title,color:o},value:{text:Wt(zt(null!==s&&void 0!==s?s:c.defaultValue,r),a),color:o}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),b=y.getPane(),x=b.getChart().getChartStore(),_=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:x.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:b.getChart().getXAxisPane().getAxisComponent(),yAxis:b.getAxisComponent()}),w=_.name,C=_.calcParamsText,S=_.values,k=_.icons;if(Et(w)&&c.showName&&(p.name=w),Et(C)&&c.showParams&&(p.calcParamsText=C),It(k)&&(p.icons=k),It(S)&&i.visible){var A=[],T=o.tooltip.text.color;S.forEach(function(t){var e={text:"",color:T};At(t.title)?e=t.title:e.text=t.title;var i={text:"",color:T};At(t.value)?i=t.value:i.text=t.value,i.text=Wt(zt(i.text,r),a),A.push({title:e,value:i})}),p.values=A}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case $.Left:e.push(t);break;case $.Middle:i.push(t);break;case $.Right:n.push(t);break}}),[e,i,n]},e}(Cn),En=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return B(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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(te,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(a.instance,e)),null===(r=o.onDrawing)||void 0===r||r.call(o,X({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 r,a,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(te,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(r=s.onDrawing)||void 0===r||r.call(s,X({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(a=s.onDrawEnd)||void 0===a||a.call(s,X({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 r,a=n.getProgressInstanceInfo();if(null!==a){var o=a.instance,s=a.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(te,"point_").concat(l);null===(r=o.onDrawEnd)||void 0===r||r.call(o,X({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(te,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var r=i.instance;if(r.isDrawing()){var a=r.points.length-1;return t._figureMouseRightClickEvent(r,1,"".concat(te,"point_").concat(a),a,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,r=n.getPressedInstanceInfo(),a=r.instance,o=r.figureIndex,s=r.figureKey;return null!==a&&(null===(e=a.onPressedMoveEnd)||void 0===e||e.call(a,X({overlay:a,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,r,a=n.getPressedInstanceInfo(),o=a.instance,s=a.figureType,l=a.figureIndex,c=a.figureKey;if(null!==o){if(!o.lock&&(null===(r=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,X({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===r||!r)){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,r,a){var o;if(!t.isDrawing()){var s=[];if(It(a)&&(Mt(a)?a&&(s=jt()):s=a),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,r),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,r),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,r),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,r),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,r)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,r)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,r)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,r)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,r)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,r))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,r){var a=this;return function(o){var s,l=a.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(a._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,X({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,r){var a=this;return function(o){var s=a.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:r},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,r){return function(e){var r;return null===(r=t.onDoubleClick)||void 0===r||r.call(t,X(X({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,r){var a=this;return function(e){var r,o;if(null===(o=null===(r=t.onRightClick)||void 0===r?void 0:r.call(t,X({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=a.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},r=this.getWidget().getPane(),a=r.getChart(),o=r.getId(),s=a.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=a.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=r.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Bi.CANDLE&&Tt(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var f=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var v=d.convertToPixel(p.high),g=d.convertFromPixel(v-f);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),b=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,r,s,l,a,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,r,a,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var r=this;i.forEach(function(i,a){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,f=r._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",a,u,c),v=X(X(X({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=r.createFigure({name:o,attrs:l,styles:v},f))||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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p){var f,v,g=this;if(e.needDefaultPointFigure&&((null===(f=h.instance)||void 0===f?void 0:f.id)===e.id&&0!==h.figureType||(null===(v=p.instance)||void 0===v?void 0:v.id)===e.id&&0!==p.figureType)){var m=e.styles,y=X(X({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var r,a,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(r=h.instance)||void 0===r?void 0:r.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(a=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(te,"point_").concat(n),n,0)))||void 0===a||a.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}(Cn),Dn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new Sn(n),n._indicatorView=new Tn(n),n._crosshairLineView=new In(n),n._tooltipView=n.createTooltipView(),n._overlayView=new En(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 B(e,t),e.prototype.getName=function(){return Ki.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Mn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(Qi),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),r=n.getPane(),a=r.getChart(),o=n.getBounding(),s=r.getAxisComponent(),l=a.getStyles().candle.area,c=[],u=[],d=Number.MAX_SAFE_INTEGER;this.eachChildren(function(t,e,i){var n=t.data,r=t.x,a=e.halfGapBar,h=null===n||void 0===n?void 0:n[l.value];if(Tt(h)){var p=s.convertToPixel(h);if(0===i){var f=r-a;u.push({x:f,y:o.height}),u.push({x:f,y:p}),c.push({x:f,y:p})}c.push({x:r,y:p}),u.push({x:r,y:p}),d=Math.min(d,p)}});var h=u.length;if(h>0){var p=u[h-1],f=p.x;c.push({x:f,y:p.y}),u.push({x:f,y:p.y}),u.push({x:f,y:o.height})}if(c.length>0&&(null===(e=this.createFigure({name:"line",attrs:{coordinates:c},styles:{color:l.lineColor,size:l.lineSize}}))||void 0===e||e.draw(t)),u.length>0){var v=l.backgroundColor,g=void 0;if(St(v)){var m=t.createLinearGradient(0,o.height,0,d);try{v.forEach(function(t){var e=t.offset,i=t.color;m.addColorStop(e,i)})}catch(y){}g=m}else g=v;null===(i=this.createFigure({name:"polygon",attrs:{coordinates:u},styles:{color:g}}))||void 0===i||i.draw(t)}},e}(kn),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),r=n.getStyles().candle.priceMark,a=r.high,o=r.low;if(r.show&&(a.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,f=0;this.eachChildren(function(t){var e=t.data,i=t.x;It(e)&&(de.low&&(p=e.low,f=i))});var v=u.convertToPixel(d),g=u.convertToPixel(p);a.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Wt(zt(Nt(d,c.price),s),l),{x:h,y:v},vp/2?(l=d-5,c=l-r.textOffset,u="right"):(l=d+5,u="left",c=l+r.textOffset);var f=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:f},{x:l,y:f}]},styles:{color:r.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:f,text:e,align:u,baseline:"middle"},styles:{color:r.color,size:r.textSize,family:r.textFamily,weight:r.textWeight}}))||void 0===s||s.draw(t)},e}(kn),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=a.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,f=c.convertToNicePixel(h),v=void 0;v=h>p?s.upColor:h0){var O=q(this.drawStandardTooltipLabels(t,n,x,_,w,C,m),4),z=O[0],W=O[1],$=O[2],H=O[3];_=z,w=W,y+=H,C=$}var V=q(this.drawStandardTooltipIcons(t,n,{paneId:i,indicatorName:"",iconId:""},a,T,_,w,C),4),K=V[0],Y=V[1],X=V[2],U=V[3];_=K,w=Y,y+=U,C=X}return y},e.prototype._drawRectTooltip=function(t,e,i,n,r,a,o,s,l,c,u,d,h,p,f,v){var g,m,y,b,x,_=this,w=f.candle,C=f.indicator,S=w.tooltip,k=C.tooltip;if(h||p){var A=null!==(g=a.dataIndex)&&void 0!==g?g:0,T=this._getCandleTooltipData({prev:null!==(m=e[A-1])&&void 0!==m?m:null,current:a.kLineData,next:null!==(y=e[A+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),I=S.text,M=I.marginLeft,E=I.marginRight,D=I.marginTop,P=I.marginBottom,L=I.size,R=I.weight,F=I.family,B=S.rect,N=B.position,z=B.paddingLeft,W=B.paddingRight,$=B.paddingTop,V=B.paddingBottom,Y=B.offsetLeft,X=B.offsetRight,U=B.offsetTop,G=B.offsetBottom,j=B.borderSize,q=B.borderRadius,Z=B.borderColor,J=B.color,Q=0,tt=0,et=0;h&&(t.font=Ht(L,R,F),T.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+M+E;Q=Math.max(Q,a)}),et+=(P+D+L)*T.length);var it=k.text,nt=it.marginLeft,rt=it.marginRight,at=it.marginTop,ot=it.marginBottom,st=it.size,lt=it.weight,ct=it.family,ut=[];if(p&&(t.font=Ht(st,lt,ct),i.forEach(function(i){var n,r=null!==(n=_.getIndicatorTooltipData(e,a,i,c,u,d,C).values)&&void 0!==n?n:[];ut.push(r),r.forEach(function(e){var i=e.title,n=e.value,r="".concat(i.text).concat(n.text),a=t.measureText(r).width+nt+rt;Q=Math.max(Q,a),et+=at+ot+st})})),tt+=Q,0!==tt&&0!==et){tt+=2*j+z+W,et+=2*j+$+V;var dt=n.width/2,ht=N===H.Pointer&&a.paneId===Bi.CANDLE,pt=(null!==(b=a.realX)&&void 0!==b?b:0)>dt,ft=0;if(ht){var vt=a.realX;ft=pt?vt-X-tt:vt+Y}else pt?(ft=Y,f.yAxis.inside&&f.yAxis.position===K.Left&&(ft+=r.width)):(ft=n.width-X-tt,f.yAxis.inside&&f.yAxis.position===K.Right&&(ft-=r.width));var gt=v+U;if(ht){var mt=a.y;gt=mt-et/2,gt+et>n.height-G&&(gt=n.height-G-et),gt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=_[c])&&void 0!==e?e:f.defaultValue),"{change}"===c&&(o.color=0===y?s.priceMark.last.noChangeColor:y>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:a,value:o}})},e}(Mn),Wn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Pn(n),n._candleHighLowPriceView=new Ln(n),n._candleLastPriceLineView=new Rn(n),n.addChild(n._candleBarView),n}return B(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==V.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t)):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new zn(this)},e}(Dn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this,n=this.getWidget(),r=n.getPane(),a=n.getBounding(),o=r.getAxisComponent(),s=this.getAxisStyles(r.getChart().getStyles());if(s.show){s.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(a,s),styles:s.axisLine}))||void 0===e||e.draw(t));var l=o.getTicks();if(s.tickLine.show){var c=this.createTickLines(l,a,s);c.forEach(function(e){var n;null===(n=i.createFigure({name:"line",attrs:e,styles:s.tickLine}))||void 0===n||n.draw(t)})}if(s.tickText.show){var u=this.createTickTexts(l,a,s);u.forEach(function(e){var n;null===(n=i.createFigure({name:"text",attrs:e,styles:s.tickText}))||void 0===n||n.draw(t)})}}},e}(Cn),Hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),r=e.axisLine.size;return i=n.isFromZero()?r/2:t.width-r,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),r=i.axisLine,a=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,r.show&&(o+=r.size),s=o+a.length):(o=e.width,r.show&&(o-=r.size),s=o-a.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(),r=i.axisLine,a=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,r.show&&(s+=r.size),a.show&&(s+=a.length)):(s=e.width-o.marginEnd,r.show&&(s-=r.size),a.show&&(s-=a.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),Vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=n.getChart().getChartStore(),o=a.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=a.getPrecision(),u=n.getAxisComponent(),d=a.getDataList(),h=a.getVisibleDataList(),p=d[d.length-1];if(It(p)){var f=p.close,v=p.open,g=u.convertToNicePixel(f),m=void 0;m=f>v?s.upColor:f1&&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,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(En),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),r=i.getBounding(),a=i.getPane().getChart().getChartStore(),o=a.getTooltipStore().getCrosshair(),s=a.getStyles().crosshair;if(Et(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,a,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,r,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,r,a=i,o=i.convertFromPixel(t.y);if(a.getType()===Y.Percentage){var s=e.getVisibleDataList(),l=null===(n=s[0])||void 0===n?void 0:n.data;r="".concat(((o-l.close)/l.close*100).toFixed(2),"%")}else{var c=e.getIndicatorStore().getInstances(t.paneId),u=0,d=!1;a.isInCandle()?u=e.getPrecision().price:c.forEach(function(t){u=Math.max(t.precision,u),d||(d=t.shouldFormatBigNumber)}),r=Nt(o,u),d&&(r=e.getCustomApi().formatBigNumber(r))}return Wt(zt(r,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,r,a){var o,s,l=r;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(Cn),Un=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Hn(n),n._candleLastPriceLabelView=new Vn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new Yn(n),n._crosshairHorizontalLabelView=new Xn(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),Gn=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,r=[];if(n>=0){var a=q(this._calcTickInterval(n),2),o=a[0],s=a[1],l=he(Math.ceil(e/o)*o,s),c=he(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);r[u]={text:h,coord:0,value:h},++u,d+=o}}return r},t.prototype._calcTickInterval=function(t){var e=de(t/8),i=pe(e);return[e,i]},t}(),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t,e,i,n,r,a=this.getParent(),o=a.getChart(),s=o.getChartStore(),l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,u=[],d=!1,h=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER,v=s.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;d||(d=null!==(e=t.shouldOhlc)&&void 0!==e&&e),f=Math.min(f,t.precision),Tt(t.minValue)&&(h=Math.min(h,t.minValue)),Tt(t.maxValue)&&(p=Math.max(p,t.maxValue)),u.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var g=4,m=this.isInCandle();if(m){var y=s.getPrecision().price;g=f!==Number.MAX_SAFE_INTEGER?Math.min(f,y):y}else f!==Number.MAX_SAFE_INTEGER&&(g=f);var b=s.getVisibleDataList(),x=o.getStyles().candle,_=x.type===V.Area,w=x.area.value,C=m&&!_||!m&&d;b.forEach(function(t){var e=t.dataIndex,i=t.data;if(It(i)&&(C&&(l=Math.min(l,i.low),c=Math.max(c,i.high)),m&&_)){var n=i[w];Tt(n)&&(l=Math.min(l,n),c=Math.max(c,n))}u.forEach(function(t){var i,n=t.figures,r=t.result,a=null!==(i=r[e])&&void 0!==i?i:{};n.forEach(function(t){var e=a[t.key];Tt(e)&&(l=Math.min(l,e),c=Math.max(c,e))})})}),l!==Number.MAX_SAFE_INTEGER&&c!==Number.MIN_SAFE_INTEGER?(l=Math.min(h,l),c=Math.max(p,c)):(l=0,c=10);var S,k=this.getType();switch(k){case Y.Percentage:var A=null===(t=b[0])||void 0===t?void 0:t.data;It(A)&&Tt(A.close)&&(l=(l-A.close)/A.close*100,c=(c-A.close)/A.close*100),S=Math.pow(10,-2);break;case Y.Log:l=ve(l),c=ve(c),S=.05*ge(-g);break;default:S=ge(-g)}if(l===c||Math.abs(l-c)=1&&(D/=M);var P=null!==(r=null===E||void 0===E?void 0:E.bottom)&&void 0!==r?r:.1;P>=1&&(P/=M);var L,R,F,B=Math.abs(c-l);return l-=B*P,c+=B*D,B=Math.abs(c-l),k===Y.Log?(L=ge(l),R=ge(c),F=Math.abs(R-L)):(L=l,R=c,F=B),{from:l,to:c,range:B,realFrom:L,realTo:R,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,r=this.getRange(),a=r.from,o=r.range,s=(t-a)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Bi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:Y.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===K.Left&&e||t.position===K.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,r=this.getParent(),a=null!==(i=null===(e=r.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=r.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(r.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,f=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),f||(f=t.shouldFormatBigNumber)});var v,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,r=n._innerConvertToPixel(+i);switch(c){case Y.Percentage:e="".concat(Nt(i,2),"%");break;case Y.Log:r=n._innerConvertToPixel(ve(+i)),e=Nt(i,p);break;default:e=Nt(i,p),f&&(e=s.formatBigNumber(i));break}e=Wt(zt(e,d),h);var o=Tt(v);r>g&&r2*g||!o)&&(l.push({text:e,coord:r,value:i}),v=r)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,r=n.size;if("auto"!==r)return r;var a=e.getChartStore(),o=a.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,Vt(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=a.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var f=2;if(this.getType()!==Y.Percentage)if(this.isInCandle()){var v=a.getPrecision().price,g=i.indicator.lastValueMark;f=g.show&&g.text.show?Math.max(h,v):v}else f=h;var m=Nt(this.getRange().to,f);p&&(m=o.formatBigNumber(m)),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+Vt(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,r=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),o=a.from,s=a.range,l=this.isReverse()?t/r:1-t/r,c=l*s+o;switch(this.getType()){case Y.Percentage:var u=this.getParent().getChart().getChartStore(),d=u.getVisibleDataList(),h=null===(n=d[0])||void 0===n?void 0:n.data;return It(h)&&Tt(h.close)?h.close*c/100+h.close:0;case Y.Log:return ge(c);default:return c}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===Y.Log&&(e=ge(t)),e},e.prototype.convertToPixel=function(t){var e,i=t;switch(this.getType()){case Y.Percentage:var n=this.getParent().getChart().getChartStore(),r=n.getVisibleDataList(),a=null===(e=r[0])||void 0===e?void 0:e.data;It(a)&&Tt(a.close)&&(i=(t-a.close)/a.close*100);break;case Y.Log:i=ve(t);break;default:i=t}return this._innerConvertToPixel(i)},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,r=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(r,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return B(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Gn),qn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Zn={default:jn.extend(qn)};function Jn(t){var e;return null!==(e=Zn[t])&&void 0!==e?e:Zn.default}var Qn=function(){function t(t,e,i,n){this._bounding=Zi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=ce("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}(),tr=function(t){function e(e,i,n,r,a){var o=t.call(this,e,i,n,r)||this;o._yAxisWidget=null,o._options={minHeight:Ri,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(a),o}return B(e,t),e.prototype.setOptions=function(t){var e,i,n,r,a,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Et(o)||!It(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Bi.X_AXIS?(r=this.getMainWidget().getContainer(),a="ew-resize"):(r=this.getYAxisWidget().getContainer(),a="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?r.style.cursor=a:r.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,r;wt(this.getBounding(),t);var a={};return It(t.height)&&(a.height=t.height),It(t.top)&&(a.top=t.top),this._mainWidget.setBounding(a),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(a),It(e)&&this._mainWidget.setBounding(e),It(i)&&(null===(r=this._yAxisWidget)||void 0===r||r.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,r=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),a=r.getContext("2d"),o=$t(r);r.width=i*o,r.height=n*o,a.scale(o,o);var s=this._mainWidget.getBounding();if(a.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();a.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return r},e.prototype.createYAxisWidget=function(t){return null},e}(Qn),er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createAxisComponent=function(t){var e=Jn(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Dn(t,this)},e.prototype.createYAxisWidget=function(t){return new Un(t,this)},e}(tr),ir=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.createMainWidget=function(t){return new Wn(t,this)},e}(er),nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t,e){var i=e.axisLine.size/2;return{coordinates:[{x:0,y:i},{x:t.width,y:i}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,r=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:r+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,r=i.axisLine.size,a=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:r+a+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(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,r,a,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,f=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),f=Math.max(f,e.x);var n=t.points[i];if(Tt(n.timestamp)){var o=a.formatDate(r,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:f-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,r,a,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:r,thousandsSeparator:a,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Yn),ar=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.compare=function(t){return It(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,r,a){var o,s=i.realX,l="center";return s-e/2-a.paddingLeft<0?(o=0,l="left"):s+e/2+a.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Xn),or=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new nr(n),n._overlayXAxisView=new rr(n),n._crosshairVerticalLabelView=new ar(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return B(e,t),e.prototype.getName=function(){return Ki.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}(Qi),sr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,r=i,a=n-1,o=n-i;return{from:r,to:a,range:o,realFrom:r,realTo:a,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),r=n.getChartStore(),a=r.getCustomApi().formatDate,o=[],s=t.length,l=r.getDataList();if(s>0){var c=r.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=Vt("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),f=1;if(s>1){var v=parseInt(t[1].value,10),g=this.convertToPixel(v),m=Math.abs(g-p);m(null!==e&&void 0!==e?e:20)&&(t.apply(this,arguments),i=n)}}var pr=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=hr(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 B(e,t),e.prototype.getName=function(){return Ki.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(),r=i.getBottomPane(),a=e<0;if(null!==n&&null!==r&&r.getOptions().dragEnabled){var o=void 0,s=void 0,l=void 0,c=void 0;a?(o=n,s=r,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=r,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(Pt.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(),r=n.getStyles().separator;return this.getContainer().style.background=r.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return ce("div",{width:"100%",height:"".concat(Yi,"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((Yi-n.size)/2),"px"),t.style.height="".concat(Yi,"px")}},e}(Ji),fr=function(t){function e(e,i,n,r,a,o){var s=t.call(this,e,i,n,r)||this;return s.getContainer().style.overflow="",s._topPane=a,s._bottomPane=o,s._separatorWidget=new pr(s.getContainer(),s),s}return B(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,r=this.getChart().getStyles().separator,a=ce("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=a.getContext("2d"),s=$t(a);return a.width=i*s,a.height=n*s,o.scale(s,s),o.fillStyle=r.color,o.fillRect(0,0,i,n),a},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}(Qn);function vr(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function gr(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var mr,yr=10,br=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=!gr(),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,r=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 a=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){r._target.removeEventListener("mousemove",a)},this._target.addEventListener("mousemove",a);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){r._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){r._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(!It(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!It(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,r=i.yOffset,a=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(a<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=r>=o&&!this._options.treatVertDragAsPageScroll(),l=o>r&&!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),r=i+n;return{xOffset:i,yOffset:n,manhattanDistance:r}},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),It(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),vr()){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),r=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",r)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",r,{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;vr()&&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}),gr()&&(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;(It(this._handler.pinchStartEvent)||It(this._handler.pinchEvent)||It(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&&It(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(X(X({},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]),It(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,It(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=!gr())},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 It(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 Ki.X_AXIS:case Ki.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),r=i.getName();switch(r){case Ki.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var a=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(a>0?a:1)*20;if(a<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=Ui(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(Gi(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Ki.X_AXIS:case Ki.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,r=!1;if(null!==n){var a=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",a);if(n.getName()===Ki.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,!0),r=!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()},!0),r=!0),this._touchCancelCrosshair=!1)}(r||o)&&this._chart.updatePane(1)}return r},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()===Ki.MAIN){var r=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:r.x,y:r.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:r.x,y:r.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,r,a=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=j(s),u=c.next();!u.done;u=c.next()){var d=q(u.value,2),h=d[1],p=h.getBounding(),f=p.top-Math.round((Yi-l)/2);if(a>=p.left&&a<=p.left+p.width&&o>=f&&o<=f+Yi)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 v=this._chart.getAllDrawPanes(),g=null;try{for(var m=j(v),y=m.next();!y.done;y=m.next()){var b=y.value;p=b.getBounding();if(a>=p.left&&a<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=b;break}}}catch(A){n={error:A}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var x=null;if(null!==g){if(null===x){var _=g.getMainWidget(),w=_.getBounding();a>=w.left&&a<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(x=_)}if(null===x){var C=g.getYAxisWidget();if(null!==C){var S=C.getBounding();a>=S.left&&a<=S.left+S.width&&o>=S.top&&o<=S.top+S.height&&(x=C)}}}return{pane:g,widget:x}},t.prototype._makeWidgetEvent=function(t,e){var i,n,r,a=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return X(X({},t),{x:t.x-(null!==(n=null===a||void 0===a?void 0:a.left)&&void 0!==n?n:0),y:t.y-(null!==(r=null===a||void 0===a?void 0:a.top)&&void 0!==r?r: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"})(mr||(mr={}));var _r=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new xr(this._chartContainer,this),this._chartStore=new Vi(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=ce("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"}],r=!1,a=!1,o=function(t){if(!a){var e=i._createPane(dr,Bi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,a=!0}};n.forEach(function(t){var e,n,a;switch(t.type){case"candle":if(!r){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Bi.CANDLE});var l=i._createPane(ir,Bi.CANDLE,s);i._candlePane=l;var c=null!==(n=t.content)&&void 0!==n?n:[];c.forEach(function(t){i.createIndicator(t,!0,s)}),r=!0}break;case"indicator":var u;c=null!==(a=t.content)&&void 0!==a?a:[];if(c.length>0)c.forEach(function(e){It(u)?i.createIndicator(e,!0,{id:u}):u=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options)}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,r=null,a=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];It(s)&&(a=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=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];"bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)&&(a=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),r=l)}}if(It(a)||(a=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),It(r)?(this._drawPanes.splice(r,0,a),n=r):(this._drawPanes.push(a),n=this._drawPanes.length-1),a.getId()!==Bi.X_AXIS){var d=this._drawPanes[n+1];if(It(d)&&d.getId()===Bi.X_AXIS&&(d=this._drawPanes[n+2]),It(d)){var h=this._separatorPanes.get(d);It(h)?h.setTopPane(a):(h=new fr(this._chartContainer,d.getContainer(),this,"",a,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(It(p)&&p.getId()===Bi.X_AXIS&&(p=this._drawPanes[n-2]),It(p)){h=new fr(this._chartContainer,a.getContainer(),this,"",p,a);this._separatorPanes.set(a,h)}}return a},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,r=this._xAxisPane.getAxisComponent().getAutoSize(),a=i-r-this._separatorPanes.size*n;a<0&&(a=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Bi.CANDLE&&t.getId()!==Bi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;ea?(o=a,e=Math.max(a-o,0)):o+=e,t.setBounding({height:e})}});var s=a-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:r});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);It(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,r=n.position===K.Left,a=!n.inside,o=0,s=Number.MIN_SAFE_INTEGER,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Bi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),a?(o=e-s,r?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=r?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},f=i.separator.fill;u=a&&!f?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(Et(t.id)){var r=this.getDrawPaneById(t.id),a=!1;if(null!==r){var o=e;if(t.id!==Bi.CANDLE&&Tt(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:r.getOptions().minHeight,0),l=Math.max(s,t.height);r.setBounding({height:l}),o=!0,a=!0}(Et(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||It(t.gap))&&(o=!0),r.setOptions(t),o&&this.adjustPaneViewport(a,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Bi.CANDLE)return this._candlePane;if(t===Bi.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.getCandlePane=function(){return this._candlePane},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,r){t&&this._measurePaneHeight();var a=e,o=null!==n&&void 0!==n&&n,s=null!==r&&void 0!==r&&r;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);a||(a=e)}),a&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(It(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(Pt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var r=i.getId(),a={},o=e._chartStore.getIndicatorStore().getInstances(r);o.forEach(function(e){var i,n=e.result;a[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[r]=a}),Et(t.paneId)&&i.execute(Pt.OnCrosshairChange,X(X({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Et(t))return this._chartContainer;var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getContainer();case mr.Main:return r.getMainWidget().getContainer();case mr.YAxis:return null!==(n=null===(i=r.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(!It(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var r=this.getDrawPaneById(t);if(null!==r){var a=null!==e&&void 0!==e?e:mr.Root;switch(a){case mr.Root:return r.getBounding();case mr.Main:return r.getMainWidget().getBounding();case mr.YAxis:return null!==(n=null===(i=r.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=Et(t)?Hi(t):t,It(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?bt("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?bt("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?bt("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?bt("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){It(i)&&bt("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!0,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){bt("","","Api `applyMoreData` has been deprecated since version 9.8.0.");var n=t.concat(this._chartStore.getDataList());this._chartStore.addData(n,!1,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){It(e)&&bt("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,!1).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){bt("","","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 r,a=this,o=Et(t)?{name:t}:t;if(null===Qe(o.name))return bt("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;a._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=le(Bi.INDICATOR));var c=this._createPane(er,s,null!==i&&void 0!==i?i:{}),u=null!==(r=null===i||void 0===i?void 0:i.height)&&void 0!==r?r:Fi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){a.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=q(t,2),r=e[0],a=e[1];(r||a)&&(n.adjustPaneViewport(!1,a,!0,a),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,r,a=this._chartStore.getIndicatorStore(),o=a.removeInstance(t,e);if(o){var s=!1;if(t!==Bi.CANDLE&&!a.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(It(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=j(this._separatorPanes),p=h.next();!p.done;p=h.next()){var f=p.value;if(f[1].getTopPane().getId()===l.getId()){f[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 v=this._drawPanes[0];It(v)&&v.getId()===Bi.X_AXIS&&(v=this._drawPanes[1]),null===(r=this._separatorPanes.get(v))||void 0===r||r.destroy(),this._separatorPanes.delete(v)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Et(t))i=[{name:t}];else if(St(t))i=t.map(function(t){return Et(t)?{name:t}:t});else{var n=t;i=[n]}var r=!0;It(e)&&null!==this.getDrawPaneById(e)||(e=Bi.CANDLE,r=!1);var a=this._chartStore.getOverlayStore().addInstances(i,e,r);return St(t)?a:a[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;It(t)&&(e=Et(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=Tt(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(i>0){n.startScroll();var r=(new Date).getTime(),a=function(){var e=((new Date).getTime()-r)/i,o=e>=1,s=o?t:t*e;n.scroll(s),o||requestAnimationFrame(a)};a()}else n.startScroll(),n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,r=n*i;this.scrollByDistance(r,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=ue(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Tt(i)&&i>0?i:0,r=this._chartStore.getTimeScaleStore();if(n>0){var a=r.getBarSpace().bar,o=a*t,s=o-a,l=(new Date).getTime(),c=function(){var t=((new Date).getTime()-l)/n,i=t>=1,o=i?s:s*t;r.zoom(o/a,e),i||requestAnimationFrame(c)};c()}else r.zoom(t,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=ue(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Tt(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Tt(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 St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,r=void 0===n?Bi.CANDLE:n,a=e.absolute,o=void 0!==a&&a,s=[];if(r!==Bi.X_AXIS){var l=this.getDrawPaneById(r);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(Tt(t.x)){var r=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=r,n.timestamp=null!==(i=c.dataIndexToTimestamp(r))&&void 0!==i?i:void 0}if(Tt(t.y)){var a=o?t.y-u.top:t.y;n.value=p.convertFromPixel(a)}return n})}}return St(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Pt.OnCrosshairChange:var n=X({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Bi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n);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,r=this._chartContainer.clientWidth,a=this._chartContainer.clientHeight,o=ce("canvas",{width:"".concat(r,"px"),height:"".concat(a,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=$t(o);o.width=r*l,o.height=a*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,r,a);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(It(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var a=t.getBounding();s.drawImage(t.getImage(c),0,a.top,r,a.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}(),wr=new Map,Cr=1;function Sr(t,e){var i;if(_t(),i=Et(t)?document.getElementById(t):t,null===i)return xt("","","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=wr.get(i.id);if(It(n))return bt("","","The chart has been initialized on the dom!!!"),n;var r="k_line_chart_".concat(Cr++);return n=new _r(i,e),n.id=r,i.setAttribute("k-line-chart-id",r),wr.set(r,n),n}var kr=i(21396),Ar=i.n(kr);function Tr(t,e,i,n){if(!t||!e||!i||!n)return t;try{var r=Ar().enc.Base64.parse(t),a=Ar().lib.WordArray.create(r.words.slice(0,4)),o=Ar().lib.WordArray.create(r.words.slice(4)),s=Ar().enc.Base64.parse(n),l=Ar().AES.decrypt({ciphertext:o},s,{iv:a,mode:Ar().mode.CBC,padding:Ar().pad.Pkcs7}),c=l.toString(Ar().enc.Utf8);return c||t}catch(u){return t}}function Ir(t,e){return Mr.apply(this,arguments)}function Mr(){return Mr=(0,c.A)((0,l.A)().m(function t(e,i){var n,r;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,f.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,r=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(r.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Mr.apply(this,arguments)}function Er(t,e,i){return Dr.apply(this,arguments)}function Dr(){return Dr=(0,c.A)((0,l.A)().m(function t(e,i,n){var r;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ir(i,n);case 1:return r=t.v,t.a(2,Tr(e,i,n,r))}},t)})),Dr.apply(this,arguments)}function Pr(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 Lr={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)([]),r=(0,h.KR)(!1),a=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,v=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),x=(0,h.KR)(5e3),_=(0,h.KR)(!1),w=(0,h.KR)(1e4),C=(0,h.KR)(0),S=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||!C.value||e-C.value>=i)&&(C.value=e,_t())}},k=(0,h.KR)([]),A=(0,h.KR)([]),T=(0,h.KR)([]),I=(0,h.KR)(null),M=(0,h.nI)(),E=M.proxy,D=(0,h.EW)(function(){return[{name:"line",title:E.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:E.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:E.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:E.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:E.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:E.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:E.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:E.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:E.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"}]}),F=(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}}]),B=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"},i=e[t]||t;if(I.value!==t){I.value=t;try{var n={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(n);r?T.value.push(r):I.value=null}catch(a){I.value=null}}else{I.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(o){}}}},O=function(){if(g.value)try{T.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){}}),T.value=[],I.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=B(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})}},W=(0,h.KR)(null),$=(0,h.KR)(!1),H=(0,h.KR)(!1),V=(0,h.KR)(!1),K=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#131722",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2e39",gridLineColor:"#1f2943",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:"#2a2e39",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#1f2943"}:{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"}}),Y=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},X=function(){return new Promise(function(t,e){if(window.pyodide)return W.value=window.pyodide,H.value=!0,void t(window.pyodide);$.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},r="/assets/pyodide/v".concat(i,"/full/"),a="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||r),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||a),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 r=document.createElement("script");r.dataset.pyodideSrc=t,r.src=t,r.onload=function(){return e()},r.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(r)})},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:W.value=window.pyodide,H.value=!0,$.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){$.value=!1,V.value=!0,e(t)})})},U=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(),r=parseFloat(i[1].trim());isNaN(r)||(e[n]=r)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},G=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,s,c,u,d,h,p,f,v,g,m,y,b,x,_,w,C,S=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(r=S.length>2&&void 0!==S[2]?S[2]:{},a=S.length>3&&void 0!==S[3]?S[3]:{},H.value&&W.value){e.n=5;break}if(!$.value){e.n=4;break}s=0;case 1:if(!($.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||!W.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&W.value){e.n=5;break}throw $.value?($.value=!1,V.value=!0):V.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=a.is_encrypted||a.isEncrypted||0,!u&&!Pr(i,u)){e.n=11;break}if(d=a.user_id||a.userId||t.userId||r.userId,h=a.originalId||a.id||r.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Er(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,_=e.v,new Error("代码解密失败,无法执行指标: "+(_.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}}),f=JSON.stringify(p),v=JSON.stringify(r||{}),g=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=v.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,W.value.runPythonAsync(y);case 12:if(b=e.v,b&&"string"===typeof b){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(b)));case 13:e.p=13,x=JSON.parse(b),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(x){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return x.plots&&Array.isArray(x.plots)||(x.plots=[]),x.plots=x.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}),x.signals&&Array.isArray(x.signals)&&(x.signals=x.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})),x.calculatedVars||(x.calculatedVars={}),e.a(2,x);case 17:throw e.p=17,C=e.v,new Error("Python 执行失败: ".concat(C.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 j(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?r+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var f=[],v=[],g=[],m=0;m=e-1){var w=f[m],C=v[m],S=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(C/w*100),n.push(S/w*100)),m>=e-1){var k=i[m]+n[m],A=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)r.push(A);else if(m===e){var T=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;r.push((T+A)/2)}else r.push((r[m-1]*(e-1)+A)/e)}}}return{adx:r,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=f+2*p,b=(null===(i=a.extendData)||void 0===i?void 0:i.side)||(null===(n=a.extendData)||void 0===n?void 0:n.type)||"buy",x="buy"===b,_=x?u:u-y,w=d,C=w,S=x?_:_+y;return[{type:"line",attrs:{coordinates:[{x:c,y:C},{x:c,y:S}]},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:_,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:_+y/2,text:v,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:f,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}});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],r=e.close.toFixed(2),a=(e.close-n.close)/n.close*100;i("price-change",{price:r,change:a})}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),r=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&n.getMinutes()===r.getMinutes();case"5m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(r.getMinutes()/5);case"15m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(r.getMinutes()/15);case"30m":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(r.getMinutes()/30);case"1H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&n.getHours()===r.getHours();case"4H":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()&&Math.floor(n.getHours()/4)===Math.floor(r.getHours()/4);case"1D":return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate();case"1W":var a=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((r.getTime()-new Date(r.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===r.getFullYear()&&a===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,v,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(!r.value||i){e.n=2;break}return e.a(2);case 2:return r.value=!0,a.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,f.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=E.$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&&_t()},100)}}else mt();t.realtimeEnabled&&(gt(),vt())}),e.n=12;break;case 11:if(e.p=11,v=e.v,a.value=E.$t("dashboard.indicator.error.loadDataFailed")+": "+(v.message||E.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,r.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 r,a,o,c,d,v;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,r=Math.floor(i/1e3),e.n=2,(0,f.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:r}});case 2:if(a=e.v,1!==a.code||!a.data||!Array.isArray(a.data)){e.n=5;break}if(o=st(a.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&&(r=st(i.data),a=(0,R.A)(n.value),r.length>0&&(o=Math.floor(r[r.length-1].timestamp/1e3),s=Math.floor(a[a.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=a[a.length-1],u=r[r.length-1],a[a.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=a,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(a[h]),S(!1)):g.value&&(g.value.applyNewData(n.value),S(!1))):o>s&&(p=r.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!a.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,R.A)(a),(0,R.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),v=ct(n.value),lt(v),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),S(!0)):g.value&&(g.value.applyNewData(n.value),S(!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)}}(),vt=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;x.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!r.value&&t.symbol&&n.value&&n.value.length>0&&ft()},x.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=Sr(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Sr(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)),bt(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(I.value&&t&&t.id){T.value.push(t.id),I.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){I.value&&t&&t.id&&(T.value.push(t.id),I.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=T.value.indexOf(t);e>-1&&T.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,r=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,o,c,d,h,f;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(r){t.n=1;break}return i=e.from,r=!0,setTimeout(function(){v.value=!0},1e3),t.a(2);case 1:if(v.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&&(a=n.value.length,a>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*a/100),d=.1,h=Math.min(100,d+c/a*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&v.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 f=n.value[0].timestamp,t.n=4,ht(f);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(b){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){_t()})}}window.addEventListener("resize",yt)}catch(a){a.value=E.$t("dashboard.indicator.error.chartInitFailed")+": "+(a.message||"未知错误")}}else{var d=0,f=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},bt=function(){if(g.value){var t=K.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:[E.$t("dashboard.indicator.tooltip.time"),E.$t("dashboard.indicator.tooltip.open"),E.$t("dashboard.indicator.tooltip.high"),E.$t("dashboard.indicator.tooltip.low"),E.$t("dashboard.indicator.tooltip.close"),E.$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}})}},xt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:r,series:a?"price":"normal"};return Je(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},_t=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,r,a,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!_.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:_.value=!0,e.p=3;try{A.value.length>0&&g.value&&(A.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){}}),A.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),r=(0,l.A)().m(function e(){var n,r,a,s,c,u,d,h,p,f,v,m,y,x,_,w,C,S,T,I,M,E,D,P,F,B,N,O,z,W,H,K,X,U,st,lt,ct,ut,dt,ht,pt,ft,vt,gt,mt,yt,bt,_t,wt,Ct,St,kt,At,Tt,It,Mt,Et,Dt,Pt,Lt,Rt,Ft,Bt,Nt,Ot,zt,Wt,$t,Ht,Vt,Kt,Yt,Xt,Ut,Gt,jt,qt,Zt,Jt,Qt,te,ee,ie,ne,re,ae,oe,se,le,ce,ue,de,he,pe,fe,ve,ge,me,ye,be,xe,_e,we,Ce,Se,ke,Ae,Te,Ie,Me,Ee,De,Pe,Le,Re,Fe,Be,Ne,Oe,ze,We,$e,He,Ve,Ke,Ye,Xe,Ue,Ge,je,qe,Ze,Je,Qe,ti,ei,ii,ni,ri,ai,oi,si,li,ci,ui,di,hi,pi,fi,vi,gi,mi,yi,bi;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(r=e.v,a=[],r&&r.plots&&Array.isArray(r.plots)&&(a=(0,R.A)(r.plots)),!(r&&r.signals&&Array.isArray(r.signals))){e.n=14;break}s=(0,b.A)(r.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){E=(0,b.A)(f);try{for(E.s();!(D=E.n()).done;){P=D.value;try{F=P.timestamp,F<1e10&&(F*=1e3),B=P.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:F,value:P.price},{timestamp:F,value:P.anchorPrice}],extendData:{text:B,color:P.color,side:P.side,action:P.action,price:P.price},lock:!0},"candle_pane"),N&&A.value.push(N))}catch(l){}}}catch(xi){E.e(xi)}finally{E.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(a.length>0&&(O=a.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],W={},H=0;H0)){e.n=23;break}for(_t=[],wt=0;wt0&&g.value){Bt=(0,b.A)(St);try{for(Bt.s();!(Nt=Bt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Wt=Ot.text,"function"===typeof g.value.createOverlay&&($t=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Wt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),$t&&A.value.push($t))}catch(l){}}}catch(xi){Bt.e(xi)}finally{Bt.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(Vt=[],Kt={},Yt=0;Yt0&&(0,h.dY)(function(){g.value&&_t()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?vt():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,X();case 3:e.n=5;break;case 4:e.p=4,e.v,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:r,error:a,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:K,getIndicatorColor:Y,handleRetry:wt,loadingPython:$,pythonReady:H,pyodideLoadFailed:V,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:ft,startRealtime:vt,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:bt,updateIndicators:_t,executePythonStrategy:G,parsePythonStrategy:U,indicatorButtons:F,isIndicatorActive:B,toggleIndicator:z,drawingTools:D,activeDrawingTool:I,selectDrawingTool:N,clearAllDrawings:O}}},Rr=Lr,Fr=(0,T.A)(Rr,E,D,!1,null,"466e34db",null),Br=Fr.exports,Nr=function(){var t=this,e=t._self._c;return e("a-modal",{staticClass:"backtest-modal",attrs:{title:t.$t("dashboard.indicator.backtest.title"),visible:t.visible,width:1100,maskClosable:!1},on:{cancel:t.handleCancel}},[e("div",{staticClass:"backtest-content"},[e("a-steps",{staticStyle:{"margin-bottom":"16px"},attrs:{current:t.currentStep,size:"small"}},[e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.strategy.title"),description:t.$t("dashboard.indicator.backtest.steps.strategy.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.trading.title"),description:t.$t("dashboard.indicator.backtest.steps.trading.desc")}}),e("a-step",{attrs:{title:t.$t("dashboard.indicator.backtest.steps.results.title"),description:t.$t("dashboard.indicator.backtest.steps.results.desc")}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2!==t.currentStep,expression:"currentStep !== 2"}],staticClass:"config-section"},[e("a-form",{attrs:{form:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[e("div",{directives:[{name:"show",rawName:"v-show",value:0===t.currentStep,expression:"currentStep === 0"}]},[e("a-collapse",{staticStyle:{background:"#fafafa"},attrs:{bordered:!1},model:{value:t.step1CollapseKeys,callback:function(e){t.step1CollapseKeys=e},expression:"step1CollapseKeys"}},[e("a-collapse-panel",{key:"risk",attrs:{header:t.$t("dashboard.indicator.backtest.panel.risk")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.stopLossPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stopLossPct",{initialValue:0}],expression:"['stopLossPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["takeProfitPct",{initialValue:0}],expression:"['takeProfitPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailingEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrailingToggle}})],1)],1),e("a-col",{attrs:{span:12}})],1),t.trailingEnabledUi?[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingStopPct",{initialValue:0}],expression:"['trailingStopPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailingActivationPct",{initialValue:0}],expression:"['trailingActivationPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:t._e()],2),e("a-collapse-panel",{key:"scale",attrs:{header:t.$t("dashboard.indicator.backtest.panel.scale")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onTrendAddToggle}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['dcaAddEnabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:t.onDcaAddToggle}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddStepPct",{initialValue:0}],expression:"['trendAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddStepPct",{initialValue:0}],expression:"['dcaAddStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddSizePct",{initialValue:0}],expression:"['trendAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddSizePct",{initialValue:0}],expression:"['dcaAddSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:t.onScaleParamsChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendAddMaxTimes",{initialValue:0}],expression:"['trendAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dcaAddMaxTimes",{initialValue:0}],expression:"['dcaAddMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:t.onScaleParamsChange}})],1)],1)],1)],1),e("a-collapse-panel",{key:"reduce",attrs:{header:t.$t("dashboard.indicator.backtest.panel.reduce")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['trendReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[e("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceEnabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverseReduceEnabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceStepPct",{initialValue:0}],expression:"['trendReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceStepPct",{initialValue:0}],expression:"['adverseReduceStepPct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceSizePct",{initialValue:0}],expression:"['trendReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceSizePct",{initialValue:0}],expression:"['adverseReduceSizePct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trendReduceMaxTimes",{initialValue:0}],expression:"['trendReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverseReduceMaxTimes",{initialValue:0}],expression:"['adverseReduceMaxTimes', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),e("a-collapse-panel",{key:"position",attrs:{header:t.$t("dashboard.indicator.backtest.panel.position")}},[e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.entryPct"),help:t.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(t.entryPctMaxUi||0).toFixed(0)})}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entryPct",{initialValue:100}],expression:"['entryPct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:t.entryPctMaxUi,step:.1,precision:4},on:{change:t.onEntryPctChange}})],1)],1),e("a-col",{attrs:{span:12}})],1)],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:1===t.currentStep,expression:"currentStep === 1"}]},[e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:t.combinedAlertType,"show-icon":""}},[e("template",{slot:"message"},[e("div",{staticStyle:{display:"flex","align-items":"center","flex-wrap":"wrap",gap:"8px"}},[e("span",[e("strong",[t._v("Symbol:")]),t._v(" "+t._s(t.symbol||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Market:")]),t._v(" "+t._s(t.market||"-")+" "),e("span",{staticStyle:{color:"#999",margin:"0 6px"}},[t._v("|")]),e("strong",[t._v("Timeframe:")]),t._v(" "+t._s(t.selectedTimeframe||t.timeframe||"-")+" ")]),t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"high"===t.precisionInfo.precision?"thunderbolt":"clock-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.precisionMode"))+": "),e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"high"===t.precisionInfo.precision?"green":"blue",size:"small"}},[t._v(" "+t._s(t.precisionInfo.timeframe)+" ")]),e("span",{staticStyle:{color:"#666","margin-left":"6px"}},[t._v(" ("+t._s(t.$t("dashboard.indicator.backtest.estimatedCandles",{count:t.precisionInfo.estimated_candles?t.precisionInfo.estimated_candles.toLocaleString():"-"}))+") ")])],1):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"margin-left":"12px","border-left":"1px solid #d9d9d9","padding-left":"12px",color:"#faad14"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"warning"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.standardModeWarning"))+" ")],1):t._e()])]),e("template",{slot:"description"},[t.precisionInfo&&t.precisionInfo.enabled?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s("high"===t.precisionInfo.precision?t.$t("dashboard.indicator.backtest.highPrecisionDesc"):t.$t("dashboard.indicator.backtest.mediumPrecisionDesc"))+" ")]):t.precisionInfo&&!t.precisionInfo.enabled&&t.market&&"crypto"===t.market.toLowerCase()?e("span",{staticStyle:{"font-size":"12px",color:"#888"}},[t._v(" "+t._s(t.precisionInfo.message||t.$t("dashboard.indicator.backtest.standardModeDesc"))+" ")]):t._e()])],2),e("div",{staticClass:"date-quick-select",staticStyle:{"margin-bottom":"12px"}},[e("span",{staticStyle:{"margin-right":"8px",color:"#666","font-size":"13px"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.quickSelect")||"快速选择")+":")]),e("a-button-group",{attrs:{size:"small"}},t._l(t.datePresets,function(i){return e("a-button",{key:i.key,attrs:{type:t.selectedDatePreset===i.key?"primary":"default"},on:{click:function(e){return t.applyDatePreset(i)}}},[t._v(t._s(i.label))])}),1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.startDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["startDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.startDateRequired")}],initialValue:t.defaultStartDate}],expression:"['startDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.startDateRequired') }], initialValue: defaultStartDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledStartDate,placeholder:t.$t("dashboard.indicator.backtest.selectStartDate")},on:{change:t.onDateChange}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.endDate")}},[e("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["endDate",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.endDateRequired")}],initialValue:t.defaultEndDate}],expression:"['endDate', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.endDateRequired') }], initialValue: defaultEndDate }]"}],staticStyle:{width:"100%"},attrs:{"disabled-date":t.disabledEndDate,placeholder:t.$t("dashboard.indicator.backtest.selectEndDate")},on:{change:t.onDateChange}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.initialCapital")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initialCapital",{rules:[{required:!0,message:t.$t("dashboard.indicator.backtest.initialCapitalRequired")}],initialValue:1e4}],expression:"['initialCapital', { rules: [{ required: true, message: $t('dashboard.indicator.backtest.initialCapitalRequired') }], initialValue: 10000 }]"}],staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.commission")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission",{initialValue:.02}],expression:"['commission', { initialValue: 0.02 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}}),e("div",{staticClass:"field-hint"},[t._v(t._s(t.$t("dashboard.indicator.backtest.commissionHint")))])],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.field.slippage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["slippage",{initialValue:0}],expression:"['slippage', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.leverage")}},[e("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:1}],expression:"['leverage', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}}})],1)],1)],1),e("a-row",{attrs:{gutter:24}},[e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.tradeDirection")}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["tradeDirection",{initialValue:"long"}],expression:"['tradeDirection', { initialValue: 'long' }]"}],staticStyle:{width:"100%"}},[e("a-select-option",{attrs:{value:"long"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.longOnly"))+" ")]),e("a-select-option",{attrs:{value:"short"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.shortOnly"))+" ")]),e("a-select-option",{attrs:{value:"both"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.both"))+" ")])],1)],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-item",{attrs:{label:t.$t("dashboard.indicator.backtest.timeframe")}},[e("a-select",{staticStyle:{width:"100%"},on:{change:t.onTimeframeChange},model:{value:t.selectedTimeframe,callback:function(e){t.selectedTimeframe=e},expression:"selectedTimeframe"}},[e("a-select-option",{attrs:{value:"1m"}},[t._v("1m")]),e("a-select-option",{attrs:{value:"5m"}},[t._v("5m")]),e("a-select-option",{attrs:{value:"15m"}},[t._v("15m")]),e("a-select-option",{attrs:{value:"30m"}},[t._v("30m")]),e("a-select-option",{attrs:{value:"1H"}},[t._v("1H")]),e("a-select-option",{attrs:{value:"4H"}},[t._v("4H")]),e("a-select-option",{attrs:{value:"1D"}},[t._v("1D")]),e("a-select-option",{attrs:{value:"1W"}},[t._v("1W")])],1)],1)],1)],1)],1)])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2===t.currentStep&&t.hasResult,expression:"currentStep === 2 && hasResult"}],staticClass:"result-section"},[t.backtestRunId?e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"success","show-icon":"",message:t.$t("dashboard.indicator.backtest.savedRunId",{id:t.backtestRunId})}}):t._e(),e("div",{staticClass:"metrics-cards"},[e("div",{staticClass:"metric-card",class:{positive:t.result.totalReturn>0,negative:t.result.totalReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.totalReturn)))]),e("div",{staticClass:"metric-amount"},[t._v(t._s(t.formatMoney(t.result.totalProfit)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.annualReturn>0,negative:t.result.annualReturn<0}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.sharpeRatio")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.sharpeRatio.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.result.winRate)))])]),e("div",{staticClass:"metric-card",class:{positive:t.result.profitFactor>=1.5,negative:t.result.profitFactor<1}},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.profitFactor.toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.result.totalTrades))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("dashboard.indicator.backtest.totalCommission")))]),e("div",{staticClass:"metric-value"},[t._v("-$"+t._s(t.result.totalCommission?t.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.equityCurve")))]),e("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),e("div",{staticClass:"trades-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("dashboard.indicator.backtest.tradeHistory")))]),e("a-table",{attrs:{columns:t.tradeColumns,"data-source":t.result.trades,pagination:{pageSize:5,size:"small"},size:"small",scroll:{x:600}},scopedSlots:t._u([{key:"type",fn:function(i){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(i)}},[t._v(" "+t._s(t.getTradeTypeText(i))+" ")])]}},{key:"balance",fn:function(i){return[e("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[t._v(" $"+t._s(i?i.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(i){return[e("span",{style:{color:i>0?"#52c41a":i<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatMoney(i))+" ")])]}}])})],1)],1),t.loading?e("div",{staticClass:"loading-overlay"},[e("div",{staticClass:"loading-content"},[e("div",{staticClass:"loading-animation"},[e("div",{staticClass:"chart-bars"},[e("div",{staticClass:"bar bar1"}),e("div",{staticClass:"bar bar2"}),e("div",{staticClass:"bar bar3"}),e("div",{staticClass:"bar bar4"}),e("div",{staticClass:"bar bar5"})])]),e("div",{staticClass:"loading-text"},[t._v(t._s(t.$t("dashboard.indicator.backtest.running")))]),e("div",{staticClass:"loading-subtext"},[t._v(t._s(t.loadingTip))])])]):t._e()],1),e("template",{slot:"footer"},[e("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center",width:"100%"}},[e("div",[t.currentStep>0?e("a-button",{attrs:{disabled:t.loading},on:{click:t.handlePrev}},[t._v(t._s(t.$t("dashboard.indicator.backtest.prev")))]):t._e()],1),e("div",[e("a-button",{attrs:{disabled:t.loading},on:{click:t.handleCancel}},[t._v(t._s(t.$t("dashboard.indicator.backtest.close")))]),t.currentStep<1?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleNext}},[t._v(t._s(t.$t("dashboard.indicator.backtest.next")))]):1===t.currentStep?e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",loading:t.loading},on:{click:t.handleRunBacktest}},[t._v(t._s(t.$t("dashboard.indicator.backtest.run")))]):e("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",disabled:t.loading},on:{click:t.handleRerun}},[t._v(t._s(t.$t("dashboard.indicator.backtest.rerun")))])],1)])])],2)},Or=[],zr=i(95093),Wr=i.n(zr),$r=i(86529),Hr={name:"BacktestModal",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicator:{type:Object,default:null},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1D"}},data:function(){return{form:this.$form.createForm(this),loading:!1,loadingTip:"",loadingTimer:null,currentStep:0,hasResult:!1,backtestRunId:null,step1CollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,precisionInfo:null,selectedDatePreset:null,selectedTimeframe:"1D",result:{totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},equityChart:null,tradeColumns:[]}},computed:{maxBacktestRange:function(){var t=this.selectedTimeframe||this.timeframe||"1D";return"1m"===t?{days:30,label:"1个月"}:"5m"===t?{days:180,label:"6个月"}:["15m","30m"].includes(t)?{days:365,label:"1年"}:{days:1095,label:"3年"}},recommendedRange:function(){return{days:30,label:"30天",key:"30d"}},combinedAlertType:function(){return this.precisionInfo&&this.precisionInfo.enabled?"high"===this.precisionInfo.precision?"success":"info":this.precisionInfo&&!this.precisionInfo.enabled&&this.market&&"crypto"===this.market.toLowerCase()?"warning":"info"},datePresets:function(){var t=[],e=this.selectedTimeframe||this.timeframe||"1D";return"1m"===e?(t.push({key:"7d",days:7,label:"7D"}),t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"})):"5m"===e?(t.push({key:"14d",days:14,label:"14D"}),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"})):(["15m","30m"].includes(e),t.push({key:"30d",days:30,label:"30D"}),t.push({key:"90d",days:90,label:"3M"}),t.push({key:"180d",days:180,label:"6M"}),t.push({key:"365d",days:365,label:"1Y"})),t},defaultStartDate:function(){return Wr()().subtract(this.recommendedRange.days,"days")},defaultEndDate:function(){return Wr()()},earliestDate:function(){return Wr()().subtract(this.maxBacktestRange.days,"days")},labelCol:function(){return 0===this.currentStep?{span:9}:{span:6}},wrapperCol:function(){return 0===this.currentStep?{span:15}:{span:18}}},watch:{visible:function(t){var e=this;t?(this.currentStep=0,this.hasResult=!1,this.backtestRunId=null,this.step1CollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.precisionInfo=null,this.selectedDatePreset=null,this.selectedTimeframe=this.timeframe||"1D",this.result={totalReturn:0,annualReturn:0,maxDrawdown:0,sharpeRatio:0,winRate:0,profitFactor:0,totalTrades:0,totalProfit:0,totalCommission:0,trades:[],equityCurve:[]},this.$nextTick(function(){e.form&&(e.form.resetFields(),e.trailingEnabledUi=!!e.form.getFieldValue("trailingEnabled"),e.recalcEntryPctMaxUi(),e.selectedDatePreset="30d",e.fetchPrecisionInfo())})):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},created:function(){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:120,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,customRender:function(t){return t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):"--"}},{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:130,scopedSlots:{customRender:"balance"}}]},methods:{recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trendAddEnabled"),e=!!this.form.getFieldValue("dcaAddEnabled"),i=Number(this.form.getFieldValue("trendAddMaxTimes")||0),n=Number(this.form.getFieldValue("dcaAddMaxTimes")||0),r=Number(this.form.getFieldValue("trendAddSizePct")||0),a=Number(this.form.getFieldValue("dcaAddSizePct")||0),o=(t?i*r:0)+(e?n*a:0),s=Math.max(0,Math.min(100,100-o));this.entryPctMaxUi=s}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entryPct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entryPct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dcaAddEnabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trendAddEnabled:!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({trailingStopPct:0,trailingActivationPct:0}))},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={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"),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")};return e[t]||t},disabledStartDate:function(t){return!!t&&(t>Wr()().endOf("day")||tWr()().endOf("day"))return!0;if(tn.endOf("day"))return!0}return!1},applyDatePreset:function(t){this.selectedDatePreset=t.key;var e=Wr()(),i=Wr()().subtract(t.days,"days");this.form.setFieldsValue({startDate:i,endDate:e}),this.fetchPrecisionInfo(i,e)},fetchPrecisionInfo:function(t,e){var i=this;return(0,c.A)((0,l.A)().m(function n(){var r;return(0,l.A)().w(function(n){while(1)switch(n.p=n.n){case 0:if(t&&e||(t=i.form?i.form.getFieldValue("startDate"):null,e=i.form?i.form.getFieldValue("endDate"):null),t||(t=i.defaultStartDate),e||(e=i.defaultEndDate),i.market&&"crypto"===i.market.toLowerCase()){n.n=1;break}return i.precisionInfo={enabled:!1,reason:"only_crypto",message:i.$t("dashboard.indicator.backtest.onlyCryptoSupported")},n.a(2);case 1:return n.p=1,n.n=2,(0,f.Ay)({url:"/api/indicator/backtest/precision-info",method:"post",data:{market:i.market,startDate:t.format("YYYY-MM-DD"),endDate:e.format("YYYY-MM-DD")}});case 2:r=n.v,1===r.code&&r.data&&(i.precisionInfo=r.data),n.n=4;break;case 3:n.p=3,n.v,i.precisionInfo=null;case 4:return n.a(2)}},n,null,[[1,3]])}))()},onTimeframeChange:function(){this.selectedDatePreset="30d";var t=Wr()(),e=Wr()().subtract(30,"days");this.form.setFieldsValue({startDate:e,endDate:t}),this.fetchPrecisionInfo(e,t)},onDateChange:function(){var t=this;this.selectedDatePreset=null,this.$nextTick(function(){t.fetchPrecisionInfo()})},validateDateRange:function(t,e){if(!t||!e)return!0;var i=e.diff(t,"days"),n=this.maxBacktestRange.days||365;return!(i>n)||(this.$message.error(this.$t("dashboard.indicator.backtest.dateRangeExceededDays",{timeframe:this.selectedTimeframe||this.timeframe,maxRange:this.maxBacktestRange.label,maxDays:n})),!1)},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(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}))},handleCancel:function(){this.$emit("cancel")},handlePrev:function(){this.loading||this.currentStep>0&&(this.currentStep-=1)},handleNext:function(){this.loading||(0!==this.currentStep?1===this.currentStep&&this.handleRunBacktest():this.currentStep=1)},handleRerun:function(){this.loading||(this.currentStep=1,this.hasResult=!1,this.backtestRunId=null)},startLoadingAnimation:function(){var t=this,e=[this.$t("dashboard.indicator.backtest.loadingTip1")||"正在获取历史K线数据...",this.$t("dashboard.indicator.backtest.loadingTip2")||"正在执行策略信号计算...",this.$t("dashboard.indicator.backtest.loadingTip3")||"正在模拟交易执行...",this.$t("dashboard.indicator.backtest.loadingTip4")||"正在计算回测指标...",this.$t("dashboard.indicator.backtest.loadingTip5")||"即将完成,请稍候..."],i=0;this.loadingTip=e[0],this.loadingTimer=setInterval(function(){i=(i+1)%e.length,t.loadingTip=e[i]},2e3)},stopLoadingAnimation:function(){this.loadingTimer&&(clearInterval(this.loadingTimer),this.loadingTimer=null),this.loadingTip=""},handleRunBacktest:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i;return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:i=["startDate","endDate","initialCapital","commission","leverage","tradeDirection","slippage"],t.form.validateFields(i,function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var r,a,o,s,c;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!i){e.n=1;break}return e.a(2);case 1:if(r=(0,d.A)((0,d.A)({},t.form.getFieldsValue()||{}),n||{}),t.indicator&&t.indicator.id){e.n=2;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noIndicatorCode")),e.a(2);case 2:if(t.symbol){e.n=3;break}return t.$message.error(t.$t("dashboard.indicator.backtest.noSymbol")),e.a(2);case 3:if(t.validateDateRange(n.startDate,n.endDate)){e.n=4;break}return e.a(2);case 4:return t.loading=!0,t.hasResult=!1,t.startLoadingAnimation(),e.p=5,a=function(t){return Number(t||0)/100},o={risk:{stopLossPct:a(r.stopLossPct),takeProfitPct:a(r.takeProfitPct),trailing:{enabled:!!r.trailingEnabled,pct:a(r.trailingStopPct),activationPct:a(r.trailingActivationPct)}},position:{entryPct:a(r.entryPct||0)},scale:{trendAdd:{enabled:!!r.trendAddEnabled,stepPct:a(r.trendAddStepPct),sizePct:a(r.trendAddSizePct),maxTimes:r.trendAddMaxTimes||0},dcaAdd:{enabled:!!r.dcaAddEnabled,stepPct:a(r.dcaAddStepPct),sizePct:a(r.dcaAddSizePct),maxTimes:r.dcaAddMaxTimes||0},trendReduce:{enabled:!!r.trendReduceEnabled,stepPct:a(r.trendReduceStepPct),sizePct:a(r.trendReduceSizePct),maxTimes:r.trendReduceMaxTimes||0},adverseReduce:{enabled:!!r.adverseReduceEnabled,stepPct:a(r.adverseReduceStepPct),sizePct:a(r.adverseReduceSizePct),maxTimes:r.adverseReduceMaxTimes||0}}},s={userid:t.userId||1,indicatorId:t.indicator.id,symbol:t.symbol,market:t.market,timeframe:t.selectedTimeframe||t.timeframe,startDate:n.startDate.format("YYYY-MM-DD"),endDate:n.endDate.format("YYYY-MM-DD"),initialCapital:n.initialCapital,commission:a(n.commission||0),slippage:a(n.slippage||0),leverage:n.leverage||1,tradeDirection:n.tradeDirection||"long",strategyConfig:o,enableMtf:t.market&&"crypto"===t.market.toLowerCase()},e.n=6,(0,f.Ay)({url:"/api/indicator/backtest",method:"post",data:s});case 6:c=e.v,1===c.code&&c.data?(c.data.runId&&(t.backtestRunId=c.data.runId),t.result=c.data.result||c.data,t.hasResult=!0,t.currentStep=2,t.$nextTick(function(){t.renderEquityChart()}),t.$message.success(t.$t("dashboard.indicator.backtest.success"))):t.$message.error(c.msg||t.$t("dashboard.indicator.backtest.failed")),e.n=8;break;case 7:e.p=7,e.v,t.$message.error(t.$t("dashboard.indicator.backtest.failed"));case 8:return e.p=8,t.stopLoadingAnimation(),t.loading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[5,7,8,9]])}));return function(t,i){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.96)",borderColor:"#e8e8e8",borderWidth:1,textStyle:{color:"#333"},formatter:function(t){var e='

'.concat(t[0].axisValue,"
");return t.forEach(function(t){if(void 0!==t.value&&null!==t.value){var i=t.value.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});e+='
\n '.concat(t.marker," ").concat(t.seriesName,'\n $').concat(i,"\n
")}}),e}},legend:{show:!1},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1,axisLine:{lineStyle:{color:"#e8e8e8"}},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,rotate:0,interval:Math.floor(i.length/6)}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#f5f5f5",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#8c8c8c",fontSize:11,formatter:function(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(0)+"K":t}}},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s,cap:"round",join:"round"},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)},emphasis:{lineStyle:{width:3}}}],animation:!0,animationDuration:800,animationEasing:"cubicOut"};this.equityChart.setOption(c),window.addEventListener("resize",function(){t.equityChart&&t.equityChart.resize()})}}},beforeDestroy:function(){this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},Vr=Hr,Kr=(0,T.A)(Vr,Nr,Or,!1,null,"9d8ac1fc",null),Yr=Kr.exports,Xr=function(){var t=this,e=t._self._c;return e("a-drawer",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":980,maskClosable:!0},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-switch",{model:{value:t.useCurrentFilters,callback:function(e){t.useCurrentFilters=e},expression:"useCurrentFilters"}}),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyUseCurrent"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.loading},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIAnalyze"))+" ")])],1),t.useCurrentFilters?t._e():e("div",{staticStyle:{display:"flex",gap:"12px","margin-bottom":"12px","align-items":"center","flex-wrap":"wrap"}},[e("a-input",{staticStyle:{width:"220px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"140px"},attrs:{placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),allowClear:""},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(i){return e("a-select-option",{key:i,attrs:{value:i}},[t._v(t._s(i))])}),1),e("a-button",{attrs:{loading:t.loading},on:{click:t.loadRuns}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyApply")))]),e("span",{staticStyle:{color:"#8c8c8c"}},[t._v(t._s(t.filterLabel))])],1),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:10,size:"small"},rowKey:"id",scroll:{x:900},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"range",fn:function(i,n){return[e("span",[t._v(t._s(n.start_date||"")+" ~ "+t._s(n.end_date||""))])]}},{key:"status",fn:function(i){return[e("a-tag",{attrs:{color:"success"===i?"green":"failed"===i?"red":"blue"}},[t._v(" "+t._s("success"===i?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===i?t.$t("dashboard.indicator.backtest.historyStatusFailed"):i)+" ")])]}},{key:"actions",fn:function(i,n){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===n.id},on:{click:function(e){return t.viewRun(n)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")])]}}])}),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.historyAIAnalyzeTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"12px 0"}},[e("a-spin")],1):e("div",{staticStyle:{"white-space":"pre-wrap","font-family":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"}},[t._v(" "+t._s(t.aiResult||t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])],1)},Ur=[],Gr={name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},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:"",useCurrentFilters:!0,filterSymbol:"",filterTimeframe:"",timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[]}},computed:{filterLabel:function(){var t=[];this.indicatorId&&t.push("indicatorId=".concat(this.indicatorId));var e=this.useCurrentFilters?this.market:this.market||"",i=this.useCurrentFilters?this.symbol:this.filterSymbol||"",n=this.useCurrentFilters?this.timeframe:this.filterTimeframe||"";return e&&t.push("market=".concat(e)),i&&t.push("symbol=".concat(i)),n&&t.push("timeframe=".concat(n)),t.length?t.join(" | "):""}},watch:{visible:function(t){t&&(this.initColumns(),this.useCurrentFilters=!0,this.filterSymbol=this.symbol||"",this.filterTimeframe=this.timeframe||"",this.selectedRowKeys=[],this.aiResult="",this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},initColumns:function(){this.columns.length||(this.columns=[{title:this.$t("dashboard.indicator.backtest.historyRunId"),dataIndex:"id",key:"id",width:90},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:140},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:90},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:90},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:220,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyActions"),key:"actions",width:90,scopedSlots:{customRender:"actions"}}])},loadRuns:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,r,a;return(0,l.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,i=t.useCurrentFilters?t.symbol:t.filterSymbol||"",n=t.useCurrentFilters?t.timeframe:t.filterTimeframe||"",r=t.market||"",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/history",method:"get",params:{userid:t.userId,limit:100,offset:0,indicatorId:t.indicatorId,symbol:i,market:r,timeframe:n}});case 3:a=e.v,a&&1===a.code&&Array.isArray(a.data)?t.runs=a.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,l.A)().m(function i(){var n;return(0,l.A)().w(function(i){while(1)switch(i.p=i.n){case 0:if(t&&t.id){i.n=1;break}return i.a(2);case 1:return e.detailLoadingId=t.id,i.p=2,i.n=3,(0,f.Ay)({url:"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:n=i.v,n&&1===n.code&&n.data&&e.$emit("view",n.data);case 4:return i.p=4,e.detailLoadingId=null,i.f(4);case 5:return i.a(2)}},i,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId&&t.selectedRowKeys.length){e.n=1;break}return e.a(2);case 1:return t.analyzing=!0,t.showAIResult=!0,t.aiResult="",e.p=2,i=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,f.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",data:{userid:t.userId,runIds:t.selectedRowKeys,lang:i}});case 3:n=e.v,n&&1===n.code&&n.data&&n.data.analysis?t.aiResult=n.data.analysis:t.aiResult=n.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult");case 4:return e.p=4,t.analyzing=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()}}},jr=Gr,qr=(0,T.A)(jr,Xr,Ur,!1,null,null,null),Zr=qr.exports,Jr=function(){var t,e,i,n=this,r=n._self._c;return r("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:n.modalTitle,visible:n.visible,width:1100,maskClosable:!1},on:{cancel:function(t){return n.$emit("cancel")}}},[n.run&&n.run.result?r("div",[n.run.id?r("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:n.$t("dashboard.indicator.backtest.savedRunId",{id:n.run.id})}}):n._e(),r("div",{staticClass:"metrics-cards"},[r("div",{staticClass:"metric-card",class:{positive:n.result.totalReturn>0,negative:n.result.totalReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.totalReturn)))]),r("div",{staticClass:"metric-amount"},[n._v(n._s(n.formatMoney(n.result.totalProfit)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.annualReturn>0,negative:n.result.annualReturn<0}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.annualReturn")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.annualReturn)))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.maxDrawdown")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.maxDrawdown)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.sharpeRatio")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(t=n.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.winRate")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(n.formatPercent(n.result.winRate)))])]),r("div",{staticClass:"metric-card",class:{positive:n.result.profitFactor>=1.5,negative:n.result.profitFactor<1}},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.profitFactor")))]),r("div",{staticClass:"metric-value"},[n._v(n._s((null!==(e=n.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),r("div",{staticClass:"metric-card"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalTrades")))]),r("div",{staticClass:"metric-value"},[n._v(n._s(null!==(i=n.result.totalTrades)&&void 0!==i?i:0))])]),r("div",{staticClass:"metric-card negative"},[r("div",{staticClass:"metric-label"},[n._v(n._s(n.$t("dashboard.indicator.backtest.totalCommission")))]),r("div",{staticClass:"metric-value"},[n._v("-$"+n._s(n.result.totalCommission?n.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),r("div",{staticClass:"chart-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.equityCurve")))]),r("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),r("div",{staticClass:"trades-section"},[r("div",{staticClass:"chart-title"},[n._v(n._s(n.$t("dashboard.indicator.backtest.tradeHistory")))]),r("a-table",{attrs:{columns:n.tradeColumns,"data-source":n.result.trades||[],pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:n.rowKey},scopedSlots:n._u([{key:"type",fn:function(t){return[r("a-tag",{attrs:{color:n.getTradeTypeColor(t)}},[n._v(" "+n._s(n.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[r("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[n._v(" $"+n._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[r("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":"#666"}},[n._v(" "+n._s(n.formatMoney(t))+" ")])]}}])})],1)],1):r("div",{staticStyle:{padding:"12px 0"}},[r("a-empty",{attrs:{description:n.$t("dashboard.indicator.backtest.historyNoData")}})],1),r("template",{slot:"footer"},[r("a-button",{on:{click:function(t){return n.$emit("cancel")}}},[n._v(n._s(n.$t("dashboard.indicator.backtest.close")))])],1)],2)},Qr=[],ta={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=$r.Ts(this.$refs.equityChartRef);var e=this.result.equityCurve||[],i=e.map(function(t){return t.time||t.date}),n=e.map(function(t){return void 0!==t.value?t.value:t.equity}),r=n[0]||1e5,a=n[n.length-1]||r,o=a>=r,s=o?"#52c41a":"#f5222d",l=o?[{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)"}],c={tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:i,boundaryGap:!1},yAxis:{type:"value"},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:n,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:s},areaStyle:{color:new $r.fA.W4(0,0,0,1,l)}}]};this.equityChart.setOption(c),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},ea=ta,ia=(0,T.A)(ea,Jr,Qr,!1,null,"a484239a",null),na=ia.exports,ra=i(38362),aa={name:"DashboardIndicator",components:{IndicatorEditor:M,KlineChart:Br,BacktestModal:Yr,BacktestHistoryDrawer:Zr,BacktestRunViewer:na,QuickTradePanel:ra.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),r=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),b=(0,h.KR)(!1),x=(0,h.KR)(""),_=(0,h.KR)(!1),w=(0,h.KR)(!1),C=(0,h.KR)(!1),S=(0,h.KR)(""),k=(0,h.KR)(""),A=(0,h.KR)([]),T=(0,h.KR)(!1),I=(0,h.KR)([]),M=(0,h.KR)(!1),E=(0,h.KR)(null),D=(0,h.KR)(null),P=(0,h.KR)([]),L=(0,h.KR)(!1),R=(0,h.KR)(!1),F=(0,h.KR)(""),B=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(K.value||"").toLowerCase()}),z=function(){O.value?(F.value=V.value||"",N.value=parseFloat(Y.value)||0,B.value="",R.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},W=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},$=function(t){t&&O.value&&(F.value=t)},H=function(){i&&i.$router&&i.$router.push("/indicator-community")},V=(0,h.KR)(""),K=(0,h.KR)(""),Y=(0,h.KR)("--"),X=(0,h.KR)(0),U=(0,h.EW)(function(){return X.value>0?"color-up":X.value<0?"color-down":""}),G=(0,h.KR)("1D"),j=(0,h.KR)([]),q=(0,h.KR)(!1),Z=[{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),rt=(0,h.KR)(""),at=(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),ft=(0,h.KR)(null),vt=(0,h.KR)(!1),gt=(0,h.KR)(null),mt=(0,h.KR)(!1),yt=(0,h.KR)(null),bt=(0,h.KR)(!1),xt=(0,h.KR)(null),_t=(0,h.KR)(!1),wt=(0,h.KR)(!1),Ct=(0,h.KR)("free"),St=(0,h.KR)(10),kt=(0,h.KR)(""),At=(0,h.KR)(!1),Tt={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},It=(0,h.KR)(!1),Mt=function(t){var e=t.price,i=t.change;Y.value=e,X.value=i},Et=function(){},Dt=(0,h.KR)([]),Pt=(0,h.KR)([]),Lt=function(t){G.value=t},Rt=function(t){return t?Object.values(t).join(", "):""},Ft=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r.value=!0,t.p=1,a=(0,h.nI)(),o=null===a||void 0===a||null===(e=a.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,r.value=!1,Bt(),re(),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),Bt(),re()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,r.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Bt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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 b.value=!0,t.p=2,t.n=3,(0,v.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&&!V.value&&(r=y.value[0],K.value=r.market,V.value=r.symbol,p.value=r.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,b.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(){x.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(x.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(x.value.toLowerCase())}):m.value=y.value},Ot=function(t){x.value=t,0===y.value.length&&t&&(_.value=!0),Nt()},zt=function(t){_.value=t,t||(x.value="")},Wt=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),r=n[0],a=n[1];e={market:r,symbol:a,value:t}}e&&(K.value=e.market,V.value=e.symbol,p.value=e.value)}},$t=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,v.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?P.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)?P.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):P.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"}],P.value.length>0&&!S.value&&(S.value=P.value[0].value),t.n=3;break;case 2:t.p=2,t.v,P.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)}}(),Vt=function(){w.value=!1,E.value=null,k.value="",A.value=[],L.value=!1,S.value=P.value.length>0?P.value[0].value:""},Kt=function(t){S.value=t,k.value="",A.value=[],E.value=null,L.value=!1,qt(t)},Yt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return A.value=[],L.value=!1,void(E.value=null);D.value=setTimeout(function(){Ut(e)},500)},Xt=function(t){t&&t.trim()&&(S.value?A.value.length>0||(L.value&&0===A.value.length?Gt():Ut(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},Ut=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 A.value=[],L.value=!1,t.a(2);case 1:if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return T.value=!0,L.value=!0,t.p=3,t.n=4,(0,v._3)({market:S.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?A.value=n.data:(A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,A.value=[],E.value={market:S.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,T.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)}}(),Gt=function(){k.value&&k.value.trim()?S.value?E.value={market:S.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"))},jt=function(t){E.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},qt=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=S.value||(P.value.length>0?P.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return M.value=!0,t.p=2,t.n=3,(0,v.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?I.value=i.data:I.value=[],t.n=5;break;case 4:t.p=4,t.v,I.value=[];case 5:return t.p=5,M.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)}}(),Zt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",r="",!E.value){t.n=1;break}e=E.value.market,r=E.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(S.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=S.value,r=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 C.value=!0,t.p=5,t.n=6,(0,v.dp)({userid:n.value,market:e,symbol:r});case 6:if(a=t.v,!a||1!==a.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),Vt(),t.n=7,Bt();case 7:t.n=9;break;case 8:u.A.error((null===a||void 0===a?void 0:a.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,C.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||{};j.value.push((0,d.A)((0,d.A)({},t),{},{id:t.id,params:(0,d.A)({},e)}))}},Qt=function(t){j.value=j.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?Z.some(function(t){return j.value.some(function(e){return e.id===t.id})}):"ema"===t?J.some(function(t){return j.value.some(function(e){return e.id===t.id})}):j.value.some(function(e){return e.id===t})},ne=function(){var t=new Set;return Z.forEach(function(e){return t.add(e.id)}),J.forEach(function(e){return t.add(e.id)}),j.value.filter(function(e){return!t.has(e.id)})},re=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r;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,f.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}),r=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=r.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)}}(),ae=(0,h.KR)(null),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var r,a,o,s,c,h,p,f,v;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ie(r)){t.n=1;break}return Qt(r),t.a(2);case 1:if(t.p=1,a=e.code||"",ae.value){t.n=2;break}return u.A.error(i.$t("dashboard.indicator.error.chartNotReady")),t.a(2);case 2:if("function"===typeof ae.value.parsePythonStrategy){t.n=3;break}return u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady")),t.a(2);case 3:if("function"===typeof ae.value.executePythonStrategy){t.n=4;break}return u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady")),t.a(2);case 4:if(o=ae.value.parsePythonStrategy(a),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=a,h=(0,d.A)({},s),p={id:r,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 ae.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})}},f=(0,d.A)((0,d.A)({},o.params),s),j.value.push((0,d.A)((0,d.A)({},p),{},{params:f})),t.n=7;break;case 6:t.p=6,v=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(v.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 r,a,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(r="".concat(n,"-").concat(e.id),!ie(r)){t.n=1;break}Qt(r),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:a=t.v,a&&1===a.code&&Array.isArray(a.data)&&a.data.length>0?(at.value=a.data,o="".concat(n,"-").concat(e.id),s=lt.value[o],c={},a.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,rt.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(rt.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,rt.value)}it.value=!1,nt.value=null,rt.value=""},ce=function(){ue(),it.value=!1,setTimeout(function(){nt.value=null,rt.value=""},100)},ue=function(){if(nt.value&&rt.value){var t="".concat(rt.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(!ae.value)return void u.A.error(i.$t("dashboard.indicator.error.chartNotReady"));if("function"!==typeof ae.value.parsePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady"));if("function"!==typeof ae.value.executePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady"));var r=ae.value.parsePythonStrategy(e);if(!r)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var a={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:r,calculate:function(t,i){var n=e;return ae.value.executePythonStrategy(n,t,i)}},o=j.value.findIndex(function(t){return"temp-editor-indicator"===t.id});o>=0&&j.value.splice(o,1),j.value.push((0,d.A)((0,d.A)({},a),{},{params:(0,d.A)({},r.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},fe=function(t){ht.value=t,dt.value=!0},ve=function(){ct.value=!ct.value},ge=function(t){a.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 r,a,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,f.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(r=e.v,1!==r.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),a="custom-"+t.id,ie(a)&&Qt(a),e.n=2,re();case 2:e.n=4;break;case 3:u.A.error(r.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 r(){return e.apply(this,arguments)}return r}()})},me=function(t){ft.value=(0,d.A)({},t),pt.value=!0},ye=function(t){gt.value=(0,d.A)({},t),vt.value=!0},be=function(t){yt.value=t,mt.value=!0},xe=function(t){xt.value=(0,d.A)({},t),Ct.value=t.pricing_type||"free",St.value=t.price||10,kt.value=t.description||"",At.value=!!t.vip_free,bt.value=!0},_e=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,r;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 _t.value=!0,t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:xt.value.id,code:xt.value.code,name:xt.value.name,description:kt.value,publishToCommunity:!0,pricingType:Ct.value,price:"paid"===Ct.value?St.value:0,vipFree:"paid"===Ct.value&&At.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),bt.value=!1,xt.value=null,t.n=4,re();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,r=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(r.message||""));case 8:return t.p=8,_t.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),we=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&&xt.value){t.n=1;break}return t.a(2);case 1:return wt.value=!0,t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:xt.value.id,code:xt.value.code,name:xt.value.name,description:xt.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")),bt.value=!1,xt.value=null,t.n=4,re();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 r,a,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 r=i.$refs.indicatorEditor,r&&(r.saving=!0),t.p=2,t.n=3,(0,f.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(a=t.v,1!==a.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),dt.value=!1,ht.value=null,t.n=4,re();case 4:t.n=6;break;case 5:u.A.error(a.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,r&&(r.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)}}(),Se=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&&!S.value&&(S.value=P.value[0].value),S.value&&qt(S.value)):(E.value=null,k.value="",A.value=[],L.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return ot.value},function(t){if(it.value&&nt.value&&rt.value){var e="".concat(rt.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:ae,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:x,symbolSearchOpen:_,currentSymbol:V,currentMarket:K,currentPrice:Y,priceChange:X,priceChangeClass:U,timeframe:G,loadingWatchlist:b,activeIndicators:j,trendIndicators:Dt,oscillatorIndicators:Pt,customIndicators:Q,purchasedIndicators:tt,loadingIndicators:et,realtimeEnabled:It,toggleRealtime:Ee,handleSymbolSearch:Ot,handleSymbolSelect:Wt,handleDropdownVisibleChange:zt,filterSymbolOption:$t,getMarketName:Ie,getMarketColor:Me,setTimeframe:Lt,addIndicator:Jt,removeIndicator:Qt,isIndicatorActive:ie,loadIndicators:re,addPythonIndicator:oe,toggleIndicator:se,getIndicatorStatus:Se,getIndicatorStatusIcon:ke,getIndicatorStatusClass:Ae,getExpiryTimeText:Te,formatParams:Rt,loadWatchlist:Bt,getCustomActiveIndicators:ne,showIndicatorEditor:dt,editingIndicator:ht,handleCreateIndicator:pe,handleRunIndicator:he,handleSaveIndicator:Ce,handleEditIndicator:fe,handleDeleteIndicator:ge,toggleCustomSection:ve,customSectionCollapsed:ct,purchasedSectionCollapsed:ut,handlePriceChange:Mt,handleChartRetry:Et,handleIndicatorToggle:te,showParamsModal:it,pendingIndicator:nt,indicatorParams:at,indicatorParamValues:ot,loadingParams:st,confirmIndicatorParams:le,cancelIndicatorParams:ce,handleParamsModalAfterClose:de,showBacktestModal:pt,backtestIndicator:ft,handleOpenBacktest:me,showBacktestHistoryDrawer:vt,backtestHistoryIndicator:gt,handleOpenBacktestHistory:ye,showBacktestRunViewer:mt,selectedBacktestRun:yt,handleViewBacktestRun:be,showPublishModal:bt,publishIndicator:xt,publishing:_t,unpublishing:wt,publishPricingType:Ct,publishPrice:St,publishDescription:kt,publishVipFree:At,publishRules:Tt,handlePublishIndicator:xe,handleConfirmPublish:_e,handleUnpublish:we,selectedSymbol:V,selectedMarket:K,selectedTimeframe:G,isMobile:q,showAddStockModal:w,addingStock:C,selectedMarketTab:S,symbolSearchKeyword:k,symbolSearchResults:A,searchingSymbols:T,hotSymbols:I,loadingHotSymbols:M,selectedSymbolForAdd:E,marketTypes:P,hasSearched:L,handleCloseAddStockModal:Vt,handleMarketTabChange:Kt,handleSymbolSearchInput:Yt,handleSearchOrInput:Xt,searchSymbolsInModal:Ut,selectSymbol:jt,loadHotSymbols:qt,handleAddStock:Zt,handleDirectAdd:Gt,loadMarketTypes:Ht,showQuickTrade:R,qtSymbol:F,qtSide:B,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:W,handleQuickTradeSymbolChange:$,goToIndicatorMarket:H}}},oa=aa,sa=(0,T.A)(oa,n,r,!1,null,"b17e86c2",null),la=sa.exports},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,r=e.enc;r.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,r=e?this._safe_map:this._map;t.clamp();for(var a=[],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=r.charAt(64);if(h)while(a.length%4)a.push(h);return a.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64url})},70019:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(63009),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,r=i.WordArray,a=e.algo,o=a.SHA256,s=a.HMAC,l=a.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i=this.cfg,n=s.create(i.hasher,t),a=r.create(),o=r.create([1]),l=a.words,c=o.words,u=i.keySize,d=i.iterations;while(l.length=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;dn?S(e):r0&&A(t,e)&&(o+=" "+l),o}return _(t,e)}function _(t,e,n){if(t.eatSpace())return null;if(!n&&t.match(/^#.*/))return"comment";if(t.match(/^[0-9\.]/,!1)){var r=!1;if(t.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(r=!0),t.match(/^[\d_]+\.\d*/)&&(r=!0),t.match(/^\.\d+/)&&(r=!0),r)return t.eat(/J/i),"number";var a=!1;if(t.match(/^0x[0-9a-f_]+/i)&&(a=!0),t.match(/^0b[01_]+/i)&&(a=!0),t.match(/^0o[0-7_]+/i)&&(a=!0),t.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(t.eat(/J/i),a=!0),t.match(/^0(?![\dx])/i)&&(a=!0),a)return t.eat(/L/i),"number"}if(t.match(m)){var o=-1!==t.current().toLowerCase().indexOf("f");return o?(e.tokenize=w(t.current(),e.tokenize),e.tokenize(t,e)):(e.tokenize=C(t.current(),e.tokenize),e.tokenize(t,e))}for(var s=0;s=0)t=t.substr(1);var i=1==t.length,n="string";function r(t){return function(e,i){var n=_(e,i,!0);return"punctuation"==n&&("{"==e.current()?i.tokenize=r(t+1):"}"==e.current()&&(i.tokenize=t>1?r(t-1):a)),n}}function a(a,o){while(!a.eol())if(a.eatWhile(/[^'"\{\}\\]/),a.eat("\\")){if(a.next(),i&&a.eol())return n}else{if(a.match(t))return o.tokenize=e,n;if(a.match("{{"))return n;if(a.match("{",!1))return o.tokenize=r(0),a.current()?n:o.tokenize(a,o);if(a.match("}}"))return n;if(a.match("}"))return l;a.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;o.tokenize=e}return n}return a.isString=!0,a}function C(t,e){while("rubf".indexOf(t.charAt(0).toLowerCase())>=0)t=t.substr(1);var i=1==t.length,n="string";function r(r,a){while(!r.eol())if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),i&&r.eol())return n}else{if(r.match(t))return a.tokenize=e,n;r.eat(/['"]/)}if(i){if(s.singleLineStringErrors)return l;a.tokenize=e}return n}return r.isString=!0,r}function S(t){while("py"!=a(t).type)t.scopes.pop();t.scopes.push({offset:a(t).offset+o.indentUnit,type:"py",align:null})}function k(t,e,i){var n=t.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:t.column()+1;e.scopes.push({offset:e.indent+h,type:i,align:n})}function A(t,e){var i=t.indentation();while(e.scopes.length>1&&a(e).offset>i){if("py"!=a(e).type)return!0;e.scopes.pop()}return a(e).offset!=i}function T(t,e){t.sol()&&(e.beginningOfLine=!0,e.dedent=!1);var i=e.tokenize(t,e),n=t.current();if(e.beginningOfLine&&"@"==n)return t.match(g,!1)?"meta":v?"operator":l;if(/\S/.test(n)&&(e.beginningOfLine=!1),"variable"!=i&&"builtin"!=i||"meta"!=e.lastToken||(i="meta"),"pass"!=n&&"return"!=n||(e.dedent=!0),"lambda"==n&&(e.lambda=!0),":"==n&&!e.lambda&&"py"==a(e).type&&t.match(/^\s*(?:#|$)/,!1)&&S(e),1==n.length&&!/string|comment/.test(i)){var r="[({".indexOf(n);if(-1!=r&&k(t,e,"])}".slice(r,r+1)),r="])}".indexOf(n),-1!=r){if(a(e).type!=n)return l;e.indent=e.scopes.pop().offset-h}}return e.dedent&&t.eol()&&"py"==a(e).type&&e.scopes.length>1&&e.scopes.pop(),i}var I={startState:function(t){return{tokenize:x,scopes:[{offset:t||0,type:"py",align:null}],indent:t||0,lastToken:null,lambda:!1,dedent:0}},token:function(t,e){var i=e.errorToken;i&&(e.errorToken=!1);var n=T(t,e);return n&&"comment"!=n&&(e.lastToken="keyword"==n||"punctuation"==n?t.current():n),"punctuation"==n&&(n=null),t.eol()&&e.lambda&&(e.lambda=!1),i?n+" "+l:n},indent:function(e,i){if(e.tokenize!=x)return e.tokenize.isString?t.Pass:0;var n=a(e),r=n.type==i.charAt(0)||"py"==n.type&&!e.dedent&&/^(else:|elif |except |finally:)/.test(i);return null!=n.align?n.align-(r?1:0):n.offset-(r?h:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return I}),t.defineMIME("text/x-python","python");var o=function(t){return t.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:o("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})},77193: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.StreamCipher,r=e.algo,a=r.RC4=n.extend({_doReset:function(){for(var t=this._key,e=t.words,i=t.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var a=0;r<256;r++){var o=r%i,s=e[o>>>2]>>>24-o%4*8&255;a=(a+n[r]+s)%256;var l=n[r];n[r]=n[a],n[a]=l}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,i=this._j,n=0,r=0;r<4;r++){e=(e+1)%256,i=(i+t[e])%256;var a=t[e];t[e]=t[i],t[i]=a,n|=t[(t[e]+t[i])%256]<<24-8*r}return this._i=e,this._j=i,n}e.RC4=n._createHelper(a);var s=r.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});e.RC4Drop=n._createHelper(s)}(),t.RC4})},78056:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){ +/** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +return function(){var e=t,i=e.lib,n=i.WordArray,r=i.Hasher,a=e.algo,o=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,r=t[n];t[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a,h,b,x,_,w,C,S,k,A,T,I=this._hash.words,M=u.words,E=d.words,D=o.words,P=s.words,L=l.words,R=c.words;w=a=I[0],C=h=I[1],S=b=I[2],k=x=I[3],A=_=I[4];for(i=0;i<80;i+=1)T=a+t[e+D[i]]|0,T+=i<16?p(h,b,x)+M[0]:i<32?f(h,b,x)+M[1]:i<48?v(h,b,x)+M[2]:i<64?g(h,b,x)+M[3]:m(h,b,x)+M[4],T|=0,T=y(T,L[i]),T=T+_|0,a=_,_=x,x=y(b,10),b=h,h=T,T=w+t[e+P[i]]|0,T+=i<16?m(C,S,k)+E[0]:i<32?g(C,S,k)+E[1]:i<48?v(C,S,k)+E[2]:i<64?f(C,S,k)+E[3]:p(C,S,k)+E[4],T|=0,T=y(T,R[i]),T=T+A|0,w=A,A=k,k=y(S,10),S=C,C=T;T=I[1]+b+k|0,I[1]=I[2]+x+A|0,I[2]=I[3]+_+w|0,I[3]=I[4]+a+C|0,I[4]=I[0]+h+S|0,I[0]=T},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(e.length+1),this._process();for(var r=this._hash,a=r.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,i){return t^e^i}function f(t,e,i){return t&e|~t&i}function v(t,e,i){return(t|~e)^i}function g(t,e,i){return t&i|e&~i}function m(t,e,i){return t^(e|~i)}function y(t,e){return t<>>32-e}e.RIPEMD160=r._createHelper(h),e.HmacRIPEMD160=r._createHmacHelper(h)}(Math),t.RIPEMD160})},80754: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,r=e.enc;r.Base64={stringify:function(t){var e=t.words,i=t.sigBytes,n=this._map;t.clamp();for(var r=[],a=0;a>>2]>>>24-a%4*8&255,s=e[a+1>>>2]>>>24-(a+1)%4*8&255,l=e[a+2>>>2]>>>24-(a+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&a+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(r.length%4)r.push(d);return r.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var r=0;r>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}}(),t.enc.Base64})},81380:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Hasher,r=e.x64,a=r.Word,o=r.WordArray,s=e.algo;function l(){return a.create.apply(a,arguments)}var c=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var t=0;t<80;t++)u[t]=l()})();var d=s.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],l=i[5],d=i[6],h=i[7],p=n.high,f=n.low,v=r.high,g=r.low,m=a.high,y=a.low,b=o.high,x=o.low,_=s.high,w=s.low,C=l.high,S=l.low,k=d.high,A=d.low,T=h.high,I=h.low,M=p,E=f,D=v,P=g,L=m,R=y,F=b,B=x,N=_,O=w,z=C,W=S,$=k,H=A,V=T,K=I,Y=0;Y<80;Y++){var X,U,G=u[Y];if(Y<16)U=G.high=0|t[e+2*Y],X=G.low=0|t[e+2*Y+1];else{var j=u[Y-15],q=j.high,Z=j.low,J=(q>>>1|Z<<31)^(q>>>8|Z<<24)^q>>>7,Q=(Z>>>1|q<<31)^(Z>>>8|q<<24)^(Z>>>7|q<<25),tt=u[Y-2],et=tt.high,it=tt.low,nt=(et>>>19|it<<13)^(et<<3|it>>>29)^et>>>6,rt=(it>>>19|et<<13)^(it<<3|et>>>29)^(it>>>6|et<<26),at=u[Y-7],ot=at.high,st=at.low,lt=u[Y-16],ct=lt.high,ut=lt.low;X=Q+st,U=J+ot+(X>>>0>>0?1:0),X+=rt,U=U+nt+(X>>>0>>0?1:0),X+=ut,U=U+ct+(X>>>0>>0?1:0),G.high=U,G.low=X}var dt=N&z^~N&$,ht=O&W^~O&H,pt=M&D^M&L^D&L,ft=E&P^E&R^P&R,vt=(M>>>28|E<<4)^(M<<30|E>>>2)^(M<<25|E>>>7),gt=(E>>>28|M<<4)^(E<<30|M>>>2)^(E<<25|M>>>7),mt=(N>>>14|O<<18)^(N>>>18|O<<14)^(N<<23|O>>>9),yt=(O>>>14|N<<18)^(O>>>18|N<<14)^(O<<23|N>>>9),bt=c[Y],xt=bt.high,_t=bt.low,wt=K+yt,Ct=V+mt+(wt>>>0>>0?1:0),St=(wt=wt+ht,Ct=Ct+dt+(wt>>>0>>0?1:0),wt=wt+_t,Ct=Ct+xt+(wt>>>0<_t>>>0?1:0),wt=wt+X,Ct=Ct+U+(wt>>>0>>0?1:0),gt+ft),kt=vt+pt+(St>>>0>>0?1:0);V=$,K=H,$=z,H=W,z=N,W=O,O=B+wt|0,N=F+Ct+(O>>>0>>0?1:0)|0,F=L,B=R,L=D,R=P,D=M,P=E,E=wt+St|0,M=Ct+kt+(E>>>0>>0?1:0)|0}f=n.low=f+E,n.high=p+M+(f>>>0>>0?1:0),g=r.low=g+P,r.high=v+D+(g>>>0

>>0?1:0),y=a.low=y+R,a.high=m+L+(y>>>0>>0?1:0),x=o.low=x+B,o.high=b+F+(x>>>0>>0?1:0),w=s.low=w+O,s.high=_+N+(w>>>0>>0?1:0),S=l.low=S+W,l.high=C+z+(S>>>0>>0?1:0),A=d.low=A+H,d.high=k+$+(A>>>0>>0?1:0),I=h.low=I+K,h.high=T+V+(I>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(i/4294967296),e[31+(n+128>>>10<<5)]=i,t.sigBytes=4*e.length,this._process();var r=this._hash.toX32();return r},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(d),e.HmacSHA512=n._createHmacHelper(d)}(),t.SHA512})},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 r,a=this._iv;a?(r=a.slice(0),this._iv=void 0):r=this._prevBlock,n.encryptBlock(r,0);for(var o=0;o>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],f=t[e+3],v=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],b=t[e+8],x=t[e+9],_=t[e+10],w=t[e+11],C=t[e+12],S=t[e+13],k=t[e+14],A=t[e+15],T=a[0],I=a[1],M=a[2],E=a[3];T=c(T,I,M,E,o,7,s[0]),E=c(E,T,I,M,l,12,s[1]),M=c(M,E,T,I,p,17,s[2]),I=c(I,M,E,T,f,22,s[3]),T=c(T,I,M,E,v,7,s[4]),E=c(E,T,I,M,g,12,s[5]),M=c(M,E,T,I,m,17,s[6]),I=c(I,M,E,T,y,22,s[7]),T=c(T,I,M,E,b,7,s[8]),E=c(E,T,I,M,x,12,s[9]),M=c(M,E,T,I,_,17,s[10]),I=c(I,M,E,T,w,22,s[11]),T=c(T,I,M,E,C,7,s[12]),E=c(E,T,I,M,S,12,s[13]),M=c(M,E,T,I,k,17,s[14]),I=c(I,M,E,T,A,22,s[15]),T=u(T,I,M,E,l,5,s[16]),E=u(E,T,I,M,m,9,s[17]),M=u(M,E,T,I,w,14,s[18]),I=u(I,M,E,T,o,20,s[19]),T=u(T,I,M,E,g,5,s[20]),E=u(E,T,I,M,_,9,s[21]),M=u(M,E,T,I,A,14,s[22]),I=u(I,M,E,T,v,20,s[23]),T=u(T,I,M,E,x,5,s[24]),E=u(E,T,I,M,k,9,s[25]),M=u(M,E,T,I,f,14,s[26]),I=u(I,M,E,T,b,20,s[27]),T=u(T,I,M,E,S,5,s[28]),E=u(E,T,I,M,p,9,s[29]),M=u(M,E,T,I,y,14,s[30]),I=u(I,M,E,T,C,20,s[31]),T=d(T,I,M,E,g,4,s[32]),E=d(E,T,I,M,b,11,s[33]),M=d(M,E,T,I,w,16,s[34]),I=d(I,M,E,T,k,23,s[35]),T=d(T,I,M,E,l,4,s[36]),E=d(E,T,I,M,v,11,s[37]),M=d(M,E,T,I,y,16,s[38]),I=d(I,M,E,T,_,23,s[39]),T=d(T,I,M,E,S,4,s[40]),E=d(E,T,I,M,o,11,s[41]),M=d(M,E,T,I,f,16,s[42]),I=d(I,M,E,T,m,23,s[43]),T=d(T,I,M,E,x,4,s[44]),E=d(E,T,I,M,C,11,s[45]),M=d(M,E,T,I,A,16,s[46]),I=d(I,M,E,T,p,23,s[47]),T=h(T,I,M,E,o,6,s[48]),E=h(E,T,I,M,y,10,s[49]),M=h(M,E,T,I,k,15,s[50]),I=h(I,M,E,T,g,21,s[51]),T=h(T,I,M,E,C,6,s[52]),E=h(E,T,I,M,f,10,s[53]),M=h(M,E,T,I,_,15,s[54]),I=h(I,M,E,T,l,21,s[55]),T=h(T,I,M,E,b,6,s[56]),E=h(E,T,I,M,A,10,s[57]),M=h(M,E,T,I,m,15,s[58]),I=h(I,M,E,T,S,21,s[59]),T=h(T,I,M,E,v,6,s[60]),E=h(E,T,I,M,w,10,s[61]),M=h(M,E,T,I,p,15,s[62]),I=h(I,M,E,T,x,21,s[63]),a[0]=a[0]+T|0,a[1]=a[1]+I|0,a[2]=a[2]+M|0,a[3]=a[3]+E|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32;var a=e.floor(n/4294967296),o=n;i[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(r+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=a.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,r,a,o){var s=t+(e&i|~e&n)+r+o;return(s<>>32-a)+e}function u(t,e,i,n,r,a,o){var s=t+(e&n|i&~n)+r+o;return(s<>>32-a)+e}function d(t,e,i,n,r,a,o){var s=t+(e^i^n)+r+o;return(s<>>32-a)+e}function h(t,e,i,n,r,a,o){var s=t+(i^(e|~n))+r+o;return(s<>>32-a)+e}i.MD5=a._createHelper(l),i.HmacMD5=a._createHmacHelper(l)}(Math),t.MD5})},89557:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(43240),i(81380))})(0,function(t){return function(){var e=t,i=e.x64,n=i.Word,r=i.WordArray,a=e.algo,o=a.SHA512,s=a.SHA384=o.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=o._createHelper(s),e.HmacSHA384=o._createHmacHelper(s)}(),t.SHA384})},96298: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.StreamCipher,r=e.algo,a=[],o=[],s=[],l=r.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var a=e.words,o=a[0],s=a[1],l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,h=u<<16|65535&l;r[0]^=l,r[1]^=d,r[2]^=u,r[3]^=h,r[4]^=l,r[5]^=d,r[6]^=u,r[7]^=h;for(i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var i=this._X;c.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),t[e+n]^=a[n]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^c}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=n._createHelper(l)}(),t.Rabbit})},96939:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CTR=function(){var e=t.lib.BlockCipherMode.extend(),i=e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0);var o=a.slice(0);i.encryptBlock(o,0),a[n-1]=a[n-1]+1|0;for(var s=0;s",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function r(t){return t&&t.bracketRegex||/[(){}[\]]/}function a(t,e,a){var s=t.getLineHandle(e.line),l=e.ch-1,c=a&&a.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var u=r(a),d=!c&&l>=0&&u.test(s.text.charAt(l))&&n[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&n[s.text.charAt(++l)];if(!d)return null;var h=">"==d.charAt(1)?1:-1;if(a&&a.strict&&h>0!=(l==e.ch))return null;var p=t.getTokenTypeAt(i(e.line,l+1)),f=o(t,i(e.line,l+(h>0?1:0)),h,p,a);return null==f?null:{from:i(e.line,l),to:f&&f.pos,match:f&&f.ch==d.charAt(0),forward:h>0}}function o(t,e,a,o,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=r(s),h=a>0?Math.min(e.line+c,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-c),p=e.line;p!=h;p+=a){var f=t.getLine(p);if(f){var v=a>0?0:f.length-1,g=a>0?f.length:-1;if(!(f.length>l))for(p==e.line&&(v=e.ch-(a<0?1:0));v!=g;v+=a){var m=f.charAt(v);if(d.test(m)&&(void 0===o||(t.getTokenTypeAt(i(p,v+1))||"")==(o||""))){var y=n[m];if(y&&">"==y.charAt(1)==a>0)u.push(m);else{if(!u.length)return{pos:i(p,v),ch:m};u.pop()}}}}}return p-a!=(a>0?t.lastLine():t.firstLine())&&null}function s(t,n,r){for(var o=t.state.matchBrackets.maxHighlightLineLength||1e3,s=r&&r.highlightNonMatching,l=[],c=t.listSelections(),u=0;u0?a("div",{staticClass:"opp-section"},[a("div",{staticClass:"opp-header"},[a("span",{staticClass:"opp-title"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.title")))],1),a("span",{staticClass:"opp-header-right"},[a("span",{staticClass:"opp-update-hint"},[a("a-icon",{attrs:{type:"clock-circle"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.updateHint"))+" ")],1),a("a-button",{attrs:{type:"link",size:"small",icon:"reload",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[t._v(" "+t._s(t.$t("common.refresh")||"刷新")+" ")])],1)]),a("div",{staticClass:"opp-carousel-wrapper",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"opp-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(e,s){return a("div",{key:"opp-"+s,staticClass:"opp-card",class:[e.impact,"market-"+(e.market||"").toLowerCase()],on:{click:function(a){return t.analyzeOpportunity(e)}}},[a("div",{staticClass:"opp-top"},[a("span",{staticClass:"opp-symbol"},[t._v(t._s(e.symbol))]),a("a-tag",{staticClass:"opp-market-tag",attrs:{color:t.getMarketTagColor(e.market),size:"small"}},[t._v(" "+t._s(t.getMarketLabel(e.market))+" ")])],1),a("div",{staticClass:"opp-price"},[t._v("$"+t._s(t.formatOppPrice(e.price)))]),a("div",{staticClass:"opp-change",class:e.change_24h>=0?"up":"down"},[t._v(" "+t._s(e.change_24h>=0?"+":"")+t._s((e.change_24h||0).toFixed(1))+"% ")]),a("div",{staticClass:"opp-signal"},[a("a-tag",{attrs:{color:t.getSignalColor(e.signal),size:"small"}},[t._v(t._s(t.getSignalLabel(e.signal)))])],1),a("div",{staticClass:"opp-reason"},[t._v(t._s(t.getReasonText(e)))]),a("div",{staticClass:"opp-actions"},[a("span",{staticClass:"opp-action",on:{click:function(a){return a.stopPropagation(),t.analyzeOpportunity(e)}}},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.analyze"))+" ")],1),"Crypto"===e.market?a("span",{staticClass:"opp-trade-btn",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:"monitor"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"eye"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.monitor"))+" ")],1),a("div",{staticClass:"tab-body"},["monitor"===t.activeTab?a("PortfolioView",{attrs:{embedded:!0}}):t._e()],1)])],1)],1)],1)},i=[],o=e(81127),n=e(56252),r=e(2403),c=e(76338),l=e(95353),p=e(4929),u=e(514),d=e(44146),h=e(85916),y={name:"AIAssetAnalysis",components:{AnalysisView:p["default"],PortfolioView:u["default"],QuickTradePanel:h.A},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:""}},computed:(0,c.A)((0,c.A)({},(0,l.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,r.A)(this.opportunities),(0,r.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,n.A)((0,o.A)().m(function e(){var s,i,n;return(0,o.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:n=e.v,n&&1===n.code&&Array.isArray(n.data)&&(a.opportunities=n.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"};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 o=Math.abs(t.change_24h||0).toFixed(1),n=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",o).replace("{change7d}",n)},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;this.activeTab="quick";var e=t.market||"Crypto";this.presetSymbol="".concat(e,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},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)}}},m=y,b=e(81656),v=(0,b.A)(m,s,i,!1,null,"3b2ffb77",null),k=v.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/916.2eba6bc6.js b/frontend/dist/js/916.2eba6bc6.js new file mode 100644 index 0000000..4aacecf --- /dev/null +++ b/frontend/dist/js/916.2eba6bc6.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[916],{42430:function(e,t,a){a.d(t,{IA:function(){return n},PR:function(){return c},kI:function(){return l}});var i=a(76338),r=a(75769),s={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete"};function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.Ay)({url:s.list,method:"get",params:e})}function c(e){return(0,r.Ay)({url:s.create,method:"post",data:e})}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.Ay)({url:s.delete,method:"delete",params:(0,i.A)({id:e},t)})}},85916:function(e,t,a){a.d(t,{A:function(){return P}});var i=function(){var e=this,t=e._self._c;return t("a-drawer",{staticClass:"quick-trade-drawer",class:{"theme-dark":e.isDark},attrs:{title:null,width:380,visible:e.visible,closable:!1,bodyStyle:{padding:0},maskStyle:{background:"rgba(0,0,0,0.45)"}},on:{close:e.handleClose}},[t("div",{staticClass:"qt-header"},[t("div",{staticClass:"qt-header-left"},[t("a-icon",{staticClass:"qt-icon",attrs:{type:"thunderbolt",theme:"filled"}}),t("span",{staticClass:"qt-header-title"},[e._v(e._s(e.$t("quickTrade.title")))])],1),t("a-icon",{staticClass:"qt-close",attrs:{type:"close"},on:{click:e.handleClose}})],1),t("div",{staticClass:"qt-symbol-bar"},[t("div",{staticClass:"qt-symbol-selector"},[t("a-select",{staticStyle:{width:"100%"},attrs:{"show-search":"",placeholder:e.$t("quickTrade.selectSymbol"),"filter-option":!1,"not-found-content":e.symbolSearching?null:void 0,loading:e.symbolSearching},on:{search:e.handleSymbolSearch,change:e.handleSymbolChange,focus:e.handleSymbolFocus},model:{value:e.currentSymbol,callback:function(t){e.currentSymbol=t},expression:"currentSymbol"}},[t("a-icon",{staticStyle:{color:"#999"},attrs:{slot:"suffixIcon",type:"search"},slot:"suffixIcon"}),e._l(e.symbolSuggestions,function(a){return t("a-select-option",{key:a.value,attrs:{value:a.value}},[t("div",{staticClass:"qt-symbol-option"},[t("span",{staticClass:"qt-symbol-option-name"},[e._v(e._s(a.symbol))]),a.name?t("span",{staticClass:"qt-symbol-option-desc"},[e._v(e._s(a.name))]):e._e()])])})],2)],1),t("div",{staticClass:"qt-price-display",class:e.priceChangeClass},[t("span",{staticClass:"qt-current-price"},[e._v("$"+e._s(e.formatPrice(e.currentPrice)))])])]),t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.exchange"))+" "),t("span",{staticClass:"qt-crypto-hint"},[e._v(e._s(e.$t("quickTrade.cryptoOnly")))])]),t("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("quickTrade.selectExchange"),loading:e.credLoading,notFoundContent:e.$t("quickTrade.noExchange")},on:{change:e.onCredentialChange},model:{value:e.selectedCredentialId,callback:function(t){e.selectedCredentialId=t},expression:"selectedCredentialId"}},e._l(e.credentials,function(a){return t("a-select-option",{key:a.id,attrs:{value:a.id}},[t("span",{staticStyle:{"text-transform":"capitalize"}},[e._v(e._s(a.exchange_id||a.name))]),a.market_type?t("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{size:"small"}},[e._v(e._s(a.market_type))]):e._e()],1)}),1),e.balance.available>0?t("div",{staticClass:"qt-balance"},[t("span",{staticClass:"qt-balance-label"},[e._v(e._s(e.$t("quickTrade.available"))+":")]),t("span",{staticClass:"qt-balance-value"},[e._v("$"+e._s(e.formatPrice(e.balance.available)))])]):e._e()],1),t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-direction-toggle"},[t("div",{staticClass:"qt-dir-btn qt-dir-long",class:{active:"buy"===e.side},on:{click:function(t){e.side="buy"}}},[t("a-icon",{attrs:{type:"arrow-up"}}),e._v(" "+e._s(e.$t("quickTrade.long"))+" ")],1),t("div",{staticClass:"qt-dir-btn qt-dir-short",class:{active:"sell"===e.side},on:{click:function(t){e.side="sell"}}},[t("a-icon",{attrs:{type:"arrow-down"}}),e._v(" "+e._s(e.$t("quickTrade.short"))+" ")],1)])]),t("div",{staticClass:"qt-section"},[t("a-radio-group",{staticStyle:{width:"100%"},attrs:{"button-style":"solid",size:"small"},model:{value:e.orderType,callback:function(t){e.orderType=t},expression:"orderType"}},[t("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"market"}},[e._v(" "+e._s(e.$t("quickTrade.market"))+" ")]),t("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"limit"}},[e._v(" "+e._s(e.$t("quickTrade.limit"))+" ")])],1)],1),"limit"===e.orderType?t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.limitPrice")))]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:e.priceStep,precision:e.pricePrecision,placeholder:e.$t("quickTrade.enterPrice")},model:{value:e.limitPrice,callback:function(t){e.limitPrice=t},expression:"limitPrice"}})],1):e._e(),t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.amount"))+" (USDT)")]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,step:10,precision:2,placeholder:e.$t("quickTrade.enterAmount")},model:{value:e.amount,callback:function(t){e.amount=t},expression:"amount"}}),t("div",{staticClass:"qt-quick-amounts"},e._l(e.quickAmountPcts,function(a){return t("a-button",{key:a,attrs:{size:"small",disabled:e.balance.available<=0},on:{click:function(t){return e.setAmountByPercent(a)}}},[e._v(" "+e._s(a)+"% ")])}),1)],1),"spot"!==e.marketType?t("div",{staticClass:"qt-section"},[t("div",{staticClass:"qt-label"},[e._v(e._s(e.$t("quickTrade.leverage")))]),t("div",{staticClass:"qt-leverage-row"},[t("a-slider",{staticStyle:{flex:"1","margin-right":"12px"},attrs:{min:1,max:125,marks:e.leverageMarks,tipFormatter:function(e){return e+"x"}},model:{value:e.leverage,callback:function(t){e.leverage=t},expression:"leverage"}}),t("a-input-number",{staticStyle:{width:"80px"},attrs:{min:1,max:125,formatter:function(e){return"".concat(e,"x")},parser:function(e){return e.replace("x","")}},model:{value:e.leverage,callback:function(t){e.leverage=t},expression:"leverage"}})],1)]):e._e(),t("a-collapse",{staticStyle:{background:"transparent",margin:"0 16px"},attrs:{bordered:!1}},[t("a-collapse-panel",{key:"tpsl",style:e.collapseStyle,attrs:{header:e.$t("quickTrade.tpsl")}},[t("div",{staticClass:"qt-tpsl-row"},[t("div",{staticClass:"qt-tpsl-item"},[t("span",{staticClass:"qt-label",staticStyle:{color:"#52c41a"}},[e._v(e._s(e.$t("quickTrade.tp")))]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:e.priceStep,precision:e.pricePrecision,placeholder:e.$t("quickTrade.tpPlaceholder")},model:{value:e.tpPrice,callback:function(t){e.tpPrice=t},expression:"tpPrice"}})],1),t("div",{staticClass:"qt-tpsl-item"},[t("span",{staticClass:"qt-label",staticStyle:{color:"#f5222d"}},[e._v(e._s(e.$t("quickTrade.sl")))]),t("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:e.priceStep,precision:e.pricePrecision,placeholder:e.$t("quickTrade.slPlaceholder")},model:{value:e.slPrice,callback:function(t){e.slPrice=t},expression:"slPrice"}})],1)])])],1),t("div",{staticClass:"qt-submit-section"},[t("a-button",{staticClass:"qt-submit-btn",class:["buy"===e.side?"qt-btn-long":"qt-btn-short"],attrs:{type:"buy"===e.side?"primary":"danger",size:"large",block:"",loading:e.submitting,disabled:!e.canSubmit},on:{click:e.handleSubmit}},[t("a-icon",{attrs:{type:"buy"===e.side?"arrow-up":"arrow-down"}}),e._v(" "+e._s("buy"===e.side?e.$t("quickTrade.buyLong"):e.$t("quickTrade.sellShort"))+" "+e._s(e.symbol)+" ")],1)],1),t("div",{staticClass:"qt-position-section"},[t("div",{staticClass:"qt-section-header"},[t("a-icon",{attrs:{type:"wallet"}}),e._v(" "+e._s(e.$t("quickTrade.currentPosition"))+" ")],1),e.currentPosition?t("div",{staticClass:"qt-position-card",class:e.currentPosition.side},[t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.side")))]),t("a-tag",{attrs:{color:"long"===e.currentPosition.side?"#52c41a":"#f5222d",size:"small"}},[e._v(" "+e._s("long"===e.currentPosition.side?e.$t("quickTrade.long"):e.$t("quickTrade.short"))+" ")])],1),t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.posSize")))]),t("span",[e._v(e._s(e.currentPosition.size))])]),t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.entryPrice")))]),t("span",[e._v("$"+e._s(e.formatPrice(e.currentPosition.entry_price)))])]),e.currentPosition.mark_price?t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.markPrice")))]),t("span",[e._v("$"+e._s(e.formatPrice(e.currentPosition.mark_price)))])]):e._e(),e.currentPosition.leverage&&e.currentPosition.leverage>1?t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.leverage")))]),t("span",[e._v(e._s(e.currentPosition.leverage)+"x")])]):e._e(),t("div",{staticClass:"qt-pos-row"},[t("span",[e._v(e._s(e.$t("quickTrade.unrealizedPnl")))]),t("span",{class:e.currentPosition.unrealized_pnl>=0?"qt-green":"qt-red"},[e._v(" $"+e._s(e.formatPrice(e.currentPosition.unrealized_pnl))+" ")])]),t("a-button",{staticStyle:{"margin-top":"8px"},attrs:{type:"danger",size:"small",block:"",ghost:"",loading:e.closingPosition},on:{click:e.handleClosePosition}},[e._v(" "+e._s(e.$t("quickTrade.closePosition"))+" ")])],1):t("div",{staticClass:"qt-position-empty"},[t("a-empty",{staticStyle:{padding:"20px 0"},attrs:{description:e.$t("quickTrade.noPosition"),image:!1}},[t("template",{slot:"description"},[t("span",{staticStyle:{color:"#999","font-size":"12px"}},[e._v(e._s(e.$t("quickTrade.noPositionHint")))])])],2)],1)]),e.recentTrades.length>0?t("div",{staticClass:"qt-history-section"},[t("a-collapse",{attrs:{bordered:!1,activeKey:e.historyCollapsed?[]:["history"]},on:{change:e.handleHistoryCollapse}},[t("a-collapse-panel",{key:"history",style:e.collapseStyle,attrs:{showArrow:!1}},[t("template",{slot:"header"},[t("div",{staticClass:"qt-section-header",staticStyle:{margin:"0",padding:"0"}},[t("a-icon",{attrs:{type:"history"}}),e._v(" "+e._s(e.$t("quickTrade.recentTrades"))+" "),t("span",{staticClass:"qt-history-count"},[e._v("("+e._s(e.recentTrades.length)+")")])],1)]),t("div",{staticClass:"qt-trade-list"},e._l(e.recentTrades,function(a){return t("div",{key:a.id,staticClass:"qt-trade-item"},[t("div",{staticClass:"qt-trade-main"},[t("a-tag",{attrs:{color:"buy"===a.side?"#52c41a":"#f5222d",size:"small"}},[e._v(" "+e._s("buy"===a.side?"LONG":"SHORT")+" ")]),t("span",{staticClass:"qt-trade-symbol"},[e._v(e._s(a.symbol))]),t("span",{staticClass:"qt-trade-amount"},[e._v("$"+e._s(e.formatPrice(a.amount)))])],1),t("div",{staticClass:"qt-trade-meta"},[t("a-tag",{attrs:{color:"filled"===a.status?"#52c41a":"failed"===a.status?"#f5222d":"#faad14",size:"small"}},[e._v(" "+e._s(a.status)+" ")]),t("span",{staticClass:"qt-trade-time"},[e._v(e._s(e.formatTime(a.created_at)))])],1)])}),0)],2)],1)],1):e._e()],1)},r=[],s=a(81127),n=a(56252),c=a(76338),l=a(95353),o=a(42430),u=a(75769);function d(e){return(0,u.Ay)({url:"/api/quick-trade/place-order",method:"post",data:e})}function m(e){return(0,u.Ay)({url:"/api/quick-trade/balance",method:"get",params:e})}function p(e){return(0,u.Ay)({url:"/api/quick-trade/position",method:"get",params:e})}function h(e){return(0,u.Ay)({url:"/api/quick-trade/history",method:"get",params:e})}function v(e){return(0,u.Ay)({url:"/api/quick-trade/close-position",method:"post",data:e})}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(e){return e.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(e){e?this.init():this.stopPolling()},symbol:function(e){e&&(this.currentSymbol=e)},currentSymbol:function(e){e&&(this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",e))},selectedCredentialId:function(e){e&&this.currentSymbol&&this.loadPosition()},presetSide:function(e){e&&(this.side=e)},presetPrice:function(e){e>0&&(this.currentPrice=e,this.limitPrice=e)}},methods:{init:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){return(0,s.A)().w(function(t){while(1)switch(t.n){case 0:return e.currentSymbol=e.symbol||"",e.presetSide&&(e.side=e.presetSide),e.presetPrice>0&&(e.currentPrice=e.presetPrice,e.limitPrice=e.presetPrice),t.n=1,e.loadCredentials();case 1:return t.n=2,e.loadUserInfo();case 2:return t.n=3,e.loadWatchlistSymbols();case 3:if(!e.currentSymbol){t.n=4;break}return t.n=4,e.loadPrice();case 4:if(!e.selectedCredentialId||!e.currentSymbol){t.n=5;break}return t.n=5,e.loadPosition();case 5:e.loadHistory(),e.startPolling();case 6:return t.a(2)}},t)}))()},loadUserInfo:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r,n;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(t.p=0,i=e.$store,r=(null===i||void 0===i||null===(a=i.getters)||void 0===a?void 0:a.userInfo)||{},!r||!r.id){t.n=1;break}return e.userId=r.id,t.a(2);case 1:return t.n=2,(0,y.ug)();case 2:n=t.v,n&&1===n.code&&n.data&&(e.userId=n.data.id,i&&i.commit("SET_INFO",n.data)),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[0,3]])}))()},loadWatchlistSymbols:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.userId){t.n=2;break}return t.n=1,e.loadUserInfo();case 1:if(e.userId){t.n=2;break}return t.a(2);case 2:return t.p=2,t.n=3,(0,b.Qo)({userid:e.userId});case 3:a=t.v,a&&1===a.code&&a.data&&(i=(a.data||[]).filter(function(e){return"crypto"===(e.market||"").toLowerCase()}).map(function(e){return{value:e.symbol||"",symbol:e.symbol||"",name:e.name||""}}).filter(function(e){return e.value}),e.symbolSuggestions=i),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.a(2)}},t,null,[[2,4]])}))()},handleSymbolSearch:function(e){var t=this;this.symbolSearchTimer&&clearTimeout(this.symbolSearchTimer),e&&""!==e.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 t.symbolSearching=!0,a.p=1,a.n=2,(0,b._3)({market:"Crypto",keyword:e.trim(),limit:20});case 2:i=a.v,i&&1===i.code&&i.data?t.symbolSuggestions=(i.data.items||i.data||[]).map(function(e){return{value:e.symbol||"",symbol:e.symbol||"",name:e.name||""}}).filter(function(e){return e.value}):t.symbolSuggestions=[],a.n=4;break;case 3:a.p=3,a.v,t.symbolSuggestions=[];case 4:return a.p=4,t.symbolSearching=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])})),300):this.loadWatchlistSymbols()},handleSymbolChange:function(e){e&&e!==this.currentSymbol&&(this.currentSymbol=e,this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",e))},loadPrice:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.currentSymbol){t.n=1;break}return e.currentPrice=0,t.a(2);case 1:return t.p=1,t.n=2,(0,u.Ay)({url:"/api/market/price",method:"get",params:{market:"Crypto",symbol:e.currentSymbol}});case 2:a=t.v,a&&1===a.code&&a.data&&(i=parseFloat(a.data.price||0),i>0&&(e.currentPrice=i,0!==e.limitPrice&&e.limitPrice!==e.presetPrice||(e.limitPrice=i))),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},handleSymbolFocus:function(){0===this.symbolSuggestions.length&&this.loadWatchlistSymbols()},loadCredentials:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.credLoading=!0,t.p=1,t.n=2,(0,o.IA)();case 2:a=t.v,1===a.code&&a.data&&(i=a.data.items||a.data||[],r=["ibkr","mt5"],e.credentials=i.filter(function(e){var t=(e.exchange_id||e.name||"").toLowerCase();return!r.includes(t)}),!e.selectedCredentialId&&e.credentials.length>0&&(e.selectedCredentialId=e.credentials[0].id,e.onCredentialChange(e.selectedCredentialId))),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.p=4,e.credLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},onCredentialChange:function(e){var t=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 t.selectedCredentialId=e,a.n=1,t.loadBalance();case 1:return a.n=2,t.loadPosition();case 2:return a.a(2)}},a)}))()},loadBalance:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.selectedCredentialId){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,m({credential_id:e.selectedCredentialId,market_type:e.marketType});case 2:a=t.v,1===a.code&&a.data&&(e.balance=a.data),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},loadPosition:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.selectedCredentialId&&e.currentSymbol){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,p({credential_id:e.selectedCredentialId,symbol:e.currentSymbol,market_type:e.marketType});case 2:if(a=t.v,!(1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0)){t.n=3;break}return e.currentPosition=a.data.positions[0],t.a(2,!0);case 3:return e.currentPosition=null,t.a(2,!1);case 4:t.n=6;break;case 5:return t.p=5,t.v,e.currentPosition=null,t.a(2,!1);case 6:return t.a(2)}},t,null,[[1,5]])}))()},loadPositionWithRetry:function(){var e=arguments,t=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=e.length>0&&void 0!==e[0]?e[0]:3,r=e.length>1&&void 0!==e[1]?e[1]:2e3,a.n=1,t.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*e/100*100)/100)},handleSubmit:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.canSubmit){t.n=1;break}return t.a(2);case 1:return e.submitting=!0,t.p=2,a={credential_id:e.selectedCredentialId,symbol:e.currentSymbol,side:e.side,order_type:e.orderType,amount:e.amount,price:"limit"===e.orderType?e.limitPrice:0,leverage:"spot"!==e.marketType?e.leverage:1,market_type:e.marketType,tp_price:e.tpPrice||0,sl_price:e.slPrice||0,source:e.source},t.n=3,d(a);case 3:if(i=t.v,1!==i.code){t.n=7;break}return e.$emit("order-success",i.data),t.n=4,e.loadBalance();case 4:return t.n=5,e.loadHistory();case 5:return t.n=6,e.loadPositionWithRetry();case 6:t.n=8;break;case 7:e.$message.error(i.msg||e.$t("quickTrade.orderFailed"));case 8:t.n=10;break;case 9:t.p=9,r=t.v,e.$message.error(r.message||e.$t("quickTrade.orderFailed"));case 10:return t.p=10,e.submitting=!1,t.f(10);case 11:return t.a(2)}},t,null,[[2,9,10,11]])}))()},handleClosePosition:function(){var e=this;return(0,n.A)((0,s.A)().m(function t(){var a,i,r;return(0,s.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.currentPosition&&e.selectedCredentialId){t.n=1;break}return t.a(2);case 1:return e.closingPosition=!0,t.p=2,a={credential_id:e.selectedCredentialId,symbol:e.currentSymbol,market_type:e.marketType,size:0,source:"manual"},t.n=3,v(a);case 3:if(i=t.v,1!==i.code){t.n=6;break}return e.$message.success(e.$t("quickTrade.positionClosed")),t.n=4,e.loadBalance();case 4:return t.n=5,e.loadHistory();case 5:e.currentPosition=null,setTimeout((0,n.A)((0,s.A)().m(function t(){return(0,s.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,e.loadPosition();case 1:return t.a(2)}},t)})),2e3),t.n=7;break;case 6:e.$message.error(i.msg||e.$t("quickTrade.orderFailed"));case 7:t.n=9;break;case 8:t.p=8,r=t.v,e.$message.error(r.message||e.$t("quickTrade.orderFailed"));case 9:return t.p=9,e.closingPosition=!1,t.f(9);case 10:return t.a(2)}},t,null,[[2,8,9,10]])}))()},startPolling:function(){var e=this;this.stopPolling(),this.pollTimer=setInterval(function(){e.currentSymbol&&e.loadPrice(),e.selectedCredentialId&&e.currentSymbol&&(e.loadBalance(),e.loadPosition())},1e4)},stopPolling:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)},handleClose:function(){this.$emit("close"),this.$emit("update:visible",!1)},handleHistoryCollapse:function(e){this.historyCollapsed=!e.includes("history")},formatPrice:function(e){var t=parseFloat(e||0);return Math.abs(t)>=1e4?t.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}):Math.abs(t)>=100?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(t)>=1?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):t.toLocaleString("en-US",{minimumFractionDigits:4,maximumFractionDigits:6})},formatTime:function(e){if(!e)return"";var t=new Date(e),a=function(e){return String(e).padStart(2,"0")};return"".concat(a(t.getMonth()+1),"-").concat(a(t.getDate())," ").concat(a(t.getHours()),":").concat(a(t.getMinutes()))}},beforeDestroy:function(){this.stopPolling()}},g=f,k=a(81656),_=(0,k.A)(g,i,r,!1,null,"0d547552",null),P=_.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/946-legacy.9345bb3c.js b/frontend/dist/js/946-legacy.9345bb3c.js deleted file mode 100644 index 8b8d495..0000000 --- a/frontend/dist/js/946-legacy.9345bb3c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[946],{35644:function(t,a,e){e.r(a),e.d(a,{default:function(){return k}});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:"opp-section"},[a("div",{staticClass:"opp-header"},[a("span",{staticClass:"opp-title"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.title")))],1),a("span",{staticClass:"opp-header-right"},[a("span",{staticClass:"opp-update-hint"},[a("a-icon",{attrs:{type:"clock-circle"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.updateHint"))+" ")],1),a("a-button",{attrs:{type:"link",size:"small",icon:"reload",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[t._v(" "+t._s(t.$t("common.refresh")||"刷新")+" ")])],1)]),a("div",{staticClass:"opp-carousel-wrapper",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"opp-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(e,s){return a("div",{key:"opp-"+s,staticClass:"opp-card",class:[e.impact,"market-"+(e.market||"").toLowerCase()],on:{click:function(a){return t.analyzeOpportunity(e)}}},[a("div",{staticClass:"opp-top"},[a("span",{staticClass:"opp-symbol"},[t._v(t._s(e.symbol))]),a("a-tag",{staticClass:"opp-market-tag",attrs:{color:t.getMarketTagColor(e.market),size:"small"}},[t._v(" "+t._s(t.getMarketLabel(e.market))+" ")])],1),a("div",{staticClass:"opp-price"},[t._v("$"+t._s(t.formatOppPrice(e.price)))]),a("div",{staticClass:"opp-change",class:e.change_24h>=0?"up":"down"},[t._v(" "+t._s(e.change_24h>=0?"+":"")+t._s((e.change_24h||0).toFixed(1))+"% ")]),a("div",{staticClass:"opp-signal"},[a("a-tag",{attrs:{color:t.getSignalColor(e.signal),size:"small"}},[t._v(t._s(t.getSignalLabel(e.signal)))])],1),a("div",{staticClass:"opp-reason"},[t._v(t._s(t.getReasonText(e)))]),a("div",{staticClass:"opp-actions"},[a("span",{staticClass:"opp-action",on:{click:function(a){return a.stopPropagation(),t.analyzeOpportunity(e)}}},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.opportunities.analyze"))+" ")],1),"Crypto"===e.market?a("span",{staticClass:"opp-trade-btn",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}}),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:"monitor"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"eye"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.monitor"))+" ")],1),a("div",{staticClass:"tab-body"},["monitor"===t.activeTab?a("PortfolioView",{attrs:{embedded:!0}}):t._e()],1)])],1)],1)],1)},i=[],o=e(81127),n=e(56252),r=e(2403),c=e(76338),l=(e(28706),e(74423),e(34782),e(27495),e(21699),e(25440),e(95353)),p=e(91950),u=e(21494),d=e(44146),h=e(8700),y={name:"AIAssetAnalysis",components:{AnalysisView:p["default"],PortfolioView:u["default"],QuickTradePanel:h.A},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:""}},computed:(0,c.A)((0,c.A)({},(0,l.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,r.A)(this.opportunities),(0,r.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,n.A)((0,o.A)().m(function e(){var s,i,n;return(0,o.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:n=e.v,n&&1===n.code&&Array.isArray(n.data)&&(a.opportunities=n.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"};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 o=Math.abs(t.change_24h||0).toFixed(1),n=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",o).replace("{change7d}",n)},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;this.activeTab="quick";var e=t.market||"Crypto";this.presetSymbol="".concat(e,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},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"))}}},m=y,b=e(81656),v=(0,b.A)(m,s,i,!1,null,"68efba62",null),k=v.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/app-legacy.b9bb3b91.js b/frontend/dist/js/app-legacy.56c65dc3.js similarity index 69% rename from frontend/dist/js/app-legacy.b9bb3b91.js rename to frontend/dist/js/app-legacy.56c65dc3.js index 5da618c..dc05fe7 100644 --- a/frontend/dist/js/app-legacy.b9bb3b91.js +++ b/frontend/dist/js/app-legacy.56c65dc3.js @@ -1 +1 @@ -(function(){var e={505:function(e,t,a){"use strict";a.d(t,{iD:function(){return o},ri:function(){return l},ug:function(){return r}});var i=a(75769),s={Login:"/api/auth/login",Logout:"/api/auth/logout",UserInfo:"/api/auth/info",UserMenu:"/user/nav"};function o(e){return(0,i.Ay)({url:s.Login,method:"post",data:e})}function n(){return(0,i.Ay)({url:s.UserInfo,method:"get",headers:{"Content-Type":"application/json;charset=UTF-8"}})}function r(){return n()}function l(){return(0,i.Ay)({url:s.Logout,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8"}})}},2304:function(e,t,a){"use strict";e.exports=a.p+"img/slogo.6a59b21e.png"},5839:function(e,t,a){var i={"./ar-SA":[217,618],"./ar-SA.js":[217,618],"./de-DE":[73065,879],"./de-DE.js":[73065,879],"./en-US":[45958],"./en-US.js":[45958],"./fr-FR":[92556,969],"./fr-FR.js":[92556,969],"./ja-JP":[7392,638],"./ja-JP.js":[7392,638],"./ko-KR":[20729,840],"./ko-KR.js":[20729,840],"./th-TH":[11422,301],"./th-TH.js":[11422,301],"./vi-VN":[69654,424],"./vi-VN.js":[69654,424],"./zh-CN":[4070,644],"./zh-CN.js":[4070,644],"./zh-TW":[84540,892],"./zh-TW.js":[84540,892]};function s(e){if(!a.o(i,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=i[e],s=t[0];return Promise.all(t.slice(1).map(a.e)).then(function(){return a(s)})}s.keys=function(){return Object.keys(i)},s.id=5839,e.exports=s},33153:function(e,t,a){"use strict";e.exports=a.p+"img/logo.e0f510a8.png"},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=o(e);return a(t)}function o(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=o,e.exports=s,s.id=35358},36911:function(e,t,a){"use strict";a.d(t,{EM:function(){return o},GF:function(){return g},KP:function(){return v},Ke:function(){return d},Ox:function(){return r},P7:function(){return l},UH:function(){return m},WM:function(){return n},Yx:function(){return b},kv:function(){return h},mV:function(){return c},oK:function(){return y},tq:function(){return f},v_:function(){return u},xQ:function(){return p}});var i=a(75769),s={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"};function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Ay)({url:s.strategies,method:"get",params:e})}function n(e){return(0,i.Ay)({url:s.createStrategy,method:"post",data:e})}function r(e){return(0,i.Ay)({url:s.batchCreateStrategies,method:"post",data:e})}function l(e,t){return(0,i.Ay)({url:s.updateStrategy,method:"put",params:{id:e},data:t})}function d(e){return(0,i.Ay)({url:s.stopStrategy,method:"post",params:{id:e}})}function c(e){return(0,i.Ay)({url:s.startStrategy,method:"post",params:{id:e}})}function u(e){return(0,i.Ay)({url:s.deleteStrategy,method:"delete",params:{id:e}})}function m(e){return(0,i.Ay)({url:s.batchStartStrategies,method:"post",data:e})}function g(e){return(0,i.Ay)({url:s.batchStopStrategies,method:"post",data:e})}function p(e){return(0,i.Ay)({url:s.batchDeleteStrategies,method:"delete",data:e})}function h(e){return(0,i.Ay)({url:s.testConnection,method:"post",data:{exchange_config:e}})}function f(e){return(0,i.Ay)({url:s.trades,method:"get",params:{id:e}})}function y(e){return(0,i.Ay)({url:s.positions,method:"get",params:{id:e}})}function b(e){return(0,i.Ay)({url:s.equityCurve,method:"get",params:{id:e}})}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Ay)({url:s.notifications,method:"get",params:e})}},45958:function(e,t,a){"use strict";a.r(t);var i=a(76338),s=a(1512),o=a(3508),n=a.n(o),r={antLocale:s.A,momentName:"eu",momentLocale:n()},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",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":"Trading Assistant","menu.dashboard.portfolio":"Portfolio","menu.dashboard.globalMarket":"Global Market","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.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.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.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.historyNoAIResult":"No AI analysis result","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)","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.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.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":"Quick setup with recommended defaults","trading-assistant.form.advancedModeHint":"Customize all parameters for pros","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.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.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.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. Some changes require Python service restart to take effect.","settings.copyRestartCmd":"Copy restart command","settings.copySuccess":"Copied","settings.copyFailed":"Copy failed","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_PORT":"Proxy Port","settings.field.PROXY_HOST":"Proxy Host","settings.field.PROXY_SCHEME":"Proxy Scheme","settings.field.PROXY_URL":"Full Proxy URL","settings.field.CORS_ORIGINS":"CORS Origins","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_AI_ANALYSIS":"Enable AI Analysis","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.OPENROUTER_API_KEY":"OpenRouter API Key","settings.field.OPENROUTER_API_URL":"OpenRouter API URL","settings.field.OPENROUTER_MODEL":"Default Model","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.AI_MODELS_JSON":"Models JSON","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.BOCHA_API_KEYS":"Bocha 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.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.BOCHA_API_KEYS":"Bocha Search API keys, comma-separated for rotation","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.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.testSent":"Test notification sent, please check your notification channels","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.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.colSymbol":"Symbol","systemOverview.colCapital":"Capital","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.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_VIP_BYPASS":"VIP Bypass (Legacy)","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.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_VIP_BYPASS":"Legacy switch. If enabled, VIP users bypass ALL feature credit costs. Recommended OFF: VIP should only unlock VIP-free indicators.","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.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","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.","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.exchange":"Exchange","quickTrade.selectExchange":"Select exchange account","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.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 Trading","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"};t["default"]=(0,i.A)((0,i.A)({},r),l)},55434:function(e,t,a){"use strict";a.d(t,{t:function(){return o}});var i=a(76338),s=a(95353),o={computed:(0,i.A)((0,i.A)({},(0,s.aH)({layout:function(e){return e.app.layout},navTheme:function(e){return e.app.theme},primaryColor:function(e){return e.app.color},colorWeak:function(e){return e.app.weak},fixedHeader:function(e){return e.app.fixedHeader},fixedSidebar:function(e){return e.app.fixedSidebar},contentWidth:function(e){return e.app.contentWidth},autoHideHeader:function(e){return e.app.autoHideHeader},isMobile:function(e){return e.app.isMobile},sideCollapsed:function(e){return e.app.sideCollapsed},multiTab:function(e){return e.app.multiTab}})),{},{isTopMenu:function(){return"topmenu"===this.layout}}),methods:{isSideMenu:function(){return!this.isTopMenu}}}},67569:function(e,t,a){"use strict";a.d(t,{Z$:function(){return i},dH:function(){return s}});a(27495);function i(){var e=new Date,t=e.getHours();return t<12?"Good morning":t<18?"Good afternoon":"Good evening"}function s(){var e=["休息一会儿吧","准备吃什么呢?","要不要打一把 DOTA","我猜你可能累了"],t=Math.floor(Math.random()*e.length);return e[t]}},75314:function(e,t,a){"use strict";a.d(t,{$C:function(){return y},Db:function(){return p},Fb:function(){return u},MV:function(){return c},OT:function(){return b},RM:function(){return l},Wb:function(){return g},Xh:function(){return i},cf:function(){return n},iK:function(){return o},jc:function(){return f},nc:function(){return s},nd:function(){return r},o6:function(){return h},sl:function(){return m},yG:function(){return d}});var i="Access-Token",s="User-Info",o="User-Roles",n="sidebar_type",r="is_mobile",l="nav_theme",d="layout",c="fixed_header",u="fixed_sidebar",m="content_width",g="auto_hide_header",p="color",h="weak",f="multi_tab",y="app_language",b={Fluid:"Fluid",Fixed:"Fixed"}},75769:function(e,t,a){"use strict";a.d(t,{He:function(){return y},Ay:function(){return b}});var i=a(44735),s=(a(74423),a(26099),a(27495),a(21699),a(71761),a(25440),a(42762),a(72505)),o=a.n(s),n=a(74053),r=a.n(n),l=a(56427),d={vm:{},install:function(e,t){this.installed||(this.installed=!0,t&&(e.axios=t,Object.defineProperties(e.prototype,{axios:{get:function(){return t}},$http:{get:function(){return t}}})))}},c=a(75314),u="PHPSESSID",m="lang",g=!1;function p(){var e=r().get(c.Xh);return e?("string"!==typeof e&&(e=e&&"object"===(0,i.A)(e)&&(e.token||e.value)||null),"string"===typeof e&&e.length>0?e:null):null}var h=o().create({baseURL:"/",timeout:3e4,withCredentials:!0}),f=function(e){if(e.response){var t=e.response.data;if(403===e.response.status&&l.A.error({message:"(Demo Mode)",description:t.msg||t.message||"Read-only in demo mode"}),401===e.response.status&&(!t.result||!t.result.isLogin)&&!g){g=!0;try{r().remove(c.Xh),r().remove(c.nc),r().remove(c.iK),r().remove(u)}catch(s){}l.A.error({message:"Unauthorized",description:t.msg||t.message||"Token invalid or expired, please login again."});var a=window.location.hash||"";if(!a.includes("/user/login")){var i=encodeURIComponent(a.replace("#","")||"/");window.location.assign("/#/user/login?redirect=".concat(i))}}}return Promise.reject(e)};h.interceptors.request.use(function(e){var t=p(),a=r().get(m)||"en-US";if(e.headers["X-App-Lang"]=a,e.headers["Accept-Language"]=a,t)e.headers["Authorization"]="Bearer ".concat(t),e.headers[c.Xh]=t,e.headers["token"]=t;else if(e.url&&e.url.includes("/api/auth/info"))r().get(c.Xh);if(e.headers["Cache-Control"]="no-cache",e.headers["Pragma"]="no-cache",e.headers["If-Modified-Since"]="0","get"===(e.method||"get").toLowerCase()){var i=Date.now();e.params=Object.assign({},e.params||{},{_t:i})}var s=r().get(u);if(s&&"undefined"!==typeof document){var o=document.cookie,n=o.match(/PHPSESSID=([^;]+)/i),l=n?n[1].trim():null;if(!l||l!==s)try{window.location.hostname.includes("quantdinger.com")?document.cookie="PHPSESSID=".concat(s,"; path=/; domain=.quantdinger.com; SameSite=None; Secure"):document.cookie="PHPSESSID=".concat(s,"; path=/; SameSite=None; Secure")}catch(d){}}return e},f),h.interceptors.response.use(function(e){try{if("undefined"!==typeof document){var t=document.cookie,a=t.match(/PHPSESSID=([^;]+)/i);if(a&&a[1]){var i=a[1].trim(),s=r().get(u);s&&s===i||r().set(u,i,(new Date).getTime()+864e5)}}}catch(o){}return e.data},f);var y={vm:{},install:function(e){e.use(d,h)}},b=h},87145: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)])},o=[],n={navTheme:"light",primaryColor:"#13C2C2",layout:"sidemenu",contentWidth:"Fluid",fixedHeader:!0,fixSiderbar:!0,colorWeak:!1,menu:{locale:!0},title:"QuantDinger",pwa:!1,iconfontUrl:"",production:!0},r=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=n.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}),v=[f];function A(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 S(){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?v.includes(e)?t(A(e)):a(5839)("./".concat(e)).then(function(t){var a=t.default;return b.setLocaleMessage(e,a),v.push(e),p().updateLocale(a.momentName,a.momentLocale),A(e)}):t(e)})}function k(e){return b.t("".concat(e))}var w,T,P=b,C={data:function(){return{}},computed:{locale:function(){var e=this.$route.meta.title;return e&&r("".concat(k(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(81656),_=(0,R.A)(E,s,o,!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}}))},F=(a(96205),a(77197)),O=(a(50769),a(40255)),B=(a(17735),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"],j={"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"},W={"zh-CN":"🇨🇳","zh-TW":"sg","en-US":"🇺🇸","ja-JP":"🇯🇵","ko-KR":"🇰🇷","vi-VN":"🇻🇳","th-TH":"🇹🇭","ar-SA":"🇸🇦","fr-FR":"🇫🇷","de-DE":"🇩🇪"},$={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":j[e]}},[W[e]])," ",j[e]])})]);return t(F.Ay,{attrs:{overlay:s,placement:"bottomRight"}},[t("span",{class:a},[t(O.A,{attrs:{type:"global",title:k("navBar.lang")}})])])}},G=$,Q={name:"UserLayout",components:{SelectLang:G},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=Q,K=(0,R.A)(V,L,x,!1,null,"7ae30672",null),z=K.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(" V2.2.1 ")])])])],1)}),ae=[],ie=a(18787),se=a(69511),oe=a.n(se),ne=a(58391),re=a.n(ne),le={getAntdSerials:function(e){var t=new Array(9).fill().map(function(t,a){return oe().varyColor.lighten(e,a/10)}),a=re()(e),i=oe().varyColor.toNum3(e.replace("#","")).join(",");return t.concat(a).concat(i)},changeColor:function(e){if(!oe()||!oe().changer||"function"!==typeof oe().changer.changeColor)return Promise.resolve();var t={newColors:this.getAntdSerials(e),changeUrl:function(e){return"/".concat(e)}};try{return oe().changer.changeColor(t,Promise)}catch(a){return Promise.resolve()}}},de=function(){return[{key:P.t("app.setting.themecolor.dust"),color:"#F5222D"},{key:P.t("app.setting.themecolor.volcano"),color:"#FA541C"},{key:P.t("app.setting.themecolor.sunset"),color:"#FAAD14"},{key:P.t("app.setting.themecolor.cyan"),color:"#13C2C2"},{key:P.t("app.setting.themecolor.green"),color:"#52C41A"},{key:P.t("app.setting.themecolor.daybreak"),color:"#1890FF"},{key:P.t("app.setting.themecolor.geekblue"),color:"#2F54EB"},{key:P.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(P.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(96305),a(43898)),ve={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(){}})}}},Ae=ve,Se=(0,R.A)(Ae,fe,ye,!1,null,null,null),ke=Se.exports,we=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)},Te=[],Pe=a(81127),Ce=a(2403),Ee=a(56252),Re=a(36911),_e=a(75769),Ie={name:"HeaderNotice",data:function(){return{loading:!1,visible:!1,detailVisible:!1,detailNotice:null,notifications:[],lastFetchId:0,pollingTimer:null}},computed:{unreadCount:function(){return this.notifications.filter(function(e){return!e.is_read}).length},isHtmlReport:function(){return!(!this.detailNotice||!this.detailNotice.message)&&(this.detailNotice.message.includes('

')||this.detailNotice.message.includes("