@ahmetilhn/hanui 1.2.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.cjs CHANGED
@@ -1,18 +1,22 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),q=require("@ahmetilhn/handy-utils"),D=require("react-bootstrap-icons"),on=require("react-dom"),v={n0:"#ffffff",n25:"#fafbfc",n50:"#f6f7f9",n100:"#eef0f4",n150:"#e7eaef",n200:"#e2e6ec",n250:"#d6dce4",n300:"#c9d0da",n500:"#8a94a3",n550:"#6b7583",n600:"#5a6472",n900:"#11151b"},V={base:"#1f2937",two:"#2b3646",three:"#3a4658",ink:"#12161d",inkTwo:"#1c222b"},ne={base:"#f59e0b",hover:"#d98706",active:"#b87205",soft:"#f8cd80",dark:"#fbbf24",darkHover:"#f0af12",on:"#291500"},O={base:"#2f6fed",hover:"#1d54c4",active:"#17439c",text:"#1d54c4",tint:"#eaf1fe",line:"#bcd2fb",dark:"#5b93ff",darkHover:"#7aa8ff",darkTint:"#16243c",darkLine:"#2a3f63"},C={okBg:"#e8f4eb",okFg:"#1d6e31",okLine:"#a8dcb7",okBgDark:"#122817",okFgDark:"#34c759",okLineDark:"#22542f",warnBg:"#fdf0dd",warnFg:"#7a3e02",warnLine:"#ebc687",warnBgDark:"#2c2008",warnFgDark:"#f5c86b",warnLineDark:"#55401a",offBg:"#f1f2f5",offFg:"#3a424f",offLine:"#ccd2db",offBgDark:"#212630",offFgDark:"#a3adbb",offLineDark:"#333b47",badBg:"#f8ebeb",badFg:"#bb1e1e",badLine:"#e6a6a6",badBgDark:"#310f0f",badFgDark:"#e97575",badLineDark:"#621b1b",oemBg:"#eaf1fe",oemFg:"#16305c",oemLine:"#a9c6f9",oemBgDark:"#152139",oemFgDark:"#9dc0ff",oemLineDark:"#27395c",altBg:"#eeebfa",altFg:"#2e2661",altLine:"#c0b6ea",altBgDark:"#1d1a33",altFgDark:"#bfb3f5",altLineDark:"#332d56"},je={base:"#dc2626",hover:"#bb1e1e",dark:"#e45b5b",darkHover:"#ef7a72",onDark:"#1a0b0a"},be={red:"#dc2626",redDark:"#e35252",green:"#34c759",greenDark:"#4cd76c",greenHover:"#2aae4b",greenHoverDark:"#63e084",onGreen:"#06280f"},Ve={bg:"#e8f4eb",fg:"#1d6e31",bgDark:"#122817",fgDark:"#34c759"},xa={light:"#9a5f04",dark:"#f0b429"},N=(a,n)=>{const t=a.replace("#",""),o=t.length===3?t.split("").map(l=>l+l).join(""):t,i=parseInt(o.slice(0,2),16),r=parseInt(o.slice(2,4),16),c=parseInt(o.slice(4,6),16);return`rgba(${i}, ${r}, ${c}, ${n})`},Y="#000000",fa={page:v.n50,surface:v.n0,"surface-2":v.n100,"surface-3":v.n150,"surface-inset":v.n25,border:v.n250,"border-strong":v.n300,text:v.n900,"text-2":v.n600,"text-3":v.n550,graphite:V.base,"graphite-2":V.two,"graphite-3":V.three,action:V.base,"action-hover":V.two,"action-active":V.three,"on-action":v.n0,"action-soft":v.n300,amber:ne.base,"amber-hover":ne.hover,"amber-active":ne.active,"amber-soft":ne.soft,"on-amber":ne.on,blue:O.base,"blue-hover":O.hover,"blue-active":O.active,"blue-text":O.text,"blue-tint":O.tint,"blue-line":O.line,"ok-bg":C.okBg,"ok-fg":C.okFg,"ok-line":C.okLine,"warn-bg":C.warnBg,"warn-fg":C.warnFg,"warn-line":C.warnLine,"off-bg":C.offBg,"off-fg":C.offFg,"off-line":C.offLine,"bad-bg":C.badBg,"bad-fg":C.badFg,"bad-line":C.badLine,"oem-bg":C.oemBg,"oem-fg":C.oemFg,"oem-line":C.oemLine,"alt-bg":C.altBg,"alt-fg":C.altFg,"alt-line":C.altLine,"sale-bg":Ve.bg,"sale-fg":Ve.fg,"red-accent":be.red,"green-accent":be.green,"green-accent-hover":be.greenHover,"on-green":be.onGreen,star:xa.light,"danger-solid":je.base,"danger-solid-hover":je.hover,"on-danger":v.n0,"nav-bg":v.n0,"nav-bg-2":v.n100,"nav-fg":v.n900,"nav-fg-2":v.n600,"nav-fg-3":v.n500,"nav-line":v.n200,"nav-line-strong":v.n300,"nav-hover":v.n100,"footer-bg":v.n100,"shadow-xs":`0 1px 2px ${N(v.n900,.05)}`,"shadow-sm":`0 1px 2px ${N(v.n900,.05)}, 0 1px 3px ${N(v.n900,.04)}`,"shadow-md":`0 2px 4px ${N(v.n900,.04)}, 0 6px 16px ${N(v.n900,.07)}`,"shadow-lg":`0 4px 8px ${N(v.n900,.05)}, 0 16px 32px ${N(v.n900,.1)}`,"shadow-xl":`0 8px 16px ${N(v.n900,.06)}, 0 28px 56px ${N(v.n900,.13)}`,"shadow-up":`0 -2px 4px ${N(v.n900,.03)}, 0 -8px 24px ${N(v.n900,.08)}`,ring:`0 0 0 3px ${N(O.base,.28)}`,"ring-color":O.base,"ring-danger":`0 0 0 3px ${N(je.base,.24)}`,"ring-ok":`0 0 0 4px ${N(C.okFg,.16)}`,scrim:N(v.n900,.55),"scrim-soft":N(v.n900,.32),glass:N(v.n0,.92),"glass-solid":v.n0,"on-scrim":v.n0,"skeleton-a":v.n100,"skeleton-b":v.n25,track:N(v.n900,.12),"media-bg":v.n100,"glow-1":N(O.base,.1),"glow-2":N(O.base,.06),"glow-amber":N(ne.base,.09)},ya={page:"#0e1116",surface:"#171b22","surface-2":"#1f242d","surface-3":"#262c36","surface-inset":"#13171d",border:"#262c36","border-strong":"#363e4a",text:"#e7eaee","text-2":"#9aa4b2","text-3":"#6b7583",graphite:V.ink,"graphite-2":V.inkTwo,"graphite-3":V.two,action:v.n150,"action-hover":v.n0,"action-active":v.n300,"on-action":v.n900,"action-soft":"#414a58",amber:ne.dark,"amber-hover":ne.darkHover,"amber-active":ne.base,"amber-soft":"#6d5316","on-amber":ne.on,blue:O.dark,"blue-hover":O.darkHover,"blue-active":O.base,"blue-text":O.dark,"blue-tint":O.darkTint,"blue-line":O.darkLine,"ok-bg":C.okBgDark,"ok-fg":C.okFgDark,"ok-line":C.okLineDark,"warn-bg":C.warnBgDark,"warn-fg":C.warnFgDark,"warn-line":C.warnLineDark,"off-bg":C.offBgDark,"off-fg":C.offFgDark,"off-line":C.offLineDark,"bad-bg":C.badBgDark,"bad-fg":C.badFgDark,"bad-line":C.badLineDark,"oem-bg":C.oemBgDark,"oem-fg":C.oemFgDark,"oem-line":C.oemLineDark,"alt-bg":C.altBgDark,"alt-fg":C.altFgDark,"alt-line":C.altLineDark,"sale-bg":Ve.bgDark,"sale-fg":Ve.fgDark,"red-accent":be.redDark,"green-accent":be.greenDark,"green-accent-hover":be.greenHoverDark,"on-green":be.onGreen,star:xa.dark,"danger-solid":je.dark,"danger-solid-hover":je.darkHover,"on-danger":je.onDark,"nav-bg":V.ink,"nav-bg-2":V.inkTwo,"nav-fg":"#e7eaee","nav-fg-2":"#9aa4b2","nav-fg-3":"#6b7583","nav-line":"#262c36","nav-line-strong":"#363e4a","nav-hover":N(v.n0,.07),"footer-bg":V.ink,"shadow-xs":`0 1px 2px ${N(Y,.4)}`,"shadow-sm":`0 1px 2px ${N(Y,.4)}, 0 1px 3px ${N(Y,.3)}`,"shadow-md":`0 2px 4px ${N(Y,.35)}, 0 6px 16px ${N(Y,.45)}`,"shadow-lg":`0 4px 8px ${N(Y,.4)}, 0 16px 32px ${N(Y,.55)}`,"shadow-xl":`0 8px 16px ${N(Y,.45)}, 0 28px 56px ${N(Y,.6)}`,"shadow-up":`0 -2px 4px ${N(Y,.3)}, 0 -8px 24px ${N(Y,.45)}`,ring:`0 0 0 3px ${N(O.dark,.36)}`,"ring-color":O.dark,"ring-danger":`0 0 0 3px ${N(je.dark,.32)}`,"ring-ok":`0 0 0 4px ${N(C.okFgDark,.2)}`,scrim:N(Y,.68),"scrim-soft":N(Y,.45),glass:N("#1f242d",.92),"glass-solid":"#1f242d","on-scrim":v.n0,"skeleton-a":"#1f242d","skeleton-b":"#262c36",track:N(v.n0,.14),"media-bg":"#1f242d","glow-1":N(O.base,.2),"glow-2":N(O.dark,.1),"glow-amber":N(ne.dark,.12)},sn={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"},ha="--hanui-",ma="hanui-theme-overrides",we="data-hanui-theme",pa="hanui-theme-switching",rn=(a,n)=>{const t=a==="dark"?ya:fa,o=(a==="dark"?n==null?void 0:n.dark:n==null?void 0:n.light)??{};return{...t,...o}},va=a=>{const n=[],t=(r,c=" ")=>Object.entries(r).map(([l,d])=>`${c}${ha}${l}: ${d};`).join(`
2
- `),o=a.fonts??{},i=Object.entries(o).filter(([,r])=>!!r);if(i.length>0&&n.push(`:root {
3
- ${i.map(([r,c])=>` ${ha}font-${r}: ${c};`).join(`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),H=require("@ahmetilhn/handy-utils"),I=require("react-bootstrap-icons"),xt=require("react-dom"),D={n0:"#ffffff",n25:"#fafbfc",n50:"#f6f7f9",n100:"#eef0f4",n150:"#e7eaef",n200:"#e2e6ec",n250:"#d6dce4",n300:"#c9d0da",n550:"#626c7a",n600:"#5a6472",n900:"#11151b"},re={base:"#1f2937",two:"#2b3646",three:"#3a4658",ink:"#12161d",inkTwo:"#1c222b"},le={base:"#f59e0b",hover:"#d98706",active:"#b87205",soft:"#f8cd80",dark:"#fbbf24",darkHover:"#f0af12",on:"#291500"},q={base:"#2f6fed",hover:"#1d54c4",active:"#17439c",text:"#1d54c4",tint:"#eaf1fe",line:"#bcd2fb",dark:"#5b93ff",darkHover:"#7aa8ff",darkTint:"#16243c",darkLine:"#2a3f63"},F={okBg:"#e8f4eb",okFg:"#1d6e31",okLine:"#a8dcb7",okBgDark:"#122817",okFgDark:"#34c759",okLineDark:"#22542f",warnBg:"#fdf0dd",warnFg:"#7a3e02",warnLine:"#ebc687",warnBgDark:"#2c2008",warnFgDark:"#f5c86b",warnLineDark:"#55401a",offBg:"#f1f2f5",offFg:"#3a424f",offLine:"#ccd2db",offBgDark:"#212630",offFgDark:"#a3adbb",offLineDark:"#333b47",badBg:"#f8ebeb",badFg:"#bb1e1e",badLine:"#e6a6a6",badBgDark:"#310f0f",badFgDark:"#e97575",badLineDark:"#621b1b",oemBg:"#eaf1fe",oemFg:"#16305c",oemLine:"#a9c6f9",oemBgDark:"#152139",oemFgDark:"#9dc0ff",oemLineDark:"#27395c",altBg:"#eeebfa",altFg:"#2e2661",altLine:"#c0b6ea",altBgDark:"#1d1a33",altFgDark:"#bfb3f5",altLineDark:"#332d56"},Ke={base:"#dc2626",hover:"#bb1e1e",dark:"#e45b5b",darkHover:"#ef7a72",onDark:"#1a0b0a"},De={red:"#dc2626",redDark:"#e35252",green:"#299d46",greenDark:"#4cd76c",greenHover:"#23883c",greenHoverDark:"#63e084",onGreen:"#06280f"},$t={bg:"#e8f4eb",fg:"#1d6e31",bgDark:"#122817",fgDark:"#34c759"},da={light:"#9a5f04",dark:"#f0b429"},R=(e,a)=>{const n=e.replace("#",""),r=n.length===3?n.split("").map(_=>_+_).join(""):n,i=parseInt(r.slice(0,2),16),c=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`rgba(${i}, ${c}, ${o}, ${a})`},te="#000000",ua={page:D.n50,surface:D.n0,"surface-2":D.n100,"surface-3":D.n150,"surface-inset":D.n25,border:D.n250,"border-strong":D.n300,text:D.n900,"text-2":D.n600,"text-3":D.n550,graphite:re.base,"graphite-2":re.two,"graphite-3":re.three,action:re.base,"action-hover":re.two,"action-active":re.three,"on-action":D.n0,"action-soft":D.n300,amber:le.base,"amber-hover":le.hover,"amber-active":le.active,"amber-soft":le.soft,"on-amber":le.on,blue:q.base,"blue-hover":q.hover,"blue-active":q.active,"blue-text":q.text,"blue-tint":q.tint,"blue-line":q.line,"ok-bg":F.okBg,"ok-fg":F.okFg,"ok-line":F.okLine,"warn-bg":F.warnBg,"warn-fg":F.warnFg,"warn-line":F.warnLine,"off-bg":F.offBg,"off-fg":F.offFg,"off-line":F.offLine,"bad-bg":F.badBg,"bad-fg":F.badFg,"bad-line":F.badLine,"oem-bg":F.oemBg,"oem-fg":F.oemFg,"oem-line":F.oemLine,"alt-bg":F.altBg,"alt-fg":F.altFg,"alt-line":F.altLine,"sale-bg":$t.bg,"sale-fg":$t.fg,"red-accent":De.red,"green-accent":De.green,"green-accent-hover":De.greenHover,"on-green":De.onGreen,star:da.light,"danger-solid":Ke.base,"danger-solid-hover":Ke.hover,"on-danger":D.n0,"nav-bg":D.n0,"nav-bg-2":D.n100,"nav-fg":D.n900,"nav-fg-2":D.n600,"nav-fg-3":D.n550,"nav-line":D.n200,"nav-line-strong":D.n300,"nav-hover":D.n100,"footer-bg":D.n100,"shadow-xs":`0 1px 2px ${R(D.n900,.05)}`,"shadow-sm":`0 1px 2px ${R(D.n900,.05)}, 0 1px 3px ${R(D.n900,.04)}`,"shadow-md":`0 2px 4px ${R(D.n900,.04)}, 0 6px 16px ${R(D.n900,.07)}`,"shadow-lg":`0 4px 8px ${R(D.n900,.05)}, 0 16px 32px ${R(D.n900,.1)}`,"shadow-xl":`0 8px 16px ${R(D.n900,.06)}, 0 28px 56px ${R(D.n900,.13)}`,"shadow-up":`0 -2px 4px ${R(D.n900,.03)}, 0 -8px 24px ${R(D.n900,.08)}`,ring:`0 0 0 3px ${R(q.base,.28)}`,"ring-color":q.base,"ring-danger":`0 0 0 3px ${R(Ke.base,.24)}`,"ring-ok":`0 0 0 4px ${R(F.okFg,.16)}`,scrim:R(D.n900,.6),"scrim-soft":R(D.n900,.32),glass:R(D.n0,.92),"glass-solid":D.n0,"on-scrim":D.n0,"skeleton-a":D.n100,"skeleton-b":D.n25,track:R(D.n900,.12),"media-bg":D.n100,"glow-1":R(q.base,.1),"glow-2":R(q.base,.06),"glow-amber":R(le.base,.09)},_a={page:"#0e1116",surface:"#171b22","surface-2":"#1f242d","surface-3":"#262c36","surface-inset":"#13171d",border:"#262c36","border-strong":"#363e4a",text:"#e7eaee","text-2":"#9aa4b2","text-3":"#818b99",graphite:re.ink,"graphite-2":re.inkTwo,"graphite-3":re.two,action:D.n150,"action-hover":D.n0,"action-active":D.n300,"on-action":D.n900,"action-soft":"#414a58",amber:le.dark,"amber-hover":le.darkHover,"amber-active":le.base,"amber-soft":"#6d5316","on-amber":le.on,blue:q.dark,"blue-hover":q.darkHover,"blue-active":q.base,"blue-text":q.dark,"blue-tint":q.darkTint,"blue-line":q.darkLine,"ok-bg":F.okBgDark,"ok-fg":F.okFgDark,"ok-line":F.okLineDark,"warn-bg":F.warnBgDark,"warn-fg":F.warnFgDark,"warn-line":F.warnLineDark,"off-bg":F.offBgDark,"off-fg":F.offFgDark,"off-line":F.offLineDark,"bad-bg":F.badBgDark,"bad-fg":F.badFgDark,"bad-line":F.badLineDark,"oem-bg":F.oemBgDark,"oem-fg":F.oemFgDark,"oem-line":F.oemLineDark,"alt-bg":F.altBgDark,"alt-fg":F.altFgDark,"alt-line":F.altLineDark,"sale-bg":$t.bgDark,"sale-fg":$t.fgDark,"red-accent":De.redDark,"green-accent":De.greenDark,"green-accent-hover":De.greenHoverDark,"on-green":De.onGreen,star:da.dark,"danger-solid":Ke.dark,"danger-solid-hover":Ke.darkHover,"on-danger":Ke.onDark,"nav-bg":re.ink,"nav-bg-2":re.inkTwo,"nav-fg":"#e7eaee","nav-fg-2":"#9aa4b2","nav-fg-3":"#818b99","nav-line":"#262c36","nav-line-strong":"#363e4a","nav-hover":R(D.n0,.07),"footer-bg":re.ink,"shadow-xs":`0 1px 2px ${R(te,.4)}`,"shadow-sm":`0 1px 2px ${R(te,.4)}, 0 1px 3px ${R(te,.3)}`,"shadow-md":`0 2px 4px ${R(te,.35)}, 0 6px 16px ${R(te,.45)}`,"shadow-lg":`0 4px 8px ${R(te,.4)}, 0 16px 32px ${R(te,.55)}`,"shadow-xl":`0 8px 16px ${R(te,.45)}, 0 28px 56px ${R(te,.6)}`,"shadow-up":`0 -2px 4px ${R(te,.3)}, 0 -8px 24px ${R(te,.45)}`,ring:`0 0 0 3px ${R(q.dark,.36)}`,"ring-color":q.dark,"ring-danger":`0 0 0 3px ${R(Ke.dark,.32)}`,"ring-ok":`0 0 0 4px ${R(F.okFgDark,.2)}`,scrim:R(te,.68),"scrim-soft":R(te,.45),glass:R("#1f242d",.92),"glass-solid":"#1f242d","on-scrim":D.n0,"skeleton-a":"#1f242d","skeleton-b":"#262c36",track:R(D.n0,.14),"media-bg":"#1f242d","glow-1":R(q.base,.2),"glow-2":R(q.dark,.1),"glow-amber":R(le.dark,.12)},Sa={"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"},La={"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","leading-normal":"1.5","leading-relaxed":"1.6"},Aa={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"},Zt="--hanui-",Vt="hanui-theme-overrides",Ue="data-hanui-theme",ha="data-hanui-density",ea="hanui-theme-switching",Fa=(e,a)=>{const n=e==="dark"?_a:ua,r=(e==="dark"?a==null?void 0:a.dark:a==null?void 0:a.light)??{};return{...n,...r}},pa=e=>{const a=[],n=(o,_=" ")=>Object.entries(o).map(([h,u])=>`${_}${Zt}${h}: ${u};`).join(`
2
+ `),r=e.fonts??{},i=Object.entries(r).filter(([,o])=>!!o);i.length>0&&a.push(`:root {
3
+ ${i.map(([o,_])=>` ${Zt}font-${o}: ${_};`).join(`
4
4
  `)}
5
- }`),a.light&&Object.keys(a.light).length>0){const r=t(a.light);n.push(`:root {
6
- ${r}
7
- }`),n.push(`:root[${we}='light'] {
8
- ${r}
9
- }`)}if(a.dark&&Object.keys(a.dark).length>0){const r=t(a.dark);n.push(`:root[${we}='dark'] {
10
- ${r}
11
- }`),n.push(`@media (prefers-color-scheme: dark) {
12
- :root:not([${we}]) {
13
- ${t(a.dark," ")}
5
+ }`);const c=e.metrics??{};if(Object.keys(c).length>0){const o=n(c);a.push(`:root {
6
+ ${o}
7
+ }`),a.push(`:root[${ha}='compact'] {
8
+ ${o}
9
+ }`)}if(e.light&&Object.keys(e.light).length>0){const o=n(e.light);a.push(`:root {
10
+ ${o}
11
+ }`),a.push(`:root[${Ue}='light'] {
12
+ ${o}
13
+ }`)}if(e.dark&&Object.keys(e.dark).length>0){const o=n(e.dark);a.push(`:root[${Ue}='dark'] {
14
+ ${o}
15
+ }`),a.push(`@media (prefers-color-scheme: dark) {
16
+ :root:not([${Ue}]) {
17
+ ${n(e.dark," ")}
14
18
  }
15
- }`)}return n.join(`
19
+ }`)}return a.join(`
16
20
 
17
- `)},ka=a=>{if(!q.isClient())return;const n=a?va(a):"",t=document.getElementById(ma);if(n===""){t==null||t.remove();return}const o=t??document.createElement("style");o.id=ma,o.textContent=n,t||document.head.appendChild(o)},Na=s.createContext({}),A=()=>s.useContext(Na),cn=({children:a,theme:n,linkComponent:t,labels:o})=>{const i=s.useMemo(()=>n?JSON.stringify(n):"",[n]);s.useEffect(()=>{ka(n)},[i]);const r=s.useRef(n);r.current=n;const c=s.useMemo(()=>({theme:r.current,linkComponent:t,labels:o}),[i,t,o]);return e.jsx(Na.Provider,{value:c,children:a})},ln=(a={})=>{ka(a.theme),!(!q.isClient()||!a.colorScheme)&&document.documentElement.setAttribute(we,a.colorScheme)},ja=()=>{var a;return q.isClient()&&((a=window.matchMedia)!=null&&a.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},dn=()=>{if(!q.isClient())return"light";const a=document.documentElement.getAttribute(we);return a==="dark"||a==="light"?a:ja()},_n=()=>{const[a,n]=s.useState("light"),[t,o]=s.useState(!1);s.useEffect(()=>{n(dn()),o(!0)},[]),s.useEffect(()=>{if(!q.isClient()||!window.matchMedia)return;const c=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>{document.documentElement.hasAttribute(we)||n(ja())};return c.addEventListener("change",l),()=>c.removeEventListener("change",l)},[]);const i=s.useCallback(c=>{if(!q.isClient())return;const l=document.documentElement;l.classList.add(pa),l.setAttribute(we,c),n(c),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(pa))})},[]),r=s.useCallback(()=>i(a==="dark"?"light":"dark"),[a,i]);return{scheme:a,setScheme:i,toggle:r,isReady:t}},wa="--hanui-sheet-height",$a="--hanui-sheet-inset-bottom";let Ye=0,Me=0;const Ca=()=>{const a=window.visualViewport;if(!a)return;const n=window.innerHeight-a.height-a.offsetTop,t=document.documentElement;t.style.setProperty($a,`${Math.max(0,Math.round(n))}px`),t.style.setProperty(wa,`${Math.round(a.height)}px`)},De=()=>{Me||(Me=window.requestAnimationFrame(()=>{Me=0,Ca()}))},Da=(a=!0)=>{s.useEffect(()=>{if(!a)return;const n=window.visualViewport;if(n)return Ye+=1,Ye===1&&(n.addEventListener("resize",De),n.addEventListener("scroll",De),window.addEventListener("orientationchange",De)),Ca(),()=>{Ye-=1,!(Ye>0)&&(n.removeEventListener("resize",De),n.removeEventListener("scroll",De),window.removeEventListener("orientationchange",De),Me&&(window.cancelAnimationFrame(Me),Me=0),document.documentElement.style.removeProperty($a),document.documentElement.style.removeProperty(wa))}},[a])};var oe=(a=>(a.PRIMARY="PRIMARY",a.CART="CART",a.SECONDARY="SECONDARY",a.OUTLINE="OUTLINE",a.DARK="DARK",a.LIGHT="LIGHT",a.GHOST="GHOST",a.DANGER="DANGER",a))(oe||{}),ge=(a=>(a.SMALL="SMALL",a.MEDIUM="MEDIUM",a.LARGE="LARGE",a))(ge||{});const Ea=640,un=768,Ra=1024,hn=`(min-width: ${Ra+1}px)`,We=`(min-width: ${Ea+1}px)`,oa=a=>a.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(),sa=(a,n)=>oa(a).includes(oa(n)),mn=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Ia=a=>{if(!(a instanceof HTMLElement))return!1;if(a.isContentEditable)return!0;const n=a.getAttribute("contenteditable");if(n===""||n==="true"||n==="plaintext-only")return!0;const t=a.tagName;return t==="TEXTAREA"?!0:t!=="INPUT"?!1:!mn.has(a.type)},ra=a=>{const n=a.ownerDocument.activeElement;!a.contains(n)||!Ia(n)||(n.blur(),a.tabIndex=-1,a.focus({preventScroll:!0}))},_=(...a)=>{let n="";for(const t of a)t&&(n=n===""?t:`${n} ${t}`);return n},se=({children:a,...n})=>{const{linkComponent:t}=A();return t?e.jsx(t,{...n,children:a}):e.jsx("a",{...n,children:a})},ba=new Set,E=(a,...n)=>{for(const t of n)if(t!==void 0)return t;return process.env.NODE_ENV!=="production"&&!ba.has(a)&&(ba.add(a),console.error(`[hanui] Eksik metin: ${a}. 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.`)),""},Ae=(a,n,...t)=>n?n(...t):E(a),pn="hanui-spinner-7pXwf",bn="hanui-spinner__label-sZvSq",aa={spinner:pn,"hanui-spin":"hanui-hanui-spin-wTV0a",spinner__label:bn,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},gn=({size:a="md",label:n,className:t})=>{const{labels:o}=A();return e.jsx("span",{className:_(aa.spinner,aa[`spinner--${a}`],t),role:"status",children:e.jsx("span",{className:aa.spinner__label,children:n??E("Spinner.label",o==null?void 0:o.loading)})})},ia=s.memo(gn),xn="hanui-button-SRu4R",fn="hanui-button__icon-giom6",yn="hanui-button__spinner-vexVG",vn="hanui-button__label-qiMHm",le={button:xn,button__icon:fn,button__spinner:yn,button__label:vn,"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"},La=s.forwardRef(({variant:a=oe.PRIMARY,size:n=ge.MEDIUM,isLoading:t,isFullWidth:o,startIcon:i,endIcon:r,className:c,children:l,disabled:d,href:u,isExternal:p,linkProps:g,testId:h,...m},k)=>{const b=_(le.button,le[`button--${a.toLowerCase()}`],le[`button--${n.toLowerCase()}`],o&&le["button--full"],t&&le["button--loading"],c),x=e.jsxs(e.Fragment,{children:[t&&e.jsx(ia,{size:"sm",className:le.button__spinner,label:""}),!t&&i&&e.jsx("span",{className:le.button__icon,children:i}),e.jsx("span",{className:le.button__label,children:l}),r&&e.jsx("span",{className:le.button__icon,children:r})]});return u&&p?e.jsx("a",{href:u,className:b,target:"_blank",rel:"noopener noreferrer","aria-label":m["aria-label"],"data-testid":h,children:x}):u?e.jsx(se,{href:u,className:b,"data-testid":h,...g,children:x}):e.jsx("button",{ref:k,className:b,disabled:d||t,"aria-busy":t,"data-testid":h,...m,children:x})});La.displayName="Button";const Oe=s.memo(La),kn="hanui-iconButton-JdtwM",na={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"},Ta=s.forwardRef(({icon:a,label:n,variant:t="ghost",size:o="md",className:i,type:r="button",href:c,linkProps:l,testId:d,...u},p)=>{const g=_(na.iconButton,na[`iconButton--${t}`],na[`iconButton--${o}`],i);return c?e.jsx(se,{href:c,className:g,"aria-label":n,title:u.title??n,"data-testid":d,...l,children:a}):e.jsx("button",{ref:p,type:r,className:g,"aria-label":n,title:n,"data-testid":d,...u,children:a})});Ta.displayName="IconButton";const Xe=s.memo(Ta),Nn="hanui-link-WBmXY",jn="hanui-link__label--OEu-",wn="hanui-link__arrow-JKXm-",Pe={link:Nn,link__label:jn,link__arrow:wn,"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"},$n=({href:a,children:n,hasArrow:t,tone:o="brand",size:i="md",className:r,linkProps:c,...l})=>e.jsxs(se,{href:a,className:_(Pe.link,Pe[`link--${o}`],Pe[`link--${i}`],r),...c,...l,children:[e.jsx("span",{className:Pe.link__label,children:n}),t&&e.jsx(D.ArrowRight,{"aria-hidden":!0,className:Pe.link__arrow})]}),Cn=s.memo($n),Dn="hanui-tooltip-RG1g1",En="hanui-tooltip__trigger-nWZtO",Rn="hanui-bubble-bcBNk",Ze={tooltip:Dn,tooltip__trigger:En,bubble:Rn,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Fwj3A","bubble--top":"hanui-bubble--top-uWSZy","bubble--bottom":"hanui-bubble--bottom-jKokL"},In=({content:a,children:n,position:t="top",className:o})=>{const[i,r]=s.useState(!1),c=s.useId();return e.jsxs("span",{className:_(Ze.tooltip,o),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onFocus:()=>r(!0),onBlur:()=>r(!1),onKeyDown:l=>{l.key==="Escape"&&r(!1)},children:[e.jsx("span",{"aria-describedby":i?c:void 0,className:Ze.tooltip__trigger,children:n}),i&&e.jsx("span",{id:c,role:"tooltip",className:_(Ze.bubble,Ze[`bubble--${t}`]),children:a})]})},Ln=s.memo(In),Tn="hanui-chip--NLgU",Bn="hanui-chip__icon-IjjSb",Sn="hanui-chip__label-cT4hw",An="hanui-chip__count-MBGO3",me={chip:Tn,chip__icon:Bn,chip__label:Sn,chip__count:An,"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"},Ba=s.forwardRef(({children:a,icon:n,endIcon:t,count:o,isSelected:i,size:r="md",label:c,href:l,linkProps:d,className:u,type:p="button",role:g,testId:h,...m},k)=>{const b=_(me.chip,me[`chip--${r}`],i&&me["chip--selected"],!a&&me["chip--iconOnly"],u),x=e.jsxs(e.Fragment,{children:[n&&e.jsx("span",{className:me.chip__icon,"aria-hidden":!0,children:n}),a&&e.jsx("span",{className:me.chip__label,children:a}),q.isDefined(o)&&e.jsx("span",{className:me.chip__count,children:o}),t&&e.jsx("span",{className:me.chip__icon,"aria-hidden":!0,children:t})]});return l?e.jsx(se,{href:l,className:b,"aria-label":a?void 0:c,"aria-current":i?"page":void 0,title:a?void 0:c,"data-testid":h,...d,children:x}):e.jsx("button",{ref:k,type:p,role:g,className:b,"aria-label":a?void 0:c,title:a?void 0:c,"data-testid":h,...g==="radio"?{"aria-checked":!!i}:{"aria-pressed":!!i},...m,children:x})});Ba.displayName="Chip";const Sa=s.memo(Ba),Fn="hanui-group-0tnVf",ga={group:Fn,"group--scrollable":"hanui-group--scrollable-PMu6V"},Mn=({options:a,label:n,size:t="md",isScrollable:o,className:i,...r})=>{var g;const c=s.useRef(null),l=h=>r.isMultiple?r.value.includes(h):r.value===h,d=h=>{if(r.isMultiple){const m=r.value.includes(h)?r.value.filter(k=>k!==h):[...r.value,h];r.onChange(m);return}r.onChange(r.value===h?null:h)},u=h=>{var w,y;if(r.isMultiple)return;const m=h.key==="ArrowRight"||h.key==="ArrowDown"?1:h.key==="ArrowLeft"||h.key==="ArrowUp"?-1:0;if(m===0)return;h.preventDefault();const k=a.filter($=>!$.isDisabled);if(k.length===0)return;const b=k.findIndex($=>$.value===r.value),x=k[(b+m+k.length)%k.length];r.onChange(x.value),(y=(w=c.current)==null?void 0:w.querySelector(`[data-chip-value="${x.value}"]`))==null||y.focus()},p=r.isMultiple?null:r.value??((g=a.find(h=>!h.isDisabled))==null?void 0:g.value)??null;return e.jsx("div",{ref:c,className:_(ga.group,o&&ga["group--scrollable"],i),role:r.isMultiple?"group":"radiogroup","aria-label":n,onKeyDown:u,children:a.map(h=>e.jsx(Sa,{size:t,icon:h.icon,count:h.count,isSelected:l(h.value),disabled:h.isDisabled,role:r.isMultiple?void 0:"radio",tabIndex:r.isMultiple||h.value===p?0:-1,"data-chip-value":h.value,onClick:()=>d(h.value),children:h.label},h.value))})},On=s.memo(Mn),Pn="hanui-sheet-GEvdE",Hn="hanui-sheet__header-NJgw-",Kn="hanui-sheet__title-f-b07",zn="hanui-sheet__toolbar-eyhmW",qn="hanui-sheet__body-eJ2KB",Un="hanui-sheet__footer-NpsY5",Ee={sheet:Pn,sheet__header:Hn,sheet__title:Kn,sheet__toolbar:zn,sheet__body:qn,sheet__footer:Un},Gn=({title:a,closeLabel:n,onClose:t,children:o,toolbar:i,footer:r,closeAbove:c=We,className:l,testId:d})=>{const{labels:u}=A(),p=s.useId();Da(),s.useEffect(()=>{const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}},[]),s.useEffect(()=>{const m=window.matchMedia(c);return m.addEventListener("change",t),()=>m.removeEventListener("change",t)},[c,t]);const g=s.useCallback(m=>{!m||m.open||(m.showModal(),ra(m))},[]),h=s.useCallback(m=>{m.target===m.currentTarget&&t()},[t]);return q.isClient()?on.createPortal(e.jsxs("dialog",{ref:g,className:_(Ee.sheet,l),"aria-labelledby":p,"data-testid":d,onCancel:m=>{m.preventDefault(),t()},onClick:h,children:[e.jsxs("header",{className:Ee.sheet__header,children:[e.jsx("h2",{id:p,className:Ee.sheet__title,children:a}),e.jsx(Xe,{icon:e.jsx(D.XLg,{"aria-hidden":!0}),label:E("BottomSheet.closeLabel",n,u==null?void 0:u.close),variant:"ghost",size:"sm",onClick:t})]}),i&&e.jsx("div",{className:Ee.sheet__toolbar,children:i}),e.jsx("div",{className:Ee.sheet__body,children:o}),r&&e.jsx("div",{className:Ee.sheet__footer,children:r})]}),document.body):null},ca=s.memo(Gn),Xn="hanui-combobox-NtZoV",Yn="hanui-combobox__trigger-2riRR",Zn="hanui-combobox__leadingIcon-it2xz",Jn="hanui-combobox__value-acDlr",Qn="hanui-combobox__clear-EXOsc",Vn="hanui-combobox__chevron-g-QzQ",Wn="hanui-combobox__panel-srBxl",et="hanui-combobox__search-THjer",at="hanui-combobox__searchIcon-vr4Bg",nt="hanui-combobox__searchInput-JPp5h",tt="hanui-combobox__list-p-eCs",ot="hanui-combobox__option-CLWh-",st="hanui-combobox__optionText-Zm0D6",rt="hanui-combobox__optionLabel-WvT4W",it="hanui-combobox__optionDescription-8OEzi",ct="hanui-combobox__check-MKlLz",lt="hanui-combobox__empty-mZwBq",T={combobox:Xn,combobox__trigger:Yn,"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__leadingIcon:Zn,combobox__value:Jn,combobox__clear:Qn,combobox__chevron:Vn,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:Wn,combobox__search:et,combobox__searchIcon:at,combobox__searchInput:nt,combobox__list:tt,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:ot,"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:st,combobox__optionLabel:rt,combobox__optionDescription:it,combobox__check:ct,combobox__empty:lt},dt=({options:a,value:n,onChange:t,labels:o,isSearchHidden:i,onSearch:r,isLoading:c,isDisabled:l,isClearable:d,icon:u,id:p,className:g,testId:h,"aria-describedby":m,"aria-invalid":k})=>{const{labels:b}=A(),x={get search(){var f;return E("Combobox.searchPlaceholder",o.searchPlaceholder,(f=b==null?void 0:b.combobox)==null?void 0:f.searchPlaceholder)},get empty(){var f;return E("Combobox.emptyMessage",o.emptyMessage,(f=b==null?void 0:b.combobox)==null?void 0:f.emptyMessage)},get loading(){var f;return E("Combobox.loadingMessage",o.loadingMessage,(f=b==null?void 0:b.combobox)==null?void 0:f.loadingMessage)},get clear(){var f;return E("Combobox.clearLabel",o.clearLabel,(f=b==null?void 0:b.combobox)==null?void 0:f.clearLabel)}},w=s.useId(),y=p??w,$=`${y}-listbox`,R=s.useRef(null),F=s.useRef(null),K=s.useRef(null),W=s.useRef(null),[S,ee]=s.useState(null),I=S!==null,[B,M]=s.useState(""),[U,J]=s.useState(0),[re,xe]=s.useState(null),ie=s.useMemo(()=>{if(r||B.trim()==="")return a;const f=B.trim();return a.filter(L=>sa(L.label,f)||(L.description?sa(L.description,f):!1))},[a,B,r]),ce=a.find(f=>f.value===n)??null;s.useEffect(()=>{ce?xe(ce.label):n===null&&xe(null)},[ce,n]);const $e=(ce==null?void 0:ce.label)??re,he=s.useRef(r);he.current=r,s.useEffect(()=>{if(!I||!he.current)return;const f=window.setTimeout(()=>{var L;return(L=he.current)==null?void 0:L.call(he,B.trim())},300);return()=>window.clearTimeout(f)},[B,I]);const j=s.useCallback(()=>{ee(null),M("")},[]),z=s.useCallback(()=>{if(l)return;ee(window.matchMedia(We).matches?"popover":"sheet"),M("");const f=a.findIndex(L=>L.value===n);J(f>=0?f:0)},[l,a,n]);s.useEffect(()=>{if(S!=="popover")return;const f=L=>{var G;(G=R.current)!=null&&G.contains(L.target)||j()};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[S,j]),s.useEffect(()=>{var f;S==="popover"&&((f=K.current)==null||f.focus({preventScroll:!0}))},[S]),s.useEffect(()=>{var f,L;I&&((L=(f=W.current)==null?void 0:f.querySelector(`[data-index="${U}"]`))==null||L.scrollIntoView({block:"nearest"}))},[U,I,ie.length]);const P=f=>{f.isDisabled||(xe(f.label),t(f.value),j())},Ce=s.useRef(!1);s.useEffect(()=>{var f;Ce.current&&!I&&((f=F.current)==null||f.focus()),Ce.current=I},[I]);const nn=f=>{const L=ie.length-1;switch(f.key){case"ArrowDown":f.preventDefault(),J(G=>G>=L?0:G+1);break;case"ArrowUp":f.preventDefault(),J(G=>G<=0?L:G-1);break;case"Home":f.preventDefault(),J(0);break;case"End":f.preventDefault(),J(L);break;case"Enter":{f.preventDefault();const G=ie[U];G&&P(G);break}case"Escape":f.preventDefault(),j();break;case"Tab":j();break}},da=()=>{t(null),xe(null)},_a=i?null:e.jsxs("div",{className:T.combobox__search,children:[e.jsx(D.Search,{"aria-hidden":!0,className:T.combobox__searchIcon}),e.jsx("input",{ref:K,type:"text",role:"combobox",className:T.combobox__searchInput,value:B,placeholder:x.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":$,"aria-activedescendant":ie[U]?`${y}-option-${U}`:void 0,"aria-label":x.search,onChange:f=>{M(f.target.value),J(0)},onKeyDown:nn}),c&&e.jsx(ia,{size:"sm",label:""})]}),ua=f=>e.jsxs("ul",{ref:W,id:$,role:"listbox",className:_(T.combobox__list,f&&T["combobox__list--sheet"]),children:[ie.map((L,G)=>{const tn=G===U,ea=L.value===n;return e.jsx("li",{children:e.jsxs("div",{id:`${y}-option-${G}`,role:"option","data-index":G,"aria-selected":ea,"aria-disabled":L.isDisabled,className:_(T.combobox__option,tn&&T["combobox__option--active"],ea&&T["combobox__option--selected"],L.isDisabled&&T["combobox__option--disabled"]),onMouseEnter:()=>J(G),onClick:()=>P(L),children:[e.jsxs("span",{className:T.combobox__optionText,children:[e.jsx("span",{className:T.combobox__optionLabel,children:L.label}),L.description&&e.jsx("span",{className:T.combobox__optionDescription,children:L.description})]}),ea&&e.jsx(D.CheckLg,{"aria-hidden":!0,className:T.combobox__check})]})},L.value)}),ie.length===0&&e.jsx("li",{className:T.combobox__empty,children:c?x.loading:x.empty})]});return e.jsxs("div",{ref:R,className:_(T.combobox,g),"data-testid":h,children:[e.jsxs("button",{ref:F,id:y,type:"button",className:_(T.combobox__trigger,!$e&&T["combobox__trigger--empty"],I&&T["combobox__trigger--open"],k&&T["combobox__trigger--invalid"]),disabled:l,"aria-haspopup":"listbox","aria-expanded":I,"aria-controls":I?$:void 0,"aria-label":o.placeholder,"aria-describedby":m,onClick:()=>I?j():z(),children:[u&&e.jsx("span",{className:T.combobox__leadingIcon,"aria-hidden":!0,children:u}),e.jsx("span",{className:T.combobox__value,children:$e??o.placeholder}),d&&$e&&!l&&e.jsx("span",{role:"button",tabIndex:0,className:T.combobox__clear,"aria-label":x.clear,onClick:f=>{f.stopPropagation(),da()},onKeyDown:f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.stopPropagation(),da())},children:e.jsx(D.XLg,{"aria-hidden":!0})}),e.jsx(D.CaretDownFill,{"aria-hidden":!0,className:_(T.combobox__chevron,I&&T["combobox__chevron--open"])})]}),S==="popover"&&e.jsxs("div",{className:T.combobox__panel,children:[_a,ua(!1)]}),S==="sheet"&&e.jsx(ca,{title:o.placeholder,closeLabel:o.closeLabel??(b==null?void 0:b.close),onClose:j,toolbar:_a??void 0,children:ua(!0)})]})},_t=s.memo(dt),ut="hanui-select-tiiPL",ht="hanui-trigger-rHQJz",mt="hanui-trigger__icon-apCcx",pt="hanui-trigger__value-ioH7K",bt="hanui-trigger__chevron-FtsIZ",gt="hanui-panel-rGOOd",xt="hanui-list-SOKf8",ft="hanui-option-ZDPef",yt="hanui-option__label-SsoYB",vt="hanui-option__check-8CPSG",H={select:ut,trigger:ht,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:mt,trigger__value:pt,trigger__chevron:bt,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:gt,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Lt0Bt","panel--start":"hanui-panel--start-Fotwa","panel--end":"hanui-panel--end-ClVl2",list:xt,"list--sheet":"hanui-list--sheet-BIjCb",option:ft,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:yt,option__check:vt},kt=({options:a,value:n,onChange:t,label:o,placeholder:i,closeLabel:r,icon:c,size:l="md",align:d="start",isDisabled:u,id:p,className:g,testId:h,"aria-describedby":m,"aria-invalid":k})=>{const{labels:b}=A(),x=E("Select.placeholder",i,b==null?void 0:b.selectPlaceholder),w=s.useId(),y=p??w,$=`${y}-listbox`,R=j=>`${y}-option-${j}`,F=s.useRef(null),K=s.useRef(null),W=s.useRef(null),[S,ee]=s.useState(null),[I,B]=s.useState(0),M=S!==null,U=a.findIndex(j=>j.value===n),J=U>=0?a[U]:null,re=s.useCallback(()=>ee(null),[]),xe=s.useCallback(()=>{u||a.length===0||(ee(window.matchMedia(We).matches?"popover":"sheet"),B(U>=0?U:0))},[u,a.length,U]),ie=j=>{j.isDisabled||(t(j.value),re())},ce=s.useRef(!1);s.useEffect(()=>{var j;ce.current&&!M&&((j=K.current)==null||j.focus()),ce.current=M},[M]),s.useEffect(()=>{if(S!=="popover")return;const j=z=>{var P;(P=F.current)!=null&&P.contains(z.target)||re()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[S,re]),s.useEffect(()=>{var j;S==="sheet"&&((j=W.current)==null||j.focus({preventScroll:!0}))},[S]),s.useEffect(()=>{var j,z;M&&((z=(j=W.current)==null?void 0:j.querySelector(`[data-index="${I}"]`))==null||z.scrollIntoView({block:"nearest"}))},[I,M]);const $e=j=>{const z=a.length-1;if(!M){["ArrowDown","ArrowUp","Enter"," "].includes(j.key)&&(j.preventDefault(),xe());return}switch(j.key){case"ArrowDown":j.preventDefault(),B(P=>P>=z?0:P+1);break;case"ArrowUp":j.preventDefault(),B(P=>P<=0?z:P-1);break;case"Home":j.preventDefault(),B(0);break;case"End":j.preventDefault(),B(z);break;case"Enter":case" ":{j.preventDefault();const P=a[I];P&&ie(P);break}case"Escape":j.preventDefault(),re();break;case"Tab":re();break}},he=j=>e.jsx("ul",{ref:W,id:$,role:"listbox","aria-label":o,"aria-activedescendant":j&&a[I]?R(I):void 0,tabIndex:j?0:-1,className:_(H.list,j&&H["list--sheet"]),onKeyDown:j?$e:void 0,children:a.map((z,P)=>{const Ce=z.value===n;return e.jsxs("li",{id:R(P),role:"option","data-index":P,"aria-selected":Ce,"aria-disabled":z.isDisabled,className:_(H.option,P===I&&H["option--active"],Ce&&H["option--selected"],z.isDisabled&&H["option--disabled"]),onMouseEnter:()=>B(P),onClick:()=>ie(z),children:[e.jsx("span",{className:H.option__label,children:z.label}),Ce&&e.jsx(D.CheckLg,{"aria-hidden":!0,className:H.option__check})]},z.value)})});return e.jsxs("span",{ref:F,className:_(H.select,g),"data-testid":h,children:[e.jsxs("button",{ref:K,id:y,type:"button",role:"combobox",className:_(H.trigger,H[`trigger--${l}`],!J&&H["trigger--empty"],M&&H["trigger--open"]),disabled:u,"aria-haspopup":"listbox","aria-expanded":M,"aria-controls":M?$:void 0,"aria-activedescendant":S==="popover"&&a[I]?R(I):void 0,"aria-label":o,"aria-describedby":m,"aria-invalid":k,onClick:()=>M?re():xe(),onKeyDown:$e,children:[c&&e.jsx("span",{className:H.trigger__icon,"aria-hidden":!0,children:c}),e.jsx("span",{className:H.trigger__value,children:(J==null?void 0:J.label)??x}),e.jsx(D.CaretDownFill,{"aria-hidden":!0,className:_(H.trigger__chevron,M&&H["trigger__chevron--open"])})]}),S==="popover"&&e.jsx("div",{className:_(H.panel,H[`panel--${d}`]),children:he(!1)}),S==="sheet"&&e.jsx(ca,{title:o,closeLabel:r??(b==null?void 0:b.close),onClose:re,children:he(!0)})]})},Nt=s.memo(kt),jt="hanui-checkbox-FaFCj",wt="hanui-checkbox__input-nTHne",$t="hanui-checkbox__body-VAEW2",Ct="hanui-checkbox__label-sSNZY",Dt="hanui-checkbox__hint-ish-J",He={checkbox:jt,checkbox__input:wt,checkbox__body:$t,checkbox__label:Ct,checkbox__hint:Dt},Aa=s.forwardRef(({label:a,hint:n,className:t,testId:o,...i},r)=>e.jsxs("label",{className:_(He.checkbox,t),"data-testid":o,children:[e.jsx("input",{ref:r,type:"checkbox",className:He.checkbox__input,...i}),e.jsxs("span",{className:He.checkbox__body,children:[e.jsx("span",{className:He.checkbox__label,children:a}),n&&e.jsx("span",{className:He.checkbox__hint,children:n})]})]}));Aa.displayName="Checkbox";const Et=s.memo(Aa),Rt="hanui-radio-KoZak",It="hanui-radio__input-gVMgh",Lt="hanui-radio__body-oZWg6",Tt="hanui-radio__label-d-5ce",Bt="hanui-radio__hint-baVbs",St="hanui-radio__count-OtkUM",Re={radio:Rt,radio__input:It,radio__body:Lt,radio__label:Tt,radio__hint:Bt,radio__count:St},Fa=s.forwardRef(({label:a,hint:n,count:t,className:o,testId:i,...r},c)=>e.jsxs("label",{className:_(Re.radio,o),"data-testid":i,children:[e.jsx("input",{ref:c,type:"radio",className:Re.radio__input,...r}),e.jsxs("span",{className:Re.radio__body,children:[e.jsx("span",{className:Re.radio__label,children:a}),n&&e.jsx("span",{className:Re.radio__hint,children:n})]}),q.isDefined(t)&&e.jsx("span",{className:Re.radio__count,children:t})]}));Fa.displayName="Radio";const At=s.memo(Fa),Ft="hanui-radioCard-sndiC",Mt="hanui-radioCard__input-6vuoD",Ot="hanui-radioCard__indicator--x9LT",Pt="hanui-radioCard__body-CFqoi",Ie={radioCard:Ft,radioCard__input:Mt,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:Ot,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:Pt},Ht=({name:a,value:n,isSelected:t,isDisabled:o,onChange:i,children:r,className:c,id:l,testId:d})=>e.jsxs("label",{className:_(Ie.radioCard,t&&Ie["radioCard--selected"],o&&Ie["radioCard--disabled"],c),"data-testid":d,children:[e.jsx("input",{type:"radio",id:l,name:a,value:n,checked:t,disabled:o,onChange:()=>i(n),className:Ie.radioCard__input}),e.jsx("span",{className:Ie.radioCard__indicator,"aria-hidden":!0}),e.jsx("span",{className:Ie.radioCard__body,children:r})]}),Kt=s.memo(Ht),zt="hanui-range-RpDPh",qt="hanui-range__readout-itDMd",Ut="hanui-range__separator-u-ZJX",Gt="hanui-range__track-bCh5Y",Xt="hanui-range__fill-VXMCE",Yt="hanui-range__input-TAN2I",Zt="hanui-range__bounds-GIhFd",ae={range:zt,"range--disabled":"hanui-range--disabled-13hlc",range__readout:qt,range__separator:Ut,range__track:Gt,range__fill:Xt,range__input:Yt,range__bounds:Zt},Jt=({min:a,max:n,step:t=1,value:o,onChange:i,onCommit:r,formatValue:c=String,label:l,minLabel:d,maxLabel:u,isDisabled:p,className:g,testId:h})=>{var ee,I;const{labels:m}=A(),k=E("RangeSlider.minLabel",d,(ee=m==null?void 0:m.range)==null?void 0:ee.min),b=E("RangeSlider.maxLabel",u,(I=m==null?void 0:m.range)==null?void 0:I.max),[x,w]=o,y=s.useCallback(B=>i([Math.min(B,w),w]),[w,i]),$=s.useCallback(B=>i([x,Math.max(B,x)]),[x,i]),R=s.useCallback(()=>r==null?void 0:r([x,w]),[x,w,r]),F=n-a,K=F===0?0:q.normalize(x-a,F),W=F===0?0:q.normalize(w-a,F),S=K>50;return e.jsxs("div",{className:_(ae.range,p&&ae["range--disabled"],g),role:"group","aria-label":l,"data-testid":h,children:[e.jsxs("div",{className:ae.range__readout,children:[e.jsx("span",{className:ae.range__value,children:c(x)}),e.jsx("span",{className:ae.range__separator,"aria-hidden":!0,children:"—"}),e.jsx("span",{className:ae.range__value,children:c(w)})]}),e.jsxs("div",{className:ae.range__track,children:[e.jsx("span",{className:ae.range__fill,style:{left:`${K}%`,right:`${100-W}%`},"aria-hidden":!0}),e.jsx("input",{type:"range",className:ae.range__input,style:{zIndex:S?4:3},min:a,max:n,step:t,value:x,disabled:p,"aria-label":`${l} — ${k}`,"aria-valuetext":c(x),onChange:B=>y(Number(B.target.value)),onPointerUp:R,onKeyUp:R}),e.jsx("input",{type:"range",className:ae.range__input,style:{zIndex:S?3:4},min:a,max:n,step:t,value:w,disabled:p,"aria-label":`${l} — ${b}`,"aria-valuetext":c(w),onChange:B=>$(Number(B.target.value)),onPointerUp:R,onKeyUp:R})]}),e.jsxs("div",{className:ae.range__bounds,"aria-hidden":!0,children:[e.jsx("span",{children:c(a)}),e.jsx("span",{children:c(n)})]})]})},Qt=s.memo(Jt),Vt="hanui-rating-neNnF",Wt="hanui-rating__legend-uYvFS",eo="hanui-rating__stars-vJFLk",ao="hanui-rating__star-BANFJ",no="hanui-rating__input-s2iiO",to="hanui-rating__srOnly-iSCoz",oo="hanui-rating__caption-13KFX",de={rating:Vt,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:Wt,rating__stars:eo,rating__star:ao,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:no,rating__srOnly:to,rating__caption:oo},so=[1,2,3,4,5],ro=({value:a,onChange:n,label:t,ratingLabels:o,formatStarCount:i,isDisabled:r,className:c,testId:l})=>{var k;const{labels:d}=A(),u=o??((k=d==null?void 0:d.rating)==null?void 0:k.scale),p=s.useId(),[g,h]=s.useState(null),m=g??a;return e.jsxs("fieldset",{className:_(de.rating,r&&de["rating--disabled"],c),disabled:r,"data-testid":l,children:[e.jsx("legend",{className:de.rating__legend,children:t}),e.jsx("div",{className:de.rating__stars,onMouseLeave:()=>h(null),children:so.map(b=>{var x;return e.jsxs("label",{className:_(de.rating__star,m!==null&&b<=m&&de["rating__star--filled"]),onMouseEnter:()=>h(b),children:[e.jsx("input",{type:"radio",name:p,value:b,checked:a===b,onChange:()=>n(b),className:de.rating__input}),e.jsx(D.StarFill,{"aria-hidden":!0}),e.jsxs("span",{className:de.rating__srOnly,children:[Ae("RatingInput.formatStarCount",i??((x=d==null?void 0:d.rating)==null?void 0:x.starCount),b)," ","— ",(u==null?void 0:u[b])??""]})]},b)})}),m!==null&&e.jsx("span",{className:de.rating__caption,"aria-hidden":!0,children:(u==null?void 0:u[m])??""})]})},io=s.memo(ro),co="hanui-stepper-8s5Ih",lo="hanui-stepper__button-h6g7d",_o="hanui-stepper__input-OQh5v",Ke={stepper:co,stepper__button:lo,stepper__input:_o,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},uo=({value:a,onChange:n,label:t,decreaseLabel:o,increaseLabel:i,min:r=1,max:c=99,isDisabled:l,size:d="md",className:u,testId:p})=>{var x,w,y;const{labels:g}=A(),h=E("QuantityStepper.label",t,(x=g==null?void 0:g.quantity)==null?void 0:x.label),[m,k]=s.useState(null),b=$=>{k(null);const R=Number($.replace(/\D/g,""));R&&n(Math.min(Math.max(R,r),c))};return e.jsxs("div",{className:_(Ke.stepper,Ke[`stepper--${d}`],u),role:"group","aria-label":h,"data-testid":p,children:[e.jsx("button",{type:"button",className:Ke.stepper__button,onClick:()=>n(Math.max(a-1,r)),disabled:l||a<=r,"aria-label":E("QuantityStepper.decreaseLabel",o,(w=g==null?void 0:g.quantity)==null?void 0:w.decrease),children:e.jsx(D.DashLg,{"aria-hidden":!0})}),e.jsx("input",{className:Ke.stepper__input,value:m??String(a),onChange:$=>k($.target.value.replace(/\D/g,"").slice(0,2)),onBlur:$=>b($.target.value),onKeyDown:$=>{$.key==="Enter"&&($.preventDefault(),b($.target.value))},inputMode:"numeric",disabled:l,"aria-label":`${h} (${r}-${c})`}),e.jsx("button",{type:"button",className:Ke.stepper__button,onClick:()=>n(Math.min(a+1,c)),disabled:l||a>=c,"aria-label":E("QuantityStepper.increaseLabel",i,(y=g==null?void 0:g.quantity)==null?void 0:y.increase),children:e.jsx(D.PlusLg,{"aria-hidden":!0})})]})},ho=s.memo(uo),mo="hanui-checkbox--dvpB",po={checkbox:mo},Ma=s.forwardRef(({label:a,className:n,testId:t,...o},i)=>e.jsx("input",{ref:i,type:"checkbox","aria-label":a,className:_(po.checkbox,n),"data-testid":t,...o}));Ma.displayName="TableCheckbox";const bo=s.memo(Ma),go="hanui-wrapper-IAI4E",xo="hanui-wrapper__prefix-XKDlV",fo="hanui-wrapper__suffix-lT35q",yo="hanui-input-pIS2u",fe={wrapper:go,wrapper__prefix:xo,wrapper__suffix:fo,input:yo,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Oa=s.forwardRef(({prefix:a,suffix:n,isTechnical:t,className:o,testId:i,...r},c)=>e.jsxs("span",{className:_(fe.wrapper,o),children:[a&&e.jsx("span",{className:fe.wrapper__prefix,"aria-hidden":!0,children:a}),e.jsx("input",{ref:c,className:_(fe.input,!!a&&fe["input--hasPrefix"],!!n&&fe["input--hasSuffix"],t&&fe["input--technical"]),"data-testid":i,...r}),n&&e.jsx("span",{className:fe.wrapper__suffix,"aria-hidden":!0,children:n})]}));Oa.displayName="Input";const Pa=s.memo(Oa),vo="hanui-textarea-zwJcB",ko={textarea:vo},Ha=s.forwardRef(({className:a,rows:n=4,testId:t,...o},i)=>e.jsx("textarea",{ref:i,rows:n,className:_(ko.textarea,a),"data-testid":t,...o}));Ha.displayName="Textarea";const Ka=s.memo(Ha),No="hanui-field-KKvre",jo="hanui-field__label-9dlYd",wo="hanui-field__required-hbDJk",$o="hanui-field__srOnly-2WQFH",Co="hanui-field__hint-SQPiL",Do="hanui-field__error-gLlZ-",Eo="hanui-field__errorIcon-uA3o8",pe={field:No,field__label:jo,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:wo,field__srOnly:$o,field__hint:Co,field__error:Do,field__errorIcon:Eo},Ro=({label:a,children:n,hint:t,error:o,isRequired:i,requiredLabel:r,isLabelHidden:c,className:l})=>{const{labels:d}=A(),u=s.useId(),p=`${u}-error`,g=`${u}-hint`;return e.jsxs("div",{className:_(pe.field,l),children:[e.jsxs("label",{htmlFor:u,className:_(pe.field__label,c&&pe["field__label--hidden"]),children:[a,i&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:pe.field__required,"aria-hidden":!0,children:"*"}),e.jsx("span",{className:pe.field__srOnly,children:E("Field.requiredLabel",r,d==null?void 0:d.required)})]})]}),n({id:u,required:i||void 0,"aria-invalid":o?!0:void 0,"aria-describedby":o?p:t?g:void 0}),o?e.jsxs("p",{id:p,className:pe.field__error,role:"alert",children:[e.jsx(D.ExclamationCircleFill,{"aria-hidden":!0,className:pe.field__errorIcon}),o]}):t&&e.jsx("p",{id:g,className:pe.field__hint,children:t})]})},za=s.memo(Ro),Io="hanui-alert-gHI-9",Lo="hanui-alert__icon-DhiCT",To="hanui-alert__body-52-z2",Bo="hanui-alert__title-I8BAh",So="hanui-alert__content-lhBEo",Ao="hanui-alert__action-1mTje",ye={alert:Io,alert__icon:Lo,alert__body:To,alert__title:Bo,alert__content:So,alert__action:Ao,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},Fo={info:e.jsx(D.InfoCircleFill,{"aria-hidden":!0}),success:e.jsx(D.CheckCircleFill,{"aria-hidden":!0}),warning:e.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),danger:e.jsx(D.XCircleFill,{"aria-hidden":!0})},Mo=({children:a,tone:n="info",title:t,action:o,className:i,testId:r})=>e.jsxs("div",{className:_(ye.alert,ye[`alert--${n}`],i),role:n==="danger"||n==="warning"?"alert":void 0,"data-testid":r,children:[e.jsx("span",{className:ye.alert__icon,children:Fo[n]}),e.jsxs("div",{className:ye.alert__body,children:[t&&e.jsx("strong",{className:ye.alert__title,children:t}),e.jsx("div",{className:ye.alert__content,children:a})]}),o&&e.jsx("div",{className:ye.alert__action,children:o})]}),Oo=s.memo(Mo),Po="hanui-avatar-qoh3P",Ho="hanui-avatar__image-uAyAX",ta={avatar:Po,avatar__image:Ho,"avatar--sm":"hanui-avatar--sm-GGjU4","avatar--md":"hanui-avatar--md-xhXnK","avatar--lg":"hanui-avatar--lg-ULP-r"},Ko=(a,n)=>{const t=a.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"?";const o=t.length===1?t[0].slice(0,2):`${t[0][0]}${t[t.length-1][0]}`;return n?o.toLocaleUpperCase(n):o.toLocaleUpperCase()},zo=({name:a,imageUrl:n,locale:t,size:o="md",className:i,testId:r})=>{const{labels:c}=A();return e.jsx("span",{className:_(ta.avatar,ta[`avatar--${o}`],i),"aria-hidden":!0,"data-testid":r,children:n?e.jsx("img",{className:ta.avatar__image,src:n,alt:""}):Ko(a,t??(c==null?void 0:c.locale))})},qo=s.memo(zo),Uo="hanui-badge-uLAaI",Go="hanui-badge__icon-R2goZ",Je={badge:Uo,badge__icon:Go,"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"},Xo=({children:a,tone:n="neutral",variant:t="soft",icon:o,className:i,testId:r})=>e.jsxs("span",{className:_(Je.badge,Je[`badge--${n}`],Je[`badge--${t}`],i),"data-testid":r,children:[o&&e.jsx("span",{className:Je.badge__icon,children:o}),a]}),Yo=s.memo(Xo),Zo="hanui-breadcrumb-amB9n",Jo="hanui-breadcrumb__item-Icv1S",Qo="hanui-breadcrumb__link-eVkPq",Vo="hanui-breadcrumb__current-8XjhU",Wo="hanui-breadcrumb__separator-vvaUi",ze={breadcrumb:Zo,breadcrumb__item:Jo,breadcrumb__link:Qo,breadcrumb__current:Vo,breadcrumb__separator:Wo},es=({items:a,label:n,linkProps:t,className:o,testId:i})=>{const{labels:r}=A();return e.jsx("nav",{className:o,"aria-label":E("Breadcrumb.label",n,r==null?void 0:r.breadcrumb),"data-testid":i,children:e.jsx("ol",{className:_(ze.breadcrumb),children:a.map((c,l)=>{const d=l===a.length-1;return e.jsxs("li",{className:ze.breadcrumb__item,children:[c.href&&!d?e.jsx(se,{href:c.href,className:ze.breadcrumb__link,...t,children:c.label}):e.jsx("span",{className:ze.breadcrumb__current,"aria-current":"page",children:c.label}),!d&&e.jsx(D.CaretRightFill,{"aria-hidden":!0,className:ze.breadcrumb__separator})]},`${c.label}-${l}`)})})})},as=s.memo(es),ns="hanui-card-CaHUG",ts="hanui-media__frame-eBv-s",os="hanui-media-eggk5",ss="hanui-media__link-ujyVV",rs="hanui-overlay-AVMTX",is="hanui-body-DyI-6",cs="hanui-footer-2WNCZ",te={card:ns,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:ts,media:os,media__link:ss,"media__frame--contained":"hanui-media__frame--contained-Nv9gh",overlay:rs,"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:is,footer:cs},ls=({children:a,isInteractive:n,as:t="div",className:o,testId:i})=>e.jsx(t,{className:_(te.card,n&&te["card--interactive"],o),"data-testid":i,children:a}),qa=s.memo(({children:a,ratio:n=1,href:t,linkProps:o,isContained:i=!0,className:r})=>{const c=e.jsx("span",{className:_(te.media__frame,i&&te["media__frame--contained"]),style:{aspectRatio:n},children:a});return e.jsx("div",{className:_(te.media,r),children:t?e.jsx(se,{href:t,className:te.media__link,tabIndex:-1,"aria-hidden":!0,...o,children:c}):c})});qa.displayName="CardMedia";const Ua=s.memo(({children:a,position:n="top-left",className:t})=>e.jsx("div",{className:_(te.overlay,te[`overlay--${n}`],t),children:a}));Ua.displayName="CardOverlay";const Ga=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(te.body,n),children:a}));Ga.displayName="CardBody";const Xa=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(te.footer,n),children:a}));Xa.displayName="CardFooter";const ds=s.memo(ls),_s="hanui-copy-Yht5s",us="hanui-copy__code-CYlCA",hs="hanui-copy__button-GDdH6",ms="hanui-copy__srOnly-WMTNN",Le={copy:_s,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:us,"copy--md":"hanui-copy--md-00rhU",copy__button:hs,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:ms},ps=1600,bs=({value:a,copyLabel:n,copiedLabel:t,copiedAnnouncement:o,size:i="sm",isReadOnly:r,className:c,testId:l})=>{var b,x,w,y,$;const{labels:d}=A(),[u,p]=s.useState(!1),g=s.useRef(null),h=s.useRef(void 0);s.useEffect(()=>()=>window.clearTimeout(h.current),[]);const m=s.useCallback(()=>{const R=g.current;if(!R)return;const F=document.createRange();F.selectNodeContents(R);const K=window.getSelection();K==null||K.removeAllRanges(),K==null||K.addRange(F)},[]),k=s.useCallback(async()=>{try{await navigator.clipboard.writeText(a),p(!0),h.current=window.setTimeout(()=>p(!1),ps)}catch{m()}},[a,m]);return e.jsxs("span",{className:_(Le.copy,Le[`copy--${i}`],c),"data-testid":l,children:[e.jsx("span",{className:Le.copy__code,ref:g,children:a}),!r&&e.jsx("button",{type:"button",className:_(Le.copy__button,u&&Le["copy__button--done"]),onClick:k,"aria-label":u?t??Ae("CopyField.copiedLabel",(b=d==null?void 0:d.copyField)==null?void 0:b.copied,a):n??Ae("CopyField.copyLabel",(x=d==null?void 0:d.copyField)==null?void 0:x.copy,a),title:u?t??Ae("CopyField.copiedLabel",(w=d==null?void 0:d.copyField)==null?void 0:w.copied,a):n??Ae("CopyField.copyLabel",(y=d==null?void 0:d.copyField)==null?void 0:y.copy,a),children:u?e.jsx(D.ClipboardCheckFill,{"aria-hidden":!0}):e.jsx(D.ClipboardFill,{"aria-hidden":!0})}),e.jsx("span",{"aria-live":"polite",className:Le.copy__srOnly,children:u?E("CopyField.copiedAnnouncement",o,($=d==null?void 0:d.copyField)==null?void 0:$.announcement):""})]})},gs=s.memo(bs),xs="hanui-divider-RJqCw",fs="hanui-divider__label-M8sBA",Qe={divider:xs,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:fs},ys=({label:a,className:n})=>a?e.jsx("div",{className:_(Qe.divider,Qe["divider--labelled"],n),children:e.jsx("span",{className:Qe.divider__label,children:a})}):e.jsx("hr",{className:_(Qe.divider,n)}),vs=s.memo(ys),ks="hanui-directory-badEd",Ns="hanui-group-i6An9",js="hanui-group__header-rc19c",ws="hanui-group__label-vQTcs",$s="hanui-group__link-es5V7",Cs="hanui-group__meta-LtC-u",Ds="hanui-group__list-YxBCG",Es="hanui-row-3LH7X",Rs="hanui-row__name-75Wbq",Is="hanui-row__media-AxZEh",Ls="hanui-row__marker-RYHb-",Ts="hanui-jump-vpGwB",Bs="hanui-jump__link-rRnT6",Z={directory:ks,group:Ns,group__header:js,group__label:ws,group__link:$s,group__meta:Cs,group__list:Ds,row:Es,row__name:Rs,row__media:Is,row__marker:Ls,jump:Ts,jump__link:Bs},Ss=({children:a,className:n})=>e.jsx("div",{className:_(Z.directory,n),children:a}),Ya=s.memo(({label:a,href:n,linkProps:t,meta:o,children:i,id:r})=>e.jsxs("section",{className:Z.group,id:r,children:[e.jsxs("header",{className:Z.group__header,children:[e.jsx("h2",{className:Z.group__label,children:n?e.jsx(se,{href:n,className:Z.group__link,...t,children:a}):a}),o&&e.jsx("span",{className:Z.group__meta,children:o})]}),e.jsx("ul",{className:Z.group__list,children:i})]}));Ya.displayName="DirectoryGroup";const Za=s.memo(({href:a,name:n,media:t,marker:o,linkProps:i,className:r})=>e.jsx("li",{children:e.jsxs(se,{href:a,className:_(Z.row,r),...i,children:[t&&e.jsx("span",{className:Z.row__media,children:t}),e.jsx("span",{className:Z.row__name,children:n}),o&&e.jsx("span",{className:Z.row__marker,children:o})]})}));Za.displayName="DirectoryRow";const Ja=s.memo(({labels:a,toId:n,label:t})=>{const{labels:o}=A();return e.jsx("nav",{className:Z.jump,"aria-label":E("DirectoryJump.label",t,o==null?void 0:o.directoryJump),children:a.map(i=>e.jsx("a",{href:`#${n(i)}`,className:Z.jump__link,children:i},i))})});Ja.displayName="DirectoryJump";const As=s.memo(Ss),Fs="hanui-empty-47qZR",Ms="hanui-empty__icon-okfEc",Os="hanui-empty__title-Z7Dzd",Ps="hanui-empty__description-6BoCk",Hs="hanui-empty__actions-ARk-k",Te={empty:Fs,empty__icon:Ms,empty__title:Os,empty__description:Ps,empty__actions:Hs,"empty--sm":"hanui-empty--sm-QXaXx"},Ks=({title:a,description:n,icon:t,action:o,secondaryAction:i,size:r="md",className:c,testId:l})=>e.jsxs("div",{className:_(Te.empty,Te[`empty--${r}`],c),"data-testid":l,children:[t&&e.jsx("span",{className:Te.empty__icon,children:t}),e.jsx("h3",{className:Te.empty__title,children:a}),n&&e.jsx("p",{className:Te.empty__description,children:n}),(o||i)&&e.jsxs("div",{className:Te.empty__actions,children:[o,i]})]}),zs=s.memo(Ks),qs="hanui-header-yJwus",Us="hanui-header__top-UK4si",Gs="hanui-header__text-HIo8U",Xs="hanui-header__eyebrow-dZ9Zc",Ys="hanui-header__titleRow-KgDZj",Zs="hanui-header__title-s1giF",Js="hanui-header__meta-UxuaD",Qs="hanui-header__description-NXbbC",Vs="hanui-header__actions-aShpt",_e={header:qs,header__top:Us,header__text:Gs,header__eyebrow:Xs,header__titleRow:Ys,header__title:Zs,header__meta:Js,header__description:Qs,header__actions:Vs},Ws=({title:a,eyebrow:n,description:t,actions:o,breadcrumb:i,meta:r,children:c,as:l="h1",className:d,testId:u})=>e.jsxs("header",{className:_(_e.header,d),"data-testid":u,children:[i,e.jsxs("div",{className:_e.header__top,children:[e.jsxs("div",{className:_e.header__text,children:[n&&e.jsx("span",{className:_e.header__eyebrow,children:n}),e.jsxs("div",{className:_e.header__titleRow,children:[e.jsx(l,{className:_e.header__title,children:a}),r&&e.jsx("span",{className:_e.header__meta,children:r})]}),t&&e.jsx("p",{className:_e.header__description,children:t})]}),o&&e.jsx("div",{className:_e.header__actions,children:o})]}),c]}),er=s.memo(Ws),ar="hanui-panel-Sv-1m",nr="hanui-panel__header-ysexh",tr="hanui-panel__heading-xLCsB",or="hanui-panel__icon--yPQT",sr="hanui-panel__headingText--XqxW",rr="hanui-panel__title-6-6uC",ir="hanui-panel__description-qXTSM",cr="hanui-panel__actions-Ra-zy",lr="hanui-panel__body-lo5aX",dr="hanui-panel__footer-qLpR1",_r="hanui-form-o9UqJ",ur="hanui-row-vUGpa",X={panel:ar,panel__header:nr,panel__heading:tr,panel__icon:or,panel__headingText:sr,panel__title:rr,panel__description:ir,panel__actions:cr,panel__body:lr,"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:dr,form:_r,"form--2":"hanui-form--2-HdwDc",row:ur},hr=({children:a,title:n,description:t,actions:o,icon:i,isFlush:r,gap:c="md",footer:l,as:d="section",className:u,bodyClassName:p,testId:g})=>e.jsxs(d,{className:_(X.panel,u),"data-testid":g,children:[(n||o)&&e.jsxs("div",{className:X.panel__header,children:[e.jsxs("div",{className:X.panel__heading,children:[i&&e.jsx("span",{className:X.panel__icon,children:i}),e.jsxs("div",{className:X.panel__headingText,children:[n&&e.jsx("h2",{className:X.panel__title,children:n}),t&&e.jsx("p",{className:X.panel__description,children:t})]})]}),o&&e.jsx("div",{className:X.panel__actions,children:o})]}),e.jsx("div",{className:_(X.panel__body,X[`panel__body--${c}`],r&&X["panel__body--flush"],p),children:a}),l&&e.jsx("div",{className:X.panel__footer,children:l})]}),Qa=s.memo(({children:a,columns:n=1,className:t})=>e.jsx("div",{className:_(X.form,X[`form--${n}`],t),children:a}));Qa.displayName="PanelForm";const Va=s.memo(({children:a,className:n})=>e.jsx("div",{className:_(X.row,n),children:a}));Va.displayName="PanelRow";const mr=s.memo(hr),pr="hanui-price-Oc5Nr",br="hanui-price__current-2Xup2",gr="hanui-price__currency-32NLN",xr="hanui-price__list-MlQgT",fr="hanui-price__discount-5Yc6W",ve={price:pr,price__current:br,price__currency:gr,price__list:xr,price__discount:fr,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},yr=({value:a,currency:n,listValue:t,discountPercent:o,formatDiscount:i=d=>`%${d}`,size:r="md",className:c,testId:l})=>{const{labels:d}=A(),u=E("Price.currency",n,d==null?void 0:d.currency);return e.jsxs("span",{className:_(ve.price,ve[`price--${r}`],c),"data-testid":l,children:[e.jsxs("span",{className:ve.price__current,children:[a,e.jsx("span",{className:ve.price__currency,children:u})]}),t&&e.jsxs("s",{className:ve.price__list,children:[t,e.jsx("span",{className:ve.price__currency,children:u})]}),o!==void 0&&o>0&&e.jsx("span",{className:ve.price__discount,children:i(o)})]})},vr=s.memo(yr),kr="hanui-rating-94dke",Nr="hanui-rating__stars-QkpVU",jr="hanui-rating__empty-Wf6-K",wr="hanui-rating__count-pIoEs",$r="hanui-rating__srOnly-E9h0d",Be={rating:kr,rating__stars:Nr,rating__empty:jr,rating__count:wr,rating__srOnly:$r,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},Cr=({value:a,count:n,srLabel:t,size:o="sm",className:i,testId:r})=>{var d;const{labels:c}=A(),l=Math.round(a*2)/2;return e.jsxs("span",{className:_(Be.rating,Be[`rating--${o}`],i),"data-testid":r,children:[e.jsx("span",{className:Be.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(u,p)=>{const g=p+1;return l>=g?e.jsx(D.StarFill,{},p):l>=g-.5?e.jsx(D.StarHalf,{},p):e.jsx(D.StarFill,{className:Be.rating__empty},p)})}),e.jsx("span",{className:Be.rating__srOnly,children:t??Ae("Rating.srLabel",(d=c==null?void 0:c.rating)==null?void 0:d.srLabel,a,n)}),q.isDefined(n)&&e.jsxs("span",{className:Be.rating__count,"aria-hidden":!0,children:["(",n,")"]})]})},Dr=s.memo(Cr),Er="hanui-header-a08Jh",Rr="hanui-header__text-ArJkA",Ir="hanui-header__overline-X5Epo",Lr="hanui-header__title-nQQQJ",Tr="hanui-header__description-08oCr",Br="hanui-header__action-xsxQF",ke={header:Er,header__text:Rr,header__overline:Ir,header__title:Lr,header__description:Tr,header__action:Br,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},Sr=({title:a,description:n,overline:t,action:o,as:i="h2",size:r="md",className:c,testId:l})=>e.jsxs("header",{className:_(ke.header,ke[`header--${r}`],c),"data-testid":l,children:[e.jsxs("div",{className:ke.header__text,children:[t&&e.jsx("span",{className:ke.header__overline,children:t}),e.jsx(i,{className:ke.header__title,children:a}),n&&e.jsx("p",{className:ke.header__description,children:n})]}),o&&e.jsx("div",{className:ke.header__action,children:o})]}),Ar=s.memo(Sr),Fr="hanui-skeleton-n92if",Mr="hanui-group-YMfwa",qe={skeleton:Fr,"hanui-shimmer":"hanui-hanui-shimmer-6yd48","skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:Mr},Or=({width:a,height:n,variant:t="block",lines:o=1,className:i})=>{const r={width:q.isNumber(a)?`${a}px`:a,height:q.isNumber(n)?`${n}px`:n};return t==="text"&&o>1?e.jsx("span",{className:_(qe.group,i),"aria-hidden":!0,children:Array.from({length:o},(c,l)=>e.jsx("span",{className:_(qe.skeleton,qe["skeleton--text"]),style:l===o-1?{width:"60%"}:void 0},l))}):e.jsx("span",{className:_(qe.skeleton,qe[`skeleton--${t}`],i),style:r,"aria-hidden":!0})},Pr=s.memo(Or),Hr="hanui-tabs-l4dFE",Kr="hanui-tabs__list-HJvR8",zr="hanui-tabs__tab-7gDW7",qr="hanui-tabs__count-8JX8s",Ur="hanui-tabs__panel-CPklY",Se={tabs:Hr,tabs__list:Kr,tabs__tab:zr,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:qr,tabs__panel:Ur},Gr=({items:a,defaultTabId:n,activeId:t,onChange:o,ariaLabel:i,className:r,testId:c})=>{var w;const l=s.useId(),[d,u]=s.useState(n??((w=a[0])==null?void 0:w.id)),p=q.isDefined(t),g=p?t:d,h=a.findIndex(y=>y.id===g),m=a[h]??a[0],k=y=>{p||u(y),o==null||o(y)},b=y=>{var F;const $=y.key==="ArrowRight"?1:y.key==="ArrowLeft"?-1:0;if($===0)return;y.preventDefault();const R=(h+$+a.length)%a.length;k(a[R].id),(F=document.getElementById(`${l}-tab-${a[R].id}`))==null||F.focus()};if(a.length===0)return null;const x=q.isDefined(m==null?void 0:m.content);return e.jsxs("div",{className:_(Se.tabs,r),"data-testid":c,children:[e.jsx("div",{className:Se.tabs__list,role:"tablist","aria-label":i,onKeyDown:b,children:a.map(y=>{const $=y.id===m.id;return e.jsxs("button",{id:`${l}-tab-${y.id}`,type:"button",role:"tab","aria-selected":$,"aria-controls":x?`${l}-panel-${y.id}`:void 0,tabIndex:$?0:-1,className:_(Se.tabs__tab,$&&Se["tabs__tab--active"]),onClick:()=>k(y.id),children:[y.label,q.isDefined(y.count)&&e.jsx("span",{className:Se.tabs__count,children:y.count})]},y.id)})}),x&&e.jsx("div",{id:`${l}-panel-${m.id}`,role:"tabpanel","aria-labelledby":`${l}-tab-${m.id}`,className:Se.tabs__panel,tabIndex:0,children:m.content})]})},Xr=s.memo(Gr),Yr="hanui-tile-TGur-",Zr="hanui-tile__medallion--Y0pz",Jr="hanui-tile__label-mI1OQ",Qr="hanui-tile__meta-22qnR",Ue={tile:Yr,tile__medallion:Zr,tile__label:Jr,tile__meta:Qr,"tile--active":"hanui-tile--active-z0F2M"},Vr=({label:a,icon:n,href:t,meta:o,isActive:i,linkProps:r,className:c,testId:l})=>e.jsxs(se,{href:t,className:_(Ue.tile,i&&Ue["tile--active"],c),"aria-current":i?"page":void 0,"data-testid":l,...r,children:[e.jsx("span",{className:Ue.tile__medallion,"aria-hidden":!0,children:n}),e.jsx("span",{className:Ue.tile__label,children:a}),o&&e.jsx("span",{className:Ue.tile__meta,children:o})]}),Wr=s.memo(Vr),ei="hanui-modal-3IDi9",ai="hanui-modal__panel--qLSz",ni="hanui-modal__header-meWm6",ti="hanui-modal__icon-df2dd",oi="hanui-modal__heading-PwDS8",si="hanui-modal__title-80Sh6",ri="hanui-modal__description-fsCHI",ii="hanui-modal__close-vFPbw",ci="hanui-modal__body-PDF12",li="hanui-modal__footer-CCCkx",Q={modal:ei,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em","hanui-fade-in":"hanui-hanui-fade-in-oHUfh","hanui-fade-in-up":"hanui-hanui-fade-in-up-RF4Hl","hanui-slide-up":"hanui-hanui-slide-up-ibKAg",modal__panel:ai,modal__header:ni,modal__icon:ti,"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:oi,modal__title:si,modal__description:ri,modal__close:ii,modal__body:ci,modal__footer:li},di=({isOpen:a,onClose:n,title:t,closeLabel:o,children:i,description:r,footer:c,icon:l,tone:d="neutral",size:u="md",isDismissable:p=!0,className:g,testId:h})=>{const{labels:m}=A(),k=s.useRef(null),b=s.useId(),x=s.useId();s.useEffect(()=>{const y=k.current;y&&(a&&!y.open&&(y.showModal(),ra(y)),!a&&y.open&&y.close())},[a]),s.useEffect(()=>{if(!a)return;const y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=y}},[a]),s.useEffect(()=>{const y=k.current;if(!y)return;const $=R=>{R.preventDefault(),p&&n()};return y.addEventListener("cancel",$),()=>y.removeEventListener("cancel",$)},[n,p]);const w=s.useCallback(y=>{p&&y.target===k.current&&n()},[p,n]);return e.jsx("dialog",{ref:k,className:_(Q.modal,Q[`modal--${u}`],g),"aria-labelledby":b,"aria-describedby":r?x:void 0,"data-testid":h,onClick:w,children:e.jsxs("div",{className:Q.modal__panel,children:[e.jsxs("header",{className:Q.modal__header,children:[l&&e.jsx("span",{className:_(Q.modal__icon,Q[`modal__icon--${d}`]),children:l}),e.jsxs("div",{className:Q.modal__heading,children:[e.jsx("h2",{id:b,className:Q.modal__title,children:t}),r&&e.jsx("p",{id:x,className:Q.modal__description,children:r})]}),p&&e.jsx(Xe,{icon:e.jsx(D.XLg,{"aria-hidden":!0}),label:E("Modal.closeLabel",o,m==null?void 0:m.close),variant:"ghost",size:"sm",className:Q.modal__close,onClick:n})]}),i&&e.jsx("div",{className:Q.modal__body,children:i}),c&&e.jsx("footer",{className:Q.modal__footer,children:c})]})})},la=s.memo(di),_i={destructive:e.jsx(D.TrashFill,{"aria-hidden":!0}),warning:e.jsx(D.ExclamationTriangleFill,{"aria-hidden":!0}),neutral:e.jsx(D.QuestionCircleFill,{"aria-hidden":!0})},ui={destructive:"danger",warning:"warning",neutral:"info"},hi={destructive:oe.DANGER,warning:oe.PRIMARY,neutral:oe.PRIMARY},mi=({isOpen:a,onClose:n,onConfirm:t,title:o,description:i,confirmLabel:r,cancelLabel:c,closeLabel:l,kind:d="neutral",children:u})=>{const{labels:p}=A(),[g,h]=s.useState(!1),m=async()=>{h(!0);try{await t()}finally{h(!1)}};return e.jsx(la,{isOpen:a,onClose:n,title:o,closeLabel:l??(p==null?void 0:p.close),description:i,icon:_i[d],tone:ui[d],size:"sm",isDismissable:!g,footer:e.jsxs(e.Fragment,{children:[e.jsx(Oe,{variant:oe.SECONDARY,size:ge.MEDIUM,onClick:n,disabled:g,children:E("ConfirmDialog.cancelLabel",c,p==null?void 0:p.cancel)}),e.jsx(Oe,{variant:hi[d],size:ge.MEDIUM,onClick:m,isLoading:g,children:r})]}),children:u})},pi=s.memo(mi),bi="hanui-form-zpZn4",gi={form:bi},xi=({isOpen:a,onClose:n,onSubmit:t,title:o,label:i,submitLabel:r,cancelLabel:c,closeLabel:l,description:d,hint:u,placeholder:p,defaultValue:g="",isRequired:h,requiredLabel:m,inputMode:k="text",maxLength:b,rows:x=4})=>{const{labels:w}=A(),y=s.useId(),[$,R]=s.useState(g),[F,K]=s.useState(!1),W=s.useRef(!1);s.useEffect(()=>{a&&!W.current&&R(g),W.current=a},[a,g]);const S=$.trim(),ee=!!h&&S==="",I=M=>k==="multiline"?e.jsx(Ka,{...M,value:$,onChange:U=>R(U.target.value),placeholder:p,maxLength:b,rows:x}):e.jsx(Pa,{...M,type:k==="number"?"number":"text",value:$,onChange:U=>R(U.target.value),placeholder:p,maxLength:b}),B=async()=>{if(!(ee||F)){K(!0);try{await t(S),n()}catch{}finally{K(!1)}}};return e.jsx(la,{isOpen:a,onClose:n,title:o,closeLabel:l??(w==null?void 0:w.close),description:d,size:"sm",isDismissable:!F,footer:e.jsxs(e.Fragment,{children:[e.jsx(Oe,{variant:oe.SECONDARY,size:ge.MEDIUM,onClick:n,disabled:F,children:E("PromptDialog.cancelLabel",c,w==null?void 0:w.cancel)}),e.jsx(Oe,{type:"submit",form:y,variant:oe.PRIMARY,size:ge.MEDIUM,disabled:ee,isLoading:F,children:E("PromptDialog.submitLabel",r,w==null?void 0:w.submit)})]}),children:e.jsx("form",{id:y,className:gi.form,onSubmit:M=>{M.preventDefault(),B()},children:e.jsx(za,{label:i,hint:u,isRequired:h,requiredLabel:m,children:I})})})},fi=s.memo(xi),yi="hanui-scroller-EtDmS",vi="hanui-table-uCv4q",Fe={scroller:yi,"scroller--frame":"hanui-scroller--frame-84zz6",table:vi,"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"},Wa=s.memo(({hasFrame:a=!0,className:n,children:t,...o})=>e.jsx("div",{className:_(Fe.scroller,a&&Fe["scroller--frame"],n),...o,children:t}));Wa.displayName="TableScroller";const ki=({density:a="regular",hasStickyHead:n,hasRowHover:t,className:o,children:i,...r})=>e.jsx("table",{className:_(Fe.table,Fe[`table--${a}`],n&&Fe["table--sticky-head"],t&&Fe["table--row-hover"],o),...r,children:i}),Ni=s.memo(ki),ji="hanui-wrapper-KXCZg",wi="hanui-table-LF5Ow",$i="hanui-state-YPPb0",Ci="hanui-state__message-wwbIW",Ne={wrapper:ji,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:wi,state:$i,"state--error":"hanui-state--error-A492d",state__message:Ci,"row--warning":"hanui-row--warning-BAUN2"},Di=({columns:a,children:n,isLoading:t,error:o,emptyMessage:i,loadingMessage:r,hasViewportCap:c,className:l,testId:d})=>{var h,m;const{labels:u}=A(),p=s.Children.count(n),g=(k,b)=>e.jsx("tr",{children:e.jsx("td",{colSpan:a.length,className:_(Ne.state,b&&Ne[`state--${b}`]),children:k})});return e.jsx("div",{className:_(Ne.wrapper,c&&Ne["wrapper--capped"],l),"data-testid":d,children:e.jsxs("table",{className:Ne.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:a.map(k=>e.jsx("th",{scope:"col","aria-label":k.srLabel,"aria-sort":k.ariaSort,className:k.className,children:k.label},k.key))})}),e.jsx("tbody",{children:o?g(e.jsxs("span",{role:"alert",className:Ne.state__message,children:[e.jsx(D.ExclamationCircleFill,{"aria-hidden":!0}),o]}),"error"):t?g(E("DataTable.loadingMessage",r,(h=u==null?void 0:u.dataTable)==null?void 0:h.loading)):p===0?g(E("DataTable.emptyMessage",i,(m=u==null?void 0:u.dataTable)==null?void 0:m.empty)):n})]})})},en=s.memo(({isWarning:a,className:n,children:t,...o})=>e.jsx("tr",{className:_(a&&Ne["row--warning"],n),...o,children:t}));en.displayName="DataTableRow";const Ei=s.memo(Di),Ri="hanui-bar-b4PP4",Ii="hanui-bar__hiddenSubmit-jeCyX",Li="hanui-bar__actions-rG69L",Ti="hanui-field-f-rvu",Ge={bar:Ri,bar__hiddenSubmit:Ii,bar__actions:Li,field:Ti,"field--wide":"hanui-field--wide-FA5gf"},Bi=({onSubmit:a,children:n,actions:t,label:o,className:i,testId:r})=>{const{labels:c}=A();return e.jsxs("form",{className:_(Ge.bar,i),"aria-label":E("FilterBar.label",o,c==null?void 0:c.filters),"data-testid":r,onSubmit:l=>{l.preventDefault(),a()},children:[n,e.jsx("button",{type:"submit",className:Ge.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),t&&e.jsx("div",{className:Ge.bar__actions,children:t})]})},an=s.memo(({children:a,isWide:n,className:t})=>e.jsx("div",{className:_(Ge.field,n&&Ge["field--wide"],t),children:a}));an.displayName="FilterBarField";const Si=s.memo(Bi),Ai="hanui-pagination-K-L20",Fi="hanui-pagination__list--9HqC",Mi="hanui-pagination__arrow-XIgoX",Oi="hanui-pagination__page-TpoJM",Pi="hanui-pagination__gap-qoDyI",ue={pagination:Ai,pagination__list:Fi,pagination__arrow:Mi,pagination__page:Oi,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:Pi},Hi=(a,n)=>{if(n<=7)return Array.from({length:n},(r,c)=>c+1);const t=new Set([1,n,a]);a-1>1&&t.add(a-1),a+1<n&&t.add(a+1);const o=[...t].sort((r,c)=>r-c),i=[];return o.forEach((r,c)=>{c>0&&r-o[c-1]>1&&i.push("gap"),i.push(r)}),i},Ki=({page:a,totalPages:n,label:t,previousLabel:o,nextLabel:i,buildHref:r,onPageChange:c,linkProps:l,className:d,testId:u})=>{var m,k,b;const{labels:p}=A(),g=s.useMemo(()=>Hi(a,n),[a,n]);if(n<=1)return null;const h=x=>{c&&c(x)};return e.jsxs("nav",{className:_(ue.pagination,d),"aria-label":E("Pagination.label",t,(m=p==null?void 0:p.pagination)==null?void 0:m.label),"data-testid":u,children:[e.jsx(Xe,{className:ue.pagination__arrow,icon:e.jsx(D.CaretLeftFill,{"aria-hidden":!0}),label:E("Pagination.previousLabel",o,(k=p==null?void 0:p.pagination)==null?void 0:k.previous),variant:"outline",disabled:a<=1,onClick:()=>h(a-1)}),e.jsx("ul",{className:ue.pagination__list,children:g.map((x,w)=>x==="gap"?e.jsx("li",{className:ue.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${w}`):e.jsx("li",{children:r?e.jsx(se,{href:r(x),className:_(ue.pagination__page,x===a&&ue["pagination__page--active"]),"aria-current":x===a?"page":void 0,...l,children:x}):e.jsx(Oe,{variant:oe.SECONDARY,size:ge.SMALL,className:_(ue.pagination__page,x===a&&ue["pagination__page--active"]),"aria-current":x===a?"page":void 0,onClick:()=>h(x),children:x})},x))}),e.jsx(Xe,{className:ue.pagination__arrow,icon:e.jsx(D.CaretRightFill,{"aria-hidden":!0}),label:E("Pagination.nextLabel",i,(b=p==null?void 0:p.pagination)==null?void 0:b.next),variant:"outline",disabled:a>=n,onClick:()=>h(a+1)})]})},zi=s.memo(Ki);exports.ABOVE_MOBILE_MEDIA_QUERY=We;exports.ABOVE_TABLET_MEDIA_QUERY=hn;exports.Alert=Oo;exports.Avatar=qo;exports.Badge=Yo;exports.BottomSheet=ca;exports.Breadcrumb=as;exports.Button=Oe;exports.Card=ds;exports.CardBody=Ga;exports.CardFooter=Xa;exports.CardMedia=qa;exports.CardOverlay=Ua;exports.Checkbox=Et;exports.Chip=Sa;exports.ChipGroup=On;exports.Combobox=_t;exports.ConfirmDialog=pi;exports.CopyField=gs;exports.DARK_THEME=ya;exports.DEFAULT_FONTS=sn;exports.DataTable=Ei;exports.DataTableRow=en;exports.Directory=As;exports.DirectoryGroup=Ya;exports.DirectoryJump=Ja;exports.DirectoryRow=Za;exports.Divider=vs;exports.EmptyState=zs;exports.Field=za;exports.FilterBar=Si;exports.FilterBarField=an;exports.HanuiProvider=cn;exports.IconButton=Xe;exports.Input=Pa;exports.LIGHT_THEME=fa;exports.MOBILE_BREAKPOINT=Ea;exports.Modal=la;exports.PageHeader=er;exports.Pagination=zi;exports.Panel=mr;exports.PanelForm=Qa;exports.PanelRow=Va;exports.Price=vr;exports.PromptDialog=fi;exports.QuantityStepper=ho;exports.Radio=At;exports.RadioCard=Kt;exports.RangeSlider=Qt;exports.Rating=Dr;exports.RatingInput=io;exports.SectionHeader=Ar;exports.Select=Nt;exports.Skeleton=Pr;exports.Spinner=ia;exports.TABLET_BREAKPOINT=Ra;exports.TABLET_PORTRAIT_BREAKPOINT=un;exports.Table=Ni;exports.TableCheckbox=bo;exports.TableScroller=Wa;exports.Tabs=Xr;exports.TextLink=Cn;exports.Textarea=Ka;exports.Tile=Wr;exports.Tooltip=Ln;exports.UISize=ge;exports.UIVariant=oe;exports.buildThemeCss=va;exports.initHanui=ln;exports.isKeyboardOpeningElement=Ia;exports.matchesSearch=sa;exports.normalizeSearchTerm=oa;exports.preventAutoKeyboard=ra;exports.resolveTokens=rn;exports.useHanui=A;exports.useHanuiTheme=_n;exports.useSheetViewport=Da;
21
+ `)},ma=e=>{if(!H.isClient())return;const a=e?pa(e):"",n=document.getElementById(Vt);if(a===""){n==null||n.remove();return}const r=n??document.createElement("style");r.id=Vt,r.textContent=a,n||document.head.appendChild(r)},ba=s.createContext({}),O=()=>s.useContext(ba),Ma=({children:e,theme:a,linkComponent:n,labels:r})=>{const i=s.useMemo(()=>a?JSON.stringify(a):"",[a]);s.useEffect(()=>{ma(a)},[i]);const c=s.useRef(a);c.current=a;const o=s.useMemo(()=>({theme:c.current,linkComponent:n,labels:r}),[i,n,r]);return t.jsx(ba.Provider,{value:o,children:e})},Ba=(e={})=>{ma(e.theme),H.isClient()&&(e.colorScheme&&document.documentElement.setAttribute(Ue,e.colorScheme),e.density&&document.documentElement.setAttribute(ha,e.density))},Pa="hanui-live-region",Oa=e=>{if(!H.isClient())return null;const a=`${Pa}-${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},za=(e,a)=>{e.textContent="",window.requestAnimationFrame(()=>{e.textContent=a})},Ct=()=>s.useCallback((e,a="polite")=>{const n=e.trim();if(n==="")return;const r=Oa(a);r&&za(r,n)},[]),ta=()=>{var e;return H.isClient()&&((e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},Ha=()=>{if(!H.isClient())return"system";const e=document.documentElement.getAttribute(Ue);return e==="dark"||e==="light"?e:"system"},Ka=()=>{const[e,a]=s.useState("light"),[n,r]=s.useState("light"),[i,c]=s.useState(!1);s.useEffect(()=>{a(Ha()),r(ta()),c(!0)},[]),s.useEffect(()=>{if(!H.isClient()||!window.matchMedia)return;const u=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>r(ta());return u.addEventListener("change",l),()=>u.removeEventListener("change",l)},[]);const o=e==="system"?n:e,_=s.useCallback(u=>{if(!H.isClient())return;const l=document.documentElement;l.classList.add(ea),u==="system"?l.removeAttribute(Ue):l.setAttribute(Ue,u),a(u),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(ea))})},[]),h=s.useCallback(()=>_(o==="dark"?"light":"dark"),[o,_]);return{scheme:o,preference:e,setScheme:_,toggle:h,isReady:i}},qt=({count:e,isOpen:a,initialIndex:n=0,onSelect:r,onClose:i},{hasSpaceSelect:c=!1}={})=>{const[o,_]=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,d;a&&((d=(l=h.current)==null?void 0:l.querySelector(`[data-index="${o}"]`))==null||d.scrollIntoView({block:"nearest"}))},[o,a,e]);const u=s.useCallback(l=>{const d=e-1;switch(l.key){case"ArrowDown":l.preventDefault(),_(p=>p>=d?0:p+1);break;case"ArrowUp":l.preventDefault(),_(p=>p<=0?d:p-1);break;case"Home":l.preventDefault(),_(0);break;case"End":l.preventDefault(),_(d);break;case" ":case"Enter":{if(l.key===" "&&!c)break;l.preventDefault(),e>0&&r(o);break}case"Escape":l.preventDefault(),i();break;case"Tab":i();break}},[o,e,c,i,r]);return{activeIndex:o,setActiveIndex:_,listRef:h,handleKeyDown:u}},Ft={top:"bottom",bottom:"top",left:"right",right:"left"},aa=(e,a,n)=>Math.min(Math.max(e,a),n),Mt=(e,a,n,r,i)=>{const c=n==="top"||n==="bottom",o={top:e.top-a.height-i,bottom:e.top+e.height+i,left:e.left-a.width-i,right:e.left+e.width+i}[n],_=c?e.left:e.top,h=c?e.width:e.height,u=c?a.width:a.height,l={start:_,center:_+h/2-u/2,end:_+h-u}[r];return c?{top:o,left:l}:{top:l,left:o}},na=(e,a,n,r,i)=>({top:e.top>=r,bottom:e.top+a.height<=i.height-r,left:e.left>=r,right:e.left+a.width<=i.width-r})[n],Et=(e,a,{side:n="top",align:r="center",offset:i=8,padding:c=8,isOpen:o})=>{const[_,h]=s.useState({style:{position:"fixed",top:0,left:0},side:n,isPositioned:!1}),u=s.useRef(0),l=s.useCallback(()=>{const b=e.current,y=a.current;if(!b||!y)return;const g=b.getBoundingClientRect(),m=y.getBoundingClientRect(),x={width:window.innerWidth,height:window.innerHeight},$=Mt(g,m,n,r,i),j=na($,m,n,c,x)?n:na(Mt(g,m,Ft[n],r,i),m,Ft[n],c,x)?Ft[n]:n,v=Mt(g,m,j,r,i);h({style:{position:"fixed",top:Math.round(aa(v.top,c,x.height-m.height-c)),left:Math.round(aa(v.left,c,x.width-m.width-c))},side:j,isPositioned:!0})},[e,a,n,r,i,c]),d=s.useCallback(()=>{u.current||(u.current=window.requestAnimationFrame(()=>{u.current=0,l()}))},[l]);return(H.isClient()?s.useLayoutEffect:s.useEffect)(()=>{if(!o){h(y=>y.isPositioned?{...y,isPositioned:!1}:y);return}l(),window.addEventListener("resize",d),document.addEventListener("scroll",d,!0);const b=typeof ResizeObserver>"u"?null:new ResizeObserver(d);return b&&a.current&&b.observe(a.current),b&&e.current&&b.observe(e.current),()=>{window.removeEventListener("resize",d),document.removeEventListener("scroll",d,!0),b==null||b.disconnect(),u.current&&(window.cancelAnimationFrame(u.current),u.current=0)}},[o,l,d,e,a]),_},Ua=(e,{rowHeight:a=40,overscan:n=6,isEnabled:r=!0}={})=>{const i=s.useRef(null),[c,o]=s.useState({start:0,end:e,totalHeight:e*a,offset:0}),_=s.useCallback(()=>{const u=i.current;if(!r||!u||u.clientHeight===0){o({start:0,end:e,totalHeight:e*a,offset:0});return}const l=Math.ceil(u.clientHeight/a),d=Math.floor(u.scrollTop/a),p=Math.max(0,d-n),b=Math.min(e,d+l+n);o({start:p,end:b,totalHeight:e*a,offset:p*a})},[e,r,n,a]);s.useEffect(()=>{const u=i.current;if(!u)return;_(),u.addEventListener("scroll",_,{passive:!0});const l=typeof ResizeObserver>"u"?null:new ResizeObserver(_);return l==null||l.observe(u),()=>{u.removeEventListener("scroll",_),l==null||l.disconnect()}},[_]);const h=s.useCallback(u=>{const l=i.current;if(!l||!r)return;const d=u*a,p=d+a;d<l.scrollTop?l.scrollTop=d:p>l.scrollTop+l.clientHeight&&(l.scrollTop=p-l.clientHeight)},[r,a]);return{scrollRef:i,range:c,scrollToIndex:h,measure:_}};let mt=0,je=null;const qa=()=>/iP(hone|ad|od)/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,Ya=()=>{if(mt+=1,mt>1)return;const{body:e,style:a}={body:document.body,style:document.documentElement.style},n=window.scrollY;je={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",qa()&&(e.style.position="fixed",e.style.top=`${-n}px`,e.style.width="100%")},Xa=()=>{if(mt=Math.max(0,mt-1),mt>0||!je)return;const{body:e}=document,{scrollY:a}=je;e.style.overflow=je.overflow,e.style.position=je.position,e.style.top=je.top,e.style.width=je.width,e.style.paddingRight=je.paddingRight,document.documentElement.style.removeProperty("scrollbar-gutter"),je=null,window.scrollTo(0,a)},vt=(e=!0)=>{s.useEffect(()=>{if(e)return Ya(),Xa},[e])},ga="--hanui-sheet-height",fa="--hanui-sheet-inset-bottom";let yt=0,tt=0;const Ga=240,xa=()=>{const e=window.visualViewport;if(!e||e.height<Ga)return;const a=window.innerHeight-e.height-e.offsetTop,n=document.documentElement;n.style.setProperty(fa,`${Math.max(0,Math.round(a))}px`),n.style.setProperty(ga,`${Math.round(e.height)}px`)},Ye=()=>{tt||(tt=window.requestAnimationFrame(()=>{tt=0,xa()}))},sa=()=>{tt&&(window.cancelAnimationFrame(tt),tt=0)},va=(e=!0)=>{s.useEffect(()=>{if(!e)return;const a=window.visualViewport;if(a)return yt+=1,yt===1&&(a.addEventListener("resize",Ye),a.addEventListener("scroll",Ye),window.addEventListener("orientationchange",Ye)),sa(),xa(),()=>{yt-=1,!(yt>0)&&(a.removeEventListener("resize",Ye),a.removeEventListener("scroll",Ye),window.removeEventListener("orientationchange",Ye),sa(),document.documentElement.style.removeProperty(fa),document.documentElement.style.removeProperty(ga))}},[e])};var he=(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))(he||{}),Re=(e=>(e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e))(Re||{});const ya=640,Qa=768,wa=1024,Ja=`(min-width: ${wa+1}px)`,It=`(min-width: ${ya+1}px)`,zt=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(),ft=(e,a)=>zt(e).includes(zt(a)),Wa=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),ka=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:!Wa.has(e.type)},Dt=e=>{const a=e.ownerDocument.activeElement;!e.contains(a)||!ka(a)||(a.blur(),e.tabIndex=-1,e.focus({preventScroll:!0}))},nt=()=>{const e=typeof document>"u"?null:document.activeElement;return()=>{e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0})}},Za=["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(", "),Tt=(e,a="[data-hanui-close]")=>{const n=e.querySelector("[data-hanui-autofocus]");if(n){n.focus({preventScroll:!0});return}const r=[...e.querySelectorAll(Za)],i=r.find(c=>!c.matches(a))??r[0];if(i){i.focus({preventScroll:!0});return}e.tabIndex=-1,e.focus({preventScroll:!0})},bt=[],Rt=()=>{const e=Symbol("hanui-modal");return bt.push(e),{token:e,pop:()=>{const a=bt.indexOf(e);a>=0&&bt.splice(a,1)}}},St=e=>bt[bt.length-1]===e,f=(...e)=>{let a="";for(const n of e)n&&(a=a===""?n:`${a} ${n}`);return a},S=(e,a)=>Object.assign(e,{displayName:a}),me=({children:e,...a})=>{const{linkComponent:n}=O();return n?t.jsx(n,{...a,children:e}):t.jsx("a",{...a,children:e})},ra=new Set,B=(e,...a)=>{for(const n of a)if(n!==void 0)return n;return process.env.NODE_ENV!=="production"&&!ra.has(e)&&(ra.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.`)),""},Ve=(e,a,...n)=>a?a(...n):B(e),Va="hanui-spinner-7pXwf",en="hanui-spinner__label-sZvSq",Bt={spinner:Va,"hanui-spin":"hanui-hanui-spin-wTV0a",spinner__label:en,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},tn=({size:e="md",label:a,className:n})=>{const{labels:r}=O();return t.jsx("span",{className:f(Bt.spinner,Bt[`spinner--${e}`],n),role:"status",children:t.jsx("span",{className:Bt.spinner__label,children:a??B("Spinner.label",r==null?void 0:r.loading)})})},Yt=s.memo(tn),an="hanui-button-SRu4R",nn="hanui-button__icon-giom6",sn="hanui-button__spinner-vexVG",rn="hanui-button__label-qiMHm",fe={button:an,button__icon:nn,button__spinner:sn,button__label:rn,"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"},on=s.forwardRef(({variant:e=he.PRIMARY,size:a=Re.MEDIUM,isLoading:n,isFullWidth:r,startIcon:i,endIcon:c,className:o,children:_,disabled:h,href:u,isExternal:l,linkProps:d,testId:p,...b},y)=>{const g=f(fe.button,fe[`button--${e.toLowerCase()}`],fe[`button--${a.toLowerCase()}`],r&&fe["button--full"],n&&fe["button--loading"],o),m=t.jsxs(t.Fragment,{children:[n&&t.jsx(Yt,{size:"sm",className:fe.button__spinner,label:""}),!n&&i&&t.jsx("span",{className:fe.button__icon,children:i}),t.jsx("span",{className:fe.button__label,children:_}),c&&t.jsx("span",{className:fe.button__icon,children:c})]});return u&&l?t.jsx("a",{href:u,className:g,target:"_blank",rel:"noopener noreferrer","aria-label":b["aria-label"],"data-testid":p,children:m}):u?t.jsx(me,{href:u,className:g,"data-testid":p,...d,children:m}):t.jsx("button",{ref:y,className:g,disabled:h||n,"aria-busy":n,"data-testid":p,...b,children:m})}),at=s.memo(S(on,"Button")),cn="hanui-iconButton-JdtwM",Pt={iconButton:cn,"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"},ln=s.forwardRef(({icon:e,label:a,variant:n="ghost",size:r="md",className:i,type:c="button",href:o,linkProps:_,testId:h,...u},l)=>{const d=f(Pt.iconButton,Pt[`iconButton--${n}`],Pt[`iconButton--${r}`],i);return o?t.jsx(me,{href:o,className:d,"aria-label":a,title:u.title??a,"data-testid":h,..._,children:e}):t.jsx("button",{ref:l,type:c,className:d,"aria-label":a,title:a,"data-testid":h,...u,children:e})}),pe=s.memo(S(ln,"IconButton")),dn="hanui-link-WBmXY",un="hanui-link__label--OEu-",_n="hanui-link__arrow-JKXm-",it={link:dn,link__label:un,link__arrow:_n,"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"},hn=({href:e,children:a,hasArrow:n,tone:r="brand",size:i="md",className:c,linkProps:o,..._})=>t.jsxs(me,{href:e,className:f(it.link,it[`link--${r}`],it[`link--${i}`],c),...o,..._,children:[t.jsx("span",{className:it.link__label,children:a}),n&&t.jsx(I.ArrowRight,{"aria-hidden":!0,className:it.link__arrow})]}),pn=s.memo(hn),mn="hanui-tooltip-RG1g1",bn="hanui-tooltip__trigger-nWZtO",gn="hanui-bubble-bcBNk",wt={tooltip:mn,tooltip__trigger:bn,bubble:gn,"bubble--top":"hanui-bubble--top-uWSZy","hanui-fade-in-up":"hanui-hanui-fade-in-up-Fwj3A","bubble--bottom":"hanui-bubble--bottom-jKokL","hanui-fade-in-down":"hanui-hanui-fade-in-down-5UfIc","bubble--left":"hanui-bubble--left-WK4EM","bubble--right":"hanui-bubble--right-EQjUT","hanui-fade-in":"hanui-hanui-fade-in-wwrDx"},fn=120,xn=500,vn=({content:e,children:a,side:n,position:r,openDelay:i=300,className:c})=>{const[o,_]=s.useState(!1),h=s.useId(),u=n??r??"top",l=s.useRef(null),d=s.useRef(null),p=s.useRef(0),b=s.useRef(0),y=Et(l,d,{side:u,align:"center",isOpen:o}),g=s.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=0},[]),m=s.useCallback(v=>{g(),p.current=window.setTimeout(()=>_(!0),v)},[g]),x=s.useCallback((v=fn)=>{g(),p.current=window.setTimeout(()=>_(!1),v)},[g]);s.useEffect(()=>g,[g]),s.useEffect(()=>{if(!o)return;const v=N=>{N.key==="Escape"&&x(0)};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[o,x]),s.useEffect(()=>{if(!o)return;const v=N=>{var w;N.pointerType!=="mouse"&&((w=l.current)!=null&&w.contains(N.target)||x(0))};return document.addEventListener("pointerdown",v),()=>document.removeEventListener("pointerdown",v)},[o,x]);const $=()=>{b.current&&window.clearTimeout(b.current),b.current=0},j=v=>{v.pointerType!=="mouse"&&(b.current=window.setTimeout(()=>_(!0),xn))};return t.jsxs(t.Fragment,{children:[t.jsx("span",{ref:l,className:f(wt.tooltip,c),onPointerEnter:v=>v.pointerType==="mouse"&&m(i),onPointerLeave:v=>{$(),v.pointerType==="mouse"&&x()},onPointerDown:j,onPointerUp:$,onPointerCancel:$,onFocus:()=>m(0),onBlur:()=>x(0),onContextMenu:v=>{(o||b.current)&&v.preventDefault()},children:t.jsx("span",{"aria-describedby":o?h:void 0,className:wt.tooltip__trigger,children:a})}),o&&H.isClient()&&xt.createPortal(t.jsx("span",{ref:d,id:h,role:"tooltip",className:f(wt.bubble,wt[`bubble--${y.side}`]),style:{...y.style,visibility:y.isPositioned?"visible":"hidden"},onPointerEnter:g,onPointerLeave:()=>x(),children:e}),document.body)]})},yn=s.memo(S(vn,"Tooltip")),wn="hanui-menu-1x-FU",kn="hanui-menu__item-d1iil",jn="hanui-menu__icon-kzLV2",ct={menu:wn,"menu--top":"hanui-menu--top-gpo39","hanui-fade-in-up":"hanui-hanui-fade-in-up-7YdDa","menu--bottom":"hanui-menu--bottom-6sL7b","hanui-fade-in-down":"hanui-hanui-fade-in-down-gZjPq","menu--left":"hanui-menu--left-4w-O8","menu--right":"hanui-menu--right-XmM8G","hanui-fade-in":"hanui-hanui-fade-in-vivgk",menu__item:kn,"menu__item--danger":"hanui-menu__item--danger-lIINY",menu__icon:jn},Nn=e=>e.map((a,n)=>a.isDisabled?-1:n).filter(a=>a>=0),$n=({trigger:e,items:a,label:n,side:r="bottom",align:i="start",className:c,testId:o})=>{const _=s.useId(),h=s.useRef(null),u=s.useRef(null),l=s.useRef(null),d=s.useRef({text:"",at:0}),[p,b]=s.useState(!1),[y,g]=s.useState(0),m=Et(h,u,{side:r,align:i,isOpen:p}),x=Nn(a),$=s.useCallback(k=>{x.length!==0&&(l.current=nt(),g(k==="first"?x[0]:x[x.length-1]),b(!0))},[x]),j=s.useCallback(()=>{var k;b(!1),(k=l.current)==null||k.call(l),l.current=null},[]);s.useEffect(()=>{var k,L;p&&((L=(k=u.current)==null?void 0:k.querySelector(`[data-index="${y}"]`))==null||L.focus({preventScroll:!0}))},[p,y]),s.useEffect(()=>{if(!p)return;const k=L=>{var K,G;const z=L.target;(K=u.current)!=null&&K.contains(z)||(G=h.current)!=null&&G.contains(z)||j()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[p,j]);const v=k=>{const z=(x.indexOf(y)+k+x.length)%x.length;g(x[z])},N=k=>{const L=Date.now(),z=L-d.current.at>500?k:d.current.text+k;d.current={text:z,at:L};const K=x.find(G=>a[G].label.toLocaleLowerCase("tr").startsWith(z.toLocaleLowerCase("tr")));K!==void 0&&g(K)},w=k=>{switch(k.key){case"ArrowDown":k.preventDefault(),v(1);break;case"ArrowUp":k.preventDefault(),v(-1);break;case"Home":k.preventDefault(),g(x[0]);break;case"End":k.preventDefault(),g(x[x.length-1]);break;case"Escape":k.preventDefault(),j();break;case"Tab":j();break;default:k.key.length===1&&!k.metaKey&&!k.ctrlKey&&N(k.key)}},E=k=>{if(k.key==="ArrowUp"){k.preventDefault(),$("last");return}["ArrowDown","Enter"," "].includes(k.key)&&(k.preventDefault(),$("first"))};if(!s.isValidElement(e))return null;const T=e.props,C=s.cloneElement(e,{ref:h,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?_:void 0,onClick:k=>{var L;(L=T.onClick)==null||L.call(T,k),p?j():$("first")},onKeyDown:k=>{var L;(L=T.onKeyDown)==null||L.call(T,k),p||E(k)}});return t.jsxs(t.Fragment,{children:[C,p&&H.isClient()&&xt.createPortal(t.jsx("div",{ref:u,id:_,role:"menu","aria-label":n,className:f(ct.menu,ct[`menu--${m.side}`],c),style:{...m.style,visibility:m.isPositioned?"visible":"hidden"},"data-testid":o,onKeyDown:w,children:a.map((k,L)=>t.jsxs("button",{type:"button",role:"menuitem","data-index":L,tabIndex:L===y?0:-1,disabled:k.isDisabled,className:f(ct.menu__item,k.isDanger&&ct["menu__item--danger"]),onClick:()=>{k.onSelect(),j()},onMouseEnter:()=>!k.isDisabled&&g(L),children:[k.icon&&t.jsx("span",{className:ct.menu__icon,"aria-hidden":!0,children:k.icon}),k.label]},k.id))}),document.body)]})},Cn=s.memo(S($n,"Menu")),En="hanui-popover-VxgiK",oa={popover:En,"popover--top":"hanui-popover--top-OUYwo","hanui-fade-in-up":"hanui-hanui-fade-in-up-it2wl","popover--bottom":"hanui-popover--bottom-Q1K4X","hanui-fade-in-down":"hanui-hanui-fade-in-down-E-AGy","popover--left":"hanui-popover--left-9Rsjx","popover--right":"hanui-popover--right-0TJeo","hanui-fade-in":"hanui-hanui-fade-in-zsza4"},In=({trigger:e,children:a,label:n,side:r="bottom",align:i="start",isOpen:c,onOpenChange:o,className:_,testId:h})=>{const u=s.useId(),l=s.useRef(null),d=s.useRef(null),p=s.useRef(null),[b,y]=s.useState(!1),g=c!==void 0,m=g?c:b,x=Et(l,d,{side:r,align:i,isOpen:m}),$=s.useCallback(N=>{g||y(N),o==null||o(N)},[g,o]);if(s.useEffect(()=>{if(!m)return;p.current=nt();const N=d.current;return N&&Tt(N),()=>{var w;(w=p.current)==null||w.call(p),p.current=null}},[m]),s.useEffect(()=>{if(!m)return;const N=E=>{E.key==="Escape"&&$(!1)},w=E=>{var C,k;const T=E.target;(C=d.current)!=null&&C.contains(T)||(k=l.current)!=null&&k.contains(T)||$(!1)};return document.addEventListener("keydown",N),document.addEventListener("mousedown",w),()=>{document.removeEventListener("keydown",N),document.removeEventListener("mousedown",w)}},[m,$]),!s.isValidElement(e))return null;const j=e.props,v=s.cloneElement(e,{ref:l,"aria-expanded":m,"aria-haspopup":"dialog","aria-controls":m?u:void 0,onClick:N=>{var w;(w=j.onClick)==null||w.call(j,N),$(!m)}});return t.jsxs(t.Fragment,{children:[v,m&&H.isClient()&&xt.createPortal(t.jsx("div",{ref:d,id:u,role:"dialog","aria-label":n,className:f(oa.popover,oa[`popover--${x.side}`],_),style:{...x.style,visibility:x.isPositioned?"visible":"hidden"},"data-testid":h,onBlur:N=>{var w;N.currentTarget.contains(N.relatedTarget)||(w=l.current)!=null&&w.contains(N.relatedTarget)||$(!1)},children:a}),document.body)]})},Dn=s.memo(S(In,"Popover")),Tn="hanui-chip--NLgU",Rn="hanui-chip__icon-IjjSb",Sn="hanui-chip__label-cT4hw",Ln="hanui-chip__count-MBGO3",$e={chip:Tn,chip__icon:Rn,chip__label:Sn,chip__count:Ln,"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"},An=s.forwardRef(({children:e,icon:a,endIcon:n,count:r,isSelected:i,size:c="md",label:o,href:_,linkProps:h,className:u,type:l="button",role:d,testId:p,...b},y)=>{const g=f($e.chip,$e[`chip--${c}`],i&&$e["chip--selected"],!e&&$e["chip--iconOnly"],u),m=t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:$e.chip__icon,"aria-hidden":!0,children:a}),e&&t.jsx("span",{className:$e.chip__label,children:e}),H.isDefined(r)&&t.jsx("span",{className:$e.chip__count,children:r}),n&&t.jsx("span",{className:$e.chip__icon,"aria-hidden":!0,children:n})]});return _?t.jsx(me,{href:_,className:g,"aria-label":e?void 0:o,"aria-current":i?"page":void 0,title:e?void 0:o,"data-testid":p,...h,children:m}):t.jsx("button",{ref:y,type:l,role:d,className:g,"aria-label":e?void 0:o,title:e?void 0:o,"data-testid":p,...d==="radio"?{"aria-checked":!!i}:{"aria-pressed":!!i},...b,children:m})}),ja=s.memo(S(An,"Chip")),Fn="hanui-group-0tnVf",ia={group:Fn,"group--scrollable":"hanui-group--scrollable-PMu6V"},Mn=({options:e,label:a,size:n="md",isScrollable:r,className:i,...c})=>{var d;const o=s.useRef(null),_=p=>c.isMultiple?c.value.includes(p):c.value===p,h=p=>{if(c.isMultiple){const b=c.value.includes(p)?c.value.filter(y=>y!==p):[...c.value,p];c.onChange(b);return}c.onChange(c.value===p?null:p)},u=p=>{var x,$;if(c.isMultiple)return;const b=p.key==="ArrowRight"||p.key==="ArrowDown"?1:p.key==="ArrowLeft"||p.key==="ArrowUp"?-1:0;if(b===0)return;p.preventDefault();const y=e.filter(j=>!j.isDisabled);if(y.length===0)return;const g=y.findIndex(j=>j.value===c.value),m=y[(g+b+y.length)%y.length];c.onChange(m.value),($=(x=o.current)==null?void 0:x.querySelector(`[data-chip-value="${m.value}"]`))==null||$.focus()},l=c.isMultiple?null:c.value??((d=e.find(p=>!p.isDisabled))==null?void 0:d.value)??null;return t.jsx("div",{ref:o,className:f(ia.group,r&&ia["group--scrollable"],i),role:c.isMultiple?"group":"radiogroup","aria-label":a,onKeyDown:u,children:e.map(p=>t.jsx(ja,{size:n,icon:p.icon,count:p.count,isSelected:_(p.value),disabled:p.isDisabled,role:c.isMultiple?void 0:"radio",tabIndex:c.isMultiple||p.value===l?0:-1,"data-chip-value":p.value,onClick:()=>h(p.value),children:p.label},p.value))})},Bn=s.memo(Mn),Pn="hanui-sheet-GEvdE",On="hanui-sheet__header-NJgw-",zn="hanui-sheet__title-f-b07",Hn="hanui-sheet__toolbar-eyhmW",Kn="hanui-sheet__body-eJ2KB",Un="hanui-sheet__footer-NpsY5",Ae={sheet:Pn,sheet__header:On,sheet__title:zn,sheet__toolbar:Hn,sheet__body:Kn,sheet__footer:Un},qn=({title:e,closeLabel:a,onClose:n,children:r,toolbar:i,footer:c,closeAbove:o=It,className:_,testId:h})=>{const{labels:u}=O(),l=s.useId(),d=s.useRef(null);va(),vt(),s.useEffect(()=>{const y=nt(),{token:g,pop:m}=Rt();return d.current=g,()=>{m(),d.current=null,y()}},[]),s.useEffect(()=>{const y=window.matchMedia(o);return y.addEventListener("change",n),()=>y.removeEventListener("change",n)},[o,n]);const p=s.useCallback(y=>{!y||y.open||(y.showModal(),Tt(y,`.${Ae.sheet__header} button`),Dt(y))},[]),b=s.useCallback(y=>{y.target===y.currentTarget&&n()},[n]);return H.isClient()?xt.createPortal(t.jsxs("dialog",{ref:p,className:f(Ae.sheet,_),"aria-labelledby":l,"data-testid":h,onCancel:y=>{y.preventDefault(),!(d.current&&!St(d.current))&&n()},onClick:b,children:[t.jsxs("header",{className:Ae.sheet__header,children:[t.jsx("h2",{id:l,className:Ae.sheet__title,children:e}),t.jsx(pe,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:B("BottomSheet.closeLabel",a,u==null?void 0:u.close),variant:"ghost",size:"sm",onClick:n})]}),i&&t.jsx("div",{className:Ae.sheet__toolbar,children:i}),t.jsx("div",{className:Ae.sheet__body,children:r}),c&&t.jsx("div",{className:Ae.sheet__footer,children:c})]}),document.body):null},Xt=s.memo(qn),Yn="hanui-combobox-NtZoV",Xn="hanui-combobox__trigger-2riRR",Gn="hanui-combobox__leadingIcon-it2xz",Qn="hanui-combobox__value-acDlr",Jn="hanui-combobox__clear-EXOsc",Wn="hanui-combobox__chevron-g-QzQ",Zn="hanui-combobox__panel-srBxl",Vn="hanui-combobox__search-THjer",es="hanui-combobox__searchIcon-vr4Bg",ts="hanui-combobox__searchInput-JPp5h",as="hanui-combobox__list-p-eCs",ns="hanui-combobox__option-CLWh-",ss="hanui-combobox__optionText-Zm0D6",rs="hanui-combobox__optionLabel-WvT4W",os="hanui-combobox__optionDescription-8OEzi",is="hanui-combobox__check-MKlLz",cs="hanui-combobox__empty-mZwBq",P={combobox:Yn,combobox__trigger:Xn,"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__leadingIcon:Gn,combobox__value:Qn,combobox__clear:Jn,combobox__chevron:Wn,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:Zn,combobox__search:Vn,combobox__searchIcon:es,combobox__searchInput:ts,combobox__list:as,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:ns,"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:ss,combobox__optionLabel:rs,combobox__optionDescription:os,combobox__check:is,combobox__empty:cs},ls=({options:e,value:a,onChange:n,labels:r,isSearchHidden:i,onSearch:c,isLoading:o,isDisabled:_,isClearable:h,icon:u,id:l,className:d,testId:p,"aria-describedby":b,"aria-invalid":y})=>{const{labels:g}=O(),m={get search(){var A;return B("Combobox.searchPlaceholder",r.searchPlaceholder,(A=g==null?void 0:g.combobox)==null?void 0:A.searchPlaceholder)},get empty(){var A;return B("Combobox.emptyMessage",r.emptyMessage,(A=g==null?void 0:g.combobox)==null?void 0:A.emptyMessage)},get loading(){var A;return B("Combobox.loadingMessage",r.loadingMessage,(A=g==null?void 0:g.combobox)==null?void 0:A.loadingMessage)},get clear(){var A;return B("Combobox.clearLabel",r.clearLabel,(A=g==null?void 0:g.combobox)==null?void 0:A.clearLabel)}},x=s.useId(),$=l??x,j=`${$}-listbox`,v=s.useRef(null),N=s.useRef(null),w=s.useRef(null),[E,T]=s.useState(null),C=E!==null,[k,L]=s.useState(""),[z,K]=s.useState(null),G=s.useMemo(()=>{if(c||k.trim()==="")return e;const A=k.trim();return e.filter(U=>ft(U.label,A)||(U.description?ft(U.description,A):!1))},[e,k,c]),Q=e.find(A=>A.value===a)??null;s.useEffect(()=>{Q?K(Q.label):a===null&&K(null)},[Q,a]);const de=(Q==null?void 0:Q.label)??z,Se=s.useRef(c);Se.current=c,s.useEffect(()=>{if(!C||!Se.current)return;const A=window.setTimeout(()=>{var U;return(U=Se.current)==null?void 0:U.call(Se,k.trim())},300);return()=>window.clearTimeout(A)},[k,C]);const be=s.useCallback(()=>{T(null),L("")},[]),Lt=s.useCallback(()=>{_||(T(window.matchMedia(It).matches?"popover":"sheet"),L(""))},[_]);s.useEffect(()=>{if(E!=="popover")return;const A=U=>{var Le;(Le=v.current)!=null&&Le.contains(U.target)||be()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[E,be]),s.useEffect(()=>{var A;E==="popover"&&((A=w.current)==null||A.focus({preventScroll:!0}))},[E]);const st=A=>{A.isDisabled||(K(A.label),n(A.value),be())},rt=s.useRef(!1);s.useEffect(()=>{var A;rt.current&&!C&&((A=N.current)==null||A.focus()),rt.current=C},[C]);const{activeIndex:M,setActiveIndex:W,listRef:ge,handleKeyDown:ot}=qt({count:G.length,isOpen:C,initialIndex:Math.max(e.findIndex(A=>A.value===a),0),onSelect:A=>{const U=G[A];U&&st(U)},onClose:be}),Da=ot,Ta=()=>{n(null),K(null)},Jt=i?null:t.jsxs("div",{className:P.combobox__search,children:[t.jsx(I.Search,{"aria-hidden":!0,className:P.combobox__searchIcon}),t.jsx("input",{ref:w,type:"text",role:"combobox",className:P.combobox__searchInput,value:k,placeholder:m.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":j,"aria-activedescendant":G[M]?`${$}-option-${M}`:void 0,"aria-label":m.search,onChange:A=>{L(A.target.value),W(0)},onKeyDown:Da}),o&&t.jsx(Yt,{size:"sm",label:""})]}),Wt=A=>t.jsxs("ul",{ref:ge,id:j,role:"listbox",className:f(P.combobox__list,A&&P["combobox__list--sheet"]),children:[G.map((U,Le)=>{const Ra=Le===M,At=U.value===a;return t.jsx("li",{children:t.jsxs("div",{id:`${$}-option-${Le}`,role:"option","data-index":Le,"aria-selected":At,"aria-disabled":U.isDisabled,className:f(P.combobox__option,Ra&&P["combobox__option--active"],At&&P["combobox__option--selected"],U.isDisabled&&P["combobox__option--disabled"]),onMouseEnter:()=>W(Le),onClick:()=>st(U),children:[t.jsxs("span",{className:P.combobox__optionText,children:[t.jsx("span",{className:P.combobox__optionLabel,children:U.label}),U.description&&t.jsx("span",{className:P.combobox__optionDescription,children:U.description})]}),At&&t.jsx(I.CheckLg,{"aria-hidden":!0,className:P.combobox__check})]})},U.value)}),G.length===0&&t.jsx("li",{className:P.combobox__empty,children:o?m.loading:m.empty})]});return t.jsxs("div",{ref:v,className:f(P.combobox,d),"data-testid":p,children:[t.jsxs("button",{ref:N,id:$,type:"button",className:f(P.combobox__trigger,!de&&P["combobox__trigger--empty"],C&&P["combobox__trigger--open"],y&&P["combobox__trigger--invalid"],h&&de&&!_&&P["combobox__trigger--clearable"]),disabled:_,"aria-haspopup":"listbox","aria-expanded":C,"aria-controls":C?j:void 0,"aria-label":r.placeholder,"aria-describedby":b,onClick:()=>C?be():Lt(),children:[u&&t.jsx("span",{className:P.combobox__leadingIcon,"aria-hidden":!0,children:u}),t.jsx("span",{className:P.combobox__value,children:de??r.placeholder}),t.jsx(I.CaretDownFill,{"aria-hidden":!0,className:f(P.combobox__chevron,C&&P["combobox__chevron--open"])})]}),h&&de&&!_&&t.jsx("button",{type:"button",className:P.combobox__clear,"aria-label":m.clear,onClick:Ta,children:t.jsx(I.XLg,{"aria-hidden":!0})}),E==="popover"&&t.jsxs("div",{className:P.combobox__panel,children:[Jt,Wt(!1)]}),E==="sheet"&&t.jsx(Xt,{title:r.placeholder,closeLabel:r.closeLabel??(g==null?void 0:g.close),onClose:be,toolbar:Jt??void 0,children:Wt(!0)})]})},ds=s.memo(ls),us="hanui-segmented-qo2Bw",_s="hanui-segmented__item-mqRNZ",hs="hanui-segmented__icon-C9CT-",ps="hanui-segmented__label-NVXBv",Xe={segmented:us,"segmented--sm":"hanui-segmented--sm-7tUry","segmented--md":"hanui-segmented--md-PiSqt",segmented__item:_s,"segmented__item--selected":"hanui-segmented__item--selected-r7CLj",segmented__icon:hs,segmented__label:ps},ms=({options:e,value:a,onChange:n,label:r,isIconOnly:i,size:c="md",className:o,testId:_})=>{const h=s.useRef(null),u=l=>{var g,m;const d=l.key==="ArrowRight"||l.key==="ArrowDown"?1:l.key==="ArrowLeft"||l.key==="ArrowUp"?-1:0;if(d===0)return;l.preventDefault();const p=e.filter(x=>!x.isDisabled);if(p.length===0)return;const b=p.findIndex(x=>x.value===a),y=p[(b+d+p.length)%p.length];n(y.value),(m=(g=h.current)==null?void 0:g.querySelector(`[data-value="${y.value}"]`))==null||m.focus({preventScroll:!0})};return t.jsx("div",{ref:h,role:"radiogroup","aria-label":r,className:f(Xe.segmented,Xe[`segmented--${c}`],o),"data-testid":_,onKeyDown:u,children:e.map(l=>{const d=l.value===a;return t.jsxs("button",{type:"button",role:"radio","aria-checked":d,"aria-label":i?l.label:void 0,"data-value":l.value,disabled:l.isDisabled,tabIndex:d?0:-1,className:f(Xe.segmented__item,d&&Xe["segmented__item--selected"]),onClick:()=>!d&&n(l.value),children:[l.icon&&t.jsx("span",{className:Xe.segmented__icon,"aria-hidden":!0,children:l.icon}),!i&&t.jsx("span",{className:Xe.segmented__label,children:l.label})]},l.value)})})},bs=s.memo(S(ms,"SegmentedControl")),gs="hanui-select-tiiPL",fs="hanui-trigger-rHQJz",xs="hanui-trigger__icon-apCcx",vs="hanui-trigger__value-ioH7K",ys="hanui-trigger__chevron-FtsIZ",ws="hanui-panel-rGOOd",ks="hanui-list-SOKf8",js="hanui-option-ZDPef",Ns="hanui-option__label-SsoYB",$s="hanui-option__check-8CPSG",Y={select:gs,trigger:fs,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:xs,trigger__value:vs,trigger__chevron:ys,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:ws,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Lt0Bt","panel--start":"hanui-panel--start-Fotwa","panel--end":"hanui-panel--end-ClVl2",list:ks,"list--sheet":"hanui-list--sheet-BIjCb",option:js,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:Ns,option__check:$s},Cs=({options:e,value:a,onChange:n,label:r,placeholder:i,closeLabel:c,icon:o,size:_="md",align:h="start",isDisabled:u,id:l,className:d,testId:p,"aria-describedby":b,"aria-invalid":y})=>{const{labels:g}=O(),m=B("Select.placeholder",i,g==null?void 0:g.selectPlaceholder),x=s.useId(),$=l??x,j=`${$}-listbox`,v=M=>`${$}-option-${M}`,N=s.useRef(null),w=s.useRef(null),[E,T]=s.useState(null),C=E!==null,k=e.findIndex(M=>M.value===a),L=k>=0?e[k]:null,z=s.useCallback(()=>T(null),[]),K=s.useCallback(()=>{u||e.length===0||T(window.matchMedia(It).matches?"popover":"sheet")},[u,e.length]),G=M=>{M.isDisabled||(n(M.value),z())},Q=s.useRef(!1);s.useEffect(()=>{var M;Q.current&&!C&&((M=w.current)==null||M.focus()),Q.current=C},[C]),s.useEffect(()=>{if(E!=="popover")return;const M=W=>{var ge;(ge=N.current)!=null&&ge.contains(W.target)||z()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[E,z]),s.useEffect(()=>{var M;E==="sheet"&&((M=be.current)==null||M.focus({preventScroll:!0}))},[E]);const{activeIndex:de,setActiveIndex:Se,listRef:be,handleKeyDown:Lt}=qt({count:e.length,isOpen:C,initialIndex:k>=0?k:0,onSelect:M=>{const W=e[M];W&&G(W)},onClose:z}),st=M=>{if(!C){["ArrowDown","ArrowUp","Enter"," "].includes(M.key)&&(M.preventDefault(),K());return}Lt(M)},rt=M=>t.jsx("ul",{ref:be,id:j,role:"listbox","aria-label":r,"aria-activedescendant":M&&e[de]?v(de):void 0,tabIndex:M?0:-1,className:f(Y.list,M&&Y["list--sheet"]),onKeyDown:M?st:void 0,children:e.map((W,ge)=>{const ot=W.value===a;return t.jsxs("li",{id:v(ge),role:"option","data-index":ge,"aria-selected":ot,"aria-disabled":W.isDisabled,className:f(Y.option,ge===de&&Y["option--active"],ot&&Y["option--selected"],W.isDisabled&&Y["option--disabled"]),onMouseEnter:()=>Se(ge),onClick:()=>G(W),children:[t.jsx("span",{className:Y.option__label,children:W.label}),ot&&t.jsx(I.CheckLg,{"aria-hidden":!0,className:Y.option__check})]},W.value)})});return t.jsxs("span",{ref:N,className:f(Y.select,d),"data-testid":p,children:[t.jsxs("button",{ref:w,id:$,type:"button",role:"combobox",className:f(Y.trigger,Y[`trigger--${_}`],!L&&Y["trigger--empty"],C&&Y["trigger--open"]),disabled:u,"aria-haspopup":"listbox","aria-expanded":C,"aria-controls":C?j:void 0,"aria-activedescendant":E==="popover"&&e[de]?v(de):void 0,"aria-label":r,"aria-describedby":b,"aria-invalid":y,onClick:()=>C?z():K(),onKeyDown:st,children:[o&&t.jsx("span",{className:Y.trigger__icon,"aria-hidden":!0,children:o}),t.jsx("span",{className:Y.trigger__value,children:(L==null?void 0:L.label)??m}),t.jsx(I.CaretDownFill,{"aria-hidden":!0,className:f(Y.trigger__chevron,C&&Y["trigger__chevron--open"])})]}),E==="popover"&&t.jsx("div",{className:f(Y.panel,Y[`panel--${h}`]),children:rt(!1)}),E==="sheet"&&t.jsx(Xt,{title:r,closeLabel:c??(g==null?void 0:g.close),onClose:z,children:rt(!0)})]})},Es=s.memo(Cs),Is="hanui-checkbox-FaFCj",Ds="hanui-checkbox__input-nTHne",Ts="hanui-checkbox__body-VAEW2",Rs="hanui-checkbox__label-sSNZY",Ss="hanui-checkbox__hint-ish-J",lt={checkbox:Is,checkbox__input:Ds,checkbox__body:Ts,checkbox__label:Rs,checkbox__hint:Ss},Ls=s.forwardRef(({label:e,hint:a,className:n,testId:r,...i},c)=>t.jsxs("label",{className:f(lt.checkbox,n),"data-testid":r,children:[t.jsx("input",{ref:c,type:"checkbox",className:lt.checkbox__input,...i}),t.jsxs("span",{className:lt.checkbox__body,children:[t.jsx("span",{className:lt.checkbox__label,children:e}),a&&t.jsx("span",{className:lt.checkbox__hint,children:a})]})]})),As=s.memo(S(Ls,"Checkbox")),Fs="hanui-switch__input-Q2UQ4",Ms="hanui-switch__label-gPZuO",Bs="hanui-switch__hint-NRuzC",Ps="hanui-switch__track-3417m",Os="hanui-switch__thumb-1LHta",zs="hanui-switch__text-32uMY",Ce={switch:"hanui-switch-KLH29",switch__input:Fs,"switch--labelFirst":"hanui-switch--labelFirst-Grirk",switch__label:Ms,switch__hint:Bs,switch__track:Ps,switch__thumb:Os,switch__text:zs},Hs=s.forwardRef(({label:e,hint:a,isLabelFirst:n,className:r,id:i,testId:c,...o},_)=>t.jsxs("label",{className:f(Ce.switch,n&&Ce["switch--labelFirst"],r),"data-testid":c,children:[t.jsx("input",{ref:_,type:"checkbox",role:"switch",id:i,className:Ce.switch__input,...o}),t.jsx("span",{className:Ce.switch__track,"aria-hidden":!0,children:t.jsx("span",{className:Ce.switch__thumb})}),t.jsxs("span",{className:Ce.switch__text,children:[t.jsx("span",{className:Ce.switch__label,children:e}),a&&t.jsx("span",{className:Ce.switch__hint,children:a})]})]})),Ks=s.memo(S(Hs,"Switch")),Us="hanui-radio-KoZak",qs="hanui-radio__input-gVMgh",Ys="hanui-radio__body-oZWg6",Xs="hanui-radio__label-d-5ce",Gs="hanui-radio__hint-baVbs",Qs="hanui-radio__count-OtkUM",Ge={radio:Us,radio__input:qs,radio__body:Ys,radio__label:Xs,radio__hint:Gs,radio__count:Qs},Js=s.forwardRef(({label:e,hint:a,count:n,className:r,testId:i,...c},o)=>t.jsxs("label",{className:f(Ge.radio,r),"data-testid":i,children:[t.jsx("input",{ref:o,type:"radio",className:Ge.radio__input,...c}),t.jsxs("span",{className:Ge.radio__body,children:[t.jsx("span",{className:Ge.radio__label,children:e}),a&&t.jsx("span",{className:Ge.radio__hint,children:a})]}),H.isDefined(n)&&t.jsx("span",{className:Ge.radio__count,children:n})]})),Ws=s.memo(S(Js,"Radio")),Zs="hanui-radioCard-sndiC",Vs="hanui-radioCard__input-6vuoD",er="hanui-radioCard__indicator--x9LT",tr="hanui-radioCard__body-CFqoi",Qe={radioCard:Zs,radioCard__input:Vs,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:er,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:tr},ar=({name:e,value:a,isSelected:n,isDisabled:r,onChange:i,children:c,className:o,id:_,testId:h})=>t.jsxs("label",{className:f(Qe.radioCard,n&&Qe["radioCard--selected"],r&&Qe["radioCard--disabled"],o),"data-testid":h,children:[t.jsx("input",{type:"radio",id:_,name:e,value:a,checked:n,disabled:r,onChange:()=>i(a),className:Qe.radioCard__input}),t.jsx("span",{className:Qe.radioCard__indicator,"aria-hidden":!0}),t.jsx("span",{className:Qe.radioCard__body,children:c})]}),nr=s.memo(ar),sr="hanui-range-RpDPh",rr="hanui-range__readout-itDMd",or="hanui-range__separator-u-ZJX",ir="hanui-range__track-bCh5Y",cr="hanui-range__fill-VXMCE",lr="hanui-range__input-TAN2I",dr="hanui-range__bounds-GIhFd",oe={range:sr,"range--disabled":"hanui-range--disabled-13hlc",range__readout:rr,range__separator:or,range__track:ir,range__fill:cr,range__input:lr,range__bounds:dr},ur=({min:e,max:a,step:n=1,value:r,onChange:i,onCommit:c,formatValue:o=String,label:_,minLabel:h,maxLabel:u,isDisabled:l,className:d,testId:p})=>{var C,k;const{labels:b}=O(),y=B("RangeSlider.minLabel",h,(C=b==null?void 0:b.range)==null?void 0:C.min),g=B("RangeSlider.maxLabel",u,(k=b==null?void 0:b.range)==null?void 0:k.max),[m,x]=r,$=s.useCallback(L=>i([Math.min(L,x),x]),[x,i]),j=s.useCallback(L=>i([m,Math.max(L,m)]),[m,i]),v=s.useCallback(()=>c==null?void 0:c([m,x]),[m,x,c]),N=a-e,w=N===0?0:H.normalize(m-e,N),E=N===0?0:H.normalize(x-e,N),T=w>50;return t.jsxs("div",{className:f(oe.range,l&&oe["range--disabled"],d),role:"group","aria-label":_,"data-testid":p,children:[t.jsxs("div",{className:oe.range__readout,children:[t.jsx("span",{className:oe.range__value,children:o(m)}),t.jsx("span",{className:oe.range__separator,"aria-hidden":!0,children:"—"}),t.jsx("span",{className:oe.range__value,children:o(x)})]}),t.jsxs("div",{className:oe.range__track,children:[t.jsx("span",{className:oe.range__fill,style:{left:`${w}%`,right:`${100-E}%`},"aria-hidden":!0}),t.jsx("input",{type:"range",className:oe.range__input,style:{zIndex:T?4:3},min:e,max:a,step:n,value:m,disabled:l,"aria-label":`${_} — ${y}`,"aria-valuetext":o(m),onChange:L=>$(Number(L.target.value)),onPointerUp:v,onKeyUp:v}),t.jsx("input",{type:"range",className:oe.range__input,style:{zIndex:T?3:4},min:e,max:a,step:n,value:x,disabled:l,"aria-label":`${_} — ${g}`,"aria-valuetext":o(x),onChange:L=>j(Number(L.target.value)),onPointerUp:v,onKeyUp:v})]}),t.jsxs("div",{className:oe.range__bounds,"aria-hidden":!0,children:[t.jsx("span",{children:o(e)}),t.jsx("span",{children:o(a)})]})]})},_r=s.memo(ur),hr="hanui-rating-neNnF",pr="hanui-rating__legend-uYvFS",mr="hanui-rating__stars-vJFLk",br="hanui-rating__star-BANFJ",gr="hanui-rating__input-s2iiO",fr="hanui-rating__srOnly-iSCoz",xr="hanui-rating__caption-13KFX",xe={rating:hr,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:pr,rating__stars:mr,rating__star:br,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:gr,rating__srOnly:fr,rating__caption:xr},vr=[1,2,3,4,5],yr=({value:e,onChange:a,label:n,ratingLabels:r,formatStarCount:i,isDisabled:c,className:o,testId:_})=>{var y;const{labels:h}=O(),u=r??((y=h==null?void 0:h.rating)==null?void 0:y.scale),l=s.useId(),[d,p]=s.useState(null),b=d??e;return t.jsxs("fieldset",{className:f(xe.rating,c&&xe["rating--disabled"],o),disabled:c,"data-testid":_,children:[t.jsx("legend",{className:xe.rating__legend,children:n}),t.jsx("div",{className:xe.rating__stars,onMouseLeave:()=>p(null),children:vr.map(g=>{var m;return t.jsxs("label",{className:f(xe.rating__star,b!==null&&g<=b&&xe["rating__star--filled"]),onMouseEnter:()=>p(g),children:[t.jsx("input",{type:"radio",name:l,value:g,checked:e===g,onChange:()=>a(g),className:xe.rating__input}),t.jsx(I.StarFill,{"aria-hidden":!0}),t.jsxs("span",{className:xe.rating__srOnly,children:[Ve("RatingInput.formatStarCount",i??((m=h==null?void 0:h.rating)==null?void 0:m.starCount),g)," ","— ",(u==null?void 0:u[g])??""]})]},g)})}),b!==null&&t.jsx("span",{className:xe.rating__caption,"aria-hidden":!0,children:(u==null?void 0:u[b])??""})]})},wr=s.memo(yr),kr="hanui-stepper-8s5Ih",jr="hanui-stepper__button-h6g7d",Nr="hanui-stepper__input-OQh5v",dt={stepper:kr,stepper__button:jr,stepper__input:Nr,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},$r=({value:e,onChange:a,label:n,decreaseLabel:r,increaseLabel:i,min:c=1,max:o=99,isDisabled:_,size:h="md",className:u,testId:l})=>{var m,x,$;const{labels:d}=O(),p=B("QuantityStepper.label",n,(m=d==null?void 0:d.quantity)==null?void 0:m.label),[b,y]=s.useState(null),g=j=>{y(null);const v=Number(j.replace(/\D/g,""));v&&a(Math.min(Math.max(v,c),o))};return t.jsxs("div",{className:f(dt.stepper,dt[`stepper--${h}`],u),role:"group","aria-label":p,"data-testid":l,children:[t.jsx("button",{type:"button",className:dt.stepper__button,onClick:()=>a(Math.max(e-1,c)),disabled:_||e<=c,"aria-label":B("QuantityStepper.decreaseLabel",r,(x=d==null?void 0:d.quantity)==null?void 0:x.decrease),children:t.jsx(I.DashLg,{"aria-hidden":!0})}),t.jsx("input",{className:dt.stepper__input,value:b??String(e),onChange:j=>y(j.target.value.replace(/\D/g,"").slice(0,2)),onBlur:j=>g(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),g(j.target.value))},inputMode:"numeric",disabled:_,"aria-label":`${p} (${c}-${o})`}),t.jsx("button",{type:"button",className:dt.stepper__button,onClick:()=>a(Math.min(e+1,o)),disabled:_||e>=o,"aria-label":B("QuantityStepper.increaseLabel",i,($=d==null?void 0:d.quantity)==null?void 0:$.increase),children:t.jsx(I.PlusLg,{"aria-hidden":!0})})]})},Cr=s.memo($r),Er="hanui-checkbox--dvpB",Ir={checkbox:Er},Dr=s.forwardRef(({label:e,className:a,testId:n,...r},i)=>t.jsx("input",{ref:i,type:"checkbox","aria-label":e,className:f(Ir.checkbox,a),"data-testid":n,...r})),Tr=s.memo(S(Dr,"TableCheckbox")),Rr="hanui-wrapper-IAI4E",Sr="hanui-wrapper__prefix-XKDlV",Lr="hanui-wrapper__suffix-lT35q",Ar="hanui-input-pIS2u",Fe={wrapper:Rr,wrapper__prefix:Sr,wrapper__suffix:Lr,input:Ar,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Fr=s.forwardRef(({prefix:e,suffix:a,isTechnical:n,className:r,testId:i,...c},o)=>t.jsxs("span",{className:f(Fe.wrapper,r),children:[e&&t.jsx("span",{className:Fe.wrapper__prefix,"aria-hidden":!0,children:e}),t.jsx("input",{ref:o,className:f(Fe.input,!!e&&Fe["input--hasPrefix"],!!a&&Fe["input--hasSuffix"],n&&Fe["input--technical"]),"data-testid":i,...c}),a&&t.jsx("span",{className:Fe.wrapper__suffix,"aria-hidden":!0,children:a})]})),Na=s.memo(S(Fr,"Input")),Mr="hanui-tagInput-QraZR",Br="hanui-tagInput__field-HeWrC",Pr="hanui-tagInput__tag-D-ZWB",Or="hanui-tagInput__remove-bpjGG",Me={tagInput:Mr,tagInput__field:Br,"tagInput--invalid":"hanui-tagInput--invalid-NQogL","tagInput--disabled":"hanui-tagInput--disabled--AJFF",tagInput__tag:Pr,"tagInput__tag--duplicate":"hanui-tagInput__tag--duplicate-3-FMF",tagInput__remove:Or},zr=({values:e,onChange:a,label:n,placeholder:r,removeLabel:i,separators:c=["Enter",","],maxTags:o,isDisabled:_,id:h,className:u,testId:l,"aria-describedby":d,"aria-invalid":p})=>{const b=s.useId(),y=h??b,g=s.useRef(null),m=Ct(),[x,$]=s.useState(""),[j,v]=s.useState(null),N=o!==void 0&&e.length>=o,w=C=>{const k=C.trim();if(k!==""){if(e.includes(k)){v(k),window.setTimeout(()=>v(null),1e3),m(`${k} zaten ekli`,"assertive"),$("");return}N||(a([...e,k]),$(""),m(`${k} eklendi`))}},E=C=>{a(e.filter(k=>k!==C)),m(`${C} kaldırıldı`)},T=C=>{if(c.includes(C.key)){C.preventDefault(),w(x);return}C.key==="Backspace"&&x===""&&e.length>0&&E(e[e.length-1])};return t.jsxs("div",{className:f(Me.tagInput,_&&Me["tagInput--disabled"],p&&Me["tagInput--invalid"],u),"data-testid":l,onClick:()=>{var C;return(C=g.current)==null?void 0:C.focus()},children:[e.map(C=>t.jsxs("span",{className:f(Me.tagInput__tag,j===C&&Me["tagInput__tag--duplicate"]),children:[C,t.jsx("button",{type:"button",className:Me.tagInput__remove,"aria-label":`${C} — ${i}`,disabled:_,onClick:k=>{k.stopPropagation(),E(C)},children:t.jsx(I.XLg,{"aria-hidden":!0})})]},C)),t.jsx("input",{ref:g,id:y,type:"text",className:Me.tagInput__field,value:x,placeholder:e.length===0?r:void 0,"aria-label":n,"aria-describedby":d,"aria-invalid":p,disabled:_||N,onChange:C=>$(C.target.value),onKeyDown:T,onBlur:()=>w(x)})]})},Hr=s.memo(S(zr,"TagInput")),Kr="hanui-textarea-zwJcB",Ur="hanui-wrapper-O8aJA",qr="hanui-counter-bHVh3",ut={textarea:Kr,wrapper:Ur,"textarea--autoSize":"hanui-textarea--autoSize--F8yj",counter:qr,"counter--near":"hanui-counter--near-AZAQm"},Yr=s.forwardRef(({className:e,rows:a=4,isAutoSize:n,maxRows:r=12,hasCounter:i,maxLength:c,value:o,defaultValue:_,onChange:h,testId:u,...l},d)=>{const p=s.useRef(null),[b,y]=s.useState(String(_??"").length),g=o===void 0?b:String(o).length,m=s.useCallback($=>{p.current=$,typeof d=="function"?d($):d&&(d.current=$)},[d]);s.useLayoutEffect(()=>{const $=p.current;if(!n||!$)return;$.style.height="auto";const v=(Number.parseFloat(getComputedStyle($).lineHeight)||20)*r;$.style.height=`${Math.min($.scrollHeight,v)}px`,$.style.overflowY=$.scrollHeight>v?"auto":"hidden"},[n,r,o,g]);const x=c!==void 0&&g>=c*.9;return t.jsxs("div",{className:f(ut.wrapper,e),"data-testid":u,children:[t.jsx("textarea",{ref:m,rows:a,className:f(ut.textarea,n&&ut["textarea--autoSize"]),maxLength:c,value:o,defaultValue:_,onChange:$=>{y($.target.value.length),h==null||h($)},...l}),i&&c!==void 0&&t.jsxs("span",{className:f(ut.counter,x&&ut["counter--near"]),"aria-hidden":!0,children:[g," / ",c]})]})}),$a=s.memo(S(Yr,"Textarea")),Xr="hanui-dateField-UnUwe",Gr="hanui-range-nGuRH",Qr="hanui-range__row--debA",Jr="hanui-range__separator-fEqqr",Wr="hanui-range__field-tmoNH",Zr="hanui-range__summary-L6v1T",He={dateField:Xr,range:Gr,range__row:Qr,range__separator:Jr,range__field:Wr,range__summary:Zr},Ht=s.forwardRef(({type:e="date",className:a,testId:n,...r},i)=>t.jsx("input",{ref:i,type:e,className:f(He.dateField,a),"data-testid":n,...r})),Vr=s.memo(S(Ht,"DateField")),eo=({value:e,onChange:a,startLabel:n,endLabel:r,separator:i="–",min:c,max:o,isSummaryVisible:_,isDisabled:h,className:u,testId:l})=>{const{labels:d}=O(),p=(()=>{if(!_||!(d!=null&&d.locale)||e.start===""||e.end==="")return null;try{const b=new Intl.DateTimeFormat(d.locale,{dateStyle:"medium"});return`${b.format(new Date(e.start))} ${i} ${b.format(new Date(e.end))}`}catch{return null}})();return t.jsxs("div",{className:f(He.range,u),"data-testid":l,children:[t.jsxs("div",{className:He.range__row,children:[t.jsx(Ht,{className:He.range__field,"aria-label":n,value:e.start,min:c,max:e.end||o,disabled:h,onChange:b=>a({...e,start:b.target.value})}),t.jsx("span",{className:He.range__separator,"aria-hidden":!0,children:i}),t.jsx(Ht,{className:He.range__field,"aria-label":r,value:e.end,min:e.start||c,max:o,disabled:h,onChange:b=>a({...e,end:b.target.value})})]}),p&&t.jsx("span",{className:He.range__summary,children:p})]})},to=S(s.memo(eo),"DateRange"),ao="hanui-field-KKvre",no="hanui-field__label-9dlYd",so="hanui-field__required-hbDJk",ro="hanui-field__srOnly-2WQFH",oo="hanui-field__hint-SQPiL",io="hanui-field__error-gLlZ-",co="hanui-field__errorIcon-uA3o8",Ee={field:ao,field__label:no,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:so,field__srOnly:ro,field__hint:oo,field__error:io,field__errorIcon:co},lo=({label:e,children:a,hint:n,error:r,isRequired:i,requiredLabel:c,isLabelHidden:o,className:_})=>{const{labels:h}=O(),u=s.useId(),l=`${u}-error`,d=`${u}-hint`;return t.jsxs("div",{className:f(Ee.field,_),children:[t.jsxs("label",{htmlFor:u,className:f(Ee.field__label,o&&Ee["field__label--hidden"]),children:[e,i&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:Ee.field__required,"aria-hidden":!0,children:"*"}),t.jsx("span",{className:Ee.field__srOnly,children:B("Field.requiredLabel",c,h==null?void 0:h.required)})]})]}),a({id:u,required:i||void 0,"aria-invalid":r?!0:void 0,"aria-describedby":[r&&l,n&&d].filter(Boolean).join(" ")||void 0}),r&&t.jsxs("p",{id:l,className:Ee.field__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0,className:Ee.field__errorIcon}),r]}),n&&t.jsx("p",{id:d,className:Ee.field__hint,children:n})]})},Ca=s.memo(lo),uo="hanui-progress-99MrX",_o="hanui-progress__track-Qbp9t",ho="hanui-progress__fill-Bam55",po="hanui-progress__value-3FYxj",mo="hanui-circle-9cn2w",bo="hanui-circle__svg-0IwkR",go="hanui-circle__track-zY2qc",fo="hanui-circle__fill-Jbde6",xo="hanui-circle__label-A3nJB",ee={progress:uo,progress__track:_o,"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:ho,"hanui-progress-slide":"hanui-hanui-progress-slide-DQi2w","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:po,circle:mo,circle__svg:bo,circle__track:go,circle__fill:fo,"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","hanui-spin":"hanui-hanui-spin-ez3g8",circle__label:xo},Ea=(e,a)=>!Number.isFinite(e)||!Number.isFinite(a)||a<=0?0:Math.min(100,Math.max(0,e/a*100)),vo=({value:e,max:a=100,label:n,valueText:r,isValueVisible:i,tone:c="brand",size:o="md",className:_,testId:h})=>{const u=e===void 0,l=u?0:Ea(e,a);return t.jsxs("div",{className:f(ee.progress,_),"data-testid":h,children:[t.jsx("div",{role:"progressbar","aria-label":n,"aria-valuenow":u?void 0:Math.round(l),"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:100,"aria-valuetext":u?void 0:r,className:f(ee.progress__track,ee[`progress__track--${o}`],u&&ee["progress__track--indeterminate"]),children:t.jsx("span",{className:f(ee.progress__fill,ee[`progress__fill--${c}`]),style:u?void 0:{inlineSize:`${l}%`}})}),i&&!u&&t.jsx("span",{className:ee.progress__value,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},Ia=s.memo(S(vo,"Progress")),yo=({value:e,max:a=100,label:n,valueText:r,isValueVisible:i,tone:c="brand",size:o=44,className:_,testId:h})=>{const u=e===void 0,l=u?25:Ea(e,a),d=Math.max(3,Math.round(o*.1)),p=(o-d)/2,b=2*Math.PI*p;return t.jsxs("div",{className:f(ee.circle,u&&ee["circle--indeterminate"],_),style:{width:o,height:o},"data-testid":h,children:[t.jsxs("svg",{className:ee.circle__svg,width:o,height:o,viewBox:`0 0 ${o} ${o}`,role:"progressbar","aria-label":n,"aria-valuenow":u?void 0:Math.round(l),"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:100,"aria-valuetext":u?void 0:r,children:[t.jsx("circle",{className:ee.circle__track,cx:o/2,cy:o/2,r:p,fill:"none",strokeWidth:d}),t.jsx("circle",{className:f(ee.circle__fill,ee[`circle__fill--${c}`]),cx:o/2,cy:o/2,r:p,fill:"none",strokeWidth:d,strokeDasharray:b,strokeDashoffset:b*(1-l/100)})]}),i&&!u&&t.jsx("span",{className:ee.circle__label,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},wo=S(s.memo(yo),"ProgressCircle"),ko="hanui-upload-v1pRY",jo="hanui-upload__drop-OpNbO",No="hanui-upload__input-Tcg9-",$o="hanui-upload__icon-KpMkq",Co="hanui-upload__label-M4HJb",Eo="hanui-upload__drag-ewSQw",Io="hanui-upload__hint-MZRJ6",Do="hanui-upload__error-7GkCC",To="hanui-upload__list-lbViQ",Ro="hanui-upload__file-Znp1Q",So="hanui-upload__fileText-EtJcs",Lo="hanui-upload__fileName-ArF8-",Ao="hanui-upload__fileMeta-i6sO1",Fo="hanui-upload__progress-JY2a5",X={upload:ko,upload__drop:jo,upload__input:No,"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:$o,upload__label:Co,upload__drag:Eo,upload__hint:Io,upload__error:Do,upload__list:To,upload__file:Ro,"upload__file--error":"hanui-upload__file--error-wpbtA",upload__fileText:So,upload__fileName:Lo,upload__fileMeta:Ao,upload__progress:Fo},ca=e=>e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`,Mo=({files:e,onSelect:a,onRemove:n,label:r,hint:i,accept:c,isMultiple:o,maxSize:_,removeLabel:h,dropLabel:u,sizeErrorText:l="{name} çok büyük (en fazla {max}).",isDisabled:d,error:p,children:b,className:y,testId:g})=>{const m=s.useId(),x=s.useId(),$=s.useRef(null),j=Ct(),[v,N]=s.useState(!1),[w,E]=s.useState([]),T=k=>{if(!k||k.length===0)return;const L=[...k],z=_===void 0?[]:L.filter(Q=>Q.size>_),K=L.filter(Q=>!z.includes(Q)),G=z.map(Q=>l.replace("{name}",Q.name).replace("{max}",ca(_??0)));E(G),K.length>0&&(a(K),j(`${K.length} dosya eklendi`)),G.length>0&&j(G.join(" "),"assertive")},C=k=>{k.preventDefault(),N(!1),!d&&T(k.dataTransfer.files)};return t.jsxs("div",{className:f(X.upload,y),"data-testid":g,children:[t.jsxs("label",{htmlFor:m,className:f(X.upload__drop,v&&X["upload__drop--dragging"],d&&X["upload__drop--disabled"],p&&X["upload__drop--invalid"]),onDragOver:k=>{k.preventDefault(),d||N(!0)},onDragLeave:()=>N(!1),onDrop:C,children:[t.jsx(I.CloudArrowUpFill,{"aria-hidden":!0,className:X.upload__icon}),t.jsx("span",{className:X.upload__label,children:r}),t.jsx("span",{className:X.upload__drag,children:u}),i&&t.jsx("span",{id:x,className:X.upload__hint,children:i}),t.jsx("input",{ref:$,id:m,type:"file",className:X.upload__input,accept:c,multiple:o,disabled:d,"aria-describedby":i?x:void 0,"aria-invalid":p?!0:void 0,onChange:k=>{T(k.target.files),k.target.value=""}})]}),p&&t.jsxs("p",{className:X.upload__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),p]}),w.map(k=>t.jsxs("p",{className:X.upload__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),k]},k)),e.length>0&&t.jsx("ul",{className:X.upload__list,children:e.map(k=>t.jsxs("li",{className:f(X.upload__file,k.error&&X["upload__file--error"]),children:[t.jsxs("span",{className:X.upload__fileText,children:[t.jsx("span",{className:X.upload__fileName,children:k.name}),t.jsx("span",{className:X.upload__fileMeta,children:k.error??ca(k.size)})]}),k.progress!==void 0&&t.jsx(Ia,{value:k.progress,label:`${k.name} yükleniyor`,size:"sm",className:X.upload__progress}),t.jsx(pe,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:`${k.name} — ${h}`,variant:"ghost",size:"sm",onClick:()=>n(k.id)})]},k.id))}),b]})},Bo=s.memo(S(Mo,"FileUpload")),Po="hanui-alert-gHI-9",Oo="hanui-alert__icon-DhiCT",zo="hanui-alert__body-52-z2",Ho="hanui-alert__title-I8BAh",Ko="hanui-alert__content-lhBEo",Uo="hanui-alert__action-1mTje",Be={alert:Po,alert__icon:Oo,alert__body:zo,alert__title:Ho,alert__content:Ko,alert__action:Uo,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},qo={info:t.jsx(I.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(I.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(I.XCircleFill,{"aria-hidden":!0})},Yo=({children:e,tone:a="info",title:n,action:r,className:i,testId:c})=>t.jsxs("div",{className:f(Be.alert,Be[`alert--${a}`],i),role:a==="danger"||a==="warning"?"alert":void 0,"data-testid":c,children:[t.jsx("span",{className:Be.alert__icon,children:qo[a]}),t.jsxs("div",{className:Be.alert__body,children:[n&&t.jsx("strong",{className:Be.alert__title,children:n}),t.jsx("div",{className:Be.alert__content,children:e})]}),r&&t.jsx("div",{className:Be.alert__action,children:r})]}),Xo=s.memo(Yo),Go="hanui-avatar-qoh3P",Qo="hanui-avatar__image-uAyAX",kt={avatar:Go,avatar__image:Qo,"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"},Jo=(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()},Wo=(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},Zo=6,Vo=({name:e,imageUrl:a,locale:n,size:r="md",className:i,testId:c})=>{const{labels:o}=O();return t.jsx("span",{className:f(kt.avatar,kt[`avatar--${r}`],!a&&kt[`avatar--tone-${Wo(e,Zo)}`],i),"aria-hidden":!0,"data-testid":c,children:a?t.jsx("img",{className:kt.avatar__image,src:a,alt:""}):Jo(e,n??(o==null?void 0:o.locale))})},ei=s.memo(Vo),ti="hanui-badge-uLAaI",ai="hanui-badge__icon-R2goZ",jt={badge:ti,badge__icon:ai,"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"},ni=({children:e,tone:a="neutral",variant:n="soft",icon:r,className:i,testId:c})=>t.jsxs("span",{className:f(jt.badge,jt[`badge--${a}`],jt[`badge--${n}`],i),"data-testid":c,children:[r&&t.jsx("span",{className:jt.badge__icon,children:r}),e]}),si=s.memo(ni),ri="hanui-breadcrumb-amB9n",oi="hanui-breadcrumb__item-Icv1S",ii="hanui-breadcrumb__link-eVkPq",ci="hanui-breadcrumb__current-8XjhU",li="hanui-breadcrumb__separator-vvaUi",_t={breadcrumb:ri,breadcrumb__item:oi,breadcrumb__link:ii,breadcrumb__current:ci,breadcrumb__separator:li},di=({items:e,label:a,linkProps:n,className:r,testId:i})=>{const{labels:c}=O();return t.jsx("nav",{className:r,"aria-label":B("Breadcrumb.label",a,c==null?void 0:c.breadcrumb),"data-testid":i,children:t.jsx("ol",{className:f(_t.breadcrumb),children:e.map((o,_)=>{const h=_===e.length-1;return t.jsxs("li",{className:_t.breadcrumb__item,children:[o.href&&!h?t.jsx(me,{href:o.href,className:_t.breadcrumb__link,...n,children:o.label}):t.jsx("span",{className:_t.breadcrumb__current,"aria-current":"page",children:o.label}),!h&&t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:_t.breadcrumb__separator})]},`${o.label}-${_}`)})})})},ui=s.memo(di),_i="hanui-card-CaHUG",hi="hanui-media__frame-eBv-s",pi="hanui-media-eggk5",mi="hanui-media__link-ujyVV",bi="hanui-overlay-AVMTX",gi="hanui-body-DyI-6",fi="hanui-footer-2WNCZ",_e={card:_i,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:hi,media:pi,media__link:mi,"media__frame--contained":"hanui-media__frame--contained-Nv9gh",overlay:bi,"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:gi,footer:fi},xi=({children:e,isInteractive:a,as:n="div",className:r,testId:i})=>t.jsx(n,{className:f(_e.card,a&&_e["card--interactive"],r),"data-testid":i,children:e}),vi=S(s.memo(({children:e,ratio:a=1,href:n,linkProps:r,isContained:i=!0,className:c})=>{const o=t.jsx("span",{className:f(_e.media__frame,i&&_e["media__frame--contained"]),style:{aspectRatio:a},children:e});return t.jsx("div",{className:f(_e.media,c),children:n?t.jsx(me,{href:n,className:_e.media__link,tabIndex:-1,"aria-hidden":!0,...r,children:o}):o})}),"CardMedia"),yi=S(s.memo(({children:e,position:a="top-left",className:n})=>t.jsx("div",{className:f(_e.overlay,_e[`overlay--${a}`],n),children:e})),"CardOverlay"),wi=S(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(_e.body,a),children:e})),"CardBody"),ki=S(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(_e.footer,a),children:e})),"CardFooter"),ji=s.memo(xi),Ni="hanui-carousel-GJXkW",$i="hanui-carousel__controls-hm5ij",Ci="hanui-carousel__arrowIcon-adFey",Ei="hanui-carousel__track-mAux5",Ii="hanui-carousel__dots-iU8RJ",Di="hanui-carousel__dot-JTLCB",Ie={carousel:Ni,carousel__controls:$i,carousel__arrowIcon:Ci,carousel__track:Ei,carousel__dots:Ii,carousel__dot:Di,"carousel__dot--active":"hanui-carousel__dot--active-riNMm"},Ti=({children:e,label:a,previousLabel:n,nextLabel:r,formatDotLabel:i,itemMinWidth:c=240,className:o,testId:_})=>{const h=s.useRef(null),[u,l]=s.useState(!1),[d,p]=s.useState(!1),[b,y]=s.useState(0),[g,m]=s.useState(1),[x,$]=s.useState(!1),j=s.useCallback(()=>{const N=h.current;if(!N)return;const{scrollLeft:w,scrollWidth:E,clientWidth:T}=N;l(w>1),p(w+T<E-1),y(T>0?Math.round(w/T):0),m(T>0?Math.max(1,Math.ceil(E/T)):1),$(E>T&&N.querySelector("a, button, input, select, textarea, [tabindex]")===null)},[]);s.useEffect(()=>{const N=h.current;if(!N)return;j(),N.addEventListener("scroll",j,{passive:!0});const w=typeof ResizeObserver>"u"?null:new ResizeObserver(j);return w==null||w.observe(N),()=>{N.removeEventListener("scroll",j),w==null||w.disconnect()}},[j,e]);const v=N=>{var w;return(w=h.current)==null?void 0:w.scrollBy({left:N*h.current.clientWidth,behavior:"smooth"})};return t.jsxs("section",{className:f(Ie.carousel,o),"aria-label":a,"data-testid":_,children:[t.jsxs("div",{className:Ie.carousel__controls,children:[t.jsx(pe,{icon:t.jsx(I.CaretLeftFill,{"aria-hidden":!0,className:Ie.carousel__arrowIcon}),label:n,variant:"outline",size:"sm",disabled:!u,onClick:()=>v(-1)}),t.jsx(pe,{icon:t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:Ie.carousel__arrowIcon}),label:r,variant:"outline",size:"sm",disabled:!d,onClick:()=>v(1)})]}),t.jsx("div",{ref:h,className:Ie.carousel__track,style:{"--hanui-carousel-item":`${c}px`},tabIndex:x?0:void 0,role:x?"group":void 0,"aria-label":x?a:void 0,children:e}),i&&g>1&&t.jsx("div",{className:Ie.carousel__dots,children:Array.from({length:g},(N,w)=>t.jsx("button",{type:"button",className:f(Ie.carousel__dot,w===b&&Ie["carousel__dot--active"]),"aria-label":i(w+1,g),"aria-current":w===b?"true":void 0,onClick:()=>{var E;return(E=h.current)==null?void 0:E.scrollTo({left:w*h.current.clientWidth,behavior:"smooth"})}},w))})]})},Ri=s.memo(S(Ti,"Carousel")),Si="hanui-copy-Yht5s",Li="hanui-copy__code-CYlCA",Ai="hanui-copy__button-GDdH6",Fi="hanui-copy__srOnly-WMTNN",Je={copy:Si,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:Li,"copy--md":"hanui-copy--md-00rhU",copy__button:Ai,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:Fi},Mi=1600,Bi=({value:e,copyLabel:a,copiedLabel:n,copiedAnnouncement:r,size:i="sm",isReadOnly:c,className:o,testId:_})=>{var g,m,x,$,j;const{labels:h}=O(),[u,l]=s.useState(!1),d=s.useRef(null),p=s.useRef(void 0);s.useEffect(()=>()=>window.clearTimeout(p.current),[]);const b=s.useCallback(()=>{const v=d.current;if(!v)return;const N=document.createRange();N.selectNodeContents(v);const w=window.getSelection();w==null||w.removeAllRanges(),w==null||w.addRange(N)},[]),y=s.useCallback(async()=>{try{await navigator.clipboard.writeText(e),l(!0),p.current=window.setTimeout(()=>l(!1),Mi)}catch{b()}},[e,b]);return t.jsxs("span",{className:f(Je.copy,Je[`copy--${i}`],o),"data-testid":_,children:[t.jsx("span",{className:Je.copy__code,ref:d,children:e}),!c&&t.jsx("button",{type:"button",className:f(Je.copy__button,u&&Je["copy__button--done"]),onClick:y,"aria-label":u?n??Ve("CopyField.copiedLabel",(g=h==null?void 0:h.copyField)==null?void 0:g.copied,e):a??Ve("CopyField.copyLabel",(m=h==null?void 0:h.copyField)==null?void 0:m.copy,e),title:u?n??Ve("CopyField.copiedLabel",(x=h==null?void 0:h.copyField)==null?void 0:x.copied,e):a??Ve("CopyField.copyLabel",($=h==null?void 0:h.copyField)==null?void 0:$.copy,e),children:u?t.jsx(I.ClipboardCheckFill,{"aria-hidden":!0}):t.jsx(I.ClipboardFill,{"aria-hidden":!0})}),t.jsx("span",{"aria-live":"polite",className:Je.copy__srOnly,children:u?B("CopyField.copiedAnnouncement",r,(j=h==null?void 0:h.copyField)==null?void 0:j.announcement):""})]})},Pi=s.memo(Bi),Oi="hanui-divider-RJqCw",zi="hanui-divider__label-M8sBA",Nt={divider:Oi,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:zi},Hi=({label:e,className:a})=>e?t.jsx("div",{className:f(Nt.divider,Nt["divider--labelled"],a),children:t.jsx("span",{className:Nt.divider__label,children:e})}):t.jsx("hr",{className:f(Nt.divider,a)}),Ki=s.memo(Hi),Ui="hanui-directory-badEd",qi="hanui-group-i6An9",Yi="hanui-group__header-rc19c",Xi="hanui-group__label-vQTcs",Gi="hanui-group__link-es5V7",Qi="hanui-group__meta-LtC-u",Ji="hanui-group__list-YxBCG",Wi="hanui-row-3LH7X",Zi="hanui-row__name-75Wbq",Vi="hanui-row__media-AxZEh",ec="hanui-row__marker-RYHb-",tc="hanui-jump-vpGwB",ac="hanui-jump__link-rRnT6",ne={directory:Ui,group:qi,group__header:Yi,group__label:Xi,group__link:Gi,group__meta:Qi,group__list:Ji,row:Wi,row__name:Zi,row__media:Vi,row__marker:ec,jump:tc,jump__link:ac},nc=({children:e,className:a})=>t.jsx("div",{className:f(ne.directory,a),children:e}),sc=S(s.memo(({label:e,href:a,linkProps:n,meta:r,children:i,id:c})=>t.jsxs("section",{className:ne.group,id:c,children:[t.jsxs("header",{className:ne.group__header,children:[t.jsx("h2",{className:ne.group__label,children:a?t.jsx(me,{href:a,className:ne.group__link,...n,children:e}):e}),r&&t.jsx("span",{className:ne.group__meta,children:r})]}),t.jsx("ul",{className:ne.group__list,children:i})]})),"DirectoryGroup"),rc=S(s.memo(({href:e,name:a,media:n,marker:r,linkProps:i,className:c})=>t.jsx("li",{children:t.jsxs(me,{href:e,className:f(ne.row,c),...i,children:[n&&t.jsx("span",{className:ne.row__media,children:n}),t.jsx("span",{className:ne.row__name,children:a}),r&&t.jsx("span",{className:ne.row__marker,children:r})]})})),"DirectoryRow"),oc=S(s.memo(({labels:e,toId:a,label:n})=>{const{labels:r}=O();return t.jsx("nav",{className:ne.jump,"aria-label":B("DirectoryJump.label",n,r==null?void 0:r.directoryJump),children:e.map(i=>t.jsx("a",{href:`#${a(i)}`,className:ne.jump__link,children:i},i))})}),"DirectoryJump"),ic=s.memo(nc),cc="hanui-empty-47qZR",lc="hanui-empty__icon-okfEc",dc="hanui-empty__title-Z7Dzd",uc="hanui-empty__description-6BoCk",_c="hanui-empty__actions-ARk-k",Pe={empty:cc,empty__icon:lc,empty__title:dc,empty__description:uc,empty__actions:_c,"empty--sm":"hanui-empty--sm-QXaXx","empty--error":"hanui-empty--error-4BBgp"},hc=({title:e,description:a,icon:n,action:r,secondaryAction:i,tone:c="empty",size:o="md",className:_,testId:h})=>t.jsxs("div",{className:f(Pe.empty,Pe[`empty--${o}`],Pe[`empty--${c}`],_),role:c==="error"?"alert":void 0,"data-testid":h,children:[n&&t.jsx("span",{className:Pe.empty__icon,children:n}),t.jsx("h3",{className:Pe.empty__title,children:e}),a&&t.jsx("p",{className:Pe.empty__description,children:a}),(r||i)&&t.jsxs("div",{className:Pe.empty__actions,children:[r,i]})]}),pc=s.memo(hc),mc="hanui-header-yJwus",bc="hanui-header__top-UK4si",gc="hanui-header__text-HIo8U",fc="hanui-header__eyebrow-dZ9Zc",xc="hanui-header__titleRow-KgDZj",vc="hanui-header__title-s1giF",yc="hanui-header__meta-UxuaD",wc="hanui-header__description-NXbbC",kc="hanui-header__actions-aShpt",ve={header:mc,header__top:bc,header__text:gc,header__eyebrow:fc,header__titleRow:xc,header__title:vc,header__meta:yc,header__description:wc,header__actions:kc},jc=({title:e,eyebrow:a,description:n,actions:r,breadcrumb:i,meta:c,children:o,as:_="h1",className:h,testId:u})=>t.jsxs("header",{className:f(ve.header,h),"data-testid":u,children:[i,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})]}),o]}),Nc=s.memo(jc),$c="hanui-panel-Sv-1m",Cc="hanui-panel__header-ysexh",Ec="hanui-panel__heading-xLCsB",Ic="hanui-panel__icon--yPQT",Dc="hanui-panel__headingText--XqxW",Tc="hanui-panel__title-6-6uC",Rc="hanui-panel__description-qXTSM",Sc="hanui-panel__actions-Ra-zy",Lc="hanui-panel__body-lo5aX",Ac="hanui-panel__footer-qLpR1",Fc="hanui-form-o9UqJ",Mc="hanui-row-vUGpa",J={panel:$c,panel__header:Cc,panel__heading:Ec,panel__icon:Ic,panel__headingText:Dc,panel__title:Tc,panel__description:Rc,panel__actions:Sc,panel__body:Lc,"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:Ac,form:Fc,"form--2":"hanui-form--2-HdwDc",row:Mc},Bc=({children:e,title:a,description:n,actions:r,icon:i,isFlush:c,gap:o="md",footer:_,as:h="section",className:u,bodyClassName:l,testId:d})=>t.jsxs(h,{className:f(J.panel,u),"data-testid":d,children:[(a||r)&&t.jsxs("div",{className:J.panel__header,children:[t.jsxs("div",{className:J.panel__heading,children:[i&&t.jsx("span",{className:J.panel__icon,children:i}),t.jsxs("div",{className:J.panel__headingText,children:[a&&t.jsx("h2",{className:J.panel__title,children:a}),n&&t.jsx("p",{className:J.panel__description,children:n})]})]}),r&&t.jsx("div",{className:J.panel__actions,children:r})]}),t.jsx("div",{className:f(J.panel__body,J[`panel__body--${o}`],c&&J["panel__body--flush"],l),children:e}),_&&t.jsx("div",{className:J.panel__footer,children:_})]}),Pc=S(s.memo(({children:e,columns:a=1,className:n})=>t.jsx("div",{className:f(J.form,J[`form--${a}`],n),children:e})),"PanelForm"),Oc=S(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(J.row,a),children:e})),"PanelRow"),zc=s.memo(Bc),Hc="hanui-price-Oc5Nr",Kc="hanui-price__current-2Xup2",Uc="hanui-price__currency-32NLN",qc="hanui-price__list-MlQgT",Yc="hanui-price__discount-5Yc6W",Oe={price:Hc,price__current:Kc,price__currency:Uc,price__list:qc,price__discount:Yc,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},Xc=({value:e,currency:a,listValue:n,discountPercent:r,formatDiscount:i=u=>`%${u}`,isFormatted:c,size:o="md",className:_,testId:h})=>{const{labels:u}=O(),l=B("Price.currency",a,u==null?void 0:u.currency),d=p=>{if(!c||!(u!=null&&u.locale)||!/\d/.test(p))return p;const b=Number(p.replace(/[^\d.,-]/g,"").replace(/\.(?=\d{3}\b)/g,"").replace(",","."));if(!Number.isFinite(b))return p;try{return new Intl.NumberFormat(u.locale).format(b)}catch{return p}};return t.jsxs("span",{className:f(Oe.price,Oe[`price--${o}`],_),"data-testid":h,children:[t.jsxs("span",{className:Oe.price__current,children:[d(e),t.jsx("span",{className:Oe.price__currency,children:l})]}),n&&t.jsxs("s",{className:Oe.price__list,children:[d(n),t.jsx("span",{className:Oe.price__currency,children:l})]}),r!==void 0&&r>0&&t.jsx("span",{className:Oe.price__discount,children:i(r)})]})},Gc=s.memo(Xc),Qc="hanui-rating-94dke",Jc="hanui-rating__stars-QkpVU",Wc="hanui-rating__empty-Wf6-K",Zc="hanui-rating__count-pIoEs",Vc="hanui-rating__srOnly-E9h0d",We={rating:Qc,rating__stars:Jc,rating__empty:Wc,rating__count:Zc,rating__srOnly:Vc,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},el=({value:e,count:a,srLabel:n,size:r="sm",className:i,testId:c})=>{var h;const{labels:o}=O(),_=Math.round(e*2)/2;return t.jsxs("span",{className:f(We.rating,We[`rating--${r}`],i),"data-testid":c,children:[t.jsx("span",{className:We.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(u,l)=>{const d=l+1;return _>=d?t.jsx(I.StarFill,{},l):_>=d-.5?t.jsx(I.StarHalf,{},l):t.jsx(I.StarFill,{className:We.rating__empty},l)})}),t.jsx("span",{className:We.rating__srOnly,children:n??Ve("Rating.srLabel",(h=o==null?void 0:o.rating)==null?void 0:h.srLabel,e,a)}),H.isDefined(a)&&t.jsxs("span",{className:We.rating__count,"aria-hidden":!0,children:["(",a,")"]})]})},tl=s.memo(el),al="hanui-header-a08Jh",nl="hanui-header__text-ArJkA",sl="hanui-header__overline-X5Epo",rl="hanui-header__title-nQQQJ",ol="hanui-header__description-08oCr",il="hanui-header__action-xsxQF",ze={header:al,header__text:nl,header__overline:sl,header__title:rl,header__description:ol,header__action:il,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},cl=({title:e,description:a,overline:n,action:r,as:i="h2",size:c="md",className:o,testId:_})=>t.jsxs("header",{className:f(ze.header,ze[`header--${c}`],o),"data-testid":_,children:[t.jsxs("div",{className:ze.header__text,children:[n&&t.jsx("span",{className:ze.header__overline,children:n}),t.jsx(i,{className:ze.header__title,children:e}),a&&t.jsx("p",{className:ze.header__description,children:a})]}),r&&t.jsx("div",{className:ze.header__action,children:r})]}),ll=s.memo(cl),dl="hanui-scrollArea-Ly-yT",Ot={scrollArea:dl,"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"},ul=({children:e,label:a,axis:n="vertical",maxHeight:r,hasFade:i,className:c,testId:o})=>{const _=s.useRef(null),[h,u]=s.useState(!1);return s.useEffect(()=>{const l=_.current;if(!l||typeof ResizeObserver>"u")return;const d=()=>{const b=l.scrollHeight>l.clientHeight,y=l.scrollWidth>l.clientWidth;u(n==="horizontal"?y:n==="vertical"?b:b||y)};d();const p=new ResizeObserver(d);p.observe(l);for(const b of l.children)p.observe(b);return()=>p.disconnect()},[n,e]),t.jsx("div",{ref:_,className:f(Ot.scrollArea,Ot[`scrollArea--${n}`],i&&Ot["scrollArea--fade"],c),style:r===void 0?void 0:{maxBlockSize:r},tabIndex:h?0:void 0,role:h?"region":void 0,"aria-label":h?a:void 0,"data-testid":o,children:e})},_l=s.memo(S(ul,"ScrollArea")),hl="hanui-skeleton-n92if",pl="hanui-group-YMfwa",ml="hanui-card-XQs-Q",bl="hanui-card__media-YLJDv",gl="hanui-card__body-msRvB",fl="hanui-rows-EZ9Am",xl="hanui-row-se56N",vl="hanui-row__text-TD4iS",yl="hanui-table-L328g",wl="hanui-table__row-rSJTK",se={skeleton:hl,"hanui-shimmer":"hanui-hanui-shimmer-6yd48","skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:pl,card:ml,card__media:bl,card__body:gl,rows:fl,row:xl,row__text:vl,table:yl,table__row:wl},Te=({width:e,height:a,variant:n="block",lines:r=1,className:i})=>{const c={width:H.isNumber(e)?`${e}px`:e,height:H.isNumber(a)?`${a}px`:a};return n==="text"&&r>1?t.jsx("span",{className:f(se.group,i),"aria-hidden":!0,children:Array.from({length:r},(o,_)=>t.jsx("span",{className:f(se.skeleton,se["skeleton--text"]),style:_===r-1?{width:"60%"}:void 0},_))}):t.jsx("span",{className:f(se.skeleton,se[`skeleton--${n}`],i),style:c,"aria-hidden":!0})},kl=s.memo(Te),jl=({count:e=1,className:a})=>t.jsx(t.Fragment,{children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:f(se.card,a),"aria-hidden":!0,children:[t.jsx(Te,{className:se.card__media}),t.jsxs("div",{className:se.card__body,children:[t.jsx(Te,{variant:"text",width:"70%"}),t.jsx(Te,{variant:"text",width:"40%"})]})]},r))}),Nl=({count:e=3,className:a})=>t.jsx("div",{className:f(se.rows,a),"aria-hidden":!0,children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:se.row,children:[t.jsx(Te,{variant:"circle",width:36,height:36}),t.jsxs("div",{className:se.row__text,children:[t.jsx(Te,{variant:"text",width:"45%"}),t.jsx(Te,{variant:"text",width:"25%"})]})]},r))}),$l=({count:e=5,columns:a=4,className:n})=>t.jsx("div",{className:f(se.table,n),"aria-hidden":!0,children:Array.from({length:e},(r,i)=>t.jsx("div",{className:se.table__row,children:Array.from({length:a},(c,o)=>t.jsx(Te,{variant:"text"},o))},i))}),Cl=S(s.memo(jl),"SkeletonCard"),El=S(s.memo(Nl),"SkeletonRows"),Il=S(s.memo($l),"SkeletonTable"),Dl="hanui-stat-Xb7wp",Tl="hanui-stat__icon-MB8NU",Rl="hanui-stat__label-kUX2m",Sl="hanui-stat__value--6p13",Ll="hanui-stat__unit-mjHVk",Al="hanui-stat__delta-YKpOu",Fl="hanui-stat__description-Yvw6J",Ml="hanui-stat__srOnly-YKebA",ie={stat:Dl,"stat--sm":"hanui-stat--sm-XnK8p",stat__icon:Tl,stat__label:Rl,stat__value:Sl,stat__unit:Ll,stat__delta:Al,"stat__delta--positive":"hanui-stat__delta--positive-1AUAM","stat__delta--negative":"hanui-stat__delta--negative--WWEP",stat__description:Fl,stat__srOnly:Ml},Bl={up:t.jsx(I.ArrowUpShort,{"aria-hidden":!0}),down:t.jsx(I.ArrowDownShort,{"aria-hidden":!0}),flat:t.jsx(I.DashLg,{"aria-hidden":!0})},Pl={up:"artış",down:"azalış",flat:"değişim yok"},Ol=({label:e,value:a,unit:n,delta:r,trend:i,isUpPositive:c=!0,description:o,icon:_,size:h="md",className:u,testId:l})=>{const d=i==="flat"?void 0:i==="up"===c;return t.jsxs("div",{className:f(ie.stat,ie[`stat--${h}`],u),"data-testid":l,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&&i&&t.jsxs("span",{className:f(ie.stat__delta,d===!0&&ie["stat__delta--positive"],d===!1&&ie["stat__delta--negative"]),children:[Bl[i],r,t.jsx("span",{className:ie.stat__srOnly,children:Pl[i]})]}),o&&t.jsx("span",{className:ie.stat__description,children:o})]})},zl=s.memo(S(Ol,"Stat")),Hl="hanui-hub-JoqOf",Kl="hanui-toast-U27Of",Ul="hanui-toast__icon-p-rgI",ql="hanui-toast__text-rG4ji",Yl="hanui-toast__message-s6S2-",Xl="hanui-toast__description-0cYTx",Gl="hanui-toast__action-fOXU5",Ql="hanui-toast__close-QxSNP",Ne={hub:Hl,toast:Kl,"hanui-fade-in-up":"hanui-hanui-fade-in-up-hhv43","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:Ul,toast__text:ql,toast__message:Yl,toast__description:Xl,toast__action:Gl,toast__close:Ql},Jl={info:t.jsx(I.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(I.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(I.XCircleFill,{"aria-hidden":!0})},Wl={info:4e3,success:4e3,warning:6e3,danger:8e3};let la=0;const Kt=new Set;let qe=[];const Gt=()=>Kt.forEach(e=>e(qe)),Ut=e=>{qe=qe.filter(a=>a.id!==e),Gt()},ht=(e,a={})=>{la+=1;const n=la;return qe=[...qe,{...a,id:n,message:e}].slice(-3),Gt(),n},Zl={show:ht,info:(e,a)=>ht(e,{...a,tone:"info"}),success:(e,a)=>ht(e,{...a,tone:"success"}),warning:(e,a)=>ht(e,{...a,tone:"warning"}),error:(e,a)=>ht(e,{...a,tone:"danger"}),dismiss:Ut,clear:()=>{qe=[],Gt()}},Vl=({toast:e,closeLabel:a,onDismiss:n})=>{const r=e.tone??"info",i=e.duration??Wl[r],[c,o]=s.useState(!1),_=s.useRef(i),h=s.useRef(0);return s.useEffect(()=>{if(i===0||c)return;h.current=Date.now();const u=window.setTimeout(()=>n(e.id),_.current);return()=>{window.clearTimeout(u),_.current=Math.max(0,_.current-(Date.now()-h.current))}},[i,c,n,e.id]),t.jsxs("div",{className:f(Ne.toast,Ne[`toast--${r}`]),role:r==="danger"?"alert":"status",onPointerEnter:()=>o(!0),onPointerLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[t.jsx("span",{className:Ne.toast__icon,"aria-hidden":!0,children:Jl[r]}),t.jsxs("div",{className:Ne.toast__text,children:[t.jsx("span",{className:Ne.toast__message,children:e.message}),e.description&&t.jsx("span",{className:Ne.toast__description,children:e.description})]}),e.action&&t.jsx("button",{type:"button",className:Ne.toast__action,onClick:()=>{var u;(u=e.action)==null||u.onClick(),n(e.id)},children:e.action.label}),t.jsx(pe,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:a,variant:"ghost",size:"sm",className:Ne.toast__close,onClick:()=>n(e.id)})]})},ed=({closeLabel:e,className:a})=>{const{labels:n}=O(),[r,i]=s.useState([]);s.useEffect(()=>(Kt.add(i),i(qe),()=>{Kt.delete(i)}),[]);const c=s.useCallback(o=>Ut(o),[]);return s.useEffect(()=>{if(r.length===0)return;const o=_=>{_.key==="Escape"&&Ut(r[r.length-1].id)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[r]),H.isClient()?xt.createPortal(t.jsx("div",{className:f(Ne.hub,a),children:r.map(o=>t.jsx(Vl,{toast:o,closeLabel:B("ToastHub.closeLabel",e,n==null?void 0:n.close),onDismiss:c},o.id))}),document.body):null},td=s.memo(S(ed,"ToastHub")),ad="hanui-accordion-h9jLC",nd="hanui-accordion__item--YvzK",sd="hanui-accordion__title-qZOLY",rd="hanui-accordion__meta-PSlsO",od="hanui-accordion__marker-QcWcI",id="hanui-accordion__summary-QUhWh",cd="hanui-accordion__panel--3EXE",ld="hanui-accordion__content-fO64s",ye={accordion:ad,accordion__item:nd,"accordion__item--disabled":"hanui-accordion__item--disabled-x1erZ",accordion__title:sd,accordion__meta:rd,accordion__marker:od,accordion__summary:id,accordion__panel:cd,accordion__content:ld},dd=({items:e,isSingle:a,defaultOpenIds:n,openIds:r,onChange:i,className:c,testId:o})=>{const _=s.useId(),[h,u]=s.useState(n??[]),l=r!==void 0,d=l?r:h,p=s.useCallback((b,y)=>{const g=y?a?[b]:[...d.filter(m=>m!==b),b]:d.filter(m=>m!==b);l||u(g),i==null||i(g)},[l,a,i,d]);return t.jsx("div",{className:f(ye.accordion,c),"data-testid":o,children:e.map(b=>{const y=d.includes(b.id);return t.jsxs("details",{className:f(ye.accordion__item,b.isDisabled&&ye["accordion__item--disabled"]),open:y,onToggle:g=>{const m=g.currentTarget.open;m!==y&&p(b.id,m)},children:[t.jsxs("summary",{id:`${_}-${b.id}`,className:ye.accordion__summary,"aria-disabled":b.isDisabled,tabIndex:b.isDisabled?-1:void 0,onClick:g=>b.isDisabled&&g.preventDefault(),children:[t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:ye.accordion__marker}),t.jsx("span",{className:ye.accordion__title,children:b.title}),b.meta&&t.jsx("span",{className:ye.accordion__meta,children:b.meta})]}),t.jsx("div",{className:ye.accordion__panel,children:t.jsx("div",{className:ye.accordion__content,children:b.content})})]},b.id)})})},ud=s.memo(S(dd,"Accordion")),_d="hanui-steps-ntge1",hd="hanui-steps__item-GrU1x",pd="hanui-steps__button-XBsnS",md="hanui-steps__marker-g-GLE",bd="hanui-steps__text-Mkpkh",gd="hanui-steps__label-NSeFM",fd="hanui-steps__description-bQuNT",xd="hanui-steps__status-wWJfP",ce={steps:_d,"steps--horizontal":"hanui-steps--horizontal-O-mkx","steps--vertical":"hanui-steps--vertical-agfwo",steps__item:hd,steps__button:pd,steps__marker:md,"steps__item--done":"hanui-steps__item--done-mvOuN","steps__item--current":"hanui-steps__item--current-Qzlal",steps__text:bd,steps__label:gd,steps__description:fd,steps__status:xd},vd=(e,a)=>e<a?"done":e===a?"current":"upcoming",yd={done:"tamamlandı",current:"şu anki adım",upcoming:"sıradaki"},wd=({steps:e,currentIndex:a,onStepClick:n,label:r,orientation:i="horizontal",className:c,testId:o})=>t.jsx("ol",{className:f(ce.steps,ce[`steps--${i}`],c),"aria-label":r,"data-testid":o,children:e.map((_,h)=>{const u=vd(h,a),l=!!n&&u==="done",d=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:ce.steps__marker,"aria-hidden":!0,children:u==="done"?t.jsx(I.CheckLg,{}):h+1}),t.jsxs("span",{className:ce.steps__text,children:[t.jsx("span",{className:ce.steps__label,children:_.label}),_.description&&t.jsx("span",{className:ce.steps__description,children:_.description})]}),t.jsx("span",{className:ce.steps__status,children:yd[u]})]});return t.jsx("li",{className:f(ce.steps__item,ce[`steps__item--${u}`]),"aria-current":u==="current"?"step":void 0,children:l?t.jsx("button",{type:"button",className:ce.steps__button,onClick:()=>n==null?void 0:n(h),children:d}):t.jsx("span",{className:ce.steps__button,children:d})},_.id)})}),kd=s.memo(S(wd,"Steps")),jd="hanui-tabs-l4dFE",Nd="hanui-tabs__list-HJvR8",$d="hanui-tabs__tab-7gDW7",Cd="hanui-tabs__count-8JX8s",Ed="hanui-tabs__panel-CPklY",Ze={tabs:jd,tabs__list:Nd,tabs__tab:$d,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:Cd,tabs__panel:Ed},Id=({items:e,defaultTabId:a,activeId:n,onChange:r,ariaLabel:i,isManualActivation:c,className:o,testId:_})=>{var N;const h=s.useId(),[u,l]=s.useState(a??((N=e[0])==null?void 0:N.id)),d=H.isDefined(n),p=d?n:u,b=e.findIndex(w=>w.id===p),[y,g]=s.useState(b<0?0:b),m=s.useRef(null),x=e[b]??e[0];s.useEffect(()=>{var w,E;(E=(w=m.current)==null?void 0:w.querySelector('[aria-selected="true"]'))==null||E.scrollIntoView({block:"nearest",inline:"nearest"})},[p]);const $=w=>{d||l(w),r==null||r(w)},j=w=>{var C;if(c&&(w.key==="Enter"||w.key===" ")){w.preventDefault(),$(e[y].id);return}const E=w.key==="ArrowRight"?1:w.key==="ArrowLeft"?-1:0;if(E===0)return;w.preventDefault();const T=((c?y:b)+E+e.length)%e.length;g(T),c||$(e[T].id),(C=document.getElementById(`${h}-tab-${e[T].id}`))==null||C.focus()};if(e.length===0)return null;const v=H.isDefined(x==null?void 0:x.content);return t.jsxs("div",{className:f(Ze.tabs,o),"data-testid":_,children:[t.jsx("div",{ref:m,className:Ze.tabs__list,role:"tablist","aria-label":i,onKeyDown:j,children:e.map(w=>{var T;const E=w.id===x.id;return t.jsxs("button",{id:`${h}-tab-${w.id}`,type:"button",role:"tab","aria-selected":E,"aria-controls":v?`${h}-panel-${w.id}`:void 0,tabIndex:(c?((T=e[y])==null?void 0:T.id)===w.id:E)?0:-1,className:f(Ze.tabs__tab,E&&Ze["tabs__tab--active"]),onClick:()=>$(w.id),children:[w.label,H.isDefined(w.count)&&t.jsx("span",{className:Ze.tabs__count,children:w.count})]},w.id)})}),v&&t.jsx("div",{id:`${h}-panel-${x.id}`,role:"tabpanel","aria-labelledby":`${h}-tab-${x.id}`,className:Ze.tabs__panel,tabIndex:0,children:x.content})]})},Dd=s.memo(Id),Td="hanui-tile-TGur-",Rd="hanui-tile__medallion--Y0pz",Sd="hanui-tile__label-mI1OQ",Ld="hanui-tile__meta-22qnR",pt={tile:Td,tile__medallion:Rd,tile__label:Sd,tile__meta:Ld,"tile--active":"hanui-tile--active-z0F2M"},Ad=({label:e,icon:a,href:n,meta:r,isActive:i,linkProps:c,className:o,testId:_})=>t.jsxs(me,{href:n,className:f(pt.tile,i&&pt["tile--active"],o),"aria-current":i?"page":void 0,"data-testid":_,...c,children:[t.jsx("span",{className:pt.tile__medallion,"aria-hidden":!0,children:a}),t.jsx("span",{className:pt.tile__label,children:e}),r&&t.jsx("span",{className:pt.tile__meta,children:r})]}),Fd=s.memo(Ad),Md="hanui-timeline-GxubZ",Bd="hanui-timeline__item-qMpF2",Pd="hanui-timeline__marker-MDk07",Od="hanui-timeline__body-xJi7t",zd="hanui-timeline__title-pKxZJ",Hd="hanui-timeline__time-ITWYy",Kd="hanui-timeline__description-4vrEy",Ud="hanui-timeline__srOnly-7K2We",we={timeline:Md,timeline__item:Bd,timeline__marker:Pd,"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:Od,timeline__title:zd,timeline__time:Hd,timeline__description:Kd,timeline__srOnly:Ud},qd={done:t.jsx(I.CheckLg,{}),failed:t.jsx(I.XLg,{}),current:null,pending:null},Yd={done:"tamamlandı",current:"şu an",pending:"bekliyor",failed:"başarısız"},Xd=({events:e,label:a,className:n,testId:r})=>t.jsx("ol",{className:f(we.timeline,n),"aria-label":a,"data-testid":r,children:e.map(i=>{const c=i.status??"done";return t.jsxs("li",{className:f(we.timeline__item,we[`timeline__item--${c}`]),"aria-current":c==="current"?"step":void 0,children:[t.jsx("span",{className:we.timeline__marker,"aria-hidden":!0,children:i.icon??qd[c]}),t.jsxs("div",{className:we.timeline__body,children:[t.jsxs("span",{className:we.timeline__title,children:[i.title,t.jsx("span",{className:we.timeline__srOnly,children:Yd[c]})]}),i.time&&t.jsx("span",{className:we.timeline__time,children:i.time}),i.description&&t.jsx("span",{className:we.timeline__description,children:i.description})]})]},i.id)})}),Gd=s.memo(S(Xd,"Timeline")),Qd="hanui-modal-3IDi9",Jd="hanui-modal__panel--qLSz",Wd="hanui-modal__header-meWm6",Zd="hanui-modal__icon-df2dd",Vd="hanui-modal__heading-PwDS8",eu="hanui-modal__title-80Sh6",tu="hanui-modal__description-fsCHI",au="hanui-modal__close-vFPbw",nu="hanui-modal__body-PDF12",su="hanui-modal__footer-CCCkx",ae={modal:Qd,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em",modal__panel:Jd,modal__header:Wd,modal__icon:Zd,"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:Vd,modal__title:eu,modal__description:tu,modal__close:au,modal__body:nu,modal__footer:su},ru=({isOpen:e,onClose:a,title:n,closeLabel:r,children:i,description:c,footer:o,icon:_,tone:h="neutral",size:u="md",isDismissable:l=!0,className:d,testId:p})=>{const{labels:b}=O(),y=s.useRef(null),g=s.useRef(null),m=s.useId(),x=s.useId();s.useEffect(()=>{const j=y.current;if(!j)return;if(!e){j.open&&j.close();return}const v=nt();j.open||j.showModal(),Tt(j,`.${ae.modal__close}`),Dt(j);const{token:N,pop:w}=Rt();return g.current=N,()=>{w(),g.current=null,v()}},[e]),vt(e),s.useEffect(()=>{const j=y.current;if(!j)return;const v=N=>{N.preventDefault(),l&&(g.current&&!St(g.current)||a())};return j.addEventListener("cancel",v),()=>j.removeEventListener("cancel",v)},[a,l]);const $=s.useCallback(j=>{l&&j.target===y.current&&a()},[l,a]);return t.jsx("dialog",{ref:y,className:f(ae.modal,ae[`modal--${u}`],d),"aria-labelledby":m,"aria-describedby":c?x:void 0,"data-testid":p,onClick:$,children:t.jsxs("div",{className:ae.modal__panel,children:[t.jsxs("header",{className:ae.modal__header,children:[_&&t.jsx("span",{className:f(ae.modal__icon,ae[`modal__icon--${h}`]),children:_}),t.jsxs("div",{className:ae.modal__heading,children:[t.jsx("h2",{id:m,className:ae.modal__title,children:n}),c&&t.jsx("p",{id:x,className:ae.modal__description,children:c})]}),l&&t.jsx(pe,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:B("Modal.closeLabel",r,b==null?void 0:b.close),variant:"ghost",size:"sm",className:ae.modal__close,onClick:a})]}),i&&t.jsx("div",{className:ae.modal__body,children:i}),o&&t.jsx("footer",{className:ae.modal__footer,children:o})]})})},Qt=s.memo(ru),ou="hanui-palette-ag-P9",iu="hanui-palette__search-G3aYv",cu="hanui-palette__searchIcon-2UYj-",lu="hanui-palette__input-vvLvt",du="hanui-palette__list--KWiH",uu="hanui-palette__group-KPj5Q",_u="hanui-palette__item-UZzkp",hu="hanui-palette__icon-Fg0Lt",pu="hanui-palette__text-flfN9",mu="hanui-palette__label-8-UHe",bu="hanui-palette__description-eRlk9",gu="hanui-palette__shortcut-DwYKX",fu="hanui-palette__empty-vg-I3",Z={palette:ou,palette__search:iu,palette__searchIcon:cu,palette__input:lu,palette__list:du,palette__group:uu,palette__item:_u,"palette__item--active":"hanui-palette__item--active-XHcka",palette__icon:hu,palette__text:pu,palette__label:mu,palette__description:bu,palette__shortcut:gu,palette__empty:fu},xu=({isOpen:e,onClose:a,items:n,label:r,searchPlaceholder:i,emptyMessage:c,className:o,testId:_})=>{const h=s.useId(),u=`${h}-listbox`,l=s.useRef(null),d=s.useRef(null),p=s.useRef(null),[b,y]=s.useState(""),[g,m]=s.useState(0),x=s.useMemo(()=>{if(b.trim()==="")return n;const v=b.trim();return n.filter(N=>ft(N.label,v)||(N.description?ft(N.description,v):!1))},[n,b]);vt(e),s.useEffect(()=>{var T;const v=l.current;if(!v)return;if(!e){v.open&&v.close();return}const N=nt();v.open||v.showModal(),(T=d.current)==null||T.focus({preventScroll:!0}),y(""),m(0);const{token:w,pop:E}=Rt();return p.current=w,()=>{E(),p.current=null,N()}},[e]),s.useEffect(()=>{const v=l.current;if(!v)return;const N=w=>{w.preventDefault(),!(p.current&&!St(p.current))&&a()};return v.addEventListener("cancel",N),()=>v.removeEventListener("cancel",N)},[a]),s.useEffect(()=>{var v,N;(N=(v=l.current)==null?void 0:v.querySelector(`[data-index="${g}"]`))==null||N.scrollIntoView({block:"nearest"})},[g]);const $=v=>{v.onSelect(),a()},j=v=>{const N=x.length-1;switch(v.key){case"ArrowDown":v.preventDefault(),m(w=>w>=N?0:w+1);break;case"ArrowUp":v.preventDefault(),m(w=>w<=0?N:w-1);break;case"Home":v.preventDefault(),m(0);break;case"End":v.preventDefault(),m(N);break;case"Enter":{v.preventDefault();const w=x[g];w&&$(w);break}}};return t.jsxs("dialog",{ref:l,className:f(Z.palette,o),"aria-label":r,"data-testid":_,onClick:v=>v.target===l.current&&a(),children:[t.jsxs("div",{className:Z.palette__search,children:[t.jsx(I.Search,{"aria-hidden":!0,className:Z.palette__searchIcon}),t.jsx("input",{ref:d,type:"text",role:"combobox",className:Z.palette__input,value:b,placeholder:i,"aria-label":i,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":u,"aria-activedescendant":x[g]?`${h}-option-${g}`:void 0,onChange:v=>{y(v.target.value),m(0)},onKeyDown:j})]}),t.jsxs("ul",{id:u,role:"listbox","aria-label":r,className:Z.palette__list,children:[x.map((v,N)=>{var E;const w=v.group!==void 0&&v.group!==((E=x[N-1])==null?void 0:E.group);return t.jsxs("li",{children:[w&&t.jsx("span",{className:Z.palette__group,"aria-hidden":!0,children:v.group}),t.jsxs("div",{id:`${h}-option-${N}`,role:"option","data-index":N,"aria-selected":N===g,className:f(Z.palette__item,N===g&&Z["palette__item--active"]),onMouseEnter:()=>m(N),onClick:()=>$(v),children:[v.icon&&t.jsx("span",{className:Z.palette__icon,"aria-hidden":!0,children:v.icon}),t.jsxs("span",{className:Z.palette__text,children:[t.jsx("span",{className:Z.palette__label,children:v.label}),v.description&&t.jsx("span",{className:Z.palette__description,children:v.description})]}),v.shortcut&&t.jsx("kbd",{className:Z.palette__shortcut,"aria-hidden":!0,children:v.shortcut})]})]},v.id)}),x.length===0&&t.jsx("li",{className:Z.palette__empty,children:c})]})]})},vu=s.memo(S(xu,"CommandPalette")),yu={destructive:t.jsx(I.TrashFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),neutral:t.jsx(I.QuestionCircleFill,{"aria-hidden":!0})},wu={destructive:"danger",warning:"warning",neutral:"info"},ku={destructive:he.DANGER,warning:he.PRIMARY,neutral:he.PRIMARY},ju=({isOpen:e,onClose:a,onConfirm:n,title:r,description:i,confirmLabel:c,cancelLabel:o,closeLabel:_,variant:h,kind:u,children:l})=>{const{labels:d}=O(),[p,b]=s.useState(!1),y=h??u??"neutral",g=async()=>{b(!0);try{await n()}finally{b(!1)}};return t.jsx(Qt,{isOpen:e,onClose:a,title:r,closeLabel:_??(d==null?void 0:d.close),description:i,icon:yu[y],tone:wu[y],size:"sm",isDismissable:!p,footer:t.jsxs(t.Fragment,{children:[t.jsx(at,{variant:he.SECONDARY,size:Re.MEDIUM,onClick:a,disabled:p,children:B("ConfirmDialog.cancelLabel",o,d==null?void 0:d.cancel)}),t.jsx(at,{variant:ku[y],size:Re.MEDIUM,onClick:g,isLoading:p,children:c})]}),children:l})},Nu=s.memo(ju),$u="hanui-drawer-fgfi1",Cu="hanui-drawer__header-BDcRe",Eu="hanui-drawer__title-9M0e8",Iu="hanui-drawer__close-Z30oW",Du="hanui-drawer__toolbar-vcsYi",Tu="hanui-drawer__body-x12SX",Ru="hanui-drawer__footer-PajTg",ue={drawer:$u,"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:Cu,drawer__title:Eu,drawer__close:Iu,drawer__toolbar:Du,drawer__body:Tu,drawer__footer:Ru},Su=({isOpen:e,onClose:a,title:n,closeLabel:r,children:i,side:c="end",size:o="md",footer:_,toolbar:h,className:u,testId:l})=>{const{labels:d}=O(),p=s.useRef(null),b=s.useRef(null),y=s.useId();s.useEffect(()=>{const m=p.current;if(!m)return;if(!e){m.open&&m.close();return}const x=nt();m.open||m.showModal(),Tt(m,`.${ue.drawer__close}`),Dt(m);const{token:$,pop:j}=Rt();return b.current=$,()=>{j(),b.current=null,x()}},[e]),vt(e),s.useEffect(()=>{const m=p.current;if(!m)return;const x=$=>{$.preventDefault(),!(b.current&&!St(b.current))&&a()};return m.addEventListener("cancel",x),()=>m.removeEventListener("cancel",x)},[a]);const g=s.useCallback(m=>{m.target===p.current&&a()},[a]);return t.jsxs("dialog",{ref:p,className:f(ue.drawer,ue[`drawer--${c}`],ue[`drawer--${o}`],u),"aria-labelledby":y,"data-testid":l,onClick:g,children:[t.jsxs("header",{className:ue.drawer__header,children:[t.jsx("h2",{id:y,className:ue.drawer__title,children:n}),t.jsx(pe,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:B("Drawer.closeLabel",r,d==null?void 0:d.close),variant:"ghost",size:"sm",className:ue.drawer__close,onClick:a})]}),h&&t.jsx("div",{className:ue.drawer__toolbar,children:h}),t.jsx("div",{className:ue.drawer__body,children:i}),_&&t.jsx("div",{className:ue.drawer__footer,children:_})]})},Lu=s.memo(S(Su,"Drawer")),Au="hanui-form-zpZn4",Fu={form:Au},Mu=({isOpen:e,onClose:a,onSubmit:n,title:r,label:i,submitLabel:c,cancelLabel:o,closeLabel:_,description:h,hint:u,placeholder:l,defaultValue:d="",isRequired:p,requiredLabel:b,inputMode:y="text",maxLength:g,rows:m=4})=>{const{labels:x}=O(),$=s.useId(),[j,v]=s.useState(d),[N,w]=s.useState(!1),E=s.useRef(!1);s.useEffect(()=>{e&&!E.current&&v(d),E.current=e},[e,d]);const T=j.trim(),C=!!p&&T==="",k=z=>y==="multiline"?t.jsx($a,{...z,value:j,onChange:K=>v(K.target.value),placeholder:l,maxLength:g,rows:m}):t.jsx(Na,{...z,type:y==="number"?"number":"text",value:j,onChange:K=>v(K.target.value),placeholder:l,maxLength:g}),L=async()=>{if(!(C||N)){w(!0);try{await n(T),a()}catch{}finally{w(!1)}}};return t.jsx(Qt,{isOpen:e,onClose:a,title:r,closeLabel:_??(x==null?void 0:x.close),description:h,size:"sm",isDismissable:!N,footer:t.jsxs(t.Fragment,{children:[t.jsx(at,{variant:he.SECONDARY,size:Re.MEDIUM,onClick:a,disabled:N,children:B("PromptDialog.cancelLabel",o,x==null?void 0:x.cancel)}),t.jsx(at,{type:"submit",form:$,variant:he.PRIMARY,size:Re.MEDIUM,disabled:C,isLoading:N,children:B("PromptDialog.submitLabel",c,x==null?void 0:x.submit)})]}),children:t.jsx("form",{id:$,className:Fu.form,onSubmit:z=>{z.preventDefault(),L()},children:t.jsx(Ca,{label:i,hint:u,isRequired:p,requiredLabel:b,children:k})})})},Bu=s.memo(Mu),Pu="hanui-scroller-EtDmS",Ou="hanui-table-uCv4q",et={scroller:Pu,"scroller--frame":"hanui-scroller--frame-84zz6",table:Ou,"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"},zu=S(s.memo(({hasFrame:e=!0,className:a,children:n,...r})=>t.jsx("div",{className:f(et.scroller,e&&et["scroller--frame"],a),...r,children:n})),"TableScroller"),Hu=({density:e="regular",hasStickyHead:a,hasRowHover:n,className:r,children:i,...c})=>t.jsx("table",{className:f(et.table,et[`table--${e}`],a&&et["table--sticky-head"],n&&et["table--row-hover"],r),...c,children:i}),Ku=s.memo(Hu),Uu="hanui-wrapper-KXCZg",qu="hanui-table-LF5Ow",Yu="hanui-state-YPPb0",Xu="hanui-state__message-wwbIW",Gu="hanui-srOnly-Oia8c",Qu="hanui-sort-3Q6Fx",Ju="hanui-sort__arrow-MITWb",Wu="hanui-sticky-KDEvQ",Zu="hanui-bulkBar-62qk0",V={wrapper:Uu,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:qu,state:Yu,"state--error":"hanui-state--error-A492d",state__message:Xu,"row--warning":"hanui-row--warning-BAUN2",srOnly:Gu,sort:Qu,sort__arrow:Ju,"sort__arrow--ascending":"hanui-sort__arrow--ascending-85T5d","sort__arrow--descending":"hanui-sort__arrow--descending-gs3VU",sticky:Wu,bulkBar:Zu},Vu=({columns:e,children:a,isLoading:n,error:r,emptyMessage:i,loadingMessage:c,hasViewportCap:o,onSort:_,bulkBar:h,className:u,testId:l})=>{var y,g;const{labels:d}=O(),p=s.Children.count(a),b=(m,x)=>t.jsx("tr",{children:t.jsx("td",{colSpan:e.length,className:f(V.state,x&&V[`state--${x}`]),children:m})});return t.jsxs("div",{className:f(V.wrapper,o&&V["wrapper--capped"],u),"data-testid":l,children:[h&&t.jsx("div",{className:V.bulkBar,children:h}),t.jsxs("table",{className:V.table,children:[t.jsx("thead",{children:t.jsx("tr",{children:e.map(m=>{const x=!!(m.isSortable&&_),$=m.ariaSort==="ascending"?"descending":"ascending";return t.jsx("th",{scope:"col","aria-sort":m.ariaSort,className:f(m.className,m.isSticky&&V.sticky),children:x?t.jsxs("button",{type:"button",className:V.sort,onClick:()=>_==null?void 0:_(m.key,$),children:[m.label,m.srLabel&&t.jsx("span",{className:V.srOnly,children:m.srLabel}),t.jsx("span",{"aria-hidden":!0,className:f(V.sort__arrow,m.ariaSort&&V[`sort__arrow--${m.ariaSort}`]),children:m.ariaSort==="descending"?"▾":"▴"})]}):t.jsxs(t.Fragment,{children:[m.label,m.srLabel&&t.jsx("span",{className:V.srOnly,children:m.srLabel})]})},m.key)})})}),t.jsx("tbody",{children:r?b(t.jsxs("span",{role:"alert",className:V.state__message,children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),r]}),"error"):n?b(B("DataTable.loadingMessage",c,(y=d==null?void 0:d.dataTable)==null?void 0:y.loading)):p===0?b(B("DataTable.emptyMessage",i,(g=d==null?void 0:d.dataTable)==null?void 0:g.empty)):a})]})]})},e_=S(s.memo(({isWarning:e,className:a,children:n,...r})=>t.jsx("tr",{className:f(e&&V["row--warning"],a),...r,children:n})),"DataTableRow"),t_=s.memo(Vu),a_="hanui-bar-b4PP4",n_="hanui-bar__hiddenSubmit-jeCyX",s_="hanui-bar__actions-rG69L",r_="hanui-field-f-rvu",gt={bar:a_,bar__hiddenSubmit:n_,bar__actions:s_,field:r_,"field--wide":"hanui-field--wide-FA5gf"},o_=({onSubmit:e,children:a,actions:n,label:r,className:i,testId:c})=>{const{labels:o}=O();return t.jsxs("form",{className:f(gt.bar,i),"aria-label":B("FilterBar.label",r,o==null?void 0:o.filters),"data-testid":c,onSubmit:_=>{_.preventDefault(),e()},children:[a,t.jsx("button",{type:"submit",className:gt.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),n&&t.jsx("div",{className:gt.bar__actions,children:n})]})},i_=S(s.memo(({children:e,isWide:a,className:n})=>t.jsx("div",{className:f(gt.field,a&&gt["field--wide"],n),children:e})),"FilterBarField"),c_=s.memo(o_),l_="hanui-pagination-K-L20",d_="hanui-pagination__list--9HqC",u_="hanui-pagination__arrow-XIgoX",__="hanui-pagination__page-TpoJM",h_="hanui-pagination__gap-qoDyI",ke={pagination:l_,pagination__list:d_,pagination__arrow:u_,pagination__page:__,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:h_},p_=(e,a)=>{if(a<=7)return Array.from({length:a},(c,o)=>o+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,o)=>c-o),i=[];return r.forEach((c,o)=>{o>0&&c-r[o-1]>1&&i.push("gap"),i.push(c)}),i},m_=({page:e,totalPages:a,label:n,previousLabel:r,nextLabel:i,buildHref:c,onPageChange:o,linkProps:_,formatAnnouncement:h,className:u,testId:l})=>{var m,x,$;const{labels:d}=O(),p=Ct(),b=s.useRef(e);s.useEffect(()=>{b.current!==e&&(b.current=e,h&&p(h(e,a)))},[e,a,h,p]);const y=s.useMemo(()=>p_(e,a),[e,a]);if(a<=1)return null;const g=j=>{o&&o(j)};return t.jsxs("nav",{className:f(ke.pagination,u),"aria-label":B("Pagination.label",n,(m=d==null?void 0:d.pagination)==null?void 0:m.label),"data-testid":l,children:[t.jsx(pe,{className:ke.pagination__arrow,icon:t.jsx(I.CaretLeftFill,{"aria-hidden":!0}),label:B("Pagination.previousLabel",r,(x=d==null?void 0:d.pagination)==null?void 0:x.previous),variant:"outline",disabled:e<=1,onClick:()=>g(e-1)}),t.jsx("ul",{className:ke.pagination__list,children:y.map((j,v)=>j==="gap"?t.jsx("li",{className:ke.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${v}`):t.jsx("li",{children:c?t.jsx(me,{href:c(j),className:f(ke.pagination__page,j===e&&ke["pagination__page--active"]),"aria-current":j===e?"page":void 0,..._,children:j}):t.jsx(at,{variant:he.SECONDARY,size:Re.SMALL,className:f(ke.pagination__page,j===e&&ke["pagination__page--active"]),"aria-current":j===e?"page":void 0,onClick:()=>g(j),children:j})},j))}),t.jsx(pe,{className:ke.pagination__arrow,icon:t.jsx(I.CaretRightFill,{"aria-hidden":!0}),label:B("Pagination.nextLabel",i,($=d==null?void 0:d.pagination)==null?void 0:$.next),variant:"outline",disabled:e>=a,onClick:()=>g(e+1)})]})},b_=s.memo(m_);exports.ABOVE_MOBILE_MEDIA_QUERY=It;exports.ABOVE_TABLET_MEDIA_QUERY=Ja;exports.Accordion=ud;exports.Alert=Xo;exports.Avatar=ei;exports.Badge=si;exports.BottomSheet=Xt;exports.Breadcrumb=ui;exports.Button=at;exports.COMPACT_DENSITY=La;exports.Card=ji;exports.CardBody=wi;exports.CardFooter=ki;exports.CardMedia=vi;exports.CardOverlay=yi;exports.Carousel=Ri;exports.Checkbox=As;exports.Chip=ja;exports.ChipGroup=Bn;exports.Combobox=ds;exports.CommandPalette=vu;exports.ConfirmDialog=Nu;exports.CopyField=Pi;exports.DARK_THEME=_a;exports.DEFAULT_FONTS=Aa;exports.DataTable=t_;exports.DataTableRow=e_;exports.DateField=Vr;exports.DateRange=to;exports.Directory=ic;exports.DirectoryGroup=sc;exports.DirectoryJump=oc;exports.DirectoryRow=rc;exports.Divider=Ki;exports.Drawer=Lu;exports.EmptyState=pc;exports.Field=Ca;exports.FileUpload=Bo;exports.FilterBar=c_;exports.FilterBarField=i_;exports.HanuiProvider=Ma;exports.IconButton=pe;exports.Input=Na;exports.LIGHT_THEME=ua;exports.METRIC_TOKENS=Sa;exports.MOBILE_BREAKPOINT=ya;exports.Menu=Cn;exports.Modal=Qt;exports.PageHeader=Nc;exports.Pagination=b_;exports.Panel=zc;exports.PanelForm=Pc;exports.PanelRow=Oc;exports.Popover=Dn;exports.Price=Gc;exports.Progress=Ia;exports.ProgressCircle=wo;exports.PromptDialog=Bu;exports.QuantityStepper=Cr;exports.Radio=Ws;exports.RadioCard=nr;exports.RangeSlider=_r;exports.Rating=tl;exports.RatingInput=wr;exports.ScrollArea=_l;exports.SectionHeader=ll;exports.SegmentedControl=bs;exports.Select=Es;exports.Skeleton=kl;exports.SkeletonCard=Cl;exports.SkeletonRows=El;exports.SkeletonTable=Il;exports.Spinner=Yt;exports.Stat=zl;exports.Steps=kd;exports.Switch=Ks;exports.TABLET_BREAKPOINT=wa;exports.TABLET_PORTRAIT_BREAKPOINT=Qa;exports.Table=Ku;exports.TableCheckbox=Tr;exports.TableScroller=zu;exports.Tabs=Dd;exports.TagInput=Hr;exports.TextLink=pn;exports.Textarea=$a;exports.Tile=Fd;exports.Timeline=Gd;exports.ToastHub=td;exports.Tooltip=yn;exports.UISize=Re;exports.UIVariant=he;exports.buildThemeCss=pa;exports.initHanui=Ba;exports.isKeyboardOpeningElement=ka;exports.matchesSearch=ft;exports.normalizeSearchTerm=zt;exports.preventAutoKeyboard=Dt;exports.resolveTokens=Fa;exports.toast=Zl;exports.useAnnounce=Ct;exports.useHanui=O;exports.useHanuiTheme=Ka;exports.useListboxNavigation=qt;exports.usePositioning=Et;exports.useScrollLock=vt;exports.useSheetViewport=va;exports.useVirtualList=Ua;
18
22
  //# sourceMappingURL=index.cjs.map