@ngrok/mantle 0.80.0 → 0.81.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +19 -37
- package/dist/accordion.js +1 -1
- package/dist/agent.json +5 -1
- package/dist/alert-dialog.d.ts +15 -48
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +167 -83
- package/dist/alert.js +1 -1
- package/dist/{anchor-_2meGDfj.js → anchor-DfeXTpKW.js} +1 -1
- package/dist/anchor.js +1 -1
- package/dist/area-chart.d.ts +505 -0
- package/dist/area-chart.js +1 -0
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +492 -0
- package/dist/bar-chart.js +1 -0
- package/dist/breadcrumb.d.ts +6 -24
- package/dist/breadcrumb.js +1 -1
- package/dist/button-BAno7KIU.js +1 -0
- package/dist/{index-C2jj8U4a.d.ts → button-C-gMbPso.d.ts} +2 -2
- package/dist/{icon-button-C1AfGnQx.d.ts → button-C7vAl6lS.d.ts} +16 -3
- package/dist/{button-BPMwa2jN.d.ts → button-DARFK2KJ.d.ts} +1 -1
- package/dist/{button-5WsvzIQ6.js → button-DjpEKt2X.js} +1 -1
- package/dist/button-DvHMWAPl.js +1 -0
- package/dist/button.d.ts +5 -5
- package/dist/button.js +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +5 -20
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +5 -20
- package/dist/centered-layout.js +1 -1
- package/dist/chart-1cVjAcj8.d.ts +334 -0
- package/dist/chart-Do2qkrxl.js +2 -0
- package/dist/checkbox-0EoxOyMA.js +1 -0
- package/dist/checkbox.d.ts +13 -1
- package/dist/checkbox.js +1 -1
- package/dist/choice-BHwFSSyv.js +1 -0
- package/dist/{choice-Ct0KK8jw.d.ts → choice-BNRQXszu.d.ts} +5 -20
- package/dist/choice.d.ts +1 -1
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +60 -44
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/combobox.d.ts +9 -33
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +70 -18
- package/dist/command.js +1 -1
- package/dist/data-table.d.ts +6 -12
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +40 -32
- package/dist/description-list.js +1 -1
- package/dist/{primitive-CJRIlrLz.d.ts → dialog-BM4wPCft.d.ts} +9 -16
- package/dist/dialog-DWZWd5Jt.js +1 -0
- package/dist/dialog.d.ts +13 -43
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-BbbQuae2.d.ts +1 -0
- package/dist/{dropdown-menu-CoyozLzy.d.ts → dropdown-menu-D6pMAY7I.d.ts} +156 -54
- package/dist/dropdown-menu-RyDWoKHx.js +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +6 -21
- package/dist/empty.js +1 -1
- package/dist/field-B1wqeZr4.js +1 -0
- package/dist/field.d.ts +26 -53
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +3 -12
- package/dist/hover-card.js +1 -1
- package/dist/{svg-only-CdI_v82i.d.ts → icon-CX_gj6sW.d.ts} +1 -1
- package/dist/{icon-BDqpcZ-n.d.ts → icon-k4E9yNWD.d.ts} +1 -1
- package/dist/icon-lZ48P8Nn.js +1 -0
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons-DLCs1hLP.js +1 -0
- package/dist/icons.d.ts +53 -2
- package/dist/icons.js +1 -1
- package/dist/input-BnlpQF0c.js +1 -0
- package/dist/{input-DV9M6K4v.d.ts → input-BuYDU6CF.d.ts} +1 -1
- package/dist/input.d.ts +2 -2
- package/dist/input.js +1 -1
- package/dist/line-chart.d.ts +491 -0
- package/dist/line-chart.js +1 -0
- package/dist/{virtual-UrzmaSQm.js → list-51KQvENW.js} +1 -1
- package/dist/list.d.ts +5 -20
- package/dist/list.js +1 -1
- package/dist/llms.txt +5 -1
- package/dist/mantle-dark-high-contrast.css +17 -0
- package/dist/mantle-dark.css +13 -0
- package/dist/mantle-light-high-contrast.css +15 -0
- package/dist/mantle.css +29 -0
- package/dist/media-object.d.ts +45 -12
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +14 -53
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +5 -17
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +11 -21
- package/dist/pagination.js +1 -1
- package/dist/{index-B8mIWKIU.d.ts → popover-CE4OlWkd.d.ts} +1 -4
- package/dist/popover-CQ9s7jG5.js +1 -0
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/primitive-trJDqIXJ.js +1 -0
- package/dist/progress.d.ts +2 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +4 -16
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +129 -40
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/scatter-plot.d.ts +495 -0
- package/dist/scatter-plot.js +1 -0
- package/dist/{select-idm1jy7y.d.ts → select-0z7HVS6r.d.ts} +8 -29
- package/dist/select-BCHWvmyC.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +11 -38
- package/dist/selectable-list.js +1 -1
- package/dist/sheet.d.ts +22 -49
- package/dist/sheet.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/split-button.d.ts +155 -31
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +1 -1
- package/dist/table-CGxJwtbL.js +1 -0
- package/dist/{table-DUSvU_Jw.d.ts → table-CZBYEmyK.d.ts} +11 -38
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +21 -36
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-C26-Xolp.js +1 -0
- package/dist/{themes-CYNpplwN.d.ts → theme-FbfjYiD3.d.ts} +16 -0
- package/dist/theme-switcher.d.ts +6 -15
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +42 -2
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +9 -17
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +26 -8
- package/dist/tooltip.js +1 -1
- package/dist/types.js +1 -1
- package/package.json +20 -14
- package/dist/checkbox-Cq17y0-R.js +0 -1
- package/dist/choice-Cc8dA5r8.js +0 -1
- package/dist/dialog-CQ2C6vkE.js +0 -1
- package/dist/dropdown-menu-CSCDdA3K.js +0 -1
- package/dist/field-context-BR01g789.js +0 -1
- package/dist/icon-CGgMKpJg.js +0 -1
- package/dist/icon-button-DiOhreJD.js +0 -1
- package/dist/index-CdPXa9h1.d.ts +0 -1
- package/dist/input-CVyAVbim.js +0 -1
- package/dist/popover-CBMADtjV.js +0 -1
- package/dist/primitive-DCPHJsRs.js +0 -1
- package/dist/select-SR_9-bxA.js +0 -1
- package/dist/table-GDkapNFi.js +0 -1
- package/dist/theme-provider-BftkIiZn.js +0 -1
- package/dist/theme-wVnzzx2F.js +0 -1
- package/dist/toast-DKgMRv4F.js +0 -1
- /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
- /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
- /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
- /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
- /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
- /package/dist/{svg-only-d-nMCfAI.js → icon-d-nMCfAI.js} +0 -0
- /package/dist/{sort-B_DDQcVD.js → icons-B_DDQcVD.js} +0 -0
- /package/dist/{traffic-policy-file-CF1lbWtp.js → icons-CF1lbWtp.js} +0 -0
- /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
- /package/dist/{index-BtwKJTLq.d.ts → slot-BtwKJTLq.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./cx-IiQEAKf5.js";import{n}from"./slot-CDk0Bb9z.js";import{t as r}from"./button-BAno7KIU.js";import{t as i}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{createContext as a,useContext as o,useEffect as s,useId as c,useLayoutEffect as l,useMemo as u,useRef as d,useState as f,useSyncExternalStore as p}from"react";import m from"tiny-invariant";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{CheckIcon as v}from"@phosphor-icons/react/Check";import{CopyIcon as y}from"@phosphor-icons/react/Copy";import{scaleTime as b}from"d3-scale";import{area as x,curveLinear as S,curveMonotoneX as C,curveStep as w,line as T}from"d3-shape";const E=(e,t)=>Reflect.get(e,t),D=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`,`chart-other`],O=e=>D.includes(e),k=e=>`--color-${e}`,A=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`],j=e=>{let t=e.toLowerCase();return t.includes(`var(`)||t.includes(`currentcolor`)},M=(e,t)=>{let n=e.ownerDocument,r=n.createElement(`span`);r.style.display=`none`,r.style.color=t,e.appendChild(r);let i=n.defaultView?.getComputedStyle(r).color??``;return r.remove(),i},ee=(e,t)=>O(t)?M(e,`var(${k(t)})`):j(t)?M(e,t):t,te=e=>({grid:M(e,`var(--border-color-card-muted)`),baseline:M(e,`var(--border-color-card)`),tickText:M(e,`var(--text-color-muted)`),reference:M(e,`var(--color-neutral-500)`),surface:M(e,`var(--background-color-card)`)}),ne=e=>`${e.className}|${e.getAttribute(`data-applied-theme`)??``}|${e.getAttribute(`data-theme`)??``}`,re=(e,t)=>{let n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:[`class`,`data-applied-theme`,`data-theme`]}),()=>n.disconnect()},ie=1.5,ae=1.6,N=e=>`oklch(from ${e} calc(l - 0.18) c h)`,P=(e,t,n)=>{let r=ie;if(n===`up`){e.moveTo(-1.5,t+r),e.lineTo(t+r,-1.5),e.moveTo(-1.5,r),e.lineTo(r,-1.5),e.moveTo(t-r,t+r),e.lineTo(t+r,t-r);return}e.moveTo(-1.5,-1.5),e.lineTo(t+r,t+r),e.moveTo(t-r,-1.5),e.lineTo(t+r,r),e.moveTo(-1.5,t-r),e.lineTo(r,t+r)},F=(e,t)=>{let{texture:n,color:r,ink:i,devicePixelRatio:a,orientation:o}=t,s=e.canvas.ownerDocument.createElement(`canvas`);s.width=Math.max(1,Math.round(8*a)),s.height=s.width;let c=s.getContext(`2d`);if(c==null)return null;let l=s.width/8;c.scale(l,l),c.fillStyle=r,c.fillRect(0,0,8,8),n===`perpendicular`?(c.fillStyle=i,o===`horizontal`?c.fillRect(8/2-2/2,0,2,8):c.fillRect(0,8/2-2/2,8,2)):n===`dots`?(c.fillStyle=i,c.beginPath(),c.arc(8/4,8/4,ae,0,Math.PI*2),c.moveTo(7.6,24/4),c.arc(24/4,24/4,ae,0,Math.PI*2),c.fill()):(c.strokeStyle=i,c.lineWidth=n===`crosshatch`?1:ie,c.beginPath(),(n===`hatch`||n===`crosshatch`)&&P(c,8,`up`),(n===`hatch-reverse`||n===`crosshatch`)&&P(c,8,`down`),c.stroke());let u=e.createPattern(s,`repeat`);return u?.setTransform({a:1/l,b:0,c:0,d:1/l,e:0,f:0}),u},I=e=>{let{pointCount:t,columnCount:n,wasDecimated:r}=e;return n<=0?!1:r?t>=n*3:t>=n*4},oe=e=>{let{xs:t,values:n,startIndex:r,endIndex:i,positionK:a,positionB:o,columnCount:s}=e,c=new Uint8Array(s),l=new Float64Array(s),u=new Float64Array(s),d=new Float64Array(s),f=new Float64Array(s);for(let e=r;e<=i;e++){let r=n[e]??NaN;if(Number.isNaN(r))continue;let i=t[e]??NaN,p=Math.floor(i*a+o);if(p===s&&(p=s-1),!(p<0||p>=s)){if(c[p]===0){c[p]=1,l[p]=r,u[p]=r,d[p]=r,f[p]=r;continue}r<(l[p]??1/0)&&(l[p]=r),r>(u[p]??-1/0)&&(u[p]=r),f[p]=r}}return{columnCount:s,hasData:c,minValue:l,maxValue:u,inValue:d,outValue:f}},se=new Intl.NumberFormat,ce=new Intl.NumberFormat(void 0,{maximumSignificantDigits:4}),le=new Map,L=(e,t)=>{let n=Object.is(e,-0)?0:e,r=t?.maximumFractionDigits;if(r!=null){let e=le.get(r);return e??(e=new Intl.NumberFormat(void 0,{maximumFractionDigits:r}),le.set(r,e)),e.format(n)}return n!==0&&Math.abs(n)<1?ce.format(n):se.format(n)},R=e=>!Number.isFinite(e)||e<=0?0:Math.min(20,Math.max(0,-Math.floor(Math.log10(e)))),ue=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),de=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}),fe=e=>e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0,z=(e,t)=>typeof e==`string`?e:typeof e==`number`?L(e):Number.isNaN(e.getTime())?`—`:t?.datasetHasTimeOfDay??fe(e)?ue.format(e):de.format(e),pe=(e,t,n)=>{if(t<=0)return null;let r=0,i=t-1,a=e[0]??0,o=e[i]??0;if(n<=a)return 0;if(n>=o)return i;for(;i-r>1;){let t=r+i>>1;(e[t]??0)<=n?r=t:i=t}let s=n-(e[r]??0);return(e[i]??0)-n<s?i:r},B=Math.PI/2-.05,V=e=>({cosYaw:Math.cos(e.yaw),sinYaw:Math.sin(e.yaw),cosPitch:Math.cos(e.pitch),sinPitch:Math.sin(e.pitch)}),me=(e,t,n,r)=>{let i=e*r.cosYaw+n*r.sinYaw,a=-e*r.sinYaw+n*r.cosYaw,o=t*r.cosPitch-a*r.sinPitch,s=t*r.sinPitch+a*r.cosPitch,c=4/(4+s);return{x:i*c,y:o*c,depth:s,scale:c}},he=e=>Math.min(B,Math.max(-B,e)),ge=(e,t)=>{let n=t[1]-t[0];return n===0?0:(e-t[0])/n*2-1},_e=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],ve=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],ye=Math.sqrt(50),be=Math.sqrt(10),xe=Math.sqrt(2),H=(e,t,n,r)=>{let i=(t-e)/Math.max(0,n),a=r?.integer?Math.max(1,i):i,o=Math.floor(Math.log10(a)),s=a/10**o,c=s>=ye?10:s>=be?5:s>=xe?2:1,l,u,d;return o<0?(d=10**-o/c,l=Math.round(e*d),u=Math.round(t*d),l/d<e&&(l+=1),u/d>t&&--u,d=-d):(d=10**o*c,l=Math.round(e/d),u=Math.round(t/d),l*d<e&&(l+=1),u*d>t&&--u),u<l&&.5<=n&&n<2?H(e,t,n*2,r):[l,u,d]},Se=(e,t,n,r)=>{if(!(n>0))return[];if(e===t)return r?.integer&&!Number.isInteger(e)?[]:[e];let i=t<e,[a,o,s]=i?H(t,e,n,r):H(e,t,n,r);if(!(o>=a))return[];let c=o-a+1,l=[];for(let e=0;e<c;e+=1){let t=i?o-e:a+e;l.push(s<0?t/-s:t*s)}return l},Ce=(e,t,n)=>H(e,t,n)[2],U=(e,t)=>{let n=e[1]-e[0];if(n===0)return{k:0,b:(t[0]+t[1])/2};let r=(t[1]-t[0])/n;return{k:r,b:t[0]-e[0]*r}},we=e=>{let{count:t,rangeStart:n,rangeEnd:r,paddingInner:i,paddingOuter:a}=e,o=r-n;if(t<=0||o<=0)return{count:Math.max(0,t),rangeStart:n,step:0,bandwidth:0,offset:0};let s=o/Math.max(1,t-i+a*2);return{count:t,rangeStart:n,step:s,bandwidth:s*(1-i),offset:s*a}},W=(e,t)=>e.rangeStart+e.offset+t*e.step,G=(e,t)=>W(e,t)+e.bandwidth/2,Te=(e,t)=>{if(e.count===0||e.step===0)return null;let n=Math.floor((t-e.rangeStart-e.offset+e.step/2-e.bandwidth/2)/e.step);return Math.min(e.count-1,Math.max(0,n))},Ee=(e,t,n)=>Se(e[0],e[1],t,n);let K=null,De=null;const Oe=e=>{if(De!=null&&K!=null&&K[0]===e[0]&&K[1]===e[1])return De;let t=b().domain([new Date(e[0]),new Date(e[1])]);return K=[e[0],e[1]],De=t,t},ke=(e,t)=>Oe(e).ticks(t).map(e=>e.getTime()),Ae=e=>{let t=Oe(e).tickFormat();return e=>t(new Date(e))},q=(e,t)=>{if(e[0]>e[1])return q([e[1],e[0]],t);if(e[0]===e[1]){let n=e[0],r=n===0?1:Math.abs(n)*.5;return q([n-r,n+r],t)}let n=e[0],r=e[1],i=NaN;for(let e=0;e<10;e++){let e=Ce(n,r,t);if(e===i||e===0||!Number.isFinite(e))break;if(e>0)n=Math.floor(n/e)*e,r=Math.ceil(r/e)*e;else{let t=-e;n=Math.floor(n*t)/t,r=Math.ceil(r*t)/t}i=e}return[n,r]},je=e=>e===`monotone`?C:e===`step`?w:S,J=e=>Math.round(e)+.5,Me=(e,t)=>{let{plot:n,color:r,xLines:i,yLines:a}=t;e.save(),e.strokeStyle=r,e.lineWidth=1;for(let t of i)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo(J(t.position),n.top),e.lineTo(J(t.position),n.top+n.height),e.stroke();for(let t of a)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo(n.left,J(t.position)),e.lineTo(n.left+n.width,J(t.position)),e.stroke();e.restore()},Ne=(e,t)=>{let{plot:n,color:r,y:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(n.left,J(i)),e.lineTo(n.left+n.width,J(i)),e.stroke()},Pe=(e,t)=>{let{plot:n,color:r,x:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(J(i),n.top),e.lineTo(J(i),n.top+n.height),e.stroke()},Fe=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.width),r=Math.min(t.valueY,t.baselineY),i=Math.abs(t.baselineY-t.valueY);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(t.x,r,n,i);continue}t.valueY<=t.baselineY?e.roundRect(t.x,r,n,i,[a,a,0,0]):e.roundRect(t.x,r,n,i,[0,0,a,a])}e.fill()},Ie=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.height),r=Math.min(t.valueX,t.baselineX),i=Math.abs(t.valueX-t.baselineX);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(r,t.y,i,n);continue}t.valueX>=t.baselineX?e.roundRect(r,t.y,i,n,[0,a,a,0]):e.roundRect(r,t.y,i,n,[a,0,0,a])}e.fill()},Le=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}=t,c=T().x(a).y(o).defined(s).curve(je(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),c(i),e.stroke()},Re=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}=t,l=x().x(a).y0(o).y1(s).defined(c).curve(je(r)).context(e);e.beginPath(),l(i),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore();let u=T().x(a).y(s).defined(c).curve(je(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),u(i),e.stroke()},ze=(e,t)=>{let{color:n,columns:r,columnToX:i,valueK:a,valueB:o}=t;e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath();let s=!1;for(let t=0;t<r.columnCount;t++){if(r.hasData[t]===0){s=!1;continue}let n=i(t),c=(r.inValue[t]??0)*a+o,l=(r.minValue[t]??0)*a+o,u=(r.maxValue[t]??0)*a+o,d=(r.outValue[t]??0)*a+o;s?e.lineTo(n,c):(e.moveTo(n,c),s=!0),(l!==c||u!==c)&&(e.lineTo(n,l),e.lineTo(n,u)),d!==u&&e.lineTo(n,d)}e.stroke()},Be=(e,t)=>{let{color:n,lowerColumns:r,upperColumns:i,columnToX:a,valueK:o,valueB:s}=t;e.beginPath();let c=-1,l=t=>{if(c<0)return;let n=!1;for(let r=c;r<=t;r++){let t=a(r),c=(i.maxValue[r]??0)*o+s;n?e.lineTo(t,c):(e.moveTo(t,c),n=!0)}for(let n=t;n>=c;n--){let t=a(n),i=(r.minValue[n]??0)*o+s;e.lineTo(t,i)}e.closePath(),c=-1};for(let e=0;e<i.columnCount;e++){if(i.hasData[e]===0){l(e-1);continue}c<0&&(c=e)}l(i.columnCount-1),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),ze(e,{color:n,columns:i,columnToX:a,valueK:o,valueB:s})},Ve=(e,t,n,r,i)=>{if(i===`square`){let i=r*.886;e.moveTo(t-i,n-i),e.lineTo(t+i,n-i),e.lineTo(t+i,n+i),e.lineTo(t-i,n+i),e.closePath();return}if(i===`triangle`){let i=r*1.55;e.moveTo(t,n-i),e.lineTo(t+i*.866,n+i*.5),e.lineTo(t-i*.866,n+i*.5),e.closePath();return}if(i===`diamond`){let i=r*1.253;e.moveTo(t,n-i),e.lineTo(t+i,n),e.lineTo(t,n+i),e.lineTo(t-i,n),e.closePath();return}e.arc(t,n,r,0,Math.PI*2)},He=(e,t)=>{let{color:n,surface:r,shape:i,indexes:a,xAt:o,yAt:s,definedAt:c}=t;e.fillStyle=n,e.strokeStyle=r,e.lineWidth=2;for(let t of a)c(t)&&(e.beginPath(),Ve(e,o(t),s(t),4,i),e.fill(),e.stroke())},Ue=5e3,We=2e4,Ge=(e,t)=>{let{color:n,surface:r,shape:i,totalPointCount:a,indexes:o,xAt:s,yAt:c,radiusAt:l}=t;if(e.fillStyle=n,a>We){e.beginPath();for(let t of o)l(t)<=0||e.rect(s(t)-1,c(t)-1,2,2);e.fill();return}let u=a<=Ue;e.strokeStyle=r,e.lineWidth=2;for(let t of o){let n=l(t);n<=0||(e.beginPath(),Ve(e,s(t),c(t),n,i),e.fill(),u&&e.stroke())}},Ke=(e,t)=>{let{count:n,order:r,screenX:i,screenY:a,radius:o,colorAt:s,shapeAt:c,alphaAt:l,surface:u}=t;if(e.save(),n>We){let t=``,n=-1;for(let c of r){let r=s(c);r!==t&&(e.fillStyle=r,t=r);let u=l(c);u!==n&&(e.globalAlpha=u,n=u);let d=Math.max(1,(o[c]??0)/2);e.fillRect((i[c]??0)-d/2,(a[c]??0)-d/2,d,d)}e.restore();return}let d=n<=Ue;e.strokeStyle=u,e.lineWidth=2;let f=``,p=-1;for(let t of r){let n=s(t);n!==f&&(e.fillStyle=n,f=n);let r=l(t);r!==p&&(e.globalAlpha=r,p=r),e.beginPath(),Ve(e,i[t]??0,a[t]??0,o[t]??0,c(t)),e.fill(),d&&e.stroke()}e.restore()},qe=(e,t)=>{let{gridColor:n,axisColor:r,corners:i,edges:a,cubeAlpha:o,axes:s}=t;if(e.save(),o>.01){e.globalAlpha=o,e.strokeStyle=n,e.lineWidth=1,e.beginPath();for(let[t,n]of a){let r=i[t],a=i[n];r!=null&&a!=null&&(e.moveTo(r.x,r.y),e.lineTo(a.x,a.y))}e.stroke()}e.strokeStyle=r;for(let{alpha:t,from:n,to:r}of s)t<=.01||(e.globalAlpha=t,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(r.x,r.y),e.stroke());e.restore()},Je=(e,t)=>{let{textColor:n,fontFamily:r,plot:i,center:a,axes:o}=t;e.save(),e.fillStyle=n,e.font=`11px ${r}`,e.textAlign=`center`,e.textBaseline=`middle`;for(let{label:t,alpha:n,from:r,to:s}of o){if(n<=.01)continue;let o=Math.hypot(r.x-a.x,r.y-a.y),c=Math.hypot(s.x-a.x,s.y-a.y),l=c>=o?s:r,u=c>=o?r:s,d=Math.max(1,Math.hypot(l.x-u.x,l.y-u.y)),f=(l.x-u.x)/d*16,p=(l.y-u.y)/d*16,m=Math.min(i.left+i.width-8,Math.max(i.left+8,l.x+f)),h=Math.min(i.top+i.height-6,Math.max(i.top+6,l.y+p));e.globalAlpha=n,e.fillText(t,m,h)}e.restore()},Ye=(e,t)=>{let{plot:n,color:r,textColor:i,y:a,label:o,fontFamily:s}=t;e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(n.left,J(a)),e.lineTo(n.left+n.width,J(a)),e.stroke(),e.setLineDash([]),o!=null&&o.length>0&&(e.font=`11px ${s}`,e.fillStyle=i,e.textAlign=`right`,e.textBaseline=`bottom`,e.fillText(o,n.left+n.width-4,a-3))},Xe=(e,t)=>{let{plot:n,color:r,textColor:i,x:a,label:o,fontFamily:s}=t;if(e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(J(a),n.top),e.lineTo(J(a),n.top+n.height),e.stroke(),e.setLineDash([]),o!=null&&o.length>0){e.font=`11px ${s}`,e.fillStyle=i;let t=e.measureText(o).width,r=a+4+t<=n.left+n.width;e.textAlign=r?`left`:`right`,e.textBaseline=`top`,e.fillText(o,r?a+4:a-4,n.top+3)}},Ze=(e,t)=>{let{plot:n,color:r,fontFamily:i,xLabels:a,yLabels:o}=t;e.save(),e.font=`11px ${i}`,e.fillStyle=r,e.textAlign=`right`,e.textBaseline=`middle`;for(let t of o)e.globalAlpha=t.alpha,e.fillText(t.text,n.left-8,t.position);e.textAlign=`center`,e.textBaseline=`top`;for(let t of a)e.globalAlpha=t.alpha,e.fillText(t.text,t.position,n.top+n.height+8);e.restore()},Qe=e=>{let t=e.length,n=e[0]?.length??0,r=[],i=[];for(let e=0;e<t;e++)r.push(new Float64Array(n)),i.push(new Float64Array(n));let a=0,o=0,s=new Float64Array(n),c=new Float64Array(n);for(let l=0;l<t;l++){let t=e[l],u=r[l],d=i[l];if(t!=null&&u!=null&&d!=null)for(let e=0;e<n;e++){let n=t[e]??NaN;if(Number.isNaN(n)){u[e]=NaN,d[e]=NaN;continue}if(n>=0){let t=s[e]??0,r=t+n;s[e]=r,u[e]=t,d[e]=r,r>o&&(o=r)}else{let t=c[e]??0,r=t+n;c[e]=r,u[e]=r,d[e]=t,r<a&&(a=r)}}}return{lower:r,upper:i,min:a,max:o}},$e=e=>1-(1-e)**3;var et=class{#e=new Float64Array;#t=new Float64Array;#n=new Float64Array;#r=0;#i=0;#a=!1;get active(){return this.#a}values(){return this.#n}retarget(e,t){let{duration:n,now:r}=t,i=e.length,a=this.#n.length!==i;if(a&&(this.#e=new Float64Array(i),this.#t=new Float64Array(i),this.#n=new Float64Array(i)),a||n<=0){for(let t=0;t<i;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n,this.#n[t]=n}this.#a=!1;return}let o=!1;for(let t=0;t<i;t++){let n=e[t]??NaN,r=this.#n[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n))){o=!0;break}}if(!o){for(let t=0;t<i;t++)this.#t[t]=e[t]??NaN;this.#a=!1;return}for(let t=0;t<i;t++)this.#e[t]=this.#n[t]??NaN,this.#t[t]=e[t]??NaN;this.#r=r,this.#i=n,this.#a=!0}snap(){this.#n.set(this.#t),this.#a=!1}tick(e){if(!this.#a)return!1;let t=Math.min(1,(e-this.#r)/this.#i),n=$e(t);for(let e=0;e<this.#n.length;e++){let t=this.#e[e]??NaN,r=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(r)){this.#n[e]=r;continue}this.#n[e]=t+(r-t)*n}return t>=1&&(this.#a=!1),this.#a}},Y=class{#e=new Float64Array;#t=new Float64Array;#n=0;#r=!1;#i;#a;#o=0;constructor(e={}){this.#i=e.speed??.14,this.#a=e.epsilon??.001}get active(){return this.#r}values(){return this.#t}jump(e){this.#t.length!==e.length&&(this.#e=new Float64Array(e.length),this.#t=new Float64Array(e.length));for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n}this.#r=!1}aim(e,t){if(this.#t.length!==e.length){this.jump(e);return}let n=!1;for(let t=0;t<e.length;t++){let r=e[t]??NaN,i=this.#e[t]??NaN;if(i!==r&&!(Number.isNaN(i)&&Number.isNaN(r))){n=!0;break}}if(!n)return;let r=0;for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n;let i=Math.abs(n-(this.#t[t]??NaN));Number.isFinite(i)&&i>r&&(r=i)}this.#o=r,this.#r||(this.#r=!0,this.#n=t)}tick(e){if(!this.#r)return!1;let t=Math.min(50,Math.max(0,e-this.#n));this.#n=e;let n=1-(1-this.#i)**(t/16.67),r=Math.max(this.#o*this.#a,2**-52),i=!0;for(let e=0;e<this.#t.length;e++){let t=this.#e[e]??NaN,a=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(a)){this.#t[e]=t;continue}let o=a+(t-a)*n;n>0&&o===a||Math.abs(t-o)<=r?this.#t[e]=t:(this.#t[e]=o,i=!1)}return this.#r=!i,this.#r}};const tt=e=>`${e.colorInput}|${e.texture}`,nt={bar:`BarChart.Bar`,line:`LineChart.Line`,area:`AreaChart.Area`,scatter:`ScatterPlot.Point`},rt=1e3;var it=class{#e;#t;#n;#r={xKey:``,xScale:`linear`,yDomain:[`auto`,`auto`],orientation:`vertical`,zKey:null,dimensions:3,stacked:!1,animate:!0};#i={onDatumActivate:null,onActiveIndexChange:null};#a;#o=null;#s=null;#c=null;#l=null;#u=0;#d=0;#f=1;#p=[];#m=0;#h=new Float64Array;#g=[];#_=null;#v=null;#y=!1;#b=!1;#x=new Map;#S=0;#C=0;#w=!0;#T=!0;#E=null;#D=new Y({speed:.16});#O=new Y({speed:.2});#k=new Map;#A=new Map;#j=!1;#M=new Map;#N=new Map;#P=0;#F=!1;#I=new Map;#L={alpha:0,target:0};#R=0;#z=null;#B=null;#V=null;#H={left:0,top:0,width:0,height:0};#U=null;#W=new Float64Array;#G=[0,1];#K={yaw:.65,pitch:-.35};#q=new Y({speed:.12});#J=new Y({speed:.16});#Y=null;#X=!1;#Z=null;#Q=new Int32Array;#$=new Map;#ee=``;#te=null;#ne=null;#re=null;#ie=void 0;#ae=null;#oe=!1;#se=null;#ce=null;#le={width:0,height:0};#ue=!1;#de=!1;#fe=0;#pe=!1;constructor(e){this.#e=e.kind,this.#t=e.elements,this.#n=e.store,this.#a=e.elements.canvas.getContext(`2d`),this.#n.onSeriesChange=()=>{this.#b=!0,this.#Te()},this.#n.onPresentationChange=()=>{this.#Te()},typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(e=>{let t=e[0];t!=null&&(this.#u=t.contentRect.width,this.#d=t.contentRect.height,this.#f=this.#ke(),this.#I.clear(),this.#te=null,this.#Te())}),this.#o.observe(e.elements.plot),this.#c=new ResizeObserver(()=>{this.#le={width:this.#t.tooltip.offsetWidth,height:this.#t.tooltip.offsetHeight},this.#Ee()}),this.#c.observe(e.elements.tooltip));let t=e.elements.root.ownerDocument.documentElement;this.#s=re(t,()=>{this.#V=null,this.#Te()}),this.#me(),this.#J.jump([1,1])}destroy(){this.#pe=!0,this.#o?.disconnect(),this.#c?.disconnect(),this.#s?.(),this.#l?.(),this.#n.onSeriesChange=null,this.#n.onPresentationChange=null,this.#z!=null&&(clearTimeout(this.#z),this.#z=null),this.#fe!==0&&cancelAnimationFrame(this.#fe)}#me(){if(typeof matchMedia>`u`||this.#pe)return;this.#l?.();let e=matchMedia(`(resolution: ${this.#ke()}dppx)`),t=()=>{this.#f=this.#ke(),this.#I.clear(),this.#Te(),this.#me()};e.addEventListener(`change`,t,{once:!0}),this.#l=()=>e.removeEventListener(`change`,t)}setOptions(e){let t=this.#r;if(this.#r=e,t.xScale!==e.xScale&&this.#M.clear(),t.animate&&!e.animate&&this.#he(),t.dimensions!==e.dimensions){let t=[+(e.dimensions>=2),+(e.dimensions>=3)],n=at(e.dimensions);if(this.#ve()===0||!this.#j)this.#J.jump(t),this.#K=n,this.#q.jump([n.yaw,n.pitch]);else{let e=n.yaw+Math.round((this.#K.yaw-n.yaw)/(Math.PI*2))*Math.PI*2;this.#J.aim(t,performance.now()),this.#q.jump([this.#K.yaw,this.#K.pitch]),this.#q.aim([e,n.pitch],performance.now())}}(t.xKey!==e.xKey||t.xScale!==e.xScale||t.zKey!==e.zKey||t.stacked!==e.stacked||t.yDomain[0]!==e.yDomain[0]||t.yDomain[1]!==e.yDomain[1])&&(this.#b=!0),this.#Te()}setCallbacks(e){this.#i=e}setRows(e){e!==this.#p&&(this.#p=e,this.#b=!0,this.#Te())}flushIngest(){!this.#b||this.#pe||(this.#b=!1,this.#ge())}setControlledActiveIndex(e){let t=this.#ae;this.#ae=null;let n=this.#ie!==void 0;if(this.#ie=e,e!==void 0){let n=t!=null&&t.index===e&&t.viaKeyboard;this.#et(e==null?null:this.#Ze(e),{viaKeyboard:n,notify:!1})}else n&&this.#et(null,{viaKeyboard:!1,notify:!1});this.#Ee()}handlePointerMove(e,t){if(this.#Y!=null){let n=e-this.#Y.lastX,r=t-this.#Y.lastY;(this.#Y.moved||Math.abs(n)+Math.abs(r)>3)&&(this.#Y.moved=!0,this.#K={yaw:this.#K.yaw+n*.008,pitch:he(this.#K.pitch+r*.008)},this.#q.jump([this.#K.yaw,this.#K.pitch]),this.#Y.lastX=e,this.#Y.lastY=t,this.#et(null,{viaKeyboard:!1,notify:!1}),this.#Te());return}if(this.#se=e,this.#ce=t,this.#e===`scatter`){let n=this.#st(e,t);this.#ne=n?.seriesKey??null,this.#te=n==null?null:{x:n.screenX,y:n.screenY},this.#et(n?.index??null,{viaKeyboard:!1,notify:!0});return}let n=this.#Qe(e,t);this.#et(n,{viaKeyboard:!1,notify:!0})}handlePointerDown(e,t){if(this.#X=!0,this.#xe()){this.#Y={lastX:e,lastY:t,moved:!1};return}this.handlePointerMove(e,t)}handlePointerUp(e,t){let n=this.#Y;this.#Y=null;let r=this.#X;if(this.#X=!1,n!=null){if(n.moved)return;this.handlePointerMove(e,t)}r&&this.handleActivate(e,t)}handlePointerLeave(){this.#se=null,this.#ce=null,this.#Y=null,this.#X=!1,this.#ne=null,this.#te=null,this.#et(null,{viaKeyboard:!1,notify:!0})}handleActivate(e,t){let n=this.#Ye();if(n==null)return;let r=this.#Xe(n),i=this.#p[r];if(i==null)return;let a=this.#e===`scatter`?this.#ne:e==null||t==null?null:this.#$e(n,e,t);this.#i.onDatumActivate?.({index:r,xValue:this.#g[n]??``,datum:i,dataKey:a})}handleKeyDown(e){if(this.#m===0)return!1;let t=this.#m-1,n=this.#Ye(),r=this.#F?Math.max(1,Math.floor(this.#m/Math.max(1,this.#H.width*this.#f))):1,i=Math.max(1,Math.floor(this.#m/10)),a=(()=>{switch(e){case`ArrowLeft`:return Math.max(0,(n??this.#m)-r);case`ArrowRight`:return Math.min(t,(n??-1)+r);case`PageUp`:return Math.min(t,(n??0)+i);case`PageDown`:return Math.max(0,(n??t)-i);case`Home`:return 0;case`End`:return t;case`Escape`:return null;default:return}})();return a===void 0?e===`Enter`||e===` `?(this.handleActivate(null,null),!0):!1:(this.#se=null,this.#ce=null,this.#ne=null,this.#te=null,this.#et(a,{viaKeyboard:!0,notify:!0}),!0)}invalidateColors(){this.#V=null,this.#Te()}#he(){this.#D.jump(this.#ye()),this.#O.jump(this.#be()),this.#J.jump([+(this.#r.dimensions>=2),+(this.#r.dimensions>=3)]);let e=at(this.#r.dimensions);this.#K=e,this.#q.jump([e.yaw,e.pitch]);for(let e of this.#k.values())e.snap();for(let e of this.#A.values())e.snap();this.#L.alpha=this.#L.target,this.#Te()}#ge(){let e=this.#p,{xKey:t,xScale:n}=this.#r,r=this.#n.seriesSpecs();this.#I.clear();let i=this.#h;if(n===`band`||n===`point`){let n=e.length,r=new Float64Array(n),i=Array.from({length:n},()=>``),a=!1;for(let o=0;o<n;o++){let n=e[o],s=n==null?void 0:E(n,t);s!==void 0&&(a=!0),i[o]=typeof s==`string`||typeof s==`number`||s instanceof Date?s:String(s),r[o]=o}m(n===0||a,`${this.#Ce()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#_=null,this.#v=null,this.#m=n,this.#h=r,this.#g=i,this.#T=!0}else{let r=[],i=!1,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e[s],l=c==null?void 0:E(c,t);l!==void 0&&(i=!0),l!=null&&(a=!0);let u=ut(l,n===`time`);Number.isFinite(u)&&(r.push({source:s,x:u}),o=!0)}m(e.length===0||i,`${this.#Ce()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),m(!a||o,`${this.#Ce()} could not read any "${t}" values as ${n===`time`?`dates`:`numbers`} for the "${n}" x scale — check the xScale and the data types.`);let s=!0;for(let e=1;e<r.length;e++)if((r[e]?.x??0)<(r[e-1]?.x??0)){s=!1;break}let c=s?r:r.toSorted((e,t)=>e.x-t.x),l=c.length,u=new Float64Array(l),d=Array.from({length:l},()=>``),f=l===e.length,p=!0,h=new Int32Array(l);for(let e=0;e<l;e++){let t=c[e];t!=null&&(u[e]=t.x,Number.isInteger(t.x)||(p=!1),n===`time`?d[e]=new Date(t.x):d[e]=t.x,h[e]=t.source,t.source!==e&&(f=!1))}if(f)this.#_=null,this.#v=null;else{this.#_=h;let t=new Int32Array(e.length).fill(-1);for(let e=0;e<l;e++){let n=h[e];n!=null&&(t[n]=e)}this.#v=t}this.#m=l,this.#h=u,this.#g=d,this.#T=p}let a=!1;for(let e of this.#g)if(e instanceof Date&&fe(e)){a=!0;break}this.#y=a;let o=this.#h[0],s=this.#h[this.#m-1],c=i[0],l=i[i.length-1];!this.#xe()&&(n===`linear`||n===`time`)&&o!=null&&s!=null&&c!=null&&l!=null&&o>c&&s>=l?(this.#L.target=1,this.#R=performance.now()):(o!==c||s!==l)&&(this.#L.target=0);let u=this.#m,d=i.length===u&&u<=2500;if(d){for(let e=0;e<u;e++)if(i[e]!==this.#h[e]){d=!1;break}}let f=this.#x;this.#x=new Map;let p=1/0,h=-1/0,g=!0;for(let t of r){let n=new Float64Array(u),r=!1;for(let i=0;i<u;i++){let a=e[this.#_==null?i:this.#_[i]??i],o=a==null?void 0:E(a,t.dataKey);if(o===void 0){n[i]=NaN;continue}r=!0;let s=typeof o==`number`&&Number.isFinite(o)?o:NaN;n[i]=s,Number.isNaN(s)||(s<p&&(p=s),s>h&&(h=s),Number.isInteger(s)||(g=!1))}m(u===0||r,`${nt[t.mark]} dataKey "${t.dataKey}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#x.set(t.dataKey,n)}this.#S=p===1/0?0:p,this.#C=h===-1/0?0:h,this.#w=g;let _=this.#r.zKey;if(this.#e===`scatter`&&_!=null){let t=new Float64Array(u),n=1/0,r=-1/0,i=!1;for(let a=0;a<u;a++){let o=e[this.#_==null?a:this.#_[a]??a],s=o==null?void 0:E(o,_);s!==void 0&&(i=!0);let c=typeof s==`number`&&Number.isFinite(s)?s:NaN;t[a]=c,Number.isNaN(c)||(c<n&&(n=c),c>r&&(r=c))}m(u===0||i,`ScatterPlot.Root zKey "${_}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#W=t,this.#G=n===1/0?[0,1]:q([n,r],5)}else this.#W=new Float64Array;this.#Z=null,this.#te=null,this.#E=this.#r.stacked?Qe(r.map(e=>this.#x.get(e.dataKey)??new Float64Array)):null,this.#F=I({pointCount:u,columnCount:Math.max(1,Math.round(this.#H.width*this.#f)),wasDecimated:this.#F});let v=this.#V;if(v!=null){for(let e of this.#n.seriesMeta())if(v.inputs.get(e.dataKey)!==tt(e)){this.#V=null;break}}this.#_e(r,f,d);let y=this.#Ye();y!=null&&this.#et(Math.min(y,Math.max(0,u-1)),{viaKeyboard:this.#oe,notify:!1}),this.#it({force:!0})}#_e(e,t,n){let r=performance.now(),i=this.#ve(),a=!this.#j;this.#j=this.#j||this.#m>0,a||i===0?(this.#D.jump(this.#ye()),this.#O.jump(this.#be())):(this.#D.aim(this.#ye(),r),this.#O.aim(this.#be(),r));let o=this.#m>0&&this.#m<=2500&&n,s=new Set,c=(e,t,n)=>{s.add(e);let a=this.#k.get(e);a??(a=new et,this.#k.set(e,a));let c=o&&n&&a.values().length===t.length;a.retarget(t,{duration:c?i:0,now:r})};e.forEach((e,n)=>{let i=t.has(e.dataKey);if(this.#E==null?c(e.dataKey,this.#x.get(e.dataKey)??new Float64Array,i):(c(`${e.dataKey}:lower`,this.#E.lower[n]??new Float64Array,i),c(`${e.dataKey}:upper`,this.#E.upper[n]??new Float64Array,i)),!this.#A.has(e.dataKey)&&this.#m>0){let t=new et;t.retarget([0],{duration:0,now:r}),t.retarget([1],{duration:this.#ve(),now:r}),this.#A.set(e.dataKey,t)}});for(let e of this.#k.keys())s.has(e)||this.#k.delete(e)}#ve(){return!this.#r.animate||typeof matchMedia<`u`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:280}#ye(){let[e,t]=this.#r.yDomain,n,r;if(this.#E==null?this.#e===`line`||this.#e===`scatter`?(n=this.#S,r=this.#C):(n=Math.min(0,this.#S),r=Math.max(0,this.#C)):(n=Math.min(0,this.#E.min),r=Math.max(0,this.#E.max)),typeof e==`number`&&(n=e),typeof t==`number`&&(r=t),this.#m===0)return[0,1];let i=q([n,r],5);return[typeof e==`number`?e:i[0],typeof t==`number`?t:i[1]]}#be(){if(this.#m===0)return[0,1];let e=this.#h[0]??0,t=this.#h[this.#m-1]??0;return e===t?[e-.5,t+.5]:this.#e===`scatter`?q([e,t],5):[e,t]}#xe(){return this.#e===`scatter`&&this.#r.zKey!=null}#Se(){return this.#e===`bar`&&this.#r.orientation===`horizontal`}#Ce(){return`${nt[this.#e].split(`.`)[0]??`Chart`}.Root`}#we(e,t){let n=this.#B;n??(n=this.#t.canvas.ownerDocument.createElement(`canvas`),this.#B=n),(n.width!==e||n.height!==t)&&(n.width=e,n.height=t);let r=n.getContext(`2d`);return r==null?null:{canvas:n,ctx:r}}#Te(){this.#de=!0,this.#De()}#Ee(){this.#De()}#De(){this.#ue||this.#pe||(this.#ue=!0,this.#fe=requestAnimationFrame(()=>{this.#ue=!1,this.#fe=0,this.#Oe()}))}#Oe(){if(!this.#pe){if(this.flushIngest(),this.#de){this.#de=!1;let e=performance.now(),t=!1;t=this.#D.tick(e)||t,t=this.#O.tick(e)||t;for(let n of this.#k.values())t=n.tick(e)||t;for(let n of this.#A.values())t=n.tick(e)||t;if(t=this.#J.tick(e)||t,this.#q.tick(e)){t=!0;let e=this.#q.values();this.#K={yaw:e[0]??this.#K.yaw,pitch:e[1]??this.#K.pitch}}this.#Ae(),this.#Me(),t=this.#ze(e)||t,t&&this.#Te()}this.#lt()}}#ke(){return typeof devicePixelRatio==`number`&&devicePixelRatio>0?Math.min(devicePixelRatio,3):1}#Ae(){let e=this.#t.root,t=`${ne(e.ownerDocument.documentElement)}|${this.#f}|${this.#r.orientation}`;if(this.#V?.signature===t)return;let n=e.ownerDocument.defaultView;if(n==null)return;let r=this.#a,i=new Map,a=new Map,o=new Map;for(let t of this.#n.seriesMeta()){let n=ee(e,t.colorInput);if(i.set(t.dataKey,n),a.set(t.dataKey,tt(t)),r!=null&&t.mark===`bar`&&t.texture!==`solid`){let i=F(r,{texture:t.texture,color:n,ink:M(e,N(n)),devicePixelRatio:this.#f,orientation:this.#r.orientation});i!=null&&o.set(t.dataKey,i)}}this.#V={signature:t,series:i,inputs:a,barTextures:o,chrome:te(e),fontFamily:n.getComputedStyle(e).fontFamily||`sans-serif`}}#je(e){let t=this.#V?.signature??``;t!==this.#ee&&(this.#$.clear(),this.#ee=t);let n=this.#$.get(e);if(n!=null)return n;let r=ee(this.#t.root,e);return this.#$.set(e,r),r}#Me(){let e=this.#n.getSnapshot(),t=this.#xe(),n=this.#Se(),r=!t&&e.xAxis!=null,i=!t&&e.yAxis!=null,a=n?r:i,o=(n?i:r)?24:8,s=Math.max(0,this.#d-8-o);this.#H={left:8,top:8,width:Math.max(0,this.#u-16),height:s};let c=8;if(a){c=40;let e=this.#a;if(e!=null&&this.#V!=null){e.font=`11px ${this.#V.fontFamily}`;let t=0,r=n?this.#Re().map(e=>e.text):this.#Le().map(e=>e.text);for(let n of r){let r=e.measureText(n).width;r>t&&(t=r)}c=Math.ceil(t)+14}}this.#H={left:c,top:8,width:Math.max(0,this.#u-c-8),height:s};let l=n?this.#H.top:this.#H.left,u=n?this.#H.top+this.#H.height:this.#H.left+this.#H.width;this.#r.xScale===`band`?this.#U=we({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:.2,paddingOuter:.1}):this.#r.xScale===`point`?this.#U=we({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:1,paddingOuter:.5}):this.#U=null,this.#F=I({pointCount:this.#m,columnCount:Math.max(1,Math.round(this.#H.width*this.#f)),wasDecimated:this.#F})}#Ne(){let e=this.#D.values();return U([e[0]??0,e[1]??1],[this.#H.top+this.#H.height,this.#H.top])}#Pe(){let e=this.#D.values(),t=this.#Se()?[this.#H.left,this.#H.left+this.#H.width]:[this.#H.top+this.#H.height,this.#H.top];return U([e[0]??0,e[1]??1],t)}#Fe(){let e=this.#O.values();return U([e[0]??0,e[1]??1],[this.#H.left,this.#H.left+this.#H.width])}#Ie(e){let t=this.#U;if(t!=null)return G(t,e);let{k:n,b:r}=this.#Fe();return(this.#h[e]??0)*n+r}#Le(){let e=this.#n.getSnapshot(),t=this.#D.values(),n=Ee([t[0]??0,t[1]??1],e.yAxis?.tickCount??5,{integer:this.#w}),r=e.yAxis?.tickFormat,i=n.length>1?R(Math.abs((n[1]??0)-(n[0]??0))):void 0;return n.map(e=>({value:e,text:r==null?L(e,i==null?void 0:{maximumFractionDigits:i}):r(e)}))}#Re(){let e=this.#n.getSnapshot(),t=e.xAxis?.tickFormat;if(this.#U!=null){let e=this.#Se(),n=e?this.#H.height:this.#H.width,r=Math.max(1,Math.floor(n/(e?15:60))),i=Math.max(1,Math.ceil(this.#m/r)),a=[];for(let e=0;e<this.#m;e+=i){let n=this.#g[e]??``;a.push({index:e,value:e,text:t==null?z(n,{datasetHasTimeOfDay:this.#y}):t(n)})}return a}let n=this.#O.values(),r=[n[0]??0,n[1]??1],i=e.xAxis?.tickCount??Math.max(2,Math.floor(this.#H.width/90));if(this.#r.xScale===`time`){let e=Ae(r);return ke(r,i).map(n=>({index:null,value:n,text:t==null?e(n):t(new Date(n))}))}let a=Ee(r,i,{integer:this.#T}),o=a.length>1?R(Math.abs((a[1]??0)-(a[0]??0))):void 0;return a.map(e=>({index:null,value:e,text:t==null?L(e,o==null?void 0:{maximumFractionDigits:o}):t(e)}))}#ze(e){let t=this.#a,n=this.#V;if(t==null||n==null||this.#u<=0||this.#d<=0)return!1;let r=Math.min(50,Math.max(0,e-this.#P));this.#P=e;let i=this.#t.canvas,a=Math.round(this.#u*this.#f),o=Math.round(this.#d*this.#f);(i.width!==a||i.height!==o)&&(i.width=a,i.height=o),t.setTransform(this.#f,0,0,this.#f,0,0),t.clearRect(0,0,this.#u,this.#d);let s=this.#n.getSnapshot(),c=this.#H;if(c.width<=0||c.height<=0)return!1;let l=this.#Ne(),u=this.#Fe(),d=this.#n.seriesSpecs(),f=this.#xe(),p=this.#ve()===0,m=f?[]:this.#Be(t,n.fontFamily),h=f?[]:this.#Ve(t,n.fontFamily),g=ot(this.#M,m,r,p);g=ot(this.#N,h,r,p)||g;let _=this.#L;if(_.target===1){if(e-this.#R>rt)_.target=0;else if(this.#z==null){let t=rt-(e-this.#R)+17;this.#z=setTimeout(()=>{this.#z=null,this.#Te()},t)}}if(p)_.alpha=_.target;else{let e=1-(1-(_.target>_.alpha?.16:.08))**(r/16.67);_.alpha+=(_.target-_.alpha)*e,Math.abs(_.target-_.alpha)<.02&&(_.alpha=_.target)}_.alpha!==_.target&&(g=!0);let v=this.#Se(),y=v?this.#Pe():l,b=e=>this.#U==null?e*u.k+u.b:G(this.#U,e),x=e=>e*y.k+y.b,S=[...this.#M.entries()].map(([e,t])=>({position:b(e),alpha:t.alpha})),C=[...this.#N.entries()].map(([e,t])=>({position:x(e),alpha:t.alpha}));if(s.grid!=null&&!f){let e=s.grid.lines??(v?`vertical`:`horizontal`),r=v?S:C,i=v?C:S;Me(t,{plot:c,color:n.chrome.grid,xLines:e===`horizontal`?[]:i,yLines:e===`vertical`?[]:r})}let w=Math.min(40,c.width*.25),T=t,E=null;_.alpha>.01&&w>1&&(E=this.#we(a,o),E!=null&&(E.ctx.setTransform(this.#f,0,0,this.#f,0,0),E.ctx.clearRect(0,0,this.#u,this.#d),T=E.ctx)),T.save(),T.beginPath(),T.rect(c.left,c.top,c.width,c.height+1),T.clip();let D=null;if(this.#e===`bar`?v?this.#Ge(T,d):this.#We(T,d,l):this.#e===`scatter`?D=this.#at(T,d,l):this.#Ke(T,d,l),T.restore(),E!=null){T.save(),T.globalCompositeOperation=`destination-out`;let e=T.createLinearGradient(c.left,0,c.left+w,0);e.addColorStop(0,`rgba(0, 0, 0, ${_.alpha})`),e.addColorStop(1,`rgba(0, 0, 0, 0)`),T.fillStyle=e,T.fillRect(c.left,c.top,w,c.height+1),T.restore(),t.drawImage(E.canvas,0,0,this.#u,this.#d)}D!=null&&Je(t,{textColor:n.chrome.tickText,fontFamily:n.fontFamily,plot:c,center:D.center,axes:D.axes}),this.#e===`bar`&&this.#m>0&&(v?Pe(t,{plot:c,color:n.chrome.baseline,x:x(0)}):Ne(t,{plot:c,color:n.chrome.baseline,y:x(0)}));for(let e of f?[]:s.referenceLines){let r=x(e.y);if(v?r<c.left||r>c.left+c.width:r<c.top||r>c.top+c.height)continue;let i=e.color==null?n.chrome.reference:this.#je(e.color);v?Xe(t,{plot:c,color:i,textColor:n.chrome.tickText,x:r,label:e.label,fontFamily:n.fontFamily}):Ye(t,{plot:c,color:i,textColor:n.chrome.tickText,y:r,label:e.label,fontFamily:n.fontFamily})}let O=s.xAxis==null||f?[]:[...this.#M.entries()].map(([e,t])=>({position:b(e),text:t.text,alpha:t.alpha})),k=s.yAxis==null||f?[]:[...this.#N.entries()].map(([e,t])=>({position:x(e),text:t.text,alpha:t.alpha})),A=v?k:O,j=v?O:k;return(A.length>0||j.length>0)&&Ze(t,{plot:c,color:n.chrome.tickText,fontFamily:n.fontFamily,xLabels:A,yLabels:j}),g}#Be(e,t){e.font=`11px ${t}`;let n=this.#Se(),r=this.#Fe(),i=[],a=-1/0;for(let t of this.#Re()){let o=t.index!=null&&this.#U!=null,s=o&&this.#U!=null?G(this.#U,t.index??0):t.value*r.k+r.b,c=n?15/2:e.measureText(t.text).width/2,l=n?2:8;s-c<a+l||(a=s+c,i.push({key:o?t.index??0:t.value,text:t.text}))}return i}#Ve(e,t){let n=this.#Le();if(!this.#Se())return n.map(e=>({key:e.value,text:e.text}));e.font=`11px ${t}`;let r=this.#Pe(),i=[],a=-1/0;for(let t of n){let n=t.value*r.k+r.b,o=e.measureText(t.text).width/2;n-o<a+8||(a=n+o,i.push({key:t.value,text:t.text}))}return i}#He(e,t){let n=t===`value`?e.dataKey:`${e.dataKey}:${t}`;if(!this.#F&&this.#m<=2500){let e=this.#k.get(n);if(e!=null&&e.values().length===this.#m)return e.values()}if(t===`value`)return this.#x.get(e.dataKey)??new Float64Array;let r=this.#n.seriesSpecs().findIndex(t=>t.dataKey===e.dataKey);return(t===`lower`?this.#E?.lower:this.#E?.upper)?.[r]??new Float64Array}#Ue(e){return this.#A.get(e)?.values()[0]??1}#We(e,t,n){let r=this.#U,i=this.#V;if(r==null||i==null||this.#m===0||t.length===0)return;let a=0*n.k+n.b,o=this.#E!=null,s=o?1:t.length,c=r.bandwidth>=8*s?2:+(r.bandwidth>=3*s),l=(r.bandwidth-c*(s-1))/s,u=Math.min(24,l);t.forEach((d,f)=>{let p=this.#Ue(d.dataKey),m=[],h=o?this.#He(d,`lower`):null,g=o?this.#He(d,`upper`):this.#He(d,`value`),_=f===t.length-1;for(let e=0;e<this.#m;e++){let t=g[e]??NaN;if(Number.isNaN(t))continue;let i=h==null?0:h[e]??0,d=o?W(r,e)+(r.bandwidth-u)/2:W(r,e)+(r.bandwidth-(l*s+c*(s-1)))/2+f*(l+c)+(l-u)/2,v=Number.isNaN(i)?a:i*n.k+n.b,y=t*n.k+n.b;y=v+(y-v)*p,o&&h!=null&&f>0&&!Number.isNaN(i)&&c>0&&(v-=Math.sign(v-y)*c),m.push({x:d,width:u,baselineY:v,valueY:y,rounded:!o||_})}Fe(e,{fill:i.barTextures.get(d.dataKey)??i.series.get(d.dataKey)??`currentColor`,rects:m})})}#Ge(e,t){let n=this.#U,r=this.#V;if(n==null||r==null||this.#m===0||t.length===0)return;let i=this.#Pe(),a=0*i.k+i.b,o=this.#E!=null,s=o?1:t.length,c=n.bandwidth>=8*s?2:+(n.bandwidth>=3*s),l=(n.bandwidth-c*(s-1))/s,u=Math.min(24,l);t.forEach((d,f)=>{let p=this.#Ue(d.dataKey),m=[],h=o?this.#He(d,`lower`):null,g=o?this.#He(d,`upper`):this.#He(d,`value`),_=f===t.length-1;for(let e=0;e<this.#m;e++){let t=g[e]??NaN;if(Number.isNaN(t))continue;let r=h==null?0:h[e]??0,d=o?W(n,e)+(n.bandwidth-u)/2:W(n,e)+(n.bandwidth-(l*s+c*(s-1)))/2+f*(l+c)+(l-u)/2,v=Number.isNaN(r)?a:r*i.k+i.b,y=t*i.k+i.b;y=v+(y-v)*p,o&&h!=null&&f>0&&!Number.isNaN(r)&&c>0&&(v-=Math.sign(v-y)*c),m.push({y:d,height:u,baselineX:v,valueX:y,rounded:!o||_})}Ie(e,{fill:r.barTextures.get(d.dataKey)??r.series.get(d.dataKey)??`currentColor`,rects:m})})}#Ke(e,t,n){let r=this.#V;if(r==null||this.#m===0)return;let i=this.#Fe(),a=this.#U,o=e=>a==null?(this.#h[e]??0)*i.k+i.b:G(a,e);t.forEach(t=>{let i=r.series.get(t.dataKey)??`currentColor`,a=this.#Ue(t.dataKey);if(e.save(),a<1&&(e.beginPath(),e.rect(this.#H.left,0,this.#H.width*a,this.#d),e.clip()),this.#F){this.#qe(e,t,i,n),e.restore();return}let s=t.mark===`area`,c=this.#He(t,this.#E==null?`value`:`upper`),l=this.#E==null?null:this.#He(t,`lower`),u=e=>!Number.isNaN(c[e]??NaN),d=[];for(let e=0;e<this.#m;e++)(!t.connectNulls||u(e))&&d.push(e);let f=e=>(c[e]??0)*n.k+n.b;if(s){let r=l==null?()=>0*n.k+n.b:e=>(l[e]??0)*n.k+n.b;Re(e,{color:i,curve:t.curve,indexes:d,xAt:o,y0At:r,y1At:f,definedAt:u})}else Le(e,{color:i,curve:t.curve,indexes:d,xAt:o,yAt:f,definedAt:u}),t.markers&&this.#H.width/this.#m>=12&&He(e,{color:i,surface:r.chrome.surface,shape:t.shape,indexes:d,xAt:o,yAt:f,definedAt:u});e.restore()})}#qe(e,t,n,r){let i=Math.max(1,Math.round(this.#H.width*this.#f)),a=e=>this.#H.left+(e+.5)/this.#f;if(t.mark===`area`){let o=this.#Je(`${t.dataKey}:upper`,this.#He(t,this.#E==null?`value`:`upper`),i),s=this.#E==null?null:this.#Je(`${t.dataKey}:lower`,this.#He(t,`lower`),i);s==null?Be(e,{color:n,lowerColumns:dt(o,0),upperColumns:o,columnToX:a,valueK:r.k,valueB:r.b}):Be(e,{color:n,lowerColumns:s,upperColumns:o,columnToX:a,valueK:r.k,valueB:r.b});return}ze(e,{color:n,columns:this.#Je(t.dataKey,this.#He(t,`value`),i),columnToX:a,valueK:r.k,valueB:r.b})}#Je(e,t,n){let r=this.#O.values(),i=`${r[0]??0}:${r[1]??1}:${n}`,a=this.#I.get(e);if(a!=null&&a.key===i)return a.columns;let o=U([r[0]??0,r[1]??1],[0,n]),s=oe({xs:this.#h,values:t,startIndex:0,endIndex:this.#m-1,positionK:o.k,positionB:o.b,columnCount:n});return this.#I.set(e,{key:i,columns:s}),s}#Ye(){if(this.#m===0)return null;let e;return e=this.#ie===void 0?this.#re:this.#ie==null?null:this.#Ze(this.#ie),e==null?null:Math.min(Math.max(0,e),this.#m-1)}#Xe(e){return this.#_==null?e:this.#_[e]??e}#Ze(e){if(this.#p.length===0)return null;let t=Math.min(Math.max(0,e),this.#p.length-1);if(this.#v==null)return t;let n=this.#v[t]??-1;return n===-1?null:n}#Qe(e,t){if(this.#m===0)return null;let n=this.#U;if(n!=null)return Te(n,this.#Se()?t:e);let{k:r,b:i}=this.#Fe();if(r===0)return 0;let a=e;if(this.#F){let t=Math.floor((e-this.#H.left)*this.#f);a=this.#H.left+(t+.5)/this.#f}return pe(this.#h,this.#m,(a-i)/r)}#$e(e,t,n){let r=this.#n.seriesSpecs(),i=this.#Se(),a=this.#U;if(this.#e===`bar`&&this.#E==null&&a!=null&&r.length>1){let o=(i?n:t)-W(a,e),s=Math.floor(o/Math.max(1,a.bandwidth)*r.length);return r[Math.min(r.length-1,Math.max(0,s))]?.dataKey??null}let{k:o,b:s}=i?this.#Pe():this.#Ne(),c=i?t:n,l=null,u=1/0;return r.forEach((t,n)=>{let r=(this.#E==null?this.#x.get(t.dataKey):this.#E.upper[n])?.[e]??NaN;if(Number.isNaN(r))return;let i=Math.abs(r*o+s-c);i<u&&(u=i,l=t.dataKey)}),l}#et(e,t){let n=e==null||this.#m===0?null:Math.min(Math.max(0,e),this.#m-1),r=this.#ie!==void 0;if(t.notify&&n!==this.#Ye()){let e=n==null?null:this.#Xe(n);if(this.#i.onActiveIndexChange?.(e),r){this.#ae={index:e,viaKeyboard:t.viaKeyboard};return}}this.#oe=t.viaKeyboard,r||(this.#re=n),this.#it(),this.#Ee()}#tt=null;#nt=!1;#rt=null;#it(e={force:!1}){let t=this.#Ye();if(!e.force&&t===this.#tt&&this.#oe===this.#nt&&this.#ne===this.#rt)return;if(this.#tt=t,this.#nt=this.#oe,this.#rt=this.#ne,t==null||this.#m===0){this.#n.publishHover(null);return}let n=this.#Xe(t),r=this.#p[n]??{},i=this.#n.seriesMeta().map(e=>{let n=this.#x.get(e.dataKey)?.[t]??NaN;return{dataKey:e.dataKey,label:e.label,value:Number.isNaN(n)?null:n,color:e.color}});this.#r.stacked&&i.reverse(),this.#e===`scatter`&&(i=this.#ne==null?i.filter(e=>e.value!=null):i.filter(e=>e.dataKey===this.#ne));let a={index:n,xValue:this.#g[t]??``,datum:r,points:i,viaKeyboard:this.#oe};if(this.#xe()){let e=this.#W[t]??NaN;a.zValue=Number.isNaN(e)?null:e}this.#n.publishHover(a)}#at(e,t,n){let r=this.#V;if(r==null||this.#m===0||t.length===0)return null;if(this.#xe())return this.#ot(e,t);let i=this.#Fe(),a=t.map(e=>{let t=this.#He(e,`value`),n=[];for(let e=0;e<this.#m;e++)Number.isNaN(t[e]??NaN)||n.push(e);return n}),o=a.reduce((e,t)=>e+t.length,0);return t.forEach((t,s)=>{let c=this.#He(t,`value`),l=a[s]??[];e.save(),e.globalAlpha=this.#Ue(t.dataKey),Ge(e,{color:r.series.get(t.dataKey)??`currentColor`,surface:r.chrome.surface,shape:t.shape,totalPointCount:o,indexes:l,xAt:e=>(this.#h[e]??0)*i.k+i.b,yAt:e=>(c[e]??0)*n.k+n.b,radiusAt:()=>4}),e.restore()}),null}#ot(e,t){let n=this.#V;if(n==null)return null;let r=this.#H,i=V(this.#K),a=r.left+r.width/2,o=r.top+r.height/2,s=this.#J.values(),c=s[0]??1,l=s[1]??1,u=.85-.22*c-.11*l,d=Math.min(r.width,r.height)/2*u,f=this.#O.values(),p=[f[0]??0,f[1]??1],m=this.#D.values(),h=[m[0]??0,m[1]??1],g=this.#G,_=t.map(e=>this.#Ue(e.dataKey)),v=this.#J.values(),y=v[0]??1,b=v[1]??1,x=(e,t,n)=>{let r=me(e,t,n,i);return{x:a+r.x*d,y:o-r.y*d}},S=_e.map(([e,t,n])=>x(e,t,n)),C=t[0],w=t.length===1&&C!=null?C.dataKey:`y`,T=[{label:this.#r.xKey,alpha:1,from:x(-1,-y,-b),to:x(1,-y,-b)},{label:w,alpha:y,from:x(-1,-1,-b),to:x(-1,1,-b)},{label:this.#r.zKey??`z`,alpha:b,from:x(-1,-y,-1),to:x(-1,-y,1)}];qe(e,{gridColor:n.chrome.grid,axisColor:n.chrome.baseline,corners:S,edges:ve,cubeAlpha:b,axes:T});let E=this.#m*t.length,D=this.#Z;(D==null||D.screenX.length<E)&&(D={screenX:new Float64Array(E),screenY:new Float64Array(E),radius:new Float64Array(E),seriesIndex:new Int32Array(E),pointIndex:new Int32Array(E),depths:new Float64Array(E),count:0});let O=D.depths,k=0;t.forEach((e,t)=>{let n=this.#He(e,`value`);for(let e=0;e<this.#m;e++){let r=n[e]??NaN,s=this.#W[e]??NaN;if(Number.isNaN(r)||Number.isNaN(s))continue;let c=me(ge(this.#h[e]??0,p),ge(r,h)*y,ge(s,g)*b,i);D.screenX[k]=a+c.x*d,D.screenY[k]=o-c.y*d,D.radius[k]=4*c.scale,D.seriesIndex[k]=t,D.pointIndex[k]=e,O[k]=c.depth,k+=1}}),D.count=k,this.#Z=D,this.#Q.length<k&&(this.#Q=new Int32Array(E));let A=this.#Q.subarray(0,k);for(let e=0;e<k;e++)A[e]=e;return A.sort((e,t)=>(O[t]??0)-(O[e]??0)),Ke(e,{count:k,order:A,screenX:D.screenX,screenY:D.screenY,radius:D.radius,colorAt:e=>{let r=t[D.seriesIndex[e]??0];return r==null?`currentColor`:n.series.get(r.dataKey)??`currentColor`},shapeAt:e=>t[D.seriesIndex[e]??0]?.shape??`circle`,alphaAt:e=>_[D.seriesIndex[e]??0]??1,surface:n.chrome.surface}),{center:{x:a,y:o},axes:T}}#st(e,t){let n=this.#n.seriesSpecs(),r=576,i=null;if(this.#xe()){let a=this.#Z;if(a==null)return null;for(let o=0;o<a.count;o++){let s=(a.screenX[o]??0)-e,c=(a.screenY[o]??0)-t,l=s*s+c*c;if(l<r){let e=n[a.seriesIndex[o]??0];if(e==null)continue;r=l,i={seriesKey:e.dataKey,index:a.pointIndex[o]??0,screenX:a.screenX[o]??0,screenY:a.screenY[o]??0}}}return i}let a=this.#Fe(),o=this.#Ne();for(let s of n){let n=this.#x.get(s.dataKey);if(n!=null)for(let c=0;c<this.#m;c++){let l=n[c]??NaN;if(Number.isNaN(l))continue;let u=(this.#h[c]??0)*a.k+a.b,d=l*o.k+o.b,f=u-e,p=d-t,m=f*f+p*p;m<r&&(r=m,i={seriesKey:s.dataKey,index:c,screenX:u,screenY:d})}}return i}#ct(e){let t=this.#n.seriesSpecs();if(this.#xe()){let t=this.#Z;if(t==null)return null;for(let n=0;n<t.count;n++)if((t.pointIndex[n]??-1)===e)return{x:t.screenX[n]??0,y:t.screenY[n]??0};return null}let n=this.#Fe(),r=this.#Ne();for(let i of t){let t=this.#x.get(i.dataKey)?.[e]??NaN;if(!Number.isNaN(t))return{x:(this.#h[e]??0)*n.k+n.b,y:t*r.k+r.b}}return null}#lt(){let{crosshair:e,band:t,markers:n,tooltip:r}=this.#t,i=this.#Ye(),a=i!=null&&this.#m>0,o=this.#e===`bar`,s=this.#e===`scatter`;if(e.style.opacity=a&&!o&&!s?`1`:`0`,t.style.opacity=a&&o?`1`:`0`,n.style.opacity=a&&!o?`1`:`0`,r.style.opacity=a?`1`:`0`,!a)return;let c=this.#H;if(s){let e=this.#te??this.#ct(i);if(e==null){n.style.opacity=`0`,r.style.opacity=`0`;return}for(;n.children.length>1;)n.lastElementChild?.remove();n.children.length===0&&n.appendChild(ct(n.ownerDocument));let t=n.children[0];if(t instanceof HTMLElement){let n=this.#n.seriesMeta(),r=this.#ne==null?n.find(e=>{let t=this.#x.get(e.dataKey)?.[i]??NaN;return!Number.isNaN(t)}):n.find(e=>e.dataKey===this.#ne);t.style.opacity=`1`,lt(t,r?.shape??`circle`,r?.color??`currentColor`),t.style.transform=`translate3d(${e.x}px, ${e.y}px, 0)`}this.#ut(e.x,e.y);return}let l=this.#Ie(i),u=this.#Se();if(o){let e=this.#U;if(e!=null){let n=W(e,i)-(e.step-e.bandwidth)/2;u?(t.style.transform=`translate3d(${c.left}px, ${n}px, 0)`,t.style.width=`${c.width}px`,t.style.height=`${Math.max(e.step,24)}px`):(t.style.transform=`translate3d(${n}px, ${c.top}px, 0)`,t.style.width=`${Math.max(e.step,24)}px`,t.style.height=`${c.height}px`)}}else{e.style.transform=`translate3d(${l}px, ${c.top}px, 0)`,e.style.height=`${c.height}px`;let t=this.#n.seriesMeta(),r=this.#n.seriesSpecs();for(;n.children.length>t.length;)n.lastElementChild?.remove();for(;n.children.length<t.length;)n.appendChild(ct(n.ownerDocument));let a=this.#Ne();t.forEach((e,t)=>{let o=n.children[t];if(!(o instanceof HTMLElement))return;let s=this.#x.get(e.dataKey)?.[i]??NaN,c=r[t],u=c==null?NaN:this.#He(c,this.#E==null?`value`:`upper`)[i]??NaN;if(Number.isNaN(s)||Number.isNaN(u)){o.style.opacity=`0`;return}o.style.opacity=`1`,lt(o,e.shape,e.color),o.style.transform=`translate3d(${l}px, ${u*a.k+a.b}px, 0)`})}o&&u&&this.#U!=null?this.#ut(this.#se??c.left+c.width/2,G(this.#U,i)):this.#ut(l,this.#ce??c.top+8)}#ut(e,t){let n=this.#H,r=this.#t.tooltip,i=this.#le,a=e+12;a+i.width>n.left+n.width&&e-12-i.width>=n.left&&(a=e-12-i.width);let o=Math.min(Math.max(n.top,t-i.height/2),n.top+n.height-i.height);r.style.transform=`translate3d(${a}px, ${Math.max(n.top,o)}px, 0)`}};const at=e=>e===3?{yaw:.65,pitch:-.35}:{yaw:0,pitch:0},ot=(e,t,n,r)=>{for(let t of e.values())t.target=0;for(let n of t){let t=e.get(n.key);t==null?e.set(n.key,{alpha:+!!r,target:1,text:n.text}):(t.target=1,t.text=n.text)}let i=1-.84**(n/16.67),a=1-.88**(n/16.67),o=!1;for(let[t,n]of e){if(r)n.alpha=n.target;else{let e=n.target>n.alpha?i:a;n.alpha+=(n.target-n.alpha)*e}if(n.target===1&&n.alpha>.98&&(n.alpha=1),n.target===0&&n.alpha<.03){e.delete(t);continue}n.alpha!==n.target&&(o=!0)}return o},st={circle:`circle(50%)`,square:`inset(8%)`,triangle:`polygon(50% 0%, 100% 100%, 0% 100%)`,diamond:`polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)`},ct=e=>{let t=e.createElement(`div`);t.setAttribute(`data-slot`,`chart-active-point`),t.style.position=`absolute`,t.style.width=`12px`,t.style.height=`12px`,t.style.left=`-6px`,t.style.top=`-6px`;let n=e.createElement(`div`);n.style.position=`absolute`,n.style.inset=`0`,n.style.backgroundColor=`var(--background-color-card)`;let r=e.createElement(`div`);return r.style.position=`absolute`,r.style.inset=`2px`,t.appendChild(n),t.appendChild(r),t},lt=(e,t,n)=>{let r=st[t];e.setAttribute(`data-shape`,t);let[i,a]=e.children;i instanceof HTMLElement&&(i.style.clipPath=r),a instanceof HTMLElement&&(a.style.clipPath=r,a.style.backgroundColor=n)},ut=(e,t)=>e instanceof Date?e.getTime():typeof e==`number`?e:t&&typeof e==`string`?new Date(e).getTime():NaN,dt=(e,t)=>({columnCount:e.columnCount,hasData:e.hasData,minValue:new Float64Array(e.columnCount).fill(t),maxValue:new Float64Array(e.columnCount).fill(t),inValue:new Float64Array(e.columnCount).fill(t),outValue:new Float64Array(e.columnCount).fill(t)}),X=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),ft=e=>e instanceof Date?Number.isNaN(e.getTime())?`—`:e.toISOString():typeof e==`number`?Number.isFinite(e)?String(e):`—`:typeof e==`string`?X(e):`—`,pt=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,mt=e=>`| ${e.join(` | `)} |`,ht=({data:e,xKey:t,series:n,zKey:r})=>{let i=[X(t),...n.map(e=>X(e.label)),...r==null?[]:[X(r)]],a=e.map(e=>[ft(E(e,t)),...n.map(t=>pt(E(e,t.dataKey))),...r==null?[]:[pt(E(e,r))]]);return[mt(i),mt(i.map(()=>`---`)),...a.map(e=>mt(e))].join(`
|
|
2
|
+
`)},gt=(e,t)=>e==null?`var(${k(t)})`:O(e)?`var(${k(e)})`:e;var _t=class{#e=new Set;#t={series:[],hover:null,grid:null,xAxis:null,yAxis:null,referenceLines:[],tooltip:null,orientation:`vertical`};#n=new Map;#r=new Map;#i=new Map;#a=new Set;#o=0;#s=0;#c=null;#l=`vertical`;#u=null;#d=null;#f=new Map;#p=new Map;#m=null;#h=null;onSeriesChange=null;onPresentationChange=null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#t;seriesSpecs(){return[...this.#n.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec)}slotFor(e){let t=this.#i.get(e);if(t!=null)return t;for(;this.#s<A.length&&this.#a.has(A[this.#s]??`chart-other`);)this.#s+=1;let n=A[this.#s]??`chart-other`;return this.#s<A.length&&(this.#s+=1),this.#i.set(e,n),this.#a.add(n),n}#g({token:e,pinnedBy:t}){for(let[n,r]of this.#i)if(r===e&&n!==t&&this.#n.get(n)?.spec.color!==e){this.#i.delete(n),this.slotFor(n);return}}registerSeries(e){let t=this.#r.get(e.dataKey)??this.#o++;return this.#r.set(e.dataKey,t),e.color==null?this.slotFor(e.dataKey):O(e.color)&&e.color!==`chart-other`&&(this.#a.add(e.color),this.#g({token:e.color,pinnedBy:e.dataKey})),this.#n.set(e.dataKey,{spec:e,sequence:t}),this.#_({seriesChanged:!0}),()=>{this.#n.get(e.dataKey)?.spec===e&&(this.#n.delete(e.dataKey),this.#_({seriesChanged:!0}))}}setOrientation(e){this.#l!==e&&(this.#l=e,this.#_())}registerGrid(e){let t={lines:e};return this.#c=t,this.#_(),()=>{this.#c===t&&(this.#c=null,this.#_())}}registerXAxis(e){return this.#u=e,this.#_(),()=>{this.#u===e&&(this.#u=null,this.#_())}}registerYAxis(e){return this.#d=e,this.#_(),()=>{this.#d===e&&(this.#d=null,this.#_())}}registerReferenceLine(e,t){let n=this.#p.get(e)??this.#o++;return this.#p.set(e,n),this.#f.set(e,{spec:t,sequence:n}),this.#_(),()=>{this.#f.get(e)?.spec===t&&(this.#f.delete(e),this.#_())}}registerTooltip(e){return this.#m=e,this.#_(),()=>{this.#m===e&&(this.#m=null,this.#_())}}publishHover(e){this.#h!==e&&(this.#h=e,this.#t={...this.#t,hover:e},this.#v())}seriesMeta(){return this.seriesSpecs().map(e=>({dataKey:e.dataKey,label:e.label,mark:e.mark,color:gt(e.color,this.#i.get(e.dataKey)??`chart-other`),colorInput:e.color??this.#i.get(e.dataKey)??`chart-other`,shape:e.shape,texture:e.texture}))}#_(e={seriesChanged:!1}){this.#t={series:this.seriesMeta(),hover:this.#h,grid:this.#c,xAxis:this.#u,yAxis:this.#d,referenceLines:[...this.#f.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),tooltip:this.#m,orientation:this.#l},this.#v(),e.seriesChanged?this.onSeriesChange?.():this.onPresentationChange?.()}#v(){for(let e of this.#e)e()}};const vt=a(null),Z=e=>{let t=o(vt);return m(t,`${e} must be composed inside ${e.split(`.`)[0]}.Root — it registers into the chart it belongs to and renders nothing on its own.`),t},Q=e=>p(e.subscribe,e.getSnapshot,e.getSnapshot),yt=(e,t)=>{for(let n of e){let e=E(n,t);if(e!=null)return e instanceof Date?`time`:typeof e==`number`?`linear`:`point`}return`point`},bt=[`auto`,`auto`],xt=({kind:r,componentName:i,slotName:a,data:o,xKey:s,xScale:p,zKey:v,dimensions:y=3,yDomain:b=bt,stacked:x=!1,orientation:S=`vertical`,animate:C=!0,pending:w=!1,decorative:T=!1,activeIndex:D,onActiveIndexChange:O,onDatumActivate:k,className:A,children:j,ref:M,"data-slot":ee,"aria-label":te,"aria-labelledby":ne,"aria-hidden":re,tabIndex:ie,...ae})=>{let[N]=f(()=>new _t),P=d(null),[F]=f(()=>({kind:r,componentName:i,store:N,engineRef:P,dataRef:{current:{data:o,xKey:s,zKey:v}}}));l(()=>{F.dataRef.current={data:o,xKey:s,zKey:v}},[F,o,s,v]);let I=d(null),oe=e(I,M),se=d(null),ce=d(null),le=d(null),L=d(null),R=d(null),ue=d(null),de=c(),z=r===`bar`?`band`:p??yt(o,s);m(r!==`scatter`||o.length===0||z!==`point`,`${i}.Root requires numeric or Date x values — the "${s}" values are not numbers or dates, so they have no position on a continuous scatter axis.`);let[pe,B]=b,V=u(()=>{for(let e of o){let t=E(e,s);if(t instanceof Date&&fe(t))return!0}return!1},[o,s]);return l(()=>{let e=I.current,t=se.current,n=ce.current,i=le.current,a=L.current,o=R.current,s=ue.current;if(e==null||t==null||n==null||i==null||a==null||o==null||s==null)return;let c=new it({kind:r,store:N,elements:{root:e,plot:t,canvas:n,crosshair:i,band:a,markers:o,tooltip:s}});return P.current=c,()=>{P.current=null,c.destroy()}},[r,N]),l(()=>{P.current?.setOptions({xKey:s,xScale:z,yDomain:[pe,B],zKey:v??null,dimensions:y,stacked:x,orientation:S,animate:C}),N.setOrientation(S)},[N,s,z,pe,B,v,y,x,S,C]),l(()=>{P.current?.setRows(o)},[o]),l(()=>{P.current?.setCallbacks(T?{onDatumActivate:null,onActiveIndexChange:null}:{onDatumActivate:k??null,onActiveIndexChange:O??null})}),l(()=>{P.current?.setControlledActiveIndex(T?void 0:D)},[T,D]),l(()=>{P.current?.flushIngest()}),g(`div`,{"data-slot":n(ee,a),className:t(`relative flex aspect-video w-full flex-col`,A),"aria-hidden":T?!0:re,tabIndex:T?void 0:ie,ref:oe,...ae,children:_(vt.Provider,{value:F,children:[_(`div`,{"data-slot":`${a}-plot`,className:t(`relative min-h-0 w-full flex-1`,w&&`opacity-60 transition-opacity duration-300`),ref:se,children:[g(`canvas`,{"data-slot":`${a}-canvas`,ref:ce,"aria-hidden":!0,className:`absolute inset-0 size-full`}),T?null:_(h,{children:[g(`div`,{role:`application`,"aria-label":te,"aria-labelledby":ne,"aria-describedby":de,tabIndex:0,className:t(`focus-visible:ring-focus-accent absolute inset-0 rounded-sm outline-none focus-visible:ring-2`,(r===`line`||r===`area`)&&`cursor-crosshair`,r===`scatter`&&v!=null&&`touch-none cursor-grab active:cursor-grabbing`),onPointerDown:e=>{e.isTrusted&&r===`scatter`&&v!=null&&e.currentTarget.setPointerCapture(e.pointerId),P.current?.handlePointerDown(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerMove:e=>{P.current?.handlePointerMove(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerUp:e=>{P.current?.handlePointerUp(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerLeave:()=>{P.current?.handlePointerLeave()},onPointerCancel:()=>{P.current?.handlePointerLeave()},onBlur:()=>{P.current?.handlePointerLeave()},onKeyDown:e=>{P.current?.handleKeyDown(e.key)&&e.preventDefault()}}),g(`span`,{id:de,className:`sr-only`,children:`Use the left and right arrow keys to move between data points, Home and End to jump to the first and last, and Enter to activate the current point.`})]}),g(`div`,{ref:le,"aria-hidden":!0,className:`bg-neutral-500 pointer-events-none absolute left-0 top-0 w-px opacity-0`}),g(`div`,{ref:L,"aria-hidden":!0,className:`bg-neutral-500/10 pointer-events-none absolute left-0 top-0 rounded-sm opacity-0`}),g(`div`,{ref:R,"aria-hidden":!0,className:`pointer-events-none absolute inset-0 opacity-0`}),g(kt,{slotName:a,store:N,tooltipRef:ue,xHasTimeOfDay:V})]}),j,T?null:_(h,{children:[g(Ft,{store:N,xHasTimeOfDay:V}),g(It,{data:o,label:te,slotName:a,store:N,xHasTimeOfDay:V,xKey:s,zKey:v})]})]})})},St=(e,t,n)=>{let r=Z(e);m(r.kind===t,`${e} cannot be composed inside ${r.componentName}.Root — compose ${r.componentName} series parts instead.`);let{dataKey:i,label:a,color:o,curve:s=`linear`,markers:c=!1,connectNulls:u=!1,shape:d=`circle`,texture:f=`solid`}=n;return l(()=>r.store.registerSeries({dataKey:i,label:a??i,color:o,mark:t,curve:s,markers:c,connectNulls:u,shape:d,texture:f}),[r.store,i,a,o,t,s,c,u,d,f]),null},Ct=(e,t)=>{let n=Z(e),{lines:r}=t;return l(()=>n.store.registerGrid(r),[n.store,r]),null},wt=(e,t)=>{let n=Z(e),{tickFormat:r,tickCount:i}=t;return l(()=>n.store.registerXAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},Tt=(e,t)=>{let n=Z(e),{tickFormat:r,tickCount:i}=t;return l(()=>n.store.registerYAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},Et=(e,t)=>{let n=Z(e),r=c(),{y:i,label:a,color:o}=t;return l(()=>n.store.registerReferenceLine(r,{y:i,label:a,color:o}),[n.store,r,i,a,o]),null},Dt=(e,t)=>{let n=Z(e),{labelFormat:r,valueFormat:i,indicator:a=`line`,footer:o,children:s,...c}=t;return l(()=>n.store.registerTooltip({labelFormat:r,valueFormat:i,indicator:a,footer:o,children:s,divProps:c})),null},Ot=(e,t,n)=>e==null?`—`:n==null?L(e):n(e,t),kt=({slotName:n,store:r,tooltipRef:i,xHasTimeOfDay:a})=>{let o=Q(r),s=o.tooltip,c=o.hover,{className:u,ref:f,style:p,...m}=s?.divProps??{},v=d(null),y=e(i,v);l(()=>{if(f==null)return;let e=v.current;if(typeof f==`function`){let t=f(e);return()=>{typeof t==`function`?t():f(null)}}return f.current=e,()=>{f.current=null}},[f]);let b=s?.footer;return g(`div`,{"data-slot":`${n}-tooltip`,ref:y,className:t(`bg-popover border-popover text-strong pointer-events-none absolute left-0 top-0 z-10 min-w-32 rounded-md border px-2.5 py-1.5 text-xs shadow-md`,u),style:{opacity:0,...p},...m,children:c==null?null:s?.children==null?_(h,{children:[g(`div`,{className:`text-muted font-medium`,children:s?.labelFormat==null?z(c.xValue,{datasetHasTimeOfDay:a}):s.labelFormat(c.xValue)}),g(`div`,{className:`mt-1 grid gap-1`,children:c.points.map(e=>_(`div`,{className:`flex items-center gap-1.5`,children:[s?.indicator===`none`?null:g(`span`,{"aria-hidden":!0,className:`h-2.5 w-0.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),g(`span`,{className:`text-muted`,children:e.label}),g(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:Ot(e.value,e.dataKey,s?.valueFormat)})]},e.dataKey))}),c.zValue===void 0?null:_(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[g(`span`,{className:`text-muted`,children:`z`}),g(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:c.zValue==null?`—`:L(c.zValue)})]}),b==null?null:g(`div`,{className:`text-muted mt-1`,children:typeof b==`function`?b(c):b})]}):s.children(c)})},$=(e,t,n=3)=>`repeating-linear-gradient(${e}, ${t} 0, ${t} 1px, transparent 1px, transparent ${n}px)`,At=`forced-color-adjust-none [print-color-adjust:exact] [-webkit-print-color-adjust:exact]`,jt=(e,t,n)=>{if(e===`solid`)return{};let r=N(t);return e===`hatch`?{backgroundImage:$(`135deg`,r)}:e===`hatch-reverse`?{backgroundImage:$(`45deg`,r)}:e===`crosshatch`?{backgroundImage:`${$(`135deg`,r,4)}, ${$(`45deg`,r,4)}`}:e===`perpendicular`?{backgroundImage:$(n===`horizontal`?`90deg`:`0deg`,r)}:{backgroundImage:`radial-gradient(circle at 1px 1px, ${r} 0.75px, transparent 0.8px)`,backgroundSize:`3px 3px`}},Mt=({series:e,orientation:n})=>e.mark===`bar`?g(`span`,{"aria-hidden":!0,"data-texture":e.texture,className:t(`size-2 shrink-0 rounded-[2px]`,At),style:{backgroundColor:e.color,...jt(e.texture,e.color,n)}}):e.mark===`line`?_(`span`,{"aria-hidden":!0,className:`relative flex h-2 w-3 shrink-0 items-center justify-center`,children:[g(`span`,{className:t(`absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full`,At),style:{backgroundColor:e.color}}),g(`span`,{"data-shape":e.shape,className:t(`relative size-2`,At),style:{backgroundColor:e.color,clipPath:st[e.shape]}})]}):g(`span`,{"aria-hidden":!0,"data-shape":e.shape,className:t(`size-2 shrink-0`,At),style:{backgroundColor:e.color,clipPath:st[e.shape]}}),Nt=({partName:e,slotName:n,className:r,children:i,...a})=>{let o=Z(e),s=Q(o.store);return s.series.length<2?null:g(`div`,{"data-slot":`${n}-legend`,className:t(`text-muted flex flex-wrap items-center gap-x-4 gap-y-1 pt-3 text-xs`,r),...a,children:i==null?s.series.map(e=>_(`div`,{className:`flex items-center gap-1.5`,children:[g(Mt,{series:e,orientation:s.orientation}),e.label]},e.dataKey)):i(s.series)})},Pt=({partName:e,slotName:t,label:n=`Copy data as Markdown`,onCopy:a,onCopyError:o,onClick:c,ref:l,...u})=>{let p=Z(e),m=i(),[h,_]=f(!1),b=d(void 0);return s(()=>()=>{b.current!=null&&clearTimeout(b.current)},[]),g(r,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":`${t}-copy-button`,label:n,icon:g(h?v:y,{}),ref:l,onClick:async e=>{try{if(c?.(e),e.defaultPrevented){b.current!=null&&(clearTimeout(b.current),b.current=void 0),_(!1);return}let{data:t,xKey:n,zKey:r}=p.dataRef.current,i=ht({data:t,xKey:n,zKey:r,series:p.store.getSnapshot().series});await m(i),a?.(i),_(!0),b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{_(!1)},2e3)}catch(e){o?.(e)}},...u})},Ft=({store:e,xHasTimeOfDay:t})=>{let n=Q(e),[r,i]=f(``),a=n.hover;return s(()=>{if(a==null||!a.viaKeyboard){i(``);return}let e=a.points.map(e=>`${e.label}: ${e.value==null?`no data`:L(e.value)}`).join(`, `),n=a.zValue===void 0?``:`, z: ${a.zValue==null?`no data`:L(a.zValue)}`,r=setTimeout(()=>{i(`${z(a.xValue,{datasetHasTimeOfDay:t})}. ${e}${n}`)},120);return()=>clearTimeout(r)},[a,t]),g(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:r})},It=({data:e,label:t,slotName:n,store:r,xHasTimeOfDay:i,xKey:a,zKey:o})=>{let s=Q(r);if(e.length===0||s.series.length===0)return null;let c=e.slice(0,150);return g(`div`,{className:`sr-only`,"data-slot":`${n}-data-table`,children:_(`table`,{children:[g(`caption`,{children:`${t==null?`Chart data`:`${t} — chart data`}${e.length>150?`. Showing the first 150 of ${e.length} rows.`:`.`}`}),g(`thead`,{children:_(`tr`,{children:[g(`th`,{scope:`col`,children:a}),s.series.map(e=>g(`th`,{scope:`col`,children:e.label},e.dataKey)),o==null?null:g(`th`,{scope:`col`,children:o})]})}),g(`tbody`,{children:c.map((e,t)=>{let n=E(e,a),r=n instanceof Date&&!Number.isNaN(n.getTime()),c=typeof n==`string`||typeof n==`number`||n instanceof Date?z(n,{datasetHasTimeOfDay:i}):String(n);return _(`tr`,{children:[g(`th`,{scope:`row`,"data-value":typeof n==`number`&&Number.isFinite(n)?n:void 0,children:r?g(`time`,{dateTime:n.toISOString(),children:c}):c}),s.series.map(t=>{let n=E(e,t.dataKey),r=typeof n==`number`&&Number.isFinite(n);return g(`td`,{"data-value":r?n:void 0,children:r?L(n):`—`},t.dataKey)}),o==null?null:(()=>{let t=E(e,o),n=typeof t==`number`&&Number.isFinite(t);return g(`td`,{"data-value":n?t:void 0,children:n?L(t):`—`})})()]},t)})})]})})};export{Et as a,wt as c,Ct as i,Tt as l,Nt as n,St as o,xt as r,Dt as s,Pt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./clsx-DUGZgXfJ.js";import{a as n,r}from"./field-Bpptk_9t.js";import{useEffect as i,useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";const c=e=>e===`indeterminate`,l=({"aria-invalid":l,className:u,checked:d,defaultChecked:f,defaultValue:p=`on`,onClick:m,readOnly:h,ref:g,validation:_,...v})=>{let y=a(null),[b]=o(f),x=n(),{ariaInvalid:S,validation:C}=r({"aria-invalid":l,validation:_??x}),w=d??b;i(()=>{y.current&&(y.current.indeterminate=c(w))},[w]);let T=d==null?{defaultChecked:c(b)?void 0:b}:{checked:!c(d)&&d};return s(`input`,{"aria-checked":c(d)?`mixed`:d,"aria-invalid":S,"data-slot":`checkbox`,className:t(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-validation-success:border-success-600 data-validation-success:checked:bg-success-600 data-validation-success:indeterminate:bg-success-600 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-600 data-validation-warning:indeterminate:bg-warning-600 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-600 data-validation-error:indeterminate:bg-danger-600 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger`,`where:block where:size-4 where:p-0`,u),...T,"data-validation":C||void 0,defaultValue:p,onClick:e=>{if(h){e.preventDefault();return}m?.(e)},readOnly:h,ref:e(y,g),type:`checkbox`,...v})};function u({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{u as n,l as t};
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import { o as WithValidation } from "./
|
|
1
|
+
import { o as WithValidation } from "./field-7QeiTFwl.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
//#region src/components/checkbox/checkbox.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The tri-state checked value of a {@link Checkbox}: `true` (checked),
|
|
6
|
+
* `false` (unchecked), or `"indeterminate"` (partially checked).
|
|
7
|
+
*
|
|
8
|
+
* @see https://mantle.ngrok.com/components/forms/checkbox
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const checked: CheckedState = "indeterminate";
|
|
13
|
+
* <Checkbox checked={checked} onChange={handleChange} />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
4
16
|
type CheckedState = boolean | "indeterminate";
|
|
5
17
|
type Props = Omit<ComponentProps<"input">, "type" | "checked" | "defaultChecked"> & WithValidation & {
|
|
6
18
|
/**
|
package/dist/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./checkbox-
|
|
1
|
+
import{n as e,t}from"./checkbox-0EoxOyMA.js";export{t as Checkbox,e as selectAllChecked};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{t as n}from"./field-B1wqeZr4.js";import{t as r}from"./label-D-D11mlp.js";import{cloneElement as i,createContext as a,isValidElement as o,useContext as s,useId as c,useMemo as l}from"react";import u from"tiny-invariant";import{jsx as d}from"react/jsx-runtime";const f=a(null);function p(e){let t=s(f);return u(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const m={Root:({"aria-describedby":t,"aria-errormessage":r,"aria-invalid":i,children:a,className:o,disabled:u=!1,id:p,name:m,ref:h,...g})=>{let _=s(n),v=_?.id,y=_?.name,b=_?.[`aria-describedby`],x=_?.[`aria-invalid`],S=_?.[`aria-errormessage`],C=c(),w=c(),T=v??p??C,E=[b??t,w].filter(Boolean).join(` `)||void 0,D=l(()=>({controlId:T,descriptionId:w,disabled:u,controlProps:{id:T,name:y??m,disabled:u,"aria-describedby":E,"aria-invalid":x??i,"aria-errormessage":S??r}}),[T,w,u,E,y,m,x,i,S,r]);return d(f.Provider,{value:D,children:d(`div`,{ref:h,"data-slot":`choice`,className:e(`flex w-full items-start gap-2`,o),...g,children:a})})},Indicator:({children:t,className:n,ref:r,...a})=>{let{controlProps:s}=p(`Indicator`),c=o(t)?i(t,{...s,disabled:s.disabled||t.props.disabled===!0,name:s.name??t.props.name,"aria-invalid":s[`aria-invalid`]??t.props[`aria-invalid`],"aria-errormessage":s[`aria-errormessage`]??t.props[`aria-errormessage`]}):t;return d(`span`,{ref:r,"data-slot":`choice-indicator`,className:e(`flex h-lh shrink-0 items-center text-sm`,n),...a,children:c})},Content:({asChild:n,className:r,ref:i,...a})=>d(n?t:`div`,{ref:i,"data-slot":`choice-content`,className:e(`flex min-w-0 flex-1 flex-col gap-0.5`,r),...a}),Label:({className:t,ref:n,...i})=>{let{controlId:a,disabled:o}=p(`Label`);return d(r,{ref:n,"data-slot":`choice-label`,className:e(o&&`opacity-50`,t),...i,htmlFor:a,disabled:o})},Title:({asChild:n,className:r,ref:i,...a})=>{let{disabled:o}=p(`Title`);return d(n?t:`p`,{ref:i,"data-slot":`choice-title`,className:e(`text-strong text-sm font-medium font-sans`,o&&`opacity-50`,r),...a})},Description:({asChild:n,className:r,ref:i,...a})=>{let{descriptionId:o,disabled:s}=p(`Description`);return d(n?t:`p`,{ref:i,id:o,"data-slot":`choice-description`,className:e(`text-body text-sm leading-4`,s&&`opacity-50`,r),...a})}};export{m as t};
|
|
@@ -61,10 +61,7 @@ type ChoiceRootProps = Omit<ComponentProps<"div">, "id"> & {
|
|
|
61
61
|
* </Choice.Root>
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
declare const Root: {
|
|
65
|
-
({ "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, children, className, disabled, id, name, ref, ...props }: ChoiceRootProps): import("react").JSX.Element;
|
|
66
|
-
displayName: string;
|
|
67
|
-
};
|
|
64
|
+
declare const Root: ({ "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, children, className, disabled, id, name, ref, ...props }: ChoiceRootProps) => import("react").JSX.Element;
|
|
68
65
|
type ChoiceIndicatorProps = ComponentProps<"span">;
|
|
69
66
|
/**
|
|
70
67
|
* The left control slot of a `Choice` — drop the control here (a `Checkbox`, a
|
|
@@ -92,10 +89,7 @@ type ChoiceIndicatorProps = ComponentProps<"span">;
|
|
|
92
89
|
* </Choice.Root>
|
|
93
90
|
* ```
|
|
94
91
|
*/
|
|
95
|
-
declare const Indicator: {
|
|
96
|
-
({ children, className, ref, ...props }: ChoiceIndicatorProps): import("react").JSX.Element;
|
|
97
|
-
displayName: string;
|
|
98
|
-
};
|
|
92
|
+
declare const Indicator: ({ children, className, ref, ...props }: ChoiceIndicatorProps) => import("react").JSX.Element;
|
|
99
93
|
type ChoiceContentProps = ComponentProps<"div"> & WithAsChild;
|
|
100
94
|
/**
|
|
101
95
|
* The right column of a `Choice` — stacks a `Choice.Label` / `Choice.Title` over
|
|
@@ -117,10 +111,7 @@ type ChoiceContentProps = ComponentProps<"div"> & WithAsChild;
|
|
|
117
111
|
* </Choice.Root>
|
|
118
112
|
* ```
|
|
119
113
|
*/
|
|
120
|
-
declare const Content: {
|
|
121
|
-
({ asChild, className, ref, ...props }: ChoiceContentProps): import("react").JSX.Element;
|
|
122
|
-
displayName: string;
|
|
123
|
-
};
|
|
114
|
+
declare const Content: ({ asChild, className, ref, ...props }: ChoiceContentProps) => import("react").JSX.Element;
|
|
124
115
|
/**
|
|
125
116
|
* Props for `Choice.Label`. The mantle `Label` props, minus `htmlFor` and
|
|
126
117
|
* `disabled` — those are owned by `Choice.Root` (the control id and the choice's
|
|
@@ -181,10 +172,7 @@ declare const ChoiceLabel: ({ className, ref, ...props }: ChoiceLabelProps) => i
|
|
|
181
172
|
* </Choice.Root>
|
|
182
173
|
* ```
|
|
183
174
|
*/
|
|
184
|
-
declare const Title: {
|
|
185
|
-
({ asChild, className, ref, ...props }: ComponentProps<"p"> & WithAsChild): import("react").JSX.Element;
|
|
186
|
-
displayName: string;
|
|
187
|
-
};
|
|
175
|
+
declare const Title: ({ asChild, className, ref, ...props }: ComponentProps<"p"> & WithAsChild) => import("react").JSX.Element;
|
|
188
176
|
/**
|
|
189
177
|
* The de-emphasized supplementary line of a `Choice`, in the muted body color
|
|
190
178
|
* and wired to the control via `aria-describedby` (never a second label).
|
|
@@ -205,10 +193,7 @@ declare const Title: {
|
|
|
205
193
|
* </Choice.Root>
|
|
206
194
|
* ```
|
|
207
195
|
*/
|
|
208
|
-
declare const Description: {
|
|
209
|
-
({ asChild, className, ref, ...props }: ComponentProps<"p"> & WithAsChild): import("react").JSX.Element;
|
|
210
|
-
displayName: string;
|
|
211
|
-
};
|
|
196
|
+
declare const Description: ({ asChild, className, ref, ...props }: ComponentProps<"p"> & WithAsChild) => import("react").JSX.Element;
|
|
212
197
|
/**
|
|
213
198
|
* A reusable indicator-left / content-right layout for a single choice: a
|
|
214
199
|
* control (checkbox, radio, switch) beside an emphasized title and an optional
|
package/dist/choice.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ChoiceRootProps, t as Choice } from "./choice-
|
|
1
|
+
import { n as ChoiceRootProps, t as Choice } from "./choice-BNRQXszu.js";
|
|
2
2
|
export { Choice, type ChoiceRootProps };
|
package/dist/choice.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./choice-
|
|
1
|
+
import{t as e}from"./choice-BHwFSSyv.js";export{e as Choice};
|
package/dist/code-block.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as WithAsChild, t as SelfClosingWithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
-
import { t as SvgAttributes } from "./
|
|
3
|
-
import { A as FoldStrategy, B as computeJsonFoldRanges, C as Indentation, D as FoldExplanation, E as ComputeFoldRangesInput, F as isSupportedLanguage, H as finalizeFoldRanges, I as parseLanguage, L as supportedLanguages, M as computeFoldRanges, N as foldStrategyFor, O as FoldLine, P as SupportedLanguage, S as normalizeIndentation, T as isIndentation, U as LineRange, V as FoldableRange, _ as MantleCodeBlockValue, a as Mode, c as ResolvedPreRenderedCodeBlockProps, d as parseMetastring, f as resolvePreRenderedCodeBlockProps, g as parseCodeBlockShowLineNumbers, h as parseCodeBlockLineNumberStart, i as MetaInput, j as FoldToken, k as FoldScope, l as defaultMeta, m as parseCodeBlockHighlightLines, n as DefaultMeta, o as ResolvePreRenderedCodeBlockPropsInput, p as tokenizeMetastring, r as Meta, s as ResolvePreRenderedCodeBlockPropsResult, t as CodeBlockPreElementInput, u as normalizeValue, v as MantleCodeOptions, w as inferIndentation, x as mantleCode, y as createMantleCodeBlockValue, z as decorateHighlightedHtml } from "./
|
|
2
|
+
import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
|
|
3
|
+
import { A as FoldStrategy, B as computeJsonFoldRanges, C as Indentation, D as FoldExplanation, E as ComputeFoldRangesInput, F as isSupportedLanguage, H as finalizeFoldRanges, I as parseLanguage, L as supportedLanguages, M as computeFoldRanges, N as foldStrategyFor, O as FoldLine, P as SupportedLanguage, S as normalizeIndentation, T as isIndentation, U as LineRange, V as FoldableRange, _ as MantleCodeBlockValue, a as Mode, c as ResolvedPreRenderedCodeBlockProps, d as parseMetastring, f as resolvePreRenderedCodeBlockProps, g as parseCodeBlockShowLineNumbers, h as parseCodeBlockLineNumberStart, i as MetaInput, j as FoldToken, k as FoldScope, l as defaultMeta, m as parseCodeBlockHighlightLines, n as DefaultMeta, o as ResolvePreRenderedCodeBlockPropsInput, p as tokenizeMetastring, r as Meta, s as ResolvePreRenderedCodeBlockPropsResult, t as CodeBlockPreElementInput, u as normalizeValue, v as MantleCodeOptions, w as inferIndentation, x as mantleCode, y as createMantleCodeBlockValue, z as decorateHighlightedHtml } from "./code-block-B6OlZrSI.js";
|
|
4
4
|
import { ComponentProps, ReactNode } from "react";
|
|
5
5
|
import { Content, List, Trigger } from "@radix-ui/react-tabs";
|
|
6
6
|
//#region src/components/code-block/code-block.d.ts
|
|
@@ -28,6 +28,8 @@ type CodeBlockRootProps = Omit<ComponentProps<"div">, "align"> & WithAsChild & {
|
|
|
28
28
|
* For tabbed code blocks, pass `defaultTab` (uncontrolled) or `activeTab` / `onActiveTabChange`
|
|
29
29
|
* (controlled) to enable tab switching with `CodeBlock.TabList` and `CodeBlock.TabContent`.
|
|
30
30
|
*
|
|
31
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockroot
|
|
32
|
+
*
|
|
31
33
|
* @example
|
|
32
34
|
* ```tsx
|
|
33
35
|
* <CodeBlock.Root>
|
|
@@ -43,14 +45,13 @@ type CodeBlockRootProps = Omit<ComponentProps<"div">, "align"> & WithAsChild & {
|
|
|
43
45
|
* </CodeBlock.Root>
|
|
44
46
|
* ```
|
|
45
47
|
*/
|
|
46
|
-
declare const Root$1: {
|
|
47
|
-
({ asChild, className, defaultTab, activeTab, onActiveTabChange, ref, ...props }: CodeBlockRootProps): import("react").JSX.Element;
|
|
48
|
-
displayName: string;
|
|
49
|
-
};
|
|
48
|
+
declare const Root$1: ({ asChild, className, defaultTab, activeTab, onActiveTabChange, ref, ...props }: CodeBlockRootProps) => import("react").JSX.Element;
|
|
50
49
|
/**
|
|
51
50
|
* The body of the `CodeBlock`. This is where `CodeBlock.Code` and
|
|
52
51
|
* the optional `CodeBlock.CopyButton` are rendered.
|
|
53
52
|
*
|
|
53
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockbody
|
|
54
|
+
*
|
|
54
55
|
* @example
|
|
55
56
|
* ```tsx
|
|
56
57
|
* <CodeBlock.Root>
|
|
@@ -66,10 +67,7 @@ declare const Root$1: {
|
|
|
66
67
|
* </CodeBlock.Root>
|
|
67
68
|
* ```
|
|
68
69
|
*/
|
|
69
|
-
declare const Body: {
|
|
70
|
-
({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
71
|
-
displayName: string;
|
|
72
|
-
};
|
|
70
|
+
declare const Body: ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
|
|
73
71
|
type CodeBlockCodeProps = Omit<ComponentProps<"pre">, "children"> & {
|
|
74
72
|
/**
|
|
75
73
|
* The code value produced by `mantleCode("lang")` tagged template.
|
|
@@ -84,6 +82,8 @@ type CodeBlockCodeProps = Omit<ComponentProps<"pre">, "children"> & {
|
|
|
84
82
|
* `value["~preHtml"]` must be provided by Mantle's Vite plugin or server highlighter.
|
|
85
83
|
* Runtime highlighting and runtime line decoration are intentionally unsupported.
|
|
86
84
|
*
|
|
85
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockcode
|
|
86
|
+
*
|
|
87
87
|
* @example
|
|
88
88
|
* ```tsx
|
|
89
89
|
* <CodeBlock.Root>
|
|
@@ -99,14 +99,13 @@ type CodeBlockCodeProps = Omit<ComponentProps<"pre">, "children"> & {
|
|
|
99
99
|
* </CodeBlock.Root>
|
|
100
100
|
* ```
|
|
101
101
|
*/
|
|
102
|
-
declare const Code: {
|
|
103
|
-
({ className, style, value, ref, ...props }: CodeBlockCodeProps): import("react").JSX.Element;
|
|
104
|
-
displayName: string;
|
|
105
|
-
};
|
|
102
|
+
declare const Code: ({ className, style, value, ref, ...props }: CodeBlockCodeProps) => import("react").JSX.Element;
|
|
106
103
|
/**
|
|
107
104
|
* The (optional) header slot of the `CodeBlock`. This is where
|
|
108
105
|
* `CodeBlock.Icon` and `CodeBlock.Title` are rendered.
|
|
109
106
|
*
|
|
107
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockheader
|
|
108
|
+
*
|
|
110
109
|
* @example
|
|
111
110
|
* ```tsx
|
|
112
111
|
* <CodeBlock.Root>
|
|
@@ -122,14 +121,13 @@ declare const Code: {
|
|
|
122
121
|
* </CodeBlock.Root>
|
|
123
122
|
* ```
|
|
124
123
|
*/
|
|
125
|
-
declare const Header: {
|
|
126
|
-
({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
127
|
-
displayName: string;
|
|
128
|
-
};
|
|
124
|
+
declare const Header: ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
|
|
129
125
|
/**
|
|
130
126
|
* The (optional) title of the `CodeBlock`. Renders as `h3` by default;
|
|
131
127
|
* use `asChild` to render a different element.
|
|
132
128
|
*
|
|
129
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktitle
|
|
130
|
+
*
|
|
133
131
|
* @example
|
|
134
132
|
* ```tsx
|
|
135
133
|
* <CodeBlock.Root>
|
|
@@ -145,12 +143,9 @@ declare const Header: {
|
|
|
145
143
|
* </CodeBlock.Root>
|
|
146
144
|
* ```
|
|
147
145
|
*/
|
|
148
|
-
declare const Title: {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}): import("react").JSX.Element;
|
|
152
|
-
displayName: string;
|
|
153
|
-
};
|
|
146
|
+
declare const Title: ({ asChild, className, ref, ...props }: ComponentProps<"h3"> & {
|
|
147
|
+
asChild?: boolean;
|
|
148
|
+
}) => import("react").JSX.Element;
|
|
154
149
|
type CodeBlockCopyButtonProps = Omit<ComponentProps<"button">, "children" | "type"> & SelfClosingWithAsChild & {
|
|
155
150
|
/**
|
|
156
151
|
* The accessible label for the copy button. This label will be visually hidden but announced to screen reader users, similar to alt text for img tags.
|
|
@@ -171,6 +166,8 @@ type CodeBlockCopyButtonProps = Omit<ComponentProps<"button">, "children" | "typ
|
|
|
171
166
|
* The (optional) copy button of the `CodeBlock`. Copies the code content
|
|
172
167
|
* to the clipboard when clicked.
|
|
173
168
|
*
|
|
169
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockcopybutton
|
|
170
|
+
*
|
|
174
171
|
* @example
|
|
175
172
|
* ```tsx
|
|
176
173
|
* <CodeBlock.Root>
|
|
@@ -186,15 +183,14 @@ type CodeBlockCopyButtonProps = Omit<ComponentProps<"button">, "children" | "typ
|
|
|
186
183
|
* </CodeBlock.Root>
|
|
187
184
|
* ```
|
|
188
185
|
*/
|
|
189
|
-
declare const CopyButton: {
|
|
190
|
-
({ className, label, onCopy, onCopyError, onClick, ref, ...props }: CodeBlockCopyButtonProps): import("react").JSX.Element;
|
|
191
|
-
displayName: string;
|
|
192
|
-
};
|
|
186
|
+
declare const CopyButton: ({ className, label, onCopy, onCopyError, onClick, ref, ...props }: CodeBlockCopyButtonProps) => import("react").JSX.Element;
|
|
193
187
|
type CodeBlockExpanderButtonProps = Omit<ComponentProps<"button">, "children" | "aria-controls" | "aria-expanded"> & WithAsChild;
|
|
194
188
|
/**
|
|
195
189
|
* The (optional) expander button of the `CodeBlock`. Toggles the expanded
|
|
196
190
|
* state of the code block. When present, the code block is collapsible.
|
|
197
191
|
*
|
|
192
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockexpanderbutton
|
|
193
|
+
*
|
|
198
194
|
* @example
|
|
199
195
|
* ```tsx
|
|
200
196
|
* <CodeBlock.Root>
|
|
@@ -210,10 +206,7 @@ type CodeBlockExpanderButtonProps = Omit<ComponentProps<"button">, "children" |
|
|
|
210
206
|
* </CodeBlock.Root>
|
|
211
207
|
* ```
|
|
212
208
|
*/
|
|
213
|
-
declare const ExpanderButton: {
|
|
214
|
-
({ asChild, className, onClick, ref, ...props }: CodeBlockExpanderButtonProps): import("react").JSX.Element;
|
|
215
|
-
displayName: string;
|
|
216
|
-
};
|
|
209
|
+
declare const ExpanderButton: ({ asChild, className, onClick, ref, ...props }: CodeBlockExpanderButtonProps) => import("react").JSX.Element;
|
|
217
210
|
type CodeBlockIconProps = Omit<SvgAttributes, "children"> & ({
|
|
218
211
|
/**
|
|
219
212
|
* A custom icon SVG to display in the code block header.
|
|
@@ -241,6 +234,8 @@ type CodeBlockIconProps = Omit<SvgAttributes, "children"> & ({
|
|
|
241
234
|
* A small icon for the `CodeBlock` header. Pass either a custom `svg`
|
|
242
235
|
* or a `preset` value (not both).
|
|
243
236
|
*
|
|
237
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockicon
|
|
238
|
+
*
|
|
244
239
|
* @example
|
|
245
240
|
* ```tsx
|
|
246
241
|
* <CodeBlock.Root>
|
|
@@ -269,6 +264,8 @@ type CodeBlockTabListProps = Omit<ComponentProps<typeof List>, "asChild" | "loop
|
|
|
269
264
|
* When the tabs exceed the available width they scroll horizontally with an edge
|
|
270
265
|
* fade (`scroll-fade-x`) instead of wrapping to a second row.
|
|
271
266
|
*
|
|
267
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktablist
|
|
268
|
+
*
|
|
272
269
|
* @example
|
|
273
270
|
* ```tsx
|
|
274
271
|
* <CodeBlock.Root defaultTab="yml">
|
|
@@ -290,15 +287,14 @@ type CodeBlockTabListProps = Omit<ComponentProps<typeof List>, "asChild" | "loop
|
|
|
290
287
|
* </CodeBlock.Root>
|
|
291
288
|
* ```
|
|
292
289
|
*/
|
|
293
|
-
declare const TabList: {
|
|
294
|
-
({ className, ref, ...props }: CodeBlockTabListProps): import("react").JSX.Element;
|
|
295
|
-
displayName: string;
|
|
296
|
-
};
|
|
290
|
+
declare const TabList: ({ className, ref, ...props }: CodeBlockTabListProps) => import("react").JSX.Element;
|
|
297
291
|
type CodeBlockTabTriggerProps = Omit<ComponentProps<typeof Trigger>, "asChild">;
|
|
298
292
|
/**
|
|
299
293
|
* A pill-styled tab trigger for the `CodeBlock` header.
|
|
300
294
|
* Must be rendered within a `CodeBlock.TabList`.
|
|
301
295
|
*
|
|
296
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktabtrigger
|
|
297
|
+
*
|
|
302
298
|
* @example
|
|
303
299
|
* ```tsx
|
|
304
300
|
* <CodeBlock.TabList>
|
|
@@ -307,16 +303,15 @@ type CodeBlockTabTriggerProps = Omit<ComponentProps<typeof Trigger>, "asChild">;
|
|
|
307
303
|
* </CodeBlock.TabList>
|
|
308
304
|
* ```
|
|
309
305
|
*/
|
|
310
|
-
declare const TabTrigger: {
|
|
311
|
-
({ className, ref, ...props }: CodeBlockTabTriggerProps): import("react").JSX.Element;
|
|
312
|
-
displayName: string;
|
|
313
|
-
};
|
|
306
|
+
declare const TabTrigger: ({ className, ref, ...props }: CodeBlockTabTriggerProps) => import("react").JSX.Element;
|
|
314
307
|
type CodeBlockTabContentProps = Omit<ComponentProps<typeof Content>, "asChild" | "forceMount">;
|
|
315
308
|
/**
|
|
316
309
|
* Conditionally renders its children when the associated tab is active.
|
|
317
310
|
* Pair with `CodeBlock.TabList` and `CodeBlock.TabTrigger` in the header,
|
|
318
311
|
* and set `defaultTab` / `activeTab` on `CodeBlock.Root`.
|
|
319
312
|
*
|
|
313
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktabcontent
|
|
314
|
+
*
|
|
320
315
|
* @example
|
|
321
316
|
* ```tsx
|
|
322
317
|
* <CodeBlock.Body>
|
|
@@ -330,15 +325,14 @@ type CodeBlockTabContentProps = Omit<ComponentProps<typeof Content>, "asChild" |
|
|
|
330
325
|
* </CodeBlock.Body>
|
|
331
326
|
* ```
|
|
332
327
|
*/
|
|
333
|
-
declare const TabContent:
|
|
334
|
-
(props: CodeBlockTabContentProps): import("react").JSX.Element;
|
|
335
|
-
displayName: string;
|
|
336
|
-
};
|
|
328
|
+
declare const TabContent: (props: CodeBlockTabContentProps) => import("react").JSX.Element;
|
|
337
329
|
/**
|
|
338
330
|
* Shiki-powered code blocks with build-time syntax highlighting and zero browser bundle.
|
|
339
331
|
*
|
|
340
332
|
* Use `mantleCodeBlockPlugins()` to enable pre-rendering at build time.
|
|
341
333
|
*
|
|
334
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block
|
|
335
|
+
*
|
|
342
336
|
* @example
|
|
343
337
|
* Composition:
|
|
344
338
|
* ```
|
|
@@ -401,6 +395,8 @@ declare const CodeBlock: {
|
|
|
401
395
|
/**
|
|
402
396
|
* The root component of the `CodeBlock`.
|
|
403
397
|
*
|
|
398
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockroot
|
|
399
|
+
*
|
|
404
400
|
* @example
|
|
405
401
|
* ```tsx
|
|
406
402
|
* <CodeBlock.Root>
|
|
@@ -420,6 +416,8 @@ declare const CodeBlock: {
|
|
|
420
416
|
/**
|
|
421
417
|
* The body of the `CodeBlock`. Contains `Code` and optional `CopyButton`.
|
|
422
418
|
*
|
|
419
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockbody
|
|
420
|
+
*
|
|
423
421
|
* @example
|
|
424
422
|
* ```tsx
|
|
425
423
|
* <CodeBlock.Root>
|
|
@@ -439,6 +437,8 @@ declare const CodeBlock: {
|
|
|
439
437
|
/**
|
|
440
438
|
* The code content. Renders pre-highlighted Shiki HTML when the Vite plugin is active.
|
|
441
439
|
*
|
|
440
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockcode
|
|
441
|
+
*
|
|
442
442
|
* @example
|
|
443
443
|
* ```tsx
|
|
444
444
|
* <CodeBlock.Root>
|
|
@@ -458,6 +458,8 @@ declare const CodeBlock: {
|
|
|
458
458
|
/**
|
|
459
459
|
* The optional copy button.
|
|
460
460
|
*
|
|
461
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockcopybutton
|
|
462
|
+
*
|
|
461
463
|
* @example
|
|
462
464
|
* ```tsx
|
|
463
465
|
* <CodeBlock.Root>
|
|
@@ -477,6 +479,8 @@ declare const CodeBlock: {
|
|
|
477
479
|
/**
|
|
478
480
|
* The optional expander button for collapsible code blocks.
|
|
479
481
|
*
|
|
482
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockexpanderbutton
|
|
483
|
+
*
|
|
480
484
|
* @example
|
|
481
485
|
* ```tsx
|
|
482
486
|
* <CodeBlock.Root>
|
|
@@ -496,6 +500,8 @@ declare const CodeBlock: {
|
|
|
496
500
|
/**
|
|
497
501
|
* The optional header slot for icon and title.
|
|
498
502
|
*
|
|
503
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockheader
|
|
504
|
+
*
|
|
499
505
|
* @example
|
|
500
506
|
* ```tsx
|
|
501
507
|
* <CodeBlock.Root>
|
|
@@ -515,6 +521,8 @@ declare const CodeBlock: {
|
|
|
515
521
|
/**
|
|
516
522
|
* A small icon for the code block header. Use `preset` or `svg`.
|
|
517
523
|
*
|
|
524
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblockicon
|
|
525
|
+
*
|
|
518
526
|
* @example
|
|
519
527
|
* ```tsx
|
|
520
528
|
* <CodeBlock.Root>
|
|
@@ -534,6 +542,8 @@ declare const CodeBlock: {
|
|
|
534
542
|
/**
|
|
535
543
|
* Conditionally renders children when the associated tab is active.
|
|
536
544
|
*
|
|
545
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktabcontent
|
|
546
|
+
*
|
|
537
547
|
* @example
|
|
538
548
|
* ```tsx
|
|
539
549
|
* <CodeBlock.Root defaultTab="yml">
|
|
@@ -559,6 +569,8 @@ declare const CodeBlock: {
|
|
|
559
569
|
/**
|
|
560
570
|
* A tab list for the code block header. Renders pill-styled tabs for switching code.
|
|
561
571
|
*
|
|
572
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktablist
|
|
573
|
+
*
|
|
562
574
|
* @example
|
|
563
575
|
* ```tsx
|
|
564
576
|
* <CodeBlock.Root defaultTab="yml">
|
|
@@ -584,6 +596,8 @@ declare const CodeBlock: {
|
|
|
584
596
|
/**
|
|
585
597
|
* A pill-styled tab trigger for the code block header. Must be inside `TabList`.
|
|
586
598
|
*
|
|
599
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktabtrigger
|
|
600
|
+
*
|
|
587
601
|
* @example
|
|
588
602
|
* ```tsx
|
|
589
603
|
* <CodeBlock.Root defaultTab="yml">
|
|
@@ -609,6 +623,8 @@ declare const CodeBlock: {
|
|
|
609
623
|
/**
|
|
610
624
|
* The optional title rendered in the header.
|
|
611
625
|
*
|
|
626
|
+
* @see https://mantle.ngrok.com/components/data-display/code-block#codeblocktitle
|
|
627
|
+
*
|
|
612
628
|
* @example
|
|
613
629
|
* ```tsx
|
|
614
630
|
* <CodeBlock.Root>
|