@ngrok/mantle 0.84.3 → 0.85.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1 -1
- package/dist/alert-OP_-aGJD.js +1 -0
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-BnMhJYS4.js +1 -0
- package/dist/anchor.js +1 -1
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-Crr3sgA0.js +1 -0
- package/dist/browser-only.js +1 -1
- package/dist/button-BFpCB99R.js +1 -0
- package/dist/button-Dij5vCQG.js +1 -0
- package/dist/button-pwkdtR3U.js +1 -0
- package/dist/button.js +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.js +1 -1
- package/dist/centered-layout.js +1 -1
- package/dist/chart-2rorgvW0.js +2 -0
- package/dist/checkbox-DbJSqSNN.js +1 -0
- package/dist/checkbox.js +1 -1
- package/dist/choice-SRyLguqU.js +1 -0
- package/dist/choice.js +1 -1
- package/dist/code-block.js +6 -6
- package/dist/code.js +1 -1
- package/dist/combobox.js +1 -1
- package/dist/command.js +1 -1
- package/dist/compose-refs-sFdxsL7k.js +1 -0
- package/dist/{copy-to-clipboard-B4UB6pts.js → copy-to-clipboard-Cza2OT47.js} +1 -1
- package/dist/data-table.d.ts +204 -75
- package/dist/data-table.js +1 -1
- package/dist/description-list.js +1 -1
- package/dist/dialog-Ddhwzen3.js +1 -0
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-WydWB9lo.js +1 -0
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.js +1 -1
- package/dist/field.js +1 -1
- package/dist/flag.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/icon-BT8FnkkJ.js +1 -0
- package/dist/icon.js +1 -1
- package/dist/icons-BQRcOU6J.js +1 -0
- package/dist/icons-Bu-2boul.js +1 -0
- package/dist/icons-C3rVfpx9.js +1 -0
- package/dist/icons.js +1 -1
- package/dist/input-yq0jLE4e.js +1 -0
- package/dist/input.js +1 -1
- package/dist/kbd-CJ8hNZfS.js +1 -0
- package/dist/kbd.js +1 -1
- package/dist/label-BAy0Mg59.js +1 -0
- package/dist/label.js +1 -1
- package/dist/layer-container-R7aux3n8.js +1 -0
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.js +1 -1
- package/dist/list-BleZ-43e.js +1 -0
- package/dist/list.js +1 -1
- package/dist/live-region-B2vJRvPH.js +1 -0
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/main.js +1 -1
- package/dist/media-object.js +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover-H_1pLGLc.js +1 -0
- package/dist/popover.js +1 -1
- package/dist/primitive-C5AerOO8.js +1 -0
- package/dist/progress.js +1 -1
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-BLvvSqOP.js +1 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.js +1 -1
- package/dist/select-sOHUE2Bm.js +1 -0
- package/dist/select.js +1 -1
- package/dist/selectable-list.js +1 -1
- package/dist/separator-D98be0gY.js +1 -0
- package/dist/separator.js +1 -1
- package/dist/sheet-D8KGX4q1.js +1 -0
- package/dist/sheet.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-bVDP8BzY.js +1 -0
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/slot-BsvE2ntj.js +1 -0
- package/dist/slot.js +1 -1
- package/dist/split-button.js +1 -1
- package/dist/switch.js +1 -1
- package/dist/table-Bje71vHb.js +1 -0
- package/dist/table.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-area.js +1 -1
- package/dist/theme-C1kFFdIk.js +1 -0
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip-DikKOzqN.js +1 -0
- package/dist/tooltip.js +1 -1
- package/dist/use-breakpoint-CjyNk0fi.js +1 -0
- package/dist/use-callback-ref-BvVyI5K1.js +1 -0
- package/dist/use-copy-to-clipboard-ByLT8veV.js +1 -0
- package/dist/use-matches-media-query-m860lols.js +1 -0
- package/dist/use-prefers-reduced-motion-Cj9tJ181.js +1 -0
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.js +1 -1
- package/package.json +2 -2
- package/dist/alert-DtBQuuuP.js +0 -1
- package/dist/anchor-Cqu4GPPV.js +0 -1
- package/dist/browser-only-CmEEzfU3.js +0 -1
- package/dist/button-CaM-ZAH5.js +0 -1
- package/dist/button-DGsTE3P2.js +0 -1
- package/dist/button-Wn-yt0c_.js +0 -1
- package/dist/chart-B_rZqf8a.js +0 -2
- package/dist/checkbox-Gg6nGUnR.js +0 -1
- package/dist/choice-CT_AdesL.js +0 -1
- package/dist/compose-refs-DdUwopIY.js +0 -1
- package/dist/dialog-CA-1Z0Np.js +0 -1
- package/dist/dropdown-menu-lxHsgLiw.js +0 -1
- package/dist/icon-CGKaq_tV.js +0 -1
- package/dist/icons-B_DDQcVD.js +0 -1
- package/dist/icons-CF1lbWtp.js +0 -1
- package/dist/icons-Cie4gcrm.js +0 -1
- package/dist/input-BhykQSvJ.js +0 -1
- package/dist/kbd-4_0Y_8rx.js +0 -1
- package/dist/label-BqIp6kFx.js +0 -1
- package/dist/layer-container-BTcQpd4K.js +0 -1
- package/dist/list-Bo1mExIg.js +0 -1
- package/dist/live-region-CV7kykeo.js +0 -1
- package/dist/popover-Bp-9B3GR.js +0 -1
- package/dist/primitive-CejGAoGb.js +0 -1
- package/dist/sandboxed-on-click-UagMFl_U.js +0 -1
- package/dist/select-Dov9H2CX.js +0 -1
- package/dist/separator-Da8lDnio.js +0 -1
- package/dist/sheet-C6UGAvRk.js +0 -1
- package/dist/skeleton-paJOgf-f.js +0 -1
- package/dist/slot-C3gII_9c.js +0 -1
- package/dist/table-EZNW3nFk.js +0 -1
- package/dist/theme-DN-Et3A_.js +0 -1
- package/dist/tooltip-CkAibjBb.js +0 -1
- package/dist/use-breakpoint-BhJ_3El2.js +0 -1
- package/dist/use-callback-ref-IYti9y7x.js +0 -1
- package/dist/use-copy-to-clipboard-CSyp4Zk0.js +0 -1
- package/dist/use-matches-media-query-DCBT6iNA.js +0 -1
- package/dist/use-prefers-reduced-motion-DHYDQk1h.js +0 -1
package/dist/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./theme-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./theme-C1kFFdIk.js";import{c as h}from"react/compiler-runtime";import{useEffect as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";const b=`mantle-dark-styles`,x=`mantle-light-high-contrast-styles`,S=`mantle-dark-high-contrast-styles`,C=`(prefers-color-scheme: dark)`,w=`(prefers-contrast: more) and (prefers-color-scheme: light)`,T=`(prefers-contrast: more) and (prefers-color-scheme: dark)`;function E(e,t){let n=t??e,r=n===`light`||n===`dark`,i=n===`light-high-contrast`||n===`dark-high-contrast`;return{dark:r?`all`:C,lightHighContrast:i?`all`:w,darkHighContrast:i?`all`:T}}function D(e){return e}function O(e){let{darkLinkId:t,lightHcLinkId:n,darkHcLinkId:r,mediaDark:i,mediaLightHc:a,mediaDarkHc:o,forceTheme:s}=e,c=document.documentElement.dataset.appliedTheme,l=s??c,u=l===`light`||l===`dark`,d=l===`light-high-contrast`||l===`dark-high-contrast`,f=document.getElementById(t),p=document.getElementById(n),m=document.getElementById(r);f&&(f.media=u?`all`:i),p&&(p.media=d?`all`:a),m&&(m.media=d?`all`:o)}function k(e){let t={darkLinkId:b,lightHcLinkId:x,darkHcLinkId:S,mediaDark:C,mediaLightHc:w,mediaDarkHc:T,forceTheme:e};return`(${O.toString()})(${JSON.stringify(t)})`}function A(e){let t=h(28),{darkCssUrl:n,lightHighContrastCssUrl:i,darkHighContrastCssUrl:o,forceTheme:s,nonce:c,ssrCookie:l}=e,u,d;t[0]===s?(u=t[1],d=t[2]):(u=()=>{let e=function(){let e=document.documentElement.dataset.appliedTheme;return r(e)?e:void 0},t=function(){let{dark:t,lightHighContrast:n,darkHighContrast:r}=E(e(),s),i=document.getElementById(b),a=document.getElementById(x),o=document.getElementById(S);i&&(i.media=t),a&&(a.media=n),o&&(o.media=r)};t();let n=new MutationObserver(t);return n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-applied-theme`]}),()=>{n.disconnect()}},d=[s],t[0]=s,t[1]=u,t[2]=d),g(u,d);let f,p;if(t[3]!==s||t[4]!==l){let e=l==null?void 0:a({cookie:l});f=e===`system`?void 0:e,p=E(f,s),t[3]=s,t[4]=l,t[5]=f,t[6]=p}else f=t[5],p=t[6];let{dark:m,lightHighContrast:C,darkHighContrast:w}=p,T=!s&&f==null,D=!s||s!==`light-high-contrast`&&s!==`dark-high-contrast`,O=!s||s===`light-high-contrast`||s===`dark-high-contrast`,A;t[7]!==n||t[8]!==m||t[9]!==D?(A=D&&v(`link`,{rel:`stylesheet`,id:b,href:n,media:m,suppressHydrationWarning:!0}),t[7]=n,t[8]=m,t[9]=D,t[10]=A):A=t[10];let j;t[11]!==i||t[12]!==C||t[13]!==O?(j=O&&v(`link`,{rel:`stylesheet`,id:x,href:i,media:C,suppressHydrationWarning:!0}),t[11]=i,t[12]=C,t[13]=O,t[14]=j):j=t[14];let M;t[15]!==o||t[16]!==w||t[17]!==O?(M=O&&v(`link`,{rel:`stylesheet`,id:S,href:o,media:w,suppressHydrationWarning:!0}),t[15]=o,t[16]=w,t[17]=O,t[18]=M):M=t[18];let N;t[19]!==s||t[20]!==T||t[21]!==c?(N=T&&v(`script`,{dangerouslySetInnerHTML:{__html:k(s)},nonce:c,suppressHydrationWarning:!0}),t[19]=s,t[20]=T,t[21]=c,t[22]=N):N=t[22];let P;return t[23]!==A||t[24]!==j||t[25]!==M||t[26]!==N?(P=y(_,{children:[A,j,M,N]}),t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P):P=t[27],P}const j=`https://assets.ngrok.com`,M=`${j}/fonts`,N={roobert:`/roobert/roobert-proportional-vf.woff2`,"jetbrains-mono":`/jetbrains/jetbrainsmono-wght.woff2`,"jetbrains-mono-italic":`/jetbrains/jetbrainsmono-italic-wght.woff2`,"family-regular":`/family/family-regular.woff2`,"family-italic":`/family/family-italic.woff2`};function P(e){let t=e.startsWith(`/`)?e:`/${e}`;return`${M}${t}`}function F(e){return`<${P(N[e])}>; rel=preload; as=font; type="font/woff2"; crossorigin`}const I=e=>{let t=h(4),{name:n}=e,r=N[n],i;t[0]===r?i=t[1]:(i=P(r),t[0]=r,t[1]=i);let a;return t[2]===i?a=t[3]:(a=v(`link`,{rel:`preload`,href:i,as:`font`,type:`font/woff2`,crossOrigin:`anonymous`}),t[2]=i,t[3]=a),a};export{m as $resolvedTheme,n as $theme,A as MantleStyleSheets,I as PreloadFont,p as PreventWrongThemeFlashScript,c as ThemeProvider,j as assetsCdnOrigin,d as extractThemeCookie,k as fixMediaScriptContent,P as fontHref,a as getStoredTheme,r as isResolvedTheme,u as isTheme,D as mantleStyleSheetUrls,F as preloadFontLink,e as preventWrongThemeFlashScriptContent,l as readThemeFromHtmlElement,s as resolvedThemes,i as themes,f as useAppliedTheme,t as useInitialHtmlThemeProps,o as useTheme};
|
package/dist/toast.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./slot-BsvE2ntj.js";import{s as r}from"./theme-C1kFFdIk.js";import{c as i}from"react/compiler-runtime";import{createContext as a,useContext as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{CheckCircleIcon as l}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as u}from"@phosphor-icons/react/Info";import{WarningIcon as d}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as f}from"@phosphor-icons/react/WarningDiamond";import*as p from"sonner";function m(e){return typeof e==`number`&&e<=0?1/0:e}const h=t=>{let n=i(13),{className:a,containerAriaLabel:o,dir:c,duration_ms:l,position:u,style:d}=t,f=l===void 0?4e3:l,h=u===void 0?`top-center`:u,g=r(),_;n[0]===a?_=n[1]:(_=e(`toaster overlay-prompt pointer-events-auto *:duration-200`,a),n[0]=a,n[1]=_);let v;n[2]===f?v=n[3]:(v=m(f),n[2]=f,n[3]=v);let y=h??`top-center`,b=g,x;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(x={unstyled:!0},n[4]=x):x=n[4];let S;return n[5]!==o||n[6]!==c||n[7]!==d||n[8]!==_||n[9]!==v||n[10]!==y||n[11]!==b?(S=s(p.Toaster,{"data-slot":`toaster`,className:_,containerAriaLabel:o,dir:c,duration:v,gap:12,position:y,style:d,theme:b,toastOptions:x}),n[5]=o,n[6]=c,n[7]=d,n[8]=_,n[9]=v,n[10]=y,n[11]=b,n[12]=S):S=n[12],S},g=a(``);function _(e,t){let n=m(t?.duration_ms);return p.toast.custom(t=>s(g.Provider,{value:t,children:e}),{duration:n,...t?.id?{id:t.id}:{},unstyled:!0})}const v=a({intent:`info`}),y={Root:t=>{let n=i(21),r,a,o,l,u;n[0]===t?(r=n[1],a=n[2],o=n[3],l=n[4],u=n[5]):({children:r,className:a,intent:o,ref:u,...l}=t,n[0]=t,n[1]=r,n[2]=a,n[3]=o,n[4]=l,n[5]=u);let d;n[6]===o?d=n[7]:(d={intent:o},n[6]=o,n[7]=d);let f=d,p;n[8]===a?p=n[9]:(p=e(`relative flex items-start gap-2 text-sm font-sans`,`p-3 pl-3.75`,`bg-popover high-contrast:border-popover rounded rounded-r-[0.3125rem] border border-gray-500/35 shadow-lg`,a),n[8]=a,n[9]=p);let m;n[10]===o?m=n[11]:(m=s(x,{intent:o}),n[10]=o,n[11]=m);let h;n[12]!==r||n[13]!==l||n[14]!==u||n[15]!==p||n[16]!==m?(h=c(`div`,{"data-slot":`toast`,className:p,ref:u,...l,children:[m,r]}),n[12]=r,n[13]=l,n[14]=u,n[15]=p,n[16]=m,n[17]=h):h=n[17];let g;return n[18]!==f||n[19]!==h?(g=s(v.Provider,{value:f,children:h}),n[18]=f,n[19]=h,n[20]=g):g=n[20],g},Action:t=>{let r=i(17),a,c,l,u,d;r[0]===t?(a=r[1],c=r[2],l=r[3],u=r[4],d=r[5]):({asChild:a,className:c,onClick:l,ref:d,...u}=t,r[0]=t,r[1]=a,r[2]=c,r[3]=l,r[4]=u,r[5]=d);let f=o(g),m=a?n:`button`,h;r[6]===c?h=r[7]:(h=e(`shrink-0`,`data-icon-button:-mr-0.5 data-icon-button:-mt-0.5 data-icon-button:rounded-xs`,c),r[6]=c,r[7]=h);let _;r[8]!==f||r[9]!==l?(_=e=>{l?.(e),!e.defaultPrevented&&p.toast.dismiss(f)},r[8]=f,r[9]=l,r[10]=_):_=r[10];let v;return r[11]!==m||r[12]!==u||r[13]!==d||r[14]!==h||r[15]!==_?(v=s(m,{"data-slot":`toast-action`,className:h,onClick:_,ref:d,...u}),r[11]=m,r[12]=u,r[13]=d,r[14]=h,r[15]=_,r[16]=v):v=r[16],v},Icon:n=>{let r=i(41),a,c,p,m;r[0]===n?(a=r[1],c=r[2],p=r[3],m=r[4]):({className:a,svg:m,ref:p,...c}=n,r[0]=n,r[1]=a,r[2]=c,r[3]=p,r[4]=m);let h=o(v);switch(h.intent){case`danger`:{let n;r[5]===a?n=r[6]:(n=e(`text-danger-600`,a),r[5]=a,r[6]=n);let i;r[7]===m?i=r[8]:(i=m??s(d,{weight:`fill`}),r[7]=m,r[8]=i);let o;return r[9]!==c||r[10]!==p||r[11]!==n||r[12]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[9]=c,r[10]=p,r[11]=n,r[12]=i,r[13]=o):o=r[13],o}case`warning`:{let n;r[14]===a?n=r[15]:(n=e(`text-warning-600`,a),r[14]=a,r[15]=n);let i;r[16]===m?i=r[17]:(i=m??s(f,{weight:`fill`}),r[16]=m,r[17]=i);let o;return r[18]!==c||r[19]!==p||r[20]!==n||r[21]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[18]=c,r[19]=p,r[20]=n,r[21]=i,r[22]=o):o=r[22],o}case`success`:{let n;r[23]===a?n=r[24]:(n=e(`text-success-600`,a),r[23]=a,r[24]=n);let i;r[25]===m?i=r[26]:(i=m??s(l,{weight:`fill`}),r[25]=m,r[26]=i);let o;return r[27]!==c||r[28]!==p||r[29]!==n||r[30]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[27]=c,r[28]=p,r[29]=n,r[30]=i,r[31]=o):o=r[31],o}case`info`:{let n;r[32]===a?n=r[33]:(n=e(`text-accent-600`,a),r[32]=a,r[33]=n);let i;r[34]===m?i=r[35]:(i=m??s(u,{weight:`fill`}),r[34]=m,r[35]=i);let o;return r[36]!==c||r[37]!==p||r[38]!==n||r[39]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[36]=c,r[37]=p,r[38]=n,r[39]=i,r[40]=o):o=r[40],o}default:throw Error(`Unreachable Case: ${h.intent}`)}},Message:t=>{let r=i(12),a,o,c,l;r[0]===t?(a=r[1],o=r[2],c=r[3],l=r[4]):({asChild:a,className:o,ref:l,...c}=t,r[0]=t,r[1]=a,r[2]=o,r[3]=c,r[4]=l);let u=a?n:`p`,d;r[5]===o?d=r[6]:(d=e(`text-strong flex-1 text-sm font-body`,o),r[5]=o,r[6]=d);let f;return r[7]!==u||r[8]!==c||r[9]!==l||r[10]!==d?(f=s(u,{"data-slot":`toast-message`,className:d,ref:l,...c}),r[7]=u,r[8]=c,r[9]=l,r[10]=d,r[11]=f):f=r[11],f}},b={info:`bg-accent-600`,warning:`bg-warning-600`,success:`bg-success-600`,danger:`bg-danger-600`};function x(t){let n=i(10),r,a,o;n[0]===t?(r=n[1],a=n[2],o=n[3]):({className:r,intent:a,...o}=t,n[0]=t,n[1]=r,n[2]=a,n[3]=o);let c=b[a],l;n[4]!==r||n[5]!==c?(l=e(`z-1 absolute -inset-px right-auto w-1.5 rounded-l`,c,r),n[4]=r,n[5]=c,n[6]=l):l=n[6];let u;return n[7]!==o||n[8]!==l?(u=s(`div`,{"aria-hidden":!0,className:l,...o}),n[7]=o,n[8]=l,n[9]=u):u=n[9],u}export{y as Toast,h as Toaster,_ as makeToast};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{r as t}from"./layer-container-R7aux3n8.js";import{c as n}from"react/compiler-runtime";import{jsx as r,jsxs as i}from"react/jsx-runtime";import*as a from"@radix-ui/react-tooltip";const o=e=>{let t=n(6),i,o;t[0]===e?(i=t[1],o=t[2]):({delayDuration:o,...i}=e,t[0]=e,t[1]=i,t[2]=o);let s=(o===void 0?0:o)??0,c;return t[3]!==i||t[4]!==s?(c=r(a.Provider,{"data-slot":`tooltip-provider`,delayDuration:s,...i}),t[3]=i,t[4]=s,t[5]=c):c=t[5],c};function s(e){let t=n(2),i;return t[0]===e?i=t[1]:(i=r(a.Root,{...e}),t[0]=e,t[1]=i),i}function c(e){let t=n(2),i;return t[0]===e?i=t[1]:(i=r(a.Trigger,{"data-slot":`tooltip-trigger`,...e}),t[0]=e,t[1]=i),i}const l={Root:s,Content:o=>{let s=n(18),c,l,u,d,f;s[0]===o?(c=s[1],l=s[2],u=s[3],d=s[4],f=s[5]):({children:c,className:l,ref:d,sideOffset:f,...u}=o,s[0]=o,s[1]=c,s[2]=l,s[3]=u,s[4]=d,s[5]=f);let p=f===void 0?4:f,m=t(),h;s[6]===l?h=s[7]:(h=e(`bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow`,l),s[6]=l,s[7]=h);let g;s[8]===Symbol.for(`react.memo_cache_sentinel`)?(g=r(a.Arrow,{asChild:!0,children:r(`div`,{className:`bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs`})}),s[8]=g):g=s[8];let _;s[9]!==c||s[10]!==u||s[11]!==d||s[12]!==p||s[13]!==h?(_=i(a.Content,{className:h,"data-slot":`tooltip-content`,ref:d,sideOffset:p,...u,children:[c,g]}),s[9]=c,s[10]=u,s[11]=d,s[12]=p,s[13]=h,s[14]=_):_=s[14];let v;return s[15]!==m||s[16]!==_?(v=r(a.Portal,{container:m,children:_}),s[15]=m,s[16]=_,s[17]=v):v=s[17],v},Trigger:c};export{o as n,l as t};
|
package/dist/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./tooltip-
|
|
1
|
+
import{n as e,t}from"./tooltip-DikKOzqN.js";export{t as Tooltip,e as TooltipProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import{useSyncExternalStore as t}from"react";const n=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],r=[`default`,...n];function i(){return t(b,x,a)}function a(){return`default`}function o(n){let r=e(4),i;r[0]===n?i=r[1]:(i=C(n),r[0]=n,r[1]=i);let a;return r[2]===n?a=r[3]:(a=T(n),r[2]=n,r[3]=a),t(i,a,s)}function s(){return!1}const c={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},l={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let u=null,d=null;function f(){return u||={"2xl":window.matchMedia(c[`2xl`]),xl:window.matchMedia(c.xl),lg:window.matchMedia(c.lg),md:window.matchMedia(c.md),sm:window.matchMedia(c.sm),xs:window.matchMedia(c.xs),"2xs":window.matchMedia(c[`2xs`])},u}function p(e){return d||={"2xl":window.matchMedia(l[`2xl`]),xl:window.matchMedia(l.xl),lg:window.matchMedia(l.lg),md:window.matchMedia(l.md),sm:window.matchMedia(l.sm),xs:window.matchMedia(l.xs),"2xs":window.matchMedia(l[`2xs`])},d[e]}let m=`default`;const h=new Set;let g=!1;function _(){let e=f();for(let t of n)if(e[t].matches)return t;return`default`}let v=!1;function y(){v||(v=!0,requestAnimationFrame(()=>{v=!1;let e=_();if(e!==m){m=e;for(let e of h)e()}}))}function b(e){if(h.add(e),!g){g=!0;let e=f();m=_();for(let t of Object.values(e))t.addEventListener(`change`,y)}return e(),()=>{if(h.delete(e),h.size===0&&g){g=!1;let e=f();for(let t of Object.values(e))t.removeEventListener(`change`,y)}}}function x(){return g||(m=_()),m}const S=new Map;function C(e){let t=S.get(e);return t||(t=t=>{let n=p(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},S.set(e,t),t)}const w=new Map;function T(e){let t=w.get(e);return t||(t=()=>p(e).matches,w.set(e,t),t)}export{i as n,o as r,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import{useEffect as t,useRef as n}from"react";function r(r){let i=e(3),a=n(r),o;i[0]===r?o=i[1]:(o=()=>{a.current=r},i[0]=r,i[1]=o),t(o);let s;return i[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(...e)=>{let t=e;return a.current?.(...t)},i[2]=s):s=i[2],s}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./copy-to-clipboard-Cza2OT47.js";function t(){return e}export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import{useRef as t,useSyncExternalStore as n}from"react";function r(r){let a=e(6),o=t(null),s;a[0]===r?s=a[1]:(s=()=>((o.current==null||o.current.query!==r)&&(o.current={query:r,list:window.matchMedia(r)}),o.current.list),a[0]=r,a[1]=s);let c=s,l;a[2]===c?l=a[3]:(l=e=>{let t=c();return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},a[2]=c,a[3]=l);let u=l,d;return a[4]===c?d=a[5]:(d=()=>c().matches,a[4]=c,a[5]=d),n(u,d,i)}function i(){return!1}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./browser-only-Crr3sgA0.js";import{t}from"./use-matches-media-query-m860lols.js";const n=`(prefers-reduced-motion: no-preference)`;function r(){return!e()||!window.matchMedia(n).matches}function i(){return!t(n)}export{i as n,r as t};
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compose-refs-
|
|
1
|
+
import{t as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./copy-to-clipboard-Cza2OT47.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./direction-Wa9W2F61.js";import{t as h}from"./in-view-T_AAYaaF.js";function g(e,t){return Math.sign(t.getTime()-e.getTime())}function _(e,t){return Math.sign(e.getTime()-t.getTime())}export{p as $alphanumericSortingDirection,c as $sortingDirection,d as $sortingMode,o as $timeSortingDirection,n as alphanumericSortingDirections,g as compareDatesNewestToOldest,_ as compareDatesOldestToNewest,e as composeRefs,t as copyToClipboard,h as inView,l as isAlphanumericSortingDirection,f as isSortingDirection,r as isSortingMode,s as isTimeSortingDirection,m as sortingDirections,i as sortingModes,a as timeSortingByDirection,u as timeSortingDirections};
|
package/dist/visually-hidden.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-BsvE2ntj.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";const i=i=>{let a=n(12),o,s,c,l;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4]):({asChild:o,className:s,ref:l,...c}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l);let u=o?t:`span`,d;a[5]===s?d=a[6]:(d=e(`sr-only`,s),a[5]=s,a[6]=d);let f;return a[7]!==u||a[8]!==c||a[9]!==l||a[10]!==d?(f=r(u,{ref:l,"data-slot":`visually-hidden`,className:d,...c}),a[7]=u,a[8]=c,a[9]=l,a[10]=d,a[11]=f):f=a[11],f};export{i as VisuallyHidden};
|
package/dist/well.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-BsvE2ntj.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";const i=i=>{let a=n(12),o,s,c,l;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4]):({asChild:l,className:o,ref:c,...s}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l);let u=l!==void 0&&l?t:`div`,d;a[5]===o?d=a[6]:(d=e(`border-card-muted bg-base relative rounded-md border shadow-inner`,o),a[5]=o,a[6]=d);let f;return a[7]!==u||a[8]!==s||a[9]!==c||a[10]!==d?(f=r(u,{ref:c,"data-slot":`well`,className:d,...s}),a[7]=u,a[8]=s,a[9]=c,a[10]=d,a[11]=f):f=a[11],f};export{i as Well};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/mantle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.1",
|
|
4
4
|
"description": "mantle is ngrok's UI library and design system.",
|
|
5
5
|
"homepage": "https://mantle.ngrok.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@radix-ui/react-switch": "1.3.7",
|
|
133
133
|
"@radix-ui/react-tabs": "1.1.21",
|
|
134
134
|
"@radix-ui/react-tooltip": "1.2.16",
|
|
135
|
-
"@tanstack/react-table": "
|
|
135
|
+
"@tanstack/react-table": "9.2.4",
|
|
136
136
|
"@tanstack/react-virtual": "3.14.11",
|
|
137
137
|
"class-variance-authority": "0.7.1",
|
|
138
138
|
"cmdk": "1.1.1",
|
package/dist/alert-DtBQuuuP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./icon-U24NfYv7.js";import{t as i}from"./slot-C3gII_9c.js";import{t as a}from"./types-D85fCNV3.js";import{t as o}from"./button-DGsTE3P2.js";import{t as s}from"./button-CaM-ZAH5.js";import{CaretDownIcon as c}from"@phosphor-icons/react/CaretDown";import{createContext as l,useContext as u,useEffect as d,useMemo as f,useRef as p}from"react";import m from"tiny-invariant";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{CheckCircleIcon as _}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as v}from"@phosphor-icons/react/Info";import{MegaphoneIcon as y}from"@phosphor-icons/react/Megaphone";import{WarningIcon as b}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as x}from"@phosphor-icons/react/WarningDiamond";import{XIcon as S}from"@phosphor-icons/react/X";import{cva as C}from"class-variance-authority";function w(e){if(e.name===``)return!0;let t=Array.from(e.ownerDocument.querySelectorAll(`input`)).filter(t=>t.type===`radio`&&t.name===e.name&&t.form===e.form&&!t.disabled),n=t.find(e=>e.checked);return n==null?t[0]===e:n===e}function T(e){return!(!(e instanceof HTMLElement)||e.tabIndex<0||e.matches(`:disabled`)||e instanceof HTMLInputElement&&(e.type===`hidden`||e.type===`radio`&&!w(e))||e.closest(`[hidden], [inert]`)!=null||typeof e.checkVisibility==`function`&&!e.checkVisibility({visibilityProperty:!0}))}function E(e){let t=[],n=[];for(let r of e.ownerDocument.querySelectorAll(`a[href], area[href], button, input, select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable="false"]), [tabindex]`))!e.contains(r)&&T(r)&&((e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)===0?n.push(r):t.push(r));return n.reverse(),[...t,...n]}const D=l(null),O=h(S,{});function k(){let e=u(D);return m(e,`useAlertContext hook used outside of Alert parent!`),e}const A=({children:e,intent:t,redirectDismissFocus:n=!0})=>{let r=f(()=>({intent:t,redirectDismissFocus:n}),[t,n]);return h(D.Provider,{value:r,children:e})},j=C(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a:not([data-slot=button])]:text-danger-700 [&_a:not([data-slot=button])]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a:not([data-slot=button])]:text-important-700 [&_a:not([data-slot=button])]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a:not([data-slot=button])]:text-info-700 [&_a:not([data-slot=button])]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a:not([data-slot=button])]:text-success-700 [&_a:not([data-slot=button])]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a:not([data-slot=button])]:text-warning-700 [&_a:not([data-slot=button])]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),M=({appearance:e=`default`,className:t,intent:r,ref:i,style:o,...s})=>h(A,{intent:r,children:h(`div`,{ref:i,"data-slot":`alert`,className:n(j({appearance:e,intent:r}),`has-data-alert-dismiss:pr-10`,`has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-16`,`md:has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-24`,`has-data-alert-expand:[&_[data-slot=alert-content]]:pr-12`,`md:has-data-alert-expand:[&_[data-slot=alert-content]]:pr-[5.5rem]`,t),style:a({"--alert-control-color":R(r),"--alert-control-hover-color":z(r),"--alert-control-hover-bg":B(r),...o}),...s})}),N={danger:h(b,{}),important:h(y,{mirrored:!0}),info:h(v,{}),success:h(_,{}),warning:h(x,{})},P=({className:e,ref:t,svg:i,...a})=>{let o=k(),s=N[o.intent];return h(r,{ref:t,"data-slot":`alert-icon`,className:n(`size-5`,e),svg:i??s,...a})},F=({className:e,ref:t,...r})=>h(`div`,{ref:t,"data-slot":`alert-content`,className:n(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,e),...r}),I=({asChild:e=!1,className:t,ref:r,...a})=>h(e?i:`h5`,{ref:r,"data-slot":`alert-title`,className:n(`font-medium`,t),...a}),L=({asChild:e=!1,className:t,ref:r,...a})=>h(e?i:`div`,{ref:r,"data-slot":`alert-description`,className:n(`text-sm`,t),...a}),R=e=>`var(--color-${e}-700)`,z=e=>`var(--color-${e}-800)`,B=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`;function V({buttonRef:t,enabled:n}){let r=p([]);e(()=>{if(n)return()=>{let e=t.current;if(e==null||document.activeElement!==e)return;let n=e.closest(`[data-slot~="alert"]`)??e;r.current=E(n)}},[t,n]),d(()=>{if(n)return()=>{let e=r.current;if(r.current=[],e.length===0)return;let{activeElement:t}=document;if(t==null||t===document.body){for(let t of e)if(t.isConnected&&T(t)&&(t.focus(),document.activeElement===t))return}}},[n])}const H={Root:M,Content:F,ExpandButton:({count:e,expanded:t,className:r,...i})=>g(o,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"aria-expanded":t,"aria-label":t?`Collapse additional alerts`:`Show ${e} more ${e===1?`alert`:`alerts`}`,"data-slot":`alert-expand-button`,"data-alert-expand":!0,icon:h(c,{weight:`bold`,className:n(`size-4 transition-transform ease-out duration-150`,t&&`-rotate-180`)}),iconPlacement:`end`,className:n(`right-1.5 top-1.5 absolute gap-1 ps-1.5 pe-1`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,r),...i,children:[g(`span`,{className:`min-w-[2ch] text-center tabular-nums`,children:[`+`,e]}),h(`span`,{className:`hidden md:inline`,children:`more`})]}),Description:L,DismissIconButton:({size:e=`sm`,type:r=`button`,label:i=`Dismiss Alert`,appearance:a=`ghost`,className:o,icon:c=O,ref:l,...d})=>{let f=u(D),m=p(null),g=t(m,l);return V({buttonRef:m,enabled:f?.redirectDismissFocus??!0}),h(s,{ref:g,appearance:a,icon:c,intent:`neutral`,label:i,size:e,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:n(`right-1.5 top-1.5 absolute`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,o),type:r,...d})},Icon:P,Title:I};export{A as n,H as t};
|
package/dist/anchor-Cqu4GPPV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-CGKaq_tV.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-C3gII_9c.js";import{Children as i,cloneElement as a,isValidElement as o}from"react";import s from"tiny-invariant";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),f=({"data-slot":e,asChild:f,children:h,className:g,rel:_,icon:v,iconPlacement:y=`start`,ref:b,...x})=>{let S=m(_);if(f){let f=i.only(h);s(o(f),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let m=f.props?.children,_=x.target===`_blank`||f.props?.target===`_blank`;return l(r,{"data-slot":n(e,`anchor`),className:d(g),ref:b,rel:S??p(_),...x,children:a(f,{},u(c,{children:[v&&y===`start`&&l(t,{className:`inline-block mr-1.5`,svg:v}),l(`span`,{"data-slot":`anchor-label`,children:m}),v&&y===`end`&&l(t,{className:`inline-block ml-1.5`,svg:v})]}))})}return u(`a`,{"data-slot":n(e,`anchor`),className:d(g),ref:b,rel:S??p(x.target===`_blank`),...x,children:[v&&y===`start`&&l(t,{className:`inline-block mr-1.5`,svg:v}),l(`span`,{"data-slot":`anchor-label`,children:h}),v&&y===`end`&&l(t,{className:`inline-block ml-1.5`,svg:v})]})};function p(e){return e?`noopener noreferrer`:void 0}function m(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{d as n,m as r,f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./use-is-hydrated-DDCqXmju.js";function t({children:t,fallback:n=null}){return e()?t():n}function n(){return typeof window<`u`&&typeof document<`u`}export{n,t};
|
package/dist/button-CaM-ZAH5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-CGKaq_tV.js";import{t as n}from"./slot-C3gII_9c.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{n as i}from"./button-DGsTE3P2.js";import{t as a}from"./button-B52_vczK.js";import{Children as o,cloneElement as s,isValidElement as c}from"react";import l from"tiny-invariant";import{jsx as u}from"react/jsx-runtime";import{CircleNotchIcon as d}from"@phosphor-icons/react/CircleNotch";const f=({"aria-disabled":f,appearance:p,asChild:m=!1,children:h,className:g,disabled:_,icon:v,intent:y,isLoading:b=!1,label:x,ref:S,size:C=`md`,type:w,...T})=>{let E=r(_??b)||r(f),D=b?u(d,{className:`animate-spin`}):v,O={"aria-disabled":E,"data-slot":`icon-button`,className:e(a({appearance:p,intent:y,isLoading:b,size:C}),g),"data-appearance":p,"data-disabled":E,"data-icon-button":!0,"data-intent":y,"data-loading":b,"data-size":C,ref:S,...T,"aria-label":x},k=u(t,{svg:D});return m?(l(c(h)&&o.only(h),"When using `asChild`, IconButton must be passed a single child as a JSX tag."),u(n,{...O,children:s(h,E?i:{},k)})):u(`button`,{...O,disabled:E,type:w??`button`,children:k})};export{f as t};
|
package/dist/button-DGsTE3P2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-CGKaq_tV.js";import{t as n}from"./slot-C3gII_9c.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{Children as a,cloneElement as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{cva as f}from"class-variance-authority";import{CircleNotchIcon as p}from"@phosphor-icons/react/CircleNotch";const m=f(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),h={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},g={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},_=({"aria-disabled":f,appearance:_,asChild:y,children:b,className:x,disabled:S,icon:C,iconPlacement:w=`start`,intent:T,isLoading:E=!1,ref:D,size:O=`md`,type:k,...A})=>{let j=r(S??E)||r(f),M=E?u(p,{className:`animate-spin`}):C,N=M&&_!==`link`,P={"aria-disabled":j,"data-slot":`button`,className:e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,m({appearance:_,intent:T,isLoading:E,size:O}),_!==`link`&&`font-sans`,N&&w===`start`&&h[O],N&&w===`end`&&g[O],x),"data-appearance":_,"data-disabled":j,"data-intent":T,"data-loading":E,"data-size":_===`link`?void 0:O,ref:D,...A};return y?(c(s(b)&&a.only(b),"When using `asChild`, Button must be passed a single child as a JSX tag."),u(n,{...P,children:o(b,j?v:{},d(l,{children:[M&&u(t,{svg:M,className:i(w===`end`&&`order-last`)}),u(`span`,{"data-slot":`button-label`,className:`contents`,children:b.props.children})]}))})):d(`button`,{...P,disabled:j,type:k??`button`,children:[M&&u(t,{svg:M,className:i(w===`end`&&`order-last`)}),u(`span`,{"data-slot":`button-label`,className:`contents`,children:b})]})},v={tabIndex:-1,onClickCapture:e=>{e.preventDefault(),e.stopPropagation()}};export{v as n,_ as t};
|
package/dist/button-Wn-yt0c_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-C3gII_9c.js";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),a=({appearance:r,asChild:a,className:o,children:s,ref:c,...l})=>n(a?t:`div`,{"data-slot":`button-group`,className:e(i({appearance:r}),o),ref:c,...l,children:s});export{a as t};
|
package/dist/chart-B_rZqf8a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./button-CaM-ZAH5.js";import{t as a}from"./use-copy-to-clipboard-CSyp4Zk0.js";import{t as o}from"./alternate-announcement-BkH4bOKp.js";import{t as s}from"./live-region-CV7kykeo.js";import{createContext as c,useContext as l,useEffect as u,useId as d,useLayoutEffect as f,useMemo as p,useRef as m,useState as h,useSyncExternalStore as g}from"react";import _ from"tiny-invariant";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{CheckIcon as x}from"@phosphor-icons/react/Check";import{CopyIcon as S}from"@phosphor-icons/react/Copy";import{scaleTime as C}from"d3-scale";import{area as w,curveLinear as T,curveMonotoneX as E,curveStep as D,line as O}from"d3-shape";const k=(e,t)=>Reflect.get(e,t),A=e=>{let{step:t,slot:n}=e,r=Math.min(64,Math.max(24,t*.6));return Math.min(n,r)},j=.5,ee=(e,t)=>e<0?e:t,te=e=>{let{lower:t,upper:n,toPixel:r,reveal:i,gap:a}=e,o=r(t<0?n:t),s=o+(r(ee(t,n))-o)*i;if(Math.abs(o-r(0))<j)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}},ne=e=>{let{lower:t,upper:n,pileOuter:r,toPixel:i}=e;if(Number.isNaN(r))return!1;let a=i(ee(t,n));return Math.abs(a-i(r))<j},re=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`,`chart-other`],ie=e=>re.includes(e),M=e=>`--color-${e}`,ae=`var(--color-chart-decorative)`,N=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`],P=e=>{let t=e.toLowerCase();return t.includes(`var(`)||t.includes(`currentcolor`)},F=(e,t)=>{let n=e.ownerDocument,r=n.createElement(`span`);r.style.display=`none`,r.style.color=t,e.appendChild(r);let i=n.defaultView?.getComputedStyle(r).color??``;return r.remove(),i},oe=(e,t)=>ie(t)?F(e,`var(${M(t)})`):P(t)?F(e,t):t,se=e=>({grid:F(e,`var(--border-color-card-muted)`),baseline:F(e,`var(--border-color-card)`),tickText:F(e,`var(--text-color-muted)`),reference:F(e,`var(--color-neutral-500)`),surface:F(e,`var(--background-color-card)`)}),ce=e=>`${e.className}|${e.getAttribute(`data-applied-theme`)??``}|${e.getAttribute(`data-theme`)??``}`,le=(e,t)=>{let n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:[`class`,`data-applied-theme`,`data-theme`]}),()=>n.disconnect()},I=1.5,ue=1.1,L=1.6,de=e=>`oklch(from ${e} calc(l - 0.18) c h)`,R=(e,t,n)=>{let r=I;if(n===`up`){e.moveTo(-1.5,t+r),e.lineTo(t+r,-1.5),e.moveTo(-1.5,r),e.lineTo(r,-1.5),e.moveTo(t-r,t+r),e.lineTo(t+r,t-r);return}e.moveTo(-1.5,-1.5),e.lineTo(t+r,t+r),e.moveTo(t-r,-1.5),e.lineTo(t+r,r),e.moveTo(-1.5,t-r),e.lineTo(r,t+r)},z=(e,t)=>{let{size:n,width:r}=t;e.fillRect(0,n/2-r/2,n,r)},B=(e,t)=>{let{size:n,width:r}=t;e.fillRect(n/2-r/2,0,r,n)},fe={hatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=I,e.beginPath(),R(e,t,`up`),e.stroke()},"hatch-reverse":(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=I,e.beginPath(),R(e,t,`down`),e.stroke()},crosshatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=1,e.beginPath(),R(e,t,`up`),R(e,t,`down`),e.stroke()},perpendicular:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?B(e,{size:t,width:2}):z(e,{size:t,width:2})},parallel:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?z(e,{size:t,width:2}):B(e,{size:t,width:2})},grid:(e,{size:t,ink:n})=>{e.fillStyle=n,z(e,{size:t,width:ue}),B(e,{size:t,width:ue})},dots:(e,{size:t,ink:n})=>{e.fillStyle=n,e.beginPath(),e.arc(t/4,t/4,L,0,Math.PI*2),e.moveTo(3*t/4+L,3*t/4),e.arc(3*t/4,3*t/4,L,0,Math.PI*2),e.fill()}},pe=(e,t)=>{let{texture:n,color:r,ink:i,devicePixelRatio:a,orientation:o}=t,s=e.canvas.ownerDocument.createElement(`canvas`);s.width=Math.max(1,Math.round(8*a)),s.height=s.width;let c=s.getContext(`2d`);if(c==null)return null;let l=s.width/8;c.scale(l,l),c.fillStyle=r,c.fillRect(0,0,8,8),fe[n](c,{size:8,ink:i,orientation:o});let u=e.createPattern(s,`repeat`);return u?.setTransform({a:1/l,b:0,c:0,d:1/l,e:0,f:0}),u},V=e=>{let{pointCount:t,columnCount:n,wasDecimated:r}=e;return n<=0?!1:r?t>=n*3:t>=n*4},me=e=>{let{xs:t,values:n,startIndex:r,endIndex:i,positionK:a,positionB:o,columnCount:s}=e,c=new Uint8Array(s),l=new Float64Array(s),u=new Float64Array(s),d=new Float64Array(s),f=new Float64Array(s);for(let e=r;e<=i;e++){let r=n[e]??NaN;if(Number.isNaN(r))continue;let i=t[e]??NaN,p=Math.floor(i*a+o);if(p===s&&(p=s-1),!(p<0||p>=s)){if(c[p]===0){c[p]=1,l[p]=r,u[p]=r,d[p]=r,f[p]=r;continue}r<(l[p]??1/0)&&(l[p]=r),r>(u[p]??-1/0)&&(u[p]=r),f[p]=r}}return{columnCount:s,hasData:c,minValue:l,maxValue:u,inValue:d,outValue:f}},he=new Intl.NumberFormat,ge=new Intl.NumberFormat(void 0,{maximumSignificantDigits:4}),_e=new Map,H=(e,t)=>{let n=Object.is(e,-0)?0:e,r=t?.maximumFractionDigits;if(r!=null){let e=_e.get(r);return e??(e=new Intl.NumberFormat(void 0,{maximumFractionDigits:r}),_e.set(r,e)),e.format(n)}return n!==0&&Math.abs(n)<1?ge.format(n):he.format(n)},ve=e=>!Number.isFinite(e)||e<=0?0:Math.min(20,Math.max(0,-Math.floor(Math.log10(e)))),ye=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),be=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}),xe=e=>e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0,U=(e,t)=>typeof e==`string`?e:typeof e==`number`?H(e):Number.isNaN(e.getTime())?`—`:t?.datasetHasTimeOfDay??xe(e)?ye.format(e):be.format(e),Se=(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},Ce=Math.PI/2-.05,we=e=>({cosYaw:Math.cos(e.yaw),sinYaw:Math.sin(e.yaw),cosPitch:Math.cos(e.pitch),sinPitch:Math.sin(e.pitch)}),Te=(e,t,n,r)=>{let i=e*r.cosYaw+n*r.sinYaw,a=-e*r.sinYaw+n*r.cosYaw,o=t*r.cosPitch-a*r.sinPitch,s=t*r.sinPitch+a*r.cosPitch,c=4/(4+s);return{x:i*c,y:o*c,depth:s,scale:c}},Ee=e=>Math.min(Ce,Math.max(-Ce,e)),De=(e,t)=>{let n=t[1]-t[0];return n===0?0:(e-t[0])/n*2-1},Oe=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],ke=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],Ae=Math.sqrt(50),je=Math.sqrt(10),Me=Math.sqrt(2),W=(e,t,n,r)=>{let i=(t-e)/Math.max(0,n),a=r?.integer?Math.max(1,i):i,o=Math.floor(Math.log10(a)),s=a/10**o,c=s>=Ae?10:s>=je?5:s>=Me?2:1,l,u,d;return o<0?(d=10**-o/c,l=Math.round(e*d),u=Math.round(t*d),l/d<e&&(l+=1),u/d>t&&--u,d=-d):(d=10**o*c,l=Math.round(e/d),u=Math.round(t/d),l*d<e&&(l+=1),u*d>t&&--u),u<l&&.5<=n&&n<2?W(e,t,n*2,r):[l,u,d]},Ne=(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?W(t,e,n,r):W(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},Pe=(e,t,n)=>W(e,t,n)[2],G=(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}},Fe=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}},K=(e,t)=>e.rangeStart+e.offset+t*e.step,q=(e,t)=>K(e,t)+e.bandwidth/2,Ie=(e,t)=>({start:K(e,t)-(e.step-e.bandwidth)/2,size:e.step}),Le=(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))},Re=(e,t,n)=>Ne(e[0],e[1],t,n);let J=null,ze=null;const Be=e=>{if(ze!=null&&J!=null&&J[0]===e[0]&&J[1]===e[1])return ze;let t=C().domain([new Date(e[0]),new Date(e[1])]);return J=[e[0],e[1]],ze=t,t},Ve=(e,t)=>Be(e).ticks(t).map(e=>e.getTime()),He=e=>{let t=Be(e).tickFormat();return e=>t(new Date(e))},Y=(e,t)=>{if(e[0]>e[1])return Y([e[1],e[0]],t);if(e[0]===e[1]){let n=e[0],r=n===0?1:Math.abs(n)*.5;return Y([n-r,n+r],t)}let n=e[0],r=e[1],i=NaN;for(let e=0;e<10;e++){let e=Pe(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]},Ue=(e,t)=>{let n=Y(e,t);return e[0]===0?[0,n[1]]:n},We=e=>e===`monotone`?E:e===`step`?D:T,X=e=>Math.round(e)+.5,Ge=(e,t)=>{let{plot:n,color:r,xLines:i,yLines:a}=t;e.save(),e.strokeStyle=r,e.lineWidth=1;for(let t of i)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo(X(t.position),n.top),e.lineTo(X(t.position),n.top+n.height),e.stroke();for(let t of a)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo(n.left,X(t.position)),e.lineTo(n.left+n.width,X(t.position)),e.stroke();e.restore()},Ke=(e,t)=>{let{plot:n,color:r,y:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(n.left,X(i)),e.lineTo(n.left+n.width,X(i)),e.stroke()},qe=(e,t)=>{let{plot:n,color:r,x:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(X(i),n.top),e.lineTo(X(i),n.top+n.height),e.stroke()},Je=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.width),r=Math.min(t.valueY,t.baselineY),i=Math.abs(t.baselineY-t.valueY);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(t.x,r,n,i);continue}t.valueY<=t.baselineY?e.roundRect(t.x,r,n,i,[a,a,0,0]):e.roundRect(t.x,r,n,i,[0,0,a,a])}e.fill()},Ye=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.height),r=Math.min(t.valueX,t.baselineX),i=Math.abs(t.valueX-t.baselineX);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(r,t.y,i,n);continue}t.valueX>=t.baselineX?e.roundRect(r,t.y,i,n,[0,a,a,0]):e.roundRect(r,t.y,i,n,[a,0,0,a])}e.fill()},Xe=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}=t,c=O().x(a).y(o).defined(s).curve(We(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),c(i),e.stroke()},Ze=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}=t,l=w().x(a).y0(o).y1(s).defined(c).curve(We(r)).context(e);e.beginPath(),l(i),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore();let u=O().x(a).y(s).defined(c).curve(We(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),u(i),e.stroke()},Qe=(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()},$e=(e,t)=>{let{color:n,lowerColumns:r,upperColumns:i,columnToX:a,valueK:o,valueB:s}=t;e.beginPath();let c=-1,l=t=>{if(c<0)return;let n=!1;for(let r=c;r<=t;r++){let t=a(r),c=(i.maxValue[r]??0)*o+s;n?e.lineTo(t,c):(e.moveTo(t,c),n=!0)}for(let n=t;n>=c;n--){let t=a(n),i=(r.minValue[n]??0)*o+s;e.lineTo(t,i)}e.closePath(),c=-1};for(let e=0;e<i.columnCount;e++){if(i.hasData[e]===0){l(e-1);continue}c<0&&(c=e)}l(i.columnCount-1),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),Qe(e,{color:n,columns:i,columnToX:a,valueK:o,valueB:s})},et=(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()},tt=[[-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]],nt=tt.map(([e,t])=>[(e-t)/Math.SQRT2,(e+t)/Math.SQRT2]),rt=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]}),it={circle:(e,t,n,r)=>{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)=>{et(e,t,n,r*1.189,tt)},cross:(e,t,n,r)=>{et(e,t,n,r*1.189,nt)},star:(e,t,n,r)=>{et(e,t,n,r*1.673,rt)}},at=(e,t,n,r,i)=>{it[i](e,t,n,r)},ot=(e,t)=>{let{color:n,surface:r,shape:i,indexes:a,xAt:o,yAt:s,definedAt:c}=t;e.fillStyle=n,e.strokeStyle=r,e.lineWidth=2;for(let t of a)c(t)&&(e.beginPath(),at(e,o(t),s(t),4,i),e.fill(),e.stroke())},st=5e3,ct=2e4,lt=(e,t)=>{let{color:n,surface:r,shape:i,totalPointCount:a,indexes:o,xAt:s,yAt:c,radiusAt:l}=t;if(e.fillStyle=n,a>ct){e.beginPath();for(let t of o)l(t)<=0||e.rect(s(t)-1,c(t)-1,2,2);e.fill();return}let u=a<=st;e.strokeStyle=r,e.lineWidth=2;for(let t of o){let n=l(t);n<=0||(e.beginPath(),at(e,s(t),c(t),n,i),e.fill(),u&&e.stroke())}},ut=(e,t)=>{let{count:n,order:r,screenX:i,screenY:a,radius:o,colorAt:s,shapeAt:c,alphaAt:l,surface:u}=t;if(e.save(),n>ct){let t=``,n=-1;for(let c of r){let r=s(c);r!==t&&(e.fillStyle=r,t=r);let u=l(c);u!==n&&(e.globalAlpha=u,n=u);let d=Math.max(1,(o[c]??0)/2);e.fillRect((i[c]??0)-d/2,(a[c]??0)-d/2,d,d)}e.restore();return}let d=n<=st;e.strokeStyle=u,e.lineWidth=2;let f=``,p=-1;for(let t of r){let n=s(t);n!==f&&(e.fillStyle=n,f=n);let r=l(t);r!==p&&(e.globalAlpha=r,p=r),e.beginPath(),at(e,i[t]??0,a[t]??0,o[t]??0,c(t)),e.fill(),d&&e.stroke()}e.restore()},dt=(e,t)=>{let{gridColor:n,axisColor:r,corners:i,edges:a,cubeAlpha:o,axes:s}=t;if(e.save(),o>.01){e.globalAlpha=o,e.strokeStyle=n,e.lineWidth=1,e.beginPath();for(let[t,n]of a){let r=i[t],a=i[n];r!=null&&a!=null&&(e.moveTo(r.x,r.y),e.lineTo(a.x,a.y))}e.stroke()}e.strokeStyle=r;for(let{alpha:t,from:n,to:r}of s)t<=.01||(e.globalAlpha=t,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(r.x,r.y),e.stroke());e.restore()},ft=(e,t)=>{let{textColor:n,fontFamily:r,plot:i,center:a,axes:o}=t;e.save(),e.fillStyle=n,e.font=`11px ${r}`,e.textAlign=`center`,e.textBaseline=`middle`;for(let{label:t,alpha:n,from:r,to:s}of o){if(n<=.01)continue;let o=Math.hypot(r.x-a.x,r.y-a.y),c=Math.hypot(s.x-a.x,s.y-a.y),l=c>=o?s:r,u=c>=o?r:s,d=Math.max(1,Math.hypot(l.x-u.x,l.y-u.y)),f=(l.x-u.x)/d*16,p=(l.y-u.y)/d*16,m=Math.min(i.left+i.width-8,Math.max(i.left+8,l.x+f)),h=Math.min(i.top+i.height-6,Math.max(i.top+6,l.y+p));e.globalAlpha=n,e.fillText(t,m,h)}e.restore()},pt=(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,X(a)),e.lineTo(n.left+n.width,X(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))},mt=(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(X(a),n.top),e.lineTo(X(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)}},ht=(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()},gt=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;continue}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}},_t=e=>1-(1-e)**3;var vt=class{#e=new Float64Array;#t=new Float64Array;#n=new Float64Array;#r=0;#i=0;#a=!1;get active(){return this.#a}values(){return this.#n}retarget(e,t){let{duration:n,now:r}=t,i=e.length,a=this.#n.length!==i;if(a&&(this.#e=new Float64Array(i),this.#t=new Float64Array(i),this.#n=new Float64Array(i)),a||n<=0){for(let t=0;t<i;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n,this.#n[t]=n}this.#a=!1;return}let o=!1;for(let t=0;t<i;t++){let n=e[t]??NaN,r=this.#n[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n))){o=!0;break}}if(!o){for(let t=0;t<i;t++)this.#t[t]=e[t]??NaN;this.#a=!1;return}for(let t=0;t<i;t++)this.#e[t]=this.#n[t]??NaN,this.#t[t]=e[t]??NaN;this.#r=r,this.#i=n,this.#a=!0}snap(){this.#n.set(this.#t),this.#a=!1}tick(e){if(!this.#a)return!1;let t=Math.min(1,(e-this.#r)/this.#i),n=_t(t);for(let e=0;e<this.#n.length;e++){let t=this.#e[e]??NaN,r=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(r)){this.#n[e]=r;continue}this.#n[e]=t+(r-t)*n}return t>=1&&(this.#a=!1),this.#a}},yt=class{#e=new Float64Array;#t=new Float64Array;#n=0;#r=!1;#i;#a;#o=0;constructor(e={}){this.#i=e.speed??.14,this.#a=e.epsilon??.001}get active(){return this.#r}values(){return this.#t}jump(e){this.#t.length!==e.length&&(this.#e=new Float64Array(e.length),this.#t=new Float64Array(e.length));for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n}this.#r=!1}aim(e,t){if(this.#t.length!==e.length){this.jump(e);return}let n=!1;for(let t=0;t<e.length;t++){let r=e[t]??NaN,i=this.#e[t]??NaN;if(i!==r&&!(Number.isNaN(i)&&Number.isNaN(r))){n=!0;break}}if(!n)return;let r=0;for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n;let i=Math.abs(n-(this.#t[t]??NaN));Number.isFinite(i)&&i>r&&(r=i)}this.#o=r,this.#r||(this.#r=!0,this.#n=t)}tick(e){if(!this.#r)return!1;let t=Math.min(50,Math.max(0,e-this.#n));this.#n=e;let n=1-(1-this.#i)**(t/16.67),r=Math.max(this.#o*this.#a,2**-52),i=!0;for(let e=0;e<this.#t.length;e++){let t=this.#e[e]??NaN,a=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(a)){this.#t[e]=t;continue}let o=a+(t-a)*n;n>0&&o===a||Math.abs(t-o)<=r?this.#t[e]=t:(this.#t[e]=o,i=!1)}return this.#r=!i,this.#r}};const bt=e=>`${e.colorInput}|${e.texture}`,xt={bar:`BarChart.Bar`,line:`LineChart.Line`,area:`AreaChart.Area`,scatter:`ScatterPlot.Point`},St=1e3;var Ct=class{#e;#t;#n;#r={xKey:``,xScale:`linear`,yDomain:[`auto`,`auto`],orientation:`vertical`,zKey:null,dimensions:3,stacked:!1,animate:!0};#i={onDatumActivate:null,onActiveIndexChange:null};#a;#o=null;#s=null;#c=null;#l=null;#u=0;#d=0;#f=1;#p=[];#m=0;#h=new Float64Array;#g=[];#_=null;#v=null;#y=!1;#b=!1;#x=new Map;#S=0;#C=0;#w=!0;#T=!0;#E=null;#D=new yt({speed:.16});#O=new yt({speed:.2});#k=new Map;#A=new Map;#j=null;#M=!1;#N=new Map;#P=new Map;#F=0;#I=!1;#L=new Map;#R={alpha:0,target:0};#z=0;#B=null;#V=null;#H=null;#U={left:0,top:0,width:0,height:0};#W=null;#G=new Float64Array;#K=[0,1];#q={yaw:.65,pitch:-.35};#J=new yt({speed:.12});#Y=new yt({speed:.16});#X=null;#Z=!1;#Q=null;#$=new Int32Array;#ee=new Map;#te=``;#ne=null;#re=null;#ie=null;#ae=void 0;#oe=null;#se=!1;#ce=null;#le=null;#ue={width:0,height:0};#de=!1;#fe=!1;#pe=0;#me=!1;constructor(e){this.#e=e.kind,this.#t=e.elements,this.#n=e.store,this.#a=e.elements.canvas.getContext(`2d`),this.#n.onSeriesChange=()=>{this.#b=!0,this.#De()},this.#n.onPresentationChange=()=>{this.#De()},typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(e=>{let t=e[0];t!=null&&(this.#u=t.contentRect.width,this.#d=t.contentRect.height,this.#f=this.#je(),this.#L.clear(),this.#ne=null,this.#De())}),this.#o.observe(e.elements.plot),this.#c=new ResizeObserver(()=>{this.#ue={width:this.#t.tooltip.offsetWidth,height:this.#t.tooltip.offsetHeight},this.#Oe()}),this.#c.observe(e.elements.tooltip));let t=e.elements.root.ownerDocument.documentElement;this.#s=le(t,()=>{this.#H=null,this.#De()}),this.#he(),this.#Y.jump([1,1])}destroy(){this.#me=!0,this.#o?.disconnect(),this.#c?.disconnect(),this.#s?.(),this.#l?.(),this.#n.onSeriesChange=null,this.#n.onPresentationChange=null,this.#B!=null&&(clearTimeout(this.#B),this.#B=null),this.#pe!==0&&cancelAnimationFrame(this.#pe)}#he(){if(typeof matchMedia>`u`||this.#me)return;this.#l?.();let e=matchMedia(`(resolution: ${this.#je()}dppx)`),t=()=>{this.#f=this.#je(),this.#L.clear(),this.#De(),this.#he()};e.addEventListener(`change`,t,{once:!0}),this.#l=()=>e.removeEventListener(`change`,t)}setOptions(e){let t=this.#r;if(this.#r=e,t.xScale!==e.xScale&&this.#N.clear(),t.animate&&!e.animate&&this.#ge(),t.dimensions!==e.dimensions){let t=[+(e.dimensions>=2),+(e.dimensions>=3)],n=wt(e.dimensions);if(this.#ye()===0||!this.#M)this.#Y.jump(t),this.#q=n,this.#J.jump([n.yaw,n.pitch]);else{let e=n.yaw+Math.round((this.#q.yaw-n.yaw)/(Math.PI*2))*Math.PI*2;this.#Y.aim(t,performance.now()),this.#J.jump([this.#q.yaw,this.#q.pitch]),this.#J.aim([e,n.pitch],performance.now())}}(t.xKey!==e.xKey||t.xScale!==e.xScale||t.zKey!==e.zKey||t.stacked!==e.stacked)&&(this.#b=!0),(t.yDomain[0]!==e.yDomain[0]||t.yDomain[1]!==e.yDomain[1])&&(this.#ne=null,this.#M&&(this.#ye()===0?this.#D.jump(this.#xe()):this.#D.aim(this.#xe(),performance.now()))),this.#De()}setCallbacks(e){this.#i=e}setRows(e){e!==this.#p&&(this.#p=e,this.#b=!0,this.#De())}flushIngest(){!this.#b||this.#me||(this.#b=!1,this.#_e())}setControlledActiveIndex(e){let t=this.#oe;this.#oe=null;let n=this.#ae!==void 0;if(this.#ae=e,e!==void 0){let n=t!=null&&t.index===e&&t.viaKeyboard;this.#at(e==null?null:this.#tt(e),{viaKeyboard:n,notify:!1})}else n&&this.#at(null,{viaKeyboard:!1,notify:!1});this.#Oe()}handlePointerMove(e,t){if(this.#X!=null){let n=e-this.#X.lastX,r=t-this.#X.lastY;(this.#X.moved||Math.abs(n)+Math.abs(r)>3)&&(this.#X.moved=!0,this.#q={yaw:this.#q.yaw+n*.008,pitch:Ee(this.#q.pitch+r*.008)},this.#J.jump([this.#q.yaw,this.#q.pitch]),this.#X.lastX=e,this.#X.lastY=t,this.#at(null,{viaKeyboard:!1,notify:!1}),this.#De());return}if(this.#ce=e,this.#le=t,this.#e===`scatter`){let n=this.#ft(e,t);this.#re=n?.seriesKey??null,this.#ne=n==null?null:{x:n.screenX,y:n.screenY},this.#at(n?.index??null,{viaKeyboard:!1,notify:!0});return}let n=this.#rt(e,t);this.#at(n,{viaKeyboard:!1,notify:!0})}handlePointerDown(e,t){if(this.#Z=!0,this.#Ce()){this.#X={lastX:e,lastY:t,moved:!1};return}this.handlePointerMove(e,t)}handlePointerUp(e,t){let n=this.#X;this.#X=null;let r=this.#Z;if(this.#Z=!1,n!=null){if(n.moved)return;this.handlePointerMove(e,t)}r&&this.handleActivate(e,t)}handlePointerLeave(){this.#ce=null,this.#le=null,this.#X=null,this.#Z=!1,this.#re=null,this.#ne=null,this.#at(null,{viaKeyboard:!1,notify:!0})}handleActivate(e,t){let n=this.#$e();if(n==null)return;let r=this.#et(n),i=this.#p[r];if(i==null)return;let a=this.#e===`scatter`?this.#re:e==null||t==null?null:this.#it(n,e,t);this.#i.onDatumActivate?.({index:r,xValue:this.#nt(n),datum:i,dataKey:a})}handleKeyDown(e){if(this.#m===0)return!1;let t=this.#m-1,n=this.#$e(),r=this.#I?Math.max(1,Math.floor(this.#m/Math.max(1,this.#U.width*this.#f))):1,i=Math.max(1,Math.floor(this.#m/10)),a=(()=>{switch(e){case`ArrowLeft`:return Math.max(0,(n??this.#m)-r);case`ArrowRight`:return Math.min(t,(n??-1)+r);case`PageUp`:return Math.min(t,(n??0)+i);case`PageDown`:return Math.max(0,(n??t)-i);case`Home`:return 0;case`End`:return t;case`Escape`:return null;default:return}})();return a===void 0?e===`Enter`||e===` `?(this.handleActivate(null,null),!0):!1:(this.#ce=null,this.#le=null,this.#re=null,this.#ne=null,this.#at(a,{viaKeyboard:!0,notify:!0}),!0)}invalidateColors(){this.#H=null,this.#De()}#ge(){this.#D.jump(this.#xe()),this.#O.jump(this.#Se()),this.#Y.jump([+(this.#r.dimensions>=2),+(this.#r.dimensions>=3)]);let e=wt(this.#r.dimensions);this.#q=e,this.#J.jump([e.yaw,e.pitch]);for(let e of this.#k.values())e.snap();for(let e of this.#A.values())e.snap();this.#R.alpha=this.#R.target,this.#De()}#_e(){let e=this.#p,{xKey:t,xScale:n}=this.#r,r=this.#n.seriesSpecs();this.#L.clear();let i=this.#h;if(n===`band`||n===`point`){let n=e.length,r=new Float64Array(n),i=Array.from({length:n},()=>``),a=!1;for(let o=0;o<n;o++){let n=e[o],s=n==null?void 0:k(n,t);s!==void 0&&(a=!0),i[o]=typeof s==`string`||typeof s==`number`||s instanceof Date?s:String(s),r[o]=o}_(n===0||a,`${this.#Te()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#_=null,this.#v=null,this.#m=n,this.#h=r,this.#g=i,this.#T=!0}else{let r=[],i=!1,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e[s],l=c==null?void 0:k(c,t);l!==void 0&&(i=!0),l!=null&&(a=!0);let u=kt(l,n===`time`);Number.isFinite(u)&&(r.push({source:s,x:u}),o=!0)}_(e.length===0||i,`${this.#Te()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),_(!a||o,`${this.#Te()} could not read any "${t}" values as ${n===`time`?`dates`:`numbers`} for the "${n}" x scale — check the xScale and the data types.`);let s=!0;for(let e=1;e<r.length;e++)if((r[e]?.x??0)<(r[e-1]?.x??0)){s=!1;break}let c=s?r:r.toSorted((e,t)=>e.x-t.x),l=c.length,u=new Float64Array(l),d=l===e.length,f=!0,p=new Int32Array(l);for(let e=0;e<l;e++){let t=c[e];t!=null&&(u[e]=t.x,Number.isInteger(t.x)||(f=!1),p[e]=t.source,t.source!==e&&(d=!1))}if(d)this.#_=null,this.#v=null;else{this.#_=p;let t=new Int32Array(e.length).fill(-1);for(let e=0;e<l;e++){let n=p[e];n!=null&&(t[n]=e)}this.#v=t}this.#m=l,this.#h=u,this.#g=[],this.#T=f}let a=!1;for(let e of this.#g)if(e instanceof Date&&xe(e)){a=!0;break}this.#y=a;let o=this.#h[0],s=this.#h[this.#m-1],c=i[0],l=i[i.length-1];!this.#Ce()&&(n===`linear`||n===`time`)&&o!=null&&s!=null&&c!=null&&l!=null&&o>c&&s>=l?(this.#R.target=1,this.#z=performance.now()):(o!==c||s!==l)&&(this.#R.target=0);let u=this.#m,d=i.length===u&&u<=2500;if(d){for(let e=0;e<u;e++)if(i[e]!==this.#h[e]){d=!1;break}}let f=this.#x;this.#x=new Map;let p=1/0,m=-1/0,h=!0;for(let t of r){let n=new Float64Array(u),r=!1;for(let i=0;i<u;i++){let a=e[this.#_==null?i:this.#_[i]??i],o=a==null?void 0:k(a,t.dataKey);if(o===void 0){n[i]=NaN;continue}r=!0;let s=typeof o==`number`&&Number.isFinite(o)?o:NaN;n[i]=s,Number.isNaN(s)||(s<p&&(p=s),s>m&&(m=s),Number.isInteger(s)||(h=!1))}_(u===0||r,`${xt[t.mark]} dataKey "${t.dataKey}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#x.set(t.dataKey,n)}this.#S=p===1/0?0:p,this.#C=m===-1/0?0:m,this.#w=h;let g=this.#r.zKey;if(this.#e===`scatter`&&g!=null){let t=new Float64Array(u),n=1/0,r=-1/0,i=!1;for(let a=0;a<u;a++){let o=e[this.#_==null?a:this.#_[a]??a],s=o==null?void 0:k(o,g);s!==void 0&&(i=!0);let c=typeof s==`number`&&Number.isFinite(s)?s:NaN;t[a]=c,Number.isNaN(c)||(c<n&&(n=c),c>r&&(r=c))}_(u===0||i,`ScatterPlot.Root zKey "${g}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#G=t,this.#K=n===1/0?[0,1]:Y([n,r],5)}else this.#G=new Float64Array;this.#Q=null,this.#ne=null,this.#E=this.#r.stacked?gt(r.map(e=>this.#x.get(e.dataKey)??new Float64Array)):null,this.#I=V({pointCount:u,columnCount:Math.max(1,Math.round(this.#U.width*this.#f)),wasDecimated:this.#I});let v=this.#H;if(v!=null){for(let e of this.#n.seriesMeta())if(v.inputs.get(e.dataKey)!==bt(e)){this.#H=null;break}}this.#ve(r,f,d);let y=this.#$e();y!=null&&this.#at(Math.min(y,Math.max(0,u-1)),{viaKeyboard:this.#se,notify:!1}),this.#lt({force:!0})}#ve(e,t,n){let r=performance.now(),i=this.#ye(),a=!this.#M;this.#M=this.#M||this.#m>0,a||i===0?(this.#D.jump(this.#xe()),this.#O.jump(this.#Se())):(this.#D.aim(this.#xe(),r),this.#O.aim(this.#Se(),r));let o=this.#m>0&&this.#m<=2500&&n,s=new Set,c=new Set,l=(e,t,n)=>{s.add(e);let a=this.#k.get(e);a??(a=new vt,this.#k.set(e,a));let c=o&&n&&a.values().length===t.length;a.retarget(t,{duration:c?i:0,now:r})};e.forEach((e,n)=>{c.add(e.dataKey);let a=t.has(e.dataKey);if(this.#E==null?l(e.dataKey,this.#x.get(e.dataKey)??new Float64Array,a):(l(`${e.dataKey}:lower`,this.#E.lower[n]??new Float64Array,a),l(`${e.dataKey}:upper`,this.#E.upper[n]??new Float64Array,a)),!this.#A.has(e.dataKey)&&this.#m>0){let t=new vt;t.retarget([0],{duration:0,now:r}),t.retarget([1],{duration:i,now:r}),this.#A.set(e.dataKey,t)}});for(let e of this.#k.keys())s.has(e)||this.#k.delete(e);for(let e of this.#A.keys())c.has(e)||this.#A.delete(e)}#ye(){return!this.#r.animate||this.#be()?0:280}#be(){return typeof matchMedia>`u`?!1:(this.#j??=matchMedia(`(prefers-reduced-motion: reduce)`),this.#j.matches)}#xe(){let[e,t]=this.#r.yDomain,n,r;if(this.#E==null?this.#e===`line`||this.#e===`scatter`?(n=this.#S,r=this.#C):(n=Math.min(0,this.#S),r=Math.max(0,this.#C)):(n=Math.min(0,this.#E.min),r=Math.max(0,this.#E.max)),typeof e==`number`&&(n=e),typeof t==`number`&&(r=t),this.#m===0)return[0,1];let i=this.#e===`bar`||this.#e===`area`?Ue([n,r],5):Y([n,r],5);return[typeof e==`number`?e:i[0],typeof t==`number`?t:i[1]]}#Se(){if(this.#m===0)return[0,1];let e=this.#h[0]??0,t=this.#h[this.#m-1]??0;return e===t?[e-.5,t+.5]:this.#e===`scatter`?Y([e,t],5):[e,t]}#Ce(){return this.#e===`scatter`&&this.#r.zKey!=null}#we(){return this.#e===`bar`&&this.#r.orientation===`horizontal`}#Te(){return`${xt[this.#e].split(`.`)[0]??`Chart`}.Root`}#Ee(e,t){let n=this.#V;n??(n=this.#t.canvas.ownerDocument.createElement(`canvas`),this.#V=n),(n.width!==e||n.height!==t)&&(n.width=e,n.height=t);let r=n.getContext(`2d`);return r==null?null:{canvas:n,ctx:r}}#De(){this.#fe=!0,this.#ke()}#Oe(){this.#ke()}#ke(){this.#de||this.#me||(this.#de=!0,this.#pe=requestAnimationFrame(()=>{this.#de=!1,this.#pe=0,this.#Ae()}))}#Ae(){if(!this.#me){if(this.flushIngest(),this.#fe){this.#fe=!1;let e=performance.now(),t=!1;t=this.#D.tick(e)||t,t=this.#O.tick(e)||t;for(let n of this.#k.values())t=n.tick(e)||t;for(let n of this.#A.values())t=n.tick(e)||t;if(t=this.#Y.tick(e)||t,this.#J.tick(e)){t=!0;let e=this.#J.values();this.#q={yaw:e[0]??this.#q.yaw,pitch:e[1]??this.#q.pitch}}this.#Me(),this.#Pe(),t=this.#Ve(e)||t,t&&this.#De()}this.#mt()}}#je(){return typeof devicePixelRatio==`number`&&devicePixelRatio>0?Math.min(devicePixelRatio,3):1}#Me(){let e=this.#t.root,t=`${ce(e.ownerDocument.documentElement)}|${this.#f}|${this.#r.orientation}`;if(this.#H?.signature===t)return;let n=e.ownerDocument.defaultView;if(n==null)return;let r=this.#a,i=new Map,a=new Map,o=new Map;for(let t of this.#n.seriesMeta()){let n=oe(e,t.colorInput);if(i.set(t.dataKey,n),a.set(t.dataKey,bt(t)),r!=null&&t.mark===`bar`&&t.texture!==`solid`){let i=pe(r,{texture:t.texture,color:n,ink:F(e,de(n)),devicePixelRatio:this.#f,orientation:this.#r.orientation});i!=null&&o.set(t.dataKey,i)}}this.#H={signature:t,series:i,inputs:a,barTextures:o,chrome:se(e),fontFamily:n.getComputedStyle(e).fontFamily||`sans-serif`}}#Ne(e){let t=this.#H?.signature??``;t!==this.#te&&(this.#ee.clear(),this.#te=t);let n=this.#ee.get(e);if(n!=null)return n;let r=oe(this.#t.root,e);return this.#ee.set(e,r),r}#Pe(){let e=this.#n.getSnapshot(),t=this.#Ce(),n=this.#we(),r=!t&&e.xAxis!=null,i=!t&&e.yAxis!=null,a=n?r:i,o=(n?i:r)?24:8,s=Math.max(0,this.#d-8-o);this.#U={left:8,top:8,width:Math.max(0,this.#u-16),height:s};let c=8;if(a){c=40;let e=this.#a;if(e!=null&&this.#H!=null){e.font=`11px ${this.#H.fontFamily}`;let t=0,r=n?this.#Be().map(e=>e.text):this.#ze().map(e=>e.text);for(let n of r){let r=e.measureText(n).width;r>t&&(t=r)}c=Math.ceil(t)+14}}this.#U={left:c,top:8,width:Math.max(0,this.#u-c-8),height:s};let l=n?this.#U.top:this.#U.left,u=n?this.#U.top+this.#U.height:this.#U.left+this.#U.width;this.#W=this.#r.xScale===`band`?Fe({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:.2,paddingOuter:.1}):this.#r.xScale===`point`?Fe({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:1,paddingOuter:.5}):null,this.#I=V({pointCount:this.#m,columnCount:Math.max(1,Math.round(this.#U.width*this.#f)),wasDecimated:this.#I})}#Fe(){let e=this.#D.values();return G([e[0]??0,e[1]??1],[this.#U.top+this.#U.height,this.#U.top])}#Ie(){let e=this.#D.values(),t=this.#we()?[this.#U.left,this.#U.left+this.#U.width]:[this.#U.top+this.#U.height,this.#U.top];return G([e[0]??0,e[1]??1],t)}#Le(){let e=this.#O.values();return G([e[0]??0,e[1]??1],[this.#U.left,this.#U.left+this.#U.width])}#Re(e){let t=this.#W;if(t!=null)return q(t,e);let{k:n,b:r}=this.#Le();return(this.#h[e]??0)*n+r}#ze(){let e=this.#n.getSnapshot(),t=this.#D.values(),n=Re([t[0]??0,t[1]??1],e.yAxis?.tickCount??5,{integer:this.#w}),r=e.yAxis?.tickFormat,i=n.length>1?ve(Math.abs((n[1]??0)-(n[0]??0))):void 0;return n.map(e=>({value:e,text:r==null?H(e,i==null?void 0:{maximumFractionDigits:i}):r(e)}))}#Be(){let e=this.#n.getSnapshot(),t=e.xAxis?.tickFormat;if(this.#W!=null){let e=this.#we(),n=e?this.#U.height:this.#U.width,r=Math.max(1,Math.floor(n/(e?15:60))),i=Math.max(1,Math.ceil(this.#m/r)),a=[];for(let e=0;e<this.#m;e+=i){let n=this.#g[e]??``;a.push({index:e,value:e,text:t==null?U(n,{datasetHasTimeOfDay:this.#y}):t(n)})}return a}let n=this.#O.values(),r=[n[0]??0,n[1]??1],i=e.xAxis?.tickCount??Math.max(2,Math.floor(this.#U.width/90));if(this.#r.xScale===`time`){let e=He(r);return Ve(r,i).map(n=>({index:null,value:n,text:t==null?e(n):t(new Date(n))}))}let a=Re(r,i,{integer:this.#T}),o=a.length>1?ve(Math.abs((a[1]??0)-(a[0]??0))):void 0;return a.map(e=>({index:null,value:e,text:t==null?H(e,o==null?void 0:{maximumFractionDigits:o}):t(e)}))}#Ve(e){let t=this.#a,n=this.#H;if(t==null||n==null||this.#u<=0||this.#d<=0)return!1;let r=Math.min(50,Math.max(0,e-this.#F));this.#F=e;let i=this.#t.canvas,a=Math.round(this.#u*this.#f),o=Math.round(this.#d*this.#f);(i.width!==a||i.height!==o)&&(i.width=a,i.height=o),t.setTransform(this.#f,0,0,this.#f,0,0),t.clearRect(0,0,this.#u,this.#d);let s=this.#n.getSnapshot(),c=this.#U;if(c.width<=0||c.height<=0)return!1;let l=this.#Fe(),u=this.#Le(),d=this.#n.seriesSpecs(),f=this.#Ce(),p=this.#ye()===0,m=f?[]:this.#He(t,n.fontFamily),h=f?[]:this.#Ue(t,n.fontFamily),g=Tt(this.#N,m,r,p);g=Tt(this.#P,h,r,p)||g;let _=this.#R;if(_.target===1){if(e-this.#z>St)_.target=0;else if(this.#B==null){let t=St-(e-this.#z)+17;this.#B=setTimeout(()=>{this.#B=null,this.#De()},t)}}if(p)_.alpha=_.target;else{let e=1-(1-(_.target>_.alpha?.16:.08))**(r/16.67);_.alpha+=(_.target-_.alpha)*e,Math.abs(_.target-_.alpha)<.02&&(_.alpha=_.target)}_.alpha!==_.target&&(g=!0);let v=this.#we(),y=v?this.#Ie():l,b=e=>this.#W==null?e*u.k+u.b:q(this.#W,e),x=e=>e*y.k+y.b,S=[...this.#N.entries()].map(([e,t])=>({position:b(e),alpha:t.alpha})),C=[...this.#P.entries()].map(([e,t])=>({position:x(e),alpha:t.alpha}));if(s.grid!=null&&!f){let e=s.grid.lines??(v?`vertical`:`horizontal`),r=v?S:C,i=v?C:S;Ge(t,{plot:c,color:n.chrome.grid,xLines:e===`horizontal`?[]:i,yLines:e===`vertical`?[]:r})}let w=Math.min(40,c.width*.25),T=t,E=null;_.alpha>.01&&w>1&&(E=this.#Ee(a,o),E!=null&&(E.ctx.setTransform(this.#f,0,0,this.#f,0,0),E.ctx.clearRect(0,0,this.#u,this.#d),T=E.ctx)),T.save(),T.beginPath(),T.rect(c.left,c.top,c.width,c.height+1),T.clip();let D=null;if(this.#e===`bar`?v?this.#Ye(T,d):this.#Je(T,d,l):this.#e===`scatter`?D=this.#ut(T,d,l):this.#Xe(T,d,l),T.restore(),E!=null){T.save(),T.globalCompositeOperation=`destination-out`;let e=T.createLinearGradient(c.left,0,c.left+w,0);e.addColorStop(0,`rgba(0, 0, 0, ${_.alpha})`),e.addColorStop(1,`rgba(0, 0, 0, 0)`),T.fillStyle=e,T.fillRect(c.left,c.top,w,c.height+1),T.restore(),t.drawImage(E.canvas,0,0,this.#u,this.#d)}D!=null&&ft(t,{textColor:n.chrome.tickText,fontFamily:n.fontFamily,plot:c,center:D.center,axes:D.axes}),this.#e===`bar`&&this.#m>0&&(v?qe(t,{plot:c,color:n.chrome.baseline,x:x(0)}):Ke(t,{plot:c,color:n.chrome.baseline,y:x(0)}));for(let e of f?[]:s.referenceLines){let r=x(e.y);if(v?r<c.left||r>c.left+c.width:r<c.top||r>c.top+c.height)continue;let i=e.color==null?n.chrome.reference:this.#Ne(e.color);v?mt(t,{plot:c,color:i,textColor:n.chrome.tickText,x:r,label:e.label,fontFamily:n.fontFamily}):pt(t,{plot:c,color:i,textColor:n.chrome.tickText,y:r,label:e.label,fontFamily:n.fontFamily})}let O=s.xAxis==null||f?[]:[...this.#N.entries()].map(([e,t])=>({position:b(e),text:t.text,alpha:t.alpha})),k=s.yAxis==null||f?[]:[...this.#P.entries()].map(([e,t])=>({position:x(e),text:t.text,alpha:t.alpha})),A=v?k:O,j=v?O:k;return(A.length>0||j.length>0)&&ht(t,{plot:c,color:n.chrome.tickText,fontFamily:n.fontFamily,xLabels:A,yLabels:j}),g}#He(e,t){e.font=`11px ${t}`;let n=this.#we(),r=this.#Le(),i=[],a=-1/0;for(let t of this.#Be()){let o=t.index!=null&&this.#W!=null,s=o&&this.#W!=null?q(this.#W,t.index??0):t.value*r.k+r.b,c=n?15/2:e.measureText(t.text).width/2,l=n?2:8;s-c<a+l||(a=s+c,i.push({key:o?t.index??0:t.value,text:t.text}))}return i}#Ue(e,t){let n=this.#ze();if(!this.#we())return n.map(e=>({key:e.value,text:e.text}));e.font=`11px ${t}`;let r=this.#Ie(),i=[],a=-1/0;for(let t of n){let n=t.value*r.k+r.b,o=e.measureText(t.text).width/2;n-o<a+8||(a=n+o,i.push({key:t.value,text:t.text}))}return i}#We(e,t,n){let r=t===`value`?e.dataKey:`${e.dataKey}:${t}`;if(!this.#I&&this.#m<=2500){let e=this.#k.get(r);if(e!=null&&e.values().length===this.#m)return e.values()}return t===`value`?this.#x.get(e.dataKey)??new Float64Array:(t===`lower`?this.#E?.lower:this.#E?.upper)?.[n]??new Float64Array}#Ge(e){return this.#A.get(e)?.values()[0]??1}#Ke(e,t){if(e==null)return 0;let n=e[t]??0;return Number.isNaN(n)?0:n}#qe(e,t,n){let r=this.#E;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 ne({lower:i,upper:a,pileOuter:c,toPixel:n})}#Je(e,t,n){let r=this.#W,i=this.#H;if(r==null||i==null||this.#m===0||t.length===0)return;let a=this.#E!=null,o=a?1:t.length,s=r.bandwidth>=8*o?2:+(r.bandwidth>=3*o),c=(r.bandwidth-s*(o-1))/o,l=A({step:r.step,slot:c}),u=e=>e*n.k+n.b;t.forEach((t,n)=>{let d=this.#Ge(t.dataKey),f=[],p=a?this.#We(t,`lower`,n):null,m=a?this.#We(t,`upper`,n):this.#We(t,`value`,n);for(let e=0;e<this.#m;e++){let t=m[e]??NaN;if(Number.isNaN(t))continue;let i=this.#Ke(p,e),h=a?K(r,e)+(r.bandwidth-l)/2:K(r,e)+(r.bandwidth-(c*o+s*(o-1)))/2+n*(c+s)+(c-l)/2,g=te({lower:i,upper:t,toPixel:u,reveal:d,gap:a?s:0});f.push({x:h,width:l,baselineY:g.baseline,valueY:g.value,rounded:this.#qe(n,e,u)})}Je(e,{fill:i.barTextures.get(t.dataKey)??i.series.get(t.dataKey)??`currentColor`,rects:f})})}#Ye(e,t){let n=this.#W,r=this.#H;if(n==null||r==null||this.#m===0||t.length===0)return;let i=this.#Ie(),a=this.#E!=null,o=a?1:t.length,s=n.bandwidth>=8*o?2:+(n.bandwidth>=3*o),c=(n.bandwidth-s*(o-1))/o,l=A({step:n.step,slot:c}),u=e=>e*i.k+i.b;t.forEach((t,i)=>{let d=this.#Ge(t.dataKey),f=[],p=a?this.#We(t,`lower`,i):null,m=a?this.#We(t,`upper`,i):this.#We(t,`value`,i);for(let e=0;e<this.#m;e++){let t=m[e]??NaN;if(Number.isNaN(t))continue;let r=this.#Ke(p,e),h=a?K(n,e)+(n.bandwidth-l)/2:K(n,e)+(n.bandwidth-(c*o+s*(o-1)))/2+i*(c+s)+(c-l)/2,g=te({lower:r,upper:t,toPixel:u,reveal:d,gap:a?s:0});f.push({y:h,height:l,baselineX:g.baseline,valueX:g.value,rounded:this.#qe(i,e,u)})}Ye(e,{fill:r.barTextures.get(t.dataKey)??r.series.get(t.dataKey)??`currentColor`,rects:f})})}#Xe(e,t,n){let r=this.#H;if(r==null||this.#m===0)return;let i=this.#Le(),a=this.#W,o=e=>a==null?(this.#h[e]??0)*i.k+i.b:q(a,e);t.forEach((t,i)=>{let a=r.series.get(t.dataKey)??`currentColor`,s=this.#Ge(t.dataKey);if(e.save(),s<1&&(e.beginPath(),e.rect(this.#U.left,0,this.#U.width*s,this.#d),e.clip()),this.#I){this.#Ze(e,t,i,a,n),e.restore();return}let c=t.mark===`area`,l=this.#We(t,this.#E==null?`value`:`upper`,i),u=this.#E==null?null:this.#We(t,`lower`,i),d=e=>!Number.isNaN(l[e]??NaN),f=[];for(let e=0;e<this.#m;e++)(!t.connectNulls||d(e))&&f.push(e);let 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;Ze(e,{color:a,curve:t.curve,indexes:f,xAt:o,y0At:r,y1At:p,definedAt:d})}else Xe(e,{color:a,curve:t.curve,indexes:f,xAt:o,yAt:p,definedAt:d}),t.markers&&this.#U.width/this.#m>=12&&ot(e,{color:a,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),indexes:f,xAt:o,yAt:p,definedAt:d});e.restore()})}#Ze(e,t,n,r,i){let a=Math.max(1,Math.round(this.#U.width*this.#f)),o=e=>this.#U.left+(e+.5)/this.#f;if(t.mark===`area`){let s=this.#Qe(`${t.dataKey}:upper`,this.#We(t,this.#E==null?`value`:`upper`,n),a),c=this.#E==null?null:this.#Qe(`${t.dataKey}:lower`,this.#We(t,`lower`,n),a);c==null?$e(e,{color:r,lowerColumns:At(s,0),upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b}):$e(e,{color:r,lowerColumns:c,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b});return}let s=this.#Qe(t.dataKey,this.#We(t,`value`,n),a);Qe(e,{color:r,columns:s,columnToX:o,valueK:i.k,valueB:i.b})}#Qe(e,t,n){let r=this.#O.values(),i=`${r[0]??0}:${r[1]??1}:${n}`,a=this.#L.get(e);if(a!=null&&a.key===i)return a.columns;let o=[r[0]??0,r[1]??1],s=G(o,[0,n]),c=me({xs:this.#h,values:t,startIndex:0,endIndex:this.#m-1,positionK:s.k,positionB:s.b,columnCount:n});return this.#L.set(e,{key:i,columns:c}),c}#$e(){if(this.#m===0)return null;let e;return e=this.#ae===void 0?this.#ie:this.#ae==null?null:this.#tt(this.#ae),e==null?null:Math.min(Math.max(0,e),this.#m-1)}#et(e){return this.#_==null?e:this.#_[e]??e}#tt(e){if(this.#p.length===0)return null;let t=Math.min(Math.max(0,e),this.#p.length-1);if(this.#v==null)return t;let n=this.#v[t]??-1;return n===-1?null:n}#nt(e){if(e<0||e>=this.#m)return``;let{xScale:t}=this.#r;if(t===`band`||t===`point`)return this.#g[e]??``;let n=this.#h[e]??0;return t===`time`?new Date(n):n}#rt(e,t){if(this.#m===0)return null;let n=this.#W;if(n!=null)return Le(n,this.#we()?t:e);let{k:r,b:i}=this.#Le();if(r===0)return 0;let a=e;if(this.#I){let t=Math.floor((e-this.#U.left)*this.#f);a=this.#U.left+(t+.5)/this.#f}return Se(this.#h,this.#m,(a-i)/r)}#it(e,t,n){let r=this.#n.seriesSpecs(),i=this.#we(),a=this.#W;if(this.#e===`bar`&&this.#E==null&&a!=null&&r.length>1){let o=(i?n:t)-K(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.#Ie():this.#Fe(),c=i?t:n,l=this.#E;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.#E==null?this.#x.get(t.dataKey):this.#E.upper[n])?.[e]??NaN;if(Number.isNaN(r))return;let i=Math.abs(r*o+s-c);i<d&&(d=i,u=t.dataKey)}),u}#at(e,t){let n=e==null||this.#m===0?null:Math.min(Math.max(0,e),this.#m-1),r=this.#ae!==void 0;if(t.notify&&n!==this.#$e()){let e=n==null?null:this.#et(n);if(this.#i.onActiveIndexChange?.(e),r){this.#oe={index:e,viaKeyboard:t.viaKeyboard};return}}this.#se=t.viaKeyboard,r||(this.#ie=n),this.#lt(),this.#Oe()}#ot=null;#st=!1;#ct=null;#lt(e={force:!1}){let t=this.#$e();if(!e.force&&t===this.#ot&&this.#se===this.#st&&this.#re===this.#ct)return;if(this.#ot=t,this.#st=this.#se,this.#ct=this.#re,t==null||this.#m===0){this.#n.publishHover(null);return}let n=this.#et(t),r=this.#p[n]??{},i=this.#n.getSnapshot().series.map(e=>{let n=this.#x.get(e.dataKey)?.[t]??NaN;return{dataKey:e.dataKey,label:e.label,value:Number.isNaN(n)?null:n,color:e.color}});this.#r.stacked&&i.reverse(),this.#e===`scatter`&&(i=this.#re==null?i.filter(e=>e.value!=null):i.filter(e=>e.dataKey===this.#re));let a={index:n,xValue:this.#nt(t),datum:r,points:i,viaKeyboard:this.#se};if(this.#Ce()){let e=this.#G[t]??NaN;a.zValue=Number.isNaN(e)?null:e}this.#n.publishHover(a)}#ut(e,t,n){let r=this.#H;if(r==null||this.#m===0||t.length===0)return null;if(this.#Ce())return this.#dt(e,t);let i=this.#Le(),a=t.map((e,t)=>{let n=this.#We(e,`value`,t),r=[];for(let e=0;e<this.#m;e++)Number.isNaN(n[e]??NaN)||r.push(e);return r}),o=a.reduce((e,t)=>e+t.length,0);return t.forEach((t,s)=>{let c=this.#We(t,`value`,s),l=a[s]??[];e.save(),e.globalAlpha=this.#Ge(t.dataKey),lt(e,{color:r.series.get(t.dataKey)??`currentColor`,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),totalPointCount:o,indexes:l,xAt:e=>(this.#h[e]??0)*i.k+i.b,yAt:e=>(c[e]??0)*n.k+n.b,radiusAt:()=>4}),e.restore()}),null}#dt(e,t){let n=this.#H;if(n==null)return null;let r=this.#U,i=we(this.#q),a=r.left+r.width/2,o=r.top+r.height/2,s=this.#Y.values(),c=s[0]??1,l=s[1]??1,u=.85-.22*c-.11*l,d=Math.min(r.width,r.height)/2*u,f=this.#O.values(),p=[f[0]??0,f[1]??1],m=this.#D.values(),h=[m[0]??0,m[1]??1],g=this.#K,_=t.map(e=>this.#Ge(e.dataKey)),v=this.#Y.values(),y=v[0]??1,b=v[1]??1,x=(e,t,n)=>{let r=Te(e,t,n,i);return{x:a+r.x*d,y:o-r.y*d}},S=Oe.map(([e,t,n])=>x(e,t,n)),C=t[0],w=t.length===1&&C!=null?C.dataKey:`y`,T=[{label:this.#r.xKey,alpha:1,from:x(-1,-y,-b),to:x(1,-y,-b)},{label:w,alpha:y,from:x(-1,-1,-b),to:x(-1,1,-b)},{label:this.#r.zKey??`z`,alpha:b,from:x(-1,-y,-1),to:x(-1,-y,1)}];dt(e,{gridColor:n.chrome.grid,axisColor:n.chrome.baseline,corners:S,edges:ke,cubeAlpha:b,axes:T});let E=this.#m*t.length,D=this.#Q;(D==null||D.screenX.length<E)&&(D={screenX:new Float64Array(E),screenY:new Float64Array(E),radius:new Float64Array(E),seriesIndex:new Int32Array(E),pointIndex:new Int32Array(E),depths:new Float64Array(E),count:0});let O=D.depths,k=0;t.forEach((e,t)=>{let n=this.#We(e,`value`,t);for(let e=0;e<this.#m;e++){let r=n[e]??NaN,s=this.#G[e]??NaN;if(Number.isNaN(r)||Number.isNaN(s))continue;let c=Te(De(this.#h[e]??0,p),De(r,h)*y,De(s,g)*b,i);D.screenX[k]=a+c.x*d,D.screenY[k]=o-c.y*d,D.radius[k]=4*c.scale,D.seriesIndex[k]=t,D.pointIndex[k]=e,O[k]=c.depth,k+=1}}),D.count=k,this.#Q=D,this.#$.length<k&&(this.#$=new Int32Array(E));let A=this.#$.subarray(0,k);for(let e=0;e<k;e++)A[e]=e;A.sort((e,t)=>(O[t]??0)-(O[e]??0));let j=t.map(e=>this.#n.seriesShape(e.dataKey));return ut(e,{count:k,order:A,screenX:D.screenX,screenY:D.screenY,radius:D.radius,colorAt:e=>{let r=t[D.seriesIndex[e]??0];return r==null?`currentColor`:n.series.get(r.dataKey)??`currentColor`},shapeAt:e=>j[D.seriesIndex[e]??0]??`circle`,alphaAt:e=>_[D.seriesIndex[e]??0]??1,surface:n.chrome.surface}),{center:{x:a,y:o},axes:T}}#ft(e,t){let n=this.#n.seriesSpecs(),r=576,i=null;if(this.#Ce()){let a=this.#Q;if(a==null)return null;for(let o=0;o<a.count;o++){let s=(a.screenX[o]??0)-e,c=(a.screenY[o]??0)-t,l=s*s+c*c;if(l<r){let e=n[a.seriesIndex[o]??0];if(e==null)continue;r=l,i={seriesKey:e.dataKey,index:a.pointIndex[o]??0,screenX:a.screenX[o]??0,screenY:a.screenY[o]??0}}}return i}let a=this.#Le(),o=this.#Fe();for(let s of n){let n=this.#x.get(s.dataKey);if(n!=null)for(let c=0;c<this.#m;c++){let l=n[c]??NaN;if(Number.isNaN(l))continue;let u=(this.#h[c]??0)*a.k+a.b,d=l*o.k+o.b,f=u-e,p=d-t,m=f*f+p*p;m<r&&(r=m,i={seriesKey:s.dataKey,index:c,screenX:u,screenY:d})}}return i}#pt(e){let t=this.#n.seriesSpecs();if(this.#Ce()){let t=this.#Q;if(t==null)return null;for(let n=0;n<t.count;n++)if((t.pointIndex[n]??-1)===e)return{x:t.screenX[n]??0,y:t.screenY[n]??0};return null}let n=this.#Le(),r=this.#Fe();for(let i of t){let t=this.#x.get(i.dataKey)?.[e]??NaN;if(!Number.isNaN(t))return{x:(this.#h[e]??0)*n.k+n.b,y:t*r.k+r.b}}return null}#mt(){let{crosshair:e,band:t,markers:n,tooltip:r}=this.#t,i=this.#$e(),a=i!=null&&this.#m>0,o=this.#e===`bar`,s=this.#e===`scatter`;if(e.style.opacity=a&&!o&&!s?`1`:`0`,t.style.opacity=a&&o?`1`:`0`,n.style.opacity=a&&!o?`1`:`0`,r.style.opacity=a?`1`:`0`,!a)return;let c=this.#U;if(s){let e=this.#ne??this.#pt(i);if(e==null){n.style.opacity=`0`,r.style.opacity=`0`;return}for(;n.children.length>1;)n.lastElementChild?.remove();n.children.length===0&&n.appendChild(Dt(n.ownerDocument));let t=n.children[0];if(t instanceof HTMLElement){let n=this.#n.getSnapshot().series,r=this.#re==null?n.find(e=>{let t=this.#x.get(e.dataKey)?.[i]??NaN;return!Number.isNaN(t)}):n.find(e=>e.dataKey===this.#re);t.style.opacity=`1`,Ot(t,r?.shape??`circle`,r?.color??`currentColor`),t.style.transform=`translate3d(${e.x}px, ${e.y}px, 0)`}this.#ht(e.x,e.y);return}let l=this.#Re(i),u=this.#we();if(o){let e=this.#W;if(e!=null){let n=Ie(e,i),r=Math.max(1,n.size),a=n.start-(r-n.size)/2;u?(t.style.transform=`translate3d(${c.left}px, ${a}px, 0)`,t.style.width=`${c.width}px`,t.style.height=`${r}px`):(t.style.transform=`translate3d(${a}px, ${c.top}px, 0)`,t.style.width=`${r}px`,t.style.height=`${c.height}px`)}}else{e.style.transform=`translate3d(${l}px, ${c.top}px, 0)`,e.style.height=`${c.height}px`;let t=this.#n.getSnapshot().series;for(;n.children.length>t.length;)n.lastElementChild?.remove();for(;n.children.length<t.length;)n.appendChild(Dt(n.ownerDocument));let r=this.#Fe();t.forEach((e,t)=>{let a=n.children[t];if(!(a instanceof HTMLElement))return;let o=this.#x.get(e.dataKey)?.[i]??NaN,s=this.#We(e,this.#E==null?`value`:`upper`,t)[i]??NaN;if(Number.isNaN(o)||Number.isNaN(s)){a.style.opacity=`0`;return}a.style.opacity=`1`,Ot(a,e.shape,e.color),a.style.transform=`translate3d(${l}px, ${s*r.k+r.b}px, 0)`})}o&&u&&this.#W!=null?this.#ht(this.#ce??c.left+c.width/2,q(this.#W,i)):this.#ht(l,this.#le??c.top+8)}#ht(e,t){let n=this.#U,r=this.#t.tooltip,i=this.#ue,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=`translate3d(${a}px, ${o}px, 0)`}};const wt=e=>e===3?{yaw:.65,pitch:-.35}:{yaw:0,pitch:0},Tt=(e,t,n,r)=>{for(let t of e.values())t.target=0;for(let n of t){let t=e.get(n.key);t==null?e.set(n.key,{alpha:+!!r,target:1,text:n.text}):(t.target=1,t.text=n.text)}let i=1-.84**(n/16.67),a=1-.88**(n/16.67),o=!1;for(let[t,n]of e){if(r)n.alpha=n.target;else{let e=n.target>n.alpha?i:a;n.alpha+=(n.target-n.alpha)*e}if(n.target===1&&n.alpha>.98&&(n.alpha=1),n.target===0&&n.alpha<.03){e.delete(t);continue}n.alpha!==n.target&&(o=!0)}return o},Et={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%)`},Dt=e=>{let t=e.createElement(`div`);t.setAttribute(`data-slot`,`chart-active-point`),t.style.position=`absolute`,t.style.width=`12px`,t.style.height=`12px`,t.style.left=`-6px`,t.style.top=`-6px`;let n=e.createElement(`div`);n.style.position=`absolute`,n.style.inset=`0`,n.style.backgroundColor=`var(--background-color-card)`;let r=e.createElement(`div`);return r.style.position=`absolute`,r.style.inset=`2px`,t.appendChild(n),t.appendChild(r),t},Ot=(e,t,n)=>{let r=Et[t];e.setAttribute(`data-shape`,t);let[i,a]=e.children;i instanceof HTMLElement&&(i.style.clipPath=r),a instanceof HTMLElement&&(a.style.clipPath=r,a.style.backgroundColor=n)},kt=(e,t)=>e instanceof Date?e.getTime():typeof e==`number`?e:t&&typeof e==`string`?new Date(e).getTime():NaN,At=(e,t)=>({columnCount:e.columnCount,hasData:e.hasData,minValue:new Float64Array(e.columnCount).fill(t),maxValue:new Float64Array(e.columnCount).fill(t),inValue:new Float64Array(e.columnCount).fill(t),outValue:new Float64Array(e.columnCount).fill(t)}),jt=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),Mt=e=>e instanceof Date?Number.isNaN(e.getTime())?`—`:e.toISOString():typeof e==`number`?Number.isFinite(e)?String(e):`—`:typeof e==`string`?jt(e):`—`,Nt=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,Pt=e=>`| ${e.join(` | `)} |`,Ft=({data:e,xKey:t,series:n,zKey:r})=>{let i=[jt(t),...n.map(e=>jt(e.label)),...r==null?[]:[jt(r)]],a=e.map(e=>[Mt(k(e,t)),...n.map(t=>Nt(k(e,t.dataKey))),...r==null?[]:[Nt(k(e,r))]]);return[Pt(i),Pt(i.map(()=>`---`)),...a.map(e=>Pt(e))].join(`
|
|
2
|
-
`)},It=(e,t)=>e==null?`var(${M(t)})`:ie(e)?`var(${M(e)})`:e,Lt={"chart-1":`circle`,"chart-2":`square`,"chart-3":`triangle`,"chart-4":`diamond`,"chart-5":`triangle-down`,"chart-6":`plus`,"chart-7":`cross`,"chart-8":`star`,"chart-other":`circle`},Rt=(e,t)=>e??Lt[t],zt={1:`chart-1`,2:`chart-2`,3:`chart-3`,4:`chart-4`,5:`chart-5`,6:`chart-6`,7:`chart-7`,8:`chart-8`,other:`chart-other`},Bt=e=>{let t=new Set;for(let n of e)n.seriesSlot!=null&&n.seriesSlot!==`other`&&t.add(zt[n.seriesSlot]);let n=new Map,r=new Set(t);for(let t of e){if(t.seriesSlot!=null){n.set(t.dataKey,zt[t.seriesSlot]);continue}let e=N.find(e=>!r.has(e))??`chart-other`;n.set(t.dataKey,e),r.add(e)}return n};var Vt=class{#e=new Set;#t={series:[],hover:null,grid:null,xAxis:null,yAxis:null,referenceLines:[],tooltip:null,orientation:`vertical`};#n=new Map;#r=new Map;#i=0;#a=null;#o=!1;#s=`vertical`;#c=null;#l=null;#u=new Map;#d=new Map;#f=null;#p=null;onSeriesChange=null;onPresentationChange=null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#t;seriesSpecs(){return[...this.#n.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec)}seriesShape(e){return this.#t.series.find(t=>t.dataKey===e)?.shape??Lt[`chart-other`]}registerSeries(e){let t=this.#r.get(e.dataKey)??this.#i++;return this.#r.set(e.dataKey,t),this.#n.set(e.dataKey,{spec:e,sequence:t}),this.#m({seriesChanged:!0}),()=>{this.#n.get(e.dataKey)?.spec===e&&(this.#n.delete(e.dataKey),this.#m({seriesChanged:!0}))}}setDecorative(e){this.#o!==e&&(this.#o=e,this.#m({seriesChanged:!0}))}setOrientation(e){this.#s!==e&&(this.#s=e,this.#m())}registerGrid(e){let t={lines:e};return this.#a=t,this.#m(),()=>{this.#a===t&&(this.#a=null,this.#m())}}registerXAxis(e){return this.#c=e,this.#m(),()=>{this.#c===e&&(this.#c=null,this.#m())}}registerYAxis(e){return this.#l=e,this.#m(),()=>{this.#l===e&&(this.#l=null,this.#m())}}registerReferenceLine(e,t){let n=this.#d.get(e)??this.#i++;return this.#d.set(e,n),this.#u.set(e,{spec:t,sequence:n}),this.#m(),()=>{this.#u.get(e)?.spec===t&&(this.#u.delete(e),this.#m())}}registerTooltip(e){return this.#f=e,this.#m(),()=>{this.#f===e&&(this.#f=null,this.#m())}}publishHover(e){this.#p!==e&&(this.#p=e,this.#t={...this.#t,hover:e},this.#h())}seriesMeta(){let e=this.seriesSpecs(),t=Bt(e);return e.map(e=>{let n=t.get(e.dataKey)??`chart-other`,r=this.#o?ae:It(e.color,n),i=this.#o?ae:e.color??n;return{dataKey:e.dataKey,label:e.label,mark:e.mark,color:r,colorInput:i,shape:Rt(e.shape,n),texture:e.texture}})}#m(e={seriesChanged:!1}){this.#t={series:this.seriesMeta(),hover:this.#p,grid:this.#a,xAxis:this.#c,yAxis:this.#l,referenceLines:[...this.#u.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),tooltip:this.#f,orientation:this.#s},this.#h(),e.seriesChanged?this.onSeriesChange?.():this.onPresentationChange?.()}#h(){for(let e of this.#e)e()}};const Ht=c(null),Z=e=>{let t=l(Ht);return _(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},Ut=e=>g(e.subscribe,e.getSnapshot,e.getSnapshot),Wt=e=>g(e.subscribe,()=>e.getSnapshot().series,()=>e.getSnapshot().series),Gt=e=>g(e.subscribe,()=>e.getSnapshot().orientation,()=>e.getSnapshot().orientation),Kt=(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)))},qt=e=>{let[t,n]=h(e);return Kt(t,e)?t:(n(e),e)},Jt=(e,t)=>{for(let n of e){let e=k(n,t);if(e!=null)return e instanceof Date?`time`:typeof e==`number`?`linear`:`point`}return`point`},Yt=[`auto`,`auto`],Xt=({kind:t,componentName:i,slotName:a,data:o,xKey:s,xScale:c,zKey:l,dimensions:u=3,yDomain:g=Yt,stacked:x=!1,orientation:S=`vertical`,animate:C=!0,pending:w=!1,decorative:T=!1,activeIndex:E,onActiveIndexChange:D,onDatumActivate:O,className:A,children:j,ref:ee,"data-slot":te,"aria-label":ne,"aria-labelledby":re,"aria-hidden":ie,tabIndex:M,...ae})=>{let[N]=h(()=>new Vt),P=m(null),F=m({data:o,xKey:s,zKey:l}),[oe]=h(()=>({kind:t,componentName:i,store:N,engineRef:P,dataRef:F}));f(()=>{F.current={data:o,xKey:s,zKey:l}},[o,s,l]);let se=m(null),ce=e(se,ee),le=m(null),I=m(null),ue=m(null),L=m(null),de=m(null),R=m(null),z=d(),B=t===`bar`?`band`:c??Jt(o,s);_(t!==`scatter`||o.length===0||B!==`point`,`${i}.Root requires numeric or Date x values — the "${s}" values are not numbers or dates, so they have no position on a continuous scatter axis.`);let[fe,pe]=g,V=p(()=>{for(let e of o){let t=k(e,s);if(t instanceof Date&&xe(t))return!0}return!1},[o,s]);return f(()=>{let e=se.current,n=le.current,r=I.current,i=ue.current,a=L.current,o=de.current,s=R.current;if(e==null||n==null||r==null||i==null||a==null||o==null||s==null)return;let c=new Ct({kind:t,store:N,elements:{root:e,plot:n,canvas:r,crosshair:i,band:a,markers:o,tooltip:s}});return P.current=c,()=>{P.current=null,c.destroy()}},[t,N]),f(()=>{P.current?.setOptions({xKey:s,xScale:B,yDomain:[fe,pe],zKey:l??null,dimensions:u,stacked:x,orientation:S,animate:C}),N.setOrientation(S),N.setDecorative(T)},[N,T,s,B,fe,pe,l,u,x,S,C]),f(()=>{P.current?.setRows(o)},[o]),f(()=>{P.current?.setCallbacks(T?{onDatumActivate:null,onActiveIndexChange:null}:{onDatumActivate:O??null,onActiveIndexChange:D??null})}),f(()=>{P.current?.setControlledActiveIndex(T?void 0:E)},[T,E]),f(()=>{P.current?.flushIngest()}),y(`div`,{"data-slot":r(te,a),className:n(`relative flex aspect-video w-full flex-col`,A),"aria-hidden":T?!0:ie,tabIndex:T?void 0:M,inert:T?!0:void 0,ref:ce,...ae,children:b(Ht.Provider,{value:oe,children:[b(`div`,{"data-slot":`${a}-plot`,className:n(`relative min-h-0 w-full flex-1`,w&&`opacity-60 transition-opacity duration-300`),ref:le,children:[y(`canvas`,{"data-slot":`${a}-canvas`,ref:I,"aria-hidden":!0,className:`absolute inset-0 size-full`}),T?null:b(v,{children:[y(`div`,{role:`application`,"aria-label":ne,"aria-labelledby":re,"aria-describedby":z,tabIndex:0,className:n(`focus-visible:ring-focus-accent absolute inset-0 rounded-sm outline-none focus-visible:ring-2`,(t===`line`||t===`area`)&&`cursor-crosshair`,t===`scatter`&&l!=null&&`touch-none cursor-grab active:cursor-grabbing`),onPointerDown:e=>{e.isTrusted&&t===`scatter`&&l!=null&&e.currentTarget.setPointerCapture(e.pointerId),P.current?.handlePointerDown(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerMove:e=>{P.current?.handlePointerMove(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerUp:e=>{P.current?.handlePointerUp(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerLeave:()=>{P.current?.handlePointerLeave()},onPointerCancel:()=>{P.current?.handlePointerLeave()},onBlur:()=>{P.current?.handlePointerLeave()},onKeyDown:e=>{P.current?.handleKeyDown(e.key)&&e.preventDefault()}}),y(`span`,{id:z,className:`sr-only`,children:`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.`})]}),y(`div`,{"data-slot":`${a}-crosshair`,ref:ue,"aria-hidden":!0,className:`bg-neutral-500 pointer-events-none absolute left-0 top-0 w-px opacity-0`}),y(`div`,{"data-slot":`${a}-hover-band`,ref:L,"aria-hidden":!0,className:`bg-neutral-500/10 pointer-events-none absolute left-0 top-0 rounded-sm opacity-0`}),y(`div`,{"data-slot":`${a}-markers`,ref:de,"aria-hidden":!0,className:`pointer-events-none absolute inset-0 opacity-0`}),y(an,{slotName:a,store:N,tooltipRef:R,xHasTimeOfDay:V})]}),j,T?null:b(v,{children:[y(dn,{store:N,xHasTimeOfDay:V}),y(pn,{data:o,label:ne,labelledBy:re,slotName:a,store:N,xHasTimeOfDay:V,xKey:s,zKey:l})]})]})})},Zt=(e,t,n)=>{let r=Z(e);_(r.kind===t,`${e} cannot be composed inside ${r.componentName}.Root — compose ${r.componentName} series parts instead.`);let{dataKey:i,label:a,seriesSlot:o,color:s,curve:c=`linear`,markers:l=!1,connectNulls:u=!1,shape:d,texture:p=`solid`}=n;return f(()=>r.store.registerSeries({dataKey:i,label:a??i,seriesSlot:o,color:s,mark:t,curve:c,markers:l,connectNulls:u,shape:d,texture:p}),[r.store,i,a,o,s,t,c,l,u,d,p]),null},Qt=(e,t)=>{let n=Z(e),{lines:r}=t;return f(()=>n.store.registerGrid(r),[n.store,r]),null},$t=(e,t)=>{let n=Z(e),{tickFormat:r,tickCount:i}=t;return f(()=>n.store.registerXAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},en=(e,t)=>{let n=Z(e),{tickFormat:r,tickCount:i}=t;return f(()=>n.store.registerYAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},tn=(e,t)=>{let n=Z(e),r=d(),{y:i,label:a,color:o}=t;return f(()=>n.store.registerReferenceLine(r,{y:i,label:a,color:o}),[n.store,r,i,a,o]),null},nn=(e,t)=>{let n=Z(e),{labelFormat:r,valueFormat:i,indicator:a=`line`,footer:o,children:s,...c}=t,l=qt(c);return f(()=>n.store.registerTooltip({labelFormat:r,valueFormat:i,indicator:a,footer:o,children:s,divProps:l}),[n.store,r,i,a,o,s,l]),null},rn=(e,t,n)=>e==null?`—`:n==null?H(e):n(e,t),an=({slotName:r,store:i,tooltipRef:a,xHasTimeOfDay:o})=>{let s=Ut(i),c=s.tooltip,l=s.hover,{className:u,ref:d,style:p,...h}=c?.divProps??{},g=m(null),_=e(a,g);f(()=>{if(d==null)return;let e=t(d),n=e(g.current);return()=>{typeof n==`function`?n():e(null)}},[d]);let x=c?.footer;return y(`div`,{"data-slot":`${r}-tooltip`,ref:_,className: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`,u),style:{opacity:0,...p},...h,children:l==null?null:c?.children==null?b(v,{children:[y(`div`,{className:`text-muted font-medium`,children:c?.labelFormat==null?U(l.xValue,{datasetHasTimeOfDay:o}):c.labelFormat(l.xValue)}),y(`div`,{className:`mt-1 grid gap-1`,children:l.points.map(e=>b(`div`,{className:`flex items-center gap-1.5`,children:[c?.indicator===`none`?null:y(`span`,{"aria-hidden":!0,className:`h-2.5 w-0.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),y(`span`,{className:`text-muted`,children:e.label}),y(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:rn(e.value,e.dataKey,c?.valueFormat)})]},e.dataKey))}),l.zValue===void 0?null:b(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[y(`span`,{className:`text-muted`,children:`z`}),y(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:l.zValue==null?`—`:H(l.zValue)})]}),x==null?null:y(`div`,{className:`text-muted mt-1`,children:typeof x==`function`?x(l):x})]}):c.children(l)})},Q=(e,t,n=3)=>`repeating-linear-gradient(${e}, ${t} 0, ${t} 1px, transparent 1px, transparent ${n}px)`,$=`forced-color-adjust-none [print-color-adjust:exact] [-webkit-print-color-adjust:exact]`,on={hatch:({ink:e})=>({backgroundImage:Q(`135deg`,e)}),"hatch-reverse":({ink:e})=>({backgroundImage:Q(`45deg`,e)}),crosshatch:({ink:e})=>({backgroundImage:`${Q(`135deg`,e,4)}, ${Q(`45deg`,e,4)}`}),perpendicular:({ink:e,orientation:t})=>({backgroundImage:Q(t===`horizontal`?`90deg`:`0deg`,e)}),parallel:({ink:e,orientation:t})=>({backgroundImage:Q(t===`horizontal`?`0deg`:`90deg`,e)}),grid:({ink:e})=>({backgroundImage:`${Q(`0deg`,e,4)}, ${Q(`90deg`,e,4)}`}),dots:({ink:e})=>({backgroundImage:`radial-gradient(circle at 1px 1px, ${e} 0.75px, transparent 0.8px)`,backgroundSize:`3px 3px`})},sn=(e,t,n)=>e===`solid`?{}:on[e]({ink:de(t),orientation:n}),cn=({series:e,orientation:t})=>e.mark===`bar`?y(`span`,{"aria-hidden":!0,"data-texture":e.texture,className:n(`size-2 shrink-0 rounded-[2px]`,$),style:{backgroundColor:e.color,...sn(e.texture,e.color,t)}}):e.mark===`line`?b(`span`,{"aria-hidden":!0,className:`relative flex h-2 w-3 shrink-0 items-center justify-center`,children:[y(`span`,{className:n(`absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full`,$),style:{backgroundColor:e.color}}),y(`span`,{"data-shape":e.shape,className:n(`relative size-2`,$),style:{backgroundColor:e.color,clipPath:Et[e.shape]}})]}):y(`span`,{"aria-hidden":!0,"data-shape":e.shape,className:n(`size-2 shrink-0`,$),style:{backgroundColor:e.color,clipPath:Et[e.shape]}}),ln=({partName:e,slotName:t,className:r,children:i,...a})=>{let o=Z(e),s=Wt(o.store),c=Gt(o.store);return s.length<2?null:y(`div`,{"data-slot":`${t}-legend`,className:n(`text-muted flex flex-wrap items-center gap-x-4 gap-y-1 pt-3 text-xs`,r),...a,children:i==null?s.map(e=>b(`div`,{className:`flex items-center gap-1.5`,children:[y(cn,{series:e,orientation:c}),e.label]},e.dataKey)):i(s)})},un=({partName:e,slotName:t,label:n=`Copy data as Markdown`,onCopy:r,onCopyError:c,onClick:l,ref:d,...f})=>{let p=Z(e),g=a(),[_,C]=h(``),w=_!==``,T=m(!1),E=m(void 0);return u(()=>()=>{E.current!=null&&clearTimeout(E.current)},[]),b(v,{children:[y(i,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":`${t}-copy-button`,label:n,icon:y(w?x:S,{}),ref:d,onClick:async e=>{try{if(l?.(e),e.defaultPrevented){E.current!=null&&(clearTimeout(E.current),E.current=void 0),C(``);return}let{data:t,xKey:n,zKey:i}=p.dataRef.current,a=Ft({data:t,xKey:n,zKey:i,series:p.store.getSnapshot().series});await g(a),r?.(a),C(o(`Copied`,T)),E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{C(``)},2e3)}catch(e){c?.(e)}},...f}),y(s,{children:_})]})},dn=({store:e,xHasTimeOfDay:t})=>{let n=Ut(e),[r,i]=h(``),a=n.hover;return u(()=>{if(a==null||!a.viaKeyboard){i(``);return}let e=a.points.map(e=>`${e.label}: ${e.value==null?`no data`:H(e.value)}`).join(`, `),n=a.zValue===void 0?``:`, z: ${a.zValue==null?`no data`:H(a.zValue)}`,r=setTimeout(()=>{i(`${U(a.xValue,{datasetHasTimeOfDay:t})}. ${e}${n}`)},120);return()=>clearTimeout(r)},[a,t]),y(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:r})},fn=(e,t)=>{let[n,r]=h(void 0);return u(()=>{if(t==null){r(void 0);return}let e=t.split(/\s+/).map(e=>document.getElementById(e)?.textContent?.trim()??``).filter(Boolean).join(` `);r(e||void 0)},[t]),e??n},pn=({data:e,label:t,labelledBy:n,slotName:r,store:i,xHasTimeOfDay:a,xKey:o,zKey:s})=>{let c=Wt(i),l=fn(t,n);if(e.length===0||c.length===0)return null;let u=e.slice(0,150);return y(`div`,{className:`sr-only`,"data-slot":`${r}-data-table`,children:b(`table`,{children:[y(`caption`,{children:`${l==null?`Chart data`:`${l} — chart data`}${e.length>150?`. Showing the first 150 of ${e.length} rows.`:`.`}`}),y(`thead`,{children:b(`tr`,{children:[y(`th`,{scope:`col`,children:o}),c.map(e=>y(`th`,{scope:`col`,children:e.label},e.dataKey)),s==null?null:y(`th`,{scope:`col`,children:s})]})}),y(`tbody`,{children:u.map((e,t)=>{let n=k(e,o),r=n instanceof Date&&!Number.isNaN(n.getTime()),i=typeof n==`string`||typeof n==`number`||n instanceof Date?U(n,{datasetHasTimeOfDay:a}):String(n);return b(`tr`,{children:[y(`th`,{scope:`row`,"data-value":typeof n==`number`&&Number.isFinite(n)?n:void 0,children:r?y(`time`,{dateTime:n.toISOString(),children:i}):i}),c.map(t=>{let n=k(e,t.dataKey),r=typeof n==`number`&&Number.isFinite(n);return y(`td`,{"data-value":r?n:void 0,children:r?H(n):`—`},t.dataKey)}),s==null?null:(()=>{let t=k(e,s),n=typeof t==`number`&&Number.isFinite(t);return y(`td`,{"data-value":n?t:void 0,children:n?H(t):`—`})})()]},t)})})]})})};export{tn as a,$t as c,Qt as i,en as l,ln as n,Zt as o,Xt as r,nn as s,un as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./clsx-DUGZgXfJ.js";import{a as r,r as i}from"./field-Bpptk_9t.js";import{useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";const c=e=>e===`indeterminate`,l=({"aria-invalid":l,className:u,checked:d,defaultChecked:f,defaultValue:p=`on`,onClick:m,readOnly:h,ref:g,validation:_,...v})=>{let y=a(null),b=t(y,g),[x]=o(f),S=r(),{ariaInvalid:C,validation:w}=i({"aria-invalid":l,validation:_??S}),T=d??x;e(()=>{y.current&&(y.current.indeterminate=c(T))},[T]);let E=d==null?{defaultChecked:c(x)?void 0:x}:{checked:!c(d)&&d};return s(`input`,{"aria-checked":c(d)?`mixed`:d,"aria-invalid":C,"aria-readonly":h||void 0,"data-slot":`checkbox`,className: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`,u),...E,"data-validation":w||void 0,defaultValue:p,onClick:e=>{if(h){e.preventDefault();return}m?.(e)},readOnly:h,ref:b,type:`checkbox`,...v})};function u({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{u as n,l as t};
|
package/dist/choice-CT_AdesL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./slot-C3gII_9c.js";import{t as i}from"./interactive-target-BXScNeOr.js";import{t as a}from"./field-B1wqeZr4.js";import{t as o}from"./label-BqIp6kFx.js";import{t as s}from"./radio-group-HDVxTNPi.js";import{cloneElement as c,createContext as l,isValidElement as u,useContext as d,useId as f,useMemo as p,useRef as m}from"react";import h from"tiny-invariant";import{jsx as g}from"react/jsx-runtime";const _=l(null);function v(e){let t=d(_);return h(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const y=({"aria-describedby":e,"aria-errormessage":t,"aria-invalid":r,children:i,className:o,disabled:s=!1,id:c,name:l,ref:u,...h})=>{let v=d(a),y=v?.id,b=v?.name,x=v?.[`aria-describedby`],S=v?.[`aria-invalid`],C=v?.[`aria-errormessage`],w=f(),T=f(),E=m(null),D=y??c??w,O=[x??e,T].filter(Boolean).join(` `)||void 0,k=p(()=>({controlId:D,descriptionId:T,disabled:s,labelRef:E,controlProps:{id:D,name:b??l,disabled:s,"aria-describedby":O,"aria-invalid":S??r,"aria-errormessage":C??t}}),[D,T,s,O,b,l,S,r,C,t]);return g(_.Provider,{value:k,children:g(`div`,{ref:u,"data-slot":`choice`,className:n(`flex w-full items-start gap-2`,o),...h,children:i})})},b=({children:e,className:t,ref:r,...i})=>{let{controlProps:a}=v(`Indicator`),o=u(e)?c(e,{...a,disabled:a.disabled||e.props.disabled===!0,name:a.name??e.props.name,"aria-invalid":a[`aria-invalid`]??e.props[`aria-invalid`],"aria-errormessage":a[`aria-errormessage`]??e.props[`aria-errormessage`]}):e;return g(`span`,{ref:r,"data-slot":`choice-indicator`,className:n(`flex h-lh shrink-0 items-center text-sm`,t),...i,children:o})},x=({asChild:e,className:t,ref:i,...a})=>g(e?r:`div`,{ref:i,"data-slot":`choice-content`,className:n(`flex min-w-0 flex-1 flex-col gap-0.5`,t),...a}),S=({className:e,ref:r,...i})=>{let{controlId:a,disabled:s,labelRef:c}=v(`Label`),l=t(c,r);return g(o,{ref:l,"data-slot":`choice-label`,className:n(s&&`opacity-50`,e),...i,htmlFor:a,disabled:s})},C=({asChild:t,className:i,id:a,ref:o,...c})=>{let{disabled:l}=v(`Title`),u=d(s),p=f(),m=a??p;return e(()=>u?.registerLabelId(m),[u,m]),g(t?r:`p`,{ref:o,"data-slot":`choice-title`,className:n(`text-strong text-sm font-medium font-sans`,l&&`opacity-50`,i),...c,id:m})};function w(e){return e.defaultPrevented||i(e.target,e.currentTarget)?!1:e.currentTarget.closest(`label`)==null}const T={Root:y,Indicator:b,Content:x,Label:S,Title:C,Description:({asChild:t,className:i,onClick:a,ref:o,...c})=>{let{descriptionId:l,disabled:u,labelRef:f}=v(`Description`),p=d(s);return e(()=>p?.registerDescriptionId(l),[p,l]),g(t?r:`p`,{ref:o,"data-slot":`choice-description`,className:n(`text-body text-sm leading-4`,!u&&`[[data-slot~=choice-label]~&]:cursor-pointer`,u&&`opacity-50`,i),onClick:e=>{a?.(e),w(e)&&(f.current?.click(),e.preventDefault())},...c,id:l})}};export{T as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as e}from"react";function t(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function n(...e){return n=>{let r=!1,i=e.map(e=>{let i=t(e,n);return typeof i==`function`&&(r=!0),i});if(r)return()=>{for(let n=0;n<i.length;n++){let r=i[n];typeof r==`function`?r():t(e[n],null)}}}}function r(t,r,i){return e(e=>n(t,r,i)(e),[t,r,i])}export{r as n,n as t};
|
package/dist/dialog-CA-1Z0Np.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./button-CaM-ZAH5.js";import{t as n}from"./layer-container-BTcQpd4K.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./primitive-CejGAoGb.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";const m=s,h=e=>d(i,{"data-slot":`dialog-trigger`,...e}),g=r,_=e=>d(u,{"data-slot":`dialog-close`,...e}),v=({className:t,ref:n,...r})=>d(a,{ref:n,"data-slot":`dialog-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-60 backdrop-blur-xs`,t),...r}),y={centered:`inset-4`,"full-page":`inset-4`,"full-bleed":`inset-0`},b={centered:`border-dialog rounded-xl border`,"full-page":`border-dialog h-full max-w-none rounded-xl border`,"full-bleed":`h-full max-w-none`},x={Root:m,Body:({className:t,...n})=>d(`div`,{"data-slot":`dialog-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n}),Close:_,CloseIconButton:({size:e=`md`,type:n=`button`,label:r=`Close Dialog`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>d(u,{asChild:!0,children:d(t,{appearance:i,"data-slot":`dialog-close-icon-button`,icon:d(p,{}),intent:a,label:r,size:e,type:n,...o})}),Content:({appearance:t=`centered`,children:r,className:i,preferredWidth:a,ref:s,...c})=>f(g,{children:[d(v,{}),d(n,{"data-slot":`dialog-positioner`,className:e(`fixed z-60 flex items-center justify-center`,y[t]),children:d(o,{"data-appearance":t,"data-mantle-modal-content":!0,"data-slot":`dialog-content`,className:e(`flex max-h-full w-full flex-1 flex-col`,`outline-hidden focus-within:outline-hidden`,`bg-dialog shadow-lg transition-transform duration-200`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,b[t],t===`centered`&&(a??`max-w-lg`),i),ref:s,...c,children:r})})]}),Description:({className:t,ref:n,...r})=>d(c,{ref:n,"data-slot":`dialog-description`,className:e(`text-muted`,t),...r}),Footer:({className:t,...n})=>d(`div`,{"data-slot":`dialog-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-4`,t),...n}),Header:({className:t,children:n,...r})=>d(`div`,{"data-slot":`dialog-header`,className:e(`border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4`,`has-[.icon-button]:pr-4`,t),...r,children:n}),Overlay:v,Portal:g,Title:({className:t,ref:n,...r})=>d(l,{ref:n,"data-slot":`dialog-title`,className:e(`text-strong truncate text-lg font-medium`,t),...r}),Trigger:h};export{x as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-CGKaq_tV.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{r}from"./layer-container-BTcQpd4K.js";import{n as i}from"./separator-Da8lDnio.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{CheckIcon as s}from"@phosphor-icons/react/Check";import{CaretRightIcon as c}from"@phosphor-icons/react/CaretRight";import*as l from"@radix-ui/react-dropdown-menu";const u=l.Root,d=e=>a(l.Trigger,{"data-slot":`dropdown-menu-trigger`,...e}),f=({className:t,...n})=>a(l.Group,{"data-slot":`dropdown-menu-group`,className:e(`space-y-px`,t),...n}),p=({container:e,...t})=>{let n=r();return a(l.Portal,{container:e??n,...t})},m={Root:u,CheckboxItem:({className:n,children:r,checked:i,...c})=>o(l.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e(`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-9 text-sm font-normal outline-hidden`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),checked:i,...c,children:[a(`span`,{className:`absolute right-2 flex items-center`,children:a(l.ItemIndicator,{children:a(t,{svg:a(s,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]}),Content:({className:t,"data-slot":r,onClick:i,loop:o=!0,width:s,...c})=>a(p,{children:a(l.Content,{"data-slot":n(r,`dropdown-menu-content`),className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl outline-hidden space-y-px font-sans`,`data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,s===`trigger`&&`w-(--radix-dropdown-menu-trigger-width)`,t),loop:o,onClick:e=>{e.stopPropagation(),i?.(e)},...c})}),Group:f,Item:({className:t,inset:n,...r})=>a(l.Item,{"data-slot":`dropdown-menu-item`,className:e(`relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-strong text-sm font-normal outline-hidden transition-colors`,`data-highlighted:bg-active-menu-item`,`focus:bg-accent focus:text-accent-foreground`,`data-disabled:cursor-default data-disabled:opacity-50`,`[&>svg]:size-5 [&_svg]:shrink-0`,n&&`pl-8`,t),...r}),Label:({className:t,inset:n,...r})=>a(l.Label,{"data-slot":`dropdown-menu-label`,className:e(`px-2 py-1.5 text-sm font-medium`,n&&`pl-8`,t),...r}),RadioGroup:({className:t,...n})=>a(l.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,className:e(`space-y-px`,t),...n}),RadioItem:({className:n,children:r,...i})=>o(l.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e(`group/dropdown-menu-radio-item`,`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 px-2 text-sm font-normal outline-none`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item aria-checked:pr-9`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),...i,children:[a(`span`,{className:`absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex`,children:a(l.ItemIndicator,{children:a(t,{svg:a(s,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]}),Separator:({className:t,...n})=>a(i,{"data-slot":`dropdown-menu-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...n}),Shortcut:({className:t,...n})=>a(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e(`ml-auto text-xs tracking-widest opacity-60`,t),...n,translate:`no`}),Sub:l.Sub,SubContent:({className:t,loop:n=!0,...r})=>a(p,{children:a(l.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl space-y-px font-sans`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,t),loop:n,...r})}),SubTrigger:({className:n,inset:r,children:i,...s})=>o(l.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:e(`focus:bg-accent data-state-open:bg-accent relative flex select-none items-center rounded-md py-1.5 pl-2 pr-9 text-sm outline-hidden`,`data-highlighted:bg-active-menu-item data-state-open:bg-active-menu-item`,`[&>svg]:size-5 [&_svg]:shrink-0`,r&&`pl-8`,n),...s,children:[i,a(`span`,{className:`absolute right-2 flex items-center`,children:a(t,{svg:a(c,{weight:`bold`}),className:`size-4`})})]}),Trigger:d};export{m as t};
|
package/dist/icon-CGKaq_tV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-U24NfYv7.js";import{jsx as n}from"react/jsx-runtime";const r=({className:r,style:i,svg:a,ref:o,...s})=>n(t,{ref:o,"data-slot":`icon`,className:e(`size-5`,r),style:i,svg:a,...s});export{r as t};
|
package/dist/icons-B_DDQcVD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./direction-Wa9W2F61.js";import{jsx as t}from"react/jsx-runtime";import{SortAscendingIcon as n}from"@phosphor-icons/react/SortAscending";import{SortDescendingIcon as r}from"@phosphor-icons/react/SortDescending";const i=({mode:i,direction:a,...o})=>{switch(i){case`alphanumeric`:switch(a){case`asc`:return t(n,{...o});case`desc`:return t(r,{...o});default:throw Error(`Invalid alphanumeric sorting direction given: "${a}"`)}case`time`:switch(e(a)){case`oldest-to-newest`:return t(r,{...o});case`newest-to-oldest`:return t(n,{...o});default:throw Error(`Invalid time sorting direction given: "${a}"`)}}};export{i as t};
|
package/dist/icons-CF1lbWtp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";function n(n){return t(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 256 256`,width:`1em`,...n,children:[e(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),e(`path`,{d:`m213.7 82.3-56-56c-1.5-1.5-3.5-2.3-5.7-2.3H56c-8.8 0-16 7.2-16 16v88c0 4.4 3.6 8 8 8s8-3.6 8-8V40h88v48c0 4.4 3.6 8 8 8h48v120h-40c-4.4 0-8 3.6-8 8s3.6 8 8 8h40c8.8 0 16-7.2 16-16V88c0-2.1-.8-4.2-2.3-5.7zm-53.7-31L188.7 80H160V51.3z`}),e(`path`,{d:`M124.6 194.5h-6.8v-27.3h6.8c1.9 0 3.4-1.5 3.4-3.4s-1.5-3.4-3.4-3.4h-6.8v-10.2c0-3.8-3.1-6.8-6.8-6.8H63.3c-3.8 0-6.8 3.1-6.8 6.8v10.2h-6.8c-1.9 0-3.4 1.5-3.4 3.4s1.5 3.4 3.4 3.4h6.8v27.3h-6.8c-1.9 0-3.4 1.5-3.4 3.4s1.5 3.4 3.4 3.4h6.8v23.9c0 3.8 3.1 6.8 6.8 6.8H111c3.8 0 6.8-3.1 6.8-6.8v-23.9h6.8c1.9 0 3.4-1.5 3.4-3.4s-1.5-3.4-3.4-3.4zm-37.5-11.9c-6.6 0-11.9-5.3-11.9-11.9s5.3-11.9 11.9-11.9S99 164.1 99 170.7s-5.3 11.9-11.9 11.9zm0 10.2c6.6 0 11.9 5.3 11.9 11.9s-5.3 11.9-11.9 11.9-11.9-5.3-11.9-11.9 5.3-11.9 11.9-11.9z`})]})}export{n as t};
|
package/dist/icons-Cie4gcrm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./theme-DN-Et3A_.js";import{jsx as t}from"react/jsx-runtime";import{DesktopIcon as n}from"@phosphor-icons/react/Desktop";import{MoonIcon as r}from"@phosphor-icons/react/Moon";import{SunIcon as i}from"@phosphor-icons/react/Sun";function a(n){let r=e();return t(o,{theme:r,...n})}function o({theme:e,...a}){switch(e){case`system`:return t(n,{...a});case`light`:return t(i,{...a});case`dark`:return t(r,{...a});case`light-high-contrast`:return t(i,{...a,weight:`fill`});case`dark-high-contrast`:return t(r,{...a,weight:`fill`})}}export{o as n,a as t};
|
package/dist/input-BhykQSvJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./compose-refs-DdUwopIY.js";import{t}from"./cx-0HCjnNv1.js";import{t as n}from"./icon-CGKaq_tV.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{a,r as o}from"./field-Bpptk_9t.js";import{createContext as s,useContext as c,useMemo as l,useRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{CheckCircleIcon as p}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as m}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as h}from"@phosphor-icons/react/WarningDiamond";const g=({children:e,className:t,ref:n,...r})=>{let i=!!e,a=u(null);return i?d(y,{className:t,forwardedRef:n,innerRef:a,...r,children:e}):d(y,{...r,className:t,forwardedRef:n,innerRef:a,children:d(_,{...r})})},_=({"aria-invalid":n,className:r,ref:i,validation:s,...l})=>{let{"aria-invalid":u,forwardedRef:f,innerRef:p,validation:m,...h}=c(v),g=a(),{ariaInvalid:_,validation:y}=o({"aria-invalid":u??n,validation:m??s??g}),b={...h,...l,type:l.type??h.type??`text`},x=e(i,f,p);return d(`input`,{"aria-invalid":_,"data-slot":`input-capture`,"data-validation":y,className:t(`placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] focus:outline-hidden`,r),ref:x,...b})},v=s({validation:void 0,innerRef:{current:null}}),y=({"aria-invalid":e,"aria-disabled":n,"data-slot":i=`input`,children:s,className:c,disabled:u,forwardedRef:p,innerRef:m,style:h,type:g,validation:_,...y})=>{let x=a(),{validation:S}=o({"aria-invalid":e,validation:_??x}),C=l(()=>({"aria-invalid":e,"aria-disabled":n,disabled:u,type:g,validation:_,...y,forwardedRef:p,innerRef:m}),[e,n,u,g,_,y,p,m]);return d(v.Provider,{value:C,children:f(`div`,{role:`none`,"data-slot":i,"data-disabled":r(u??n)||void 0,"data-validation":S||void 0,className:t(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-hidden focus-within:ring-4`,`data-disabled:opacity-50`,`has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5`,`border-form text-strong focus-within:border-accent-600 focus-within:ring-focus-accent`,`data-validation-success:border-success-600 focus-within:data-validation-success:border-success-600 focus-within:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 focus-within:data-validation-warning:border-warning-600 focus-within:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 focus-within:data-validation-error:border-danger-600 focus-within:data-validation-error:ring-focus-danger`,`autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] has-autofill:bg-blue-50 has-autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,c),onMouseDown:e=>{e.target!==m?.current&&e.preventDefault()},onClick:e=>{let t=m.current;t!=null&&e.detail!==0&&t.focus()},style:h,children:[s,d(b,{name:y.name,validation:S})]})})},b=({name:e,validation:t})=>{switch(t){case`error`:return f(`div`,{className:`text-danger-600 order-last select-none`,children:[d(`span`,{className:`sr-only`,children:i(`The value entered for the`,e,`input has failed validation.`)}),d(n,{svg:d(m,{"aria-hidden":!0,weight:`fill`})})]});case`success`:return d(`div`,{className:`text-success-600 order-last select-none`,children:d(n,{svg:d(p,{weight:`fill`})})});case`warning`:return d(`div`,{className:`text-warning-600 order-last select-none`,children:d(n,{svg:d(h,{weight:`fill`})})});default:return null}};export{_ as n,g as t};
|
package/dist/kbd-4_0Y_8rx.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{jsx as t}from"react/jsx-runtime";function n({children:n,className:r,...i}){return t(`kbd`,{"data-slot":`kbd`,className:e(`[font-kerning:normal] [font-variant-ligatures:common-ligatures_contextual]`,`appearance-none tabular-nums inline-grid place-items-center size-5 bg-neutral-500/15 px-1 rounded text-mono leading-none font-mono`,r),...i,translate:`no`,children:n})}export{n as t};
|
package/dist/label-BqIp6kFx.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./booleanish-BfvnW6vy.js";import{jsx as n}from"react/jsx-runtime";const r=({"aria-disabled":r,children:i,className:a,disabled:o,onMouseDown:s,ref:c,...l})=>n(`label`,{"data-disabled":t(o??r)||void 0,"data-slot":`label`,className:e(`text-strong cursor-pointer text-sm peer-disabled:cursor-default has-disabled:cursor-default data-disabled:cursor-default font-sans`,`[:where(&:not(:has(input,textarea,select,button,[contenteditable])))]:font-medium`,a),onMouseDown:e=>{e.target.closest(`button, input, select, textarea`)||(s?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())},ref:c,...l,children:i});export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./compose-refs-DdUwopIY.js";import{createContext as t,useContext as n,useState as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=t(null);function o(){return n(a)}function s({children:t,ref:n,...o}){let[s,c]=r(null),l=e(n,c);return i(`div`,{ref:l,...o,children:i(a.Provider,{value:s,children:t})})}export{a as n,o as r,s as t};
|
package/dist/list-Bo1mExIg.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./compose-refs-DdUwopIY.js";import{t}from"./cx-0HCjnNv1.js";import{t as n}from"./slot-C3gII_9c.js";import{t as r}from"./interactive-target-BXScNeOr.js";import{Children as i,createContext as a,isValidElement as o,useCallback as s,useContext as c,useEffect as l,useId as u,useMemo as d,useRef as f,useState as p}from"react";import m from"tiny-invariant";import{jsx as h}from"react/jsx-runtime";import{useVirtualizer as g}from"@tanstack/react-virtual";const _=a(null);function v(e){let t=c(_);return m(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const y=a(null),b=a(null);function x(e){return o(e)?e.props.disabled===!0:!1}function S({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const C=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function w(e){let t=e.matches(C)?e:e.querySelector(C);return t instanceof HTMLElement?t:null}function T(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=T(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=S({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=S({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=S({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=S({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D({count:e,enabled:t,isItemDisabled:n,onActivate:i,itemId:a,scrollToIndex:o}){let[s,c]=p(-1),u=f(!1),d=s>=e?e-1:s;if(l(()=>{s>=e&&c(e-1)},[s,e]),!t)return{activeIndex:-1,collectionProps:{}};let m=e=>n?.(e)??!1,h=(t,n)=>S({start:t,step:n,count:e,isItemDisabled:m}),g=e=>{e<0||(c(e),o(e))};return{activeIndex:d,collectionProps:{tabIndex:0,"aria-activedescendant":d>=0?a(d):void 0,onMouseDown:e=>{let t=T(e.target);if(t!=null&&!m(t.index)){c(t.index),u.current=!1;return}u.current=!0},onClick:e=>{if(e.defaultPrevented)return;let t=T(e.target);t==null||m(t.index)||r(e.target,t.item)||(c(t.index),i?.(t.index))},onFocus:t=>{if(t.target!==t.currentTarget){let e=T(t.target);e!=null&&!m(e.index)&&c(e.index),t.target instanceof HTMLElement&&t.target.tabIndex>=0||t.currentTarget.focus({preventScroll:!0}),u.current=!1;return}let n=u.current;u.current=!1,e>0&&!n&&c(e=>e<0?h(0,1):e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(c(-1),u.current=!1)},onKeyDown:t=>{if(t.target===t.currentTarget&&!(t.altKey||t.ctrlKey||t.metaKey))switch(u.current=!1,t.key){case`ArrowDown`:t.preventDefault(),g(h(d<0?0:d+1,1));break;case`ArrowUp`:t.preventDefault(),g(d<0?h(0,1):h(d-1,-1));break;case`Home`:t.preventDefault(),g(h(0,1));break;case`End`:t.preventDefault(),g(h(e-1,-1));break;case` `:case`Enter`:!t.repeat&&d>=0&&!m(d)&&(t.preventDefault(),i?.(d))}}}}}function O({count:e,focusItemAt:t,isItemDisabled:n,onActivate:r,itemId:i,scrollToIndex:a,semantics:o}){let s=u(),c=d(()=>({semantics:o}),[o]),l=d(()=>i??(e=>`${s}-item-${e}`),[i,s]),{activeIndex:f,collectionProps:p}=D({count:e,enabled:o===`grid`,isItemDisabled:n,onActivate:r,itemId:l,scrollToIndex:a}),m=d(()=>({activeIndex:f,stampItemId:i==null?l:null}),[f,l,i]);return{collectionProps:o===`list`?E({count:e,isItemDisabled:n,focusItemAt:t}):p,gridNav:m,listContext:c}}function k({"aria-label":e,"aria-labelledby":n,"aria-multiselectable":r,children:i,className:a,collectionProps:o,gridNav:s,listContext:c,viewportProps:l,ref:u}){return h(_.Provider,{value:c,children:h(b.Provider,{value:s,children:h(`div`,{ref:u,"data-slot":`list`,className:t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,a),...l,children:h(`div`,{"data-slot":`list-collection`,role:c.semantics===`grid`?`grid`:`list`,"aria-label":e,"aria-labelledby":n,"aria-multiselectable":r,className:`relative flex w-full flex-col gap-px outline-hidden`,...o,children:i})})})})}const A=({asChild:r,children:i,className:a,disabled:o=!1,ref:s,selected:l=!1,style:u,...d})=>{let{semantics:f}=v(`Item`),p=c(y),m=c(b),g=f===`grid`,_=r?n:`div`,x=p?.placement??null,S=p?.index,C=g&&m!=null&&S!=null&&m.activeIndex===S,w=x?.measureRef??null,T=e(s,w);return h(_,{ref:T,"data-slot":`list-item`,...d,id:g&&S!=null&&m?.stampItemId!=null?m.stampItemId(S):d.id,"data-index":S,"data-state":l?`selected`:`unselected`,"data-disabled":o||void 0,"data-active":C||void 0,role:g?`row`:`listitem`,"aria-selected":g?l:void 0,"aria-disabled":g&&o?!0:d[`aria-disabled`],"aria-rowindex":g?x?.posInSet:void 0,"aria-posinset":g?void 0:x?.posInSet,"aria-setsize":g?void 0:x?.setSize,className:t(`rounded-md data-[state=selected]:bg-selected-menu-item data-[active]:bg-active-menu-item data-[active]:data-[state=selected]:bg-active-selected-menu-item`,!o&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,!g&&!o&&`has-[:focus-visible]:bg-active-menu-item has-[:focus-visible]:data-[state=selected]:bg-active-selected-menu-item`,a),style:x?{...u,...x.style}:u,children:i})};function j({children:e,index:t}){let n=d(()=>({index:t,placement:null}),[t]);return h(y.Provider,{value:n,children:e})}const M=({"aria-label":t,"aria-labelledby":n,"aria-multiselectable":r,children:a,className:c,isItemDisabled:l,onActivate:u,itemId:p,ref:m,semantics:g=`list`,..._})=>{let v=f(null),y=e(v,m),b=d(()=>i.toArray(a).filter(o),[a]),S=s(e=>{v.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},[]),C=s((e,t)=>{let n=v.current;if(n!=null)for(let r=e;r>=0&&r<b.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=w(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},[b.length]),{collectionProps:T,gridNav:E,listContext:D}=O({count:b.length,focusItemAt:C,isItemDisabled:l??(e=>x(b[e])),onActivate:u,itemId:p,scrollToIndex:S,semantics:g});return h(k,{"aria-label":t,"aria-labelledby":n,"aria-multiselectable":r,className:c,collectionProps:T,gridNav:E,listContext:D,viewportProps:_,ref:y,children:b.map((e,t)=>h(j,{index:t,children:e},e.key??t))})};function N({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function P({children:e,count:t,measureRef:n,virtualItem:r}){let i=d(()=>({index:r.index,placement:N({virtualItem:r,count:t,measureRef:n})}),[r,t,n]);return h(y.Provider,{value:i,children:e})}const F=({"aria-label":t,"aria-labelledby":n,"aria-multiselectable":r,children:a,className:c,estimateItemHeight:u=44,isItemDisabled:p,onActivate:m,overscan:_=8,itemId:v,ref:y,semantics:b=`list`,...S})=>{"use no memo";let C=f(null),T=e(C,y),E=d(()=>i.toArray(a).filter(o),[a]),D=E.length,A=s(e=>E[e]?.key??e,[E]),j=g({count:D,getScrollElement:()=>C.current,estimateSize:()=>u,getItemKey:A,overscan:_,gap:1,initialRect:{width:0,height:u*(_+1)}}),M=s(e=>j.scrollToIndex(e,{align:`auto`}),[j]),N=f(null);l(()=>()=>{N.current!=null&&cancelAnimationFrame(N.current)},[]);let{collectionProps:F,gridNav:I,listContext:L}=O({count:D,focusItemAt:s((e,t)=>{N.current!=null&&(cancelAnimationFrame(N.current),N.current=null);let n=e,r=0,i=()=>{N.current=null;let e=C.current;if(e==null||n<0||n>=D)return;j.scrollToIndex(n,{align:`auto`});let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=w(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(N.current=requestAnimationFrame(i))};i()},[D,j]),isItemDisabled:p??(e=>x(E[e])),onActivate:m,itemId:v,scrollToIndex:M,semantics:b}),R=j.getVirtualItems(),z=R.some(e=>e.index===I.activeIndex);return h(k,{"aria-label":t,"aria-labelledby":n,"aria-multiselectable":r,className:c,collectionProps:{...F,"aria-activedescendant":z?F[`aria-activedescendant`]:void 0,"aria-rowcount":b===`grid`?D:void 0,style:{height:`${j.getTotalSize()}px`}},gridNav:I,listContext:L,viewportProps:S,ref:T,children:R.map(e=>{let t=E[e.index];return t==null?null:h(P,{virtualItem:e,count:D,measureRef:j.measureElement,children:t},e.key)})})};export{A as n,M as r,F as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-C3gII_9c.js";import{jsx as n}from"react/jsx-runtime";const r=({asChild:r,className:i,politeness:a=`polite`,ref:o,...s})=>n(r?t:`span`,{ref:o,"data-slot":`live-region`,role:a===`assertive`?`alert`:`status`,"aria-live":a===`assertive`?void 0:`polite`,"aria-atomic":`true`,className:e(`sr-only`,i),...s});export{r as t};
|
package/dist/popover-Bp-9B3GR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{r as t}from"./layer-container-BTcQpd4K.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import*as i from"@radix-ui/react-popover";const a=i.Root,o=i.Trigger,s={Root:a,Anchor:i.Anchor,Arrow:({className:t,height:a=7,width:o=14,...s})=>n(i.Arrow,{"aria-hidden":`true`,asChild:!0,"data-slot":`popover-arrow`,height:a,width:o,...s,children:r(`svg`,{className:e(`fill-[var(--background-color-popover)]`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`[filter:drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,t),children:[n(`polygon`,{points:`0,0 30,0 15,10`}),n(`polyline`,{className:`stroke-[color:var(--border-color-popover)]`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`})]})}),Close:i.Close,Content:({align:r=`center`,className:a,onClick:o,preferredWidth:s=`max-w-72`,ref:c,sideOffset:l=4,...u})=>{let d=t();return n(i.Portal,{container:d,children:n(i.Content,{align:r,"data-slot":`popover-content`,className:e(`relative`,`text-popover-foreground border-popover bg-popover data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 z-50 rounded-md border p-4 shadow-md outline-hidden`,s,a),onClick:e=>{e.stopPropagation(),o?.(e)},ref:c,sideOffset:l,...u})})},Trigger:o};export{s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./slot-C3gII_9c.js";import{t}from"./booleanish-BfvnW6vy.js";import{n,r}from"./layer-container-BTcQpd4K.js";import{jsx as i}from"react/jsx-runtime";import*as a from"@radix-ui/react-dialog";function o(e){e.target instanceof Element&&e.target.closest(`.overlay-prompt`)&&e.preventDefault()}const s=a.Root,c=a.Trigger,l=({container:e,...t})=>{let o=r(),s=e??o;return i(n.Provider,{value:s,children:i(a.Portal,{container:s,...t})})},u=a.Close,d=e=>i(a.Overlay,{"data-overlay":!0,...e}),f=({onEscapeKeyDown:e,onInteractOutside:t,onPointerDownOutside:n,ref:r,...s})=>i(a.Content,{ref:r,onEscapeKeyDown:t=>{g(t),e?.(t)},onInteractOutside:e=>{o(e),t?.(e)},onPointerDownOutside:e=>{o(e),n?.(e)},...s}),p=a.Title,m=({asChild:t,children:n,ref:r,...o})=>{let s=t?e:`div`;return i(a.Description,{ref:r,asChild:!0,children:i(s,{...o,children:n})})};function h(e){return e instanceof HTMLElement&&e.hasAttribute(`data-overlay`)}function g(e){if(!b(e.currentTarget))return;let n=e.currentTarget,r=n instanceof Document?n.activeElement:n.ownerDocument?.activeElement??null,i=_(e.target)??_(r),a=i?v(i):null;i!=null&&t(i.getAttribute(`aria-expanded`))&&a!=null&&n.contains(i)&&n.contains(a)&&(a.getAttribute(`data-open`)===`true`||a.getAttribute(`data-state`)===`open`)&&e.preventDefault()}function _(e){return y(e)?e.closest(`[aria-expanded='true'][aria-controls]`):null}function v(e){let t=e.getAttribute(`aria-controls`);if(!t)return null;let n=e.ownerDocument.getElementById(t);return n instanceof HTMLElement?n:null}function y(e){return e instanceof HTMLElement}function b(e){return e instanceof Node&&`querySelector`in e}export{l as a,c,d as i,h as l,f as n,s as o,m as r,p as s,u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./slot-C3gII_9c.js";import{jsx as t}from"react/jsx-runtime";const n=({allowClickEventDefault:e=!1,onClick:t}={})=>({role:`presentation`,onClick:n=>{n.stopPropagation(),e||n.preventDefault(),t?.(n)}}),r=({allowClickEventDefault:r=!1,asChild:i=!1,children:a,onClick:o,ref:s,...c})=>{let l=i?e:`div`,{role:u,...d}=n({allowClickEventDefault:r,onClick:o});return t(l,{ref:s,...c,...d,...!i&&{role:u},children:a})};export{n,r as t};
|
package/dist/select-Dov9H2CX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./compose-refs-DdUwopIY.js";import{t}from"./cx-0HCjnNv1.js";import{t as n}from"./icon-CGKaq_tV.js";import{r}from"./layer-container-BTcQpd4K.js";import{a as i,r as a}from"./field-Bpptk_9t.js";import{t as o}from"./field-B1wqeZr4.js";import{n as s}from"./separator-Da8lDnio.js";import{CaretDownIcon as c}from"@phosphor-icons/react/CaretDown";import{createContext as l,useContext as u,useMemo as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CheckIcon as m}from"@phosphor-icons/react/Check";import{CaretUpIcon as h}from"@phosphor-icons/react/CaretUp";import*as g from"@radix-ui/react-select";const _=l({}),v=({"aria-invalid":e,children:t,id:n,validation:r,onBlur:i,onValueChange:a,onChange:o,ref:s,...c})=>{let l=d(()=>({"aria-invalid":e,id:n,validation:r,onBlur:i,ref:s}),[e,n,r,i,s]);return f(g.Root,{...c,onValueChange:e=>{o?.(e),a?.(e)},children:f(_.Provider,{value:l,children:t})})},y=({className:e,ref:n,...r})=>f(g.Group,{ref:n,"data-slot":`select-group`,className:t(`space-y-px`,e),...r}),b=g.Value,x=({"aria-invalid":r,className:s,children:l,id:d,onBlur:m,ref:h,validation:v,...y})=>{let b=u(_),x=u(o),S=e(h,b.ref),C=i(),w=x?x[`aria-invalid`]:b[`aria-invalid`]??r,T=b.validation??v??C,{ariaInvalid:E,validation:D}=a({"aria-invalid":w,validation:T}),O=x?x.id:b.id??d;return p(g.Trigger,{"data-slot":`select-trigger`,className:t(`h-9 text-sm`,`border-form bg-form text-strong font-sans placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-left`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger`,s),"data-validation":D||void 0,id:O,ref:S,...y,onBlur:e=>{m?.(e),b.onBlur?.(e)},...x?{"aria-describedby":x[`aria-describedby`],"aria-errormessage":x[`aria-errormessage`]}:void 0,"aria-invalid":E,children:[l,f(g.Icon,{asChild:!0,children:f(n,{svg:f(c,{weight:`bold`}),className:`size-4`})})]})},S=({className:e,ref:r,...i})=>f(g.ScrollUpButton,{ref:r,className:t(`flex cursor-default items-center justify-center py-1`,e),...i,children:f(n,{svg:f(h,{weight:`bold`}),className:`size-4`})}),C=({className:e,ref:r,...i})=>f(g.ScrollDownButton,{ref:r,className:t(`flex cursor-default items-center justify-center py-1`,e),...i,children:f(n,{svg:f(c,{weight:`bold`}),className:`size-4`})}),w={Root:v,Content:({className:e,children:n,position:i=`popper`,ref:a,width:o=`trigger`,...s})=>{let c=r();return f(g.Portal,{container:c,children:p(g.Content,{ref:a,"data-slot":`select-content`,className:t(`border-popover data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md`,`bg-popover font-sans`,i===`popper`&&`data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-(--radix-select-content-available-height)`,o===`trigger`&&`w-(--radix-select-trigger-width)`,e),position:i,...s,children:[f(S,{}),f(g.Viewport,{className:t(`p-1 space-y-px`,i===`popper`&&`h-(--radix-select-trigger-height) w-full`),children:n}),f(C,{})]})})},Group:y,Item:({className:e,children:r,icon:i,ref:a,...o})=>p(g.Item,{ref:a,"data-slot":`select-item`,className:t(`relative flex gap-2 w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-strong text-sm outline-hidden`,`focus:bg-active-menu-item`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-state-checked:bg-selected-menu-item`,`focus:data-state-checked:bg-active-selected-menu-item`,e),...o,children:[i&&f(n,{svg:i}),f(g.ItemText,{children:r}),f(g.ItemIndicator,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:f(n,{svg:f(m,{weight:`bold`}),className:`size-4 text-accent-600`})})]}),Label:({className:e,ref:n,...r})=>f(g.Label,{ref:n,"data-slot":`select-label`,className:t(`px-2 py-1.5 text-sm font-medium`,e),...r}),Separator:({className:e,ref:n,...r})=>f(s,{ref:n,"data-slot":`select-separator`,className:t(`-mx-1 my-1 h-px w-auto`,e),...r}),Trigger:x,Value:b};export{w as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-C3gII_9c.js";import{createContext as n,useContext as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=[`horizontal`,`vertical`],o=n({}),s={orientation:`horizontal`},c=({className:n,children:r,asChild:a,...c})=>{let l=a?t:`div`;return i(o.Provider,{value:s,children:i(l,{"data-slot":`horizontal-separator-group`,"data-horizontal-separator-group":!0,className:e(`group flex items-center gap-2 [&>*:not([data-separator])]:shrink-0`,n),...c,children:r})})},l=({asChild:n=!1,children:a,className:s,orientation:c,ref:l,semantic:d=!1,...f})=>{let p=n?t:`div`,m=r(o).orientation??(u(c)?c:`horizontal`),h=d?{"aria-orientation":m===`vertical`?m:void 0,role:`separator`}:{role:`none`};return i(p,{"data-slot":`separator`,className:e(`separator`,`bg-separator`,m===`horizontal`?`h-px w-full group-data-horizontal-separator-group:flex-1`:`h-full w-px`,s),"data-orientation":m,"data-separator":!0,...h,ref:l,...n?{children:a}:{},...f})};function u(e){return typeof e==`string`&&a.includes(e)}export{l as n,c as t};
|
package/dist/sheet-C6UGAvRk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./button-CaM-ZAH5.js";import{t as n}from"./layer-container-BTcQpd4K.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./primitive-CejGAoGb.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";import{cva as m}from"class-variance-authority";const h=s,g=i,_=u,v=r,y=({className:t,ref:n,...r})=>d(a,{"data-slot":`sheet-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-60 backdrop-blur-xs`,t),...r,ref:n}),b=m(`bg-dialog border-dialog inset-y-0 h-full w-full fixed flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),x={Root:h,Actions:({children:t,className:n,ref:r,...i})=>d(`div`,{"data-slot":`sheet-actions`,className:e(`flex h-full items-center gap-2`,n),...i,ref:r,children:t}),Body:({className:t,...n})=>d(`div`,{"data-slot":`sheet-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n}),Close:_,CloseIconButton:({size:e=`md`,type:n=`button`,label:r=`Close Sheet`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>d(u,{asChild:!0,children:d(t,{"data-slot":`sheet-close-icon-button`,appearance:i,icon:d(p,{}),intent:a,label:r,size:e,type:n,...o})}),Content:({children:t,className:r,preferredWidth:i=`sm:max-w-[30rem]`,side:a=`right`,ref:s,...c})=>f(v,{children:[d(y,{}),d(n,{"data-slot":`sheet-positioner`,className:`fixed z-60`,children:d(o,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:e(b({side:a}),i,r),ref:s,...c,children:t})})]}),Description:({className:t,ref:n,...r})=>d(c,{"data-slot":`sheet-description`,ref:n,className:e(`text-body text-sm`,t),...r}),Footer:({className:t,...n})=>d(`div`,{"data-slot":`sheet-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,t),...n}),Header:({className:t,...n})=>d(`div`,{"data-slot":`sheet-header`,className:e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,t),...n}),Title:({className:t,ref:n,...r})=>d(l,{"data-slot":`sheet-title`,ref:n,className:e(`text-strong flex-1 truncate text-lg font-medium`,t),...r}),TitleGroup:({children:t,className:n,ref:r,...i})=>d(`div`,{"data-slot":`sheet-title-group`,className:e(`flex items-center justify-between gap-2`,n),...i,ref:r,children:t}),Trigger:g};export{x as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-C3gII_9c.js";import{jsx as n}from"react/jsx-runtime";const r=({asChild:r=!1,className:i,ref:a,...o})=>n(r?t:`div`,{"data-slot":`skeleton`,"aria-hidden":!0,className:e(`dark-high-contrast:bg-black/30 high-contrast:bg-black/30 h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10`,i),ref:a,...o});export{r as t};
|
package/dist/slot-C3gII_9c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./data-slot-EM6s2WEU.js";import{Children as n,createElement as r,isValidElement as i}from"react";import{jsx as a}from"react/jsx-runtime";import{createSlot as o}from"@radix-ui/react-slot";const s=o(`Slot`);function c(t,n){return typeof n==`function`?(...r)=>e(t,n(...r)):e(t,n)}function l(e,t){return typeof t==`function`?(...n)=>({...e,...t(...n)}):e==null?t:t==null?e:{...e,...t}}const u=({children:e,className:o,"data-slot":u,ref:d,style:f,...p})=>{if(!i(e))return n.only(e);let{className:m,style:h,"data-slot":g,..._}=e.props,v=t(u,g);return a(s,{ref:d,...p,className:c(o,m),style:l(f,h),children:r(e.type,{..._,...v!=null&&{"data-slot":v},key:e.key??void 0})})};export{u as t};
|
package/dist/table-EZNW3nFk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./compose-refs-DdUwopIY.js";import{t}from"./cx-0HCjnNv1.js";import{useLayoutEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o}from"react/jsx-runtime";const s={Body:({children:e,className:n,ref:r,...i})=>o(`tbody`,{"data-slot":`table-body`,className:t(`[&>tr+tr>*]:border-t [&>tr+tr>*]:border-card-muted`,`text-body`,`[&>tr]:bg-card [&>tr]:not-only:hover:bg-card-hover [&>tr]:not-only:has-focus-visible:bg-card-hover`,n),ref:r,...i,children:e}),Caption:({children:e,className:n,ref:r,...i})=>o(`caption`,{"data-slot":`table-caption`,ref:r,className:t(`py-4 text-sm text-gray-500`,`border-t border-card-muted`,n),...i,children:e}),Cell:({children:e,className:n,ref:r,...i})=>o(`td`,{"data-slot":`table-cell`,ref:r,className:t(`p-3 align-middle [&:has([role=checkbox])]:pr-0 font-mono text-mono`,n),...i,children:e}),Element:({children:e,className:n,ref:r,...i})=>o(`table`,{"data-slot":`table-element`,ref:r,className:t(`table-auto border-separate border-spacing-0 caption-bottom w-full min-w-full text-left`,n),...i,children:e}),Foot:({children:e,className:n,ref:r,...i})=>o(`tfoot`,{"data-slot":`table-foot`,ref:r,className:t(`font-medium text-body`,`[&>tr:first-child>*]:border-t [&>tr:first-child>*]:border-card-muted`,`[&>tr+tr>*]:border-t [&>tr+tr>*]:border-card-muted`,`[&>tr]:bg-gray-50/50 [&>tr]:hover:bg-card-hover`,n),...i,children:e}),Head:({children:e,className:n,ref:r,...i})=>o(`thead`,{"data-slot":`table-head`,ref:r,className:t(`[&>tr:last-child>*]:border-b [&>tr:last-child>*]:border-card-muted`,`[&>tr+tr>*]:border-t [&>tr+tr>*]:border-card-muted`,`text-muted bg-base`,`[&>tr]:bg-base`,n),...i,children:e}),Header:({children:e,className:n,ref:r,scope:i=`col`,...a})=>o(`th`,{"data-slot":`table-header`,ref:r,scope:i,className:t(`h-11 px-4 text-left align-middle text-sm font-medium [&:has([role=checkbox])]:pr-0`,n),...a,children:e}),Root:({children:n,className:r,ref:i,...a})=>{let s=c(),l=e(s.ref,i);return o(`div`,{"data-slot":`table`,className:t(`group/table relative w-full overflow-hidden rounded-lg border border-card bg-white dark:bg-gray-100`,r),"data-sticky-active":s.state.hasOverflow&&!s.state.scrolledToEnd||void 0,"data-x-overflow":s.state.hasOverflow,"data-x-scroll-end":s.state.hasOverflow&&s.state.scrolledToEnd,...a,children:o(`div`,{className:t(`scrollbar scroll-fade-x overflow-x-auto overflow-y-clip overscroll-x-none`,`has-data-mantle-table-sticky-right:[--_fade-right:black]`),ref:l,children:n})})},Row:({children:e,ref:t,...n})=>o(`tr`,{"data-slot":`table-row`,ref:t,...n,children:e})};function c(){let e=i(null),[t,o]=a({hasOverflow:!1,scrolledToStart:!0,scrolledToEnd:!1});return n(()=>{let t=e.current;if(!t)return;let n=0,r=()=>{let e=t.scrollWidth>t.clientWidth,n=t.scrollLeft<1,r=Math.abs(t.scrollWidth-t.scrollLeft-t.clientWidth)<1;o(t=>t.hasOverflow!==e||t.scrolledToStart!==n||t.scrolledToEnd!==r?{hasOverflow:e,scrolledToStart:n,scrolledToEnd:r}:t)},i=()=>{n===0&&(n=requestAnimationFrame(()=>{n=0,r()}))},a=new ResizeObserver(i);a.observe(t);let s=new MutationObserver(i);return s.observe(t,{childList:!0,subtree:!0}),t.addEventListener(`scroll`,i,{passive:!0}),r(),()=>{cancelAnimationFrame(n),a.disconnect(),s.disconnect(),t.removeEventListener(`scroll`,i)}},[]),r(()=>({ref:e,state:t}),[t])}export{s as t};
|
package/dist/theme-DN-Et3A_.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{n as t}from"./browser-only-CmEEzfU3.js";import{t as n}from"./use-matches-media-query-DCBT6iNA.js";import{n as r,t as i}from"./cookie-ca4g5CKp.js";import{createContext as a,useContext as o,useEffect as s,useMemo as c,useRef as l,useState as u}from"react";import d from"tiny-invariant";import{jsx as f}from"react/jsx-runtime";const p=[`light`,`dark`,`light-high-contrast`,`dark-high-contrast`],m=[`system`,...p],h=e=>e;function g(e){return typeof e==`string`&&m.includes(e)}const _=e=>e;function v(e){return typeof e==`string`&&p.includes(e)}const y=`(prefers-color-scheme: dark)`,b=`(prefers-contrast: more)`,x=`mantle-ui-theme`,S=`system`,C=a(null);function w({children:e,forceTheme:n,ssrCookie:r}){let[i,a]=u(()=>{let e=F({cookie:t()?document.cookie:r});return E(e,{forceTheme:n}),e}),o=l(null);s(()=>{function e(e){let t=e??F({cookie:document.cookie});a(t),E(t,{forceTheme:n})}e();try{`BroadcastChannel`in window&&(o.current=new BroadcastChannel(x),o.current.addEventListener(`message`,t=>{let n=t?.data?.theme;g(n)&&e(n)}))}catch{}function t(t){t.key===`${x}__ping`&&e()}window.addEventListener(`storage`,t);let r=window.matchMedia(y),i=window.matchMedia(b);function s(){e()}function c(){document.visibilityState===`visible`&&e()}return r.addEventListener(`change`,s),i.addEventListener(`change`,s),window.addEventListener(`pageshow`,s),document.addEventListener(`visibilitychange`,c),()=>{window.removeEventListener(`storage`,t),r.removeEventListener(`change`,s),i.removeEventListener(`change`,s),window.removeEventListener(`pageshow`,s),document.removeEventListener(`visibilitychange`,c),B(o.current),o.current=null}},[n]);let d=c(()=>[i,e=>{z(e),a(e),E(e,{forceTheme:n}),L(e,{broadcastChannel:o.current,pingKey:`${x}__ping`})}],[n,i]);return f(C.Provider,{value:d,children:e})}function T(){let e=o(C);return d(e,`useTheme must be used within a ThemeProvider`),e}function E(e,{forceTheme:n}={}){if(!t())return;let r=window.document.documentElement,i=window.matchMedia(y).matches,a=window.matchMedia(b).matches,o=n??O(e,{prefersDarkMode:i,prefersHighContrast:a}),s=r.dataset.theme,c=r.dataset.appliedTheme,l=g(s)?s:void 0,u=v(c)?c:void 0;(l!==e||u!==o)&&(r.classList.remove(...p),r.classList.add(o),r.dataset.theme=e,r.dataset.appliedTheme=o)}function D(){if(!t())return{appliedTheme:void 0,theme:void 0};let e=window.document.documentElement,n=g(e.dataset.theme)?e.dataset.theme:void 0;return{appliedTheme:v(e.dataset.appliedTheme)?e.dataset.appliedTheme:void 0,theme:n}}function O(e,{prefersDarkMode:t,prefersHighContrast:n}){return e===`system`?A({prefersDarkMode:t,prefersHighContrast:n}):e}function k(){let e=o(C);return O(e==null?`system`:e[0],{prefersDarkMode:n(y),prefersHighContrast:n(b)})}function A({prefersDarkMode:e,prefersHighContrast:t}){return t?e?`dark-high-contrast`:`light-high-contrast`:e?`dark`:`light`}function j(e){let{storageKey:t,defaultTheme:n,themes:r,resolvedThemes:i,prefersDarkModeMediaQuery:a,prefersHighContrastMediaQuery:o,forceTheme:s}=e;function c(e){return typeof e==`string`&&r.includes(e)}function l(e){let t=document.cookie;if(!t)return null;try{let n=t.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.trim().slice(e.length+1);return n?decodeURIComponent(n):null}catch{return null}}function u(e,t){let n=new Date;n.setFullYear(n.getFullYear()+1);let r=window.location.hostname,i=window.location.protocol,a=r===`ngrok.com`||r.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,o=i===`https:`?`; Secure`:``;return`${e}=${encodeURIComponent(t)}; expires=${n.toUTCString()}; path=/${a}; SameSite=Lax${o}`}function d(e,t){try{document.cookie=u(e,t)}catch{}}function f(e,t,n){return e===`system`?n?t?`dark-high-contrast`:`light-high-contrast`:t?`dark`:`light`:e}let p=null,m=null,h=null;try{p=l(t)}catch{}if(c(p))h=p;else{try{m=window.localStorage?.getItem(t)??null}catch{}c(m)&&(h=m)}let g=c(h)?h:n,_=matchMedia(a).matches,v=matchMedia(o).matches,y=s??f(g,_,v),b=document.documentElement;if(b.dataset.appliedTheme!==y||b.dataset.theme!==g){for(let e of i)b.classList.remove(e);b.classList.add(y),b.dataset.theme=g,b.dataset.appliedTheme=y}let x=c(p);try{if(c(m)&&!x){d(t,m);try{window.localStorage.removeItem(t)}catch{}}else x||d(t,g)}catch{}}function M(e){let t={storageKey:x,defaultTheme:S,themes:m,resolvedThemes:p,prefersDarkModeMediaQuery:y,prefersHighContrastMediaQuery:b,forceTheme:e};return`(${j.toString()})(${JSON.stringify(t)})`}const N=({forceTheme:e,nonce:t})=>f(`script`,{dangerouslySetInnerHTML:{__html:M(e)},nonce:t,suppressHydrationWarning:!0});function P(n={}){let{className:r=``,forceTheme:i,ssrCookie:a}=n??{};return c(()=>{let n,o;if(!t())n=F({cookie:a}),o=O(n,{prefersDarkMode:!1,prefersHighContrast:!1});else{let e=window.matchMedia(y).matches,t=window.matchMedia(b).matches;n=F({cookie:document.cookie}),o=O(n,{prefersDarkMode:e,prefersHighContrast:t})}let s=i??o;return{className:e(r,s),"data-applied-theme":s,"data-theme":n}},[r,i,a])}function F({cookie:e}){if(!e)return S;let t=r(e,x);return g(t)?t:S}function I(e){return i(e,x)}function L(e,t){let{broadcastChannel:n,pingKey:r}=t;try{if(n){n.postMessage({theme:e,timestamp:Date.now()});return}}catch{}try{localStorage.setItem(r,JSON.stringify({theme:e,timestamp:Date.now()}))}catch{}}function R(e){let t=new Date;t.setFullYear(t.getFullYear()+1);let{hostname:n,protocol:r}=window.location,i=n===`ngrok.com`||n.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,a=r===`https:`?`; Secure`:``;return`${x}=${encodeURIComponent(e)}; expires=${t.toUTCString()}; path=/${i}; SameSite=Lax${a}`}function z(e){if(t())try{document.cookie=R(e)}catch{}}function B(e){if(e!=null)try{e.close()}catch{}}export{M as a,P as c,h as d,v as f,m as h,F as i,T as l,p as m,w as n,D as o,g as p,I as r,k as s,N as t,_ as u};
|
package/dist/tooltip-CkAibjBb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{r as t}from"./layer-container-BTcQpd4K.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import*as i from"@radix-ui/react-tooltip";const a=({delayDuration:e=0,...t})=>n(i.Provider,{"data-slot":`tooltip-provider`,delayDuration:e??0,...t});function o(e){return n(i.Root,{...e})}function s(e){return n(i.Trigger,{"data-slot":`tooltip-trigger`,...e})}const c={Root:o,Content:({children:a,className:o,ref:s,sideOffset:c=4,...l})=>{let u=t();return n(i.Portal,{container:u,children:r(i.Content,{className:e(`bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow`,o),"data-slot":`tooltip-content`,ref:s,sideOffset:c,...l,children:[a,n(i.Arrow,{asChild:!0,children:n(`div`,{className:`bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs`})})]})})},Trigger:s};export{a as n,c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSyncExternalStore as e}from"react";const t=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],n=[`default`,...t];function r(){return e(_,v,()=>`default`)}function i(t){return e(b(t),S(t),()=>!1)}const a={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},o={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let s=null,c=null;function l(){return s||={"2xl":window.matchMedia(a[`2xl`]),xl:window.matchMedia(a.xl),lg:window.matchMedia(a.lg),md:window.matchMedia(a.md),sm:window.matchMedia(a.sm),xs:window.matchMedia(a.xs),"2xs":window.matchMedia(a[`2xs`])},s}function u(e){return c||={"2xl":window.matchMedia(o[`2xl`]),xl:window.matchMedia(o.xl),lg:window.matchMedia(o.lg),md:window.matchMedia(o.md),sm:window.matchMedia(o.sm),xs:window.matchMedia(o.xs),"2xs":window.matchMedia(o[`2xs`])},c[e]}let d=`default`;const f=new Set;let p=!1;function m(){let e=l();for(let n of t)if(e[n].matches)return n;return`default`}let h=!1;function g(){h||(h=!0,requestAnimationFrame(()=>{h=!1;let e=m();if(e!==d){d=e;for(let e of f)e()}}))}function _(e){if(f.add(e),!p){p=!0;let e=l();d=m();for(let t of Object.values(e))t.addEventListener(`change`,g)}return e(),()=>{if(f.delete(e),f.size===0&&p){p=!1;let e=l();for(let t of Object.values(e))t.removeEventListener(`change`,g)}}}function v(){return p||(d=m()),d}const y=new Map;function b(e){let t=y.get(e);return t||(t=t=>{let n=u(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},y.set(e,t),t)}const x=new Map;function S(e){let t=x.get(e);return t||(t=()=>u(e).matches,x.set(e,t),t)}export{r as n,i as r,n as t};
|