vxui-react 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -1
- package/README.md +3 -1
- package/dist/index.cjs +11 -11
- package/dist/index.js +249 -243
- package/dist/src/components/Toast.d.ts +7 -2
- package/dist/vxui-react.css +1 -1
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),x=require("react"),ce=require("react-dom");function an(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=an(x),on=an(ce),Wr=767,Gr=1023;function Rt(){if(typeof window>"u")return"desktop";const e=window.innerWidth;return e<=Wr?"phone":e<=Gr?"tablet":"desktop"}const ln=x.createContext({viewport:"desktop",isPhone:!1,isTablet:!1,isTabletPortrait:!1,isDesktop:!0});function Pt(){return typeof window>"u"?!1:window.innerHeight>window.innerWidth}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),x=require("react"),ce=require("react-dom");function an(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=an(x),on=an(ce),Wr=767,Gr=1023;function Rt(){if(typeof window>"u")return"desktop";const e=window.innerWidth;return e<=Wr?"phone":e<=Gr?"tablet":"desktop"}const ln=x.createContext({viewport:"desktop",isPhone:!1,isTablet:!1,isTabletPortrait:!1,isDesktop:!0});function Pt(){return typeof window>"u"?!1:window.innerHeight>window.innerWidth}function Vr({children:e}){const[t,r]=x.useState(Rt),[s,a]=x.useState(Pt);x.useEffect(()=>{const i=()=>{const u=Rt();r(d=>d===u?d:u);const c=Pt();a(d=>d===c?d:c)};return window.addEventListener("resize",i,{passive:!0}),()=>window.removeEventListener("resize",i)},[]);const o=t==="tablet",l={viewport:t,isPhone:t==="phone",isTablet:o,isTabletPortrait:o&&s,isDesktop:t==="desktop"};return n.jsx(ln.Provider,{value:l,children:e})}function dt(){return x.useContext(ln)}function Kr({desktop:e,mobile:t,tablet:r}){const{viewport:s}=dt();return s==="phone"?n.jsx(n.Fragment,{children:t}):s==="tablet"?n.jsx(n.Fragment,{children:r??e}):n.jsx(n.Fragment,{children:e})}/**
|
|
2
2
|
* @license lucide-react v0.511.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const qr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase()),
|
|
6
|
+
*/const qr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase()),Dt=e=>{const t=Yr(e);return t.charAt(0).toUpperCase()+t.slice(1)},cn=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim(),Xr=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
7
7
|
* @license lucide-react v0.511.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const q=(e,t)=>{const r=x.forwardRef(({className:s,...a},o)=>x.createElement(Qr,{ref:o,iconNode:t,className:cn(`lucide-${qr(
|
|
21
|
+
*/const q=(e,t)=>{const r=x.forwardRef(({className:s,...a},o)=>x.createElement(Qr,{ref:o,iconNode:t,className:cn(`lucide-${qr(Dt(e))}`,`lucide-${e}`,s),...a}));return r.displayName=Dt(e),r};/**
|
|
22
22
|
* @license lucide-react v0.511.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const _s=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],re=q("x",_s);function pt(e,t,r=!0){x.useEffect(()=>{const s=e.current,a=t.current;if(!s)return;if(!r||!a){s.dataset.scrollable="false",s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}let o;const l=()=>{const d=a.scrollHeight>a.clientHeight+1;if(s.dataset.scrollable=d?"true":"false",!d){s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}const f=Math.max(s.clientHeight-16,0),y=Math.max(a.clientHeight/a.scrollHeight*f,36),S=a.scrollHeight-a.clientHeight,N=Math.max(f-y,0),g=S>0?a.scrollTop/S*N:0;s.style.setProperty("--vx-scrollbar-thumb-height",`${y}px`),s.style.setProperty("--vx-scrollbar-thumb-offset",`${g}px`),s.dataset.scrollbarState!=="active"&&(s.dataset.scrollbarState="hidden")},i=()=>{s.dataset.scrollable==="true"&&(s.dataset.scrollbarState="active",o!==void 0&&window.clearTimeout(o),o=window.setTimeout(()=>{s.dataset.scrollbarState="hidden"},640))},u=()=>{l(),i()};l(),a.addEventListener("scroll",u,{passive:!0});const c=new ResizeObserver(()=>l());return c.observe(s),c.observe(a),()=>{a.removeEventListener("scroll",u),c.disconnect(),o!==void 0&&window.clearTimeout(o)}},[r,e,t])}function C(...e){return e.filter(Boolean).join(" ")}const oe=x.forwardRef(function({className:t,variant:r="solid",size:s="md",shape:a="rect",fullWidth:o=!1,loading:l=!1,startIcon:i,endIcon:u,disabled:c,type:d="button",children:f,...y},S){return n.jsxs("button",{ref:S,type:d,disabled:c||l,"aria-busy":l||void 0,className:C("vx-button",`vx-button--${r}`,`vx-button--${s}`,a==="square"&&"vx-button--square",a==="pill"&&"vx-button--pill",a==="circle"&&"vx-button--circle",o&&"vx-button--full-width",l&&"vx-button--loading",t),...y,children:[l?n.jsx("span",{className:"vx-button__spinner","aria-hidden":"true"}):i??null,f,!l&&u?u:null]})}),st=x.createContext(!1);function fn({collapsed:e=!1,mobileNavOpen:t=!1,density:r,sidebarWidth:s,className:a,children:o}){const{isTablet:l,isTabletPortrait:i}=dt(),u=s?{"--vx-sidebar-width":typeof s=="number"?`${s}px`:s}:void 0;return n.jsx(st.Provider,{value:e,children:n.jsx("div",{className:C("vx-shell",a),"data-collapsed":e,"data-nav-open":t,"data-tablet":l,"data-tablet-portrait":i,"data-density":r,style:u,children:o})})}function vn({brand:e="VXUI",brandCaption:t,brandIcon:r,collapsed:s=!1,footer:a,onToggle:o,collapseLabel:l="Collapse",expandLabel:i="Expand",onSidebarClick:u,children:c}){const d=x.useRef(null),f=x.useRef(null);return pt(d,f),n.jsxs("aside",{ref:d,className:"vx-sidebar vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",onClickCapture:u,children:[n.jsxs("div",{ref:y=>{f.current=y},className:"vx-sidebar__scroll vx-scroll-hide-native",children:[n.jsx("div",{className:"vx-sidebar__header",children:n.jsxs("div",{className:"vx-sidebar__brand",children:[r?n.jsx("span",{className:"vx-sidebar__brand-icon",children:r}):null,n.jsxs("div",{className:"vx-sidebar__brand-copy",children:[n.jsx("span",{className:"vx-sidebar__brand-text",children:e}),t?n.jsx("span",{className:"vx-sidebar__brand-caption",children:t}):null]})]})}),c,n.jsxs("div",{className:"vx-sidebar__footer",children:[a?n.jsx("div",{className:"vx-sidebar__footer-content",children:a}):null,o?n.jsxs(oe,{variant:"ghost",size:"sm",className:"vx-sidebar__toggle",onClick:o,"aria-label":s?i:l,children:[s?n.jsx(pn,{size:16}):n.jsx(dn,{size:16}),n.jsx("span",{className:"vx-sidebar__toggle-label",children:s?i:l})]}):null]})]}),n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function mn({label:e="Primary navigation",children:t}){return n.jsx("nav",{className:"vx-sidebar__nav","aria-label":e,children:t})}function hn({title:e,children:t}){return n.jsxs("div",{className:"vx-nav-section-block",children:[e?n.jsx("div",{className:"vx-nav-section-block__title",children:e}):null,n.jsx("div",{className:"vx-nav-section-block__items",children:t})]})}function xn({label:e,icon:t,badge:r,trailing:s,active:a,onSelect:o,children:l,defaultOpen:i=!1}){const[u,c]=x.useState(i),[d,f]=x.useState(!1),[y,S]=x.useState({top:0,left:0}),N=x.useRef(null),g=x.useRef(void 0),h=x.useContext(st),w=!!l;x.useEffect(()=>()=>{g.current!==void 0&&clearTimeout(g.current)},[]);const p=()=>{w&&!h&&c(j=>!j),(!w||h)&&(o==null||o())},m=()=>{if(!h||!w||!N.current)return;g.current!==void 0&&clearTimeout(g.current);const j=N.current.getBoundingClientRect(),T=N.current.closest(".vx-sidebar"),E=T?T.getBoundingClientRect().right:j.right;S({top:j.top-6,left:E+4}),f(!0)},v=()=>{g.current=setTimeout(()=>f(!1),100)},b=()=>{g.current!==void 0&&clearTimeout(g.current)},k=n.jsxs("button",{type:"button",className:C("vx-nav-item",a&&"vx-nav-item--active",w&&"vx-nav-item--parent"),onClick:p,"aria-expanded":w&&!h?u:void 0,title:h?e:void 0,children:[t?n.jsx("span",{className:"vx-nav-item__icon",children:t}):null,n.jsx("span",{className:"vx-nav-item__label",children:e}),r?n.jsx("span",{className:"vx-nav-item__badge",children:r}):null,w?n.jsx(be,{size:14,className:C("vx-nav-item__chevron",u&&"vx-nav-item__chevron--open")}):s?n.jsx("span",{className:"vx-nav-item__trailing",children:s}):null]});return w?n.jsxs("div",{ref:N,className:"vx-nav-item-wrap",onMouseEnter:m,onMouseLeave:h?v:void 0,children:[k,!h&&u&&n.jsx("div",{className:"vx-nav-sublist",role:"group",children:l}),h&&d&&ce.createPortal(n.jsx(st.Provider,{value:!1,children:n.jsxs("div",{className:"vx-nav-sublist-flyout",style:{top:y.top,left:y.left},role:"group",onMouseEnter:b,onMouseLeave:v,children:[n.jsx("div",{className:"vx-nav-sublist-flyout__label",children:e}),l]})}),document.body)]}):k}function gn({onClose:e,closeLabel:t="Close sidebar"}){return n.jsx("button",{type:"button",className:"vx-shell__overlay","aria-label":t,onClick:e})}function bn({children:e}){return n.jsx("div",{className:"vx-shell__main",children:e})}const yn=x.forwardRef(function({title:t,description:r,breadcrumb:s,actions:a,onMenuToggle:o,mobileNavOpen:l=!1,menuButtonLabel:i="Open navigation"},u){return n.jsxs("header",{ref:u,className:"vx-topbar",children:[o?n.jsx(oe,{variant:"ghost",size:"sm",className:"vx-topbar__menu","aria-label":i,onClick:o,children:l?n.jsx(dn,{size:16}):n.jsx(pn,{size:16})}):null,n.jsx("div",{className:"vx-topbar__title-group",children:s||n.jsxs("div",{children:[t?n.jsx("h1",{className:"vx-topbar__title",children:t}):null,r?n.jsx("p",{className:"vx-topbar__description",children:r}):null]})}),a?n.jsx("div",{className:"vx-topbar__actions",children:a}):null]})});function _n({children:e}){const t=x.useRef(null),r=x.useRef(null);return pt(t,r),n.jsxs("div",{ref:s=>{t.current=s},className:"vx-shell__content-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[n.jsx("main",{ref:s=>{r.current=s},className:"vx-shell__content vx-scroll-hide-native",children:e}),n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function ws({brand:e="VXUI",brandCaption:t,brandIcon:r,topbarRef:s,breadcrumb:a,title:o,description:l,navItems:i,navSections:u,sidebarCollapsed:c=!1,sidebarWidth:d,mobileNavOpen:f=!1,onSidebarToggle:y,onMobileNavToggle:S,onSidebarClick:N,menuButtonLabel:g="Open navigation",sidebarCollapseLabel:h="Collapse",sidebarExpandLabel:w="Expand",sidebarCloseLabel:p="Close sidebar",density:m,headerActions:v,sidebarFooter:b,children:k}){const j=u??(i?[{items:i}]:[]);function T(E){const{key:R,onSelect:A,children:F,defaultOpen:O,...D}=E,H=(F==null?void 0:F.some(U=>U.active))??!1;return n.jsx(xn,{onSelect:A,defaultOpen:O??(F?H:void 0),...D,children:F==null?void 0:F.map(T)},R)}return n.jsxs(fn,{collapsed:c,mobileNavOpen:f,density:m,sidebarWidth:d,children:[n.jsx(vn,{brand:e,brandCaption:t,brandIcon:r,collapsed:c,footer:b,onToggle:y,onSidebarClick:N,collapseLabel:h,expandLabel:w,children:n.jsx(mn,{children:j.map((E,R)=>n.jsx(hn,{title:E.title,children:E.items.map(T)},E.key??E.title??R))})}),S?n.jsx(gn,{onClose:S,closeLabel:p}):null,n.jsxs(bn,{children:[n.jsx(yn,{ref:s,breadcrumb:a,title:o,description:l,actions:v,onMenuToggle:S,mobileNavOpen:f,menuButtonLabel:g}),n.jsx(_n,{children:k})]})]})}function ks({className:e,variant:t="neutral",...r}){return n.jsx("span",{className:C("vx-badge",`vx-badge--${t}`,e),...r})}function Ss({className:e,variant:t="default",padding:r,hoverable:s=!1,...a}){return n.jsx("section",{className:C("vx-card",t!=="default"&&`vx-card--${t}`,r&&`vx-card--pad-${r}`,s&&"vx-card--hoverable",e),...a})}function Ns({className:e,...t}){return n.jsx("header",{className:C("vx-card__header",e),...t})}function js({className:e,...t}){return n.jsx("h2",{className:C("vx-card__title",e),...t})}function Es({className:e,...t}){return n.jsx("p",{className:C("vx-card__description",e),...t})}function Cs({className:e,...t}){return n.jsx("div",{className:C("vx-card__content",e),...t})}function W(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Dt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wn(...e){return t=>{let r=!1;const s=e.map(a=>{const o=Dt(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():Dt(e[a],null)}}}}function Y(...e){return _.useCallback(wn(...e),e)}function Ts(e,t){const r=_.createContext(t),s=o=>{const{children:l,...i}=o,u=_.useMemo(()=>i,Object.values(i));return n.jsx(r.Provider,{value:u,children:l})};s.displayName=e+"Provider";function a(o){const l=_.useContext(r);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[s,a]}function ve(e,t=[]){let r=[];function s(o,l){const i=_.createContext(l),u=r.length;r=[...r,l];const c=f=>{var w;const{scope:y,children:S,...N}=f,g=((w=y==null?void 0:y[e])==null?void 0:w[u])||i,h=_.useMemo(()=>N,Object.values(N));return n.jsx(g.Provider,{value:h,children:S})};c.displayName=o+"Provider";function d(f,y){var g;const S=((g=y==null?void 0:y[e])==null?void 0:g[u])||i,N=_.useContext(S);if(N)return N;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const a=()=>{const o=r.map(l=>_.createContext(l));return function(i){const u=(i==null?void 0:i[e])||o;return _.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return a.scopeName=e,[s,As(a,...t)]}function As(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=s.reduce((i,{useScope:u,scopeName:c})=>{const f=u(o)[`__scope${c}`];return{...i,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var ie=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},Rs=_[" useId ".trim().toString()]||(()=>{}),Ps=0;function he(e){const[t,r]=_.useState(Rs());return ie(()=>{r(s=>s??String(Ps++))},[e]),e||(t?`radix-${t}`:"")}var Fs=_[" useInsertionEffect ".trim().toString()]||ie;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:s}){const[a,o,l]=Ds({defaultProp:t,onChange:r}),i=e!==void 0,u=i?e:a;{const d=_.useRef(e!==void 0);_.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,s])}const c=_.useCallback(d=>{var f;if(i){const y=Ls(d)?d(e):d;y!==e&&((f=l.current)==null||f.call(l,y))}else o(d)},[i,e,o,l]);return[u,c]}function Ds({defaultProp:e,onChange:t}){const[r,s]=_.useState(e),a=_.useRef(r),o=_.useRef(t);return Fs(()=>{o.current=t},[t]),_.useEffect(()=>{var l;a.current!==r&&((l=o.current)==null||l.call(o,r),a.current=r)},[r,a]),[r,s,o]}function Ls(e){return typeof e=="function"}function De(e){const t=Is(e),r=_.forwardRef((s,a)=>{const{children:o,...l}=s,i=_.Children.toArray(o),u=i.find(Os);if(u){const c=u.props.children,d=i.map(f=>f===u?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:f);return n.jsx(t,{...l,ref:a,children:_.isValidElement(c)?_.cloneElement(c,void 0,d):null})}return n.jsx(t,{...l,ref:a,children:o})});return r.displayName=`${e}.Slot`,r}function Is(e){const t=_.forwardRef((r,s)=>{const{children:a,...o}=r;if(_.isValidElement(a)){const l=Bs(a),i=$s(o,a.props);return a.type!==_.Fragment&&(i.ref=s?wn(s,l):l),_.cloneElement(a,i)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ms=Symbol("radix.slottable");function Os(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ms}function $s(e,t){const r={...t};for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?r[s]=(...i)=>{const u=o(...i);return a(...i),u}:a&&(r[s]=a):s==="style"?r[s]={...a,...o}:s==="className"&&(r[s]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function Bs(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],G=zs.reduce((e,t)=>{const r=De(`Primitive.${t}`),s=_.forwardRef((a,o)=>{const{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(u,{...i,ref:o})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function kn(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}function ee(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var s;return(s=t.current)==null?void 0:s.call(t,...r)},[])}function Hs(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e);_.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[r,t])}var Us="DismissableLayer",at="dismissableLayer.update",Ws="dismissableLayer.pointerDownOutside",Gs="dismissableLayer.focusOutside",Lt,Sn=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ft=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:i,...u}=e,c=_.useContext(Sn),[d,f]=_.useState(null),y=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=_.useState({}),N=Y(t,j=>f(j)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(h),p=d?g.indexOf(d):-1,m=c.layersWithOutsidePointerEventsDisabled.size>0,v=p>=w,b=Vs(j=>{const T=j.target,E=[...c.branches].some(R=>R.contains(T));!v||E||(a==null||a(j),l==null||l(j),j.defaultPrevented||i==null||i())},y),k=qs(j=>{const T=j.target;[...c.branches].some(R=>R.contains(T))||(o==null||o(j),l==null||l(j),j.defaultPrevented||i==null||i())},y);return Hs(j=>{p===c.layers.size-1&&(s==null||s(j),!j.defaultPrevented&&i&&(j.preventDefault(),i()))},y),_.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lt=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),It(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Lt)}},[d,y,r,c]),_.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),It())},[d,c]),_.useEffect(()=>{const j=()=>S({});return document.addEventListener(at,j),()=>document.removeEventListener(at,j)},[]),n.jsx(G.div,{...u,ref:N,style:{pointerEvents:m?v?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,k.onFocusCapture),onBlurCapture:W(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,b.onPointerDownCapture)})});ft.displayName=Us;var Ks="DismissableLayerBranch",Nn=_.forwardRef((e,t)=>{const r=_.useContext(Sn),s=_.useRef(null),a=Y(t,s);return _.useEffect(()=>{const o=s.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),n.jsx(G.div,{...e,ref:a})});Nn.displayName=Ks;function Vs(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e),s=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const o=i=>{if(i.target&&!s.current){let u=function(){jn(Ws,r,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);s.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>s.current=!0}}function qs(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e),s=_.useRef(!1);return _.useEffect(()=>{const a=o=>{o.target&&!s.current&&jn(Gs,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function It(){const e=new CustomEvent(at);document.dispatchEvent(e)}function jn(e,t,r,{discrete:s}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?kn(a,o):a.dispatchEvent(o)}var Ys=ft,Xs=Nn,Ke="focusScope.autoFocusOnMount",Ve="focusScope.autoFocusOnUnmount",Mt={bubbles:!1,cancelable:!0},Zs="FocusScope",En=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[i,u]=_.useState(null),c=ee(a),d=ee(o),f=_.useRef(null),y=Y(t,g=>u(g)),S=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(s){let g=function(m){if(S.paused||!i)return;const v=m.target;i.contains(v)?f.current=v:ne(f.current,{select:!0})},h=function(m){if(S.paused||!i)return;const v=m.relatedTarget;v!==null&&(i.contains(v)||ne(f.current,{select:!0}))},w=function(m){if(document.activeElement===document.body)for(const b of m)b.removedNodes.length>0&&ne(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const p=new MutationObserver(w);return i&&p.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),p.disconnect()}}},[s,i,S.paused]),_.useEffect(()=>{if(i){$t.add(S);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(Ke,Mt);i.addEventListener(Ke,c),i.dispatchEvent(w),w.defaultPrevented||(Qs(ra(Cn(i)),{select:!0}),document.activeElement===g&&ne(i))}return()=>{i.removeEventListener(Ke,c),setTimeout(()=>{const w=new CustomEvent(Ve,Mt);i.addEventListener(Ve,d),i.dispatchEvent(w),w.defaultPrevented||ne(g??document.body,{select:!0}),i.removeEventListener(Ve,d),$t.remove(S)},0)}}},[i,c,d,S]);const N=_.useCallback(g=>{if(!r&&!s||S.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(h&&w){const p=g.currentTarget,[m,v]=Js(p);m&&v?!g.shiftKey&&w===v?(g.preventDefault(),r&&ne(m,{select:!0})):g.shiftKey&&w===m&&(g.preventDefault(),r&&ne(v,{select:!0})):w===p&&g.preventDefault()}},[r,s,S.paused]);return n.jsx(G.div,{tabIndex:-1,...l,ref:y,onKeyDown:N})});En.displayName=Zs;function Qs(e,{select:t=!1}={}){const r=document.activeElement;for(const s of e)if(ne(s,{select:t}),document.activeElement!==r)return}function Js(e){const t=Cn(e),r=Ot(t,e),s=Ot(t.reverse(),e);return[r,s]}function Cn(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ot(e,t){for(const r of e)if(!ea(r,{upTo:t}))return r}function ea(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ta(e){return e instanceof HTMLInputElement&&"select"in e}function ne(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ta(e)&&t&&e.select()}}var $t=na();function na(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Bt(e,t),e.unshift(t)},remove(t){var r;e=Bt(e,t),(r=e[0])==null||r.resume()}}}function Bt(e,t){const r=[...e],s=r.indexOf(t);return s!==-1&&r.splice(s,1),r}function ra(e){return e.filter(t=>t.tagName!=="A")}var sa="Portal",vt=_.forwardRef((e,t)=>{var i;const{container:r,...s}=e,[a,o]=_.useState(!1);ie(()=>o(!0),[]);const l=r||a&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?ce.createPortal(n.jsx(G.div,{...s,ref:t}),l):null});vt.displayName=sa;function aa(e,t){return _.useReducer((r,s)=>t[r][s]??r,e)}var me=e=>{const{present:t,children:r}=e,s=oa(t),a=typeof r=="function"?r({present:s.isPresent}):_.Children.only(r),o=Y(s.ref,ia(a));return typeof r=="function"||s.isPresent?_.cloneElement(a,{ref:o}):null};me.displayName="Presence";function oa(e){const[t,r]=_.useState(),s=_.useRef(null),a=_.useRef(e),o=_.useRef("none"),l=e?"mounted":"unmounted",[i,u]=aa(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=Se(s.current);o.current=i==="mounted"?c:"none"},[i]),ie(()=>{const c=s.current,d=a.current;if(d!==e){const y=o.current,S=Se(c);e?u("MOUNT"):S==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&y!==S?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),ie(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=S=>{const g=Se(s.current).includes(CSS.escape(S.animationName));if(S.target===t&&g&&(u("ANIMATION_END"),!a.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},y=S=>{S.target===t&&(o.current=Se(s.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:_.useCallback(c=>{s.current=c?getComputedStyle(c):null,r(c)},[])}}function Se(e){return(e==null?void 0:e.animationName)||"none"}function ia(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qe=0;function la(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zt()),document.body.insertAdjacentElement("beforeend",e[1]??zt()),qe++,()=>{qe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qe--}},[])}function zt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var J=function(){return J=Object.assign||function(t){for(var r,s=1,a=arguments.length;s<a;s++){r=arguments[s];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},J.apply(this,arguments)};function Tn(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r}function ca(e,t,r){if(r||arguments.length===2)for(var s=0,a=t.length,o;s<a;s++)(o||!(s in t))&&(o||(o=Array.prototype.slice.call(t,0,s)),o[s]=t[s]);return e.concat(o||Array.prototype.slice.call(t))}var Pe="right-scroll-bar-position",Fe="width-before-scroll-bar",ua="with-scroll-bars-hidden",da="--removed-body-scroll-bar-size";function Ye(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pa(e,t){var r=x.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(s){var a=r.value;a!==s&&(r.value=s,r.callback(s,a))}}}})[0];return r.callback=t,r.facade}var fa=typeof window<"u"?_.useLayoutEffect:_.useEffect,Ht=new WeakMap;function va(e,t){var r=pa(null,function(s){return e.forEach(function(a){return Ye(a,s)})});return fa(function(){var s=Ht.get(r);if(s){var a=new Set(s),o=new Set(e),l=r.current;a.forEach(function(i){o.has(i)||Ye(i,null)}),o.forEach(function(i){a.has(i)||Ye(i,l)})}Ht.set(r,e)},[e]),r}function ma(e){return e}function ha(e,t){t===void 0&&(t=ma);var r=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var l=t(o,s);return r.push(l),function(){r=r.filter(function(i){return i!==l})}},assignSyncMedium:function(o){for(s=!0;r.length;){var l=r;r=[],l.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){s=!0;var l=[];if(r.length){var i=r;r=[],i.forEach(o),l=r}var u=function(){var d=l;l=[],d.forEach(o)},c=function(){return Promise.resolve().then(u)};c(),r={push:function(d){l.push(d),c()},filter:function(d){return l=l.filter(d),r}}}};return a}function xa(e){e===void 0&&(e={});var t=ha(null);return t.options=J({async:!0,ssr:!1},e),t}var An=function(e){var t=e.sideCar,r=Tn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return _.createElement(s,J({},r))};An.isSideCarExport=!0;function ga(e,t){return e.useMedium(t),An}var Rn=xa(),Xe=function(){},Oe=_.forwardRef(function(e,t){var r=_.useRef(null),s=_.useState({onScrollCapture:Xe,onWheelCapture:Xe,onTouchMoveCapture:Xe}),a=s[0],o=s[1],l=e.forwardProps,i=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,y=e.sideCar,S=e.noRelative,N=e.noIsolation,g=e.inert,h=e.allowPinchZoom,w=e.as,p=w===void 0?"div":w,m=e.gapMode,v=Tn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=y,k=va([r,t]),j=J(J({},v),a);return _.createElement(_.Fragment,null,d&&_.createElement(b,{sideCar:Rn,removeScrollBar:c,shards:f,noRelative:S,noIsolation:N,inert:g,setCallbacks:o,allowPinchZoom:!!h,lockRef:r,gapMode:m}),l?_.cloneElement(_.Children.only(i),J(J({},j),{ref:k})):_.createElement(p,J({},j,{className:u,ref:k}),i))});Oe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oe.classNames={fullWidth:Fe,zeroRight:Pe};var ba=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ya(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ba();return t&&e.setAttribute("nonce",t),e}function _a(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ka=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ya())&&(_a(t,r),wa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sa=function(){var e=ka();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Pn=function(){var e=Sa(),t=function(r){var s=r.styles,a=r.dynamic;return e(s,a),null};return t},Na={left:0,top:0,right:0,gap:0},Ze=function(e){return parseInt(e||"",10)||0},ja=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Ze(r),Ze(s),Ze(a)]},Ea=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Na;var t=ja(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-r+t[2]-t[0])}},Ca=Pn(),fe="data-scroll-locked",Ta=function(e,t,r,s){var a=e.left,o=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
96
|
+
*/const _s=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],re=q("x",_s);function pt(e,t,r=!0){x.useEffect(()=>{const s=e.current,a=t.current;if(!s)return;if(!r||!a){s.dataset.scrollable="false",s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}let o;const l=()=>{const d=a.scrollHeight>a.clientHeight+1;if(s.dataset.scrollable=d?"true":"false",!d){s.dataset.scrollbarState="hidden",s.style.setProperty("--vx-scrollbar-thumb-height","0px"),s.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}const f=Math.max(s.clientHeight-16,0),y=Math.max(a.clientHeight/a.scrollHeight*f,36),S=a.scrollHeight-a.clientHeight,N=Math.max(f-y,0),g=S>0?a.scrollTop/S*N:0;s.style.setProperty("--vx-scrollbar-thumb-height",`${y}px`),s.style.setProperty("--vx-scrollbar-thumb-offset",`${g}px`),s.dataset.scrollbarState!=="active"&&(s.dataset.scrollbarState="hidden")},i=()=>{s.dataset.scrollable==="true"&&(s.dataset.scrollbarState="active",o!==void 0&&window.clearTimeout(o),o=window.setTimeout(()=>{s.dataset.scrollbarState="hidden"},640))},u=()=>{l(),i()};l(),a.addEventListener("scroll",u,{passive:!0});const c=new ResizeObserver(()=>l());return c.observe(s),c.observe(a),()=>{a.removeEventListener("scroll",u),c.disconnect(),o!==void 0&&window.clearTimeout(o)}},[r,e,t])}function C(...e){return e.filter(Boolean).join(" ")}const oe=x.forwardRef(function({className:t,variant:r="solid",size:s="md",shape:a="rect",fullWidth:o=!1,loading:l=!1,startIcon:i,endIcon:u,disabled:c,type:d="button",children:f,...y},S){return n.jsxs("button",{ref:S,type:d,disabled:c||l,"aria-busy":l||void 0,className:C("vx-button",`vx-button--${r}`,`vx-button--${s}`,a==="square"&&"vx-button--square",a==="pill"&&"vx-button--pill",a==="circle"&&"vx-button--circle",o&&"vx-button--full-width",l&&"vx-button--loading",t),...y,children:[l?n.jsx("span",{className:"vx-button__spinner","aria-hidden":"true"}):i??null,f,!l&&u?u:null]})}),st=x.createContext(!1);function fn({collapsed:e=!1,mobileNavOpen:t=!1,density:r,sidebarWidth:s,className:a,children:o}){const{isTablet:l,isTabletPortrait:i}=dt(),u=s?{"--vx-sidebar-width":typeof s=="number"?`${s}px`:s}:void 0;return n.jsx(st.Provider,{value:e,children:n.jsx("div",{className:C("vx-shell",a),"data-collapsed":e,"data-nav-open":t,"data-tablet":l,"data-tablet-portrait":i,"data-density":r,style:u,children:o})})}function vn({brand:e="VXUI",brandCaption:t,brandIcon:r,collapsed:s=!1,footer:a,onToggle:o,collapseLabel:l="Collapse",expandLabel:i="Expand",onSidebarClick:u,children:c}){const d=x.useRef(null),f=x.useRef(null);return pt(d,f),n.jsxs("aside",{ref:d,className:"vx-sidebar vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",onClickCapture:u,children:[n.jsxs("div",{ref:y=>{f.current=y},className:"vx-sidebar__scroll vx-scroll-hide-native",children:[n.jsx("div",{className:"vx-sidebar__header",children:n.jsxs("div",{className:"vx-sidebar__brand",children:[r?n.jsx("span",{className:"vx-sidebar__brand-icon",children:r}):null,n.jsxs("div",{className:"vx-sidebar__brand-copy",children:[n.jsx("span",{className:"vx-sidebar__brand-text",children:e}),t?n.jsx("span",{className:"vx-sidebar__brand-caption",children:t}):null]})]})}),c,n.jsxs("div",{className:"vx-sidebar__footer",children:[a?n.jsx("div",{className:"vx-sidebar__footer-content",children:a}):null,o?n.jsxs(oe,{variant:"ghost",size:"sm",className:"vx-sidebar__toggle",onClick:o,"aria-label":s?i:l,children:[s?n.jsx(pn,{size:16}):n.jsx(dn,{size:16}),n.jsx("span",{className:"vx-sidebar__toggle-label",children:s?i:l})]}):null]})]}),n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function mn({label:e="Primary navigation",children:t}){return n.jsx("nav",{className:"vx-sidebar__nav","aria-label":e,children:t})}function hn({title:e,children:t}){return n.jsxs("div",{className:"vx-nav-section-block",children:[e?n.jsx("div",{className:"vx-nav-section-block__title",children:e}):null,n.jsx("div",{className:"vx-nav-section-block__items",children:t})]})}function xn({label:e,icon:t,badge:r,trailing:s,active:a,onSelect:o,children:l,defaultOpen:i=!1}){const[u,c]=x.useState(i),[d,f]=x.useState(!1),[y,S]=x.useState({top:0,left:0}),N=x.useRef(null),g=x.useRef(void 0),h=x.useContext(st),w=!!l;x.useEffect(()=>()=>{g.current!==void 0&&clearTimeout(g.current)},[]);const p=()=>{w&&!h&&c(j=>!j),(!w||h)&&(o==null||o())},m=()=>{if(!h||!w||!N.current)return;g.current!==void 0&&clearTimeout(g.current);const j=N.current.getBoundingClientRect(),T=N.current.closest(".vx-sidebar"),E=T?T.getBoundingClientRect().right:j.right;S({top:j.top-6,left:E+4}),f(!0)},v=()=>{g.current=setTimeout(()=>f(!1),100)},b=()=>{g.current!==void 0&&clearTimeout(g.current)},k=n.jsxs("button",{type:"button",className:C("vx-nav-item",a&&"vx-nav-item--active",w&&"vx-nav-item--parent"),onClick:p,"aria-expanded":w&&!h?u:void 0,title:h?e:void 0,children:[t?n.jsx("span",{className:"vx-nav-item__icon",children:t}):null,n.jsx("span",{className:"vx-nav-item__label",children:e}),r?n.jsx("span",{className:"vx-nav-item__badge",children:r}):null,w?n.jsx(be,{size:14,className:C("vx-nav-item__chevron",u&&"vx-nav-item__chevron--open")}):s?n.jsx("span",{className:"vx-nav-item__trailing",children:s}):null]});return w?n.jsxs("div",{ref:N,className:"vx-nav-item-wrap",onMouseEnter:m,onMouseLeave:h?v:void 0,children:[k,!h&&u&&n.jsx("div",{className:"vx-nav-sublist",role:"group",children:l}),h&&d&&ce.createPortal(n.jsx(st.Provider,{value:!1,children:n.jsxs("div",{className:"vx-nav-sublist-flyout",style:{top:y.top,left:y.left},role:"group",onMouseEnter:b,onMouseLeave:v,children:[n.jsx("div",{className:"vx-nav-sublist-flyout__label",children:e}),l]})}),document.body)]}):k}function gn({onClose:e,closeLabel:t="Close sidebar"}){return n.jsx("button",{type:"button",className:"vx-shell__overlay","aria-label":t,onClick:e})}function bn({children:e}){return n.jsx("div",{className:"vx-shell__main",children:e})}const yn=x.forwardRef(function({title:t,description:r,breadcrumb:s,actions:a,onMenuToggle:o,mobileNavOpen:l=!1,menuButtonLabel:i="Open navigation"},u){return n.jsxs("header",{ref:u,className:"vx-topbar",children:[o?n.jsx(oe,{variant:"ghost",size:"sm",className:"vx-topbar__menu","aria-label":i,onClick:o,children:l?n.jsx(dn,{size:16}):n.jsx(pn,{size:16})}):null,n.jsx("div",{className:"vx-topbar__title-group",children:s||n.jsxs("div",{children:[t?n.jsx("h1",{className:"vx-topbar__title",children:t}):null,r?n.jsx("p",{className:"vx-topbar__description",children:r}):null]})}),a?n.jsx("div",{className:"vx-topbar__actions",children:a}):null]})});function _n({children:e}){const t=x.useRef(null),r=x.useRef(null);return pt(t,r),n.jsxs("div",{ref:s=>{t.current=s},className:"vx-shell__content-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[n.jsx("main",{ref:s=>{r.current=s},className:"vx-shell__content vx-scroll-hide-native",children:e}),n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})}function ws({brand:e="VXUI",brandCaption:t,brandIcon:r,topbarRef:s,breadcrumb:a,title:o,description:l,navItems:i,navSections:u,sidebarCollapsed:c=!1,sidebarWidth:d,mobileNavOpen:f=!1,onSidebarToggle:y,onMobileNavToggle:S,onSidebarClick:N,menuButtonLabel:g="Open navigation",sidebarCollapseLabel:h="Collapse",sidebarExpandLabel:w="Expand",sidebarCloseLabel:p="Close sidebar",density:m,headerActions:v,sidebarFooter:b,children:k}){const j=u??(i?[{items:i}]:[]);function T(E){const{key:R,onSelect:A,children:D,defaultOpen:O,...F}=E,H=(D==null?void 0:D.some(U=>U.active))??!1;return n.jsx(xn,{onSelect:A,defaultOpen:O??(D?H:void 0),...F,children:D==null?void 0:D.map(T)},R)}return n.jsxs(fn,{collapsed:c,mobileNavOpen:f,density:m,sidebarWidth:d,children:[n.jsx(vn,{brand:e,brandCaption:t,brandIcon:r,collapsed:c,footer:b,onToggle:y,onSidebarClick:N,collapseLabel:h,expandLabel:w,children:n.jsx(mn,{children:j.map((E,R)=>n.jsx(hn,{title:E.title,children:E.items.map(T)},E.key??E.title??R))})}),S?n.jsx(gn,{onClose:S,closeLabel:p}):null,n.jsxs(bn,{children:[n.jsx(yn,{ref:s,breadcrumb:a,title:o,description:l,actions:v,onMenuToggle:S,mobileNavOpen:f,menuButtonLabel:g}),n.jsx(_n,{children:k})]})]})}function ks({className:e,variant:t="neutral",...r}){return n.jsx("span",{className:C("vx-badge",`vx-badge--${t}`,e),...r})}function Ss({className:e,variant:t="default",padding:r,hoverable:s=!1,...a}){return n.jsx("section",{className:C("vx-card",t!=="default"&&`vx-card--${t}`,r&&`vx-card--pad-${r}`,s&&"vx-card--hoverable",e),...a})}function Ns({className:e,...t}){return n.jsx("header",{className:C("vx-card__header",e),...t})}function js({className:e,...t}){return n.jsx("h2",{className:C("vx-card__title",e),...t})}function Es({className:e,...t}){return n.jsx("p",{className:C("vx-card__description",e),...t})}function Cs({className:e,...t}){return n.jsx("div",{className:C("vx-card__content",e),...t})}function W(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ft(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wn(...e){return t=>{let r=!1;const s=e.map(a=>{const o=Ft(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():Ft(e[a],null)}}}}function Y(...e){return _.useCallback(wn(...e),e)}function Ts(e,t){const r=_.createContext(t),s=o=>{const{children:l,...i}=o,u=_.useMemo(()=>i,Object.values(i));return n.jsx(r.Provider,{value:u,children:l})};s.displayName=e+"Provider";function a(o){const l=_.useContext(r);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[s,a]}function ve(e,t=[]){let r=[];function s(o,l){const i=_.createContext(l),u=r.length;r=[...r,l];const c=f=>{var w;const{scope:y,children:S,...N}=f,g=((w=y==null?void 0:y[e])==null?void 0:w[u])||i,h=_.useMemo(()=>N,Object.values(N));return n.jsx(g.Provider,{value:h,children:S})};c.displayName=o+"Provider";function d(f,y){var g;const S=((g=y==null?void 0:y[e])==null?void 0:g[u])||i,N=_.useContext(S);if(N)return N;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const a=()=>{const o=r.map(l=>_.createContext(l));return function(i){const u=(i==null?void 0:i[e])||o;return _.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return a.scopeName=e,[s,As(a,...t)]}function As(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=s.reduce((i,{useScope:u,scopeName:c})=>{const f=u(o)[`__scope${c}`];return{...i,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var ie=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},Rs=_[" useId ".trim().toString()]||(()=>{}),Ps=0;function he(e){const[t,r]=_.useState(Rs());return ie(()=>{r(s=>s??String(Ps++))},[e]),e||(t?`radix-${t}`:"")}var Ds=_[" useInsertionEffect ".trim().toString()]||ie;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:s}){const[a,o,l]=Fs({defaultProp:t,onChange:r}),i=e!==void 0,u=i?e:a;{const d=_.useRef(e!==void 0);_.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,s])}const c=_.useCallback(d=>{var f;if(i){const y=Ls(d)?d(e):d;y!==e&&((f=l.current)==null||f.call(l,y))}else o(d)},[i,e,o,l]);return[u,c]}function Fs({defaultProp:e,onChange:t}){const[r,s]=_.useState(e),a=_.useRef(r),o=_.useRef(t);return Ds(()=>{o.current=t},[t]),_.useEffect(()=>{var l;a.current!==r&&((l=o.current)==null||l.call(o,r),a.current=r)},[r,a]),[r,s,o]}function Ls(e){return typeof e=="function"}function Fe(e){const t=Is(e),r=_.forwardRef((s,a)=>{const{children:o,...l}=s,i=_.Children.toArray(o),u=i.find(Os);if(u){const c=u.props.children,d=i.map(f=>f===u?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:f);return n.jsx(t,{...l,ref:a,children:_.isValidElement(c)?_.cloneElement(c,void 0,d):null})}return n.jsx(t,{...l,ref:a,children:o})});return r.displayName=`${e}.Slot`,r}function Is(e){const t=_.forwardRef((r,s)=>{const{children:a,...o}=r;if(_.isValidElement(a)){const l=Bs(a),i=$s(o,a.props);return a.type!==_.Fragment&&(i.ref=s?wn(s,l):l),_.cloneElement(a,i)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ms=Symbol("radix.slottable");function Os(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ms}function $s(e,t){const r={...t};for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?r[s]=(...i)=>{const u=o(...i);return a(...i),u}:a&&(r[s]=a):s==="style"?r[s]={...a,...o}:s==="className"&&(r[s]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function Bs(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],G=zs.reduce((e,t)=>{const r=Fe(`Primitive.${t}`),s=_.forwardRef((a,o)=>{const{asChild:l,...i}=a,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(u,{...i,ref:o})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function kn(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}function ee(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var s;return(s=t.current)==null?void 0:s.call(t,...r)},[])}function Hs(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e);_.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[r,t])}var Us="DismissableLayer",at="dismissableLayer.update",Ws="dismissableLayer.pointerDownOutside",Gs="dismissableLayer.focusOutside",Lt,Sn=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ft=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:i,...u}=e,c=_.useContext(Sn),[d,f]=_.useState(null),y=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=_.useState({}),N=Y(t,j=>f(j)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(h),p=d?g.indexOf(d):-1,m=c.layersWithOutsidePointerEventsDisabled.size>0,v=p>=w,b=Ks(j=>{const T=j.target,E=[...c.branches].some(R=>R.contains(T));!v||E||(a==null||a(j),l==null||l(j),j.defaultPrevented||i==null||i())},y),k=qs(j=>{const T=j.target;[...c.branches].some(R=>R.contains(T))||(o==null||o(j),l==null||l(j),j.defaultPrevented||i==null||i())},y);return Hs(j=>{p===c.layers.size-1&&(s==null||s(j),!j.defaultPrevented&&i&&(j.preventDefault(),i()))},y),_.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Lt=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),It(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Lt)}},[d,y,r,c]),_.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),It())},[d,c]),_.useEffect(()=>{const j=()=>S({});return document.addEventListener(at,j),()=>document.removeEventListener(at,j)},[]),n.jsx(G.div,{...u,ref:N,style:{pointerEvents:m?v?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,k.onFocusCapture),onBlurCapture:W(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,b.onPointerDownCapture)})});ft.displayName=Us;var Vs="DismissableLayerBranch",Nn=_.forwardRef((e,t)=>{const r=_.useContext(Sn),s=_.useRef(null),a=Y(t,s);return _.useEffect(()=>{const o=s.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),n.jsx(G.div,{...e,ref:a})});Nn.displayName=Vs;function Ks(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e),s=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const o=i=>{if(i.target&&!s.current){let u=function(){jn(Ws,r,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);s.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>s.current=!0}}function qs(e,t=globalThis==null?void 0:globalThis.document){const r=ee(e),s=_.useRef(!1);return _.useEffect(()=>{const a=o=>{o.target&&!s.current&&jn(Gs,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function It(){const e=new CustomEvent(at);document.dispatchEvent(e)}function jn(e,t,r,{discrete:s}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?kn(a,o):a.dispatchEvent(o)}var Ys=ft,Xs=Nn,Ve="focusScope.autoFocusOnMount",Ke="focusScope.autoFocusOnUnmount",Mt={bubbles:!1,cancelable:!0},Zs="FocusScope",En=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[i,u]=_.useState(null),c=ee(a),d=ee(o),f=_.useRef(null),y=Y(t,g=>u(g)),S=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(s){let g=function(m){if(S.paused||!i)return;const v=m.target;i.contains(v)?f.current=v:ne(f.current,{select:!0})},h=function(m){if(S.paused||!i)return;const v=m.relatedTarget;v!==null&&(i.contains(v)||ne(f.current,{select:!0}))},w=function(m){if(document.activeElement===document.body)for(const b of m)b.removedNodes.length>0&&ne(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",h);const p=new MutationObserver(w);return i&&p.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",h),p.disconnect()}}},[s,i,S.paused]),_.useEffect(()=>{if(i){$t.add(S);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(Ve,Mt);i.addEventListener(Ve,c),i.dispatchEvent(w),w.defaultPrevented||(Qs(ra(Cn(i)),{select:!0}),document.activeElement===g&&ne(i))}return()=>{i.removeEventListener(Ve,c),setTimeout(()=>{const w=new CustomEvent(Ke,Mt);i.addEventListener(Ke,d),i.dispatchEvent(w),w.defaultPrevented||ne(g??document.body,{select:!0}),i.removeEventListener(Ke,d),$t.remove(S)},0)}}},[i,c,d,S]);const N=_.useCallback(g=>{if(!r&&!s||S.paused)return;const h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(h&&w){const p=g.currentTarget,[m,v]=Js(p);m&&v?!g.shiftKey&&w===v?(g.preventDefault(),r&&ne(m,{select:!0})):g.shiftKey&&w===m&&(g.preventDefault(),r&&ne(v,{select:!0})):w===p&&g.preventDefault()}},[r,s,S.paused]);return n.jsx(G.div,{tabIndex:-1,...l,ref:y,onKeyDown:N})});En.displayName=Zs;function Qs(e,{select:t=!1}={}){const r=document.activeElement;for(const s of e)if(ne(s,{select:t}),document.activeElement!==r)return}function Js(e){const t=Cn(e),r=Ot(t,e),s=Ot(t.reverse(),e);return[r,s]}function Cn(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ot(e,t){for(const r of e)if(!ea(r,{upTo:t}))return r}function ea(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ta(e){return e instanceof HTMLInputElement&&"select"in e}function ne(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ta(e)&&t&&e.select()}}var $t=na();function na(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Bt(e,t),e.unshift(t)},remove(t){var r;e=Bt(e,t),(r=e[0])==null||r.resume()}}}function Bt(e,t){const r=[...e],s=r.indexOf(t);return s!==-1&&r.splice(s,1),r}function ra(e){return e.filter(t=>t.tagName!=="A")}var sa="Portal",vt=_.forwardRef((e,t)=>{var i;const{container:r,...s}=e,[a,o]=_.useState(!1);ie(()=>o(!0),[]);const l=r||a&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?ce.createPortal(n.jsx(G.div,{...s,ref:t}),l):null});vt.displayName=sa;function aa(e,t){return _.useReducer((r,s)=>t[r][s]??r,e)}var me=e=>{const{present:t,children:r}=e,s=oa(t),a=typeof r=="function"?r({present:s.isPresent}):_.Children.only(r),o=Y(s.ref,ia(a));return typeof r=="function"||s.isPresent?_.cloneElement(a,{ref:o}):null};me.displayName="Presence";function oa(e){const[t,r]=_.useState(),s=_.useRef(null),a=_.useRef(e),o=_.useRef("none"),l=e?"mounted":"unmounted",[i,u]=aa(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=Se(s.current);o.current=i==="mounted"?c:"none"},[i]),ie(()=>{const c=s.current,d=a.current;if(d!==e){const y=o.current,S=Se(c);e?u("MOUNT"):S==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&y!==S?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),ie(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=S=>{const g=Se(s.current).includes(CSS.escape(S.animationName));if(S.target===t&&g&&(u("ANIMATION_END"),!a.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},y=S=>{S.target===t&&(o.current=Se(s.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:_.useCallback(c=>{s.current=c?getComputedStyle(c):null,r(c)},[])}}function Se(e){return(e==null?void 0:e.animationName)||"none"}function ia(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qe=0;function la(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zt()),document.body.insertAdjacentElement("beforeend",e[1]??zt()),qe++,()=>{qe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qe--}},[])}function zt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var J=function(){return J=Object.assign||function(t){for(var r,s=1,a=arguments.length;s<a;s++){r=arguments[s];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},J.apply(this,arguments)};function Tn(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r}function ca(e,t,r){if(r||arguments.length===2)for(var s=0,a=t.length,o;s<a;s++)(o||!(s in t))&&(o||(o=Array.prototype.slice.call(t,0,s)),o[s]=t[s]);return e.concat(o||Array.prototype.slice.call(t))}var Pe="right-scroll-bar-position",De="width-before-scroll-bar",ua="with-scroll-bars-hidden",da="--removed-body-scroll-bar-size";function Ye(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pa(e,t){var r=x.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(s){var a=r.value;a!==s&&(r.value=s,r.callback(s,a))}}}})[0];return r.callback=t,r.facade}var fa=typeof window<"u"?_.useLayoutEffect:_.useEffect,Ht=new WeakMap;function va(e,t){var r=pa(null,function(s){return e.forEach(function(a){return Ye(a,s)})});return fa(function(){var s=Ht.get(r);if(s){var a=new Set(s),o=new Set(e),l=r.current;a.forEach(function(i){o.has(i)||Ye(i,null)}),o.forEach(function(i){a.has(i)||Ye(i,l)})}Ht.set(r,e)},[e]),r}function ma(e){return e}function ha(e,t){t===void 0&&(t=ma);var r=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var l=t(o,s);return r.push(l),function(){r=r.filter(function(i){return i!==l})}},assignSyncMedium:function(o){for(s=!0;r.length;){var l=r;r=[],l.forEach(o)}r={push:function(i){return o(i)},filter:function(){return r}}},assignMedium:function(o){s=!0;var l=[];if(r.length){var i=r;r=[],i.forEach(o),l=r}var u=function(){var d=l;l=[],d.forEach(o)},c=function(){return Promise.resolve().then(u)};c(),r={push:function(d){l.push(d),c()},filter:function(d){return l=l.filter(d),r}}}};return a}function xa(e){e===void 0&&(e={});var t=ha(null);return t.options=J({async:!0,ssr:!1},e),t}var An=function(e){var t=e.sideCar,r=Tn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return _.createElement(s,J({},r))};An.isSideCarExport=!0;function ga(e,t){return e.useMedium(t),An}var Rn=xa(),Xe=function(){},Oe=_.forwardRef(function(e,t){var r=_.useRef(null),s=_.useState({onScrollCapture:Xe,onWheelCapture:Xe,onTouchMoveCapture:Xe}),a=s[0],o=s[1],l=e.forwardProps,i=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,y=e.sideCar,S=e.noRelative,N=e.noIsolation,g=e.inert,h=e.allowPinchZoom,w=e.as,p=w===void 0?"div":w,m=e.gapMode,v=Tn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=y,k=va([r,t]),j=J(J({},v),a);return _.createElement(_.Fragment,null,d&&_.createElement(b,{sideCar:Rn,removeScrollBar:c,shards:f,noRelative:S,noIsolation:N,inert:g,setCallbacks:o,allowPinchZoom:!!h,lockRef:r,gapMode:m}),l?_.cloneElement(_.Children.only(i),J(J({},j),{ref:k})):_.createElement(p,J({},j,{className:u,ref:k}),i))});Oe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oe.classNames={fullWidth:De,zeroRight:Pe};var ba=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ya(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ba();return t&&e.setAttribute("nonce",t),e}function _a(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ka=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ya())&&(_a(t,r),wa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sa=function(){var e=ka();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Pn=function(){var e=Sa(),t=function(r){var s=r.styles,a=r.dynamic;return e(s,a),null};return t},Na={left:0,top:0,right:0,gap:0},Ze=function(e){return parseInt(e||"",10)||0},ja=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Ze(r),Ze(s),Ze(a)]},Ea=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Na;var t=ja(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-r+t[2]-t[0])}},Ca=Pn(),fe="data-scroll-locked",Ta=function(e,t,r,s){var a=e.left,o=e.top,l=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
97
97
|
.`.concat(ua,` {
|
|
98
98
|
overflow: hidden `).concat(s,`;
|
|
99
99
|
padding-right: `).concat(i,"px ").concat(s,`;
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
right: `).concat(i,"px ").concat(s,`;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.`).concat(
|
|
118
|
+
.`).concat(De,` {
|
|
119
119
|
margin-right: `).concat(i,"px ").concat(s,`;
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -123,26 +123,26 @@
|
|
|
123
123
|
right: 0 `).concat(s,`;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.`).concat(
|
|
126
|
+
.`).concat(De," .").concat(De,` {
|
|
127
127
|
margin-right: 0 `).concat(s,`;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
body[`).concat(fe,`] {
|
|
131
131
|
`).concat(da,": ").concat(i,`px;
|
|
132
132
|
}
|
|
133
|
-
`)},Ut=function(){var e=parseInt(document.body.getAttribute(fe)||"0",10);return isFinite(e)?e:0},Aa=function(){_.useEffect(function(){return document.body.setAttribute(fe,(Ut()+1).toString()),function(){var e=Ut()-1;e<=0?document.body.removeAttribute(fe):document.body.setAttribute(fe,e.toString())}},[])},Ra=function(e){var t=e.noRelative,r=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;Aa();var o=_.useMemo(function(){return Ea(a)},[a]);return _.createElement(Ca,{styles:Ta(o,!t,a,r?"":"!important")})},ot=!1;if(typeof window<"u")try{var Ne=Object.defineProperty({},"passive",{get:function(){return ot=!0,!0}});window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch{ot=!1}var ue=ot?{passive:!1}:!1,Pa=function(e){return e.tagName==="TEXTAREA"},
|
|
133
|
+
`)},Ut=function(){var e=parseInt(document.body.getAttribute(fe)||"0",10);return isFinite(e)?e:0},Aa=function(){_.useEffect(function(){return document.body.setAttribute(fe,(Ut()+1).toString()),function(){var e=Ut()-1;e<=0?document.body.removeAttribute(fe):document.body.setAttribute(fe,e.toString())}},[])},Ra=function(e){var t=e.noRelative,r=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;Aa();var o=_.useMemo(function(){return Ea(a)},[a]);return _.createElement(Ca,{styles:Ta(o,!t,a,r?"":"!important")})},ot=!1;if(typeof window<"u")try{var Ne=Object.defineProperty({},"passive",{get:function(){return ot=!0,!0}});window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch{ot=!1}var ue=ot?{passive:!1}:!1,Pa=function(e){return e.tagName==="TEXTAREA"},Dn=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Pa(e)&&r[t]==="visible")},Da=function(e){return Dn(e,"overflowY")},Fa=function(e){return Dn(e,"overflowX")},Wt=function(e,t){var r=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=Fn(e,s);if(a){var o=Ln(e,s),l=o[1],i=o[2];if(l>i)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},La=function(e){var t=e.scrollTop,r=e.scrollHeight,s=e.clientHeight;return[t,r,s]},Ia=function(e){var t=e.scrollLeft,r=e.scrollWidth,s=e.clientWidth;return[t,r,s]},Fn=function(e,t){return e==="v"?Da(t):Fa(t)},Ln=function(e,t){return e==="v"?La(t):Ia(t)},Ma=function(e,t){return e==="h"&&t==="rtl"?-1:1},Oa=function(e,t,r,s,a){var o=Ma(e,window.getComputedStyle(t).direction),l=o*s,i=r.target,u=t.contains(i),c=!1,d=l>0,f=0,y=0;do{if(!i)break;var S=Ln(e,i),N=S[0],g=S[1],h=S[2],w=g-h-o*N;(N||w)&&Fn(e,i)&&(f+=w,y+=N);var p=i.parentNode;i=p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE?p.host:p}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(d&&Math.abs(f)<1||!d&&Math.abs(y)<1)&&(c=!0),c},je=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gt=function(e){return[e.deltaX,e.deltaY]},Vt=function(e){return e&&"current"in e?e.current:e},$a=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ba=function(e){return`
|
|
134
134
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
135
135
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
136
|
-
`)},za=0,de=[];function Ha(e){var t=_.useRef([]),r=_.useRef([0,0]),s=_.useRef(),a=_.useState(za++)[0],o=_.useState(Pn)[0],l=_.useRef(e);_.useEffect(function(){l.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=ca([e.lockRef.current],(e.shards||[]).map(
|
|
136
|
+
`)},za=0,de=[];function Ha(e){var t=_.useRef([]),r=_.useRef([0,0]),s=_.useRef(),a=_.useState(za++)[0],o=_.useState(Pn)[0],l=_.useRef(e);_.useEffect(function(){l.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=ca([e.lockRef.current],(e.shards||[]).map(Vt),!0).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=_.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!l.current.allowPinchZoom;var w=je(g),p=r.current,m="deltaX"in g?g.deltaX:p[0]-w[0],v="deltaY"in g?g.deltaY:p[1]-w[1],b,k=g.target,j=Math.abs(m)>Math.abs(v)?"h":"v";if("touches"in g&&j==="h"&&k.type==="range")return!1;var T=window.getSelection(),E=T&&T.anchorNode,R=E?E===k||E.contains(k):!1;if(R)return!1;var A=Wt(j,k);if(!A)return!0;if(A?b=j:(b=j==="v"?"h":"v",A=Wt(j,k)),!A)return!1;if(!s.current&&"changedTouches"in g&&(m||v)&&(s.current=b),!b)return!0;var D=s.current||b;return Oa(D,h,g,D==="h"?m:v)},[]),u=_.useCallback(function(g){var h=g;if(!(!de.length||de[de.length-1]!==o)){var w="deltaY"in h?Gt(h):je(h),p=t.current.filter(function(b){return b.name===h.type&&(b.target===h.target||h.target===b.shadowParent)&&$a(b.delta,w)})[0];if(p&&p.should){h.cancelable&&h.preventDefault();return}if(!p){var m=(l.current.shards||[]).map(Vt).filter(Boolean).filter(function(b){return b.contains(h.target)}),v=m.length>0?i(h,m[0]):!l.current.noIsolation;v&&h.cancelable&&h.preventDefault()}}},[]),c=_.useCallback(function(g,h,w,p){var m={name:g,delta:h,target:w,should:p,shadowParent:Ua(w)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(v){return v!==m})},1)},[]),d=_.useCallback(function(g){r.current=je(g),s.current=void 0},[]),f=_.useCallback(function(g){c(g.type,Gt(g),g.target,i(g,e.lockRef.current))},[]),y=_.useCallback(function(g){c(g.type,je(g),g.target,i(g,e.lockRef.current))},[]);_.useEffect(function(){return de.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:y}),document.addEventListener("wheel",u,ue),document.addEventListener("touchmove",u,ue),document.addEventListener("touchstart",d,ue),function(){de=de.filter(function(g){return g!==o}),document.removeEventListener("wheel",u,ue),document.removeEventListener("touchmove",u,ue),document.removeEventListener("touchstart",d,ue)}},[]);var S=e.removeScrollBar,N=e.inert;return _.createElement(_.Fragment,null,N?_.createElement(o,{styles:Ba(a)}):null,S?_.createElement(Ra,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ua(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Wa=ga(Rn,Ha);var In=_.forwardRef(function(e,t){return _.createElement(Oe,J({},e,{ref:t,sideCar:Wa}))});In.classNames=Oe.classNames;var Ga=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pe=new WeakMap,Ee=new WeakMap,Ce={},Qe=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},Va=function(e,t){return t.map(function(r){if(e.contains(r))return r;var s=Mn(r);return s&&e.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ka=function(e,t,r,s){var a=Va(t,Array.isArray(e)?e:[e]);Ce[r]||(Ce[r]=new WeakMap);var o=Ce[r],l=[],i=new Set,u=new Set(a),c=function(f){!f||i.has(f)||(i.add(f),c(f.parentNode))};a.forEach(c);var d=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(y){if(i.has(y))d(y);else try{var S=y.getAttribute(s),N=S!==null&&S!=="false",g=(pe.get(y)||0)+1,h=(o.get(y)||0)+1;pe.set(y,g),o.set(y,h),l.push(y),g===1&&N&&Ee.set(y,!0),h===1&&y.setAttribute(r,"true"),N||y.setAttribute(s,"true")}catch(w){console.error("aria-hidden: cannot operate on ",y,w)}})};return d(t),i.clear(),Qe++,function(){l.forEach(function(f){var y=pe.get(f)-1,S=o.get(f)-1;pe.set(f,y),o.set(f,S),y||(Ee.has(f)||f.removeAttribute(s),Ee.delete(f)),S||f.removeAttribute(r)}),Qe--,Qe||(pe=new WeakMap,pe=new WeakMap,Ee=new WeakMap,Ce={})}},qa=function(e,t,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=Ga(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),Ka(s,a,r,"aria-hidden")):function(){return null}},$e="Dialog",[On]=ve($e),[Ya,Q]=On($e),$n=e=>{const{__scopeDialog:t,children:r,open:s,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,i=_.useRef(null),u=_.useRef(null),[c,d]=ye({prop:s,defaultProp:a??!1,onChange:o,caller:$e});return n.jsx(Ya,{scope:t,triggerRef:i,contentRef:u,contentId:he(),titleId:he(),descriptionId:he(),open:c,onOpenChange:d,onOpenToggle:_.useCallback(()=>d(f=>!f),[d]),modal:l,children:r})};$n.displayName=$e;var Bn="DialogTrigger",zn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(Bn,r),o=Y(t,a.triggerRef);return n.jsx(G.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":xt(a.open),...s,ref:o,onClick:W(e.onClick,a.onOpenToggle)})});zn.displayName=Bn;var mt="DialogPortal",[Xa,Hn]=On(mt,{forceMount:void 0}),Un=e=>{const{__scopeDialog:t,forceMount:r,children:s,container:a}=e,o=Q(mt,t);return n.jsx(Xa,{scope:t,forceMount:r,children:_.Children.map(s,l=>n.jsx(me,{present:r||o.open,children:n.jsx(vt,{asChild:!0,container:a,children:l})}))})};Un.displayName=mt;var Le="DialogOverlay",Wn=_.forwardRef((e,t)=>{const r=Hn(Le,e.__scopeDialog),{forceMount:s=r.forceMount,...a}=e,o=Q(Le,e.__scopeDialog);return o.modal?n.jsx(me,{present:s||o.open,children:n.jsx(Qa,{...a,ref:t})}):null});Wn.displayName=Le;var Za=Fe("DialogOverlay.RemoveScroll"),Qa=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(Le,r);return n.jsx(In,{as:Za,allowPinchZoom:!0,shards:[a.contentRef],children:n.jsx(G.div,{"data-state":xt(a.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),le="DialogContent",Gn=_.forwardRef((e,t)=>{const r=Hn(le,e.__scopeDialog),{forceMount:s=r.forceMount,...a}=e,o=Q(le,e.__scopeDialog);return n.jsx(me,{present:s||o.open,children:o.modal?n.jsx(Ja,{...a,ref:t}):n.jsx(eo,{...a,ref:t})})});Gn.displayName=le;var Ja=_.forwardRef((e,t)=>{const r=Q(le,e.__scopeDialog),s=_.useRef(null),a=Y(t,r.contentRef,s);return _.useEffect(()=>{const o=s.current;if(o)return qa(o)},[]),n.jsx(Vn,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&o.preventDefault()}),onFocusOutside:W(e.onFocusOutside,o=>o.preventDefault())})}),eo=_.forwardRef((e,t)=>{const r=Q(le,e.__scopeDialog),s=_.useRef(!1),a=_.useRef(!1);return n.jsx(Vn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(s.current||(i=r.triggerRef.current)==null||i.focus(),o.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:o=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(s.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((c=r.triggerRef.current)==null?void 0:c.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Vn=_.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,i=Q(le,r),u=_.useRef(null),c=Y(t,u);return la(),n.jsxs(n.Fragment,{children:[n.jsx(En,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:o,children:n.jsx(ft,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":xt(i.open),...l,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(to,{titleId:i.titleId}),n.jsx(ro,{contentRef:u,descriptionId:i.descriptionId})]})]})}),ht="DialogTitle",Kn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(ht,r);return n.jsx(G.h2,{id:a.titleId,...s,ref:t})});Kn.displayName=ht;var qn="DialogDescription",Yn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(qn,r);return n.jsx(G.p,{id:a.descriptionId,...s,ref:t})});Yn.displayName=qn;var Xn="DialogClose",Zn=_.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Q(Xn,r);return n.jsx(G.button,{type:"button",...s,ref:t,onClick:W(e.onClick,()=>a.onOpenChange(!1))})});Zn.displayName=Xn;function xt(e){return e?"open":"closed"}var Qn="DialogTitleWarning",[dc,Jn]=Ts(Qn,{contentName:le,titleName:ht,docsSlug:"dialog"}),to=({titleId:e})=>{const t=Jn(Qn),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
137
137
|
|
|
138
138
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
139
139
|
|
|
140
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},no="DialogDescriptionWarning",ro=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jn(no).contentName}}.`;return _.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},gt=$n,bt=zn,yt=Un,_t=Wn,wt=Gn,kt=Vn,St=Yn,xe=Zn;function so({children:e,scrollable:t}){const r=x.useRef(null),s=x.useRef(null);return pt(r,s,t),n.jsxs("div",{ref:r,className:"vx-dialog__body-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[n.jsx("div",{ref:s,className:C("vx-dialog__body",t&&"vx-scroll-hide-native"),children:e}),t?n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})}):null]})}function ao({trigger:e,title:t,description:r,children:s,footer:a,className:o,size:l="md",padding:i,placement:u="center",scrollable:c=!0,closable:d=!0,...f}){const y=x.useRef(null);return n.jsxs(gt,{...f,children:[n.jsx(bt,{asChild:!0,children:e}),n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-dialog__overlay"}),n.jsxs(wt,{ref:y,className:C("vx-dialog__content",l!=="md"&&`vx-dialog__content--${l}`,u!=="center"&&`vx-dialog__content--${u}`,i&&`vx-dialog__content--pad-${i}`,c&&"vx-dialog__content--scrollable",o),onEscapeKeyDown:S=>{const N=y.current;if(!N)return;const g=!!N.querySelector(".vx-select__dropdown, .vx-multiselect__dropdown, .vx-datepicker__popover, .vx-timepicker__popover, .vx-colorpicker__panel"),h=N.dataset.hasOpenPortal==="1";(g||h)&&S.preventDefault()},onPointerDownOutside:S=>{const N=y.current;(N==null?void 0:N.dataset.hasOpenPortal)==="1"&&S.preventDefault()},children:[n.jsxs("div",{className:"vx-dialog__header",children:[n.jsxs("div",{children:[n.jsx(kt,{className:"vx-dialog__title",children:t}),r?n.jsx(St,{className:"vx-dialog__description",children:r}):null]}),d?n.jsx(xe,{className:"vx-dialog__close","aria-label":"Close dialog",children:n.jsx(re,{size:16})}):null]}),n.jsx(so,{scrollable:c,children:s}),a?n.jsx("div",{className:"vx-dialog__footer",children:a}):null]})]})]})}const oo=xe;function io({className:e,label:t,hint:r,prefix:s,suffix:a,error:o,variant:l="default",size:i="md",rounded:u=!1,...c}){return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsxs("span",{className:C("vx-input",l!=="default"&&`vx-input--${l}`,i!=="md"&&`vx-input--${i}`,u&&"vx-input--rounded",o&&"vx-input--invalid",e),children:[s?n.jsx("span",{className:"vx-input__ornament",children:s}):null,n.jsx("input",{className:"vx-input__field","aria-invalid":o?"true":void 0,...c}),a?n.jsx("span",{className:"vx-input__ornament",children:a}):null]}),o?n.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function lo(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function co(e){const[t,r]=_.useState(void 0);return ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,i;if("borderBoxSize"in o){const u=o.borderBoxSize,c=Array.isArray(u)?u[0]:u;l=c.inlineSize,i=c.blockSize}else l=e.offsetWidth,i=e.offsetHeight;r({width:l,height:i})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else r(void 0)},[e]),t}var Be="Switch",[uo]=ve(Be),[po,fo]=uo(Be),er=_.forwardRef((e,t)=>{const{__scopeSwitch:r,name:s,checked:a,defaultChecked:o,required:l,disabled:i,value:u="on",onCheckedChange:c,form:d,...f}=e,[y,S]=_.useState(null),N=Y(t,m=>S(m)),g=_.useRef(!1),h=y?d||!!y.closest("form"):!0,[w,p]=ye({prop:a,defaultProp:o??!1,onChange:c,caller:Be});return n.jsxs(po,{scope:r,checked:w,disabled:i,children:[n.jsx(G.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":sr(w),"data-disabled":i?"":void 0,disabled:i,value:u,...f,ref:N,onClick:W(e.onClick,m=>{p(v=>!v),h&&(g.current=m.isPropagationStopped(),g.current||m.stopPropagation())})}),h&&n.jsx(rr,{control:y,bubbles:!g.current,name:s,value:u,checked:w,required:l,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});er.displayName=Be;var tr="SwitchThumb",nr=_.forwardRef((e,t)=>{const{__scopeSwitch:r,...s}=e,a=fo(tr,r);return n.jsx(G.span,{"data-state":sr(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t})});nr.displayName=tr;var vo="SwitchBubbleInput",rr=_.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:s=!0,...a},o)=>{const l=_.useRef(null),i=Y(l,o),u=lo(r),c=co(t);return _.useEffect(()=>{const d=l.current;if(!d)return;const f=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==r&&S){const N=new Event("click",{bubbles:s});S.call(d,r),d.dispatchEvent(N)}},[u,r,s]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:i,style:{...a.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});rr.displayName=vo;function sr(e){return e?"checked":"unchecked"}var mo=er,ho=nr;function xo({className:e,label:t,description:r,...s}){return n.jsxs("label",{className:"vx-switch",children:[n.jsxs("span",{className:"vx-switch__copy",children:[n.jsx("span",{className:"vx-switch__label",children:t}),r?n.jsx("span",{className:"vx-switch__description",children:r}):null]}),n.jsx(mo,{className:C("vx-switch__control",e),...s,children:n.jsx(ho,{className:"vx-switch__thumb"})})]})}function ar(e){const t=e+"CollectionProvider",[r,s]=ve(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=g=>{const{scope:h,children:w}=g,p=x.useRef(null),m=x.useRef(new Map).current;return n.jsx(a,{scope:h,itemMap:m,collectionRef:p,children:w})};l.displayName=t;const i=e+"CollectionSlot",u=De(i),c=x.forwardRef((g,h)=>{const{scope:w,children:p}=g,m=o(i,w),v=Y(h,m.collectionRef);return n.jsx(u,{ref:v,children:p})});c.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",y=De(d),S=x.forwardRef((g,h)=>{const{scope:w,children:p,...m}=g,v=x.useRef(null),b=Y(h,v),k=o(d,w);return x.useEffect(()=>(k.itemMap.set(v,{ref:v,...m}),()=>void k.itemMap.delete(v))),n.jsx(y,{[f]:"",ref:b,children:p})});S.displayName=d;function N(g){const h=o(e+"CollectionConsumer",g);return x.useCallback(()=>{const p=h.collectionRef.current;if(!p)return[];const m=Array.from(p.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((k,j)=>m.indexOf(k.ref.current)-m.indexOf(j.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:l,Slot:c,ItemSlot:S},N,s]}var go=_.createContext(void 0);function or(e){const t=_.useContext(go);return e||t||"ltr"}var Je="rovingFocusGroup.onEntryFocus",bo={bubbles:!1,cancelable:!0},_e="RovingFocusGroup",[it,ir,yo]=ar(_e),[_o,lr]=ve(_e,[yo]),[wo,ko]=_o(_e),cr=_.forwardRef((e,t)=>n.jsx(it.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(it.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(So,{...e,ref:t})})}));cr.displayName=_e;var So=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:s,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,y=_.useRef(null),S=Y(t,y),N=or(o),[g,h]=ye({prop:l,defaultProp:i??null,onChange:u,caller:_e}),[w,p]=_.useState(!1),m=ee(c),v=ir(r),b=_.useRef(!1),[k,j]=_.useState(0);return _.useEffect(()=>{const T=y.current;if(T)return T.addEventListener(Je,m),()=>T.removeEventListener(Je,m)},[m]),n.jsx(wo,{scope:r,orientation:s,dir:N,loop:a,currentTabStopId:g,onItemFocus:_.useCallback(T=>h(T),[h]),onItemShiftTab:_.useCallback(()=>p(!0),[]),onFocusableItemAdd:_.useCallback(()=>j(T=>T+1),[]),onFocusableItemRemove:_.useCallback(()=>j(T=>T-1),[]),children:n.jsx(G.div,{tabIndex:w||k===0?-1:0,"data-orientation":s,...f,ref:S,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{b.current=!0}),onFocus:W(e.onFocus,T=>{const E=!b.current;if(T.target===T.currentTarget&&E&&!w){const R=new CustomEvent(Je,bo);if(T.currentTarget.dispatchEvent(R),!R.defaultPrevented){const A=v().filter(U=>U.focusable),F=A.find(U=>U.active),O=A.find(U=>U.id===g),H=[F,O,...A].filter(Boolean).map(U=>U.ref.current);pr(H,d)}}b.current=!1}),onBlur:W(e.onBlur,()=>p(!1))})})}),ur="RovingFocusGroupItem",dr=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:s=!0,active:a=!1,tabStopId:o,children:l,...i}=e,u=he(),c=o||u,d=ko(ur,r),f=d.currentTabStopId===c,y=ir(r),{onFocusableItemAdd:S,onFocusableItemRemove:N,currentTabStopId:g}=d;return _.useEffect(()=>{if(s)return S(),()=>N()},[s,S,N]),n.jsx(it.ItemSlot,{scope:r,id:c,focusable:s,active:a,children:n.jsx(G.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:W(e.onMouseDown,h=>{s?d.onItemFocus(c):h.preventDefault()}),onFocus:W(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:W(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const w=Eo(h,d.orientation,d.dir);if(w!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let m=y().filter(v=>v.focusable).map(v=>v.ref.current);if(w==="last")m.reverse();else if(w==="prev"||w==="next"){w==="prev"&&m.reverse();const v=m.indexOf(h.currentTarget);m=d.loop?Co(m,v+1):m.slice(v+1)}setTimeout(()=>pr(m))}}),children:typeof l=="function"?l({isCurrentTabStop:f,hasTabStop:g!=null}):l})})});dr.displayName=ur;var No={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jo(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Eo(e,t,r){const s=jo(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return No[s]}function pr(e,t=!1){const r=document.activeElement;for(const s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}function Co(e,t){return e.map((r,s)=>e[(t+s)%e.length])}var To=cr,Ao=dr,ze="Tabs",[Ro]=ve(ze,[lr]),fr=lr(),[Po,Nt]=Ro(ze),vr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:i,activationMode:u="automatic",...c}=e,d=or(i),[f,y]=ye({prop:s,onChange:a,defaultProp:o??"",caller:ze});return n.jsx(Po,{scope:r,baseId:he(),value:f,onValueChange:y,orientation:l,dir:d,activationMode:u,children:n.jsx(G.div,{dir:d,"data-orientation":l,...c,ref:t})})});vr.displayName=ze;var mr="TabsList",hr=_.forwardRef((e,t)=>{const{__scopeTabs:r,loop:s=!0,...a}=e,o=Nt(mr,r),l=fr(r);return n.jsx(To,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:s,children:n.jsx(G.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});hr.displayName=mr;var xr="TabsTrigger",gr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,disabled:a=!1,...o}=e,l=Nt(xr,r),i=fr(r),u=_r(l.baseId,s),c=wr(l.baseId,s),d=s===l.value;return n.jsx(Ao,{asChild:!0,...i,focusable:!a,active:d,children:n.jsx(G.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:u,...o,ref:t,onMouseDown:W(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?l.onValueChange(s):f.preventDefault()}),onKeyDown:W(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&l.onValueChange(s)}),onFocus:W(e.onFocus,()=>{const f=l.activationMode!=="manual";!d&&!a&&f&&l.onValueChange(s)})})})});gr.displayName=xr;var br="TabsContent",yr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,forceMount:a,children:o,...l}=e,i=Nt(br,r),u=_r(i.baseId,s),c=wr(i.baseId,s),d=s===i.value,f=_.useRef(d);return _.useEffect(()=>{const y=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(y)},[]),n.jsx(me,{present:a||d,children:({present:y})=>n.jsx(G.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!y,id:c,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:y&&o})})});yr.displayName=br;function _r(e,t){return`${e}-trigger-${t}`}function wr(e,t){return`${e}-content-${t}`}var Fo=vr,Do=hr,Lo=gr,Io=yr;const Mo=Fo,Oo=x.forwardRef(function({className:t,...r},s){return n.jsx(Do,{ref:s,className:C("vx-tabs__list",t),...r})}),$o=x.forwardRef(function({className:t,...r},s){return n.jsx(Lo,{ref:s,className:C("vx-tabs__trigger",t),...r})}),Bo=x.forwardRef(function({className:t,...r},s){return n.jsx(Io,{ref:s,className:C("vx-tabs__content",t),...r})}),kr={light:{label:"Light",mode:"light"},dark:{label:"Dark",mode:"dark"}};function X(e,t={}){return{label:t.label,mode:e,tokens:t.tokens}}const zo={...kr,sunset:X("light",{label:"Sunset",tokens:{"--vx-primary":"#c2410c","--vx-primary-strong":"#9a3412","--vx-primary-soft":"rgba(194, 65, 12, 0.12)","--vx-secondary":"#9a3412","--vx-bg":"#fff7ed","--vx-bg-accent":"#ffedd5","--vx-surface-hover":"#fffaf5","--vx-border":"#fed7aa","--vx-border-strong":"#fdba74","--vx-text":"#431407","--vx-text-secondary":"#9a3412","--vx-text-muted":"#b45309","--vx-shadow-sm":"0 1px 2px rgba(124, 45, 18, 0.08)","--vx-shadow":"0 14px 32px rgba(124, 45, 18, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(124, 45, 18, 0.12)"}}),mint:X("light",{label:"Mint",tokens:{"--vx-primary":"#0f766e","--vx-primary-strong":"#115e59","--vx-primary-soft":"rgba(15, 118, 110, 0.12)","--vx-secondary":"#0f766e","--vx-bg":"#f0fdfa","--vx-bg-accent":"#ccfbf1","--vx-surface-hover":"#f6fffd","--vx-border":"#99f6e4","--vx-border-strong":"#5eead4","--vx-text":"#042f2e","--vx-text-secondary":"#115e59","--vx-text-muted":"#0f766e","--vx-shadow-sm":"0 1px 2px rgba(4, 47, 46, 0.08)","--vx-shadow":"0 14px 32px rgba(4, 47, 46, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(4, 47, 46, 0.12)"}}),graphite:X("dark",{label:"Graphite",tokens:{"--vx-primary":"#f59e0b","--vx-primary-strong":"#d97706","--vx-primary-soft":"rgba(245, 158, 11, 0.16)","--vx-bg":"#111111","--vx-bg-accent":"#191919","--vx-surface":"#18181b","--vx-surface-strong":"#111111","--vx-surface-hover":"#222225","--vx-border":"rgba(244, 244, 245, 0.10)","--vx-border-strong":"rgba(244, 244, 245, 0.18)","--vx-text":"#fafafa","--vx-text-secondary":"#d4d4d8","--vx-text-muted":"#a1a1aa","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.34)","--vx-shadow":"0 20px 44px rgba(0, 0, 0, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.38)"}}),"ivory-gold":X("light",{label:"Ivory Gold",tokens:{"--vx-primary":"#a0742a","--vx-primary-strong":"#7d5a1e","--vx-primary-soft":"rgba(160, 116, 42, 0.12)","--vx-bg":"#faf6ee","--vx-bg-accent":"#f2ead8","--vx-surface":"#ffffff","--vx-surface-strong":"#faf6ee","--vx-surface-hover":"#f6f0e4","--vx-border":"rgba(160, 116, 42, 0.18)","--vx-border-strong":"rgba(160, 116, 42, 0.38)","--vx-text":"#1c1409","--vx-text-secondary":"#5a4320","--vx-text-muted":"#9a7c4a","--vx-shadow-sm":"0 1px 2px rgba(90, 67, 32, 0.08)","--vx-shadow":"0 12px 32px rgba(90, 67, 32, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(90, 67, 32, 0.14)","--vx-success":"#1a9e6e","--vx-warning":"#c4820a","--vx-danger":"#d63b3b"}}),"black-gold":X("dark",{label:"Black Gold",tokens:{"--vx-primary":"#c8a97c","--vx-primary-strong":"#9a7545","--vx-primary-soft":"rgba(200, 169, 124, 0.16)","--vx-bg":"#05070b","--vx-bg-accent":"#0a0d14","--vx-surface":"rgba(15, 18, 25, 0.76)","--vx-surface-strong":"rgba(18, 21, 29, 0.9)","--vx-surface-hover":"rgba(245, 233, 215, 0.1)","--vx-border":"rgba(245, 233, 215, 0.12)","--vx-border-strong":"rgba(200, 169, 124, 0.42)","--vx-text":"#f5e9d7","--vx-text-secondary":"#d7c8b2","--vx-text-muted":"#928a81","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.4)","--vx-shadow":"0 0 42px rgba(200, 169, 124, 0.16)","--vx-shadow-lg":"0 34px 120px rgba(0, 0, 0, 0.62)","--vx-success":"#32d49a","--vx-warning":"#e6ad64","--vx-danger":"#ef6a64"}}),ocean:X("dark",{label:"Ocean",tokens:{"--vx-primary":"#38bdf8","--vx-primary-strong":"#0ea5e9","--vx-primary-soft":"rgba(56, 189, 248, 0.16)","--vx-bg":"#06131f","--vx-bg-accent":"#0b1a2b","--vx-surface":"#0d2236","--vx-surface-strong":"#06131f","--vx-surface-hover":"#13314d","--vx-border":"rgba(125, 211, 252, 0.16)","--vx-border-strong":"rgba(56, 189, 248, 0.24)","--vx-text":"#e0f2fe","--vx-text-secondary":"#bae6fd","--vx-text-muted":"#7dd3fc","--vx-shadow-sm":"0 1px 2px rgba(2, 6, 23, 0.34)","--vx-shadow":"0 20px 44px rgba(2, 6, 23, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(2, 6, 23, 0.4)"}}),indigo:X("light",{label:"Indigo",tokens:{"--vx-primary":"#5c5fe8","--vx-primary-strong":"#4f52d4","--vx-primary-soft":"rgba(92, 95, 232, 0.10)","--vx-secondary":"#818cf8","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#5c5fe8","--vx-bg":"#e8ecf6","--vx-bg-accent":"#dde3f0","--vx-surface":"#ffffff","--vx-surface-strong":"#f8f9ff","--vx-surface-hover":"#f4f5ff","--vx-border":"#d4daf0","--vx-border-strong":"#bfc8e8","--vx-text":"#1a2336","--vx-text-secondary":"#4a5572","--vx-text-muted":"#8b96b4","--vx-shadow-sm":"0 1px 3px rgba(28, 40, 80, 0.08)","--vx-shadow":"0 8px 28px rgba(28, 40, 80, 0.10)","--vx-shadow-lg":"0 24px 60px rgba(28, 40, 80, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #f8f9ff 93%, transparent)","--vx-glass-border":"rgba(92, 95, 232, 0.18)","--vx-glass-shadow":"0 16px 44px rgba(28, 40, 80, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.70)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"22px"}}),violet:X("light",{label:"Violet",tokens:{"--vx-primary":"#7c3aed","--vx-primary-strong":"#6d28d9","--vx-primary-soft":"rgba(124, 58, 237, 0.10)","--vx-secondary":"#8b5cf6","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#6d28d9","--vx-bg":"#f8f7ff","--vx-bg-accent":"#ede9fe","--vx-surface":"#ffffff","--vx-surface-strong":"#faf9ff","--vx-surface-hover":"#f5f3ff","--vx-border":"#e4dfff","--vx-border-strong":"#c9bffd","--vx-text":"#1e1b2e","--vx-text-secondary":"#6e6a8a","--vx-text-muted":"#a89fc8","--vx-shadow-sm":"0 1px 3px rgba(109, 40, 217, 0.07)","--vx-shadow":"0 12px 32px rgba(109, 40, 217, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(109, 40, 217, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 84%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #faf9ff 92%, transparent)","--vx-glass-border":"rgba(196, 181, 253, 0.55)","--vx-glass-shadow":"0 18px 48px rgba(109, 40, 217, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.60)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),"violet-dark":X("dark",{label:"Violet Dark",tokens:{"--vx-primary":"#a78bfa","--vx-primary-strong":"#8b5cf6","--vx-primary-soft":"rgba(167, 139, 250, 0.16)","--vx-secondary":"#c4b5fd","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#c4b5fd","--vx-bg":"#0d0b1a","--vx-bg-accent":"#13102a","--vx-surface":"#1a1735","--vx-surface-strong":"#0d0b1a","--vx-surface-hover":"#1e1b3a","--vx-border":"rgba(167, 139, 250, 0.16)","--vx-border-strong":"rgba(167, 139, 250, 0.30)","--vx-text":"#f0eeff","--vx-text-secondary":"#c4b5fd","--vx-text-muted":"#8b7fc8","--vx-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.40)","--vx-shadow":"0 18px 44px rgba(0, 0, 0, 0.30)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.44)","--vx-glass-bg":"color-mix(in srgb, #1a1735 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #0d0b1a 94%, transparent)","--vx-glass-border":"rgba(167, 139, 250, 0.22)","--vx-glass-shadow":"0 22px 54px rgba(0, 0, 0, 0.50)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.07)","--vx-glass-scrim":"color-mix(in srgb, #04030d 62%, transparent)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),vxai:X("light",{label:"VXAI (Default)",tokens:{"--vx-primary":"#4f46e5","--vx-primary-strong":"#4338ca","--vx-primary-soft":"rgba(79, 70, 229, 0.1)","--vx-secondary":"#64748b","--vx-success":"#10b981","--vx-warning":"#f59e0b","--vx-danger":"#ef4444","--vx-info":"#4f46e5","--vx-bg":"#f8fafc","--vx-bg-accent":"#f1f5f9","--vx-surface":"#ffffff","--vx-surface-strong":"#f8fafc","--vx-surface-hover":"#f1f5f9","--vx-border":"#e2e8f0","--vx-border-strong":"#cbd5e1","--vx-text":"#0f172a","--vx-text-secondary":"#334155","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)","--vx-glass-bg":"rgba(255, 255, 255, 0.8)","--vx-glass-bg-strong":"rgba(255, 255, 255, 0.95)","--vx-glass-border":"#e2e8f0","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}}),"vxai-dark":X("dark",{label:"VXAI Dark",tokens:{"--vx-primary":"#6366f1","--vx-primary-strong":"#4f46e5","--vx-primary-soft":"rgba(99, 102, 241, 0.16)","--vx-secondary":"#cbd5e1","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#6366f1","--vx-bg":"#020617","--vx-bg-accent":"#0f172a","--vx-surface":"#0f172a","--vx-surface-strong":"#020617","--vx-surface-hover":"#1e293b","--vx-border":"oklch(27.8% 0.033 256.848)","--vx-border-strong":"#334155","--vx-text":"oklch(96.8% 0.007 247.896)","--vx-text-secondary":"#94a3b8","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.4)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4)","--vx-glass-bg":"rgba(15, 23, 42, 0.7)","--vx-glass-bg-strong":"rgba(15, 23, 42, 0.95)","--vx-glass-border":"oklch(27.8% 0.033 256.848)","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}})};function Ho(e){return{...kr,...e}}function Uo(e,t){if(e&&t[e])return e;if(t.light)return"light";const[r]=Object.keys(t);return r??"light"}function Wo(e,t){const r=window.localStorage.getItem(e);return r&&t[r]?r:null}function Go(e,t,r){var a;if(((a=e[r])==null?void 0:a.mode)===t)return r;const s=Object.entries(e).find(([,o])=>o.mode===t);return s==null?void 0:s[0]}const Sr=x.createContext(null);function Ko({children:e,defaultTheme:t="light",storageKey:r="vxui-react-theme",themes:s}){const a=x.useMemo(()=>Ho(s),[s]),o=x.useMemo(()=>Uo(t,a),[t,a]),l=x.useRef([]),[i,u]=x.useState(()=>typeof window>"u"?o:Wo(r,a)??o),c=a[i]?i:o,d=a[c];x.useEffect(()=>{i!==c&&u(c)},[c,i]),x.useEffect(()=>{const y=document.documentElement;for(const N of l.current)y.style.removeProperty(N);y.dataset.theme=d.mode,y.dataset.themeName=c;const S=Object.entries(d.tokens??{}).filter(N=>typeof N[1]=="string"&&N[1].length>0);for(const[N,g]of S)y.style.setProperty(N,g);l.current=S.map(([N])=>N),window.localStorage.setItem(r,c)},[d,c,r]);const f=x.useMemo(()=>({theme:c,mode:d.mode,themes:a,setTheme:y=>{u(a[y]?y:o)},toggleTheme:()=>{u(y=>{const N=(a[y]??d).mode==="light"?"dark":"light";return Go(a,N,N)??y})}}),[d,o,a,c]);return n.jsx(Sr.Provider,{value:f,children:e})}function Vo(){const e=x.useContext(Sr);if(!e)throw new Error("useTheme must be used within ThemeProvider.");return e}var qo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Yo="VisuallyHidden",jt=_.forwardRef((e,t)=>n.jsx(G.span,{...e,ref:t,style:{...qo,...e.style}}));jt.displayName=Yo;var Et="ToastProvider",[Ct,Xo,Zo]=ar("Toast"),[Nr]=ve("Toast",[Zo]),[Qo,He]=Nr(Et),jr=e=>{const{__scopeToast:t,label:r="Notification",duration:s=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:l}=e,[i,u]=_.useState(null),[c,d]=_.useState(0),f=_.useRef(!1),y=_.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Et}\`. Expected non-empty \`string\`.`),n.jsx(Ct.Provider,{scope:t,children:n.jsx(Qo,{scope:t,label:r,duration:s,swipeDirection:a,swipeThreshold:o,toastCount:c,viewport:i,onViewportChange:u,onToastAdd:_.useCallback(()=>d(S=>S+1),[]),onToastRemove:_.useCallback(()=>d(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:y,children:l})})};jr.displayName=Et;var Er="ToastViewport",Jo=["F8"],lt="toast.viewportPause",ct="toast.viewportResume",Cr=_.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:s=Jo,label:a="Notifications ({hotkey})",...o}=e,l=He(Er,r),i=Xo(r),u=_.useRef(null),c=_.useRef(null),d=_.useRef(null),f=_.useRef(null),y=Y(t,f,l.onViewportChange),S=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=l.toastCount>0;_.useEffect(()=>{const h=w=>{var m;s.length!==0&&s.every(v=>w[v]||w.code===v)&&((m=f.current)==null||m.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s]),_.useEffect(()=>{const h=u.current,w=f.current;if(N&&h&&w){const p=()=>{if(!l.isClosePausedRef.current){const k=new CustomEvent(lt);w.dispatchEvent(k),l.isClosePausedRef.current=!0}},m=()=>{if(l.isClosePausedRef.current){const k=new CustomEvent(ct);w.dispatchEvent(k),l.isClosePausedRef.current=!1}},v=k=>{!h.contains(k.relatedTarget)&&m()},b=()=>{h.contains(document.activeElement)||m()};return h.addEventListener("focusin",p),h.addEventListener("focusout",v),h.addEventListener("pointermove",p),h.addEventListener("pointerleave",b),window.addEventListener("blur",p),window.addEventListener("focus",m),()=>{h.removeEventListener("focusin",p),h.removeEventListener("focusout",v),h.removeEventListener("pointermove",p),h.removeEventListener("pointerleave",b),window.removeEventListener("blur",p),window.removeEventListener("focus",m)}}},[N,l.isClosePausedRef]);const g=_.useCallback(({tabbingDirection:h})=>{const p=i().map(m=>{const v=m.ref.current,b=[v,...fi(v)];return h==="forwards"?b:b.reverse()});return(h==="forwards"?p.reverse():p).flat()},[i]);return _.useEffect(()=>{const h=f.current;if(h){const w=p=>{var b,k,j;const m=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!m){const T=document.activeElement,E=p.shiftKey;if(p.target===h&&E){(b=c.current)==null||b.focus();return}const F=g({tabbingDirection:E?"backwards":"forwards"}),O=F.findIndex(D=>D===T);et(F.slice(O+1))?p.preventDefault():E?(k=c.current)==null||k.focus():(j=d.current)==null||j.focus()}};return h.addEventListener("keydown",w),()=>h.removeEventListener("keydown",w)}},[i,g]),n.jsxs(Xs,{ref:u,role:"region","aria-label":a.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:N?void 0:"none"},children:[N&&n.jsx(ut,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});et(h)}}),n.jsx(Ct.Slot,{scope:r,children:n.jsx(G.ol,{tabIndex:-1,...o,ref:y})}),N&&n.jsx(ut,{ref:d,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});et(h)}})]})});Cr.displayName=Er;var Tr="ToastFocusProxy",ut=_.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:s,...a}=e,o=He(Tr,r);return n.jsx(jt,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var c;const i=l.relatedTarget;!((c=o.viewport)!=null&&c.contains(i))&&s()}})});ut.displayName=Tr;var we="Toast",ei="toast.swipeStart",ti="toast.swipeMove",ni="toast.swipeCancel",ri="toast.swipeEnd",Ar=_.forwardRef((e,t)=>{const{forceMount:r,open:s,defaultOpen:a,onOpenChange:o,...l}=e,[i,u]=ye({prop:s,defaultProp:a??!0,onChange:o,caller:we});return n.jsx(me,{present:r||i,children:n.jsx(oi,{open:i,...l,ref:t,onClose:()=>u(!1),onPause:ee(e.onPause),onResume:ee(e.onResume),onSwipeStart:W(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:W(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:W(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Ar.displayName=we;var[si,ai]=Nr(we,{onClose(){}}),oi=_.forwardRef((e,t)=>{const{__scopeToast:r,type:s="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:i,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:y,onSwipeEnd:S,...N}=e,g=He(we,r),[h,w]=_.useState(null),p=Y(t,D=>w(D)),m=_.useRef(null),v=_.useRef(null),b=a||g.duration,k=_.useRef(0),j=_.useRef(b),T=_.useRef(0),{onToastAdd:E,onToastRemove:R}=g,A=ee(()=>{var H;(h==null?void 0:h.contains(document.activeElement))&&((H=g.viewport)==null||H.focus()),l()}),F=_.useCallback(D=>{!D||D===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(A,D))},[A]);_.useEffect(()=>{const D=g.viewport;if(D){const H=()=>{F(j.current),c==null||c()},U=()=>{const V=new Date().getTime()-k.current;j.current=j.current-V,window.clearTimeout(T.current),u==null||u()};return D.addEventListener(lt,U),D.addEventListener(ct,H),()=>{D.removeEventListener(lt,U),D.removeEventListener(ct,H)}}},[g.viewport,b,u,c,F]),_.useEffect(()=>{o&&!g.isClosePausedRef.current&&F(b)},[o,b,g.isClosePausedRef,F]),_.useEffect(()=>(E(),()=>R()),[E,R]);const O=_.useMemo(()=>h?Ir(h):null,[h]);return g.viewport?n.jsxs(n.Fragment,{children:[O&&n.jsx(ii,{__scopeToast:r,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:O}),n.jsx(si,{scope:r,onClose:A,children:on.createPortal(n.jsx(Ct.ItemSlot,{scope:r,children:n.jsx(Ys,{asChild:!0,onEscapeKeyDown:W(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||A(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:n.jsx(G.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...N,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,D=>{D.key==="Escape"&&(i==null||i(D.nativeEvent),D.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:W(e.onPointerDown,D=>{D.button===0&&(m.current={x:D.clientX,y:D.clientY})}),onPointerMove:W(e.onPointerMove,D=>{if(!m.current)return;const H=D.clientX-m.current.x,U=D.clientY-m.current.y,V=!!v.current,L=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,$=L?I(0,H):0,P=L?0:I(0,U),M=D.pointerType==="touch"?10:2,B={x:$,y:P},z={originalEvent:D,delta:B};V?(v.current=B,Te(ti,f,z,{discrete:!1})):Vt(B,g.swipeDirection,M)?(v.current=B,Te(ei,d,z,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(H)>M||Math.abs(U)>M)&&(m.current=null)}),onPointerUp:W(e.onPointerUp,D=>{const H=v.current,U=D.target;if(U.hasPointerCapture(D.pointerId)&&U.releasePointerCapture(D.pointerId),v.current=null,m.current=null,H){const V=D.currentTarget,L={originalEvent:D,delta:H};Vt(H,g.swipeDirection,g.swipeThreshold)?Te(ri,S,L,{discrete:!0}):Te(ni,y,L,{discrete:!0}),V.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),ii=e=>{const{__scopeToast:t,children:r,...s}=e,a=He(we,t),[o,l]=_.useState(!1),[i,u]=_.useState(!1);return di(()=>l(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),i?null:n.jsx(vt,{asChild:!0,children:n.jsx(jt,{...s,children:o&&n.jsxs(n.Fragment,{children:[a.label," ",r]})})})},li="ToastTitle",Rr=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e;return n.jsx(G.div,{...s,ref:t})});Rr.displayName=li;var ci="ToastDescription",Pr=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e;return n.jsx(G.div,{...s,ref:t})});Pr.displayName=ci;var Fr="ToastAction",ui=_.forwardRef((e,t)=>{const{altText:r,...s}=e;return r.trim()?n.jsx(Lr,{altText:r,asChild:!0,children:n.jsx(Tt,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Fr}\`. Expected non-empty \`string\`.`),null)});ui.displayName=Fr;var Dr="ToastClose",Tt=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e,a=ai(Dr,r);return n.jsx(Lr,{asChild:!0,children:n.jsx(G.button,{type:"button",...s,ref:t,onClick:W(e.onClick,a.onClose)})})});Tt.displayName=Dr;var Lr=_.forwardRef((e,t)=>{const{__scopeToast:r,altText:s,...a}=e;return n.jsx(G.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...a,ref:t})});function Ir(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),pi(s)){const a=s.ariaHidden||s.hidden||s.style.display==="none",o=s.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=s.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...Ir(s))}}),t}function Te(e,t,r,{discrete:s}){const a=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?kn(a,o):a.dispatchEvent(o)}var Vt=(e,t,r=0)=>{const s=Math.abs(e.x),a=Math.abs(e.y),o=s>a;return t==="left"||t==="right"?o&&s>r:!o&&a>r};function di(e=()=>{}){const t=ee(e);ie(()=>{let r=0,s=0;return r=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(s)}},[t])}function pi(e){return e.nodeType===e.ELEMENT_NODE}function fi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function et(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var vi=jr,mi=Cr,hi=Ar,xi=Rr,gi=Pr,bi=Tt;const Mr=x.createContext(null);let yi=1;const _i={info:n.jsx(vs,{size:15}),success:n.jsx(os,{size:15}),warning:n.jsx(gs,{size:15}),danger:n.jsx(ss,{size:15})};function wi({children:e}){const[t,r]=x.useState([]),s=x.useMemo(()=>({push:a=>{r(o=>[...o,{id:yi+=1,tone:"info",...a}])}}),[]);return n.jsx(Mr.Provider,{value:s,children:n.jsxs(vi,{swipeDirection:"right",children:[e,t.map(a=>n.jsxs(hi,{className:C("vx-toast",`vx-toast--${a.tone??"info"}`),duration:4500,open:!0,onOpenChange:o=>{o||r(l=>l.filter(i=>i.id!==a.id))},children:[n.jsxs("div",{className:"vx-toast__content",children:[n.jsxs("div",{className:"vx-toast__header",children:[n.jsx("span",{className:"vx-toast__icon","aria-hidden":"true",children:_i[a.tone??"info"]}),n.jsx(xi,{className:"vx-toast__title",children:a.title})]}),a.description?n.jsx(gi,{className:"vx-toast__description",children:a.description}):null]}),n.jsx(bi,{className:"vx-toast__close","aria-label":"Dismiss notification",children:n.jsx(re,{size:14})})]},a.id)),n.jsx(mi,{className:"vx-toast__viewport"})]})})}function ki(){const e=x.useContext(Mr);if(!e)throw new Error("useToast must be used within ToastProvider.");return e}function Si({as:e="p",variant:t="default",size:r="base",weight:s="normal",truncate:a=!1,className:o,...l}){return n.jsx(e,{className:C("vx-text-component",`vx-text--${t}`,`vx-text-size--${r}`,`vx-text-weight--${s}`,a&&"vx-text--truncate",o),...l})}function Ni({as:e,level:t=2,variant:r="default",weight:s="bold",truncate:a=!1,className:o,...l}){const i=e||`h${t}`;return n.jsx(i,{className:C("vx-heading",`vx-heading--h${t}`,`vx-heading--${r}`,`vx-heading-weight--${s}`,a&&"vx-text--truncate",o),...l})}const ji=".vx-dialog__content",Ei="(max-width: 640px)";function se(e){const t=(e==null?void 0:e.closest(ji))??null,r=window.matchMedia(Ei).matches&&!t;return{dialogContent:t,shouldInline:r}}function Ci({options:e,value:t,defaultValue:r,onChange:s,placeholder:a="Select...",searchPlaceholder:o="Search...",label:l,hint:i,error:u,disabled:c,clearable:d=!1,emptyText:f="No results",searchable:y=!0,className:S}){const N=t!==void 0,[g,h]=x.useState(r),w=N?t:g,[p,m]=x.useState(!1),[v,b]=x.useState(""),k=x.useRef(null),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useId(),[A,F]=x.useState(null),O=x.useRef(null),D=e.find(I=>I.value===w),H=e.filter(I=>I.label.toLowerCase().includes(v.toLowerCase())),U=typeof y=="number"?e.length>y:y;x.useEffect(()=>{if(!p){b("");return}if(U){const I=setTimeout(()=>{var $;return($=E.current)==null?void 0:$.focus()},0);return()=>clearTimeout(I)}},[p,U]),x.useEffect(()=>{if(!p)return;const I=P=>{var z,K;const M=(z=k.current)==null?void 0:z.contains(P.target),B=(K=T.current)==null?void 0:K.contains(P.target);!M&&!B&&m(!1)},$=P=>{P.key==="Escape"&&(P.preventDefault(),m(!1))};return document.addEventListener("mousedown",I),document.addEventListener("touchstart",I,{passive:!0}),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("touchstart",I),document.removeEventListener("keydown",$)}},[p]),x.useEffect(()=>{const{shouldInline:I}=se(k.current);if(!(!p||!I))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[p]),x.useEffect(()=>{if(!p||!A)return;const I=O.current;if(I)return I.dataset.hasOpenPortal="1",()=>{delete I.dataset.hasOpenPortal}},[p,A]),x.useLayoutEffect(()=>{const{dialogContent:I,shouldInline:$}=se(k.current);if(!p||!j.current||$){F(null),O.current=null;return}O.current=I;const P=j.current.getBoundingClientRect(),M=window.innerHeight-P.bottom,B=P.top,z=M<280&&B>M?"up":"down";F(z==="down"?{top:P.bottom+4,left:P.left,width:P.width,direction:z}:{bottom:window.innerHeight-P.top+4,left:P.left,width:P.width,direction:z})},[p]),x.useEffect(()=>{if(!p||!A)return;const I=$=>{var P;(P=T.current)!=null&&P.contains($.target)||m(!1)};return window.addEventListener("scroll",I,{capture:!0,passive:!0}),window.addEventListener("resize",I),()=>{window.removeEventListener("scroll",I,{capture:!0}),window.removeEventListener("resize",I)}},[p,A]);const V=I=>{I.disabled||(N||h(I.value),s==null||s(I.value),m(!1))},L=I=>{I.stopPropagation(),N||h(void 0),s==null||s(void 0)};return n.jsxs("div",{ref:k,className:C("vx-select",p&&"vx-select--open",S),children:[l?n.jsx("span",{className:"vx-field-group__label",children:l}):null,n.jsxs("button",{ref:j,type:"button",className:C("vx-select__trigger",u&&"vx-select__trigger--invalid",c&&"vx-select__trigger--disabled"),onClick:()=>!c&&m(I=>!I),disabled:c,"aria-haspopup":"listbox","aria-expanded":p,"aria-controls":R,children:[n.jsx("span",{className:C("vx-select__value",!D&&"vx-select__value--placeholder"),children:(D==null?void 0:D.label)??a}),n.jsxs("span",{className:"vx-select__icons",children:[d&&D&&n.jsx("span",{className:"vx-select__clear",onClick:L,role:"button","aria-label":"Clear selection",children:n.jsx(re,{size:14})}),n.jsx(ge,{size:14,className:C("vx-select__chevron",p&&"vx-select__chevron--open")})]})]}),u?n.jsx("span",{className:"vx-field-group__error",children:u}):null,!u&&i?n.jsx("span",{className:"vx-field-group__hint",children:i}):null,p&&(()=>{const I=!!A,$=A?{top:A.top,bottom:A.bottom,left:A.left,width:A.width,pointerEvents:"auto"}:void 0,P=n.jsxs("div",{ref:T,className:C("vx-select__dropdown",(A==null?void 0:A.direction)==="up"&&"vx-select__dropdown--up",!!O.current&&"vx-select__dropdown--in-dialog"),style:$,children:[U&&n.jsx("div",{className:"vx-select__search-wrap",children:n.jsx("input",{ref:E,type:"text",className:"vx-select__search",placeholder:o,value:v,onChange:M=>b(M.target.value),"aria-label":o})}),n.jsx("ul",{id:R,className:"vx-select__list",role:"listbox","aria-label":l??"Options",children:H.length===0?n.jsx("li",{className:"vx-select__empty",children:f}):H.map(M=>n.jsxs("li",{className:C("vx-select__option",M.value===w&&"vx-select__option--selected",M.disabled&&"vx-select__option--disabled"),role:"option","aria-selected":M.value===w,"aria-disabled":M.disabled,onClick:()=>V(M),children:[n.jsx("span",{children:M.label}),M.value===w?n.jsx(Me,{size:14}):null]},M.value))})]});return I?ce.createPortal(P,document.body):P})()]})}function Ti({className:e,label:t,description:r,indeterminate:s,...a}){return n.jsxs("label",{className:C("vx-checkbox",a.disabled&&"vx-checkbox--disabled"),children:[n.jsxs("span",{className:"vx-checkbox__control-wrap",children:[n.jsx("input",{type:"checkbox",className:C("vx-checkbox__input",e),ref:o=>{o&&(o.indeterminate=s??!1)},...a}),n.jsx("span",{className:"vx-checkbox__box","aria-hidden":"true",children:s?n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:n.jsx("path",{d:"M2 5h6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:n.jsx("path",{d:"M2 5l2.5 2.5L8 3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t?n.jsxs("span",{className:"vx-checkbox__copy",children:[n.jsx("span",{className:"vx-checkbox__label",children:t}),r?n.jsx("span",{className:"vx-checkbox__description",children:r}):null]}):null]})}function Ai({options:e,value:t,defaultValue:r,onChange:s,className:a,fullWidth:o,size:l="md"}){var h;const[i,u]=x.useState(r??((h=e[0])==null?void 0:h.value)),c=t!==void 0,d=c?t:i,[f,y]=x.useState({left:0,width:0,opacity:0}),S=x.useRef(null),N=x.useRef({});x.useEffect(()=>{requestAnimationFrame(()=>{const w=N.current[d];w&&y({left:w.offsetLeft,width:w.offsetWidth,opacity:1})})},[d,e,o,l]);const g=w=>{c||u(w),s==null||s(w)};return n.jsxs("div",{ref:S,className:C("vx-segmented-control",`vx-segmented-control--${l}`,o&&"vx-segmented-control--full",a),children:[n.jsx("div",{className:"vx-segmented-control__slider",style:{transform:`translateX(${f.left}px)`,width:`${f.width}px`,opacity:f.opacity}}),e.map(w=>{const p=d===w.value;return n.jsx("button",{ref:m=>{N.current[w.value]=m},type:"button",role:"radio","aria-checked":p,disabled:w.disabled,onClick:()=>!w.disabled&&g(w.value),className:C("vx-segmented-control__item",p&&"vx-segmented-control__item--active"),children:w.label},w.value)})]})}function Ri({className:e,label:t,description:r,...s}){return n.jsxs("label",{className:C("vx-radio",s.disabled&&"vx-radio--disabled"),children:[n.jsxs("span",{className:"vx-radio__control-wrap",children:[n.jsx("input",{type:"radio",className:C("vx-radio__input",e),...s}),n.jsx("span",{className:"vx-radio__circle","aria-hidden":"true",children:n.jsx("span",{className:"vx-radio__dot"})})]}),t?n.jsxs("span",{className:"vx-radio__copy",children:[n.jsx("span",{className:"vx-radio__label",children:t}),r?n.jsx("span",{className:"vx-radio__description",children:r}):null]}):null]})}function Pi({label:e,children:t,className:r}){return n.jsxs("fieldset",{className:C("vx-radio-group",r),children:[e?n.jsx("legend",{className:"vx-field-group__label",children:e}):null,n.jsx("div",{className:"vx-radio-group__items",children:t})]})}function Fi({className:e,label:t,hint:r,resize:s="vertical",style:a,...o}){return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsx("textarea",{className:C("vx-textarea",e),style:{resize:s,...a},...o}),r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function Di({className:e,label:t,showValue:r=!1,hint:s,value:a,defaultValue:o,...l}){const i=a??o??"";return n.jsxs("label",{className:"vx-field-group",children:[t||r?n.jsxs("span",{className:"vx-slider__header",children:[t?n.jsx("span",{className:"vx-field-group__label vx-slider__label",children:t}):null,r?n.jsx("span",{className:"vx-slider__value",children:i}):null]}):null,n.jsx("input",{type:"range",className:C("vx-slider",e),value:a,defaultValue:o,...l}),s?n.jsx("span",{className:"vx-field-group__hint",children:s}):null]})}const Li={sm:16,md:24,lg:36};function Ii({className:e,size:t="md",label:r="Loading…",...s}){const a=Li[t];return n.jsx("span",{role:"status","aria-label":r,className:C("vx-spinner",`vx-spinner--${t}`,e),...s,children:n.jsx("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:n.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42 14"})})})}function Mi({className:e,value:t=0,max:r=100,label:s,showLabel:a=!1,size:o="md",variant:l="default",indeterminate:i=!1,...u}){const c=i?void 0:Math.min(100,Math.max(0,t/r*100));return n.jsxs("div",{className:C("vx-progress-wrap",e),...u,children:[s||a?n.jsxs("div",{className:"vx-progress__header",children:[s?n.jsx("span",{className:"vx-progress__label",children:s}):null,a&&!i?n.jsxs("span",{className:"vx-progress__value",children:[Math.round(c),"%"]}):null]}):null,n.jsx("div",{role:"progressbar","aria-valuenow":i?void 0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":s,className:C("vx-progress",`vx-progress--${o}`,`vx-progress--${l}`,i&&"vx-progress--indeterminate"),children:n.jsx("div",{className:"vx-progress__bar",style:i?void 0:{width:`${c}%`}})})]})}const Oi={info:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M8 7v4M8 5.5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),success:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M5 8.5l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),warning:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("path",{d:"M8 2L14.5 13.5H1.5L8 2z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),n.jsx("path",{d:"M8 6.5v3M8 11v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),danger:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M10 6L6 10M6 6l4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};function $i({className:e,variant:t="info",title:r,icon:s,onClose:a,children:o,...l}){return n.jsxs("div",{role:"alert",className:C("vx-alert",`vx-alert--${t}`,e),...l,children:[n.jsx("span",{className:"vx-alert__icon",children:s??Oi[t]}),n.jsxs("div",{className:"vx-alert__body",children:[r?n.jsx("p",{className:"vx-alert__title",children:r}):null,o?n.jsx("div",{className:"vx-alert__content",children:o}):null]}),a?n.jsx("button",{type:"button",className:"vx-alert__close",onClick:a,"aria-label":"关闭",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):null]})}function Bi({className:e,width:t,height:r,variant:s="rect",lines:a=1,style:o,...l}){return s==="text"&&a>1?n.jsx("span",{className:C("vx-skeleton-text",e),...l,children:Array.from({length:a}).map((i,u)=>n.jsx("span",{className:"vx-skeleton vx-skeleton--text",style:u===a-1?{width:"70%"}:void 0},u))}):n.jsx("span",{className:C("vx-skeleton",`vx-skeleton--${s}`,e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r,...o},...l})}function zi({content:e,placement:t="top",delay:r=600,children:s,className:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useCallback(()=>{i.current=setTimeout(()=>l(!0),r)},[r]),c=x.useCallback(()=>{i.current&&clearTimeout(i.current),l(!1)},[]);return x.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),n.jsxs("span",{className:C("vx-tooltip-wrap",a),onMouseEnter:u,onMouseLeave:c,onFocus:u,onBlur:c,children:[s,o?n.jsx("span",{role:"tooltip",className:C("vx-tooltip",`vx-tooltip--${t}`),children:e}):null]})}function Hi({content:e,placement:t="bottom",trigger:r="click",children:s,className:a,open:o,onOpenChange:l}){const[i,u]=x.useState(!1),c=o!==void 0,d=c?o:i,f=x.useRef(null),y=x.useCallback(g=>{c||u(g),l==null||l(g)},[c,l]),S=x.useCallback(()=>y(!d),[d,y]);x.useEffect(()=>{if(!d)return;const g=w=>{w.key==="Escape"&&y(!1)},h=w=>{f.current&&!f.current.contains(w.target)&&y(!1)};return document.addEventListener("keydown",g),document.addEventListener("mousedown",h),()=>{document.removeEventListener("keydown",g),document.removeEventListener("mousedown",h)}},[d,y]);const N=r==="click"?{onClick:S}:{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1)};return n.jsxs("div",{ref:f,className:C("vx-popover-wrap",a),...N,children:[s,d?n.jsx("div",{className:C("vx-popover",`vx-popover--${t}`),role:"dialog",children:e}):null]})}function Ui({trigger:e,groups:t,items:r,align:s="left",className:a,open:o,onOpenChange:l}){const[i,u]=x.useState(!1),c=o!==void 0,d=c?o:i,f=x.useRef(null),y=x.useRef(null),[S,N]=x.useState(s);x.useLayoutEffect(()=>{d&&N(s)},[d,s]),x.useLayoutEffect(()=>{if(!d||!y.current)return;const p=y.current.getBoundingClientRect(),m=8;S==="left"&&p.right>window.innerWidth-m?N("right"):S==="right"&&p.left<m&&N("left")},[d,S]);const g=x.useCallback(p=>{c||u(p),l==null||l(p)},[c,l]),h=x.useCallback(()=>g(!d),[d,g]);x.useEffect(()=>{if(!d)return;const p=v=>{v.key==="Escape"&&g(!1)},m=v=>{f.current&&!f.current.contains(v.target)&&g(!1)};return document.addEventListener("keydown",p),document.addEventListener("mousedown",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("mousedown",m)}},[d,g]);const w=t??(r?[{items:r}]:[]);return n.jsxs("div",{ref:f,className:C("vx-dropdown",d&&"vx-dropdown--open",a),children:[n.jsx("div",{className:"vx-dropdown__trigger",onClick:h,role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&h()},children:e}),d?n.jsx("div",{ref:y,className:C("vx-dropdown__menu",`vx-dropdown__menu--${S}`),role:"menu",children:w.map((p,m)=>n.jsxs("div",{className:"vx-dropdown__group",children:[p.label?n.jsx("div",{className:"vx-dropdown__group-label",children:p.label}):null,m>0&&!p.label?n.jsx("div",{className:"vx-dropdown__separator",role:"separator"}):null,p.items.map((v,b)=>n.jsxs("button",{role:"menuitem",disabled:v.disabled,className:C("vx-dropdown__item",v.danger&&"vx-dropdown__item--danger",v.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var k;v.disabled||((k=v.onClick)==null||k.call(v),g(!1))},children:[v.icon?n.jsx("span",{className:"vx-dropdown__item-icon",children:v.icon}):null,n.jsx("span",{className:"vx-dropdown__item-label",children:v.label}),v.shortcut?n.jsx("kbd",{className:"vx-dropdown__shortcut",children:v.shortcut}):null]},b))]},m))}):null]})}const Wi=()=>n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M4.5 2.5L7.5 6l-3 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Gi({items:e,separator:t,className:r}){return n.jsx("nav",{"aria-label":"Breadcrumb",className:C("vx-breadcrumb",r),children:n.jsx("ol",{className:"vx-breadcrumb__list",children:e.map((s,a)=>{const o=a===e.length-1;return n.jsxs("li",{className:"vx-breadcrumb__item",children:[o?n.jsx("span",{className:"vx-breadcrumb__current","aria-current":"page",children:s.label}):s.href?n.jsx("a",{href:s.href,className:"vx-breadcrumb__link",children:s.label}):n.jsx("button",{type:"button",className:"vx-breadcrumb__link",onClick:s.onClick,children:s.label}),o?null:n.jsx("span",{className:"vx-breadcrumb__sep","aria-hidden":"true",children:t??n.jsx(Wi,{})})]},a)})})})}function Ae(e,t){return Array.from({length:t-e+1},(r,s)=>e+s)}function Ki({page:e,total:t,pageSize:r=10,siblingCount:s=1,onChange:a,className:o}){const l=Math.max(1,Math.ceil(t/r)),i=(()=>{const u=s*2+5;if(l<=u)return Ae(1,l);const c=Math.max(e-s,1),d=Math.min(e+s,l),f=c>3,y=d<l-2;return!f&&y?[...Ae(1,3+s*2),"…",l]:f&&!y?[1,"…",...Ae(l-(2+s*2),l)]:[1,"…",...Ae(c,d),"…",l]})();return n.jsxs("nav",{role:"navigation","aria-label":"Pagination",className:C("vx-pagination",o),children:[n.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--prev",disabled:e<=1,onClick:()=>a(e-1),"aria-label":"上一页",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),i.map((u,c)=>u==="…"?n.jsx("span",{className:"vx-pagination__ellipsis","aria-hidden":"true",children:"…"},`e-${c}`):n.jsx("button",{type:"button","aria-current":u===e?"page":void 0,className:C("vx-pagination__btn",u===e&&"vx-pagination__btn--active"),onClick:()=>a(u),children:u},u)),n.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--next",disabled:e>=l,onClick:()=>a(e+1),"aria-label":"下一页",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M5 11l4-4-4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function Vi({items:e,multiple:t=!1,defaultOpen:r=[],className:s}){const[a,o]=x.useState(new Set(r));function l(i){o(u=>{const c=new Set(t?u:[]);return u.has(i)?c.delete(i):c.add(i),c})}return n.jsx("div",{className:C("vx-accordion",s),children:e.map(i=>{const u=a.has(i.key);return n.jsxs("div",{className:C("vx-accordion__item",u&&"vx-accordion__item--open",i.disabled&&"vx-accordion__item--disabled"),children:[n.jsxs("button",{type:"button",disabled:i.disabled,"aria-expanded":u,className:"vx-accordion__trigger",onClick:()=>!i.disabled&&l(i.key),children:[n.jsx("span",{className:"vx-accordion__title",children:i.title}),n.jsx("span",{className:"vx-accordion__chevron","aria-hidden":"true",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:n.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),u?n.jsx("div",{className:"vx-accordion__content",children:i.content}):null]},i.key)})})}function qi({className:e,orientation:t="horizontal",decorative:r=!0,...s}){return n.jsx("hr",{role:r?"none":"separator","aria-orientation":r?void 0:t,className:C("vx-separator",`vx-separator--${t}`,e),...s})}function Yi(e){const t=e.trim().split(/\s+/);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}const qt=[0,30,60,120,160,200,240,270,300,340];function Xi(e){let t=0;for(let r=0;r<e.length;r++)t+=e.charCodeAt(r);return qt[t%qt.length]}function Zi({src:e,name:t,size:r="md",shape:s="circle",fallback:a,className:o,alt:l,...i}){const[u,c]=x.useState(!1),d=e&&!u,f=t??l??"",y=f?Xi(f):200;return n.jsx("span",{className:C("vx-avatar",`vx-avatar--${r}`,`vx-avatar--${s}`,o),"aria-label":f||void 0,style:d?void 0:{"--vx-avatar-hue":y},children:d?n.jsx("img",{src:e,alt:l??t??"",className:"vx-avatar__img",onError:()=>c(!0),...i}):a?n.jsx("span",{className:"vx-avatar__fallback",children:a}):f?n.jsx("span",{className:"vx-avatar__initials",children:Yi(f)}):n.jsxs("svg",{className:"vx-avatar__placeholder",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"12",cy:"8",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M4 20c0-4 3.58-7 8-7s8 3 8 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}function Qi({columns:e,data:t,size:r="md",striped:s=!1,hoverable:a=!0,bordered:o=!1,compact:l=!1,stickyHeader:i=!1,borderless:u=!1,headless:c=!1,rounded:d=!0,loading:f=!1,caption:y,emptyText:S="暂无数据",sortColumn:N,sortDirection:g,onSortChange:h,className:w,...p}){const m=l?"sm":r,[v,b]=x.useState(null),[k,j]=x.useState(null),T=N!==void 0,E=T?N:v,R=T?g??null:k,A=x.useCallback(F=>{let O;E!==F?O="asc":R==="asc"?O="desc":R==="desc"?O=null:O="asc",T||(b(O===null?null:F),j(O)),h==null||h(F,O)},[E,R,T,h]);return n.jsx("div",{className:C("vx-table-wrap",u&&"vx-table-wrap--borderless",!d&&"vx-table-wrap--square",w),...p,children:n.jsxs("table",{className:C("vx-table",s&&"vx-table--striped",a&&"vx-table--hoverable",o&&"vx-table--bordered",u&&"vx-table--borderless",m!=="md"&&`vx-table--${m}`,i&&"vx-table--sticky"),children:[y?n.jsx("caption",{className:"vx-table__caption",children:y}):null,c?null:n.jsx("thead",{children:n.jsx("tr",{children:e.map(F=>n.jsx("th",{className:C("vx-table__th",F.sortable&&"vx-table__th--sortable",F.align&&`vx-table__th--${F.align}`,F.className),style:{width:F.width},onClick:F.sortable?()=>A(F.key):void 0,"aria-sort":E===F.key?R==="asc"?"ascending":R==="desc"?"descending":"none":void 0,children:n.jsxs("span",{className:"vx-table__th-inner",children:[F.header,F.sortable?n.jsx("span",{className:"vx-table__sort-icon","aria-hidden":"true",children:E===F.key&&R==="asc"?"↑":E===F.key&&R==="desc"?"↓":"↕"}):null]})},F.key))})}),n.jsx("tbody",{className:C(f&&"vx-table__body--loading"),children:t.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:e.length,className:"vx-table__empty",children:S})}):t.map((F,O)=>n.jsx("tr",{className:"vx-table__row",children:e.map(D=>n.jsx("td",{className:C("vx-table__td",D.align&&`vx-table__td--${D.align}`,D.className),children:D.accessor(F)},D.key))},O))})]})})}function Ji({topBar:e,bottomNav:t,children:r,className:s}){return n.jsxs("div",{className:C("vxm-shell",s),children:[e&&n.jsx("div",{className:"vxm-shell__topbar",children:e}),n.jsx("main",{className:"vxm-shell__main",children:r}),t&&n.jsx("div",{className:"vxm-shell__bottomnav",children:t})]})}function el({title:e,leading:t,trailing:r,className:s}){return n.jsxs("div",{className:C("vxm-topbar",s),children:[n.jsx("div",{className:"vxm-topbar__leading",children:t}),n.jsx("div",{className:"vxm-topbar__title",children:e}),n.jsx("div",{className:"vxm-topbar__trailing",children:r})]})}function tl({label:e,className:t,children:r,...s}){return n.jsx("button",{type:"button",className:C("vxm-icon-btn",t),"aria-label":e,...s,children:r})}function nl({items:e,className:t}){const[r,s]=x.useState(null),a=r?e.find(l=>l.key===r):null,o=l=>{var i,u;(i=l.submenu)!=null&&i.length?s(c=>c===l.key?null:l.key):(s(null),(u=l.onSelect)==null||u.call(l))};return n.jsxs("div",{className:"vxm-bottomnav-wrap",children:[r&&(a==null?void 0:a.submenu)&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"vxm-bottomnav__scrim",onClick:()=>s(null),"aria-hidden":"true"}),n.jsx("div",{className:"vxm-bottomnav__submenu",role:"menu",children:a.submenu.map(l=>n.jsxs("button",{type:"button",role:"menuitem",className:"vxm-bottomnav__submenu-item",onClick:()=>{var i;(i=l.onSelect)==null||i.call(l),s(null)},children:[l.icon&&n.jsx("span",{className:"vxm-bottomnav__submenu-icon",children:l.icon}),n.jsx("span",{children:l.label})]},l.key))})]}),n.jsx("nav",{className:C("vxm-bottomnav",t),"aria-label":"底部导航",children:e.map(l=>{var i,u,c;return n.jsxs("button",{type:"button",className:C("vxm-bottomnav__item",l.active&&"vxm-bottomnav__item--active",((i=l.submenu)==null?void 0:i.length)&&r===l.key&&"vxm-bottomnav__item--submenu-open"),onClick:()=>o(l),"aria-current":l.active?"page":void 0,"aria-expanded":(u=l.submenu)!=null&&u.length?r===l.key:void 0,"aria-haspopup":(c=l.submenu)!=null&&c.length?"menu":void 0,children:[n.jsxs("span",{className:"vxm-bottomnav__icon",children:[l.icon,l.badge!=null&&n.jsx("span",{className:"vxm-bottomnav__badge","aria-label":`${l.badge} 条未读`,children:l.badge})]}),n.jsx("span",{className:"vxm-bottomnav__label",children:l.label})]},l.key)})})]})}function rl({open:e,onClose:t,title:r,description:s,children:a,className:o}){const l=x.useRef(null),i=x.useRef(0),[u,c]=x.useState(!1),[d,f]=x.useState(0),y=x.useRef(0);x.useEffect(()=>{e||(f(0),y.current=0)},[e]),x.useEffect(()=>{if(!e)return;const h=w=>{w.key==="Escape"&&t()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,t]),x.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]);const S=h=>{i.current=h.touches[0].clientY,y.current=0,c(!0)},N=h=>{const w=h.touches[0].clientY-i.current;w<0||(y.current=w,f(w))},g=()=>{c(!1);const h=l.current;if(!h)return;const w=h.offsetHeight*.32;y.current>w?t():f(0)};return e?n.jsx("div",{className:"vxm-actionsheet__overlay",onClick:t,role:"presentation","aria-hidden":"true",children:n.jsxs("div",{ref:l,className:C("vxm-actionsheet",o),style:{transform:`translateY(${d}px)`,transition:u?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onClick:h=>h.stopPropagation(),onTouchStart:S,onTouchMove:N,onTouchEnd:g,role:"dialog","aria-modal":!0,"aria-label":r??"Action sheet",children:[n.jsx("div",{className:"vxm-actionsheet__handle","aria-hidden":"true"}),(r||s)&&n.jsxs("div",{className:"vxm-actionsheet__header",children:[r&&n.jsx("h3",{className:"vxm-actionsheet__title",children:r}),s&&n.jsx("p",{className:"vxm-actionsheet__description",children:s})]}),n.jsx("div",{className:"vxm-actionsheet__body",children:a})]})}):null}function sl({icon:e,destructive:t,className:r,children:s,...a}){return n.jsxs("button",{type:"button",className:C("vxm-actionsheet-item",t&&"vxm-actionsheet-item--destructive",r),...a,children:[e&&n.jsx("span",{className:"vxm-actionsheet-item__icon",children:e}),s]})}function al({className:e,...t}){return n.jsx("ul",{className:C("vxm-list",e),role:"list",...t})}function ol({title:e,className:t,children:r,...s}){return n.jsxs("div",{className:C("vxm-list-section",t),...s,children:[e&&n.jsx("div",{className:"vxm-list-section__title",children:e}),r]})}function il({leading:e,trailing:t,label:r,description:s,chevron:a,destructive:o,disabled:l,onClick:i,className:u}){const c=n.jsxs(n.Fragment,{children:[e&&n.jsx("span",{className:"vxm-list-item__leading",children:e}),n.jsxs("span",{className:"vxm-list-item__content",children:[n.jsx("span",{className:"vxm-list-item__label",children:r}),s&&n.jsx("span",{className:"vxm-list-item__description",children:s})]}),t&&n.jsx("span",{className:"vxm-list-item__trailing",children:t}),a&&n.jsx(be,{size:16,className:"vxm-list-item__chevron","aria-hidden":"true"})]});return n.jsx("li",{className:C("vxm-list-item",o&&"vxm-list-item--destructive",l&&"vxm-list-item--disabled",!i&&"vxm-list-item--static",u),children:n.jsx("button",{type:"button",className:"vxm-list-item__btn",onClick:l?void 0:i,disabled:l,tabIndex:i?0:-1,children:c})})}function ll({open:e,onClose:t,width:r=280,header:s,footer:a,children:o,className:l}){const i=x.useRef(null),u=x.useRef(0),c=x.useRef(0),[d,f]=x.useState(!1),[y,S]=x.useState(0);x.useEffect(()=>{e||(S(0),c.current=0)},[e]),x.useEffect(()=>{if(!e)return;const m=v=>{v.key==="Escape"&&t()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t]),x.useEffect(()=>(document.body.style.overflow=e?"hidden":"",()=>{document.body.style.overflow=""}),[e]);const N=m=>{u.current=m.touches[0].clientX,c.current=0,f(!0)},g=m=>{const v=m.touches[0].clientX-u.current;v>0||(c.current=v,S(v))},h=()=>{f(!1),Math.abs(c.current)>r*.3?t():S(0)};if(!e)return null;const p=.52*Math.max(0,1+y/r);return n.jsxs("div",{className:"vxm-drawer__overlay",style:{"--vxm-overlay-opacity":p},children:[n.jsx("div",{className:"vxm-drawer__scrim",onClick:t,"aria-hidden":"true"}),n.jsxs("div",{ref:i,className:C("vxm-drawer",l),style:{width:r,transform:`translateX(${y}px)`,transition:d?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onTouchStart:N,onTouchMove:g,onTouchEnd:h,role:"dialog","aria-modal":!0,"aria-label":"Navigation drawer",children:[s&&n.jsx("div",{className:"vxm-drawer__header",children:s}),n.jsx("div",{className:"vxm-drawer__body",children:o}),a&&n.jsx("div",{className:"vxm-drawer__footer",children:a})]})]})}function cl({icon:e,label:t,badge:r,active:s,onClick:a}){return n.jsxs("button",{type:"button",className:C("vxm-drawer-item",s&&"vxm-drawer-item--active"),onClick:a,"aria-current":s?"page":void 0,children:[e&&n.jsx("span",{className:"vxm-drawer-item__icon",children:e}),n.jsx("span",{className:"vxm-drawer-item__label",children:t}),r!=null&&n.jsx("span",{className:"vxm-drawer-item__badge",children:r})]})}function ul({title:e,collapsible:t=!1,defaultOpen:r=!0,children:s}){const[a,o]=x.useState(r);return n.jsxs("div",{className:C("vxm-drawer-section",t&&"vxm-drawer-section--collapsible"),children:[e&&(t?n.jsxs("button",{type:"button",className:"vxm-drawer-section__header",onClick:()=>o(l=>!l),"aria-expanded":a,children:[n.jsx("span",{className:"vxm-drawer-section__title",children:e}),n.jsx(ge,{size:14,className:C("vxm-drawer-section__chevron",a&&"vxm-drawer-section__chevron--open")})]}):n.jsx("div",{className:"vxm-drawer-section__title",children:e})),n.jsx("div",{className:C("vxm-drawer-section__items-wrap",!a&&"vxm-drawer-section__items-wrap--closed"),children:n.jsx("div",{className:"vxm-drawer-section__items",children:s})})]})}const dl=x.forwardRef(function({className:t,required:r,children:s,...a},o){return n.jsxs("label",{ref:o,className:C("vx-label",t),...a,children:[s,r?n.jsx("span",{className:"vx-label__required","aria-hidden":"true",children:" *"}):null]})}),Or=x.createContext({});function $r(){return x.useContext(Or)}function pl({className:e,...t}){return n.jsx("form",{noValidate:!0,className:C("vx-form",e),...t})}function fl({error:e,children:t,className:r}){return n.jsx(Or.Provider,{value:{error:e},children:n.jsx("div",{className:C("vx-form-field",e&&"vx-form-field--invalid",r),children:t})})}function vl({className:e,required:t,children:r,...s}){return n.jsxs("label",{className:C("vx-form-label",e),...s,children:[r,t?n.jsx("span",{className:"vx-form-label__required","aria-hidden":"true",children:" *"}):null]})}function ml({className:e,children:t,...r}){return n.jsx("p",{className:C("vx-form-description",e),...r,children:t})}function hl({className:e,children:t,...r}){const{error:s}=$r(),a=s??t;return a?n.jsx("p",{className:C("vx-form-message",s&&"vx-form-message--error",e),...r,children:a}):null}function xl({trigger:e,title:t,description:r,confirmLabel:s="Confirm",cancelLabel:a="Cancel",onConfirm:o,onCancel:l,variant:i="default",className:u,...c}){return n.jsxs(gt,{...c,children:[n.jsx(bt,{asChild:!0,children:e}),n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-dialog__overlay"}),n.jsxs(wt,{className:C("vx-alert-dialog__content",u),role:"alertdialog","aria-modal":"true",children:[n.jsx(kt,{className:"vx-alert-dialog__title",children:t}),r?n.jsx(St,{className:"vx-alert-dialog__description",children:r}):null,n.jsxs("div",{className:"vx-alert-dialog__footer",children:[n.jsx(xe,{asChild:!0,children:n.jsx(oe,{variant:"secondary",onClick:l,children:a})}),n.jsx(xe,{asChild:!0,children:n.jsx(oe,{variant:i==="danger"?"danger":"solid",onClick:o,children:s})})]})]})]})]})}function gl({className:e,label:t,hint:r,error:s,value:a,onChange:o,min:l,max:i,step:u=1,disabled:c,...d}){const f=x.useCallback(w=>{let p=w;return l!==void 0&&(p=Math.max(l,p)),i!==void 0&&(p=Math.min(i,p)),p},[l,i]),y=()=>{c||o==null||o(f((a??0)+u))},S=()=>{c||o==null||o(f((a??0)-u))},N=w=>{const p=parseFloat(w.target.value);isNaN(p)||o==null||o(f(p))},g=l!==void 0&&(a??0)<=l,h=i!==void 0&&(a??0)>=i;return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsxs("span",{className:C("vx-number-input",s&&"vx-number-input--invalid",c&&"vx-number-input--disabled",e),children:[n.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:S,disabled:c||g,"aria-label":"Decrease",tabIndex:-1,children:n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),n.jsx("input",{type:"number",className:"vx-number-input__field",value:a??"",onChange:N,min:l,max:i,step:u,disabled:c,"aria-invalid":s?"true":void 0,...d}),n.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:y,disabled:c||h,"aria-label":"Increase",tabIndex:-1,children:n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M6 2v8M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),s?n.jsx("span",{className:"vx-field-group__error",children:s}):null,!s&&r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function bl(e,t){return new Date(e,t+1,0).getDate()}function yl(e,t){return new Date(e,t,1).getDay()}function Yt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Br({value:e,defaultValue:t,onChange:r,min:s,max:a,className:o,weekStartsOnMonday:l=!1}){const i=new Date,u=e!==void 0,[c,d]=x.useState(t),f=u?e:c,[y,S]=x.useState((f??i).getFullYear()),[N,g]=x.useState((f??i).getMonth()),h=bl(y,N),w=yl(y,N),p=l?w===0?6:w-1:w,m=l?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],v=()=>{N===0?(S(R=>R-1),g(11)):g(R=>R-1)},b=()=>{N===11?(S(R=>R+1),g(0)):g(R=>R+1)},k=x.useCallback(R=>{const A=new Date(y,N,R);if(s){const F=new Date(s.getFullYear(),s.getMonth(),s.getDate());if(A<F)return!0}if(a){const F=new Date(a.getFullYear(),a.getMonth(),a.getDate());if(A>F)return!0}return!1},[y,N,s,a]),j=R=>{if(k(R))return;const A=new Date(y,N,R);u||d(A),r==null||r(A)},T=new Date(y,N).toLocaleString("default",{month:"long"}),E=[...Array(p).fill(null),...Array.from({length:h},(R,A)=>A+1)];for(;E.length%7!==0;)E.push(null);return n.jsxs("div",{className:C("vx-calendar",o),children:[n.jsxs("div",{className:"vx-calendar__header",children:[n.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:v,"aria-label":"Previous month",children:n.jsx(un,{size:16})}),n.jsxs("span",{className:"vx-calendar__month-label",children:[T," ",y]}),n.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:b,"aria-label":"Next month",children:n.jsx(be,{size:16})})]}),n.jsxs("div",{className:"vx-calendar__grid",role:"grid","aria-label":`${T} ${y}`,children:[m.map(R=>n.jsx("div",{className:"vx-calendar__weekday",role:"columnheader",children:R},R)),E.map((R,A)=>{if(R===null)return n.jsx("div",{className:"vx-calendar__cell vx-calendar__cell--empty"},`e-${A}`);const F=new Date(y,N,R),O=Yt(F,i),D=f?Yt(F,f):!1,H=k(R);return n.jsx("button",{type:"button",role:"gridcell",className:C("vx-calendar__cell",O&&"vx-calendar__cell--today",D&&"vx-calendar__cell--selected",H&&"vx-calendar__cell--disabled"),onClick:()=>j(R),disabled:H,"aria-label":F.toLocaleDateString(),"aria-selected":D,children:R},R)})]})]})}function _l(e){return e.toLocaleDateString()}function wl(){return n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[n.jsx("rect",{x:"1",y:"3",width:"13",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M1 6.5h13",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M5 1v3M10 1v3",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function kl({value:e,defaultValue:t,onChange:r,placeholder:s="Select date",label:a,hint:o,error:l,min:i,max:u,disabled:c,weekStartsOnMonday:d,className:f}){const y=e!==void 0,[S,N]=x.useState(t),g=y?e:S,[h,w]=x.useState(!1),p=x.useRef(null),m=x.useRef(null),v=x.useRef(null),b=x.useRef(null),[k,j]=x.useState(null);x.useEffect(()=>{if(!h)return;const E=A=>{var D,H;const F=(D=p.current)==null?void 0:D.contains(A.target),O=(H=v.current)==null?void 0:H.contains(A.target);!F&&!O&&w(!1)},R=A=>{A.key==="Escape"&&(A.preventDefault(),w(!1))};return document.addEventListener("mousedown",E),document.addEventListener("touchstart",E,{passive:!0}),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("touchstart",E),document.removeEventListener("keydown",R)}},[h]),x.useEffect(()=>{const{shouldInline:E}=se(p.current);if(!(!h||!E))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[h]),x.useEffect(()=>{if(!h||!k)return;const E=b.current;if(E)return E.dataset.hasOpenPortal="1",()=>{delete E.dataset.hasOpenPortal}},[h,k]),x.useLayoutEffect(()=>{const{dialogContent:E,shouldInline:R}=se(p.current);if(!h||!m.current||R){j(null),b.current=null;return}b.current=E;const A=m.current.getBoundingClientRect(),F=window.innerHeight-A.bottom,O=A.top,D=F<320&&O>F?"up":"down";j(D==="down"?{top:A.bottom+6,left:A.left,direction:D}:{bottom:window.innerHeight-A.top+6,left:A.left,direction:D})},[h]),x.useEffect(()=>{if(!h||!k)return;const E=R=>{var A;(A=v.current)!=null&&A.contains(R.target)||w(!1)};return window.addEventListener("scroll",E,{capture:!0,passive:!0}),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,{capture:!0}),window.removeEventListener("resize",E)}},[h,k]);const T=E=>{y||N(E),r==null||r(E),w(!1)};return n.jsxs("div",{ref:p,className:C("vx-datepicker",f),children:[a?n.jsx("span",{className:"vx-field-group__label",children:a}):null,n.jsxs("button",{ref:m,type:"button",className:C("vx-datepicker__trigger",l&&"vx-datepicker__trigger--invalid",c&&"vx-datepicker__trigger--disabled"),onClick:()=>!c&&w(E=>!E),disabled:c,"aria-haspopup":"dialog","aria-expanded":h,children:[n.jsx(wl,{}),n.jsx("span",{className:C("vx-datepicker__value",!g&&"vx-datepicker__value--placeholder"),children:g?_l(g):s})]}),l?n.jsx("span",{className:"vx-field-group__error",children:l}):null,!l&&o?n.jsx("span",{className:"vx-field-group__hint",children:o}):null,h?(()=>{const E=!!k,R=k?{position:"fixed",top:k.top,bottom:k.bottom,left:k.left,pointerEvents:"auto"}:void 0,A=n.jsx("div",{ref:v,className:C("vx-datepicker__popover",(k==null?void 0:k.direction)==="up"&&"vx-datepicker__popover--up",!!b.current&&"vx-datepicker__popover--in-dialog"),role:"dialog","aria-label":"Date picker",style:R,children:n.jsx(Br,{value:g,onChange:T,min:i,max:u,weekStartsOnMonday:d})});return E?ce.createPortal(A,document.body):A})():null]})}function Sl({options:e,value:t,defaultValue:r=[],onChange:s,placeholder:a="Select...",searchPlaceholder:o="Search...",label:l,hint:i,error:u,disabled:c,clearable:d=!1,emptyText:f="No results",maxDisplay:y,className:S}){const N=t!==void 0,[g,h]=x.useState(r),w=N?t:g,[p,m]=x.useState(!1),[v,b]=x.useState(""),k=x.useRef(null),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useId(),[A,F]=x.useState(null),O=x.useRef(null),D=e.filter(P=>P.label.toLowerCase().includes(v.toLowerCase()));x.useEffect(()=>{if(!p){b("");return}const P=setTimeout(()=>{var M;return(M=E.current)==null?void 0:M.focus()},0);return()=>clearTimeout(P)},[p]),x.useEffect(()=>{if(!p)return;const P=B=>{var Z,ae;const z=(Z=k.current)==null?void 0:Z.contains(B.target),K=(ae=T.current)==null?void 0:ae.contains(B.target);!z&&!K&&m(!1)},M=B=>{B.key==="Escape"&&(B.preventDefault(),m(!1))};return document.addEventListener("mousedown",P),document.addEventListener("touchstart",P,{passive:!0}),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("touchstart",P),document.removeEventListener("keydown",M)}},[p]),x.useEffect(()=>{const{shouldInline:P}=se(k.current);if(!(!p||!P))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[p]),x.useEffect(()=>{if(!p||!A)return;const P=O.current;if(P)return P.dataset.hasOpenPortal="1",()=>{delete P.dataset.hasOpenPortal}},[p,A]),x.useLayoutEffect(()=>{const{dialogContent:P,shouldInline:M}=se(k.current);if(!p||!j.current||M){F(null),O.current=null;return}O.current=P;const B=j.current.getBoundingClientRect(),z=window.innerHeight-B.bottom,K=B.top,Z=z<300&&K>z?"up":"down";F(Z==="down"?{top:B.bottom+4,left:B.left,width:B.width,direction:Z}:{bottom:window.innerHeight-B.top+4,left:B.left,width:B.width,direction:Z})},[p]),x.useEffect(()=>{if(!p||!A)return;const P=M=>{var B;(B=T.current)!=null&&B.contains(M.target)||m(!1)};return window.addEventListener("scroll",P,{capture:!0,passive:!0}),window.addEventListener("resize",P),()=>{window.removeEventListener("scroll",P,{capture:!0}),window.removeEventListener("resize",P)}},[p,A]);const H=P=>{if(P.disabled)return;const M=w.includes(P.value)?w.filter(B=>B!==P.value):[...w,P.value];N||h(M),s==null||s(M)},U=(P,M)=>{P.stopPropagation();const B=w.filter(z=>z!==M);N||h(B),s==null||s(B)},V=P=>{P.stopPropagation(),N||h([]),s==null||s([])},L=y?w.slice(0,y):w,I=y?Math.max(0,w.length-y):0,$=e.reduce((P,M)=>(P[M.value]=M.label,P),{});return n.jsxs("div",{ref:k,className:C("vx-multiselect",p&&"vx-multiselect--open",S),children:[l?n.jsx("span",{className:"vx-field-group__label",children:l}):null,n.jsxs("button",{ref:j,type:"button",className:C("vx-multiselect__trigger",u&&"vx-multiselect__trigger--invalid",c&&"vx-multiselect__trigger--disabled"),onClick:()=>!c&&m(P=>!P),disabled:c,"aria-haspopup":"listbox","aria-expanded":p,"aria-controls":R,children:[n.jsx("span",{className:"vx-multiselect__tags",children:w.length===0?n.jsx("span",{className:"vx-multiselect__placeholder",children:a}):n.jsxs(n.Fragment,{children:[L.map(P=>n.jsxs("span",{className:"vx-multiselect__tag",children:[$[P]??P,!c&&n.jsx("span",{className:"vx-multiselect__tag-remove",role:"button","aria-label":`Remove ${$[P]??P}`,onClick:M=>U(M,P),children:n.jsx(re,{size:11})})]},P)),I>0&&n.jsxs("span",{className:"vx-multiselect__overflow",children:["+",I]})]})}),n.jsxs("span",{className:"vx-multiselect__icons",children:[d&&w.length>0&&n.jsx("span",{className:"vx-multiselect__clear",role:"button","aria-label":"Clear all",onClick:V,children:n.jsx(re,{size:14})}),n.jsx(ge,{size:14,className:C("vx-multiselect__chevron",p&&"vx-multiselect__chevron--open")})]})]}),u?n.jsx("span",{className:"vx-field-group__error",children:u}):null,!u&&i?n.jsx("span",{className:"vx-field-group__hint",children:i}):null,p&&(()=>{const P=!!A,M=P?{top:A.top,bottom:A.bottom,left:A.left,width:A.width,pointerEvents:"auto"}:void 0,B=n.jsxs("div",{ref:T,className:C("vx-multiselect__dropdown",(A==null?void 0:A.direction)==="up"&&"vx-multiselect__dropdown--up",!!O.current&&"vx-multiselect__dropdown--in-dialog"),style:M,children:[n.jsx("div",{className:"vx-multiselect__search-wrap",children:n.jsx("input",{ref:E,type:"text",className:"vx-multiselect__search",placeholder:o,value:v,onChange:z=>b(z.target.value),"aria-label":o})}),n.jsx("ul",{id:R,className:"vx-multiselect__list",role:"listbox","aria-multiselectable":"true","aria-label":l??"Options",children:D.length===0?n.jsx("li",{className:"vx-multiselect__empty",children:f}):D.map(z=>{const K=w.includes(z.value);return n.jsxs("li",{className:C("vx-multiselect__option",K&&"vx-multiselect__option--selected",z.disabled&&"vx-multiselect__option--disabled"),role:"option","aria-selected":K,"aria-disabled":z.disabled,onClick:()=>H(z),children:[n.jsx("span",{className:C("vx-multiselect__checkbox",K&&"vx-multiselect__checkbox--checked"),children:K?n.jsx(Me,{size:11}):null}),n.jsx("span",{children:z.label})]},z.value)})})]});return P?ce.createPortal(B,document.body):B})()]})}function te(e){return String(e).padStart(2,"0")}function Xt(e){const t=e.split(":").map(Number);return{h:t[0]??0,m:t[1]??0,s:t[2]??0}}function Zt(e,t,r,s){return s?`${te(e)}:${te(t)}:${te(r)}`:`${te(e)}:${te(t)}`}function Nl(){return n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"7.5",cy:"7.5",r:"6",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M7.5 4v3.5l2.5 1.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function jl({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M3 9l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function El({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function tt({value:e,min:t,max:r,onChange:s,label:a}){const o=()=>s(e===t?r:e-1),l=()=>s(e===r?t:e+1),i=f=>{f.preventDefault(),f.deltaY>0?l():o()},u=f=>{f.key==="ArrowUp"&&(f.preventDefault(),o()),f.key==="ArrowDown"&&(f.preventDefault(),l())},c=e===t?r:e-1,d=e===r?t:e+1;return n.jsxs("div",{className:"vx-timepicker__col",role:"spinbutton","aria-label":a,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":r,"aria-valuetext":te(e),tabIndex:0,onKeyDown:u,onWheel:i,children:[n.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:o,"aria-label":`Decrease ${a}`,tabIndex:-1,children:n.jsx(jl,{size:13})}),n.jsxs("div",{className:"vx-timepicker__col-items",children:[n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:te(c)}),n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--selected",children:te(e)}),n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:te(d)})]}),n.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:l,"aria-label":`Increase ${a}`,tabIndex:-1,children:n.jsx(El,{size:13})})]})}function Cl({value:e,defaultValue:t,onChange:r,placeholder:s="Select time",label:a,hint:o,error:l,disabled:i,seconds:u=!1,className:c}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,N=S?Xt(S):{h:12,m:0,s:0},[g,h]=x.useState(N.h),[w,p]=x.useState(N.m),[m,v]=x.useState(N.s),[b,k]=x.useState(!1),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useRef(null),[A,F]=x.useState(null);x.useEffect(()=>{if(e){const L=Xt(e);h(L.h),p(L.m),v(L.s)}},[e]),x.useEffect(()=>{if(!b)return;const L=$=>{var B,z;const P=(B=j.current)==null?void 0:B.contains($.target),M=(z=E.current)==null?void 0:z.contains($.target);!P&&!M&&k(!1)},I=$=>{$.key==="Escape"&&($.preventDefault(),k(!1))};return document.addEventListener("mousedown",L),document.addEventListener("touchstart",L,{passive:!0}),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",L),document.removeEventListener("touchstart",L),document.removeEventListener("keydown",I)}},[b]),x.useEffect(()=>{const{shouldInline:L}=se(j.current);if(!(!b||!L))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[b]),x.useEffect(()=>{if(!b||!A)return;const L=R.current;if(L)return L.dataset.hasOpenPortal="1",()=>{delete L.dataset.hasOpenPortal}},[b,A]),x.useLayoutEffect(()=>{const{dialogContent:L,shouldInline:I}=se(j.current);if(!b||!T.current||I){F(null),R.current=null;return}R.current=L;const $=T.current.getBoundingClientRect(),P=window.innerHeight-$.bottom,M=$.top,B=P<220&&M>P?"up":"down";F(B==="down"?{top:$.bottom+4,left:$.left,direction:B}:{bottom:window.innerHeight-$.top+4,left:$.left,direction:B})},[b]),x.useEffect(()=>{if(!b||!A)return;const L=I=>{var $;($=E.current)!=null&&$.contains(I.target)||k(!1)};return window.addEventListener("scroll",L,{capture:!0,passive:!0}),window.addEventListener("resize",L),()=>{window.removeEventListener("scroll",L,{capture:!0}),window.removeEventListener("resize",L)}},[b,A]);const O=x.useCallback((L,I,$)=>{const P=Zt(L,I,$,u);d||y(P),r==null||r(P)},[d,u,r]),D=L=>{h(L),O(L,w,m)},H=L=>{p(L),O(g,L,m)},U=L=>{v(L),O(g,w,L)},V=S??(b?Zt(g,w,m,u):void 0);return n.jsxs("div",{ref:j,className:C("vx-timepicker",c),children:[a?n.jsx("span",{className:"vx-field-group__label",children:a}):null,n.jsxs("button",{ref:T,type:"button",className:C("vx-timepicker__trigger",l&&"vx-timepicker__trigger--invalid",i&&"vx-timepicker__trigger--disabled"),onClick:()=>!i&&k(L=>!L),disabled:i,"aria-haspopup":"dialog","aria-expanded":b,children:[n.jsx(Nl,{}),n.jsx("span",{className:C("vx-timepicker__value",!V&&"vx-timepicker__value--placeholder"),children:V??s})]}),l?n.jsx("span",{className:"vx-field-group__error",children:l}):null,!l&&o?n.jsx("span",{className:"vx-field-group__hint",children:o}):null,b&&(()=>{const L=!!A,I=A?{position:"fixed",top:A.top,bottom:A.bottom,left:A.left,pointerEvents:"auto"}:void 0,$=n.jsxs("div",{ref:E,className:C("vx-timepicker__popover",(A==null?void 0:A.direction)==="up"&&"vx-timepicker__popover--up",!!R.current&&"vx-timepicker__popover--in-dialog"),role:"dialog","aria-label":"Time picker",style:I,children:[n.jsxs("div",{className:"vx-timepicker__columns",children:[n.jsx(tt,{value:g,min:0,max:23,onChange:D,label:"Hours"}),n.jsx("span",{className:"vx-timepicker__sep",children:":"}),n.jsx(tt,{value:w,min:0,max:59,onChange:H,label:"Minutes"}),u&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"vx-timepicker__sep",children:":"}),n.jsx(tt,{value:m,min:0,max:59,onChange:U,label:"Seconds"})]})]}),n.jsx("div",{className:"vx-timepicker__footer",children:n.jsx("button",{type:"button",className:"vx-timepicker__done",onClick:()=>{S||O(g,w,m),k(!1)},children:"Done"})})]});return L?ce.createPortal($,document.body):$})()]})}function Tl({label:e,hint:t,error:r,accept:s,multiple:a=!1,maxSize:o,disabled:l,onFiles:i,className:u}){const[c,d]=x.useState(!1),[f,y]=x.useState([]),[S,N]=x.useState(),g=x.useRef(null),h=x.useCallback(b=>{if(!b)return;const k=Array.from(b);if(o&&k.filter(R=>R.size>o).length>0){N(`File too large (max ${(o/1024/1024).toFixed(1)} MB)`);return}N(void 0);const j=k.map(E=>({file:E,id:crypto.randomUUID()})),T=a?[...f,...j]:j;y(T),i==null||i(T.map(E=>E.file))},[f,o,a,i]),w=b=>{b.preventDefault(),d(!1),l||h(b.dataTransfer.files)},p=b=>{b.preventDefault(),l||d(!0)},m=b=>{const k=f.filter(j=>j.id!==b);y(k),i==null||i(k.map(j=>j.file))},v=r??S;return n.jsxs("div",{className:C("vx-file-upload",u),children:[e?n.jsx("span",{className:"vx-field-group__label",children:e}):null,n.jsxs("div",{className:C("vx-file-upload__zone",c&&"vx-file-upload__zone--dragging",l&&"vx-file-upload__zone--disabled",v&&"vx-file-upload__zone--invalid"),onDrop:w,onDragOver:p,onDragLeave:()=>d(!1),onClick:()=>{var b;return!l&&((b=g.current)==null?void 0:b.click())},role:"button",tabIndex:l?-1:0,onKeyDown:b=>{var k;return b.key==="Enter"&&!l&&((k=g.current)==null?void 0:k.click())},"aria-label":"Upload files, click or drag and drop",children:[n.jsx(ys,{size:24,className:"vx-file-upload__icon"}),n.jsxs("p",{className:"vx-file-upload__text",children:[n.jsx("span",{className:"vx-file-upload__link",children:"Click to upload"})," or drag and drop"]}),t?n.jsx("p",{className:"vx-file-upload__hint",children:t}):null,n.jsx("input",{ref:g,type:"file",accept:s,multiple:a,disabled:l,className:"vx-file-upload__input",onChange:b=>h(b.target.files),"aria-hidden":"true",tabIndex:-1})]}),v?n.jsx("span",{className:"vx-field-group__error",children:v}):null,f.length>0&&n.jsx("ul",{className:"vx-file-upload__list",children:f.map(({id:b,file:k})=>n.jsxs("li",{className:"vx-file-upload__file",children:[n.jsx(us,{size:14,className:"vx-file-upload__file-icon"}),n.jsx("span",{className:"vx-file-upload__file-name",children:k.name}),n.jsxs("span",{className:"vx-file-upload__file-size",children:[(k.size/1024).toFixed(0)," KB"]}),n.jsx("button",{type:"button",className:"vx-file-upload__remove",onClick:()=>m(b),"aria-label":`Remove ${k.name}`,children:n.jsx(re,{size:14})})]},b))})]})}function Al({trigger:e,title:t,description:r,side:s="right",children:a,footer:o,className:l,...i}){return n.jsxs(gt,{...i,children:[e?n.jsx(bt,{asChild:!0,children:e}):null,n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-sheet__overlay"}),n.jsxs(wt,{className:C("vx-sheet",`vx-sheet--${s}`,l),children:[n.jsxs("div",{className:"vx-sheet__header",children:[n.jsxs("div",{children:[t?n.jsx(kt,{className:"vx-sheet__title",children:t}):null,r?n.jsx(St,{className:"vx-sheet__description",children:r}):null]}),n.jsx(xe,{className:"vx-dialog__close","aria-label":"Close",children:n.jsx(re,{size:16})})]}),n.jsx("div",{className:"vx-sheet__body",children:a}),o?n.jsx("div",{className:"vx-sheet__footer",children:o}):null]})]})]})}function Rl({maxHeight:e,maxWidth:t,children:r,className:s,style:a,...o}){return n.jsx("div",{className:C("vx-scroll-area",s),style:{maxHeight:typeof e=="number"?`${e}px`:e,maxWidth:typeof t=="number"?`${t}px`:t,...a},...o,children:n.jsx("div",{className:"vx-scroll-area__viewport",children:r})})}function Pl({pressed:e,defaultPressed:t=!1,onPressedChange:r,size:s="md",className:a,children:o,onClick:l,...i}){const[u,c]=x.useState(t),d=e!==void 0,f=d?e:u,y=S=>{d||c(N=>!N),r==null||r(!f),l==null||l(S)};return n.jsx("button",{type:"button","aria-pressed":f,className:C("vx-toggle",`vx-toggle--${s}`,f&&"vx-toggle--on",a),onClick:y,...i,children:o})}function Fl({items:e,value:t,defaultValue:r,onValueChange:s,type:a="single",size:o="md",className:l}){const[i,u]=x.useState(r??(a==="multiple"?[]:"")),c=t!==void 0,d=c?t:i,f=S=>Array.isArray(d)?d.includes(S):d===S,y=S=>{let N;if(a==="multiple"){const g=Array.isArray(d)?d:[];N=g.includes(S)?g.filter(h=>h!==S):[...g,S]}else N=d===S?"":S;c||u(N),s==null||s(N)};return n.jsx("div",{className:C("vx-toggle-group",l),role:"group",children:e.map(S=>n.jsx("button",{type:"button","aria-pressed":f(S.value),disabled:S.disabled,className:C("vx-toggle",`vx-toggle--${o}`,f(S.value)&&"vx-toggle--on","vx-toggle-group__item"),onClick:()=>!S.disabled&&y(S.value),children:S.label},S.value))})}function Dl({groups:e,items:t,children:r,className:s}){const[a,o]=x.useState(null),l=x.useRef(null),i=e??(t?[{items:t}]:[]);x.useEffect(()=>{if(!a)return;const c=f=>{l.current&&!l.current.contains(f.target)&&o(null)},d=f=>{f.key==="Escape"&&o(null)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[a]);const u=x.useCallback(c=>{c.preventDefault(),o({x:c.clientX,y:c.clientY})},[]);return n.jsxs("div",{className:C("vx-context-menu-wrap",s),onContextMenu:u,children:[r,a&&n.jsx("div",{ref:l,className:"vx-dropdown__menu vx-context-menu",style:{position:"fixed",top:a.y,left:a.x},role:"menu",children:i.map((c,d)=>n.jsxs("div",{className:"vx-dropdown__group",children:[d>0&&n.jsx("div",{className:"vx-dropdown__separator"}),c.label&&n.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,y)=>n.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:C("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var S;(S=f.onClick)==null||S.call(f),o(null)},children:[f.icon&&n.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),n.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&n.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},y))]},d))})]})}function Ll({content:e,placement:t="bottom",delay:r=400,children:s,className:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useCallback(()=>{i.current=setTimeout(()=>l(!0),r)},[r]),c=x.useCallback(()=>{i.current&&clearTimeout(i.current),l(!1)},[]);return n.jsxs("span",{className:C("vx-hovercard-wrap",a),onMouseEnter:u,onMouseLeave:c,onFocus:u,onBlur:c,children:[s,o&&n.jsx("div",{className:C("vx-hovercard",`vx-hovercard--${t}`),children:e})]})}function Il({menus:e,className:t}){const[r,s]=x.useState(null),a=x.useRef(null);return x.useEffect(()=>{if(r===null)return;const o=i=>{a.current&&!a.current.contains(i.target)&&s(null)},l=i=>{i.key==="Escape"&&s(null)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[r]),n.jsx("div",{ref:a,className:C("vx-menubar",t),role:"menubar",children:e.map((o,l)=>{const i=o.groups??(o.items?[{items:o.items}]:[]),u=r===l;return n.jsxs("div",{className:"vx-menubar__item-wrap",children:[n.jsx("button",{type:"button",role:"menuitem",className:C("vx-menubar__trigger",u&&"vx-menubar__trigger--open"),disabled:o.disabled,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>s(u?null:l),onMouseEnter:()=>{r!==null&&s(l)},children:o.label}),u&&n.jsx("div",{className:"vx-dropdown__menu",role:"menu",children:i.map((c,d)=>n.jsxs("div",{className:"vx-dropdown__group",children:[d>0&&n.jsx("div",{className:"vx-dropdown__separator"}),c.label&&n.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,y)=>n.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:C("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var S;(S=f.onClick)==null||S.call(f),s(null)},children:[f.icon&&n.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),n.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&n.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},y))]},d))})]},l)})})}function Ml({items:e,className:t}){const[r,s]=x.useState(null),a=x.useRef(null);return x.useEffect(()=>{if(r===null)return;const o=i=>{a.current&&!a.current.contains(i.target)&&s(null)},l=i=>{i.key==="Escape"&&s(null)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[r]),n.jsx("nav",{ref:a,className:C("vx-nav-menu",t),"aria-label":"Main navigation",children:n.jsx("ul",{className:"vx-nav-menu__list",role:"list",children:e.map((o,l)=>{const i=o.items&&o.items.length>0,u=r===l;return n.jsxs("li",{className:"vx-nav-menu__item-wrap",children:[i?n.jsxs("button",{type:"button",className:C("vx-nav-menu__link",o.active&&"vx-nav-menu__link--active",u&&"vx-nav-menu__link--open"),"aria-haspopup":"true","aria-expanded":u,onClick:()=>s(u?null:l),children:[o.label,n.jsx(ge,{size:14,className:C("vx-nav-menu__chevron",u&&"vx-nav-menu__chevron--open")})]}):n.jsx("a",{href:o.href??"#",className:C("vx-nav-menu__link",o.active&&"vx-nav-menu__link--active"),onClick:o.onClick,children:o.label}),i&&u&&n.jsx("div",{className:"vx-nav-menu__dropdown",children:o.items.map((c,d)=>n.jsxs("a",{href:c.href??"#",className:"vx-nav-menu__sub-item",onClick:()=>{var f;(f=c.onClick)==null||f.call(c),s(null)},children:[c.icon&&n.jsx("span",{className:"vx-nav-menu__sub-icon",children:c.icon}),n.jsxs("span",{children:[n.jsx("span",{className:"vx-nav-menu__sub-label",children:c.label}),c.description&&n.jsx("span",{className:"vx-nav-menu__sub-desc",children:c.description})]})]},d))})]},l)})})})}function Ol({steps:e,currentStep:t=0,orientation:r="horizontal",className:s}){return n.jsx("ol",{className:C("vx-stepper",`vx-stepper--${r}`,s),"aria-label":"Steps",children:e.map((a,o)=>{const l=a.status??(o<t?"completed":o===t?"active":"pending");return n.jsxs("li",{className:C("vx-stepper__step",`vx-stepper__step--${l}`),children:[n.jsx("div",{className:"vx-stepper__indicator","aria-hidden":"true",children:l==="completed"?n.jsx(Me,{size:14}):n.jsx("span",{children:o+1})}),n.jsxs("div",{className:"vx-stepper__content",children:[n.jsx("span",{className:"vx-stepper__label",children:a.label}),a.description&&n.jsx("span",{className:"vx-stepper__description",children:a.description})]}),o<e.length-1&&n.jsx("div",{className:"vx-stepper__connector","aria-hidden":"true"})]},o)})})}function $l({items:e,className:t}){return n.jsx("ol",{className:C("vx-timeline",t),"aria-label":"Timeline",children:e.map((r,s)=>n.jsxs("li",{className:C("vx-timeline__item",r.status&&`vx-timeline__item--${r.status}`),children:[n.jsx("div",{className:"vx-timeline__dot","aria-hidden":"true",children:r.icon??null}),n.jsxs("div",{className:"vx-timeline__body",children:[n.jsxs("div",{className:"vx-timeline__header",children:[n.jsx("span",{className:"vx-timeline__title",children:r.title}),r.time&&n.jsx("span",{className:"vx-timeline__time",children:r.time})]}),r.description&&n.jsx("p",{className:"vx-timeline__description",children:r.description})]})]},s))})}function Bl({icon:e,title:t,description:r,action:s,className:a}){return n.jsxs("div",{className:C("vx-empty-state",a),role:"status","aria-live":"polite",children:[e&&n.jsx("div",{className:"vx-empty-state__icon","aria-hidden":"true",children:e}),n.jsx("p",{className:"vx-empty-state__title",children:t}),r&&n.jsx("p",{className:"vx-empty-state__description",children:r}),s&&n.jsx("div",{className:"vx-empty-state__action",children:s})]})}function zl({items:e,defaultIndex:t=0,index:r,onIndexChange:s,autoPlay:a=!1,interval:o=3e3,loop:l=!0,showDots:i=!0,showArrows:u=!0,className:c}){const d=r!==void 0,[f,y]=x.useState(t),S=d?r:f,N=e.length,g=x.useRef(null),h=x.useCallback(m=>{let v=m;l?v=(m%N+N)%N:v=Math.max(0,Math.min(m,N-1)),d||y(v),s==null||s(v)},[d,l,s,N]);x.useEffect(()=>{if(a)return g.current=setInterval(()=>h(S+1),o),()=>{g.current&&clearInterval(g.current)}},[a,S,h,o]);const w=()=>h(S-1),p=()=>h(S+1);return N===0?null:n.jsxs("div",{className:C("vx-carousel",c),role:"region","aria-roledescription":"carousel","aria-label":"Carousel",children:[n.jsx("div",{className:"vx-carousel__track-wrap",children:n.jsx("div",{className:"vx-carousel__track",style:{transform:`translateX(-${S*100}%)`},children:e.map((m,v)=>n.jsx("div",{className:"vx-carousel__slide",role:"group","aria-roledescription":"slide","aria-label":`Slide ${v+1} of ${N}`,"aria-hidden":v!==S,children:m},v))})}),u&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--prev",onClick:w,disabled:!l&&S===0,"aria-label":"Previous slide",children:n.jsx(un,{size:20})}),n.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--next",onClick:p,disabled:!l&&S===N-1,"aria-label":"Next slide",children:n.jsx(be,{size:20})})]}),i&&n.jsx("div",{className:"vx-carousel__dots",role:"tablist","aria-label":"Slides",children:e.map((m,v)=>n.jsx("button",{type:"button",role:"tab",className:C("vx-carousel__dot",v===S&&"vx-carousel__dot--active"),onClick:()=>h(v),"aria-selected":v===S,"aria-label":`Go to slide ${v+1}`},v))})]})}function Hl({filled:e,half:t}){return n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:t?n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"vx-star-half",children:[n.jsx("stop",{offset:"50%",stopColor:"currentColor"}),n.jsx("stop",{offset:"50%",stopColor:"none",stopOpacity:"0"})]})}),n.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:"url(#vx-star-half)",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]}):n.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function Ul({value:e,defaultValue:t=0,onChange:r,max:s=5,allowHalf:a=!1,disabled:o,readOnly:l,label:i,className:u,size:c="md"}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,[N,g]=x.useState(null),h=N??S,w=(v,b)=>{if(!a)return v;const k=b.currentTarget.getBoundingClientRect();return b.clientX-k.left<k.width/2?v-.5:v},p=(v,b)=>{if(o||l)return;const k=w(v,b);d||y(k),r==null||r(k)},m=(v,b)=>{o||l||g(w(v,b))};return n.jsx("div",{className:C("vx-rating",`vx-rating--${c}`,o&&"vx-rating--disabled",u),role:"group","aria-label":i??"Rating",children:Array.from({length:s},(v,b)=>{const k=b+1,j=h>=k,T=!j&&h>=k-.5;return n.jsx("button",{type:"button",className:C("vx-rating__star",(j||T)&&"vx-rating__star--active"),onClick:E=>p(k,E),onMouseMove:E=>m(k,E),onMouseLeave:()=>g(null),disabled:o,"aria-label":`${k} star${k!==1?"s":""}`,"aria-pressed":S>=k,tabIndex:l||o?-1:0,children:n.jsx(Hl,{filled:j,half:T})},b)})})}function zr({node:e,depth:t,selected:r,expanded:s,onSelect:a,onToggle:o}){const l=e.children&&e.children.length>0,i=s.has(e.id),u=r===e.id,c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),e.disabled||a(e.id,e)),d.key==="ArrowRight"&&l&&!i&&(d.preventDefault(),o(e.id)),d.key==="ArrowLeft"&&i&&(d.preventDefault(),o(e.id))};return n.jsxs("li",{role:"treeitem","aria-selected":u,"aria-expanded":l?i:void 0,children:[n.jsxs("div",{className:C("vx-tree__node",u&&"vx-tree__node--selected",e.disabled&&"vx-tree__node--disabled"),style:{paddingLeft:`${8+t*20}px`},onClick:()=>{e.disabled||(a(e.id,e),l&&o(e.id))},onKeyDown:c,tabIndex:e.disabled?-1:0,role:"button","aria-label":typeof e.label=="string"?e.label:void 0,children:[n.jsx("span",{className:C("vx-tree__expand",!l&&"vx-tree__expand--hidden"),children:n.jsx(be,{size:14,className:C("vx-tree__chevron",i&&"vx-tree__chevron--open")})}),e.icon&&n.jsx("span",{className:"vx-tree__icon",children:e.icon}),n.jsx("span",{className:"vx-tree__label",children:e.label})]}),l&&i&&n.jsx("ul",{role:"group",className:"vx-tree__children",children:e.children.map(d=>n.jsx(zr,{node:d,depth:t+1,selected:r,expanded:s,onSelect:a,onToggle:o},d.id))})]})}function Wl({nodes:e,selected:t,defaultSelected:r,onSelect:s,defaultExpanded:a=[],expanded:o,onExpandedChange:l,className:i}){const u=t!==void 0,[c,d]=x.useState(r),f=u?t:c,y=o!==void 0,[S,N]=x.useState(new Set(a)),g=y?new Set(o):S,h=x.useCallback((p,m)=>{u||d(p),s==null||s(p,m)},[u,s]),w=x.useCallback(p=>{const m=new Set(g);m.has(p)?m.delete(p):m.add(p),y||N(m),l==null||l([...m])},[g,y,l]);return n.jsx("ul",{className:C("vx-tree",i),role:"tree","aria-multiselectable":"false",children:e.map(p=>n.jsx(zr,{node:p,depth:0,selected:f,expanded:g,onSelect:h,onToggle:w},p.id))})}function Gl({value:e,defaultValue:t=[],onChange:r,label:s,hint:a,error:o,placeholder:l="Add tag...",confirmKeys:i=["Enter",","],maxTags:u,validate:c,disabled:d,className:f,...y}){const S=e!==void 0,[N,g]=x.useState(t),h=S?e:N,[w,p]=x.useState(""),[m,v]=x.useState(),b=x.useRef(null),k=A=>{S||g(A),r==null||r(A)},j=A=>{const F=A.trim();if(F){if(h.includes(F)){v("Tag already exists");return}if(u&&h.length>=u){v(`Max ${u} tags`);return}if(c){const O=c(F);if(O===!1){v("Invalid tag");return}if(typeof O=="string"){v(O);return}}v(void 0),k([...h,F]),p("")}},T=A=>{k(h.filter((F,O)=>O!==A))},E=A=>{i.includes(A.key)?(A.preventDefault(),j(w)):A.key==="Backspace"&&!w&&h.length>0&&T(h.length-1)},R=o??m;return n.jsxs("div",{className:C("vx-tag-input",f),children:[s?n.jsx("span",{className:"vx-field-group__label",children:s}):null,n.jsxs("div",{className:C("vx-tag-input__wrap",R&&"vx-tag-input__wrap--invalid",d&&"vx-tag-input__wrap--disabled"),onClick:()=>{var A;return(A=b.current)==null?void 0:A.focus()},children:[h.map((A,F)=>n.jsxs("span",{className:"vx-tag-input__tag",children:[A,!d&&n.jsx("button",{type:"button",className:"vx-tag-input__remove",onClick:O=>{O.stopPropagation(),T(F)},"aria-label":`Remove tag ${A}`,children:n.jsx(re,{size:11})})]},F)),n.jsx("input",{ref:b,className:"vx-tag-input__input",value:w,placeholder:h.length===0?l:"",disabled:d,onKeyDown:E,onChange:A=>{p(A.target.value),v(void 0)},onBlur:()=>{w.trim()&&j(w)},"aria-label":s??"Tag input",...y})]}),R?n.jsx("span",{className:"vx-field-group__error",children:R}):null,!R&&a?n.jsx("span",{className:"vx-field-group__hint",children:a}):null]})}function Kl(e){const t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,s=parseInt(e.slice(5,7),16)/255,a=Math.max(t,r,s),o=Math.min(t,r,s),l=(a+o)/2;let i=0,u=0;if(a!==o){const c=a-o;switch(u=c/(l>.5?2-a-o:a+o),a){case t:i=((r-s)/c+(r<s?6:0))/6;break;case r:i=((s-t)/c+2)/6;break;case s:i=((t-r)/c+4)/6;break}}return[Math.round(i*360),Math.round(u*100),Math.round(l*100)]}function nt(e,t,r){const s=e/360,a=t/100,o=r/100,l=(f,y,S)=>{let N=S;return N<0&&(N+=1),N>1&&(N-=1),N<1/6?f+(y-f)*6*N:N<1/2?y:N<2/3?f+(y-f)*(2/3-N)*6:f};let i,u,c;if(a===0)i=u=c=o;else{const f=o<.5?o*(1+a):o+a-o*a,y=2*o-f;i=l(y,f,s+1/3),u=l(y,f,s),c=l(y,f,s-1/3)}const d=f=>Math.round(f*255).toString(16).padStart(2,"0");return`#${d(i)}${d(u)}${d(c)}`}function Qt(e){return/^#[0-9a-f]{6}$/i.test(e)}const Vl=["#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899","#64748b","#0f172a","#ffffff","#f8fafc"];function ql({value:e,defaultValue:t="#3b82f6",onChange:r,label:s,hint:a,error:o,disabled:l,presets:i=Vl,showPresets:u=!0,className:c}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,[N,g]=x.useState(S),[h,w]=x.useState(!1),p=x.useRef(null);x.useEffect(()=>{if(!h)return;const T=R=>{p.current&&!p.current.contains(R.target)&&w(!1)},E=R=>{R.key==="Escape"&&(R.preventDefault(),w(!1))};return document.addEventListener("mousedown",T),document.addEventListener("touchstart",T,{passive:!0}),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("touchstart",T),document.removeEventListener("keydown",E)}},[h]),x.useEffect(()=>{if(!(!h||!window.matchMedia("(max-width: 640px)").matches))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[h]);const[m,v,b]=Qt(S)?Kl(S):[0,0,50],k=x.useCallback(T=>{d||y(T),g(T),r==null||r(T)},[d,r]),j=T=>{const E=T.startsWith("#")?T:`#${T}`;g(E),Qt(E)&&k(E)};return n.jsxs("div",{ref:p,className:C("vx-colorpicker",c),children:[s?n.jsx("span",{className:"vx-field-group__label",children:s}):null,n.jsxs("div",{className:"vx-colorpicker__row",children:[n.jsx("button",{type:"button",className:C("vx-colorpicker__swatch-btn",l&&"vx-colorpicker__swatch-btn--disabled"),style:{"--vx-cp-color":S},onClick:()=>!l&&w(T=>!T),disabled:l,"aria-label":`Current color: ${S}. Click to open color picker.`,"aria-haspopup":"dialog","aria-expanded":h}),n.jsx("input",{type:"text",className:"vx-colorpicker__hex-input",value:N,onChange:T=>j(T.target.value),disabled:l,"aria-label":"Hex color value",maxLength:7})]}),o?n.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&a?n.jsx("span",{className:"vx-field-group__hint",children:a}):null,h&&n.jsxs("div",{className:"vx-colorpicker__panel",role:"dialog","aria-label":"Color picker",children:[n.jsx("div",{className:"vx-colorpicker__section-label",children:"Hue"}),n.jsx("input",{type:"range",className:"vx-colorpicker__hue-slider",min:"0",max:"360",value:m,onChange:T=>k(nt(Number(T.target.value),v,b)),"aria-label":"Hue"}),n.jsx("div",{className:"vx-colorpicker__section-label",children:"Saturation"}),n.jsx("input",{type:"range",className:"vx-colorpicker__sat-slider",min:"0",max:"100",value:v,style:{"--vx-cp-hue":m},onChange:T=>k(nt(m,Number(T.target.value),b)),"aria-label":"Saturation"}),n.jsx("div",{className:"vx-colorpicker__section-label",children:"Lightness"}),n.jsx("input",{type:"range",className:"vx-colorpicker__lit-slider",min:"0",max:"100",value:b,style:{"--vx-cp-hue":m,"--vx-cp-sat":`${v}%`},onChange:T=>k(nt(m,v,Number(T.target.value))),"aria-label":"Lightness"}),u&&n.jsx("div",{className:"vx-colorpicker__presets",children:i.map(T=>n.jsx("button",{type:"button",className:C("vx-colorpicker__preset",S.toLowerCase()===T.toLowerCase()&&"vx-colorpicker__preset--active"),style:{background:T},onClick:()=>k(T),"aria-label":T},T))}),n.jsx("button",{type:"button",className:"vx-colorpicker__close",onClick:()=>w(!1),children:"Done"})]})]})}function Yl({direction:e="horizontal",children:t,className:r}){return n.jsx("div",{className:C("vx-resizable-group",`vx-resizable-group--${e}`,r),children:t})}function Xl({children:e,defaultSize:t=50,minSize:r=10,maxSize:s=90,className:a,style:o}){return n.jsx("div",{className:C("vx-resizable-panel",a),style:{"--vx-panel-size":`${t}%`,...o},"data-min":r,"data-max":s,children:e})}function Zl({className:e,direction:t="horizontal"}){const r=x.useRef(!1),[s,a]=x.useState(!1),o=x.useCallback(l=>{const i=l.currentTarget,u=i.previousElementSibling,c=i.nextElementSibling;if(!u||!c)return;const d=i.parentElement,f=t==="horizontal",y=f?d.getBoundingClientRect().width:d.getBoundingClientRect().height,S=f?u.getBoundingClientRect().width:u.getBoundingClientRect().height,N=f?c.getBoundingClientRect().width:c.getBoundingClientRect().height,g=j=>"touches"in j?f?j.touches[0].clientX:j.touches[0].clientY:f?j.clientX:j.clientY,h=g(l.nativeEvent);r.current=!0,a(!0);const w=Number(u.dataset.min??10)/100*y,p=Number(u.dataset.max??90)/100*y,m=Number(c.dataset.min??10)/100*y,v=Number(c.dataset.max??90)/100*y,b=j=>{if(!r.current)return;const T=g(j)-h,E=Math.min(Math.max(S+T,w),p),R=Math.min(Math.max(N-T,m),v);u.style.flexBasis=`${E/y*100}%`,c.style.flexBasis=`${R/y*100}%`},k=()=>{r.current=!1,a(!1),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",k),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",k)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",k),document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",k)},[t]);return n.jsx("div",{role:"separator","aria-orientation":t==="horizontal"?"vertical":"horizontal",className:C("vx-resizable-handle",`vx-resizable-handle--${t}`,s&&"vx-resizable-handle--active",e),onMouseDown:o,onTouchStart:o,children:n.jsx("span",{className:"vx-resizable-handle__bar","aria-hidden":"true"})})}function Jt(e,t){if(!t)return e;const r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?e:n.jsxs(n.Fragment,{children:[e.slice(0,r),n.jsx("mark",{className:"vx-cmd__mark",children:e.slice(r,r+t.length)}),e.slice(r+t.length)]})}function Ql(e,t){const r=t.toLowerCase(),s=e.title.toLowerCase(),a=e.section.toLowerCase(),o=e.description.toLowerCase(),l=(e.keywords??[]).join(" ").toLowerCase();return s===r?100:s.startsWith(r)?80:s.includes(r)?60:a.includes(r)?40:l.includes(r)?35:o.includes(r)?20:0}function Jl({entries:e,open:t,onClose:r,onSelect:s,placeholder:a="Search components, pages, keywords…",ariaLabel:o="Search",emptyText:l=d=>`No results for "${d}"`,labelNavigate:i="Navigate",labelGo:u="Go",labelClose:c="Close"}){const[d,f]=x.useState(""),[y,S]=x.useState(0),N=x.useRef(null),g=x.useRef(null),h=d.trim()?e.map(v=>({entry:v,s:Ql(v,d.trim())})).filter(v=>v.s>0).sort((v,b)=>b.s-v.s).map(v=>v.entry):e;x.useEffect(()=>{t&&(f(""),S(0),setTimeout(()=>{var v;return(v=N.current)==null?void 0:v.focus()},30))},[t]),x.useEffect(()=>{S(0)},[d]),x.useEffect(()=>{var b;const v=(b=g.current)==null?void 0:b.children[y];v==null||v.scrollIntoView({block:"nearest"})},[y]);const w=x.useCallback(v=>{s(v),r()},[s,r]),p=x.useCallback(v=>{v.key==="ArrowDown"?(v.preventDefault(),S(b=>Math.min(b+1,h.length-1))):v.key==="ArrowUp"?(v.preventDefault(),S(b=>Math.max(b-1,0))):v.key==="Enter"?(v.preventDefault(),h[y]&&w(h[y].key)):v.key==="Escape"&&r()},[h,y,w,r]);if(!t)return null;const m=[];for(const v of h){const b=m[m.length-1];b&&b.section===v.section?b.items.push(v):m.push({section:v.section,items:[v]})}return n.jsx("div",{className:"vx-cmd__backdrop",onMouseDown:r,children:n.jsxs("div",{className:"vx-cmd",role:"dialog","aria-modal":"true","aria-label":o,onMouseDown:v=>v.stopPropagation(),children:[n.jsxs("div",{className:"vx-cmd__search",children:[n.jsxs("svg",{className:"vx-cmd__search-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"6.5",cy:"6.5",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M10.5 10.5L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),n.jsx("input",{ref:N,className:"vx-cmd__input",type:"text",placeholder:a,value:d,onChange:v=>f(v.target.value),onKeyDown:p,autoComplete:"off",spellCheck:!1}),d?n.jsx("button",{className:"vx-cmd__clear",onClick:()=>f(""),"aria-label":"清除",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):n.jsx("kbd",{className:"vx-cmd__esc",children:"esc"})]}),n.jsx("ul",{className:"vx-cmd__list",ref:g,role:"listbox",children:h.length===0?n.jsx("li",{className:"vx-cmd__empty",children:l(d)}):m.map(v=>v.items.map((b,k)=>{const j=h.indexOf(b),T=j===y;return n.jsxs("li",{role:"option","aria-selected":T,className:`vx-cmd__item${T?" vx-cmd__item--active":""}`,onMouseEnter:()=>S(j),onMouseDown:()=>w(b.key),children:[b.icon?n.jsx("span",{className:"vx-cmd__item-icon",children:b.icon}):n.jsx("span",{className:"vx-cmd__item-icon vx-cmd__item-icon--section",children:b.section.slice(0,1)}),n.jsxs("span",{className:"vx-cmd__item-body",children:[n.jsx("span",{className:"vx-cmd__item-title",children:Jt(b.title,d)}),n.jsx("span",{className:"vx-cmd__item-sub",children:Jt(b.section,d)})]}),T&&n.jsx("kbd",{className:"vx-cmd__enter",children:"↵"})]},b.key)}))}),n.jsxs("div",{className:"vx-cmd__footer",children:[n.jsxs("span",{children:[n.jsx("kbd",{children:"↑↓"})," ",i]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"↵"})," ",u]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"esc"})," ",c]})]})]})})}var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ec(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},tn;function tc(){return tn||(tn=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
140
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},no="DialogDescriptionWarning",ro=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jn(no).contentName}}.`;return _.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},gt=$n,bt=zn,yt=Un,_t=Wn,wt=Gn,kt=Kn,St=Yn,xe=Zn;function so({children:e,scrollable:t}){const r=x.useRef(null),s=x.useRef(null);return pt(r,s,t),n.jsxs("div",{ref:r,className:"vx-dialog__body-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[n.jsx("div",{ref:s,className:C("vx-dialog__body",t&&"vx-scroll-hide-native"),children:e}),t?n.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:n.jsx("span",{className:"vx-overlay-scrollbar__thumb"})}):null]})}function ao({trigger:e,title:t,description:r,children:s,footer:a,className:o,size:l="md",padding:i,placement:u="center",scrollable:c=!0,closable:d=!0,...f}){const y=x.useRef(null);return n.jsxs(gt,{...f,children:[n.jsx(bt,{asChild:!0,children:e}),n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-dialog__overlay"}),n.jsxs(wt,{ref:y,className:C("vx-dialog__content",l!=="md"&&`vx-dialog__content--${l}`,u!=="center"&&`vx-dialog__content--${u}`,i&&`vx-dialog__content--pad-${i}`,c&&"vx-dialog__content--scrollable",o),onEscapeKeyDown:S=>{const N=y.current;if(!N)return;const g=!!N.querySelector(".vx-select__dropdown, .vx-multiselect__dropdown, .vx-datepicker__popover, .vx-timepicker__popover, .vx-colorpicker__panel"),h=N.dataset.hasOpenPortal==="1";(g||h)&&S.preventDefault()},onPointerDownOutside:S=>{const N=y.current;(N==null?void 0:N.dataset.hasOpenPortal)==="1"&&S.preventDefault()},children:[n.jsxs("div",{className:"vx-dialog__header",children:[n.jsxs("div",{children:[n.jsx(kt,{className:"vx-dialog__title",children:t}),r?n.jsx(St,{className:"vx-dialog__description",children:r}):null]}),d?n.jsx(xe,{className:"vx-dialog__close","aria-label":"Close dialog",children:n.jsx(re,{size:16})}):null]}),n.jsx(so,{scrollable:c,children:s}),a?n.jsx("div",{className:"vx-dialog__footer",children:a}):null]})]})]})}const oo=xe;function io({className:e,label:t,hint:r,prefix:s,suffix:a,error:o,variant:l="default",size:i="md",rounded:u=!1,...c}){return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsxs("span",{className:C("vx-input",l!=="default"&&`vx-input--${l}`,i!=="md"&&`vx-input--${i}`,u&&"vx-input--rounded",o&&"vx-input--invalid",e),children:[s?n.jsx("span",{className:"vx-input__ornament",children:s}):null,n.jsx("input",{className:"vx-input__field","aria-invalid":o?"true":void 0,...c}),a?n.jsx("span",{className:"vx-input__ornament",children:a}):null]}),o?n.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function lo(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function co(e){const[t,r]=_.useState(void 0);return ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,i;if("borderBoxSize"in o){const u=o.borderBoxSize,c=Array.isArray(u)?u[0]:u;l=c.inlineSize,i=c.blockSize}else l=e.offsetWidth,i=e.offsetHeight;r({width:l,height:i})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else r(void 0)},[e]),t}var Be="Switch",[uo]=ve(Be),[po,fo]=uo(Be),er=_.forwardRef((e,t)=>{const{__scopeSwitch:r,name:s,checked:a,defaultChecked:o,required:l,disabled:i,value:u="on",onCheckedChange:c,form:d,...f}=e,[y,S]=_.useState(null),N=Y(t,m=>S(m)),g=_.useRef(!1),h=y?d||!!y.closest("form"):!0,[w,p]=ye({prop:a,defaultProp:o??!1,onChange:c,caller:Be});return n.jsxs(po,{scope:r,checked:w,disabled:i,children:[n.jsx(G.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":sr(w),"data-disabled":i?"":void 0,disabled:i,value:u,...f,ref:N,onClick:W(e.onClick,m=>{p(v=>!v),h&&(g.current=m.isPropagationStopped(),g.current||m.stopPropagation())})}),h&&n.jsx(rr,{control:y,bubbles:!g.current,name:s,value:u,checked:w,required:l,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});er.displayName=Be;var tr="SwitchThumb",nr=_.forwardRef((e,t)=>{const{__scopeSwitch:r,...s}=e,a=fo(tr,r);return n.jsx(G.span,{"data-state":sr(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t})});nr.displayName=tr;var vo="SwitchBubbleInput",rr=_.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:s=!0,...a},o)=>{const l=_.useRef(null),i=Y(l,o),u=lo(r),c=co(t);return _.useEffect(()=>{const d=l.current;if(!d)return;const f=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==r&&S){const N=new Event("click",{bubbles:s});S.call(d,r),d.dispatchEvent(N)}},[u,r,s]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:i,style:{...a.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});rr.displayName=vo;function sr(e){return e?"checked":"unchecked"}var mo=er,ho=nr;function xo({className:e,label:t,description:r,...s}){return n.jsxs("label",{className:"vx-switch",children:[n.jsxs("span",{className:"vx-switch__copy",children:[n.jsx("span",{className:"vx-switch__label",children:t}),r?n.jsx("span",{className:"vx-switch__description",children:r}):null]}),n.jsx(mo,{className:C("vx-switch__control",e),...s,children:n.jsx(ho,{className:"vx-switch__thumb"})})]})}function ar(e){const t=e+"CollectionProvider",[r,s]=ve(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=g=>{const{scope:h,children:w}=g,p=x.useRef(null),m=x.useRef(new Map).current;return n.jsx(a,{scope:h,itemMap:m,collectionRef:p,children:w})};l.displayName=t;const i=e+"CollectionSlot",u=Fe(i),c=x.forwardRef((g,h)=>{const{scope:w,children:p}=g,m=o(i,w),v=Y(h,m.collectionRef);return n.jsx(u,{ref:v,children:p})});c.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",y=Fe(d),S=x.forwardRef((g,h)=>{const{scope:w,children:p,...m}=g,v=x.useRef(null),b=Y(h,v),k=o(d,w);return x.useEffect(()=>(k.itemMap.set(v,{ref:v,...m}),()=>void k.itemMap.delete(v))),n.jsx(y,{[f]:"",ref:b,children:p})});S.displayName=d;function N(g){const h=o(e+"CollectionConsumer",g);return x.useCallback(()=>{const p=h.collectionRef.current;if(!p)return[];const m=Array.from(p.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((k,j)=>m.indexOf(k.ref.current)-m.indexOf(j.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:l,Slot:c,ItemSlot:S},N,s]}var go=_.createContext(void 0);function or(e){const t=_.useContext(go);return e||t||"ltr"}var Je="rovingFocusGroup.onEntryFocus",bo={bubbles:!1,cancelable:!0},_e="RovingFocusGroup",[it,ir,yo]=ar(_e),[_o,lr]=ve(_e,[yo]),[wo,ko]=_o(_e),cr=_.forwardRef((e,t)=>n.jsx(it.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(it.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(So,{...e,ref:t})})}));cr.displayName=_e;var So=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:s,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,y=_.useRef(null),S=Y(t,y),N=or(o),[g,h]=ye({prop:l,defaultProp:i??null,onChange:u,caller:_e}),[w,p]=_.useState(!1),m=ee(c),v=ir(r),b=_.useRef(!1),[k,j]=_.useState(0);return _.useEffect(()=>{const T=y.current;if(T)return T.addEventListener(Je,m),()=>T.removeEventListener(Je,m)},[m]),n.jsx(wo,{scope:r,orientation:s,dir:N,loop:a,currentTabStopId:g,onItemFocus:_.useCallback(T=>h(T),[h]),onItemShiftTab:_.useCallback(()=>p(!0),[]),onFocusableItemAdd:_.useCallback(()=>j(T=>T+1),[]),onFocusableItemRemove:_.useCallback(()=>j(T=>T-1),[]),children:n.jsx(G.div,{tabIndex:w||k===0?-1:0,"data-orientation":s,...f,ref:S,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{b.current=!0}),onFocus:W(e.onFocus,T=>{const E=!b.current;if(T.target===T.currentTarget&&E&&!w){const R=new CustomEvent(Je,bo);if(T.currentTarget.dispatchEvent(R),!R.defaultPrevented){const A=v().filter(U=>U.focusable),D=A.find(U=>U.active),O=A.find(U=>U.id===g),H=[D,O,...A].filter(Boolean).map(U=>U.ref.current);pr(H,d)}}b.current=!1}),onBlur:W(e.onBlur,()=>p(!1))})})}),ur="RovingFocusGroupItem",dr=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:s=!0,active:a=!1,tabStopId:o,children:l,...i}=e,u=he(),c=o||u,d=ko(ur,r),f=d.currentTabStopId===c,y=ir(r),{onFocusableItemAdd:S,onFocusableItemRemove:N,currentTabStopId:g}=d;return _.useEffect(()=>{if(s)return S(),()=>N()},[s,S,N]),n.jsx(it.ItemSlot,{scope:r,id:c,focusable:s,active:a,children:n.jsx(G.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:W(e.onMouseDown,h=>{s?d.onItemFocus(c):h.preventDefault()}),onFocus:W(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:W(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const w=Eo(h,d.orientation,d.dir);if(w!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let m=y().filter(v=>v.focusable).map(v=>v.ref.current);if(w==="last")m.reverse();else if(w==="prev"||w==="next"){w==="prev"&&m.reverse();const v=m.indexOf(h.currentTarget);m=d.loop?Co(m,v+1):m.slice(v+1)}setTimeout(()=>pr(m))}}),children:typeof l=="function"?l({isCurrentTabStop:f,hasTabStop:g!=null}):l})})});dr.displayName=ur;var No={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jo(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Eo(e,t,r){const s=jo(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return No[s]}function pr(e,t=!1){const r=document.activeElement;for(const s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}function Co(e,t){return e.map((r,s)=>e[(t+s)%e.length])}var To=cr,Ao=dr,ze="Tabs",[Ro]=ve(ze,[lr]),fr=lr(),[Po,Nt]=Ro(ze),vr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:i,activationMode:u="automatic",...c}=e,d=or(i),[f,y]=ye({prop:s,onChange:a,defaultProp:o??"",caller:ze});return n.jsx(Po,{scope:r,baseId:he(),value:f,onValueChange:y,orientation:l,dir:d,activationMode:u,children:n.jsx(G.div,{dir:d,"data-orientation":l,...c,ref:t})})});vr.displayName=ze;var mr="TabsList",hr=_.forwardRef((e,t)=>{const{__scopeTabs:r,loop:s=!0,...a}=e,o=Nt(mr,r),l=fr(r);return n.jsx(To,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:s,children:n.jsx(G.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});hr.displayName=mr;var xr="TabsTrigger",gr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,disabled:a=!1,...o}=e,l=Nt(xr,r),i=fr(r),u=_r(l.baseId,s),c=wr(l.baseId,s),d=s===l.value;return n.jsx(Ao,{asChild:!0,...i,focusable:!a,active:d,children:n.jsx(G.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:u,...o,ref:t,onMouseDown:W(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?l.onValueChange(s):f.preventDefault()}),onKeyDown:W(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&l.onValueChange(s)}),onFocus:W(e.onFocus,()=>{const f=l.activationMode!=="manual";!d&&!a&&f&&l.onValueChange(s)})})})});gr.displayName=xr;var br="TabsContent",yr=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:s,forceMount:a,children:o,...l}=e,i=Nt(br,r),u=_r(i.baseId,s),c=wr(i.baseId,s),d=s===i.value,f=_.useRef(d);return _.useEffect(()=>{const y=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(y)},[]),n.jsx(me,{present:a||d,children:({present:y})=>n.jsx(G.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":u,hidden:!y,id:c,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:y&&o})})});yr.displayName=br;function _r(e,t){return`${e}-trigger-${t}`}function wr(e,t){return`${e}-content-${t}`}var Do=vr,Fo=hr,Lo=gr,Io=yr;const Mo=Do,Oo=x.forwardRef(function({className:t,...r},s){return n.jsx(Fo,{ref:s,className:C("vx-tabs__list",t),...r})}),$o=x.forwardRef(function({className:t,...r},s){return n.jsx(Lo,{ref:s,className:C("vx-tabs__trigger",t),...r})}),Bo=x.forwardRef(function({className:t,...r},s){return n.jsx(Io,{ref:s,className:C("vx-tabs__content",t),...r})}),kr={light:{label:"Light",mode:"light"},dark:{label:"Dark",mode:"dark"}};function X(e,t={}){return{label:t.label,mode:e,tokens:t.tokens}}const zo={...kr,sunset:X("light",{label:"Sunset",tokens:{"--vx-primary":"#c2410c","--vx-primary-strong":"#9a3412","--vx-primary-soft":"rgba(194, 65, 12, 0.12)","--vx-secondary":"#9a3412","--vx-bg":"#fff7ed","--vx-bg-accent":"#ffedd5","--vx-surface-hover":"#fffaf5","--vx-border":"#fed7aa","--vx-border-strong":"#fdba74","--vx-text":"#431407","--vx-text-secondary":"#9a3412","--vx-text-muted":"#b45309","--vx-shadow-sm":"0 1px 2px rgba(124, 45, 18, 0.08)","--vx-shadow":"0 14px 32px rgba(124, 45, 18, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(124, 45, 18, 0.12)"}}),mint:X("light",{label:"Mint",tokens:{"--vx-primary":"#0f766e","--vx-primary-strong":"#115e59","--vx-primary-soft":"rgba(15, 118, 110, 0.12)","--vx-secondary":"#0f766e","--vx-bg":"#f0fdfa","--vx-bg-accent":"#ccfbf1","--vx-surface-hover":"#f6fffd","--vx-border":"#99f6e4","--vx-border-strong":"#5eead4","--vx-text":"#042f2e","--vx-text-secondary":"#115e59","--vx-text-muted":"#0f766e","--vx-shadow-sm":"0 1px 2px rgba(4, 47, 46, 0.08)","--vx-shadow":"0 14px 32px rgba(4, 47, 46, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(4, 47, 46, 0.12)"}}),graphite:X("dark",{label:"Graphite",tokens:{"--vx-primary":"#f59e0b","--vx-primary-strong":"#d97706","--vx-primary-soft":"rgba(245, 158, 11, 0.16)","--vx-bg":"#111111","--vx-bg-accent":"#191919","--vx-surface":"#18181b","--vx-surface-strong":"#111111","--vx-surface-hover":"#222225","--vx-border":"rgba(244, 244, 245, 0.10)","--vx-border-strong":"rgba(244, 244, 245, 0.18)","--vx-text":"#fafafa","--vx-text-secondary":"#d4d4d8","--vx-text-muted":"#a1a1aa","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.34)","--vx-shadow":"0 20px 44px rgba(0, 0, 0, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.38)"}}),"ivory-gold":X("light",{label:"Ivory Gold",tokens:{"--vx-primary":"#a0742a","--vx-primary-strong":"#7d5a1e","--vx-primary-soft":"rgba(160, 116, 42, 0.12)","--vx-bg":"#faf6ee","--vx-bg-accent":"#f2ead8","--vx-surface":"#ffffff","--vx-surface-strong":"#faf6ee","--vx-surface-hover":"#f6f0e4","--vx-border":"rgba(160, 116, 42, 0.18)","--vx-border-strong":"rgba(160, 116, 42, 0.38)","--vx-text":"#1c1409","--vx-text-secondary":"#5a4320","--vx-text-muted":"#9a7c4a","--vx-shadow-sm":"0 1px 2px rgba(90, 67, 32, 0.08)","--vx-shadow":"0 12px 32px rgba(90, 67, 32, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(90, 67, 32, 0.14)","--vx-success":"#1a9e6e","--vx-warning":"#c4820a","--vx-danger":"#d63b3b"}}),"black-gold":X("dark",{label:"Black Gold",tokens:{"--vx-primary":"#c8a97c","--vx-primary-strong":"#9a7545","--vx-primary-soft":"rgba(200, 169, 124, 0.16)","--vx-bg":"#05070b","--vx-bg-accent":"#0a0d14","--vx-surface":"rgba(15, 18, 25, 0.76)","--vx-surface-strong":"rgba(18, 21, 29, 0.9)","--vx-surface-hover":"rgba(245, 233, 215, 0.1)","--vx-border":"rgba(245, 233, 215, 0.12)","--vx-border-strong":"rgba(200, 169, 124, 0.42)","--vx-text":"#f5e9d7","--vx-text-secondary":"#d7c8b2","--vx-text-muted":"#928a81","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.4)","--vx-shadow":"0 0 42px rgba(200, 169, 124, 0.16)","--vx-shadow-lg":"0 34px 120px rgba(0, 0, 0, 0.62)","--vx-success":"#32d49a","--vx-warning":"#e6ad64","--vx-danger":"#ef6a64"}}),ocean:X("dark",{label:"Ocean",tokens:{"--vx-primary":"#38bdf8","--vx-primary-strong":"#0ea5e9","--vx-primary-soft":"rgba(56, 189, 248, 0.16)","--vx-bg":"#06131f","--vx-bg-accent":"#0b1a2b","--vx-surface":"#0d2236","--vx-surface-strong":"#06131f","--vx-surface-hover":"#13314d","--vx-border":"rgba(125, 211, 252, 0.16)","--vx-border-strong":"rgba(56, 189, 248, 0.24)","--vx-text":"#e0f2fe","--vx-text-secondary":"#bae6fd","--vx-text-muted":"#7dd3fc","--vx-shadow-sm":"0 1px 2px rgba(2, 6, 23, 0.34)","--vx-shadow":"0 20px 44px rgba(2, 6, 23, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(2, 6, 23, 0.4)"}}),indigo:X("light",{label:"Indigo",tokens:{"--vx-primary":"#5c5fe8","--vx-primary-strong":"#4f52d4","--vx-primary-soft":"rgba(92, 95, 232, 0.10)","--vx-secondary":"#818cf8","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#5c5fe8","--vx-bg":"#e8ecf6","--vx-bg-accent":"#dde3f0","--vx-surface":"#ffffff","--vx-surface-strong":"#f8f9ff","--vx-surface-hover":"#f4f5ff","--vx-border":"#d4daf0","--vx-border-strong":"#bfc8e8","--vx-text":"#1a2336","--vx-text-secondary":"#4a5572","--vx-text-muted":"#8b96b4","--vx-shadow-sm":"0 1px 3px rgba(28, 40, 80, 0.08)","--vx-shadow":"0 8px 28px rgba(28, 40, 80, 0.10)","--vx-shadow-lg":"0 24px 60px rgba(28, 40, 80, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #f8f9ff 93%, transparent)","--vx-glass-border":"rgba(92, 95, 232, 0.18)","--vx-glass-shadow":"0 16px 44px rgba(28, 40, 80, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.70)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"22px"}}),violet:X("light",{label:"Violet",tokens:{"--vx-primary":"#7c3aed","--vx-primary-strong":"#6d28d9","--vx-primary-soft":"rgba(124, 58, 237, 0.10)","--vx-secondary":"#8b5cf6","--vx-success":"#059669","--vx-warning":"#d97706","--vx-danger":"#dc2626","--vx-info":"#6d28d9","--vx-bg":"#f8f7ff","--vx-bg-accent":"#ede9fe","--vx-surface":"#ffffff","--vx-surface-strong":"#faf9ff","--vx-surface-hover":"#f5f3ff","--vx-border":"#e4dfff","--vx-border-strong":"#c9bffd","--vx-text":"#1e1b2e","--vx-text-secondary":"#6e6a8a","--vx-text-muted":"#a89fc8","--vx-shadow-sm":"0 1px 3px rgba(109, 40, 217, 0.07)","--vx-shadow":"0 12px 32px rgba(109, 40, 217, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(109, 40, 217, 0.14)","--vx-glass-bg":"color-mix(in srgb, #ffffff 84%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #faf9ff 92%, transparent)","--vx-glass-border":"rgba(196, 181, 253, 0.55)","--vx-glass-shadow":"0 18px 48px rgba(109, 40, 217, 0.12)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.60)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),"violet-dark":X("dark",{label:"Violet Dark",tokens:{"--vx-primary":"#a78bfa","--vx-primary-strong":"#8b5cf6","--vx-primary-soft":"rgba(167, 139, 250, 0.16)","--vx-secondary":"#c4b5fd","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#c4b5fd","--vx-bg":"#0d0b1a","--vx-bg-accent":"#13102a","--vx-surface":"#1a1735","--vx-surface-strong":"#0d0b1a","--vx-surface-hover":"#1e1b3a","--vx-border":"rgba(167, 139, 250, 0.16)","--vx-border-strong":"rgba(167, 139, 250, 0.30)","--vx-text":"#f0eeff","--vx-text-secondary":"#c4b5fd","--vx-text-muted":"#8b7fc8","--vx-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.40)","--vx-shadow":"0 18px 44px rgba(0, 0, 0, 0.30)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.44)","--vx-glass-bg":"color-mix(in srgb, #1a1735 86%, transparent)","--vx-glass-bg-strong":"color-mix(in srgb, #0d0b1a 94%, transparent)","--vx-glass-border":"rgba(167, 139, 250, 0.22)","--vx-glass-shadow":"0 22px 54px rgba(0, 0, 0, 0.50)","--vx-glass-highlight":"inset 0 1px 0 rgba(255, 255, 255, 0.07)","--vx-glass-scrim":"color-mix(in srgb, #04030d 62%, transparent)","--vx-radius-sm":"10px","--vx-radius":"12px","--vx-radius-lg":"16px","--vx-radius-xl":"24px"}}),vxai:X("light",{label:"VXAI (Default)",tokens:{"--vx-primary":"#4f46e5","--vx-primary-strong":"#4338ca","--vx-primary-soft":"rgba(79, 70, 229, 0.1)","--vx-secondary":"#64748b","--vx-success":"#10b981","--vx-warning":"#f59e0b","--vx-danger":"#ef4444","--vx-info":"#4f46e5","--vx-bg":"#f8fafc","--vx-bg-accent":"#f1f5f9","--vx-surface":"#ffffff","--vx-surface-strong":"#f8fafc","--vx-surface-hover":"#f1f5f9","--vx-border":"#e2e8f0","--vx-border-strong":"#cbd5e1","--vx-text":"#0f172a","--vx-text-secondary":"#334155","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px 0 rgba(0, 0, 0, 0.1)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)","--vx-glass-bg":"rgba(255, 255, 255, 0.8)","--vx-glass-bg-strong":"rgba(255, 255, 255, 0.95)","--vx-glass-border":"#e2e8f0","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}}),"vxai-dark":X("dark",{label:"VXAI Dark",tokens:{"--vx-primary":"#6366f1","--vx-primary-strong":"#4f46e5","--vx-primary-soft":"rgba(99, 102, 241, 0.16)","--vx-secondary":"#cbd5e1","--vx-success":"#34d399","--vx-warning":"#fbbf24","--vx-danger":"#f87171","--vx-info":"#6366f1","--vx-bg":"#020617","--vx-bg-accent":"#0f172a","--vx-surface":"#0f172a","--vx-surface-strong":"#020617","--vx-surface-hover":"#1e293b","--vx-border":"oklch(27.8% 0.033 256.848)","--vx-border-strong":"#334155","--vx-text":"oklch(96.8% 0.007 247.896)","--vx-text-secondary":"#94a3b8","--vx-text-muted":"#64748b","--vx-shadow-sm":"0 1px 2px -1px rgba(0, 0, 0, 0.4), 0 1px 3px 0 rgba(0, 0, 0, 0.4)","--vx-shadow":"0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4)","--vx-shadow-lg":"0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4)","--vx-glass-bg":"rgba(15, 23, 42, 0.7)","--vx-glass-bg-strong":"rgba(15, 23, 42, 0.95)","--vx-glass-border":"oklch(27.8% 0.033 256.848)","--vx-glass-shadow":"none","--vx-glass-highlight":"none","--vx-radius-sm":"4px","--vx-radius":"6px","--vx-radius-lg":"8px","--vx-radius-xl":"12px"}})};function Ho(e){return{...kr,...e}}function Uo(e,t){if(e&&t[e])return e;if(t.light)return"light";const[r]=Object.keys(t);return r??"light"}function Wo(e,t){const r=window.localStorage.getItem(e);return r&&t[r]?r:null}function Go(e,t,r){var a;if(((a=e[r])==null?void 0:a.mode)===t)return r;const s=Object.entries(e).find(([,o])=>o.mode===t);return s==null?void 0:s[0]}const Sr=x.createContext(null);function Vo({children:e,defaultTheme:t="light",storageKey:r="vxui-react-theme",themes:s}){const a=x.useMemo(()=>Ho(s),[s]),o=x.useMemo(()=>Uo(t,a),[t,a]),l=x.useRef([]),[i,u]=x.useState(()=>typeof window>"u"?o:Wo(r,a)??o),c=a[i]?i:o,d=a[c];x.useEffect(()=>{i!==c&&u(c)},[c,i]),x.useEffect(()=>{const y=document.documentElement;for(const N of l.current)y.style.removeProperty(N);y.dataset.theme=d.mode,y.dataset.themeName=c;const S=Object.entries(d.tokens??{}).filter(N=>typeof N[1]=="string"&&N[1].length>0);for(const[N,g]of S)y.style.setProperty(N,g);l.current=S.map(([N])=>N),window.localStorage.setItem(r,c)},[d,c,r]);const f=x.useMemo(()=>({theme:c,mode:d.mode,themes:a,setTheme:y=>{u(a[y]?y:o)},toggleTheme:()=>{u(y=>{const N=(a[y]??d).mode==="light"?"dark":"light";return Go(a,N,N)??y})}}),[d,o,a,c]);return n.jsx(Sr.Provider,{value:f,children:e})}function Ko(){const e=x.useContext(Sr);if(!e)throw new Error("useTheme must be used within ThemeProvider.");return e}var qo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Yo="VisuallyHidden",jt=_.forwardRef((e,t)=>n.jsx(G.span,{...e,ref:t,style:{...qo,...e.style}}));jt.displayName=Yo;var Et="ToastProvider",[Ct,Xo,Zo]=ar("Toast"),[Nr]=ve("Toast",[Zo]),[Qo,He]=Nr(Et),jr=e=>{const{__scopeToast:t,label:r="Notification",duration:s=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:l}=e,[i,u]=_.useState(null),[c,d]=_.useState(0),f=_.useRef(!1),y=_.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Et}\`. Expected non-empty \`string\`.`),n.jsx(Ct.Provider,{scope:t,children:n.jsx(Qo,{scope:t,label:r,duration:s,swipeDirection:a,swipeThreshold:o,toastCount:c,viewport:i,onViewportChange:u,onToastAdd:_.useCallback(()=>d(S=>S+1),[]),onToastRemove:_.useCallback(()=>d(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:y,children:l})})};jr.displayName=Et;var Er="ToastViewport",Jo=["F8"],lt="toast.viewportPause",ct="toast.viewportResume",Cr=_.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:s=Jo,label:a="Notifications ({hotkey})",...o}=e,l=He(Er,r),i=Xo(r),u=_.useRef(null),c=_.useRef(null),d=_.useRef(null),f=_.useRef(null),y=Y(t,f,l.onViewportChange),S=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=l.toastCount>0;_.useEffect(()=>{const h=w=>{var m;s.length!==0&&s.every(v=>w[v]||w.code===v)&&((m=f.current)==null||m.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s]),_.useEffect(()=>{const h=u.current,w=f.current;if(N&&h&&w){const p=()=>{if(!l.isClosePausedRef.current){const k=new CustomEvent(lt);w.dispatchEvent(k),l.isClosePausedRef.current=!0}},m=()=>{if(l.isClosePausedRef.current){const k=new CustomEvent(ct);w.dispatchEvent(k),l.isClosePausedRef.current=!1}},v=k=>{!h.contains(k.relatedTarget)&&m()},b=()=>{h.contains(document.activeElement)||m()};return h.addEventListener("focusin",p),h.addEventListener("focusout",v),h.addEventListener("pointermove",p),h.addEventListener("pointerleave",b),window.addEventListener("blur",p),window.addEventListener("focus",m),()=>{h.removeEventListener("focusin",p),h.removeEventListener("focusout",v),h.removeEventListener("pointermove",p),h.removeEventListener("pointerleave",b),window.removeEventListener("blur",p),window.removeEventListener("focus",m)}}},[N,l.isClosePausedRef]);const g=_.useCallback(({tabbingDirection:h})=>{const p=i().map(m=>{const v=m.ref.current,b=[v,...fi(v)];return h==="forwards"?b:b.reverse()});return(h==="forwards"?p.reverse():p).flat()},[i]);return _.useEffect(()=>{const h=f.current;if(h){const w=p=>{var b,k,j;const m=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!m){const T=document.activeElement,E=p.shiftKey;if(p.target===h&&E){(b=c.current)==null||b.focus();return}const D=g({tabbingDirection:E?"backwards":"forwards"}),O=D.findIndex(F=>F===T);et(D.slice(O+1))?p.preventDefault():E?(k=c.current)==null||k.focus():(j=d.current)==null||j.focus()}};return h.addEventListener("keydown",w),()=>h.removeEventListener("keydown",w)}},[i,g]),n.jsxs(Xs,{ref:u,role:"region","aria-label":a.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:N?void 0:"none"},children:[N&&n.jsx(ut,{ref:c,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"forwards"});et(h)}}),n.jsx(Ct.Slot,{scope:r,children:n.jsx(G.ol,{tabIndex:-1,...o,ref:y})}),N&&n.jsx(ut,{ref:d,onFocusFromOutsideViewport:()=>{const h=g({tabbingDirection:"backwards"});et(h)}})]})});Cr.displayName=Er;var Tr="ToastFocusProxy",ut=_.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:s,...a}=e,o=He(Tr,r);return n.jsx(jt,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{var c;const i=l.relatedTarget;!((c=o.viewport)!=null&&c.contains(i))&&s()}})});ut.displayName=Tr;var we="Toast",ei="toast.swipeStart",ti="toast.swipeMove",ni="toast.swipeCancel",ri="toast.swipeEnd",Ar=_.forwardRef((e,t)=>{const{forceMount:r,open:s,defaultOpen:a,onOpenChange:o,...l}=e,[i,u]=ye({prop:s,defaultProp:a??!0,onChange:o,caller:we});return n.jsx(me,{present:r||i,children:n.jsx(oi,{open:i,...l,ref:t,onClose:()=>u(!1),onPause:ee(e.onPause),onResume:ee(e.onResume),onSwipeStart:W(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:W(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:W(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Ar.displayName=we;var[si,ai]=Nr(we,{onClose(){}}),oi=_.forwardRef((e,t)=>{const{__scopeToast:r,type:s="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:i,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:y,onSwipeEnd:S,...N}=e,g=He(we,r),[h,w]=_.useState(null),p=Y(t,F=>w(F)),m=_.useRef(null),v=_.useRef(null),b=a||g.duration,k=_.useRef(0),j=_.useRef(b),T=_.useRef(0),{onToastAdd:E,onToastRemove:R}=g,A=ee(()=>{var H;(h==null?void 0:h.contains(document.activeElement))&&((H=g.viewport)==null||H.focus()),l()}),D=_.useCallback(F=>{!F||F===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(A,F))},[A]);_.useEffect(()=>{const F=g.viewport;if(F){const H=()=>{D(j.current),c==null||c()},U=()=>{const K=new Date().getTime()-k.current;j.current=j.current-K,window.clearTimeout(T.current),u==null||u()};return F.addEventListener(lt,U),F.addEventListener(ct,H),()=>{F.removeEventListener(lt,U),F.removeEventListener(ct,H)}}},[g.viewport,b,u,c,D]),_.useEffect(()=>{o&&!g.isClosePausedRef.current&&D(b)},[o,b,g.isClosePausedRef,D]),_.useEffect(()=>(E(),()=>R()),[E,R]);const O=_.useMemo(()=>h?Ir(h):null,[h]);return g.viewport?n.jsxs(n.Fragment,{children:[O&&n.jsx(ii,{__scopeToast:r,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:O}),n.jsx(si,{scope:r,onClose:A,children:on.createPortal(n.jsx(Ct.ItemSlot,{scope:r,children:n.jsx(Ys,{asChild:!0,onEscapeKeyDown:W(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||A(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:n.jsx(G.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...N,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,F=>{F.key==="Escape"&&(i==null||i(F.nativeEvent),F.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:W(e.onPointerDown,F=>{F.button===0&&(m.current={x:F.clientX,y:F.clientY})}),onPointerMove:W(e.onPointerMove,F=>{if(!m.current)return;const H=F.clientX-m.current.x,U=F.clientY-m.current.y,K=!!v.current,L=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,$=L?I(0,H):0,P=L?0:I(0,U),M=F.pointerType==="touch"?10:2,B={x:$,y:P},z={originalEvent:F,delta:B};K?(v.current=B,Te(ti,f,z,{discrete:!1})):Kt(B,g.swipeDirection,M)?(v.current=B,Te(ei,d,z,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(H)>M||Math.abs(U)>M)&&(m.current=null)}),onPointerUp:W(e.onPointerUp,F=>{const H=v.current,U=F.target;if(U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),v.current=null,m.current=null,H){const K=F.currentTarget,L={originalEvent:F,delta:H};Kt(H,g.swipeDirection,g.swipeThreshold)?Te(ri,S,L,{discrete:!0}):Te(ni,y,L,{discrete:!0}),K.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),ii=e=>{const{__scopeToast:t,children:r,...s}=e,a=He(we,t),[o,l]=_.useState(!1),[i,u]=_.useState(!1);return di(()=>l(!0)),_.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),i?null:n.jsx(vt,{asChild:!0,children:n.jsx(jt,{...s,children:o&&n.jsxs(n.Fragment,{children:[a.label," ",r]})})})},li="ToastTitle",Rr=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e;return n.jsx(G.div,{...s,ref:t})});Rr.displayName=li;var ci="ToastDescription",Pr=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e;return n.jsx(G.div,{...s,ref:t})});Pr.displayName=ci;var Dr="ToastAction",ui=_.forwardRef((e,t)=>{const{altText:r,...s}=e;return r.trim()?n.jsx(Lr,{altText:r,asChild:!0,children:n.jsx(Tt,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dr}\`. Expected non-empty \`string\`.`),null)});ui.displayName=Dr;var Fr="ToastClose",Tt=_.forwardRef((e,t)=>{const{__scopeToast:r,...s}=e,a=ai(Fr,r);return n.jsx(Lr,{asChild:!0,children:n.jsx(G.button,{type:"button",...s,ref:t,onClick:W(e.onClick,a.onClose)})})});Tt.displayName=Fr;var Lr=_.forwardRef((e,t)=>{const{__scopeToast:r,altText:s,...a}=e;return n.jsx(G.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...a,ref:t})});function Ir(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),pi(s)){const a=s.ariaHidden||s.hidden||s.style.display==="none",o=s.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=s.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...Ir(s))}}),t}function Te(e,t,r,{discrete:s}){const a=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?kn(a,o):a.dispatchEvent(o)}var Kt=(e,t,r=0)=>{const s=Math.abs(e.x),a=Math.abs(e.y),o=s>a;return t==="left"||t==="right"?o&&s>r:!o&&a>r};function di(e=()=>{}){const t=ee(e);ie(()=>{let r=0,s=0;return r=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(s)}},[t])}function pi(e){return e.nodeType===e.ELEMENT_NODE}function fi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function et(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var vi=jr,mi=Cr,hi=Ar,xi=Rr,gi=Pr,bi=Tt;const Mr=x.createContext(null);let yi=1;const _i={info:n.jsx(vs,{size:15}),success:n.jsx(os,{size:15}),warning:n.jsx(gs,{size:15}),danger:n.jsx(ss,{size:15})};function wi({children:e,placement:t="bottom-right"}){const[r,s]=x.useState([]),a=x.useMemo(()=>({push:o=>{s(l=>[...l,{id:yi+=1,tone:"info",...o}])}}),[]);return n.jsx(Mr.Provider,{value:a,children:n.jsxs(vi,{swipeDirection:"right",children:[e,r.map(o=>n.jsxs(hi,{className:C("vx-toast",`vx-toast--${o.tone??"info"}`,!o.description&&"vx-toast--no-desc"),duration:o.duration??4500,open:!0,onOpenChange:l=>{l||s(i=>i.filter(u=>u.id!==o.id))},children:[n.jsxs("div",{className:"vx-toast__content",children:[n.jsxs("div",{className:"vx-toast__header",children:[n.jsx("span",{className:"vx-toast__icon","aria-hidden":"true",children:_i[o.tone??"info"]}),n.jsx(xi,{className:"vx-toast__title",children:o.title})]}),o.description?n.jsx(gi,{className:"vx-toast__description",children:o.description}):null]}),o.closable!==!1&&n.jsx(bi,{className:"vx-toast__close","aria-label":"Dismiss notification",children:n.jsx(re,{size:14})})]},o.id)),n.jsx(mi,{className:C("vx-toast__viewport",`vx-toast__viewport--${t}`)})]})})}function ki(){const e=x.useContext(Mr);if(!e)throw new Error("useToast must be used within ToastProvider.");return e}function Si({as:e="p",variant:t="default",size:r="base",weight:s="normal",truncate:a=!1,className:o,...l}){return n.jsx(e,{className:C("vx-text-component",`vx-text--${t}`,`vx-text-size--${r}`,`vx-text-weight--${s}`,a&&"vx-text--truncate",o),...l})}function Ni({as:e,level:t=2,variant:r="default",weight:s="bold",truncate:a=!1,className:o,...l}){const i=e||`h${t}`;return n.jsx(i,{className:C("vx-heading",`vx-heading--h${t}`,`vx-heading--${r}`,`vx-heading-weight--${s}`,a&&"vx-text--truncate",o),...l})}const ji=".vx-dialog__content",Ei="(max-width: 640px)";function se(e){const t=(e==null?void 0:e.closest(ji))??null,r=window.matchMedia(Ei).matches&&!t;return{dialogContent:t,shouldInline:r}}function Ci({options:e,value:t,defaultValue:r,onChange:s,placeholder:a="Select...",searchPlaceholder:o="Search...",label:l,hint:i,error:u,disabled:c,clearable:d=!1,emptyText:f="No results",searchable:y=!0,className:S}){const N=t!==void 0,[g,h]=x.useState(r),w=N?t:g,[p,m]=x.useState(!1),[v,b]=x.useState(""),k=x.useRef(null),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useId(),[A,D]=x.useState(null),O=x.useRef(null),F=e.find(I=>I.value===w),H=e.filter(I=>I.label.toLowerCase().includes(v.toLowerCase())),U=typeof y=="number"?e.length>y:y;x.useEffect(()=>{if(!p){b("");return}if(U){const I=setTimeout(()=>{var $;return($=E.current)==null?void 0:$.focus()},0);return()=>clearTimeout(I)}},[p,U]),x.useEffect(()=>{if(!p)return;const I=P=>{var z,V;const M=(z=k.current)==null?void 0:z.contains(P.target),B=(V=T.current)==null?void 0:V.contains(P.target);!M&&!B&&m(!1)},$=P=>{P.key==="Escape"&&(P.preventDefault(),m(!1))};return document.addEventListener("mousedown",I),document.addEventListener("touchstart",I,{passive:!0}),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("touchstart",I),document.removeEventListener("keydown",$)}},[p]),x.useEffect(()=>{const{shouldInline:I}=se(k.current);if(!(!p||!I))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[p]),x.useEffect(()=>{if(!p||!A)return;const I=O.current;if(I)return I.dataset.hasOpenPortal="1",()=>{delete I.dataset.hasOpenPortal}},[p,A]),x.useLayoutEffect(()=>{const{dialogContent:I,shouldInline:$}=se(k.current);if(!p||!j.current||$){D(null),O.current=null;return}O.current=I;const P=j.current.getBoundingClientRect(),M=window.innerHeight-P.bottom,B=P.top,z=M<280&&B>M?"up":"down";D(z==="down"?{top:P.bottom+4,left:P.left,width:P.width,direction:z}:{bottom:window.innerHeight-P.top+4,left:P.left,width:P.width,direction:z})},[p]),x.useEffect(()=>{if(!p||!A)return;const I=$=>{var P;(P=T.current)!=null&&P.contains($.target)||m(!1)};return window.addEventListener("scroll",I,{capture:!0,passive:!0}),window.addEventListener("resize",I),()=>{window.removeEventListener("scroll",I,{capture:!0}),window.removeEventListener("resize",I)}},[p,A]);const K=I=>{I.disabled||(N||h(I.value),s==null||s(I.value),m(!1))},L=I=>{I.stopPropagation(),N||h(void 0),s==null||s(void 0)};return n.jsxs("div",{ref:k,className:C("vx-select",p&&"vx-select--open",S),children:[l?n.jsx("span",{className:"vx-field-group__label",children:l}):null,n.jsxs("button",{ref:j,type:"button",className:C("vx-select__trigger",u&&"vx-select__trigger--invalid",c&&"vx-select__trigger--disabled"),onClick:()=>!c&&m(I=>!I),disabled:c,"aria-haspopup":"listbox","aria-expanded":p,"aria-controls":R,children:[n.jsx("span",{className:C("vx-select__value",!F&&"vx-select__value--placeholder"),children:(F==null?void 0:F.label)??a}),n.jsxs("span",{className:"vx-select__icons",children:[d&&F&&n.jsx("span",{className:"vx-select__clear",onClick:L,role:"button","aria-label":"Clear selection",children:n.jsx(re,{size:14})}),n.jsx(ge,{size:14,className:C("vx-select__chevron",p&&"vx-select__chevron--open")})]})]}),u?n.jsx("span",{className:"vx-field-group__error",children:u}):null,!u&&i?n.jsx("span",{className:"vx-field-group__hint",children:i}):null,p&&(()=>{const I=!!A,$=A?{top:A.top,bottom:A.bottom,left:A.left,width:A.width,pointerEvents:"auto"}:void 0,P=n.jsxs("div",{ref:T,className:C("vx-select__dropdown",(A==null?void 0:A.direction)==="up"&&"vx-select__dropdown--up",!!O.current&&"vx-select__dropdown--in-dialog"),style:$,children:[U&&n.jsx("div",{className:"vx-select__search-wrap",children:n.jsx("input",{ref:E,type:"text",className:"vx-select__search",placeholder:o,value:v,onChange:M=>b(M.target.value),"aria-label":o})}),n.jsx("ul",{id:R,className:"vx-select__list",role:"listbox","aria-label":l??"Options",children:H.length===0?n.jsx("li",{className:"vx-select__empty",children:f}):H.map(M=>n.jsxs("li",{className:C("vx-select__option",M.value===w&&"vx-select__option--selected",M.disabled&&"vx-select__option--disabled"),role:"option","aria-selected":M.value===w,"aria-disabled":M.disabled,onClick:()=>K(M),children:[n.jsx("span",{children:M.label}),M.value===w?n.jsx(Me,{size:14}):null]},M.value))})]});return I?ce.createPortal(P,document.body):P})()]})}function Ti({className:e,label:t,description:r,indeterminate:s,...a}){return n.jsxs("label",{className:C("vx-checkbox",a.disabled&&"vx-checkbox--disabled"),children:[n.jsxs("span",{className:"vx-checkbox__control-wrap",children:[n.jsx("input",{type:"checkbox",className:C("vx-checkbox__input",e),ref:o=>{o&&(o.indeterminate=s??!1)},...a}),n.jsx("span",{className:"vx-checkbox__box","aria-hidden":"true",children:s?n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:n.jsx("path",{d:"M2 5h6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:n.jsx("path",{d:"M2 5l2.5 2.5L8 3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t?n.jsxs("span",{className:"vx-checkbox__copy",children:[n.jsx("span",{className:"vx-checkbox__label",children:t}),r?n.jsx("span",{className:"vx-checkbox__description",children:r}):null]}):null]})}function Ai({options:e,value:t,defaultValue:r,onChange:s,className:a,fullWidth:o,size:l="md"}){var h;const[i,u]=x.useState(r??((h=e[0])==null?void 0:h.value)),c=t!==void 0,d=c?t:i,[f,y]=x.useState({left:0,width:0,opacity:0}),S=x.useRef(null),N=x.useRef({});x.useEffect(()=>{requestAnimationFrame(()=>{const w=N.current[d];w&&y({left:w.offsetLeft,width:w.offsetWidth,opacity:1})})},[d,e,o,l]);const g=w=>{c||u(w),s==null||s(w)};return n.jsxs("div",{ref:S,className:C("vx-segmented-control",`vx-segmented-control--${l}`,o&&"vx-segmented-control--full",a),children:[n.jsx("div",{className:"vx-segmented-control__slider",style:{transform:`translateX(${f.left}px)`,width:`${f.width}px`,opacity:f.opacity}}),e.map(w=>{const p=d===w.value;return n.jsx("button",{ref:m=>{N.current[w.value]=m},type:"button",role:"radio","aria-checked":p,disabled:w.disabled,onClick:()=>!w.disabled&&g(w.value),className:C("vx-segmented-control__item",p&&"vx-segmented-control__item--active"),children:w.label},w.value)})]})}function Ri({className:e,label:t,description:r,...s}){return n.jsxs("label",{className:C("vx-radio",s.disabled&&"vx-radio--disabled"),children:[n.jsxs("span",{className:"vx-radio__control-wrap",children:[n.jsx("input",{type:"radio",className:C("vx-radio__input",e),...s}),n.jsx("span",{className:"vx-radio__circle","aria-hidden":"true",children:n.jsx("span",{className:"vx-radio__dot"})})]}),t?n.jsxs("span",{className:"vx-radio__copy",children:[n.jsx("span",{className:"vx-radio__label",children:t}),r?n.jsx("span",{className:"vx-radio__description",children:r}):null]}):null]})}function Pi({label:e,children:t,className:r}){return n.jsxs("fieldset",{className:C("vx-radio-group",r),children:[e?n.jsx("legend",{className:"vx-field-group__label",children:e}):null,n.jsx("div",{className:"vx-radio-group__items",children:t})]})}function Di({className:e,label:t,hint:r,resize:s="vertical",style:a,...o}){return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsx("textarea",{className:C("vx-textarea",e),style:{resize:s,...a},...o}),r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function Fi({className:e,label:t,showValue:r=!1,hint:s,value:a,defaultValue:o,...l}){const i=a??o??"";return n.jsxs("label",{className:"vx-field-group",children:[t||r?n.jsxs("span",{className:"vx-slider__header",children:[t?n.jsx("span",{className:"vx-field-group__label vx-slider__label",children:t}):null,r?n.jsx("span",{className:"vx-slider__value",children:i}):null]}):null,n.jsx("input",{type:"range",className:C("vx-slider",e),value:a,defaultValue:o,...l}),s?n.jsx("span",{className:"vx-field-group__hint",children:s}):null]})}const Li={sm:16,md:24,lg:36};function Ii({className:e,size:t="md",label:r="Loading…",...s}){const a=Li[t];return n.jsx("span",{role:"status","aria-label":r,className:C("vx-spinner",`vx-spinner--${t}`,e),...s,children:n.jsx("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:n.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42 14"})})})}function Mi({className:e,value:t=0,max:r=100,label:s,showLabel:a=!1,size:o="md",variant:l="default",indeterminate:i=!1,...u}){const c=i?void 0:Math.min(100,Math.max(0,t/r*100));return n.jsxs("div",{className:C("vx-progress-wrap",e),...u,children:[s||a?n.jsxs("div",{className:"vx-progress__header",children:[s?n.jsx("span",{className:"vx-progress__label",children:s}):null,a&&!i?n.jsxs("span",{className:"vx-progress__value",children:[Math.round(c),"%"]}):null]}):null,n.jsx("div",{role:"progressbar","aria-valuenow":i?void 0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":s,className:C("vx-progress",`vx-progress--${o}`,`vx-progress--${l}`,i&&"vx-progress--indeterminate"),children:n.jsx("div",{className:"vx-progress__bar",style:i?void 0:{width:`${c}%`}})})]})}const Oi={info:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M8 7v4M8 5.5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),success:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M5 8.5l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),warning:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("path",{d:"M8 2L14.5 13.5H1.5L8 2z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),n.jsx("path",{d:"M8 6.5v3M8 11v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),danger:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M10 6L6 10M6 6l4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};function $i({className:e,variant:t="info",title:r,icon:s,onClose:a,children:o,...l}){return n.jsxs("div",{role:"alert",className:C("vx-alert",`vx-alert--${t}`,e),...l,children:[n.jsx("span",{className:"vx-alert__icon",children:s??Oi[t]}),n.jsxs("div",{className:"vx-alert__body",children:[r?n.jsx("p",{className:"vx-alert__title",children:r}):null,o?n.jsx("div",{className:"vx-alert__content",children:o}):null]}),a?n.jsx("button",{type:"button",className:"vx-alert__close",onClick:a,"aria-label":"关闭",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):null]})}function Bi({className:e,width:t,height:r,variant:s="rect",lines:a=1,style:o,...l}){return s==="text"&&a>1?n.jsx("span",{className:C("vx-skeleton-text",e),...l,children:Array.from({length:a}).map((i,u)=>n.jsx("span",{className:"vx-skeleton vx-skeleton--text",style:u===a-1?{width:"70%"}:void 0},u))}):n.jsx("span",{className:C("vx-skeleton",`vx-skeleton--${s}`,e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r,...o},...l})}function zi({content:e,placement:t="top",delay:r=600,children:s,className:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useCallback(()=>{i.current=setTimeout(()=>l(!0),r)},[r]),c=x.useCallback(()=>{i.current&&clearTimeout(i.current),l(!1)},[]);return x.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),n.jsxs("span",{className:C("vx-tooltip-wrap",a),onMouseEnter:u,onMouseLeave:c,onFocus:u,onBlur:c,children:[s,o?n.jsx("span",{role:"tooltip",className:C("vx-tooltip",`vx-tooltip--${t}`),children:e}):null]})}function Hi({content:e,placement:t="bottom",trigger:r="click",children:s,className:a,open:o,onOpenChange:l}){const[i,u]=x.useState(!1),c=o!==void 0,d=c?o:i,f=x.useRef(null),y=x.useCallback(g=>{c||u(g),l==null||l(g)},[c,l]),S=x.useCallback(()=>y(!d),[d,y]);x.useEffect(()=>{if(!d)return;const g=w=>{w.key==="Escape"&&y(!1)},h=w=>{f.current&&!f.current.contains(w.target)&&y(!1)};return document.addEventListener("keydown",g),document.addEventListener("mousedown",h),()=>{document.removeEventListener("keydown",g),document.removeEventListener("mousedown",h)}},[d,y]);const N=r==="click"?{onClick:S}:{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1)};return n.jsxs("div",{ref:f,className:C("vx-popover-wrap",a),...N,children:[s,d?n.jsx("div",{className:C("vx-popover",`vx-popover--${t}`),role:"dialog",children:e}):null]})}function Ui({trigger:e,groups:t,items:r,align:s="left",className:a,open:o,onOpenChange:l}){const[i,u]=x.useState(!1),c=o!==void 0,d=c?o:i,f=x.useRef(null),y=x.useRef(null),[S,N]=x.useState(s);x.useLayoutEffect(()=>{d&&N(s)},[d,s]),x.useLayoutEffect(()=>{if(!d||!y.current)return;const p=y.current.getBoundingClientRect();if(p.width===0&&p.height===0)return;const m=8;S==="left"&&p.right>window.innerWidth-m?N("right"):S==="right"&&p.left<m&&N("left")},[d,S]);const g=x.useCallback(p=>{c||u(p),l==null||l(p)},[c,l]),h=x.useCallback(()=>g(!d),[d,g]);x.useEffect(()=>{if(!d)return;const p=v=>{v.key==="Escape"&&g(!1)},m=v=>{f.current&&!f.current.contains(v.target)&&g(!1)};return document.addEventListener("keydown",p),document.addEventListener("mousedown",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("mousedown",m)}},[d,g]);const w=t??(r?[{items:r}]:[]);return n.jsxs("div",{ref:f,className:C("vx-dropdown",d&&"vx-dropdown--open",a),children:[n.jsx("div",{className:"vx-dropdown__trigger",onClick:h,role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&h()},children:e}),d?n.jsx("div",{ref:y,className:C("vx-dropdown__menu",`vx-dropdown__menu--${S}`),role:"menu",children:w.map((p,m)=>n.jsxs("div",{className:"vx-dropdown__group",children:[p.label?n.jsx("div",{className:"vx-dropdown__group-label",children:p.label}):null,m>0&&!p.label?n.jsx("div",{className:"vx-dropdown__separator",role:"separator"}):null,p.items.map((v,b)=>n.jsxs("button",{role:"menuitem",disabled:v.disabled,className:C("vx-dropdown__item",v.danger&&"vx-dropdown__item--danger",v.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var k;v.disabled||((k=v.onClick)==null||k.call(v),g(!1))},children:[v.icon?n.jsx("span",{className:"vx-dropdown__item-icon",children:v.icon}):null,n.jsx("span",{className:"vx-dropdown__item-label",children:v.label}),v.shortcut?n.jsx("kbd",{className:"vx-dropdown__shortcut",children:v.shortcut}):null]},b))]},m))}):null]})}const Wi=()=>n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M4.5 2.5L7.5 6l-3 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Gi({items:e,separator:t,className:r}){return n.jsx("nav",{"aria-label":"Breadcrumb",className:C("vx-breadcrumb",r),children:n.jsx("ol",{className:"vx-breadcrumb__list",children:e.map((s,a)=>{const o=a===e.length-1;return n.jsxs("li",{className:"vx-breadcrumb__item",children:[o?n.jsx("span",{className:"vx-breadcrumb__current","aria-current":"page",children:s.label}):s.href?n.jsx("a",{href:s.href,className:"vx-breadcrumb__link",children:s.label}):n.jsx("button",{type:"button",className:"vx-breadcrumb__link",onClick:s.onClick,children:s.label}),o?null:n.jsx("span",{className:"vx-breadcrumb__sep","aria-hidden":"true",children:t??n.jsx(Wi,{})})]},a)})})})}function Ae(e,t){return Array.from({length:t-e+1},(r,s)=>e+s)}function Vi({page:e,total:t,pageSize:r=10,siblingCount:s=1,onChange:a,className:o}){const l=Math.max(1,Math.ceil(t/r)),i=(()=>{const u=s*2+5;if(l<=u)return Ae(1,l);const c=Math.max(e-s,1),d=Math.min(e+s,l),f=c>3,y=d<l-2;return!f&&y?[...Ae(1,3+s*2),"…",l]:f&&!y?[1,"…",...Ae(l-(2+s*2),l)]:[1,"…",...Ae(c,d),"…",l]})();return n.jsxs("nav",{role:"navigation","aria-label":"Pagination",className:C("vx-pagination",o),children:[n.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--prev",disabled:e<=1,onClick:()=>a(e-1),"aria-label":"上一页",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),i.map((u,c)=>u==="…"?n.jsx("span",{className:"vx-pagination__ellipsis","aria-hidden":"true",children:"…"},`e-${c}`):n.jsx("button",{type:"button","aria-current":u===e?"page":void 0,className:C("vx-pagination__btn",u===e&&"vx-pagination__btn--active"),onClick:()=>a(u),children:u},u)),n.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--next",disabled:e>=l,onClick:()=>a(e+1),"aria-label":"下一页",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M5 11l4-4-4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function Ki({items:e,multiple:t=!1,defaultOpen:r=[],className:s}){const[a,o]=x.useState(new Set(r));function l(i){o(u=>{const c=new Set(t?u:[]);return u.has(i)?c.delete(i):c.add(i),c})}return n.jsx("div",{className:C("vx-accordion",s),children:e.map(i=>{const u=a.has(i.key);return n.jsxs("div",{className:C("vx-accordion__item",u&&"vx-accordion__item--open",i.disabled&&"vx-accordion__item--disabled"),children:[n.jsxs("button",{type:"button",disabled:i.disabled,"aria-expanded":u,className:"vx-accordion__trigger",onClick:()=>!i.disabled&&l(i.key),children:[n.jsx("span",{className:"vx-accordion__title",children:i.title}),n.jsx("span",{className:"vx-accordion__chevron","aria-hidden":"true",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:n.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),u?n.jsx("div",{className:"vx-accordion__content",children:i.content}):null]},i.key)})})}function qi({className:e,orientation:t="horizontal",decorative:r=!0,...s}){return n.jsx("hr",{role:r?"none":"separator","aria-orientation":r?void 0:t,className:C("vx-separator",`vx-separator--${t}`,e),...s})}function Yi(e){const t=e.trim().split(/\s+/);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}const qt=[0,30,60,120,160,200,240,270,300,340];function Xi(e){let t=0;for(let r=0;r<e.length;r++)t+=e.charCodeAt(r);return qt[t%qt.length]}function Zi({src:e,name:t,size:r="md",shape:s="circle",fallback:a,className:o,alt:l,...i}){const[u,c]=x.useState(!1),d=e&&!u,f=t??l??"",y=f?Xi(f):200;return n.jsx("span",{className:C("vx-avatar",`vx-avatar--${r}`,`vx-avatar--${s}`,o),"aria-label":f||void 0,style:d?void 0:{"--vx-avatar-hue":y},children:d?n.jsx("img",{src:e,alt:l??t??"",className:"vx-avatar__img",onError:()=>c(!0),...i}):a?n.jsx("span",{className:"vx-avatar__fallback",children:a}):f?n.jsx("span",{className:"vx-avatar__initials",children:Yi(f)}):n.jsxs("svg",{className:"vx-avatar__placeholder",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"12",cy:"8",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M4 20c0-4 3.58-7 8-7s8 3 8 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}function Qi({columns:e,data:t,size:r="md",striped:s=!1,hoverable:a=!0,bordered:o=!1,compact:l=!1,stickyHeader:i=!1,borderless:u=!1,headless:c=!1,rounded:d=!0,loading:f=!1,caption:y,emptyText:S="暂无数据",sortColumn:N,sortDirection:g,onSortChange:h,className:w,...p}){const m=l?"sm":r,[v,b]=x.useState(null),[k,j]=x.useState(null),T=N!==void 0,E=T?N:v,R=T?g??null:k,A=x.useCallback(D=>{let O;E!==D?O="asc":R==="asc"?O="desc":R==="desc"?O=null:O="asc",T||(b(O===null?null:D),j(O)),h==null||h(D,O)},[E,R,T,h]);return n.jsx("div",{className:C("vx-table-wrap",u&&"vx-table-wrap--borderless",!d&&"vx-table-wrap--square",w),...p,children:n.jsxs("table",{className:C("vx-table",s&&"vx-table--striped",a&&"vx-table--hoverable",o&&"vx-table--bordered",u&&"vx-table--borderless",m!=="md"&&`vx-table--${m}`,i&&"vx-table--sticky"),children:[y?n.jsx("caption",{className:"vx-table__caption",children:y}):null,c?null:n.jsx("thead",{children:n.jsx("tr",{children:e.map(D=>n.jsx("th",{className:C("vx-table__th",D.sortable&&"vx-table__th--sortable",D.align&&`vx-table__th--${D.align}`,D.className),style:{width:D.width},onClick:D.sortable?()=>A(D.key):void 0,"aria-sort":E===D.key?R==="asc"?"ascending":R==="desc"?"descending":"none":void 0,children:n.jsxs("span",{className:"vx-table__th-inner",children:[D.header,D.sortable?n.jsx("span",{className:"vx-table__sort-icon","aria-hidden":"true",children:E===D.key&&R==="asc"?"↑":E===D.key&&R==="desc"?"↓":"↕"}):null]})},D.key))})}),n.jsx("tbody",{className:C(f&&"vx-table__body--loading"),children:t.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:e.length,className:"vx-table__empty",children:S})}):t.map((D,O)=>n.jsx("tr",{className:"vx-table__row",children:e.map(F=>n.jsx("td",{className:C("vx-table__td",F.align&&`vx-table__td--${F.align}`,F.className),children:F.accessor(D)},F.key))},O))})]})})}function Ji({topBar:e,bottomNav:t,children:r,className:s}){return n.jsxs("div",{className:C("vxm-shell",s),children:[e&&n.jsx("div",{className:"vxm-shell__topbar",children:e}),n.jsx("main",{className:"vxm-shell__main",children:r}),t&&n.jsx("div",{className:"vxm-shell__bottomnav",children:t})]})}function el({title:e,leading:t,trailing:r,className:s}){return n.jsxs("div",{className:C("vxm-topbar",s),children:[n.jsx("div",{className:"vxm-topbar__leading",children:t}),n.jsx("div",{className:"vxm-topbar__title",children:e}),n.jsx("div",{className:"vxm-topbar__trailing",children:r})]})}function tl({label:e,className:t,children:r,...s}){return n.jsx("button",{type:"button",className:C("vxm-icon-btn",t),"aria-label":e,...s,children:r})}function nl({items:e,className:t}){const[r,s]=x.useState(null),a=r?e.find(l=>l.key===r):null,o=l=>{var i,u;(i=l.submenu)!=null&&i.length?s(c=>c===l.key?null:l.key):(s(null),(u=l.onSelect)==null||u.call(l))};return n.jsxs("div",{className:"vxm-bottomnav-wrap",children:[r&&(a==null?void 0:a.submenu)&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"vxm-bottomnav__scrim",onClick:()=>s(null),"aria-hidden":"true"}),n.jsx("div",{className:"vxm-bottomnav__submenu",role:"menu",children:a.submenu.map(l=>n.jsxs("button",{type:"button",role:"menuitem",className:"vxm-bottomnav__submenu-item",onClick:()=>{var i;(i=l.onSelect)==null||i.call(l),s(null)},children:[l.icon&&n.jsx("span",{className:"vxm-bottomnav__submenu-icon",children:l.icon}),n.jsx("span",{children:l.label})]},l.key))})]}),n.jsx("nav",{className:C("vxm-bottomnav",t),"aria-label":"底部导航",children:e.map(l=>{var i,u,c;return n.jsxs("button",{type:"button",className:C("vxm-bottomnav__item",l.active&&"vxm-bottomnav__item--active",((i=l.submenu)==null?void 0:i.length)&&r===l.key&&"vxm-bottomnav__item--submenu-open"),onClick:()=>o(l),"aria-current":l.active?"page":void 0,"aria-expanded":(u=l.submenu)!=null&&u.length?r===l.key:void 0,"aria-haspopup":(c=l.submenu)!=null&&c.length?"menu":void 0,children:[n.jsxs("span",{className:"vxm-bottomnav__icon",children:[l.icon,l.badge!=null&&n.jsx("span",{className:"vxm-bottomnav__badge","aria-label":`${l.badge} 条未读`,children:l.badge})]}),n.jsx("span",{className:"vxm-bottomnav__label",children:l.label})]},l.key)})})]})}function rl({open:e,onClose:t,title:r,description:s,children:a,className:o}){const l=x.useRef(null),i=x.useRef(0),[u,c]=x.useState(!1),[d,f]=x.useState(0),y=x.useRef(0);x.useEffect(()=>{e||(f(0),y.current=0)},[e]),x.useEffect(()=>{if(!e)return;const h=w=>{w.key==="Escape"&&t()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,t]),x.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]);const S=h=>{i.current=h.touches[0].clientY,y.current=0,c(!0)},N=h=>{const w=h.touches[0].clientY-i.current;w<0||(y.current=w,f(w))},g=()=>{c(!1);const h=l.current;if(!h)return;const w=h.offsetHeight*.32;y.current>w?t():f(0)};return e?n.jsx("div",{className:"vxm-actionsheet__overlay",onClick:t,role:"presentation","aria-hidden":"true",children:n.jsxs("div",{ref:l,className:C("vxm-actionsheet",o),style:{transform:`translateY(${d}px)`,transition:u?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onClick:h=>h.stopPropagation(),onTouchStart:S,onTouchMove:N,onTouchEnd:g,role:"dialog","aria-modal":!0,"aria-label":r??"Action sheet",children:[n.jsx("div",{className:"vxm-actionsheet__handle","aria-hidden":"true"}),(r||s)&&n.jsxs("div",{className:"vxm-actionsheet__header",children:[r&&n.jsx("h3",{className:"vxm-actionsheet__title",children:r}),s&&n.jsx("p",{className:"vxm-actionsheet__description",children:s})]}),n.jsx("div",{className:"vxm-actionsheet__body",children:a})]})}):null}function sl({icon:e,destructive:t,className:r,children:s,...a}){return n.jsxs("button",{type:"button",className:C("vxm-actionsheet-item",t&&"vxm-actionsheet-item--destructive",r),...a,children:[e&&n.jsx("span",{className:"vxm-actionsheet-item__icon",children:e}),s]})}function al({className:e,...t}){return n.jsx("ul",{className:C("vxm-list",e),role:"list",...t})}function ol({title:e,className:t,children:r,...s}){return n.jsxs("div",{className:C("vxm-list-section",t),...s,children:[e&&n.jsx("div",{className:"vxm-list-section__title",children:e}),r]})}function il({leading:e,trailing:t,label:r,description:s,chevron:a,destructive:o,disabled:l,onClick:i,className:u}){const c=n.jsxs(n.Fragment,{children:[e&&n.jsx("span",{className:"vxm-list-item__leading",children:e}),n.jsxs("span",{className:"vxm-list-item__content",children:[n.jsx("span",{className:"vxm-list-item__label",children:r}),s&&n.jsx("span",{className:"vxm-list-item__description",children:s})]}),t&&n.jsx("span",{className:"vxm-list-item__trailing",children:t}),a&&n.jsx(be,{size:16,className:"vxm-list-item__chevron","aria-hidden":"true"})]});return n.jsx("li",{className:C("vxm-list-item",o&&"vxm-list-item--destructive",l&&"vxm-list-item--disabled",!i&&"vxm-list-item--static",u),children:n.jsx("button",{type:"button",className:"vxm-list-item__btn",onClick:l?void 0:i,disabled:l,tabIndex:i?0:-1,children:c})})}function ll({open:e,onClose:t,width:r=280,header:s,footer:a,children:o,className:l}){const i=x.useRef(null),u=x.useRef(0),c=x.useRef(0),[d,f]=x.useState(!1),[y,S]=x.useState(0);x.useEffect(()=>{e||(S(0),c.current=0)},[e]),x.useEffect(()=>{if(!e)return;const m=v=>{v.key==="Escape"&&t()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t]),x.useEffect(()=>(document.body.style.overflow=e?"hidden":"",()=>{document.body.style.overflow=""}),[e]);const N=m=>{u.current=m.touches[0].clientX,c.current=0,f(!0)},g=m=>{const v=m.touches[0].clientX-u.current;v>0||(c.current=v,S(v))},h=()=>{f(!1),Math.abs(c.current)>r*.3?t():S(0)};if(!e)return null;const p=.52*Math.max(0,1+y/r);return n.jsxs("div",{className:"vxm-drawer__overlay",style:{"--vxm-overlay-opacity":p},children:[n.jsx("div",{className:"vxm-drawer__scrim",onClick:t,"aria-hidden":"true"}),n.jsxs("div",{ref:i,className:C("vxm-drawer",l),style:{width:r,transform:`translateX(${y}px)`,transition:d?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onTouchStart:N,onTouchMove:g,onTouchEnd:h,role:"dialog","aria-modal":!0,"aria-label":"Navigation drawer",children:[s&&n.jsx("div",{className:"vxm-drawer__header",children:s}),n.jsx("div",{className:"vxm-drawer__body",children:o}),a&&n.jsx("div",{className:"vxm-drawer__footer",children:a})]})]})}function cl({icon:e,label:t,badge:r,active:s,onClick:a}){return n.jsxs("button",{type:"button",className:C("vxm-drawer-item",s&&"vxm-drawer-item--active"),onClick:a,"aria-current":s?"page":void 0,children:[e&&n.jsx("span",{className:"vxm-drawer-item__icon",children:e}),n.jsx("span",{className:"vxm-drawer-item__label",children:t}),r!=null&&n.jsx("span",{className:"vxm-drawer-item__badge",children:r})]})}function ul({title:e,collapsible:t=!1,defaultOpen:r=!0,children:s}){const[a,o]=x.useState(r);return n.jsxs("div",{className:C("vxm-drawer-section",t&&"vxm-drawer-section--collapsible"),children:[e&&(t?n.jsxs("button",{type:"button",className:"vxm-drawer-section__header",onClick:()=>o(l=>!l),"aria-expanded":a,children:[n.jsx("span",{className:"vxm-drawer-section__title",children:e}),n.jsx(ge,{size:14,className:C("vxm-drawer-section__chevron",a&&"vxm-drawer-section__chevron--open")})]}):n.jsx("div",{className:"vxm-drawer-section__title",children:e})),n.jsx("div",{className:C("vxm-drawer-section__items-wrap",!a&&"vxm-drawer-section__items-wrap--closed"),children:n.jsx("div",{className:"vxm-drawer-section__items",children:s})})]})}const dl=x.forwardRef(function({className:t,required:r,children:s,...a},o){return n.jsxs("label",{ref:o,className:C("vx-label",t),...a,children:[s,r?n.jsx("span",{className:"vx-label__required","aria-hidden":"true",children:" *"}):null]})}),Or=x.createContext({});function $r(){return x.useContext(Or)}function pl({className:e,...t}){return n.jsx("form",{noValidate:!0,className:C("vx-form",e),...t})}function fl({error:e,children:t,className:r}){return n.jsx(Or.Provider,{value:{error:e},children:n.jsx("div",{className:C("vx-form-field",e&&"vx-form-field--invalid",r),children:t})})}function vl({className:e,required:t,children:r,...s}){return n.jsxs("label",{className:C("vx-form-label",e),...s,children:[r,t?n.jsx("span",{className:"vx-form-label__required","aria-hidden":"true",children:" *"}):null]})}function ml({className:e,children:t,...r}){return n.jsx("p",{className:C("vx-form-description",e),...r,children:t})}function hl({className:e,children:t,...r}){const{error:s}=$r(),a=s??t;return a?n.jsx("p",{className:C("vx-form-message",s&&"vx-form-message--error",e),...r,children:a}):null}function xl({trigger:e,title:t,description:r,confirmLabel:s="Confirm",cancelLabel:a="Cancel",onConfirm:o,onCancel:l,variant:i="default",className:u,...c}){return n.jsxs(gt,{...c,children:[n.jsx(bt,{asChild:!0,children:e}),n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-dialog__overlay"}),n.jsxs(wt,{className:C("vx-alert-dialog__content",u),role:"alertdialog","aria-modal":"true",children:[n.jsx(kt,{className:"vx-alert-dialog__title",children:t}),r?n.jsx(St,{className:"vx-alert-dialog__description",children:r}):null,n.jsxs("div",{className:"vx-alert-dialog__footer",children:[n.jsx(xe,{asChild:!0,children:n.jsx(oe,{variant:"secondary",onClick:l,children:a})}),n.jsx(xe,{asChild:!0,children:n.jsx(oe,{variant:i==="danger"?"danger":"solid",onClick:o,children:s})})]})]})]})]})}function gl({className:e,label:t,hint:r,error:s,value:a,onChange:o,min:l,max:i,step:u=1,disabled:c,...d}){const f=x.useCallback(w=>{let p=w;return l!==void 0&&(p=Math.max(l,p)),i!==void 0&&(p=Math.min(i,p)),p},[l,i]),y=()=>{c||o==null||o(f((a??0)+u))},S=()=>{c||o==null||o(f((a??0)-u))},N=w=>{const p=parseFloat(w.target.value);isNaN(p)||o==null||o(f(p))},g=l!==void 0&&(a??0)<=l,h=i!==void 0&&(a??0)>=i;return n.jsxs("label",{className:"vx-field-group",children:[t?n.jsx("span",{className:"vx-field-group__label",children:t}):null,n.jsxs("span",{className:C("vx-number-input",s&&"vx-number-input--invalid",c&&"vx-number-input--disabled",e),children:[n.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:S,disabled:c||g,"aria-label":"Decrease",tabIndex:-1,children:n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),n.jsx("input",{type:"number",className:"vx-number-input__field",value:a??"",onChange:N,min:l,max:i,step:u,disabled:c,"aria-invalid":s?"true":void 0,...d}),n.jsx("button",{type:"button",className:"vx-number-input__btn",onClick:y,disabled:c||h,"aria-label":"Increase",tabIndex:-1,children:n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M6 2v8M2 6h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),s?n.jsx("span",{className:"vx-field-group__error",children:s}):null,!s&&r?n.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}function bl(e,t){return new Date(e,t+1,0).getDate()}function yl(e,t){return new Date(e,t,1).getDay()}function Yt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Br({value:e,defaultValue:t,onChange:r,min:s,max:a,className:o,weekStartsOnMonday:l=!1}){const i=new Date,u=e!==void 0,[c,d]=x.useState(t),f=u?e:c,[y,S]=x.useState((f??i).getFullYear()),[N,g]=x.useState((f??i).getMonth()),h=bl(y,N),w=yl(y,N),p=l?w===0?6:w-1:w,m=l?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"],v=()=>{N===0?(S(R=>R-1),g(11)):g(R=>R-1)},b=()=>{N===11?(S(R=>R+1),g(0)):g(R=>R+1)},k=x.useCallback(R=>{const A=new Date(y,N,R);if(s){const D=new Date(s.getFullYear(),s.getMonth(),s.getDate());if(A<D)return!0}if(a){const D=new Date(a.getFullYear(),a.getMonth(),a.getDate());if(A>D)return!0}return!1},[y,N,s,a]),j=R=>{if(k(R))return;const A=new Date(y,N,R);u||d(A),r==null||r(A)},T=new Date(y,N).toLocaleString("default",{month:"long"}),E=[...Array(p).fill(null),...Array.from({length:h},(R,A)=>A+1)];for(;E.length%7!==0;)E.push(null);return n.jsxs("div",{className:C("vx-calendar",o),children:[n.jsxs("div",{className:"vx-calendar__header",children:[n.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:v,"aria-label":"Previous month",children:n.jsx(un,{size:16})}),n.jsxs("span",{className:"vx-calendar__month-label",children:[T," ",y]}),n.jsx("button",{type:"button",className:"vx-calendar__nav-btn",onClick:b,"aria-label":"Next month",children:n.jsx(be,{size:16})})]}),n.jsxs("div",{className:"vx-calendar__grid",role:"grid","aria-label":`${T} ${y}`,children:[m.map(R=>n.jsx("div",{className:"vx-calendar__weekday",role:"columnheader",children:R},R)),E.map((R,A)=>{if(R===null)return n.jsx("div",{className:"vx-calendar__cell vx-calendar__cell--empty"},`e-${A}`);const D=new Date(y,N,R),O=Yt(D,i),F=f?Yt(D,f):!1,H=k(R);return n.jsx("button",{type:"button",role:"gridcell",className:C("vx-calendar__cell",O&&"vx-calendar__cell--today",F&&"vx-calendar__cell--selected",H&&"vx-calendar__cell--disabled"),onClick:()=>j(R),disabled:H,"aria-label":D.toLocaleDateString(),"aria-selected":F,children:R},R)})]})]})}function _l(e){return e.toLocaleDateString()}function wl(){return n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[n.jsx("rect",{x:"1",y:"3",width:"13",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M1 6.5h13",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M5 1v3M10 1v3",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function kl({value:e,defaultValue:t,onChange:r,placeholder:s="Select date",label:a,hint:o,error:l,min:i,max:u,disabled:c,weekStartsOnMonday:d,className:f}){const y=e!==void 0,[S,N]=x.useState(t),g=y?e:S,[h,w]=x.useState(!1),p=x.useRef(null),m=x.useRef(null),v=x.useRef(null),b=x.useRef(null),[k,j]=x.useState(null);x.useEffect(()=>{if(!h)return;const E=A=>{var F,H;const D=(F=p.current)==null?void 0:F.contains(A.target),O=(H=v.current)==null?void 0:H.contains(A.target);!D&&!O&&w(!1)},R=A=>{A.key==="Escape"&&(A.preventDefault(),w(!1))};return document.addEventListener("mousedown",E),document.addEventListener("touchstart",E,{passive:!0}),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("touchstart",E),document.removeEventListener("keydown",R)}},[h]),x.useEffect(()=>{const{shouldInline:E}=se(p.current);if(!(!h||!E))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[h]),x.useEffect(()=>{if(!h||!k)return;const E=b.current;if(E)return E.dataset.hasOpenPortal="1",()=>{delete E.dataset.hasOpenPortal}},[h,k]),x.useLayoutEffect(()=>{const{dialogContent:E,shouldInline:R}=se(p.current);if(!h||!m.current||R){j(null),b.current=null;return}b.current=E;const A=m.current.getBoundingClientRect(),D=window.innerHeight-A.bottom,O=A.top,F=D<320&&O>D?"up":"down";j(F==="down"?{top:A.bottom+6,left:A.left,direction:F}:{bottom:window.innerHeight-A.top+6,left:A.left,direction:F})},[h]),x.useEffect(()=>{if(!h||!k)return;const E=R=>{var A;(A=v.current)!=null&&A.contains(R.target)||w(!1)};return window.addEventListener("scroll",E,{capture:!0,passive:!0}),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,{capture:!0}),window.removeEventListener("resize",E)}},[h,k]);const T=E=>{y||N(E),r==null||r(E),w(!1)};return n.jsxs("div",{ref:p,className:C("vx-datepicker",f),children:[a?n.jsx("span",{className:"vx-field-group__label",children:a}):null,n.jsxs("button",{ref:m,type:"button",className:C("vx-datepicker__trigger",l&&"vx-datepicker__trigger--invalid",c&&"vx-datepicker__trigger--disabled"),onClick:()=>!c&&w(E=>!E),disabled:c,"aria-haspopup":"dialog","aria-expanded":h,children:[n.jsx(wl,{}),n.jsx("span",{className:C("vx-datepicker__value",!g&&"vx-datepicker__value--placeholder"),children:g?_l(g):s})]}),l?n.jsx("span",{className:"vx-field-group__error",children:l}):null,!l&&o?n.jsx("span",{className:"vx-field-group__hint",children:o}):null,h?(()=>{const E=!!k,R=k?{position:"fixed",top:k.top,bottom:k.bottom,left:k.left,pointerEvents:"auto"}:void 0,A=n.jsx("div",{ref:v,className:C("vx-datepicker__popover",(k==null?void 0:k.direction)==="up"&&"vx-datepicker__popover--up",!!b.current&&"vx-datepicker__popover--in-dialog"),role:"dialog","aria-label":"Date picker",style:R,children:n.jsx(Br,{value:g,onChange:T,min:i,max:u,weekStartsOnMonday:d})});return E?ce.createPortal(A,document.body):A})():null]})}function Sl({options:e,value:t,defaultValue:r=[],onChange:s,placeholder:a="Select...",searchPlaceholder:o="Search...",label:l,hint:i,error:u,disabled:c,clearable:d=!1,emptyText:f="No results",maxDisplay:y,className:S}){const N=t!==void 0,[g,h]=x.useState(r),w=N?t:g,[p,m]=x.useState(!1),[v,b]=x.useState(""),k=x.useRef(null),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useId(),[A,D]=x.useState(null),O=x.useRef(null),F=e.filter(P=>P.label.toLowerCase().includes(v.toLowerCase()));x.useEffect(()=>{if(!p){b("");return}const P=setTimeout(()=>{var M;return(M=E.current)==null?void 0:M.focus()},0);return()=>clearTimeout(P)},[p]),x.useEffect(()=>{if(!p)return;const P=B=>{var Z,ae;const z=(Z=k.current)==null?void 0:Z.contains(B.target),V=(ae=T.current)==null?void 0:ae.contains(B.target);!z&&!V&&m(!1)},M=B=>{B.key==="Escape"&&(B.preventDefault(),m(!1))};return document.addEventListener("mousedown",P),document.addEventListener("touchstart",P,{passive:!0}),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("touchstart",P),document.removeEventListener("keydown",M)}},[p]),x.useEffect(()=>{const{shouldInline:P}=se(k.current);if(!(!p||!P))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[p]),x.useEffect(()=>{if(!p||!A)return;const P=O.current;if(P)return P.dataset.hasOpenPortal="1",()=>{delete P.dataset.hasOpenPortal}},[p,A]),x.useLayoutEffect(()=>{const{dialogContent:P,shouldInline:M}=se(k.current);if(!p||!j.current||M){D(null),O.current=null;return}O.current=P;const B=j.current.getBoundingClientRect(),z=window.innerHeight-B.bottom,V=B.top,Z=z<300&&V>z?"up":"down";D(Z==="down"?{top:B.bottom+4,left:B.left,width:B.width,direction:Z}:{bottom:window.innerHeight-B.top+4,left:B.left,width:B.width,direction:Z})},[p]),x.useEffect(()=>{if(!p||!A)return;const P=M=>{var B;(B=T.current)!=null&&B.contains(M.target)||m(!1)};return window.addEventListener("scroll",P,{capture:!0,passive:!0}),window.addEventListener("resize",P),()=>{window.removeEventListener("scroll",P,{capture:!0}),window.removeEventListener("resize",P)}},[p,A]);const H=P=>{if(P.disabled)return;const M=w.includes(P.value)?w.filter(B=>B!==P.value):[...w,P.value];N||h(M),s==null||s(M)},U=(P,M)=>{P.stopPropagation();const B=w.filter(z=>z!==M);N||h(B),s==null||s(B)},K=P=>{P.stopPropagation(),N||h([]),s==null||s([])},L=y?w.slice(0,y):w,I=y?Math.max(0,w.length-y):0,$=e.reduce((P,M)=>(P[M.value]=M.label,P),{});return n.jsxs("div",{ref:k,className:C("vx-multiselect",p&&"vx-multiselect--open",S),children:[l?n.jsx("span",{className:"vx-field-group__label",children:l}):null,n.jsxs("button",{ref:j,type:"button",className:C("vx-multiselect__trigger",u&&"vx-multiselect__trigger--invalid",c&&"vx-multiselect__trigger--disabled"),onClick:()=>!c&&m(P=>!P),disabled:c,"aria-haspopup":"listbox","aria-expanded":p,"aria-controls":R,children:[n.jsx("span",{className:"vx-multiselect__tags",children:w.length===0?n.jsx("span",{className:"vx-multiselect__placeholder",children:a}):n.jsxs(n.Fragment,{children:[L.map(P=>n.jsxs("span",{className:"vx-multiselect__tag",children:[$[P]??P,!c&&n.jsx("span",{className:"vx-multiselect__tag-remove",role:"button","aria-label":`Remove ${$[P]??P}`,onClick:M=>U(M,P),children:n.jsx(re,{size:11})})]},P)),I>0&&n.jsxs("span",{className:"vx-multiselect__overflow",children:["+",I]})]})}),n.jsxs("span",{className:"vx-multiselect__icons",children:[d&&w.length>0&&n.jsx("span",{className:"vx-multiselect__clear",role:"button","aria-label":"Clear all",onClick:K,children:n.jsx(re,{size:14})}),n.jsx(ge,{size:14,className:C("vx-multiselect__chevron",p&&"vx-multiselect__chevron--open")})]})]}),u?n.jsx("span",{className:"vx-field-group__error",children:u}):null,!u&&i?n.jsx("span",{className:"vx-field-group__hint",children:i}):null,p&&(()=>{const P=!!A,M=P?{top:A.top,bottom:A.bottom,left:A.left,width:A.width,pointerEvents:"auto"}:void 0,B=n.jsxs("div",{ref:T,className:C("vx-multiselect__dropdown",(A==null?void 0:A.direction)==="up"&&"vx-multiselect__dropdown--up",!!O.current&&"vx-multiselect__dropdown--in-dialog"),style:M,children:[n.jsx("div",{className:"vx-multiselect__search-wrap",children:n.jsx("input",{ref:E,type:"text",className:"vx-multiselect__search",placeholder:o,value:v,onChange:z=>b(z.target.value),"aria-label":o})}),n.jsx("ul",{id:R,className:"vx-multiselect__list",role:"listbox","aria-multiselectable":"true","aria-label":l??"Options",children:F.length===0?n.jsx("li",{className:"vx-multiselect__empty",children:f}):F.map(z=>{const V=w.includes(z.value);return n.jsxs("li",{className:C("vx-multiselect__option",V&&"vx-multiselect__option--selected",z.disabled&&"vx-multiselect__option--disabled"),role:"option","aria-selected":V,"aria-disabled":z.disabled,onClick:()=>H(z),children:[n.jsx("span",{className:C("vx-multiselect__checkbox",V&&"vx-multiselect__checkbox--checked"),children:V?n.jsx(Me,{size:11}):null}),n.jsx("span",{children:z.label})]},z.value)})})]});return P?ce.createPortal(B,document.body):B})()]})}function te(e){return String(e).padStart(2,"0")}function Xt(e){const t=e.split(":").map(Number);return{h:t[0]??0,m:t[1]??0,s:t[2]??0}}function Zt(e,t,r,s){return s?`${te(e)}:${te(t)}:${te(r)}`:`${te(e)}:${te(t)}`}function Nl(){return n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"7.5",cy:"7.5",r:"6",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M7.5 4v3.5l2.5 1.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function jl({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M3 9l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function El({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function tt({value:e,min:t,max:r,onChange:s,label:a}){const o=()=>s(e===t?r:e-1),l=()=>s(e===r?t:e+1),i=f=>{f.preventDefault(),f.deltaY>0?l():o()},u=f=>{f.key==="ArrowUp"&&(f.preventDefault(),o()),f.key==="ArrowDown"&&(f.preventDefault(),l())},c=e===t?r:e-1,d=e===r?t:e+1;return n.jsxs("div",{className:"vx-timepicker__col",role:"spinbutton","aria-label":a,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":r,"aria-valuetext":te(e),tabIndex:0,onKeyDown:u,onWheel:i,children:[n.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:o,"aria-label":`Decrease ${a}`,tabIndex:-1,children:n.jsx(jl,{size:13})}),n.jsxs("div",{className:"vx-timepicker__col-items",children:[n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:te(c)}),n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--selected",children:te(e)}),n.jsx("div",{className:"vx-timepicker__col-item vx-timepicker__col-item--adjacent",children:te(d)})]}),n.jsx("button",{type:"button",className:"vx-timepicker__col-btn",onClick:l,"aria-label":`Increase ${a}`,tabIndex:-1,children:n.jsx(El,{size:13})})]})}function Cl({value:e,defaultValue:t,onChange:r,placeholder:s="Select time",label:a,hint:o,error:l,disabled:i,seconds:u=!1,className:c}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,N=S?Xt(S):{h:12,m:0,s:0},[g,h]=x.useState(N.h),[w,p]=x.useState(N.m),[m,v]=x.useState(N.s),[b,k]=x.useState(!1),j=x.useRef(null),T=x.useRef(null),E=x.useRef(null),R=x.useRef(null),[A,D]=x.useState(null);x.useEffect(()=>{if(e){const L=Xt(e);h(L.h),p(L.m),v(L.s)}},[e]),x.useEffect(()=>{if(!b)return;const L=$=>{var B,z;const P=(B=j.current)==null?void 0:B.contains($.target),M=(z=E.current)==null?void 0:z.contains($.target);!P&&!M&&k(!1)},I=$=>{$.key==="Escape"&&($.preventDefault(),k(!1))};return document.addEventListener("mousedown",L),document.addEventListener("touchstart",L,{passive:!0}),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",L),document.removeEventListener("touchstart",L),document.removeEventListener("keydown",I)}},[b]),x.useEffect(()=>{const{shouldInline:L}=se(j.current);if(!(!b||!L))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[b]),x.useEffect(()=>{if(!b||!A)return;const L=R.current;if(L)return L.dataset.hasOpenPortal="1",()=>{delete L.dataset.hasOpenPortal}},[b,A]),x.useLayoutEffect(()=>{const{dialogContent:L,shouldInline:I}=se(j.current);if(!b||!T.current||I){D(null),R.current=null;return}R.current=L;const $=T.current.getBoundingClientRect(),P=window.innerHeight-$.bottom,M=$.top,B=P<220&&M>P?"up":"down";D(B==="down"?{top:$.bottom+4,left:$.left,direction:B}:{bottom:window.innerHeight-$.top+4,left:$.left,direction:B})},[b]),x.useEffect(()=>{if(!b||!A)return;const L=I=>{var $;($=E.current)!=null&&$.contains(I.target)||k(!1)};return window.addEventListener("scroll",L,{capture:!0,passive:!0}),window.addEventListener("resize",L),()=>{window.removeEventListener("scroll",L,{capture:!0}),window.removeEventListener("resize",L)}},[b,A]);const O=x.useCallback((L,I,$)=>{const P=Zt(L,I,$,u);d||y(P),r==null||r(P)},[d,u,r]),F=L=>{h(L),O(L,w,m)},H=L=>{p(L),O(g,L,m)},U=L=>{v(L),O(g,w,L)},K=S??(b?Zt(g,w,m,u):void 0);return n.jsxs("div",{ref:j,className:C("vx-timepicker",c),children:[a?n.jsx("span",{className:"vx-field-group__label",children:a}):null,n.jsxs("button",{ref:T,type:"button",className:C("vx-timepicker__trigger",l&&"vx-timepicker__trigger--invalid",i&&"vx-timepicker__trigger--disabled"),onClick:()=>!i&&k(L=>!L),disabled:i,"aria-haspopup":"dialog","aria-expanded":b,children:[n.jsx(Nl,{}),n.jsx("span",{className:C("vx-timepicker__value",!K&&"vx-timepicker__value--placeholder"),children:K??s})]}),l?n.jsx("span",{className:"vx-field-group__error",children:l}):null,!l&&o?n.jsx("span",{className:"vx-field-group__hint",children:o}):null,b&&(()=>{const L=!!A,I=A?{position:"fixed",top:A.top,bottom:A.bottom,left:A.left,pointerEvents:"auto"}:void 0,$=n.jsxs("div",{ref:E,className:C("vx-timepicker__popover",(A==null?void 0:A.direction)==="up"&&"vx-timepicker__popover--up",!!R.current&&"vx-timepicker__popover--in-dialog"),role:"dialog","aria-label":"Time picker",style:I,children:[n.jsxs("div",{className:"vx-timepicker__columns",children:[n.jsx(tt,{value:g,min:0,max:23,onChange:F,label:"Hours"}),n.jsx("span",{className:"vx-timepicker__sep",children:":"}),n.jsx(tt,{value:w,min:0,max:59,onChange:H,label:"Minutes"}),u&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"vx-timepicker__sep",children:":"}),n.jsx(tt,{value:m,min:0,max:59,onChange:U,label:"Seconds"})]})]}),n.jsx("div",{className:"vx-timepicker__footer",children:n.jsx("button",{type:"button",className:"vx-timepicker__done",onClick:()=>{S||O(g,w,m),k(!1)},children:"Done"})})]});return L?ce.createPortal($,document.body):$})()]})}function Tl({label:e,hint:t,error:r,accept:s,multiple:a=!1,maxSize:o,disabled:l,onFiles:i,className:u}){const[c,d]=x.useState(!1),[f,y]=x.useState([]),[S,N]=x.useState(),g=x.useRef(null),h=x.useCallback(b=>{if(!b)return;const k=Array.from(b);if(o&&k.filter(R=>R.size>o).length>0){N(`File too large (max ${(o/1024/1024).toFixed(1)} MB)`);return}N(void 0);const j=k.map(E=>({file:E,id:crypto.randomUUID()})),T=a?[...f,...j]:j;y(T),i==null||i(T.map(E=>E.file))},[f,o,a,i]),w=b=>{b.preventDefault(),d(!1),l||h(b.dataTransfer.files)},p=b=>{b.preventDefault(),l||d(!0)},m=b=>{const k=f.filter(j=>j.id!==b);y(k),i==null||i(k.map(j=>j.file))},v=r??S;return n.jsxs("div",{className:C("vx-file-upload",u),children:[e?n.jsx("span",{className:"vx-field-group__label",children:e}):null,n.jsxs("div",{className:C("vx-file-upload__zone",c&&"vx-file-upload__zone--dragging",l&&"vx-file-upload__zone--disabled",v&&"vx-file-upload__zone--invalid"),onDrop:w,onDragOver:p,onDragLeave:()=>d(!1),onClick:()=>{var b;return!l&&((b=g.current)==null?void 0:b.click())},role:"button",tabIndex:l?-1:0,onKeyDown:b=>{var k;return b.key==="Enter"&&!l&&((k=g.current)==null?void 0:k.click())},"aria-label":"Upload files, click or drag and drop",children:[n.jsx(ys,{size:24,className:"vx-file-upload__icon"}),n.jsxs("p",{className:"vx-file-upload__text",children:[n.jsx("span",{className:"vx-file-upload__link",children:"Click to upload"})," or drag and drop"]}),t?n.jsx("p",{className:"vx-file-upload__hint",children:t}):null,n.jsx("input",{ref:g,type:"file",accept:s,multiple:a,disabled:l,className:"vx-file-upload__input",onChange:b=>h(b.target.files),"aria-hidden":"true",tabIndex:-1})]}),v?n.jsx("span",{className:"vx-field-group__error",children:v}):null,f.length>0&&n.jsx("ul",{className:"vx-file-upload__list",children:f.map(({id:b,file:k})=>n.jsxs("li",{className:"vx-file-upload__file",children:[n.jsx(us,{size:14,className:"vx-file-upload__file-icon"}),n.jsx("span",{className:"vx-file-upload__file-name",children:k.name}),n.jsxs("span",{className:"vx-file-upload__file-size",children:[(k.size/1024).toFixed(0)," KB"]}),n.jsx("button",{type:"button",className:"vx-file-upload__remove",onClick:()=>m(b),"aria-label":`Remove ${k.name}`,children:n.jsx(re,{size:14})})]},b))})]})}function Al({trigger:e,title:t,description:r,side:s="right",children:a,footer:o,className:l,...i}){return n.jsxs(gt,{...i,children:[e?n.jsx(bt,{asChild:!0,children:e}):null,n.jsxs(yt,{children:[n.jsx(_t,{className:"vx-sheet__overlay"}),n.jsxs(wt,{className:C("vx-sheet",`vx-sheet--${s}`,l),children:[n.jsxs("div",{className:"vx-sheet__header",children:[n.jsxs("div",{children:[t?n.jsx(kt,{className:"vx-sheet__title",children:t}):null,r?n.jsx(St,{className:"vx-sheet__description",children:r}):null]}),n.jsx(xe,{className:"vx-dialog__close","aria-label":"Close",children:n.jsx(re,{size:16})})]}),n.jsx("div",{className:"vx-sheet__body",children:a}),o?n.jsx("div",{className:"vx-sheet__footer",children:o}):null]})]})]})}function Rl({maxHeight:e,maxWidth:t,children:r,className:s,style:a,...o}){return n.jsx("div",{className:C("vx-scroll-area",s),style:{maxHeight:typeof e=="number"?`${e}px`:e,maxWidth:typeof t=="number"?`${t}px`:t,...a},...o,children:n.jsx("div",{className:"vx-scroll-area__viewport",children:r})})}function Pl({pressed:e,defaultPressed:t=!1,onPressedChange:r,size:s="md",className:a,children:o,onClick:l,...i}){const[u,c]=x.useState(t),d=e!==void 0,f=d?e:u,y=S=>{d||c(N=>!N),r==null||r(!f),l==null||l(S)};return n.jsx("button",{type:"button","aria-pressed":f,className:C("vx-toggle",`vx-toggle--${s}`,f&&"vx-toggle--on",a),onClick:y,...i,children:o})}function Dl({items:e,value:t,defaultValue:r,onValueChange:s,type:a="single",size:o="md",className:l}){const[i,u]=x.useState(r??(a==="multiple"?[]:"")),c=t!==void 0,d=c?t:i,f=S=>Array.isArray(d)?d.includes(S):d===S,y=S=>{let N;if(a==="multiple"){const g=Array.isArray(d)?d:[];N=g.includes(S)?g.filter(h=>h!==S):[...g,S]}else N=d===S?"":S;c||u(N),s==null||s(N)};return n.jsx("div",{className:C("vx-toggle-group",l),role:"group",children:e.map(S=>n.jsx("button",{type:"button","aria-pressed":f(S.value),disabled:S.disabled,className:C("vx-toggle",`vx-toggle--${o}`,f(S.value)&&"vx-toggle--on","vx-toggle-group__item"),onClick:()=>!S.disabled&&y(S.value),children:S.label},S.value))})}function Fl({groups:e,items:t,children:r,className:s}){const[a,o]=x.useState(null),l=x.useRef(null),i=e??(t?[{items:t}]:[]);x.useEffect(()=>{if(!a)return;const c=f=>{l.current&&!l.current.contains(f.target)&&o(null)},d=f=>{f.key==="Escape"&&o(null)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[a]);const u=x.useCallback(c=>{c.preventDefault(),o({x:c.clientX,y:c.clientY})},[]);return n.jsxs("div",{className:C("vx-context-menu-wrap",s),onContextMenu:u,children:[r,a&&n.jsx("div",{ref:l,className:"vx-dropdown__menu vx-context-menu",style:{position:"fixed",top:a.y,left:a.x},role:"menu",children:i.map((c,d)=>n.jsxs("div",{className:"vx-dropdown__group",children:[d>0&&n.jsx("div",{className:"vx-dropdown__separator"}),c.label&&n.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,y)=>n.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:C("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var S;(S=f.onClick)==null||S.call(f),o(null)},children:[f.icon&&n.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),n.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&n.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},y))]},d))})]})}function Ll({content:e,placement:t="bottom",delay:r=400,children:s,className:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useCallback(()=>{i.current=setTimeout(()=>l(!0),r)},[r]),c=x.useCallback(()=>{i.current&&clearTimeout(i.current),l(!1)},[]);return n.jsxs("span",{className:C("vx-hovercard-wrap",a),onMouseEnter:u,onMouseLeave:c,onFocus:u,onBlur:c,children:[s,o&&n.jsx("div",{className:C("vx-hovercard",`vx-hovercard--${t}`),children:e})]})}function Il({menus:e,className:t}){const[r,s]=x.useState(null),a=x.useRef(null);return x.useEffect(()=>{if(r===null)return;const o=i=>{a.current&&!a.current.contains(i.target)&&s(null)},l=i=>{i.key==="Escape"&&s(null)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[r]),n.jsx("div",{ref:a,className:C("vx-menubar",t),role:"menubar",children:e.map((o,l)=>{const i=o.groups??(o.items?[{items:o.items}]:[]),u=r===l;return n.jsxs("div",{className:"vx-menubar__item-wrap",children:[n.jsx("button",{type:"button",role:"menuitem",className:C("vx-menubar__trigger",u&&"vx-menubar__trigger--open"),disabled:o.disabled,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>s(u?null:l),onMouseEnter:()=>{r!==null&&s(l)},children:o.label}),u&&n.jsx("div",{className:"vx-dropdown__menu",role:"menu",children:i.map((c,d)=>n.jsxs("div",{className:"vx-dropdown__group",children:[d>0&&n.jsx("div",{className:"vx-dropdown__separator"}),c.label&&n.jsx("div",{className:"vx-dropdown__group-label",children:c.label}),c.items.map((f,y)=>n.jsxs("button",{type:"button",role:"menuitem",disabled:f.disabled,className:C("vx-dropdown__item",f.danger&&"vx-dropdown__item--danger",f.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var S;(S=f.onClick)==null||S.call(f),s(null)},children:[f.icon&&n.jsx("span",{className:"vx-dropdown__item-icon",children:f.icon}),n.jsx("span",{className:"vx-dropdown__item-label",children:f.label}),f.shortcut&&n.jsx("span",{className:"vx-dropdown__shortcut",children:f.shortcut})]},y))]},d))})]},l)})})}function Ml({items:e,className:t}){const[r,s]=x.useState(null),a=x.useRef(null);return x.useEffect(()=>{if(r===null)return;const o=i=>{a.current&&!a.current.contains(i.target)&&s(null)},l=i=>{i.key==="Escape"&&s(null)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[r]),n.jsx("nav",{ref:a,className:C("vx-nav-menu",t),"aria-label":"Main navigation",children:n.jsx("ul",{className:"vx-nav-menu__list",role:"list",children:e.map((o,l)=>{const i=o.items&&o.items.length>0,u=r===l;return n.jsxs("li",{className:"vx-nav-menu__item-wrap",children:[i?n.jsxs("button",{type:"button",className:C("vx-nav-menu__link",o.active&&"vx-nav-menu__link--active",u&&"vx-nav-menu__link--open"),"aria-haspopup":"true","aria-expanded":u,onClick:()=>s(u?null:l),children:[o.label,n.jsx(ge,{size:14,className:C("vx-nav-menu__chevron",u&&"vx-nav-menu__chevron--open")})]}):n.jsx("a",{href:o.href??"#",className:C("vx-nav-menu__link",o.active&&"vx-nav-menu__link--active"),onClick:o.onClick,children:o.label}),i&&u&&n.jsx("div",{className:"vx-nav-menu__dropdown",children:o.items.map((c,d)=>n.jsxs("a",{href:c.href??"#",className:"vx-nav-menu__sub-item",onClick:()=>{var f;(f=c.onClick)==null||f.call(c),s(null)},children:[c.icon&&n.jsx("span",{className:"vx-nav-menu__sub-icon",children:c.icon}),n.jsxs("span",{children:[n.jsx("span",{className:"vx-nav-menu__sub-label",children:c.label}),c.description&&n.jsx("span",{className:"vx-nav-menu__sub-desc",children:c.description})]})]},d))})]},l)})})})}function Ol({steps:e,currentStep:t=0,orientation:r="horizontal",className:s}){return n.jsx("ol",{className:C("vx-stepper",`vx-stepper--${r}`,s),"aria-label":"Steps",children:e.map((a,o)=>{const l=a.status??(o<t?"completed":o===t?"active":"pending");return n.jsxs("li",{className:C("vx-stepper__step",`vx-stepper__step--${l}`),children:[n.jsx("div",{className:"vx-stepper__indicator","aria-hidden":"true",children:l==="completed"?n.jsx(Me,{size:14}):n.jsx("span",{children:o+1})}),n.jsxs("div",{className:"vx-stepper__content",children:[n.jsx("span",{className:"vx-stepper__label",children:a.label}),a.description&&n.jsx("span",{className:"vx-stepper__description",children:a.description})]}),o<e.length-1&&n.jsx("div",{className:"vx-stepper__connector","aria-hidden":"true"})]},o)})})}function $l({items:e,className:t}){return n.jsx("ol",{className:C("vx-timeline",t),"aria-label":"Timeline",children:e.map((r,s)=>n.jsxs("li",{className:C("vx-timeline__item",r.status&&`vx-timeline__item--${r.status}`),children:[n.jsx("div",{className:"vx-timeline__dot","aria-hidden":"true",children:r.icon??null}),n.jsxs("div",{className:"vx-timeline__body",children:[n.jsxs("div",{className:"vx-timeline__header",children:[n.jsx("span",{className:"vx-timeline__title",children:r.title}),r.time&&n.jsx("span",{className:"vx-timeline__time",children:r.time})]}),r.description&&n.jsx("p",{className:"vx-timeline__description",children:r.description})]})]},s))})}function Bl({icon:e,title:t,description:r,action:s,className:a}){return n.jsxs("div",{className:C("vx-empty-state",a),role:"status","aria-live":"polite",children:[e&&n.jsx("div",{className:"vx-empty-state__icon","aria-hidden":"true",children:e}),n.jsx("p",{className:"vx-empty-state__title",children:t}),r&&n.jsx("p",{className:"vx-empty-state__description",children:r}),s&&n.jsx("div",{className:"vx-empty-state__action",children:s})]})}function zl({items:e,defaultIndex:t=0,index:r,onIndexChange:s,autoPlay:a=!1,interval:o=3e3,loop:l=!0,showDots:i=!0,showArrows:u=!0,className:c}){const d=r!==void 0,[f,y]=x.useState(t),S=d?r:f,N=e.length,g=x.useRef(null),h=x.useCallback(m=>{let v=m;l?v=(m%N+N)%N:v=Math.max(0,Math.min(m,N-1)),d||y(v),s==null||s(v)},[d,l,s,N]);x.useEffect(()=>{if(a)return g.current=setInterval(()=>h(S+1),o),()=>{g.current&&clearInterval(g.current)}},[a,S,h,o]);const w=()=>h(S-1),p=()=>h(S+1);return N===0?null:n.jsxs("div",{className:C("vx-carousel",c),role:"region","aria-roledescription":"carousel","aria-label":"Carousel",children:[n.jsx("div",{className:"vx-carousel__track-wrap",children:n.jsx("div",{className:"vx-carousel__track",style:{transform:`translateX(-${S*100}%)`},children:e.map((m,v)=>n.jsx("div",{className:"vx-carousel__slide",role:"group","aria-roledescription":"slide","aria-label":`Slide ${v+1} of ${N}`,"aria-hidden":v!==S,children:m},v))})}),u&&n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--prev",onClick:w,disabled:!l&&S===0,"aria-label":"Previous slide",children:n.jsx(un,{size:20})}),n.jsx("button",{type:"button",className:"vx-carousel__arrow vx-carousel__arrow--next",onClick:p,disabled:!l&&S===N-1,"aria-label":"Next slide",children:n.jsx(be,{size:20})})]}),i&&n.jsx("div",{className:"vx-carousel__dots",role:"tablist","aria-label":"Slides",children:e.map((m,v)=>n.jsx("button",{type:"button",role:"tab",className:C("vx-carousel__dot",v===S&&"vx-carousel__dot--active"),onClick:()=>h(v),"aria-selected":v===S,"aria-label":`Go to slide ${v+1}`},v))})]})}function Hl({filled:e,half:t}){return n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:t?n.jsxs(n.Fragment,{children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"vx-star-half",children:[n.jsx("stop",{offset:"50%",stopColor:"currentColor"}),n.jsx("stop",{offset:"50%",stopColor:"none",stopOpacity:"0"})]})}),n.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:"url(#vx-star-half)",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]}):n.jsx("path",{d:"M10 1.5l2.39 4.84 5.34.78-3.87 3.77.91 5.32L10 13.77l-4.77 2.44.91-5.32L2.27 7.12l5.34-.78L10 1.5z",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function Ul({value:e,defaultValue:t=0,onChange:r,max:s=5,allowHalf:a=!1,disabled:o,readOnly:l,label:i,className:u,size:c="md"}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,[N,g]=x.useState(null),h=N??S,w=(v,b)=>{if(!a)return v;const k=b.currentTarget.getBoundingClientRect();return b.clientX-k.left<k.width/2?v-.5:v},p=(v,b)=>{if(o||l)return;const k=w(v,b);d||y(k),r==null||r(k)},m=(v,b)=>{o||l||g(w(v,b))};return n.jsx("div",{className:C("vx-rating",`vx-rating--${c}`,o&&"vx-rating--disabled",u),role:"group","aria-label":i??"Rating",children:Array.from({length:s},(v,b)=>{const k=b+1,j=h>=k,T=!j&&h>=k-.5;return n.jsx("button",{type:"button",className:C("vx-rating__star",(j||T)&&"vx-rating__star--active"),onClick:E=>p(k,E),onMouseMove:E=>m(k,E),onMouseLeave:()=>g(null),disabled:o,"aria-label":`${k} star${k!==1?"s":""}`,"aria-pressed":S>=k,tabIndex:l||o?-1:0,children:n.jsx(Hl,{filled:j,half:T})},b)})})}function zr({node:e,depth:t,selected:r,expanded:s,onSelect:a,onToggle:o}){const l=e.children&&e.children.length>0,i=s.has(e.id),u=r===e.id,c=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),e.disabled||a(e.id,e)),d.key==="ArrowRight"&&l&&!i&&(d.preventDefault(),o(e.id)),d.key==="ArrowLeft"&&i&&(d.preventDefault(),o(e.id))};return n.jsxs("li",{role:"treeitem","aria-selected":u,"aria-expanded":l?i:void 0,children:[n.jsxs("div",{className:C("vx-tree__node",u&&"vx-tree__node--selected",e.disabled&&"vx-tree__node--disabled"),style:{paddingLeft:`${8+t*20}px`},onClick:()=>{e.disabled||(a(e.id,e),l&&o(e.id))},onKeyDown:c,tabIndex:e.disabled?-1:0,role:"button","aria-label":typeof e.label=="string"?e.label:void 0,children:[n.jsx("span",{className:C("vx-tree__expand",!l&&"vx-tree__expand--hidden"),children:n.jsx(be,{size:14,className:C("vx-tree__chevron",i&&"vx-tree__chevron--open")})}),e.icon&&n.jsx("span",{className:"vx-tree__icon",children:e.icon}),n.jsx("span",{className:"vx-tree__label",children:e.label})]}),l&&i&&n.jsx("ul",{role:"group",className:"vx-tree__children",children:e.children.map(d=>n.jsx(zr,{node:d,depth:t+1,selected:r,expanded:s,onSelect:a,onToggle:o},d.id))})]})}function Wl({nodes:e=[],selected:t,defaultSelected:r,onSelect:s,defaultExpanded:a=[],expanded:o,onExpandedChange:l,className:i}){const u=t!==void 0,[c,d]=x.useState(r),f=u?t:c,y=o!==void 0,[S,N]=x.useState(new Set(a)),g=y?new Set(o):S,h=x.useCallback((p,m)=>{u||d(p),s==null||s(p,m)},[u,s]),w=x.useCallback(p=>{const m=new Set(g);m.has(p)?m.delete(p):m.add(p),y||N(m),l==null||l([...m])},[g,y,l]);return n.jsx("ul",{className:C("vx-tree",i),role:"tree","aria-multiselectable":"false",children:e.map(p=>n.jsx(zr,{node:p,depth:0,selected:f,expanded:g,onSelect:h,onToggle:w},p.id))})}function Gl({value:e,defaultValue:t=[],onChange:r,label:s,hint:a,error:o,placeholder:l="Add tag...",confirmKeys:i=["Enter",","],maxTags:u,validate:c,disabled:d,className:f,...y}){const S=e!==void 0,[N,g]=x.useState(t),h=S?e:N,[w,p]=x.useState(""),[m,v]=x.useState(),b=x.useRef(null),k=A=>{S||g(A),r==null||r(A)},j=A=>{const D=A.trim();if(D){if(h.includes(D)){v("Tag already exists");return}if(u&&h.length>=u){v(`Max ${u} tags`);return}if(c){const O=c(D);if(O===!1){v("Invalid tag");return}if(typeof O=="string"){v(O);return}}v(void 0),k([...h,D]),p("")}},T=A=>{k(h.filter((D,O)=>O!==A))},E=A=>{i.includes(A.key)?(A.preventDefault(),j(w)):A.key==="Backspace"&&!w&&h.length>0&&T(h.length-1)},R=o??m;return n.jsxs("div",{className:C("vx-tag-input",f),children:[s?n.jsx("span",{className:"vx-field-group__label",children:s}):null,n.jsxs("div",{className:C("vx-tag-input__wrap",R&&"vx-tag-input__wrap--invalid",d&&"vx-tag-input__wrap--disabled"),onClick:()=>{var A;return(A=b.current)==null?void 0:A.focus()},children:[h.map((A,D)=>n.jsxs("span",{className:"vx-tag-input__tag",children:[A,!d&&n.jsx("button",{type:"button",className:"vx-tag-input__remove",onClick:O=>{O.stopPropagation(),T(D)},"aria-label":`Remove tag ${A}`,children:n.jsx(re,{size:11})})]},D)),n.jsx("input",{ref:b,className:"vx-tag-input__input",value:w,placeholder:h.length===0?l:"",disabled:d,onKeyDown:E,onChange:A=>{p(A.target.value),v(void 0)},onBlur:()=>{w.trim()&&j(w)},"aria-label":s??"Tag input",...y})]}),R?n.jsx("span",{className:"vx-field-group__error",children:R}):null,!R&&a?n.jsx("span",{className:"vx-field-group__hint",children:a}):null]})}function Vl(e){const t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,s=parseInt(e.slice(5,7),16)/255,a=Math.max(t,r,s),o=Math.min(t,r,s),l=(a+o)/2;let i=0,u=0;if(a!==o){const c=a-o;switch(u=c/(l>.5?2-a-o:a+o),a){case t:i=((r-s)/c+(r<s?6:0))/6;break;case r:i=((s-t)/c+2)/6;break;case s:i=((t-r)/c+4)/6;break}}return[Math.round(i*360),Math.round(u*100),Math.round(l*100)]}function nt(e,t,r){const s=e/360,a=t/100,o=r/100,l=(f,y,S)=>{let N=S;return N<0&&(N+=1),N>1&&(N-=1),N<1/6?f+(y-f)*6*N:N<1/2?y:N<2/3?f+(y-f)*(2/3-N)*6:f};let i,u,c;if(a===0)i=u=c=o;else{const f=o<.5?o*(1+a):o+a-o*a,y=2*o-f;i=l(y,f,s+1/3),u=l(y,f,s),c=l(y,f,s-1/3)}const d=f=>Math.round(f*255).toString(16).padStart(2,"0");return`#${d(i)}${d(u)}${d(c)}`}function Qt(e){return/^#[0-9a-f]{6}$/i.test(e)}const Kl=["#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899","#64748b","#0f172a","#ffffff","#f8fafc"];function ql({value:e,defaultValue:t="#3b82f6",onChange:r,label:s,hint:a,error:o,disabled:l,presets:i=Kl,showPresets:u=!0,className:c}){const d=e!==void 0,[f,y]=x.useState(t),S=d?e:f,[N,g]=x.useState(S),[h,w]=x.useState(!1),p=x.useRef(null);x.useEffect(()=>{if(!h)return;const T=R=>{p.current&&!p.current.contains(R.target)&&w(!1)},E=R=>{R.key==="Escape"&&(R.preventDefault(),w(!1))};return document.addEventListener("mousedown",T),document.addEventListener("touchstart",T,{passive:!0}),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("touchstart",T),document.removeEventListener("keydown",E)}},[h]),x.useEffect(()=>{if(!(!h||!window.matchMedia("(max-width: 640px)").matches))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[h]);const[m,v,b]=Qt(S)?Vl(S):[0,0,50],k=x.useCallback(T=>{d||y(T),g(T),r==null||r(T)},[d,r]),j=T=>{const E=T.startsWith("#")?T:`#${T}`;g(E),Qt(E)&&k(E)};return n.jsxs("div",{ref:p,className:C("vx-colorpicker",c),children:[s?n.jsx("span",{className:"vx-field-group__label",children:s}):null,n.jsxs("div",{className:"vx-colorpicker__row",children:[n.jsx("button",{type:"button",className:C("vx-colorpicker__swatch-btn",l&&"vx-colorpicker__swatch-btn--disabled"),style:{"--vx-cp-color":S},onClick:()=>!l&&w(T=>!T),disabled:l,"aria-label":`Current color: ${S}. Click to open color picker.`,"aria-haspopup":"dialog","aria-expanded":h}),n.jsx("input",{type:"text",className:"vx-colorpicker__hex-input",value:N,onChange:T=>j(T.target.value),disabled:l,"aria-label":"Hex color value",maxLength:7})]}),o?n.jsx("span",{className:"vx-field-group__error",children:o}):null,!o&&a?n.jsx("span",{className:"vx-field-group__hint",children:a}):null,h&&n.jsxs("div",{className:"vx-colorpicker__panel",role:"dialog","aria-label":"Color picker",children:[n.jsx("div",{className:"vx-colorpicker__section-label",children:"Hue"}),n.jsx("input",{type:"range",className:"vx-colorpicker__hue-slider",min:"0",max:"360",value:m,onChange:T=>k(nt(Number(T.target.value),v,b)),"aria-label":"Hue"}),n.jsx("div",{className:"vx-colorpicker__section-label",children:"Saturation"}),n.jsx("input",{type:"range",className:"vx-colorpicker__sat-slider",min:"0",max:"100",value:v,style:{"--vx-cp-hue":m},onChange:T=>k(nt(m,Number(T.target.value),b)),"aria-label":"Saturation"}),n.jsx("div",{className:"vx-colorpicker__section-label",children:"Lightness"}),n.jsx("input",{type:"range",className:"vx-colorpicker__lit-slider",min:"0",max:"100",value:b,style:{"--vx-cp-hue":m,"--vx-cp-sat":`${v}%`},onChange:T=>k(nt(m,v,Number(T.target.value))),"aria-label":"Lightness"}),u&&n.jsx("div",{className:"vx-colorpicker__presets",children:i.map(T=>n.jsx("button",{type:"button",className:C("vx-colorpicker__preset",S.toLowerCase()===T.toLowerCase()&&"vx-colorpicker__preset--active"),style:{background:T},onClick:()=>k(T),"aria-label":T},T))}),n.jsx("button",{type:"button",className:"vx-colorpicker__close",onClick:()=>w(!1),children:"Done"})]})]})}function Yl({direction:e="horizontal",children:t,className:r}){return n.jsx("div",{className:C("vx-resizable-group",`vx-resizable-group--${e}`,r),children:t})}function Xl({children:e,defaultSize:t=50,minSize:r=10,maxSize:s=90,className:a,style:o}){return n.jsx("div",{className:C("vx-resizable-panel",a),style:{"--vx-panel-size":`${t}%`,...o},"data-min":r,"data-max":s,children:e})}function Zl({className:e,direction:t="horizontal"}){const r=x.useRef(!1),[s,a]=x.useState(!1),o=x.useCallback(l=>{const i=l.currentTarget,u=i.previousElementSibling,c=i.nextElementSibling;if(!u||!c)return;const d=i.parentElement,f=t==="horizontal",y=f?d.getBoundingClientRect().width:d.getBoundingClientRect().height,S=f?u.getBoundingClientRect().width:u.getBoundingClientRect().height,N=f?c.getBoundingClientRect().width:c.getBoundingClientRect().height,g=j=>"touches"in j?f?j.touches[0].clientX:j.touches[0].clientY:f?j.clientX:j.clientY,h=g(l.nativeEvent);r.current=!0,a(!0);const w=Number(u.dataset.min??10)/100*y,p=Number(u.dataset.max??90)/100*y,m=Number(c.dataset.min??10)/100*y,v=Number(c.dataset.max??90)/100*y,b=j=>{if(!r.current)return;const T=g(j)-h,E=Math.min(Math.max(S+T,w),p),R=Math.min(Math.max(N-T,m),v);u.style.flexBasis=`${E/y*100}%`,c.style.flexBasis=`${R/y*100}%`},k=()=>{r.current=!1,a(!1),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",k),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",k)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",k),document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",k)},[t]);return n.jsx("div",{role:"separator","aria-orientation":t==="horizontal"?"vertical":"horizontal",className:C("vx-resizable-handle",`vx-resizable-handle--${t}`,s&&"vx-resizable-handle--active",e),onMouseDown:o,onTouchStart:o,children:n.jsx("span",{className:"vx-resizable-handle__bar","aria-hidden":"true"})})}function Jt(e,t){if(!t)return e;const r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?e:n.jsxs(n.Fragment,{children:[e.slice(0,r),n.jsx("mark",{className:"vx-cmd__mark",children:e.slice(r,r+t.length)}),e.slice(r+t.length)]})}function Ql(e,t){const r=t.toLowerCase(),s=e.title.toLowerCase(),a=e.section.toLowerCase(),o=e.description.toLowerCase(),l=(e.keywords??[]).join(" ").toLowerCase();return s===r?100:s.startsWith(r)?80:s.includes(r)?60:a.includes(r)?40:l.includes(r)?35:o.includes(r)?20:0}function Jl({entries:e,open:t,onClose:r,onSelect:s,placeholder:a="Search components, pages, keywords…",ariaLabel:o="Search",emptyText:l=d=>`No results for "${d}"`,labelNavigate:i="Navigate",labelGo:u="Go",labelClose:c="Close"}){const[d,f]=x.useState(""),[y,S]=x.useState(0),N=x.useRef(null),g=x.useRef(null),h=d.trim()?e.map(v=>({entry:v,s:Ql(v,d.trim())})).filter(v=>v.s>0).sort((v,b)=>b.s-v.s).map(v=>v.entry):e;x.useEffect(()=>{t&&(f(""),S(0),setTimeout(()=>{var v;return(v=N.current)==null?void 0:v.focus()},30))},[t]),x.useEffect(()=>{S(0)},[d]),x.useEffect(()=>{var b;const v=(b=g.current)==null?void 0:b.children[y];v==null||v.scrollIntoView({block:"nearest"})},[y]);const w=x.useCallback(v=>{s(v),r()},[s,r]),p=x.useCallback(v=>{v.key==="ArrowDown"?(v.preventDefault(),S(b=>Math.min(b+1,h.length-1))):v.key==="ArrowUp"?(v.preventDefault(),S(b=>Math.max(b-1,0))):v.key==="Enter"?(v.preventDefault(),h[y]&&w(h[y].key)):v.key==="Escape"&&r()},[h,y,w,r]);if(!t)return null;const m=[];for(const v of h){const b=m[m.length-1];b&&b.section===v.section?b.items.push(v):m.push({section:v.section,items:[v]})}return n.jsx("div",{className:"vx-cmd__backdrop",onMouseDown:r,children:n.jsxs("div",{className:"vx-cmd",role:"dialog","aria-modal":"true","aria-label":o,onMouseDown:v=>v.stopPropagation(),children:[n.jsxs("div",{className:"vx-cmd__search",children:[n.jsxs("svg",{className:"vx-cmd__search-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:"6.5",cy:"6.5",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("path",{d:"M10.5 10.5L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),n.jsx("input",{ref:N,className:"vx-cmd__input",type:"text",placeholder:a,value:d,onChange:v=>f(v.target.value),onKeyDown:p,autoComplete:"off",spellCheck:!1}),d?n.jsx("button",{className:"vx-cmd__clear",onClick:()=>f(""),"aria-label":"清除",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):n.jsx("kbd",{className:"vx-cmd__esc",children:"esc"})]}),n.jsx("ul",{className:"vx-cmd__list",ref:g,role:"listbox",children:h.length===0?n.jsx("li",{className:"vx-cmd__empty",children:l(d)}):m.map(v=>v.items.map((b,k)=>{const j=h.indexOf(b),T=j===y;return n.jsxs("li",{role:"option","aria-selected":T,className:`vx-cmd__item${T?" vx-cmd__item--active":""}`,onMouseEnter:()=>S(j),onMouseDown:()=>w(b.key),children:[b.icon?n.jsx("span",{className:"vx-cmd__item-icon",children:b.icon}):n.jsx("span",{className:"vx-cmd__item-icon vx-cmd__item-icon--section",children:b.section.slice(0,1)}),n.jsxs("span",{className:"vx-cmd__item-body",children:[n.jsx("span",{className:"vx-cmd__item-title",children:Jt(b.title,d)}),n.jsx("span",{className:"vx-cmd__item-sub",children:Jt(b.section,d)})]}),T&&n.jsx("kbd",{className:"vx-cmd__enter",children:"↵"})]},b.key)}))}),n.jsxs("div",{className:"vx-cmd__footer",children:[n.jsxs("span",{children:[n.jsx("kbd",{children:"↑↓"})," ",i]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"↵"})," ",u]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"esc"})," ",c]})]})]})})}var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ec(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},tn;function tc(){return tn||(tn=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
141
141
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
142
142
|
*
|
|
143
143
|
* @license MIT <https://opensource.org/licenses/MIT>
|
|
144
144
|
* @author Lea Verou <https://lea.verou.me>
|
|
145
145
|
* @namespace
|
|
146
146
|
* @public
|
|
147
|
-
*/var r=(function(s){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},i={manual:s.Prism&&s.Prism.manual,disableWorkerMessageHandler:s.Prism&&s.Prism.disableWorkerMessageHandler,util:{encode:function p(m){return m instanceof u?new u(m.type,p(m.content),m.alias):Array.isArray(m)?m.map(p):m.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(p){return Object.prototype.toString.call(p).slice(8,-1)},objId:function(p){return p.__id||Object.defineProperty(p,"__id",{value:++o}),p.__id},clone:function p(m,v){v=v||{};var b,k;switch(i.util.type(m)){case"Object":if(k=i.util.objId(m),v[k])return v[k];b={},v[k]=b;for(var j in m)m.hasOwnProperty(j)&&(b[j]=p(m[j],v));return b;case"Array":return k=i.util.objId(m),v[k]?v[k]:(b=[],v[k]=b,m.forEach(function(T,E){b[E]=p(T,v)}),b);default:return m}},getLanguage:function(p){for(;p;){var m=a.exec(p.className);if(m)return m[1].toLowerCase();p=p.parentElement}return"none"},setLanguage:function(p,m){p.className=p.className.replace(RegExp(a,"gi"),""),p.classList.add("language-"+m)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(b){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(b.stack)||[])[1];if(p){var m=document.getElementsByTagName("script");for(var v in m)if(m[v].src==p)return m[v]}return null}},isActive:function(p,m,v){for(var b="no-"+m;p;){var k=p.classList;if(k.contains(m))return!0;if(k.contains(b))return!1;p=p.parentElement}return!!v}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(p,m){var v=i.util.clone(i.languages[p]);for(var b in m)v[b]=m[b];return v},insertBefore:function(p,m,v,b){b=b||i.languages;var k=b[p],j={};for(var T in k)if(k.hasOwnProperty(T)){if(T==m)for(var E in v)v.hasOwnProperty(E)&&(j[E]=v[E]);v.hasOwnProperty(T)||(j[T]=k[T])}var R=b[p];return b[p]=j,i.languages.DFS(i.languages,function(A,F){F===R&&A!=p&&(this[A]=j)}),j},DFS:function p(m,v,b,k){k=k||{};var j=i.util.objId;for(var T in m)if(m.hasOwnProperty(T)){v.call(m,T,m[T],b||T);var E=m[T],R=i.util.type(E);R==="Object"&&!k[j(E)]?(k[j(E)]=!0,p(E,v,null,k)):R==="Array"&&!k[j(E)]&&(k[j(E)]=!0,p(E,v,T,k))}}},plugins:{},highlightAll:function(p,m){i.highlightAllUnder(document,p,m)},highlightAllUnder:function(p,m,v){var b={callback:v,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",b),b.elements=Array.prototype.slice.apply(b.container.querySelectorAll(b.selector)),i.hooks.run("before-all-elements-highlight",b);for(var k=0,j;j=b.elements[k++];)i.highlightElement(j,m===!0,b.callback)},highlightElement:function(p,m,v){var b=i.util.getLanguage(p),k=i.languages[b];i.util.setLanguage(p,b);var j=p.parentElement;j&&j.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(j,b);var T=p.textContent,E={element:p,language:b,grammar:k,code:T};function R(F){E.highlightedCode=F,i.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,i.hooks.run("after-highlight",E),i.hooks.run("complete",E),v&&v.call(E.element)}if(i.hooks.run("before-sanity-check",E),j=E.element.parentElement,j&&j.nodeName.toLowerCase()==="pre"&&!j.hasAttribute("tabindex")&&j.setAttribute("tabindex","0"),!E.code){i.hooks.run("complete",E),v&&v.call(E.element);return}if(i.hooks.run("before-highlight",E),!E.grammar){R(i.util.encode(E.code));return}if(m&&s.Worker){var A=new Worker(i.filename);A.onmessage=function(F){R(F.data)},A.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else R(i.highlight(E.code,E.grammar,E.language))},highlight:function(p,m,v){var b={code:p,grammar:m,language:v};if(i.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=i.tokenize(b.code,b.grammar),i.hooks.run("after-tokenize",b),u.stringify(i.util.encode(b.tokens),b.language)},tokenize:function(p,m){var v=m.rest;if(v){for(var b in v)m[b]=v[b];delete m.rest}var k=new f;return y(k,k.head,p),d(p,k,m,k.head,0),N(k)},hooks:{all:{},add:function(p,m){var v=i.hooks.all;v[p]=v[p]||[],v[p].push(m)},run:function(p,m){var v=i.hooks.all[p];if(!(!v||!v.length))for(var b=0,k;k=v[b++];)k(m)}},Token:u};s.Prism=i;function u(p,m,v,b){this.type=p,this.content=m,this.alias=v,this.length=(b||"").length|0}u.stringify=function p(m,v){if(typeof m=="string")return m;if(Array.isArray(m)){var b="";return m.forEach(function(R){b+=p(R,v)}),b}var k={type:m.type,content:p(m.content,v),tag:"span",classes:["token",m.type],attributes:{},language:v},j=m.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(k.classes,j):k.classes.push(j)),i.hooks.run("wrap",k);var T="";for(var E in k.attributes)T+=" "+E+'="'+(k.attributes[E]||"").replace(/"/g,""")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+T+">"+k.content+"</"+k.tag+">"};function c(p,m,v,b){p.lastIndex=m;var k=p.exec(v);if(k&&b&&k[1]){var j=k[1].length;k.index+=j,k[0]=k[0].slice(j)}return k}function d(p,m,v,b,k,j){for(var T in v)if(!(!v.hasOwnProperty(T)||!v[T])){var E=v[T];E=Array.isArray(E)?E:[E];for(var R=0;R<E.length;++R){if(j&&j.cause==T+","+R)return;var A=E[R],F=A.inside,O=!!A.lookbehind,D=!!A.greedy,H=A.alias;if(D&&!A.pattern.global){var U=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,U+"g")}for(var V=A.pattern||A,L=b.next,I=k;L!==m.tail&&!(j&&I>=j.reach);I+=L.value.length,L=L.next){var $=L.value;if(m.length>p.length)return;if(!($ instanceof u)){var P=1,M;if(D){if(M=c(V,I,p,O),!M||M.index>=p.length)break;var Z=M.index,B=M.index+M[0].length,z=I;for(z+=L.value.length;Z>=z;)L=L.next,z+=L.value.length;if(z-=L.value.length,I=z,L.value instanceof u)continue;for(var K=L;K!==m.tail&&(z<B||typeof K.value=="string");K=K.next)P++,z+=K.value.length;P--,$=p.slice(I,z),M.index-=I}else if(M=c(V,0,$,O),!M)continue;var Z=M.index,ae=M[0],Ue=$.slice(0,Z),At=$.slice(Z+ae.length),We=I+$.length;j&&We>j.reach&&(j.reach=We);var ke=L.prev;Ue&&(ke=y(m,ke,Ue),I+=Ue.length),S(m,ke,P);var Ur=new u(T,F?i.tokenize(ae,F):ae,H,ae);if(L=y(m,ke,Ur),At&&y(m,L,At),P>1){var Ge={cause:T+","+R,reach:We};d(p,m,v,L.prev,I,Ge),j&&Ge.reach>j.reach&&(j.reach=Ge.reach)}}}}}}function f(){var p={value:null,prev:null,next:null},m={value:null,prev:p,next:null};p.next=m,this.head=p,this.tail=m,this.length=0}function y(p,m,v){var b=m.next,k={value:v,prev:m,next:b};return m.next=k,b.prev=k,p.length++,k}function S(p,m,v){for(var b=m.next,k=0;k<v&&b!==p.tail;k++)b=b.next;m.next=b,b.prev=m,p.length-=k}function N(p){for(var m=[],v=p.head.next;v!==p.tail;)m.push(v.value),v=v.next;return m}if(!s.document)return s.addEventListener&&(i.disableWorkerMessageHandler||s.addEventListener("message",function(p){var m=JSON.parse(p.data),v=m.language,b=m.code,k=m.immediateClose;s.postMessage(i.highlight(b,i.languages[v],v)),k&&s.close()},!1)),i;var g=i.util.currentScript();g&&(i.filename=g.src,g.hasAttribute("data-manual")&&(i.manual=!0));function h(){i.manual||i.highlightAll()}if(!i.manual){var w=document.readyState;w==="loading"||w==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return i})(t);e.exports&&(e.exports=r),typeof en<"u"&&(en.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(s){s.type==="entity"&&(s.attributes.title=s.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(a,o){var l={};l["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[o]},l.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}};i["language-"+o]={pattern:/[\s\S]+/,inside:r.languages[o]};var u={};u[a]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(s,a){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+s+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[a,"language-"+a],inside:r.languages[a]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(s){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+a.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var o=s.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var s="Loading…",a=function(g,h){return"✖ Error "+g+" while fetching file: "+h},o="✖ Error: File does not exist or is empty",l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",u="loading",c="loaded",d="failed",f="pre[data-src]:not(["+i+'="'+c+'"]):not(['+i+'="'+u+'"])';function y(g,h,w){var p=new XMLHttpRequest;p.open("GET",g,!0),p.onreadystatechange=function(){p.readyState==4&&(p.status<400&&p.responseText?h(p.responseText):p.status>=400?w(a(p.status,p.statusText)):w(o))},p.send(null)}function S(g){var h=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(h){var w=Number(h[1]),p=h[2],m=h[3];return p?m?[w,Number(m)]:[w,void 0]:[w,w]}}r.hooks.add("before-highlightall",function(g){g.selector+=", "+f}),r.hooks.add("before-sanity-check",function(g){var h=g.element;if(h.matches(f)){g.code="",h.setAttribute(i,u);var w=h.appendChild(document.createElement("CODE"));w.textContent=s;var p=h.getAttribute("data-src"),m=g.language;if(m==="none"){var v=(/\.(\w+)$/.exec(p)||[,"none"])[1];m=l[v]||v}r.util.setLanguage(w,m),r.util.setLanguage(h,m);var b=r.plugins.autoloader;b&&b.loadLanguages(m),y(p,function(k){h.setAttribute(i,c);var j=S(h.getAttribute("data-range"));if(j){var T=k.split(/\r\n?|\n/g),E=j[0],R=j[1]==null?T.length:j[1];E<0&&(E+=T.length),E=Math.max(0,Math.min(E-1,T.length)),R<0&&(R+=T.length),R=Math.max(0,Math.min(R,T.length)),k=T.slice(E,R).join(`
|
|
148
|
-
`),h.hasAttribute("data-start")||h.setAttribute("data-start",String(E+1))}w.textContent=k,r.highlightElement(w)},function(k){h.setAttribute(i,d),w.textContent=k})}}),r.plugins.fileHighlight={highlight:function(h){for(var w=(h||document).querySelectorAll(f),p=0,m;m=w[p++];)r.highlightElement(m)}};var N=!1;r.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(rt)),rt.exports}var nc=tc();const Re=ec(nc);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[r]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:Prism.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(e){var t=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,s=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(u,c){return u=u.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return s}).replace(/<SPREAD>/g,function(){return a}),RegExp(u,c)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},i=function(u){for(var c=[],d=0;d<u.length;d++){var f=u[d],y=!1;if(typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===l(f.content[0].content[1])&&c.pop():f.content[f.content.length-1].content==="/>"||c.push({tagName:l(f.content[0].content[1]),openedBraces:0}):c.length>0&&f.type==="punctuation"&&f.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&f.type==="punctuation"&&f.content==="}"?c[c.length-1].openedBraces--:y=!0),(y||typeof f=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var S=l(f);d<u.length-1&&(typeof u[d+1]=="string"||u[d+1].type==="plain-text")&&(S+=l(u[d+1]),u.splice(d+1,1)),d>0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(S=l(u[d-1])+S,u.splice(d-1,1),d--),u[d]=new e.Token("plain-text",S,null,S)}f.content&&typeof f.content!="string"&&i(f.content)}};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||i(u.tokens)})})(Prism);var nn={},rn;function rc(){return rn||(rn=1,(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism)),nn}rc();(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,l=0;l<a.length;l++)o[a[l]]=e.languages.bash[a[l]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;function sc({code:e,language:t="tsx",copyLabel:r,copiedLabel:s,onCopy:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useMemo(()=>{const d=Re.languages[t]??Re.languages.tsx??Re.languages.typescript;return d?Re.highlight(e,d,t):e},[e,t]);x.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);async function c(){await a(e)&&(l(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{l(!1),i.current=null},1600))}return n.jsxs("div",{className:"vx-code-block-wrap","data-language":t,children:[n.jsxs(oe,{type:"button",size:"sm",variant:o?"solid":"secondary",className:o?"vx-code-block__copy vx-code-block__copy--copied":"vx-code-block__copy",onClick:()=>void c(),children:[o?n.jsx(Me,{size:14}):n.jsx(ls,{size:14}),o?s:r]}),n.jsx("pre",{className:"vx-code-block",children:n.jsx("code",{className:`vx-code-block__code language-${t}`,dangerouslySetInnerHTML:{__html:u}})})]})}const ac="1.3.1",oc={version:ac},Ie=`v${oc.version}`,Hr={locale:"en",label:"English",searchPlaceholder:"Search components, pages, keywords…",searchAriaLabel:"Search",searchEmpty:e=>`No results for "${e}"`,searchNavigate:"Navigate",searchGo:"Go",searchClose:"Close",sidebarCollapse:"Collapse",sidebarExpand:"Expand",sidebarCloseLabel:"Close sidebar",searchTrigger:"Search",versionLabel:Ie,mobilePreview:"Mobile Preview",nav:{gettingStarted:"Getting Started",layout:"Layout",components:"Components",feedback:"Feedback",navigation:"Navigation",mobile:"Responsive",templates:"Templates"},pages:{introduction:"Introduction","quick-start":"Quick Start","shell-sidebar":"Shell & Sidebar","grid-page":"Grid & Page",button:"Button",elements:"Elements","form-controls":"Form Controls","form-inputs":"Form Inputs",overlays:"Overlays","data-display":"Data Display",navigation:"Navigation","data-list":"Data List","empty-states":"Empty States",toasts:"Toasts",feedback:"Feedback Components","nav-layout":"Navigation & Layout",mobile:"Mobile Components","command-palette":"Command Palette","code-block":"Code Block","language-switcher":"Language Switcher","home-page":"Home Page","login-page":"Login Page","register-page":"Register Page","error-page":"Error Page","privacy-policy":"Privacy Policy","terms-of-service":"Terms of Service"},docs:{guidance:"Guidance",guidanceDesc:"Keep the implementation tight and let the design system do most of the visual work.",preview:"Preview",previewDesc:"A compact example of how this area should feel inside the system.",notes:"Notes",primaryTheme:"Primary Theme",primaryThemeDesc:"Blue-gray neutrals keep emphasis reserved for actions, not decoration.",tokenScale:"Token Scale",tokenScaleDesc:"Reuse the shared surface, border, and text variables before introducing page-specific styles.",themeStudio:"Theme Studio",themeStudioDesc:"Register named themes once, then switch every component with a single key.",liveControls:"Live Controls",liveControlsDesc:"A few reusable primitives are still available inside the docs surface.",searchDocs:"Search docs",searchDocsPlaceholder:"Buttons, tokens, layout...",compactDensity:"Compact density",compactDensityDesc:"Tighten the vertical rhythm for denser operator views.",systemPreview:"System Preview",openSection:"Open section"},intro:{tagline:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",getStarted:"Get Started",browseComponents:"Browse Components",atAGlance:"At a Glance",designTokens:"Design Tokens",designTokensLead:"All colors, spacing, and typography values are exposed as CSS custom properties under the vx namespace. Register named light and dark themes once, then swap the whole framework by theme key.",componentFamilies:"Component Families"},glance:{zeroDeps:"Zero dependencies",zeroDepsHint:"Original shell runtime does not require a build pipeline.",components:"Components",componentsHint:"Layout, form, feedback, and list primitives in one system.",coreCSS:"Core CSS",coreCSSHint:"Neutral tokens and structural styles stay compact.",darkMode:"Dark mode",darkModeHint:"Semantic variables keep the same components reusable."},tokens:{primary:"Primary",primaryDesc:"Accent color for primary actions, active navigation, and emphasis.",surface:"Surface",surfaceDesc:"Default panel and content background for documentation cards and shell regions.",border:"Border",borderDesc:"Light separators that keep the UI structured without adding visual weight.",text:"Text",textDesc:"Primary foreground used for headings, dense data, and body copy."},families:{layout:"Layout",layoutDesc:"App shell, sticky header, section rhythm, and responsive content framing.",elements:"Elements",elementsDesc:"Quiet primitives for actions, metadata, and structured content blocks.",forms:"Forms",formsDesc:"Inputs, switches, dialogs, and field composition patterns.",feedback:"Feedback",feedbackDesc:"Transient toasts and interruptive confirmation flows."},dataList:{name:"Name",kind:"Kind",updated:"Updated"},modeLabel:e=>`${e} mode`,publicPages:{navLogin:"Log in",navSignup:"Sign up",navDocs:"Docs",navLogout:"Log out",heroTag:`New · ${Ie}`,heroTitle:"Lightweight React UI library",heroLead:"Zero dependencies · 30+ components · Built-in theming & dark mode",heroCta:"Get started",heroCtaAlt:"Browse docs",previewLead:"",previewAccessTitle:"Access modes",previewAccessMember:"Sign in to keep a session and return to your workspace.",previewAccessGuest:"Open the docs as a guest when you just need to browse.",previewMobileTitle:"Mobile-ready",previewMobileLead:"Navigation and auth layouts adapt naturally on mobile.",featuresSectionTitle:"Why vxUI",feat1:"Zero dependencies",feat1Desc:"Pure CSS + TypeScript, no peer dependencies.",feat2:"30+ components",feat2Desc:"Layout, form, feedback and list primitives in one system.",feat3:"Themeable",feat3Desc:"CSS variable-driven, swap the whole theme with one key.",feat4:"Dark mode",feat4Desc:"Semantic tokens work across light and dark themes.",footerCopy:"© 2026 vxUI. All rights reserved.",footerPrivacy:"Privacy Policy",footerGithub:"GitHub",footerWebsite:"Website",loginTitle:"Welcome back",loginSubtitle:"Sign in to access the documentation.",loginEmail:"Email",loginEmailPlaceholder:"you@example.com",loginPassword:"Password",loginPasswordPlaceholder:"At least 8 characters",loginCta:"Sign in",loginNoAccount:"Don't have an account?",loginRegister:"Register",loginGuest:"Continue without an account →",rememberMe:"Remember this device",showPassword:"Show",hidePassword:"Hide",authInfoTitle:"Guest access is available",authInfoBody:"You can go straight to the docs without an account. Sign in only if you want a persisted session example.",registerTitle:"Create account",registerSubtitle:"Get started with vxUI today.",registerName:"Full name",registerNamePlaceholder:"Jane Smith",registerEmail:"Email",registerEmailPlaceholder:"jane@company.com",registerPassword:"Password",registerPasswordPlaceholder:"Create a strong password",registerTermsAgree:"I agree to the",registerTermsLink:"Terms of Service",registerTermsAnd:"and",registerPrivacyLink:"Privacy Policy",registerCta:"Create account",registerHasAccount:"Already have an account?",registerLogin:"Sign in",registerGuest:"Continue without an account →",validationNameRequired:"Enter your full name.",validationNameShort:"Use at least 2 characters for your name.",validationEmailRequired:"Enter your email address.",validationEmailInvalid:"Enter a valid email address.",validationPasswordRequired:"Enter your password.",validationPasswordShort:"Use at least 8 characters for the password.",validationTermsRequired:"You must agree to the terms before creating an account.",sessionLoginTitle:"Signed in",sessionLoginBody:"Your session is active. You can now browse the docs as a signed-in user.",sessionRegisterTitle:"Account created",sessionRegisterBody:"Your sample account is ready and the docs are now unlocked.",sessionGuestTitle:"Browsing as guest",sessionGuestBody:"You entered the docs without a saved account session.",sessionLogoutTitle:"Signed out",sessionLogoutBody:"Your persisted session was cleared. You are back on the public site.",signedInAs:"Signed in as",guestLabel:"Guest",backHome:"← Back to home",backToDocs:"Back to docs"},pageDefs:{introduction:{section:"Introduction",title:"Introduction",description:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",guidance:["Start from the shell and navigation rhythm before styling isolated controls.","Keep tokens semantic so a theme swap does not require page-specific overrides.","Treat documentation, examples, and production surfaces as the same design system."]},"quick-start":{section:"Installation",title:"Quick Start",description:"Install the package, wrap your app with providers, and mount a page shell before composing business screens.",guidance:["Import the shared stylesheet once near the application root.","Use AppShell for product chrome and keep page content inside the main slot.","Add ThemeProvider and ToastProvider only when the app needs them."]},"shell-sidebar":{section:"Components",title:"Shell & Sidebar",description:"The shell is responsible for sidebar hierarchy, sticky header spacing, and content width. Navigation items support nested sub-menus via the `children` prop — click a parent to expand or collapse its sub-items.",guidance:["Keep navigation labels short so collapsed mode stays scannable.","Use section titles to separate page groups instead of visual noise.","Add `children` to a nav item to make it expandable; set `defaultOpen: true` to start it expanded.","If any child is active, AppShell auto-opens the parent group.",'Customize the sidebar width via the `sidebarWidth` prop (e.g. `sidebarWidth={280}` or `"18rem"`).'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"Brand / product name shown in the sidebar header."},{prop:"brandCaption",type:"string",description:"Secondary subtitle displayed below the brand name."},{prop:"brandIcon",type:"ReactNode",description:"Logo element (image or icon) rendered in the sidebar header."},{prop:"title",type:"string",description:"Page title shown in the topbar."},{prop:"description",type:"string",description:"Page subtitle / description shown below the topbar title."},{prop:"breadcrumb",type:"ReactNode",description:"Breadcrumb element rendered in the topbar."},{prop:"navSections",type:"AppShellNavSection[]",description:"Structured navigation tree grouped by sections. Preferred over navItems."},{prop:"navItems",type:"AppShellNavItem[]",description:"Flat navigation list. Automatically wrapped in a single unnamed section."},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"Collapse sidebar to icon-only rail mode."},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'Custom sidebar width. Pass a number for px (e.g. 280) or a CSS string (e.g. "18rem").'},{prop:"density",type:'"comfortable" | "compact"',description:'Layout density. "compact" tightens vertical rhythm for high-density operator UIs.'},{prop:"headerActions",type:"ReactNode",description:"Slot for right-aligned topbar actions (buttons, dropdowns, user menu, etc.)."},{prop:"sidebarFooter",type:"ReactNode",description:"Slot rendered at the bottom of the sidebar (user info, settings link, etc.)."},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"Controls whether the mobile navigation overlay is visible."},{prop:"onSidebarToggle",type:"() => void",description:"Called when the collapse / expand button is clicked."},{prop:"onMobileNavToggle",type:"() => void",description:"Called when the mobile overlay toggle button is clicked. Required to enable mobile nav."},{prop:"children",type:"ReactNode",required:!0,description:"Main page content rendered inside ShellContent."}]},"grid-page":{section:"Components",title:"Grid & Page",description:"Use simple responsive grids for cards, tokens, and documentation blocks. The page surface should stay neutral and let content carry emphasis.",guidance:["Prefer 12 to 16 pixel gaps for dense documentation surfaces.","Reserve larger spacing for section boundaries, not every card.","Keep max width constrained so long paragraphs remain readable."]},button:{section:"Components",title:"Button",description:"Buttons carry the primary action hierarchy for the system. Variants, sizes, and width should communicate intent without requiring extra styling.",guidance:["Use the solid variant for the primary action in a given area.","Use secondary or ghost variants for supporting actions that should stay visually quieter.","Use fullWidth for stacked mobile actions or single-column forms."]},elements:{section:"Components",title:"Elements",description:"Buttons, badges, and cards should feel quiet by default. The primary action can be loud; everything else should support it.",guidance:["One primary action per area is usually enough.","Use badges for compact status or category metadata, not decoration.","Cards should organize content without feeling like dashboards by default."]},"form-controls":{section:"Components",title:"Form Controls",description:"A complete set of form primitives: single-line inputs, multi-line textarea, searchable single-select (Select), multi-select with tag display (MultiSelect), and time selection (TimePicker). All share the same label / hint / error layout system.",guidance:["Always pair form controls with visible labels in admin surfaces.","Use Select for single-select with optional search; set `searchable={N}` to show the search input only when options exceed N.","Use MultiSelect when users need to pick several values from a bounded list.","TimePicker supports 24-hour format and an optional seconds column via the `seconds` prop.","Short helper text is better than placeholder-only instruction."]},navigation:{section:"Components",title:"Navigation",description:"Navigation patterns should communicate location first, then available movement. Tabs work best for sibling views within a single page context.",guidance:["Mirror information architecture in the control structure.","Make the active state obvious without relying on color alone.","Avoid mixing route navigation and local view state in one control."]},"data-list":{section:"Components",title:"Data List",description:"Lists and tables should prioritize scanning over ornament. Use generous alignment, light separators, and action density only where needed.",guidance:["Align headers and row content precisely to reduce visual drift.","Use subtle borders instead of heavy card chrome around every row.","Reserve destructive affordances for row action groups, not inline text links."]},"empty-states":{section:"Components",title:"Empty States",description:"An empty state should explain what is missing, why it matters, and what the next action is. It should never feel like a dead end.",guidance:["Name the object that is absent so users know what they are looking at.","Offer one clear recovery action.","Keep the visual weight lighter than success or alert feedback."]},toasts:{section:"Components",title:"Toasts",description:"Toasts confirm short-lived events without interrupting task flow. Keep them brief, specific, and easy to dismiss.",guidance:["Use success and info to confirm background actions.","Escalate blocking or destructive states to dialogs instead of stacking toasts.","Avoid repeating the same message on every page transition."]},feedback:{section:"Components",title:"Feedback Components",description:"Spinner, Progress, Alert, and Skeleton give users clear signals about loading states, results, and missing content.",guidance:["Use Spinner for short indeterminate waits; Progress for deterministic operations.","Prefer Alert over toast for persistent or page-level status messages.","Skeleton should match the shape of the content it replaces to reduce layout shift."]},overlays:{section:"Components",title:"Overlays",description:"Tooltip, Popover, and DropdownMenu layer transient content above the page without navigating away.",guidance:["Tooltips are for supplementary text only — never interactive content.","Popovers can contain forms and rich content; they require explicit close triggers.","DropdownMenus should group related actions and support keyboard navigation."]},"nav-layout":{section:"Components",title:"Navigation & Layout",description:"Breadcrumb, Pagination, Accordion, and Separator handle location, paging, and structural rhythm.",guidance:["Breadcrumb mirrors route depth — omit it on single-level pages.","Pagination should show page count so users understand the data set size.","Accordion works best for progressive disclosure, not primary navigation."]},"data-display":{section:"Components",title:"Data Display",description:"Avatar and Table present user identity and structured data with clear hierarchy.",guidance:["Avatar should always have an accessible label, even when showing an image.","Table supports sortable columns — delegate sort state up when the data is server-side.","Use striped rows in dense tables to help eyes track across long rows."]},"form-inputs":{section:"Components",title:"Form Inputs",description:"Select, Checkbox, RadioGroup, Textarea, and Slider extend the form vocabulary beyond text inputs.",guidance:["Group radio buttons with RadioGroup to share name and semantics.","Slider is ideal for numeric ranges; pair it with showValue for immediate feedback.","Textarea defaults to vertical resize — disable resize only in fixed-height containers."]},mobile:{section:"Responsive",title:"Responsive Patterns",description:"A single responsive system for phone, tablet, and desktop. One route tree, one content model, and one set of components adapt through layout instead of duplicate applications.",guidance:["Keep the route tree identical across breakpoints; only the shell and density should change.","Turn persistent side navigation into a drawer on narrow screens instead of forking the page implementation.","Design cards, forms, and tables to reflow from three columns to one without changing component ownership."]},"home-page":{section:"Templates",title:"Home Page",description:"A landing-style home page with a hero section, key feature highlights, and primary call-to-action buttons. Suitable for product sites, internal portals, and marketing pages.",guidance:["Keep the hero message to one compelling sentence — let the CTA do the work.","Feature cards should each solve one problem, not list all capabilities.","Balance a primary action with a softer secondary one to reduce decision fatigue."]},"login-page":{section:"Templates",title:"Login Page",description:"A minimal login form centered on the screen. Collect credentials with clear labels, visible error states, and a single primary action.",guidance:["Never hide the password label — placeholder text alone fails accessibility.","Show inline validation errors as soon as the field loses focus.","Offer a password-visible toggle to reduce login friction."]},"register-page":{section:"Templates",title:"Register Page",description:"A registration form that collects the minimum fields needed to create an account. Reduce friction by asking only what is essential at sign-up.",guidance:["Request only name, email, and password at registration — profile details can come later.","Show password strength inline without blocking submission on minor issues.","The terms-of-service checkbox must be explicit; do not pre-check it."]},"error-page":{section:"Templates",title:"Error Page",description:"A graceful fallback for 404, 500, and other error states. Give users a clear explanation and a direct path back to safety.",guidance:["State the error code and a plain-language explanation — avoid technical jargon.","Always provide a go-home action alongside a go-back option.","Match the error page visual weight to the rest of the product, not a generic OS page."]},"privacy-policy":{section:"Templates",title:"Privacy Policy",description:"A structured legal document page with section headings, readable prose, and clear separators. Designed to remain accessible and scannable without sacrificing completeness.",guidance:["Use headings to break long policy text into scannable sections.","Link directly to the relevant section from any consent flow that references the policy.","Version and date the policy at the top so users know when it was last updated."]},"terms-of-service":{section:"Templates",title:"Terms of Service",description:"A service terms page with clear headings, plain-language obligations, and a layout that stays readable from narrow phones to wide desktop viewports.",guidance:["State the usage permission, limitations, and disclaimer in separate sections to reduce legal ambiguity.","Keep the document scannable with short paragraphs and a compact summary rail.","Link to the terms directly from registration and pricing flows so consent is contextual."]},"command-palette":{section:"Components",title:"Command Palette",description:"A keyboard-driven search overlay that lets users jump to any page or action without leaving the keyboard. Render it globally, wire a hotkey, then pass a flat list of entries.",guidance:["Keep the entries list flat and label-searchable — avoid nesting pages under hidden categories.","Populate entries from the same nav data you use for the sidebar so the two surfaces stay in sync.","Combine with ⌘K (Mac) or Ctrl+K (Windows) for a familiar shortcut that power users expect."]},"code-block":{section:"Components",title:"Code Block",description:"A syntax-highlighted, read-only code display with optional filename label. Use it to render installation snippets, usage examples, or any formatted code string.",guidance:["Set the language prop to the language of the code — tsx, bash, json, etc. — for correct highlighting.","Pass a filename to give readers context on where the snippet belongs in a project.","Keep code snippets minimal; show only the lines needed to illustrate the concept being documented."]},"language-switcher":{section:"Components",title:"Language Switcher",description:"A locale toggle component that updates the entire UI copy when clicked. Drop it into any topbar or settings area — the i18n provider broadcasts the change automatically.",guidance:["Place the switcher in a persistent surface (topbar or settings page) so users can find it from anywhere.","The switcher reflects the current locale; no extra state wiring is needed beyond the i18n provider.","Use the inline variant for topbars and the default variant for settings pages to match visual density."]}}},ic={locale:"zh",label:"中文",searchPlaceholder:"搜索组件、页面、关键词…",searchAriaLabel:"搜索",searchEmpty:e=>`未找到与"${e}"匹配的结果`,searchNavigate:"导航",searchGo:"跳转",searchClose:"关闭",sidebarCollapse:"收起",sidebarExpand:"展开",sidebarCloseLabel:"关闭侧边栏",searchTrigger:"搜索",versionLabel:Ie,mobilePreview:"移动端预览",nav:{gettingStarted:"开始使用",layout:"布局",components:"组件",feedback:"反馈",navigation:"导航",mobile:"响应式",templates:"模板"},pages:{introduction:"简介","quick-start":"快速开始","shell-sidebar":"框架与侧边栏","grid-page":"网格与页面",button:"按钮",elements:"基础元素","form-controls":"表单控件","form-inputs":"表单输入",overlays:"浮层","data-display":"数据展示",navigation:"导航","data-list":"数据列表","empty-states":"空状态",toasts:"消息提示",feedback:"反馈组件","nav-layout":"导航与布局",mobile:"移动端组件","command-palette":"命令面板","code-block":"代码块","language-switcher":"语言切换器","home-page":"主页","login-page":"登录页","register-page":"注册页","error-page":"错误页","privacy-policy":"隐私政策","terms-of-service":"服务条款"},docs:{guidance:"使用指南",guidanceDesc:"保持实现简洁,让设计系统完成大部分视觉工作。",preview:"预览",previewDesc:"该区域在系统中呈现效果的精简示例。",notes:"备注",primaryTheme:"主色调",primaryThemeDesc:"蓝灰色中性调将视觉重点保留给操作,而非装饰。",tokenScale:"Token 体系",tokenScaleDesc:"在引入页面特定样式之前,优先复用共享的 surface、border 和 text 变量。",themeStudio:"主题工作室",themeStudioDesc:"一次注册命名主题,用单个 key 即可切换所有组件。",liveControls:"交互控件",liveControlsDesc:"文档界面中仍有若干可复用的基础原语。",searchDocs:"搜索文档",searchDocsPlaceholder:"按钮、Token、布局…",compactDensity:"紧凑模式",compactDensityDesc:"收紧垂直间距,适合高密度操作界面。",systemPreview:"系统预览",openSection:"打开章节"},intro:{tagline:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",getStarted:"开始使用",browseComponents:"浏览组件",atAGlance:"概览",designTokens:"设计 Token",designTokensLead:"所有颜色、间距和字体值均以 vx 命名空间下的 CSS 自定义属性暴露。一次注册命名的亮色和暗色主题,之后通过主题 key 即可切换整个框架。",componentFamilies:"组件系列"},glance:{zeroDeps:"零依赖",zeroDepsHint:"原始 shell 运行时无需构建流水线。",components:"组件数",componentsHint:"布局、表单、反馈和列表原语,一套搞定。",coreCSS:"核心 CSS",coreCSSHint:"中性 Token 和结构样式保持精简。",darkMode:"深色模式",darkModeHint:"语义变量让相同组件可在多主题下复用。"},tokens:{primary:"主色",primaryDesc:"用于主要操作、活跃导航和强调的点缀色。",surface:"表面色",surfaceDesc:"文档卡片和框架区域的默认面板与内容背景色。",border:"边框色",borderDesc:"保持 UI 结构清晰且不增加视觉重量的轻量分隔色。",text:"文字色",textDesc:"用于标题、密集数据和正文的主前景色。"},families:{layout:"布局",layoutDesc:"应用框架、固定顶栏、章节节奏和响应式内容框架。",elements:"基础元素",elementsDesc:"用于操作、元数据和结构化内容块的低调原语。",forms:"表单",formsDesc:"输入框、开关、对话框和字段组合模式。",feedback:"反馈",feedbackDesc:"短暂的消息提示与打断性确认流程。"},dataList:{name:"名称",kind:"类型",updated:"更新时间"},modeLabel:e=>`${{light:"浅色",dark:"深色",black:"纯黑"}[e]??e}模式`,publicPages:{navLogin:"登录",navSignup:"注册",navDocs:"文档",navLogout:"退出登录",heroTag:`最新 · ${Ie}`,heroTitle:"轻量 React 组件库",heroLead:"零依赖 · 30+ 组件 · 内置主题与深色模式",heroCta:"立即开始",heroCtaAlt:"浏览文档",previewLead:"",previewAccessTitle:"访问方式",previewAccessMember:"登录后保留会话状态,随时回到你的工作区。",previewAccessGuest:"无需登录,直接以访客身份访问文档。",previewMobileTitle:"移动端适配",previewMobileLead:"导航与认证布局在移动端自然适配。",featuresSectionTitle:"为什么选择 vxUI",feat1:"零依赖",feat1Desc:"纯 CSS + TypeScript,无第三方依赖。",feat2:"30+ 组件",feat2Desc:"布局、表单、反馈和列表,一套搞定。",feat3:"可主题化",feat3Desc:"CSS 变量驱动,一键切换整套主题。",feat4:"深色模式",feat4Desc:"语义化 Token,浅色与深色主题均适配。",footerCopy:"© 2026 vxUI. 保留所有权利。",footerPrivacy:"隐私政策",footerGithub:"GitHub",footerWebsite:"官网",loginTitle:"欢迎回来",loginSubtitle:"登录以访问文档。",loginEmail:"邮箱",loginEmailPlaceholder:"you@example.com",loginPassword:"密码",loginPasswordPlaceholder:"至少 8 位字符",loginCta:"登录",loginNoAccount:"还没有账号?",loginRegister:"注册",loginGuest:"无需登录,直接继续 →",rememberMe:"记住这台设备",showPassword:"显示",hidePassword:"隐藏",authInfoTitle:"支持访客访问",authInfoBody:"如果你只是想查看文档,可以不登录直接进入。登录仅用于演示持久化会话的真实流程。",registerTitle:"创建账号",registerSubtitle:"立即开始使用 vxUI。",registerName:"姓名",registerNamePlaceholder:"张三",registerEmail:"邮箱",registerEmailPlaceholder:"zhangsan@company.com",registerPassword:"密码",registerPasswordPlaceholder:"创建一个强密码",registerTermsAgree:"我同意",registerTermsLink:"服务条款",registerTermsAnd:"和",registerPrivacyLink:"隐私政策",registerCta:"创建账号",registerHasAccount:"已有账号?",registerLogin:"登录",registerGuest:"无需登录,直接继续 →",validationNameRequired:"请输入你的姓名。",validationNameShort:"姓名至少需要 2 个字符。",validationEmailRequired:"请输入邮箱地址。",validationEmailInvalid:"请输入有效的邮箱地址。",validationPasswordRequired:"请输入密码。",validationPasswordShort:"密码至少需要 8 位字符。",validationTermsRequired:"创建账号前必须同意条款。",sessionLoginTitle:"已登录",sessionLoginBody:"你的会话已生效,现在可以以登录用户身份查看文档。",sessionRegisterTitle:"账号已创建",sessionRegisterBody:"示例账号已创建完成,文档后台现已可用。",sessionGuestTitle:"当前为访客模式",sessionGuestBody:"你正在无账号状态下浏览文档。",sessionLogoutTitle:"已退出登录",sessionLogoutBody:"持久化会话已清除,你已返回公共首页。",signedInAs:"当前登录",guestLabel:"访客",backHome:"← 返回首页",backToDocs:"返回文档"},pageDefs:{introduction:{section:"介绍",title:"简介",description:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",guidance:["先从框架和导航节奏开始,再对独立控件进行样式调整。","保持 Token 语义化,主题切换时无需逐页覆盖样式。","将文档、示例和生产界面视为同一套设计系统。"]},"quick-start":{section:"安装",title:"快速开始",description:"安装包,用 Provider 包裹应用,在组合业务页面前先挂载页面框架。",guidance:["在应用根组件附近统一引入共享样式表。","使用 AppShell 承载产品外壳,页面内容保持在 main 插槽内。","仅在应用需要时才添加 ThemeProvider 和 ToastProvider。"]},"shell-sidebar":{section:"组件",title:"框架与侧边栏",description:"Shell 负责侧边栏层级、固定顶栏间距和内容宽度。导航项支持通过 `children` 字段嵌套子菜单,点击父级项可展开或折叠子项。",guidance:["保持导航标签简短,确保折叠模式下仍可快速扫读。","使用章节标题分隔页面分组,而非添加视觉噪音。","在导航项中添加 `children` 即可实现可展开子菜单;设置 `defaultOpen: true` 可默认展开。","如果某子项为 active 状态,AppShell 会自动展开对应父级分组。",'你可以通过 `sidebarWidth` 属性轻松配置侧边栏的固定宽度(例如 `sidebarWidth={280}` 或 `"18rem"`)。'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"侧边栏顶部显示的品牌/产品名称。"},{prop:"brandCaption",type:"string",description:"品牌名称下方显示的次级说明文字。"},{prop:"brandIcon",type:"ReactNode",description:"侧边栏顶部渲染的 Logo 元素(图片或图标)。"},{prop:"title",type:"string",description:"顶栏中显示的页面标题。"},{prop:"description",type:"string",description:"顶栏标题下方的页面副标题/描述。"},{prop:"breadcrumb",type:"ReactNode",description:"顶栏中渲染的面包屑元素。"},{prop:"navSections",type:"AppShellNavSection[]",description:"按章节分组的结构化导航树。推荐优先使用此属性。"},{prop:"navItems",type:"AppShellNavItem[]",description:"平铺导航列表,自动归入单个无标题章节。"},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"将侧边栏折叠为仅显示图标的窄轨模式。"},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'自定义侧边栏宽度,数字为 px 单位(如 280),也可传入 CSS 字符串(如 "18rem")。'},{prop:"density",type:'"comfortable" | "compact"',description:'布局密度。"compact" 收紧垂直间距,适合高密度操作界面。'},{prop:"headerActions",type:"ReactNode",description:"顶栏右侧操作区插槽(按钮、下拉菜单、用户菜单等)。"},{prop:"sidebarFooter",type:"ReactNode",description:"侧边栏底部内容插槽(用户信息、设置链接等)。"},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"控制移动端导航遮罩层是否显示。"},{prop:"onSidebarToggle",type:"() => void",description:"点击折叠/展开按钮时的回调。"},{prop:"onMobileNavToggle",type:"() => void",description:"移动端导航遮罩切换按钮的回调,提供后才会启用移动端导航。"},{prop:"children",type:"ReactNode",required:!0,description:"渲染在 ShellContent 内的主页面内容。"}]},"grid-page":{section:"组件",title:"网格与页面",description:"为卡片、Token 和文档块使用简单的响应式网格。页面表面应保持中性,由内容承载视觉重点。",guidance:["在密集文档界面中优先使用 12 至 16 像素的间距。","较大间距应保留给章节边界,而非每张卡片。","限制最大宽度,确保长段落保持可读性。"]},button:{section:"组件",title:"按钮",description:"按钮承担系统中的主操作层级。变体、尺寸和宽度应该直接表达操作意图,而不需要额外拼样式。",guidance:["在同一区域内,实心按钮通常只保留给一个主操作。","次级和幽灵按钮更适合辅助动作,避免和主操作竞争视觉优先级。","在移动端单列布局或堆叠表单中,优先使用 fullWidth 提升点击面积。"]},elements:{section:"组件",title:"基础元素",description:"按钮、徽章和卡片默认应保持低调。主要操作可以突出,其余元素应配合支撑。",guidance:["每个区域通常一个主操作就足够了。","徽章用于紧凑的状态或分类元数据,而非纯装饰。","卡片应组织内容,默认不应有仪表盘的感觉。"]},"form-controls":{section:"组件",title:"表单控件",description:"完整的表单原语集:单行输入框、多行文本域、可搜索单选下拉(Select)、带标签显示的多选下拉(MultiSelect)和时间选择器(TimePicker)。所有组件共享统一的 label / hint / error 布局体系。",guidance:["在管理界面中,表单控件始终应配有可见标签。","使用 Select 实现单选下拉;通过 `searchable={N}` 可设为仅当选项超过 N 条时显示搜索框。","当用户需要从有限列表中选择多个值时,使用 MultiSelect。","TimePicker 支持 24 小时制,通过 `seconds` prop 可启用秒选择列。","简短的辅助文本优于仅依赖 placeholder 的说明。"]},navigation:{section:"组件",title:"导航",description:"导航模式应首先传达位置,其次才是可用的移动方向。Tabs 最适合在单个页面上下文中切换兄弟视图。",guidance:["在控件结构中镜像信息架构。","使活跃状态明显,而不仅依赖颜色。","避免在一个控件中混用路由导航和本地视图状态。"]},"data-list":{section:"组件",title:"数据列表",description:"列表和表格应优先考虑扫读效率而非装饰。使用宽松的对齐、轻量分隔线,仅在需要时增加操作密度。",guidance:["精确对齐表头和行内容,减少视觉偏移。","使用细微边框而非为每一行添加重型卡片外壳。","将破坏性操作保留在行操作组中,而非内联文字链接。"]},"empty-states":{section:"组件",title:"空状态",description:"空状态应解释缺少什么、为何重要以及下一步操作是什么。它不应让用户感到走投无路。",guidance:["指明缺失的对象,让用户清楚自己在看什么。","提供一个清晰的恢复操作。","视觉重量应轻于成功或警告反馈。"]},toasts:{section:"组件",title:"消息提示",description:"Toast 在不打断任务流程的情况下确认短暂事件。保持简洁、具体且易于关闭。",guidance:["使用 success 和 info 确认后台操作。","将阻塞性或破坏性状态升级为对话框,而非堆叠 Toast。","避免在每次页面切换时重复相同消息。"]},feedback:{section:"组件",title:"反馈组件",description:"Spinner、Progress、Alert 和 Skeleton 为用户提供关于加载状态、结果和缺失内容的清晰信号。",guidance:["对短暂的不确定等待使用 Spinner;对确定性操作使用 Progress。","对持久性或页面级状态消息,优先使用 Alert 而非 Toast。","Skeleton 应与其替代内容的形状匹配,以减少布局偏移。"]},overlays:{section:"组件",title:"浮层",description:"Tooltip、Popover 和 DropdownMenu 在页面上方叠加临时内容,无需跳转。",guidance:["Tooltip 仅用于补充文本,绝不放置可交互内容。","Popover 可包含表单和富内容;需要明确的关闭触发器。","DropdownMenu 应对相关操作分组,并支持键盘导航。"]},"nav-layout":{section:"组件",title:"导航与布局",description:"Breadcrumb、Pagination、Accordion 和 Separator 处理位置、分页和结构节奏。",guidance:["Breadcrumb 反映路由深度——单层页面可省略。","Pagination 应显示总页数,让用户了解数据集大小。","Accordion 最适合渐进式披露,而非主导航。"]},"data-display":{section:"组件",title:"数据展示",description:"Avatar 和 Table 以清晰的层级呈现用户身份和结构化数据。",guidance:["Avatar 即使在显示图片时也应始终具有无障碍标签。","Table 支持可排序列——数据来自服务端时应将排序状态提升。","在密集表格中使用斑马纹,帮助视线跨列追踪。"]},"form-inputs":{section:"组件",title:"表单输入",description:"Select、Checkbox、RadioGroup、Textarea 和 Slider 将表单词汇扩展到文本输入之外。",guidance:["使用 RadioGroup 包裹单选按钮,共享 name 和语义。","Slider 适合数值范围;配合 showValue 可获得即时反馈。","Textarea 默认纵向可拖拽——仅在固定高度容器中禁用 resize。"]},mobile:{section:"响应式",title:"响应式布局",description:"一套同时覆盖手机、平板与桌面的响应式系统。通过布局与密度变化适配不同设备,而不是维护两套应用与两套页面树。",guidance:["保持所有断点上的路由树一致,只调整壳层结构和内容密度。","在窄屏上把常驻侧边导航转成抽屉,而不是复制一套页面实现。","让卡片、表单和表格从三列到单列平滑重排,不改变组件归属。"]},"home-page":{section:"模板",title:"主页",description:"带有 Hero 区块、核心功能亮点和主要行动召唤按钮的落地式主页。适用于产品官网、内部门户和营销页面。",guidance:["Hero 信息保持一句话——让行动召唤按钮来完成说服工作。","功能卡片各自聚焦一个问题,而非罗列所有能力。","主操作与次操作相配合,降低用户决策疲劳。"]},"login-page":{section:"模板",title:"登录页",description:"居中的极简登录表单。清晰的标签、可见的错误状态和单一主操作,降低登录摩擦。",guidance:["不要隐藏密码标签——仅靠 placeholder 无法满足无障碍要求。","字段失去焦点后立即显示内联校验错误。","提供密码可见切换,降低登录摩擦。"]},"register-page":{section:"模板",title:"注册页",description:"只收集创建账号所需最少字段的注册表单。通过仅询问必要信息来降低注册阻力。",guidance:["注册时只需姓名、邮箱和密码——个人资料可在之后完善。","内联显示密码强度,但不因细微问题阻止提交。","服务条款复选框必须明确,不得预先勾选。"]},"error-page":{section:"模板",title:"错误页",description:"404、500 及其他错误状态的优雅降级页面。给用户清晰的解释和直接返回的路径。",guidance:["说明错误码和通俗解释——避免技术术语。",'始终提供"返回首页"和"后退"两个操作。',"错误页的视觉风格应与产品保持一致,而非系统默认页。"]},"privacy-policy":{section:"模板",title:"隐私政策",description:"带有章节标题、可读段落和清晰分隔线的结构化法律文档页面。在不牺牲完整性的前提下保持无障碍和可扫读性。",guidance:["使用标题将长篇政策文本分成可扫读的章节。","从任何引用政策的同意流程中直接链接到相关章节。","在顶部注明政策版本和日期,让用户了解最近更新时间。"]},"terms-of-service":{section:"模板",title:"服务条款",description:"具备清晰标题、通俗义务说明且在手机到桌面端都保持可读性的服务条款页面。",guidance:["将许可范围、使用限制和免责声明拆成独立段落,降低法律歧义。","正文使用短段落与摘要侧栏,保证长文档依旧可扫读。","在注册和定价流程中直接链接条款页面,让同意动作具备上下文。"]},"command-palette":{section:"组件",title:"命令面板",description:"键盘驱动的搜索浮层,让用户无需离开键盘即可跳转到任意页面或触发任意操作。全局挂载、绑定快捷键,传入扁平的条目列表即可使用。",guidance:["保持条目列表扁平且按标签可搜索——避免隐藏分类嵌套。","从侧边栏导航数据同步填充条目,确保两个入口保持一致。","绑定 ⌘K(Mac)或 Ctrl+K(Windows)快捷键,满足高频用户的操作预期。"]},"code-block":{section:"组件",title:"代码块",description:"带语法高亮的只读代码展示组件,支持可选的文件名标签。用于渲染安装步骤、用法示例或任意格式化的代码字符串。",guidance:["通过 language 属性指定代码语言(tsx、bash、json 等),以获得正确高亮。","传入 filename 可为读者提供该代码片段在项目中所属位置的上下文。","保持示例代码精简——只展示说明当前概念所需的最少行数。"]},"language-switcher":{section:"组件",title:"语言切换器",description:"点击后即可更新整套 UI 文案的语言切换组件。放入任意顶栏或设置区域——i18n Provider 会自动广播变更,无需额外状态绑定。",guidance:["将切换器放置在持久性界面(顶栏或设置页)中,方便用户在任何位置找到它。","切换器自动反映当前语言,除 i18n Provider 外无需额外的状态绑定。","顶栏中使用 inline 变体,设置页中使用默认变体,以匹配对应场景的视觉密度。"]}}},sn={en:Hr,zh:ic},lc=x.createContext({t:Hr,locale:"en",setLocale:()=>{}});function cc(){return x.useContext(lc)}function uc({variant:e="inline",className:t}){const{locale:r,setLocale:s}=cc(),a=Object.entries(sn),o=sn[r],[l,i]=x.useState(!1),u=x.useRef(null);x.useEffect(()=>{if(!l)return;const d=f=>{u.current&&!u.current.contains(f.target)&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[l]),x.useEffect(()=>{if(!l)return;const d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[l]);const c=e==="sidebar";return n.jsxs("div",{ref:u,className:C("vx-lang-drop",c&&"vx-lang-drop--sidebar",l&&"vx-lang-drop--open",t),children:[n.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>i(d=>!d),"aria-haspopup":"listbox","aria-expanded":l,"aria-label":"Switch language",className:"vx-lang-drop__trigger-btn",style:{height:"36px"},children:[n.jsx(ps,{size:14,"aria-hidden":"true"}),(o==null?void 0:o.label)??r,n.jsx(ge,{size:14,className:"vx-lang-drop__chevron","aria-hidden":"true"})]}),l&&n.jsx("ul",{className:"vx-lang-drop__menu",role:"listbox","aria-label":"Language",children:a.map(([d,f])=>n.jsx("li",{role:"option","aria-selected":r===d,children:n.jsxs("button",{type:"button",className:C("vx-lang-drop__item",r===d&&"vx-lang-drop__item--active"),onClick:()=>{s(d),i(!1)},children:[f.label,r===d&&n.jsx("span",{className:"vx-lang-drop__check","aria-hidden":"true",children:"✓"})]})},d))})]})}exports.Accordion=Vi;exports.ActionSheet=rl;exports.ActionSheetItem=sl;exports.Alert=$i;exports.AlertDialog=xl;exports.AppShell=ws;exports.Avatar=Zi;exports.Badge=ks;exports.BottomNav=nl;exports.Breadcrumb=Gi;exports.Button=oe;exports.Calendar=Br;exports.Card=Ss;exports.CardContent=Cs;exports.CardDescription=Es;exports.CardHeader=Ns;exports.CardTitle=js;exports.Carousel=zl;exports.Checkbox=Ti;exports.CodeBlock=sc;exports.ColorPicker=ql;exports.CommandPalette=Jl;exports.ContextMenu=Dl;exports.DatePicker=kl;exports.Dialog=ao;exports.DialogClose=oo;exports.DrawerNavItem=cl;exports.DrawerNavSection=ul;exports.DropdownMenu=Ui;exports.EmptyState=Bl;exports.FileUpload=Tl;exports.Form=pl;exports.FormDescription=ml;exports.FormField=fl;exports.FormLabel=vl;exports.FormMessage=hl;exports.Heading=Ni;exports.HoverCard=Ll;exports.Input=io;exports.Label=dl;exports.LanguageSwitcher=uc;exports.Menubar=Il;exports.MobileDrawer=ll;exports.MobileIconButton=tl;exports.MobileList=al;exports.MobileListItem=il;exports.MobileListSection=ol;exports.MobileShell=Ji;exports.MobileTopBar=el;exports.MultiSelect=Sl;exports.NavigationMenu=Ml;exports.NumberInput=gl;exports.Pagination=Ki;exports.Popover=Hi;exports.Progress=Mi;exports.Radio=Ri;exports.RadioGroup=Pi;exports.Rating=Ul;exports.ResizableHandle=Zl;exports.ResizablePanel=Xl;exports.ResizablePanelGroup=Yl;exports.Responsive=Vr;exports.ScrollArea=Rl;exports.SegmentedControl=Ai;exports.Select=Ci;exports.Separator=qi;exports.Sheet=Al;exports.Shell=fn;exports.ShellContent=_n;exports.ShellMain=bn;exports.ShellNav=mn;exports.ShellNavItem=xn;exports.ShellNavSection=hn;exports.ShellOverlay=gn;exports.ShellSidebar=vn;exports.ShellTopbar=yn;exports.Skeleton=Bi;exports.Slider=Di;exports.Spinner=Ii;exports.Stepper=Ol;exports.Switch=xo;exports.Table=Qi;exports.Tabs=Mo;exports.TabsContent=Bo;exports.TabsList=Oo;exports.TabsTrigger=$o;exports.TagInput=Gl;exports.Text=Si;exports.Textarea=Fi;exports.ThemeProvider=Ko;exports.TimePicker=Cl;exports.Timeline=$l;exports.ToastProvider=wi;exports.Toggle=Pl;exports.ToggleGroup=Fl;exports.Tooltip=zi;exports.TreeView=Wl;exports.ViewportProvider=Kr;exports.createTheme=X;exports.themePresets=zo;exports.useFormField=$r;exports.useTheme=Vo;exports.useToast=ki;exports.useViewport=dt;
|
|
147
|
+
*/var r=(function(s){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},i={manual:s.Prism&&s.Prism.manual,disableWorkerMessageHandler:s.Prism&&s.Prism.disableWorkerMessageHandler,util:{encode:function p(m){return m instanceof u?new u(m.type,p(m.content),m.alias):Array.isArray(m)?m.map(p):m.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(p){return Object.prototype.toString.call(p).slice(8,-1)},objId:function(p){return p.__id||Object.defineProperty(p,"__id",{value:++o}),p.__id},clone:function p(m,v){v=v||{};var b,k;switch(i.util.type(m)){case"Object":if(k=i.util.objId(m),v[k])return v[k];b={},v[k]=b;for(var j in m)m.hasOwnProperty(j)&&(b[j]=p(m[j],v));return b;case"Array":return k=i.util.objId(m),v[k]?v[k]:(b=[],v[k]=b,m.forEach(function(T,E){b[E]=p(T,v)}),b);default:return m}},getLanguage:function(p){for(;p;){var m=a.exec(p.className);if(m)return m[1].toLowerCase();p=p.parentElement}return"none"},setLanguage:function(p,m){p.className=p.className.replace(RegExp(a,"gi"),""),p.classList.add("language-"+m)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(b){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(b.stack)||[])[1];if(p){var m=document.getElementsByTagName("script");for(var v in m)if(m[v].src==p)return m[v]}return null}},isActive:function(p,m,v){for(var b="no-"+m;p;){var k=p.classList;if(k.contains(m))return!0;if(k.contains(b))return!1;p=p.parentElement}return!!v}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(p,m){var v=i.util.clone(i.languages[p]);for(var b in m)v[b]=m[b];return v},insertBefore:function(p,m,v,b){b=b||i.languages;var k=b[p],j={};for(var T in k)if(k.hasOwnProperty(T)){if(T==m)for(var E in v)v.hasOwnProperty(E)&&(j[E]=v[E]);v.hasOwnProperty(T)||(j[T]=k[T])}var R=b[p];return b[p]=j,i.languages.DFS(i.languages,function(A,D){D===R&&A!=p&&(this[A]=j)}),j},DFS:function p(m,v,b,k){k=k||{};var j=i.util.objId;for(var T in m)if(m.hasOwnProperty(T)){v.call(m,T,m[T],b||T);var E=m[T],R=i.util.type(E);R==="Object"&&!k[j(E)]?(k[j(E)]=!0,p(E,v,null,k)):R==="Array"&&!k[j(E)]&&(k[j(E)]=!0,p(E,v,T,k))}}},plugins:{},highlightAll:function(p,m){i.highlightAllUnder(document,p,m)},highlightAllUnder:function(p,m,v){var b={callback:v,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",b),b.elements=Array.prototype.slice.apply(b.container.querySelectorAll(b.selector)),i.hooks.run("before-all-elements-highlight",b);for(var k=0,j;j=b.elements[k++];)i.highlightElement(j,m===!0,b.callback)},highlightElement:function(p,m,v){var b=i.util.getLanguage(p),k=i.languages[b];i.util.setLanguage(p,b);var j=p.parentElement;j&&j.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(j,b);var T=p.textContent,E={element:p,language:b,grammar:k,code:T};function R(D){E.highlightedCode=D,i.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,i.hooks.run("after-highlight",E),i.hooks.run("complete",E),v&&v.call(E.element)}if(i.hooks.run("before-sanity-check",E),j=E.element.parentElement,j&&j.nodeName.toLowerCase()==="pre"&&!j.hasAttribute("tabindex")&&j.setAttribute("tabindex","0"),!E.code){i.hooks.run("complete",E),v&&v.call(E.element);return}if(i.hooks.run("before-highlight",E),!E.grammar){R(i.util.encode(E.code));return}if(m&&s.Worker){var A=new Worker(i.filename);A.onmessage=function(D){R(D.data)},A.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else R(i.highlight(E.code,E.grammar,E.language))},highlight:function(p,m,v){var b={code:p,grammar:m,language:v};if(i.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=i.tokenize(b.code,b.grammar),i.hooks.run("after-tokenize",b),u.stringify(i.util.encode(b.tokens),b.language)},tokenize:function(p,m){var v=m.rest;if(v){for(var b in v)m[b]=v[b];delete m.rest}var k=new f;return y(k,k.head,p),d(p,k,m,k.head,0),N(k)},hooks:{all:{},add:function(p,m){var v=i.hooks.all;v[p]=v[p]||[],v[p].push(m)},run:function(p,m){var v=i.hooks.all[p];if(!(!v||!v.length))for(var b=0,k;k=v[b++];)k(m)}},Token:u};s.Prism=i;function u(p,m,v,b){this.type=p,this.content=m,this.alias=v,this.length=(b||"").length|0}u.stringify=function p(m,v){if(typeof m=="string")return m;if(Array.isArray(m)){var b="";return m.forEach(function(R){b+=p(R,v)}),b}var k={type:m.type,content:p(m.content,v),tag:"span",classes:["token",m.type],attributes:{},language:v},j=m.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(k.classes,j):k.classes.push(j)),i.hooks.run("wrap",k);var T="";for(var E in k.attributes)T+=" "+E+'="'+(k.attributes[E]||"").replace(/"/g,""")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+T+">"+k.content+"</"+k.tag+">"};function c(p,m,v,b){p.lastIndex=m;var k=p.exec(v);if(k&&b&&k[1]){var j=k[1].length;k.index+=j,k[0]=k[0].slice(j)}return k}function d(p,m,v,b,k,j){for(var T in v)if(!(!v.hasOwnProperty(T)||!v[T])){var E=v[T];E=Array.isArray(E)?E:[E];for(var R=0;R<E.length;++R){if(j&&j.cause==T+","+R)return;var A=E[R],D=A.inside,O=!!A.lookbehind,F=!!A.greedy,H=A.alias;if(F&&!A.pattern.global){var U=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,U+"g")}for(var K=A.pattern||A,L=b.next,I=k;L!==m.tail&&!(j&&I>=j.reach);I+=L.value.length,L=L.next){var $=L.value;if(m.length>p.length)return;if(!($ instanceof u)){var P=1,M;if(F){if(M=c(K,I,p,O),!M||M.index>=p.length)break;var Z=M.index,B=M.index+M[0].length,z=I;for(z+=L.value.length;Z>=z;)L=L.next,z+=L.value.length;if(z-=L.value.length,I=z,L.value instanceof u)continue;for(var V=L;V!==m.tail&&(z<B||typeof V.value=="string");V=V.next)P++,z+=V.value.length;P--,$=p.slice(I,z),M.index-=I}else if(M=c(K,0,$,O),!M)continue;var Z=M.index,ae=M[0],Ue=$.slice(0,Z),At=$.slice(Z+ae.length),We=I+$.length;j&&We>j.reach&&(j.reach=We);var ke=L.prev;Ue&&(ke=y(m,ke,Ue),I+=Ue.length),S(m,ke,P);var Ur=new u(T,D?i.tokenize(ae,D):ae,H,ae);if(L=y(m,ke,Ur),At&&y(m,L,At),P>1){var Ge={cause:T+","+R,reach:We};d(p,m,v,L.prev,I,Ge),j&&Ge.reach>j.reach&&(j.reach=Ge.reach)}}}}}}function f(){var p={value:null,prev:null,next:null},m={value:null,prev:p,next:null};p.next=m,this.head=p,this.tail=m,this.length=0}function y(p,m,v){var b=m.next,k={value:v,prev:m,next:b};return m.next=k,b.prev=k,p.length++,k}function S(p,m,v){for(var b=m.next,k=0;k<v&&b!==p.tail;k++)b=b.next;m.next=b,b.prev=m,p.length-=k}function N(p){for(var m=[],v=p.head.next;v!==p.tail;)m.push(v.value),v=v.next;return m}if(!s.document)return s.addEventListener&&(i.disableWorkerMessageHandler||s.addEventListener("message",function(p){var m=JSON.parse(p.data),v=m.language,b=m.code,k=m.immediateClose;s.postMessage(i.highlight(b,i.languages[v],v)),k&&s.close()},!1)),i;var g=i.util.currentScript();g&&(i.filename=g.src,g.hasAttribute("data-manual")&&(i.manual=!0));function h(){i.manual||i.highlightAll()}if(!i.manual){var w=document.readyState;w==="loading"||w==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return i})(t);e.exports&&(e.exports=r),typeof en<"u"&&(en.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(s){s.type==="entity"&&(s.attributes.title=s.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(a,o){var l={};l["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[o]},l.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}};i["language-"+o]={pattern:/[\s\S]+/,inside:r.languages[o]};var u={};u[a]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(s,a){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+s+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[a,"language-"+a],inside:r.languages[a]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(s){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+a.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var o=s.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var s="Loading…",a=function(g,h){return"✖ Error "+g+" while fetching file: "+h},o="✖ Error: File does not exist or is empty",l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",u="loading",c="loaded",d="failed",f="pre[data-src]:not(["+i+'="'+c+'"]):not(['+i+'="'+u+'"])';function y(g,h,w){var p=new XMLHttpRequest;p.open("GET",g,!0),p.onreadystatechange=function(){p.readyState==4&&(p.status<400&&p.responseText?h(p.responseText):p.status>=400?w(a(p.status,p.statusText)):w(o))},p.send(null)}function S(g){var h=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(h){var w=Number(h[1]),p=h[2],m=h[3];return p?m?[w,Number(m)]:[w,void 0]:[w,w]}}r.hooks.add("before-highlightall",function(g){g.selector+=", "+f}),r.hooks.add("before-sanity-check",function(g){var h=g.element;if(h.matches(f)){g.code="",h.setAttribute(i,u);var w=h.appendChild(document.createElement("CODE"));w.textContent=s;var p=h.getAttribute("data-src"),m=g.language;if(m==="none"){var v=(/\.(\w+)$/.exec(p)||[,"none"])[1];m=l[v]||v}r.util.setLanguage(w,m),r.util.setLanguage(h,m);var b=r.plugins.autoloader;b&&b.loadLanguages(m),y(p,function(k){h.setAttribute(i,c);var j=S(h.getAttribute("data-range"));if(j){var T=k.split(/\r\n?|\n/g),E=j[0],R=j[1]==null?T.length:j[1];E<0&&(E+=T.length),E=Math.max(0,Math.min(E-1,T.length)),R<0&&(R+=T.length),R=Math.max(0,Math.min(R,T.length)),k=T.slice(E,R).join(`
|
|
148
|
+
`),h.hasAttribute("data-start")||h.setAttribute("data-start",String(E+1))}w.textContent=k,r.highlightElement(w)},function(k){h.setAttribute(i,d),w.textContent=k})}}),r.plugins.fileHighlight={highlight:function(h){for(var w=(h||document).querySelectorAll(f),p=0,m;m=w[p++];)r.highlightElement(m)}};var N=!1;r.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(rt)),rt.exports}var nc=tc();const Re=ec(nc);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[r]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:Prism.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(e){var t=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,s=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(u,c){return u=u.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return s}).replace(/<SPREAD>/g,function(){return a}),RegExp(u,c)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(l).join(""):""},i=function(u){for(var c=[],d=0;d<u.length;d++){var f=u[d],y=!1;if(typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===l(f.content[0].content[1])&&c.pop():f.content[f.content.length-1].content==="/>"||c.push({tagName:l(f.content[0].content[1]),openedBraces:0}):c.length>0&&f.type==="punctuation"&&f.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&f.type==="punctuation"&&f.content==="}"?c[c.length-1].openedBraces--:y=!0),(y||typeof f=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var S=l(f);d<u.length-1&&(typeof u[d+1]=="string"||u[d+1].type==="plain-text")&&(S+=l(u[d+1]),u.splice(d+1,1)),d>0&&(typeof u[d-1]=="string"||u[d-1].type==="plain-text")&&(S=l(u[d-1])+S,u.splice(d-1,1),d--),u[d]=new e.Token("plain-text",S,null,S)}f.content&&typeof f.content!="string"&&i(f.content)}};e.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||i(u.tokens)})})(Prism);var nn={},rn;function rc(){return rn||(rn=1,(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism)),nn}rc();(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,l=0;l<a.length;l++)o[a[l]]=e.languages.bash[a[l]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;function sc({code:e,language:t="tsx",copyLabel:r,copiedLabel:s,onCopy:a}){const[o,l]=x.useState(!1),i=x.useRef(null),u=x.useMemo(()=>{const d=Re.languages[t]??Re.languages.tsx??Re.languages.typescript;return d?Re.highlight(e,d,t):e},[e,t]);x.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);async function c(){await a(e)&&(l(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{l(!1),i.current=null},1600))}return n.jsxs("div",{className:"vx-code-block-wrap","data-language":t,children:[n.jsxs(oe,{type:"button",size:"sm",variant:o?"solid":"secondary",className:o?"vx-code-block__copy vx-code-block__copy--copied":"vx-code-block__copy",onClick:()=>void c(),children:[o?n.jsx(Me,{size:14}):n.jsx(ls,{size:14}),o?s:r]}),n.jsx("pre",{className:"vx-code-block",children:n.jsx("code",{className:`vx-code-block__code language-${t}`,dangerouslySetInnerHTML:{__html:u}})})]})}const ac="1.3.2",oc={version:ac},Ie=`v${oc.version}`,Hr={locale:"en",label:"English",searchPlaceholder:"Search components, pages, keywords…",searchAriaLabel:"Search",searchEmpty:e=>`No results for "${e}"`,searchNavigate:"Navigate",searchGo:"Go",searchClose:"Close",sidebarCollapse:"Collapse",sidebarExpand:"Expand",sidebarCloseLabel:"Close sidebar",searchTrigger:"Search",versionLabel:Ie,mobilePreview:"Mobile Preview",nav:{gettingStarted:"Getting Started",layout:"Layout",components:"Components",feedback:"Feedback",navigation:"Navigation",mobile:"Responsive",templates:"Templates"},pages:{introduction:"Introduction","quick-start":"Quick Start","shell-sidebar":"Shell & Sidebar","grid-page":"Grid & Page",button:"Button",elements:"Elements","form-controls":"Form Controls","form-inputs":"Form Inputs",overlays:"Overlays","data-display":"Data Display",navigation:"Navigation","data-list":"Data List","empty-states":"Empty States",toasts:"Toasts",feedback:"Feedback Components","nav-layout":"Navigation & Layout",mobile:"Mobile Components","command-palette":"Command Palette","code-block":"Code Block","language-switcher":"Language Switcher","home-page":"Home Page","login-page":"Login Page","register-page":"Register Page","error-page":"Error Page","privacy-policy":"Privacy Policy","terms-of-service":"Terms of Service"},docs:{guidance:"Guidance",guidanceDesc:"Keep the implementation tight and let the design system do most of the visual work.",preview:"Preview",previewDesc:"A compact example of how this area should feel inside the system.",notes:"Notes",primaryTheme:"Primary Theme",primaryThemeDesc:"Blue-gray neutrals keep emphasis reserved for actions, not decoration.",tokenScale:"Token Scale",tokenScaleDesc:"Reuse the shared surface, border, and text variables before introducing page-specific styles.",themeStudio:"Theme Studio",themeStudioDesc:"Register named themes once, then switch every component with a single key.",liveControls:"Live Controls",liveControlsDesc:"A few reusable primitives are still available inside the docs surface.",searchDocs:"Search docs",searchDocsPlaceholder:"Buttons, tokens, layout...",compactDensity:"Compact density",compactDensityDesc:"Tighten the vertical rhythm for denser operator views.",systemPreview:"System Preview",openSection:"Open section"},intro:{tagline:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",getStarted:"Get Started",browseComponents:"Browse Components",atAGlance:"At a Glance",designTokens:"Design Tokens",designTokensLead:"All colors, spacing, and typography values are exposed as CSS custom properties under the vx namespace. Register named light and dark themes once, then swap the whole framework by theme key.",componentFamilies:"Component Families"},glance:{zeroDeps:"Zero dependencies",zeroDepsHint:"Original shell runtime does not require a build pipeline.",components:"Components",componentsHint:"Layout, form, feedback, and list primitives in one system.",coreCSS:"Core CSS",coreCSSHint:"Neutral tokens and structural styles stay compact.",darkMode:"Dark mode",darkModeHint:"Semantic variables keep the same components reusable."},tokens:{primary:"Primary",primaryDesc:"Accent color for primary actions, active navigation, and emphasis.",surface:"Surface",surfaceDesc:"Default panel and content background for documentation cards and shell regions.",border:"Border",borderDesc:"Light separators that keep the UI structured without adding visual weight.",text:"Text",textDesc:"Primary foreground used for headings, dense data, and body copy."},families:{layout:"Layout",layoutDesc:"App shell, sticky header, section rhythm, and responsive content framing.",elements:"Elements",elementsDesc:"Quiet primitives for actions, metadata, and structured content blocks.",forms:"Forms",formsDesc:"Inputs, switches, dialogs, and field composition patterns.",feedback:"Feedback",feedbackDesc:"Transient toasts and interruptive confirmation flows."},dataList:{name:"Name",kind:"Kind",updated:"Updated"},modeLabel:e=>`${e} mode`,publicPages:{navLogin:"Log in",navSignup:"Sign up",navDocs:"Docs",navLogout:"Log out",heroTag:`New · ${Ie}`,heroTitle:"Lightweight React UI library",heroLead:"Zero dependencies · 30+ components · Built-in theming & dark mode",heroCta:"Get started",heroCtaAlt:"Browse docs",previewLead:"",previewAccessTitle:"Access modes",previewAccessMember:"Sign in to keep a session and return to your workspace.",previewAccessGuest:"Open the docs as a guest when you just need to browse.",previewMobileTitle:"Mobile-ready",previewMobileLead:"Navigation and auth layouts adapt naturally on mobile.",featuresSectionTitle:"Why vxUI",feat1:"Zero dependencies",feat1Desc:"Pure CSS + TypeScript, no peer dependencies.",feat2:"30+ components",feat2Desc:"Layout, form, feedback and list primitives in one system.",feat3:"Themeable",feat3Desc:"CSS variable-driven, swap the whole theme with one key.",feat4:"Dark mode",feat4Desc:"Semantic tokens work across light and dark themes.",footerCopy:"© 2026 vxUI. All rights reserved.",footerPrivacy:"Privacy Policy",footerGithub:"GitHub",footerWebsite:"Website",loginTitle:"Welcome back",loginSubtitle:"Sign in to access the documentation.",loginEmail:"Email",loginEmailPlaceholder:"you@example.com",loginPassword:"Password",loginPasswordPlaceholder:"At least 8 characters",loginCta:"Sign in",loginNoAccount:"Don't have an account?",loginRegister:"Register",loginGuest:"Continue without an account →",rememberMe:"Remember this device",showPassword:"Show",hidePassword:"Hide",authInfoTitle:"Guest access is available",authInfoBody:"You can go straight to the docs without an account. Sign in only if you want a persisted session example.",registerTitle:"Create account",registerSubtitle:"Get started with vxUI today.",registerName:"Full name",registerNamePlaceholder:"Jane Smith",registerEmail:"Email",registerEmailPlaceholder:"jane@company.com",registerPassword:"Password",registerPasswordPlaceholder:"Create a strong password",registerTermsAgree:"I agree to the",registerTermsLink:"Terms of Service",registerTermsAnd:"and",registerPrivacyLink:"Privacy Policy",registerCta:"Create account",registerHasAccount:"Already have an account?",registerLogin:"Sign in",registerGuest:"Continue without an account →",validationNameRequired:"Enter your full name.",validationNameShort:"Use at least 2 characters for your name.",validationEmailRequired:"Enter your email address.",validationEmailInvalid:"Enter a valid email address.",validationPasswordRequired:"Enter your password.",validationPasswordShort:"Use at least 8 characters for the password.",validationTermsRequired:"You must agree to the terms before creating an account.",sessionLoginTitle:"Signed in",sessionLoginBody:"Your session is active. You can now browse the docs as a signed-in user.",sessionRegisterTitle:"Account created",sessionRegisterBody:"Your sample account is ready and the docs are now unlocked.",sessionGuestTitle:"Browsing as guest",sessionGuestBody:"You entered the docs without a saved account session.",sessionLogoutTitle:"Signed out",sessionLogoutBody:"Your persisted session was cleared. You are back on the public site.",signedInAs:"Signed in as",guestLabel:"Guest",backHome:"← Back to home",backToDocs:"Back to docs"},pageDefs:{introduction:{section:"Introduction",title:"Introduction",description:"A lightweight, dependency-free UI framework for building clean admin interfaces. Design tokens, components, and a minimal SPA runtime live behind one consistent visual language.",guidance:["Start from the shell and navigation rhythm before styling isolated controls.","Keep tokens semantic so a theme swap does not require page-specific overrides.","Treat documentation, examples, and production surfaces as the same design system."]},"quick-start":{section:"Installation",title:"Quick Start",description:"Install the package, wrap your app with providers, and mount a page shell before composing business screens.",guidance:["Import the shared stylesheet once near the application root.","Use AppShell for product chrome and keep page content inside the main slot.","Add ThemeProvider and ToastProvider only when the app needs them."]},"shell-sidebar":{section:"Components",title:"Shell & Sidebar",description:"The shell is responsible for sidebar hierarchy, sticky header spacing, and content width. Navigation items support nested sub-menus via the `children` prop — click a parent to expand or collapse its sub-items.",guidance:["Keep navigation labels short so collapsed mode stays scannable.","Use section titles to separate page groups instead of visual noise.","Add `children` to a nav item to make it expandable; set `defaultOpen: true` to start it expanded.","If any child is active, AppShell auto-opens the parent group.",'Customize the sidebar width via the `sidebarWidth` prop (e.g. `sidebarWidth={280}` or `"18rem"`).'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"Brand / product name shown in the sidebar header."},{prop:"brandCaption",type:"string",description:"Secondary subtitle displayed below the brand name."},{prop:"brandIcon",type:"ReactNode",description:"Logo element (image or icon) rendered in the sidebar header."},{prop:"title",type:"string",description:"Page title shown in the topbar."},{prop:"description",type:"string",description:"Page subtitle / description shown below the topbar title."},{prop:"breadcrumb",type:"ReactNode",description:"Breadcrumb element rendered in the topbar."},{prop:"navSections",type:"AppShellNavSection[]",description:"Structured navigation tree grouped by sections. Preferred over navItems."},{prop:"navItems",type:"AppShellNavItem[]",description:"Flat navigation list. Automatically wrapped in a single unnamed section."},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"Collapse sidebar to icon-only rail mode."},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'Custom sidebar width. Pass a number for px (e.g. 280) or a CSS string (e.g. "18rem").'},{prop:"density",type:'"comfortable" | "compact"',description:'Layout density. "compact" tightens vertical rhythm for high-density operator UIs.'},{prop:"headerActions",type:"ReactNode",description:"Slot for right-aligned topbar actions (buttons, dropdowns, user menu, etc.)."},{prop:"sidebarFooter",type:"ReactNode",description:"Slot rendered at the bottom of the sidebar (user info, settings link, etc.)."},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"Controls whether the mobile navigation overlay is visible."},{prop:"onSidebarToggle",type:"() => void",description:"Called when the collapse / expand button is clicked."},{prop:"onMobileNavToggle",type:"() => void",description:"Called when the mobile overlay toggle button is clicked. Required to enable mobile nav."},{prop:"children",type:"ReactNode",required:!0,description:"Main page content rendered inside ShellContent."}]},"grid-page":{section:"Components",title:"Grid & Page",description:"Use simple responsive grids for cards, tokens, and documentation blocks. The page surface should stay neutral and let content carry emphasis.",guidance:["Prefer 12 to 16 pixel gaps for dense documentation surfaces.","Reserve larger spacing for section boundaries, not every card.","Keep max width constrained so long paragraphs remain readable."]},button:{section:"Components",title:"Button",description:"Buttons carry the primary action hierarchy for the system. Variants, sizes, and width should communicate intent without requiring extra styling.",guidance:["Use the solid variant for the primary action in a given area.","Use secondary or ghost variants for supporting actions that should stay visually quieter.","Use fullWidth for stacked mobile actions or single-column forms."]},elements:{section:"Components",title:"Elements",description:"Button, Badge, Text, Heading, CodeBlock, and LanguageSwitcher form the atomic foundation of the UI.",guidance:["One primary action per area is usually enough.","Use badges for compact status or category metadata, not decoration.","Cards should organize content without feeling like dashboards by default."]},"form-controls":{section:"Components",title:"Form Controls",description:"A complete set of form primitives: single-line inputs, multi-line textarea, searchable single-select (Select), multi-select with tag display (MultiSelect), and time selection (TimePicker). All share the same label / hint / error layout system.",guidance:["Always pair form controls with visible labels in admin surfaces.","Use Select for single-select with optional search; set `searchable={N}` to show the search input only when options exceed N.","Use MultiSelect when users need to pick several values from a bounded list.","TimePicker supports 24-hour format and an optional seconds column via the `seconds` prop.","Short helper text is better than placeholder-only instruction."]},navigation:{section:"Components",title:"Navigation",description:"Navigation patterns should communicate location first, then available movement. Tabs work best for sibling views within a single page context.",guidance:["Mirror information architecture in the control structure.","Make the active state obvious without relying on color alone.","Avoid mixing route navigation and local view state in one control."]},"data-list":{section:"Components",title:"Data List",description:"Lists and tables should prioritize scanning over ornament. Use generous alignment, light separators, and action density only where needed.",guidance:["Align headers and row content precisely to reduce visual drift.","Use subtle borders instead of heavy card chrome around every row.","Reserve destructive affordances for row action groups, not inline text links."]},"empty-states":{section:"Components",title:"Empty States",description:"An empty state should explain what is missing, why it matters, and what the next action is. It should never feel like a dead end.",guidance:["Name the object that is absent so users know what they are looking at.","Offer one clear recovery action.","Keep the visual weight lighter than success or alert feedback."]},toasts:{section:"Components",title:"Toasts",description:"Toasts confirm short-lived events without interrupting task flow. Keep them brief, specific, and easy to dismiss.",guidance:["Use success and info to confirm background actions.","Escalate blocking or destructive states to dialogs instead of stacking toasts.","Avoid repeating the same message on every page transition.","Provide only a title when possible for a clean, compact layout."]},feedback:{section:"Components",title:"Feedback Components",description:"Alert, Progress, Skeleton, Spinner, Stepper, and Toast indicate application state without blocking layouts.",guidance:["Use Spinner for short indeterminate waits; Progress for deterministic operations.","Prefer Alert over toast for persistent or page-level status messages.","Skeleton should match the shape of the content it replaces to reduce layout shift."]},overlays:{section:"Components",title:"Overlays",description:"Dialog, AlertDialog, ContextMenu, HoverCard, Tooltip, Popover, and DropdownMenu layer transient content and actions above the page.",guidance:["Tooltips are for supplementary text only — never interactive content.","Popovers can contain forms and rich content; they require explicit close triggers.","DropdownMenus should group related actions and support keyboard navigation."]},"nav-layout":{section:"Components",title:"Navigation & Layout",description:"Tabs, Accordion, Breadcrumb, Menubar, NavigationMenu, ScrollArea, Separator, Resizable, and Sheet structure content hierarchically.",guidance:["Breadcrumb mirrors route depth — omit it on single-level pages.","Pagination should show page count so users understand the data set size.","Accordion works best for progressive disclosure, not primary navigation."]},"data-display":{section:"Components",title:"Data Display",description:"Avatar, Card, Badge, Table, Carousel, Timeline, TreeView, and EmptyState present rich data compactly.",guidance:["Avatar should always have an accessible label, even when showing an image.","Table supports sortable columns — delegate sort state up when the data is server-side.","Use striped rows in dense tables to help eyes track across long rows."]},"form-inputs":{section:"Components",title:"Form Inputs",description:"Select, Checkbox, Radio, Textarea, Switch, Slider, Input, Label, NumberInput, TagInput, ColorPicker, DatePicker, FileUpload, Rating, Toggle, SegmentedControl, and Calendar extend the form vocabulary beyond text inputs.",guidance:["Group radio buttons with RadioGroup to share name and semantics.","Slider is ideal for numeric ranges; pair it with showValue for immediate feedback.","Textarea defaults to vertical resize — disable resize only in fixed-height containers.","Use Switch for immediate state toggles (like settings), and Checkbox for form submissions or multi-selections."]},mobile:{section:"Responsive",title:"Responsive Patterns",description:"A single responsive system for phone, tablet, and desktop. One route tree, one content model, and one set of components adapt through layout instead of duplicate applications.",guidance:["Keep the route tree identical across breakpoints; only the shell and density should change.","Turn persistent side navigation into a drawer on narrow screens instead of forking the page implementation.","Design cards, forms, and tables to reflow from three columns to one without changing component ownership."]},"home-page":{section:"Templates",title:"Home Page",description:"A landing-style home page with a hero section, key feature highlights, and primary call-to-action buttons. Suitable for product sites, internal portals, and marketing pages.",guidance:["Keep the hero message to one compelling sentence — let the CTA do the work.","Feature cards should each solve one problem, not list all capabilities.","Balance a primary action with a softer secondary one to reduce decision fatigue."]},"login-page":{section:"Templates",title:"Login Page",description:"A minimal login form centered on the screen. Collect credentials with clear labels, visible error states, and a single primary action.",guidance:["Never hide the password label — placeholder text alone fails accessibility.","Show inline validation errors as soon as the field loses focus.","Offer a password-visible toggle to reduce login friction."]},"register-page":{section:"Templates",title:"Register Page",description:"A registration form that collects the minimum fields needed to create an account. Reduce friction by asking only what is essential at sign-up.",guidance:["Request only name, email, and password at registration — profile details can come later.","Show password strength inline without blocking submission on minor issues.","The terms-of-service checkbox must be explicit; do not pre-check it."]},"error-page":{section:"Templates",title:"Error Page",description:"A graceful fallback for 404, 500, and other error states. Give users a clear explanation and a direct path back to safety.",guidance:["State the error code and a plain-language explanation — avoid technical jargon.","Always provide a go-home action alongside a go-back option.","Match the error page visual weight to the rest of the product, not a generic OS page."]},"privacy-policy":{section:"Templates",title:"Privacy Policy",description:"A structured legal document page with section headings, readable prose, and clear separators. Designed to remain accessible and scannable without sacrificing completeness.",guidance:["Use headings to break long policy text into scannable sections.","Link directly to the relevant section from any consent flow that references the policy.","Version and date the policy at the top so users know when it was last updated."]},"terms-of-service":{section:"Templates",title:"Terms of Service",description:"A service terms page with clear headings, plain-language obligations, and a layout that stays readable from narrow phones to wide desktop viewports.",guidance:["State the usage permission, limitations, and disclaimer in separate sections to reduce legal ambiguity.","Keep the document scannable with short paragraphs and a compact summary rail.","Link to the terms directly from registration and pricing flows so consent is contextual."]},"command-palette":{section:"Components",title:"Command Palette",description:"A keyboard-driven search overlay that lets users jump to any page or action without leaving the keyboard. Render it globally, wire a hotkey, then pass a flat list of entries.",guidance:["Keep the entries list flat and label-searchable — avoid nesting pages under hidden categories.","Populate entries from the same nav data you use for the sidebar so the two surfaces stay in sync.","Combine with ⌘K (Mac) or Ctrl+K (Windows) for a familiar shortcut that power users expect."]},"code-block":{section:"Components",title:"Code Block",description:"A syntax-highlighted, read-only code display with optional filename label. Use it to render installation snippets, usage examples, or any formatted code string.",guidance:["Set the language prop to the language of the code — tsx, bash, json, etc. — for correct highlighting.","Pass a filename to give readers context on where the snippet belongs in a project.","Keep code snippets minimal; show only the lines needed to illustrate the concept being documented."]},"language-switcher":{section:"Components",title:"Language Switcher",description:"A locale toggle component that updates the entire UI copy when clicked. Drop it into any topbar or settings area — the i18n provider broadcasts the change automatically.",guidance:["Place the switcher in a persistent surface (topbar or settings page) so users can find it from anywhere.","The switcher reflects the current locale; no extra state wiring is needed beyond the i18n provider.","Use the inline variant for topbars and the default variant for settings pages to match visual density."]}}},ic={locale:"zh",label:"中文",searchPlaceholder:"搜索组件、页面、关键词…",searchAriaLabel:"搜索",searchEmpty:e=>`未找到与"${e}"匹配的结果`,searchNavigate:"导航",searchGo:"跳转",searchClose:"关闭",sidebarCollapse:"收起",sidebarExpand:"展开",sidebarCloseLabel:"关闭侧边栏",searchTrigger:"搜索",versionLabel:Ie,mobilePreview:"移动端预览",nav:{gettingStarted:"开始使用",layout:"布局",components:"组件",feedback:"反馈",navigation:"导航",mobile:"响应式",templates:"模板"},pages:{introduction:"简介","quick-start":"快速开始","shell-sidebar":"框架与侧边栏","grid-page":"网格与页面",button:"按钮",elements:"基础元素","form-controls":"表单控件","form-inputs":"表单输入",overlays:"浮层","data-display":"数据展示",navigation:"导航","data-list":"数据列表","empty-states":"空状态",toasts:"消息提示",feedback:"反馈组件","nav-layout":"导航与布局",mobile:"移动端组件","command-palette":"命令面板","code-block":"代码块","language-switcher":"语言切换器","home-page":"主页","login-page":"登录页","register-page":"注册页","error-page":"错误页","privacy-policy":"隐私政策","terms-of-service":"服务条款"},docs:{guidance:"使用指南",guidanceDesc:"保持实现简洁,让设计系统完成大部分视觉工作。",preview:"预览",previewDesc:"该区域在系统中呈现效果的精简示例。",notes:"备注",primaryTheme:"主色调",primaryThemeDesc:"蓝灰色中性调将视觉重点保留给操作,而非装饰。",tokenScale:"Token 体系",tokenScaleDesc:"在引入页面特定样式之前,优先复用共享的 surface、border 和 text 变量。",themeStudio:"主题工作室",themeStudioDesc:"一次注册命名主题,用单个 key 即可切换所有组件。",liveControls:"交互控件",liveControlsDesc:"文档界面中仍有若干可复用的基础原语。",searchDocs:"搜索文档",searchDocsPlaceholder:"按钮、Token、布局…",compactDensity:"紧凑模式",compactDensityDesc:"收紧垂直间距,适合高密度操作界面。",systemPreview:"系统预览",openSection:"打开章节"},intro:{tagline:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",getStarted:"开始使用",browseComponents:"浏览组件",atAGlance:"概览",designTokens:"设计 Token",designTokensLead:"所有颜色、间距和字体值均以 vx 命名空间下的 CSS 自定义属性暴露。一次注册命名的亮色和暗色主题,之后通过主题 key 即可切换整个框架。",componentFamilies:"组件系列"},glance:{zeroDeps:"零依赖",zeroDepsHint:"原始 shell 运行时无需构建流水线。",components:"组件数",componentsHint:"布局、表单、反馈和列表原语,一套搞定。",coreCSS:"核心 CSS",coreCSSHint:"中性 Token 和结构样式保持精简。",darkMode:"深色模式",darkModeHint:"语义变量让相同组件可在多主题下复用。"},tokens:{primary:"主色",primaryDesc:"用于主要操作、活跃导航和强调的点缀色。",surface:"表面色",surfaceDesc:"文档卡片和框架区域的默认面板与内容背景色。",border:"边框色",borderDesc:"保持 UI 结构清晰且不增加视觉重量的轻量分隔色。",text:"文字色",textDesc:"用于标题、密集数据和正文的主前景色。"},families:{layout:"布局",layoutDesc:"应用框架、固定顶栏、章节节奏和响应式内容框架。",elements:"基础元素",elementsDesc:"用于操作、元数据和结构化内容块的低调原语。",forms:"表单",formsDesc:"输入框、开关、对话框和字段组合模式。",feedback:"反馈",feedbackDesc:"短暂的消息提示与打断性确认流程。"},dataList:{name:"名称",kind:"类型",updated:"更新时间"},modeLabel:e=>`${{light:"浅色",dark:"深色",black:"纯黑"}[e]??e}模式`,publicPages:{navLogin:"登录",navSignup:"注册",navDocs:"文档",navLogout:"退出登录",heroTag:`最新 · ${Ie}`,heroTitle:"轻量 React 组件库",heroLead:"零依赖 · 30+ 组件 · 内置主题与深色模式",heroCta:"立即开始",heroCtaAlt:"浏览文档",previewLead:"",previewAccessTitle:"访问方式",previewAccessMember:"登录后保留会话状态,随时回到你的工作区。",previewAccessGuest:"无需登录,直接以访客身份访问文档。",previewMobileTitle:"移动端适配",previewMobileLead:"导航与认证布局在移动端自然适配。",featuresSectionTitle:"为什么选择 vxUI",feat1:"零依赖",feat1Desc:"纯 CSS + TypeScript,无第三方依赖。",feat2:"30+ 组件",feat2Desc:"布局、表单、反馈和列表,一套搞定。",feat3:"可主题化",feat3Desc:"CSS 变量驱动,一键切换整套主题。",feat4:"深色模式",feat4Desc:"语义化 Token,浅色与深色主题均适配。",footerCopy:"© 2026 vxUI. 保留所有权利。",footerPrivacy:"隐私政策",footerGithub:"GitHub",footerWebsite:"官网",loginTitle:"欢迎回来",loginSubtitle:"登录以访问文档。",loginEmail:"邮箱",loginEmailPlaceholder:"you@example.com",loginPassword:"密码",loginPasswordPlaceholder:"至少 8 位字符",loginCta:"登录",loginNoAccount:"还没有账号?",loginRegister:"注册",loginGuest:"无需登录,直接继续 →",rememberMe:"记住这台设备",showPassword:"显示",hidePassword:"隐藏",authInfoTitle:"支持访客访问",authInfoBody:"如果你只是想查看文档,可以不登录直接进入。登录仅用于演示持久化会话的真实流程。",registerTitle:"创建账号",registerSubtitle:"立即开始使用 vxUI。",registerName:"姓名",registerNamePlaceholder:"张三",registerEmail:"邮箱",registerEmailPlaceholder:"zhangsan@company.com",registerPassword:"密码",registerPasswordPlaceholder:"创建一个强密码",registerTermsAgree:"我同意",registerTermsLink:"服务条款",registerTermsAnd:"和",registerPrivacyLink:"隐私政策",registerCta:"创建账号",registerHasAccount:"已有账号?",registerLogin:"登录",registerGuest:"无需登录,直接继续 →",validationNameRequired:"请输入你的姓名。",validationNameShort:"姓名至少需要 2 个字符。",validationEmailRequired:"请输入邮箱地址。",validationEmailInvalid:"请输入有效的邮箱地址。",validationPasswordRequired:"请输入密码。",validationPasswordShort:"密码至少需要 8 位字符。",validationTermsRequired:"创建账号前必须同意条款。",sessionLoginTitle:"已登录",sessionLoginBody:"你的会话已生效,现在可以以登录用户身份查看文档。",sessionRegisterTitle:"账号已创建",sessionRegisterBody:"示例账号已创建完成,文档后台现已可用。",sessionGuestTitle:"当前为访客模式",sessionGuestBody:"你正在无账号状态下浏览文档。",sessionLogoutTitle:"已退出登录",sessionLogoutBody:"持久化会话已清除,你已返回公共首页。",signedInAs:"当前登录",guestLabel:"访客",backHome:"← 返回首页",backToDocs:"返回文档"},pageDefs:{introduction:{section:"介绍",title:"简介",description:"一个轻量无依赖的 UI 框架,用于构建简洁的后台管理界面。设计 Token、组件和极简 SPA 运行时,统一在一套一致的视觉语言之下。",guidance:["先从框架和导航节奏开始,再对独立控件进行样式调整。","保持 Token 语义化,主题切换时无需逐页覆盖样式。","将文档、示例和生产界面视为同一套设计系统。"]},"quick-start":{section:"安装",title:"快速开始",description:"安装包,用 Provider 包裹应用,在组合业务页面前先挂载页面框架。",guidance:["在应用根组件附近统一引入共享样式表。","使用 AppShell 承载产品外壳,页面内容保持在 main 插槽内。","仅在应用需要时才添加 ThemeProvider 和 ToastProvider。"]},"shell-sidebar":{section:"组件",title:"框架与侧边栏",description:"Shell 负责侧边栏层级、固定顶栏间距和内容宽度。导航项支持通过 `children` 字段嵌套子菜单,点击父级项可展开或折叠子项。",guidance:["保持导航标签简短,确保折叠模式下仍可快速扫读。","使用章节标题分隔页面分组,而非添加视觉噪音。","在导航项中添加 `children` 即可实现可展开子菜单;设置 `defaultOpen: true` 可默认展开。","如果某子项为 active 状态,AppShell 会自动展开对应父级分组。",'你可以通过 `sidebarWidth` 属性轻松配置侧边栏的固定宽度(例如 `sidebarWidth={280}` 或 `"18rem"`)。'],props:[{prop:"brand",type:"string",default:'"VXUI"',description:"侧边栏顶部显示的品牌/产品名称。"},{prop:"brandCaption",type:"string",description:"品牌名称下方显示的次级说明文字。"},{prop:"brandIcon",type:"ReactNode",description:"侧边栏顶部渲染的 Logo 元素(图片或图标)。"},{prop:"title",type:"string",description:"顶栏中显示的页面标题。"},{prop:"description",type:"string",description:"顶栏标题下方的页面副标题/描述。"},{prop:"breadcrumb",type:"ReactNode",description:"顶栏中渲染的面包屑元素。"},{prop:"navSections",type:"AppShellNavSection[]",description:"按章节分组的结构化导航树。推荐优先使用此属性。"},{prop:"navItems",type:"AppShellNavItem[]",description:"平铺导航列表,自动归入单个无标题章节。"},{prop:"sidebarCollapsed",type:"boolean",default:"false",description:"将侧边栏折叠为仅显示图标的窄轨模式。"},{prop:"sidebarWidth",type:"number | string",default:"240px",description:'自定义侧边栏宽度,数字为 px 单位(如 280),也可传入 CSS 字符串(如 "18rem")。'},{prop:"density",type:'"comfortable" | "compact"',description:'布局密度。"compact" 收紧垂直间距,适合高密度操作界面。'},{prop:"headerActions",type:"ReactNode",description:"顶栏右侧操作区插槽(按钮、下拉菜单、用户菜单等)。"},{prop:"sidebarFooter",type:"ReactNode",description:"侧边栏底部内容插槽(用户信息、设置链接等)。"},{prop:"mobileNavOpen",type:"boolean",default:"false",description:"控制移动端导航遮罩层是否显示。"},{prop:"onSidebarToggle",type:"() => void",description:"点击折叠/展开按钮时的回调。"},{prop:"onMobileNavToggle",type:"() => void",description:"移动端导航遮罩切换按钮的回调,提供后才会启用移动端导航。"},{prop:"children",type:"ReactNode",required:!0,description:"渲染在 ShellContent 内的主页面内容。"}]},"grid-page":{section:"组件",title:"网格与页面",description:"为卡片、Token 和文档块使用简单的响应式网格。页面表面应保持中性,由内容承载视觉重点。",guidance:["在密集文档界面中优先使用 12 至 16 像素的间距。","较大间距应保留给章节边界,而非每张卡片。","限制最大宽度,确保长段落保持可读性。"]},button:{section:"组件",title:"按钮",description:"按钮承担系统中的主操作层级。变体、尺寸和宽度应该直接表达操作意图,而不需要额外拼样式。",guidance:["在同一区域内,实心按钮通常只保留给一个主操作。","次级和幽灵按钮更适合辅助动作,避免和主操作竞争视觉优先级。","在移动端单列布局或堆叠表单中,优先使用 fullWidth 提升点击面积。"]},elements:{section:"组件",title:"基础元素",description:"Button、Badge、Text、Heading、CodeBlock 和 LanguageSwitcher 构成 UI 的原子基础。",guidance:["每个区域通常一个主操作就足够了。","徽章用于紧凑的状态或分类元数据,而非纯装饰。","卡片应组织内容,默认不应有仪表盘的感觉。"]},"form-controls":{section:"组件",title:"表单控件",description:"完整的表单原语集:单行输入框、多行文本域、可搜索单选下拉(Select)、带标签显示的多选下拉(MultiSelect)和时间选择器(TimePicker)。所有组件共享统一的 label / hint / error 布局体系。",guidance:["在管理界面中,表单控件始终应配有可见标签。","使用 Select 实现单选下拉;通过 `searchable={N}` 可设为仅当选项超过 N 条时显示搜索框。","当用户需要从有限列表中选择多个值时,使用 MultiSelect。","TimePicker 支持 24 小时制,通过 `seconds` prop 可启用秒选择列。","简短的辅助文本优于仅依赖 placeholder 的说明。"]},navigation:{section:"组件",title:"导航",description:"导航模式应首先传达位置,其次才是可用的移动方向。Tabs 最适合在单个页面上下文中切换兄弟视图。",guidance:["在控件结构中镜像信息架构。","使活跃状态明显,而不仅依赖颜色。","避免在一个控件中混用路由导航和本地视图状态。"]},"data-list":{section:"组件",title:"数据列表",description:"列表和表格应优先考虑扫读效率而非装饰。使用宽松的对齐、轻量分隔线,仅在需要时增加操作密度。",guidance:["精确对齐表头和行内容,减少视觉偏移。","使用细微边框而非为每一行添加重型卡片外壳。","将破坏性操作保留在行操作组中,而非内联文字链接。"]},"empty-states":{section:"组件",title:"空状态",description:"空状态应解释缺少什么、为何重要以及下一步操作是什么。它不应让用户感到走投无路。",guidance:["指明缺失的对象,让用户清楚自己在看什么。","提供一个清晰的恢复操作。","视觉重量应轻于成功或警告反馈。"]},toasts:{section:"组件",title:"消息提示",description:"Toast 在不打断任务流程的情况下确认短暂事件。保持简洁、具体且易于关闭。",guidance:["使用 success 和 info 确认后台操作。","将阻塞性或破坏性状态升级为对话框,而非堆叠 Toast。","避免在每次页面切换时重复相同消息。","在可用的情况下尽量只提供标题,享受更为紧凑、极简的纯标题排版。"]},feedback:{section:"组件",title:"反馈组件",description:"Alert、Progress、Skeleton、Spinner、Stepper 和 Toast 在不阻塞布局的情况下指示应用状态。",guidance:["对短暂的不确定等待使用 Spinner;对确定性操作使用 Progress。","对持久性或页面级状态消息,优先使用 Alert 而非 Toast。","Skeleton 应与其替代内容的形状匹配,以减少布局偏移。"]},overlays:{section:"组件",title:"浮层",description:"Dialog、AlertDialog、ContextMenu、HoverCard、Tooltip、Popover 和 DropdownMenu 在页面上方将临时内容和操作置于上方。",guidance:["Tooltip 仅用于补充文本,绝不放置可交互内容。","Popover 可包含表单和富内容;需要明确的关闭触发器。","DropdownMenu 应对相关操作分组,并支持键盘导航。"]},"nav-layout":{section:"组件",title:"导航与布局",description:"Tabs、Accordion、Breadcrumb、Menubar、NavigationMenu、ScrollArea、Separator、Resizable 和 Sheet 以层级方式构筑内容。",guidance:["Breadcrumb 反映路由深度——单层页面可省略。","Pagination 应显示总页数,让用户了解数据集大小。","Accordion 最适合渐进式披露,而非主导航。"]},"data-display":{section:"组件",title:"数据展示",description:"Avatar、Card、Badge、Table、Carousel、Timeline、TreeView 和 EmptyState 紧凑地呈现丰富数据。",guidance:["Avatar 即使在显示图片时也应始终具有无障碍标签。","Table 支持可排序列——数据来自服务端时应将排序状态提升。","在密集表格中使用斑马纹,帮助视线跨列追踪。"]},"form-inputs":{section:"组件",title:"表单输入",description:"Select、Checkbox、Radio、Textarea、Switch、Slider、Input、Label、NumberInput、TagInput、ColorPicker、DatePicker、FileUpload、Rating、Toggle、SegmentedControl 和 Calendar 将表单词汇扩展到文本输入之外。",guidance:["使用 RadioGroup 包裹单选按钮,共享 name 和语义。","Slider 适合数值范围;配合 showValue 可获得即时反馈。","Textarea 默认纵向可拖拽——仅在固定高度容器中禁用 resize。","使用 Switch 并在交互后立即生效(例如设置开启或关闭),使用 Checkbox 用于表单提交或多项选择。"]},mobile:{section:"响应式",title:"响应式布局",description:"一套同时覆盖手机、平板与桌面的响应式系统。通过布局与密度变化适配不同设备,而不是维护两套应用与两套页面树。",guidance:["保持所有断点上的路由树一致,只调整壳层结构和内容密度。","在窄屏上把常驻侧边导航转成抽屉,而不是复制一套页面实现。","让卡片、表单和表格从三列到单列平滑重排,不改变组件归属。"]},"home-page":{section:"模板",title:"主页",description:"带有 Hero 区块、核心功能亮点和主要行动召唤按钮的落地式主页。适用于产品官网、内部门户和营销页面。",guidance:["Hero 信息保持一句话——让行动召唤按钮来完成说服工作。","功能卡片各自聚焦一个问题,而非罗列所有能力。","主操作与次操作相配合,降低用户决策疲劳。"]},"login-page":{section:"模板",title:"登录页",description:"居中的极简登录表单。清晰的标签、可见的错误状态和单一主操作,降低登录摩擦。",guidance:["不要隐藏密码标签——仅靠 placeholder 无法满足无障碍要求。","字段失去焦点后立即显示内联校验错误。","提供密码可见切换,降低登录摩擦。"]},"register-page":{section:"模板",title:"注册页",description:"只收集创建账号所需最少字段的注册表单。通过仅询问必要信息来降低注册阻力。",guidance:["注册时只需姓名、邮箱和密码——个人资料可在之后完善。","内联显示密码强度,但不因细微问题阻止提交。","服务条款复选框必须明确,不得预先勾选。"]},"error-page":{section:"模板",title:"错误页",description:"404、500 及其他错误状态的优雅降级页面。给用户清晰的解释和直接返回的路径。",guidance:["说明错误码和通俗解释——避免技术术语。",'始终提供"返回首页"和"后退"两个操作。',"错误页的视觉风格应与产品保持一致,而非系统默认页。"]},"privacy-policy":{section:"模板",title:"隐私政策",description:"带有章节标题、可读段落和清晰分隔线的结构化法律文档页面。在不牺牲完整性的前提下保持无障碍和可扫读性。",guidance:["使用标题将长篇政策文本分成可扫读的章节。","从任何引用政策的同意流程中直接链接到相关章节。","在顶部注明政策版本和日期,让用户了解最近更新时间。"]},"terms-of-service":{section:"模板",title:"服务条款",description:"具备清晰标题、通俗义务说明且在手机到桌面端都保持可读性的服务条款页面。",guidance:["将许可范围、使用限制和免责声明拆成独立段落,降低法律歧义。","正文使用短段落与摘要侧栏,保证长文档依旧可扫读。","在注册和定价流程中直接链接条款页面,让同意动作具备上下文。"]},"command-palette":{section:"组件",title:"命令面板",description:"键盘驱动的搜索浮层,让用户无需离开键盘即可跳转到任意页面或触发任意操作。全局挂载、绑定快捷键,传入扁平的条目列表即可使用。",guidance:["保持条目列表扁平且按标签可搜索——避免隐藏分类嵌套。","从侧边栏导航数据同步填充条目,确保两个入口保持一致。","绑定 ⌘K(Mac)或 Ctrl+K(Windows)快捷键,满足高频用户的操作预期。"]},"code-block":{section:"组件",title:"代码块",description:"带语法高亮的只读代码展示组件,支持可选的文件名标签。用于渲染安装步骤、用法示例或任意格式化的代码字符串。",guidance:["通过 language 属性指定代码语言(tsx、bash、json 等),以获得正确高亮。","传入 filename 可为读者提供该代码片段在项目中所属位置的上下文。","保持示例代码精简——只展示说明当前概念所需的最少行数。"]},"language-switcher":{section:"组件",title:"语言切换器",description:"点击后即可更新整套 UI 文案的语言切换组件。放入任意顶栏或设置区域——i18n Provider 会自动广播变更,无需额外状态绑定。",guidance:["将切换器放置在持久性界面(顶栏或设置页)中,方便用户在任何位置找到它。","切换器自动反映当前语言,除 i18n Provider 外无需额外的状态绑定。","顶栏中使用 inline 变体,设置页中使用默认变体,以匹配对应场景的视觉密度。"]}}},sn={en:Hr,zh:ic},lc=x.createContext({t:Hr,locale:"en",setLocale:()=>{}});function cc(){return x.useContext(lc)}function uc({variant:e="inline",className:t}){const{locale:r,setLocale:s}=cc(),a=Object.entries(sn),o=sn[r],[l,i]=x.useState(!1),u=x.useRef(null);x.useEffect(()=>{if(!l)return;const d=f=>{u.current&&!u.current.contains(f.target)&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[l]),x.useEffect(()=>{if(!l)return;const d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[l]);const c=e==="sidebar";return n.jsxs("div",{ref:u,className:C("vx-lang-drop",c&&"vx-lang-drop--sidebar",l&&"vx-lang-drop--open",t),children:[n.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>i(d=>!d),"aria-haspopup":"listbox","aria-expanded":l,"aria-label":"Switch language",className:"vx-lang-drop__trigger-btn",style:{height:"36px"},children:[n.jsx(ps,{size:14,"aria-hidden":"true"}),(o==null?void 0:o.label)??r,n.jsx(ge,{size:14,className:"vx-lang-drop__chevron","aria-hidden":"true"})]}),l&&n.jsx("ul",{className:"vx-lang-drop__menu",role:"listbox","aria-label":"Language",children:a.map(([d,f])=>n.jsx("li",{role:"option","aria-selected":r===d,children:n.jsxs("button",{type:"button",className:C("vx-lang-drop__item",r===d&&"vx-lang-drop__item--active"),onClick:()=>{s(d),i(!1)},children:[f.label,r===d&&n.jsx("span",{className:"vx-lang-drop__check","aria-hidden":"true",children:"✓"})]})},d))})]})}exports.Accordion=Ki;exports.ActionSheet=rl;exports.ActionSheetItem=sl;exports.Alert=$i;exports.AlertDialog=xl;exports.AppShell=ws;exports.Avatar=Zi;exports.Badge=ks;exports.BottomNav=nl;exports.Breadcrumb=Gi;exports.Button=oe;exports.Calendar=Br;exports.Card=Ss;exports.CardContent=Cs;exports.CardDescription=Es;exports.CardHeader=Ns;exports.CardTitle=js;exports.Carousel=zl;exports.Checkbox=Ti;exports.CodeBlock=sc;exports.ColorPicker=ql;exports.CommandPalette=Jl;exports.ContextMenu=Fl;exports.DatePicker=kl;exports.Dialog=ao;exports.DialogClose=oo;exports.DrawerNavItem=cl;exports.DrawerNavSection=ul;exports.DropdownMenu=Ui;exports.EmptyState=Bl;exports.FileUpload=Tl;exports.Form=pl;exports.FormDescription=ml;exports.FormField=fl;exports.FormLabel=vl;exports.FormMessage=hl;exports.Heading=Ni;exports.HoverCard=Ll;exports.Input=io;exports.Label=dl;exports.LanguageSwitcher=uc;exports.Menubar=Il;exports.MobileDrawer=ll;exports.MobileIconButton=tl;exports.MobileList=al;exports.MobileListItem=il;exports.MobileListSection=ol;exports.MobileShell=Ji;exports.MobileTopBar=el;exports.MultiSelect=Sl;exports.NavigationMenu=Ml;exports.NumberInput=gl;exports.Pagination=Vi;exports.Popover=Hi;exports.Progress=Mi;exports.Radio=Ri;exports.RadioGroup=Pi;exports.Rating=Ul;exports.ResizableHandle=Zl;exports.ResizablePanel=Xl;exports.ResizablePanelGroup=Yl;exports.Responsive=Kr;exports.ScrollArea=Rl;exports.SegmentedControl=Ai;exports.Select=Ci;exports.Separator=qi;exports.Sheet=Al;exports.Shell=fn;exports.ShellContent=_n;exports.ShellMain=bn;exports.ShellNav=mn;exports.ShellNavItem=xn;exports.ShellNavSection=hn;exports.ShellOverlay=gn;exports.ShellSidebar=vn;exports.ShellTopbar=yn;exports.Skeleton=Bi;exports.Slider=Fi;exports.Spinner=Ii;exports.Stepper=Ol;exports.Switch=xo;exports.Table=Qi;exports.Tabs=Mo;exports.TabsContent=Bo;exports.TabsList=Oo;exports.TabsTrigger=$o;exports.TagInput=Gl;exports.Text=Si;exports.Textarea=Di;exports.ThemeProvider=Vo;exports.TimePicker=Cl;exports.Timeline=$l;exports.ToastProvider=wi;exports.Toggle=Pl;exports.ToggleGroup=Dl;exports.Tooltip=zi;exports.TreeView=Wl;exports.ViewportProvider=Vr;exports.createTheme=X;exports.themePresets=zo;exports.useFormField=$r;exports.useTheme=Ko;exports.useToast=ki;exports.useViewport=dt;
|