@ahmetilhn/hanui 3.3.1 → 4.0.0

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/build/index.cjs CHANGED
@@ -1,22 +1,22 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),U=require("@ahmetilhn/handy-utils"),D=require("react-bootstrap-icons"),rt=require("react-dom"),me={pine:"#00322a",mint:"#43ff9c",ink:"#00120f"},Ue={paper:"#eff4f1",slate:"#38594f",mist:"#8fb3a7"},S={n0:"#ffffff",n25:"#f9fbfa",n100:Ue.paper,n150:"#e8efec",n200:"#e3eae7",n250:"#d6e1dc",n300:"#c5d3cc",n550:"#506d63",n600:Ue.slate,n700:"#26403a",n900:me.ink},de={base:me.pine,two:"#004d40",three:"#0f574a",dark:me.pine,darkLine:"#0a4a3e"},z={page:me.ink,surface:"#0b1614",surfaceTwo:"#14201d",surfaceThree:"#1f2c28",inset:"#000d0b",border:"#26332f",borderStrong:"#3d4f4a",text:Ue.paper,textTwo:Ue.mist,textThree:"#799a8f",actionSoft:"#3f5a53"},Ba={light:me.pine,dark:me.mint},re={base:"#22a76d",hover:"#2ab97a",active:"#1d9a64",soft:"#8fd3b6",dark:"#43d08a",darkHover:"#5ddf9c",darkActive:"#2fbb7a",darkSoft:"#43906f",on:"#02180f"},J={base:"#1a7f61",hover:"#10654b",active:"#0a4d39",text:"#147155",tint:"#e9f6f2",line:"#acd8cb",dark:"#51d6ae",darkHover:"#74e7c5",darkTint:"#113228",darkLine:"#285d4d"},dn={green:"#1d9a64"},M={okBg:"#e6f4ed",okFg:"#156f4e",okLine:"#a8dcc4",okBgDark:"#0b2d23",okFgDark:"#47d191",okLineDark:"#1e5742",warnBg:"#fdf0dd",warnFg:"#7a3e02",warnLine:"#ebc687",warnBgDark:"#2c2008",warnFgDark:"#f5c86b",warnLineDark:"#55401a",offBg:"#f0f4f3",offFg:S.n700,offLine:"#cddad4",offBgDark:"#192e29",offFgDark:"#a2b9b0",offLineDark:"#2a423b",badBg:"#f8ebeb",badFg:"#bb1e1e",badLine:"#e6a6a6",badBgDark:"#310f0f",badFgDark:"#e97575",badLineDark:"#621b1b",oemBg:"#edf8f5",oemFg:"#0d5942",oemLine:"#b5ded2",oemBgDark:"#0f2f25",oemFgDark:"#7eddc1",oemLineDark:"#296553",altBg:"#eeebfa",altFg:"#2e2661",altLine:"#c0b6ea",altBgDark:"#1d1a33",altFgDark:"#bfb3f5",altLineDark:"#332d56"},nt={base:"#dc2626",hover:"#bb1e1e",dark:"#e45b5b",darkHover:"#ef7a72",onDark:"#1a0b0a"},He={red:"#dc2626",redDark:"#e35252",green:dn.green,greenDark:"#43d08a",greenHover:"#17814f",greenHoverDark:"#63e3a3",onGreen:re.on},Kt={bg:M.okBg,fg:M.okFg,bgDark:M.okBgDark,fgDark:M.okFgDark},Ma={light:"#9a5f04",dark:"#f0b429"},F=(e,a)=>{const s=e.replace("#",""),r=s.length===3?s.split("").map(_=>_+_).join(""):s,o=parseInt(r.slice(0,2),16),c=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return`rgba(${o}, ${c}, ${i}, ${a})`},ne="#000000",Pa={page:S.n0,surface:S.n0,"surface-2":S.n100,"surface-3":S.n150,"surface-inset":S.n25,border:S.n250,"border-strong":S.n300,text:S.n900,"text-2":S.n600,"text-3":S.n550,graphite:de.base,"graphite-2":de.two,"graphite-3":de.three,action:de.base,"action-hover":de.two,"action-active":de.three,"on-action":S.n0,"action-line":Ba.light,"action-soft":S.n300,"on-action-soft":S.n700,amber:re.base,"amber-hover":re.hover,"amber-active":re.active,"amber-soft":re.soft,"on-amber":re.on,blue:J.base,"blue-hover":J.hover,"blue-active":J.active,"blue-text":J.text,"blue-tint":J.tint,"blue-line":J.line,"on-blue":S.n0,"ok-bg":M.okBg,"ok-fg":M.okFg,"ok-line":M.okLine,"warn-bg":M.warnBg,"warn-fg":M.warnFg,"warn-line":M.warnLine,"off-bg":M.offBg,"off-fg":M.offFg,"off-line":M.offLine,"bad-bg":M.badBg,"bad-fg":M.badFg,"bad-line":M.badLine,"oem-bg":M.oemBg,"oem-fg":M.oemFg,"oem-line":M.oemLine,"alt-bg":M.altBg,"alt-fg":M.altFg,"alt-line":M.altLine,"sale-bg":Kt.bg,"sale-fg":Kt.fg,"red-accent":He.red,"green-accent":He.green,"green-accent-hover":He.greenHover,"on-green":He.onGreen,star:Ma.light,"danger-solid":nt.base,"danger-solid-hover":nt.hover,"on-danger":S.n0,"nav-bg":S.n0,"nav-bg-2":S.n100,"nav-fg":S.n900,"nav-fg-2":S.n600,"nav-fg-3":S.n550,"nav-line":S.n200,"nav-line-strong":S.n300,"nav-hover":S.n100,"footer-bg":S.n100,"band-bg":de.dark,"band-fg":Ue.paper,"band-fg-2":Ue.mist,"band-line":de.darkLine,"band-hover":F(S.n0,.07),"shadow-xs":`0 1px 2px ${F(S.n900,.05)}`,"shadow-sm":`0 1px 2px ${F(S.n900,.05)}, 0 1px 3px ${F(S.n900,.04)}`,"shadow-md":`0 2px 4px ${F(S.n900,.04)}, 0 6px 16px ${F(S.n900,.07)}`,"shadow-lg":`0 4px 8px ${F(S.n900,.05)}, 0 16px 32px ${F(S.n900,.1)}`,"shadow-xl":`0 8px 16px ${F(S.n900,.06)}, 0 28px 56px ${F(S.n900,.13)}`,"shadow-up":`0 -2px 4px ${F(S.n900,.03)}, 0 -8px 24px ${F(S.n900,.08)}`,ring:`0 0 0 3px ${F(J.base,.28)}`,"ring-color":J.base,"ring-danger":`0 0 0 3px ${F(nt.base,.24)}`,"ring-ok":`0 0 0 4px ${F(M.okFg,.16)}`,scrim:F(S.n900,.6),"scrim-soft":F(S.n900,.32),glass:F(S.n0,.92),"glass-solid":S.n0,"on-scrim":S.n0,"skeleton-a":S.n100,"skeleton-b":S.n25,track:F(S.n900,.12),"media-bg":S.n100,"glow-1":F(me.mint,.1),"glow-2":F(me.pine,.06),"glow-amber":F(re.base,.09)},Oa={page:z.page,surface:z.surface,"surface-2":z.surfaceTwo,"surface-3":z.surfaceThree,"surface-inset":z.inset,border:z.border,"border-strong":z.borderStrong,text:z.text,"text-2":z.textTwo,"text-3":z.textThree,graphite:z.surface,"graphite-2":z.surfaceTwo,"graphite-3":z.surfaceThree,action:me.pine,"action-hover":de.two,"action-active":de.three,"on-action":S.n0,"action-line":Ba.dark,"action-soft":z.actionSoft,"on-action-soft":S.n300,amber:re.dark,"amber-hover":re.darkHover,"amber-active":re.darkActive,"amber-soft":re.darkSoft,"on-amber":re.on,blue:J.dark,"blue-hover":J.darkHover,"blue-active":J.base,"blue-text":J.dark,"blue-tint":J.darkTint,"blue-line":J.darkLine,"on-blue":S.n900,"ok-bg":M.okBgDark,"ok-fg":M.okFgDark,"ok-line":M.okLineDark,"warn-bg":M.warnBgDark,"warn-fg":M.warnFgDark,"warn-line":M.warnLineDark,"off-bg":M.offBgDark,"off-fg":M.offFgDark,"off-line":M.offLineDark,"bad-bg":M.badBgDark,"bad-fg":M.badFgDark,"bad-line":M.badLineDark,"oem-bg":M.oemBgDark,"oem-fg":M.oemFgDark,"oem-line":M.oemLineDark,"alt-bg":M.altBgDark,"alt-fg":M.altFgDark,"alt-line":M.altLineDark,"sale-bg":Kt.bgDark,"sale-fg":Kt.fgDark,"red-accent":He.redDark,"green-accent":He.greenDark,"green-accent-hover":He.greenHoverDark,"on-green":He.onGreen,star:Ma.dark,"danger-solid":nt.dark,"danger-solid-hover":nt.darkHover,"on-danger":nt.onDark,"nav-bg":z.page,"nav-bg-2":z.surfaceTwo,"nav-fg":z.text,"nav-fg-2":z.textTwo,"nav-fg-3":z.textThree,"nav-line":z.border,"nav-line-strong":z.borderStrong,"nav-hover":F(S.n0,.07),"footer-bg":z.surface,"band-bg":de.dark,"band-fg":Ue.paper,"band-fg-2":Ue.mist,"band-line":de.darkLine,"band-hover":F(S.n0,.07),"shadow-xs":`0 1px 2px ${F(ne,.4)}`,"shadow-sm":`0 1px 2px ${F(ne,.4)}, 0 1px 3px ${F(ne,.3)}`,"shadow-md":`0 2px 4px ${F(ne,.35)}, 0 6px 16px ${F(ne,.45)}`,"shadow-lg":`0 4px 8px ${F(ne,.4)}, 0 16px 32px ${F(ne,.55)}`,"shadow-xl":`0 8px 16px ${F(ne,.45)}, 0 28px 56px ${F(ne,.6)}`,"shadow-up":`0 -2px 4px ${F(ne,.3)}, 0 -8px 24px ${F(ne,.45)}`,ring:`0 0 0 3px ${F(J.dark,.36)}`,"ring-color":J.dark,"ring-danger":`0 0 0 3px ${F(nt.dark,.32)}`,"ring-ok":`0 0 0 4px ${F(M.okFgDark,.2)}`,scrim:F(ne,.68),"scrim-soft":F(ne,.45),glass:F(z.surfaceTwo,.92),"glass-solid":z.surfaceTwo,"on-scrim":S.n0,"skeleton-a":z.surfaceTwo,"skeleton-b":z.surfaceThree,track:F(S.n0,.14),"media-bg":z.surfaceTwo,"glow-1":F(me.mint,.2),"glow-2":F(me.pine,.12),"glow-amber":F(re.dark,.12)},un={"radius-xs":"4px","radius-sm":"6px","radius-md":"8px","radius-lg":"12px","radius-xl":"16px","radius-pill":"999px","space-0":"0","space-1":"4px","space-2":"8px","space-3":"12px","space-4":"16px","space-5":"24px","space-6":"32px","space-7":"48px","space-8":"64px","space-9":"96px","font-size-2xs":"12px","font-size-xs":"13px","font-size-sm":"15px","font-size-base":"16px","font-size-body":"17px","font-size-lg":"19px","font-size-xl":"23px","font-size-2xl":"29px","font-size-3xl":"37px","font-size-4xl":"47px","leading-none":"1","leading-tight":"1.16","leading-snug":"1.35","leading-normal":"1.62","leading-relaxed":"1.75","icon-xs":"14px","icon-sm":"16px","icon-md":"18px","icon-lg":"20px","icon-xl":"24px","duration-instant":"80ms","duration-fast":"140ms","duration-normal":"200ms","duration-slow":"320ms","ease-out":"cubic-bezier(0.22, 1, 0.36, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)","ease-spring":"cubic-bezier(0.34, 1.4, 0.64, 1)","duration-spin":"700ms","duration-shimmer":"1400ms"},_n={"space-2":"6px","space-3":"8px","space-4":"12px","space-5":"16px","space-6":"24px","space-7":"32px","font-size-2xs":"11px","font-size-xs":"12px","font-size-sm":"13px","font-size-base":"15px","font-size-body":"16px","font-size-lg":"18px","font-size-xl":"21px","font-size-2xl":"25px","font-size-3xl":"31px","font-size-4xl":"39px","leading-normal":"1.5","leading-relaxed":"1.6"},hn={heading:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",body:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",mono:"ui-monospace, 'SF Mono', Menlo, Consolas, monospace"},wa="--hanui-",ka="hanui-theme-overrides",ze="data-hanui-theme",ca="data-hanui-density",ja="hanui-theme-switching",pn=(e,a)=>{const s=e==="dark"?Oa:Pa,r=(e==="dark"?a==null?void 0:a.dark:a==null?void 0:a.light)??{};return{...s,...r}},Ha=e=>{const a=[],s=(i,_=" ")=>Object.entries(i).map(([h,d])=>`${_}${wa}${h}: ${d};`).join(`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),z=require("@ahmetilhn/handy-utils"),D=require("react-bootstrap-icons"),ot=require("react-dom"),nt={pine:"#00322a",mint:"#43ff9c"},Yt={paper:"#e9f7ed",mist:"#8abaa1"},S={n0:"#fdfefd",n25:"#f7fcf8",n50:"#f1faf4",n100:"#e9f7ed",n150:"#dff3e5",n200:"#d5f0de",n250:"#c0eacf",n300:"#aaddbf",n550:"#467060",n600:"#325a4d",n700:"#1d4238",n900:"#010f0b"},le={base:"#00322a",two:"#154c3d",three:"#225f4d",dark:"#00322a",darkLine:"#143f34"},H={page:"#010f0b",surface:"#071915",surfaceTwo:"#112520",surfaceThree:"#1e332d",inset:"#000705",border:"#273c35",borderStrong:"#3d564d",text:"#e9f7ed",textTwo:"#8abaa1",textThree:"#79a790",actionSoft:"#40554d"},Ka={light:"#00322a",dark:"#43ff9c"},de={base:"#1ba055",hover:"#20b360",active:"#19934e",soft:"#84cb97",dark:"#37c971",darkHover:"#4cdd82",darkActive:"#30b464",darkSoft:"#466e51",on:"#021407"},J={base:"#1f7b56",hover:"#176446",active:"#115037",text:"#17704e",tint:"#d5f6e4",line:"#93dfba",dark:"#60d4a1",darkHover:"#76eab5",darkTint:"#11251c",darkLine:"#2b4f3e"},B={okBg:"#c2f6cf",okFg:"#166e3a",okLine:"#7eda99",okBgDark:"#112617",okFgDark:"#56d682",okLineDark:"#2c5137",warnBg:"#f6e4cf",warnFg:"#7c5212",warnLine:"#e8b97f",warnBgDark:"#2a1e0f",warnFgDark:"#eeaa4c",warnLineDark:"#594327",offBg:"#daece5",offFg:"#4d625a",offLine:"#afcabf",offBgDark:"#1c2220",offFgDark:"#a0c2b5",offLineDark:"#404b46",badBg:"#f6e2e0",badFg:"#a91922",badLine:"#e9b3ae",badBgDark:"#381311",badFgDark:"#f2a099",badLineDark:"#732f2c",oemBg:"#a7f7c8",oemFg:"#0c5d3a",oemLine:"#6ace97",oemBgDark:"#0b2115",oemFgDark:"#43c485",oemLineDark:"#224b35",altBg:"#e9e4f6",altFg:"#751dc8",altLine:"#c9bae7",altBgDark:"#271540",altFgDark:"#c3aaf1",altLineDark:"#533281"},st={base:"#c21625",hover:"#a2111d",dark:"#f53039",darkHover:"#f26a64",onDark:"#1b0102"},He={red:"#de1b2c",redDark:"#f64f4e",green:"#18904c",greenDark:"#37c971",greenHover:"#12783e",greenHoverDark:"#4cdd82",onGreen:"#021407"},qt={bg:"#c2f6cf",fg:"#166e3a",bgDark:"#112617",fgDark:"#56d682"},Ua={light:"#8c6a11",dark:"#ebb737"},F=(e,a)=>{const n=e.replace("#",""),r=n.length===3?n.split("").map(_=>_+_).join(""):n,o=parseInt(r.slice(0,2),16),c=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return`rgba(${o}, ${c}, ${i}, ${a})`},$a=360,bn=1280,gn=16,Bt=e=>String(Number(e.toFixed(4))),ua=(e,a)=>{const n=(a-e)/(bn-$a),r=(e-n*$a)/gn;return`clamp(${Bt(e)}px, ${Bt(r)}rem + ${Bt(n*100)}vw, ${Bt(a)}px)`},za=(e,a)=>`calc(${e} * var(--hanui-${a}))`,xe=(e,a)=>za(ua(e,a),"type-scale"),We=(e,a)=>za(ua(e,a),"space-scale"),ne=H.inset,Ya={page:S.n25,surface:S.n0,"surface-2":S.n100,"surface-3":S.n150,"surface-inset":S.n50,border:S.n250,"border-strong":S.n300,text:S.n900,"text-2":S.n600,"text-3":S.n550,shell:le.base,"shell-2":le.two,"shell-3":le.three,action:le.base,"action-hover":le.two,"action-active":le.three,"on-action":S.n0,"action-line":Ka.light,"action-soft":S.n300,"on-action-soft":S.n700,cart:de.base,"cart-hover":de.hover,"cart-active":de.active,"cart-soft":de.soft,"on-cart":de.on,role:J.base,"role-hover":J.hover,"role-active":J.active,"role-text":J.text,"role-tint":J.tint,"role-line":J.line,"on-role":S.n0,"ok-bg":B.okBg,"ok-fg":B.okFg,"ok-line":B.okLine,"warn-bg":B.warnBg,"warn-fg":B.warnFg,"warn-line":B.warnLine,"off-bg":B.offBg,"off-fg":B.offFg,"off-line":B.offLine,"bad-bg":B.badBg,"bad-fg":B.badFg,"bad-line":B.badLine,"oem-bg":B.oemBg,"oem-fg":B.oemFg,"oem-line":B.oemLine,"alt-bg":B.altBg,"alt-fg":B.altFg,"alt-line":B.altLine,"sale-bg":qt.bg,"sale-fg":qt.fg,"red-accent":He.red,"green-accent":He.green,"green-accent-hover":He.greenHover,"on-green":He.onGreen,star:Ua.light,"danger-solid":st.base,"danger-solid-hover":st.hover,"on-danger":S.n0,"nav-bg":S.n0,"nav-bg-2":S.n100,"nav-fg":S.n900,"nav-fg-2":S.n600,"nav-fg-3":S.n550,"nav-line":S.n200,"nav-line-strong":S.n300,"nav-hover":S.n100,"footer-bg":S.n100,"band-bg":le.dark,"band-fg":Yt.paper,"band-fg-2":Yt.mist,"band-fg-3":H.textThree,"band-accent":nt.mint,"band-line":le.darkLine,"band-hover":F(S.n0,.07),"shadow-xs":`0 1px 2px ${F(S.n900,.05)}`,"shadow-sm":`0 1px 2px ${F(S.n900,.05)}, 0 1px 3px ${F(S.n900,.04)}`,"shadow-md":`0 2px 4px ${F(S.n900,.04)}, 0 6px 16px ${F(S.n900,.07)}`,"shadow-lg":`0 4px 8px ${F(S.n900,.05)}, 0 16px 32px ${F(S.n900,.1)}`,"shadow-xl":`0 8px 16px ${F(S.n900,.06)}, 0 28px 56px ${F(S.n900,.13)}`,"shadow-up":`0 -2px 4px ${F(S.n900,.03)}, 0 -8px 24px ${F(S.n900,.08)}`,ring:`0 0 0 3px ${F(J.base,.28)}`,"ring-color":J.base,"ring-danger":`0 0 0 3px ${F(st.base,.24)}`,"ring-ok":`0 0 0 4px ${F(B.okFg,.16)}`,scrim:F(S.n900,.6),"scrim-soft":F(S.n900,.32),glass:F(S.n0,.92),"glass-solid":S.n0,"on-scrim":S.n0,"skeleton-a":S.n100,"skeleton-b":S.n25,track:F(S.n900,.12),"media-bg":S.n100,"glow-1":F(nt.mint,.1),"glow-2":F(nt.pine,.06),"glow-cart":F(de.base,.09)},qa={page:H.page,surface:H.surface,"surface-2":H.surfaceTwo,"surface-3":H.surfaceThree,"surface-inset":H.inset,border:H.border,"border-strong":H.borderStrong,text:H.text,"text-2":H.textTwo,"text-3":H.textThree,shell:H.surface,"shell-2":H.surfaceTwo,"shell-3":H.surfaceThree,action:nt.pine,"action-hover":le.two,"action-active":le.three,"on-action":S.n0,"action-line":Ka.dark,"action-soft":H.actionSoft,"on-action-soft":S.n300,cart:de.dark,"cart-hover":de.darkHover,"cart-active":de.darkActive,"cart-soft":de.darkSoft,"on-cart":de.on,role:J.dark,"role-hover":J.darkHover,"role-active":J.base,"role-text":J.dark,"role-tint":J.darkTint,"role-line":J.darkLine,"on-role":S.n900,"ok-bg":B.okBgDark,"ok-fg":B.okFgDark,"ok-line":B.okLineDark,"warn-bg":B.warnBgDark,"warn-fg":B.warnFgDark,"warn-line":B.warnLineDark,"off-bg":B.offBgDark,"off-fg":B.offFgDark,"off-line":B.offLineDark,"bad-bg":B.badBgDark,"bad-fg":B.badFgDark,"bad-line":B.badLineDark,"oem-bg":B.oemBgDark,"oem-fg":B.oemFgDark,"oem-line":B.oemLineDark,"alt-bg":B.altBgDark,"alt-fg":B.altFgDark,"alt-line":B.altLineDark,"sale-bg":qt.bgDark,"sale-fg":qt.fgDark,"red-accent":He.redDark,"green-accent":He.greenDark,"green-accent-hover":He.greenHoverDark,"on-green":He.onGreen,star:Ua.dark,"danger-solid":st.dark,"danger-solid-hover":st.darkHover,"on-danger":st.onDark,"nav-bg":H.page,"nav-bg-2":H.surfaceTwo,"nav-fg":H.text,"nav-fg-2":H.textTwo,"nav-fg-3":H.textThree,"nav-line":H.border,"nav-line-strong":H.borderStrong,"nav-hover":F(S.n0,.07),"footer-bg":H.surface,"band-bg":le.dark,"band-fg":Yt.paper,"band-fg-2":Yt.mist,"band-fg-3":H.textThree,"band-accent":nt.mint,"band-line":le.darkLine,"band-hover":F(S.n0,.07),"shadow-xs":`0 1px 2px ${F(ne,.4)}`,"shadow-sm":`0 1px 2px ${F(ne,.4)}, 0 1px 3px ${F(ne,.3)}`,"shadow-md":`0 2px 4px ${F(ne,.35)}, 0 6px 16px ${F(ne,.45)}`,"shadow-lg":`0 4px 8px ${F(ne,.4)}, 0 16px 32px ${F(ne,.55)}`,"shadow-xl":`0 8px 16px ${F(ne,.45)}, 0 28px 56px ${F(ne,.6)}`,"shadow-up":`0 -2px 4px ${F(ne,.3)}, 0 -8px 24px ${F(ne,.45)}`,ring:`0 0 0 3px ${F(J.dark,.36)}`,"ring-color":J.dark,"ring-danger":`0 0 0 3px ${F(st.dark,.32)}`,"ring-ok":`0 0 0 4px ${F(B.okFgDark,.2)}`,scrim:F(ne,.68),"scrim-soft":F(ne,.45),glass:F(H.surfaceTwo,.92),"glass-solid":H.surfaceTwo,"on-scrim":S.n0,"skeleton-a":H.surfaceTwo,"skeleton-b":H.surfaceThree,track:F(S.n0,.14),"media-bg":H.surfaceTwo,"glow-1":F(nt.mint,.2),"glow-2":F(nt.pine,.12),"glow-cart":F(de.dark,.12)},fn={"radius-xs":"4px","radius-sm":"6px","radius-md":"8px","radius-lg":"12px","radius-xl":"16px","radius-pill":"999px","type-scale":"1","space-scale":"1","space-0":"0","space-1":"4px","space-2":"8px","space-3":We(10,12),"space-4":We(13,16),"space-5":We(17,24),"space-6":We(22,32),"space-7":We(30,48),"space-8":We(40,64),"space-9":We(52,96),"font-size-2xs":xe(11,12),"font-size-xs":xe(12,13),"font-size-sm":xe(13.5,15),"font-size-base":xe(15,16),"font-size-body":xe(16,17),"font-size-lg":xe(17,19),"font-size-xl":xe(19.5,23),"font-size-2xl":xe(23,29),"font-size-3xl":xe(26,37),"font-size-4xl":xe(30,47),"font-size-control":`max(16px, ${ua(15,16)})`,"leading-none":"1","leading-tight":"1.16","leading-snug":"1.35","leading-normal":"1.62","leading-relaxed":"1.75","icon-xs":"14px","icon-sm":"16px","icon-md":"18px","icon-lg":"20px","icon-xl":"24px","duration-instant":"80ms","duration-fast":"140ms","duration-normal":"200ms","duration-slow":"320ms","ease-out":"cubic-bezier(0.22, 1, 0.36, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)","ease-spring":"cubic-bezier(0.34, 1.4, 0.64, 1)","duration-spin":"700ms","duration-shimmer":"1400ms"},xn={"type-scale":"0.93","space-scale":"0.88"},vn={heading:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",body:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",mono:"ui-monospace, 'SF Mono', Menlo, Consolas, monospace"},Ea="--hanui-",Ia="hanui-theme-overrides",Ke="data-hanui-theme",_a="data-hanui-density",Ca="hanui-theme-switching",yn=(e,a)=>{const n=e==="dark"?qa:Ya,r=(e==="dark"?a==null?void 0:a.dark:a==null?void 0:a.light)??{};return{...n,...r}},Wa=e=>{const a=[],n=(i,_=" ")=>Object.entries(i).map(([h,d])=>`${_}${Ea}${h}: ${d};`).join(`
2
2
  `),r=e.fonts??{},o=Object.entries(r).filter(([,i])=>!!i);o.length>0&&a.push(`:root {
3
- ${o.map(([i,_])=>` ${wa}font-${i}: ${_};`).join(`
3
+ ${o.map(([i,_])=>` ${Ea}font-${i}: ${_};`).join(`
4
4
  `)}
5
- }`);const c=e.metrics??{};if(Object.keys(c).length>0){const i=s(c);a.push(`:root {
5
+ }`);const c=e.metrics??{};if(Object.keys(c).length>0){const i=n(c);a.push(`:root {
6
6
  ${i}
7
- }`),a.push(`:root[${ca}='compact'] {
7
+ }`),a.push(`:root[${_a}='compact'] {
8
8
  ${i}
9
- }`)}if(e.light&&Object.keys(e.light).length>0){const i=s(e.light);a.push(`:root {
9
+ }`)}if(e.light&&Object.keys(e.light).length>0){const i=n(e.light);a.push(`:root {
10
10
  ${i}
11
- }`),a.push(`:root[${ze}='light'] {
11
+ }`),a.push(`:root[${Ke}='light'] {
12
12
  ${i}
13
- }`)}if(e.dark&&Object.keys(e.dark).length>0){const i=s(e.dark);a.push(`:root[${ze}='dark'] {
13
+ }`)}if(e.dark&&Object.keys(e.dark).length>0){const i=n(e.dark);a.push(`:root[${Ke}='dark'] {
14
14
  ${i}
15
15
  }`),a.push(`@media (prefers-color-scheme: dark) {
16
- :root:not([${ze}]) {
17
- ${s(e.dark," ")}
16
+ :root:not([${Ke}]) {
17
+ ${n(e.dark," ")}
18
18
  }
19
19
  }`)}return a.join(`
20
20
 
21
- `)},la=e=>{if(!U.isClient())return;const a=e?Ha(e):"",s=document.getElementById(ka);if(a===""){s==null||s.remove();return}const r=s??document.createElement("style");r.id=ka,r.textContent=a,s||document.head.appendChild(r)},za=n.createContext({}),O=()=>n.useContext(za),mn=({children:e,theme:a,linkComponent:s,labels:r})=>{const o=n.useMemo(()=>a?JSON.stringify(a):"",[a]);n.useEffect(()=>{la(a)},[o]);const c=n.useRef(a);c.current=a;const i=n.useMemo(()=>({theme:c.current,linkComponent:s,labels:r}),[o,s,r]);return t.jsx(za.Provider,{value:i,children:e})},bn=(e={})=>{la(e.theme),U.isClient()&&(e.colorScheme&&document.documentElement.setAttribute(ze,e.colorScheme),e.density&&document.documentElement.setAttribute(ca,e.density))},gn="hanui-live-region",fn=e=>{if(!U.isClient())return null;const a=`${gn}-${e}`,s=document.getElementById(a);if(s)return s;const r=document.createElement("div");return r.id=a,r.setAttribute("aria-live",e),r.setAttribute("aria-atomic","true"),r.className="hanui-visually-hidden",document.body.appendChild(r),r},xn=(e,a)=>{e.textContent="",window.requestAnimationFrame(()=>{e.textContent=a})},Yt=()=>n.useCallback((e,a="polite")=>{const s=e.trim();if(s==="")return;const r=fn(a);r&&xn(r,s)},[]),Na=()=>{var e;return U.isClient()&&((e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},vn=()=>{if(!U.isClient())return"system";const e=document.documentElement.getAttribute(ze);return e==="dark"||e==="light"?e:"system"},yn=()=>{const[e,a]=n.useState("light"),[s,r]=n.useState("light"),[o,c]=n.useState(!1);n.useEffect(()=>{a(vn()),r(Na()),c(!0)},[]),n.useEffect(()=>{if(!U.isClient()||!window.matchMedia)return;const d=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>r(Na());return d.addEventListener("change",l),()=>d.removeEventListener("change",l)},[]);const i=e==="system"?s:e,_=n.useCallback(d=>{if(!U.isClient())return;const l=document.documentElement;l.classList.add(ja),d==="system"?l.removeAttribute(ze):l.setAttribute(ze,d),a(d),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(ja))})},[]),h=n.useCallback(()=>_(i==="dark"?"light":"dark"),[i,_]);return{scheme:i,preference:e,setScheme:_,toggle:h,isReady:o}},wn=()=>{!U.isClient()||typeof window.scrollTo!="function"||window.scrollTo({top:0,left:0,behavior:"instant"})},da=(e,a)=>{typeof(e==null?void 0:e.scrollIntoView)=="function"&&e.scrollIntoView(a)},ua=({count:e,isOpen:a,initialIndex:s=0,onSelect:r,onClose:o},{hasSpaceSelect:c=!1}={})=>{const[i,_]=n.useState(s),h=n.useRef(null);n.useEffect(()=>{a&&_(s)},[a,s]),n.useEffect(()=>{_(l=>l>=e?Math.max(0,e-1):l)},[e]),n.useEffect(()=>{var l;a&&da((l=h.current)==null?void 0:l.querySelector(`[data-index="${i}"]`),{block:"nearest"})},[i,a,e]);const d=n.useCallback(l=>{const p=e-1;switch(l.key){case"ArrowDown":l.preventDefault(),_(u=>u>=p?0:u+1);break;case"ArrowUp":l.preventDefault(),_(u=>u<=0?p:u-1);break;case"Home":l.preventDefault(),_(0);break;case"End":l.preventDefault(),_(p);break;case" ":case"Enter":{if(l.key===" "&&!c)break;l.preventDefault(),e>0&&r(i);break}case"Escape":l.preventDefault(),l.stopPropagation(),o();break;case"Tab":o();break}},[i,e,c,o,r]);return{activeIndex:i,setActiveIndex:_,listRef:h,handleKeyDown:d}},Qt={top:"bottom",bottom:"top",left:"right",right:"left"},$a=(e,a,s)=>s<a?a:Math.min(Math.max(e,a),s),Vt=(e,a,s,r,o)=>{const c=s==="top"||s==="bottom",i={top:e.top-a.height-o,bottom:e.top+e.height+o,left:e.left-a.width-o,right:e.left+e.width+o}[s],_=c?e.left:e.top,h=c?e.width:e.height,d=c?a.width:a.height,l={start:_,center:_+h/2-d/2,end:_+h-d}[r];return c?{top:i,left:l}:{top:l,left:i}},Ea=(e,a,s,r,o)=>({top:e.top>=r,bottom:e.top+a.height<=o.height-r,left:e.left>=r,right:e.left+a.width<=o.width-r})[s],ft=(e,a,{side:s="top",align:r="center",offset:o=8,padding:c=8,isOpen:i})=>{const[_,h]=n.useState({style:{position:"fixed",top:0,left:0},side:s,anchorWidth:0,isPositioned:!1}),d=n.useRef(0),l=n.useCallback(()=>{const b=e.current,g=a.current;if(!b||!g)return;const k=b.getBoundingClientRect(),m=g.getBoundingClientRect(),f={width:window.innerWidth,height:window.innerHeight},N=Vt(k,m,s,r,o),j=Ea(N,m,s,c,f)?s:Ea(Vt(k,m,Qt[s],r,o),m,Qt[s],c,f)?Qt[s]:s,x=Vt(k,m,j,r,o);h({style:{position:"fixed",top:Math.round($a(x.top,c,f.height-m.height-c)),left:Math.round($a(x.left,c,f.width-m.width-c))},side:j,anchorWidth:k.width,isPositioned:!0})},[e,a,s,r,o,c]),p=n.useCallback(()=>{d.current||(d.current=window.requestAnimationFrame(()=>{d.current=0,l()}))},[l]);return(U.isClient()?n.useLayoutEffect:n.useEffect)(()=>{var g,k;if(!i){h(m=>m.isPositioned?{...m,isPositioned:!1}:m);return}l(),window.addEventListener("resize",p),(g=window.visualViewport)==null||g.addEventListener("resize",p),(k=window.visualViewport)==null||k.addEventListener("scroll",p),document.addEventListener("scroll",p,!0);const b=typeof ResizeObserver>"u"?null:new ResizeObserver(p);return b&&a.current&&b.observe(a.current),b&&e.current&&b.observe(e.current),()=>{var m,f;window.removeEventListener("resize",p),(m=window.visualViewport)==null||m.removeEventListener("resize",p),(f=window.visualViewport)==null||f.removeEventListener("scroll",p),document.removeEventListener("scroll",p,!0),b==null||b.disconnect(),d.current&&(window.cancelAnimationFrame(d.current),d.current=0)}},[i,l,p,e,a]),_},kn=40,jn=6,Ka=(e,{rowHeight:a=kn,overscan:s=jn,isEnabled:r=!0}={})=>{const o=n.useRef(null),[c,i]=n.useState({start:0,end:e,totalHeight:e*a,offset:0}),_=n.useCallback(()=>{const d=o.current,l=!r||!d||d.clientHeight===0?{start:0,end:e,totalHeight:e*a,offset:0}:(()=>{const p=Math.ceil(d.clientHeight/a),u=Math.floor(d.scrollTop/a),b=Math.max(0,u-s),g=Math.min(e,u+p+s);return{start:b,end:g,totalHeight:e*a,offset:b*a}})();i(p=>p.start===l.start&&p.end===l.end&&p.totalHeight===l.totalHeight&&p.offset===l.offset?p:l)},[e,r,s,a]);n.useEffect(_),n.useEffect(()=>{const d=o.current;if(!d)return;d.addEventListener("scroll",_,{passive:!0});const l=typeof ResizeObserver>"u"?null:new ResizeObserver(_);return l==null||l.observe(d),()=>{d.removeEventListener("scroll",_),l==null||l.disconnect()}},[_]);const h=n.useCallback(d=>{const l=o.current;if(!l||!r)return;const p=d*a,u=p+a;p<l.scrollTop?l.scrollTop=p:u>l.scrollTop+l.clientHeight&&(l.scrollTop=u-l.clientHeight)},[r,a]);return{scrollRef:o,range:c,scrollToIndex:h,measure:_}};var ke=(e=>(e.PRIMARY="PRIMARY",e.CART="CART",e.SECONDARY="SECONDARY",e.OUTLINE="OUTLINE",e.DARK="DARK",e.LIGHT="LIGHT",e.GHOST="GHOST",e.DANGER="DANGER",e))(ke||{}),Ye=(e=>(e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e))(Ye||{});const Ua=640,Nn=768,Ya=1024,$n=`(min-width: ${Ya+1}px)`,qt=`(min-width: ${Ua+1}px)`,sa=e=>e.replace(/İ/g,"i").replace(/I/g,"i").replace(/ı/g,"i").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ş/g,"s").replace(/ğ/g,"g").replace(/ç/g,"c").replace(/ø/g,"o").replace(/æ/g,"ae").replace(/ß/g,"ss").replace(/đ/g,"d").replace(/ł/g,"l").replace(/\s+/g," ").trim(),Rt=(e,a)=>sa(e).includes(sa(a)),v=(...e)=>{let a="";for(const s of e)s&&(a=a===""?s:`${a} ${s}`);return a},L=(e,a)=>Object.assign(e,{displayName:a}),ue=({children:e,...a})=>{const{linkComponent:s}=O();return s?t.jsx(s,{...a,children:e}):t.jsx("a",{...a,children:e})},Ca=new Set,P=(e,...a)=>{for(const s of a)if(s!==void 0)return s;return process.env.NODE_ENV!=="production"&&!Ca.has(e)&&(Ca.add(e),console.error(`[hanui] Eksik metin: ${e}. Prop olarak geçin ya da <HanuiProvider labels={…}> içinde bir kez tanımlayın. Metinsiz bırakılan öğe ekran okuyucuda adsız kalır.`)),""},be=(e,a,...s)=>a?a(...s):P(e),En="hanui-spinner-7pXwf",Cn="hanui-spinner__label-sZvSq",Jt={spinner:En,spinner__label:Cn,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},In=({size:e="md",label:a,className:s})=>{const{labels:r}=O();return t.jsx("span",{className:v(Jt.spinner,Jt[`spinner--${e}`],s),role:"status",children:t.jsx("span",{className:Jt.spinner__label,children:a??P("Spinner.label",r==null?void 0:r.loading)})})},_a=n.memo(In),Tn="hanui-button-SRu4R",Rn="hanui-button__icon-giom6",Dn="hanui-button__spinner-vexVG",Sn="hanui-button__label-qiMHm",$e={button:Tn,button__icon:Rn,button__spinner:Dn,button__label:Sn,"button--full":"hanui-button--full-CwPHR","button--loading":"hanui-button--loading-O-naJ","button--small":"hanui-button--small-TF9Hz","button--medium":"hanui-button--medium-JDjkH","button--large":"hanui-button--large-btadu","button--primary":"hanui-button--primary-ym7RJ","button--cart":"hanui-button--cart-5DVmR","button--secondary":"hanui-button--secondary-56m1d","button--outline":"hanui-button--outline-ZI8sw","button--dark":"hanui-button--dark-FGZgn","button--light":"hanui-button--light-YzEPs","button--ghost":"hanui-button--ghost-rijnZ","button--danger":"hanui-button--danger-TNGd2"},Ln=n.forwardRef(({variant:e=ke.PRIMARY,size:a=Ye.MEDIUM,isLoading:s,isFullWidth:r,startIcon:o,endIcon:c,className:i,children:_,disabled:h,href:d,isExternal:l,linkProps:p,testId:u,...b},g)=>{const k=v($e.button,$e[`button--${e.toLowerCase()}`],$e[`button--${a.toLowerCase()}`],r&&$e["button--full"],s&&$e["button--loading"],i),m=t.jsxs(t.Fragment,{children:[s&&t.jsx(_a,{size:"sm",className:$e.button__spinner,label:""}),!s&&o&&t.jsx("span",{className:$e.button__icon,children:o}),t.jsx("span",{className:$e.button__label,children:_}),c&&t.jsx("span",{className:$e.button__icon,children:c})]}),f=!!h||!!s,N={"aria-busy":s,"aria-disabled":f||void 0,tabIndex:f?-1:b.tabIndex,onClick:j=>{var x;if(f){j.preventDefault();return}(x=b.onClick)==null||x.call(b,j)}};return d&&l?t.jsx("a",{...b,...N,href:d,className:k,target:"_blank",rel:"noopener noreferrer","data-testid":u,children:m}):d?t.jsx(ue,{...b,...N,href:d,className:k,"data-testid":u,...p,children:m}):t.jsx("button",{ref:g,className:k,disabled:h||s,"aria-busy":s,"data-testid":u,...b,children:m})}),gt=n.memo(L(Ln,"Button")),An="hanui-iconButton-JdtwM",Zt={iconButton:An,"iconButton--sm":"hanui-iconButton--sm-wE6zE","iconButton--md":"hanui-iconButton--md-iTNNS","iconButton--ghost":"hanui-iconButton--ghost-w-8K3","iconButton--outline":"hanui-iconButton--outline-vEhcY","iconButton--solid":"hanui-iconButton--solid-NUszP","iconButton--cart":"hanui-iconButton--cart-nVsH-","iconButton--danger":"hanui-iconButton--danger-xKkEA"},Fn=n.forwardRef(({icon:e,label:a,variant:s="ghost",size:r="md",className:o,type:c="button",href:i,linkProps:_,testId:h,...d},l)=>{const p=v(Zt.iconButton,Zt[`iconButton--${s}`],Zt[`iconButton--${r}`],o),u=!!d.disabled;return i?t.jsx(ue,{...d,href:i,className:p,"aria-label":a,"aria-disabled":u||void 0,tabIndex:u?-1:d.tabIndex,onClick:b=>{var g;if(u){b.preventDefault();return}(g=d.onClick)==null||g.call(d,b)},"data-testid":h,..._,children:e}):t.jsx("button",{ref:l,type:c,className:p,"aria-label":a,"data-testid":h,...d,children:e})}),je=n.memo(L(Fn,"IconButton")),Bn="hanui-link-WBmXY",Mn="hanui-link__label--OEu-",Pn="hanui-link__arrow-JKXm-",yt={link:Bn,link__label:Mn,link__arrow:Pn,"link--sm":"hanui-link--sm-a-3Dz","link--md":"hanui-link--md-lZdYP","link--brand":"hanui-link--brand-vr8sW","link--muted":"hanui-link--muted-EeN6l"},On=({href:e,children:a,hasArrow:s,tone:r="brand",size:o="md",className:c,linkProps:i,..._})=>t.jsxs(ue,{href:e,className:v(yt.link,yt[`link--${r}`],yt[`link--${o}`],c),...i,..._,children:[t.jsx("span",{className:yt.link__label,children:a}),s&&t.jsx(D.ArrowRight,{"aria-hidden":!0,className:yt.link__arrow})]}),Hn=n.memo(On),zn=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Kn=e=>{if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const a=e.getAttribute("contenteditable");if(a===""||a==="true"||a==="plaintext-only")return!0;const s=e.tagName;return s==="TEXTAREA"?!0:s!=="INPUT"?!1:!zn.has(e.type)},ha=e=>{const a=e.ownerDocument.activeElement;!e.contains(a)||!Kn(a)||(a.blur(),e.tabIndex=-1,e.focus({preventScroll:!0}))},xt=()=>{const e=typeof document>"u"?null:document.activeElement;return()=>{e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0})}},Un=["a[href]","button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"])'].map(e=>`${e}:not([inert]):not([aria-hidden="true"])`).join(", "),Wt=(e,a="[data-hanui-close]")=>{const s=e.querySelector("[data-hanui-autofocus]");if(s){s.focus({preventScroll:!0});return}const r=[...e.querySelectorAll(Un)],o=r.find(c=>!c.matches(a))??r[0];if(o){o.focus({preventScroll:!0});return}e.tabIndex=-1,e.focus({preventScroll:!0})},zt=[],Dt=()=>{const e=Symbol("hanui-modal");return zt.push(e),{token:e,pop:()=>{const a=zt.indexOf(e);a>=0&&zt.splice(a,1)}}},St=e=>zt.at(-1)===e,pa=(e,a)=>{n.useEffect(()=>{if(!e)return;const{token:s,pop:r}=Dt(),o=c=>{c.key==="Escape"&&St(s)&&a()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),r()}},[e,a])},Yn=e=>{var s;const a=((s=e==null?void 0:e.closest)==null?void 0:s.call(e,"dialog"))??null;return a&&a.isConnected?{container:a,needsTopLayer:qn(a)}:{container:document.body,needsTopLayer:!1}},qn=e=>{try{return e.matches(":modal")}catch{return e.hasAttribute("open")}},Wn={margin:0,right:"auto",bottom:"auto"},Xn=e=>{if(!e||typeof e.showPopover!="function")return()=>{};try{e.showPopover()}catch{return()=>{}}return()=>{try{e.isConnected&&e.hidePopover()}catch{}}},Gn={},Qn={},Lt=(e,a,s)=>{const r=e&&U.isClient()?Yn(a.current):null,o=(r==null?void 0:r.needsTopLayer)??!1;return n.useEffect(()=>{if(!(!e||!o))return Xn(s.current)},[e,o,s]),{container:(r==null?void 0:r.container)??null,attributes:o?{popover:"manual"}:Gn,style:o?Wn:Qn}},Vn="hanui-tooltip-RG1g1",Jn="hanui-tooltip__trigger-nWZtO",Zn="hanui-bubble-bcBNk",Bt={tooltip:Vn,tooltip__trigger:Jn,bubble:Zn,"bubble--top":"hanui-bubble--top-uWSZy","bubble--bottom":"hanui-bubble--bottom-jKokL","bubble--left":"hanui-bubble--left-WK4EM","bubble--right":"hanui-bubble--right-EQjUT"},es=120,ts=500,as=300,ns=({content:e,children:a,side:s,position:r,openDelay:o=as,className:c})=>{const[i,_]=n.useState(!1),h=n.useId(),d=s??r??"top",l=n.useRef(null),p=n.useRef(null),u=n.useRef(0),b=n.useRef(0),g=n.useMemo(()=>{if(!n.isValidElement(a))return!1;const T=a.type,y=a.props;return y.tabIndex!==void 0?!0:y.disabled===!0||typeof T!="string"?!1:T==="a"?y.href!==void 0:["button","input","select","textarea"].includes(T)},[a]),[k,m]=n.useState(!1);n.useEffect(()=>{const T=l.current;T&&m(!!T.querySelector('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))},[a]);const f=g||k,N=ft(l,p,{side:d,align:"center",isOpen:i}),j=Lt(i,l,p),x=n.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=0},[]),$=n.useCallback(T=>{x(),u.current=window.setTimeout(()=>_(!0),T)},[x]),R=n.useCallback((T=es)=>{x(),u.current=window.setTimeout(()=>_(!1),T)},[x]);n.useEffect(()=>x,[x]),n.useEffect(()=>()=>{b.current&&window.clearTimeout(b.current)},[]);const I=n.useCallback(()=>R(0),[R]);pa(i,I),n.useEffect(()=>{if(!i)return;const T=y=>{var C;y.pointerType!=="mouse"&&((C=l.current)!=null&&C.contains(y.target)||R(0))};return document.addEventListener("pointerdown",T),()=>document.removeEventListener("pointerdown",T)},[i,R]);const w=()=>{b.current&&window.clearTimeout(b.current),b.current=0},E=T=>{T.pointerType!=="mouse"&&(b.current=window.setTimeout(()=>_(!0),ts))};return t.jsxs(t.Fragment,{children:[t.jsx("span",{ref:l,className:v(Bt.tooltip,c),tabIndex:f?void 0:0,onPointerEnter:T=>T.pointerType==="mouse"&&$(o),onPointerLeave:T=>{w(),T.pointerType==="mouse"&&R()},onPointerDown:E,onPointerUp:w,onPointerCancel:w,onFocus:()=>$(0),onBlur:()=>R(0),onContextMenu:T=>{(i||b.current)&&T.preventDefault()},children:t.jsx("span",{"aria-describedby":i?h:void 0,className:Bt.tooltip__trigger,children:a})}),i&&j.container&&rt.createPortal(t.jsx("span",{ref:p,...j.attributes,id:h,role:"tooltip",className:v(Bt.bubble,Bt[`bubble--${N.side}`]),style:{...N.style,...j.style,visibility:N.isPositioned?"visible":"hidden"},children:e}),j.container)]})},ss=n.memo(L(ns,"Tooltip")),rs="hanui-menu-1x-FU",os="hanui-menu__item-d1iil",is="hanui-menu__icon-kzLV2",wt={menu:rs,"menu--top":"hanui-menu--top-gpo39","menu--bottom":"hanui-menu--bottom-6sL7b","menu--left":"hanui-menu--left-4w-O8","menu--right":"hanui-menu--right-XmM8G",menu__item:os,"menu__item--danger":"hanui-menu__item--danger-lIINY",menu__icon:is},cs=e=>e.map((a,s)=>a.isDisabled?-1:s).filter(a=>a>=0),ls=({trigger:e,items:a,label:s,side:r="bottom",align:o="start",className:c,testId:i})=>{const _=n.useId(),h=n.useRef(null),d=n.useRef(null),l=n.useRef(null),p=n.useRef({text:"",at:0}),[u,b]=n.useState(!1),[g,k]=n.useState(0),m=ft(h,d,{side:r,align:o,isOpen:u}),f=cs(a),N=Lt(u,h,d),j=n.useCallback(y=>{f.length!==0&&(l.current=xt(),k(y==="first"?f[0]:f[f.length-1]),b(!0))},[f]),x=n.useCallback(()=>{var y;b(!1),(y=l.current)==null||y.call(l),l.current=null},[]);n.useEffect(()=>()=>{var y;(y=l.current)==null||y.call(l),l.current=null},[]),n.useEffect(()=>{var y,C;u&&((C=(y=d.current)==null?void 0:y.querySelector(`[data-index="${g}"]`))==null||C.focus({preventScroll:!0}))},[u,g]),n.useEffect(()=>{if(!u)return;const y=C=>{var Y,X;const B=C.target;(Y=d.current)!=null&&Y.contains(B)||(X=h.current)!=null&&X.contains(B)||x()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[u,x]);const $=y=>{const B=(f.indexOf(g)+y+f.length)%f.length;k(f[B])},R=y=>{const C=Date.now(),B=C-p.current.at>500?y:p.current.text+y;p.current={text:B,at:C};const Y=f.find(X=>a[X].label.toLocaleLowerCase("tr").startsWith(B.toLocaleLowerCase("tr")));Y!==void 0&&k(Y)},I=y=>{switch(y.key){case"ArrowDown":y.preventDefault(),$(1);break;case"ArrowUp":y.preventDefault(),$(-1);break;case"Home":y.preventDefault(),k(f[0]);break;case"End":y.preventDefault(),k(f[f.length-1]);break;case"Escape":y.preventDefault(),x();break;case"Tab":x();break;default:y.key.length===1&&!y.metaKey&&!y.ctrlKey&&R(y.key)}},w=y=>{if(y.key==="ArrowUp"){y.preventDefault(),j("last");return}["ArrowDown","Enter"," "].includes(y.key)&&(y.preventDefault(),j("first"))};if(!n.isValidElement(e))return null;const E=e.props,T=n.cloneElement(e,{ref:h,"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?_:void 0,onClick:y=>{var C;(C=E.onClick)==null||C.call(E,y),u?x():j("first")},onKeyDown:y=>{var C;(C=E.onKeyDown)==null||C.call(E,y),u||w(y)}});return t.jsxs(t.Fragment,{children:[T,u&&N.container&&rt.createPortal(t.jsx("div",{ref:d,id:_,role:"menu","aria-label":s,...N.attributes,className:v(wt.menu,wt[`menu--${m.side}`],c),style:{...m.style,...N.style,visibility:m.isPositioned?"visible":"hidden"},"data-testid":i,onKeyDown:I,children:a.map((y,C)=>t.jsxs("button",{type:"button",role:"menuitem","data-index":C,tabIndex:C===g?0:-1,disabled:y.isDisabled,className:v(wt.menu__item,y.isDanger&&wt["menu__item--danger"]),onClick:()=>{y.onSelect(),x()},children:[y.icon&&t.jsx("span",{className:wt.menu__icon,"aria-hidden":!0,children:y.icon}),y.label]},y.id))}),N.container)]})},ds=n.memo(L(ls,"Menu")),us="hanui-popover-VxgiK",Ia={popover:us,"popover--top":"hanui-popover--top-OUYwo","popover--bottom":"hanui-popover--bottom-Q1K4X","popover--left":"hanui-popover--left-9Rsjx","popover--right":"hanui-popover--right-0TJeo"},_s=({trigger:e,children:a,label:s,side:r="bottom",align:o="start",isOpen:c,onOpenChange:i,className:_,testId:h})=>{const d=n.useId(),l=n.useRef(null),p=n.useRef(null),u=n.useRef(null),[b,g]=n.useState(!1),k=c!==void 0,m=k?c:b,f=ft(l,p,{side:r,align:o,isOpen:m}),N=Lt(m,l,p),j=n.useCallback(I=>{k||g(I),i==null||i(I)},[k,i]);n.useEffect(()=>{if(!m)return;u.current=xt();const I=p.current;return I&&Wt(I),()=>{var w;(w=u.current)==null||w.call(u),u.current=null}},[m]);const x=n.useCallback(()=>j(!1),[j]);if(pa(m,x),n.useEffect(()=>{if(!m)return;const I=w=>{var T,y;const E=w.target;(T=p.current)!=null&&T.contains(E)||(y=l.current)!=null&&y.contains(E)||j(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[m,j]),!n.isValidElement(e))return null;const $=e.props,R=n.cloneElement(e,{ref:l,"aria-expanded":m,"aria-haspopup":"dialog","aria-controls":m?d:void 0,onClick:I=>{var w;(w=$.onClick)==null||w.call($,I),j(!m)}});return t.jsxs(t.Fragment,{children:[R,m&&N.container&&rt.createPortal(t.jsx("div",{ref:p,id:d,...N.attributes,role:"dialog","aria-label":s,className:v(Ia.popover,Ia[`popover--${f.side}`],_),style:{...f.style,...N.style,visibility:f.isPositioned?"visible":"hidden"},"data-testid":h,onBlur:I=>{var E;const w=I.relatedTarget;w&&(I.currentTarget.contains(w)||(E=l.current)!=null&&E.contains(w)||w.closest('[role="listbox"],[role="menu"],[role="dialog"]')||j(!1))},children:a}),N.container)]})},hs=n.memo(L(_s,"Popover")),ps="hanui-chip--NLgU",ms="hanui-chip__icon-IjjSb",bs="hanui-chip__label-cT4hw",gs="hanui-chip__count-MBGO3",Be={chip:ps,chip__icon:ms,chip__label:bs,chip__count:gs,"chip--sm":"hanui-chip--sm-60H-S","chip--md":"hanui-chip--md--yAlm","chip--iconOnly":"hanui-chip--iconOnly-5LT1h","chip--selected":"hanui-chip--selected-FdpCr"},fs=n.forwardRef(({children:e,icon:a,endIcon:s,count:r,isSelected:o,size:c="md",label:i,href:_,linkProps:h,className:d,type:l="button",role:p,testId:u,...b},g)=>{const k=v(Be.chip,Be[`chip--${c}`],o&&Be["chip--selected"],!e&&Be["chip--iconOnly"],d),m=t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:Be.chip__icon,"aria-hidden":!0,children:a}),e&&t.jsx("span",{className:Be.chip__label,children:e}),U.isDefined(r)&&t.jsx("span",{className:Be.chip__count,children:r}),s&&t.jsx("span",{className:Be.chip__icon,"aria-hidden":!0,children:s})]});return _?t.jsx(ue,{href:_,className:k,"aria-label":e?void 0:i,"aria-current":o?"page":void 0,"data-testid":u,...h,children:m}):t.jsx("button",{ref:g,type:l,role:p,className:k,"aria-label":e?void 0:i,"data-testid":u,...p==="radio"?{"aria-checked":!!o}:{"aria-pressed":!!o},...b,children:m})}),qa=n.memo(L(fs,"Chip")),xs="hanui-group-0tnVf",Ta={group:xs,"group--scrollable":"hanui-group--scrollable-PMu6V"},vs=({options:e,label:a,size:s="md",isScrollable:r,className:o,...c})=>{var p;const i=n.useRef(null),_=u=>c.isMultiple?c.value.includes(u):c.value===u,h=u=>{if(c.isMultiple){const b=c.value.includes(u)?c.value.filter(g=>g!==u):[...c.value,u];c.onChange(b);return}c.onChange(c.value===u?null:u)},d=u=>{var f,N;if(c.isMultiple)return;const b=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(b===0)return;u.preventDefault();const g=e.filter(j=>!j.isDisabled);if(g.length===0)return;const k=g.findIndex(j=>j.value===c.value),m=g[(k+b+g.length)%g.length];c.onChange(m.value),(N=(f=i.current)==null?void 0:f.querySelector(`[data-chip-value="${m.value}"]`))==null||N.focus()},l=c.isMultiple?null:c.value??((p=e.find(u=>!u.isDisabled))==null?void 0:p.value)??null;return t.jsx("div",{ref:i,className:v(Ta.group,r&&Ta["group--scrollable"],o),role:c.isMultiple?"group":"radiogroup","aria-label":a,onKeyDown:d,children:e.map(u=>t.jsx(qa,{size:s,icon:u.icon,count:u.count,isSelected:_(u.value),disabled:u.isDisabled,role:c.isMultiple?void 0:"radio",tabIndex:c.isMultiple||u.value===l?0:-1,"data-chip-value":u.value,onClick:()=>h(u.value),children:u.label},u.value))})},ys=n.memo(vs),ws=(e,a,s,r)=>{const o=n.useRef(s);o.current=s,n.useEffect(()=>{if(!a||!o.current)return;const c=window.setTimeout(()=>{var i;return(i=o.current)==null?void 0:i.call(o,e.trim())},r);return()=>window.clearTimeout(c)},[e,a,r])};let It=0,Re=null;const ks=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iP(hone|ad|od)/.test(e)?!0:/Macintosh/.test(e)&&navigator.maxTouchPoints>1},js=()=>{if(It+=1,It>1)return;const{body:e,style:a}={body:document.body,style:document.documentElement.style},s=window.scrollY;Re={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:s};const r=window.innerWidth-document.documentElement.clientWidth;r>0&&(e.style.paddingRight=`${r}px`),a.setProperty("scrollbar-gutter","stable"),e.style.overflow="hidden",ks()&&(e.style.position="fixed",e.style.top=`${-s}px`,e.style.width="100%")},Ns=()=>{if(It=Math.max(0,It-1),It>0||!Re)return;const{body:e}=document,{scrollY:a}=Re;e.style.overflow=Re.overflow,e.style.position=Re.position,e.style.top=Re.top,e.style.width=Re.width,e.style.paddingRight=Re.paddingRight,document.documentElement.style.removeProperty("scrollbar-gutter"),Re=null,window.scrollTo(0,a)},Xt=(e=!0)=>{n.useEffect(()=>{if(e)return js(),Ns},[e])},Wa="--hanui-sheet-height",Xa="--hanui-sheet-inset-bottom";let Mt=0,bt=0;const $s=240,Ga=()=>{const e=window.visualViewport;if(!e||e.height<$s)return;const a=window.innerHeight-e.height-e.offsetTop,s=document.documentElement;s.style.setProperty(Xa,`${Math.max(0,Math.round(a))}px`),s.style.setProperty(Wa,`${Math.round(e.height)}px`)},it=()=>{bt||(bt=window.requestAnimationFrame(()=>{bt=0,Ga()}))},Ra=()=>{bt&&(window.cancelAnimationFrame(bt),bt=0)},Qa=(e=!0)=>{n.useEffect(()=>{if(!e)return;const a=window.visualViewport;if(a)return Mt+=1,Mt===1&&(a.addEventListener("resize",it),a.addEventListener("scroll",it),window.addEventListener("orientationchange",it)),Ra(),Ga(),()=>{Mt-=1,!(Mt>0)&&(a.removeEventListener("resize",it),a.removeEventListener("scroll",it),window.removeEventListener("orientationchange",it),Ra(),document.documentElement.style.removeProperty(Xa),document.documentElement.style.removeProperty(Wa))}},[e])},Es="hanui-sheet-GEvdE",Cs="hanui-sheet__header-NJgw-",Is="hanui-sheet__title-f-b07",Ts="hanui-sheet__toolbar-eyhmW",Rs="hanui-sheet__body-eJ2KB",Ds="hanui-sheet__footer-NpsY5",Xe={sheet:Es,sheet__header:Cs,sheet__title:Is,sheet__toolbar:Ts,sheet__body:Rs,sheet__footer:Ds},Ss=({title:e,closeLabel:a,onClose:s,children:r,toolbar:o,footer:c,closeAbove:i=qt,className:_,testId:h})=>{const{labels:d}=O(),l=n.useId(),p=n.useRef(null);Qa(),Xt(),n.useEffect(()=>{const g=xt(),{token:k,pop:m}=Dt();return p.current=k,()=>{m(),p.current=null,g()}},[]),n.useEffect(()=>{const g=window.matchMedia(i),k=m=>{m.matches&&s()};return g.addEventListener("change",k),()=>g.removeEventListener("change",k)},[i,s]);const u=n.useCallback(g=>{!g||g.open||(g.showModal(),Wt(g,`.${Xe.sheet__header} button`),ha(g))},[]),b=n.useCallback(g=>{g.target===g.currentTarget&&s()},[s]);return U.isClient()?rt.createPortal(t.jsxs("dialog",{ref:u,className:v(Xe.sheet,_),"aria-labelledby":l,"data-testid":h,onCancel:g=>{g.preventDefault(),!(p.current&&!St(p.current))&&s()},onClick:b,children:[t.jsxs("header",{className:Xe.sheet__header,children:[t.jsx("h2",{id:l,className:Xe.sheet__title,children:e}),t.jsx(je,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:P("BottomSheet.closeLabel",a,d==null?void 0:d.close),variant:"ghost",size:"sm",onClick:s})]}),o&&t.jsx("div",{className:Xe.sheet__toolbar,children:o}),t.jsx("div",{className:Xe.sheet__body,children:r}),c&&t.jsx("div",{className:Xe.sheet__footer,children:c})]}),document.body):null},ma=n.memo(Ss),Ls=80,Da=40,As=300,Fs="hanui-combobox-NtZoV",Bs="hanui-combobox__trigger-2riRR",Ms="hanui-combobox__chevron-g-QzQ",Ps="hanui-combobox__leadingIcon-it2xz",Os="hanui-combobox__value-acDlr",Hs="hanui-combobox__clear-EXOsc",zs="hanui-combobox__panel-srBxl",Ks="hanui-combobox__search-THjer",Us="hanui-combobox__searchIcon-vr4Bg",Ys="hanui-combobox__searchInput-JPp5h",qs="hanui-combobox__list-p-eCs",Ws="hanui-combobox__option-CLWh-",Xs="hanui-combobox__optionText-Zm0D6",Gs="hanui-combobox__optionLabel-WvT4W",Qs="hanui-combobox__optionDescription-8OEzi",Vs="hanui-combobox__check-MKlLz",Js="hanui-combobox__empty-mZwBq",Zs="hanui-combobox__srName-9PNXF",K={combobox:Fs,combobox__trigger:Bs,"combobox__trigger--empty":"hanui-combobox__trigger--empty-RxwCq","combobox__trigger--open":"hanui-combobox__trigger--open-rw1ZS","combobox__trigger--invalid":"hanui-combobox__trigger--invalid-iZgiN","combobox__trigger--clearable":"hanui-combobox__trigger--clearable-shq9I",combobox__chevron:Ms,combobox__leadingIcon:Ps,combobox__value:Os,combobox__clear:Hs,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:zs,combobox__search:Ks,combobox__searchIcon:Us,combobox__searchInput:Ys,combobox__list:qs,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:Ws,"combobox__option--active":"hanui-combobox__option--active--75Vq","combobox__option--selected":"hanui-combobox__option--selected-DVFGy","combobox__option--disabled":"hanui-combobox__option--disabled-e6VjI",combobox__optionText:Xs,combobox__optionLabel:Gs,combobox__optionDescription:Qs,combobox__check:Vs,combobox__empty:Js,combobox__srName:Zs},er=({options:e,value:a,onChange:s,labels:r,isSearchHidden:o,onSearch:c,isLoading:i,isDisabled:_,isClearable:h,icon:d,id:l,required:p,className:u,testId:b,"aria-describedby":g,"aria-invalid":k})=>{const{labels:m}=O(),f={get search(){var A;return P("Combobox.searchPlaceholder",r.searchPlaceholder,(A=m==null?void 0:m.combobox)==null?void 0:A.searchPlaceholder)},get empty(){var A;return P("Combobox.emptyMessage",r.emptyMessage,(A=m==null?void 0:m.combobox)==null?void 0:A.emptyMessage)},get loading(){var A;return P("Combobox.loadingMessage",r.loadingMessage,(A=m==null?void 0:m.combobox)==null?void 0:A.loadingMessage)},get clear(){var A;return P("Combobox.clearLabel",r.clearLabel,(A=m==null?void 0:m.combobox)==null?void 0:A.clearLabel)}},N=n.useId(),j=l??N,x=`${j}-listbox`,$=n.useRef(null),R=n.useRef(null),I=n.useRef(null),w=n.useRef(null),[E,T]=n.useState(null),y=E!==null,[C,B]=n.useState(""),[Y,X]=n.useState(null),q=n.useMemo(()=>{if(c||C.trim()==="")return e;const A=C.trim();return e.filter(xe=>Rt(xe.label,A)||(xe.description?Rt(xe.description,A):!1))},[e,C,c]),Q=e.find(A=>A.value===a)??null;n.useEffect(()=>{Q?X(Q.label):a===null&&X(null)},[Q,a]);const _e=(Q==null?void 0:Q.label)??Y;ws(C,y,c,As);const Ne=n.useCallback(()=>{T(null),B("")},[]),Se=n.useCallback(()=>{_||(T(window.matchMedia(qt).matches?"popover":"sheet"),B(""))},[_]);n.useEffect(()=>{if(E!=="popover")return;const A=xe=>{var Ft,Fe;const he=xe.target;(Ft=$.current)!=null&&Ft.contains(he)||(Fe=I.current)!=null&&Fe.contains(he)||Ne()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[E,Ne]),n.useEffect(()=>{var A;E==="popover"&&((A=w.current)==null||A.focus({preventScroll:!0}))},[E]);const At=A=>{A.isDisabled||(X(A.label),s(A.value),Ne())},ot=n.useRef(!1);n.useEffect(()=>{var A;ot.current&&!y&&((A=R.current)==null||A.focus()),ot.current=y},[y]);const vt=ft(R,I,{side:"bottom",align:"start",isOpen:y&&E==="popover"}),qe=Lt(E==="popover",R,I),{activeIndex:Le,setActiveIndex:H,listRef:ae,handleKeyDown:ge}=ua({count:q.length,isOpen:y,initialIndex:Math.max(e.findIndex(A=>A.value===a),0),onSelect:A=>{const xe=q[A];xe&&At(xe)},onClose:Ne}),Ae=q.some(A=>!!A.description),fe=E==="popover"&&!Ae&&q.length>Ls,{scrollRef:nn,range:We,scrollToIndex:xa}=Ka(q.length,{rowHeight:Da,isEnabled:fe});n.useEffect(()=>{fe&&xa(Le)},[Le,fe,xa]);const sn=A=>{ae.current=A,nn.current=A},rn=ge,on=A=>{if(o){if(!y){["ArrowDown","ArrowUp","Enter"," "].includes(A.key)&&(A.preventDefault(),Se());return}ge(A)}},cn=()=>{s(null),X(null)},va=o?null:t.jsxs("div",{className:K.combobox__search,children:[t.jsx(D.Search,{"aria-hidden":!0,className:K.combobox__searchIcon}),t.jsx("input",{ref:w,type:"text",role:"combobox",className:K.combobox__searchInput,value:C,placeholder:f.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":x,"aria-activedescendant":q[Le]?`${j}-option-${Le}`:void 0,"aria-label":f.search,onChange:A=>{B(A.target.value),H(0)},onKeyDown:rn}),i&&t.jsx(_a,{size:"sm",label:""})]}),ya=A=>{const xe=q.slice(We.start,We.end);return t.jsxs("ul",{ref:sn,id:x,role:"listbox",className:v(K.combobox__list,A&&K["combobox__list--sheet"]),children:[fe&&We.offset>0&&t.jsx("li",{"aria-hidden":!0,style:{height:We.offset}}),xe.map((he,Ft)=>{const Fe=We.start+Ft,ln=Fe===Le,Gt=he.value===a;return t.jsxs("li",{id:`${j}-option-${Fe}`,role:"option","data-index":Fe,"aria-setsize":fe?q.length:void 0,"aria-posinset":fe?Fe+1:void 0,"aria-selected":Gt,"aria-disabled":he.isDisabled,className:v(K.combobox__option,ln&&K["combobox__option--active"],Gt&&K["combobox__option--selected"],he.isDisabled&&K["combobox__option--disabled"]),onMouseEnter:()=>H(Fe),onClick:()=>At(he),children:[t.jsxs("span",{className:K.combobox__optionText,children:[t.jsx("span",{className:K.combobox__optionLabel,children:he.label}),he.description&&t.jsx("span",{className:K.combobox__optionDescription,children:he.description})]}),Gt&&t.jsx(D.CheckLg,{"aria-hidden":!0,className:K.combobox__check})]},he.value)}),fe&&We.end<q.length&&t.jsx("li",{"aria-hidden":!0,style:{height:(q.length-We.end)*Da}}),q.length===0&&t.jsx("li",{className:K.combobox__empty,children:i?f.loading:f.empty})]})};return t.jsxs("div",{ref:$,className:v(K.combobox,u),"data-testid":b,children:[t.jsxs("button",{ref:R,id:j,type:"button",className:v(K.combobox__trigger,!_e&&K["combobox__trigger--empty"],y&&K["combobox__trigger--open"],k&&K["combobox__trigger--invalid"],h&&_e&&!_&&K["combobox__trigger--clearable"]),disabled:_,"aria-haspopup":"listbox","aria-expanded":y,"aria-controls":y?x:void 0,"aria-labelledby":_e?`${j}-name ${j}-value`:`${j}-name`,"aria-describedby":g,"aria-required":p||void 0,onClick:()=>y?Ne():Se(),onKeyDown:on,children:[d&&t.jsx("span",{className:K.combobox__leadingIcon,"aria-hidden":!0,children:d}),t.jsx("span",{id:`${j}-name`,className:K.combobox__srName,children:r.placeholder}),t.jsx("span",{id:`${j}-value`,className:K.combobox__value,children:_e??r.placeholder}),t.jsx(D.CaretDownFill,{"aria-hidden":!0,className:v(K.combobox__chevron,y&&K["combobox__chevron--open"])})]}),h&&_e&&!_&&t.jsx("button",{type:"button",className:K.combobox__clear,"aria-label":f.clear,onClick:cn,children:t.jsx(D.XLg,{"aria-hidden":!0})}),E==="popover"&&qe.container&&rt.createPortal(t.jsxs("div",{ref:I,className:K.combobox__panel,...qe.attributes,style:{...vt.style,...qe.style,width:vt.anchorWidth||void 0,visibility:vt.isPositioned?void 0:"hidden"},children:[va,ya(!1)]}),qe.container),E==="sheet"&&t.jsx(ma,{title:r.placeholder,closeLabel:r.closeLabel??(m==null?void 0:m.close),onClose:Ne,toolbar:va??void 0,children:ya(!0)})]})},tr=n.memo(er),ar="hanui-segmented-qo2Bw",nr="hanui-segmented__item-mqRNZ",sr="hanui-segmented__icon-C9CT-",rr="hanui-segmented__label-NVXBv",ct={segmented:ar,"segmented--sm":"hanui-segmented--sm-7tUry","segmented--md":"hanui-segmented--md-PiSqt",segmented__item:nr,"segmented__item--selected":"hanui-segmented__item--selected-r7CLj",segmented__icon:sr,segmented__label:rr},or=({options:e,value:a,onChange:s,label:r,isIconOnly:o,size:c="md",className:i,testId:_})=>{const h=n.useRef(null),d=l=>{var k,m;const p=l.key==="ArrowRight"||l.key==="ArrowDown"?1:l.key==="ArrowLeft"||l.key==="ArrowUp"?-1:0;if(p===0)return;l.preventDefault();const u=e.filter(f=>!f.isDisabled);if(u.length===0)return;const b=u.findIndex(f=>f.value===a),g=u[(b+p+u.length)%u.length];s(g.value),(m=(k=h.current)==null?void 0:k.querySelector(`[data-value="${g.value}"]`))==null||m.focus({preventScroll:!0})};return t.jsx("div",{ref:h,role:"radiogroup","aria-label":r,className:v(ct.segmented,ct[`segmented--${c}`],i),"data-testid":_,onKeyDown:d,children:e.map(l=>{const p=l.value===a;return t.jsxs("button",{type:"button",role:"radio","aria-checked":p,"aria-label":o?l.label:void 0,"data-value":l.value,disabled:l.isDisabled,tabIndex:p?0:-1,className:v(ct.segmented__item,p&&ct["segmented__item--selected"]),onClick:()=>!p&&s(l.value),children:[l.icon&&t.jsx("span",{className:ct.segmented__icon,"aria-hidden":!0,children:l.icon}),!o&&t.jsx("span",{className:ct.segmented__label,children:l.label})]},l.value)})})},ir=n.memo(L(or,"SegmentedControl")),cr="hanui-select-tiiPL",lr="hanui-trigger-rHQJz",dr="hanui-trigger__icon-apCcx",ur="hanui-trigger__srName-XLCxt",_r="hanui-trigger__value-ioH7K",hr="hanui-trigger__chevron-FtsIZ",pr="hanui-panel-rGOOd",mr="hanui-list-SOKf8",br="hanui-option-ZDPef",gr="hanui-option__label-SsoYB",fr="hanui-option__check-8CPSG",W={select:cr,trigger:lr,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--invalid":"hanui-trigger--invalid-NtP0W","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:dr,trigger__srName:ur,trigger__value:_r,trigger__chevron:hr,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:pr,list:mr,"list--sheet":"hanui-list--sheet-BIjCb",option:br,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:gr,option__check:fr},xr=({options:e,value:a,onChange:s,label:r,placeholder:o,closeLabel:c,icon:i,size:_="md",align:h="start",isDisabled:d,id:l,className:p,testId:u,required:b,"aria-describedby":g,"aria-invalid":k})=>{const{labels:m}=O(),f=P("Select.placeholder",o,m==null?void 0:m.selectPlaceholder),N=n.useId(),j=l??N,x=`${j}-listbox`,$=H=>`${j}-option-${H}`,R=n.useRef(null),I=n.useRef(null),w=n.useRef(null),[E,T]=n.useState(null),y=ft(I,w,{side:"bottom",align:h,isOpen:E==="popover"}),C=Lt(E==="popover",I,w),B=E!==null,Y=e.findIndex(H=>H.value===a),X=Y>=0?e[Y]:null,q=n.useCallback(()=>T(null),[]),Q=n.useCallback(()=>{d||e.length===0||T(window.matchMedia(qt).matches?"popover":"sheet")},[d,e.length]),_e=H=>{H.isDisabled||(s(H.value),q())},Ne=n.useRef(!1);n.useEffect(()=>{var H;Ne.current&&!B&&((H=I.current)==null||H.focus()),Ne.current=B},[B]),n.useEffect(()=>{if(E!=="popover")return;const H=ae=>{var Ae,fe;const ge=ae.target;(Ae=R.current)!=null&&Ae.contains(ge)||(fe=w.current)!=null&&fe.contains(ge)||q()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[E,q]);const{activeIndex:Se,setActiveIndex:At,listRef:ot,handleKeyDown:vt}=ua({count:e.length,isOpen:B,initialIndex:Y>=0?Y:0,onSelect:H=>{const ae=e[H];ae&&_e(ae)},onClose:q});n.useEffect(()=>{var H;E==="sheet"&&((H=ot.current)==null||H.focus({preventScroll:!0}))},[E,ot]);const qe=H=>{if(!B){["ArrowDown","ArrowUp","Enter"," "].includes(H.key)&&(H.preventDefault(),Q());return}vt(H)},Le=H=>t.jsx("ul",{ref:ot,id:x,role:"listbox","aria-label":r,"aria-activedescendant":H&&e[Se]?$(Se):void 0,tabIndex:H?0:-1,className:v(W.list,H&&W["list--sheet"]),onKeyDown:H?qe:void 0,children:e.map((ae,ge)=>{const Ae=ae.value===a;return t.jsxs("li",{id:$(ge),role:"option","data-index":ge,"aria-selected":Ae,"aria-disabled":ae.isDisabled,className:v(W.option,ge===Se&&W["option--active"],Ae&&W["option--selected"],ae.isDisabled&&W["option--disabled"]),onMouseEnter:()=>At(ge),onClick:()=>_e(ae),children:[t.jsx("span",{className:W.option__label,children:ae.label}),Ae&&t.jsx(D.CheckLg,{"aria-hidden":!0,className:W.option__check})]},ae.value)})});return t.jsxs("span",{ref:R,className:v(W.select,p),"data-testid":u,children:[t.jsxs("button",{ref:I,id:j,type:"button",role:"combobox",className:v(W.trigger,W[`trigger--${_}`],!X&&W["trigger--empty"],B&&W["trigger--open"],k&&W["trigger--invalid"]),disabled:d,"aria-haspopup":"listbox","aria-expanded":B,"aria-controls":B?x:void 0,"aria-activedescendant":E==="popover"&&e[Se]?$(Se):void 0,"aria-labelledby":X?`${j}-name ${j}-value`:`${j}-name`,"aria-describedby":g,"aria-invalid":k,"aria-required":b||void 0,onClick:()=>B?q():Q(),onKeyDown:qe,children:[i&&t.jsx("span",{className:W.trigger__icon,"aria-hidden":!0,children:i}),t.jsx("span",{id:`${j}-name`,className:W.trigger__srName,children:r}),t.jsx("span",{id:`${j}-value`,className:W.trigger__value,children:(X==null?void 0:X.label)??f}),t.jsx(D.CaretDownFill,{"aria-hidden":!0,className:v(W.trigger__chevron,B&&W["trigger__chevron--open"])})]}),E==="popover"&&C.container&&rt.createPortal(t.jsx("div",{ref:w,className:W.panel,...C.attributes,style:{...y.style,...C.style,minWidth:y.anchorWidth||void 0,visibility:y.isPositioned?void 0:"hidden"},children:Le(!1)}),C.container),E==="sheet"&&t.jsx(ma,{title:r,closeLabel:c??(m==null?void 0:m.close),onClose:q,children:Le(!0)})]})},vr=n.memo(xr),yr="hanui-checkbox-FaFCj",wr="hanui-checkbox__input-nTHne",kr="hanui-checkbox__body-VAEW2",jr="hanui-checkbox__label-sSNZY",Nr="hanui-checkbox__hint-ish-J",kt={checkbox:yr,checkbox__input:wr,checkbox__body:kr,checkbox__label:jr,checkbox__hint:Nr},$r=n.forwardRef(({label:e,hint:a,className:s,id:r,testId:o,...c},i)=>{const _=n.useId(),h=r??_,d=`${h}-label`,l=`${h}-hint`;return t.jsxs("label",{className:v(kt.checkbox,s),"data-testid":o,children:[t.jsx("input",{ref:i,type:"checkbox",id:h,className:kt.checkbox__input,"aria-labelledby":d,"aria-describedby":a?l:c["aria-describedby"],...c}),t.jsxs("span",{className:kt.checkbox__body,children:[t.jsx("span",{id:d,className:kt.checkbox__label,children:e}),a&&t.jsx("span",{id:l,className:kt.checkbox__hint,children:a})]})]})}),Er=n.memo(L($r,"Checkbox")),Cr="hanui-switch__input-Q2UQ4",Ir="hanui-switch__label-gPZuO",Tr="hanui-switch__hint-NRuzC",Rr="hanui-switch__track-3417m",Dr="hanui-switch__thumb-1LHta",Sr="hanui-switch__text-32uMY",Me={switch:"hanui-switch-KLH29",switch__input:Cr,"switch--labelFirst":"hanui-switch--labelFirst-Grirk",switch__label:Ir,switch__hint:Tr,switch__track:Rr,switch__thumb:Dr,switch__text:Sr},Lr=n.forwardRef(({label:e,hint:a,isLabelFirst:s,className:r,id:o,testId:c,...i},_)=>{const h=n.useId(),d=o??h,l=`${d}-label`,p=`${d}-hint`;return t.jsxs("label",{className:v(Me.switch,s&&Me["switch--labelFirst"],r),"data-testid":c,children:[t.jsx("input",{ref:_,type:"checkbox",role:"switch",id:d,className:Me.switch__input,"aria-labelledby":l,"aria-describedby":a?p:i["aria-describedby"],...i}),t.jsx("span",{className:Me.switch__track,"aria-hidden":!0,children:t.jsx("span",{className:Me.switch__thumb})}),t.jsxs("span",{className:Me.switch__text,children:[t.jsx("span",{id:l,className:Me.switch__label,children:e}),a&&t.jsx("span",{id:p,className:Me.switch__hint,children:a})]})]})}),Ar=n.memo(L(Lr,"Switch")),Fr="hanui-radio-KoZak",Br="hanui-radio__input-gVMgh",Mr="hanui-radio__body-oZWg6",Pr="hanui-radio__label-d-5ce",Or="hanui-radio__hint-baVbs",Hr="hanui-radio__count-OtkUM",lt={radio:Fr,radio__input:Br,radio__body:Mr,radio__label:Pr,radio__hint:Or,radio__count:Hr},zr=n.forwardRef(({label:e,hint:a,count:s,className:r,id:o,testId:c,...i},_)=>{const h=n.useId(),d=o??h,l=`${d}-label`,p=`${d}-hint`,u=`${d}-count`;return t.jsxs("label",{className:v(lt.radio,r),"data-testid":c,children:[t.jsx("input",{ref:_,type:"radio",id:d,className:lt.radio__input,"aria-labelledby":[l,U.isDefined(s)?u:null].filter(Boolean).join(" "),"aria-describedby":a?p:i["aria-describedby"],...i}),t.jsxs("span",{className:lt.radio__body,children:[t.jsx("span",{id:l,className:lt.radio__label,children:e}),a&&t.jsx("span",{id:p,className:lt.radio__hint,children:a})]}),U.isDefined(s)&&t.jsx("span",{id:u,className:lt.radio__count,children:s})]})}),Kr=n.memo(L(zr,"Radio")),Ur="hanui-radioCard-sndiC",Yr="hanui-radioCard__input-6vuoD",qr="hanui-radioCard__indicator--x9LT",Wr="hanui-radioCard__body-CFqoi",dt={radioCard:Ur,radioCard__input:Yr,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:qr,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:Wr},Xr=({name:e,value:a,isSelected:s,isDisabled:r,onChange:o,children:c,className:i,id:_,testId:h})=>t.jsxs("label",{className:v(dt.radioCard,s&&dt["radioCard--selected"],r&&dt["radioCard--disabled"],i),"data-testid":h,children:[t.jsx("input",{type:"radio",id:_,name:e,value:a,checked:s,disabled:r,onChange:()=>o(a),className:dt.radioCard__input}),t.jsx("span",{className:dt.radioCard__indicator,"aria-hidden":!0}),t.jsx("span",{className:dt.radioCard__body,children:c})]}),Gr=n.memo(Xr),Qr="hanui-range-RpDPh",Vr="hanui-range__readout-itDMd",Jr="hanui-range__separator-u-ZJX",Zr="hanui-range__track-bCh5Y",eo="hanui-range__fill-VXMCE",to="hanui-range__input-TAN2I",ao="hanui-range__bounds-GIhFd",pe={range:Qr,"range--disabled":"hanui-range--disabled-13hlc",range__readout:Vr,range__separator:Jr,range__track:Zr,range__fill:eo,range__input:to,range__bounds:ao},no=({min:e,max:a,step:s=1,value:r,onChange:o,onCommit:c,formatValue:i=String,label:_,minLabel:h,maxLabel:d,isDisabled:l,className:p,testId:u})=>{var E,T;const{labels:b}=O(),g=P("RangeSlider.minLabel",h,(E=b==null?void 0:b.range)==null?void 0:E.min),k=P("RangeSlider.maxLabel",d,(T=b==null?void 0:b.range)==null?void 0:T.max),[m,f]=r,N=n.useCallback(y=>o([Math.min(y,f),f]),[f,o]),j=n.useCallback(y=>o([m,Math.max(y,m)]),[m,o]),x=n.useCallback(()=>c==null?void 0:c([m,f]),[m,f,c]),$=a-e,R=$===0?0:U.normalize(m-e,$),I=$===0?0:U.normalize(f-e,$),w=R>50;return t.jsxs("div",{className:v(pe.range,l&&pe["range--disabled"],p),role:"group","aria-label":_,"data-testid":u,children:[t.jsxs("div",{className:pe.range__readout,children:[t.jsx("span",{className:pe.range__value,children:i(m)}),t.jsx("span",{className:pe.range__separator,"aria-hidden":!0,children:"—"}),t.jsx("span",{className:pe.range__value,children:i(f)})]}),t.jsxs("div",{className:pe.range__track,children:[t.jsx("span",{className:pe.range__fill,style:{left:`${R}%`,right:`${100-I}%`},"aria-hidden":!0}),t.jsx("input",{type:"range",className:pe.range__input,style:{zIndex:w?4:3},min:e,max:a,step:s,value:m,disabled:l,"aria-label":`${_} — ${g}`,"aria-valuetext":i(m),onChange:y=>N(Number(y.target.value)),onPointerUp:x,onKeyUp:x}),t.jsx("input",{type:"range",className:pe.range__input,style:{zIndex:w?3:4},min:e,max:a,step:s,value:f,disabled:l,"aria-label":`${_} — ${k}`,"aria-valuetext":i(f),onChange:y=>j(Number(y.target.value)),onPointerUp:x,onKeyUp:x})]}),t.jsxs("div",{className:pe.range__bounds,"aria-hidden":!0,children:[t.jsx("span",{children:i(e)}),t.jsx("span",{children:i(a)})]})]})},so=n.memo(no),ro="hanui-rating-neNnF",oo="hanui-rating__legend-uYvFS",io="hanui-rating__stars-vJFLk",co="hanui-rating__star-BANFJ",lo="hanui-rating__input-s2iiO",uo="hanui-rating__srOnly-iSCoz",_o="hanui-rating__caption-13KFX",Ee={rating:ro,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:oo,rating__stars:io,rating__star:co,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:lo,rating__srOnly:uo,rating__caption:_o},ho=[1,2,3,4,5],po=({value:e,onChange:a,label:s,ratingLabels:r,formatStarCount:o,isDisabled:c,className:i,testId:_})=>{var g;const{labels:h}=O(),d=r??((g=h==null?void 0:h.rating)==null?void 0:g.scale),l=n.useId(),[p,u]=n.useState(null),b=p??e;return t.jsxs("fieldset",{className:v(Ee.rating,c&&Ee["rating--disabled"],i),disabled:c,"data-testid":_,children:[t.jsx("legend",{className:Ee.rating__legend,children:s}),t.jsx("div",{className:Ee.rating__stars,onMouseLeave:()=>u(null),children:ho.map(k=>{var m;return t.jsxs("label",{className:v(Ee.rating__star,b!==null&&k<=b&&Ee["rating__star--filled"]),onMouseEnter:()=>u(k),children:[t.jsx("input",{type:"radio",name:l,value:k,checked:e===k,onChange:()=>a(k),className:Ee.rating__input}),t.jsx(D.StarFill,{"aria-hidden":!0}),t.jsxs("span",{className:Ee.rating__srOnly,children:[be("RatingInput.formatStarCount",o??((m=h==null?void 0:h.rating)==null?void 0:m.starCount),k)," ","— ",(d==null?void 0:d[k])??""]})]},k)})}),b!==null&&t.jsx("span",{className:Ee.rating__caption,"aria-hidden":!0,children:(d==null?void 0:d[b])??""})]})},mo=n.memo(po),bo="hanui-stepper-8s5Ih",go="hanui-stepper__button-h6g7d",fo="hanui-stepper__input-OQh5v",jt={stepper:bo,stepper__button:go,stepper__input:fo,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},xo=({value:e,onChange:a,label:s,decreaseLabel:r,increaseLabel:o,min:c=1,max:i=99,isDisabled:_,size:h="md",className:d,testId:l})=>{var f,N,j;const{labels:p}=O(),u=P("QuantityStepper.label",s,(f=p==null?void 0:p.quantity)==null?void 0:f.label),[b,g]=n.useState(null),k=x=>Math.min(Math.max(x,c),i),m=x=>{g(null);const $=x.replace(/\D/g,"");$!==""&&a(k(Number($)))};return t.jsxs("div",{className:v(jt.stepper,jt[`stepper--${h}`],d),role:"group","aria-label":u,"data-testid":l,children:[t.jsx("button",{type:"button",className:jt.stepper__button,onClick:()=>a(Math.max(e-1,c)),disabled:_||e<=c,"aria-label":P("QuantityStepper.decreaseLabel",r,(N=p==null?void 0:p.quantity)==null?void 0:N.decrease),children:t.jsx(D.DashLg,{"aria-hidden":!0})}),t.jsx("input",{className:jt.stepper__input,value:b??String(e),onChange:x=>g(x.target.value.replace(/\D/g,"").slice(0,2)),onBlur:x=>m(x.target.value),onKeyDown:x=>{const $=x.key==="ArrowUp"?1:x.key==="ArrowDown"?-1:0;if($!==0){x.preventDefault(),g(null),a(k(e+$));return}const R=x.key==="PageUp"?10:x.key==="PageDown"?-10:0;if(R!==0){x.preventDefault(),g(null),a(k(e+R));return}if(x.key==="Home"||x.key==="End"){x.preventDefault(),g(null),a(x.key==="Home"?c:i);return}x.key==="Enter"&&(x.preventDefault(),m(x.target.value))},inputMode:"numeric",disabled:_,role:"spinbutton","aria-valuenow":e,"aria-valuemin":c,"aria-valuemax":i,"aria-label":u}),t.jsx("button",{type:"button",className:jt.stepper__button,onClick:()=>a(Math.min(e+1,i)),disabled:_||e>=i,"aria-label":P("QuantityStepper.increaseLabel",o,(j=p==null?void 0:p.quantity)==null?void 0:j.increase),children:t.jsx(D.PlusLg,{"aria-hidden":!0})})]})},vo=n.memo(xo),yo="hanui-checkbox--dvpB",wo={checkbox:yo},ko=n.forwardRef(({label:e,isIndeterminate:a=!1,className:s,testId:r,...o},c)=>{const i=n.useRef(null);return n.useImperativeHandle(c,()=>i.current,[]),n.useEffect(()=>{i.current&&(i.current.indeterminate=a)},[a]),t.jsx("input",{ref:i,type:"checkbox","aria-label":e,"aria-checked":a?"mixed":void 0,className:v(wo.checkbox,s),"data-testid":r,...o})}),jo=n.memo(L(ko,"TableCheckbox")),No="hanui-wrapper-IAI4E",$o="hanui-wrapper__prefix-XKDlV",Eo="hanui-wrapper__suffix-lT35q",Co="hanui-input-pIS2u",Ge={wrapper:No,wrapper__prefix:$o,wrapper__suffix:Eo,input:Co,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Io=n.forwardRef(({prefix:e,suffix:a,isTechnical:s,className:r,testId:o,...c},i)=>t.jsxs("span",{className:v(Ge.wrapper,r),children:[e&&t.jsx("span",{className:Ge.wrapper__prefix,"aria-hidden":!0,children:e}),t.jsx("input",{ref:i,className:v(Ge.input,!!e&&Ge["input--hasPrefix"],!!a&&Ge["input--hasSuffix"],s&&Ge["input--technical"]),"data-testid":o,...c}),a&&t.jsx("span",{className:Ge.wrapper__suffix,"aria-hidden":!0,children:a})]})),ba=n.memo(L(Io,"Input")),To="hanui-password-viMea",Ro="hanui-password__field-WI1h1",Do="hanui-password__toggle-O6R2a",ea={password:To,password__field:Ro,password__toggle:Do},So=({className:e,showLabel:a,hideLabel:s,...r})=>{const{labels:o}=O(),[c,i]=n.useState(!1),_=c?P("PasswordInput.hideLabel",s,o==null?void 0:o.passwordHide):P("PasswordInput.showLabel",a,o==null?void 0:o.passwordShow);return t.jsxs("span",{className:ea.password,children:[t.jsx(ba,{...r,className:`${ea.password__field} ${e??""}`.trim(),type:c?"text":"password"}),t.jsx(je,{className:ea.password__toggle,icon:c?t.jsx(D.EyeSlashFill,{"aria-hidden":!0}):t.jsx(D.EyeFill,{"aria-hidden":!0}),label:_,variant:"ghost",size:"sm",onClick:()=>i(h=>!h)})]})},Lo=n.memo(L(So,"PasswordInput")),Ao="hanui-tagInput-QraZR",Fo="hanui-tagInput__field-HeWrC",Bo="hanui-tagInput__tag-D-ZWB",Mo="hanui-tagInput__remove-bpjGG",Qe={tagInput:Ao,tagInput__field:Fo,"tagInput--invalid":"hanui-tagInput--invalid-NQogL","tagInput--disabled":"hanui-tagInput--disabled--AJFF",tagInput__tag:Bo,"tagInput__tag--duplicate":"hanui-tagInput__tag--duplicate-3-FMF",tagInput__remove:Mo},Po=({values:e,onChange:a,label:s,placeholder:r,removeLabel:o,separators:c=["Enter",","],maxTags:i,isDisabled:_,id:h,required:d,className:l,testId:p,"aria-describedby":u,"aria-invalid":b})=>{const g=n.useId(),k=h??g,m=n.useRef(null),f=n.useRef(0);n.useEffect(()=>()=>{f.current&&window.clearTimeout(f.current)},[]);const{labels:N}=O(),j=Yt(),[x,$]=n.useState(""),[R,I]=n.useState(null),w=i!==void 0&&e.length>=i,E=C=>{var Y;const B=C.trim();if(B!==""){if(e.includes(B)){I(B),f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>I(null),1e3),j(`${B} zaten ekli`,"assertive"),$("");return}w||(a([...e,B]),$(""),j(be("TagInput.added",(Y=N==null?void 0:N.tagInput)==null?void 0:Y.added,B)))}},T=C=>{var B;a(e.filter(Y=>Y!==C)),j(be("TagInput.removed",(B=N==null?void 0:N.tagInput)==null?void 0:B.removed,C))},y=C=>{if(c.includes(C.key)){C.preventDefault(),E(x);return}if(C.key==="Backspace"&&x===""){const B=e.at(-1);B!==void 0&&T(B)}};return t.jsxs("div",{className:v(Qe.tagInput,_&&Qe["tagInput--disabled"],b&&Qe["tagInput--invalid"],l),"data-testid":p,onClick:()=>{var C;return(C=m.current)==null?void 0:C.focus()},children:[e.map(C=>t.jsxs("span",{className:v(Qe.tagInput__tag,R===C&&Qe["tagInput__tag--duplicate"]),children:[C,t.jsx("button",{type:"button",className:Qe.tagInput__remove,"aria-label":`${C} — ${o}`,disabled:_,onClick:B=>{B.stopPropagation(),T(C)},children:t.jsx(D.XLg,{"aria-hidden":!0})})]},C)),t.jsx("input",{ref:m,id:k,type:"text",className:Qe.tagInput__field,value:x,placeholder:e.length===0?r:void 0,"aria-label":s,"aria-describedby":u,"aria-invalid":b,"aria-required":d||void 0,disabled:_||w,onChange:C=>$(C.target.value),onKeyDown:y,onBlur:()=>E(x)})]})},Oo=n.memo(L(Po,"TagInput")),Ho="hanui-textarea-zwJcB",zo="hanui-wrapper-O8aJA",Ko="hanui-counter-bHVh3",Nt={textarea:Ho,wrapper:zo,"textarea--autoSize":"hanui-textarea--autoSize--F8yj",counter:Ko,"counter--near":"hanui-counter--near-AZAQm"},Uo=n.forwardRef(({className:e,rows:a=4,isAutoSize:s,maxRows:r=12,hasCounter:o,maxLength:c,value:i,defaultValue:_,onChange:h,testId:d,...l},p)=>{const u=n.useRef(null),[b,g]=n.useState(String(_??"").length),k=i===void 0?b:String(i).length,m=n.useCallback(N=>{u.current=N,typeof p=="function"?p(N):p&&(p.current=N)},[p]);n.useLayoutEffect(()=>{const N=u.current;if(!s||!N)return;N.style.height="auto";const x=(Number.parseFloat(getComputedStyle(N).lineHeight)||20)*r;N.style.height=`${Math.min(N.scrollHeight,x)}px`,N.style.overflowY=N.scrollHeight>x?"auto":"hidden"},[s,r,i,k]);const f=c!==void 0&&k>=c*.9;return t.jsxs("div",{className:v(Nt.wrapper,e),"data-testid":d,children:[t.jsx("textarea",{ref:m,rows:a,className:v(Nt.textarea,s&&Nt["textarea--autoSize"]),maxLength:c,value:i,defaultValue:_,onChange:N=>{g(N.target.value.length),h==null||h(N)},...l}),o&&c!==void 0&&t.jsxs("span",{className:v(Nt.counter,f&&Nt["counter--near"]),"aria-hidden":!0,children:[k," / ",c]})]})}),Va=n.memo(L(Uo,"Textarea")),Yo="hanui-dateField-UnUwe",qo="hanui-range-nGuRH",Wo="hanui-range__row--debA",Xo="hanui-range__separator-fEqqr",Go="hanui-range__field-tmoNH",Qo="hanui-range__summary-L6v1T",at={dateField:Yo,range:qo,range__row:Wo,range__separator:Xo,range__field:Go,range__summary:Qo},ra=n.forwardRef(({type:e="date",className:a,testId:s,...r},o)=>t.jsx("input",{ref:o,type:e,className:v(at.dateField,a),"data-testid":s,...r})),Vo=n.memo(L(ra,"DateField")),Jo=({value:e,onChange:a,startLabel:s,endLabel:r,separator:o="–",min:c,max:i,isSummaryVisible:_,isDisabled:h,className:d,testId:l})=>{const{labels:p}=O(),u=(()=>{if(!_||!(p!=null&&p.locale)||e.start===""||e.end==="")return null;try{const b=new Intl.DateTimeFormat(p.locale,{dateStyle:"medium"});return`${b.format(new Date(e.start))} ${o} ${b.format(new Date(e.end))}`}catch{return null}})();return t.jsxs("div",{className:v(at.range,d),"data-testid":l,children:[t.jsxs("div",{className:at.range__row,children:[t.jsx(ra,{className:at.range__field,"aria-label":s,value:e.start,min:c,max:e.end||i,disabled:h,onChange:b=>a({...e,start:b.target.value})}),t.jsx("span",{className:at.range__separator,"aria-hidden":!0,children:o}),t.jsx(ra,{className:at.range__field,"aria-label":r,value:e.end,min:e.start||c,max:i,disabled:h,onChange:b=>a({...e,end:b.target.value})})]}),u&&t.jsx("span",{className:at.range__summary,children:u})]})},Zo=L(n.memo(Jo),"DateRange"),ei="hanui-field-KKvre",ti="hanui-field__label-9dlYd",ai="hanui-field__required-hbDJk",ni="hanui-field__srOnly-2WQFH",si="hanui-field__hint-SQPiL",ri="hanui-field__error-gLlZ-",oi="hanui-field__errorIcon-uA3o8",Pe={field:ei,field__label:ti,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:ai,field__srOnly:ni,field__hint:si,field__error:ri,field__errorIcon:oi},ii=({label:e,children:a,hint:s,error:r,isRequired:o,requiredLabel:c,isLabelHidden:i,className:_})=>{const{labels:h}=O(),d=n.useId(),l=`${d}-error`,p=`${d}-hint`;return t.jsxs("div",{className:v(Pe.field,_),children:[t.jsxs("label",{htmlFor:d,className:v(Pe.field__label,i&&Pe["field__label--hidden"]),children:[e,o&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:Pe.field__required,"aria-hidden":!0,children:"*"}),t.jsx("span",{className:Pe.field__srOnly,children:P("Field.requiredLabel",c,h==null?void 0:h.required)})]})]}),a({id:d,required:o||void 0,"aria-invalid":r?!0:void 0,"aria-describedby":[r&&l,s&&p].filter(Boolean).join(" ")||void 0}),r&&t.jsxs("p",{id:l,className:Pe.field__error,role:"alert",children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0,className:Pe.field__errorIcon}),r]}),s&&t.jsx("p",{id:p,className:Pe.field__hint,children:s})]})},Ja=n.memo(ii),ci="hanui-progress-99MrX",li="hanui-progress__track-Qbp9t",di="hanui-progress__fill-Bam55",ui="hanui-progress__value-3FYxj",_i="hanui-circle-9cn2w",hi="hanui-circle__svg-0IwkR",pi="hanui-circle__track-zY2qc",mi="hanui-circle__fill-Jbde6",bi="hanui-circle__label-A3nJB",te={progress:ci,progress__track:li,"progress__track--sm":"hanui-progress__track--sm-dbHZq","progress__track--md":"hanui-progress__track--md-v1GdW","progress__track--indeterminate":"hanui-progress__track--indeterminate-8fMxl",progress__fill:di,"progress__fill--success":"hanui-progress__fill--success-IFuI5","progress__fill--warning":"hanui-progress__fill--warning-wIhgi","progress__fill--danger":"hanui-progress__fill--danger-cuqj0",progress__value:ui,circle:_i,circle__svg:hi,circle__track:pi,circle__fill:mi,"circle__fill--success":"hanui-circle__fill--success-HTr0m","circle__fill--warning":"hanui-circle__fill--warning-Fkgj2","circle__fill--danger":"hanui-circle__fill--danger-4E3Z8","circle--indeterminate":"hanui-circle--indeterminate-cITY6",circle__label:bi},Za=(e,a)=>!Number.isFinite(e)||!Number.isFinite(a)||a<=0?0:Math.min(100,Math.max(0,e/a*100)),gi=({value:e,max:a=100,label:s,valueText:r,isValueVisible:o,tone:c="brand",size:i="md",className:_,testId:h})=>{const d=e===void 0,l=d?0:Za(e,a);return t.jsxs("div",{className:v(te.progress,_),"data-testid":h,children:[t.jsx("div",{role:"progressbar","aria-label":s,"aria-valuenow":d?void 0:Math.round(l),"aria-valuemin":d?void 0:0,"aria-valuemax":d?void 0:100,"aria-valuetext":d?void 0:r,className:v(te.progress__track,te[`progress__track--${i}`],d&&te["progress__track--indeterminate"]),children:t.jsx("span",{className:v(te.progress__fill,te[`progress__fill--${c}`]),style:d?void 0:{inlineSize:`${l}%`}})}),o&&!d&&t.jsx("span",{className:te.progress__value,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},en=n.memo(L(gi,"Progress")),fi=({value:e,max:a=100,label:s,valueText:r,isValueVisible:o,tone:c="brand",size:i=44,className:_,testId:h})=>{const d=e===void 0,l=d?25:Za(e,a),p=Math.max(3,Math.round(i*.1)),u=(i-p)/2,b=2*Math.PI*u;return t.jsxs("div",{className:v(te.circle,d&&te["circle--indeterminate"],_),style:{width:i,height:i},"data-testid":h,children:[t.jsxs("svg",{className:te.circle__svg,width:i,height:i,viewBox:`0 0 ${i} ${i}`,role:"progressbar","aria-label":s,"aria-valuenow":d?void 0:Math.round(l),"aria-valuemin":d?void 0:0,"aria-valuemax":d?void 0:100,"aria-valuetext":d?void 0:r,children:[t.jsx("circle",{className:te.circle__track,cx:i/2,cy:i/2,r:u,fill:"none",strokeWidth:p}),t.jsx("circle",{className:v(te.circle__fill,te[`circle__fill--${c}`]),cx:i/2,cy:i/2,r:u,fill:"none",strokeWidth:p,strokeDasharray:b,strokeDashoffset:b*(1-l/100)})]}),o&&!d&&t.jsx("span",{className:te.circle__label,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},xi=L(n.memo(fi),"ProgressCircle"),vi="hanui-upload-v1pRY",yi="hanui-upload__drop-OpNbO",wi="hanui-upload__input-Tcg9-",ki="hanui-upload__icon-KpMkq",ji="hanui-upload__label-M4HJb",Ni="hanui-upload__drag-ewSQw",$i="hanui-upload__hint-MZRJ6",Ei="hanui-upload__error-7GkCC",Ci="hanui-upload__list-lbViQ",Ii="hanui-upload__file-Znp1Q",Ti="hanui-upload__fileText-EtJcs",Ri="hanui-upload__fileName-ArF8-",Di="hanui-upload__fileMeta-i6sO1",Si="hanui-upload__progress-JY2a5",G={upload:vi,upload__drop:yi,upload__input:wi,"upload__drop--dragging":"hanui-upload__drop--dragging-YztUx","upload__drop--invalid":"hanui-upload__drop--invalid-JhwnL","upload__drop--disabled":"hanui-upload__drop--disabled-zyfUv",upload__icon:ki,upload__label:ji,upload__drag:Ni,upload__hint:$i,upload__error:Ei,upload__list:Ci,upload__file:Ii,"upload__file--error":"hanui-upload__file--error-wpbtA",upload__fileText:Ti,upload__fileName:Ri,upload__fileMeta:Di,upload__progress:Si},Ut=1024,Sa=Ut*Ut,ta=e=>e<Ut?`${e} B`:e<Sa?`${Math.round(e/Ut)} KB`:`${(e/Sa).toFixed(1)} MB`,Li=({files:e,onSelect:a,onRemove:s,label:r,hint:o,accept:c,isMultiple:i,maxSize:_,removeLabel:h,dropLabel:d,sizeErrorText:l,isDisabled:p,error:u,children:b,className:g,testId:k})=>{const m=n.useId(),f=n.useId(),N=n.useRef(null),{labels:j}=O(),x=Yt(),[$,R]=n.useState(!1),[I,w]=n.useState([]),E=y=>{var q;if(!y||y.length===0)return;const C=[...y],B=_===void 0?[]:C.filter(Q=>Q.size>_),Y=C.filter(Q=>!B.includes(Q)),X=B.map(Q=>{var _e;return l===void 0?be("FileUpload.tooLarge",(_e=j==null?void 0:j.fileUpload)==null?void 0:_e.tooLarge,Q.name,ta(_??0)):l.replace("{name}",Q.name).replace("{max}",ta(_??0))});w(X),Y.length>0&&(a(Y),x(be("FileUpload.added",(q=j==null?void 0:j.fileUpload)==null?void 0:q.added,Y.length))),X.length>0&&x(X.join(" "),"assertive")},T=y=>{y.preventDefault(),R(!1),!p&&E(y.dataTransfer.files)};return t.jsxs("div",{className:v(G.upload,g),"data-testid":k,children:[t.jsxs("label",{htmlFor:m,className:v(G.upload__drop,$&&G["upload__drop--dragging"],p&&G["upload__drop--disabled"],u&&G["upload__drop--invalid"]),onDragOver:y=>{y.preventDefault(),p||R(!0)},onDragLeave:()=>R(!1),onDrop:T,children:[t.jsx(D.CloudArrowUpFill,{"aria-hidden":!0,className:G.upload__icon}),t.jsx("span",{className:G.upload__label,children:r}),t.jsx("span",{className:G.upload__drag,children:d}),o&&t.jsx("span",{id:f,className:G.upload__hint,children:o}),t.jsx("input",{ref:N,id:m,type:"file",className:G.upload__input,accept:c,multiple:i,disabled:p,"aria-describedby":o?f:void 0,"aria-invalid":u?!0:void 0,onChange:y=>{E(y.target.files),y.target.value=""}})]}),u&&t.jsxs("p",{className:G.upload__error,role:"alert",children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),u]}),I.map(y=>t.jsxs("p",{className:G.upload__error,role:"alert",children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),y]},y)),e.length>0&&t.jsx("ul",{className:G.upload__list,children:e.map(y=>{var C;return t.jsxs("li",{className:v(G.upload__file,y.error&&G["upload__file--error"]),children:[t.jsxs("span",{className:G.upload__fileText,children:[t.jsx("span",{className:G.upload__fileName,children:y.name}),t.jsx("span",{className:G.upload__fileMeta,children:y.error??ta(y.size)})]}),y.progress!==void 0&&t.jsx(en,{value:y.progress,label:be("FileUpload.uploading",(C=j==null?void 0:j.fileUpload)==null?void 0:C.uploading,y.name),size:"sm",className:G.upload__progress}),t.jsx(je,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:`${y.name} — ${h}`,variant:"ghost",size:"sm",onClick:()=>s(y.id)})]},y.id)})}),b]})},Ai=n.memo(L(Li,"FileUpload")),Fi="hanui-alert-gHI-9",Bi="hanui-alert__icon-DhiCT",Mi="hanui-alert__body-52-z2",Pi="hanui-alert__title-I8BAh",Oi="hanui-alert__content-lhBEo",Hi="hanui-alert__action-1mTje",Ve={alert:Fi,alert__icon:Bi,alert__body:Mi,alert__title:Pi,alert__content:Oi,alert__action:Hi,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},zi={info:t.jsx(D.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(D.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(D.XCircleFill,{"aria-hidden":!0})},Ki=({children:e,tone:a="info",title:s,action:r,className:o,testId:c})=>t.jsxs("div",{className:v(Ve.alert,Ve[`alert--${a}`],o),role:a==="danger"||a==="warning"?"alert":void 0,"data-testid":c,children:[t.jsx("span",{className:Ve.alert__icon,children:zi[a]}),t.jsxs("div",{className:Ve.alert__body,children:[s&&t.jsx("strong",{className:Ve.alert__title,children:s}),t.jsx("div",{className:Ve.alert__content,children:e})]}),r&&t.jsx("div",{className:Ve.alert__action,children:r})]}),Ui=n.memo(Ki),Yi="hanui-avatar-qoh3P",qi="hanui-avatar__image-uAyAX",Pt={avatar:Yi,avatar__image:qi,"avatar--sm":"hanui-avatar--sm-GGjU4","avatar--md":"hanui-avatar--md-xhXnK","avatar--lg":"hanui-avatar--lg-ULP-r","avatar--tone-0":"hanui-avatar--tone-0-mvjdw","avatar--tone-1":"hanui-avatar--tone-1-RYZOX","avatar--tone-2":"hanui-avatar--tone-2-vP-CS","avatar--tone-3":"hanui-avatar--tone-3-ivgnI","avatar--tone-4":"hanui-avatar--tone-4-V57r3","avatar--tone-5":"hanui-avatar--tone-5-65aPg"},Wi=(e,a)=>{const s=e.trim().split(/\s+/).filter(Boolean);if(s.length===0)return"?";const r=s.length===1?s[0].slice(0,2):`${s[0][0]}${s[s.length-1][0]}`;return a?r.toLocaleUpperCase(a):r.toLocaleUpperCase()},Xi=(e,a)=>{let s=5381;for(let r=0;r<e.length;r+=1)s=s*33^e.charCodeAt(r);return Math.abs(s)%a},Gi=6,Qi=({name:e,imageUrl:a,locale:s,size:r="md",className:o,testId:c})=>{const{labels:i}=O();return t.jsx("span",{className:v(Pt.avatar,Pt[`avatar--${r}`],!a&&Pt[`avatar--tone-${Xi(e,Gi)}`],o),role:"img","aria-label":e,"data-testid":c,children:a?t.jsx("img",{className:Pt.avatar__image,src:a,alt:""}):Wi(e,s??(i==null?void 0:i.locale))})},Vi=n.memo(Qi),Ji="hanui-badge-uLAaI",Zi="hanui-badge__icon-R2goZ",Ot={badge:Ji,badge__icon:Zi,"badge--neutral":"hanui-badge--neutral-6kddt","badge--soft":"hanui-badge--soft-gFeRF","badge--solid":"hanui-badge--solid-rtdHI","badge--outline":"hanui-badge--outline-QiAAz","badge--success":"hanui-badge--success-Oj11F","badge--danger":"hanui-badge--danger-X3nV0","badge--warning":"hanui-badge--warning-vAsx2","badge--info":"hanui-badge--info-mHOwk","badge--oem":"hanui-badge--oem-Nl-VX","badge--alt":"hanui-badge--alt-gQkww","badge--sale":"hanui-badge--sale-Li1tG","badge--action":"hanui-badge--action-7pUio","badge--link":"hanui-badge--link-zcNJZ"},ec=({children:e,tone:a="neutral",variant:s="soft",icon:r,className:o,testId:c})=>t.jsxs("span",{className:v(Ot.badge,Ot[`badge--${a}`],Ot[`badge--${s}`],o),"data-testid":c,children:[r&&t.jsx("span",{className:Ot.badge__icon,children:r}),e]}),tc=n.memo(ec),ac="hanui-breadcrumb-amB9n",nc="hanui-breadcrumb__item-Icv1S",sc="hanui-breadcrumb__link-eVkPq",rc="hanui-breadcrumb__current-8XjhU",oc="hanui-breadcrumb__separator-vvaUi",$t={breadcrumb:ac,breadcrumb__item:nc,breadcrumb__link:sc,breadcrumb__current:rc,breadcrumb__separator:oc},ic=({items:e,label:a,linkProps:s,className:r,testId:o})=>{const{labels:c}=O();return t.jsx("nav",{className:r,"aria-label":P("Breadcrumb.label",a,c==null?void 0:c.breadcrumb),"data-testid":o,children:t.jsx("ol",{className:v($t.breadcrumb),children:e.map((i,_)=>{const h=_===e.length-1;return t.jsxs("li",{className:$t.breadcrumb__item,children:[i.href&&!h?t.jsx(ue,{href:i.href,className:$t.breadcrumb__link,...s,children:i.label}):t.jsx("span",{className:$t.breadcrumb__current,"aria-current":"page",children:i.label}),!h&&t.jsx(D.CaretRightFill,{"aria-hidden":!0,className:$t.breadcrumb__separator})]},`${i.label}-${_}`)})})})},cc=n.memo(ic),lc="hanui-card-CaHUG",dc="hanui-media__frame-eBv-s",uc="hanui-media-eggk5",_c="hanui-media__link-ujyVV",hc="hanui-overlay-AVMTX",pc="hanui-body-DyI-6",mc="hanui-footer-2WNCZ",we={card:lc,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:dc,media:uc,media__link:_c,"media__frame--cover":"hanui-media__frame--cover-ddl29","media__frame--contain":"hanui-media__frame--contain-5gosS","media__frame--inset":"hanui-media__frame--inset-oVQIn",overlay:hc,"overlay--top-left":"hanui-overlay--top-left-td1xA","overlay--top-right":"hanui-overlay--top-right-GqD9H","overlay--bottom-left":"hanui-overlay--bottom-left-T5Quw","overlay--bottom-right":"hanui-overlay--bottom-right-za3z3",body:pc,footer:mc},bc=({children:e,isInteractive:a,as:s="div",className:r,testId:o})=>t.jsx(s,{className:v(we.card,a&&we["card--interactive"],r),"data-testid":o,children:e}),gc=(e,a)=>e??(a===!1?"cover":"contain"),fc=L(n.memo(({children:e,ratio:a=1,href:s,linkProps:r,fit:o,isContained:c,className:i})=>{const _=t.jsx("span",{className:v(we.media__frame,we[`media__frame--${gc(o,c)}`]),style:{aspectRatio:a},children:e});return t.jsx("div",{className:v(we.media,i),children:s?t.jsx(ue,{href:s,className:we.media__link,tabIndex:-1,"aria-hidden":!0,...r,children:_}):_})}),"CardMedia"),xc=L(n.memo(({children:e,position:a="top-left",className:s})=>t.jsx("div",{className:v(we.overlay,we[`overlay--${a}`],s),children:e})),"CardOverlay"),vc=L(n.memo(({children:e,className:a})=>t.jsx("div",{className:v(we.body,a),children:e})),"CardBody"),yc=L(n.memo(({children:e,className:a})=>t.jsx("div",{className:v(we.footer,a),children:e})),"CardFooter"),wc=n.memo(bc),kc="hanui-carousel-GJXkW",jc="hanui-carousel__controls-hm5ij",Nc="hanui-carousel__arrowIcon-adFey",$c="hanui-carousel__track-mAux5",Ec="hanui-carousel__dots-iU8RJ",Cc="hanui-carousel__dot-JTLCB",Oe={carousel:kc,carousel__controls:jc,carousel__arrowIcon:Nc,carousel__track:$c,carousel__dots:Ec,carousel__dot:Cc,"carousel__dot--active":"hanui-carousel__dot--active-riNMm"},Ic=({children:e,label:a,previousLabel:s,nextLabel:r,formatDotLabel:o,itemWidth:c,itemMinWidth:i,className:_,testId:h})=>{const d=n.useRef(null),[l,p]=n.useState(!1),[u,b]=n.useState(!1),[g,k]=n.useState(0),[m,f]=n.useState(1),[N,j]=n.useState(!1),x=n.useCallback(()=>{const I=d.current;if(!I)return;const{scrollLeft:w,scrollWidth:E,clientWidth:T}=I;p(w>1),b(w+T<E-1),k(T>0?Math.round(w/T):0),f(T>0?Math.max(1,Math.ceil(E/T)):1),j(E>T&&I.querySelector("a, button, input, select, textarea, [tabindex]")===null)},[]);n.useEffect(()=>{const I=d.current;if(!I)return;x(),I.addEventListener("scroll",x,{passive:!0});const w=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return w==null||w.observe(I),()=>{I.removeEventListener("scroll",x),w==null||w.disconnect()}},[x,e]);const $=()=>{var I;return typeof window<"u"&&((I=window.matchMedia)!=null&&I.call(window,"(prefers-reduced-motion: reduce)").matches)?"auto":"smooth"},R=I=>{var w;return(w=d.current)==null?void 0:w.scrollBy({left:I*d.current.clientWidth,behavior:$()})};return t.jsxs("section",{className:v(Oe.carousel,_),"aria-label":a,"data-testid":h,children:[t.jsxs("div",{className:Oe.carousel__controls,children:[t.jsx(je,{icon:t.jsx(D.CaretLeftFill,{"aria-hidden":!0,className:Oe.carousel__arrowIcon}),label:s,variant:"outline",size:"sm",disabled:!l,onClick:()=>R(-1)}),t.jsx(je,{icon:t.jsx(D.CaretRightFill,{"aria-hidden":!0,className:Oe.carousel__arrowIcon}),label:r,variant:"outline",size:"sm",disabled:!u,onClick:()=>R(1)})]}),t.jsx("div",{ref:d,className:Oe.carousel__track,style:{"--hanui-carousel-item-default":`${c??i??240}px`},tabIndex:N?0:void 0,role:N?"group":void 0,"aria-label":N?a:void 0,children:e}),o&&m>1&&t.jsx("div",{className:Oe.carousel__dots,children:Array.from({length:m},(I,w)=>t.jsx("button",{type:"button",className:v(Oe.carousel__dot,w===g&&Oe["carousel__dot--active"]),"aria-label":o(w+1,m),"aria-current":w===g?"true":void 0,onClick:()=>{var E;return(E=d.current)==null?void 0:E.scrollTo({left:w*d.current.clientWidth,behavior:$()})}},w))})]})},Tc=n.memo(L(Ic,"Carousel")),Rc=1600,tn=e=>{const[a,s]=n.useState(!1),r=n.useRef(null),o=n.useRef(void 0);n.useEffect(()=>()=>window.clearTimeout(o.current),[]);const c=n.useCallback(()=>{const _=r.current;if(!_)return;const h=document.createRange();h.selectNodeContents(_);const d=window.getSelection();d==null||d.removeAllRanges(),d==null||d.addRange(h)},[]),i=n.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),o.current=window.setTimeout(()=>s(!1),Rc)}catch{c()}},[e,c]);return{isCopied:a,copy:i,nodeRef:r}},Dc="hanui-badge-b14ZG",Sc="hanui-badge__code-RRDlH",Lc="hanui-badge__button-CVr21",Ac="hanui-badge__srOnly-ow8L5",ut={badge:Dc,"badge--sm":"hanui-badge--sm-Fr4vY",badge__code:Sc,"badge--md":"hanui-badge--md-HGRL4","badge--lg":"hanui-badge--lg-J4aiq",badge__button:Lc,"badge__button--done":"hanui-badge__button--done-k6XeK",badge__srOnly:Ac},Fc=({code:e,isCopyable:a,copyLabel:s,copiedLabel:r,copiedAnnouncement:o,size:c="md",className:i,testId:_})=>{var u,b,g;const{labels:h}=O(),{isCopied:d,copy:l,nodeRef:p}=tn(e);return t.jsxs("span",{className:v(ut.badge,ut[`badge--${c}`],i),"data-testid":_,children:[t.jsx("span",{className:ut.badge__code,ref:p,children:e}),a&&t.jsx("button",{type:"button",className:v(ut.badge__button,d&&ut["badge__button--done"]),onClick:l,"aria-label":d?r??be("CodeBadge.copiedLabel",(u=h==null?void 0:h.copyField)==null?void 0:u.copied,e):s??be("CodeBadge.copyLabel",(b=h==null?void 0:h.copyField)==null?void 0:b.copy,e),children:d?t.jsx(D.ClipboardCheckFill,{"aria-hidden":!0}):t.jsx(D.ClipboardFill,{"aria-hidden":!0})}),t.jsx("span",{"aria-live":"polite",className:ut.badge__srOnly,children:d?P("CodeBadge.copiedAnnouncement",o,(g=h==null?void 0:h.copyField)==null?void 0:g.announcement):""})]})},Bc=n.memo(L(Fc,"CodeBadge")),Mc="hanui-copy-Yht5s",Pc="hanui-copy__code-CYlCA",Oc="hanui-copy__button-GDdH6",Hc="hanui-copy__srOnly-WMTNN",_t={copy:Mc,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:Pc,"copy--md":"hanui-copy--md-00rhU",copy__button:Oc,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:Hc},zc=({value:e,copyLabel:a,copiedLabel:s,copiedAnnouncement:r,size:o="sm",isReadOnly:c,className:i,testId:_})=>{var u,b,g;const{labels:h}=O(),{isCopied:d,copy:l,nodeRef:p}=tn(e);return t.jsxs("span",{className:v(_t.copy,_t[`copy--${o}`],i),"data-testid":_,children:[t.jsx("span",{className:_t.copy__code,ref:p,children:e}),!c&&t.jsx("button",{type:"button",className:v(_t.copy__button,d&&_t["copy__button--done"]),onClick:l,"aria-label":d?s??be("CopyField.copiedLabel",(u=h==null?void 0:h.copyField)==null?void 0:u.copied,e):a??be("CopyField.copyLabel",(b=h==null?void 0:h.copyField)==null?void 0:b.copy,e),children:d?t.jsx(D.ClipboardCheckFill,{"aria-hidden":!0}):t.jsx(D.ClipboardFill,{"aria-hidden":!0})}),t.jsx("span",{"aria-live":"polite",className:_t.copy__srOnly,children:d?P("CopyField.copiedAnnouncement",r,(g=h==null?void 0:h.copyField)==null?void 0:g.announcement):""})]})},Kc=n.memo(zc),Uc="hanui-divider-RJqCw",Yc="hanui-divider__label-M8sBA",Ht={divider:Uc,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:Yc},qc=({label:e,className:a})=>e?t.jsx("div",{role:"separator","aria-label":e,className:v(Ht.divider,Ht["divider--labelled"],a),children:t.jsx("span",{className:Ht.divider__label,children:e})}):t.jsx("hr",{className:v(Ht.divider,a)}),Wc=n.memo(qc),Xc="hanui-directory-badEd",Gc="hanui-group-i6An9",Qc="hanui-group__header-rc19c",Vc="hanui-group__label-vQTcs",Jc="hanui-group__link-es5V7",Zc="hanui-group__meta-LtC-u",el="hanui-group__list-YxBCG",tl="hanui-row-3LH7X",al="hanui-row__name-75Wbq",nl="hanui-row__media-AxZEh",sl="hanui-row__marker-RYHb-",rl="hanui-jump-vpGwB",ol="hanui-jump__link-rRnT6",oe={directory:Xc,group:Gc,group__header:Qc,group__label:Vc,group__link:Jc,group__meta:Zc,group__list:el,row:tl,row__name:al,row__media:nl,row__marker:sl,jump:rl,jump__link:ol},il=({children:e,className:a})=>t.jsx("div",{className:v(oe.directory,a),children:e}),cl=L(n.memo(({label:e,href:a,linkProps:s,meta:r,children:o,id:c})=>t.jsxs("section",{className:oe.group,id:c,children:[t.jsxs("header",{className:oe.group__header,children:[t.jsx("h2",{className:oe.group__label,children:a?t.jsx(ue,{href:a,className:oe.group__link,...s,children:e}):e}),r&&t.jsx("span",{className:oe.group__meta,children:r})]}),t.jsx("ul",{className:oe.group__list,children:o})]})),"DirectoryGroup"),ll=L(n.memo(({href:e,name:a,media:s,marker:r,linkProps:o,className:c})=>t.jsx("li",{children:t.jsxs(ue,{href:e,className:v(oe.row,c),...o,children:[s&&t.jsx("span",{className:oe.row__media,children:s}),t.jsx("span",{className:oe.row__name,children:a}),r&&t.jsx("span",{className:oe.row__marker,children:r})]})})),"DirectoryRow"),dl=L(n.memo(({labels:e,toId:a,label:s})=>{const{labels:r}=O();return t.jsx("nav",{className:oe.jump,"aria-label":P("DirectoryJump.label",s,r==null?void 0:r.directoryJump),children:e.map(o=>t.jsx("a",{href:`#${a(o)}`,className:oe.jump__link,children:o},o))})}),"DirectoryJump"),ul=n.memo(il),_l="hanui-empty-47qZR",hl="hanui-empty__icon-okfEc",pl="hanui-empty__title-Z7Dzd",ml="hanui-empty__description-6BoCk",bl="hanui-empty__actions-ARk-k",Je={empty:_l,empty__icon:hl,empty__title:pl,empty__description:ml,empty__actions:bl,"empty--sm":"hanui-empty--sm-QXaXx","empty--error":"hanui-empty--error-4BBgp"},gl=({title:e,description:a,icon:s,action:r,secondaryAction:o,tone:c="empty",size:i="md",className:_,testId:h})=>t.jsxs("div",{className:v(Je.empty,Je[`empty--${i}`],Je[`empty--${c}`],_),role:c==="error"?"alert":void 0,"data-testid":h,children:[s&&t.jsx("span",{className:Je.empty__icon,children:s}),t.jsx("h3",{className:Je.empty__title,children:e}),a&&t.jsx("p",{className:Je.empty__description,children:a}),(r||o)&&t.jsxs("div",{className:Je.empty__actions,children:[r,o]})]}),fl=n.memo(gl),xl="hanui-header-yJwus",vl="hanui-header__top-UK4si",yl="hanui-header__breadcrumb-A2j0i",wl="hanui-header__text-HIo8U",kl="hanui-header__eyebrow-dZ9Zc",jl="hanui-header__titleRow-KgDZj",Nl="hanui-header__title-s1giF",$l="hanui-header__meta-UxuaD",El="hanui-header__description-NXbbC",Cl="hanui-header__actions-aShpt",ve={header:xl,header__top:vl,header__breadcrumb:yl,header__text:wl,header__eyebrow:kl,header__titleRow:jl,header__title:Nl,header__meta:$l,header__description:El,header__actions:Cl},Il=({title:e,eyebrow:a,description:s,actions:r,breadcrumb:o,meta:c,children:i,as:_="h1",className:h,testId:d})=>t.jsxs("header",{className:v(ve.header,h),"data-testid":d,children:[o&&t.jsx("div",{className:ve.header__breadcrumb,children:o}),t.jsxs("div",{className:ve.header__top,children:[t.jsxs("div",{className:ve.header__text,children:[a&&t.jsx("span",{className:ve.header__eyebrow,children:a}),t.jsxs("div",{className:ve.header__titleRow,children:[t.jsx(_,{className:ve.header__title,children:e}),c&&t.jsx("span",{className:ve.header__meta,children:c})]}),s&&t.jsx("p",{className:ve.header__description,children:s})]}),r&&t.jsx("div",{className:ve.header__actions,children:r})]}),i]}),Tl=n.memo(Il),Rl="hanui-panel-Sv-1m",Dl="hanui-panel__header-ysexh",Sl="hanui-panel__heading-xLCsB",Ll="hanui-panel__icon--yPQT",Al="hanui-panel__headingText--XqxW",Fl="hanui-panel__title-6-6uC",Bl="hanui-panel__description-qXTSM",Ml="hanui-panel__actions-Ra-zy",Pl="hanui-panel__body-lo5aX",Ol="hanui-panel__footer-qLpR1",Hl="hanui-panel__footerInner-r6VQI",zl="hanui-form-o9UqJ",Kl="hanui-row-vUGpa",V={panel:Rl,panel__header:Dl,panel__heading:Sl,panel__icon:Ll,panel__headingText:Al,panel__title:Fl,panel__description:Bl,panel__actions:Ml,panel__body:Pl,"panel__body--sm":"hanui-panel__body--sm-6XP6W","panel__body--lg":"hanui-panel__body--lg-RTK5B","panel__body--flush":"hanui-panel__body--flush-iK75R",panel__footer:Ol,panel__footerInner:Hl,form:zl,"form--2":"hanui-form--2-HdwDc",row:Kl},Ul=({children:e,title:a,description:s,actions:r,icon:o,isFlush:c,gap:i="md",footer:_,as:h="section",className:d,bodyClassName:l,testId:p})=>t.jsxs(h,{className:v(V.panel,d),"data-testid":p,children:[(a||r)&&t.jsxs("div",{className:V.panel__header,children:[t.jsxs("div",{className:V.panel__heading,children:[o&&t.jsx("span",{className:V.panel__icon,children:o}),t.jsxs("div",{className:V.panel__headingText,children:[a&&t.jsx("h2",{className:V.panel__title,children:a}),s&&t.jsx("p",{className:V.panel__description,children:s})]})]}),r&&t.jsx("div",{className:V.panel__actions,children:r})]}),t.jsx("div",{className:v(V.panel__body,V[`panel__body--${i}`],c&&V["panel__body--flush"],l),children:e}),_&&t.jsx("div",{className:V.panel__footer,children:t.jsx("div",{className:V.panel__footerInner,children:_})})]}),Yl=L(n.memo(({children:e,columns:a=1,className:s})=>t.jsx("div",{className:v(V.form,V[`form--${a}`],s),children:e})),"PanelForm"),ql=L(n.memo(({children:e,className:a})=>t.jsx("div",{className:v(V.row,a),children:e})),"PanelRow"),Wl=n.memo(Ul),Xl="hanui-price-Oc5Nr",Gl="hanui-price__current-2Xup2",Ql="hanui-price__currency-32NLN",Vl="hanui-price__list-MlQgT",Jl="hanui-price__discount-5Yc6W",Ze={price:Xl,price__current:Gl,price__currency:Ql,price__list:Vl,price__discount:Jl,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},Zl=({value:e,currency:a,listValue:s,discountPercent:r,formatDiscount:o=d=>`%${d}`,isFormatted:c,size:i="md",className:_,testId:h})=>{const{labels:d}=O(),l=P("Price.currency",a,d==null?void 0:d.currency),p=u=>{if(!c||!(d!=null&&d.locale)||!/\d/.test(u))return u;const b=Number(u.replace(/[^\d.,-]/g,"").replace(/\.(?=\d{3}\b)/g,"").replace(",","."));if(!Number.isFinite(b))return u;try{return new Intl.NumberFormat(d.locale).format(b)}catch{return u}};return t.jsxs("span",{className:v(Ze.price,Ze[`price--${i}`],_),"data-testid":h,children:[t.jsxs("span",{className:Ze.price__current,children:[p(e),t.jsx("span",{className:Ze.price__currency,children:l})]}),s&&t.jsxs("s",{className:Ze.price__list,children:[p(s),t.jsx("span",{className:Ze.price__currency,children:l})]}),r!==void 0&&r>0&&t.jsx("span",{className:Ze.price__discount,children:o(r)})]})},ed=n.memo(Zl),td="hanui-rating-94dke",ad="hanui-rating__stars-QkpVU",nd="hanui-rating__empty-Wf6-K",sd="hanui-rating__count-pIoEs",rd="hanui-rating__srOnly-E9h0d",ht={rating:td,rating__stars:ad,rating__empty:nd,rating__count:sd,rating__srOnly:rd,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},od=({value:e,count:a,srLabel:s,size:r="sm",className:o,testId:c})=>{var h;const{labels:i}=O(),_=Math.round(e*2)/2;return t.jsxs("span",{className:v(ht.rating,ht[`rating--${r}`],o),"data-testid":c,children:[t.jsx("span",{className:ht.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(d,l)=>{const p=l+1;return _>=p?t.jsx(D.StarFill,{},l):_>=p-.5?t.jsx(D.StarHalf,{},l):t.jsx(D.StarFill,{className:ht.rating__empty},l)})}),t.jsx("span",{className:ht.rating__srOnly,children:s??be("Rating.srLabel",(h=i==null?void 0:i.rating)==null?void 0:h.srLabel,e,a)}),U.isDefined(a)&&t.jsxs("span",{className:ht.rating__count,"aria-hidden":!0,children:["(",a,")"]})]})},id=n.memo(od),cd="hanui-header-a08Jh",ld="hanui-header__text-ArJkA",dd="hanui-header__overline-X5Epo",ud="hanui-header__title-nQQQJ",_d="hanui-header__description-08oCr",hd="hanui-header__action-xsxQF",et={header:cd,header__text:ld,header__overline:dd,header__title:ud,header__description:_d,header__action:hd,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},pd=({title:e,description:a,overline:s,action:r,as:o="h2",size:c="md",className:i,testId:_})=>t.jsxs("header",{className:v(et.header,et[`header--${c}`],i),"data-testid":_,children:[t.jsxs("div",{className:et.header__text,children:[s&&t.jsx("span",{className:et.header__overline,children:s}),t.jsx(o,{className:et.header__title,children:e}),a&&t.jsx("p",{className:et.header__description,children:a})]}),r&&t.jsx("div",{className:et.header__action,children:r})]}),md=n.memo(pd),bd="hanui-scrollArea-Ly-yT",aa={scrollArea:bd,"scrollArea--vertical":"hanui-scrollArea--vertical-2ujC7","scrollArea--horizontal":"hanui-scrollArea--horizontal-e9pu-","scrollArea--both":"hanui-scrollArea--both-lv-8W","scrollArea--fade":"hanui-scrollArea--fade-01Bbm"},gd=({children:e,label:a,axis:s="vertical",maxHeight:r,hasFade:o,className:c,testId:i})=>{const _=n.useRef(null),[h,d]=n.useState(!1),[l,p]=n.useState({start:!1,end:!1});return n.useEffect(()=>{const u=_.current;if(!u||typeof ResizeObserver>"u")return;const b=()=>{const k=u.scrollHeight>u.clientHeight,m=u.scrollWidth>u.clientWidth;d(s==="horizontal"?m:s==="vertical"?k:k||m);const f=s==="horizontal",N=f?u.clientWidth:u.clientHeight,j=f?u.scrollWidth:u.scrollHeight,x=Math.abs(f?u.scrollLeft:u.scrollTop);p({start:x>1,end:x+N<j-1})};b();const g=new ResizeObserver(b);g.observe(u);for(const k of u.children)g.observe(k);return u.addEventListener("scroll",b,{passive:!0}),()=>{g.disconnect(),u.removeEventListener("scroll",b)}},[s,e]),t.jsx("div",{ref:_,className:v(aa.scrollArea,aa[`scrollArea--${s}`],o&&aa["scrollArea--fade"],c),style:r===void 0?void 0:{maxBlockSize:r},"data-fade-start":o&&l.start?"":void 0,"data-fade-end":o&&l.end?"":void 0,tabIndex:h?0:void 0,role:h?"region":void 0,"aria-label":h?a:void 0,"data-testid":i,children:e})},fd=n.memo(L(gd,"ScrollArea")),xd="hanui-skeleton-n92if",vd="hanui-group-YMfwa",yd="hanui-card-XQs-Q",wd="hanui-card__media-YLJDv",kd="hanui-card__body-msRvB",jd="hanui-rows-EZ9Am",Nd="hanui-row-se56N",$d="hanui-row__text-TD4iS",Ed="hanui-table-L328g",Cd="hanui-table__row-rSJTK",ie={skeleton:xd,"skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:vd,card:yd,card__media:wd,card__body:kd,rows:jd,row:Nd,row__text:$d,table:Ed,table__row:Cd},Ke=({width:e,height:a,variant:s="block",lines:r=1,className:o})=>{const c={width:U.isNumber(e)?`${e}px`:e,height:U.isNumber(a)?`${a}px`:a};return s==="text"&&r>1?t.jsx("span",{className:v(ie.group,o),"aria-hidden":!0,children:Array.from({length:r},(i,_)=>t.jsx("span",{className:v(ie.skeleton,ie["skeleton--text"]),style:_===r-1?{width:"60%"}:void 0},_))}):t.jsx("span",{className:v(ie.skeleton,ie[`skeleton--${s}`],o),style:c,"aria-hidden":!0})},Id=n.memo(Ke),Td=({count:e=1,className:a})=>t.jsx(t.Fragment,{children:Array.from({length:e},(s,r)=>t.jsxs("div",{className:v(ie.card,a),"aria-hidden":!0,children:[t.jsx(Ke,{className:ie.card__media}),t.jsxs("div",{className:ie.card__body,children:[t.jsx(Ke,{variant:"text",width:"70%"}),t.jsx(Ke,{variant:"text",width:"40%"})]})]},r))}),Rd=({count:e=3,className:a})=>t.jsx("div",{className:v(ie.rows,a),"aria-hidden":!0,children:Array.from({length:e},(s,r)=>t.jsxs("div",{className:ie.row,children:[t.jsx(Ke,{variant:"circle",width:36,height:36}),t.jsxs("div",{className:ie.row__text,children:[t.jsx(Ke,{variant:"text",width:"45%"}),t.jsx(Ke,{variant:"text",width:"25%"})]})]},r))}),Dd=({count:e=5,columns:a=4,className:s})=>t.jsx("div",{className:v(ie.table,s),"aria-hidden":!0,children:Array.from({length:e},(r,o)=>t.jsx("div",{className:ie.table__row,children:Array.from({length:a},(c,i)=>t.jsx(Ke,{variant:"text"},i))},o))}),Sd=L(n.memo(Td),"SkeletonCard"),Ld=L(n.memo(Rd),"SkeletonRows"),Ad=L(n.memo(Dd),"SkeletonTable"),Fd="hanui-stat-Xb7wp",Bd="hanui-stat__icon-MB8NU",Md="hanui-stat__label-kUX2m",Pd="hanui-stat__value--6p13",Od="hanui-stat__unit-mjHVk",Hd="hanui-stat__delta-YKpOu",zd="hanui-stat__description-Yvw6J",Kd="hanui-stat__srOnly-YKebA",ce={stat:Fd,"stat--sm":"hanui-stat--sm-XnK8p","stat--plain":"hanui-stat--plain-N-3RC",stat__icon:Bd,stat__label:Md,stat__value:Pd,stat__unit:Od,stat__delta:Hd,"stat__delta--positive":"hanui-stat__delta--positive-1AUAM","stat__delta--negative":"hanui-stat__delta--negative--WWEP",stat__description:zd,stat__srOnly:Kd},Ud={up:t.jsx(D.ArrowUpShort,{"aria-hidden":!0}),down:t.jsx(D.ArrowDownShort,{"aria-hidden":!0}),flat:t.jsx(D.DashLg,{"aria-hidden":!0})},La={up:"increase",down:"decrease",flat:"unchanged"},Yd=({label:e,value:a,unit:s,delta:r,trend:o,isUpPositive:c=!0,description:i,icon:_,variant:h="card",size:d="md",className:l,testId:p})=>{var g;const{labels:u}=O(),b=o==="flat"?void 0:o==="up"===c;return t.jsxs("div",{className:v(ce.stat,ce[`stat--${d}`],ce[`stat--${h}`],l),"data-testid":p,children:[_&&t.jsx("span",{className:ce.stat__icon,"aria-hidden":!0,children:_}),t.jsx("span",{className:ce.stat__label,children:e}),t.jsxs("span",{className:ce.stat__value,children:[a,s&&t.jsx("span",{className:ce.stat__unit,children:s})]}),r&&o&&t.jsxs("span",{className:v(ce.stat__delta,b===!0&&ce["stat__delta--positive"],b===!1&&ce["stat__delta--negative"]),children:[Ud[o],r,t.jsx("span",{className:ce.stat__srOnly,children:P(`Stat.${La[o]}`,(g=u==null?void 0:u.stat)==null?void 0:g[La[o]])})]}),i&&t.jsx("span",{className:ce.stat__description,children:i})]})},qd=n.memo(L(Yd,"Stat")),Wd="hanui-card-wkzhi",Xd="hanui-card__media--Lm-v",Gd="hanui-card__content-8uHkm",Qd="hanui-card__title-1EwbD",Vd="hanui-card__link-mhY-M",Jd="hanui-card__description-3O0R7",Zd="hanui-card__meta-Xzk4q",tt={card:Wd,card__media:Xd,card__content:Gd,card__title:Qd,card__link:Vd,card__description:Jd,card__meta:Zd},eu=({title:e,href:a,description:s,meta:r,media:o,headingLevel:c=3,linkProps:i,className:_,testId:h})=>{const d=`h${c}`;return t.jsxs("article",{className:v(tt.card,_),"data-testid":h,children:[o&&t.jsx("span",{className:tt.card__media,"aria-hidden":!0,children:o}),t.jsxs("div",{className:tt.card__content,children:[t.jsx(d,{className:tt.card__title,children:t.jsx(ue,{href:a,className:tt.card__link,...i,children:e})}),s&&t.jsx("p",{className:tt.card__description,children:s}),r&&t.jsx("div",{className:tt.card__meta,children:r})]})]})},tu=n.memo(L(eu,"SummaryCard")),au="hanui-hub-JoqOf",nu="hanui-toast-U27Of",su="hanui-toast__icon-p-rgI",ru="hanui-toast__text-rG4ji",ou="hanui-toast__message-s6S2-",iu="hanui-toast__description-0cYTx",cu="hanui-toast__action-fOXU5",lu="hanui-toast__close-QxSNP",De={hub:au,toast:nu,"toast--info":"hanui-toast--info-S1QJr","toast--success":"hanui-toast--success-NUso7","toast--warning":"hanui-toast--warning-7mi-S","toast--danger":"hanui-toast--danger-IhFSz",toast__icon:su,toast__text:ru,toast__message:ou,toast__description:iu,toast__action:cu,toast__close:lu},du={info:t.jsx(D.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(D.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(D.XCircleFill,{"aria-hidden":!0})},uu={info:4e3,success:4e3,warning:6e3,danger:8e3};let Aa=0;const oa=new Set;let st=[];const ga=()=>oa.forEach(e=>e(st)),ia=e=>{st=st.filter(a=>a.id!==e),ga()},Et=(e,a={})=>{Aa+=1;const s=Aa;return st=[...st,{...a,id:s,message:e}].slice(-3),ga(),s},_u={show:Et,info:(e,a)=>Et(e,{...a,tone:"info"}),success:(e,a)=>Et(e,{...a,tone:"success"}),warning:(e,a)=>Et(e,{...a,tone:"warning"}),error:(e,a)=>Et(e,{...a,tone:"danger"}),dismiss:ia,clear:()=>{st=[],ga()}},hu=({toast:e,closeLabel:a,onDismiss:s})=>{const r=e.tone??"info",o=e.duration??uu[r],[c,i]=n.useState(!1),_=n.useRef(o),h=n.useRef(0);return n.useEffect(()=>{if(o===0||c)return;h.current=Date.now();const d=window.setTimeout(()=>s(e.id),_.current);return()=>{window.clearTimeout(d),_.current=Math.max(0,_.current-(Date.now()-h.current))}},[o,c,s,e.id]),t.jsxs("div",{className:v(De.toast,De[`toast--${r}`]),role:r==="danger"?"alert":"status",onPointerEnter:()=>i(!0),onPointerLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t.jsx("span",{className:De.toast__icon,"aria-hidden":!0,children:du[r]}),t.jsxs("div",{className:De.toast__text,children:[t.jsx("span",{className:De.toast__message,children:e.message}),e.description&&t.jsx("span",{className:De.toast__description,children:e.description})]}),e.action&&t.jsx("button",{type:"button",className:De.toast__action,onClick:()=>{var d;(d=e.action)==null||d.onClick(),s(e.id)},children:e.action.label}),t.jsx(je,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:a,variant:"ghost",size:"sm",className:De.toast__close,onClick:()=>s(e.id)})]})},pu=({closeLabel:e,regionLabel:a,className:s})=>{const{labels:r}=O(),[o,c]=n.useState([]);n.useEffect(()=>(oa.add(c),c(st),()=>{oa.delete(c)}),[]);const i=n.useCallback(l=>ia(l),[]),_=n.useCallback(()=>{const l=o.at(-1);l&&ia(l.id)},[o]);pa(o.length>0,_);const[h,d]=n.useState(!1);return n.useEffect(()=>d(!0),[]),h?rt.createPortal(t.jsx("div",{className:v(De.hub,s),role:"region","aria-label":P("ToastHub.regionLabel",a,r==null?void 0:r.notifications),"aria-live":"polite","aria-relevant":"additions",children:o.map(l=>t.jsx(hu,{toast:l,closeLabel:P("ToastHub.closeLabel",e,r==null?void 0:r.close),onDismiss:i},l.id))}),document.body):null},an=n.memo(L(pu,"ToastHub")),mu=()=>{const[e,a]=n.useState(!1);return n.useEffect(()=>a(!0),[]),e?t.jsx(an,{}):null},bu=n.memo(L(mu,"ToastPortal")),gu="hanui-accordion-h9jLC",fu="hanui-accordion__item--YvzK",xu="hanui-accordion__title-qZOLY",vu="hanui-accordion__meta-PSlsO",yu="hanui-accordion__marker-QcWcI",wu="hanui-accordion__summary-QUhWh",ku="hanui-accordion__panel--3EXE",ju="hanui-accordion__content-fO64s",Ce={accordion:gu,accordion__item:fu,"accordion__item--disabled":"hanui-accordion__item--disabled-x1erZ",accordion__title:xu,accordion__meta:vu,accordion__marker:yu,accordion__summary:wu,accordion__panel:ku,accordion__content:ju},Nu=({items:e,isSingle:a,defaultOpenIds:s,openIds:r,onChange:o,className:c,testId:i})=>{const _=n.useId(),[h,d]=n.useState(s??[]),l=r!==void 0,p=l?r:h,u=n.useCallback((g,k)=>{const m=k?a?[g]:[...p.filter(f=>f!==g),g]:p.filter(f=>f!==g);l||d(m),o==null||o(m)},[l,a,o,p]),b=n.useRef(new Map);return n.useEffect(()=>{e.forEach(g=>{const k=b.current.get(g.id);k&&(k.open=p.includes(g.id))})}),t.jsx("div",{className:v(Ce.accordion,c),"data-testid":i,children:e.map(g=>{const k=p.includes(g.id);return t.jsxs("details",{ref:m=>{m?b.current.set(g.id,m):b.current.delete(g.id)},className:v(Ce.accordion__item,g.isDisabled&&Ce["accordion__item--disabled"]),open:k,onToggle:m=>{const f=m.currentTarget.open;f!==k&&u(g.id,f)},children:[t.jsxs("summary",{id:`${_}-${g.id}`,className:Ce.accordion__summary,"aria-disabled":g.isDisabled,tabIndex:g.isDisabled?-1:void 0,onClick:m=>g.isDisabled&&m.preventDefault(),children:[t.jsx(D.CaretRightFill,{"aria-hidden":!0,className:Ce.accordion__marker}),t.jsx("span",{className:Ce.accordion__title,children:g.title}),g.meta&&t.jsx("span",{className:Ce.accordion__meta,children:g.meta})]}),t.jsx("div",{className:Ce.accordion__panel,children:t.jsx("div",{className:Ce.accordion__content,children:g.content})})]},g.id)})})},$u=n.memo(L(Nu,"Accordion")),Eu="hanui-steps-ntge1",Cu="hanui-steps__label-NSeFM",Iu="hanui-steps__item-GrU1x",Tu="hanui-steps__button-XBsnS",Ru="hanui-steps__marker-g-GLE",Du="hanui-steps__text-Mkpkh",Su="hanui-steps__description-bQuNT",Lu="hanui-steps__status-wWJfP",le={steps:Eu,"steps--horizontal":"hanui-steps--horizontal-O-mkx","steps--vertical":"hanui-steps--vertical-agfwo","steps--static":"hanui-steps--static-t9EED",steps__label:Cu,steps__item:Iu,steps__button:Tu,steps__marker:Ru,"steps__item--done":"hanui-steps__item--done-mvOuN","steps__item--current":"hanui-steps__item--current-Qzlal",steps__text:Du,steps__description:Su,steps__status:Lu},Au=(e,a)=>e<a?"done":e===a?"current":"upcoming",Fa={done:"completed",current:"current",upcoming:"upcoming"},Fu=({steps:e,currentIndex:a,onStepClick:s,label:r,orientation:o="horizontal",className:c,testId:i})=>{const{labels:_}=O();return t.jsx("ol",{className:v(le.steps,le[`steps--${o}`],a===void 0&&le["steps--static"],c),"aria-label":r,"data-testid":i,children:e.map((h,d)=>{var b;const l=a===void 0?void 0:Au(d,a),p=!!s&&l==="done",u=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:le.steps__marker,"aria-hidden":!0,children:l==="done"?t.jsx(D.CheckLg,{}):d+1}),t.jsxs("span",{className:le.steps__text,children:[t.jsx("span",{className:le.steps__label,children:h.label}),h.description&&t.jsx("span",{className:le.steps__description,children:h.description})]}),l&&t.jsx("span",{className:le.steps__status,children:P(`Steps.${Fa[l]}`,(b=_==null?void 0:_.steps)==null?void 0:b[Fa[l]])})]});return t.jsx("li",{className:v(le.steps__item,l&&le[`steps__item--${l}`]),"aria-current":l==="current"?"step":void 0,children:p?t.jsx("button",{type:"button",className:le.steps__button,onClick:()=>s==null?void 0:s(d),children:u}):t.jsx("span",{className:le.steps__button,children:u})},h.id)})})},Bu=n.memo(L(Fu,"Steps")),Mu="hanui-tabs-l4dFE",Pu="hanui-tabs__list-HJvR8",Ou="hanui-tabs__tab-7gDW7",Hu="hanui-tabs__count-8JX8s",zu="hanui-tabs__panel-CPklY",pt={tabs:Mu,tabs__list:Pu,tabs__tab:Ou,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:Hu,tabs__panel:zu},Ku=({items:e,defaultTabId:a,activeId:s,onChange:r,ariaLabel:o,isManualActivation:c,className:i,testId:_})=>{var I;const h=n.useId(),[d,l]=n.useState(a??((I=e[0])==null?void 0:I.id)),p=U.isDefined(s),u=p?s:d,b=e.findIndex(w=>w.id===u),[g,k]=n.useState(b<0?0:b),m=n.useRef(null),f=e[b]??e[0],N=g>=0&&g<e.length?g:Math.max(b,0);n.useEffect(()=>{k(b<0?0:b)},[b]);const j=n.useRef(!1);n.useEffect(()=>{var w;if(!j.current){j.current=!0;return}da((w=m.current)==null?void 0:w.querySelector('[aria-selected="true"]'),{block:"nearest",inline:"nearest"})},[u]);const x=w=>{p||l(w),r==null||r(w)},$=w=>{var y;if(c&&(w.key==="Enter"||w.key===" ")){w.preventDefault();const C=e[N];C&&x(C.id);return}const E=w.key==="ArrowRight"?1:w.key==="ArrowLeft"?-1:0;if(E===0)return;w.preventDefault();const T=((c?N:b)+E+e.length)%e.length;k(T),c||x(e[T].id),(y=document.getElementById(`${h}-tab-${e[T].id}`))==null||y.focus()};if(e.length===0)return null;const R=U.isDefined(f==null?void 0:f.content);return t.jsxs("div",{className:v(pt.tabs,i),"data-testid":_,children:[t.jsx("div",{ref:m,className:pt.tabs__list,role:"tablist","aria-label":o,onKeyDown:$,children:e.map(w=>{var T;const E=w.id===f.id;return t.jsxs("button",{id:`${h}-tab-${w.id}`,type:"button",role:"tab","aria-selected":E,"aria-controls":E&&R?`${h}-panel-${w.id}`:void 0,tabIndex:(c?((T=e[N])==null?void 0:T.id)===w.id:E)?0:-1,className:v(pt.tabs__tab,E&&pt["tabs__tab--active"]),onClick:()=>x(w.id),children:[w.label,U.isDefined(w.count)&&t.jsx("span",{className:pt.tabs__count,children:w.count})]},w.id)})}),R&&t.jsx("div",{id:`${h}-panel-${f.id}`,role:"tabpanel","aria-labelledby":`${h}-tab-${f.id}`,className:pt.tabs__panel,tabIndex:0,children:f.content})]})},Uu=n.memo(Ku),Yu="hanui-tile-TGur-",qu="hanui-tile__medallion--Y0pz",Wu="hanui-tile__label-mI1OQ",Xu="hanui-tile__meta-22qnR",Ct={tile:Yu,tile__medallion:qu,tile__label:Wu,tile__meta:Xu,"tile--active":"hanui-tile--active-z0F2M"},Gu=({label:e,icon:a,href:s,meta:r,isActive:o,linkProps:c,className:i,testId:_})=>t.jsxs(ue,{href:s,className:v(Ct.tile,o&&Ct["tile--active"],i),"aria-current":o?"page":void 0,"data-testid":_,...c,children:[t.jsx("span",{className:Ct.tile__medallion,"aria-hidden":!0,children:a}),t.jsx("span",{className:Ct.tile__label,children:e}),r&&t.jsx("span",{className:Ct.tile__meta,children:r})]}),Qu=n.memo(Gu),Vu="hanui-timeline-GxubZ",Ju="hanui-timeline__item-qMpF2",Zu="hanui-timeline__marker-MDk07",e_="hanui-timeline__body-xJi7t",t_="hanui-timeline__title-pKxZJ",a_="hanui-timeline__time-ITWYy",n_="hanui-timeline__description-4vrEy",s_="hanui-timeline__srOnly-7K2We",Ie={timeline:Vu,timeline__item:Ju,timeline__marker:Zu,"timeline__item--done":"hanui-timeline__item--done-dqiOQ","timeline__item--current":"hanui-timeline__item--current-TGV5f","timeline__item--pending":"hanui-timeline__item--pending-VMZTS","timeline__item--failed":"hanui-timeline__item--failed-2BbfX",timeline__body:e_,timeline__title:t_,timeline__time:a_,timeline__description:n_,timeline__srOnly:s_},r_={done:t.jsx(D.CheckLg,{}),failed:t.jsx(D.XLg,{}),current:null,pending:null},na={done:"completed",current:"current",pending:null,failed:"failed"},o_=({events:e,label:a,className:s,testId:r})=>{const{labels:o}=O();return t.jsx("ol",{className:v(Ie.timeline,s),"aria-label":a,"data-testid":r,children:e.map(c=>{var _;const i=c.status??"done";return t.jsxs("li",{className:v(Ie.timeline__item,Ie[`timeline__item--${i}`]),"aria-current":i==="current"?"step":void 0,children:[t.jsx("span",{className:Ie.timeline__marker,"aria-hidden":!0,children:c.icon??r_[i]}),t.jsxs("div",{className:Ie.timeline__body,children:[t.jsxs("span",{className:Ie.timeline__title,children:[c.title,t.jsx("span",{className:Ie.timeline__srOnly,children:na[i]===null?null:P(`Timeline.${na[i]}`,(_=o==null?void 0:o.timeline)==null?void 0:_[na[i]])})]}),c.time&&t.jsx("span",{className:Ie.timeline__time,children:c.time}),c.description&&t.jsx("span",{className:Ie.timeline__description,children:c.description})]})]},c.id)})})},i_=n.memo(L(o_,"Timeline")),c_="hanui-modal-3IDi9",l_="hanui-modal__panel--qLSz",d_="hanui-modal__header-meWm6",u_="hanui-modal__icon-df2dd",__="hanui-modal__heading-PwDS8",h_="hanui-modal__title-80Sh6",p_="hanui-modal__description-fsCHI",m_="hanui-modal__close-vFPbw",b_="hanui-modal__body-PDF12",g_="hanui-modal__footer-CCCkx",se={modal:c_,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em",modal__panel:l_,modal__header:d_,modal__icon:u_,"modal__icon--neutral":"hanui-modal__icon--neutral-QSL7c","modal__icon--danger":"hanui-modal__icon--danger-6V90a","modal__icon--warning":"hanui-modal__icon--warning-a--FX","modal__icon--success":"hanui-modal__icon--success-YWxZs","modal__icon--info":"hanui-modal__icon--info-WRLah",modal__heading:__,modal__title:h_,modal__description:p_,modal__close:m_,modal__body:b_,modal__footer:g_},f_=({isOpen:e,onClose:a,title:s,closeLabel:r,children:o,description:c,footer:i,icon:_,tone:h="neutral",size:d="md",isDismissable:l=!0,className:p,testId:u})=>{const{labels:b}=O(),g=n.useRef(null),k=n.useRef(null),m=n.useId(),f=n.useId();n.useEffect(()=>{const j=g.current;if(!j)return;if(!e){j.open&&j.close();return}const x=xt();j.open||j.showModal(),Wt(j,`.${se.modal__close}`),ha(j);const{token:$,pop:R}=Dt();return k.current=$,()=>{R(),k.current=null,x()}},[e]),Xt(e),n.useEffect(()=>{const j=g.current;if(!j)return;const x=$=>{$.preventDefault(),l&&(k.current&&!St(k.current)||a())};return j.addEventListener("cancel",x),()=>j.removeEventListener("cancel",x)},[a,l]);const N=n.useCallback(j=>{l&&j.target===g.current&&a()},[l,a]);return t.jsx("dialog",{ref:g,className:v(se.modal,se[`modal--${d}`],p),"aria-labelledby":m,"aria-describedby":c?f:void 0,"data-testid":u,onClick:N,children:t.jsxs("div",{className:se.modal__panel,children:[t.jsxs("header",{className:se.modal__header,children:[_&&t.jsx("span",{className:v(se.modal__icon,se[`modal__icon--${h}`]),children:_}),t.jsxs("div",{className:se.modal__heading,children:[t.jsx("h2",{id:m,className:se.modal__title,children:s}),c&&t.jsx("p",{id:f,className:se.modal__description,children:c})]}),l&&t.jsx(je,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:P("Modal.closeLabel",r,b==null?void 0:b.close),variant:"ghost",size:"sm",className:se.modal__close,onClick:a})]}),o&&t.jsx("div",{className:se.modal__body,children:o}),i&&t.jsx("footer",{className:se.modal__footer,children:i})]})})},fa=n.memo(f_),x_="hanui-palette-ag-P9",v_="hanui-palette__search-G3aYv",y_="hanui-palette__searchIcon-2UYj-",w_="hanui-palette__input-vvLvt",k_="hanui-palette__list--KWiH",j_="hanui-palette__group-KPj5Q",N_="hanui-palette__item-UZzkp",$_="hanui-palette__icon-Fg0Lt",E_="hanui-palette__text-flfN9",C_="hanui-palette__label-8-UHe",I_="hanui-palette__description-eRlk9",T_="hanui-palette__shortcut-DwYKX",R_="hanui-palette__empty-vg-I3",Z={palette:x_,palette__search:v_,palette__searchIcon:y_,palette__input:w_,palette__list:k_,palette__group:j_,palette__item:N_,"palette__item--active":"hanui-palette__item--active-XHcka",palette__icon:$_,palette__text:E_,palette__label:C_,palette__description:I_,palette__shortcut:T_,palette__empty:R_},D_=({isOpen:e,onClose:a,items:s,label:r,searchPlaceholder:o,emptyMessage:c,className:i,testId:_})=>{const h=n.useId(),d=`${h}-listbox`,l=n.useRef(null),p=n.useRef(null),u=n.useRef(null),[b,g]=n.useState(""),[k,m]=n.useState(0),f=n.useMemo(()=>{if(b.trim()==="")return s;const x=b.trim();return s.filter($=>Rt($.label,x)||($.description?Rt($.description,x):!1))},[s,b]);Xt(e),n.useEffect(()=>{var w;const x=l.current;if(!x)return;if(!e){x.open&&x.close();return}const $=xt();x.open||x.showModal(),(w=p.current)==null||w.focus({preventScroll:!0}),g(""),m(0);const{token:R,pop:I}=Dt();return u.current=R,()=>{I(),u.current=null,$()}},[e]),n.useEffect(()=>{const x=l.current;if(!x)return;const $=R=>{R.preventDefault(),!(u.current&&!St(u.current))&&a()};return x.addEventListener("cancel",$),()=>x.removeEventListener("cancel",$)},[a]),n.useEffect(()=>{var x;da((x=l.current)==null?void 0:x.querySelector(`[data-index="${k}"]`),{block:"nearest"})},[k]);const N=x=>{x.onSelect(),a()},j=x=>{const $=f.length-1;switch(x.key){case"ArrowDown":x.preventDefault(),m(R=>R>=$?0:R+1);break;case"ArrowUp":x.preventDefault(),m(R=>R<=0?$:R-1);break;case"Home":x.preventDefault(),m(0);break;case"End":x.preventDefault(),m($);break;case"Enter":{x.preventDefault();const R=f[k];R&&N(R);break}}};return t.jsxs("dialog",{ref:l,className:v(Z.palette,i),"aria-label":r,"data-testid":_,onClick:x=>x.target===l.current&&a(),children:[t.jsxs("div",{className:Z.palette__search,children:[t.jsx(D.Search,{"aria-hidden":!0,className:Z.palette__searchIcon}),t.jsx("input",{ref:p,type:"text",role:"combobox",className:Z.palette__input,value:b,placeholder:o,"aria-label":o,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":d,"aria-activedescendant":f[k]?`${h}-option-${k}`:void 0,onChange:x=>{g(x.target.value),m(0)},onKeyDown:j})]}),t.jsxs("ul",{id:d,role:"listbox","aria-label":r,className:Z.palette__list,children:[f.map((x,$)=>{var I;const R=x.group!==void 0&&x.group!==((I=f[$-1])==null?void 0:I.group);return t.jsxs("li",{role:"presentation",children:[R&&t.jsx("span",{className:Z.palette__group,"aria-hidden":!0,children:x.group}),t.jsxs("div",{id:`${h}-option-${$}`,role:"option","data-index":$,"aria-selected":$===k,className:v(Z.palette__item,$===k&&Z["palette__item--active"]),onMouseEnter:()=>m($),onClick:()=>N(x),children:[x.icon&&t.jsx("span",{className:Z.palette__icon,"aria-hidden":!0,children:x.icon}),t.jsxs("span",{className:Z.palette__text,children:[t.jsx("span",{className:Z.palette__label,children:x.label}),x.description&&t.jsx("span",{className:Z.palette__description,children:x.description})]}),x.shortcut&&t.jsx("kbd",{className:Z.palette__shortcut,"aria-hidden":!0,children:x.shortcut})]})]},x.id)}),f.length===0&&t.jsx("li",{role:"presentation",className:Z.palette__empty,children:c})]})]})},S_=n.memo(L(D_,"CommandPalette")),L_={destructive:t.jsx(D.TrashFill,{"aria-hidden":!0}),warning:t.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),neutral:t.jsx(D.QuestionCircleFill,{"aria-hidden":!0})},A_={destructive:"danger",warning:"warning",neutral:"info"},F_={destructive:ke.DANGER,warning:ke.PRIMARY,neutral:ke.PRIMARY},B_=({isOpen:e,onClose:a,onConfirm:s,title:r,description:o,confirmLabel:c,cancelLabel:i,closeLabel:_,variant:h,kind:d,children:l})=>{const{labels:p}=O(),[u,b]=n.useState(!1),g=h??d??"neutral",k=async()=>{b(!0);try{await s()}finally{b(!1)}};return t.jsx(fa,{isOpen:e,onClose:a,title:r,closeLabel:_??(p==null?void 0:p.close),description:o,icon:L_[g],tone:A_[g],size:"sm",isDismissable:!u,footer:t.jsxs(t.Fragment,{children:[t.jsx(gt,{variant:ke.SECONDARY,size:Ye.MEDIUM,onClick:a,disabled:u,children:P("ConfirmDialog.cancelLabel",i,p==null?void 0:p.cancel)}),t.jsx(gt,{variant:F_[g],size:Ye.MEDIUM,onClick:k,isLoading:u,children:c})]}),children:l})},M_=n.memo(B_),P_="hanui-drawer-fgfi1",O_="hanui-drawer__header-BDcRe",H_="hanui-drawer__title-9M0e8",z_="hanui-drawer__close-Z30oW",K_="hanui-drawer__toolbar-vcsYi",U_="hanui-drawer__body-x12SX",Y_="hanui-drawer__footer-PajTg",ye={drawer:P_,"drawer--sm":"hanui-drawer--sm-ywgof","drawer--md":"hanui-drawer--md-mN8Kg","drawer--lg":"hanui-drawer--lg-5H-oE","drawer--end":"hanui-drawer--end-q-sIP","drawer--start":"hanui-drawer--start-xqVlX",drawer__header:O_,drawer__title:H_,drawer__close:z_,drawer__toolbar:K_,drawer__body:U_,drawer__footer:Y_},q_=({isOpen:e,onClose:a,title:s,closeLabel:r,children:o,side:c="end",size:i="md",footer:_,toolbar:h,className:d,testId:l})=>{const{labels:p}=O(),u=n.useRef(null),b=n.useRef(null),g=n.useId();n.useEffect(()=>{const m=u.current;if(!m)return;if(!e){m.open&&m.close();return}const f=xt();m.open||m.showModal(),Wt(m,`.${ye.drawer__close}`),ha(m);const{token:N,pop:j}=Dt();return b.current=N,()=>{j(),b.current=null,f()}},[e]),Xt(e),Qa(e),n.useEffect(()=>{const m=u.current;if(!m)return;const f=N=>{N.preventDefault(),!(b.current&&!St(b.current))&&a()};return m.addEventListener("cancel",f),()=>m.removeEventListener("cancel",f)},[a]);const k=n.useCallback(m=>{m.target===u.current&&a()},[a]);return t.jsxs("dialog",{ref:u,className:v(ye.drawer,ye[`drawer--${c}`],ye[`drawer--${i}`],d),"aria-labelledby":g,"data-testid":l,onClick:k,children:[t.jsxs("header",{className:ye.drawer__header,children:[t.jsx("h2",{id:g,className:ye.drawer__title,children:s}),t.jsx(je,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:P("Drawer.closeLabel",r,p==null?void 0:p.close),variant:"ghost",size:"sm",className:ye.drawer__close,onClick:a})]}),h&&t.jsx("div",{className:ye.drawer__toolbar,children:h}),t.jsx("div",{className:ye.drawer__body,children:o}),_&&t.jsx("div",{className:ye.drawer__footer,children:_})]})},W_=n.memo(L(q_,"Drawer")),X_="hanui-form-zpZn4",G_={form:X_},Q_=({isOpen:e,onClose:a,onSubmit:s,title:r,label:o,submitLabel:c,cancelLabel:i,closeLabel:_,description:h,hint:d,placeholder:l,defaultValue:p="",isRequired:u,requiredLabel:b,inputMode:g="text",maxLength:k,rows:m=4})=>{const{labels:f}=O(),N=n.useId(),[j,x]=n.useState(p),[$,R]=n.useState(!1),I=n.useRef(!1);n.useEffect(()=>{e&&!I.current&&x(p),I.current=e},[e,p]);const w=j.trim(),E=!!u&&w==="",T=C=>g==="multiline"?t.jsx(Va,{...C,value:j,onChange:B=>x(B.target.value),placeholder:l,maxLength:k,rows:m}):t.jsx(ba,{...C,type:g==="number"?"number":"text",value:j,onChange:B=>x(B.target.value),placeholder:l,maxLength:k}),y=async()=>{if(!(E||$)){R(!0);try{await s(w),a()}catch{}finally{R(!1)}}};return t.jsx(fa,{isOpen:e,onClose:a,title:r,closeLabel:_??(f==null?void 0:f.close),description:h,size:"sm",isDismissable:!$,footer:t.jsxs(t.Fragment,{children:[t.jsx(gt,{variant:ke.SECONDARY,size:Ye.MEDIUM,onClick:a,disabled:$,children:P("PromptDialog.cancelLabel",i,f==null?void 0:f.cancel)}),t.jsx(gt,{type:"submit",form:N,variant:ke.PRIMARY,size:Ye.MEDIUM,disabled:E,isLoading:$,children:P("PromptDialog.submitLabel",c,f==null?void 0:f.submit)})]}),children:t.jsx("form",{id:N,className:G_.form,onSubmit:C=>{C.preventDefault(),y()},children:t.jsx(Ja,{label:o,hint:d,isRequired:u,requiredLabel:b,children:T})})})},V_=n.memo(Q_),J_="hanui-scroller-EtDmS",Z_="hanui-table-uCv4q",mt={scroller:J_,"scroller--frame":"hanui-scroller--frame-84zz6",table:Z_,"table--compact":"hanui-table--compact-4KCVl","table--regular":"hanui-table--regular-hsA3-","table--spacious":"hanui-table--spacious-BBUX-","table--sticky-head":"hanui-table--sticky-head-FO2L4","table--row-hover":"hanui-table--row-hover--MAoe"},eh=L(n.memo(({hasFrame:e=!0,label:a,className:s,children:r,...o})=>{const c=n.useRef(null),[i,_]=n.useState(!1);return n.useEffect(()=>{const h=c.current;if(!h||typeof ResizeObserver>"u")return;const d=()=>_(h.scrollWidth>h.clientWidth+1);d();const l=new ResizeObserver(d);l.observe(h);for(const p of h.children)l.observe(p);return()=>l.disconnect()},[r]),t.jsx("div",{ref:c,tabIndex:i?0:void 0,role:i?"region":void 0,"aria-label":i?a:void 0,className:v(mt.scroller,e&&mt["scroller--frame"],s),...o,children:r})}),"TableScroller"),th=({density:e="regular",hasStickyHead:a,hasRowHover:s,className:r,children:o,...c})=>t.jsx("table",{className:v(mt.table,mt[`table--${e}`],a&&mt["table--sticky-head"],s&&mt["table--row-hover"],r),...c,children:o}),ah=n.memo(th),nh="hanui-wrapper-KXCZg",sh="hanui-table-LF5Ow",rh="hanui-state-YPPb0",oh="hanui-state__message-wwbIW",ih="hanui-srOnly-Oia8c",ch="hanui-sort-3Q6Fx",lh="hanui-sort__arrow-MITWb",dh="hanui-sticky-KDEvQ",uh="hanui-bulkBar-62qk0",ee={wrapper:nh,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:sh,state:rh,"state--error":"hanui-state--error-A492d",state__message:oh,"row--warning":"hanui-row--warning-BAUN2",srOnly:ih,sort:ch,sort__arrow:lh,"sort__arrow--ascending":"hanui-sort__arrow--ascending-85T5d","sort__arrow--descending":"hanui-sort__arrow--descending-gs3VU",sticky:dh,bulkBar:uh},_h=({columns:e,label:a,children:s,isLoading:r,error:o,emptyMessage:c,loadingMessage:i,hasViewportCap:_,onSort:h,bulkBar:d,className:l,testId:p})=>{var k,m;const{labels:u}=O(),b=n.Children.count(s),g=(f,N)=>t.jsx("tr",{children:t.jsx("td",{colSpan:e.length,className:v(ee.state,N&&ee[`state--${N}`]),children:f})});return t.jsxs("div",{className:v(ee.wrapper,_&&ee["wrapper--capped"],l),"data-testid":p,children:[d&&t.jsx("div",{className:ee.bulkBar,children:d}),t.jsxs("table",{className:ee.table,"aria-label":a,children:[t.jsx("thead",{children:t.jsx("tr",{children:e.map(f=>{const N=!!(f.isSortable&&h),j=f.ariaSort==="ascending"?"descending":"ascending";return t.jsx("th",{scope:"col","aria-sort":f.ariaSort,className:v(f.className,f.isSticky&&ee.sticky),children:N?t.jsxs("button",{type:"button",className:ee.sort,onClick:()=>h==null?void 0:h(f.key,j),children:[f.label,f.srLabel&&t.jsx("span",{className:ee.srOnly,children:f.srLabel}),t.jsx("span",{"aria-hidden":!0,className:v(ee.sort__arrow,f.ariaSort&&ee[`sort__arrow--${f.ariaSort}`]),children:f.ariaSort==="descending"?"▾":"▴"})]}):t.jsxs(t.Fragment,{children:[f.label,f.srLabel&&t.jsx("span",{className:ee.srOnly,children:f.srLabel})]})},f.key)})})}),t.jsx("tbody",{children:o?g(t.jsxs("span",{role:"alert",className:ee.state__message,children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),o]}),"error"):r?g(P("DataTable.loadingMessage",i,(k=u==null?void 0:u.dataTable)==null?void 0:k.loading)):b===0?g(P("DataTable.emptyMessage",c,(m=u==null?void 0:u.dataTable)==null?void 0:m.empty)):s})]})]})},hh=L(n.memo(({isWarning:e,className:a,children:s,...r})=>t.jsx("tr",{className:v(e&&ee["row--warning"],a),...r,children:s})),"DataTableRow"),ph=n.memo(_h),mh="hanui-bar-b4PP4",bh="hanui-bar__hiddenSubmit-jeCyX",gh="hanui-bar__actions-rG69L",fh="hanui-field-f-rvu",Tt={bar:mh,bar__hiddenSubmit:bh,bar__actions:gh,field:fh,"field--wide":"hanui-field--wide-FA5gf"},xh=({onSubmit:e,children:a,actions:s,label:r,className:o,testId:c})=>{const{labels:i}=O();return t.jsxs("form",{className:v(Tt.bar,o),"aria-label":P("FilterBar.label",r,i==null?void 0:i.filters),"data-testid":c,onSubmit:_=>{_.preventDefault(),e()},children:[a,t.jsx("button",{type:"submit",className:Tt.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),s&&t.jsx("div",{className:Tt.bar__actions,children:s})]})},vh=L(n.memo(({children:e,isWide:a,className:s})=>t.jsx("div",{className:v(Tt.field,a&&Tt["field--wide"],s),children:e})),"FilterBarField"),yh=n.memo(xh),wh="hanui-pagination-K-L20",kh="hanui-pagination__list--9HqC",jh="hanui-pagination__arrow-XIgoX",Nh="hanui-pagination__page-TpoJM",$h="hanui-pagination__gap-qoDyI",Te={pagination:wh,pagination__list:kh,pagination__arrow:jh,pagination__page:Nh,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:$h},Eh=(e,a)=>{if(a<=7)return Array.from({length:a},(c,i)=>i+1);const s=new Set([1,a,e]);e-1>1&&s.add(e-1),e+1<a&&s.add(e+1);const r=[...s].sort((c,i)=>c-i),o=[];return r.forEach((c,i)=>{i>0&&c-r[i-1]>1&&o.push("gap"),o.push(c)}),o},Ch=({page:e,totalPages:a,label:s,previousLabel:r,nextLabel:o,buildHref:c,onPageChange:i,linkProps:_,formatAnnouncement:h,scrollTo:d,className:l,testId:p})=>{var $,R,I;const{labels:u}=O(),b=Yt(),g=n.useRef(e);n.useEffect(()=>{g.current!==e&&(g.current=e,h&&b(h(e,a)))},[e,a,h,b]);const k=n.useMemo(()=>Eh(e,a),[e,a]);if(a<=1)return null;const m=w=>{d==="top"&&w!==e&&wn()},f=w=>{i&&(i(w),m(w))},N=_==null?void 0:_.onClick,j=(w,E)=>{N==null||N(w),!(w.defaultPrevented||w.button!==0)&&(w.metaKey||w.ctrlKey||w.shiftKey||w.altKey||m(E))},x=(w,E,T)=>{const y=w<1||w>a;return c&&!y?t.jsx(ue,{href:c(w),className:Te.pagination__arrow,"aria-label":E,..._,onClick:C=>j(C,w),children:T}):t.jsx(je,{className:Te.pagination__arrow,icon:T,label:E,variant:"outline",disabled:y,onClick:()=>f(w)})};return t.jsxs("nav",{className:v(Te.pagination,l),"aria-label":P("Pagination.label",s,($=u==null?void 0:u.pagination)==null?void 0:$.label),"data-testid":p,children:[x(e-1,P("Pagination.previousLabel",r,(R=u==null?void 0:u.pagination)==null?void 0:R.previous),t.jsx(D.CaretLeftFill,{"aria-hidden":!0})),t.jsx("ul",{className:Te.pagination__list,children:k.map((w,E)=>w==="gap"?t.jsx("li",{className:Te.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${E}`):t.jsx("li",{children:c?t.jsx(ue,{href:c(w),className:v(Te.pagination__page,w===e&&Te["pagination__page--active"]),"aria-current":w===e?"page":void 0,..._,onClick:T=>j(T,w),children:w}):t.jsx(gt,{variant:ke.SECONDARY,size:Ye.SMALL,className:v(Te.pagination__page,w===e&&Te["pagination__page--active"]),"aria-current":w===e?"page":void 0,onClick:()=>f(w),children:w})},w))}),x(e+1,P("Pagination.nextLabel",o,(I=u==null?void 0:u.pagination)==null?void 0:I.next),t.jsx(D.CaretRightFill,{"aria-hidden":!0}))]})},Ih=n.memo(Ch);exports.ABOVE_MOBILE_MEDIA_QUERY=qt;exports.ABOVE_TABLET_MEDIA_QUERY=$n;exports.Accordion=$u;exports.Alert=Ui;exports.Avatar=Vi;exports.Badge=tc;exports.BottomSheet=ma;exports.Breadcrumb=cc;exports.Button=gt;exports.COMPACT_DENSITY=_n;exports.Card=wc;exports.CardBody=vc;exports.CardFooter=yc;exports.CardMedia=fc;exports.CardOverlay=xc;exports.Carousel=Tc;exports.Checkbox=Er;exports.Chip=qa;exports.ChipGroup=ys;exports.CodeBadge=Bc;exports.Combobox=tr;exports.CommandPalette=S_;exports.ConfirmDialog=M_;exports.CopyField=Kc;exports.DARK_THEME=Oa;exports.DEFAULT_FONTS=hn;exports.DENSITY_ATTRIBUTE=ca;exports.DataTable=ph;exports.DataTableRow=hh;exports.DateField=Vo;exports.DateRange=Zo;exports.Directory=ul;exports.DirectoryGroup=cl;exports.DirectoryJump=dl;exports.DirectoryRow=ll;exports.Divider=Wc;exports.Drawer=W_;exports.EmptyState=fl;exports.Field=Ja;exports.FileUpload=Ai;exports.FilterBar=yh;exports.FilterBarField=vh;exports.HanuiProvider=mn;exports.IconButton=je;exports.Input=ba;exports.LIGHT_THEME=Pa;exports.METRIC_TOKENS=un;exports.MOBILE_BREAKPOINT=Ua;exports.Menu=ds;exports.Modal=fa;exports.PageHeader=Tl;exports.Pagination=Ih;exports.Panel=Wl;exports.PanelForm=Yl;exports.PanelRow=ql;exports.PasswordInput=Lo;exports.Popover=hs;exports.Price=ed;exports.Progress=en;exports.ProgressCircle=xi;exports.PromptDialog=V_;exports.QuantityStepper=vo;exports.Radio=Kr;exports.RadioCard=Gr;exports.RangeSlider=so;exports.Rating=id;exports.RatingInput=mo;exports.ScrollArea=fd;exports.SectionHeader=md;exports.SegmentedControl=ir;exports.Select=vr;exports.Skeleton=Id;exports.SkeletonCard=Sd;exports.SkeletonRows=Ld;exports.SkeletonTable=Ad;exports.Spinner=_a;exports.Stat=qd;exports.Steps=Bu;exports.SummaryCard=tu;exports.Switch=Ar;exports.TABLET_BREAKPOINT=Ya;exports.TABLET_PORTRAIT_BREAKPOINT=Nn;exports.THEME_ATTRIBUTE=ze;exports.Table=ah;exports.TableCheckbox=jo;exports.TableScroller=eh;exports.Tabs=Uu;exports.TagInput=Oo;exports.TextLink=Hn;exports.Textarea=Va;exports.Tile=Qu;exports.Timeline=i_;exports.ToastHub=an;exports.ToastPortal=bu;exports.Tooltip=ss;exports.UISize=Ye;exports.UIVariant=ke;exports.applyThemeConfig=la;exports.buildThemeCss=Ha;exports.initHanui=bn;exports.matchesSearch=Rt;exports.normalizeSearchTerm=sa;exports.resolveTokens=pn;exports.toast=_u;exports.useAnnounce=Yt;exports.useHanui=O;exports.useHanuiTheme=yn;exports.useListboxNavigation=ua;exports.usePositioning=ft;exports.useVirtualList=Ka;
21
+ `)},ha=e=>{if(!z.isClient())return;const a=e?Wa(e):"",n=document.getElementById(Ia);if(a===""){n==null||n.remove();return}const r=n??document.createElement("style");r.id=Ia,r.textContent=a,n||document.head.appendChild(r)},Xa=s.createContext({}),O=()=>s.useContext(Xa),wn=({children:e,theme:a,linkComponent:n,labels:r})=>{const o=s.useMemo(()=>a?JSON.stringify(a):"",[a]);s.useEffect(()=>{ha(a)},[o]);const c=s.useRef(a);c.current=a;const i=s.useMemo(()=>({theme:c.current,linkComponent:n,labels:r}),[o,n,r]);return t.jsx(Xa.Provider,{value:i,children:e})},jn=(e={})=>{ha(e.theme),z.isClient()&&(e.colorScheme&&document.documentElement.setAttribute(Ke,e.colorScheme),e.density&&document.documentElement.setAttribute(_a,e.density))},kn="hanui-live-region",Nn=e=>{if(!z.isClient())return null;const a=`${kn}-${e}`,n=document.getElementById(a);if(n)return n;const r=document.createElement("div");return r.id=a,r.setAttribute("aria-live",e),r.setAttribute("aria-atomic","true"),r.className="hanui-visually-hidden",document.body.appendChild(r),r},$n=(e,a)=>{e.textContent="",window.requestAnimationFrame(()=>{e.textContent=a})},Xt=()=>s.useCallback((e,a="polite")=>{const n=e.trim();if(n==="")return;const r=Nn(a);r&&$n(r,n)},[]),Ta=()=>{var e;return z.isClient()&&((e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},En=()=>{if(!z.isClient())return"system";const e=document.documentElement.getAttribute(Ke);return e==="dark"||e==="light"?e:"system"},In=()=>{const[e,a]=s.useState("light"),[n,r]=s.useState("light"),[o,c]=s.useState(!1);s.useEffect(()=>{a(En()),r(Ta()),c(!0)},[]),s.useEffect(()=>{if(!z.isClient()||!window.matchMedia)return;const d=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>r(Ta());return d.addEventListener("change",l),()=>d.removeEventListener("change",l)},[]);const i=e==="system"?n:e,_=s.useCallback(d=>{if(!z.isClient())return;const l=document.documentElement;l.classList.add(Ca),d==="system"?l.removeAttribute(Ke):l.setAttribute(Ke,d),a(d),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(Ca))})},[]),h=s.useCallback(()=>_(i==="dark"?"light":"dark"),[i,_]);return{scheme:i,preference:e,setScheme:_,toggle:h,isReady:o}},Cn=()=>{!z.isClient()||typeof window.scrollTo!="function"||window.scrollTo({top:0,left:0,behavior:"instant"})},pa=(e,a)=>{typeof(e==null?void 0:e.scrollIntoView)=="function"&&e.scrollIntoView(a)},ma=({count:e,isOpen:a,initialIndex:n=0,onSelect:r,onClose:o},{hasSpaceSelect:c=!1}={})=>{const[i,_]=s.useState(n),h=s.useRef(null);s.useEffect(()=>{a&&_(n)},[a,n]),s.useEffect(()=>{_(l=>l>=e?Math.max(0,e-1):l)},[e]),s.useEffect(()=>{var l;a&&pa((l=h.current)==null?void 0:l.querySelector(`[data-index="${i}"]`),{block:"nearest"})},[i,a,e]);const d=s.useCallback(l=>{const p=e-1;switch(l.key){case"ArrowDown":l.preventDefault(),_(u=>u>=p?0:u+1);break;case"ArrowUp":l.preventDefault(),_(u=>u<=0?p:u-1);break;case"Home":l.preventDefault(),_(0);break;case"End":l.preventDefault(),_(p);break;case" ":case"Enter":{if(l.key===" "&&!c)break;l.preventDefault(),e>0&&r(i);break}case"Escape":l.preventDefault(),l.stopPropagation(),o();break;case"Tab":o();break}},[i,e,c,o,r]);return{activeIndex:i,setActiveIndex:_,listRef:h,handleKeyDown:d}},Zt={top:"bottom",bottom:"top",left:"right",right:"left"},Ra=(e,a,n)=>n<a?a:Math.min(Math.max(e,a),n),ea=(e,a,n,r,o)=>{const c=n==="top"||n==="bottom",i={top:e.top-a.height-o,bottom:e.top+e.height+o,left:e.left-a.width-o,right:e.left+e.width+o}[n],_=c?e.left:e.top,h=c?e.width:e.height,d=c?a.width:a.height,l={start:_,center:_+h/2-d/2,end:_+h-d}[r];return c?{top:i,left:l}:{top:l,left:i}},Da=(e,a,n,r,o)=>({top:e.top>=r,bottom:e.top+a.height<=o.height-r,left:e.left>=r,right:e.left+a.width<=o.width-r})[n],xt=(e,a,{side:n="top",align:r="center",offset:o=8,padding:c=8,isOpen:i})=>{const[_,h]=s.useState({style:{position:"fixed",top:0,left:0},side:n,anchorWidth:0,isPositioned:!1}),d=s.useRef(0),l=s.useCallback(()=>{const b=e.current,g=a.current;if(!b||!g)return;const j=b.getBoundingClientRect(),m=g.getBoundingClientRect(),f={width:window.innerWidth,height:window.innerHeight},N=ea(j,m,n,r,o),k=Da(N,m,n,c,f)?n:Da(ea(j,m,Zt[n],r,o),m,Zt[n],c,f)?Zt[n]:n,x=ea(j,m,k,r,o);h({style:{position:"fixed",top:Math.round(Ra(x.top,c,f.height-m.height-c)),left:Math.round(Ra(x.left,c,f.width-m.width-c))},side:k,anchorWidth:j.width,isPositioned:!0})},[e,a,n,r,o,c]),p=s.useCallback(()=>{d.current||(d.current=window.requestAnimationFrame(()=>{d.current=0,l()}))},[l]);return(z.isClient()?s.useLayoutEffect:s.useEffect)(()=>{var g,j;if(!i){h(m=>m.isPositioned?{...m,isPositioned:!1}:m);return}l(),window.addEventListener("resize",p),(g=window.visualViewport)==null||g.addEventListener("resize",p),(j=window.visualViewport)==null||j.addEventListener("scroll",p),document.addEventListener("scroll",p,!0);const b=typeof ResizeObserver>"u"?null:new ResizeObserver(p);return b&&a.current&&b.observe(a.current),b&&e.current&&b.observe(e.current),()=>{var m,f;window.removeEventListener("resize",p),(m=window.visualViewport)==null||m.removeEventListener("resize",p),(f=window.visualViewport)==null||f.removeEventListener("scroll",p),document.removeEventListener("scroll",p,!0),b==null||b.disconnect(),d.current&&(window.cancelAnimationFrame(d.current),d.current=0)}},[i,l,p,e,a]),_},Tn=40,Rn=6,Ga=(e,{rowHeight:a=Tn,overscan:n=Rn,isEnabled:r=!0}={})=>{const o=s.useRef(null),[c,i]=s.useState({start:0,end:e,totalHeight:e*a,offset:0}),_=s.useCallback(()=>{const d=o.current,l=!r||!d||d.clientHeight===0?{start:0,end:e,totalHeight:e*a,offset:0}:(()=>{const p=Math.ceil(d.clientHeight/a),u=Math.floor(d.scrollTop/a),b=Math.max(0,u-n),g=Math.min(e,u+p+n);return{start:b,end:g,totalHeight:e*a,offset:b*a}})();i(p=>p.start===l.start&&p.end===l.end&&p.totalHeight===l.totalHeight&&p.offset===l.offset?p:l)},[e,r,n,a]);s.useEffect(_),s.useEffect(()=>{const d=o.current;if(!d)return;d.addEventListener("scroll",_,{passive:!0});const l=typeof ResizeObserver>"u"?null:new ResizeObserver(_);return l==null||l.observe(d),()=>{d.removeEventListener("scroll",_),l==null||l.disconnect()}},[_]);const h=s.useCallback(d=>{const l=o.current;if(!l||!r)return;const p=d*a,u=p+a;p<l.scrollTop?l.scrollTop=p:u>l.scrollTop+l.clientHeight&&(l.scrollTop=u-l.clientHeight)},[r,a]);return{scrollRef:o,range:c,scrollToIndex:h,measure:_}};var je=(e=>(e.PRIMARY="PRIMARY",e.CART="CART",e.SECONDARY="SECONDARY",e.OUTLINE="OUTLINE",e.DARK="DARK",e.LIGHT="LIGHT",e.GHOST="GHOST",e.DANGER="DANGER",e))(je||{}),ze=(e=>(e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e))(ze||{});const Va=640,Dn=768,Qa=1024,Sn=`(min-width: ${Qa+1}px)`,Gt=`(min-width: ${Va+1}px)`,ia=e=>e.replace(/İ/g,"i").replace(/I/g,"i").replace(/ı/g,"i").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ş/g,"s").replace(/ğ/g,"g").replace(/ç/g,"c").replace(/ø/g,"o").replace(/æ/g,"ae").replace(/ß/g,"ss").replace(/đ/g,"d").replace(/ł/g,"l").replace(/\s+/g," ").trim(),Dt=(e,a)=>ia(e).includes(ia(a)),v=(...e)=>{let a="";for(const n of e)n&&(a=a===""?n:`${a} ${n}`);return a},L=(e,a)=>Object.assign(e,{displayName:a}),ue=({children:e,...a})=>{const{linkComponent:n}=O();return n?t.jsx(n,{...a,children:e}):t.jsx("a",{...a,children:e})},Sa=new Set,P=(e,...a)=>{for(const n of a)if(n!==void 0)return n;return process.env.NODE_ENV!=="production"&&!Sa.has(e)&&(Sa.add(e),console.error(`[hanui] Eksik metin: ${e}. Prop olarak geçin ya da <HanuiProvider labels={…}> içinde bir kez tanımlayın. Metinsiz bırakılan öğe ekran okuyucuda adsız kalır.`)),""},me=(e,a,...n)=>a?a(...n):P(e),Ln="hanui-spinner-7pXwf",An="hanui-spinner__label-sZvSq",ta={spinner:Ln,spinner__label:An,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},Fn=({size:e="md",label:a,className:n})=>{const{labels:r}=O();return t.jsx("span",{className:v(ta.spinner,ta[`spinner--${e}`],n),role:"status",children:t.jsx("span",{className:ta.spinner__label,children:a??P("Spinner.label",r==null?void 0:r.loading)})})},ba=s.memo(Fn),Mn="hanui-button-SRu4R",Bn="hanui-button__icon-giom6",Pn="hanui-button__spinner-vexVG",On="hanui-button__label-qiMHm",$e={button:Mn,button__icon:Bn,button__spinner:Pn,button__label:On,"button--full":"hanui-button--full-CwPHR","button--loading":"hanui-button--loading-O-naJ","button--small":"hanui-button--small-TF9Hz","button--medium":"hanui-button--medium-JDjkH","button--large":"hanui-button--large-btadu","button--primary":"hanui-button--primary-ym7RJ","button--cart":"hanui-button--cart-5DVmR","button--secondary":"hanui-button--secondary-56m1d","button--outline":"hanui-button--outline-ZI8sw","button--dark":"hanui-button--dark-FGZgn","button--light":"hanui-button--light-YzEPs","button--ghost":"hanui-button--ghost-rijnZ","button--danger":"hanui-button--danger-TNGd2"},Hn=s.forwardRef(({variant:e=je.PRIMARY,size:a=ze.MEDIUM,isLoading:n,isFullWidth:r,startIcon:o,endIcon:c,className:i,children:_,disabled:h,href:d,isExternal:l,linkProps:p,testId:u,...b},g)=>{const j=v($e.button,$e[`button--${e.toLowerCase()}`],$e[`button--${a.toLowerCase()}`],r&&$e["button--full"],n&&$e["button--loading"],i),m=t.jsxs(t.Fragment,{children:[n&&t.jsx(ba,{size:"sm",className:$e.button__spinner,label:""}),!n&&o&&t.jsx("span",{className:$e.button__icon,children:o}),t.jsx("span",{className:$e.button__label,children:_}),c&&t.jsx("span",{className:$e.button__icon,children:c})]}),f=!!h||!!n,N={"aria-busy":n,"aria-disabled":f||void 0,tabIndex:f?-1:b.tabIndex,onClick:k=>{var x;if(f){k.preventDefault();return}(x=b.onClick)==null||x.call(b,k)}};return d&&l?t.jsx("a",{...b,...N,href:d,className:j,target:"_blank",rel:"noopener noreferrer","data-testid":u,children:m}):d?t.jsx(ue,{...b,...N,href:d,className:j,"data-testid":u,...p,children:m}):t.jsx("button",{ref:g,className:j,disabled:h||n,"aria-busy":n,"data-testid":u,...b,children:m})}),ft=s.memo(L(Hn,"Button")),Kn="hanui-iconButton-JdtwM",aa={iconButton:Kn,"iconButton--sm":"hanui-iconButton--sm-wE6zE","iconButton--md":"hanui-iconButton--md-iTNNS","iconButton--ghost":"hanui-iconButton--ghost-w-8K3","iconButton--outline":"hanui-iconButton--outline-vEhcY","iconButton--solid":"hanui-iconButton--solid-NUszP","iconButton--cart":"hanui-iconButton--cart-nVsH-","iconButton--danger":"hanui-iconButton--danger-xKkEA"},Un=s.forwardRef(({icon:e,label:a,variant:n="ghost",size:r="md",className:o,type:c="button",href:i,linkProps:_,testId:h,...d},l)=>{const p=v(aa.iconButton,aa[`iconButton--${n}`],aa[`iconButton--${r}`],o),u=!!d.disabled;return i?t.jsx(ue,{...d,href:i,className:p,"aria-label":a,"aria-disabled":u||void 0,tabIndex:u?-1:d.tabIndex,onClick:b=>{var g;if(u){b.preventDefault();return}(g=d.onClick)==null||g.call(d,b)},"data-testid":h,..._,children:e}):t.jsx("button",{ref:l,type:c,className:p,"aria-label":a,"data-testid":h,...d,children:e})}),ke=s.memo(L(Un,"IconButton")),zn="hanui-link-WBmXY",Yn="hanui-link__label--OEu-",qn="hanui-link__arrow-JKXm-",wt={link:zn,link__label:Yn,link__arrow:qn,"link--sm":"hanui-link--sm-a-3Dz","link--md":"hanui-link--md-lZdYP","link--brand":"hanui-link--brand-vr8sW","link--muted":"hanui-link--muted-EeN6l"},Wn=({href:e,children:a,hasArrow:n,tone:r="brand",size:o="md",className:c,linkProps:i,..._})=>t.jsxs(ue,{href:e,className:v(wt.link,wt[`link--${r}`],wt[`link--${o}`],c),...i,..._,children:[t.jsx("span",{className:wt.link__label,children:a}),n&&t.jsx(D.ArrowRight,{"aria-hidden":!0,className:wt.link__arrow})]}),Xn=s.memo(Wn),Gn=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Vn=e=>{if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const a=e.getAttribute("contenteditable");if(a===""||a==="true"||a==="plaintext-only")return!0;const n=e.tagName;return n==="TEXTAREA"?!0:n!=="INPUT"?!1:!Gn.has(e.type)},ga=e=>{const a=e.ownerDocument.activeElement;!e.contains(a)||!Vn(a)||(a.blur(),e.tabIndex=-1,e.focus({preventScroll:!0}))},vt=()=>{const e=typeof document>"u"?null:document.activeElement;return()=>{e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0})}},Qn=["a[href]","button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"])'].map(e=>`${e}:not([inert]):not([aria-hidden="true"])`).join(", "),Vt=(e,a="[data-hanui-close]")=>{const n=e.querySelector("[data-hanui-autofocus]");if(n){n.focus({preventScroll:!0});return}const r=[...e.querySelectorAll(Qn)],o=r.find(c=>!c.matches(a))??r[0];if(o){o.focus({preventScroll:!0});return}e.tabIndex=-1,e.focus({preventScroll:!0})},zt=[],St=()=>{const e=Symbol("hanui-modal");return zt.push(e),{token:e,pop:()=>{const a=zt.indexOf(e);a>=0&&zt.splice(a,1)}}},Lt=e=>zt.at(-1)===e,fa=(e,a)=>{s.useEffect(()=>{if(!e)return;const{token:n,pop:r}=St(),o=c=>{c.key==="Escape"&&Lt(n)&&a()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),r()}},[e,a])},Jn=e=>{var n;const a=((n=e==null?void 0:e.closest)==null?void 0:n.call(e,"dialog"))??null;return a&&a.isConnected?{container:a,needsTopLayer:Zn(a)}:{container:document.body,needsTopLayer:!1}},Zn=e=>{try{return e.matches(":modal")}catch{return e.hasAttribute("open")}},es={margin:0,right:"auto",bottom:"auto"},ts=e=>{if(!e||typeof e.showPopover!="function")return()=>{};try{e.showPopover()}catch{return()=>{}}return()=>{try{e.isConnected&&e.hidePopover()}catch{}}},as={},ns={},At=(e,a,n)=>{const r=e&&z.isClient()?Jn(a.current):null,o=(r==null?void 0:r.needsTopLayer)??!1;return s.useEffect(()=>{if(!(!e||!o))return ts(n.current)},[e,o,n]),{container:(r==null?void 0:r.container)??null,attributes:o?{popover:"manual"}:as,style:o?es:ns}},ss="hanui-tooltip-RG1g1",rs="hanui-tooltip__trigger-nWZtO",os="hanui-bubble-bcBNk",Pt={tooltip:ss,tooltip__trigger:rs,bubble:os,"bubble--top":"hanui-bubble--top-uWSZy","bubble--bottom":"hanui-bubble--bottom-jKokL","bubble--left":"hanui-bubble--left-WK4EM","bubble--right":"hanui-bubble--right-EQjUT"},is=120,cs=500,ls=300,ds=({content:e,children:a,side:n,position:r,openDelay:o=ls,className:c})=>{const[i,_]=s.useState(!1),h=s.useId(),d=n??r??"top",l=s.useRef(null),p=s.useRef(null),u=s.useRef(0),b=s.useRef(0),g=s.useMemo(()=>{if(!s.isValidElement(a))return!1;const T=a.type,y=a.props;return y.tabIndex!==void 0?!0:y.disabled===!0||typeof T!="string"?!1:T==="a"?y.href!==void 0:["button","input","select","textarea"].includes(T)},[a]),[j,m]=s.useState(!1);s.useEffect(()=>{const T=l.current;T&&m(!!T.querySelector('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))},[a]);const f=g||j,N=xt(l,p,{side:d,align:"center",isOpen:i}),k=At(i,l,p),x=s.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=0},[]),$=s.useCallback(T=>{x(),u.current=window.setTimeout(()=>_(!0),T)},[x]),R=s.useCallback((T=is)=>{x(),u.current=window.setTimeout(()=>_(!1),T)},[x]);s.useEffect(()=>x,[x]),s.useEffect(()=>()=>{b.current&&window.clearTimeout(b.current)},[]);const C=s.useCallback(()=>R(0),[R]);fa(i,C),s.useEffect(()=>{if(!i)return;const T=y=>{var I;y.pointerType!=="mouse"&&((I=l.current)!=null&&I.contains(y.target)||R(0))};return document.addEventListener("pointerdown",T),()=>document.removeEventListener("pointerdown",T)},[i,R]);const w=()=>{b.current&&window.clearTimeout(b.current),b.current=0},E=T=>{T.pointerType!=="mouse"&&(b.current=window.setTimeout(()=>_(!0),cs))};return t.jsxs(t.Fragment,{children:[t.jsx("span",{ref:l,className:v(Pt.tooltip,c),tabIndex:f?void 0:0,onPointerEnter:T=>T.pointerType==="mouse"&&$(o),onPointerLeave:T=>{w(),T.pointerType==="mouse"&&R()},onPointerDown:E,onPointerUp:w,onPointerCancel:w,onFocus:()=>$(0),onBlur:()=>R(0),onContextMenu:T=>{(i||b.current)&&T.preventDefault()},children:t.jsx("span",{"aria-describedby":i?h:void 0,className:Pt.tooltip__trigger,children:a})}),i&&k.container&&ot.createPortal(t.jsx("span",{ref:p,...k.attributes,id:h,role:"tooltip",className:v(Pt.bubble,Pt[`bubble--${N.side}`]),style:{...N.style,...k.style,visibility:N.isPositioned?"visible":"hidden"},children:e}),k.container)]})},us=s.memo(L(ds,"Tooltip")),_s="hanui-menu-1x-FU",hs="hanui-menu__item-d1iil",ps="hanui-menu__icon-kzLV2",jt={menu:_s,"menu--top":"hanui-menu--top-gpo39","menu--bottom":"hanui-menu--bottom-6sL7b","menu--left":"hanui-menu--left-4w-O8","menu--right":"hanui-menu--right-XmM8G",menu__item:hs,"menu__item--danger":"hanui-menu__item--danger-lIINY",menu__icon:ps},ms=e=>e.map((a,n)=>a.isDisabled?-1:n).filter(a=>a>=0),bs=({trigger:e,items:a,label:n,side:r="bottom",align:o="start",className:c,testId:i})=>{const _=s.useId(),h=s.useRef(null),d=s.useRef(null),l=s.useRef(null),p=s.useRef({text:"",at:0}),[u,b]=s.useState(!1),[g,j]=s.useState(0),m=xt(h,d,{side:r,align:o,isOpen:u}),f=ms(a),N=At(u,h,d),k=s.useCallback(y=>{f.length!==0&&(l.current=vt(),j(y==="first"?f[0]:f[f.length-1]),b(!0))},[f]),x=s.useCallback(()=>{var y;b(!1),(y=l.current)==null||y.call(l),l.current=null},[]);s.useEffect(()=>()=>{var y;(y=l.current)==null||y.call(l),l.current=null},[]),s.useEffect(()=>{var y,I;u&&((I=(y=d.current)==null?void 0:y.querySelector(`[data-index="${g}"]`))==null||I.focus({preventScroll:!0}))},[u,g]),s.useEffect(()=>{if(!u)return;const y=I=>{var Y,X;const M=I.target;(Y=d.current)!=null&&Y.contains(M)||(X=h.current)!=null&&X.contains(M)||x()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[u,x]);const $=y=>{const M=(f.indexOf(g)+y+f.length)%f.length;j(f[M])},R=y=>{const I=Date.now(),M=I-p.current.at>500?y:p.current.text+y;p.current={text:M,at:I};const Y=f.find(X=>a[X].label.toLocaleLowerCase("tr").startsWith(M.toLocaleLowerCase("tr")));Y!==void 0&&j(Y)},C=y=>{switch(y.key){case"ArrowDown":y.preventDefault(),$(1);break;case"ArrowUp":y.preventDefault(),$(-1);break;case"Home":y.preventDefault(),j(f[0]);break;case"End":y.preventDefault(),j(f[f.length-1]);break;case"Escape":y.preventDefault(),x();break;case"Tab":x();break;default:y.key.length===1&&!y.metaKey&&!y.ctrlKey&&R(y.key)}},w=y=>{if(y.key==="ArrowUp"){y.preventDefault(),k("last");return}["ArrowDown","Enter"," "].includes(y.key)&&(y.preventDefault(),k("first"))};if(!s.isValidElement(e))return null;const E=e.props,T=s.cloneElement(e,{ref:h,"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?_:void 0,onClick:y=>{var I;(I=E.onClick)==null||I.call(E,y),u?x():k("first")},onKeyDown:y=>{var I;(I=E.onKeyDown)==null||I.call(E,y),u||w(y)}});return t.jsxs(t.Fragment,{children:[T,u&&N.container&&ot.createPortal(t.jsx("div",{ref:d,id:_,role:"menu","aria-label":n,...N.attributes,className:v(jt.menu,jt[`menu--${m.side}`],c),style:{...m.style,...N.style,visibility:m.isPositioned?"visible":"hidden"},"data-testid":i,onKeyDown:C,children:a.map((y,I)=>t.jsxs("button",{type:"button",role:"menuitem","data-index":I,tabIndex:I===g?0:-1,disabled:y.isDisabled,className:v(jt.menu__item,y.isDanger&&jt["menu__item--danger"]),onClick:()=>{y.onSelect(),x()},children:[y.icon&&t.jsx("span",{className:jt.menu__icon,"aria-hidden":!0,children:y.icon}),y.label]},y.id))}),N.container)]})},gs=s.memo(L(bs,"Menu")),fs="hanui-popover-VxgiK",La={popover:fs,"popover--top":"hanui-popover--top-OUYwo","popover--bottom":"hanui-popover--bottom-Q1K4X","popover--left":"hanui-popover--left-9Rsjx","popover--right":"hanui-popover--right-0TJeo"},xs=({trigger:e,children:a,label:n,side:r="bottom",align:o="start",isOpen:c,onOpenChange:i,className:_,testId:h})=>{const d=s.useId(),l=s.useRef(null),p=s.useRef(null),u=s.useRef(null),[b,g]=s.useState(!1),j=c!==void 0,m=j?c:b,f=xt(l,p,{side:r,align:o,isOpen:m}),N=At(m,l,p),k=s.useCallback(C=>{j||g(C),i==null||i(C)},[j,i]);s.useEffect(()=>{if(!m)return;u.current=vt();const C=p.current;return C&&Vt(C),()=>{var w;(w=u.current)==null||w.call(u),u.current=null}},[m]);const x=s.useCallback(()=>k(!1),[k]);if(fa(m,x),s.useEffect(()=>{if(!m)return;const C=w=>{var T,y;const E=w.target;(T=p.current)!=null&&T.contains(E)||(y=l.current)!=null&&y.contains(E)||k(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[m,k]),!s.isValidElement(e))return null;const $=e.props,R=s.cloneElement(e,{ref:l,"aria-expanded":m,"aria-haspopup":"dialog","aria-controls":m?d:void 0,onClick:C=>{var w;(w=$.onClick)==null||w.call($,C),k(!m)}});return t.jsxs(t.Fragment,{children:[R,m&&N.container&&ot.createPortal(t.jsx("div",{ref:p,id:d,...N.attributes,role:"dialog","aria-label":n,className:v(La.popover,La[`popover--${f.side}`],_),style:{...f.style,...N.style,visibility:f.isPositioned?"visible":"hidden"},"data-testid":h,onBlur:C=>{var E;const w=C.relatedTarget;w&&(C.currentTarget.contains(w)||(E=l.current)!=null&&E.contains(w)||w.closest('[role="listbox"],[role="menu"],[role="dialog"]')||k(!1))},children:a}),N.container)]})},vs=s.memo(L(xs,"Popover")),ys="hanui-chip--NLgU",ws="hanui-chip__icon-IjjSb",js="hanui-chip__label-cT4hw",ks="hanui-chip__count-MBGO3",Me={chip:ys,chip__icon:ws,chip__label:js,chip__count:ks,"chip--sm":"hanui-chip--sm-60H-S","chip--md":"hanui-chip--md--yAlm","chip--iconOnly":"hanui-chip--iconOnly-5LT1h","chip--selected":"hanui-chip--selected-FdpCr"},Ns=s.forwardRef(({children:e,icon:a,endIcon:n,count:r,isSelected:o,size:c="md",label:i,href:_,linkProps:h,className:d,type:l="button",role:p,testId:u,...b},g)=>{const j=v(Me.chip,Me[`chip--${c}`],o&&Me["chip--selected"],!e&&Me["chip--iconOnly"],d),m=t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:Me.chip__icon,"aria-hidden":!0,children:a}),e&&t.jsx("span",{className:Me.chip__label,children:e}),z.isDefined(r)&&t.jsx("span",{className:Me.chip__count,children:r}),n&&t.jsx("span",{className:Me.chip__icon,"aria-hidden":!0,children:n})]});return _?t.jsx(ue,{href:_,className:j,"aria-label":e?void 0:i,"aria-current":o?"page":void 0,"data-testid":u,...h,children:m}):t.jsx("button",{ref:g,type:l,role:p,className:j,"aria-label":e?void 0:i,"data-testid":u,...p==="radio"?{"aria-checked":!!o}:{"aria-pressed":!!o},...b,children:m})}),Ja=s.memo(L(Ns,"Chip")),$s="hanui-group-0tnVf",Aa={group:$s,"group--scrollable":"hanui-group--scrollable-PMu6V"},Es=({options:e,label:a,size:n="md",isScrollable:r,className:o,...c})=>{var p;const i=s.useRef(null),_=u=>c.isMultiple?c.value.includes(u):c.value===u,h=u=>{if(c.isMultiple){const b=c.value.includes(u)?c.value.filter(g=>g!==u):[...c.value,u];c.onChange(b);return}c.onChange(c.value===u?null:u)},d=u=>{var f,N;if(c.isMultiple)return;const b=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(b===0)return;u.preventDefault();const g=e.filter(k=>!k.isDisabled);if(g.length===0)return;const j=g.findIndex(k=>k.value===c.value),m=g[(j+b+g.length)%g.length];c.onChange(m.value),(N=(f=i.current)==null?void 0:f.querySelector(`[data-chip-value="${m.value}"]`))==null||N.focus()},l=c.isMultiple?null:c.value??((p=e.find(u=>!u.isDisabled))==null?void 0:p.value)??null;return t.jsx("div",{ref:i,className:v(Aa.group,r&&Aa["group--scrollable"],o),role:c.isMultiple?"group":"radiogroup","aria-label":a,onKeyDown:d,children:e.map(u=>t.jsx(Ja,{size:n,icon:u.icon,count:u.count,isSelected:_(u.value),disabled:u.isDisabled,role:c.isMultiple?void 0:"radio",tabIndex:c.isMultiple||u.value===l?0:-1,"data-chip-value":u.value,onClick:()=>h(u.value),children:u.label},u.value))})},Is=s.memo(Es),Cs=(e,a,n,r)=>{const o=s.useRef(n);o.current=n,s.useEffect(()=>{if(!a||!o.current)return;const c=window.setTimeout(()=>{var i;return(i=o.current)==null?void 0:i.call(o,e.trim())},r);return()=>window.clearTimeout(c)},[e,a,r])};let Tt=0,Re=null;const Ts=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iP(hone|ad|od)/.test(e)?!0:/Macintosh/.test(e)&&navigator.maxTouchPoints>1},Rs=()=>{if(Tt+=1,Tt>1)return;const{body:e,style:a}={body:document.body,style:document.documentElement.style},n=window.scrollY;Re={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:n};const r=window.innerWidth-document.documentElement.clientWidth;r>0&&(e.style.paddingRight=`${r}px`),a.setProperty("scrollbar-gutter","stable"),e.style.overflow="hidden",Ts()&&(e.style.position="fixed",e.style.top=`${-n}px`,e.style.width="100%")},Ds=()=>{if(Tt=Math.max(0,Tt-1),Tt>0||!Re)return;const{body:e}=document,{scrollY:a}=Re;e.style.overflow=Re.overflow,e.style.position=Re.position,e.style.top=Re.top,e.style.width=Re.width,e.style.paddingRight=Re.paddingRight,document.documentElement.style.removeProperty("scrollbar-gutter"),Re=null,window.scrollTo(0,a)},Qt=(e=!0)=>{s.useEffect(()=>{if(e)return Rs(),Ds},[e])},Za="--hanui-sheet-height",en="--hanui-sheet-inset-bottom";let Ot=0,gt=0;const Ss=240,tn=()=>{const e=window.visualViewport;if(!e||e.height<Ss)return;const a=window.innerHeight-e.height-e.offsetTop,n=document.documentElement;n.style.setProperty(en,`${Math.max(0,Math.round(a))}px`),n.style.setProperty(Za,`${Math.round(e.height)}px`)},ct=()=>{gt||(gt=window.requestAnimationFrame(()=>{gt=0,tn()}))},Fa=()=>{gt&&(window.cancelAnimationFrame(gt),gt=0)},an=(e=!0)=>{s.useEffect(()=>{if(!e)return;const a=window.visualViewport;if(a)return Ot+=1,Ot===1&&(a.addEventListener("resize",ct),a.addEventListener("scroll",ct),window.addEventListener("orientationchange",ct)),Fa(),tn(),()=>{Ot-=1,!(Ot>0)&&(a.removeEventListener("resize",ct),a.removeEventListener("scroll",ct),window.removeEventListener("orientationchange",ct),Fa(),document.documentElement.style.removeProperty(en),document.documentElement.style.removeProperty(Za))}},[e])},Ls="hanui-sheet-GEvdE",As="hanui-sheet__header-NJgw-",Fs="hanui-sheet__title-f-b07",Ms="hanui-sheet__toolbar-eyhmW",Bs="hanui-sheet__body-eJ2KB",Ps="hanui-sheet__footer-NpsY5",Xe={sheet:Ls,sheet__header:As,sheet__title:Fs,sheet__toolbar:Ms,sheet__body:Bs,sheet__footer:Ps},Os=({title:e,closeLabel:a,onClose:n,children:r,toolbar:o,footer:c,closeAbove:i=Gt,className:_,testId:h})=>{const{labels:d}=O(),l=s.useId(),p=s.useRef(null);an(),Qt(),s.useEffect(()=>{const g=vt(),{token:j,pop:m}=St();return p.current=j,()=>{m(),p.current=null,g()}},[]),s.useEffect(()=>{const g=window.matchMedia(i),j=m=>{m.matches&&n()};return g.addEventListener("change",j),()=>g.removeEventListener("change",j)},[i,n]);const u=s.useCallback(g=>{!g||g.open||(g.showModal(),Vt(g,`.${Xe.sheet__header} button`),ga(g))},[]),b=s.useCallback(g=>{g.target===g.currentTarget&&n()},[n]);return z.isClient()?ot.createPortal(t.jsxs("dialog",{ref:u,className:v(Xe.sheet,_),"aria-labelledby":l,"data-testid":h,onCancel:g=>{g.preventDefault(),!(p.current&&!Lt(p.current))&&n()},onClick:b,children:[t.jsxs("header",{className:Xe.sheet__header,children:[t.jsx("h2",{id:l,className:Xe.sheet__title,children:e}),t.jsx(ke,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:P("BottomSheet.closeLabel",a,d==null?void 0:d.close),variant:"ghost",size:"sm",onClick:n})]}),o&&t.jsx("div",{className:Xe.sheet__toolbar,children:o}),t.jsx("div",{className:Xe.sheet__body,children:r}),c&&t.jsx("div",{className:Xe.sheet__footer,children:c})]}),document.body):null},xa=s.memo(Os),Hs=80,Ma=40,Ks=300,Us="hanui-combobox-NtZoV",zs="hanui-combobox__trigger-2riRR",Ys="hanui-combobox__chevron-g-QzQ",qs="hanui-combobox__leadingIcon-it2xz",Ws="hanui-combobox__value-acDlr",Xs="hanui-combobox__clear-EXOsc",Gs="hanui-combobox__panel-srBxl",Vs="hanui-combobox__search-THjer",Qs="hanui-combobox__searchIcon-vr4Bg",Js="hanui-combobox__searchInput-JPp5h",Zs="hanui-combobox__list-p-eCs",er="hanui-combobox__option-CLWh-",tr="hanui-combobox__optionText-Zm0D6",ar="hanui-combobox__optionLabel-WvT4W",nr="hanui-combobox__optionDescription-8OEzi",sr="hanui-combobox__check-MKlLz",rr="hanui-combobox__empty-mZwBq",or="hanui-combobox__srName-9PNXF",U={combobox:Us,combobox__trigger:zs,"combobox__trigger--empty":"hanui-combobox__trigger--empty-RxwCq","combobox__trigger--open":"hanui-combobox__trigger--open-rw1ZS","combobox__trigger--invalid":"hanui-combobox__trigger--invalid-iZgiN","combobox__trigger--clearable":"hanui-combobox__trigger--clearable-shq9I",combobox__chevron:Ys,combobox__leadingIcon:qs,combobox__value:Ws,combobox__clear:Xs,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:Gs,combobox__search:Vs,combobox__searchIcon:Qs,combobox__searchInput:Js,combobox__list:Zs,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:er,"combobox__option--active":"hanui-combobox__option--active--75Vq","combobox__option--selected":"hanui-combobox__option--selected-DVFGy","combobox__option--disabled":"hanui-combobox__option--disabled-e6VjI",combobox__optionText:tr,combobox__optionLabel:ar,combobox__optionDescription:nr,combobox__check:sr,combobox__empty:rr,combobox__srName:or},ir=({options:e,value:a,onChange:n,labels:r,isSearchHidden:o,onSearch:c,isLoading:i,isDisabled:_,isClearable:h,icon:d,id:l,required:p,className:u,testId:b,"aria-describedby":g,"aria-invalid":j})=>{const{labels:m}=O(),f={get search(){var A;return P("Combobox.searchPlaceholder",r.searchPlaceholder,(A=m==null?void 0:m.combobox)==null?void 0:A.searchPlaceholder)},get empty(){var A;return P("Combobox.emptyMessage",r.emptyMessage,(A=m==null?void 0:m.combobox)==null?void 0:A.emptyMessage)},get loading(){var A;return P("Combobox.loadingMessage",r.loadingMessage,(A=m==null?void 0:m.combobox)==null?void 0:A.loadingMessage)},get clear(){var A;return P("Combobox.clearLabel",r.clearLabel,(A=m==null?void 0:m.combobox)==null?void 0:A.clearLabel)}},N=s.useId(),k=l??N,x=`${k}-listbox`,$=s.useRef(null),R=s.useRef(null),C=s.useRef(null),w=s.useRef(null),[E,T]=s.useState(null),y=E!==null,[I,M]=s.useState(""),[Y,X]=s.useState(null),q=s.useMemo(()=>{if(c||I.trim()==="")return e;const A=I.trim();return e.filter(fe=>Dt(fe.label,A)||(fe.description?Dt(fe.description,A):!1))},[e,I,c]),V=e.find(A=>A.value===a)??null;s.useEffect(()=>{V?X(V.label):a===null&&X(null)},[V,a]);const _e=(V==null?void 0:V.label)??Y;Cs(I,y,c,Ks);const Ne=s.useCallback(()=>{T(null),M("")},[]),Se=s.useCallback(()=>{_||(T(window.matchMedia(Gt).matches?"popover":"sheet"),M(""))},[_]);s.useEffect(()=>{if(E!=="popover")return;const A=fe=>{var Mt,Fe;const he=fe.target;(Mt=$.current)!=null&&Mt.contains(he)||(Fe=C.current)!=null&&Fe.contains(he)||Ne()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[E,Ne]),s.useEffect(()=>{var A;E==="popover"&&((A=w.current)==null||A.focus({preventScroll:!0}))},[E]);const Ft=A=>{A.isDisabled||(X(A.label),n(A.value),Ne())},it=s.useRef(!1);s.useEffect(()=>{var A;it.current&&!y&&((A=R.current)==null||A.focus()),it.current=y},[y]);const yt=xt(R,C,{side:"bottom",align:"start",isOpen:y&&E==="popover"}),Ye=At(E==="popover",R,C),{activeIndex:Le,setActiveIndex:K,listRef:ae,handleKeyDown:be}=ma({count:q.length,isOpen:y,initialIndex:Math.max(e.findIndex(A=>A.value===a),0),onSelect:A=>{const fe=q[A];fe&&Ft(fe)},onClose:Ne}),Ae=q.some(A=>!!A.description),ge=E==="popover"&&!Ae&&q.length>Hs,{scrollRef:dn,range:qe,scrollToIndex:ja}=Ga(q.length,{rowHeight:Ma,isEnabled:ge});s.useEffect(()=>{ge&&ja(Le)},[Le,ge,ja]);const un=A=>{ae.current=A,dn.current=A},_n=be,hn=A=>{if(o){if(!y){["ArrowDown","ArrowUp","Enter"," "].includes(A.key)&&(A.preventDefault(),Se());return}be(A)}},pn=()=>{n(null),X(null)},ka=o?null:t.jsxs("div",{className:U.combobox__search,children:[t.jsx(D.Search,{"aria-hidden":!0,className:U.combobox__searchIcon}),t.jsx("input",{ref:w,type:"text",role:"combobox",className:U.combobox__searchInput,value:I,placeholder:f.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":x,"aria-activedescendant":q[Le]?`${k}-option-${Le}`:void 0,"aria-label":f.search,onChange:A=>{M(A.target.value),K(0)},onKeyDown:_n}),i&&t.jsx(ba,{size:"sm",label:""})]}),Na=A=>{const fe=q.slice(qe.start,qe.end);return t.jsxs("ul",{ref:un,id:x,role:"listbox",className:v(U.combobox__list,A&&U["combobox__list--sheet"]),children:[ge&&qe.offset>0&&t.jsx("li",{"aria-hidden":!0,style:{height:qe.offset}}),fe.map((he,Mt)=>{const Fe=qe.start+Mt,mn=Fe===Le,Jt=he.value===a;return t.jsxs("li",{id:`${k}-option-${Fe}`,role:"option","data-index":Fe,"aria-setsize":ge?q.length:void 0,"aria-posinset":ge?Fe+1:void 0,"aria-selected":Jt,"aria-disabled":he.isDisabled,className:v(U.combobox__option,mn&&U["combobox__option--active"],Jt&&U["combobox__option--selected"],he.isDisabled&&U["combobox__option--disabled"]),onMouseEnter:()=>K(Fe),onClick:()=>Ft(he),children:[t.jsxs("span",{className:U.combobox__optionText,children:[t.jsx("span",{className:U.combobox__optionLabel,children:he.label}),he.description&&t.jsx("span",{className:U.combobox__optionDescription,children:he.description})]}),Jt&&t.jsx(D.CheckLg,{"aria-hidden":!0,className:U.combobox__check})]},he.value)}),ge&&qe.end<q.length&&t.jsx("li",{"aria-hidden":!0,style:{height:(q.length-qe.end)*Ma}}),q.length===0&&t.jsx("li",{className:U.combobox__empty,children:i?f.loading:f.empty})]})};return t.jsxs("div",{ref:$,className:v(U.combobox,u),"data-testid":b,children:[t.jsxs("button",{ref:R,id:k,type:"button",className:v(U.combobox__trigger,!_e&&U["combobox__trigger--empty"],y&&U["combobox__trigger--open"],j&&U["combobox__trigger--invalid"],h&&_e&&!_&&U["combobox__trigger--clearable"]),disabled:_,"aria-haspopup":"listbox","aria-expanded":y,"aria-controls":y?x:void 0,"aria-labelledby":_e?`${k}-name ${k}-value`:`${k}-name`,"aria-describedby":g,"aria-required":p||void 0,onClick:()=>y?Ne():Se(),onKeyDown:hn,children:[d&&t.jsx("span",{className:U.combobox__leadingIcon,"aria-hidden":!0,children:d}),t.jsx("span",{id:`${k}-name`,className:U.combobox__srName,children:r.placeholder}),t.jsx("span",{id:`${k}-value`,className:U.combobox__value,children:_e??r.placeholder}),t.jsx(D.CaretDownFill,{"aria-hidden":!0,className:v(U.combobox__chevron,y&&U["combobox__chevron--open"])})]}),h&&_e&&!_&&t.jsx("button",{type:"button",className:U.combobox__clear,"aria-label":f.clear,onClick:pn,children:t.jsx(D.XLg,{"aria-hidden":!0})}),E==="popover"&&Ye.container&&ot.createPortal(t.jsxs("div",{ref:C,className:U.combobox__panel,...Ye.attributes,style:{...yt.style,...Ye.style,width:yt.anchorWidth||void 0,visibility:yt.isPositioned?void 0:"hidden"},children:[ka,Na(!1)]}),Ye.container),E==="sheet"&&t.jsx(xa,{title:r.placeholder,closeLabel:r.closeLabel??(m==null?void 0:m.close),onClose:Ne,toolbar:ka??void 0,children:Na(!0)})]})},cr=s.memo(ir),lr="hanui-segmented-qo2Bw",dr="hanui-segmented__item-mqRNZ",ur="hanui-segmented__icon-C9CT-",_r="hanui-segmented__label-NVXBv",lt={segmented:lr,"segmented--sm":"hanui-segmented--sm-7tUry","segmented--md":"hanui-segmented--md-PiSqt",segmented__item:dr,"segmented__item--selected":"hanui-segmented__item--selected-r7CLj",segmented__icon:ur,segmented__label:_r},hr=({options:e,value:a,onChange:n,label:r,isIconOnly:o,size:c="md",className:i,testId:_})=>{const h=s.useRef(null),d=l=>{var j,m;const p=l.key==="ArrowRight"||l.key==="ArrowDown"?1:l.key==="ArrowLeft"||l.key==="ArrowUp"?-1:0;if(p===0)return;l.preventDefault();const u=e.filter(f=>!f.isDisabled);if(u.length===0)return;const b=u.findIndex(f=>f.value===a),g=u[(b+p+u.length)%u.length];n(g.value),(m=(j=h.current)==null?void 0:j.querySelector(`[data-value="${g.value}"]`))==null||m.focus({preventScroll:!0})};return t.jsx("div",{ref:h,role:"radiogroup","aria-label":r,className:v(lt.segmented,lt[`segmented--${c}`],i),"data-testid":_,onKeyDown:d,children:e.map(l=>{const p=l.value===a;return t.jsxs("button",{type:"button",role:"radio","aria-checked":p,"aria-label":o?l.label:void 0,"data-value":l.value,disabled:l.isDisabled,tabIndex:p?0:-1,className:v(lt.segmented__item,p&&lt["segmented__item--selected"]),onClick:()=>!p&&n(l.value),children:[l.icon&&t.jsx("span",{className:lt.segmented__icon,"aria-hidden":!0,children:l.icon}),!o&&t.jsx("span",{className:lt.segmented__label,children:l.label})]},l.value)})})},pr=s.memo(L(hr,"SegmentedControl")),mr="hanui-select-tiiPL",br="hanui-trigger-rHQJz",gr="hanui-trigger__icon-apCcx",fr="hanui-trigger__srName-XLCxt",xr="hanui-trigger__value-ioH7K",vr="hanui-trigger__chevron-FtsIZ",yr="hanui-panel-rGOOd",wr="hanui-list-SOKf8",jr="hanui-option-ZDPef",kr="hanui-option__label-SsoYB",Nr="hanui-option__check-8CPSG",W={select:mr,trigger:br,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--invalid":"hanui-trigger--invalid-NtP0W","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:gr,trigger__srName:fr,trigger__value:xr,trigger__chevron:vr,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:yr,list:wr,"list--sheet":"hanui-list--sheet-BIjCb",option:jr,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:kr,option__check:Nr},$r=({options:e,value:a,onChange:n,label:r,placeholder:o,closeLabel:c,icon:i,size:_="md",align:h="start",isDisabled:d,id:l,className:p,testId:u,required:b,"aria-describedby":g,"aria-invalid":j})=>{const{labels:m}=O(),f=P("Select.placeholder",o,m==null?void 0:m.selectPlaceholder),N=s.useId(),k=l??N,x=`${k}-listbox`,$=K=>`${k}-option-${K}`,R=s.useRef(null),C=s.useRef(null),w=s.useRef(null),[E,T]=s.useState(null),y=xt(C,w,{side:"bottom",align:h,isOpen:E==="popover"}),I=At(E==="popover",C,w),M=E!==null,Y=e.findIndex(K=>K.value===a),X=Y>=0?e[Y]:null,q=s.useCallback(()=>T(null),[]),V=s.useCallback(()=>{d||e.length===0||T(window.matchMedia(Gt).matches?"popover":"sheet")},[d,e.length]),_e=K=>{K.isDisabled||(n(K.value),q())},Ne=s.useRef(!1);s.useEffect(()=>{var K;Ne.current&&!M&&((K=C.current)==null||K.focus()),Ne.current=M},[M]),s.useEffect(()=>{if(E!=="popover")return;const K=ae=>{var Ae,ge;const be=ae.target;(Ae=R.current)!=null&&Ae.contains(be)||(ge=w.current)!=null&&ge.contains(be)||q()};return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[E,q]);const{activeIndex:Se,setActiveIndex:Ft,listRef:it,handleKeyDown:yt}=ma({count:e.length,isOpen:M,initialIndex:Y>=0?Y:0,onSelect:K=>{const ae=e[K];ae&&_e(ae)},onClose:q});s.useEffect(()=>{var K;E==="sheet"&&((K=it.current)==null||K.focus({preventScroll:!0}))},[E,it]);const Ye=K=>{if(!M){["ArrowDown","ArrowUp","Enter"," "].includes(K.key)&&(K.preventDefault(),V());return}yt(K)},Le=K=>t.jsx("ul",{ref:it,id:x,role:"listbox","aria-label":r,"aria-activedescendant":K&&e[Se]?$(Se):void 0,tabIndex:K?0:-1,className:v(W.list,K&&W["list--sheet"]),onKeyDown:K?Ye:void 0,children:e.map((ae,be)=>{const Ae=ae.value===a;return t.jsxs("li",{id:$(be),role:"option","data-index":be,"aria-selected":Ae,"aria-disabled":ae.isDisabled,className:v(W.option,be===Se&&W["option--active"],Ae&&W["option--selected"],ae.isDisabled&&W["option--disabled"]),onMouseEnter:()=>Ft(be),onClick:()=>_e(ae),children:[t.jsx("span",{className:W.option__label,children:ae.label}),Ae&&t.jsx(D.CheckLg,{"aria-hidden":!0,className:W.option__check})]},ae.value)})});return t.jsxs("span",{ref:R,className:v(W.select,p),"data-testid":u,children:[t.jsxs("button",{ref:C,id:k,type:"button",role:"combobox",className:v(W.trigger,W[`trigger--${_}`],!X&&W["trigger--empty"],M&&W["trigger--open"],j&&W["trigger--invalid"]),disabled:d,"aria-haspopup":"listbox","aria-expanded":M,"aria-controls":M?x:void 0,"aria-activedescendant":E==="popover"&&e[Se]?$(Se):void 0,"aria-labelledby":X?`${k}-name ${k}-value`:`${k}-name`,"aria-describedby":g,"aria-invalid":j,"aria-required":b||void 0,onClick:()=>M?q():V(),onKeyDown:Ye,children:[i&&t.jsx("span",{className:W.trigger__icon,"aria-hidden":!0,children:i}),t.jsx("span",{id:`${k}-name`,className:W.trigger__srName,children:r}),t.jsx("span",{id:`${k}-value`,className:W.trigger__value,children:(X==null?void 0:X.label)??f}),t.jsx(D.CaretDownFill,{"aria-hidden":!0,className:v(W.trigger__chevron,M&&W["trigger__chevron--open"])})]}),E==="popover"&&I.container&&ot.createPortal(t.jsx("div",{ref:w,className:W.panel,...I.attributes,style:{...y.style,...I.style,minWidth:y.anchorWidth||void 0,visibility:y.isPositioned?void 0:"hidden"},children:Le(!1)}),I.container),E==="sheet"&&t.jsx(xa,{title:r,closeLabel:c??(m==null?void 0:m.close),onClose:q,children:Le(!0)})]})},Er=s.memo($r),Ir="hanui-checkbox-FaFCj",Cr="hanui-checkbox__input-nTHne",Tr="hanui-checkbox__body-VAEW2",Rr="hanui-checkbox__label-sSNZY",Dr="hanui-checkbox__hint-ish-J",kt={checkbox:Ir,checkbox__input:Cr,checkbox__body:Tr,checkbox__label:Rr,checkbox__hint:Dr},Sr=s.forwardRef(({label:e,hint:a,className:n,id:r,testId:o,...c},i)=>{const _=s.useId(),h=r??_,d=`${h}-label`,l=`${h}-hint`;return t.jsxs("label",{className:v(kt.checkbox,n),"data-testid":o,children:[t.jsx("input",{ref:i,type:"checkbox",id:h,className:kt.checkbox__input,"aria-labelledby":d,"aria-describedby":a?l:c["aria-describedby"],...c}),t.jsxs("span",{className:kt.checkbox__body,children:[t.jsx("span",{id:d,className:kt.checkbox__label,children:e}),a&&t.jsx("span",{id:l,className:kt.checkbox__hint,children:a})]})]})}),Lr=s.memo(L(Sr,"Checkbox")),Ar="hanui-switch__input-Q2UQ4",Fr="hanui-switch__label-gPZuO",Mr="hanui-switch__hint-NRuzC",Br="hanui-switch__track-3417m",Pr="hanui-switch__thumb-1LHta",Or="hanui-switch__text-32uMY",Be={switch:"hanui-switch-KLH29",switch__input:Ar,"switch--labelFirst":"hanui-switch--labelFirst-Grirk",switch__label:Fr,switch__hint:Mr,switch__track:Br,switch__thumb:Pr,switch__text:Or},Hr=s.forwardRef(({label:e,hint:a,isLabelFirst:n,className:r,id:o,testId:c,...i},_)=>{const h=s.useId(),d=o??h,l=`${d}-label`,p=`${d}-hint`;return t.jsxs("label",{className:v(Be.switch,n&&Be["switch--labelFirst"],r),"data-testid":c,children:[t.jsx("input",{ref:_,type:"checkbox",role:"switch",id:d,className:Be.switch__input,"aria-labelledby":l,"aria-describedby":a?p:i["aria-describedby"],...i}),t.jsx("span",{className:Be.switch__track,"aria-hidden":!0,children:t.jsx("span",{className:Be.switch__thumb})}),t.jsxs("span",{className:Be.switch__text,children:[t.jsx("span",{id:l,className:Be.switch__label,children:e}),a&&t.jsx("span",{id:p,className:Be.switch__hint,children:a})]})]})}),Kr=s.memo(L(Hr,"Switch")),Ur="hanui-radio-KoZak",zr="hanui-radio__input-gVMgh",Yr="hanui-radio__body-oZWg6",qr="hanui-radio__label-d-5ce",Wr="hanui-radio__hint-baVbs",Xr="hanui-radio__count-OtkUM",dt={radio:Ur,radio__input:zr,radio__body:Yr,radio__label:qr,radio__hint:Wr,radio__count:Xr},Gr=s.forwardRef(({label:e,hint:a,count:n,className:r,id:o,testId:c,...i},_)=>{const h=s.useId(),d=o??h,l=`${d}-label`,p=`${d}-hint`,u=`${d}-count`;return t.jsxs("label",{className:v(dt.radio,r),"data-testid":c,children:[t.jsx("input",{ref:_,type:"radio",id:d,className:dt.radio__input,"aria-labelledby":[l,z.isDefined(n)?u:null].filter(Boolean).join(" "),"aria-describedby":a?p:i["aria-describedby"],...i}),t.jsxs("span",{className:dt.radio__body,children:[t.jsx("span",{id:l,className:dt.radio__label,children:e}),a&&t.jsx("span",{id:p,className:dt.radio__hint,children:a})]}),z.isDefined(n)&&t.jsx("span",{id:u,className:dt.radio__count,children:n})]})}),Vr=s.memo(L(Gr,"Radio")),Qr="hanui-radioCard-sndiC",Jr="hanui-radioCard__input-6vuoD",Zr="hanui-radioCard__indicator--x9LT",eo="hanui-radioCard__body-CFqoi",ut={radioCard:Qr,radioCard__input:Jr,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:Zr,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:eo},to=({name:e,value:a,isSelected:n,isDisabled:r,onChange:o,children:c,className:i,id:_,testId:h})=>t.jsxs("label",{className:v(ut.radioCard,n&&ut["radioCard--selected"],r&&ut["radioCard--disabled"],i),"data-testid":h,children:[t.jsx("input",{type:"radio",id:_,name:e,value:a,checked:n,disabled:r,onChange:()=>o(a),className:ut.radioCard__input}),t.jsx("span",{className:ut.radioCard__indicator,"aria-hidden":!0}),t.jsx("span",{className:ut.radioCard__body,children:c})]}),ao=s.memo(to),no="hanui-range-RpDPh",so="hanui-range__readout-itDMd",ro="hanui-range__separator-u-ZJX",oo="hanui-range__track-bCh5Y",io="hanui-range__fill-VXMCE",co="hanui-range__input-TAN2I",lo="hanui-range__bounds-GIhFd",pe={range:no,"range--disabled":"hanui-range--disabled-13hlc",range__readout:so,range__separator:ro,range__track:oo,range__fill:io,range__input:co,range__bounds:lo},uo=({min:e,max:a,step:n=1,value:r,onChange:o,onCommit:c,formatValue:i=String,label:_,minLabel:h,maxLabel:d,isDisabled:l,className:p,testId:u})=>{var E,T;const{labels:b}=O(),g=P("RangeSlider.minLabel",h,(E=b==null?void 0:b.range)==null?void 0:E.min),j=P("RangeSlider.maxLabel",d,(T=b==null?void 0:b.range)==null?void 0:T.max),[m,f]=r,N=s.useCallback(y=>o([Math.min(y,f),f]),[f,o]),k=s.useCallback(y=>o([m,Math.max(y,m)]),[m,o]),x=s.useCallback(()=>c==null?void 0:c([m,f]),[m,f,c]),$=a-e,R=$===0?0:z.normalize(m-e,$),C=$===0?0:z.normalize(f-e,$),w=R>50;return t.jsxs("div",{className:v(pe.range,l&&pe["range--disabled"],p),role:"group","aria-label":_,"data-testid":u,children:[t.jsxs("div",{className:pe.range__readout,children:[t.jsx("span",{className:pe.range__value,children:i(m)}),t.jsx("span",{className:pe.range__separator,"aria-hidden":!0,children:"—"}),t.jsx("span",{className:pe.range__value,children:i(f)})]}),t.jsxs("div",{className:pe.range__track,children:[t.jsx("span",{className:pe.range__fill,style:{left:`${R}%`,right:`${100-C}%`},"aria-hidden":!0}),t.jsx("input",{type:"range",className:pe.range__input,style:{zIndex:w?4:3},min:e,max:a,step:n,value:m,disabled:l,"aria-label":`${_} — ${g}`,"aria-valuetext":i(m),onChange:y=>N(Number(y.target.value)),onPointerUp:x,onKeyUp:x}),t.jsx("input",{type:"range",className:pe.range__input,style:{zIndex:w?3:4},min:e,max:a,step:n,value:f,disabled:l,"aria-label":`${_} — ${j}`,"aria-valuetext":i(f),onChange:y=>k(Number(y.target.value)),onPointerUp:x,onKeyUp:x})]}),t.jsxs("div",{className:pe.range__bounds,"aria-hidden":!0,children:[t.jsx("span",{children:i(e)}),t.jsx("span",{children:i(a)})]})]})},_o=s.memo(uo),ho="hanui-rating-neNnF",po="hanui-rating__legend-uYvFS",mo="hanui-rating__stars-vJFLk",bo="hanui-rating__star-BANFJ",go="hanui-rating__input-s2iiO",fo="hanui-rating__srOnly-iSCoz",xo="hanui-rating__caption-13KFX",Ee={rating:ho,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:po,rating__stars:mo,rating__star:bo,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:go,rating__srOnly:fo,rating__caption:xo},vo=[1,2,3,4,5],yo=({value:e,onChange:a,label:n,ratingLabels:r,formatStarCount:o,isDisabled:c,className:i,testId:_})=>{var g;const{labels:h}=O(),d=r??((g=h==null?void 0:h.rating)==null?void 0:g.scale),l=s.useId(),[p,u]=s.useState(null),b=p??e;return t.jsxs("fieldset",{className:v(Ee.rating,c&&Ee["rating--disabled"],i),disabled:c,"data-testid":_,children:[t.jsx("legend",{className:Ee.rating__legend,children:n}),t.jsx("div",{className:Ee.rating__stars,onMouseLeave:()=>u(null),children:vo.map(j=>{var m;return t.jsxs("label",{className:v(Ee.rating__star,b!==null&&j<=b&&Ee["rating__star--filled"]),onMouseEnter:()=>u(j),children:[t.jsx("input",{type:"radio",name:l,value:j,checked:e===j,onChange:()=>a(j),className:Ee.rating__input}),t.jsx(D.StarFill,{"aria-hidden":!0}),t.jsxs("span",{className:Ee.rating__srOnly,children:[me("RatingInput.formatStarCount",o??((m=h==null?void 0:h.rating)==null?void 0:m.starCount),j)," ","— ",(d==null?void 0:d[j])??""]})]},j)})}),b!==null&&t.jsx("span",{className:Ee.rating__caption,"aria-hidden":!0,children:(d==null?void 0:d[b])??""})]})},wo=s.memo(yo),jo="hanui-stepper-8s5Ih",ko="hanui-stepper__button-h6g7d",No="hanui-stepper__input-OQh5v",Nt={stepper:jo,stepper__button:ko,stepper__input:No,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},$o=({value:e,onChange:a,label:n,decreaseLabel:r,increaseLabel:o,min:c=1,max:i=99,isDisabled:_,size:h="md",className:d,testId:l})=>{var f,N,k;const{labels:p}=O(),u=P("QuantityStepper.label",n,(f=p==null?void 0:p.quantity)==null?void 0:f.label),[b,g]=s.useState(null),j=x=>Math.min(Math.max(x,c),i),m=x=>{g(null);const $=x.replace(/\D/g,"");$!==""&&a(j(Number($)))};return t.jsxs("div",{className:v(Nt.stepper,Nt[`stepper--${h}`],d),role:"group","aria-label":u,"data-testid":l,children:[t.jsx("button",{type:"button",className:Nt.stepper__button,onClick:()=>a(Math.max(e-1,c)),disabled:_||e<=c,"aria-label":P("QuantityStepper.decreaseLabel",r,(N=p==null?void 0:p.quantity)==null?void 0:N.decrease),children:t.jsx(D.DashLg,{"aria-hidden":!0})}),t.jsx("input",{className:Nt.stepper__input,value:b??String(e),onChange:x=>g(x.target.value.replace(/\D/g,"").slice(0,2)),onBlur:x=>m(x.target.value),onKeyDown:x=>{const $=x.key==="ArrowUp"?1:x.key==="ArrowDown"?-1:0;if($!==0){x.preventDefault(),g(null),a(j(e+$));return}const R=x.key==="PageUp"?10:x.key==="PageDown"?-10:0;if(R!==0){x.preventDefault(),g(null),a(j(e+R));return}if(x.key==="Home"||x.key==="End"){x.preventDefault(),g(null),a(x.key==="Home"?c:i);return}x.key==="Enter"&&(x.preventDefault(),m(x.target.value))},inputMode:"numeric",disabled:_,role:"spinbutton","aria-valuenow":e,"aria-valuemin":c,"aria-valuemax":i,"aria-label":u}),t.jsx("button",{type:"button",className:Nt.stepper__button,onClick:()=>a(Math.min(e+1,i)),disabled:_||e>=i,"aria-label":P("QuantityStepper.increaseLabel",o,(k=p==null?void 0:p.quantity)==null?void 0:k.increase),children:t.jsx(D.PlusLg,{"aria-hidden":!0})})]})},Eo=s.memo($o),Io="hanui-checkbox--dvpB",Co={checkbox:Io},To=s.forwardRef(({label:e,isIndeterminate:a=!1,className:n,testId:r,...o},c)=>{const i=s.useRef(null);return s.useImperativeHandle(c,()=>i.current,[]),s.useEffect(()=>{i.current&&(i.current.indeterminate=a)},[a]),t.jsx("input",{ref:i,type:"checkbox","aria-label":e,"aria-checked":a?"mixed":void 0,className:v(Co.checkbox,n),"data-testid":r,...o})}),Ro=s.memo(L(To,"TableCheckbox")),Do="hanui-wrapper-IAI4E",So="hanui-wrapper__prefix-XKDlV",Lo="hanui-wrapper__suffix-lT35q",Ao="hanui-input-pIS2u",Ge={wrapper:Do,wrapper__prefix:So,wrapper__suffix:Lo,input:Ao,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Fo=s.forwardRef(({prefix:e,suffix:a,isTechnical:n,className:r,testId:o,...c},i)=>t.jsxs("span",{className:v(Ge.wrapper,r),children:[e&&t.jsx("span",{className:Ge.wrapper__prefix,"aria-hidden":!0,children:e}),t.jsx("input",{ref:i,className:v(Ge.input,!!e&&Ge["input--hasPrefix"],!!a&&Ge["input--hasSuffix"],n&&Ge["input--technical"]),"data-testid":o,...c}),a&&t.jsx("span",{className:Ge.wrapper__suffix,"aria-hidden":!0,children:a})]})),va=s.memo(L(Fo,"Input")),Mo="hanui-password-viMea",Bo="hanui-password__field-WI1h1",Po="hanui-password__toggle-O6R2a",na={password:Mo,password__field:Bo,password__toggle:Po},Oo=({className:e,showLabel:a,hideLabel:n,...r})=>{const{labels:o}=O(),[c,i]=s.useState(!1),_=c?P("PasswordInput.hideLabel",n,o==null?void 0:o.passwordHide):P("PasswordInput.showLabel",a,o==null?void 0:o.passwordShow);return t.jsxs("span",{className:na.password,children:[t.jsx(va,{...r,className:`${na.password__field} ${e??""}`.trim(),type:c?"text":"password"}),t.jsx(ke,{className:na.password__toggle,icon:c?t.jsx(D.EyeSlashFill,{"aria-hidden":!0}):t.jsx(D.EyeFill,{"aria-hidden":!0}),label:_,variant:"ghost",size:"sm",onClick:()=>i(h=>!h)})]})},Ho=s.memo(L(Oo,"PasswordInput")),Ko="hanui-tagInput-QraZR",Uo="hanui-tagInput__field-HeWrC",zo="hanui-tagInput__tag-D-ZWB",Yo="hanui-tagInput__remove-bpjGG",Ve={tagInput:Ko,tagInput__field:Uo,"tagInput--invalid":"hanui-tagInput--invalid-NQogL","tagInput--disabled":"hanui-tagInput--disabled--AJFF",tagInput__tag:zo,"tagInput__tag--duplicate":"hanui-tagInput__tag--duplicate-3-FMF",tagInput__remove:Yo},qo=({values:e,onChange:a,label:n,placeholder:r,removeLabel:o,separators:c=["Enter",","],maxTags:i,isDisabled:_,id:h,required:d,className:l,testId:p,"aria-describedby":u,"aria-invalid":b})=>{const g=s.useId(),j=h??g,m=s.useRef(null),f=s.useRef(0);s.useEffect(()=>()=>{f.current&&window.clearTimeout(f.current)},[]);const{labels:N}=O(),k=Xt(),[x,$]=s.useState(""),[R,C]=s.useState(null),w=i!==void 0&&e.length>=i,E=I=>{var Y;const M=I.trim();if(M!==""){if(e.includes(M)){C(M),f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>C(null),1e3),k(`${M} zaten ekli`,"assertive"),$("");return}w||(a([...e,M]),$(""),k(me("TagInput.added",(Y=N==null?void 0:N.tagInput)==null?void 0:Y.added,M)))}},T=I=>{var M;a(e.filter(Y=>Y!==I)),k(me("TagInput.removed",(M=N==null?void 0:N.tagInput)==null?void 0:M.removed,I))},y=I=>{if(c.includes(I.key)){I.preventDefault(),E(x);return}if(I.key==="Backspace"&&x===""){const M=e.at(-1);M!==void 0&&T(M)}};return t.jsxs("div",{className:v(Ve.tagInput,_&&Ve["tagInput--disabled"],b&&Ve["tagInput--invalid"],l),"data-testid":p,onClick:()=>{var I;return(I=m.current)==null?void 0:I.focus()},children:[e.map(I=>t.jsxs("span",{className:v(Ve.tagInput__tag,R===I&&Ve["tagInput__tag--duplicate"]),children:[I,t.jsx("button",{type:"button",className:Ve.tagInput__remove,"aria-label":`${I} — ${o}`,disabled:_,onClick:M=>{M.stopPropagation(),T(I)},children:t.jsx(D.XLg,{"aria-hidden":!0})})]},I)),t.jsx("input",{ref:m,id:j,type:"text",className:Ve.tagInput__field,value:x,placeholder:e.length===0?r:void 0,"aria-label":n,"aria-describedby":u,"aria-invalid":b,"aria-required":d||void 0,disabled:_||w,onChange:I=>$(I.target.value),onKeyDown:y,onBlur:()=>E(x)})]})},Wo=s.memo(L(qo,"TagInput")),Xo="hanui-textarea-zwJcB",Go="hanui-wrapper-O8aJA",Vo="hanui-counter-bHVh3",$t={textarea:Xo,wrapper:Go,"textarea--autoSize":"hanui-textarea--autoSize--F8yj",counter:Vo,"counter--near":"hanui-counter--near-AZAQm"},Qo=s.forwardRef(({className:e,rows:a=4,isAutoSize:n,maxRows:r=12,hasCounter:o,maxLength:c,value:i,defaultValue:_,onChange:h,testId:d,...l},p)=>{const u=s.useRef(null),[b,g]=s.useState(String(_??"").length),j=i===void 0?b:String(i).length,m=s.useCallback(N=>{u.current=N,typeof p=="function"?p(N):p&&(p.current=N)},[p]);s.useLayoutEffect(()=>{const N=u.current;if(!n||!N)return;N.style.height="auto";const x=(Number.parseFloat(getComputedStyle(N).lineHeight)||20)*r;N.style.height=`${Math.min(N.scrollHeight,x)}px`,N.style.overflowY=N.scrollHeight>x?"auto":"hidden"},[n,r,i,j]);const f=c!==void 0&&j>=c*.9;return t.jsxs("div",{className:v($t.wrapper,e),"data-testid":d,children:[t.jsx("textarea",{ref:m,rows:a,className:v($t.textarea,n&&$t["textarea--autoSize"]),maxLength:c,value:i,defaultValue:_,onChange:N=>{g(N.target.value.length),h==null||h(N)},...l}),o&&c!==void 0&&t.jsxs("span",{className:v($t.counter,f&&$t["counter--near"]),"aria-hidden":!0,children:[j," / ",c]})]})}),nn=s.memo(L(Qo,"Textarea")),Jo="hanui-dateField-UnUwe",Zo="hanui-range-nGuRH",ei="hanui-range__row--debA",ti="hanui-range__separator-fEqqr",ai="hanui-range__field-tmoNH",ni="hanui-range__summary-L6v1T",at={dateField:Jo,range:Zo,range__row:ei,range__separator:ti,range__field:ai,range__summary:ni},ca=s.forwardRef(({type:e="date",className:a,testId:n,...r},o)=>t.jsx("input",{ref:o,type:e,className:v(at.dateField,a),"data-testid":n,...r})),si=s.memo(L(ca,"DateField")),ri=({value:e,onChange:a,startLabel:n,endLabel:r,separator:o="–",min:c,max:i,isSummaryVisible:_,isDisabled:h,className:d,testId:l})=>{const{labels:p}=O(),u=(()=>{if(!_||!(p!=null&&p.locale)||e.start===""||e.end==="")return null;try{const b=new Intl.DateTimeFormat(p.locale,{dateStyle:"medium"});return`${b.format(new Date(e.start))} ${o} ${b.format(new Date(e.end))}`}catch{return null}})();return t.jsxs("div",{className:v(at.range,d),"data-testid":l,children:[t.jsxs("div",{className:at.range__row,children:[t.jsx(ca,{className:at.range__field,"aria-label":n,value:e.start,min:c,max:e.end||i,disabled:h,onChange:b=>a({...e,start:b.target.value})}),t.jsx("span",{className:at.range__separator,"aria-hidden":!0,children:o}),t.jsx(ca,{className:at.range__field,"aria-label":r,value:e.end,min:e.start||c,max:i,disabled:h,onChange:b=>a({...e,end:b.target.value})})]}),u&&t.jsx("span",{className:at.range__summary,children:u})]})},oi=L(s.memo(ri),"DateRange"),ii="hanui-field-KKvre",ci="hanui-field__label-9dlYd",li="hanui-field__required-hbDJk",di="hanui-field__srOnly-2WQFH",ui="hanui-field__hint-SQPiL",_i="hanui-field__error-gLlZ-",hi="hanui-field__errorIcon-uA3o8",Pe={field:ii,field__label:ci,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:li,field__srOnly:di,field__hint:ui,field__error:_i,field__errorIcon:hi},pi=({label:e,children:a,hint:n,error:r,isRequired:o,requiredLabel:c,isLabelHidden:i,className:_})=>{const{labels:h}=O(),d=s.useId(),l=`${d}-error`,p=`${d}-hint`;return t.jsxs("div",{className:v(Pe.field,_),children:[t.jsxs("label",{htmlFor:d,className:v(Pe.field__label,i&&Pe["field__label--hidden"]),children:[e,o&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:Pe.field__required,"aria-hidden":!0,children:"*"}),t.jsx("span",{className:Pe.field__srOnly,children:P("Field.requiredLabel",c,h==null?void 0:h.required)})]})]}),a({id:d,required:o||void 0,"aria-invalid":r?!0:void 0,"aria-describedby":[r&&l,n&&p].filter(Boolean).join(" ")||void 0}),r&&t.jsxs("p",{id:l,className:Pe.field__error,role:"alert",children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0,className:Pe.field__errorIcon}),r]}),n&&t.jsx("p",{id:p,className:Pe.field__hint,children:n})]})},sn=s.memo(pi),mi="hanui-progress-99MrX",bi="hanui-progress__track-Qbp9t",gi="hanui-progress__fill-Bam55",fi="hanui-progress__value-3FYxj",xi="hanui-circle-9cn2w",vi="hanui-circle__svg-0IwkR",yi="hanui-circle__track-zY2qc",wi="hanui-circle__fill-Jbde6",ji="hanui-circle__label-A3nJB",te={progress:mi,progress__track:bi,"progress__track--sm":"hanui-progress__track--sm-dbHZq","progress__track--md":"hanui-progress__track--md-v1GdW","progress__track--indeterminate":"hanui-progress__track--indeterminate-8fMxl",progress__fill:gi,"progress__fill--success":"hanui-progress__fill--success-IFuI5","progress__fill--warning":"hanui-progress__fill--warning-wIhgi","progress__fill--danger":"hanui-progress__fill--danger-cuqj0",progress__value:fi,circle:xi,circle__svg:vi,circle__track:yi,circle__fill:wi,"circle__fill--success":"hanui-circle__fill--success-HTr0m","circle__fill--warning":"hanui-circle__fill--warning-Fkgj2","circle__fill--danger":"hanui-circle__fill--danger-4E3Z8","circle--indeterminate":"hanui-circle--indeterminate-cITY6",circle__label:ji},rn=(e,a)=>!Number.isFinite(e)||!Number.isFinite(a)||a<=0?0:Math.min(100,Math.max(0,e/a*100)),ki=({value:e,max:a=100,label:n,valueText:r,isValueVisible:o,tone:c="brand",size:i="md",className:_,testId:h})=>{const d=e===void 0,l=d?0:rn(e,a);return t.jsxs("div",{className:v(te.progress,_),"data-testid":h,children:[t.jsx("div",{role:"progressbar","aria-label":n,"aria-valuenow":d?void 0:Math.round(l),"aria-valuemin":d?void 0:0,"aria-valuemax":d?void 0:100,"aria-valuetext":d?void 0:r,className:v(te.progress__track,te[`progress__track--${i}`],d&&te["progress__track--indeterminate"]),children:t.jsx("span",{className:v(te.progress__fill,te[`progress__fill--${c}`]),style:d?void 0:{inlineSize:`${l}%`}})}),o&&!d&&t.jsx("span",{className:te.progress__value,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},on=s.memo(L(ki,"Progress")),Ni=({value:e,max:a=100,label:n,valueText:r,isValueVisible:o,tone:c="brand",size:i=44,className:_,testId:h})=>{const d=e===void 0,l=d?25:rn(e,a),p=Math.max(3,Math.round(i*.1)),u=(i-p)/2,b=2*Math.PI*u;return t.jsxs("div",{className:v(te.circle,d&&te["circle--indeterminate"],_),style:{width:i,height:i},"data-testid":h,children:[t.jsxs("svg",{className:te.circle__svg,width:i,height:i,viewBox:`0 0 ${i} ${i}`,role:"progressbar","aria-label":n,"aria-valuenow":d?void 0:Math.round(l),"aria-valuemin":d?void 0:0,"aria-valuemax":d?void 0:100,"aria-valuetext":d?void 0:r,children:[t.jsx("circle",{className:te.circle__track,cx:i/2,cy:i/2,r:u,fill:"none",strokeWidth:p}),t.jsx("circle",{className:v(te.circle__fill,te[`circle__fill--${c}`]),cx:i/2,cy:i/2,r:u,fill:"none",strokeWidth:p,strokeDasharray:b,strokeDashoffset:b*(1-l/100)})]}),o&&!d&&t.jsx("span",{className:te.circle__label,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},$i=L(s.memo(Ni),"ProgressCircle"),Ei="hanui-upload-v1pRY",Ii="hanui-upload__drop-OpNbO",Ci="hanui-upload__input-Tcg9-",Ti="hanui-upload__icon-KpMkq",Ri="hanui-upload__label-M4HJb",Di="hanui-upload__drag-ewSQw",Si="hanui-upload__hint-MZRJ6",Li="hanui-upload__error-7GkCC",Ai="hanui-upload__list-lbViQ",Fi="hanui-upload__file-Znp1Q",Mi="hanui-upload__fileText-EtJcs",Bi="hanui-upload__fileName-ArF8-",Pi="hanui-upload__fileMeta-i6sO1",Oi="hanui-upload__progress-JY2a5",G={upload:Ei,upload__drop:Ii,upload__input:Ci,"upload__drop--dragging":"hanui-upload__drop--dragging-YztUx","upload__drop--invalid":"hanui-upload__drop--invalid-JhwnL","upload__drop--disabled":"hanui-upload__drop--disabled-zyfUv",upload__icon:Ti,upload__label:Ri,upload__drag:Di,upload__hint:Si,upload__error:Li,upload__list:Ai,upload__file:Fi,"upload__file--error":"hanui-upload__file--error-wpbtA",upload__fileText:Mi,upload__fileName:Bi,upload__fileMeta:Pi,upload__progress:Oi},Wt=1024,Ba=Wt*Wt,sa=e=>e<Wt?`${e} B`:e<Ba?`${Math.round(e/Wt)} KB`:`${(e/Ba).toFixed(1)} MB`,Hi=({files:e,onSelect:a,onRemove:n,label:r,hint:o,accept:c,isMultiple:i,maxSize:_,removeLabel:h,dropLabel:d,sizeErrorText:l,isDisabled:p,error:u,children:b,className:g,testId:j})=>{const m=s.useId(),f=s.useId(),N=s.useRef(null),{labels:k}=O(),x=Xt(),[$,R]=s.useState(!1),[C,w]=s.useState([]),E=y=>{var q;if(!y||y.length===0)return;const I=[...y],M=_===void 0?[]:I.filter(V=>V.size>_),Y=I.filter(V=>!M.includes(V)),X=M.map(V=>{var _e;return l===void 0?me("FileUpload.tooLarge",(_e=k==null?void 0:k.fileUpload)==null?void 0:_e.tooLarge,V.name,sa(_??0)):l.replace("{name}",V.name).replace("{max}",sa(_??0))});w(X),Y.length>0&&(a(Y),x(me("FileUpload.added",(q=k==null?void 0:k.fileUpload)==null?void 0:q.added,Y.length))),X.length>0&&x(X.join(" "),"assertive")},T=y=>{y.preventDefault(),R(!1),!p&&E(y.dataTransfer.files)};return t.jsxs("div",{className:v(G.upload,g),"data-testid":j,children:[t.jsxs("label",{htmlFor:m,className:v(G.upload__drop,$&&G["upload__drop--dragging"],p&&G["upload__drop--disabled"],u&&G["upload__drop--invalid"]),onDragOver:y=>{y.preventDefault(),p||R(!0)},onDragLeave:()=>R(!1),onDrop:T,children:[t.jsx(D.CloudArrowUpFill,{"aria-hidden":!0,className:G.upload__icon}),t.jsx("span",{className:G.upload__label,children:r}),t.jsx("span",{className:G.upload__drag,children:d}),o&&t.jsx("span",{id:f,className:G.upload__hint,children:o}),t.jsx("input",{ref:N,id:m,type:"file",className:G.upload__input,accept:c,multiple:i,disabled:p,"aria-describedby":o?f:void 0,"aria-invalid":u?!0:void 0,onChange:y=>{E(y.target.files),y.target.value=""}})]}),u&&t.jsxs("p",{className:G.upload__error,role:"alert",children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),u]}),C.map(y=>t.jsxs("p",{className:G.upload__error,role:"alert",children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),y]},y)),e.length>0&&t.jsx("ul",{className:G.upload__list,children:e.map(y=>{var I;return t.jsxs("li",{className:v(G.upload__file,y.error&&G["upload__file--error"]),children:[t.jsxs("span",{className:G.upload__fileText,children:[t.jsx("span",{className:G.upload__fileName,children:y.name}),t.jsx("span",{className:G.upload__fileMeta,children:y.error??sa(y.size)})]}),y.progress!==void 0&&t.jsx(on,{value:y.progress,label:me("FileUpload.uploading",(I=k==null?void 0:k.fileUpload)==null?void 0:I.uploading,y.name),size:"sm",className:G.upload__progress}),t.jsx(ke,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:`${y.name} — ${h}`,variant:"ghost",size:"sm",onClick:()=>n(y.id)})]},y.id)})}),b]})},Ki=s.memo(L(Hi,"FileUpload")),Ui="hanui-alert-gHI-9",zi="hanui-alert__icon-DhiCT",Yi="hanui-alert__body-52-z2",qi="hanui-alert__title-I8BAh",Wi="hanui-alert__content-lhBEo",Xi="hanui-alert__action-1mTje",Qe={alert:Ui,alert__icon:zi,alert__body:Yi,alert__title:qi,alert__content:Wi,alert__action:Xi,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},Gi={info:t.jsx(D.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(D.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(D.XCircleFill,{"aria-hidden":!0})},Vi=({children:e,tone:a="info",title:n,action:r,className:o,testId:c})=>t.jsxs("div",{className:v(Qe.alert,Qe[`alert--${a}`],o),role:a==="danger"||a==="warning"?"alert":void 0,"data-testid":c,children:[t.jsx("span",{className:Qe.alert__icon,children:Gi[a]}),t.jsxs("div",{className:Qe.alert__body,children:[n&&t.jsx("strong",{className:Qe.alert__title,children:n}),t.jsx("div",{className:Qe.alert__content,children:e})]}),r&&t.jsx("div",{className:Qe.alert__action,children:r})]}),Qi=s.memo(Vi),Ji="hanui-avatar-qoh3P",Zi="hanui-avatar__image-uAyAX",Ht={avatar:Ji,avatar__image:Zi,"avatar--sm":"hanui-avatar--sm-GGjU4","avatar--md":"hanui-avatar--md-xhXnK","avatar--lg":"hanui-avatar--lg-ULP-r","avatar--tone-0":"hanui-avatar--tone-0-mvjdw","avatar--tone-1":"hanui-avatar--tone-1-RYZOX","avatar--tone-2":"hanui-avatar--tone-2-vP-CS","avatar--tone-3":"hanui-avatar--tone-3-ivgnI","avatar--tone-4":"hanui-avatar--tone-4-V57r3","avatar--tone-5":"hanui-avatar--tone-5-65aPg"},ec=(e,a)=>{const n=e.trim().split(/\s+/).filter(Boolean);if(n.length===0)return"?";const r=n.length===1?n[0].slice(0,2):`${n[0][0]}${n[n.length-1][0]}`;return a?r.toLocaleUpperCase(a):r.toLocaleUpperCase()},tc=(e,a)=>{let n=5381;for(let r=0;r<e.length;r+=1)n=n*33^e.charCodeAt(r);return Math.abs(n)%a},ac=6,nc=({name:e,imageUrl:a,locale:n,size:r="md",className:o,testId:c})=>{const{labels:i}=O();return t.jsx("span",{className:v(Ht.avatar,Ht[`avatar--${r}`],!a&&Ht[`avatar--tone-${tc(e,ac)}`],o),role:"img","aria-label":e,"data-testid":c,children:a?t.jsx("img",{className:Ht.avatar__image,src:a,alt:""}):ec(e,n??(i==null?void 0:i.locale))})},sc=s.memo(nc),rc="hanui-badge-uLAaI",oc="hanui-badge__icon-R2goZ",Kt={badge:rc,badge__icon:oc,"badge--neutral":"hanui-badge--neutral-6kddt","badge--soft":"hanui-badge--soft-gFeRF","badge--solid":"hanui-badge--solid-rtdHI","badge--outline":"hanui-badge--outline-QiAAz","badge--success":"hanui-badge--success-Oj11F","badge--danger":"hanui-badge--danger-X3nV0","badge--warning":"hanui-badge--warning-vAsx2","badge--info":"hanui-badge--info-mHOwk","badge--oem":"hanui-badge--oem-Nl-VX","badge--alt":"hanui-badge--alt-gQkww","badge--sale":"hanui-badge--sale-Li1tG","badge--action":"hanui-badge--action-7pUio","badge--link":"hanui-badge--link-zcNJZ"},ic=({children:e,tone:a="neutral",variant:n="soft",icon:r,className:o,testId:c})=>t.jsxs("span",{className:v(Kt.badge,Kt[`badge--${a}`],Kt[`badge--${n}`],o),"data-testid":c,children:[r&&t.jsx("span",{className:Kt.badge__icon,children:r}),e]}),cc=s.memo(ic),lc="hanui-breadcrumb-amB9n",dc="hanui-breadcrumb__item-Icv1S",uc="hanui-breadcrumb__link-eVkPq",_c="hanui-breadcrumb__current-8XjhU",hc="hanui-breadcrumb__separator-vvaUi",Et={breadcrumb:lc,breadcrumb__item:dc,breadcrumb__link:uc,breadcrumb__current:_c,breadcrumb__separator:hc},pc=({items:e,label:a,linkProps:n,className:r,testId:o})=>{const{labels:c}=O();return t.jsx("nav",{className:r,"aria-label":P("Breadcrumb.label",a,c==null?void 0:c.breadcrumb),"data-testid":o,children:t.jsx("ol",{className:v(Et.breadcrumb),children:e.map((i,_)=>{const h=_===e.length-1;return t.jsxs("li",{className:Et.breadcrumb__item,children:[i.href&&!h?t.jsx(ue,{href:i.href,className:Et.breadcrumb__link,...n,children:i.label}):t.jsx("span",{className:Et.breadcrumb__current,"aria-current":"page",children:i.label}),!h&&t.jsx(D.CaretRightFill,{"aria-hidden":!0,className:Et.breadcrumb__separator})]},`${i.label}-${_}`)})})})},mc=s.memo(pc),bc="hanui-card-CaHUG",gc="hanui-media__frame-eBv-s",fc="hanui-media-eggk5",xc="hanui-media__link-ujyVV",vc="hanui-overlay-AVMTX",yc="hanui-body-DyI-6",wc="hanui-footer-2WNCZ",we={card:bc,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:gc,media:fc,media__link:xc,"media__frame--cover":"hanui-media__frame--cover-ddl29","media__frame--contain":"hanui-media__frame--contain-5gosS","media__frame--inset":"hanui-media__frame--inset-oVQIn",overlay:vc,"overlay--top-left":"hanui-overlay--top-left-td1xA","overlay--top-right":"hanui-overlay--top-right-GqD9H","overlay--bottom-left":"hanui-overlay--bottom-left-T5Quw","overlay--bottom-right":"hanui-overlay--bottom-right-za3z3",body:yc,footer:wc},jc=({children:e,isInteractive:a,as:n="div",className:r,testId:o})=>t.jsx(n,{className:v(we.card,a&&we["card--interactive"],r),"data-testid":o,children:e}),kc=(e,a)=>e??(a===!1?"cover":"contain"),Nc=L(s.memo(({children:e,ratio:a=1,href:n,linkProps:r,fit:o,isContained:c,className:i})=>{const _=t.jsx("span",{className:v(we.media__frame,we[`media__frame--${kc(o,c)}`]),style:{aspectRatio:a},children:e});return t.jsx("div",{className:v(we.media,i),children:n?t.jsx(ue,{href:n,className:we.media__link,tabIndex:-1,"aria-hidden":!0,...r,children:_}):_})}),"CardMedia"),$c=L(s.memo(({children:e,position:a="top-left",className:n})=>t.jsx("div",{className:v(we.overlay,we[`overlay--${a}`],n),children:e})),"CardOverlay"),Ec=L(s.memo(({children:e,className:a})=>t.jsx("div",{className:v(we.body,a),children:e})),"CardBody"),Ic=L(s.memo(({children:e,className:a})=>t.jsx("div",{className:v(we.footer,a),children:e})),"CardFooter"),Cc=s.memo(jc),Tc="hanui-carousel-GJXkW",Rc="hanui-carousel__controls-hm5ij",Dc="hanui-carousel__arrowIcon-adFey",Sc="hanui-carousel__track-mAux5",Lc="hanui-carousel__dots-iU8RJ",Ac="hanui-carousel__dot-JTLCB",Oe={carousel:Tc,carousel__controls:Rc,carousel__arrowIcon:Dc,carousel__track:Sc,carousel__dots:Lc,carousel__dot:Ac,"carousel__dot--active":"hanui-carousel__dot--active-riNMm"},Fc=({children:e,label:a,previousLabel:n,nextLabel:r,formatDotLabel:o,itemWidth:c,itemMinWidth:i,className:_,testId:h})=>{const d=s.useRef(null),[l,p]=s.useState(!1),[u,b]=s.useState(!1),[g,j]=s.useState(0),[m,f]=s.useState(1),[N,k]=s.useState(!1),x=s.useCallback(()=>{const C=d.current;if(!C)return;const{scrollLeft:w,scrollWidth:E,clientWidth:T}=C;p(w>1),b(w+T<E-1),j(T>0?Math.round(w/T):0),f(T>0?Math.max(1,Math.ceil(E/T)):1),k(E>T&&C.querySelector("a, button, input, select, textarea, [tabindex]")===null)},[]);s.useEffect(()=>{const C=d.current;if(!C)return;x(),C.addEventListener("scroll",x,{passive:!0});const w=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return w==null||w.observe(C),()=>{C.removeEventListener("scroll",x),w==null||w.disconnect()}},[x,e]);const $=()=>{var C;return typeof window<"u"&&((C=window.matchMedia)!=null&&C.call(window,"(prefers-reduced-motion: reduce)").matches)?"auto":"smooth"},R=C=>{var w;return(w=d.current)==null?void 0:w.scrollBy({left:C*d.current.clientWidth,behavior:$()})};return t.jsxs("section",{className:v(Oe.carousel,_),"aria-label":a,"data-testid":h,children:[t.jsxs("div",{className:Oe.carousel__controls,children:[t.jsx(ke,{icon:t.jsx(D.CaretLeftFill,{"aria-hidden":!0,className:Oe.carousel__arrowIcon}),label:n,variant:"outline",size:"sm",disabled:!l,onClick:()=>R(-1)}),t.jsx(ke,{icon:t.jsx(D.CaretRightFill,{"aria-hidden":!0,className:Oe.carousel__arrowIcon}),label:r,variant:"outline",size:"sm",disabled:!u,onClick:()=>R(1)})]}),t.jsx("div",{ref:d,className:Oe.carousel__track,style:{"--hanui-carousel-item-default":`${c??i??240}px`},tabIndex:N?0:void 0,role:N?"group":void 0,"aria-label":N?a:void 0,children:e}),o&&m>1&&t.jsx("div",{className:Oe.carousel__dots,children:Array.from({length:m},(C,w)=>t.jsx("button",{type:"button",className:v(Oe.carousel__dot,w===g&&Oe["carousel__dot--active"]),"aria-label":o(w+1,m),"aria-current":w===g?"true":void 0,onClick:()=>{var E;return(E=d.current)==null?void 0:E.scrollTo({left:w*d.current.clientWidth,behavior:$()})}},w))})]})},Mc=s.memo(L(Fc,"Carousel")),Bc=1600,cn=e=>{const[a,n]=s.useState(!1),r=s.useRef(null),o=s.useRef(void 0);s.useEffect(()=>()=>window.clearTimeout(o.current),[]);const c=s.useCallback(()=>{const _=r.current;if(!_)return;const h=document.createRange();h.selectNodeContents(_);const d=window.getSelection();d==null||d.removeAllRanges(),d==null||d.addRange(h)},[]),i=s.useCallback(async()=>{try{await navigator.clipboard.writeText(e),n(!0),o.current=window.setTimeout(()=>n(!1),Bc)}catch{c()}},[e,c]);return{isCopied:a,copy:i,nodeRef:r}},Pc="hanui-badge-b14ZG",Oc="hanui-badge__code-RRDlH",Hc="hanui-badge__button-CVr21",Kc="hanui-badge__srOnly-ow8L5",_t={badge:Pc,"badge--sm":"hanui-badge--sm-Fr4vY",badge__code:Oc,"badge--md":"hanui-badge--md-HGRL4","badge--lg":"hanui-badge--lg-J4aiq",badge__button:Hc,"badge__button--done":"hanui-badge__button--done-k6XeK",badge__srOnly:Kc},Uc=({code:e,isCopyable:a,copyLabel:n,copiedLabel:r,copiedAnnouncement:o,size:c="md",className:i,testId:_})=>{var u,b,g;const{labels:h}=O(),{isCopied:d,copy:l,nodeRef:p}=cn(e);return t.jsxs("span",{className:v(_t.badge,_t[`badge--${c}`],i),"data-testid":_,children:[t.jsx("span",{className:_t.badge__code,ref:p,children:e}),a&&t.jsx("button",{type:"button",className:v(_t.badge__button,d&&_t["badge__button--done"]),onClick:l,"aria-label":d?r??me("CodeBadge.copiedLabel",(u=h==null?void 0:h.copyField)==null?void 0:u.copied,e):n??me("CodeBadge.copyLabel",(b=h==null?void 0:h.copyField)==null?void 0:b.copy,e),children:d?t.jsx(D.ClipboardCheckFill,{"aria-hidden":!0}):t.jsx(D.ClipboardFill,{"aria-hidden":!0})}),t.jsx("span",{"aria-live":"polite",className:_t.badge__srOnly,children:d?P("CodeBadge.copiedAnnouncement",o,(g=h==null?void 0:h.copyField)==null?void 0:g.announcement):""})]})},zc=s.memo(L(Uc,"CodeBadge")),Yc="hanui-copy-Yht5s",qc="hanui-copy__code-CYlCA",Wc="hanui-copy__button-GDdH6",Xc="hanui-copy__srOnly-WMTNN",ht={copy:Yc,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:qc,"copy--md":"hanui-copy--md-00rhU",copy__button:Wc,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:Xc},Gc=({value:e,copyLabel:a,copiedLabel:n,copiedAnnouncement:r,size:o="sm",isReadOnly:c,className:i,testId:_})=>{var u,b,g;const{labels:h}=O(),{isCopied:d,copy:l,nodeRef:p}=cn(e);return t.jsxs("span",{className:v(ht.copy,ht[`copy--${o}`],i),"data-testid":_,children:[t.jsx("span",{className:ht.copy__code,ref:p,children:e}),!c&&t.jsx("button",{type:"button",className:v(ht.copy__button,d&&ht["copy__button--done"]),onClick:l,"aria-label":d?n??me("CopyField.copiedLabel",(u=h==null?void 0:h.copyField)==null?void 0:u.copied,e):a??me("CopyField.copyLabel",(b=h==null?void 0:h.copyField)==null?void 0:b.copy,e),children:d?t.jsx(D.ClipboardCheckFill,{"aria-hidden":!0}):t.jsx(D.ClipboardFill,{"aria-hidden":!0})}),t.jsx("span",{"aria-live":"polite",className:ht.copy__srOnly,children:d?P("CopyField.copiedAnnouncement",r,(g=h==null?void 0:h.copyField)==null?void 0:g.announcement):""})]})},Vc=s.memo(Gc),Qc="hanui-divider-RJqCw",Jc="hanui-divider__label-M8sBA",Ut={divider:Qc,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:Jc},Zc=({label:e,className:a})=>e?t.jsx("div",{role:"separator","aria-label":e,className:v(Ut.divider,Ut["divider--labelled"],a),children:t.jsx("span",{className:Ut.divider__label,children:e})}):t.jsx("hr",{className:v(Ut.divider,a)}),el=s.memo(Zc),tl="hanui-directory-badEd",al="hanui-group-i6An9",nl="hanui-group__header-rc19c",sl="hanui-group__label-vQTcs",rl="hanui-group__link-es5V7",ol="hanui-group__meta-LtC-u",il="hanui-group__list-YxBCG",cl="hanui-row-3LH7X",ll="hanui-row__name-75Wbq",dl="hanui-row__media-AxZEh",ul="hanui-row__marker-RYHb-",_l="hanui-jump-vpGwB",hl="hanui-jump__link-rRnT6",re={directory:tl,group:al,group__header:nl,group__label:sl,group__link:rl,group__meta:ol,group__list:il,row:cl,row__name:ll,row__media:dl,row__marker:ul,jump:_l,jump__link:hl},pl=({children:e,className:a})=>t.jsx("div",{className:v(re.directory,a),children:e}),ml=L(s.memo(({label:e,href:a,linkProps:n,meta:r,children:o,id:c})=>t.jsxs("section",{className:re.group,id:c,children:[t.jsxs("header",{className:re.group__header,children:[t.jsx("h2",{className:re.group__label,children:a?t.jsx(ue,{href:a,className:re.group__link,...n,children:e}):e}),r&&t.jsx("span",{className:re.group__meta,children:r})]}),t.jsx("ul",{className:re.group__list,children:o})]})),"DirectoryGroup"),bl=L(s.memo(({href:e,name:a,media:n,marker:r,linkProps:o,className:c})=>t.jsx("li",{children:t.jsxs(ue,{href:e,className:v(re.row,c),...o,children:[n&&t.jsx("span",{className:re.row__media,children:n}),t.jsx("span",{className:re.row__name,children:a}),r&&t.jsx("span",{className:re.row__marker,children:r})]})})),"DirectoryRow"),gl=L(s.memo(({labels:e,toId:a,label:n})=>{const{labels:r}=O();return t.jsx("nav",{className:re.jump,"aria-label":P("DirectoryJump.label",n,r==null?void 0:r.directoryJump),children:e.map(o=>t.jsx("a",{href:`#${a(o)}`,className:re.jump__link,children:o},o))})}),"DirectoryJump"),fl=s.memo(pl),xl="hanui-empty-47qZR",vl="hanui-empty__icon-okfEc",yl="hanui-empty__title-Z7Dzd",wl="hanui-empty__description-6BoCk",jl="hanui-empty__actions-ARk-k",Je={empty:xl,empty__icon:vl,empty__title:yl,empty__description:wl,empty__actions:jl,"empty--sm":"hanui-empty--sm-QXaXx","empty--error":"hanui-empty--error-4BBgp"},kl=({title:e,description:a,icon:n,action:r,secondaryAction:o,tone:c="empty",size:i="md",className:_,testId:h})=>t.jsxs("div",{className:v(Je.empty,Je[`empty--${i}`],Je[`empty--${c}`],_),role:c==="error"?"alert":void 0,"data-testid":h,children:[n&&t.jsx("span",{className:Je.empty__icon,children:n}),t.jsx("h3",{className:Je.empty__title,children:e}),a&&t.jsx("p",{className:Je.empty__description,children:a}),(r||o)&&t.jsxs("div",{className:Je.empty__actions,children:[r,o]})]}),Nl=s.memo(kl),$l="hanui-header-yJwus",El="hanui-header__top-UK4si",Il="hanui-header__breadcrumb-A2j0i",Cl="hanui-header__text-HIo8U",Tl="hanui-header__eyebrow-dZ9Zc",Rl="hanui-header__titleRow-KgDZj",Dl="hanui-header__title-s1giF",Sl="hanui-header__meta-UxuaD",Ll="hanui-header__description-NXbbC",Al="hanui-header__actions-aShpt",ve={header:$l,header__top:El,header__breadcrumb:Il,header__text:Cl,header__eyebrow:Tl,header__titleRow:Rl,header__title:Dl,header__meta:Sl,header__description:Ll,header__actions:Al},Fl=({title:e,eyebrow:a,description:n,actions:r,breadcrumb:o,meta:c,children:i,as:_="h1",className:h,testId:d})=>t.jsxs("header",{className:v(ve.header,h),"data-testid":d,children:[o&&t.jsx("div",{className:ve.header__breadcrumb,children:o}),t.jsxs("div",{className:ve.header__top,children:[t.jsxs("div",{className:ve.header__text,children:[a&&t.jsx("span",{className:ve.header__eyebrow,children:a}),t.jsxs("div",{className:ve.header__titleRow,children:[t.jsx(_,{className:ve.header__title,children:e}),c&&t.jsx("span",{className:ve.header__meta,children:c})]}),n&&t.jsx("p",{className:ve.header__description,children:n})]}),r&&t.jsx("div",{className:ve.header__actions,children:r})]}),i]}),Ml=s.memo(Fl),Bl="hanui-panel-Sv-1m",Pl="hanui-panel__header-ysexh",Ol="hanui-panel__heading-xLCsB",Hl="hanui-panel__icon--yPQT",Kl="hanui-panel__headingText--XqxW",Ul="hanui-panel__title-6-6uC",zl="hanui-panel__description-qXTSM",Yl="hanui-panel__actions-Ra-zy",ql="hanui-panel__body-lo5aX",Wl="hanui-panel__footer-qLpR1",Xl="hanui-panel__footerInner-r6VQI",Gl="hanui-form-o9UqJ",Vl="hanui-row-vUGpa",Q={panel:Bl,panel__header:Pl,panel__heading:Ol,panel__icon:Hl,panel__headingText:Kl,panel__title:Ul,panel__description:zl,panel__actions:Yl,panel__body:ql,"panel__body--sm":"hanui-panel__body--sm-6XP6W","panel__body--lg":"hanui-panel__body--lg-RTK5B","panel__body--flush":"hanui-panel__body--flush-iK75R",panel__footer:Wl,panel__footerInner:Xl,form:Gl,"form--2":"hanui-form--2-HdwDc",row:Vl},Ql=({children:e,title:a,description:n,actions:r,icon:o,isFlush:c,gap:i="md",footer:_,as:h="section",className:d,bodyClassName:l,testId:p})=>t.jsxs(h,{className:v(Q.panel,d),"data-testid":p,children:[(a||r)&&t.jsxs("div",{className:Q.panel__header,children:[t.jsxs("div",{className:Q.panel__heading,children:[o&&t.jsx("span",{className:Q.panel__icon,children:o}),t.jsxs("div",{className:Q.panel__headingText,children:[a&&t.jsx("h2",{className:Q.panel__title,children:a}),n&&t.jsx("p",{className:Q.panel__description,children:n})]})]}),r&&t.jsx("div",{className:Q.panel__actions,children:r})]}),t.jsx("div",{className:v(Q.panel__body,Q[`panel__body--${i}`],c&&Q["panel__body--flush"],l),children:e}),_&&t.jsx("div",{className:Q.panel__footer,children:t.jsx("div",{className:Q.panel__footerInner,children:_})})]}),Jl=L(s.memo(({children:e,columns:a=1,className:n})=>t.jsx("div",{className:v(Q.form,Q[`form--${a}`],n),children:e})),"PanelForm"),Zl=L(s.memo(({children:e,className:a})=>t.jsx("div",{className:v(Q.row,a),children:e})),"PanelRow"),ed=s.memo(Ql),td="hanui-price-Oc5Nr",ad="hanui-price__current-2Xup2",nd="hanui-price__currency-32NLN",sd="hanui-price__list-MlQgT",rd="hanui-price__discount-5Yc6W",Ze={price:td,price__current:ad,price__currency:nd,price__list:sd,price__discount:rd,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},od=({value:e,currency:a,listValue:n,discountPercent:r,formatDiscount:o=d=>`%${d}`,isFormatted:c,size:i="md",className:_,testId:h})=>{const{labels:d}=O(),l=P("Price.currency",a,d==null?void 0:d.currency),p=u=>{if(!c||!(d!=null&&d.locale)||!/\d/.test(u))return u;const b=Number(u.replace(/[^\d.,-]/g,"").replace(/\.(?=\d{3}\b)/g,"").replace(",","."));if(!Number.isFinite(b))return u;try{return new Intl.NumberFormat(d.locale).format(b)}catch{return u}};return t.jsxs("span",{className:v(Ze.price,Ze[`price--${i}`],_),"data-testid":h,children:[t.jsxs("span",{className:Ze.price__current,children:[p(e),t.jsx("span",{className:Ze.price__currency,children:l})]}),n&&t.jsxs("s",{className:Ze.price__list,children:[p(n),t.jsx("span",{className:Ze.price__currency,children:l})]}),r!==void 0&&r>0&&t.jsx("span",{className:Ze.price__discount,children:o(r)})]})},id=s.memo(od),cd="hanui-rating-94dke",ld="hanui-rating__stars-QkpVU",dd="hanui-rating__empty-Wf6-K",ud="hanui-rating__count-pIoEs",_d="hanui-rating__srOnly-E9h0d",pt={rating:cd,rating__stars:ld,rating__empty:dd,rating__count:ud,rating__srOnly:_d,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},hd=({value:e,count:a,srLabel:n,size:r="sm",className:o,testId:c})=>{var h;const{labels:i}=O(),_=Math.round(e*2)/2;return t.jsxs("span",{className:v(pt.rating,pt[`rating--${r}`],o),"data-testid":c,children:[t.jsx("span",{className:pt.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(d,l)=>{const p=l+1;return _>=p?t.jsx(D.StarFill,{},l):_>=p-.5?t.jsx(D.StarHalf,{},l):t.jsx(D.StarFill,{className:pt.rating__empty},l)})}),t.jsx("span",{className:pt.rating__srOnly,children:n??me("Rating.srLabel",(h=i==null?void 0:i.rating)==null?void 0:h.srLabel,e,a)}),z.isDefined(a)&&t.jsxs("span",{className:pt.rating__count,"aria-hidden":!0,children:["(",a,")"]})]})},pd=s.memo(hd),md="hanui-header-a08Jh",bd="hanui-header__text-ArJkA",gd="hanui-header__overline-X5Epo",fd="hanui-header__title-nQQQJ",xd="hanui-header__description-08oCr",vd="hanui-header__action-xsxQF",et={header:md,header__text:bd,header__overline:gd,header__title:fd,header__description:xd,header__action:vd,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},yd=({title:e,description:a,overline:n,action:r,as:o="h2",size:c="md",className:i,testId:_})=>t.jsxs("header",{className:v(et.header,et[`header--${c}`],i),"data-testid":_,children:[t.jsxs("div",{className:et.header__text,children:[n&&t.jsx("span",{className:et.header__overline,children:n}),t.jsx(o,{className:et.header__title,children:e}),a&&t.jsx("p",{className:et.header__description,children:a})]}),r&&t.jsx("div",{className:et.header__action,children:r})]}),wd=s.memo(yd),jd="hanui-scrollArea-Ly-yT",ra={scrollArea:jd,"scrollArea--vertical":"hanui-scrollArea--vertical-2ujC7","scrollArea--horizontal":"hanui-scrollArea--horizontal-e9pu-","scrollArea--both":"hanui-scrollArea--both-lv-8W","scrollArea--fade":"hanui-scrollArea--fade-01Bbm"},kd=({children:e,label:a,axis:n="vertical",maxHeight:r,hasFade:o,className:c,testId:i})=>{const _=s.useRef(null),[h,d]=s.useState(!1),[l,p]=s.useState({start:!1,end:!1});return s.useEffect(()=>{const u=_.current;if(!u||typeof ResizeObserver>"u")return;const b=()=>{const j=u.scrollHeight>u.clientHeight,m=u.scrollWidth>u.clientWidth;d(n==="horizontal"?m:n==="vertical"?j:j||m);const f=n==="horizontal",N=f?u.clientWidth:u.clientHeight,k=f?u.scrollWidth:u.scrollHeight,x=Math.abs(f?u.scrollLeft:u.scrollTop);p({start:x>1,end:x+N<k-1})};b();const g=new ResizeObserver(b);g.observe(u);for(const j of u.children)g.observe(j);return u.addEventListener("scroll",b,{passive:!0}),()=>{g.disconnect(),u.removeEventListener("scroll",b)}},[n,e]),t.jsx("div",{ref:_,className:v(ra.scrollArea,ra[`scrollArea--${n}`],o&&ra["scrollArea--fade"],c),style:r===void 0?void 0:{maxBlockSize:r},"data-fade-start":o&&l.start?"":void 0,"data-fade-end":o&&l.end?"":void 0,tabIndex:h?0:void 0,role:h?"region":void 0,"aria-label":h?a:void 0,"data-testid":i,children:e})},Nd=s.memo(L(kd,"ScrollArea")),$d="hanui-skeleton-n92if",Ed="hanui-group-YMfwa",Id="hanui-card-XQs-Q",Cd="hanui-card__media-YLJDv",Td="hanui-card__body-msRvB",Rd="hanui-rows-EZ9Am",Dd="hanui-row-se56N",Sd="hanui-row__text-TD4iS",Ld="hanui-table-L328g",Ad="hanui-table__row-rSJTK",oe={skeleton:$d,"skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:Ed,card:Id,card__media:Cd,card__body:Td,rows:Rd,row:Dd,row__text:Sd,table:Ld,table__row:Ad},Ue=({width:e,height:a,variant:n="block",lines:r=1,className:o})=>{const c={width:z.isNumber(e)?`${e}px`:e,height:z.isNumber(a)?`${a}px`:a};return n==="text"&&r>1?t.jsx("span",{className:v(oe.group,o),"aria-hidden":!0,children:Array.from({length:r},(i,_)=>t.jsx("span",{className:v(oe.skeleton,oe["skeleton--text"]),style:_===r-1?{width:"60%"}:void 0},_))}):t.jsx("span",{className:v(oe.skeleton,oe[`skeleton--${n}`],o),style:c,"aria-hidden":!0})},Fd=s.memo(Ue),Md=({count:e=1,className:a})=>t.jsx(t.Fragment,{children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:v(oe.card,a),"aria-hidden":!0,children:[t.jsx(Ue,{className:oe.card__media}),t.jsxs("div",{className:oe.card__body,children:[t.jsx(Ue,{variant:"text",width:"70%"}),t.jsx(Ue,{variant:"text",width:"40%"})]})]},r))}),Bd=({count:e=3,className:a})=>t.jsx("div",{className:v(oe.rows,a),"aria-hidden":!0,children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:oe.row,children:[t.jsx(Ue,{variant:"circle",width:36,height:36}),t.jsxs("div",{className:oe.row__text,children:[t.jsx(Ue,{variant:"text",width:"45%"}),t.jsx(Ue,{variant:"text",width:"25%"})]})]},r))}),Pd=({count:e=5,columns:a=4,className:n})=>t.jsx("div",{className:v(oe.table,n),"aria-hidden":!0,children:Array.from({length:e},(r,o)=>t.jsx("div",{className:oe.table__row,children:Array.from({length:a},(c,i)=>t.jsx(Ue,{variant:"text"},i))},o))}),Od=L(s.memo(Md),"SkeletonCard"),Hd=L(s.memo(Bd),"SkeletonRows"),Kd=L(s.memo(Pd),"SkeletonTable"),Ud="hanui-stat-Xb7wp",zd="hanui-stat__icon-MB8NU",Yd="hanui-stat__label-kUX2m",qd="hanui-stat__value--6p13",Wd="hanui-stat__unit-mjHVk",Xd="hanui-stat__delta-YKpOu",Gd="hanui-stat__description-Yvw6J",Vd="hanui-stat__srOnly-YKebA",ie={stat:Ud,"stat--sm":"hanui-stat--sm-XnK8p","stat--plain":"hanui-stat--plain-N-3RC",stat__icon:zd,stat__label:Yd,stat__value:qd,stat__unit:Wd,stat__delta:Xd,"stat__delta--positive":"hanui-stat__delta--positive-1AUAM","stat__delta--negative":"hanui-stat__delta--negative--WWEP",stat__description:Gd,stat__srOnly:Vd},Qd={up:t.jsx(D.ArrowUpShort,{"aria-hidden":!0}),down:t.jsx(D.ArrowDownShort,{"aria-hidden":!0}),flat:t.jsx(D.DashLg,{"aria-hidden":!0})},Pa={up:"increase",down:"decrease",flat:"unchanged"},Jd=({label:e,value:a,unit:n,delta:r,trend:o,isUpPositive:c=!0,description:i,icon:_,variant:h="card",size:d="md",className:l,testId:p})=>{var g;const{labels:u}=O(),b=o==="flat"?void 0:o==="up"===c;return t.jsxs("div",{className:v(ie.stat,ie[`stat--${d}`],ie[`stat--${h}`],l),"data-testid":p,children:[_&&t.jsx("span",{className:ie.stat__icon,"aria-hidden":!0,children:_}),t.jsx("span",{className:ie.stat__label,children:e}),t.jsxs("span",{className:ie.stat__value,children:[a,n&&t.jsx("span",{className:ie.stat__unit,children:n})]}),r&&o&&t.jsxs("span",{className:v(ie.stat__delta,b===!0&&ie["stat__delta--positive"],b===!1&&ie["stat__delta--negative"]),children:[Qd[o],r,t.jsx("span",{className:ie.stat__srOnly,children:P(`Stat.${Pa[o]}`,(g=u==null?void 0:u.stat)==null?void 0:g[Pa[o]])})]}),i&&t.jsx("span",{className:ie.stat__description,children:i})]})},Zd=s.memo(L(Jd,"Stat")),eu="hanui-card-wkzhi",tu="hanui-card__media--Lm-v",au="hanui-card__content-8uHkm",nu="hanui-card__title-1EwbD",su="hanui-card__link-mhY-M",ru="hanui-card__description-3O0R7",ou="hanui-card__meta-Xzk4q",tt={card:eu,card__media:tu,card__content:au,card__title:nu,card__link:su,card__description:ru,card__meta:ou},iu=({title:e,href:a,description:n,meta:r,media:o,headingLevel:c=3,linkProps:i,className:_,testId:h})=>{const d=`h${c}`;return t.jsxs("article",{className:v(tt.card,_),"data-testid":h,children:[o&&t.jsx("span",{className:tt.card__media,"aria-hidden":!0,children:o}),t.jsxs("div",{className:tt.card__content,children:[t.jsx(d,{className:tt.card__title,children:t.jsx(ue,{href:a,className:tt.card__link,...i,children:e})}),n&&t.jsx("p",{className:tt.card__description,children:n}),r&&t.jsx("div",{className:tt.card__meta,children:r})]})]})},cu=s.memo(L(iu,"SummaryCard")),lu="hanui-hub-JoqOf",du="hanui-toast-U27Of",uu="hanui-toast__icon-p-rgI",_u="hanui-toast__text-rG4ji",hu="hanui-toast__message-s6S2-",pu="hanui-toast__description-0cYTx",mu="hanui-toast__action-fOXU5",bu="hanui-toast__close-QxSNP",De={hub:lu,toast:du,"toast--info":"hanui-toast--info-S1QJr","toast--success":"hanui-toast--success-NUso7","toast--warning":"hanui-toast--warning-7mi-S","toast--danger":"hanui-toast--danger-IhFSz",toast__icon:uu,toast__text:_u,toast__message:hu,toast__description:pu,toast__action:mu,toast__close:bu},gu={info:t.jsx(D.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(D.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(D.XCircleFill,{"aria-hidden":!0})},fu={info:4e3,success:4e3,warning:6e3,danger:8e3};let Oa=0;const la=new Set;let rt=[];const ya=()=>la.forEach(e=>e(rt)),da=e=>{rt=rt.filter(a=>a.id!==e),ya()},It=(e,a={})=>{Oa+=1;const n=Oa;return rt=[...rt,{...a,id:n,message:e}].slice(-3),ya(),n},xu={show:It,info:(e,a)=>It(e,{...a,tone:"info"}),success:(e,a)=>It(e,{...a,tone:"success"}),warning:(e,a)=>It(e,{...a,tone:"warning"}),error:(e,a)=>It(e,{...a,tone:"danger"}),dismiss:da,clear:()=>{rt=[],ya()}},vu=({toast:e,closeLabel:a,onDismiss:n})=>{const r=e.tone??"info",o=e.duration??fu[r],[c,i]=s.useState(!1),_=s.useRef(o),h=s.useRef(0);return s.useEffect(()=>{if(o===0||c)return;h.current=Date.now();const d=window.setTimeout(()=>n(e.id),_.current);return()=>{window.clearTimeout(d),_.current=Math.max(0,_.current-(Date.now()-h.current))}},[o,c,n,e.id]),t.jsxs("div",{className:v(De.toast,De[`toast--${r}`]),role:r==="danger"?"alert":"status",onPointerEnter:()=>i(!0),onPointerLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t.jsx("span",{className:De.toast__icon,"aria-hidden":!0,children:gu[r]}),t.jsxs("div",{className:De.toast__text,children:[t.jsx("span",{className:De.toast__message,children:e.message}),e.description&&t.jsx("span",{className:De.toast__description,children:e.description})]}),e.action&&t.jsx("button",{type:"button",className:De.toast__action,onClick:()=>{var d;(d=e.action)==null||d.onClick(),n(e.id)},children:e.action.label}),t.jsx(ke,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:a,variant:"ghost",size:"sm",className:De.toast__close,onClick:()=>n(e.id)})]})},yu=({closeLabel:e,regionLabel:a,className:n})=>{const{labels:r}=O(),[o,c]=s.useState([]);s.useEffect(()=>(la.add(c),c(rt),()=>{la.delete(c)}),[]);const i=s.useCallback(l=>da(l),[]),_=s.useCallback(()=>{const l=o.at(-1);l&&da(l.id)},[o]);fa(o.length>0,_);const[h,d]=s.useState(!1);return s.useEffect(()=>d(!0),[]),h?ot.createPortal(t.jsx("div",{className:v(De.hub,n),role:"region","aria-label":P("ToastHub.regionLabel",a,r==null?void 0:r.notifications),"aria-live":"polite","aria-relevant":"additions",children:o.map(l=>t.jsx(vu,{toast:l,closeLabel:P("ToastHub.closeLabel",e,r==null?void 0:r.close),onDismiss:i},l.id))}),document.body):null},ln=s.memo(L(yu,"ToastHub")),wu=()=>{const[e,a]=s.useState(!1);return s.useEffect(()=>a(!0),[]),e?t.jsx(ln,{}):null},ju=s.memo(L(wu,"ToastPortal")),ku="hanui-accordion-h9jLC",Nu="hanui-accordion__item--YvzK",$u="hanui-accordion__title-qZOLY",Eu="hanui-accordion__meta-PSlsO",Iu="hanui-accordion__marker-QcWcI",Cu="hanui-accordion__summary-QUhWh",Tu="hanui-accordion__panel--3EXE",Ru="hanui-accordion__content-fO64s",Ie={accordion:ku,accordion__item:Nu,"accordion__item--disabled":"hanui-accordion__item--disabled-x1erZ",accordion__title:$u,accordion__meta:Eu,accordion__marker:Iu,accordion__summary:Cu,accordion__panel:Tu,accordion__content:Ru},Du=({items:e,isSingle:a,defaultOpenIds:n,openIds:r,onChange:o,className:c,testId:i})=>{const _=s.useId(),[h,d]=s.useState(n??[]),l=r!==void 0,p=l?r:h,u=s.useCallback((g,j)=>{const m=j?a?[g]:[...p.filter(f=>f!==g),g]:p.filter(f=>f!==g);l||d(m),o==null||o(m)},[l,a,o,p]),b=s.useRef(new Map);return s.useEffect(()=>{e.forEach(g=>{const j=b.current.get(g.id);j&&(j.open=p.includes(g.id))})}),t.jsx("div",{className:v(Ie.accordion,c),"data-testid":i,children:e.map(g=>{const j=p.includes(g.id);return t.jsxs("details",{ref:m=>{m?b.current.set(g.id,m):b.current.delete(g.id)},className:v(Ie.accordion__item,g.isDisabled&&Ie["accordion__item--disabled"]),open:j,onToggle:m=>{const f=m.currentTarget.open;f!==j&&u(g.id,f)},children:[t.jsxs("summary",{id:`${_}-${g.id}`,className:Ie.accordion__summary,"aria-disabled":g.isDisabled,tabIndex:g.isDisabled?-1:void 0,onClick:m=>g.isDisabled&&m.preventDefault(),children:[t.jsx(D.CaretRightFill,{"aria-hidden":!0,className:Ie.accordion__marker}),t.jsx("span",{className:Ie.accordion__title,children:g.title}),g.meta&&t.jsx("span",{className:Ie.accordion__meta,children:g.meta})]}),t.jsx("div",{className:Ie.accordion__panel,children:t.jsx("div",{className:Ie.accordion__content,children:g.content})})]},g.id)})})},Su=s.memo(L(Du,"Accordion")),Lu="hanui-steps-ntge1",Au="hanui-steps__label-NSeFM",Fu="hanui-steps__item-GrU1x",Mu="hanui-steps__button-XBsnS",Bu="hanui-steps__marker-g-GLE",Pu="hanui-steps__text-Mkpkh",Ou="hanui-steps__description-bQuNT",Hu="hanui-steps__status-wWJfP",ce={steps:Lu,"steps--horizontal":"hanui-steps--horizontal-O-mkx","steps--vertical":"hanui-steps--vertical-agfwo","steps--static":"hanui-steps--static-t9EED",steps__label:Au,steps__item:Fu,steps__button:Mu,steps__marker:Bu,"steps__item--done":"hanui-steps__item--done-mvOuN","steps__item--current":"hanui-steps__item--current-Qzlal",steps__text:Pu,steps__description:Ou,steps__status:Hu},Ku=(e,a)=>e<a?"done":e===a?"current":"upcoming",Ha={done:"completed",current:"current",upcoming:"upcoming"},Uu=({steps:e,currentIndex:a,onStepClick:n,label:r,orientation:o="horizontal",className:c,testId:i})=>{const{labels:_}=O();return t.jsx("ol",{className:v(ce.steps,ce[`steps--${o}`],a===void 0&&ce["steps--static"],c),"aria-label":r,"data-testid":i,children:e.map((h,d)=>{var b;const l=a===void 0?void 0:Ku(d,a),p=!!n&&l==="done",u=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:ce.steps__marker,"aria-hidden":!0,children:l==="done"?t.jsx(D.CheckLg,{}):d+1}),t.jsxs("span",{className:ce.steps__text,children:[t.jsx("span",{className:ce.steps__label,children:h.label}),h.description&&t.jsx("span",{className:ce.steps__description,children:h.description})]}),l&&t.jsx("span",{className:ce.steps__status,children:P(`Steps.${Ha[l]}`,(b=_==null?void 0:_.steps)==null?void 0:b[Ha[l]])})]});return t.jsx("li",{className:v(ce.steps__item,l&&ce[`steps__item--${l}`]),"aria-current":l==="current"?"step":void 0,children:p?t.jsx("button",{type:"button",className:ce.steps__button,onClick:()=>n==null?void 0:n(d),children:u}):t.jsx("span",{className:ce.steps__button,children:u})},h.id)})})},zu=s.memo(L(Uu,"Steps")),Yu="hanui-tabs-l4dFE",qu="hanui-tabs__list-HJvR8",Wu="hanui-tabs__tab-7gDW7",Xu="hanui-tabs__count-8JX8s",Gu="hanui-tabs__panel-CPklY",mt={tabs:Yu,tabs__list:qu,tabs__tab:Wu,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:Xu,tabs__panel:Gu},Vu=({items:e,defaultTabId:a,activeId:n,onChange:r,ariaLabel:o,isManualActivation:c,className:i,testId:_})=>{var C;const h=s.useId(),[d,l]=s.useState(a??((C=e[0])==null?void 0:C.id)),p=z.isDefined(n),u=p?n:d,b=e.findIndex(w=>w.id===u),[g,j]=s.useState(b<0?0:b),m=s.useRef(null),f=e[b]??e[0],N=g>=0&&g<e.length?g:Math.max(b,0);s.useEffect(()=>{j(b<0?0:b)},[b]);const k=s.useRef(!1);s.useEffect(()=>{var w;if(!k.current){k.current=!0;return}pa((w=m.current)==null?void 0:w.querySelector('[aria-selected="true"]'),{block:"nearest",inline:"nearest"})},[u]);const x=w=>{p||l(w),r==null||r(w)},$=w=>{var y;if(c&&(w.key==="Enter"||w.key===" ")){w.preventDefault();const I=e[N];I&&x(I.id);return}const E=w.key==="ArrowRight"?1:w.key==="ArrowLeft"?-1:0;if(E===0)return;w.preventDefault();const T=((c?N:b)+E+e.length)%e.length;j(T),c||x(e[T].id),(y=document.getElementById(`${h}-tab-${e[T].id}`))==null||y.focus()};if(e.length===0)return null;const R=z.isDefined(f==null?void 0:f.content);return t.jsxs("div",{className:v(mt.tabs,i),"data-testid":_,children:[t.jsx("div",{ref:m,className:mt.tabs__list,role:"tablist","aria-label":o,onKeyDown:$,children:e.map(w=>{var T;const E=w.id===f.id;return t.jsxs("button",{id:`${h}-tab-${w.id}`,type:"button",role:"tab","aria-selected":E,"aria-controls":E&&R?`${h}-panel-${w.id}`:void 0,tabIndex:(c?((T=e[N])==null?void 0:T.id)===w.id:E)?0:-1,className:v(mt.tabs__tab,E&&mt["tabs__tab--active"]),onClick:()=>x(w.id),children:[w.label,z.isDefined(w.count)&&t.jsx("span",{className:mt.tabs__count,children:w.count})]},w.id)})}),R&&t.jsx("div",{id:`${h}-panel-${f.id}`,role:"tabpanel","aria-labelledby":`${h}-tab-${f.id}`,className:mt.tabs__panel,tabIndex:0,children:f.content})]})},Qu=s.memo(Vu),Ju="hanui-tile-TGur-",Zu="hanui-tile__medallion--Y0pz",e_="hanui-tile__label-mI1OQ",t_="hanui-tile__meta-22qnR",Ct={tile:Ju,tile__medallion:Zu,tile__label:e_,tile__meta:t_,"tile--active":"hanui-tile--active-z0F2M"},a_=({label:e,icon:a,href:n,meta:r,isActive:o,linkProps:c,className:i,testId:_})=>t.jsxs(ue,{href:n,className:v(Ct.tile,o&&Ct["tile--active"],i),"aria-current":o?"page":void 0,"data-testid":_,...c,children:[t.jsx("span",{className:Ct.tile__medallion,"aria-hidden":!0,children:a}),t.jsx("span",{className:Ct.tile__label,children:e}),r&&t.jsx("span",{className:Ct.tile__meta,children:r})]}),n_=s.memo(a_),s_="hanui-timeline-GxubZ",r_="hanui-timeline__item-qMpF2",o_="hanui-timeline__marker-MDk07",i_="hanui-timeline__body-xJi7t",c_="hanui-timeline__title-pKxZJ",l_="hanui-timeline__time-ITWYy",d_="hanui-timeline__description-4vrEy",u_="hanui-timeline__srOnly-7K2We",Ce={timeline:s_,timeline__item:r_,timeline__marker:o_,"timeline__item--done":"hanui-timeline__item--done-dqiOQ","timeline__item--current":"hanui-timeline__item--current-TGV5f","timeline__item--pending":"hanui-timeline__item--pending-VMZTS","timeline__item--failed":"hanui-timeline__item--failed-2BbfX",timeline__body:i_,timeline__title:c_,timeline__time:l_,timeline__description:d_,timeline__srOnly:u_},__={done:t.jsx(D.CheckLg,{}),failed:t.jsx(D.XLg,{}),current:null,pending:null},oa={done:"completed",current:"current",pending:null,failed:"failed"},h_=({events:e,label:a,className:n,testId:r})=>{const{labels:o}=O();return t.jsx("ol",{className:v(Ce.timeline,n),"aria-label":a,"data-testid":r,children:e.map(c=>{var _;const i=c.status??"done";return t.jsxs("li",{className:v(Ce.timeline__item,Ce[`timeline__item--${i}`]),"aria-current":i==="current"?"step":void 0,children:[t.jsx("span",{className:Ce.timeline__marker,"aria-hidden":!0,children:c.icon??__[i]}),t.jsxs("div",{className:Ce.timeline__body,children:[t.jsxs("span",{className:Ce.timeline__title,children:[c.title,t.jsx("span",{className:Ce.timeline__srOnly,children:oa[i]===null?null:P(`Timeline.${oa[i]}`,(_=o==null?void 0:o.timeline)==null?void 0:_[oa[i]])})]}),c.time&&t.jsx("span",{className:Ce.timeline__time,children:c.time}),c.description&&t.jsx("span",{className:Ce.timeline__description,children:c.description})]})]},c.id)})})},p_=s.memo(L(h_,"Timeline")),m_="hanui-modal-3IDi9",b_="hanui-modal__panel--qLSz",g_="hanui-modal__header-meWm6",f_="hanui-modal__icon-df2dd",x_="hanui-modal__heading-PwDS8",v_="hanui-modal__title-80Sh6",y_="hanui-modal__description-fsCHI",w_="hanui-modal__close-vFPbw",j_="hanui-modal__body-PDF12",k_="hanui-modal__footer-CCCkx",se={modal:m_,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em",modal__panel:b_,modal__header:g_,modal__icon:f_,"modal__icon--neutral":"hanui-modal__icon--neutral-QSL7c","modal__icon--danger":"hanui-modal__icon--danger-6V90a","modal__icon--warning":"hanui-modal__icon--warning-a--FX","modal__icon--success":"hanui-modal__icon--success-YWxZs","modal__icon--info":"hanui-modal__icon--info-WRLah",modal__heading:x_,modal__title:v_,modal__description:y_,modal__close:w_,modal__body:j_,modal__footer:k_},N_=({isOpen:e,onClose:a,title:n,closeLabel:r,children:o,description:c,footer:i,icon:_,tone:h="neutral",size:d="md",isDismissable:l=!0,className:p,testId:u})=>{const{labels:b}=O(),g=s.useRef(null),j=s.useRef(null),m=s.useId(),f=s.useId();s.useEffect(()=>{const k=g.current;if(!k)return;if(!e){k.open&&k.close();return}const x=vt();k.open||k.showModal(),Vt(k,`.${se.modal__close}`),ga(k);const{token:$,pop:R}=St();return j.current=$,()=>{R(),j.current=null,x()}},[e]),Qt(e),s.useEffect(()=>{const k=g.current;if(!k)return;const x=$=>{$.preventDefault(),l&&(j.current&&!Lt(j.current)||a())};return k.addEventListener("cancel",x),()=>k.removeEventListener("cancel",x)},[a,l]);const N=s.useCallback(k=>{l&&k.target===g.current&&a()},[l,a]);return t.jsx("dialog",{ref:g,className:v(se.modal,se[`modal--${d}`],p),"aria-labelledby":m,"aria-describedby":c?f:void 0,"data-testid":u,onClick:N,children:t.jsxs("div",{className:se.modal__panel,children:[t.jsxs("header",{className:se.modal__header,children:[_&&t.jsx("span",{className:v(se.modal__icon,se[`modal__icon--${h}`]),children:_}),t.jsxs("div",{className:se.modal__heading,children:[t.jsx("h2",{id:m,className:se.modal__title,children:n}),c&&t.jsx("p",{id:f,className:se.modal__description,children:c})]}),l&&t.jsx(ke,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:P("Modal.closeLabel",r,b==null?void 0:b.close),variant:"ghost",size:"sm",className:se.modal__close,onClick:a})]}),o&&t.jsx("div",{className:se.modal__body,children:o}),i&&t.jsx("footer",{className:se.modal__footer,children:i})]})})},wa=s.memo(N_),$_="hanui-palette-ag-P9",E_="hanui-palette__search-G3aYv",I_="hanui-palette__searchIcon-2UYj-",C_="hanui-palette__input-vvLvt",T_="hanui-palette__list--KWiH",R_="hanui-palette__group-KPj5Q",D_="hanui-palette__item-UZzkp",S_="hanui-palette__icon-Fg0Lt",L_="hanui-palette__text-flfN9",A_="hanui-palette__label-8-UHe",F_="hanui-palette__description-eRlk9",M_="hanui-palette__shortcut-DwYKX",B_="hanui-palette__empty-vg-I3",Z={palette:$_,palette__search:E_,palette__searchIcon:I_,palette__input:C_,palette__list:T_,palette__group:R_,palette__item:D_,"palette__item--active":"hanui-palette__item--active-XHcka",palette__icon:S_,palette__text:L_,palette__label:A_,palette__description:F_,palette__shortcut:M_,palette__empty:B_},P_=({isOpen:e,onClose:a,items:n,label:r,searchPlaceholder:o,emptyMessage:c,className:i,testId:_})=>{const h=s.useId(),d=`${h}-listbox`,l=s.useRef(null),p=s.useRef(null),u=s.useRef(null),[b,g]=s.useState(""),[j,m]=s.useState(0),f=s.useMemo(()=>{if(b.trim()==="")return n;const x=b.trim();return n.filter($=>Dt($.label,x)||($.description?Dt($.description,x):!1))},[n,b]);Qt(e),s.useEffect(()=>{var w;const x=l.current;if(!x)return;if(!e){x.open&&x.close();return}const $=vt();x.open||x.showModal(),(w=p.current)==null||w.focus({preventScroll:!0}),g(""),m(0);const{token:R,pop:C}=St();return u.current=R,()=>{C(),u.current=null,$()}},[e]),s.useEffect(()=>{const x=l.current;if(!x)return;const $=R=>{R.preventDefault(),!(u.current&&!Lt(u.current))&&a()};return x.addEventListener("cancel",$),()=>x.removeEventListener("cancel",$)},[a]),s.useEffect(()=>{var x;pa((x=l.current)==null?void 0:x.querySelector(`[data-index="${j}"]`),{block:"nearest"})},[j]);const N=x=>{x.onSelect(),a()},k=x=>{const $=f.length-1;switch(x.key){case"ArrowDown":x.preventDefault(),m(R=>R>=$?0:R+1);break;case"ArrowUp":x.preventDefault(),m(R=>R<=0?$:R-1);break;case"Home":x.preventDefault(),m(0);break;case"End":x.preventDefault(),m($);break;case"Enter":{x.preventDefault();const R=f[j];R&&N(R);break}}};return t.jsxs("dialog",{ref:l,className:v(Z.palette,i),"aria-label":r,"data-testid":_,onClick:x=>x.target===l.current&&a(),children:[t.jsxs("div",{className:Z.palette__search,children:[t.jsx(D.Search,{"aria-hidden":!0,className:Z.palette__searchIcon}),t.jsx("input",{ref:p,type:"text",role:"combobox",className:Z.palette__input,value:b,placeholder:o,"aria-label":o,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":d,"aria-activedescendant":f[j]?`${h}-option-${j}`:void 0,onChange:x=>{g(x.target.value),m(0)},onKeyDown:k})]}),t.jsxs("ul",{id:d,role:"listbox","aria-label":r,className:Z.palette__list,children:[f.map((x,$)=>{var C;const R=x.group!==void 0&&x.group!==((C=f[$-1])==null?void 0:C.group);return t.jsxs("li",{role:"presentation",children:[R&&t.jsx("span",{className:Z.palette__group,"aria-hidden":!0,children:x.group}),t.jsxs("div",{id:`${h}-option-${$}`,role:"option","data-index":$,"aria-selected":$===j,className:v(Z.palette__item,$===j&&Z["palette__item--active"]),onMouseEnter:()=>m($),onClick:()=>N(x),children:[x.icon&&t.jsx("span",{className:Z.palette__icon,"aria-hidden":!0,children:x.icon}),t.jsxs("span",{className:Z.palette__text,children:[t.jsx("span",{className:Z.palette__label,children:x.label}),x.description&&t.jsx("span",{className:Z.palette__description,children:x.description})]}),x.shortcut&&t.jsx("kbd",{className:Z.palette__shortcut,"aria-hidden":!0,children:x.shortcut})]})]},x.id)}),f.length===0&&t.jsx("li",{role:"presentation",className:Z.palette__empty,children:c})]})]})},O_=s.memo(L(P_,"CommandPalette")),H_={destructive:t.jsx(D.TrashFill,{"aria-hidden":!0}),warning:t.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),neutral:t.jsx(D.QuestionCircleFill,{"aria-hidden":!0})},K_={destructive:"danger",warning:"warning",neutral:"info"},U_={destructive:je.DANGER,warning:je.PRIMARY,neutral:je.PRIMARY},z_=({isOpen:e,onClose:a,onConfirm:n,title:r,description:o,confirmLabel:c,cancelLabel:i,closeLabel:_,variant:h,kind:d,children:l})=>{const{labels:p}=O(),[u,b]=s.useState(!1),g=h??d??"neutral",j=async()=>{b(!0);try{await n()}finally{b(!1)}};return t.jsx(wa,{isOpen:e,onClose:a,title:r,closeLabel:_??(p==null?void 0:p.close),description:o,icon:H_[g],tone:K_[g],size:"sm",isDismissable:!u,footer:t.jsxs(t.Fragment,{children:[t.jsx(ft,{variant:je.SECONDARY,size:ze.MEDIUM,onClick:a,disabled:u,children:P("ConfirmDialog.cancelLabel",i,p==null?void 0:p.cancel)}),t.jsx(ft,{variant:U_[g],size:ze.MEDIUM,onClick:j,isLoading:u,children:c})]}),children:l})},Y_=s.memo(z_),q_="hanui-drawer-fgfi1",W_="hanui-drawer__header-BDcRe",X_="hanui-drawer__title-9M0e8",G_="hanui-drawer__close-Z30oW",V_="hanui-drawer__toolbar-vcsYi",Q_="hanui-drawer__body-x12SX",J_="hanui-drawer__footer-PajTg",ye={drawer:q_,"drawer--sm":"hanui-drawer--sm-ywgof","drawer--md":"hanui-drawer--md-mN8Kg","drawer--lg":"hanui-drawer--lg-5H-oE","drawer--end":"hanui-drawer--end-q-sIP","drawer--start":"hanui-drawer--start-xqVlX",drawer__header:W_,drawer__title:X_,drawer__close:G_,drawer__toolbar:V_,drawer__body:Q_,drawer__footer:J_},Z_=({isOpen:e,onClose:a,title:n,closeLabel:r,children:o,side:c="end",size:i="md",footer:_,toolbar:h,className:d,testId:l})=>{const{labels:p}=O(),u=s.useRef(null),b=s.useRef(null),g=s.useId();s.useEffect(()=>{const m=u.current;if(!m)return;if(!e){m.open&&m.close();return}const f=vt();m.open||m.showModal(),Vt(m,`.${ye.drawer__close}`),ga(m);const{token:N,pop:k}=St();return b.current=N,()=>{k(),b.current=null,f()}},[e]),Qt(e),an(e),s.useEffect(()=>{const m=u.current;if(!m)return;const f=N=>{N.preventDefault(),!(b.current&&!Lt(b.current))&&a()};return m.addEventListener("cancel",f),()=>m.removeEventListener("cancel",f)},[a]);const j=s.useCallback(m=>{m.target===u.current&&a()},[a]);return t.jsxs("dialog",{ref:u,className:v(ye.drawer,ye[`drawer--${c}`],ye[`drawer--${i}`],d),"aria-labelledby":g,"data-testid":l,onClick:j,children:[t.jsxs("header",{className:ye.drawer__header,children:[t.jsx("h2",{id:g,className:ye.drawer__title,children:n}),t.jsx(ke,{icon:t.jsx(D.XLg,{"aria-hidden":!0}),label:P("Drawer.closeLabel",r,p==null?void 0:p.close),variant:"ghost",size:"sm",className:ye.drawer__close,onClick:a})]}),h&&t.jsx("div",{className:ye.drawer__toolbar,children:h}),t.jsx("div",{className:ye.drawer__body,children:o}),_&&t.jsx("div",{className:ye.drawer__footer,children:_})]})},eh=s.memo(L(Z_,"Drawer")),th="hanui-form-zpZn4",ah={form:th},nh=({isOpen:e,onClose:a,onSubmit:n,title:r,label:o,submitLabel:c,cancelLabel:i,closeLabel:_,description:h,hint:d,placeholder:l,defaultValue:p="",isRequired:u,requiredLabel:b,inputMode:g="text",maxLength:j,rows:m=4})=>{const{labels:f}=O(),N=s.useId(),[k,x]=s.useState(p),[$,R]=s.useState(!1),C=s.useRef(!1);s.useEffect(()=>{e&&!C.current&&x(p),C.current=e},[e,p]);const w=k.trim(),E=!!u&&w==="",T=I=>g==="multiline"?t.jsx(nn,{...I,value:k,onChange:M=>x(M.target.value),placeholder:l,maxLength:j,rows:m}):t.jsx(va,{...I,type:g==="number"?"number":"text",value:k,onChange:M=>x(M.target.value),placeholder:l,maxLength:j}),y=async()=>{if(!(E||$)){R(!0);try{await n(w),a()}catch{}finally{R(!1)}}};return t.jsx(wa,{isOpen:e,onClose:a,title:r,closeLabel:_??(f==null?void 0:f.close),description:h,size:"sm",isDismissable:!$,footer:t.jsxs(t.Fragment,{children:[t.jsx(ft,{variant:je.SECONDARY,size:ze.MEDIUM,onClick:a,disabled:$,children:P("PromptDialog.cancelLabel",i,f==null?void 0:f.cancel)}),t.jsx(ft,{type:"submit",form:N,variant:je.PRIMARY,size:ze.MEDIUM,disabled:E,isLoading:$,children:P("PromptDialog.submitLabel",c,f==null?void 0:f.submit)})]}),children:t.jsx("form",{id:N,className:ah.form,onSubmit:I=>{I.preventDefault(),y()},children:t.jsx(sn,{label:o,hint:d,isRequired:u,requiredLabel:b,children:T})})})},sh=s.memo(nh),rh="hanui-scroller-EtDmS",oh="hanui-table-uCv4q",bt={scroller:rh,"scroller--frame":"hanui-scroller--frame-84zz6",table:oh,"table--compact":"hanui-table--compact-4KCVl","table--regular":"hanui-table--regular-hsA3-","table--spacious":"hanui-table--spacious-BBUX-","table--sticky-head":"hanui-table--sticky-head-FO2L4","table--row-hover":"hanui-table--row-hover--MAoe"},ih=L(s.memo(({hasFrame:e=!0,label:a,className:n,children:r,...o})=>{const c=s.useRef(null),[i,_]=s.useState(!1);return s.useEffect(()=>{const h=c.current;if(!h||typeof ResizeObserver>"u")return;const d=()=>_(h.scrollWidth>h.clientWidth+1);d();const l=new ResizeObserver(d);l.observe(h);for(const p of h.children)l.observe(p);return()=>l.disconnect()},[r]),t.jsx("div",{ref:c,tabIndex:i?0:void 0,role:i?"region":void 0,"aria-label":i?a:void 0,className:v(bt.scroller,e&&bt["scroller--frame"],n),...o,children:r})}),"TableScroller"),ch=({density:e="regular",hasStickyHead:a,hasRowHover:n,className:r,children:o,...c})=>t.jsx("table",{className:v(bt.table,bt[`table--${e}`],a&&bt["table--sticky-head"],n&&bt["table--row-hover"],r),...c,children:o}),lh=s.memo(ch),dh="hanui-wrapper-KXCZg",uh="hanui-table-LF5Ow",_h="hanui-state-YPPb0",hh="hanui-state__message-wwbIW",ph="hanui-srOnly-Oia8c",mh="hanui-sort-3Q6Fx",bh="hanui-sort__arrow-MITWb",gh="hanui-sticky-KDEvQ",fh="hanui-bulkBar-62qk0",ee={wrapper:dh,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:uh,state:_h,"state--error":"hanui-state--error-A492d",state__message:hh,"row--warning":"hanui-row--warning-BAUN2",srOnly:ph,sort:mh,sort__arrow:bh,"sort__arrow--ascending":"hanui-sort__arrow--ascending-85T5d","sort__arrow--descending":"hanui-sort__arrow--descending-gs3VU",sticky:gh,bulkBar:fh},xh=({columns:e,label:a,children:n,isLoading:r,error:o,emptyMessage:c,loadingMessage:i,hasViewportCap:_,onSort:h,bulkBar:d,className:l,testId:p})=>{var j,m;const{labels:u}=O(),b=s.Children.count(n),g=(f,N)=>t.jsx("tr",{children:t.jsx("td",{colSpan:e.length,className:v(ee.state,N&&ee[`state--${N}`]),children:f})});return t.jsxs("div",{className:v(ee.wrapper,_&&ee["wrapper--capped"],l),"data-testid":p,children:[d&&t.jsx("div",{className:ee.bulkBar,children:d}),t.jsxs("table",{className:ee.table,"aria-label":a,children:[t.jsx("thead",{children:t.jsx("tr",{children:e.map(f=>{const N=!!(f.isSortable&&h),k=f.ariaSort==="ascending"?"descending":"ascending";return t.jsx("th",{scope:"col","aria-sort":f.ariaSort,className:v(f.className,f.isSticky&&ee.sticky),children:N?t.jsxs("button",{type:"button",className:ee.sort,onClick:()=>h==null?void 0:h(f.key,k),children:[f.label,f.srLabel&&t.jsx("span",{className:ee.srOnly,children:f.srLabel}),t.jsx("span",{"aria-hidden":!0,className:v(ee.sort__arrow,f.ariaSort&&ee[`sort__arrow--${f.ariaSort}`]),children:f.ariaSort==="descending"?"▾":"▴"})]}):t.jsxs(t.Fragment,{children:[f.label,f.srLabel&&t.jsx("span",{className:ee.srOnly,children:f.srLabel})]})},f.key)})})}),t.jsx("tbody",{children:o?g(t.jsxs("span",{role:"alert",className:ee.state__message,children:[t.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),o]}),"error"):r?g(P("DataTable.loadingMessage",i,(j=u==null?void 0:u.dataTable)==null?void 0:j.loading)):b===0?g(P("DataTable.emptyMessage",c,(m=u==null?void 0:u.dataTable)==null?void 0:m.empty)):n})]})]})},vh=L(s.memo(({isWarning:e,className:a,children:n,...r})=>t.jsx("tr",{className:v(e&&ee["row--warning"],a),...r,children:n})),"DataTableRow"),yh=s.memo(xh),wh="hanui-bar-b4PP4",jh="hanui-bar__hiddenSubmit-jeCyX",kh="hanui-bar__actions-rG69L",Nh="hanui-field-f-rvu",Rt={bar:wh,bar__hiddenSubmit:jh,bar__actions:kh,field:Nh,"field--wide":"hanui-field--wide-FA5gf"},$h=({onSubmit:e,children:a,actions:n,label:r,className:o,testId:c})=>{const{labels:i}=O();return t.jsxs("form",{className:v(Rt.bar,o),"aria-label":P("FilterBar.label",r,i==null?void 0:i.filters),"data-testid":c,onSubmit:_=>{_.preventDefault(),e()},children:[a,t.jsx("button",{type:"submit",className:Rt.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),n&&t.jsx("div",{className:Rt.bar__actions,children:n})]})},Eh=L(s.memo(({children:e,isWide:a,className:n})=>t.jsx("div",{className:v(Rt.field,a&&Rt["field--wide"],n),children:e})),"FilterBarField"),Ih=s.memo($h),Ch="hanui-pagination-K-L20",Th="hanui-pagination__list--9HqC",Rh="hanui-pagination__arrow-XIgoX",Dh="hanui-pagination__page-TpoJM",Sh="hanui-pagination__gap-qoDyI",Te={pagination:Ch,pagination__list:Th,pagination__arrow:Rh,pagination__page:Dh,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:Sh},Lh=(e,a)=>{if(a<=7)return Array.from({length:a},(c,i)=>i+1);const n=new Set([1,a,e]);e-1>1&&n.add(e-1),e+1<a&&n.add(e+1);const r=[...n].sort((c,i)=>c-i),o=[];return r.forEach((c,i)=>{i>0&&c-r[i-1]>1&&o.push("gap"),o.push(c)}),o},Ah=({page:e,totalPages:a,label:n,previousLabel:r,nextLabel:o,buildHref:c,onPageChange:i,linkProps:_,formatAnnouncement:h,scrollTo:d,className:l,testId:p})=>{var $,R,C;const{labels:u}=O(),b=Xt(),g=s.useRef(e);s.useEffect(()=>{g.current!==e&&(g.current=e,h&&b(h(e,a)))},[e,a,h,b]);const j=s.useMemo(()=>Lh(e,a),[e,a]);if(a<=1)return null;const m=w=>{d==="top"&&w!==e&&Cn()},f=w=>{i&&(i(w),m(w))},N=_==null?void 0:_.onClick,k=(w,E)=>{N==null||N(w),!(w.defaultPrevented||w.button!==0)&&(w.metaKey||w.ctrlKey||w.shiftKey||w.altKey||m(E))},x=(w,E,T)=>{const y=w<1||w>a;return c&&!y?t.jsx(ue,{href:c(w),className:Te.pagination__arrow,"aria-label":E,..._,onClick:I=>k(I,w),children:T}):t.jsx(ke,{className:Te.pagination__arrow,icon:T,label:E,variant:"outline",disabled:y,onClick:()=>f(w)})};return t.jsxs("nav",{className:v(Te.pagination,l),"aria-label":P("Pagination.label",n,($=u==null?void 0:u.pagination)==null?void 0:$.label),"data-testid":p,children:[x(e-1,P("Pagination.previousLabel",r,(R=u==null?void 0:u.pagination)==null?void 0:R.previous),t.jsx(D.CaretLeftFill,{"aria-hidden":!0})),t.jsx("ul",{className:Te.pagination__list,children:j.map((w,E)=>w==="gap"?t.jsx("li",{className:Te.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${E}`):t.jsx("li",{children:c?t.jsx(ue,{href:c(w),className:v(Te.pagination__page,w===e&&Te["pagination__page--active"]),"aria-current":w===e?"page":void 0,..._,onClick:T=>k(T,w),children:w}):t.jsx(ft,{variant:je.SECONDARY,size:ze.SMALL,className:v(Te.pagination__page,w===e&&Te["pagination__page--active"]),"aria-current":w===e?"page":void 0,onClick:()=>f(w),children:w})},w))}),x(e+1,P("Pagination.nextLabel",o,(C=u==null?void 0:u.pagination)==null?void 0:C.next),t.jsx(D.CaretRightFill,{"aria-hidden":!0}))]})},Fh=s.memo(Ah);exports.ABOVE_MOBILE_MEDIA_QUERY=Gt;exports.ABOVE_TABLET_MEDIA_QUERY=Sn;exports.Accordion=Su;exports.Alert=Qi;exports.Avatar=sc;exports.Badge=cc;exports.BottomSheet=xa;exports.Breadcrumb=mc;exports.Button=ft;exports.COMPACT_DENSITY=xn;exports.Card=Cc;exports.CardBody=Ec;exports.CardFooter=Ic;exports.CardMedia=Nc;exports.CardOverlay=$c;exports.Carousel=Mc;exports.Checkbox=Lr;exports.Chip=Ja;exports.ChipGroup=Is;exports.CodeBadge=zc;exports.Combobox=cr;exports.CommandPalette=O_;exports.ConfirmDialog=Y_;exports.CopyField=Vc;exports.DARK_THEME=qa;exports.DEFAULT_FONTS=vn;exports.DENSITY_ATTRIBUTE=_a;exports.DataTable=yh;exports.DataTableRow=vh;exports.DateField=si;exports.DateRange=oi;exports.Directory=fl;exports.DirectoryGroup=ml;exports.DirectoryJump=gl;exports.DirectoryRow=bl;exports.Divider=el;exports.Drawer=eh;exports.EmptyState=Nl;exports.Field=sn;exports.FileUpload=Ki;exports.FilterBar=Ih;exports.FilterBarField=Eh;exports.HanuiProvider=wn;exports.IconButton=ke;exports.Input=va;exports.LIGHT_THEME=Ya;exports.METRIC_TOKENS=fn;exports.MOBILE_BREAKPOINT=Va;exports.Menu=gs;exports.Modal=wa;exports.PageHeader=Ml;exports.Pagination=Fh;exports.Panel=ed;exports.PanelForm=Jl;exports.PanelRow=Zl;exports.PasswordInput=Ho;exports.Popover=vs;exports.Price=id;exports.Progress=on;exports.ProgressCircle=$i;exports.PromptDialog=sh;exports.QuantityStepper=Eo;exports.Radio=Vr;exports.RadioCard=ao;exports.RangeSlider=_o;exports.Rating=pd;exports.RatingInput=wo;exports.ScrollArea=Nd;exports.SectionHeader=wd;exports.SegmentedControl=pr;exports.Select=Er;exports.Skeleton=Fd;exports.SkeletonCard=Od;exports.SkeletonRows=Hd;exports.SkeletonTable=Kd;exports.Spinner=ba;exports.Stat=Zd;exports.Steps=zu;exports.SummaryCard=cu;exports.Switch=Kr;exports.TABLET_BREAKPOINT=Qa;exports.TABLET_PORTRAIT_BREAKPOINT=Dn;exports.THEME_ATTRIBUTE=Ke;exports.Table=lh;exports.TableCheckbox=Ro;exports.TableScroller=ih;exports.Tabs=Qu;exports.TagInput=Wo;exports.TextLink=Xn;exports.Textarea=nn;exports.Tile=n_;exports.Timeline=p_;exports.ToastHub=ln;exports.ToastPortal=ju;exports.Tooltip=us;exports.UISize=ze;exports.UIVariant=je;exports.applyThemeConfig=ha;exports.buildThemeCss=Wa;exports.initHanui=jn;exports.matchesSearch=Dt;exports.normalizeSearchTerm=ia;exports.resolveTokens=yn;exports.toast=xu;exports.useAnnounce=Xt;exports.useHanui=O;exports.useHanuiTheme=In;exports.useListboxNavigation=ma;exports.usePositioning=xt;exports.useVirtualList=Ga;
22
22
  //# sourceMappingURL=index.cjs.map