agent-usage-all-in-one 0.7.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -13
- package/README.zh-CN.md +2 -7
- package/dist/cli.js +212 -748
- package/dist/cli.js.map +1 -1
- package/dist/web/_app/immutable/assets/2.CebKccN1.css +1 -0
- package/dist/web/_app/immutable/chunks/{CkDl_J6h.js → BbLPJCwg.js} +2 -2
- package/dist/web/_app/immutable/chunks/Bwn50i54.js +1 -0
- package/dist/web/_app/immutable/chunks/{BxFVQ2kE.js → YxRJCZwS.js} +1 -1
- package/dist/web/_app/immutable/entry/app.BJQZZwy-.js +2 -0
- package/dist/web/_app/immutable/entry/start.DGorbLTC.js +1 -0
- package/dist/web/_app/immutable/nodes/0.BLRcVrxx.js +1 -0
- package/dist/web/_app/immutable/nodes/1.C0DvG6AA.js +1 -0
- package/dist/web/_app/immutable/nodes/2.L5Bpe4_s.js +26 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/brand/agent-usage-showcase.jpg +0 -0
- package/dist/web/index.html +9 -9
- package/package.json +1 -1
- package/static/brand/agent-usage-showcase.jpg +0 -0
- package/dist/web/_app/immutable/assets/2.RN1Pn-E8.css +0 -1
- package/dist/web/_app/immutable/chunks/YtE49JQT.js +0 -1
- package/dist/web/_app/immutable/entry/app.DoE5iRPD.js +0 -2
- package/dist/web/_app/immutable/entry/start.-kFQj1Re.js +0 -1
- package/dist/web/_app/immutable/nodes/0.Bc_BSNVt.js +0 -1
- package/dist/web/_app/immutable/nodes/1.CO2k9heq.js +0 -1
- package/dist/web/_app/immutable/nodes/2.C49HhYIP.js +0 -28
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,I as c,J as l,K as u,L as d,M as f,N as p,O as m,Q as h,R as g,S as _,T as v,U as y,W as b,X as x,Y as S,_ as C,a as w,at as T,c as E,ct as D,d as O,et as k,f as A,g as j,h as M,it as ee,j as N,k as P,l as F,lt as I,m as L,n as R,nt as z,o as te,p as ne,q as B,r as V,s as re,st as ie,tt as ae,u as oe,ut as se,v as ce,w as le,y as ue,z as de}from"../chunks/BbLPJCwg.js";import"../chunks/Bwn50i54.js";import"../chunks/xihTtKlq.js";ie();function fe(e){return e==null||!Number.isFinite(e)?null:Math.min(100,Math.max(0,e))}function pe(e,t){let n=`${e} ${t}`.toLowerCase();return/missing|binary|not[ -]?installed/.test(n)?`missing-binary`:/not[ -]?configured|credential.*missing|key.*missing/.test(n)?`not-configured`:/unauthori[sz]ed|permission|forbidden|\b401\b|\b403\b/.test(n)?`unauthorized`:/unsupported|capability/.test(n)?`unsupported`:/schema|shape|parse/.test(n)?`schema-mismatch`:/rate[ -]?limit|\b429\b/.test(n)?`rate-limited`:/timeout|timed out/.test(n)?`timeout`:/stale/.test(n)?`stale`:`unavailable`}var me=new Set([`stale`,`timeout`,`unavailable`]),he=new Set([...me,`rate-limited`]);function ge(e){return e!==null&&he.has(e)}function _e(e){return e?pe(e,``):null}function ve(e,t){return`${e}:${t}`}function ye(e,t,n){return!n&&(t===`stale`||t===`unavailable`)?[`${e}:freshness:${t}`]:[]}function be(e,t){let n=_e(t);return n&&me.has(n)?[`${e}:health:${n}`]:[]}function xe(e,t){let n=new Set((t?.connectors??[]).filter(e=>e.category===`rate-limited`&&e.billingDomainId===null).map(e=>e.providerId)),r=new Set((t?.connectors??[]).filter(e=>e.category===`rate-limited`&&e.billingDomainId!==null).map(e=>ve(e.providerId,e.billingDomainId??``)));for(let t of e.providers){_e(t.health.errorCode)===`rate-limited`&&(t.summaryBillingDomainId?r.add(ve(t.id,t.summaryBillingDomainId)):n.add(t.id));for(let e of t.billingDomains)e.health&&_e(e.health.errorCode)===`rate-limited`&&r.add(ve(t.id,e.id))}let i=e.providers.flatMap(e=>{let t=n.has(e.id)||(e.summaryBillingDomainId?r.has(ve(e.id,e.summaryBillingDomainId)):!1),i=[...ye(`provider:${e.id}`,e.freshness.status,t)];t||i.push(...be(`provider:${e.id}`,e.health.errorCode));let a=e.billingDomains.flatMap(t=>{let i=t.freshness??e.freshness,a=t.health??e.health,o=n.has(e.id)||r.has(ve(e.id,t.id))||_e(a.errorCode)===`rate-limited`;return[...ye(`domain:${e.id}:${t.id}`,i.status,o),...o?[]:be(`domain:${e.id}:${t.id}`,a.errorCode)]});return[...i,...a]}),a=(t?.connectors??[]).filter(e=>e.category!==null&&me.has(e.category)&&!n.has(e.providerId)&&!(e.billingDomainId&&r.has(ve(e.providerId,e.billingDomainId)))).map(e=>`diagnostic:${e.id}:${e.billingDomainId??`provider`}:${e.category}`),o=[...new Set([...i,...a])].sort();return o.length>0?o.join(`|`):null}function Se(e){let t=null,n=null,r=!1;return{schedule(i,a,o){if(r)return;let s=xe(i,a);if(!s){n=null,t&&clearTimeout(t),t=null;return}if(!t){if(o){n=s;return}s!==n&&(n=s,t=setTimeout(()=>{t=null,!r&&e()},0))}},dispose(){r=!0,t&&clearTimeout(t),t=null}}}var Ce={en:{eyebrow:`LOCAL USAGE CENTER`,title:`Agent Usage`,bannerAlt:`Agent Usage — one local view for quota, tokens, and equivalent API cost`,metaDescription:`A private local dashboard for coding-agent quota, token, and cost usage.`,subtitle:`Quota, tokens, and freshness in one private local view.`,mainViews:`Main views`,agentUsageTab:`Agent usage`,tokenModelCostsTab:`Tokens & model costs`,refresh:`Refresh`,refreshing:`Refreshing…`,settings:`Settings`,closeSettings:`Close settings`,settingsSubtitle:`Connections, automation, diagnostics, and local data controls.`,themeSystem:`System`,themeLight:`Light`,themeDark:`Dark`,themeToggleAria:`Toggle color theme (system, light, dark)`,reviewInSettings:`Review in settings`,connectorsUnavailable:`Connection settings are unavailable.`,monitoringUnavailable:`Monitoring settings are unavailable.`,diagnosticsUnavailable:`Diagnostics are unavailable.`,retentionUnavailable:`Retention data is unavailable.`,privacyActionUnavailable:`The local data action could not be completed.`,refreshUnavailable:`Refresh failed. Existing usage is still shown.`,loading:`Loading provider usage…`,loadingAgentUsage:`Loading cached agent usage…`,loadingModelCosts:`Loading cached token and model cost data…`,updating:`Updating`,updatingModelCosts:`Updating token and model cost calculations in the background. Cached results remain available.`,error:`Usage data could not be loaded.`,updatedNow:`Updated just now`,updated:`Updated`,unavailable:`Never updated`,quota:`Quota windows`,noQuotaWindow:`No quota window`,noQuotaWindowDetail:`This Provider meters each request instead of an allowance. Its Tokens and API retail equivalent are in Tokens & model costs.`,noQuotaReported:`No quota window reported yet. Only the official client states this allowance; Tokens and cost stay complete without it.`,quotaTimelineTitle:`Quota timeline`,quotaTimelineCurrentRange:`current`,quotaTimelineWeekly:`Weekly`,quotaTimelineFiveHour:`5 hour`,quotaTimelinePrevious:`Previous period`,quotaTimelineNext:`Next period`,quotaTimelineToday:`Today`,quotaTimelineModes:`Quota timeline range`,quotaTimelineElapsed:`Elapsed window`,quotaTimelineCurrent:`Current window`,quotaTimelineUpcoming:`Upcoming window`,quotaTimelineEmpty:`No provider reports a five-hour quota window.`,quotaTimelineData:`Quota timeline data`,quotaTimelineAccount:`Account / billing domain`,tokens:`Tokens`,total:`Total`,input:`Input`,output:`Output`,reasoning:`Reasoning`,cacheRead:`Cache read`,cacheWrite:`Cache write`,classified:`Classified`,unclassified:`Unclassified`,semantics:`Semantics`,includedInOutput:`Included in output`,includedInInput:`Included in input`,separateCategory:`Separate`,precisionHour:`Hour`,precisionDay:`Day`,aggregationTemporality:`Aggregation`,temporalityDelta:`Delta`,temporalityCumulative:`Cumulative`,temporalityUnknown:`Unknown`,used:`used`,resets:`Resets`,source:`Source`,scope:`Scope`,plan:`Plan`,accountWide:`Account-wide`,localOnly:`This Mac only`,limit:`Limit`,fallback:`Use balance`,unknown:`Unknown`,noProviders:`No providers have reported usage yet.`,providersLabel:`Providers`,billingDomainTabs:`billing domains`,connections:`Connections`,connectionsSubtitle:`Discover local clients, review access, and connect each provider independently.`,connect:`Connect`,skip:`Skip`,retry:`Retry`,experimental:`Experimental`,stable:`Stable`,officialClient:`Official client`,managedSecret:`Agent Usage Keychain`,noCredential:`No credential required`,installed:`Installed`,notInstalled:`Not installed`,notChecked:`Not checked`,discovered:`Ready to connect`,connected:`Connected`,manageConnection:`Manage connection`,connectionSetup:`Connection setup`,skipped:`Skipped`,connectionError:`Discovery failed`,coverageLabel:`Expected coverage`,managementKey:`Management API key`,replaceCredential:`Replace credential`,tokenBreakdown:`Token breakdown`,billing:`Billing`,actualCost:`Actual cost`,prepaid:`Prepaid balance`,spendingLimit:`Spending limit`,currentInvoice:`Current invoice`,invoices:`Invoices`,history:`History`,recordedTokens:`Recorded tokens`,unpricedTokens:`unpriced Tokens`,latestData:`Latest observed data`,generatedAt:`Summary generated`,noObservations:`No token observations in this window`,notAvailable:`Unavailable`,domainContributions:`Token contributions by billing domain`,separateFromHeadline:`Separate domain · not included in headline`,headlineShareNotApplicable:`Not applicable to headline`,topModels:`Top models`,topDays:`Top days`,nativeAmount:`Native`,comparison:`Comparison`,rateUnavailable:`Rate unavailable`,unknownAmount:`Unknown amount`,priceVersion:`Price version`,exchangeRate:`Exchange rate`,tokenMoneyWorkbench:`Tokens & model costs`,workbenchSubtitle:`Token consumption and API-equivalent cost by model for the selected time range.`,usage:`Usage`,usageOverview:`Usage overview`,providerShare:`Provider share`,providerShareSubtitle:`Distribution within the selected headline metric`,cost:`Cost`,model:`Model`,breakdown:`Breakdown`,breakdownView:`Breakdown view`,list:`List`,treemap:`Treemap`,trendStacked:`Stacked trend`,modelTrendStacked:`Stacked model trend`,usageTotals:`Totals`,costTrend:`Cost over time`,tokenTrend:`Tokens over time`,displayCurrency:`Display currency`,trendMetric:`Trend metric`,recordedTokenTrend:`Recorded Token trend`,retailEquivalentTrend:`API retail equivalent trend`,trendData:`Trend data`,trendSummary:`Selected window and Provider series, including gaps and time precision`,timeAxisControls:`Time axis controls`,zoomInTimeAxis:`Zoom in time axis`,zoomOutTimeAxis:`Zoom out time axis`,resetTimeAxis:`Reset time axis`,interactiveTrend:`Interactive usage trend`,usageWallHeading:`{tokens} recorded Tokens in the last year`,usageWallEmptyDay:`No usage on {date}`,usageWallUsedDay:`{tokens} recorded Tokens on {date}`,usageWallLess:`Less`,usageWallMore:`More`,usageWallWeekdayMon:`Mon`,usageWallWeekdayWed:`Wed`,usageWallWeekdayFri:`Fri`,usageWallLabel:`Usage in the last year`,usageWallUpdating:`Updating the last-year usage wall. Existing days remain visible.`,trendInteractionHint:`Scroll to zoom · drag to pan`,interval:`Interval`,gap:`Gap`,amountCoverage:`Amount coverage`,conversionEvidence:`Conversion evidence`,noConversionNeeded:`Native currency; no conversion required`,modelRankingSubtitle:`Known models stay separate by Provider and billing domain. Select a row to audit its evidence.`,modelBreakdownTreemap:`Model breakdown treemap`,treemapHint:`Block area shows the share of the selected metric. Click a block to audit a model.`,sortByTokens:`Sort by recorded Tokens`,sortByRetailEquivalent:`Sort by API retail equivalent`,tokenShare:`Token share`,costShare:`Cost share`,modelDetail:`Model detail`,closeModelDetail:`Close model detail`,activityOverview:`Activity overview`,observations:`Observations`,evidenceSummary:`Evidence summary`,auditDetails:`Audit details`,priceSnapshot:`Price snapshot`,ratePerMillion:`Rate / 1M`,derivationSourceReported:`Source-reported`,derivationReconciledRemainder:`Reconciled remainder`,derivationCategorized:`Categorized fields`,derivationLegacyTotal:`Legacy total`,recordedTotal:`Recorded total`,sourceReportedTotal:`Source-reported total`,totalDerivation:`Total derivation`,priceLineItems:`Price line items`,priceEffective:`Price effective`,modelTrend:`Model trend`,calculatedAt:`Calculated`,noPriceEvidence:`No eligible retail price evidence`,mostConstrained:`Most constrained`,recommendation:`Recommended agent`,remaining:`remaining`,predictedExhaustion:`Predicted exhaustion`,lastsUntilReset:`Expected to last until reset`,exhaustsBeforeReset:`Expected to exhaust before reset`,readOnlyAdvice:`Advice only · never switches agents`,highestSafeCapacity:`Highest safe capacity among fresh providers`,forecastSupports:`Forecast lasts through the next reset`,samples:`samples`,monitoring:`Monitoring`,backgroundCollection:`Collect every 5 minutes`,notifications:`Local notifications`,startAtLogin:`Start at login`,monitoringSubtitle:`Opt-in local controls; provider backoff is always respected.`,diagnostics:`Diagnostics`,diagnosticsNav:`Diagnostics`,diagnosticsSubtitle:`Connector and billing-domain health with actionable recovery.`,healthy:`Healthy`,providerDegraded:`Provider data is degraded`,providerRecovery:`Run doctor, check this provider connection, and refresh.`,coverageComplete:`Complete`,coveragePartial:`Partial`,coverageUnavailable:`Unavailable`,authorityOfficialAccount:`Official account`,authorityOfficialClient:`Official client`,authorityLocalObservation:`Local observation`,authorityEstimate:`Estimate`,authorityUnavailable:`Unavailable`,authorityMixed:`Mixed sources`,confidenceHigh:`High confidence`,confidenceMedium:`Medium confidence`,costActual:`Actual`,costSubscription:`Subscription`,costReportedEstimate:`Reported estimate`,costRetailEquivalent:`API retail equivalent`,costLegacyUnknown:`Legacy purpose unknown`,enabled:`Enabled`,disabled:`Disabled`,onboardingEyebrow:`ONBOARDING`,automationEyebrow:`LOCAL AUTOMATION`,healthEyebrow:`LOCAL HEALTH`,privacyEyebrow:`LOCAL PRIVACY`,codexPermission:`Read quota and usage through the installed official Codex client.`,claudePermission:`Read opt-in telemetry and usage exposed by the official Claude client.`,openCodePermission:`Read account quota and local exports through official OpenCode surfaces.`,grokPermission:`Read opt-in Grok Build telemetry and official client billing capability.`,xaiPermission:`Store a dedicated management key for official xAI billing data.`,dshPermission:`Read local dsh session logs for token history. No credential file is opened.`,diagnosticMissingBinary:`Missing binary`,diagnosticNotConfigured:`Not configured`,diagnosticUnauthorized:`Unauthorized`,diagnosticUnsupported:`Unsupported`,diagnosticSchemaMismatch:`Schema mismatch`,diagnosticRateLimited:`Rate limited`,diagnosticTimeout:`Timeout`,diagnosticStale:`Automatic refresh pending`,diagnosticUnavailable:`Unavailable`,recoveryMissingBinary:`Install the official client, then retry discovery.`,recoveryNotConfigured:`Connect this provider in onboarding, then refresh.`,recoveryUnauthorized:`Sign in again or replace the credential, then refresh.`,recoveryUnsupported:`Upgrade the official client or disable this unsupported capability.`,recoverySchemaMismatch:`Upgrade Agent Usage or the official client, then retry.`,recoveryRateLimited:`Wait for the provider backoff, then retry.`,recoveryTimeout:`Check the client process and network, then retry.`,recoveryStale:`Agent Usage will retry this connector automatically.`,recoveryUnavailable:`Run doctor, check the connector, and retry refresh.`,customRates:`Custom model rates`,customRatesSubtitle:`Configure per-million token rates for custom endpoint models. Custom rates take precedence over the built-in catalog and automatically backfill unpriced history.`,customRatesUnavailable:`Custom model rates are unavailable.`,customRateProvider:`Provider`,customRateDomain:`Billing domain`,customRateDomainWildcard:`All routes (wildcard)`,customRateModel:`Model`,customRateInput:`Input ($/M)`,customRateOutput:`Output ($/M)`,customRateCacheRead:`Cache read ($/M)`,customRateAdd:`Add custom rate`,customRateAddToggle:`+ Add Rate`,customRateSave:`Save rate`,customRateEdit:`Edit`,customRateCancel:`Cancel`,customRateUpdating:`Saving…`,customRateDelete:`Delete`,customRateDeleting:`Deleting…`,customRateRefresh:`Refresh`,customRateRefreshTitle:`Refresh custom rates`,customRateProviderOther:`Other provider…`,customRateProviderCustomPlaceholder:`Enter provider ID`,customRateDeleteConfirm:`Delete this rate?`,customRateUpdated:`Updated`,setCustomRateForModel:`Set custom rate`,customRatesNav:`Rates`,customRateEmpty:`No custom model rates configured.`,privacy:`Privacy & data`,privacySubtitle:`Exports omit account identifiers and secrets. Raw data stays local.`,retentionDays:`day raw retention`,rawObservations:`raw observations`,dailyAggregates:`daily aggregates`,exportJson:`Export JSON`,exportCsv:`Export CSV`,includeAccountIdentifiers:`Include available account identifiers`,deleteProductSecrets:`Also delete product Keychain entries`,clearData:`Clear local usage`,clearing:`Clearing…`,clearConfirmation:`Clear all local usage history? Official-client credentials are preserved.`,hardRebuild:`Hard rebuild all data`,hardRebuilding:`Hard rebuild running…`,hardRebuildWarning:`High-cost operation: ignores scan and pricing caches. It can take a long time, but the dashboard remains usable.`,hardRebuildConfirmation:`Hard rebuild all local usage and cost data? This ignores caches, is resource-intensive, and may take a long time.`},"zh-CN":{eyebrow:`本地用量中心`,title:`Agent Usage`,bannerAlt:`Agent Usage——在一个本地视图中查看额度、Token 和 API 对等费用`,metaDescription:`在本地私密查看编程 Agent 的额度、Token 和费用用量。`,subtitle:`在一个私密的本地视图中查看额度、Token 与数据新鲜度。`,mainViews:`主要视图`,agentUsageTab:`Agent 用量`,tokenModelCostsTab:`Token 与模型费用`,refresh:`刷新`,refreshing:`刷新中…`,settings:`设置`,closeSettings:`关闭设置`,settingsSubtitle:`连接、自动化、诊断与本地数据控制。`,themeSystem:`跟随系统`,themeLight:`浅色`,themeDark:`深色`,themeToggleAria:`切换颜色主题(跟随系统、浅色、深色)`,reviewInSettings:`在设置中查看`,connectorsUnavailable:`连接设置暂不可用。`,monitoringUnavailable:`监控设置暂不可用。`,diagnosticsUnavailable:`诊断信息暂不可用。`,retentionUnavailable:`保留策略数据暂不可用。`,privacyActionUnavailable:`无法完成本地数据操作。`,refreshUnavailable:`刷新失败,继续显示已有用量。`,loading:`正在加载 provider 用量…`,loadingAgentUsage:`正在加载已缓存的 Agent 用量…`,loadingModelCosts:`正在加载已缓存的 Token 与模型费用…`,updating:`更新中`,updatingModelCosts:`正在后台更新 Token 与模型费用,已缓存的结果仍可查看。`,error:`无法加载用量数据。`,updatedNow:`刚刚更新`,updated:`更新于`,unavailable:`从未更新`,quota:`额度窗口`,noQuotaWindow:`没有额度窗口`,noQuotaWindowDetail:`该 Provider 按请求计量,没有额度。Token 与 API 对等零售价见「Token 与模型费用」。`,noQuotaReported:`暂未获取到额度窗口。只有官方客户端会给出该额度;即使拿不到,Token 与费用依然完整。`,quotaTimelineTitle:`额度时序`,quotaTimelineCurrentRange:`当前`,quotaTimelineWeekly:`按周`,quotaTimelineFiveHour:`5 小时`,quotaTimelinePrevious:`上一周期`,quotaTimelineNext:`下一周期`,quotaTimelineToday:`今天`,quotaTimelineModes:`额度时序范围`,quotaTimelineElapsed:`已结束窗口`,quotaTimelineCurrent:`当前窗口`,quotaTimelineUpcoming:`后续窗口`,quotaTimelineEmpty:`当前没有 Provider 提供 5 小时额度窗口。`,quotaTimelineData:`额度时序数据`,quotaTimelineAccount:`账户 / 计费域`,tokens:`Token`,total:`总计`,input:`输入`,output:`输出`,reasoning:`推理`,cacheRead:`缓存读取`,cacheWrite:`缓存写入`,classified:`已分类`,unclassified:`未分类`,semantics:`Token 语义`,includedInOutput:`包含在输出中`,includedInInput:`包含在输入中`,separateCategory:`独立计算`,precisionHour:`小时级`,precisionDay:`日级`,aggregationTemporality:`聚合方式`,temporalityDelta:`增量`,temporalityCumulative:`累计`,temporalityUnknown:`未知`,used:`已使用`,resets:`刷新于`,source:`来源`,scope:`范围`,plan:`计划`,accountWide:`账户全局`,localOnly:`仅此 Mac`,limit:`额度`,fallback:`超额使用余额`,unknown:`未知`,noProviders:`尚无 provider 上报用量。`,providersLabel:`Provider`,billingDomainTabs:`计费域`,connections:`连接`,connectionsSubtitle:`发现本地客户端、检查访问权限,并独立连接每个 provider。`,connect:`连接`,skip:`跳过`,retry:`重试`,experimental:`实验性`,stable:`稳定`,officialClient:`官方客户端`,managedSecret:`Agent Usage 钥匙串`,noCredential:`无需凭据`,installed:`已安装`,notInstalled:`未安装`,notChecked:`尚未检查`,discovered:`可以连接`,connected:`已连接`,manageConnection:`管理连接`,connectionSetup:`连接设置`,skipped:`已跳过`,connectionError:`发现失败`,coverageLabel:`预期覆盖`,managementKey:`Management API 密钥`,replaceCredential:`替换凭据`,tokenBreakdown:`Token 分类明细`,billing:`计费`,actualCost:`实际费用`,prepaid:`预付余额`,spendingLimit:`消费上限`,currentInvoice:`当前账单`,invoices:`历史账单`,history:`历史`,recordedTokens:`已记录 Token`,unpricedTokens:`未定价 Token`,latestData:`最新观测数据`,generatedAt:`摘要生成时间`,noObservations:`当前时间范围内没有 Token 观测`,notAvailable:`不可用`,domainContributions:`按计费域划分的 Token 贡献`,separateFromHeadline:`独立计费域 · 不计入摘要总量`,headlineShareNotApplicable:`不适用于摘要占比`,topModels:`模型排行`,topDays:`日期排行`,nativeAmount:`原币`,comparison:`对比币种`,rateUnavailable:`汇率不可用`,unknownAmount:`金额未知`,priceVersion:`价格版本`,exchangeRate:`汇率`,tokenMoneyWorkbench:`Token 与模型费用`,workbenchSubtitle:`按所选时间范围查看各模型的 Token 消耗与 API 对等费用。`,usage:`用量`,usageOverview:`用量总览`,providerShare:`Provider 占比`,providerShareSubtitle:`按当前摘要指标展示所选范围内的分布`,cost:`费用`,model:`模型`,breakdown:`明细`,breakdownView:`明细视图`,list:`列表`,treemap:`矩形树图`,trendStacked:`趋势堆叠`,modelTrendStacked:`模型趋势堆叠图`,usageTotals:`汇总`,costTrend:`费用趋势`,tokenTrend:`Token 趋势`,displayCurrency:`显示币种`,trendMetric:`趋势指标`,recordedTokenTrend:`已记录 Token 趋势`,retailEquivalentTrend:`API 等价零售价趋势`,trendData:`趋势数据`,trendSummary:`选中时间范围与 Provider 序列,包含数据缺口和时间精度`,timeAxisControls:`时间轴控制`,zoomInTimeAxis:`放大时间轴`,zoomOutTimeAxis:`缩小时间轴`,resetTimeAxis:`重置时间轴`,interactiveTrend:`交互式用量趋势`,usageWallHeading:`过去一年 {tokens} 已记录 Token`,usageWallEmptyDay:`{date}无用量`,usageWallUsedDay:`{date} {tokens} 已记录 Token`,usageWallLess:`少`,usageWallMore:`多`,usageWallWeekdayMon:`一`,usageWallWeekdayWed:`三`,usageWallWeekdayFri:`五`,usageWallLabel:`过去一年用量`,usageWallUpdating:`正在更新过去一年用量墙,已有日期仍保持可见。`,trendInteractionHint:`滚轮缩放 · 拖拽平移`,interval:`区间`,gap:`数据缺口`,amountCoverage:`金额覆盖率`,conversionEvidence:`换算证据`,noConversionNeeded:`原币显示,无需换算`,modelRankingSubtitle:`已知模型按 Provider 与计费域分开;选择一行可审计完整证据。`,modelBreakdownTreemap:`模型明细矩形树图`,treemapHint:`色块面积表示所选指标的占比。点击色块可查看该模型的详情。`,sortByTokens:`按已记录 Token 排序`,sortByRetailEquivalent:`按 API 等价零售价排序`,tokenShare:`Token 占比`,costShare:`费用占比`,modelDetail:`模型详情`,closeModelDetail:`关闭模型详情`,activityOverview:`活动概览`,observations:`观测次数`,evidenceSummary:`证据摘要`,auditDetails:`审计详情`,priceSnapshot:`价格快照`,ratePerMillion:`每百万 Token 单价`,derivationSourceReported:`来源报告`,derivationReconciledRemainder:`对账余量`,derivationCategorized:`分类字段汇总`,derivationLegacyTotal:`旧版总量`,recordedTotal:`已记录总量`,sourceReportedTotal:`来源报告总量`,totalDerivation:`总量推导`,priceLineItems:`价格行项目`,priceEffective:`价格生效`,modelTrend:`模型趋势`,calculatedAt:`计算时间`,noPriceEvidence:`没有符合条件的零售价格证据`,mostConstrained:`最紧张额度`,recommendation:`推荐使用`,remaining:`剩余`,predictedExhaustion:`预计耗尽`,lastsUntilReset:`预计可坚持到刷新`,exhaustsBeforeReset:`预计会在刷新前耗尽`,readOnlyAdvice:`仅提供建议 · 永不自动切换 agent`,highestSafeCapacity:`新鲜数据中安全余量最高`,forecastSupports:`预测可坚持到下一次刷新`,samples:`个样本`,monitoring:`持续监控`,backgroundCollection:`每 5 分钟采集`,notifications:`本机通知`,startAtLogin:`登录时启动`,monitoringSubtitle:`本地显式控制;始终遵守 provider 退避。`,diagnostics:`诊断与恢复`,diagnosticsNav:`系统诊断`,diagnosticsSubtitle:`连接器与计费域健康状态,以及可执行的恢复建议。`,healthy:`健康`,providerDegraded:`Provider 数据已降级`,providerRecovery:`运行 doctor、检查该 provider 连接,然后刷新。`,coverageComplete:`完整`,coveragePartial:`部分`,coverageUnavailable:`不可用`,authorityOfficialAccount:`官方账户`,authorityOfficialClient:`官方客户端`,authorityLocalObservation:`本机观测`,authorityEstimate:`估算`,authorityUnavailable:`不可用`,authorityMixed:`混合来源`,confidenceHigh:`高置信度`,confidenceMedium:`中等置信度`,costActual:`实际费用`,costSubscription:`订阅费用`,costReportedEstimate:`来源报告估算`,costRetailEquivalent:`API 等价零售价`,costLegacyUnknown:`旧数据用途未知`,enabled:`已启用`,disabled:`已停用`,onboardingEyebrow:`连接引导`,automationEyebrow:`本地自动化`,healthEyebrow:`本地健康状态`,privacyEyebrow:`本地隐私`,codexPermission:`通过已安装的官方 Codex 客户端读取额度与用量。`,claudePermission:`读取用户主动开启的 telemetry 与官方 Claude 客户端提供的用量。`,openCodePermission:`通过 OpenCode 官方入口读取账户额度与本机导出。`,grokPermission:`读取用户主动开启的 Grok Build telemetry 与官方客户端计费能力。`,xaiPermission:`保存独立 Management key,用于读取官方 xAI 计费数据。`,dshPermission:`读取本机 dsh 会话日志中的 Token 历史,不会打开任何凭据文件。`,diagnosticMissingBinary:`缺少客户端`,diagnosticNotConfigured:`尚未配置`,diagnosticUnauthorized:`授权失效`,diagnosticUnsupported:`能力不支持`,diagnosticSchemaMismatch:`数据格式不兼容`,diagnosticRateLimited:`请求受限`,diagnosticTimeout:`请求超时`,diagnosticStale:`等待自动刷新`,diagnosticUnavailable:`不可用`,recoveryMissingBinary:`安装官方客户端,然后重新发现。`,recoveryNotConfigured:`在连接引导中连接该 provider,然后刷新。`,recoveryUnauthorized:`重新登录或替换凭据,然后刷新。`,recoveryUnsupported:`升级官方客户端,或停用当前不支持的能力。`,recoverySchemaMismatch:`升级 Agent Usage 或官方客户端,然后重试。`,recoveryRateLimited:`等待 provider 退避结束,然后重试。`,recoveryTimeout:`检查客户端进程与网络,然后重试。`,recoveryStale:`Agent Usage 将自动重试该连接。`,recoveryUnavailable:`运行 doctor、检查 connector,然后重试刷新。`,customRates:`自定义模型费率`,customRatesSubtitle:`为自定义端点模型设置每百万 Token 单价(美元)。自定义费率优先于官方目录,并自动重新计算历史未定价会话。`,customRatesUnavailable:`自定义模型费率不可用。`,customRateProvider:`Provider`,customRateDomain:`计费域 / 路由`,customRateDomainWildcard:`全部路由(通配)`,customRateModel:`模型名称`,customRateInput:`输入单价 ($/M)`,customRateOutput:`输出单价 ($/M)`,customRateCacheRead:`缓存读单价 ($/M)`,customRateAdd:`添加自定义费率`,customRateAddToggle:`+ 添加费率`,customRateSave:`保存费率`,customRateEdit:`编辑`,customRateCancel:`取消`,customRateUpdating:`保存中…`,customRateDelete:`删除`,customRateDeleting:`删除中…`,customRateRefresh:`刷新`,customRateRefreshTitle:`刷新自定义费率`,customRateProviderOther:`其他 Provider…`,customRateProviderCustomPlaceholder:`输入 Provider ID`,customRateDeleteConfirm:`确定删除此费率?`,customRateUpdated:`更新于`,setCustomRateForModel:`设置自定义费率`,customRatesNav:`自定义费率`,customRateEmpty:`暂未配置任何自定义模型费率。`,privacy:`隐私与数据`,privacySubtitle:`导出会移除账户标识与密钥;原始数据只保存在本机。`,retentionDays:`天原始数据保留期`,rawObservations:`条原始记录`,dailyAggregates:`条每日聚合`,exportJson:`导出 JSON`,exportCsv:`导出 CSV`,includeAccountIdentifiers:`导出可得的账户标识`,deleteProductSecrets:`同时删除产品 Keychain 条目`,clearData:`清除本地用量`,clearing:`清除中…`,clearConfirmation:`清除全部本地用量历史?官方客户端凭据会保留。`,hardRebuild:`硬重算全部数据`,hardRebuilding:`硬重算进行中…`,hardRebuildWarning:`高代价操作:忽略扫描与定价缓存,可能等待很久,但不会阻塞页面使用。`,hardRebuildConfirmation:`确定硬重算全部本地用量与费用数据吗?该操作会忽略缓存、消耗较多资源,并且可能需要等待很长时间。`}};function we(e){return e.toLowerCase().startsWith(`zh`)?`zh-CN`:`en`}function Te(e,t){return Ce[e][t]}var Ee=`agent-usage:theme-changed`,De=`agent-usage:theme`,Oe=`(prefers-color-scheme: dark)`;function ke(){if(typeof window>`u`)return`system`;try{let e=window.localStorage.getItem(De);return e===`light`||e===`dark`||e===`system`?e:`system`}catch{return`system`}}function Ae(){if(typeof window>`u`)return!1;try{return window.matchMedia(Oe).matches}catch{return!1}}function je(e){return e===`light`||e===`dark`?e:Ae()?`dark`:`light`}var Me=z(ke()),Ne=z(`light`),Pe=Me,Fe=Ne,Ie=ke(),Le=!1;function Re(e){if(typeof window>`u`)return;let t=window.document.documentElement;t.dataset.theme=e;try{t.style.colorScheme=e}catch{}}function ze(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(Ee,{detail:{theme:e}}))}function Be(){let e=je(Ie);Me.set(Ie),Ne.set(e),Re(e)}function Ve(){Le||typeof window>`u`||(Le=!0,window.matchMedia(Oe).addEventListener(`change`,()=>{if(Ie!==`system`)return;let e=je(`system`);Ne.set(e),Re(e),ze(e)}))}function He(){Ie=ke(),Be(),Ve()}function Ue(e){if(Ie=e,typeof window<`u`)try{window.localStorage.setItem(De,e)}catch{}Be(),ze(je(e))}var We=function(e,t){return We=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},We(e,t)};function H(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);We(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ge=`12px sans-serif`,Ke=20,qe=100,Je=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Ye(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Ke)/qe}return t}var Xe=Ye(Je),Ze={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Ze.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=Xe[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},Qe=xt([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),$e=xt([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),et=Object.prototype.toString,tt=Array.prototype,nt=tt.forEach,rt=tt.filter,it=tt.slice,at=tt.map,ot=function(){}.constructor,st=ot?ot.prototype:null,ct=`__proto__`,lt=2311,ut=2**53-1;function dt(){return lt>=ut&&(lt=0),lt++}function ft(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function pt(e){if(typeof e!=`object`||!e)return e;var t=e,n=et.call(e);if(n===`[object Array]`){if(!Wt(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=pt(e[r])}}else if($e[n]){if(!Wt(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Qe[n]&&!Wt(e)&&!Mt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==ct&&(t[o]=pt(e[o]));return t}function mt(e,t,n){if(!At(t)||!At(e))return n?pt(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==ct){var i=e[r],a=t[r];At(a)&&At(i)&&!K(a)&&!K(i)&&!Mt(a)&&!Mt(i)&&!jt(a)&&!jt(i)&&!Wt(a)&&!Wt(i)?mt(i,a,n):(n||!(r in e))&&(e[r]=pt(t[r]))}return e}function U(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==ct&&(e[n]=t[n]);return e}function ht(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function gt(e,t,n){for(var r=wt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}Ze.createCanvas;function _t(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function vt(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function yt(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else gt(e,t,n)}function bt(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function W(e,t,n){if(e&&t){if(e.forEach&&e.forEach===nt)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function G(e,t,n){if(!e)return[];if(!t)return Rt(e);if(e.map&&e.map===at)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function xt(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function St(e,t,n){if(!e)return[];if(!t)return Rt(e);if(e.filter&&e.filter===rt)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Ct(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function wt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function Tt(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(it.call(arguments)))}}var Et=st&&q(st.bind)?st.call.bind(st.bind):Tt;function Dt(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(it.call(arguments)))}}function K(e){return Array.isArray?Array.isArray(e):et.call(e)===`[object Array]`}function q(e){return typeof e==`function`}function J(e){return typeof e==`string`}function Ot(e){return et.call(e)===`[object String]`}function kt(e){return typeof e==`number`}function At(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function jt(e){return!!Qe[et.call(e)]}function Y(e){return!!$e[et.call(e)]}function Mt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Nt(e){return e.colorStops!=null}function Pt(e){return e.image!=null}function Ft(e){return e!==e}function It(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function X(e,t){return e??t}function Lt(e,t,n){return e??t??n}function Rt(e){var t=[...arguments].slice(1);return it.apply(e,t)}function zt(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function Bt(e,t){if(!e)throw Error(t)}function Vt(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Ht=`__ec_primitive__`;function Ut(e){e[Ht]=!0}function Wt(e){return e[Ht]}var Gt=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return wt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Kt=typeof Map==`function`;function qt(){return Kt?new Map:new Gt}var Jt=function(){function e(t){var n=K(t);this.data=qt();var r=this;t instanceof e?t.each(i):t&&W(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Kt?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Yt(e){return new Jt(e)}function Xt(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Zt(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&U(n,t),n}function Qt(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function Z(e,t){return e.hasOwnProperty(t)}function $t(){}var en=180/Math.PI,tn=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),nn=new(function(){function e(){this.browser=new tn,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(nn.wxa=!0,nn.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?nn.worker=!0:!nn.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(nn.node=!0,nn.svgSupported=!0):rn(navigator.userAgent,nn);function rn(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var an=`.`,on=`___EC__COMPONENT__CONTAINER___`,sn=`___EC__EXTENDED_CLASS___`;function cn(e){var t={main:``,sub:``};if(e){var n=e.split(an);t.main=n[0]||``,t.sub=n[1]||``}return t}function ln(e){Bt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function un(e){return!!(e&&e[sn])}function dn(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return fn(t)?n=function(e){H(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},vt(n,this)),U(n.prototype,e),n[sn]=!0,n.extend=this.extend,n.superCall=gn,n.superApply=_n,n.superClass=t,n}}function fn(e){return q(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function pn(e,t){e.extend=t.extend}var mn=Math.round(Math.random()*10);function hn(e){var t=[`__\0is_clz`,mn++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function gn(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function _n(e,t,n){return this.superClass.prototype[t].apply(e,n)}function vn(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){ln(r),e.prototype.type=r;var i=cn(r);if(!i.sub)t[i.main]=e;else if(i.sub!==on){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[on]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=cn(e),r=[],i=t[n.main];return i&&i[on]?W(i,function(e,t){t!==on&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[cn(e).main]},e.getAllClassMainTypes=function(){var e=[];return W(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[cn(e).main];return n&&n[on]};function n(e){var n=t[e.main];return(!n||!n[on])&&(n=t[e.main]={},n[on]=!0),n}}function yn(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&_t(r,s)>=0||i&&_t(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var bn=yn([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),xn=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return bn(this,e,t)},e}(),Sn=function(){function e(e){this.value=e}return e}(),Cn=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Sn(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),wn=function(){function e(e){this._list=new Cn,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Sn(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Tn=new wn(50);function En(e){if(typeof e==`string`){var t=Tn.get(e);return t&&t.image}return e}function Dn(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Tn.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!kn(t)&&a.pending.push(o)):(t=Ze.loadImage(e,On,On),t.__zrImageSrc=e,Tn.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function On(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function kn(e){return e&&e.width&&e.height}function An(){return[1,0,0,1,0,0]}function jn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Mn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Nn(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Pn(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Fn(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function In(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Ln(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Rn(e,t){return e??=0,t??=0,[e,t]}function zn(e,t){return e[0]=t[0],e[1]=t[1],e}function Bn(e){return[e[0],e[1]]}function Vn(e,t,n){return e[0]=t,e[1]=n,e}function Hn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Un(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Wn(e){return Math.sqrt(Gn(e))}function Gn(e){return e[0]*e[0]+e[1]*e[1]}function Kn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function qn(e,t){var n=Wn(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Jn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Yn=Jn;function Xn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Zn=Xn;function Qn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function $n(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function er(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function tr(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var nr=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),rr=Math.min,ir=Math.max,ar=Math.abs,or=[`x`,`y`],sr=[`width`,`height`],cr=new nr,lr=new nr,ur=new nr,dr=new nr,fr=Dr(),pr=fr.minTv,mr=fr.maxTv,hr=[0,0],gr=function(){function e(e,t,n,r){vr(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=rr(e.x,this.x),n=rr(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?ir(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?ir(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return br(An(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&nr.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=vr(Cr,t.x,t.y,t.width,t.height)),n instanceof e||(n=vr(wr,n.x,n.y,n.width,n.height));var s=!!r;fr.reset(i,s);var c=fr.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(hr[0]=1/0,hr[1]=0,Er(l,u,p,m,0,s,a,o),Er(d,f,h,g,1,s,a,o),s&&nr.copy(r,_?fr.useDir?fr.dirMinTv:pr:mr)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){yr(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&yr(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}cr.x=ur.x=t.x,cr.y=dr.y=t.y,lr.x=dr.x=t.x+t.width,lr.y=ur.y=t.y+t.height,cr.transform(n),dr.transform(n),lr.transform(n),ur.transform(n),e.x=rr(cr.x,lr.x,ur.x,dr.x),e.y=rr(cr.y,lr.y,ur.y,dr.y);var s=ir(cr.x,lr.x,ur.x,dr.x),c=ir(cr.y,lr.y,ur.y,dr.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=jn(e||[]),Pn(e,e,Vn(Tr,-t.x,-t.y)),In(e,e,Vn(Tr,r,i)),Pn(e,e,Vn(Tr,n.x,n.y)),e},e}(),_r=gr.create,vr=gr.set,yr=gr.copy,br=gr.calculateTransform,xr=gr.applyTransform,Sr=gr.contain,Cr=new gr(0,0,0,0),wr=new gr(0,0,0,0),Tr=[];function Er(e,t,n,r,i,a,o,s){var c=ar(t-n),l=ar(r-e),u=rr(c,l),d=or[i],f=or[1-i],p=sr[i];t<n||r<e?c<l?(a&&(mr[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(mr[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=ir(e,n),o[p]=rr(t,r)-o[d]),a&&(u<hr[0]||fr.useDir)&&(hr[0]=rr(u,hr[0]),(c<l||!fr.bidirectional)&&(pr[d]=c,pr[f]=0,fr.useDir&&fr.calcDirMTV()),(c>=l||!fr.bidirectional)&&(pr[d]=-l,pr[f]=0,fr.useDir&&fr.calcDirMTV())))}function Dr(){var e=0,t=new nr,n=new nr,r={minTv:new nr,maxTv:new nr,useDir:!1,dirMinTv:new nr,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=ir(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return ar(e)<1e-10}return r}function Or(e){kr||=new wn(100),e||=`12px sans-serif`;var t=kr.get(e);return t||(t={font:e,strWidthCache:new wn(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ze.measureText(`国`,e).width,asciiCharWidth:Ze.measureText(`a`,e).width},kr.put(e,t)),t}var kr;function Ar(e){if(!(jr>=Mr)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Ze.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?jr=Mr:i>2&&jr++,t}}var jr=0,Mr=5;function Nr(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Ar(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Pr(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Ze.measureText(t,e.font).width,n.put(t,r)),r}function Fr(e,t,n,r){var i=Pr(Or(t),e),a=zr(t);return new gr(Lr(0,i,n),Rr(0,a,r),i,a)}function Ir(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
|
+
`);if(i.length===1)return Fr(i[0],t,n,r);for(var a=new gr(0,0,0,0),o=0;o<i.length;o++){var s=Fr(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Lr(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Rr(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function zr(e){return Or(e).stWideCharWidth}function Br(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Vr(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Br(r[0],n.width),l+=Br(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Hr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Ur(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
3
|
+
`);a=Wr(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Gr(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
|
+
`),e.isTruncated=s}function Wr(e,t,n,r){r||={};var i=U({},r);n=X(n,`...`),i.maxIterations=X(r.maxIterations,2);var a=i.minChar=X(r.minChar,0),o=i.fontMeasureInfo=Or(t),s=o.asciiCharWidth;i.placeholder=X(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=Pr(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Gr(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=Pr(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Kr(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=Pr(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Kr(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Nr(n,e.charCodeAt(i));return i}function qr(e,t,n,r){var i=oi(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=zr(l),f=X(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?ni(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
5
|
+
`):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Wr(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Gr(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=Or(l),S=0;S<_.length;S++)w=Math.max(Pr(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Jr=function(){function e(){}return e}(),Yr=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Xr=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Zr(e,t,n,r,i){var a=new Xr,o=oi(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Hr.lastIndex=0,h;(h=Hr.exec(o))!=null;){var g=h.index;g>m&&Qr(a,o.substring(m,g),t,p),Qr(a,h[2],t,p,h[1]),m=Hr.lastIndex}m<o.length&&Qr(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,M=j?j[1]+j[3]:0,ee=k.font=A.font||t.font;k.contentHeight=zr(ee);var N=X(A.height,k.contentHeight);if(k.innerHeight=N,j&&(N+=j[0]+j[2]),k.height=N,k.lineHeight=Lt(A.lineHeight,t.lineHeight,N),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var P=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<P;break outer}var F=A.width,I=F==null||F===`auto`;if(typeof F==`string`&&F.charAt(F.length-1)===`%`)k.percentWidth=F,_.push(k),k.contentWidth=Pr(Or(ee),k.text);else{if(I){var L=A.backgroundColor,R=L&&L.image;R&&(R=En(R),kn(R)&&(k.width=Math.max(k.width,R.width*N/R.height)))}var z=b&&u!=null?u-D:null;z!=null&&z<k.width?!I||z<M?(k.text=``,k.width=k.contentWidth=0):(Ur(S,k.text,z-M,ee,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=Pr(Or(ee),k.text)):k.contentWidth=Pr(Or(ee),k.text)}k.width+=M,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=X(u,y),a.outerHeight=a.height=X(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],te=k.percentWidth;k.width=parseInt(te,10)/100*a.width}return a}function Qr(e,t,n,r,i){var a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){var f=o.padding,p=f?f[1]+f[3]:0;if(o.width!=null&&o.width!==`auto`){var m=Br(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
6
|
+
`),l=!0),r.accumWidth=m}else{var h=ni(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(`
|
|
7
|
+
`);for(var g=Or(c),_=0;_<u.length;_++){var v=u[_],y=new Jr;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:Pr(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new Yr)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new Yr([y]))}}function $r(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var ei=xt(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function ti(e){return!$r(e)||!!ei[e]}function ni(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=Or(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
|
|
8
|
+
`){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}var m=Nr(d,p.charCodeAt(0)),h=!r&&!ti(p);if(a.length?u+m>n:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function ri(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;gr.set(ii,Lr(n,o,i),Rr(r,s,a),o,s),gr.intersect(t,ii,null,ai);var c=ai.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=Lr(c.x,c.width,i,!0),e.baseY=Rr(c.y,c.height,a,!0)}}var ii=new gr(0,0,0,0),ai={outIntersectRect:{},clamp:!0};function oi(e){return e==null?e=``:e+=``}function si(e){var t=oi(e.text),n=e.font;return ci(e,Pr(Or(n),t),zr(n),null)}function ci(e,t,n,r){var i=new gr(Lr(e.x||0,t,e.textAlign),Rr(e.y||0,n,e.textBaseline),t,n),a=r??(li(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function li(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var ui=jn,di=5e-5;function fi(e){return e>di||e<-di}var pi=[],mi=[],hi=An(),gi=Math.abs,_i=function(){function e(){}return e.prototype.getLocalTransform=function(e){return vi(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return fi(this.rotation)||fi(this.x)||fi(this.y)||fi(this.scaleX-1)||fi(this.scaleY-1)||fi(this.skewX)||fi(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(ui(n),this.invTransform=null);return}n||=An(),t?this.getLocalTransform(n):ui(n),e&&(t?Nn(n,e,n):Mn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||An(),Ln(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(pi);var n=pi[0]<0?-1:1,r=pi[1]<0?-1:1,i=((pi[0]-n)*t+n)/pi[0]||0,a=((pi[1]-r)*t+r)/pi[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||An(),Nn(mi,e.invTransform,t),t=mi);var n=this.originX,r=this.originY;(n||r)&&(hi[4]=n,hi[5]=r,Nn(mi,t,hi),mi[4]-=n,mi[5]-=r,t=mi),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&$n(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&$n(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&gi(e[0]-1)>1e-10&&gi(e[3]-1)>1e-10?Math.sqrt(gi(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){xi(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Fn(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),vi=_i.getLocalTransform;function yi(){return new _i}var bi=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function xi(e,t){return ht(e,t,bi)}var Si={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Si.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Si.bounceIn(e*2)*.5:Si.bounceOut(e*2-1)*.5+.5}},Ci=Math.pow,wi=Math.sqrt,Ti=1e-8,Ei=1e-4,Di=wi(3),Oi=1/3,ki=Rn(),Ai=Rn(),ji=Rn();function Mi(e){return e>-Ti&&e<Ti}function Ni(e){return e>Ti||e<-Ti}function Pi(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Fi(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Ii(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Mi(u)&&Mi(d)){if(Mi(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(Mi(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=wi(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Ci(-y,Oi):Ci(y,Oi),b=b<0?-Ci(-b,Oi):Ci(b,Oi);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*wi(u*u*u)),S=Math.acos(x)/3,C=wi(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Di*Math.sin(S)))/(3*o),T=(-s+C*(w-Di*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Li(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Mi(o)){if(Ni(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Mi(u))i[0]=-a/(2*o);else if(u>0){var d=wi(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Ri(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function zi(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ki[0]=c,ki[1]=l;for(var v=0;v<1;v+=.05)Ai[0]=Pi(e,n,i,o,v),Ai[1]=Pi(t,r,a,s,v),g=Zn(ki,Ai),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Ei);y++)m=d-f,h=d+f,Ai[0]=Pi(e,n,i,o,m),Ai[1]=Pi(t,r,a,s,m),g=Zn(Ai,ki),m>=0&&g<p?(d=m,p=g):(ji[0]=Pi(e,n,i,o,h),ji[1]=Pi(t,r,a,s,h),_=Zn(ji,ki),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Pi(e,n,i,o,d),u[1]=Pi(t,r,a,s,d)),wi(p)}function Bi(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Pi(e,n,i,o,m),g=Pi(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Vi(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Hi(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Ui(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Mi(a)){if(Ni(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Mi(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=wi(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Wi(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Gi(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Ki(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ki[0]=o,ki[1]=s;for(var f=0;f<1;f+=.05){Ai[0]=Vi(e,n,i,f),Ai[1]=Vi(t,r,a,f);var p=Zn(ki,Ai);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Ei);m++){var h=l-u,g=l+u;Ai[0]=Vi(e,n,i,h),Ai[1]=Vi(t,r,a,h);var p=Zn(Ai,ki);if(h>=0&&p<d)l=h,d=p;else{ji[0]=Vi(e,n,i,g),ji[1]=Vi(t,r,a,g);var _=Zn(ji,ki);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Vi(e,n,i,l),c[1]=Vi(t,r,a,l)),wi(d)}function qi(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=Vi(e,n,i,f),m=Vi(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Ji=/cubic-bezier\(([0-9,\.e ]+)\)/;function Yi(e){var t=e&&Ji.exec(e);if(t){var n=t[1].split(`,`),r=+Vt(n[0]),i=+Vt(n[1]),a=+Vt(n[2]),o=+Vt(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:Ii(0,r,a,1,e,s)&&Pi(0,i,o,1,s[0])}}}var Xi=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||$t,this.ondestroy=e.ondestroy||$t,this.onrestart=e.onrestart||$t,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=q(e)?e:Si[e]||Yi(e)},e}(),Zi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Qi(e){return e=Math.round(e),e<0?0:e>255?255:e}function $i(e){return e=Math.round(e),e<0?0:e>360?360:e}function ea(e){return e<0?0:e>1?1:e}function ta(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Qi(parseFloat(t)/100*255):Qi(parseInt(t,10))}function na(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ea(parseFloat(t)/100):ea(parseFloat(t))}function ra(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ia(e,t,n){return e+(t-e)*n}function aa(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function oa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var sa=new wn(20),ca=null;function la(e,t){ca&&oa(ca,t),ca=sa.put(e,ca||t.slice())}function ua(e,t){if(e){t||=[];var n=sa.get(e);if(n)return oa(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Zi)return oa(t,Zi[r]),la(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){aa(t,0,0,0,1);return}return aa(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),la(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){aa(t,0,0,0,1);return}return aa(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),la(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?aa(t,+l[0],+l[1],+l[2],1):aa(t,0,0,0,1);u=na(l.pop());case`rgb`:if(l.length>=3)return aa(t,ta(l[0]),ta(l[1]),ta(l[2]),l.length===3?u:na(l[3])),la(e,t),t;aa(t,0,0,0,1);return;case`hsla`:if(l.length!==4){aa(t,0,0,0,1);return}return l[3]=na(l[3]),da(l,t),la(e,t),t;case`hsl`:if(l.length!==3){aa(t,0,0,0,1);return}return da(l,t),la(e,t),t;default:return}}aa(t,0,0,0,1)}}function da(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=na(e[1]),i=na(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],aa(t,Qi(ra(o,a,n+1/3)*255),Qi(ra(o,a,n)*255),Qi(ra(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function fa(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function pa(e,t){var n=ua(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return va(n,n.length===4?`rgba`:`rgb`)}}function ma(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Qi(ia(o[0],s[0],c)),n[1]=Qi(ia(o[1],s[1],c)),n[2]=Qi(ia(o[2],s[2],c)),n[3]=ea(ia(o[3],s[3],c)),n}}function ha(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=ua(t[i]),s=ua(t[a]),c=r-i,l=va([Qi(ia(o[0],s[0],c)),Qi(ia(o[1],s[1],c)),Qi(ia(o[2],s[2],c)),ea(ia(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function ga(e,t,n,r){var i=ua(e);if(e)return i=fa(i),t!=null&&(i[0]=$i(q(t)?t(i[0]):t)),n!=null&&(i[1]=na(q(n)?n(i[1]):n)),r!=null&&(i[2]=na(q(r)?r(i[2]):r)),va(da(i),`rgba`)}function _a(e,t){var n=ua(e);if(n&&t!=null)return n[3]=ea(t),va(n,`rgba`)}function va(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ya(e,t){var n=ua(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ba=new wn(100);function xa(e){if(J(e)){var t=ba.get(e);return t||(t=pa(e,-.1),ba.put(e,t)),t}if(Nt(e)){var n=U({},e);return n.colorStops=G(e.colorStops,function(e){return{offset:e.offset,color:pa(e.color,-.1)}}),n}return e}function Sa(e){return e.type===`linear`}function Ca(e){return e.type===`radial`}(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var wa=Array.prototype.slice;function Ta(e,t,n){return(t-e)*n+e}function Ea(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Ta(t[a],n[a],r);return e}function Da(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Ta(t[o][s],n[o][s],r)}return e}function Oa(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function ka(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function Aa(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function ja(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:wa.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function Ma(e){if(bt(e)){var t=e.length;if(bt(e[0])){for(var n=[],r=0;r<t;r++)n.push(wa.call(e[r]));return n}return wa.call(e)}return e}function Na(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Pa(e){return bt(e&&e[0])?2:1}var Fa=0,Ia=1,La=2,Ra=3,za=4,Ba=5,Va=6;function Ha(e){return e===za||e===Ba}function Ua(e){return e===Ia||e===La}var Wa=[0,0,0,0],Ga=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Va,s=t;if(bt(t)){var c=Pa(t);o=c,(c===1&&!kt(t[0])||c===2&&!kt(t[0][0]))&&(a=!0)}else if(kt(t)&&!Ft(t))o=Fa;else if(J(t)){if(!isNaN(+t))o=Fa;else{var l=ua(t);l&&(s=l,o=Ra)}}else if(Nt(t)){var u=U({},s);u.colorStops=G(t.colorStops,function(e){return{offset:e.offset,color:ua(e.color)}}),Sa(t)?o=za:Ca(t)&&(o=Ba),s=u}i===0?this.valType=o:(o!==this.valType||o===Va)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=q(n)?n:Si[n]||Yi(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Ua(r),c=Ha(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?ja(d,f,r):c&&Aa(d.colorStops,f.colorStops))}if(!o&&r!==Ba&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Fa?n[l].additiveValue=n[l].value-p:r===Ra?n[l].additiveValue=Oa([],n[l].value,p,-1):Ua(r)&&(n[l].additiveValue=r===Ia?Oa([],n[l].value,p,-1):ka([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Ra,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Wa:e[s];if((Ua(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ua(i))i===Ia?Ea(g,f[r],p[r],h):Da(g,f[r],p[r],h);else if(Ha(i)){var _=f[r],v=p[r],y=i===za;e[s]={type:y?`linear`:`radial`,x:Ta(_.x,v.x,h),y:Ta(_.y,v.y,h),colorStops:G(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ta(e.offset,n.offset,h),color:Na(Ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ta(_.x2,v.x2,h),e[s].y2=Ta(_.y2,v.y2,h)):e[s].r=Ta(_.r,v.r,h)}else if(c)Ea(g,f[r],p[r],h),n||(e[s]=Na(g));else{var b=Ta(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Fa?e[n]=e[n]+r:t===Ra?(ua(e[n],Wa),Oa(Wa,Wa,r,1),e[n]=Na(Wa)):t===Ia?Oa(e[n],e[n],r,1):t===La&&ka(e[n],e[n],r,1)},e}(),Ka=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){ft(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,wt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Ga(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Ra&&c&&(c=Na(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Ma(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ma(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new Xi({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return G(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Ma(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=wt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),qa=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Ja=1;nn.hasGlobalWindow&&(Ja=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ya=Ja,Xa=.4,Za=`#333`,Qa=`#ccc`,$a=`#eee`,eo=`__zr_normal__`,to=bi.concat([`ignore`]),no=xt(bi,function(e,t){return e[t]=!0,e},{ignore:!1}),ro={},io=new gr(0,0,0,0),ao=[],oo=function(){function e(e){this.id=dt(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=io,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(ro,n,d):Vr(ro,n,d),i.x=ro.x,i.y=ro.y,a=ro.align,o=ro.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=Br(f[0],d.width),m=Br(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new gr(0,0,0,0);i.getLocalTransform(ao),Ln(ao,ao),gr.copy(_,d),_.applyTransform(ao)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Qa:Za},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&ua(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,va(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},U(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(At(e))for(var n=wt(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,to)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(eo,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===eo;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(_t(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){ft(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ho(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,_o(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=ho(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,_o(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=_t(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=_t(r,e),a=_t(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];U(t,i),i.textConfig&&(n||={},U(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=U({},r?this.textConfig:n.textConfig),U(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<to.length;l++){var u=to[l],d=i&&no[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new _i,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},U(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new Ka(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=_t(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){so(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){so(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=so(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();yt(oo,qa),yt(oo,_i);function so(e,t,n,r,i){n||={};var a=[];mo(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function co(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function lo(e){return bt(e[0])}function uo(e,t,n){if(bt(t[n])){if(bt(e[n])||(e[n]=[]),Y(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),co(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(lo(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?co(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else co(a,i,o);a.length=i.length}}else e[n]=t[n]}function fo(e,t){return e===t||bt(e)&&bt(t)&&po(e,t)}function po(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function mo(e,t,n,r,i,a,o,s){for(var c=wt(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!At(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(At(v)&&!bt(v)&&!Nt(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}mo(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=_t(m,x);m.splice(S,1)}}if(i.force||(h=St(h,function(e){return!fo(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=Ma(n[_]),uo(n,r,_)}}var x=new Ka(n,!1,!1,d?St(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function ho(e,t,n,r){return!(n&&n.hoverLayer||r)||go(e)||t&&go(t)?0:1}function go(e){return e.type===`text`||e.type===`tspan`}function _o(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var vo=`__zr_style_`+Math.round(Math.random()*10),yo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},bo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};yo[vo]=!0;var xo=[`z`,`z2`,`invisible`],So=[`invisible`],Co=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=wt(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Eo(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||=new gr(0,0,0,0),t?gr.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=i*2+Math.abs(a),e.height+=i*2+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+s*2),e.height=Math.ceil(e.height+1+s*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new gr(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate(`style`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:U(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Zt(yo,e)},t.prototype.useStyle=function(e){e[vo]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[vo]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,xo)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l){if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=wt(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=wt(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l)}if(!c)for(var h=this.__inHover?So:xo,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return U(e,t),e},t.prototype.getAnimationStyleProps=function(){return bo},t.initDefaultProps=(function(){var e=t.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),t}(oo),wo=new gr(0,0,0,0),To=new gr(0,0,0,0);function Eo(e,t,n){return wo.copy(e.getBoundingRect()),e.transform&&wo.applyTransform(e.transform),To.width=t,To.height=n,!wo.intersect(To)}var Do=Math.min,Oo=Math.max,ko=Math.sin,Ao=Math.cos,jo=Math.PI*2,Mo=Rn(),No=Rn(),Po=Rn();function Fo(e,t,n,r,i,a){i[0]=Do(e,n),i[1]=Do(t,r),a[0]=Oo(e,n),a[1]=Oo(t,r)}var Io=[],Lo=[];function Ro(e,t,n,r,i,a,o,s,c,l){var u=Li,d=Pi,f=u(e,n,i,o,Io);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var p=0;p<f;p++){var m=d(e,n,i,o,Io[p]);c[0]=Do(m,c[0]),l[0]=Oo(m,l[0])}f=u(t,r,a,s,Lo);for(var p=0;p<f;p++){var h=d(t,r,a,s,Lo[p]);c[1]=Do(h,c[1]),l[1]=Oo(h,l[1])}c[0]=Do(e,c[0]),l[0]=Oo(e,l[0]),c[0]=Do(o,c[0]),l[0]=Oo(o,l[0]),c[1]=Do(t,c[1]),l[1]=Oo(t,l[1]),c[1]=Do(s,c[1]),l[1]=Oo(s,l[1])}function zo(e,t,n,r,i,a,o,s){var c=Wi,l=Vi,u=Oo(Do(c(e,n,i),1),0),d=Oo(Do(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Do(e,i,f),o[1]=Do(t,a,p),s[0]=Oo(e,i,f),s[1]=Oo(t,a,p)}function Bo(e,t,n,r,i,a,o,s,c){var l=er,u=tr,d=Math.abs(i-a);if(d%jo<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Mo[0]=Ao(i)*n+e,Mo[1]=ko(i)*r+t,No[0]=Ao(a)*n+e,No[1]=ko(a)*r+t,l(s,Mo,No),u(c,Mo,No),i%=jo,i<0&&(i+=jo),a%=jo,a<0&&(a+=jo),i>a&&!o?a+=jo:i<a&&o&&(i+=jo),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Po[0]=Ao(p)*n+e,Po[1]=ko(p)*r+t,l(s,Po,s),u(c,Po,c))}var Vo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ho=[],Uo=[],Wo=[],Go=[],Ko=[],qo=[],Jo=Math.min,Yo=Math.max,Xo=Math.cos,Zo=Math.sin,Qo=Math.abs,$o=Math.PI,es=$o*2,ts=typeof Float32Array<`u`,ns=[];function rs(e){return Math.round(e/$o*1e8)/1e8%2*$o}function is(e,t){var n=rs(e[0]);n<0&&(n+=es);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=es?i=n+es:t&&n-i>=es?i=n-es:!t&&n>i?i=n+(es-rs(n-i)):t&&n<i&&(i=n-(es-rs(i-n))),e[0]=n,e[1]=i}var as=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=Qo(n/Ya/e)||0,this._uy=Qo(n/Ya/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Vo.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Qo(e-this._xi),r=Qo(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Vo.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Vo.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Vo.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),ns[0]=r,ns[1]=i,is(ns,a),r=ns[0],i=ns[1];var o=i-r;return this.addData(Vo.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Xo(i)*n+e,this._yi=Zo(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Vo.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Vo.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&ts&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(ts&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,ts&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Wo[0]=Wo[1]=Ko[0]=Ko[1]=Number.MAX_VALUE,Go[0]=Go[1]=qo[0]=qo[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;a<this._len;){var o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case Vo.M:t=r=e[a++],n=i=e[a++],Ko[0]=r,Ko[1]=i,qo[0]=r,qo[1]=i;break;case Vo.L:Fo(t,n,e[a],e[a+1],Ko,qo),t=e[a++],n=e[a++];break;case Vo.C:Ro(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Ko,qo),t=e[a++],n=e[a++];break;case Vo.Q:zo(t,n,e[a++],e[a++],e[a],e[a+1],Ko,qo),t=e[a++],n=e[a++];break;case Vo.A:var c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++],p=e[a++]+f;a+=1;var m=!e[a++];s&&(r=Xo(f)*u+c,i=Zo(f)*d+l),Bo(c,l,u,d,f,p,m,Ko,qo),t=Xo(p)*u+c,n=Zo(p)*d+l;break;case Vo.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Fo(r,i,r+h,i+g,Ko,qo);break;case Vo.Z:t=r,n=i}er(Wo,Wo,Ko),tr(Go,Go,qo)}return a===0&&(Wo[0]=Wo[1]=Go[0]=Go[1]=0),new gr(Wo[0],Wo[1],Go[0]-Wo[0],Go[1]-Wo[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||=[];for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case Vo.M:i=o=e[d++],a=s=e[d++];break;case Vo.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(Qo(_)>n||Qo(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Vo.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Bi(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Vo.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=qi(i,a,y,b,h,g,10),i=h,a=g;break;case Vo.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Xo(D)*T+C,s=Zo(D)*E+w),m=Yo(T,E)*Jo(es,Math.abs(O)),i=Xo(k)*T+C,a=Zo(k)*E+w;break;case Vo.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Vo.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==Vo.L&&v>0&&(e.lineTo(y,b),v=0),S){case Vo.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Vo.L:u=n[x++],d=n[x++];var w=Qo(u-c),T=Qo(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Vo.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],ee=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Ri(c,k,j,ee,D,Ho),Ri(l,A,M,N,D,Uo),e.bezierCurveTo(Ho[1],Uo[1],Ho[2],Uo[2],Ho[3],Uo[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,ee,N),c=ee,l=N;break;case Vo.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Gi(c,k,j,D,Ho),Gi(l,A,M,D,Uo),e.quadraticCurveTo(Ho[1],Uo[1],Ho[2],Uo[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Vo.A:var P=n[x++],F=n[x++],I=n[x++],L=n[x++],R=n[x++],z=n[x++],te=n[x++],ne=!n[x++],B=I>L?I:L,V=Qo(I-L)>.001,re=R+z,ie=!1;if(f){var E=p[g++];h+E>_&&(re=R+z*(_-h)/E,ie=!0),h+=E}if(V&&e.ellipse?e.ellipse(P,F,I,L,te,R,re,ne):e.arc(P,F,B,R,re,ne),ie)break lo;C&&(o=Xo(R)*I+P,s=Zo(R)*L+F),c=Xo(re)*I+P,l=Zo(re)*L+F;break;case Vo.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var ae=n[x++],oe=n[x++];if(f){var E=p[g++];if(h+E>_){var se=_-h;e.moveTo(u,d),e.lineTo(u+Jo(se,ae),d),se-=ae,se>0&&e.lineTo(u+ae,d+Jo(se,oe)),se-=oe,se>0&&e.lineTo(u+Yo(ae-se,0),d+oe),se-=ae,se>0&&e.lineTo(u,d+Yo(oe-se,0));break lo}h+=E}e.rect(u,d,ae,oe);break;case Vo.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Vo,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function os(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e!==n)c=(t-r)/(e-n),l=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=s/2;var u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}function ss(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;var d=c;return u>t+d&&u>r+d&&u>a+d&&u>s+d||u<t-d&&u<r-d&&u<a-d&&u<s-d||l>e+d&&l>n+d&&l>i+d&&l>o+d||l<e-d&&l<n-d&&l<i-d&&l<o-d?!1:zi(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function cs(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;return c>t+l&&c>r+l&&c>a+l||c<t-l&&c<r-l&&c<a-l||s>e+l&&s>n+l&&s>i+l||s<e-l&&s<n-l&&s<i-l?!1:Ki(e,t,n,r,i,a,s,c,null)<=l/2}var ls=Math.PI*2;function us(e){return e%=ls,e<0&&(e+=ls),e}var ds=Math.PI*2;function fs(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;s-=e,c-=t;var u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%ds<1e-4)return!0;if(a){var d=r;r=us(i),i=us(d)}else r=us(r),i=us(i);r>i&&(i+=ds);var f=Math.atan2(c,s);return f<0&&(f+=ds),f>=r&&f<=i||f+ds>=r&&f+ds<=i}function ps(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);var c=o*(n-e)+e;return c===i?1/0:c>i?s:0}var ms=as.CMD,hs=Math.PI*2,gs=1e-4;function _s(e,t){return Math.abs(e-t)<gs}var vs=[-1,-1,-1],ys=[-1,-1];function bs(){var e=ys[0];ys[0]=ys[1],ys[1]=e}function xs(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l<t&&l<r&&l<a&&l<s)return 0;var u=Ii(t,r,a,s,l,vs);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=vs[h],_=g===0||g===1?.5:1;Pi(e,n,i,o,g)<c||(f<0&&(f=Li(t,r,a,s,ys),ys[1]<ys[0]&&f>1&&bs(),p=Pi(t,r,a,s,ys[0]),f>1&&(m=Pi(t,r,a,s,ys[1]))),f===2?g<ys[0]?d+=p<t?_:-_:g<ys[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<ys[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function Ss(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var c=Ui(t,r,a,s,vs);if(c===0)return 0;var l=Wi(t,r,a);if(l>=0&&l<=1){for(var u=0,d=Vi(t,r,a,l),f=0;f<c;f++){var p=vs[f]===0||vs[f]===1?.5:1,m=Vi(e,n,i,vs[f]);m<o||(vs[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=vs[0]===0||vs[0]===1?.5:1,m=Vi(e,n,i,vs[0]);return m<o?0:a<t?p:-p}function Cs(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);vs[0]=-c,vs[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=hs-1e-4){r=0,i=hs;var u=a?1:-1;return o>=vs[0]+e&&o<=vs[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=hs,i+=hs);for(var f=0,p=0;p<2;p++){var m=vs[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=hs+h),(h>=r&&h<=i||h+hs>=r&&h+hs<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function ws(e,t,n,r,i){for(var a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p,m=0;m<o;){var h=a[m++],g=m===1;switch(h===ms.M&&m>1&&(n||(s+=ps(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ms.M:u=a[m++],d=a[m++],c=u,l=d;break;case ms.L:if(n){if(os(c,l,a[m],a[m+1],t,r,i))return!0}else s+=ps(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ms.C:if(n){if(ss(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=xs(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ms.Q:if(n){if(cs(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Ss(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ms.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=ps(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(fs(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Cs(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ms.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(os(u,d,f,d,t,r,i)||os(f,d,f,p,t,r,i)||os(f,p,u,p,t,r,i)||os(u,p,u,d,t,r,i))return!0}else s+=ps(f,d,f,p,r,i),s+=ps(u,p,u,d,r,i);break;case ms.Z:if(n){if(os(c,l,u,d,t,r,i))return!0}else s+=ps(c,l,u,d,r,i);c=u,l=d}}return!n&&!_s(l,d)&&(s+=ps(c,l,u,d,r,i)||0),s!==0}function Ts(e,t,n){return ws(e,0,!1,t,n)}function Es(e,t,n,r){return ws(e,t,!0,n,r)}var Ds=gt({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},yo),Os={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bo.style)},ks=bi.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),As=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<ks.length;++s)i[ks[s]]=this[ks[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=wt(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];a===`style`?this.style?U(this.style,o):this.useStyle(o):a===`shape`?U(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(J(e)){var t=ya(e,0);return t>.5?Za:t>.2?$a:Qa}if(e)return Qa}return Za},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(J(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ya(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new as(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Es(a,o/s,e,t)))return!0}if(this.hasFill())return Ts(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:U(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Zt(Ds,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=U({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=U({},r.shape),U(c,n.shape)):(c=U({},i?this.shape:r.shape),U(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=U({},this.shape);for(var l={},u=wt(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return Os},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){H(n,t);function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return n.prototype.getDefaultStyle=function(){return pt(e.style)},n.prototype.getDefaultShape=function(){return pt(e.shape)},n}(t);for(var r in e)typeof e[r]==`function`&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(Co),js=gt({strokeFirst:!0,font:Ge,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Ds),Ms=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return li(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Zt(js,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=si(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(Co);Ms.prototype.type=`tspan`;var Ns=gt({x:0,y:0},yo),Ps={style:gt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},bo.style)};function Fs(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Is=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Zt(Ns,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=Fs(t.image)?t.image:this.__image;if(!r)return 0;var i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a},t.prototype.getWidth=function(){return this._getSize(`width`)},t.prototype.getHeight=function(){return this._getSize(`height`)},t.prototype.getAnimationStyleProps=function(){return Ps},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new gr(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(Co);Is.prototype.type=`image`;function Ls(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;var d;s+c>i&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Rs=Math.round;function zs(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Rs(r*2)===Rs(i*2)&&(e.x1=e.x2=Vs(r,s,!0)),Rs(a*2)===Rs(o*2)&&(e.y1=e.y2=Vs(a,s,!0)),e):e}}function Bs(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Vs(r,s,!0),e.y=Vs(i,s,!0),e.width=Math.max(Vs(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Vs(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Vs(e,t,n){if(!t)return e;var r=Rs(e*2);return(r+Rs(t))%2==0?r/2:(r+(n?1:-1))/2}var Hs=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Us={},Ws=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Hs},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Bs(Us,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Ls(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(As);Ws.prototype.type=`rect`;var Gs={fill:`#000`},Ks=2,qs={},Js={style:gt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},bo.style)},Ys=function(e){H(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Gs,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,nc(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new gr(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Gs},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return U(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=wt(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},U(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return Js},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return(!t||!(t instanceof e))&&(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;ri(qs,r.overflowRect,i,a,o,s),i=qs.baseX,a=qs.baseY;var c=qr(sc(e),e,qs.outerWidth,qs.outerHeight),l=cc(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=Rr(a,c.contentHeight,s);if(l||n){var _=Lr(i,f,o),v=Rr(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=oc(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=ac(`fill`in e?e.fill:(x=!0,r.fill)),C=ic(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=Ks,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Ms),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,ec(D,e),g+=m,E.setBoundingRect(ci(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;ri(qs,t.overflowRect,i,a,n,r),i=qs.baseX,a=qs.baseY;var o=Zr(sc(e),e,qs.outerWidth,qs.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=Lr(i,c,n),f=Rr(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;cc(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&cc(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=oc(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Ms),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ac(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=ic(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Ks,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Lt(s.opacity,t.opacity,1),ec(p,s),y&&(p.lineWidth=Lt(s.lineWidth,t.lineWidth,g),p.lineDash=X(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(ci(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Ws),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=X(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Is),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=X(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Lt(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return tc(e)&&(t=[e.fontStyle,e.fontWeight,$s(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Vt(t)||e.textFont||e.font},t}(Co),Xs={left:!0,right:1,center:1},Zs={top:1,bottom:1,middle:1},Qs=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function $s(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ec(e,t){for(var n=0;n<Qs.length;n++){var r=Qs[n],i=t[r];i!=null&&(e[r]=i)}}function tc(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function nc(e){return rc(e),W(e.rich,rc),e}function rc(e){if(e){e.font=Ys.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Xs[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Zs[n]?n:`top`,e.padding&&=zt(e.padding)}}function ic(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function ac(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function oc(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function sc(e){var t=e.text;return t!=null&&(t+=``),t}function cc(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var lc=1e-4,uc=20;function dc(e){return e.replace(/^\s+|\s+$/g,``)}var fc=Math.min,pc=Math.max,mc=Math.abs,hc=Math.round,gc=Math.floor,_c=Math.ceil,vc=Math.pow,yc=Math.log,bc=Math.LN10,xc=Math.PI,Sc=Math.random;function Cc(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var wc=Tc;function Tc(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Ec(e,t,n)}function Ec(e,t,n){return J(e)?Dc(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Dc(e){return!!dc(e).match(/%$/)}function Oc(e,t,n){return isNaN(t)?n?``+e:+e:(t=fc(pc(0,t),uc),e=(+e).toFixed(t),n?e:+e)}function kc(e){return e.sort(function(e,t){return e-t}),e}function Ac(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(hc(e*t)/t===e)return n}return jc(e)}function jc(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return pc(0,(a<0?0:i-1-a)-r)}function Mc(e,t,n){var r=mc(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=yc(2*mc(n||1)*mc(r))/bc,a=yc(mc(t))/bc,o=pc(0,_c(-i+a));return isFinite(o)||(o=NaN),o}function Nc(e,t){var n=xt(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=vc(10,t),i=G(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=G(i,function(e){return gc(e)}),s=xt(o,function(e,t){return e+t},0),c=G(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return G(o,function(e){return e/r})}function Pc(e,t){var n=pc(Ac(e),Ac(t)),r=e+t;return n>uc?r:Oc(r,n)}var Fc=vc(2,53)-1;function Ic(e){var t=xc*2;return(e%t+t)%t}function Lc(e){return e>-lc&&e<lc}var Rc=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function zc(e){if(e instanceof Date)return e;if(J(e)){var t=Rc.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(hc(e))}function Bc(e){return vc(10,Vc(e))}function Vc(e){if(e===0)return 0;var t=gc(yc(e)/bc);return e/vc(10,t)>=10&&t++,t}function Hc(e,t){var n=Vc(e),r=vc(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Oc(e,-n)}function Uc(e){var t=parseFloat(e);return t==e&&(t!==0||!J(e)||e.indexOf(`x`)<=0)?t:NaN}function Wc(e){return!isNaN(Uc(e))}function Gc(){return hc(Sc()*9)}function Kc(e,t){return t===0?e:Kc(t,e%t)}function qc(e,t){return e==null?t:t==null?e:e*t/Kc(e,t)}function Jc(e){return e!=null&&isFinite(e)}var Yc=`[ECharts] `,Xc={},Zc=typeof console<`u`&&console.warn&&console.log;function Qc(e,t,n){if(Zc){if(n){if(Xc[t])return;Xc[t]=!0}console[e](Yc+t)}}function $c(e,t){Qc(`error`,e,t)}function el(e){throw Error(e)}function tl(e,t,n){return(t-e)*n+e}var nl=`series\0`,rl=`\0_ec_\0`;function il(e){return e instanceof Array?e:e==null?[]:[e]}function al(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var ol=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function sl(e){return At(e)&&!K(e)&&!(e instanceof Date)?e.value:e}function cl(e){return At(e)&&!(e instanceof Array)}function ll(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=Yt();W(t,function(e,n){if(!At(e)){t[n]=null;return}});var s=ul(e,o,n);return(r||i)&&dl(s,e,o,t),r&&fl(s,t),r||i?pl(s,t,i):a&&ml(s,t),hl(s),s}function ul(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||bl(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function dl(e,t,n,r){W(r,function(i,a){if(!(!i||i.id==null)){var o=_l(i.id),s=n.get(o);if(s!=null){var c=e[s];Bt(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function fl(e,t){W(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!bl(n)&&!bl(a)&&gl(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function pl(e,t,n){W(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||bl(r.existing)||r.existing&&t.id!=null&&!gl(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function ml(e,t){W(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function hl(e){var t=Yt();W(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),W(e,function(e){var n=e.newOption;Bt(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),W(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(At(i)){if(a.name=i.name==null?r?r.name:nl+n:_l(i.name),r)a.id=_l(r.id);else if(i.id!=null)a.id=_l(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function gl(e,t,n){var r=vl(t[e],null),i=vl(n[e],null);return r!=null&&i!=null&&r===i}function _l(e){return vl(e,``)}function vl(e,t){return e==null?t:J(e)?e:kt(e)||Ot(e)?e+``:t}function yl(e){var t=e.name;return!!(t&&t.indexOf(nl))}function bl(e){return e&&e.id!=null&&_l(e.id).indexOf(rl)===0}function xl(e,t,n){W(e,function(e){var r=e.newOption;At(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Sl(t,r,e.existing,n))})}function Sl(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Cl(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return K(t.dataIndex)?G(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return K(t.name)?G(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function wl(){var e=`__ec_inner_`+Tl++;return function(t){return t[e]||(t[e]={})}}var Tl=Gc();function El(e,t,n){var r=Dl(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=kl(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Dl(e,t){var n;if(J(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Yt(),a={},o=!1;return W(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&_t(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Ol={useDefault:!0,enableAll:!1,enableNone:!1};function kl(e,t,n,r){r||=Ol;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Al(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function jl(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ml(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Nl(e){return e===`auto`?nn.domSupported?`html`:`richText`:e||`html`}function Pl(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(kt(r)){var o=tl(n||0,r,i);return Oc(o,a?Math.max(Ac(n||0),Ac(r)):t)}if(J(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=tl(p,m,i);s[d]=Oc(o,a?Math.max(Ac(p),Ac(m)):t)}}return s}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Fl(){return[1/0,-1/0]}function Il(e,t){Bl(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Ll(e,t){Bl(t)&&t<e[0]&&(e[0]=t)}function Rl(e,t){Bl(t)&&t>e[1]&&(e[1]=t)}function zl(e,t){Vl(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Bl(e){return e!=null&&isFinite(e)}function Vl(e,t){return Bl(e)&&Bl(t)&&e<=t}function Hl(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Ul(e){Vl(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Wl(){var e=`__ec_once_`+Gl++;return function(t,n){Z(t,e)||(t[e]=1,n())}}var Gl=Gc();function Kl(e,t,n){var r=Yt(),i=0;W(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function ql(e){return e.value+``}function Jl(e){return e+``}function Yl(e,t){return X(t,!0)?e.seriesIndex+2:0}function Xl(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Zl(e,t){return{seriesType:e,overallReset:t}}function Ql(e){return{overallReset:e}}var $l=wl(),eu=function(e,t,n,r){if(r){var i=$l(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=$l(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},tu=Yt([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),nu=`original`,ru=`arrayRows`,iu=`objectRows`,au=`keyedColumns`,ou=`typedArray`,su=`unknown`,cu=`column`,lu=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],uu=function(){function e(e){W(lu,function(t){this[t]=Et(e[t],e)},this)}return e}();function du(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var fu=1,pu={},mu=wl(),hu=wl(),gu=[`emphasis`,`blur`,`select`],_u=[`normal`,`emphasis`,`blur`,`select`],vu=`highlight`,yu=`downplay`,bu=`select`,xu=`unselect`,Su=`toggleSelect`,Cu=`selectchanged`;function wu(e){return e!=null&&e!==`none`}function Tu(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Eu(e){Tu(e,`emphasis`,2)}function Du(e){e.hoverState===2&&Tu(e,`normal`,0)}function Ou(e){Tu(e,`blur`,1)}function ku(e){e.hoverState===1&&Tu(e,`normal`,0)}function Au(e){e.selected=!0}function ju(e){e.selected=!1}function Mu(e,t,n){t(e,n)}function Nu(e,t,n){Mu(e,t,n),e.isGroup&&e.traverse(function(e){Mu(e,t,n)})}function Pu(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Fu(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o];a[s]=i[s]??(r&&r[s])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName===`style`&&c.saveTo(a,t)}return a}function Iu(e,t,n,r){var i=n&&_t(n,`select`)>=0,a=!1;if(e instanceof As){var o=mu(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(wu(s)||wu(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=U({},r),l=U({},l),l.fill=s):!wu(l.fill)&&wu(s)?(a=!0,r=U({},r),l=U({},l),l.fill=xa(s)):!wu(l.stroke)&&wu(c)&&(a||(r=U({},r),l=U({},l)),l.stroke=xa(c)),r.style=l}}if(r&&r.z2==null){a||(r=U({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Lu(e,t,n){if(n&&n.z2==null){n=U({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Ru(e,t,n){var r=_t(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Fu(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=U({},n),o=U({opacity:r?i:a.opacity*.1},o),n.style=o),n}function zu(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Iu(this,e,t,n);if(e===`blur`)return Ru(this,e,n);if(e===`select`)return Lu(this,e,n)}return n}function Bu(e){e.stateProxy=zu;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=zu),n&&(n.stateProxy=zu)}function Vu(e,t){!Yu(e,t)&&!e.__highByOuter&&Nu(e,Eu)}function Hu(e,t){!Yu(e,t)&&!e.__highByOuter&&Nu(e,Du)}function Uu(e,t){e.__highByOuter|=1<<(t||0),Nu(e,Eu)}function Wu(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Nu(e,Du)}function Gu(e){Nu(e,Ou)}function Ku(e){Nu(e,ku)}function qu(e){Nu(e,Au)}function Ju(e){Nu(e,ju)}function Yu(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Xu(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=hu(i),o=du(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){ku(e)}),s&&n.push(i)),a.isBlured=!1}),W(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Zu(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Ku(r)}}if(e!=null&&!(!t||t===`none`)){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var c=[];i.eachSeries(function(e){var i=o===e,l=e.coordinateSystem;if(l&&l.master&&(l=l.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(l&&s?l===s:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||Ou(e)}),bt(t))a(e.getData(),t);else if(At(t))for(var u=wt(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),hu(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)}})}}function Qu(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){hu(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){Ou(e)})}}}function $u(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=Cl(i,t);a=(K(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),c=0;!o&&c<s;)o=i.getItemGraphicEl(c++);if(o){var l=$l(o);Zu(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Zu(r,u,d,n)}}}function ed(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(n),c,l=0;l<s.length;l++)if($l(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function td(e,t,n){var r=$l(e),i=ed(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Qu(r.componentMainType,r.componentIndex,n),W(a,function(e){return Vu(e,t)})):(Zu(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Qu(r.componentMainType,r.componentIndex,n),Vu(e,t))}function nd(e,t,n){Xu(n);var r=$l(e),i=ed(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?W(i,function(e){return Hu(e,t)}):Hu(e,t)}function rd(e,t,n){if(gd(t)){var r=t.dataType,i=Cl(e.getData(r),t);K(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function id(e){W(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?qu(t):Ju(t)})})}function ad(e){var t=[];return e.eachSeries(function(e){W(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function od(e,t,n){pd(e,!0),Nu(e,Bu),ld(e,t,n)}function sd(e){pd(e,!1)}function cd(e,t,n,r){r?sd(e):od(e,t,n)}function ld(e,t,n){var r=$l(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var ud=[`emphasis`,`blur`,`select`],dd={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function fd(e,t,n,r){n||=`itemStyle`;for(var i=0;i<ud.length;i++){var a=ud[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[dd[n]]()}}function pd(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function md(e){return!!(e&&e.__highDownDispatcher)}function hd(e){var t=pu[e];return t==null&&fu<=32&&(t=pu[e]=fu++),t}function gd(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function _d(e){var t=e.type;return t===`highlight`||t===`downplay`}function vd(e){var t=mu(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var yd=as.CMD,bd=[[],[],[]],xd=Math.sqrt,Sd=Math.atan2;function Cd(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=yd.M,d=yd.C,f=yd.L,p=yd.R,m=yd.A,h=yd.Q;for(o=0,s=0;o<r;){switch(i=n[o++],s=o,a=0,i){case u:a=1;break;case f:a=1;break;case d:a=3;break;case h:a=2;break;case m:var g=t[4],_=t[5],v=xd(t[0]*t[0]+t[1]*t[1]),y=xd(t[2]*t[2]+t[3]*t[3]),b=Sd(-t[1]/y,t[0]/v);n[o]*=v,n[o++]+=g,n[o]*=y,n[o++]+=_,n[o++]*=v,n[o++]*=y,n[o++]+=b,n[o++]+=b,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],$n(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],$n(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=bd[c];x[0]=n[o++],x[1]=n[o++],$n(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var wd=Math.sqrt,Td=Math.sin,Ed=Math.cos,Dd=Math.PI;function Od(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function kd(e,t){return(e[0]*t[0]+e[1]*t[1])/(Od(e)*Od(t))}function Ad(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(kd(e,t))}function jd(e,t,n,r,i,a,o,s,c,l,u){var d=Dd/180*c,f=Ed(d)*(e-n)/2+Td(d)*(t-r)/2,p=-1*Td(d)*(e-n)/2+Ed(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=wd(m),s*=wd(m));var h=(i===a?-1:1)*wd((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Ed(d)*g-Td(d)*_,y=(t+r)/2+Td(d)*g+Ed(d)*_,b=Ad([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Ad(x,S);if(kd(x,S)<=-1&&(C=Dd),kd(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Dd*1e6)/1e6;C=Dd*2+w%2*Dd}u.addData(l,v,y,o,s,b,C,d,a)}var Md=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Nd=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Pd(e){var t=new as;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=as.CMD,c=e.match(Md);if(!c)return t;for(var l=0;l<c.length;l++){for(var u=c[l],d=u.charAt(0),f=void 0,p=u.match(Nd)||[],m=p.length,h=0;h<m;h++)p[h]=parseFloat(p[h]);for(var g=0;g<m;){var _=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=n,T=r,E=void 0,D=void 0;switch(d){case`l`:n+=p[g++],r+=p[g++],f=s.L,t.addData(f,n,r);break;case`L`:n=p[g++],r=p[g++],f=s.L,t.addData(f,n,r);break;case`m`:n+=p[g++],r+=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`l`;break;case`M`:n=p[g++],r=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`L`;break;case`h`:n+=p[g++],f=s.L,t.addData(f,n,r);break;case`H`:n=p[g++],f=s.L,t.addData(f,n,r);break;case`v`:r+=p[g++],f=s.L,t.addData(f,n,r);break;case`V`:r=p[g++],f=s.L,t.addData(f,n,r);break;case`C`:f=s.C,t.addData(f,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case`c`:f=s.C,t.addData(f,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case`S`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=p[g++],T=p[g++],n=p[g++],r=p[g++],t.addData(f,_,v,w,T,n,r);break;case`s`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=n+p[g++],T=r+p[g++],n+=p[g++],r+=p[g++],t.addData(f,_,v,w,T,n,r);break;case`Q`:w=p[g++],T=p[g++],n=p[g++],r=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`q`:w=p[g++]+n,T=p[g++]+r,n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`T`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n=p[g++],r=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`t`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`A`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n=p[g++],r=p[g++],f=s.A,jd(w,T,n,r,S,C,y,b,x,f,t);break;case`a`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n+=p[g++],r+=p[g++],f=s.A,jd(w,T,n,r,S,C,y,b,x,f,t)}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var Fd=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(As);function Id(e){return e.setData!=null}function Ld(e,t){var n=Pd(e),r=U({},t);return r.buildPath=function(e){var t=Id(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){Cd(n,e),this.dirtyShape()},r}function Rd(e,t){return new Fd(Ld(e,t))}function zd(e,t){var n=Ld(e,t);return function(e){H(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Fd)}function Bd(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new As(t);return o.createPathProxy(),o.buildPath=function(e){if(Id(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Vd=function(e){H(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=_t(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=_t(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new gr(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(gr.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(oo);Vd.prototype.type=`group`;var Hd=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Ud=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Hd},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(As);Ud.prototype.type=`circle`;var Wd=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Gd=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Wd},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,c=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-c,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-c,r+a,i),e.bezierCurveTo(r+a,i+c,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+c,r-a,i),e.closePath()},t}(As);Gd.prototype.type=`ellipse`;var Kd=Math.PI,qd=Kd*2,Jd=Math.sin,Yd=Math.cos,Xd=Math.acos,Zd=Math.atan2,Qd=Math.abs,$d=Math.sqrt,ef=Math.max,tf=Math.min,nf=1e-4;function rf(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<nf))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function af(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/$d(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*$d(ef(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function of(e){var t;if(K(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function sf(e,t){var n,r=ef(t.r,0),i=ef(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Qd(c-s),p=f>qd&&f%qd;if(p>nf&&(f=p),!(r>nf))e.moveTo(l,u);else if(f>qd-nf)e.moveTo(l+r*Yd(s),u+r*Jd(s)),e.arc(l,u,r,s,c,!d),i>nf&&(e.moveTo(l+i*Yd(c),u+i*Jd(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Yd(s),j=r*Jd(s),M=i*Yd(c),ee=i*Jd(c),N=f>nf;if(N){var P=t.cornerRadius;P&&(n=of(P),m=n[0],h=n[1],g=n[2],_=n[3]);var F=Qd(r-i)/2;if(v=tf(F,g),y=tf(F,_),b=tf(F,m),x=tf(F,h),w=S=ef(v,y),T=C=ef(b,x),(S>nf||C>nf)&&(E=r*Yd(c),D=r*Jd(c),O=i*Yd(s),k=i*Jd(s),f<Kd)){var I=rf(A,j,O,k,E,D,M,ee);if(I){var L=A-I[0],R=j-I[1],z=E-I[0],te=D-I[1],ne=1/Jd(Xd((L*z+R*te)/($d(L*L+R*R)*$d(z*z+te*te)))/2),B=$d(I[0]*I[0]+I[1]*I[1]);w=tf(S,(r-B)/(ne+1)),T=tf(C,(i-B)/(ne-1))}}}if(!N)e.moveTo(l+A,u+j);else if(w>nf){var V=tf(g,w),re=tf(_,w),ie=af(O,k,A,j,r,V,d),ae=af(E,D,M,ee,r,re,d);e.moveTo(l+ie.cx+ie.x0,u+ie.cy+ie.y0),w<S&&V===re?e.arc(l+ie.cx,u+ie.cy,w,Zd(ie.y0,ie.x0),Zd(ae.y0,ae.x0),!d):(V>0&&e.arc(l+ie.cx,u+ie.cy,V,Zd(ie.y0,ie.x0),Zd(ie.y1,ie.x1),!d),e.arc(l,u,r,Zd(ie.cy+ie.y1,ie.cx+ie.x1),Zd(ae.cy+ae.y1,ae.cx+ae.x1),!d),re>0&&e.arc(l+ae.cx,u+ae.cy,re,Zd(ae.y1,ae.x1),Zd(ae.y0,ae.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>nf)||!N)e.lineTo(l+M,u+ee);else if(T>nf){var V=tf(m,T),re=tf(h,T),ie=af(M,ee,E,D,i,-re,d),ae=af(A,j,O,k,i,-V,d);e.lineTo(l+ie.cx+ie.x0,u+ie.cy+ie.y0),T<C&&V===re?e.arc(l+ie.cx,u+ie.cy,T,Zd(ie.y0,ie.x0),Zd(ae.y0,ae.x0),!d):(re>0&&e.arc(l+ie.cx,u+ie.cy,re,Zd(ie.y0,ie.x0),Zd(ie.y1,ie.x1),!d),e.arc(l,u,i,Zd(ie.cy+ie.y1,ie.cx+ie.x1),Zd(ae.cy+ae.y1,ae.cx+ae.x1),d),V>0&&e.arc(l+ae.cx,u+ae.cy,V,Zd(ae.y1,ae.x1),Zd(ae.y0,ae.x0),!d))}else e.lineTo(l+M,u+ee),e.arc(l,u,i,c,s,d)}e.closePath()}}}var cf=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),lf=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new cf},t.prototype.buildPath=function(e,t){sf(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(As);lf.prototype.type=`sector`;var uf=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),df=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new uf},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(As);df.prototype.type=`ring`;function ff(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f<p;f++)er(u,u,e[f]),tr(d,d,e[f]);er(u,u,r[0]),tr(d,d,r[1])}for(var f=0,p=e.length;f<p;f++){var m=e[f];if(n)c=e[f?f-1:p-1],l=e[(f+1)%p];else if(f===0||f===p-1){i.push(Bn(e[f]));continue}else c=e[f-1],l=e[f+1];Un(a,l,c),Kn(a,a,t);var h=Jn(m,c),g=Jn(m,l),_=h+g;_!==0&&(h/=_,g/=_),Kn(o,a,-h),Kn(s,a,g);var v=Hn([],m,o),y=Hn([],m,s);r&&(tr(v,v,u),er(v,v,d),tr(y,y,u),er(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function pf(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=ff(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var mf=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),hf=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new mf},t.prototype.buildPath=function(e,t){pf(e,t,!0)},t}(As);hf.prototype.type=`polygon`;var gf=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),_f=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new gf},t.prototype.buildPath=function(e,t){pf(e,t,!1)},t}(As);_f.prototype.type=`polyline`;var vf={},yf=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),bf=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new yf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=zs(vf,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;s!==0&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(As);bf.prototype.type=`line`;var xf=[],Sf=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function Cf(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?Fi:Pi)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Fi:Pi)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Hi:Vi)(e.x1,e.cpx1,e.x2,t),(n?Hi:Vi)(e.y1,e.cpy1,e.y2,t)]}var wf=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Sf},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,c=t.cpx2,l=t.cpy2,u=t.percent;u!==0&&(e.moveTo(n,r),c==null||l==null?(u<1&&(Gi(n,o,i,u,xf),o=xf[1],i=xf[2],Gi(r,s,a,u,xf),s=xf[1],a=xf[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(Ri(n,o,c,i,u,xf),o=xf[1],c=xf[2],i=xf[3],Ri(r,s,l,a,u,xf),s=xf[1],l=xf[2],a=xf[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return Cf(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Cf(this.shape,e,!0);return qn(t,t)},t}(As);wf.prototype.type=`bezier-curve`;var Tf=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Ef=function(e){H(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Tf},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,c=Math.cos(a),l=Math.sin(a);e.moveTo(c*i+n,l*i+r),e.arc(n,r,i,a,o,!s)},t}(As);Ef.prototype.type=`arc`;var Df=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),As.prototype.getBoundingRect.call(this)},t}(As),Of=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),kf=function(e){H(t,e);function t(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=t??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type=`linear`,s.global=o||!1,s}return t}(Of),Af=function(e){H(t,e);function t(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=t??.5,o.y=n??.5,o.r=r??.5,o.type=`radial`,o.global=a||!1,o}return t}(Of),jf=Math.min,Mf=Math.max,Nf=Math.abs,Pf=[0,0],Ff=[0,0],If=Dr(),Lf=If.minTv,Rf=If.maxTv,zf=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new nr;for(var n=0;n<2;n++)this._axes[n]=new nr;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(var c=0;c<4;c++)n[c].transform(t);nr.sub(r[0],n[1],n[0]),nr.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&nr.set(t,0,0),If.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!If.negativeSize&&nr.copy(t,r?If.useDir?If.dirMinTv:Lf:Rf),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,Pf),e._getProjMinMaxOnAxis(a,t._corners,Ff),If.negativeSize||Pf[1]<Ff[0]||Pf[0]>Ff[1]){if(i=!1,If.negativeSize||n)return i;var s=Nf(Ff[0]-Pf[1]),c=Nf(Pf[0]-Ff[1]);jf(s,c)>Rf.len()&&(s<c?nr.scale(Rf,o,-s*r):nr.scale(Rf,o,c*r))}else if(!n){var s=Nf(Ff[0]-Pf[1]),c=Nf(Pf[0]-Ff[1]);(If.useDir||jf(s,c)<Lf.len())&&((s<c||!If.bidirectional)&&(nr.scale(Lf,o,s*r),If.useDir&&If.calcDirMTV()),(s>=c||!If.bidirectional)&&(nr.scale(Lf,o,-c*r),If.useDir&&If.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=jf(l,o),s=Mf(l,s)}n[0]=o+If.touchThreshold,n[1]=s-If.touchThreshold,If.negativeSize=n[1]<n[0]},e}(),Bf=[],Vf=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new gr(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Bf)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(Co),Hf=wl();function Uf(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),c=e===`update`;if(s){var l=void 0,u=void 0,d=void 0;return r?(l=X(r.duration,200),u=X(r.easing,`cubicOut`),d=0):(l=t.getShallow(c?`animationDurationUpdate`:`animationDuration`),u=t.getShallow(c?`animationEasingUpdate`:`animationEasing`),d=t.getShallow(c?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(u=a.easing),a.delay!=null&&(d=a.delay)),q(d)&&(d=d(n,i)),q(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Wf(e,t,n,r,i,a,o){var s=!1,c;q(i)?(o=a,a=i,i=null):At(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);var l=e===`leave`;l||t.stopAnimation(`leave`);var u=Uf(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Gf(e,t,n,r,i,a){Wf(`update`,e,t,n,r,i,a)}function Kf(e,t,n,r,i,a){Wf(`enter`,e,t,n,r,i,a)}function qf(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function Jf(e,t,n,r,i,a){qf(e)||Wf(`leave`,e,t,n,r,i,a)}function Yf(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Jf(e,{style:{opacity:0}},t,n,r)}function Xf(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Yf(e,t,n,r)}):Yf(e,t,n,r)}function Zf(e){Hf(e).oldStyle=e.style}var Qf=se({Arc:()=>Ef,BezierCurve:()=>wf,BoundingRect:()=>gr,Circle:()=>Ud,CompoundPath:()=>Df,Ellipse:()=>Gd,Group:()=>Vd,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Is,IncrementalDisplayable:()=>Vf,Line:()=>bf,LinearGradient:()=>kf,OrientedBoundingRect:()=>zf,Path:()=>As,Point:()=>nr,Polygon:()=>hf,Polyline:()=>_f,RadialGradient:()=>Af,Rect:()=>Ws,Ring:()=>df,Sector:()=>lf,Text:()=>Ys,WH:()=>tp,XY:()=>ep,applyTransform:()=>gp,calcZ2Range:()=>zp,clipPointsByRect:()=>xp,clipRectByRect:()=>Sp,createIcon:()=>Cp,decomposeTransform:()=>Up,ensureCopyRect:()=>Ip,ensureCopyTransform:()=>Lp,expandOrShrinkRect:()=>Op,extendPath:()=>ip,extendShape:()=>np,getCurrentCanvasPainter:()=>Gp,getShapeClass:()=>op,getTransform:()=>hp,groupTransition:()=>bp,initProps:()=>Kf,isBoundingRectAxisAligned:()=>Pp,isElementRemoved:()=>qf,lineLineIntersect:()=>Tp,linePolygonIntersect:()=>wp,makeImage:()=>cp,makePath:()=>sp,mergePath:()=>up,payloadDisableAnimation:()=>Hp,registerShape:()=>ap,removeElement:()=>Jf,removeElementWithFadeOut:()=>Xf,resizePath:()=>dp,retrieveZInfo:()=>Rp,setTooltipConfig:()=>jp,subPixelOptimize:()=>mp,subPixelOptimizeLine:()=>fp,subPixelOptimizeRect:()=>pp,transformDirection:()=>_p,traverseElements:()=>Np,traverseUpdateZ:()=>Bp,updateProps:()=>Gf}),$f={},ep=[`x`,`y`],tp=[`width`,`height`];function np(e){return As.extend(e)}var rp=zd;function ip(e,t){return rp(e,t)}function ap(e,t){$f[e]=t}function op(e){if($f.hasOwnProperty(e))return $f[e]}function sp(e,t,n,r){var i=Rd(e,t);return n&&(r===`center`&&(n=lp(n,i.getBoundingRect())),dp(i,n)),i}function cp(e,t,n){var r=new Is({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(lp(t,i))}}});return r}function lp(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var up=Bd;function dp(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function fp(e,t){return zs(e,e,{lineWidth:t}),e}function pp(e,t){return Bs(e,e,t),e}var mp=Vs;function hp(e,t){for(var n=jn([]);e&&e!==t;)Nn(n,e.getLocalTransform(),n),e=e.parent;return n}function gp(e,t,n){return t&&!bt(t)&&(t=_i.getLocalTransform(t)),n&&(t=Ln([],t)),$n([],e,t)}function _p(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:mc(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:mc(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=gp(a,t,n),mc(a[0])>mc(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function vp(e){return!e.isGroup}function yp(e){return e.shape!=null}function bp(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){vp(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return yp(e)&&(t.shape=pt(e.shape)),t}var a=r(e);t.traverse(function(e){if(vp(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Gf(e,r,n,$l(e).dataIndex)}}})}function xp(e,t){return G(e,function(e){var n=e[0];n=pc(n,t.x),n=fc(n,t.x+t.width);var r=e[1];return r=pc(r,t.y),r=fc(r,t.y+t.height),[n,r]})}function Sp(e,t){var n=pc(e.x,t.x),r=fc(e.x+e.width,t.x+t.width),i=pc(e.y,t.y),a=fc(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function Cp(e,t,n){var r=U({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),gt(i,n),new Is(r)):sp(e.replace(`path://`,``),r,n,`center`)}function wp(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Tp(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Tp(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Ep(u,d,c,l);if(Dp(f))return!1;var p=e-i,m=t-a,h=Ep(p,m,c,l)/f;if(h<0||h>1)return!1;var g=Ep(p,m,u,d)/f;return!(g<0||g>1)}function Ep(e,t,n,r){return e*r-n*t}function Dp(e){return e<=1e-6&&e>=-1e-6}function Op(e,t,n,r,i){return t==null?e:(kt(t)?kp[0]=kp[1]=kp[2]=kp[3]=t:(kp[0]=t[0],kp[1]=t[1],kp[2]=t[2],kp[3]=t[3]),r&&(kp[0]=pc(0,kp[0]),kp[1]=pc(0,kp[1]),kp[2]=pc(0,kp[2]),kp[3]=pc(0,kp[3])),n&&(kp[0]=-kp[0],kp[1]=-kp[1],kp[2]=-kp[2],kp[3]=-kp[3]),Ap(e,kp,`x`,`width`,3,1,i&&i[0]||0),Ap(e,kp,`y`,`height`,0,2,i&&i[1]||0),e)}var kp=[0,0,0,0];function Ap(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=pc(0,fc(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:mc(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function jp(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=J(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&W(wt(c),function(e){Z(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=$l(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:gt({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Mp(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Np(e,t){if(e){if(K(e))for(var n=0;n<e.length;n++)Mp(e[n],t);else Mp(e,t)}}function Pp(e){return!e||mc(e[1])<Fp&&mc(e[2])<Fp||mc(e[0])<Fp&&mc(e[3])<Fp}var Fp=1e-5;function Ip(e,t){return e?gr.copy(e,t):t.clone()}function Lp(e,t){return t?Mn(e||An(),t):void 0}function Rp(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function zp(e){var t=-1/0,n=1/0;Mp(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(!(!e||e.isGroup)){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function Bp(e,t,n){Vp(e,t,n,-1/0)}function Vp(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=pc(Vp(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=pc(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function Hp(e){return e.animation={duration:0},e}function Up(e,t){return t?Mn(Wp.transform,t):jn(Wp.transform),Wp.decomposeTransform(),xi(e,Wp),e}var Wp=new _i;Wp.transform=An();function Gp(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}ap(`circle`,Ud),ap(`ellipse`,Gd),ap(`sector`,lf),ap(`ring`,df),ap(`polygon`,hf),ap(`polyline`,_f),ap(`rect`,Ws),ap(`line`,bf),ap(`bezierCurve`,wf),ap(`arc`,Ef);var Kp={};function qp(e,t){for(var n=0;n<gu.length;n++){var r=gu[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function Jp(e,t,n){var r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;r&&(s=r.getFormattedLabel(i,`normal`,null,a,o&&o.get(`formatter`),n==null?null:{interpolatedValue:n})),s??=q(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<gu.length;l++){var u=gu[l],d=t[u];c[u]=X(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Yp(e,t,n,r){n||=Kp;for(var i=e instanceof Ys,a=!1,o=0;o<_u.length;o++){var s=t[_u[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Ys,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Jp(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Zp(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Qp(u,n,!1));for(var o=0;o<gu.length;o++){var p=gu[o],s=t[p];if(s){var m=c.ensureState(p),h=!!X(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=Zp(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Qp(s,n,!0)}}}c.silent=!!u.getShallow(`silent`),c.style.x!=null&&(f.x=c.style.x),c.style.y!=null&&(f.y=c.style.y),c.ignore=!d,c.useStyle(f),c.dirty(),n.enableTextSetter&&(om(c).setLabelText=function(e){var r=Jp(n,t,e);qp(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Xp(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<gu.length;r++){var i=gu[r];n[i]=e.getModel([i,t])}return n}function Zp(e,t,n,r,i){var a={};return $p(a,e,n,r,i),t&&U(a,t),a}function Qp(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=X(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function $p(e,t,n,r,i){n||=Kp;var a=t.ecModel,o=a&&a.option.textStyle,s=em(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=X(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);im(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=kt(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=cm.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=zt(_),h.__marginType=cm.textMargin)}im(e,t,o,null,null,n,r,i,!0,!1)}function em(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Kp).rich;if(n){t||={};for(var r=wt(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var tm=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],nm=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],rm=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function im(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Kp;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=X(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=X(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=X(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=X(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var _=0;_<tm.length;_++){var v=tm[_],y=i!==!1&&r?Lt(t.getShallow(v),r.getShallow(v),n[v]):X(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<nm.length;_++){var v=nm[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<rm.length;_++){var v=rm[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function am(e,t){var n=t&&t.getModel(`textStyle`);return Vt([e.fontStyle||n&&n.getShallow(`fontStyle`)||``,e.fontWeight||n&&n.getShallow(`fontWeight`)||``,(e.fontSize||n&&n.getShallow(`fontSize`)||12)+`px`,e.fontFamily||n&&n.getShallow(`fontFamily`)||`sans-serif`].join(` `))}var om=wl();function sm(e,t,n,r){if(e){var i=om(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}var cm={minMargin:1,textMargin:2},lm=[`textStyle`,`color`],um=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],dm=new Ys,fm=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(lm):null)},e.prototype.getFont=function(){return am({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<um.length;n++)t[um[n]]=this.getShallow(um[n]);return dm.useStyle(t),dm.update(),dm.getBoundingRect()},e}(),pm=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],mm=yn(pm),hm=function(){function e(){}return e.prototype.getLineStyle=function(e){return mm(this,e)},e}(),gm=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],_m=yn(gm),vm=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return _m(this,e,t)},e}(),ym=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){mt(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(pt(this.option))},e.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!nn.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&!(e[r]&&(n=n&&typeof n==`object`?n[e[r]]:null,n==null));r++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();dn(ym),hn(ym),yt(ym,hm),yt(ym,vm),yt(ym,xn),yt(ym,fm);function bm(e){return e==null?0:e.length||1}function xm(e){return e}var Sm=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||xm,this._newKeyGetter=r||xm,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=bm(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=bm(c),d=bm(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=bm(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=bm(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Cm={Must:1,Might:2,Not:3},wm=wl();function Tm(e){wm(e).datasetMap=Yt()}function Em(e,t,n){var r={},i=Om(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=wm(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),W(e,function(t,n){var i=At(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});W(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function m(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function Dm(e,t,n){var r={};if(!Om(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&W(a,function(e,t){(At(e)?e.name:e)===`name`&&(o=t)});var s=function(){for(var e={},r={},s=[],c=0,l=Math.min(5,n);c<l;c++){var u=jm(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===Cm.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===Cm.Not)&&(e.n=c),f(e)&&s[e.n]!==Cm.Not)return e;d||(u===Cm.Might&&r.v==null&&c!==o&&(r.v=c),(r.n==null||r.n===r.v)&&(r.n=c))}function f(e){return e.v!=null&&e.n!=null}return f(e)?e:f(r)?r:null}();if(s){r.value=[s.v];var c=o??s.n;r.itemName=[c],r.seriesName=[c]}return r}function Om(e){if(!e.get(`data`,!0))return kl(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Ol).models[0]}function km(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:kl(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Ol).models}function Am(e,t){return jm(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function jm(e,t,n,r,i,a){var o,s=5;if(Y(e))return Cm.Not;var c,l;if(r){var u=r[a];At(u)?(c=u.name,l=u.type):J(u)&&(c=u)}if(l!=null)return l===`ordinal`?Cm.Must:Cm.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=b(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return Cm.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return Cm.Not;var f=_[c];if(!f||Y(f))return Cm.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=sl(g);if(!K(y))return Cm.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=J(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?Cm.Might:Cm.Not;if(t&&e!==`-`)return Cm.Must}return Cm.Not}var Mm=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&Am(this,n)===Cm.Must&&(r.type=`ordinal`)}}return e}();function Nm(e){return e instanceof Mm}function Pm(e,t,n){n||=Lm(e);var r=t.seriesLayoutBy,i=Rm(e,n,r,t.sourceHeader,t.dimensions);return new Mm({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:pt(t)})}function Fm(e){return new Mm({data:e,sourceFormat:Y(e)?ou:nu})}function Im(e){return new Mm({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:pt(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Lm(e){var t=su;if(Y(e))t=ou;else if(K(e)){e.length===0&&(t=ru);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(K(i)||Y(i)){t=ru;break}if(At(i)){t=iu;break}}}}else if(At(e)){for(var a in e)if(Z(e,a)&&bt(e[a])){t=au;break}}return t}function Rm(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:Bm(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Vm(function(e){e!=null&&e!==`-`&&(J(e)?o??=1:o=0)},n,s,10):o=kt(r)?r:+!!r,!i&&o===1&&(i=[],Vm(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||=zm(e);else if(t===`keyedColumns`)i||(i=[],W(e,function(e,t){i.push(t)}));else if(t===`original`){var c=sl(e[0]);a=K(c)&&c.length||1}return{startIndex:o,dimensionsDefine:Bm(i),dimensionsDetectedCount:a}}function zm(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return wt(n)}function Bm(e){if(e){var t=Yt();return G(e,function(e,n){e=At(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??=r.name;var i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}}function Vm(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function Hm(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Um,Wm,Gm,Km,qm,Jm,Ym=function(){function e(e,t){var n=Nm(e)?e:Fm(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),Jm(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;Jm=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=qm[oh(o,s)];U(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=Et($m(o,s),null,i,c,l),e.count=Et(nh(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};qm=(e={},e[ru+`_`+cu]={pure:!0,appendData:i},e[ru+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[iu]={pure:!0,appendData:i},e[au]={pure:!0,appendData:function(e){var t=this._data;W(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[nu]={appendData:i},e[ou]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),Xm=function(e){K(e)||$c(`series.data or dataset.source must be an array.`)};Um={},Um[ru+`_`+cu]=Xm,Um[ru+`_row`]=Xm,Um[iu]=Xm,Um[au]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??$c(`dimension name must not be null/undefined.`)},Um[nu]=Xm;var Zm=function(e,t,n,r){return e[r]},Qm=(Wm={},Wm[ru+`_`+cu]=function(e,t,n,r){return e[r+t]},Wm[ru+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},Wm[iu]=Zm,Wm[au]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},Wm[nu]=Zm,Wm);function $m(e,t){return Qm[oh(e,t)]}var eh=function(e,t,n){return e.length},th=(Gm={},Gm[ru+`_`+cu]=function(e,t,n){return Math.max(0,e.length-t)},Gm[ru+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Gm[iu]=eh,Gm[au]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},Gm[nu]=eh,Gm);function nh(e,t){return th[oh(e,t)]}var rh=function(e,t,n){return e[t]},ih=(Km={},Km[ru]=rh,Km[iu]=function(e,t,n){return e[n]},Km[au]=rh,Km[nu]=function(e,t,n){var r=sl(e);return r instanceof Array?r[t]:r},Km[ou]=rh,Km);function ah(e){return ih[e]}function oh(e,t){return e===`arrayRows`?e+`_`+t:e}function sh(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return ah(a)(r,o,s)}var c=r;return a===`original`&&(c=sl(r)),c}}}var ch=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function lh(e,t){var n={},r=n.encode={},i=Yt(),a=[],o=[],s={};W(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;uh(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),fh(n.type)&&(a[0]=t),uh(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}tu.each(function(e,t){var i=uh(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=G(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(a=u.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new ch(s,t),n}function uh(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function dh(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function fh(e){return e!==`ordinal`&&e!==`time`}var ph=function(){function e(e){this.otherDims={},e!=null&&U(this,e)}return e}();function mh(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!kt(e)&&e!=null&&e!==`-`&&(e=+zc(e)),e==null||e===``?NaN:Number(e))}Yt({number:function(e){return parseFloat(e)},time:function(e){return+zc(e)},trim:function(e){return J(e)?Vt(e):e}});var hh={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(){function e(e,t){kt(t)||el(``),this._opFn=hh[e],this._rvalFloat=Uc(t)}return e.prototype.evaluate=function(e){return kt(e)?this._opFn(e,this._rvalFloat):this._opFn(Uc(e),this._rvalFloat)},e})();var gh=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=kt(e)?e:Uc(e),r=kt(t)?t:Uc(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=J(e),s=J(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Uc(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Uc(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function _h(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function vh(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var yh=typeof Uint32Array>`u`?Array:Uint32Array,bh=typeof Uint16Array>`u`?Array:Uint16Array,xh=typeof Int32Array>`u`?Array:Int32Array,Sh=typeof Float64Array>`u`?Array:Float64Array,Ch={float:Sh,int:xh,ordinal:Array,number:Array,time:Sh},wh;function Th(e){return e>65535?yh:bh}function Eh(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Dh(e,t,n,r,i){var a=Ch[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;l<s;l++)c[l]=o[l];e[t]=c}}else e[t]=new a(r)}var Oh=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Yt()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=wh[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],Hm(r),this._dimensions=G(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new Ch[t||`float`](this._rawCount),this._rawExtent[i]=Fl(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=Fl());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];Dh(n,c,l.type,s,!0)}for(var u=[],d=o;d<s;d++)for(var f=d-o,p=0;p<i;p++){var l=r[p],m=wh.arrayRows.call(this,e[f]||u,l.property,f,p);n[p][d]=m;var h=a[p];m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=G(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=Fl()),Dh(i,l,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],f=e;f<t;f++){d=r.getItem(f,d);for(var p=0;p<o;p++){var m=i[p],h=this._dimValueGetter(d,c[p],f,p);m[f]=h;var g=s[p];h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var a=this.get(e,r);isNaN(a)||(n+=a)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),kc(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=Th(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(Th(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks,u=0;u<r;u++){var d=void 0,f=n.getRawIndex(u);if(o===0)d=t(u);else if(o===1){var p=l[c][f];d=t(p,u)}else{for(var m=0;m<o;m++)a[m]=l[e[m]][f];a[m]=u,d=t.apply(null,a)}d&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=wt(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Th(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){var p=0;if(i===1){for(var m=d[r[0]],h=0;h<n;h++){var g=m[h];(g>=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h<n;h++){var g=m[h],b=_[h];(g>=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h<a;h++){var x=t.getRawIndex(h),g=d[r[0]][x];(g>=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;h<a;h++){for(var S=!0,x=t.getRawIndex(h),C=0;C<i;C++){var w=r[C],g=d[w][x];(g<e[w][0]||g>e[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent,l=0;l<t.length;l++)c[t[l]]=Fl();for(var u=0;u<o;u++){for(var d=e.getRawIndex(u),f=0;f<a;f++)s[f]=r[t[f]][d];s[a]=u;var p=n&&n.apply(null,s);if(p!=null){typeof p!=`object`&&(i[0]=p,p=i);for(var l=0;l<p.length;l++){var m=t[l],h=p[l],g=c[m],_=r[m];_&&(_[d]=h),h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Th(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;f<i-1;f+=o){for(var p=Math.min(f+o,i-1),m=Math.min(f+o*2,i),h=(m+p)/2,g=0,_=p;_<m;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)||(g+=y)}g/=m-p;var b=f,x=Math.min(f+o,i),S=f-1,C=r[s];c=-1,u=b;for(var w=-1,T=0,_=b;_<x;_++){var v=this.getRawIndex(_),y=r[v];if(isNaN(y)){T++,w<0&&(w=v);continue}l=Math.abs((S-h)*(y-C)-(S-_)*(g-C)),l>c&&(c=l,u=v)}T>0&&T<x-b&&(d[a++]=Math.min(w,u),u=Math.max(w,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(Th(this._rawCount))(Math.ceil(o/i)*2),c=0,l=0;l<o;l+=i){var u=l,d=a[this.getRawIndex(u)],f=l,p=a[this.getRawIndex(f)],m=i;l+i>o&&(m=o-l);for(var h=0;h<m;h++){var g=a[this.getRawIndex(l+h)];g<d&&(d=g,u=l+h),g>p&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);u<f?(s[c++]=_,s[c++]=v):(s[c++]=v,s[c++]=_)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=Fl(),d=new(Th(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++){var h=this.getRawIndex(p+m);o[m]=c[h]}var g=n(o),_=this.getRawIndex(Math.min(p+r(o,g)||0,l-1));c[_]=g,g<u[0]&&(u[0]=g),g>u[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=Fl();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=_h(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||vh(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&xt(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Eh(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=pt(this._extent),e._rawExtent=pt(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return mh(e[r],this._dimensions[r])}wh={arrayRows:e,objectRows:function(e,t,n,r){return mh(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return mh(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),kh=wl(),Ah={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},jh=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Ph(this.source))},e.prototype.getSourceDimensionIndex=function(e){return X(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Hm(this.source),n=!Fh(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),t&&s!=null&&(!u||!u.isCalculationCoord)&&(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=Ah[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function Mh(e){return e instanceof jh}function Nh(e){for(var t=Yt(),n=0;n<(e||[]).length;n++){var r=e[n],i=At(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Ph(e){var t=kh(e);return t.dimNameMap||=Nh(e.dimensionsDefine)}function Fh(e){return e>30}var Ih=At,Lh=G,Rh=typeof Int32Array>`u`?Array:Int32Array,zh=`e\0\0`,Bh=-1,Vh=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Hh=[`_approximateExtent`],Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Mh(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=J(u)?new ph({name:u}):u instanceof ph?u:new ph(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=Yt();W(a,function(e){m.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(kt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof Oh&&(i=e),!i){var a=this.dimensions,o=Nm(e)||bt(e)?new Ym(e,a.length):e;i=new Oh;var s=Lh(a,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(o,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=lh(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&Yh(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&cl(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=vl(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=vl(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)Yh(this,o);Uh(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Ih(e)?U(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Gh(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return Wh(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return K(e)?r.getValues(Lh(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?Bh:r},e.prototype.each=function(e,t,n){q(e)&&(n=t,t=e,e=[]);var r=n||this,i=Lh(Kh(e),this._getStoreDimIndex,this);this._store.each(i,r?Et(t,r):t)},e.prototype.filterSelf=function(e,t,n){q(e)&&(n=t,t=e,e=[]);var r=n||this,i=Lh(Kh(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?Et(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=wt(e),i=[];return W(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){q(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=Lh(Kh(e),this._getStoreDimIndex,this),o=Jh(this);return o._store=this._store.map(a,i?Et(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=Lh(Kh(e),this._getStoreDimIndex,this);this._store.modify(a,i?Et(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=Jh(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=Jh(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=Jh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new ym(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Sm(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Wh(e,t)},function(e){return Wh(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Ih(e)?U(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),K(i)?i=i.slice():Ih(i)&&(i=U({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Ih(t)?U(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Ih(e)?U(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?U(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){eu(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){W(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Lh(this.dimensions,this._getDimInfo,this),this.hostModel),qh(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Rt(arguments)))})},e.internalField=function(){Uh=function(e){var t=e._invertedIndicesMap;W(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Rh(a.categories.length);for(var s=0;s<n.length;s++)n[s]=Bh;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Gh=function(e,t,n){return vl(e._getCategory(t,n),null)},Wh=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Gh(e,e._idDimIdx,t)),n??=zh+t,n},Kh=function(e){return K(e)||(e=e==null?[]:[e]),e},Jh=function(t){var n=new e(t._schema?t._schema:Lh(t.dimensions,t._getDimInfo,t),t.hostModel);return qh(n,t),n},qh=function(e,t){W(Vh.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,W(Hh,function(n){e[n]=pt(t[n])}),e._calculationInfo=U({},t._calculationInfo)},Yh=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=Gh(e,i,t)),s==null&&a!=null&&(r[t]=s=Gh(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Zh(e,t){Nm(e)||(e=Fm(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Yt(),a=[],o=Qh(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Fh(o),c=r===e.dimensionsDefine,l=c?Ph(e):Nh(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Yt(u),f=new xh(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=At(n)?n:{name:n},o=new ph,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)m(p);d.each(function(e,t){var n=il(e).slice();if(n.length===1&&!J(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);W(n,function(e,n){var i=J(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})});var h=0;W(n,function(e){var t,n,r,i;if(J(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=U({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=il(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}W(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(gt(o,i),t,a),o.name==null&&n){var s=n[a];!At(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&>(o.otherDims,r)})}});function g(e,t,n){tu.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)W(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=$h(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(Am(e,S)===Cm.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return Kl(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new jh({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Qh(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return W(t,function(e){var t;At(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function $h(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var eg={},tg={},ng=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(eg,!0),this._normalMasterList=n(tg,!1);function n(n,r){var i=[];return W(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){W(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){eg[e]=t;return}tg[e]=t},e.get=function(e){return tg[e]||eg[e]},e}();function rg(e){return!!eg[e]}function ig(e){ag.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var ag=Yt();function og(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ag.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function sg(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!rg(n)&&(i=0))}return{coordSysType:n,kind:i}}function cg(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=sg(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var lg=function(){function e(e){this.coordSysDims=[],this.axisMap=Yt(),this.categoryAxisMap=Yt(),this.coordSysName=e}return e}();function ug(e){var t=e.get(`coordinateSystem`),n=new lg(t),r=dg[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var dg={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Ol).models[0],a=e.getReferringComponents(`yAxis`,Ol).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),fg(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),fg(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Ol).models[0];t.coordSysDims=[`single`],n.set(`single`,i),fg(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Ol).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),fg(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),fg(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();W(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),fg(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Ol).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function fg(e){return e.get(`type`)===`category`}function pg(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;mg(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(W(a,function(e,t){J(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),W(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;W(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function mg(e){return!Mh(e.schema)}function hg(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function gg(e,t){return hg(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function _g(e,t){var n=e.get(`coordinateSystem`),r=ng.get(n),i;return t&&t.coordSysDims&&(i=G(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=dh(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function vg(e,t,n){var r,i;return n&&W(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function yg(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Fm(e)):(i=r.getSource(),a=i.sourceFormat===nu);var o=ug(t),s=_g(t,o),c=n.useEncodeDefaulter,l=q(c)?c:c?Dt(Em,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Zh(i,u),f=vg(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=pg(t,{schema:d,store:p}),h=new Xh(d,t);h.setCalculationInfo(m);var g=f!=null&&bg(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function bg(e){if(e.sourceFormat===`original`)return!K(sl(xg(e.data||[])))}function xg(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Sg=Math.round(Math.random()*10);function Cg(e){return[e||``,Sg++].join(`_`)}function wg(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=cn(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=cn(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Tg(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;var a=n(t),o=a.graph,s=a.noEntryList,c={};for(W(e,function(e){c[e]=!0});s.length;){var l=s.pop(),u=o[l],d=!!c[l];d&&(r.call(i,l,u.originalDeps.slice()),delete c[l]),W(u.successor,d?p:f)}W(c,function(){throw Error(``)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return W(e,function(o){var s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),W(c,function(e){_t(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);_t(t.successor,e)<0&&t.successor.push(o)})}),{graph:n,noEntryList:a}}function r(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function i(e,t){var n=[];return W(e,function(e){_t(t,e)>=0&&n.push(e)}),n}}function Eg(e,t){return mt(mt({},e,!0),t,!0)}var Dg=Math.log(2);function Og(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Dg);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Og(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function kg(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Og(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Og(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var Ag=`___zrEVENTSAVED`,jg=[];function Mg(e,t,n,r,i){return Pg(jg,t,r,i,!0)&&Pg(e,n,jg[0],jg[1])}function Ng(e,t){e&&n(e),t&&n(t);function n(e){var t=e[Ag];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Ag])}}function Pg(e,t,n,r,i){if(t.getBoundingClientRect&&nn.domSupported&&!Lg(t)){var a=t[Ag]||(t[Ag]={}),o=Ig(Fg(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Fg(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){W(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Ig(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?kg(s,o):kg(o,s))}function Lg(e){return e.nodeName.toUpperCase()===`CANVAS`}var Rg=/([&<>"'])/g,zg={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Bg(e){return e==null?``:(e+``).replace(Rg,function(e,t){return zg[t]})}var Vg={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Hg={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Ug=`ZH`,Wg=`EN`,Gg=Wg,Kg={},qg={},Jg=nn.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Gg).toUpperCase().indexOf(Ug)>-1?Ug:Gg}():Gg;function Yg(e,t){e=e.toUpperCase(),qg[e]=new ym(t),Kg[e]=t}function Xg(e){if(J(e)){var t=Kg[e.toUpperCase()]||{};return e===Ug||e===Wg?pt(t):mt(pt(t),pt(Kg[Gg]),!1)}return mt(pt(e),pt(Kg[Gg]),!1)}function Zg(e){return qg[e]}function Qg(){return qg[Gg]}Yg(Wg,Vg),Yg(Ug,Hg);var $g=null;function e_(){return $g}function t_(e,t){var n=e_(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function n_(e){var t=e.brk;return t?t.breaks:[]}function r_(e){var t=e.brk;return t?t.hasBreaks():!1}var i_=1e3,a_=i_*60,o_=a_*60,s_=o_*24,c_=s_*365,l_={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},u_={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},d_=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,f_=`{yyyy}-{MM}-{dd}`,p_={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:f_,hour:f_+` `+u_.hour,minute:f_+` `+u_.minute,second:f_+` `+u_.second,millisecond:d_},m_=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],h_=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function g_(e){return!J(e)&&!q(e)?__(e):e}function __(e){e||={};var t={},n=!0;return W(m_,function(t){n&&=e[t]==null}),W(m_,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=m_[s],l=At(a)&&!K(a)?a[c]:a,u=void 0;K(l)?(u=l.slice(),o=u[0]||``):J(l)?(o=l,u=[o]):(o==null?o=u_[r]:l_[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function v_(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function y_(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function b_(e){return e===y_(e)}function x_(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function S_(e,t,n,r){var i=zc(e),a=i[E_(n)](),o=i[D_(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[O_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[k_(n)](),d=(u-1)%12+1,f=i[A_(n)](),p=i[j_(n)](),m=i[M_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof ym?r:Zg(r||Jg)||Qg()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,v_(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,v_(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,v_(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,v_(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,v_(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,v_(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,v_(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,v_(m,3)).replace(/{S}/g,m+``)}function C_(e,t,n,r,i){var a=null;if(J(n))a=n;else if(q(n)){var o={time:e.time,level:e.time?e.time.level:0},s=e_();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=w_(e.value,i);a=n[u][u][0]}}return S_(new Date(e.value),a,i,r)}function w_(e,t){var n=zc(e),r=n[D_(t)]()+1,i=n[O_(t)](),a=n[k_(t)](),o=n[A_(t)](),s=n[j_(t)](),c=n[M_(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function T_(e,t,n){switch(t){case`year`:e[P_(n)](0);case`month`:e[F_(n)](1);case`day`:e[I_(n)](0);case`hour`:e[L_(n)](0);case`minute`:e[R_(n)](0);case`second`:e[z_(n)](0)}return e}function E_(e){return e?`getUTCFullYear`:`getFullYear`}function D_(e){return e?`getUTCMonth`:`getMonth`}function O_(e){return e?`getUTCDate`:`getDate`}function k_(e){return e?`getUTCHours`:`getHours`}function A_(e){return e?`getUTCMinutes`:`getMinutes`}function j_(e){return e?`getUTCSeconds`:`getSeconds`}function M_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function N_(e){return e?`setUTCFullYear`:`setFullYear`}function P_(e){return e?`setUTCMonth`:`setMonth`}function F_(e){return e?`setUTCDate`:`setDate`}function I_(e){return e?`setUTCHours`:`setHours`}function L_(e){return e?`setUTCMinutes`:`setMinutes`}function R_(e){return e?`setUTCSeconds`:`setSeconds`}function z_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function B_(e){if(!Wc(e))return J(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function V_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var H_=zt;function U_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Vt(e)?e:`-`}function a(e){return Jc(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?zc(e):e;if(!isNaN(+c))return S_(c,r,n);if(s)return`-`}if(t===`ordinal`)return Ot(e)?i(e):kt(e)&&a(e)?e+``:`-`;var l=Uc(e);return a(l)?B_(l):Ot(e)?i(e):typeof e==`boolean`?e+``:`-`}var W_=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],G_=function(e,t){return`{`+e+(t??``)+`}`};function K_(e,t,n){K(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=W_[a];e=e.replace(G_(o),G_(o,0))}for(var s=0;s<r;s++)for(var c=0;c<i.length;c++){var l=t[s][i[c]];e=e.replace(G_(W_[c],s),n?Bg(l):l)}return e}function q_(e,t){var n=J(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var a=n.renderMode||`html`;return r?a===`html`?i===`subItem`?`<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:`+Bg(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Bg(r)+`;`+(t||``)+`"></span>`:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function J_(e,t){return t||=`transparent`,J(e)?e:At(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Y_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var X_=W,Z_=[`left`,`right`,`top`,`bottom`,`width`,`height`],Q_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function $_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var ev=$_;Dt($_,`vertical`),Dt($_,`horizontal`);function tv(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function nv(e,t){var n=ov(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===av.point)a=n.refPoint,i=iv(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=K(o)?o:[o,o];i=iv(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[wc(s[0],i.width)+i.x,wc(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function rv(e,t){var n=nv(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);K(a)||(a=[0,a]);var o=wc(r.width,t.getWidth()),s=wc(r.height,t.getHeight()),c=Math.min(o,s),l=wc(a[0],c/2),u=wc(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function iv(e,t,n){n=H_(n||0);var r=t.width,i=t.height,a=wc(e.left,r),o=wc(e.top,i),s=wc(e.right,r),c=wc(e.bottom,i),l=wc(e.width,r),u=wc(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new gr((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var av={rect:1,point:2};function ov(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=og(e),l=c.coord,u=c.from;if(o.dataToLayout){a=av.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=av.point,s=u,i=o.dataToPoint(l))}return a??=av.rect,a===av.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function sv(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new gr(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=iv(gt({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function cv(e){var t=e.layoutMode||e.constructor.layoutMode;return At(t)?t:t?{type:t}:null}function lv(e,t,n){var r=n&&n.ignoreSize;!K(r)&&(r=[r,r]);var i=o(Q_[0],0),a=o(Q_[1],1);c(Q_[0],e,i),c(Q_[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(X_(n,function(t){c[t]=e[t]}),X_(n,function(e){Z(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!Z(a,f)&&Z(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){X_(e,function(e){t[e]=n[e]})}}function uv(e){return dv({},e)}function dv(e,t){return t&&e&&X_(Z_,function(n){Z(t,n)&&(e[n]=t[n])}),e}var fv=wl(),pv=function(e){H(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Cg(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=cv(this),r=n?uv(e):{};mt(e,t.getTheme().get(this.mainType)),mt(e,this.getDefaultOption()),n&&lv(e,r,n)},t.prototype.mergeOption=function(e,t){mt(this.option,e,!0);var n=cv(this);n&&lv(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!un(e))return e.defaultOption;var t=fv(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=mt(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return kl(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return tv(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(ym);pn(pv,ym),vn(pv),wg(pv),Tg(pv,mv);function mv(e){var t=[];return W(pv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=G(t,function(e){return cn(e).main}),e!==`dataset`&&_t(t,`dataset`)<=0&&t.unshift(`dataset`),t}var hv=wl(),gv=wl(),_v=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=il(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return bv(this,hv,r,i,e,t,n)},e.prototype.clearColorPalette=function(){xv(this,hv)},e}();function vv(e,t,n,r){return bv(e,gv,il(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function yv(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function bv(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:yv(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function xv(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Sv=/\{@(.+?)\}/g,Cv=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&K(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),q(i))return s.status=t,s.dimensionIndex=r,i(s);if(J(i))return K_(i,s).replace(Sv,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=sh(o,e,i);if(a&&K(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return sh(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function wv(e){var t,n;return At(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function Tv(e){return new Ev(e)}var Ev=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(K(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){Dv.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Dv.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),K(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),Dv=function(){var e,t,n,r,i,a={reset:function(c,l,u,d){t=c,e=l,n=u,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}(),Ov=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return mh(e,t)},e}();function kv(e,t){var n=new Ov,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&el(``);var o=[],s={},c=e.dimensionsDefine;if(c)W(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(Z(s,n)&&el(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=$m(i,cu);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=Et(Av,null,e)),n.cloneRawData=Et(jv,null,e),n.count=Et(nh(i,cu),null,r,a,o);var d=ah(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=Et(Mv,null,o,s),n.cloneAllDimensionInfo=Et(Nv,null,o),n}function Av(e){var t=e.sourceFormat;return Rv(t)||el(``),e.data}function jv(e){var t=e.sourceFormat,n=e.data;if(Rv(t)||el(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(U({},n[i]));return r}}function Mv(e,t,n){if(n!=null){if(kt(n)||!isNaN(n)&&!Z(t,n))return e[n];if(Z(t,n))return t[n]}}function Nv(e){return pt(e)}var Pv=Yt();function Fv(e){e=pt(e);var t=e.type,n=``;t||el(n);var r=t.split(`:`);r.length!==2&&el(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,Pv.set(t,e)}function Iv(e,t,n){var r=il(e),i=r.length;i||el(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=Lv(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function Lv(e,t,n,r){var i=``;t.length||el(i),At(e)||el(i);var a=e.type,o=Pv.get(a);o||el(i);var s=G(t,function(e){return kv(e,o)});return G(il(o.transform({upstream:s[0],upstreamList:s,config:pt(e.config)})),function(e,n){var r=``;At(e)||el(r),e.data||el(r),Rv(Lm(e.data))||el(r);var i,a=t[0];if(a&&n===0&&!e.dimensions){var o=a.startIndex;o&&(e.data=a.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:cu,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:cu,sourceHeader:0,dimensions:e.dimensions};return Pm(e.data,i,null)})}function Rv(e){return e===`arrayRows`||e===`objectRows`}var zv=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(Bv(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=Y(o)?ou:nu,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=X(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=X(u.sourceHeader,d.sourceHeader),m=X(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Pm(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Pm(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&Vv(``);var i,a=[],o=[];return W(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Vv(``),a.push(t),o.push(e._getVersionSign())}),n?i=Iv(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Im(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];Bv(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Oh,o.initData(new Ym(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Bv(e)){var t=Om(e);return t?[t.getSourceManager()]:[]}return G(km(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(Bv(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}},e}();function Bv(e){return e.mainType===`series`}function Vv(e){throw Error(e)}var Q={color:{},darkColor:{},size:{}},Hv=Q.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var Uv in U(Hv,{primary:Hv.neutral80,secondary:Hv.neutral70,tertiary:Hv.neutral60,quaternary:Hv.neutral50,disabled:Hv.neutral20,border:Hv.neutral30,borderTint:Hv.neutral20,borderShade:Hv.neutral40,background:Hv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Hv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Hv.neutral70,axisLineTint:Hv.neutral40,axisTick:Hv.neutral70,axisTickMinor:Hv.neutral60,axisLabel:Hv.neutral70,axisSplitLine:Hv.neutral15,axisMinorSplitLine:Hv.neutral05}),Hv)if(Hv.hasOwnProperty(Uv)){var Wv=Hv[Uv];Uv===`theme`?Q.darkColor.theme=Hv.theme.slice():Uv===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:Uv.indexOf(`accent`)===0?Q.darkColor[Uv]=ga(Wv,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[Uv]=ga(Wv,null,function(e){return e*.9},function(e){return 1-e**1.5})}Q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Gv=`line-height:1`;function Kv(e){var t=e.lineHeight;return t==null?Gv:`line-height:`+Bg(t+``)+`px`}function qv(e,t){var n=e.color||Q.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Q.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+Bg(r+``)+`px;color:`+Bg(n)+`;font-weight:`+Bg(i+``),valueStyle:`font-size:`+Bg(o+``)+`px;color:`+Bg(a)+`;font-weight:`+Bg(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Jv=[0,10,20,30],Yv=[``,`
|
|
9
|
+
`,`
|
|
10
|
+
|
|
11
|
+
`,`
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
`];function Xv(e,t){return t.type=e,t}function Zv(e){return e.type===`section`}function Qv(e){return Zv(e)?ey:ty}function $v(e){if(Zv(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return W(e.blocks,function(e){var n=$v(e);n>=t&&(t=n+ +(r&&(!n||Zv(e)&&!e.noHeader)))}),t}return 0}function ey(e,t,n,r){var i=t.noHeader,a=ry($v(t)),o=[],s=t.blocks||[];Bt(!s||K(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Z(l,c)){var u=new gh(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}W(s,function(n,i){var s=t.valueFormatter,c=Qv(n)(s?U(U({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):iy(r,o.join(``),i?n:a.html);if(i)return d;var f=U_(t.header,`ordinal`,e.useUTC),p=qv(r,e.renderMode).nameStyle,m=Kv(r);return e.renderMode===`richText`?sy(e,f,p)+a.richText+d:iy(r,`<div style="`+p+`;`+m+`;">`+Bg(f)+`</div>`+d,n)}function ty(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=K(e)?e:[e],G(e,function(e,t){return U_(e,K(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:U_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=qv(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:sy(e,f,v))+(o?``:cy(e,m,h,g,y)):iy(r,(s?``:d)+(a?``:ay(f,!s,v))+(o?``:oy(m,h,g,y)),n)}}function ny(e,t,n,r,i,a){if(e)return Qv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function ry(e){return{html:Jv[e],richText:Yv[e]}}function iy(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Kv(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function ay(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Bg(e)+`</span>`}function oy(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=K(e)?e:[e],`<span style="`+i+`;`+r+`">`+G(e,function(e){return Bg(e)}).join(` `)+`</span>`}function sy(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function cy(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(K(t)?t.join(` `):t,a)}function ly(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return J_(n)}function uy(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var dy=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Gc()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=q_({color:t,type:e,renderMode:n,markerId:r});return J(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};K(t)?W(t,function(e){return U(n,e)}):U(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function fy(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=K(s),l=ly(t,n),u,d,f,p;if(o>1||c&&!o){var m=py(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=sh(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=yl(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Xv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Xv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Vt(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function py(e,t,n,r,i){var a=t.getData(),o=xt(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?W(r,function(e){u(sh(a,n,e),e)}):W(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Xv(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var my=wl();function hy(e,t){return e.getName(t)||e.getId(t)}var gy=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Tv({count:yy,reset:by}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(my(this).sourceManager=new zv(this)).prepareSource();var r=this.getInitialData(e,n);Sy(r,this),this.dataTask.context.data=r,my(this).dataBeforeProcessed=r,_y(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=cv(this),r=n?uv(e):{},i=this.subType;pv.hasClass(i)&&(i+=`Series`),mt(e,t.getTheme().get(this.subType)),mt(e,this.getDefaultOption()),al(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&lv(e,r,n)},t.prototype.mergeOption=function(e,t){e=mt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=cv(this);n&&lv(this.option,e,n);var r=my(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Sy(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,my(this).dataBeforeProcessed=i,_y(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Y(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&al(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=wy(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return my(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=wy(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}my(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return Yt(e)},t.prototype.getSourceManager=function(){return my(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return my(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=1/0;for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return fy({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(nn.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=_v.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a<e.length;a++){var o=e[a],s=hy(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=wt(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[hy(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){At(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=hy(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=hy(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return pv.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(pv);yt(gy,Cv),yt(gy,_v),pn(gy,pv);function _y(e){var t=e.name;yl(e)||(e.name=vy(e)||t)}function vy(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return W(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function yy(e){return e.model.getRawData().count()}function by(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),xy}function xy(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Sy(e,t){W(Xt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Dt(Cy,t))})}function Cy(e,t){var n=wy(e);return n&&n.setOutputEnd((t||this).count()),t}function wy(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Ty=As.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Ey={line:bf,rect:Ws,roundRect:Ws,square:Ws,circle:Ud,diamond:As.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:As.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:As.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Ty},Dy={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Oy={};W(Ey,function(e,t){Oy[t]=new e});var ky=As.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Vr(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Oy[r];i||=(r=`rect`,Oy[r]),Dy[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Ay(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function jy(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?cp(e.slice(8),new gr(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?sp(e.slice(7),{},new gr(t,n,r,i),o?`center`:`cover`):new ky({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Ay,a&&c.setColor(a),c}function My(e){return K(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Ny(e,t){if(e!=null)return K(e)||(e=[e,e]),[wc(e[0],t[0])||0,wc(X(e[1],e[0]),t[1])||0]}var Py=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return yg(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Vd,n=jy(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=jy(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(gy);function Fy(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=sh(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(sh(e,t,n[o]));return a.join(` `)}}function Iy(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!K(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Ly=function(e){H(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=jy(e,-1,-1,2,2,null,a);o.attr({z2:X(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Ry,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Uu(this.childAt(0))},t.prototype.downplay=function(){Wu(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Gf(f,p,o,n),Zf(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Kf(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Xp(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Ny(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Is){var S=a.style;a.useStyle(U({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(U({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Yp(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Fy(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),cd(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=$l(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Jf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Jf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return My(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Vd);function Ry(e,t){this.parent.drift(e,t)}function zy(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function By(e){return e!=null&&!At(e)&&(e={isIgnore:e}),e||{}}function Vy(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Xp(t),cursorStyle:t.get(`cursor`)}}function Hy(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Uy=function(){function e(e){this.group=new Vd,this._SymbolCtor=e||Ly}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=By(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Vy(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);zy(e,i,r,t)&&Hy(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!zy(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Gf(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);zy(t,s,i,e)?(o||=Hy(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Vy(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=By(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(zy(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){Np(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function Wy(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Gy(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=G(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return hg(t,d[0])&&(f=!0,d[0]=p),hg(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function Gy(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:kt(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function Ky(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function qy(e,t){return!isFinite(e)||!isFinite(t)}var Jy=typeof Float32Array<`u`?Float32Array:void 0,Yy=typeof Float64Array<`u`?Float64Array:void 0;function Xy(e){return Zy({ctor:Jy},e).arr}function Zy(e,t){var n=e.arr,r=e.ctor;if(t>Fc&&(t=Fc),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function Qy(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function $y(e,t,n,r,i,a,o,s){for(var c=Qy(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Wy(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=Ky(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,ee=Xy(M),N=Xy(M),P=Xy(M),F=Xy(M),I=[],y=0;y<m.length;y++){var L=m[y],R=y*2,z=L*2;ee[R]=l[z],ee[R+1]=l[z+1],N[R]=u[z],N[R+1]=u[z+1],P[R]=d[z],P[R+1]=d[z+1],F[R]=f[z],F[R+1]=f[z+1],I[y]=p[L]}return{current:ee,next:N,stackedOnCurrent:P,stackedOnNext:F,status:I}}var eb=Math.min,tb=Math.max;function nb(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(qy(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;qy(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||qy(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,ee=C-v,N=void 0,P=void 0;if(s===`x`){N=Math.abs(A),P=Math.abs(j);var F=E>0?1:-1;p=_-F*N*o,m=v,O=_+F*P*o,k=v}else if(s===`y`){N=Math.abs(M),P=Math.abs(ee);var I=D>0?1:-1;p=_,m=v-I*N*o,O=_,k=v+I*P*o}else N=Math.sqrt(A*A+M*M),P=Math.sqrt(j*j+ee*ee),T=P/(P+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=eb(O,tb(S,_)),k=eb(k,tb(C,v)),O=tb(O,eb(S,_)),k=tb(k,eb(C,v)),E=O-_,D=k-v,p=_-E*N/P,m=v-D*N/P,p=eb(p,tb(l,_)),m=eb(m,tb(u,v)),p=tb(p,eb(l,_)),m=tb(m,eb(u,v)),E=_-p,D=v-m,O=_+E*P/N,k=v+D*P/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var rb=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),ib=function(e){H(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new rb},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&qy(n[i*2-2],n[i*2-1]);i--);for(;r<i&&qy(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=nb(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=as.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?Ii(i,u,f,m,e,s):Ii(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?Pi(a,d,p,h,b):Pi(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(As),ab=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rb),ob=function(e){H(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new ab},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&qy(n[a*2-2],n[a*2-1]);a--);for(;i<a&&qy(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=nb(e,n,i,a,a,1,t.smooth,o,t.connectNulls);nb(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(As);function sb(){var e=wl();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var cb=wl(),lb=sb(),ub=function(){function e(){this.group=new Vd,this.uid=Cg(`viewChart`),this.renderTask=Tv({plan:pb,reset:mb}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&fb(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&fb(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Np(this.group,e)},e.markUpdateMethod=function(e,t){cb(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function db(e,t,n){e&&md(e)&&(t===`emphasis`?Uu:Wu)(e,n)}function fb(e,t,n){var r=Cl(e,t),i=t&&t.highlightKey!=null?hd(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){db(e,n,i)}):W(il(r),function(t){db(e.getItemGraphicEl(t),n,i)})}dn(ub,[`dispose`]),vn(ub);function pb(e){return lb(e.model)}function mb(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&cb(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),hb[c]}var hb={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function gb(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new Ws({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=q(i)?function(e){i(e,d)}:null;Kf(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function _b(e,t,n){var r=e.getArea(),i=Oc(r.r0,1),a=Oc(r.r,1),o=new lf({shape:{cx:Oc(e.cx,1),cy:Oc(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,Kf(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function vb(e,t,n,r,i){return e?e.type===`polar`?_b(e,t,n):e.type===`cartesian2d`?gb(e,t,n,r,i):null:null}function yb(e,t){return e.type===t}function bb(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||Z(e,`text`)))}function xb(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},Z(r,`text`)&&(o.text=r.text),Z(r,`rich`)&&(o.rich=r.rich),Z(r,`textFill`)&&(o.fill=r.textFill),Z(r,`textStroke`)&&(o.stroke=r.textStroke),Z(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),Z(r,`fontSize`)&&(o.fontSize=r.fontSize),Z(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),Z(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=Z(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),Z(r,`textPosition`)&&(i.position=r.textPosition),Z(r,`textOffset`)&&(i.offset=r.textOffset),Z(r,`textRotation`)&&(i.rotation=r.textRotation),Z(r,`textDistance`)&&(i.distance=r.textDistance)}return Sb(o,e),W(o.rich,function(e){Sb(e,e)}),{textConfig:i,textContent:a}}function Sb(e,t){t&&(t.font=t.textFont||t.font,Z(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),Z(t,`textAlign`)&&(e.align=t.textAlign),Z(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),Z(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),Z(t,`textWidth`)&&(e.width=t.textWidth),Z(t,`textHeight`)&&(e.height=t.textHeight),Z(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),Z(t,`textPadding`)&&(e.padding=t.textPadding),Z(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),Z(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),Z(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),Z(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),Z(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),Z(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Z(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function Cb(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||`inside`,n.offset!=null&&(r.textOffset=n.offset),n.rotation!=null&&(r.textRotation=n.rotation),n.distance!=null&&(r.textDistance=n.distance);var i=r.textPosition.indexOf(`inside`)>=0,a=e.fill||Q.color.neutral99;wb(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Q.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Q.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,W(t.rich,function(e){wb(e,e)}),r}function wb(e,t){t&&(Z(t,`fill`)&&(e.textFill=t.fill),Z(t,`stroke`)&&(e.textStroke=t.fill),Z(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),Z(t,`font`)&&(e.font=t.font),Z(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),Z(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),Z(t,`fontSize`)&&(e.fontSize=t.fontSize),Z(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),Z(t,`align`)&&(e.textAlign=t.align),Z(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),Z(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),Z(t,`width`)&&(e.textWidth=t.width),Z(t,`height`)&&(e.textHeight=t.height),Z(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),Z(t,`padding`)&&(e.textPadding=t.padding),Z(t,`borderColor`)&&(e.textBorderColor=t.borderColor),Z(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),Z(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),Z(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),Z(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),Z(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Z(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Z(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),Z(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),Z(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),Z(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}var Tb=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();vn(Tb);var Eb=0,Db=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Eb,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&G(r,Ob);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!J(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=Yt(this.categories)},e}();function Ob(e){return At(e)&&e.value!=null?e.value:e+``}var kb=wt({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function Ab(e,t,n){var r;e||={};var i=e_();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(W(kb,function(t){a[t]&&(e[t]=Et(a[t],a))}),r=a)}return r??Lb(e,n),{brk:r,mapper:e}}function jb(e,t){W(kb,function(n){e[n]=t[n]})}function Mb(e,t){e.freeze=$t}function Nb(e){return e.getExtentUnsafe(0,2)}function Pb(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function Fb(e){var t=Pb(e,3);return t[1]-t[0]}function Ib(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Lb(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Fl(),U(n,Rb),n}var Rb={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=Pb(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){zb(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),zb(r,e,t,n)},freeze:function(){}};function zb(e,t,n,r){Vl(n,r)&&(e[t][0]=n,e[t][1]=r)}function Bb(e){return Vb(e)||Ub(e)}function Vb(e){return e.type===`interval`}function Hb(e){return e.type===`time`}function Ub(e){return e.type===`log`}function Wb(e){return e.type===`ordinal`}function Gb(e){var t=Vc(e),n=vc(10,t),r=hc(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Oc(r*n,-t)}function Kb(e){return Ac(e)+2}function qb(e,t){return yc(e)/yc(t)}function Jb(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return vc(t,e)}function Yb(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=mc(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!Bl(r[0])||!Bl(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function Xb(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function Zb(e,t){return e||=t,hc(pc(e,1))}function Qb(e,t,n){var r=Nb(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var $b=function(e){H(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,jb(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Db({}),K(i)&&(i=new Db({categories:G(i,function(e){return At(e)?e.value:e})})),r._ordinalMeta=i;var a=Ab(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Mb(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:J(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=hc(e),e},t.prototype.getTicks=function(){var e=[];return Qb(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=fc(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=Nb(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(hc(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(Tb);Tb.registerClass($b);function ex(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=Kb(f);u<t-1;){var m=Oc(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=e_();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var tx=function(e){H(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Ab(r,t_(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return pt(this._cfg)},t.prototype.setConfig=function(e){var t=Nb(this);this._cfg=e=pt(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Kb(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Nb(this),i=t.niceExtent,a=t.intervalPrecision,o=e_(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?Oc(i[0]-n,a):r[0]});for(var d=function(e,t){return hc((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=fc(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Oc(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Oc(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Oc(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return ex(this,e,n_(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ac(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),B_(Oc(e.value,n,!0))},t.type=`interval`,t}(Tb);Tb.registerClass(tx);var nx=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},rx=function(e){H(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=Ab(r,t_(r,n),null).brk,r}return t.prototype.getLabel=function(e){return S_(e.value,p_[x_(y_(this._minLevelUnit))]||p_.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return C_(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Nb(this),r=e_(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return e_().addBreaksToTicks(o,i.breaks,n),o;o=px(this._minLevelUnit,this._approxInterval,s,n,Ib(this),i);var c=m_.length-1,l=0;return W(o,function(e){e.time&&(c=Math.min(c,_t(m_,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&e_().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&e_().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(_t(m_,w_(e.vmin,s)),_t(m_,w_(e.vmax,s))),n=0,r=0;r<m_.length;r++)if(!ax(m_[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:m_[Math.max(i,t)],upperTimeUnit:m_[i]}}),o},t.prototype.getMinorTicks=function(e){return ex(this,e,n_(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return kt(e)?Math.round(e):+zc(e)},t.type=`time`,t}(Tb),ix=[[`second`,i_],[`minute`,a_],[`hour`,o_],[`quarter-day`,o_*6],[`half-day`,o_*12],[`day`,s_*1.2],[`half-week`,s_*3.5],[`week`,s_*7],[`month`,s_*31],[`quarter`,s_*95],[`half-year`,c_/2],[`year`,c_]];function ax(e,t,n,r){return T_(new Date(t),e,r).getTime()===T_(new Date(n),e,r).getTime()}function ox(e,t){return e/=s_,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function sx(e){var t=30*s_;return e/=t,e>6?6:e>3?3:e>2?2:1}function cx(e){return e/=o_,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function lx(e,t){return e/=t?a_:i_,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function ux(e){return pc(Hc(e,!0),1)}function dx(e,t,n){var r=Math.max(0,_t(m_,t)-1);return T_(new Date(e),m_[r],n).getTime()}function fx(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function px(e,t,n,r,i,a){var o=h_,s=0;function c(e,t,n,i,o,c,l){for(var u=fx(o,e),d=t,f=new Date(d);d<n&&d<=r[1]&&(l.push({value:d}),!(s++>3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!ax(y_(e),r[0],r[1],n)){s&&(i=[{value:dx(r[0],e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u=i[l].value,d=i[l+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/s_/365)),p=E_(n),m=N_(n);break;case`half-year`:case`quarter`:case`month`:f=sx(t),p=D_(n),m=P_(n);break;case`week`:case`half-week`:case`day`:f=ox(t,31),p=O_(n),m=F_(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=cx(t),p=k_(n),m=I_(n);break;case`minute`:f=lx(t,!0),p=A_(n),m=L_(n);break;case`second`:f=lx(t,!1),p=j_(n),m=R_(n);break;case`millisecond`:f=ux(t),p=M_(n),m=z_(n)}d>=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l<o.length;l++)a.push(o[l])}}for(var u=[],d=[],f=0,p=0,m=0;m<o.length;++m){var h=y_(o[m]);if(b_(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?y_(o[m+1]):null))){if(d.length){p=f,d.sort(function(e,t){return e.value-t.value});for(var g=[],_=0;_<d.length;++_){var v=d[_].value;(_===0||d[_-1].value!==v)&&(g.push(d[_]),v>=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=St(G(u,function(e){return St(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;m<b.length;++m)for(var C=b[m],w=0;w<C.length;++w){var T=w_(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}Kl(S,ql,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=w_(r[0],n),k=w_(r[1],n);return(!E||E.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),S}var mx=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=s_,n[1]+=s_),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-s_}e.setExtent(n[0],n[1]);var i=Zb(t.splitNumber,10),a=Ib(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=ix.length,l=Math.min(nx(ix,a,0,c),c-1),u=ix[l][1],d=ix[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Tb.registerClass(rx);var hx=0,gx=1,_x=2,vx=function(e){H(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=tx.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[hx]=i[gx]=a[hx]=a[gx]=NaN,jb(r,t.mapperMethods);var s=e_(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},_x,l),r.powStub=new tx({breakParsed:l.original}),r.intervalStub=new tx({breakParsed:l.transformed}),Mb(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=e_(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return G(i.getTicks(e||{}),function(e){var i=e.value,o=Jb(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,n_(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return ex(this,e,n_(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(qb(e,this.base))},scale:function(e){return Jb(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=qb(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return yx.depth=n,bx.lookup=this._lookup,Jb(n===2?e:this.intervalStub.transformOut(e,yx),this.base,bx)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Vl(t,n)||t<=0||n<=0)){var r=xx,i=xx;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[hx]=t,r[gx]=n);var o=this.base;this.intervalStub.setExtent2(e,i[hx]=qb(t,o),i[gx]=qb(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Vl(t[0],t[1])&&Jc(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(Tb);Tb.registerClass(vx);var yx={},bx={},xx=[],Sx={value:1,category:1,time:1,log:1},Cx=wl();function Tx(e){var t=e.get(`type`);return(t==null||!Z(Sx,t)&&!Tb.getClass(t))&&(t=`value`),t}function Ex(e,t,n){var r=e_(),i;switch(r&&(i=Lx(e,t,n)),t){case`category`:return new $b({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Fl()});case`time`:return new rx({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new vx({logBase:e.get(`logBase`),breakOption:i});case`value`:return new tx({breakOption:i});default:return new((Tb.getClass(t))||tx)({})}}function Dx(e,t,n){var r=n?Pb(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Vl(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Ox(e){Cx(e).noOnMyZero=!0}function kx(e){return Cx(e).noOnMyZero}function Ax(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=g_(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(J(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(q(t)){if(e.type===`category`)return function(n,r){return t(jx(e,n),n.value-e.scale.getExtent()[0],null)};var r=e_();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(jx(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function jx(e,t){var n=e.scale;return Wb(n)?n.getLabel(t):t.value}function Mx(e){return e.get(`interval`)??`auto`}function Nx(e){return e.type===`category`&&Mx(e.getLabelModel())===0}function Px(e,t){var n={};return W(e.mapDimensionsAll(t),function(t){n[gg(e,t)]=!0}),wt(n)}function Fx(e){return e===`middle`||e===`center`}function Ix(e){return e.getShallow(`show`)}function Lx(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!e_()||!n||!Rx(t)?void 0:r}function Rx(e){return e!==`category`}function zx(e,t,n,r,i,a){var o=Ub(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Xb(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Bx(e,t){return Wb(e)?e.getRawOrdinalNumber(t.value):t.value}function Vx(e,t){return Wb(e)&&!!t.get(`boundaryGap`)}function Hx(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Ux(e){for(var t=Fl(),n=Fl(),r=0;r<e.length;){var i=e[r++],a=e[r++];qy(i,a)||(Il(t,i),Il(n,a))}return[t,n]}function Wx(e,t){var n=Ux(e),r=n[0],i=n[1],a=Ux(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function Gx(e){return kt(e)?e:e?.5:0}function Kx(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=Xy(r*2),a=0;a<r;a++){var o=Ky(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function qx(e,t,n,r,i){var a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){var p=t||e;qy(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function Jx(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:ha((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Yx(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=G(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Jx(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;W(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new kf(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Xx(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Zx(a,t))){var o=t.mapDimension(a.dim),s={};return W(a.getViewLabels(),function(e){e.tick.offInterval||(s[Bx(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Zx(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Ly.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function Qx(e){for(var t=e.length/2;t>0&&qy(e[t*2-2],e[t*2-1]);t--);return t-1}function $x(e,t){return[e[t*2],e[t*2+1]]}function eS(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!qy(o,e[l*2+1-i])){if(l===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function tS(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<gu.length;t++)if(e.get([gu[t],`endLabel`,`show`]))return!0;return!1}function nS(e,t,n,r){if(yb(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=tS(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=gb(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return _b(t,n,r)}function rS(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var iS=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Vd,t=new Uy;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=Et(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=Wy(r,a,_),y=g&&Kx(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Xx(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Yx(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=qx(y,c,r,w,x),c=qx(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,J_(E)),m.setClipPath(nS(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,J_(E));var D=m.getClipPath();D?Kf(D,{shape:nS(this,r,!1,e).shape},e):m.setClipPath(nS(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!Hx(this._stackedOnPoints,y)||!Hx(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=qx(y,c,r,w,x),c=qx(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(gt(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),fd(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}$l(f).seriesIndex=e.seriesIndex,cd(f,k,A,j);var ee=Gx(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:ee,smoothMonotone:N,connectNulls:x}),p){var P=a.getCalculationInfo(`stackedOnSeries`),F=0;p.useStyle(gt(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),P&&(F=Gx(P.get(`smooth`))),p.setShape({smooth:ee,stackedOnSmooth:F,smoothMonotone:N,connectNulls:x}),fd(p,e,`areaStyle`),$l(p).seriesIndex=e.seriesIndex,cd(p,k,A,j)}var I=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=I)}),this._polyline.onHoverStateChange=I,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var L=e.get(`triggerEvent`),R=e.get(`triggerLineEvent`),z=R===!0||L===!0||L===`line`,te=R===!0||L===!0||L===`area`;this.packEventData(e,f,z),p&&this.packEventData(e,p,te)},t.prototype.packEventData=function(e,t,n){$l(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Cl(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(qy(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Ly(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else ub.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Cl(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else ub.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Pu(this._polyline,e),t&&Pu(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new ib({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ob({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);q(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=q(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=q(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(tS(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Ys({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=Qx(o);c>=0&&(Yp(a,Xp(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Fy(i,e):Iy(i,n)},enableTextSetter:!0},rS(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=eS(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=$x(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Pl(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=$x(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=om(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=$y(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=qx(u.stackedOnCurrent,u.current,n,i,o),d=qx(u.current,null,n,i,o),m=qx(u.stackedOnNext,u.next,n,i,o),p=qx(u.next,null,n,i,o)),Wx(d,p)>3e3||c&&Wx(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Gf(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Gf(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type=`line`,t}(ub);function aS(e,t){return{seriesType:e,plan:sb(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=G(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);hg(n,o[0])&&(o[0]=c),hg(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&Xy(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var oS={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},sS=function(e){return Math.round(e.length/2)};function cS(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;J(i)?p=oS[i]:q(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,sS))}}}}}function lS(e){e.registerChartView(iS),e.registerSeriesModel(Py),e.registerLayout(aS(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,cS(`line`))}var uS=wl(),dS=wl(),fS={estimate:1,determine:2};function pS(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function mS(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:G(gS(n,r),function(t,n){return{formattedLabel:Ax(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?_S(e,t):bS(e)}function hS(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:gS(i,r)}:e.type===`category`?yS(e,t):{ticks:r.getTicks(n)}}function gS(e,t){var n=t.getExtent(),r=[];return W(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Kl(r,Jl,null),kc(r),G(r,function(e){return{value:e}})}function _S(e,t){var n=e.getLabelModel(),r=vS(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function vS(e,t,n){var r=SS(e),i=Mx(t),a=n.kind===fS.estimate;if(!a){var o=wS(r,i);if(o)return o}var s,c;q(i)?s=jS(e,i,!1):(c=i===`auto`?ES(e,n):i,s=jS(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return TS(r,i,l),!0}):TS(r,i,l),l}function yS(e,t){var n=xS(e),r=Mx(t),i=wS(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),q(r))a=jS(e,r,!0);else if(r===`auto`){var s=vS(e,e.getLabelModel(),pS(fS.determine));o=s.labelCategoryInterval,a=G(s.labels,function(e){return e.tick})}else o=r,a=jS(e,o,!0);return TS(n,r,{ticks:a,tickCategoryInterval:o})}function bS(e){var t=e.scale.getTicks(),n=Ax(e);return{labels:G(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var xS=CS(`axisTick`),SS=CS(`axisLabel`);function CS(e){return function(t){return dS(t)[e]||(dS(t)[e]={list:[]})}}function wS(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function TS(e,t,n){return e.list.push({key:t,value:n}),n}function ES(e,t){if(t.kind===fS.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return dS(e).autoInterval=n,!0}),n}return dS(e).autoInterval??(dS(e).autoInterval=e.calculateCategoryInterval(t))}function DS(e,t){var n=t.kind,r=AS(e),i=Ax(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=Ir(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===fS.estimate?(t.out.noPxChangeTryDetermine.push(Et(OS,null,e,S,c)),S):kS(e,S,c)??S}function OS(e,t,n){return kS(e,t,n)==null}function kS(e,t,n){var r=uS(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function AS(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function jS(e,t,n){var r=Ax(e),i=e.scale,a=[],o=q(t);return Qb(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var MS=wl();function NS(e){MS(e).prepare={}}function PS(e){MS(e).fullUpdate={}}function FS(e){return MS(e).prepare}function IS(e){return MS(e).fullUpdate}var LS=Wl(),RS=wl(),zS=wl();function BS(e,t){var n=e.model,r=RS(IS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function VS(e,t){return WS(BS(e,t))}function HS(e,t){var n=[];return US(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(WS(e))}),n}function US(e,t){var n=RS(IS(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function WS(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function GS(e,t){var n=e.model.ecModel,r=RS(IS(n)).axSer;r&&qS(n,r.get(e.model.uid),t)}function KS(e,t,n){var r=BS(e,t);r&&qS(e.model.ecModel,r.sers,n)}function qS(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function JS(e,t,n){var r=RS(IS(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function YS(e,t){var n=e.model,r=RS(IS(n.ecModel)).keys;r&&W(r.get(n.uid),function(e){t(e)})}function XS(e){var t=zS(FS(e)),n=t.keyed||=Yt();US(e,function(t,r,i){var a=n.get(r)||n.set(r,Yt()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&QS.liPosMinGap(e,t,o)})}function ZS(e,t){QS[e]=t}var QS={};function $S(e,t,n){if(e){var r=t.ecModel,i=RS(IS(r)),a=e.model.uid,o=i.axSer||=Yt();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=nC.get(eC(s,c,n))||nC.get(eC(s,c,null));if(l){var u=i.keyed||=Yt(),d=i.keys||=Yt(),f=l.key,p=u.get(f)||u.set(f,Yt()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function eC(e,t,n){return e+`|&`+X(t,!0)+`|&`+(n||``)}function tC(e,t){var n=eC(t.seriesType,t.baseAxis,t.coordSysType);nC.set(n,t),LS(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:XS})})}var nC=Yt(),rC=.8;function iC(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Fb(r);Jc(o)||(o=NaN);var s=e.getExtent(),c=mc(s[1]-s[0]);return Wb(r)?aC(n,e,o,c):i&&oC(n,e,o,c,i),a!=null&&(n.w=Jc(n.w)?pc(a,n.w):a),n}function aC(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function oC(e,t,n,r,i){var a=!1,o=-1/0;W(i.key?[VS(t,i.key)]:HS(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Jc(n)&&n>0&&Jc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*rC,e.w2=e.w*n/r)}var sC=[0,1],cC=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),Cc(e,sC,lC(this),t)},e.prototype.coordToData=function(e,t){var n=Cc(e,lC(this),sC,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=G(hS(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Bx(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=uC(this,n,r);return G(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Wb(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),G(this.scale.getMinorTicks(e),function(e){return G(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=pS(fS.determine),mS(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return iC(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=pS(fS.determine),DS(this,e)},e}();function lC(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function uC(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=iC(e).w;if(!i)return!1;W(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var dC=function(e){H(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(cC),fC=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],pC=1,mC=2,hC=pC|mC;function gC(e,t,n){n||=hC,t?e.dirty|=n:e.dirty&=~n}function _C(e,t){return t||=hC,e.dirty==null||!!(e.dirty&t)}function vC(e){if(e)return _C(e)&&yC(e,e.label,e),e}function yC(e,t,n){var r=t.getComputedTransform();e.transform=Lp(e.transform,r);var i=e.localRect=Ip(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=cm.textMargin);for(var d=0;d<4;d++)bC[d]=u===cm.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===cm.textMargin&&Op(i,bC,!1,!1);var f=e.rect=Ip(e.rect,i);return r&&f.applyTransform(r),u===cm.minMargin&&Op(f,bC,!1,!1),e.axisAligned=Pp(r),(e.label=e.label||{}).ignore=t.ignore,gC(e,!1),gC(e,!0,mC),e}var bC=[0,0,0,0];function xC(e,t,n){return e.transform=Lp(e.transform,n),e.localRect=Ip(e.localRect,t),e.rect=Ip(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Pp(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function SC(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function CC(e,t){for(var n=0;n<fC.length;n++){var r=fC[n];e[r]??(e[r]=t[r])}return vC(e)}function wC(e){var t=e.obb;return(!t||_C(e,mC))&&(e.obb=t||=new zf,t.fromBoundingRect(e.localRect,e.transform),gC(e,!1,mC)),t}function TC(e,t,n,r,i){var a=e.length,o=ep[t],s=tp[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function EC(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=vC(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(DC(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function DC(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:wC(e).intersect(wC(t),n,r)}var OC=null;function kC(){return OC}var AC=`expandAxisBreak`,jC=Math.PI,MC=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],NC=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],PC=wl(),FC=wl(),IC=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function LC(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=sw(e.axisName)&&Fx(e.nameLocation);W(r,function(e){var t=vC(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Ln(RC,n.transform):jn(RC),t.transform&&Nn(RC,RC,t.transform),gr.copy(zC,t.localRect),zC.applyTransform(RC),s?s.union(zC):gr.copy(s=new gr(0,0,0,0),zC))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new gr(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var RC=An(),zC=new gr(0,0,0,0),BC=function(e,t,n,r,i,a){if(Fx(e.nameLocation)){var o=a.stOccupiedRect;o&&VC(xC({},o,a.transGroup.transform),r,i)}else HC(a.labelInfoList,a.dirVec,r,i)};function VC(e,t,n){var r=new nr;DC(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&SC(t,r)}function HC(e,t,n,r){for(var i=nr.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||VC(s,n,r)}}var UC=function(){function e(e,t,n,r){this.group=new Vd,this._axisModel=e,this._api=t,this._local={},this._shared=r||new IC(BC),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=X(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=X(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:X(e.nameDirection,1),tickDirection:X(e.tickDirection,1),labelDirection:X(e.labelDirection,1),labelOffset:X(e.labelOffset,0),silent:X(e.silent,!0),axisName:r,nameLocation:Lt(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:sw(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new Vd({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new nr(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},W(WC,function(r){e[r]&&GC[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=Ic(t-e),i,a;return Lc(r)?(a=n>0?`top`:`bottom`,i=`center`):Lc(r-jC)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<jC?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),WC=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],GC={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&($n(u,u,l),$n(d,d,l));var p=U({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&r_(r.axis.scale))kC().buildAxisBreakLine(r,i,a,m);else{var h=new bf(U({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));fp(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);J(g)&&(g=[g,g]),(J(_)||kt(_))&&(_=[_,_]);var v=Ny(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];W([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=jy(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){ew(t,i,s)&&KC(e,t,n,r,i,a,o,fS.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){ew(t,i,s)&&KC(e,t,n,r,i,a,o,fS.determine);var c=QC(e,i,a,r);YC(e,t.labelLayoutList,c),$C(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(sw(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new nr(0,0),_=new nr(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=An();_.transform(Fn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*jC/180);var b,x;Fx(u)?b=UC.innerTextLayout(e.rotation,y??e.rotation,d):(b=qC(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=It(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Ys({x:g.x,y:g.y,rotation:b.rotation,silent:UC.isLabelSilent(r),style:Zp(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(jp({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=UC.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,$l(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=vC({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Fx(u)?MC[E]:NC[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function KC(e,t,n,r,i,a,o,s){nw(t)||tw(e,t,i,s,r,o);var c=t.labelLayoutList;iw(e,r,c,a),lw(r,e.rotation,c);var l=e.optionHideOverlap;JC(r,c,l),l&&EC(St(c,function(e){return e&&!e.label.ignore})),LC(e,n,r,c)}function qC(e,t,n,r){var i=Ic(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Lc(i-jC/2)?(o=c?`bottom`:`top`,a=`center`):Lc(i-jC*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<jC*1.5&&i>jC/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function JC(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Nx(r))return;function a(e,a,o){var s=vC(t[a]),c=vC(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=PC(s.label).labelInfo.tick;if(Hb(l)&&u.notNice||Wb(l)&&u.offInterval){XC(s.label);return}}if(e===!1||s.suggestIgnore){XC(s.label);return}if(c.suggestIgnore){XC(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=CC({marginForce:f},s),c=CC({marginForce:f},c)}DC(s,c,null,{touchThreshold:d})&&XC(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function YC(e,t,n){e.showMinorTicks||W(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=FC(r),a=PC(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){XC(r);return}}})}function XC(e){e&&(e.ignore=!0)}function ZC(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&($n(o,o,t),$n(s,s,t));var u=new bf({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});fp(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=FC(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function QC(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=ZC(i.getTicksCoords(),n.transform,c,gt(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function $C(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=gt(c.getLineStyle(),gt(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=ZC(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function ew(e,t,n){if(nw(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),rw(e,null,null,null))}return!0}function tw(e,t,n,r,i,a){var o=i.axis,s=It(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Vd;n.add(c);var l=pS(r);if(!s||o.scale.isBlank()){rw(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(It(e.raw.labelRotate,u.get(`rotate`))||0)*jC/180,p=UC.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;W(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=Bx(o.scale,n);if(m&&m[f]){var y=m[f];At(y)&&y.textStyle&&(l=new ym(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=X(l.getShallow(`alignMinLabel`,!0),x),C=X(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=X(l.getShallow(`verticalAlignMinLabel`,!0),w),E=X(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new Ys({x:0,y:0,rotation:0,silent:UC.isLabelSilent(i),z2:D,style:Zp(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:q(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=PC(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,jp({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=UC.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var M=j.parsedBreak;A.break={start:M.vmin,end:M.vmax}}o.type===`category`&&(A.dataIndex=f),$l(O).eventData=A,j&&cw(i,a,O,j)}h.push(O),c.add(O)}),rw(t,G(h,function(e){return{label:e,priority:PC(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function nw(e){return!!e.labelLayoutList}function rw(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function iw(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);W(n,function(n,a){var o=vC(n);if(o){var s=o.label,c=PC(s);o.suggestIgnore=s.ignore,s.ignore=!1,xi(aw,ow);var l=t.axis;aw.x=l.dataToCoord(Bx(l.scale,c.labelInfo.tick)),aw.y=e.labelOffset+e.labelDirection*i,aw.rotation=c.layoutRotation,r.add(aw),aw.updateTransform(),r.remove(aw),aw.decomposeTransform(),xi(s,aw),s.markRedraw(),gC(o,!0),vC(o)}})}var aw=new Ws,ow=new Ws;function sw(e){return!!e}function cw(e,t,n,r){n.on(`click`,function(n){var i={type:AC,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function lw(e,t,n){var r=e_();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&PC(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&W(i,function(r){kC().adjustBreakLabelPair(e.axis.inverse,t,[vC(n[r[0]]),vC(n[r[1]])])})}}function uw(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),It(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function dw(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function fw(e){var t={xAxisModel:null,yAxisModel:null};return W(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Ol).models[0]}),t}function pw(e,t,n,r,i,a){for(var o=uw(e,n),s=!1,c=!1,l=0;l<t.length;l++)Bb(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new UC(n,r,o,i)}function mw(e,t,n){var r=uw(t,n);e.updateCfg(r)}var hw=wl(),gw=3,_w=function(){function e(e,t,n,r,i){var a=Wb(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Vb(e)||Ub(e)||Hb(e))&&(Ll(l,yw(e,t.get(`dataMin`,!0))),Rl(l,yw(e,t.get(`dataMax`,!0)))),Hl(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=yw(e,q(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=yw(e,q(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=bw(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!Bl(u[0])&&(u[0]=NaN),!Bl(u[1])&&(u[1]=NaN);var g=s||Ft(u[0])||Ft(u[1])||a&&!o,_=Vb(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=yw(e,t.get(`startValue`,!0)),x=b!=null;!Jc(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Jc(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),vw(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),vw(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function vw(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Ul(t))}function yw(e,t){return t==null?null:Ft(t)?NaN:e.parse(t)}function bw(e,t){var n;if(Wb(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=K(r)?r:[r,r]}return[xw(n[0]),xw(n[1])]}function xw(e){return Br(typeof e==`boolean`?0:e,1)||0}function Sw(e){var t=hw(e.scale);return t.extent||=Fl(),t}function Cw(e,t){Sw(e).dimIdxInCoord=t.get(e.dim)}function ww(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Tw(n,e,i,r,t)}function Tw(e,t,n,r,i){var a=Sw(t),o=a.extent,s=!1;GS(t,function(r){if(r.boxCoordinateSystem){var i=og(r).coord,c=a.dimIdxInCoord;if(c>=0&&K(i)){var l=i[c];l!=null&&!K(l)&&Il(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;W(Px(u,n),function(e){zl(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=jw(e,t,r);Dw(e,new _w(e,r,o,s,c),i),a.extent=null}function Ew(e,t){var n=e.scale;Dw(n,new _w(n,e.model,t,!1,!1),gw)}function Dw(e,t,n){e.rawExtentInfo=t,t.from=n}function Ow(e,t){kw.set(e,t)}var kw=Yt();function Aw(e,t,n,r,i){e.rawExtentInfo||Ew({scale:e,model:t},i||Fl());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function jw(e,t,n){var r=Vx(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return YS(t,function(e){a=!!kw.get(e)||a}),a}function Mw(e,t,n,r){if(n.ctnShp){var i;if(YS(e,function(t){var n=kw.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Ll(i,a[0]),Rl(i,a[1]),Ox(e))}}),i){var a=t.getExtent();if(Wb(t))e.onBand||t.setExtent2(1,fc(a[0],a[0]+i[0]),pc(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=fc(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=pc(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Nw(){ZS(`liPosMinGap`,Pw)}function Pw(e,t,n){var r=Yt(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=_h(u);function f(n){qS(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Zy(Fw,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||vh(d,a))&&(l&&(a=c.transformIn(a,null)),Fw.arr[m++]=a)}});var h=Fw.typed?Fw.arr.subarray(0,m):(Fw.arr.length=m,Fw.arr);Fw.typed?h.sort():kc(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=Jc(g)?g:m>0?-2:-1,n.serUids=r}var Fw=Zy({ctor:Yy},50);function Iw(e){return function(t,n){var r=iC(t,{fromStat:{key:e}});if(Jc(r.w2))return[-r.w2/2,r.w2/2]}}function Lw(e,t){return e+`|&`+t}function Rw(e){return Nw(),{liPosMinGap:!Wb(e.scale)}}function zw(e,t,n,r){tC(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Rw})}function Bw(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Vw={left:0,right:0,top:0,bottom:0},Hw=[`25%`,`25%`],Uw=`cartesian2d`,Ww=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=uv(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&lv(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&lv(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Vw,outerBoundsContain:`all`,outerBoundsClampWidth:Hw[0],outerBoundsClampHeight:Hw[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(pv),Gw=Wl(),Kw=`__ec_stack_`;function qw(e){return e.get(`stack`)||Kw+e.seriesIndex}function Jw(e){if(Wb(e.axis.scale)){for(var t=iC(e.axis),n=[],r=0;r<e.count;r++)n.push(gt({stackId:Kw+r},e));for(var i=Zw({bandWidthResult:t,seriesInfo:n}),a=[],r=0;r<e.count;r++){var o=i[Kw+r];o.offsetCenter=o.offset+o.width/2,a.push(o)}return a}}function Yw(e,t){var n=Xw(e,t);return n.columnMap=Zw(n),n}function Xw(e,t){var n=Lw(t,Uw),r=[],i=iC(e,{fromStat:{key:n},min:1});return KS(e,n,function(e){r.push({barWidth:wc(e.get(`barWidth`),i.w),barMaxWidth:wc(e.get(`barMaxWidth`),i.w),barMinWidth:wc(e.get(`barMinWidth`)||(eT(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:qw(e)})}),{bandWidthResult:i,seriesInfo:r}}function Zw(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};W(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Z(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=fc(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=pc(35-o.length*4,15)+`%`;var c=wc(i,t),l=wc(a,1),u=(n-c)/(r+(r-1)*l);u=pc(u,0),W(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=fc(o,i)),a&&(o=pc(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=fc(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=pc(u,0);var d=0,f;W(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return W(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Qw(e){return{seriesType:e,overallReset:function(t){var n=Lw(e,Uw);JS(t,n,function(t){var r=Yw(t,e);KS(t,n,function(e){var t=r.columnMap[qw(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function $w(e){return{seriesType:e,plan:sb(),reset:function(e){if(dw(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=hg(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Bw(i))),p=eT(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Xy(r*3),c=p&&s&&Xy(r*3),l=p&&Xy(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,mc(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,mc(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function eT(e){return e.pipelineContext&&e.pipelineContext.large}function tT(e){return Iw(Lw(e,Uw))}function nT(e){Gw(e,function(){function t(t){var n=Lw(t,Uw);zw(e,n,t,Uw),Ow(n,tT(t))}t(`bar`),t(`pictorialBar`)})}var rT=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return yg(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)W(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(gy);gy.registerClass(rT);var iT=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return yg(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Xl(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Eg(rT.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(rT),aT=`\0__throttleOriginMethod`,oT=`\0__throttleRate`,sT=`\0__throttleType`;function cT(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function lT(e,t,n,r){var i=e[t];if(i){var a=i[aT]||i,o=i[sT];if(i[oT]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=cT(a,n,r===`debounce`),i[aT]=a,i[sT]=r,i[oT]=n}return i}}function uT(e,t){var n=e[t];n&&n[aT]&&(n.clear&&n.clear(),e[t]=n[aT])}var dT=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),fT=function(e){H(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new dT},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(As);function pT(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Vr(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+hT(m,s+_,!1),x=u+p*y(m)+gT(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+hT(m,-s+_,!1),x=u+p*y(m)+gT(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+hT(h,s+_,!0),x=u+p*y(h)+gT(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+hT(h,-s+_,!0),x=u+p*y(h)+gT(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Vr(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function mT(e,t,n,r){if(kt(r)){e.setTextConfig({rotation:r});return}if(K(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function hT(e,t,n){return t*Math.sin(e)*(n?-1:1)}function gT(e,t,n){return t*Math.cos(e)*(n?1:-1)}function _T(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;K(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:G(r,function(e){return Br(e,i)})}}var vT=Math.max,yT=Math.min,bT=function(e){H(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Np(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=CT(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=kT[s.type](a,e);if(!t)return null;var n=BT(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=kT[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!OT[s.type](r)))){var o=!1;f&&(o=xT[s.type](p,r));var g=ST[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),MT(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?wT(d,u,g,r,t,l,!1,!1):Kf(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=kT[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=kT[s.type](a,t),E=zT(l,T,s);Gf(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!OT[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=xT[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Xf(D,e,n),D=null),D?Zf(D):D=ST[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=om(k);A.prevValue!=null&&(A.prevValue=A.value)}}else MT(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?wT(d,u,D,C,t,l,!0,x):Gf(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Xf(n,e,t)}).execute();var C=this._backgroundGroup||=new Vd;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),IT(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),IT(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&vb(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:G(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Xf(t,e,$l(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(ub),xT={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=vT(t.x,e.x),s=yT(t.x+t.width,i),c=vT(t.y,e.y),l=yT(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=yT(t.r,e.r),a=vT(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},ST={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Ws({shape:U({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?fT:lf,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=pT(jT(i),{isRoundCap:l===fT}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Gf:Kf)(u,{shape:p},a)}return u}};function CT(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function wT(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Gf:Kf)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Gf:Kf)(n,{shape:l},u,i)}function TT(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var ET=[`x`,`y`,`width`,`height`],DT=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],OT={cartesian2d:function(e){return!TT(e,ET)},polar:function(e){return!TT(e,DT)}},kT={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?NT(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function AT(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function jT(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function MT(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;U(u,_T(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?VT(i,a.coordinateSystem):HT(i,a.coordinateSystem),p=Xp(r);Yp(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Fy(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,mT(e,h===`outside`?f:h,jT(o),r.get([`label`,`rotate`]))}sm(m,p,a.getRawValue(n),function(e){return Iy(t,e)});var g=r.getModel([`emphasis`]);cd(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),fd(e,r),AT(i)&&(e.style.fill=`none`,e.style.stroke=`none`,W(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function NT(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var PT=function(){function e(){}return e}(),FT=function(e){H(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new PT},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(As);function IT(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Yl(e):0;if(l){var d=new FT({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new FT({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,$l(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,LT),f.on(`mousemove`,LT)),n&&n.push(f)}var LT=cT(function(e){var t=this,n=RT(t,e.offsetX,e.offsetY);$l(t).dataIndex=n>=0?n:null},30,!1);function RT(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function zT(e,t,n){if(yb(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function BT(e,t,n){return new(e.type===`polar`?lf:Ws)({shape:zT(t,n,e),silent:!0,z2:0})}function VT(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function HT(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function UT(e){e.registerChartView(bT),e.registerSeriesModel(iT),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Qw(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$w(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,cS(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),nT(e)}function WT(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}W([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=U({},t),i.dispatchAction(U(t,{type:e[1],seriesIndex:n(r,t)}))})})}function GT(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=Cl(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:K(l)?c.getName(l[0]):c.getName(l),selected:J(r)?r:U({},r)})}})}function KT(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(GT(`map`,`selectchanged`,t,r,e),GT(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(GT(`map`,`selected`,t,r,e),GT(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(GT(`map`,`unselected`,t,r,e),GT(`pie`,`unselected`,t,r,e))})}function qT(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function JT(e,t,n){t=K(t)&&{coordDimensions:t}||U({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=Zh(r,t).dimensions,a=new Xh(i,e);return a.initData(r,n),a}var YT=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),XT=wl(),ZT=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new YT(Et(this.getData,this),Et(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return JT(this,{coordDimensions:[`value`],encodeDefaulter:Dt(Dm,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=XT(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Nc(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){al(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(gy);ig({fullType:ZT.type,getCoord2:function(e){return e.getShallow(`center`)}}),Math.PI*2,as.CMD;function QT(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}var $T=new nr,eE=new nr,tE=new nr,nE=new nr,rE=new nr,iE=[],aE=new nr;function oE(e,t){if(t<=180&&t>0){t=t/180*Math.PI,$T.fromArray(e[0]),eE.fromArray(e[1]),tE.fromArray(e[2]),nr.sub(nE,$T,eE),nr.sub(rE,tE,eE);var n=nE.len(),r=rE.len();if(!(n<.001||r<.001)){nE.scale(1/n),rE.scale(1/r);var i=nE.dot(rE);if(Math.cos(t)<i){var a=QT(eE.x,eE.y,tE.x,tE.y,$T.x,$T.y,iE,!1);aE.fromArray(iE),aE.scaleAndAdd(rE,a/Math.tan(Math.PI-t));var o=tE.x===eE.x?(aE.y-eE.y)/(tE.y-eE.y):(aE.x-eE.x)/(tE.x-eE.x);if(isNaN(o))return;o<0?nr.copy(aE,eE):o>1&&nr.copy(aE,tE),aE.toArray(e[1])}}}}function sE(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,$T.fromArray(e[0]),eE.fromArray(e[1]),tE.fromArray(e[2]),nr.sub(nE,eE,$T),nr.sub(rE,tE,eE);var r=nE.len(),i=rE.len();if(!(r<.001||i<.001)&&(nE.scale(1/r),rE.scale(1/i),nE.dot(t)<Math.cos(n))){var a=QT(eE.x,eE.y,tE.x,tE.y,$T.x,$T.y,iE,!1);aE.fromArray(iE);var o=Math.PI/2,s=o+Math.acos(rE.dot(t))-n;if(s>=o)nr.copy(aE,tE);else{aE.scaleAndAdd(rE,a/Math.tan(Math.PI/2-s));var c=tE.x===eE.x?(aE.y-eE.y)/(tE.y-eE.y):(aE.x-eE.x)/(tE.x-eE.x);if(isNaN(c))return;c<0?nr.copy(aE,eE):c>1&&nr.copy(aE,tE)}aE.toArray(e[1])}}}function cE(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function lE(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Yn(r[0],r[1]),a=Yn(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=Qn([],r[1],r[0],o/i),c=Qn([],r[1],r[2],o/a),l=Qn([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}}function uE(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<_u.length;c++){var l=_u[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:X(i.states[l]&&i.states[l].ignore,s))||!X(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&cE(r,!0,l,u);continue}r||(r=new _f,e.setTextGuideLine(r),!d&&(s||!o)&&cE(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),cE(r,!1,l,u)}}if(r){gt(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=lE}}function dE(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<gu.length;r++){var i=gu[r];n[i]=e.getModel([i,t])}return n}var fE=Math.PI/180;function pE(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;hE(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}TC(e,1,c,c+o)&&d(e)}function mE(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;yE(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!yE(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,hE(m,g,!1)}}pE(l,t,n,r,1,i,a,o,s,d),pE(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!yE(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function hE(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}gE(a,r)}}}function gE(e,t){vE.rect=e,yC(vE,t,_E)}var _E={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},vE={};function yE(e){return e.position===`center`}function bE(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*fE,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=wc(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=wc(T,l);var E=w.get(`length2`);if(E=wc(E,l),Math.abs(d.endAngle-d.startAngle)<o){W(h.states,p),h.ignore=!0,g&&(W(g.states,p),g.ignore=!0);return}if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,M,ee;r=d.cx,i=d.cy;var N=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,ee=`center`;else{var P=(N?(d.r+d.r0)/2*O:d.r*O)+r,F=(N?(d.r+d.r0)/2*k:d.r*k)+i;if(A=P+O*3,j=F+k*3,!N){var I=P+O*(T+c-d.r),L=F+k*(T+c-d.r),R=I+(O<0?-1:1)*E,z=L;A=x===`edge`?O<0?u+S:u+l-S:R+(O<0?-b:b),j=z,M=[[P,F],[I,L],[R,z]]}ee=N?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var te=Math.PI,ne=0,B=v.get(`rotate`);if(kt(B))ne=te/180*B;else if(y===`center`)ne=0;else if(B===`radial`||B===!0)ne=O<0?-D+te:-D;else if(B===`tangential`||B===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var V=Math.atan2(O,k);V<0&&(V=te*2+V),k>0&&B!==`tangential-noflip`&&(V=te+V),ne=V-te}if(a=!!ne,h.x=A,h.y=j,h.rotation=ne,h.setStyle({verticalAlign:`middle`}),N){h.setStyle({align:ee});var re=h.states.select;re&&(re.x+=h.x,re.y+=h.y)}else{var ie=new gr(0,0,0,0);gE(ie,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new nr(O,k),linePoints:M,textAlign:ee,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:ie,unconstrainedWidth:ie.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:N})}}),!a&&e.get(`avoidLabelOverlap`)&&mE(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(W(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(W(v.states,p),v.ignore=!0):(oE(x,g.minTurnAngle),sE(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new nr(x[0][0],x[0][1])})}}}var xE=Math.PI*2,SE=Math.PI/180,CE=Zl(`pie`,wE);function wE(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=rv(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*SE,d=e.get(`endAngle`),f=e.get(`padAngle`)*SE;d=d===`auto`?u-xE:-d*SE;var p=e.get(`minAngle`)*SE+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;is(S,!_),u=S[0],d=S[1];var w=TE(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e)){n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});return}r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?Cc(e,b,[c,s]):s}),O=i}),E<xE&&m){if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})}})}var TE=wl(),EE=function(e){H(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new Ys;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=U(_T(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle)){i.setShape(l);return}if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Kf(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Kf(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Gf(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Kf(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Zf(i),Gf(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),fd(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=U({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},_T(s.getModel(`itemStyle`),c)),U(i.ensureState(`select`),{x:p,y:m,shape:_T(o.getModel([`select`,`itemStyle`]),c)}),U(i.ensureState(`blur`),{shape:_T(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&U(g.ensureState(`select`),{x:p,y:m}),U(_.ensureState(`select`),{x:p,y:m}),cd(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Yp(r,Xp(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new _f,this.setTextGuideLine(d)),uE(this,dE(i),{stroke:s,opacity:Lt(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(lf),DE=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new lf({shape:pt(TE(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new EE(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){Xf(a.getItemGraphicEl(t),e,t)}).execute(),bE(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(ub);function OE(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(kt(r)&&!isNaN(r)&&r<0)})}}}function kE(e){e.registerChartView(DE),e.registerSeriesModel(ZT),WT(`pie`,e.registerAction),e.registerLayout(CE),e.registerProcessor(qT(`pie`)),e.registerProcessor(OE(`pie`))}var AE=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),jE=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new AE(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new AE(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new AE(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new AE(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new AE(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new AE(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ME=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,NE=[],PE=nn.browser.firefox&&+nn.browser.version.split(`.`)[0]<39;function FE(e,t,n,r){return n||={},r?IE(e,t,n):PE&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?IE(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function IE(e,t,n){if(nn.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Lg(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Pg(NE,e,r,i)){n.zrX=NE[0],n.zrY=NE[1];return}}n.zrX=n.zrY=0}function LE(e){return e||window.event}function RE(e,t,n){if(t=LE(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&FE(e,i,t,n)}else{FE(e,t,t,n);var a=zE(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&ME.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function zE(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function BE(e,t,n,r){e.addEventListener(t,n,r)}function VE(e,t,n,r){e.removeEventListener(t,n,r)}var HE=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function UE(e){return e.which===2||e.which===3}var WE=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=FE(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in qE)if(qE.hasOwnProperty(t)){var n=qE[t](this._track,e);if(n)return n}},e}();function GE(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function KE(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var qE={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=GE(r)/GE(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=KE(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},JE=`silent`;function YE(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:XE}}function XE(){HE(this.event)}var ZE=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(qa),QE=function(){function e(e,t){this.x=e,this.y=t}return e}(),$E=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],eD=new gr(0,0,0,0),tD=function(e){H(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new QE(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new ZE,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new jE(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(W($E,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=iD(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new QE(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new QE(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=YE(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new QE(e,t);if(rD(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new gr(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(eD.copy(u.getBoundingRect()),u.transform&&eD.applyTransform(u.transform),eD.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(rD(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new WE;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new QE;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(qa);W([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){tD.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=iD(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||Yn(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function nD(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||JE}return!1}function rD(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=nD(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==JE)){t.target=o;break}}}function iD(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var aD=32,oD=7;function sD(e){for(var t=0;e>=aD;)t|=e&1,e>>=1;return e+t}function cD(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;lD(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function lD(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function uD(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function dD(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function fD(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function pD(e,t){var n=oD,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=fD(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=dD(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=fD(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=dD(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=oD||m>=oD);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-fD(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-dD(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=oD||g>=oD);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function mD(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<aD){a=cD(e,n,r,t),uD(e,n,r,n+a,t);return}var o=pD(e,t),s=sD(i);do{if(a=cD(e,n,r,t),a<s){var c=i;c>s&&(c=s),uD(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var hD=!1;function gD(){hD||(hD=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function _D(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var vD=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=_D}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,mD(n,_D)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(gD(),p.z=0),isNaN(p.z2)&&(gD(),p.z2=0),isNaN(p.zlevel)&&(gD(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=_t(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),yD=nn.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function bD(){return new Date().getTime()}var xD=function(e){H(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=bD()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(yD(t),!e._paused&&e.update())}yD(t)},t.prototype.start=function(){this._running||(this._time=bD(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=bD(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=bD()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Ka(e,t.loop);return this.addAnimator(n),n},t}(qa),SD=300,CD=nn.domSupported,wD=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:G(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),TD={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},ED=!1;function DD(e){var t=e.pointerType;return t===`pen`||t===`touch`}function OD(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function kD(e){e&&(e.zrByTouch=!0)}function AD(e,t){return RE(e.dom,new MD(e,t),!0)}function jD(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var MD=function(){function e(e,t){this.stopPropagation=$t,this.stopImmediatePropagation=$t,this.preventDefault=$t,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),ND={mousedown:function(e){e=RE(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=RE(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=RE(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=RE(this.dom,e);var t=e.toElement||e.relatedTarget;jD(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){ED=!0,e=RE(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){ED||(e=RE(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=RE(this.dom,e),kD(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),ND.mousemove.call(this,e),ND.mousedown.call(this,e)},touchmove:function(e){e=RE(this.dom,e),kD(e),this.handler.processGesture(e,`change`),ND.mousemove.call(this,e)},touchend:function(e){e=RE(this.dom,e),kD(e),this.handler.processGesture(e,`end`),ND.mouseup.call(this,e),+new Date-this.__lastTouchMoment<SD&&ND.click.call(this,e)},pointerdown:function(e){ND.mousedown.call(this,e)},pointermove:function(e){DD(e)||ND.mousemove.call(this,e)},pointerup:function(e){ND.mouseup.call(this,e)},pointerout:function(e){DD(e)||ND.mouseout.call(this,e)}};W([`click`,`dblclick`,`contextmenu`],function(e){ND[e]=function(t){t=RE(this.dom,t),this.trigger(e,t)}});var PD={pointermove:function(e){DD(e)||PD.mousemove.call(this,e)},pointerup:function(e){PD.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function FD(e,t){var n=t.domHandlers;nn.pointerEventsSupported?W(wD.pointer,function(r){LD(t,r,function(t){n[r].call(e,t)})}):(nn.touchEventsSupported&&W(wD.touch,function(r){LD(t,r,function(i){n[r].call(e,i),OD(t)})}),W(wD.mouse,function(r){LD(t,r,function(i){i=LE(i),t.touching||n[r].call(e,i)})}))}function ID(e,t){nn.pointerEventsSupported?W(TD.pointer,n):nn.touchEventsSupported||W(TD.mouse,n);function n(n){function r(r){r=LE(r),jD(e,r.target)||(r=AD(e,r),t.domHandlers[n].call(e,r))}LD(t,n,r,{capture:!0})}}function LD(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,BE(e.domTarget,t,n,r)}function RD(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&VE(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var zD=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),BD=function(e){H(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new zD(t,ND),CD&&(r._globalHandlerScope=new zD(document,PD)),FD(r,r._localHandlerScope),r}return t.prototype.dispose=function(){RD(this._localHandlerScope),CD&&RD(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,CD&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ID(this,t):RD(t)}},t}(qa),VD={},HD={};function UD(e){delete HD[e]}function WD(e){if(!e)return!1;if(typeof e==`string`)return ya(e,1)<Xa;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=ya(t[i].color,1);return n/=r,n<Xa}return!1}var GD=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new vD,a=n.renderer||`canvas`;VD[a]||(a=wt(VD)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new VD[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!nn.node&&!nn.worker&&!s?new BD(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?nn.touchEventsSupported:!!l,d=44,f;u&&(f=X(n.pointerSize,d)),this.handler=new tD(i,o,c,o.root,f),this.animation=new xD({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=WD(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=bD(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=bD();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Vd&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,UD(this.id))},e}();function KD(e,t){var n=new GD(dt(),e,t);return HD[n.id]=n,n}function qD(e,t){VD[e]=t}var JD=``;typeof navigator<`u`&&(JD=navigator.platform||``);var YD=`rgba(0, 0, 0, 0.2)`,XD=Q.color.theme[0],ZD=ga(XD,null,null,.9),QD={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[ZD,XD],aria:{decal:{decals:[{color:YD,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:YD,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:YD,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:YD,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:YD,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:YD,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:JD.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},$D=Yt();function eO(e,t,n){var r=$D.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var tO,nO,rO,iO=`\0_ec_inner`,aO=1,oO=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new ym(r),this._locale=new ym(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=dO(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,dO(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?rO(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&W(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=Yt(),s=t&&t.replaceMergeMainTypeMap;Tm(this),W(e,function(e,t){e!=null&&(pv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?pt(e):mt(n[t],e,!0))}),s&&s.each(function(e,t){pv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),pv.topologicalTravel(a,pv.getAllClassMainTypes(),c,this);function c(t){var a=eO(this,t,il(e[t])),o=r.get(t),c=ll(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);xl(c,t,pv),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;W(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=pv.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=U({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),U(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&tO(this)}this._seriesIndices||tO(this)},t.prototype.getOption=function(){var e=pt(this.option);return W(e,function(t,n){if(pv.hasClass(n)){for(var r=il(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!bl(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[iO],e},t.prototype.setTheme=function(e){this._theme=new ym(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?St(a,function(e){return!!e}):lO(`name`,i,a):lO(`id`,r,a):(o=[],W(il(n),function(e){a[e]&&o.push(a[e])})),uO(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(uO(r?this.queryComponents(r):St(this._componentsMap.get(n),function(e){return!!e}),e));function i(e){var t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function a(t){return e.filter?St(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(q(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=J(e)?r.get(e):At(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=vl(e,null);return St(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return St(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return St(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){nO(this),W(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){W(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){nO(this),W(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return W(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return nO(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){nO(this);var n=[];W(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=Yt(n)},t.prototype.restoreData=function(e){tO(this);var t=this._componentsMap,n=[];t.each(function(e,t){pv.hasClass(t)&&n.push(t)}),pv.topologicalTravel(n,pv.getAllClassMainTypes(),function(n){W(t.get(n),function(t){t&&(n!==`series`||!sO(t,e))&&t.restoreData()})})},t.internalField=function(){tO=function(e){var t=e._seriesIndices=[];W(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Yt(t)},nO=function(e){},rO=function(e,t){e.option={},e.option[iO]=aO,e._componentsMap=Yt({series:[]}),e._componentsCount=Yt();var n=t.aria;At(n)&&n.enabled==null&&(n.enabled=!0),cO(t,e._theme.option),mt(t,QD,!1),e._mergeOption(t,null)}}(),t}(ym);function sO(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function cO(e,t){var n=e.color&&!e.colorLayer;W(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||pv.hasClass(r)||(typeof t==`object`?e[r]=e[r]?mt(e[r],t,!1):pt(t):e[r]??(e[r]=t))})}function lO(e,t,n){if(K(t)){var r=Yt();return W(t,function(e){e!=null&&vl(e,null)!=null&&r.set(e,!0)}),St(n,function(t){return t&&r.get(t[e])})}var i=vl(t,null);return St(n,function(t){return t&&i!=null&&t[e]===i})}function uO(e,t){return t.hasOwnProperty(`subType`)?St(e,function(e){return e&&e.subType===t.subType}):e}function dO(e){var t=Yt();return e&&W(il(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}yt(oO,_v);var fO=/^(min|max)?(.+)$/,pO=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(W(il(e.series),function(e){e&&e.data&&Y(e.data)&&Ut(e.data)}),W(il(e.dataset),function(e){e&&e.source&&Y(e.source)&&Ut(e.source)})),e=pt(e);var r=this._optionBackup,i=mO(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],pt(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=pt(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)hO(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!_O(a,this._currentMediaIndices)&&(o=G(a,function(e){return pt(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function mO(e,t,n){var r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&K(l)&&W(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),W(c,function(e){return f(e)}),W(r,function(e){return f(e.option)});function f(e){W(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function hO(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return W(e,function(e,t){var n=t.match(fO);if(!(!n||!n[1]||!n[2])){var a=n[1];gO(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function gO(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function _O(e,t){return e.join(`,`)===t.join(`,`)}var vO=W,yO=At,bO=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function xO(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=bO.length;n<r;n++){var i=bO[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?mt(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?mt(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function SO(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,gt(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function CO(e){SO(e,`itemStyle`),SO(e,`lineStyle`),SO(e,`areaStyle`),SO(e,`label`),SO(e,`labelLine`),SO(e,`upperLabel`),SO(e,`edgeLabel`)}function wO(e,t){var n=yO(e)&&e[t],r=yO(n)&&n.textStyle;if(r)for(var i=0,a=ol.length;i<a;i++){var o=ol[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function TO(e){e&&(CO(e),wO(e,`label`),e.emphasis&&wO(e.emphasis,`label`))}function EO(e){if(yO(e)){xO(e),CO(e),wO(e,`label`),wO(e,`upperLabel`),wO(e,`edgeLabel`),e.emphasis&&(wO(e.emphasis,`label`),wO(e.emphasis,`upperLabel`),wO(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(xO(t),TO(t));var n=e.markLine;n&&(xO(n),TO(n));var r=e.markArea;r&&TO(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!Y(a))for(var o=0;o<a.length;o++)TO(a[o]);W(e.categories,function(e){CO(e)})}if(i&&!Y(i))for(var o=0;o<i.length;o++)TO(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)TO(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)K(c[o])?(TO(c[o][0]),TO(c[o][1])):TO(c[o]);e.type===`gauge`?(wO(e,`axisLabel`),wO(e,`title`),wO(e,`detail`)):e.type===`treemap`?(SO(e.breadcrumb,`itemStyle`),W(e.levels,function(e){CO(e)})):e.type===`tree`&&CO(e.leaves)}}function DO(e){return K(e)?e:e?[e]:[]}function OO(e){return(K(e)?e[0]:e)||{}}function kO(e,t){vO(DO(e.series),function(e){yO(e)&&EO(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),vO(n,function(t){vO(DO(e[t]),function(e){e&&(wO(e,`axisLabel`),wO(e.axisPointer,`label`))})}),vO(DO(e.parallel),function(e){var t=e&&e.parallelAxisDefault;wO(t,`axisLabel`),wO(t&&t.axisPointer,`label`)}),vO(DO(e.calendar),function(e){SO(e,`itemStyle`),wO(e,`dayLabel`),wO(e,`monthLabel`),wO(e,`yearLabel`)}),vO(DO(e.radar),function(e){wO(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),vO(DO(e.geo),function(e){yO(e)&&(TO(e),vO(DO(e.regions),function(e){TO(e)}))}),vO(DO(e.timeline),function(e){TO(e),SO(e,`label`),SO(e,`itemStyle`),SO(e,`controlStyle`,!0);var t=e.data;K(t)&&W(t,function(e){At(e)&&(SO(e,`label`),SO(e,`itemStyle`))})}),vO(DO(e.toolbox),function(e){SO(e,`iconStyle`),vO(e.feature,function(e){SO(e,`iconStyle`)})}),wO(OO(e.axisPointer),`label`),wO(OO(e.tooltip).axisPointer,`label`)}function AO(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function jO(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function MO(e){e&&W(NO,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var NO=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],PO=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],FO=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function IO(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<FO.length;n++){var r=FO[n][1],i=FO[n][0];t[r]!=null&&(t[i]=t[r])}}function LO(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function RO(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function zO(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function BO(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&BO(e[n].children,t)}function VO(e,t){kO(e,t),e.series=il(e.series),W(e.series,function(e){if(At(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),LO(e.label);var n=e.data;if(n&&!Y(n))for(var r=0;r<n.length;r++)LO(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=AO(e,`pointer.color`);i!=null&&jO(e,`itemStyle.color`,i)}else if(t===`bar`){IO(e),IO(e.backgroundStyle),IO(e.emphasis);var n=e.data;if(n&&!Y(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(IO(n[r]),IO(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),RO(e),BO(e.data,RO)}else t===`graph`||t===`sankey`?zO(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&>(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),MO(e)}}),e.dataRange&&(e.visualMap=e.dataRange),W(PO,function(t){var n=e[t];n&&(K(n)||(n=[n]),W(n,function(e){MO(e)}))})}var HO=Ql(UO);function UO(e){var t=Yt();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),W(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),WO(e))})}function WO(e){W(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Pc(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var GO=function(){function e(){this.group=new Vd,this.uid=Cg(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();dn(GO),vn(GO);var KO=wl(),qO={itemStyle:yn(gm,!0),lineStyle:yn(pm,!0)},JO={lineStyle:`stroke`,itemStyle:`fill`};function YO(e,t){return e.visualStyleMapper||qO[t]||(console.warn(`Unknown style type '`+t+`'.`),qO.itemStyle)}function XO(e,t){return e.visualDrawType||JO[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var ZO={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=YO(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=XO(e,r),c=a[s],l=q(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||q(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||q(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=U({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},QO=new ym,$O={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=YO(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){QO.option=n[r];var o=i(QO);U(e.ensureUniqueItemVisual(t,`style`),o),QO.option.decal&&(e.setItemVisual(t,`decal`,QO.option.decal),QO.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},ek={performRawSeries:!0,overallReset:function(e){var t=Yt();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();KO(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=KO(e).scope,a=XO(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},tk=Math.PI;function nk(e,t){t||={},gt(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Vd,r=new Ws({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Ys({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ws({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Ef({shape:{startAngle:-tk/2,endAngle:-tk/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:tk*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:tk*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var rk=function(){function e(e,t,n,r){this._stageTaskMap=Yt(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Xl(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Yt();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;W(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Bt(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;W(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Yt(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||Tv({plan:ck,reset:lk,count:fk}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Tv({reset:ik});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Yt(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Bt(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):W(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,Tv({reset:ak,onDirty:sk})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return q(e)&&(e={overallReset:e,seriesType:pk(e)}),e.uid=Cg(`stageHandler`),t&&(e.visualType=t),e},e}();function ik(e){e.overallReset(e.ecModel,e.api,e.payload)}function ak(e){return e.dirtyOnOverallProgress&&ok}function ok(){this.agent.dirty(),this.getDownstream().dirty()}function sk(){this.agent&&this.agent.dirty()}function ck(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function lk(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=il(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?G(t,function(e,t){return dk(t)}):uk}var uk=dk(0);function dk(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function fk(e){return e.data.count()}function pk(e){gk=null;try{e(mk,hk)}catch{}return gk}var mk={},hk={},gk;_k(mk,oO),_k(hk,uu),mk.eachSeriesByType=mk.eachRawSeriesByType=function(e){gk=e},mk.eachComponent=function(e){e.mainType===`series`&&e.subType&&(gk=e.subType)};function _k(e,t){for(var n in t.prototype)e[n]=$t}var $=Q.darkColor,vk=$.background,yk=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},bk={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},xk={darkMode:!0,color:$.theme,backgroundColor:vk,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50},feature:{dataView:{backgroundColor:vk,textColor:$.primary,textareaColor:$.background,textareaBorderColor:$.border,buttonColor:$.accent50,buttonTextColor:$.neutral00}}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:bk,y:bk,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:yk(),logAxis:yk(),valueAxis:yk(),categoryAxis:yk(),line:{symbol:`circle`},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:$.background}},radar:function(){var e=yk();return e.axisName={color:$.axisLabel},e.axisLine.lineStyle.color=$.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};xk.categoryAxis.splitLine.show=!1;var Sk=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(J(e)){var i=cn(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};W(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Ck=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],wk=Ck.concat([`symbolKeepAspect`]),Tk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<Ck.length;o++){var s=Ck[o],c=e.get(s);q(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(U({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=wt(i);function u(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?u:null}}},Ek={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<wk.length;r++){var i=wk[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function Dk(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n)}}function Ok(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t)}}function kk(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var Ak=new qa,jk={};function Mk(e,t){jk[e]=t}function Nk(e){return jk[e]}var Pk={};function Fk(e,t){Pk[e]=t}function Ik(e){return Pk[e]}var Lk=Math.round(Math.random()*9),Rk=typeof Object.defineProperty==`function`,zk=function(){function e(){this._id=`__ec_inner_`+Lk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return Rk?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}();function Bk(e){return isFinite(e)}function Vk(e,t,n){var r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=Bk(r)?r:0,i=Bk(i)?i:1,a=Bk(a)?a:0,o=Bk(o)?o:0,e.createLinearGradient(r,a,i,o)}function Hk(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=Bk(o)?o:.5,s=Bk(s)?s:.5,c=c>=0&&Bk(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Uk(e,t,n){for(var r=t.type===`radial`?Hk(e,t,n):Vk(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function Wk(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function Gk(e){return parseInt(e,10)}function Kk(e,t,n){var r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Gk(s[r])||Gk(e.style[r]))-(Gk(s[a])||0)-(Gk(s[o])||0)||0}function qk(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:kt(e)?[e]:K(e)?e:null}function Jk(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&qk(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=G(n,function(e){return e/i}),r/=i)}return[n,r]}var Yk=new as(!0);function Xk(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Zk(e){return typeof e==`string`&&e!==`none`}function Qk(e){var t=e.fill;return t!=null&&t!==`none`}function $k(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function eA(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function tA(e,t,n){var r=Dn(t.image,t.__image,n);if(kn(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*en),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function nA(e,t,n,r,i){var a,o=Xk(n),s=Qk(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Yk,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?Uk(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Uk(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?tA(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?tA(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Jk(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&eA(e,n),s&&$k(e,n)):(s&&$k(e,n),o&&eA(e,n)),T&&e.setLineDash([])}function rA(e,t,n){var r=t.__image=Dn(n.image,t.__image,t,t.onload);if(!(!r||!kn(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function iA(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Jk(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Xk(n)&&e.strokeText(i,n.x,n.y),Qk(n)&&e.fillText(i,n.x,n.y)):(Qk(n)&&e.fillText(i,n.x,n.y),Xk(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var aA=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],oA=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function sA(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){vA(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?yo.opacity:o}(r||t.blend!==n.blend)&&(a||=(vA(e,i),!0),e.globalCompositeOperation=t.blend||yo.blend);for(var s=0;s<aA.length;s++){var c=aA[s];(r||t[c]!==n[c])&&(a||=(vA(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(vA(e,i),!0),e.shadowColor=t.shadowColor||yo.shadowColor),a}function cA(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=sA(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(vA(e,i),!0),Zk(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(vA(e,i),!0),Zk(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(vA(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(vA(e,i),!0),e.lineWidth=c)}for(var l=0;l<oA.length;l++){var u=oA[l],d=u[0];(r||a[d]!==o[d])&&(s||=(vA(e,i),!0),e[d]=a[d]||u[1])}return s}function lA(e,t,n,r,i){return sA(e,t.style,n&&n.style,r,i)}function uA(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function dA(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),uA(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function fA(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var pA=1,mA=2,hA=3,gA=4;function _A(e){var t=Qk(e),n=Xk(e);return!(e.lineDash||!(+t^n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function vA(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function yA(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};bA(e,t,n),xA(e,n)}function bA(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||Wk(i,a))&&(a&&(vA(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(vA(e,n),e.save(),dA(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped){t.__dirty&=-2,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof As&&t.autoBatch&&_A(o);s||fA(r,l.transform)?(vA(e,n),uA(e,t)):u||vA(e,n),t instanceof As?(n.lastDrawType!==pA&&(c=!0,n.lastDrawType=pA),cA(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),nA(e,t,o,u,n)):t instanceof Ms?(n.lastDrawType!==hA&&(c=!0,n.lastDrawType=hA),cA(e,t,l,c,n),iA(e,t,o)):t instanceof Is?(n.lastDrawType!==mA&&(c=!0,n.lastDrawType=mA),lA(e,t,l,c,n),rA(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==gA&&(c=!0,n.lastDrawType=gA),SA(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&vA(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function xA(e,t){vA(e,t),t.prevElClipPaths&&e.restore()}function SA(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),bA(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}xA(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),bA(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}xA(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var CA=new zk,wA=new wn(100),TA=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function EA(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&CA.delete(e);var a=CA.get(e);if(a)return a;var o=gt(e,{symbol:`rect`,symbolSize:1,symbolKeepAspect:!0,color:`rgba(0, 0, 0, 0.2)`,backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor===`none`&&(o.backgroundColor=null);var s={repeat:`repeat`};return c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,CA.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<TA.length;++s){var c=o[TA[s]];if(c!=null&&!K(c)&&!J(c)&&!kt(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=wA.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=OA(o.dashArrayX),f=kA(o.dashArrayY),p=DA(o.symbol),m=AA(d),h=jA(f),g=!i&&Ze.createCanvas(),_=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},v=b(),y;g&&(g.width=v.width*n,g.height=v.height*n,y=g.getContext(`2d`)),x(),a&&wA.put(l,g||_),e.image=g,e.svgElement=_,e.svgWidth=v.width,e.svgHeight=v.height;function b(){for(var e=1,t=0,n=m.length;t<n;++t)e=qc(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=qc(r,p[t].length);e*=r;var i=h*m.length*p.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function x(){y&&(y.clearRect(0,0,g.width,g.height),o.backgroundColor&&(y.fillStyle=o.backgroundColor,y.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(e<=0)return;for(var a=-h,s=0,c=0,l=0;a<v.height;){if(s%2==0){for(var u=c/2%p.length,m=0,b=0,x=0;m<v.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(b%2==0){var C=(1-o.symbolSize)*.5,w=m+d[l][b]*C,T=a+f[s]*C,E=d[l][b]*o.symbolSize,D=f[s]*o.symbolSize,O=x/2%p[u].length;k(w,T,E,D,p[u][O])}m+=d[l][b],++x,++b,b===d[l].length&&(b=0)}++l,l===d.length&&(l=0)}a+=f[s],++c,++s,s===f.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=jy(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&_.children.push(d)}else yA(y,u)}}}}function DA(e){if(!e||e.length===0)return[[`rect`]];if(J(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!J(e[n])){t=!1;break}if(t)return DA([e]);for(var r=[],n=0;n<e.length;++n)J(e[n])?r.push([e[n]]):r.push(e[n]);return r}function OA(e){if(!e||e.length===0)return[[0,0]];if(kt(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!kt(e[r])){n=!1;break}if(n)return OA([e]);for(var i=[],r=0;r<e.length;++r)if(kt(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=G(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function kA(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(kt(e)){var t=Math.ceil(e);return[t,t]}var n=G(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function AA(e){return G(e,function(e){return jA(e)})}function jA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var MA=Ql(NA);function NA(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=EA(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=EA(i,t)}}})}var PA=1,FA=800,IA=900,LA=920,RA=1e3,zA=2e3,BA=5e3,VA=1e3,HA=1100,UA=2e3,WA=3e3,GA=4e3,KA=4500,qA=4600,JA=5e3,YA=6e3,XA=7e3,ZA={PROCESSOR:{SERIES_FILTER:FA,AXIS_STATISTICS:LA,FILTER:RA,STATISTIC:BA,STATISTICS:BA},VISUAL:{LAYOUT:VA,PROGRESSIVE_LAYOUT:HA,GLOBAL:UA,CHART:WA,POST_CHART_LAYOUT:qA,COMPONENT:GA,BRUSH:JA,CHART_ITEM:KA,ARIA:YA,DECAL:XA}},QA=`__flagInMainProcess`,$A=`__mainProcessVersion`,ej=`__pendingUpdate`,tj=`__needsUpdateStatus`,nj=/^[a-zA-Z0-9_]+$/,rj=`__connectUpdateStatus`,ij=0,aj=1,oj=2;function sj(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return lj(this,e,t)}}function cj(e){return function(){var t=[...arguments];return lj(this,e,t)}}function lj(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),qa.prototype[t].apply(e,n)}var uj=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(qa),dj=uj.prototype;dj.on=cj(`on`),dj.off=cj(`off`);var fj,pj,mj,hj,gj,_j,vj,yj,bj,xj,Sj,Cj,wj,Tj,Ej,Dj,Oj,kj,Aj,jj=function(e){H(t,e);function t(t,n,r){var i=e.call(this,new Sk)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[$A]=1,r.ssr;var c=i._zr=KD(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:X(r.useDirtyRect,s),useCoarsePointer:X(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=cT(Et(c.flush,c),17),i._updateTheme(n),i._locale=Xg(r.locale||Jg),i._coordSysMgr=new ng;var l=i._api=Ej(i);function u(e,t){return e.__prio-t.__prio}return mD(zj,u),mD(Lj,u),i._scheduler=new rk(i,l,Lj,zj),i._messageCenter=new uj,i._initEvents(),i.resize=Et(i.resize,i),c.animation.on(`frame`,i._onframe,i),xj(c,i),Sj(c,i),Ut(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(kj(this),this[ej]){var r=this[ej].silent;this[QA]=!0,Aj(this);try{fj(this),hj.update.call(this,null,this[ej].updateParams)}catch(e){throw this[QA]=!1,this[ej]=null,e}this._zr.flush(),this[QA]=!1,this[ej]=null,yj.call(this,r),bj.call(this,r)}else if(e.unfinished){var i=PA;do{e.unfinished=!1;var a=Ze.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),_j(this,t),e.performVisualTasks(t),Tj(this,this._model,n,`remain`,{}),i-=Ze.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[QA]){if(this._disposed){this.id;return}var r,i,a;if(At(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[QA]=!0,Aj(this),!this._model||t){var o=new pO(this._api),s=this._theme,c=this._model=new oO;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},Rj);var l={seriesTransition:a,optionChanged:!0};if(n)this[ej]={silent:r,updateParams:l},this[QA]=!1,this.getZr().wakeUp();else{try{fj(this),hj.update.call(this,null,l)}catch(e){throw this[ej]=null,this[QA]=!1,e}this._ssr||this._zr.flush(),this[ej]=null,this[QA]=!1,yj.call(this,r),bj.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[QA]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[ej]&&(r??=this[ej].silent,i=this[ej].updateParams,this[ej]=null),this[QA]=!0,Aj(this);try{this._updateTheme(e),n.setTheme(this._theme),fj(this),hj.update.call(this,{type:`setTheme`},i)}catch(e){throw this[QA]=!1,e}this[QA]=!1,yj.call(this,r),bj.call(this,r)}}},t.prototype._updateTheme=function(e){J(e)&&(e=Bj[e]),e&&(e=pt(e),e&&VO(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||nn.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return W(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;W(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return W(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(Uj[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();W(Hj,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(pt(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Ze.createCanvas(),h=KD(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return W(u,function(e){var t=e.left-o,n=e.top-s;g+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Ws({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),W(u,function(e){var t=new Is({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return gj(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return gj(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return gj(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return W(El(n,e),function(e,n){n.indexOf(`Models`)>=0&&W(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=El(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?Ok(i,t):Dk(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;W(Nj,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&kk(i,function(e){var t=$l(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=U({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;W(Ij,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),KT(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&jl(this.getDom(),Gj,``);var e=this,t=e._api,n=e._model;W(e._componentsViews,function(e){e.dispose(n,t)}),W(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Hj[e.id]},t.prototype.resize=function(e){if(!this[QA]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[ej]&&(r??=this[ej].silent,n=!0,this[ej]=null),this[QA]=!0,Aj(this);try{n&&fj(this),hj.update.call(this,{type:`resize`,animation:U({duration:0},e&&e.animation)})}catch(e){throw this[QA]=!1,e}this[QA]=!1,yj.call(this,r),bj.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(At(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),Vj[e]){var n=Vj[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=U({},e);return t.type=Fj[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(At(t)||(t={silent:!!t}),Pj[e.type]&&this._model){if(this[QA]){this._pendingActions.push(e);return}var n=t.silent;vj.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&nn.browser.weChat&&this._throttledZrFlush(),yj.call(this,n),bj.call(this,n)}},t.prototype.updateLabelLayout=function(){Ak.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){fj=function(e){NS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),pj(e,!0),pj(e,!1),t.plan()},pj=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=cn(e.type);u=new(t?GO.getClass(d.main,d.sub):ub.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},mj=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){W([].concat(e._componentsViews,e._chartsViews),l);return}var o=Al(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=Yt(),W(il(s),function(e){var t=vl(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(_d(n)){if(t instanceof gy)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&$u(t,n,e._api);else{var r=ed(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&Qu(t.mainType,t.componentIndex,e._api),a&&W(a,function(e){n.type===`highlight`?Uu(e):Wu(e)})}}else gd(n)&&t instanceof gy&&(rd(t,n,e._api),id(t),Oj(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},hj={prepareAndUpdate:function(e){fj(this),hj.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){PS(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),Ak.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),_j(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),Cj(this,r,i,e,n),Ak.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}}});var a=Yt();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),Tj(t,n,r,e,{},a),Ak.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),ub.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),Cj(this,n,this._api,e,{}),Ak.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),ub.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),Ak.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){hj.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed){e.id;return}for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=El(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}gj=e,_j=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},vj=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=Pj[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&cn(s[0]);this[QA]=!0,Aj(this);var u=[e],d=!1;e.batch&&(d=!0,u=G(e.batch,function(t){return t=gt(U({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=gd(e),_=_d(e);if(_&&Xu(this._api),W(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=U({},t),p.type=h,f.push(p),_){var a=Dl(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;mj(n,c,t,u),Oj(n)}else g?(mj(n,c,t,`series`),Oj(n)):l&&mj(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[ej]?(fj(this),hj.update.call(this,e),this[ej]=null):hj[c].call(this,e)}catch(e){throw this[QA]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[QA]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;Bt(At(y)),v=gt({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},yj=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();vj.call(this,n,e)}},bj=function(e){!e&&this.trigger(`updated`)},xj=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[ej]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},Sj=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=kk(n,md);r&&(td(r,e,t._api),Oj(t))}).on(`mouseout`,function(e){var n=e.target,r=kk(n,md);r&&(nd(r,e,t._api),Oj(t))}).on(`click`,function(e){var n=e.target,r=kk(n,function(e){return $l(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=$l(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;mD(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),W(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}Cj=function(e,t,r,i,a){n(t),wj(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive=!1}),Tj(e,t,r,i,a),W(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},wj=function(e,t,n,r,i,a){W(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},Tj=function(e,t,n,r,l,u){var d=e._scheduler;l=U(l||{},{updatedSeries:t.getSeries()}),Ak.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),s(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),a(t,n),id(t)}),d.unfinished=f||d.unfinished,Ak.trigger(`series:layoutlabels`,t,n,l),Ak.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];o(t,n),c(t,n)}),i(e,t),Ak.trigger(`series:afterupdate`,t,n,l)},Oj=function(e){e[tj]=!0,e.getZr().wakeUp()},Aj=function(e){e[$A]=(e[$A]+1)%1e6},kj=function(e){e[tj]&&(e.getZr().storage.traverse(function(e){qf(e)||r(e)}),e[tj]=!1)};function r(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i!==`emphasis`&&i!==`blur`&&i!==`select`&&t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function i(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>X(t.get(`hoverLayerThreshold`),QD.hoverLayerThreshold)&&!nn.node&&!nn.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Rp(e);t.eachRendered(function(e){return Bp(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!qf(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(qf(e))return;if(e instanceof As&&vd(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}Ej=function(e){return new(function(t){H(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Uu(t,n),Oj(e)},n.prototype.leaveEmphasis=function(t,n){Wu(t,n),Oj(e)},n.prototype.enterBlur=function(t){Gu(t),Oj(e)},n.prototype.leaveBlur=function(t){Ku(t),Oj(e)},n.prototype.enterSelect=function(t){qu(t),Oj(e)},n.prototype.leaveSelect=function(t){Ju(t),Oj(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[$A]},n.prototype.usingTHL=function(){return e._usingTHL},n}(uu))(e)},Dj=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[rj]=t}}W(Fj,function(n,r){e._messageCenter.on(r,function(n){if(Uj[e.group]&&e[rj]!==ij){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];W(Hj,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,ij),W(i,function(e){e[rj]!==aj&&e.dispatchAction(r)}),t(i,oj)}})})}}(),t}(qa),Mj=jj.prototype;Mj.on=sj(`on`),Mj.off=sj(`off`),Mj.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var Nj=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],Pj={},Fj={},Ij={},Lj=[],Rj=[],zj=[],Bj={},Vj={},Hj={},Uj={},Wj=new Date-0;new Date-0;var Gj=`_echarts_instance_`;function Kj(e,t,n){var r=!(n&&n.ssr);if(r){var i=qj(e);if(i)return i}var a=new jj(e,t,n);return a.id=`ec_`+Wj++,Hj[a.id]=a,r&&jl(e,Gj,a.id),Dj(a),Ak.trigger(`afterinit`,a),a}function qj(e){return Hj[Ml(e,Gj)]}function Jj(e,t){Bj[e]=t}function Yj(e){_t(Rj,e)<0&&Rj.push(e)}function Xj(e,t){aM(Lj,e,t,zA)}function Zj(e){$j(`afterinit`,e)}function Qj(e){$j(`afterupdate`,e)}function $j(e,t){Ak.on(e,t)}function eM(e,t,n){var r,i,a,o,s;q(t)&&(n=t,t=``),At(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;Pj[r]||(Bt(nj.test(r)&&nj.test(i)),a&&Bt(i!==r),Pj[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},Ij[i]=1,a&&s&&(Ij[l]=1),Fj[l]=r)}function tM(e,t){ng.register(e,t)}function nM(e,t){aM(zj,e,t,VA,`layout`,!0)}function rM(e,t){aM(zj,e,t,WA,`visual`,!0)}var iM=[];function aM(e,t,n,r,i,a){if((q(t)||At(t))&&(n=t,t=r),!(_t(iM,n)>=0)){iM.push(n);var o=rk.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function oM(e,t){Vj[e]=t}function sM(e,t,n){var r=Nk(`registerMap`);r&&r(e,t,n)}var cM=Fv;rM(UA,ZO),rM(KA,$O),rM(KA,ek),rM(UA,Tk),rM(KA,Ek),rM(XA,MA),Yj(VO),Xj(IA,HO),oM(`default`,nk),eM({type:vu,event:vu,update:vu},$t),eM({type:yu,event:yu,update:yu},$t),eM({type:bu,event:Cu,update:bu,action:$t,refineEvent:lM,publishNonRefinedEvent:!0}),eM({type:xu,event:Cu,update:xu,action:$t,refineEvent:lM,publishNonRefinedEvent:!0}),eM({type:Su,event:Cu,update:Su,action:$t,refineEvent:lM,publishNonRefinedEvent:!0});function lM(e,t,n,r){return{eventContent:{selected:ad(n),isFromClick:t.isFromClick||!1}}}Jj(`default`,{}),Jj(`dark`,xk);var uM=[],dM={registerPreprocessor:Yj,registerProcessor:Xj,registerPostInit:Zj,registerPostUpdate:Qj,registerUpdateLifecycle:$j,registerAction:eM,registerCoordinateSystem:tM,registerLayout:nM,registerVisual:rM,registerTransform:cM,registerLoading:oM,registerMap:sM,registerImpl:Mk,PRIORITY:ZA,ComponentModel:pv,ComponentView:GO,SeriesModel:gy,ChartView:ub,registerComponentModel:function(e){pv.registerClass(e)},registerComponentView:function(e){GO.registerClass(e)},registerSeriesModel:function(e){gy.registerClass(e)},registerChartView:function(e){ub.registerClass(e)},registerCustomSeries:function(e,t){Fk(e,t)},registerSubTypeDefaulter:function(e,t){pv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){qD(e,t)}};function fM(e){if(K(e)){W(e,function(e){fM(e)});return}_t(uM,e)>=0||(uM.push(e),q(e)&&(e={install:e}),e.install(dM))}var pM=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),mM=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ol).models[0]},t.type=`cartesian2dAxis`,t}(pv);yt(mM,pM);var hM={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},gM=mt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},hM),_M=mt({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},hM),vM={category:gM,value:_M,time:mt({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},_M),log:gt({logBase:10},_M)};function yM(e,t,n,r){W(Sx,function(i,a){var o=mt(mt({},vM[a],!0),r,!0),s=function(e){H(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=cv(this),r=n?uv(e):{};mt(e,t.getTheme().get(a+`Axis`)),mt(e,this.getDefaultOption()),e.type=bM(e),n&&lv(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Db.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=kC();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,bM)}function bM(e){return e.type||(e.data?`category`:`value`)}var xM=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),St(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),SM=[`x`,`y`];function CM(e){return(e.type===`interval`||e.type===`time`)&&!r_(e)}var wM=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Uw,t.dimensions=SM,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!CM(e)||!CM(t))){var n=Pb(e,null),r=Pb(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Ln([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new gr(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return $n(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return $n(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new gr(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(xM);function TM(e,t){var n=e.scale,r=e.model,i=Aw(n,r,r.ecModel,e,null),a=Ub(n),o=Ub(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=mc(l[0].value-l[1].value),g=mc(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=Yb(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*pc(c,2):Gb(E),D=Kb(E)}function j(){w=Oc(k-E*f,D)}function M(){T=Oc(O+E*p,D)}function ee(){k=f?Oc(w+E*f,D):w}function N(){O=p?Oc(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var P=e.getExtent(),F=mc(P[1]-P[0]);D=Mc([T,w],F,.5/m),ee(),N(),Jc(D)&&(E=Oc(E,D))}else{var I=C[1]-C[0];E=a?pc(Bc(I),1):Hc(I/m,2),D=Kb(E),b[0]?(w=C[0],A(function(){if(ee(),O=Oc(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=Oc(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Oc(_c(C[0]/E)*E,D),O=Oc(gc(C[1]/E)*E,D);var e=hc((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=gc(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Oc(k-E*n[0],D),O=Oc(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}zx(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function EM(e,t){var n=Ub(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Yb(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?OM(r,t):DM(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Kb(d)),i[0]||(s[0]=Oc(gc(s[0]/u)*u,l)),i[1]||(s[1]=Oc(_c(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),zx(e,i,o,s,a,c)}function DM(e,t){var n=Zb(t.splitNumber,5),r=Ib(e),i=t.minInterval,a=t.maxInterval,o=Hc(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Kb(o),c=e.getExtent(),l=[Oc(_c(c[0]/o)*o,s),Oc(gc(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function OM(e,t){var n=Zb(t.splitNumber,10),r=e.getExtent(),i=Ib(e),a=pc(Bc(i),1);n/i*a<=.5&&(a*=10);var o=Kb(a),s=[Oc(_c(r[0]/a)*a,o),Oc(gc(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function kM(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;AM(t,n,r,i,null)}function AM(e,t,n,r,i){var a=Aw(e,t,r,n,i),o=Vb(e)||Hb(e);jM(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Mw(n,e,a,r)}function jM(e,t){MM[e.type](e,t)}var MM={interval:EM,log:EM,time:mx,ordinal:$t},NM=[[3,1],[0,2]],PM=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=SM,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;W(this._axesList,function(e){ww(e,1);var t=e.scale;Wb(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=wt(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):kM(i)}W(n,function(e){zM(e,e.__alignTo)?kM(e):TM(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};W(n.x,function(e){IM(n,`y`,e,i)}),W(n.y,function(e){IM(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=ov(e,t),i=this._rect=iv(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(VM(a,i),!n){var c=GM(i,o,a,s,t),l=void 0;if(s)UM?(UM(this._axesList,i),VM(a,i)):l=WM(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=qM(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=WM(d,f,p,i,a,c,r))}KM(i,a,fS.determine,null,l,r),W(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}At(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Ol).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Ol).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,_t(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,W(o.x,function(t,n){W(o.y,function(i,a){var o=`x`+n+`y`+a,s=new wM(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),RM(o.x),RM(o.y);function c(t){return function(n,r){if(FM(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=Tx(n),u=new dC(t,Ex(n,l,!0),[0,0],l,c);u.onBand=Vx(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return W(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);_t(t,i)<0&&t.push(i),_t(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),W(o._axesList,function(t){Cw(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;cg({targetModel:e,coordSysType:Uw,coordSysProvider:r});function r(){var r=fw(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&($S(t,e,Uw),$S(n,e,Uw))},this),r},e.dimensions=SM,e.dimIdxMap=Nh(SM),e}();function FM(e,t){return e.getCoordSysModel()===t}function IM(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)LM(s,i[c])&&(a=i[c]);else for(var l in i)if(Z(i,l)&&LM(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function LM(e,t){if(!t)return!1;var n=t.scale,r=Dx(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&kx(t)&&(i=!1),i}function RM(e){for(var t=wt(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Bb(a.scale)&&Lx(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&W(r,function(e){e.__alignTo=n})}function zM(e,t){return r_(e.scale)||r_(t.scale)||t.scale.getTicks().length<2}function BM(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function VM(e,t){W(e.x,function(e){return HM(e,t.x,t.width)}),W(e.y,function(e){return HM(e,t.y,t.height)})}function HM(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),BM(e,t)}var UM;function WM(e,t,n,r,i,a,o){KM(r,i,fS.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Ct(s,function(e){return e>0})==null;return Op(r,s,!0,!0,n),VM(i,r),c;function l(e){W(i[ep[e]],function(t){if(Ix(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Bx(t.scale,PC(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Fx(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[ep[n]]-t[ep[n]],a=t[tp[n]]+t[ep[n]]-(e[tp[n]]+e[ep[n]]);i=d(i,1-r),a=d(a,r);var o=NM[n][0],c=NM[n][1];s[o]=pc(s[o],i),s[c]=pc(s[c],a)}function d(e,t){return e>0&&!Ft(t)&&t>1e-4&&(e/=t),e}}function GM(e,t,n,r,i){var a=new IC(JM);return W(n,function(n){return W(n,function(n){if(Ix(n.model)){var o=!r;n.axisBuilder=pw(e,t,n.model,i,a,o)}})}),a}function KM(e,t,n,r,i,a){var o=n===fS.determine;W(t,function(t){return W(t,function(t){Ix(t.model)&&(mw(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[ep[1-t]]=e[tp[t]]<=a.refContainer[tp[t]]*.5?0:1-t==1?2:1}W(t,function(e,t){return W(e,function(e){Ix(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function qM(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=iv(e.get(`outerBounds`,!0)||Vw,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||_t([`all`,`axisLabel`],a)<0?`all`:a,s=[Ec(X(e.get(`outerBoundsClampWidth`,!0),Hw[0]),t.width),Ec(X(e.get(`outerBoundsClampHeight`,!0),Hw[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var JM=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;BC(e,t,n,r,i,a),Fx(e.nameLocation)||W(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&HC(e.labelInfoList,e.dirVec,r,i)})};function YM(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return XM(n,e,t),n.seriesInvolved&&QM(n,e),n}function XM(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];W(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=aN(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(W(n.getAxes(),Dt(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&W(f.baseAxes,Dt(p,!d||`cross`,u)),d&&W(f.otherAxes,Dt(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!iN(d))){s??=d.get(`triggerTooltip`),d=r?ZM(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=aN(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:iN(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=$M(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function ZM(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};W(s,function(e){c[e]=pt(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&>(l,u.textStyle)}return e.model.getModel(`axisPointer`,new ym(c,n,r))}function QM(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||W(e.coordSysAxesInfo[aN(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function $M(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(eN(a[r+`AxisId`],n.id)||eN(a[r+`AxisIndex`],n.componentIndex)||eN(a[r+`AxisName`],n.name))return i}}function eN(e,t){return e===`all`||K(e)&&_t(e,t)>=0||e===t}function tN(e){var t=nN(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=iN(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function nN(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[aN(e)]}function rN(e){var t=nN(e);return t&&t.axisPointerModel}function iN(e){return!!e.get([`handle`,`show`])}function aN(e){return e.type+`||`+e.id}var oN={},sN=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&tN(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=rN(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){oN[e]=t},t.getAxisPointerClass=function(e){return e&&oN[e]},t.type=`axis`,t}(GO),cN=wl();function lN(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=cN(e).splitAreaColors,f=Yt(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=K(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new Ws({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:gt({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}cN(e).splitAreaColors=f}}}function uN(e){cN(e).splitAreaColors=null}var dN=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],fN=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new Vd,this.group.add(this._axisGroup),Ix(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),W(dN,function(e){t.get([e,`show`])&&pN[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||bp(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){uN(this)},t.type=`cartesianAxis`,t}(sN),pN={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=K(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new bf({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:gt({stroke:c[x]},_),silent:!0});fp(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new bf({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});fp(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){lN(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=kC(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},mN=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(fN),hN=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=mN.type,t}return t.type=`yAxis`,t}(fN),gN=function(e){H(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new Ws({shape:e.coordinateSystem.getRect(),style:gt({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(GO),_N={offset:0};function vN(e){e.registerComponentView(gN),e.registerComponentModel(Ww),e.registerCoordinateSystem(`cartesian2d`,PM),yM(e,`x`,mM,_N),yM(e,`y`,mM,_N),e.registerComponentView(mN),e.registerComponentView(hN),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var yN=wl();function bN(e,t){return!!yN(e)[t]}eM({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},$t);var xN={axisPointer:1,tooltip:1,brush:1};function SN(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||xN.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Rp(r),o=Rp(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var CN=function(e){H(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=Et(n._mousedownHandler,n),i=Et(n._mousemoveHandler,n),a=Et(n._mouseupHandler,n),o=Et(n._mousewheelHandler,n),s=Et(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=Rp(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:X(c.z2,-1/0)},p=U({},n.triggerInfo);this._opt=gt(U({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,(!this._enabled||this._controlType!==e)&&(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(DN(t,`mousedown`,r,f),DN(t,`mousemove`,i,f),DN(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(DN(t,`mousewheel`,o,f),DN(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,ON(t,`mousedown`,r),ON(t,`mousemove`,i),ON(t,`mouseup`,a),ON(t,`mousewheel`,o),ON(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(SN(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(UE(e)||wN(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||bN(t,`globalPan`)||wN(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!MN(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&HE(e.event),e.__ecRoamConsumed=!0,jN(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!wN(e)){var t=this._zr;if(!UE(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!wN(e)){var t=MN(`zoomOnMouseWheel`,e,this._opt),n=MN(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(!(r===0||!t&&!n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(bN(this._zr,`globalPan`)||wN(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(HE(r.event),r.__ecRoamConsumed=!0,jN(e,t,n,r,i))},t}(qa);function wN(e){return e.__ecRoamConsumed}var TN=wl();function EN(e){var t=TN(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function DN(e,t,n,r){for(var i=EN(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),kN(e,t)}function ON(e,t,n){for(var r=EN(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||AN(e,t);return}}function kN(e,t){var n=EN(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function AN(e,t){var n=EN(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function jN(e,t,n,r,i){i.isAvailableBehavior=Et(MN,null,n,r),e.trigger(t,i)}function MN(e,t,n){var r=n[e];return!e||r&&(!J(r)||t.event[r+`Key`])}function NN(e){return e}var PN=`view`;(function(e){H(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=PN,i.dimensions=[`x`,`y`];var a=NN(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=yi(),o[1]=yi(),o[2]=yi(),a.mtRaw=An(),a.mtRawInv=An(),a.mtOverall=An(),a.mtOverallInv=An(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return LN(null,this)},t.prototype.getViewRect=function(){return RN(null,this)},t.prototype.getRoamTransform=function(){return vi(NN(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?NN(this).mtRaw:NN(this).mtOverall;return n||=[],r?$n(n,e,r):zn(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=NN(this).mtOverallInv;return r?$n(n,e,r):zn(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=zN(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=zN(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=NN(this);return yr(FN,t.dataRect),xr(FN,FN,t.mtOverall),Sr(FN,e[0],e[1])},t.dimensions=[`x`,`y`],t})(_i);var FN=_r();function IN(e){return NN(e).zoom}function LN(e,t){return yr(e||_r(),NN(t).dataRect)}function RN(e,t){return yr(e||_r(),NN(t).viewRect)}_r();function zN(e){var t=e.seriesModel;return t?t.coordinateSystem:null}yi(),yi();function BN(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}var VN=wl();function HN(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,YN(t,n,e),W(n,function(n){W(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Dt(UN,e))})}),t.wrapMethod(`cloneShallow`,Dt(GN,e)),W(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Dt(WN,e))}),Bt(n[t.dataType]===t)}function UN(e,t){if(JN(this)){var n=U({},VN(this).datas);n[this.dataType]=t,YN(t,n,e)}else XN(t,this.dataType,VN(this).mainData,e);return t}function WN(e,t){return e.struct&&e.struct.update(),t}function GN(e,t){return W(VN(t).datas,function(n,r){n!==t&&XN(n.cloneShallow(),r,t,e)}),t}function KN(e){var t=VN(this).mainData;return e==null||t==null?t:VN(t).datas[e]}function qN(){var e=VN(this).mainData;return e==null?[{data:e}]:G(wt(VN(e).datas),function(t){return{type:t,data:VN(e).datas[t]}})}function JN(e){return VN(e).mainData===e}function YN(e,t,n){VN(e).datas={},W(t,function(t,r){XN(t,r,e,n)})}function XN(e,t,n,r){VN(n).datas[t]=e,VN(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=KN,e.getLinkedDataAll=qN}var ZN=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){q(e)&&(n=t,t=e,e=null),e||={},J(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),QN=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,K(n)?n.length:1),a.push(e);var r=new ZN(vl(e.name,``),i);t?$N(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=Zh(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new Xh(c,n);return l.initData(a),r&&r(l),HN({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function $N(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function eP(e,t,n){if(e&&_t(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(J(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function tP(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function nP(e,t){return _t(tP(e),t)>=0}function rP(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var iP=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function aP(e){for(var t=0;t<iP.length;t++)e.registerAction({type:iP[t],update:`updateView`},$t);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=eP(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=nP(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function oP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=vv(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var sP=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};cP(n);var r=e.levels||[],i=new ym({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=lP(r,t);var a=G(r||[],function(e){return new ym(e,i,t)},this),o=QN.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Xv(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=rP(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Yt(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){oP(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Q.size.l,top:Q.size.xxxl,right:Q.size.l,bottom:Q.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Q.size.m,emptyItemWidth:25,itemStyle:{color:Q.color.backgroundShade,textStyle:{color:Q.color.secondary}},emphasis:{itemStyle:{color:Q.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Q.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(gy);function cP(e){var t=0;W(e.children,function(e){cP(e);var n=e.value;K(n)&&(n=n[0]),t+=n});var n=e.value;K(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),K(e.value)?e.value[0]=n:e.value=n}function lP(e,t){var n=il(t.get(`color`)),r=il(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;W(e,function(e){var t=new ym(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var uP=8,dP=8,fP=5,pP=function(){function e(e){this.group=new Vd,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=ov(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=iv(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),sv(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=vl(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+uP*2,t.emptyItemWidth);t.totalWidth+=o+dP,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new hf({shape:{points:mP(c,0,_,u,m===f.length-1,m===0)},style:gt(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Ys({style:Zp(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:Dt(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Zp(o,{text:v}),y.ensureState(`emphasis`).style=p,cd(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),hP(y,e,g),c+=_+dP}},e.prototype.remove=function(){this.group.removeAll()},e}();function mP(e,t,n,r,i,a){var o=[[i?e:e-fP,t],[e+n,t],[e+n,t+r],[i?e:e-fP,t+r]];return!a&&o.splice(2,0,[e+n+fP,t+r/2]),!i&&o.push([e,t+r/2]),o}function hP(e,t,n){$l(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&rP(n,t)}}var gP=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function _P(){return new gP}var vP=Math.max,yP=Math.min,bP=W,xP=[`itemStyle`,`borderWidth`],SP=[`itemStyle`,`gapWidth`],CP=[`upperLabel`,`show`],wP=[`upperLabel`,`height`],TP={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=ov(e,n).refContainer,o=iv(e.getBoxLayoutParams(),a),s=r&&r.type,c=eP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=tP(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,NP(e,c,u,o)):l?(f=!0,U({},l)):U({},o);if(f){var m=LP(o,p);m=RP(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),EP(u,g,!1,0),_=u.getLayout(),bP(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(U({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(PP(o,l,c),!0),e.setLayoutInfo(o),FP(v,new gr(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function EP(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(xP),l=s.get(SP)/2,u=IP(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=vP(i-2*f,0),a=vP(a-f-p,0);var m=i*a,h=DP(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=yP(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=jP(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,MP(y,_,g,l,!1),_=yP(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&MP(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)EP(h[b],t,n,r+1)}}}function DP(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=St(o,function(e){return!e.isRemoved()}),kP(o,s);var l=AP(t,o,s);if(l.sum===0||(l.sum=OP(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function OP(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function kP(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function AP(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=Fl(),bP(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function jP(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?vP(l*r/c,c/(l*i)):1/0}function MP(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=vP(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=vP(v-2*r,0);m[s[o]]=n[s[o]]+yP(r,g/2),m[s[a]]=l+yP(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function NP(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=U({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(xP),v=Math.max(_,IP(g));u+=4*_*_+(3*_+v)*u**.5,u>Fc&&(u=Fc),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function PP(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function FP(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new gr(t.x-a.x,t.y-a.y,t.width,t.height);bP(e.viewChildren||[],function(e){FP(e,c,n,r,i+1)})}}function IP(e){return e.get(CP)?e.get(wP):0}function LP(e,t){return t.width/e.width||t.height/e.height||1}function RP(e,t){return BN(e,t.get(`scaleLimit`,!0))}var zP=Vd,BP=Ws,VP=3,HP=`label`,UP=`upperLabel`,WP=100,GP=20,KP=30,qP=yn([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),JP=function(e){var t=qP(e);return t.stroke=t.fill=t.lineWidth=null,t},YP=wl(),XP=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=ZP(),n}return t.prototype.render=function(e,t,n,r){if(!(_t(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=eP(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new zP,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=ZP(),o=ZP(),s=this._storage,c=[];function l(e,r,i,l){return QP(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,W(e,function(e,t){!e.isRemoved()&&o(t,t)})):new Sm(t,e,a,a).add(o).update(o).remove(Dt(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=ZP();return e&&W(e,function(e,n){var r=t[n];W(e,function(e){e&&(r.push(e),YP(e).willDelete=!0)})}),t}function p(){W(u,function(e){W(e,function(e){e.parent&&e.parent.remove(e)})}),W(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(q(i)?0:i)||0,s=(q(a)?null:a)||`cubicOut`,c=_P();W(t.willDeleteEls,function(e,t){W(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=YP(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),W(this._storage,function(e,n){W(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof Vd?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=U({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(Et(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new CN(e.getZr()),r.on(`pan`,Et(this._onPan,this)),r.on(`zoom`,Et(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>VP||Math.abs(e.dy)>VP)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new gr(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=LP(c,o),u=l*r;u=RP(u,i);var d=u/l;t-=c.x,n-=c.y;var f=An();Pn(f,f,[-t,-n]),In(f,f,[d,d]),Pn(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&Y_(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new pP(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(nP(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ZP(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(ub);function ZP(){return{nodeGroup:[],background:[],content:[]}}function QP(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=te(`nodeGroup`,zP);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),YP(D).nodeWidth=p,YP(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=te(`background`,BP,l,GP);O&&F(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),M=k.get(`disabled`),ee=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)md(D)&&pd(D,!1),O&&(pd(O,!M),d.setItemGraphicEl(o.dataIndex,O),ld(O,ee,j));else{var N=te(`content`,BP,l,KP);N&&I(D,N),O.disableMorphing=!0,O&&md(O)&&pd(O,!1),pd(D,!M),d.setItemGraphicEl(o.dataIndex,D);var P=f.getShallow(`cursor`);P&&N.attr(`cursor`,P),ld(D,ee,j)}return D;function F(t,n,r){var i=$l(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)L(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=JP(S);c.fill=s;var l=qP(C);l.fill=C.get(`borderColor`);var u=qP(w);u.fill=w.get(`borderColor`);var d=qP(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;R(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Bu(n)}t.add(n)}function I(t,n){var r=$l(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)L(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=JP(S);l.fill=c,l.decal=s.decal;var u=qP(C),d=qP(w),f=qP(T);R(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Bu(n)}t.add(n)}function L(e){!e.invisible&&a.push(e)}function R(t,n,r,i){var a=f.getModel(i?UP:HP),s=vl(f.get(`name`),null),c=a.getShallow(`show`);Yp(t,Xp(f,i?UP:HP),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=zt(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,z(d,i,u);var m=l.getState(`emphasis`);z(m?m.style:null,i,u)}}function z(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function te(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ne(c,s)):g||(s=new r,s instanceof Co&&(s.z2=$P(a,o)),B(c,s)),t[e][_]=s}function ne(e,t){var n=e[_]={};t instanceof zP?(n.oldX=t.x,n.oldY=t.y):n.oldShape=U({},t.shape)}function B(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Vd;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function $P(e,t){return e*WP+t}var eF=W,tF=At,nF=-1,rF=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=pt(t);this.type=r,this.mappingMethod=n,this._normalizeData=hF[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(oF(i),iF(i)):n===`category`?i.categories?aF(i):oF(i,!0):(Bt(n!==`linear`||i.dataExtent),oF(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Et(this._normalizeData,this)},e.listVisualTypes=function(){return wt(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){At(e)?W(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=K(t)?[]:At(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&eF(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(K(e))e=e.slice();else if(tF(e)){var t=[];eF(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||J(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(gF(u[1],e,l[1]))return a}else if(l[1]===1/0){if(gF(u[0],l[0],e))return a}else if(gF(u[0],l[0],e)&&gF(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:lF(`color`),getColorMapper:function(){var e=this.option;return Et(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),uF.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=ma(t,e.parsedVisual,r),i?r:va(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return va(ma(e,this.option.parsedVisual),`rgba`)},category:uF,piecewise:function(e,t){var n=pF.call(this,t);return n??=va(ma(e,this.option.parsedVisual),`rgba`),n},fixed:dF}},colorHue:sF(function(e,t){return ga(e,t)}),colorSaturation:sF(function(e,t){return ga(e,null,t)}),colorLightness:sF(function(e,t){return ga(e,null,null,t)}),colorAlpha:sF(function(e,t){return _a(e,t)}),decal:{applyVisual:lF(`decal`),_normalizedToVisual:{linear:null,category:uF,piecewise:null,fixed:null}},opacity:{applyVisual:lF(`opacity`),_normalizedToVisual:fF([0,1])},liftZ:{applyVisual:lF(`liftZ`),_normalizedToVisual:{linear:dF,category:dF,piecewise:dF,fixed:dF}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:cF,category:uF,piecewise:function(e,t){var n=pF.call(this,t);return n??=cF.call(this,e),n},fixed:dF}},symbolSize:{applyVisual:lF(`symbolSize`),_normalizedToVisual:fF([0,1])}},e}();function iF(e){var t=e.pieceList;e.hasSpecialVisual=!1,W(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function aF(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(eF(t,function(e,t){n[e]=t}),!K(r)){var i=[];At(r)?eF(r,function(e,t){var r=n[t];i[r??nF]=e}):i[nF]=r,r=mF(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function oF(e,t){var n=e.visual,r=[];At(n)?eF(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),mF(e,r)}function sF(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:fF([0,1])}}function cF(e){var t=this.option.visual;return t[Math.round(Cc(e,[0,1],[0,t.length-1],!0))]||{}}function lF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function uF(e){var t=this.option.visual;return t[this.option.loop&&e!==nF?e%t.length:e]}function dF(){return this.option.visual[0]}function fF(e){return{linear:function(t){return Cc(t,e,this.option.visual,!0)},category:uF,piecewise:function(t,n){var r=pF.call(this,n);return r??=Cc(t,e,this.option.visual,!0),r},fixed:dF}}function pF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[rF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function mF(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=G(t,function(e){return ua(e)||[0,0,0,1]})),t}var hF={linear:function(e){return Cc(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=rF.findPieceIndex(e,t,!0);if(n!=null)return Cc(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??nF},fixed:$t};function gF(e,t,n){return e?t<=n:t<n}var _F=`itemStyle`,vF=wl(),yF={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||bF(t,{},e.getViewRoot().getAncestors(),e)}};function bF(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(_F),c=xF(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=SF(c),u=CF(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=SF(c),l.fill=f;else{var m=TF(e,i,a,s,c,p);W(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&bF(e,DF(i,c,e,t,m,r),n,r)})}}}function xF(e,t,n){var r=U({},t),i=n.designatedVisualItemStyle;return W([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function SF(e){var t=wF(e,`color`);if(t){var n=wF(e,`colorAlpha`),r=wF(e,`colorSaturation`);return r&&(t=ga(t,null,null,r)),n&&(t=_a(t,n)),t}}function CF(e,t){return t==null?null:ga(t,null,null,e)}function wF(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function TF(e,t,n,r,i,a){if(!(!a||!a.length)){var o=EF(t,`color`)||i.color!=null&&i.color!==`none`&&(EF(t,`colorAlpha`)||EF(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new rF(d);return vF(f).drColorMappingBy=u,f}}}function EF(e,t){var n=e.get(t);return K(n)&&n.length?{name:t,range:n}:null}function DF(e,t,n,r,i,a){var o=U({},t);if(i){var s=i.type,c=s===`color`&&vF(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function OF(e){e.registerSeriesModel(sP),e.registerChartView(XP),e.registerVisual(yF),e.registerLayout(TP),aP(e)}var kF=bf.prototype,AF=wf.prototype,jF=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(jF);function MF(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var NF=function(e){H(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new jF},t.prototype.buildPath=function(e,t){MF(t)?kF.buildPath.call(this,e,t):AF.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return MF(this.shape)?kF.pointAt.call(this,e):AF.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=MF(t)?[t.x2-t.x1,t.y2-t.y1]:AF.tangentAt.call(this,e);return qn(n,n)},t}(As),PF=[`fromSymbol`,`toSymbol`];function FF(e){return`_`+e+`Type`}function IF(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=My(i),l=Ny(o||0,c);return r+c+l+(a||``)+(s||``)}function LF(e,t,n){var r=t.getItemVisual(n,e);if(!(!r||r===`none`)){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=My(i),l=Ny(o||0,c),u=jy(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,u.name=e,u}}function RF(e){var t=new NF({name:`line`,subPixelOptimize:!0});return zF(t.shape,e),t}function zF(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var BF=function(e){H(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=RF(i);o.shape.percent=0,Kf(o,{z2:X(a,0),shape:{percent:1}},r,t),this.add(o),W(PF,function(n){var r=LF(n,e,t);this.add(r),this[FF(n)]=IF(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};zF(o.shape,a),Gf(i,o,r,t),W(PF,function(n){var r=IF(n,e,t),i=FF(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=LF(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=Xp(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,W(PF,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<gu.length;n++){var r=gu[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);Yp(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Q.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?Oc(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);K(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),cd(this,u,d,l)},t.prototype.highlight=function(){Uu(this)},t.prototype.downplay=function(){Wu(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);zF(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=Un([],l,c);qn(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Vd),VF=function(){function e(e){this.group=new Vd,this._LineCtor=e||BF}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=UF(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=UF(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!HF(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(GF(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){Np(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(GF(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);if(!GF(t.getItemLayout(r))){this.group.remove(a);return}a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)},e}();function HF(e){return e.animators&&e.animators.length>0}function UF(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Xp(t)}}function WF(e){return isNaN(e[0])||isNaN(e[1])}function GF(e){return e&&!WF(e[0])&&!WF(e[1])}var KF={color:`fill`,borderColor:`stroke`},qF={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},JF=wl(),YF=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get(`zlevel`,!0),this.currentZ=this.get(`z`,!0)},t.prototype.getInitialData=function(e,t){return yg(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=JF(r).info),i},t.type=`series.custom`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,clip:!1},t}(gy);function XF(e,t){return t||=[0,0],G([`x`,`y`],function(n,r){var i=this.getAxis(n),a=t[r],o=e[r]/2;return i.type===`category`?iC(i).w:Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function ZF(e){var t=e.master.getRect();return{coordSys:{type:`cartesian2d`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Et(XF,e)}}}function QF(e,t){return t||=[0,0],G([0,1],function(n){var r=t[n],i=e[n]/2,a=[],o=[];return a[n]=r-i,o[n]=r+i,a[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(a)[n]-this.dataToPoint(o)[n])},this)}function $F(e){var t=e.view,n=t.getBoundingRect();return{coordSys:{type:`geo`,x:n.x,y:n.y,width:n.width,height:n.height,zoom:IN(t)},api:{coord:function(t){return e.dataToPoint(t)},size:Et(QF,e)}}}function eI(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return n.type===`category`?iC(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function tI(e){var t=e.getRect();return{coordSys:{type:`singleAxis`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Et(eI,e)}}}function nI(e,t){return t||=[0,0],G([`Radius`,`Angle`],function(n,r){var i=`get`+n+`Axis`,a=this[i](),o=t[r],s=e[r]/2,c=a.type===`category`?iC(a).w:Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function rI(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:Et(nI,e)}}}function iI(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function aI(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var oI={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},sI=wt(oI);xt(bi,function(e,t){return e[t]=1,e},{}),bi.join(`, `);var cI=[``,`style`,`shape`,`extra`],lI=wl();function uI(e,t,n,r,i){var a=e+`Animation`,o=Uf(e,r,i)||{},s=lI(t).userDuring;return o.duration>0&&(o.during=s?Et(bI,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),U(o,n[a]),o}function dI(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=lI(e),l=t.style;c.userDuring=t.during;var u={},d={};if(wI(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];SI(`shape`,h,f[m])}else SI(`shape`,t,d),SI(`extra`,t,d);if(!a&&s&&(CI(e,t,u),xI(`shape`,e,t,u),xI(`extra`,e,t,u),TI(e,t,l,u)),d.style=l,hI(e,d,o),_I(e,t),s){if(a){var g={};W(cI,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),U(e?g[e]:g,n.enterFrom))});var _=uI(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else gI(e,t,i||0,n,u)}fI(e,t),l?e.dirty():e.markRedraw()}function fI(e,t){for(var n=lI(e).leaveToProps,r=0;r<cI.length;r++){var i=cI[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=lI(e).leaveToProps={},i&&(n[i]=n[i]||{}),U(i?n[i]:n,a.leaveTo))}}function pI(e,t,n,r){if(e){var i=e.parent,a=lI(e).leaveToProps;if(a){var o=uI(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function mI(e){return e===`all`}function hI(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function gI(e,t,n,r,i){if(i){var a=uI(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function _I(e,t){Z(t,`silent`)&&(e.silent=t.silent),Z(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Co&&Z(t,`invisible`)&&(e.invisible=t.invisible),e instanceof As&&Z(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var vI={},yI={setTransform:function(e,t){return vI.el[e]=t,this},getTransform:function(e){return vI.el[e]},setShape:function(e,t){var n=vI.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=vI.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=vI.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=vI.el.style;if(t)return t[e]},setExtra:function(e,t){var n=vI.el.extra||(vI.el.extra={});return n[e]=t,this},getExtra:function(e){var t=vI.el.extra;if(t)return t[e]}};function bI(){var e=this,t=e.el;if(t){var n=lI(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}vI.el=t,r(yI)}}function xI(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c){if(!o&&(o=r[e]={}),mI(c))U(o,a);else for(var l=il(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(mI(s)||_t(s,e)>=0){!o&&(o=r[e]={});for(var p=wt(a),u=0;u<p.length;u++){var d=p[u],f=a[d];EI(i[d],f)&&(o[d]=f)}}}}}function SI(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=wt(r),o=0;o<a.length;o++){var s=a[o];i[s]=Ma(r[s])}}function CI(e,t,n){for(var r=t.transition,i=mI(r)?bi:il(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function wI(e,t,n){for(var r=0;r<sI.length;r++){var i=sI[r],a=oI[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<bi.length;r++){var s=bi[r];t[s]!=null&&(n[s]=t[s])}}function TI(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!mI(o)){var c=il(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(mI(s)||mI(o)||_t(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=wt(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function EI(e,t){return bt(e)?e!==t:e!=null&&isFinite(e)}var DI=wl(),OI=[`percent`,`easing`,`shape`,`style`,`extra`];function kI(e){e.stopAnimation(`keyframe`),e.attr(DI(e))}function AI(e,t,n){if(!(!n.isAnimationEnabled()||!t)){if(K(t)){W(t,function(t){AI(e,t,n)});return}var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Uf(`enter`,n,0);i=a&&a.duration}if(!(!r||!i)){var o=DI(e);W(cI,function(n){if(!(n&&!e[n])){var a;r.sort(function(e,t){return e.percent-t.percent}),W(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=wt(c);if(n||(l=St(l,function(e){return _t(OI,e)<0})),l.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var u=0;u<s.length;u++)s[u]!==a&&s[u].targetName===a.targetName&&s[u].stopTracks(l);n&&(o[n]=o[n]||{});var d=n?o[n]:o;W(l,function(t){d[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,c,l,r.easing)}}}),a&&a.delay(t.delay||0).duration(i).start(t.easing)}})}}}var jI=`emphasis`,MI=`normal`,NI=`blur`,PI=`select`,FI=[MI,jI,NI,PI],II={normal:[`itemStyle`],emphasis:[jI,`itemStyle`],blur:[NI,`itemStyle`],select:[PI,`itemStyle`]},LI={normal:[`label`],emphasis:[jI,`label`],blur:[NI,`label`],select:[PI,`label`]},RI=[`x`,`y`],zI=`e\0\0`,BI={normal:{},emphasis:{},blur:{},select:{}},VI={cartesian2d:ZF,geo:$F,single:tI,polar:rI,calendar:iI,matrix:aI};function HI(e){return e instanceof As}function UI(e){return e instanceof Co}function WI(e,t){t.copyTransform(e),UI(t)&&UI(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,HI(t)&&HI(e)&&t.setShape(e.shape))}var GI=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,a=e.getData(),o=this.group,s=ZI(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){$I(n,null,t,s(t,r),e,o,a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&pI(n,JF(n).option,e)}).update(function(t,c){$I(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();var c=e.get(`clip`,!0)?vb(e.coordinateSystem,!1,e):null;c?o.setClipPath(c):o.removeClipPath(),this._data=a},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var a=t.getData(),o=ZI(t,a,n,r),s=this._progressiveEls=[];function c(e){e.isGroup||(e.incremental=Yl(t),e.ensureState(`emphasis`).hoverLayer=2)}for(var l=e.start;l<e.end;l++){var u=$I(null,null,l,o(l,i),t,this.group,a);u&&(u.traverse(c),s.push(u))}},t.prototype.eachRendered=function(e){Np(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(i==null||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type=`custom`,t}(ub);function KI(e){var t=e.type,n;if(t===`path`){var r=e.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,a=pL(r);n=sp(a,null,i,r.layout||`center`),JF(n).customPathData=a}else if(t===`image`)n=new Is({}),JF(n).customImagePath=e.style.image;else if(t===`text`)n=new Ys({});else if(t===`group`)n=new Vd;else if(t===`compoundPath`){var r=e.shape;if(!r||!r.paths){var o=``;el(o)}n=new Df({shape:{paths:G(r.paths,function(e){if(e.type===`path`)return sp(e.shape.pathData,e,null);var t=op(e.type);return t||el(``),new t})}})}else{var s=op(t);if(!s){var o=``;el(o)}n=new s}return JF(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function qI(e,t,n,r,i,a,o){kI(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=RI);var c=r&&r.style;if(c){if(t.type===`text`){var l=c;Z(l,`textFill`)&&(l.fill=l.textFill),Z(l,`textStroke`)&&(l.stroke=l.textStroke)}var u=void 0,d=HI(t)?c.decal:null;e&&d&&(d.dirty=!0,u=EA(d,e)),c.__decalPattern=u}if(UI(t)&&c){var u=c.__decalPattern;u&&(c.decal=u)}dI(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),AI(t,r.keyframeAnimation,a)}function JI(e,t,n,r,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(r===!1){var c=a.getState(e);c&&(c.style=null)}else s.style=r||null;o&&(s.textConfig=o),Bu(a)}}function YI(e,t,n){if(!e.isGroup){var r=e,i=n.currentZ,a=n.currentZLevel;r.z=i,r.zlevel=a;var o=t.z2;o!=null&&(r.z2=o||0);for(var s=0;s<FI.length;s++)XI(r,t,FI[s])}}function XI(e,t,n){var r=n===MI,i=r?t:aL(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function ZI(e,t,n,r){var i=e.get(`renderItem`);if(typeof i==`string`){var a=Ik(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):VI[o.type](o));for(var c=gt({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:C,ordinalRawValue:S,styleEmphasis:w,visual:D,barLayout:O,currentSeriesIndices:k,font:A},s.api||{}),l={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:QI(e.getData()),itemPayload:e.get(`itemPayload`)||{}},u,d,f={},p={},m={},h={},g=0;g<FI.length;g++){var _=FI[g];m[_]=e.getModel(II[_]),h[_]=e.getModel(LI[_])}function v(e){return e===u?d||=t.getItemModel(e):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===u?f[n]||(f[n]=v(e).getModel(II[n])):v(e).getModel(II[n]):m[n]}function b(e,n){return t.hasItemOption?e===u?p[n]||(p[n]=v(e).getModel(LI[n])):v(e).getModel(LI[n]):h[n]}return function(e,n){return u=e,d=null,f={},p={},i&&i(gt({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},l),c)};function x(e,n){return n??=u,t.getStore().get(t.getDimensionIndex(e||0),n)}function S(e,n){n??=u,e||=0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,MI).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:J(a)?a:Q.color.neutral99},l=b(r,MI),d=Zp(l,null,c,!1,!0);d.text=l.getShallow(`show`)?X(e.getFormattedLabel(r,MI),Fy(t,r)):null;var f=Qp(l,c,!1);return E(n,s),s=Cb(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,jI).getItemStyle(),a=b(r,jI),o=Zp(a,null,null,!0,!0);o.text=a.getShallow(`show`)?Lt(e.getFormattedLabel(r,jI),e.getFormattedLabel(r,MI),Fy(t,r)):null;var s=Qp(a,null,!0);return E(n,i),i=Cb(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)Z(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,Z(KF,e)){var r=t.getItemVisual(n,`style`);return r?r[KF[e]]:null}if(Z(qF,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return Jw(gt({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return am(e,n)}}function QI(e){var t={};return W(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function $I(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=eL(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&cd(s,r.focus,r.blurScope,r.emphasisDisabled),s}function eL(e,t,n,r,i,a){var o=-1,s=t;t&&tL(t,r,i)&&(o=_t(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=KI(r),s&&WI(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&(l.disableMorphing=!1),r.tooltipDisabled&&(l.tooltipDisabled=!0),BI.normal.cfg=BI.normal.conOpt=BI.emphasis.cfg=BI.emphasis.conOpt=BI.blur.cfg=BI.blur.conOpt=BI.select.cfg=BI.select.conOpt=null,BI.isLegacy=!1,rL(l,n,r,i,c,BI),nL(l,n,r,i,c),qI(e,l,n,r,BI,i,c),Z(r,`info`)&&(JF(l).info=r.info);for(var u=0;u<FI.length;u++){var d=FI[u];if(d!==MI){var f=aL(r,d),p=oL(r,f,d);JI(d,l,f,p,BI)}}return YI(l,r,i),r.type===`group`&&sL(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function tL(e,t,n){var r=JF(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&mL(a)&&pL(a)!==r.customPathData||i===`image`&&Z(o,`image`)&&o.image!==r.customImagePath}function nL(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&tL(o,a,r)&&(o=null),o||(o=KI(a),e.setClipPath(o)),qI(null,o,t,a,null,r,i)}}function rL(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){iL(n,null,a),iL(n,jI,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=KI(o),e.setTextContent(u)),qI(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f<FI.length;f++){var p=FI[f];if(p!==MI){var m=a[p].conOpt;JI(p,u,m,oL(o,m,p),null)}}d?u.dirty():u.markRedraw()}}}}function iL(e,t,n){var r=t?aL(e,t):e,i=t?oL(e,r,jI):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?aL(s,t):s:null;if(i&&(n.isLegacy||bb(i,a,!!o,!!c))){n.isLegacy=!0;var l=xb(i,a,!t);!o&&l.textConfig&&(o=l.textConfig),!c&&l.textContent&&(c=l.textContent)}if(!t&&c){var u=c;!u.type&&(u.type=`text`)}var d=t?n[t]:n.normal;d.cfg=o,d.conOpt=c}function aL(e,t){return t?e?e[t]:null:e}function oL(e,t,n){var r=t&&t.style;return r==null&&n===jI&&e&&(r=e.styleEmphasis),r}function sL(e,t,n,r,i){var a=r.children,o=a?a.length:0,s=r.$mergeChildren,c=s===`byName`||r.diffChildrenByName,l=s===!1;if(!(!o&&!c&&!l)){if(c){lL({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:n,seriesModel:i,group:t});return}l&&t.removeAll();for(var u=0;u<o;u++){var d=a[u],f=t.childAt(u);d?(d.ignore??=!1,eL(e,f,n,d,i,t)):f.ignore=!0}for(var p=t.childCount()-1;p>=u;p--)cL(t,t.childAt(p),i)}}function cL(e,t,n){t&&pI(t,JF(e).option,n)}function lL(e){new Sm(e.oldChildren,e.newChildren,uL,uL,e).add(dL).update(dL).remove(fL).execute()}function uL(e,t){return(e&&e.name)??zI+t}function dL(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];eL(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function fL(e){var t=this.context,n=t.oldChildren[e];n&&pI(n,JF(n).option,t.seriesModel)}function pL(e){return e&&(e.pathData||e.d)}function mL(e){return e&&(Z(e,`pathData`)||Z(e,`d`))}function hL(e){e.registerChartView(GI),e.registerSeriesModel(YF)}var gL=wl(),_L=pt,vL=Et,yL=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Vd,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Dt(bL,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}wL(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&iC(r).w>o)return!0;if(a){var s=nN(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=gL(e).pointerEl=new Qf[i.type](_L(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=gL(e).labelEl=new Ys(_L(t.label));e.add(i),SL(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=gL(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=gL(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),SL(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=Cp(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){HE(e.event)},onmousedown:vL(this._onHandleDragMove,this,0,0),drift:vL(this._onHandleDragMove,this),ondragend:vL(this._onHandleDragEnd,this)}),n.add(r)),wL(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);K(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,lT(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){bL(this._axisPointerModel,!t&&this._moveAnimation,this._handle,CL(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(CL(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(CL(r)),gL(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),uT(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function bL(e,t,n,r){xL(gL(n).lastProp,r)||(gL(n).lastProp=r,t?Gf(n,r,e):(n.stopAnimation(),n.attr(r)))}function xL(e,t){if(At(e)&&At(t)){var n=!0;return W(t,function(t,r){n&&=xL(e[r],t)}),!!n}return e===t}function SL(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function CL(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function wL(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function TL(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function EL(e,t,n,r,i){var a=OL(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=H_(o.get(`padding`)||0),c=o.getFont(),l=Ir(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),DL(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Zp(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function DL(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function OL(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:jx(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};W(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),J(o)?a=o.replace(`{value}`,a):q(o)&&(a=o(s))}return a}function kL(e,t,n){var r=An();return Fn(r,r,n.rotation),Pn(r,r,n.position),gp([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function AL(e,t,n,r,i,a){var o=UC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),EL(t,r,i,a,{position:kL(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function jL(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ML(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function NL(e,t,n){return iC(e,{fromStat:{sers:G(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function PL(e,t,n){return[pc(fc(t[0],t[1]),e-n/2),fc(e+n/2,pc(t[0],t[1]))]}var FL=function(e){H(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=IL(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=TL(r),f=LL[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}AL(t,e,uw(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=uw(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=kL(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=IL(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=fc(o[1],l[c]),l[c]=pc(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(yL);function IL(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var LL={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:jL([t,r[0]],[t,r[1]],RL(e))}},shadow:function(e,t,n,r,i,a){var o=NL(e,i,a),s=r[1]-r[0],c=PL(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ML([l,r[0]],[u-l,s],RL(e))}}};function RL(e){return e.dim===`x`?0:1}var zL=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Q.color.accent40,throttle:40}},t}(pv),BL=wl(),VL=W;function HL(e,t,n){if(!nn.node){var r=t.getZr();BL(r).records||(BL(r).records={}),UL(r,t);var i=BL(r).records[e]||(BL(r).records[e]={});i.handler=n}}function UL(e,t){if(BL(e).initialized)return;BL(e).initialized=!0,n(`click`,Dt(KL,`click`)),n(`mousemove`,Dt(KL,`mousemove`)),n(`mousewheel`,Dt(KL,`mousewheel`)),n(`globalout`,GL);function n(n,r){e.on(n,function(n){var i=qL(t);VL(BL(e).records,function(e){e&&r(e,n,i.dispatchAction)}),WL(i.pendings,t)})}}function WL(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function GL(e,t,n){e.handler(`leave`,null,n)}function KL(e,t,n,r){t.handler(e,n,r)}function qL(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function JL(e,t){if(!nn.node){var n=t.getZr();(BL(n).records||{})[e]&&(BL(n).records[e]=null)}}var YL=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;HL(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){JL(`axisPointer`,t)},t.prototype.dispose=function(e,t){JL(`axisPointer`,t)},t.type=`axisPointer`,t}(GO);function XL(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Cl(a,e);if(o==null||o<0||K(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(G(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var ZL=wl();function QL(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||Et(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){cR(i)&&(i=XL({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=cR(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||cR(i),f={},p={},m={list:[],map:{}},h={showPointer:Dt(tR,p),showTooltip:Dt(nR,m)};W(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);W(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=oR(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&$L(e,o,h,!1,f)}})});var g={};return W(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&W(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,sR(t),sR(e)))),g[e.key]=a}})}),W(g,function(e,t){$L(u[t],e,h,!0,f)}),rR(p,u,f),iR(m,i,e,o),aR(u,o,n),f}}function $L(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=eR(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&U(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function eR(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return W(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Jc(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),W(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function tR(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function nR(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=aN(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function rR(e,t,n){var r=n.axesInfo=[];W(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function iR(e,t,n,r){if(cR(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function aR(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=ZL(r)[i]||{},o=ZL(r)[i]={};W(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&W(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}W(a,function(e,t){!o[t]&&c.push(l(e))}),W(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function oR(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function sR(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function cR(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function lR(e){sN.registerAxisPointerClass(`CartesianAxisPointer`,FL),e.registerComponentModel(zL),e.registerComponentView(YL),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!K(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=YM(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},QL)}function uR(e){fM(vN),fM(lR)}function dR(e,t){var n=H_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Ws({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var fR=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(pv);function pR(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function mR(e){if(nn.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var hR=mR([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),gR=mR([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function _R(e,t){if(!e)return t;t=V_(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function vR(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var yR=_R(gR,`transition`),bR=_R(hR,`transform`),xR=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(nn.transform3dSupported?`will-change:transform;`:``);function SR(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function CR(e,t,n){if(!J(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=J_(t);var a=SR(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=bR+`:`,l;_t([`left`,`right`],a)>-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<div style="`+[`position:absolute;width:`+o+`px;height:`+o+`px;z-index:-1;`,s+`;`+c+`;`,`border-bottom:`+m,`border-right:`+m,`background-color:`+r+`;`].join(``)+`"></div>`}function wR(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(nn.transformSupported?``+bR+i:`,left`+i+`,top`+i)),yR+`:`+a}function TR(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!nn.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=nn.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+bR+`:`+o+`;`:[[`top`,0],[`left`,0],[hR,o]]}function ER(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=X(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),W([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function DR(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=uy(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(wR(a,n,r)),o&&i.push(`background-color:`+o),W([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=V_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(ER(d)),f!=null&&i.push(`padding:`+H_(f).join(`px `)+`px`),i.join(`;`)+`;`}function OR(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Mg(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var kR=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,nn.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(J(i)?document.querySelector(i):Mt(i)?i:q(i)&&i(e.getDom()));OR(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;RE(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=vR(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=xR+DR(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+TR(i[0],i[1],!0)+(`border-color:`+J_(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(J(i)&&n.get(`trigger`)===`item`&&!pR(n)&&(o=CR(n,r,i)),J(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,K(e)||(e=[e]);for(var s=0;s<e.length;s++)Mt(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(OR(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;W(TR(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,nn.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Et(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Ng(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),AR=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),NR(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;At(e)&&el(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Ys({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:uy(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),W([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),W([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=MR(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;NR(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=jR(i.borderWidth||0),o=MR(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Et(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function jR(e){return Math.max(0,e)}function MR(e){var t=jR(e.shadowBlur||0),n=jR(e.shadowOffsetX||0),r=jR(e.shadowOffsetY||0);return{left:jR(t-n),right:jR(t+n),top:jR(t-r),bottom:jR(t+r)}}function NR(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var PR=new Ws({shape:{x:-1,y:-1,width:2,height:2}}),FR=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!(nn.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=Nl(n.get(`renderMode`));this._tooltipContent=r===`richText`?new AR(t):new kR(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(nn.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?lT(this,`_updatePosition`,50,`fixRate`):uT(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);HL(`itemTooltip`,this._api,Et(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||nn.node||!n.getDom())){var i=LR(r,n);this._ticket=``;var a=r.dataByCoordSys,o=HR(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=PR;c.x=r.x,c.y=r.y,c.update(),$l(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=XL(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(LR(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&IR([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if($l(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;kk(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||($l(e).dataIndex==null?$l(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=Et(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=IR([t.tooltipOption],r),o=this._renderMode,s=[],c=Xv(`section`,{blocks:[],noHeader:!0}),l=[],u=new dy;W(e,function(e){W(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=OL(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Xv(`section`,{header:f,noHeader:!Vt(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),W(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=jx(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,J_(m.color),o);var h=wv(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=IR([a],r).get(`valueFormatter`);p.blocks.push(_?U({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ny(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
15
|
+
|
|
16
|
+
`:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=$l(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=IR([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new dy;h.marker=g.makeTooltipMarker(`item`,J_(h.color),d);var _=wv(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ny(y?U({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=$l(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(J(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=pt(a),a.content=Bg(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=IR(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new dy;this._showOrMove(d,function(){var n=pt(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(J(u)){var p=e.ecModel.get(`useUTC`),m=K(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=S_(m.axisValue,d,p)),d=K_(d,n,!0)}else if(q(u)){var g=Et(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||K(t))return{color:r||i};if(!K(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),q(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),K(t))n=wc(t[0],s),r=wc(t[1],c);else if(At(t)){var p=t;p.width=l[0],p.height=l[1];var m=iv(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(J(t)&&o){var h=BR(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=RR(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=VR(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=VR(d)?l[1]/2:d===`bottom`?l[1]:0),pR(e)){var h=zR(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&W(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&W(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&W(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&W(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){nn.node||!t.getDom()||(uT(this,`_updatePosition`),this._tooltipContent.dispose(),JL(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(GO);function IR(e,t,n){var r=t.ecModel,i;n?(i=new ym(n,r,r),i=new ym(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ym&&(o=o.get(`tooltip`,!0)),J(o)&&(o={formatter:o}),o&&(i=new ym(o,i,r)))}return i}function LR(e,t){return e.dispatchAction||Et(t.dispatchAction,t)}function RR(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function zR(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function BR(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function VR(e){return e===`center`||e===`middle`}function HR(e,t,n){var r=Dl(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=kl(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=$l(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function UR(e){fM(lR),e.registerComponentModel(fR),e.registerComponentView(FR),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},$t),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},$t)}var WR=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Q.size.m,backgroundColor:Q.color.transparent,borderColor:Q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Q.color.primary},subtextStyle:{fontSize:12,color:Q.color.quaternary}},t}(pv),GR=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=X(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Ys({style:Zp(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Ys({style:Zp(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){Y_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Y_(p,`_`+e.get(`subtarget`))}),$l(c).eventData=$l(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=iv(g,ov(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Ws({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(GO);function KR(e){e.registerComponentModel(WR),e.registerComponentView(GR)}function qR(e,t){if(!e)return!1;for(var n=K(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function JR(e){al(e,`label`,[`show`])}var YR=wl(),XR=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(nn.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=YR(e)[i];if(!n||!n.data){YR(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&JR(n),W(n.data,function(e){e instanceof Array?(JR(e[0]),JR(e[1])):JR(e)}),a=this.createMarkerModelFromSeries(n,this,t),U(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),YR(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return Xv(`section`,{header:this.name,blocks:[Xv(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=Cv.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return YR(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(pv);yt(XR,Cv.prototype);function ZR(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function QR(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function $R(e,t,n,r,i,a,o){var s=[],c=hg(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=oz(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=Ac(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var ez={min:Dt($R,`min`),max:Dt($R,`max`),average:Dt($R,`average`),median:Dt($R,`median`)};function tz(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!QR(t)&&!K(t.coord)&&K(i)){var a=nz(t,n,r,e);if(t=pt(t),t.type&&ez[t.type]&&a.baseAxis&&a.valueAxis){var o=_t(i,a.baseAxis.dim),s=_t(i,a.valueAxis.dim),c=ez[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!K(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&ez[t.type]){var u=r.getOtherAxis(l);u&&(t.value=oz(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)ez[d[f]]&&(d[f]=oz(n,n.mapDimension(i[f]),d[f]));return t}}function nz(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(rz(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function rz(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function iz(e,t){return e&&e.containData&&t.coord&&!ZR(t)?e.containData(t.coord):!0}function az(e,t){return e?function(e,n,r,i){return mh(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return mh(e.value,t[i])}}function oz(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}var sz=wl(),cz=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=Yt()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){sz(e).keep=!1}),t.eachSeries(function(e){var i=XR.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!sz(e).keep&&r.group.remove(e.group)}),lz(t,i,this.type)},t.prototype.markKeep=function(e){sz(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;W(e,function(e){var r=XR.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Gu(e):Ku(e))})})},t.type=`marker`,t}(GO);function lz(e,t,n){e.eachSeries(function(e){var r=XR.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Rp(r),o=a.z,s=a.zlevel;Bp(i.group,o,s)}})}var uz=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(XR),dz=wl(),fz=function(e,t,n,r){var i=e.getData(),a;if(K(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=It(r.yAxis,r.xAxis);else{var l=nz(r,i,t,e);s=l.valueAxis,c=oz(i,gg(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=pt(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&kt(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[tz(e,a[0]),tz(e,a[1]),U({},a[2])];return h[2].type=h[2].type||null,mt(h[2],h[0]),mt(h[2],h[1]),h};function pz(e){return!isNaN(e)&&!isFinite(e)}function mz(e,t,n,r){var i=1-e,a=r.dimensions[e];return pz(t[i])&&pz(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function hz(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(mz(1,n,r,e)||mz(0,n,r,e)))return!0}return iz(e,t[0])&&iz(e,t[1])}function gz(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=wc(o.get(`x`),i.getWidth()),l=wc(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(yb(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;pz(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):pz(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var _z=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=XR.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=dz(t).from,a=dz(t).to;i.each(function(t){gz(i,t,!0,e,n),gz(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new VF);this.group.add(c.group);var l=vz(i,e,t),u=l.from,d=l.to,f=l.line;dz(t).from=u,dz(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);K(p)||(p=[p,p]),K(m)||(m=[m,m]),K(h)||(h=[h,h]),K(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:X(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){$l(e).dataModel=t,e.traverse(function(e){$l(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);gz(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=Ok(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:X(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:X(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:X(a.get(`symbolSize`),m[+!i]),symbol:X(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(cz);function vz(e,t,n){var r=e?G(e&&e.dimensions,function(e){var n=t.getData();return U(U({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Xh(r,n),a=new Xh(r,n),o=new Xh([],n),s=G(n.get(`data`),Dt(fz,t,e,n));e&&(s=St(s,Dt(hz,e)));var c=az(!!e,r);return i.initData(G(s,function(e){return e[0]}),null,c),a.initData(G(s,function(e){return e[1]}),null,c),o.initData(G(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function yz(e){e.registerComponentModel(uz),e.registerComponentView(_z),e.registerPreprocessor(function(e){qR(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var bz=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},xz=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),K(t)&&W(t,function(e,r){J(e)&&(e={type:e}),t[r]=mt(e,bz(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&yl(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=Yt(),a=G(r,function(e){return(J(e)||kt(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new ym(e,this,this.ecModel))},this);this._data=St(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;W(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;W(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;W(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&_t(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(pv),Sz=Dt,Cz=W,wz=Vd,Tz=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new wz),this.group.add(this._selectorGroup=new wz),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=ov(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=iv(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=iv(gt({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=dR(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Yt(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),Cz(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
17
|
+
`)){var p=new wz;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,Sz(Oz,f,null,r,d)).on(`mouseover`,Sz(kz,m.name,null,r,d)).on(`mouseout`,Sz(Az,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=$l(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=ua(h.fill);_&&_[3]===0&&(_[3]=.2,h=U(U({},h),{fill:va(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,Sz(Oz,null,f,r,d)).on(`mouseover`,Sz(kz,null,f,r,d)).on(`mouseout`,Sz(Az,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=$l(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};$l(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();Cz(e,function(e){var r=e.type,i=new Ys({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Yp(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),od(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=Ez(c,r,o,s,d,m,u),y=new wz,b=r.getModel(`textStyle`);if(q(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(Dz({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;J(w)&&w?T=w.replace(`{name}`,t??``):q(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Ys({style:Zp(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Ws({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&jp({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),od(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();ev(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){ev(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(GO);function Ez(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),Cz(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:EA(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function Dz(e){var t=e.icon||`roundRect`,n=jy(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function Oz(e,t,n,r){Az(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),kz(e,t,n,r)}function kz(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function Az(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function jz(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),Mz(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){W(i,function(t,n){e[t?`select`:`unSelect`](n)}),Mz(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Mz(e,t){var n=t||{};return W(e.getData(),function(t){var r=t.get(`name`);if(r!==`
|
|
18
|
+
`&&r!==``){var i=e.isSelected(r);n[r]=Z(n,r)?n[r]&&i:i}}),n}function Nz(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Dt(jz,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Dt(jz,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Dt(jz,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Dt(jz,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Dt(jz,`unSelect`))}var Pz=Ql(Fz);function Fz(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function Iz(e){e.registerComponentModel(xz),e.registerComponentView(Tz),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Pz),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),Nz(e)}var Lz=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=uv(t);e.prototype.init.call(this,t,n,r),Rz(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Rz(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Eg(xz.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800}),t}(xz);function Rz(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,lv(t,n,{type:`box`,ignoreSize:!!i})}var zz=Vd,Bz=[`width`,`height`],Vz=[`x`,`y`],Hz=function(e){H(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new zz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new zz)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=K(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Ys({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=Cp(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:Et(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=Bz[s],l=Vz[s],u=Bz[1-s],d=Vz[1-s];i&&ev(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=pt(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;ev(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),ev(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=X(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Ws({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Gf(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;W([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,J(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=Bz[i],o=Vz[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(Tz);function Uz(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function Wz(e){fM(Iz),e.registerComponentModel(Lz),e.registerComponentView(Hz),Uz(e)}function Gz(e){fM(Iz),fM(Wz)}var Kz={label:{enabled:!0},decal:{show:!1}},qz=wl(),Jz=wl(),Yz=Ql(Xz);function Xz(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=Jz(e).scope||(Jz(e).scope={}),i=pt(Kz);mt(i.label,e.getLocaleModel().get(`aria`),!1),mt(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Yt();e.eachSeries(function(e){e.isColorBySeries()||(qz(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(q(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=vv(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=qz(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=vv(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?U(U({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=gt(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=o>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_<i.count();_++)if(_<u){var v=i.getName(_),y=m?St(i.getValues(_),function(e,t){return _t(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(s(b,{name:v,value:y.join(d)}))}n+=g.join(d)+p,h.push(n)}});var _=a.getModel([`series`,`multiple`,`separator`]),v=_.get(`middle`),y=_.get(`end`);p+=h.join(v)+y,r.setAttribute(`aria-label`,p)}}}}function s(e,t){if(!J(e))return e;var n=e;return W(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function c(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function l(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function Zz(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},W([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function Qz(e){e.registerPreprocessor(Zz),e.registerVisual(e.PRIORITY.VISUAL.ARIA,Yz)}function $z(e,t,n){var r=Ze.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function eB(e){return!e.__cursors.get(0)}function tB(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var nB=function(e){H(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=Ya,typeof t==`string`?a=$z(t,n,r):At(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Qt(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=tB(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=$z(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new gr(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero())){if(i.length===0){var t=new gr(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new gr(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new gr(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=tB(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;Nt(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||Uk(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):Pt(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=tA(i,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&W(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(qa),rB=1e5,iB=314159,aB=void 0,oB=1,sB=2;function cB(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function lB(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function uB(e,t,n,r){var i=new nB(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,dB(i),i}function dB(e){e.__cursorStack=[],e.__cursors=Yt()}function fB(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function pB(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,fB({key:r})))}function mB(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function hB(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function gB(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&_B)||s.__builtin__)&&(!(n&vB)||!s.__builtin__)&&(!(n&yB)||s!==e.hoverlayer))&&t(s,a,o,i)}}var _B=1,vB=2,yB=4,bB=_B|yB,xB=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=U({},n||{}),this.dpr=n.devicePixelRatio||Ya,this._singleCanvas=i,this.root=e,e.style&&(Qt(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=uB(a,this,iB,0);c.initContext(),this._insertLayer(c,iB,0,!0),this._domRoot=e}else{this._width=Kk(e,0,n),this._height=Kk(e,1,n);var l=this._domRoot=lB(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!At(e)?{paintAll:!!e}:e||{},n=X(t.refresh,!0),r=X(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=sB),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return gB(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},vB),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=aB,n!==aB&&(!t&&n===sB&&(t=this._i.hoverlayer=this._ensureLayer(rB)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),bA(i,s,r),c&&(s.style=l)}}i&&(xA(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(rB)},e.prototype.paintOne=function(e,t){yA(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)gB(this._i,function(e){e.afterBrush&&e.afterBrush()},bB),this._paintHoverList(e);else{var i=this;yD(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(iB).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),gB(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},_B)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return gB(this._i,function(i){var a=!1;if(mB(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!eB(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}mB(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},bB),nn.wxa&&gB(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=eB(e),c=s&&Ze.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=sB),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(bA(o,f,a),f.setPrevPaintRect(p))}else bA(o,f,a);if(s&&Ze.getTime()-c>15){d++;break}}}xA(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=iB,t=0);var i=hB(this._i,e)[t];return i||(i=uB(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&mt(i,this._layerConfig[e],!0),(n||r&&e!==iB)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&cB(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=hB(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),hB(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return gB(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return gB(this._i,function(n,r){e.call(t,n,r)},_B)},e.prototype.eachOtherLayer=function(e,t){return gB(this._i,function(n,r){e.call(t,n,r)},vB)},e.prototype.getLayers=function(){var e={};return gB(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}gB(n._i,function(e){e.__dirty=!1,mB(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},bB);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){ft(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=pB(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}gB(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(eB(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(mB(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===aB&&(n._hoverLayerDirty=oB))},bB)},e.prototype.clear=function(){return gB(this._i,function(e){e.clear(),dB(e)},_B),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,gB(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?mt(n[e],t,!0):n[e]=t,gB(this._i,function(e,t){mt(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=Kk(i,0,r),t=Kk(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,gB(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(iB).resize(e,t)}return this},e.prototype.clearLayer=function(e){W(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[iB][0].dom;var t=new nB(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;gB(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];bA(n,l,a)}xA(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function SB(e){e.registerPainter(`canvas`,xB)}var CB=P(`<tr><td> </td><td> </td></tr>`),wB=P(`<tr><td> </td><td> </td><td> </td></tr>`),TB=P(`<div data-testid="model-detail-visual" data-chart-engine="echarts"></div> <div class="model-detail-data svelte-1i3n9mf"><table><thead><tr><th> </th><th> </th></tr></thead><tbody></tbody></table> <table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div>`,1);function EB(e,t){T(t,!1);let r=l(),o=l(),d=`agent-usage:theme-changed`;fM([kE,lS,uR,UR,Gz,KR,Qz,SB]);let m=w(t,`compositionTotals`,8),v=w(t,`unclassifiedTokens`,8),y=w(t,`trend`,8),b=w(t,`trendEvidence`,8),S=w(t,`locale`,8),D=w(t,`formatNumber`,8),O=w(t,`formatMoney`,8),k=l(null),j=l(null),M=null,N=0,P=0,F=0,L=l(!1),R=l(!1),z=l({text:`#10131a`,muted:`#697386`,surface:`#ffffff`,border:`#dce1e9`,primary:`#647cf0`,cost:`#9b7cf4`}),ne=[{key:`input`,label:`input`,color:`#6f8ff7`},{key:`output`,label:`output`,color:`#e19a6c`},{key:`reasoning`,label:`reasoning`,color:`#9b7cf4`},{key:`cacheRead`,label:`cacheRead`,color:`#52c5a4`},{key:`cacheWrite`,label:`cacheWrite`,color:`#e0b84f`}];function re(e){return Te(S(),e)}function ie(e){let{composition:t,trend:n,trendEvidence:r,compact:i,colors:a,locale:o,formatNumber:s,formatMoney:c}=e,l=e=>Te(o,e),u=l(`recordedTotal`),d=l(`cost`),f=r.find(e=>e.costAmount!==null)?.costCurrency??`USD`;return{animation:!se(),animationDuration:320,aria:{enabled:!0,decal:{show:!1}},title:[{text:l(`tokenBreakdown`),left:i?16:`3%`,top:i?8:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}},{text:l(`modelTrend`),left:i?16:`47%`,top:i?`53%`:10,textStyle:{color:a.text,fontSize:12,fontWeight:600},subtextStyle:{color:a.muted,fontSize:9}}],legend:[{type:`scroll`,orient:`horizontal`,left:i?12:`2%`,right:i?12:`55%`,...i?{top:224}:{bottom:12},data:t.map(e=>e.name),textStyle:{color:a.muted,fontSize:9},itemWidth:9,itemHeight:9},{left:i?12:`47%`,top:i?`62%`:50,data:[u,d],textStyle:{color:a.muted,fontSize:9},itemWidth:14,itemHeight:8}],tooltip:{trigger:`item`,confine:!0,renderMode:`richText`,backgroundColor:a.surface,borderColor:a.border,borderWidth:1,padding:[9,11],textStyle:{color:a.text,fontSize:11},formatter:e=>{let t=Array.isArray(e)?e[0]:e,i=typeof t.dataIndex==`number`?t.dataIndex:-1,a=typeof t.value==`number`?t.value:0;if(t.seriesType===`pie`)return`${t.name}\n${s(a)} ${l(`tokens`)}`;let o=n[i],u=r[i];return!o||!u?`${s(a)} ${l(`tokens`)}`:t.seriesName===d?`${o.label}\n${c(u.costAmount,u.costCurrency)}`:`${o.label}\n${s(a)} ${l(`tokens`)}`}},grid:{left:i?48:`47%`,right:48,top:i?`68%`:82,bottom:i?34:38,containLabel:!0},xAxis:{type:`category`,boundaryGap:!1,data:n.map(e=>e.label),axisLine:{lineStyle:{color:a.border}},axisTick:{show:!1},axisLabel:{color:a.muted,fontSize:9,hideOverlap:!0,interval:`auto`}},yAxis:[{type:`value`,min:0,splitNumber:3,axisLabel:{color:a.muted,fontSize:9,formatter:e=>ae(e,o)},splitLine:{lineStyle:{color:a.border,opacity:.65}}},{type:`value`,min:0,position:`right`,splitNumber:3,axisLabel:{color:a.cost,fontSize:9,formatter:e=>oe(e,f,o)},splitLine:{show:!1}}],series:[{name:l(`tokenBreakdown`),type:`pie`,center:i?[`50%`,`27%`]:[`23%`,`50%`],radius:i?[`20%`,`34%`]:[`34%`,`54%`],avoidLabelOverlap:!0,itemStyle:{borderColor:a.surface,borderWidth:3,borderRadius:4},label:{show:!1},emphasis:{focus:`self`,scaleSize:5},data:t},{name:u,type:`line`,yAxisIndex:0,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.recordedTokens),lineStyle:{width:2.5,color:a.primary},itemStyle:{color:a.primary},areaStyle:{color:a.primary,opacity:.12},emphasis:{focus:`series`}},{name:d,type:`line`,yAxisIndex:1,smooth:.28,showSymbol:n.length<=14,symbolSize:6,connectNulls:!1,data:r.map(e=>e.costAmount),lineStyle:{width:2,type:`dashed`,color:a.cost},itemStyle:{color:a.cost},emphasis:{focus:`series`}}]}}function ae(e,t){return new Intl.NumberFormat(t,{notation:`compact`,maximumFractionDigits:1}).format(e)}function oe(e,t,n){return new Intl.NumberFormat(n,{style:`currency`,currency:t,notation:`compact`,maximumFractionDigits:1}).format(e)}function se(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function ce(e,t){return p(k)&&getComputedStyle(p(k)).getPropertyValue(e).trim()||t}function le(){x(z,{text:ce(`--text-strong`,p(z).text),muted:ce(`--muted`,p(z).muted),surface:ce(`--surface`,p(z).surface),border:ce(`--border`,p(z).border),primary:ce(`--primary`,p(z).primary),cost:ce(`--warning`,p(z).cost)})}function ue(e){p(j)?.setOption(e,{notMerge:!0,lazyUpdate:!1})}V(()=>{if(p(k))return P=requestAnimationFrame(()=>{F=requestAnimationFrame(()=>{p(k)&&(le(),x(R,p(k).clientWidth<660),x(j,Kj(p(k),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(j).getDom().setAttribute(`aria-hidden`,`true`),ue(p(o)),M=new ResizeObserver(([e])=>{let t=e.contentRect.width<660;t!==p(R)&&x(R,t),cancelAnimationFrame(N),N=requestAnimationFrame(()=>p(j)?.resize())}),M.observe(p(k)),x(L,!0))})}),window.addEventListener(d,le),()=>{window.removeEventListener(d,le),cancelAnimationFrame(P),cancelAnimationFrame(F),cancelAnimationFrame(N),M?.disconnect(),p(j)?.dispose(),x(j,null)}}),g(()=>(f(m()),f(v())),()=>{x(r,ne.map(e=>({name:re(e.label),value:m()[e.key],itemStyle:{color:e.color}})).filter(e=>e.value>0).concat(v()>0?[{name:re(`unclassified`),value:v(),itemStyle:{color:`#8b94a5`}}]:[]))}),g(()=>(p(r),f(y()),f(b()),p(R),p(z),f(S()),f(D()),f(O())),()=>{x(o,ie({composition:p(r),trend:y(),trendEvidence:b(),compact:p(R),colors:p(z),locale:S(),formatNumber:D(),formatMoney:O()}))}),g(()=>(p(j),p(o)),()=>{p(j)&&ue(p(o))}),de(),te();var fe=TB(),pe=u(fe);let me;E(pe,e=>x(k,e),()=>p(k));var he=B(pe,2),ge=s(he),_e=s(ge),ve=s(_e),ye=s(ve),be=s(ye,!0);I(ye);var xe=B(ye),Se=s(xe,!0);I(xe),I(ve),I(_e);var Ce=B(_e);_(Ce,5,()=>p(r),e=>e.name,(e,t)=>{var r=CB(),o=s(r),l=s(o,!0);I(o);var u=B(o),d=s(u,!0);I(u),I(r),n(e=>{a(l,(p(t),c(()=>p(t).name))),a(d,e)},[()=>(f(D()),p(t),c(()=>D()(p(t).value)))]),i(e,r)}),I(Ce),I(ge);var we=B(ge,2),Ee=s(we),De=s(Ee),Oe=s(De),ke=s(Oe,!0);I(Oe);var Ae=B(Oe),je=s(Ae,!0);I(Ae);var Me=B(Ae),Ne=s(Me,!0);I(Me),I(De),I(Ee);var Pe=B(Ee);_(Pe,7,y,e=>e.start,(e,t,r)=>{let o=h(()=>(f(b()),f(p(r)),c(()=>b()[p(r)])));var l=wB(),u=s(l),d=s(u,!0);I(u);var m=B(u),g=s(m,!0);I(m);var _=B(m),v=s(_,!0);I(_),I(l),n((e,n)=>{a(d,(p(t),c(()=>p(t).label))),a(g,e),a(v,n)},[()=>(p(t),f(p(o)),f(D()),c(()=>p(t).gap||p(o)?.recordedTokens===null?re(`gap`):D()(p(o).recordedTokens))),()=>(f(p(o)),f(O()),c(()=>p(o)?.costAmount===null?re(`notAvailable`):O()(p(o).costAmount,p(o).costCurrency)))]),i(e,l)}),I(Pe),I(we),I(he),n((e,t,n,r,i,o,s,c)=>{me=C(pe,1,`model-detail-visual svelte-1i3n9mf`,null,me,{"chart-pending":!p(L)}),A(pe,`aria-busy`,!p(L)),A(pe,`aria-label`,e),A(ge,`aria-label`,t),a(be,n),a(Se,r),A(we,`aria-label`,i),a(ke,o),a(je,s),a(Ne,c)},[()=>c(()=>`${re(`tokenBreakdown`)} · ${re(`modelTrend`)}`),()=>c(()=>re(`tokenBreakdown`)),()=>c(()=>re(`tokens`)),()=>c(()=>re(`total`)),()=>c(()=>re(`modelTrend`)),()=>c(()=>re(`interval`)),()=>c(()=>re(`tokens`)),()=>c(()=>re(`cost`))]),i(e,fe),ee()}function DB(e){return e.retailEquivalent.amount===null?e.reportedEstimate.amount:e.retailEquivalent.amount}function OB(e,t,n,r,i){let a=e.flatMap(e=>{let n=t===`tokens`?e.tokenTotals.total:DB(e);return n===null||n<=0?[]:[{modelId:e.id,model:e,value:n,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline}]}),o=a.reduce((e,t)=>e+t.value,0)||1,s=new Map;for(let e of a)s.set(e.model.model,(s.get(e.model.model)??0)+1);let c=new Set,l=e=>{if((s.get(e.model)??0)===1)return e.model;let t=`${e.model} · ${e.providerDisplayName}`;if(!c.has(t))return t;let n=`${e.model} · ${e.providerDisplayName} · ${e.billingDomainDisplayName}`;if(!c.has(n))return n;let r=2,i=`${n} #${r}`;for(;c.has(i);)i=`${n} #${++r}`;return i};return a.map(e=>{let t=l(e.model);return c.add(t),{modelId:e.model.id,name:t,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,value:e.value,share:e.value/o,color:n(e.model.providerId,e.model.billingDomainId),formattedValue:r(e.value),formattedShare:i(e.value/o)}})}function kB(e,t,n={notAvailable:`Unavailable`,separateFromHeadline:`Separate domain · not included in headline`},r=!0){return{animation:r,animationDuration:r?320:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n.notAvailable,left:`center`,top:`46%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`model-breakdown-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>jB(e,t,n,n.notAvailable)},series:[{type:`treemap`,top:0,left:0,right:0,bottom:0,roam:!1,nodeClick:!1,squareRatio:1,gapWidth:2,breadcrumb:{show:!1},upperLabel:{show:!1},label:{show:!0,color:t.text,fontSize:11,fontWeight:600,lineHeight:16,overflow:`truncate`,ellipsis:`…`,formatter:e=>AB(e)},itemStyle:{borderColor:t.surface,borderWidth:2,gapWidth:2},emphasis:{label:{show:!0,fontWeight:700},itemStyle:{borderColor:t.border,borderWidth:3}},data:e.map(e=>({name:e.name,value:e.value,modelId:e.modelId,formattedValue:e.formattedValue,formattedShare:e.formattedShare,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,itemStyle:{color:e.color}}))}]}}function AB(e){if(!e||typeof e!=`object`||!(`data`in e))return``;let t=e.data;return!t||typeof t!=`object`?``:[t.name,t.formattedValue].filter(e=>typeof e==`string`).join(`
|
|
19
|
+
`)}function jB(e,t,n,r){if(!e||typeof e!=`object`||!(`data`in e))return r;let i=e.data;if(!i||typeof i!=`object`)return r;let a=i,o=[`<strong>${MB(a.name)}</strong>`,`<span style="color:${MB(t.muted)}">${MB(a.providerDisplayName)} · ${MB(a.billingDomainDisplayName)}</span>`,`<span>${MB(a.formattedValue)} · ${MB(a.formattedShare)}</span>`];return a.includedInHeadline||o.push(`<span style="color:${MB(t.muted)}">${MB(n.separateFromHeadline)}</span>`),o.join(`<br>`)}function MB(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var NB=2.5,PB=[10,7],FB=`rgba(122, 136, 164, 0.16)`,IB=`#697386`,LB=`Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,RB={codex:`#78a7ff`,"claude-code":`#d69b73`,opencode:`#55c89d`,"opencode-go":`#73d4b2`,"grok:grok-build-subscription":`#b28cff`,"grok:custom":`#d480ff`,"grok:xai-api":`#f07f9a`,dsh:`#e3c85c`};function zB(e,t){return RB[`${e}:${t}`]??RB[e]??`#9aa5b8`}function BB(e,t=0,n=null){if(e<=0)return{start:0,size:0};let r=Math.max(Math.min(4,e),Math.min(n??e,e));return{start:Math.max(0,Math.min(t,e-r)),size:r}}function VB(e,t,n,r,i=.5){if(e<=1)return{start:t,size:n};let a=BB(e,t,n),o=r===`in`?Math.max(Math.min(4,e),Math.round(a.size*.7)):Math.min(e,Math.ceil(a.size/.7));if(o===a.size)return{start:a.start,size:o===e?null:o};let s=Math.max(0,Math.min(1,i)),c=a.start+s*Math.max(0,a.size-1);return{start:Math.max(0,Math.min(e-o,Math.round(c-s*Math.max(0,o-1)))),size:o===e?null:o}}function HB(e,t,n,r){let i=BB(e,t,n);return Math.max(0,Math.min(e-i.size,i.start+r))}function UB(e,t){let n=e.flatMap(e=>e.segments),r=t===`tokens`?n.map(e=>({...e,costPurpose:null})):n.flatMap(e=>[...e.retailEquivalent.amount===null?[]:[{...e,costPurpose:`retail-equivalent`}],...e.reportedEstimate?.amount==null?[]:[{...e,costPurpose:`reported-estimate`}]]);return[...new Map(r.map(e=>[`${e.providerId}:${e.billingDomainId}:${e.costPurpose??`tokens`}`,{providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainId:e.billingDomainId,billingDomainDisplayName:e.billingDomainDisplayName,includedInHeadline:e.includedInHeadline,costPurpose:e.costPurpose}])).values()]}function WB(e,t,n){return e?t===`tokens`?e.recordedTokens:n===`reported-estimate`?e.reportedEstimate?.amount??null:e.retailEquivalent.amount:null}function GB(e,t){return UB(e,t).map(n=>({...n,key:`${n.providerId}:${n.billingDomainId}:${n.costPurpose??`tokens`}`,values:e.map(e=>e.gap?null:WB(e.segments.find(e=>e.providerId===n.providerId&&e.billingDomainId===n.billingDomainId),t,n.costPurpose))}))}function KB(e){let t=e.flatMap(e=>e.values.filter(e=>e!==null));return t.length>0?Math.max(...t):null}function qB(e,t){return e[t]!=null&&e[t-1]==null&&e[t+1]==null}function JB(e,t){return t<=1?50:Math.max(8,Math.min(92,e/(t-1)*100))}function YB(e){let t=zB(e.providerId,e.billingDomainId),n=e.costPurpose===`reported-estimate`;return{id:e.key,name:e.key,type:`line`,data:e.values,connectNulls:!1,silent:!0,showSymbol:e.values.some((t,n)=>qB(e.values,n)),symbol:`circle`,symbolSize:(t,n)=>qB(e.values,n.dataIndex)?8:0,lineStyle:{width:NB,color:t,type:n?PB:`solid`,cap:`round`,join:`round`},itemStyle:n?{color:`transparent`,borderColor:t,borderWidth:2}:{color:t,borderColor:t,borderWidth:0},areaStyle:n?void 0:{color:{type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${t}3d`},{offset:1,color:`${t}00`}]}},emphasis:{disabled:!0},z:n?3:2,clip:!0}}function XB(e,t,n,r,i,a=e=>String(e)){let o=Math.max(1,n??0),s={color:r.label,fontFamily:LB,fontSize:10};return{animation:i,animationDuration:i?240:0,backgroundColor:`transparent`,grid:{left:12,right:16,top:16,bottom:12,containLabel:!0},xAxis:{type:`category`,data:e,boundaryGap:!1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{...s,show:!0,hideOverlap:!0,margin:10},splitLine:{show:!1}},yAxis:{type:`value`,min:0,max:o,interval:o/2,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{...s,show:!0,margin:8,formatter:a},splitLine:{show:!0,lineStyle:{color:r.gridLine,width:1}}},series:t.map(YB)}}var ZB=P(`<div class="model-breakdown-treemap-root svelte-1nr4hcl"><div class="model-breakdown-echarts svelte-1nr4hcl" data-testid="model-breakdown-treemap" data-chart-engine="echarts"></div></div>`);function QB(e,t){T(t,!1);let r=l(),a=l();fM([OF,UR,KR,Qz,SB]);let u=w(t,`models`,8),d=w(t,`metric`,8),m=w(t,`currency`,8),h=w(t,`locale`,24,()=>we(``)),_=w(t,`formatUsageMetric`,8),v=w(t,`formatPercent`,8),y=w(t,`onSelect`,8),b=l(null),S=l(null),C=l(null),D=null,O=l({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function k(e){return Te(h(),e)}function j(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function M(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function N(){let e=p(S)??p(b);e&&x(O,{text:M(e,`--text-strong`,p(O).text),muted:M(e,`--muted`,p(O).muted),surface:M(e,`--surface`,p(O).surface),border:M(e,`--border`,p(O).border)})}async function P(e){p(C)&&(p(C).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(C).resize())}V(()=>{if(p(b))return N(),x(C,Kj(p(b),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(C).on(`click`,e=>{let t=e?.data,n=t&&typeof t==`object`?t.modelId:null;typeof n==`string`&&y()(n)}),D=new ResizeObserver(()=>p(C)?.resize()),D.observe(p(b)),window.addEventListener(Ee,N),()=>{window.removeEventListener(Ee,N),D?.disconnect(),D=null,p(C)?.dispose(),x(C,null)}}),g(()=>(f(u()),f(d()),f(_()),f(m()),f(v())),()=>{x(r,OB(u(),d(),zB,e=>_()(e,m(),d()),v()))}),g(()=>(p(r),p(O)),()=>{x(a,kB(p(r),p(O),{notAvailable:k(`notAvailable`),separateFromHeadline:k(`separateFromHeadline`)},!j()))}),g(()=>(p(C),p(a)),()=>{p(C)&&P(p(a))}),de(),te();var F=ZB(),L=s(F);E(L,e=>x(b,e),()=>p(b)),I(F),E(F,e=>x(S,e),()=>p(S)),n(e=>A(L,`aria-label`,e),[()=>c(()=>k(`modelBreakdownTreemap`))]),i(e,F),ee()}var $B=P(`<div class="model-trend-stacked-root svelte-kd7ncs" data-testid="model-trend-stacked"></div>`);function eV(e,t){T(t,!1);let r=l(),a=l(),o=l();fM([UT,uR,UR,Gz,Qz,SB]);let s=w(t,`models`,8),u=w(t,`metric`,8),d=w(t,`currency`,8),m=w(t,`locale`,24,()=>we(``)),h=w(t,`formatUsageMetric`,8),_=w(t,`onSelect`,8),v=l(null),y=l(null),b=null;function S(e){return Te(m(),e)}function C(e){let t={};for(let n of e)t[n.model]=(t[n.model]??0)+1;return e.map(e=>(t[e.model]??0)>1?`${e.model} · ${e.providerDisplayName}`:e.model)}function D(e,t){let n=e.trend[t];return!n||n.gap?null:u()===`tokens`?n.tokenTotals.total:n.retailEquivalent.amount}function O(e,t,n){let r=e.map((e,r)=>({name:t[r],type:`bar`,stack:`total`,barMaxWidth:34,emphasis:{focus:`series`},itemStyle:{color:zB(e.providerId,e.billingDomainId)},data:n.map((t,n)=>D(e,n))}));return{animation:!k(),animationDuration:280,aria:{enabled:!0,decal:{show:!1}},legend:{type:`scroll`,bottom:4,left:8,right:8,textStyle:{color:`#697386`,fontSize:9},data:t},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},confine:!0,formatter:e=>{let t=Array.isArray(e)?e:[e],n=t[0];return[typeof n?.axisValue==`string`?n.axisValue:``,...t.flatMap(e=>{let t=typeof e.value==`number`?e.value:null;return t===null?[]:`${e.marker??``} ${e.seriesName}: ${h()(t,d(),u())}`})].join(`<br/>`)}},grid:{left:48,right:48,top:18,bottom:46,containLabel:!0},xAxis:{type:`category`,data:n,axisTick:{show:!1},axisLine:{lineStyle:{color:`#dce1e9`}},axisLabel:{color:`#697386`,fontSize:9,hideOverlap:!0}},yAxis:{type:`value`,min:0,axisLabel:{color:`#697386`,fontSize:9,formatter:e=>h()(e,d(),u())},splitLine:{lineStyle:{color:`#dce1e9`,opacity:.65}}},series:r}}function k(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}V(()=>{if(p(v))return x(y,Kj(p(v),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(y).on(`click`,e=>{let t=typeof e.seriesIndex==`number`?e.seriesIndex:-1,n=s()[t];n&&_()(n.id)}),b=new ResizeObserver(()=>p(y)?.resize()),b.observe(p(v)),()=>{b?.disconnect(),p(y)?.dispose(),x(y,null)}}),g(()=>f(s()),()=>{x(r,s()[0]?.trend.map(e=>e.label)??[])}),g(()=>f(s()),()=>{x(a,C(s()))}),g(()=>(f(s()),p(a),p(r)),()=>{x(o,O(s(),p(a),p(r)))}),g(()=>(p(y),p(o)),()=>{p(y)&&p(y).setOption(p(o),{notMerge:!0,lazyUpdate:!1})}),de(),te();var j=$B();E(j,e=>x(v,e),()=>p(v)),n(e=>A(j,`aria-label`,e),[()=>c(()=>S(`modelTrendStacked`))]),i(e,j),ee()}function tV(e,t,n,r,i){return e.flatMap(e=>{let a=t===`tokens`?e.recordedTokens:e.retailEquivalent.amount,o=t===`tokens`?e.tokenShare:e.retailShare;return e.includedInHeadline===!1||a===null||o===null||a<=0||o<=0?[]:[{key:`${e.providerId}:${e.billingDomainId}`,name:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,value:a,share:o,color:n(e.providerId,e.billingDomainId),formattedValue:r(a),formattedShare:i(o)}]})}function nV(e,t,n=`Unavailable`,r=!0){return{animation:r,animationDuration:r?360:0,animationEasing:`cubicOut`,aria:{enabled:!0,decal:{show:!1}},title:{show:e.length===0,text:n,left:`center`,top:`38%`,textStyle:{color:t.muted,fontSize:12,fontWeight:500}},legend:{show:e.length>0,type:`scroll`,left:`center`,right:`center`,bottom:0,orient:`horizontal`,icon:`circle`,itemWidth:8,itemHeight:8,itemGap:16,pageButtonGap:7,pageIconSize:9,pageIconColor:t.text,pageIconInactiveColor:t.border,pageTextStyle:{color:t.muted,fontSize:10},textStyle:{color:t.muted,fontSize:11},formatter:e=>e.length>18?`${e.slice(0,17)}…`:e,tooltip:{show:!0,formatter:r=>aV(iV(r,e),t,n)}},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`provider-share-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter:e=>aV(rV(e),t,n)},series:[{type:`pie`,radius:[`48%`,`70%`],center:[`50%`,`42%`],minAngle:2,avoidLabelOverlap:!0,padAngle:1.5,itemStyle:{borderColor:t.surface,borderWidth:3,borderRadius:5},label:{show:!1},labelLine:{show:!1},emphasis:{scale:!0,scaleSize:7,itemStyle:{shadowBlur:14,shadowColor:`rgba(0, 0, 0, 0.22)`}},data:e.map(e=>({...e,itemStyle:{color:e.color}}))}]}}function rV(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`?null:t}function iV(e,t){if(!e||typeof e!=`object`||!(`name`in e))return null;let n=e.name;return typeof n==`string`?t.find(e=>e.name===n)??null:null}function aV(e,t,n){return e?[`<strong>${oV(e.name)}</strong>`,`<span style="color:${oV(t.muted)}">${oV(e.billingDomainDisplayName)}</span>`,`<span>${oV(e.formattedValue)} · ${oV(e.formattedShare)}</span>`].join(`<br>`):n}function oV(e){return e.replace(/[&<>'"]/g,e=>({"&":`&`,"<":`<`,">":`>`,"'":`'`,'"':`"`})[e]??e)}var sV=P(`<tr><td> </td><td> </td><td> </td></tr>`),cV=P(`<div class="provider-share-chart-root svelte-15bk8av"><div class="provider-share-echarts svelte-15bk8av" data-testid="provider-share-chart" data-chart-engine="echarts"></div> <div class="provider-share-data svelte-15bk8av"><table><thead><tr><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></div>`);function lV(e,t){T(t,!1);let r=l(),u=l();fM([kE,Gz,UR,KR,Qz,SB]);let d=w(t,`providers`,8),m=w(t,`metric`,8),h=w(t,`currency`,8),v=w(t,`locale`,24,()=>we(``)),y=w(t,`formatUsageMetric`,8),b=w(t,`formatPercent`,8),S=l(null),C=l(null),D=l(null),O=null,k=l({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`});function j(e){return Te(v(),e)}function M(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function N(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function P(){let e=p(C)??p(S);e&&x(k,{text:N(e,`--text-strong`,p(k).text),muted:N(e,`--muted`,p(k).muted),surface:N(e,`--surface-subtle`,p(k).surface),border:N(e,`--border`,p(k).border)})}async function F(e){p(D)&&(p(D).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(D).resize())}V(()=>{if(p(S))return P(),x(D,Kj(p(S),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(D).getDom().setAttribute(`aria-hidden`,`true`),O=new ResizeObserver(()=>p(D)?.resize()),O.observe(p(S)),window.addEventListener(Ee,P),()=>{window.removeEventListener(Ee,P),O?.disconnect(),O=null,p(D)?.dispose(),x(D,null)}}),g(()=>(f(d()),f(m()),f(y()),f(h()),f(b())),()=>{x(r,tV(d(),m(),zB,e=>y()(e,h(),m()),b()))}),g(()=>(p(r),p(k)),()=>{x(u,nV(p(r),p(k),j(`notAvailable`),!M()))}),g(()=>(p(D),p(u)),()=>{p(D)&&F(p(u))}),de(),te();var L=cV(),R=s(L);E(R,e=>x(S,e),()=>p(S));var z=B(R,2),ne=s(z),re=s(ne),ie=s(re),ae=s(ie),oe=s(ae,!0);I(ae);var se=B(ae),ce=s(se,!0);I(se);var le=B(se),ue=s(le,!0);I(le),I(ie),I(re);var fe=B(re);_(fe,5,()=>p(r),e=>e.key,(e,t)=>{var r=sV(),o=s(r),l=s(o);I(o);var u=B(o),d=s(u,!0);I(u);var f=B(u),m=s(f,!0);I(f),I(r),n(()=>{a(l,`${p(t),c(()=>p(t).name)??``} · ${p(t),c(()=>p(t).billingDomainDisplayName)??``}`),a(d,(p(t),c(()=>p(t).formattedValue))),a(m,(p(t),c(()=>p(t).formattedShare)))}),i(e,r)}),I(fe),I(ne),I(z),I(L),E(L,e=>x(C,e),()=>p(C)),n((e,t,n,r)=>{A(ne,`aria-label`,e),a(oe,t),a(ce,n),a(ue,r)},[()=>c(()=>j(`providerShare`)),()=>c(()=>j(`providersLabel`)),()=>(f(m()),c(()=>m()===`tokens`?j(`tokens`):j(`cost`))),()=>(f(m()),c(()=>m()===`tokens`?j(`tokenShare`):j(`costShare`)))]),i(e,L),ee()}var uV=6e4,dV=300,fV=1440,pV=20160;function mV(e){if(typeof e.windowDurationMinutes==`number`&&Number.isFinite(e.windowDurationMinutes)&&e.windowDurationMinutes>0)return e.windowDurationMinutes;let t=e.label.trim().toLowerCase();if(/\b5[- ]?hours?\b/.test(t))return dV;if(/\bweeks?\b|\bweekly\b/.test(t))return 10080;if(/\bmonths?\b|\bmonthly\b/.test(t))return 43200;let n=t.match(/\b(\d+(?:\.\d+)?)\s*(minutes?|hours?|days?)\b/);if(!n)return null;let r=Number(n[1]);return!Number.isFinite(r)||r<=0?null:n[2].startsWith(`day`)?r*24*60:n[2].startsWith(`hour`)?r*60:r}function hV(e,t,n,r,i=`UTC`){let a=gV(t,n,r,i),o=e.flatMap(e=>{let n=xV(e,t);return!n||!n.bucket.resetsAt?[]:[{id:`${e.providerId}:${e.billingDomainId}`,providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainId:e.billingDomainId,billingDomainDisplayName:e.billingDomainDisplayName,selectedLabel:n.bucket.label,durationMinutes:n.durationMinutes,usedPercent:fe(n.bucket.usedPercent),resetsAt:n.bucket.resetsAt,authority:n.bucket.authority,observedAt:n.bucket.observedAt??e.observedAt}]});return{mode:t,range:a,lanes:o,windows:o.flatMap(e=>CV(e,a,r)),nowMs:r}}function gV(e,t,n,r=`UTC`){let i=_V(n,r);if(e===`session`){let e=vV(i,t),n=vV(e,3);return{startMs:yV(e,r),endMs:yV(n,r)}}let a=vV(i,-new Date(Date.UTC(i.year,i.month-1,i.day)).getUTCDay()+t*7),o=vV(a,14);return{startMs:yV(a,r),endMs:yV(o,r)}}function _V(e,t){let n=new Intl.DateTimeFormat(`en-CA`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(e),r=e=>Number(n.find(t=>t.type===e)?.value);return{year:r(`year`),month:r(`month`),day:r(`day`)}}function vV(e,t){let n=new Date(Date.UTC(e.year,e.month-1,e.day+t));return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate()}}function yV(e,t){let n=Date.UTC(e.year,e.month-1,e.day),r=n;for(let e=0;e<2;e+=1){let e=bV(r,t),i=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second);r+=n-i}return r}function bV(e,t){let n=new Intl.DateTimeFormat(`en-GB`,{timeZone:t,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`}).formatToParts(e),r=e=>Number(n.find(t=>t.type===e)?.value);return{year:r(`year`),month:r(`month`),day:r(`day`),hour:r(`hour`),minute:r(`minute`),second:r(`second`)}}function xV(e,t){return e.quotaBuckets.flatMap(e=>{let n=mV(e),r=e.resetsAt?Date.parse(e.resetsAt):NaN;return!n||!Number.isFinite(r)||t===`session`&&n!==dV||t===`weekly`&&(n<fV||n>pV)?[]:[{bucket:e,durationMinutes:n}]}).sort((e,t)=>{let n=t.durationMinutes-e.durationMinutes;if(n!==0)return n;let r=SV(e.bucket)-SV(t.bucket);return r===0?e.bucket.id.localeCompare(t.bucket.id):r})[0]??null}function SV(e){let t=e.label.toLowerCase();return/all models|^week$|^weekly limit$/.test(t)?0:/fable|spark|model/.test(t)?2:1}function CV(e,t,n){let r=Date.parse(e.resetsAt),i=e.durationMinutes*uV;if(!Number.isFinite(r)||!(i>0)||t.endMs<=t.startMs||Math.ceil((t.endMs-t.startMs)/i)+2>1e3)return[];let a=r+Math.ceil((t.startMs-r)/i)*i,o=[];for(;a-i<t.endMs;){let s=a-i,c=Math.max(s,t.startMs),l=Math.min(a,t.endMs);if(l>c){let t=a<=n?`elapsed`:s<=n?`current`:`upcoming`,i=t===`current`&&a===r;o.push({laneId:e.id,providerId:e.providerId,providerDisplayName:e.providerDisplayName,billingDomainDisplayName:e.billingDomainDisplayName,label:e.selectedLabel,startMs:s,endMs:a,visibleStartMs:c,visibleEndMs:l,state:t,usedPercent:i?fe(e.usedPercent):null,authority:i?e.authority:`estimate`,observedAt:e.observedAt})}a+=i}return o}var wV=P(`<p class="quota-timeline-empty svelte-1oyi7sq" role="status"> </p>`),TV=P(`<div class="quota-timeline-scroll svelte-1oyi7sq"><div class="quota-timeline-chart svelte-1oyi7sq"></div></div>`),EV=P(`<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>`),DV=P(`<section class="quota-timeline svelte-1oyi7sq" data-testid="quota-timeline" data-chart-engine="echarts" aria-labelledby="quota-timeline-heading"><header class="svelte-1oyi7sq"><div><h2 id="quota-timeline-heading" class="svelte-1oyi7sq"> </h2> <p class="quota-timeline-range svelte-1oyi7sq"> </p></div> <div class="quota-timeline-controls svelte-1oyi7sq"><div class="quota-timeline-navigation svelte-1oyi7sq"><button type="button" class="svelte-1oyi7sq">‹</button> <button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq">›</button></div> <div class="quota-timeline-modes svelte-1oyi7sq" role="group"><button type="button" class="svelte-1oyi7sq"> </button> <button type="button" class="svelte-1oyi7sq"> </button></div></div></header> <div class="quota-timeline-legend svelte-1oyi7sq" aria-hidden="true"><ul class="quota-timeline-legend-items svelte-1oyi7sq"><li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-solid svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-outline svelte-1oyi7sq"></span> </li> <li class="quota-timeline-legend-item svelte-1oyi7sq"><span class="quota-timeline-swatch swatch-dashed svelte-1oyi7sq"></span> </li></ul></div> <!> <div class="quota-timeline-data svelte-1oyi7sq"><table><thead><tr><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th><th> </th></tr></thead><tbody></tbody></table></div></section>`);function OV(e,t){T(t,!1);let r=l(),d=l(),h=l(),y=l(),b=l(),S=`agent-usage:theme-changed`;fM([hL,uR,yz,UR,Qz,SB]);let C=w(t,`providers`,8),D=w(t,`locale`,24,()=>we(``)),O=w(t,`timeZone`,8,`UTC`),k=w(t,`now`,24,()=>Date.now()),M=l(null),P=l(null),F=l(null),L=null,R=l(`weekly`),z=l(0),ne=l({text:`#f4f6fb`,muted:`#9aa4b4`,surface:`#171c25`,border:`#2b3441`,grid:`rgba(122, 136, 164, 0.16)`});function V(e){return Te(D(),e)}function re(e,t){let n=new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,timeZone:O()});return`${n.format(e)} – ${n.format(t-1)}`}function ie(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:O()}).format(e)}function ae(e){return new Intl.DateTimeFormat(D(),{month:`2-digit`,day:`2-digit`,...p(R)===`session`?{hour:`2-digit`}:{},hour12:!1,timeZone:O()}).format(e)}function oe(e){return V({elapsed:`quotaTimelineElapsed`,current:`quotaTimelineCurrent`,upcoming:`quotaTimelineUpcoming`}[e])}function se(e){return V({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`}[e])}function le(e){x(R,e),x(z,0)}function ue(e){return e===`current`?.34:e===`upcoming`?.12:.08}function pe(e,t,n,r,i,a){let o=e.windows.map(t=>{let n=e.lanes.findIndex(e=>e.id===t.laneId);return{value:[n,t.visibleStartMs,t.visibleEndMs],window:t,color:zB(t.providerId,e.lanes[n].billingDomainId)}}),s=a>=e.range.startMs&&a<e.range.endMs;return{animation:!ve(),animationDuration:ve()?0:320,aria:{enabled:!0,decal:{show:!1}},grid:{left:156,right:18,top:42,bottom:14},tooltip:{show:!0,trigger:`item`,renderMode:`html`,confine:!0,className:`quota-timeline-tooltip`,backgroundColor:t.surface,borderColor:t.border,borderWidth:1,padding:[10,12],textStyle:{color:t.text,fontSize:11},extraCssText:`border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);`,formatter(e){let t=me(e);if(!t)return``;let n=fe(t.usedPercent),r=n===null?``:`<br/><strong>${he(n)}% ${_e(V(`used`))}</strong>`,i=t.observedAt?ie(Date.parse(t.observedAt)):`—`;return`<strong>${_e(t.providerDisplayName)}</strong> · ${_e(t.billingDomainDisplayName)}<br/>${_e(t.label)} · ${_e(oe(t.state))}<br/>${_e(ie(t.startMs))} → ${_e(ie(t.endMs))}${r}<br/>${_e(V(`source`))}: ${_e(se(t.authority))} · ${_e(V(`updated`))}: ${_e(i)}`}},xAxis:{type:`time`,position:`top`,min:e.range.startMs,max:e.range.endMs,splitNumber:i===`weekly`?14:12,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:10,formatter:ae},splitLine:{show:!0,lineStyle:{color:t.grid}}},yAxis:{type:`category`,inverse:!0,data:e.lanes.map(e=>`${e.providerDisplayName}\n${e.billingDomainDisplayName}`),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:(n,r)=>{let i=e.lanes[r];return i?zB(i.providerId,i.billingDomainId):t.text},fontSize:12,fontWeight:600,width:136,overflow:`truncate`,lineHeight:16,formatter:e=>`● ${e}`},splitLine:{show:!0,lineStyle:{color:t.grid}}},series:[{type:`custom`,name:V(`quotaTimelineTitle`),encode:{x:[1,2],y:0},data:o,renderItem(e,n){let r=o[e.dataIndex]??null,i=Number(n.value(0)),a=n.coord([n.value(1),i]),s=n.coord([n.value(2),i]),c=Math.max(18,Math.min(26,n.size([0,1])[1]*.46)),l=Math.max(1,s[0]-a[0]),u=r??o.find(e=>e.value[0]===i&&e.value[1]===n.value(1));if(!u)return null;let d=[{type:`rect`,shape:{x:a[0],y:a[1]-c/2,width:l,height:c,r:8},style:{fill:ge(u.color,ue(u.window.state)),stroke:ge(u.color,u.window.state===`current`?.72:.38),lineWidth:1,lineDash:u.window.state===`upcoming`?[4,3]:void 0}}];return u.window.usedPercent!==null&&d.push({type:`rect`,shape:{x:a[0],y:a[1]-c/2,width:l*Math.min(100,Math.max(0,u.window.usedPercent))/100,height:c,r:8},style:{fill:ge(u.color,.58)}}),l>86&&u.window.state===`current`&&d.push({type:`text`,style:{x:a[0]+8,y:a[1],text:`${he(fe(u.window.usedPercent))}% · ${ie(u.window.endMs)}`,fill:t.text,font:`600 10px Inter, system-ui, sans-serif`,verticalAlign:`middle`,width:Math.max(0,l-16),overflow:`truncate`}}),{type:`group`,children:d}},markLine:s?{silent:!0,symbol:`none`,lineStyle:{color:t.muted,width:1,opacity:.72},label:{show:!1},data:[{xAxis:a}]}:void 0}]}}function me(e){if(!e||typeof e!=`object`||!(`data`in e))return null;let t=e.data;return!t||typeof t!=`object`||!(`window`in t)?null:t.window}function he(e){return e===null?`—`:new Intl.NumberFormat(D(),{maximumFractionDigits:1}).format(e)}function ge(e,t){let n=e.replace(`#`,``);return/^[0-9a-f]{6}$/i.test(n)?`rgba(${Number.parseInt(n.slice(0,2),16)}, ${Number.parseInt(n.slice(2,4),16)}, ${Number.parseInt(n.slice(4,6),16)}, ${t})`:e}function _e(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`)}function ve(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function ye(e,t,n){let r=getComputedStyle(e).getPropertyValue(t).trim();if(!r)return n;let i=document.createElement(`span`);i.style.color=r,i.style.position=`absolute`,i.style.visibility=`hidden`,e.appendChild(i);let a=getComputedStyle(i).color;return i.remove(),a&&a!==`rgba(0, 0, 0, 0)`?a:n}function be(){let e=p(P)??p(M);e&&x(ne,{text:ye(e,`--text-strong`,p(ne).text),muted:ye(e,`--muted`,p(ne).muted),surface:ye(e,`--surface-subtle`,p(ne).surface),border:ye(e,`--border`,p(ne).border),grid:ye(e,`--border-soft`,p(ne).grid)})}async function xe(e){p(F)&&(p(F).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(F).resize())}function Se(e){return x(M,e),be(),x(F,Kj(e,void 0,{renderer:`canvas`,useDirtyRect:!0})),p(F).getDom().setAttribute(`aria-hidden`,`true`),L=new ResizeObserver(()=>p(F)?.resize()),L.observe(e),window.addEventListener(S,be),xe(p(b)),{destroy(){window.removeEventListener(S,be),L?.disconnect(),L=null,p(F)?.dispose(),x(F,null),p(M)===e&&x(M,null)}}}g(()=>(f(C()),f(k()),f(O())),()=>{x(r,hV(C(),`weekly`,0,k(),O()))}),g(()=>(f(C()),p(R),p(z),f(k()),f(O())),()=>{x(d,hV(C(),p(R),p(z),k(),O()))}),g(()=>p(d),()=>{x(h,re(p(d).range.startMs,p(d).range.endMs))}),g(()=>p(d),()=>{x(y,Math.max(188,70+p(d).lanes.length*48))}),g(()=>(p(d),p(ne),f(D()),f(O()),p(R),f(k())),()=>{x(b,pe(p(d),p(ne),D(),O(),p(R),k()))}),g(()=>(p(F),p(b)),()=>{p(F)&&xe(p(b))}),de(),te();var Ce=m(),Ee=u(Ce),De=e=>{var t=DV(),r=s(t),o=s(r),l=s(o),u=s(l,!0);I(l);var m=B(l,2),g=s(m);I(m),I(o);var b=B(o,2),S=s(b),C=s(S),w=B(C,2),T=s(w,!0);I(w);var D=B(w,2);I(S);var O=B(S,2),k=s(O),ee=s(k,!0);I(k);var F=B(k,2),L=s(F,!0);I(F),I(O),I(b),I(r);var te=B(r,2),ne=s(te),re=s(ne),ae=B(s(re));I(re);var oe=B(re,2),ue=B(s(oe));I(oe);var de=B(oe,2),pe=B(s(de));I(de),I(ne),I(te);var me=B(te,2),ge=e=>{var t=wV(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>V(`quotaTimelineEmpty`))]),i(e,t)},_e=e=>{var t=TV(),r=s(t);E(r,e=>x(M,e),()=>p(M)),ce(r,e=>Se?.(e)),I(t),n(()=>j(r,`height: ${p(y)}px`)),i(e,t)};v(me,e=>{p(d),c(()=>p(d).lanes.length===0)?e(ge):e(_e,-1)});var ve=B(me,2),ye=s(ve),be=s(ye),xe=s(be),Ce=s(xe),we=s(Ce,!0);I(Ce);var Te=B(Ce),Ee=s(Te,!0);I(Te);var De=B(Te),Oe=s(De,!0);I(De);var ke=B(De),Ae=s(ke,!0);I(ke);var je=B(ke),Me=s(je,!0);I(je);var Ne=B(je),Pe=s(Ne,!0);I(Ne);var Fe=B(Ne),Ie=s(Fe,!0);I(Fe),I(xe),I(be);var Le=B(be);_(Le,5,()=>(p(d),c(()=>p(d).lanes)),e=>e.id,(e,t)=>{var r=EV(),o=s(r),l=s(o,!0);I(o);var u=B(o),d=s(u,!0);I(u);var m=B(u),h=s(m,!0);I(m);var g=B(m),_=s(g,!0);I(g);var v=B(g),y=s(v,!0);I(v);var b=B(v),x=s(b,!0);I(b);var S=B(b),C=s(S,!0);I(S),I(r),n((e,n,r,i)=>{a(l,(p(t),c(()=>p(t).providerDisplayName))),a(d,(p(t),c(()=>p(t).billingDomainDisplayName))),a(h,(p(t),c(()=>p(t).selectedLabel))),a(_,e),a(y,n),a(x,r),a(C,i)},[()=>(p(t),f(fe),c(()=>p(t).usedPercent===null?`—`:`${he(fe(p(t).usedPercent))}%`)),()=>(p(t),c(()=>ie(Date.parse(p(t).resetsAt)))),()=>(p(t),c(()=>se(p(t).authority))),()=>(p(t),c(()=>p(t).observedAt?ie(Date.parse(p(t).observedAt)):`—`))]),i(e,r)}),I(Le),I(ye),I(ve),I(t),E(t,e=>x(P,e),()=>p(P)),n((e,n,r,i,o,s,l,f,m,_,v,y,b,x,S,E,j,M,N,P)=>{A(t,`data-lane-count`,(p(d),c(()=>p(d).lanes.length))),a(u,e),a(g,`${p(h)??``} · ${n??``}`),A(C,`aria-label`,r),w.disabled=p(z)===0,A(w,`aria-label`,i),a(T,o),A(D,`aria-label`,s),A(O,`aria-label`,l),A(k,`aria-pressed`,p(R)===`weekly`),a(ee,f),A(F,`aria-pressed`,p(R)===`session`),a(L,m),a(ae,` ${_??``}`),a(ue,` ${v??``}`),a(pe,` ${y??``}`),A(ye,`aria-label`,b),a(we,x),a(Ee,S),a(Oe,E),a(Ae,j),a(Me,M),a(Pe,N),a(Ie,P)},[()=>c(()=>V(`quotaTimelineTitle`)),()=>c(()=>V(`quotaTimelineCurrentRange`)),()=>c(()=>V(`quotaTimelinePrevious`)),()=>c(()=>V(`quotaTimelineToday`)),()=>c(()=>V(`quotaTimelineToday`)),()=>c(()=>V(`quotaTimelineNext`)),()=>c(()=>V(`quotaTimelineModes`)),()=>c(()=>V(`quotaTimelineWeekly`)),()=>c(()=>V(`quotaTimelineFiveHour`)),()=>c(()=>V(`quotaTimelineCurrent`)),()=>c(()=>V(`quotaTimelineElapsed`)),()=>c(()=>V(`quotaTimelineUpcoming`)),()=>c(()=>V(`quotaTimelineData`)),()=>c(()=>V(`providersLabel`)),()=>c(()=>V(`quotaTimelineAccount`)),()=>c(()=>V(`quota`)),()=>c(()=>V(`used`)),()=>c(()=>V(`resets`)),()=>c(()=>V(`source`)),()=>c(()=>V(`updated`))]),N(`click`,C,()=>x(z,p(z)-1)),N(`click`,w,()=>x(z,0)),N(`click`,D,()=>x(z,p(z)+1)),N(`click`,k,()=>le(`weekly`)),N(`click`,F,()=>le(`session`)),i(e,t)};v(Ee,e=>{p(r),c(()=>p(r).lanes.length>0)&&e(De)}),i(e,Ce),ee()}var kV=P(`<span></span>`),AV=P(`<div class="trend-hover-line svelte-1axsv0d"></div>`),jV=P(`<span class="svelte-1axsv0d"> </span>`),MV=P(`<span class="svelte-1axsv0d"><b class="svelte-1axsv0d"> </b> <small class="svelte-1axsv0d"> </small></span>`),NV=P(`<div class="trend-tooltip svelte-1axsv0d" data-testid="trend-tooltip" role="tooltip"><strong class="svelte-1axsv0d"> </strong> <!></div>`),PV=P(`<span class="svelte-1axsv0d"><i class="svelte-1axsv0d"></i> <!></span>`),FV=P(`<tr><td> </td><td> </td></tr>`),IV=P(`<article class="workbench-trend svelte-1axsv0d"><div class="trend-heading svelte-1axsv0d"><div class="svelte-1axsv0d"><span class="svelte-1axsv0d"> </span> <strong class="svelte-1axsv0d"> </strong></div> <div class="trend-interactions svelte-1axsv0d"><span class="svelte-1axsv0d"> </span> <div class="trend-zoom-controls svelte-1axsv0d" role="group"><button type="button" class="svelte-1axsv0d">−</button> <button type="button" class="svelte-1axsv0d">+</button> <button type="button" class="svelte-1axsv0d">↺</button></div></div></div> <div class="trend-chart svelte-1axsv0d" data-testid="usage-trend-chart"><div data-testid="trend-plot" role="slider" aria-valuemin="0" tabindex="0"><div class="trend-echarts svelte-1axsv0d"></div> <div class="trend-series-markers svelte-1axsv0d" aria-hidden="true"></div> <!> <!></div></div> <div class="trend-legend svelte-1axsv0d" aria-hidden="true"></div> <div class="trend-data svelte-1axsv0d"><table><thead><tr><th> </th><th> </th></tr></thead><tbody></tbody></table></div></article>`);function LV(e,r){T(r,!1);let d=l(),h=l(),y=l(),b=l(),S=l(),D=l(),O=l();fM([lS,uR,SB]);let k=w(r,`buckets`,8),M=w(r,`metric`,8),P=w(r,`currency`,8),F=w(r,`locale`,24,()=>we(``)),L=w(r,`selectedWindow`,8),R=w(r,`timeZone`,8),z=w(r,`granularity`,8),ne=w(r,`rangeLabel`,8),ie=w(r,`formatUsageMetric`,8),ae=w(r,`describeSegment`,8),oe=l(null),se=l(null),ce=l(null),le=null,ue=l(0),fe=l(null),pe=l(null),me=l(null),he=l(!1),ge=l(FB),_e=l(IB);function ve(e){return Te(F(),e)}function ye(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function be(e,t){let n=document.createElement(`span`);n.style.color=t,n.style.position=`absolute`,n.style.visibility=`hidden`,e.appendChild(n);let r=getComputedStyle(n).color;return n.remove(),r}function xe(){let e=p(se)??p(oe);if(!e)return;let t=getComputedStyle(e).getPropertyValue(`--trend-grid-line`).trim(),n=getComputedStyle(e).getPropertyValue(`--muted`).trim(),r=t?be(e,t):``,i=n?be(e,n):``;x(ge,r&&r!==`rgba(0, 0, 0, 0)`?r:FB),x(_e,i&&i!==`rgba(0, 0, 0, 0)`?i:IB)}function Se(e){if(p(ce)){let t=p(ce).convertToPixel({xAxisIndex:0},e),n=p(ce).convertToPixel({yAxisIndex:0},Math.max(1,p(b)??1)),r=p(ce).convertToPixel({yAxisIndex:0},0);if(Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(r))return`left: ${t}px; top: ${n}px; height: ${Math.max(0,r-n)}px`}return`left: ${JB(e,p(h).length)}%; top: 16px; bottom: 28px`}function Ce(){x(ue,0),x(fe,null),x(pe,null),x(me,null),x(he,!1)}function De(e,t=.5){let n=VB(k().length,p(ue),p(fe),e,t);x(ue,n.start),x(fe,n.size),x(pe,null)}function Oe(e){if(e.deltaY===0)return;let t=e.currentTarget instanceof HTMLElement?e.currentTarget.getBoundingClientRect():null,n=t?.width?(e.clientX-t.left)/t.width:.5;De(e.deltaY<0?`in`:`out`,n)}function ke(e){if(!(e.currentTarget instanceof HTMLElement)||p(h).length===0)return;let t=e.currentTarget.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));x(pe,Math.round(n*Math.max(0,p(h).length-1)))}function Ae(e){!(e.currentTarget instanceof HTMLElement)||p(d).size>=k().length||(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),x(me,{clientX:e.clientX,viewportStart:p(d).start}),x(he,!0))}function je(e){if(ke(e),!p(me)||!(e.currentTarget instanceof HTMLElement))return;let t=e.currentTarget.getBoundingClientRect(),n=Math.round((p(me).clientX-e.clientX)/t.width*p(d).size);x(ue,Math.max(0,Math.min(k().length-p(d).size,p(me).viewportStart+n)))}function Me(e){e.currentTarget instanceof HTMLElement&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),x(me,null),x(he,!1)}function Ne(e){x(ue,HB(k().length,p(ue),p(fe),e)),x(pe,null)}function Pe(e){if(e.key===`+`||e.key===`=`)De(`in`);else if(e.key===`-`)De(`out`);else if(e.key===`ArrowLeft`)Ne(-1);else if(e.key===`ArrowRight`)Ne(1);else if(e.key===`Home`)Ce();else return;e.preventDefault()}async function Fe(e){p(ce)&&(p(ce).setOption(e,{notMerge:!0,lazyUpdate:!1}),await o(),p(ce).resize())}V(()=>{if(p(oe))return xe(),x(ce,Kj(p(oe),void 0,{renderer:`canvas`,useDirtyRect:!0})),p(ce).getDom().setAttribute(`aria-hidden`,`true`),le=new ResizeObserver(()=>p(ce)?.resize()),le.observe(p(oe)),window.addEventListener(Ee,xe),()=>{window.removeEventListener(Ee,xe),le?.disconnect(),le=null,p(ce)?.dispose(),x(ce,null)}}),g(()=>(f(k()),p(ue),p(fe)),()=>{x(d,BB(k().length,p(ue),p(fe)))}),g(()=>(f(k()),p(d)),()=>{x(h,k().slice(p(d).start,p(d).start+p(d).size))}),g(()=>(p(h),f(M())),()=>{x(y,GB(p(h),M()))}),g(()=>p(y),()=>{x(b,KB(p(y)))}),g(()=>p(y),()=>{x(S,p(y).filter((e,t)=>p(y).findIndex(t=>t.providerId===e.providerId&&t.billingDomainId===e.billingDomainId)===t))}),g(()=>(p(pe),p(h)),()=>{x(D,p(pe)===null?null:p(h)[p(pe)])}),g(()=>(p(h),p(y),p(b),p(ge),p(_e),p(he),f(ie()),f(P()),f(M())),()=>{x(O,XB(p(h).map(e=>e.label),p(y),p(b),{gridLine:p(ge),label:p(_e)},!p(he)&&!ye(),e=>ie()(e,P(),M())))}),g(()=>(p(ce),p(O)),()=>{p(ce)&&Fe(p(O))}),de(),te();var Ie=IV(),Le=s(Ie),Re=s(Le),ze=s(Re),Be=s(ze,!0);I(ze);var Ve=B(ze,2),He=s(Ve,!0);I(Ve),I(Re);var Ue=B(Re,2),We=s(Ue),H=s(We,!0);I(We);var Ge=B(We,2),Ke=s(Ge),qe=B(Ke,2),Je=B(qe,2);I(Ge),I(Ue),I(Le);var Ye=B(Le,2),Xe=s(Ye);let Ze;var Qe=s(Xe);E(Qe,e=>x(oe,e),()=>p(oe));var $e=B(Qe,2);_($e,5,()=>p(y),e=>e.key,(e,t)=>{var r=kV();n(e=>{A(r,`data-cost-purpose`,(p(t),c(()=>p(t).costPurpose??`tokens`))),j(r,e)},[()=>(p(t),f(zB),c(()=>p(t).costPurpose===`reported-estimate`?`fill: transparent; stroke: ${zB(p(t).providerId,p(t).billingDomainId)}`:`fill: ${zB(p(t).providerId,p(t).billingDomainId)}`))]),i(e,r)}),I($e);var et=B($e,2),tt=e=>{var t=AV();n(e=>j(t,e),[()=>(p(pe),c(()=>Se(p(pe))))]),i(e,t)};v(et,e=>{p(pe),p(h),c(()=>p(pe)!==null&&p(h).length>0)&&e(tt)});var nt=B(et,2),rt=e=>{var t=NV(),r=s(t),o=s(r,!0);I(r);var l=B(r,2),d=e=>{var t=jV(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>ve(`gap`))]),i(e,t)},g=e=>{var t=m(),r=u(t);_(r,1,()=>(p(D),c(()=>p(D).segments)),e=>`${e.providerId}:${e.billingDomainId}`,(e,t)=>{var r=MV(),o=s(r),l=s(o,!0);I(o);var u=B(o,2),d=s(u,!0);I(u),I(r),n(e=>{a(l,(p(t),c(()=>p(t).providerDisplayName))),a(d,e)},[()=>(f(ae()),p(t),f(M()),c(()=>ae()(p(t),M())))]),i(e,r)}),i(e,t)};v(l,e=>{p(D),c(()=>p(D).gap||p(D).segments.length===0)?e(d):e(g,-1)}),I(t),n(e=>{j(t,e),a(o,(p(D),c(()=>p(D).label)))},[()=>(f(JB),p(pe),p(h),c(()=>`left: ${JB(p(pe)??0,p(h).length)}%`))]),i(e,t)};v(nt,e=>{p(D)&&e(rt)}),I(Xe),I(Ye);var it=B(Ye,2);_(it,5,()=>p(S),e=>e.key,(e,r)=>{var o=PV(),l=s(o),u=B(l),d=B(u),m=e=>{var r=t();n(e=>a(r,`· ${e??``}`),[()=>c(()=>ve(`separateFromHeadline`))]),i(e,r)};v(d,e=>{p(r),c(()=>p(r).includedInHeadline===!1)&&e(m)}),I(o),n(e=>{j(l,e),a(u,` ${p(r),c(()=>p(r).providerDisplayName)??``} · ${p(r),c(()=>p(r).billingDomainDisplayName)??``} `)},[()=>(f(zB),p(r),c(()=>`background: ${zB(p(r).providerId,p(r).billingDomainId)}`))]),i(e,o)}),I(it);var at=B(it,2),ot=s(at),st=s(ot),ct=s(st),lt=s(ct),ut=s(lt,!0);I(lt);var dt=B(lt),ft=s(dt,!0);I(dt),I(ct),I(st);var pt=B(st);_(pt,5,k,e=>e.start,(e,t)=>{var r=FV(),o=s(r),l=s(o,!0);I(o);var u=B(o),d=s(u,!0);I(u),I(r),n(e=>{a(l,(p(t),c(()=>p(t).label))),a(d,e)},[()=>(p(t),f(ae()),f(M()),c(()=>p(t).gap?ve(`gap`):p(t).segments.map(e=>ae()(e,M())).join(`; `)))]),i(e,r)}),I(pt),I(ot),I(at),I(Ie),E(Ie,e=>x(se,e),()=>p(se)),n((e,t,n,r,i,o,s,l,u,m,h,g,_)=>{a(Be,e),a(He,ne()),a(H,t),A(Ge,`aria-label`,n),A(Ke,`aria-label`,r),Ke.disabled=p(fe)===null,A(qe,`aria-label`,i),qe.disabled=o,A(Je,`aria-label`,s),Je.disabled=p(fe)===null&&p(ue)===0,Ze=C(Xe,1,`trend-plot svelte-1axsv0d`,null,Ze,{"trend-panning":p(he)}),A(Xe,`data-total-buckets`,(f(k()),c(()=>k().length))),A(Xe,`data-visible-buckets`,(p(d),c(()=>p(d).size))),A(Xe,`data-viewport-start`,(p(d),c(()=>p(d).start))),A(Xe,`aria-label`,l),A(Xe,`aria-valuemax`,u),A(Xe,`aria-valuenow`,(p(d),c(()=>p(d).start))),A(Xe,`aria-valuetext`,m),A(ot,`aria-label`,h),a(ut,g),a(ft,_)},[()=>(f(M()),c(()=>M()===`tokens`?ve(`tokenTrend`):ve(`costTrend`))),()=>c(()=>ve(`trendInteractionHint`)),()=>c(()=>ve(`timeAxisControls`)),()=>c(()=>ve(`zoomOutTimeAxis`)),()=>c(()=>ve(`zoomInTimeAxis`)),()=>(p(fe),f(k()),f(4),c(()=>(p(fe)??k().length)<=Math.min(4,k().length))),()=>c(()=>ve(`resetTimeAxis`)),()=>c(()=>ve(`interactiveTrend`)),()=>(f(k()),p(d),c(()=>Math.max(0,k().length-p(d).size))),()=>(p(h),c(()=>`${p(h)[0]?.label??`—`} – ${p(h).at(-1)?.label??`—`}`)),()=>(f(L()),f(R()),f(z()),c(()=>`${ve(`trendData`)} · ${L()} · ${R()} · ${z()===`hour`?ve(`precisionHour`):ve(`precisionDay`)} · ${ve(`trendSummary`)}`)),()=>c(()=>ve(`interval`)),()=>(f(M()),c(()=>M()===`tokens`?ve(`tokens`):ve(`cost`)))]),N(`click`,Ke,()=>De(`out`)),N(`click`,qe,()=>De(`in`)),N(`click`,Je,()=>Ce()),N(`wheel`,Xe,re(Oe)),N(`pointerdown`,Xe,Ae),N(`pointermove`,Xe,je),N(`pointerup`,Xe,Me),N(`pointercancel`,Xe,Me),N(`pointerleave`,Xe,()=>{p(me)||x(pe,null)}),N(`keydown`,Xe,Pe),i(e,Ie),ee()}var RV=8,zV=8,BV=864e5;function VV(e,t,n,r){let i=new Map(e.days.map(e=>[e.date,e])),a=[],o=JV(e.start,-qV(e.start)),s=JV(e.end,-qV(e.end));for(let c=o;c<=s;c=JV(c,7))a.push({days:Array.from({length:7},(a,o)=>{let s=JV(c,o);if(s<e.start||s>e.end)return null;let l=i.get(s)??UV(s);return{date:s,recordedTokens:l.recordedTokens,level:l.level,accessibleName:WV(l,t,n,r)}})});let c=new Set,l=[];return a.forEach((e,n)=>{let r=e.days.find(e=>e!==null);if(!r)return;let i=r.date.slice(0,7);c.has(i)||(c.add(i),l.push({weekIndex:n,label:KV(r.date,t)}))}),{heading:r(`usageWallHeading`,{tokens:n(e.recordedTokens)}),weekdayLabels:[r(`usageWallWeekdayMon`),r(`usageWallWeekdayWed`),r(`usageWallWeekdayFri`)],monthLabels:l,weeks:a,legendLevels:[0,1,2,3,4],lessLabel:r(`usageWallLess`),moreLabel:r(`usageWallMore`)}}function HV(e,t,n){let r=e.left+e.width/2-t.width/2,i=Math.max(zV,Math.min(r,n.width-t.width-zV)),a=e.top-t.height-RV;return a>=zV?{left:i,top:a,placement:`above`}:{left:i,top:Math.min(e.top+e.height+RV,Math.max(zV,n.height-t.height-zV)),placement:`below`}}function UV(e){return{date:e,recordedTokens:0,level:0,providers:[]}}function WV(e,t,n,r){let i=GV(e.date,t);if(e.recordedTokens<=0)return r(`usageWallEmptyDay`,{date:i});let a=r(`usageWallUsedDay`,{tokens:n(e.recordedTokens),date:i}),o=e.providers.map(e=>e.displayName).filter(Boolean);return o.length>0?`${a} · ${o.join(`, `)}`:a}function GV(e,t){return new Intl.DateTimeFormat(t,{month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`}).format(new Date(`${e}T00:00:00.000Z`))}function KV(e,t){return new Intl.DateTimeFormat(t,{month:`short`,timeZone:`UTC`}).format(new Date(`${e}T00:00:00.000Z`))}function qV(e){return new Date(`${e}T00:00:00.000Z`).getUTCDay()}function JV(e,t){return new Date(Date.parse(`${e}T00:00:00.000Z`)+t*BV).toISOString().slice(0,10)}var YV=P(`<div class="panel-progress svelte-1kpw1mw" role="status" data-testid="usage-wall-refresh-status"><span class="visually-hidden svelte-1kpw1mw"> </span></div>`),XV=P(`<span class="svelte-1kpw1mw"> </span>`),ZV=P(`<button type="button" class="usage-wall-cell svelte-1kpw1mw" role="gridcell"></button>`),QV=P(`<span class="usage-wall-cell usage-wall-cell-absent svelte-1kpw1mw" aria-hidden="true"></span>`),$V=P(`<div class="usage-wall-week svelte-1kpw1mw" role="row"></div>`),eH=P(`<div class="usage-wall-tooltip svelte-1kpw1mw" data-testid="usage-wall-tooltip" role="tooltip"> </div>`),tH=P(`<span class="usage-wall-swatch svelte-1kpw1mw"></span>`),nH=P(`<section data-testid="usage-contribution-wall" aria-labelledby="usage-wall-heading"><!> <div class="usage-wall-header svelte-1kpw1mw"><h3 id="usage-wall-heading" data-testid="usage-wall-heading" class="svelte-1kpw1mw"> </h3></div> <div class="usage-wall-scroll svelte-1kpw1mw"><div class="usage-wall-calendar svelte-1kpw1mw" role="grid"><span class="usage-wall-month-spacer" aria-hidden="true"></span> <div class="usage-wall-months svelte-1kpw1mw" data-testid="usage-wall-months" aria-hidden="true"></div> <div class="usage-wall-weekdays svelte-1kpw1mw" aria-hidden="true"><span></span> <span> </span> <span></span> <span> </span> <span></span> <span> </span> <span></span></div> <div class="usage-wall-weeks svelte-1kpw1mw"></div></div></div> <!> <div class="usage-wall-legend svelte-1kpw1mw" data-testid="usage-wall-legend"><span> </span> <!> <span> </span></div></section>`);function rH(e,t){T(t,!1);let d=l(),h=l(),y=l(),b=l(),S=w(t,`wall`,8),O=w(t,`locale`,24,()=>we(``)),k=w(t,`formatTokens`,8),M=w(t,`updating`,8,!1),P=w(t,`embedded`,8,!1),F=l(null),L=l(null);function R(e,t){return Te(O(),e).replace(/\{(\w+)\}/g,(e,n)=>t?.[n]??`{${n}}`)}async function z(e,t){let n=e.currentTarget.getBoundingClientRect(),r={width:window.innerWidth,height:window.innerHeight},i=p(F)?.getBoundingClientRect(),a={width:i?.width||Math.min(240,Math.max(160,t.accessibleName.length*7)),height:i?.height||(t.accessibleName.includes(`·`)?48:36)};if(x(L,{text:t.accessibleName,...HV(n,a,r)}),await o(),!p(F)||p(L)?.text!==t.accessibleName)return;let s=p(F).getBoundingClientRect();x(L,{text:t.accessibleName,...HV(n,{width:s.width,height:s.height},r)})}function ne(){x(L,null)}function V(e,t){let n=[...e.closest(`.usage-wall-weeks`)?.querySelectorAll(`button.usage-wall-cell`)??[]],r=n.indexOf(e);if(r<0)return;let i=n[t===`ArrowRight`||t===`ArrowDown`?r+1:t===`ArrowLeft`||t===`ArrowUp`?r-1:t===`Home`?0:t===`End`?n.length-1:r];!i||i===e||(e.tabIndex=-1,i.tabIndex=0,i.focus())}g(()=>(f(S()),f(O()),f(k())),()=>{x(d,VV(S(),O(),k(),R))}),g(()=>p(d),()=>{x(h,new Map(p(d).monthLabels.map(e=>[e.weekIndex,e.label])))}),g(()=>p(d),()=>{x(y,p(d).weeks.map((e,t)=>t))}),g(()=>f(S()),()=>{x(b,S().end)}),de(),te();var re=nH();let ie;var ae=s(re),oe=e=>{var t=YV(),r=s(t),o=s(r,!0);I(r),I(t),n(e=>a(o,e),[()=>(f(Te),f(O()),c(()=>Te(O(),`usageWallUpdating`)))]),i(e,t)};v(ae,e=>{M()&&e(oe)});var se=B(ae,2),ce=s(se),le=s(ce,!0);I(ce),I(se);var ue=B(se,2),fe=s(ue),pe=B(s(fe),2);_(pe,5,()=>p(y),e=>e,(e,t)=>{var r=XV(),o=s(r,!0);I(r),n(e=>a(o,e),[()=>(p(h),p(t),c(()=>p(h).get(p(t))??``))]),i(e,r)}),I(pe);var me=B(pe,2),he=B(s(me),2),ge=s(he,!0);I(he);var _e=B(he,4),ve=s(_e,!0);I(_e);var ye=B(_e,4),be=s(ye,!0);I(ye),D(2),I(me);var xe=B(me,2);_(xe,5,()=>(p(d),c(()=>p(d).weeks)),r,(e,t,r)=>{var a=$V();_(a,7,()=>(p(t),c(()=>p(t).days)),(e,t)=>e?.date??`${r}-${t}`,(e,t)=>{var r=m(),a=u(r),o=e=>{var r=ZV();n(()=>{A(r,`tabindex`,(p(t),p(b),c(()=>p(t).date===p(b)?0:-1))),A(r,`data-level`,(p(t),c(()=>p(t).level))),A(r,`aria-label`,(p(t),c(()=>p(t).accessibleName)))}),N(`pointerenter`,r,e=>z(e,p(t))),N(`focus`,r,e=>z(e,p(t))),N(`pointerleave`,r,ne),N(`blur`,r,ne),N(`keydown`,r,e=>{(e.key===`ArrowRight`||e.key===`ArrowLeft`||e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Home`||e.key===`End`)&&(e.preventDefault(),V(e.currentTarget,e.key))}),i(e,r)},s=e=>{var t=QV();i(e,t)};v(a,e=>{p(t)?e(o):e(s,-1)}),i(e,r)}),I(a),i(e,a)}),I(xe),I(fe),I(ue);var Se=B(ue,2),Ce=e=>{var t=eH(),r=s(t,!0);I(t),E(t,e=>x(F,e),()=>p(F)),n(()=>{j(t,(p(L),c(()=>`left: ${p(L).left}px; top: ${p(L).top}px`))),a(r,(p(L),c(()=>p(L).text)))}),i(e,t)};v(Se,e=>{p(L)&&e(Ce)});var Ee=B(Se,2),De=s(Ee),Oe=s(De,!0);I(De);var ke=B(De,2);_(ke,1,()=>(p(d),c(()=>p(d).legendLevels)),e=>e,(e,t)=>{var r=tH();n(()=>A(r,`data-level`,p(t))),i(e,r)});var Ae=B(ke,2),je=s(Ae,!0);I(Ae),I(Ee),I(re),n(e=>{ie=C(re,1,`usage-contribution-wall svelte-1kpw1mw`,null,ie,{"usage-contribution-wall-embedded":P()}),A(re,`aria-busy`,M()),a(le,(p(d),c(()=>p(d).heading))),A(fe,`aria-label`,e),a(ge,(p(d),c(()=>p(d).weekdayLabels[0]))),a(ve,(p(d),c(()=>p(d).weekdayLabels[1]))),a(be,(p(d),c(()=>p(d).weekdayLabels[2]))),a(Oe,(p(d),c(()=>p(d).lessLabel))),a(je,(p(d),c(()=>p(d).moreLabel)))},[()=>(f(Te),f(O()),c(()=>Te(O(),`usageWallLabel`)))]),i(e,re),ee()}function iH(e){return!e||e===`root`||e===`connections`||e.startsWith(`connector`)?`connections`:e===`rates`||e.startsWith(`rate:`)||e.startsWith(`rates:`)?`rates`:e===`monitoring`?`monitoring`:e===`diagnostics`||e.startsWith(`diagnostic`)?`diagnostics`:e===`privacy`?`privacy`:`connections`}function aH(e={}){return{providerId:e.providerId??`codex`,billingDomainId:e.billingDomainId??``,model:e.model??``,inputRate:e.inputRate??``,outputRate:e.outputRate??``,cacheReadRate:e.cacheReadRate??`0`}}function oH(e,t){return t.some(t=>t.id===e)?e:`custom`}function sH(e,t){return!e||e===`*`?t:e}function cH(e){return`$${e}/M`}var lH=P(`<link rel="icon" href="/brand/agent-usage-logo.svg"/> <meta name="description"/>`,1),uH=P(`<div class="header-range svelte-1uha8ag" data-testid="header-range"><span class="header-range-label svelte-1uha8ag"> </span> <span class="header-range-sep svelte-1uha8ag">/</span> <span class="header-range-dates svelte-1uha8ag"> </span></div>`),dH=P(`<button type="button" class="svelte-1uha8ag"> </button>`),fH=P(`<div class="usage-toolbar workbench-controls svelte-1uha8ag"><div class="segmented-control svelte-1uha8ag" role="group"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div> <div class="history-toolbar svelte-1uha8ag"></div> <div class="segmented-control svelte-1uha8ag" role="group"></div></div> <span class="header-divider svelte-1uha8ag" aria-hidden="true"></span>`,1),pH=P(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab" aria-busy="true"><section class="token-money-workbench initial-workbench-loading svelte-1uha8ag"><p class="module-progress svelte-1uha8ag" role="status" data-testid="model-costs-initial-status"> </p></section></div>`),mH=P(`<div class="state error svelte-1uha8ag" role="alert"> </div>`),hH=P(`<div class="inline-error svelte-1uha8ag" role="status"> </div>`),gH=P(`<div class="state compact svelte-1uha8ag"> </div>`),_H=P(`<div class="agent-skeleton-quota-row svelte-1uha8ag"><div class="agent-skeleton-quota-copy svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i> <i class="agent-skeleton-block svelte-1uha8ag"></i></div> <i class="agent-skeleton-block agent-skeleton-progress svelte-1uha8ag"></i> <i class="agent-skeleton-block agent-skeleton-meta svelte-1uha8ag"></i></div>`),vH=P(`<div class="agent-card-skeleton-overlay svelte-1uha8ag" aria-hidden="true"><div class="agent-card-skeleton-content svelte-1uha8ag"><div class="agent-skeleton-section-label svelte-1uha8ag"><i class="agent-skeleton-block svelte-1uha8ag"></i></div> <div class="agent-skeleton-quota-list svelte-1uha8ag"></div></div></div>`),yH=P(`<img class="provider-logo svelte-1uha8ag" alt=""/>`),bH=P(`<span class="connection-chip svelte-1uha8ag"><span class="visually-hidden svelte-1uha8ag"> </span> <button class="svelte-1uha8ag"><span aria-hidden="true">⚙</span></button></span>`),xH=P(`<button type="button" role="tab" class="svelte-1uha8ag"> </button>`),SH=P(`<div class="domain-tabs svelte-1uha8ag" role="tablist"></div>`),CH=P(`<small class="svelte-1uha8ag"> </small>`),wH=P(`<label class="secret-field svelte-1uha8ag"><span> </span> <input type="password" autocomplete="off" class="svelte-1uha8ag"/></label>`),TH=P(`<button class="primary-action svelte-1uha8ag"> </button>`),EH=P(`<button class="svelte-1uha8ag"> </button>`),DH=P(`<details open=""><summary class="svelte-1uha8ag"><span class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></span> </summary> <div class="inline-connection-body svelte-1uha8ag"><p class="permission svelte-1uha8ag"> </p> <div class="connection-meta svelte-1uha8ag"><span> </span> <span> </span></div> <div class="coverage-list svelte-1uha8ag"><span> </span> <strong class="svelte-1uha8ag"> </strong></div> <!> <div class="connection-actions svelte-1uha8ag"><!> <!> <!></div></div></details>`),OH=P(`<p class="quota-absent svelte-1uha8ag"> </p>`),kH=P(`<div class="quota-row svelte-1uha8ag"><div class="quota-copy svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <span class="svelte-1uha8ag"> </span></div> <div role="progressbar" aria-valuemin="0" aria-valuemax="100"><span class="svelte-1uha8ag"></span></div> <span hidden=""> </span> <div class="quota-meta svelte-1uha8ag"><span> </span></div></div>`),AH=P(`<!> <div class="section-label svelte-1uha8ag"> </div> <!> <div class="quotas svelte-1uha8ag"></div>`,1),jH=P(`<article><!> <div class="provider-heading svelte-1uha8ag"><!> <div class="provider-heading-copy svelte-1uha8ag"><div class="provider-heading-top svelte-1uha8ag"><h2 class="svelte-1uha8ag"> </h2> <div class="provider-status svelte-1uha8ag"><div class="coverage svelte-1uha8ag"> </div> <!></div></div> <p class="freshness svelte-1uha8ag"><span class="svelte-1uha8ag"></span> <!></p></div></div> <!> <!></article>`),MH=P(`<div id="agent-usage-panel" data-testid="agent-usage-panel" role="tabpanel" aria-labelledby="agent-usage-tab"><section class="providers svelte-1uha8ag"></section> <!></div>`),NH=P(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-summary-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),PH=P(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-analysis-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),FH=P(`<div class="panel-progress svelte-1uha8ag" role="status" data-testid="workbench-breakdown-refresh-status"><span class="visually-hidden svelte-1uha8ag"> </span></div>`),IH=P(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!> <p class="treemap-hint svelte-1uha8ag"> </p></div>`),LH=P(`<div class="treemap-wrap svelte-1uha8ag" role="tabpanel"><!></div>`),RH=P(`<img class="ranking-logo svelte-1uha8ag" alt=""/>`),zH=P(`<span class="model-share-track svelte-1uha8ag" data-testid="model-share-meter" role="meter" aria-valuemin="0" aria-valuemax="100"><i class="svelte-1uha8ag"></i></span>`),BH=P(`<li><button type="button" data-testid="model-ranking-row" class="svelte-1uha8ag"><span class="ranking-identity svelte-1uha8ag"><!> <span class="svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small> <!></span></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span> <span class="ranking-value ranking-share-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <!></span> <span class="ranking-value svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong></span></button></li>`),VH=P(`<div role="tabpanel"><ol class="ranking-list svelte-1uha8ag"></ol></div>`),HH=P(`<section class="token-money-workbench svelte-1uha8ag" data-testid="token-money-workbench" aria-labelledby="token-money-workbench-heading"><h2 id="token-money-workbench-heading" class="visually-hidden svelte-1uha8ag"> </h2> <section class="usage-summary-board svelte-1uha8ag" data-testid="usage-summary-board"><!> <div class="usage-headline svelte-1uha8ag" data-testid="usage-headline"><strong class="svelte-1uha8ag"> </strong></div> <!></section> <div class="usage-overview-grid svelte-1uha8ag" data-testid="usage-analysis-grid"><!> <section class="usage-summary svelte-1uha8ag" aria-labelledby="provider-share-heading"><div class="provider-share-heading svelte-1uha8ag"><h3 id="provider-share-heading" class="svelte-1uha8ag"> </h3> <small class="svelte-1uha8ag"> </small></div> <!></section> <!></div> <section class="model-ranking svelte-1uha8ag" data-testid="usage-breakdown" aria-labelledby="model-ranking-heading"><!> <div class="ranking-heading svelte-1uha8ag"><div><h3 id="model-ranking-heading" class="svelte-1uha8ag"> </h3></div> <div class="segmented-control svelte-1uha8ag" role="tablist" data-testid="breakdown-view-tabs"><button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button> <button type="button" role="tab" class="svelte-1uha8ag"> </button></div></div> <div class="breakdown-header svelte-1uha8ag" aria-hidden="true"><span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span> <span class="svelte-1uha8ag"> </span></div> <!></section></section>`),UH=P(`<div id="token-model-costs-panel" data-testid="token-model-costs-panel" role="tabpanel" aria-labelledby="token-model-costs-tab"><!></div>`),WH=P(`<!> <!> <!>`,1),GH=P(`<span class="nav-count svelte-1uha8ag"> </span>`),KH=P(`<button type="button" class="rates-refresh-button svelte-1uha8ag"><span aria-hidden="true">↻</span> </button> <button type="button" class="add-rate-toggle-button svelte-1uha8ag" data-testid="toggle-add-rate-button" aria-controls="custom-rate-form"> </button>`,1),qH=P(`<p class="settings-error svelte-1uha8ag" role="status"> </p>`),JH=P(`<img class="settings-connector-logo svelte-1uha8ag" alt=""/>`),YH=P(`<article tabindex="-1"><div class="settings-connector-title svelte-1uha8ag"><div class="settings-connector-identity svelte-1uha8ag"><!> <strong class="svelte-1uha8ag"> </strong></div> <span class="svelte-1uha8ag"> </span></div> <div class="connection-actions svelte-1uha8ag"><!> <!> <!></div></article>`),XH=P(`<section class="settings-tab-panel connections-section svelte-1uha8ag" data-testid="settings-panel-connections" tabindex="-1"><!> <div class="settings-connections svelte-1uha8ag"></div></section>`),ZH=P(`<option> </option>`),QH=P(`<label class="svelte-1uha8ag"><span> </span> <input type="text" required="" class="svelte-1uha8ag"/></label>`),$H=P(`<form id="custom-rate-form" class="custom-rate-form svelte-1uha8ag" data-testid="custom-rate-form"><div class="custom-rate-inputs svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <select class="svelte-1uha8ag"><!><option> </option></select></label> <!> <label class="svelte-1uha8ag"><span> </span> <input type="text" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="text" placeholder="e.g. gpt-4o, qwen-max" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="2.0" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="8.0" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" placeholder="0.5" class="svelte-1uha8ag"/></label></div> <div class="custom-rate-actions svelte-1uha8ag"><button type="submit" class="button-primary svelte-1uha8ag"> </button> <button type="button" class="button-secondary svelte-1uha8ag"> </button></div></form>`),eU=P(`<small class="custom-rate-empty svelte-1uha8ag"> </small>`),tU=P(`<button type="button" class="add-rate-button-empty svelte-1uha8ag" data-testid="empty-add-custom-rate-button"> </button>`),nU=P(`<div class="custom-rate-empty-container svelte-1uha8ag"><p class="custom-rate-empty svelte-1uha8ag"> </p> <!></div>`),rU=P(`<form class="custom-rate-edit-form svelte-1uha8ag"><div class="custom-rate-edit-header svelte-1uha8ag"><strong class="svelte-1uha8ag"> </strong> <small class="svelte-1uha8ag"> </small></div> <div class="custom-rate-edit-fields svelte-1uha8ag"><label class="svelte-1uha8ag"><span> </span> <input type="text" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" required="" class="svelte-1uha8ag"/></label> <label class="svelte-1uha8ag"><span> </span> <input type="number" min="0" step="0.0001" class="svelte-1uha8ag"/></label></div> <div class="custom-rate-edit-actions svelte-1uha8ag"><button type="submit" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div></form>`),iU=P(`<div class="custom-rate-header svelte-1uha8ag"><div class="custom-rate-title-row svelte-1uha8ag"><strong class="custom-rate-model-name svelte-1uha8ag"> </strong> <span class="custom-rate-provider-badge svelte-1uha8ag"> </span></div> <small class="custom-rate-domain-label svelte-1uha8ag"> </small></div> <div class="custom-rate-details svelte-1uha8ag"><div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div> <div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div> <div class="rate-metric svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></div></div> <div class="custom-rate-footer svelte-1uha8ag"><small class="custom-rate-updated-time svelte-1uha8ag"> </small> <div class="custom-rate-card-actions svelte-1uha8ag"><button type="button" class="svelte-1uha8ag"> </button> <button type="button" class="svelte-1uha8ag"> </button></div></div>`,1),aU=P(`<article><!></article>`),oU=P(`<div class="custom-rates-list svelte-1uha8ag" data-testid="custom-rates-list"></div>`),sU=P(`<section class="settings-tab-panel rates-section svelte-1uha8ag" data-testid="settings-rates" tabindex="-1"><!> <div class="custom-rates-container svelte-1uha8ag"><!> <!></div></section>`),cU=P(`<div class="monitoring-controls svelte-1uha8ag"><label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label></div>`),lU=P(`<section class="settings-tab-panel monitoring-section svelte-1uha8ag" data-testid="settings-panel-monitoring" tabindex="-1"><!> <!></section>`),uU=P(`<p class="svelte-1uha8ag"> </p>`),dU=P(`<code class="svelte-1uha8ag"> </code>`),fU=P(`<article tabindex="-1"><div class="svelte-1uha8ag"><strong> </strong> <span class="svelte-1uha8ag"> </span></div> <small class="svelte-1uha8ag"> </small> <!> <!></article>`),pU=P(`<div class="diagnostics-grid svelte-1uha8ag"></div>`),mU=P(`<section class="settings-tab-panel diagnostics-section svelte-1uha8ag" data-testid="settings-panel-diagnostics" tabindex="-1"><!> <!></section>`),hU=P(`<div class="retention-info-bar svelte-1uha8ag"><small> </small></div>`),gU=P(`<section class="settings-tab-panel privacy-section svelte-1uha8ag" data-testid="settings-panel-privacy" tabindex="-1"><!> <!> <div class="privacy-actions svelte-1uha8ag"><button class="svelte-1uha8ag"> </button> <button class="svelte-1uha8ag"> </button> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <label class="svelte-1uha8ag"><input type="checkbox"/> </label> <button class="danger-action svelte-1uha8ag"> </button> <small> </small> <button class="danger-action svelte-1uha8ag"> </button></div></section>`),_U=P(`<div class="settings-backdrop svelte-1uha8ag" role="presentation"><div class="settings-dialog svelte-1uha8ag" role="dialog" aria-modal="true" aria-labelledby="settings-heading" tabindex="-1"><button class="settings-close svelte-1uha8ag">×</button> <nav class="settings-sidebar svelte-1uha8ag" aria-label="Settings Categories"><div class="settings-sidebar-header svelte-1uha8ag"><p class="eyebrow svelte-1uha8ag"> </p> <h2 id="settings-heading" class="svelte-1uha8ag"> </h2> <p class="settings-sidebar-subtitle svelte-1uha8ag"> </p></div> <div class="settings-sidebar-nav svelte-1uha8ag"><button type="button"><span> </span></button> <button type="button"><span> </span> <!></button> <button type="button"><span> </span></button> <button type="button"><span> </span></button> <button type="button"><span> </span></button></div></nav> <div class="settings-main svelte-1uha8ag"><header class="settings-main-header svelte-1uha8ag"><div class="settings-main-actions svelte-1uha8ag"><!></div></header> <div class="settings-content svelte-1uha8ag"><!></div></div></div></div>`),vU=P(`<div class="model-custom-rate-prompt svelte-1uha8ag"><button type="button" class="configure-rate-button svelte-1uha8ag"> </button></div>`),yU=P(`<span class="model-price-source svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span>`),bU=P(`<div class="model-detail-backdrop svelte-1uha8ag" role="presentation"><div class="model-detail-drawer svelte-1uha8ag" role="dialog" aria-modal="true" tabindex="-1"><div class="model-detail-header svelte-1uha8ag"><div><p class="eyebrow svelte-1uha8ag"> </p> <h2 class="svelte-1uha8ag"> </h2> <!></div> <button class="svelte-1uha8ag">×</button></div> <div class="model-detail-content svelte-1uha8ag"><div class="model-detail-summary svelte-1uha8ag" data-testid="model-detail-summary"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <b class="svelte-1uha8ag"> </b></span></div> <!> <section class="model-activity svelte-1uha8ag" aria-labelledby="model-activity-heading"><h3 id="model-activity-heading" class="svelte-1uha8ag"> </h3> <!></section> <section class="model-evidence-summary svelte-1uha8ag" data-testid="model-evidence-summary" aria-labelledby="model-evidence-heading"><h3 id="model-evidence-heading" class="svelte-1uha8ag"> </h3> <div class="svelte-1uha8ag"><span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <span class="svelte-1uha8ag"><small class="svelte-1uha8ag"> </small> <strong class="svelte-1uha8ag"> </strong></span> <!></div></section></div></div></div>`),xU=P(`<main class="shell svelte-1uha8ag"><header class="product-header svelte-1uha8ag"><div class="header-left svelte-1uha8ag"><div class="header-brand svelte-1uha8ag"><img class="product-logo svelte-1uha8ag" src="/brand/agent-usage-logo.svg"/> <h1 class="visually-hidden svelte-1uha8ag"> </h1> <div class="dashboard-tabs svelte-1uha8ag" role="tablist"><button id="agent-usage-tab" type="button" role="tab" aria-controls="agent-usage-panel" class="svelte-1uha8ag"> </button> <button id="token-model-costs-tab" type="button" role="tab" aria-controls="token-model-costs-panel" class="svelte-1uha8ag"> </button></div></div> <!></div> <div class="header-right svelte-1uha8ag"><!> <div class="header-actions svelte-1uha8ag"><button class="settings-toggle svelte-1uha8ag"> </button> <button class="theme-toggle svelte-1uha8ag"><span class="theme-icon svelte-1uha8ag" aria-hidden="true"> </span> </button> <button class="locale-toggle svelte-1uha8ag"> </button> <button class="refresh svelte-1uha8ag"><span aria-hidden="true">↻</span> </button></div></div></header> <!></main> <!> <!>`,1);function SU(r,w){T(w,!1);let P=()=>ae(Pe,`$themePreference`,ie),z=()=>ae(Fe,`$activeTheme`,ie),[ie,se]=k(),ce=l(),pe=l(),me=[{id:`codex`,displayName:`Codex`},{id:`claude-code`,displayName:`Claude Code`},{id:`opencode-go`,displayName:`OpenCode Go`},{id:`grok`,displayName:`Grok`},{id:`antigravity`,displayName:`Antigravity`}],he=new Set(me.map(e=>e.id)),_e=l(`en`),ve=l(),ye=l(null),be=l(null),xe=l(!1),Ce=0,Ee=l(me),De=l({}),Oe=l(Object.fromEntries(me.map(e=>[e.id,!0]))),ke=new Set,Ae=l(!0),je=l(!1),Me=l(!1),Ne=l(!1),Ie=l(!1),Le=l(!1),Re=l(!1),ze=l(!1),Be=l(!1),Ve=l([]),We=l(null),H=l({}),Ge=l({}),Ke=l(`agents`),qe=l(`7d`),Je=l(`CNY`),Ye=l(`retail-equivalent`),Xe=l(`list`),Ze=l(null),Qe=null,$e=l(null),et=l(`UTC`),tt=l(null),nt=[{id:`grok`,label:`Grok`},{id:`dsh`,label:`DeepSeek (dsh)`},{id:`claude-code`,label:`Claude Code`},{id:`codex`,label:`Codex`},{id:`opencode-go`,label:`OpenCode Go`},{id:`opencode`,label:`OpenCode`},{id:`antigravity`,label:`Antigravity`}],rt=l(`grok`),it=l([]),at=l(!1),ot=l(!1),st=l(!1),ct=l(aH({providerId:`grok`})),lt=l(!1),ut=l(null),dt=l({id:``,providerId:``,billingDomainId:``,model:``,inputRate:``,outputRate:``,cacheReadRate:``}),ft=l(!1),pt=l(null),mt=l(null),U=!1,ht=l(null),gt=l(!1),_t=l(!1),vt=l(!1),yt=l(!1),bt=l(!1),W=l(null),G=null,xt=l(!1),St=l(null),Ct=l(`connections`),wt=l(null),Tt=null,Et=l(null),Dt=l(),K=l(),q=l(),J=!1,Ot=0,kt={},At=0,jt=Se(()=>Vt());V(async()=>{He(),x(_e,we(navigator.language)),document.documentElement.lang=p(_e),x(et,Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`),x(qe,Bn()),x(Je,Vn()),await Promise.all([Lt(),X(),Rt(),Wt(),Gt(),Kt(),nn(),rn()]),p(mt)||await tn(),on();let e=new URL(window.location.href).searchParams.get(`settings`);e&&await pn(e,!1)}),R(()=>{J=!0,G&&clearInterval(G),jt.dispose()});function Y(e){return Te(p(_e),e)}function Mt(){return p(Ye)===`tokens`?Y(`tokenShare`):Y(`costShare`)}function Nt(){x(_e,p(_e)===`en`?`zh-CN`:`en`),document.documentElement.lang=p(_e)}let Pt=[`system`,`light`,`dark`];function Ft(){let e=Pt[(Pt.indexOf(P())+1)%Pt.length];Ue(e)}function It(e){return Y({system:`themeSystem`,light:`themeLight`,dark:`themeDark`}[e])}async function X(){let e=++Ce;x(xe,!0);try{let t=new URLSearchParams({timeZone:p(et)}),n=await fetch(`/api/usage-wall?${t}`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(J||e!==Ce)return;x(be,r)}catch{e===Ce&&!p(be)&&x(be,null)}finally{e===Ce&&x(xe,!1)}}async function Lt(){let e=++Ot,t=p(qe),n=p(Je);try{let r=new URLSearchParams({window:t,timeZone:p(et),currency:n}),i=await fetch(`/api/overview?${r}`);if(!i.ok)throw Error(`HTTP ${i.status}`);let a=await i.json();if(J||e!==Ot)return;x(ye,a),x(Me,!1),Ut()}catch{e===Ot&&x(Me,!0)}}async function Rt(){x(Ae,!0);let e=new Set([...he,...ke]),t=[...e].map(e=>zt(e));try{let n=await fetch(`/api/overview/providers`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(J)return;let i=r.providers.filter(e=>e.id!==`opencode`&&e.id!==`dsh`),a=new Map(i.map(e=>[e.id,e]));ke=new Set(a.keys()),x(Ee,[...me.map(e=>a.get(e.id)??e),...i.filter(e=>!he.has(e.id))]),x(Ae,!1);let o=i.filter(t=>!e.has(t.id)).map(e=>zt(e.id));await Promise.all([...t,...o])}catch{J||x(Ae,!1),await Promise.all(t)}}async function zt(e){let t=(kt[e]??0)+1;kt={...kt,[e]:t},x(Oe,{...p(Oe),[e]:!0});try{let n=new URLSearchParams({window:p(qe),timeZone:p(et),currency:p(Je)}),r=await fetch(`/api/overview/providers/${encodeURIComponent(e)}?${n}`);if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json();if(J||kt[e]!==t)return;x(De,{...p(De),[e]:i})}catch{}finally{!J&&kt[e]===t&&x(Oe,{...p(Oe),[e]:!1})}}async function Bt(){await Ht(`manual`)}async function Vt(){await Ht(`automatic`)}async function Ht(e){x(je,!0);try{let t=await fetch(e===`automatic`?`/api/refresh?mode=automatic&background=true`:`/api/refresh?background=true`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}`);await Promise.all([Lt(),X(),Rt(),tn()]),await rn(),on(),x(Ne,!1)}catch{x(Ne,!0)}finally{J||(x(je,!1),Ut())}}function Ut(){J||!p(ye)||!U||jt.schedule(p(ye),p(mt),p(je))}async function Wt(){try{let e=await fetch(`/api/connectors`);if(!e.ok)throw Error(`HTTP ${e.status}`);x(Ve,await e.json()),x(Ie,!1)}catch{x(Ie,!0)}}async function Gt(){try{let e=await fetch(`/api/monitoring`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();x(tt,t.settings),x(Le,!1)}catch{x(Le,!0)}}async function Kt(){x(ot,!0);try{let e=await fetch(`/api/custom-rates`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();x(it,t.rates),x(at,!1)}catch{x(at,!0)}finally{x(ot,!1)}}function qt(){p(rt)===`custom`?S(ct,p(ct).providerId=``):S(ct,p(ct).providerId=p(rt))}async function Jt(){let e=p(rt)===`custom`?p(ct).providerId.trim():p(rt);if(!(!e||!p(ct).model.trim()||p(lt))){x(lt,!0);try{let t=await fetch(`/api/custom-rates`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:e,billingDomainId:p(ct).billingDomainId.trim()||null,model:p(ct).model.trim(),inputRate:parseFloat(p(ct).inputRate)||0,outputRate:parseFloat(p(ct).outputRate)||0,cacheReadRate:parseFloat(p(ct).cacheReadRate)||0})});if(!t.ok)throw Error(`HTTP ${t.status}`);x(ct,aH({providerId:e})),x(st,!1),await Kt(),await Lt()}catch(e){console.error(e)}finally{x(lt,!1)}}}function Yt(){x(st,!p(st))}function Xt(){x(st,!1)}function Zt(e){x(ut,e.id),x(dt,{id:e.id,providerId:e.providerId,billingDomainId:e.billingDomainId??``,model:e.model,inputRate:String(e.ratesPerMillion.input),outputRate:String(e.ratesPerMillion.output),cacheReadRate:String(e.ratesPerMillion.cacheRead)})}function Qt(){x(ut,null)}async function Z(){if(!(!p(ut)||p(ft))){x(ft,!0);try{let e=await fetch(`/api/custom-rates/${encodeURIComponent(p(ut))}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({providerId:p(dt).providerId.trim(),billingDomainId:p(dt).billingDomainId.trim()||null,model:p(dt).model.trim(),inputRate:parseFloat(p(dt).inputRate)||0,outputRate:parseFloat(p(dt).outputRate)||0,cacheReadRate:parseFloat(p(dt).cacheReadRate)||0})});if(!e.ok)throw Error(`HTTP ${e.status}`);x(ut,null),await Kt(),await Lt()}catch(e){console.error(e)}finally{x(ft,!1)}}}async function $t(e){x(pt,e);try{let t=await fetch(`/api/custom-rates/${encodeURIComponent(e)}`,{method:`DELETE`});if(!t.ok)throw Error(`HTTP ${t.status}`);p(ut)===e&&x(ut,null),await Kt(),await Lt()}catch(e){console.error(e)}finally{x(pt,null)}}function en(e,t,n){ur(),x(rt,oH(e,nt)),x(ct,aH({providerId:e,billingDomainId:!t||t===`*`?``:t,model:n})),x(st,!0),pn(`rates`)}async function tn(){try{let e=await fetch(`/api/doctor`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(J)return;x(mt,t),x(Re,!1)}catch{x(Re,!0)}finally{J||(U=!0,Ut())}}async function nn(){try{let e=await fetch(`/api/retention`);if(!e.ok)throw Error(`HTTP ${e.status}`);x(ht,await e.json()),x(ze,!1)}catch{x(ze,!0)}}async function rn(){try{let e=await fetch(`/api/processing`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json(),n=p(W);x(W,t),an(n,t,`discovery`)&&Wt(),an(n,t,`usage`)&&(Rt(),Lt(),X()),an(n,t,`pricing`)&&Lt(),an(n,t,`retention`)&&(nn(),X()),x(yt,t.hardRebuild&&Object.values(t.modules).some(e=>e.state===`pending`||e.state===`running`)),G&&Object.values(t.modules).every(e=>e.state===`ready`||e.state===`failed`)&&(clearInterval(G),G=null)}catch{}}function an(e,t,n){return e!==null&&e.modules[n].state!==`ready`&&t.modules[n].state===`ready`}function on(){G||p(W)&&Object.values(p(W).modules).every(e=>e.state===`ready`||e.state===`failed`)||(G=setInterval(()=>void rn(),1e3))}async function sn(){if(window.confirm(Y(`hardRebuildConfirmation`))){x(yt,!0);try{let e=await fetch(`/api/rebuild`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({confirmExpensiveOperation:!0})});if(e.status!==202)throw Error(`HTTP ${e.status}`);await rn(),on(),x(Be,!1)}catch{x(yt,!1),x(Be,!0)}}}function cn(e){return`/api/export?${new URLSearchParams({format:e,window:p(qe),timeZone:p(et),currency:p(Je),includeAccountIdentifiers:String(p(_t))})}`}async function ln(e){try{let t=await fetch(cn(e));if(!t.ok)throw Error(`HTTP ${t.status}`);let n=URL.createObjectURL(await t.blob()),r=document.createElement(`a`);r.href=n,r.download=`agent-usage-${p(qe)}.${e}`,r.click(),URL.revokeObjectURL(n),x(Be,!1)}catch{x(Be,!0)}}async function un(){if(window.confirm(Y(`clearConfirmation`))){x(vt,!0);try{let e=await fetch(`/api/data`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({deleteProductSecrets:p(gt)})});if(!e.ok)throw Error(`HTTP ${e.status}`);x(gt,!1),await Promise.all([Lt(),Rt(),Wt(),tn(),nn()]),x(Be,!1)}catch{x(Be,!0)}finally{x(vt,!1)}}}async function dn(e){try{let t=await fetch(`/api/monitoring/settings`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`HTTP ${t.status}`);x(tt,await t.json()),x(Le,!1)}catch{x(Le,!0)}}async function fn(e,t){x(We,e);try{let n=await fetch(`/api/connectors/${encodeURIComponent(e)}/action`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t,...t===`connect`&&p(H)[e]?{secret:p(H)[e]}:{}})});if(!n.ok)throw Error(`HTTP ${n.status}`);await n.json(),x(H,{...p(H),[e]:``}),await Promise.all([Wt(),Lt(),Rt(),tn()])}catch{x(Ie,!0)}finally{x(We,null)}}async function pn(e=null,t=!0){if(!p(xt)){let e=document.activeElement;Tt=e instanceof HTMLElement&&e!==document.body?e:null}if(x(xt,!0),x(St,e),x(Ct,iH(e)),e===`rates:add`&&x(st,!0),Kt(),t){let t=new URL(window.location.href);e?t.searchParams.set(`settings`,e):t.searchParams.set(`settings`,`root`),window.history.replaceState(null,``,t)}await o();let n=e?[...document.querySelectorAll(`[data-settings-target]`)].find(t=>t.dataset.settingsTarget===e):null;n?.scrollIntoView?.({behavior:`smooth`,block:`start`}),(n??p(Et))?.focus()}async function mn(){let e=Tt;x(xt,!1),x(St,null),x(Ct,`connections`),Tt=null;let t=new URL(window.location.href);t.searchParams.delete(`settings`),window.history.replaceState(null,``,t),await o(),(e?.isConnected?e:p(wt))?.focus()}function hn(e){let t=p(Ze)?p($e):p(xt)?p(Et):null;e.key===`Tab`&&t?gn(e,t):p(Ze)&&e.key===`Escape`?ur():p(xt)&&e.key===`Escape`&&mn()}function gn(e,t){let n=[...t.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])`)].filter(e=>!e.hidden&&e.getAttribute(`aria-hidden`)!==`true`);if(n.length===0){e.preventDefault(),t.focus();return}let r=n[0],i=n.at(-1),a=document.activeElement;e.shiftKey&&(a===t||a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function _n(e){if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;let t=[...e.currentTarget.parentElement.querySelectorAll(`[role="tab"]`)],n=t.indexOf(e.currentTarget),r=e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowRight`?1:-1)+t.length)%t.length;e.preventDefault(),t[r]?.focus(),t[r]?.click()}function vn(e){return Y({"not-checked":`notChecked`,"not-installed":`notInstalled`,discovered:`discovered`,connected:`connected`,skipped:`skipped`,error:`connectionError`}[e])}function yn(e){return Y(e===`official-client`?`officialClient`:e===`agent-usage`?`managedSecret`:`noCredential`)}function bn(e){let t={codex:`codexPermission`,"claude-code":`claudePermission`,"opencode-go":`openCodePermission`,grok:`grokPermission`,"xai-api":`xaiPermission`,dsh:`dshPermission`}[e.id];return t?Y(t):e.permissionDescription}function xn(e){return e.status===`healthy`?Y(`healthy`):e.category?Y({"missing-binary":`diagnosticMissingBinary`,"not-configured":`diagnosticNotConfigured`,unauthorized:`diagnosticUnauthorized`,unsupported:`diagnosticUnsupported`,"schema-mismatch":`diagnosticSchemaMismatch`,"rate-limited":`diagnosticRateLimited`,timeout:`diagnosticTimeout`,stale:`diagnosticStale`,unavailable:`diagnosticUnavailable`}[e.category]):Y(`diagnosticUnavailable`)}function Sn(e){return!e.recovery||p(_e)===`en`?e.recovery:e.category?Y({"missing-binary":`recoveryMissingBinary`,"not-configured":`recoveryNotConfigured`,unauthorized:`recoveryUnauthorized`,unsupported:`recoveryUnsupported`,"schema-mismatch":`recoverySchemaMismatch`,"rate-limited":`recoveryRateLimited`,timeout:`recoveryTimeout`,stale:`recoveryStale`,unavailable:`recoveryUnavailable`}[e.category]):Y(`recoveryUnavailable`)}function Cn(e){return new Intl.NumberFormat(p(_e)).format(e)}function wn(e){return Math.abs(e)<1e4?Cn(e):new Intl.NumberFormat(p(_e),{compactDisplay:`short`,maximumFractionDigits:1,notation:`compact`}).format(e)}function Tn(e){return`${Cn(e)} ${Y(`tokens`)}`}function En(e){return e===null?Y(`notAvailable`):new Intl.NumberFormat(p(_e),{style:`percent`,maximumFractionDigits:1}).format(e)}function Dn(e){return e?new Intl.DateTimeFormat(p(_e),{hour:`2-digit`,minute:`2-digit`,month:`short`,day:`numeric`}).format(new Date(e)):`—`}function On(e){if(!e)return`—`;let t=new Date(e).getTime()-Date.now(),n=Math.abs(t),[r,i]=n>=864e5?[864e5,`day`]:n>=36e5?[36e5,`hour`]:n>=6e4?[6e4,`minute`]:[1e3,`second`];return new Intl.RelativeTimeFormat(p(_e),{numeric:`auto`}).format(Math.round(t/r),i)}function kn(e){return Y({"official-account":`authorityOfficialAccount`,"official-client":`authorityOfficialClient`,"local-observation":`authorityLocalObservation`,estimate:`authorityEstimate`,unavailable:`authorityUnavailable`,mixed:`authorityMixed`}[e])}function An(e){return!e||e.expectedCoverage.includes(`quota`)}function jn(e){return Y({complete:`coverageComplete`,partial:`coveragePartial`,unavailable:`coverageUnavailable`}[e])}function Mn(e){return Y(e===`account-wide`?`accountWide`:e===`this-mac`?`localOnly`:`unknown`)}function Nn(e){return e.trend.map(e=>{let t=e.retailEquivalent.status!==`unavailable`&&e.retailEquivalent.amount!==null?e.retailEquivalent:e.reportedEstimate??e.retailEquivalent;return{recordedTokens:e.gap?null:e.recordedTokens??0,costAmount:t.amount,costCurrency:t.comparisonCurrency}})}function Pn(e){return Y({"source-reported":`derivationSourceReported`,"reconciled-remainder":`derivationReconciledRemainder`,categorized:`derivationCategorized`,"legacy-total":`derivationLegacyTotal`}[e]??`unknown`)}function Fn(e){return Y({quota:`quota`,tokens:`tokens`,"actual-cost":`actualCost`,history:`history`}[e])}function In(e,t){let n=e.billingDomains??[];return n.find(e=>e.id===t)??n[0]??{id:`combined`,displayName:e.displayName,freshness:e.freshness,health:e.health,coverage:e.coverage,quotaBuckets:e.quotaBuckets,tokenTotals:e.tokenTotals,tokenEvidence:e.tokenEvidence,tokenAuthority:e.tokenAuthority,costs:[],lastCostObservedAt:null,balances:[],invoices:[],history:Ln(e.tokenTotals,[],e.tokenAuthority,e.tokenEvidence),forecasts:[],forecastCoverage:e.forecastCoverage}}function Ln(e,t,n,r=tr()){return{window:p(qe),start:``,end:``,timeZone:p(et),tokenTotals:e,tokenEvidence:r,models:[],unclassified:{tokenTotals:er(),tokenEvidence:tr(),authorities:[],lastObservedAt:null},days:[],intervals:[],costs:t.map(e=>({kind:e.kind,currency:e.currency,amount:e.amount,convertedAmount:null,comparisonCurrency:`CNY`,conversionUnavailableReason:e.amount===null?`unknown-native-amount`:`missing-rate`,priceSnapshots:e.priceSnapshot?[e.priceSnapshot]:[],authorities:[e.authority],observedAt:e.observedAt})),exchangeRates:[],authorities:n===`mixed`?void 0:n?[n]:[],lastObservedAt:null}}async function Rn(e){if(p(qe)===e&&!p(bt))return;x(qe,e);try{localStorage.setItem(`agent-usage:history-window`,e)}catch{}let t=++At;x(bt,!0);try{await Lt()}finally{t===At&&x(bt,!1)}}async function zn(e){if(p(Je)===e)return;x(Je,e);try{localStorage.setItem(`agent-usage:comparison-currency`,e)}catch{}let t=++At;x(bt,!0);try{await Lt()}finally{t===At&&x(bt,!1)}}function Bn(){try{let e=localStorage.getItem(`agent-usage:history-window`);return e===`24h`||e===`7d`||e===`30d`?e:`7d`}catch{return`7d`}}function Vn(){try{let e=localStorage.getItem(`agent-usage:comparison-currency`);return e===`USD`||e===`CNY`?e:`CNY`}catch{return`CNY`}}function Hn(e,t){x(Ge,{...p(Ge),[e]:t})}function Un(e,t,n){return e.find(e=>e.target.provider.id===t&&e.target.billingDomain.id===n)}function Wn(e){return{codex:{dark:`/brands/openai.svg`,light:`/brands/openai.svg`},"claude-code":{dark:`/brands/claude.svg`,light:`/brands/claude.svg`},"opencode-go":{dark:`/brands/opencode-dark.svg`,light:`/brands/opencode-light.svg`},opencode:{dark:`/brands/opencode-dark.svg`,light:`/brands/opencode-light.svg`},grok:{dark:`/brands/grok-light.svg`,light:`/brands/grok-dark.svg`},dsh:{dark:`/brands/deepseek.svg`,light:`/brands/deepseek.svg`},antigravity:{dark:`/brands/antigravity.svg`,light:`/brands/antigravity.svg`}}[e]??null}function Gn(e,t){return t===`dark`?e.dark:e.light}function Kn(e,t){return e===`grok`?t.filter(e=>e.id===`grok-build-subscription`):t}function qn(e,t,n=[]){let r=e.providers.filter(e=>e.id!==`opencode`&&e.id!==`dsh`).map(e=>({...e,billingDomains:Kn(e.id,[...e.billingDomains??[]])}));for(let e of t){let{provider:t,billingDomain:n}=e.target;if(t.id===`opencode`||t.id===`dsh`||t.id===`grok`&&n.id!==`grok-build-subscription`)continue;let i=r.find(e=>e.id===t.id);i||(i=Qn(t.id,t.displayName),r.push(i)),i.billingDomains.some(e=>e.id===n.id)||i.billingDomains.push($n(n.id,n.displayName))}for(let t of n){if(t.id===`opencode`||t.id===`dsh`)continue;let n=r.find(e=>e.id===t.id);n?e.providers.some(e=>e.id===n.id)||(n.displayName=t.displayName):r.push(Qn(t.id,t.displayName))}let i={codex:0,"claude-code":1,"opencode-go":2,grok:3};return r.sort((e,t)=>(i[e.id]??100)-(i[t.id]??100)||e.displayName.localeCompare(t.displayName))}function Jn(e){return/\b5\s*hours?\b/i.test(e)?0:/\b(?:week|weekly)\b/i.test(e)?1:/\b(?:month|monthly)\b/i.test(e)?2:3}function Yn(e){return e.split(` · `).filter(e=>Jn(e)===3).join(` · `)}function Xn(e){let t=e.map((e,t)=>({bucket:e,sourceIndex:t})).sort((e,t)=>Jn(e.bucket.label)-Jn(t.bucket.label)||e.sourceIndex-t.sourceIndex),n=[];for(let{bucket:e}of t){let t=Yn(e.label);n.includes(t)||n.push(t)}return t.sort((e,t)=>n.indexOf(Yn(e.bucket.label))-n.indexOf(Yn(t.bucket.label))).map(({bucket:e})=>e)}function Zn(e,t){return qn(e,t,p(Ee)).flatMap(e=>(e.billingDomains.length>0?e.billingDomains:[In(e,void 0)]).flatMap(t=>{let n=Xn(t.quotaBuckets);return n.length===0?[]:[{providerId:e.id,providerDisplayName:e.displayName,billingDomainId:t.id,billingDomainDisplayName:t.displayName,observedAt:t.freshness?.lastSuccessAt??e.freshness.lastSuccessAt,quotaBuckets:n}]}))}function Qn(e,t){return{id:e,displayName:t,summaryBillingDomainId:null,freshness:{status:`unavailable`,lastSuccessAt:null},health:{status:`healthy`,errorCode:null,message:null,recovery:null},coverage:{quota:`unavailable`,tokens:`unavailable`,actualCost:`unavailable`,history:`unavailable`},quotaBuckets:[],tokenTotals:er(),tokenEvidence:tr(),tokenAuthority:null,billingDomains:[],forecasts:[],forecastCoverage:`insufficient`}}function $n(e,t){let n=er();return{id:e,displayName:t,freshness:{status:`unavailable`,lastSuccessAt:null},health:{status:`healthy`,errorCode:null,message:null,recovery:null},coverage:{quota:`unavailable`,tokens:`unavailable`,actualCost:`unavailable`,history:`unavailable`},quotaBuckets:[],tokenTotals:n,tokenEvidence:tr(),tokenAuthority:null,costs:[],lastCostObservedAt:null,balances:[],invoices:[],history:Ln(n,[],null),forecasts:[],forecastCoverage:`insufficient`}}function er(){return{total:0,input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0}}function tr(){return{recordedTokens:0,sourceReportedTokens:0,sourceReportedObservationCount:0,observationCount:0,unclassifiedTokens:0,classifiedTokens:0,classificationCoverage:null,totalDerivations:[],timePrecisions:[],usageScopes:[],aggregationTemporalities:[]}}function nr(e,t){return e===null?`—`:new Intl.NumberFormat(p(_e),{style:`currency`,currency:t,currencyDisplay:`narrowSymbol`,minimumFractionDigits:2,maximumFractionDigits:Math.abs(e)>0&&Math.abs(e)<.01?8:2}).format(e)}function rr(e){x(Ye,e)}function ir(e){let t=new Intl.DateTimeFormat(p(_e),{month:`short`,day:`numeric`,timeZone:e.timeZone});return`${t.format(new Date(e.start))} – ${t.format(new Date(e.end))}`}function ar(e,t,n){return e===null?Y(`notAvailable`):n===`tokens`?`${wn(e)} ${Y(`tokens`)}`:nr(e,t)}function or(e,t){return e.includedInHeadline===!1?null:t===`tokens`?e.tokenShare:e.retailEquivalent.amount===null&&e.reportedEstimate.amount!==null?e.reportedShare:e.retailShare}function sr(e,t){let n=e.retailEquivalent.amount===null?e.reportedEstimate:e.retailEquivalent,r=t===`tokens`?`${Cn(e.recordedTokens)} ${Y(`tokens`)}`:n?.amount==null?Y(`notAvailable`):nr(n.amount,n.currency),i=e.includedInHeadline===!1?` · ${Y(`separateFromHeadline`)}`:``;return`${e.providerDisplayName} · ${e.billingDomainDisplayName}${i}: ${r}`}function cr(e,t){return(t===`tokens`?e.modelRanking.byTokens:e.modelRanking.byCost).flatMap(t=>{let n=e.modelRanking.entries.find(e=>e.id===t);return n?[n]:[]})}async function lr(e,t){x(Ze,e),Qe=t,await o(),p($e)?.focus()}async function ur(){x(Ze,null),await o(),Qe?.focus()}g(()=>p(_e),()=>{x(ve,Te(p(_e),`metaDescription`))}),g(()=>(p(ye),p(Ze)),()=>{x(Dt,p(ye)?.workbench?.modelRanking.entries.find(e=>e.id===p(Ze))??null)}),g(()=>(p(Ae),p(Ee),p(De)),()=>{x(K,p(Ae)&&p(Ee).length===0?null:{generatedAt:new Date().toISOString(),providers:Object.values(p(De))})}),g(()=>(p(Ke),p(K),p(ye)),()=>{x(q,p(Ke)===`agents`?p(K):p(ye))}),g(()=>p(W),()=>{x(ce,p(W)?Object.values(p(W).modules).some(e=>e.state===`pending`||e.state===`running`):!1)}),g(()=>(p(bt),p(je),p(ce)),()=>{x(pe,p(bt)||p(je)||p(ce))}),de(),te();var dr=m();ue(`1uha8ag`,e=>{var t=lH(),r=B(u(t),2);n(()=>A(r,`content`,p(ve))),d(()=>{y.title=`Agent Usage`}),i(e,t)}),N(`keydown`,b,hn);var fr=u(dr);le(fr,()=>p(_e),r=>{var o=xU(),l=u(o),d=s(l),m=s(d),g=s(m),y=s(g),b=B(y,2),w=s(b,!0);I(b);var T=B(b,2),k=s(T),ee=s(k,!0);I(k);var R=B(k,2),te=s(R,!0);I(R),I(T),I(g);var V=B(g,2),ie=e=>{var t=uH(),r=s(t),o=s(r,!0);I(r);var l=B(r,4),u=s(l,!0);I(l),I(t),n((e,t)=>{a(o,e),a(u,t)},[()=>c(()=>Y(`usage`)),()=>(p(q),c(()=>ir(p(q).workbench)))]),i(e,t)};v(V,e=>{p(Ke),p(q),c(()=>p(Ke)===`models`&&p(q)?.workbench)&&e(ie)}),I(m);var ae=B(m,2),se=s(ae),ce=e=>{var t=fH(),r=u(t),o=s(r),l=s(o),d=s(l,!0);I(l);var f=B(l,2),m=s(f,!0);I(f),I(o);var h=B(o,2);_(h,4,()=>[`24h`,`7d`,`30d`],e=>e,(e,t)=>{var r=dH(),o=s(r,!0);I(r),n(()=>{A(r,`aria-pressed`,p(qe)===t),a(o,t)}),N(`click`,r,()=>Rn(t)),i(e,r)}),I(h);var g=B(h,2);_(g,4,()=>[`CNY`,`USD`],e=>e,(e,t)=>{var r=dH(),o=s(r,!0);I(r),n(()=>{A(r,`aria-pressed`,p(Je)===t),a(o,t)}),N(`click`,r,()=>zn(t)),i(e,r)}),I(g),I(r),D(2),n((e,t,n,r,i)=>{A(o,`aria-label`,e),A(l,`aria-pressed`,p(Ye)===`retail-equivalent`),a(d,t),A(f,`aria-pressed`,p(Ye)===`tokens`),a(m,n),A(h,`aria-label`,r),A(g,`aria-label`,i)},[()=>c(()=>Y(`trendMetric`)),()=>c(()=>Y(`cost`)),()=>c(()=>Y(`tokens`)),()=>c(()=>Y(`history`)),()=>c(()=>Y(`displayCurrency`))]),N(`click`,l,()=>rr(`retail-equivalent`)),N(`click`,f,()=>rr(`tokens`)),i(e,t)};v(se,e=>{p(Ke)===`models`&&e(ce)});var ue=B(se,2),de=s(ue),me=s(de,!0);I(de),E(de,e=>x(wt,e),()=>p(wt));var he=B(de,2),ve=s(he),Se=s(ve,!0);I(ve);var Ce=B(ve);I(he);var we=B(he,2),Te=s(we,!0);I(we);var ke=B(we,2),Pe=s(ke);let Fe;var He=B(Pe);I(ke),I(ue),I(ae),I(d);var Ue=B(d,2),Ze=e=>{var t=pH(),r=s(t),o=s(r),l=s(o,!0);I(o),I(r),I(t),n(e=>a(l,e),[()=>c(()=>Y(`loadingModelCosts`))]),i(e,t)},Qe=e=>{var t=mH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`error`))]),i(e,t)},U=r=>{var o=WH(),l=u(o),d=e=>{var t=hH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`refreshUnavailable`))]),i(e,t)};v(l,e=>{p(Ne)&&e(d)});var m=B(l,2),g=e=>{var t=gH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`noProviders`))]),i(e,t)};v(m,e=>{p(Ke),p(Ae),p(Ee),p(Ve),c(()=>p(Ke)===`agents`&&!p(Ae)&&p(Ee).length===0&&p(Ve).length===0)&&e(g)});var y=B(m,2),b=r=>{var o=MH(),l=s(o);_(l,5,()=>(p(q),p(Ve),p(Ee),c(()=>qn(p(q),p(Ve),p(Ee)))),e=>e.id,(r,o)=>{let l=h(()=>(p(o),c(()=>Wn(p(o).id)))),d=h(()=>(p(De),p(o),c(()=>!!p(De)[p(o).id]))),m=h(()=>(p(Oe),p(o),f(p(d)),c(()=>p(Oe)[p(o).id]&&!p(d)))),g=h(()=>(p(Oe),p(o),f(p(d)),c(()=>p(Oe)[p(o).id]&&p(d)))),y=h(()=>(p(o),p(Ge),c(()=>In(p(o),p(Ge)[p(o).id])))),b=h(()=>(f(p(y)),p(o),c(()=>p(y).freshness??p(o).freshness))),S=h(()=>(f(p(y)),p(o),c(()=>p(y).coverage??p(o).coverage))),w=h(()=>(p(Ve),p(o),f(p(y)),c(()=>Un(p(Ve),p(o).id,p(y).id))));var T=jH();let E;var D=s(T),k=e=>{var t=vH(),r=s(t),a=B(s(r),2);_(a,4,()=>[0,1,2],e=>e,(e,t)=>{var n=_H();i(e,n)}),I(a),I(r),I(t),n(()=>A(t,`data-testid`,(p(o),c(()=>`agent-provider-skeleton-${p(o).id}`)))),i(e,t)};v(D,e=>{p(m)&&e(k)});var M=B(D,2),ee=s(M),P=e=>{var t=yH();n(e=>{A(t,`data-provider-logo`,(p(o),c(()=>p(o).id))),A(t,`src`,e)},[()=>(f(p(l)),z(),c(()=>Gn(p(l),z())))]),i(e,t)};v(ee,e=>{p(l)&&e(P)});var F=B(ee,2),R=s(F),te=s(R),ne=s(te,!0);I(te);var V=B(te,2),re=s(V),ie=s(re,!0);I(re);var ae=B(re,2),oe=e=>{var t=bH(),r=s(t),o=s(r,!0);I(r);var l=B(r,2);I(t),n((e,n,r)=>{A(t,`data-testid`,(f(p(w)),c(()=>`connector-${p(w).id}`))),a(o,e),A(l,`title`,n),A(l,`aria-label`,r)},[()=>(f(p(w)),c(()=>vn(p(w).state))),()=>(f(p(w)),c(()=>`${vn(p(w).state)} · ${Y(`manageConnection`)}`)),()=>c(()=>Y(`manageConnection`))]),N(`click`,l,()=>pn(`connector:${p(w).id}`)),i(e,t)};v(ae,e=>{f(p(w)),c(()=>p(w)?.state===`connected`)&&e(oe)}),I(V),I(R);var se=B(R,2),ce=B(s(se),2),le=e=>{var r=t();n(e=>a(r,e),[()=>c(()=>Y(`updating`))]),i(e,r)},ue=e=>{var r=t();n((e,t)=>a(r,`${e??``}
|
|
20
|
+
${t??``}`),[()=>(f(p(b)),c(()=>p(b).status===`fresh`?Y(`updatedNow`):p(b).lastSuccessAt?Y(`updated`):Y(`unavailable`))),()=>(f(p(b)),c(()=>p(b).lastSuccessAt?` · ${Dn(p(b).lastSuccessAt)}`:``))]),i(e,r)};v(ce,e=>{p(g)?e(le):e(ue,-1)}),I(se),I(F),I(M);var de=B(M,2),pe=e=>{var t=SH();_(t,5,()=>(p(o),c(()=>p(o).billingDomains)),e=>e.id,(e,t)=>{let r=h(()=>(f(p(y)),p(t),c(()=>p(y).id===p(t).id)));var l=xH(),u=s(l,!0);I(l),n(()=>{A(l,`aria-selected`,p(r)),A(l,`tabindex`,p(r)?0:-1),a(u,(p(t),c(()=>p(t).displayName)))}),N(`click`,l,()=>Hn(p(o).id,p(t).id)),N(`keydown`,l,_n),i(e,l)}),I(t),n(e=>A(t,`aria-label`,e),[()=>(p(o),c(()=>`${p(o).displayName} ${Y(`billingDomainTabs`)}`))]),i(e,t)};v(de,e=>{p(o),c(()=>(p(o).billingDomains?.length??0)>1)&&e(pe)});var me=B(de,2);_(me,1,()=>[p(y)],e=>e.id,(t,r)=>{let l=h(()=>(p(Ve),p(o),p(r),c(()=>Un(p(Ve),p(o).id,p(r).id))));var d=AH(),m=u(d),g=e=>{var t=DH();let r;var o=s(t),u=s(o),d=s(u),m=s(d,!0);I(d);var h=B(d,2),g=e=>{var t=CH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`experimental`))]),i(e,t)};v(h,e=>{f(p(l)),c(()=>p(l).experimental)&&e(g)}),I(u);var _=B(u);I(o);var y=B(o,2),b=s(y),S=s(b,!0);I(b);var w=B(b,2),T=s(w),E=s(T,!0);I(T);var D=B(T,2),k=s(D,!0);I(D),I(w);var j=B(w,2),M=s(j),ee=s(M,!0);I(M);var P=B(M,2),F=s(P,!0);I(P),I(j);var R=B(j,2),z=e=>{var t=wH(),r=s(t),o=s(r,!0);I(r);var u=B(r,2);O(u),I(t),n((e,t)=>{a(o,e),A(u,`aria-label`,t),L(u,(p(H),f(p(l)),c(()=>p(H)[p(l).id]??``)))},[()=>c(()=>Y(`managementKey`)),()=>(f(p(l)),c(()=>`${p(l).displayName} ${Y(`managementKey`)}`))]),N(`input`,u,e=>x(H,{...p(H),[p(l).id]:e.currentTarget.value})),i(e,t)};v(R,e=>{f(p(l)),c(()=>p(l).credentialOwner===`agent-usage`)&&e(z)});var te=B(R,2),ne=s(te),V=e=>{var t=TH(),r=s(t,!0);I(t),n(e=>{t.disabled=(f(p(l)),p(We),p(H),c(()=>!p(l).installed||p(We)===p(l).id||p(l).credentialOwner===`agent-usage`&&!p(H)[p(l).id])),a(r,e)},[()=>c(()=>Y(`connect`))]),N(`click`,t,()=>fn(p(l).id,`connect`)),i(e,t)};v(ne,e=>{f(p(l)),c(()=>p(l).state===`discovered`||p(l).state===`skipped`)&&e(V)});var re=B(ne,2),ie=e=>{var t=EH(),r=s(t,!0);I(t),n(e=>{t.disabled=(p(We),f(p(l)),c(()=>p(We)===p(l).id)),a(r,e)},[()=>c(()=>Y(`retry`))]),N(`click`,t,()=>fn(p(l).id,`retry`)),i(e,t)};v(re,e=>{f(p(l)),c(()=>p(l).state===`error`||p(l).state===`not-installed`)&&e(ie)});var ae=B(re,2),oe=e=>{var t=EH(),r=s(t,!0);I(t),n(e=>{t.disabled=(p(We),f(p(l)),c(()=>p(We)===p(l).id)),a(r,e)},[()=>c(()=>Y(`skip`))]),N(`click`,t,()=>fn(p(l).id,`skip`)),i(e,t)};v(ae,e=>{f(p(l)),c(()=>p(l).state!==`skipped`)&&e(oe)}),I(te),I(y),I(t),n((e,n,i,o,s,u,d)=>{r=C(t,1,`inline-connection svelte-1uha8ag`,null,r,{"connection-pending":p(We)===p(l).id}),A(t,`data-testid`,(f(p(l)),c(()=>`connector-${p(l).id}`))),A(t,`aria-busy`,(p(We),f(p(l)),c(()=>p(We)===p(l).id))),a(m,e),a(_,` ${n??``}`),a(S,i),a(E,o),a(k,s),a(ee,u),a(F,d)},[()=>(f(p(l)),c(()=>vn(p(l).state))),()=>c(()=>Y(`connectionSetup`)),()=>(f(p(l)),c(()=>bn(p(l)))),()=>(f(p(l)),c(()=>p(l).installed?Y(`installed`):Y(`notInstalled`))),()=>(f(p(l)),c(()=>yn(p(l).credentialOwner))),()=>c(()=>Y(`coverageLabel`)),()=>(f(p(l)),c(()=>p(l).expectedCoverage.map(Fn).join(` · `)))]),i(e,t)};v(m,e=>{f(p(l)),c(()=>p(l)&&p(l).state!==`connected`)&&e(g)});var y=B(m,2),b=s(y,!0);I(y);var S=B(y,2),w=e=>{var t=OH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`noQuotaWindowDetail`))]),i(e,t)},T=e(()=>(f(p(l)),c(()=>!An(p(l))))),E=e=>{var t=OH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`noQuotaReported`))]),i(e,t)};v(S,e=>{p(T)?e(w):(p(r),c(()=>p(r).quotaBuckets.length===0)&&e(E,1))});var D=B(S,2);_(D,5,()=>(p(r),c(()=>Xn(p(r).quotaBuckets))),e=>e.id,(e,t)=>{let l=h(()=>(f(fe),p(t),c(()=>fe(p(t).usedPercent))));var u=kH(),d=s(u),m=s(d),g=s(m,!0);I(m);var _=B(m,2),v=s(_);I(_),I(d);var y=B(d,2);let b;var x=s(y);I(y);var S=B(y,2),w=s(S);I(S);var T=B(S,2),E=s(T),D=s(E);I(E),I(T),I(u),n((e,n,i,s,u,d,f,m,h)=>{a(g,(p(t),c(()=>p(t).label))),a(v,`${e??``}% ${n??``}`),b=C(y,1,`progress svelte-1uha8ag`,null,b,{"progress-warning":(p(l)??0)>=70&&(p(l)??0)<90,"progress-critical":(p(l)??0)>=90}),A(y,`aria-label`,(p(t),c(()=>p(t).label))),A(y,`aria-valuenow`,p(l)??void 0),A(y,`aria-valuetext`,i),A(y,`aria-describedby`,(p(o),p(r),p(t),c(()=>`quota-evidence-${p(o).id}-${p(r).id}-${p(t).id}`))),j(x,`width: ${p(l)??0}%`),A(S,`id`,(p(o),p(r),p(t),c(()=>`quota-evidence-${p(o).id}-${p(r).id}-${p(t).id}`))),a(w,`${s??``}: ${u??``} ·
|
|
21
|
+
${d??``}`),a(D,`${f??``}
|
|
22
|
+
${m??``} · ${h??``}`)},[()=>(f(p(l)),c(()=>p(l)===null?`—`:Cn(p(l)))),()=>c(()=>Y(`used`)),()=>(f(p(l)),c(()=>p(l)===null?Y(`notAvailable`):`${Cn(p(l))}% ${Y(`used`)}`)),()=>c(()=>Y(`source`)),()=>(p(t),c(()=>kn(p(t).authority))),()=>(p(t),p(r),p(o),c(()=>Dn(p(t).observedAt??p(r).freshness?.lastSuccessAt??p(o).freshness.lastSuccessAt))),()=>c(()=>Y(`resets`)),()=>(p(t),c(()=>Dn(p(t).resetsAt))),()=>(p(t),c(()=>On(p(t).resetsAt)))]),i(e,u)}),I(D),n(e=>a(b,e),[()=>c(()=>Y(`quota`))]),i(t,d)}),I(T),n(e=>{E=C(T,1,`provider-card svelte-1uha8ag`,null,E,{"provider-card-loading":p(m)}),A(T,`aria-busy`,(p(Oe),p(o),c(()=>p(Oe)[p(o).id]))),A(te,`data-provider-logo`,(f(p(l)),p(o),c(()=>p(l)?void 0:p(o).id))),a(ne,(p(o),c(()=>p(o).displayName))),a(ie,e),A(se,`data-status`,(f(p(g)),f(p(b)),c(()=>p(g)?`updating`:p(b).status===`unavailable`?`unavailable`:`available`))),A(se,`role`,p(g)?`status`:void 0),A(se,`data-testid`,(f(p(g)),p(o),c(()=>p(g)?`agent-provider-update-${p(o).id}`:void 0)))},[()=>(f(p(w)),f(p(S)),c(()=>An(p(w))?jn(p(S).quota):Y(`noQuotaWindow`)))]),i(r,T)}),I(l);var d=B(l,2);{let e=h(()=>(p(q),p(Ve),c(()=>Zn(p(q),p(Ve))))),t=h(()=>(p(q),c(()=>Date.parse(p(q).generatedAt))));OV(d,{get providers(){return p(e)},get locale(){return p(_e)},get timeZone(){return p(et)},get now(){return p(t)}})}I(o),n(e=>A(l,`aria-label`,e),[()=>c(()=>Y(`providersLabel`))]),i(r,o)},S=e=>{var t=UH(),r=s(t),o=e=>{let t=h(()=>(p(q),c(()=>p(q).workbench)));var r=HH(),o=s(r),l=s(o,!0);I(o);var u=B(o,2),d=s(u),m=e=>{var t=NH(),r=s(t),o=s(r,!0);I(r),I(t),n(e=>a(o,e),[()=>c(()=>Y(`updatingModelCosts`))]),i(e,t)};v(d,e=>{p(pe)&&e(m)});var g=B(d,2),y=s(g),b=s(y,!0);I(y),I(g);var S=B(g,2),C=e=>{rH(e,{get wall(){return p(be)},get locale(){return p(_e)},formatTokens:wn,get updating(){return p(xe)},embedded:!0})};v(S,e=>{p(be)&&e(C)}),I(u);var w=B(u,2),T=s(w),E=e=>{var t=PH(),r=s(t),o=s(r,!0);I(r),I(t),n(e=>a(o,e),[()=>c(()=>Y(`updatingModelCosts`))]),i(e,t)};v(T,e=>{p(pe)&&e(E)});var D=B(T,2),O=s(D),k=s(O),M=s(k,!0);I(k);var ee=B(k,2),P=s(ee,!0);I(ee),I(O),lV(B(O,2),{get providers(){return f(p(t)),c(()=>p(t).providerSummary)},get metric(){return p(Ye)},get currency(){return f(p(t)),c(()=>p(t).comparisonCurrency)},get locale(){return p(_e)},formatUsageMetric:ar,formatPercent:En}),I(D);var F=B(D,2);le(F,()=>p(qe),e=>{{let n=h(()=>(f(p(t)),c(()=>ir(p(t)))));LV(e,{get buckets(){return f(p(t)),c(()=>p(t).trend.buckets)},get metric(){return p(Ye)},get currency(){return f(p(t)),c(()=>p(t).comparisonCurrency)},get locale(){return p(_e)},get selectedWindow(){return p(qe)},get timeZone(){return f(p(t)),c(()=>p(t).timeZone)},get granularity(){return f(p(t)),c(()=>p(t).trend.granularity)},get rangeLabel(){return p(n)},formatUsageMetric:ar,describeSegment:sr})}}),I(w);var L=B(w,2),R=s(L),te=e=>{var t=FH(),r=s(t),o=s(r,!0);I(r),I(t),n(e=>a(o,e),[()=>c(()=>Y(`updatingModelCosts`))]),i(e,t)};v(R,e=>{p(pe)&&e(te)});var ne=B(R,2),V=s(ne),re=s(V),ie=s(re,!0);I(re),I(V);var ae=B(V,2),oe=s(ae),se=s(oe,!0);I(oe);var ce=B(oe,2),ue=s(ce,!0);I(ce);var de=B(ce,2),fe=s(de,!0);I(de),I(ae),I(ne);var me=B(ne,2),he=s(me),ge=s(he,!0);I(he);var ve=B(he,2),ye=s(ve,!0);I(ve);var Se=B(ve,2),Ce=s(Se,!0);I(Se);var we=B(Se,2),Te=s(we,!0);I(we),I(me);var Ee=B(me,2),De=e=>{var r=IH(),o=s(r);{let e=h(()=>(f(p(t)),p(Ye),c(()=>cr(p(t),p(Ye)))));QB(o,{get models(){return p(e)},get metric(){return p(Ye)},get currency(){return f(p(t)),c(()=>p(t).comparisonCurrency)},get locale(){return p(_e)},formatUsageMetric:ar,formatPercent:En,onSelect:e=>void lr(e,null)})}var l=B(o,2),u=s(l,!0);I(l),I(r),n(e=>a(u,e),[()=>c(()=>Y(`treemapHint`))]),i(e,r)},Oe=e=>{var n=LH(),r=s(n);{let e=h(()=>(f(p(t)),p(Ye),c(()=>cr(p(t),p(Ye)))));eV(r,{get models(){return p(e)},get metric(){return p(Ye)},get currency(){return f(p(t)),c(()=>p(t).comparisonCurrency)},get locale(){return p(_e)},formatUsageMetric:ar,onSelect:e=>void lr(e,null)})}I(n),i(e,n)},ke=e=>{var r=VH(),o=s(r);_(o,5,()=>(f(p(t)),p(Ye),c(()=>cr(p(t),p(Ye)))),e=>e.id,(e,t)=>{let r=h(()=>(p(t),c(()=>Wn(p(t).providerId)))),o=h(()=>(p(t),c(()=>p(t).retailEquivalent.amount===null?p(t).reportedEstimate??p(t).retailEquivalent:p(t).retailEquivalent))),l=h(()=>(p(t),p(Ye),c(()=>or(p(t),p(Ye)))));var u=BH(),d=s(u),m=s(d),g=s(m),_=e=>{var a=RH();n(e=>{A(a,`data-provider-logo`,(p(t),c(()=>p(t).providerId))),A(a,`src`,e)},[()=>(f(p(r)),z(),c(()=>Gn(p(r),z())))]),i(e,a)};v(g,e=>{p(r)&&e(_)});var y=B(g,2),b=s(y),x=s(b,!0);I(b);var S=B(b,2),C=s(S);I(S);var w=B(S,2),T=e=>{var t=CH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`separateFromHeadline`))]),i(e,t)};v(w,e=>{p(t),c(()=>p(t).includedInHeadline===!1)&&e(T)}),I(y),I(m);var E=B(m,2),D=s(E),O=s(D,!0);I(D),I(E);var k=B(E,2),M=s(k),ee=s(M,!0);I(M);var P=B(M,2),F=e=>{var r=zH(),a=s(r);I(r),n((e,t,n)=>{A(r,`aria-label`,e),A(r,`aria-valuenow`,t),j(a,n)},[()=>(p(t),c(()=>`${p(t).model} ${Mt()}`)),()=>(f(p(l)),c(()=>Math.round(p(l)*1e3)/10)),()=>(f(p(l)),c(()=>`width: ${Math.max(2,Math.min(100,p(l)*100))}%`))]),i(e,r)};v(P,e=>{p(l)!==null&&e(F)}),I(k);var L=B(k,2),R=s(L),te=s(R,!0);I(R),I(L),I(d),I(u),n((e,n,r,i,o,s,l)=>{a(x,(p(t),c(()=>p(t).model))),a(C,`${p(t),c(()=>p(t).providerDisplayName)??``} · ${p(t),c(()=>p(t).billingDomainDisplayName)??``}`),A(E,`data-label`,e),a(O,n),A(k,`data-label`,r),a(ee,i),A(L,`data-label`,o),A(R,`aria-label`,s),a(te,l)},[()=>c(()=>Y(`cost`)),()=>(f(p(o)),c(()=>p(o).amount===null?Y(`notAvailable`):nr(p(o).amount,p(o).comparisonCurrency))),()=>c(Mt),()=>(p(t),f(p(l)),c(()=>p(t).includedInHeadline===!1?Y(`headlineShareNotApplicable`):En(p(l)))),()=>c(()=>Y(`tokens`)),()=>(p(t),c(()=>Tn(p(t).tokenTotals.total))),()=>(p(t),c(()=>wn(p(t).tokenTotals.total)))]),N(`click`,d,e=>lr(p(t).id,e.currentTarget)),N(`keydown`,d,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),lr(p(t).id,e.currentTarget))}),i(e,u)}),I(o),I(r),i(e,r)};v(Ee,e=>{p(Xe)===`treemap`?e(De):p(Xe)===`trend`?e(Oe,1):e(ke,-1)}),I(L),I(r),n((e,t,n,r,i,o,s,c,d,f,m,h,g,_,v)=>{a(l,e),A(u,`aria-label`,t),A(u,`aria-busy`,p(pe)),A(y,`aria-label`,n),a(b,r),A(w,`aria-busy`,p(pe)),a(M,i),a(P,o),A(L,`aria-busy`,p(pe)),a(ie,s),A(ae,`aria-label`,c),A(oe,`aria-selected`,p(Xe)===`list`),a(se,d),A(ce,`aria-selected`,p(Xe)===`treemap`),a(ue,f),A(de,`aria-selected`,p(Xe)===`trend`),a(fe,m),a(ge,h),a(ye,g),a(Ce,_),a(Te,v)},[()=>c(()=>Y(`tokenMoneyWorkbench`)),()=>c(()=>Y(`usageOverview`)),()=>(p(Ye),f(p(t)),c(()=>p(Ye)===`tokens`?p(t).recordedTokens===null?Y(`notAvailable`):Tn(p(t).recordedTokens):nr(p(t).costs.retailEquivalent.amount,p(t).comparisonCurrency))),()=>(p(Ye),f(p(t)),c(()=>p(Ye)===`tokens`?p(t).recordedTokens===null?Y(`notAvailable`):wn(p(t).recordedTokens):nr(p(t).costs.retailEquivalent.amount,p(t).comparisonCurrency))),()=>c(()=>Y(`providerShare`)),()=>c(()=>Y(`providerShareSubtitle`)),()=>c(()=>Y(`breakdown`)),()=>c(()=>Y(`breakdownView`)),()=>c(()=>Y(`list`)),()=>c(()=>Y(`treemap`)),()=>c(()=>Y(`trendStacked`)),()=>c(()=>Y(`model`)),()=>c(()=>Y(`cost`)),()=>c(Mt),()=>c(()=>Y(`tokens`))]),N(`click`,oe,()=>x(Xe,`list`)),N(`click`,ce,()=>x(Xe,`treemap`)),N(`click`,de,()=>x(Xe,`trend`)),i(e,r)};v(r,e=>{p(q),c(()=>p(q).workbench)&&e(o)}),I(t),i(e,t)};v(y,e=>{p(Ke)===`agents`?e(b):e(S,-1)}),i(r,o)};v(Ue,e=>{p(q)?p(Ke)===`models`&&p(Me)&&!p(ye)?e(Qe,1):p(q)&&e(U,2):e(Ze)}),I(l);var bt=B(l,2),W=t=>{var r=_U(),o=s(r),l=s(o),d=B(l,2),m=s(d),g=s(m),y=s(g,!0);I(g);var b=B(g,2),w=s(b,!0);I(b);var T=B(b,2),D=s(T,!0);I(T),I(m);var k=B(m,2),j=s(k);let ee;var P=s(j),L=s(P,!0);I(P),I(j);var R=B(j,2);let te;var V=s(R),ie=s(V,!0);I(V);var ae=B(V,2),se=e=>{var t=GH(),r=s(t,!0);I(t),n(()=>a(r,(p(it),c(()=>p(it).length)))),i(e,t)};v(ae,e=>{p(it),c(()=>p(it).length>0)&&e(se)}),I(R);var ce=B(R,2);let le;var ue=s(ce),de=s(ue,!0);I(ue),I(ce);var fe=B(ce,2);let pe;var me=s(fe),he=s(me,!0);I(me),I(fe);var _e=B(fe,2);let ve;var ye=s(_e),be=s(ye,!0);I(ye),I(_e),I(k),I(d);var xe=B(d,2),Se=s(xe),Ce=s(Se),we=s(Ce),Te=e=>{var t=KH(),r=u(t),o=s(r);let l;var d=B(o);I(r);var f=B(r,2),m=s(f,!0);I(f),n((e,t,n,i)=>{A(r,`title`,e),A(r,`aria-label`,t),r.disabled=p(ot),l=C(o,1,`svelte-1uha8ag`,null,l,{spin:p(ot)}),a(d,` ${n??``}`),A(f,`aria-expanded`,p(st)),a(m,i)},[()=>c(()=>Y(`customRateRefreshTitle`)),()=>c(()=>Y(`customRateRefreshTitle`)),()=>c(()=>Y(`customRateRefresh`)),()=>(p(st),c(()=>p(st)?Y(`customRateCancel`):Y(`customRateAddToggle`)))]),N(`click`,r,Kt),N(`click`,f,Yt),i(e,t)};v(we,e=>{p(Ct)===`rates`&&e(Te)}),I(Ce),I(Se);var Ee=B(Se,2),De=s(Ee),Oe=e=>{var t=XH(),r=s(t),o=e=>{var t=qH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`connectorsUnavailable`))]),i(e,t)};v(r,e=>{p(Ie)&&e(o)});var l=B(r,2);_(l,5,()=>(p(Ve),c(()=>p(Ve).filter(e=>e.id!==`xai-api`))),e=>e.id,(e,t)=>{let r=h(()=>(p(t),c(()=>Wn(p(t).target.provider.id))));var o=YH();let l;var u=s(o),d=s(u),m=s(d),g=e=>{var a=JH();n(e=>{A(a,`data-provider-logo`,(p(t),c(()=>p(t).target.provider.id))),A(a,`src`,e)},[()=>(f(p(r)),z(),c(()=>Gn(p(r),z())))]),i(e,a)};v(m,e=>{p(r)&&e(g)});var _=B(m,2),y=s(_,!0);I(_),I(d);var b=B(d,2),x=s(b,!0);I(b),I(u);var S=B(u,2),w=s(S),T=e=>{var r=TH(),o=s(r,!0);I(r),n(e=>{r.disabled=(p(t),p(We),c(()=>!p(t).installed||p(We)===p(t).id)),a(o,e)},[()=>c(()=>Y(`connect`))]),N(`click`,r,()=>fn(p(t).id,`connect`)),i(e,r)};v(w,e=>{p(t),c(()=>p(t).state===`discovered`||p(t).state===`skipped`)&&e(T)});var E=B(w,2),D=e=>{var r=EH(),o=s(r,!0);I(r),n(e=>{r.disabled=(p(We),p(t),c(()=>p(We)===p(t).id)),a(o,e)},[()=>c(()=>Y(`retry`))]),N(`click`,r,()=>fn(p(t).id,`retry`)),i(e,r)};v(E,e=>{p(t),c(()=>p(t).state===`error`||p(t).state===`not-installed`||p(t).state===`connected`)&&e(D)});var O=B(E,2),k=e=>{var r=EH(),o=s(r,!0);I(r),n(e=>{r.disabled=(p(We),p(t),c(()=>p(We)===p(t).id)),a(o,e)},[()=>c(()=>Y(`skip`))]),N(`click`,r,()=>fn(p(t).id,`skip`)),i(e,r)};v(O,e=>{p(t),c(()=>p(t).state!==`skipped`)&&e(k)}),I(S),I(o),n(e=>{A(o,`data-settings-target`,(p(t),c(()=>`connector:${p(t).id}`))),A(o,`data-testid`,(p(t),c(()=>`settings-connector-${p(t).id}`))),l=C(o,1,`svelte-1uha8ag`,null,l,{"settings-target-active":p(St)===`connector:${p(t).id}`}),a(y,(p(t),c(()=>p(t).displayName))),a(x,e)},[()=>(p(t),c(()=>vn(p(t).state)))]),i(e,o)}),I(l),I(t),n(e=>A(t,`aria-label`,e),[()=>c(()=>Y(`connections`))]),i(e,t)},ke=e=>{var t=sU(),r=s(t),o=e=>{var t=qH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`customRatesUnavailable`))]),i(e,t)};v(r,e=>{p(at)&&e(o)});var l=B(r,2),d=s(l),m=e=>{var t=$H(),r=s(t),o=s(r),l=s(o),u=s(l,!0);I(l);var d=B(l,2),f=s(d);_(f,1,()=>nt,e=>e.id,(e,t)=>{var r=ZH(),o=s(r);I(r);var l={};n(()=>{a(o,`${p(t),c(()=>p(t).label)??``} (${p(t),c(()=>p(t).id)??``})`),l!==(l=(p(t),c(()=>p(t).id)))&&(r.value=(r.__value=(p(t),c(()=>p(t).id)))??``)}),i(e,r)});var m=B(f),h=s(m,!0);I(m),m.value=m.__value=`custom`,I(d),I(o);var g=B(o,2),y=e=>{var t=QH(),r=s(t),o=s(r);I(r);var l=B(r,2);O(l),I(t),n((e,t)=>{a(o,`${e??``} ID`),A(l,`placeholder`,t)},[()=>c(()=>Y(`customRateProvider`)),()=>c(()=>Y(`customRateProviderCustomPlaceholder`))]),oe(l,()=>p(ct).providerId,e=>S(ct,p(ct).providerId=e)),i(e,t)};v(g,e=>{p(rt)===`custom`&&e(y)});var b=B(g,2),C=s(b),w=s(C,!0);I(C);var T=B(C,2);O(T),I(b);var E=B(b,2),D=s(E),k=s(D,!0);I(D);var j=B(D,2);O(j),I(E);var ee=B(E,2),P=s(ee),F=s(P,!0);I(P);var L=B(P,2);O(L),I(ee);var R=B(ee,2),z=s(R),te=s(z,!0);I(z);var ne=B(z,2);O(ne),I(R);var V=B(R,2),ie=s(V),ae=s(ie,!0);I(ie);var se=B(ie,2);O(se),I(V),I(r);var ce=B(r,2),le=s(ce),ue=s(le,!0);I(le);var de=B(le,2),fe=s(de,!0);I(de),I(ce),I(t),n((e,t,n,r,i,o,s,c,l,d)=>{a(u,e),a(h,t),a(w,n),A(T,`placeholder`,r),a(k,i),a(F,o),a(te,s),a(ae,c),le.disabled=p(lt),a(ue,l),de.disabled=p(lt),a(fe,d)},[()=>c(()=>Y(`customRateProvider`)),()=>c(()=>Y(`customRateProviderOther`)),()=>c(()=>Y(`customRateDomain`)),()=>c(()=>Y(`customRateDomainWildcard`)),()=>c(()=>Y(`customRateModel`)),()=>c(()=>Y(`customRateInput`)),()=>c(()=>Y(`customRateOutput`)),()=>c(()=>Y(`customRateCacheRead`)),()=>(p(lt),c(()=>p(lt)?Y(`customRateUpdating`):Y(`customRateAdd`))),()=>c(()=>Y(`customRateCancel`))]),M(d,()=>p(rt),e=>x(rt,e)),N(`change`,d,qt),oe(T,()=>p(ct).billingDomainId,e=>S(ct,p(ct).billingDomainId=e)),oe(j,()=>p(ct).model,e=>S(ct,p(ct).model=e)),oe(L,()=>p(ct).inputRate,e=>S(ct,p(ct).inputRate=e)),oe(ne,()=>p(ct).outputRate,e=>S(ct,p(ct).outputRate=e)),oe(se,()=>p(ct).cacheReadRate,e=>S(ct,p(ct).cacheReadRate=e)),N(`click`,de,Xt),N(`submit`,t,re(Jt)),i(e,t)};v(d,e=>{p(st)&&e(m)});var h=B(d,2),g=e=>{var t=eU(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`loading`))]),i(e,t)},y=e=>{var t=nU(),r=s(t),o=s(r,!0);I(r);var l=B(r,2),u=e=>{var t=tU(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`customRateAddToggle`))]),N(`click`,t,()=>x(st,!0)),i(e,t)};v(l,e=>{p(st)||e(u)}),I(t),n(e=>a(o,e),[()=>c(()=>Y(`customRateEmpty`))]),i(e,t)},b=e=>{var t=oU();_(t,5,()=>p(it),e=>e.id,(e,t)=>{var r=aU();let o;var l=s(r),d=e=>{var r=rU(),o=s(r),l=s(o),u=s(l,!0);I(l);var d=B(l,2),m=s(d);I(d),I(o);var h=B(o,2),g=s(h),_=s(g),v=s(_,!0);I(_);var y=B(_,2);O(y),I(g);var b=B(g,2),x=s(b),C=s(x,!0);I(x);var w=B(x,2);O(w),I(b);var T=B(b,2),E=s(T),D=s(E,!0);I(E);var k=B(E,2);O(k),I(T);var j=B(T,2),M=s(j),ee=s(M,!0);I(M);var P=B(M,2);O(P),I(j),I(h);var F=B(h,2),L=s(F),R=s(L,!0);I(L);var z=B(L,2),te=s(z,!0);I(z),I(F),I(r),n((e,n,r,i,o,s,l,d)=>{a(u,(p(t),c(()=>p(t).model))),a(m,`${p(t),c(()=>p(t).providerId)??``} · ${e??``}`),a(v,n),A(y,`placeholder`,r),a(C,i),a(D,o),a(ee,s),L.disabled=p(ft),a(R,l),z.disabled=p(ft),a(te,d)},[()=>(f(sH),p(t),c(()=>sH(p(t).billingDomainId,Y(`customRateDomainWildcard`)))),()=>c(()=>Y(`customRateDomain`)),()=>c(()=>Y(`customRateDomainWildcard`)),()=>c(()=>Y(`customRateInput`)),()=>c(()=>Y(`customRateOutput`)),()=>c(()=>Y(`customRateCacheRead`)),()=>(p(ft),c(()=>p(ft)?Y(`customRateUpdating`):Y(`customRateSave`))),()=>c(()=>Y(`customRateCancel`))]),oe(y,()=>p(dt).billingDomainId,e=>S(dt,p(dt).billingDomainId=e)),oe(w,()=>p(dt).inputRate,e=>S(dt,p(dt).inputRate=e)),oe(k,()=>p(dt).outputRate,e=>S(dt,p(dt).outputRate=e)),oe(P,()=>p(dt).cacheReadRate,e=>S(dt,p(dt).cacheReadRate=e)),N(`click`,z,Qt),N(`submit`,r,re(Z)),i(e,r)},m=e=>{var r=iU(),o=u(r),l=s(o),d=s(l),m=s(d,!0);I(d);var h=B(d,2),g=s(h,!0);I(h),I(l);var _=B(l,2),v=s(_);I(_),I(o);var y=B(o,2),b=s(y),x=s(b),S=s(x);I(x);var C=B(x,2),w=s(C,!0);I(C),I(b);var T=B(b,2),E=s(T),D=s(E);I(E);var O=B(E,2),k=s(O,!0);I(O),I(T);var A=B(T,2),j=s(A),M=s(j);I(j);var ee=B(j,2),P=s(ee,!0);I(ee),I(A),I(y);var F=B(y,2),L=s(F),R=s(L);I(L);var z=B(L,2),te=s(z),ne=s(te,!0);I(te);var V=B(te,2),re=s(V,!0);I(V),I(z),I(F),n((e,n,r,i,o,s,l,u,d,f,h)=>{a(m,(p(t),c(()=>p(t).model))),a(g,(p(t),c(()=>p(t).providerId))),a(v,`${p(t),c(()=>p(t).providerId)??``} · ${e??``}`),a(S,`${n??``}:`),a(w,r),a(D,`${i??``}:`),a(k,o),a(M,`${s??``}:`),a(P,l),a(R,`${u??``}
|
|
23
|
+
${d??``}`),a(ne,f),V.disabled=(p(pt),p(t),c(()=>p(pt)===p(t).id)),a(re,h)},[()=>(f(sH),p(t),c(()=>sH(p(t).billingDomainId,Y(`customRateDomainWildcard`)))),()=>c(()=>Y(`customRateInput`)),()=>(f(cH),p(t),c(()=>cH(p(t).ratesPerMillion.input))),()=>c(()=>Y(`customRateOutput`)),()=>(f(cH),p(t),c(()=>cH(p(t).ratesPerMillion.output))),()=>c(()=>Y(`customRateCacheRead`)),()=>(f(cH),p(t),c(()=>cH(p(t).ratesPerMillion.cacheRead))),()=>c(()=>Y(`customRateUpdated`)),()=>(p(t),c(()=>Dn(p(t).updatedAt))),()=>c(()=>Y(`customRateEdit`)),()=>(p(pt),p(t),c(()=>p(pt)===p(t).id?Y(`customRateDeleting`):Y(`customRateDelete`)))]),N(`click`,te,()=>Zt(p(t))),N(`click`,V,()=>$t(p(t).id)),i(e,r)};v(l,e=>{p(ut),p(t),c(()=>p(ut)===p(t).id)?e(d):e(m,-1)}),I(r),n(()=>{o=C(r,1,`custom-rate-card svelte-1uha8ag`,null,o,{"settings-target-active":p(St)===`rate:${p(t).id}`}),A(r,`data-testid`,(p(t),c(()=>`custom-rate-${p(t).id}`)))}),i(e,r)}),I(t),i(e,t)};v(h,e=>{p(ot),p(it),c(()=>p(ot)&&p(it).length===0)?e(g):(p(it),c(()=>p(it).length===0)?e(y,1):e(b,-1))}),I(l),I(t),n(e=>A(t,`aria-label`,e),[()=>c(()=>Y(`customRates`))]),i(e,t)},Ae=e=>{var t=lU(),r=s(t),o=e=>{var t=qH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`monitoringUnavailable`))]),i(e,t)};v(r,e=>{p(Le)&&e(o)});var l=B(r,2),u=e=>{var t=cU(),r=s(t),o=s(r);O(o);var l=B(o);I(r);var u=B(r,2),d=s(u);O(d);var f=B(d);I(u);var m=B(u,2),h=s(m);O(h);var g=B(h);I(m),I(t),n((e,t,n)=>{ne(o,(p(tt),c(()=>p(tt).backgroundCollectionEnabled))),a(l,` ${e??``}`),ne(d,(p(tt),c(()=>p(tt).notificationsEnabled))),a(f,` ${t??``}`),ne(h,(p(tt),c(()=>p(tt).startAtLogin))),a(g,` ${n??``}`)},[()=>c(()=>Y(`backgroundCollection`)),()=>c(()=>Y(`notifications`)),()=>c(()=>Y(`startAtLogin`))]),N(`change`,o,e=>dn({backgroundCollectionEnabled:e.currentTarget.checked})),N(`change`,d,e=>dn({notificationsEnabled:e.currentTarget.checked})),N(`change`,h,e=>dn({startAtLogin:e.currentTarget.checked})),i(e,t)};v(l,e=>{p(tt)&&e(u)}),I(t),n(e=>A(t,`aria-label`,e),[()=>c(()=>Y(`monitoring`))]),i(e,t)},je=t=>{var r=mU(),o=s(r),l=e=>{var t=qH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`diagnosticsUnavailable`))]),i(e,t)};v(o,e=>{p(Re)&&e(l)});var u=B(o,2),d=t=>{var r=pU();_(r,5,()=>(p(mt),f(ge),c(()=>p(mt).connectors.filter(e=>e.id!==`xai-api`&&!ge(e.category)))),e=>e.id,(t,r)=>{var o=fU();let l;var u=s(o),d=s(u),f=s(d,!0);I(d);var m=B(d,2),h=s(m,!0);I(m),I(u);var g=B(u,2),_=s(g,!0);I(g);var y=B(g,2),b=e=>{var t=uU(),o=s(t,!0);I(t),n(e=>a(o,e),[()=>(p(r),c(()=>p(r).affectedCoverage.map(Fn).join(` · `)))]),i(e,t)};v(y,e=>{p(r),c(()=>p(r).affectedCoverage.length>0)&&e(b)});var x=B(y,2),S=e=>{var t=dU(),o=s(t,!0);I(t),n(e=>a(o,e),[()=>(p(r),c(()=>Sn(p(r))))]),i(e,t)},w=e(()=>(p(r),c(()=>Sn(p(r)))));v(x,e=>{p(w)&&e(S)}),I(o),n((e,t)=>{A(o,`data-settings-target`,(p(r),c(()=>`diagnostic:${p(r).id}`))),A(o,`data-testid`,(p(r),c(()=>`settings-diagnostic-${p(r).id}`))),l=C(o,1,`svelte-1uha8ag`,null,l,{"diagnostic-degraded":p(r).status===`degraded`,"settings-target-active":p(St)===`diagnostic:${p(r).id}`}),a(f,(p(r),c(()=>p(r).id))),a(h,e),a(_,t)},[()=>(p(r),c(()=>xn(p(r)))),()=>(p(r),c(()=>p(r).billingDomainId??Y(`unknown`)))]),i(t,o)}),I(r),i(t,r)};v(u,e=>{p(mt)&&e(d)}),I(r),n(e=>A(r,`aria-label`,e),[()=>c(()=>Y(`diagnosticsNav`))]),i(t,r)},Me=e=>{var t=gU(),r=s(t),o=e=>{var t=qH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`retentionUnavailable`))]),i(e,t)},l=e=>{var t=hU(),r=s(t),o=s(r);I(r),I(t),n((e,t,n)=>a(o,`${p(ht),c(()=>p(ht).rawRetentionDays)??``}
|
|
24
|
+
${e??``} · ${p(ht),c(()=>p(ht).rawObservations)??``}
|
|
25
|
+
${t??``} · ${p(ht),c(()=>p(ht).dailyAggregates)??``}
|
|
26
|
+
${n??``}`),[()=>c(()=>Y(`retentionDays`)),()=>c(()=>Y(`rawObservations`)),()=>c(()=>Y(`dailyAggregates`))]),i(e,t)};v(r,e=>{p(ze)?e(o):p(ht)&&e(l,1)});var u=B(r,2),d=e=>{var t=qH(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`privacyActionUnavailable`))]),i(e,t)};v(u,e=>{p(Be)&&e(d)});var f=B(u,2),m=s(f),h=s(m,!0);I(m);var g=B(m,2),_=s(g,!0);I(g);var y=B(g,2),b=s(y);O(b);var S=B(b);I(y);var C=B(y,2),w=s(C);O(w);var T=B(w);I(C);var E=B(C,2),D=s(E,!0);I(E);var k=B(E,2),j=s(k,!0);I(k);var M=B(k,2),ee=s(M,!0);I(M),I(f),I(t),n((e,n,r,i,o,s,c,l)=>{A(t,`aria-label`,e),a(h,n),a(_,r),a(S,` ${i??``}`),a(T,` ${o??``}`),E.disabled=p(yt),a(D,s),a(j,c),M.disabled=p(vt),a(ee,l)},[()=>c(()=>Y(`privacy`)),()=>c(()=>Y(`exportJson`)),()=>c(()=>Y(`exportCsv`)),()=>c(()=>Y(`includeAccountIdentifiers`)),()=>c(()=>Y(`deleteProductSecrets`)),()=>(p(yt),c(()=>p(yt)?Y(`hardRebuilding`):Y(`hardRebuild`))),()=>c(()=>Y(`hardRebuildWarning`)),()=>(p(vt),c(()=>p(vt)?Y(`clearing`):Y(`clearData`)))]),N(`click`,m,()=>ln(`json`)),N(`click`,g,()=>ln(`csv`)),F(b,()=>p(_t),e=>x(_t,e)),F(w,()=>p(gt),e=>x(gt,e)),N(`click`,E,sn),N(`click`,M,un),i(e,t)};v(De,e=>{p(Ct)===`connections`?e(Oe):p(Ct)===`rates`?e(ke,1):p(Ct)===`monitoring`?e(Ae,2):p(Ct)===`diagnostics`?e(je,3):p(Ct)===`privacy`&&e(Me,4)}),I(Ee),I(xe),I(o),E(o,e=>x(Et,e),()=>p(Et)),I(r),n((e,t,n,r,i,o,s,c,u)=>{A(l,`aria-label`,e),a(y,t),a(w,n),a(D,r),ee=C(j,1,`settings-nav-button svelte-1uha8ag`,null,ee,{active:p(Ct)===`connections`}),a(L,i),te=C(R,1,`settings-nav-button svelte-1uha8ag`,null,te,{active:p(Ct)===`rates`}),a(ie,o),le=C(ce,1,`settings-nav-button svelte-1uha8ag`,null,le,{active:p(Ct)===`monitoring`}),a(de,s),pe=C(fe,1,`settings-nav-button svelte-1uha8ag`,null,pe,{active:p(Ct)===`diagnostics`}),a(he,c),ve=C(_e,1,`settings-nav-button svelte-1uha8ag`,null,ve,{active:p(Ct)===`privacy`}),a(be,u)},[()=>c(()=>Y(`closeSettings`)),()=>c(()=>Y(`settings`)),()=>c(()=>Y(`settings`)),()=>c(()=>Y(`settingsSubtitle`)),()=>c(()=>Y(`connections`)),()=>c(()=>Y(`customRatesNav`)),()=>c(()=>Y(`monitoring`)),()=>c(()=>Y(`diagnosticsNav`)),()=>c(()=>Y(`privacy`))]),N(`click`,l,mn),N(`click`,j,()=>pn(`connections`,!1)),N(`click`,R,()=>pn(`rates`,!1)),N(`click`,ce,()=>pn(`monitoring`,!1)),N(`click`,fe,()=>pn(`diagnostics`,!1)),N(`click`,_e,()=>pn(`privacy`,!1)),i(t,r)};v(bt,e=>{p(xt)&&e(W)});var G=B(bt,2),Tt=e=>{let t=h(()=>p(Dt)),r=h(()=>(f(p(t)),c(()=>p(t).retailEquivalent.status===`unavailable`?p(t).reportedEstimate:p(t).retailEquivalent))),o=h(()=>(f(p(t)),c(()=>p(t).priceSnapshots))),l=h(()=>(f(p(t)),c(()=>p(t).composition))),u=h(()=>(f(p(t)),c(()=>Nn(p(t)))));var d=bU(),m=s(d),g=s(m),_=s(g),y=s(_),b=s(y);I(y);var S=B(y,2),C=s(S,!0);I(S);var w=B(S,2),T=e=>{var t=uU(),r=s(t,!0);I(t),n(e=>a(r,e),[()=>c(()=>Y(`separateFromHeadline`))]),i(e,t)};v(w,e=>{f(p(t)),c(()=>p(t).includedInHeadline===!1)&&e(T)}),I(_);var D=B(_,2);I(g);var O=B(g,2),k=s(O),j=s(k),M=s(j),ee=s(M,!0);I(M);var P=B(M,2),F=s(P,!0);I(P),I(j);var L=B(j,2),R=s(L),z=s(R,!0);I(R);var te=B(R,2),ne=s(te,!0);I(te),I(L);var V=B(L,2),re=s(V),ie=s(re,!0);I(re);var ae=B(re,2),oe=s(ae,!0);I(ae),I(V),I(k);var se=B(k,2),ce=e=>{var r=vU(),o=s(r),l=s(o);I(o),I(r),n(e=>a(l,`+ ${e??``}`),[()=>c(()=>Y(`setCustomRateForModel`))]),N(`click`,o,()=>en(p(t).providerId,p(t).billingDomainId,p(t).model)),i(e,r)};v(se,e=>{f(p(r)),c(()=>p(r).status===`unavailable`)&&e(ce)});var le=B(se,2),ue=s(le),de=s(ue,!0);I(ue),EB(B(ue,2),{get compositionTotals(){return p(l)},get unclassifiedTokens(){return f(p(t)),c(()=>p(t).tokenEvidence.unclassifiedTokens)},get trend(){return f(p(t)),c(()=>p(t).trend)},get trendEvidence(){return p(u)},get locale(){return p(_e)},formatNumber:Cn,formatMoney:nr}),I(le);var fe=B(le,2),pe=s(fe),me=s(pe,!0);I(pe);var he=B(pe,2),ge=s(he),ve=s(ge),ye=s(ve,!0);I(ve);var be=B(ve,2),xe=s(be,!0);I(be),I(ge);var Se=B(ge,2),Ce=s(Se),we=s(Ce,!0);I(Ce);var Te=B(Ce,2),Ee=s(Te,!0);I(Te),I(Se);var De=B(Se,2),Oe=s(De),ke=s(Oe,!0);I(Oe);var Ae=B(Oe,2),je=s(Ae,!0);I(Ae),I(De);var Me=B(De,2),Ne=e=>{var t=yU(),r=s(t),l=s(r,!0);I(r);var u=B(r,2),d=s(u,!0);I(u),I(t),n((e,t)=>{a(l,e),a(d,t)},[()=>c(()=>Y(`priceSnapshot`)),()=>(f(p(o)),c(()=>p(o).map(e=>`${e.version} · ${e.source}`).join(` + `)))]),i(e,t)};v(Me,e=>{f(p(o)),c(()=>p(o).length>0)&&e(Ne)}),I(he),I(fe),I(O),I(m),E(m,e=>x($e,e),()=>p($e)),I(d),n((e,n,r,i,o,s,l,u,d,h,g,_,v,y,x,S)=>{A(m,`aria-label`,e),a(b,`${f(p(t)),c(()=>p(t).providerDisplayName)??``} · ${f(p(t)),c(()=>p(t).billingDomainDisplayName)??``}`),a(C,(f(p(t)),c(()=>p(t).model))),A(D,`aria-label`,n),a(ee,r),a(F,i),a(z,o),a(ne,s),a(ie,l),a(oe,u),a(de,d),a(me,h),a(ye,g),a(xe,_),a(we,v),a(Ee,y),a(ke,x),a(je,S)},[()=>(f(p(t)),c(()=>`${Y(`modelDetail`)}: ${p(t).model}`)),()=>c(()=>Y(`closeModelDetail`)),()=>c(()=>Y(`recordedTotal`)),()=>(f(p(t)),c(()=>Cn(p(t).tokenEvidence.recordedTokens))),()=>c(()=>Y(`cost`)),()=>(f(p(r)),c(()=>p(r).status===`unavailable`?Y(`notAvailable`):nr(p(r).amount,p(r).comparisonCurrency))),()=>c(()=>Y(`observations`)),()=>(f(p(t)),c(()=>Cn(p(t).tokenEvidence.observationCount))),()=>c(()=>Y(`activityOverview`)),()=>c(()=>Y(`evidenceSummary`)),()=>c(()=>Y(`scope`)),()=>(f(p(t)),c(()=>p(t).tokenEvidence.usageScopes.map(Mn).join(` + `)||Y(`unknown`))),()=>c(()=>Y(`totalDerivation`)),()=>(f(p(t)),c(()=>p(t).tokenEvidence.totalDerivations.map(Pn).join(` + `)||Y(`unknown`))),()=>c(()=>Y(`latestData`)),()=>(f(p(t)),c(()=>Dn(p(t).lastObservedAt)))]),N(`click`,D,ur),i(e,d)};v(G,e=>{p(Dt)&&e(Tt)}),n((e,t,n,r,i,o,s,c,u)=>{l.inert=p(xt)||p(Dt)!==null,A(y,`alt`,e),a(w,t),A(T,`aria-label`,n),A(k,`aria-selected`,p(Ke)===`agents`),A(k,`tabindex`,p(Ke)===`agents`?0:-1),a(ee,r),A(R,`aria-selected`,p(Ke)===`models`),A(R,`tabindex`,p(Ke)===`models`?0:-1),a(te,i),a(me,o),A(he,`aria-label`,s),a(Se,P()===`system`?`◐`:z()===`dark`?`☾`:`☀`),a(Ce,` ${c??``}`),a(Te,p(_e)===`en`?`中文`:`EN`),ke.disabled=p(je),Fe=C(Pe,1,`svelte-1uha8ag`,null,Fe,{spin:p(je)}),a(He,` ${u??``}`)},[()=>c(()=>Y(`bannerAlt`)),()=>c(()=>Y(`title`)),()=>c(()=>Y(`mainViews`)),()=>c(()=>Y(`agentUsageTab`)),()=>c(()=>Y(`tokenModelCostsTab`)),()=>c(()=>Y(`settings`)),()=>c(()=>Y(`themeToggleAria`)),()=>(P(),c(()=>It(P()))),()=>(p(je),c(()=>p(je)?Y(`refreshing`):Y(`refresh`)))]),N(`click`,k,()=>x(Ke,`agents`)),N(`keydown`,k,_n),N(`click`,R,()=>x(Ke,`models`)),N(`keydown`,R,_n),N(`click`,de,()=>pn()),N(`click`,he,Ft),N(`click`,we,Nt),N(`click`,ke,Bt),i(r,o)}),i(r,dr),ee(),se()}export{SU as component};
|