@ngrok/mantle 0.93.7 → 0.94.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/accordion.d.ts +73 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1234 -84
- package/dist/alert-BkJHDx9X.js +1 -0
- package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
- package/dist/alert-center.d.ts +67 -55
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +35 -10
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +6 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-Dc6IgvXV.js +1 -0
- package/dist/anchor.d.ts +17 -5
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +33 -18
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +153 -97
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +36 -24
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +19 -7
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +155 -100
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +47 -36
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CZfkNw5A.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.d.ts +8 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
- package/dist/button-B9bChDgl.js +1 -0
- package/dist/button-D8jixIbH.js +1 -0
- package/dist/button-DNLTJ32M.js +1 -0
- package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
- package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
- package/dist/button.d.ts +9 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +8 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +7 -2
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +34 -23
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BLCqzt56.js +1 -0
- package/dist/chart-CChZiCrt.js +1 -0
- package/dist/chart-CUmSu9d7.js +1 -0
- package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
- package/dist/chart-DtgZBAas.js +2 -0
- package/dist/checkbox-Cu5cgZmk.js +1 -0
- package/dist/checkbox.d.ts +15 -2
- package/dist/checkbox.js +1 -1
- package/dist/choice-CCVG2hb9.js +1 -0
- package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
- package/dist/choice.d.ts +6 -1
- package/dist/choice.js +1 -1
- package/dist/code-BPKNY1_w.js +1 -0
- package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
- package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
- package/dist/code-block.d.ts +28 -19
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +6 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +16 -3
- package/dist/code.js +1 -1
- package/dist/color-CHZbU1Ww.js +1 -0
- package/dist/color.js +1 -1
- package/dist/combobox.d.ts +42 -28
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +59 -47
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
- package/dist/cx.d.ts +4 -4
- package/dist/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table.d.ts +83 -52
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +13 -2
- package/dist/description-list.js +1 -1
- package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
- package/dist/dialog-CbEEA0fl.d.ts +32 -0
- package/dist/dialog-DmzoDfY3.js +1 -0
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
- package/dist/dropdown-menu-uheL0prz.js +1 -0
- package/dist/dropdown-menu.d.ts +6 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -2
- package/dist/empty.js +1 -1
- package/dist/field-Bpvn4tQp.js +1 -0
- package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
- package/dist/field-Cai_4c1l.js +1 -0
- package/dist/field.d.ts +53 -42
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +11 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +35 -10
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +25 -14
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -2
- package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
- package/dist/icon-xb7d9M7X.js +1 -0
- package/dist/icon.d.ts +8 -3
- package/dist/icon.js +1 -1
- package/dist/icons-DEDCLZ8B.js +1 -0
- package/dist/icons-DXadFwpo.js +1 -0
- package/dist/icons-DcesO4Ng.js +1 -0
- package/dist/icons.d.ts +13 -1
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
- package/dist/input-BjCDSOPA.js +1 -0
- package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
- package/dist/input-fW8QSZEO.js +1 -0
- package/dist/input.d.ts +37 -5
- package/dist/input.js +1 -1
- package/dist/kbd-P1nQshWo.js +1 -0
- package/dist/kbd.d.ts +17 -5
- package/dist/kbd.js +1 -1
- package/dist/label-DO1RlMKl.js +1 -0
- package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
- package/dist/label.d.ts +6 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DL4yclOu.js +1 -0
- package/dist/layer-container.d.ts +2 -2
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +147 -90
- package/dist/line-chart.js +1 -1
- package/dist/list-cQZPSjfz.js +1 -0
- package/dist/list.d.ts +34 -16
- package/dist/list.js +1 -1
- package/dist/live-region-Dhapu8a5.js +1 -0
- package/dist/live-region.d.ts +15 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +82 -79
- package/dist/main-CHyWYDak.js +1 -0
- package/dist/main.d.ts +13 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +133 -88
- package/dist/media-object.d.ts +16 -4
- package/dist/media-object.js +1 -1
- package/dist/migrations/0014-chart-named-colors.yml +1389 -0
- package/dist/migrations/0015-segmented-control.yml +788 -0
- package/dist/multi-select.d.ts +42 -29
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +20 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +93 -4
- package/dist/pagination.js +1 -1
- package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
- package/dist/popover-DhgunktK.js +1 -0
- package/dist/popover-T2EyaqGK.d.ts +1 -0
- package/dist/popover.d.ts +7 -2
- package/dist/popover.js +1 -1
- package/dist/primitive-D8CzV_Ft.js +1 -0
- package/dist/progress.d.ts +28 -11
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +11 -3
- package/dist/qr-code.js +1 -1
- package/dist/query-filter.d.ts +6 -6
- package/dist/query.d.ts +9 -4
- package/dist/query.js +1 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-ggEkCi0V.js +1 -0
- package/dist/radio-group.d.ts +21 -100
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +43 -30
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
- package/dist/sandboxed-on-click.d.ts +8 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +137 -76
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control.d.ts +136 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-1xuUx_os.js +1 -0
- package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
- package/dist/select.d.ts +6 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +29 -18
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
- package/dist/separator-DnvhwY2J.js +1 -0
- package/dist/separator.d.ts +6 -1
- package/dist/separator.js +1 -1
- package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
- package/dist/sheet-DHy_vlme.js +1 -0
- package/dist/sheet.d.ts +36 -7
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +53 -37
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DHfyjuQi.js +1 -0
- package/dist/skeleton.d.ts +15 -4
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +12 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +11 -1
- package/dist/slider.js +1 -1
- package/dist/slot-B7rwscwd.js +1 -0
- package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
- package/dist/slot.d.ts +6 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button.d.ts +20 -9
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +35 -22
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch.d.ts +14 -2
- package/dist/switch.js +1 -1
- package/dist/table-BnLdXUai.js +1 -0
- package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
- package/dist/table.d.ts +6 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +24 -12
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +12 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-BNdZl352.js +1 -0
- package/dist/theme-switcher.d.ts +18 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +25 -11
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +15 -2
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +3261 -0
- package/dist/tokens.json +4933 -0
- package/dist/tokens.resolver.json +37 -0
- package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
- package/dist/tooltip-DQO40Mrq.js +1 -0
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +28 -14
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
- package/dist/use-callback-ref-DiOXFQzM.js +1 -0
- package/dist/use-composed-refs-DPYmLDSe.js +1 -0
- package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
- package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
- package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
- package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
- package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +14 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +7 -2
- package/dist/well.js +1 -1
- package/package.json +21 -7
- package/src/components/chart/d3-license.md +25 -0
- package/dist/alert-P9lwn25X.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-B8k98Pby.js +0 -1
- package/dist/button-Dge0D5bl.js +0 -1
- package/dist/chart-BpWfQAwf.js +0 -2
- package/dist/checkbox-DmSQXs26.js +0 -1
- package/dist/choice-2Lrv8_nl.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/dialog-7TUgiSzX.js +0 -1
- package/dist/dialog-Dp0QGWwo.d.ts +0 -28
- package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/icons-DP3lQw5O.js +0 -1
- package/dist/input-CpQ6jlpI.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-nHqqYS7e.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-RFRIQxU2.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-C96V8SXi.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-HDVxTNPi.js +0 -1
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-CAAYk4Yj.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/sheet-CSJc_sB4.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-C-glc5Q-.js +0 -1
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{t as e}from"./compose-refs-BdRUneoc.js";import{t}from"./use-composed-refs-DPYmLDSe.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{r as i}from"./button-DNLTJ32M.js";import{t as a}from"./button-B9bChDgl.js";import{t as o}from"./use-callback-ref-DiOXFQzM.js";import{t as s}from"./use-copy-to-clipboard-hBL6_65i.js";import{t as c}from"./alternate-announcement-BkH4bOKp.js";import{t as l}from"./live-region-Dhapu8a5.js";import{r as u}from"./color-CHZbU1Ww.js";import{t as d}from"./use-is-hydrated-BeLOGKwE.js";import{c as f}from"react/compiler-runtime";import{createContext as p,useContext as m,useEffect as h,useId as g,useLayoutEffect as _,useRef as v,useState as y,useSyncExternalStore as b}from"react";import x from"tiny-invariant";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";import{CheckIcon as T}from"@phosphor-icons/react/Check";import{CopyIcon as E}from"@phosphor-icons/react/Copy";const D=(e,t)=>Reflect.get(e,t),O=(e,t)=>e instanceof Date?e.getTime():typeof e==`number`?e:t&&typeof e==`string`?new Date(e).getTime():NaN,k=(e,t,n,r)=>{let i=/* @__PURE__ */ new Set;for(let e of r)for(let t of Object.keys(e))i.add(t);return`${e} ${t} "${n}" does not match any key in the provided data. Available keys: ${[...i].join(`, `)}.`},A=(e,t,n)=>`${e} could not read any "${t}" values as ${n===`time`?`dates`:`numbers`} for the "${n}" x scale. Check the xScale and the data types.`,ee=(e,t)=>e.some(e=>D(e,t)!==void 0),te=({rootName:e,partName:t,rows:n,xKey:r,xScale:i,dataKeys:a,zKey:o})=>{if(n.length===0)return;if(!ee(n,r))throw Error(k(e,`xKey`,r,n));let s=n;if(i===`linear`||i===`time`){let t=!1;if(s=n.filter(e=>{let n=D(e,r);return n!=null&&(t=!0),Number.isFinite(O(n,i===`time`))}),t&&s.length===0)throw Error(A(e,r,i))}if(s.length!==0){for(let e of a)if(!ee(s,e))throw Error(k(t,`dataKey`,e,n));if(o!=null&&!ee(s,o))throw Error(k(e,`zKey`,o,n))}},j=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),M=(e,t)=>{let n=t===`time`?new Date(O(e,!0)):e;return n instanceof Date?Number.isNaN(n.getTime())?`—`:n.toISOString():typeof n==`number`?Number.isFinite(n)?String(n):`—`:typeof n==`string`?j(n):`—`},N=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,P=e=>`| ${e.join(` | `)} |`,ne=({data:e,xKey:t,xScale:n,series:r,zKey:i})=>{let a=[j(t),...r.map(e=>j(e.label)),...i==null?[]:[j(i)]],o=e.map(e=>[M(D(e,t),n),...r.map(t=>N(D(e,t.dataKey))),...i==null?[]:[N(D(e,i))]]);return[P(a),P(a.map(()=>`---`)),...o.map(e=>P(e))].join(`
|
|
2
|
+
`)},re=p(null),F=e=>{let t=m(re);return x(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},ie=e=>{let t=f(3),n,r;return t[0]===e?(n=t[1],r=t[2]):(n=()=>e.getSnapshot().series,r=()=>e.getSnapshot().series,t[0]=e,t[1]=n,t[2]=r),b(e.subscribe,n,r)},ae=(e,t)=>{let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Object.is(Reflect.get(e,n),Reflect.get(t,n)))},oe=e=>{let[t,n]=y(e);return ae(t,e)?t:(n(e),e)},I=e=>{let t=f(36),n,o,u,d,p,m,g,_,b;t[0]===e?(n=t[1],o=t[2],u=t[3],d=t[4],p=t[5],m=t[6],g=t[7],_=t[8],b=t[9]):({partName:p,slotName:_,label:b,onCopy:u,onCopyError:d,onClick:o,ref:g,"data-slot":n,...m}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=u,t[4]=d,t[5]=p,t[6]=m,t[7]=g,t[8]=_,t[9]=b);let x=b===void 0?`Copy data as Markdown`:b,D=F(p),O=s(),[k,A]=y(``),ee=k!==``,te=v(!1),j=v(void 0),M,N;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>()=>{j.current!=null&&clearTimeout(j.current)},N=[],t[10]=M,t[11]=N):(M=t[10],N=t[11]),h(M,N);let P=`${_}-copy-button`,re;t[12]!==n||t[13]!==P?(re=r(n,P),t[12]=n,t[13]=P,t[14]=re):re=t[14];let ie=ee?`check`:`copy`,ae;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(ae={check:/* @__PURE__ */ C(T,{}),copy:/* @__PURE__ */ C(E,{})},t[15]=ae):ae=t[15];let oe;t[16]===ie?oe=t[17]:(oe=/* @__PURE__ */ C(i,{active:ie,icons:ae}),t[16]=ie,t[17]=oe);let I;t[18]!==D||t[19]!==O||t[20]!==o||t[21]!==u||t[22]!==d?(I=async e=>{try{if(o?.(e),e.defaultPrevented){j.current!=null&&(clearTimeout(j.current),j.current=void 0),A(``);return}let{data:t,xKey:n,xScale:r,zKey:i}=D.dataRef.current,a=ne({data:t,xKey:n,xScale:r,zKey:i,series:D.store.getSnapshot().series});await O(a),u?.(a),A(c(`Copied`,te)),j.current!=null&&clearTimeout(j.current),j.current=setTimeout(()=>{A(``)},2e3)}catch(e){d?.(e)}},t[18]=D,t[19]=O,t[20]=o,t[21]=u,t[22]=d,t[23]=I):I=t[23];let L;t[24]!==x||t[25]!==m||t[26]!==g||t[27]!==re||t[28]!==oe||t[29]!==I?(L=/* @__PURE__ */ C(a,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":re,label:x,icon:oe,ref:g,onClick:I,...m}),t[24]=x,t[25]=m,t[26]=g,t[27]=re,t[28]=oe,t[29]=I,t[30]=L):L=t[30];let R;t[31]===k?R=t[32]:(R=/* @__PURE__ */ C(l,{children:k}),t[31]=k,t[32]=R);let z;return t[33]!==L||t[34]!==R?(z=/* @__PURE__ */ w(S,{children:[L,R]}),t[33]=L,t[34]=R,t[35]=z):z=t[35],z},L=e=>{let{step:t,slot:n}=e,r=Math.min(64,Math.max(24,t*.6));return Math.min(n,r)},R=.5,z=(e,t)=>e<0?e:t,se=e=>{let{lower:t,upper:n,toPixel:r,reveal:i,gap:a}=e,o=r(t<0?n:t),s=o+(r(z(t,n))-o)*i;if(Math.abs(o-r(0))<R)return{baseline:o,value:s};let c=Math.min(a,Math.abs(o-s)/2);return{baseline:o-Math.sign(o-s)*c,value:s}},B=e=>{let{lower:t,upper:n,pileOuter:r,toPixel:i}=e;if(Number.isNaN(r))return!1;let a=i(z(t,n));return Math.abs(a-i(r))<R},ce=e=>Math.abs(e.baseline-e.toPixel(0))<R,le=e=>{let{lower:t,upper:n,reveal:r,count:i}=e,a=n.map(()=>new Float64Array(i)),o=n.map(()=>new Float64Array(i));for(let e=0;e<i;e++){let i=0,s=0;for(let c=0;c<n.length;c++){let l=n[c]?.[e]??NaN,u=t[c]?.[e]??NaN,d=r[c]??1,f=a[c],p=o[c];if(f==null||p==null)continue;if(Number.isNaN(l)){f[e]=NaN,p[e]=NaN;continue}let m=Number.isNaN(u)?0:u;m<0?(p[e]=s,s+=(m-l)*d,f[e]=s):(f[e]=i,i+=(l-m)*d,p[e]=i)}}return{lower:a,upper:o}},V=/* @__PURE__ */ new WeakMap,H=e=>{if(typeof e.matchMedia!=`function`)return!1;let t=e.matchMedia,n=V.get(t);return n??(n=e.matchMedia(`(prefers-reduced-motion: reduce)`),V.set(t,n)),n.matches},ue=/* @__PURE__ */ new WeakMap,de=(e,t)=>{let n=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),r=()=>{if(n.removeEventListener(`change`,r),t.listeners.size!==0){de(e,t);for(let e of t.listeners)e()}};n.addEventListener(`change`,r),t.disarm=()=>n.removeEventListener(`change`,r)},U=(e,t)=>{if(typeof e.matchMedia!=`function`)return()=>{};let n=ue.get(e);if(n==null){let t={listeners:/* @__PURE__ */ new Set,disarm:()=>{}};de(e,t),ue.set(e,t),n=t}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(n.disarm(),ue.delete(e))}},W=/* @__PURE__ */ new WeakMap,fe=(e,t)=>{let n=W.get(e);if(n==null){let t={listeners:/* @__PURE__ */ new Set,onBefore:()=>{for(let e of t.listeners)e.before()},onAfter:()=>{for(let e of t.listeners)e.after()}};e.addEventListener(`beforeprint`,t.onBefore),e.addEventListener(`afterprint`,t.onAfter),W.set(e,t),n=t}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(e.removeEventListener(`beforeprint`,n.onBefore),e.removeEventListener(`afterprint`,n.onAfter),W.delete(e))}},G=/* @__PURE__ */ new WeakMap,pe=(e,t)=>{let n=e.fonts;if(n==null||typeof n.addEventListener!=`function`)return()=>{};let r=G.get(n);if(r==null){let e={listeners:/* @__PURE__ */ new Set,onLoad:()=>{for(let t of e.listeners)t()}};n.addEventListener(`loadingdone`,e.onLoad),G.set(n,e),r=e}return r.listeners.add(t),()=>{r.listeners.delete(t),r.listeners.size===0&&(n.removeEventListener(`loadingdone`,r.onLoad),G.delete(n))}},me=/* @__PURE__ */ new WeakMap,K=(e,t)=>{if(typeof ResizeObserver>`u`)return()=>{};let n=e.ownerDocument,r=me.get(n);if(r==null){let e=/* @__PURE__ */ new Map;r={handlers:e,observer:new ResizeObserver(t=>{for(let n of t)e.get(n.target)?.(n)})},me.set(n,r)}let i=r;return i.handlers.set(e,t),i.observer.observe(e),()=>{i.handlers.get(e)===t&&(i.handlers.delete(e),i.observer.unobserve(e),i.handlers.size===0&&(i.observer.disconnect(),me.get(n)===i&&me.delete(n)))}},he=/* @__PURE__ */ new WeakMap,ge=(e,t)=>{t.handle=0;let n=t.callbacks;t.callbacks=/* @__PURE__ */ new Set;let r=[];for(let e of n)try{e()}catch(e){r.push(e)}if(t.callbacks.size===0&&he.get(e)===t&&he.delete(e),r.length===1)throw r[0];if(r.length>1)throw AggregateError(r,`More than one chart failed to commit a frame.`)},_e=(e,t)=>{let n=he.get(e);n??(n={callbacks:/* @__PURE__ */ new Set,handle:0},he.set(e,n));let r=n,i=r.callbacks;return i.add(t),r.handle===0&&(r.handle=e.requestAnimationFrame(()=>ge(e,r))),()=>{i.delete(t),i===r.callbacks&&i.size===0&&r.handle!==0&&(e.cancelAnimationFrame(r.handle),r.handle=0,he.delete(e))}},ve=e=>{let{pointCount:t,columnCount:n,wasDecimated:r}=e;return n<=0?!1:r?t>=n*3:t>=n*4},ye=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);p===s&&(p=s-1),p<0||p>=s||(c[p]===0?(c[p]=1,l[p]=r,u[p]=r,d[p]=r,f[p]=r):(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}};let be=null;const xe=()=>be??=new Intl.NumberFormat;let Se=null;const Ce=()=>Se??=new Intl.NumberFormat(void 0,{maximumSignificantDigits:4}),we=/* @__PURE__ */ new Map,q=(e,t)=>{let n=Object.is(e,-0)?0:e,r=t?.maximumFractionDigits;if(r!=null){let e=we.get(r);return e??(e=new Intl.NumberFormat(void 0,{maximumFractionDigits:r}),we.set(r,e)),e.format(n)}return n!==0&&Math.abs(n)<1?Ce().format(n):xe().format(n)},Te=e=>!Number.isFinite(e)||e<=0?0:Math.min(20,Math.max(0,-Math.floor(Math.log10(e))));let J=null;const Ee=()=>J??=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});let De=null;const Oe=()=>De??=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}),ke=e=>e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0,Ae=(e,t)=>typeof e==`string`?e:typeof e==`number`?q(e):Number.isNaN(e.getTime())?`—`:t?.datasetHasTimeOfDay??ke(e)?Ee().format(e):Oe().format(e),je={bar:`BarChart.Bar`,line:`LineChart.Line`,area:`AreaChart.Area`,scatter:`ScatterPlot.Point`},Me=({rows:e,xKey:t,rootName:n})=>{let r=e.length,i=new Float64Array(r),a=Array.from({length:r},()=>``),o=!1;for(let n=0;n<r;n++){let r=e[n],s=r==null?void 0:D(r,t);s!==void 0&&(o=!0),a[n]=typeof s==`string`||typeof s==`number`||s instanceof Date?s:String(s),i[n]=n}return x(r===0||o,()=>k(n,`xKey`,t,e)),{rowCount:r,xs:i,xValues:a,order:null,orderInverse:null,xsAllIntegers:!0}},Ne=({rows:e,xKey:t,xScale:n,rootName:r})=>{let i=new Float64Array(e.length),a=new Int32Array(e.length),o=0,s=!0,c=!1,l=!1;for(let r=0;r<e.length;r++){let u=e[r],d=u==null?void 0:D(u,t);d!==void 0&&(c=!0),d!=null&&(l=!0);let f=O(d,n===`time`);Number.isFinite(f)&&(o>0&&f<(i[o-1]??0)&&(s=!1),i[o]=f,a[o]=r,o+=1)}x(e.length===0||c,()=>k(r,`xKey`,t,e)),x(!l||o>0,()=>A(r,t,n));let u=o,d=u===e.length?i:i.slice(0,u),f=u===e.length?a:a.slice(0,u);if(!s){let e=d,t=f,n=Array.from({length:u},(e,t)=>t).toSorted((t,n)=>(e[t]??0)-(e[n]??0)||t-n);d=new Float64Array(u),f=new Int32Array(u);for(let r=0;r<u;r++){let i=n[r]??r;d[r]=e[i]??0,f[r]=t[i]??0}}let p=!0;for(let e=0;e<u;e++)if(!Number.isInteger(d[e])){p=!1;break}if(u===e.length&&s)return{rowCount:u,xs:d,xValues:[],order:null,orderInverse:null,xsAllIntegers:p};let m=new Int32Array(e.length).fill(-1);for(let e=0;e<u;e++){let t=f[e];t!=null&&(m[t]=e)}return{rowCount:u,xs:d,xValues:[],order:f,orderInverse:m,xsAllIntegers:p}},Pe=e=>{let{rows:t,specs:n,zKey:r}=e,i=e.xScale===`band`||e.xScale===`point`?Me(e):Ne(e),{rowCount:a,order:o}=i,s=e=>o==null?e:o[e]??e,c=!1;for(let e of i.xValues)if(e instanceof Date&&ke(e)){c=!0;break}let l=1/0,u=-1/0,d=!0,f=n.map(e=>{let n=new Float64Array(a),r=!1;for(let i=0;i<a;i++){let a=t[s(i)],o=a==null?void 0:D(a,e.dataKey);if(o===void 0){n[i]=NaN;continue}r=!0;let c=typeof o==`number`&&Number.isFinite(o)?o:NaN;n[i]=c,Number.isNaN(c)||(l=Math.min(l,c),u=Math.max(u,c),Number.isInteger(c)||(d=!1))}return x(a===0||r,()=>k(je[e.mark],`dataKey`,e.dataKey,t)),n}),p=/* @__PURE__ */ new Float64Array,m=null;if(r!=null){p=new Float64Array(a);let e=1/0,n=-1/0,i=!1;for(let o=0;o<a;o++){let a=t[s(o)],c=a==null?void 0:D(a,r);c!==void 0&&(i=!0);let l=typeof c==`number`&&Number.isFinite(c)?c:NaN;p[o]=l,Number.isNaN(l)||(e=Math.min(e,l),n=Math.max(n,l))}x(a===0||i,()=>k(`ScatterPlot.Root`,`zKey`,r,t)),m=e===1/0?null:[e,n]}return{...i,xHasTimeOfDay:c,columns:f,valueMin:l===1/0?0:l,valueMax:u===-1/0?0:u,valuesAllIntegers:d,zs:p,zExtent:m}},Fe=(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},Ie=(e,t)=>{let n=0,r=e;for(;n<r;){let e=n+r>>1;t(e)?n=e+1:r=e}return n},Le=Math.sqrt(50),Re=Math.sqrt(10),ze=Math.sqrt(2),Be=e=>e>=Le?10:e>=Re?5:e>=ze?2:1,Y=(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=Be(s),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?Y(e,t,n*2,r):[l,u,d]},Ve=(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?Y(t,e,n,r):Y(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},He=(e,t,n,r)=>{if(!(n>0))return 0;if(e===t)return r?.integer&&!Number.isInteger(e)?0:1;let[i,a]=t<e?Y(t,e,n,r):Y(e,t,n,r);return a>=i?a-i+1:0},X=(e,t,n)=>Y(e,t,n)[2],Ue=(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}},Z=(e,t)=>e.rangeStart+e.offset+t*e.step,Ge=(e,t)=>Z(e,t)+e.bandwidth/2,Ke=(e,t)=>({start:Z(e,t)-(e.step-e.bandwidth)/2,size:e.step}),qe=(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))},Je=(e,t,n)=>Ve(e[0],e[1],t,n),Ye=(e,t,n)=>{let r=Math.floor(Math.min(n?.count??t,t));for(;r>1&&He(e[0],e[1],r,n)>t;)--r;return Je(e,r,n).slice(0,Math.max(0,Math.floor(t)))},Xe=(e,t)=>{if(e[0]>e[1])return Xe([e[1],e[0]],t);if(e[0]===e[1]){let n=e[0],r=n===0?1:Math.abs(n)*.5;return Xe([n-r,n+r],t)}let n=e[0],r=e[1],i=NaN;for(let e=0;e<10;e++){let e=X(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]},Ze=(e,t)=>{let n=Xe(e,t);return e[0]===0?[0,n[1]]:n},Qe=1e3,$e=Qe*60,et=$e*60,tt=et*24,nt=tt*30,rt=tt*365,it={floor:e=>{e.setTime(e.getTime()-e.getMilliseconds())},offset:e=>{e.setTime(e.getTime()+Qe)},field:e=>e.getUTCSeconds()},at={floor:e=>{e.setTime(e.getTime()-e.getMilliseconds()-e.getSeconds()*Qe)},offset:e=>{e.setTime(e.getTime()+$e)},field:e=>e.getMinutes()},ot={floor:e=>{e.setTime(e.getTime()-e.getMilliseconds()-e.getSeconds()*Qe-e.getMinutes()*$e)},offset:e=>{e.setTime(e.getTime()+et)},field:e=>e.getHours()},st={floor:e=>{e.setHours(0,0,0,0)},offset:e=>{e.setDate(e.getDate()+1)},field:e=>e.getDate()-1},ct={floor:e=>{e.setDate(e.getDate()-e.getDay()),e.setHours(0,0,0,0)},offset:e=>{e.setDate(e.getDate()+7)}},lt={floor:e=>{e.setDate(1),e.setHours(0,0,0,0)},offset:e=>{e.setMonth(e.getMonth()+1)},field:e=>e.getMonth()},ut=e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},Q=(e,t)=>{let n=n=>e.field(n)%t===0;return{floor:t=>{if(!Number.isNaN(t.getTime()))for(e.floor(t);!n(t);)t.setTime(t.getTime()-1),e.floor(t)},offset:t=>{if(!Number.isNaN(t.getTime()))do e.offset(t);while(!n(t))}}},dt=e=>({floor:t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),ut(t)},offset:t=>{t.setFullYear(t.getFullYear()+e)}}),ft=e=>({floor:t=>{t.setTime(Math.floor(t.getTime()/e)*e)},offset:t=>{t.setTime(t.getTime()+e)}}),pt=(e,t)=>{let n=Math.floor(e);return Number.isFinite(n)&&n>0?t(n):null},mt=[[Qe,it],[5*Qe,Q(it,5)],[15*Qe,Q(it,15)],[30*Qe,Q(it,30)],[$e,at],[5*$e,Q(at,5)],[15*$e,Q(at,15)],[30*$e,Q(at,30)],[et,ot],[3*et,Q(ot,3)],[6*et,Q(ot,6)],[12*et,Q(ot,12)],[tt,st],[2*tt,Q(st,2)],[6048e5,ct],[nt,lt],[3*nt,Q(lt,3)],[rt,dt(1)]],ht=(e,t,n)=>{let r=X(e,t,n);return r<0?1/-r:r},gt=(e,t,n)=>{let r=(t-e)/n,i=mt.findLast(([e])=>e<=r),a=mt.find(([e])=>e>r);if(a==null)return pt(ht(e/rt,t/rt,n),dt);if(i==null)return pt(Math.max(ht(e,t,n),1),ft);let[o,s]=i,[c,l]=a;return r/o<c/r?s:l},_t=(e,t,n)=>{let r=/* @__PURE__ */ new Date(t-1);e.floor(r),e.offset(r),e.floor(r);let i=[];if(!(r.getTime()<n))return i;let a;do a=r.getTime(),i.push(a),e.offset(r),e.floor(r);while(a<r.getTime()&&r.getTime()<n);return i},vt=(e,t)=>{let n=new Date(e[0]).getTime(),r=new Date(e[1]).getTime(),i=r<n,a=i?r:n,o=i?n:r,s=gt(a,o,t);if(s==null)return[];let c=_t(s,a,o+1);return i?c.toReversed():c},yt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],bt=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],xt=(e,t)=>e<0?`-${String(-e).padStart(t,`0`)}`:String(e).padStart(t,`0`),St=e=>xt(e.getHours()%12||12,2),$=(e,t)=>{let n=new Date(t);return e(n),n.getTime()<t.getTime()},Ct=e=>{let t=new Date(e);return $(it.floor,t)?`.${xt(t.getMilliseconds(),3)}`:$(at.floor,t)?`:${xt(t.getSeconds(),2)}`:$(ot.floor,t)?`${St(t)}:${xt(t.getMinutes(),2)}`:$(st.floor,t)?`${St(t)} ${t.getHours()>=12?`PM`:`AM`}`:$(lt.floor,t)?`${($(ct.floor,t)?bt[t.getDay()]:yt[t.getMonth()]?.slice(0,3))??``} ${xt(t.getDate(),2)}`:$(ut,t)?yt[t.getMonth()]??``:xt(t.getFullYear()%1e4,4)},wt=(e,t,n,r)=>{r?e.lineTo(t,n):e.moveTo(t,n)},Tt=(e,{indexes:t,from:n,to:r,xAt:i,yAt:a,joined:o})=>{let s=r<n?-1:1,c=0;for(let l=n;l!==r+s;l+=s){let n=t[l];n!=null&&(c===0?wt(e,i(n),a(n),o):e.lineTo(i(n),a(n)),c+=1)}return c},Et=(e,{indexes:t,from:n,to:r,xAt:i,yAt:a,joined:o})=>{let s=r<n?-1:1,c=0,l=NaN,u=NaN;for(let d=n;d!==r+s;d+=s){let n=t[d];if(n==null)continue;let r=i(n),s=a(n);if(c===0)wt(e,r,s,o);else{let t=l*.5+r*.5;e.lineTo(t,u),e.lineTo(t,s)}c+=1,l=r,u=s}return c>1&&e.lineTo(l,u),c},Dt=e=>e<0?-1:1,Ot=(e,t,n,r,i,a)=>{let o=n-e,s=i-n,c=(r-t)/(o||(s<0?-0:0)),l=(a-r)/(s||(o<0?-0:0)),u=(c*s+l*o)/(o+s);return(Dt(c)+Dt(l))*Math.min(Math.abs(c),Math.abs(l),.5*Math.abs(u))||0},kt=(e,t,n,r,i)=>{let a=n-e;return a?(3*(r-t)/a-i)/2:i},At=(e,t,n,r,i,a,o)=>{let s=(r-t)/3;e.bezierCurveTo(t+s,n+s*a,r-s,i-s*o,r,i)},jt=(e,{indexes:t,from:n,to:r,xAt:i,yAt:a,joined:o})=>{let s=r<n?-1:1,c=0,l=NaN,u=NaN,d=NaN,f=NaN,p=NaN;for(let m=n;m!==r+s;m+=s){let n=t[m];if(n==null)continue;let r=i(n),s=a(n);if(r!==d||s!==f){if(c===0)wt(e,r,s,o);else if(c>1){let t=Ot(l,u,d,f,r,s);At(e,l,u,d,f,c===2?kt(l,u,d,f,t):p,t),p=t}c+=1,l=d,u=f,d=r,f=s}}return c===2?e.lineTo(d,f):c>2&&At(e,l,u,d,f,p,kt(l,u,d,f,p)),c},Mt=e=>e===`monotone`?jt:e===`step`?Et:Tt,Nt=(e,t,n)=>{let r=null;for(let i=0;i<=e.length;i++){let a=e[i];a!=null&&t(a)?r??=i:r!=null&&(n(r,i-1),r=null)}},Pt=(e,t)=>{let{curve:n,indexes:r,xAt:i,yAt:a,definedAt:o}=t,s=Mt(n);Nt(r,o,(t,n)=>{s(e,{indexes:r,from:t,to:n,xAt:i,yAt:a,joined:!1})===1&&e.closePath()})},Ft=(e,t)=>{let{curve:n,indexes:r,xAt:i,y0At:a,y1At:o,definedAt:s}=t,c=Mt(n);Nt(r,s,(t,n)=>{c(e,{indexes:r,from:t,to:n,xAt:i,yAt:o,joined:!1}),c(e,{indexes:r,from:n,to:t,xAt:i,yAt:a,joined:!0}),e.closePath()})},It=e=>Math.round(e)+.5,Lt=(e,t)=>{let{plot:n,color:r,xLines:i,yLines:a}=t;e.save(),e.strokeStyle=r,e.lineWidth=1,Rt(e,i,t=>{e.moveTo(It(t),n.top),e.lineTo(It(t),n.top+n.height)}),Rt(e,a,t=>{e.moveTo(n.left,It(t)),e.lineTo(n.left+n.width,It(t))}),e.restore()},Rt=(e,t,n)=>{let r=NaN;for(let i of t)i.alpha!==r&&(Number.isNaN(r)||e.stroke(),r=i.alpha,e.globalAlpha=r,e.beginPath()),n(i.position);Number.isNaN(r)||e.stroke()},zt=(e,t)=>{let{plot:n,color:r,y:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(n.left,It(i)),e.lineTo(n.left+n.width,It(i)),e.stroke()},Bt=(e,t)=>{let{plot:n,color:r,x:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(It(i),n.top),e.lineTo(It(i),n.top+n.height),e.stroke()},Vt=e=>e.thickness>=e.radius*2?Math.min(e.radius,e.thickness/2,e.length):0,Ht=(e,t)=>{let{fill:n,rects:r,count:i=r.length}=t;e.fillStyle=n,e.beginPath();for(let t=0;t<i;t++){let n=r[t];if(n==null)continue;let i=Math.max(.5,n.width),a=Math.min(n.valueY,n.baselineY),o=Math.abs(n.baselineY-n.valueY);if(o===0)continue;let s=n.rounded&&n.roundedBase?2:1,c=Vt({radius:2,thickness:i,length:o/s}),l=n.rounded?c:0,u=n.roundedBase?c:0;l===0&&u===0?e.rect(n.x,a,i,o):n.valueY<=n.baselineY?e.roundRect(n.x,a,i,o,[l,l,u,u]):e.roundRect(n.x,a,i,o,[u,u,l,l])}e.fill()},Ut=(e,t)=>{let{fill:n,rects:r,count:i=r.length}=t;e.fillStyle=n,e.beginPath();for(let t=0;t<i;t++){let n=r[t];if(n==null)continue;let i=Math.max(.5,n.height),a=Math.min(n.valueX,n.baselineX),o=Math.abs(n.valueX-n.baselineX);if(o===0)continue;let s=n.rounded&&n.roundedBase?2:1,c=Vt({radius:2,thickness:i,length:o/s}),l=n.rounded?c:0,u=n.roundedBase?c:0;l===0&&u===0?e.rect(a,n.y,o,i):n.valueX>=n.baselineX?e.roundRect(a,n.y,o,i,[u,l,l,u]):e.roundRect(a,n.y,o,i,[l,u,u,l])}e.fill()},Wt=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}=t;e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),Pt(e,{curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}),e.stroke()},Gt=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}=t;e.beginPath(),Ft(e,{curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),Pt(e,{curve:r,indexes:i,xAt:a,yAt:s,definedAt:c}),e.stroke()},Kt=(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()},qt=(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++)i.hasData[e]===0?l(e-1):c<0&&(c=e);l(i.columnCount-1),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),Kt(e,{color:n,columns:i,columnToX:a,valueK:o,valueB:s})},Jt=(e,t,n,r,i)=>{let a=!1;for(let[o,s]of i)a?e.lineTo(t+o*r,n+s*r):(e.moveTo(t+o*r,n+s*r),a=!0);e.closePath()},Yt=[[-1/3,-1],[1/3,-1],[1/3,-1/3],[1,-1/3],[1,1/3],[1/3,1/3],[1/3,1],[-1/3,1],[-1/3,1/3],[-1,1/3],[-1,-1/3],[-1/3,-1/3]],Xt=Yt.map(([e,t])=>[(e-t)/Math.SQRT2,(e+t)/Math.SQRT2]),Zt=Array.from({length:10},(e,t)=>{let n=-Math.PI/2+t*Math.PI/5,r=t%2==0?1:.382;return[Math.cos(n)*r,Math.sin(n)*r]}),Qt={circle:(e,t,n,r)=>{e.moveTo(t+r,n),e.arc(t,n,r,0,Math.PI*2)},square:(e,t,n,r)=>{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()},triangle:(e,t,n,r)=>{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()},diamond:(e,t,n,r)=>{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()},"triangle-down":(e,t,n,r)=>{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()},plus:(e,t,n,r)=>{Jt(e,t,n,r*1.189,Yt)},cross:(e,t,n,r)=>{Jt(e,t,n,r*1.189,Xt)},star:(e,t,n,r)=>{Jt(e,t,n,r*1.673,Zt)}},$t=(e,t,n,r,i)=>{Qt[i](e,t,n,r)},en=(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,e.beginPath();for(let t of a)c(t)&&$t(e,o(t),s(t),4,i);e.fill(),e.stroke()},tn=(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,It(a)),e.lineTo(n.left+n.width,It(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))},nn=(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(It(a),n.top),e.lineTo(It(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)}},rn=(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()},an=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),l=new Int32Array(n).fill(-1),u=new Int32Array(n).fill(-1);for(let d=0;d<t;d++){let t=e[d],f=r[d],p=i[d];if(t!=null&&f!=null&&p!=null)for(let e=0;e<n;e++){let n=t[e]??NaN;if(Number.isNaN(n))f[e]=NaN,p[e]=NaN;else if(n>=0){let t=s[e]??0,r=t+n;s[e]=r,f[e]=t,p[e]=r,r>o&&(o=r),n>0&&(l[e]=d)}else{let t=c[e]??0,r=t+n;c[e]=r,f[e]=r,p[e]=t,r<a&&(a=r),u[e]=d}}}return{lower:r,upper:i,min:a,max:o,positiveEnd:l,negativeEnd:u}},on=e=>1-(1-e)**3;var sn=class{#e=/* @__PURE__ */ new Float64Array;#t=/* @__PURE__ */ new Float64Array;#n=/* @__PURE__ */ 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.#e[t]=this.#n[t]??NaN,this.#t[t]=e[t]??NaN;this.#r=r,this.#i=n,this.#a=!0}else{for(let t=0;t<i;t++)this.#t[t]=e[t]??NaN;this.#a=!1}}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=on(t);for(let e=0;e<this.#n.length;e++){let t=this.#e[e]??NaN,r=this.#t[e]??NaN;Number.isNaN(t)||Number.isNaN(r)?this.#n[e]=r:this.#n[e]=t+(r-t)*n}return t>=1&&(this.#a=!1),this.#a}},cn=class{#e=/* @__PURE__ */ new Float64Array;#t=/* @__PURE__ */ new Float64Array;#n=0;#r=!1;#i;#a;#o=0;#s=null;constructor(e={}){this.#i=e.speed??.14,this.#a=e.epsilon??.001}get active(){return this.#r}values(){return this.#t}jump(e){this.#s=null,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}if(this.#c(e))return;this.#s!=null&&(this.#l(t),this.#s=null,this.#r=!1);let n=0;for(let t=0;t<e.length;t++){let r=e[t]??NaN;this.#e[t]=r;let i=Math.abs(r-(this.#t[t]??NaN));Number.isFinite(i)&&i>n&&(n=i)}this.#o=n,this.#r||(this.#r=!0,this.#n=t)}glide(e,t){let{now:n,duration:r}=t;if(this.#t.length!==e.length||r<=0)this.jump(e);else if(!this.#c(e)){this.#s!=null&&this.#l(n);for(let t=0;t<e.length;t++)this.#e[t]=e[t]??NaN;this.#s={from:Float64Array.from(this.#t),start:n,duration:r},this.#r=!0,this.#n=n}}#c(e){for(let t=0;t<e.length;t++){let n=e[t]??NaN,r=this.#e[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n)))return!1}return!0}#l(e){let t=this.#s;if(t==null)return;let n=Math.min(1,Math.max(0,(e-t.start)/t.duration));for(let e=0;e<this.#t.length;e++){let r=t.from[e]??NaN,i=this.#e[e]??NaN;this.#t[e]=Number.isNaN(r)||Number.isNaN(i)?i:r+(i-r)*n}n>=1&&(this.#s=null,this.#r=!1)}tick(e,t=0){if(!this.#r)return!1;if(this.#s!=null)return this.#n=e,this.#l(e),this.#r;let n=Math.min(50,Math.max(0,e-this.#n));this.#n=e;let r=1-(1-this.#i)**(n/16.67),i=Math.max(this.#o*this.#a,t,2**-52),a=!0;for(let e=0;e<this.#t.length;e++){let t=this.#e[e]??NaN,n=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(n)){this.#t[e]=t;continue}let o=n+(t-n)*r;r>0&&o===n||Math.abs(t-o)<=i?this.#t[e]=t:(this.#t[e]=o,a=!1)}return this.#r=!a,this.#r}};const ln=e=>`${e.colorInput}|${e.texture}`,un=1e3,dn=[{minStep:6,gap:2},{minStep:3,gap:1}],fn={lower:null,upper:/* @__PURE__ */ new Float64Array,reveal:1},pn=1.12,mn=/* @__PURE__ */ new Map([[`ArrowDown`,`ArrowRight`],[`ArrowUp`,`ArrowLeft`],[`PageDown`,`PageUp`],[`PageUp`,`PageDown`]]),hn=e=>{let t=dn.find(t=>e>=t.minStep)?.gap??0;return e>0?t/e:0},gn=({bandwidth:e,groupCount:t})=>e>=8*t?2:+(e>=3*t);var _n=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=null;#d;#f;#p=!1;#m;#h=!1;#g=0;#_=0;#v=1;#y=[];#b=0;#x=/* @__PURE__ */ new Float64Array;#S=[];#C=null;#w=null;#T=!1;#E=!1;#D=[];#O=/* @__PURE__ */ new Map;#k=0;#A=0;#j=!0;#M=!0;#N=null;#P=new cn({speed:.16});#F=new cn({speed:.2});#I=/* @__PURE__ */ new Map;#L=/* @__PURE__ */ new Map;#R=!1;#z=/* @__PURE__ */ new Map;#B=/* @__PURE__ */ new Map;#V=0;#H=null;#U=null;#W=/* @__PURE__ */ new Map;#G=!1;#K=/* @__PURE__ */ new Map;#q={alpha:0,target:0};#J=-1/0;#Y=!1;#X=null;#Z=null;#Q=null;#$=null;#ee={left:0,top:0,width:0,height:0};#te=null;#ne=/* @__PURE__ */ new Float64Array;#re=[0,1];#ie=null;#ae;#oe=null;#se=!1;#ce=[];#le=[];#ue=[];#de=null;#fe=null;#pe=null;#me=null;#he=void 0;#ge=null;#_e=!1;#ve=null;#ye=null;#be={width:0,height:0};#xe=!1;#Se=!1;#Ce=null;#we=!1;constructor(e){this.#e=e.kind,this.#t=e.elements,this.#ae=e.createHoverLayers??null,this.#n=e.store,this.#d=e.inView??!0,this.#f=e.onScreen??!0,this.#m=this.#d,e.size!=null&&(this.#g=e.size.width,this.#_=e.size.height),this.#v=this.#Xe(),this.#a=e.backend({root:e.elements.root,plot:e.elements.plot,slotName:e.slotName,onColorsChange:this.#Ee}),e.elements.plot.prepend(this.#a.element),this.#n.onSeriesChange=()=>{this.#E=!0,this.#We()},this.#n.onPresentationChange=()=>{this.#Oe(),this.#We()},this.#o=K(e.elements.plot,e=>{let t=this.#Xe();(e.contentRect.width!==this.#g||e.contentRect.height!==this.#_||t!==this.#v)&&(this.#g=e.contentRect.width,this.#_=e.contentRect.height,this.#v=t,this.#K.clear(),this.#fe=null,this.#We())}),this.#d&&this.#De(),this.#l=pe(e.elements.root.ownerDocument,()=>{this.#W.clear(),this.#Be()&&this.#We()}),this.#u=e.elements.root.ownerDocument.defaultView;let t=this.#u;this.#s=t==null?null:U(t,this.#Te),this.#e===`scatter`&&(x(e.scatter!=null,"A scatter ChartEngine needs a `scatter` view factory."),this.#ie=e.scatter({plot:()=>this.#ee,colors:()=>this.#Q,specs:()=>this.#n.seriesSpecs(),rowCount:()=>this.#b,xs:()=>this.#x,zs:()=>this.#ne,columns:()=>this.#D,columnOf:e=>this.#pt(e),paintedValues:(e,t)=>this.#ft(e,`value`,t),definedIndexes:e=>this.#mt(e),reveal:e=>this.#gt(e),shape:e=>this.#n.seriesShape(e),xCoefficients:()=>this.#tt(),yCoefficients:()=>this.#$e(),domains:()=>{let e=this.#F.values(),t=this.#P.values();return{x:[e[0]??0,e[1]??1],y:[t[0]??0,t[1]??1],z:this.#re}},xKey:()=>this.#r.xKey,zKey:()=>this.#r.zKey,is3d:()=>this.#Re(),requestPaint:()=>this.#We()}))}#Te=()=>{this.#v=this.#Xe(),this.#K.clear(),this.#We()};#Ee=()=>{this.#Q=null,this.#We()};destroy(){this.#we=!0,this.#o?.(),this.#s?.(),this.#c?.(),this.#a.destroy(),this.#a.element.remove(),this.#l?.(),this.#n.onSeriesChange=null,this.#n.onPresentationChange=null,this.#Z!=null&&(clearTimeout(this.#Z),this.#Z=null),this.#Ce?.(),this.#Ce=null,this.#oe!=null&&(this.#oe.crosshair.remove(),this.#oe.band.remove(),this.#oe.markers.remove(),this.#oe=null)}setInView(e){e===this.#d||this.#we||(this.#d=e,e&&(this.#De(),(this.#Se||this.#E)&&this.#Ke()))}setOnScreen(e){e===this.#f||this.#we||(this.#f=e,!e&&this.#Se&&(this.#Ae(),this.#We()))}markSeen(){if(this.#m||this.#we)return;this.#m=!0;let e=performance.now(),t=this.#Ne();for(let n of this.#L.values())n.retarget([1],{duration:t,now:e});this.#We()}releaseBackingStores(){this.#we||this.#a.kind===`svg`||(this.#a.release(),this.#Se=!0)}commitNow(){this.#we||(this.#Ce?.(),this.#Ce=null,this.#xe=!1,this.#Je())}attachTooltip(e){this.#t.tooltip===e||this.#we||(this.#c?.(),this.#c=null,this.#be={width:0,height:0},this.#t.tooltip=e,e!=null&&this.#d&&this.#De(),this.#Ge())}paintForPrint(){if(!(this.#we||this.#p)){if(this.#p=!0,this.#g===0||this.#_===0){let e=this.#t.plot.getBoundingClientRect();this.#g=e.width,this.#_=e.height}if(!this.#m){this.#m=!0;let e=performance.now();for(let t of this.#L.values())t.retarget([1],{duration:0,now:e})}this.#Ae(),this.#Se=!0,this.#Je()}}afterPrint(){this.#we||!this.#p||(this.#p=!1,this.#d||this.releaseBackingStores())}#De(){let e=this.#t.tooltip;e!=null&&this.#c==null&&(this.#c=K(e,()=>{this.#Tt()!=null&&(this.#be={width:e.offsetWidth,height:e.offsetHeight},this.#Ge())}))}setOptions(e){let t=this.#r;this.#r=e,t.xScale!==e.xScale&&this.#z.clear(),t.animate&&!e.animate&&this.#Ae(),t.dimensions!==e.dimensions&&this.#ie?.setDimensions(e.dimensions,{glide:this.#Ne()>0&&this.#R}),(t.xKey!==e.xKey||t.xScale!==e.xScale||t.zKey!==e.zKey||t.stacked!==e.stacked)&&(this.#E=!0),(t.yDomain[0]!==e.yDomain[0]||t.yDomain[1]!==e.yDomain[1])&&(this.#fe=null,this.#Oe()),this.#We()}#Oe(){this.#R&&(this.#Ne()===0?this.#P.jump(this.#Ie()):this.#P.aim(this.#Ie(),performance.now()))}setCallbacks(e){this.#i=e}setRows(e){e!==this.#y&&(this.#y=e,this.#E=!0,this.#We())}flushIngest(){!this.#E||this.#we||(this.#E=!1,this.#je())}setControlledActiveIndex(e){let t=this.#ge;this.#ge=null;let n=this.#he!==void 0;if(this.#he=e,e!==void 0){let n=t!=null&&t.index===e&&t.viaKeyboard;this.#jt(e==null?null:this.#Dt(e),{viaKeyboard:n,notify:!1})}else n&&this.#jt(null,{viaKeyboard:!1,notify:!1});this.#Ge()}handlePointerMove(e,t){let n=this.#ie,r=n?.dragTo(e,t)??`none`;if(r!==`none`){r===`rotated`&&(this.#jt(null,{viaKeyboard:!1,notify:!1}),this.#We());return}if(this.#ve=e,this.#ye=t,n!=null){let r=n.hitAt(e,t);this.#pe=r?.seriesKey??null,this.#fe=r==null?null:{x:r.screenX,y:r.screenY},this.#jt(r?.index??null,{viaKeyboard:!1,notify:!0});return}let i=this.#kt(e,t);this.#jt(i,{viaKeyboard:!1,notify:!0})}handlePointerDown(e,t){this.#se=!0,this.#ie?.pressAt(e,t)!==!0&&this.handlePointerMove(e,t)}handlePointerUp(e,t,{activate:n=!0}={}){let r=this.#ie?.release()??`none`,i=this.#se;this.#se=!1,r!==`rotated`&&(r===`tap`&&this.handlePointerMove(e,t),i&&n&&this.handleActivate(e,t))}handlePointerLeave(){this.#ve=null,this.#ye=null,this.#ie?.release(),this.#se=!1,this.#pe=null,this.#fe=null,this.#jt(null,{viaKeyboard:!1,notify:!0})}handleActivate(e,t){let n=this.#ke(e,t);if(n==null)return;let r=this.#Et(n.index),i=this.#y[r];i!=null&&this.#i.onDatumActivate?.({index:r,xValue:this.#Ot(n.index),datum:i,dataKey:n.dataKey})}#ke(e,t){if(e==null||t==null){let e=this.#Tt();return e==null?null:{index:e,dataKey:this.#e===`scatter`?this.#pe:null}}if(this.#ie!=null){let n=this.#ie.hitAt(e,t);return n==null?null:{index:n.index,dataKey:n.seriesKey}}let n=this.#kt(e,t);return n==null?null:{index:n,dataKey:this.#At(n,e,t)}}handleKeyDown(e,{repeat:t=!1}={}){if(this.#b===0)return!1;let n=this.#b-1,r=this.#Tt(),i=this.#G?Math.max(1,Math.floor(this.#b/Math.max(1,this.#ee.width*this.#v))):1,a=Math.max(1,Math.floor(this.#b/10)),o=this.#Ve()?mn.get(e)??e:e,s=(()=>{switch(o){case`ArrowLeft`:return Math.max(0,(r??this.#b)-i);case`ArrowRight`:return Math.min(n,(r??-1)+i);case`PageUp`:return Math.min(n,(r??0)+a);case`PageDown`:return Math.max(0,(r??n)-a);case`Home`:return 0;case`End`:return n;case`Escape`:return r==null?void 0:null;default:return}})();return s===void 0?e!==`Enter`&&e!==` `||r==null?!1:(t||this.handleActivate(null,null),!0):(this.#ve=null,this.#ye=null,this.#pe=null,this.#fe=null,this.#jt(s,{viaKeyboard:!0,notify:!0}),!0)}invalidateColors(){this.#Q!=null&&(this.#Q=null,this.#We())}setColorScope(e,t){let n=this.#$;(n==null||n.className!==e||n.style!==t)&&(this.#$={className:e,style:t},this.invalidateColors())}#Ae(){this.#P.jump(this.#Ie()),this.#F.jump(this.#Le()),this.#ie?.settle(this.#r.dimensions);for(let e of this.#I.values())e.snap();for(let e of this.#L.values())e.snap();this.#q.alpha=this.#q.target}#je(){let e=this.#y,{xScale:t}=this.#r,n=this.#n.seriesSpecs();this.#K.clear();let r=this.#x,i=this.#S,a=Pe({rows:e,xKey:this.#r.xKey,xScale:t,specs:n,zKey:this.#e===`scatter`?this.#r.zKey:null,rootName:this.#He()});this.#b=a.rowCount,this.#x=a.xs,this.#S=a.xValues,this.#C=a.order,this.#w=a.orderInverse,this.#M=a.xsAllIntegers,this.#T=a.xHasTimeOfDay;let o=this.#x[0],s=this.#x[this.#b-1],c=r[0],l=r[r.length-1];if(!this.#Re()&&(t===`linear`||t===`time`)&&o!=null&&s!=null&&c!=null&&l!=null&&o>c&&o<=l&&s>=l){this.#q.target=1;let e=performance.now(),t=e-this.#J;this.#X=t>2e3?null:this.#X==null?t:this.#X*.7+t*.3,this.#J=e,this.#Y=!0}else(o!==c||s!==l)&&(this.#q.target=0,this.#X=null),this.#Y=!1;let u=this.#b,d=t===`band`||t===`point`,f=r.length===u&&u<=2500;if(f){for(let e=0;e<u;e++)if(!(d?vn(i[e],this.#S[e]):r[e]===this.#x[e])){f=!1;break}}let p=this.#O;this.#D=a.columns,this.#O=new Map(n.map((e,t)=>[e.dataKey,t])),this.#k=a.valueMin,this.#A=a.valueMax,this.#j=a.valuesAllIntegers,this.#ne=a.zs,this.#re=a.zExtent==null?[0,1]:Xe(a.zExtent,5),this.#ie?.resetProjection(),this.#fe=null,this.#N=this.#r.stacked?an(this.#D):null,this.#G=this.#e!==`scatter`&&ve({pointCount:u,columnCount:Math.max(1,Math.round(this.#ee.width*this.#v)),wasDecimated:this.#G});let m=this.#Q;if(m!=null){for(let e of this.#n.seriesMeta())if(m.inputs.get(e.dataKey)!==ln(e)){this.#Q=null;break}}this.#Me(n,p,f);let h=this.#Tt();h!=null&&this.#jt(Math.min(h,Math.max(0,u-1)),{viaKeyboard:this.#_e,notify:!1}),this.#Ft({force:!0})}#Me(e,t,n){let r=performance.now(),i=this.#Ne(),a=!this.#R;this.#R=this.#R||this.#b>0,a||i===0?(this.#P.jump(this.#Ie()),this.#F.jump(this.#Le())):(this.#P.aim(this.#Ie(),r),this.#e===`bar`?this.#F.jump(this.#Le()):this.#Y&&this.#X!=null?this.#F.glide(this.#Le(),{now:r,duration:this.#X}):this.#F.aim(this.#Le(),r));let o=this.#b>0&&this.#b<=2500&&n&&!this.#G,s=this.#b<=2500,c=/* @__PURE__ */ new Set,l=/* @__PURE__ */ new Set,u=(e,t,n)=>{c.add(e);let a=this.#I.get(e);a??(a=new sn,this.#I.set(e,a));let s=o&&n&&a.values().length===t.length;a.retarget(t,{duration:s?i:0,now:r})};e.forEach((e,n)=>{l.add(e.dataKey);let i=t.has(e.dataKey);if(s&&this.#N!=null?(u(`${e.dataKey}:lower`,this.#N.lower[n]??/* @__PURE__ */ new Float64Array,i),u(`${e.dataKey}:upper`,this.#N.upper[n]??/* @__PURE__ */ new Float64Array,i)):s&&u(e.dataKey,this.#D[n]??/* @__PURE__ */ new Float64Array,i),!this.#L.has(e.dataKey)&&this.#b>0){let t=new sn,n=this.#Pe();t.retarget([0],{duration:0,now:r}),(this.#m||n===0)&&t.retarget([1],{duration:this.#m?this.#Ne():0,now:r}),this.#L.set(e.dataKey,t)}});for(let e of this.#I.keys())c.has(e)||this.#I.delete(e);for(let e of this.#L.keys())l.has(e)||this.#L.delete(e)}#Ne(){return!(this.#d&&this.#f)&&!this.#p?0:this.#Pe()}#Pe(){return!this.#r.animate||this.#Fe()?0:280}#Fe(){return this.#u!=null&&H(this.#u)}#Ie(){let[e,t]=this.#r.yDomain,n,r;if(this.#N==null?this.#e===`line`||this.#e===`scatter`?(n=this.#k,r=this.#A):(n=Math.min(0,this.#k),r=Math.max(0,this.#A)):(n=Math.min(0,this.#N.min),r=Math.max(0,this.#N.max)),typeof e==`number`&&(n=e),typeof t==`number`&&(r=t),this.#b===0)return[0,1];if(this.#e===`bar`&&!this.#ze())return[typeof e==`number`?e:n*pn,typeof t==`number`?t:r*pn||(n<0?0:1)];let i=this.#e===`bar`||this.#e===`area`?Ze([n,r],5):Xe([n,r],5);return[typeof e==`number`?e:i[0],typeof t==`number`?t:i[1]]}#Le(){if(this.#b===0)return[0,1];let e=this.#x[0]??0,t=this.#x[this.#b-1]??0;return e===t?[e-.5,t+.5]:this.#e===`scatter`?Xe([e,t],5):[e,t]}#Re(){return this.#e===`scatter`&&this.#r.zKey!=null}#ze(){let e=this.#n.getSnapshot();return e.xAxis!=null||e.yAxis!=null||e.grid!=null}#Be(){return this.#ze()||this.#Re()||this.#n.getSnapshot().referenceLines.some(e=>e.label!=null&&e.label.length>0)}#Ve(){return this.#e===`bar`&&this.#r.orientation===`horizontal`}#He(){return`${je[this.#e].split(`.`)[0]??`Chart`}.Root`}#Ue(e,t){let n=this.#W.get(t);return n??(this.#W.size>=512&&this.#W.clear(),n=e.measureText(t).width,this.#W.set(t,n)),n}#We(){this.#Se=!0,this.#h=!0,this.#Ke()}#Ge(){this.#Ke()}#Ke(){let e=this.#u;this.#xe||this.#we||e==null||(this.#xe=!0,this.#Ce=_e(e,this.#qe))}#qe=()=>{this.#xe=!1,this.#Ce=null,this.#Je()};#Je(){if(!this.#we){if(this.flushIngest(),this.#Se&&!this.#d&&!this.#p)this.#h&&(this.#h=!1,this.#Qe());else if(this.#Se){this.#Se=!1,this.#h=!1;let e=performance.now(),t=!1,n=this.#Ve()?this.#ee.width:this.#ee.height;t=this.#P.tick(e,this.#Ye(this.#P,n))||t,t=this.#F.tick(e,this.#Ye(this.#F,this.#ee.width))||t;for(let n of this.#I.values())t=n.tick(e)||t;for(let n of this.#L.values())t=n.tick(e)||t;t=(this.#ie?.tick(e)??!1)||t,this.#g>0&&this.#_>0&&this.#Ze(),this.#Qe(),t=this.#ct(e)||t,t&&this.#We()}this.#It()}}#Ye(e,t){let n=e.values(),r=Math.abs((n[1]??0)-(n[0]??0));return t>0&&Number.isFinite(r)?r*.5/(t*this.#v):0}#Xe(){return typeof devicePixelRatio==`number`&&devicePixelRatio>0?Math.min(devicePixelRatio,3):1}#Ze(){let e=this.#a.paintSignature({devicePixelRatio:this.#v,orientation:this.#r.orientation});if(this.#Q?.signature===e)return;let t=this.#a.resolvePaint({series:this.#n.seriesMeta(),devicePixelRatio:this.#v,orientation:this.#r.orientation,signature:e});t!=null&&(this.#W.clear(),this.#Q=t)}#Qe(){let e=this.#n.getSnapshot(),t=this.#Re(),n=this.#Ve(),r=!t&&e.xAxis!=null,i=!t&&e.yAxis!=null,a=n?r:i,o=n?i:r,s=this.#e===`bar`&&!this.#ze()?0:8,c=s,l=o?24:s,u=Math.max(0,this.#_-c-l);this.#ee={left:s,top:c,width:Math.max(0,this.#g-s*2),height:u};let d=s;if(a){d=40;let e=this.#Q==null?null:this.#a.measureContext();if(e!=null&&this.#Q!=null){e.font=`11px ${this.#Q.fontFamily()}`;let t=0,r=n?this.#it().map(e=>e.text):this.#rt().map(e=>e.text);for(let n of r){let r=this.#Ue(e,n);r>t&&(t=r)}d=Math.ceil(t)+14}}this.#ee={left:d,top:c,width:Math.max(0,this.#g-d-s),height:u};let f=n?this.#ee.top:this.#ee.left,p=n?this.#ee.top+this.#ee.height:this.#ee.left+this.#ee.width;if(this.#r.xScale===`band`){let e=hn((p-f)/Math.max(1,this.#b));this.#te=We({count:this.#b,rangeStart:f,rangeEnd:p,paddingInner:e,paddingOuter:e/2})}else this.#te=this.#r.xScale===`point`?We({count:this.#b,rangeStart:f,rangeEnd:p,paddingInner:1,paddingOuter:.5}):null;this.#G=this.#e!==`scatter`&&ve({pointCount:this.#b,columnCount:Math.max(1,Math.round(this.#ee.width*this.#v)),wasDecimated:this.#G})}#$e(){let e=this.#P.values();return Ue([e[0]??0,e[1]??1],[this.#ee.top+this.#ee.height,this.#ee.top])}#et(){let e=this.#P.values(),t=this.#Ve()?[this.#ee.left,this.#ee.left+this.#ee.width]:[this.#ee.top+this.#ee.height,this.#ee.top];return Ue([e[0]??0,e[1]??1],t)}#tt(){let e=this.#F.values();return Ue([e[0]??0,e[1]??1],[this.#ee.left,this.#ee.left+this.#ee.width])}#nt(e){let t=this.#te;if(t!=null)return Ge(t,e);let{k:n,b:r}=this.#tt();return(this.#x[e]??0)*n+r}#rt(){let e=this.#n.getSnapshot(),t=this.#P.values(),n=e.yAxis?.tickCount,r=this.#Ve()?1/0:Math.max(2,Math.floor(this.#ee.height/28)),i=Math.min(n??1/0,r),a=n??5,o=e.yAxis?.tickFormat,s=`${t[0]}|${t[1]}|${i}|${a}|${this.#j}`,c=this.#H;if(c!=null&&c.key===s&&c.format===o)return c.ticks;let l=Ye([t[0]??0,t[1]??1],i,{count:a,integer:this.#j}),u=l.length>1?Math.abs((l[1]??0)-(l[0]??0)):0,d=Math.abs((t[1]??1)-(t[0]??0)),f=l.length>1?u:d,p=f>0?Te(f):void 0,m=l.map(e=>{let t=q(e,p==null?void 0:{maximumFractionDigits:p});return{value:e,text:o==null?t:o(e,{defaultLabel:t,step:u})}});return this.#H={key:s,format:o,ticks:m},m}#it(){let e=this.#n.getSnapshot().xAxis?.tickFormat,t=this.#ot(),n=this.#U;if(n!=null&&n.key===t&&n.format===e&&n.xValues===this.#S)return n.ticks;let r=this.#st();return this.#U={key:t,format:e,xValues:this.#S,ticks:r},r}#at(){let{xScale:e}=this.#r;return e===`band`||e===`point`}#ot(){if(this.#at()){let e=this.#Ve();return`band|${e}|${e?this.#ee.height:this.#ee.width}|${this.#b}|${this.#T}`}let e=this.#F.values(),t=this.#n.getSnapshot().xAxis?.tickCount;return`${this.#r.xScale}|${e[0]}|${e[1]}|${t}|${this.#ee.width}|${this.#M}`}#st(){let e=this.#n.getSnapshot(),t=e.xAxis?.tickFormat;if(this.#at()){let e=this.#Ve(),n=e?this.#ee.height:this.#ee.width,r=Math.max(1,Math.floor(n/(e?15:60))),i=Math.max(1,Math.ceil(this.#b/r)),a=[];for(let e=0;e<this.#b;e+=i){let n=this.#S[e]??``,r=Ae(n,{datasetHasTimeOfDay:this.#T});a.push({index:e,value:e,text:t==null?r:t(n,{defaultLabel:r})})}return a}let n=this.#F.values(),r=[n[0]??0,n[1]??1],i=e.xAxis?.tickCount??Math.max(2,Math.floor(this.#ee.width/90));if(this.#r.xScale===`time`)return vt(r,i).map(e=>{let n=Ct(e);return{index:null,value:e,text:t==null?n:t(new Date(e),{defaultLabel:n})}});let a=Je(r,i,{integer:this.#M}),o=a.length>1?Te(Math.abs((a[1]??0)-(a[0]??0))):void 0;return a.map(e=>{let n=q(e,o==null?void 0:{maximumFractionDigits:o});return{index:null,value:e,text:t==null?n:t(e,{defaultLabel:n})}})}#ct(e){let t=this.#Q;if(t==null||this.#g<=0||this.#_<=0)return!1;let n=this.#a.begin({cssWidth:this.#g,cssHeight:this.#_,devicePixelRatio:this.#v});if(n==null)return!1;let r=this.#lt(n,t,e);return this.#a.end(),r}#lt(e,t,n){let r=Math.min(50,Math.max(0,n-this.#V));this.#V=n;let i=this.#n.getSnapshot(),a=this.#ee;if(a.width<=0||a.height<=0)return!1;let o=this.#$e(),s=this.#tt(),c=this.#n.seriesSpecs(),l=this.#Re(),u=this.#p||this.#Ne()===0,d=this.#ze(),f=l||!d?[]:this.#ut(e,t.fontFamily()),p=l||!d?[]:this.#dt(e,t.fontFamily()),m=yn(this.#z,f,r,u);m=yn(this.#B,p,r,u)||m;let h=this.#q;if(h.target===1){if(n-this.#J>un)h.target=0;else if(this.#Z==null){let e=un-(n-this.#J)+17;this.#Z=setTimeout(()=>{this.#Z=null,this.#We()},e)}}if(u)h.alpha=h.target;else{let e=1-(1-(h.target>h.alpha?.16:.08))**(r/16.67);h.alpha+=(h.target-h.alpha)*e,Math.abs(h.target-h.alpha)<.02&&(h.alpha=h.target)}h.alpha!==h.target&&(m=!0);let g=this.#Ve(),_=g?this.#et():o,v=e=>this.#te==null?e*s.k+s.b:Ge(this.#te,e),y=e=>e*_.k+_.b,b=[...this.#z.entries()].map(([e,t])=>({position:v(e),alpha:t.alpha})),x=[...this.#B.entries()].map(([e,t])=>({position:y(e),alpha:t.alpha})),S=()=>{if(i.grid==null||l)return;let n=i.grid.lines??(g?`vertical`:`horizontal`),r=g?b:x,o=g?x:b;Lt(e,{plot:a,color:t.chrome.grid,xLines:n===`horizontal`?[]:o,yLines:n===`vertical`?[]:r})},C=Math.min(40,a.width*.25),w=h.alpha>.01&&C>1,T={labels:null};this.#a.composite(e,{underlay:S,marks:()=>{e.save(),e.beginPath(),e.rect(a.left,a.top,a.width,a.height+1),e.clip(),this.#e===`bar`?g?this.#xt(e,c):this.#bt(e,c,o):this.#e===`scatter`?T.labels=this.#ie?.paint(e)??null:this.#St(e,c,o),e.restore()},fade:w?{left:a.left,top:a.top,width:C,height:a.height+1,alpha:h.alpha}:null}),T.labels!=null&&this.#ie?.paintLabels(e,T.labels),this.#e===`bar`&&this.#b>0&&this.#ze()&&(g?Bt(e,{plot:a,color:t.chrome.baseline,x:y(0)}):zt(e,{plot:a,color:t.chrome.baseline,y:y(0)}));for(let n of l?[]:i.referenceLines){let r=y(n.y);if(g?r<a.left||r>a.left+a.width:r<a.top||r>a.top+a.height)continue;let i=n.color==null?t.chrome.reference:t.resolve(n.color);g?nn(e,{plot:a,color:i,textColor:t.chrome.tickText,x:r,label:n.label,fontFamily:t.fontFamily()}):tn(e,{plot:a,color:i,textColor:t.chrome.tickText,y:r,label:n.label,fontFamily:t.fontFamily()})}let E=i.xAxis==null||l?[]:[...this.#z.entries()].map(([e,t])=>({position:v(e),text:t.text,alpha:t.alpha})),D=i.yAxis==null||l?[]:[...this.#B.entries()].map(([e,t])=>({position:y(e),text:t.text,alpha:t.alpha})),O=g?D:E,k=g?E:D;return(O.length>0||k.length>0)&&rn(e,{plot:a,color:t.chrome.tickText,fontFamily:t.fontFamily(),xLabels:O,yLabels:k}),m}#ut(e,t){e.font=`11px ${t}`;let n=this.#Ve(),r=this.#tt(),i=[],a=-1/0;for(let t of this.#it()){let o=t.index!=null&&this.#te!=null,s=o&&this.#te!=null?Ge(this.#te,t.index??0):t.value*r.k+r.b,c=n?15/2:this.#Ue(e,t.text)/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}#dt(e,t){let n=this.#rt(),r=this.#et();if(!this.#Ve()){let e=[],t=NaN;for(let i of n){let n=i.value*r.k+r.b;Math.abs(n-t)<13||(t=n,e.push({key:i.value,text:i.text}))}return e}e.font=`11px ${t}`;let i=[],a=-1/0;for(let t of n){let n=t.value*r.k+r.b,o=this.#Ue(e,t.text)/2;n-o<a+8||(a=n+o,i.push({key:t.value,text:t.text}))}return i}#ft(e,t,n){let r=t===`value`?e.dataKey:`${e.dataKey}:${t}`;if(!this.#G&&this.#b<=2500){let e=this.#I.get(r);if(e!=null&&e.values().length===this.#b)return e.values()}return t===`value`?this.#D[n]??/* @__PURE__ */ new Float64Array:(t===`lower`?this.#N?.lower:this.#N?.upper)?.[n]??/* @__PURE__ */ new Float64Array}#pt(e){let t=this.#O.get(e);return t==null?void 0:this.#D[t]}#mt(e){let t=[];for(let n=0;n<this.#b;n++)Number.isNaN(e[n]??NaN)||t.push(n);return t}#ht(e){return this.#ue.length!==e&&(this.#ue=Array.from({length:e},(e,t)=>t)),this.#ue}#gt(e){return this.#L.get(e)?.values()[0]??1}#_t(e){let t=e.map(e=>this.#gt(e.dataKey));if(this.#N==null)return e.map((e,n)=>({lower:null,upper:this.#ft(e,`value`,n),reveal:t[n]??1}));let n=e.map((e,t)=>this.#ft(e,`lower`,t)),r=e.map((e,t)=>this.#ft(e,`upper`,t));if(t.every(e=>e>=1))return e.map((e,t)=>({lower:n[t]??null,upper:r[t]??/* @__PURE__ */ new Float64Array,reveal:1}));let i=le({lower:n,upper:r,reveal:t,count:this.#b});return e.map((e,t)=>({lower:i.lower[t]??null,upper:i.upper[t]??/* @__PURE__ */ new Float64Array,reveal:1}))}#vt(e,t){if(e==null)return 0;let n=e[t]??0;return Number.isNaN(n)?0:n}#yt(e,t,n){let r=this.#N;if(r==null)return!0;let i=r.lower[e]?.[t]??NaN,a=r.upper[e]?.[t]??NaN;if(Number.isNaN(i)||Number.isNaN(a))return!1;let o=i<0,s=(o?r.negativeEnd:r.positiveEnd)[t]??-1;if(s<0)return!1;let c=(o?r.lower:r.upper)[s]?.[t]??NaN;return B({lower:i,upper:a,pileOuter:c,toPixel:n})}#bt(e,t,n){let r=this.#te,i=this.#Q;if(r==null||i==null||this.#b===0||t.length===0)return;let a=this.#N!=null,o=a?1:t.length,s=gn({bandwidth:r.bandwidth,groupCount:o}),c=(r.bandwidth-s*(o-1))/o,l=L({step:r.step,slot:c}),u=e=>e*n.k+n.b,d=+!!a,f=this.#ce,p=this.#_t(t);t.forEach((t,n)=>{let{lower:m,upper:h,reveal:g}=p[n]??fn,_=0;for(let e=0;e<this.#b;e++){let t=h[e]??NaN;if(Number.isNaN(t))continue;let i=this.#vt(m,e),p=a?Z(r,e)+(r.bandwidth-l)/2:Z(r,e)+(r.bandwidth-(c*o+s*(o-1)))/2+n*(c+s)+(c-l)/2,v=se({lower:i,upper:t,toPixel:u,reveal:g,gap:d}),y=f[_]??wn();f[_]=y,_+=1,y.x=p,y.width=l,y.baselineY=v.baseline,y.valueY=v.value,y.rounded=this.#yt(n,e,u),y.roundedBase=ce({baseline:v.baseline,toPixel:u})}Ht(e,{fill:i.barFills.get(t.dataKey)??i.series.get(t.dataKey)??`currentColor`,rects:f,count:_})})}#xt(e,t){let n=this.#te,r=this.#Q;if(n==null||r==null||this.#b===0||t.length===0)return;let i=this.#et(),a=this.#N!=null,o=a?1:t.length,s=gn({bandwidth:n.bandwidth,groupCount:o}),c=(n.bandwidth-s*(o-1))/o,l=L({step:n.step,slot:c}),u=e=>e*i.k+i.b,d=+!!a,f=this.#le,p=this.#_t(t);t.forEach((t,i)=>{let{lower:m,upper:h,reveal:g}=p[i]??fn,_=0;for(let e=0;e<this.#b;e++){let t=h[e]??NaN;if(Number.isNaN(t))continue;let r=this.#vt(m,e),p=a?Z(n,e)+(n.bandwidth-l)/2:Z(n,e)+(n.bandwidth-(c*o+s*(o-1)))/2+i*(c+s)+(c-l)/2,v=se({lower:r,upper:t,toPixel:u,reveal:g,gap:d}),y=f[_]??Tn();f[_]=y,_+=1,y.y=p,y.height=l,y.baselineX=v.baseline,y.valueX=v.value,y.rounded=this.#yt(i,e,u),y.roundedBase=ce({baseline:v.baseline,toPixel:u})}Ut(e,{fill:r.barFills.get(t.dataKey)??r.series.get(t.dataKey)??`currentColor`,rects:f,count:_})})}#St(e,t,n){let r=this.#Q;if(r==null||this.#b===0)return;let i=this.#tt(),a=this.#te,o=e=>a==null?(this.#x[e]??0)*i.k+i.b:Ge(a,e);t.forEach((t,i)=>{let a=r.series.get(t.dataKey)??`currentColor`,s=this.#gt(t.dataKey);if(e.save(),s<1&&(e.beginPath(),e.rect(this.#ee.left,0,this.#ee.width*s,this.#_),e.clip()),this.#G){this.#Ct(e,t,i,a,n),e.restore();return}let c=t.mark===`area`,l=this.#ft(t,this.#N==null?`value`:`upper`,i),u=this.#N==null?null:this.#ft(t,`lower`,i),d=e=>!Number.isNaN(l[e]??NaN),f=t.connectNulls?this.#mt(l):this.#ht(this.#b),p=e=>(l[e]??0)*n.k+n.b;if(c){let r=u==null?()=>0*n.k+n.b:e=>(u[e]??0)*n.k+n.b;Gt(e,{color:a,curve:t.curve,indexes:f,xAt:o,y0At:r,y1At:p,definedAt:d})}else Wt(e,{color:a,curve:t.curve,indexes:f,xAt:o,yAt:p,definedAt:d}),t.markers&&this.#ee.width/this.#b>=12&&en(e,{color:a,surface:r.chrome.surface,shape:t.shape,indexes:f,xAt:o,yAt:p,definedAt:d});e.restore()})}#Ct(e,t,n,r,i){let a=Math.max(1,Math.round(this.#ee.width*this.#v)),o=e=>this.#ee.left+(e+.5)/this.#v;if(t.mark===`area`){let s=this.#wt(`${t.dataKey}:upper`,this.#ft(t,this.#N==null?`value`:`upper`,n),a),c=this.#N==null?null:this.#wt(`${t.dataKey}:lower`,this.#ft(t,`lower`,n),a);if(c==null){let t=this.#de;t?.columnCount!==a&&(t=En(a),this.#de=t),qt(e,{color:r,lowerColumns:t,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b})}else qt(e,{color:r,lowerColumns:c,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b});return}let s=this.#wt(t.dataKey,this.#ft(t,`value`,n),a);Kt(e,{color:r,columns:s,columnToX:o,valueK:i.k,valueB:i.b})}#wt(e,t,n){let r=this.#F.values(),i=`${r[0]??0}:${r[1]??1}:${n}`,a=this.#K.get(e);if(a!=null&&a.key===i)return a.columns;let o=[r[0]??0,r[1]??1],s=Ue(o,[0,n]),c=ye({xs:this.#x,values:t,startIndex:0,endIndex:this.#b-1,positionK:s.k,positionB:s.b,columnCount:n});return this.#K.set(e,{key:i,columns:c}),c}#Tt(){if(this.#b===0)return null;let e;return e=this.#he===void 0?this.#me:this.#he==null?null:this.#Dt(this.#he),e==null?null:Math.min(Math.max(0,e),this.#b-1)}#Et(e){return this.#C==null?e:this.#C[e]??e}#Dt(e){if(this.#y.length===0)return null;let t=Math.min(Math.max(0,e),this.#y.length-1);if(this.#w==null)return t;let n=this.#w[t]??-1;return n===-1?null:n}#Ot(e){if(e<0||e>=this.#b)return``;let{xScale:t}=this.#r;if(t===`band`||t===`point`)return this.#S[e]??``;let n=this.#x[e]??0;return t===`time`?new Date(n):n}#kt(e,t){if(this.#b===0)return null;let n=this.#te;if(n!=null)return qe(n,this.#Ve()?t:e);let{k:r,b:i}=this.#tt();if(r===0)return 0;let a=e;if(this.#G){let t=Math.floor((e-this.#ee.left)*this.#v);a=this.#ee.left+(t+.5)/this.#v}return Fe(this.#x,this.#b,(a-i)/r)}#At(e,t,n){let r=this.#n.seriesSpecs(),i=this.#Ve(),a=this.#te;if(this.#e===`bar`&&this.#N==null&&a!=null&&r.length>1){let o=(i?n:t)-Z(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.#et():this.#$e(),c=i?t:n,l=this.#N;if(this.#e===`bar`&&l!=null)for(let t=0;t<r.length;t++){let n=l.lower[t]?.[e]??NaN,i=l.upper[t]?.[e]??NaN;if(Number.isNaN(n)||Number.isNaN(i)||n===i)continue;let a=n*o+s,u=i*o+s;if(c>=Math.min(a,u)&&c<=Math.max(a,u))return r[t]?.dataKey??null}let u=null,d=1/0;return r.forEach((t,n)=>{let r=(this.#N==null?this.#pt(t.dataKey):this.#N.upper[n])?.[e]??NaN;if(Number.isNaN(r))return;let i=Math.abs(r*o+s-c);i<d&&(d=i,u=t.dataKey)}),u}#jt(e,t){let n=e==null||this.#b===0?null:Math.min(Math.max(0,e),this.#b-1),r=this.#he!==void 0;if(t.notify&&n!==this.#Tt()){let e=n==null?null:this.#Et(n);if(this.#i.onActiveIndexChange?.(e),r){this.#ge={index:e,viaKeyboard:t.viaKeyboard};return}}this.#_e=t.viaKeyboard,r||(this.#me=n),this.#Ft(),this.#Ge()}#Mt=null;#Nt=!1;#Pt=null;#Ft(e={force:!1}){let t=this.#Tt();if(!e.force&&t===this.#Mt&&this.#_e===this.#Nt&&this.#pe===this.#Pt)return;if(this.#Mt=t,this.#Nt=this.#_e,this.#Pt=this.#pe,t==null||this.#b===0){this.#n.publishHover(null);return}let n=this.#Et(t),r=this.#y[n]??{},i=this.#n.getSnapshot().series.map(e=>{let n=this.#pt(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.#pe==null?i.filter(e=>e.value!=null):i.filter(e=>e.dataKey===this.#pe));let a={index:n,xValue:this.#Ot(t),datum:r,points:i,viaKeyboard:this.#_e};if(this.#r.stacked&&i.length>1&&(a.total=i.reduce((e,t)=>e+(t.value??0),0)),this.#Re()){let e=this.#ne[t]??NaN;a.zValue=Number.isNaN(e)?null:e}this.#n.publishHover(a)}#It(){let e=this.#Tt(),t=e!=null&&this.#b>0,n=this.#oe??(t?this.#Lt():null);if(n==null)return;let{tooltip:r}=this.#t,{crosshair:i,band:a,markers:o}=n,s=this.#e===`bar`,c=this.#e===`scatter`;if(i.style.opacity=t&&!s&&!c?`1`:`0`,a.style.opacity=t&&s?`1`:`0`,o.style.opacity=t&&!s?`1`:`0`,r!=null&&(r.style.opacity=t?`1`:`0`),!t)return;let l=this.#ee;if(c){let t=this.#fe??this.#ie?.screenFor(e)??null;if(t==null){o.style.opacity=`0`,r!=null&&(r.style.opacity=`0`);return}for(;o.children.length>1;)o.lastElementChild?.remove();o.children.length===0&&o.appendChild(xn(o.ownerDocument));let n=o.children[0];if(n instanceof HTMLElement){let r=this.#n.getSnapshot().series,i=this.#pe==null?r.find(t=>{let n=this.#pt(t.dataKey)?.[e]??NaN;return!Number.isNaN(n)}):r.find(e=>e.dataKey===this.#pe);n.style.opacity=`1`,Cn(n,i?.shape??`circle`,i?.color??`currentColor`),n.style.transform=`translate(${t.x}px, ${t.y}px)`}this.#Rt(t.x,t.y);return}let u=this.#nt(e),d=this.#Ve();if(s){let t=this.#te;if(t!=null){let n=Ke(t,e),r=Math.max(1,n.size),i=n.start-(r-n.size)/2;d?(a.style.transform=`translate(${l.left}px, ${i}px)`,a.style.width=`${l.width}px`,a.style.height=`${r}px`):(a.style.transform=`translate(${i}px, ${l.top}px)`,a.style.width=`${r}px`,a.style.height=`${l.height}px`)}}else{i.style.transform=`translate(${u}px, ${l.top}px)`,i.style.height=`${l.height}px`;let t=this.#n.getSnapshot().series;for(;o.children.length>t.length;)o.lastElementChild?.remove();for(;o.children.length<t.length;)o.appendChild(xn(o.ownerDocument));let n=this.#$e();t.forEach((t,r)=>{let i=o.children[r];if(!(i instanceof HTMLElement))return;let a=this.#pt(t.dataKey)?.[e]??NaN,s=this.#ft(t,this.#N==null?`value`:`upper`,r)[e]??NaN;Number.isNaN(a)||Number.isNaN(s)?i.style.opacity=`0`:(i.style.opacity=`1`,Cn(i,t.shape,t.color),i.style.transform=`translate(${u}px, ${s*n.k+n.b}px)`)})}s&&d&&this.#te!=null?this.#Rt(this.#ve??l.left+l.width/2,Ge(this.#te,e)):this.#Rt(u,this.#ye??l.top+8)}#Lt(){if(this.#ae==null)return null;let e=this.#ae();return this.#t.plot.append(e.crosshair,e.band,e.markers),this.#oe=e,e}#Rt(e,t){let n=this.#ee,r=this.#t.tooltip;if(r==null)return;this.#d&&this.#be.width===0&&this.#be.height===0&&(this.#be={width:r.offsetWidth,height:r.offsetHeight});let i=this.#be,a=e+12;a+i.width>n.left+n.width&&e-12-i.width>=n.left&&(a=e-12-i.width);let o=Math.max(0,Math.min(t-i.height/2,n.top+n.height-i.height));r.style.transform=`translate(${a}px, ${o}px)`}};const vn=(e,t)=>e instanceof Date&&t instanceof Date?Object.is(e.getTime(),t.getTime()):Object.is(e,t),yn=(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}n.target===1&&n.alpha>.98&&(n.alpha=1),n.target===0&&n.alpha<.03?e.delete(t):n.alpha!==n.target&&(o=!0)}return o},bn={circle:`circle(50%)`,square:`inset(8%)`,triangle:`polygon(50% 0%, 100% 100%, 0% 100%)`,diamond:`polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)`,"triangle-down":`polygon(0% 0%, 100% 0%, 50% 100%)`,plus:`polygon(33.33% 0%, 66.67% 0%, 66.67% 33.33%, 100% 33.33%, 100% 66.67%, 66.67% 66.67%, 66.67% 100%, 33.33% 100%, 33.33% 66.67%, 0% 66.67%, 0% 33.33%, 33.33% 33.33%)`,cross:`polygon(73.57% 2.86%, 97.14% 26.43%, 73.57% 50%, 97.14% 73.57%, 73.57% 97.14%, 50% 73.57%, 26.43% 97.14%, 2.86% 73.57%, 26.43% 50%, 2.86% 26.43%, 26.43% 2.86%, 50% 26.43%)`,star:`polygon(50% 2.45%, 61.8% 38.77%, 100% 38.77%, 69.1% 61.23%, 80.9% 97.55%, 50% 75.1%, 19.1% 97.55%, 30.9% 61.23%, 0% 38.77%, 38.2% 38.77%)`},xn=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`,t.style.forcedColorAdjust=`none`;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},Sn=/* @__PURE__ */ new WeakMap,Cn=(e,t,n)=>{let r=Sn.get(e);if(r?.shape===t&&r.color===n)return;Sn.set(e,{shape:t,color:n});let i=bn[t];e.setAttribute(`data-shape`,t);let[a,o]=e.children;a instanceof HTMLElement&&(a.style.clipPath=i),o instanceof HTMLElement&&(o.style.clipPath=i,o.style.backgroundColor=n)},wn=()=>({x:0,width:0,baselineY:0,valueY:0,rounded:!1,roundedBase:!1}),Tn=()=>({y:0,height:0,baselineX:0,valueX:0,rounded:!1,roundedBase:!1}),En=e=>{let t=new Float64Array(e);return{columnCount:e,hasData:new Uint8Array(e).fill(1),minValue:t,maxValue:t,inValue:t,outValue:t}},Dn=1.5,On=1.1,kn=1.6,An=e=>`color-mix(in oklab, ${e} 25%, var(--background-color-card))`,jn=(e,t,n)=>{let r=Dn;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)):(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))},Mn=(e,t)=>{let{size:n,width:r}=t;e.fillRect(0,n/2-r/2,n,r)},Nn=(e,t)=>{let{size:n,width:r}=t;e.fillRect(n/2-r/2,0,r,n)},Pn={hatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=Dn,e.beginPath(),jn(e,t,`up`),e.stroke()},"hatch-reverse":(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=Dn,e.beginPath(),jn(e,t,`down`),e.stroke()},crosshatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=1,e.beginPath(),jn(e,t,`up`),jn(e,t,`down`),e.stroke()},perpendicular:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?Nn(e,{size:t,width:2}):Mn(e,{size:t,width:2})},parallel:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?Mn(e,{size:t,width:2}):Nn(e,{size:t,width:2})},grid:(e,{size:t,ink:n})=>{e.fillStyle=n,Mn(e,{size:t,width:On}),Nn(e,{size:t,width:On})},dots:(e,{size:t,ink:n})=>{e.fillStyle=n,e.beginPath(),e.arc(t/4,t/4,kn,0,Math.PI*2),e.moveTo(3*t/4+kn,3*t/4),e.arc(3*t/4,3*t/4,kn,0,Math.PI*2),e.fill()}},Fn=(e,t)=>{let{texture:n,ground:r,ink:i,orientation:a}=t;e.fillStyle=r,e.fillRect(0,0,8,8),Pn[n](e,{size:8,ink:i,orientation:a})},In=e=>{let t=f(3),n,r;return t[0]===e?(n=t[1],r=t[2]):(n=()=>e.getSnapshot().orientation,r=()=>e.getSnapshot().orientation,t[0]=e,t[1]=n,t[2]=r),b(e.subscribe,n,r)},Ln=(e,t,n=3)=>`repeating-linear-gradient(${e}, ${t} 0, ${t} 1px, transparent 1px, transparent ${n}px)`,Rn=`forced-color-adjust-none [print-color-adjust:exact] [-webkit-print-color-adjust:exact]`,zn={hatch:({ink:e})=>({backgroundImage:Ln(`135deg`,e)}),"hatch-reverse":({ink:e})=>({backgroundImage:Ln(`45deg`,e)}),crosshatch:({ink:e})=>({backgroundImage:`${Ln(`135deg`,e,4)}, ${Ln(`45deg`,e,4)}`}),perpendicular:({ink:e,orientation:t})=>({backgroundImage:Ln(t===`horizontal`?`90deg`:`0deg`,e)}),parallel:({ink:e,orientation:t})=>({backgroundImage:Ln(t===`horizontal`?`0deg`:`90deg`,e)}),grid:({ink:e})=>({backgroundImage:`${Ln(`0deg`,e,4)}, ${Ln(`90deg`,e,4)}`}),dots:({ink:e})=>({backgroundImage:`radial-gradient(circle at 1px 1px, ${e} 0.75px, transparent 0.8px)`,backgroundSize:`3px 3px`})},Bn=(e,t,n)=>e===`solid`?{}:{backgroundColor:An(t),...zn[e]({ink:t,orientation:n})},Vn=e=>{let t=f(31),{series:r,orientation:i}=e;if(r.mark===`bar`){let e=r.texture,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=n(`size-2 shrink-0 rounded-[2px]`,Rn),t[0]=a):a=t[0];let o=r.color,s;t[1]!==i||t[2]!==r.color||t[3]!==r.texture?(s=Bn(r.texture,r.color,i),t[1]=i,t[2]=r.color,t[3]=r.texture,t[4]=s):s=t[4];let c;t[5]!==r.color||t[6]!==s?(c={backgroundColor:o,...s},t[5]=r.color,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==r.texture||t[9]!==c?(l=/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-texture":e,className:a,style:c}),t[8]=r.texture,t[9]=c,t[10]=l):l=t[10],l}if(r.mark===`line`){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=n(`absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full`,Rn),t[11]=e):e=t[11];let i;t[12]===r.color?i=t[13]:(i=/* @__PURE__ */ C(`span`,{className:e,style:{backgroundColor:r.color}}),t[12]=r.color,t[13]=i);let a=r.shape,o;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(o=n(`relative size-2`,Rn),t[14]=o):o=t[14];let s=bn[r.shape],c;t[15]!==r.color||t[16]!==s?(c={backgroundColor:r.color,clipPath:s},t[15]=r.color,t[16]=s,t[17]=c):c=t[17];let l;t[18]!==r.shape||t[19]!==c?(l=/* @__PURE__ */ C(`span`,{"data-shape":a,className:o,style:c}),t[18]=r.shape,t[19]=c,t[20]=l):l=t[20];let u;return t[21]!==i||t[22]!==l?(u=/* @__PURE__ */ w(`span`,{"aria-hidden":!0,className:`relative flex h-2 w-3 shrink-0 items-center justify-center`,children:[i,l]}),t[21]=i,t[22]=l,t[23]=u):u=t[23],u}let a=r.shape,o;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(o=n(`size-2 shrink-0`,Rn),t[24]=o):o=t[24];let s=bn[r.shape],c;t[25]!==r.color||t[26]!==s?(c={backgroundColor:r.color,clipPath:s},t[25]=r.color,t[26]=s,t[27]=c):c=t[27];let l;return t[28]!==r.shape||t[29]!==c?(l=/* @__PURE__ */ C(`span`,{"aria-hidden":!0,"data-shape":a,className:o,style:c}),t[28]=r.shape,t[29]=c,t[30]=l):l=t[30],l},Hn=e=>{let r=f(27),i,a,o,s,c,l;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6]):({partName:o,slotName:l,className:a,children:i,ref:c,...s}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c,r[6]=l);let u=F(o),d=ie(u.store),p=In(u.store),m=v(null),g=t(m,c),[_,b]=y(!1),x;r[7]===d.length?x=r[8]:(x=()=>{let e=m.current;if(!(e==null||d.length<2))return K(e,()=>{b(e.scrollHeight>e.clientHeight)})},r[7]=d.length,r[8]=x);let S;if(r[9]===d?S=r[10]:(S=[d],r[9]=d,r[10]=S),h(x,S),d.length<2)return null;let T=`${l}-legend`,E;r[11]===a?E=r[12]:(E=n(`text-muted focus-visible:ring-focus-accent flex max-h-16 shrink-0 flex-wrap items-center gap-x-4 gap-y-1 overflow-y-auto rounded-sm pt-3 text-xs focus:outline-hidden focus-visible:ring-2`,a),r[11]=a,r[12]=E);let D;r[13]===_?D=r[14]:(D=_&&{role:`group`,"aria-label":`Legend`,tabIndex:0},r[13]=_,r[14]=D);let O;r[15]!==i||r[16]!==p||r[17]!==d||r[18]!==l?(O=i==null?d.map(e=>/* @__PURE__ */ w(`div`,{className:`flex items-center gap-1.5`,children:[/* @__PURE__ */ C(Vn,{series:e,orientation:p}),e.label]},e.dataKey)):/* @__PURE__ */ C(`div`,{"data-slot":`${l}-legend-label`,className:`contents`,children:i(d)}),r[15]=i,r[16]=p,r[17]=d,r[18]=l,r[19]=O):O=r[19];let k;return r[20]!==g||r[21]!==s||r[22]!==T||r[23]!==E||r[24]!==D||r[25]!==O?(k=/* @__PURE__ */ C(`div`,{ref:g,"data-slot":T,className:E,...D,...s,children:O}),r[20]=g,r[21]=s,r[22]=T,r[23]=E,r[24]=D,r[25]=O,r[26]=k):k=r[26],k},Un=p(null),Wn=e=>{let t=f(23),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({slotName:o,"data-slot":i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s={id:``,text:``},t[5]=s):s=t[5];let[c,l]=y(s),u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>({announce:(e,t)=>{l(n=>t===``&&n.id!==e||n.id===e&&n.text===t?n:{id:e,text:t})}}),t[6]=u):u=t[6];let[d]=y(u),p;t[7]!==i||t[8]!==o?(p=r(i,o),t[7]=i,t[8]=o,t[9]=p):p=t[9];let m=`${o}-items`,h;t[10]!==n||t[11]!==m?(h=/* @__PURE__ */ C(`div`,{"data-slot":m,className:`contents`,children:n}),t[10]=n,t[11]=m,t[12]=h):h=t[12];let g;t[13]!==d||t[14]!==h?(g=/* @__PURE__ */ C(Un.Provider,{value:d,children:h}),t[13]=d,t[14]=h,t[15]=g):g=t[15];let _;t[16]===c.text?_=t[17]:(_=/* @__PURE__ */ C(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:c.text}),t[16]=c.text,t[17]=_);let v;return t[18]!==a||t[19]!==p||t[20]!==g||t[21]!==_?(v=/* @__PURE__ */ w(`div`,{"data-slot":p,...a,children:[g,_]}),t[18]=a,t[19]=p,t[20]=g,t[21]=_,t[22]=v):v=t[22],v},Gn=(e,t,n)=>{let r=f(12),i=F(e);x(i.kind===t,()=>`${e} cannot be composed inside ${i.componentName}.Root. Compose ${i.componentName} series parts instead.`);let{dataKey:a,label:o,color:s,curve:c,markers:l,connectNulls:u,shape:d,texture:p}=n,m=c===void 0?`linear`:c,h=l!==void 0&&l,g=u!==void 0&&u,v=d===void 0?`circle`:d,y=p===void 0?`solid`:p,b,S;return r[0]!==s||r[1]!==g||r[2]!==i.store||r[3]!==m||r[4]!==a||r[5]!==o||r[6]!==t||r[7]!==h||r[8]!==v||r[9]!==y?(b=()=>i.store.registerSeries({dataKey:a,label:o??a,color:s,mark:t,curve:m,markers:h,connectNulls:g,shape:v,texture:y}),S=[i.store,a,o,s,t,m,h,g,v,y],r[0]=s,r[1]=g,r[2]=i.store,r[3]=m,r[4]=a,r[5]=o,r[6]=t,r[7]=h,r[8]=v,r[9]=y,r[10]=b,r[11]=S):(b=r[10],S=r[11]),_(b,S),null},Kn=(e,t)=>{let n=f(4),r=F(e),{lines:i}=t,a,o;return n[0]!==r.store||n[1]!==i?(a=()=>r.store.registerGrid(i),o=[r.store,i],n[0]=r.store,n[1]=i,n[2]=a,n[3]=o):(a=n[2],o=n[3]),_(a,o),null},qn=(e,t)=>{let n=f(5),r=F(e),{tickFormat:i,tickCount:a}=t,o,s;return n[0]!==r.store||n[1]!==a||n[2]!==i?(o=()=>r.store.registerXAxis({tickFormat:i,tickCount:a}),s=[r.store,i,a],n[0]=r.store,n[1]=a,n[2]=i,n[3]=o,n[4]=s):(o=n[3],s=n[4]),_(o,s),null},Jn=(e,t)=>{let n=f(5),r=F(e),{tickFormat:i,tickCount:a}=t,o,s;return n[0]!==r.store||n[1]!==a||n[2]!==i?(o=()=>r.store.registerYAxis({tickFormat:i,tickCount:a}),s=[r.store,i,a],n[0]=r.store,n[1]=a,n[2]=i,n[3]=o,n[4]=s):(o=n[3],s=n[4]),_(o,s),null},Yn=(e,t)=>{let n=f(7),r=F(e),i=g(),{y:a,label:o,color:s}=t,c,l;return n[0]!==s||n[1]!==r.store||n[2]!==i||n[3]!==o||n[4]!==a?(c=()=>r.store.registerReferenceLine(i,{y:a,label:o,color:s}),l=[r.store,i,a,o,s],n[0]=s,n[1]=r.store,n[2]=i,n[3]=o,n[4]=a,n[5]=c,n[6]=l):(c=n[5],l=n[6]),_(c,l),null},Xn=/* @__PURE__ */ new Map;let Zn=!1,Qn=!1;const $n=e=>typeof e==`object`&&!!e&&`yield`in e&&typeof Reflect.get(e,`yield`)==`function`,er=()=>{let e=Reflect.get(globalThis,`scheduler`);return $n(e)?e.yield():new Promise(e=>{if(typeof MessageChannel<`u`){let t=new MessageChannel;t.port1.addEventListener(`message`,()=>{t.port1.close(),e()},{once:!0}),t.port1.start(),t.port2.postMessage(null)}else setTimeout(e,0)})},tr=(e,t)=>{let n=e.ownerDocument.defaultView;return t==null||n==null||t.bottom>0&&t.top<n.innerHeight&&t.right>0&&t.left<n.innerWidth},nr=()=>{Qn=!1;let e=performance.now(),t=[...Xn.entries()].toSorted(([,e],[,t])=>Number(t.onScreen)-Number(e.onScreen)||e.top-t.top);try{for(let[n,r]of t)if(Xn.get(n)===r&&(Xn.delete(n),r.run(r.rect),Xn.size>0&&performance.now()-e>=4))break}finally{Xn.size>0&&!Zn&&(Zn=!0,rr())}},rr=async()=>{await er(),Zn=!1;try{nr()}catch(e){reportError(e)}},ir=(e,t)=>{Xn.set(e,{run:t.run,rect:t.rect,onScreen:tr(e,t.rect),top:t.rect?.top??0}),Qn=!0},ar=e=>{let t=Xn.get(e);t!=null&&!t.onScreen&&(t.onScreen=!0,Qn=!0)},or=e=>{Xn.delete(e)},sr=()=>{Xn.size!==0&&Qn&&nr()},cr=e=>typeof e==`string`||typeof e==`number`||e instanceof Date?e:String(e),lr=({raw:e,epoch:t,isTime:n})=>e instanceof Date?e:n?new Date(t):null,ur=(e,t,n)=>{let r=!1;if(n===`band`||n===`point`){let n=null,i=null;for(let a of e){let e=cr(D(a,t));e instanceof Date&&ke(e)&&(r=!0),n??=e,i=e}return{count:e.length,first:n,last:i,hasTimeOfDay:r}}let i=n===`time`,a=0,o=1/0,s=-1/0;for(let n of e){let e=D(n,t),c=O(e,i);if(Number.isFinite(c)){if(!r){let t=lr({raw:e,epoch:c,isTime:i});t!=null&&ke(t)&&(r=!0)}a+=1,o=Math.min(o,c),s=Math.max(s,c)}}return a===0?{count:a,first:null,last:null,hasTimeOfDay:r}:{count:a,first:i?new Date(o):o,last:i?new Date(s):s,hasTimeOfDay:r}},dr={line:`Line chart`,bar:`Bar chart`,area:`Area chart`,scatter:`Scatter plot`},fr=(e,t)=>e===`bar`?t?`category`:`categories`:t?`data point`:`data points`,pr=e=>e.length>0?` Series: ${e.join(`, `)}.`:``,mr=({kind:e,summary:t,hydrated:n})=>{let r;if(t.count===0)r=`${dr[e]} with no data.`;else{let i=t.count===1,a=fr(e,i),o=n?q(t.count):String(t.count),s=``;if(n&&t.first!=null&&t.last!=null){let e={datasetHasTimeOfDay:t.hasTimeOfDay};s=i?` at ${Ae(t.first,e)}`:` from ${Ae(t.first,e)} to ${Ae(t.last,e)}`}r=`${dr[e]} with ${o} ${a}${s}.`}return{sentence:r,instructions:` Use the left and right arrow keys to move between data points, Page Up and Page Down to jump by a tenth of the data, Home and End to jump to the first and last, Enter or Space to activate the current point, and Escape to dismiss the readout.`}},hr=`var(--color-chart-decorative)`,gr={grid:`var(--border-color-card-muted)`,baseline:`var(--border-color-card)`,tickText:`var(--text-color-muted)`,reference:`var(--color-neutral-500)`,surface:`var(--background-color-card)`},_r=e=>u(e)?`var(--color-chart-${e})`:e;var vr=class{#e=/* @__PURE__ */ new Set;#t={series:[],hover:null,grid:null,xAxis:null,yAxis:null,referenceLines:[],tooltip:null,orientation:`vertical`};#n=/* @__PURE__ */ new Map;#r=null;#i=/* @__PURE__ */ new Map;#a=0;#o=null;#s=!1;#c=`vertical`;#l=null;#u=null;#d=/* @__PURE__ */ new Map;#f=/* @__PURE__ */ new Map;#p=null;#m=null;#h=!1;get hoverEver(){return this.#h}onSeriesChange=null;onPresentationChange=null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#t;seriesSpecs(){return this.#r??=[...this.#n.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),this.#r}seriesShape(e){return this.#n.get(e)?.spec.shape??`circle`}registerSeries(e){let t=this.#i.get(e.dataKey)??this.#a++;return this.#i.set(e.dataKey,t),this.#n.set(e.dataKey,{spec:e,sequence:t}),this.#r=null,this.#g(`series`),()=>{this.#n.get(e.dataKey)?.spec===e&&(this.#n.delete(e.dataKey),this.#r=null,this.#g(`series`))}}setDecorative(e){this.#s!==e&&(this.#s=e,this.#g(`series`))}setOrientation(e){this.#c!==e&&(this.#c=e,this.#g())}registerGrid(e){let t={lines:e};return this.#o=t,this.#g(),()=>{this.#o===t&&(this.#o=null,this.#g())}}registerXAxis(e){return this.#l=e,this.#g(),()=>{this.#l===e&&(this.#l=null,this.#g())}}registerYAxis(e){return this.#u=e,this.#g(),()=>{this.#u===e&&(this.#u=null,this.#g())}}registerReferenceLine(e,t){let n=this.#f.get(e)??this.#a++;return this.#f.set(e,n),this.#d.set(e,{spec:t,sequence:n}),this.#g(),()=>{this.#d.get(e)?.spec===t&&(this.#d.delete(e),this.#g())}}registerTooltip(e){return this.#p=e,this.#g(`tooltip`),()=>{this.#p===e&&(this.#p=null,this.#g(`tooltip`))}}publishHover(e){this.#m!==e&&(this.#m=e,e!=null&&(this.#h=!0),this.#t={...this.#t,hover:e},this.#_())}seriesMeta(){return this.seriesSpecs().map(e=>{let t=this.#s?hr:_r(e.color),n=this.#s?hr:e.color;return{dataKey:e.dataKey,label:e.label,mark:e.mark,color:t,colorInput:n,shape:e.shape,texture:e.texture}})}#g(e=`presentation`){this.#t={series:e===`series`?this.seriesMeta():this.#t.series,hover:this.#m,grid:this.#o,xAxis:this.#l,yAxis:this.#u,referenceLines:[...this.#d.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),tooltip:this.#p,orientation:this.#c},this.#_(),e===`series`?this.onSeriesChange?.():e===`presentation`&&this.onPresentationChange?.()}#_(){for(let e of this.#e)e()}};const yr=`100%`,br=`300%`,xr=[`near`,`far`],Sr=/* @__PURE__ */ new WeakMap,Cr=/* @__PURE__ */ new WeakMap,wr=/* @__PURE__ */ new WeakMap;let Tr=null;const Er=()=>{if(Tr==null){let e=new IntersectionObserver(()=>{},{scrollMargin:`0px`});Tr=`scrollMargin`in e,e.disconnect()}return Tr},Dr=/auto|scroll/,Or=e=>{let t=e.ownerDocument,n=t.defaultView;if(n==null)return null;for(let r=e.parentElement;r!=null&&r!==t.documentElement&&r!==t.body;r=r.parentElement)if(Dr.test(n.getComputedStyle(r).overflowY))return r;return null},kr=(e,t,n)=>new IntersectionObserver(t=>{for(let n of t)wr.get(n.target)?.({band:e,inView:n.isIntersecting,rect:n.boundingClientRect});sr()},{root:n,rootMargin:Er()?`0px`:t,scrollMargin:t,threshold:0}),Ar=e=>{let t=Sr.get(e);return t??(t={near:kr(`near`,yr,null),far:kr(`far`,br,null),visible:kr(`visible`,`0px`,null),count:0},Sr.set(e,t)),t.count+=1,t},jr=(e,t)=>{--t.count,t.count>0||(t.near.disconnect(),t.far.disconnect(),t.visible.disconnect(),Sr.get(e)===t&&Sr.delete(e))},Mr=(e,t)=>{let n=Cr.get(e);if(n!=null)return n;let r={near:kr(`near`,yr,e),far:kr(`far`,br,e),open:{near:!1,far:!1},elements:{near:/* @__PURE__ */ new Set,far:/* @__PURE__ */ new Set}};return wr.set(e,({band:e,inView:t})=>{if(e!==`visible`&&r.open[e]!==t){r.open[e]=t;for(let n of r.elements[e])t?r[e].observe(n):(r[e].unobserve(n),wr.get(n)?.({band:e,inView:!1,rect:null}))}}),t.near.observe(e),t.far.observe(e),t.count+=1,Cr.set(e,r),r},Nr=(e,t,n,r)=>{t.elements.near.size>0||(t.near.disconnect(),t.far.disconnect(),n.near.unobserve(e),n.far.unobserve(e),wr.delete(e),Cr.get(e)===t&&Cr.delete(e),jr(r,n))},Pr=(e,{onChange:t,far:n=!0})=>{if(typeof IntersectionObserver>`u`)return t({band:`near`,inView:!0,rect:null}),n&&t({band:`far`,inView:!0,rect:null}),t({band:`visible`,inView:!0,rect:null}),sr(),()=>{or(e)};let r=e.ownerDocument,i=Ar(r);wr.set(e,t),i.visible.observe(e);let a=Er()?null:Or(e);if(a==null)return i.near.observe(e),n&&i.far.observe(e),()=>{wr.get(e)===t&&(wr.delete(e),or(e),i.near.unobserve(e),i.far.unobserve(e),i.visible.unobserve(e),jr(r,i))};let o=Mr(a,i);for(let t of xr)(t!==`far`||n)&&(o.elements[t].add(e),o.open[t]&&o[t].observe(e));return()=>{if(wr.get(e)===t){wr.delete(e),or(e);for(let t of xr)o.elements[t].delete(e),o[t].unobserve(e);i.visible.unobserve(e),jr(r,i),Nr(a,o,i,r)}}},Fr=e=>{let t=e.getSnapshot().hover;return t?.viaKeyboard===!0?t:null},Ir=e=>Fr(e)?.index??null,Lr=e=>{let t=f(12),{store:n,xHasTimeOfDay:r,announce:i}=e,a,s;t[0]===n?(a=t[1],s=t[2]):(a=()=>Ir(n),s=()=>Ir(n),t[0]=n,t[1]=a,t[2]=s);let c=b(n.subscribe,a,s),l;t[3]!==i||t[4]!==n||t[5]!==r?(l=e=>{i(e==null?``:Hr(e,{xHasTimeOfDay:r,tooltip:n.getSnapshot().tooltip}))},t[3]=i,t[4]=n,t[5]=r,t[6]=l):l=t[6];let u=o(l),d,p;t[7]!==c||t[8]!==n||t[9]!==u?(d=()=>{if(u(null),c==null)return;let e=setTimeout(()=>u(Fr(n)),Br);return()=>clearTimeout(e)},p=[c,n,u],t[7]=c,t[8]=n,t[9]=u,t[10]=d,t[11]=p):(d=t[10],p=t[11]),h(d,p)},Rr=e=>{let t=f(17),{id:n,kind:r,slotName:i,seriesRef:a,summary:o,instructions:s}=e,c=d(),l;t[0]!==c||t[1]!==r||t[2]!==o?(l=mr({kind:r,summary:o,hydrated:c}),t[0]=c,t[1]=r,t[2]=o,t[3]=l):l=t[3];let u=l,p=`${i}-description`,m;t[4]===u.sentence?m=t[5]:(m=/* @__PURE__ */ C(`span`,{children:u.sentence}),t[4]=u.sentence,t[5]=m);let h;t[6]===a?h=t[7]:(h=/* @__PURE__ */ C(`span`,{ref:a}),t[6]=a,t[7]=h);let g;t[8]!==s||t[9]!==u.instructions?(g=s&&/* @__PURE__ */ C(`span`,{children:u.instructions}),t[8]=s,t[9]=u.instructions,t[10]=g):g=t[10];let _;return t[11]!==n||t[12]!==p||t[13]!==m||t[14]!==h||t[15]!==g?(_=/* @__PURE__ */ w(`span`,{id:n,"data-slot":p,className:`sr-only`,children:[m,h,g]}),t[11]=n,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_):_=t[16],_},zr=e=>{let t=f(5),{store:n,xHasTimeOfDay:r}=e,[i,a]=y(``),o;t[0]!==n||t[1]!==r?(o={store:n,xHasTimeOfDay:r,announce:a},t[0]=n,t[1]=r,t[2]=o):o=t[2],Lr(o);let s;return t[3]===i?s=t[4]:(s=/* @__PURE__ */ C(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:i}),t[3]=i,t[4]=s),s},Br=120,Vr=e=>typeof e==`string`?e:typeof e==`number`?String(e):null,Hr=(e,{xHasTimeOfDay:t,tooltip:n})=>{let r=(e,t)=>Vr(n?.valueFormat?.(e,t))??q(e);return`${Vr(n?.labelFormat?.(e.xValue))??Ae(e.xValue,{datasetHasTimeOfDay:t})}. ${[...e.total==null?[]:[`Total: ${r(e.total,`total`)}`],...e.points.map(e=>`${e.label}: ${e.value==null?`no data`:r(e.value,e.dataKey)}`)].join(`, `)}${e.zValue===void 0?``:`, z: ${e.zValue==null?`no data`:q(e.zValue)}`}`},Ur=e=>{let t=f(11),{id:n,list:r,store:i,xHasTimeOfDay:a}=e,o,s;t[0]!==n||t[1]!==r?(o=()=>()=>r.announce(n,``),s=[n,r],t[0]=n,t[1]=r,t[2]=o,t[3]=s):(o=t[2],s=t[3]),h(o,s);let c;t[4]!==n||t[5]!==r?(c=e=>r.announce(n,e),t[4]=n,t[5]=r,t[6]=c):c=t[6];let l;return t[7]!==i||t[8]!==c||t[9]!==a?(l={store:i,xHasTimeOfDay:a,announce:c},t[7]=i,t[8]=c,t[9]=a,t[10]=l):l=t[10],Lr(l),null};function Wr(){return()=>{}}const Gr=(e,t)=>{let n=f(2),r;n[0]===t?r=n[1]:(r=()=>qr(t),n[0]=t,n[1]=r);let i=b(Wr,r,Qr);return e??i},Kr=`[data-slot$="-chart-data-table"]`;function qr(e){if(e!=null)return e.split(/\s+/).map(e=>Jr(document.getElementById(e))).filter(Boolean).join(` `)||void 0}function Jr(e){if(e==null)return``;if(e.querySelector(Kr)==null)return e.textContent?.trim()??``;let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>e instanceof Element?e.matches(Kr)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}),n=``;for(let e=t.nextNode();e!=null;e=t.nextNode())n+=e.textContent??``;return n.trim()}const Yr=e=>e==null||typeof e==`number`&&!Number.isFinite(e),Xr=(e,{xScale:t,xHasTimeOfDay:n})=>{let r=t===`time`?new Date(O(e,!0)):e;return r instanceof Date?{text:Ae(r,{datasetHasTimeOfDay:n}),date:Number.isNaN(r.getTime())?null:r}:t===`linear`&&Yr(r)?{text:`—`,date:null}:{text:typeof r==`number`?q(r):String(r),date:null}},Zr=e=>{let t=f(41),{data:n,label:r,labelledBy:i,slotName:a,store:o,xHasTimeOfDay:s,xKey:c,xScale:l,zKey:u}=e,d=ie(o),p=Gr(r,i);if(n.length===0||d.length===0)return null;let m,h,g,_,v;if(t[0]!==n||t[1]!==p||t[2]!==d||t[3]!==a||t[4]!==s||t[5]!==c||t[6]!==l||t[7]!==u){let e=n.slice(0,150);_=`sr-only`,v=`${a}-data-table`;let r=`${p==null?`Chart data`:`${p}: chart data`}${n.length>150?`. Showing the first 150 of ${n.length} rows.`:`.`}`;t[13]===r?h=t[14]:(h=/* @__PURE__ */ C(`caption`,{children:r}),t[13]=r,t[14]=h);let i;t[15]===c?i=t[16]:(i=/* @__PURE__ */ C(`th`,{scope:`col`,children:c}),t[15]=c,t[16]=i);let o;t[17]===d?o=t[18]:(o=d.map($r),t[17]=d,t[18]=o);let f;t[19]===u?f=t[20]:(f=u!=null&&/* @__PURE__ */ C(`th`,{scope:`col`,children:u}),t[19]=u,t[20]=f),t[21]!==i||t[22]!==o||t[23]!==f?(g=/* @__PURE__ */ C(`thead`,{children:/* @__PURE__ */ w(`tr`,{children:[i,o,f]})}),t[21]=i,t[22]=o,t[23]=f,t[24]=g):g=t[24];let y;t[25]!==d||t[26]!==s||t[27]!==c||t[28]!==l||t[29]!==u?(y=(e,t)=>{let n=D(e,c),r=Xr(n,{xScale:l,xHasTimeOfDay:s});return/* @__PURE__ */ w(`tr`,{children:[/* @__PURE__ */ C(`th`,{scope:`row`,"data-value":typeof n==`number`&&Number.isFinite(n)?n:void 0,children:r.date==null?r.text:/* @__PURE__ */ C(`time`,{dateTime:r.date.toISOString(),children:r.text})}),d.map(t=>{let n=D(e,t.dataKey),r=typeof n==`number`&&Number.isFinite(n);return/* @__PURE__ */ C(`td`,{"data-value":r?n:void 0,children:r?q(n):`—`},t.dataKey)}),u!=null&&(()=>{let t=D(e,u),n=typeof t==`number`&&Number.isFinite(t);return/* @__PURE__ */ C(`td`,{"data-value":n?t:void 0,children:n?q(t):`—`})})()]},t)},t[25]=d,t[26]=s,t[27]=c,t[28]=l,t[29]=u,t[30]=y):y=t[30],m=e.map(y),t[0]=n,t[1]=p,t[2]=d,t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=m,t[9]=h,t[10]=g,t[11]=_,t[12]=v}else m=t[8],h=t[9],g=t[10],_=t[11],v=t[12];let y;t[31]===m?y=t[32]:(y=/* @__PURE__ */ C(`tbody`,{children:m}),t[31]=m,t[32]=y);let b;t[33]!==h||t[34]!==g||t[35]!==y?(b=/* @__PURE__ */ w(`table`,{children:[h,g,y]}),t[33]=h,t[34]=g,t[35]=y,t[36]=b):b=t[36];let x;return t[37]!==_||t[38]!==v||t[39]!==b?(x=/* @__PURE__ */ C(`div`,{className:_,"data-slot":v,children:b}),t[37]=_,t[38]=v,t[39]=b,t[40]=x):x=t[40],x};function Qr(){}function $r(e){return/* @__PURE__ */ C(`th`,{scope:`col`,children:e.label},e.dataKey)}const ei=e=>{let t=f(9),n,r;t[0]===e?(n=t[1],r=t[2]):(n=()=>e.getSnapshot().hover,r=()=>e.getSnapshot().hover,t[0]=e,t[1]=n,t[2]=r);let i=b(e.subscribe,n,r),a,o;t[3]===e?(a=t[4],o=t[5]):(a=()=>e.getSnapshot().tooltip,o=()=>e.getSnapshot().tooltip,t[3]=e,t[4]=a,t[5]=o);let s=b(e.subscribe,a,o),c;return t[6]!==s||t[7]!==i?(c={hover:i,config:s},t[6]=s,t[7]=i,t[8]=c):c=t[8],c},ti=(e,t)=>{let n=f(16),r=F(e),i,a,o,s,c,l;n[0]===t?(i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6]):({labelFormat:s,valueFormat:l,indicator:c,footer:o,children:i,...a}=t,n[0]=t,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l);let u=c===void 0?`line`:c,d=oe(a),p,m;return n[7]!==i||n[8]!==r.store||n[9]!==o||n[10]!==u||n[11]!==s||n[12]!==d||n[13]!==l?(p=()=>r.store.registerTooltip({labelFormat:s,valueFormat:l,indicator:u,footer:o,children:i,divProps:d}),m=[r.store,s,l,u,o,i,d],n[7]=i,n[8]=r.store,n[9]=o,n[10]=u,n[11]=s,n[12]=d,n[13]=l,n[14]=p,n[15]=m):(p=n[14],m=n[15]),_(p,m),null},ni=(e,t,n)=>e==null?`—`:n==null?q(e):n(e,t),ri=r=>{let i=f(26),{slotName:a,store:o,tooltipRef:s,xHasTimeOfDay:c}=r,{hover:l,config:u}=ei(o),d;i[0]===u?.divProps?d=i[1]:(d=u?.divProps??{},i[0]=u?.divProps,i[1]=d);let p,m,h,g;i[2]===d?(p=i[3],m=i[4],h=i[5],g=i[6]):({className:p,ref:m,style:g,...h}=d,i[2]=d,i[3]=p,i[4]=m,i[5]=h,i[6]=g);let y=v(null),b=t(s,y),x,S;i[7]===m?(x=i[8],S=i[9]):(x=()=>{if(m==null)return;let t=e(m),n=t(y.current);return()=>{typeof n==`function`?n():t(null)}},S=[m],i[7]=m,i[8]=x,i[9]=S),_(x,S);let w=`${a}-tooltip`,T;i[10]===p?T=i[11]:(T=n(`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`,p),i[10]=p,i[11]=T);let E;i[12]===g?E=i[13]:(E={opacity:0,...g},i[12]=g,i[13]=E);let D=E,O;i[14]!==u||i[15]!==l||i[16]!==a||i[17]!==c?(O=l!=null&&/* @__PURE__ */ C(ii,{slotName:a,config:u,hover:l,xHasTimeOfDay:c}),i[14]=u,i[15]=l,i[16]=a,i[17]=c,i[18]=O):O=i[18];let k;return i[19]!==b||i[20]!==h||i[21]!==w||i[22]!==T||i[23]!==D||i[24]!==O?(k=/* @__PURE__ */ C(`div`,{"data-slot":w,ref:b,className:T,style:D,...h,children:O}),i[19]=b,i[20]=h,i[21]=w,i[22]=T,i[23]=D,i[24]=O,i[25]=k):k=i[25],k},ii=e=>{let t=f(35),{slotName:n,config:r,hover:i,xHasTimeOfDay:a}=e;if(r?.children!=null){let e=`${n}-tooltip-label`,a;t[0]!==r||t[1]!==i?(a=r.children(i),t[0]=r,t[1]=i,t[2]=a):a=t[2];let o;return t[3]!==e||t[4]!==a?(o=/* @__PURE__ */ C(`div`,{"data-slot":e,className:`contents`,children:a}),t[3]=e,t[4]=a,t[5]=o):o=t[5],o}let o=r?.footer,s;t[6]!==r||t[7]!==i.xValue||t[8]!==a?(s=r?.labelFormat==null?Ae(i.xValue,{datasetHasTimeOfDay:a}):r.labelFormat(i.xValue),t[6]=r,t[7]=i.xValue,t[8]=a,t[9]=s):s=t[9];let c;t[10]===s?c=t[11]:(c=/* @__PURE__ */ C(`div`,{className:`text-muted font-medium`,children:s}),t[10]=s,t[11]=c);let l;t[12]!==r||t[13]!==i.total?(l=i.total!==void 0&&/* @__PURE__ */ w(`div`,{className:`flex items-center gap-1.5`,children:[r?.indicator!==`none`&&/* @__PURE__ */ C(`span`,{"aria-hidden":!0,className:`invisible h-2.5 w-0.5 shrink-0`}),/* @__PURE__ */ C(`span`,{className:`text-muted`,children:`Total`}),/* @__PURE__ */ C(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:r?.valueFormat==null?q(i.total):r.valueFormat(i.total,`total`)})]}),t[12]=r,t[13]=i.total,t[14]=l):l=t[14];let u;if(t[15]!==r?.indicator||t[16]!==r?.valueFormat||t[17]!==i.points){let e;t[19]!==r?.indicator||t[20]!==r?.valueFormat?(e=e=>/* @__PURE__ */ w(`div`,{className:`flex items-center gap-1.5`,children:[r?.indicator!==`none`&&/* @__PURE__ */ C(`span`,{"aria-hidden":!0,className:`forced-color-adjust-none h-2.5 w-0.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),/* @__PURE__ */ C(`span`,{className:`text-muted`,children:e.label}),/* @__PURE__ */ C(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:ni(e.value,e.dataKey,r?.valueFormat)})]},e.dataKey),t[19]=r?.indicator,t[20]=r?.valueFormat,t[21]=e):e=t[21],u=i.points.map(e),t[15]=r?.indicator,t[16]=r?.valueFormat,t[17]=i.points,t[18]=u}else u=t[18];let d;t[22]!==l||t[23]!==u?(d=/* @__PURE__ */ w(`div`,{className:`mt-1 grid gap-1`,children:[l,u]}),t[22]=l,t[23]=u,t[24]=d):d=t[24];let p;t[25]===i.zValue?p=t[26]:(p=i.zValue!==void 0&&/* @__PURE__ */ w(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[/* @__PURE__ */ C(`span`,{className:`text-muted`,children:`z`}),/* @__PURE__ */ C(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:i.zValue==null?`—`:q(i.zValue)})]}),t[25]=i.zValue,t[26]=p);let m;t[27]!==o||t[28]!==i?(m=o!=null&&/* @__PURE__ */ C(`div`,{className:`text-muted mt-1`,children:typeof o==`function`?o(i):o}),t[27]=o,t[28]=i,t[29]=m):m=t[29];let h;return t[30]!==c||t[31]!==d||t[32]!==p||t[33]!==m?(h=/* @__PURE__ */ w(S,{children:[c,d,p,m]}),t[30]=c,t[31]=d,t[32]=p,t[33]=m,t[34]=h):h=t[34],h},ai={},oi=(e,t)=>{for(let n of e){let e=D(n,t);if(e!=null)return e instanceof Date?`time`:typeof e==`number`?`linear`:`point`}return`point`},si=[`auto`,`auto`],ci=(e,t)=>{let n=(n,r)=>{let i=e.createElement(`div`);return i.setAttribute(`data-slot`,`${t}-${n}`),i.setAttribute(`aria-hidden`,`true`),i.className=r,i};return{crosshair:n(`crosshair`,`bg-neutral-500 pointer-events-none absolute left-0 top-0 w-px opacity-0 forced-colors:bg-[Highlight]`),band:n(`hover-band`,`bg-neutral-500/10 pointer-events-none absolute left-0 top-0 rounded-sm opacity-0 forced-colors:outline forced-colors:outline-[Highlight]`),markers:n(`markers`,`pointer-events-none absolute inset-0 opacity-0`)}},li={bar:`Bar`,line:`Line`,area:`Area`,scatter:`Point`},ui=e=>{let t=f(7),{plotRef:n,engineRef:r,activateRef:i,visibilityRef:a,holdsBitmap:o}=e,s,c;t[0]!==i||t[1]!==r||t[2]!==o||t[3]!==n||t[4]!==a?(s=()=>{let e=n.current;if(e!=null)return Pr(e,{far:o,onChange:t=>{let{band:n,inView:o,rect:s}=t,c=r.current,l=a.current;n===`near`?(l.near=o,c==null?o?ir(e,{rect:s,run:e=>i.current?.(e)}):or(e):c.setInView(o||l.focused)):n===`visible`?(l.visible=o,c?.setOnScreen(o),o&&(l.seen=!0,c==null?ar(e):c.markSeen())):n===`far`&&(l.withinFar=o,!o&&!l.focused&&c?.releaseBackingStores())}})},c=[n,r,i,a,o],t[0]=i,t[1]=r,t[2]=o,t[3]=n,t[4]=a,t[5]=s,t[6]=c):(s=t[5],c=t[6]),_(s,c)},di=e=>{let t=f(5),{rootRef:n,engineRef:r,activateRef:i}=e,a,o;t[0]!==i||t[1]!==r||t[2]!==n?(a=()=>{let e=n.current?.ownerDocument.defaultView;if(e!=null)return fe(e,{before:()=>{i.current?.(null),r.current?.paintForPrint()},after:()=>{r.current?.afterPrint()}})},o=[n,r,i],t[0]=i,t[1]=r,t[2]=n,t[3]=a,t[4]=o):(a=t[3],o=t[4]),_(a,o)},fi=e=>{let t=f(5),{store:n,decorative:r,targetRef:i}=e,a,o;t[0]!==r||t[1]!==n||t[2]!==i?(a=()=>{let e=i.current;if(r||e==null)return;let t=null,a=()=>{let r=pr(n.getSnapshot().series.map(mi));r!==t&&(t=r,e.textContent=r)};return a(),n.subscribe(a)},o=[n,r,i],t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o):(a=t[3],o=t[4]),_(a,o)},pi=e=>{let i=f(226),a,o,s,c,l,u,d,p,h,S,T,E,D,O,k,A,ee,j,M,N,P,ne,F,ie,ae,I,L,R,z,se,B;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7],p=i[8],h=i[9],S=i[10],T=i[11],E=i[12],D=i[13],O=i[14],k=i[15],A=i[16],ee=i[17],j=i[18],M=i[19],N=i[20],P=i[21],ne=i[22],F=i[23],ie=i[24],ae=i[25],I=i[26],L=i[27],R=i[28],z=i[29],se=i[30],B=i[31]):({kind:T,componentName:p,slotName:N,paintBackend:A,scatterView:M,data:h,xKey:z,xScale:se,zKey:B,dimensions:ne,yDomain:F,stacked:ie,orientation:ae,animate:o,pending:I,mode:L,activeIndex:a,onActiveIndexChange:E,onDatumActivate:O,className:d,children:u,ref:j,"data-slot":S,"aria-label":c,"aria-labelledby":l,"aria-hidden":s,tabIndex:R,onFocus:k,onBlur:D,style:P,...ee}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d,i[8]=p,i[9]=h,i[10]=S,i[11]=T,i[12]=E,i[13]=D,i[14]=O,i[15]=k,i[16]=A,i[17]=ee,i[18]=j,i[19]=M,i[20]=N,i[21]=P,i[22]=ne,i[23]=F,i[24]=ie,i[25]=ae,i[26]=I,i[27]=L,i[28]=R,i[29]=z,i[30]=se,i[31]=B);let ce=ne===void 0?3:ne,le=F===void 0?si:F,V=ie!==void 0&&ie,H=ae===void 0?`vertical`:ae,ue=I!==void 0&&I,de=L===void 0?`interactive`:L,U=de===`interactive`,W=de===`decorative`,fe=o??de!==`static`,[G]=y(hi),[pe,me]=y(!1),K=v(null),he=v(!1),ge=v(null),_e=v(null),ve,ye;i[32]===Symbol.for(`react.memo_cache_sentinel`)?(ve=()=>()=>_e.current?.(),ye=[],i[32]=ve,i[33]=ye):(ve=i[32],ye=i[33]),_(ve,ye);let be=v(null),xe;i[34]===Symbol.for(`react.memo_cache_sentinel`)?(xe={near:!1,withinFar:!0,visible:null,seen:!1,focused:!1},i[34]=xe):xe=i[34];let Se=v(xe),Ce=v(null),we;i[35]===G.hoverEver?we=i[36]:(we=()=>G.hoverEver,i[35]=G.hoverEver,i[36]=we);let q=b(G.subscribe,we,gi),Te;i[37]!==h||i[38]!==T||i[39]!==z||i[40]!==se?(Te=T===`bar`?`band`:se??oi(h,z),i[37]=h,i[38]=T,i[39]=z,i[40]=se,i[41]=Te):Te=i[41];let J=Te,Ee;i[42]!==h||i[43]!==J||i[44]!==z||i[45]!==B?(Ee={data:h,xKey:z,xScale:J,zKey:B},i[42]=h,i[43]=J,i[44]=z,i[45]=B,i[46]=Ee):Ee=i[46];let De=v(Ee),Oe;i[47]!==p||i[48]!==T||i[49]!==G?(Oe=()=>({kind:T,componentName:p,store:G,engineRef:K,dataRef:De}),i[47]=p,i[48]=T,i[49]=G,i[50]=Oe):Oe=i[50];let[ke]=y(Oe),Ae,je;i[51]!==h||i[52]!==J||i[53]!==z||i[54]!==B?(Ae=()=>{De.current={data:h,xKey:z,xScale:J,zKey:B}},je=[h,z,J,B],i[51]=h,i[52]=J,i[53]=z,i[54]=B,i[55]=Ae,i[56]=je):(Ae=i[55],je=i[56]),_(Ae,je);let Me=v(null),Ne=t(Me,j),Pe=v(null),Fe=v(null),Ie=m(Un),Le;i[57]===Symbol.for(`react.memo_cache_sentinel`)?(Le=e=>{Fe.current=e,K.current?.attachTooltip(e)},i[57]=Le):Le=i[57];let Re=Le,ze=g();x(T!==`scatter`||h.length===0||J!==`point`,()=>`${p}.Root requires numeric or Date x values: the "${z}" values are not numbers or dates, so they have no position on a continuous scatter axis.`);let[Be,Y]=le,Ve;i[58]!==h||i[59]!==J||i[60]!==z?(Ve=ur(h,z,J),i[58]=h,i[59]=J,i[60]=z,i[61]=Ve):Ve=i[61];let He=Ve,X=He.hasTimeOfDay,Ue;i[62]!==Y||i[63]!==Be?(Ue=[Be,Y],i[62]=Y,i[63]=Be,i[64]=Ue):Ue=i[64];let We=B??null,Z;i[65]!==fe||i[66]!==ce||i[67]!==H||i[68]!==J||i[69]!==V||i[70]!==Ue||i[71]!==We||i[72]!==z?(Z={xKey:z,xScale:J,yDomain:Ue,zKey:We,dimensions:ce,stacked:V,orientation:H,animate:fe},i[65]=fe,i[66]=ce,i[67]=H,i[68]=J,i[69]=V,i[70]=Ue,i[71]=We,i[72]=z,i[73]=Z):Z=i[73];let Ge;i[74]===Symbol.for(`react.memo_cache_sentinel`)?(Ge={onDatumActivate:null,onActiveIndexChange:null},i[74]=Ge):Ge=i[74];let Ke;i[75]===Z?Ke=i[76]:(Ke={options:Z,callbacks:Ge,controlledActiveIndex:void 0},i[75]=Z,i[76]=Ke);let qe=v(Ke),Je;i[77]!==a||i[78]!==fe||i[79]!==ce||i[80]!==U||i[81]!==E||i[82]!==O||i[83]!==H||i[84]!==J||i[85]!==V||i[86]!==z||i[87]!==Y||i[88]!==Be||i[89]!==B?(Je=()=>{qe.current={options:{xKey:z,xScale:J,yDomain:[Be,Y],zKey:B??null,dimensions:ce,stacked:V,orientation:H,animate:fe},callbacks:U?{onDatumActivate:O??null,onActiveIndexChange:E??null}:{onDatumActivate:null,onActiveIndexChange:null},controlledActiveIndex:U?a:void 0}},i[77]=a,i[78]=fe,i[79]=ce,i[80]=U,i[81]=E,i[82]=O,i[83]=H,i[84]=J,i[85]=V,i[86]=z,i[87]=Y,i[88]=Be,i[89]=B,i[90]=Je):Je=i[90],_(Je);let Ye,Xe;i[91]!==U||i[92]!==T||i[93]!==A||i[94]!==M||i[95]!==N||i[96]!==G?(Ye=()=>(ge.current=e=>{let t=Me.current,n=Pe.current;if(K.current!=null||t==null||n==null)return;or(n);let r=e!=null&&e.width>0&&e.height>0?{width:e.width,height:e.height}:void 0,i=new _n({kind:T,store:G,backend:A,scatter:M,slotName:N,elements:{root:t,plot:n,tooltip:Fe.current},createHoverLayers:U?()=>ci(n.ownerDocument,N):void 0,inView:!1,onScreen:Se.current.visible??(e!=null&&tr(n,e)),size:r}),a=qe.current;i.setOptions(a.options),i.setRows(De.current.data),i.setCallbacks(a.callbacks),i.setControlledActiveIndex(a.controlledActiveIndex),K.current=i,i.flushIngest(),i.setInView(Se.current.near||Se.current.focused),Se.current.seen&&i.markSeen(),i.commitNow()},he.current&&(he.current=!1,ge.current(null)),()=>{he.current=K.current!=null,ge.current=null,K.current?.destroy(),K.current=null}),Xe=[T,G,N,U,A,M],i[91]=U,i[92]=T,i[93]=A,i[94]=M,i[95]=N,i[96]=G,i[97]=Ye,i[98]=Xe):(Ye=i[97],Xe=i[98]),_(Ye,Xe);let Ze=A.kind===`canvas`,Qe;i[99]===Ze?Qe=i[100]:(Qe={plotRef:Pe,engineRef:K,activateRef:ge,visibilityRef:Se,holdsBitmap:Ze},i[99]=Ze,i[100]=Qe),ui(Qe);let $e;i[101]===Symbol.for(`react.memo_cache_sentinel`)?($e={rootRef:Me,engineRef:K,activateRef:ge},i[101]=$e):$e=i[101],di($e);let et,tt;i[102]!==fe||i[103]!==W||i[104]!==ce||i[105]!==H||i[106]!==J||i[107]!==V||i[108]!==G||i[109]!==z||i[110]!==Y||i[111]!==Be||i[112]!==B?(et=()=>{K.current?.setOptions({xKey:z,xScale:J,yDomain:[Be,Y],zKey:B??null,dimensions:ce,stacked:V,orientation:H,animate:fe}),G.setOrientation(H),G.setDecorative(W)},tt=[G,W,z,J,Be,Y,B,ce,V,H,fe],i[102]=fe,i[103]=W,i[104]=ce,i[105]=H,i[106]=J,i[107]=V,i[108]=G,i[109]=z,i[110]=Y,i[111]=Be,i[112]=B,i[113]=et,i[114]=tt):(et=i[113],tt=i[114]),_(et,tt);let nt,rt;i[115]===h?(nt=i[116],rt=i[117]):(nt=()=>{K.current?.setRows(h)},rt=[h],i[115]=h,i[116]=nt,i[117]=rt),_(nt,rt);let it;i[118]!==U||i[119]!==E||i[120]!==O?(it=()=>{K.current?.setCallbacks(U?{onDatumActivate:O??null,onActiveIndexChange:E??null}:{onDatumActivate:null,onActiveIndexChange:null})},i[118]=U,i[119]=E,i[120]=O,i[121]=it):it=i[121],_(it);let at,ot;i[122]!==a||i[123]!==U?(at=()=>{K.current?.setControlledActiveIndex(U?a:void 0)},ot=[U,a],i[122]=a,i[123]=U,i[124]=at,i[125]=ot):(at=i[124],ot=i[125]),_(at,ot);let st=oe(P??ai),ct,lt;i[126]!==d||i[127]!==st?(ct=()=>{K.current?.setColorScope(d,st)},lt=[d,st],i[126]=d,i[127]=st,i[128]=ct,i[129]=lt):(ct=i[128],lt=i[129]),_(ct,lt);let ut;i[130]!==W||i[131]!==G?(ut={store:G,decorative:W,targetRef:Ce},i[130]=W,i[131]=G,i[132]=ut):ut=i[132],fi(ut);let Q=v(null),dt;i[133]!==p||i[134]!==h||i[135]!==T||i[136]!==J||i[137]!==G||i[138]!==z||i[139]!==B?(dt=()=>{let e=K.current;if(e!=null){e.flushIngest();return}let t=G.seriesSpecs().map(_i),n=JSON.stringify([z,J,B??null,t]),r=Q.current;(r==null||r.data!==h||r.signature!==n)&&(te({rootName:`${p}.Root`,partName:`${p}.${li[T]}`,rows:h,xKey:z,xScale:J,dataKeys:t,zKey:B??null}),Q.current={data:h,signature:n})},i[133]=p,i[134]=h,i[135]=T,i[136]=J,i[137]=G,i[138]=z,i[139]=B,i[140]=dt):dt=i[140],_(dt);let ft=pe?`engaged`:`dormant`,pt;i[141]!==S||i[142]!==N?(pt=r(S,N),i[141]=S,i[142]=N,i[143]=pt):pt=i[143];let mt;i[144]===d?mt=i[145]:(mt=n(`relative flex aspect-video w-full flex-col`,d),i[144]=d,i[145]=mt);let ht=W?!0:s,gt=W?void 0:R,_t=W?!0:void 0,vt;i[146]!==U||i[147]!==k?(vt=e=>{k?.(e),U&&me(!0),Se.current.focused=!0,ge.current?.(null),K.current?.setInView(!0)},i[146]=U,i[147]=k,i[148]=vt):vt=i[148];let yt;i[149]===D?yt=i[150]:(yt=e=>{if(D?.(e),e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget))return;let t=Se.current;t.focused=!1;let n=K.current;n!=null&&(n.setInView(t.near),t.withinFar||n.releaseBackingStores())},i[149]=D,i[150]=yt);let bt=U?ft:void 0,xt=`${N}-plot`,St=ue&&`opacity-60`,$;i[151]===St?$=i[152]:($=n(`relative min-h-0 w-full flex-1 select-none transition-opacity duration-300 ease-out-strong motion-reduce:transition-none [-webkit-touch-callout:none]`,St),i[151]=St,i[152]=$);let Ct=de===`static`?`img`:void 0,wt=de===`static`?c:void 0,Tt=de===`static`?l:void 0,Et=de===`static`?ze:void 0,Dt;i[153]!==c||i[154]!==l||i[155]!==ze||i[156]!==U||i[157]!==T||i[158]!==B?(Dt=U&&/* @__PURE__ */ C(`div`,{role:`application`,"aria-label":c,"aria-labelledby":l,"aria-describedby":ze,tabIndex:0,className:n(`focus-visible:ring-focus-accent absolute inset-0 rounded-sm focus:outline-hidden focus-visible:ring-2`,(T===`line`||T===`area`)&&`cursor-crosshair`,T===`scatter`&&B!=null?`touch-none cursor-grab active:cursor-grabbing`:`touch-pan-y touch-pinch-zoom`),onPointerDown:e=>{if(e.button===0){if(e.isTrusted&&T===`scatter`&&B!=null&&e.currentTarget.setPointerCapture(e.pointerId),e.pointerType===`touch`&&_e.current==null){let t=e.currentTarget,n=t.ownerDocument,r=e=>{e.composedPath().includes(t)||(_e.current?.(),K.current?.handlePointerLeave())};n.addEventListener(`pointerdown`,r,!0),_e.current=()=>{n.removeEventListener(`pointerdown`,r,!0),_e.current=null}}be.current=e.pointerType===`touch`?{x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY,scrubbed:!1}:null,K.current??ge.current?.(Pe.current?.getBoundingClientRect()??null),K.current?.handlePointerDown(e.nativeEvent.offsetX,e.nativeEvent.offsetY)}},onPointerMove:e=>{let t=be.current;t!=null&&Math.hypot(e.nativeEvent.offsetX-t.x,e.nativeEvent.offsetY-t.y)>10&&(t.scrubbed=!0),K.current?.handlePointerMove(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerUp:e=>{let t=be.current?.scrubbed===!0;be.current=null,K.current?.handlePointerUp(e.nativeEvent.offsetX,e.nativeEvent.offsetY,{activate:e.button===0&&!t})},onPointerLeave:e=>{e.pointerType!==`touch`&&K.current?.handlePointerLeave()},onPointerCancel:()=>{K.current?.handlePointerLeave()},onBlur:()=>{K.current?.handlePointerLeave()},onKeyDown:e=>{e.altKey||e.ctrlKey||e.metaKey||K.current?.handleKeyDown(e.key,{repeat:e.repeat})&&e.preventDefault()}}),i[153]=c,i[154]=l,i[155]=ze,i[156]=U,i[157]=T,i[158]=B,i[159]=Dt):Dt=i[159];let Ot;i[160]!==W||i[161]!==ze||i[162]!==U||i[163]!==T||i[164]!==N||i[165]!==He?(Ot=!W&&/* @__PURE__ */ C(Rr,{id:ze,kind:T,slotName:N,seriesRef:Ce,summary:He,instructions:U}),i[160]=W,i[161]=ze,i[162]=U,i[163]=T,i[164]=N,i[165]=He,i[166]=Ot):Ot=i[166];let kt;i[167]!==U||i[168]!==N||i[169]!==G||i[170]!==q||i[171]!==X?(kt=q&&U&&/* @__PURE__ */ C(ri,{slotName:N,store:G,tooltipRef:Re,xHasTimeOfDay:X}),i[167]=U,i[168]=N,i[169]=G,i[170]=q,i[171]=X,i[172]=kt):kt=i[172];let At;i[173]!==xt||i[174]!==$||i[175]!==Ct||i[176]!==wt||i[177]!==Tt||i[178]!==Et||i[179]!==Dt||i[180]!==Ot||i[181]!==kt?(At=/* @__PURE__ */ w(`div`,{"data-slot":xt,className:$,role:Ct,"aria-label":wt,"aria-labelledby":Tt,"aria-describedby":Et,ref:Pe,children:[Dt,Ot,kt]}),i[173]=xt,i[174]=$,i[175]=Ct,i[176]=wt,i[177]=Tt,i[178]=Et,i[179]=Dt,i[180]=Ot,i[181]=kt,i[182]=At):At=i[182];let jt;i[183]!==U||i[184]!==Ie||i[185]!==G||i[186]!==X?(jt=U&&Ie==null&&/* @__PURE__ */ C(zr,{store:G,xHasTimeOfDay:X}),i[183]=U,i[184]=Ie,i[185]=G,i[186]=X,i[187]=jt):jt=i[187];let Mt;i[188]!==ze||i[189]!==U||i[190]!==Ie||i[191]!==G||i[192]!==X?(Mt=U&&Ie!=null&&/* @__PURE__ */ C(Ur,{id:ze,list:Ie,store:G,xHasTimeOfDay:X}),i[188]=ze,i[189]=U,i[190]=Ie,i[191]=G,i[192]=X,i[193]=Mt):Mt=i[193];let Nt;i[194]!==c||i[195]!==l||i[196]!==h||i[197]!==pe||i[198]!==U||i[199]!==J||i[200]!==N||i[201]!==G||i[202]!==X||i[203]!==z||i[204]!==B?(Nt=U&&pe&&/* @__PURE__ */ C(Zr,{data:h,label:c,labelledBy:l,slotName:N,store:G,xHasTimeOfDay:X,xKey:z,xScale:J,zKey:B}),i[194]=c,i[195]=l,i[196]=h,i[197]=pe,i[198]=U,i[199]=J,i[200]=N,i[201]=G,i[202]=X,i[203]=z,i[204]=B,i[205]=Nt):Nt=i[205];let Pt;i[206]!==u||i[207]!==ke||i[208]!==At||i[209]!==jt||i[210]!==Mt||i[211]!==Nt?(Pt=/* @__PURE__ */ w(re.Provider,{value:ke,children:[At,u,jt,Mt,Nt]}),i[206]=u,i[207]=ke,i[208]=At,i[209]=jt,i[210]=Mt,i[211]=Nt,i[212]=Pt):Pt=i[212];let Ft;return i[213]!==Ne||i[214]!==ee||i[215]!==P||i[216]!==pt||i[217]!==mt||i[218]!==ht||i[219]!==gt||i[220]!==_t||i[221]!==vt||i[222]!==yt||i[223]!==bt||i[224]!==Pt?(Ft=/* @__PURE__ */ C(`div`,{"data-slot":pt,className:mt,"aria-hidden":ht,tabIndex:gt,inert:_t,ref:Ne,onFocus:vt,onBlur:yt,style:P,...ee,"data-state":bt,children:Pt}),i[213]=Ne,i[214]=ee,i[215]=P,i[216]=pt,i[217]=mt,i[218]=ht,i[219]=gt,i[220]=_t,i[221]=vt,i[222]=yt,i[223]=bt,i[224]=Pt,i[225]=Ft):Ft=i[225],Ft};function mi(e){return e.label}function hi(){return new vr}function gi(){return!1}function _i(e){return e.dataKey}export{I as _,Kn as a,qn as c,Hn as d,Fn as f,Ie as g,$t as h,_r as i,Jn as l,cn as m,ti as n,Yn as o,An as p,gr as r,Gn as s,pi as t,Wn as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./use-isomorphic-layout-effect-CL6iq0Bj.js";import{t}from"./use-composed-refs-DPYmLDSe.js";import{t as n}from"./clsx-DUGZgXfJ.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{a as i,r as a}from"./field-Bpvn4tQp.js";import{c as o}from"react/compiler-runtime";import{useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";const u=e=>e===`indeterminate`,d=d=>{let f=o(41),p,m,h,g,_,v,y,b,x,S,C;f[0]===d?(p=f[1],m=f[2],h=f[3],g=f[4],_=f[5],v=f[6],y=f[7],b=f[8],x=f[9],S=f[10],C=f[11]):({"data-slot":v,"aria-invalid":p,className:_,checked:m,defaultChecked:h,defaultValue:C,onClick:y,readOnly:x,ref:S,validation:g,...b}=d,f[0]=d,f[1]=p,f[2]=m,f[3]=h,f[4]=g,f[5]=_,f[6]=v,f[7]=y,f[8]=b,f[9]=x,f[10]=S,f[11]=C);let w=C===void 0?`on`:C,T=s(null),E=t(T,S),[D]=c(h),O=i(),k=g??O,A;f[12]!==p||f[13]!==k?(A=a({"aria-invalid":p,validation:k}),f[12]=p,f[13]=k,f[14]=A):A=f[14];let{ariaInvalid:j,validation:M}=A,N=m??D,P,F;f[15]===N?(P=f[16],F=f[17]):(P=()=>{T.current&&(T.current.indeterminate=u(N))},F=[N],f[15]=N,f[16]=P,f[17]=F),e(P,F);let I;f[18]!==m||f[19]!==D?(I=m==null?{defaultChecked:u(D)?void 0:D}:{checked:!u(m)&&m},f[18]=m,f[19]=D,f[20]=I):I=f[20];let L=I,R=u(m)?`mixed`:m,z=x||void 0,B;f[21]===v?B=f[22]:(B=r(v,`checkbox`),f[21]=v,f[22]=B);let V;f[23]===_?V=f[24]:(V=n(`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`,_),f[23]=_,f[24]=V);let H=M||void 0,U;f[25]!==y||f[26]!==x?(U=e=>{x?e.preventDefault():y?.(e)},f[25]=y,f[26]=x,f[27]=U):U=f[27];let W;return f[28]!==j||f[29]!==L||f[30]!==E||f[31]!==w||f[32]!==b||f[33]!==x||f[34]!==V||f[35]!==H||f[36]!==U||f[37]!==R||f[38]!==z||f[39]!==B?(W=/* @__PURE__ */ l(`input`,{"aria-checked":R,"aria-invalid":j,"aria-readonly":z,"data-slot":B,className:V,...L,"data-validation":H,defaultValue:w,onClick:U,readOnly:x,ref:E,type:`checkbox`,...b}),f[28]=j,f[29]=L,f[30]=E,f[31]=w,f[32]=b,f[33]=x,f[34]=V,f[35]=H,f[36]=U,f[37]=R,f[38]=z,f[39]=B,f[40]=W):W=f[40],W};function f({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{f as n,d as t};
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Checkbox component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/forms/checkbox
|
|
5
|
+
*/
|
|
6
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
7
|
+
import { o as WithValidation } from "./field-BshcNVe_.js";
|
|
3
8
|
import { ComponentProps } from "react";
|
|
4
9
|
/**
|
|
5
10
|
* The tri-state checked value of a {@link Checkbox}: `true` (checked),
|
|
@@ -32,6 +37,14 @@ type Props = Omit<ComponentProps<"input">, "type" | "checked" | "defaultChecked"
|
|
|
32
37
|
* compose it inside [`Choice`](/components/forms/choice) for a titled, multi-line
|
|
33
38
|
* label with a supplementary description.
|
|
34
39
|
*
|
|
40
|
+
* @useWhen Turn one or more independent options on or off in a form, with an indeterminate state
|
|
41
|
+
* for a partial selection.
|
|
42
|
+
*
|
|
43
|
+
* @siblings
|
|
44
|
+
* - `Switch`: one setting turns on or off and needs no indeterminate state.
|
|
45
|
+
* - `RadioGroup`: the user picks exactly one option from a set.
|
|
46
|
+
* - `Choice`: the checkbox needs a title and a description beside it.
|
|
47
|
+
*
|
|
35
48
|
* @see https://mantle.ngrok.com/components/forms/checkbox
|
|
36
49
|
*
|
|
37
50
|
* @example
|
package/dist/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Checkbox,n as selectAllChecked}from"./checkbox-
|
|
1
|
+
export{t as Checkbox,n as selectAllChecked}from"./checkbox-Cu5cgZmk.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./use-isomorphic-layout-effect-CL6iq0Bj.js";import{t}from"./use-composed-refs-DPYmLDSe.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./interactive-target-BXScNeOr.js";import{t as a}from"./field-Cai_4c1l.js";import{t as o}from"./label-DO1RlMKl.js";import{t as s}from"./radio-group-BliblUqe.js";import{t as c}from"./slot-B7rwscwd.js";import{c as l}from"react/compiler-runtime";import{cloneElement as u,createContext as d,isValidElement as f,useContext as p,useId as m,useRef as h}from"react";import g from"tiny-invariant";import{jsx as _}from"react/jsx-runtime";const v=d(null);function y(e){let t=p(v);return g(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const b=e=>{let t=l(40),i,o,s,c,u,d,f,g,y,b,x;t[0]===e?(i=t[1],o=t[2],s=t[3],c=t[4],u=t[5],d=t[6],f=t[7],g=t[8],y=t[9],b=t[10],x=t[11]):({"data-slot":d,"aria-describedby":i,"aria-errormessage":o,"aria-invalid":s,children:c,className:u,disabled:x,id:f,name:g,ref:b,...y}=e,t[0]=e,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=u,t[6]=d,t[7]=f,t[8]=g,t[9]=y,t[10]=b,t[11]=x);let S=x!==void 0&&x,C=p(a),w=C?.id,T=C?.name,E=C?.[`aria-describedby`],D=C?.[`aria-invalid`],O=C?.[`aria-errormessage`],k=m(),A=m(),j=h(null),M=w??f??k,N=E??i,P;t[12]!==A||t[13]!==N?(P=[N,A].filter(Boolean).join(` `)||void 0,t[12]=A,t[13]=N,t[14]=P):P=t[14];let F=P,I=T??g,L=D??s,R=O??o,z;t[15]!==M||t[16]!==F||t[17]!==S||t[18]!==I||t[19]!==L||t[20]!==R?(z={id:M,name:I,disabled:S,"aria-describedby":F,"aria-invalid":L,"aria-errormessage":R},t[15]=M,t[16]=F,t[17]=S,t[18]=I,t[19]=L,t[20]=R,t[21]=z):z=t[21];let B;t[22]!==M||t[23]!==A||t[24]!==S||t[25]!==z?(B={controlId:M,descriptionId:A,disabled:S,labelRef:j,controlProps:z},t[22]=M,t[23]=A,t[24]=S,t[25]=z,t[26]=B):B=t[26];let V=B,H;t[27]===d?H=t[28]:(H=r(d,`choice`),t[27]=d,t[28]=H);let U;t[29]===u?U=t[30]:(U=n(`flex w-full items-start gap-2`,u),t[29]=u,t[30]=U);let W;t[31]!==c||t[32]!==y||t[33]!==b||t[34]!==H||t[35]!==U?(W=/* @__PURE__ */ _(`div`,{ref:b,"data-slot":H,className:U,...y,children:c}),t[31]=c,t[32]=y,t[33]=b,t[34]=H,t[35]=U,t[36]=W):W=t[36];let G;return t[37]!==V||t[38]!==W?(G=/* @__PURE__ */ _(v.Provider,{value:V,children:W}),t[37]=V,t[38]=W,t[39]=G):G=t[39],G},x=e=>{let t=l(19),i,a,o,s,c;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],c=t[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c);let{controlProps:d}=y(`Indicator`),p;t[6]!==i||t[7]!==d?(p=f(i)?u(i,{...d,disabled:d.disabled||i.props.disabled===!0,name:d.name??i.props.name,"aria-invalid":d[`aria-invalid`]??i.props[`aria-invalid`],"aria-errormessage":d[`aria-errormessage`]??i.props[`aria-errormessage`]}):i,t[6]=i,t[7]=d,t[8]=p):p=t[8];let m=p,h;t[9]===o?h=t[10]:(h=r(o,`choice-indicator`),t[9]=o,t[10]=h);let g;t[11]===a?g=t[12]:(g=n(`flex h-lh shrink-0 items-center text-sm`,a),t[11]=a,t[12]=g);let v;return t[13]!==m||t[14]!==s||t[15]!==c||t[16]!==h||t[17]!==g?(v=/* @__PURE__ */ _(`span`,{ref:c,"data-slot":h,className:g,...s,children:m}),t[13]=m,t[14]=s,t[15]=c,t[16]=h,t[17]=g,t[18]=v):v=t[18],v},S=e=>{let t=l(16),i,a,o,s,u;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],u=t[5]):({"data-slot":o,asChild:i,className:a,ref:u,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u);let d=i?c:`div`,f;t[6]===o?f=t[7]:(f=r(o,`choice-content`),t[6]=o,t[7]=f);let p;t[8]===a?p=t[9]:(p=n(`flex min-w-0 flex-1 flex-col gap-0.5`,a),t[8]=a,t[9]=p);let m;return t[10]!==d||t[11]!==s||t[12]!==u||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ _(d,{ref:u,"data-slot":f,className:p,...s}),t[10]=d,t[11]=s,t[12]=u,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},C=e=>{let i=l(17),a,s,c,u;i[0]===e?(a=i[1],s=i[2],c=i[3],u=i[4]):({"data-slot":s,className:a,ref:u,...c}=e,i[0]=e,i[1]=a,i[2]=s,i[3]=c,i[4]=u);let{controlId:d,disabled:f,labelRef:p}=y(`Label`),m=t(p,u),h;i[5]===s?h=i[6]:(h=r(s,`choice-label`),i[5]=s,i[6]=h);let g=f&&`opacity-50`,v;i[7]!==a||i[8]!==g?(v=n(g,a),i[7]=a,i[8]=g,i[9]=v):v=i[9];let b;return i[10]!==m||i[11]!==d||i[12]!==f||i[13]!==c||i[14]!==h||i[15]!==v?(b=/* @__PURE__ */ _(o,{ref:m,"data-slot":h,className:v,...c,htmlFor:d,disabled:f}),i[10]=m,i[11]=d,i[12]=f,i[13]=c,i[14]=h,i[15]=v,i[16]=b):b=i[16],b},w=t=>{let i=l(23),a,o,u,d,f,h;i[0]===t?(a=i[1],o=i[2],u=i[3],d=i[4],f=i[5],h=i[6]):({"data-slot":u,asChild:a,className:o,id:d,ref:h,...f}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=u,i[4]=d,i[5]=f,i[6]=h);let{disabled:g}=y(`Title`),v=p(s),b=m(),x=d??b,S,C;i[7]!==v||i[8]!==x?(S=()=>v?.registerLabelId(x),C=[v,x],i[7]=v,i[8]=x,i[9]=S,i[10]=C):(S=i[9],C=i[10]),e(S,C);let w=a?c:`p`,T;i[11]===u?T=i[12]:(T=r(u,`choice-title`),i[11]=u,i[12]=T);let E=g&&`opacity-50`,D;i[13]!==o||i[14]!==E?(D=n(`text-strong text-sm font-medium font-sans`,E,o),i[13]=o,i[14]=E,i[15]=D):D=i[15];let O;return i[16]!==w||i[17]!==f||i[18]!==h||i[19]!==T||i[20]!==D||i[21]!==x?(O=/* @__PURE__ */ _(w,{ref:h,"data-slot":T,className:D,...f,id:x}),i[16]=w,i[17]=f,i[18]=h,i[19]=T,i[20]=D,i[21]=x,i[22]=O):O=i[22],O};function T(e){return e.defaultPrevented||i(e.target,e.currentTarget)?!1:e.currentTarget.closest(`label`)==null}const E={Root:b,Indicator:x,Content:S,Label:C,Title:w,Description:t=>{let i=l(28),a,o,u,d,f,m;i[0]===t?(a=i[1],o=i[2],u=i[3],d=i[4],f=i[5],m=i[6]):({"data-slot":u,asChild:a,className:o,onClick:d,ref:m,...f}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=u,i[4]=d,i[5]=f,i[6]=m);let{descriptionId:h,disabled:g,labelRef:v}=y(`Description`),b=p(s),x,S;i[7]!==h||i[8]!==b?(x=()=>b?.registerDescriptionId(h),S=[b,h],i[7]=h,i[8]=b,i[9]=x,i[10]=S):(x=i[9],S=i[10]),e(x,S);let C=a?c:`p`,w;i[11]===u?w=i[12]:(w=r(u,`choice-description`),i[11]=u,i[12]=w);let E=!g&&`[[data-slot~=choice-label]~&]:cursor-pointer`,D=g&&`opacity-50`,O;i[13]!==o||i[14]!==E||i[15]!==D?(O=n(`text-body text-sm leading-4`,E,D,o),i[13]=o,i[14]=E,i[15]=D,i[16]=O):O=i[16];let k;i[17]!==v||i[18]!==d?(k=e=>{d?.(e),T(e)&&(v.current?.click(),e.preventDefault())},i[17]=v,i[18]=d,i[19]=k):k=i[19];let A;return i[20]!==C||i[21]!==h||i[22]!==f||i[23]!==m||i[24]!==w||i[25]!==O||i[26]!==k?(A=/* @__PURE__ */ _(C,{ref:m,"data-slot":w,className:O,onClick:k,...f,id:h}),i[20]=C,i[21]=h,i[22]=f,i[23]=m,i[24]=w,i[25]=O,i[26]=k,i[27]=A):A=i[27],A}};export{E as t};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
|
|
2
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
3
|
-
import { t as Label } from "./label-
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
3
|
+
import { t as Label } from "./label-epgtywRz.js";
|
|
4
4
|
import { ComponentProps, ReactNode } from "react";
|
|
5
5
|
/**
|
|
6
6
|
* Props for `Choice.Root`. Extends `<div>` props (minus `id`, narrowed below)
|
|
@@ -23,11 +23,11 @@ import { ComponentProps, ReactNode } from "react";
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
type ChoiceRootProps = Omit<ComponentProps<"div">, "id"> & {
|
|
26
|
-
/** Marks the choice disabled
|
|
26
|
+
/** Marks the choice disabled: dims the title/description and is injected onto the control. */
|
|
27
27
|
disabled?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* Explicit control id. Defaults to a generated id, or
|
|
30
|
-
* `Field.Control`
|
|
29
|
+
* Explicit control id. Defaults to a generated id, or (when composed inside a
|
|
30
|
+
* `Field.Control`) the field's id, so `Field.Label` and `Choice.Label` resolve
|
|
31
31
|
* to the same control.
|
|
32
32
|
*/
|
|
33
33
|
id?: string;
|
|
@@ -71,7 +71,7 @@ type ChoiceIndicatorProps = ComponentProps<"span"> & WithDataSlot;
|
|
|
71
71
|
* threading ids. A non-element child (or none) is rendered untouched.
|
|
72
72
|
*
|
|
73
73
|
* The slot is one line tall (`h-lh`) using the same `text-sm` line box as the
|
|
74
|
-
* title, and centers its child
|
|
74
|
+
* title, and centers its child, so the control sits centered on the title's
|
|
75
75
|
* first line and stays put when the title wraps.
|
|
76
76
|
*
|
|
77
77
|
* @see https://mantle.ngrok.com/components/forms/choice
|
|
@@ -92,7 +92,7 @@ type ChoiceIndicatorProps = ComponentProps<"span"> & WithDataSlot;
|
|
|
92
92
|
declare const Indicator: ({ "data-slot": dataSlot, children, className, ref, ...props }: ChoiceIndicatorProps) => import("react").JSX.Element;
|
|
93
93
|
type ChoiceContentProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
94
94
|
/**
|
|
95
|
-
* The right column of a `Choice
|
|
95
|
+
* The right column of a `Choice`: stacks a `Choice.Label` / `Choice.Title` over
|
|
96
96
|
* an optional `Choice.Description`. `min-w-0` so long titles truncate instead of
|
|
97
97
|
* pushing the row wide.
|
|
98
98
|
*
|
|
@@ -114,9 +114,9 @@ type ChoiceContentProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
|
114
114
|
declare const Content: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: ChoiceContentProps) => import("react").JSX.Element;
|
|
115
115
|
/**
|
|
116
116
|
* Props for `Choice.Label`. The mantle `Label` props, minus `htmlFor` and
|
|
117
|
-
* `disabled
|
|
118
|
-
* disabled state)
|
|
119
|
-
* never override the label-to-control wiring.
|
|
117
|
+
* `disabled`. `Choice.Root` owns those (the control id and the choice's
|
|
118
|
+
* disabled state). They are not part of the public surface, so consumer props
|
|
119
|
+
* can never override the label-to-control wiring.
|
|
120
120
|
*/
|
|
121
121
|
type ChoiceLabelProps = Omit<ComponentProps<typeof Label>, "htmlFor" | "disabled"> & WithDataSlot;
|
|
122
122
|
/**
|
|
@@ -126,11 +126,11 @@ type ChoiceLabelProps = Omit<ComponentProps<typeof Label>, "htmlFor" | "disabled
|
|
|
126
126
|
* standalone checkbox, a raw `<form>`, React-state-only).
|
|
127
127
|
*
|
|
128
128
|
* It is the mantle {@link Label} (not a re-implementation), so it keeps every
|
|
129
|
-
* base-label behavior
|
|
130
|
-
* auto `font-medium`
|
|
129
|
+
* base-label behavior (cursor, the double-click text-selection guard, and the
|
|
130
|
+
* auto `font-medium`). `Field.Label` reuses `Label` the same way. When an
|
|
131
131
|
* ancestor already owns the labeling and click target (a fully-clickable list
|
|
132
|
-
* row or a Headless radio item), use `Choice.Title` instead
|
|
133
|
-
*
|
|
132
|
+
* row or a Headless radio item), use `Choice.Title` instead: a label-less `<p>`
|
|
133
|
+
* that accepts `asChild`, so labels never nest or compete.
|
|
134
134
|
*
|
|
135
135
|
* @see https://mantle.ngrok.com/components/forms/choice
|
|
136
136
|
*
|
|
@@ -149,12 +149,12 @@ type ChoiceLabelProps = Omit<ComponentProps<typeof Label>, "htmlFor" | "disabled
|
|
|
149
149
|
*/
|
|
150
150
|
declare const ChoiceLabel: ({ "data-slot": dataSlot, className, ref, ...props }: ChoiceLabelProps) => import("react").JSX.Element;
|
|
151
151
|
/**
|
|
152
|
-
* The emphasized title of a `Choice`, label-styled but **not** a `<label
|
|
152
|
+
* The emphasized title of a `Choice`, label-styled but **not** a `<label>`:
|
|
153
153
|
* renders a `<p>`. Mirrors `Field.LabelText`. Use this when something else owns
|
|
154
154
|
* the control's labeling and click target: a fully-clickable list row or a
|
|
155
155
|
* Headless radio item. It avoids nesting two `<label>`s or splitting
|
|
156
156
|
* the click target. Pass `asChild` to supply your own element. For a standalone
|
|
157
|
-
* control
|
|
157
|
+
* control (or inside a `Field`) where the title can be the label, use
|
|
158
158
|
* `Choice.Label`.
|
|
159
159
|
*
|
|
160
160
|
* Inside a `RadioGroup` item, the title registers its id with the radio, so the
|
|
@@ -219,19 +219,19 @@ declare const Description: ({ "data-slot": dataSlot, asChild, className, onClick
|
|
|
219
219
|
*
|
|
220
220
|
* It is a pure layout + association primitive: it owns the control's `id` and
|
|
221
221
|
* the description's `id` and wires them together, but does **not** own the
|
|
222
|
-
* control's value
|
|
222
|
+
* control's value. Drop your own control into `Choice.Indicator`. Pick
|
|
223
223
|
* `Choice.Label` (a real `<label>`) when the `Choice` owns the labeling, or
|
|
224
224
|
* `Choice.Title` (label-less text) when an ancestor (a clickable row or a
|
|
225
225
|
* Headless radio item) already does.
|
|
226
226
|
*
|
|
227
|
-
* **Use it for choice-like layouts
|
|
227
|
+
* **Use it for choice-like layouts:** a checkbox or radio input that needs an
|
|
228
228
|
* associated label and an optional supplementary description. It is not a
|
|
229
229
|
* general-purpose layout primitive; for laying out non-control content, reach
|
|
230
230
|
* for a plain flex/grid or `MediaObject` instead.
|
|
231
231
|
*
|
|
232
232
|
* **Field interop.** Inside a `Field.Control`, `Choice.Root` reads the field's
|
|
233
233
|
* `id` / `name` / `aria-*` and merges its description into the control's
|
|
234
|
-
* `aria-describedby`. Outside a `Field` it uses its own generated ids
|
|
234
|
+
* `aria-describedby`. Outside a `Field` it uses its own generated ids. The two
|
|
235
235
|
* are aware of each other but neither is required.
|
|
236
236
|
*
|
|
237
237
|
* **Radio interop.** Inside a `RadioGroup` item, `Choice.Title` and
|
|
@@ -239,6 +239,12 @@ declare const Description: ({ "data-slot": dataSlot, asChild, className, onClick
|
|
|
239
239
|
* accessible name is the title alone and the description is its
|
|
240
240
|
* `aria-describedby`.
|
|
241
241
|
*
|
|
242
|
+
* @useWhen Put a checkbox, a radio, or a switch beside a title and an optional description.
|
|
243
|
+
*
|
|
244
|
+
* @siblings
|
|
245
|
+
* - `Label`: the control needs only a one-line caption.
|
|
246
|
+
* - `MediaObject`: the thing beside the text is an image or an icon, not a control.
|
|
247
|
+
*
|
|
242
248
|
* @see https://mantle.ngrok.com/components/forms/choice
|
|
243
249
|
*
|
|
244
250
|
* @example
|
|
@@ -247,7 +253,7 @@ declare const Description: ({ "data-slot": dataSlot, asChild, className, onClick
|
|
|
247
253
|
* Choice.Root
|
|
248
254
|
* ├── Choice.Indicator
|
|
249
255
|
* └── Choice.Content
|
|
250
|
-
* ├── Choice.Label (or Choice.Title
|
|
256
|
+
* ├── Choice.Label (or Choice.Title, pick one)
|
|
251
257
|
* └── Choice.Description
|
|
252
258
|
* ```
|
|
253
259
|
*
|
package/dist/choice.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Choice component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/forms/choice
|
|
5
|
+
*/
|
|
6
|
+
import { n as ChoiceRootProps, t as Choice } from "./choice-CNiOSzqV.js";
|
|
2
7
|
export { Choice, type ChoiceRootProps };
|
package/dist/choice.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Choice}from"./choice-
|
|
1
|
+
export{t as Choice}from"./choice-CCVG2hb9.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-B7rwscwd.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":l,asChild:s,className:c,ref:d,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`code`,p;o[6]===l?p=o[7]:(p=t(l,`code`),o[6]=l,o[7]=p);let m;o[8]===c?m=o[9]:(m=e(`border-gray-500/15 rounded-md border bg-gray-500/5 px-1 font-mono text-[0.8em]`,c),o[8]=c,o[9]=m);let h;return o[10]!==f||o[11]!==u||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{ref:d,"data-slot":p,className:m,translate:`no`,...u}),o[10]=f,o[11]=u,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h};export{a as t};
|
|
@@ -47,7 +47,7 @@ declare function finalizeFoldRanges(ranges: FoldableRange[]): FoldableRange[];
|
|
|
47
47
|
* open spurious folds.
|
|
48
48
|
*
|
|
49
49
|
* Runs in a single pass over the source (O(n) chars). At most one fold range
|
|
50
|
-
* per opener line is emitted
|
|
50
|
+
* per opener line is emitted. When several brackets open on the same line,
|
|
51
51
|
* only the outermost (largest range) survives, so a single click collapses
|
|
52
52
|
* the whole sub-tree without rendering stacked toggles.
|
|
53
53
|
*
|
|
@@ -113,8 +113,8 @@ type FoldScope = {
|
|
|
113
113
|
};
|
|
114
114
|
/**
|
|
115
115
|
* One sub-explanation within a {@link FoldToken}. A single Shiki token may
|
|
116
|
-
* cover content with several scope sets
|
|
117
|
-
* boundary inside a template literal
|
|
116
|
+
* cover content with several scope sets (for example an interpolation
|
|
117
|
+
* boundary inside a template literal), so its `explanation` is an array.
|
|
118
118
|
*/
|
|
119
119
|
type FoldExplanation = {
|
|
120
120
|
content: string;
|
|
@@ -138,10 +138,10 @@ type FoldLine = FoldToken[];
|
|
|
138
138
|
* Folding strategy applied to a language. Picked by {@link foldStrategyFor}
|
|
139
139
|
* based on how the language naturally delimits blocks:
|
|
140
140
|
*
|
|
141
|
-
* - `bracket
|
|
142
|
-
* - `indentation
|
|
143
|
-
* - `tag
|
|
144
|
-
* - `none
|
|
141
|
+
* - `bracket`: `{}`/`[]` pairs (C-family, JSON, CSS, Rust, Go, …).
|
|
142
|
+
* - `indentation`: significant whitespace (Python, YAML).
|
|
143
|
+
* - `tag`: element open/close tags (HTML, XML).
|
|
144
|
+
* - `none`: plain text and other languages without a useful folding model.
|
|
145
145
|
*/
|
|
146
146
|
type FoldStrategy = "bracket" | "indentation" | "tag" | "none";
|
|
147
147
|
/** Returns the {@link FoldStrategy} used for the given supported language. */
|
|
@@ -165,7 +165,7 @@ type ComputeFoldRangesInput = {
|
|
|
165
165
|
*
|
|
166
166
|
* The bracket strategy uses TextMate scopes to distinguish real punctuation
|
|
167
167
|
* from `{`/`[` characters that appear inside strings, comments, or regular
|
|
168
|
-
* expressions
|
|
168
|
+
* expressions. This is what lets one parser cover JS, TS, Go, Rust, JSON,
|
|
169
169
|
* CSS, and friends without per-language string/comment logic.
|
|
170
170
|
*
|
|
171
171
|
* Returns ranges sorted by `startLine` ascending; at most one range per
|
|
@@ -304,7 +304,7 @@ declare function createMantleCodeBlockValue({ preHtml, preValToken, preVals, hig
|
|
|
304
304
|
* mantleCode("typescript")`const greeting = "Hello, ${name}!";`
|
|
305
305
|
* // Disable line numbers
|
|
306
306
|
* mantleCode("typescript", { showLineNumbers: false })`const x = 1;`
|
|
307
|
-
* // Single-line shell
|
|
307
|
+
* // Single-line shell: line numbers hidden by default
|
|
308
308
|
* mantleCode("bash")`npm install @ngrok/mantle`
|
|
309
309
|
* ```
|
|
310
310
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{t as e}from"./
|
|
1
|
+
import{t as e}from"./booleanish-BfvnW6vy.js";import{t}from"./clsx-DUGZgXfJ.js";const n=/* @__PURE__ */ new Set([`bash`,`sh`,`shell`]);function r(e,t){return!(n.has(e)&&!t.trim().includes(`
|
|
2
2
|
`))}const i=Symbol(`MantleCodeBlockValue`);function a({preHtml:e,preValToken:t,preVals:n,highlightLines:r,lineNumberStart:a,showLineNumbers:o,code:s,language:c}){return{[i]:!0,language:c,code:s,"~preHtml":e,"~preValToken":t,"~preVals":n,"~highlightLines":r,"~lineNumberStart":a,"~showLineNumbers":o}}function o(e,t){let n=``;for(let r=0;r<e.length;r+=1)n+=e[r]??``,r<t.length&&(n+=String(t[r]));return n}function s(e,t={}){let{showLineNumbers:n,highlightLines:i,lineNumberStart:s}=t;return(t,...c)=>{let l=o(t,c);return a({language:e,code:l,preHtml:void 0,preVals:c.length>0?c:void 0,highlightLines:i,lineNumberStart:s,showLineNumbers:n??r(e,l)})}}function c(e){if(e.length<=1)return e;e.sort((e,t)=>e.startLine===t.startLine?t.endLine-e.endLine:e.startLine-t.startLine);let t=[],n=-1;for(let r of e)r.startLine!==n&&(t.push(r),n=r.startLine);return t}function l(e){let t=e.length;if(t===0)return[];let n=[],r=[],i=1,a=0;for(;a<t;){let o=e.charCodeAt(a);if(o===10)i+=1,a+=1;else if(o===13)i+=1,a+=1,a<t&&e.charCodeAt(a)===10&&(a+=1);else if(o===34)for(a+=1;a<t;){let t=e.charCodeAt(a);if(t===92)a+=2;else{if(t===34){a+=1;break}if(t===10||t===13)break;a+=1}}else if(o===123||o===91)n.push({opener:o,line:i}),a+=1;else if(o===125||o===93){let e=o===125?123:91,t=n[n.length-1];t?.opener===e?(n.pop(),t.line!==i&&r.push({id:String(t.line),startLine:t.line,endLine:i})):t!=null&&(n.length=0),a+=1}else a+=1}return c(r)}function u(...e){let t=/* @__PURE__ */ new Set;for(let n of e)if(typeof n==`number`){if(!d(n))continue;let e=Math.floor(n);t.add(e)}else{let e=n.indexOf(`-`),r=n.slice(0,e),i=n.slice(e+1),a=Number.parseInt(r,10),o=Number.parseInt(i,10);if(!d(a)||!d(o)||(a>o&&([a,o]=[o,a]),o-a+1>1e3))continue;for(let e=a;e<=o;e++)t.add(e)}return t}const d=e=>e!=null&&!Number.isNaN(e)&&e>0&&Number.isFinite(e);function f(e){let t=e.length;for(;t>0&&(e.charCodeAt(t-1)===10||e.charCodeAt(t-1)===13);)--t;return t===e.length?e:e.slice(0,t)}function p(e){let t=f(e).replaceAll(`\r
|
|
3
3
|
`,`
|
|
4
4
|
`).replaceAll(`\r`,`
|
|
5
5
|
`).split(`
|
|
6
|
-
`);for(let e=0;e<t.length;e++){let n=t[e]??``;n.startsWith(`<span class="line">`)&&n.endsWith(`</span>`)&&(t[e]=n.slice(19,n.length-7))}return t}function m(e){return encodeURIComponent(e)}function h({foldableRanges:
|
|
6
|
+
`);for(let e=0;e<t.length;e++){let n=t[e]??``;n.startsWith(`<span class="line">`)&&n.endsWith(`</span>`)&&(t[e]=n.slice(19,n.length-7))}return t}function m(e){return encodeURIComponent(e)}function h({foldableRanges:e,highlightLines:n,html:r,lineNumberStart:i=1,showLineNumbers:a=!1}){let o=u(...n??[]),s=p(r),c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,d=e!=null&&e.length>0;if(d&&e!=null)for(let t of e){let e=m(t.id);c.set(t.startLine,e);for(let n=t.startLine+1;n<t.endLine;n+=1){let t=l.get(n);t??(t=[],l.set(n,t)),t.push(e)}}let f=``;for(let e=0;e<s.length;e++){let n=s[e]??``,r=e+1,u=i+e,p=d?c.get(r):void 0,m=t(`mantle-code-line`,o.has(u)&&`mantle-code-line-highlighted`,p!=null&&`mantle-code-line-opener`),h=a?`<span class="mantle-code-line-number" data-slot="line-number" aria-hidden="true">${u}</span>`:``,g=``,_=``,v=``;if(d){p!=null&&(g=`<button type="button" class="mantle-code-fold-toggle" data-slot="fold-toggle" data-fold-line="${p}" aria-expanded="true" aria-label="Toggle code folding"><svg class="mantle-code-fold-caret" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M3.22 5.97a.75.75 0 0 1 1.06 0L8 9.69l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L3.22 7.03a.75.75 0 0 1 0-1.06Z"/></svg></button>`,v=`<span class="mantle-code-fold-ellipsis" data-slot="fold-ellipsis" aria-hidden="true">⋯</span>`);let e=l.get(r);e!=null&&e.length>0&&(_=` data-fold-regions="${e.join(` `)}"`)}let y=`<span class="mantle-code-line-content" data-slot="line-content">${n===``?` `:n}${v}</span>`;f+=`<span class="${m}" data-line-number="${u}"${_}>${h}${g}${y}</span>`}return f}function g(e){switch(e){case`python`:case`py`:case`yaml`:case`yml`:return`indentation`;case`html`:case`xml`:return`tag`;case`bash`:case`sh`:case`shell`:case`plain`:case`plaintext`:case`text`:case`txt`:return`none`;default:return`bracket`}}function _({language:e,tokens:t}){switch(g(e)){case`bracket`:return te(t);case`indentation`:return x(t);case`tag`:return S(t);case`none`:return[]}}function v(e){if(e.length===0)return!1;let t=e[e.length-1]?.scopeName??``;return t===`string`||t===`comment`||t.startsWith(`string.`)||t.startsWith(`comment.`)||t.startsWith(`constant.character.escape`)}function y(e){return e.explanation!=null&&e.explanation.length>0?e.explanation:[{content:e.content,scopes:[]}]}function b(e){let t=``;for(let n of e){let e=y(n),r=!1;for(let t of e)if(v(t.scopes)){r=!0;break}if(!r)t+=n.content;else for(let n of e)v(n.scopes)||(t+=n.content)}return t}function ee(e){if(e==null||e.length===0)return-1;let t=0;for(let n of e){let e=n.content;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r===32||r===9)t+=1;else return t}}return-1}function te(e){let t=[],n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=r+1;for(let e of i)if(ne(e.content))for(let r of y(e)){if(v(r.scopes))continue;let e=r.content;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);if(i===123||i===91)t.push(a);else if(i===125||i===93){let e=t.pop();e!=null&&e!==a&&n.push({id:String(e),startLine:e,endLine:a})}}}}return c(n)}function ne(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n===123||n===125||n===91||n===93)return!0}return!1}function x(e){let t=Array.from({length:e.length});for(let n=0;n<e.length;n+=1)t[n]=ee(e[n]);let n=[];for(let e=0;e<t.length;e+=1){let r=t[e]??-1;if(r<0)continue;let i=-1,a=e+1;for(;a<t.length;){let e=t[a]??-1;if(e<0)a+=1;else if(e>r)i=a,a+=1;else break}i>e&&n.push({id:String(e+1),startLine:e+1,endLine:i+2})}return c(n)}function S(e){let t=[],n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=r+1,o=re(b(i));for(let e of o)if(e.kind===`open`)t.push({name:e.name,line:a});else{let r=t.length>0?t[t.length-1]:void 0;r!=null&&r.name.toLowerCase()===e.name.toLowerCase()&&(t.pop(),r.line!==a&&n.push({id:String(r.line),startLine:r.line,endLine:a}))}}return c(n)}const C=/* @__PURE__ */ new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function re(e){let t=[],n=0;for(;n<e.length;){let r=e.indexOf(`<`,n);if(r===-1)break;let i=T(e,r+1),a=e.charCodeAt(i)===47;if(a&&(i=T(e,i+1)),!E(e.charCodeAt(i))){n=r+1;continue}let o=i;for(i+=1;i<e.length&&D(e.charCodeAt(i));)i+=1;let s=e.slice(o,i),c=O(e,i);c===-1?n=r+1:a?(t.push({name:s,kind:`close`}),n=c+1):(k(e,c)||C.has(s.toLowerCase())||t.push({name:s,kind:`open`}),n=c+1)}return t}function w(e){return e===9||e===10||e===11||e===12||e===13||e===32}function T(e,t){let n=t;for(;n<e.length&&w(e.charCodeAt(n));)n+=1;return n}function E(e){return e>=65&&e<=90||e>=97&&e<=122}function D(e){return E(e)||e>=48&&e<=57||e===45||e===58||e===95}function O(e,t){let n;for(let r=t;r<e.length;r+=1){let t=e.charCodeAt(r);if(n!=null)t===n&&(n=void 0);else if(t===34||t===39)n=t;else if(t===62)return r}return-1}function k(e,t){let n=t-1;for(;n>=0&&w(e.charCodeAt(n));)--n;return n>=0&&e.charCodeAt(n)===47}const A=[`tabs`,`spaces`];function j(e){return A.some(t=>t===e)}function ie(e,t){return t||(se(e)?`tabs`:(M(e),`spaces`))}const ae=/* @__PURE__ */ new Set([`csharp`,`css`,`go`,`html`,`java`,`javascript`,`js`,`jsx`,`ts`,`tsx`,`typescript`,`xml`]),oe=/* @__PURE__ */ new Set([`python`,`py`,`yaml`,`yml`,`ruby`,`rb`,`terraform`,`tf`]);function se(e){return ae.has(e)}function M(e){return oe.has(e)}function N(e,t){let n=t?.indentation??`spaces`,r=e.replace(/\r\n?/g,`
|
|
7
7
|
`),i=r.trim();if(i===``)return``;let a=I(r),o=i.split(`
|
|
8
8
|
`),s=Array.from({length:o.length});for(let e=0;e<o.length;e++){let t=o[e];if(t==null)continue;let r=F(t)?t:t.slice(a);s[e]=P(r,n)}return s.join(`
|
|
9
9
|
`)}function P(e,t){let n=0;for(;n<e.length;){let t=e[n];if(t!==` `&&t!==` `)break;n+=1}if(n===0||n===e.length)return e;let r=e.slice(0,n);return(t===`spaces`?r.replace(/\t/g,` `):r.replace(/ {2}/g,` `))+e.slice(n)}function F(e){let t=e[0];return t!=null&&t!==` `&&t!==` `}function I(e){let t=1/0,n=0,r=!0;for(let i=0;i<e.length;i++){let a=e[i];if(r){if(a===` `||a===` `){n+=1;continue}if(a===`
|
|
10
10
|
`||a===`\r`){n=0;continue}if(n<t&&(t=n,t===0))return 0;r=!1}else(a===`
|
|
11
11
|
`||a===`\r`)&&(r=!0,n=0)}return t===1/0?0:t}const L=/* @__PURE__ */ `bash.cs.csharp.css.dotenv.go.html.java.javascript.js.json.jsx.plain.plaintext.py.python.rb.ruby.rust.sh.shell.terraform.text.tf.ts.tsx.txt.typescript.xml.yaml.yml`.split(`.`),R=new Set(L),z=`text`;function B(e){let t=e?.trim()??``;if(!t)return z;let n=t.indexOf(`-`),r=n===-1?t:t.slice(n+1);return V(r)?r:z}const V=e=>typeof e==`string`&&R.has(e);function H(e){if(typeof e==`boolean`)return e;if(typeof e==`string`){if(e===`true`)return!0;if(e===`false`)return!1}}function U(e){if(typeof e==`number`&&Number.isFinite(e)&&e>0)return Math.floor(e);if(typeof e==`string`&&/^\d+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:void 0}}function W(e){return/^\d+-\d+$/.test(e)}function G(e){if(typeof e==`number`)return Number.isFinite(e)&&e>0?Math.floor(e):void 0;if(typeof e==`string`){let t=e.trim();if(/^\d+$/.test(t)){let e=Number.parseInt(t,10);return e>0?e:void 0}if(W(t)){let[e,n]=t.split(`-`);return Number.parseInt(e??``,10)>0&&Number.parseInt(n??``,10)>0?t:void 0}}}function K(e){if(typeof e==`string`){let t=[],n=e.split(`,`);for(let e of n){let n=G(e);n!=null&&t.push(n)}return t.length>0?t:void 0}if(!Array.isArray(e))return;let t=[];for(let n of e){let e=G(n);e!=null&&t.push(e)}return t.length>0?t:void 0}const q={collapsible:!1,disableCopy:!1,indentation:void 0,mode:void 0,title:void 0};function ce(e){let t=e?.trim()??``;if(!t)return q;let n={},r=Y(t);for(let e of r){let t=e.indexOf(`=`),r=t===-1?e:e.slice(0,t),i=t===-1?void 0:e.slice(t+1);r&&(n[r]=J(i)??!0)}return ue(n)}function J(e){if(e==null)return;let t=e.trim(),n=t.length-1;return n>=1&&t.charCodeAt(0)===34&&t.charCodeAt(n)===34?t.slice(1,n):t}function Y(e){let t=e?.trim()??``,n=[],r=``,i=!1;for(let e=0;e<t.length;e++){let a=t[e]??``;!i&&le(a)?r&&=(n.push(r),``):(a===`"`&&(i=!i),r+=a)}return r&&n.push(r),n}function le(e){return e===` `||e===` `||e===`
|
|
12
|
-
`||e===`\r`}function X(e){return e===`cli`||e===`file`||e===`traffic-policy`}function ue(
|
|
12
|
+
`||e===`\r`}function X(e){return e===`cli`||e===`file`||e===`traffic-policy`}function ue(t){let{collapsible:n=q.collapsible,disableCopy:r=q.disableCopy,indentation:i=q.indentation,mode:a=q.mode,title:o=q.title}=t;return{collapsible:typeof n==`string`||typeof n==`boolean`?e(n):q.collapsible,disableCopy:typeof r==`string`||typeof r==`boolean`?e(r):q.disableCopy,indentation:j(i)?i:q.indentation,mode:X(a)?a:q.mode,title:typeof o==`string`?o.trim():q.title}}function Z(t){if(typeof t==`string`||typeof t==`boolean`)return e(t)}function Q(e){return X(e)?e:void 0}function $(e){return typeof e==`string`?e.trim():void 0}function de(e){let{collapsible:t,disableCopy:n,mantleCode:r,mantleCollapsible:i,mantleDisableCopy:a,mantleHighlightLines:o,mantleLanguage:s,mantleLineNumberStart:c,mantleMode:l,mantlePreHtml:u,mantleShowLineNumbers:d,mantleTitle:f,mode:p,title:m,...h}=e;return s==null&&r==null&&u==null&&d==null&&o==null&&c==null&&i==null&&a==null&&l==null&&f==null?{mantleCode:void 0,props:h}:{mantleCode:{code:typeof r==`string`?r:void 0,collapsible:Z(i)??Z(t),disableCopy:Z(a)??Z(n),highlightLines:K(o),language:typeof s==`string`&&V(s)?s:void 0,lineNumberStart:U(c),mode:Q(l)??Q(p),preHtml:typeof u==`string`?u:void 0,rawLanguage:s,showLineNumbers:H(d),title:$(f)??$(m)},props:h}}export{s as S,h as _,Y as a,a as b,H as c,L as d,N as f,g,_ as h,de as i,V as l,j as m,J as n,K as o,ie as p,ce as r,U as s,q as t,B as u,l as v,r as x,c as y};
|