diff --git a/.hermes/plans/2026-08-29_data-source-expansion-phase-2.md b/.hermes/plans/2026-08-29_data-source-expansion-phase-2.md index 6269250..6591bd8 100644 --- a/.hermes/plans/2026-08-29_data-source-expansion-phase-2.md +++ b/.hermes/plans/2026-08-29_data-source-expansion-phase-2.md @@ -93,6 +93,23 @@ These are NOT quick plain-HTML collectors — they need a browser/XHR approach o logged-in/authorized session. Do them as a separate effort if the analysis needs them, not as simple additions to this collector family. +## Status updates (2026-08-29, follow-up asks) +- **Flexible scoring**: board no longer crashes on any single source failure — + `_fetch_with_cache` degrades (returns {} → theme drops that source; previous + good value kept as stale by the daily cache). Verified all-sources-down builds + 13 themes. +- **Per-source calc detail**: `symbolDetail.factor_sources` shows, per theme, each + factor's source → raw → normalized → weight → contribution (audit trail for the + owner to tune weights). Also exposed in `/api/v1/dashboard` as `factor_sources`. +- **HAR feasibility (deferred sources)**: captured REIC via `har-derived-api-client` + (Playwright drove the JS SPA → HAR → derived XHR `POST /Home/Web_All_Num_View`). + Method WORKS and endpoint is derivable, but the homepage XHR returned an empty + body — real property data needs a deeper interaction (navigate to a Transfer + page and click to load its data). A full REIC collector is a larger follow-up, + not a quick add. NBTC's 403 is an IP/fingerprint anti-bot block that HAR replay + (plain HTTP) likely canNOT bypass — skip NBTC unless a session/credential exists. + + --- ## Task Breakdown diff --git a/backend/app/__init__.py b/backend/app/__init__.py index a9ca845..1fb7789 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -717,6 +717,7 @@ def create_app(config: dict[str, Any] | None = None) -> Flask: from app import daily_cache cache = app.extensions.setdefault("daily_cache", daily_cache.DailyCache()) current = app.extensions.get("tourism_result") + dash = {} try: dash = RealDashboard((current or {}).get("signals", []), cache).build() theme_surprises = {t["id"]: t.get("surprise") for t in dash.get("themes", [])} @@ -738,6 +739,27 @@ def create_app(config: dict[str, Any] | None = None) -> Flask: latest_price=price, price_date=price_date, momentum=themes_mod._load_momentum(), ) + # per-source factor-level audit: for each theme this symbol belongs to, + # show source -> raw -> normalized -> weight -> contribution so the owner + # sees exactly how each source scored and how the weights were applied. + fetch_data = dash.get("fetch_data", {}) + detail["factor_sources"] = { + tid: themes_mod.factor_source_breakdown(fetch_data, tid) + for tid in detail.get("themes", []) + } + # fallback: if the dashboard fetch was empty (degraded), rebuild it once + if not fetch_data: + try: + from app import daily_cache as _dc + cache2 = _dc.DailyCache() + dash2 = RealDashboard((current or {}).get("signals", []), cache2).build() + fetch_data2 = dash2.get("fetch_data", {}) + detail["factor_sources"] = { + tid: themes_mod.factor_source_breakdown(fetch_data2, tid) + for tid in detail.get("themes", []) + } + except Exception: + pass return jsonify(detail) @app.get("/api/v1/backtest/readiness") diff --git a/backend/app/dashboard.py b/backend/app/dashboard.py index 21f5dfe..83fe933 100644 --- a/backend/app/dashboard.py +++ b/backend/app/dashboard.py @@ -32,13 +32,25 @@ def _fetch_with_cache( fetcher: Callable[[], dict], label: str, ) -> dict: + """Fetch a source, degrading gracefully instead of crashing the board. + + Flexible-scoring rule (user decision): if a source cannot be fetched AND + there is no previously-good cached value, return an empty dict so the + theme scorer simply drops that source's factors — the board still renders + from the sources that are available. If a previous good value exists the + daily cache returns it as stale (so the theme keeps using the last known + numbers). We never let one upstream failure take down the whole board. + """ + import logging + log = logging.getLogger("set50.dashboard") try: val = cache.fetch_or_stale(key, fetcher) if isinstance(val, dict) and "data" in val: return val["data"] return val or {} except Exception as exc: - raise DashboardError(f"no real data for {label}: {exc}") from exc + log.warning("dropping source %r (no cached value): %s", label, exc) + return {} def _zscore(value: float, mean: float, stdev: float) -> float: @@ -174,6 +186,16 @@ class RealDashboard: "macro": macro_d, "board": board, "sources": sources, + # raw per-module fetched data (fetch_module -> source dict) so the + # symbol-detail endpoint can compute a per-source factor audit. + "fetch_data": fetched, + # per-theme factor-level contribution (source -> raw -> normalized -> + # weight -> contribution) so the owner can audit exactly how each + # theme score was built and tune weights. + "factor_sources": { + tid: themes_mod.factor_source_breakdown(fetched, tid) + for tid in themes_mod.THEMES + }, # unambiguous split so "7 vs 5" style confusion is impossible: # distinct provider rows vs raw FACTORS-registry factor keys. "source_summary": { diff --git a/backend/app/themes.py b/backend/app/themes.py index 286a7ca..27d8a61 100644 --- a/backend/app/themes.py +++ b/backend/app/themes.py @@ -296,6 +296,61 @@ def compute_theme_surprises(fetched: dict, tourism_surprise: Optional[float] = N return out +def factor_source_breakdown(fetched: dict, theme_id: str) -> list: + """Per-factor contribution detail for one theme (what the user asked for). + + For each FACTOR a theme references, show exactly how it contributed to the + theme surprise: + - source: the fetch-module name (e.g. 'macro_thai', 'te_thailand') + - name_th: the factor's Thai label + - raw: the raw collected value + - normalized: the sign/center/span-normalized score in [-1, 1] + - weight: the per-theme weight (positive magnitude; direction is in sign) + - contribution: weight * normalized + - missing: True when the source had no value so the factor was dropped + + This is the audit trail that lets the owner see "which source scored what, + and how the weight was applied" and tune weights/thesis more easily. + """ + from . import factors as factors_mod + + tdef = THEMES.get(theme_id, {}) + rows = [] + for ref in tdef.get("factors", []): + fkey = ref.get("key") + fact = factors_mod.FACTORS.get(fkey) + if not fact: + continue + fetch_mod = fact.get("fetch") + val = factors_mod.factor_value(fact, fetched.get(fetch_mod)) + w = float(ref.get("weight", 1.0)) + if val is None: + rows.append({ + "factor": fkey, "source": fetch_mod, + "name_th": fact.get("name_th", fkey), + "frequency": fact.get("frequency", "monthly"), + "sign": fact.get("sign", 1), + "raw": None, "normalized": None, "weight": w, + "contribution": None, "missing": True, + }) + continue + norm = factors_mod.normalize(val, sign=fact.get("sign", 1), + center=fact.get("center", 0.0), + span=fact.get("span", 10.0)) + rows.append({ + "factor": fkey, "source": fetch_mod, + "name_th": fact.get("name_th", fkey), + "frequency": fact.get("frequency", "monthly"), + "sign": fact.get("sign", 1), + "raw": round(val, 4) if val is not None else None, + "normalized": norm, + "weight": w, + "contribution": round(w * (norm or 0.0), 4) if norm is not None else None, + "missing": False, + }) + return rows + + _SIAMCHART_GROWTH_W = 1.5 # R1 (PEAD): EPS-growth dominates value; literature (Bernard-Thomas 1990, # Livnat-Mendenhall 2006) shows drift follows earnings, not just yield. _SIAMCHART_YIELD_W = 2.0 # dividend floor for value names diff --git a/backend/tests/test_themes.py b/backend/tests/test_themes.py index bec018b..323d21e 100644 --- a/backend/tests/test_themes.py +++ b/backend/tests/test_themes.py @@ -276,3 +276,35 @@ class RegistryDrivenSurpriseTest(unittest.TestCase): f"factor {fkey!r} targets value_key {value_key!r} that fetch " f"module {fetch_mod!r} never emits -> dead factor", ) + + def test_factor_source_breakdown_shows_per_source_contribution(self): + """Audit trail: each factor shows source/raw/normalized/weight/contribution + so the owner can see exactly how every source scored and weight applied.""" + from app import themes + fetched = { + "macro_thai": { + "private_consumption_yoy": 4.9, "headline_inflation_yoy": 1.95, + "manufacturing_yoy": -3.1, "private_investment_yoy": 18.1, + "core_inflation_yoy": 1.0, "unemployment_pct": 1.0, + "tourists_ytd_mn": 16.2, + }, + "te_thailand": { + "retail_sales_yoy": -5.0, "consumer_confidence": 50.0, + "interest_rate_pct": 1.5, "loans_to_fin_corp": 10000000.0, + }, + "thai_trade": {"imports_usdm": 38000.0, "current_account_usdm": 500.0}, + } + rows = themes.factor_source_breakdown(fetched, "retail") + # retail includes te_thailand retail_sales_yoy (drives the negative read) + te_retail = next(r for r in rows if r["factor"] == "te_retail_sales_yoy") + self.assertEqual(te_retail["source"], "te_thailand") + self.assertEqual(te_retail["raw"], -5.0) + self.assertEqual(te_retail["normalized"], -0.5) # (-5-0)/10 + self.assertEqual(te_retail["weight"], 0.7) + self.assertAlmostEqual(te_retail["contribution"], -0.35, places=4) + self.assertFalse(te_retail["missing"]) + # every row carries the audit fields + for r in rows: + self.assertIn("source", r) + self.assertIn("weight", r) + self.assertIn("contribution", r) diff --git a/docs/engineering-log/2026-08-29-data-source-expansion-and-ui-fix.md b/docs/engineering-log/2026-08-29-data-source-expansion-and-ui-fix.md index cb3c3fb..cd7bbfc 100644 --- a/docs/engineering-log/2026-08-29-data-source-expansion-and-ui-fix.md +++ b/docs/engineering-log/2026-08-29-data-source-expansion-and-ui-fix.md @@ -65,6 +65,26 @@ Deferred (feasibility blocked): REIC (JS SPA/XHR), EPPO (JS/WordPress), NBTC (40 anti-bot), PTTEP (JS shell), PTT/BCP (404/DNS). Need browser/XHR approach, not plain-HTML — recorded in the plan as a separate effort. +## Phase D (same day — 3 follow-up asks) +1. **Flexible scoring (Q2)**: `_fetch_with_cache` now degrades instead of raising + `DashboardError` — source down + no cache = return {} (theme drops that + source's factors); previously-good value present = daily cache returns stale. + Board no longer crashes on any single upstream failure (verified: all-sources- + down still builds 13 themes). `DashboardError` class now unused by build(). +2. **Per-source calc detail (Q3)**: new `themes.factor_source_breakdown(fetched, + theme)` surfaced in dashboard as `fetch_data` + `factor_sources`, and in the + per-symbol modal as `symbolDetail.factor_sources` — the owner sees, per theme, + each factor's source → raw → normalized → weight → contribution (e.g. retail: + te_thailand ยอดขายปลีก -14.5 → -1.0 × 0.7 = -0.7). Backend test added. +3. **HAR feasibility for deferred sources (Q1)**: captured REIC via + `har-derived-api-client` (Playwright drive → HAR → derived XHR endpoint + `POST /Home/Web_All_Num_View`). Spike shows the method WORKS (browser drives + the JS SPA, XHR endpoint derivable) BUT the homepage XHR returned an empty + body — actual property data needs a deeper interaction (a real Transfer page + click), so a full REIC collector is a larger follow-up, not a quick add. +Finishing: commit Q2+Q3 with suite 369 green; Q1 recorded as feasible-but- +needs-deeper-capture and left as a decision for the owner. + - Note: a **concurrent process** also landed `thai_trade.py` (external-sector exports/imports/current-account) and external_* factors mid-session; its 3 initially-broken tests were fixed to reach the 360-green baseline here. diff --git a/frontend/dist/assets/index-Bymd5oSf.js b/frontend/dist/assets/index-Bymd5oSf.js deleted file mode 100644 index 3de835d..0000000 --- a/frontend/dist/assets/index-Bymd5oSf.js +++ /dev/null @@ -1,18 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(l){if(l.ep)return;l.ep=!0;const i=s(l);fetch(l.href,i)}})();/** -* @vue/shared v3.5.41 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function mn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Z={},Ft=[],We=()=>{},_l=()=>!1,Fs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ds=e=>e.startsWith("onUpdate:"),me=Object.assign,bn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Oi=Object.prototype.hasOwnProperty,Y=(e,t)=>Oi.call(e,t),N=Array.isArray,Dt=e=>ls(e)==="[object Map]",Ls=e=>ls(e)==="[object Set]",jn=e=>ls(e)==="[object Date]",j=e=>typeof e=="function",re=e=>typeof e=="string",ze=e=>typeof e=="symbol",X=e=>e!==null&&typeof e=="object",ml=e=>(X(e)||j(e))&&j(e.then)&&j(e.catch),bl=Object.prototype.toString,ls=e=>bl.call(e),Pi=e=>ls(e).slice(8,-1),yl=e=>ls(e)==="[object Object]",yn=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,qt=mn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$s=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Ai=/-\w/g,Ie=$s(e=>e.replace(Ai,t=>t.slice(1).toUpperCase())),Ri=/\B([A-Z])/g,Tt=$s(e=>e.replace(Ri,"-$1").toLowerCase()),xl=$s(e=>e.charAt(0).toUpperCase()+e.slice(1)),Gs=$s(e=>e?`on${xl(e)}`:""),Ue=(e,t)=>!Object.is(e,t),Ss=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},xn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Hn;const Ns=()=>Hn||(Hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function js(e){if(N(e)){const t={};for(let s=0;s{if(s){const n=s.split(Ii);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ne(e){let t="";if(re(e))t=e;else if(N(e))for(let s=0;sis(s,t))}const kl=e=>!!(e&&e.__v_isRef===!0),m=e=>re(e)?e:e==null?"":N(e)||X(e)&&(e.toString===bl||!j(e.toString))?kl(e)?m(e.value):JSON.stringify(e,Tl,2):String(e),Tl=(e,t)=>kl(t)?Tl(e,t.value):Dt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,l],i)=>(s[Js(n,i)+" =>"]=l,s),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Js(s))}:ze(t)?Js(t):X(t)&&!N(t)&&!yl(t)?String(t):t,Js=(e,t="")=>{var s;return ze(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** -* @vue/reactivity v3.5.41 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let de;class ji{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&de&&(de.active?(this.parent=de,this.index=(de.scopes||(de.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t0&&--this._on===0){if(de===this)de=this.prevScope;else{let t=de;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(Yt){let t=Yt;for(Yt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;zt;){let t=zt;for(zt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Al(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Rl(e){let t,s=e.depsTail,n=s;for(;n;){const l=n.prevDep;n.version===-1?(n===s&&(s=l),Cn(n),Vi(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=l}e.deps=t,e.depsTail=s}function an(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ml(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ml(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Zt)||(e.globalVersion=Zt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!an(e))))return;e.flags|=2;const t=e.dep,s=Q,n=Fe;Q=e,Fe=!0;try{Al(e);const l=e.fn(e._value);(t.version===0||Ue(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{Q=s,Fe=n,Rl(e),e.flags&=-3}}function Cn(e,t=!1){const{dep:s,prevSub:n,nextSub:l}=e;if(n&&(n.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Cn(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Vi(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Fe=!0;const Il=[];function it(){Il.push(Fe),Fe=!1}function ot(){const e=Il.pop();Fe=e===void 0?!0:e}function Vn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Q;Q=void 0;try{t()}finally{Q=s}}}let Zt=0;class Bi{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class kn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Q||!Fe||Q===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Q)s=this.activeLink=new Bi(Q,this),Q.deps?(s.prevDep=Q.depsTail,Q.depsTail.nextDep=s,Q.depsTail=s):Q.deps=Q.depsTail=s,Fl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=Q.depsTail,s.nextDep=void 0,Q.depsTail.nextDep=s,Q.depsTail=s,Q.deps===s&&(Q.deps=n)}return s}trigger(t){this.version++,Zt++,this.notify(t)}notify(t){Sn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{wn()}}}function Fl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Fl(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const cn=new WeakMap,wt=Symbol(""),un=Symbol(""),Qt=Symbol("");function ve(e,t,s){if(Fe&&Q){let n=cn.get(e);n||cn.set(e,n=new Map);let l=n.get(s);l||(n.set(s,l=new kn),l.map=n,l.key=s),l.track()}}function nt(e,t,s,n,l,i){const r=cn.get(e);if(!r){Zt++;return}const a=u=>{u&&u.trigger()};if(Sn(),t==="clear")r.forEach(a);else{const u=N(e),g=u&&yn(s);if(u&&s==="length"){const h=Number(n);r.forEach((y,R)=>{(R==="length"||R===Qt||!ze(R)&&R>=h)&&a(y)})}else switch((s!==void 0||r.has(void 0))&&a(r.get(s)),g&&a(r.get(Qt)),t){case"add":u?g&&a(r.get("length")):(a(r.get(wt)),Dt(e)&&a(r.get(un)));break;case"delete":u||(a(r.get(wt)),Dt(e)&&a(r.get(un)));break;case"set":Dt(e)&&a(r.get(wt));break}}wn()}function Rt(e){const t=z(e);return t===e?t:(ve(t,"iterate",Qt),Me(e)?t:t.map(De))}function Hs(e){return ve(e=z(e),"iterate",Qt),e}function Be(e,t){return rt(e)?Nt(Ct(e)?De(t):t):De(t)}const Ki={__proto__:null,[Symbol.iterator](){return Zs(this,Symbol.iterator,e=>Be(this,e))},concat(...e){return Rt(this).concat(...e.map(t=>N(t)?Rt(t):t))},entries(){return Zs(this,"entries",e=>(e[1]=Be(this,e[1]),e))},every(e,t){return et(this,"every",e,t,void 0,arguments)},filter(e,t){return et(this,"filter",e,t,s=>s.map(n=>Be(this,n)),arguments)},find(e,t){return et(this,"find",e,t,s=>Be(this,s),arguments)},findIndex(e,t){return et(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return et(this,"findLast",e,t,s=>Be(this,s),arguments)},findLastIndex(e,t){return et(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return et(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qs(this,"includes",e)},indexOf(...e){return Qs(this,"indexOf",e)},join(e){return Rt(this).join(e)},lastIndexOf(...e){return Qs(this,"lastIndexOf",e)},map(e,t){return et(this,"map",e,t,void 0,arguments)},pop(){return Bt(this,"pop")},push(...e){return Bt(this,"push",e)},reduce(e,...t){return Bn(this,"reduce",e,t)},reduceRight(e,...t){return Bn(this,"reduceRight",e,t)},shift(){return Bt(this,"shift")},some(e,t){return et(this,"some",e,t,void 0,arguments)},splice(...e){return Bt(this,"splice",e)},toReversed(){return Rt(this).toReversed()},toSorted(e){return Rt(this).toSorted(e)},toSpliced(...e){return Rt(this).toSpliced(...e)},unshift(...e){return Bt(this,"unshift",e)},values(){return Zs(this,"values",e=>Be(this,e))}};function Zs(e,t,s){const n=Hs(e),l=n[t]();return n!==e&&!Me(e)&&(l._next=l.next,l.next=()=>{const i=l._next();return i.done||(i.value=s(i.value)),i}),l}const Ui=Array.prototype;function et(e,t,s,n,l,i){const r=Hs(e),a=r!==e&&!Me(e),u=r[t];if(u!==Ui[t]){const y=u.apply(e,i);return a?De(y):y}let g=s;r!==e&&(a?g=function(y,R){return s.call(this,Be(e,y),R,e)}:s.length>2&&(g=function(y,R){return s.call(this,y,R,e)}));const h=u.call(r,g,n);return a&&l?l(h):h}function Bn(e,t,s,n){const l=Hs(e),i=l!==e&&!Me(e);let r=s,a=!1;l!==e&&(i?(a=n.length===0,r=function(g,h,y){return a&&(a=!1,g=Be(e,g)),s.call(this,g,Be(e,h),y,e)}):s.length>3&&(r=function(g,h,y){return s.call(this,g,h,y,e)}));const u=l[t](r,...n);return a?Be(e,u):u}function Qs(e,t,s){const n=z(e);ve(n,"iterate",Qt);const l=n[t](...s);return(l===-1||l===!1)&&Pn(s[0])?(s[0]=z(s[0]),n[t](...s)):l}function Bt(e,t,s=[]){it(),Sn();const n=z(e)[t].apply(e,s);return wn(),ot(),n}const Wi=mn("__proto__,__v_isRef,__isVue"),Dl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ze));function qi(e){ze(e)||(e=String(e));const t=z(this);return ve(t,"has",e),t.hasOwnProperty(e)}class Ll{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const l=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!l;if(s==="__v_isReadonly")return l;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(l?i?so:Hl:i?jl:Nl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=N(t);if(!l){let u;if(r&&(u=Ki[s]))return u;if(s==="hasOwnProperty")return qi}const a=Reflect.get(t,s,_e(t)?t:n);if((ze(s)?Dl.has(s):Wi(s))||(l||ve(t,"get",s),i))return a;if(_e(a)){const u=r&&yn(s)?a:a.value;return l&&X(u)?dn(u):u}return X(a)?l?dn(a):En(a):a}}class $l extends Ll{constructor(t=!1){super(!1,t)}set(t,s,n,l){let i=t[s];const r=N(t)&&yn(s);if(!this._isShallow){const g=rt(i);if(!Me(n)&&!rt(n)&&(i=z(i),n=z(n)),!r&&_e(i)&&!_e(n))return g||(i.value=n),!0}const a=r?Number(s)e,_s=e=>Reflect.getPrototypeOf(e);function Xi(e,t,s){return function(...n){const l=this.__v_raw,i=z(l),r=Dt(i),a=e==="entries"||e===Symbol.iterator&&r,u=e==="keys"&&r,g=l[e](...n),h=s?fn:t?Nt:De;return!t&&ve(i,"iterate",u?un:wt),me(Object.create(g),{next(){const{value:y,done:R}=g.next();return R?{value:y,done:R}:{value:a?[h(y[0]),h(y[1])]:h(y),done:R}}})}}function ms(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Zi(e,t){const s={get(l){const i=this.__v_raw,r=z(i),a=z(l);e||(Ue(l,a)&&ve(r,"get",l),ve(r,"get",a));const{has:u}=_s(r),g=t?fn:e?Nt:De;if(u.call(r,l))return g(i.get(l));if(u.call(r,a))return g(i.get(a));i!==r&&i.get(l)},get size(){const l=this.__v_raw;return!e&&ve(z(l),"iterate",wt),l.size},has(l){const i=this.__v_raw,r=z(i),a=z(l);return e||(Ue(l,a)&&ve(r,"has",l),ve(r,"has",a)),l===a?i.has(l):i.has(l)||i.has(a)},forEach(l,i){const r=this,a=r.__v_raw,u=z(a),g=t?fn:e?Nt:De;return!e&&ve(u,"iterate",wt),a.forEach((h,y)=>l.call(i,g(h),g(y),r))}};return me(s,e?{add:ms("add"),set:ms("set"),delete:ms("delete"),clear:ms("clear")}:{add(l){const i=z(this),r=_s(i),a=z(l),u=!t&&!Me(l)&&!rt(l)?a:l;return r.has.call(i,u)||Ue(l,u)&&r.has.call(i,l)||Ue(a,u)&&r.has.call(i,a)||(i.add(u),nt(i,"add",u,u)),this},set(l,i){!t&&!Me(i)&&!rt(i)&&(i=z(i));const r=z(this),{has:a,get:u}=_s(r);let g=a.call(r,l);g||(l=z(l),g=a.call(r,l));const h=u.call(r,l);return r.set(l,i),g?Ue(i,h)&&nt(r,"set",l,i):nt(r,"add",l,i),this},delete(l){const i=z(this),{has:r,get:a}=_s(i);let u=r.call(i,l);u||(l=z(l),u=r.call(i,l)),a&&a.call(i,l);const g=i.delete(l);return u&&nt(i,"delete",l,void 0),g},clear(){const l=z(this),i=l.size!==0,r=l.clear();return i&&nt(l,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(l=>{s[l]=Xi(l,e,t)}),s}function Tn(e,t){const s=Zi(e,t);return(n,l,i)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?n:Reflect.get(Y(s,l)&&l in n?s:n,l,i)}const Qi={get:Tn(!1,!1)},eo={get:Tn(!1,!0)},to={get:Tn(!0,!1)};const Nl=new WeakMap,jl=new WeakMap,Hl=new WeakMap,so=new WeakMap;function no(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function En(e){return rt(e)?e:On(e,!1,Yi,Qi,Nl)}function lo(e){return On(e,!1,Ji,eo,jl)}function dn(e){return On(e,!0,Gi,to,Hl)}function On(e,t,s,n,l){if(!X(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=l.get(e);if(i)return i;const r=no(Pi(e));if(r===0)return e;const a=new Proxy(e,r===2?n:s);return l.set(e,a),a}function Ct(e){return rt(e)?Ct(e.__v_raw):!!(e&&e.__v_isReactive)}function rt(e){return!!(e&&e.__v_isReadonly)}function Me(e){return!!(e&&e.__v_isShallow)}function Pn(e){return e?!!e.__v_raw:!1}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function io(e){return!Y(e,"__v_skip")&&Object.isExtensible(e)&&Sl(e,"__v_skip",!0),e}const De=e=>X(e)?En(e):e,Nt=e=>X(e)?dn(e):e;function _e(e){return e?e.__v_isRef===!0:!1}function B(e){return oo(e,!1)}function oo(e,t){return _e(e)?e:new ro(e,t)}class ro{constructor(t,s){this.dep=new kn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:z(t),this._value=s?t:De(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Me(t)||rt(t);t=n?t:z(t),Ue(t,s)&&(this._rawValue=t,this._value=n?t:De(t),this.dep.trigger())}}function ao(e){return _e(e)?e.value:e}const co={get:(e,t,s)=>t==="__v_raw"?e:ao(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const l=e[t];return _e(l)&&!_e(s)?(l.value=s,!0):Reflect.set(e,t,s,n)}};function Vl(e){return Ct(e)?e:new Proxy(e,co)}class uo{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new kn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Zt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Q!==this)return Pl(this,!0),!0}get value(){const t=this.dep.track();return Ml(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function fo(e,t,s=!1){let n,l;return j(e)?n=e:(n=e.get,l=e.set),new uo(n,l,s)}const bs={},Ts=new WeakMap;let yt;function po(e,t=!1,s=yt){if(s){let n=Ts.get(s);n||Ts.set(s,n=[]),n.push(e)}}function ho(e,t,s=Z){const{immediate:n,deep:l,once:i,scheduler:r,augmentJob:a,call:u}=s,g=I=>l?I:Me(I)||l===!1||l===0?lt(I,1):lt(I);let h,y,R,M,K=!1,A=!1;if(_e(e)?(y=()=>e.value,K=Me(e)):Ct(e)?(y=()=>g(e),K=!0):N(e)?(A=!0,K=e.some(I=>Ct(I)||Me(I)),y=()=>e.map(I=>{if(_e(I))return I.value;if(Ct(I))return g(I);if(j(I))return u?u(I,2):I()})):j(e)?t?y=u?()=>u(e,2):e:y=()=>{if(R){it();try{R()}finally{ot()}}const I=yt;yt=h;try{return u?u(e,3,[M]):e(M)}finally{yt=I}}:y=We,t&&l){const I=y,ie=l===!0?1/0:l;y=()=>lt(I(),ie)}const ee=Hi(),V=()=>{h.stop(),ee&&ee.active&&bn(ee.effects,h)};if(i&&t){const I=t;t=(...ie)=>{const te=I(...ie);return V(),te}}let H=A?new Array(e.length).fill(bs):bs;const U=I=>{if(!(!(h.flags&1)||!h.dirty&&!I))if(t){const ie=h.run();if(I||l||K||(A?ie.some((te,pe)=>Ue(te,H[pe])):Ue(ie,H))){R&&R();const te=yt;yt=h;try{const pe=[ie,H===bs?void 0:A&&H[0]===bs?[]:H,M];H=ie,u?u(t,3,pe):t(...pe)}finally{yt=te}}}else h.run()};return a&&a(U),h=new El(y),h.scheduler=r?()=>r(U,!1):U,M=I=>po(I,!1,h),R=h.onStop=()=>{const I=Ts.get(h);if(I){if(u)u(I,4);else for(const ie of I)ie();Ts.delete(h)}},t?n?U(!0):H=h.run():r?r(U.bind(null,!0),!0):h.run(),V.pause=h.pause.bind(h),V.resume=h.resume.bind(h),V.stop=V,V}function lt(e,t=1/0,s){if(t<=0||!X(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,_e(e))lt(e.value,t,s);else if(N(e))for(let n=0;n{lt(n,t,s)});else if(yl(e)){for(const n in e)lt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&<(e[n],t,s)}return e}/** -* @vue/runtime-core v3.5.41 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function os(e,t,s,n){try{return n?e(...n):e()}catch(l){Vs(l,t,s)}}function Le(e,t,s,n){if(j(e)){const l=os(e,t,s,n);return l&&ml(l)&&l.catch(i=>{Vs(i,t,s)}),l}if(N(e)){const l=[];for(let i=0;i>>1,l=xe[n],i=es(l);i=es(s)?xe.push(e):xe.splice(_o(t),0,e),e.flags|=1,Kl()}}function Kl(){Es||(Es=Bl.then(Wl))}function mo(e){if(!N(e))dt&&e.id===-1?dt.splice(It+1,0,e):e.flags&1||(Lt.push(e),e.flags|=1);else for(let t=0;tes(s)-es(n));if(Lt.length=0,dt){for(let s=0;se.id==null?e.flags&2?-1:1/0:e.id;function Wl(e){try{for(Ve=0;Ve{n._d&&el(-1);const i=Os(t),r=kt.length;let a;try{a=e(...l)}finally{for(let u=kt.length;u>r;u--)_i();Os(i),n._d&&el(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function Mt(e,t){if(Re===null)return e;const s=qs(Re),n=e.dirs||(e.dirs=[]);for(let l=0;l1)return s&&j(t)?t.call(n&&n.proxy):t}}const xo=Symbol.for("v-scx"),So=()=>ws(xo);function en(e,t,s){return zl(e,t,s)}function zl(e,t,s=Z){const{immediate:n,deep:l,flush:i,once:r}=s,a=me({},s),u=t&&n||!t&&i!=="post";let g;if(ns){if(i==="sync"){const M=So();g=M.__watcherHandles||(M.__watcherHandles=[])}else if(!u){const M=()=>{};return M.stop=We,M.resume=We,M.pause=We,M}}const h=Se;a.call=(M,K,A)=>Le(M,h,K,A);let y=!1;i==="post"?a.scheduler=M=>{we(M,h&&h.suspense)}:i!=="sync"&&(y=!0,a.scheduler=(M,K)=>{K?M():An(M)}),a.augmentJob=M=>{t&&(M.flags|=4),y&&(M.flags|=2,h&&(M.id=h.uid,M.i=h))};const R=ho(e,t,a);return ns&&(g?g.push(R):u&&R()),R}function wo(e,t,s){const n=this.proxy,l=re(e)?e.includes(".")?Yl(n,e):()=>n[e]:e.bind(n,n);let i;j(t)?i=t:(i=t.handler,s=t);const r=rs(this),a=zl(l,i.bind(n),s);return r(),a}function Yl(e,t){const s=t.split(".");return()=>{let n=e;for(let l=0;le.__isTeleport,tn=Symbol("_leaveCb");function ko(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==at){t=s;break}}return t}function Gl(e){if(!Mn(e))return Bs(e.type)&&e.children?ko(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&j(s.default))return s.default()}}function Rn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;Rn(Bs(s.type)&&Gl(s)||s,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Jl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Un(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Ps=new WeakMap;function Gt(e,t,s,n,l=!1){if(N(e)){e.forEach((A,ee)=>Gt(A,t&&(N(t)?t[ee]:t),s,n,l));return}if(Jt(n)&&!l){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Gt(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?qs(n.component):n.el,r=l?null:i,{i:a,r:u}=e,g=t&&t.r,h=a.refs===Z?a.refs={}:a.refs,y=a.setupState,R=z(y),M=y===Z?_l:A=>Un(h,A)?!1:Y(R,A),K=(A,ee)=>!(ee&&Un(h,ee));if(g!=null&&g!==u){if(Wn(t),re(g))h[g]=null,M(g)&&(y[g]=null);else if(_e(g)){const A=t;K(g,A.k)&&(g.value=null),A.k&&(h[A.k]=null)}}if(j(u))os(u,a,12,[r,h]);else{const A=re(u),ee=_e(u);if(A||ee){const V=()=>{if(e.f){const H=A?M(u)?y[u]:h[u]:K()||!e.k?u.value:h[e.k];if(l)N(H)&&bn(H,i);else if(N(H))H.includes(i)||H.push(i);else if(A)h[u]=[i],M(u)&&(y[u]=h[u]);else{const U=[i];K(u,e.k)&&(u.value=U),e.k&&(h[e.k]=U)}}else A?(h[u]=r,M(u)&&(y[u]=r)):ee&&(K(u,e.k)&&(u.value=r),e.k&&(h[e.k]=r))};if(r){const H=()=>{V(),Ps.delete(e)};H.id=-1,Ps.set(e,H),we(H,s)}else Wn(e),V()}}}function Wn(e){const t=Ps.get(e);t&&(t.flags|=8,Ps.delete(e))}Ns().requestIdleCallback;Ns().cancelIdleCallback;const Jt=e=>!!e.type.__asyncLoader,Mn=e=>e.type.__isKeepAlive;function To(e,t){Xl(e,"a",t)}function Eo(e,t){Xl(e,"da",t)}function Xl(e,t,s=Se){const n=e.__wdc||(e.__wdc=()=>{let l=s;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(Ks(t,n,s),s){let l=s.parent;for(;l&&l.parent;)Mn(l.parent.vnode)&&Oo(n,t,s,l),l=l.parent}}function Oo(e,t,s,n){const l=Ks(t,e,n,!0);Ql(()=>{bn(n[t],l)},s)}function Ks(e,t,s=Se,n=!1){if(s){const l=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...r)=>{it();const a=rs(s),u=Le(t,s,e,r);return a(),ot(),u});return n?l.unshift(i):l.push(i),i}}const ct=e=>(t,s=Se)=>{(!ns||e==="sp")&&Ks(e,(...n)=>t(...n),s)},Po=ct("bm"),Zl=ct("m"),Ao=ct("bu"),Ro=ct("u"),Mo=ct("bum"),Ql=ct("um"),Io=ct("sp"),Fo=ct("rtg"),Do=ct("rtc");function Lo(e,t=Se){Ks("ec",e,t)}const $o=Symbol.for("v-ndc");function Ae(e,t,s,n){let l;const i=s,r=N(e);if(r||re(e)){const a=r&&Ct(e);let u=!1,g=!1;a&&(u=!Me(e),g=rt(e),e=Hs(e)),l=new Array(e.length);for(let h=0,y=e.length;ht(a,u,void 0,i));else{const a=Object.keys(e);l=new Array(a.length);for(let u=0,g=a.length;ue?xi(e)?qs(e):pn(e.parent):null,Xt=me(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pn(e.parent),$root:e=>pn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ti(e),$forceUpdate:e=>e.f||(e.f=()=>{An(e.update)}),$nextTick:e=>e.n||(e.n=vo.bind(e.proxy)),$watch:e=>wo.bind(e)}),sn=(e,t)=>e!==Z&&!e.__isScriptSetup&&Y(e,t),No={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:l,props:i,accessCache:r,type:a,appContext:u}=e;if(t[0]!=="$"){const R=r[t];if(R!==void 0)switch(R){case 1:return n[t];case 2:return l[t];case 4:return s[t];case 3:return i[t]}else{if(sn(n,t))return r[t]=1,n[t];if(l!==Z&&Y(l,t))return r[t]=2,l[t];if(Y(i,t))return r[t]=3,i[t];if(s!==Z&&Y(s,t))return r[t]=4,s[t];hn&&(r[t]=0)}}const g=Xt[t];let h,y;if(g)return t==="$attrs"&&ve(e.attrs,"get",""),g(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(s!==Z&&Y(s,t))return r[t]=4,s[t];if(y=u.config.globalProperties,Y(y,t))return y[t]},set({_:e},t,s){const{data:n,setupState:l,ctx:i}=e;return sn(l,t)?(l[t]=s,!0):n!==Z&&Y(n,t)?(n[t]=s,!0):Y(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:l,props:i,type:r}},a){let u;return!!(s[a]||e!==Z&&a[0]!=="$"&&Y(e,a)||sn(t,a)||Y(i,a)||Y(n,a)||Y(Xt,a)||Y(l.config.globalProperties,a)||(u=r.__cssModules)&&u[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Y(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function qn(e){return N(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let hn=!0;function jo(e){const t=ti(e),s=e.proxy,n=e.ctx;hn=!1,t.beforeCreate&&zn(t.beforeCreate,e,"bc");const{data:l,computed:i,methods:r,watch:a,provide:u,inject:g,created:h,beforeMount:y,mounted:R,beforeUpdate:M,updated:K,activated:A,deactivated:ee,beforeDestroy:V,beforeUnmount:H,destroyed:U,unmounted:I,render:ie,renderTracked:te,renderTriggered:pe,errorCaptured:$e,serverPrefetch:Et,expose:Ye,inheritAttrs:Ge,components:Je,directives:ut,filters:Ht}=t;if(g&&Ho(g,n,null),r)for(const se in r){const G=r[se];j(G)&&(n[se]=G.bind(s))}if(l){const se=l.call(s,s);X(se)&&(e.data=En(se))}if(hn=!0,i)for(const se in i){const G=i[se],Ne=j(G)?G.bind(s,s):j(G.get)?G.get.bind(s,s):We,pt=!j(G)&&j(G.set)?G.set.bind(s):We,Te=ae({get:Ne,set:pt});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>Te.value,set:Ee=>Te.value=Ee})}if(a)for(const se in a)ei(a[se],n,s,se);if(u){const se=j(u)?u.call(s):u;Reflect.ownKeys(se).forEach(G=>{yo(G,se[G])})}h&&zn(h,e,"c");function ue(se,G){N(G)?G.forEach(Ne=>se(Ne.bind(s))):G&&se(G.bind(s))}if(ue(Po,y),ue(Zl,R),ue(Ao,M),ue(Ro,K),ue(To,A),ue(Eo,ee),ue(Lo,$e),ue(Do,te),ue(Fo,pe),ue(Mo,H),ue(Ql,I),ue(Io,Et),N(Ye))if(Ye.length){const se=e.exposed||(e.exposed={});Ye.forEach(G=>{Object.defineProperty(se,G,{get:()=>s[G],set:Ne=>s[G]=Ne,enumerable:!0})})}else e.exposed||(e.exposed={});ie&&e.render===We&&(e.render=ie),Ge!=null&&(e.inheritAttrs=Ge),Je&&(e.components=Je),ut&&(e.directives=ut),Et&&Jl(e)}function Ho(e,t,s=We){N(e)&&(e=gn(e));for(const n in e){const l=e[n];let i;X(l)?"default"in l?i=ws(l.from||n,l.default,!0):i=ws(l.from||n):i=ws(l),_e(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[n]=i}}function zn(e,t,s){Le(N(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function ei(e,t,s,n){let l=n.includes(".")?Yl(s,n):()=>s[n];if(re(e)){const i=t[e];j(i)&&en(l,i)}else if(j(e))en(l,e.bind(s));else if(X(e))if(N(e))e.forEach(i=>ei(i,t,s,n));else{const i=j(e.handler)?e.handler.bind(s):t[e.handler];j(i)&&en(l,i,e)}}function ti(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:l,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,a=i.get(t);let u;return a?u=a:!l.length&&!s&&!n?u=t:(u={},l.length&&l.forEach(g=>As(u,g,r,!0)),As(u,t,r)),X(t)&&i.set(t,u),u}function As(e,t,s,n=!1){const{mixins:l,extends:i}=t;i&&As(e,i,s,!0),l&&l.forEach(r=>As(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const a=Vo[r]||s&&s[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const Vo={data:Yn,props:Gn,emits:Gn,methods:Ut,computed:Ut,beforeCreate:ye,created:ye,beforeMount:ye,mounted:ye,beforeUpdate:ye,updated:ye,beforeDestroy:ye,beforeUnmount:ye,destroyed:ye,unmounted:ye,activated:ye,deactivated:ye,errorCaptured:ye,serverPrefetch:ye,components:Ut,directives:Ut,watch:Ko,provide:Yn,inject:Bo};function Yn(e,t){return t?e?function(){return me(j(e)?e.call(this,this):e,j(t)?t.call(this,this):t)}:t:e}function Bo(e,t){return Ut(gn(e),gn(t))}function gn(e){if(N(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ie(t)}Modifiers`]||e[`${Tt(t)}Modifiers`];function zo(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Z;let l=s;const i=t.startsWith("update:"),r=i&&qo(n,t.slice(7));r&&(r.trim&&(l=s.map(h=>re(h)?h.trim():h)),r.number&&(l=s.map(xn)));let a,u=n[a=Gs(t)]||n[a=Gs(Ie(t))];!u&&i&&(u=n[a=Gs(Tt(t))]),u&&Le(u,e,6,l);const g=n[a+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Le(g,e,6,l)}}const Yo=new WeakMap;function ni(e,t,s=!1){const n=s?Yo:t.emitsCache,l=n.get(e);if(l!==void 0)return l;const i=e.emits;let r={},a=!1;if(!j(e)){const u=g=>{const h=ni(g,t,!0);h&&(a=!0,me(r,h))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!i&&!a?(X(e)&&n.set(e,null),null):(N(i)?i.forEach(u=>r[u]=null):me(r,i),X(e)&&n.set(e,r),r)}function Us(e,t){return!e||!Fs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Y(e,t[0].toLowerCase()+t.slice(1))||Y(e,Tt(t))||Y(e,t))}function Jn(e){const{type:t,vnode:s,proxy:n,withProxy:l,propsOptions:[i],slots:r,attrs:a,emit:u,render:g,renderCache:h,props:y,data:R,setupState:M,ctx:K,inheritAttrs:A}=e,ee=Os(e);let V,H;try{if(s.shapeFlag&4){const I=l||n,ie=I;V=Ke(g.call(ie,I,h,y,M,R,K)),H=a}else{const I=t;V=Ke(I.length>1?I(y,{attrs:a,slots:r,emit:u}):I(y,null)),H=t.props?a:Go(a)}}catch(I){kt.length=0,Vs(I,e,1),V=qe(at)}let U=V;if(H&&A!==!1){const I=Object.keys(H),{shapeFlag:ie}=U;I.length&&ie&7&&(i&&I.some(Ds)&&(H=Jo(H,i)),U=jt(U,H,!1,!0))}if(s.dirs&&(U=jt(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(s.dirs):s.dirs),s.transition){const I=Bs(U.type)&&Gl(U)||U;Rn(I,s.transition)}return V=U,Os(ee),V}const Go=e=>{let t;for(const s in e)(s==="class"||s==="style"||Fs(s))&&((t||(t={}))[s]=e[s]);return t},Jo=(e,t)=>{const s={};for(const n in e)(!Ds(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Xo(e,t,s){const{props:n,children:l,component:i}=e,{props:r,children:a,patchFlag:u}=t,g=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return n?Xn(n,r,g):!!r;if(u&8){const h=t.dynamicProps;for(let y=0;yObject.create(ii),ri=e=>Object.getPrototypeOf(e)===ii;function Qo(e,t,s,n=!1){const l={},i=oi();e.propsDefaults=Object.create(null),ai(e,t,l,i);for(const r in e.propsOptions[0])r in l||(l[r]=void 0);s?e.props=n?l:lo(l):e.type.props?e.props=l:e.props=i,e.attrs=i}function er(e,t,s,n){const{props:l,attrs:i,vnode:{patchFlag:r}}=e,a=z(l),[u]=e.propsOptions;let g=!1;if((n||r>0)&&!(r&16)){if(r&8){const h=e.vnode.dynamicProps;for(let y=0;y{u=!0;const[R,M]=ci(y,t,!0);me(r,R),M&&a.push(...M)};!s&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!u)return X(e)&&n.set(e,Ft),Ft;if(N(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Fn=e=>N(e)?e.map(Ke):[Ke(e)],sr=(e,t,s)=>{if(t._n)return t;const n=bo((...l)=>Fn(t(...l)),s);return n._c=!1,n},ui=(e,t,s)=>{const n=e._ctx;for(const l in e){if(In(l))continue;const i=e[l];if(j(i))t[l]=sr(l,i,n);else if(i!=null){const r=Fn(i);t[l]=()=>r}}},fi=(e,t)=>{const s=Fn(t);e.slots.default=()=>s},di=(e,t,s)=>{for(const n in t)(s||!In(n))&&(e[n]=t[n])},nr=(e,t,s)=>{const n=e.slots=oi();if(e.vnode.shapeFlag&32){const l=t._;l?(di(n,t,s),s&&Sl(n,"_",l,!0)):ui(t,n)}else t&&fi(e,t)},lr=(e,t,s)=>{const{vnode:n,slots:l}=e;let i=!0,r=Z;if(n.shapeFlag&32){const a=t._;a?s&&a===1?i=!1:di(l,t,s):(i=!t.$stable,ui(t,l)),r=t}else t&&(fi(e,t),r={default:1});if(i)for(const a in l)!In(a)&&r[a]==null&&delete l[a]},we=cr;function ir(e){return or(e)}function or(e,t){const s=Ns();s.__VUE__=!0;const{insert:n,remove:l,patchProp:i,createElement:r,createText:a,createComment:u,setText:g,setElementText:h,parentNode:y,nextSibling:R,setScopeId:M=We,insertStaticContent:K}=e,A=(c,d,b,w=null,S=null,x=null,O=void 0,k=null,C=!!d.dynamicChildren)=>{if(c===d)return;c&&!Kt(c,d)&&(w=Ot(c),Ee(c,S,x,!0),c=null),d.patchFlag===-2&&(C=!1,d.dynamicChildren=null);const{type:_,ref:D,shapeFlag:P}=d;switch(_){case Ws:ee(c,d,b,w);break;case at:V(c,d,b,w);break;case Cs:c==null&&H(d,b,w,O);break;case le:Je(c,d,b,w,S,x,O,k,C);break;default:P&1?ie(c,d,b,w,S,x,O,k,C):P&6?ut(c,d,b,w,S,x,O,k,C):(P&64||P&128)&&_.process(c,d,b,w,S,x,O,k,C,gt)}D!=null&&S?Gt(D,c&&c.ref,x,d||c,!d):D==null&&c&&c.ref!=null&&Gt(c.ref,null,x,c,!0)},ee=(c,d,b,w)=>{if(c==null)n(d.el=a(d.children),b,w);else{const S=d.el=c.el;d.children!==c.children&&g(S,d.children)}},V=(c,d,b,w)=>{c==null?n(d.el=u(d.children||""),b,w):d.el=c.el},H=(c,d,b,w)=>{[c.el,c.anchor]=K(c.children,d,b,w,c.el,c.anchor)},U=({el:c,anchor:d},b,w)=>{let S;for(;c&&c!==d;)S=R(c),n(c,b,w),c=S;n(d,b,w)},I=({el:c,anchor:d})=>{let b;for(;c&&c!==d;)b=R(c),l(c),c=b;l(d)},ie=(c,d,b,w,S,x,O,k,C)=>{if(d.type==="svg"?O="svg":d.type==="math"&&(O="mathml"),c==null)te(d,b,w,S,x,O,k,C);else{const _=c.el&&c.el._isVueCE?c.el:null;try{_&&_._beginPatch(),Et(c,d,S,x,O,k,C)}finally{_&&_._endPatch()}}},te=(c,d,b,w,S,x,O,k)=>{let C,_;const{props:D,shapeFlag:P,transition:F,dirs:L}=c;if(C=c.el=r(c.type,x,D&&D.is,D),P&8?h(C,c.children):P&16&&$e(c.children,C,null,w,S,nn(c,x),O,k),L&&mt(c,null,w,"created"),pe(C,c,c.scopeId,O,w),D){for(const J in D)J!=="value"&&!qt(J)&&i(C,J,null,D[J],x,w);"value"in D&&i(C,"value",null,D.value,x),(_=D.onVnodeBeforeMount)&&He(_,w,c)}L&&mt(c,null,w,"beforeMount");const $=rr(S,F);$&&F.beforeEnter(C),n(C,d,b),((_=D&&D.onVnodeMounted)||$||L)&&we(()=>{try{_&&He(_,w,c),$&&F.enter(C),L&&mt(c,null,w,"mounted")}finally{}},S)},pe=(c,d,b,w,S)=>{if(b&&M(c,b),w)for(let x=0;x{for(let _=C;_{const k=d.el=c.el;let{patchFlag:C,dynamicChildren:_,dirs:D}=d;C|=c.patchFlag&16;const P=c.props||Z,F=d.props||Z;let L;if(b&&bt(b,!1),(L=F.onVnodeBeforeUpdate)&&He(L,b,d,c),D&&mt(d,c,b,"beforeUpdate"),b&&bt(b,!0),_&&(!c.dynamicChildren||c.dynamicChildren.length!==_.length)&&(C=0,O=!1,_=null),(P.innerHTML&&F.innerHTML==null||P.textContent&&F.textContent==null)&&h(k,""),_?Ye(c.dynamicChildren,_,k,b,w,nn(d,S),x):O||G(c,d,k,null,b,w,nn(d,S),x,!1),C>0){if(C&16)Ge(k,P,F,b,S);else if(C&2&&P.class!==F.class&&i(k,"class",null,F.class,S),C&4&&i(k,"style",P.style,F.style,S),C&8){const $=d.dynamicProps;for(let J=0;J<$.length;J++){const q=$[J],oe=P[q],ce=F[q];(ce!==oe||q==="value")&&i(k,q,oe,ce,S,b)}}C&1&&c.children!==d.children&&h(k,d.children)}else!O&&_==null&&Ge(k,P,F,b,S);((L=F.onVnodeUpdated)||D)&&we(()=>{L&&He(L,b,d,c),D&&mt(d,c,b,"updated")},w)},Ye=(c,d,b,w,S,x,O)=>{for(let k=0;k{if(d!==b){if(d!==Z)for(const x in d)!qt(x)&&!(x in b)&&i(c,x,d[x],null,S,w);for(const x in b){if(qt(x))continue;const O=b[x],k=d[x];O!==k&&x!=="value"&&i(c,x,k,O,S,w)}"value"in b&&i(c,"value",d.value,b.value,S)}},Je=(c,d,b,w,S,x,O,k,C)=>{const _=d.el=c?c.el:a(""),D=d.anchor=c?c.anchor:a("");let{patchFlag:P,dynamicChildren:F,slotScopeIds:L}=d;L&&(k=k?k.concat(L):L),c==null?(n(_,b,w),n(D,b,w),$e(d.children||[],b,D,S,x,O,k,C)):P>0&&P&64&&F&&c.dynamicChildren&&c.dynamicChildren.length===F.length?(Ye(c.dynamicChildren,F,b,S,x,O,k),(d.key!=null||S&&d===S.subTree)&&pi(c,d,!0)):G(c,d,b,D,S,x,O,k,C)},ut=(c,d,b,w,S,x,O,k,C)=>{d.slotScopeIds=k,c==null?d.shapeFlag&512?S.ctx.activate(d,b,w,O,C):Ht(d,b,w,S,x,O,C):as(c,d,C)},Ht=(c,d,b,w,S,x,O)=>{const k=c.component=_r(c,w,S);if(Mn(c)&&(k.ctx.renderer=gt),br(k,!1,O),k.asyncDep){if(S&&S.registerDep(k,ue,O),!c.el){const C=k.subTree=qe(at);V(null,C,d,b),c.placeholder=C.el}}else ue(k,c,d,b,S,x,O)},as=(c,d,b)=>{const w=d.component=c.component;if(Xo(c,d,b))if(w.asyncDep&&!w.asyncResolved){se(w,d,b);return}else w.next=d,w.update();else d.el=c.el,w.vnode=d},ue=(c,d,b,w,S,x,O)=>{const k=()=>{if(c.isMounted){let{next:P,bu:F,u:L,parent:$,vnode:J}=c;{const fe=hi(c);if(fe){P&&(P.el=J.el,se(c,P,O)),fe.asyncDep.then(()=>{we(()=>{c.isUnmounted||_()},S)});return}}let q=P,oe;bt(c,!1),P?(P.el=J.el,se(c,P,O)):P=J,F&&Ss(F),(oe=P.props&&P.props.onVnodeBeforeUpdate)&&He(oe,$,P,J),bt(c,!0);const ce=Jn(c),Oe=c.subTree;c.subTree=ce,A(Oe,ce,y(Oe.el),Ot(Oe),c,S,x),P.el=ce.el,q===null&&Zo(c,ce.el),L&&we(L,S),(oe=P.props&&P.props.onVnodeUpdated)&&we(()=>He(oe,$,P,J),S)}else{let P;const{el:F,props:L}=d,{bm:$,m:J,parent:q,root:oe,type:ce}=c,Oe=Jt(d);bt(c,!1),$&&Ss($),!Oe&&(P=L&&L.onVnodeBeforeMount)&&He(P,q,d),bt(c,!0);{oe.ce&&oe.ce._hasShadowRoot()&&oe.ce._injectChildStyle(ce,c.parent?c.parent.type:void 0);const fe=c.subTree=Jn(c);A(null,fe,b,w,c,S,x),d.el=fe.el}if(J&&we(J,S),!Oe&&(P=L&&L.onVnodeMounted)){const fe=d;we(()=>He(P,q,fe),S)}(d.shapeFlag&256||q&&Jt(q.vnode)&&q.vnode.shapeFlag&256)&&c.a&&we(c.a,S),c.isMounted=!0,d=b=w=null}};c.scope.on();const C=c.effect=new El(k);c.scope.off();const _=c.update=C.run.bind(C),D=c.job=C.runIfDirty.bind(C);D.i=c,D.id=c.uid,C.scheduler=()=>An(D),bt(c,!0),_()},se=(c,d,b)=>{d.component=c;const w=c.vnode.props;c.vnode=d,c.next=null,er(c,d.props,w,b),lr(c,d.children,b),it(),Kn(c),ot()},G=(c,d,b,w,S,x,O,k,C=!1)=>{const _=c&&c.children,D=c?c.shapeFlag:0,P=d.children,{patchFlag:F,shapeFlag:L}=d;if(F>0){if(F&128){pt(_,P,b,w,S,x,O,k,C);return}else if(F&256){Ne(_,P,b,w,S,x,O,k,C);return}}L&8?(D&16&&Ze(_,S,x),P!==_&&h(b,P)):D&16?L&16?pt(_,P,b,w,S,x,O,k,C):Ze(_,S,x,!0):(D&8&&h(b,""),L&16&&$e(P,b,w,S,x,O,k,C))},Ne=(c,d,b,w,S,x,O,k,C)=>{c=c||Ft,d=d||Ft;const _=c.length,D=d.length,P=Math.min(_,D);let F;for(F=0;FD?Ze(c,S,x,!0,!1,P):$e(d,b,w,S,x,O,k,C,P)},pt=(c,d,b,w,S,x,O,k,C)=>{let _=0;const D=d.length;let P=c.length-1,F=D-1;for(;_<=P&&_<=F;){const L=c[_],$=d[_]=C?st(d[_]):Ke(d[_]);if(Kt(L,$))A(L,$,b,null,S,x,O,k,C);else break;_++}for(;_<=P&&_<=F;){const L=c[P],$=d[F]=C?st(d[F]):Ke(d[F]);if(Kt(L,$))A(L,$,b,null,S,x,O,k,C);else break;P--,F--}if(_>P){if(_<=F){const L=F+1,$=LF)for(;_<=P;)Ee(c[_],S,x,!0),_++;else{const L=_,$=_,J=new Map;for(_=$;_<=F;_++){const be=d[_]=C?st(d[_]):Ke(d[_]);be.key!=null&&J.set(be.key,_)}let q,oe=0;const ce=F-$+1;let Oe=!1,fe=0;const vt=new Array(ce);for(_=0;_=ce){Ee(be,S,x,!0);continue}let Ce;if(be.key!=null)Ce=J.get(be.key);else for(q=$;q<=F;q++)if(vt[q-$]===0&&Kt(be,d[q])){Ce=q;break}Ce===void 0?Ee(be,S,x,!0):(vt[Ce-$]=_+1,Ce>=fe?fe=Ce:Oe=!0,A(be,d[Ce],b,null,S,x,O,k,C),oe++)}const us=Oe?ar(vt):Ft;for(q=us.length-1,_=ce-1;_>=0;_--){const be=$+_,Ce=d[be],fs=d[be+1],ds=be+1{const{el:x,type:O,transition:k,children:C,shapeFlag:_}=c;if(_&6){Te(c.component.subTree,d,b,w);return}if(_&128){c.suspense.move(d,b,w);return}if(_&64){O.move(c,d,b,gt);return}if(O===le){n(x,d,b);for(let P=0;Pk.enter(x),S));else{const{leave:P,delayLeave:F,afterLeave:L}=k,$=()=>{c.ctx.isUnmounted?l(x):n(x,d,b)},J=()=>{const q=x._isLeaving||!!x[tn];x._isLeaving&&x[tn](!0),k.persisted&&!q?$():P(x,()=>{$(),L&&L()})};F?F(x,$,J):J()}else n(x,d,b)},Ee=(c,d,b,w=!1,S=!1)=>{const{type:x,props:O,ref:k,children:C,dynamicChildren:_,shapeFlag:D,patchFlag:P,dirs:F,cacheIndex:L,memo:$}=c;if(P===-2&&(S=!1),k!=null&&(it(),Gt(k,null,b,c,!0),ot()),L!=null&&(d.renderCache[L]=void 0),D&256){d.ctx.deactivate(c);return}const J=D&1&&F,q=!Jt(c);let oe;if(q&&(oe=O&&O.onVnodeBeforeUnmount)&&He(oe,d,c),D&6)cs(c.component,b,w);else{if(D&128){c.suspense.unmount(b,w);return}J&&mt(c,null,d,"beforeUnmount"),D&64?c.type.remove(c,d,b,gt,w):_&&!_.hasOnce&&(x!==le||P>0&&P&64)?Ze(_,d,b,!1,!0):(x===le&&P&384||!S&&D&16)&&Ze(C,d,b),w&&Xe(c)}const ce=$!=null&&L==null;(q&&(oe=O&&O.onVnodeUnmounted)||J||ce)&&we(()=>{oe&&He(oe,d,c),J&&mt(c,null,d,"unmounted"),ce&&(c.el=null)},b)},Xe=c=>{const{type:d,el:b,anchor:w,transition:S}=c;if(d===le){Vt(b,w);return}if(d===Cs){I(c);return}const x=()=>{l(b),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(c.shapeFlag&1&&S&&!S.persisted){const{leave:O,delayLeave:k}=S,C=()=>O(b,x);k?k(c.el,x,C):C()}else x()},Vt=(c,d)=>{let b;for(;c!==d;)b=R(c),l(c),c=b;l(d)},cs=(c,d,b)=>{const{bum:w,scope:S,job:x,subTree:O,um:k,m:C,a:_}=c;Qn(C),Qn(_),w&&Ss(w),S.stop(),x&&(x.flags|=8,Ee(O,c,d,b)),k&&we(k,d),we(()=>{c.isUnmounted=!0},d)},Ze=(c,d,b,w=!1,S=!1,x=0)=>{for(let O=x;O{if(c.shapeFlag&6)return Ot(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const d=R(c.anchor||c.el),b=d&&d[Co];return b?R(b):d};let ft=!1;const ht=(c,d,b)=>{let w;c==null?d._vnode&&(Ee(d._vnode,null,null,!0),w=d._vnode.component):A(d._vnode||null,c,d,null,null,null,b),d._vnode=c,ft||(ft=!0,Kn(w),Ul(),ft=!1)},gt={p:A,um:Ee,m:Te,r:Xe,mt:Ht,mc:$e,pc:G,pbc:Ye,n:Ot,o:e};return{render:ht,hydrate:void 0,createApp:Wo(ht)}}function nn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function bt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pi(e,t,s=!1){const n=e.children,l=t.children;if(N(n)&&N(l))for(let i=0;i>1,e[s[a]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,r=s[i-1];i-- >0;)s[i]=r,r=t[r];return s}function hi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hi(t)}function Qn(e){if(e)for(let t=0;te.__isSuspense;function cr(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):mo(e)}const le=Symbol.for("v-fgt"),Ws=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Cs=Symbol.for("v-stc"),kt=[];let ke=null;function T(e=!1){kt.push(ke=e?null:[])}function _i(){kt.pop(),ke=kt[kt.length-1]||null}let ts=1;function el(e,t=!1){ts+=e,e<0&&ke&&t&&(ke.hasOnce=!0)}function mi(e){return e.dynamicChildren=ts>0?ke||Ft:null,_i(),ts>0&&ke&&ke.push(e),e}function E(e,t,s,n,l,i){return mi(o(e,t,s,n,l,i,!0))}function ur(e,t,s,n,l){return mi(qe(e,t,s,n,l,!0))}function bi(e){return e?e.__v_isVNode===!0:!1}function Kt(e,t){return e.type===t.type&&e.key===t.key}const yi=({key:e})=>e??null,ks=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?re(e)||_e(e)||j(e)?{i:Re,r:e,k:t,f:!!s}:e:null);function o(e,t=null,s=null,n=0,l=null,i=e===le?0:1,r=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yi(t),ref:t&&ks(t),scopeId:ql,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:Re};return a?(Rs(u,s),i&128&&e.normalize(u)):s&&(u.shapeFlag|=re(s)?8:16),ts>0&&!r&&ke&&(u.patchFlag>0||i&6)&&u.patchFlag!==32&&ke.push(u),u}const qe=fr;function fr(e,t=null,s=null,n=0,l=null,i=!1){if((!e||e===$o)&&(e=at),bi(e)){const a=jt(e,t,!0);return s&&Rs(a,s),ts>0&&!i&&ke&&(a.shapeFlag&6?ke[ke.indexOf(e)]=a:ke.push(a)),a.patchFlag=-2,a}if(wr(e)&&(e=e.__vccOpts),t){t=dr(t);let{class:a,style:u}=t;a&&!re(a)&&(t.class=ne(a)),X(u)&&(Pn(u)&&!N(u)&&(u=me({},u)),t.style=js(u))}const r=re(e)?1:vi(e)?128:Bs(e)?64:X(e)?4:j(e)?2:0;return o(e,t,s,n,l,r,i,!0)}function dr(e){return e?Pn(e)||ri(e)?me({},e):e:null}function jt(e,t,s=!1,n=!1){const{props:l,ref:i,patchFlag:r,children:a,transition:u}=e,g=t?hr(l||{},t):l,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&yi(g),ref:t&&t.ref?s&&i?N(i)?i.concat(ks(t)):[i,ks(t)]:ks(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==le?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&jt(e.ssContent),ssFallback:e.ssFallback&&jt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&Rn(h,u.clone(h)),h}function W(e=" ",t=0){return qe(Ws,null,e,t)}function pr(e,t){const s=qe(Cs,null,e);return s.staticCount=t,s}function ge(e="",t=!1){return t?(T(),ur(at,null,e)):qe(at,null,e)}function Ke(e){return e==null||typeof e=="boolean"?qe(at):N(e)?qe(le,null,e.slice()):bi(e)?st(e):qe(Ws,null,String(e))}function st(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:jt(e)}function Rs(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(N(t))s=16;else if(typeof t=="object")if(n&65){const l=t.default;l&&(l._c&&(l._d=!1),Rs(e,l()),l._c&&(l._d=!0));return}else{s=32;const l=t._;!l&&!ri(t)?t._ctx=Re:l===3&&Re&&(Re.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(j(t)){if(n&65){Rs(e,{default:t});return}t={default:t,_ctx:Re},s=32}else t=String(t),n&64?(s=16,t=[W(t)]):s=8;e.children=t,e.shapeFlag|=s}function hr(...e){const t={};for(let s=0;sSe||Re;let Ms,ss;{const e=Ns(),t=(s,n)=>{let l;return(l=e[s])||(l=e[s]=[]),l.push(n),i=>{l.length>1?l.forEach(r=>r(i)):l[0](i)}};Ms=t("__VUE_INSTANCE_SETTERS__",s=>Se=s),ss=t("__VUE_SSR_SETTERS__",s=>ns=s)}const rs=e=>{const t=Se;return Ms(e),e.scope.on(),()=>{e.scope.off(),Ms(t)}},tl=()=>{Se&&Se.scope.off(),Ms(null)};function xi(e){return e.vnode.shapeFlag&4}let ns=!1;function br(e,t=!1,s=!1){t&&ss(t);const{props:n,children:l}=e.vnode,i=xi(e);Qo(e,n,i,t),nr(e,l,s||t);const r=i?yr(e,t):void 0;return t&&ss(!1),r}function yr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,No);const{setup:n}=s;if(n){it();const l=e.setupContext=n.length>1?Sr(e):null,i=rs(e),r=os(n,e,0,[e.props,l]),a=ml(r);if(ot(),i(),(a||e.sp)&&!Jt(e)&&Jl(e),a){if(r.then(tl,tl),t)return r.then(u=>{ss(!0);try{sl(e,u,t)}finally{ss(!1)}}).catch(u=>{Vs(u,e,0)});e.asyncDep=r}else sl(e,r)}else Si(e)}function sl(e,t,s){j(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:X(t)&&(e.setupState=Vl(t)),Si(e)}function Si(e,t,s){const n=e.type;e.render||(e.render=n.render||We);{const l=rs(e);it();try{jo(e)}finally{ot(),l()}}}const xr={get(e,t){return ve(e,"get",""),e[t]}};function Sr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,xr),slots:e.slots,emit:e.emit,expose:t}}function qs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Vl(io(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Xt)return Xt[s](e)},has(t,s){return s in t||s in Xt}})):e.proxy}function wr(e){return j(e)&&"__vccOpts"in e}const ae=(e,t)=>fo(e,t,ns),Cr="3.5.41";/** -* @vue/runtime-dom v3.5.41 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let _n;const nl=typeof window<"u"&&window.trustedTypes;if(nl)try{_n=nl.createPolicy("vue",{createHTML:e=>e})}catch{}const wi=_n?e=>_n.createHTML(e):e=>e,kr="http://www.w3.org/2000/svg",Tr="http://www.w3.org/1998/Math/MathML",tt=typeof document<"u"?document:null,ll=tt&&tt.createElement("template"),Er={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const l=t==="svg"?tt.createElementNS(kr,e):t==="mathml"?tt.createElementNS(Tr,e):s?tt.createElement(e,{is:s}):tt.createElement(e);return e==="select"&&n&&n.multiple!=null&&l.setAttribute("multiple",n.multiple),l},createText:e=>tt.createTextNode(e),createComment:e=>tt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>tt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,l,i){const r=s?s.previousSibling:t.lastChild;if(l&&(l===i||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),s),!(l===i||!(l=l.nextSibling)););else{ll.innerHTML=wi(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const a=ll.content;if(n==="svg"||n==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Or=Symbol("_vtc");function Pr(e,t,s){const n=e[Or];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const il=Symbol("_vod"),Ar=Symbol("_vsh"),Rr=Symbol(""),Mr=/(?:^|;)\s*display\s*:/;function Ir(e,t,s){const n=e.style,l=re(s);let i=!1;if(s&&!l){if(t)if(re(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();s[a]==null&&Wt(n,a,"")}else for(const r in t)s[r]==null&&Wt(n,r,"");for(const r in s){r==="display"&&(i=!0);const a=s[r];a!=null?Dr(e,r,!re(t)&&t?t[r]:void 0,a)||Wt(n,r,a):Wt(n,r,"")}}else if(l){if(t!==s){const r=n[Rr];r&&(s+=";"+r),n.cssText=s,i=Mr.test(s)}}else t&&e.removeAttribute("style");il in e&&(e[il]=i?n.display:"",e[Ar]&&(n.display="none"))}const ol=/\s*!important$/;function Wt(e,t,s){if(N(s))s.forEach(n=>Wt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Fr(e,t);ol.test(s)?e.setProperty(Tt(n),s.replace(ol,""),"important"):e[n]=s}}const rl=["Webkit","Moz","ms"],ln={};function Fr(e,t){const s=ln[t];if(s)return s;let n=Ie(t);if(n!=="filter"&&n in e)return ln[t]=n;n=xl(n);for(let l=0;lon||(Vr.then(()=>on=0),on=Date.now());function Kr(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const l=s.value;if(N(l)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const r=l.slice(),a=[n];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ur=(e,t,s,n,l,i)=>{const r=l==="svg";t==="class"?Pr(e,n,r):t==="style"?Ir(e,s,n):Fs(t)?Ds(t)||$r(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Wr(e,t,n,r))?(ul(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&cl(e,t,n,r,i,t!=="value")):e._isVueCE&&(qr(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!re(n)))?ul(e,Ie(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),cl(e,t,n,r))};function Wr(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&dl(t)&&j(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return dl(t)&&re(s)?!1:t in e}function qr(e,t){const s=e._def.props;if(!s)return!1;const n=Ie(t);return Array.isArray(s)?s.some(l=>Ie(l)===n):Object.keys(s).some(l=>Ie(l)===n)}const Is=e=>{const t=e.props["onUpdate:modelValue"]||!1;return N(t)?s=>Ss(t,s):t};function zr(e){e.target.composing=!0}function pl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const St=Symbol("_assign"),ys=Symbol("_initialValue");function rn(e,t,s){return t&&(e=e.trim()),s&&(e=xn(e)),e}const xs={created(e,{modifiers:{lazy:t,trim:s,number:n}},l){e.parentNode&&(e.type==="text"?e[ys]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[ys]=e.defaultValue.replace(/\r\n?/g,` -`))),e[St]=Is(l);const i=n||l.props&&l.props.type==="number";xt(e,t?"change":"input",r=>{r.target.composing||e[St](rn(e.value,s,i))}),(s||i)&&xt(e,"change",()=>{e.value=rn(e.value,s,i)}),t||(xt(e,"compositionstart",zr),xt(e,"compositionend",pl),xt(e,"change",pl))},mounted(e,{value:t,modifiers:{trim:s,number:n}}){const l=t??"",i=e[ys];delete e[ys],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[St](rn(e.value,s,n)):e.value=l},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:l,number:i}},r){if(e[St]=Is(r),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?xn(e.value):e.value,u=t??"";if(a===u)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(n&&t===s||l&&e.value.trim()===u)||(e.value=u)}},hl={deep:!0,created(e,t,s){e[St]=Is(s),xt(e,"change",()=>{const n=e._modelValue,l=Yr(e),i=e.checked,r=e[St];if(N(n)){const a=Cl(n,l),u=a!==-1;if(i&&!u)r(n.concat(l));else if(!i&&u){const g=[...n];g.splice(a,1),r(g)}}else if(Ls(n)){const a=new Set(n);i?a.add(l):a.delete(l),r(a)}else r(Ci(e,i))})},mounted:gl,beforeUpdate(e,t,s){e[St]=Is(s),gl(e,t,s)}};function gl(e,{value:t,oldValue:s},n){e._modelValue=t;let l;if(N(t))l=Cl(t,n.props.value)>-1;else if(Ls(t))l=t.has(n.props.value);else{if(t===s)return;l=is(t,Ci(e,!0))}e.checked!==l&&(e.checked=l)}function Yr(e){return"_value"in e?e._value:e.value}function Ci(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Gr=["ctrl","shift","alt","meta"],Jr={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Gr.some(s=>e[`${s}Key`]&&!t.includes(s))},Xr=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((l,...i)=>{for(let r=0;r{const t=Qr().createApp(...e),{mount:s}=t;return t.mount=n=>{const l=sa(n);if(!l)return;const i=t._component;!j(i)&&!i.render&&!i.template&&(i.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const r=s(l,!1,ta(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),r},t});function ta(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sa(e){return re(e)?document.querySelector(e):e}const na={class:"app-shell"},la={class:"content",id:"overview"},ia={class:"topbar"},oa={class:"topbar-meta"},ra={class:"as-of"},aa={key:0,class:"state-card"},ca={key:1,class:"state-card error-state"},ua={class:"kpi-grid","aria-label":"Signal summary"},fa={class:"kpi-card accent-card"},da={class:"kpi-value"},pa={class:"kpi-foot"},ha={class:"long-count"},ga={class:"short-count"},va={class:"neutral-count"},_a={class:"kpi-card"},ma={class:"kpi-value"},ba={class:"kpi-foot"},ya={class:"panel theme-panel",id:"themes"},xa={class:"panel-header signal-header"},Sa={class:"status-tag"},wa={class:"theme-grid"},Ca={class:"theme-card-head"},ka={class:"theme-chip"},Ta={class:"theme-label-th"},Ea={class:"theme-surprise"},Oa={class:"theme-surprise-value"},Pa={class:"theme-read"},Aa={key:0,class:"theme-read-value"},Ra={key:1,class:"theme-read-value"},Ma={key:2,class:"theme-read-value"},Ia={key:3,class:"theme-read-value"},Fa={key:4,class:"theme-read-value"},Da={key:5,class:"theme-read-value"},La={key:6,class:"theme-read-value"},$a={key:7,class:"theme-read-value"},Na={key:8,class:"theme-read-value"},ja={key:9,class:"theme-read-value"},Ha={key:10,class:"theme-read-value"},Va={key:11,class:"theme-read-value"},Ba={key:12,class:"theme-read-value"},Ka={key:13,class:"theme-read-value"},Ua={key:0,class:"theme-narrative"},Wa={key:0,class:"macro-panel"},qa={class:"macro-chips"},za={class:"macro-chip"},Ya={class:"macro-chip"},Ga={class:"macro-chip"},Ja={class:"macro-chip"},Xa={class:"macro-chip"},Za={class:"panel stock-panel",id:"stocks"},Qa={class:"panel-header signal-header"},ec={class:"stock-controls"},tc={class:"toggle-filter"},sc={key:0,class:"empty-research"},nc={key:1,class:"table-wrap"},lc={class:"factor-table"},ic=["onClick"],oc={key:1,class:"muted-cell"},rc={class:"combined-cell"},ac={class:"symbol-name"},cc={key:0,class:"muted-cell"},uc={class:"score-cell"},fc={key:0,class:"dividend-dot",title:"จ่ายปันผล"},dc={class:"panel lineage-panel",id:"lineage"},pc={class:"panel-header signal-header"},hc={class:"status-tag"},gc={class:"table-wrap"},vc={class:"source-table"},_c={class:"source-name"},mc={class:"muted-cell"},bc={class:"muted-cell"},yc={class:"muted-cell"},xc={class:"muted-cell"},Sc={class:"panel health-panel",id:"health"},wc={key:0,class:"empty-research muted-cell"},Cc={key:1},kc={class:"source-table"},Tc={class:"source-name"},Ec={class:"muted-cell",style:{"font-size":"11px"}},Oc={key:0,class:"status-tag",style:{background:"#1a7f37",color:"#fff"}},Pc={key:1,class:"status-tag warning-tag"},Ac={key:0,class:"muted-cell",style:{"font-size":"11px","word-break":"break-word"}},Rc={class:"muted-cell"},Mc=["onClick"],Ic={class:"panel sim-panel",id:"suggestion"},Fc={class:"panel-header signal-header"},Dc={class:"status-tag neutral-tag"},Lc={class:"sim-controls"},$c={class:"sim-field"},Nc=["disabled"],jc={key:0,class:"sim-result"},Hc={class:"sim-sums"},Vc={class:"sim-sum"},Bc={class:"sim-sum"},Kc={class:"sim-note"},Uc={class:"sim-buckets"},Wc={class:"sim-bucket"},qc={class:"sim-order-table"},zc={key:0},Yc={class:"muted-cell"},Gc={class:"score-cell"},Jc={class:"score-cell"},Xc={key:1},Zc={class:"sim-bucket"},Qc={class:"sim-order-table"},eu={key:0},tu={class:"muted-cell"},su={class:"score-cell"},nu={class:"score-cell"},lu={key:1},iu={class:"sim-bucket"},ou={class:"sim-order-table"},ru={key:0},au={class:"muted-cell"},cu={class:"score-cell"},uu={class:"score-cell"},fu={key:1},du={key:1,class:"empty-research"},pu={class:"panel backtest-panel",id:"backtest"},hu={class:"backtest-controls"},gu={class:"checkbox-label",style:{display:"flex","align-items":"center",gap:"6px"}},vu=["disabled"],_u={key:0,class:"state-card warning-state"},mu={class:"muted-cell",style:{"margin-top":"4px"}},bu={class:"muted-cell",style:{"margin-top":"2px"}},yu={key:1,class:"state-card error-state"},xu={key:2,class:"backtest-results"},Su={class:"bt-kpi-grid"},wu={class:"bt-kpi"},Cu={class:"bt-kpi"},ku={class:"bt-kpi"},Tu={class:"positive-text"},Eu={class:"bt-kpi"},Ou={class:"negative-text"},Pu={class:"bt-kpi"},Au={class:"bt-kpi"},Ru={class:"bt-kpi"},Mu={class:"bt-meta muted-cell"},Iu={key:0,class:"bt-meta"},Fu={key:1,class:"bt-meta muted-cell"},Du={key:2,class:"bt-holdings"},Lu={class:"source-table",style:{"margin-top":"6px"}},$u={class:"muted-cell"},Nu={key:3,class:"empty-research"},ju={key:4,class:"bt-history"},Hu={class:"source-table"},Vu={key:0,class:"status-tag warning-tag",title:"ใช้คะแนนปัจจุบันย้อนหลัง ไม่ใช่ point-in-time"},Bu={class:"positive-text"},Ku=["title"],Uu={class:"muted-cell"},Wu={class:"modal-card"},qu={class:"modal-head"},zu={key:0,class:"empty-research"},Yu={key:1,class:"state-card error-state"},Gu={key:2,class:"modal-body"},Ju={class:"modal-section"},Xu={key:0,class:"modal-themes"},Zu={class:"contrib-name"},Qu={key:0,class:"contrib-calc"},ef={key:1,class:"muted-cell"},tf={key:1,class:"muted-cell"},sf={class:"modal-section"},nf={class:"fund-grid"},lf={class:"modal-sub"},of={class:"modal-section"},rf={class:"calc-box"},af={class:"calc-line"},cf={class:"calc-step-head"},uf={class:"calc-step-note"},ff={key:0,class:"calc-z"},df={class:"modal-sub"},pf={__name:"App",setup(e){const t=B(null),s=B(null),n=B(null),l=B(null),i=B(null),r=B(null),a=B(1e6),u=B(null),g=B(null),h=B(!1),y=B(""),R=B(""),M=B(1e6),K=B(!1),A=B(null),ee=B([]),V=B(null),H=B(!0),U=B(!1),I=B(null),ie=B(!1),te=B("signal_score"),pe=B("desc"),$e=B({entries:[]}),Et=B(null),Ye=B(null),Ge=B(!0),Je=B(""),ut=B(""),Ht=B(!1),as=B("token"),ue=B(!0),se=B(""),G=ae(()=>{var v;return((v=l.value)==null?void 0:v.factors)??[]}),Ne=ae(()=>{var v;return((v=r.value)==null?void 0:v.themes)??[]}),pt=ae(()=>{var v;return((v=r.value)==null?void 0:v.sources)??[]}),Te=B([]),Ee=B(!1),Xe=ae(()=>{var v;return((v=r.value)==null?void 0:v.macro)??{}}),Vt=ae(()=>pt.value.length),cs=ae(()=>{var v,f;return((f=(v=r.value)==null?void 0:v.source_summary)==null?void 0:f.factor_keys)??Vt.value}),Ze=ae(()=>{var v;return((v=r.value)==null?void 0:v.available)??!1}),Ot=ae(()=>{var v;return((v=r.value)==null?void 0:v.board)??G.value}),ft=ae(()=>{const v={};for(const f of Ot.value)v[f.symbol]=f;return v}),ht=ae(()=>{var f;const v=(f=t.value)==null?void 0:f.signal_summary;return{long:(v==null?void 0:v.long)??0,short:(v==null?void 0:v.short)??0,neutral:(v==null?void 0:v.neutral)??0,total:(v==null?void 0:v.total)??0}}),gt=v=>({monthly:"รายเดือน",quarterly:"รายไตรมาส",annual:"รายปี",daily:"รายวัน"})[v]||v,zs=ae(()=>{const v={};for(const f of Ne.value)v[f.id]=f.label_th;return v});function c(v){const f=ft.value[v];return((f==null?void 0:f.themes)??[]).map(Pe=>zs.value[Pe]||Pe)}const d=ae(()=>{var v;return((v=l.value)==null?void 0:v.available)??!1}),b=ae(()=>{var v;return((v=l.value)==null?void 0:v.dividend_count)??0}),w=ae(()=>{var v;return((v=i.value)==null?void 0:v.combined_count)??0}),S=ae(()=>{let v=G.value;return ie.value&&(v=v.filter(f=>f.is_dividend)),v});function x(v,f){var he;return f==="signal_score"?v.signal_score??(v.signal_side==="LONG"?9999:0):f==="combined"?((he=ft.value[v.symbol])==null?void 0:he.combined)??-9999:f==="symbol"?v.symbol:f==="dividend_yield"?v.dividend_yield??-1:f==="eps_growth_yoy"?v.eps_growth_yoy??-1:f==="pe"?v.pe??0:f==="eps"?v.eps??0:f==="pbv"?v.pbv??0:f==="roe"?v.roe??0:v[f]}const O=ae(()=>{const v=[...S.value],f=pe.value==="asc"?1:-1;return v.sort((he,Pe)=>{const je=x(he,te.value),Qe=x(Pe,te.value);return typeof je=="string"?je.localeCompare(Qe)*f:je===Qe?he.symbol.localeCompare(Pe.symbol):je==null?1:Qe==null?-1:(je-Qe)*f}),v});function k(v){te.value===v?pe.value=pe.value==="asc"?"desc":"asc":(te.value=v,pe.value="desc")}function C(v){return te.value!==v?"":pe.value==="asc"?"↑":"↓"}function _(v,f=2){return Number(v??0).toFixed(f)}function D(v){return v==="dated_ledger"}function P(v){return D(v)?{label:"ตามวันจริง",cls:"status-tag",style:"background:#1a7f37;color:#fff"}:v==="dps_annual_proxy"?{label:"Proxy (ต่อหุ้น)",cls:"status-tag warning-tag"}:{label:"Proxy",cls:"status-tag warning-tag"}}function F(v){return D(v)?"ปันผลตามวันจริงจาก ledger (ex-date × จำนวนหุ้น) — กระแสเงินสดจริง":v==="dps_annual_proxy"?"ประมาณการปันผลต่อหุ้น (DPS ล่าสุด × จำนวนหุ้น) ไม่ใช่กระแสเงินสดตามวันจริง":"ประมาณจาก dividend yield ของพอร์ตสุดท้าย ไม่ใช่กระแสเงินสดปันผลจริง"}function L(v){return v?new Date(v).toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}async function $(v,f){const he=await fetch(v,f);if(!he.ok){const Pe=await he.json().catch(()=>({}));throw new Error(Pe.error||`Request failed: ${he.status}`)}return he.json()}async function J(){const v=await fetch("/api/v1/backtest/tourism?min_events=12"),f=await v.json().catch(()=>({}));if(![200,409].includes(v.status))throw new Error(f.error||`Request failed: ${v.status}`);return f}async function q(){const v=await fetch("/api/v1/research/tourism/latest");if(v.status===404)return null;const f=await v.json().catch(()=>({}));if(!v.ok)throw new Error(f.error||`Request failed: ${v.status}`);return f}const oe=ae(()=>{var v;return((v=I.value)==null?void 0:v.orders)??[]}),ce=ae(()=>{var v;return((v=I.value)==null?void 0:v.invested)??0}),Oe=ae(()=>{var v;return((v=I.value)==null?void 0:v.unallocated_cash)??0}),fe=v=>oe.value.filter(f=>f.bucket===v);async function vt(){U.value=!0,I.value=null;try{I.value=await $("/api/v1/suggestion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({capital:Number(a.value)})})}catch(v){ut.value=v.message}finally{U.value=!1}}async function us(){Ge.value=!0,Je.value="";try{const[v,f,he,Pe,je,Qe,ps,_t,hs,gs]=await Promise.all([$("/api/v1/dashboard/summary"),$("/api/v1/factors/tourism/observations"),$("/api/v1/signals"),$("/api/v1/factors"),$("/api/v1/themes"),$("/api/v1/dashboard"),$("/api/v1/paper/ledger"),$("/api/v1/auth/paper",{credentials:"include"}),J(),q()]);t.value=v,s.value=f,n.value=he,l.value=Pe,i.value=je,r.value=Qe,$e.value=ps,Ht.value=!!_t.authenticated,as.value=_t.mode||"token",ue.value=_t.enabled!==!1,se.value=_t.warning||"",Et.value=hs,Ye.value=gs}catch(v){Je.value=v.message}finally{Ge.value=!1}}async function be(v){u.value=v,g.value=null,h.value=!0;try{g.value=await $(`/api/v1/symbols/${v}`)}catch(f){g.value={error:f.message,symbol:v}}finally{h.value=!1}}function Ce(){u.value=null,g.value=null}async function fs(){try{const v=await $("/api/v1/backtest/readiness");V.value=v,!y.value&&v.recommended_start&&(y.value=v.recommended_start),!R.value&&v.recommended_end&&(R.value=v.recommended_end)}catch{V.value=null}}async function ds(){try{const v=await $("/api/v1/scheduler/sources");Te.value=v.sources||[]}catch{Te.value=[]}Ee.value=!0}const Ys=v=>({ok:"ปกติ",network:"เครือข่ายขัดข้อง",timeout:"หมดเวลา",http:"HTTP error",parse:"รูปแบบข้อมูลผิด",structure:"หน้าเว็บเปลี่ยนโครงสร้าง",auth:"สิทธิ์/ยืนยันตัวตน",other:"อื่น ๆ"})[v]||v;async function ki(v){const f=`[${v.at}] ${v.label} (${v.key}) — ${v.ok?"OK":"FAIL: "+Ys(v.category)} ${v.detail?"| "+v.detail:""}`;try{await navigator.clipboard.writeText(f),ut.value=`คัดลอกสาเหตุของ ${v.key} แล้ว`}catch{ut.value=f}}function Ti(v){return v.ok?"":` (สาเหตุน่าจะ: ${Ys(v.category)})`}async function Ei(){K.value=!0,A.value=null;try{A.value=await $("/api/v1/backtest/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({start:y.value,end:R.value,capital:Number(M.value),use_ledger:H.value})}),await Dn()}catch(v){A.value={error:v.message}}finally{K.value=!1}}async function Dn(){try{ee.value=(await $("/api/v1/backtest/run")).runs||[]}catch{ee.value=[]}}const Pt=v=>v!=null?v>=0?"positive-text":"negative-text":"";return Zl(async()=>{await us(),await Promise.all([Dn(),fs(),ds()])}),(v,f)=>{var he,Pe,je,Qe,ps,_t,hs,gs,Ln,$n,Nn;return T(),E("div",na,[f[76]||(f[76]=pr('',1)),o("main",la,[o("header",ia,[f[16]||(f[16]=o("div",null,[o("div",{class:"eyebrow"},"Alternative data · SET50"),o("h1",null,"SET50 Signal Lab"),o("p",{class:"subtitle"},"ภาพรวม alternative factors ไทย ไปจนถึงสัญญาณลงทุนที่อธิบายได้ — research + paper only")],-1)),o("div",oa,[o("div",{class:ne(["freshness-pill",Ze.value?"pill-live":"pill-fixture"])},[f[15]||(f[15]=o("span",{class:"freshness-dot"},null,-1)),W(m(Ze.value?"ข้อมูลจริงจากแหล่งไทย":"ข้อมูลจำลอง (fixture)"),1)],2),o("div",ra,"ข้อมูล "+m(((he=t.value)==null?void 0:he.as_of)||"—"),1)])]),Ge.value?(T(),E("div",aa,"กำลังโหลดข้อมูล…")):Je.value?(T(),E("div",ca,m(Je.value),1)):(T(),E(le,{key:2},[o("section",ua,[o("article",fa,[f[19]||(f[19]=o("div",{class:"kpi-label"},"สัญญาณที่ใช้งาน",-1)),o("div",da,m(ht.value.long),1),o("div",pa,[o("span",ha,m(ht.value.long)+" ซื้อ",1),f[17]||(f[17]=W(" · ",-1)),o("span",ga,m(ht.value.short)+" ขาย",1),f[18]||(f[18]=W(" · ",-1)),o("span",va,m(ht.value.neutral)+" เป็นกลาง",1)])]),o("article",_a,[f[20]||(f[20]=o("div",{class:"kpi-label"},"แหล่งข้อมูลที่ใช้",-1)),o("div",ma,m(cs.value)+" ปัจจัย · "+m(Vt.value)+" แหล่ง",1),o("div",ba,"ข้อมูลจริงจากแหล่งไทย "+m(Ze.value?"(จริง)":"—"),1)])]),o("section",ya,[o("div",xa,[f[21]||(f[21]=o("div",null,[o("div",{class:"section-kicker"},"ธีม"),o("h2",null,"ธีม (Themes)"),o("p",{class:"panel-subtitle"},"ภาพรวม alternative factors ของไทย — แต่ละธีมมีความถี่ข้อมูลต่างกัน (monthly / quarterly) ดังนั้นอย่าเทียบเป็นจุดเวลาเดียวกัน.")],-1)),o("span",Sa,"รวม "+m(w.value)+" symbols",1)]),o("div",wa,[(T(!0),E(le,null,Ae(Ne.value,p=>(T(),E("article",{key:p.id,class:"theme-card"},[o("div",Ca,[o("span",ka,m(gt(p.frequency)),1),o("span",Ta,m(p.label_th),1)]),o("div",Ea,[f[22]||(f[22]=o("span",{class:"theme-surprise-label"},"ความต่าง (surprise)",-1)),o("span",Oa,m(p.surprise!=null?_(p.surprise,2)+"σ":"—"),1)]),o("div",Pa,[p.id==="auto_credit"&&p.read.new_car_sales_yoy!=null?(T(),E("div",Aa,m(_(p.read.new_car_sales_yoy))+"% YoY ยอดขายรถ",1)):p.id==="auto_credit"&&p.read.auto_npl_pct!=null?(T(),E("div",Ra,"NPL "+m(_(p.read.auto_npl_pct))+"%",1)):p.id==="refining_energy"&&(p.read.quarterly||p.read.net_profit)?(T(),E("div",Ma,"กำไรสุทธิ TOP (รายไตรมาส)")):p.id==="refining_energy"&&p.read.irpc_net_margin_pct!=null?(T(),E("div",Ia,"กำไรสุทธิ IRPC "+m(_(p.read.irpc_net_margin_pct))+"%",1)):p.id==="tourism"?(T(),E("div",Fa,"signal tourism "+m(p.surprise!=null?_(p.surprise,2):"—")+"σ",1)):p.id==="banks"&&p.read.interest_rate_pct!=null?(T(),E("div",Da,"ดอกเบี้ย "+m(_(p.read.interest_rate_pct))+"%",1)):p.id==="banks"&&p.read.bank_npl_pct!=null?(T(),E("div",La,"NPL ภาคการเงิน "+m(_(p.read.bank_npl_pct))+"%",1)):(p.id==="retail"||p.id==="consumer_staples")&&p.read.retail_sales_yoy!=null?(T(),E("div",$a,"ยอดขายปลีก "+m(_(p.read.retail_sales_yoy))+"% YoY",1)):(p.id==="retail"||p.id==="consumer_staples")&&p.read.consumer_confidence!=null?(T(),E("div",Na,"เชื่อมั่นผู้บริโภค "+m(_(p.read.consumer_confidence,1)),1)):p.id==="nonbank_finance"&&p.read.consumer_credit!=null?(T(),E("div",ja,"สินเชื่อผู้บริโภค "+m(_(p.read.consumer_credit/1e6,2))+" ล้านลบ.",1)):p.id==="nonbank_finance"&&p.read.household_debt_gdp!=null?(T(),E("div",Ha,"หนี้ครัวเรือน "+m(_(p.read.household_debt_gdp))+"% GDP",1)):p.id==="property"&&p.read.property_prices_yoy!=null?(T(),E("div",Va,"ราคาอสังหา "+m(_(p.read.property_prices_yoy))+"% YoY",1)):p.id==="telecom_it"&&p.read.business_confidence!=null?(T(),E("div",Ba,"เชื่อมั่นธุรกิจ "+m(_(p.read.business_confidence,1)),1)):p.id==="healthcare"&&p.read.consumption_yoy!=null?(T(),E("div",Ka,"บริโภค "+m(_(p.read.consumption_yoy))+"% YoY",1)):ge("",!0)]),p.narrative?(T(),E("div",Ua,m(p.narrative),1)):ge("",!0)]))),128))]),Object.keys(Xe.value).length?(T(),E("div",Wa,[f[28]||(f[28]=o("div",{class:"section-kicker"},"ภาพรวมประเทศไทย",-1)),o("div",qa,[o("span",za,[f[23]||(f[23]=W("การบริโภคภาคเอกชน ",-1)),o("strong",null,m(Xe.value.private_consumption_yoy)+"%",1)]),o("span",Ya,[f[24]||(f[24]=W("การลงทุนเอกชน ",-1)),o("strong",null,m(Xe.value.private_investment_yoy)+"%",1)]),o("span",Ga,[f[25]||(f[25]=W("เงินเฟ้อ ",-1)),o("strong",null,m(Xe.value.headline_inflation_yoy)+"%",1)]),o("span",Ja,[f[26]||(f[26]=W("การว่างงาน ",-1)),o("strong",null,m(Xe.value.unemployment_pct)+"%",1)]),o("span",Xa,[f[27]||(f[27]=W("นักท่องเที่ยว YTD ",-1)),o("strong",null,m(Xe.value.tourists_ytd_mn)+" ล้าน",1)])])])):ge("",!0)]),o("section",Za,[o("div",Qa,[f[29]||(f[29]=o("div",null,[o("div",{class:"section-kicker"},"ตารางหุ้น"),o("h2",null,"ตารางหุ้น"),o("p",{class:"panel-subtitle"},[W("ตารางเดียวรวมทุกธีม — สัญญาณ + คะแนนรวม (60% ธีม / 40% พื้นฐาน) + มูลค่าพื้นฐานจาก Siamchart. เรียงได้โดยคลิกหัวตาราง; เปิด "),o("em",null,"เฉพาะหุ้นปันผล"),W(" เพื่อกรองหุ้นที่จ่ายปันผล.")])],-1)),o("div",ec,[o("label",tc,[Mt(o("input",{type:"checkbox","onUpdate:modelValue":f[0]||(f[0]=p=>ie.value=p)},null,512),[[hl,ie.value]]),o("span",null,"เฉพาะหุ้นปันผล ("+m(b.value)+")",1)]),o("span",{class:ne(["status-tag",d.value?"":"warning-tag"])},m(d.value?"Siamchart ใช้งานได้":"ไม่มี factor"),3)])]),d.value?(T(),E("div",nc,[o("table",lc,[o("thead",null,[o("tr",null,[o("th",{class:ne(["sortable",{active:te.value==="signal_score"}]),onClick:f[1]||(f[1]=p=>k("signal_score"))},"สัญญาณ "+m(C("signal_score")),3),o("th",{class:ne(["sortable",{active:te.value==="combined"}]),onClick:f[2]||(f[2]=p=>k("combined")),title:"60% ธีม + 40% พื้นฐาน"},"คะแนนรวม (60/40) "+m(C("combined")),3),o("th",{class:ne(["sortable",{active:te.value==="symbol"}]),onClick:f[3]||(f[3]=p=>k("symbol"))},"หุ้น "+m(C("symbol")),3),f[31]||(f[31]=o("th",null,"ธีม",-1)),o("th",{class:ne(["sortable",{active:te.value==="pe"}]),onClick:f[4]||(f[4]=p=>k("pe"))},"P/E "+m(C("pe")),3),o("th",{class:ne(["sortable",{active:te.value==="eps"}]),onClick:f[5]||(f[5]=p=>k("eps"))},"EPS "+m(C("eps")),3),o("th",{class:ne(["sortable",{active:te.value==="eps_growth_yoy"}]),onClick:f[6]||(f[6]=p=>k("eps_growth_yoy"))},"EPS YoY "+m(C("eps_growth_yoy")),3),o("th",{class:ne(["sortable",{active:te.value==="dividend_yield"}]),onClick:f[7]||(f[7]=p=>k("dividend_yield"))},"ปันผล % "+m(C("dividend_yield")),3),o("th",{class:ne(["sortable",{active:te.value==="pbv"}]),onClick:f[8]||(f[8]=p=>k("pbv"))},"P/BV "+m(C("pbv")),3),o("th",{class:ne(["sortable",{active:te.value==="roe"}]),onClick:f[9]||(f[9]=p=>k("roe"))},"ROE "+m(C("roe")),3)])]),o("tbody",null,[(T(!0),E(le,null,Ae(O.value,p=>{var At;return T(),E("tr",{key:p.symbol,class:"clickable-row",onClick:vs=>be(p.symbol)},[o("td",null,[p.signal_side?(T(),E("span",{key:0,class:ne(["side-pill",p.signal_side.toLowerCase()])},m(p.signal_side),3)):(T(),E("span",oc,"—"))]),o("td",rc,m(((At=ft.value[p.symbol])==null?void 0:At.combined)!=null?_(ft.value[p.symbol].combined):"—"),1),o("td",null,[o("strong",ac,m(p.symbol),1)]),o("td",null,[(T(!0),E(le,null,Ae(c(p.symbol),vs=>(T(),E("span",{key:vs,class:"theme-tag"},m(vs),1))),128)),c(p.symbol).length?ge("",!0):(T(),E("span",cc,"—"))]),o("td",uc,m(p.pe!=null?_(p.pe):"—"),1),o("td",null,m(p.eps!=null?_(p.eps):"—"),1),o("td",{class:ne(p.eps_growth_yoy>=0?"positive-text":"negative-text")},m(p.eps_growth_yoy!=null?(p.eps_growth_yoy>=0?"+":"")+_(p.eps_growth_yoy)+"%":"—"),3),o("td",{class:ne(p.dividend_yield>=0?"positive-text":"")},[W(m(p.dividend_yield!=null?_(p.dividend_yield)+"%":"—"),1),p.is_dividend?(T(),E("span",fc,"●")):ge("",!0)],2),o("td",null,m(p.pbv!=null?_(p.pbv):"—"),1),o("td",{class:ne(p.roe>=0?"positive-text":"negative-text")},m(p.roe!=null?_(p.roe)+"%":"—"),3)],8,ic)}),128))])])])):(T(),E("div",sc,[...f[30]||(f[30]=[W("Siamchart snapshot ไม่อยู่บน disk. รัน ",-1),o("code",null,"collect_siamchart.py --group SET50 --with-info",-1),W(" เพื่อเก็บข้อมูล.",-1)])]))]),o("section",dc,[o("div",pc,[f[32]||(f[32]=o("div",null,[o("div",{class:"section-kicker"},"ที่มาของข้อมูล"),o("h2",null,"แหล่งข้อมูลทั้งหมด"),o("p",{class:"panel-subtitle"},"รายการแหล่งข้อมูลจริงที่ใช้ — ดึงมาเมื่อใด และข้อมูลชุดไหน ข้อมูลทั้งหมดจากแหล่งไทย.")],-1)),o("span",hc,m(cs.value)+" ปัจจัย · "+m(Vt.value)+" แหล่ง",1)]),o("div",gc,[o("table",vc,[f[33]||(f[33]=o("thead",null,[o("tr",null,[o("th",null,"ข้อมูล"),o("th",null,"แหล่ง"),o("th",null,"ช่วงข้อมูล"),o("th",null,"ความถี่"),o("th",null,"อัปเดตครั้งต่อไป"),o("th",null,"อัปเดตล่าสุด")])],-1)),o("tbody",null,[(T(!0),E(le,null,Ae(pt.value,(p,At)=>(T(),E("tr",{key:At},[o("td",null,m(p.จาก||p.ขอบเขต),1),o("td",_c,m(p.แหล่ง),1),o("td",mc,m(p.ข้อมูล),1),o("td",bc,m(p.ความถี่||"—"),1),o("td",yc,m(p.อัปเดตครั้งต่อไป?L(p.อัปเดตครั้งต่อไป):"—"),1),o("td",xc,m(p.dึงมาเมื่อ?L(p.dึงมาเมื่อ):"—"),1)]))),128))])])])]),o("section",Sc,[f[35]||(f[35]=o("div",{class:"panel-header signal-header"},[o("div",null,[o("div",{class:"section-kicker"},"สถานะการดึงข้อมูล"),o("h2",null,"Log — สถานะแหล่งข้อมูล"),o("p",{class:"panel-subtitle"},'ผลการดึงข้อมูลครั้งล่าสุดของแต่ละแหล่ง โดยระบบวิเคราะห์สาเหตุให้อัตโนมัติ (เครือข่าย / หมดเวลา / หน้าเว็บเปลี่ยนโครงสร้าง / รูปแบบข้อมูล เป็นต้น) — กดปุ่ม "คัดลอก" เพื่อ copy สาเหตุไปแจ้ง/ตรวจสอบได้ทันที.')])],-1)),Te.value.length===0?(T(),E("div",wc,"ยังไม่มี log — รอรอบ refresh ถัดไป (ปกติ ~ทุกวันสำหรับราคา, ~รายเดือน/ไตรมาสสำหรับปัจจัย).")):(T(),E("div",Cc,[o("table",kc,[f[34]||(f[34]=o("thead",null,[o("tr",null,[o("th",null,"แหล่ง"),o("th",null,"ผลลัพธ์"),o("th",null,"สาเหตุ"),o("th",null,"เวลา"),o("th")])],-1)),o("tbody",null,[(T(!0),E(le,null,Ae(Te.value.slice(0,20),(p,At)=>(T(),E("tr",{key:At},[o("td",Tc,[W(m(p.label),1),o("div",Ec,m(p.key),1)]),o("td",null,[p.ok?(T(),E("span",Oc,"OK")):(T(),E("span",Pc,"FAIL"))]),o("td",null,[p.ok?(T(),E(le,{key:0},[W("—")],64)):(T(),E(le,{key:1},[o("div",null,m(Ys(p.category))+m(Ti(p)),1),p.detail?(T(),E("div",Ac,m(p.detail.slice(0,160)),1)):ge("",!0)],64))]),o("td",Rc,m(p.at?L(p.at):"—"),1),o("td",null,[p.ok?ge("",!0):(T(),E("button",{key:0,class:"primary-btn",style:{padding:"2px 8px"},onClick:vs=>ki(p)},"คัดลอกสาเหตุ",8,Mc))])]))),128))])])]))]),o("section",Ic,[o("div",Fc,[f[36]||(f[36]=o("div",null,[o("div",{class:"section-kicker"},"คำแนะนำการลงทุน"),o("h2",null,"จัดสรรทุน (Suggestion)"),o("p",{class:"panel-subtitle"},"กรอกทุน และระบบแนะนำสัดส่วน 50 / 20 / 30 — หุ้นที่ทำกำไรได้มากสุดแล้วจ่ายปันผล, หุ้นทำกำไรแต่ไม่ปันผล, และหุ้นปันผลสูงสุด (ไม่ซ้ำ) — ขั้นต่ำ 100 หุ้นต่อตัว.")],-1)),o("span",Dc,m(I.value?"ใช้ได้":"รอใส่ทุน"),1)]),o("div",Lc,[o("div",$c,[f[37]||(f[37]=o("label",null,"ทุน (บาท)",-1)),Mt(o("input",{"onUpdate:modelValue":f[10]||(f[10]=p=>a.value=p),type:"number",min:"1000",step:"1000"},null,512),[[xs,a.value]])]),o("button",{class:"primary-button",disabled:U.value,onClick:vt},m(U.value?"กำลังคำนวณ…":"คำนวณการจัดสรร"),9,Nc)]),I.value?(T(),E("div",jc,[o("div",Hc,[o("div",Vc,[f[38]||(f[38]=o("span",null,"ลงทุนรวม",-1)),o("strong",null,m(_(ce.value,0))+" บาท",1)]),o("div",Bc,[f[39]||(f[39]=o("span",null,"เงินสดเหลือ",-1)),o("strong",null,m(_(Oe.value,0))+" บาท",1)])]),o("div",Kc,m(I.value.data_note),1),o("div",Uc,[o("div",Wc,[f[41]||(f[41]=o("div",{class:"sim-bucket-head"},[o("span",{class:"sim-bucket-tag b1"},"50%"),o("strong",null,"ทำกำไร + จ่ายปันผล")],-1)),o("table",qc,[fe(1).length?(T(),E("tbody",zc,[(T(!0),E(le,null,Ae(fe(1),p=>(T(),E("tr",{key:"b1"+p.symbol},[o("td",null,m(p.symbol),1),o("td",Yc,"qty "+m(p.qty),1),o("td",Gc,"@ "+m(_(p.price)),1),o("td",Jc,m(_(p.notional,0)),1)]))),128))])):(T(),E("tbody",Xc,[...f[40]||(f[40]=[o("tr",null,[o("td",{class:"muted-cell"},"ไม่มีหุ้นที่เข้าเกณฑ์")],-1)])]))])]),o("div",Zc,[f[43]||(f[43]=o("div",{class:"sim-bucket-head"},[o("span",{class:"sim-bucket-tag b2"},"20%"),o("strong",null,"ทำกำไร ไม่ปันผล")],-1)),o("table",Qc,[fe(2).length?(T(),E("tbody",eu,[(T(!0),E(le,null,Ae(fe(2),p=>(T(),E("tr",{key:"b2"+p.symbol},[o("td",null,m(p.symbol),1),o("td",tu,"qty "+m(p.qty),1),o("td",su,"@ "+m(_(p.price)),1),o("td",nu,m(_(p.notional,0)),1)]))),128))])):(T(),E("tbody",lu,[...f[42]||(f[42]=[o("tr",null,[o("td",{class:"muted-cell"},"ไม่มีหุ้นที่เข้าเกณฑ์")],-1)])]))])]),o("div",iu,[f[45]||(f[45]=o("div",{class:"sim-bucket-head"},[o("span",{class:"sim-bucket-tag b3"},"30%"),o("strong",null,"ปันผลสูงสุด (ไม่ซ้ำ)")],-1)),o("table",ou,[fe(3).length?(T(),E("tbody",ru,[(T(!0),E(le,null,Ae(fe(3),p=>(T(),E("tr",{key:"b3"+p.symbol},[o("td",null,m(p.symbol),1),o("td",au,"qty "+m(p.qty),1),o("td",cu,"@ "+m(_(p.price)),1),o("td",uu,m(_(p.notional,0)),1)]))),128))])):(T(),E("tbody",fu,[...f[44]||(f[44]=[o("tr",null,[o("td",{class:"muted-cell"},"ไม่มีหุ้นที่เข้าเกณฑ์")],-1)])]))])])])])):ge("",!0),I.value?ge("",!0):(T(),E("div",du,"กด 'คำนวณการจัดสรร' เพื่อดูว่า 50/20/30 จัดสรรทุนของคุณไปที่หุ้นไหนบ้าง"))]),o("section",pu,[f[62]||(f[62]=o("div",{class:"panel-header signal-header"},[o("div",null,[o("div",{class:"section-kicker"},"การย้อนทดสอบ"),o("h2",null,"Backtest (ย้อนทดสอบ)"),o("p",{class:"panel-subtitle"},"กำหนดช่วงวัน แล้วระบบจัดสรร 50/20/30 ณ วันที่เริ่ม ลงทุน และปรับพอร์ตตามข้อมูลที่เผยแพร่ใหม่ (event-driven) จนถึงวันสิ้นสุด — สรุปกำไร/ขาดทุนจากราคา + เงินปันผล. มีค่าธรรมเนียม 0.3% ต่อรายการ และปันผลเข้าบัญชีใน 30 วันหลัง ex-date.")])],-1)),o("div",hu,[o("label",null,[f[46]||(f[46]=W("ตั้งแต่ ",-1)),Mt(o("input",{type:"date","onUpdate:modelValue":f[11]||(f[11]=p=>y.value=p)},null,512),[[xs,y.value]])]),o("label",null,[f[47]||(f[47]=W("ถึง ",-1)),Mt(o("input",{type:"date","onUpdate:modelValue":f[12]||(f[12]=p=>R.value=p)},null,512),[[xs,R.value]])]),o("label",null,[f[48]||(f[48]=W("ทุน ",-1)),Mt(o("input",{type:"number","onUpdate:modelValue":f[13]||(f[13]=p=>M.value=p),step:"100000"},null,512),[[xs,M.value,void 0,{number:!0}]])]),o("label",gu,[Mt(o("input",{type:"checkbox","onUpdate:modelValue":f[14]||(f[14]=p=>H.value=p)},null,512),[[hl,H.value]]),f[49]||(f[49]=W(" ใช้ ledger ปันผลตามวันที่จริง ",-1))]),o("button",{class:"primary-btn",disabled:K.value||V.value&&!V.value.ready,onClick:Ei},m(K.value?"กำลังย้อนทดสอบ…":"รัน Backtest"),9,vu)]),V.value&&!V.value.ready?(T(),E("div",_u,[f[50]||(f[50]=o("strong",null,"ยังรันย้อนทดสอบแบบ strict PIT ไม่ได้ — ขาดข้อมูล coverage:",-1)),o("div",mu,m((V.value.missing||[]).slice(0,8).join(", "))+m((V.value.missing||[]).length>8?"…":""),1),o("div",bu,"วันเริ่มที่แนะนำ: "+m(V.value.recommended_start||"—")+" · วันสิ้นสุด: "+m(V.value.recommended_end||"—"),1)])):ge("",!0),(Pe=A.value)!=null&&Pe.error?(T(),E("div",yu,m(A.value.error),1)):A.value&&!A.value.error?(T(),E("div",xu,[o("div",Su,[o("div",wu,[f[51]||(f[51]=o("span",null,"กำไรจากราคา (realized)",-1)),o("strong",{class:ne(Pt(A.value.realized_trading_pnl))},m(_(A.value.realized_trading_pnl))+" บาท",3)]),o("div",Cu,[f[52]||(f[52]=o("span",null,"กำไรจากราคา (unrealized)",-1)),o("strong",{class:ne(Pt(A.value.unrealized_trading_pnl))},m(_(A.value.unrealized_trading_pnl))+" บาท",3)]),o("div",ku,[f[53]||(f[53]=o("span",null,"เงินปันผลที่ได้รับ",-1)),o("strong",Tu,m(_(A.value.dividend_cash_received))+" บาท",1)]),o("div",Eu,[f[54]||(f[54]=o("span",null,"ค่าธรรมเนียม (0.3%)",-1)),o("strong",Ou,"–"+m(_(A.value.transaction_costs))+" บาท",1)]),o("div",Pu,[f[55]||(f[55]=o("span",null,"เงินปันผลค้างรับ",-1)),o("strong",null,m(_(A.value.dividend_receivable))+" บาท",1)]),o("div",Au,[f[56]||(f[56]=o("span",null,"มูลค่าสุดท้าย (equity)",-1)),o("strong",null,m(_(A.value.final_equity))+" บาท",1)]),o("div",Ru,[f[57]||(f[57]=o("span",null,"ผลตอบแทนสุทธิ",-1)),o("strong",{class:ne(Pt(A.value.net_return))},m((A.value.net_return*100).toFixed(2))+"%",3)])]),o("div",Mu,"Rebalances: "+m(A.value.rebalances)+" · ปันผลตาม: "+m(A.value.dividend_timing)+" · ช่วง "+m(A.value.start)+" → "+m(A.value.end),1),A.value.leakage_guard?(T(),E("div",Iu,"✅ strict PIT (leakage guard active)")):(T(),E("div",Fu,"คำเตือน: ไม่ได้พิสูจน์ point-in-time (non-PIT)")),A.value.holdings&&A.value.holdings.length?(T(),E("div",Du,[f[59]||(f[59]=o("strong",null,"พอร์ตสุดท้าย:",-1)),o("table",Lu,[f[58]||(f[58]=o("thead",null,[o("tr",null,[o("th",null,"หุ้น"),o("th",null,"จำนวน"),o("th",null,"ต้นทุนเฉลี่ย"),o("th",null,"ราคาล่าสุด"),o("th",null,"มูลค่า"),o("th",null,"กำไร unrealized")])],-1)),o("tbody",null,[(T(!0),E(le,null,Ae(A.value.holdings,p=>(T(),E("tr",{key:p.symbol},[o("td",$u,m(p.symbol),1),o("td",null,m(p.qty),1),o("td",null,m(_(p.average_cost,2)),1),o("td",null,m(_(p.last_price,2)),1),o("td",null,m(_(p.market_value)),1),o("td",{class:ne(Pt(p.unrealized_pnl))},m(_(p.unrealized_pnl)),3)]))),128))])])])):ge("",!0)])):(T(),E("div",Nu,"กำหนดช่วงวันแล้วกด 'รัน Backtest' เพื่อดูผล (กำไร/ขาดทุนจากราคา + ปันผล)")),ee.value.length?(T(),E("div",ju,[f[61]||(f[61]=o("div",{class:"section-kicker"},"ประวัติการย้อนทดสอบ",-1)),o("table",Hu,[f[60]||(f[60]=o("thead",null,[o("tr",null,[o("th",null,"#"),o("th",null,"ช่วง"),o("th",null,"ทุน"),o("th",null,"กำไรราคา"),o("th",null,"ปันผล"),o("th",null,"ผลตอบแทน"),o("th",null,"รันเมื่อ")])],-1)),o("tbody",null,[(T(!0),E(le,null,Ae(ee.value.slice().reverse(),p=>(T(),E("tr",{key:p.id},[o("td",null,m(p.id),1),o("td",null,[W(m(p.start)+" → "+m(p.end)+" ",1),p.leakage_guard===!1?(T(),E("span",Vu,"descriptive non-PIT")):ge("",!0)]),o("td",null,m(_(p.capital)),1),o("td",{class:ne(Pt(p.price_pnl))},m(_(p.price_pnl)),3),o("td",Bu,[W(m(_(p.dividend_income)),1),o("span",{class:ne(["status-tag",P(p.dividend_method).cls]),style:js([P(p.dividend_method).style||void 0,{"margin-left":"4px"}]),title:F(p.dividend_method)},m(P(p.dividend_method).label),15,Ku)]),o("td",{class:ne(Pt(p.net_return))},m((p.net_return*100).toFixed(2))+"%",3),o("td",Uu,m(p.ran_at?L(p.ran_at):"—"),1)]))),128))])])])):ge("",!0)])],64))]),u.value?(T(),E("div",{key:0,class:"modal-overlay",onClick:Xr(Ce,["self"])},[o("div",Wu,[o("div",qu,[o("div",null,[f[63]||(f[63]=o("div",{class:"modal-kicker"},"การวิเคราะห์รายหุ้น",-1)),o("h3",null,m(u.value),1)]),o("button",{class:"modal-close",onClick:Ce},"✕")]),h.value?(T(),E("div",zu,"กำลังโหลดการวิเคราะห์…")):(je=g.value)!=null&&je.error?(T(),E("div",Yu,m(g.value.error),1)):g.value?(T(),E("div",Gu,[o("div",Ju,[f[67]||(f[67]=o("div",{class:"modal-section-title"},"ธีมที่เกี่ยวข้อง (คะแนนต่อธีม)",-1)),(Qe=g.value.themes)!=null&&Qe.length?(T(),E("div",Xu,[(T(!0),E(le,null,Ae(g.value.theme_contributions,p=>(T(),E("div",{key:p.theme,class:"contrib-line"},[o("span",Zu,m(p.label_th||zs.value[p.theme]||p.theme),1),p.surprise!=null?(T(),E("span",Qu,[o("em",null,m(_(p.surprise))+"σ",1),f[64]||(f[64]=W(" × คุณภาพ ",-1)),o("em",null,m(p.quality),1),f[65]||(f[65]=W(" = ",-1)),o("strong",null,m(_(p.theme_score))+"σ",1)])):(T(),E("strong",ef,"ยังไม่มีข้อมูล"))]))),128)),f[66]||(f[66]=o("div",{class:"modal-sub"},"คะแนนธีม = ค่าเฉลี่ยของ (surprise × คุณภาพหุ้น) ที่หุ้นนี้อยู่ใน",-1))])):(T(),E("div",tf,"หุ้นนี้ยังไม่ได้จัดอยู่ในธีมใด (จะอัปเดตเมื่อเพิ่มธีม)"))]),o("div",sf,[f[73]||(f[73]=o("div",{class:"modal-section-title"},"มูลค่าพื้นฐาน (Siamchart)",-1)),o("div",nf,[o("span",null,[f[68]||(f[68]=W("P/E ",-1)),o("strong",null,m(((ps=g.value.fundamentals)==null?void 0:ps.pe)??"—"),1)]),o("span",null,[f[69]||(f[69]=W("EPS ",-1)),o("strong",null,m(((_t=g.value.fundamentals)==null?void 0:_t.eps)??"—"),1)]),o("span",null,[f[70]||(f[70]=W("P/BV ",-1)),o("strong",null,m(((hs=g.value.fundamentals)==null?void 0:hs.pbv)??"—"),1)]),o("span",null,[f[71]||(f[71]=W("ROE ",-1)),o("strong",null,m(((gs=g.value.fundamentals)==null?void 0:gs.roe)??"—"),1)]),o("span",null,[f[72]||(f[72]=W("ปันผล ",-1)),o("strong",null,m((Ln=g.value.fundamentals)!=null&&Ln.is_dividend?"จ่าย":"—"),1)])]),o("div",lf,"ภาพรวม: "+m(g.value.company_name||u.value),1)]),o("div",of,[f[75]||(f[75]=o("div",{class:"modal-section-title"},"ขั้นตอนการคำนวณคะแนนรวม",-1)),o("div",rf,[o("div",af,m(g.value.combined_formula),1),(T(!0),E(le,null,Ae(g.value.combined_calc,p=>(T(),E("div",{key:p.label,class:"calc-step"},[o("div",cf,[o("span",null,m(p.label),1),o("strong",null,m(_(p.value))+" × "+m(p.weight),1)]),o("div",uf,m(p.note),1)]))),128)),g.value.siamchart_z_note?(T(),E("div",ff,[W(" คะแนนพื้นฐานได้จาก z-score: z = (ค่า"+m(g.value.siamchart_z_note.raw_i)+" − ค่าเฉลี่ย "+m(g.value.siamchart_z_note.population_mean)+") / ค่าเบี่ยงเบน "+m(g.value.siamchart_z_note.population_stdev),1),f[74]||(f[74]=o("br",null,null,-1)),W("เทียบกับ "+m(g.value.siamchart_z_note.universe_size)+" หุ้นใน SET50 ",1)])):ge("",!0)]),o("div",df,"ราคาล่าสุด: "+m((($n=g.value.price)==null?void 0:$n.latest)!=null?_(g.value.price.latest):"—")+" ("+m(((Nn=g.value.price)==null?void 0:Nn.date)||"—")+")",1)])])):ge("",!0)])])):ge("",!0)])}}};ea(pf).mount("#app"); diff --git a/frontend/dist/assets/index-C6jTIiYC.js b/frontend/dist/assets/index-C6jTIiYC.js new file mode 100644 index 0000000..91735f1 --- /dev/null +++ b/frontend/dist/assets/index-C6jTIiYC.js @@ -0,0 +1,18 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(l){if(l.ep)return;l.ep=!0;const i=s(l);fetch(l.href,i)}})();/** +* @vue/shared v3.5.41 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function mn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Q={},Dt=[],ze=()=>{},_l=()=>!1,Ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ls=e=>e.startsWith("onUpdate:"),be=Object.assign,bn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Oi=Object.prototype.hasOwnProperty,Y=(e,t)=>Oi.call(e,t),N=Array.isArray,Lt=e=>is(e)==="[object Map]",$s=e=>is(e)==="[object Set]",jn=e=>is(e)==="[object Date]",j=e=>typeof e=="function",ae=e=>typeof e=="string",Ge=e=>typeof e=="symbol",X=e=>e!==null&&typeof e=="object",ml=e=>(X(e)||j(e))&&j(e.then)&&j(e.catch),bl=Object.prototype.toString,is=e=>bl.call(e),Pi=e=>is(e).slice(8,-1),yl=e=>is(e)==="[object Object]",yn=e=>ae(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,zt=mn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ns=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Ai=/-\w/g,Fe=Ns(e=>e.replace(Ai,t=>t.slice(1).toUpperCase())),Ri=/\B([A-Z])/g,Ot=Ns(e=>e.replace(Ri,"-$1").toLowerCase()),xl=Ns(e=>e.charAt(0).toUpperCase()+e.slice(1)),Gs=Ns(e=>e?`on${xl(e)}`:""),qe=(e,t)=>!Object.is(e,t),Ss=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},xn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Hn;const js=()=>Hn||(Hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Hs(e){if(N(e)){const t={};for(let s=0;s{if(s){const n=s.split(Ii);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Z(e){let t="";if(ae(e))t=e;else if(N(e))for(let s=0;sos(s,t))}const kl=e=>!!(e&&e.__v_isRef===!0),m=e=>ae(e)?e:e==null?"":N(e)||X(e)&&(e.toString===bl||!j(e.toString))?kl(e)?m(e.value):JSON.stringify(e,Tl,2):String(e),Tl=(e,t)=>kl(t)?Tl(e,t.value):Lt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,l],i)=>(s[Js(n,i)+" =>"]=l,s),{})}:$s(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Js(s))}:Ge(t)?Js(t):X(t)&&!N(t)&&!yl(t)?String(t):t,Js=(e,t="")=>{var s;return Ge(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** +* @vue/reactivity v3.5.41 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let pe;class ji{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&pe&&(pe.active?(this.parent=pe,this.index=(pe.scopes||(pe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t0&&--this._on===0){if(pe===this)pe=this.prevScope;else{let t=pe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(Gt){let t=Gt;for(Gt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Yt;){let t=Yt;for(Yt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Al(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Rl(e){let t,s=e.depsTail,n=s;for(;n;){const l=n.prevDep;n.version===-1?(n===s&&(s=l),Cn(n),Vi(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=l}e.deps=t,e.depsTail=s}function an(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ml(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ml(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qt)||(e.globalVersion=Qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!an(e))))return;e.flags|=2;const t=e.dep,s=te,n=De;te=e,De=!0;try{Al(e);const l=e.fn(e._value);(t.version===0||qe(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{te=s,De=n,Rl(e),e.flags&=-3}}function Cn(e,t=!1){const{dep:s,prevSub:n,nextSub:l}=e;if(n&&(n.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Cn(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Vi(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let De=!0;const Il=[];function rt(){Il.push(De),De=!1}function at(){const e=Il.pop();De=e===void 0?!0:e}function Vn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=te;te=void 0;try{t()}finally{te=s}}}let Qt=0;class Bi{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class kn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!te||!De||te===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==te)s=this.activeLink=new Bi(te,this),te.deps?(s.prevDep=te.depsTail,te.depsTail.nextDep=s,te.depsTail=s):te.deps=te.depsTail=s,Fl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=te.depsTail,s.nextDep=void 0,te.depsTail.nextDep=s,te.depsTail=s,te.deps===s&&(te.deps=n)}return s}trigger(t){this.version++,Qt++,this.notify(t)}notify(t){wn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Sn()}}}function Fl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Fl(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const cn=new WeakMap,kt=Symbol(""),un=Symbol(""),es=Symbol("");function _e(e,t,s){if(De&&te){let n=cn.get(e);n||cn.set(e,n=new Map);let l=n.get(s);l||(n.set(s,l=new kn),l.map=n,l.key=s),l.track()}}function it(e,t,s,n,l,i){const r=cn.get(e);if(!r){Qt++;return}const a=u=>{u&&u.trigger()};if(wn(),t==="clear")r.forEach(a);else{const u=N(e),g=u&&yn(s);if(u&&s==="length"){const h=Number(n);r.forEach((y,R)=>{(R==="length"||R===es||!Ge(R)&&R>=h)&&a(y)})}else switch((s!==void 0||r.has(void 0))&&a(r.get(s)),g&&a(r.get(es)),t){case"add":u?g&&a(r.get("length")):(a(r.get(kt)),Lt(e)&&a(r.get(un)));break;case"delete":u||(a(r.get(kt)),Lt(e)&&a(r.get(un)));break;case"set":Lt(e)&&a(r.get(kt));break}}Sn()}function Mt(e){const t=z(e);return t===e?t:(_e(t,"iterate",es),Ie(e)?t:t.map(Le))}function Vs(e){return _e(e=z(e),"iterate",es),e}function Ue(e,t){return ct(e)?jt(Tt(e)?Le(t):t):Le(t)}const Ki={__proto__:null,[Symbol.iterator](){return Zs(this,Symbol.iterator,e=>Ue(this,e))},concat(...e){return Mt(this).concat(...e.map(t=>N(t)?Mt(t):t))},entries(){return Zs(this,"entries",e=>(e[1]=Ue(this,e[1]),e))},every(e,t){return st(this,"every",e,t,void 0,arguments)},filter(e,t){return st(this,"filter",e,t,s=>s.map(n=>Ue(this,n)),arguments)},find(e,t){return st(this,"find",e,t,s=>Ue(this,s),arguments)},findIndex(e,t){return st(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return st(this,"findLast",e,t,s=>Ue(this,s),arguments)},findLastIndex(e,t){return st(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return st(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qs(this,"includes",e)},indexOf(...e){return Qs(this,"indexOf",e)},join(e){return Mt(this).join(e)},lastIndexOf(...e){return Qs(this,"lastIndexOf",e)},map(e,t){return st(this,"map",e,t,void 0,arguments)},pop(){return Kt(this,"pop")},push(...e){return Kt(this,"push",e)},reduce(e,...t){return Bn(this,"reduce",e,t)},reduceRight(e,...t){return Bn(this,"reduceRight",e,t)},shift(){return Kt(this,"shift")},some(e,t){return st(this,"some",e,t,void 0,arguments)},splice(...e){return Kt(this,"splice",e)},toReversed(){return Mt(this).toReversed()},toSorted(e){return Mt(this).toSorted(e)},toSpliced(...e){return Mt(this).toSpliced(...e)},unshift(...e){return Kt(this,"unshift",e)},values(){return Zs(this,"values",e=>Ue(this,e))}};function Zs(e,t,s){const n=Vs(e),l=n[t]();return n!==e&&!Ie(e)&&(l._next=l.next,l.next=()=>{const i=l._next();return i.done||(i.value=s(i.value)),i}),l}const Ui=Array.prototype;function st(e,t,s,n,l,i){const r=Vs(e),a=r!==e&&!Ie(e),u=r[t];if(u!==Ui[t]){const y=u.apply(e,i);return a?Le(y):y}let g=s;r!==e&&(a?g=function(y,R){return s.call(this,Ue(e,y),R,e)}:s.length>2&&(g=function(y,R){return s.call(this,y,R,e)}));const h=u.call(r,g,n);return a&&l?l(h):h}function Bn(e,t,s,n){const l=Vs(e),i=l!==e&&!Ie(e);let r=s,a=!1;l!==e&&(i?(a=n.length===0,r=function(g,h,y){return a&&(a=!1,g=Ue(e,g)),s.call(this,g,Ue(e,h),y,e)}):s.length>3&&(r=function(g,h,y){return s.call(this,g,h,y,e)}));const u=l[t](r,...n);return a?Ue(e,u):u}function Qs(e,t,s){const n=z(e);_e(n,"iterate",es);const l=n[t](...s);return(l===-1||l===!1)&&Pn(s[0])?(s[0]=z(s[0]),n[t](...s)):l}function Kt(e,t,s=[]){rt(),wn();const n=z(e)[t].apply(e,s);return Sn(),at(),n}const Wi=mn("__proto__,__v_isRef,__isVue"),Dl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ge));function qi(e){Ge(e)||(e=String(e));const t=z(this);return _e(t,"has",e),t.hasOwnProperty(e)}class Ll{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const l=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!l;if(s==="__v_isReadonly")return l;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(l?i?so:Hl:i?jl:Nl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=N(t);if(!l){let u;if(r&&(u=Ki[s]))return u;if(s==="hasOwnProperty")return qi}const a=Reflect.get(t,s,me(t)?t:n);if((Ge(s)?Dl.has(s):Wi(s))||(l||_e(t,"get",s),i))return a;if(me(a)){const u=r&&yn(s)?a:a.value;return l&&X(u)?dn(u):u}return X(a)?l?dn(a):En(a):a}}class $l extends Ll{constructor(t=!1){super(!1,t)}set(t,s,n,l){let i=t[s];const r=N(t)&&yn(s);if(!this._isShallow){const g=ct(i);if(!Ie(n)&&!ct(n)&&(i=z(i),n=z(n)),!r&&me(i)&&!me(n))return g||(i.value=n),!0}const a=r?Number(s)e,ms=e=>Reflect.getPrototypeOf(e);function Xi(e,t,s){return function(...n){const l=this.__v_raw,i=z(l),r=Lt(i),a=e==="entries"||e===Symbol.iterator&&r,u=e==="keys"&&r,g=l[e](...n),h=s?fn:t?jt:Le;return!t&&_e(i,"iterate",u?un:kt),be(Object.create(g),{next(){const{value:y,done:R}=g.next();return R?{value:y,done:R}:{value:a?[h(y[0]),h(y[1])]:h(y),done:R}}})}}function bs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Zi(e,t){const s={get(l){const i=this.__v_raw,r=z(i),a=z(l);e||(qe(l,a)&&_e(r,"get",l),_e(r,"get",a));const{has:u}=ms(r),g=t?fn:e?jt:Le;if(u.call(r,l))return g(i.get(l));if(u.call(r,a))return g(i.get(a));i!==r&&i.get(l)},get size(){const l=this.__v_raw;return!e&&_e(z(l),"iterate",kt),l.size},has(l){const i=this.__v_raw,r=z(i),a=z(l);return e||(qe(l,a)&&_e(r,"has",l),_e(r,"has",a)),l===a?i.has(l):i.has(l)||i.has(a)},forEach(l,i){const r=this,a=r.__v_raw,u=z(a),g=t?fn:e?jt:Le;return!e&&_e(u,"iterate",kt),a.forEach((h,y)=>l.call(i,g(h),g(y),r))}};return be(s,e?{add:bs("add"),set:bs("set"),delete:bs("delete"),clear:bs("clear")}:{add(l){const i=z(this),r=ms(i),a=z(l),u=!t&&!Ie(l)&&!ct(l)?a:l;return r.has.call(i,u)||qe(l,u)&&r.has.call(i,l)||qe(a,u)&&r.has.call(i,a)||(i.add(u),it(i,"add",u,u)),this},set(l,i){!t&&!Ie(i)&&!ct(i)&&(i=z(i));const r=z(this),{has:a,get:u}=ms(r);let g=a.call(r,l);g||(l=z(l),g=a.call(r,l));const h=u.call(r,l);return r.set(l,i),g?qe(i,h)&&it(r,"set",l,i):it(r,"add",l,i),this},delete(l){const i=z(this),{has:r,get:a}=ms(i);let u=r.call(i,l);u||(l=z(l),u=r.call(i,l)),a&&a.call(i,l);const g=i.delete(l);return u&&it(i,"delete",l,void 0),g},clear(){const l=z(this),i=l.size!==0,r=l.clear();return i&&it(l,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(l=>{s[l]=Xi(l,e,t)}),s}function Tn(e,t){const s=Zi(e,t);return(n,l,i)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?n:Reflect.get(Y(s,l)&&l in n?s:n,l,i)}const Qi={get:Tn(!1,!1)},eo={get:Tn(!1,!0)},to={get:Tn(!0,!1)};const Nl=new WeakMap,jl=new WeakMap,Hl=new WeakMap,so=new WeakMap;function no(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function En(e){return ct(e)?e:On(e,!1,Yi,Qi,Nl)}function lo(e){return On(e,!1,Ji,eo,jl)}function dn(e){return On(e,!0,Gi,to,Hl)}function On(e,t,s,n,l){if(!X(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=l.get(e);if(i)return i;const r=no(Pi(e));if(r===0)return e;const a=new Proxy(e,r===2?n:s);return l.set(e,a),a}function Tt(e){return ct(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function ct(e){return!!(e&&e.__v_isReadonly)}function Ie(e){return!!(e&&e.__v_isShallow)}function Pn(e){return e?!!e.__v_raw:!1}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function io(e){return!Y(e,"__v_skip")&&Object.isExtensible(e)&&wl(e,"__v_skip",!0),e}const Le=e=>X(e)?En(e):e,jt=e=>X(e)?dn(e):e;function me(e){return e?e.__v_isRef===!0:!1}function B(e){return oo(e,!1)}function oo(e,t){return me(e)?e:new ro(e,t)}class ro{constructor(t,s){this.dep=new kn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:z(t),this._value=s?t:Le(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ie(t)||ct(t);t=n?t:z(t),qe(t,s)&&(this._rawValue=t,this._value=n?t:Le(t),this.dep.trigger())}}function ao(e){return me(e)?e.value:e}const co={get:(e,t,s)=>t==="__v_raw"?e:ao(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const l=e[t];return me(l)&&!me(s)?(l.value=s,!0):Reflect.set(e,t,s,n)}};function Vl(e){return Tt(e)?e:new Proxy(e,co)}class uo{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new kn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&te!==this)return Pl(this,!0),!0}get value(){const t=this.dep.track();return Ml(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function fo(e,t,s=!1){let n,l;return j(e)?n=e:(n=e.get,l=e.set),new uo(n,l,s)}const ys={},Es=new WeakMap;let wt;function po(e,t=!1,s=wt){if(s){let n=Es.get(s);n||Es.set(s,n=[]),n.push(e)}}function ho(e,t,s=Q){const{immediate:n,deep:l,once:i,scheduler:r,augmentJob:a,call:u}=s,g=I=>l?I:Ie(I)||l===!1||l===0?ot(I,1):ot(I);let h,y,R,M,K=!1,A=!1;if(me(e)?(y=()=>e.value,K=Ie(e)):Tt(e)?(y=()=>g(e),K=!0):N(e)?(A=!0,K=e.some(I=>Tt(I)||Ie(I)),y=()=>e.map(I=>{if(me(I))return I.value;if(Tt(I))return g(I);if(j(I))return u?u(I,2):I()})):j(e)?t?y=u?()=>u(e,2):e:y=()=>{if(R){rt();try{R()}finally{at()}}const I=wt;wt=h;try{return u?u(e,3,[M]):e(M)}finally{wt=I}}:y=ze,t&&l){const I=y,ie=l===!0?1/0:l;y=()=>ot(I(),ie)}const se=Hi(),V=()=>{h.stop(),se&&se.active&&bn(se.effects,h)};if(i&&t){const I=t;t=(...ie)=>{const ne=I(...ie);return V(),ne}}let H=A?new Array(e.length).fill(ys):ys;const U=I=>{if(!(!(h.flags&1)||!h.dirty&&!I))if(t){const ie=h.run();if(I||l||K||(A?ie.some((ne,he)=>qe(ne,H[he])):qe(ie,H))){R&&R();const ne=wt;wt=h;try{const he=[ie,H===ys?void 0:A&&H[0]===ys?[]:H,M];H=ie,u?u(t,3,he):t(...he)}finally{wt=ne}}}else h.run()};return a&&a(U),h=new El(y),h.scheduler=r?()=>r(U,!1):U,M=I=>po(I,!1,h),R=h.onStop=()=>{const I=Es.get(h);if(I){if(u)u(I,4);else for(const ie of I)ie();Es.delete(h)}},t?n?U(!0):H=h.run():r?r(U.bind(null,!0),!0):h.run(),V.pause=h.pause.bind(h),V.resume=h.resume.bind(h),V.stop=V,V}function ot(e,t=1/0,s){if(t<=0||!X(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,me(e))ot(e.value,t,s);else if(N(e))for(let n=0;n{ot(n,t,s)});else if(yl(e)){for(const n in e)ot(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ot(e[n],t,s)}return e}/** +* @vue/runtime-core v3.5.41 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function rs(e,t,s,n){try{return n?e(...n):e()}catch(l){Bs(l,t,s)}}function $e(e,t,s,n){if(j(e)){const l=rs(e,t,s,n);return l&&ml(l)&&l.catch(i=>{Bs(i,t,s)}),l}if(N(e)){const l=[];for(let i=0;i>>1,l=we[n],i=ts(l);i=ts(s)?we.push(e):we.splice(_o(t),0,e),e.flags|=1,Kl()}}function Kl(){Os||(Os=Bl.then(Wl))}function mo(e){if(!N(e))ht&&e.id===-1?ht.splice(Ft+1,0,e):e.flags&1||($t.push(e),e.flags|=1);else for(let t=0;tts(s)-ts(n));if($t.length=0,ht){for(let s=0;se.id==null?e.flags&2?-1:1/0:e.id;function Wl(e){try{for(Ke=0;Ke{n._d&&el(-1);const i=Ps(t),r=Et.length;let a;try{a=e(...l)}finally{for(let u=Et.length;u>r;u--)_i();Ps(i),n._d&&el(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function It(e,t){if(Me===null)return e;const s=zs(Me),n=e.dirs||(e.dirs=[]);for(let l=0;l1)return s&&j(t)?t.call(n&&n.proxy):t}}const xo=Symbol.for("v-scx"),wo=()=>Cs(xo);function en(e,t,s){return zl(e,t,s)}function zl(e,t,s=Q){const{immediate:n,deep:l,flush:i,once:r}=s,a=be({},s),u=t&&n||!t&&i!=="post";let g;if(ls){if(i==="sync"){const M=wo();g=M.__watcherHandles||(M.__watcherHandles=[])}else if(!u){const M=()=>{};return M.stop=ze,M.resume=ze,M.pause=ze,M}}const h=Se;a.call=(M,K,A)=>$e(M,h,K,A);let y=!1;i==="post"?a.scheduler=M=>{ke(M,h&&h.suspense)}:i!=="sync"&&(y=!0,a.scheduler=(M,K)=>{K?M():An(M)}),a.augmentJob=M=>{t&&(M.flags|=4),y&&(M.flags|=2,h&&(M.id=h.uid,M.i=h))};const R=ho(e,t,a);return ls&&(g?g.push(R):u&&R()),R}function So(e,t,s){const n=this.proxy,l=ae(e)?e.includes(".")?Yl(n,e):()=>n[e]:e.bind(n,n);let i;j(t)?i=t:(i=t.handler,s=t);const r=as(this),a=zl(l,i.bind(n),s);return r(),a}function Yl(e,t){const s=t.split(".");return()=>{let n=e;for(let l=0;le.__isTeleport,tn=Symbol("_leaveCb");function ko(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==ut){t=s;break}}return t}function Gl(e){if(!Mn(e))return Ks(e.type)&&e.children?ko(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&j(s.default))return s.default()}}function Rn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;Rn(Ks(s.type)&&Gl(s)||s,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Jl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Un(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const As=new WeakMap;function Jt(e,t,s,n,l=!1){if(N(e)){e.forEach((A,se)=>Jt(A,t&&(N(t)?t[se]:t),s,n,l));return}if(Xt(n)&&!l){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Jt(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?zs(n.component):n.el,r=l?null:i,{i:a,r:u}=e,g=t&&t.r,h=a.refs===Q?a.refs={}:a.refs,y=a.setupState,R=z(y),M=y===Q?_l:A=>Un(h,A)?!1:Y(R,A),K=(A,se)=>!(se&&Un(h,se));if(g!=null&&g!==u){if(Wn(t),ae(g))h[g]=null,M(g)&&(y[g]=null);else if(me(g)){const A=t;K(g,A.k)&&(g.value=null),A.k&&(h[A.k]=null)}}if(j(u))rs(u,a,12,[r,h]);else{const A=ae(u),se=me(u);if(A||se){const V=()=>{if(e.f){const H=A?M(u)?y[u]:h[u]:K()||!e.k?u.value:h[e.k];if(l)N(H)&&bn(H,i);else if(N(H))H.includes(i)||H.push(i);else if(A)h[u]=[i],M(u)&&(y[u]=h[u]);else{const U=[i];K(u,e.k)&&(u.value=U),e.k&&(h[e.k]=U)}}else A?(h[u]=r,M(u)&&(y[u]=r)):se&&(K(u,e.k)&&(u.value=r),e.k&&(h[e.k]=r))};if(r){const H=()=>{V(),As.delete(e)};H.id=-1,As.set(e,H),ke(H,s)}else Wn(e),V()}}}function Wn(e){const t=As.get(e);t&&(t.flags|=8,As.delete(e))}js().requestIdleCallback;js().cancelIdleCallback;const Xt=e=>!!e.type.__asyncLoader,Mn=e=>e.type.__isKeepAlive;function To(e,t){Xl(e,"a",t)}function Eo(e,t){Xl(e,"da",t)}function Xl(e,t,s=Se){const n=e.__wdc||(e.__wdc=()=>{let l=s;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(Us(t,n,s),s){let l=s.parent;for(;l&&l.parent;)Mn(l.parent.vnode)&&Oo(n,t,s,l),l=l.parent}}function Oo(e,t,s,n){const l=Us(t,e,n,!0);Ql(()=>{bn(n[t],l)},s)}function Us(e,t,s=Se,n=!1){if(s){const l=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...r)=>{rt();const a=as(s),u=$e(t,s,e,r);return a(),at(),u});return n?l.unshift(i):l.push(i),i}}const ft=e=>(t,s=Se)=>{(!ls||e==="sp")&&Us(e,(...n)=>t(...n),s)},Po=ft("bm"),Zl=ft("m"),Ao=ft("bu"),Ro=ft("u"),Mo=ft("bum"),Ql=ft("um"),Io=ft("sp"),Fo=ft("rtg"),Do=ft("rtc");function Lo(e,t=Se){Us("ec",e,t)}const $o=Symbol.for("v-ndc");function Ce(e,t,s,n){let l;const i=s,r=N(e);if(r||ae(e)){const a=r&&Tt(e);let u=!1,g=!1;a&&(u=!Ie(e),g=ct(e),e=Vs(e)),l=new Array(e.length);for(let h=0,y=e.length;ht(a,u,void 0,i));else{const a=Object.keys(e);l=new Array(a.length);for(let u=0,g=a.length;ue?xi(e)?zs(e):pn(e.parent):null,Zt=be(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pn(e.parent),$root:e=>pn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ti(e),$forceUpdate:e=>e.f||(e.f=()=>{An(e.update)}),$nextTick:e=>e.n||(e.n=vo.bind(e.proxy)),$watch:e=>So.bind(e)}),sn=(e,t)=>e!==Q&&!e.__isScriptSetup&&Y(e,t),No={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:l,props:i,accessCache:r,type:a,appContext:u}=e;if(t[0]!=="$"){const R=r[t];if(R!==void 0)switch(R){case 1:return n[t];case 2:return l[t];case 4:return s[t];case 3:return i[t]}else{if(sn(n,t))return r[t]=1,n[t];if(l!==Q&&Y(l,t))return r[t]=2,l[t];if(Y(i,t))return r[t]=3,i[t];if(s!==Q&&Y(s,t))return r[t]=4,s[t];hn&&(r[t]=0)}}const g=Zt[t];let h,y;if(g)return t==="$attrs"&&_e(e.attrs,"get",""),g(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(s!==Q&&Y(s,t))return r[t]=4,s[t];if(y=u.config.globalProperties,Y(y,t))return y[t]},set({_:e},t,s){const{data:n,setupState:l,ctx:i}=e;return sn(l,t)?(l[t]=s,!0):n!==Q&&Y(n,t)?(n[t]=s,!0):Y(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:l,props:i,type:r}},a){let u;return!!(s[a]||e!==Q&&a[0]!=="$"&&Y(e,a)||sn(t,a)||Y(i,a)||Y(n,a)||Y(Zt,a)||Y(l.config.globalProperties,a)||(u=r.__cssModules)&&u[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Y(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function qn(e){return N(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let hn=!0;function jo(e){const t=ti(e),s=e.proxy,n=e.ctx;hn=!1,t.beforeCreate&&zn(t.beforeCreate,e,"bc");const{data:l,computed:i,methods:r,watch:a,provide:u,inject:g,created:h,beforeMount:y,mounted:R,beforeUpdate:M,updated:K,activated:A,deactivated:se,beforeDestroy:V,beforeUnmount:H,destroyed:U,unmounted:I,render:ie,renderTracked:ne,renderTriggered:he,errorCaptured:Ne,serverPrefetch:Pt,expose:Je,inheritAttrs:Xe,components:Ze,directives:dt,filters:Vt}=t;if(g&&Ho(g,n,null),r)for(const le in r){const G=r[le];j(G)&&(n[le]=G.bind(s))}if(l){const le=l.call(s,s);X(le)&&(e.data=En(le))}if(hn=!0,i)for(const le in i){const G=i[le],je=j(G)?G.bind(s,s):j(G.get)?G.get.bind(s,s):ze,gt=!j(G)&&j(G.set)?G.set.bind(s):ze,Oe=ce({get:je,set:gt});Object.defineProperty(n,le,{enumerable:!0,configurable:!0,get:()=>Oe.value,set:Pe=>Oe.value=Pe})}if(a)for(const le in a)ei(a[le],n,s,le);if(u){const le=j(u)?u.call(s):u;Reflect.ownKeys(le).forEach(G=>{yo(G,le[G])})}h&&zn(h,e,"c");function fe(le,G){N(G)?G.forEach(je=>le(je.bind(s))):G&&le(G.bind(s))}if(fe(Po,y),fe(Zl,R),fe(Ao,M),fe(Ro,K),fe(To,A),fe(Eo,se),fe(Lo,Ne),fe(Do,ne),fe(Fo,he),fe(Mo,H),fe(Ql,I),fe(Io,Pt),N(Je))if(Je.length){const le=e.exposed||(e.exposed={});Je.forEach(G=>{Object.defineProperty(le,G,{get:()=>s[G],set:je=>s[G]=je,enumerable:!0})})}else e.exposed||(e.exposed={});ie&&e.render===ze&&(e.render=ie),Xe!=null&&(e.inheritAttrs=Xe),Ze&&(e.components=Ze),dt&&(e.directives=dt),Pt&&Jl(e)}function Ho(e,t,s=ze){N(e)&&(e=gn(e));for(const n in e){const l=e[n];let i;X(l)?"default"in l?i=Cs(l.from||n,l.default,!0):i=Cs(l.from||n):i=Cs(l),me(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[n]=i}}function zn(e,t,s){$e(N(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function ei(e,t,s,n){let l=n.includes(".")?Yl(s,n):()=>s[n];if(ae(e)){const i=t[e];j(i)&&en(l,i)}else if(j(e))en(l,e.bind(s));else if(X(e))if(N(e))e.forEach(i=>ei(i,t,s,n));else{const i=j(e.handler)?e.handler.bind(s):t[e.handler];j(i)&&en(l,i,e)}}function ti(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:l,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,a=i.get(t);let u;return a?u=a:!l.length&&!s&&!n?u=t:(u={},l.length&&l.forEach(g=>Rs(u,g,r,!0)),Rs(u,t,r)),X(t)&&i.set(t,u),u}function Rs(e,t,s,n=!1){const{mixins:l,extends:i}=t;i&&Rs(e,i,s,!0),l&&l.forEach(r=>Rs(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const a=Vo[r]||s&&s[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const Vo={data:Yn,props:Gn,emits:Gn,methods:Wt,computed:Wt,beforeCreate:xe,created:xe,beforeMount:xe,mounted:xe,beforeUpdate:xe,updated:xe,beforeDestroy:xe,beforeUnmount:xe,destroyed:xe,unmounted:xe,activated:xe,deactivated:xe,errorCaptured:xe,serverPrefetch:xe,components:Wt,directives:Wt,watch:Ko,provide:Yn,inject:Bo};function Yn(e,t){return t?e?function(){return be(j(e)?e.call(this,this):e,j(t)?t.call(this,this):t)}:t:e}function Bo(e,t){return Wt(gn(e),gn(t))}function gn(e){if(N(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fe(t)}Modifiers`]||e[`${Ot(t)}Modifiers`];function zo(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Q;let l=s;const i=t.startsWith("update:"),r=i&&qo(n,t.slice(7));r&&(r.trim&&(l=s.map(h=>ae(h)?h.trim():h)),r.number&&(l=s.map(xn)));let a,u=n[a=Gs(t)]||n[a=Gs(Fe(t))];!u&&i&&(u=n[a=Gs(Ot(t))]),u&&$e(u,e,6,l);const g=n[a+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,$e(g,e,6,l)}}const Yo=new WeakMap;function ni(e,t,s=!1){const n=s?Yo:t.emitsCache,l=n.get(e);if(l!==void 0)return l;const i=e.emits;let r={},a=!1;if(!j(e)){const u=g=>{const h=ni(g,t,!0);h&&(a=!0,be(r,h))};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!i&&!a?(X(e)&&n.set(e,null),null):(N(i)?i.forEach(u=>r[u]=null):be(r,i),X(e)&&n.set(e,r),r)}function Ws(e,t){return!e||!Ds(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Y(e,t[0].toLowerCase()+t.slice(1))||Y(e,Ot(t))||Y(e,t))}function Jn(e){const{type:t,vnode:s,proxy:n,withProxy:l,propsOptions:[i],slots:r,attrs:a,emit:u,render:g,renderCache:h,props:y,data:R,setupState:M,ctx:K,inheritAttrs:A}=e,se=Ps(e);let V,H;try{if(s.shapeFlag&4){const I=l||n,ie=I;V=We(g.call(ie,I,h,y,M,R,K)),H=a}else{const I=t;V=We(I.length>1?I(y,{attrs:a,slots:r,emit:u}):I(y,null)),H=t.props?a:Go(a)}}catch(I){Et.length=0,Bs(I,e,1),V=Ye(ut)}let U=V;if(H&&A!==!1){const I=Object.keys(H),{shapeFlag:ie}=U;I.length&&ie&7&&(i&&I.some(Ls)&&(H=Jo(H,i)),U=Ht(U,H,!1,!0))}if(s.dirs&&(U=Ht(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(s.dirs):s.dirs),s.transition){const I=Ks(U.type)&&Gl(U)||U;Rn(I,s.transition)}return V=U,Ps(se),V}const Go=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ds(s))&&((t||(t={}))[s]=e[s]);return t},Jo=(e,t)=>{const s={};for(const n in e)(!Ls(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Xo(e,t,s){const{props:n,children:l,component:i}=e,{props:r,children:a,patchFlag:u}=t,g=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return n?Xn(n,r,g):!!r;if(u&8){const h=t.dynamicProps;for(let y=0;yObject.create(ii),ri=e=>Object.getPrototypeOf(e)===ii;function Qo(e,t,s,n=!1){const l={},i=oi();e.propsDefaults=Object.create(null),ai(e,t,l,i);for(const r in e.propsOptions[0])r in l||(l[r]=void 0);s?e.props=n?l:lo(l):e.type.props?e.props=l:e.props=i,e.attrs=i}function er(e,t,s,n){const{props:l,attrs:i,vnode:{patchFlag:r}}=e,a=z(l),[u]=e.propsOptions;let g=!1;if((n||r>0)&&!(r&16)){if(r&8){const h=e.vnode.dynamicProps;for(let y=0;y{u=!0;const[R,M]=ci(y,t,!0);be(r,R),M&&a.push(...M)};!s&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!u)return X(e)&&n.set(e,Dt),Dt;if(N(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Fn=e=>N(e)?e.map(We):[We(e)],sr=(e,t,s)=>{if(t._n)return t;const n=bo((...l)=>Fn(t(...l)),s);return n._c=!1,n},ui=(e,t,s)=>{const n=e._ctx;for(const l in e){if(In(l))continue;const i=e[l];if(j(i))t[l]=sr(l,i,n);else if(i!=null){const r=Fn(i);t[l]=()=>r}}},fi=(e,t)=>{const s=Fn(t);e.slots.default=()=>s},di=(e,t,s)=>{for(const n in t)(s||!In(n))&&(e[n]=t[n])},nr=(e,t,s)=>{const n=e.slots=oi();if(e.vnode.shapeFlag&32){const l=t._;l?(di(n,t,s),s&&wl(n,"_",l,!0)):ui(t,n)}else t&&fi(e,t)},lr=(e,t,s)=>{const{vnode:n,slots:l}=e;let i=!0,r=Q;if(n.shapeFlag&32){const a=t._;a?s&&a===1?i=!1:di(l,t,s):(i=!t.$stable,ui(t,l)),r=t}else t&&(fi(e,t),r={default:1});if(i)for(const a in l)!In(a)&&r[a]==null&&delete l[a]},ke=cr;function ir(e){return or(e)}function or(e,t){const s=js();s.__VUE__=!0;const{insert:n,remove:l,patchProp:i,createElement:r,createText:a,createComment:u,setText:g,setElementText:h,parentNode:y,nextSibling:R,setScopeId:M=ze,insertStaticContent:K}=e,A=(c,d,b,S=null,w=null,x=null,O=void 0,E=null,C=!!d.dynamicChildren)=>{if(c===d)return;c&&!Ut(c,d)&&(S=At(c),Pe(c,w,x,!0),c=null),d.patchFlag===-2&&(C=!1,d.dynamicChildren=null);const{type:v,ref:D,shapeFlag:P}=d;switch(v){case qs:se(c,d,b,S);break;case ut:V(c,d,b,S);break;case ks:c==null&&H(d,b,S,O);break;case ee:Ze(c,d,b,S,w,x,O,E,C);break;default:P&1?ie(c,d,b,S,w,x,O,E,C):P&6?dt(c,d,b,S,w,x,O,E,C):(P&64||P&128)&&v.process(c,d,b,S,w,x,O,E,C,_t)}D!=null&&w?Jt(D,c&&c.ref,x,d||c,!d):D==null&&c&&c.ref!=null&&Jt(c.ref,null,x,c,!0)},se=(c,d,b,S)=>{if(c==null)n(d.el=a(d.children),b,S);else{const w=d.el=c.el;d.children!==c.children&&g(w,d.children)}},V=(c,d,b,S)=>{c==null?n(d.el=u(d.children||""),b,S):d.el=c.el},H=(c,d,b,S)=>{[c.el,c.anchor]=K(c.children,d,b,S,c.el,c.anchor)},U=({el:c,anchor:d},b,S)=>{let w;for(;c&&c!==d;)w=R(c),n(c,b,S),c=w;n(d,b,S)},I=({el:c,anchor:d})=>{let b;for(;c&&c!==d;)b=R(c),l(c),c=b;l(d)},ie=(c,d,b,S,w,x,O,E,C)=>{if(d.type==="svg"?O="svg":d.type==="math"&&(O="mathml"),c==null)ne(d,b,S,w,x,O,E,C);else{const v=c.el&&c.el._isVueCE?c.el:null;try{v&&v._beginPatch(),Pt(c,d,w,x,O,E,C)}finally{v&&v._endPatch()}}},ne=(c,d,b,S,w,x,O,E)=>{let C,v;const{props:D,shapeFlag:P,transition:F,dirs:L}=c;if(C=c.el=r(c.type,x,D&&D.is,D),P&8?h(C,c.children):P&16&&Ne(c.children,C,null,S,w,nn(c,x),O,E),L&&yt(c,null,S,"created"),he(C,c,c.scopeId,O,S),D){for(const J in D)J!=="value"&&!zt(J)&&i(C,J,null,D[J],x,S);"value"in D&&i(C,"value",null,D.value,x),(v=D.onVnodeBeforeMount)&&Be(v,S,c)}L&&yt(c,null,S,"beforeMount");const $=rr(w,F);$&&F.beforeEnter(C),n(C,d,b),((v=D&&D.onVnodeMounted)||$||L)&&ke(()=>{try{v&&Be(v,S,c),$&&F.enter(C),L&&yt(c,null,S,"mounted")}finally{}},w)},he=(c,d,b,S,w)=>{if(b&&M(c,b),S)for(let x=0;x{for(let v=C;v{const E=d.el=c.el;let{patchFlag:C,dynamicChildren:v,dirs:D}=d;C|=c.patchFlag&16;const P=c.props||Q,F=d.props||Q;let L;if(b&&xt(b,!1),(L=F.onVnodeBeforeUpdate)&&Be(L,b,d,c),D&&yt(d,c,b,"beforeUpdate"),b&&xt(b,!0),v&&(!c.dynamicChildren||c.dynamicChildren.length!==v.length)&&(C=0,O=!1,v=null),(P.innerHTML&&F.innerHTML==null||P.textContent&&F.textContent==null)&&h(E,""),v?Je(c.dynamicChildren,v,E,b,S,nn(d,w),x):O||G(c,d,E,null,b,S,nn(d,w),x,!1),C>0){if(C&16)Xe(E,P,F,b,w);else if(C&2&&P.class!==F.class&&i(E,"class",null,F.class,w),C&4&&i(E,"style",P.style,F.style,w),C&8){const $=d.dynamicProps;for(let J=0;J<$.length;J++){const q=$[J],oe=P[q],ue=F[q];(ue!==oe||q==="value")&&i(E,q,oe,ue,w,b)}}C&1&&c.children!==d.children&&h(E,d.children)}else!O&&v==null&&Xe(E,P,F,b,w);((L=F.onVnodeUpdated)||D)&&ke(()=>{L&&Be(L,b,d,c),D&&yt(d,c,b,"updated")},S)},Je=(c,d,b,S,w,x,O)=>{for(let E=0;E{if(d!==b){if(d!==Q)for(const x in d)!zt(x)&&!(x in b)&&i(c,x,d[x],null,w,S);for(const x in b){if(zt(x))continue;const O=b[x],E=d[x];O!==E&&x!=="value"&&i(c,x,E,O,w,S)}"value"in b&&i(c,"value",d.value,b.value,w)}},Ze=(c,d,b,S,w,x,O,E,C)=>{const v=d.el=c?c.el:a(""),D=d.anchor=c?c.anchor:a("");let{patchFlag:P,dynamicChildren:F,slotScopeIds:L}=d;L&&(E=E?E.concat(L):L),c==null?(n(v,b,S),n(D,b,S),Ne(d.children||[],b,D,w,x,O,E,C)):P>0&&P&64&&F&&c.dynamicChildren&&c.dynamicChildren.length===F.length?(Je(c.dynamicChildren,F,b,w,x,O,E),(d.key!=null||w&&d===w.subTree)&&pi(c,d,!0)):G(c,d,b,D,w,x,O,E,C)},dt=(c,d,b,S,w,x,O,E,C)=>{d.slotScopeIds=E,c==null?d.shapeFlag&512?w.ctx.activate(d,b,S,O,C):Vt(d,b,S,w,x,O,C):cs(c,d,C)},Vt=(c,d,b,S,w,x,O)=>{const E=c.component=_r(c,S,w);if(Mn(c)&&(E.ctx.renderer=_t),br(E,!1,O),E.asyncDep){if(w&&w.registerDep(E,fe,O),!c.el){const C=E.subTree=Ye(ut);V(null,C,d,b),c.placeholder=C.el}}else fe(E,c,d,b,w,x,O)},cs=(c,d,b)=>{const S=d.component=c.component;if(Xo(c,d,b))if(S.asyncDep&&!S.asyncResolved){le(S,d,b);return}else S.next=d,S.update();else d.el=c.el,S.vnode=d},fe=(c,d,b,S,w,x,O)=>{const E=()=>{if(c.isMounted){let{next:P,bu:F,u:L,parent:$,vnode:J}=c;{const de=hi(c);if(de){P&&(P.el=J.el,le(c,P,O)),de.asyncDep.then(()=>{ke(()=>{c.isUnmounted||v()},w)});return}}let q=P,oe;xt(c,!1),P?(P.el=J.el,le(c,P,O)):P=J,F&&Ss(F),(oe=P.props&&P.props.onVnodeBeforeUpdate)&&Be(oe,$,P,J),xt(c,!0);const ue=Jn(c),Ae=c.subTree;c.subTree=ue,A(Ae,ue,y(Ae.el),At(Ae),c,w,x),P.el=ue.el,q===null&&Zo(c,ue.el),L&&ke(L,w),(oe=P.props&&P.props.onVnodeUpdated)&&ke(()=>Be(oe,$,P,J),w)}else{let P;const{el:F,props:L}=d,{bm:$,m:J,parent:q,root:oe,type:ue}=c,Ae=Xt(d);xt(c,!1),$&&Ss($),!Ae&&(P=L&&L.onVnodeBeforeMount)&&Be(P,q,d),xt(c,!0);{oe.ce&&oe.ce._hasShadowRoot()&&oe.ce._injectChildStyle(ue,c.parent?c.parent.type:void 0);const de=c.subTree=Jn(c);A(null,de,b,S,c,w,x),d.el=de.el}if(J&&ke(J,w),!Ae&&(P=L&&L.onVnodeMounted)){const de=d;ke(()=>Be(P,q,de),w)}(d.shapeFlag&256||q&&Xt(q.vnode)&&q.vnode.shapeFlag&256)&&c.a&&ke(c.a,w),c.isMounted=!0,d=b=S=null}};c.scope.on();const C=c.effect=new El(E);c.scope.off();const v=c.update=C.run.bind(C),D=c.job=C.runIfDirty.bind(C);D.i=c,D.id=c.uid,C.scheduler=()=>An(D),xt(c,!0),v()},le=(c,d,b)=>{d.component=c;const S=c.vnode.props;c.vnode=d,c.next=null,er(c,d.props,S,b),lr(c,d.children,b),rt(),Kn(c),at()},G=(c,d,b,S,w,x,O,E,C=!1)=>{const v=c&&c.children,D=c?c.shapeFlag:0,P=d.children,{patchFlag:F,shapeFlag:L}=d;if(F>0){if(F&128){gt(v,P,b,S,w,x,O,E,C);return}else if(F&256){je(v,P,b,S,w,x,O,E,C);return}}L&8?(D&16&&et(v,w,x),P!==v&&h(b,P)):D&16?L&16?gt(v,P,b,S,w,x,O,E,C):et(v,w,x,!0):(D&8&&h(b,""),L&16&&Ne(P,b,S,w,x,O,E,C))},je=(c,d,b,S,w,x,O,E,C)=>{c=c||Dt,d=d||Dt;const v=c.length,D=d.length,P=Math.min(v,D);let F;for(F=0;FD?et(c,w,x,!0,!1,P):Ne(d,b,S,w,x,O,E,C,P)},gt=(c,d,b,S,w,x,O,E,C)=>{let v=0;const D=d.length;let P=c.length-1,F=D-1;for(;v<=P&&v<=F;){const L=c[v],$=d[v]=C?lt(d[v]):We(d[v]);if(Ut(L,$))A(L,$,b,null,w,x,O,E,C);else break;v++}for(;v<=P&&v<=F;){const L=c[P],$=d[F]=C?lt(d[F]):We(d[F]);if(Ut(L,$))A(L,$,b,null,w,x,O,E,C);else break;P--,F--}if(v>P){if(v<=F){const L=F+1,$=LF)for(;v<=P;)Pe(c[v],w,x,!0),v++;else{const L=v,$=v,J=new Map;for(v=$;v<=F;v++){const ye=d[v]=C?lt(d[v]):We(d[v]);ye.key!=null&&J.set(ye.key,v)}let q,oe=0;const ue=F-$+1;let Ae=!1,de=0;const mt=new Array(ue);for(v=0;v=ue){Pe(ye,w,x,!0);continue}let Te;if(ye.key!=null)Te=J.get(ye.key);else for(q=$;q<=F;q++)if(mt[q-$]===0&&Ut(ye,d[q])){Te=q;break}Te===void 0?Pe(ye,w,x,!0):(mt[Te-$]=v+1,Te>=de?de=Te:Ae=!0,A(ye,d[Te],b,null,w,x,O,E,C),oe++)}const ds=Ae?ar(mt):Dt;for(q=ds.length-1,v=ue-1;v>=0;v--){const ye=$+v,Te=d[ye],ps=d[ye+1],hs=ye+1{const{el:x,type:O,transition:E,children:C,shapeFlag:v}=c;if(v&6){Oe(c.component.subTree,d,b,S);return}if(v&128){c.suspense.move(d,b,S);return}if(v&64){O.move(c,d,b,_t);return}if(O===ee){n(x,d,b);for(let P=0;PE.enter(x),w));else{const{leave:P,delayLeave:F,afterLeave:L}=E,$=()=>{c.ctx.isUnmounted?l(x):n(x,d,b)},J=()=>{const q=x._isLeaving||!!x[tn];x._isLeaving&&x[tn](!0),E.persisted&&!q?$():P(x,()=>{$(),L&&L()})};F?F(x,$,J):J()}else n(x,d,b)},Pe=(c,d,b,S=!1,w=!1)=>{const{type:x,props:O,ref:E,children:C,dynamicChildren:v,shapeFlag:D,patchFlag:P,dirs:F,cacheIndex:L,memo:$}=c;if(P===-2&&(w=!1),E!=null&&(rt(),Jt(E,null,b,c,!0),at()),L!=null&&(d.renderCache[L]=void 0),D&256){d.ctx.deactivate(c);return}const J=D&1&&F,q=!Xt(c);let oe;if(q&&(oe=O&&O.onVnodeBeforeUnmount)&&Be(oe,d,c),D&6)us(c.component,b,S);else{if(D&128){c.suspense.unmount(b,S);return}J&&yt(c,null,d,"beforeUnmount"),D&64?c.type.remove(c,d,b,_t,S):v&&!v.hasOnce&&(x!==ee||P>0&&P&64)?et(v,d,b,!1,!0):(x===ee&&P&384||!w&&D&16)&&et(C,d,b),S&&Qe(c)}const ue=$!=null&&L==null;(q&&(oe=O&&O.onVnodeUnmounted)||J||ue)&&ke(()=>{oe&&Be(oe,d,c),J&&yt(c,null,d,"unmounted"),ue&&(c.el=null)},b)},Qe=c=>{const{type:d,el:b,anchor:S,transition:w}=c;if(d===ee){Bt(b,S);return}if(d===ks){I(c);return}const x=()=>{l(b),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(c.shapeFlag&1&&w&&!w.persisted){const{leave:O,delayLeave:E}=w,C=()=>O(b,x);E?E(c.el,x,C):C()}else x()},Bt=(c,d)=>{let b;for(;c!==d;)b=R(c),l(c),c=b;l(d)},us=(c,d,b)=>{const{bum:S,scope:w,job:x,subTree:O,um:E,m:C,a:v}=c;Qn(C),Qn(v),S&&Ss(S),w.stop(),x&&(x.flags|=8,Pe(O,c,d,b)),E&&ke(E,d),ke(()=>{c.isUnmounted=!0},d)},et=(c,d,b,S=!1,w=!1,x=0)=>{for(let O=x;O{if(c.shapeFlag&6)return At(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const d=R(c.anchor||c.el),b=d&&d[Co];return b?R(b):d};let pt=!1;const vt=(c,d,b)=>{let S;c==null?d._vnode&&(Pe(d._vnode,null,null,!0),S=d._vnode.component):A(d._vnode||null,c,d,null,null,null,b),d._vnode=c,pt||(pt=!0,Kn(S),Ul(),pt=!1)},_t={p:A,um:Pe,m:Oe,r:Qe,mt:Vt,mc:Ne,pc:G,pbc:Je,n:At,o:e};return{render:vt,hydrate:void 0,createApp:Wo(vt)}}function nn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function xt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pi(e,t,s=!1){const n=e.children,l=t.children;if(N(n)&&N(l))for(let i=0;i>1,e[s[a]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,r=s[i-1];i-- >0;)s[i]=r,r=t[r];return s}function hi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hi(t)}function Qn(e){if(e)for(let t=0;te.__isSuspense;function cr(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):mo(e)}const ee=Symbol.for("v-fgt"),qs=Symbol.for("v-txt"),ut=Symbol.for("v-cmt"),ks=Symbol.for("v-stc"),Et=[];let Ee=null;function k(e=!1){Et.push(Ee=e?null:[])}function _i(){Et.pop(),Ee=Et[Et.length-1]||null}let ss=1;function el(e,t=!1){ss+=e,e<0&&Ee&&t&&(Ee.hasOnce=!0)}function mi(e){return e.dynamicChildren=ss>0?Ee||Dt:null,_i(),ss>0&&Ee&&Ee.push(e),e}function T(e,t,s,n,l,i){return mi(o(e,t,s,n,l,i,!0))}function ur(e,t,s,n,l){return mi(Ye(e,t,s,n,l,!0))}function bi(e){return e?e.__v_isVNode===!0:!1}function Ut(e,t){return e.type===t.type&&e.key===t.key}const yi=({key:e})=>e??null,Ts=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ae(e)||me(e)||j(e)?{i:Me,r:e,k:t,f:!!s}:e:null);function o(e,t=null,s=null,n=0,l=null,i=e===ee?0:1,r=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yi(t),ref:t&&Ts(t),scopeId:ql,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:Me};return a?(Ms(u,s),i&128&&e.normalize(u)):s&&(u.shapeFlag|=ae(s)?8:16),ss>0&&!r&&Ee&&(u.patchFlag>0||i&6)&&u.patchFlag!==32&&Ee.push(u),u}const Ye=fr;function fr(e,t=null,s=null,n=0,l=null,i=!1){if((!e||e===$o)&&(e=ut),bi(e)){const a=Ht(e,t,!0);return s&&Ms(a,s),ss>0&&!i&&Ee&&(a.shapeFlag&6?Ee[Ee.indexOf(e)]=a:Ee.push(a)),a.patchFlag=-2,a}if(Sr(e)&&(e=e.__vccOpts),t){t=dr(t);let{class:a,style:u}=t;a&&!ae(a)&&(t.class=Z(a)),X(u)&&(Pn(u)&&!N(u)&&(u=be({},u)),t.style=Hs(u))}const r=ae(e)?1:vi(e)?128:Ks(e)?64:X(e)?4:j(e)?2:0;return o(e,t,s,n,l,r,i,!0)}function dr(e){return e?Pn(e)||ri(e)?be({},e):e:null}function Ht(e,t,s=!1,n=!1){const{props:l,ref:i,patchFlag:r,children:a,transition:u}=e,g=t?hr(l||{},t):l,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&yi(g),ref:t&&t.ref?s&&i?N(i)?i.concat(Ts(t)):[i,Ts(t)]:Ts(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ee?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ht(e.ssContent),ssFallback:e.ssFallback&&Ht(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&Rn(h,u.clone(h)),h}function W(e=" ",t=0){return Ye(qs,null,e,t)}function pr(e,t){const s=Ye(ks,null,e);return s.staticCount=t,s}function ve(e="",t=!1){return t?(k(),ur(ut,null,e)):Ye(ut,null,e)}function We(e){return e==null||typeof e=="boolean"?Ye(ut):N(e)?Ye(ee,null,e.slice()):bi(e)?lt(e):Ye(qs,null,String(e))}function lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ht(e)}function Ms(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(N(t))s=16;else if(typeof t=="object")if(n&65){const l=t.default;l&&(l._c&&(l._d=!1),Ms(e,l()),l._c&&(l._d=!0));return}else{s=32;const l=t._;!l&&!ri(t)?t._ctx=Me:l===3&&Me&&(Me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(j(t)){if(n&65){Ms(e,{default:t});return}t={default:t,_ctx:Me},s=32}else t=String(t),n&64?(s=16,t=[W(t)]):s=8;e.children=t,e.shapeFlag|=s}function hr(...e){const t={};for(let s=0;sSe||Me;let Is,ns;{const e=js(),t=(s,n)=>{let l;return(l=e[s])||(l=e[s]=[]),l.push(n),i=>{l.length>1?l.forEach(r=>r(i)):l[0](i)}};Is=t("__VUE_INSTANCE_SETTERS__",s=>Se=s),ns=t("__VUE_SSR_SETTERS__",s=>ls=s)}const as=e=>{const t=Se;return Is(e),e.scope.on(),()=>{e.scope.off(),Is(t)}},tl=()=>{Se&&Se.scope.off(),Is(null)};function xi(e){return e.vnode.shapeFlag&4}let ls=!1;function br(e,t=!1,s=!1){t&&ns(t);const{props:n,children:l}=e.vnode,i=xi(e);Qo(e,n,i,t),nr(e,l,s||t);const r=i?yr(e,t):void 0;return t&&ns(!1),r}function yr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,No);const{setup:n}=s;if(n){rt();const l=e.setupContext=n.length>1?wr(e):null,i=as(e),r=rs(n,e,0,[e.props,l]),a=ml(r);if(at(),i(),(a||e.sp)&&!Xt(e)&&Jl(e),a){if(r.then(tl,tl),t)return r.then(u=>{ns(!0);try{sl(e,u,t)}finally{ns(!1)}}).catch(u=>{Bs(u,e,0)});e.asyncDep=r}else sl(e,r)}else wi(e)}function sl(e,t,s){j(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:X(t)&&(e.setupState=Vl(t)),wi(e)}function wi(e,t,s){const n=e.type;e.render||(e.render=n.render||ze);{const l=as(e);rt();try{jo(e)}finally{at(),l()}}}const xr={get(e,t){return _e(e,"get",""),e[t]}};function wr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,xr),slots:e.slots,emit:e.emit,expose:t}}function zs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Vl(io(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Zt)return Zt[s](e)},has(t,s){return s in t||s in Zt}})):e.proxy}function Sr(e){return j(e)&&"__vccOpts"in e}const ce=(e,t)=>fo(e,t,ls),Cr="3.5.41";/** +* @vue/runtime-dom v3.5.41 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let _n;const nl=typeof window<"u"&&window.trustedTypes;if(nl)try{_n=nl.createPolicy("vue",{createHTML:e=>e})}catch{}const Si=_n?e=>_n.createHTML(e):e=>e,kr="http://www.w3.org/2000/svg",Tr="http://www.w3.org/1998/Math/MathML",nt=typeof document<"u"?document:null,ll=nt&&nt.createElement("template"),Er={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const l=t==="svg"?nt.createElementNS(kr,e):t==="mathml"?nt.createElementNS(Tr,e):s?nt.createElement(e,{is:s}):nt.createElement(e);return e==="select"&&n&&n.multiple!=null&&l.setAttribute("multiple",n.multiple),l},createText:e=>nt.createTextNode(e),createComment:e=>nt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>nt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,l,i){const r=s?s.previousSibling:t.lastChild;if(l&&(l===i||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),s),!(l===i||!(l=l.nextSibling)););else{ll.innerHTML=Si(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const a=ll.content;if(n==="svg"||n==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}t.insertBefore(a,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Or=Symbol("_vtc");function Pr(e,t,s){const n=e[Or];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const il=Symbol("_vod"),Ar=Symbol("_vsh"),Rr=Symbol(""),Mr=/(?:^|;)\s*display\s*:/;function Ir(e,t,s){const n=e.style,l=ae(s);let i=!1;if(s&&!l){if(t)if(ae(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();s[a]==null&&qt(n,a,"")}else for(const r in t)s[r]==null&&qt(n,r,"");for(const r in s){r==="display"&&(i=!0);const a=s[r];a!=null?Dr(e,r,!ae(t)&&t?t[r]:void 0,a)||qt(n,r,a):qt(n,r,"")}}else if(l){if(t!==s){const r=n[Rr];r&&(s+=";"+r),n.cssText=s,i=Mr.test(s)}}else t&&e.removeAttribute("style");il in e&&(e[il]=i?n.display:"",e[Ar]&&(n.display="none"))}const ol=/\s*!important$/;function qt(e,t,s){if(N(s))s.forEach(n=>qt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Fr(e,t);ol.test(s)?e.setProperty(Ot(n),s.replace(ol,""),"important"):e[n]=s}}const rl=["Webkit","Moz","ms"],ln={};function Fr(e,t){const s=ln[t];if(s)return s;let n=Fe(t);if(n!=="filter"&&n in e)return ln[t]=n;n=xl(n);for(let l=0;lon||(Vr.then(()=>on=0),on=Date.now());function Kr(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const l=s.value;if(N(l)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const r=l.slice(),a=[n];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ur=(e,t,s,n,l,i)=>{const r=l==="svg";t==="class"?Pr(e,n,r):t==="style"?Ir(e,s,n):Ds(t)?Ls(t)||$r(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Wr(e,t,n,r))?(ul(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&cl(e,t,n,r,i,t!=="value")):e._isVueCE&&(qr(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ae(n)))?ul(e,Fe(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),cl(e,t,n,r))};function Wr(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&dl(t)&&j(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return dl(t)&&ae(s)?!1:t in e}function qr(e,t){const s=e._def.props;if(!s)return!1;const n=Fe(t);return Array.isArray(s)?s.some(l=>Fe(l)===n):Object.keys(s).some(l=>Fe(l)===n)}const Fs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return N(t)?s=>Ss(t,s):t};function zr(e){e.target.composing=!0}function pl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ct=Symbol("_assign"),xs=Symbol("_initialValue");function rn(e,t,s){return t&&(e=e.trim()),s&&(e=xn(e)),e}const ws={created(e,{modifiers:{lazy:t,trim:s,number:n}},l){e.parentNode&&(e.type==="text"?e[xs]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[xs]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Ct]=Fs(l);const i=n||l.props&&l.props.type==="number";St(e,t?"change":"input",r=>{r.target.composing||e[Ct](rn(e.value,s,i))}),(s||i)&&St(e,"change",()=>{e.value=rn(e.value,s,i)}),t||(St(e,"compositionstart",zr),St(e,"compositionend",pl),St(e,"change",pl))},mounted(e,{value:t,modifiers:{trim:s,number:n}}){const l=t??"",i=e[xs];delete e[xs],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Ct](rn(e.value,s,n)):e.value=l},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:l,number:i}},r){if(e[Ct]=Fs(r),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?xn(e.value):e.value,u=t??"";if(a===u)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(n&&t===s||l&&e.value.trim()===u)||(e.value=u)}},hl={deep:!0,created(e,t,s){e[Ct]=Fs(s),St(e,"change",()=>{const n=e._modelValue,l=Yr(e),i=e.checked,r=e[Ct];if(N(n)){const a=Cl(n,l),u=a!==-1;if(i&&!u)r(n.concat(l));else if(!i&&u){const g=[...n];g.splice(a,1),r(g)}}else if($s(n)){const a=new Set(n);i?a.add(l):a.delete(l),r(a)}else r(Ci(e,i))})},mounted:gl,beforeUpdate(e,t,s){e[Ct]=Fs(s),gl(e,t,s)}};function gl(e,{value:t,oldValue:s},n){e._modelValue=t;let l;if(N(t))l=Cl(t,n.props.value)>-1;else if($s(t))l=t.has(n.props.value);else{if(t===s)return;l=os(t,Ci(e,!0))}e.checked!==l&&(e.checked=l)}function Yr(e){return"_value"in e?e._value:e.value}function Ci(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Gr=["ctrl","shift","alt","meta"],Jr={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Gr.some(s=>e[`${s}Key`]&&!t.includes(s))},Xr=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((l,...i)=>{for(let r=0;r{const t=Qr().createApp(...e),{mount:s}=t;return t.mount=n=>{const l=sa(n);if(!l)return;const i=t._component;!j(i)&&!i.render&&!i.template&&(i.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const r=s(l,!1,ta(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),r},t});function ta(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sa(e){return ae(e)?document.querySelector(e):e}const na={class:"app-shell"},la={class:"content",id:"overview"},ia={class:"topbar"},oa={class:"topbar-meta"},ra={class:"as-of"},aa={key:0,class:"state-card"},ca={key:1,class:"state-card error-state"},ua={class:"kpi-grid","aria-label":"Signal summary"},fa={class:"kpi-card accent-card"},da={class:"kpi-value"},pa={class:"kpi-foot"},ha={class:"long-count"},ga={class:"short-count"},va={class:"neutral-count"},_a={class:"kpi-card"},ma={class:"kpi-value"},ba={class:"kpi-foot"},ya={class:"panel theme-panel",id:"themes"},xa={class:"panel-header signal-header"},wa={class:"status-tag"},Sa={class:"theme-grid"},Ca={class:"theme-card-head"},ka={class:"theme-chip"},Ta={class:"theme-label-th"},Ea={class:"theme-surprise"},Oa={class:"theme-surprise-value"},Pa={class:"theme-read"},Aa={key:0,class:"theme-read-value"},Ra={key:1,class:"theme-read-value"},Ma={key:2,class:"theme-read-value"},Ia={key:3,class:"theme-read-value"},Fa={key:4,class:"theme-read-value"},Da={key:5,class:"theme-read-value"},La={key:6,class:"theme-read-value"},$a={key:7,class:"theme-read-value"},Na={key:8,class:"theme-read-value"},ja={key:9,class:"theme-read-value"},Ha={key:10,class:"theme-read-value"},Va={key:11,class:"theme-read-value"},Ba={key:12,class:"theme-read-value"},Ka={key:13,class:"theme-read-value"},Ua={key:0,class:"theme-narrative"},Wa={key:0,class:"macro-panel"},qa={class:"macro-chips"},za={class:"macro-chip"},Ya={class:"macro-chip"},Ga={class:"macro-chip"},Ja={class:"macro-chip"},Xa={class:"macro-chip"},Za={class:"panel stock-panel",id:"stocks"},Qa={class:"panel-header signal-header"},ec={class:"stock-controls"},tc={class:"toggle-filter"},sc={key:0,class:"empty-research"},nc={key:1,class:"table-wrap"},lc={class:"factor-table"},ic=["onClick"],oc={key:1,class:"muted-cell"},rc={class:"combined-cell"},ac={class:"symbol-name"},cc={key:0,class:"muted-cell"},uc={class:"score-cell"},fc={key:0,class:"dividend-dot",title:"จ่ายปันผล"},dc={class:"panel lineage-panel",id:"lineage"},pc={class:"panel-header signal-header"},hc={class:"status-tag"},gc={class:"table-wrap"},vc={class:"source-table"},_c={class:"source-name"},mc={class:"muted-cell"},bc={class:"muted-cell"},yc={class:"muted-cell"},xc={class:"muted-cell"},wc={class:"panel health-panel",id:"health"},Sc={key:0,class:"empty-research muted-cell"},Cc={key:1},kc={class:"source-table"},Tc={class:"source-name"},Ec={class:"muted-cell",style:{"font-size":"11px"}},Oc={key:0,class:"status-tag",style:{background:"#1a7f37",color:"#fff"}},Pc={key:1,class:"status-tag warning-tag"},Ac={key:0,class:"muted-cell",style:{"font-size":"11px","word-break":"break-word"}},Rc={class:"muted-cell"},Mc=["onClick"],Ic={class:"panel sim-panel",id:"suggestion"},Fc={class:"panel-header signal-header"},Dc={class:"status-tag neutral-tag"},Lc={class:"sim-controls"},$c={class:"sim-field"},Nc=["disabled"],jc={key:0,class:"sim-result"},Hc={class:"sim-sums"},Vc={class:"sim-sum"},Bc={class:"sim-sum"},Kc={class:"sim-note"},Uc={class:"sim-buckets"},Wc={class:"sim-bucket"},qc={class:"sim-order-table"},zc={key:0},Yc={class:"muted-cell"},Gc={class:"score-cell"},Jc={class:"score-cell"},Xc={key:1},Zc={class:"sim-bucket"},Qc={class:"sim-order-table"},eu={key:0},tu={class:"muted-cell"},su={class:"score-cell"},nu={class:"score-cell"},lu={key:1},iu={class:"sim-bucket"},ou={class:"sim-order-table"},ru={key:0},au={class:"muted-cell"},cu={class:"score-cell"},uu={class:"score-cell"},fu={key:1},du={key:1,class:"empty-research"},pu={class:"panel backtest-panel",id:"backtest"},hu={class:"backtest-controls"},gu={class:"checkbox-label",style:{display:"flex","align-items":"center",gap:"6px"}},vu=["disabled"],_u={key:0,class:"state-card warning-state"},mu={class:"muted-cell",style:{"margin-top":"4px"}},bu={class:"muted-cell",style:{"margin-top":"2px"}},yu={key:1,class:"state-card error-state"},xu={key:2,class:"backtest-results"},wu={class:"bt-kpi-grid"},Su={class:"bt-kpi"},Cu={class:"bt-kpi"},ku={class:"bt-kpi"},Tu={class:"positive-text"},Eu={class:"bt-kpi"},Ou={class:"negative-text"},Pu={class:"bt-kpi"},Au={class:"bt-kpi"},Ru={class:"bt-kpi"},Mu={class:"bt-meta muted-cell"},Iu={key:0,class:"bt-meta"},Fu={key:1,class:"bt-meta muted-cell"},Du={key:2,class:"bt-holdings"},Lu={class:"source-table",style:{"margin-top":"6px"}},$u={class:"muted-cell"},Nu={key:3,class:"empty-research"},ju={key:4,class:"bt-history"},Hu={class:"source-table"},Vu={key:0,class:"status-tag warning-tag",title:"ใช้คะแนนปัจจุบันย้อนหลัง ไม่ใช่ point-in-time"},Bu={class:"positive-text"},Ku=["title"],Uu={class:"muted-cell"},Wu={class:"modal-card"},qu={class:"modal-head"},zu={key:0,class:"empty-research"},Yu={key:1,class:"state-card error-state"},Gu={key:2,class:"modal-body"},Ju={class:"modal-section"},Xu={key:0,class:"modal-themes"},Zu={class:"contrib-name"},Qu={key:0,class:"contrib-calc"},ef={key:1,class:"muted-cell"},tf={key:1,class:"muted-cell"},sf={class:"modal-section"},nf={key:0},lf={style:{color:"var(--accent)"}},of={class:"score-table"},rf={class:"muted-cell",style:{"font-size":"10px"}},af={key:1,class:"muted-cell"},cf={class:"modal-section"},uf={class:"fund-grid"},ff={class:"modal-sub"},df={class:"modal-section"},pf={class:"calc-box"},hf={class:"calc-line"},gf={class:"calc-step-head"},vf={class:"calc-step-note"},_f={key:0,class:"calc-z"},mf={class:"modal-sub"},bf={__name:"App",setup(e){const t=B(null),s=B(null),n=B(null),l=B(null),i=B(null),r=B(null),a=B(1e6),u=B(null),g=B(null),h=B(!1),y=B(""),R=B(""),M=B(1e6),K=B(!1),A=B(null),se=B([]),V=B(null),H=B(!0),U=B(!1),I=B(null),ie=B(!1),ne=B("signal_score"),he=B("desc"),Ne=B({entries:[]}),Pt=B(null),Je=B(null),Xe=B(!0),Ze=B(""),dt=B(""),Vt=B(!1),cs=B("token"),fe=B(!0),le=B(""),G=ce(()=>{var _;return((_=l.value)==null?void 0:_.factors)??[]}),je=ce(()=>{var _;return((_=r.value)==null?void 0:_.themes)??[]}),gt=ce(()=>{var _;return((_=r.value)==null?void 0:_.sources)??[]}),Oe=B([]),Pe=B(!1),Qe=ce(()=>{var _;return((_=r.value)==null?void 0:_.macro)??{}}),Bt=ce(()=>gt.value.length),us=ce(()=>{var _,f;return((f=(_=r.value)==null?void 0:_.source_summary)==null?void 0:f.factor_keys)??Bt.value}),et=ce(()=>{var _;return((_=r.value)==null?void 0:_.available)??!1}),At=ce(()=>{var _;return((_=r.value)==null?void 0:_.board)??G.value}),pt=ce(()=>{const _={};for(const f of At.value)_[f.symbol]=f;return _}),vt=ce(()=>{var f;const _=(f=t.value)==null?void 0:f.signal_summary;return{long:(_==null?void 0:_.long)??0,short:(_==null?void 0:_.short)??0,neutral:(_==null?void 0:_.neutral)??0,total:(_==null?void 0:_.total)??0}}),_t=_=>({monthly:"รายเดือน",quarterly:"รายไตรมาส",annual:"รายปี",daily:"รายวัน"})[_]||_,fs=ce(()=>{const _={};for(const f of je.value)_[f.id]=f.label_th;return _});function c(_){const f=pt.value[_];return((f==null?void 0:f.themes)??[]).map(Re=>fs.value[Re]||Re)}const d=ce(()=>{var _;return((_=l.value)==null?void 0:_.available)??!1}),b=ce(()=>{var _;return((_=l.value)==null?void 0:_.dividend_count)??0}),S=ce(()=>{var _;return((_=i.value)==null?void 0:_.combined_count)??0}),w=ce(()=>{let _=G.value;return ie.value&&(_=_.filter(f=>f.is_dividend)),_});function x(_,f){var ge;return f==="signal_score"?_.signal_score??(_.signal_side==="LONG"?9999:0):f==="combined"?((ge=pt.value[_.symbol])==null?void 0:ge.combined)??-9999:f==="symbol"?_.symbol:f==="dividend_yield"?_.dividend_yield??-1:f==="eps_growth_yoy"?_.eps_growth_yoy??-1:f==="pe"?_.pe??0:f==="eps"?_.eps??0:f==="pbv"?_.pbv??0:f==="roe"?_.roe??0:_[f]}const O=ce(()=>{const _=[...w.value],f=he.value==="asc"?1:-1;return _.sort((ge,Re)=>{const He=x(ge,ne.value),tt=x(Re,ne.value);return typeof He=="string"?He.localeCompare(tt)*f:He===tt?ge.symbol.localeCompare(Re.symbol):He==null?1:tt==null?-1:(He-tt)*f}),_});function E(_){ne.value===_?he.value=he.value==="asc"?"desc":"asc":(ne.value=_,he.value="desc")}function C(_){return ne.value!==_?"":he.value==="asc"?"↑":"↓"}function v(_,f=2){return Number(_??0).toFixed(f)}function D(_){return _==="dated_ledger"}function P(_){return D(_)?{label:"ตามวันจริง",cls:"status-tag",style:"background:#1a7f37;color:#fff"}:_==="dps_annual_proxy"?{label:"Proxy (ต่อหุ้น)",cls:"status-tag warning-tag"}:{label:"Proxy",cls:"status-tag warning-tag"}}function F(_){return D(_)?"ปันผลตามวันจริงจาก ledger (ex-date × จำนวนหุ้น) — กระแสเงินสดจริง":_==="dps_annual_proxy"?"ประมาณการปันผลต่อหุ้น (DPS ล่าสุด × จำนวนหุ้น) ไม่ใช่กระแสเงินสดตามวันจริง":"ประมาณจาก dividend yield ของพอร์ตสุดท้าย ไม่ใช่กระแสเงินสดปันผลจริง"}function L(_){return _?new Date(_).toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}async function $(_,f){const ge=await fetch(_,f);if(!ge.ok){const Re=await ge.json().catch(()=>({}));throw new Error(Re.error||`Request failed: ${ge.status}`)}return ge.json()}async function J(){const _=await fetch("/api/v1/backtest/tourism?min_events=12"),f=await _.json().catch(()=>({}));if(![200,409].includes(_.status))throw new Error(f.error||`Request failed: ${_.status}`);return f}async function q(){const _=await fetch("/api/v1/research/tourism/latest");if(_.status===404)return null;const f=await _.json().catch(()=>({}));if(!_.ok)throw new Error(f.error||`Request failed: ${_.status}`);return f}const oe=ce(()=>{var _;return((_=I.value)==null?void 0:_.orders)??[]}),ue=ce(()=>{var _;return((_=I.value)==null?void 0:_.invested)??0}),Ae=ce(()=>{var _;return((_=I.value)==null?void 0:_.unallocated_cash)??0}),de=_=>oe.value.filter(f=>f.bucket===_);async function mt(){U.value=!0,I.value=null;try{I.value=await $("/api/v1/suggestion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({capital:Number(a.value)})})}catch(_){dt.value=_.message}finally{U.value=!1}}async function ds(){Xe.value=!0,Ze.value="";try{const[_,f,ge,Re,He,tt,gs,bt,vs,_s]=await Promise.all([$("/api/v1/dashboard/summary"),$("/api/v1/factors/tourism/observations"),$("/api/v1/signals"),$("/api/v1/factors"),$("/api/v1/themes"),$("/api/v1/dashboard"),$("/api/v1/paper/ledger"),$("/api/v1/auth/paper",{credentials:"include"}),J(),q()]);t.value=_,s.value=f,n.value=ge,l.value=Re,i.value=He,r.value=tt,Ne.value=gs,Vt.value=!!bt.authenticated,cs.value=bt.mode||"token",fe.value=bt.enabled!==!1,le.value=bt.warning||"",Pt.value=vs,Je.value=_s}catch(_){Ze.value=_.message}finally{Xe.value=!1}}async function ye(_){u.value=_,g.value=null,h.value=!0;try{g.value=await $(`/api/v1/symbols/${_}`)}catch(f){g.value={error:f.message,symbol:_}}finally{h.value=!1}}function Te(){u.value=null,g.value=null}async function ps(){try{const _=await $("/api/v1/backtest/readiness");V.value=_,!y.value&&_.recommended_start&&(y.value=_.recommended_start),!R.value&&_.recommended_end&&(R.value=_.recommended_end)}catch{V.value=null}}async function hs(){try{const _=await $("/api/v1/scheduler/sources");Oe.value=_.sources||[]}catch{Oe.value=[]}Pe.value=!0}const Ys=_=>({ok:"ปกติ",network:"เครือข่ายขัดข้อง",timeout:"หมดเวลา",http:"HTTP error",parse:"รูปแบบข้อมูลผิด",structure:"หน้าเว็บเปลี่ยนโครงสร้าง",auth:"สิทธิ์/ยืนยันตัวตน",other:"อื่น ๆ"})[_]||_;async function ki(_){const f=`[${_.at}] ${_.label} (${_.key}) — ${_.ok?"OK":"FAIL: "+Ys(_.category)} ${_.detail?"| "+_.detail:""}`;try{await navigator.clipboard.writeText(f),dt.value=`คัดลอกสาเหตุของ ${_.key} แล้ว`}catch{dt.value=f}}function Ti(_){return _.ok?"":` (สาเหตุน่าจะ: ${Ys(_.category)})`}async function Ei(){K.value=!0,A.value=null;try{A.value=await $("/api/v1/backtest/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({start:y.value,end:R.value,capital:Number(M.value),use_ledger:H.value})}),await Dn()}catch(_){A.value={error:_.message}}finally{K.value=!1}}async function Dn(){try{se.value=(await $("/api/v1/backtest/run")).runs||[]}catch{se.value=[]}}const Rt=_=>_!=null?_>=0?"positive-text":"negative-text":"";return Zl(async()=>{await ds(),await Promise.all([Dn(),ps(),hs()])}),(_,f)=>{var ge,Re,He,tt,gs,bt,vs,_s,Ln,$n,Nn;return k(),T("div",na,[f[79]||(f[79]=pr('',1)),o("main",la,[o("header",ia,[f[16]||(f[16]=o("div",null,[o("div",{class:"eyebrow"},"Alternative data · SET50"),o("h1",null,"SET50 Signal Lab"),o("p",{class:"subtitle"},"ภาพรวม alternative factors ไทย ไปจนถึงสัญญาณลงทุนที่อธิบายได้ — research + paper only")],-1)),o("div",oa,[o("div",{class:Z(["freshness-pill",et.value?"pill-live":"pill-fixture"])},[f[15]||(f[15]=o("span",{class:"freshness-dot"},null,-1)),W(m(et.value?"ข้อมูลจริงจากแหล่งไทย":"ข้อมูลจำลอง (fixture)"),1)],2),o("div",ra,"ข้อมูล "+m(((ge=t.value)==null?void 0:ge.as_of)||"—"),1)])]),Xe.value?(k(),T("div",aa,"กำลังโหลดข้อมูล…")):Ze.value?(k(),T("div",ca,m(Ze.value),1)):(k(),T(ee,{key:2},[o("section",ua,[o("article",fa,[f[19]||(f[19]=o("div",{class:"kpi-label"},"สัญญาณที่ใช้งาน",-1)),o("div",da,m(vt.value.long),1),o("div",pa,[o("span",ha,m(vt.value.long)+" ซื้อ",1),f[17]||(f[17]=W(" · ",-1)),o("span",ga,m(vt.value.short)+" ขาย",1),f[18]||(f[18]=W(" · ",-1)),o("span",va,m(vt.value.neutral)+" เป็นกลาง",1)])]),o("article",_a,[f[20]||(f[20]=o("div",{class:"kpi-label"},"แหล่งข้อมูลที่ใช้",-1)),o("div",ma,m(us.value)+" ปัจจัย · "+m(Bt.value)+" แหล่ง",1),o("div",ba,"ข้อมูลจริงจากแหล่งไทย "+m(et.value?"(จริง)":"—"),1)])]),o("section",ya,[o("div",xa,[f[21]||(f[21]=o("div",null,[o("div",{class:"section-kicker"},"ธีม"),o("h2",null,"ธีม (Themes)"),o("p",{class:"panel-subtitle"},"ภาพรวม alternative factors ของไทย — แต่ละธีมมีความถี่ข้อมูลต่างกัน (monthly / quarterly) ดังนั้นอย่าเทียบเป็นจุดเวลาเดียวกัน.")],-1)),o("span",wa,"รวม "+m(S.value)+" symbols",1)]),o("div",Sa,[(k(!0),T(ee,null,Ce(je.value,p=>(k(),T("article",{key:p.id,class:"theme-card"},[o("div",Ca,[o("span",ka,m(_t(p.frequency)),1),o("span",Ta,m(p.label_th),1)]),o("div",Ea,[f[22]||(f[22]=o("span",{class:"theme-surprise-label"},"ความต่าง (surprise)",-1)),o("span",Oa,m(p.surprise!=null?v(p.surprise,2)+"σ":"—"),1)]),o("div",Pa,[p.id==="auto_credit"&&p.read.new_car_sales_yoy!=null?(k(),T("div",Aa,m(v(p.read.new_car_sales_yoy))+"% YoY ยอดขายรถ",1)):p.id==="auto_credit"&&p.read.auto_npl_pct!=null?(k(),T("div",Ra,"NPL "+m(v(p.read.auto_npl_pct))+"%",1)):p.id==="refining_energy"&&(p.read.quarterly||p.read.net_profit)?(k(),T("div",Ma,"กำไรสุทธิ TOP (รายไตรมาส)")):p.id==="refining_energy"&&p.read.irpc_net_margin_pct!=null?(k(),T("div",Ia,"กำไรสุทธิ IRPC "+m(v(p.read.irpc_net_margin_pct))+"%",1)):p.id==="tourism"?(k(),T("div",Fa,"signal tourism "+m(p.surprise!=null?v(p.surprise,2):"—")+"σ",1)):p.id==="banks"&&p.read.interest_rate_pct!=null?(k(),T("div",Da,"ดอกเบี้ย "+m(v(p.read.interest_rate_pct))+"%",1)):p.id==="banks"&&p.read.bank_npl_pct!=null?(k(),T("div",La,"NPL ภาคการเงิน "+m(v(p.read.bank_npl_pct))+"%",1)):(p.id==="retail"||p.id==="consumer_staples")&&p.read.retail_sales_yoy!=null?(k(),T("div",$a,"ยอดขายปลีก "+m(v(p.read.retail_sales_yoy))+"% YoY",1)):(p.id==="retail"||p.id==="consumer_staples")&&p.read.consumer_confidence!=null?(k(),T("div",Na,"เชื่อมั่นผู้บริโภค "+m(v(p.read.consumer_confidence,1)),1)):p.id==="nonbank_finance"&&p.read.consumer_credit!=null?(k(),T("div",ja,"สินเชื่อผู้บริโภค "+m(v(p.read.consumer_credit/1e6,2))+" ล้านลบ.",1)):p.id==="nonbank_finance"&&p.read.household_debt_gdp!=null?(k(),T("div",Ha,"หนี้ครัวเรือน "+m(v(p.read.household_debt_gdp))+"% GDP",1)):p.id==="property"&&p.read.property_prices_yoy!=null?(k(),T("div",Va,"ราคาอสังหา "+m(v(p.read.property_prices_yoy))+"% YoY",1)):p.id==="telecom_it"&&p.read.business_confidence!=null?(k(),T("div",Ba,"เชื่อมั่นธุรกิจ "+m(v(p.read.business_confidence,1)),1)):p.id==="healthcare"&&p.read.consumption_yoy!=null?(k(),T("div",Ka,"บริโภค "+m(v(p.read.consumption_yoy))+"% YoY",1)):ve("",!0)]),p.narrative?(k(),T("div",Ua,m(p.narrative),1)):ve("",!0)]))),128))]),Object.keys(Qe.value).length?(k(),T("div",Wa,[f[28]||(f[28]=o("div",{class:"section-kicker"},"ภาพรวมประเทศไทย",-1)),o("div",qa,[o("span",za,[f[23]||(f[23]=W("การบริโภคภาคเอกชน ",-1)),o("strong",null,m(Qe.value.private_consumption_yoy)+"%",1)]),o("span",Ya,[f[24]||(f[24]=W("การลงทุนเอกชน ",-1)),o("strong",null,m(Qe.value.private_investment_yoy)+"%",1)]),o("span",Ga,[f[25]||(f[25]=W("เงินเฟ้อ ",-1)),o("strong",null,m(Qe.value.headline_inflation_yoy)+"%",1)]),o("span",Ja,[f[26]||(f[26]=W("การว่างงาน ",-1)),o("strong",null,m(Qe.value.unemployment_pct)+"%",1)]),o("span",Xa,[f[27]||(f[27]=W("นักท่องเที่ยว YTD ",-1)),o("strong",null,m(Qe.value.tourists_ytd_mn)+" ล้าน",1)])])])):ve("",!0)]),o("section",Za,[o("div",Qa,[f[29]||(f[29]=o("div",null,[o("div",{class:"section-kicker"},"ตารางหุ้น"),o("h2",null,"ตารางหุ้น"),o("p",{class:"panel-subtitle"},[W("ตารางเดียวรวมทุกธีม — สัญญาณ + คะแนนรวม (60% ธีม / 40% พื้นฐาน) + มูลค่าพื้นฐานจาก Siamchart. เรียงได้โดยคลิกหัวตาราง; เปิด "),o("em",null,"เฉพาะหุ้นปันผล"),W(" เพื่อกรองหุ้นที่จ่ายปันผล.")])],-1)),o("div",ec,[o("label",tc,[It(o("input",{type:"checkbox","onUpdate:modelValue":f[0]||(f[0]=p=>ie.value=p)},null,512),[[hl,ie.value]]),o("span",null,"เฉพาะหุ้นปันผล ("+m(b.value)+")",1)]),o("span",{class:Z(["status-tag",d.value?"":"warning-tag"])},m(d.value?"Siamchart ใช้งานได้":"ไม่มี factor"),3)])]),d.value?(k(),T("div",nc,[o("table",lc,[o("thead",null,[o("tr",null,[o("th",{class:Z(["sortable",{active:ne.value==="signal_score"}]),onClick:f[1]||(f[1]=p=>E("signal_score"))},"สัญญาณ "+m(C("signal_score")),3),o("th",{class:Z(["sortable",{active:ne.value==="combined"}]),onClick:f[2]||(f[2]=p=>E("combined")),title:"60% ธีม + 40% พื้นฐาน"},"คะแนนรวม (60/40) "+m(C("combined")),3),o("th",{class:Z(["sortable",{active:ne.value==="symbol"}]),onClick:f[3]||(f[3]=p=>E("symbol"))},"หุ้น "+m(C("symbol")),3),f[31]||(f[31]=o("th",null,"ธีม",-1)),o("th",{class:Z(["sortable",{active:ne.value==="pe"}]),onClick:f[4]||(f[4]=p=>E("pe"))},"P/E "+m(C("pe")),3),o("th",{class:Z(["sortable",{active:ne.value==="eps"}]),onClick:f[5]||(f[5]=p=>E("eps"))},"EPS "+m(C("eps")),3),o("th",{class:Z(["sortable",{active:ne.value==="eps_growth_yoy"}]),onClick:f[6]||(f[6]=p=>E("eps_growth_yoy"))},"EPS YoY "+m(C("eps_growth_yoy")),3),o("th",{class:Z(["sortable",{active:ne.value==="dividend_yield"}]),onClick:f[7]||(f[7]=p=>E("dividend_yield"))},"ปันผล % "+m(C("dividend_yield")),3),o("th",{class:Z(["sortable",{active:ne.value==="pbv"}]),onClick:f[8]||(f[8]=p=>E("pbv"))},"P/BV "+m(C("pbv")),3),o("th",{class:Z(["sortable",{active:ne.value==="roe"}]),onClick:f[9]||(f[9]=p=>E("roe"))},"ROE "+m(C("roe")),3)])]),o("tbody",null,[(k(!0),T(ee,null,Ce(O.value,p=>{var Ve;return k(),T("tr",{key:p.symbol,class:"clickable-row",onClick:re=>ye(p.symbol)},[o("td",null,[p.signal_side?(k(),T("span",{key:0,class:Z(["side-pill",p.signal_side.toLowerCase()])},m(p.signal_side),3)):(k(),T("span",oc,"—"))]),o("td",rc,m(((Ve=pt.value[p.symbol])==null?void 0:Ve.combined)!=null?v(pt.value[p.symbol].combined):"—"),1),o("td",null,[o("strong",ac,m(p.symbol),1)]),o("td",null,[(k(!0),T(ee,null,Ce(c(p.symbol),re=>(k(),T("span",{key:re,class:"theme-tag"},m(re),1))),128)),c(p.symbol).length?ve("",!0):(k(),T("span",cc,"—"))]),o("td",uc,m(p.pe!=null?v(p.pe):"—"),1),o("td",null,m(p.eps!=null?v(p.eps):"—"),1),o("td",{class:Z(p.eps_growth_yoy>=0?"positive-text":"negative-text")},m(p.eps_growth_yoy!=null?(p.eps_growth_yoy>=0?"+":"")+v(p.eps_growth_yoy)+"%":"—"),3),o("td",{class:Z(p.dividend_yield>=0?"positive-text":"")},[W(m(p.dividend_yield!=null?v(p.dividend_yield)+"%":"—"),1),p.is_dividend?(k(),T("span",fc,"●")):ve("",!0)],2),o("td",null,m(p.pbv!=null?v(p.pbv):"—"),1),o("td",{class:Z(p.roe>=0?"positive-text":"negative-text")},m(p.roe!=null?v(p.roe)+"%":"—"),3)],8,ic)}),128))])])])):(k(),T("div",sc,[...f[30]||(f[30]=[W("Siamchart snapshot ไม่อยู่บน disk. รัน ",-1),o("code",null,"collect_siamchart.py --group SET50 --with-info",-1),W(" เพื่อเก็บข้อมูล.",-1)])]))]),o("section",dc,[o("div",pc,[f[32]||(f[32]=o("div",null,[o("div",{class:"section-kicker"},"ที่มาของข้อมูล"),o("h2",null,"แหล่งข้อมูลทั้งหมด"),o("p",{class:"panel-subtitle"},"รายการแหล่งข้อมูลจริงที่ใช้ — ดึงมาเมื่อใด และข้อมูลชุดไหน ข้อมูลทั้งหมดจากแหล่งไทย.")],-1)),o("span",hc,m(us.value)+" ปัจจัย · "+m(Bt.value)+" แหล่ง",1)]),o("div",gc,[o("table",vc,[f[33]||(f[33]=o("thead",null,[o("tr",null,[o("th",null,"ข้อมูล"),o("th",null,"แหล่ง"),o("th",null,"ช่วงข้อมูล"),o("th",null,"ความถี่"),o("th",null,"อัปเดตครั้งต่อไป"),o("th",null,"อัปเดตล่าสุด")])],-1)),o("tbody",null,[(k(!0),T(ee,null,Ce(gt.value,(p,Ve)=>(k(),T("tr",{key:Ve},[o("td",null,m(p.จาก||p.ขอบเขต),1),o("td",_c,m(p.แหล่ง),1),o("td",mc,m(p.ข้อมูล),1),o("td",bc,m(p.ความถี่||"—"),1),o("td",yc,m(p.อัปเดตครั้งต่อไป?L(p.อัปเดตครั้งต่อไป):"—"),1),o("td",xc,m(p.dึงมาเมื่อ?L(p.dึงมาเมื่อ):"—"),1)]))),128))])])])]),o("section",wc,[f[35]||(f[35]=o("div",{class:"panel-header signal-header"},[o("div",null,[o("div",{class:"section-kicker"},"สถานะการดึงข้อมูล"),o("h2",null,"Log — สถานะแหล่งข้อมูล"),o("p",{class:"panel-subtitle"},'ผลการดึงข้อมูลครั้งล่าสุดของแต่ละแหล่ง โดยระบบวิเคราะห์สาเหตุให้อัตโนมัติ (เครือข่าย / หมดเวลา / หน้าเว็บเปลี่ยนโครงสร้าง / รูปแบบข้อมูล เป็นต้น) — กดปุ่ม "คัดลอก" เพื่อ copy สาเหตุไปแจ้ง/ตรวจสอบได้ทันที.')])],-1)),Oe.value.length===0?(k(),T("div",Sc,"ยังไม่มี log — รอรอบ refresh ถัดไป (ปกติ ~ทุกวันสำหรับราคา, ~รายเดือน/ไตรมาสสำหรับปัจจัย).")):(k(),T("div",Cc,[o("table",kc,[f[34]||(f[34]=o("thead",null,[o("tr",null,[o("th",null,"แหล่ง"),o("th",null,"ผลลัพธ์"),o("th",null,"สาเหตุ"),o("th",null,"เวลา"),o("th")])],-1)),o("tbody",null,[(k(!0),T(ee,null,Ce(Oe.value.slice(0,20),(p,Ve)=>(k(),T("tr",{key:Ve},[o("td",Tc,[W(m(p.label),1),o("div",Ec,m(p.key),1)]),o("td",null,[p.ok?(k(),T("span",Oc,"OK")):(k(),T("span",Pc,"FAIL"))]),o("td",null,[p.ok?(k(),T(ee,{key:0},[W("—")],64)):(k(),T(ee,{key:1},[o("div",null,m(Ys(p.category))+m(Ti(p)),1),p.detail?(k(),T("div",Ac,m(p.detail.slice(0,160)),1)):ve("",!0)],64))]),o("td",Rc,m(p.at?L(p.at):"—"),1),o("td",null,[p.ok?ve("",!0):(k(),T("button",{key:0,class:"primary-btn",style:{padding:"2px 8px"},onClick:re=>ki(p)},"คัดลอกสาเหตุ",8,Mc))])]))),128))])])]))]),o("section",Ic,[o("div",Fc,[f[36]||(f[36]=o("div",null,[o("div",{class:"section-kicker"},"คำแนะนำการลงทุน"),o("h2",null,"จัดสรรทุน (Suggestion)"),o("p",{class:"panel-subtitle"},"กรอกทุน และระบบแนะนำสัดส่วน 50 / 20 / 30 — หุ้นที่ทำกำไรได้มากสุดแล้วจ่ายปันผล, หุ้นทำกำไรแต่ไม่ปันผล, และหุ้นปันผลสูงสุด (ไม่ซ้ำ) — ขั้นต่ำ 100 หุ้นต่อตัว.")],-1)),o("span",Dc,m(I.value?"ใช้ได้":"รอใส่ทุน"),1)]),o("div",Lc,[o("div",$c,[f[37]||(f[37]=o("label",null,"ทุน (บาท)",-1)),It(o("input",{"onUpdate:modelValue":f[10]||(f[10]=p=>a.value=p),type:"number",min:"1000",step:"1000"},null,512),[[ws,a.value]])]),o("button",{class:"primary-button",disabled:U.value,onClick:mt},m(U.value?"กำลังคำนวณ…":"คำนวณการจัดสรร"),9,Nc)]),I.value?(k(),T("div",jc,[o("div",Hc,[o("div",Vc,[f[38]||(f[38]=o("span",null,"ลงทุนรวม",-1)),o("strong",null,m(v(ue.value,0))+" บาท",1)]),o("div",Bc,[f[39]||(f[39]=o("span",null,"เงินสดเหลือ",-1)),o("strong",null,m(v(Ae.value,0))+" บาท",1)])]),o("div",Kc,m(I.value.data_note),1),o("div",Uc,[o("div",Wc,[f[41]||(f[41]=o("div",{class:"sim-bucket-head"},[o("span",{class:"sim-bucket-tag b1"},"50%"),o("strong",null,"ทำกำไร + จ่ายปันผล")],-1)),o("table",qc,[de(1).length?(k(),T("tbody",zc,[(k(!0),T(ee,null,Ce(de(1),p=>(k(),T("tr",{key:"b1"+p.symbol},[o("td",null,m(p.symbol),1),o("td",Yc,"qty "+m(p.qty),1),o("td",Gc,"@ "+m(v(p.price)),1),o("td",Jc,m(v(p.notional,0)),1)]))),128))])):(k(),T("tbody",Xc,[...f[40]||(f[40]=[o("tr",null,[o("td",{class:"muted-cell"},"ไม่มีหุ้นที่เข้าเกณฑ์")],-1)])]))])]),o("div",Zc,[f[43]||(f[43]=o("div",{class:"sim-bucket-head"},[o("span",{class:"sim-bucket-tag b2"},"20%"),o("strong",null,"ทำกำไร ไม่ปันผล")],-1)),o("table",Qc,[de(2).length?(k(),T("tbody",eu,[(k(!0),T(ee,null,Ce(de(2),p=>(k(),T("tr",{key:"b2"+p.symbol},[o("td",null,m(p.symbol),1),o("td",tu,"qty "+m(p.qty),1),o("td",su,"@ "+m(v(p.price)),1),o("td",nu,m(v(p.notional,0)),1)]))),128))])):(k(),T("tbody",lu,[...f[42]||(f[42]=[o("tr",null,[o("td",{class:"muted-cell"},"ไม่มีหุ้นที่เข้าเกณฑ์")],-1)])]))])]),o("div",iu,[f[45]||(f[45]=o("div",{class:"sim-bucket-head"},[o("span",{class:"sim-bucket-tag b3"},"30%"),o("strong",null,"ปันผลสูงสุด (ไม่ซ้ำ)")],-1)),o("table",ou,[de(3).length?(k(),T("tbody",ru,[(k(!0),T(ee,null,Ce(de(3),p=>(k(),T("tr",{key:"b3"+p.symbol},[o("td",null,m(p.symbol),1),o("td",au,"qty "+m(p.qty),1),o("td",cu,"@ "+m(v(p.price)),1),o("td",uu,m(v(p.notional,0)),1)]))),128))])):(k(),T("tbody",fu,[...f[44]||(f[44]=[o("tr",null,[o("td",{class:"muted-cell"},"ไม่มีหุ้นที่เข้าเกณฑ์")],-1)])]))])])])])):ve("",!0),I.value?ve("",!0):(k(),T("div",du,"กด 'คำนวณการจัดสรร' เพื่อดูว่า 50/20/30 จัดสรรทุนของคุณไปที่หุ้นไหนบ้าง"))]),o("section",pu,[f[62]||(f[62]=o("div",{class:"panel-header signal-header"},[o("div",null,[o("div",{class:"section-kicker"},"การย้อนทดสอบ"),o("h2",null,"Backtest (ย้อนทดสอบ)"),o("p",{class:"panel-subtitle"},"กำหนดช่วงวัน แล้วระบบจัดสรร 50/20/30 ณ วันที่เริ่ม ลงทุน และปรับพอร์ตตามข้อมูลที่เผยแพร่ใหม่ (event-driven) จนถึงวันสิ้นสุด — สรุปกำไร/ขาดทุนจากราคา + เงินปันผล. มีค่าธรรมเนียม 0.3% ต่อรายการ และปันผลเข้าบัญชีใน 30 วันหลัง ex-date.")])],-1)),o("div",hu,[o("label",null,[f[46]||(f[46]=W("ตั้งแต่ ",-1)),It(o("input",{type:"date","onUpdate:modelValue":f[11]||(f[11]=p=>y.value=p)},null,512),[[ws,y.value]])]),o("label",null,[f[47]||(f[47]=W("ถึง ",-1)),It(o("input",{type:"date","onUpdate:modelValue":f[12]||(f[12]=p=>R.value=p)},null,512),[[ws,R.value]])]),o("label",null,[f[48]||(f[48]=W("ทุน ",-1)),It(o("input",{type:"number","onUpdate:modelValue":f[13]||(f[13]=p=>M.value=p),step:"100000"},null,512),[[ws,M.value,void 0,{number:!0}]])]),o("label",gu,[It(o("input",{type:"checkbox","onUpdate:modelValue":f[14]||(f[14]=p=>H.value=p)},null,512),[[hl,H.value]]),f[49]||(f[49]=W(" ใช้ ledger ปันผลตามวันที่จริง ",-1))]),o("button",{class:"primary-btn",disabled:K.value||V.value&&!V.value.ready,onClick:Ei},m(K.value?"กำลังย้อนทดสอบ…":"รัน Backtest"),9,vu)]),V.value&&!V.value.ready?(k(),T("div",_u,[f[50]||(f[50]=o("strong",null,"ยังรันย้อนทดสอบแบบ strict PIT ไม่ได้ — ขาดข้อมูล coverage:",-1)),o("div",mu,m((V.value.missing||[]).slice(0,8).join(", "))+m((V.value.missing||[]).length>8?"…":""),1),o("div",bu,"วันเริ่มที่แนะนำ: "+m(V.value.recommended_start||"—")+" · วันสิ้นสุด: "+m(V.value.recommended_end||"—"),1)])):ve("",!0),(Re=A.value)!=null&&Re.error?(k(),T("div",yu,m(A.value.error),1)):A.value&&!A.value.error?(k(),T("div",xu,[o("div",wu,[o("div",Su,[f[51]||(f[51]=o("span",null,"กำไรจากราคา (realized)",-1)),o("strong",{class:Z(Rt(A.value.realized_trading_pnl))},m(v(A.value.realized_trading_pnl))+" บาท",3)]),o("div",Cu,[f[52]||(f[52]=o("span",null,"กำไรจากราคา (unrealized)",-1)),o("strong",{class:Z(Rt(A.value.unrealized_trading_pnl))},m(v(A.value.unrealized_trading_pnl))+" บาท",3)]),o("div",ku,[f[53]||(f[53]=o("span",null,"เงินปันผลที่ได้รับ",-1)),o("strong",Tu,m(v(A.value.dividend_cash_received))+" บาท",1)]),o("div",Eu,[f[54]||(f[54]=o("span",null,"ค่าธรรมเนียม (0.3%)",-1)),o("strong",Ou,"–"+m(v(A.value.transaction_costs))+" บาท",1)]),o("div",Pu,[f[55]||(f[55]=o("span",null,"เงินปันผลค้างรับ",-1)),o("strong",null,m(v(A.value.dividend_receivable))+" บาท",1)]),o("div",Au,[f[56]||(f[56]=o("span",null,"มูลค่าสุดท้าย (equity)",-1)),o("strong",null,m(v(A.value.final_equity))+" บาท",1)]),o("div",Ru,[f[57]||(f[57]=o("span",null,"ผลตอบแทนสุทธิ",-1)),o("strong",{class:Z(Rt(A.value.net_return))},m((A.value.net_return*100).toFixed(2))+"%",3)])]),o("div",Mu,"Rebalances: "+m(A.value.rebalances)+" · ปันผลตาม: "+m(A.value.dividend_timing)+" · ช่วง "+m(A.value.start)+" → "+m(A.value.end),1),A.value.leakage_guard?(k(),T("div",Iu,"✅ strict PIT (leakage guard active)")):(k(),T("div",Fu,"คำเตือน: ไม่ได้พิสูจน์ point-in-time (non-PIT)")),A.value.holdings&&A.value.holdings.length?(k(),T("div",Du,[f[59]||(f[59]=o("strong",null,"พอร์ตสุดท้าย:",-1)),o("table",Lu,[f[58]||(f[58]=o("thead",null,[o("tr",null,[o("th",null,"หุ้น"),o("th",null,"จำนวน"),o("th",null,"ต้นทุนเฉลี่ย"),o("th",null,"ราคาล่าสุด"),o("th",null,"มูลค่า"),o("th",null,"กำไร unrealized")])],-1)),o("tbody",null,[(k(!0),T(ee,null,Ce(A.value.holdings,p=>(k(),T("tr",{key:p.symbol},[o("td",$u,m(p.symbol),1),o("td",null,m(p.qty),1),o("td",null,m(v(p.average_cost,2)),1),o("td",null,m(v(p.last_price,2)),1),o("td",null,m(v(p.market_value)),1),o("td",{class:Z(Rt(p.unrealized_pnl))},m(v(p.unrealized_pnl)),3)]))),128))])])])):ve("",!0)])):(k(),T("div",Nu,"กำหนดช่วงวันแล้วกด 'รัน Backtest' เพื่อดูผล (กำไร/ขาดทุนจากราคา + ปันผล)")),se.value.length?(k(),T("div",ju,[f[61]||(f[61]=o("div",{class:"section-kicker"},"ประวัติการย้อนทดสอบ",-1)),o("table",Hu,[f[60]||(f[60]=o("thead",null,[o("tr",null,[o("th",null,"#"),o("th",null,"ช่วง"),o("th",null,"ทุน"),o("th",null,"กำไรราคา"),o("th",null,"ปันผล"),o("th",null,"ผลตอบแทน"),o("th",null,"รันเมื่อ")])],-1)),o("tbody",null,[(k(!0),T(ee,null,Ce(se.value.slice().reverse(),p=>(k(),T("tr",{key:p.id},[o("td",null,m(p.id),1),o("td",null,[W(m(p.start)+" → "+m(p.end)+" ",1),p.leakage_guard===!1?(k(),T("span",Vu,"descriptive non-PIT")):ve("",!0)]),o("td",null,m(v(p.capital)),1),o("td",{class:Z(Rt(p.price_pnl))},m(v(p.price_pnl)),3),o("td",Bu,[W(m(v(p.dividend_income)),1),o("span",{class:Z(["status-tag",P(p.dividend_method).cls]),style:Hs([P(p.dividend_method).style||void 0,{"margin-left":"4px"}]),title:F(p.dividend_method)},m(P(p.dividend_method).label),15,Ku)]),o("td",{class:Z(Rt(p.net_return))},m((p.net_return*100).toFixed(2))+"%",3),o("td",Uu,m(p.ran_at?L(p.ran_at):"—"),1)]))),128))])])])):ve("",!0)])],64))]),u.value?(k(),T("div",{key:0,class:"modal-overlay",onClick:Xr(Te,["self"])},[o("div",Wu,[o("div",qu,[o("div",null,[f[63]||(f[63]=o("div",{class:"modal-kicker"},"การวิเคราะห์รายหุ้น",-1)),o("h3",null,m(u.value),1)]),o("button",{class:"modal-close",onClick:Te},"✕")]),h.value?(k(),T("div",zu,"กำลังโหลดการวิเคราะห์…")):(He=g.value)!=null&&He.error?(k(),T("div",Yu,m(g.value.error),1)):g.value?(k(),T("div",Gu,[o("div",Ju,[f[67]||(f[67]=o("div",{class:"modal-section-title"},"ธีมที่เกี่ยวข้อง (คะแนนต่อธีม)",-1)),(tt=g.value.themes)!=null&&tt.length?(k(),T("div",Xu,[(k(!0),T(ee,null,Ce(g.value.theme_contributions,p=>(k(),T("div",{key:p.theme,class:"contrib-line"},[o("span",Zu,m(p.label_th||fs.value[p.theme]||p.theme),1),p.surprise!=null?(k(),T("span",Qu,[o("em",null,m(v(p.surprise))+"σ",1),f[64]||(f[64]=W(" × คุณภาพ ",-1)),o("em",null,m(p.quality),1),f[65]||(f[65]=W(" = ",-1)),o("strong",null,m(v(p.theme_score))+"σ",1)])):(k(),T("strong",ef,"ยังไม่มีข้อมูล"))]))),128)),f[66]||(f[66]=o("div",{class:"modal-sub"},"คะแนนธีม = ค่าเฉลี่ยของ (surprise × คุณภาพหุ้น) ที่หุ้นนี้อยู่ใน",-1))])):(k(),T("div",tf,"หุ้นนี้ยังไม่ได้จัดอยู่ในธีมใด (จะอัปเดตเมื่อเพิ่มธีม)"))]),o("div",sf,[f[70]||(f[70]=o("div",{class:"modal-section-title"},"คะแนนตามแหล่งข้อมูล (factor × weight)",-1)),g.value.factor_sources&&Object.keys(g.value.factor_sources).length?(k(),T("div",nf,[(k(!0),T(ee,null,Ce(g.value.factor_sources,(p,Ve)=>(k(),T("div",{key:Ve,class:"modal-sub",style:{"margin-top":"10px"}},[o("strong",lf,m(fs.value[Ve]||Ve),1),o("table",of,[f[68]||(f[68]=o("thead",null,[o("tr",null,[o("th",null,"ข้อมูล (source)"),o("th",null,"ค่า raw"),o("th",null,"normalized"),o("th",null,"weight"),o("th",null,"contribution")])],-1)),o("tbody",null,[(k(!0),T(ee,null,Ce(p,re=>(k(),T("tr",{key:re.factor},[o("td",null,[o("span",{class:Z(re.missing?"muted-cell":"")},m(re.name_th),3),o("div",rf,m(re.source),1)]),o("td",null,m(re.raw!=null?re.normalized!=null&&Math.abs(re.normalized)<=1&&Math.abs(re.raw)<1e3?v(re.raw,2):v(re.raw,0):"—"),1),o("td",null,m(re.normalized!=null?v(re.normalized,3):"—"),1),o("td",null,m(v(re.weight)),1),o("td",{class:Z(re.contribution!=null&&re.contribution<0?"negative-text":"positive-text")},m(re.contribution!=null?v(re.contribution,4):"—"),3)]))),128))])])]))),128)),f[69]||(f[69]=o("div",{class:"modal-sub"},"normalized = ค่า raw ที่ปรับด้วย sign/center/span อยู่ในช่วง [-1,1]; contribution = weight × normalized. แหล่งที่ไม่มีข้อมูลจะไม่ถูกนับ (missed → drop source)",-1))])):(k(),T("div",af,"ไม่มีข้อมูลแยกตามแหล่ง"))]),o("div",cf,[f[76]||(f[76]=o("div",{class:"modal-section-title"},"มูลค่าพื้นฐาน (Siamchart)",-1)),o("div",uf,[o("span",null,[f[71]||(f[71]=W("P/E ",-1)),o("strong",null,m(((gs=g.value.fundamentals)==null?void 0:gs.pe)??"—"),1)]),o("span",null,[f[72]||(f[72]=W("EPS ",-1)),o("strong",null,m(((bt=g.value.fundamentals)==null?void 0:bt.eps)??"—"),1)]),o("span",null,[f[73]||(f[73]=W("P/BV ",-1)),o("strong",null,m(((vs=g.value.fundamentals)==null?void 0:vs.pbv)??"—"),1)]),o("span",null,[f[74]||(f[74]=W("ROE ",-1)),o("strong",null,m(((_s=g.value.fundamentals)==null?void 0:_s.roe)??"—"),1)]),o("span",null,[f[75]||(f[75]=W("ปันผล ",-1)),o("strong",null,m((Ln=g.value.fundamentals)!=null&&Ln.is_dividend?"จ่าย":"—"),1)])]),o("div",ff,"ภาพรวม: "+m(g.value.company_name||u.value),1)]),o("div",df,[f[78]||(f[78]=o("div",{class:"modal-section-title"},"ขั้นตอนการคำนวณคะแนนรวม",-1)),o("div",pf,[o("div",hf,m(g.value.combined_formula),1),(k(!0),T(ee,null,Ce(g.value.combined_calc,p=>(k(),T("div",{key:p.label,class:"calc-step"},[o("div",gf,[o("span",null,m(p.label),1),o("strong",null,m(v(p.value))+" × "+m(p.weight),1)]),o("div",vf,m(p.note),1)]))),128)),g.value.siamchart_z_note?(k(),T("div",_f,[W(" คะแนนพื้นฐานได้จาก z-score: z = (ค่า"+m(g.value.siamchart_z_note.raw_i)+" − ค่าเฉลี่ย "+m(g.value.siamchart_z_note.population_mean)+") / ค่าเบี่ยงเบน "+m(g.value.siamchart_z_note.population_stdev),1),f[77]||(f[77]=o("br",null,null,-1)),W("เทียบกับ "+m(g.value.siamchart_z_note.universe_size)+" หุ้นใน SET50 ",1)])):ve("",!0)]),o("div",mf,"ราคาล่าสุด: "+m((($n=g.value.price)==null?void 0:$n.latest)!=null?v(g.value.price.latest):"—")+" ("+m(((Nn=g.value.price)==null?void 0:Nn.date)||"—")+")",1)])])):ve("",!0)])])):ve("",!0)])}}};ea(bf).mount("#app"); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index a1f31d0..347d444 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -5,7 +5,7 @@ SET50 Signal Lab - + diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b34f59f..10c57b3 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -888,6 +888,34 @@ onMounted(async () => { await loadDashboard(); await Promise.all([loadBacktestRu
หุ้นนี้ยังไม่ได้จัดอยู่ในธีมใด (จะอัปเดตเมื่อเพิ่มธีม)
+ + +