@blukavantui/charts-community 0.0.0-stage → 1.2.0
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/LICENSE.txt +103 -0
- package/README.md +98 -2
- package/THIRD_PARTY_NOTICES.txt +288 -0
- package/dist/accessibility.d.ts +53 -0
- package/dist/async.d.ts +2 -0
- package/dist/bar.css +1 -0
- package/dist/bar.d.ts +5 -0
- package/dist/bar.js +1 -0
- package/dist/browser/charts-community.css +1 -0
- package/dist/browser/charts-community.js +52 -0
- package/dist/build-audit.json +209 -0
- package/dist/builders/bar.d.ts +6 -0
- package/dist/builders/doughnut.d.ts +6 -0
- package/dist/builders/heatmap.d.ts +16 -0
- package/dist/builders/line.d.ts +6 -0
- package/dist/builders/pie.d.ts +6 -0
- package/dist/builders/radar.d.ts +6 -0
- package/dist/builders/scatter.d.ts +6 -0
- package/dist/catalogue-model.d.ts +11 -0
- package/dist/catalogue-runtime.d.ts +23 -0
- package/dist/catalogue-types.d.ts +167 -0
- package/dist/chart-state.d.ts +18 -0
- package/dist/chunk-2GUWWKHW.js +1 -0
- package/dist/chunk-3PITHTEO.js +1 -0
- package/dist/chunk-4B5MQ6GZ.js +1 -0
- package/dist/chunk-4EQMOBBN.js +1 -0
- package/dist/chunk-4WDZUJDS.js +1 -0
- package/dist/chunk-5NUOOMHV.js +1 -0
- package/dist/chunk-7OCMRHIH.js +1 -0
- package/dist/chunk-CF5Q2DDP.js +1 -0
- package/dist/chunk-EITBQBN2.js +1 -0
- package/dist/chunk-FXNKAHRG.js +1 -0
- package/dist/chunk-IDMAFTWV.js +1 -0
- package/dist/chunk-ILTENI35.js +1 -0
- package/dist/chunk-KRMM7EWI.js +1 -0
- package/dist/chunk-LUUPBBD4.js +1 -0
- package/dist/chunk-MR5VITXX.js +1 -0
- package/dist/chunk-NASBRHIW.js +1 -0
- package/dist/chunk-NXDBBMF5.js +1 -0
- package/dist/chunk-OQ6MP7PY.js +1 -0
- package/dist/chunk-RC2TCMJF.js +1 -0
- package/dist/chunk-RXOGAN23.js +1 -0
- package/dist/chunk-UGXWOWAG.js +2 -0
- package/dist/chunk-UO2KNHTU.js +2 -0
- package/dist/chunk-UQMMBG26.js +3 -0
- package/dist/chunk-VTJ4XPRV.js +1 -0
- package/dist/chunk-WJ3UHH6J.js +1 -0
- package/dist/chunk-XLJUSNGV.js +1 -0
- package/dist/colors.d.ts +15 -0
- package/dist/community.d.ts +11 -0
- package/dist/doughnut.css +1 -0
- package/dist/doughnut.d.ts +5 -0
- package/dist/doughnut.js +1 -0
- package/dist/export.d.ts +5 -0
- package/dist/fonts/dm-sans-LICENSE.txt +93 -0
- package/dist/fonts/dm-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/dm-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/dm-sans-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/dm-sans-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-LICENSE.txt +93 -0
- package/dist/fonts/ibm-plex-mono-latin-100-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-100-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-200-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-200-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-300-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-300-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-400-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-500-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-600-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-700-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-700-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-100-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-100-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-200-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-200-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-300-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-300-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-400-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-500-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-600-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-600-normal.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-700-italic.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/fonts/inter-LICENSE.txt +93 -0
- package/dist/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-LICENSE.txt +93 -0
- package/dist/fonts/jetbrains-mono-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/lora-LICENSE.txt +93 -0
- package/dist/fonts/lora-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/lora-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/lora-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/lora-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/manifest.json +618 -0
- package/dist/fonts/manrope-LICENSE.txt +93 -0
- package/dist/fonts/manrope-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/merriweather-LICENSE.txt +93 -0
- package/dist/fonts/merriweather-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/merriweather-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/merriweather-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/merriweather-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/montserrat-LICENSE.txt +93 -0
- package/dist/fonts/montserrat-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/montserrat-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/montserrat-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/montserrat-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/playfair-display-LICENSE.txt +93 -0
- package/dist/fonts/playfair-display-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/playfair-display-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/playfair-display-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/playfair-display-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/roboto-LICENSE.txt +93 -0
- package/dist/fonts/roboto-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/roboto-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/roboto-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/roboto-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/source-sans-3-LICENSE.txt +93 -0
- package/dist/fonts/source-sans-3-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/source-sans-3-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/source-sans-3-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/source-sans-3-latin-wght-normal.woff2 +0 -0
- package/dist/heatmap.css +1 -0
- package/dist/heatmap.d.ts +3 -0
- package/dist/heatmap.js +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1 -0
- package/dist/legend-export.d.ts +9 -0
- package/dist/legend-model.d.ts +39 -0
- package/dist/legend.d.ts +19 -0
- package/dist/limits.d.ts +16 -0
- package/dist/line.css +1 -0
- package/dist/line.d.ts +5 -0
- package/dist/line.js +1 -0
- package/dist/loading-state.d.ts +6 -0
- package/dist/map-assets.d.ts +4 -0
- package/dist/map-resources.d.ts +24 -0
- package/dist/messages.d.ts +3 -0
- package/dist/model.d.ts +41 -0
- package/dist/motion/bar.css +1 -0
- package/dist/motion/bar.d.ts +8 -0
- package/dist/motion/bar.js +1 -0
- package/dist/motion/doughnut.css +1 -0
- package/dist/motion/doughnut.d.ts +8 -0
- package/dist/motion/doughnut.js +1 -0
- package/dist/motion/heatmap.css +1 -0
- package/dist/motion/heatmap.d.ts +7 -0
- package/dist/motion/heatmap.js +1 -0
- package/dist/motion/line.css +1 -0
- package/dist/motion/line.d.ts +8 -0
- package/dist/motion/line.js +1 -0
- package/dist/motion/pie.css +1 -0
- package/dist/motion/pie.d.ts +8 -0
- package/dist/motion/pie.js +1 -0
- package/dist/motion/radar.css +1 -0
- package/dist/motion/radar.d.ts +8 -0
- package/dist/motion/radar.js +1 -0
- package/dist/motion/scatter.css +1 -0
- package/dist/motion/scatter.d.ts +8 -0
- package/dist/motion/scatter.js +1 -0
- package/dist/motion/sparkline.d.ts +7 -0
- package/dist/motion/sparkline.js +1 -0
- package/dist/motion-collection.d.ts +7 -0
- package/dist/motion-community.d.ts +40 -0
- package/dist/motion-policy.d.ts +14 -0
- package/dist/motion.css +1 -0
- package/dist/motion.d.ts +40 -0
- package/dist/motion.js +1 -0
- package/dist/options.d.ts +11 -0
- package/dist/pie.css +1 -0
- package/dist/pie.d.ts +5 -0
- package/dist/pie.js +1 -0
- package/dist/radar.css +1 -0
- package/dist/radar.d.ts +4 -0
- package/dist/radar.js +1 -0
- package/dist/runtime.d.ts +4 -0
- package/dist/scatter.css +1 -0
- package/dist/scatter.d.ts +5 -0
- package/dist/scatter.js +1 -0
- package/dist/sparkline-runtime/runtime.d.ts +10 -0
- package/dist/sparkline-validation.d.ts +3 -0
- package/dist/sparkline.css +25 -0
- package/dist/sparkline.d.ts +44 -0
- package/dist/sparkline.js +1 -0
- package/dist/state-announcement.d.ts +6 -0
- package/dist/styles.css +496 -0
- package/dist/theme.css +1391 -0
- package/dist/types.d.ts +137 -0
- package/dist/validation.d.ts +8 -0
- package/dist/web-api.json +4305 -0
- package/dist/web-motion-sparkline.d.ts +4 -0
- package/edition.json +48 -0
- package/package.json +103 -4
- package/src/accessibility.ts +81 -0
- package/src/assets.d.ts +1 -0
- package/src/async.ts +12 -0
- package/src/bar.ts +13 -0
- package/src/builders/bar.ts +39 -0
- package/src/builders/doughnut.ts +66 -0
- package/src/builders/heatmap.ts +60 -0
- package/src/builders/line.ts +39 -0
- package/src/builders/pie.ts +66 -0
- package/src/builders/radar.ts +65 -0
- package/src/builders/scatter.ts +34 -0
- package/src/catalogue-model.ts +235 -0
- package/src/catalogue-runtime.ts +244 -0
- package/src/catalogue-types.ts +163 -0
- package/src/chart-state.ts +35 -0
- package/src/charts.css +135 -0
- package/src/colors.ts +277 -0
- package/src/community.ts +11 -0
- package/src/doughnut.ts +12 -0
- package/src/export.ts +50 -0
- package/src/heatmap.ts +11 -0
- package/src/index.ts +11 -0
- package/src/legend-export.ts +36 -0
- package/src/legend-model.ts +76 -0
- package/src/legend.css +64 -0
- package/src/legend.ts +90 -0
- package/src/limits.ts +7 -0
- package/src/line.ts +13 -0
- package/src/loading-state.ts +39 -0
- package/src/map-assets.ts +1 -0
- package/src/map-resources.ts +46 -0
- package/src/messages.ts +5 -0
- package/src/model.ts +32 -0
- package/src/motion/bar.ts +15 -0
- package/src/motion/doughnut.ts +14 -0
- package/src/motion/heatmap.ts +14 -0
- package/src/motion/line.ts +15 -0
- package/src/motion/pie.ts +14 -0
- package/src/motion/radar.ts +15 -0
- package/src/motion/scatter.ts +15 -0
- package/src/motion/sparkline.ts +10 -0
- package/src/motion-collection.ts +20 -0
- package/src/motion-community.ts +22 -0
- package/src/motion-policy.ts +36 -0
- package/src/options.ts +24 -0
- package/src/pie.ts +12 -0
- package/src/radar.ts +12 -0
- package/src/runtime.ts +7 -0
- package/src/scatter.ts +13 -0
- package/src/sparkline-runtime/runtime.d.ts +10 -0
- package/src/sparkline-runtime/runtime.js +263 -0
- package/src/sparkline-validation.ts +19 -0
- package/src/sparkline.css +25 -0
- package/src/sparkline.ts +68 -0
- package/src/state-announcement.ts +17 -0
- package/src/types.ts +104 -0
- package/src/validation.ts +75 -0
- package/src/web-motion-sparkline.ts +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as H,b as ue,c as B,d as j,e as ot,f as it,g as pe,j as Le,k as Ie}from"./chunk-RC2TCMJF.js";import*as Ne from"echarts/core";import{LabelLayout as Ht,LegacyGridContainLabel as Dt}from"echarts/features";import{TooltipComponent as zt,AriaComponent as Gt,GraphicComponent as Ft}from"echarts/components";import{SVGRenderer as Ut}from"echarts/renderers";var lt={Title:"Chart",Description:"",Height:320,ValueFormat:"Number",CurrencyCode:"USD",Locale:"en-US",UseCustomPrecision:!1,DecimalPlaces:2,AccessibleLabel:"",ExtendedClass:"",ResetKey:"",Messages:{},ShowHeader:!0,ShowToolbar:!0,ShowLegend:!0,LegendStyle:"Standard",LegendPosition:"Top",LegendShowValues:!0,LegendShowPercentages:!1,ShowTooltip:!0,ShowLabels:!1,ShowDataTable:!0,ShowPatterns:!1,EnableSelection:!0,EnableAnimation:!0,IsLoading:!1,EmptyMessage:"No data to display",SelectedKey:null,ExportFootnote:"BluKavantUI Charts"};function ee(n,a,e=!1){return n===null?a.Messages?.NoData??"No data":new Intl.NumberFormat(a.Locale||"en-US",{style:a.ValueFormat==="Currency"?"currency":a.ValueFormat==="Percent"?"percent":"decimal",currency:a.CurrencyCode||"USD",notation:e?"compact":"standard",...e?{maximumFractionDigits:1}:a.UseCustomPrecision?{minimumFractionDigits:a.DecimalPlaces??2,maximumFractionDigits:a.DecimalPlaces??2}:a.ValueFormat==="Currency"?{}:{maximumFractionDigits:12}}).format(n)}function st(n,a){return n===null?"No data":a??String(n)}function ct(n,a,e=0){let t=n.Categories[a],i=n.Series[e];return t&&i?{Key:t.Key,CategoryLabel:t.Label,SeriesKey:i.Key,SeriesName:i.Name,Value:i.Values[a]}:null}function dt(n,a){let e=n.Cells[a];return e?{...e,XLabel:n.XCategories.find(t=>t.Key===e.XKey).Label,YLabel:n.YCategories.find(t=>t.Key===e.YKey).Label}:null}function Wt(n){let a=0,e=0;for(let t of n.Cells)t.Value!==null&&(a=Math.min(a,t.Value),e=Math.max(e,t.Value));return a=n.MinValue??a,e=n.MaxValue??e,a>=e&&(n.MaxValue!==void 0?a=e-1:e=a+1),{min:a,max:e}}function c(n,a){if(!n)throw new Error(a)}function he(n,a){B(n,a);let e=new Set;for(let t of n)c(t&&j(t.Key)&&t.Key.length>0&&j(t.Label),`${a} require a non-empty Key and a Label within the text limit.`),c(!e.has(t.Key),`${a} contain a duplicate key: ${t.Key}.`),e.add(t.Key);return e}function ye(n){return n===null||ue(n)}function Ke(n){c(n.Height===void 0||Number.isFinite(n.Height)&&n.Height>=160&&n.Height<=1e3,"Height must be between 160 and 1000 pixels."),c(n.ValueFormat===void 0||["Currency","Number","Percent"].includes(n.ValueFormat),"Invalid ValueFormat.");for(let a of["UseCustomPrecision","ShowHeader","ShowToolbar","ShowLegend","LegendShowValues","LegendShowPercentages","ShowTooltip","ShowLabels","ShowDataTable","ShowPatterns","EnableSelection","EnableAnimation","IsLoading"])c(n[a]===void 0||typeof n[a]=="boolean",`${a} must be a boolean.`);for(let a of["AccessibleLabel","ExtendedClass","ResetKey","Title","Description","EmptyMessage","ExportFootnote","Locale","CurrencyCode"])c(n[a]===void 0||j(n[a]),`${a} must be text within the text limit.`);c(n.LegendStyle===void 0||["Standard","ValueList","Compact","SummaryCards"].includes(n.LegendStyle),"Invalid LegendStyle."),c(n.LegendPosition===void 0||["Top","Left","Right","Bottom"].includes(n.LegendPosition),"Invalid LegendPosition."),c(n.DecimalPlaces===void 0||Number.isInteger(n.DecimalPlaces)&&n.DecimalPlaces>=0&&n.DecimalPlaces<=12,"DecimalPlaces must be an integer from 0 to 12."),c(n.Messages===void 0||!!n.Messages&&typeof n.Messages=="object"&&!Array.isArray(n.Messages)&&Object.keys(n.Messages).length<=100&&Object.values(n.Messages).every(j),"Messages must contain plain text translations."),new Intl.NumberFormat(n.Locale||"en-US",n.ValueFormat==="Currency"?{style:"currency",currency:n.CurrencyCode||"USD"}:{})}function ut(n){Ke(n);let a=he(n.Categories,"Categories");c(n.SelectedKey==null||a.has(n.SelectedKey),"SelectedKey must match a category."),c(n.BarLayout===void 0||["Stacked","Grouped"].includes(n.BarLayout),"Invalid BarLayout."),c(n.SmoothLines===void 0||typeof n.SmoothLines=="boolean","SmoothLines must be a boolean."),B(n.Series,"Series"),c(n.Categories.length*n.Series.length<=H.observations,"Too many chart observations. Aggregate the data first.");let e=new Set;for(let t of n.Series)c(t&&j(t.Key)&&t.Key.length&&!e.has(t.Key),"Each series needs a unique, non-empty Key."),e.add(t.Key),c(j(t.Name)&&["Bar","Line"].includes(t.Type),"Each series needs a Name and a Bar or Line Type."),c(Array.isArray(t.Values)&&t.Values.length===n.Categories.length,`${t.Key}: Values must match the category count.`),c(t.Values.every(ye),`${t.Key}: Values must be finite numbers or null.`),c(t.Color===void 0||pe(t.Color),"Series Color must be a ComponentColor or hex color."),c(t.IsDashed===void 0||typeof t.IsDashed=="boolean","IsDashed must be a boolean.")}function pt(n){Ke(n);let a=he(n.XCategories,"XCategories"),e=he(n.YCategories,"YCategories");B(n.Cells,"Cells"),c(a.size*e.size<=H.observations,"Too many heatmap positions. Aggregate the data first.");let t=new Set,i=new Set;for(let r of n.Cells){c(r&&typeof r.Key=="string"&&r.Key.length&&!t.has(r.Key),"Each cell needs a unique, non-empty Key."),c(a.has(r.XKey)&&e.has(r.YKey),`${r.Key}: XKey and YKey must match category keys.`);let o=JSON.stringify([r.XKey,r.YKey]);c(!i.has(o),"Only one cell may occupy each X/Y position."),c(ye(r.Value),`${r.Key}: Value must be a finite number or null.`),i.add(o),t.add(r.Key)}c(n.SelectedKey==null||t.has(n.SelectedKey),"SelectedKey must match a cell."),c(n.ColorScale===void 0||it(n.ColorScale)||["Automatic","Teal","Diverging"].includes(n.ColorScale),"Invalid ColorScale."),c(n.MinValue===void 0||Number.isFinite(n.MinValue),"MinValue must be finite."),c(n.MaxValue===void 0||Number.isFinite(n.MaxValue),"MaxValue must be finite."),c(n.MinValue===void 0||n.MaxValue===void 0||n.MinValue<n.MaxValue,"MinValue must be less than MaxValue.")}function f(n){return n.replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a])}function He(n){let a=getComputedStyle(n),e=(r,o)=>a.getPropertyValue(r).trim()||o,t=document.documentElement.dataset.bluuiTheme==="dark",i=matchMedia("(forced-colors: active)").matches;if(i){let r=document.createElement("span");r.style.cssText="position:absolute;visibility:hidden;color:Canvas;background-color:CanvasText;forced-color-adjust:none",n.append(r);let o=getComputedStyle(r),p=o.color,d=o.backgroundColor;return r.remove(),{surface:p,text:d,muted:d,border:d,dark:t,forcedColors:i,read:()=>"",palette:Array(8).fill(d)}}return{forcedColors:i,surface:e("--bluui-surface","#fff"),text:e("--bluui-text","#182230"),muted:e("--bluui-text-muted","#667085"),border:e("--bluui-border","#e3e5ed"),dark:t,read:r=>a.getPropertyValue(r),palette:ot(t)}}function ht(n){let a="",e=0;return{update(t){if(t===a)return;let i=!a;if(a=t,window.clearTimeout(e),i){n.textContent=t;return}n.textContent="",e=window.setTimeout(()=>{n.isConnected&&(n.textContent=t)},150)},destroy(){window.clearTimeout(e)}}}import{createSkeleton as De}from"@blukavantui/community/skeleton";import"@blukavantui/community/skeleton.css";function gt(n){let a=document.createElement("div");a.className="blu-chart__skeleton",a.setAttribute("aria-hidden","true");let e=document.createElement("div");e.className="blu-chart__skeleton-key";let t=document.createElement("div"),i=document.createElement("div");e.append(t,i);let r=document.createElement("div");r.className="blu-chart__skeleton-plot",a.append(e,r);let o=document.createElement("span");o.className="blu-chart__state-message",n.replaceChildren(a,o);let p=[De(t,{Shape:"Text",Width:"88px",Height:"12px",IsAnimated:!1}),De(i,{Shape:"Text",Width:"64px",Height:"12px",IsAnimated:!1}),De(r,{Shape:"Rectangle",Width:"100%",Height:"100%",IsAnimated:!1})],d=!1;return{update(l,w,h,_){n.hidden=!l&&!w,n.classList.toggle("blu-chart__state--loading",l),a.hidden=!l,o.textContent=h;let x=l&&_;x!==d&&(d=x,p.forEach(y=>y.update({IsAnimated:x})))},destroy(){p.forEach(l=>l.destroy())}}}import{createChip as Vt}from"@blukavantui/community/chip";import"@blukavantui/community/chip.css";function oe(n,a,e,t={}){return(n.Messages?.[a]??e).replace(/\{(\w+)\}/g,(i,r)=>t[r]??i)}function q(n,a,e="Label"){B(n,a);let t=new Set;for(let i of n)c(i&&j(i.Key)&&i.Key.length&&!t.has(i.Key),`${a} require unique, non-empty keys.`),c(!e||j(i[e]),`${i.Key}: ${e} must be text within the text limit.`),c(i.Color===void 0||pe(i.Color),`${i.Key}: Color must be a shared ComponentColor or hex color.`),t.add(i.Key);return t}var J=ue;function Me(n){return n===null||J(n)&&n>=0}function z(n,a,e){c(n[a]===void 0||e.includes(n[a]),`Invalid ${a}. Choose ${e.join(", ")}.`)}function Ee(n){c(n?.type==="FeatureCollection"&&Array.isArray(n.features)&&n.features.length>0,"GeoJSON must be a non-empty FeatureCollection."),B(n.features,"Map features",H.mapFeatures);let a=0,e=new Set;n.features.forEach(t=>{c(t?.type==="Feature"&&typeof t.properties?.name=="string"&&t.properties.name.length&&!e.has(t.properties.name),"Each map feature needs a unique properties.name region key."),e.add(t.properties.name),c(["Polygon","MultiPolygon"].includes(t.geometry?.type),"Map geometry must be Polygon or MultiPolygon.");let i=t.geometry.type==="Polygon"?[t.geometry.coordinates]:t.geometry.coordinates;c(Array.isArray(i)&&i.length>0,"Map polygons must contain coordinates.");for(let r of i){c(Array.isArray(r)&&r.length>0,"Each polygon needs rings.");for(let o of r)c(Array.isArray(o)&&o.length>=4,"Each polygon ring needs at least four coordinates."),a+=o.length,c(a<=H.mapCoordinates,"Map has too many coordinates. Use a simplified boundary file."),o.forEach(p=>c(Array.isArray(p)&&p.length>=2&&J(p[0])&&J(p[1])&&Math.abs(p[0])<=180&&Math.abs(p[1])<=90,"Map coordinates must be longitude/latitude in degrees.")),c(o[0][0]===o.at(-1)[0]&&o[0][1]===o.at(-1)[1],"Polygon rings must close.")}})}function ze(n){return typeof n=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(n)&&Number.isFinite(Date.parse(n+"T00:00:00Z"))&&new Date(n+"T00:00:00Z").toISOString().slice(0,10)===n}function mt(n,a){Ke(a),"Series"in a&&(B(a.Series,"Series"),B(a.Categories,"Categories"),c(a.Series.length*a.Categories.length<=H.observations,"Too many chart observations. Aggregate the data first."));for(let e of["ShowArea","Nested","Bubble","Drilldown","ShowConversion","Roam"])c(a[e]===void 0||typeof a[e]=="boolean",`${e} must be a boolean.`);if(n==="radar"){let e=a;he(e.Categories,"Categories"),c(e.Categories.length===0||e.Categories.length>=3&&e.Categories.length<=12,"Radar needs 3\u201312 categories, or an empty array for an empty state."),q(e.Series,"Series"),e.Categories.forEach(t=>c(t.Max===void 0||J(t.Max)&&t.Max>0,`${t.Key}: Max must be a positive number.`)),e.Series.forEach(t=>{c(Array.isArray(t.Values)&&t.Values.length===e.Categories.length&&t.Values.every(Me),`${t.Key}: Values must match categories and contain non-negative numbers or null.`),t.Values.forEach((i,r)=>c(i===null||e.Categories[r].Max===void 0||i<=e.Categories[r].Max,`${t.Key}: Value exceeds ${e.Categories[r].Label} Max.`))}),z(e,"GridShape",["Polygon","Circle"]),c(e.SplitNumber===void 0||Number.isInteger(e.SplitNumber)&&e.SplitNumber>=2&&e.SplitNumber<=8,"SplitNumber must be an integer from 2 to 8."),c(e.ShowAxisBounds===void 0||typeof e.ShowAxisBounds=="boolean","ShowAxisBounds must be Boolean.")}else if(["line","bar","polar"].includes(n)){let e=a;he(e.Categories,"Categories"),q(e.Series,"Series"),e.Series.forEach(t=>{c(Array.isArray(t.Values)&&t.Values.length===e.Categories.length&&t.Values.every(ye),`${t.Key}: Values must match categories and contain finite numbers or null.`),e.Stacking==="Percent"&&c(t.Values.every(i=>i===null||i>=0),"Percentage stacks require non-negative values.")}),z(e,"Orientation",["Vertical","Horizontal"]),z(e,"Stacking",["None","Stacked","Percent"]),z(e,"LineStyle",["Straight","Smooth","Step"]),z(e,"PolarType",["Bar","Line"])}else if(["pie","doughnut","nightingale","funnel"].includes(n)){let e=a;if(q(e.Items,"Items"),e.Items.forEach(t=>c(Me(t.Value),`${t.Key}: Value must be non-negative or null.`)),n!=="funnel"){let t=q(e.Rings||[],"Rings");e.Items.forEach(i=>c(!i.RingKey||t.has(i.RingKey),`${i.Key}: RingKey must match a ring.`)),e.Nested&&(c(t.size>0,"Nested charts need Rings."),e.Items.forEach(i=>c(i.RingKey&&t.has(i.RingKey),`${i.Key}: nested items need RingKey.`))),z(e,"Shape",["Full","Half"]),z(e,"LabelPosition",["Outside","Inside"]),z(e,"RoseMode",["Area","Radius"]),c(e.InnerRadius===void 0||J(e.InnerRadius)&&e.InnerRadius>=0&&e.InnerRadius<=75,"InnerRadius must be 0\u201375 percent."),c(e.CenterLabel===void 0||typeof e.CenterLabel=="string","CenterLabel must be text.")}else z(a,"Sort",["Input","Descending","Ascending"])}else if(n==="calendar-heatmap"){let e=a;c(ze(e.RangeStart)&&ze(e.RangeEnd),"RangeStart and RangeEnd must be real dates in YYYY-MM-DD format.");let t=(Date.parse(e.RangeEnd)-Date.parse(e.RangeStart))/864e5;c(t>=0&&t<=365,"Choose a calendar range of 1\u2013366 days."),q(e.Items,"Items");let i=new Set;e.Items.forEach(r=>{c(ze(r.Date),`${r.Key}: Date must be a real YYYY-MM-DD date.`),c(r.Date>=e.RangeStart&&r.Date<=e.RangeEnd,`${r.Key}: Date must be within the calendar range.`),c(!i.has(r.Date),"Use one item per date. Aggregate observations before passing the data."),c(Me(r.Value),`${r.Key}: Value must be non-negative or null.`),i.add(r.Date)}),z(e,"FirstDay",["Monday","Sunday"]),c(e.ColorScale===void 0||e.ColorScale==="Automatic"||pe(e.ColorScale),"Invalid ColorScale.");for(let r of["ShowMonthLabels","ShowDayLabels"])c(e[r]===void 0||typeof e[r]=="boolean",`${r} must be a boolean.`)}else if(n==="scatter"){let e=a;q(e.Points,"Points"),e.Points.forEach(t=>{c(J(t.X)&&J(t.Y),`${t.Key}: X and Y must be finite numbers.`),c(t.Size===void 0||J(t.Size)&&t.Size>=0,`${t.Key}: Size must be non-negative.`),c(t.Group===void 0||typeof t.Group=="string","Group must be text.")});for(let t of["XLabel","YLabel"])c(e[t]===void 0||typeof e[t]=="string",`${t} must be text.`)}else if(n==="treemap"){let e=a,t=q(e.Nodes,"Nodes");e.Nodes.forEach(o=>{c(o.ParentKey===null||typeof o.ParentKey=="string"&&t.has(o.ParentKey),`${o.Key}: ParentKey must be null or match a node.`),c(Me(o.Value),`${o.Key}: Value must be non-negative or null.`)});let i=Te(e.Nodes),r=new Set(e.Nodes.map(o=>o.ParentKey));e.Nodes.forEach(o=>{r.has(o.Key)&&o.Value!==null&&c(i.get(o.Key)!==null&&Math.abs(i.get(o.Key)-o.Value)<1e-6,`${o.Key}: branch Value must equal its leaf total, or use null to calculate it.`)})}else if(n==="sankey"){let e=a,t=q(e.Nodes,"Nodes");q(e.Links,"Links",""),B(e.Nodes,"Flow nodes",H.flowNodes),B(e.Links,"Flow links",H.flowLinks);let i=new Map(e.Nodes.map(l=>[l.Key,[]]));e.Links.forEach(l=>{c(t.has(l.SourceKey)&&t.has(l.TargetKey),`${l.Key}: link endpoints must match node keys.`),c(J(l.Value)&&l.Value>=0,`${l.Key}: Value must be non-negative.`),i.get(l.SourceKey).push(l.TargetKey)});let r=new Map,o=new Map;for(let l of e.Links)r.set(l.TargetKey,(r.get(l.TargetKey)||0)+l.Value),o.set(l.SourceKey,(o.get(l.SourceKey)||0)+l.Value);c([...r.values(),...o.values()].every(ue),"Flow totals exceed the supported numeric range.");let p=new Map(e.Nodes.map(l=>[l.Key,0]));e.Links.forEach(l=>p.set(l.TargetKey,p.get(l.TargetKey)+1));let d=[...p].filter(([,l])=>!l).map(([l])=>l);for(let l=0;l<d.length;l++)for(let w of i.get(d[l])){let h=p.get(w)-1;p.set(w,h),h||d.push(w)}c(d.length===t.size,"Sankey links cannot contain cycles."),z(e,"Orientation",["Horizontal","Vertical"]),z(e,"NodeAlign",["Justify","Left","Right"]),c(e.Links.every(l=>!t.has(l.Key)),"Link keys must be distinct from node keys.")}else{let e=a;q(e.Regions,"Regions"),q(e.Locations,"Locations"),e.Regions.forEach(t=>c(ye(t.Value),`${t.Key}: Value must be finite or null.`)),e.Locations.forEach(t=>{c(J(t.Longitude)&&Math.abs(t.Longitude)<=180&&J(t.Latitude)&&Math.abs(t.Latitude)<=90,`${t.Key}: invalid longitude/latitude.`),c(J(t.Value)&&t.Value>=0,`${t.Key}: Value must be non-negative.`)}),c(e.Locations.every(t=>!e.Regions.some(i=>i.Key===t.Key)),"Location and region keys must be distinct."),z(e,"Map",["World","US","Custom"]),z(e,"MapView",["Mainland","Full"]),c(e.MapURL===void 0||j(e.MapURL)&&!!e.MapURL,"MapURL must be non-empty text."),c(!e.MapURL||!e.GeoJSON,"Supply either MapURL or GeoJSON, not both."),c(!e.MapURL||e.Map==="Custom","MapURL requires Map Custom."),z(e,"MapMode",["Regions","Locations","Combined"]),c(e.ColorScale===void 0||e.ColorScale==="Automatic"||pe(e.ColorScale),"Invalid ColorScale."),e.GeoJSON!==void 0&&Ee(e.GeoJSON),e.Map==="Custom"&&(c(e.GeoJSON||e.MapURL,"Custom maps need GeoJSON or MapURL."),e.GeoJSON&&ge(e,e.GeoJSON))}c(a.SelectedKey==null||Ge(n,a).some(e=>e.Key===a.SelectedKey),"SelectedKey must match an input key.")}function ge(n,a){let e=new Set(a.features.map(t=>t.properties.name));n.Regions.forEach(t=>c(e.has(t.Key),`Region ${t.Key} does not exist in this map. Use its properties.name key.`))}function Te(n){B(n,"Tree nodes",H.treeNodes);let a=new Map,e=new Map;for(let i of n){let r=a.get(i.ParentKey)||[];r.push(i),a.set(i.ParentKey,r)}let t=(a.get(null)||[]).map(i=>({n:i,depth:1}));for(let i=0;i<t.length;i++){let{n:r,depth:o}=t[i];c(o<=H.treeDepth,"Tree exceeds maximum depth.");for(let p of a.get(r.Key)||[])t.push({n:p,depth:o+1});c(t.length<=n.length,"Tree nodes cannot contain cycles.")}c(t.length===n.length,"Tree nodes cannot contain cycles or disconnected parents.");for(let i=t.length-1;i>=0;i--){let r=t[i].n,o=a.get(r.Key)||[],p=o.map(l=>e.get(l.Key)).filter(l=>l!=null),d=o.length?p.length?p.reduce((l,w)=>l+w,0):null:r.Value;c(d===null||ue(d),"Tree total exceeds the supported numeric range."),e.set(r.Key,d)}return e}function Ge(n,a){if(n==="radar"){let t=a;return t.Series.flatMap(i=>t.Categories.map((r,o)=>({Key:i.Key,Label:r.Label,Value:i.Values[o],CategoryKey:r.Key,SeriesKey:i.Key,SeriesName:i.Label})))}if(["line","bar","polar"].includes(n)){let t=a;return t.Series.flatMap(i=>t.Categories.map((r,o)=>({Key:r.Key,Label:r.Label,Value:i.Values[o],SeriesKey:i.Key,SeriesName:i.Label})))}if(["pie","doughnut","nightingale","funnel"].includes(n))return a.Items.map(t=>({Key:t.Key,Label:t.Label,Value:t.Value,RingKey:t.RingKey}));if(n==="calendar-heatmap")return a.Items.map(t=>({...t}));if(n==="scatter")return a.Points.map(t=>({...t,Value:t.Y}));if(n==="treemap"){let t=a,i=Te(t.Nodes);return t.Nodes.map(r=>({Key:r.Key,Label:r.Label,Value:i.get(r.Key),ParentKey:r.ParentKey}))}if(n==="sankey"){let t=a;return[...t.Nodes.map(i=>({Key:i.Key,Label:i.Label,PointType:"Node",Value:Math.max(t.Links.filter(r=>r.SourceKey===i.Key).reduce((r,o)=>r+o.Value,0),t.Links.filter(r=>r.TargetKey===i.Key).reduce((r,o)=>r+o.Value,0))})),...t.Links.map(i=>({Key:i.Key,Label:`${t.Nodes.find(r=>r.Key===i.SourceKey)?.Label} \u2192 ${t.Nodes.find(r=>r.Key===i.TargetKey)?.Label}`,Value:i.Value,SourceKey:i.SourceKey,TargetKey:i.TargetKey,PointType:"Link"}))]}let e=a;return[...e.Regions.map(t=>({...t,PointType:"Region"})),...e.Locations.map(t=>({...t,PointType:"Location"}))]}function bt(n,a,e,t){let i=e.series||[],r=[],o=(h,_,x={})=>oe(a,h,_,x),p=(h,_)=>h?.itemStyle?.color||h?.itemStyle?.areaColor||_?.itemStyle?.color||_?.lineStyle?.color||t.palette[0],d=(h,_,x,y,C,T,g,m,$)=>r.push({id:T,label:C,color:p(h,_),value:ee(g,a),compactValue:ee(g,a,!0),detail:m,percent:$,targets:[{seriesIndex:x,dataIndex:y}]});if(a.Series)a.Series.forEach((h,_)=>{let x=i[_],y=h.Values.flatMap((g,m)=>g===null?[]:[{v:g,i:m}]),C=y.at(-1),T=n==="radar";r.push({id:h.Key,label:h.Label||h.Name,color:x?.lineStyle?.color||p(null,x),line:x?.type==="line"||T,symbol:x?.symbol,dash:x?.lineStyle?.type,value:T?`${y.length} / ${a.Categories.length}`:ee(C?.v??null,a),compactValue:T?void 0:ee(C?.v??null,a,!0),detail:T?o("MeasuresReported","Measures reported"):C?o("Latest","Latest \xB7 {label}",{label:a.Categories[C.i].Label}):o("LatestValue","Latest value"),targets:[{seriesIndex:_}]})});else if(["pie","doughnut","nightingale","funnel"].includes(n))i.forEach((h,_)=>{let x=h.data.reduce((C,T)=>C+(T.value??0),0),y=a.Nested?a.Rings?.[_]?.Label:void 0;h.data.forEach((C,T)=>d(C,h,_,T,C.name,C.point.Key,C.value,y,n!=="funnel"&&C.value!==null&&x>0?C.value/x:void 0))});else if(n==="scatter")i.forEach((h,_)=>r.push({id:h.name,label:h.name,color:p(null,h),symbol:h.symbol,value:String(h.data.length),detail:o("Observations","Observations"),targets:[{seriesIndex:_}]}));else if(n==="treemap"){let h=Te(a.Nodes),_=a.Nodes.filter(g=>g.ParentKey===null),x=_.reduce((g,m)=>g+(h.get(m.Key)??0),0),y=new Map,C=1,T=g=>g.forEach(m=>{y.set(m.id,C++),T(m.children||[])});T(i[0].data),_.forEach((g,m)=>{let $=h.get(g.Key);d(i[0].data[m],i[0],0,y.get(g.Key),g.Label,g.Key,$,o("TopLevelGroup","Top-level group"),x>0&&$!==null?$/x:void 0)})}else n==="sankey"&&a.Nodes.forEach((h,_)=>{let x=a.Links.filter(C=>C.TargetKey===h.Key).reduce((C,T)=>C+T.Value,0),y=a.Links.filter(C=>C.SourceKey===h.Key).reduce((C,T)=>C+T.Value,0);d(i[0].data[_],i[0],0,_,h.Label,h.Key,Math.max(x,y),o("NodeThroughput","Node throughput"))});let l=Array.isArray(e.visualMap)?e.visualMap[0]:e.visualMap,w=l?{label:n==="geo-map"?o("RegionValue","Region value"):n==="calendar-heatmap"?o("DailyValue","Daily value"):o("CellValue","Cell value"),min:l.min,max:l.max,colors:[...l.inRange.color]}:void 0;return n==="geo-map"?i.forEach((h,_)=>h.data.forEach((x,y)=>{(h.type==="scatter"||a.Regions.find(C=>C.Key===x.point.Key)?.Color)&&d(x,h,_,y,x.point.Label,x.point.Key,x.point.Value,h.type==="scatter"?o("LocationValue","Location \xB7 size = value"):o("CustomRegionColor","Custom region color"))})):n==="calendar-heatmap"&&i[0]?.data.forEach((h,_)=>{a.Items.find(x=>x.Key===h.point.Key)?.Color&&d(h,i[0],0,_,h.point.Label,h.point.Key,h.point.Value,o("CustomDayColor","Custom day color"))}),{entries:r,scale:w,note:n==="scatter"&&a.Bubble?o("BubbleSize","Bubble size represents Size."):void 0}}function Fe(n,a){return{value:a.LegendShowValues===!1?"":n.compactValue||n.value||"",detail:a.LegendShowValues===!1?"":n.detail||"",percent:a.LegendShowPercentages&&n.percent!==void 0?new Intl.NumberFormat(a.Locale||"en-US",{style:"percent",maximumFractionDigits:1}).format(n.percent):""}}function yt(n){let a=f(n.color),e=n.symbol||"rect",t=e.startsWith("empty"),i=e.replace(/^empty/,"").toLowerCase(),r=t?"none":a,o=n.dash==="dashed"?"5 3":n.dash==="dotted"?"2 3":"",p=i.includes("diamond")?'<path d="M14 2 20 8 14 14 8 8Z"':i.includes("triangle")||i==="arrow"?'<path d="M14 2 20 13 8 13Z"':i.includes("circle")||i==="pin"?'<circle cx="14" cy="8" r="4"':'<rect x="9" y="3" width="10" height="10" rx="2"';return`<svg viewBox="${n.line?"0 0 28 16":"6 0 16 16"}" width="${n.line?28:16}" height="16" aria-hidden="true">${n.line?`<path d="M1 8H27" fill="none" stroke="${a}" stroke-width="2" stroke-dasharray="${o}"/>`:""}${p} fill="${r}" stroke="${a}" stroke-width="1.5"/></svg>`}function ft(n,a,e){let t=n.querySelector(".blu-chart__stage"),i=document.createElement("div");i.className="blu-chart__body",t.before(i),i.append(t);let r=document.createElement("div");r.className="blu-chart__legend",r.setAttribute("role","group"),r.setAttribute("aria-label","Chart legend"),i.append(r);let o=null,p={entries:[]},d={},l="",w=[],h=n.querySelector(".blu-chart__status");function _(g){let m=Fe(g,d);return`<span class="blu-chart__legend-heading"><span class="blu-chart__legend-marker">${yt(g)}</span><span class="blu-chart__legend-text blu-chart__legend-label">${f(g.label)}</span><span class="blu-chart__legend-text blu-chart__legend-check" aria-hidden="true">\u2713</span></span>${m.value||m.percent?`<span class="blu-chart__legend-numbers">${m.value?`<span class="blu-chart__legend-text blu-chart__legend-value">${f(m.value)}</span>`:""}${m.percent?`<span class="blu-chart__legend-text blu-chart__legend-percent">${f(m.percent)}</span>`:""}</span>`:""}${m.detail?`<span class="blu-chart__legend-text blu-chart__legend-detail">${f(m.detail)}</span>`:""}${d.LegendStyle==="ValueList"?`<span class="blu-chart__legend-track" aria-hidden="true"><span style="width:${g.percent===void 0?100:Math.max(0,Math.min(100,g.percent*100))}%;background:${f(g.color)}"></span></span>`:""}`}function x(g,m){let $=Fe(m,d);g.dataset.legendKey=m.id,g.setAttribute("aria-label",`${oe(d,"Highlight","Highlight {label}",{label:m.label})}${$.detail?" \xB7 "+$.detail:""}${$.value?": "+m.value:""}${$.percent?" \xB7 "+$.percent:""}`),g.innerHTML=_(m)}function y(){a.dispatchAction({type:"downplay"}),p.entries.find(m=>m.id===o)?.targets.forEach(m=>a.dispatchAction({type:"highlight",...m})),w.forEach(m=>{m.instance.update({IsSelected:m.entry.id===o}),x(m.host.querySelector("button"),m.entry)}),r.querySelectorAll("[data-legend-key]").forEach(m=>m.setAttribute("aria-pressed",String(m.dataset.legendKey===o)))}function C(g){o=o===g?null:g,y(),h.textContent=o?oe(d,"Highlighting","Highlighting {label}. Activate again to clear.",{label:p.entries.find(m=>m.id===o).label}):oe(d,"HighlightCleared","Legend highlight cleared.")}function T(){w.splice(0).forEach(g=>g.instance.destroy())}return{prepare(g,m){d=g,r.setAttribute("aria-label",oe(g,"Legend","Chart legend"));let $=g.LegendPosition||"Top",W=n.clientWidth<520&&["Left","Right"].includes($)?"Bottom":$;i.dataset.legendPosition=W,r.hidden=g.ShowLegend===!1||m,i.classList.toggle("blu-chart__body--no-legend",r.hidden),r.dataset.style=g.LegendStyle||"Standard",r.hidden&&(o=null)},render(g,m,$){p=bt(e,g,m,$),p.entries.some(D=>D.id===o)||(o=null),!p.entries.length&&!p.scale&&(r.hidden=!0,i.classList.add("blu-chart__body--no-legend"));let W=Math.max(1,Math.min(4,Math.floor((r.clientWidth-30)/150))),R=Math.ceil(p.entries.length/Math.ceil(p.entries.length/W))||1;r.style.setProperty("--legend-columns",String(R));let F=JSON.stringify([p,g.LegendStyle,g.LegendShowValues,g.LegendShowPercentages,g.Messages,$.surface,$.text]);if(F!==l){let D=r.contains(document.activeElement)?document.activeElement.dataset.legendKey:void 0;l=F,T(),r.innerHTML=`${p.scale?`<div class="blu-chart__legend-scale"><span class="blu-chart__legend-text blu-chart__legend-scale-title">${f(p.scale.label)}</span><div class="blu-chart__legend-gradient" style="background:linear-gradient(90deg,${p.scale.colors.map(f).join(",")})" aria-hidden="true"></div><div class="blu-chart__legend-range"><span class="blu-chart__legend-text">${f(ee(p.scale.min,g))}</span><span class="blu-chart__legend-text">${f(ee(p.scale.max,g))}</span></div></div>`:""}<div class="blu-chart__legend-items"></div>${p.note?`<span class="blu-chart__legend-text blu-chart__legend-note">${f(p.note)}</span>`:""}`;let k=r.querySelector(".blu-chart__legend-items");p.entries.forEach(V=>{if(g.LegendStyle==="Compact"){let P=document.createElement("div");P.className="blu-chart__legend-chip-host",k.append(P);let Z=Vt(P,{Label:V.label,Color:"Secondary",IsSelectable:!0,IsSelected:V.id===o,ExtendedClass:"blu-chart__legend-chip"},{SelectionChanged:()=>C(V.id)});w.push({entry:V,host:P,instance:Z})}else{let P=document.createElement("button");P.type="button",P.className="blu-chart__legend-entry",x(P,V),P.onclick=()=>C(V.id),k.append(P)}}),y(),D&&[...r.querySelectorAll("[data-legend-key]")].find(V=>V.dataset.legendKey===D)?.focus({preventScroll:!0})}else y()},exportLayout(){return{body:i,stage:t,legend:r,model:p}},reset(){o=null},destroy(){T(),r.replaceChildren()}}}function xt(n){let{body:a,legend:e,model:t}=n;if(e.hidden)return"";let i=a.getBoundingClientRect(),r=[],o=d=>{let l=d.getBoundingClientRect();return{x:l.x-i.x,y:l.y-i.y,w:l.width,h:l.height}};for(let d of e.querySelectorAll(".blu-chart__legend-entry,.blu-chart__legend-chip,.blu-chart__legend-scale")){let l=o(d),w=getComputedStyle(d);r.push(`<rect x="${l.x}" y="${l.y}" width="${l.w}" height="${l.h}" rx="${Math.min(parseFloat(w.borderRadius)||0,l.w/2,l.h/2)}" fill="${f(w.backgroundColor)}" stroke="${parseFloat(w.borderWidth)>0?f(w.borderColor):"none"}" stroke-width="${parseFloat(w.borderWidth)||0}"/>`)}for(let d of e.querySelectorAll(".blu-chart__legend-marker svg")){let l=o(d);r.push(`<svg x="${l.x}" y="${l.y}" width="${l.w}" height="${l.h}" viewBox="${f(d.getAttribute("viewBox")||"0 0 28 16")}">${d.innerHTML}</svg>`)}let p=e.querySelector(".blu-chart__legend-gradient");if(p&&t.scale){let d=o(p);r.push(`<defs><linearGradient id="blu-export-legend-scale">${t.scale.colors.map((l,w)=>`<stop offset="${w/(t.scale.colors.length-1)*100}%" stop-color="${f(l)}"/>`).join("")}</linearGradient></defs><rect x="${d.x}" y="${d.y}" width="${d.w}" height="${d.h}" rx="4" fill="url(#blu-export-legend-scale)"/>`)}for(let d of e.querySelectorAll(".blu-chart__legend-track,.blu-chart__legend-track>span")){let l=o(d);l.w&&l.h&&r.push(`<rect x="${l.x}" y="${l.y}" width="${l.w}" height="${l.h}" rx="2" fill="${f(getComputedStyle(d).backgroundColor)}"/>`)}for(let d of e.querySelectorAll(".blu-chart__legend-text")){let l=d.firstChild;if(!l||l.nodeType!==Node.TEXT_NODE)continue;let w=getComputedStyle(d);if(!d.getClientRects().length||w.visibility==="hidden")continue;let h=parseFloat(w.fontSize),_=document.createRange(),x=[];for(let y=0;y<l.textContent.length;y++){_.setStart(l,y),_.setEnd(l,y+1);let C=_.getBoundingClientRect(),T=x.at(-1);T&&Math.abs(T.y-C.y)<1?T.text+=l.textContent[y]:x.push({x:C.x,y:C.y,text:l.textContent[y]})}for(let y of x)r.push(`<text x="${y.x-i.x}" y="${y.y-i.y+h*.86}" font-size="${h}" font-weight="${w.fontWeight}" fill="${f(w.color)}"${w.textDecorationLine.includes("underline")?' text-decoration="underline"':""}>${f(y.text)}</text>`)}return r.join("")}async function fe(n,a,e,t){a?.aborted&&(n.catch(()=>{}),a.throwIfAborted());let i,r=()=>{};try{return await Promise.race([n,new Promise((o,p)=>{r=()=>p(a?.reason??new DOMException("Operation aborted.","AbortError")),a?.addEventListener("abort",r,{once:!0}),i=setTimeout(()=>p(new Error(t)),e)})])}finally{clearTimeout(i),a?.removeEventListener("abort",r)}}function kt(n,a){let e=URL.createObjectURL(n),t=document.createElement("a");t.href=e,t.download=a,document.body.append(t),t.click(),t.remove(),setTimeout(()=>URL.revokeObjectURL(e),1e3)}function _t(n,a){let e=[];for(let t of n.split(/\s+/))!e.length||e[e.length-1].length+t.length>a?e.push(t):e[e.length-1]+=` ${t}`;return e.slice(0,4)}async function Ct(n,a,e,t,i,r,o,p,d){d?.throwIfAborted();let l=p?.body.clientWidth||n.getWidth(),w=p?.body.getBoundingClientRect().height||n.getHeight(),h=p?.body.getBoundingClientRect(),_=p?.stage.getBoundingClientRect(),x=h&&_?_.x-h.x:0,y=h&&_?_.y-h.y:0;if(l<=0||n.getHeight()<=0)throw new Error("Show the chart before downloading it.");let C=_t(a.Title||"Chart",Math.max(16,Math.floor((l-32)/10))),T=_t(a.Description||"",Math.max(24,Math.floor((l-32)/6))),g=C.length*22+T.length*15+24,m=w+g+32,$=C.map((D,k)=>`<text x="16" y="${26+k*22}" font-size="17" font-weight="600" fill="${r}">${f(D)}</text>`).join(""),W=T.map((D,k)=>`<text x="16" y="${28+C.length*22+k*15}" font-size="11" fill="${o}">${f(D)}</text>`).join(""),R=`<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${m}" viewBox="0 0 ${l} ${m}" role="img" aria-labelledby="chart-title chart-description"><title id="chart-title">${f(a.Title||"Chart")}</title><desc id="chart-description">${f(a.Description||"Chart visualization. Exact values are available in the source chart data table.")}</desc><rect width="100%" height="100%" fill="${i}"/><g font-family="Inter,system-ui,sans-serif">${$}${W}<g transform="translate(0 ${g})"><g transform="translate(${x} ${y})">${n.renderToSVGString()}</g>${p?xt(p):""}</g><text x="16" y="${m-12}" fill="${o}" font-size="9">${f(a.ExportFootnote||"BluKavantUI")}</text></g></svg>`,F=new Blob([R],{type:"image/svg+xml"});if(e==="png"){if(l*2>16384||m*2>16384||l*m*4>32e6)throw new Error("This chart is too large for PNG. Use SVG or reduce the displayed data.");let D=URL.createObjectURL(F);try{let k=new Image;k.src=D,await fe(k.decode(),d,15e3,"PNG decoding timed out. Try SVG."),d?.throwIfAborted();let V=document.createElement("canvas");V.width=Math.ceil(l*2),V.height=Math.ceil(m*2);let P=V.getContext("2d");if(!P)throw new Error("PNG export is unavailable. Try SVG.");P.drawImage(k,0,0,V.width,V.height),F=await fe(new Promise((Z,_e)=>V.toBlob(Y=>Y?Z(Y):_e(new Error("PNG export failed. Try SVG.")),"image/png")),d,15e3,"PNG encoding timed out. Try SVG.")}finally{URL.revokeObjectURL(D)}}d?.throwIfAborted(),kt(F,t)}function Oe(n,a){n==="mixed"?ut(a):n==="heatmap"?pt(a):mt(n,a)}function $e(n,a){if(n==="mixed"){let e=a;return e.Series.flatMap((t,i)=>e.Categories.map((r,o)=>({...ct(e,o,i),Label:r.Label,CategoryKey:r.Key})))}return n==="heatmap"?a.Cells.map((e,t)=>{let i=dt(a,t);return{...i,Label:`${i.YLabel}, ${i.XLabel}`}}):Ge(n,a)}function Re(n,a){return JSON.stringify([n,a.Key,a.SeriesKey||"",a.CategoryKey||"",a.RingKey||"",a.PointType||""])}function St(n,a,e){let t={...a,...structuredClone(e)};Oe(n,{...t,SelectedKey:null});let r=t.SelectedKey!=null&&!$e(n,t).some(o=>o.Key===t.SelectedKey)&&(!Object.hasOwn(e,"SelectedKey")||e.SelectedKey===a.SelectedKey);return r&&(t.SelectedKey=null),Oe(n,t),{next:t,cleared:r}}function wt(n,a){let e=[];return(n?.series||[]).forEach((t,i)=>{if(t.type==="treemap"){let r=1,o=p=>p.forEach(d=>{let l=r++;d.id===a&&e.push({seriesIndex:i,dataIndex:l}),o(d.children||[])});o(t.data||[])}else(t.data||[]).forEach((r,o)=>{r?.point?.Key===a&&e.push({seriesIndex:i,dataIndex:o,...t.type==="sankey"?{dataType:"node"}:{}})});(t.links||[]).forEach((r,o)=>{r?.point?.Key===a&&e.push({seriesIndex:i,dataIndex:o,dataType:"edge"})})}),e}function vt(n,a,e){return n.Messages?.[a]??e}import{registerMap as Pt}from"echarts/core";var Ue={World:new URL("./maps/world.geojson",import.meta.url).href,US:new URL("./maps/us-states.geojson",import.meta.url).href};async function Lt(n,a){let e=new AbortController,t=()=>e.abort(a?.reason);a?.addEventListener("abort",t,{once:!0}),a?.aborted&&t();try{return await fe((async()=>{let i=new URL(n,typeof location>"u"?"http://localhost/":location.href);if(!["http:","https:"].includes(i.protocol)||i.username||i.password)throw new Error("Map URL must be an HTTP resource without embedded credentials.");let r=await fetch(i.href,{signal:e.signal,credentials:"same-origin"});if(!r.ok)throw new Error(`Map resource failed (${r.status}).`);if(Number(r.headers.get("Content-Length"))>H.mapBytes)throw new Error("Map resource exceeds the size limit.");let o="";if(r.body){let d=r.body.getReader(),l=new TextDecoder,w=0;try{for(;;){let h=await d.read();if(h.done)break;if(w+=h.value.length,w>H.mapBytes)throw new Error("Map resource exceeds the size limit.");o+=l.decode(h.value,{stream:!0})}o+=l.decode()}finally{await d.cancel().catch(()=>{})}}else if(o=await r.text(),new TextEncoder().encode(o).length>H.mapBytes)throw new Error("Map resource exceeds the size limit.");e.signal.throwIfAborted();let p=JSON.parse(o);return Ee(p),p})(),e.signal,1e4,"Map resource timed out. Retry the update.")}finally{e.abort(),a?.removeEventListener("abort",t)}}function It(n=Pt,a=16){let e=[];return{acquire(t){let i=JSON.stringify(t);if(new TextEncoder().encode(i).length>H.mapBytes)throw new Error("Map resource exceeds the size limit.");let r=e.find(d=>d.refs>0&&d.signature===i);if(!r){if(r=e.find(d=>!d.refs),!r){if(e.length>=a)throw new Error("Too many different maps are active.");r={name:`blu-charts-map-v1-${e.length}`,signature:"",refs:0},e.push(r)}n(r.name,t),r.signature=i}r.refs++;let o=!1,p=r;return{name:r.name,release(){o||(o=!0,--p.refs||(p.signature="",n(p.name,{type:"FeatureCollection",features:[]})))}}},stats(){return{slots:e.length,active:e.filter(t=>t.refs>0).length}}}}var Be=It();async function Kt(n,a){let e=n.Map==="Custom"?n.GeoJSON??await Lt(n.MapURL,a):await Lt(n.Map==="US"?Ue.US:Ue.World,a);return a.throwIfAborted(),Ee(e),ge(n,e),e}function mn(n,a,e,t,i){return Bt(n,a,e,t,i)}function Bt(n,a,e,t,i,r){let o={...lt,...structuredClone(e)},p=o,d=(s,...u)=>{if(!l)try{s?.(...u)}catch(b){console.error("Chart event handler failed.",b)}},l=!1,w=!1,h=0,_=0,x=0,y=!1,C=!1,T="",g="",m=()=>{},$,W;try{Oe(a,o)}catch(s){throw d(t.Error,{Message:String(s.message),Code:"InvalidData"}),s}let R,F,D,k,V,P="",Z,_e=new AbortController,Y,Ae="treemapRootToNode",G=document.createElement("section");G.className="blu-chart",G.innerHTML='<div class="blu-chart__heading"><div><h3></h3><p></p></div><div class="blu-chart__export"><select aria-label="Chart download format"><option value="png">PNG image</option><option value="svg">SVG vector</option></select><button type="button" aria-label="Download chart">\u2193 <span>Download</span></button></div></div><div class="blu-chart__stage"><div class="blu-chart__plot" role="img"></div><div class="blu-chart__state" aria-hidden="true" hidden></div></div><p class="blu-chart__missing-note" hidden></p><div class="blu-chart__navigation" role="group" aria-label="Chart navigation" hidden></div><details class="blu-chart__data"><summary>View data & keyboard selections</summary><label class="blu-chart__patterns"><input type="checkbox"><span>Use fill patterns</span></label><div class="blu-chart__table" tabindex="0" role="region"></div></details><div class="blu-chart__state-announcement" role="status" aria-live="polite" aria-atomic="true"></div><div class="blu-chart__status" role="status" aria-live="polite"></div>',n.append(G);let A=s=>G.querySelector(s),U=A(".blu-chart__plot"),te=A(".blu-chart__table"),ie=A(".blu-chart__status"),Q=A(".blu-chart__navigation"),je=gt(A(".blu-chart__state")),qe=ht(A(".blu-chart__state-announcement")),le=A(".blu-chart__export button"),Ce=A(".blu-chart__patterns input"),se=matchMedia("(prefers-reduced-motion: reduce)"),Ve=matchMedia("(forced-colors: active)"),Ye=matchMedia("(prefers-color-scheme: dark)"),ae=()=>$e(a,o),Se=()=>ae().some(s=>s.Value!==null),N=(s,u)=>vt(o,s,u);function we(){if(l)throw new Error("This chart has been destroyed.")}function me(s,u="InvalidData",b=""){l||(ie.textContent=s instanceof Error?s.message:String(s),d(t.Error,{Message:ie.textContent,Code:u,RequestId:b}),Xe("Error"))}function Xe(s){s!==T&&(T=s,d(t.StateChange,{State:s,Revision:h}))}function Tt(s){if(R?.dispatchAction({type:"downplay"}),!(!s||y||o.IsLoading)){if(a==="mixed"){let u=o,b=u.Categories.findIndex(S=>S.Key===s);b>=0&&u.Series.forEach((S,E)=>R?.dispatchAction({type:"highlight",seriesIndex:E,dataIndex:b}));return}if(a==="heatmap"){let u=o.Cells.findIndex(b=>b.Key===s);u>=0&&R?.dispatchAction({type:"highlight",seriesIndex:0,dataIndex:u});return}for(let u of wt(D,s))R?.dispatchAction({type:"highlight",...u})}}function Ot(){if(!(R||U.clientWidth<=0||U.clientHeight<=0)){Ne.use([Ht,Dt,zt,Gt,Ft,Ut]),R=Ne.init(U,void 0,{renderer:"svg"}),F=ft(G,R,a),R.on("click","series",s=>{let u=s.data?.point;if(a==="mixed"){let b=o;u=ae().find(S=>S.Key===b.Categories[s.dataIndex]?.Key&&S.SeriesKey===b.Series[s.seriesIndex]?.Key)}a==="heatmap"&&(u=ae()[s.dataIndex]),u&&Ze(u,"Chart")});for(let[s,u]of[["treemaproottonode","treemapRootToNode"],["treemapzoomtonode","treemapZoomToNode"]])R.on(s,b=>{Y=b.targetNodeId||b.targetNode?.getId?.(),Ae=u})}}function be(s){return s.Value===null?N("NoData","No data"):st(s.Value,o.__valueText?.[Re(a,s)])}function We(s){cancelAnimationFrame(x),x=requestAnimationFrame(()=>{if(l||!G.isConnected)return;let u=document.activeElement;if(u!==document.body&&u!==te&&u?.dataset.point!==s)return;([...te.querySelectorAll("[data-point]")].find(S=>S.dataset.point===s)||te).focus({preventScroll:!0})})}function $t(){let s=ae(),u=document.activeElement,b=u&&te.contains(u)?u.dataset.point:void 0,S=(O,v)=>o.EnableSelection&&O.Value!==null?`<button type="button" data-point="${f(Re(a,O))}" aria-label="${f(`${O.Label}${O.SeriesName?", "+O.SeriesName:""}: ${be(O)}`)}" aria-pressed="${o.SelectedKey===O.Key}">${f(v)}</button>`:f(v),E="",K="";if(a==="mixed"){let O=o,v=new Map(s.map(L=>[JSON.stringify([L.Key,L.SeriesKey]),L]));E=`<tr><th scope="col">${f(N("Category","Category"))}</th>${O.Series.map(L=>`<th scope="col">${f(L.Name)}</th>`).join("")}</tr>`,K=O.Categories.map(L=>`<tr><th scope="row">${f(L.Label)}</th>${O.Series.map(M=>{let I=v.get(JSON.stringify([L.Key,M.Key]));return`<td>${S(I,be(I))}</td>`}).join("")}</tr>`).join("")}else if(a==="heatmap"){let O=o,v=new Map(s.map(L=>[JSON.stringify([L.XKey,L.YKey]),L]));E=`<tr><th scope="col">${f(N("Category","Category"))}</th>${O.XCategories.map(L=>`<th scope="col">${f(L.Label)}</th>`).join("")}</tr>`,K=O.YCategories.map(L=>`<tr><th scope="row">${f(L.Label)}</th>${O.XCategories.map(M=>{let I=v.get(JSON.stringify([M.Key,L.Key]));return`<td>${I?S(I,be(I)):f(N("NoData","No data"))}</td>`}).join("")}</tr>`).join("")}else{let O=["Key","Label","Date","Value","CategoryKey","SeriesKey","RingKey","ParentKey","X","Y","Size","Group","SourceKey","TargetKey","Longitude","Latitude","PointType"].filter(v=>s.some(L=>L[v]!==void 0));E=`<tr>${O.map(v=>`<th scope="col">${f(N(v,v))}</th>`).join("")}</tr>`,K=s.map(v=>`<tr>${O.map(L=>{let M=v[L],I=L==="Value"?be(v):M===null?"null":String(M??"");return`<td>${L==="Label"?S(v,I):f(I)}</td>`}).join("")}</tr>`).join("")}te.setAttribute("aria-label",`${o.Title} ${N("Values","values")}`),te.innerHTML=`<table><caption>${f(o.Title||"Chart")} \u2014 ${f(N("ExactValues","original values"))}</caption><thead>${E}</thead><tbody>${K}</tbody></table>`,b&&We(b)}function ne(s=!1){if($&&(r?.enabled?.()===!1||!o.EnableAnimation||r?.mode(n)!==W)&&($.cancel(),$=void 0),l)return;let u=y||!!o.IsLoading,b=!Se(),S=!!g&&!u;if(G.className=`blu-chart ${o.ExtendedClass||""}`,G.setAttribute("aria-label",o.AccessibleLabel||o.Title||"Chart"),A("h3").textContent=o.Title||"Chart",A(".blu-chart__heading p").textContent=o.Description||"",A(".blu-chart__heading").hidden=!o.ShowHeader&&!o.ShowToolbar,A("h3").parentElement.hidden=!o.ShowHeader,A(".blu-chart__export").hidden=!o.ShowToolbar,le.querySelector("span").textContent=N("Download","Download"),le.setAttribute("aria-label",N("DownloadChart","Download chart")),A("select").setAttribute("aria-label",N("DownloadFormat","Chart download format")),A('option[value="png"]').textContent=N("PNG","PNG image"),A('option[value="svg"]').textContent=N("SVG","SVG vector"),Q.setAttribute("aria-label",N("Navigation","Chart navigation")),A(".blu-chart__patterns").hidden=!["mixed","line","radar","bar","polar","pie","doughnut","nightingale","treemap","sankey","funnel"].includes(a),A(".blu-chart__patterns span").textContent=N("Patterns",a==="line"||a==="radar"?"Use fill patterns (with Area fill)":"Use fill patterns"),Ce.checked=!!o.ShowPatterns,A(".blu-chart__data").hidden=u||b,A(".blu-chart__data").classList.toggle("blu-chart__data--compact",!o.ShowDataTable),A(".blu-chart__data summary").textContent=o.ShowDataTable?N("ViewData","View data & keyboard selections"):N("ExploreData","Explore chart data"),U.style.height=`${o.Height}px`,U.style.visibility=u||b?"hidden":"visible",U.setAttribute("aria-busy",String(u)),a==="calendar-heatmap"){let v=o,L=Math.ceil(((Date.parse(v.RangeEnd)-Date.parse(v.RangeStart))/864e5+7)/7);U.style.minWidth=`${Math.max(300,L*12+56)}px`;let M=A(".blu-chart__stage");M.style.overflowX="auto",M.tabIndex=0,M.setAttribute("role","region"),M.setAttribute("aria-label",N("CalendarScroll","Calendar plot; scroll horizontally for more dates"))}let E=u?N("Loading",y?"Loading map\u2026":"Loading chart\u2026"):o.EmptyMessage||"No data to display";je.update(u,b,E,!!o.EnableAnimation&&!se.matches&&(!r||r.enabled?.()===!1||r.mode(n)==="full")),qe.update(S?g:!u&&!b?N("Ready","Chart ready."):E),le.disabled=w||u||b||S,Q.hidden=u||b||S||!(a==="geo-map"&&o.Roam!==!1||a==="treemap"&&o.Drilldown),a==="geo-map"&&!Q.children.length&&(Q.innerHTML=["in","out","left","right","up","down","reset","full"].map(v=>`<button type="button" data-nav="${v}"></button>`).join("")),a==="treemap"&&!Q.children.length&&(Q.innerHTML='<button type="button" data-nav="reset"></button>');let K={in:"Zoom in",out:"Zoom out",left:"Pan left",right:"Pan right",up:"Pan up",down:"Pan down",reset:a==="treemap"?"Show entire tree":"Reset map",full:"Show full map"};if(Q.querySelectorAll("[data-nav]").forEach(v=>{v.textContent=N("Map_"+v.dataset.nav,K[v.dataset.nav])}),Ot(),s&&F?.reset(),F?.prepare(o,u||b),R&&!y&&(a!=="geo-map"||k)){let v=!s&&R.getOption()?.geo?.[0],L=He(G),M=i({...o,ShowLegend:!1},L,k?.name,se.matches,U.clientWidth);if(delete M.legend,M.aria={...M.aria,description:`${o.Title}. ${o.Description||""} ${N("DataAlternative","Original values and keyboard selection are in the data table.")}`},M.geo&&v&&(M.geo.zoom=v.zoom,v.center&&(M.geo.center=v.center)),r&&r.enabled?.()!==!1){let I=r.timing?.();M.animation=!!o.EnableAnimation&&!se.matches&&r.mode(n)==="full"&&I?.duration!==0&&!u&&!b,M.animationDuration=I?.duration??750,M.animationDurationUpdate=I?.duration??650,M.animationEasing=M.animationEasingUpdate=I?.easing??"cubicInOut",M.series?.forEach((de,Nt)=>{de.id??=JSON.stringify([a,de.type,de.name||(a==="geo-map"?de.type:Nt)]);let rt=(re,At)=>{if(!re||typeof re!="object"||re.id!=null)return;let Pe=re.point?.Key??(a==="mixed"?o.Categories[At]?.Key:re.name);Pe!=null&&(re.id=a==="sankey"?String(Pe):JSON.stringify([Pe,re.point?.SeriesKey||""]))};de.data?.forEach(rt),de.links?.forEach(rt)}),a==="geo-map"&&!M.visualMap&&(M.visualMap=[]),!M.animation&&D?.animation&&R.clear()}R.resize(),R.setOption(M,r&&r.enabled?.()!==!1?{notMerge:!!s,replaceMerge:a==="geo-map"?["series","visualMap"]:["series"]}:{notMerge:!0}),D=M,s&&(Y=void 0),a==="treemap"&&Y&&ae().some(I=>I.Key===Y)&&R.dispatchAction({type:Ae,seriesIndex:0,targetNodeId:Y}),F?.render(o,M,L)}let O=A(".blu-chart__missing-note");if(a==="radar"){let v=o.Series.filter(L=>L.Values.some(M=>M===null));O.hidden=!v.length||u||b,O.textContent=`${v.map(L=>L.Label).join(", ")}: ${N("IncompleteRadar","incomplete profile. Available measurements remain in the data table; missing values are not drawn as zero.")}`}$t(),Ve.matches&&!u&&!b&&(A(".blu-chart__data").open=!0),R&&!y&&!S&&!C&&(a!=="geo-map"||k)&&(C=!0,d(t.Ready)),l||Xe(u?"Loading":S?"Error":b?"Empty":"Ready")}function ve(s,u,b=k,S=V,E=P){let K={options:o,map:k,geometry:V,geometryKey:P,resourceError:g};o=s,k=b,V=S,P=E;try{g="",ie.textContent="",ne(K.options.ResetKey!==s.ResetKey||K.geometryKey!==E)}catch(O){o=K.options,k=K.map,V=K.geometry,P=K.geometryKey,g=K.resourceError,p=o;try{ne()}catch{}throw b!==K.map&&b?.release(),O}if(r&&r.enabled?.()!==!1&&["heatmap","calendar-heatmap","sankey"].includes(a)&&K.options!==s&&JSON.stringify($e(a,K.options))!==JSON.stringify(ae())){$?.cancel(),$=void 0;let O=r.mode(n),v=r.timing?.();if(o.EnableAnimation&&O!=="off"&&!o.IsLoading&&Se()&&v?.duration!==0){let L=O==="reduced"||se.matches?Math.min(v?.duration??200,200):v?.duration??650;W=O,$=U.animate([{opacity:.35},{opacity:1}],{duration:L,easing:v?.curve||"ease-in-out"})}}K.map!==b&&K.map?.release(),u&&d(t.SelectionChange,{Key:null,Reason:"DataChanged"})}function ke(s,u=!1){let b=++h;if(Z?.abort(),y=!1,p=s,a!=="geo-map"){ve(s,u);return}let S=s,E=JSON.stringify([S.Map||"World",S.MapURL||"",S.GeoJSON||null]);if(V&&E===P){ge(S,V),ve(s,u);return}if(S.Map==="Custom"&&S.GeoJSON){ge(S,S.GeoJSON);let K=Be.acquire(S.GeoJSON);ve(s,u,K,S.GeoJSON,E);return}y=!0,Z=new AbortController,ne(),Kt(S,Z.signal).then(K=>{if(l||b!==h)return;y=!1;let O=Be.acquire(K);ve(s,u,O,K,E)}).catch(K=>{l||b!==h||(y=!1,p=o,g=K instanceof Error?K.message:String(K),ne(),me(K,"ResourceLoadFailed"))})}function Ze(s,u){if(l||y||o.IsLoading||s.Value===null&&!(a==="radar"&&s.PointType==="Series"))return;let b={...structuredClone(s),ValueText:s.Value===null?"":be(s)},S=!!o.EnableSelection,E=o.SelectedKey===s.Key?null:s.Key;if(S){let K={...o,SelectedKey:E};if(a==="treemap"&&u==="Table"&&K.Drilldown&&(Y=s.Key,Ae="treemapRootToNode"),ke(K),l)return;ie.textContent=E?`${N("Selected","Selected")} ${s.Label}.`:N("SelectionCleared","Selection cleared.")}d(t.PointClick,b,u),S&&!l&&d(t.SelectionChange,{Key:E,Reason:"User"})}te.onclick=s=>{let u=s.target.closest("[data-point]"),b=u?.dataset.point,S=u&&ae().find(E=>Re(a,E)===b);S&&(Ze(S,"Table"),!l&&G.isConnected&&(document.activeElement===document.body||G.contains(document.activeElement))&&We(b))},Ce.onchange=()=>{ce.update({ShowPatterns:Ce.checked}),d(t.PatternsChange,{ShowPatterns:Ce.checked})},Q.onclick=s=>{let u=s.target.closest("[data-nav]")?.dataset.nav;if(!(!u||!R)){if(u==="full"){ce.update({MapView:"Full",ResetKey:crypto.randomUUID()});return}if(u==="reset"){Y=void 0,ne(!0);return}R.dispatchAction({type:"geoRoam",componentType:"geo",geoIndex:0,dx:u==="left"?-60:u==="right"?60:0,dy:u==="up"?-60:u==="down"?60:0,zoom:u==="in"?1.3:u==="out"?1/1.3:1,originX:U.clientWidth/2,originY:U.clientHeight/2}),ie.textContent=N("Map_"+u,Rt(u))}};function Rt(s){return`Map view changed: ${s}.`}let X=()=>{try{ne()}catch(s){me(s,"RenderFailed")}},Qe=s=>{s.key==="Escape"&&R?.dispatchAction({type:"hideTip"})},et=0,tt=0,at=new ResizeObserver(()=>{let s=U.clientWidth,u=U.clientHeight;s===et&&u===tt||(et=s,tt=u,cancelAnimationFrame(_),_=requestAnimationFrame(()=>{!l&&s>0&&u>0&&X()}))}),nt=new MutationObserver(X);nt.observe(document.documentElement,{attributes:!0,attributeFilter:["data-bluui-theme"]}),se.addEventListener("change",X),Ve.addEventListener("change",X),Ye.addEventListener("change",X),document.addEventListener("keydown",Qe);let ce={update(s){we();try{let{next:u,cleared:b}=St(a,p,s);ke(u,b)}catch(u){if(!y){p=o;try{ne()}catch{}}throw me(u,/SelectedKey/.test(u.message)?"InvalidSelection":"InvalidData"),u}},resize(){we(),X()},setSelection(s){ce.update({SelectedKey:s})},highlight(s){we(),Tt(s)},async download(s="png",u=`blukavant-${a}.${s}`,b=crypto.randomUUID()){we();let S=!1;try{if(!["png","svg"].includes(s))throw new Error("Choose PNG or SVG.");if(w)throw new Error("ExportBusy");if(!R||y||g||o.IsLoading||!Se())throw new Error("Wait for a visible chart with valid data before downloading.");w=!0,S=!0,le.disabled=!0;let E=He(G);await Ct(R,o,s,u,E.surface,E.text,E.muted,F?.exportLayout(),_e.signal),l||(ie.textContent=N("ExportStarted","Chart download started."),d(t.ExportStarted,{Format:s,FileName:u,RequestId:b}),d(t.ExportComplete,{Format:s,FileName:u}))}catch(E){throw l||me(E,E instanceof Error&&E.message==="ExportBusy"?"ExportBusy":"ExportFailed",b),E}finally{S&&(w=!1,l||(le.disabled=y||!!g||!!o.IsLoading||!Se()))}},destroy(){l||(l=!0,$?.cancel(),m(),h++,Z?.abort(),_e.abort(),cancelAnimationFrame(_),cancelAnimationFrame(x),at.disconnect(),nt.disconnect(),se.removeEventListener("change",X),Ve.removeEventListener("change",X),Ye.removeEventListener("change",X),document.removeEventListener("keydown",Qe),qe.destroy(),je.destroy(),F?.destroy(),R?.dispose(),k?.release(),G.remove())}};le.onclick=()=>{ce.download(A("select").value).catch(()=>{})},at.observe(G);try{ke(o),m=r?.subscribe(n,X)||(()=>{})}catch(s){throw me(s),ce.destroy(),s}return ce}var Jt=3.2;function Je(n){if(n.startsWith("#")){let e=n.slice(1);return e.length<=4&&(e=e.split("").map(t=>t+t).join("")),[0,2,4].map(t=>parseInt(e.slice(t,t+2),16)).concat(e.length===8?parseInt(e.slice(6),16)/255:1)}let a=n.match(/[\d.]+/g)?.map(Number);return a&&a.length>=3?[...a.slice(0,3),a[3]??1]:[24,34,48,1]}function jt(n){return`rgb(${n.slice(0,3).map(a=>Math.round(a)).join(",")})`}function qt(n,a){let e=Je(n),t=Je(a);return jt(e.slice(0,3).map((i,r)=>i*e[3]+t[r]*(1-e[3])))}function Mt(n){let a=Je(n).slice(0,3).map(e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4});return a[0]*.2126+a[1]*.7152+a[2]*.0722}function xe(n,a){let e=Mt(n),t=Mt(a);return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function Et(n,a,e=Jt){let t=qt(n,a);if(xe(t,a)>=e)return t;let i=xe("#000",a)>=xe("#fff",a)?"#000":"#fff",r=Math.min(e,xe(i,a)),o=0,p=1;for(let d=0;d<20;d++){let l=(o+p)/2;xe(Le([t,i],l),a)>=r?p=l:o=l}return Le([t,i],p)}function fn(n,a){let e=Et(n,a,9);return[Et(Le([a,e],.12),a),e]}var xn=n=>["circle","diamond","triangle","rect","roundRect","pin","arrow","emptyCircle","emptyDiamond","emptyTriangle","emptyRect","emptyRoundRect"][n%12],_n=n=>["solid","dashed","dotted"][(n+Math.floor(n/12))%3];function Yt(n,a){let e=[{symbol:"rect",symbolSize:0,dashArrayX:[1,0],dashArrayY:[1,8],rotation:0},{symbol:"rect",symbolSize:1,dashArrayX:[1,0],dashArrayY:[1,8],rotation:Math.PI/4},{symbol:"circle",symbolSize:1,dashArrayX:[2,7],dashArrayY:[2,7],rotation:0},{symbol:"rect",symbolSize:1,dashArrayX:[1,0],dashArrayY:[1,8],rotation:-Math.PI/4},{symbol:"rect",symbolSize:1,dashArrayX:[1,0],dashArrayY:[1,6],rotation:0},{symbol:"rect",symbolSize:1,dashArrayX:[3,5],dashArrayY:[3,5],rotation:Math.PI/4},{symbol:"triangle",symbolSize:1,dashArrayX:[4,6],dashArrayY:[4,6],rotation:0},{symbol:"diamond",symbolSize:1,dashArrayX:[4,6],dashArrayY:[4,6],rotation:0},{symbol:"rect",symbolSize:1,dashArrayX:[1,0],dashArrayY:[1,3,1,7],rotation:Math.PI/4},{symbol:"circle",symbolSize:1,dashArrayX:[2,3],dashArrayY:[2,3],rotation:0},{symbol:"rect",symbolSize:1,dashArrayX:[1,0],dashArrayY:[3,4],rotation:-Math.PI/4},{symbol:"rect",symbolSize:1,dashArrayX:[4,4],dashArrayY:[1,5],rotation:0}];return{...e[n%e.length],color:Ie(a),backgroundColor:"none"}}function Xt(n){return{color:n,borderColor:Ie(n),borderWidth:2,borderType:"solid"}}function Cn(n,a,e=!1,t){return{color:n,opacity:1,borderColor:a,borderWidth:1.5,borderType:"solid",...e?Xt(n):{},...t===void 0?{}:{decal:Yt(t,n)}}}function Sn(n,a,e=8){return({labelRect:t})=>({hideOverlap:!0,dx:Math.max(0,8-t.x)+Math.min(0,n-8-t.x-t.width),dy:Math.max(0,e-t.y)+Math.min(0,a-8-t.y-t.height)})}export{ee as a,dt as b,Wt as c,f as d,Ge as e,mn as f,Bt as g,Et as h,fn as i,xn as j,_n as k,Yt as l,Xt as m,Cn as n,Sn as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-UQMMBG26.js";import{g as o}from"./chunk-MR5VITXX.js";import{a as t}from"./chunk-3PITHTEO.js";import{use as s}from"echarts/core";import{PieChart as C}from"echarts/charts";function y(i,n,e,m={},a={}){return t(i,e,a,(p,u)=>(s([C]),o(u,"doughnut",n,m,r,p)))}export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as p,d as r,e as f,h as S,j as h,l as g,m as C,n as L,o as x}from"./chunk-MR5VITXX.js";import{i as b,k as y}from"./chunk-RC2TCMJF.js";function B(m,o,G,O=!1,d=640){let i="scatter",a=m,$=f(i,m),K=(e,t)=>a.ShowPatterns?g(e,t):void 0,c=o.palette,l=(e,t)=>S(o.forcedColors?o.text:b(e,c[t%c.length],o.dark,o.read),o.surface,i==="line"||i==="radar"||i==="polar"&&a.PolarType==="Line"?4.5:3.2),v=(e,t,n)=>L(l(t,n),o.surface,a.SelectedKey===e),w=(e,t)=>$.find(n=>n.Key===e&&(!t||n.SeriesKey===t)),k={data:["line","radar","bar","polar"].includes(i)?a.Series.map(e=>e.Label):i==="scatter"?[...new Set(a.Points.map(e=>e.Group||"Observations"))]:["pie","doughnut","nightingale","funnel"].includes(i)?[...new Set(a.Items.map(e=>e.Label))]:[],show:a.ShowLegend,type:"scroll",top:6,left:10,right:10,itemWidth:24,itemHeight:12,selectedMode:!1,pageTextStyle:{color:o.muted},pageIconColor:o.text,textStyle:{color:o.muted,fontSize:11}},T={show:a.ShowLabels,color:y(o.surface),fontSize:11,backgroundColor:o.surface,padding:[2,3],borderRadius:2},z={show:a.ShowTooltip,confine:!0,enterable:!0,backgroundColor:o.surface,borderColor:o.border,textStyle:{color:o.text,fontSize:12},formatter:e=>{let t=e.data?.point;if(!t)return`${r(e.name||"")}${e.value==null||Number.isNaN(e.value)?" \xB7 No data":""}`;let n=t.Date?`<br/>${r(t.Date)}<br/><strong>${r(p(t.Value,a))}</strong>`:t.X!==void 0?`<br/>${r(a.XLabel||"X")}: ${t.X}<br/>${r(a.YLabel||"Y")}: ${t.Y}${t.Size===void 0?"":`<br/>Size: ${t.Size}`}`:`<br/><strong>${r(p(t.Value,a))}</strong>`;return`${r(t.SeriesName?`${t.SeriesName} \xB7 ${t.Label}`:t.Label)}${n}${e.data?.conversion?`<br/>${r(e.data.conversion)}`:""}`}},P={backgroundColor:o.surface,color:c.map((e,t)=>l(e,t)),animation:!!a.EnableAnimation&&!O,animationDuration:300,animationDurationUpdate:150,textStyle:{fontFamily:"Inter,system-ui,sans-serif",color:o.text},aria:{enabled:!0,description:`${a.Title}. ${a.Description||""} Exact values and keyboard selection are in the data table.`},tooltip:z},u={axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o.muted,fontSize:10,hideOverlap:!0},splitLine:{lineStyle:{color:o.border,type:"dashed"}}},s=m,N=[...new Set(s.Points.map(e=>e.Group||"Observations"))],D=Math.max(1,...s.Points.map(e=>e.Size||0));return{...P,legend:k,grid:{left:20,right:30,top:a.ShowLegend?50:30,bottom:36,containLabel:!0},xAxis:{...u,type:"value",name:s.XLabel||"X",nameLocation:"middle",nameGap:30},yAxis:{...u,type:"value",name:s.YLabel||"Y"},series:N.map((e,t)=>({type:"scatter",name:e,symbol:h(t),itemStyle:{color:l(s.Points.find(n=>(n.Group||"Observations")===e)?.Color,t)},label:{...T,width:Math.min(140,d*.25),overflow:"truncate",position:"top",formatter:"{b}"},labelLayout:x(d,a.Height||320,a.ShowLegend?38:8),symbolSize:(n,X)=>s.Bubble?8+36*Math.sqrt((X.data.point.Size??1)/D):12,emphasis:{focus:"none",scale:!1},blur:{itemStyle:{opacity:1},lineStyle:{opacity:1},label:{opacity:1}},data:s.Points.filter(n=>(n.Group||"Observations")===e).map(n=>({name:n.Label,value:[n.X,n.Y],point:w(n.Key),itemStyle:v(n.Key,n.Color,t),emphasis:{itemStyle:C(l(n.Color,t))}}))}))}}export{B as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-UO2KNHTU.js";import{f as t}from"./chunk-MR5VITXX.js";import{use as p}from"echarts/core";import{PieChart as a}from"echarts/charts";function h(e,o,i={}){return p([a]),t(e,"pie",o,i,r)}export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=Object.freeze({records:1e4,observations:1e4,treeNodes:2e3,treeDepth:64,flowNodes:1e3,flowLinks:5e3,mapFeatures:5e3,mapCoordinates:25e4,mapBytes:8e6,text:1e4});function p(e){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=Number.MAX_SAFE_INTEGER}function g(e,n,f=s.records){if(!Array.isArray(e)||e.length>f)throw new Error(`${n} must be a list with at most ${f} records.`)}function C(e){return typeof e=="string"&&e.length<=s.text}function x(e){return e?["#a16aff","#00cfff","#ff2b91","#ff8a00","#36e377","#e13dff","#4285ff","#ff4056"]:["#7020ff","#0094ff","#ff006e","#ff6a00","#00b94f","#c000ff","#004fff","#ff1738"]}var u=["Default","Primary","Secondary","Success","Processing","Warning","Error","Danger","Magenta","Red","Volcano","Orange","Gold","Lime","Green","Cyan","Blue","GeekBlue","Purple"],l={Default:[["#f5f5f5","#000000","#1d1d1d"],["#272727","rgba(255, 255, 255, 0.95)","#dfdfdf"]],Primary:[["#eef2ff","#4f46e5","#4338ca"],["#282445","#8070ed","#b6acff"]],Secondary:[["#e2e8f0","#475569","#334155"],["#2b3240","#526077","#d6dce5"]],Success:[["#f6ffed","#52c41a","#2d6c0e"],["#162312","#49aa19","#73be4e"]],Processing:[["#e6f4ff","#2681ff","#1054b5"],["#111a2c","#145ec6","#78a7eb"]],Warning:[["#fffbe6","#faad14","#7d560a"],["#2b2111","#d89614","#dda535"]],Error:[["#fff2f0","#ff4d4f","#a33133"],["#2c1618","#dc4446","#ea8d8e"]],Danger:[["#fff2f0","#ff4d4f","#a33133"],["#2c1618","#dc4446","#ea8d8e"]],Magenta:[["#fff0f6","#ed409e","#a9196d"],["#291321","#cf3a8c","#e984b9"]],Red:[["#fff1f0","#e4202a","#b4111e"],["#2a1215","#cd1f28","#f08485"]],Volcano:[["#fff2e8","#fa541c","#aa2d0a"],["#2b1611","#d84a1b","#ed8e68"]],Orange:[["#fff7e6","#fa8c16","#904905"],["#2b1d11","#d87a16","#e89b3e"]],Gold:[["#fffbe6","#faad14","#835404"],["#2b2111","#d89614","#e8b339"]],Lime:[["#fcffe6","#a0d911","#486803"],["#1f2611","#8bbb11","#a9d134"]],Green:[["#f6ffed","#52c41a","#276d09"],["#162312","#49aa19","#6bbf3b"]],Cyan:[["#e6fffb","#13c2c2","#06686c"],["#112123","#13a8a8","#33bcb7"]],Blue:[["#e6f4ff","#2681ff","#0851c8"],["#111a2c","#145ec6","#6fa8ee"]],GeekBlue:[["#f0f5ff","#2f54eb","#1d39c4"],["#131629","#2b4acb","#89a0ea"]],Purple:[["#f9f0ff","#722ed1","#531dab"],["#1a1325","#642ab5","#b593df"]]},i=e=>typeof e=="string"&&u.includes(e),y=e=>i(e)||typeof e=="string"&&/^#(?:[\da-f]{3}|[\da-f]{4}|[\da-f]{6}|[\da-f]{8})$/i.test(e);function m(e,n,f=()=>""){let t=l[e][n?1:0],r=e.toLowerCase();return{soft:f(`--bluui-color-${r}-soft`).trim()||t[0],solid:f(`--bluui-color-${r}-solid`).trim()||t[1],text:f(`--bluui-color-${r}-text`).trim()||t[2]}}function k(e,n,f,t){return i(e)?m(e,f,t).solid:e||n}function o(e){if(e.startsWith("rgb"))return e.match(/[\d.]+/g).slice(0,3).map(Number);let n=e.slice(1),f=n.length<5?n.slice(0,3).split("").map(t=>t+t).join(""):n.slice(0,6);return[0,2,4].map(t=>parseInt(f.slice(t,t+2),16))}function w(e,n){let f=Math.max(0,Math.min(1,n))*(e.length-1),t=Math.min(Math.floor(f),e.length-2),r=f-t,c=o(e[t]),d=o(e[t+1]);return`rgb(${c.map((a,b)=>Math.round(a+(d[b]-a)*r)).join(",")})`}function M(e){let n=o(e).map(t=>{let r=t/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}),f=n[0]*.2126+n[1]*.7152+n[2]*.0722;return(f+.05)/.0656>=4.5?"#182230":1.05/(f+.05)>=4.5?"#fff":"#000"}export{s as a,p as b,g as c,C as d,x as e,i as f,y as g,m as h,k as i,w as j,M as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as I,c as W,d as R,f as Z}from"./chunk-RC2TCMJF.js";var T={instances:new Map,serial:0},Q;function b(e,n,i){var m=document.createElement(e);return n&&(m.className=n),i!==void 0&&(m.textContent=i),m}function t(e,n,i){return e.setAttribute(n,String(i)),e}function X(e,n){if(e.error||(e.error=t(b("p","blu-common-error"),"role","alert"),e.host.append(e.error)),e.error.textContent=n,e.error.hidden=!n,n&&e.lastError!==n&&e.events.Error){e.lastError=n;try{e.events.Error(n)}catch{}}n||(e.lastError="")}function re(e,n,i,m){if(e=e===void 0?n:Number(e),!Number.isInteger(e)||e<i||e>m)throw Error("Expected an integer between "+i+" and "+m+".");return e}function U(e){var n=T.instances.get(e);n&&(n.dead=!0,n.cleanup.forEach(function(i){i()}),n.owned.forEach(function(i){i.remove()}),n.host._bluChartsSparklineOwner===e&&(delete n.host._bluChartsSparklineOwner,n.host.removeAttribute("data-blu-ready")),T.instances.delete(e))}function ae(e,n){return e.owned.push(n),n}function Y(e,n,i=300,m="Smooth"){var s=typeof e=="string"?JSON.parse(e||"[]"):e||[];if(!Array.isArray(s)||s.length>1e4)throw Error("Points must be a list with at most 10,000 items.");var o=s.map(function(g){if(!g||typeof g.Value!="number"||!Number.isFinite(g.Value))throw Error("Every Sparkline point needs a finite numeric Value.");return g.Value});if(!o.length)return{rows:s,coordinates:[],line:"",area:""};var l=Math.min.apply(null,o),r=Math.max.apply(null,o),a=r-l,p=Math.max(Math.abs(l),Math.abs(r),1),f=l/p,h=r/p-f,u=o.map(function(g,S){return[o.length===1?i/2:6+S*(i-12)/(o.length-1),h?n-6-(g/p-f)/h*(n-12):n/2]}),d=u.map(function(g,S){return(S?"L":"M")+g[0].toFixed(3)+" "+g[1].toFixed(3)}).join(" ");if(m==="Smooth"&&u.length>2){var x=(i-12)/(u.length-1),k=u.slice(1).map(function(g,S){return(g[1]-u[S][1])/x}),y=u.map(function(g,S){if(S===0)return k[0];if(S===u.length-1)return k[S-1];var v=k[S-1],A=k[S];return v*A>0?2*v*A/(v+A):0});d="M"+u[0][0].toFixed(3)+" "+u[0][1].toFixed(3);for(var c=1;c<u.length;c++){var L=u[c-1],O=u[c];d+=" C"+(L[0]+x/3).toFixed(3)+" "+(L[1]+y[c-1]*x/3).toFixed(3)+" "+(O[0]-x/3).toFixed(3)+" "+(O[1]-y[c]*x/3).toFixed(3)+" "+O[0].toFixed(3)+" "+O[1].toFixed(3)}}return{rows:s,coordinates:u,line:d,area:d+" L"+u[u.length-1][0]+" "+(n-4)+" L"+u[0][0]+" "+(n-4)+" Z",min:l,max:r,first:o[0],last:o[o.length-1]}}function ie(e){var n=e.options,i=Math.max(24,Math.round(e.host.clientWidth||300)),m=JSON.stringify([n,i,e.reducedMotion.matches]);let s=(w,E,C={})=>(n.Messages?.[w]??E).replace(/\{(\w+)\}/g,(H,J)=>C[J]??H);if(e.renderSignature===m)return;var o=n.LineStyle||"Smooth";if(!["Straight","Smooth"].includes(o))throw Error("LineStyle must be Straight or Smooth.");var l=re(n.Height,64,24,240),r=JSON.stringify([n.PointsJson,l,i,o]),a=e.geometryKey===r?e.geometry:Y(n.PointsJson,l,i,o),p=n.Animation||(n.AnimateGlow===!1?"Off":"Once");if(!["Off","Once","Continuous"].includes(p))throw Error("Animation must be Off, Once or Continuous.");var f=n.AnimationDuration===void 0?5:Number(n.AnimationDuration);if(!Number.isFinite(f)||f<1||f>60)throw Error("AnimationDuration must be between 1 and 60 seconds.");var h=n.AreaOpacity===void 0?18:Number(n.AreaOpacity);if(!Number.isFinite(h)||h<0||h>100)throw Error("AreaOpacity must be between 0 and 100 percent.");e.animation!==p&&(e.animationPaused=!1),e.animation=p,e.geometryKey=r,e.geometry=a;var u=String(n.Color||"Primary").toLowerCase();if("default primary secondary success processing warning error danger magenta red volcano orange gold lime green cyan blue geekblue purple".split(" ").indexOf(u)<0)throw Error("Unknown ComponentColor.");e.body||(e.body=ae(e,b("div","blu-sparkline")),e.host.append(e.body));for(var d=e.body,x=!!(d.querySelector("details")&&d.querySelector("details").open),k=d.contains(document.activeElement);d.firstChild;)d.removeChild(d.firstChild);if(d.style.setProperty("--blu-sparkline-color","var(--bluui-color-"+u+"-text)"),d.style.setProperty("--blu-sparkline-height",l+"px"),!a.rows.length){d.append(b("p","blu-sparkline__empty",n.EmptyText||"No trend data.")),e.renderSignature=m;return}var y="http://www.w3.org/2000/svg",c=document.createElementNS(y,"svg");t(c,"viewBox","0 0 "+i+" "+l),t(c,"preserveAspectRatio","none"),t(c,"role","img");let L=a.last>a.first?"Rising":a.last<a.first?"Falling":"Unchanged";var O=n.SummaryText||s("TrendSummary","{count} points. {direction} from {first} to {last}. Minimum {min}, maximum {max}.",{count:a.rows.length,direction:s(L,L),first:a.first,last:a.last,min:a.min,max:a.max});t(c,"aria-label",(n.AccessibleLabel||"Trend")+". "+O);var g=document.createElementNS(y,"title");if(g.textContent=(n.AccessibleLabel||"Trend")+". "+O,c.append(g),n.ShowArea!==!1&&a.rows.length>1){var S=document.createElementNS(y,"defs"),v=document.createElementNS(y,"linearGradient");t(v,"id",e.uid+"-area"),t(v,"x1","0%"),t(v,"y1","0%"),t(v,"x2","0%"),t(v,"y2","100%"),[h/100,n.AreaFade===!1?h/100:0].forEach(function(w,E){var C=document.createElementNS(y,"stop");t(C,"offset",E?"100%":"0%"),C.style.stopColor="var(--blu-sparkline-color)",t(C,"stop-opacity",w),v.append(C)}),S.append(v),c.append(S);var A=document.createElementNS(y,"path");t(A,"d",a.area),t(A,"class","blu-sparkline__area"),A.style.fill="url(#"+e.uid+"-area)",c.append(A)}var F=document.createElementNS(y,"path");t(F,"d",a.line),t(F,"class","blu-sparkline__line"),t(F,"vector-effect","non-scaling-stroke"),c.append(F);var j=p!=="Off"&&a.rows.length>1&&!e.reducedMotion.matches;if(!j&&n.ShowEndMarker!==!1||a.rows.length===1){var q=a.coordinates[a.coordinates.length-1],P=document.createElementNS(y,"circle");t(P,"cx",q[0]),t(P,"cy",q[1]),t(P,"r",3),t(P,"class","blu-sparkline__point"),c.append(P)}if(j){var _=document.createElementNS(y,"g");t(_,"class","blu-sparkline__traveler"),t(_,"aria-hidden","true"),[["halo",6],["ring",4.5],["cursor",3]].forEach(function(w){var E=document.createElementNS(y,"circle");t(E,"r",w[1]),t(E,"class","blu-sparkline__"+w[0]),_.append(E)});var N=document.createElementNS(y,"animateMotion"),D=document.createElementNS(y,"animate");t(N,"path",a.line),t(N,"calcMode","spline"),t(N,"keyPoints","0;1"),t(N,"keyTimes","0;1"),t(N,"keySplines","0.22 0.61 0.36 1"),t(D,"attributeName","opacity"),t(D,"values","0;1;1;0"),t(D,"keyTimes","0;0.03;0.96;1"),[N,D].forEach(function(w){t(w,"dur",f+"s"),t(w,"repeatCount",p==="Continuous"?"indefinite":"1"),t(w,"fill","freeze"),_.append(w)}),c.append(_)}if(d.append(c),j&&(p==="Continuous"||f>5)){var V=b("button","blu-sparkline__pause");V.type="button";var B=function(){V.textContent=e.animationPaused?s("ResumeAnimation","Resume animation"):s("PauseAnimation","Pause animation"),e.animationPaused?c.pauseAnimations():c.unpauseAnimations()};V.addEventListener("click",function(){e.animationPaused=!e.animationPaused,B()}),d.append(V),B()}if(n.ShowDataTable){let w=function(){if(!(!M.open||G)){var E=b("table"),C=b("caption","",n.AccessibleLabel||"Trend"),H=b("thead"),J=b("tr");J.append(t(b("th","",s("Point","Point")),"scope","col"),t(b("th","",s("Value","Value")),"scope","col")),H.append(J),E.append(C,H);var K=b("tbody");a.rows.forEach(function(z,te){var $=b("tr");$.append(t(b("th","",z.Label||String(te+1)),"scope","row"),b("td","",String(z.Value))),K.append($)}),E.append(K),M.append(E),G=!0}};var M=b("details","blu-sparkline__data");M.open=x,M.append(b("summary","",s("ViewData","View trend data")));var G=!1;M.addEventListener("toggle",w),d.append(M),w(),k&&M.querySelector("summary").focus()}e.renderSignature=m}function oe(e,n){return{sync:function(i,m,s,o){var l=document.getElementById(i);if(!l)return"Component host was not found.";o=o||i;var r=T.instances.get(o);if(r&&r.host!==l&&(U(o),r=null),l._bluChartsSparklineOwner&&l._bluChartsSparklineOwner!==o&&U(l._bluChartsSparklineOwner),!r){r={host:l,key:o,uid:"blu-charts-trend-"+ ++T.serial,owned:[],cleanup:[],reducedMotion:matchMedia("(prefers-reduced-motion: reduce)")},T.instances.set(o,r);var a=function(){if(!r.dead&&r.options)try{n(r)}catch{}},p=new ResizeObserver(a);p.observe(l),r.reducedMotion.addEventListener("change",a),r.cleanup.push(function(){p.disconnect(),r.reducedMotion.removeEventListener("change",a)})}var f=l.nextElementSibling;f&&f.classList.contains("blu-component-preview")&&(f.hidden=!0),l._bluChartsSparklineOwner=o,r.options=m||{},r.events=s||{},t(l,"data-blu-ready","true");try{return n(r),X(r,""),""}catch(h){return r.renderSignature=void 0,X(r,h.message||String(h)),h.message||String(h)}},destroy:U}}function ee(){return Q||(Q=Object.assign(oe("Sparkline",ie),{geometry:Y}))}function ne(e){if(W(e.Points,"Points"),e.Messages!==void 0&&(!e.Messages||typeof e.Messages!="object"||Array.isArray(e.Messages)||Object.keys(e.Messages).length>100||!Object.values(e.Messages).every(R)))throw new Error("Messages must contain plain text translations.");if(e.Points.some(n=>!n||!I(n.Value)||n.Label!==void 0&&!R(n.Label)))throw new Error("Points require supported finite values and plain text labels.");for(let n of["AnimateGlow","ShowArea","AreaFade","ShowEndMarker","ShowDataTable"])if(e[n]!==void 0&&typeof e[n]!="boolean")throw new Error(`${n} must be Boolean.`);for(let n of["AccessibleLabel","SummaryText","EmptyText","ExtendedClass"])if(e[n]!==void 0&&!R(e[n]))throw new Error(`${n} must be plain text within the text limit.`);if(e.Color!==void 0&&!Z(e.Color))throw new Error("Unknown ComponentColor.");if(e.LineStyle!==void 0&&!["Straight","Smooth"].includes(e.LineStyle))throw new Error("LineStyle must be Straight or Smooth.");if(e.Animation!==void 0&&!["Off","Once","Continuous"].includes(e.Animation))throw new Error("Animation must be Off, Once or Continuous.");if(e.Height!==void 0&&(!Number.isInteger(e.Height)||e.Height<24||e.Height>240))throw new Error("Height must be an integer from 24 to 240.");if(e.AnimationDuration!==void 0&&(!I(e.AnimationDuration)||e.AnimationDuration<1||e.AnimationDuration>60))throw new Error("AnimationDuration must be between 1 and 60.");if(e.AreaOpacity!==void 0&&(!I(e.AreaOpacity)||e.AreaOpacity<0||e.AreaOpacity>100))throw new Error("AreaOpacity must be between 0 and 100.")}function pe(e,n,i={}){let m=ee(),s=document.createElement("div");s.id="blu-charts-sparkline-"+crypto.randomUUID(),e.append(s);let o={...n},l=!1,r=p=>{if(l)throw new Error("Component is destroyed.");let f={...o,...structuredClone(p)};try{ne(f)}catch(k){try{i.Error?.(k.message)}catch{}throw k}let{Points:h,ExtendedClass:u,...d}=f,x=m.sync(s.id,{...d,PointsJson:JSON.stringify(h||[])},i,s.id);if(x)throw new Error(x);o=f,s.className=u||""},a=()=>{l||(l=!0,m.destroy(s.id),s.remove())};try{r({})}catch(p){throw a(),p}return{element:s,update:r,destroy:a}}export{ne as a,pe as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as c,d as n,e as $,h as w,j as O,k as T,l as S,m as k,n as f,o as K}from"./chunk-MR5VITXX.js";import{i as C,k as L}from"./chunk-RC2TCMJF.js";import{format as A}from"echarts/core";function Z(d,o,E,M=!1,u=640){let s="radar",a=d,N=$(s,d),F=(e,t)=>a.ShowPatterns?S(e,t):void 0,p=o.palette,y=(e,t)=>w(o.forcedColors?o.text:C(e,p[t%p.length],o.dark,o.read),o.surface,s==="line"||s==="radar"||s==="polar"&&a.PolarType==="Line"?4.5:3.2),G=(e,t,r)=>f(y(t,r),o.surface,a.SelectedKey===e),H=(e,t)=>N.find(r=>r.Key===e&&(!t||r.SeriesKey===t)),v={data:["line","radar","bar","polar"].includes(s)?a.Series.map(e=>e.Label):s==="scatter"?[...new Set(a.Points.map(e=>e.Group||"Observations"))]:["pie","doughnut","nightingale","funnel"].includes(s)?[...new Set(a.Items.map(e=>e.Label))]:[],show:a.ShowLegend,type:"scroll",top:6,left:10,right:10,itemWidth:24,itemHeight:12,selectedMode:!1,pageTextStyle:{color:o.muted},pageIconColor:o.text,textStyle:{color:o.muted,fontSize:11}},V={show:a.ShowLabels,color:L(o.surface),fontSize:11,backgroundColor:o.surface,padding:[2,3],borderRadius:2},g={show:a.ShowTooltip,confine:!0,enterable:!0,backgroundColor:o.surface,borderColor:o.border,textStyle:{color:o.text,fontSize:12},formatter:e=>{let t=e.data?.point;if(!t)return`${n(e.name||"")}${e.value==null||Number.isNaN(e.value)?" \xB7 No data":""}`;let r=t.Date?`<br/>${n(t.Date)}<br/><strong>${n(c(t.Value,a))}</strong>`:t.X!==void 0?`<br/>${n(a.XLabel||"X")}: ${t.X}<br/>${n(a.YLabel||"Y")}: ${t.Y}${t.Size===void 0?"":`<br/>Size: ${t.Size}`}`:`<br/><strong>${n(c(t.Value,a))}</strong>`;return`${n(t.SeriesName?`${t.SeriesName} \xB7 ${t.Label}`:t.Label)}${r}${e.data?.conversion?`<br/>${n(e.data.conversion)}`:""}`}},z={backgroundColor:o.surface,color:p.map((e,t)=>y(e,t)),animation:!!a.EnableAnimation&&!M,animationDuration:300,animationDurationUpdate:150,textStyle:{fontFamily:"Inter,system-ui,sans-serif",color:o.text},aria:{enabled:!0,description:`${a.Title}. ${a.Description||""} Exact values and keyboard selection are in the data table.`},tooltip:g},R={axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o.muted,fontSize:10,hideOverlap:!0},splitLine:{lineStyle:{color:o.border,type:"dashed"}}},i=d,b=a.ShowLegend?48:22,h=a.Height||320,P=b+(h-b-38)/2,D=Math.max(12,Math.min(u*.24,(h-b-64)/2)),x=i.Categories.map((e,t)=>{let r=Math.max(1,...i.Series.map(m=>m.Values[t]??0)),l=10**Math.floor(Math.log10(r));return e.Max??Math.ceil(r/l)*l});return{...z,legend:v,tooltip:{...g,formatter:e=>{let t=i.Series.find(r=>r.Key===e.data?.point?.SeriesKey);return t?`<strong>${n(t.Label)}</strong><br/>${i.Categories.map((r,l)=>`${n(r.Label)}: ${n(c(t.Values[l],a))}`).join("<br/>")}`:""}},radar:{center:["50%",P],radius:D,shape:i.GridShape==="Circle"?"circle":"polygon",splitNumber:i.SplitNumber??4,indicator:i.Categories.map((e,t)=>({name:A.truncateText(`${e.Label}${i.ShowAxisBounds!==!1?`
|
|
2
|
+
0\u2013${c(x[t],a,!0)}`:""}`,Math.max(28,Math.min(100,u*.22)),"11px Inter,system-ui","\u2026"),min:0,max:x[t]})),axisName:{color:o.text,fontSize:11,lineHeight:15,width:Math.max(28,Math.min(100,u*.22)),overflow:"truncate"},axisNameGap:7,axisLine:{lineStyle:{color:o.border,width:1}},splitLine:{lineStyle:{color:o.border,width:1}},splitArea:{show:!1}},series:i.Series.map((e,t)=>{let r=y(e.Color,t),l=a.SelectedKey===e.Key;return{id:e.Key,name:e.Label,type:"radar",symbol:O(t),symbolSize:l?9:7,lineStyle:{color:r,width:l?3:2.5,type:T(t)},itemStyle:{...f(r,o.surface,l),decal:i.ShowArea&&a.ShowPatterns?S(t,r):void 0},areaStyle:i.ShowArea?{color:r,opacity:.08}:void 0,label:{...V,position:"top",formatter:m=>c(m.value,a,!0)},labelLayout:K(u,h,a.ShowLegend?38:8),emphasis:{focus:"none",itemStyle:k(r),lineStyle:{width:3}},blur:{lineStyle:{opacity:1},itemStyle:{opacity:1}},data:e.Values.some(m=>m===null)||!e.Values.length?[]:[{name:e.Label,value:e.Values,point:{Key:e.Key,Label:e.Label,Value:null,SeriesKey:e.Key,SeriesName:e.Label,PointType:"Series"}}]}})}}export{Z as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as S,d as i,e as w,h as O,l as T,m as v,n as K}from"./chunk-MR5VITXX.js";import{i as $,k as y}from"./chunk-RC2TCMJF.js";function ne(c,o,F,N=!1,A=640){let n=c,L=w("pie",c),I=(t,e)=>n.ShowPatterns?T(t,e):void 0,p=o.palette,m=(t,e)=>O(o.forcedColors?o.text:$(t,p[e%p.length],o.dark,o.read),o.surface,3.2),R=(t,e,s)=>K(m(e,s),o.surface,n.SelectedKey===t),V=(t,e)=>L.find(s=>s.Key===t&&(!e||s.SeriesKey===e)),z={data:["line","radar","bar","polar"].includes("pie")?n.Series.map(t=>t.Label):["pie","doughnut","nightingale","funnel"].includes("pie")?[...new Set(n.Items.map(t=>t.Label))]:[],show:n.ShowLegend,type:"scroll",top:6,left:10,right:10,itemWidth:24,itemHeight:12,selectedMode:!1,pageTextStyle:{color:o.muted},pageIconColor:o.text,textStyle:{color:o.muted,fontSize:11}},D={show:n.ShowLabels,color:y(o.surface),fontSize:11,backgroundColor:o.surface,padding:[2,3],borderRadius:2},M={show:n.ShowTooltip,confine:!0,enterable:!0,backgroundColor:o.surface,borderColor:o.border,textStyle:{color:o.text,fontSize:12},formatter:t=>{let e=t.data?.point;if(!e)return`${i(t.name||"")}${t.value==null||Number.isNaN(t.value)?" \xB7 No data":""}`;let s=e.Date?`<br/>${i(e.Date)}<br/><strong>${i(S(e.Value,n))}</strong>`:e.X!==void 0?`<br/>${i(n.XLabel||"X")}: ${e.X}<br/>${i(n.YLabel||"Y")}: ${e.Y}${e.Size===void 0?"":`<br/>Size: ${e.Size}`}`:`<br/><strong>${i(S(e.Value,n))}</strong>`;return`${i(e.SeriesName?`${e.SeriesName} \xB7 ${e.Label}`:e.Label)}${s}${t.data?.conversion?`<br/>${i(t.data.conversion)}`:""}`}},P={backgroundColor:o.surface,color:p.map((t,e)=>m(t,e)),animation:!!n.EnableAnimation&&!N,animationDuration:300,animationDurationUpdate:150,textStyle:{fontFamily:"Inter,system-ui,sans-serif",color:o.text},aria:{enabled:!0,description:`${n.Title}. ${n.Description||""} Exact values and keyboard selection are in the data table.`},tooltip:M},Y={axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o.muted,fontSize:10,hideOverlap:!0},splitLine:{lineStyle:{color:o.border,type:"dashed"}}},r=c,l=r.Nested?r.Rings:[{Key:"",Label:""}],h=r.Shape==="Half",C=!!r.Nested&&l.length>1,k=0,b=r.LabelPosition!=="Inside",g=b?66:76,H=[...new Set(r.Items.map(t=>t.Label))],x=l.map((t,e)=>{let s=C?e===0?[0,32]:[44+(g-44)*(e-1)/(l.length-1),44+(g-44)*e/(l.length-1)-(e===l.length-1?0:2)]:[k,Math.max(g,k+5)],d=!b||C&&e<l.length-1;return{type:"pie",id:t.Key||"pie",name:t.Label,top:n.ShowLegend?28:0,bottom:2,center:["50%",h?"72%":"55%"],radius:s.map(a=>`${a}%`),startAngle:h?180:90,endAngle:h?360:"auto",roseType:!1,avoidLabelOverlap:!0,stillShowZeroSum:!1,label:{...D,position:d?"inside":"outside",backgroundColor:d?void 0:o.surface,alignTo:"none",bleedMargin:6,distanceToLabelLine:4,formatter:`{b}
|
|
2
|
+
{d}%`,lineHeight:15},labelLine:{show:!!n.ShowLabels&&!d,length:12,length2:8,smooth:.15},labelLayout:{hideOverlap:!0},emphasis:{scale:!0},data:r.Items.filter(a=>!r.Nested||a.RingKey===t.Key).map(a=>{let f=H.indexOf(a.Label),u=m(a.Color,f);return{id:a.Key,name:a.Label,value:a.Value,point:V(a.Key),label:{color:y(d?u:o.surface),backgroundColor:d?u:o.surface},labelLine:{lineStyle:{color:u,width:1.25}},itemStyle:{...R(a.Key,a.Color,f),decal:I(f,u),borderRadius:3},emphasis:{itemStyle:v(u)}}})}}),G=L.find(t=>t.Key===n.SelectedKey)?.Value??r.Items.reduce((t,e)=>t+(e.Value||0),0);return{...P,legend:z,series:x,media:b?[{query:{maxWidth:420},option:{series:x.map(t=>({id:t.id,radius:t.radius.map(e=>`${parseFloat(e)*.84}%`)}))}}]:[],graphic:[]}}export{ne as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as b,d as i,e as k,h as v,l as K,m as N,n as I}from"./chunk-MR5VITXX.js";import{i as T,k as x}from"./chunk-RC2TCMJF.js";function ae(g,o,Y,R=!1,z=640){let n="doughnut",a=g,$=k(n,g),D=(e,t)=>a.ShowPatterns?K(e,t):void 0,h=o.palette,f=(e,t)=>v(o.forcedColors?o.text:T(e,h[t%h.length],o.dark,o.read),o.surface,n==="line"||n==="radar"||n==="polar"&&a.PolarType==="Line"?4.5:3.2),M=(e,t,l)=>I(f(t,l),o.surface,a.SelectedKey===e),P=(e,t)=>$.find(l=>l.Key===e&&(!t||l.SeriesKey===t)),V={data:["line","radar","bar","polar"].includes(n)?a.Series.map(e=>e.Label):n==="scatter"?[...new Set(a.Points.map(e=>e.Group||"Observations"))]:["pie","doughnut","nightingale","funnel"].includes(n)?[...new Set(a.Items.map(e=>e.Label))]:[],show:a.ShowLegend,type:"scroll",top:6,left:10,right:10,itemWidth:24,itemHeight:12,selectedMode:!1,pageTextStyle:{color:o.muted},pageIconColor:o.text,textStyle:{color:o.muted,fontSize:11}},H={show:a.ShowLabels,color:x(o.surface),fontSize:11,backgroundColor:o.surface,padding:[2,3],borderRadius:2},F={show:a.ShowTooltip,confine:!0,enterable:!0,backgroundColor:o.surface,borderColor:o.border,textStyle:{color:o.text,fontSize:12},formatter:e=>{let t=e.data?.point;if(!t)return`${i(e.name||"")}${e.value==null||Number.isNaN(e.value)?" \xB7 No data":""}`;let l=t.Date?`<br/>${i(t.Date)}<br/><strong>${i(b(t.Value,a))}</strong>`:t.X!==void 0?`<br/>${i(a.XLabel||"X")}: ${t.X}<br/>${i(a.YLabel||"Y")}: ${t.Y}${t.Size===void 0?"":`<br/>Size: ${t.Size}`}`:`<br/><strong>${i(b(t.Value,a))}</strong>`;return`${i(t.SeriesName?`${t.SeriesName} \xB7 ${t.Label}`:t.Label)}${l}${e.data?.conversion?`<br/>${i(e.data.conversion)}`:""}`}},A={backgroundColor:o.surface,color:h.map((e,t)=>f(e,t)),animation:!!a.EnableAnimation&&!R,animationDuration:300,animationDurationUpdate:150,textStyle:{fontFamily:"Inter,system-ui,sans-serif",color:o.text},aria:{enabled:!0,description:`${a.Title}. ${a.Description||""} Exact values and keyboard selection are in the data table.`},tooltip:F},G={axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o.muted,fontSize:10,hideOverlap:!0},splitLine:{lineStyle:{color:o.border,type:"dashed"}}},r=g,d=r.Nested?r.Rings:[{Key:"",Label:""}],p=r.Shape==="Half",y=!!r.Nested&&d.length>1,m=n==="pie"?0:r.InnerRadius??(n==="doughnut"?48:18),S=r.LabelPosition!=="Inside",L=S?66:76,E=[...new Set(r.Items.map(e=>e.Label))],O=d.map((e,t)=>{let l=y?t===0?[0,32]:[44+(L-44)*(t-1)/(d.length-1),44+(L-44)*t/(d.length-1)-(t===d.length-1?0:2)]:[m,Math.max(L,m+5)],u=!S||y&&t<d.length-1;return{type:"pie",id:e.Key||n,name:e.Label,top:a.ShowLegend?28:0,bottom:2,center:["50%",p?"72%":"55%"],radius:l.map(s=>`${s}%`),startAngle:p?180:90,endAngle:p?360:"auto",roseType:n==="nightingale"?r.RoseMode==="Radius"?"radius":"area":!1,avoidLabelOverlap:!0,stillShowZeroSum:!1,label:{...H,position:u?"inside":"outside",backgroundColor:u?void 0:o.surface,alignTo:"none",bleedMargin:6,distanceToLabelLine:4,formatter:`{b}
|
|
2
|
+
{d}%`,lineHeight:15},labelLine:{show:!!a.ShowLabels&&!u,length:12,length2:8,smooth:.15},labelLayout:{hideOverlap:!0},emphasis:{scale:!0},data:r.Items.filter(s=>!r.Nested||s.RingKey===e.Key).map(s=>{let C=E.indexOf(s.Label),c=f(s.Color,C);return{id:s.Key,name:s.Label,value:s.Value,point:P(s.Key),label:{color:x(u?c:o.surface),backgroundColor:u?c:o.surface},labelLine:{lineStyle:{color:c,width:1.25}},itemStyle:{...M(s.Key,s.Color,C),decal:D(C,c),borderRadius:3},emphasis:{itemStyle:N(c)}}})}}),w=$.find(e=>e.Key===a.SelectedKey),X=w?.Value??r.Items.reduce((e,t)=>e+(t.Value||0),0);return{...A,legend:V,series:O,media:S?[{query:{maxWidth:420},option:{series:O.map(e=>({id:e.id,radius:e.radius.map(t=>`${parseFloat(t)*.84}%`)}))}}]:[],graphic:n==="doughnut"&&!y&&m>=35?[{type:"text",left:"center",top:p?"63%":"48%",silent:!0,style:{text:`${b(X,a,!0)}
|
|
3
|
+
${w?.Label||r.CenterLabel||"Total"}`,textAlign:"center",fill:o.text,font:"600 16px Inter,system-ui",lineHeight:24,width:Math.max(24,Math.min(z,a.Height||320)*m/100-12),overflow:"truncate"}}]:[]}}export{ae as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-UGXWOWAG.js";import{g as o}from"./chunk-MR5VITXX.js";import{a as t}from"./chunk-3PITHTEO.js";import{use as C}from"echarts/core";import{RadarChart as f}from"echarts/charts";import{RadarComponent as u}from"echarts/components";function g(a,n,i,e={},m={}){return t(a,i,m,(p,s)=>(C([f,u]),o(s,"radar",n,e,r,p)))}export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,d as s,e as $,h as w,j as T,k as N,l as v,m as z,n as h}from"./chunk-MR5VITXX.js";import{i as O,k as p}from"./chunk-RC2TCMJF.js";function Q(m,a,X,P=!1,K=640){let n="line",o=m,A=$(n,m),C=(e,t)=>o.ShowPatterns?v(e,t):void 0,y=a.palette,l=(e,t)=>w(a.forcedColors?a.text:O(e,y[t%y.length],a.dark,a.read),a.surface,n==="line"||n==="radar"||n==="polar"&&o.PolarType==="Line"?4.5:3.2),D=(e,t,i)=>h(l(t,i),a.surface,o.SelectedKey===e),V=(e,t)=>A.find(i=>i.Key===e&&(!t||i.SeriesKey===t)),L={data:["line","radar","bar","polar"].includes(n)?o.Series.map(e=>e.Label):n==="scatter"?[...new Set(o.Points.map(e=>e.Group||"Observations"))]:["pie","doughnut","nightingale","funnel"].includes(n)?[...new Set(o.Items.map(e=>e.Label))]:[],show:o.ShowLegend,type:"scroll",top:6,left:10,right:10,itemWidth:24,itemHeight:12,selectedMode:!1,pageTextStyle:{color:a.muted},pageIconColor:a.text,textStyle:{color:a.muted,fontSize:11}},M={show:o.ShowLabels,color:p(a.surface),fontSize:11,backgroundColor:a.surface,padding:[2,3],borderRadius:2},H={show:o.ShowTooltip,confine:!0,enterable:!0,backgroundColor:a.surface,borderColor:a.border,textStyle:{color:a.text,fontSize:12},formatter:e=>{let t=e.data?.point;if(!t)return`${s(e.name||"")}${e.value==null||Number.isNaN(e.value)?" \xB7 No data":""}`;let i=t.Date?`<br/>${s(t.Date)}<br/><strong>${s(c(t.Value,o))}</strong>`:t.X!==void 0?`<br/>${s(o.XLabel||"X")}: ${t.X}<br/>${s(o.YLabel||"Y")}: ${t.Y}${t.Size===void 0?"":`<br/>Size: ${t.Size}`}`:`<br/><strong>${s(c(t.Value,o))}</strong>`;return`${s(t.SeriesName?`${t.SeriesName} \xB7 ${t.Label}`:t.Label)}${i}${e.data?.conversion?`<br/>${s(e.data.conversion)}`:""}`}},x={backgroundColor:a.surface,color:y.map((e,t)=>l(e,t)),animation:!!o.EnableAnimation&&!P,animationDuration:300,animationDurationUpdate:150,textStyle:{fontFamily:"Inter,system-ui,sans-serif",color:a.text},aria:{enabled:!0,description:`${o.Title}. ${o.Description||""} Exact values and keyboard selection are in the data table.`},tooltip:H},d={axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:a.muted,fontSize:10,hideOverlap:!0},splitLine:{lineStyle:{color:a.border,type:"dashed"}}},r=m,u=r.Stacking==="Percent",b={...d,type:"category",data:r.Categories.map(e=>e.Label),axisLabel:{...d.axisLabel,width:Math.min(n==="polar"?100:140,K*.2),overflow:"truncate"},splitLine:{show:!1}},f={...d,type:"value",max:u?1:void 0,axisLabel:{...d.axisLabel,formatter:e=>u?`${Math.round(e*100)}%`:c(e,o,!0)}},g=(n==="bar"||n==="polar"&&r.PolarType!=="Line")&&(n==="polar"||!!r.Stacking&&r.Stacking!=="None"),k=r.Series.map((e,t)=>({id:e.Key,name:e.Label,type:n==="line"||n==="polar"&&r.PolarType==="Line"?"line":"bar",coordinateSystem:n==="polar"?"polar":"cartesian2d",stack:r.Stacking&&r.Stacking!=="None"?"total":void 0,smooth:r.LineStyle==="Smooth",step:r.LineStyle==="Step"?"middle":!1,connectNulls:!1,areaStyle:r.ShowArea?{opacity:.1}:void 0,barMaxWidth:38,symbol:T(t),symbolSize:8,itemStyle:{...h(l(e.Color,t),a.surface),decal:C(t,l(e.Color,t))},lineStyle:{width:2.5,color:l(e.Color,t),type:N(t)},label:{...M,color:g?p(l(e.Color,t)):p(a.surface),backgroundColor:g?l(e.Color,t):a.surface,position:g?"inside":n==="bar"&&r.Orientation==="Horizontal"?"right":"top",formatter:i=>u?`${Math.round(Number(i.value)*100)}%`:c(i.data.point.Value,o,!0)},labelLayout:{hideOverlap:!0},emphasis:{focus:"none",scale:!1},blur:{itemStyle:{opacity:1},lineStyle:{opacity:1},label:{opacity:1}},data:e.Values.map((i,S)=>({value:i===null?null:u?i/(r.Series.reduce((E,F)=>E+(F.Values[S]||0),0)||1):i,point:V(r.Categories[S].Key,e.Key),itemStyle:{...D(r.Categories[S].Key,e.Color,t),decal:C(t,l(e.Color,t))},emphasis:{itemStyle:z(l(e.Color,t))}}))}));return n==="polar"?{...x,legend:L,polar:{radius:["12%","72%"],center:["50%","55%"]},angleAxis:{...b,startAngle:90},radiusAxis:f,series:k}:{...x,legend:L,grid:{left:14,right:22,top:o.ShowLegend?48:20,bottom:16,containLabel:!0},xAxis:r.Orientation==="Horizontal"?f:b,yAxis:r.Orientation==="Horizontal"?{...b,inverse:!0}:f,series:k}}export{Q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-UGXWOWAG.js";import{f as t}from"./chunk-MR5VITXX.js";import{use as p}from"echarts/core";import{RadarChart as m}from"echarts/charts";import{RadarComponent as i}from"echarts/components";function h(a,o,e={}){return p([m,i]),t(a,"radar",o,e,r)}export{h as a};
|
package/dist/colors.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentColor, ChartColor } from './types.ts';
|
|
2
|
+
export declare function automaticPalette(dark: boolean): string[];
|
|
3
|
+
export declare const componentColors: readonly ["Default", "Primary", "Secondary", "Success", "Processing", "Warning", "Error", "Danger", "Magenta", "Red", "Volcano", "Orange", "Gold", "Lime", "Green", "Cyan", "Blue", "GeekBlue", "Purple"];
|
|
4
|
+
export declare const isComponentColor: (value: unknown) => value is ComponentColor;
|
|
5
|
+
export declare const isChartColor: (value: unknown) => value is ChartColor;
|
|
6
|
+
export declare function componentPalette(name: ComponentColor, dark: boolean, read?: (token: string) => string): {
|
|
7
|
+
soft: string;
|
|
8
|
+
solid: string;
|
|
9
|
+
text: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function resolveChartColor(color: ChartColor | undefined, automatic: string, dark: boolean, read?: (token: string) => string): string;
|
|
12
|
+
/** Match the linear RGB interpolation used by continuous ECharts color scales. */
|
|
13
|
+
export declare function interpolateColor(colors: string[], position: number): string;
|
|
14
|
+
/** Pick dark or white text with at least 4.5:1 contrast against an opaque mark. */
|
|
15
|
+
export declare function contrastText(color: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type * from './types.ts';
|
|
2
|
+
export type * from './catalogue-types.ts';
|
|
3
|
+
export { createLineChart } from './line.ts';
|
|
4
|
+
export { createBarChart } from './bar.ts';
|
|
5
|
+
export { createPieChart } from './pie.ts';
|
|
6
|
+
export { createDoughnutChart } from './doughnut.ts';
|
|
7
|
+
export { createScatterChart } from './scatter.ts';
|
|
8
|
+
export { createRadarChart } from './radar.ts';
|
|
9
|
+
export { createHeatmap } from './heatmap.ts';
|
|
10
|
+
export { createSparkline } from './sparkline.ts';
|
|
11
|
+
export type { BluSparklinePoint, SparklineOptions, SparklineEvents, SparklineInstance } from './sparkline.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.blu-chart__body{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}.blu-chart__body[data-legend-position=Top] .blu-chart__legend{grid-row:1}.blu-chart__body[data-legend-position=Bottom] .blu-chart__legend{grid-row:2}.blu-chart__body[data-legend-position=Left]{grid-template-columns:190px minmax(0,1fr);align-items:center}.blu-chart__body[data-legend-position=Right]{grid-template-columns:minmax(0,1fr) 190px;align-items:center}.blu-chart__body[data-legend-position=Left] .blu-chart__legend{grid-column:1;grid-row:1}.blu-chart__body[data-legend-position=Left] .blu-chart__stage,.blu-chart__body[data-legend-position=Right] .blu-chart__legend{grid-column:2;grid-row:1}.blu-chart__body[data-legend-position=Right] .blu-chart__stage{grid-column:1;grid-row:1}.blu-chart__body.blu-chart__body--no-legend{grid-template-columns:minmax(0,1fr);gap:0}.blu-chart__body--no-legend .blu-chart__stage{grid-column:1!important;grid-row:1!important}.blu-chart__legend{--legend-selected:color-mix(in srgb,var(--bluui-primary) 9%,var(--bluui-surface));min-width:0;padding:8px 20px 16px;font:12px/1.45 var(--bluui-font,Inter,system-ui,sans-serif);color:var(--bluui-text)}.blu-chart__legend-items{display:flex;flex-wrap:wrap;gap:8px}.blu-chart__legend-entry{min-width:0;max-width:100%;display:flex;align-items:center;gap:10px;border:1px solid transparent;background:transparent;color:inherit;font:inherit;text-align:left;padding:7px 8px;border-radius:8px;cursor:pointer;min-height:36px}.blu-chart__legend-entry:hover{background:var(--bluui-surface-muted)}.blu-chart__legend-entry[aria-pressed=true]{text-decoration:none;background:var(--legend-selected)}.blu-chart__legend-heading{display:flex;align-items:center;gap:7px;min-width:0}.blu-chart__legend-marker{display:flex;flex-shrink:0}.blu-chart__legend-text{overflow-wrap:anywhere}.blu-chart__legend-label{font-weight:500}.blu-chart__legend-detail,.blu-chart__legend-percent,.blu-chart__legend-note{font-size:11px;color:var(--bluui-text-muted)}.blu-chart__legend-numbers{display:flex;align-items:baseline;gap:10px;min-width:0;font-variant-numeric:tabular-nums}.blu-chart__legend-value{font-weight:600;letter-spacing:-.25px}.blu-chart__legend-check{visibility:hidden;margin-left:auto;color:var(--bluui-primary);font-weight:700;font-size:12px}[aria-pressed=true] .blu-chart__legend-check{visibility:visible}.blu-chart__legend[data-style=Standard] .blu-chart__legend-detail,.blu-chart__legend[data-style=Standard] .blu-chart__legend-check{display:none}.blu-chart__legend[data-style=Standard] .blu-chart__legend-value{font-size:11px;color:var(--bluui-text-muted)}.blu-chart__legend-track{display:none;height:3px;background:var(--bluui-border);border-radius:2px;overflow:hidden}.blu-chart__legend-track>span{display:block;height:100%}.blu-chart__legend-chip-host{min-width:0;max-width:100%}.blu-chart__legend .blu-chip.blu-chart__legend-chip{--chip-bg:transparent;--chip-fg:var(--bluui-text);--chip-border:var(--bluui-border);max-width:100%;box-shadow:none}.blu-chart__legend .blu-chart__legend-chip.blu-chip--selected{--chip-bg:var(--legend-selected);--chip-border:var(--bluui-primary);box-shadow:none}.blu-chart__legend .blu-chart__legend-chip .blu-chip__select{min-height:38px;padding:9px 12px;gap:10px;font:inherit;font-size:11px;text-align:left;justify-content:flex-start}.blu-chart__legend-chip .blu-chart__legend-label{font-weight:500}.blu-chart__legend-chip .blu-chart__legend-detail,.blu-chart__legend-chip .blu-chart__legend-check{display:none}.blu-chart__legend-chip [aria-pressed=true]{text-decoration:none}.blu-chart__legend-chip [aria-pressed=true] .blu-chart__legend-label{text-decoration:underline;text-underline-offset:3px}.blu-chart__legend-chip .blu-chart__legend-numbers{gap:7px;flex-wrap:wrap}.blu-chart__legend[data-style=ValueList] .blu-chart__legend-items,.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-items{display:grid;grid-template-columns:repeat(var(--legend-columns,1),minmax(0,1fr));gap:10px}.blu-chart__legend[data-style=ValueList] .blu-chart__legend-entry{display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:10px 11px;border:0}.blu-chart__legend[data-style=ValueList] .blu-chart__legend-numbers{margin-left:23px;justify-content:space-between}.blu-chart__legend[data-style=ValueList] .blu-chart__legend-value{font-size:19px;letter-spacing:-.4px;line-height:1.3}.blu-chart__legend[data-style=ValueList] .blu-chart__legend-detail{margin-left:23px}.blu-chart__legend[data-style=ValueList] .blu-chart__legend-track{display:block;margin:3px 0 0 23px}.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-entry{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;padding:12px;min-height:36px;align-self:start;border-color:var(--bluui-border);border-radius:12px}.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-entry[aria-pressed=true]{border-color:var(--bluui-primary)}.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-heading{font-size:11px}.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-numbers{flex-direction:column;align-items:stretch;gap:6px;margin-top:10px}.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-value{font-size:24px;letter-spacing:-.6px;line-height:1.2}.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-detail{margin-top:6px}.blu-chart__body:is([data-legend-position=Left],[data-legend-position=Right]) .blu-chart__legend{padding:8px 12px 16px}.blu-chart__body:is([data-legend-position=Left],[data-legend-position=Right]) .blu-chart__legend-items{display:flex;flex-direction:column}.blu-chart__body:is([data-legend-position=Left],[data-legend-position=Right]) .blu-chart__legend-entry{width:100%}.blu-chart__body:is([data-legend-position=Left],[data-legend-position=Right]) .blu-chart__legend[data-style=Standard] .blu-chart__legend-entry{flex-wrap:wrap;gap:4px 10px}.blu-chart__legend-scale{max-width:360px;min-width:0;margin:0 0 8px}.blu-chart__legend-scale-title{display:block;font-size:11px;font-weight:500;margin-bottom:10px;color:var(--bluui-text-muted)}.blu-chart__legend-gradient{height:8px;border-radius:4px}.blu-chart__legend-range{display:flex;justify-content:space-between;gap:12px;margin-top:8px;font-variant-numeric:tabular-nums}.blu-chart__legend[data-style=Compact] .blu-chart__legend-scale{padding:12px 16px;border:1px solid var(--bluui-border);border-radius:18px}.blu-chart__legend[data-style=ValueList] .blu-chart__legend-scale{padding:10px 11px}.blu-chart__legend[data-style=SummaryCards] .blu-chart__legend-scale{padding:16px;border:1px solid var(--bluui-border);border-radius:12px}.blu-chart__legend-note{display:block;margin-top:10px}@media(forced-colors:active){.blu-chart__legend-entry{border:1px solid ButtonText!important}.blu-chart__legend-entry[aria-pressed=true],.blu-chart__legend .blu-chart__legend-chip.blu-chip--selected{outline:1px solid Highlight}.blu-chart__legend-marker svg{forced-color-adjust:none}.blu-chart__legend-gradient{background:Canvas!important;border:1px solid CanvasText}}.blu-chart{width:100%;min-width:0;color:var(--bluui-text,#182230);background:var(--bluui-surface,#fff);font:13px/1.5 var(--blu-font-family,Inter,system-ui,sans-serif)}.blu-chart [hidden]{display:none!important}.blu-chart__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 16px 12px}.blu-chart__heading>div:first-child{min-width:0}.blu-chart__heading h3{margin:0;color:inherit;font-size:16px;font-weight:650;letter-spacing:-.3px;overflow-wrap:anywhere}.blu-chart__heading p{margin:5px 0 0;font-size:11px;color:var(--bluui-text-muted,#667085);line-height:1.6;overflow-wrap:anywhere}.blu-chart__export{display:flex;gap:5px;flex-shrink:0;margin-left:auto}.blu-chart__export :is(select,button){font:inherit;font-size:11px;border:1px solid var(--bluui-border,#ddd);color:inherit;border-radius:6px;background:var(--bluui-surface,#fff);min-height:34px;padding:6px 8px;cursor:pointer}.blu-chart__export button:disabled{opacity:.5;cursor:default}.blu-chart__stage{position:relative;min-width:0}.blu-chart__plot{width:100%;min-width:0}.blu-chart__state{position:absolute;inset:0;display:grid;place-items:center;background:var(--bluui-surface-muted,#f8f8fa);color:var(--bluui-text-muted,#667085);padding:20px;text-align:center}.blu-chart__state--loading{grid-template-rows:minmax(0,1fr) auto;gap:14px;place-items:stretch;background:var(--bluui-surface,#fff);padding:16px}.blu-chart__skeleton{display:flex;flex-direction:column;gap:24px;min-width:0;min-height:0}.blu-chart__skeleton-key{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.blu-chart__skeleton-plot{flex:1;min-height:0}.blu-chart__skeleton-plot>div{height:100%}.blu-chart__state-message{font-size:12px}.blu-chart__data{margin:12px 16px 0;border-top:1px solid var(--bluui-border,#ddd);font-size:11px}.blu-chart__data summary{cursor:pointer;padding:12px 0;color:var(--bluui-text-muted,#667085)}.blu-chart__data--compact{margin-top:0;border-top:0}.blu-chart__data--compact summary{padding:6px 0}.blu-chart__table{overflow:auto;max-height:320px}.blu-chart__table table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:11px;font-variant-numeric:tabular-nums}.blu-chart__table caption{text-align:left;color:var(--bluui-text-muted,#667085);padding:8px}.blu-chart__table th,.blu-chart__table td{padding:8px;border-bottom:1px solid var(--bluui-border,#ddd);text-align:right}.blu-chart__table th:first-child{text-align:left}.blu-chart__table button{font:inherit;color:var(--bluui-primary,#6557e8);background:transparent;border:0;border-radius:3px;padding:5px;cursor:pointer}.blu-chart__table button[aria-pressed=true]{background:var(--bluui-selected,#eeeaff);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px;font-weight:700}.blu-chart :is(button,select,summary,[tabindex]):focus-visible{outline:2px solid var(--bluui-primary,#6557e8);outline-offset:2px}.blu-chart__status{font-size:11px;color:var(--bluui-text-muted,#667085);margin:0 16px}.blu-chart__status:not(:empty){padding:8px 0}@media(max-width:640px){.blu-chart__heading{flex-wrap:wrap;padding-inline:12px}.blu-chart__export{margin-left:0}.blu-chart__data{margin-inline:12px}}.blu-chart__navigation{display:flex;flex-wrap:wrap;gap:6px;padding:8px 16px}.blu-chart__navigation button{min-width:32px;min-height:32px;padding:5px 9px;font:inherit;font-size:12px;color:var(--bluui-text);background:var(--bluui-surface);border:1px solid var(--bluui-control-border);border-radius:5px;cursor:pointer}.blu-chart__stage[tabindex]:focus-visible{outline-offset:-3px}.blu-chart__state-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.blu-chart__patterns{display:flex;align-items:center;gap:8px;font-size:12px;padding:6px 0 12px;cursor:pointer}.blu-chart__patterns input{width:24px;height:24px;margin:0;accent-color:var(--bluui-color-primary-solid)}.blu-chart__missing-note{margin:8px 12px;color:var(--bluui-text-muted);font-size:12px;line-height:1.5}.blu-chart .blu-chart__patterns input[type=checkbox]{-webkit-appearance:none;appearance:none;box-sizing:border-box;position:relative;display:inline-block;flex:0 0 22px;width:22px;height:22px;min-width:22px;min-height:22px;margin:0;padding:0;border:1.5px solid var(--bluui-control-border,#7b8799);border-radius:6px;background-color:var(--bluui-surface,#fff);background-image:none;box-shadow:0 1px 2px #0f172a0f;vertical-align:middle;cursor:pointer;opacity:1;filter:none;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease}.blu-chart .blu-chart__patterns input[type=checkbox]:after{content:none}.blu-chart .blu-chart__patterns input[type=checkbox]:checked,.blu-chart .blu-chart__patterns input[type=checkbox]:indeterminate{border-color:var(--bluui-color-primary-solid,#4f46e5);background-color:var(--bluui-color-primary-solid,#4f46e5)}.blu-chart .blu-chart__patterns input[type=checkbox]:checked:after,.blu-chart .blu-chart__patterns input[type=checkbox]:indeterminate:after{content:"";box-sizing:content-box;position:absolute;width:10px;height:6px;inset:5px auto auto 4px;border:solid var(--bluui-color-primary-contrast,#fff);border-width:0 0 2px 2px;border-radius:0;background:none;-webkit-mask:none;mask:none;transform:rotate(-45deg);pointer-events:none}.blu-chart .blu-chart__patterns input[type=checkbox]:indeterminate:after{height:0;top:8px;border-width:0 0 2px;transform:none}.blu-chart .blu-chart__patterns input[type=checkbox]:hover:not(:disabled){border-color:var(--bluui-color-primary-solid,#4f46e5);box-shadow:0 0 0 3px var(--bluui-color-primary-soft,#eef2ff)}.blu-chart .blu-chart__patterns input[type=checkbox]:focus-visible{outline:2px solid var(--bluui-color-primary-solid,#4f46e5);outline-offset:3px}.blu-chart .blu-chart__patterns input[type=checkbox]:disabled{border-color:var(--bluui-border-strong,#b8c4d4);background-color:var(--bluui-surface-muted,#f7f8fb);box-shadow:none;cursor:not-allowed}.blu-chart .blu-chart__patterns input[type=checkbox]:disabled:checked,.blu-chart .blu-chart__patterns input[type=checkbox]:disabled:indeterminate{border-color:var(--bluui-text-muted,#5c6b80);background-color:var(--bluui-text-muted,#5c6b80)}@media(prefers-reduced-motion:reduce){.blu-chart .blu-chart__patterns input[type=checkbox]{transition:none}}.blu-chart .blu-chart__patterns input[type=checkbox]:before{content:none}@media(forced-colors:active){.blu-chart .blu-chart__patterns input[type=checkbox],.blu-chart .blu-chart__patterns input[type=checkbox]:checked,.blu-chart .blu-chart__patterns input[type=checkbox]:indeterminate,.blu-chart .blu-chart__patterns input[type=checkbox]:disabled,.blu-chart .blu-chart__patterns input[type=checkbox]:disabled:checked,.blu-chart .blu-chart__patterns input[type=checkbox]:disabled:indeterminate{-webkit-appearance:checkbox;appearance:auto;background:revert;border:revert;box-shadow:none;forced-color-adjust:auto}.blu-chart .blu-chart__patterns input[type=checkbox]:checked:after,.blu-chart .blu-chart__patterns input[type=checkbox]:indeterminate:after{content:none}}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OptionsByKind, ChartPoint } from './catalogue-types.ts';
|
|
2
|
+
import type { ChartEvents } from './types.ts';
|
|
3
|
+
export type { OptionsByKind, ChartPoint } from './catalogue-types.ts';
|
|
4
|
+
export type DoughnutChartOptions = OptionsByKind['doughnut'];
|
|
5
|
+
export declare function createDoughnutChart(host: HTMLElement, options: DoughnutChartOptions, events?: ChartEvents<ChartPoint>): import("./types.ts").ChartInstance<import("./catalogue-types.ts").CircularOptions>;
|
package/dist/doughnut.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-LUUPBBD4.js";import"./chunk-UQMMBG26.js";import"./chunk-MR5VITXX.js";import"./chunk-RC2TCMJF.js";export{a as createDoughnutChart};
|
package/dist/export.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type LegendExportLayout } from './legend-export.ts';
|
|
2
|
+
import type { EChartsType } from 'echarts/core';
|
|
3
|
+
import type { ChartFormat, ChartOptions } from './types.ts';
|
|
4
|
+
export declare function saveBlob(blob: Blob, filename: string): void;
|
|
5
|
+
export declare function exportImage(chart: EChartsType, options: ChartOptions, format: ChartFormat, filename: string, surface: string, text: string, muted: string, legend?: LegendExportLayout, signal?: AbortSignal): Promise<void>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts) DMSans-Italic[opsz,wght].ttf: Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-ThinItalic.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-ExtraLight.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-ExtraLightItalic.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-Light.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-LightItalic.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-Regular.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-Italic.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-Medium.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-MediumItalic.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-SemiBold.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-SemiBoldItalic.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-Bold.ttf: Copyright 2017 IBM Corp. All rights reserved. IBMPlexMono-BoldItalic.ttf: Copyright 2017 IBM Corp. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|