@editora/ui-react 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/components/Accordion.d.ts +26 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Alert.d.ts +282 -0
- package/dist/components/Alert.d.ts.map +1 -0
- package/dist/components/AlertDialog.d.ts +62 -0
- package/dist/components/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialogProvider.d.ts +15 -0
- package/dist/components/AlertDialogProvider.d.ts.map +1 -0
- package/dist/components/AppHeader.d.ts +10 -0
- package/dist/components/AppHeader.d.ts.map +1 -0
- package/dist/components/AspectRatio.d.ts +10 -0
- package/dist/components/AspectRatio.d.ts.map +1 -0
- package/dist/components/Avatar.d.ts +29 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Badge.d.ts +294 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/BlockControls.d.ts +26 -0
- package/dist/components/BlockControls.d.ts.map +1 -0
- package/dist/components/Box.d.ts +74 -0
- package/dist/components/Box.d.ts.map +1 -0
- package/dist/components/Breadcrumb.d.ts +21 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Button.d.ts +22 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Calendar.d.ts +105 -0
- package/dist/components/Calendar.d.ts.map +1 -0
- package/dist/components/Chart.d.ts +54 -0
- package/dist/components/Chart.d.ts.map +1 -0
- package/dist/components/Checkbox.d.ts +21 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Collapsible.d.ts +32 -0
- package/dist/components/Collapsible.d.ts.map +1 -0
- package/dist/components/ColorPicker.d.ts +105 -0
- package/dist/components/ColorPicker.d.ts.map +1 -0
- package/dist/components/Combobox.d.ts +46 -0
- package/dist/components/Combobox.d.ts.map +1 -0
- package/dist/components/CommandPalette.d.ts +274 -0
- package/dist/components/CommandPalette.d.ts.map +1 -0
- package/dist/components/Container.d.ts +7 -0
- package/dist/components/Container.d.ts.map +1 -0
- package/dist/components/ContextMenu.d.ts +55 -0
- package/dist/components/ContextMenu.d.ts.map +1 -0
- package/dist/components/DataTable.d.ts +408 -0
- package/dist/components/DataTable.d.ts.map +1 -0
- package/dist/components/DatePicker.d.ts +106 -0
- package/dist/components/DatePicker.d.ts.map +1 -0
- package/dist/components/DateRangePicker.d.ts +96 -0
- package/dist/components/DateRangePicker.d.ts.map +1 -0
- package/dist/components/DateRangeTimePicker.d.ts +87 -0
- package/dist/components/DateRangeTimePicker.d.ts.map +1 -0
- package/dist/components/DateTimePicker.d.ts +84 -0
- package/dist/components/DateTimePicker.d.ts.map +1 -0
- package/dist/components/Dialog.d.ts +71 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/DialogProvider.d.ts +14 -0
- package/dist/components/DialogProvider.d.ts.map +1 -0
- package/dist/components/DirectionProvider.d.ts +3 -0
- package/dist/components/DirectionProvider.d.ts.map +1 -0
- package/dist/components/Drawer.d.ts +29 -0
- package/dist/components/Drawer.d.ts.map +1 -0
- package/dist/components/Dropdown.d.ts +32 -0
- package/dist/components/Dropdown.d.ts.map +1 -0
- package/dist/components/EmptyState.d.ts +280 -0
- package/dist/components/EmptyState.d.ts.map +1 -0
- package/dist/components/Field.d.ts +288 -0
- package/dist/components/Field.d.ts.map +1 -0
- package/dist/components/Flex.d.ts +17 -0
- package/dist/components/Flex.d.ts.map +1 -0
- package/dist/components/FloatingToolbar.d.ts +301 -0
- package/dist/components/FloatingToolbar.d.ts.map +1 -0
- package/dist/components/Form.d.ts +61 -0
- package/dist/components/Form.d.ts.map +1 -0
- package/dist/components/Gantt.d.ts +21 -0
- package/dist/components/Gantt.d.ts.map +1 -0
- package/dist/components/Grid.d.ts +24 -0
- package/dist/components/Grid.d.ts.map +1 -0
- package/dist/components/HoverCard.d.ts +35 -0
- package/dist/components/HoverCard.d.ts.map +1 -0
- package/dist/components/Icon.d.ts +49 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/Input.d.ts +81 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/Label.d.ts +31 -0
- package/dist/components/Label.d.ts.map +1 -0
- package/dist/components/Layout.d.ts +21 -0
- package/dist/components/Layout.d.ts.map +1 -0
- package/dist/components/Menu.d.ts +28 -0
- package/dist/components/Menu.d.ts.map +1 -0
- package/dist/components/Menubar.d.ts +302 -0
- package/dist/components/Menubar.d.ts.map +1 -0
- package/dist/components/NavigationMenu.d.ts +285 -0
- package/dist/components/NavigationMenu.d.ts.map +1 -0
- package/dist/components/Pagination.d.ts +3 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/PluginPanel.d.ts +275 -0
- package/dist/components/PluginPanel.d.ts.map +1 -0
- package/dist/components/Popover.d.ts +9 -0
- package/dist/components/Popover.d.ts.map +1 -0
- package/dist/components/Portal.d.ts +18 -0
- package/dist/components/Portal.d.ts.map +1 -0
- package/dist/components/Presence.d.ts +22 -0
- package/dist/components/Presence.d.ts.map +1 -0
- package/dist/components/Progress.d.ts +32 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/components/QuickActions.d.ts +36 -0
- package/dist/components/QuickActions.d.ts.map +1 -0
- package/dist/components/RadioGroup.d.ts +26 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/ScrollArea.d.ts +20 -0
- package/dist/components/ScrollArea.d.ts.map +1 -0
- package/dist/components/Section.d.ts +11 -0
- package/dist/components/Section.d.ts.map +1 -0
- package/dist/components/Select.d.ts +56 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/SelectionPopup.d.ts +292 -0
- package/dist/components/SelectionPopup.d.ts.map +1 -0
- package/dist/components/Separator.d.ts +22 -0
- package/dist/components/Separator.d.ts.map +1 -0
- package/dist/components/Sidebar.d.ts +39 -0
- package/dist/components/Sidebar.d.ts.map +1 -0
- package/dist/components/Skeleton.d.ts +286 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Slider.d.ts +78 -0
- package/dist/components/Slider.d.ts.map +1 -0
- package/dist/components/Slot.d.ts +36 -0
- package/dist/components/Slot.d.ts.map +1 -0
- package/dist/components/Stepper.d.ts +41 -0
- package/dist/components/Stepper.d.ts.map +1 -0
- package/dist/components/Switch.d.ts +45 -0
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/components/Table.d.ts +310 -0
- package/dist/components/Table.d.ts.map +1 -0
- package/dist/components/Tabs.d.ts +52 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Textarea.d.ts +72 -0
- package/dist/components/Textarea.d.ts.map +1 -0
- package/dist/components/ThemeProvider.d.ts +20 -0
- package/dist/components/ThemeProvider.d.ts.map +1 -0
- package/dist/components/TimePicker.d.ts +76 -0
- package/dist/components/TimePicker.d.ts.map +1 -0
- package/dist/components/Timeline.d.ts +20 -0
- package/dist/components/Timeline.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +29 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/ToastAPI.d.ts +25 -0
- package/dist/components/ToastAPI.d.ts.map +1 -0
- package/dist/components/Toggle.d.ts +45 -0
- package/dist/components/Toggle.d.ts.map +1 -0
- package/dist/components/ToggleGroup.d.ts +49 -0
- package/dist/components/ToggleGroup.d.ts.map +1 -0
- package/dist/components/Toolbar.d.ts +26 -0
- package/dist/components/Toolbar.d.ts.map +1 -0
- package/dist/components/Tooltip.d.ts +46 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/VisuallyHidden.d.ts +3 -0
- package/dist/components/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/Wizard.d.ts +74 -0
- package/dist/components/Wizard.d.ts.map +1 -0
- package/dist/components/_internals.d.ts +3 -0
- package/dist/components/_internals.d.ts.map +1 -0
- package/dist/components/index.d.ts +80 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/hooks/useFloating.d.ts +49 -0
- package/dist/hooks/useFloating.d.ts.map +1 -0
- package/dist/hooks/useForm.d.ts +11 -0
- package/dist/hooks/useForm.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +2 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +3986 -3261
- package/package.json +30 -6
- package/LICENSE +0 -21
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("react"),V=require("@editora/ui-core");function Rt(h){if(h&&h.__esModule)return h;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(o,t,l.get?l:{enumerable:!0,get:()=>h[t]})}}return o.default=h,Object.freeze(o)}const N=Rt(v);function Ht(h){const{children:o,onClick:t,variant:l,size:i,icon:s,loading:b,block:n,headless:r,disabled:a,animation:m,theme:u,...y}=h,p=v.useRef(null),g=typeof window<"u"?N.default.useLayoutEffect:N.default.useEffect;v.useEffect(()=>{const d=p.current;if(!d)return;const E=e=>t&&t(e);return t&&d.addEventListener("click",E),()=>{t&&d.removeEventListener("click",E)}},[t]),g(()=>{const d=p.current;d&&(l?d.setAttribute("variant",l):d.removeAttribute("variant"),i?d.setAttribute("size",i):d.removeAttribute("size"),s?d.setAttribute("icon",s):d.removeAttribute("icon"),b?d.setAttribute("loading",""):d.removeAttribute("loading"),n?d.setAttribute("block",""):d.removeAttribute("block"),r?d.setAttribute("headless",""):d.removeAttribute("headless"),a?d.setAttribute("disabled",""):d.removeAttribute("disabled"),m?d.setAttribute("animation",m):d.removeAttribute("animation"),u&&u!=="default"?d.setAttribute("theme",u):d.removeAttribute("theme"))},[l,i,s,b,n,r,a,m,u]);const A={ref:p,...y,variant:l,size:i,icon:s,animation:m,theme:u&&u!=="default"?u:void 0,loading:b?"":void 0,block:n?"":void 0,headless:r?"":void 0,disabled:a?"":void 0};return N.default.createElement("ui-button",A,o)}const de=N.default.forwardRef(function({children:o,text:t,placement:l,open:i,disabled:s,headless:b,variant:n,size:r,tone:a,delay:m,closeDelay:u,trigger:y,offset:p,interactive:g,arrow:A,onOpen:d,onClose:E,onOpenChange:e,...c},w){const L=v.useRef(null);return v.useImperativeHandle(w,()=>L.current),v.useEffect(()=>{const H=L.current;if(!H)return;const f=()=>{d==null||d()},P=()=>{E==null||E()},R=S=>{const T=S.detail;T&&typeof T.open=="boolean"&&(e==null||e(T.open))};return H.addEventListener("open",f),H.addEventListener("close",P),H.addEventListener("change",R),()=>{H.removeEventListener("open",f),H.removeEventListener("close",P),H.removeEventListener("change",R)}},[d,E,e]),v.useEffect(()=>{const H=L.current;if(!H)return;const f=(R,S)=>{const T=H.getAttribute(R);if(S==null){T!=null&&H.removeAttribute(R);return}T!==S&&H.setAttribute(R,S)},P=(R,S)=>{S?f(R,""):f(R,null)};f("text",t||null),f("placement",l||null),P("open",i),P("disabled",s),P("headless",b),f("variant",n&&n!=="default"?n:null),f("size",r&&r!=="md"?r:null),f("tone",a&&a!=="default"?a:null),f("delay",typeof m=="number"&&Number.isFinite(m)?String(m):null),f("close-delay",typeof u=="number"&&Number.isFinite(u)?String(u):null),f("trigger",y||null),f("offset",typeof p=="number"&&Number.isFinite(p)?String(p):null),P("interactive",g),typeof A=="boolean"?f("arrow",A?"true":"false"):f("arrow",null)},[t,l,i,s,b,n,r,a,m,u,y,p,g,A]),N.default.createElement("ui-tooltip",{ref:L,...c},o)});de.displayName="Tooltip";function Nt(h){const{title:o,description:t,tone:l,variant:i,layout:s,dismissible:b,open:n,headless:r,onClose:a,children:m,...u}=h,y=v.useRef(null);return v.useEffect(()=>{const p=y.current;if(!p)return;const g=()=>a==null?void 0:a();return p.addEventListener("close",g),()=>p.removeEventListener("close",g)},[a]),v.useEffect(()=>{const p=y.current;p&&(o?p.setAttribute("title",o):p.removeAttribute("title"),t?p.setAttribute("description",t):p.removeAttribute("description"),l?p.setAttribute("tone",l):p.removeAttribute("tone"),i?p.setAttribute("variant",i):p.removeAttribute("variant"),s?p.setAttribute("layout",s):p.removeAttribute("layout"),b?p.setAttribute("dismissible",""):p.removeAttribute("dismissible"),r?p.setAttribute("headless",""):p.removeAttribute("headless"),typeof n=="boolean"&&(n?p.removeAttribute("hidden"):p.setAttribute("hidden","")))},[o,t,l,i,s,b,n,r]),N.default.createElement("ui-alert",{ref:y,...u},m)}const be=N.default.forwardRef(function({children:o,open:t,placement:l,variant:i,density:s,shape:b,elevation:n,tone:r,closeOnSelect:a,typeahead:m,onOpen:u,onClose:y,onChange:p,onSelect:g,...A},d){const E=v.useRef(null);return N.default.useImperativeHandle(d,()=>E.current),v.useEffect(()=>{const e=E.current;if(!e)return;const c=()=>u==null?void 0:u(),w=()=>y==null?void 0:y(),L=f=>{var R;const P=(R=f.detail)==null?void 0:R.open;typeof P=="boolean"&&(p==null||p(P))},H=f=>{g==null||g(f.detail||{})};return e.addEventListener("open",c),e.addEventListener("close",w),e.addEventListener("change",L),e.addEventListener("select",H),()=>{e.removeEventListener("open",c),e.removeEventListener("close",w),e.removeEventListener("change",L),e.removeEventListener("select",H)}},[u,y,p,g]),v.useEffect(()=>{const e=E.current;!e||t==null||(t?e.setAttribute("open",""):e.removeAttribute("open"))},[t]),v.useEffect(()=>{const e=E.current;e&&(l?e.setAttribute("placement",l):e.removeAttribute("placement"))},[l]),v.useEffect(()=>{const e=E.current;e&&(i&&i!=="default"?e.setAttribute("variant",i):e.removeAttribute("variant"))},[i]),v.useEffect(()=>{const e=E.current;e&&(s&&s!=="default"?e.setAttribute("density",s):e.removeAttribute("density"))},[s]),v.useEffect(()=>{const e=E.current;e&&(b&&b!=="default"?e.setAttribute("shape",b):e.removeAttribute("shape"))},[b]),v.useEffect(()=>{const e=E.current;e&&(n&&n!=="default"?e.setAttribute("elevation",n):e.removeAttribute("elevation"))},[n]),v.useEffect(()=>{const e=E.current;e&&(r&&r!=="default"&&r!=="brand"?e.setAttribute("tone",r):e.removeAttribute("tone"))},[r]),v.useEffect(()=>{const e=E.current;if(e){if(a==null){e.removeAttribute("close-on-select");return}e.setAttribute("close-on-select",a?"true":"false")}},[a]),v.useEffect(()=>{const e=E.current;if(e){if(m==null){e.removeAttribute("typeahead");return}e.setAttribute("typeahead",m?"true":"false")}},[m]),N.default.createElement("ui-dropdown",{ref:E,...A},o)});be.displayName="Dropdown";const me=N.default.forwardRef(function(o,t){const{value:l,onChange:i,onInput:s,onDebouncedInput:b,onClear:n,clearable:r,debounce:a,validation:m,size:u,minlength:y,maxlength:p,readOnly:g,autofocus:A,disabled:d,counter:E,floatingLabel:e,type:c,name:w,required:L,pattern:H,inputMode:f,autoComplete:P,min:R,max:S,step:T,spellCheck:q,placeholder:x,headless:k,variant:K,tone:F,density:D,shape:B,color:$,radius:J,label:G,description:M,children:_,...I}=o,Q=v.useRef(null);return v.useImperativeHandle(t,()=>Q.current),v.useEffect(()=>{const j=Q.current;if(!j)return;const Z=C=>{const z=C.detail;typeof(z==null?void 0:z.value)=="string"&&(s==null||s(z.value))},Y=C=>{const z=C.detail;typeof(z==null?void 0:z.value)=="string"&&(i==null||i(z.value))},re=C=>{const z=C.detail;typeof(z==null?void 0:z.value)=="string"&&(b==null||b(z.value))},ie=()=>{n==null||n()};return j.addEventListener("input",Z),j.addEventListener("change",Y),j.addEventListener("debounced-input",re),j.addEventListener("clear",ie),()=>{j.removeEventListener("input",Z),j.removeEventListener("change",Y),j.removeEventListener("debounced-input",re),j.removeEventListener("clear",ie)}},[i,s,b,n]),v.useEffect(()=>{const j=Q.current;j&&(r?j.setAttribute("clearable",""):j.removeAttribute("clearable"),typeof a=="number"&&Number.isFinite(a)?j.setAttribute("debounce",String(a)):j.removeAttribute("debounce"),m&&m!=="none"?j.setAttribute("validation",m):j.removeAttribute("validation"),u&&u!=="md"&&u!=="2"?j.setAttribute("size",String(u)):j.removeAttribute("size"),typeof y=="number"?j.setAttribute("minlength",String(y)):j.removeAttribute("minlength"),typeof p=="number"?j.setAttribute("maxlength",String(p)):j.removeAttribute("maxlength"),g?j.setAttribute("readonly",""):j.removeAttribute("readonly"),A?j.setAttribute("autofocus",""):j.removeAttribute("autofocus"),d?j.setAttribute("disabled",""):j.removeAttribute("disabled"),E?j.setAttribute("counter",""):j.removeAttribute("counter"),e?j.setAttribute("floating-label",""):j.removeAttribute("floating-label"),c?j.setAttribute("type",c):j.removeAttribute("type"),w?j.setAttribute("name",w):j.removeAttribute("name"),L?j.setAttribute("required",""):j.removeAttribute("required"),H?j.setAttribute("pattern",H):j.removeAttribute("pattern"),f?j.setAttribute("inputmode",f):j.removeAttribute("inputmode"),P?j.setAttribute("autocomplete",P):j.removeAttribute("autocomplete"),R!=null&&R!==""?j.setAttribute("min",String(R)):j.removeAttribute("min"),S!=null&&S!==""?j.setAttribute("max",String(S)):j.removeAttribute("max"),T!=null&&T!==""?j.setAttribute("step",String(T)):j.removeAttribute("step"),typeof q=="boolean"?j.setAttribute("spellcheck",q?"true":"false"):j.removeAttribute("spellcheck"),x?j.setAttribute("placeholder",x):j.removeAttribute("placeholder"),k?j.setAttribute("headless",""):j.removeAttribute("headless"),K&&K!=="classic"?j.setAttribute("variant",K):j.removeAttribute("variant"),F&&F!=="default"?j.setAttribute("tone",F):j.removeAttribute("tone"),D&&D!=="default"?j.setAttribute("density",D):j.removeAttribute("density"),B&&B!=="default"?j.setAttribute("shape",B):j.removeAttribute("shape"),$?j.setAttribute("color",$):j.removeAttribute("color"),J?j.setAttribute("radius",String(J)):j.removeAttribute("radius"),G?j.setAttribute("label",G):j.removeAttribute("label"),M?j.setAttribute("description",M):j.removeAttribute("description"))},[r,a,m,u,y,p,g,A,d,E,e,c,w,L,H,f,P,R,S,T,q,x,k,K,F,D,B,$,J,G,M]),N.default.createElement("ui-input",{ref:Q,value:l??void 0,...I},_)});me.displayName="Input";const ve=N.default.forwardRef(function({value:o,onChange:t,onInput:l,onDebouncedInput:i,onClear:s,clearable:b,debounce:n,validation:r,size:a,minlength:m,maxlength:u,rows:y,readOnly:p,autofocus:g,disabled:A,name:d,required:E,placeholder:e,resize:c,variant:w,color:L,radius:H,label:f,description:P,autosize:R,maxRows:S,showCount:T,density:q,tone:x,headless:k,children:K,...F},D){const B=v.useRef(null);return v.useImperativeHandle(D,()=>B.current),v.useEffect(()=>{const $=B.current;if(!$)return;const J=I=>{const Q=I.detail;Q&&(l==null||l(Q.value))},G=I=>{const Q=I.detail;Q&&(t==null||t(Q.value))},M=I=>{const Q=I.detail;Q&&(i==null||i(Q.value))},_=()=>s==null?void 0:s();return $.addEventListener("input",J),$.addEventListener("change",G),$.addEventListener("debounced-input",M),$.addEventListener("clear",_),()=>{$.removeEventListener("input",J),$.removeEventListener("change",G),$.removeEventListener("debounced-input",M),$.removeEventListener("clear",_)}},[t,l,i,s]),v.useEffect(()=>{const $=B.current;if(!$)return;const J=(M,_)=>{const I=$.getAttribute(M);if(_==null){I!=null&&$.removeAttribute(M);return}I!==_&&$.setAttribute(M,_)},G=(M,_)=>{_?J(M,""):J(M,null)};J("value",o!=null?String(o):null),G("clearable",b),G("readonly",p),G("autofocus",g),G("disabled",A),G("required",E),G("autosize",R),G("show-count",T),G("headless",k),J("debounce",typeof n=="number"&&Number.isFinite(n)?String(n):null),J("validation",r&&r!=="none"?r:null),J("size",a&&a!=="md"&&a!=="2"?String(a):null),J("minlength",typeof m=="number"?String(m):null),J("maxlength",typeof u=="number"?String(u):null),J("rows",typeof y=="number"?String(y):null),J("name",d||null),J("placeholder",e||null),J("resize",c||null),J("variant",w&&w!=="classic"?w:null),J("color",L||null),J("radius",H?String(H):null),J("label",f||null),J("description",P||null),J("max-rows",typeof S=="number"?String(S):null),J("density",q&&q!=="default"?q:null),J("tone",x&&x!=="brand"?x:null)},[o,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L,H,f,P,R,S,T,q,x,k]),N.default.createElement("ui-textarea",{ref:B,...F},K)});ve.displayName="Textarea";function kt(h){const{children:o,label:t,description:l,error:i,htmlFor:s,required:b,invalid:n,orientation:r,variant:a,tone:m,density:u,shape:y,labelWidth:p,headless:g,...A}=h,d=v.useRef(null);return v.useEffect(()=>{const E=d.current;E&&(t!=null&&t!==""?E.setAttribute("label",t):E.removeAttribute("label"),l!=null&&l!==""?E.setAttribute("description",l):E.removeAttribute("description"),i!=null&&i!==""?E.setAttribute("error",i):E.removeAttribute("error"),s?E.setAttribute("for",s):E.removeAttribute("for"),b?E.setAttribute("required",""):E.removeAttribute("required"),n?E.setAttribute("invalid",""):E.removeAttribute("invalid"),r&&r!=="vertical"?E.setAttribute("orientation",r):E.removeAttribute("orientation"),a&&a!=="default"?E.setAttribute("variant",a):E.removeAttribute("variant"),m&&m!=="default"?E.setAttribute("tone",m):E.removeAttribute("tone"),u&&u!=="default"?E.setAttribute("density",u):E.removeAttribute("density"),y&&y!=="default"?E.setAttribute("shape",y):E.removeAttribute("shape"),p?E.setAttribute("label-width",p):E.removeAttribute("label-width"),g?E.setAttribute("headless",""):E.removeAttribute("headless"))},[t,l,i,s,b,n,r,a,m,u,y,p,g]),N.default.createElement("ui-field",{ref:d,...A},o)}function Pt(h){const{value:o,onChange:t,onInput:l,onDebouncedInput:i,onSelect:s,onOpen:b,onClose:n,onClear:r,clearable:a,debounce:m,validation:u,size:y,maxlength:p,readOnly:g,autofocus:A,disabled:d,name:E,required:e,placeholder:c,variant:w,radius:L,label:H,description:f,emptyText:P,noFilter:R,allowCustom:S,children:T,...q}=h,x=v.useRef(null);return v.useEffect(()=>{const k=x.current;if(!k)return;const K=M=>{var I;const _=(I=M.detail)==null?void 0:I.query;typeof _=="string"&&(l==null||l(_))},F=M=>{var I;const _=(I=M.detail)==null?void 0:I.value;typeof _=="string"&&(t==null||t(_))},D=M=>{var I;const _=(I=M.detail)==null?void 0:I.query;typeof _=="string"&&(i==null||i(_))},B=M=>{const _=M.detail;typeof(_==null?void 0:_.value)=="string"&&(s==null||s(_.value,_.label||_.value))},$=()=>b==null?void 0:b(),J=()=>n==null?void 0:n(),G=()=>r==null?void 0:r();return k.addEventListener("input",K),k.addEventListener("change",F),k.addEventListener("debounced-input",D),k.addEventListener("select",B),k.addEventListener("open",$),k.addEventListener("close",J),k.addEventListener("clear",G),()=>{k.removeEventListener("input",K),k.removeEventListener("change",F),k.removeEventListener("debounced-input",D),k.removeEventListener("select",B),k.removeEventListener("open",$),k.removeEventListener("close",J),k.removeEventListener("clear",G)}},[t,l,i,s,b,n,r]),v.useEffect(()=>{const k=x.current;k&&(a?k.setAttribute("clearable",""):k.removeAttribute("clearable"),typeof m=="number"&&Number.isFinite(m)?k.setAttribute("debounce",String(m)):k.removeAttribute("debounce"),u&&u!=="none"?k.setAttribute("validation",u):k.removeAttribute("validation"),y&&y!=="md"&&y!=="2"?k.setAttribute("size",String(y)):k.removeAttribute("size"),typeof p=="number"?k.setAttribute("maxlength",String(p)):k.removeAttribute("maxlength"),g?k.setAttribute("readonly",""):k.removeAttribute("readonly"),A?k.setAttribute("autofocus",""):k.removeAttribute("autofocus"),d?k.setAttribute("disabled",""):k.removeAttribute("disabled"),E?k.setAttribute("name",E):k.removeAttribute("name"),e?k.setAttribute("required",""):k.removeAttribute("required"),c?k.setAttribute("placeholder",c):k.removeAttribute("placeholder"),w?k.setAttribute("variant",w):k.removeAttribute("variant"),L?k.setAttribute("radius",String(L)):k.removeAttribute("radius"),H?k.setAttribute("label",H):k.removeAttribute("label"),f?k.setAttribute("description",f):k.removeAttribute("description"),P?k.setAttribute("empty-text",P):k.removeAttribute("empty-text"),R?k.setAttribute("no-filter",""):k.removeAttribute("no-filter"),S?k.setAttribute("allow-custom",""):k.removeAttribute("allow-custom"))},[a,m,u,y,p,g,A,d,E,e,c,w,L,H,f,P,R,S]),N.default.createElement("ui-combobox",{ref:x,value:o,...q},T)}function St(h){const{text:o,tone:t,variant:l,size:i,radius:s,pill:b,dot:n,removable:r,autoRemove:a,iconOnly:m,disabled:u,onRemove:y,children:p,...g}=h,A=v.useRef(null);return v.useEffect(()=>{const d=A.current;if(!d)return;const E=()=>y==null?void 0:y();return d.addEventListener("remove",E),()=>d.removeEventListener("remove",E)},[y]),v.useEffect(()=>{const d=A.current;d&&(o?d.setAttribute("text",o):d.removeAttribute("text"),t?d.setAttribute("tone",t):d.removeAttribute("tone"),l?d.setAttribute("variant",l):d.removeAttribute("variant"),i&&i!=="md"&&i!=="2"?d.setAttribute("size",i):d.removeAttribute("size"),s?d.setAttribute("radius",String(s)):d.removeAttribute("radius"),b?d.setAttribute("pill",""):d.removeAttribute("pill"),n?d.setAttribute("dot",""):d.removeAttribute("dot"),r?d.setAttribute("removable",""):d.removeAttribute("removable"),a?d.setAttribute("auto-remove",""):d.removeAttribute("auto-remove"),m?d.setAttribute("icon-only",""):d.removeAttribute("icon-only"),u?d.setAttribute("disabled",""):d.removeAttribute("disabled"))},[o,t,l,i,s,b,n,r,a,m,u]),N.default.createElement("ui-badge",{ref:A,...g},p)}function Ft(h){const{title:o,description:t,actionLabel:l,tone:i,compact:s,headless:b,onAction:n,children:r,...a}=h,m=v.useRef(null);return v.useEffect(()=>{const u=m.current;if(!u)return;const y=()=>n==null?void 0:n();return u.addEventListener("action",y),()=>u.removeEventListener("action",y)},[n]),v.useEffect(()=>{const u=m.current;u&&(o?u.setAttribute("title",o):u.removeAttribute("title"),t?u.setAttribute("description",t):u.removeAttribute("description"),l?u.setAttribute("action-label",l):u.removeAttribute("action-label"),i?u.setAttribute("tone",i):u.removeAttribute("tone"),s?u.setAttribute("compact",""):u.removeAttribute("compact"),b?u.setAttribute("headless",""):u.removeAttribute("headless"))},[o,t,l,i,s,b]),N.default.createElement("ui-empty-state",{ref:m,...a},r)}function Tt(h){const{sortable:o,selectable:t,multiSelect:l,striped:i,hover:s,compact:b,bordered:n,stickyHeader:r,loading:a,headless:m,emptyText:u,onSortChange:y,onRowSelect:p,children:g,...A}=h,d=v.useRef(null);return v.useEffect(()=>{const E=d.current;if(!E)return;const e=w=>{const L=w.detail;L&&(y==null||y(L))},c=w=>{const L=w.detail;L&&(p==null||p(L))};return E.addEventListener("sort-change",e),E.addEventListener("row-select",c),()=>{E.removeEventListener("sort-change",e),E.removeEventListener("row-select",c)}},[y,p]),N.default.createElement("ui-table",{ref:d,...A,...o?{sortable:""}:{},...t?{selectable:""}:{},...l?{"multi-select":""}:{},...i?{striped:""}:{},...s?{hover:""}:{},...b?{compact:""}:{},...n?{bordered:""}:{},...r?{"sticky-header":""}:{},...a?{loading:""}:{},...m?{headless:""}:{},...u?{"empty-text":u}:{}},g)}function xt(h){const{sortable:o,selectable:t,multiSelect:l,striped:i,hover:s,compact:b,bordered:n,stickyHeader:r,loading:a,headless:m,hideSummary:u,emptyText:y,page:p,pageSize:g,paginationId:A,filterQuery:d,filterColumn:E,filterRules:e,columnOrder:c,pinColumns:w,draggableColumns:L,resizableColumns:H,bulkActionsLabel:f,bulkClearLabel:P,virtualize:R,rowHeight:S,overscan:T,onSortChange:q,onRowSelect:x,onPageChange:k,onFilterChange:K,onColumnResize:F,onVirtualRangeChange:D,onColumnOrderChange:B,onBulkClear:$,children:J,...G}=h,M=v.useRef(null);v.useEffect(()=>{const Q=M.current;if(!Q)return;const j=W=>{const X=W.detail;X&&(q==null||q(X))},Z=W=>{const X=W.detail;X&&(x==null||x(X))},Y=W=>{const X=W.detail;X&&(k==null||k(X))},re=W=>{const X=W.detail;X&&(K==null||K(X))},ie=W=>{const X=W.detail;X&&(F==null||F(X))},C=W=>{const X=W.detail;X&&(D==null||D(X))},z=W=>{const X=W.detail;X&&(B==null||B(X))},le=W=>{const X=W.detail;X&&($==null||$(X))};return Q.addEventListener("sort-change",j),Q.addEventListener("row-select",Z),Q.addEventListener("page-change",Y),Q.addEventListener("filter-change",re),Q.addEventListener("column-resize",ie),Q.addEventListener("virtual-range-change",C),Q.addEventListener("column-order-change",z),Q.addEventListener("bulk-clear",le),()=>{Q.removeEventListener("sort-change",j),Q.removeEventListener("row-select",Z),Q.removeEventListener("page-change",Y),Q.removeEventListener("filter-change",re),Q.removeEventListener("column-resize",ie),Q.removeEventListener("virtual-range-change",C),Q.removeEventListener("column-order-change",z),Q.removeEventListener("bulk-clear",le)}},[q,x,k,K,F,D,B,$]);const _=e&&e.length?(()=>{try{return JSON.stringify(e)}catch{return}})():void 0,I=typeof w=="string"?w.trim()||void 0:w&&typeof w=="object"?(()=>{try{return JSON.stringify(w)}catch{return}})():void 0;return N.default.createElement("ui-data-table",{ref:M,...G,...o?{sortable:""}:{},...t?{selectable:""}:{},...l?{"multi-select":""}:{},...i?{striped:""}:{},...s?{hover:""}:{},...b?{compact:""}:{},...n?{bordered:""}:{},...r?{"sticky-header":""}:{},...a?{loading:""}:{},...m?{headless:""}:{},...u?{"hide-summary":""}:{},...y?{"empty-text":y}:{},...typeof p=="number"&&Number.isFinite(p)?{page:String(p)}:{},...typeof g=="number"&&Number.isFinite(g)?{"page-size":String(g)}:{},...A?{"pagination-id":A}:{},...typeof d=="string"?{"filter-query":d}:{},...typeof E=="number"&&Number.isFinite(E)?{"filter-column":String(E)}:typeof E=="string"&&E.trim()?{"filter-column":E}:{},..._?{filters:_}:{},...c?{"column-order":c}:{},...I?{"pin-columns":I}:{},...L?{"draggable-columns":""}:{},...H?{"resizable-columns":""}:{},...f?{"bulk-actions-label":f}:{},...P?{"bulk-clear-label":P}:{},...R?{virtualize:""}:{},...typeof S=="number"&&Number.isFinite(S)?{"row-height":String(S)}:{},...typeof T=="number"&&Number.isFinite(T)?{overscan:String(T)}:{}},J)}const Ae=N.default.forwardRef(function({data:o,values:t,labels:l,type:i,variant:s,title:b,subtitle:n,headless:r,children:a,...m},u){const y=v.useRef(null);return v.useImperativeHandle(u,()=>y.current),v.useEffect(()=>{const p=y.current;if(!p)return;const g=(d,E)=>{const e=p.getAttribute(d);if(E==null){e!=null&&p.removeAttribute(d);return}e!==E&&p.setAttribute(d,E)},A=(d,E)=>{E?g(d,""):g(d,null)};if(o&&o.length)try{g("data",JSON.stringify(o))}catch{g("data",null)}else g("data",null);t&&t.length?g("values",t.join(",")):g("values",null),l&&l.length?g("labels",l.join(",")):g("labels",null),g("type",i&&i!=="line"?i:null),g("variant",s&&s!=="default"?s:null),g("title",b||null),g("subtitle",n||null),A("headless",r)},[o,t,l,i,s,b,n,r]),N.default.createElement("ui-chart",{ref:y,...m},a)});Ae.displayName="Chart";const Ee=N.default.forwardRef(function({items:o,variant:t,headless:l,children:i,...s},b){const n=v.useRef(null);return v.useImperativeHandle(b,()=>n.current),v.useEffect(()=>{const r=n.current;if(!r)return;const a=(u,y)=>{const p=r.getAttribute(u);if(y==null){p!=null&&r.removeAttribute(u);return}p!==y&&r.setAttribute(u,y)},m=(u,y)=>{y?a(u,""):a(u,null)};if(o&&o.length)try{a("items",JSON.stringify(o))}catch{a("items",null)}else a("items",null);a("variant",t&&t!=="default"?t:null),m("headless",l)},[o,t,l]),N.default.createElement("ui-timeline",{ref:n,...s},i)});Ee.displayName="Timeline";const pe=N.default.forwardRef(function({year:o,month:t,value:l,events:i,variant:s,selection:b,min:n,max:r,disabled:a,readOnly:m,locale:u,weekStart:y,outsideClick:p,eventsMax:g,eventsDisplay:A,maxSelections:d,size:E,headless:e,hideToday:c,showToday:w,onSelect:L,onChange:H,onCalendarChange:f,onValueChange:P,children:R,...S},T){const q=v.useRef(null);return v.useImperativeHandle(T,()=>q.current),v.useEffect(()=>{const x=q.current;if(!x)return;const k=F=>{const D=F.detail;D&&(L==null||L(D),H==null||H(D),P==null||P(D.value))},K=F=>{const D=F.detail;D&&(f==null||f(D))};return x.addEventListener("select",k),x.addEventListener("change",K),()=>{x.removeEventListener("select",k),x.removeEventListener("change",K)}},[L,H,f,P]),v.useEffect(()=>{const x=q.current;if(!x)return;const k=(F,D)=>{const B=x.getAttribute(F);if(D==null){B!=null&&x.removeAttribute(F);return}B!==D&&x.setAttribute(F,D)},K=(F,D)=>{D?x.hasAttribute(F)||x.setAttribute(F,""):x.hasAttribute(F)&&x.removeAttribute(F)};if(typeof o=="number"&&Number.isFinite(o)?k("year",String(o)):k("year",null),typeof t=="number"&&Number.isFinite(t)?k("month",String(t)):k("month",null),k("value",l||null),k("selection",b&&b!=="single"?b:null),k("min",n||null),k("max",r||null),k("locale",u||null),k("week-start",typeof y=="number"?String(y):null),k("outside-click",p&&p!=="navigate"?p:null),k("events-max",typeof g=="number"&&Number.isFinite(g)?String(g):null),k("events-display",A&&A!=="dots"?A:null),k("max-selections",typeof d=="number"&&Number.isFinite(d)?String(d):null),k("size",E&&E!=="md"?E:null),k("show-today",typeof w=="boolean"?w?"true":"false":null),K("disabled",a),K("readonly",m),K("hide-today",c),K("headless",e),i&&i.length)try{k("events",JSON.stringify(i))}catch{k("events",null)}else k("events",null);k("variant",s&&s!=="default"?s:null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w]),N.default.createElement("ui-calendar",{ref:q,...S},R)});pe.displayName="Calendar";const ye=N.default.forwardRef(function({value:o,format:t,alpha:l,disabled:i,readOnly:s,size:b,variant:n,mode:r,open:a,placeholder:m,presets:u,recent:y,maxRecent:p,persist:g,onInput:A,onChange:d,onValueChange:E,onOpen:e,onClose:c,onInvalid:w,children:L,...H},f){const P=v.useRef(null);v.useImperativeHandle(f,()=>P.current),v.useEffect(()=>{const S=P.current;if(!S)return;const T=k=>{const K=k.detail;K&&(A==null||A(K))},q=k=>{const K=k.detail;K&&(d==null||d(K),E==null||E(K.value))},x=k=>{const K=k.detail;K&&(w==null||w(K))};return S.addEventListener("input",T),S.addEventListener("change",q),S.addEventListener("open",e),S.addEventListener("close",c),S.addEventListener("invalid",x),()=>{S.removeEventListener("input",T),S.removeEventListener("change",q),S.removeEventListener("open",e),S.removeEventListener("close",c),S.removeEventListener("invalid",x)}},[A,d,E,e,c,w]),v.useEffect(()=>{const S=P.current;if(!S)return;const T=(x,k)=>{const K=S.getAttribute(x);k==null?K!=null&&S.removeAttribute(x):K!==k&&S.setAttribute(x,k)},q=(x,k)=>{k?T(x,""):T(x,null)};if(T("value",o??null),T("format",t&&t!=="hex"?t:null),q("alpha",l),q("disabled",i),q("readonly",s),T("size",b&&b!=="md"?b:null),T("variant",n&&n!=="default"?n:null),T("mode",r&&r!=="inline"?r:null),typeof a=="boolean"?q("open",a):T("open",null),T("placeholder",m??null),q("recent",y),T("max-recent",typeof p=="number"?String(p):null),q("persist",g),u&&u.length>0)try{T("presets",JSON.stringify(u))}catch{T("presets",null)}else T("presets",null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g]);const R={ref:P,...H};if(r&&r!=="inline"&&(R.mode=r),typeof a=="boolean"&&a&&(R.open=""),o!=null&&(R.value=o),t&&t!=="hex"&&(R.format=t),l&&(R.alpha=""),i&&(R.disabled=""),s&&(R.readonly=""),b&&b!=="md"&&(R.size=b),n&&n!=="default"&&(R.variant=n),m&&(R.placeholder=m),y&&(R.recent=""),typeof p=="number"&&(R["max-recent"]=String(p)),g&&(R.persist=""),u&&u.length>0)try{R.presets=JSON.stringify(u)}catch{}return N.default.createElement("ui-color-picker",R,L)});ye.displayName="ColorPicker";const Le=N.default.forwardRef(function({value:o,defaultValue:t,open:l,defaultOpen:i,min:s,max:b,locale:n,weekStart:r,size:a,variant:m,placeholder:u,label:y,hint:p,error:g,clearable:A,allowInput:d,closeOnSelect:E,outsideClick:e,disabled:c,readOnly:w,required:L,name:H,mode:f,events:P,eventsMax:R,eventsDisplay:S,format:T,displayFormat:q,onInput:x,onChange:k,onValueChange:K,onOpen:F,onClose:D,onInvalid:B,children:$,...J},G){const M=v.useRef(null);return v.useImperativeHandle(G,()=>M.current),v.useEffect(()=>{const _=M.current;if(!_)return;const I=Z=>{const Y=Z.detail;Y&&(x==null||x(Y))},Q=Z=>{const Y=Z.detail;Y&&(k==null||k(Y),K==null||K(Y.value))},j=Z=>{const Y=Z.detail;Y&&(B==null||B(Y))};return _.addEventListener("input",I),_.addEventListener("change",Q),_.addEventListener("open",F),_.addEventListener("close",D),_.addEventListener("invalid",j),()=>{_.removeEventListener("input",I),_.removeEventListener("change",Q),_.removeEventListener("open",F),_.removeEventListener("close",D),_.removeEventListener("invalid",j)}},[x,k,K,F,D,B]),v.useEffect(()=>{const _=M.current;if(!_)return;const I=(j,Z)=>{const Y=_.getAttribute(j);Z==null?Y!=null&&_.removeAttribute(j):Y!==Z&&_.setAttribute(j,Z)},Q=(j,Z)=>{Z?I(j,""):I(j,null)};if(I("value",o??null),I("default-value",t??null),typeof l=="boolean"?Q("open",l):I("open",null),Q("default-open",i),I("min",s??null),I("max",b??null),I("locale",n??null),I("week-start",typeof r=="number"?String(r):null),I("size",a&&a!=="md"?a:null),I("variant",m&&m!=="default"?m:null),I("placeholder",u??null),I("label",y??null),I("hint",p??null),I("error",g??null),Q("clearable",A),Q("allow-input",d),Q("close-on-select",E),I("outside-click",e&&e!=="navigate"?e:null),Q("disabled",c),Q("readonly",w),Q("required",L),I("name",H??null),I("mode",f&&f!=="popover"?f:null),I("events-max",typeof R=="number"?String(R):null),I("events-display",S&&S!=="dots"?S:null),I("format",T&&T!=="locale"?T:null),I("display-format",q??null),P!=null&&P.length)try{I("events",JSON.stringify(P))}catch{I("events",null)}else I("events",null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L,H,f,P,R,S,T,q]),N.default.createElement("ui-date-picker",{ref:M,...J},$)});Le.displayName="DatePicker";const ge=N.default.forwardRef(function({value:o,defaultValue:t,open:l,defaultOpen:i,min:s,max:b,locale:n,weekStart:r,size:a,variant:m,rangeVariant:u,label:y,hint:p,error:g,allowSameDay:A,allowPartial:d,closeOnSelect:E,clearable:e,disabled:c,readOnly:w,required:L,name:H,nameStart:f,nameEnd:P,mode:R,onInput:S,onChange:T,onValueChange:q,onOpen:x,onClose:k,onInvalid:K,children:F,...D},B){const $=v.useRef(null);return v.useImperativeHandle(B,()=>$.current),v.useEffect(()=>{const J=$.current;if(!J)return;const G=I=>{const Q=I.detail;Q&&(S==null||S(Q))},M=I=>{const Q=I.detail;Q&&(T==null||T(Q),q==null||q(Q.value?JSON.stringify(Q.value):null))},_=I=>{const Q=I.detail;Q&&(K==null||K(Q))};return J.addEventListener("input",G),J.addEventListener("change",M),J.addEventListener("open",x),J.addEventListener("close",k),J.addEventListener("invalid",_),()=>{J.removeEventListener("input",G),J.removeEventListener("change",M),J.removeEventListener("open",x),J.removeEventListener("close",k),J.removeEventListener("invalid",_)}},[S,T,q,x,k,K]),v.useEffect(()=>{const J=$.current;if(!J)return;const G=(_,I)=>{const Q=J.getAttribute(_);I==null?Q!=null&&J.removeAttribute(_):Q!==I&&J.setAttribute(_,I)},M=(_,I)=>{I?G(_,""):G(_,null)};G("value",o??null),G("default-value",t??null),typeof l=="boolean"?M("open",l):G("open",null),M("default-open",i),G("min",s??null),G("max",b??null),G("locale",n??null),G("week-start",typeof r=="number"?String(r):null),G("size",a&&a!=="md"?a:null),G("variant",m&&m!=="default"?m:null),G("range-variant",u&&u!=="two-fields"?u:null),G("label",y??null),G("hint",p??null),G("error",g??null),M("allow-same-day",A),M("allow-partial",d),M("close-on-select",E),M("clearable",e),M("disabled",c),M("readonly",w),M("required",L),G("name",H??null),G("name-start",f??null),G("name-end",P??null),G("mode",R&&R!=="popover"?R:null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L,H,f,P,R]),N.default.createElement("ui-date-range-picker",{ref:$,...D},F)});ge.displayName="DateRangePicker";const he=N.default.forwardRef(function({value:o,defaultValue:t,open:l,defaultOpen:i,format:s,step:b,seconds:n,stepSeconds:r,min:a,max:m,disabled:u,readOnly:y,required:p,name:g,clearable:A,allowInput:d,mode:E,label:e,hint:c,error:w,locale:L,variant:H,onInput:f,onChange:P,onValueChange:R,onOpen:S,onClose:T,onInvalid:q,children:x,...k},K){const F=v.useRef(null);return v.useImperativeHandle(K,()=>F.current),v.useEffect(()=>{const D=F.current;if(!D)return;const B=G=>{const M=G.detail;M&&(f==null||f(M))},$=G=>{const M=G.detail;M&&(P==null||P(M),R==null||R(M.value))},J=G=>{const M=G.detail;M&&(q==null||q(M))};return D.addEventListener("input",B),D.addEventListener("change",$),D.addEventListener("open",S),D.addEventListener("close",T),D.addEventListener("invalid",J),()=>{D.removeEventListener("input",B),D.removeEventListener("change",$),D.removeEventListener("open",S),D.removeEventListener("close",T),D.removeEventListener("invalid",J)}},[f,P,R,S,T,q]),v.useEffect(()=>{const D=F.current;if(!D)return;const B=(J,G)=>{const M=D.getAttribute(J);G==null?M!=null&&D.removeAttribute(J):M!==G&&D.setAttribute(J,G)},$=(J,G)=>{G?B(J,""):B(J,null)};B("value",o??null),B("default-value",t??null),typeof l=="boolean"?$("open",l):B("open",null),$("default-open",i),B("format",s&&s!=="24h"?s:null),B("step",typeof b=="number"?String(b):null),$("seconds",n),B("step-seconds",typeof r=="number"?String(r):null),B("min",a??null),B("max",m??null),$("disabled",u),$("readonly",y),$("required",p),B("name",g??null),$("clearable",A),$("allow-input",d),B("mode",E&&E!=="popover"?E:null),B("label",e??null),B("hint",c??null),B("error",w??null),B("locale",L??null),B("variant",H&&H!=="default"?H:null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L,H]),N.default.createElement("ui-time-picker",{ref:F,...k},x)});he.displayName="TimePicker";const we=N.default.forwardRef(function({value:o,defaultValue:t,open:l,defaultOpen:i,min:s,max:b,locale:n,weekStart:r,size:a,variant:m,step:u,format:y,disabled:p,readOnly:g,required:A,name:d,closeOnSelect:E,clearable:e,allowInput:c,mode:w,label:L,hint:H,error:f,onInput:P,onChange:R,onValueChange:S,onOpen:T,onClose:q,onInvalid:x,children:k,...K},F){const D=v.useRef(null);return v.useImperativeHandle(F,()=>D.current),v.useEffect(()=>{const B=D.current;if(!B)return;const $=M=>{const _=M.detail;_&&(P==null||P(_))},J=M=>{const _=M.detail;_&&(R==null||R(_),S==null||S(_.value))},G=M=>{const _=M.detail;_&&(x==null||x(_))};return B.addEventListener("input",$),B.addEventListener("change",J),B.addEventListener("open",T),B.addEventListener("close",q),B.addEventListener("invalid",G),()=>{B.removeEventListener("input",$),B.removeEventListener("change",J),B.removeEventListener("open",T),B.removeEventListener("close",q),B.removeEventListener("invalid",G)}},[P,R,S,T,q,x]),v.useEffect(()=>{const B=D.current;if(!B)return;const $=(G,M)=>{const _=B.getAttribute(G);M==null?_!=null&&B.removeAttribute(G):_!==M&&B.setAttribute(G,M)},J=(G,M)=>{M?$(G,""):$(G,null)};$("value",o??null),$("default-value",t??null),typeof l=="boolean"?J("open",l):$("open",null),J("default-open",i),$("min",s??null),$("max",b??null),$("locale",n??null),$("week-start",typeof r=="number"?String(r):null),$("size",a&&a!=="md"?a:null),$("variant",m&&m!=="default"?m:null),$("step",typeof u=="number"?String(u):null),$("format",y&&y!=="24h"?y:null),J("disabled",p),J("readonly",g),J("required",A),$("name",d??null),J("close-on-select",E),J("clearable",e),J("allow-input",c),$("mode",w&&w!=="popover"?w:null),$("label",L??null),$("hint",H??null),$("error",f??null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L,H,f]),N.default.createElement("ui-date-time-picker",{ref:D,...K},k)});we.displayName="DateTimePicker";const Re=N.default.forwardRef(function({value:o,defaultValue:t,open:l,defaultOpen:i,min:s,max:b,locale:n,weekStart:r,size:a,variant:m,step:u,autoNormalize:y,allowPartial:p,disabled:g,readOnly:A,required:d,name:E,closeOnSelect:e,clearable:c,mode:w,label:L,hint:H,error:f,onInput:P,onChange:R,onValueChange:S,onOpen:T,onClose:q,onInvalid:x,children:k,...K},F){const D=v.useRef(null);return v.useImperativeHandle(F,()=>D.current),v.useEffect(()=>{const B=D.current;if(!B)return;const $=M=>{const _=M.detail;_&&(P==null||P(_))},J=M=>{const _=M.detail;_&&(R==null||R(_),S==null||S(_.value?JSON.stringify(_.value):null))},G=M=>{const _=M.detail;_&&(x==null||x(_))};return B.addEventListener("input",$),B.addEventListener("change",J),B.addEventListener("open",T),B.addEventListener("close",q),B.addEventListener("invalid",G),()=>{B.removeEventListener("input",$),B.removeEventListener("change",J),B.removeEventListener("open",T),B.removeEventListener("close",q),B.removeEventListener("invalid",G)}},[P,R,S,T,q,x]),v.useEffect(()=>{const B=D.current;if(!B)return;const $=(G,M)=>{const _=B.getAttribute(G);M==null?_!=null&&B.removeAttribute(G):_!==M&&B.setAttribute(G,M)},J=(G,M)=>{M?$(G,""):$(G,null)};$("value",o??null),$("default-value",t??null),typeof l=="boolean"?J("open",l):$("open",null),J("default-open",i),$("min",s??null),$("max",b??null),$("locale",n??null),$("week-start",typeof r=="number"?String(r):null),$("size",a&&a!=="md"?a:null),$("variant",m&&m!=="default"?m:null),$("step",typeof u=="number"?String(u):null),J("auto-normalize",y),J("allow-partial",p),J("disabled",g),J("readonly",A),J("required",d),$("name",E??null),J("close-on-select",e),J("clearable",c),$("mode",w&&w!=="popover"?w:null),$("label",L??null),$("hint",H??null),$("error",f??null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L,H,f]),N.default.createElement("ui-date-range-time-picker",{ref:D,...K},k)});Re.displayName="DateRangeTimePicker";const He=N.default.forwardRef(function({tasks:o,variant:t,headless:l,children:i,...s},b){const n=v.useRef(null);return v.useImperativeHandle(b,()=>n.current),v.useEffect(()=>{const r=n.current;if(!r)return;const a=(u,y)=>{const p=r.getAttribute(u);if(y==null){p!=null&&r.removeAttribute(u);return}p!==y&&r.setAttribute(u,y)},m=(u,y)=>{y?a(u,""):a(u,null)};if(o&&o.length)try{a("tasks",JSON.stringify(o))}catch{a("tasks",null)}else a("tasks",null);a("variant",t&&t!=="default"?t:null),m("headless",l)},[o,t,l]),N.default.createElement("ui-gantt",{ref:n,...s},i)});He.displayName="Gantt";const Ne=N.default.forwardRef(function({steps:o,value:t,orientation:l,variant:i,size:s,clickable:b,linear:n,headless:r,onChange:a,onSelect:m,children:u,...y},p){const g=v.useRef(null);return v.useImperativeHandle(p,()=>g.current),v.useEffect(()=>{const A=g.current;if(!A)return;const d=e=>{const c=e.detail;c&&(a==null||a(c))},E=e=>{const c=e.detail;c&&(m==null||m(c))};return A.addEventListener("change",d),A.addEventListener("select",E),()=>{A.removeEventListener("change",d),A.removeEventListener("select",E)}},[a,m]),v.useEffect(()=>{const A=g.current;if(!A)return;const d=(e,c)=>{const w=A.getAttribute(e);if(c==null){w!=null&&A.removeAttribute(e);return}w!==c&&A.setAttribute(e,c)},E=(e,c)=>{c?d(e,""):d(e,null)};if(o&&o.length)try{d("steps",JSON.stringify(o))}catch{d("steps",null)}else d("steps",null);d("value",t||null),d("orientation",l&&l!=="horizontal"?l:null),d("variant",i&&i!=="default"?i:null),d("size",s&&s!=="md"?s:null),E("clickable",b),E("linear",n),E("headless",r)},[o,t,l,i,s,b,n,r]),N.default.createElement("ui-stepper",{ref:g,...y},u)});Ne.displayName="Stepper";const ke=N.default.forwardRef(function({value:o,linear:t,showStepper:l,stepperPosition:i,hideControls:s,keepMounted:b,variant:n,headless:r,nextLabel:a,prevLabel:m,finishLabel:u,onBeforeChange:y,onChange:p,onStepChange:g,onComplete:A,children:d,...E},e){const c=v.useRef(null);return v.useImperativeHandle(e,()=>c.current),v.useEffect(()=>{const w=c.current;if(!w)return;const L=R=>{if(!y)return;const S=R.detail;y(S)===!1&&R.preventDefault()},H=R=>{const S=R.detail;S&&(p==null||p(S))},f=R=>{const S=R.detail;S&&(g==null||g(S))},P=R=>{const S=R.detail;S&&(A==null||A(S))};return w.addEventListener("before-change",L),w.addEventListener("change",H),w.addEventListener("step-change",f),w.addEventListener("complete",P),()=>{w.removeEventListener("before-change",L),w.removeEventListener("change",H),w.removeEventListener("step-change",f),w.removeEventListener("complete",P)}},[y,p,g,A]),v.useEffect(()=>{const w=c.current;if(!w)return;const L=(f,P)=>{const R=w.getAttribute(f);if(P==null){R!=null&&w.removeAttribute(f);return}R!==P&&w.setAttribute(f,P)},H=(f,P,R)=>{if(typeof P=="boolean"){P?L(f,""):L(f,null);return}R!==void 0&&(R?L(f,""):L(f,null))};L("value",o||null),H("linear",t),typeof l=="boolean"?L("show-stepper",l?"true":"false"):L("show-stepper",null),L("stepper-position",i&&i!=="top"?i:null),H("hide-controls",s),H("keep-mounted",b),L("variant",n&&n!=="default"?n:null),H("headless",r),L("next-label",a||null),L("prev-label",m||null),L("finish-label",u||null)},[o,t,l,i,s,b,n,r,a,m,u]),N.default.createElement("ui-wizard",{ref:c,...E},d)});ke.displayName="Wizard";const Pe=N.default.forwardRef(function({open:o,mode:t,orientation:l,variant:i,floating:s,placement:b,collapsible:n,label:r,headless:a,onSelect:m,onOpenChange:u,onToggle:y,children:p,...g},A){const d=v.useRef(null);return v.useImperativeHandle(A,()=>d.current),v.useEffect(()=>{const E=d.current;if(!E)return;const e=L=>{const H=L.detail;H&&(m==null||m(H))},c=L=>{var f;const H=(f=L.detail)==null?void 0:f.open;typeof H=="boolean"&&(u==null||u(H))},w=L=>{var f;const H=(f=L.detail)==null?void 0:f.open;typeof H=="boolean"&&(y==null||y(H))};return E.addEventListener("select",e),E.addEventListener("change",c),E.addEventListener("toggle",w),()=>{E.removeEventListener("select",e),E.removeEventListener("change",c),E.removeEventListener("toggle",w)}},[m,u,y]),v.useEffect(()=>{const E=d.current;if(!E)return;const e=(w,L)=>{const H=E.getAttribute(w);if(L==null){H!=null&&E.removeAttribute(w);return}H!==L&&E.setAttribute(w,L)},c=(w,L)=>{L?e(w,""):e(w,null)};typeof o=="boolean"?c("open",o):e("open",null),e("mode",t&&t!=="bar"?t:null),e("orientation",l&&l!=="horizontal"?l:null),e("variant",i&&i!=="default"?i:null),c("floating",s),e("placement",b&&b!=="bottom-right"?b:null),c("collapsible",n),e("label",r||null),c("headless",a)},[o,t,l,i,s,b,n,r,a]),N.default.createElement("ui-quick-actions",{ref:d,...g},p)});Pe.displayName="QuickActions";function Dt(h){const{selected:o,orientation:t,activation:l,loop:i,collapsible:s,headless:b,onChange:n,onSelect:r,children:a,...m}=h,u=v.useRef(null);return v.useEffect(()=>{const y=u.current;if(!y)return;const p=g=>{const A=g.detail;A&&(n==null||n(A),r==null||r(A.selected))};return y.addEventListener("change",p),()=>y.removeEventListener("change",p)},[n,r]),v.useEffect(()=>{const y=u.current;y&&(typeof o=="number"?y.setAttribute("selected",String(o)):y.removeAttribute("selected"),t?y.setAttribute("orientation",t):y.removeAttribute("orientation"),l?y.setAttribute("activation",l):y.removeAttribute("activation"),typeof i=="boolean"?y.setAttribute("loop",String(i)):y.removeAttribute("loop"),s?y.setAttribute("collapsible",""):y.removeAttribute("collapsible"),b?y.setAttribute("headless",""):y.removeAttribute("headless"))},[o,t,l,i,s,b]),N.default.createElement("ui-navigation-menu",{ref:u,...m},a)}function Bt(h){const{selected:o,open:t,loop:l,headless:i,orientation:s,placement:b,variant:n,density:r,shape:a,elevation:m,tone:u,closeOnSelect:y,typeahead:p,onChange:g,onOpen:A,onClose:d,onSelect:E,children:e,...c}=h,w=v.useRef(null);return v.useEffect(()=>{const L=w.current;if(!L)return;const H=S=>{const T=S.detail;T&&(g==null||g(T))},f=S=>{const T=S.detail;typeof(T==null?void 0:T.selected)=="number"?A==null||A(T.selected):A==null||A(-1)},P=()=>d==null?void 0:d(),R=S=>{const T=S.detail;T&&(E==null||E(T))};return L.addEventListener("change",H),L.addEventListener("open",f),L.addEventListener("close",P),L.addEventListener("select",R),()=>{L.removeEventListener("change",H),L.removeEventListener("open",f),L.removeEventListener("close",P),L.removeEventListener("select",R)}},[g,A,d,E]),v.useEffect(()=>{const L=w.current;L&&(typeof o=="number"?L.setAttribute("selected",String(o)):L.removeAttribute("selected"),typeof t=="boolean"&&t?L.setAttribute("open",""):L.removeAttribute("open"),typeof l=="boolean"?L.setAttribute("loop",String(l)):L.removeAttribute("loop"),i?L.setAttribute("headless",""):L.removeAttribute("headless"),s&&s!=="horizontal"?L.setAttribute("orientation",s):L.removeAttribute("orientation"),b?L.setAttribute("placement",b):L.removeAttribute("placement"),n&&n!=="default"?L.setAttribute("variant",n):L.removeAttribute("variant"),r&&r!=="default"?L.setAttribute("density",r):L.removeAttribute("density"),a&&a!=="default"?L.setAttribute("shape",a):L.removeAttribute("shape"),m&&m!=="default"?L.setAttribute("elevation",m):L.removeAttribute("elevation"),u&&u!=="default"&&u!=="brand"?L.setAttribute("tone",u):L.removeAttribute("tone"),y==null?L.removeAttribute("close-on-select"):L.setAttribute("close-on-select",y?"true":"false"),p==null?L.removeAttribute("typeahead"):L.setAttribute("typeahead",p?"true":"false"))},[o,t,l,i,s,b,n,r,a,m,u,y,p]),N.default.createElement("ui-menubar",{ref:w,...c},e)}const qt=typeof window<"u"?N.default.useLayoutEffect:N.default.useEffect,Se=N.default.forwardRef(function(o,t){const{open:l,title:i,description:s,closable:b,dismissible:n,closeOnOverlay:r,closeOnEsc:a,lockWhileLoading:m,roleType:u,size:y,state:p,initialFocus:g,submitText:A,cancelText:d,loadingText:E,dialogId:e,config:c,headless:w,onOpen:L,onClose:H,onRequestClose:f,onDialogOpen:P,onDialogSubmit:R,onDialogCancel:S,onDialogDismiss:T,onDialogClose:q,children:x,...k}=o,K=v.useRef(null);return N.default.useImperativeHandle(t,()=>K.current),v.useEffect(()=>{const F=K.current;if(!F)return;const D=()=>L==null?void 0:L(),B=()=>H==null?void 0:H(),$=Q=>{const j=Q.detail;j&&(f==null||f(j))},J=Q=>P==null?void 0:P(Q.detail),G=Q=>R==null?void 0:R(Q.detail),M=Q=>S==null?void 0:S(Q.detail),_=Q=>T==null?void 0:T(Q.detail),I=Q=>q==null?void 0:q(Q.detail);return F.addEventListener("open",D),F.addEventListener("close",B),F.addEventListener("request-close",$),F.addEventListener("ui-open",J),F.addEventListener("ui-submit",G),F.addEventListener("ui-cancel",M),F.addEventListener("ui-dismiss",_),F.addEventListener("ui-close",I),()=>{F.removeEventListener("open",D),F.removeEventListener("close",B),F.removeEventListener("request-close",$),F.removeEventListener("ui-open",J),F.removeEventListener("ui-submit",G),F.removeEventListener("ui-cancel",M),F.removeEventListener("ui-dismiss",_),F.removeEventListener("ui-close",I)}},[L,H,f,P,R,S,T,q]),qt(()=>{const F=K.current;if(!F)return;typeof l=="boolean"&&(l?F.setAttribute("open",""):F.removeAttribute("open")),i?F.setAttribute("title",i):F.removeAttribute("title"),s?F.setAttribute("description",s):F.removeAttribute("description");const D=typeof n=="boolean"?n:b;typeof D=="boolean"?(F.setAttribute("dismissible",String(D)),F.setAttribute("closable",String(D))):(F.removeAttribute("dismissible"),F.removeAttribute("closable")),typeof r=="boolean"?(F.setAttribute("close-on-overlay",String(r)),F.setAttribute("close-on-backdrop",String(r))):(F.removeAttribute("close-on-overlay"),F.removeAttribute("close-on-backdrop")),typeof a=="boolean"?F.setAttribute("close-on-esc",String(a)):F.removeAttribute("close-on-esc"),typeof m=="boolean"?F.setAttribute("lock-while-loading",String(m)):F.removeAttribute("lock-while-loading"),u?F.setAttribute("role",u):F.removeAttribute("role"),y&&y!=="md"&&y!=="2"?F.setAttribute("size",y):F.removeAttribute("size"),p&&p!=="idle"?F.setAttribute("state",p):F.removeAttribute("state"),g?F.setAttribute("initial-focus",g):F.removeAttribute("initial-focus"),A?F.setAttribute("submit-text",A):F.removeAttribute("submit-text"),d?F.setAttribute("cancel-text",d):F.removeAttribute("cancel-text"),E?F.setAttribute("loading-text",E):F.removeAttribute("loading-text"),e&&(F.dialogId=e),c&&(F.config=c),w?F.setAttribute("headless",""):F.removeAttribute("headless")},[l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w]),N.default.createElement("ui-dialog",{ref:K,...k},x)});Se.displayName="Dialog";const Fe=v.createContext(null);function $t({children:h,hostId:o="ui-dialog-react-host"}){const t=v.useRef(null);t.current||(t.current=V.createDialogManager()),v.useEffect(()=>{var s;if(typeof document>"u")return;let i=document.getElementById(o);return i||(i=document.createElement("div"),i.id=o,i.setAttribute("data-ui-dialog-react-host","true"),document.body.appendChild(i)),(s=t.current)==null||s.setContainer(i),()=>{var b;(b=t.current)==null||b.destroy("unmount"),t.current=null,i&&i.parentElement&&i.parentElement.removeChild(i)}},[o]);const l=v.useMemo(()=>({open:(i={})=>{var s;return((s=t.current)==null?void 0:s.open(i))??Promise.resolve({id:"",action:"dismiss"})},confirm:(i={})=>{var s;return((s=t.current)==null?void 0:s.confirm(i))??Promise.resolve({id:"",action:"dismiss"})}}),[]);return N.default.createElement(Fe.Provider,{value:l},h)}function Jt(){const h=v.useContext(Fe);if(!h)throw new Error("useDialog must be used within <DialogProvider>.");return h}const Te=N.default.forwardRef(function({children:o,onOpen:t,onClose:l,...i},s){const b=v.useRef(null);return N.default.useImperativeHandle(s,()=>b.current),v.useEffect(()=>{const n=b.current;if(!n)return;const r=()=>t==null?void 0:t(),a=()=>l==null?void 0:l();return n.addEventListener("open",r),n.addEventListener("close",a),()=>{n.removeEventListener("open",r),n.removeEventListener("close",a)}},[t,l]),N.default.createElement("ui-popover",{ref:b,...i},o)});Te.displayName="Popover";const xe=N.default.forwardRef(function({children:o,selected:t,value:l,orientation:i,activation:s,variant:b,size:n,tone:r,stretched:a,headless:m,onChange:u,onTabChange:y,...p},g){const A=v.useRef(null);return v.useImperativeHandle(g,()=>A.current),v.useEffect(()=>{const d=A.current;if(!d)return;const E=e=>{const c=e.detail;c&&(u==null||u(c.index),y==null||y(c))};return d.addEventListener("change",E),()=>{d.removeEventListener("change",E)}},[u,y]),v.useEffect(()=>{const d=A.current;if(!d)return;const E=(c,w)=>{const L=d.getAttribute(c);if(w==null){L!=null&&d.removeAttribute(c);return}L!==w&&d.setAttribute(c,w)},e=(c,w)=>{w?E(c,""):E(c,null)};E("selected",t!=null?String(t):null),E("value",l||null),E("orientation",i&&i!=="horizontal"?i:null),E("activation",s&&s!=="auto"?s:null),E("variant",b&&b!=="default"?b:null),E("size",n&&n!=="md"?n:null),E("tone",r&&r!=="brand"?r:null),e("stretched",a),e("headless",m)},[t,l,i,s,b,n,r,a,m]),N.default.createElement("ui-tabs",{ref:A,...p},o)});xe.displayName="Tabs";const De=N.default.forwardRef(function({children:o,open:t,placement:l,variant:i,density:s,shape:b,elevation:n,tone:r,closeOnSelect:a,typeahead:m,onOpen:u,onClose:y,onChange:p,onSelect:g,onSelectDetail:A,...d},E){const e=v.useRef(null);return N.default.useImperativeHandle(E,()=>e.current),v.useEffect(()=>{const c=e.current;if(!c)return;const w=()=>u==null?void 0:u(),L=()=>y==null?void 0:y(),H=P=>{var S;const R=(S=P.detail)==null?void 0:S.open;typeof R=="boolean"&&(p==null||p(R))},f=P=>{const R=P.detail||{};A==null||A(R),typeof R.index=="number"&&(g==null||g(R.index))};return c.addEventListener("open",w),c.addEventListener("close",L),c.addEventListener("change",H),c.addEventListener("select",f),()=>{c.removeEventListener("open",w),c.removeEventListener("close",L),c.removeEventListener("change",H),c.removeEventListener("select",f)}},[u,y,p,g,A]),v.useEffect(()=>{const c=e.current;!c||t==null||(t?c.setAttribute("open",""):c.removeAttribute("open"))},[t]),v.useEffect(()=>{const c=e.current;c&&(l?c.setAttribute("placement",l):c.removeAttribute("placement"))},[l]),v.useEffect(()=>{const c=e.current;c&&(i&&i!=="default"?c.setAttribute("variant",i):c.removeAttribute("variant"))},[i]),v.useEffect(()=>{const c=e.current;c&&(s&&s!=="default"?c.setAttribute("density",s):c.removeAttribute("density"))},[s]),v.useEffect(()=>{const c=e.current;c&&(b&&b!=="default"?c.setAttribute("shape",b):c.removeAttribute("shape"))},[b]),v.useEffect(()=>{const c=e.current;c&&(n&&n!=="default"?c.setAttribute("elevation",n):c.removeAttribute("elevation"))},[n]),v.useEffect(()=>{const c=e.current;c&&(r&&r!=="default"&&r!=="brand"?c.setAttribute("tone",r):c.removeAttribute("tone"))},[r]),v.useEffect(()=>{const c=e.current;if(c){if(a==null){c.removeAttribute("close-on-select");return}c.setAttribute("close-on-select",a?"true":"false")}},[a]),v.useEffect(()=>{const c=e.current;if(c){if(m==null){c.removeAttribute("typeahead");return}c.setAttribute("typeahead",m?"true":"false")}},[m]),N.default.createElement("ui-menu",{ref:e,...d},o)});De.displayName="Menu";const Be=N.default.forwardRef(function({children:o,name:t,iconVariant:l,size:i,color:s,secondaryColor:b,variant:n,tone:r,shape:a,spin:m,pulse:u,badge:y,label:p,decorative:g,strokeWidth:A,absoluteStrokeWidth:d,strokeLinecap:E,strokeLinejoin:e,rotate:c,flip:w,rtl:L,...H},f){const P=v.useRef(null);return v.useImperativeHandle(f,()=>P.current),v.useEffect(()=>{const R=P.current;R&&(t?R.setAttribute("name",t):R.removeAttribute("name"),l?R.setAttribute("icon-variant",l):R.removeAttribute("icon-variant"),i!=null&&i!==""?R.setAttribute("size",String(i)):R.removeAttribute("size"),s?R.setAttribute("color",s):R.removeAttribute("color"),b?R.setAttribute("secondary-color",b):R.removeAttribute("secondary-color"),n&&n!=="default"?R.setAttribute("variant",n):R.removeAttribute("variant"),r&&r!=="default"?R.setAttribute("tone",r):R.removeAttribute("tone"),a&&a!=="default"?R.setAttribute("shape",a):R.removeAttribute("shape"),m?R.setAttribute("spin",""):R.removeAttribute("spin"),u?R.setAttribute("pulse",""):R.removeAttribute("pulse"),y?R.setAttribute("badge",""):R.removeAttribute("badge"),p?R.setAttribute("label",p):R.removeAttribute("label"),g?R.setAttribute("decorative",""):R.removeAttribute("decorative"),A!=null&&A!==""?R.setAttribute("stroke-width",String(A)):R.removeAttribute("stroke-width"),d?R.setAttribute("absolute-stroke-width",""):R.removeAttribute("absolute-stroke-width"),E?R.setAttribute("stroke-linecap",E):R.removeAttribute("stroke-linecap"),e?R.setAttribute("stroke-linejoin",e):R.removeAttribute("stroke-linejoin"),c!=null&&Number.isFinite(c)?R.setAttribute("rotate",String(c)):R.removeAttribute("rotate"),w?R.setAttribute("flip",w):R.removeAttribute("flip"),L?R.setAttribute("rtl",""):R.removeAttribute("rtl"))},[t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L]),N.default.createElement("ui-icon",{ref:P,...H},o)});Be.displayName="Icon";const ue={default:"",success:"Success: ",error:"Error: ",warning:"Warning: ",info:"Info: "};function jt(h,o={}){return V.showToast(h,o)}const Gt={show(h,o={}){return V.showToast(h,o)},success(h,o={}){return V.showToast(`${ue.success}${h}`,o)},error(h,o={}){return V.showToast(`${ue.error}${h}`,o)},warning(h,o={}){return V.showToast(`${ue.warning}${h}`,o)},info(h,o={}){return V.showToast(`${ue.info}${h}`,o)}};function _t(){return null}const qe=N.default.forwardRef(function({children:o,headless:t,onShow:l,onHide:i,...s},b){const n=v.useRef(null);return N.default.useImperativeHandle(b,()=>n.current),v.useEffect(()=>{const r=n.current;if(!r)return;const a=u=>{const y=u.detail;y&&(l==null||l(y))},m=u=>{const y=u.detail;y&&(i==null||i(y))};return r.addEventListener("show",a),r.addEventListener("hide",m),()=>{r.removeEventListener("show",a),r.removeEventListener("hide",m)}},[l,i]),v.useEffect(()=>{const r=n.current;r&&(t?r.setAttribute("headless",""):r.removeAttribute("headless"))},[t]),N.default.createElement("ui-toast",{ref:n,...s},o)});qe.displayName="Toast";function ee(h,o){if(typeof window>"u"||typeof customElements>"u"||customElements.get(h))return;const t=`__editora_warned_${h}`,l=window;l[t]||(l[t]=!0,console.warn(`[ui-react/${o}] ${h} is not registered. Import/register the matching web component before using this wrapper.`))}function Mt(h){const{children:o,anchorId:t,open:l,...i}=h,s=v.useRef(null);return v.useEffect(()=>{ee("ui-floating-toolbar","FloatingToolbar")},[]),v.useEffect(()=>{var n,r;const b=s.current;b&&(l&&t?(n=b.showForAnchorId)==null||n.call(b,t):(r=b.hide)==null||r.call(b))},[l,t]),N.default.createElement("ui-floating-toolbar",{ref:s,...i},o)}const $e=N.forwardRef(function({children:o,orientation:t,density:l,ariaLabel:i,...s},b){const n=N.useRef(null);return N.useImperativeHandle(b,()=>n.current),N.useEffect(()=>{ee("ui-block-controls","BlockControls")},[]),N.useEffect(()=>{const r=n.current;r&&(t?r.setAttribute("orientation",t):r.removeAttribute("orientation"),l?r.setAttribute("density",l):r.removeAttribute("density"),i?r.setAttribute("aria-label",i):r.removeAttribute("aria-label"))},[t,l,i]),N.createElement("ui-block-controls",{ref:n,...s},o)});$e.displayName="BlockControls";function Qt(h){const{children:o,open:t,onSelect:l,...i}=h,s=v.useRef(null);return v.useEffect(()=>{ee("ui-command-palette","CommandPalette")},[]),v.useEffect(()=>{const b=s.current;if(!b)return;const n=r=>{var m;const a=(m=r.detail)==null?void 0:m.index;typeof a=="number"&&(l==null||l(a))};return b.addEventListener("select",n),t?b.setAttribute("open",""):b.removeAttribute("open"),()=>b.removeEventListener("select",n)},[t,l]),N.default.createElement("ui-command-palette",{ref:s,...i},o)}function It(h){const{items:o,anchorId:t,anchorPoint:l,open:i,variant:s,density:b,shape:n,elevation:r,tone:a,closeOnSelect:m,typeahead:u,children:y,onOpen:p,onClose:g,onChange:A,onSelect:d,...E}=h,e=v.useRef(null);v.useEffect(()=>{const H=e.current;if(!H)return;const f=()=>p==null?void 0:p(),P=()=>g==null?void 0:g(),R=T=>{var x;const q=(x=T.detail)==null?void 0:x.open;typeof q=="boolean"&&(A==null||A(q))},S=T=>{d==null||d(T.detail)};return H.addEventListener("open",f),H.addEventListener("close",P),H.addEventListener("change",R),H.addEventListener("select",S),()=>{H.removeEventListener("open",f),H.removeEventListener("close",P),H.removeEventListener("change",R),H.removeEventListener("select",S)}},[p,g,A,d]),v.useEffect(()=>{const H=e.current;if(!(!H||i==null)){if(!i){H.close?H.close():H.open=!1;return}if(l&&H.openAt){H.openAt(l);return}if(t){if(H.openForAnchorId){H.openForAnchorId(t);return}if(H.showForAnchorId){H.showForAnchorId(t);return}}H.open=!0}},[i,t,l]);const c=H=>H?H.map((f,P)=>{if(f.separator)return N.default.createElement("div",{key:P,className:"separator",role:"separator"});let R=null;f.icon&&(R=typeof f.icon=="string"?N.default.createElement("span",{className:"icon"},f.icon):f.icon);let S=null;return f.submenu&&(S=N.default.createElement("div",{className:"submenu"},c(f.submenu))),N.default.createElement("div",{key:P,className:"menuitem",role:"menuitem",tabIndex:f.disabled?-1:0,"aria-disabled":f.disabled?"true":void 0,"data-value":f.value,onClick:f.disabled?void 0:f.onClick},R,N.default.createElement("span",{className:"label"},f.label),f.submenu&&N.default.createElement("span",{className:"submenu-arrow"},"▶"),S)}):null,w=N.default.Children.count(y)>0,L=!!i&&!l&&!t;return N.default.createElement("ui-context-menu",{ref:e,...E,...L?{open:""}:{},...s&&s!=="default"?{variant:s}:{},...b&&b!=="default"?{density:b}:{},...n&&n!=="default"?{shape:n}:{},...r&&r!=="default"?{elevation:r}:{},...a&&a!=="default"&&a!=="brand"?{tone:a}:{},...m==null?{}:{"close-on-select":m?"true":"false"},...u==null?{}:{typeahead:u?"true":"false"}},w?y:N.default.createElement("div",{slot:"menu"},c(o)))}function Kt(h){const{children:o,anchorId:t,open:l,placement:i,offset:s,strategy:b,arrow:n,variant:r,tone:a,radius:m,size:u,closeOnOutside:y,closeOnEscape:p,onOpen:g,onClose:A,onOpenChange:d,...E}=h,e=v.useRef(null);return v.useEffect(()=>{ee("ui-selection-popup","SelectionPopup")},[]),v.useEffect(()=>{const c=e.current;if(!c)return;const w=()=>{g==null||g(),d==null||d(!0)},L=()=>{A==null||A(),d==null||d(!1)};return c.addEventListener("open",w),c.addEventListener("close",L),()=>{c.removeEventListener("open",w),c.removeEventListener("close",L)}},[g,A,d]),v.useEffect(()=>{var H,f;const c=e.current;if(!c)return;const w=(P,R)=>{const S=c.getAttribute(P);if(R==null){S!=null&&c.removeAttribute(P);return}S!==R&&c.setAttribute(P,R)},L=(P,R,S=void 0)=>{if(R==null){S!==void 0&&w(P,S?null:"false");return}R?w(P,""):w(P,"false")};w("anchor-id",t??null),w("placement",i&&i!=="top"?i:null),w("offset",typeof s=="number"&&Number.isFinite(s)?String(s):null),w("strategy",b&&b!=="fixed"?b:null),w("variant",r&&r!=="default"?r:null),w("tone",a&&a!=="brand"?a:null),w("radius",m?String(m):null),w("size",u&&u!=="md"?u:null),L("arrow",n),L("close-on-outside",y,!0),L("close-on-escape",p,!0),l&&t?(H=c.openFor)==null||H.call(c,t):l?c.setAttribute("open",""):l===!1?(f=c.close)==null||f.call(c):c.removeAttribute("open")},[l,t,i,s,b,n,r,a,m,u,y,p]),N.default.createElement("ui-selection-popup",{ref:e,...E},o)}function Ut(h){const{children:o,open:t,position:l,...i}=h,s=v.useRef(null);return v.useEffect(()=>{ee("ui-plugin-panel","PluginPanel")},[]),v.useEffect(()=>{const b=s.current;b&&(t?b.setAttribute("open",""):b.removeAttribute("open"),l&&b.setAttribute("position",l))},[t,l]),N.default.createElement("ui-plugin-panel",{ref:s,...i},o)}const Je=N.default.forwardRef(function(o,t){const{children:l,onSubmit:i,onInvalid:s,onValidate:b,onAutosave:n,onDirtyChange:r,novalidate:a,autosave:m,autosaveDelay:u,guardUnsaved:y,variant:p,tone:g,density:A,shape:d,elevation:E,gap:e,headless:c,loading:w,...L}=o,H=v.useRef(null);return v.useImperativeHandle(t,()=>H.current),v.useEffect(()=>{const f=H.current;if(!f)return;const P=x=>{const k=x.detail||{};i==null||i(k.values||{})},R=x=>{const k=x.detail||{};s==null||s(k.errors||{},k.values||{})},S=x=>{const k=x.detail||{};b==null||b({valid:!!k.valid,errors:k.errors||{}})},T=x=>{const k=x.detail||{};n==null||n(k.values||{})},q=x=>{const k=x.detail||{};r==null||r(!!k.dirty,k.values||{})};return f.addEventListener("submit",P),f.addEventListener("invalid",R),f.addEventListener("validate",S),f.addEventListener("autosave",T),f.addEventListener("dirty-change",q),()=>{f.removeEventListener("submit",P),f.removeEventListener("invalid",R),f.removeEventListener("validate",S),f.removeEventListener("autosave",T),f.removeEventListener("dirty-change",q)}},[i,s,b,n,r]),v.useEffect(()=>{const f=H.current;f&&(a?f.setAttribute("novalidate",""):f.removeAttribute("novalidate"),m?f.setAttribute("autosave",""):f.removeAttribute("autosave"),typeof u=="number"&&Number.isFinite(u)?f.setAttribute("autosave-delay",String(u)):f.removeAttribute("autosave-delay"),y?f.setAttribute("guard-unsaved",""):f.removeAttribute("guard-unsaved"),p&&p!=="default"?f.setAttribute("variant",p):f.removeAttribute("variant"),g&&g!=="default"?f.setAttribute("tone",g):f.removeAttribute("tone"),A&&A!=="default"?f.setAttribute("density",A):f.removeAttribute("density"),d&&d!=="default"?f.setAttribute("shape",d):f.removeAttribute("shape"),E&&E!=="default"?f.setAttribute("elevation",E):f.removeAttribute("elevation"),e?f.setAttribute("gap",e):f.removeAttribute("gap"),c?f.setAttribute("headless",""):f.removeAttribute("headless"),w?f.setAttribute("loading",""):f.removeAttribute("loading"))},[a,m,u,y,p,g,A,d,E,e,c,w]),N.default.createElement("ui-form",{ref:H,...L},l)});Je.displayName="Form";function Xt(){const h=v.useRef(null),o=v.useCallback(async()=>{const n=h.current;return n?await n.submit():!1},[]),t=v.useCallback(async()=>{const n=h.current;return n?await n.validate():{valid:!0,errors:{}}},[]),l=v.useCallback(()=>{var r;const n=h.current;return n?(r=n.getValues)==null?void 0:r.call(n):{}},[]),i=v.useCallback(n=>{var a;const r=h.current;return(a=r==null?void 0:r.reset)==null?void 0:a.call(r,n)},[]),s=v.useCallback(()=>{var r;const n=h.current;return n?typeof n.isDirty=="function"?!!n.isDirty():((r=n.hasAttribute)==null?void 0:r.call(n,"dirty"))||!1:!1},[]),b=v.useCallback(n=>{var a;const r=h.current;return(a=r==null?void 0:r.markClean)==null?void 0:a.call(r,n)},[]);return{ref:h,submit:o,validate:t,getValues:l,reset:i,isDirty:s,markClean:b}}function Yt(h){const{placement:o="bottom",offset:t=8,open:l,onOpen:i,onClose:s,role:b="menu"}=h||{},n=v.useRef(null),r=v.useRef(null),a=v.useRef(null),[m,u]=v.useState({top:0,left:0,placement:o}),y=typeof l<"u",[p,g]=v.useState(!!l),A=y?l:p,d=F=>{y||g(F),F?i&&i():s&&s()},E=()=>d(!A),e=()=>d(!0),c=()=>d(!1),w=v.useCallback(()=>{const F=n.current,D=r.current;if(!F||!D)return;const B=V.computePosition(F,D,{placement:o,offset:t});u({top:Math.round(B.top),left:Math.round(B.left),placement:B.placement,arrow:B.x||B.y?{x:B.x,y:B.y}:void 0})},[o,t]);v.useEffect(()=>{if(!A)return;const F=n.current,D=r.current;if(!F||!D)return;w();const B=()=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>w())},$=()=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>w())};window.addEventListener("scroll",B,!0),window.addEventListener("resize",$);let J=null,G=null;try{typeof ResizeObserver<"u"&&(J=new ResizeObserver($),G=new ResizeObserver($),J.observe(F),G.observe(D))}catch{J=G=null}return()=>{window.removeEventListener("scroll",B,!0),window.removeEventListener("resize",$),J&&J.disconnect(),G&&G.disconnect(),a.current&&cancelAnimationFrame(a.current)}},[A,w]);const L=v.useCallback(F=>{n.current=F},[]),H=v.useCallback(F=>{r.current=F},[]),f=v.useRef(`floating-${Math.random().toString(36).slice(2,9)}`),P=()=>r.current?Array.from(r.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')).filter(Boolean):[],R=F=>{const D=P();if(!D.length)return;const B=Math.max(0,Math.min(D.length-1,F));try{D[B].focus()}catch{}},S=()=>R(0),T=()=>{const F=P();F.length&&R(F.length-1)},q=()=>{const F=P(),D=F.findIndex(B=>B===document.activeElement);R(D<0?0:(D+1)%F.length)},x=()=>{const F=P(),D=F.findIndex(B=>B===document.activeElement);R(D<=0?F.length-1:D-1)};return{referenceRef:L,floatingRef:H,coords:m,update:w,open:A,setOpen:d,toggle:E,openPopup:e,closePopup:c,getReferenceProps:(F={})=>({ref:L,"aria-haspopup":b,"aria-controls":f.current,"aria-expanded":A?"true":"false",onClick:D=>{F.onClick&&F.onClick(D),E()},onKeyDown:D=>{F.onKeyDown&&F.onKeyDown(D),D.key==="ArrowDown"&&(D.preventDefault(),e(),setTimeout(()=>S(),0))},...F}),getFloatingProps:(F={})=>({id:f.current,ref:H,role:b,tabIndex:-1,style:{position:"absolute",top:`${m.top}px`,left:`${m.left}px`},hidden:!A,onKeyDown:D=>{F.onKeyDown&&F.onKeyDown(D),D.key==="Escape"?(D.preventDefault(),c()):D.key==="ArrowDown"?(D.preventDefault(),q()):D.key==="ArrowUp"?(D.preventDefault(),x()):D.key==="Home"?(D.preventDefault(),S()):D.key==="End"&&(D.preventDefault(),T())},...F}),focusFirstItem:S,focusLastItem:T,focusNext:q,focusPrev:x}}function U(h){if(h!=null){if(typeof h=="object")try{return JSON.stringify(h)}catch{return}return String(h)}}function Zt(h){const{children:o,className:t,variant:l,tone:i,elevation:s,radius:b,interactive:n,headless:r,p:a,px:m,py:u,pt:y,pr:p,pb:g,pl:A,m:d,mx:E,my:e,mt:c,mr:w,mb:L,ml:H,width:f,w:P,minWidth:R,minW:S,maxWidth:T,maxW:q,height:x,h:k,minHeight:K,minH:F,maxHeight:D,maxH:B,display:$,position:J,inset:G,top:M,right:_,bottom:I,left:Q,flexBasis:j,flexGrow:Z,flexShrink:Y,gridArea:re,gridColumn:ie,gridColumnStart:C,gridColumnEnd:z,gridRow:le,gridRowStart:W,gridRowEnd:X,align:yt,bg:Lt,color:gt,...ht}=h,wt={className:t,...ht,p:U(a),px:U(m),py:U(u),pt:U(y),pr:U(p),pb:U(g),pl:U(A),m:U(d),mx:U(E),my:U(e),mt:U(c),mr:U(w),mb:U(L),ml:U(H),width:U(f),w:U(P),minwidth:U(R??S),maxwidth:U(T??q),height:U(x),h:U(k),minheight:U(K??F),maxheight:U(D??B),display:U($),position:U(J),inset:U(G),top:U(M),right:U(_),bottom:U(I),left:U(Q),flexbasis:U(j),flexgrow:U(Z),flexshrink:U(Y),gridarea:U(re),gridcolumn:U(ie),gridcolumnstart:U(C),gridcolumnend:U(z),gridrow:U(le),gridrowstart:U(W),gridrowend:U(X),align:U(yt),bg:U(Lt),color:U(gt),variant:l&&l!=="default"?l:void 0,tone:i&&i!=="default"?i:void 0,elevation:s&&s!=="default"?s:void 0,radius:b&&b!=="default"?b:void 0,interactive:n?"":void 0,headless:r?"":void 0};return N.default.createElement("ui-box",wt,o)}function te(h){if(h!=null){if(typeof h=="object")try{return JSON.stringify(h)}catch{return}return String(h)}}function zt(h){const{children:o,className:t,direction:l,align:i,justify:s,wrap:b,gap:n,rowGap:r,columnGap:a,display:m,headless:u,...y}=h,p={className:t,...y,direction:te(l),align:te(i),justify:te(s),wrap:te(b),gap:te(n),rowgap:te(r),columngap:te(a),display:te(m),headless:u?"":void 0};return N.default.createElement("ui-flex",p,o)}function O(h){if(h!=null){if(typeof h=="object")try{return JSON.stringify(h)}catch{return}return String(h)}}function Wt(h){const{children:o,className:t,columns:l,rows:i,gap:s,rowGap:b,columnGap:n,autoFlow:r,autoRows:a,autoColumns:m,align:u,justify:y,place:p,alignContent:g,justifyContent:A,placeContent:d,display:E,headless:e,...c}=h,w={className:t,...c,columns:O(l),rows:O(i),gap:O(s),rowgap:O(b),columngap:O(n),autoflow:O(r),autorows:O(a),autocolumns:O(m),align:O(u),justify:O(y),place:O(p),aligncontent:O(g),justifycontent:O(A),placecontent:O(d),display:O(E),headless:e?"":void 0};return N.default.createElement("ui-grid",w,o)}const je=N.default.forwardRef(function({size:o="medium",variant:t="default",tone:l="neutral",radius:i="md",density:s="comfortable",inset:b,children:n,...r},a){const m=v.useRef(null);return N.default.useImperativeHandle(a,()=>m.current),v.useEffect(()=>{const u=m.current;if(!u)return;const y=(g,A)=>{const d=u.getAttribute(g);if(A==null){d!=null&&u.removeAttribute(g);return}d!==A&&u.setAttribute(g,A)},p=(g,A)=>{A?u.hasAttribute(g)||u.setAttribute(g,""):u.hasAttribute(g)&&u.removeAttribute(g)};y("size",o!=="medium"?o:null),y("variant",t!=="default"?t:null),y("tone",l!=="neutral"?l:null),y("radius",i!=="md"?i:null),y("density",s!=="comfortable"?s:null),p("inset",b)},[o,t,l,i,s,b]),N.default.createElement("ui-section",{ref:m,...r},n)});je.displayName="Section";function Ot(h){const{children:o,size:t="md",...l}=h;return N.default.createElement("ui-container",{size:t,...l},o)}const Ge=N.default.forwardRef(function({children:o,collapsed:t,collapsible:l,rail:i,position:s,value:b,items:n,variant:r,size:a,density:m,tone:u,showIcons:y,showBadges:p,headless:g,onSelect:A,onChange:d,onToggle:E,onCollapseChange:e,...c},w){const L=v.useRef(null);return v.useImperativeHandle(w,()=>L.current),v.useEffect(()=>{const H=L.current;if(!H)return;const f=T=>{const q=T.detail;q&&(A==null||A(q))},P=T=>{const q=T.detail;q&&(d==null||d(q))},R=T=>{var x;const q=(x=T.detail)==null?void 0:x.collapsed;typeof q=="boolean"&&(E==null||E(q))},S=T=>{var x;const q=(x=T.detail)==null?void 0:x.collapsed;typeof q=="boolean"&&(e==null||e(q))};return H.addEventListener("select",f),H.addEventListener("change",P),H.addEventListener("toggle",R),H.addEventListener("collapse-change",S),()=>{H.removeEventListener("select",f),H.removeEventListener("change",P),H.removeEventListener("toggle",R),H.removeEventListener("collapse-change",S)}},[A,d,E,e]),v.useEffect(()=>{const H=L.current;if(!H)return;const f=(R,S)=>{const T=H.getAttribute(R);if(S==null){T!=null&&H.removeAttribute(R);return}T!==S&&H.setAttribute(R,S)},P=(R,S,T)=>{if(S==null){T!==void 0&&T===!1&&f(R,null);return}S?f(R,""):f(R,null)};if(P("collapsed",t),P("collapsible",l),P("rail",i),P("headless",g),f("position",s&&s!=="left"?s:null),f("value",b!=null&&b!==""?String(b):null),n&&n.length)try{f("items",JSON.stringify(n))}catch{f("items",null)}else f("items",null);f("variant",r&&r!=="surface"?r:null),f("size",a&&a!=="md"?a:null),f("density",m&&m!=="default"?m:null),f("tone",u&&u!=="default"?u:null),typeof y=="boolean"?f("show-icons",y?"true":"false"):f("show-icons",null),typeof p=="boolean"?f("show-badges",p?"true":"false"):f("show-badges",null)},[t,l,i,g,s,b,n,r,a,m,u,y,p]),N.default.createElement("ui-sidebar",{ref:L,...c},o)});Ge.displayName="Sidebar";const _e=N.default.forwardRef(function({children:o,separator:t,maxItems:l,onSelect:i,...s},b){const n=v.useRef(null);return v.useImperativeHandle(b,()=>n.current),v.useEffect(()=>{const r=n.current;if(!r||!i)return;const a=m=>{const u=m.detail;u&&i(u)};return r.addEventListener("select",a),()=>r.removeEventListener("select",a)},[i]),v.useEffect(()=>{const r=n.current;r&&(t!=null&&t!==""?r.setAttribute("separator",t):r.removeAttribute("separator"))},[t]),v.useEffect(()=>{const r=n.current;r&&(typeof l=="number"&&Number.isFinite(l)?r.setAttribute("max-items",String(l)):r.removeAttribute("max-items"))},[l]),N.default.createElement("ui-breadcrumb",{ref:n,...s},o)});_e.displayName="Breadcrumb";const Me=N.default.forwardRef(function({children:o,sticky:t,bordered:l,dense:i,showMenuButton:s,onMenuTrigger:b,...n},r){const a=v.useRef(null);return v.useImperativeHandle(r,()=>a.current),v.useEffect(()=>{const m=a.current;if(!m||!b)return;const u=()=>b();return m.addEventListener("menu-trigger",u),()=>m.removeEventListener("menu-trigger",u)},[b]),v.useEffect(()=>{const m=a.current;m&&(t?m.setAttribute("sticky",""):m.removeAttribute("sticky"))},[t]),v.useEffect(()=>{const m=a.current;m&&(l?m.setAttribute("bordered",""):m.removeAttribute("bordered"))},[l]),v.useEffect(()=>{const m=a.current;m&&(i?m.setAttribute("dense",""):m.removeAttribute("dense"))},[i]),v.useEffect(()=>{const m=a.current;m&&(s?m.setAttribute("show-menu-button",""):m.removeAttribute("show-menu-button"))},[s]),N.default.createElement("ui-app-header",{ref:a,...n},o)});Me.displayName="AppHeader";const Qe=N.default.forwardRef(function({children:o,open:t,side:l,variant:i,density:s,shape:b,elevation:n,tone:r,size:a,inset:m,dismissible:u,onOpen:y,onClose:p,onChange:g,...A},d){const E=v.useRef(null);return v.useImperativeHandle(d,()=>E.current),v.useEffect(()=>{const e=E.current;if(!e)return;const c=()=>y==null?void 0:y(),w=()=>p==null?void 0:p(),L=H=>{var P;const f=(P=H.detail)==null?void 0:P.open;typeof f=="boolean"&&(g==null||g(f))};return e.addEventListener("open",c),e.addEventListener("close",w),e.addEventListener("change",L),()=>{e.removeEventListener("open",c),e.removeEventListener("close",w),e.removeEventListener("change",L)}},[y,p,g]),v.useEffect(()=>{const e=E.current;e&&(t?e.setAttribute("open",""):e.removeAttribute("open"))},[t]),v.useEffect(()=>{const e=E.current;e&&(l?e.setAttribute("side",l):e.removeAttribute("side"))},[l]),v.useEffect(()=>{const e=E.current;e&&(u?e.setAttribute("dismissible",""):e.removeAttribute("dismissible"))},[u]),v.useEffect(()=>{const e=E.current;e&&(i&&i!=="default"?e.setAttribute("variant",i):e.removeAttribute("variant"))},[i]),v.useEffect(()=>{const e=E.current;e&&(s&&s!=="default"?e.setAttribute("density",s):e.removeAttribute("density"))},[s]),v.useEffect(()=>{const e=E.current;e&&(b&&b!=="default"?e.setAttribute("shape",b):e.removeAttribute("shape"))},[b]),v.useEffect(()=>{const e=E.current;e&&(n&&n!=="default"?e.setAttribute("elevation",n):e.removeAttribute("elevation"))},[n]),v.useEffect(()=>{const e=E.current;e&&(r&&r!=="default"&&r!=="brand"?e.setAttribute("tone",r):e.removeAttribute("tone"))},[r]),v.useEffect(()=>{const e=E.current;e&&(a&&a!=="default"?e.setAttribute("size",a):e.removeAttribute("size"))},[a]),v.useEffect(()=>{const e=E.current;e&&(m?e.setAttribute("inset",""):e.removeAttribute("inset"))},[m]),N.default.createElement("ui-drawer",{ref:E,...A},o)});Qe.displayName="Drawer";const Ie=N.default.forwardRef(function({children:o,mode:t,variant:l,density:i,maxWidth:s,sidebarSide:b,collapsed:n,headless:r,sidebarWidth:a,asideWidth:m,onLayoutChange:u,...y},p){const g=v.useRef(null);return N.default.useImperativeHandle(p,()=>g.current),v.useEffect(()=>{const A=g.current;if(!A)return;const d=()=>u==null?void 0:u();return A.addEventListener("layoutchange",d),()=>A.removeEventListener("layoutchange",d)},[u]),v.useEffect(()=>{const A=g.current;A&&(t&&t!=="dashboard"?A.setAttribute("mode",t):A.removeAttribute("mode"),l&&l!=="default"?A.setAttribute("variant",l):A.removeAttribute("variant"),i&&i!=="default"?A.setAttribute("density",i):A.removeAttribute("density"),s?A.setAttribute("max-width",s):A.removeAttribute("max-width"),b&&b!=="start"?A.setAttribute("sidebar-side",b):A.removeAttribute("sidebar-side"),n?A.setAttribute("collapsed",""):A.removeAttribute("collapsed"),r?A.setAttribute("headless",""):A.removeAttribute("headless"),a?A.setAttribute("sidebar-width",a):A.removeAttribute("sidebar-width"),m?A.setAttribute("aside-width",m):A.removeAttribute("aside-width"))},[t,l,i,s,b,n,r,a,m]),N.default.createElement("ui-layout",{ref:g,...y},o)});Ie.displayName="Layout";const Ke=v.createContext(null);function Vt(){try{const h=getComputedStyle(document.documentElement),o=h.getPropertyValue("--ui-color-primary").trim();return o?{colors:{primary:o||void 0,text:h.getPropertyValue("--ui-color-text").trim()||void 0,background:h.getPropertyValue("--ui-color-background").trim()||void 0}}:{}}catch{return{}}}function Ct({tokens:h,children:o,storageKey:t="editora.theme.tokens"}){const l=()=>{if(typeof window<"u"&&t)try{const n=localStorage.getItem(t);if(n)return JSON.parse(n)}catch{}if(h&&Object.keys(h).length)return{...V.defaultTokens,...h};if(typeof window<"u"){const n=Vt();if(n.colors&&n.colors.primary)return{...V.defaultTokens,...n}}return{...V.defaultTokens,...h||{}}},[i,s]=v.useState(()=>l());v.useEffect(()=>{h&&Object.keys(h).length&&s(n=>({...n,...h}))},[h]),v.useEffect(()=>{V.applyTheme(i);try{V.registerThemeHost(document.documentElement)}catch{}if(typeof window<"u"&&t){const n=JSON.stringify(i);let r;const a=()=>{try{localStorage.setItem(t,n)}catch{}};return window.requestIdleCallback?r=window.requestIdleCallback(a,{timeout:1e3}):r=window.setTimeout(a,250),()=>{try{window.cancelIdleCallback&&r?window.cancelIdleCallback(r):r&&clearTimeout(r)}catch{}}}},[i,t]);const b=n=>s(n);return N.default.createElement(Ke.Provider,{value:{tokens:i,setTokens:b}},o)}function er(){const h=v.useContext(Ke);if(!h)throw new Error("useTheme must be used within ThemeProvider");return h}function ne(h,o,t){if(t==null){h.removeAttribute(o);return}t?h.setAttribute(o,""):h.removeAttribute(o)}function se(h,o,t,l){const i=t&&t!==l?t:void 0;if(!i){h.removeAttribute(o);return}h.setAttribute(o,i)}const Ue=N.forwardRef(function({checked:o,disabled:t,indeterminate:l,loading:i,headless:s,invalid:b,density:n,preset:r,onCheckedChange:a,onChange:m,onInput:u,children:y,...p},g){const A=N.useRef(null);N.useImperativeHandle(g,()=>A.current);const d=typeof window<"u"?N.useLayoutEffect:N.useEffect;N.useEffect(()=>{ee("ui-checkbox","Checkbox")},[]),d(()=>{const e=A.current;e&&(ne(e,"checked",o),ne(e,"disabled",t),ne(e,"indeterminate",l),ne(e,"loading",i),ne(e,"headless",s),ne(e,"invalid",b),se(e,"density",n,"default"),se(e,"preset",r,"default"))},[o,t,l,i,s,b,n,r]),N.useEffect(()=>{const e=A.current;if(!e||!a&&!m&&!u)return;const c=L=>{var f;const H=L;u==null||u(H),typeof((f=H.detail)==null?void 0:f.checked)=="boolean"&&(a==null||a(H.detail.checked,H.detail))},w=L=>{const H=L;m==null||m(H)};return e.addEventListener("input",c),e.addEventListener("change",w),()=>{e.removeEventListener("input",c),e.removeEventListener("change",w)}},[a,m,u]);const E={ref:A,...p,checked:o?"":void 0,disabled:t?"":void 0,indeterminate:l?"":void 0,loading:i?"":void 0,headless:s?"":void 0,invalid:b?"":void 0,density:n&&n!=="default"?n:void 0,preset:r&&r!=="default"?r:void 0};return N.createElement("ui-checkbox",E,y)});Ue.displayName="Checkbox";const Xe=N.default.forwardRef(function({value:o,disabled:t,required:l,name:i,orientation:s,variant:b,size:n,tone:r,options:a,onValueChange:m,children:u,...y},p){const g=v.useRef(null);return N.default.useImperativeHandle(p,()=>g.current),v.useEffect(()=>{const A=g.current;if(!A)return;const d=E=>{const e=E.detail;e&&(m==null||m(e))};return A.addEventListener("change",d),()=>A.removeEventListener("change",d)},[m]),v.useEffect(()=>{const A=g.current;if(!A)return;const d=(e,c)=>{const w=A.getAttribute(e);if(c==null){w!=null&&A.removeAttribute(e);return}w!==c&&A.setAttribute(e,c)},E=(e,c)=>{c?A.hasAttribute(e)||A.setAttribute(e,""):A.hasAttribute(e)&&A.removeAttribute(e)};d("value",o??null),E("disabled",t),E("required",l),d("name",i||null),d("orientation",s&&s!=="vertical"?s:null),d("variant",b&&b!=="default"?b:null),d("size",n&&n!=="md"?n:null),d("tone",r&&r!=="brand"?r:null),a&&a.length?d("options",JSON.stringify(a)):d("options",null)},[o,t,l,i,s,b,n,r,a]),N.default.createElement("ui-radio-group",{ref:g,...y},u)});Xe.displayName="RadioGroup";const Ye=N.default.forwardRef(function({children:o,checked:t,disabled:l,headless:i,loading:s,size:b,variant:n,tone:r,label:a,description:m,name:u,value:y,required:p,onInput:g,onChange:A,...d},E){const e=v.useRef(null);return v.useImperativeHandle(E,()=>e.current),v.useEffect(()=>{const c=e.current;if(!c)return;const w=H=>{const f=H.detail;f&&(g==null||g(f))},L=H=>{const f=H.detail;f&&(A==null||A(f))};return c.addEventListener("input",w),c.addEventListener("change",L),()=>{c.removeEventListener("input",w),c.removeEventListener("change",L)}},[g,A]),v.useEffect(()=>{const c=e.current;if(!c)return;const w=(H,f)=>{const P=c.getAttribute(H);if(f==null){P!=null&&c.removeAttribute(H);return}P!==f&&c.setAttribute(H,f)},L=(H,f)=>{f?w(H,""):w(H,null)};L("checked",t),L("disabled",l),L("headless",i),L("loading",s),L("required",p),w("size",b&&b!=="md"?b:null),w("variant",n&&n!=="default"?n:null),w("tone",r&&r!=="brand"?r:null),w("label",a||null),w("description",m||null),w("name",u||null),w("value",y||null)},[t,l,i,s,p,b,n,r,a,m,u,y]),N.default.createElement("ui-switch",{ref:e,...d},o)});Ye.displayName="Switch";const Ze=N.default.forwardRef(function({children:o,pressed:t,disabled:l,loading:i,headless:s,size:b,variant:n,tone:r,name:a,value:m,required:u,iconOn:y,iconOff:p,onInput:g,onChange:A,...d},E){const e=v.useRef(null);return v.useImperativeHandle(E,()=>e.current),v.useEffect(()=>{const c=e.current;if(!c)return;const w=H=>{const f=H.detail;f&&(g==null||g(f))},L=H=>{const f=H.detail;f&&(A==null||A(f))};return c.addEventListener("input",w),c.addEventListener("change",L),()=>{c.removeEventListener("input",w),c.removeEventListener("change",L)}},[g,A]),v.useEffect(()=>{const c=e.current;if(!c)return;const w=(H,f)=>{const P=c.getAttribute(H);if(f==null){P!=null&&c.removeAttribute(H);return}P!==f&&c.setAttribute(H,f)},L=(H,f)=>{f?w(H,""):w(H,null)};L("pressed",t),L("disabled",l),L("loading",i),L("headless",s),L("required",u),w("size",b&&b!=="md"?b:null),w("variant",n&&n!=="default"?n:null),w("tone",r&&r!=="brand"?r:null),w("name",a||null),w("value",m||null),w("icon-on",y||null),w("icon-off",p||null)},[t,l,i,s,u,b,n,r,a,m,y,p]),N.default.createElement("ui-toggle",{ref:e,...d},o)});Ze.displayName="Toggle";const ze=N.default.forwardRef(function({children:o,value:t,multiple:l,disabled:i,headless:s,orientation:b,variant:n,size:r,density:a,allowEmpty:m,required:u,activation:y,onInput:p,onChange:g,onValueChange:A,...d},E){const e=v.useRef(null);return v.useImperativeHandle(E,()=>e.current),v.useEffect(()=>{const c=e.current;if(!c)return;const w=H=>{const f=H.detail;f&&(p==null||p(f),A==null||A(f))},L=H=>{const f=H.detail;f&&(g==null||g(f),A==null||A(f))};return c.addEventListener("input",w),c.addEventListener("change",L),()=>{c.removeEventListener("input",w),c.removeEventListener("change",L)}},[p,g,A]),v.useEffect(()=>{const c=e.current;if(!c)return;const w=(H,f)=>{const P=c.getAttribute(H);if(f==null){P!=null&&c.removeAttribute(H);return}P!==f&&c.setAttribute(H,f)},L=(H,f)=>{f?w(H,""):w(H,null)};L("multiple",l),L("disabled",i),L("headless",s),L("allow-empty",m),L("required",u),t==null?w("value",null):Array.isArray(t)?w("value",JSON.stringify(t)):w("value",String(t)),w("orientation",b&&b!=="horizontal"?b:null),w("variant",n&&n!=="default"?n:null),w("size",r&&r!=="md"?r:null),w("density",a&&a!=="default"?a:null),w("activation",y&&y!=="auto"?y:null)},[t,l,i,s,m,u,b,n,r,a,y]),N.default.createElement("ui-toggle-group",{ref:e,...d},o)});ze.displayName="ToggleGroup";function tr(h){if(h!=null){if(typeof h=="string")return h;if(!(!Number.isFinite(h)||h<=0))return Math.abs(h-16/9)<.01?"16/9":Math.abs(h-4/3)<.01?"4/3":Math.abs(h-1)<.01?"1/1":`${h}/1`}}const We=N.forwardRef(function({ratio:o,fit:t,children:l,...i},s){const b=N.useRef(null);return N.useImperativeHandle(s,()=>b.current),N.useEffect(()=>{ee("ui-aspect-ratio","AspectRatio")},[]),N.useEffect(()=>{const n=b.current;if(!n)return;const r=tr(o);r?n.setAttribute("ratio",r):n.removeAttribute("ratio"),t?n.setAttribute("fit",t):n.removeAttribute("fit")},[o,t]),N.createElement("ui-aspect-ratio",{ref:b,...i},l)});We.displayName="AspectRatio";function ce(h){const o=h.trim().split(/\s+/).filter(Boolean);return o.length===0?"?":o.length===1?o[0].slice(0,2).toUpperCase():`${o[0][0]||""}${o[1][0]||""}`.toUpperCase()}function rr(h){if(h!=null)return h==="lazy"||h==="eager"?h:h?"eager":"lazy"}function ir(h,o,t){return h&&h.trim()?h.trim().slice(0,2).toUpperCase():o&&o.trim()?ce(o):typeof t=="string"&&t.trim()?ce(t):"?"}const Oe=N.forwardRef(function({src:o,alt:t,initials:l,size:i,bg:s,color:b,radius:n,fontWeight:r,shape:a,status:m,ring:u,loading:y,children:p,...g},A){const d=N.useRef(null),E=N.useMemo(()=>ir(l,t,p),[l,t,p]);return N.useImperativeHandle(A,()=>d.current),N.useEffect(()=>{ee("ui-avatar","Avatar")},[]),N.useEffect(()=>{const e=d.current;if(!e)return;o?e.setAttribute("src",o):e.removeAttribute("src"),t?e.setAttribute("alt",t):e.removeAttribute("alt"),l?e.setAttribute("initials",l):e.removeAttribute("initials"),i!=null?e.setAttribute("size",String(i)):e.removeAttribute("size"),s?e.setAttribute("bg",s):e.removeAttribute("bg"),b?e.setAttribute("color",b):e.removeAttribute("color"),n?e.setAttribute("radius",n):e.removeAttribute("radius"),r!=null?e.setAttribute("fontweight",String(r)):e.removeAttribute("fontweight"),a?e.setAttribute("shape",a):e.removeAttribute("shape"),m?e.setAttribute("status",m):e.removeAttribute("status"),u==null?e.removeAttribute("ring"):u?e.setAttribute("ring",""):e.removeAttribute("ring");const c=rr(y);c?e.setAttribute("loading",c):e.removeAttribute("loading")},[o,t,l,i,s,b,n,r,a,m,u,y]),N.createElement("ui-avatar",{ref:d,...g},E)});Oe.displayName="Avatar";const Ve=N.default.forwardRef(function({present:o,headless:t,mode:l,size:i,variant:s,keepMounted:b,lazy:n,enterDuration:r,exitDuration:a,delay:m,onBeforeEnter:u,onEnter:y,onAfterEnter:p,onBeforeExit:g,onExit:A,onAfterExit:d,children:E,...e},c){const w=v.useRef(null);return N.default.useImperativeHandle(c,()=>w.current),v.useEffect(()=>{const L=w.current;if(!L)return;const H=x=>{const k=x.detail;return(k==null?void 0:k.state)||"hidden"},f=x=>u==null?void 0:u(H(x)),P=x=>y==null?void 0:y(H(x)),R=x=>p==null?void 0:p(H(x)),S=x=>g==null?void 0:g(H(x)),T=x=>A==null?void 0:A(H(x)),q=x=>d==null?void 0:d(H(x));return L.addEventListener("before-enter",f),L.addEventListener("enter",P),L.addEventListener("after-enter",R),L.addEventListener("before-exit",S),L.addEventListener("exit",T),L.addEventListener("after-exit",q),()=>{L.removeEventListener("before-enter",f),L.removeEventListener("enter",P),L.removeEventListener("after-enter",R),L.removeEventListener("before-exit",S),L.removeEventListener("exit",T),L.removeEventListener("after-exit",q)}},[u,y,p,g,A,d]),v.useEffect(()=>{const L=w.current;L&&(o?L.setAttribute("present",""):L.removeAttribute("present"),t?L.setAttribute("headless",""):L.removeAttribute("headless"),l&&l!=="fade"?L.setAttribute("mode",l):L.removeAttribute("mode"),i&&i!=="md"?L.setAttribute("size",i):L.removeAttribute("size"),s&&s!=="default"?L.setAttribute("variant",s):L.removeAttribute("variant"),b?L.setAttribute("keep-mounted",""):L.removeAttribute("keep-mounted"),n?L.setAttribute("lazy",""):L.removeAttribute("lazy"),typeof r=="number"?L.setAttribute("enter-duration",String(r)):L.removeAttribute("enter-duration"),typeof a=="number"?L.setAttribute("exit-duration",String(a)):L.removeAttribute("exit-duration"),typeof m=="number"?L.setAttribute("delay",String(m)):L.removeAttribute("delay"))},[o,t,l,i,s,b,n,r,a,m]),N.default.createElement("ui-presence",{ref:w,...e},E)});Ve.displayName="Presence";const Ce=N.default.forwardRef(function({value:o,buffer:t,max:l,min:i,indeterminate:s,striped:b,animated:n,showLabel:r,label:a,format:m,precision:u,size:y,variant:p,tone:g,shape:A,mode:d,onValueChange:E,onComplete:e,children:c,...w},L){const H=v.useRef(null);return N.default.useImperativeHandle(L,()=>H.current),v.useEffect(()=>{const f=H.current;if(!f)return;const P=S=>{const T=S.detail;T&&(E==null||E(T))},R=S=>{const T=S.detail;T&&(e==null||e(T))};return f.addEventListener("change",P),f.addEventListener("complete",R),()=>{f.removeEventListener("change",P),f.removeEventListener("complete",R)}},[E,e]),v.useEffect(()=>{const f=H.current;if(!f)return;const P=(S,T)=>{const q=f.getAttribute(S);if(T==null){q!=null&&f.removeAttribute(S);return}q!==T&&f.setAttribute(S,T)},R=(S,T)=>{T?f.hasAttribute(S)||f.setAttribute(S,""):f.hasAttribute(S)&&f.removeAttribute(S)};P("value",o!=null?String(o):null),P("buffer",t!=null?String(t):null),P("max",l!=null?String(l):null),P("min",i!=null?String(i):null),R("indeterminate",s),R("striped",b),R("animated",n),R("show-label",r),P("label",a!=null&&a!==""?a:null),P("format",m!=null&&m!=="percent"?m:null),P("precision",u!=null?String(u):null),P("size",y&&y!=="md"?y:null),P("variant",p&&p!=="default"?p:null),P("tone",g&&g!=="brand"?g:null),P("shape",A&&A!=="pill"?A:null),P("mode",d&&d!=="line"?d:null)},[o,t,l,i,s,b,n,r,a,m,u,y,p,g,A,d]),N.default.createElement("ui-progress",{ref:H,...w},c)});Ce.displayName="Progress";const et=N.default.forwardRef(function({target:o,headless:t,disabled:l,strategy:i,onMount:s,onUnmount:b,onSync:n,onTargetMissing:r,children:a,...m},u){const y=v.useRef(null);return N.default.useImperativeHandle(u,()=>y.current),v.useEffect(()=>{const p=y.current;if(!p)return;const g=e=>s==null?void 0:s(e.detail||{count:0}),A=e=>b==null?void 0:b(e.detail||{count:0}),d=e=>n==null?void 0:n(e.detail||{count:0}),E=e=>{const c=e.detail;c&&(r==null||r(c))};return p.addEventListener("mount",g),p.addEventListener("unmount",A),p.addEventListener("sync",d),p.addEventListener("target-missing",E),()=>{p.removeEventListener("mount",g),p.removeEventListener("unmount",A),p.removeEventListener("sync",d),p.removeEventListener("target-missing",E)}},[s,b,n,r]),v.useEffect(()=>{const p=y.current;p&&(o?p.setAttribute("target",o):p.removeAttribute("target"),i&&i!=="append"?p.setAttribute("strategy",i):p.removeAttribute("strategy"),t?p.setAttribute("headless",""):p.removeAttribute("headless"),l?p.setAttribute("disabled",""):p.removeAttribute("disabled"))},[o,i,t,l]),N.default.createElement("ui-portal",{ref:y,...m},a)});et.displayName="Portal";const tt=N.default.forwardRef(function({orientation:o,size:t,variant:l,tone:i,autoHide:s,shadows:b,onScrollChange:n,onReachStart:r,onReachEnd:a,children:m,...u},y){const p=v.useRef(null);return N.default.useImperativeHandle(y,()=>p.current),v.useEffect(()=>{const g=p.current;if(!g)return;const A=e=>{const c=e.detail;c&&(n==null||n(c))},d=()=>r==null?void 0:r(),E=()=>a==null?void 0:a();return g.addEventListener("scroll",A),g.addEventListener("reach-start",d),g.addEventListener("reach-end",E),()=>{g.removeEventListener("scroll",A),g.removeEventListener("reach-start",d),g.removeEventListener("reach-end",E)}},[n,r,a]),v.useEffect(()=>{const g=p.current;if(!g)return;const A=(E,e)=>{const c=g.getAttribute(E);if(e==null){c!=null&&g.removeAttribute(E);return}c!==e&&g.setAttribute(E,e)},d=(E,e)=>{const c=g.getAttribute(E);if(e==null){c!=null&&g.removeAttribute(E);return}const w=e?"true":"false";c!==w&&g.setAttribute(E,w)};A("orientation",o&&o!=="vertical"?o:null),A("size",t&&t!=="md"?t:null),A("variant",l&&l!=="default"?l:null),A("tone",i&&i!=="neutral"?i:null),d("auto-hide",s),d("shadows",b)},[o,t,l,i,s,b]),N.default.createElement("ui-scroll-area",{ref:p,...u},m)});tt.displayName="ScrollArea";const rt=N.forwardRef((h,o)=>N.createElement("ui-separator",{ref:o,...h}));rt.displayName="Separator";const it=N.default.forwardRef(function({children:o,name:t,fallback:l,required:i,inline:s,align:b,size:n,variant:r,tone:a,headless:m,onSlotChange:u,onMissing:y,onResolved:p,...g},A){const d=v.useRef(null);return v.useImperativeHandle(A,()=>d.current),v.useEffect(()=>{const E=d.current;if(!E)return;const e=L=>{const H=L.detail;H&&(u==null||u(H))},c=()=>y==null?void 0:y(),w=()=>p==null?void 0:p();return E.addEventListener("slotchange",e),E.addEventListener("missing",c),E.addEventListener("resolved",w),()=>{E.removeEventListener("slotchange",e),E.removeEventListener("missing",c),E.removeEventListener("resolved",w)}},[u,y,p]),v.useEffect(()=>{const E=d.current;if(!E)return;const e=(w,L)=>{const H=E.getAttribute(w);if(L==null){H!=null&&E.removeAttribute(w);return}H!==L&&E.setAttribute(w,L)},c=(w,L)=>{L?e(w,""):e(w,null)};e("name",t||null),e("fallback",l||null),c("required",i),typeof s=="boolean"?e("inline",s?"true":"false"):e("inline",null),e("align",b&&b!=="start"?b:null),e("size",n&&n!=="md"?n:null),e("variant",r&&r!=="plain"?r:null),e("tone",a&&a!=="brand"?a:null),c("headless",m)},[t,l,i,s,b,n,r,a,m]),N.default.createElement("ui-slot",{ref:d,...g},o)});it.displayName="Slot";const nt=N.default.forwardRef(function({children:o,orientation:t,variant:l,size:i,density:s,wrap:b,loop:n,headless:r,...a},m){const u=v.useRef(null);return v.useImperativeHandle(m,()=>u.current),v.useEffect(()=>{const y=u.current;if(!y)return;const p=(A,d)=>{const E=y.getAttribute(A);if(d==null){E!=null&&y.removeAttribute(A);return}E!==d&&y.setAttribute(A,d)},g=(A,d)=>{d?p(A,""):p(A,null)};p("orientation",t&&t!=="horizontal"?t:null),p("variant",l&&l!=="default"?l:null),p("size",i&&i!=="md"?i:null),p("density",s&&s!=="default"?s:null),g("wrap",b),typeof n=="boolean"?g("loop",n):p("loop",null),g("headless",r)},[t,l,i,s,b,n,r]),N.default.createElement("ui-toolbar",{ref:u,...a},o)});nt.displayName="Toolbar";const lt=N.forwardRef((h,o)=>N.createElement("ui-visually-hidden",{ref:o,...h}));lt.displayName="VisuallyHidden";function oe(h,o,t){if(t==null){h.removeAttribute(o);return}t?h.setAttribute(o,""):h.removeAttribute(o)}function fe(h){var o;return(o=h.detail)==null?void 0:o.open}const ut=N.forwardRef(function({header:o,open:t,headless:l,onToggle:i,onChangeOpen:s,children:b,...n},r){const a=N.useRef(null);N.useImperativeHandle(r,()=>a.current),N.useEffect(()=>{ee("ui-collapsible","Collapsible")},[]),N.useEffect(()=>{const u=a.current;u&&(oe(u,"open",t),oe(u,"headless",l))},[t,l]),N.useEffect(()=>{const u=a.current;if(!u||!i&&!s)return;const y=g=>{const A=fe(g);typeof A=="boolean"&&(i==null||i(A))},p=g=>{const A=fe(g);typeof A=="boolean"&&(s==null||s(A))};return u.addEventListener("toggle",y),u.addEventListener("change",p),()=>{u.removeEventListener("toggle",y),u.removeEventListener("change",p)}},[i,s]);let m=null;return o!=null&&(typeof o=="string"||typeof o=="number"?m=N.createElement("span",{slot:"header"},o):N.isValidElement(o)?m=N.cloneElement(o,{slot:"header"}):m=N.createElement("span",{slot:"header"},o)),N.createElement("ui-collapsible",{ref:a,...n},m,b)});ut.displayName="Collapsible";const st=N.forwardRef((h,o)=>N.createElement("ui-pagination",{ref:o,...h}));st.displayName="Pagination";function nr(h,o,t){if(t==null){h.removeAttribute(o);return}t?h.setAttribute(o,""):h.removeAttribute(o)}function ae(h){var o;return(o=h.detail)==null?void 0:o.open}const ct=N.forwardRef(function({multiple:o,collapsible:t,open:l,onToggle:i,onChangeOpen:s,children:b,...n},r){const a=N.useRef(null);return N.useImperativeHandle(r,()=>a.current),N.useEffect(()=>{ee("ui-accordion","Accordion")},[]),N.useEffect(()=>{const m=a.current;m&&(nr(m,"multiple",o),t==null?m.removeAttribute("collapsible"):m.setAttribute("collapsible",String(!!t)),l==null?m.removeAttribute("open"):m.setAttribute("open",Array.isArray(l)?JSON.stringify(l):String(l)))},[o,t,l]),N.useEffect(()=>{const m=a.current;if(!m||!i&&!s)return;const u=p=>{const g=ae(p);g!=null&&(i==null||i(g))},y=p=>{const g=ae(p);g!=null&&(s==null||s(g))};return m.addEventListener("toggle",u),m.addEventListener("change",y),()=>{m.removeEventListener("toggle",u),m.removeEventListener("change",y)}},[i,s]),N.createElement("ui-accordion",{ref:a,...n},b)});ct.displayName="Accordion";const ot=N.forwardRef(function({disabled:o,children:t,...l},i){const s={ref:i,"data-ui-accordion-item":"",...l};return o&&(s.disabled=!0),N.createElement("div",s,t)});ot.displayName="AccordionItem";const ft=N.forwardRef(function({type:o,children:t,...l},i){return N.createElement("button",{ref:i,type:o||"button","data-ui-accordion-trigger":"",...l},t)});ft.displayName="AccordionTrigger";const at=N.forwardRef(function({children:o,...t},l){return N.createElement("div",{ref:l,"data-ui-accordion-panel":"",...t},o)});at.displayName="AccordionPanel";const dt=N.forwardRef((h,o)=>N.createElement("ui-direction-provider",{ref:o,...h}));dt.displayName="DirectionProvider";const bt=N.default.forwardRef(function({children:o,open:t,delay:l,closeDelay:i,placement:s,offset:b,variant:n,tone:r,density:a,shape:m,elevation:u,headless:y,onOpen:p,onClose:g,onChange:A,...d},E){const e=v.useRef(null);return v.useImperativeHandle(E,()=>e.current),v.useEffect(()=>{const c=e.current;if(!c)return;const w=()=>p==null?void 0:p(),L=()=>g==null?void 0:g(),H=f=>{var R;const P=(R=f.detail)==null?void 0:R.open;typeof P=="boolean"&&(A==null||A(P))};return c.addEventListener("open",w),c.addEventListener("close",L),c.addEventListener("change",H),()=>{c.removeEventListener("open",w),c.removeEventListener("close",L),c.removeEventListener("change",H)}},[p,g,A]),v.useEffect(()=>{const c=e.current;!c||t==null||(t?c.setAttribute("open",""):c.removeAttribute("open"))},[t]),v.useEffect(()=>{const c=e.current;c&&(typeof l=="number"?c.setAttribute("delay",String(l)):c.removeAttribute("delay"),typeof i=="number"?c.setAttribute("close-delay",String(i)):c.removeAttribute("close-delay"),s?c.setAttribute("placement",s):c.removeAttribute("placement"),typeof b=="number"?c.setAttribute("offset",String(b)):c.removeAttribute("offset"),n&&n!=="default"?c.setAttribute("variant",n):c.removeAttribute("variant"),r&&r!=="default"?c.setAttribute("tone",r):c.removeAttribute("tone"),a&&a!=="default"?c.setAttribute("density",a):c.removeAttribute("density"),m&&m!=="default"?c.setAttribute("shape",m):c.removeAttribute("shape"),u&&u!=="default"?c.setAttribute("elevation",u):c.removeAttribute("elevation"),y?c.setAttribute("headless",""):c.removeAttribute("headless"))},[l,i,s,b,n,r,a,m,u,y]),N.default.createElement("ui-hover-card",{ref:e,...d},o)});bt.displayName="HoverCard";const mt=N.default.forwardRef(function({children:o,htmlFor:t,for:l,required:i,description:s,variant:b,tone:n,size:r,density:a,shape:m,disabled:u,headless:y,...p},g){const A=v.useRef(null);return v.useImperativeHandle(g,()=>A.current),v.useEffect(()=>{const d=A.current;if(!d)return;const E=t||l;E?d.setAttribute("for",E):d.removeAttribute("for"),i?d.setAttribute("required",""):d.removeAttribute("required"),s?d.setAttribute("description",s):d.removeAttribute("description"),b&&b!=="default"?d.setAttribute("variant",b):d.removeAttribute("variant"),n&&n!=="default"?d.setAttribute("tone",n):d.removeAttribute("tone"),r&&r!=="md"&&r!=="2"?d.setAttribute("size",r):d.removeAttribute("size"),a&&a!=="default"?d.setAttribute("density",a):d.removeAttribute("density"),m&&m!=="default"?d.setAttribute("shape",m):d.removeAttribute("shape"),u?d.setAttribute("disabled",""):d.removeAttribute("disabled"),y?d.setAttribute("headless",""):d.removeAttribute("headless")},[t,l,i,s,b,n,r,a,m,u,y]),N.default.createElement("ui-label",{ref:A,...p},o)});mt.displayName="Label";const lr=typeof window<"u"?N.default.useLayoutEffect:N.default.useEffect,vt=N.default.forwardRef(function({children:o,open:t,headless:l,dismissible:i,closeOnEsc:s,closeOnBackdrop:b,lockWhileLoading:n,roleType:r,size:a,state:m,initialFocus:u,dialogId:y,config:p,onOpen:g,onConfirm:A,onCancel:d,onDismiss:E,onClose:e,onChange:c,...w},L){const H=v.useRef(null);return N.default.useImperativeHandle(L,()=>H.current),v.useEffect(()=>{const f=H.current;if(!f)return;const P=k=>g==null?void 0:g(k.detail),R=k=>A==null?void 0:A(k.detail),S=k=>d==null?void 0:d(k.detail),T=k=>E==null?void 0:E(k.detail),q=k=>e==null?void 0:e(k.detail),x=k=>c==null?void 0:c(k.detail);return f.addEventListener("ui-open",P),f.addEventListener("ui-confirm",R),f.addEventListener("ui-cancel",S),f.addEventListener("ui-dismiss",T),f.addEventListener("ui-close",q),f.addEventListener("ui-change",x),()=>{f.removeEventListener("ui-open",P),f.removeEventListener("ui-confirm",R),f.removeEventListener("ui-cancel",S),f.removeEventListener("ui-dismiss",T),f.removeEventListener("ui-close",q),f.removeEventListener("ui-change",x)}},[g,A,d,E,e,c]),lr(()=>{const f=H.current;f&&(typeof t=="boolean"&&(t?f.setAttribute("open",""):f.removeAttribute("open")),l?f.setAttribute("headless",""):f.removeAttribute("headless"),typeof i=="boolean"?f.setAttribute("dismissible",String(i)):f.removeAttribute("dismissible"),typeof s=="boolean"?f.setAttribute("close-on-esc",String(s)):f.removeAttribute("close-on-esc"),typeof b=="boolean"?f.setAttribute("close-on-backdrop",String(b)):f.removeAttribute("close-on-backdrop"),typeof n=="boolean"?f.setAttribute("lock-while-loading",String(n)):f.removeAttribute("lock-while-loading"),r?f.setAttribute("role",r):f.removeAttribute("role"),a&&a!=="md"?f.setAttribute("size",a):f.removeAttribute("size"),m&&m!=="idle"?f.setAttribute("state",m):f.removeAttribute("state"),u?f.setAttribute("initial-focus",u):f.removeAttribute("initial-focus"),y&&(f.dialogId=y),p&&(f.config=p))},[t,l,i,s,b,n,r,a,m,u,y,p]),N.default.createElement("ui-alert-dialog",{ref:H,...w},o)});vt.displayName="AlertDialog";const At=v.createContext(null);function ur({children:h,hostId:o="ui-alert-dialog-react-host"}){const t=v.useRef(null);t.current||(t.current=V.createAlertDialogManager()),v.useEffect(()=>{var s;if(typeof document>"u")return;let i=document.getElementById(o);return i||(i=document.createElement("div"),i.id=o,i.setAttribute("data-ui-alert-dialog-react-host","true"),document.body.appendChild(i)),(s=t.current)==null||s.setContainer(i),()=>{var b;(b=t.current)==null||b.destroy("unmount"),t.current=null,i&&i.parentElement&&i.parentElement.removeChild(i)}},[o]);const l=v.useMemo(()=>({alert:(i={})=>{var s;return((s=t.current)==null?void 0:s.alert(i))??Promise.resolve({id:"",action:"dismiss"})},confirm:(i={})=>{var s;return((s=t.current)==null?void 0:s.confirm(i))??Promise.resolve({id:"",action:"dismiss"})},prompt:(i={})=>{var s;return((s=t.current)==null?void 0:s.prompt(i))??Promise.resolve({id:"",action:"dismiss",value:""})}}),[]);return N.default.createElement(At.Provider,{value:l},h)}function sr(){const h=v.useContext(At);if(!h)throw new Error("useAlertDialog must be used within <AlertDialogProvider>.");return h}const Et=N.default.forwardRef(function({children:o,value:t,disabled:l,required:i,invalid:s,headless:b,placeholder:n,name:r,label:a,description:m,error:u,size:y,variant:p,tone:g,density:A,radius:d,validation:E,onChange:e,onInput:c,onValueChange:w,...L},H){const f=v.useRef(null);return v.useImperativeHandle(H,()=>f.current),v.useEffect(()=>{const P=f.current;if(!P)return;const R=q=>{var x,k;return((x=q.detail)==null?void 0:x.value)??((k=q.target)==null?void 0:k.value)??""},S=q=>{c==null||c(R(q))},T=q=>{const x=R(q);e==null||e(x),w==null||w(x)};return P.addEventListener("input",S),P.addEventListener("change",T),()=>{P.removeEventListener("input",S),P.removeEventListener("change",T)}},[e,c,w]),v.useEffect(()=>{const P=f.current;if(!P)return;const R=(T,q)=>{const x=P.getAttribute(T);if(q==null){x!=null&&P.removeAttribute(T);return}x!==q&&P.setAttribute(T,q)},S=(T,q)=>{q?P.hasAttribute(T)||P.setAttribute(T,""):P.hasAttribute(T)&&P.removeAttribute(T)};R("value",t!=null?String(t):null),S("disabled",l),S("required",i),S("headless",b),S("invalid",s),R("placeholder",n||null),R("name",r||null),R("label",a||null),R("description",m||null),R("error",u||null),R("size",y&&y!=="md"&&y!=="2"?y:null),R("variant",p&&p!=="classic"?p:null),R("tone",g&&g!=="default"?g:null),R("density",A&&A!=="default"?A:null),R("radius",d?String(d):null),R("validation",E&&E!=="none"?E:null)},[t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E]),N.default.createElement("ui-select",{ref:f,...L},o)});Et.displayName="Select";const pt=N.default.forwardRef(function({children:o,value:t,valueStart:l,valueEnd:i,min:s,max:b,step:n,range:r,disabled:a,headless:m,orientation:u,size:y,variant:p,tone:g,showValue:A,format:d,label:E,description:e,marks:c,name:w,nameStart:L,nameEnd:H,onInput:f,onChange:P,onValueChange:R,...S},T){const q=v.useRef(null);return v.useImperativeHandle(T,()=>q.current),v.useEffect(()=>{const x=q.current;if(!x)return;const k=F=>{const D=F.detail;D&&(f==null||f(Number(D.value)),R==null||R(D))},K=F=>{const D=F.detail;D&&(P==null||P(Number(D.value)),R==null||R(D))};return x.addEventListener("input",k),x.addEventListener("change",K),()=>{x.removeEventListener("input",k),x.removeEventListener("change",K)}},[f,P,R]),v.useEffect(()=>{const x=q.current;if(!x)return;const k=(F,D)=>{const B=x.getAttribute(F);if(D==null){B!=null&&x.removeAttribute(F);return}B!==D&&x.setAttribute(F,D)},K=(F,D,B)=>{if(D==null){B!==void 0&&B===!1&&k(F,null);return}D?k(F,""):k(F,null)};if(k("value",typeof t=="number"&&Number.isFinite(t)?String(t):null),k("value-start",typeof l=="number"&&Number.isFinite(l)?String(l):null),k("value-end",typeof i=="number"&&Number.isFinite(i)?String(i):null),k("min",typeof s=="number"&&Number.isFinite(s)?String(s):null),k("max",typeof b=="number"&&Number.isFinite(b)?String(b):null),k("step",typeof n=="number"&&Number.isFinite(n)?String(n):null),K("range",r),K("disabled",a),K("headless",m),k("orientation",u&&u!=="horizontal"?u:null),k("size",y&&y!=="md"?y:null),k("variant",p&&p!=="default"?p:null),k("tone",g&&g!=="brand"?g:null),typeof A=="boolean"?k("show-value",A?"true":"false"):k("show-value",null),k("format",d||null),k("label",E||null),k("description",e||null),k("name",w||null),k("name-start",L||null),k("name-end",H||null),c&&c.length)try{k("marks",JSON.stringify(c))}catch{k("marks",null)}else k("marks",null)},[t,l,i,s,b,n,r,a,m,u,y,p,g,A,d,E,e,c,w,L,H]),N.default.createElement("ui-slider",{ref:q,...S},o)});pt.displayName="Slider";function cr(h){const{count:o,width:t,height:l,radius:i,gap:s,variant:b,animated:n,headless:r,...a}=h,m=v.useRef(null);return v.useEffect(()=>{const u=m.current;u&&(typeof o=="number"&&Number.isFinite(o)?u.setAttribute("count",String(o)):u.removeAttribute("count"),t?u.setAttribute("width",t):u.removeAttribute("width"),l?u.setAttribute("height",l):u.removeAttribute("height"),i?u.setAttribute("radius",i):u.removeAttribute("radius"),s?u.setAttribute("gap",s):u.removeAttribute("gap"),b?u.setAttribute("variant",b):u.removeAttribute("variant"),n?u.setAttribute("animated",""):u.removeAttribute("animated"),r?u.setAttribute("headless",""):u.removeAttribute("headless"))},[o,t,l,i,s,b,n,r]),N.default.createElement("ui-skeleton",{ref:m,...a})}exports.Accordion=ct;exports.AccordionItem=ot;exports.AccordionPanel=at;exports.AccordionTrigger=ft;exports.Alert=Nt;exports.AlertDialog=vt;exports.AlertDialogProvider=ur;exports.AppHeader=Me;exports.AspectRatio=We;exports.Avatar=Oe;exports.Badge=St;exports.BlockControls=$e;exports.Box=Zt;exports.Breadcrumb=_e;exports.Button=Ht;exports.Calendar=pe;exports.Chart=Ae;exports.Checkbox=Ue;exports.Collapsible=ut;exports.ColorPicker=ye;exports.Combobox=Pt;exports.CommandPalette=Qt;exports.Container=Ot;exports.ContextMenu=It;exports.DataTable=xt;exports.DatePicker=Le;exports.DateRangePicker=ge;exports.DateRangeTimePicker=Re;exports.DateTimePicker=we;exports.Dialog=Se;exports.DialogProvider=$t;exports.DirectionProvider=dt;exports.Drawer=Qe;exports.Dropdown=be;exports.EmptyState=Ft;exports.Field=kt;exports.Flex=zt;exports.FloatingToolbar=Mt;exports.Form=Je;exports.Gantt=He;exports.Grid=Wt;exports.HoverCard=bt;exports.Icon=Be;exports.Input=me;exports.Label=mt;exports.Layout=Ie;exports.Menu=De;exports.Menubar=Bt;exports.NavigationMenu=Dt;exports.Pagination=st;exports.PluginPanel=Ut;exports.Popover=Te;exports.Portal=et;exports.Presence=Ve;exports.Progress=Ce;exports.QuickActions=Pe;exports.RadioGroup=Xe;exports.ScrollArea=tt;exports.Section=je;exports.Select=Et;exports.SelectionPopup=Kt;exports.Separator=rt;exports.Sidebar=Ge;exports.Skeleton=cr;exports.Slider=pt;exports.Slot=it;exports.Stepper=Ne;exports.Switch=Ye;exports.Table=Tt;exports.Tabs=xe;exports.Textarea=ve;exports.ThemeProvider=Ct;exports.TimePicker=he;exports.Timeline=Ee;exports.Toast=qe;exports.ToastAPI=_t;exports.Toggle=Ze;exports.ToggleGroup=ze;exports.Toolbar=nt;exports.Tooltip=de;exports.VisuallyHidden=lt;exports.Wizard=ke;exports.toast=jt;exports.toastApi=Gt;exports.useAlertDialog=sr;exports.useDialog=Jt;exports.useFloating=Yt;exports.useForm=Xt;exports.useTheme=er;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react"),oe=require("@editora/ui-core"),ee=require("@editora/toast"),Ct=g=>g&&g.__esModule?g:{default:g};function er(g){if(g&&g.__esModule)return g;const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const e in g)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(g,e);Object.defineProperty(u,e,s.get?s:{enumerable:!0,get:()=>g[e]})}}return u.default=g,Object.freeze(u)}const P=er(c),tr=Ct(ee);function ue(g,u){if(typeof window>"u"||typeof customElements>"u"||customElements.get(g))return;const e=`__editora_warned_${g}`,s=window;s[e]||(s[e]=!0,console.warn(`[ui-react/${u}] ${g} is not registered. Import/register the matching web component before using this wrapper.`))}function be(g){if(!g)return null;if(typeof g=="string")return g;try{return JSON.stringify(g)}catch{return null}}function ge(g,u,e){if(e==null||!e){g.removeAttribute(u);return}g.setAttribute(u,"")}function ne(g,u,e){if(!e){g.removeAttribute(u);return}g.setAttribute(u,e)}const Ie=P.default.forwardRef(function({children:u,onClick:e,variant:s,size:t,icon:a,startIcon:v,endIcon:i,loading:n,loadingLabel:l,state:b,tone:d,block:w,headless:p,disabled:h,animation:r,theme:E,type:L,ariaLabel:y,...A},o){const f=c.useRef(null),R=typeof window<"u"?P.default.useLayoutEffect:P.default.useEffect;c.useImperativeHandle(o,()=>f.current),c.useEffect(()=>{ue("ui-button","Button")},[]),c.useEffect(()=>{const N=f.current;if(!N||!e)return;const I=$=>e($);return N.addEventListener("click",I),()=>N.removeEventListener("click",I)},[e]),R(()=>{const N=f.current;if(!N)return;ne(N,"variant",s),t&&t!=="md"?ne(N,"size",t):N.removeAttribute("size"),ne(N,"icon",a);const I=b||(n?"loading":"idle");I==="idle"?N.removeAttribute("state"):ne(N,"state",I),ge(N,"loading",!!n),ge(N,"block",!!w),ge(N,"headless",!!p),ge(N,"disabled",!!h),ne(N,"animation",r),E&&E!=="default"?ne(N,"theme",E):N.removeAttribute("theme"),ne(N,"tone",d),L&&L!=="button"?ne(N,"type",L):N.removeAttribute("type"),l!==void 0&&ne(N,"loading-label",l),y!==void 0&&ne(N,"aria-label",y)},[s,t,a,n,b,w,p,h,r,E,d,L,l,y]);const k={ref:f,...A,variant:s,size:t&&t!=="md"?t:void 0,icon:a,animation:r,tone:d,type:L&&L!=="button"?L:void 0,loading:n?"":void 0,block:w?"":void 0,headless:p?"":void 0,disabled:h?"":void 0,theme:E&&E!=="default"?E:void 0,state:b&&b!=="idle"?b:void 0,"loading-label":l,"aria-label":y},H=v==null?null:P.default.createElement("span",{slot:"prefix","aria-hidden":"true"},v),S=i==null?null:P.default.createElement("span",{slot:"suffix","aria-hidden":"true"},i);return P.default.createElement("ui-button",k,H,u,S)});Ie.displayName="Button";const rr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Fe=P.default.forwardRef(function({children:u,text:e,placement:s,open:t,disabled:a,headless:v,variant:i,size:n,tone:l,delay:b,closeDelay:d,trigger:w,offset:p,interactive:h,arrow:r,onOpen:E,onClose:L,onOpenChange:y,...A},o){const f=c.useRef(null);return c.useImperativeHandle(o,()=>f.current),c.useEffect(()=>{const R=f.current;if(!R)return;const k=()=>{E==null||E()},H=()=>{L==null||L()},S=N=>{const I=N.detail;I&&typeof I.open=="boolean"&&(y==null||y(I.open))};return R.addEventListener("open",k),R.addEventListener("close",H),R.addEventListener("change",S),()=>{R.removeEventListener("open",k),R.removeEventListener("close",H),R.removeEventListener("change",S)}},[E,L,y]),rr(()=>{const R=f.current;if(!R)return;const k=(S,N)=>{const I=R.getAttribute(S);if(N==null){I!=null&&R.removeAttribute(S);return}I!==N&&R.setAttribute(S,N)},H=(S,N)=>{N?k(S,""):k(S,null)};k("text",e||null),k("placement",s||null),H("open",t),H("disabled",a),H("headless",v),k("variant",i&&i!=="default"?i:null),k("size",n&&n!=="md"?n:null),k("tone",l&&l!=="default"?l:null),k("delay",typeof b=="number"&&Number.isFinite(b)?String(b):null),k("close-delay",typeof d=="number"&&Number.isFinite(d)?String(d):null),k("trigger",w||null),k("offset",typeof p=="number"&&Number.isFinite(p)?String(p):null),H("interactive",h),typeof r=="boolean"?k("arrow",r?"true":"false"):k("arrow",null)},[e,s,t,a,v,i,n,l,b,d,w,p,h,r]),P.default.createElement("ui-tooltip",{ref:f,...A},u)});Fe.displayName="Tooltip";const ir=typeof window<"u"?c.useLayoutEffect:c.useEffect;function ur(g){const{title:u,description:e,tone:s,variant:t,layout:a,dismissible:v,open:i,headless:n,onClose:l,children:b,...d}=g,w=c.useRef(null);return c.useEffect(()=>{const p=w.current;if(!p)return;const h=()=>l==null?void 0:l();return p.addEventListener("close",h),()=>p.removeEventListener("close",h)},[l]),ir(()=>{const p=w.current;p&&(u?p.setAttribute("title",u):p.removeAttribute("title"),e?p.setAttribute("description",e):p.removeAttribute("description"),s?p.setAttribute("tone",s):p.removeAttribute("tone"),t?p.setAttribute("variant",t):p.removeAttribute("variant"),a?p.setAttribute("layout",a):p.removeAttribute("layout"),v?p.setAttribute("dismissible",""):p.removeAttribute("dismissible"),n?p.setAttribute("headless",""):p.removeAttribute("headless"),typeof i=="boolean"?i?p.removeAttribute("hidden"):p.setAttribute("hidden",""):p.removeAttribute("hidden"))},[u,e,s,t,a,v,i,n]),P.default.createElement("ui-alert",{ref:w,...d},b)}const le=typeof window<"u"?c.useLayoutEffect:c.useEffect,Be=P.default.forwardRef(function({children:u,open:e,placement:s,variant:t,density:a,shape:v,elevation:i,tone:n,closeOnSelect:l,typeahead:b,onOpen:d,onClose:w,onChange:p,onChangeDetail:h,onRequestClose:r,onSelect:E,...L},y){const A=c.useRef(null);return P.default.useImperativeHandle(y,()=>A.current),c.useEffect(()=>{const o=A.current;if(!o)return;const f=()=>d==null?void 0:d(),R=()=>w==null?void 0:w(),k=N=>{const I=N.detail||{},$=I==null?void 0:I.open;typeof $=="boolean"&&(p==null||p($)),typeof $=="boolean"&&(h==null||h({open:$,reason:I.reason}))},H=N=>{const I=N.detail||{};typeof I.reason=="string"&&(r==null||r({reason:I.reason}))},S=N=>{E==null||E(N.detail||{})};return o.addEventListener("open",f),o.addEventListener("close",R),o.addEventListener("change",k),o.addEventListener("request-close",H),o.addEventListener("select",S),()=>{o.removeEventListener("open",f),o.removeEventListener("close",R),o.removeEventListener("change",k),o.removeEventListener("request-close",H),o.removeEventListener("select",S)}},[d,w,p,h,r,E]),le(()=>{const o=A.current;!o||e==null||(e?o.setAttribute("open",""):o.removeAttribute("open"))},[e]),le(()=>{const o=A.current;o&&(s?o.setAttribute("placement",s):o.removeAttribute("placement"))},[s]),le(()=>{const o=A.current;o&&(t&&t!=="default"?o.setAttribute("variant",t):o.removeAttribute("variant"))},[t]),le(()=>{const o=A.current;o&&(a&&a!=="default"?o.setAttribute("density",a):o.removeAttribute("density"))},[a]),le(()=>{const o=A.current;o&&(v&&v!=="default"?o.setAttribute("shape",v):o.removeAttribute("shape"))},[v]),le(()=>{const o=A.current;o&&(i&&i!=="default"?o.setAttribute("elevation",i):o.removeAttribute("elevation"))},[i]),le(()=>{const o=A.current;o&&(n&&n!=="default"&&n!=="brand"?o.setAttribute("tone",n):o.removeAttribute("tone"))},[n]),le(()=>{const o=A.current;if(o){if(l==null){o.removeAttribute("close-on-select");return}o.setAttribute("close-on-select",l?"true":"false")}},[l]),le(()=>{const o=A.current;if(o){if(b==null){o.removeAttribute("typeahead");return}o.setAttribute("typeahead",b?"true":"false")}},[b]),P.default.createElement("ui-dropdown",{ref:A,...L},u)});Be.displayName="Dropdown";const nr=typeof window<"u"?c.useLayoutEffect:c.useEffect,je=P.default.forwardRef(function(u,e){const{value:s,onChange:t,onInput:a,onDebouncedInput:v,onClear:i,clearable:n,debounce:l,validation:b,size:d,minlength:w,maxlength:p,readOnly:h,autofocus:r,disabled:E,counter:L,floatingLabel:y,type:A,name:o,required:f,pattern:R,inputMode:k,autoComplete:H,min:S,max:N,step:I,spellCheck:$,placeholder:m,headless:B,variant:M,tone:T,density:G,shape:q,color:J,radius:x,label:j,description:_,children:z,...U}=u,D=c.useRef(null);return c.useImperativeHandle(e,()=>D.current),c.useEffect(()=>{const F=D.current;if(!F)return;const O=K=>{const W=K.detail;typeof(W==null?void 0:W.value)=="string"&&(a==null||a(W.value))},Y=K=>{const W=K.detail;typeof(W==null?void 0:W.value)=="string"&&(t==null||t(W.value))},Q=K=>{const W=K.detail;typeof(W==null?void 0:W.value)=="string"&&(v==null||v(W.value))},Z=()=>{i==null||i()};return F.addEventListener("input",O),F.addEventListener("change",Y),F.addEventListener("debounced-input",Q),F.addEventListener("clear",Z),()=>{F.removeEventListener("input",O),F.removeEventListener("change",Y),F.removeEventListener("debounced-input",Q),F.removeEventListener("clear",Z)}},[t,a,v,i]),nr(()=>{const F=D.current;F&&(n?F.setAttribute("clearable",""):F.removeAttribute("clearable"),typeof l=="number"&&Number.isFinite(l)?F.setAttribute("debounce",String(l)):F.removeAttribute("debounce"),b&&b!=="none"?F.setAttribute("validation",b):F.removeAttribute("validation"),d&&d!=="md"&&d!=="2"?F.setAttribute("size",String(d)):F.removeAttribute("size"),typeof w=="number"?F.setAttribute("minlength",String(w)):F.removeAttribute("minlength"),typeof p=="number"?F.setAttribute("maxlength",String(p)):F.removeAttribute("maxlength"),h?F.setAttribute("readonly",""):F.removeAttribute("readonly"),r?F.setAttribute("autofocus",""):F.removeAttribute("autofocus"),E?F.setAttribute("disabled",""):F.removeAttribute("disabled"),L?F.setAttribute("counter",""):F.removeAttribute("counter"),y?F.setAttribute("floating-label",""):F.removeAttribute("floating-label"),A?F.setAttribute("type",A):F.removeAttribute("type"),o?F.setAttribute("name",o):F.removeAttribute("name"),f?F.setAttribute("required",""):F.removeAttribute("required"),R?F.setAttribute("pattern",R):F.removeAttribute("pattern"),k?F.setAttribute("inputmode",k):F.removeAttribute("inputmode"),H?F.setAttribute("autocomplete",H):F.removeAttribute("autocomplete"),S!=null&&S!==""?F.setAttribute("min",String(S)):F.removeAttribute("min"),N!=null&&N!==""?F.setAttribute("max",String(N)):F.removeAttribute("max"),I!=null&&I!==""?F.setAttribute("step",String(I)):F.removeAttribute("step"),typeof $=="boolean"?F.setAttribute("spellcheck",$?"true":"false"):F.removeAttribute("spellcheck"),m?F.setAttribute("placeholder",m):F.removeAttribute("placeholder"),B?F.setAttribute("headless",""):F.removeAttribute("headless"),M&&M!=="classic"?F.setAttribute("variant",M):F.removeAttribute("variant"),T&&T!=="default"?F.setAttribute("tone",T):F.removeAttribute("tone"),G&&G!=="default"?F.setAttribute("density",G):F.removeAttribute("density"),q&&q!=="default"?F.setAttribute("shape",q):F.removeAttribute("shape"),J?F.setAttribute("color",J):F.removeAttribute("color"),x?F.setAttribute("radius",String(x)):F.removeAttribute("radius"),j?F.setAttribute("label",j):F.removeAttribute("label"),_?F.setAttribute("description",_):F.removeAttribute("description"))},[n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S,N,I,$,m,B,M,T,G,q,J,x,j,_]),P.default.createElement("ui-input",{ref:D,value:s??void 0,...U},z)});je.displayName="Input";const lr=typeof window<"u"?c.useLayoutEffect:c.useEffect,qe=P.default.forwardRef(function({value:u,onChange:e,onInput:s,onDebouncedInput:t,onClear:a,clearable:v,debounce:i,validation:n,size:l,minlength:b,maxlength:d,rows:w,readOnly:p,autofocus:h,disabled:r,name:E,required:L,placeholder:y,resize:A,variant:o,color:f,radius:R,label:k,description:H,autosize:S,maxRows:N,showCount:I,density:$,tone:m,headless:B,children:M,...T},G){const q=c.useRef(null);return c.useImperativeHandle(G,()=>q.current),c.useEffect(()=>{const J=q.current;if(!J)return;const x=U=>{const D=U.detail;D&&(s==null||s(D.value))},j=U=>{const D=U.detail;D&&(e==null||e(D.value))},_=U=>{const D=U.detail;D&&(t==null||t(D.value))},z=()=>a==null?void 0:a();return J.addEventListener("input",x),J.addEventListener("change",j),J.addEventListener("debounced-input",_),J.addEventListener("clear",z),()=>{J.removeEventListener("input",x),J.removeEventListener("change",j),J.removeEventListener("debounced-input",_),J.removeEventListener("clear",z)}},[e,s,t,a]),lr(()=>{const J=q.current;if(!J)return;const x=(_,z)=>{const U=J.getAttribute(_);if(z==null){U!=null&&J.removeAttribute(_);return}U!==z&&J.setAttribute(_,z)},j=(_,z)=>{z?x(_,""):x(_,null)};x("value",u!=null?String(u):null),j("clearable",v),j("readonly",p),j("autofocus",h),j("disabled",r),j("required",L),j("autosize",S),j("show-count",I),j("headless",B),x("debounce",typeof i=="number"&&Number.isFinite(i)?String(i):null),x("validation",n&&n!=="none"?n:null),x("size",l&&l!=="md"&&l!=="2"?String(l):null),x("minlength",typeof b=="number"?String(b):null),x("maxlength",typeof d=="number"?String(d):null),x("rows",typeof w=="number"?String(w):null),x("name",E||null),x("placeholder",y||null),x("resize",A||null),x("variant",o&&o!=="classic"?o:null),x("color",f||null),x("radius",R?String(R):null),x("label",k||null),x("description",H||null),x("max-rows",typeof N=="number"?String(N):null),x("density",$&&$!=="default"?$:null),x("tone",m&&m!=="brand"?m:null)},[u,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S,N,I,$,m,B]),P.default.createElement("ui-textarea",{ref:q,...T},M)});qe.displayName="Textarea";const sr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function or(g){const{children:u,label:e,description:s,error:t,htmlFor:a,required:v,invalid:i,orientation:n,variant:l,tone:b,density:d,shape:w,shell:p,labelWidth:h,headless:r,...E}=g,L=c.useRef(null);return sr(()=>{const y=L.current;y&&(e!=null&&e!==""?y.setAttribute("label",e):y.removeAttribute("label"),s!=null&&s!==""?y.setAttribute("description",s):y.removeAttribute("description"),t!=null&&t!==""?y.setAttribute("error",t):y.removeAttribute("error"),a?y.setAttribute("for",a):y.removeAttribute("for"),v?y.setAttribute("required",""):y.removeAttribute("required"),i?y.setAttribute("invalid",""):y.removeAttribute("invalid"),n&&n!=="vertical"?y.setAttribute("orientation",n):y.removeAttribute("orientation"),l&&l!=="default"?y.setAttribute("variant",l):y.removeAttribute("variant"),b&&b!=="default"?y.setAttribute("tone",b):y.removeAttribute("tone"),d&&d!=="default"?y.setAttribute("density",d):y.removeAttribute("density"),w&&w!=="default"?y.setAttribute("shape",w):y.removeAttribute("shape"),p&&p!=="none"?y.setAttribute("shell",p):y.removeAttribute("shell"),h?y.setAttribute("label-width",h):y.removeAttribute("label-width"),r?y.setAttribute("headless",""):y.removeAttribute("headless"))},[e,s,t,a,v,i,n,l,b,d,w,p,h,r]),P.default.createElement("ui-field",{ref:L,...E},u)}const fr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function cr(g){const{value:u,open:e,state:s,stateText:t,onChange:a,onInput:v,onDebouncedInput:i,onSelect:n,onOpenDetail:l,onCloseDetail:b,onOpen:d,onClose:w,onClear:p,clearable:h,debounce:r,validation:E,size:L,maxlength:y,readOnly:A,autofocus:o,disabled:f,name:R,required:k,placeholder:H,variant:S,radius:N,label:I,description:$,emptyText:m,noFilter:B,allowCustom:M,children:T,...G}=g,q=c.useRef(null);c.useEffect(()=>{const x=q.current;if(!x)return;const j=Y=>{var Z;const Q=(Z=Y.detail)==null?void 0:Z.query;typeof Q=="string"&&(v==null||v(Q))},_=Y=>{var Z;const Q=(Z=Y.detail)==null?void 0:Z.value;typeof Q=="string"&&(a==null||a(Q))},z=Y=>{var Z;const Q=(Z=Y.detail)==null?void 0:Z.query;typeof Q=="string"&&(i==null||i(Q))},U=Y=>{const Q=Y.detail;typeof(Q==null?void 0:Q.value)=="string"&&(n==null||n(Q.value,Q.label||Q.value))},D=Y=>{const Q=Y.detail;d==null||d(),Q&&(l==null||l(Q))},F=Y=>{const Q=Y.detail;w==null||w(),Q&&(b==null||b(Q))},O=()=>p==null?void 0:p();return x.addEventListener("input",j),x.addEventListener("change",_),x.addEventListener("debounced-input",z),x.addEventListener("select",U),x.addEventListener("open",D),x.addEventListener("close",F),x.addEventListener("clear",O),()=>{x.removeEventListener("input",j),x.removeEventListener("change",_),x.removeEventListener("debounced-input",z),x.removeEventListener("select",U),x.removeEventListener("open",D),x.removeEventListener("close",F),x.removeEventListener("clear",O)}},[a,v,i,n,d,w,l,b,p]),fr(()=>{const x=q.current;x&&(h?x.setAttribute("clearable",""):x.removeAttribute("clearable"),typeof r=="number"&&Number.isFinite(r)?x.setAttribute("debounce",String(r)):x.removeAttribute("debounce"),E&&E!=="none"?x.setAttribute("validation",E):x.removeAttribute("validation"),s&&s!=="idle"?x.setAttribute("state",s):x.removeAttribute("state"),t?x.setAttribute("state-text",t):x.removeAttribute("state-text"),L&&L!=="md"&&L!=="2"?x.setAttribute("size",String(L)):x.removeAttribute("size"),typeof y=="number"?x.setAttribute("maxlength",String(y)):x.removeAttribute("maxlength"),A?x.setAttribute("readonly",""):x.removeAttribute("readonly"),o?x.setAttribute("autofocus",""):x.removeAttribute("autofocus"),f?x.setAttribute("disabled",""):x.removeAttribute("disabled"),R?x.setAttribute("name",R):x.removeAttribute("name"),k?x.setAttribute("required",""):x.removeAttribute("required"),H?x.setAttribute("placeholder",H):x.removeAttribute("placeholder"),S?x.setAttribute("variant",S):x.removeAttribute("variant"),N?x.setAttribute("radius",String(N)):x.removeAttribute("radius"),I?x.setAttribute("label",I):x.removeAttribute("label"),$?x.setAttribute("description",$):x.removeAttribute("description"),m?x.setAttribute("empty-text",m):x.removeAttribute("empty-text"),B?x.setAttribute("no-filter",""):x.removeAttribute("no-filter"),M?x.setAttribute("allow-custom",""):x.removeAttribute("allow-custom"),typeof e=="boolean"&&(e?x.setAttribute("open",""):x.removeAttribute("open")))},[e,s,t,h,r,E,L,y,A,o,f,R,k,H,S,N,I,$,m,B,M]);const J={ref:q,...G};return u!=null&&(J.value=u),typeof e=="boolean"&&e&&(J.open=""),s&&s!=="idle"&&(J.state=s),t&&(J["state-text"]=t),P.default.createElement("ui-combobox",J,T)}const dr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function ar(g){const{text:u,tone:e,variant:s,size:t,radius:a,state:v,pill:i,dot:n,interactive:l,truncate:b,maxWidth:d,removable:w,autoRemove:p,iconOnly:h,disabled:r,onRemove:E,children:L,...y}=g,A=c.useRef(null);return c.useEffect(()=>{const o=A.current;if(!o)return;const f=R=>E==null?void 0:E(R.detail);return o.addEventListener("remove",f),()=>o.removeEventListener("remove",f)},[E]),dr(()=>{const o=A.current;o&&(u?o.setAttribute("text",u):o.removeAttribute("text"),e?o.setAttribute("tone",e):o.removeAttribute("tone"),s?o.setAttribute("variant",s):o.removeAttribute("variant"),t&&t!=="md"&&t!=="2"?o.setAttribute("size",t):o.removeAttribute("size"),a?o.setAttribute("radius",String(a)):o.removeAttribute("radius"),v&&v!=="idle"?o.setAttribute("state",v):o.removeAttribute("state"),i?o.setAttribute("pill",""):o.removeAttribute("pill"),n?o.setAttribute("dot",""):o.removeAttribute("dot"),l?o.setAttribute("interactive",""):o.removeAttribute("interactive"),b?o.setAttribute("truncate",""):o.removeAttribute("truncate"),d?o.setAttribute("max-width",d):o.removeAttribute("max-width"),w?o.setAttribute("removable",""):o.removeAttribute("removable"),p?o.setAttribute("auto-remove",""):o.removeAttribute("auto-remove"),h?o.setAttribute("icon-only",""):o.removeAttribute("icon-only"),r?o.setAttribute("disabled",""):o.removeAttribute("disabled"))},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r]),P.default.createElement("ui-badge",{ref:A,...y},L)}const br=typeof window<"u"?c.useLayoutEffect:c.useEffect;function mr(g){const{title:u,description:e,actionLabel:s,tone:t,compact:a,headless:v,onAction:i,children:n,...l}=g,b=c.useRef(null);return c.useEffect(()=>{const d=b.current;if(!d)return;const w=()=>i==null?void 0:i();return d.addEventListener("action",w),()=>d.removeEventListener("action",w)},[i]),br(()=>{const d=b.current;d&&(u?d.setAttribute("title",u):d.removeAttribute("title"),e?d.setAttribute("description",e):d.removeAttribute("description"),s?d.setAttribute("action-label",s):d.removeAttribute("action-label"),t?d.setAttribute("tone",t):d.removeAttribute("tone"),a?d.setAttribute("compact",""):d.removeAttribute("compact"),v?d.setAttribute("headless",""):d.removeAttribute("headless"))},[u,e,s,t,a,v]),P.default.createElement("ui-empty-state",{ref:b,...l},n)}function vr(g){const{sortable:u,selectable:e,multiSelect:s,striped:t,hover:a,compact:v,bordered:i,stickyHeader:n,loading:l,headless:b,emptyText:d,onSortChange:w,onRowSelect:p,children:h,...r}=g,E=c.useRef(null);return c.useEffect(()=>{const L=E.current;if(!L)return;const y=o=>{const f=o.detail;f&&(w==null||w(f))},A=o=>{const f=o.detail;f&&(p==null||p(f))};return L.addEventListener("sort-change",y),L.addEventListener("row-select",A),()=>{L.removeEventListener("sort-change",y),L.removeEventListener("row-select",A)}},[w,p]),P.default.createElement("ui-table",{ref:E,...r,...u?{sortable:""}:{},...e?{selectable:""}:{},...s?{"multi-select":""}:{},...t?{striped:""}:{},...a?{hover:""}:{},...v?{compact:""}:{},...i?{bordered:""}:{},...n?{"sticky-header":""}:{},...l?{loading:""}:{},...b?{headless:""}:{},...d?{"empty-text":d}:{}},h)}function Ar(g){const{sortable:u,selectable:e,multiSelect:s,shape:t,variant:a,elevation:v,striped:i,hover:n,compact:l,bordered:b,stickyHeader:d,stickyFooter:w,loading:p,state:h,stateText:r,headless:E,hideSummary:L,emptyText:y,page:A,pageSize:o,paginationId:f,filterQuery:R,filterColumn:k,filterRules:H,columnOrder:S,pinColumns:N,draggableColumns:I,resizableColumns:$,bulkActionsLabel:m,bulkClearLabel:B,virtualize:M,rowHeight:T,overscan:G,onSortChange:q,onRowSelect:J,onPageChange:x,onFilterChange:j,onColumnResize:_,onVirtualRangeChange:z,onColumnOrderChange:U,onBulkClear:D,children:F,...O}=g,Y=c.useRef(null);c.useEffect(()=>{const K=Y.current;if(!K)return;const W=re=>{const V=re.detail;V&&(q==null||q(V))},te=re=>{const V=re.detail;V&&(J==null||J(V))},Ae=re=>{const V=re.detail;V&&(x==null||x(V))},pe=re=>{const V=re.detail;V&&(j==null||j(V))},Ee=re=>{const V=re.detail;V&&(_==null||_(V))},ye=re=>{const V=re.detail;V&&(z==null||z(V))},Le=re=>{const V=re.detail;V&&(U==null||U(V))},we=re=>{const V=re.detail;V&&(D==null||D(V))};return K.addEventListener("sort-change",W),K.addEventListener("row-select",te),K.addEventListener("page-change",Ae),K.addEventListener("filter-change",pe),K.addEventListener("column-resize",Ee),K.addEventListener("virtual-range-change",ye),K.addEventListener("column-order-change",Le),K.addEventListener("bulk-clear",we),()=>{K.removeEventListener("sort-change",W),K.removeEventListener("row-select",te),K.removeEventListener("page-change",Ae),K.removeEventListener("filter-change",pe),K.removeEventListener("column-resize",Ee),K.removeEventListener("virtual-range-change",ye),K.removeEventListener("column-order-change",Le),K.removeEventListener("bulk-clear",we)}},[q,J,x,j,_,z,U,D]);const Q=H&&H.length?(()=>{try{return JSON.stringify(H)}catch{return}})():void 0,Z=typeof N=="string"?N.trim()||void 0:N&&typeof N=="object"?(()=>{try{return JSON.stringify(N)}catch{return}})():void 0;return P.default.createElement("ui-data-table",{ref:Y,...O,...u?{sortable:""}:{},...e?{selectable:""}:{},...s?{"multi-select":""}:{},...t&&t!=="default"?{shape:t}:{},...a&&a!=="default"?{variant:a}:{},...v&&v!=="default"?{elevation:v}:{},...i?{striped:""}:{},...n?{hover:""}:{},...l?{compact:""}:{},...b?{bordered:""}:{},...d?{"sticky-header":""}:{},...w?{"sticky-footer":""}:{},...p?{loading:""}:{},...h&&h!=="idle"?{state:h}:{},...r?{"state-text":r}:{},...E?{headless:""}:{},...L?{"hide-summary":""}:{},...y?{"empty-text":y}:{},...typeof A=="number"&&Number.isFinite(A)?{page:String(A)}:{},...typeof o=="number"&&Number.isFinite(o)?{"page-size":String(o)}:{},...f?{"pagination-id":f}:{},...typeof R=="string"?{"filter-query":R}:{},...typeof k=="number"&&Number.isFinite(k)?{"filter-column":String(k)}:typeof k=="string"&&k.trim()?{"filter-column":k}:{},...Q?{filters:Q}:{},...S?{"column-order":S}:{},...Z?{"pin-columns":Z}:{},...I?{"draggable-columns":""}:{},...$?{"resizable-columns":""}:{},...m?{"bulk-actions-label":m}:{},...B?{"bulk-clear-label":B}:{},...M?{virtualize:""}:{},...typeof T=="number"&&Number.isFinite(T)?{"row-height":String(T)}:{},...typeof G=="number"&&Number.isFinite(G)?{overscan:String(G)}:{}},F)}const pr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Je=P.default.forwardRef(function({data:u,values:e,labels:s,type:t,variant:a,title:v,subtitle:i,state:n,disabled:l,interactive:b,showLegend:d,showSummary:w,headless:p,ariaLabel:h,onPointSelect:r,children:E,...L},y){const A=c.useRef(null);return c.useImperativeHandle(y,()=>A.current),c.useEffect(()=>{ue("ui-chart","Chart")},[]),c.useEffect(()=>{const o=A.current;if(!o||!r)return;const f=R=>{const k=R.detail;k&&r(k)};return o.addEventListener("ui-point-select",f),()=>{o.removeEventListener("ui-point-select",f)}},[r]),pr(()=>{const o=A.current;if(!o)return;const f=(k,H)=>{const S=o.getAttribute(k);if(H==null){S!=null&&o.removeAttribute(k);return}S!==H&&o.setAttribute(k,H)},R=(k,H)=>{H?f(k,""):f(k,null)};if(u&&u.length)try{f("data",JSON.stringify(u))}catch{f("data",null)}else f("data",null);e&&e.length?f("values",e.join(",")):f("values",null),s&&s.length?f("labels",s.join(",")):f("labels",null),f("type",t&&t!=="line"?t:null),f("variant",a&&a!=="default"?a:null),f("title",v||null),f("subtitle",i||null),f("state",n&&n!=="idle"?n:null),f("interactive",b===!1?"false":null),f("show-legend",typeof d=="boolean"?d?"true":"false":null),f("show-summary",typeof w=="boolean"?w?"true":"false":null),f("aria-label",h||null),R("disabled",l),R("headless",p)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h]),P.default.createElement("ui-chart",{ref:A,...L},E)});Je.displayName="Chart";const Er=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ge=P.default.forwardRef(function({items:u,variant:e,headless:s,children:t,...a},v){const i=c.useRef(null);return c.useImperativeHandle(v,()=>i.current),Er(()=>{const n=i.current;if(!n)return;const l=(d,w)=>{const p=n.getAttribute(d);if(w==null){p!=null&&n.removeAttribute(d);return}p!==w&&n.setAttribute(d,w)},b=(d,w)=>{w?l(d,""):l(d,null)};if(u&&u.length)try{l("items",JSON.stringify(u))}catch{l("items",null)}else l("items",null);l("variant",e&&e!=="default"?e:null),b("headless",s)},[u,e,s]),P.default.createElement("ui-timeline",{ref:i,...a},t)});Ge.displayName="Timeline";const yr=typeof window<"u"?c.useLayoutEffect:c.useEffect,_e=P.default.forwardRef(function({year:u,month:e,value:s,events:t,variant:a,selection:v,min:i,max:n,disabled:l,readOnly:b,locale:d,translations:w,weekStart:p,outsideClick:h,eventsMax:r,eventsDisplay:E,maxSelections:L,size:y,bare:A,tone:o,state:f,headless:R,hideToday:k,showToday:H,ariaLabel:S,onSelect:N,onChange:I,onCalendarChange:$,onMonthChange:m,onValueChange:B,children:M,...T},G){const q=c.useRef(null);return c.useImperativeHandle(G,()=>q.current),c.useEffect(()=>{ue("ui-calendar","Calendar")},[]),c.useEffect(()=>{const J=q.current;if(!J)return;const x=z=>{const U=z.detail;U&&(N==null||N(U),I==null||I(U),B==null||B(U.value))},j=z=>{const U=z.detail;U&&($==null||$(U))},_=z=>{const U=z.detail;U&&(m==null||m(U))};return J.addEventListener("ui-select",x),J.addEventListener("ui-change",j),J.addEventListener("ui-month-change",_),()=>{J.removeEventListener("ui-select",x),J.removeEventListener("ui-change",j),J.removeEventListener("ui-month-change",_)}},[N,I,$,m,B]),yr(()=>{const J=q.current;if(!J)return;const x=(_,z)=>{const U=J.getAttribute(_);if(z==null){U!=null&&J.removeAttribute(_);return}U!==z&&J.setAttribute(_,z)},j=(_,z)=>{z?J.hasAttribute(_)||J.setAttribute(_,""):J.hasAttribute(_)&&J.removeAttribute(_)};if(typeof u=="number"&&Number.isFinite(u)?x("year",String(u)):x("year",null),typeof e=="number"&&Number.isFinite(e)?x("month",String(e)):x("month",null),x("value",s||null),x("selection",v&&v!=="single"?v:null),x("min",i||null),x("max",n||null),x("locale",d||null),x("translations",be(w)),x("week-start",typeof p=="number"?String(p):null),x("outside-click",h&&h!=="navigate"?h:null),x("events-max",typeof r=="number"&&Number.isFinite(r)?String(r):null),x("events-display",E&&E!=="dots"?E:null),x("max-selections",typeof L=="number"&&Number.isFinite(L)?String(L):null),x("size",y&&y!=="md"?y:null),j("bare",A),x("tone",o||null),x("state",f&&f!=="idle"?f:null),x("show-today",typeof H=="boolean"?H?"true":"false":null),x("aria-label",S||null),j("disabled",l),j("readonly",b),j("hide-today",k),j("headless",R),t&&t.length)try{x("events",JSON.stringify(t))}catch{x("events",null)}else x("events",null);x("variant",a&&a!=="default"?a:null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S]),P.default.createElement("ui-calendar",{ref:q,...T},M)});_e.displayName="Calendar";const Lr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Me=P.default.forwardRef(function({value:u,format:e,alpha:s,disabled:t,readOnly:a,size:v,variant:i,state:n,tone:l,mode:b,open:d,closeOnEscape:w,placeholder:p,presets:h,recent:r,maxRecent:E,persist:L,onInput:y,onChange:A,onValueChange:o,onOpen:f,onClose:R,onOpenDetail:k,onCloseDetail:H,onInvalid:S,children:N,...I},$){const m=c.useRef(null);c.useImperativeHandle($,()=>m.current),c.useEffect(()=>{const M=m.current;if(!M)return;const T=j=>{const _=j.detail;_&&(y==null||y(_))},G=j=>{const _=j.detail;_&&(A==null||A(_),o==null||o(_.value))},q=j=>{const _=j.detail;_&&(S==null||S(_))},J=j=>{const _=j.detail;f==null||f(),_&&(k==null||k(_))},x=j=>{const _=j.detail;R==null||R(),_&&(H==null||H(_))};return M.addEventListener("input",T),M.addEventListener("change",G),M.addEventListener("open",J),M.addEventListener("close",x),M.addEventListener("invalid",q),()=>{M.removeEventListener("input",T),M.removeEventListener("change",G),M.removeEventListener("open",J),M.removeEventListener("close",x),M.removeEventListener("invalid",q)}},[y,A,o,f,R,k,H,S]),Lr(()=>{const M=m.current;if(!M)return;const T=(q,J)=>{const x=M.getAttribute(q);J==null?x!=null&&M.removeAttribute(q):x!==J&&M.setAttribute(q,J)},G=(q,J)=>{J?T(q,""):T(q,null)};if(T("value",u??null),T("format",e&&e!=="hex"?e:null),G("alpha",s),G("disabled",t),G("readonly",a),T("size",v&&v!=="md"?v:null),T("variant",i&&i!=="default"?i:null),T("state",n&&n!=="idle"?n:null),T("tone",l&&l!=="brand"?l:null),T("mode",b&&b!=="inline"?b:null),typeof d=="boolean"?G("open",d):T("open",null),T("close-on-escape",typeof w=="boolean"?w?"true":"false":null),T("placeholder",p??null),G("recent",r),T("max-recent",typeof E=="number"?String(E):null),G("persist",L),h&&h.length>0)try{T("presets",JSON.stringify(h))}catch{T("presets",null)}else T("presets",null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L]);const B={ref:m,...I};if(b&&b!=="inline"&&(B.mode=b),typeof d=="boolean"&&d&&(B.open=""),u!=null&&(B.value=u),e&&e!=="hex"&&(B.format=e),s&&(B.alpha=""),t&&(B.disabled=""),a&&(B.readonly=""),v&&v!=="md"&&(B.size=v),i&&i!=="default"&&(B.variant=i),n&&n!=="idle"&&(B.state=n),l&&l!=="brand"&&(B.tone=l),p&&(B.placeholder=p),typeof w=="boolean"&&(B["close-on-escape"]=w?"true":"false"),r&&(B.recent=""),typeof E=="number"&&(B["max-recent"]=String(E)),L&&(B.persist=""),h&&h.length>0)try{B.presets=JSON.stringify(h)}catch{}return P.default.createElement("ui-color-picker",B,N)});Me.displayName="ColorPicker";const wr=typeof window<"u"?c.useLayoutEffect:c.useEffect,ze=P.default.forwardRef(function({value:u,defaultValue:e,open:s,defaultOpen:t,min:a,max:v,locale:i,translations:n,weekStart:l,size:b,shape:d,bare:w,variant:p,state:h,placeholder:r,label:E,hint:L,error:y,clearable:A,allowInput:o,closeOnSelect:f,outsideClick:R,disabled:k,readOnly:H,required:S,name:N,mode:I,showFooter:$,events:m,eventsMax:B,eventsDisplay:M,format:T,displayFormat:G,onInput:q,onChange:J,onValueChange:x,onOpen:j,onClose:_,onInvalid:z,children:U,...D},F){const O=c.useRef(null);return c.useImperativeHandle(F,()=>O.current),c.useEffect(()=>{const Y=O.current;if(!Y)return;const Q=W=>{const te=W.detail;te&&(q==null||q(te))},Z=W=>{const te=W.detail;te&&(J==null||J(te),x==null||x(te.value))},K=W=>{const te=W.detail;te&&(z==null||z(te))};return Y.addEventListener("input",Q),Y.addEventListener("change",Z),Y.addEventListener("open",j),Y.addEventListener("close",_),Y.addEventListener("invalid",K),()=>{Y.removeEventListener("input",Q),Y.removeEventListener("change",Z),Y.removeEventListener("open",j),Y.removeEventListener("close",_),Y.removeEventListener("invalid",K)}},[q,J,x,j,_,z]),wr(()=>{const Y=O.current;if(!Y)return;const Q=(K,W)=>{const te=Y.getAttribute(K);W==null?te!=null&&Y.removeAttribute(K):te!==W&&Y.setAttribute(K,W)},Z=(K,W)=>{W?Q(K,""):Q(K,null)};if(Q("value",u??null),Q("default-value",e??null),typeof s=="boolean"?Z("open",s):Q("open",null),Z("default-open",t),Q("min",a??null),Q("max",v??null),Q("locale",i??null),Q("translations",be(n)),Q("week-start",typeof l=="number"?String(l):null),Q("size",b&&b!=="md"?b:null),Q("shape",d&&d!=="default"?d:null),Z("bare",w),Q("variant",p&&p!=="default"?p:null),Q("state",h&&h!=="idle"?h:null),Q("placeholder",r??null),Q("label",E??null),Q("hint",L??null),Q("error",y??null),Z("clearable",A),Z("allow-input",o),Z("close-on-select",f),Q("outside-click",R&&R!=="navigate"?R:null),Z("disabled",k),Z("readonly",H),Z("required",S),Q("name",N??null),Q("mode",I&&I!=="popover"?I:null),Q("show-footer",typeof $=="boolean"?String($):null),Q("events-max",typeof B=="number"?String(B):null),Q("events-display",M&&M!=="dots"?M:null),Q("format",T&&T!=="locale"?T:null),Q("display-format",G??null),m!=null&&m.length)try{Q("events",JSON.stringify(m))}catch{Q("events",null)}else Q("events",null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S,N,I,$,m,B,M,T,G]),P.default.createElement("ui-date-picker",{ref:O,...D},U)});ze.displayName="DatePicker";const gr=typeof window<"u"?c.useLayoutEffect:c.useEffect,De=P.default.forwardRef(function({value:u,defaultValue:e,open:s,defaultOpen:t,min:a,max:v,locale:i,translations:n,weekStart:l,size:b,shape:d,bare:w,variant:p,state:h,rangeVariant:r,label:E,hint:L,error:y,allowSameDay:A,allowPartial:o,closeOnSelect:f,clearable:R,disabled:k,readOnly:H,required:S,name:N,nameStart:I,nameEnd:$,mode:m,showFooter:B,onInput:M,onChange:T,onValueChange:G,onOpen:q,onClose:J,onInvalid:x,children:j,..._},z){const U=c.useRef(null);return c.useImperativeHandle(z,()=>U.current),c.useEffect(()=>{const D=U.current;if(!D)return;const F=Q=>{const Z=Q.detail;Z&&(M==null||M(Z))},O=Q=>{const Z=Q.detail;Z&&(T==null||T(Z),G==null||G(Z.value?JSON.stringify(Z.value):null))},Y=Q=>{const Z=Q.detail;Z&&(x==null||x(Z))};return D.addEventListener("input",F),D.addEventListener("change",O),D.addEventListener("open",q),D.addEventListener("close",J),D.addEventListener("invalid",Y),()=>{D.removeEventListener("input",F),D.removeEventListener("change",O),D.removeEventListener("open",q),D.removeEventListener("close",J),D.removeEventListener("invalid",Y)}},[M,T,G,q,J,x]),gr(()=>{const D=U.current;if(!D)return;const F=(Y,Q)=>{const Z=D.getAttribute(Y);Q==null?Z!=null&&D.removeAttribute(Y):Z!==Q&&D.setAttribute(Y,Q)},O=(Y,Q)=>{Q?F(Y,""):F(Y,null)};F("value",u??null),F("default-value",e??null),typeof s=="boolean"?O("open",s):F("open",null),O("default-open",t),F("min",a??null),F("max",v??null),F("locale",i??null),F("translations",be(n)),F("week-start",typeof l=="number"?String(l):null),F("size",b&&b!=="md"?b:null),F("shape",d&&d!=="default"?d:null),O("bare",w),F("variant",p&&p!=="default"?p:null),F("state",h&&h!=="idle"?h:null),F("range-variant",r&&r!=="two-fields"?r:null),F("label",E??null),F("hint",L??null),F("error",y??null),O("allow-same-day",A),O("allow-partial",o),O("close-on-select",f),O("clearable",R),O("disabled",k),O("readonly",H),O("required",S),F("name",N??null),F("name-start",I??null),F("name-end",$??null),F("mode",m&&m!=="popover"?m:null),F("show-footer",typeof B=="boolean"?String(B):null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S,N,I,$,m,B]),P.default.createElement("ui-date-range-picker",{ref:U,..._},j)});De.displayName="DateRangePicker";const hr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Qe=P.default.forwardRef(function({value:u,defaultValue:e,open:s,defaultOpen:t,format:a,step:v,seconds:i,stepSeconds:n,min:l,max:b,disabled:d,readOnly:w,required:p,name:h,clearable:r,allowInput:E,mode:L,label:y,hint:A,error:o,locale:f,translations:R,variant:k,onInput:H,onChange:S,onValueChange:N,onOpen:I,onClose:$,onInvalid:m,children:B,...M},T){const G=c.useRef(null);return c.useImperativeHandle(T,()=>G.current),c.useEffect(()=>{const q=G.current;if(!q)return;const J=_=>{const z=_.detail;z&&(H==null||H(z))},x=_=>{const z=_.detail;z&&(S==null||S(z),N==null||N(z.value))},j=_=>{const z=_.detail;z&&(m==null||m(z))};return q.addEventListener("input",J),q.addEventListener("change",x),q.addEventListener("open",I),q.addEventListener("close",$),q.addEventListener("invalid",j),()=>{q.removeEventListener("input",J),q.removeEventListener("change",x),q.removeEventListener("open",I),q.removeEventListener("close",$),q.removeEventListener("invalid",j)}},[H,S,N,I,$,m]),hr(()=>{const q=G.current;if(!q)return;const J=(j,_)=>{const z=q.getAttribute(j);_==null?z!=null&&q.removeAttribute(j):z!==_&&q.setAttribute(j,_)},x=(j,_)=>{_?J(j,""):J(j,null)};J("value",u??null),J("default-value",e??null),typeof s=="boolean"?x("open",s):J("open",null),x("default-open",t),J("format",a&&a!=="24h"?a:null),J("step",typeof v=="number"?String(v):null),x("seconds",i),J("step-seconds",typeof n=="number"?String(n):null),J("min",l??null),J("max",b??null),x("disabled",d),x("readonly",w),x("required",p),J("name",h??null),x("clearable",r),x("allow-input",E),J("mode",L&&L!=="popover"?L:null),J("label",y??null),J("hint",A??null),J("error",o??null),J("locale",f??null),J("translations",be(R)),J("variant",k&&k!=="default"?k:null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k]),P.default.createElement("ui-time-picker",{ref:G,...M},B)});Qe.displayName="TimePicker";const Rr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ue=P.default.forwardRef(function({value:u,defaultValue:e,open:s,defaultOpen:t,min:a,max:v,locale:i,translations:n,weekStart:l,size:b,bare:d,variant:w,step:p,format:h,disabled:r,readOnly:E,required:L,name:y,closeOnSelect:A,clearable:o,allowInput:f,mode:R,showFooter:k,label:H,hint:S,error:N,onInput:I,onChange:$,onValueChange:m,onOpen:B,onClose:M,onInvalid:T,children:G,...q},J){const x=c.useRef(null);return c.useImperativeHandle(J,()=>x.current),c.useEffect(()=>{const j=x.current;if(!j)return;const _=D=>{const F=D.detail;F&&(I==null||I(F))},z=D=>{const F=D.detail;F&&($==null||$(F),m==null||m(F.value))},U=D=>{const F=D.detail;F&&(T==null||T(F))};return j.addEventListener("input",_),j.addEventListener("change",z),j.addEventListener("open",B),j.addEventListener("close",M),j.addEventListener("invalid",U),()=>{j.removeEventListener("input",_),j.removeEventListener("change",z),j.removeEventListener("open",B),j.removeEventListener("close",M),j.removeEventListener("invalid",U)}},[I,$,m,B,M,T]),Rr(()=>{const j=x.current;if(!j)return;const _=(U,D)=>{const F=j.getAttribute(U);D==null?F!=null&&j.removeAttribute(U):F!==D&&j.setAttribute(U,D)},z=(U,D)=>{D?_(U,""):_(U,null)};_("value",u??null),_("default-value",e??null),typeof s=="boolean"?z("open",s):_("open",null),z("default-open",t),_("min",a??null),_("max",v??null),_("locale",i??null),_("translations",be(n)),_("week-start",typeof l=="number"?String(l):null),_("size",b&&b!=="md"?b:null),z("bare",d),_("variant",w&&w!=="default"?w:null),_("step",typeof p=="number"?String(p):null),_("format",h&&h!=="24h"?h:null),z("disabled",r),z("readonly",E),z("required",L),_("name",y??null),z("close-on-select",A),z("clearable",o),z("allow-input",f),_("mode",R&&R!=="popover"?R:null),_("show-footer",typeof k=="boolean"?String(k):null),_("label",H??null),_("hint",S??null),_("error",N??null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S,N]),P.default.createElement("ui-date-time-picker",{ref:x,...q},G)});Ue.displayName="DateTimePicker";const Hr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Xe=P.default.forwardRef(function({value:u,defaultValue:e,open:s,defaultOpen:t,min:a,max:v,locale:i,translations:n,weekStart:l,size:b,bare:d,variant:w,step:p,autoNormalize:h,allowPartial:r,disabled:E,readOnly:L,required:y,name:A,closeOnSelect:o,clearable:f,mode:R,showFooter:k,label:H,hint:S,error:N,onInput:I,onChange:$,onValueChange:m,onOpen:B,onClose:M,onInvalid:T,children:G,...q},J){const x=c.useRef(null);return c.useImperativeHandle(J,()=>x.current),c.useEffect(()=>{const j=x.current;if(!j)return;const _=D=>{const F=D.detail;F&&(I==null||I(F))},z=D=>{const F=D.detail;F&&($==null||$(F),m==null||m(F.value?JSON.stringify(F.value):null))},U=D=>{const F=D.detail;F&&(T==null||T(F))};return j.addEventListener("input",_),j.addEventListener("change",z),j.addEventListener("open",B),j.addEventListener("close",M),j.addEventListener("invalid",U),()=>{j.removeEventListener("input",_),j.removeEventListener("change",z),j.removeEventListener("open",B),j.removeEventListener("close",M),j.removeEventListener("invalid",U)}},[I,$,m,B,M,T]),Hr(()=>{const j=x.current;if(!j)return;const _=(U,D)=>{const F=j.getAttribute(U);D==null?F!=null&&j.removeAttribute(U):F!==D&&j.setAttribute(U,D)},z=(U,D)=>{D?_(U,""):_(U,null)};_("value",u??null),_("default-value",e??null),typeof s=="boolean"?z("open",s):_("open",null),z("default-open",t),_("min",a??null),_("max",v??null),_("locale",i??null),_("translations",be(n)),_("week-start",typeof l=="number"?String(l):null),_("size",b&&b!=="md"?b:null),z("bare",d),_("variant",w&&w!=="default"?w:null),_("step",typeof p=="number"?String(p):null),z("auto-normalize",h),z("allow-partial",r),z("disabled",E),z("readonly",L),z("required",y),_("name",A??null),z("close-on-select",o),z("clearable",f),_("mode",R&&R!=="popover"?R:null),_("show-footer",typeof k=="boolean"?String(k):null),_("label",H??null),_("hint",S??null),_("error",N??null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S,N]),P.default.createElement("ui-date-range-time-picker",{ref:x,...q},G)});Xe.displayName="DateRangeTimePicker";const Nr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ye=P.default.forwardRef(function({tasks:u,variant:e,headless:s,children:t,...a},v){const i=c.useRef(null);return c.useImperativeHandle(v,()=>i.current),Nr(()=>{const n=i.current;if(!n)return;const l=(d,w)=>{const p=n.getAttribute(d);if(w==null){p!=null&&n.removeAttribute(d);return}p!==w&&n.setAttribute(d,w)},b=(d,w)=>{w?l(d,""):l(d,null)};if(u&&u.length)try{l("tasks",JSON.stringify(u))}catch{l("tasks",null)}else l("tasks",null);l("variant",e&&e!=="default"?e:null),b("headless",s)},[u,e,s]),P.default.createElement("ui-gantt",{ref:i,...a},t)});Ye.displayName="Gantt";const Sr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ze=P.default.forwardRef(function({steps:u,value:e,orientation:s,variant:t,size:a,clickable:v,linear:i,headless:n,onChange:l,onSelect:b,children:d,...w},p){const h=c.useRef(null);return c.useImperativeHandle(p,()=>h.current),c.useEffect(()=>{const r=h.current;if(!r)return;const E=y=>{const A=y.detail;A&&(l==null||l(A))},L=y=>{const A=y.detail;A&&(b==null||b(A))};return r.addEventListener("change",E),r.addEventListener("select",L),()=>{r.removeEventListener("change",E),r.removeEventListener("select",L)}},[l,b]),Sr(()=>{const r=h.current;if(!r)return;const E=(y,A)=>{const o=r.getAttribute(y);if(A==null){o!=null&&r.removeAttribute(y);return}o!==A&&r.setAttribute(y,A)},L=(y,A)=>{A?E(y,""):E(y,null)};if(u&&u.length)try{E("steps",JSON.stringify(u))}catch{E("steps",null)}else E("steps",null);E("value",e||null),E("orientation",s&&s!=="horizontal"?s:null),E("variant",t&&t!=="default"?t:null),E("size",a&&a!=="md"?a:null),L("clickable",v),L("linear",i),L("headless",n)},[u,e,s,t,a,v,i,n]),P.default.createElement("ui-stepper",{ref:h,...w},d)});Ze.displayName="Stepper";const kr=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ke=P.default.forwardRef(function({value:u,linear:e,showStepper:s,stepperPosition:t,hideControls:a,keepMounted:v,variant:i,orientation:n,density:l,shape:b,showProgress:d,busy:w,headless:p,title:h,description:r,emptyLabel:E,nextLabel:L,prevLabel:y,finishLabel:A,onBeforeChange:o,onChange:f,onStepChange:R,onComplete:k,children:H,...S},N){const I=c.useRef(null);return c.useImperativeHandle(N,()=>I.current),c.useEffect(()=>{const $=I.current;if(!$)return;const m=G=>{if(!o)return;const q=G.detail;o(q)===!1&&G.preventDefault()},B=G=>{const q=G.detail;q&&(f==null||f(q))},M=G=>{const q=G.detail;q&&(R==null||R(q))},T=G=>{const q=G.detail;q&&(k==null||k(q))};return $.addEventListener("before-change",m),$.addEventListener("change",B),$.addEventListener("step-change",M),$.addEventListener("complete",T),()=>{$.removeEventListener("before-change",m),$.removeEventListener("change",B),$.removeEventListener("step-change",M),$.removeEventListener("complete",T)}},[o,f,R,k]),kr(()=>{const $=I.current;if(!$)return;const m=(M,T)=>{const G=$.getAttribute(M);if(T==null){G!=null&&$.removeAttribute(M);return}G!==T&&$.setAttribute(M,T)},B=(M,T,G)=>{if(typeof T=="boolean"){T?m(M,""):m(M,null);return}G!==void 0&&(G?m(M,""):m(M,null))};m("value",u||null),B("linear",e),typeof s=="boolean"?m("show-stepper",s?"true":"false"):m("show-stepper",null),m("stepper-position",t&&t!=="top"?t:null),B("hide-controls",a),B("keep-mounted",v),m("variant",i&&i!=="default"?i:null),m("orientation",n&&n!=="horizontal"?n:null),m("density",l&&l!=="default"?l:null),m("shape",b&&b!=="rounded"?b:null),typeof d=="boolean"?m("show-progress",d?"true":"false"):m("show-progress",null),B("busy",w),B("headless",p),m("title",h||null),m("description",r||null),m("empty-label",E||null),m("next-label",L||null),m("prev-label",y||null),m("finish-label",A||null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A]),P.default.createElement("ui-wizard",{ref:I,...S},H)});Ke.displayName="Wizard";const Pr=typeof window<"u"?c.useLayoutEffect:c.useEffect,We=P.default.forwardRef(function({open:u,mode:e,orientation:s,variant:t,floating:a,placement:v,collapsible:i,label:n,headless:l,onSelect:b,onOpenChange:d,onToggle:w,children:p,...h},r){const E=c.useRef(null);return c.useImperativeHandle(r,()=>E.current),c.useEffect(()=>{const L=E.current;if(!L)return;const y=f=>{const R=f.detail;R&&(b==null||b(R))},A=f=>{var k;const R=(k=f.detail)==null?void 0:k.open;typeof R=="boolean"&&(d==null||d(R))},o=f=>{var k;const R=(k=f.detail)==null?void 0:k.open;typeof R=="boolean"&&(w==null||w(R))};return L.addEventListener("select",y),L.addEventListener("change",A),L.addEventListener("toggle",o),()=>{L.removeEventListener("select",y),L.removeEventListener("change",A),L.removeEventListener("toggle",o)}},[b,d,w]),Pr(()=>{const L=E.current;if(!L)return;const y=(o,f)=>{const R=L.getAttribute(o);if(f==null){R!=null&&L.removeAttribute(o);return}R!==f&&L.setAttribute(o,f)},A=(o,f)=>{f?y(o,""):y(o,null)};typeof u=="boolean"?A("open",u):y("open",null),y("mode",e&&e!=="bar"?e:null),y("orientation",s&&s!=="horizontal"?s:null),y("variant",t&&t!=="default"?t:null),A("floating",a),y("placement",v&&v!=="bottom-right"?v:null),A("collapsible",i),y("label",n||null),A("headless",l)},[u,e,s,t,a,v,i,n,l]),P.default.createElement("ui-quick-actions",{ref:E,...h},p)});We.displayName="QuickActions";const $r=typeof window<"u"?c.useLayoutEffect:c.useEffect;function xr(g){const{selected:u,orientation:e,activation:s,loop:t,collapsible:a,headless:v,onChange:i,onSelect:n,children:l,...b}=g,d=c.useRef(null);return c.useEffect(()=>{const w=d.current;if(!w)return;const p=h=>{const r=h.detail;r&&(i==null||i(r),n==null||n(r.selected))};return w.addEventListener("change",p),()=>w.removeEventListener("change",p)},[i,n]),$r(()=>{const w=d.current;w&&(typeof u=="number"?w.setAttribute("selected",String(u)):w.removeAttribute("selected"),e?w.setAttribute("orientation",e):w.removeAttribute("orientation"),s?w.setAttribute("activation",s):w.removeAttribute("activation"),typeof t=="boolean"?w.setAttribute("loop",String(t)):w.removeAttribute("loop"),a?w.setAttribute("collapsible",""):w.removeAttribute("collapsible"),v?w.setAttribute("headless",""):w.removeAttribute("headless"))},[u,e,s,t,a,v]),P.default.createElement("ui-navigation-menu",{ref:d,...b},l)}const Tr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Ir(g){const{selected:u,open:e,loop:s,headless:t,orientation:a,placement:v,variant:i,density:n,shape:l,elevation:b,tone:d,closeOnSelect:w,typeahead:p,onChange:h,onOpen:r,onClose:E,onSelect:L,children:y,...A}=g,o=c.useRef(null);return c.useEffect(()=>{const f=o.current;if(!f)return;const R=N=>{const I=N.detail;I&&(h==null||h(I))},k=N=>{const I=N.detail;typeof(I==null?void 0:I.selected)=="number"?r==null||r(I.selected):r==null||r(-1)},H=()=>E==null?void 0:E(),S=N=>{const I=N.detail;I&&(L==null||L(I))};return f.addEventListener("change",R),f.addEventListener("open",k),f.addEventListener("close",H),f.addEventListener("select",S),()=>{f.removeEventListener("change",R),f.removeEventListener("open",k),f.removeEventListener("close",H),f.removeEventListener("select",S)}},[h,r,E,L]),Tr(()=>{const f=o.current;f&&(typeof u=="number"?f.setAttribute("selected",String(u)):f.removeAttribute("selected"),typeof e=="boolean"&&e?f.setAttribute("open",""):f.removeAttribute("open"),typeof s=="boolean"?f.setAttribute("loop",String(s)):f.removeAttribute("loop"),t?f.setAttribute("headless",""):f.removeAttribute("headless"),a&&a!=="horizontal"?f.setAttribute("orientation",a):f.removeAttribute("orientation"),v?f.setAttribute("placement",v):f.removeAttribute("placement"),i&&i!=="default"?f.setAttribute("variant",i):f.removeAttribute("variant"),n&&n!=="default"?f.setAttribute("density",n):f.removeAttribute("density"),l&&l!=="default"?f.setAttribute("shape",l):f.removeAttribute("shape"),b&&b!=="default"?f.setAttribute("elevation",b):f.removeAttribute("elevation"),d&&d!=="default"&&d!=="brand"?f.setAttribute("tone",d):f.removeAttribute("tone"),w==null?f.removeAttribute("close-on-select"):f.setAttribute("close-on-select",w?"true":"false"),p==null?f.removeAttribute("typeahead"):f.setAttribute("typeahead",p?"true":"false"))},[u,e,s,t,a,v,i,n,l,b,d,w,p]),P.default.createElement("ui-menubar",{ref:o,...A},y)}const Fr=typeof window<"u"?P.default.useLayoutEffect:P.default.useEffect,Oe=P.default.forwardRef(function(u,e){const{open:s,title:t,description:a,closable:v,dismissible:i,closeOnOverlay:n,closeOnEsc:l,lockWhileLoading:b,roleType:d,size:w,state:p,initialFocus:h,submitText:r,cancelText:E,loadingText:L,dialogId:y,config:A,headless:o,onOpen:f,onClose:R,onRequestClose:k,onDialogOpen:H,onDialogSubmit:S,onDialogCancel:N,onDialogDismiss:I,onDialogClose:$,children:m,...B}=u,M=c.useRef(null);return P.default.useImperativeHandle(e,()=>M.current),c.useEffect(()=>{const T=M.current;if(!T)return;const G=()=>f==null?void 0:f(),q=()=>R==null?void 0:R(),J=D=>{const F=D.detail;F&&(k==null||k(F))},x=D=>H==null?void 0:H(D.detail),j=D=>S==null?void 0:S(D.detail),_=D=>N==null?void 0:N(D.detail),z=D=>I==null?void 0:I(D.detail),U=D=>$==null?void 0:$(D.detail);return T.addEventListener("open",G),T.addEventListener("close",q),T.addEventListener("request-close",J),T.addEventListener("ui-open",x),T.addEventListener("ui-submit",j),T.addEventListener("ui-cancel",_),T.addEventListener("ui-dismiss",z),T.addEventListener("ui-close",U),()=>{T.removeEventListener("open",G),T.removeEventListener("close",q),T.removeEventListener("request-close",J),T.removeEventListener("ui-open",x),T.removeEventListener("ui-submit",j),T.removeEventListener("ui-cancel",_),T.removeEventListener("ui-dismiss",z),T.removeEventListener("ui-close",U)}},[f,R,k,H,S,N,I,$]),Fr(()=>{const T=M.current;if(!T)return;typeof s=="boolean"&&(s?T.setAttribute("open",""):T.removeAttribute("open")),t?T.setAttribute("title",t):T.removeAttribute("title"),a?T.setAttribute("description",a):T.removeAttribute("description");const G=typeof i=="boolean"?i:v;typeof G=="boolean"?(T.setAttribute("dismissible",String(G)),T.setAttribute("closable",String(G))):(T.removeAttribute("dismissible"),T.removeAttribute("closable")),typeof n=="boolean"?(T.setAttribute("close-on-overlay",String(n)),T.setAttribute("close-on-backdrop",String(n))):(T.removeAttribute("close-on-overlay"),T.removeAttribute("close-on-backdrop")),typeof l=="boolean"?T.setAttribute("close-on-esc",String(l)):T.removeAttribute("close-on-esc"),typeof b=="boolean"?T.setAttribute("lock-while-loading",String(b)):T.removeAttribute("lock-while-loading"),d?T.setAttribute("role",d):T.removeAttribute("role"),w&&w!=="md"&&w!=="2"?T.setAttribute("size",w):T.removeAttribute("size"),p&&p!=="idle"?T.setAttribute("state",p):T.removeAttribute("state"),h?T.setAttribute("initial-focus",h):T.removeAttribute("initial-focus"),r?T.setAttribute("submit-text",r):T.removeAttribute("submit-text"),E?T.setAttribute("cancel-text",E):T.removeAttribute("cancel-text"),L?T.setAttribute("loading-text",L):T.removeAttribute("loading-text"),y&&(T.dialogId=y),A&&(T.config=A),o?T.setAttribute("headless",""):T.removeAttribute("headless")},[s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o]),P.default.createElement("ui-dialog",{ref:M,...B},m)});Oe.displayName="Dialog";const Ve=c.createContext(null),me="data-ui-dialog-react-host-refcount";function Br({children:g,hostId:u="ui-dialog-react-host"}){const e=c.useRef(null);e.current||(e.current=oe.createDialogManager()),c.useEffect(()=>{var i;if(typeof document>"u")return;let t=document.getElementById(u);const a=!t;t||(t=document.createElement("div"),t.id=u,t.setAttribute("data-ui-dialog-react-host","true"),document.body.appendChild(t));const v=Number(t.getAttribute(me)||"0");return t.setAttribute(me,String(Math.max(0,v)+1)),(i=e.current)==null||i.setContainer(t),()=>{var b,d;if((b=e.current)==null||b.destroy("unmount"),e.current=null,!t||!t.isConnected)return;const n=Number(t.getAttribute(me)||"1"),l=Math.max(0,n-1);l===0?(t.removeAttribute(me),a&&((d=t.parentElement)==null||d.removeChild(t))):t.setAttribute(me,String(l))}},[u]);const s=c.useMemo(()=>({open:(t={})=>{var a;return((a=e.current)==null?void 0:a.open(t))??Promise.resolve({id:"",action:"dismiss"})},confirm:(t={})=>{var a;return((a=e.current)==null?void 0:a.confirm(t))??Promise.resolve({id:"",action:"dismiss"})}}),[]);return P.default.createElement(Ve.Provider,{value:s},g)}function jr(){const g=c.useContext(Ve);if(!g)throw new Error("useDialog must be used within <DialogProvider>.");return g}const Ce=P.default.forwardRef(function({children:u,onOpen:e,onClose:s,...t},a){const v=c.useRef(null);return P.default.useImperativeHandle(a,()=>v.current),c.useEffect(()=>{const i=v.current;if(!i)return;const n=()=>e==null?void 0:e(),l=()=>s==null?void 0:s();return i.addEventListener("open",n),i.addEventListener("close",l),()=>{i.removeEventListener("open",n),i.removeEventListener("close",l)}},[e,s]),P.default.createElement("ui-popover",{ref:v,...t},u)});Ce.displayName="Popover";const qr=typeof window<"u"?c.useLayoutEffect:c.useEffect,et=P.default.forwardRef(function({children:u,selected:e,value:s,orientation:t,activation:a,variant:v,size:i,density:n,tone:l,stretched:b,shape:d,elevation:w,loop:p,bare:h,headless:r,onChange:E,onTabChange:L,...y},A){const o=c.useRef(null);return c.useImperativeHandle(A,()=>o.current),c.useEffect(()=>{const f=o.current;if(!f)return;const R=k=>{const H=k.detail;H&&(E==null||E(H.index),L==null||L(H))};return f.addEventListener("change",R),()=>{f.removeEventListener("change",R)}},[E,L]),qr(()=>{const f=o.current;if(!f)return;const R=(H,S)=>{const N=f.getAttribute(H);if(S==null){N!=null&&f.removeAttribute(H);return}N!==S&&f.setAttribute(H,S)},k=(H,S)=>{S?R(H,""):R(H,null)};R("selected",e!=null?String(e):null),R("value",s||null),R("orientation",t&&t!=="horizontal"?t:null),R("activation",a&&a!=="auto"?a:null),R("variant",v&&v!=="default"?v:null),R("size",i&&i!=="md"?i:null),R("density",n&&n!=="default"?n:null),R("tone",l&&l!=="brand"?l:null),R("shape",d&&d!=="rounded"?d:null),R("elevation",w&&w!=="low"?w:null),R("loop",p===!1?"false":p===!0?"":null),k("stretched",b),k("bare",h),k("headless",r)},[e,s,t,a,v,i,n,l,b,d,w,p,h,r]),P.default.createElement("ui-tabs",{ref:o,...y},u)});et.displayName="Tabs";const se=typeof window<"u"?c.useLayoutEffect:c.useEffect,tt=P.default.forwardRef(function({children:u,open:e,placement:s,variant:t,density:a,shape:v,elevation:i,tone:n,closeOnSelect:l,typeahead:b,onOpen:d,onClose:w,onChange:p,onSelect:h,onSelectDetail:r,...E},L){const y=c.useRef(null);return P.default.useImperativeHandle(L,()=>y.current),c.useEffect(()=>{const A=y.current;if(!A)return;const o=()=>d==null?void 0:d(),f=()=>w==null?void 0:w(),R=H=>{var N;const S=(N=H.detail)==null?void 0:N.open;typeof S=="boolean"&&(p==null||p(S))},k=H=>{const S=H.detail||{};r==null||r(S),typeof S.index=="number"&&(h==null||h(S.index))};return A.addEventListener("open",o),A.addEventListener("close",f),A.addEventListener("change",R),A.addEventListener("select",k),()=>{A.removeEventListener("open",o),A.removeEventListener("close",f),A.removeEventListener("change",R),A.removeEventListener("select",k)}},[d,w,p,h,r]),se(()=>{const A=y.current;!A||e==null||(e?A.setAttribute("open",""):A.removeAttribute("open"))},[e]),se(()=>{const A=y.current;A&&(s?A.setAttribute("placement",s):A.removeAttribute("placement"))},[s]),se(()=>{const A=y.current;A&&(t&&t!=="default"?A.setAttribute("variant",t):A.removeAttribute("variant"))},[t]),se(()=>{const A=y.current;A&&(a&&a!=="default"?A.setAttribute("density",a):A.removeAttribute("density"))},[a]),se(()=>{const A=y.current;A&&(v&&v!=="default"?A.setAttribute("shape",v):A.removeAttribute("shape"))},[v]),se(()=>{const A=y.current;A&&(i&&i!=="default"?A.setAttribute("elevation",i):A.removeAttribute("elevation"))},[i]),se(()=>{const A=y.current;A&&(n&&n!=="default"&&n!=="brand"?A.setAttribute("tone",n):A.removeAttribute("tone"))},[n]),se(()=>{const A=y.current;if(A){if(l==null){A.removeAttribute("close-on-select");return}A.setAttribute("close-on-select",l?"true":"false")}},[l]),se(()=>{const A=y.current;if(A){if(b==null){A.removeAttribute("typeahead");return}A.setAttribute("typeahead",b?"true":"false")}},[b]),P.default.createElement("ui-menu",{ref:y,...E},u)});tt.displayName="Menu";const Jr=typeof window<"u"?c.useLayoutEffect:c.useEffect,rt=P.default.forwardRef(function({children:u,name:e,iconVariant:s,size:t,color:a,secondaryColor:v,variant:i,tone:n,shape:l,spin:b,pulse:d,badge:w,label:p,decorative:h,strokeWidth:r,absoluteStrokeWidth:E,strokeLinecap:L,strokeLinejoin:y,rotate:A,flip:o,rtl:f,...R},k){const H=c.useRef(null);return c.useImperativeHandle(k,()=>H.current),Jr(()=>{const S=H.current;S&&(e?S.setAttribute("name",e):S.removeAttribute("name"),s?S.setAttribute("icon-variant",s):S.removeAttribute("icon-variant"),t!=null&&t!==""?S.setAttribute("size",String(t)):S.removeAttribute("size"),a?S.setAttribute("color",a):S.removeAttribute("color"),v?S.setAttribute("secondary-color",v):S.removeAttribute("secondary-color"),i&&i!=="default"?S.setAttribute("variant",i):S.removeAttribute("variant"),n&&n!=="default"?S.setAttribute("tone",n):S.removeAttribute("tone"),l&&l!=="default"?S.setAttribute("shape",l):S.removeAttribute("shape"),b?S.setAttribute("spin",""):S.removeAttribute("spin"),d?S.setAttribute("pulse",""):S.removeAttribute("pulse"),w?S.setAttribute("badge",""):S.removeAttribute("badge"),p?S.setAttribute("label",p):S.removeAttribute("label"),h?S.setAttribute("decorative",""):S.removeAttribute("decorative"),r!=null&&r!==""?S.setAttribute("stroke-width",String(r)):S.removeAttribute("stroke-width"),E?S.setAttribute("absolute-stroke-width",""):S.removeAttribute("absolute-stroke-width"),L?S.setAttribute("stroke-linecap",L):S.removeAttribute("stroke-linecap"),y?S.setAttribute("stroke-linejoin",y):S.removeAttribute("stroke-linejoin"),A!=null&&Number.isFinite(A)?S.setAttribute("rotate",String(A)):S.removeAttribute("rotate"),o?S.setAttribute("flip",o):S.removeAttribute("flip"),f?S.setAttribute("rtl",""):S.removeAttribute("rtl"))},[e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f]),P.default.createElement("ui-icon",{ref:H,...R},u)});rt.displayName="Icon";function ce(g){if(!g)return{};const u={...g};return u.type!=null&&u.level==null&&(u.level=u.type),delete u.type,u}function Gr(g,u={}){return ee.toastAdvanced.show({message:g,level:"info",...ce(u)})}const _r={show(g,u={}){return ee.toastAdvanced.show({message:g,...ce(u)})},success(g,u={}){return ee.toastAdvanced.success(g,ce(u))},error(g,u={}){return ee.toastAdvanced.error(g,ce(u))},warning(g,u={}){return ee.toastAdvanced.warning(g,ce(u))},info(g,u={}){return ee.toastAdvanced.info(g,ce(u))},loading(g,u={}){return ee.toastAdvanced.loading(g,ce(u))},dismiss(g){return ee.toastAdvanced.dismiss(String(g))},clear(){return ee.toastAdvanced.clear()},configure(g){return ee.toastAdvanced.configure(g)}};function Mr({config:g}={}){return c.useEffect(()=>{g&&ee.toastAdvanced.configure(g)},[g]),null}const zr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Dr(g){if(!g)return{};const u={...g};return u.type!=null&&u.level==null&&(u.level=u.type),delete u.type,u}const it=P.default.forwardRef(function({children:u,position:e,maxVisible:s,theme:t,config:a,headless:v,onShow:i,onHide:n,...l},b){const d=c.useRef(i),w=c.useRef(n);return c.useEffect(()=>{d.current=i},[i]),c.useEffect(()=>{w.current=n},[n]),c.useImperativeHandle(b,()=>({show(p,h){let r="";const E=Dr(h),L=E.onShow,y=E.onHide;return r=ee.toastAdvanced.show({message:p,...E,onShow:()=>{var o;L==null||L(),(o=d.current)==null||o.call(d,{id:r,message:p})},onHide:()=>{var o;y==null||y(),(o=w.current)==null||o.call(w,{id:r})}}).id,r},hide(p){ee.toastAdvanced.dismiss(String(p))},clear(){ee.toastAdvanced.clear()},configure(p){ee.toastAdvanced.configure(p)}}),[]),zr(()=>{const p={...a||{}};e&&(p.position=e),t&&(p.theme=t),typeof s=="number"&&Number.isFinite(s)&&(p.maxVisible=Math.max(1,Math.trunc(s))),Object.keys(p).length>0&&ee.toastAdvanced.configure(p)},[e,s,t,a]),u==null&&Object.keys(l).length===0?null:P.default.createElement("div",{...l},u)});it.displayName="Toast";const Qr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Ur(g){const{children:u,anchorId:e,open:s,placement:t,align:a,offset:v,variant:i,density:n,shape:l,elevation:b,tone:d,closeOnOutside:w,closeOnEscape:p,onOpen:h,onClose:r,onOpenChange:E,onRequestClose:L,...y}=g,A=c.useRef(null);return c.useEffect(()=>{ue("ui-floating-toolbar","FloatingToolbar")},[]),c.useEffect(()=>{const o=A.current;if(!o)return;const f=()=>{h==null||h(),E==null||E(!0)},R=H=>{const S=H.detail||{};r==null||r(S),E==null||E(!1,S)},k=H=>{const S=H.detail||{};typeof S.reason=="string"&&(L==null||L({reason:S.reason}))};return o.addEventListener("open",f),o.addEventListener("close",R),o.addEventListener("request-close",k),()=>{o.removeEventListener("open",f),o.removeEventListener("close",R),o.removeEventListener("request-close",k)}},[h,r,E,L]),Qr(()=>{var k,H,S;const o=A.current;if(!o)return;const f=(N,I)=>{const $=o.getAttribute(N);if(I==null){$!=null&&o.removeAttribute(N);return}$!==I&&o.setAttribute(N,I)},R=(N,I,$=void 0)=>{if(I==null){$!==void 0&&f(N,$?null:"false");return}f(N,I?"":"false")};if(f("anchor-id",e??null),f("placement",t&&t!=="auto"?t:null),f("align",a&&a!=="center"?a:null),f("offset",typeof v=="number"&&Number.isFinite(v)?String(v):null),f("variant",i&&i!=="default"?i:null),f("density",n&&n!=="default"?n:null),f("shape",l&&l!=="default"?l:null),f("elevation",b&&b!=="default"?b:null),f("tone",d&&d!=="default"&&d!=="brand"?d:null),R("close-on-outside",w,!0),R("close-on-escape",p,!0),s&&e){(k=o.showForAnchorId)==null||k.call(o,e);return}if(s){(H=o.openToolbar)==null||H.call(o);return}if(s===!1){(S=o.closeToolbar)==null||S.call(o,"programmatic");return}o.removeAttribute("open")},[s,e,t,a,v,i,n,l,b,d,w,p]),P.default.createElement("ui-floating-toolbar",{ref:A,...y},u)}const Xr=typeof window<"u"?P.useLayoutEffect:P.useEffect,ut=P.forwardRef(function({children:u,orientation:e,variant:s,tone:t,state:a,elevation:v,density:i,wrap:n,loop:l,disabled:b,activeIndex:d,ariaLabel:w,onNavigate:p,...h},r){const E=P.useRef(null);return P.useImperativeHandle(r,()=>E.current),P.useEffect(()=>{ue("ui-block-controls","BlockControls")},[]),P.useEffect(()=>{const L=E.current;if(!L||!p)return;const y=A=>p(A.detail);return L.addEventListener("ui-navigate",y),()=>L.removeEventListener("ui-navigate",y)},[p]),Xr(()=>{const L=E.current;L&&(e?L.setAttribute("orientation",e):L.removeAttribute("orientation"),s&&s!=="floating"?L.setAttribute("variant",s):L.removeAttribute("variant"),t&&t!=="neutral"?L.setAttribute("tone",t):L.removeAttribute("tone"),a&&a!=="idle"?L.setAttribute("state",a):L.removeAttribute("state"),v&&v!=="md"?L.setAttribute("elevation",v):L.removeAttribute("elevation"),i?L.setAttribute("density",i):L.removeAttribute("density"),n==null?L.removeAttribute("wrap"):n?L.setAttribute("wrap",""):L.removeAttribute("wrap"),l==null?(L.removeAttribute("loop"),L.removeAttribute("no-loop")):l?(L.setAttribute("loop",""),L.removeAttribute("no-loop")):(L.removeAttribute("loop"),L.setAttribute("no-loop","")),b==null?L.removeAttribute("disabled"):b?L.setAttribute("disabled",""):L.removeAttribute("disabled"),typeof d=="number"&&Number.isFinite(d)?L.setAttribute("active-index",String(d)):L.removeAttribute("active-index"),w?L.setAttribute("aria-label",w):L.removeAttribute("aria-label"))},[e,s,t,a,v,i,n,l,b,d,w]),P.createElement("ui-block-controls",{ref:E,...h},u)});ut.displayName="BlockControls";const Yr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Zr(g){const{children:u,open:e,onSelect:s,...t}=g,a=c.useRef(null);return c.useEffect(()=>{ue("ui-command-palette","CommandPalette")},[]),c.useEffect(()=>{const v=a.current;if(!v)return;const i=n=>{var b;const l=(b=n.detail)==null?void 0:b.index;typeof l=="number"&&(s==null||s(l))};return v.addEventListener("select",i),()=>v.removeEventListener("select",i)},[s]),Yr(()=>{const v=a.current;v&&(e?v.setAttribute("open",""):v.removeAttribute("open"))},[e]),P.default.createElement("ui-command-palette",{ref:a,...t},u)}function Kr(g){const{items:u,anchorId:e,anchorPoint:s,open:t,disabled:a,state:v,stateText:i,variant:n,density:l,shape:b,elevation:d,tone:w,closeOnSelect:p,closeOnEscape:h,typeahead:r,children:E,onOpenDetail:L,onCloseDetail:y,onOpen:A,onClose:o,onChange:f,onSelect:R,...k}=g,H=c.useRef(null);c.useEffect(()=>{const $=H.current;if(!$)return;const m=G=>{const q=G.detail;A==null||A(),q&&(L==null||L(q))},B=G=>{const q=G.detail;o==null||o(),q&&(y==null||y(q))},M=G=>{var J;const q=(J=G.detail)==null?void 0:J.open;typeof q=="boolean"&&(f==null||f(q))},T=G=>{R==null||R(G.detail)};return $.addEventListener("open",m),$.addEventListener("close",B),$.addEventListener("change",M),$.addEventListener("select",T),()=>{$.removeEventListener("open",m),$.removeEventListener("close",B),$.removeEventListener("change",M),$.removeEventListener("select",T)}},[A,o,L,y,f,R]),c.useEffect(()=>{const $=H.current;if(!(!$||t==null)){if(!t){$.close?$.close():$.open=!1;return}if(s&&$.openAt){$.openAt(s);return}if(e){if($.openForAnchorId){$.openForAnchorId(e);return}if($.showForAnchorId){$.showForAnchorId(e);return}}$.open=!0}},[t,e,s]);const S=$=>$?$.map((m,B)=>{if(m.separator)return P.default.createElement("div",{key:B,className:"separator",role:"separator"});let M=null;m.icon&&(M=P.default.createElement("span",{className:"icon"},m.icon));let T=null;return m.submenu&&(T=P.default.createElement("div",{className:"submenu"},S(m.submenu))),P.default.createElement("div",{key:B,className:"menuitem",role:"menuitem",tabIndex:m.disabled?-1:0,"aria-disabled":m.disabled?"true":void 0,"data-value":m.value,onClick:m.disabled?void 0:m.onClick},M,P.default.createElement("span",{className:"label"},P.default.createElement("span",{className:"text"},m.label),m.description?P.default.createElement("span",{className:"caption"},m.description):null),m.shortcut?P.default.createElement("span",{className:"shortcut"},m.shortcut):null,m.submenu&&P.default.createElement("span",{className:"submenu-arrow"},"▶"),T)}):null,N=P.default.Children.count(E)>0,I=!!t&&!s&&!e;return P.default.createElement("ui-context-menu",{ref:H,...k,...I?{open:""}:{},...n&&n!=="default"?{variant:n}:{},...l&&l!=="default"?{density:l}:{},...b&&b!=="default"?{shape:b}:{},...d&&d!=="default"?{elevation:d}:{},...w&&w!=="default"&&w!=="brand"?{tone:w}:{},...a?{disabled:""}:{},...v&&v!=="idle"?{state:v}:{},...i?{"state-text":i}:{},...p==null?{}:{"close-on-select":p?"true":"false"},...h==null?{}:{"close-on-escape":h?"true":"false"},...r==null?{}:{typeahead:r?"true":"false"}},N?E:P.default.createElement("div",{slot:"menu"},S(u)))}const Wr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Or(g){const{children:u,anchorId:e,open:s,placement:t,offset:a,strategy:v,arrow:i,variant:n,tone:l,radius:b,size:d,closeOnOutside:w,closeOnEscape:p,onOpen:h,onClose:r,onOpenChange:E,...L}=g,y=c.useRef(null);return c.useEffect(()=>{ue("ui-selection-popup","SelectionPopup")},[]),c.useEffect(()=>{const A=y.current;if(!A)return;const o=()=>{h==null||h(),E==null||E(!0)},f=()=>{r==null||r(),E==null||E(!1)};return A.addEventListener("open",o),A.addEventListener("close",f),()=>{A.removeEventListener("open",o),A.removeEventListener("close",f)}},[h,r,E]),Wr(()=>{var R,k;const A=y.current;if(!A)return;const o=(H,S)=>{const N=A.getAttribute(H);if(S==null){N!=null&&A.removeAttribute(H);return}N!==S&&A.setAttribute(H,S)},f=(H,S,N=void 0)=>{if(S==null){N!==void 0&&o(H,N?null:"false");return}S?o(H,""):o(H,"false")};o("anchor-id",e??null),o("placement",t&&t!=="top"?t:null),o("offset",typeof a=="number"&&Number.isFinite(a)?String(a):null),o("strategy",v&&v!=="fixed"?v:null),o("variant",n&&n!=="default"?n:null),o("tone",l&&l!=="brand"?l:null),o("radius",b?String(b):null),o("size",d&&d!=="md"?d:null),f("arrow",i),f("close-on-outside",w,!0),f("close-on-escape",p,!0),s&&e?(R=A.openFor)==null||R.call(A,e):s?A.setAttribute("open",""):s===!1?(k=A.close)==null||k.call(A):A.removeAttribute("open")},[s,e,t,a,v,i,n,l,b,d,w,p]),P.default.createElement("ui-selection-popup",{ref:y,...L},u)}const Vr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Cr(g){const{children:u,open:e,position:s,...t}=g,a=c.useRef(null);return c.useEffect(()=>{ue("ui-plugin-panel","PluginPanel")},[]),Vr(()=>{const v=a.current;v&&(e?v.setAttribute("open",""):v.removeAttribute("open"),s&&v.setAttribute("position",s))},[e,s]),P.default.createElement("ui-plugin-panel",{ref:a,...t},u)}const ei=typeof window<"u"?c.useLayoutEffect:c.useEffect,nt=P.default.forwardRef(function(u,e){const{children:s,onSubmit:t,onInvalid:a,onValidate:v,onAutosave:i,onDirtyChange:n,novalidate:l,autosave:b,autosaveDelay:d,guardUnsaved:w,heading:p,description:h,state:r,stateText:E,loadingText:L,variant:y,tone:A,density:o,shape:f,elevation:R,gap:k,headless:H,loading:S,disabled:N,...I}=u,$=c.useRef(null);return c.useImperativeHandle(e,()=>$.current),c.useEffect(()=>{const m=$.current;if(!m)return;const B=J=>{const x=J.detail||{};t==null||t(x.values||{})},M=J=>{const x=J.detail||{};a==null||a(x.errors||{},x.values||{})},T=J=>{const x=J.detail||{};v==null||v({valid:!!x.valid,errors:x.errors||{}})},G=J=>{const x=J.detail||{};i==null||i(x.values||{})},q=J=>{const x=J.detail||{};n==null||n(!!x.dirty,x.values||{})};return m.addEventListener("submit",B),m.addEventListener("invalid",M),m.addEventListener("validate",T),m.addEventListener("autosave",G),m.addEventListener("dirty-change",q),()=>{m.removeEventListener("submit",B),m.removeEventListener("invalid",M),m.removeEventListener("validate",T),m.removeEventListener("autosave",G),m.removeEventListener("dirty-change",q)}},[t,a,v,i,n]),ei(()=>{const m=$.current;m&&(l?m.setAttribute("novalidate",""):m.removeAttribute("novalidate"),b?m.setAttribute("autosave",""):m.removeAttribute("autosave"),typeof d=="number"&&Number.isFinite(d)?m.setAttribute("autosave-delay",String(d)):m.removeAttribute("autosave-delay"),w?m.setAttribute("guard-unsaved",""):m.removeAttribute("guard-unsaved"),p!=null&&p!==""?m.setAttribute("heading",p):m.removeAttribute("heading"),h!=null&&h!==""?m.setAttribute("description",h):m.removeAttribute("description"),r&&r!=="default"?m.setAttribute("state",r):m.removeAttribute("state"),E!=null&&E!==""?m.setAttribute("state-text",E):m.removeAttribute("state-text"),L!=null&&L!==""?m.setAttribute("loading-text",L):m.removeAttribute("loading-text"),y&&y!=="default"?m.setAttribute("variant",y):m.removeAttribute("variant"),A&&A!=="default"?m.setAttribute("tone",A):m.removeAttribute("tone"),o&&o!=="default"?m.setAttribute("density",o):m.removeAttribute("density"),f&&f!=="default"?m.setAttribute("shape",f):m.removeAttribute("shape"),R&&R!=="default"?m.setAttribute("elevation",R):m.removeAttribute("elevation"),k?m.setAttribute("gap",k):m.removeAttribute("gap"),H?m.setAttribute("headless",""):m.removeAttribute("headless"),S?m.setAttribute("loading",""):m.removeAttribute("loading"),N?m.setAttribute("disabled",""):m.removeAttribute("disabled"))},[l,b,d,w,p,h,r,E,L,y,A,o,f,R,k,H,S,N]),P.default.createElement("ui-form",{ref:$,...I},s)});nt.displayName="Form";function ti(){const g=c.useRef(null),u=c.useCallback(async()=>{const i=g.current;return i?await i.submit():!1},[]),e=c.useCallback(async()=>{const i=g.current;return i?await i.validate():{valid:!0,errors:{}}},[]),s=c.useCallback(()=>{var n;const i=g.current;return i?(n=i.getValues)==null?void 0:n.call(i):{}},[]),t=c.useCallback(i=>{var l;const n=g.current;return(l=n==null?void 0:n.reset)==null?void 0:l.call(n,i)},[]),a=c.useCallback(()=>{var n;const i=g.current;return i?typeof i.isDirty=="function"?!!i.isDirty():((n=i.hasAttribute)==null?void 0:n.call(i,"dirty"))||!1:!1},[]),v=c.useCallback(i=>{var l;const n=g.current;return(l=n==null?void 0:n.markClean)==null?void 0:l.call(n,i)},[]);return{ref:g,submit:u,validate:e,getValues:s,reset:t,isDirty:a,markClean:v}}function Ne(g,u){if(g){if(typeof g=="function"){g(u);return}g.current=u}}function ri(g){const{placement:u="bottom",offset:e=8,open:s,onOpen:t,onClose:a,role:v="menu"}=g||{},i=c.useRef(null),n=c.useRef(null),l=c.useRef(null),b=c.useRef(`floating-${Math.random().toString(36).slice(2,9)}`),[d,w]=c.useState({top:0,left:0,placement:u}),p=typeof s<"u",[h,r]=c.useState(!!s),E=p?!!s:h,L=c.useCallback(()=>{const T=i.current,G=n.current;if(!T||!G)return;const q=oe.computePosition(T,G,{placement:u,offset:e});w({top:Math.round(q.top),left:Math.round(q.left),placement:q.placement,arrow:q.x||q.y?{x:q.x,y:q.y}:void 0})},[u,e]),y=c.useCallback(T=>{p||r(T),T?t==null||t():a==null||a()},[p,t,a]),A=c.useCallback(()=>y(!E),[E,y]),o=c.useCallback(()=>y(!0),[y]),f=c.useCallback(()=>y(!1),[y]);c.useEffect(()=>{if(!E)return;const T=i.current,G=n.current;if(!T||!G)return;L();const q=()=>{l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>L())},J=()=>{l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>L())};window.addEventListener("scroll",q,!0),window.addEventListener("resize",J);let x=null,j=null;try{typeof ResizeObserver<"u"&&(x=new ResizeObserver(J),j=new ResizeObserver(J),x.observe(T),j.observe(G))}catch{x=j=null}return()=>{window.removeEventListener("scroll",q,!0),window.removeEventListener("resize",J),x==null||x.disconnect(),j==null||j.disconnect(),l.current&&cancelAnimationFrame(l.current),l.current=null}},[E,L]);const R=c.useCallback(T=>{i.current=T},[]),k=c.useCallback(T=>{n.current=T},[]),H=()=>n.current?Array.from(n.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')).filter(Boolean):[],S=T=>{const G=H();if(!G.length)return;const q=Math.max(0,Math.min(G.length-1,T));try{G[q].focus()}catch{}},N=()=>S(0),I=()=>{const T=H();T.length&&S(T.length-1)},$=()=>{const T=H(),G=T.findIndex(q=>q===document.activeElement);S(G<0?0:(G+1)%T.length)},m=()=>{const T=H(),G=T.findIndex(q=>q===document.activeElement);S(G<=0?T.length-1:G-1)};return{referenceRef:R,floatingRef:k,coords:d,update:L,open:E,setOpen:y,toggle:A,openPopup:o,closePopup:f,getReferenceProps:(T={})=>{const{onClick:G,onKeyDown:q,ref:J,...x}=T;return{...x,ref:j=>{R(j),Ne(J,j)},"aria-haspopup":v,"aria-controls":b.current,"aria-expanded":E?"true":"false",onClick:j=>{G==null||G(j),!j.defaultPrevented&&A()},onKeyDown:j=>{q==null||q(j),!j.defaultPrevented&&j.key==="ArrowDown"&&(j.preventDefault(),o(),setTimeout(()=>N(),0))}}},getFloatingProps:(T={})=>{const{onKeyDown:G,style:q,ref:J,...x}=T;return{...x,id:b.current,ref:j=>{k(j),Ne(J,j)},role:v,tabIndex:-1,style:{...q||{},position:"absolute",top:`${d.top}px`,left:`${d.left}px`},hidden:!E,onKeyDown:j=>{G==null||G(j),!j.defaultPrevented&&(j.key==="Escape"?(j.preventDefault(),f()):j.key==="ArrowDown"?(j.preventDefault(),$()):j.key==="ArrowUp"?(j.preventDefault(),m()):j.key==="Home"?(j.preventDefault(),N()):j.key==="End"&&(j.preventDefault(),I()))}}},focusFirstItem:N,focusLastItem:I,focusNext:$,focusPrev:m}}function X(g){if(g!=null){if(typeof g=="object")try{return JSON.stringify(g)}catch{return}return String(g)}}function ii(g){const{children:u,className:e,variant:s,tone:t,state:a,elevation:v,radius:i,interactive:n,disabled:l,headless:b,p:d,px:w,py:p,pt:h,pr:r,pb:E,pl:L,m:y,mx:A,my:o,mt:f,mr:R,mb:k,ml:H,width:S,w:N,minWidth:I,minW:$,maxWidth:m,maxW:B,height:M,h:T,minHeight:G,minH:q,maxHeight:J,maxH:x,display:j,position:_,inset:z,top:U,right:D,bottom:F,left:O,justify:Y,alignSelf:Q,alignContent:Z,gap:K,rowGap:W,columnGap:te,flexBasis:Ae,flexGrow:pe,flexShrink:Ee,gridArea:ye,gridColumn:Le,gridColumnStart:we,gridColumnEnd:re,gridRow:V,gridRowStart:Mt,gridRowEnd:zt,align:Dt,bg:Qt,color:Ut,opacity:Xt,overflow:Yt,overflowX:Zt,overflowY:Kt,zIndex:Wt,...Ot}=g,Vt={className:e,...Ot,p:X(d),px:X(w),py:X(p),pt:X(h),pr:X(r),pb:X(E),pl:X(L),m:X(y),mx:X(A),my:X(o),mt:X(f),mr:X(R),mb:X(k),ml:X(H),width:X(S),w:X(N),minwidth:X(I??$),maxwidth:X(m??B),height:X(M),h:X(T),minheight:X(G??q),maxheight:X(J??x),display:X(j),position:X(_),inset:X(z),top:X(U),right:X(D),bottom:X(F),left:X(O),justify:X(Y),flexbasis:X(Ae),flexgrow:X(pe),flexshrink:X(Ee),alignself:X(Q),aligncontent:X(Z),gap:X(K),rowgap:X(W),columngap:X(te),gridarea:X(ye),gridcolumn:X(Le),gridcolumnstart:X(we),gridcolumnend:X(re),gridrow:X(V),gridrowstart:X(Mt),gridrowend:X(zt),align:X(Dt),bg:X(Qt),color:X(Ut),opacity:X(Xt),overflow:X(Yt),overflowx:X(Zt),overflowy:X(Kt),zindex:X(Wt),variant:s&&s!=="default"?s:void 0,tone:t&&t!=="default"?t:void 0,state:a&&a!=="idle"?a:void 0,elevation:v&&v!=="default"?v:void 0,radius:i&&i!=="default"?i:void 0,interactive:n?"":void 0,disabled:l?"":void 0,headless:b?"":void 0};return P.default.createElement("ui-box",Vt,u)}function fe(g){if(g!=null){if(typeof g=="object")try{return JSON.stringify(g)}catch{return}return String(g)}}function ui(g){const{children:u,className:e,direction:s,align:t,justify:a,wrap:v,gap:i,rowGap:n,columnGap:l,display:b,headless:d,...w}=g,p={className:e,...w,direction:fe(s),align:fe(t),justify:fe(a),wrap:fe(v),gap:fe(i),rowgap:fe(n),columngap:fe(l),display:fe(b),headless:d?"":void 0};return P.default.createElement("ui-flex",p,u)}function ie(g){if(g!=null){if(typeof g=="object")try{return JSON.stringify(g)}catch{return}return String(g)}}function ni(g){const{children:u,className:e,columns:s,rows:t,gap:a,rowGap:v,columnGap:i,autoFlow:n,autoRows:l,autoColumns:b,align:d,justify:w,place:p,alignContent:h,justifyContent:r,placeContent:E,display:L,headless:y,...A}=g,o={className:e,...A,columns:ie(s),rows:ie(t),gap:ie(a),rowgap:ie(v),columngap:ie(i),autoflow:ie(n),autorows:ie(l),autocolumns:ie(b),align:ie(d),justify:ie(w),place:ie(p),aligncontent:ie(h),justifycontent:ie(r),placecontent:ie(E),display:ie(L),headless:y?"":void 0};return P.default.createElement("ui-grid",o,u)}const li=typeof window<"u"?c.useLayoutEffect:c.useEffect,lt=P.default.forwardRef(function({size:u="medium",variant:e="default",tone:s="neutral",radius:t="md",density:a="comfortable",inset:v,children:i,...n},l){const b=c.useRef(null);return P.default.useImperativeHandle(l,()=>b.current),li(()=>{const d=b.current;if(!d)return;const w=(h,r)=>{const E=d.getAttribute(h);if(r==null){E!=null&&d.removeAttribute(h);return}E!==r&&d.setAttribute(h,r)},p=(h,r)=>{r?d.hasAttribute(h)||d.setAttribute(h,""):d.hasAttribute(h)&&d.removeAttribute(h)};w("size",u!=="medium"?u:null),w("variant",e!=="default"?e:null),w("tone",s!=="neutral"?s:null),w("radius",t!=="md"?t:null),w("density",a!=="comfortable"?a:null),p("inset",v)},[u,e,s,t,a,v]),P.default.createElement("ui-section",{ref:b,...n},i)});lt.displayName="Section";function si(g){const{children:u,size:e="md",...s}=g;return P.default.createElement("ui-container",{size:e,...s},u)}const oi=typeof window<"u"?c.useLayoutEffect:c.useEffect,st=P.default.forwardRef(function({children:u,collapsed:e,collapsible:s,rail:t,position:a,value:v,items:i,variant:n,size:l,density:b,tone:d,showIcons:w,showBadges:p,headless:h,onSelect:r,onChange:E,onToggle:L,onCollapseChange:y,...A},o){const f=c.useRef(null);return c.useImperativeHandle(o,()=>f.current),c.useEffect(()=>{const R=f.current;if(!R)return;const k=I=>{const $=I.detail;$&&(r==null||r($))},H=I=>{const $=I.detail;$&&(E==null||E($))},S=I=>{var m;const $=(m=I.detail)==null?void 0:m.collapsed;typeof $=="boolean"&&(L==null||L($))},N=I=>{var m;const $=(m=I.detail)==null?void 0:m.collapsed;typeof $=="boolean"&&(y==null||y($))};return R.addEventListener("select",k),R.addEventListener("change",H),R.addEventListener("toggle",S),R.addEventListener("collapse-change",N),()=>{R.removeEventListener("select",k),R.removeEventListener("change",H),R.removeEventListener("toggle",S),R.removeEventListener("collapse-change",N)}},[r,E,L,y]),oi(()=>{const R=f.current;if(!R)return;const k=(S,N)=>{const I=R.getAttribute(S);if(N==null){I!=null&&R.removeAttribute(S);return}I!==N&&R.setAttribute(S,N)},H=(S,N,I)=>{if(N==null){I!==void 0&&I===!1&&k(S,null);return}N?k(S,""):k(S,null)};if(H("collapsed",e),H("collapsible",s),H("rail",t),H("headless",h),k("position",a&&a!=="left"?a:null),k("value",v!=null&&v!==""?String(v):null),i&&i.length)try{k("items",JSON.stringify(i))}catch{k("items",null)}else k("items",null);k("variant",n&&n!=="surface"?n:null),k("size",l&&l!=="md"?l:null),k("density",b&&b!=="default"?b:null),k("tone",d&&d!=="default"?d:null),typeof w=="boolean"?k("show-icons",w?"true":"false"):k("show-icons",null),typeof p=="boolean"?k("show-badges",p?"true":"false"):k("show-badges",null)},[e,s,t,h,a,v,i,n,l,b,d,w,p]),P.default.createElement("ui-sidebar",{ref:f,...A},u)});st.displayName="Sidebar";const he=typeof window<"u"?c.useLayoutEffect:c.useEffect,ot=P.default.forwardRef(function({children:u,separator:e,maxItems:s,currentIndex:t,size:a,variant:v,tone:i,state:n,disabled:l,ariaLabel:b,onSelect:d,...w},p){const h=c.useRef(null);return c.useImperativeHandle(p,()=>h.current),c.useEffect(()=>{ue("ui-breadcrumb","Breadcrumb")},[]),c.useEffect(()=>{const r=h.current;if(!r||!d)return;const E=L=>{const y=L.detail;y&&d(y)};return r.addEventListener("ui-select",E),()=>r.removeEventListener("ui-select",E)},[d]),he(()=>{const r=h.current;r&&(e!=null&&e!==""?r.setAttribute("separator",e):r.removeAttribute("separator"))},[e]),he(()=>{const r=h.current;r&&(typeof s=="number"&&Number.isFinite(s)?r.setAttribute("max-items",String(s)):r.removeAttribute("max-items"))},[s]),he(()=>{const r=h.current;r&&(typeof t=="number"&&Number.isFinite(t)?r.setAttribute("current-index",String(t)):r.removeAttribute("current-index"))},[t]),he(()=>{const r=h.current;r&&(a&&a!=="md"?r.setAttribute("size",a):r.removeAttribute("size"),v&&v!=="default"?r.setAttribute("variant",v):r.removeAttribute("variant"),i?r.setAttribute("tone",i):r.removeAttribute("tone"),n&&n!=="idle"?r.setAttribute("state",n):r.removeAttribute("state"),l==null?r.removeAttribute("disabled"):l?r.setAttribute("disabled",""):r.removeAttribute("disabled"),b?r.setAttribute("aria-label",b):r.removeAttribute("aria-label"))},[a,v,i,n,l,b]),P.default.createElement("ui-breadcrumb",{ref:h,...w},u)});ot.displayName="Breadcrumb";const Re=typeof window<"u"?c.useLayoutEffect:c.useEffect,ft=P.default.forwardRef(function({children:u,sticky:e,bordered:s,dense:t,showMenuButton:a,onMenuTrigger:v,...i},n){const l=c.useRef(null);return c.useImperativeHandle(n,()=>l.current),c.useEffect(()=>{const b=l.current;if(!b||!v)return;const d=()=>v();return b.addEventListener("menu-trigger",d),()=>b.removeEventListener("menu-trigger",d)},[v]),Re(()=>{const b=l.current;b&&(e?b.setAttribute("sticky",""):b.removeAttribute("sticky"))},[e]),Re(()=>{const b=l.current;b&&(s?b.setAttribute("bordered",""):b.removeAttribute("bordered"))},[s]),Re(()=>{const b=l.current;b&&(t?b.setAttribute("dense",""):b.removeAttribute("dense"))},[t]),Re(()=>{const b=l.current;b&&(a?b.setAttribute("show-menu-button",""):b.removeAttribute("show-menu-button"))},[a]),P.default.createElement("ui-app-header",{ref:l,...i},u)});ft.displayName="AppHeader";const C=typeof window<"u"?c.useLayoutEffect:c.useEffect,ct=P.default.forwardRef(function({children:u,open:e,side:s,variant:t,density:a,shape:v,elevation:i,tone:n,size:l,state:b,inset:d,dismissible:w,closeOnOverlay:p,closeOnEsc:h,lockWhileLoading:r,showClose:E,initialFocus:L,title:y,description:A,ariaLabel:o,ariaLabelledBy:f,ariaDescribedBy:R,onOpen:k,onClose:H,onChange:S,...N},I){const $=c.useRef(null);return c.useImperativeHandle(I,()=>$.current),c.useEffect(()=>{const m=$.current;if(!m)return;const B=()=>k==null?void 0:k(),M=()=>H==null?void 0:H(),T=G=>{var J;const q=(J=G.detail)==null?void 0:J.open;typeof q=="boolean"&&(S==null||S(q))};return m.addEventListener("open",B),m.addEventListener("close",M),m.addEventListener("change",T),()=>{m.removeEventListener("open",B),m.removeEventListener("close",M),m.removeEventListener("change",T)}},[k,H,S]),C(()=>{const m=$.current;m&&(e?m.setAttribute("open",""):m.removeAttribute("open"))},[e]),C(()=>{const m=$.current;m&&(s?m.setAttribute("side",s):m.removeAttribute("side"))},[s]),C(()=>{const m=$.current;m&&(w?m.setAttribute("dismissible",""):m.removeAttribute("dismissible"))},[w]),C(()=>{const m=$.current;m&&(t&&t!=="default"?m.setAttribute("variant",t):m.removeAttribute("variant"))},[t]),C(()=>{const m=$.current;m&&(a&&a!=="default"?m.setAttribute("density",a):m.removeAttribute("density"))},[a]),C(()=>{const m=$.current;m&&(v&&v!=="default"?m.setAttribute("shape",v):m.removeAttribute("shape"))},[v]),C(()=>{const m=$.current;m&&(i&&i!=="default"?m.setAttribute("elevation",i):m.removeAttribute("elevation"))},[i]),C(()=>{const m=$.current;m&&(n&&n!=="default"&&n!=="brand"?m.setAttribute("tone",n):m.removeAttribute("tone"))},[n]),C(()=>{const m=$.current;m&&(l&&l!=="default"?m.setAttribute("size",l):m.removeAttribute("size"))},[l]),C(()=>{const m=$.current;m&&(b&&b!=="idle"?m.setAttribute("state",b):m.removeAttribute("state"))},[b]),C(()=>{const m=$.current;m&&(d?m.setAttribute("inset",""):m.removeAttribute("inset"))},[d]),C(()=>{const m=$.current;m&&(typeof p=="boolean"?m.setAttribute("close-on-overlay",String(p)):m.removeAttribute("close-on-overlay"))},[p]),C(()=>{const m=$.current;m&&(typeof h=="boolean"?m.setAttribute("close-on-esc",String(h)):m.removeAttribute("close-on-esc"))},[h]),C(()=>{const m=$.current;m&&(typeof r=="boolean"?m.setAttribute("lock-while-loading",String(r)):m.removeAttribute("lock-while-loading"))},[r]),C(()=>{const m=$.current;m&&(typeof E=="boolean"?m.setAttribute("show-close",String(E)):m.removeAttribute("show-close"))},[E]),C(()=>{const m=$.current;m&&(L?m.setAttribute("initial-focus",L):m.removeAttribute("initial-focus"))},[L]),C(()=>{const m=$.current;m&&(y?m.setAttribute("title",y):m.removeAttribute("title"))},[y]),C(()=>{const m=$.current;m&&(A?m.setAttribute("description",A):m.removeAttribute("description"))},[A]),C(()=>{const m=$.current;m&&(o?m.setAttribute("aria-label",o):m.removeAttribute("aria-label"))},[o]),C(()=>{const m=$.current;m&&(f?m.setAttribute("aria-labelledby",f):m.removeAttribute("aria-labelledby"))},[f]),C(()=>{const m=$.current;m&&(R?m.setAttribute("aria-describedby",R):m.removeAttribute("aria-describedby"))},[R]),P.default.createElement("ui-drawer",{ref:$,...N},u)});ct.displayName="Drawer";const fi=typeof window<"u"?c.useLayoutEffect:c.useEffect,dt=P.default.forwardRef(function({children:u,mode:e,variant:s,density:t,maxWidth:a,sidebarSide:v,collapsed:i,headless:n,sidebarWidth:l,asideWidth:b,onLayoutChange:d,...w},p){const h=c.useRef(null);return P.default.useImperativeHandle(p,()=>h.current),c.useEffect(()=>{const r=h.current;if(!r)return;const E=()=>d==null?void 0:d();return r.addEventListener("layoutchange",E),()=>r.removeEventListener("layoutchange",E)},[d]),fi(()=>{const r=h.current;r&&(e&&e!=="dashboard"?r.setAttribute("mode",e):r.removeAttribute("mode"),s&&s!=="default"?r.setAttribute("variant",s):r.removeAttribute("variant"),t&&t!=="default"?r.setAttribute("density",t):r.removeAttribute("density"),a?r.setAttribute("max-width",a):r.removeAttribute("max-width"),v&&v!=="start"?r.setAttribute("sidebar-side",v):r.removeAttribute("sidebar-side"),i?r.setAttribute("collapsed",""):r.removeAttribute("collapsed"),n?r.setAttribute("headless",""):r.removeAttribute("headless"),l?r.setAttribute("sidebar-width",l):r.removeAttribute("sidebar-width"),b?r.setAttribute("aside-width",b):r.removeAttribute("aside-width"))},[e,s,t,a,v,i,n,l,b]),P.default.createElement("ui-layout",{ref:h,...w},u)});dt.displayName="Layout";const at=c.createContext(null),ci=typeof window<"u"?c.useLayoutEffect:c.useEffect;function ae(g,u){var e,s;return u?{...g,...u,colors:{...g.colors,...u.colors||{}},shadows:{...g.shadows||{},...u.shadows||{}},spacing:{...g.spacing||{},...u.spacing||{}},typography:{...g.typography||{},...u.typography||{},size:{...((e=g.typography)==null?void 0:e.size)||{},...((s=u.typography)==null?void 0:s.size)||{}}},motion:{...g.motion||{},...u.motion||{}},zIndex:{...g.zIndex||{},...u.zIndex||{}},breakpoints:{...g.breakpoints||{},...u.breakpoints||{}}}:g}function di(){try{const g=getComputedStyle(document.documentElement),u=g.getPropertyValue("--ui-color-primary").trim();return u?{colors:{primary:u||void 0,text:g.getPropertyValue("--ui-color-text").trim()||void 0,background:g.getPropertyValue("--ui-color-background").trim()||void 0}}:{}}catch{return{}}}function ai(g,u){const e=typeof u=="function"?u(g):u;return ae(g,e)}function bi({tokens:g,children:u,storageKey:e="editora.theme.tokens"}){const s=()=>{if(typeof window<"u"&&e)try{const i=localStorage.getItem(e);if(i){const n=JSON.parse(i);return ae(oe.defaultTokens,n)}}catch{}if(g&&Object.keys(g).length)return ae(oe.defaultTokens,g);if(typeof window<"u"){const i=di();if(i.colors&&i.colors.primary)return ae(oe.defaultTokens,i)}return ae(oe.defaultTokens,g||{})},[t,a]=c.useState(()=>s());c.useEffect(()=>{!g||!Object.keys(g).length||a(i=>ae(i,g))},[g]),ci(()=>{oe.applyTheme(t);try{oe.registerThemeHost(document.documentElement)}catch{}},[t]),c.useEffect(()=>{if(typeof window>"u"||!e)return;const i=JSON.stringify(t);let n;const l=()=>{try{localStorage.setItem(e,i)}catch{}};return window.requestIdleCallback?n=window.requestIdleCallback(l,{timeout:1e3}):n=window.setTimeout(l,250),()=>{try{window.cancelIdleCallback&&n?window.cancelIdleCallback(n):n&&clearTimeout(n)}catch{}}},[t,e]);const v=c.useMemo(()=>({tokens:t,setTokens:i=>{a(n=>ai(n,i))}}),[t]);return P.default.createElement(at.Provider,{value:v},u)}function mi(){const g=c.useContext(at);if(!g)throw new Error("useTheme must be used within ThemeProvider");return g}function de(g,u,e){if(e==null){g.removeAttribute(u);return}e?g.setAttribute(u,""):g.removeAttribute(u)}function Se(g,u,e,s){const t=e&&e!==s?e:void 0;if(!t){g.removeAttribute(u);return}g.setAttribute(u,t)}const bt=P.forwardRef(function({checked:u,disabled:e,indeterminate:s,loading:t,headless:a,invalid:v,density:i,preset:n,onCheckedChange:l,onChange:b,onInput:d,children:w,...p},h){const r=P.useRef(null);P.useImperativeHandle(h,()=>r.current);const E=typeof window<"u"?P.useLayoutEffect:P.useEffect;P.useEffect(()=>{ue("ui-checkbox","Checkbox")},[]),E(()=>{const y=r.current;y&&(de(y,"checked",u),de(y,"disabled",e),de(y,"indeterminate",s),de(y,"loading",t),de(y,"headless",a),de(y,"invalid",v),Se(y,"density",i,"default"),Se(y,"preset",n,"default"))},[u,e,s,t,a,v,i,n]),P.useEffect(()=>{const y=r.current;if(!y||!l&&!b&&!d)return;const A=f=>{var k;const R=f;d==null||d(R),typeof((k=R.detail)==null?void 0:k.checked)=="boolean"&&(l==null||l(R.detail.checked,R.detail))},o=f=>{const R=f;b==null||b(R)};return y.addEventListener("input",A),y.addEventListener("change",o),()=>{y.removeEventListener("input",A),y.removeEventListener("change",o)}},[l,b,d]);const L={ref:r,...p,checked:u?"":void 0,disabled:e?"":void 0,indeterminate:s?"":void 0,loading:t?"":void 0,headless:a?"":void 0,invalid:v?"":void 0,density:i&&i!=="default"?i:void 0,preset:n&&n!=="default"?n:void 0};return P.createElement("ui-checkbox",L,w)});bt.displayName="Checkbox";const vi=typeof window<"u"?c.useLayoutEffect:c.useEffect,mt=P.default.forwardRef(function({value:u,disabled:e,required:s,name:t,orientation:a,variant:v,size:i,tone:n,options:l,onValueChange:b,children:d,...w},p){const h=c.useRef(null);return P.default.useImperativeHandle(p,()=>h.current),c.useEffect(()=>{const r=h.current;if(!r)return;const E=L=>{const y=L.detail;y&&(b==null||b(y))};return r.addEventListener("change",E),()=>r.removeEventListener("change",E)},[b]),vi(()=>{const r=h.current;if(!r)return;const E=(y,A)=>{const o=r.getAttribute(y);if(A==null){o!=null&&r.removeAttribute(y);return}o!==A&&r.setAttribute(y,A)},L=(y,A)=>{A?r.hasAttribute(y)||r.setAttribute(y,""):r.hasAttribute(y)&&r.removeAttribute(y)};E("value",u??null),L("disabled",e),L("required",s),E("name",t||null),E("orientation",a&&a!=="vertical"?a:null),E("variant",v&&v!=="default"?v:null),E("size",i&&i!=="md"?i:null),E("tone",n&&n!=="brand"?n:null),l&&l.length?E("options",JSON.stringify(l)):E("options",null)},[u,e,s,t,a,v,i,n,l]),P.default.createElement("ui-radio-group",{ref:h,...w},d)});mt.displayName="RadioGroup";const Ai=typeof window<"u"?c.useLayoutEffect:c.useEffect,vt=P.default.forwardRef(function({children:u,checked:e,disabled:s,headless:t,loading:a,size:v,variant:i,tone:n,shape:l,elevation:b,label:d,description:w,name:p,value:h,required:r,onInput:E,onChange:L,...y},A){const o=c.useRef(null);return c.useImperativeHandle(A,()=>o.current),c.useEffect(()=>{const f=o.current;if(!f)return;const R=H=>{const S=H.detail;S&&(E==null||E(S))},k=H=>{const S=H.detail;S&&(L==null||L(S))};return f.addEventListener("input",R),f.addEventListener("change",k),()=>{f.removeEventListener("input",R),f.removeEventListener("change",k)}},[E,L]),Ai(()=>{const f=o.current;if(!f)return;const R=(H,S)=>{const N=f.getAttribute(H);if(S==null){N!=null&&f.removeAttribute(H);return}N!==S&&f.setAttribute(H,S)},k=(H,S)=>{S?R(H,""):R(H,null)};k("checked",e),k("disabled",s),k("headless",t),k("loading",a),k("required",r),R("size",v&&v!=="md"?v:null),R("variant",i&&i!=="default"?i:null),R("tone",n&&n!=="brand"?n:null),R("label",d||null),R("description",w||null),R("name",p||null),R("value",h||null),R("shape",l&&l!=="pill"?l:null),R("elevation",b&&b!=="low"?b:null)},[e,s,t,a,r,v,i,n,l,b,d,w,p,h]),P.default.createElement("ui-switch",{ref:o,...y},u)});vt.displayName="Switch";const pi=typeof window<"u"?c.useLayoutEffect:c.useEffect,At=P.default.forwardRef(function({children:u,pressed:e,disabled:s,loading:t,headless:a,size:v,variant:i,tone:n,shape:l,elevation:b,name:d,value:w,required:p,iconOn:h,iconOff:r,onInput:E,onChange:L,...y},A){const o=c.useRef(null);return c.useImperativeHandle(A,()=>o.current),c.useEffect(()=>{const f=o.current;if(!f)return;const R=H=>{const S=H.detail;S&&(E==null||E(S))},k=H=>{const S=H.detail;S&&(L==null||L(S))};return f.addEventListener("input",R),f.addEventListener("change",k),()=>{f.removeEventListener("input",R),f.removeEventListener("change",k)}},[E,L]),pi(()=>{const f=o.current;if(!f)return;const R=(H,S)=>{const N=f.getAttribute(H);if(S==null){N!=null&&f.removeAttribute(H);return}N!==S&&f.setAttribute(H,S)},k=(H,S)=>{S?R(H,""):R(H,null)};k("pressed",e),k("disabled",s),k("loading",t),k("headless",a),k("required",p),R("size",v&&v!=="md"?v:null),R("variant",i&&i!=="default"?i:null),R("tone",n&&n!=="brand"?n:null),R("shape",l&&l!=="default"?l:null),R("elevation",b&&b!=="default"?b:null),R("name",d||null),R("value",w||null),R("icon-on",h||null),R("icon-off",r||null)},[e,s,t,a,p,v,i,n,l,b,d,w,h,r]),P.default.createElement("ui-toggle",{ref:o,...y},u)});At.displayName="Toggle";const Ei=typeof window<"u"?c.useLayoutEffect:c.useEffect,pt=P.default.forwardRef(function({children:u,value:e,multiple:s,disabled:t,headless:a,orientation:v,variant:i,size:n,density:l,shape:b,elevation:d,allowEmpty:w,required:p,activation:h,onInput:r,onChange:E,onValueChange:L,...y},A){const o=c.useRef(null);return c.useImperativeHandle(A,()=>o.current),c.useEffect(()=>{const f=o.current;if(!f)return;const R=H=>{const S=H.detail;S&&(r==null||r(S),L==null||L(S))},k=H=>{const S=H.detail;S&&(E==null||E(S),L==null||L(S))};return f.addEventListener("input",R),f.addEventListener("change",k),()=>{f.removeEventListener("input",R),f.removeEventListener("change",k)}},[r,E,L]),Ei(()=>{const f=o.current;if(!f)return;const R=(H,S)=>{const N=f.getAttribute(H);if(S==null){N!=null&&f.removeAttribute(H);return}N!==S&&f.setAttribute(H,S)},k=(H,S)=>{S?R(H,""):R(H,null)};k("multiple",s),k("disabled",t),k("headless",a),k("allow-empty",w),k("required",p),e==null?R("value",null):Array.isArray(e)?R("value",JSON.stringify(e)):R("value",String(e)),R("orientation",v&&v!=="horizontal"?v:null),R("variant",i&&i!=="default"?i:null),R("size",n&&n!=="md"?n:null),R("density",l&&l!=="default"?l:null),R("shape",b&&b!=="default"?b:null),R("elevation",d&&d!=="default"?d:null),R("activation",h&&h!=="auto"?h:null)},[e,s,t,a,w,p,v,i,n,l,b,d,h]),P.default.createElement("ui-toggle-group",{ref:o,...y},u)});pt.displayName="ToggleGroup";const yi=typeof window<"u"?P.useLayoutEffect:P.useEffect;function Li(g){if(g!=null){if(typeof g=="string")return g;if(!(!Number.isFinite(g)||g<=0))return Math.abs(g-16/9)<.01?"16/9":Math.abs(g-4/3)<.01?"4/3":Math.abs(g-1)<.01?"1/1":`${g}/1`}}const Et=P.forwardRef(function({ratio:u,fit:e,tone:s,interactive:t,showRatioBadge:a,children:v,...i},n){const l=P.useRef(null);return P.useImperativeHandle(n,()=>l.current),P.useEffect(()=>{ue("ui-aspect-ratio","AspectRatio")},[]),yi(()=>{const b=l.current;if(!b)return;const d=Li(u);d?b.setAttribute("ratio",d):b.removeAttribute("ratio"),e?b.setAttribute("fit",e):b.removeAttribute("fit"),s&&s!=="neutral"?b.setAttribute("tone",s):b.removeAttribute("tone"),t?b.setAttribute("interactive",""):b.removeAttribute("interactive"),a?b.setAttribute("show-ratio-badge",""):b.removeAttribute("show-ratio-badge")},[u,e,s,t,a]),P.createElement("ui-aspect-ratio",{ref:l,...i},v)});Et.displayName="AspectRatio";const wi=typeof window<"u"?P.useLayoutEffect:P.useEffect;function ke(g){const u=g.trim().split(/\s+/).filter(Boolean);return u.length===0?"?":u.length===1?u[0].slice(0,2).toUpperCase():`${u[0][0]||""}${u[1][0]||""}`.toUpperCase()}function gi(g){if(g!=null)return g==="lazy"||g==="eager"?g:g?"eager":"lazy"}function hi(g,u,e){return g&&g.trim()?g.trim().slice(0,2).toUpperCase():u&&u.trim()?ke(u):typeof e=="string"&&e.trim()?ke(e):"?"}const yt=P.forwardRef(function({src:u,alt:e,initials:s,size:t,bg:a,color:v,radius:i,fontWeight:n,shape:l,tone:b,variant:d,status:w,state:p,badge:h,ring:r,interactive:E,disabled:L,loading:y,onAvatarLoad:A,onAvatarError:o,children:f,...R},k){const H=P.useRef(null),S=P.useMemo(()=>hi(s,e,f),[s,e,f]);return P.useImperativeHandle(k,()=>H.current),P.useEffect(()=>{ue("ui-avatar","Avatar")},[]),P.useEffect(()=>{const N=H.current;if(!N||!A&&!o)return;const I=m=>A==null?void 0:A(m.detail),$=m=>o==null?void 0:o(m.detail);return N.addEventListener("avatar-load",I),N.addEventListener("avatar-error",$),()=>{N.removeEventListener("avatar-load",I),N.removeEventListener("avatar-error",$)}},[A,o]),wi(()=>{const N=H.current;if(!N)return;u?N.setAttribute("src",u):N.removeAttribute("src"),e?N.setAttribute("alt",e):N.removeAttribute("alt"),s?N.setAttribute("initials",s):N.removeAttribute("initials"),t!=null?N.setAttribute("size",String(t)):N.removeAttribute("size"),a?N.setAttribute("bg",a):N.removeAttribute("bg"),v?N.setAttribute("color",v):N.removeAttribute("color"),i?N.setAttribute("radius",i):N.removeAttribute("radius"),n!=null?N.setAttribute("fontweight",String(n)):N.removeAttribute("fontweight"),l?N.setAttribute("shape",l):N.removeAttribute("shape"),b&&b!=="neutral"?N.setAttribute("tone",b):N.removeAttribute("tone"),d&&d!=="soft"?N.setAttribute("variant",d):N.removeAttribute("variant"),w?N.setAttribute("status",w):N.removeAttribute("status"),p&&p!=="idle"?N.setAttribute("state",p):N.removeAttribute("state"),h?N.setAttribute("badge",h):N.removeAttribute("badge"),r==null?N.removeAttribute("ring"):r?N.setAttribute("ring",""):N.removeAttribute("ring"),E==null?N.removeAttribute("interactive"):E?N.setAttribute("interactive",""):N.removeAttribute("interactive"),L==null?N.removeAttribute("disabled"):L?N.setAttribute("disabled",""):N.removeAttribute("disabled");const I=gi(y);I?N.setAttribute("loading",I):N.removeAttribute("loading")},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y]),P.createElement("ui-avatar",{ref:H,...R},S)});yt.displayName="Avatar";const Ri=typeof window<"u"?c.useLayoutEffect:c.useEffect,Lt=P.default.forwardRef(function({present:u,headless:e,mode:s,size:t,variant:a,keepMounted:v,lazy:i,enterDuration:n,exitDuration:l,delay:b,onBeforeEnter:d,onEnter:w,onAfterEnter:p,onBeforeExit:h,onExit:r,onAfterExit:E,children:L,...y},A){const o=c.useRef(null);return P.default.useImperativeHandle(A,()=>o.current),c.useEffect(()=>{const f=o.current;if(!f)return;const R=m=>{const B=m.detail;return(B==null?void 0:B.state)||"hidden"},k=m=>d==null?void 0:d(R(m)),H=m=>w==null?void 0:w(R(m)),S=m=>p==null?void 0:p(R(m)),N=m=>h==null?void 0:h(R(m)),I=m=>r==null?void 0:r(R(m)),$=m=>E==null?void 0:E(R(m));return f.addEventListener("before-enter",k),f.addEventListener("enter",H),f.addEventListener("after-enter",S),f.addEventListener("before-exit",N),f.addEventListener("exit",I),f.addEventListener("after-exit",$),()=>{f.removeEventListener("before-enter",k),f.removeEventListener("enter",H),f.removeEventListener("after-enter",S),f.removeEventListener("before-exit",N),f.removeEventListener("exit",I),f.removeEventListener("after-exit",$)}},[d,w,p,h,r,E]),Ri(()=>{const f=o.current;f&&(u?f.setAttribute("present",""):f.removeAttribute("present"),e?f.setAttribute("headless",""):f.removeAttribute("headless"),s&&s!=="fade"?f.setAttribute("mode",s):f.removeAttribute("mode"),t&&t!=="md"?f.setAttribute("size",t):f.removeAttribute("size"),a&&a!=="default"?f.setAttribute("variant",a):f.removeAttribute("variant"),v?f.setAttribute("keep-mounted",""):f.removeAttribute("keep-mounted"),i?f.setAttribute("lazy",""):f.removeAttribute("lazy"),typeof n=="number"?f.setAttribute("enter-duration",String(n)):f.removeAttribute("enter-duration"),typeof l=="number"?f.setAttribute("exit-duration",String(l)):f.removeAttribute("exit-duration"),typeof b=="number"?f.setAttribute("delay",String(b)):f.removeAttribute("delay"))},[u,e,s,t,a,v,i,n,l,b]),P.default.createElement("ui-presence",{ref:o,...y},L)});Lt.displayName="Presence";const Hi=typeof window<"u"?c.useLayoutEffect:c.useEffect,wt=P.default.forwardRef(function({value:u,buffer:e,max:s,min:t,indeterminate:a,striped:v,animated:i,showLabel:n,label:l,format:b,precision:d,size:w,variant:p,tone:h,shape:r,mode:E,onValueChange:L,onComplete:y,children:A,...o},f){const R=c.useRef(null);return P.default.useImperativeHandle(f,()=>R.current),c.useEffect(()=>{const k=R.current;if(!k)return;const H=N=>{const I=N.detail;I&&(L==null||L(I))},S=N=>{const I=N.detail;I&&(y==null||y(I))};return k.addEventListener("change",H),k.addEventListener("complete",S),()=>{k.removeEventListener("change",H),k.removeEventListener("complete",S)}},[L,y]),Hi(()=>{const k=R.current;if(!k)return;const H=(N,I)=>{const $=k.getAttribute(N);if(I==null){$!=null&&k.removeAttribute(N);return}$!==I&&k.setAttribute(N,I)},S=(N,I)=>{I?k.hasAttribute(N)||k.setAttribute(N,""):k.hasAttribute(N)&&k.removeAttribute(N)};H("value",u!=null?String(u):null),H("buffer",e!=null?String(e):null),H("max",s!=null?String(s):null),H("min",t!=null?String(t):null),S("indeterminate",a),S("striped",v),S("animated",i),S("show-label",n),H("label",l!=null&&l!==""?l:null),H("format",b!=null&&b!=="percent"?b:null),H("precision",d!=null?String(d):null),H("size",w&&w!=="md"?w:null),H("variant",p&&p!=="default"?p:null),H("tone",h&&h!=="brand"?h:null),H("shape",r&&r!=="pill"?r:null),H("mode",E&&E!=="line"?E:null)},[u,e,s,t,a,v,i,n,l,b,d,w,p,h,r,E]),P.default.createElement("ui-progress",{ref:R,...o},A)});wt.displayName="Progress";const Ni=typeof window<"u"?c.useLayoutEffect:c.useEffect,gt=P.default.forwardRef(function({target:u,headless:e,disabled:s,strategy:t,onMount:a,onUnmount:v,onSync:i,onTargetMissing:n,children:l,...b},d){const w=c.useRef(null);return P.default.useImperativeHandle(d,()=>w.current),c.useEffect(()=>{const p=w.current;if(!p)return;const h=y=>a==null?void 0:a(y.detail||{count:0}),r=y=>v==null?void 0:v(y.detail||{count:0}),E=y=>i==null?void 0:i(y.detail||{count:0}),L=y=>{const A=y.detail;A&&(n==null||n(A))};return p.addEventListener("mount",h),p.addEventListener("unmount",r),p.addEventListener("sync",E),p.addEventListener("target-missing",L),()=>{p.removeEventListener("mount",h),p.removeEventListener("unmount",r),p.removeEventListener("sync",E),p.removeEventListener("target-missing",L)}},[a,v,i,n]),Ni(()=>{const p=w.current;p&&(u?p.setAttribute("target",u):p.removeAttribute("target"),t&&t!=="append"?p.setAttribute("strategy",t):p.removeAttribute("strategy"),e?p.setAttribute("headless",""):p.removeAttribute("headless"),s?p.setAttribute("disabled",""):p.removeAttribute("disabled"))},[u,t,e,s]),P.default.createElement("ui-portal",{ref:w,...b},l)});gt.displayName="Portal";const Si=typeof window<"u"?c.useLayoutEffect:c.useEffect,ht=P.default.forwardRef(function({orientation:u,size:e,variant:s,tone:t,autoHide:a,shadows:v,onScrollChange:i,onReachStart:n,onReachEnd:l,children:b,...d},w){const p=c.useRef(null);return P.default.useImperativeHandle(w,()=>p.current),c.useEffect(()=>{const h=p.current;if(!h)return;const r=y=>{const A=y.detail;A&&(i==null||i(A))},E=()=>n==null?void 0:n(),L=()=>l==null?void 0:l();return h.addEventListener("scroll",r),h.addEventListener("reach-start",E),h.addEventListener("reach-end",L),()=>{h.removeEventListener("scroll",r),h.removeEventListener("reach-start",E),h.removeEventListener("reach-end",L)}},[i,n,l]),Si(()=>{const h=p.current;if(!h)return;const r=(L,y)=>{const A=h.getAttribute(L);if(y==null){A!=null&&h.removeAttribute(L);return}A!==y&&h.setAttribute(L,y)},E=(L,y)=>{const A=h.getAttribute(L);if(y==null){A!=null&&h.removeAttribute(L);return}const o=y?"true":"false";A!==o&&h.setAttribute(L,o)};r("orientation",u&&u!=="vertical"?u:null),r("size",e&&e!=="md"?e:null),r("variant",s&&s!=="default"?s:null),r("tone",t&&t!=="neutral"?t:null),E("auto-hide",a),E("shadows",v)},[u,e,s,t,a,v]),P.default.createElement("ui-scroll-area",{ref:p,...d},b)});ht.displayName="ScrollArea";const Rt=P.forwardRef((g,u)=>P.createElement("ui-separator",{ref:u,...g}));Rt.displayName="Separator";const ki=typeof window<"u"?c.useLayoutEffect:c.useEffect,Ht=P.default.forwardRef(function({children:u,name:e,fallback:s,required:t,inline:a,align:v,size:i,variant:n,tone:l,headless:b,onSlotChange:d,onMissing:w,onResolved:p,...h},r){const E=c.useRef(null);return c.useImperativeHandle(r,()=>E.current),c.useEffect(()=>{const L=E.current;if(!L)return;const y=f=>{const R=f.detail;R&&(d==null||d(R))},A=()=>w==null?void 0:w(),o=()=>p==null?void 0:p();return L.addEventListener("slotchange",y),L.addEventListener("missing",A),L.addEventListener("resolved",o),()=>{L.removeEventListener("slotchange",y),L.removeEventListener("missing",A),L.removeEventListener("resolved",o)}},[d,w,p]),ki(()=>{const L=E.current;if(!L)return;const y=(o,f)=>{const R=L.getAttribute(o);if(f==null){R!=null&&L.removeAttribute(o);return}R!==f&&L.setAttribute(o,f)},A=(o,f)=>{f?y(o,""):y(o,null)};y("name",e||null),y("fallback",s||null),A("required",t),typeof a=="boolean"?y("inline",a?"true":"false"):y("inline",null),y("align",v&&v!=="start"?v:null),y("size",i&&i!=="md"?i:null),y("variant",n&&n!=="plain"?n:null),y("tone",l&&l!=="brand"?l:null),A("headless",b)},[e,s,t,a,v,i,n,l,b]),P.default.createElement("ui-slot",{ref:E,...h},u)});Ht.displayName="Slot";const Pi=typeof window<"u"?c.useLayoutEffect:c.useEffect,Nt=P.default.forwardRef(function({children:u,orientation:e,variant:s,size:t,density:a,wrap:v,loop:i,headless:n,...l},b){const d=c.useRef(null);return c.useImperativeHandle(b,()=>d.current),Pi(()=>{const w=d.current;if(!w)return;const p=(r,E)=>{const L=w.getAttribute(r);if(E==null){L!=null&&w.removeAttribute(r);return}L!==E&&w.setAttribute(r,E)},h=(r,E)=>{E?p(r,""):p(r,null)};p("orientation",e&&e!=="horizontal"?e:null),p("variant",s&&s!=="default"?s:null),p("size",t&&t!=="md"?t:null),p("density",a&&a!=="default"?a:null),h("wrap",v),typeof i=="boolean"?h("loop",i):p("loop",null),h("headless",n)},[e,s,t,a,v,i,n]),P.default.createElement("ui-toolbar",{ref:d,...l},u)});Nt.displayName="Toolbar";const St=P.forwardRef((g,u)=>P.createElement("ui-visually-hidden",{ref:u,...g}));St.displayName="VisuallyHidden";const $i=typeof window<"u"?P.useLayoutEffect:P.useEffect;function He(g,u,e){if(e==null){g.removeAttribute(u);return}e?g.setAttribute(u,""):g.removeAttribute(u)}function Pe(g){return g.detail}const kt=P.forwardRef(function({header:u,caption:e,meta:s,open:t,headless:a,disabled:v,readOnly:i,state:n,size:l,variant:b,tone:d,iconPosition:w,closeOnEscape:p,onToggle:h,onChangeOpen:r,onToggleDetail:E,onChangeDetail:L,children:y,...A},o){const f=P.useRef(null);P.useImperativeHandle(o,()=>f.current),P.useEffect(()=>{ue("ui-collapsible","Collapsible")},[]),$i(()=>{const N=f.current;if(!N)return;He(N,"open",t),He(N,"headless",a),He(N,"disabled",v),He(N,"readonly",i);const I=($,m)=>{const B=N.getAttribute($);if(m==null){B!=null&&N.removeAttribute($);return}B!==m&&N.setAttribute($,m)};I("state",n&&n!=="idle"?n:null),I("size",l&&l!=="md"?l:null),I("variant",b&&b!=="default"?b:null),I("tone",d&&d!=="neutral"?d:null),I("icon-position",w&&w!=="right"?w:null),I("close-on-escape",typeof p=="boolean"?p?"true":"false":null)},[t,a,v,i,n,l,b,d,w,p]),P.useEffect(()=>{const N=f.current;if(!N||!h&&!r&&!E&&!L)return;const I=m=>{const B=Pe(m);B&&(h==null||h(B.open),E==null||E(B))},$=m=>{const B=Pe(m);B&&(r==null||r(B.open),L==null||L(B))};return N.addEventListener("toggle",I),N.addEventListener("change",$),()=>{N.removeEventListener("toggle",I),N.removeEventListener("change",$)}},[h,r,E,L]);let R=null,k=null,H=null;const S=(N,I)=>N==null?null:typeof N=="string"||typeof N=="number"?P.createElement("span",{slot:I},N):P.isValidElement(N)?P.cloneElement(N,{slot:I}):P.createElement("span",{slot:I},N);return R=S(u,"header"),k=S(e,"caption"),H=S(s,"meta"),P.createElement("ui-collapsible",{ref:f,...A},R,k,H,y)});kt.displayName="Collapsible";const Pt=P.forwardRef((g,u)=>P.createElement("ui-pagination",{ref:u,...g}));Pt.displayName="Pagination";const xi=typeof window<"u"?P.useLayoutEffect:P.useEffect;function Ti(g,u,e){if(e==null){g.removeAttribute(u);return}e?g.setAttribute(u,""):g.removeAttribute(u)}function $e(g,u,e){const s=g.getAttribute(u);if(e==null||e===""){s!=null&&g.removeAttribute(u);return}s!==e&&g.setAttribute(u,e)}function xe(g){var u;return(u=g.detail)==null?void 0:u.open}const $t=P.forwardRef(function({multiple:u,collapsible:e,open:s,shape:t,elevation:a,onToggle:v,onChangeOpen:i,children:n,...l},b){const d=P.useRef(null);return P.useImperativeHandle(b,()=>d.current),P.useEffect(()=>{ue("ui-accordion","Accordion")},[]),xi(()=>{const w=d.current;w&&(Ti(w,"multiple",u),e==null?w.removeAttribute("collapsible"):w.setAttribute("collapsible",String(!!e)),s==null?w.removeAttribute("open"):w.setAttribute("open",Array.isArray(s)?JSON.stringify(s):String(s)),$e(w,"shape",t&&t!=="default"?t:null),$e(w,"elevation",a&&a!=="default"?a:null))},[u,e,s,t,a]),P.useEffect(()=>{const w=d.current;if(!w||!v&&!i)return;const p=r=>{const E=xe(r);E!=null&&(v==null||v(E))},h=r=>{const E=xe(r);E!=null&&(i==null||i(E))};return w.addEventListener("toggle",p),w.addEventListener("change",h),()=>{w.removeEventListener("toggle",p),w.removeEventListener("change",h)}},[v,i]),P.createElement("ui-accordion",{ref:d,...l},n)});$t.displayName="Accordion";const xt=P.forwardRef(function({disabled:u,description:e,badge:s,children:t,...a},v){const i={ref:v,"data-ui-accordion-item":"",...a};return u&&(i.disabled=!0),e!=null&&(i["data-description"]=String(e)),s!=null&&(i["data-badge"]=String(s)),P.createElement("div",i,t)});xt.displayName="AccordionItem";const Tt=P.forwardRef(function({type:u,children:e,...s},t){return P.createElement("button",{ref:t,type:u||"button","data-ui-accordion-trigger":"",...s},e)});Tt.displayName="AccordionTrigger";const It=P.forwardRef(function({children:u,...e},s){return P.createElement("div",{ref:s,"data-ui-accordion-panel":"",...e},u)});It.displayName="AccordionPanel";const Ft=P.forwardRef((g,u)=>P.createElement("ui-direction-provider",{ref:u,...g}));Ft.displayName="DirectionProvider";const Te=typeof window<"u"?c.useLayoutEffect:c.useEffect,Bt=P.default.forwardRef(function({children:u,open:e,delay:s,closeDelay:t,placement:a,offset:v,variant:i,tone:n,density:l,shape:b,elevation:d,headless:w,onOpen:p,onClose:h,onChange:r,...E},L){const y=c.useRef(null);return c.useImperativeHandle(L,()=>y.current),c.useEffect(()=>{const A=y.current;if(!A)return;const o=()=>p==null?void 0:p(),f=()=>h==null?void 0:h(),R=k=>{var S;const H=(S=k.detail)==null?void 0:S.open;typeof H=="boolean"&&(r==null||r(H))};return A.addEventListener("open",o),A.addEventListener("close",f),A.addEventListener("change",R),()=>{A.removeEventListener("open",o),A.removeEventListener("close",f),A.removeEventListener("change",R)}},[p,h,r]),Te(()=>{const A=y.current;!A||e==null||(e?A.setAttribute("open",""):A.removeAttribute("open"))},[e]),Te(()=>{const A=y.current;A&&(typeof s=="number"?A.setAttribute("delay",String(s)):A.removeAttribute("delay"),typeof t=="number"?A.setAttribute("close-delay",String(t)):A.removeAttribute("close-delay"),a?A.setAttribute("placement",a):A.removeAttribute("placement"),typeof v=="number"?A.setAttribute("offset",String(v)):A.removeAttribute("offset"),i&&i!=="default"?A.setAttribute("variant",i):A.removeAttribute("variant"),n&&n!=="default"?A.setAttribute("tone",n):A.removeAttribute("tone"),l&&l!=="default"?A.setAttribute("density",l):A.removeAttribute("density"),b&&b!=="default"?A.setAttribute("shape",b):A.removeAttribute("shape"),d&&d!=="default"?A.setAttribute("elevation",d):A.removeAttribute("elevation"),w?A.setAttribute("headless",""):A.removeAttribute("headless"))},[s,t,a,v,i,n,l,b,d,w]),P.default.createElement("ui-hover-card",{ref:y,...E},u)});Bt.displayName="HoverCard";const Ii=typeof window<"u"?c.useLayoutEffect:c.useEffect,jt=P.default.forwardRef(function({children:u,htmlFor:e,for:s,required:t,description:a,variant:v,tone:i,size:n,density:l,shape:b,disabled:d,headless:w,...p},h){const r=c.useRef(null);return c.useImperativeHandle(h,()=>r.current),Ii(()=>{const E=r.current;if(!E)return;const L=e||s;L?E.setAttribute("for",L):E.removeAttribute("for"),t?E.setAttribute("required",""):E.removeAttribute("required"),a?E.setAttribute("description",a):E.removeAttribute("description"),v&&v!=="default"?E.setAttribute("variant",v):E.removeAttribute("variant"),i&&i!=="default"?E.setAttribute("tone",i):E.removeAttribute("tone"),n&&n!=="md"&&n!=="2"?E.setAttribute("size",n):E.removeAttribute("size"),l&&l!=="default"?E.setAttribute("density",l):E.removeAttribute("density"),b&&b!=="default"?E.setAttribute("shape",b):E.removeAttribute("shape"),d?E.setAttribute("disabled",""):E.removeAttribute("disabled"),w?E.setAttribute("headless",""):E.removeAttribute("headless")},[e,s,t,a,v,i,n,l,b,d,w]),P.default.createElement("ui-label",{ref:r,...p},u)});jt.displayName="Label";const Fi=typeof window<"u"?P.default.useLayoutEffect:P.default.useEffect,qt=P.default.forwardRef(function({children:u,open:e,headless:s,dismissible:t,closeOnEsc:a,closeOnBackdrop:v,lockWhileLoading:i,roleType:n,tone:l,size:b,state:d,initialFocus:w,dialogId:p,config:h,onOpen:r,onConfirm:E,onCancel:L,onDismiss:y,onClose:A,onChange:o,...f},R){const k=c.useRef(null);return P.default.useImperativeHandle(R,()=>k.current),c.useEffect(()=>{const H=k.current;if(!H)return;const S=M=>r==null?void 0:r(M.detail),N=M=>E==null?void 0:E(M.detail),I=M=>L==null?void 0:L(M.detail),$=M=>y==null?void 0:y(M.detail),m=M=>A==null?void 0:A(M.detail),B=M=>o==null?void 0:o(M.detail);return H.addEventListener("ui-open",S),H.addEventListener("ui-confirm",N),H.addEventListener("ui-cancel",I),H.addEventListener("ui-dismiss",$),H.addEventListener("ui-close",m),H.addEventListener("ui-change",B),()=>{H.removeEventListener("ui-open",S),H.removeEventListener("ui-confirm",N),H.removeEventListener("ui-cancel",I),H.removeEventListener("ui-dismiss",$),H.removeEventListener("ui-close",m),H.removeEventListener("ui-change",B)}},[r,E,L,y,A,o]),Fi(()=>{const H=k.current;H&&(typeof e=="boolean"&&e?H.setAttribute("open",""):H.removeAttribute("open"),s?H.setAttribute("headless",""):H.removeAttribute("headless"),typeof t=="boolean"?H.setAttribute("dismissible",String(t)):H.removeAttribute("dismissible"),typeof a=="boolean"?H.setAttribute("close-on-esc",String(a)):H.removeAttribute("close-on-esc"),typeof v=="boolean"?H.setAttribute("close-on-backdrop",String(v)):H.removeAttribute("close-on-backdrop"),typeof i=="boolean"?H.setAttribute("lock-while-loading",String(i)):H.removeAttribute("lock-while-loading"),n?H.setAttribute("role",n):H.removeAttribute("role"),l&&l!=="neutral"?H.setAttribute("tone",l):H.removeAttribute("tone"),b&&b!=="md"?H.setAttribute("size",b):H.removeAttribute("size"),d&&d!=="idle"?H.setAttribute("state",d):H.removeAttribute("state"),w?H.setAttribute("initial-focus",w):H.removeAttribute("initial-focus"),p&&(H.dialogId=p),h?H.config=h:H.config={})},[e,s,t,a,v,i,n,l,b,d,w,p,h]),P.default.createElement("ui-alert-dialog",{ref:k,...f},u)});qt.displayName="AlertDialog";const Jt=c.createContext(null),ve="data-ui-alert-dialog-react-host-refcount";function Bi({children:g,hostId:u="ui-alert-dialog-react-host"}){const e=c.useRef(null);e.current||(e.current=oe.createAlertDialogManager()),c.useEffect(()=>{var i;if(typeof document>"u")return;let t=document.getElementById(u);const a=!t;t||(t=document.createElement("div"),t.id=u,t.setAttribute("data-ui-alert-dialog-react-host","true"),document.body.appendChild(t));const v=Number(t.getAttribute(ve)||"0");return t.setAttribute(ve,String(Math.max(0,v)+1)),(i=e.current)==null||i.setContainer(t),()=>{var b,d;if((b=e.current)==null||b.destroy("unmount"),e.current=null,!t||!t.isConnected)return;const n=Number(t.getAttribute(ve)||"1"),l=Math.max(0,n-1);l===0?(t.removeAttribute(ve),a&&((d=t.parentElement)==null||d.removeChild(t))):t.setAttribute(ve,String(l))}},[u]);const s=c.useMemo(()=>({alert:(t={})=>{var a;return((a=e.current)==null?void 0:a.alert(t))??Promise.resolve({id:"",action:"dismiss"})},confirm:(t={})=>{var a;return((a=e.current)==null?void 0:a.confirm(t))??Promise.resolve({id:"",action:"dismiss"})},prompt:(t={})=>{var a;return((a=e.current)==null?void 0:a.prompt(t))??Promise.resolve({id:"",action:"dismiss",value:""})}}),[]);return P.default.createElement(Jt.Provider,{value:s},g)}function ji(){const g=c.useContext(Jt);if(!g)throw new Error("useAlertDialog must be used within <AlertDialogProvider>.");return g}const qi=typeof window<"u"?c.useLayoutEffect:c.useEffect,Gt=P.default.forwardRef(function({children:u,value:e,disabled:s,loading:t,required:a,invalid:v,headless:i,placeholder:n,name:l,label:b,description:d,error:w,size:p,variant:h,tone:r,density:E,shape:L,elevation:y,radius:A,validation:o,onChange:f,onInput:R,onValueChange:k,...H},S){const N=c.useRef(null);return c.useImperativeHandle(S,()=>N.current),c.useEffect(()=>{const I=N.current;if(!I)return;const $=M=>{var T,G;return((T=M.detail)==null?void 0:T.value)??((G=M.target)==null?void 0:G.value)??""},m=M=>{R==null||R($(M))},B=M=>{const T=$(M);f==null||f(T),k==null||k(T)};return I.addEventListener("input",m),I.addEventListener("change",B),()=>{I.removeEventListener("input",m),I.removeEventListener("change",B)}},[f,R,k]),qi(()=>{const I=N.current;if(!I)return;const $=(B,M)=>{const T=I.getAttribute(B);if(M==null){T!=null&&I.removeAttribute(B);return}T!==M&&I.setAttribute(B,M)},m=(B,M)=>{M?I.hasAttribute(B)||I.setAttribute(B,""):I.hasAttribute(B)&&I.removeAttribute(B)};$("value",e!=null?String(e):null),m("disabled",s),m("loading",t),m("required",a),m("headless",i),m("invalid",v),$("placeholder",n||null),$("name",l||null),$("label",b||null),$("description",d||null),$("error",w||null),$("size",p&&p!=="md"&&p!=="2"?p:null),$("variant",h&&h!=="classic"?h:null),$("tone",r&&r!=="default"?r:null),$("density",E&&E!=="default"?E:null),$("shape",L&&L!=="rounded"?L:null),$("elevation",y&&y!=="low"?y:null),$("radius",A?String(A):null),$("validation",o&&o!=="none"?o:null)},[e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o]),P.default.createElement("ui-select",{ref:N,...H},u)});Gt.displayName="Select";const Ji=typeof window<"u"?c.useLayoutEffect:c.useEffect,_t=P.default.forwardRef(function({children:u,value:e,valueStart:s,valueEnd:t,min:a,max:v,step:i,range:n,disabled:l,headless:b,orientation:d,size:w,variant:p,tone:h,showValue:r,format:E,label:L,description:y,marks:A,name:o,nameStart:f,nameEnd:R,onInput:k,onChange:H,onValueChange:S,...N},I){const $=c.useRef(null);return c.useImperativeHandle(I,()=>$.current),c.useEffect(()=>{const m=$.current;if(!m)return;const B=T=>{const G=T.detail;G&&(k==null||k(Number(G.value)),S==null||S(G))},M=T=>{const G=T.detail;G&&(H==null||H(Number(G.value)),S==null||S(G))};return m.addEventListener("input",B),m.addEventListener("change",M),()=>{m.removeEventListener("input",B),m.removeEventListener("change",M)}},[k,H,S]),Ji(()=>{const m=$.current;if(!m)return;const B=(T,G)=>{const q=m.getAttribute(T);if(G==null){q!=null&&m.removeAttribute(T);return}q!==G&&m.setAttribute(T,G)},M=(T,G,q)=>{if(G==null){q!==void 0&&q===!1&&B(T,null);return}G?B(T,""):B(T,null)};if(B("value",typeof e=="number"&&Number.isFinite(e)?String(e):null),B("value-start",typeof s=="number"&&Number.isFinite(s)?String(s):null),B("value-end",typeof t=="number"&&Number.isFinite(t)?String(t):null),B("min",typeof a=="number"&&Number.isFinite(a)?String(a):null),B("max",typeof v=="number"&&Number.isFinite(v)?String(v):null),B("step",typeof i=="number"&&Number.isFinite(i)?String(i):null),M("range",n),M("disabled",l),M("headless",b),B("orientation",d&&d!=="horizontal"?d:null),B("size",w&&w!=="md"?w:null),B("variant",p&&p!=="default"?p:null),B("tone",h&&h!=="brand"?h:null),typeof r=="boolean"?B("show-value",r?"true":"false"):B("show-value",null),B("format",E||null),B("label",L||null),B("description",y||null),B("name",o||null),B("name-start",f||null),B("name-end",R||null),A&&A.length)try{B("marks",JSON.stringify(A))}catch{B("marks",null)}else B("marks",null)},[e,s,t,a,v,i,n,l,b,d,w,p,h,r,E,L,y,A,o,f,R]),P.default.createElement("ui-slider",{ref:$,...N},u)});_t.displayName="Slider";const Gi=typeof window<"u"?c.useLayoutEffect:c.useEffect;function _i(g){const{count:u,width:e,height:s,radius:t,gap:a,duration:v,variant:i,animation:n,density:l,tone:b,animated:d,headless:w,...p}=g,h=c.useRef(null);return Gi(()=>{const r=h.current;r&&(typeof u=="number"&&Number.isFinite(u)?r.setAttribute("count",String(u)):r.removeAttribute("count"),e?r.setAttribute("width",e):r.removeAttribute("width"),s?r.setAttribute("height",s):r.removeAttribute("height"),t?r.setAttribute("radius",t):r.removeAttribute("radius"),a?r.setAttribute("gap",a):r.removeAttribute("gap"),v?r.setAttribute("duration",v):r.removeAttribute("duration"),i?r.setAttribute("variant",i):r.removeAttribute("variant"),n&&n!=="none"?r.setAttribute("animation",n):n==="none"?r.setAttribute("animation","none"):r.removeAttribute("animation"),l&&l!=="default"?r.setAttribute("density",l):r.removeAttribute("density"),b&&b!=="default"?r.setAttribute("tone",b):r.removeAttribute("tone"),d?r.setAttribute("animated",""):r.removeAttribute("animated"),w?r.setAttribute("headless",""):r.removeAttribute("headless"))},[u,e,s,t,a,v,i,n,l,b,d,w]),P.default.createElement("ui-skeleton",{ref:h,...p})}Object.defineProperty(exports,"toastAdvanced",{enumerable:!0,get:()=>ee.toastAdvanced});Object.defineProperty(exports,"toastLegacy",{enumerable:!0,get:()=>tr.default});Object.defineProperty(exports,"toastPro",{enumerable:!0,get:()=>ee.toastPro});exports.Accordion=$t;exports.AccordionItem=xt;exports.AccordionPanel=It;exports.AccordionTrigger=Tt;exports.Alert=ur;exports.AlertDialog=qt;exports.AlertDialogProvider=Bi;exports.AppHeader=ft;exports.AspectRatio=Et;exports.Avatar=yt;exports.Badge=ar;exports.BlockControls=ut;exports.Box=ii;exports.Breadcrumb=ot;exports.Button=Ie;exports.Calendar=_e;exports.Chart=Je;exports.Checkbox=bt;exports.Collapsible=kt;exports.ColorPicker=Me;exports.Combobox=cr;exports.CommandPalette=Zr;exports.Container=si;exports.ContextMenu=Kr;exports.DataTable=Ar;exports.DatePicker=ze;exports.DateRangePicker=De;exports.DateRangeTimePicker=Xe;exports.DateTimePicker=Ue;exports.Dialog=Oe;exports.DialogProvider=Br;exports.DirectionProvider=Ft;exports.Drawer=ct;exports.Dropdown=Be;exports.EmptyState=mr;exports.Field=or;exports.Flex=ui;exports.FloatingToolbar=Ur;exports.Form=nt;exports.Gantt=Ye;exports.Grid=ni;exports.HoverCard=Bt;exports.Icon=rt;exports.Input=je;exports.Label=jt;exports.Layout=dt;exports.Menu=tt;exports.Menubar=Ir;exports.NavigationMenu=xr;exports.Pagination=Pt;exports.PluginPanel=Cr;exports.Popover=Ce;exports.Portal=gt;exports.Presence=Lt;exports.Progress=wt;exports.QuickActions=We;exports.RadioGroup=mt;exports.ScrollArea=ht;exports.Section=lt;exports.Select=Gt;exports.SelectionPopup=Or;exports.Separator=Rt;exports.Sidebar=st;exports.Skeleton=_i;exports.Slider=_t;exports.Slot=Ht;exports.Stepper=Ze;exports.Switch=vt;exports.Table=vr;exports.Tabs=et;exports.Textarea=qe;exports.ThemeProvider=bi;exports.TimePicker=Qe;exports.Timeline=Ge;exports.Toast=it;exports.ToastAPI=Mr;exports.Toggle=At;exports.ToggleGroup=pt;exports.Toolbar=Nt;exports.Tooltip=Fe;exports.VisuallyHidden=St;exports.Wizard=Ke;exports.toast=Gr;exports.toastApi=_r;exports.useAlertDialog=ji;exports.useDialog=jr;exports.useFloating=ri;exports.useForm=ti;exports.useTheme=mi;
|