@skdx/web-components-charts 0.48.0 → 0.49.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.
Files changed (173) hide show
  1. package/dist/area.cjs +30 -30
  2. package/dist/area.d.cts +2 -2
  3. package/dist/area.d.ts +2 -2
  4. package/dist/area.js +32 -32
  5. package/dist/bar.cjs +30 -30
  6. package/dist/bar.d.cts +2 -2
  7. package/dist/bar.d.ts +2 -2
  8. package/dist/bar.js +34 -34
  9. package/dist/boxplot.cjs +40 -40
  10. package/dist/boxplot.d.cts +2 -2
  11. package/dist/boxplot.d.ts +2 -2
  12. package/dist/boxplot.js +38 -38
  13. package/dist/bubble.cjs +40 -40
  14. package/dist/bubble.d.cts +2 -2
  15. package/dist/bubble.d.ts +2 -2
  16. package/dist/bubble.js +39 -39
  17. package/dist/bullet.cjs +38 -38
  18. package/dist/bullet.d.cts +2 -2
  19. package/dist/bullet.d.ts +2 -2
  20. package/dist/bullet.js +40 -40
  21. package/dist/bump.cjs +39 -39
  22. package/dist/bump.d.cts +2 -2
  23. package/dist/bump.d.ts +2 -2
  24. package/dist/bump.js +40 -40
  25. package/dist/candlestick.cjs +29 -29
  26. package/dist/candlestick.d.cts +2 -2
  27. package/dist/candlestick.d.ts +2 -2
  28. package/dist/candlestick.js +35 -35
  29. package/dist/chord.cjs +35 -35
  30. package/dist/chord.d.cts +2 -2
  31. package/dist/chord.d.ts +2 -2
  32. package/dist/chord.js +39 -39
  33. package/dist/circle-packing.cjs +37 -37
  34. package/dist/circle-packing.d.cts +2 -2
  35. package/dist/circle-packing.d.ts +2 -2
  36. package/dist/circle-packing.js +38 -38
  37. package/dist/combo.cjs +30 -30
  38. package/dist/combo.d.cts +2 -2
  39. package/dist/combo.d.ts +2 -2
  40. package/dist/combo.js +34 -34
  41. package/dist/contracts.json +17886 -0
  42. package/dist/dumbbell.cjs +40 -40
  43. package/dist/dumbbell.d.cts +2 -2
  44. package/dist/dumbbell.d.ts +2 -2
  45. package/dist/dumbbell.js +39 -39
  46. package/dist/funnel.cjs +36 -36
  47. package/dist/funnel.d.cts +2 -2
  48. package/dist/funnel.d.ts +2 -2
  49. package/dist/funnel.js +36 -36
  50. package/dist/gantt.cjs +36 -36
  51. package/dist/gantt.d.cts +2 -2
  52. package/dist/gantt.d.ts +2 -2
  53. package/dist/gantt.js +39 -39
  54. package/dist/gauge.cjs +38 -38
  55. package/dist/gauge.d.cts +2 -2
  56. package/dist/gauge.d.ts +2 -2
  57. package/dist/gauge.js +37 -37
  58. package/dist/heatmap.cjs +38 -38
  59. package/dist/heatmap.d.cts +2 -2
  60. package/dist/heatmap.d.ts +2 -2
  61. package/dist/heatmap.js +39 -39
  62. package/dist/histogram.cjs +30 -30
  63. package/dist/histogram.d.cts +2 -2
  64. package/dist/histogram.d.ts +2 -2
  65. package/dist/histogram.js +34 -34
  66. package/dist/icicle.cjs +40 -40
  67. package/dist/icicle.d.cts +2 -2
  68. package/dist/icicle.d.ts +2 -2
  69. package/dist/icicle.js +40 -40
  70. package/dist/{index-Hexgp_4S.d.cts → index-BkR4iVqI.d.ts} +8 -3
  71. package/dist/{index-pqdWxinA.d.ts → index-DjnBT-5R.d.cts} +8 -3
  72. package/dist/index.cjs +37 -37
  73. package/dist/index.d.cts +24 -4
  74. package/dist/index.d.ts +24 -4
  75. package/dist/index.js +38 -38
  76. package/dist/line.cjs +30 -30
  77. package/dist/line.d.cts +2 -2
  78. package/dist/line.d.ts +2 -2
  79. package/dist/line.js +32 -32
  80. package/dist/linear-gauge.cjs +35 -35
  81. package/dist/linear-gauge.d.cts +2 -2
  82. package/dist/linear-gauge.d.ts +2 -2
  83. package/dist/linear-gauge.js +40 -40
  84. package/dist/map.cjs +39 -39
  85. package/dist/map.d.cts +2 -2
  86. package/dist/map.d.ts +2 -2
  87. package/dist/map.js +37 -37
  88. package/dist/marimekko.cjs +40 -40
  89. package/dist/marimekko.d.cts +2 -2
  90. package/dist/marimekko.d.ts +2 -2
  91. package/dist/marimekko.js +38 -38
  92. package/dist/network.cjs +37 -37
  93. package/dist/network.d.cts +2 -2
  94. package/dist/network.d.ts +2 -2
  95. package/dist/network.js +38 -38
  96. package/dist/organization.cjs +38 -38
  97. package/dist/organization.d.cts +2 -2
  98. package/dist/organization.d.ts +2 -2
  99. package/dist/organization.js +36 -36
  100. package/dist/parallel.cjs +38 -38
  101. package/dist/parallel.d.cts +2 -2
  102. package/dist/parallel.d.ts +2 -2
  103. package/dist/parallel.js +40 -40
  104. package/dist/pareto.cjs +25 -25
  105. package/dist/pareto.d.cts +2 -2
  106. package/dist/pareto.d.ts +2 -2
  107. package/dist/pareto.js +24 -24
  108. package/dist/pie.cjs +36 -36
  109. package/dist/pie.d.cts +2 -2
  110. package/dist/pie.d.ts +2 -2
  111. package/dist/pie.js +40 -40
  112. package/dist/polar-area.cjs +38 -38
  113. package/dist/polar-area.d.cts +2 -2
  114. package/dist/polar-area.d.ts +2 -2
  115. package/dist/polar-area.js +40 -40
  116. package/dist/portable.d.cts +1 -1
  117. package/dist/portable.d.ts +1 -1
  118. package/dist/radar.cjs +40 -40
  119. package/dist/radar.d.cts +2 -2
  120. package/dist/radar.d.ts +2 -2
  121. package/dist/radar.js +40 -40
  122. package/dist/radial.cjs +36 -36
  123. package/dist/radial.d.cts +2 -2
  124. package/dist/radial.d.ts +2 -2
  125. package/dist/radial.js +38 -38
  126. package/dist/range.cjs +28 -28
  127. package/dist/range.d.cts +2 -2
  128. package/dist/range.d.ts +2 -2
  129. package/dist/range.js +28 -28
  130. package/dist/sankey.cjs +40 -40
  131. package/dist/sankey.d.cts +2 -2
  132. package/dist/sankey.d.ts +2 -2
  133. package/dist/sankey.js +40 -40
  134. package/dist/scatter.cjs +40 -40
  135. package/dist/scatter.d.cts +2 -2
  136. package/dist/scatter.d.ts +2 -2
  137. package/dist/scatter.js +39 -39
  138. package/dist/sparkline.cjs +36 -36
  139. package/dist/sparkline.d.cts +2 -2
  140. package/dist/sparkline.d.ts +2 -2
  141. package/dist/sparkline.js +37 -37
  142. package/dist/sunburst.cjs +38 -38
  143. package/dist/sunburst.d.cts +2 -2
  144. package/dist/sunburst.d.ts +2 -2
  145. package/dist/sunburst.js +40 -40
  146. package/dist/swarm.cjs +40 -40
  147. package/dist/swarm.d.cts +2 -2
  148. package/dist/swarm.d.ts +2 -2
  149. package/dist/swarm.js +39 -39
  150. package/dist/timeline.cjs +38 -38
  151. package/dist/timeline.d.cts +2 -2
  152. package/dist/timeline.d.ts +2 -2
  153. package/dist/timeline.js +40 -40
  154. package/dist/tree.cjs +38 -38
  155. package/dist/tree.d.cts +2 -2
  156. package/dist/tree.d.ts +2 -2
  157. package/dist/tree.js +36 -36
  158. package/dist/treemap.cjs +40 -40
  159. package/dist/treemap.d.cts +2 -2
  160. package/dist/treemap.d.ts +2 -2
  161. package/dist/treemap.js +38 -38
  162. package/dist/{types-DPf3PUs2.d.cts → types-5xXhTghj.d.cts} +1 -1
  163. package/dist/{types-DPf3PUs2.d.ts → types-5xXhTghj.d.ts} +1 -1
  164. package/dist/waffle.cjs +40 -40
  165. package/dist/waffle.d.cts +2 -2
  166. package/dist/waffle.d.ts +2 -2
  167. package/dist/waffle.js +40 -40
  168. package/dist/waterfall.cjs +37 -37
  169. package/dist/waterfall.d.cts +2 -2
  170. package/dist/waterfall.d.ts +2 -2
  171. package/dist/waterfall.js +38 -38
  172. package/dist/wrapper-api.json +1849 -0
  173. package/package.json +8 -6
package/dist/bubble.cjs CHANGED
@@ -1,62 +1,62 @@
1
- "use strict";var Me=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var On=Object.getOwnPropertyNames;var Ln=Object.prototype.hasOwnProperty;var Rn=(e,n)=>{for(var t in n)Me(e,t,{get:n[t],enumerable:!0})},Pn=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of On(n))!Ln.call(e,i)&&i!==t&&Me(e,i,{get:()=>n[i],enumerable:!(r=Gt(n,i))||r.enumerable});return e};var Nn=e=>Pn(Me({},"__esModule",{value:!0}),e),x=(e,n,t,r)=>{for(var i=r>1?void 0:r?Gt(n,t):n,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(n,t,i):a(i))||i);return r&&i&&Me(n,t,i),i};var sr={};Rn(sr,{SkdxBubbleChart:()=>N});module.exports=Nn(sr);var F=require("lit/decorators.js");var jt=e=>Number(e.toPrecision(12)),Bn,Dn=e=>(Bn??(Bn=new Intl.NumberFormat)).format(jt(e)),Fn=e=>{let n=Math.round(Math.abs(e)),t=e<0?"-":"",r=Math.floor(n/3600),i=Math.floor(n%3600/60),o=a=>String(a).padStart(2,"0");return r>0?`${t}${r}h ${o(i)}m`:i>0?`${t}${i}m ${o(n%60)}s`:`${t}${n}s`};function ae(e){if(e===void 0)return Dn;if(typeof e=="function")return e;let{style:n,locale:t,digits:r,unit:i="",timeZone:o}=e,a=d=>i?u=>d(u)+i:d,l=d=>r===void 0?d===void 0?{}:{maximumFractionDigits:d}:{minimumFractionDigits:r,maximumFractionDigits:r},s=d=>{let u=new Intl.NumberFormat(t,d);return a(m=>u.format(jt(m)))},c=d=>{let u=new Intl.DateTimeFormat(t,o?{...d,timeZone:o}:d);return m=>u.format(m)};switch(n){case"integer":return s({maximumFractionDigits:0});case"decimal":return s(l(2));case"percent":return s({style:"percent",...l(0)});case"currency":return s({style:"currency",currency:e.currency??"USD",...l()});case"compact":return s({notation:"compact",...l(1)});case"scientific":return s({notation:"scientific",...l(2)});case"date":return c({dateStyle:"medium"});case"time":return c({timeStyle:"short"});case"datetime":return c({dateStyle:"medium",timeStyle:"short"});case"duration":return a(Fn)}}var _t=e=>{if(e instanceof Date)return e.getTime();if(typeof e=="number")return e;let n=Number(e);return Number.isFinite(n)&&e.trim()!==""?n:Date.parse(e)};function Se([e,n],[t,r]){let i=n-e;return o=>i===0?t:t+(o-e)/i*(r-t)}function $e(e,n,t=5){if(e===n)return[e];let r=(n-e)/Math.max(1,t),i=10**Math.floor(Math.log10(r)),o=r/i,a=(o<1.5?1:o<3.5?2:o<7.5?5:10)*i,l=Math.floor(e/a)*a,s=Math.ceil(n/a)*a,c=[];for(let d=l;d<=s+a/2;d+=a)c.push(Et(d));return c}var Et=e=>Number(e.toPrecision(12)),h=e=>Number(e.toFixed(2)),X=e=>typeof e=="number"&&Number.isFinite(e);function se(e){let n=1/0,t=-1/0;for(let r of e)X(r)&&(r<n&&(n=r),r>t&&(t=r));return n===1/0?[0,0]:[n,t]}function Ht(e,n="linear"){if(e.length===0)return"";let t=e[0];if(n==="step"||n==="stepBefore"||n==="stepAfter"){let c=`M${t.x} ${t.y}`;for(let d=1;d<e.length;d++){let u=e[d-1],m=e[d];n==="stepAfter"?c+=`H${m.x}V${m.y}`:n==="stepBefore"?c+=`V${m.y}H${m.x}`:c+=`H${h((u.x+m.x)/2)}V${m.y}H${m.x}`}return c}if(n==="linear"||e.length<3)return`M${e.map(c=>`${c.x} ${c.y}`).join("L")}`;let r=e.length,i=e.slice(1).map((c,d)=>c.x-e[d].x),o=e.slice(1).map((c,d)=>c.y-e[d].y),a=i.map((c,d)=>c===0?0:o[d]/c),l=[a[0]];for(let c=1;c<r-1;c++){let d=a[c-1],u=a[c];l.push(d*u<=0?0:(d+u)/2)}l.push(a[r-2]);for(let c=0;c<r-1;c++){let d=a[c];if(d===0){l[c]=0,l[c+1]=0;continue}let u=l[c]/d,m=l[c+1]/d,y=Math.hypot(u,m);y>3&&(l[c]=3*u*d/y,l[c+1]=3*m*d/y)}let s=`M${t.x} ${t.y}`;for(let c=0;c<r-1;c++){let d=e[c],u=e[c+1],m=i[c]/3;s+=`C${h(d.x+m)} ${h(d.y+m*l[c])} ${h(u.x-m)} ${h(u.y-m*l[c+1])} ${u.x} ${u.y}`}return s}var pe=1e3,fe=60*pe,me=60*fe,ke=24*me,dr=[pe,5*pe,15*pe,30*pe,fe,5*fe,15*fe,30*fe,me,3*me,6*me,12*me,ke,2*ke,7*ke,14*ke];function Vt(e,n){let t=Math.floor(Math.log10(e)),r=Math.ceil(Math.log10(n)),i=r-t<=1?[1,2,5]:[1],o=[];for(let a=t;a<=r;a++)for(let l of i)o.push(Et(l*10**a));return o.filter(a=>a>=e/1.0001&&a<=n*1.0001)}var Gn=/-?\d*\.?\d+(?:e[-+]?\d+)?/gi,jn=/([MLTHVCSQAZmlthvcsqaz])([^MLTHVCSQAZmlthvcsqaz]*)/g,_n={M:2,L:2,T:2,C:6,S:4,Q:4,A:7,H:-1,V:-2};function En(e,n,t){return e.replace(jn,(r,i,o)=>{let a=_n[i];if(a===void 0)return i+o;let s=(o.match(Gn)??[]).map((c,d)=>{let u=Number(c);if(a===-1)return String(u+n);if(a===-2)return String(u+t);let m=d%a;return a===7?m===5?String(u+n):m===6?String(u+t):c:String(m%2===0?u+n:u+t)});return i+s.join(" ")})}var Zt=(e,n,t)=>e.map(r=>{switch(r.kind){case"rect":return{...r,x:r.x+n,y:r.y+t};case"circle":return{...r,cx:r.cx+n,cy:r.cy+t};case"line":return{...r,x1:r.x1+n,x2:r.x2+n,y1:r.y1+t,y2:r.y2+t};case"text":return{...r,x:r.x+n,y:r.y+t};case"path":return{...r,d:En(r.d,n,t)}}});var _e=["primary","success","warning","danger","neutral"].flatMap(e=>[500,700].map(n=>`var(--skdx-color-${e}-${n})`)).sort((e,n)=>Number(e.endsWith("700)"))-Number(n.endsWith("700)"))),$={axis:"var(--skdx-color-border-strong)",grid:"var(--skdx-color-border-subtle)",label:"var(--skdx-color-text-muted)",focus:"var(--skdx-color-focus-ring)",positive:"var(--skdx-color-success-500)",negative:"var(--skdx-color-danger-500)",fontFamily:"var(--skdx-font-family)",fontSize:"var(--skdx-font-size-xs)"},Ce=(e="neutral")=>e==="neutral"?$.axis:`var(--skdx-color-${e}-500)`,Ee=(e="neutral")=>e==="neutral"?$.label:e==="primary"?"var(--skdx-color-text-accent)":`var(--skdx-color-text-${e})`,Wt=(e,n)=>n??_e[e%_e.length];var le={top:16,right:16,bottom:32,left:48};function Ut(e,n,t=le){return{x:t.left,y:t.top,width:Math.max(0,e-t.left-t.right),height:Math.max(0,n-t.top-t.bottom)}}function be(e){let n=e.legend;if(n)return n===!0?{}:n.enabled===!1?void 0:n}function qt(e){let n=e.tooltip;return n===void 0||n===!0?{enabled:!0}:n===!1?{enabled:!1}:{...n,enabled:n.enabled??!0}}var Ie=20,Hn=120,Kt=e=>{let n=be(e);return n&&(n.position==="left"||n.position==="right")?n.width??Hn:0},Te=(e,n=600,t=300)=>({width:(e.width??n)-Kt(e),height:(e.height??t)-(be(e)?.position==="bottom"?Ie:0)}),Yt=(e,n,t)=>{let r=be(e);return!r||!(r.position===void 0||r.position==="top")?0:(n?Math.max(1,Jt(n,t??Te(e).width,r)):1)*Ie},_=6.5;function Ve(e,n){let t=Array.from(e),r=Math.max(0,Math.floor(n/_));return t.length<=r?e:r===0?"":`${t.slice(0,r-1).join("")}\u2026`}var Ae=(e,n,t)=>t??(e.palette&&e.palette.length>0?e.palette[n%e.palette.length]:Wt(n)),Xt=(e,n)=>e.hiddenSeries?.includes(n)??!1;function He(e,n,t=[],r={},i=10,o=8,a=!1){let l=[],s=r.maxItems,c=s!==void 0&&s>=0&&e.length>s?e.slice(0,s):e,d=e.length-c.length,u=r.interactive??!0,m=o,y=i,b=(p,f,g,M)=>{let I=(f?18:4)+p.length*_;m>o&&(a||m+I>n-8)&&(m=o,y+=Ie),f&&l.push({kind:"rect",part:"legend-swatch",x:m,y:y-5,width:10,height:10,fill:f,opacity:M?.3:void 0,item:g}),l.push({kind:"text",part:"legend-label",x:m+(f?14:0),y,text:p,baseline:"middle",fill:M?$.grid:$.label,item:g}),m+=I+12};for(let p of c){let f=t.includes(p.name),g=u?{label:p.name,series:p.name,legend:!0}:void 0;b(r.formatter?.(p.name)??p.name,p.color,g,f)}return d>0&&b(`+${d} more`,void 0,void 0,!1),r.align==="end"?Vn(l,n):l}function Vn(e,n){let t=new Map;for(let i of e){let o=i.kind==="rect"?i.y+5:i.y;t.set(o,[...t.get(o)??[],i])}let r=[];for(let i of t.values()){let o=Math.max(...i.map(l=>l.kind==="rect"?l.x+l.width:l.x+l.text.length*_)),a=n-8-o;for(let l of i)r.push({...l,x:l.x+a})}return r}var Jt=(e,n,t={})=>new Set(He(e,n,[],t).flatMap(r=>r.kind==="text"?[r.y]:[])).size;function Ze(e,n,t,r=[]){let i=be(e),o=i&&e.direction==="rtl"&&i.align===void 0?{...i,align:"end"}:i,a=qt(e),l=o?.position==="bottom",s=Kt(e),c=e.hiddenSeries??[],d=o?s?He(r,1/0,c,o,10,(o.position==="right"?n:0)+8,!0):He(r,n,c,o,l?t+10:10):[],u=l?Jt(r,n,o):0;return{width:n+s,height:l?t+Math.max(1,u)*Ie:t,legendOffset:o?.position==="left"?s:void 0,tooltip:a.enabled,tooltipFormatter:a.formatter,axisTooltipFormatter:a.axisFormatter,tooltipPortal:a.portal,tooltipPlacement:a.placement,tooltipAnchored:a.followPointer===!1?!0:void 0,description:e.description,decorative:e.decorative,animate:e.animate===!0?300:e.animate||void 0,responsive:!!e.responsive,shapes:d}}function We(e){let n=e.legendOffset;if(!n)return e;let t=[...Zt(e.shapes.filter(s=>!s.part.startsWith("legend-")),n,0),...e.shapes.filter(s=>s.part.startsWith("legend-"))],r=s=>({...s,x:s.x+n}),i=e.hit?{...e.hit,plot:r(e.hit.plot),xs:e.hit.xs.map(s=>s+n),brush:e.hit.brush?{box:r(e.hit.brush.box),window:r(e.hit.brush.window)}:void 0}:void 0,o=e.edit,a=o?{...o,scale:s=>o.scale(s)+n,invert:s=>o.invert(s-n),bars:o.bars.map(s=>({...s,x0:s.x0+n,x1:s.x1+n}))}:void 0,l=e.map?{...e.map,plot:r(e.map.plot)}:void 0;return{...e,shapes:t,hit:i,edit:a,map:l,legendOffset:void 0}}function ze(e,n,t,r,i,o="auto"){let a=Array.isArray(t)?t:[t],l=Math.max(1,Math.floor((r-12)/_)),s=a.flatMap(f=>{let g=[],M=Array.from(f);for(;M.length>l;){let I=M.slice(0,l+1).lastIndexOf(" ");I<1&&(I=l),g.push(M.slice(0,I).join("")),M=M.slice(I),M[0]===" "&&M.shift()}return g.push(M.join("")),g}),c=Math.max(1,Math.floor((i-6)/16)),d=s.slice(0,c);s.length>c&&(d[c-1]=Ve(`${d[c-1]}\u2026`,r-12));let u=Math.min(r,Math.max(0,...d.map(f=>Array.from(f).length))*_+12),m=Math.min(i,6+d.length*16),y=o==="top"?{x:e-u/2,y:n-m-8}:o==="bottom"?{x:e-u/2,y:n+8}:o==="left"?{x:e-u-8,y:n-m/2}:o==="right"?{x:e+8,y:n-m/2}:{x:e+12,y:n-m-6},b=Math.max(0,Math.min(r-u,y.x)),p=Math.max(0,Math.min(i-m,y.y));return[{kind:"rect",part:"tooltip",title:a.join(`
2
- `),x:h(b),y:h(p),width:h(u),height:m,fill:"var(--skdx-color-surface-raised)",stroke:$.axis,rx:8},...d.map((f,g)=>({kind:"text",part:"tooltip-label",x:h(b+6),y:h(p+11+g*16),text:f,baseline:"middle",fill:"var(--skdx-color-text-default)",weight:d.length>1&&g===0?"bold":void 0}))]}function Ue(e,n){let[t,r]=se(e);return n?[Math.min(0,t),Math.max(0,r)]:[t,r]}function qe([e,n],t,r=!1,i){let o=typeof r=="boolean"?{scale:r?"log":"linear"}:r,a=ae(o.format??i),l=o.min??e,s=o.max??n;o.reversed&&(t=[t[1],t[0]]);let c={id:o.id,position:o.position,options:o};if(o.scale==="sqrt"){let p=k=>Math.sign(k)*Math.sqrt(Math.abs(k)),f=o.nice===!1?[l,s]:$e(l,s,o.ticks),g=o.min??f[0],M=o.max??f[f.length-1],I=Se([p(g),p(M)],t),L=k=>I(p(k)),O=$e(g,M,o.ticks).filter(k=>k>=g-1e-9&&k<=M+1e-9);return{...c,scale:L,domain:[g,M],format:a,ticks:(O.length>=2?O:[g,M]).map(k=>({pos:h(L(k)),label:a(k)})),zero:h(L(Math.min(Math.max(0,g),M)))}}if(o.scale==="log"){let p=Math.max(l,Number.EPSILON),f=Math.max(s,p),g=Vt(p,f),M=[Math.log10(p),Math.log10(f)],I=Se(M,t),L=O=>I(Math.log10(Math.max(O,Number.EPSILON)));return{...c,scale:L,domain:M,format:a,ticks:g.map(O=>({pos:h(L(O)),label:a(O)})),zero:h(t[0])}}let d=$e(l,s,o.ticks),u=[o.min??(o.nice===!1?l:d[0]),o.max??(o.nice===!1?s:d[d.length-1])],m=Se(u,t),y=d.filter(p=>p>=u[0]-1e-9&&p<=u[1]+1e-9),b=(y.length>=2?y:[u[0],u[1]]).map(p=>({pos:h(m(p)),label:a(p)}));return{...c,scale:m,domain:u,format:a,ticks:b,zero:h(m(Math.min(Math.max(0,u[0]),u[1])))}}function Qt(e,n){if(e.length<2)return e;let t=e.reduce((i,o)=>Math.max(i,o.label.length),0)*_+8,r=Math.max(1,Math.ceil(e.length*t/Math.max(1,n)));return r===1?e:e.filter((i,o)=>o%r===0)}function en(e,n,t,r){let i=e.error!==void 0?"error":e.loading?"loading":n?"empty":null;if(!i)return null;let{width:o,height:a}=Te(e,t,r),l=i==="error"?e.error:i==="loading"?"Loading\u2026":e.emptyMessage??"No data available",s=[];return i==="loading"&&s.push({kind:"rect",part:"skeleton",x:0,y:0,width:o,height:a,fill:"var(--skdx-color-surface-sunken)",rx:8}),s.push({kind:"text",part:`state-${i}`,x:h(o/2),y:h(a/2),text:l,anchor:"middle",baseline:"middle",fill:i==="error"?"var(--skdx-color-text-danger)":$.label}),{...Ze(e,o,a),shapes:s,tooltip:!1}}var Oe=(e,n,t)=>{let r=n.length*_/2;return e+r>t?"end":e-r<0?"start":"middle"};function tn(e,n={}){let{plot:t,xTicks:r,yTicks:i,baseline:o}=e,a=t.x+t.width,l=t.y+t.height,s=[],c=n.grid??!0,d=(b,p)=>p?{kind:"line",part:"grid",x1:b.pos,x2:b.pos,y1:t.y,y2:l,stroke:$.grid}:{kind:"line",part:"grid",x1:t.x,x2:a,y1:b.pos,y2:b.pos,stroke:$.grid},u=n.x?.tickRotation??0,m=(b,p,f,g)=>u?R(b,p,f,{part:g,anchor:u<0?"end":"start",baseline:"middle",rotate:u}):Zn(b,p,f,e.width,{part:g,anchor:Oe(b,f,e.width)}),y=(b,p,f,g,M)=>{for(let I of b)s.push(p==="x"?{kind:"line",part:"tick",x1:I.pos,x2:I.pos,y1:f,y2:h(f+g*M),stroke:$.axis}:{kind:"line",part:"tick",x1:f,x2:h(f+g*M),y1:I.pos,y2:I.pos,stroke:$.axis})};if(n.categoryGrid)for(let b of r)s.push(d(b,!n.horizontal));if(n.horizontal){let b=n.axes??[{ticks:i,position:"bottom",offset:0,label:n.yLabel,...n.y}];if(c)for(let p of i)s.push(d(p,!0));b[0]?.showLine!==!1&&s.push({kind:"line",part:"axis",x1:o,x2:o,y1:t.y,y2:l,stroke:$.axis});for(let p of b){let f=p.position==="top"||p.position==="right",g=h(f?t.y-p.offset:l+p.offset),M=f||p.offset>0;p.showLine&&M&&s.push({kind:"line",part:"axis",x1:t.x,x2:a,y1:g,y2:g,stroke:$.axis}),p.showTicks&&y(p.ticks,"x",g,f?-1:1,p.tickSize??4);let I=h(f?g-8:g+20);for(let L of p.ticks)s.push(f?R(L.pos,I,L.label,{part:"x-label-top",anchor:Oe(L.pos,L.label,e.width)}):m(L.pos,I,L.label,"x-label"));p.label&&s.push(M?R(4,I,p.label,{part:"axis-title",anchor:"start",baseline:f?void 0:"middle"}):R(4,t.y-6,p.label,{part:"axis-title",anchor:"start"}))}n.x?.showLine&&s.push({kind:"line",part:"axis",x1:n.rtl?a:t.x,x2:n.rtl?a:t.x,y1:t.y,y2:l,stroke:$.axis}),n.x?.showTicks&&y(r,"y",n.rtl?a:t.x,n.rtl?1:-1,n.x.tickSize??4);for(let p of r)s.push(n.rtl?R(a+8,p.pos,p.label,{part:"y-label",anchor:"start",baseline:"middle"}):R(t.x-8,p.pos,p.label,{part:"y-label",anchor:"end",baseline:"middle"}))}else{if(c)for(let p of i)s.push(d(p,!1));n.y?.showLine!==!1&&s.push({kind:"line",part:"axis",x1:t.x,x2:a,y1:o,y2:o,stroke:$.axis});let b=n.axes??[{ticks:i,position:"left",offset:0,label:n.yLabel,...n.y},...n.rightTicks?[{ticks:n.rightTicks,position:"right",offset:0,label:n.rightLabel}]:[]];for(let p of b){let f=p.position==="left",g=f?t.x-p.offset:a+p.offset,M=f?"y-label":"y-label-right";p.showLine&&s.push({kind:"line",part:"axis",x1:h(g),x2:h(g),y1:t.y,y2:l,stroke:$.axis}),p.showTicks&&y(p.ticks,"y",h(g),f?-1:1,p.tickSize??4);for(let I of p.ticks)s.push(R(h(f?g-8:g+8),I.pos,I.label,{part:M,anchor:f?"end":"start",baseline:"middle"}));p.label&&s.push(R(h(f?p.offset===0?4:Math.max(4,g-40):p.offset===0?e.width-4:Math.min(e.width-4,g+40)),t.y-6,p.label,{part:"axis-title",anchor:f?"start":"end"}))}n.x?.showTicks&&y(r,"x",l,1,n.x.tickSize??4);for(let p of r)s.push(m(p.pos,l+(u?12:20),p.label,"x-label"))}return n.xLabel&&s.push(R(h(t.x+t.width/2),e.height-4,n.xLabel,{part:"axis-title",anchor:"middle"})),n.horizontal&&n.rightLabel&&s.push(R(e.width-4,t.y-6,n.rightLabel,{part:"axis-title",anchor:"end"})),s}var R=(e,n,t,r={})=>({kind:"text",part:"label",x:e,y:n,text:t,fill:$.label,...r});function Zn(e,n,t,r,i={}){let o=Math.max(4,Math.min(r-4,e)),a=i.anchor??"start",l=a==="middle"?2*Math.min(o-4,r-o-4):a==="end"?o-4:r-o-4,s=Ve(t,l);return{kind:"text",part:"label",x:o,y:n,fill:$.label,...i,text:s,title:s===t?i.title:t}}var nn=(e,n,t,r,i,o)=>({kind:"circle",part:"point",cx:e,cy:n,r:t,fill:r,title:i,item:o});function Ke(e,n){let t=[],{plot:r}=n,i=r.x+r.width,o=r.y+r.height,a=s=>Math.max(r.x,Math.min(i,s)),l=s=>Math.max(r.y,Math.min(o,s));for(let s of e??[]){let c=s.color??Ce(s.variant),d=s.color??Ee(s.variant),u={part:"reference-label",fill:d},m=n.horizontal===!0;if("y"in s){let y=h(n.y(s.y,s.axis??"left"));if(m){let b=a(y);t.push(...on(b,r.y,o,c,s.label,u))}else{let b=l(y);t.push(...rn(r.x,i,b,c,s.label,u))}}else if("x"in s){let y=n.x(s.x);if(y===void 0)continue;m?t.push(...rn(r.x,i,l(h(y)),c,s.label,u)):t.push(...on(a(h(y)),r.y,o,c,s.label,u))}else if("y1"in s){let y=h(n.y(s.y1,s.axis??"left")),b=h(n.y(s.y2,s.axis??"left"));m?t.push(...sn(a(Math.min(y,b)),a(Math.max(y,b)),r,c,s.label,d)):t.push(...an(l(Math.min(y,b)),l(Math.max(y,b)),r,c,s.label,d))}else{let y=n.x(s.x1),b=n.x(s.x2);if(y===void 0||b===void 0)continue;let p=h(Math.min(y,b)),f=h(Math.max(y,b));m?t.push(...an(l(p),l(f),r,c,s.label,d)):t.push(...sn(a(p),a(f),r,c,s.label,d))}}return t}function rn(e,n,t,r,i,o){let a={kind:"line",part:"reference",x1:e,x2:n,y1:t,y2:t,stroke:r,dash:"6 4",strokeWidth:1.5,title:i};return i?[a,R(n-4,t-5,i,{...o,anchor:"end"})]:[a]}function on(e,n,t,r,i,o){let a={kind:"line",part:"reference",x1:e,x2:e,y1:n,y2:t,stroke:r,dash:"6 4",strokeWidth:1.5,title:i};return i?[a,R(e+4,n+10,i,{...o,anchor:"start"})]:[a]}function an(e,n,t,r,i,o){let a={kind:"rect",part:"reference-area",x:t.x,y:e,width:t.width,height:h(Math.max(0,n-e)),fill:r,opacity:.12,title:i};return i?[a,R(t.x+t.width-4,e+12,i,{part:"reference-label",fill:o,anchor:"end"})]:[a]}function sn(e,n,t,r,i,o){let a={kind:"rect",part:"reference-area",x:e,y:t.y,width:h(Math.max(0,n-e)),height:t.height,fill:r,opacity:.12,title:i};return i?[a,R(e+4,t.y+12,i,{part:"reference-label",fill:o,anchor:"start"})]:[a]}function ln(e,n){let t=[],{plot:r}=n,i=r.x+r.width,o=r.y+r.height;for(let a of e??[]){let l=a.color??Ce(a.variant),s=a.color??Ee(a.variant),c=(b,p,f)=>{let g=n.x(b);if(g===void 0)return;let M=n.y(p,f??"left");return n.horizontal?{x:h(M),y:h(g)}:{x:h(g),y:h(M)}},d=a.id??a.label,u=b=>({label:b,id:d,name:a.label});if(a.type==="line"||a.type==="band"){let{type:b,id:p,...f}=a;t.push(...Ke([f],n));continue}if(a.type==="rect"){let b=c(a.x1,a.y1,a.axis),p=c(a.x2,a.y2,a.axis);if(!b||!p)continue;let f=Math.max(r.x,Math.min(b.x,p.x)),g=Math.max(r.y,Math.min(b.y,p.y)),M=a.label??"";t.push({kind:"rect",part:"annotation-rect",x:h(f),y:h(g),width:h(Math.max(0,Math.min(i,Math.max(b.x,p.x))-f)),height:h(Math.max(0,Math.min(o,Math.max(b.y,p.y))-g)),fill:l,opacity:.12,stroke:l,title:M||void 0,item:M?u(M):void 0}),a.label&&t.push(R(h(f+4),h(g+12),a.label,{part:"annotation-label",fill:s}));continue}let m=c(a.x,a.y,a.axis);if(!m)continue;if(a.type==="text"){t.push(R(m.x,m.y,a.text,{part:"annotation-text",fill:s,anchor:"middle",baseline:"middle",title:a.label}));continue}let y=a.label??`${String(a.x)}, ${a.y}`;if(t.push({kind:"circle",part:"annotation-point",cx:m.x,cy:m.y,r:5,fill:l,stroke:"var(--skdx-color-surface-default)",title:y,item:u(y)}),a.type==="callout"&&a.label){let[b,p]=a.offset??[16,-16],f=h(Math.max(r.x,Math.min(i,m.x+b))),g=h(Math.max(r.y,Math.min(o,m.y+p)));t.push({kind:"line",part:"annotation-leader",x1:m.x,y1:m.y,x2:f,y2:g,stroke:l},R(f,g,a.label,{part:"annotation-label",fill:s,anchor:b>=0?"start":"end",baseline:"middle"}))}}return t}var xe=e=>Math.max(0,Math.min(1,e));function cn(e){let n=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(n){let r=n[1],i=r.length===3?r.split("").map(o=>o+o).join(""):r;return[0,2,4].map(o=>parseInt(i.slice(o,o+2),16))}let t=/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/i.exec(e.trim());return t?[Number(t[1]),Number(t[2]),Number(t[3])]:void 0}function dn(e,n){if(e.length===0)return $.axis;if(e.length===1)return e[0];let t=xe(n)*(e.length-1),r=Math.min(e.length-2,Math.floor(t)),i=t-r,o=cn(e[r]),a=cn(e[r+1]);if(!o||!a)return e[Math.round(t)];let l=s=>Math.round(o[s]+(a[s]-o[s])*i);return`rgb(${l(0)}, ${l(1)}, ${l(2)})`}var un=(e,n)=>n!==void 0&&n>=2?Math.min(n-1,Math.floor(xe(e)*n))/(n-1):xe(e);function hn(e,n,t,r=$.negative,i=String){let[o,a]=se(n),l=e??{type:"sequential"},s=f=>h(.15+.85*f);if(l.type==="threshold"){let{thresholds:f,colors:g,labels:M}=l,I=O=>{if(typeof O!="number"||!Number.isFinite(O))return;let k=0;for(;k<f.length&&O>=f[k];)k++;return{fill:g[Math.min(k,g.length-1)]??t,opacity:1}},L=g.map((O,k)=>({fill:O,opacity:1,label:M?.[k]??(k===0?`< ${i(f[0]??0)}`:k===f.length?`\u2265 ${i(f[k-1])}`:`${i(f[k-1])} \u2013 ${i(f[k])}`)}));return{color:I,domain:[o,a],swatches:L,kind:"threshold"}}if(l.type==="ordinal"){let f=l.colors?.length?l.colors:[t];return{color:M=>typeof M=="number"&&Number.isFinite(M)?{fill:f[Math.abs(Math.round(M))%f.length],opacity:1}:void 0,domain:[o,a],swatches:f.map((M,I)=>({fill:M,opacity:1,label:String(I)})),kind:"ordinal"}}if(l.type==="diverging"){let[f,g,M]=l.domain??[-Math.max(Math.abs(o),Math.abs(a)),0,Math.max(Math.abs(o),Math.abs(a))],I=l.colors,L=G=>G<g?.5*(G-f)/Math.max(1e-12,g-f):.5+.5*(G-g)/Math.max(1e-12,M-g),O=G=>{let W=un(l.reversed?1-xe(G):G,l.steps);if(I&&I.length>=2)return{fill:dn(I,W),opacity:1};let D=W<.5?r:t,H=Math.abs(W-.5)*2;return{fill:D,opacity:s(H)}},k=G=>typeof G=="number"&&Number.isFinite(G)?O(L(G)):void 0,E=l.steps??5,Y=Array.from({length:E},(G,W)=>{let D=E===1?.5:W/(E-1),H=D<.5?f+(g-f)*(D*2):g+(M-g)*((D-.5)*2);return{...O(D),label:i(H)}});return{color:k,domain:[f,M],swatches:Y,kind:"diverging"}}let[c,d]=l.domain??[o,a],u=l.colors,m=f=>{let g=un(l.reversed?1-xe(f):f,l.steps);return u&&u.length>=2?{fill:dn(u,g),opacity:1}:{fill:u?.[0]??t,opacity:s(g)}},y=f=>typeof f!="number"||!Number.isFinite(f)?void 0:m(d===c?1:(f-c)/(d-c)),b=l.steps??5,p=Array.from({length:b},(f,g)=>{let M=b===1?1:g/(b-1);return{...m(M),label:i(c+(d-c)*M)}});return{color:y,domain:[c,d],swatches:p,kind:"sequential"}}var Wn=34,Un=72;function pn(e){if(!e)return{bottom:0,right:0,options:{}};let n=e===!0?{}:e;return n.orientation==="vertical"?{bottom:0,right:Un,options:n}:{bottom:Wn,right:0,options:n}}function fn(e,n,t){let r=typeof t=="string"?{title:t}:t??{},i=r.title,o=e.swatches;if(o.length===0||n.width<=0)return[];if(r.orientation==="vertical"){let d=Math.max(0,n.height-(i?16:0)),u=Math.min(16,d/o.length),m=n.y+(i?16:0),y=o.map((p,f)=>({kind:"rect",part:"color-legend-swatch",x:h(n.x),y:h(m+f*u),width:10,height:h(u),fill:p.fill,opacity:p.opacity,title:p.label})),b=u>=12?1:2;return o.forEach((p,f)=>{f%b!==0&&f!==o.length-1||y.push({kind:"text",part:"color-legend-label",x:h(n.x+14),y:h(m+(f+.5)*u),text:p.label,baseline:"middle",fill:$.label})}),i&&y.push({kind:"text",part:"color-legend-title",x:h(n.x),y:h(n.y+6),text:i,baseline:"middle",fill:$.label}),y}let a=Math.min(n.width/o.length,96),l=n.x+(n.width-a*o.length)/2,s=o.map((d,u)=>({kind:"rect",part:"color-legend-swatch",x:h(l+u*a),y:h(n.y),width:h(a),height:10,fill:d.fill,opacity:d.opacity,title:d.label})),c=e.kind==="threshold"?1:Math.max(1,Math.ceil(o.length*7*_/Math.max(1,a*o.length)));return o.forEach((d,u)=>{u%c!==0&&u!==o.length-1||s.push({kind:"text",part:"color-legend-label",x:h(l+(u+.5)*a),y:h(n.y+22),text:d.label,anchor:"middle",fill:$.label})}),i&&s.push({kind:"text",part:"color-legend-title",x:h(l-6),y:h(n.y+5),text:i,anchor:"end",baseline:"middle",fill:$.label}),s}var qn=1e4,Kn=e=>Array.isArray(e)?{x:e[0],y:e[1],size:e[2],label:void 0,id:void 0,color:void 0,value:void 0}:{x:e.x,y:e.y,size:e.size,label:e.label,id:e.id,color:e.color,value:e.value};function Yn(e,n,t,r,i,o,a,l){if(r==="circle")return{...nn(e,n,t,i,o,a),part:l};let s=r==="square"?`M${h(e-t)} ${h(n-t)}h${h(2*t)}v${h(2*t)}h${h(-2*t)}Z`:r==="diamond"?`M${h(e)} ${h(n-t*1.3)}L${h(e+t*1.3)} ${h(n)}L${h(e)} ${h(n+t*1.3)}L${h(e-t*1.3)} ${h(n)}Z`:`M${h(e)} ${h(n-t*1.2)}L${h(e+t*1.15)} ${h(n+t*.9)}L${h(e-t*1.15)} ${h(n+t*.9)}Z`;return{kind:"path",part:l,d:s,fill:i,title:o,item:a}}function mn(e,n){let t=[],r=e.series.map((v,P)=>({name:v.name,id:v.id,symbol:v.symbol??"circle",color:Ae(e,P,v.color),data:Xt(e,v.name)?[]:v.data.flatMap((T,j)=>{let B=Kn(T);return X(B.x)&&X(B.y)?[{...B,index:j}]:[]})})),i=e.sampling==="auto"?qn:typeof e.sampling=="object"?e.sampling.threshold:1/0,o=r.reduce((v,P)=>v+P.data.length,0),a=o>i?Math.ceil(o/i):1;a>1&&t.push({code:"sampled",severity:"warning",message:`${o} points exceed the sampling threshold of ${i}; every ${a}th point is drawn.`});let l=a>1?r.map(v=>({...v,data:v.data.filter((P,T)=>T%a===0)})):r,s=l.flatMap(v=>v.data),c=en(e,s.length===0);if(c)return{...c,issues:t};let{width:d,height:u}=Te(e),m=e.colorScale?pn(e.colorLegend):{bottom:0,right:0,options:{}},y=e.series.map((v,P)=>({name:v.name,color:Ae(e,P,v.color)})),b=Ut(d,u,{...le,top:le.top+Yt(e,y,d)+(e.yAxis?.label?12:0),right:le.right+m.right,bottom:le.bottom+(e.xAxis?.label?14:0)+m.bottom}),p=e.markerSize??3,f=Math.max(0,e.hitRadius??0),g=Math.max(0,e.jitter??0),M=se(s.map(v=>v.size)),I=v=>v==="diamond"?1.3:v==="triangle"?1.2:1,L=(v,P)=>Math.max(0,P?n.radius(v.size,M):p),O=0;for(let v of l){let P=v.data.some(j=>j.size!==void 0),T=I(v.symbol);for(let j of v.data)O=Math.max(O,L(j,P)*T)}let k=Math.min(1,Math.min(b.width,b.height)*.45/Math.max(1,O+g)),E=g*k,Y=O*k+E,G=new Map,W=e.colorScale?hn(e.colorScale,s.map(v=>v.value),Ae(e,0),void 0,ae(e.format)):void 0,D=qe(Ue(s.map(v=>v.x),!1),[b.x+Y,b.x+b.width-Y],e.xAxis??{},e.format),H=qe(Ue(s.map(v=>v.y),!1),[b.y+b.height-Y,b.y+Y],e.yAxis??{},e.format),Ge=Ze(e,d,u,y),he=[],Ot=[],je=[],Lt=[];for(let v of l){let P=v.data.some(T=>T.size!==void 0);for(let T of v.data){let j=T.index,B=n.describe(v.name,T,D,H),q=L(T,P)*k,V=h(D.scale(T.x)),U=h(H.scale(T.y));if(E>0){let ie=`${Math.round(V)},${Math.round(U)}`,ne=G.get(ie)??0;if(G.set(ie,ne+1),ne>0){let oe=ne*2.399963;V=h(V+E*Math.cos(oe)),U=h(U+E*Math.sin(oe))}}let re=W?.color(T.value),Z={label:B,id:T.id,series:v.name,seriesId:v.id??v.name,name:T.label,index:j,value:T.y},Q=T.color??re?.fill??v.color;if(he.push(Yn(V,U,h(q),v.symbol,Q,B,Z,P?n.part:"point")),f>0&&he.push({kind:"circle",part:"hit",cx:V,cy:U,r:h(q+f),fill:Q,opacity:0,title:B,item:Z}),e.labels&&T.label){let ie=T.label.length*_,ne=V-ie/2,oe=U-q-4;Lt.some(we=>Math.abs(we.y-oe)<12&&ne<we.x+we.w+4&&ne+ie+4>we.x)||(Lt.push({x:ne,y:oe,w:ie}),Ot.push(R(V,h(oe),T.label,{part:"point-label",anchor:"middle",fill:"var(--skdx-color-text-default)"})))}}if(e.trendline&&v.data.length>=2){let T=e.trendline===!0?"linear":e.trendline,j=Xn(v.data.map(B=>[B.x,B.y]),T);if(j){let[B,q]=D.domain,V=`${v.name} trend${T==="linear"?"":` (${T})`}: r\xB2 ${j.r2.toFixed(2)}`,U=v.color;if(T==="linear")je.push({kind:"line",part:"trendline",x1:h(D.scale(B)),y1:h(H.scale(j.predict(B))),x2:h(D.scale(q)),y2:h(H.scale(j.predict(q))),stroke:U,dash:"5 4",strokeWidth:1.5,title:V});else{let re=Array.from({length:40},(Z,Q)=>B+(q-B)*Q/39).map(Z=>({v:Z,p:j.predict(Z)})).filter(({p:Z})=>Number.isFinite(Z)).map(({v:Z,p:Q})=>({x:h(D.scale(Z)),y:h(H.scale(Q))}));re.length>1&&je.push({kind:"path",part:"trendline",d:Ht(re),stroke:U,dash:"5 4",strokeWidth:1.5,title:V})}}}}let Rt=-1/0,Pt=Qt(D.ticks,Math.max(1,b.width-2*Y)),Nt=new Set;for(let v of[...Pt].sort((P,T)=>P.pos-T.pos)){let P=v.label.length*_,T=e.xAxis?.tickRotation??0,j=T?T<0?"end":"start":Oe(v.pos,v.label,d),B=-(j==="end"?P:j==="middle"?P/2:0),q=T*Math.PI/180,V=[B,B+P].flatMap(Z=>[-7,7].map(Q=>v.pos+Z*Math.cos(q)-Q*Math.sin(q))),U=Math.min(...V),re=Math.max(...V);U<Rt+4||(Rt=re,Nt.add(v))}let Tn=Pt.filter(v=>Nt.has(v)),Bt={...Ge,plot:b,xTicks:Tn,yTicks:H.ticks,baseline:H.zero},Dt={plot:b,x:v=>D.scale(_t(v)),y:v=>H.scale(v)},An=Ke(e.references,Dt),zn=W&&(m.bottom||m.right)?fn(W,m.right?{x:b.x+b.width+12,y:b.y,width:m.right,height:b.height}:{x:b.x,y:u-m.bottom+8,width:b.width,height:m.bottom},m.options):[],Ft=n.opacity;return{...Ge,shapes:[...tn({...Bt,height:Bt.height-m.bottom},{xLabel:e.xAxis?.label,x:e.xAxis,y:{showLine:e.yAxis?.showLine,showTicks:e.yAxis?.showTicks,tickSize:e.yAxis?.tickSize,tickRotation:e.yAxis?.tickRotation}}),...e.yAxis?.label?[R(4,b.y-14,e.yAxis.label,{part:"axis-title",anchor:"start"})]:[],...An,...Ft!==void 0&&he.some(v=>v.part===n.part)?he.map(v=>(v.kind==="circle"||v.kind==="path")&&v.part!=="hit"?{...v,opacity:Ft}:v):he,...je,...Ot,...ln(e.annotations,Dt),...zn,...Ge.shapes],issues:t}}function Xn(e,n="linear"){let t;if(n==="polynomial"){let s=0,c=0,d=0,u=0,m=0,y=0,b=0,p=0;for(let[k,E]of e)s+=1,c+=k,d+=k*k,u+=k**3,m+=k**4,y+=E,b+=k*E,p+=k*k*E;let f=k=>k[0]*(k[4]*k[8]-k[5]*k[7])-k[1]*(k[3]*k[8]-k[5]*k[6])+k[2]*(k[3]*k[7]-k[4]*k[6]),M=f([m,u,d,u,d,c,d,c,s]);if(Math.abs(M)<1e-12)return;let I=f([p,u,d,b,d,c,y,c,s])/M,L=f([m,p,d,u,b,c,d,y,s])/M,O=f([m,u,p,u,d,b,d,c,y])/M;t=k=>I*k*k+L*k+O}else{let s=n==="logarithmic"||n==="power"?Math.log:y=>y,c=n==="exponential"||n==="power"?Math.log:y=>y,d=e.filter(([y,b])=>Number.isFinite(s(y))&&Number.isFinite(c(b))),u=Jn(d.map(([y,b])=>[s(y),c(b)]));if(!u)return;let m=n==="exponential"||n==="power"?Math.exp:y=>y;t=y=>m(u.intercept+u.slope*s(y))}let r=t,i=e.filter(([s])=>Number.isFinite(r(s)));if(i.length===0)return;let o=i.reduce((s,[,c])=>s+c,0)/i.length,a=0,l=0;for(let[s,c]of i)a+=(c-r(s))**2,l+=(c-o)**2;return{predict:r,r2:l===0?1:Math.max(0,1-a/l)}}function Jn(e){let n=e.length,t=e.reduce((c,d)=>c+d[0],0)/n,r=e.reduce((c,d)=>c+d[1],0)/n,i=0,o=0,a=0;for(let[c,d]of e)i+=(c-t)**2,o+=(c-t)*(d-r),a+=(d-r)**2;if(i===0)return;let l=o/i,s=a===0?1:o*o/(i*a);return{slope:l,intercept:r-l*t,r2:s}}function Le(e){return e==null?[]:(Array.isArray(e)?e:[e]).map(t=>typeof t=="object"?t:{id:t})}var Ye=e=>e.id??e.name??e.series,bn=e=>e.seriesId??e.series;function J(e,n){let t=!1;return n.id!==void 0&&(t=!0,Ye(e)!==n.id&&e.id!==n.id&&e.name!==n.id)||n.series!==void 0&&(t=!0,bn(e)!==n.series&&e.series!==n.series)||n.index!==void 0&&(t=!0,e.index!==n.index)||n.category!==void 0&&(t=!0,e.category!==n.category)?!1:t}function ee(e){let n={},t=Ye(e);t!==void 0&&(n.id=t);let r=bn(e);return r!==void 0&&e.series!==void 0&&(n.series=r),e.index!==void 0&&(n.index=e.index),n}var Xe=(e,n)=>e.id===n.id&&e.series===n.series&&e.index===n.index&&e.category===n.category;function Je(e,n,t){let r=Le(e),i=ee(n),o=r.some(a=>J(n,a));return t==="single"?o?[]:[i]:o?r.filter(a=>!J(n,a)):[...r,i]}var Qn=.2;function er(e){let n=$.focus;switch(e.kind){case"rect":return{kind:"rect",part:"selected",x:e.x-1.5,y:e.y-1.5,width:e.width+3,height:e.height+3,fill:"none",stroke:n,rx:e.rx};case"circle":return{kind:"circle",part:"selected",cx:e.cx,cy:e.cy,r:e.r+2.5,fill:"none",stroke:n};case"path":return{kind:"path",part:"selected",d:e.d,fill:"none",stroke:n,strokeWidth:2.5};case"line":return{...e,part:"selected",stroke:n,strokeWidth:(e.strokeWidth??1)+3,title:void 0,item:void 0};case"text":return}}var tr=(e,n)=>e.kind==="text"?{...e,fill:$.grid}:{...e,opacity:(e.opacity??1)*n};function Qe(e,n){let t=Le(n.selected),r=n.highlighted===void 0||n.highlighted===null?[]:Le(n.highlighted),i=r[0];if(t.length===0&&!i)return e;let o={highlighted:n.highlightScope?.highlighted??"item",faded:n.highlightScope?.faded??"global"},a=[],l=d=>!i||r.some(u=>J(d,u))?!0:o.highlighted==="series"?r.some(u=>u.series!==void 0&&J(d,{series:u.series})):!1,s=d=>{if(!i||o.faded==="none"||l(d))return!1;if(o.faded==="series"){let u=i.series;return u!==void 0&&J(d,{series:u})}return!0},c=e.shapes.map(d=>{let u=d.item;if(!u||u.legend)return d;if(t.some(m=>J(u,m))){let m=er(d);m&&a.push(m)}return s(u)?tr(d,Qn):d});return a.length?{...e,shapes:[...c,...a]}:{...e,shapes:c}}function et(e){let[n,t]=e.sizeRange??[4,24],r=ae(e.zAxis?.format??e.format),i=e.zAxis?.label,o=e.xAxis?.label,a=e.yAxis?.label,l=(s,c)=>s?`${s} ${c}`:c;return mn({...e,series:e.series.map(s=>({name:s.name,id:s.id,color:s.color,data:s.data.filter(c=>X(c.x)&&X(c.y)).map(c=>({x:c.x,y:c.y,size:X(c.z)?Math.max(0,c.z):0,label:c.label,id:c.id,color:c.color,value:c.value??c.z}))}))},{part:"bubble",opacity:.7,radius:(s,[,c])=>c>0&&X(s)?Math.max(n,Math.sqrt(s/c)*t):n,describe:(s,c,d,u)=>`${s}${c.label?` ${c.label}`:""}: ${l(o,d.format(c.x))}, ${l(a,u.format(c.y))}, ${l(i,r(c.size??0))}`})}var xn="var(--skdx-radius-default, var(--skdx-radius-md, 0.5rem))";function Re(e){return["tooltip","skeleton","label-background","stage-label-background","brush-handle"].includes(e)?xn:void 0}function ue(e,n,t,r,i){let o=e.getBoundingClientRect();return{x:o.width?(n-o.left)*r/o.width:n,y:o.height?(t-o.top)*i/o.height:t}}var tt=(e,n,t)=>n>=e.x&&n<=e.x+e.width&&t>=e.y&&t<=e.y+e.height;function gn(e,n){let t=0,r=1/0;return e.xs.forEach((i,o)=>{let a=Math.abs(i-n);a<r&&(r=a,t=o)}),t}function ge(e,n){let t=e.hit;if(!t||t.xs.length===0)return;let r=gn(t,n),i=t.rows[r]??[];return{index:r,rows:e.axisTooltipFormatter?.(i,r)??i}}function nt(e,n){let t=e.hit;if(!t||t.xs.length===0)return;let r=t.xs[gn(t,n)];return{kind:"line",part:"crosshair",x1:r,x2:r,y1:t.plot.y,y2:t.plot.y+t.plot.height,stroke:$.axis,dash:"3 3"}}function rt(e,n,t){let r=e.hit;if(!r||!r.crosshair||r.xs.length===0||!tt(r.plot,n,t))return[];let i=nt(e,n),{rows:o}=ge(e,n),a=e.tooltipAnchored?r.plot.y+8:t;return[i,...ze(i.x1,a,o,e.width,e.height,e.tooltipPlacement)]}function it(e,n){let t=e.hit;if(!t||t.xs.length===0)return[];let r=t.rows.findIndex(o=>o[0]===n);if(r<0)return[];let i=t.xs[r];return rt(e,i,t.plot.y+8)}function ot(e,n,t,r,i){if(!e.tooltip)return{lines:[],shapes:[]};if(e.hit?.crosshair){let{x:s,y:c}=ue(t,r,i,e.width,e.height);if(tt(e.hit.plot,s,c)){let d=ge(e,s),u=nt(e,s);if(d&&u)return{lines:d.rows,shapes:[u]}}}let o=n?.closest?.("[data-skdx-part]"),a=e.tooltipFormatter?te(e,n)?.item:void 0,l=a&&e.tooltipFormatter?.(a)||o&&Array.from(o.children).find(s=>s.tagName.toLowerCase()==="title")?.textContent;return l?{lines:Array.isArray(l)?l:[l],shapes:[]}:{lines:[],shapes:[]}}function yn(e,n,t,r,i,o,a){let l=e?.closest?.("[data-skdx-part]"),s=a&&a.tooltipFormatter?te(a,e)?.item:void 0,c=s&&a?.tooltipFormatter?.(s)||l&&Array.from(l.children).find(b=>b.tagName.toLowerCase()==="title")?.textContent;if(!c)return[];let d=a?.tooltipAnchored?te(a,e):void 0,u=d?a?.shapes[d.index]:void 0,{x:m,y}=u?ye(u):ue(n,t,r,i,o);return ze(m,y,c,i,o,a?.tooltipPlacement)}function at(e,n,t,r,i){if(!e.tooltip)return[];if(e.hit?.crosshair){let{x:o,y:a}=ue(t,r,i,e.width,e.height),l=rt(e,o,a);if(l.length>0)return l}return yn(n,t,r,i,e.width,e.height,e)}function st(e,n){let t=te(e,n);return t&&!t.item.legend?ee(t.item):null}var nr=(e,n)=>{let{x:t,y:r}=ye(e),i=e.kind==="circle"?e.cy:e.kind==="rect"?e.y+e.height/2:r;return t>=n.x&&t<=n.x+n.width&&i>=n.y&&i<=n.y+n.height};function lt(e,n){let t=new Set,r=[];for(let i of e.shapes){if(!i.item||i.item.legend||i.part==="anchor"||!nr(i,n))continue;let o=ee(i.item),a=JSON.stringify(o);t.has(a)||(t.add(a),r.push(o))}return r}var ct=e=>({kind:"rect",part:"selection-box",x:h(e.x),y:h(e.y),width:h(e.width),height:h(e.height),fill:$.focus,opacity:.12,stroke:$.focus}),Ne=(e,n,t,r)=>({x:Math.min(e,t),y:Math.min(n,r),width:Math.abs(t-e),height:Math.abs(r-n)});function vn(e,n,t){let r=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){let a=e[i],l=e[o];a.y>t!=l.y>t&&n<(l.x-a.x)*(t-a.y)/(l.y-a.y)+a.x&&(r=!r)}return r}function dt(e,n){if(n.length<3)return[];let t=new Set,r=[];for(let i of e.shapes){if(!i.item||i.item.legend||i.part==="anchor")continue;let{x:o,y:a}=ye(i),l=i.kind==="circle"?i.cy:i.kind==="rect"?i.y+i.height/2:a;if(!vn(n,o,l))continue;let s=ee(i.item),c=JSON.stringify(s);t.has(c)||(t.add(c),r.push(s))}return r}var ut=e=>({kind:"path",part:"selection-lasso",d:e.length?`M${e.map(n=>`${h(n.x)} ${h(n.y)}`).join("L")}`:"",fill:$.focus,fillOpacity:.12,stroke:$.focus,dash:"4 3"}),Pe=6;function ht(e,n,t){let r=e.edit;if(r){for(let i of r.bars)if(!(t<i.y||t>i.y+i.height||n<i.x0-Pe||n>i.x1+Pe))return Math.abs(n-i.x0)<=Pe?{bar:i,mode:"start"}:Math.abs(n-i.x1)<=Pe?{bar:i,mode:"end"}:{bar:i,mode:"move"}}}function pt(e,n,t){let r=e.edit;return wn(r,n,r.invert(n.bar.x0+t)-r.invert(n.bar.x0))}function ft(e,n,t){let r=e.edit,i=t.key==="ArrowRight"?1:t.key==="ArrowLeft"?-1:0;if(!r||n===null||!i||!(t.shiftKey||t.altKey))return;let o=r.bars.find(s=>s.index===n);if(!o)return;let a=t.altKey?t.shiftKey?"start":"end":"move",l=r.snap??r.invert(o.x0+10)-r.invert(o.x0);return wn(r,{bar:o,mode:a},i*l)}function wn(e,{bar:n,mode:t},r){let i=l=>e.snap?Math.round(l/e.snap)*e.snap:l,o=n.start,a=n.end;return t==="move"?(o=i(n.start+r),a=o+(n.end-n.start)):t==="start"?o=Math.min(i(n.start+r),n.end):a=Math.max(i(n.end+r),n.start),{id:n.id,name:n.name,start:o,end:a}}function mt(e,n,t){let r=e.edit,i=r.scale(t.start),o=r.scale(t.end);return{kind:"rect",part:"edit-ghost",x:h(Math.min(i,o)),y:h(n.bar.y),width:h(Math.max(1,Math.abs(o-i))),height:h(n.bar.height),fill:$.focus,opacity:.25,stroke:$.focus,rx:2}}var rr=64,ir=e=>Math.max(1,Math.min(rr,e));function bt(e,n,t,r){let i=n>0?.8:1.25,o=ir(e.view.zoom*i);if(o===e.view.zoom)return e.view;let{plot:a,scale:l}=e,[s,c]=e.view.center,d=(t-(a.x+a.width/2))/l,u=(r-(a.y+a.height/2))/l,m=e.view.zoom/o;return{center:[s+d*(1-m),e.fromY(e.toY(c)-u*(1-m))],zoom:o}}function xt(e,n,t,r){let{scale:i}=e;return{center:[n.center[0]-t/i,e.fromY(e.toY(n.center[1])+r/i)],zoom:n.zoom}}function te(e,n){let t=n?.closest?.("[data-skdx-i]"),r=Number(t?.getAttribute("data-skdx-i")),i=Number.isInteger(r)?e.shapes[r]?.item:void 0;return i?{index:r,item:i}:void 0}var Be=e=>e.shapes.flatMap((n,t)=>n.item&&!n.item.legend?[t]:[]);function ye(e){switch(e.kind){case"rect":return{x:e.x+e.width/2,y:e.y};case"circle":return{x:e.cx,y:e.cy-e.r};case"line":return{x:(e.x1+e.x2)/2,y:Math.min(e.y1,e.y2)};case"text":return{x:e.x,y:e.y};case"path":{let n=/M\s*(-?[\d.]+)[ ,](-?[\d.]+)/.exec(e.d);return n?{x:Number(n[1]),y:Number(n[2])}:{x:0,y:0}}}}function gt(e,n){let t=n===null?void 0:e.shapes[n];if(!t)return[];let r=$.focus,i;switch(t.kind){case"rect":i={kind:"rect",part:"focus",x:t.x-2,y:t.y-2,width:t.width+4,height:t.height+4,fill:"none",stroke:r,rx:2};break;case"circle":i={kind:"circle",part:"focus",cx:t.cx,cy:t.cy,r:t.r+3,fill:"none",stroke:r};break;case"line":i={kind:"line",part:"focus",x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:r,strokeWidth:4};break;case"text":i={kind:"rect",part:"focus",x:t.x-2,y:t.y-8,width:t.text.length*_+4,height:16,fill:"none",stroke:r,rx:2};break;case"path":i={kind:"path",part:"focus",d:t.d,stroke:r,strokeWidth:2,fill:"none"};break}let{x:o,y:a}=ye(t),l=t.item&&e.tooltipFormatter?.(t.item)||(t.item?.label??t.title??"");return[i,...l?ze(h(o),h(a),l,e.width,e.height):[]]}function yt(e,n,t){let r=Be(e);if(r.length===0)return;let i=n===null?-1:r.indexOf(n);switch(t){case"ArrowRight":case"ArrowDown":return r[Math.min(r.length-1,i+1)];case"ArrowLeft":case"ArrowUp":return r[Math.max(0,i<=0?0:i-1)];case"Home":return r[0];case"End":return r[r.length-1];case"Escape":return null;default:return}}var ce=2,de=(e,n,t)=>{let r=Math.max(ce,Math.min(t,Math.round(n))),i=Math.max(0,Math.min(t-r,Math.round(e)));return{start:i,end:i+r}},Mn=(e,n)=>!e||e.start<=0&&e.end>=n;function vt(e,n,t){if(e.count<=ce||!e.plot.width)return;let{start:r,end:i}=e.zoom,o=i-r,a=n>0?1.25:.8,l=Math.max(ce,Math.min(e.count,Math.round(o*a)));if(l===o)return n>0&&!Mn(e.zoom,e.count)?de(r,l,e.count):void 0;let s=Math.max(0,Math.min(1,(t-e.plot.x)/e.plot.width)),c=r+s*o;return de(c-s*l,l,e.count)}function wt(e,n,t,r){let i=n.end-n.start,o=Math.max(ce,Math.min(e.count,Math.round(i/Math.max(.05,t)))),a=Math.max(0,Math.min(1,(r-e.plot.x)/Math.max(1,e.plot.width)));return de(n.start+a*i-a*o,o,e.count)}function Mt(e,n,t){let r=n.end-n.start,i=e.plot.width/Math.max(1,r);return de(n.start-t/i,r,e.count)}function kt(e,n,t){let r=e.brush;if(!r||!tt(r.box,n,t))return;let i=r.window;if(Math.abs(n-i.x)<=6)return{grab:"left",zoom:e.zoom};if(Math.abs(n-(i.x+i.width))<=6)return{grab:"right",zoom:e.zoom};if(n>i.x&&n<i.x+i.width)return{grab:"move",zoom:e.zoom};let o=e.zoom.end-e.zoom.start,a=(n-r.box.x)/Math.max(1,r.box.width)*e.count;return{grab:"move",zoom:de(a-o/2,o,e.count)}}function St(e,n,t,r){let i=e.brush;if(!i)return t;let o=r/Math.max(1,i.box.width)*e.count;if(n==="move")return de(t.start+o,t.end-t.start,e.count);if(n==="left")return{start:Math.max(0,Math.min(t.end-ce,Math.round(t.start+o))),end:t.end};let a=Math.min(e.count,Math.max(t.start+ce,Math.round(t.end+o)));return{start:t.start,end:a}}function Ct(e,n){switch(n.type){case"svg":return Promise.resolve($t(e,n.label,n.resolve));case"csv":return Promise.resolve(Cn(n.rows));case"png":{if(typeof document>"u"||typeof Image>"u")return Promise.reject(new Error("PNG export needs a browser"));let t=$t(e,n.label,n.resolve);return $n(t,e.width,e.height,n.scale,n.background)}}}var K=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;"),ve=e=>e.filter(([,n])=>n!==void 0&&n!=="").map(([n,t])=>` ${n}="${K(String(t))}"`).join("");function kn(e){let n=e.title?`<title>${K(e.title)}</title>`:"",t=["data-skdx-part",e.part];switch(e.kind){case"path":return`<path${ve([t,["d",e.d],["fill",e.fill??"none"],["stroke",e.stroke],["stroke-width",e.strokeWidth],["stroke-linecap",e.strokeLinecap],["stroke-linejoin",e.strokeLinejoin],["stroke-dasharray",e.dash],["opacity",e.opacity],["fill-opacity",e.fillOpacity]])}>${n}</path>`;case"rect":return`<rect${ve([t,["x",e.x],["y",e.y],["width",e.width],["height",e.height],["rx",e.rx],["fill",e.fill],["stroke",e.stroke],["fill-opacity",e.opacity]])}>${n}</rect>`;case"line":return`<line${ve([t,["x1",e.x1],["y1",e.y1],["x2",e.x2],["y2",e.y2],["stroke",e.stroke],["stroke-width",e.strokeWidth],["stroke-dasharray",e.dash],["opacity",e.opacity]])}>${n}</line>`;case"circle":return`<circle${ve([t,["cx",e.cx],["cy",e.cy],["r",e.r],["fill",e.fill],["stroke",e.stroke]])}>${n}</circle>`;case"text":return`<text${ve([t,["aria-label",e.title],["x",e.x],["y",e.y],["text-anchor",e.anchor],["dominant-baseline",e.baseline],["fill",e.fill],["font-weight",e.weight],["transform",e.rotate?`rotate(${e.rotate} ${e.x} ${e.y})`:void 0]])}>${K(e.text)}</text>`}}function Sn(e){let n=e.defs??[];return n.length===0?"":`<defs>${n.map(t=>`<linearGradient id="${K(t.id)}" x1="0" y1="0" x2="${t.vertical===!1?1:0}" y2="${t.vertical===!1?0:1}">${t.stops.map(r=>`<stop offset="${r.offset}" stop-color="${K(r.color)}"${r.opacity===void 0?"":` stop-opacity="${r.opacity}"`}/>`).join("")}</linearGradient>`).join("")}</defs>`}function $t(e,n,t){let r=Sn(e)+e.shapes.map(kn).join("");t&&(r=r.replace(/var\((--[\w-]+)\)/g,(a,l)=>t(l).trim()||a));let i=e.decorative?'aria-hidden="true"':`role="img" aria-label="${K(n)}"`,o=e.description?`<desc>${K(e.description)}</desc>`:"";return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e.width} ${e.height}" width="${e.width}" height="${e.height}" ${i} font-family="${K($.fontFamily)}" font-size="${K($.fontSize)}"><title>${K(n)}</title>${o}${r}</svg>`}function $n(e,n,t,r=2,i){return new Promise((o,a)=>{let l=URL.createObjectURL(new Blob([e],{type:"image/svg+xml;charset=utf-8"})),s=new Image;s.onload=()=>{URL.revokeObjectURL(l);let c=document.createElement("canvas");c.width=Math.round(n*r),c.height=Math.round(t*r);let d=c.getContext("2d");if(!d)return a(new Error("canvas 2d context unavailable"));i&&(d.fillStyle=i,d.fillRect(0,0,c.width,c.height)),d.drawImage(s,0,0,c.width,c.height),c.toBlob(u=>u?o(u):a(new Error("toBlob failed")),"image/png")},s.onerror=()=>{URL.revokeObjectURL(l),a(new Error("svg could not be decoded"))},s.src=l})}function Cn(e){let n=t=>{let r=t==null?"":String(t);return/[",\n\r]/.test(r)?`"${r.replace(/"/g,'""')}"`:r};return e.map(t=>t.map(n).join(",")).join(`\r
3
- `)}function It(e,n){if(!n)return;let t=typeof n=="object"?n.maxRows??500:500,r=e.hit;if(r&&r.rows.length>0){let l=r.rows[0];if(r.rows.length>t)return;let s=["",...l.slice(1).map(d=>d.replace(/:\s[^:]*$/,""))],c=r.rows.map(d=>[d[0],...d.slice(1).map(u=>u.slice(u.lastIndexOf(": ")+2))]);return[s,...c]}let i=e.shapes.flatMap(l=>l.item&&!l.item.legend&&!(l.part==="anchor"&&!l.title)?[l.item]:[]);if(i.length===0||i.length>t)return;let o=["series","name","category","value"].filter(l=>i.some(s=>s[l]!==void 0)),a=(l,s)=>l[s]===void 0?"":String(l[s]);return[o.map(l=>l[0]?.toUpperCase()+l.slice(1)),...i.map(l=>o.map(s=>a(l,s)))]}var Tt=new Map;function De(e){let n=Tt.get(e);if(n)return n.group;let t=new Set,r={},i={current:r,subscribe(o){return t.add(o),()=>{t.delete(o),t.size===0&&Tt.delete(e)}},publish(o,a){Object.assign(r,o);for(let l of t)l(o,a)}};return Tt.set(e,{group:i,listeners:t}),i}var In='[data-skdx-part]:not([data-skdx-part^="tooltip"]):not([data-skdx-part="focus"]):not([data-skdx-part="crosshair"])',At=`@keyframes skdx-in{from{opacity:0}to{opacity:1}}${In}{animation:skdx-in var(--skdx-chart-duration,0ms) ease-out;transition:${["x","y","width","height","cx","cy","r","opacity","fill-opacity","d"].map(e=>`${e} var(--skdx-chart-duration,0ms) ease-out`).join(",")}}@media (prefers-reduced-motion:reduce){${In}{animation:none;transition:none}}`;function zt(e){let n=e.animate;return n&&e.shapes.length<=1500?`${n}ms`:void 0}var S=require("lit"),w=require("lit/decorators.js"),A=require("lit/directives/if-defined.js");var or={fromAttribute:()=>!1},C=class extends S.LitElement{constructor(){super(...arguments);this.legend=!1;this.tooltip=!0;this.selectionMode="none";this.loading=!1;this.decorative=!1;this.accessibleTable=!1;this.zoomable=!1;this.editable=!1;this.crossFilter=!1;this.animated=!1;this.responsive=!1;this.tip=[];this.overlay=[];this.portal=null;this.highlightState=null;this.crossState=null;this.lastCross=null;this.pointers=new Map;this.hover=null;this.token={};this.focused=null;this.hiddenState=[];this.drag=null;this.onPointerMove=t=>{let r=this.layout;if(!r)return;this.pointers.has(t.pointerId)&&this.pointers.set(t.pointerId,this.viewBox(t,r).x);let i=this.drag;if(i?.grab==="select"){let{x:o,y:a}=this.viewBox(t,r);this.overlay=[ct(Ne(i.x,i.y,o,a))];return}if(i?.grab==="lasso"){let{x:o,y:a}=this.viewBox(t,r);i.points=[...i.points??[],{x:o,y:a}],this.overlay=[ut(i.points)];return}if(i?.grab==="edit"){if(!i.gantt)return;let{x:o}=this.viewBox(t,r);i.change=pt(r,i.gantt,o-i.x),this.overlay=[mt(r,i.gantt,i.change)];return}if(i?.grab==="map"){if(!r.map||!i.view)return;let{x:o,y:a}=this.viewBox(t,r);this.setView(xt(r.map,i.view,o-i.x,a-i.y));return}if(i&&r.hit){if(i.grab==="pinch"){let[a,l]=[...this.pointers.values()];if(a===void 0||l===void 0||!i.distance)return;this.setZoom(wt(r.hit,i.zoom,Math.abs(a-l)/i.distance,(a+l)/2));return}let{x:o}=this.viewBox(t,r);this.setZoom(i.grab==="pan"?Mt(r.hit,i.zoom,o-i.x):St(r.hit,i.grab,i.zoom,o-i.x));return}if(r.tooltipPortal){let{lines:o,shapes:a}=ot(r,t.target,t.currentTarget,t.clientX,t.clientY);this.tip=a,this.portal=o.length?{x:t.clientX,y:t.clientY,lines:o}:null}else{let o=at(r,t.target,t.currentTarget,t.clientX,t.clientY);(o.length>0||this.tip.length>0)&&(this.tip=o)}if(this.highlight(st(r,t.target)),this.syncId&&r.hit?.crosshair){let o=ge(r,this.viewBox(t,r).x);this.shareCrosshair(o?r.hit.rows[o.index]?.[0]??null:null)}};this.onPointerDown=t=>{let r=this.layout;if(!r||t.button!==0)return;let{x:i,y:o}=this.viewBox(t,r),a=te(r,t.target)?.item.legend,l=this.canEdit(r)?ht(r,i,o):void 0;if(l){this.drag={x:i,y:o,zoom:{start:0,end:0},grab:"edit",gantt:l},t.currentTarget.setPointerCapture(t.pointerId),this.clearTip();return}if(this.brushing()&&!a){this.drag={x:i,y:o,zoom:{start:0,end:0},grab:this.selectionMode==="lasso"?"lasso":"select",points:[{x:i,y:o}]},t.currentTarget.setPointerCapture(t.pointerId),this.clearTip();return}if(this.canPan(r)&&r.map){let c=r.map.plot;if(i<c.x||i>c.x+c.width||o<c.y||o>c.y+c.height)return;this.drag={x:i,y:o,zoom:{start:0,end:0},grab:"map",view:r.map.view},t.currentTarget.setPointerCapture(t.pointerId),this.clearTip();return}let s=r.hit;if(!(!s||!this.canZoom(r))){if(this.pointers.set(t.pointerId,i),this.pointers.size===2){let[c,d]=[...this.pointers.values()];this.drag={x:(c+d)/2,y:o,zoom:s.zoom,grab:"pinch",distance:Math.abs(c-d)||1}}else{let c=kt(s,i,o);if(c)this.drag={x:i,y:o,zoom:c.zoom,grab:c.grab},c.zoom!==s.zoom&&this.setZoom(c.zoom);else if(this.zoomable&&i>=s.plot.x&&i<=s.plot.x+s.plot.width&&o>=s.plot.y&&o<=s.plot.y+s.plot.height)this.drag={x:i,y:o,zoom:s.zoom,grab:"pan"};else{this.pointers.delete(t.pointerId);return}}t.currentTarget.setPointerCapture(t.pointerId),this.clearTip()}};this.onPointerUp=t=>{this.pointers.delete(t.pointerId);let r=t.currentTarget;r.hasPointerCapture(t.pointerId)&&r.releasePointerCapture(t.pointerId);let i=this.drag,o=this.layout;if(o&&(i?.grab==="select"||i?.grab==="lasso"||i?.grab==="edit"||i?.grab==="map")){this.overlay=[];let{x:a,y:l}=this.viewBox(t,o);if(Math.abs(a-i.x)>2||Math.abs(l-i.y)>2){i.grab==="select"?this.setSelected(lt(o,Ne(i.x,i.y,a,l))):i.grab==="lasso"?this.setSelected(dt(o,i.points??[])):i.grab==="edit"&&i.change&&this.emit("skdx-task-change",i.change),this.drag={...i,distance:-1};return}this.drag=null;return}(this.pointers.size===0||this.drag?.grab==="pinch")&&(this.drag=null)};this.onWheel=t=>{let r=this.layout;if(!r)return;let{x:i,y:o}=this.viewBox(t,r);if(r.map&&this.canPan(r)){let s=r.map.plot;if(i<s.x||i>s.x+s.width||o<s.y||o>s.y+s.height)return;t.preventDefault(),this.setView(bt(r.map,t.deltaY,i,o));return}let a=r.hit;if(!a||!this.canZoom(r)||o<a.plot.y||o>a.plot.y+a.plot.height)return;let l=vt(a,t.deltaY,i);l&&(t.preventDefault(),this.setZoom(l))};this.onClick=t=>{if(!this.layout)return;if(this.drag?.distance===-1){this.drag=null;return}let r=te(this.layout,t.target);r&&(r.item.range?this.setZoom(r.item.range):r.item.legend&&r.item.series!==void 0?this.toggle(r.item.series):(this.select(r.item),this.emit("skdx-item-click",r.item)))};this.onKeyDown=t=>{if(t.key==="Escape"){t.preventDefault(),this.focused=null,this.clearTip(),this.crossState=null,this.highlight(null);return}let r=this.layout;if(!r)return;if((t.key==="Enter"||t.key===" ")&&this.focused!==null){let l=r.shapes[this.focused]?.item;l&&(t.preventDefault(),this.select(l),this.emit("skdx-item-click",l));return}let i=this.canEdit(r)?ft(r,this.focused,t):void 0;if(i){t.preventDefault(),this.emit("skdx-task-change",i);return}let o=yt(r,this.focused,t.key);if(o===void 0)return;t.preventDefault(),this.focused=o;let a=o===null?void 0:r.shapes[o]?.item;this.highlight(a?ee(a):null)}}connectedCallback(){super.connectedCallback(),!(typeof ResizeObserver>"u")&&(this.observer=new ResizeObserver(([t])=>{let r=Math.floor(t?.contentRect.width??0);r>0&&(this.measured=r)}),this.observer.observe(this))}disconnectedCallback(){this.observer?.disconnect(),this.leave?.(),this.leave=void 0,this.joined=void 0,super.disconnectedCallback()}sized(){let{width:t,height:r,legend:i,tooltip:o,format:a,palette:l,loading:s,error:c,emptyMessage:d,description:u,decorative:m,animated:y,responsive:b,highlighted:p,highlightScope:f,accessibleTable:g}=this;return{width:b&&this.measured?this.measured:t,height:r,animate:y,responsive:b,legend:i,tooltip:o,format:a,palette:l,loading:s,error:c,emptyMessage:d,description:u,decorative:m,highlighted:p===void 0?this.highlightState:p,highlightScope:f,accessibleTable:g,hiddenSeries:this.hiddenSeries??this.hiddenState,zoom:this.zoom??this.zoomState,selected:this.selected??this.selectedState,view:this.view??this.viewState}}compactOverrides(){let t=this.responsive;return typeof t=="object"&&this.measured!==void 0&&this.measured<(t.breakpoint??480)?{...t.compact,width:this.measured}:void 0}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}publish(t){this.syncId&&De(this.syncId).publish(t,this.token)}join(){if(this.joined===this.syncId||(this.leave?.(),this.leave=void 0,this.joined=this.syncId,!this.syncId))return;let t=De(this.syncId),r=i=>{"highlighted"in i&&(this.highlightState=i.highlighted??null),i.selected&&(this.selectedState=i.selected,this.crossFilter&&(this.highlightState=i.selected.length?i.selected:null)),"zoom"in i&&(this.zoomState=i.zoom),i.hiddenSeries&&(this.hiddenState=i.hiddenSeries),"crosshair"in i&&(this.crossState=i.crosshair??null)};r(t.current),this.leave=t.subscribe((i,o)=>{o!==this.token&&r(i)})}setZoom(t){this.zoomState=t,this.emit("skdx-zoom-change",t),this.publish({zoom:t})}setView(t){this.viewState=t,this.emit("skdx-view-change",t)}setSelected(t){this.selectedState=t,this.emit("skdx-selected-change",t),this.publish({selected:t})}toggle(t){let r=this.hiddenSeries??this.hiddenState,i=r.includes(t)?r.filter(o=>o!==t):[...r,t];this.hiddenState=i,this.emit("skdx-hidden-series-change",i),this.publish({hiddenSeries:i})}highlight(t){let r=this.hover;r===t||r&&t&&Xe(r,t)||(this.hover=t,this.emit("skdx-highlighted-change",t),this.highlightState=t,this.syncId&&this.publish({highlighted:t}))}select(t){let r=this.selectionMode;r!=="none"&&this.setSelected(Je(this.selected??this.selectedState,t,r==="single"?"single":"multiple"))}shareCrosshair(t){!this.syncId||this.lastCross===t||(this.lastCross=t,this.publish({crosshair:t}))}clearTip(){this.tip=[],this.portal=null,this.shareCrosshair(null)}canZoom(t){return!!(t.hit&&(this.zoomable||t.hit.brush))}canPan(t){return!!(t.map&&this.zoomable)}canEdit(t){return!!(this.editable&&t.edit)}brushing(){return this.selectionMode==="brush"||this.selectionMode==="lasso"}viewBox(t,r){return ue(t.currentTarget,t.clientX,t.clientY,r.width,r.height)}getSvgElement(){return this.renderRoot.querySelector("svg")}getLayout(){return this.layout}resetZoom(){this.setZoom(void 0)}zoomTo(t){this.setZoom(t)}focusItem(t){let r=this.layout;if(!r)return!1;let i=r.shapes.findIndex(o=>o.item&&!o.item.legend&&J(o.item,t));return i<0?!1:(this.getSvgElement()?.focus(),this.focused=i,!0)}export(t){let r=this.layout;return r?Ct(r,{...t,label:t.label??this.label??this.localName}):Promise.reject(new Error("not rendered yet"))}root(t,r,i){this.join();let o=Qe(We(t),this.sized());if(this.layout=o,o.issues!==this.reported){this.reported=o.issues;for(let f of o.issues??[])this.emit("skdx-data-issue",f)}let a=this.canZoom(o),l=this.canPan(o),s=this.canEdit(o),c=this.brushing(),d=a||l||s||c,u=!o.decorative&&Be(o).length>0,m=zt(o),y=It(o,this.accessibleTable),b=typeof this.accessibleTable=="object"&&this.accessibleTable.caption||i,p=this.portal;return S.html`<svg
1
+ "use strict";var ke=Object.defineProperty;var Vt=Object.getOwnPropertyDescriptor;var Dn=Object.getOwnPropertyNames;var Bn=Object.prototype.hasOwnProperty;var jn=(e,n)=>{for(var t in n)ke(e,t,{get:n[t],enumerable:!0})},_n=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Dn(n))!Bn.call(e,i)&&i!==t&&ke(e,i,{get:()=>n[i],enumerable:!(r=Vt(n,i))||r.enumerable});return e};var Fn=e=>_n(ke({},"__esModule",{value:!0}),e),y=(e,n,t,r)=>{for(var i=r>1?void 0:r?Vt(n,t):n,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=(r?s(n,t,i):s(i))||i);return r&&i&&ke(n,t,i),i};var pr={};jn(pr,{SkdxBubbleChart:()=>N});module.exports=Fn(pr);var B=require("lit/decorators.js");var Ht=new Set(["__proto__","constructor","prototype"]),Ge="skdx-chart-snapshot-request-v1";function Ve(e,n){let t=r=>{if(r.target!==e)return;let i=r.detail;if(!(!i||typeof i.receive!="function"))try{i.receive(n())}catch(o){i.receive(void 0,o instanceof Error?o.message:String(o))}};return e.addEventListener(Ge,t),()=>e.removeEventListener(Ge,t)}function Y(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)}function He(e,n,t){let r=[],i=0,o=new Set,s=(a,l,d=0)=>{if(++i>1e5||d>64)throw new Error("Chart snapshot exceeds bounded input size/depth");if(a===null||typeof a=="boolean"||typeof a=="string")return a;if(typeof a=="number")return Number.isFinite(a)?a:{$number:String(a)};if(a===void 0)return;if(typeof a=="function"){r.push({code:"unserializable-chart-callback",path:l,message:"Callback omitted; captured geometry retains its actual output. Do not reconstruct this configuration as a literal renderer input."});return}if(a instanceof Date)return Number.isFinite(a.getTime())?{$date:a.toISOString()}:{$date:"Invalid Date"};if(!Array.isArray(a)&&!Y(a))throw new Error(`Unsupported chart snapshot value at ${l}`);if(o.has(a))throw new Error(`Cyclic chart input at ${l}`);o.add(a);let h;if(Array.isArray(a))h=a.map((m,x)=>s(m,`${l}[${x}]`,d+1)??null);else{let m=[];for(let[x,b]of Object.entries(a)){if(Ht.has(x))throw new Error("Unsafe chart snapshot key");let p=s(b,`${l}.${x}`,d+1);p!==void 0&&m.push([x,p])}h=Object.fromEntries(m)}return o.delete(a),h},c={width:t.width,height:t.height,shapes:t.shapes,...t.defs?{defs:t.defs}:{},...t.issues?{issues:t.issues}:{},...t.table?{table:t.table}:{}};return Zt({schemaVersion:"1.0.0",kind:e,configuration:s(n,"input"),canvas:s(c,"canvas"),diagnostics:r})}function Zt(e){let n=0,t=(a,l=0)=>{if(++n>1e5||l>64)throw new Error("Chart snapshot exceeds bounded input size/depth");if(!(a===null||typeof a=="boolean"||typeof a=="string")&&!(typeof a=="number"&&Number.isFinite(a))){if(Array.isArray(a)){a.forEach(d=>t(d,l+1));return}if(!Y(a))throw new Error("Chart snapshot must contain plain JSON only");for(let[d,h]of Object.entries(a)){if(Ht.has(d))throw new Error("Unsafe chart snapshot key");t(h,l+1)}}};if(t(e),new TextEncoder().encode(JSON.stringify(e)).byteLength>8388608)throw new Error("Chart snapshot exceeds 8MB");if(!Y(e)||Object.keys(e).some(a=>!["schemaVersion","kind","configuration","canvas","diagnostics"].includes(a))||e.schemaVersion!=="1.0.0"||typeof e.kind!="string"||!/^[a-z][a-z0-9-]*$/.test(e.kind)||!Y(e.configuration)||!Y(e.canvas)||!Array.isArray(e.diagnostics))throw new Error("Unsupported chart snapshot envelope");let r=e.canvas;if(Object.keys(r).some(a=>!["width","height","shapes","defs","issues","table"].includes(a)))throw new Error("Unsupported runtime geometry field");let i=(a,l=-1e5)=>typeof a=="number"&&Number.isFinite(a)&&a>=l&&a<=1e5;if(!i(r.width,.01)||!i(r.height,.01)||!Array.isArray(r.shapes)||!r.shapes.length||r.shapes.length>2e4)throw new Error("Invalid chart snapshot viewport/geometry");let o={path:["d","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","opacity","fillOpacity","dash"],rect:["x","y","width","height","fill","stroke","opacity","rx"],line:["x1","y1","x2","y2","stroke","dash","strokeWidth","opacity"],circle:["cx","cy","r","fill","stroke","opacity"],text:["x","y","text","anchor","baseline","fill","weight","rotate"]},s={path:["d"],rect:["x","y","width","height","fill"],line:["x1","y1","x2","y2","stroke"],circle:["cx","cy","r","fill"],text:["x","y","text"]},c=new Set(["x","y","x1","y1","x2","y2","width","height","cx","cy","r","strokeWidth","opacity","fillOpacity","rx","rotate"]);for(let a of r.shapes){if(!Y(a)||typeof a.kind!="string"||!Object.hasOwn(o,a.kind)||typeof a.part!="string"||!a.part||Object.keys(a).some(l=>!["kind","part","title","item",...o[a.kind]??[]].includes(l)))throw new Error("Unsupported owner shape");for(let l of s[a.kind]??[])if(!(l in a))throw new Error("Missing owner geometry field");for(let[l,d]of Object.entries(a)){if(c.has(l)&&!i(d,["width","height","r","strokeWidth","rx","opacity","fillOpacity"].includes(l)?0:-1e5))throw new Error("Invalid owner geometry number");if(["opacity","fillOpacity"].includes(l)&&Number(d)>1)throw new Error("Invalid owner paint opacity");if(!c.has(l)&&l!=="item"&&typeof d!="string")throw new Error("Invalid owner shape field")}if(a.kind==="path"&&(typeof a.d!="string"||!/^\s*[Mm][MmLlHhVvCcSsQqTtAaZz0-9eE+.,\s-]*$/.test(a.d)||(a.d.match(/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g)??[]).some(l=>!i(Number(l)))))throw new Error("Invalid owner path geometry");for(let[l,d]of Object.entries({anchor:["start","middle","end"],baseline:["middle","hanging"],weight:["bold"],strokeLinecap:["round"],strokeLinejoin:["round"]}))if(a[l]!==void 0&&(typeof a[l]!="string"||!d.includes(a[l])))throw new Error("Invalid owner shape enum")}if(r.defs!==void 0){if(!Array.isArray(r.defs)||r.defs.length>1e3)throw new Error("Invalid owner gradient list");let a=new Set;for(let l of r.defs){if(!Y(l)||typeof l.id!="string"||!/^[A-Za-z][\w-]*$/.test(l.id)||a.has(l.id)||Object.keys(l).some(h=>!["id","vertical","stops"].includes(h))||l.vertical!==void 0&&typeof l.vertical!="boolean"||!Array.isArray(l.stops)||l.stops.length<2||l.stops.length>64)throw new Error("Invalid owner gradient");a.add(l.id);let d=-1;for(let h of l.stops){if(!Y(h)||Object.keys(h).some(m=>!["offset","color","opacity"].includes(m))||!i(h.offset,0)||h.offset>1||h.offset<d||typeof h.color!="string"||h.opacity!==void 0&&(!i(h.opacity,0)||h.opacity>1))throw new Error("Invalid owner gradient stop");d=h.offset}}}for(let a of e.diagnostics)if(!Y(a)||Object.keys(a).some(l=>!["code","path","message"].includes(l))||[a.code,a.path,a.message].some(l=>typeof l!="string"||!l))throw new Error("Invalid snapshot diagnostic");return e}var Wt=e=>Number(e.toPrecision(12)),Gn,Vn=e=>(Gn??(Gn=new Intl.NumberFormat)).format(Wt(e)),Hn=e=>{let n=Math.round(Math.abs(e)),t=e<0?"-":"",r=Math.floor(n/3600),i=Math.floor(n%3600/60),o=s=>String(s).padStart(2,"0");return r>0?`${t}${r}h ${o(i)}m`:i>0?`${t}${i}m ${o(n%60)}s`:`${t}${n}s`};function ae(e){if(e===void 0)return Vn;if(typeof e=="function")return e;let{style:n,locale:t,digits:r,unit:i="",timeZone:o}=e,s=d=>i?h=>d(h)+i:d,c=d=>r===void 0?d===void 0?{}:{maximumFractionDigits:d}:{minimumFractionDigits:r,maximumFractionDigits:r},a=d=>{let h=new Intl.NumberFormat(t,d);return s(m=>h.format(Wt(m)))},l=d=>{let h=new Intl.DateTimeFormat(t,o?{...d,timeZone:o}:d);return m=>h.format(m)};switch(n){case"integer":return a({maximumFractionDigits:0});case"decimal":return a(c(2));case"percent":return a({style:"percent",...c(0)});case"currency":return a({style:"currency",currency:e.currency??"USD",...c()});case"compact":return a({notation:"compact",...c(1)});case"scientific":return a({notation:"scientific",...c(2)});case"date":return l({dateStyle:"medium"});case"time":return l({timeStyle:"short"});case"datetime":return l({dateStyle:"medium",timeStyle:"short"});case"duration":return s(Hn)}}var Ut=e=>{if(e instanceof Date)return e.getTime();if(typeof e=="number")return e;let n=Number(e);return Number.isFinite(n)&&e.trim()!==""?n:Date.parse(e)};function Ce([e,n],[t,r]){let i=n-e;return o=>i===0?t:t+(o-e)/i*(r-t)}function $e(e,n,t=5){if(e===n)return[e];let r=(n-e)/Math.max(1,t),i=10**Math.floor(Math.log10(r)),o=r/i,s=(o<1.5?1:o<3.5?2:o<7.5?5:10)*i,c=Math.floor(e/s)*s,a=Math.ceil(n/s)*s,l=[];for(let d=c;d<=a+s/2;d+=s)l.push(qt(d));return l}var qt=e=>Number(e.toPrecision(12)),u=e=>Number(e.toFixed(2)),J=e=>typeof e=="number"&&Number.isFinite(e);function le(e){let n=1/0,t=-1/0;for(let r of e)J(r)&&(r<n&&(n=r),r>t&&(t=r));return n===1/0?[0,0]:[n,t]}function Kt(e,n="linear"){if(e.length===0)return"";let t=e[0];if(n==="step"||n==="stepBefore"||n==="stepAfter"){let l=`M${t.x} ${t.y}`;for(let d=1;d<e.length;d++){let h=e[d-1],m=e[d];n==="stepAfter"?l+=`H${m.x}V${m.y}`:n==="stepBefore"?l+=`V${m.y}H${m.x}`:l+=`H${u((h.x+m.x)/2)}V${m.y}H${m.x}`}return l}if(n==="linear"||e.length<3)return`M${e.map(l=>`${l.x} ${l.y}`).join("L")}`;let r=e.length,i=e.slice(1).map((l,d)=>l.x-e[d].x),o=e.slice(1).map((l,d)=>l.y-e[d].y),s=i.map((l,d)=>l===0?0:o[d]/l),c=[s[0]];for(let l=1;l<r-1;l++){let d=s[l-1],h=s[l];c.push(d*h<=0?0:(d+h)/2)}c.push(s[r-2]);for(let l=0;l<r-1;l++){let d=s[l];if(d===0){c[l]=0,c[l+1]=0;continue}let h=c[l]/d,m=c[l+1]/d,x=Math.hypot(h,m);x>3&&(c[l]=3*h*d/x,c[l+1]=3*m*d/x)}let a=`M${t.x} ${t.y}`;for(let l=0;l<r-1;l++){let d=e[l],h=e[l+1],m=i[l]/3;a+=`C${u(d.x+m)} ${u(d.y+m*c[l])} ${u(h.x-m)} ${u(h.y-m*c[l+1])} ${h.x} ${h.y}`}return a}var fe=1e3,me=60*fe,be=60*me,Me=24*be,gr=[fe,5*fe,15*fe,30*fe,me,5*me,15*me,30*me,be,3*be,6*be,12*be,Me,2*Me,7*Me,14*Me];function Xt(e,n){let t=Math.floor(Math.log10(e)),r=Math.ceil(Math.log10(n)),i=r-t<=1?[1,2,5]:[1],o=[];for(let s=t;s<=r;s++)for(let c of i)o.push(qt(c*10**s));return o.filter(s=>s>=e/1.0001&&s<=n*1.0001)}var Zn=/-?\d*\.?\d+(?:e[-+]?\d+)?/gi,Wn=/([MLTHVCSQAZmlthvcsqaz])([^MLTHVCSQAZmlthvcsqaz]*)/g,Un={M:2,L:2,T:2,C:6,S:4,Q:4,A:7,H:-1,V:-2};function qn(e,n,t){return e.replace(Wn,(r,i,o)=>{let s=Un[i];if(s===void 0)return i+o;let a=(o.match(Zn)??[]).map((l,d)=>{let h=Number(l);if(s===-1)return String(h+n);if(s===-2)return String(h+t);let m=d%s;return s===7?m===5?String(h+n):m===6?String(h+t):l:String(m%2===0?h+n:h+t)});return i+a.join(" ")})}var Yt=(e,n,t)=>e.map(r=>{switch(r.kind){case"rect":return{...r,x:r.x+n,y:r.y+t};case"circle":return{...r,cx:r.cx+n,cy:r.cy+t};case"line":return{...r,x1:r.x1+n,x2:r.x2+n,y1:r.y1+t,y2:r.y2+t};case"text":return{...r,x:r.x+n,y:r.y+t};case"path":return{...r,d:qn(r.d,n,t)}}});var Ze=["primary","success","warning","danger","neutral"].flatMap(e=>[500,700].map(n=>`var(--skdx-color-${e}-${n})`)).sort((e,n)=>Number(e.endsWith("700)"))-Number(n.endsWith("700)"))),C={axis:"var(--skdx-color-border-strong)",grid:"var(--skdx-color-border-subtle)",label:"var(--skdx-color-text-muted)",focus:"var(--skdx-color-focus-ring)",positive:"var(--skdx-color-success-500)",negative:"var(--skdx-color-danger-500)",fontFamily:"var(--skdx-font-family)",fontSize:"var(--skdx-font-size-xs)"},Ie=(e="neutral")=>e==="neutral"?C.axis:`var(--skdx-color-${e}-500)`,We=(e="neutral")=>e==="neutral"?C.label:e==="primary"?"var(--skdx-color-text-accent)":`var(--skdx-color-text-${e})`,Jt=(e,n)=>n??Ze[e%Ze.length];var ce={top:16,right:16,bottom:32,left:48};function Qt(e,n,t=ce){return{x:t.left,y:t.top,width:Math.max(0,e-t.left-t.right),height:Math.max(0,n-t.top-t.bottom)}}function ge(e){let n=e.legend;if(n)return n===!0?{}:n.enabled===!1?void 0:n}function en(e){let n=e.tooltip;return n===void 0||n===!0?{enabled:!0}:n===!1?{enabled:!1}:{...n,enabled:n.enabled??!0}}var Te=20,Kn=120,tn=e=>{let n=ge(e);return n&&(n.position==="left"||n.position==="right")?n.width??Kn:0},Ae=(e,n=600,t=300)=>({width:(e.width??n)-tn(e),height:(e.height??t)-(ge(e)?.position==="bottom"?Te:0)}),nn=(e,n,t)=>{let r=ge(e);return!r||!(r.position===void 0||r.position==="top")?0:(n?Math.max(1,on(n,t??Ae(e).width,r)):1)*Te},F=6.5;function qe(e,n){let t=Array.from(e),r=Math.max(0,Math.floor(n/F));return t.length<=r?e:r===0?"":`${t.slice(0,r-1).join("")}\u2026`}var Oe=(e,n,t)=>t??(e.palette&&e.palette.length>0?e.palette[n%e.palette.length]:Jt(n)),rn=(e,n)=>e.hiddenSeries?.includes(n)??!1;function Ue(e,n,t=[],r={},i=10,o=8,s=!1){let c=[],a=r.maxItems,l=a!==void 0&&a>=0&&e.length>a?e.slice(0,a):e,d=e.length-l.length,h=r.interactive??!0,m=o,x=i,b=(p,f,g,S)=>{let I=(f?18:4)+p.length*F;m>o&&(s||m+I>n-8)&&(m=o,x+=Te),f&&c.push({kind:"rect",part:"legend-swatch",x:m,y:x-5,width:10,height:10,fill:f,opacity:S?.3:void 0,item:g}),c.push({kind:"text",part:"legend-label",x:m+(f?14:0),y:x,text:p,baseline:"middle",fill:S?C.grid:C.label,item:g}),m+=I+12};for(let p of l){let f=t.includes(p.name),g=h?{label:p.name,series:p.name,legend:!0}:void 0;b(r.formatter?.(p.name)??p.name,p.color,g,f)}return d>0&&b(`+${d} more`,void 0,void 0,!1),r.align==="end"?Xn(c,n):c}function Xn(e,n){let t=new Map;for(let i of e){let o=i.kind==="rect"?i.y+5:i.y;t.set(o,[...t.get(o)??[],i])}let r=[];for(let i of t.values()){let o=Math.max(...i.map(c=>c.kind==="rect"?c.x+c.width:c.x+c.text.length*F)),s=n-8-o;for(let c of i)r.push({...c,x:c.x+s})}return r}var on=(e,n,t={})=>new Set(Ue(e,n,[],t).flatMap(r=>r.kind==="text"?[r.y]:[])).size;function Ke(e,n,t,r=[]){let i=ge(e),o=i&&e.direction==="rtl"&&i.align===void 0?{...i,align:"end"}:i,s=en(e),c=o?.position==="bottom",a=tn(e),l=e.hiddenSeries??[],d=o?a?Ue(r,1/0,l,o,10,(o.position==="right"?n:0)+8,!0):Ue(r,n,l,o,c?t+10:10):[],h=c?on(r,n,o):0;return{width:n+a,height:c?t+Math.max(1,h)*Te:t,legendOffset:o?.position==="left"?a:void 0,tooltip:s.enabled,tooltipFormatter:s.formatter,axisTooltipFormatter:s.axisFormatter,tooltipPortal:s.portal,tooltipPlacement:s.placement,tooltipAnchored:s.followPointer===!1?!0:void 0,description:e.description,decorative:e.decorative,animate:e.animate===!0?300:e.animate||void 0,responsive:!!e.responsive,shapes:d}}function Xe(e){let n=e.legendOffset;if(!n)return e;let t=[...Yt(e.shapes.filter(a=>!a.part.startsWith("legend-")),n,0),...e.shapes.filter(a=>a.part.startsWith("legend-"))],r=a=>({...a,x:a.x+n}),i=e.hit?{...e.hit,plot:r(e.hit.plot),xs:e.hit.xs.map(a=>a+n),brush:e.hit.brush?{box:r(e.hit.brush.box),window:r(e.hit.brush.window)}:void 0}:void 0,o=e.edit,s=o?{...o,scale:a=>o.scale(a)+n,invert:a=>o.invert(a-n),bars:o.bars.map(a=>({...a,x0:a.x0+n,x1:a.x1+n}))}:void 0,c=e.map?{...e.map,plot:r(e.map.plot)}:void 0;return{...e,shapes:t,hit:i,edit:s,map:c,legendOffset:void 0}}function ze(e,n,t,r,i,o="auto"){let s=Array.isArray(t)?t:[t],c=Math.max(1,Math.floor((r-12)/F)),a=s.flatMap(f=>{let g=[],S=Array.from(f);for(;S.length>c;){let I=S.slice(0,c+1).lastIndexOf(" ");I<1&&(I=c),g.push(S.slice(0,I).join("")),S=S.slice(I),S[0]===" "&&S.shift()}return g.push(S.join("")),g}),l=Math.max(1,Math.floor((i-6)/16)),d=a.slice(0,l);a.length>l&&(d[l-1]=qe(`${d[l-1]}\u2026`,r-12));let h=Math.min(r,Math.max(0,...d.map(f=>Array.from(f).length))*F+12),m=Math.min(i,6+d.length*16),x=o==="top"?{x:e-h/2,y:n-m-8}:o==="bottom"?{x:e-h/2,y:n+8}:o==="left"?{x:e-h-8,y:n-m/2}:o==="right"?{x:e+8,y:n-m/2}:{x:e+12,y:n-m-6},b=Math.max(0,Math.min(r-h,x.x)),p=Math.max(0,Math.min(i-m,x.y));return[{kind:"rect",part:"tooltip",title:s.join(`
2
+ `),x:u(b),y:u(p),width:u(h),height:m,fill:"var(--skdx-color-surface-raised)",stroke:C.axis,rx:8},...d.map((f,g)=>({kind:"text",part:"tooltip-label",x:u(b+6),y:u(p+11+g*16),text:f,baseline:"middle",fill:"var(--skdx-color-text-default)",weight:d.length>1&&g===0?"bold":void 0}))]}function Ye(e,n){let[t,r]=le(e);return n?[Math.min(0,t),Math.max(0,r)]:[t,r]}function Je([e,n],t,r=!1,i){let o=typeof r=="boolean"?{scale:r?"log":"linear"}:r,s=ae(o.format??i),c=o.min??e,a=o.max??n;o.reversed&&(t=[t[1],t[0]]);let l={id:o.id,position:o.position,options:o};if(o.scale==="sqrt"){let p=k=>Math.sign(k)*Math.sqrt(Math.abs(k)),f=o.nice===!1?[c,a]:$e(c,a,o.ticks),g=o.min??f[0],S=o.max??f[f.length-1],I=Ce([p(g),p(S)],t),L=k=>I(p(k)),z=$e(g,S,o.ticks).filter(k=>k>=g-1e-9&&k<=S+1e-9);return{...l,scale:L,domain:[g,S],format:s,ticks:(z.length>=2?z:[g,S]).map(k=>({pos:u(L(k)),label:s(k)})),zero:u(L(Math.min(Math.max(0,g),S)))}}if(o.scale==="log"){let p=Math.max(c,Number.EPSILON),f=Math.max(a,p),g=Xt(p,f),S=[Math.log10(p),Math.log10(f)],I=Ce(S,t),L=z=>I(Math.log10(Math.max(z,Number.EPSILON)));return{...l,scale:L,domain:S,format:s,ticks:g.map(z=>({pos:u(L(z)),label:s(z)})),zero:u(t[0])}}let d=$e(c,a,o.ticks),h=[o.min??(o.nice===!1?c:d[0]),o.max??(o.nice===!1?a:d[d.length-1])],m=Ce(h,t),x=d.filter(p=>p>=h[0]-1e-9&&p<=h[1]+1e-9),b=(x.length>=2?x:[h[0],h[1]]).map(p=>({pos:u(m(p)),label:s(p)}));return{...l,scale:m,domain:h,format:s,ticks:b,zero:u(m(Math.min(Math.max(0,h[0]),h[1])))}}function sn(e,n){if(e.length<2)return e;let t=e.reduce((i,o)=>Math.max(i,o.label.length),0)*F+8,r=Math.max(1,Math.ceil(e.length*t/Math.max(1,n)));return r===1?e:e.filter((i,o)=>o%r===0)}function an(e,n,t,r){let i=e.error!==void 0?"error":e.loading?"loading":n?"empty":null;if(!i)return null;let{width:o,height:s}=Ae(e,t,r),c=i==="error"?e.error:i==="loading"?"Loading\u2026":e.emptyMessage??"No data available",a=[];return i==="loading"&&a.push({kind:"rect",part:"skeleton",x:0,y:0,width:o,height:s,fill:"var(--skdx-color-surface-sunken)",rx:8}),a.push({kind:"text",part:`state-${i}`,x:u(o/2),y:u(s/2),text:c,anchor:"middle",baseline:"middle",fill:i==="error"?"var(--skdx-color-text-danger)":C.label}),{...Ke(e,o,s),shapes:a,tooltip:!1}}var Le=(e,n,t)=>{let r=n.length*F/2;return e+r>t?"end":e-r<0?"start":"middle"};function ln(e,n={}){let{plot:t,xTicks:r,yTicks:i,baseline:o}=e,s=t.x+t.width,c=t.y+t.height,a=[],l=n.grid??!0,d=(b,p)=>p?{kind:"line",part:"grid",x1:b.pos,x2:b.pos,y1:t.y,y2:c,stroke:C.grid}:{kind:"line",part:"grid",x1:t.x,x2:s,y1:b.pos,y2:b.pos,stroke:C.grid},h=n.x?.tickRotation??0,m=(b,p,f,g)=>h?R(b,p,f,{part:g,anchor:h<0?"end":"start",baseline:"middle",rotate:h}):Yn(b,p,f,e.width,{part:g,anchor:Le(b,f,e.width)}),x=(b,p,f,g,S)=>{for(let I of b)a.push(p==="x"?{kind:"line",part:"tick",x1:I.pos,x2:I.pos,y1:f,y2:u(f+g*S),stroke:C.axis}:{kind:"line",part:"tick",x1:f,x2:u(f+g*S),y1:I.pos,y2:I.pos,stroke:C.axis})};if(n.categoryGrid)for(let b of r)a.push(d(b,!n.horizontal));if(n.horizontal){let b=n.axes??[{ticks:i,position:"bottom",offset:0,label:n.yLabel,...n.y}];if(l)for(let p of i)a.push(d(p,!0));b[0]?.showLine!==!1&&a.push({kind:"line",part:"axis",x1:o,x2:o,y1:t.y,y2:c,stroke:C.axis});for(let p of b){let f=p.position==="top"||p.position==="right",g=u(f?t.y-p.offset:c+p.offset),S=f||p.offset>0;p.showLine&&S&&a.push({kind:"line",part:"axis",x1:t.x,x2:s,y1:g,y2:g,stroke:C.axis}),p.showTicks&&x(p.ticks,"x",g,f?-1:1,p.tickSize??4);let I=u(f?g-8:g+20);for(let L of p.ticks)a.push(f?R(L.pos,I,L.label,{part:"x-label-top",anchor:Le(L.pos,L.label,e.width)}):m(L.pos,I,L.label,"x-label"));p.label&&a.push(S?R(4,I,p.label,{part:"axis-title",anchor:"start",baseline:f?void 0:"middle"}):R(4,t.y-6,p.label,{part:"axis-title",anchor:"start"}))}n.x?.showLine&&a.push({kind:"line",part:"axis",x1:n.rtl?s:t.x,x2:n.rtl?s:t.x,y1:t.y,y2:c,stroke:C.axis}),n.x?.showTicks&&x(r,"y",n.rtl?s:t.x,n.rtl?1:-1,n.x.tickSize??4);for(let p of r)a.push(n.rtl?R(s+8,p.pos,p.label,{part:"y-label",anchor:"start",baseline:"middle"}):R(t.x-8,p.pos,p.label,{part:"y-label",anchor:"end",baseline:"middle"}))}else{if(l)for(let p of i)a.push(d(p,!1));n.y?.showLine!==!1&&a.push({kind:"line",part:"axis",x1:t.x,x2:s,y1:o,y2:o,stroke:C.axis});let b=n.axes??[{ticks:i,position:"left",offset:0,label:n.yLabel,...n.y},...n.rightTicks?[{ticks:n.rightTicks,position:"right",offset:0,label:n.rightLabel}]:[]];for(let p of b){let f=p.position==="left",g=f?t.x-p.offset:s+p.offset,S=f?"y-label":"y-label-right";p.showLine&&a.push({kind:"line",part:"axis",x1:u(g),x2:u(g),y1:t.y,y2:c,stroke:C.axis}),p.showTicks&&x(p.ticks,"y",u(g),f?-1:1,p.tickSize??4);for(let I of p.ticks)a.push(R(u(f?g-8:g+8),I.pos,I.label,{part:S,anchor:f?"end":"start",baseline:"middle"}));p.label&&a.push(R(u(f?p.offset===0?4:Math.max(4,g-40):p.offset===0?e.width-4:Math.min(e.width-4,g+40)),t.y-6,p.label,{part:"axis-title",anchor:f?"start":"end"}))}n.x?.showTicks&&x(r,"x",c,1,n.x.tickSize??4);for(let p of r)a.push(m(p.pos,c+(h?12:20),p.label,"x-label"))}return n.xLabel&&a.push(R(u(t.x+t.width/2),e.height-4,n.xLabel,{part:"axis-title",anchor:"middle"})),n.horizontal&&n.rightLabel&&a.push(R(e.width-4,t.y-6,n.rightLabel,{part:"axis-title",anchor:"end"})),a}var R=(e,n,t,r={})=>({kind:"text",part:"label",x:e,y:n,text:t,fill:C.label,...r});function Yn(e,n,t,r,i={}){let o=Math.max(4,Math.min(r-4,e)),s=i.anchor??"start",c=s==="middle"?2*Math.min(o-4,r-o-4):s==="end"?o-4:r-o-4,a=qe(t,c);return{kind:"text",part:"label",x:o,y:n,fill:C.label,...i,text:a,title:a===t?i.title:t}}var cn=(e,n,t,r,i,o)=>({kind:"circle",part:"point",cx:e,cy:n,r:t,fill:r,title:i,item:o});function Qe(e,n){let t=[],{plot:r}=n,i=r.x+r.width,o=r.y+r.height,s=a=>Math.max(r.x,Math.min(i,a)),c=a=>Math.max(r.y,Math.min(o,a));for(let a of e??[]){let l=a.color??Ie(a.variant),d=a.color??We(a.variant),h={part:"reference-label",fill:d},m=n.horizontal===!0;if("y"in a){let x=u(n.y(a.y,a.axis??"left"));if(m){let b=s(x);t.push(...hn(b,r.y,o,l,a.label,h))}else{let b=c(x);t.push(...dn(r.x,i,b,l,a.label,h))}}else if("x"in a){let x=n.x(a.x);if(x===void 0)continue;m?t.push(...dn(r.x,i,c(u(x)),l,a.label,h)):t.push(...hn(s(u(x)),r.y,o,l,a.label,h))}else if("y1"in a){let x=u(n.y(a.y1,a.axis??"left")),b=u(n.y(a.y2,a.axis??"left"));m?t.push(...pn(s(Math.min(x,b)),s(Math.max(x,b)),r,l,a.label,d)):t.push(...un(c(Math.min(x,b)),c(Math.max(x,b)),r,l,a.label,d))}else{let x=n.x(a.x1),b=n.x(a.x2);if(x===void 0||b===void 0)continue;let p=u(Math.min(x,b)),f=u(Math.max(x,b));m?t.push(...un(c(p),c(f),r,l,a.label,d)):t.push(...pn(s(p),s(f),r,l,a.label,d))}}return t}function dn(e,n,t,r,i,o){let s={kind:"line",part:"reference",x1:e,x2:n,y1:t,y2:t,stroke:r,dash:"6 4",strokeWidth:1.5,title:i};return i?[s,R(n-4,t-5,i,{...o,anchor:"end"})]:[s]}function hn(e,n,t,r,i,o){let s={kind:"line",part:"reference",x1:e,x2:e,y1:n,y2:t,stroke:r,dash:"6 4",strokeWidth:1.5,title:i};return i?[s,R(e+4,n+10,i,{...o,anchor:"start"})]:[s]}function un(e,n,t,r,i,o){let s={kind:"rect",part:"reference-area",x:t.x,y:e,width:t.width,height:u(Math.max(0,n-e)),fill:r,opacity:.12,title:i};return i?[s,R(t.x+t.width-4,e+12,i,{part:"reference-label",fill:o,anchor:"end"})]:[s]}function pn(e,n,t,r,i,o){let s={kind:"rect",part:"reference-area",x:e,y:t.y,width:u(Math.max(0,n-e)),height:t.height,fill:r,opacity:.12,title:i};return i?[s,R(e+4,t.y+12,i,{part:"reference-label",fill:o,anchor:"start"})]:[s]}function fn(e,n){let t=[],{plot:r}=n,i=r.x+r.width,o=r.y+r.height;for(let s of e??[]){let c=s.color??Ie(s.variant),a=s.color??We(s.variant),l=(b,p,f)=>{let g=n.x(b);if(g===void 0)return;let S=n.y(p,f??"left");return n.horizontal?{x:u(S),y:u(g)}:{x:u(g),y:u(S)}},d=s.id??s.label,h=b=>({label:b,id:d,name:s.label});if(s.type==="line"||s.type==="band"){let{type:b,id:p,...f}=s;t.push(...Qe([f],n));continue}if(s.type==="rect"){let b=l(s.x1,s.y1,s.axis),p=l(s.x2,s.y2,s.axis);if(!b||!p)continue;let f=Math.max(r.x,Math.min(b.x,p.x)),g=Math.max(r.y,Math.min(b.y,p.y)),S=s.label??"";t.push({kind:"rect",part:"annotation-rect",x:u(f),y:u(g),width:u(Math.max(0,Math.min(i,Math.max(b.x,p.x))-f)),height:u(Math.max(0,Math.min(o,Math.max(b.y,p.y))-g)),fill:c,opacity:.12,stroke:c,title:S||void 0,item:S?h(S):void 0}),s.label&&t.push(R(u(f+4),u(g+12),s.label,{part:"annotation-label",fill:a}));continue}let m=l(s.x,s.y,s.axis);if(!m)continue;if(s.type==="text"){t.push(R(m.x,m.y,s.text,{part:"annotation-text",fill:a,anchor:"middle",baseline:"middle",title:s.label}));continue}let x=s.label??`${String(s.x)}, ${s.y}`;if(t.push({kind:"circle",part:"annotation-point",cx:m.x,cy:m.y,r:5,fill:c,stroke:"var(--skdx-color-surface-default)",title:x,item:h(x)}),s.type==="callout"&&s.label){let[b,p]=s.offset??[16,-16],f=u(Math.max(r.x,Math.min(i,m.x+b))),g=u(Math.max(r.y,Math.min(o,m.y+p)));t.push({kind:"line",part:"annotation-leader",x1:m.x,y1:m.y,x2:f,y2:g,stroke:c},R(f,g,s.label,{part:"annotation-label",fill:a,anchor:b>=0?"start":"end",baseline:"middle"}))}}return t}var xe=e=>Math.max(0,Math.min(1,e));function mn(e){let n=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(n){let r=n[1],i=r.length===3?r.split("").map(o=>o+o).join(""):r;return[0,2,4].map(o=>parseInt(i.slice(o,o+2),16))}let t=/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/i.exec(e.trim());return t?[Number(t[1]),Number(t[2]),Number(t[3])]:void 0}function bn(e,n){if(e.length===0)return C.axis;if(e.length===1)return e[0];let t=xe(n)*(e.length-1),r=Math.min(e.length-2,Math.floor(t)),i=t-r,o=mn(e[r]),s=mn(e[r+1]);if(!o||!s)return e[Math.round(t)];let c=a=>Math.round(o[a]+(s[a]-o[a])*i);return`rgb(${c(0)}, ${c(1)}, ${c(2)})`}var gn=(e,n)=>n!==void 0&&n>=2?Math.min(n-1,Math.floor(xe(e)*n))/(n-1):xe(e);function xn(e,n,t,r=C.negative,i=String){let[o,s]=le(n),c=e??{type:"sequential"},a=f=>u(.15+.85*f);if(c.type==="threshold"){let{thresholds:f,colors:g,labels:S}=c,I=z=>{if(typeof z!="number"||!Number.isFinite(z))return;let k=0;for(;k<f.length&&z>=f[k];)k++;return{fill:g[Math.min(k,g.length-1)]??t,opacity:1}},L=g.map((z,k)=>({fill:z,opacity:1,label:S?.[k]??(k===0?`< ${i(f[0]??0)}`:k===f.length?`\u2265 ${i(f[k-1])}`:`${i(f[k-1])} \u2013 ${i(f[k])}`)}));return{color:I,domain:[o,s],swatches:L,kind:"threshold"}}if(c.type==="ordinal"){let f=c.colors?.length?c.colors:[t];return{color:S=>typeof S=="number"&&Number.isFinite(S)?{fill:f[Math.abs(Math.round(S))%f.length],opacity:1}:void 0,domain:[o,s],swatches:f.map((S,I)=>({fill:S,opacity:1,label:String(I)})),kind:"ordinal"}}if(c.type==="diverging"){let[f,g,S]=c.domain??[-Math.max(Math.abs(o),Math.abs(s)),0,Math.max(Math.abs(o),Math.abs(s))],I=c.colors,L=j=>j<g?.5*(j-f)/Math.max(1e-12,g-f):.5+.5*(j-g)/Math.max(1e-12,S-g),z=j=>{let W=gn(c.reversed?1-xe(j):j,c.steps);if(I&&I.length>=2)return{fill:bn(I,W),opacity:1};let D=W<.5?r:t,V=Math.abs(W-.5)*2;return{fill:D,opacity:a(V)}},k=j=>typeof j=="number"&&Number.isFinite(j)?z(L(j)):void 0,G=c.steps??5,X=Array.from({length:G},(j,W)=>{let D=G===1?.5:W/(G-1),V=D<.5?f+(g-f)*(D*2):g+(S-g)*((D-.5)*2);return{...z(D),label:i(V)}});return{color:k,domain:[f,S],swatches:X,kind:"diverging"}}let[l,d]=c.domain??[o,s],h=c.colors,m=f=>{let g=gn(c.reversed?1-xe(f):f,c.steps);return h&&h.length>=2?{fill:bn(h,g),opacity:1}:{fill:h?.[0]??t,opacity:a(g)}},x=f=>typeof f!="number"||!Number.isFinite(f)?void 0:m(d===l?1:(f-l)/(d-l)),b=c.steps??5,p=Array.from({length:b},(f,g)=>{let S=b===1?1:g/(b-1);return{...m(S),label:i(l+(d-l)*S)}});return{color:x,domain:[l,d],swatches:p,kind:"sequential"}}var Jn=34,Qn=72;function yn(e){if(!e)return{bottom:0,right:0,options:{}};let n=e===!0?{}:e;return n.orientation==="vertical"?{bottom:0,right:Qn,options:n}:{bottom:Jn,right:0,options:n}}function wn(e,n,t){let r=typeof t=="string"?{title:t}:t??{},i=r.title,o=e.swatches;if(o.length===0||n.width<=0)return[];if(r.orientation==="vertical"){let d=Math.max(0,n.height-(i?16:0)),h=Math.min(16,d/o.length),m=n.y+(i?16:0),x=o.map((p,f)=>({kind:"rect",part:"color-legend-swatch",x:u(n.x),y:u(m+f*h),width:10,height:u(h),fill:p.fill,opacity:p.opacity,title:p.label})),b=h>=12?1:2;return o.forEach((p,f)=>{f%b!==0&&f!==o.length-1||x.push({kind:"text",part:"color-legend-label",x:u(n.x+14),y:u(m+(f+.5)*h),text:p.label,baseline:"middle",fill:C.label})}),i&&x.push({kind:"text",part:"color-legend-title",x:u(n.x),y:u(n.y+6),text:i,baseline:"middle",fill:C.label}),x}let s=Math.min(n.width/o.length,96),c=n.x+(n.width-s*o.length)/2,a=o.map((d,h)=>({kind:"rect",part:"color-legend-swatch",x:u(c+h*s),y:u(n.y),width:u(s),height:10,fill:d.fill,opacity:d.opacity,title:d.label})),l=e.kind==="threshold"?1:Math.max(1,Math.ceil(o.length*7*F/Math.max(1,s*o.length)));return o.forEach((d,h)=>{h%l!==0&&h!==o.length-1||a.push({kind:"text",part:"color-legend-label",x:u(c+(h+.5)*s),y:u(n.y+22),text:d.label,anchor:"middle",fill:C.label})}),i&&a.push({kind:"text",part:"color-legend-title",x:u(c-6),y:u(n.y+5),text:i,anchor:"end",baseline:"middle",fill:C.label}),a}var er=1e4,tr=e=>Array.isArray(e)?{x:e[0],y:e[1],size:e[2],label:void 0,id:void 0,color:void 0,value:void 0}:{x:e.x,y:e.y,size:e.size,label:e.label,id:e.id,color:e.color,value:e.value};function nr(e,n,t,r,i,o,s,c){if(r==="circle")return{...cn(e,n,t,i,o,s),part:c};let a=r==="square"?`M${u(e-t)} ${u(n-t)}h${u(2*t)}v${u(2*t)}h${u(-2*t)}Z`:r==="diamond"?`M${u(e)} ${u(n-t*1.3)}L${u(e+t*1.3)} ${u(n)}L${u(e)} ${u(n+t*1.3)}L${u(e-t*1.3)} ${u(n)}Z`:`M${u(e)} ${u(n-t*1.2)}L${u(e+t*1.15)} ${u(n+t*.9)}L${u(e-t*1.15)} ${u(n+t*.9)}Z`;return{kind:"path",part:c,d:a,fill:i,title:o,item:s}}function vn(e,n){let t=[],r=e.series.map((w,E)=>({name:w.name,id:w.id,symbol:w.symbol??"circle",color:Oe(e,E,w.color),data:rn(e,w.name)?[]:w.data.flatMap((T,_)=>{let P=tr(T);return J(P.x)&&J(P.y)?[{...P,index:_}]:[]})})),i=e.sampling==="auto"?er:typeof e.sampling=="object"?e.sampling.threshold:1/0,o=r.reduce((w,E)=>w+E.data.length,0),s=o>i?Math.ceil(o/i):1;s>1&&t.push({code:"sampled",severity:"warning",message:`${o} points exceed the sampling threshold of ${i}; every ${s}th point is drawn.`});let c=s>1?r.map(w=>({...w,data:w.data.filter((E,T)=>T%s===0)})):r,a=c.flatMap(w=>w.data),l=an(e,a.length===0);if(l)return{...l,issues:t};let{width:d,height:h}=Ae(e),m=e.colorScale?yn(e.colorLegend):{bottom:0,right:0,options:{}},x=e.series.map((w,E)=>({name:w.name,color:Oe(e,E,w.color)})),b=Qt(d,h,{...ce,top:ce.top+nn(e,x,d)+(e.yAxis?.label?12:0),right:ce.right+m.right,bottom:ce.bottom+(e.xAxis?.label?14:0)+m.bottom}),p=e.markerSize??3,f=Math.max(0,e.hitRadius??0),g=Math.max(0,e.jitter??0),S=le(a.map(w=>w.size)),I=w=>w==="diamond"?1.3:w==="triangle"?1.2:1,L=(w,E)=>Math.max(0,E?n.radius(w.size,S):p),z=0;for(let w of c){let E=w.data.some(_=>_.size!==void 0),T=I(w.symbol);for(let _ of w.data)z=Math.max(z,L(_,E)*T)}let k=Math.min(1,Math.min(b.width,b.height)*.45/Math.max(1,z+g)),G=g*k,X=z*k+G,j=new Map,W=e.colorScale?xn(e.colorScale,a.map(w=>w.value),Oe(e,0),void 0,ae(e.format)):void 0,D=Je(Ye(a.map(w=>w.x),!1),[b.x+X,b.x+b.width-X],e.xAxis??{},e.format),V=Je(Ye(a.map(w=>w.y),!1),[b.y+b.height-X,b.y+X],e.yAxis??{},e.format),_e=Ke(e,d,h,x),pe=[],Nt=[],Fe=[],Pt=[];for(let w of c){let E=w.data.some(T=>T.size!==void 0);for(let T of w.data){let _=T.index,P=n.describe(w.name,T,D,V),q=L(T,E)*k,H=u(D.scale(T.x)),U=u(V.scale(T.y));if(G>0){let oe=`${Math.round(H)},${Math.round(U)}`,re=j.get(oe)??0;if(j.set(oe,re+1),re>0){let se=re*2.399963;H=u(H+G*Math.cos(se)),U=u(U+G*Math.sin(se))}}let ie=W?.color(T.value),Z={label:P,id:T.id,series:w.name,seriesId:w.id??w.name,name:T.label,index:_,value:T.y},ee=T.color??ie?.fill??w.color;if(pe.push(nr(H,U,u(q),w.symbol,ee,P,Z,E?n.part:"point")),f>0&&pe.push({kind:"circle",part:"hit",cx:H,cy:U,r:u(q+f),fill:ee,opacity:0,title:P,item:Z}),e.labels&&T.label){let oe=T.label.length*F,re=H-oe/2,se=U-q-4;Pt.some(Se=>Math.abs(Se.y-se)<12&&re<Se.x+Se.w+4&&re+oe+4>Se.x)||(Pt.push({x:re,y:se,w:oe}),Nt.push(R(H,u(se),T.label,{part:"point-label",anchor:"middle",fill:"var(--skdx-color-text-default)"})))}}if(e.trendline&&w.data.length>=2){let T=e.trendline===!0?"linear":e.trendline,_=rr(w.data.map(P=>[P.x,P.y]),T);if(_){let[P,q]=D.domain,H=`${w.name} trend${T==="linear"?"":` (${T})`}: r\xB2 ${_.r2.toFixed(2)}`,U=w.color;if(T==="linear")Fe.push({kind:"line",part:"trendline",x1:u(D.scale(P)),y1:u(V.scale(_.predict(P))),x2:u(D.scale(q)),y2:u(V.scale(_.predict(q))),stroke:U,dash:"5 4",strokeWidth:1.5,title:H});else{let ie=Array.from({length:40},(Z,ee)=>P+(q-P)*ee/39).map(Z=>({v:Z,p:_.predict(Z)})).filter(({p:Z})=>Number.isFinite(Z)).map(({v:Z,p:ee})=>({x:u(D.scale(Z)),y:u(V.scale(ee))}));ie.length>1&&Fe.push({kind:"path",part:"trendline",d:Kt(ie),stroke:U,dash:"5 4",strokeWidth:1.5,title:H})}}}}let Dt=-1/0,Bt=sn(D.ticks,Math.max(1,b.width-2*X)),jt=new Set;for(let w of[...Bt].sort((E,T)=>E.pos-T.pos)){let E=w.label.length*F,T=e.xAxis?.tickRotation??0,_=T?T<0?"end":"start":Le(w.pos,w.label,d),P=-(_==="end"?E:_==="middle"?E/2:0),q=T*Math.PI/180,H=[P,P+E].flatMap(Z=>[-7,7].map(ee=>w.pos+Z*Math.cos(q)-ee*Math.sin(q))),U=Math.min(...H),ie=Math.max(...H);U<Dt+4||(Dt=ie,jt.add(w))}let En=Bt.filter(w=>jt.has(w)),_t={..._e,plot:b,xTicks:En,yTicks:V.ticks,baseline:V.zero},Ft={plot:b,x:w=>D.scale(Ut(w)),y:w=>V.scale(w)},Nn=Qe(e.references,Ft),Pn=W&&(m.bottom||m.right)?wn(W,m.right?{x:b.x+b.width+12,y:b.y,width:m.right,height:b.height}:{x:b.x,y:h-m.bottom+8,width:b.width,height:m.bottom},m.options):[],Gt=n.opacity;return{..._e,shapes:[...ln({..._t,height:_t.height-m.bottom},{xLabel:e.xAxis?.label,x:e.xAxis,y:{showLine:e.yAxis?.showLine,showTicks:e.yAxis?.showTicks,tickSize:e.yAxis?.tickSize,tickRotation:e.yAxis?.tickRotation}}),...e.yAxis?.label?[R(4,b.y-14,e.yAxis.label,{part:"axis-title",anchor:"start"})]:[],...Nn,...Gt!==void 0&&pe.some(w=>w.part===n.part)?pe.map(w=>(w.kind==="circle"||w.kind==="path")&&w.part!=="hit"?{...w,opacity:Gt}:w):pe,...Fe,...Nt,...fn(e.annotations,Ft),...Pn,..._e.shapes],issues:t}}function rr(e,n="linear"){let t;if(n==="polynomial"){let a=0,l=0,d=0,h=0,m=0,x=0,b=0,p=0;for(let[k,G]of e)a+=1,l+=k,d+=k*k,h+=k**3,m+=k**4,x+=G,b+=k*G,p+=k*k*G;let f=k=>k[0]*(k[4]*k[8]-k[5]*k[7])-k[1]*(k[3]*k[8]-k[5]*k[6])+k[2]*(k[3]*k[7]-k[4]*k[6]),S=f([m,h,d,h,d,l,d,l,a]);if(Math.abs(S)<1e-12)return;let I=f([p,h,d,b,d,l,x,l,a])/S,L=f([m,p,d,h,b,l,d,x,a])/S,z=f([m,h,p,h,d,b,d,l,x])/S;t=k=>I*k*k+L*k+z}else{let a=n==="logarithmic"||n==="power"?Math.log:x=>x,l=n==="exponential"||n==="power"?Math.log:x=>x,d=e.filter(([x,b])=>Number.isFinite(a(x))&&Number.isFinite(l(b))),h=ir(d.map(([x,b])=>[a(x),l(b)]));if(!h)return;let m=n==="exponential"||n==="power"?Math.exp:x=>x;t=x=>m(h.intercept+h.slope*a(x))}let r=t,i=e.filter(([a])=>Number.isFinite(r(a)));if(i.length===0)return;let o=i.reduce((a,[,l])=>a+l,0)/i.length,s=0,c=0;for(let[a,l]of i)s+=(l-r(a))**2,c+=(l-o)**2;return{predict:r,r2:c===0?1:Math.max(0,1-s/c)}}function ir(e){let n=e.length,t=e.reduce((l,d)=>l+d[0],0)/n,r=e.reduce((l,d)=>l+d[1],0)/n,i=0,o=0,s=0;for(let[l,d]of e)i+=(l-t)**2,o+=(l-t)*(d-r),s+=(d-r)**2;if(i===0)return;let c=o/i,a=s===0?1:o*o/(i*s);return{slope:c,intercept:r-c*t,r2:a}}function Re(e){return e==null?[]:(Array.isArray(e)?e:[e]).map(t=>typeof t=="object"?t:{id:t})}var et=e=>e.id??e.name??e.series,Sn=e=>e.seriesId??e.series;function Q(e,n){let t=!1;return n.id!==void 0&&(t=!0,et(e)!==n.id&&e.id!==n.id&&e.name!==n.id)||n.series!==void 0&&(t=!0,Sn(e)!==n.series&&e.series!==n.series)||n.index!==void 0&&(t=!0,e.index!==n.index)||n.category!==void 0&&(t=!0,e.category!==n.category)?!1:t}function te(e){let n={},t=et(e);t!==void 0&&(n.id=t);let r=Sn(e);return r!==void 0&&e.series!==void 0&&(n.series=r),e.index!==void 0&&(n.index=e.index),n}var tt=(e,n)=>e.id===n.id&&e.series===n.series&&e.index===n.index&&e.category===n.category;function nt(e,n,t){let r=Re(e),i=te(n),o=r.some(s=>Q(n,s));return t==="single"?o?[]:[i]:o?r.filter(s=>!Q(n,s)):[...r,i]}var or=.2;function sr(e){let n=C.focus;switch(e.kind){case"rect":return{kind:"rect",part:"selected",x:e.x-1.5,y:e.y-1.5,width:e.width+3,height:e.height+3,fill:"none",stroke:n,rx:e.rx};case"circle":return{kind:"circle",part:"selected",cx:e.cx,cy:e.cy,r:e.r+2.5,fill:"none",stroke:n};case"path":return{kind:"path",part:"selected",d:e.d,fill:"none",stroke:n,strokeWidth:2.5};case"line":return{...e,part:"selected",stroke:n,strokeWidth:(e.strokeWidth??1)+3,title:void 0,item:void 0};case"text":return}}var ar=(e,n)=>e.kind==="text"?{...e,fill:C.grid}:{...e,opacity:(e.opacity??1)*n};function rt(e,n){let t=Re(n.selected),r=n.highlighted===void 0||n.highlighted===null?[]:Re(n.highlighted),i=r[0];if(t.length===0&&!i)return e;let o={highlighted:n.highlightScope?.highlighted??"item",faded:n.highlightScope?.faded??"global"},s=[],c=d=>!i||r.some(h=>Q(d,h))?!0:o.highlighted==="series"?r.some(h=>h.series!==void 0&&Q(d,{series:h.series})):!1,a=d=>{if(!i||o.faded==="none"||c(d))return!1;if(o.faded==="series"){let h=i.series;return h!==void 0&&Q(d,{series:h})}return!0},l=e.shapes.map(d=>{let h=d.item;if(!h||h.legend)return d;if(t.some(m=>Q(h,m))){let m=sr(d);m&&s.push(m)}return a(h)?ar(d,or):d});return s.length?{...e,shapes:[...l,...s]}:{...e,shapes:l}}function it(e){let[n,t]=e.sizeRange??[4,24],r=ae(e.zAxis?.format??e.format),i=e.zAxis?.label,o=e.xAxis?.label,s=e.yAxis?.label,c=(a,l)=>a?`${a} ${l}`:l;return vn({...e,series:e.series.map(a=>({name:a.name,id:a.id,color:a.color,data:a.data.filter(l=>J(l.x)&&J(l.y)).map(l=>({x:l.x,y:l.y,size:J(l.z)?Math.max(0,l.z):0,label:l.label,id:l.id,color:l.color,value:l.value??l.z}))}))},{part:"bubble",opacity:.7,radius:(a,[,l])=>l>0&&J(a)?Math.max(n,Math.sqrt(a/l)*t):n,describe:(a,l,d,h)=>`${a}${l.label?` ${l.label}`:""}: ${c(o,d.format(l.x))}, ${c(s,h.format(l.y))}, ${c(i,r(l.size??0))}`})}var kn="var(--skdx-radius-default, var(--skdx-radius-md, 0.5rem))";function Ee(e){return["tooltip","skeleton","label-background","stage-label-background","brush-handle"].includes(e)?kn:void 0}function ue(e,n,t,r,i){let o=e.getBoundingClientRect();return{x:o.width?(n-o.left)*r/o.width:n,y:o.height?(t-o.top)*i/o.height:t}}var ot=(e,n,t)=>n>=e.x&&n<=e.x+e.width&&t>=e.y&&t<=e.y+e.height;function Mn(e,n){let t=0,r=1/0;return e.xs.forEach((i,o)=>{let s=Math.abs(i-n);s<r&&(r=s,t=o)}),t}function ye(e,n){let t=e.hit;if(!t||t.xs.length===0)return;let r=Mn(t,n),i=t.rows[r]??[];return{index:r,rows:e.axisTooltipFormatter?.(i,r)??i}}function st(e,n){let t=e.hit;if(!t||t.xs.length===0)return;let r=t.xs[Mn(t,n)];return{kind:"line",part:"crosshair",x1:r,x2:r,y1:t.plot.y,y2:t.plot.y+t.plot.height,stroke:C.axis,dash:"3 3"}}function at(e,n,t){let r=e.hit;if(!r||!r.crosshair||r.xs.length===0||!ot(r.plot,n,t))return[];let i=st(e,n),{rows:o}=ye(e,n),s=e.tooltipAnchored?r.plot.y+8:t;return[i,...ze(i.x1,s,o,e.width,e.height,e.tooltipPlacement)]}function lt(e,n){let t=e.hit;if(!t||t.xs.length===0)return[];let r=t.rows.findIndex(o=>o[0]===n);if(r<0)return[];let i=t.xs[r];return at(e,i,t.plot.y+8)}function ct(e,n,t,r,i){if(!e.tooltip)return{lines:[],shapes:[]};if(e.hit?.crosshair){let{x:a,y:l}=ue(t,r,i,e.width,e.height);if(ot(e.hit.plot,a,l)){let d=ye(e,a),h=st(e,a);if(d&&h)return{lines:d.rows,shapes:[h]}}}let o=n?.closest?.("[data-skdx-part]"),s=e.tooltipFormatter?ne(e,n)?.item:void 0,c=s&&e.tooltipFormatter?.(s)||o&&Array.from(o.children).find(a=>a.tagName.toLowerCase()==="title")?.textContent;return c?{lines:Array.isArray(c)?c:[c],shapes:[]}:{lines:[],shapes:[]}}function Cn(e,n,t,r,i,o,s){let c=e?.closest?.("[data-skdx-part]"),a=s&&s.tooltipFormatter?ne(s,e)?.item:void 0,l=a&&s?.tooltipFormatter?.(a)||c&&Array.from(c.children).find(b=>b.tagName.toLowerCase()==="title")?.textContent;if(!l)return[];let d=s?.tooltipAnchored?ne(s,e):void 0,h=d?s?.shapes[d.index]:void 0,{x:m,y:x}=h?we(h):ue(n,t,r,i,o);return ze(m,x,l,i,o,s?.tooltipPlacement)}function dt(e,n,t,r,i){if(!e.tooltip)return[];if(e.hit?.crosshair){let{x:o,y:s}=ue(t,r,i,e.width,e.height),c=at(e,o,s);if(c.length>0)return c}return Cn(n,t,r,i,e.width,e.height,e)}function ht(e,n){let t=ne(e,n);return t&&!t.item.legend?te(t.item):null}var lr=(e,n)=>{let{x:t,y:r}=we(e),i=e.kind==="circle"?e.cy:e.kind==="rect"?e.y+e.height/2:r;return t>=n.x&&t<=n.x+n.width&&i>=n.y&&i<=n.y+n.height};function ut(e,n){let t=new Set,r=[];for(let i of e.shapes){if(!i.item||i.item.legend||i.part==="anchor"||!lr(i,n))continue;let o=te(i.item),s=JSON.stringify(o);t.has(s)||(t.add(s),r.push(o))}return r}var pt=e=>({kind:"rect",part:"selection-box",x:u(e.x),y:u(e.y),width:u(e.width),height:u(e.height),fill:C.focus,opacity:.12,stroke:C.focus}),Pe=(e,n,t,r)=>({x:Math.min(e,t),y:Math.min(n,r),width:Math.abs(t-e),height:Math.abs(r-n)});function $n(e,n,t){let r=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){let s=e[i],c=e[o];s.y>t!=c.y>t&&n<(c.x-s.x)*(t-s.y)/(c.y-s.y)+s.x&&(r=!r)}return r}function ft(e,n){if(n.length<3)return[];let t=new Set,r=[];for(let i of e.shapes){if(!i.item||i.item.legend||i.part==="anchor")continue;let{x:o,y:s}=we(i),c=i.kind==="circle"?i.cy:i.kind==="rect"?i.y+i.height/2:s;if(!$n(n,o,c))continue;let a=te(i.item),l=JSON.stringify(a);t.has(l)||(t.add(l),r.push(a))}return r}var mt=e=>({kind:"path",part:"selection-lasso",d:e.length?`M${e.map(n=>`${u(n.x)} ${u(n.y)}`).join("L")}`:"",fill:C.focus,fillOpacity:.12,stroke:C.focus,dash:"4 3"}),Ne=6;function bt(e,n,t){let r=e.edit;if(r){for(let i of r.bars)if(!(t<i.y||t>i.y+i.height||n<i.x0-Ne||n>i.x1+Ne))return Math.abs(n-i.x0)<=Ne?{bar:i,mode:"start"}:Math.abs(n-i.x1)<=Ne?{bar:i,mode:"end"}:{bar:i,mode:"move"}}}function gt(e,n,t){let r=e.edit;return In(r,n,r.invert(n.bar.x0+t)-r.invert(n.bar.x0))}function xt(e,n,t){let r=e.edit,i=t.key==="ArrowRight"?1:t.key==="ArrowLeft"?-1:0;if(!r||n===null||!i||!(t.shiftKey||t.altKey))return;let o=r.bars.find(a=>a.index===n);if(!o)return;let s=t.altKey?t.shiftKey?"start":"end":"move",c=r.snap??r.invert(o.x0+10)-r.invert(o.x0);return In(r,{bar:o,mode:s},i*c)}function In(e,{bar:n,mode:t},r){let i=c=>e.snap?Math.round(c/e.snap)*e.snap:c,o=n.start,s=n.end;return t==="move"?(o=i(n.start+r),s=o+(n.end-n.start)):t==="start"?o=Math.min(i(n.start+r),n.end):s=Math.max(i(n.end+r),n.start),{id:n.id,name:n.name,start:o,end:s}}function yt(e,n,t){let r=e.edit,i=r.scale(t.start),o=r.scale(t.end);return{kind:"rect",part:"edit-ghost",x:u(Math.min(i,o)),y:u(n.bar.y),width:u(Math.max(1,Math.abs(o-i))),height:u(n.bar.height),fill:C.focus,opacity:.25,stroke:C.focus,rx:2}}var cr=64,dr=e=>Math.max(1,Math.min(cr,e));function wt(e,n,t,r){let i=n>0?.8:1.25,o=dr(e.view.zoom*i);if(o===e.view.zoom)return e.view;let{plot:s,scale:c}=e,[a,l]=e.view.center,d=(t-(s.x+s.width/2))/c,h=(r-(s.y+s.height/2))/c,m=e.view.zoom/o;return{center:[a+d*(1-m),e.fromY(e.toY(l)-h*(1-m))],zoom:o}}function vt(e,n,t,r){let{scale:i}=e;return{center:[n.center[0]-t/i,e.fromY(e.toY(n.center[1])+r/i)],zoom:n.zoom}}function ne(e,n){let t=n?.closest?.("[data-skdx-i]"),r=Number(t?.getAttribute("data-skdx-i")),i=Number.isInteger(r)?e.shapes[r]?.item:void 0;return i?{index:r,item:i}:void 0}var De=e=>e.shapes.flatMap((n,t)=>n.item&&!n.item.legend?[t]:[]);function we(e){switch(e.kind){case"rect":return{x:e.x+e.width/2,y:e.y};case"circle":return{x:e.cx,y:e.cy-e.r};case"line":return{x:(e.x1+e.x2)/2,y:Math.min(e.y1,e.y2)};case"text":return{x:e.x,y:e.y};case"path":{let n=/M\s*(-?[\d.]+)[ ,](-?[\d.]+)/.exec(e.d);return n?{x:Number(n[1]),y:Number(n[2])}:{x:0,y:0}}}}function St(e,n){let t=n===null?void 0:e.shapes[n];if(!t)return[];let r=C.focus,i;switch(t.kind){case"rect":i={kind:"rect",part:"focus",x:t.x-2,y:t.y-2,width:t.width+4,height:t.height+4,fill:"none",stroke:r,rx:2};break;case"circle":i={kind:"circle",part:"focus",cx:t.cx,cy:t.cy,r:t.r+3,fill:"none",stroke:r};break;case"line":i={kind:"line",part:"focus",x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:r,strokeWidth:4};break;case"text":i={kind:"rect",part:"focus",x:t.x-2,y:t.y-8,width:t.text.length*F+4,height:16,fill:"none",stroke:r,rx:2};break;case"path":i={kind:"path",part:"focus",d:t.d,stroke:r,strokeWidth:2,fill:"none"};break}let{x:o,y:s}=we(t),c=t.item&&e.tooltipFormatter?.(t.item)||(t.item?.label??t.title??"");return[i,...c?ze(u(o),u(s),c,e.width,e.height):[]]}function kt(e,n,t){let r=De(e);if(r.length===0)return;let i=n===null?-1:r.indexOf(n);switch(t){case"ArrowRight":case"ArrowDown":return r[Math.min(r.length-1,i+1)];case"ArrowLeft":case"ArrowUp":return r[Math.max(0,i<=0?0:i-1)];case"Home":return r[0];case"End":return r[r.length-1];case"Escape":return null;default:return}}var de=2,he=(e,n,t)=>{let r=Math.max(de,Math.min(t,Math.round(n))),i=Math.max(0,Math.min(t-r,Math.round(e)));return{start:i,end:i+r}},Tn=(e,n)=>!e||e.start<=0&&e.end>=n;function Mt(e,n,t){if(e.count<=de||!e.plot.width)return;let{start:r,end:i}=e.zoom,o=i-r,s=n>0?1.25:.8,c=Math.max(de,Math.min(e.count,Math.round(o*s)));if(c===o)return n>0&&!Tn(e.zoom,e.count)?he(r,c,e.count):void 0;let a=Math.max(0,Math.min(1,(t-e.plot.x)/e.plot.width)),l=r+a*o;return he(l-a*c,c,e.count)}function Ct(e,n,t,r){let i=n.end-n.start,o=Math.max(de,Math.min(e.count,Math.round(i/Math.max(.05,t)))),s=Math.max(0,Math.min(1,(r-e.plot.x)/Math.max(1,e.plot.width)));return he(n.start+s*i-s*o,o,e.count)}function $t(e,n,t){let r=n.end-n.start,i=e.plot.width/Math.max(1,r);return he(n.start-t/i,r,e.count)}function It(e,n,t){let r=e.brush;if(!r||!ot(r.box,n,t))return;let i=r.window;if(Math.abs(n-i.x)<=6)return{grab:"left",zoom:e.zoom};if(Math.abs(n-(i.x+i.width))<=6)return{grab:"right",zoom:e.zoom};if(n>i.x&&n<i.x+i.width)return{grab:"move",zoom:e.zoom};let o=e.zoom.end-e.zoom.start,s=(n-r.box.x)/Math.max(1,r.box.width)*e.count;return{grab:"move",zoom:he(s-o/2,o,e.count)}}function Tt(e,n,t,r){let i=e.brush;if(!i)return t;let o=r/Math.max(1,i.box.width)*e.count;if(n==="move")return he(t.start+o,t.end-t.start,e.count);if(n==="left")return{start:Math.max(0,Math.min(t.end-de,Math.round(t.start+o))),end:t.end};let s=Math.min(e.count,Math.max(t.start+de,Math.round(t.end+o)));return{start:t.start,end:s}}function Ot(e,n){switch(n.type){case"svg":return Promise.resolve(At(e,n.label,n.resolve));case"csv":return Promise.resolve(Ln(n.rows));case"png":{if(typeof document>"u"||typeof Image>"u")return Promise.reject(new Error("PNG export needs a browser"));let t=At(e,n.label,n.resolve);return zn(t,e.width,e.height,n.scale,n.background)}}}var K=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;"),ve=e=>e.filter(([,n])=>n!==void 0&&n!=="").map(([n,t])=>` ${n}="${K(String(t))}"`).join("");function An(e){let n=e.title?`<title>${K(e.title)}</title>`:"",t=["data-skdx-part",e.part];switch(e.kind){case"path":return`<path${ve([t,["d",e.d],["fill",e.fill??"none"],["stroke",e.stroke],["stroke-width",e.strokeWidth],["stroke-linecap",e.strokeLinecap],["stroke-linejoin",e.strokeLinejoin],["stroke-dasharray",e.dash],["opacity",e.opacity],["fill-opacity",e.fillOpacity]])}>${n}</path>`;case"rect":return`<rect${ve([t,["x",e.x],["y",e.y],["width",e.width],["height",e.height],["rx",e.rx],["fill",e.fill],["stroke",e.stroke],["fill-opacity",e.opacity]])}>${n}</rect>`;case"line":return`<line${ve([t,["x1",e.x1],["y1",e.y1],["x2",e.x2],["y2",e.y2],["stroke",e.stroke],["stroke-width",e.strokeWidth],["stroke-dasharray",e.dash],["opacity",e.opacity]])}>${n}</line>`;case"circle":return`<circle${ve([t,["cx",e.cx],["cy",e.cy],["r",e.r],["fill",e.fill],["stroke",e.stroke]])}>${n}</circle>`;case"text":return`<text${ve([t,["aria-label",e.title],["x",e.x],["y",e.y],["text-anchor",e.anchor],["dominant-baseline",e.baseline],["fill",e.fill],["font-weight",e.weight],["transform",e.rotate?`rotate(${e.rotate} ${e.x} ${e.y})`:void 0]])}>${K(e.text)}</text>`}}function On(e){let n=e.defs??[];return n.length===0?"":`<defs>${n.map(t=>`<linearGradient id="${K(t.id)}" x1="0" y1="0" x2="${t.vertical===!1?1:0}" y2="${t.vertical===!1?0:1}">${t.stops.map(r=>`<stop offset="${r.offset}" stop-color="${K(r.color)}"${r.opacity===void 0?"":` stop-opacity="${r.opacity}"`}/>`).join("")}</linearGradient>`).join("")}</defs>`}function At(e,n,t){let r=On(e)+e.shapes.map(An).join("");t&&(r=r.replace(/var\((--[\w-]+)\)/g,(s,c)=>t(c).trim()||s));let i=e.decorative?'aria-hidden="true"':`role="img" aria-label="${K(n)}"`,o=e.description?`<desc>${K(e.description)}</desc>`:"";return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e.width} ${e.height}" width="${e.width}" height="${e.height}" ${i} font-family="${K(C.fontFamily)}" font-size="${K(C.fontSize)}"><title>${K(n)}</title>${o}${r}</svg>`}function zn(e,n,t,r=2,i){return new Promise((o,s)=>{let c=URL.createObjectURL(new Blob([e],{type:"image/svg+xml;charset=utf-8"})),a=new Image;a.onload=()=>{URL.revokeObjectURL(c);let l=document.createElement("canvas");l.width=Math.round(n*r),l.height=Math.round(t*r);let d=l.getContext("2d");if(!d)return s(new Error("canvas 2d context unavailable"));i&&(d.fillStyle=i,d.fillRect(0,0,l.width,l.height)),d.drawImage(a,0,0,l.width,l.height),l.toBlob(h=>h?o(h):s(new Error("toBlob failed")),"image/png")},a.onerror=()=>{URL.revokeObjectURL(c),s(new Error("svg could not be decoded"))},a.src=c})}function Ln(e){let n=t=>{let r=t==null?"":String(t);return/[",\n\r]/.test(r)?`"${r.replace(/"/g,'""')}"`:r};return e.map(t=>t.map(n).join(",")).join(`\r
3
+ `)}function zt(e,n){if(!n)return;let t=typeof n=="object"?n.maxRows??500:500,r=e.hit;if(r&&r.rows.length>0){let c=r.rows[0];if(r.rows.length>t)return;let a=["",...c.slice(1).map(d=>d.replace(/:\s[^:]*$/,""))],l=r.rows.map(d=>[d[0],...d.slice(1).map(h=>h.slice(h.lastIndexOf(": ")+2))]);return[a,...l]}let i=e.shapes.flatMap(c=>c.item&&!c.item.legend&&!(c.part==="anchor"&&!c.title)?[c.item]:[]);if(i.length===0||i.length>t)return;let o=["series","name","category","value"].filter(c=>i.some(a=>a[c]!==void 0)),s=(c,a)=>c[a]===void 0?"":String(c[a]);return[o.map(c=>c[0]?.toUpperCase()+c.slice(1)),...i.map(c=>o.map(a=>s(c,a)))]}var Lt=new Map;function Be(e){let n=Lt.get(e);if(n)return n.group;let t=new Set,r={},i={current:r,subscribe(o){return t.add(o),()=>{t.delete(o),t.size===0&&Lt.delete(e)}},publish(o,s){Object.assign(r,o);for(let c of t)c(o,s)}};return Lt.set(e,{group:i,listeners:t}),i}var Rn='[data-skdx-part]:not([data-skdx-part^="tooltip"]):not([data-skdx-part="focus"]):not([data-skdx-part="crosshair"])',Rt=`@keyframes skdx-in{from{opacity:0}to{opacity:1}}${Rn}{animation:skdx-in var(--skdx-chart-duration,0ms) ease-out;transition:${["x","y","width","height","cx","cy","r","opacity","fill-opacity","d"].map(e=>`${e} var(--skdx-chart-duration,0ms) ease-out`).join(",")}}@media (prefers-reduced-motion:reduce){${Rn}{animation:none;transition:none}}`;function Et(e){let n=e.animate;return n&&e.shapes.length<=1500?`${n}ms`:void 0}var M=require("lit"),v=require("lit/decorators.js"),A=require("lit/directives/if-defined.js");var hr={fromAttribute:()=>!1},$=class extends M.LitElement{constructor(){super(...arguments);this.legend=!1;this.tooltip=!0;this.selectionMode="none";this.loading=!1;this.decorative=!1;this.accessibleTable=!1;this.zoomable=!1;this.editable=!1;this.crossFilter=!1;this.animated=!1;this.responsive=!1;this.tip=[];this.overlay=[];this.portal=null;this.highlightState=null;this.crossState=null;this.lastCross=null;this.pointers=new Map;this.hover=null;this.token={};this.snapshotKind="";this.focused=null;this.hiddenState=[];this.drag=null;this.onPointerMove=t=>{let r=this.layout;if(!r)return;this.pointers.has(t.pointerId)&&this.pointers.set(t.pointerId,this.viewBox(t,r).x);let i=this.drag;if(i?.grab==="select"){let{x:o,y:s}=this.viewBox(t,r);this.overlay=[pt(Pe(i.x,i.y,o,s))];return}if(i?.grab==="lasso"){let{x:o,y:s}=this.viewBox(t,r);i.points=[...i.points??[],{x:o,y:s}],this.overlay=[mt(i.points)];return}if(i?.grab==="edit"){if(!i.gantt)return;let{x:o}=this.viewBox(t,r);i.change=gt(r,i.gantt,o-i.x),this.overlay=[yt(r,i.gantt,i.change)];return}if(i?.grab==="map"){if(!r.map||!i.view)return;let{x:o,y:s}=this.viewBox(t,r);this.setView(vt(r.map,i.view,o-i.x,s-i.y));return}if(i&&r.hit){if(i.grab==="pinch"){let[s,c]=[...this.pointers.values()];if(s===void 0||c===void 0||!i.distance)return;this.setZoom(Ct(r.hit,i.zoom,Math.abs(s-c)/i.distance,(s+c)/2));return}let{x:o}=this.viewBox(t,r);this.setZoom(i.grab==="pan"?$t(r.hit,i.zoom,o-i.x):Tt(r.hit,i.grab,i.zoom,o-i.x));return}if(r.tooltipPortal){let{lines:o,shapes:s}=ct(r,t.target,t.currentTarget,t.clientX,t.clientY);this.tip=s,this.portal=o.length?{x:t.clientX,y:t.clientY,lines:o}:null}else{let o=dt(r,t.target,t.currentTarget,t.clientX,t.clientY);(o.length>0||this.tip.length>0)&&(this.tip=o)}if(this.highlight(ht(r,t.target)),this.syncId&&r.hit?.crosshair){let o=ye(r,this.viewBox(t,r).x);this.shareCrosshair(o?r.hit.rows[o.index]?.[0]??null:null)}};this.onPointerDown=t=>{let r=this.layout;if(!r||t.button!==0)return;let{x:i,y:o}=this.viewBox(t,r),s=ne(r,t.target)?.item.legend,c=this.canEdit(r)?bt(r,i,o):void 0;if(c){this.drag={x:i,y:o,zoom:{start:0,end:0},grab:"edit",gantt:c},t.currentTarget.setPointerCapture(t.pointerId),this.clearTip();return}if(this.brushing()&&!s){this.drag={x:i,y:o,zoom:{start:0,end:0},grab:this.selectionMode==="lasso"?"lasso":"select",points:[{x:i,y:o}]},t.currentTarget.setPointerCapture(t.pointerId),this.clearTip();return}if(this.canPan(r)&&r.map){let l=r.map.plot;if(i<l.x||i>l.x+l.width||o<l.y||o>l.y+l.height)return;this.drag={x:i,y:o,zoom:{start:0,end:0},grab:"map",view:r.map.view},t.currentTarget.setPointerCapture(t.pointerId),this.clearTip();return}let a=r.hit;if(!(!a||!this.canZoom(r))){if(this.pointers.set(t.pointerId,i),this.pointers.size===2){let[l,d]=[...this.pointers.values()];this.drag={x:(l+d)/2,y:o,zoom:a.zoom,grab:"pinch",distance:Math.abs(l-d)||1}}else{let l=It(a,i,o);if(l)this.drag={x:i,y:o,zoom:l.zoom,grab:l.grab},l.zoom!==a.zoom&&this.setZoom(l.zoom);else if(this.zoomable&&i>=a.plot.x&&i<=a.plot.x+a.plot.width&&o>=a.plot.y&&o<=a.plot.y+a.plot.height)this.drag={x:i,y:o,zoom:a.zoom,grab:"pan"};else{this.pointers.delete(t.pointerId);return}}t.currentTarget.setPointerCapture(t.pointerId),this.clearTip()}};this.onPointerUp=t=>{this.pointers.delete(t.pointerId);let r=t.currentTarget;r.hasPointerCapture(t.pointerId)&&r.releasePointerCapture(t.pointerId);let i=this.drag,o=this.layout;if(o&&(i?.grab==="select"||i?.grab==="lasso"||i?.grab==="edit"||i?.grab==="map")){this.overlay=[];let{x:s,y:c}=this.viewBox(t,o);if(Math.abs(s-i.x)>2||Math.abs(c-i.y)>2){i.grab==="select"?this.setSelected(ut(o,Pe(i.x,i.y,s,c))):i.grab==="lasso"?this.setSelected(ft(o,i.points??[])):i.grab==="edit"&&i.change&&this.emit("skdx-task-change",i.change),this.drag={...i,distance:-1};return}this.drag=null;return}(this.pointers.size===0||this.drag?.grab==="pinch")&&(this.drag=null)};this.onWheel=t=>{let r=this.layout;if(!r)return;let{x:i,y:o}=this.viewBox(t,r);if(r.map&&this.canPan(r)){let a=r.map.plot;if(i<a.x||i>a.x+a.width||o<a.y||o>a.y+a.height)return;t.preventDefault(),this.setView(wt(r.map,t.deltaY,i,o));return}let s=r.hit;if(!s||!this.canZoom(r)||o<s.plot.y||o>s.plot.y+s.plot.height)return;let c=Mt(s,t.deltaY,i);c&&(t.preventDefault(),this.setZoom(c))};this.onClick=t=>{if(!this.layout)return;if(this.drag?.distance===-1){this.drag=null;return}let r=ne(this.layout,t.target);r&&(r.item.range?this.setZoom(r.item.range):r.item.legend&&r.item.series!==void 0?this.toggle(r.item.series):(this.select(r.item),this.emit("skdx-item-click",r.item)))};this.onKeyDown=t=>{if(t.key==="Escape"){t.preventDefault(),this.focused=null,this.clearTip(),this.crossState=null,this.highlight(null);return}let r=this.layout;if(!r)return;if((t.key==="Enter"||t.key===" ")&&this.focused!==null){let c=r.shapes[this.focused]?.item;c&&(t.preventDefault(),this.select(c),this.emit("skdx-item-click",c));return}let i=this.canEdit(r)?xt(r,this.focused,t):void 0;if(i){t.preventDefault(),this.emit("skdx-task-change",i);return}let o=kt(r,this.focused,t.key);if(o===void 0)return;t.preventDefault(),this.focused=o;let s=o===null?void 0:r.shapes[o]?.item;this.highlight(s?te(s):null)}}updated(){let t=this.renderRoot.querySelector("svg")??void 0;t===this.snapshotSvg&&this.removeSnapshot||(this.removeSnapshot?.(),this.snapshotSvg=t,this.removeSnapshot=t?Ve(t,()=>{if(!this.snapshotConfiguration||!this.layout)throw new Error("Actual owner chart configuration unavailable");return He(this.snapshotKind,this.snapshotConfiguration,this.layout)}):void 0)}connectedCallback(){super.connectedCallback(),this.requestUpdate(),!(typeof ResizeObserver>"u")&&(this.observer=new ResizeObserver(([t])=>{let r=Math.floor(t?.contentRect.width??0);r>0&&(this.measured=r)}),this.observer.observe(this))}disconnectedCallback(){this.removeSnapshot?.(),this.removeSnapshot=void 0,this.snapshotSvg=void 0,this.observer?.disconnect(),this.leave?.(),this.leave=void 0,this.joined=void 0,super.disconnectedCallback()}sized(){let{width:t,height:r,legend:i,tooltip:o,format:s,palette:c,loading:a,error:l,emptyMessage:d,description:h,decorative:m,animated:x,responsive:b,highlighted:p,highlightScope:f,accessibleTable:g}=this;return{width:b&&this.measured?this.measured:t,height:r,animate:x,responsive:b,legend:i,tooltip:o,format:s,palette:c,loading:a,error:l,emptyMessage:d,description:h,decorative:m,highlighted:p===void 0?this.highlightState:p,highlightScope:f,accessibleTable:g,hiddenSeries:this.hiddenSeries??this.hiddenState,zoom:this.zoom??this.zoomState,selected:this.selected??this.selectedState,view:this.view??this.viewState}}compactOverrides(){let t=this.responsive;return typeof t=="object"&&this.measured!==void 0&&this.measured<(t.breakpoint??480)?{...t.compact,width:this.measured}:void 0}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}publish(t){this.syncId&&Be(this.syncId).publish(t,this.token)}join(){if(this.joined===this.syncId||(this.leave?.(),this.leave=void 0,this.joined=this.syncId,!this.syncId))return;let t=Be(this.syncId),r=i=>{"highlighted"in i&&(this.highlightState=i.highlighted??null),i.selected&&(this.selectedState=i.selected,this.crossFilter&&(this.highlightState=i.selected.length?i.selected:null)),"zoom"in i&&(this.zoomState=i.zoom),i.hiddenSeries&&(this.hiddenState=i.hiddenSeries),"crosshair"in i&&(this.crossState=i.crosshair??null)};r(t.current),this.leave=t.subscribe((i,o)=>{o!==this.token&&r(i)})}setZoom(t){this.zoomState=t,this.emit("skdx-zoom-change",t),this.publish({zoom:t})}setView(t){this.viewState=t,this.emit("skdx-view-change",t)}setSelected(t){this.selectedState=t,this.emit("skdx-selected-change",t),this.publish({selected:t})}toggle(t){let r=this.hiddenSeries??this.hiddenState,i=r.includes(t)?r.filter(o=>o!==t):[...r,t];this.hiddenState=i,this.emit("skdx-hidden-series-change",i),this.publish({hiddenSeries:i})}highlight(t){let r=this.hover;r===t||r&&t&&tt(r,t)||(this.hover=t,this.emit("skdx-highlighted-change",t),this.highlightState=t,this.syncId&&this.publish({highlighted:t}))}select(t){let r=this.selectionMode;r!=="none"&&this.setSelected(nt(this.selected??this.selectedState,t,r==="single"?"single":"multiple"))}shareCrosshair(t){!this.syncId||this.lastCross===t||(this.lastCross=t,this.publish({crosshair:t}))}clearTip(){this.tip=[],this.portal=null,this.shareCrosshair(null)}canZoom(t){return!!(t.hit&&(this.zoomable||t.hit.brush))}canPan(t){return!!(t.map&&this.zoomable)}canEdit(t){return!!(this.editable&&t.edit)}brushing(){return this.selectionMode==="brush"||this.selectionMode==="lasso"}viewBox(t,r){return ue(t.currentTarget,t.clientX,t.clientY,r.width,r.height)}getSvgElement(){return this.renderRoot.querySelector("svg")}getLayout(){return this.layout}resetZoom(){this.setZoom(void 0)}zoomTo(t){this.setZoom(t)}focusItem(t){let r=this.layout;if(!r)return!1;let i=r.shapes.findIndex(o=>o.item&&!o.item.legend&&Q(o.item,t));return i<0?!1:(this.getSvgElement()?.focus(),this.focused=i,!0)}export(t){let r=this.layout;return r?Ot(r,{...t,label:t.label??this.label??this.localName}):Promise.reject(new Error("not rendered yet"))}root(t,r,i,o){this.join();let s=rt(Xe(t),this.sized());if(this.layout=s,this.snapshotKind=r,this.snapshotConfiguration=o,s.issues!==this.reported){this.reported=s.issues;for(let g of s.issues??[])this.emit("skdx-data-issue",g)}let c=this.canZoom(s),a=this.canPan(s),l=this.canEdit(s),d=this.brushing(),h=c||a||l||d,m=!s.decorative&&De(s).length>0,x=Et(s),b=zt(s,this.accessibleTable),p=typeof this.accessibleTable=="object"&&this.accessibleTable.caption||i,f=this.portal;return M.html`<svg
4
4
  xmlns="http://www.w3.org/2000/svg"
5
- viewBox="0 0 ${o.width} ${o.height}"
6
- width=${o.width}
7
- height=${o.height}
8
- role=${o.decorative?"presentation":"img"}
9
- aria-hidden=${o.decorative?"true":S.nothing}
10
- aria-label=${o.decorative?S.nothing:i}
11
- aria-description=${(0,A.ifDefined)(o.description)}
12
- tabindex=${u?0:S.nothing}
5
+ viewBox="0 0 ${s.width} ${s.height}"
6
+ width=${s.width}
7
+ height=${s.height}
8
+ role=${s.decorative?"presentation":"img"}
9
+ aria-hidden=${s.decorative?"true":M.nothing}
10
+ aria-label=${s.decorative?M.nothing:i}
11
+ aria-description=${(0,A.ifDefined)(s.description)}
12
+ tabindex=${m?0:M.nothing}
13
13
  data-skdx-chart=${r}
14
- data-zoomable=${a||l?"":S.nothing}
15
- data-brushing=${c&&!(a||l)?"":S.nothing}
16
- data-editable=${s?"":S.nothing}
17
- style=${m?`--skdx-chart-duration:${m}`:S.nothing}
18
- font-family=${$.fontFamily}
19
- font-size=${$.fontSize}
20
- @pointermove=${o.tooltip||d?this.onPointerMove:S.nothing}
14
+ data-zoomable=${c||a?"":M.nothing}
15
+ data-brushing=${d&&!(c||a)?"":M.nothing}
16
+ data-editable=${l?"":M.nothing}
17
+ style=${x?`--skdx-chart-duration:${x}`:M.nothing}
18
+ font-family=${C.fontFamily}
19
+ font-size=${C.fontSize}
20
+ @pointermove=${s.tooltip||h?this.onPointerMove:M.nothing}
21
21
  @pointerleave=${()=>{this.clearTip(),this.highlight(null)}}
22
- @pointerdown=${d?this.onPointerDown:S.nothing}
23
- @pointerup=${d?this.onPointerUp:S.nothing}
24
- @pointercancel=${d?this.onPointerUp:S.nothing}
25
- @wheel=${a||l?this.onWheel:S.nothing}
26
- @dblclick=${a||l?()=>l?this.setView(void 0):this.setZoom(void 0):S.nothing}
22
+ @pointerdown=${h?this.onPointerDown:M.nothing}
23
+ @pointerup=${h?this.onPointerUp:M.nothing}
24
+ @pointercancel=${h?this.onPointerUp:M.nothing}
25
+ @wheel=${c||a?this.onWheel:M.nothing}
26
+ @dblclick=${c||a?()=>a?this.setView(void 0):this.setZoom(void 0):M.nothing}
27
27
  @click=${this.onClick}
28
- @keydown=${u?this.onKeyDown:S.nothing}
28
+ @keydown=${m?this.onKeyDown:M.nothing}
29
29
  @blur=${()=>{this.focused=null,this.highlight(null)}}
30
30
  >
31
31
  <title>${i}</title>
32
- ${o.description?S.svg`<desc>${o.description}</desc>`:S.nothing}
33
- ${m?S.svg`<style>${At}</style>`:S.nothing} ${ar(o)}
34
- ${Fe(o.shapes)}
35
- ${Fe(this.tip.length||!this.crossState?this.tip:it(o,this.crossState))}
36
- ${Fe(gt(o,this.focused))} ${Fe(this.overlay)}
32
+ ${s.description?M.svg`<desc>${s.description}</desc>`:M.nothing}
33
+ ${x?M.svg`<style>${Rt}</style>`:M.nothing} ${ur(s)}
34
+ ${je(s.shapes)}
35
+ ${je(this.tip.length||!this.crossState?this.tip:lt(s,this.crossState))}
36
+ ${je(St(s,this.focused))} ${je(this.overlay)}
37
37
  </svg>
38
- ${p?S.html`<div
38
+ ${f?M.html`<div
39
39
  role="tooltip"
40
40
  data-skdx-tooltip=${r}
41
- style="left:${p.x+12}px;top:${p.y+12}px"
41
+ style="left:${f.x+12}px;top:${f.y+12}px"
42
42
  >
43
- ${p.lines.map(f=>S.html`<div>${f}</div>`)}
44
- </div>`:S.nothing}
45
- ${y?S.html`<table data-skdx-table=${r}>
43
+ ${f.lines.map(g=>M.html`<div>${g}</div>`)}
44
+ </div>`:M.nothing}
45
+ ${b?M.html`<table data-skdx-table=${r}>
46
46
  <caption>
47
- ${b}
47
+ ${p}
48
48
  </caption>
49
49
  <thead>
50
50
  <tr>
51
- ${(y[0]??[]).map(f=>S.html`<th scope="col">${f}</th>`)}
51
+ ${(b[0]??[]).map(g=>M.html`<th scope="col">${g}</th>`)}
52
52
  </tr>
53
53
  </thead>
54
54
  <tbody>
55
- ${y.slice(1).map(f=>S.html`<tr>
56
- ${f.map((g,M)=>M===0?S.html`<th scope="row">${g}</th>`:S.html`<td>${g}</td>`)}
55
+ ${b.slice(1).map(g=>M.html`<tr>
56
+ ${g.map((S,I)=>I===0?M.html`<th scope="row">${S}</th>`:M.html`<td>${S}</td>`)}
57
57
  </tr>`)}
58
58
  </tbody>
59
- </table>`:S.nothing}`}};C.styles=S.css`
59
+ </table>`:M.nothing}`}};$.styles=M.css`
60
60
  :host {
61
61
  display: inline-block;
62
62
  }
@@ -109,4 +109,4 @@
109
109
  [role='tooltip'] > :first-child:not(:only-child) {
110
110
  font-weight: bold;
111
111
  }
112
- `,x([(0,w.property)({type:Number})],C.prototype,"width",2),x([(0,w.property)({type:Number})],C.prototype,"height",2),x([(0,w.property)()],C.prototype,"label",2),x([(0,w.property)({type:Boolean,reflect:!0})],C.prototype,"legend",2),x([(0,w.property)({type:Boolean,attribute:"no-tooltip",converter:or})],C.prototype,"tooltip",2),x([(0,w.property)({attribute:!1})],C.prototype,"format",2),x([(0,w.property)({attribute:!1})],C.prototype,"palette",2),x([(0,w.property)({attribute:!1})],C.prototype,"hiddenSeries",2),x([(0,w.property)({attribute:!1})],C.prototype,"selected",2),x([(0,w.property)({attribute:"selection-mode"})],C.prototype,"selectionMode",2),x([(0,w.property)({attribute:!1})],C.prototype,"highlighted",2),x([(0,w.property)({attribute:!1})],C.prototype,"highlightScope",2),x([(0,w.property)({type:Boolean,reflect:!0})],C.prototype,"loading",2),x([(0,w.property)()],C.prototype,"error",2),x([(0,w.property)({attribute:"empty-message"})],C.prototype,"emptyMessage",2),x([(0,w.property)()],C.prototype,"description",2),x([(0,w.property)({type:Boolean,reflect:!0})],C.prototype,"decorative",2),x([(0,w.property)({type:Boolean,attribute:"accessible-table"})],C.prototype,"accessibleTable",2),x([(0,w.property)({attribute:!1})],C.prototype,"zoom",2),x([(0,w.property)({attribute:!1})],C.prototype,"view",2),x([(0,w.property)({type:Boolean,reflect:!0})],C.prototype,"zoomable",2),x([(0,w.property)({type:Boolean,reflect:!0})],C.prototype,"editable",2),x([(0,w.property)({attribute:"sync-id"})],C.prototype,"syncId",2),x([(0,w.property)({type:Boolean,attribute:"cross-filter"})],C.prototype,"crossFilter",2),x([(0,w.property)({converter:{fromAttribute:t=>t===null?!1:t===""?!0:Number(t)}})],C.prototype,"animated",2),x([(0,w.property)({type:Boolean,reflect:!0})],C.prototype,"responsive",2),x([(0,w.state)()],C.prototype,"tip",2),x([(0,w.state)()],C.prototype,"overlay",2),x([(0,w.state)()],C.prototype,"portal",2),x([(0,w.state)()],C.prototype,"measured",2),x([(0,w.state)()],C.prototype,"viewState",2),x([(0,w.state)()],C.prototype,"highlightState",2),x([(0,w.state)()],C.prototype,"crossState",2),x([(0,w.state)()],C.prototype,"focused",2),x([(0,w.state)()],C.prototype,"hiddenState",2),x([(0,w.state)()],C.prototype,"zoomState",2),x([(0,w.state)()],C.prototype,"selectedState",2);var z=class extends C{constructor(){super(...arguments);this.series=[];this.labels=!1;this.connectNulls=!1;this.stacked=!1;this.brush=!1;this.crosshair=!1}input(){let{series:t,categories:r,xAxis:i,yAxis:o,rightAxis:a,references:l,annotations:s,labels:c,curve:d,connectNulls:u,nulls:m,stacked:y,stackOffset:b,orientation:p,radius:f,barGap:g,barWidth:M,sort:I,transform:L,transforms:O,bins:k,binWidth:E,binDomain:Y,binMode:G,sampling:W,brush:D,crosshair:H}=this;return{...this.sized(),series:t,categories:r,xAxis:i,yAxis:o,rightAxis:a,references:l,annotations:s,labels:c,curve:d,connectNulls:u,nulls:m,stacked:y,stackOffset:b,orientation:p,radius:f,barGap:g,barWidth:M,sort:I,transform:L,transforms:O,bins:k,binWidth:E,binDomain:Y,binMode:G,sampling:W,brush:D,crosshair:H,...this.compactOverrides()}}};x([(0,w.property)({attribute:!1})],z.prototype,"series",2),x([(0,w.property)({attribute:!1})],z.prototype,"categories",2),x([(0,w.property)({attribute:!1})],z.prototype,"xAxis",2),x([(0,w.property)({attribute:!1})],z.prototype,"yAxis",2),x([(0,w.property)({attribute:!1})],z.prototype,"rightAxis",2),x([(0,w.property)({attribute:!1})],z.prototype,"references",2),x([(0,w.property)({attribute:!1})],z.prototype,"annotations",2),x([(0,w.property)({type:Boolean,reflect:!0})],z.prototype,"labels",2),x([(0,w.property)()],z.prototype,"curve",2),x([(0,w.property)({type:Boolean,attribute:"connect-nulls"})],z.prototype,"connectNulls",2),x([(0,w.property)()],z.prototype,"nulls",2),x([(0,w.property)({reflect:!0,converter:{fromAttribute:t=>t==="percent"?"percent":t!==null}})],z.prototype,"stacked",2),x([(0,w.property)({attribute:"stack-offset"})],z.prototype,"stackOffset",2),x([(0,w.property)()],z.prototype,"orientation",2),x([(0,w.property)({type:Number})],z.prototype,"radius",2),x([(0,w.property)({type:Number,attribute:"bar-gap"})],z.prototype,"barGap",2),x([(0,w.property)({type:Number,attribute:"bar-width"})],z.prototype,"barWidth",2),x([(0,w.property)()],z.prototype,"sort",2),x([(0,w.property)()],z.prototype,"transform",2),x([(0,w.property)({attribute:!1})],z.prototype,"transforms",2),x([(0,w.property)({type:Number})],z.prototype,"bins",2),x([(0,w.property)({type:Number,attribute:"bin-width"})],z.prototype,"binWidth",2),x([(0,w.property)({attribute:!1})],z.prototype,"binDomain",2),x([(0,w.property)({attribute:"bin-mode"})],z.prototype,"binMode",2),x([(0,w.property)({attribute:!1})],z.prototype,"sampling",2),x([(0,w.property)({type:Boolean,reflect:!0})],z.prototype,"brush",2),x([(0,w.property)({type:Boolean,reflect:!0})],z.prototype,"crosshair",2);var ar=e=>e.defs&&e.defs.length?S.svg`<defs>${e.defs.map(n=>S.svg`<linearGradient id=${n.id} x1="0" y1="0" x2=${n.vertical===!1?1:0} y2=${n.vertical===!1?0:1}>${n.stops.map(t=>S.svg`<stop offset=${t.offset} stop-color=${t.color} stop-opacity=${(0,A.ifDefined)(t.opacity)}></stop>`)}</linearGradient>`)}</defs>`:S.nothing,Fe=e=>S.svg`${e.map((n,t)=>{let r=n.title?S.svg`<title>${n.title}</title>`:S.nothing,i=n.item?t:void 0;switch(n.kind){case"path":return S.svg`<path data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} d=${n.d} fill=${n.fill??"none"} stroke=${(0,A.ifDefined)(n.stroke)} stroke-width=${(0,A.ifDefined)(n.strokeWidth)} stroke-linecap=${(0,A.ifDefined)(n.strokeLinecap)} stroke-linejoin=${(0,A.ifDefined)(n.strokeLinejoin)} stroke-dasharray=${(0,A.ifDefined)(n.dash)} opacity=${(0,A.ifDefined)(n.opacity)} fill-opacity=${(0,A.ifDefined)(n.fillOpacity)}>${r}</path>`;case"rect":return S.svg`<rect data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} x=${n.x} y=${n.y} width=${n.width} height=${n.height} rx=${(0,A.ifDefined)(n.rx)} style=${(0,A.ifDefined)(Re(n.part)?`rx:${Re(n.part)}`:void 0)} fill=${n.fill} stroke=${(0,A.ifDefined)(n.stroke)} fill-opacity=${(0,A.ifDefined)(n.opacity)} pointer-events=${(0,A.ifDefined)(n.part==="stage-label-background"||n.part==="label-background"?"none":void 0)}>${r}</rect>`;case"line":return S.svg`<line data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} x1=${n.x1} y1=${n.y1} x2=${n.x2} y2=${n.y2} stroke=${n.stroke} stroke-width=${(0,A.ifDefined)(n.strokeWidth)} stroke-dasharray=${(0,A.ifDefined)(n.dash)} opacity=${(0,A.ifDefined)(n.opacity)}>${r}</line>`;case"circle":return S.svg`<circle data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} cx=${n.cx} cy=${n.cy} r=${n.r} fill=${n.fill} stroke=${(0,A.ifDefined)(n.stroke)} opacity=${(0,A.ifDefined)(n.opacity)}>${r}</circle>`;case"text":return S.svg`<text aria-label=${(0,A.ifDefined)(n.title)} data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} x=${n.x} y=${n.y} text-anchor=${(0,A.ifDefined)(n.anchor)} dominant-baseline=${(0,A.ifDefined)(n.baseline)} fill=${(0,A.ifDefined)(n.fill)} font-weight=${(0,A.ifDefined)(n.weight)} pointer-events=${(0,A.ifDefined)(i===void 0?"none":void 0)} transform=${(0,A.ifDefined)(n.rotate?`rotate(${n.rotate} ${n.x} ${n.y})`:void 0)}>${n.text}</text>`}})}`;var N=class extends C{constructor(){super(...arguments);this.series=[];this.labels=!1}render(){let{series:t,sizeRange:r,labels:i,xAxis:o,yAxis:a,zAxis:l,references:s,annotations:c,colorScale:d,colorLegend:u,hitRadius:m,jitter:y,trendline:b,sampling:p}=this;return this.root(et({...this.sized(),series:t,sizeRange:r,labels:i,xAxis:o,yAxis:a,zAxis:l,references:s,annotations:c,colorScale:d,colorLegend:u,hitRadius:m,jitter:y,trendline:b,sampling:p,...this.compactOverrides()}),"bubble",this.label??"Bubble chart")}};x([(0,F.property)({attribute:!1})],N.prototype,"series",2),x([(0,F.property)({attribute:!1})],N.prototype,"sizeRange",2),x([(0,F.property)({type:Boolean,reflect:!0})],N.prototype,"labels",2),x([(0,F.property)({attribute:!1})],N.prototype,"xAxis",2),x([(0,F.property)({attribute:!1})],N.prototype,"yAxis",2),x([(0,F.property)({attribute:!1})],N.prototype,"zAxis",2),x([(0,F.property)({attribute:!1})],N.prototype,"references",2),x([(0,F.property)({attribute:!1})],N.prototype,"annotations",2),x([(0,F.property)({attribute:!1})],N.prototype,"colorScale",2),x([(0,F.property)({attribute:!1})],N.prototype,"colorLegend",2),x([(0,F.property)({type:Number,attribute:"hit-radius"})],N.prototype,"hitRadius",2),x([(0,F.property)({type:Number})],N.prototype,"jitter",2),x([(0,F.property)({attribute:!1})],N.prototype,"trendline",2),x([(0,F.property)({attribute:!1})],N.prototype,"sampling",2),N=x([(0,F.customElement)("skdx-bubble-chart")],N);0&&(module.exports={SkdxBubbleChart});
112
+ `,y([(0,v.property)({type:Number})],$.prototype,"width",2),y([(0,v.property)({type:Number})],$.prototype,"height",2),y([(0,v.property)()],$.prototype,"label",2),y([(0,v.property)({type:Boolean,reflect:!0})],$.prototype,"legend",2),y([(0,v.property)({type:Boolean,attribute:"no-tooltip",converter:hr})],$.prototype,"tooltip",2),y([(0,v.property)({attribute:!1})],$.prototype,"format",2),y([(0,v.property)({attribute:!1})],$.prototype,"palette",2),y([(0,v.property)({attribute:!1})],$.prototype,"hiddenSeries",2),y([(0,v.property)({attribute:!1})],$.prototype,"selected",2),y([(0,v.property)({attribute:"selection-mode"})],$.prototype,"selectionMode",2),y([(0,v.property)({attribute:!1})],$.prototype,"highlighted",2),y([(0,v.property)({attribute:!1})],$.prototype,"highlightScope",2),y([(0,v.property)({type:Boolean,reflect:!0})],$.prototype,"loading",2),y([(0,v.property)()],$.prototype,"error",2),y([(0,v.property)({attribute:"empty-message"})],$.prototype,"emptyMessage",2),y([(0,v.property)()],$.prototype,"description",2),y([(0,v.property)({type:Boolean,reflect:!0})],$.prototype,"decorative",2),y([(0,v.property)({type:Boolean,attribute:"accessible-table"})],$.prototype,"accessibleTable",2),y([(0,v.property)({attribute:!1})],$.prototype,"zoom",2),y([(0,v.property)({attribute:!1})],$.prototype,"view",2),y([(0,v.property)({type:Boolean,reflect:!0})],$.prototype,"zoomable",2),y([(0,v.property)({type:Boolean,reflect:!0})],$.prototype,"editable",2),y([(0,v.property)({attribute:"sync-id"})],$.prototype,"syncId",2),y([(0,v.property)({type:Boolean,attribute:"cross-filter"})],$.prototype,"crossFilter",2),y([(0,v.property)({converter:{fromAttribute:t=>t===null?!1:t===""?!0:Number(t)}})],$.prototype,"animated",2),y([(0,v.property)({type:Boolean,reflect:!0})],$.prototype,"responsive",2),y([(0,v.state)()],$.prototype,"tip",2),y([(0,v.state)()],$.prototype,"overlay",2),y([(0,v.state)()],$.prototype,"portal",2),y([(0,v.state)()],$.prototype,"measured",2),y([(0,v.state)()],$.prototype,"viewState",2),y([(0,v.state)()],$.prototype,"highlightState",2),y([(0,v.state)()],$.prototype,"crossState",2),y([(0,v.state)()],$.prototype,"focused",2),y([(0,v.state)()],$.prototype,"hiddenState",2),y([(0,v.state)()],$.prototype,"zoomState",2),y([(0,v.state)()],$.prototype,"selectedState",2);var O=class extends ${constructor(){super(...arguments);this.series=[];this.labels=!1;this.connectNulls=!1;this.stacked=!1;this.brush=!1;this.crosshair=!1}input(){let{series:t,categories:r,xAxis:i,yAxis:o,rightAxis:s,references:c,annotations:a,labels:l,curve:d,connectNulls:h,nulls:m,stacked:x,stackOffset:b,orientation:p,radius:f,barGap:g,barWidth:S,sort:I,transform:L,transforms:z,bins:k,binWidth:G,binDomain:X,binMode:j,sampling:W,brush:D,crosshair:V}=this;return{...this.sized(),series:t,categories:r,xAxis:i,yAxis:o,rightAxis:s,references:c,annotations:a,labels:l,curve:d,connectNulls:h,nulls:m,stacked:x,stackOffset:b,orientation:p,radius:f,barGap:g,barWidth:S,sort:I,transform:L,transforms:z,bins:k,binWidth:G,binDomain:X,binMode:j,sampling:W,brush:D,crosshair:V,...this.compactOverrides()}}};y([(0,v.property)({attribute:!1})],O.prototype,"series",2),y([(0,v.property)({attribute:!1})],O.prototype,"categories",2),y([(0,v.property)({attribute:!1})],O.prototype,"xAxis",2),y([(0,v.property)({attribute:!1})],O.prototype,"yAxis",2),y([(0,v.property)({attribute:!1})],O.prototype,"rightAxis",2),y([(0,v.property)({attribute:!1})],O.prototype,"references",2),y([(0,v.property)({attribute:!1})],O.prototype,"annotations",2),y([(0,v.property)({type:Boolean,reflect:!0})],O.prototype,"labels",2),y([(0,v.property)()],O.prototype,"curve",2),y([(0,v.property)({type:Boolean,attribute:"connect-nulls"})],O.prototype,"connectNulls",2),y([(0,v.property)()],O.prototype,"nulls",2),y([(0,v.property)({reflect:!0,converter:{fromAttribute:t=>t==="percent"?"percent":t!==null}})],O.prototype,"stacked",2),y([(0,v.property)({attribute:"stack-offset"})],O.prototype,"stackOffset",2),y([(0,v.property)()],O.prototype,"orientation",2),y([(0,v.property)({type:Number})],O.prototype,"radius",2),y([(0,v.property)({type:Number,attribute:"bar-gap"})],O.prototype,"barGap",2),y([(0,v.property)({type:Number,attribute:"bar-width"})],O.prototype,"barWidth",2),y([(0,v.property)()],O.prototype,"sort",2),y([(0,v.property)()],O.prototype,"transform",2),y([(0,v.property)({attribute:!1})],O.prototype,"transforms",2),y([(0,v.property)({type:Number})],O.prototype,"bins",2),y([(0,v.property)({type:Number,attribute:"bin-width"})],O.prototype,"binWidth",2),y([(0,v.property)({attribute:!1})],O.prototype,"binDomain",2),y([(0,v.property)({attribute:"bin-mode"})],O.prototype,"binMode",2),y([(0,v.property)({attribute:!1})],O.prototype,"sampling",2),y([(0,v.property)({type:Boolean,reflect:!0})],O.prototype,"brush",2),y([(0,v.property)({type:Boolean,reflect:!0})],O.prototype,"crosshair",2);var ur=e=>e.defs&&e.defs.length?M.svg`<defs>${e.defs.map(n=>M.svg`<linearGradient id=${n.id} x1="0" y1="0" x2=${n.vertical===!1?1:0} y2=${n.vertical===!1?0:1}>${n.stops.map(t=>M.svg`<stop offset=${t.offset} stop-color=${t.color} stop-opacity=${(0,A.ifDefined)(t.opacity)}></stop>`)}</linearGradient>`)}</defs>`:M.nothing,je=e=>M.svg`${e.map((n,t)=>{let r=n.title?M.svg`<title>${n.title}</title>`:M.nothing,i=n.item?t:void 0;switch(n.kind){case"path":return M.svg`<path data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} d=${n.d} fill=${n.fill??"none"} stroke=${(0,A.ifDefined)(n.stroke)} stroke-width=${(0,A.ifDefined)(n.strokeWidth)} stroke-linecap=${(0,A.ifDefined)(n.strokeLinecap)} stroke-linejoin=${(0,A.ifDefined)(n.strokeLinejoin)} stroke-dasharray=${(0,A.ifDefined)(n.dash)} opacity=${(0,A.ifDefined)(n.opacity)} fill-opacity=${(0,A.ifDefined)(n.fillOpacity)}>${r}</path>`;case"rect":return M.svg`<rect data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} x=${n.x} y=${n.y} width=${n.width} height=${n.height} rx=${(0,A.ifDefined)(n.rx)} style=${(0,A.ifDefined)(Ee(n.part)?`rx:${Ee(n.part)}`:void 0)} fill=${n.fill} stroke=${(0,A.ifDefined)(n.stroke)} fill-opacity=${(0,A.ifDefined)(n.opacity)} pointer-events=${(0,A.ifDefined)(n.part==="stage-label-background"||n.part==="label-background"?"none":void 0)}>${r}</rect>`;case"line":return M.svg`<line data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} x1=${n.x1} y1=${n.y1} x2=${n.x2} y2=${n.y2} stroke=${n.stroke} stroke-width=${(0,A.ifDefined)(n.strokeWidth)} stroke-dasharray=${(0,A.ifDefined)(n.dash)} opacity=${(0,A.ifDefined)(n.opacity)}>${r}</line>`;case"circle":return M.svg`<circle data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} cx=${n.cx} cy=${n.cy} r=${n.r} fill=${n.fill} stroke=${(0,A.ifDefined)(n.stroke)} opacity=${(0,A.ifDefined)(n.opacity)}>${r}</circle>`;case"text":return M.svg`<text aria-label=${(0,A.ifDefined)(n.title)} data-skdx-part=${n.part} data-skdx-i=${(0,A.ifDefined)(i)} x=${n.x} y=${n.y} text-anchor=${(0,A.ifDefined)(n.anchor)} dominant-baseline=${(0,A.ifDefined)(n.baseline)} fill=${(0,A.ifDefined)(n.fill)} font-weight=${(0,A.ifDefined)(n.weight)} pointer-events=${(0,A.ifDefined)(i===void 0?"none":void 0)} transform=${(0,A.ifDefined)(n.rotate?`rotate(${n.rotate} ${n.x} ${n.y})`:void 0)}>${n.text}</text>`}})}`;var N=class extends ${constructor(){super(...arguments);this.series=[];this.labels=!1}render(){let{series:t,sizeRange:r,labels:i,xAxis:o,yAxis:s,zAxis:c,references:a,annotations:l,colorScale:d,colorLegend:h,hitRadius:m,jitter:x,trendline:b,sampling:p}=this,f={...this.sized(),series:t,sizeRange:r,labels:i,xAxis:o,yAxis:s,zAxis:c,references:a,annotations:l,colorScale:d,colorLegend:h,hitRadius:m,jitter:x,trendline:b,sampling:p,...this.compactOverrides()};return this.root(it(f),"bubble",this.label??"Bubble chart",f)}};y([(0,B.property)({attribute:!1})],N.prototype,"series",2),y([(0,B.property)({attribute:!1})],N.prototype,"sizeRange",2),y([(0,B.property)({type:Boolean,reflect:!0})],N.prototype,"labels",2),y([(0,B.property)({attribute:!1})],N.prototype,"xAxis",2),y([(0,B.property)({attribute:!1})],N.prototype,"yAxis",2),y([(0,B.property)({attribute:!1})],N.prototype,"zAxis",2),y([(0,B.property)({attribute:!1})],N.prototype,"references",2),y([(0,B.property)({attribute:!1})],N.prototype,"annotations",2),y([(0,B.property)({attribute:!1})],N.prototype,"colorScale",2),y([(0,B.property)({attribute:!1})],N.prototype,"colorLegend",2),y([(0,B.property)({type:Number,attribute:"hit-radius"})],N.prototype,"hitRadius",2),y([(0,B.property)({type:Number})],N.prototype,"jitter",2),y([(0,B.property)({attribute:!1})],N.prototype,"trendline",2),y([(0,B.property)({attribute:!1})],N.prototype,"sampling",2),N=y([(0,B.customElement)("skdx-bubble-chart")],N);0&&(module.exports={SkdxBubbleChart});
package/dist/bubble.d.cts CHANGED
@@ -1,3 +1,3 @@
1
1
  import 'lit';
2
- import './types-DPf3PUs2.cjs';
3
- export { e as SkdxBubbleChart } from './index-Hexgp_4S.cjs';
2
+ import './types-5xXhTghj.cjs';
3
+ export { e as SkdxBubbleChart } from './index-DjnBT-5R.cjs';
package/dist/bubble.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import 'lit';
2
- import './types-DPf3PUs2.js';
3
- export { e as SkdxBubbleChart } from './index-pqdWxinA.js';
2
+ import './types-5xXhTghj.js';
3
+ export { e as SkdxBubbleChart } from './index-BkR4iVqI.js';