tekivex-ui 2.5.14 → 2.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +12 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +795 -202
- package/dist/src/components/TkxMarkdown.d.ts +29 -0
- package/dist/src/components/TkxMarkdown.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/TkxMarkdown.tsx +855 -0
- package/src/components/index.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -110,25 +110,30 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
110
110
|
from { opacity: 0; }
|
|
111
111
|
to { opacity: 1; }
|
|
112
112
|
}
|
|
113
|
-
`,document.head.appendChild(e)},[]),(0,s.jsx)(`article`,{"aria-label":`Rich text content`,className:n.a(`font-sans`,i??``),style:{color:c.text,maxWidth:720,...a},children:u})}
|
|
114
|
-
`)
|
|
113
|
+
`,document.head.appendChild(e)},[]),(0,s.jsx)(`article`,{"aria-label":`Rich text content`,className:n.a(`font-sans`,i??``),style:{color:c.text,maxWidth:720,...a},children:u})}function Ti(e){let t=[],n=0,r=``,i=()=>{r&&=(t.push({kind:`text`,value:r}),``)};for(;n<e.length;){let a=e[n];if(a===`\\`&&n+1<e.length){r+=e[n+1],n+=2;continue}if(a===`!`&&e[n+1]===`[`){let r=e.indexOf(`]`,n+2);if(r!==-1&&e[r+1]===`(`){let a=e.indexOf(`)`,r+2);if(a!==-1){i(),t.push({kind:`image`,alt:e.slice(n+2,r),src:e.slice(r+2,a)}),n=a+1;continue}}}if(a===`[`){let r=Ei(e,n,`[`,`]`);if(r!==-1&&e[r+1]===`(`){let a=e.indexOf(`)`,r+2);if(a!==-1){i(),t.push({kind:`link`,href:e.slice(r+2,a).trim(),children:Ti(e.slice(n+1,r))}),n=a+1;continue}}}if(a===`<`){let r=e.indexOf(`>`,n+1);if(r!==-1){let a=e.slice(n+1,r);if(/^(https?:\/\/|mailto:)/i.test(a)||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a)){i();let e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a)?`mailto:${a}`:a;t.push({kind:`link`,href:e,children:[{kind:`text`,value:a}]}),n=r+1;continue}}}if(a==="`"){let r=e.indexOf("`",n+1);if(r!==-1){i(),t.push({kind:`code`,value:e.slice(n+1,r)}),n=r+1;continue}}if(a===`~`&&e[n+1]===`~`){let r=e.indexOf(`~~`,n+2);if(r!==-1){i(),t.push({kind:`strike`,children:Ti(e.slice(n+2,r))}),n=r+2;continue}}if(a===`*`&&e[n+1]===`*`||a===`_`&&e[n+1]===`_`){let r=a+a,o=e.indexOf(r,n+2);if(o!==-1){i(),t.push({kind:`bold`,children:Ti(e.slice(n+2,o))}),n=o+2;continue}}if((a===`*`||a===`_`)&&e[n+1]!==a){let r=e.indexOf(a,n+1);if(r!==-1&&e.slice(n+1,r).trim().length>0){i(),t.push({kind:`italic`,children:Ti(e.slice(n+1,r))}),n=r+1;continue}}r+=a,n++}return i(),t}function Ei(e,t,n,r){let i=0;for(let a=t;a<e.length;a++){if(e[a]===`\\`){a++;continue}if(e[a]===n)i++;else if(e[a]===r&&(i--,i===0))return a}return-1}function Di(e){let t=e.replace(/^\uFEFF/,``).replace(/\r\n?/g,`
|
|
114
|
+
`).split(`
|
|
115
|
+
`),n=[],r=0;for(;r<t.length;){let e=t[r];if(/^\s*$/.test(e)){r++;continue}let i=e.match(/^\s*```(.*)$/);if(i){let e=i[1].trim();r++;let a=[];for(;r<t.length&&!/^\s*```\s*$/.test(t[r]);)a.push(t[r]),r++;r<t.length&&r++,n.push({kind:`code`,language:e,value:a.join(`
|
|
116
|
+
`)});continue}let a=e.match(/^(#{1,6})\s+(.*?)\s*#*\s*$/);if(a){n.push({kind:`heading`,level:a[1].length,inline:Ti(a[2])}),r++;continue}if(/^\s*([-*_])\s*(?:\1\s*){2,}$/.test(e)){n.push({kind:`hr`}),r++;continue}if(Ai(e)&&r+1<t.length&&ji(t[r+1])){let i=Mi(e).map(Ti),a=Ni(t[r+1]);r+=2;let o=[];for(;r<t.length&&Ai(t[r]);)o.push(Mi(t[r]).map(Ti)),r++;n.push({kind:`table`,headers:i,rows:o,align:a});continue}if(/^\s*>/.test(e)){let e=[];for(;r<t.length&&/^\s*>/.test(t[r]);)e.push(t[r].replace(/^\s*>\s?/,``)),r++;n.push({kind:`blockquote`,children:Di(e.join(`
|
|
117
|
+
`))});continue}if(Oi(e)){let[e,i]=ki(t,r);n.push(e),r=i;continue}let o=[e];for(r++;r<t.length&&!/^\s*$/.test(t[r])&&!/^#{1,6}\s/.test(t[r])&&!/^\s*```/.test(t[r])&&!/^\s*>/.test(t[r])&&!Oi(t[r])&&!/^\s*([-*_])\s*(?:\1\s*){2,}$/.test(t[r]);)o.push(t[r]),r++;n.push({kind:`paragraph`,inline:Ti(o.join(` `))})}return n}function Oi(e){return/^(\s*)([-*+]|\d+[.)])\s+/.test(e)}function ki(e,t){let n=e[t].match(/^(\s*)([-*+]|\d+[.)])\s+/),r=n[1].length,i=/\d/.test(n[2]),a=[],o=t;for(;o<e.length;){let t=e[o].match(/^(\s*)([-*+]|\d+[.)])\s+(.*)$/);if(!t||t[1].length!==r)break;let n=t[3],i=null,s=n,c=n.match(/^\[([ xX])\]\s+(.*)$/);c&&(i=c[1].toLowerCase()===`x`?`checked`:`unchecked`,s=c[2]);let l=[s];for(o++;o<e.length;){if(/^\s*$/.test(e[o])){if(o+1<e.length&&/^\s+\S/.test(e[o+1])){l.push(``),o++;continue}break}let t=e[o].match(/^(\s*)(\S)/);if(t&&t[1].length>r){l.push(e[o].slice(r+2)),o++;continue}break}a.push({blocks:Di(l.join(`
|
|
118
|
+
`)),task:i})}return[{kind:`list`,ordered:i,items:a},o]}function Ai(e){return/^\s*\|.+\|\s*$/.test(e.trim())||e.includes(`|`)&&e.trim().startsWith(`|`)}function ji(e){return/^\s*\|?\s*:?-{2,}:?\s*(\|\s*:?-{2,}:?\s*)+\|?\s*$/.test(e)}function Mi(e){return e.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim())}function Ni(e){return Mi(e).map(e=>{let t=e.startsWith(`:`),n=e.endsWith(`:`);return t&&n?`center`:n?`right`:t?`left`:null})}function Pi(e,t,r=`i`){return e.map((e,i)=>{let a=`${r}-${i}`;switch(e.kind){case`text`:return(0,s.jsx)(`span`,{children:n.m(e.value)},a);case`bold`:return(0,s.jsx)(`strong`,{children:Pi(e.children,t,a)},a);case`italic`:return(0,s.jsx)(`em`,{children:Pi(e.children,t,a)},a);case`strike`:return(0,s.jsx)(`s`,{children:Pi(e.children,t,a)},a);case`code`:return(0,s.jsx)(`code`,{style:{background:t.theme.surfaceAlt,border:`1px solid ${t.theme.border}`,borderRadius:4,padding:`0.15em 0.4em`,fontSize:`0.9em`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,wordBreak:`break-word`},children:n.m(e.value)},a);case`link`:{let n=Fi(e.href);if(!n)return(0,s.jsx)(`span`,{children:Pi(e.children,t,a)},a);let r=/^(https?:)?\/\//i.test(n)||n.startsWith(`mailto:`);return(0,s.jsx)(`a`,{href:n,target:r?t.externalLinkTarget:void 0,rel:r?t.externalLinkRel:void 0,onClick:e=>{t.onLinkClick?.(n,e)===!1&&e.preventDefault()},style:{color:t.theme.primary,textDecoration:`underline`,wordBreak:`break-word`},children:Pi(e.children,t,a)},a)}case`image`:return(0,s.jsx)(`img`,{src:Fi(e.src)||``,alt:n.m(e.alt),loading:`lazy`,decoding:`async`,style:{maxWidth:`100%`,height:`auto`,borderRadius:6,display:`inline-block`}},a)}})}function Fi(e){let t=e.trim();return!t||/^javascript:/i.test(t)||/^data:/i.test(t)&&!/^data:image\//i.test(t)||/^vbscript:/i.test(t)?null:t}function Ii({text:e,theme:t}){let[n,r]=(0,o.useState)(!1);return(0,s.jsx)(`button`,{type:`button`,onClick:()=>{typeof navigator<`u`&&navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})},"aria-label":n?`Copied to clipboard`:`Copy code`,style:{position:`absolute`,top:6,right:6,padding:`2px 8px`,fontSize:11,background:t.surface,color:n?t.success:t.textMuted,border:`1px solid ${t.border}`,borderRadius:4,cursor:`pointer`,fontFamily:`inherit`,transition:`color 120ms`},children:n?`Copied`:`Copy`})}function Li(e,t,r=`b`){return e.map((e,i)=>{let a=`${r}-${i}`;switch(e.kind){case`heading`:{let n=`h${e.level}`,r={1:{fs:t.compact?`1.75rem`:`2rem`,lh:`1.2`,mt:`0.6em`,mb:`0.5em`,fw:700},2:{fs:t.compact?`1.4rem`:`1.6rem`,lh:`1.25`,mt:`1em`,mb:`0.5em`,fw:700},3:{fs:t.compact?`1.2rem`:`1.3rem`,lh:`1.3`,mt:`1em`,mb:`0.4em`,fw:600},4:{fs:`1.1rem`,lh:`1.35`,mt:`1em`,mb:`0.4em`,fw:600},5:{fs:`1rem`,lh:`1.4`,mt:`1em`,mb:`0.3em`,fw:600},6:{fs:`0.9rem`,lh:`1.4`,mt:`1em`,mb:`0.3em`,fw:600}}[e.level];return(0,s.jsx)(n,{style:{fontSize:r.fs,lineHeight:r.lh,marginTop:r.mt,marginBottom:r.mb,fontWeight:r.fw,color:t.theme.text,scrollMarginTop:`1em`},children:Pi(e.inline,t,a)},a)}case`paragraph`:return(0,s.jsx)(`p`,{style:{margin:`0 0 ${t.compact?`0.7em`:`1em`}`,lineHeight:1.65,color:t.theme.text,wordBreak:`break-word`},children:Pi(e.inline,t,a)},a);case`blockquote`:return(0,s.jsx)(`blockquote`,{style:{margin:`0 0 1em`,padding:`0.5em 1em`,borderLeft:`4px solid ${t.theme.primary}`,background:`${t.theme.surfaceAlt}`,color:t.theme.textMuted,borderRadius:`0 6px 6px 0`},children:Li(e.children,t,a)},a);case`code`:{let r=e.value;return(0,s.jsxs)(`div`,{style:{position:`relative`,margin:`0 0 1em`,border:`1px solid ${t.theme.border}`,borderRadius:8,background:t.theme.surfaceAlt,overflow:`hidden`},children:[e.language&&(0,s.jsx)(`div`,{style:{padding:`4px 10px`,fontSize:11,color:t.theme.textMuted,borderBottom:`1px solid ${t.theme.border}`,textTransform:`uppercase`,letterSpacing:`0.05em`},children:n.m(e.language)}),t.copyableCode&&(0,s.jsx)(Ii,{text:r,theme:t.theme}),(0,s.jsx)(`pre`,{style:{margin:0,padding:12,overflowX:`auto`,fontSize:13,lineHeight:1.55,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,color:t.theme.text,whiteSpace:`pre`},children:(0,s.jsx)(`code`,{children:n.m(r)})})]},a)}case`list`:return(0,s.jsx)(e.ordered?`ol`:`ul`,{style:{margin:`0 0 1em`,paddingLeft:`1.5em`,color:t.theme.text,lineHeight:1.65},children:e.items.map((e,n)=>(0,s.jsxs)(`li`,{style:{listStyle:e.task===null?void 0:`none`,marginLeft:e.task===null?void 0:`-1.25em`},children:[e.task!==null&&(0,s.jsx)(`input`,{type:`checkbox`,disabled:!0,checked:e.task===`checked`,readOnly:!0,style:{marginRight:6,verticalAlign:`middle`},"aria-label":e.task===`checked`?`Completed task`:`Uncompleted task`}),Li(e.blocks,t,`${a}-${n}`)]},`${a}-${n}`))},a);case`hr`:return(0,s.jsx)(`hr`,{style:{border:`none`,borderTop:`1px solid ${t.theme.border}`,margin:`1.5em 0`}},a);case`table`:return(0,s.jsx)(`div`,{style:{overflowX:`auto`,margin:`0 0 1em`,border:`1px solid ${t.theme.border}`,borderRadius:6,WebkitOverflowScrolling:`touch`},children:(0,s.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:14,color:t.theme.text},children:[(0,s.jsx)(`thead`,{children:(0,s.jsx)(`tr`,{children:e.headers.map((n,r)=>(0,s.jsx)(`th`,{style:{padding:`8px 12px`,textAlign:e.align[r]??`left`,borderBottom:`2px solid ${t.theme.border}`,background:t.theme.surfaceAlt,fontWeight:600},children:Pi(n,t,`${a}-h-${r}`)},r))})}),(0,s.jsx)(`tbody`,{children:e.rows.map((n,r)=>(0,s.jsx)(`tr`,{children:n.map((n,i)=>(0,s.jsx)(`td`,{style:{padding:`8px 12px`,textAlign:e.align[i]??`left`,borderBottom:`1px solid ${t.theme.border}`},children:Pi(n,t,`${a}-r-${r}-${i}`)},i))},r))})]})},a)}})}function Ri({source:e,src:r,maxWidth:i=`100%`,compact:a=!1,copyableCode:c=!0,onLinkClick:l,externalLinkRel:u=`noopener noreferrer`,externalLinkTarget:d=`_blank`,loadingFallback:f,errorFallback:p,className:m,style:h}){let g=t.f(),[_,v]=(0,o.useState)({text:null,error:null,loading:!!r&&e===void 0}),y=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(e!==void 0||!r)return;y.current?.abort();let t=new AbortController;return y.current=t,v({text:null,error:null,loading:!0}),fetch(r,{signal:t.signal}).then(async e=>{if(!e.ok)throw Error(`Failed to load markdown (HTTP ${e.status})`);v({text:await e.text(),error:null,loading:!1})}).catch(e=>{e.name!==`AbortError`&&v({text:null,error:e.message,loading:!1})}),()=>t.abort()},[r,e]);let b=e??_.text??``,x=(0,o.useMemo)(()=>b?Di(b):[],[b]),S={theme:g,compact:a,copyableCode:c,externalLinkRel:u,externalLinkTarget:d,onLinkClick:l},C={maxWidth:i,width:`100%`,color:g.text,fontFamily:`inherit`,fontSize:a?14:15,lineHeight:1.65,wordBreak:`break-word`,overflowWrap:`anywhere`,boxSizing:`border-box`,...h};if(e===void 0&&r){if(_.loading)return(0,s.jsx)(`div`,{className:m,style:C,"aria-busy":`true`,"aria-live":`polite`,children:f??(0,s.jsx)(`span`,{style:{color:g.textMuted},children:`Loading…`})});if(_.error)return(0,s.jsx)(`div`,{className:m,style:C,role:`alert`,children:p?p(_.error):(0,s.jsx)(`span`,{style:{color:g.danger},children:n.m(_.error)})})}return(0,s.jsx)(`div`,{className:m,style:C,children:Li(x,S)})}Ri.displayName=`TkxMarkdown`;var zi={sm:576,md:768,lg:992,xl:1200};function Bi(e){return typeof e==`number`?`${e}px`:e}var Vi=(0,o.createContext)({h:0,v:0}),Hi=(0,o.forwardRef)(({children:e,hasSider:r=!1,className:i,style:a,...o},c)=>{let l=t.f(),u=n.a(`flex min-h-0 w-full font-sans`),d=r?{flexDirection:`row`}:{flexDirection:`column`};return(0,s.jsx)(`section`,{ref:c,className:n.t(`tkx-layout`,u,i),style:{minHeight:`100%`,color:l.text,backgroundColor:l.bg,...d,...a},...o,children:e})});Hi.displayName=`TkxLayout`;var Ui=(0,o.forwardRef)(({children:e,height:r=64,fixed:i=!1,className:a,style:o,...c},l)=>{let u=t.f(),d=Bi(r),f=n.a(`flex items-center px-6 shrink-0 w-full`),p=i?{position:`fixed`,top:0,left:0,right:0,zIndex:1e3}:{};return(0,s.jsx)(`header`,{ref:l,className:n.t(`tkx-layout-header`,f,a),style:{height:d,minHeight:d,backgroundColor:u.surface,borderBottom:`1px solid ${u.border}`,...p,...o},...c,children:e})});Ui.displayName=`TkxHeader`;function Wi({collapsed:e,onClick:t,color:i}){let a=r.o();return(0,s.jsx)(`button`,{type:`button`,"aria-label":e?`Expand sidebar`:`Collapse sidebar`,onClick:t,className:n.a(`flex items-center justify-center w-full py-3 cursor-pointer`,`border-0 bg-transparent`),style:{color:i},children:(0,s.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,style:{transform:e?`rotate(0deg)`:`rotate(180deg)`,transition:a?`none`:`transform 200ms ease`},"aria-hidden":`true`,children:(0,s.jsx)(`path`,{d:`M6 3l5 5-5 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})})}var Gi=(0,o.forwardRef)(({children:e,width:i=240,collapsedWidth:a=64,collapsed:c,onCollapse:l,collapsible:u=!1,breakpoint:d,trigger:f,className:p,style:m,...h},g)=>{let _=t.f(),v=r.o(),[y,b]=(0,o.useState)(!1),x=c??y,S=(0,o.useCallback)(e=>{c===void 0&&b(e),l?.(e)},[c,l]);(0,o.useEffect)(()=>{if(!d)return;let e=zi[d];if(!e)return;let t=window.matchMedia(`(max-width: ${e-1}px)`),n=e=>{S(e.matches)};return S(t.matches),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[d,S]);let C=Bi(i),w=x?`${a}px`:C,T=u&&f!==null,E=v?`none`:`width 200ms ease, min-width 200ms ease, max-width 200ms ease`;return(0,s.jsxs)(`aside`,{ref:g,className:n.t(`tkx-layout-sider`,n.a(`shrink-0 overflow-hidden flex flex-col`),p),style:{width:w,minWidth:w,maxWidth:w,backgroundColor:_.surface,borderRight:`1px solid ${_.border}`,transition:E,...m},...h,children:[(0,s.jsx)(`div`,{className:n.a(`flex-1 overflow-y-auto overflow-x-hidden`),style:{width:w,transition:E},children:e}),T&&(0,s.jsx)(`div`,{className:n.a(`shrink-0`),style:{borderTop:`1px solid ${_.border}`},children:f===void 0?(0,s.jsx)(Wi,{collapsed:x,onClick:()=>S(!x),color:_.textMuted}):f})]})});Gi.displayName=`TkxSider`;var Ki=(0,o.forwardRef)(({children:e,className:r,style:i,...a},o)=>{let c=t.f();return(0,s.jsx)(`main`,{ref:o,className:n.t(`tkx-layout-content`,n.a(`flex-1 min-w-0 min-h-0`),r),style:{backgroundColor:c.bg,padding:`24px`,...i},...a,children:e})});Ki.displayName=`TkxContent`;var qi=(0,o.forwardRef)(({children:e,className:r,style:i,...a},o)=>{let c=t.f();return(0,s.jsx)(`footer`,{ref:o,className:n.t(`tkx-layout-footer`,n.a(`flex items-center px-6 py-4 shrink-0`),r),style:{backgroundColor:c.surface,borderTop:`1px solid ${c.border}`,color:c.textMuted,...i},...a,children:e})});qi.displayName=`TkxFooter`;var Ji={start:`flex-start`,center:`center`,end:`flex-end`,"space-between":`space-between`,"space-around":`space-around`,"space-evenly":`space-evenly`},Yi={top:`flex-start`,middle:`center`,bottom:`flex-end`,stretch:`stretch`},Xi=(0,o.forwardRef)(({children:e,gutter:t,justify:r=`start`,align:i=`top`,wrap:a=!0,className:o,style:c,...l},u)=>{let[d,f]=Array.isArray(t)?t:[t??0,0],p=d/2,m=f/2,h=d||f?{marginLeft:-p,marginRight:-p,marginTop:-m,marginBottom:-m}:{},g={h:p,v:m};return(0,s.jsx)(Vi.Provider,{value:g,children:(0,s.jsx)(`div`,{ref:u,className:n.t(`tkx-row`,n.a(`flex w-full`),o),style:{flexWrap:a?`wrap`:`nowrap`,justifyContent:Ji[r]??`flex-start`,alignItems:Yi[i]??`flex-start`,...h,...c},...l,children:e})})});Xi.displayName=`TkxRow`;var Zi=!1;function Qi(){if(Zi||typeof document>`u`)return;Zi=!0;let e=[];for(let[t,n]of Object.entries(zi)){for(let r=1;r<=24;r++){let i=`${r/24*100}%`;e.push(`@media (min-width: ${n}px) { .tkx-col-${t}-${r} { flex: 0 0 ${i} !important; max-width: ${i} !important; } }`)}for(let r=0;r<=24;r++){let i=`${r/24*100}%`;e.push(`@media (min-width: ${n}px) { .tkx-col-${t}-offset-${r} { margin-left: ${i} !important; } }`)}}let t=document.createElement(`style`);t.id=`tkx-col-responsive`,t.textContent=e.join(`
|
|
119
|
+
`),document.head.appendChild(t)}function $i(e){if(e!==void 0)return typeof e==`number`?{span:e}:e}var ea=(0,o.forwardRef)(({children:e,span:t,offset:r=0,push:i,pull:a,order:c,sm:l,md:u,lg:d,xl:f,className:p,style:m,...h},g)=>{(0,o.useEffect)(()=>{Qi()},[]);let _=(0,o.useContext)(Vi),v=t===void 0?void 0:`${t/24*100}%`,y=r?`${r/24*100}%`:void 0,b=[],x=[[`sm`,l],[`md`,u],[`lg`,d],[`xl`,f]];for(let[e,t]of x){let n=$i(t);n&&(b.push(`tkx-col-${e}-${n.span}`),n.offset!==void 0&&n.offset>0&&b.push(`tkx-col-${e}-offset-${n.offset}`))}let S={};return i!==void 0&&(S.left=`${i/24*100}%`,S.position=`relative`),a!==void 0&&(S.right=`${a/24*100}%`,S.position=`relative`),c!==void 0&&(S.order=c),(0,s.jsx)(`div`,{ref:g,className:n.t(`tkx-col`,n.a(`box-border min-h-[1px]`),...b,p),style:{flex:v?`0 0 ${v}`:`1`,maxWidth:v??`100%`,marginLeft:y,paddingLeft:_.h||void 0,paddingRight:_.h||void 0,paddingTop:_.v||void 0,paddingBottom:_.v||void 0,...S,...m},...h,children:e})});ea.displayName=`TkxCol`;var ta=(0,o.createContext)({locale:`en-US`,direction:`ltr`,componentDefaults:{size:`md`,variant:`default`,animation:!0,bordered:!0},componentOverrides:{},prefixCls:`tkx`,configured:!1,cls:e=>`tkx-${e}`,getSize:()=>`md`,getAnimation:()=>!0,getBordered:()=>!0});function na({children:e,locale:t,direction:n,componentDefaults:r,componentOverrides:i,prefixCls:a}){let c=(0,o.useContext)(ta),l=(0,o.useMemo)(()=>({size:r?.size??c.componentDefaults.size,variant:r?.variant??c.componentDefaults.variant,animation:r?.animation??c.componentDefaults.animation,bordered:r?.bordered??c.componentDefaults.bordered}),[r,c.componentDefaults]),u=(0,o.useMemo)(()=>{let e=c.componentOverrides,t=i??{};return{button:{...e.button,...t.button},input:{...e.input,...t.input},table:{...e.table,...t.table},modal:{...e.modal,...t.modal}}},[i,c.componentOverrides]),d=t??c.locale,f=n??c.direction,p=a??c.prefixCls,m=(0,o.useCallback)(e=>`${p}-${e}`,[p]),h=(0,o.useCallback)((e,t)=>{if(t!==void 0)return t;if(e){let t=u[e];if(t?.size)return t.size}return l.size},[l.size,u]),g=(0,o.useCallback)(e=>e===void 0?l.animation:e,[l.animation]),_=(0,o.useCallback)((e,t)=>{if(t!==void 0)return t;if(e){let t=u[e];if(t?.bordered!==void 0)return t.bordered}return l.bordered},[l.bordered,u]),v=(0,o.useMemo)(()=>({locale:d,direction:f,componentDefaults:l,componentOverrides:u,prefixCls:p,configured:!0,cls:m,getSize:h,getAnimation:g,getBordered:_}),[d,f,l,u,p,m,h,g,_]);return(0,s.jsx)(ta.Provider,{value:v,children:(0,s.jsx)(`div`,{dir:f,lang:d,className:`${p}-config-root`,style:{direction:f},children:e})})}na.displayName=`TkxConfigProvider`;function ra(){return(0,o.useContext)(ta)}function ia(e,t){let{prefixCls:n}=ra();return`${t??n}-${e}`}function aa(e,t){let{getSize:n}=ra();return n(e,t)}var oa={sm:32,md:40,lg:48},sa={sm:`0.75rem`,md:`0.875rem`,lg:`1rem`},ca={sm:8,md:12,lg:16},la={sm:4,md:8,lg:12},ua={sm:4,md:6,lg:8},da={sm:14,md:16,lg:20};function fa(){let{direction:e}=ra();if(e===`rtl`)return{transform:`scaleX(-1)`}}function pa(e,t=0){let{direction:n}=ra(),r=typeof e==`number`?`${e}px`:e,i=typeof t==`number`?`${t}px`:t;return n===`rtl`?{marginRight:r,marginLeft:i}:{marginLeft:r,marginRight:i}}var ma={"en-US":`English (US)`,"en-GB":`English (UK)`,"es-ES":`Spanish`,"fr-FR":`French`,"de-DE":`German`,"ja-JP":`Japanese`,"ko-KR":`Korean`,"zh-CN":`Chinese (Simplified)`,"zh-TW":`Chinese (Traditional)`,"pt-BR":`Portuguese (Brazil)`,"ar-SA":`Arabic`,"hi-IN":`Hindi`,"ru-RU":`Russian`,"it-IT":`Italian`,"nl-NL":`Dutch`,"sv-SE":`Swedish`,"pl-PL":`Polish`,"tr-TR":`Turkish`,"th-TH":`Thai`,"vi-VN":`Vietnamese`},ha=new Set([`ar`,`ar-SA`,`ar-EG`,`ar-AE`,`he`,`he-IL`,`fa`,`fa-IR`,`ur`,`ur-PK`,`ps`,`ps-AF`]);function ga(e){return ha.has(e)||ha.has(e.split(`-`)[0])}function _a(e){if(ma[e])return ma[e];if(typeof Intl<`u`&&Intl.DisplayNames)try{return new Intl.DisplayNames([`en`],{type:`language`}).of(e)??e}catch{return e}return e}function va(e){return typeof e==`string`?e:typeof e==`number`?String(e):Array.isArray(e)?e.map(va).join(``):e&&typeof e==`object`&&`props`in e?va(e.props.children):``}function ya({text:e}){let n=t.f(),[r,i]=(0,o.useState)(!1);return(0,o.createElement)(`button`,{type:`button`,onClick:(0,o.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{i(!0),setTimeout(()=>i(!1),2e3)})},[e]),"aria-label":r?`Copied`:`Copy to clipboard`,style:{display:`inline-flex`,alignItems:`center`,marginLeft:`4px`,padding:`2px 6px`,border:`none`,background:`transparent`,color:r?n.success:n.textMuted,cursor:`pointer`,fontSize:`0.8em`,borderRadius:`4px`,transition:`color 0.2s`}},r?`Copied!`:`⎘`)}function ba(e=`default`){let n=t.f();return{default:n.text,secondary:n.textMuted,success:n.success,warning:n.warning,danger:n.danger}[e]}var xa={1:{fontSize:`2.25rem`,lineHeight:`1.2`,fontWeight:700},2:{fontSize:`1.875rem`,lineHeight:`1.25`,fontWeight:700},3:{fontSize:`1.5rem`,lineHeight:`1.3`,fontWeight:600},4:{fontSize:`1.25rem`,lineHeight:`1.35`,fontWeight:600},5:{fontSize:`1rem`,lineHeight:`1.4`,fontWeight:600}};function Sa({level:e=1,children:r,copyable:i=!1,type:a=`default`,style:s}){let c=ba(a);t.f();let l=xa[e],u=`h${e}`,d=typeof r==`string`?n.m(r):r,f=va(r);return(0,o.createElement)(u,{style:{color:c,fontSize:l.fontSize,lineHeight:l.lineHeight,fontWeight:l.fontWeight,margin:`0 0 0.5em 0`,fontFamily:`inherit`,...s}},d,i&&(0,o.createElement)(ya,{text:f}))}function Ca({children:e,type:r=`default`,strong:i=!1,italic:a=!1,underline:s=!1,delete:c=!1,code:l=!1,mark:u=!1,copyable:d=!1,style:f}){let p=ba(r),m=t.f(),h=va(e),g=typeof e==`string`?n.m(e):e,_=[];s&&_.push(`underline`),c&&_.push(`line-through`);let v=g;return l&&(v=(0,o.createElement)(`code`,{style:{padding:`0.15em 0.4em`,fontSize:`0.875em`,backgroundColor:m.surfaceAlt,border:`1px solid ${m.border}`,borderRadius:`4px`,fontFamily:`monospace`}},v)),u&&(v=(0,o.createElement)(`mark`,{style:{backgroundColor:`${m.warning}33`,color:p,padding:`0 2px`,borderRadius:`2px`}},v)),(0,o.createElement)(i?`strong`:a?`em`:`span`,{style:{color:p,fontStyle:a?`italic`:`normal`,textDecoration:_.length>0?_.join(` `):`none`,...f}},v,d&&(0,o.createElement)(ya,{text:h}))}function wa({children:e,type:r=`default`,copyable:i=!1,ellipsis:a=!1,style:s}){let c=t.f(),l=r===`secondary`?c.textMuted:c.text,u=va(e),d=typeof e==`string`?n.m(e):e,f={};if(a){let e=typeof a==`object`?a.rows??3:3;f.display=`-webkit-box`,f.WebkitLineClamp=e,f.WebkitBoxOrient=`vertical`,f.overflow=`hidden`}return(0,o.createElement)(`div`,{style:{color:l,fontSize:`1rem`,lineHeight:`1.6`,margin:`0 0 1em 0`,...f,...s}},d,i&&(0,o.createElement)(ya,{text:u}))}var Ta={sm:{dimension:20,borderWidth:2,fontSize:`0.75rem`},md:{dimension:32,borderWidth:3,fontSize:`0.875rem`},lg:{dimension:48,borderWidth:4,fontSize:`1rem`}},Ea=!1;function Da(){if(Ea||typeof document>`u`)return;Ea=!0;let e=document.createElement(`style`);e.id=`tkx-spin-styles`,e.textContent=`
|
|
115
120
|
@keyframes tkx-spin-rotate {
|
|
116
121
|
0% { transform: rotate(0deg); }
|
|
117
122
|
100% { transform: rotate(360deg); }
|
|
118
123
|
}
|
|
119
|
-
`,document.head.appendChild(e)}function ma({size:e,color:t}){return(0,o.createElement)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,role:`img`,"aria-label":`Loading`},(0,o.createElement)(`circle`,{cx:12,cy:12,r:10,stroke:`${t}33`,strokeWidth:2.5,fill:`none`}),(0,o.createElement)(`path`,{d:`M12 2a10 10 0 0 1 10 10`,stroke:t,strokeWidth:2.5,strokeLinecap:`round`,fill:`none`}))}function ha({size:e,borderWidth:t,color:n,reducedMotion:r}){return r?(0,o.createElement)(ma,{size:e,color:n}):(pa(),(0,o.createElement)(`div`,{role:`img`,"aria-label":`Loading`,style:{width:`${e}px`,height:`${e}px`,border:`${t}px solid ${n}33`,borderTopColor:n,borderRadius:`50%`,animation:`tkx-spin-rotate 0.8s linear infinite`,boxSizing:`border-box`}}))}function ga({spinning:e=!0,size:i=`md`,tip:a,indicator:s,children:c,fullscreen:l=!1,delay:u=0,style:d}){let f=t.f(),p=r.o(),[m,h]=(0,o.useState)(u===0&&e),g=(0,o.useRef)(null);if((0,o.useEffect)(()=>(e&&u>0?g.current=setTimeout(()=>h(!0),u):h(e),()=>{g.current!==null&&clearTimeout(g.current)}),[e,u]),!m)return c?(0,o.createElement)(`div`,{style:d},c):null;let _=da[i],v=a?n.m(a):void 0,y=(0,o.createElement)(`div`,{role:`status`,"aria-live":`polite`,"aria-label":v??`Loading`,style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`8px`}},s??(0,o.createElement)(ha,{size:_.dimension,borderWidth:_.borderWidth,color:f.primary,reducedMotion:p}),v&&(0,o.createElement)(`span`,{style:{color:f.primary,fontSize:_.fontSize,marginTop:`4px`}},v));return l?(0,o.createElement)(`div`,{style:{position:`fixed`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`${f.bg}cc`,zIndex:9999,...d}},y):c?(0,o.createElement)(`div`,{style:{position:`relative`,...d}},(0,o.createElement)(`div`,{style:{filter:`blur(1px)`,opacity:.5,pointerEvents:`none`,userSelect:`none`,transition:p?`none`:`opacity 0.2s, filter 0.2s`}},c),(0,o.createElement)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`${f.bg}66`,borderRadius:`4px`}},y)):(0,o.createElement)(`div`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,...d}},y)}function _a({color:e,mutedColor:t}){return(0,o.createElement)(`svg`,{width:120,height:100,viewBox:`0 0 120 100`,fill:`none`,"aria-hidden":`true`},(0,o.createElement)(`path`,{d:`M20 40 L60 20 L100 40 L60 60 Z`,fill:`${t}18`,stroke:t,strokeWidth:1.5,strokeLinejoin:`round`}),(0,o.createElement)(`path`,{d:`M20 40 L20 65 L60 85 L60 60 Z`,fill:`${t}10`,stroke:t,strokeWidth:1.5,strokeLinejoin:`round`}),(0,o.createElement)(`path`,{d:`M100 40 L100 65 L60 85 L60 60 Z`,fill:`${t}0d`,stroke:t,strokeWidth:1.5,strokeLinejoin:`round`}),(0,o.createElement)(`path`,{d:`M20 40 L40 28 L60 40 L40 52 Z`,fill:`${e}15`,stroke:e,strokeWidth:1,strokeLinejoin:`round`,strokeDasharray:`3 2`}),(0,o.createElement)(`path`,{d:`M60 40 L80 28 L100 40 L80 52 Z`,fill:`${e}15`,stroke:e,strokeWidth:1,strokeLinejoin:`round`,strokeDasharray:`3 2`}))}function va({mutedColor:e}){return(0,o.createElement)(`svg`,{width:64,height:64,viewBox:`0 0 64 64`,fill:`none`,"aria-hidden":`true`},(0,o.createElement)(`rect`,{x:16,y:8,width:32,height:40,rx:3,fill:`${e}12`,stroke:e,strokeWidth:1.5}),(0,o.createElement)(`line`,{x1:24,y1:20,x2:40,y2:20,stroke:e,strokeWidth:1.5,strokeLinecap:`round`}),(0,o.createElement)(`line`,{x1:24,y1:28,x2:36,y2:28,stroke:e,strokeWidth:1.5,strokeLinecap:`round`}),(0,o.createElement)(`line`,{x1:24,y1:36,x2:32,y2:36,stroke:e,strokeWidth:1.5,strokeLinecap:`round`}),(0,o.createElement)(`circle`,{cx:32,cy:54,r:6,stroke:e,strokeWidth:1.2,fill:`none`}),(0,o.createElement)(`line`,{x1:28,y1:54,x2:36,y2:54,stroke:e,strokeWidth:1.2,strokeLinecap:`round`}))}function ya({image:e=`default`,description:r=`No data`,children:i,style:a}){let s=t.f(),c=typeof r==`string`?n.m(r):r,l;return l=e===`default`?(0,o.createElement)(_a,{color:s.primary,mutedColor:s.textMuted}):e===`simple`?(0,o.createElement)(va,{mutedColor:s.textMuted}):e,(0,o.createElement)(`div`,{role:`status`,style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 16px`,textAlign:`center`,...a}},(0,o.createElement)(`div`,{style:{marginBottom:`12px`,opacity:.85}},l),c&&(0,o.createElement)(`div`,{style:{color:s.textMuted,fontSize:`0.875rem`,lineHeight:`1.5`,maxWidth:`320px`}},c),i&&(0,o.createElement)(`div`,{style:{marginTop:`16px`}},i))}function ba(e,t,n=`,`){if(typeof e==`string`)return e;let[r,i]=(t===void 0?String(e):e.toFixed(t)).split(`.`),a=r.replace(/\B(?=(\d{3})+(?!\d))/g,n);return i===void 0?a:`${a}.${i}`}function xa(e,t){if(e<=0)return t.replace(/DD?/g,`0`).replace(/HH?/g,`00`).replace(/mm?/g,`00`).replace(/ss?/g,`00`);let n=Math.floor(e/1e3),r=Math.floor(n/86400),i=Math.floor(n%86400/3600),a=Math.floor(n%3600/60),o=n%60,s=e=>String(e).padStart(2,`0`);return t.replace(/DD/g,s(r)).replace(/D/g,String(r)).replace(/HH/g,s(i)).replace(/H/g,String(i)).replace(/mm/g,s(a)).replace(/m/g,String(a)).replace(/ss/g,s(o)).replace(/s/g,String(o))}function Sa({direction:e,color:t}){return(0,o.createElement)(`svg`,{width:16,height:14,viewBox:`0 0 20 14`,fill:`none`,"aria-hidden":`true`,style:{display:`inline-block`,verticalAlign:`middle`}},(0,o.createElement)(`path`,{d:e===`up`?`M6 10 L10 4 L14 10`:`M6 4 L10 10 L14 4`,stroke:t,strokeWidth:2.5,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`}))}var Ca=!1;function wa(){if(Ca||typeof document>`u`)return;Ca=!0;let e=document.createElement(`style`);e.id=`tkx-statistic-skeleton`,e.textContent=`@keyframes tkx-stat-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}`,document.head.appendChild(e)}function Ta({w:e,h:t,alt:n,bdr:r,rm:i}){return i||wa(),(0,o.createElement)(`div`,{"aria-hidden":`true`,style:{width:e,height:t,borderRadius:`4px`,background:i?n:`linear-gradient(90deg, ${n} 25%, ${r} 50%, ${n} 75%)`,backgroundSize:`200% 100%`,animation:i?`none`:`tkx-stat-shimmer 1.5s ease-in-out infinite`}})}function Ea({title:e,value:i,prefix:a,suffix:s,precision:c,groupSeparator:l=`,`,valueStyle:u,loading:d=!1,trend:f,trendValue:p,style:m}){let h=t.f(),g=r.o(),_=n.m(e),v=p?n.m(p):void 0,y=f===`up`?h.success:f===`down`?h.danger:void 0;return(0,o.createElement)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`4px`,...m}},(0,o.createElement)(`div`,{style:{color:h.textMuted,fontSize:`0.875rem`,lineHeight:`1.4`}},_),d?(0,o.createElement)(Ta,{w:`120px`,h:`32px`,alt:h.surfaceAlt,bdr:h.border,rm:g}):(0,o.createElement)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`4px`,fontSize:`1.75rem`,fontWeight:700,lineHeight:`1.2`,color:h.text,fontVariantNumeric:`tabular-nums`,...u}},a&&(0,o.createElement)(`span`,{style:{fontSize:`0.75em`,fontWeight:400}},a),(0,o.createElement)(`span`,null,ba(i,c,l)),s&&(0,o.createElement)(`span`,{style:{fontSize:`0.6em`,fontWeight:400,color:h.textMuted}},s)),f&&(0,o.createElement)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,fontSize:`0.8125rem`,color:y,marginTop:`2px`}},(0,o.createElement)(Sa,{direction:f,color:y}),v&&(0,o.createElement)(`span`,null,v)))}function Da({title:e,value:r,format:i=`HH:mm:ss`,onFinish:a,prefix:s,suffix:c,style:l}){let u=t.f(),d=n.m(e),f=(0,o.useRef)(a);f.current=a;let p=(0,o.useRef)(!1),[m,h]=(0,o.useState)(()=>Math.max(0,r-Date.now()));(0,o.useEffect)(()=>{p.current=!1;let e=()=>{let e=Math.max(0,r-Date.now());h(e),e<=0&&!p.current&&(p.current=!0,f.current?.())};e();let t=setInterval(e,1e3);return()=>clearInterval(t)},[r]);let g=xa(m,i);return(0,o.createElement)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`4px`,...l}},(0,o.createElement)(`div`,{style:{color:u.textMuted,fontSize:`0.875rem`,lineHeight:`1.4`}},d),(0,o.createElement)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`4px`,fontSize:`1.75rem`,fontWeight:700,lineHeight:`1.2`,color:m<=0?u.danger:u.text,fontVariantNumeric:`tabular-nums`}},s&&(0,o.createElement)(`span`,{style:{fontSize:`0.75em`,fontWeight:400}},s),(0,o.createElement)(`span`,null,g),c&&(0,o.createElement)(`span`,{style:{fontSize:`0.6em`,fontWeight:400,color:u.textMuted}},c)))}var Oa={sm:{height:28,fontSize:12,px:10},md:{height:36,fontSize:14,px:16},lg:{height:44,fontSize:16,px:20}};function ka({options:e,value:i,onChange:a,size:c=`md`,block:l=!1}){let u=t.f(),d=r.o(),f=(0,o.useRef)(null),[p,m]=(0,o.useState)(()=>Math.max(0,e.findIndex(e=>e.value===i))),[h,g]=(0,o.useState)({}),_=Oa[c];(0,o.useEffect)(()=>{let t=e.findIndex(e=>e.value===i);t>=0&&m(t)},[i,e]),(0,o.useEffect)(()=>{let e=f.current;if(!e)return;let t=e.querySelectorAll(`[data-seg-btn]`)[p];t&&g({left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight,transition:d?`none`:`left 0.2s ease, width 0.2s ease`})},[p,e,d]);let v=(0,o.useCallback)(t=>{let n=e[t];!n||n.disabled||(m(t),a?.(n.value))},[e,a]),y=(0,o.useCallback)(t=>{let n=p;if(t.key===`ArrowRight`||t.key===`ArrowDown`)for(t.preventDefault(),n=(p+1)%e.length;e[n]?.disabled&&n!==p;)n=(n+1)%e.length;else if(t.key===`ArrowLeft`||t.key===`ArrowUp`)for(t.preventDefault(),n=(p-1+e.length)%e.length;e[n]?.disabled&&n!==p;)n=(n-1+e.length)%e.length;n!==p&&(v(n),(f.current?.querySelectorAll(`[data-seg-btn]`))?.[n]?.focus())},[p,e,v]);return(0,s.jsxs)(`div`,{ref:f,role:`radiogroup`,"aria-label":`Segmented control`,className:n.a(`relative inline-flex items-center rounded-lg p-1`),style:{backgroundColor:u.surfaceAlt,border:`1px solid ${u.border}`,width:l?`100%`:void 0},onKeyDown:y,children:[(0,s.jsx)(`div`,{"aria-hidden":`true`,className:n.a(`absolute top-1 rounded-md`),style:{...h,backgroundColor:u.surface,boxShadow:`0 1px 3px ${u.border}`,zIndex:0}}),e.map((e,t)=>{let r=t===p,i=n.m(e.label);return(0,s.jsxs)(`button`,{"data-seg-btn":!0,type:`button`,role:`radio`,"aria-checked":r,"aria-disabled":e.disabled||void 0,disabled:e.disabled,tabIndex:r?0:-1,className:n.a(`relative z-10 flex items-center justify-center gap-1 rounded-md border-0 cursor-pointer`,`font-sans whitespace-nowrap select-none`),style:{height:_.height,fontSize:_.fontSize,padding:`0 ${_.px}px`,flex:l?1:void 0,color:r?u.text:u.textMuted,backgroundColor:`transparent`,opacity:e.disabled?.4:1,fontWeight:r?600:400,transition:d?`none`:`color 0.15s ease`},onClick:()=>v(t),children:[e.icon&&(0,s.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),i]},e.value)})]})}function Aa({options:e,value:i=``,onChange:a,trigger:c=`@`,placeholder:l,label:u}){let d=t.f(),f=r.o(),p=(0,o.useRef)(null),m=(0,o.useRef)(null),[h,g]=(0,o.useState)(i),[_,v]=(0,o.useState)(!1),[y,b]=(0,o.useState)(``),[x,S]=(0,o.useState)(0),[C,w]=(0,o.useState)(-1);(0,o.useEffect)(()=>{i!==void 0&&g(i)},[i]);let T=e.filter(e=>e.label.toLowerCase().includes(y.toLowerCase())),E=(0,o.useCallback)(e=>{let t=e.target.value;g(t),a?.(t);let n=e.target.selectionStart??t.length,r=t.slice(0,n),i=r.lastIndexOf(c);if(i>=0){let e=r.slice(i+c.length);if(!/\s/.test(e)){b(e),w(i),v(!0),S(0);return}}v(!1)},[c,a]),D=(0,o.useCallback)(e=>{let t=h.slice(0,C),n=h.slice(C+c.length+y.length),r=`${t}${c}${e.value} ${n}`;g(r),a?.(r),v(!1),p.current?.focus()},[h,C,c,y,a]),O=(0,o.useCallback)(e=>{_&&(e.key===`ArrowDown`?(e.preventDefault(),S(e=>(e+1)%T.length)):e.key===`ArrowUp`?(e.preventDefault(),S(e=>(e-1+T.length)%T.length)):e.key===`Enter`&&T[x]?(e.preventDefault(),D(T[x])):e.key===`Escape`&&v(!1))},[_,T,x,D]);(0,o.useEffect)(()=>{!_||!m.current||m.current.children[x]?.scrollIntoView({block:`nearest`})},[x,_]);let k=u?n.m(u):void 0,A=l?n.m(l):void 0;return(0,s.jsxs)(`div`,{className:n.a(`relative font-sans`),style:{width:`100%`},children:[k&&(0,s.jsx)(`label`,{className:n.a(`block text-sm font-medium mb-1`),style:{color:d.text},children:k}),(0,s.jsx)(`textarea`,{ref:p,role:`combobox`,"aria-expanded":_,"aria-haspopup":`listbox`,"aria-autocomplete":`list`,"aria-label":k??`Mentions input`,value:h,placeholder:A,onChange:E,onKeyDown:O,onBlur:()=>setTimeout(()=>v(!1),200),className:n.a(`w-full rounded-lg border px-3 py-2 text-sm resize-y`),style:{backgroundColor:d.surface,borderColor:d.border,color:d.text,minHeight:80,outline:`none`},rows:3}),_&&T.length>0&&(0,s.jsx)(`ul`,{ref:m,role:`listbox`,"aria-label":`Mention suggestions`,className:n.a(`absolute left-0 right-0 z-50 rounded-lg border overflow-auto`),style:{backgroundColor:d.surface,borderColor:d.border,maxHeight:200,top:`100%`,marginTop:4,listStyle:`none`,padding:0,boxShadow:`0 4px 12px ${d.bg}80`,animation:f?`none`:`tkxFadeIn 0.15s ease`},children:T.map((e,t)=>(0,s.jsxs)(`li`,{role:`option`,"aria-selected":t===x,className:n.a(`flex items-center gap-3 px-3 py-2 cursor-pointer text-sm`),style:{backgroundColor:t===x?d.surfaceAlt:`transparent`,color:d.text},onMouseDown:t=>{t.preventDefault(),D(e)},onMouseEnter:()=>S(t),children:[e.avatar&&(0,s.jsx)(`img`,{src:n.m(e.avatar),alt:``,"aria-hidden":`true`,width:24,height:24,className:n.a(`rounded-full`),style:{objectFit:`cover`}}),(0,s.jsx)(`span`,{children:n.m(e.label)}),(0,s.jsxs)(`span`,{style:{color:d.textMuted,marginLeft:`auto`},children:[c,n.m(e.value)]})]},e.value))})]})}function ja(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return Math.abs(t)}function Ma(e){let t=e;return()=>(t=t*1664525+1013904223|0,(t>>>0)/4294967295)}var Na={L:.38,M:.42,Q:.48,H:.55};function Pa(e,t,n){let r=Ma(ja(e)),i=Na[n]??.42,a=Array.from({length:t},()=>Array.from({length:t},()=>!1)),o=(e,t)=>{for(let n=0;n<7;n++)for(let r=0;r<7;r++){let i=n===0||n===6||r===0||r===6,o=n>=2&&n<=4&&r>=2&&r<=4;a[e+n][t+r]=i||o}};o(0,0),o(0,t-7),o(t-7,0);for(let e=7;e<t-7;e++)a[6][e]=e%2==0,a[e][6]=e%2==0;for(let e=0;e<t;e++)for(let n=0;n<t;n++)e<8&&n<8||e<8&&n>=t-8||e>=t-8&&n<8||e===6||n===6||(a[e][n]=r()<i);return a}function Fa({value:e,size:i=160,color:a,bgColor:c,errorLevel:l=`M`,icon:u,bordered:d=!0}){let f=t.f(),p=r.o(),m=(0,o.useRef)(null),h=n.m(e),g=a??f.text,_=c??f.surface,v=(0,o.useMemo)(()=>Pa(h,25,l),[h,l]);return(0,o.useEffect)(()=>{let e=m.current;if(!e)return;let t=e.getContext(`2d`);if(!t)return;let r=window.devicePixelRatio||1;e.width=i*r,e.height=i*r,t.scale(r,r);let a=i/25;t.fillStyle=_,t.fillRect(0,0,i,i),t.fillStyle=g;for(let e=0;e<25;e++)for(let n=0;n<25;n++)v[e][n]&&t.fillRect(n*a,e*a,a,a);if(u){let e=i*.22,r=(i-e)/2;t.fillStyle=_,t.fillRect(r-2,r-2,e+4,e+4);let a=new Image;a.crossOrigin=`anonymous`,a.onload=()=>{t.drawImage(a,r,r,e,e)},a.src=n.m(u)}},[v,i,g,_,u]),(0,s.jsx)(`div`,{role:`img`,"aria-label":`QR code for: ${h}`,className:n.a(`inline-block rounded-lg`),style:{padding:d?12:0,backgroundColor:d?_:`transparent`,border:d?`1px solid ${f.border}`:`none`,lineHeight:0,animation:p?`none`:`tkxFadeIn 0.2s ease`},children:(0,s.jsx)(`canvas`,{ref:m,"aria-hidden":`true`,style:{width:i,height:i,display:`block`}})})}var Ia={success:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M22 37l9 9 19-19`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),error:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M26 26l20 20M46 26L26 46`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`})]}),warning:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`path`,{d:`M36 6L4 64h64L36 6z`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M36 30v16`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`}),(0,s.jsx)(`circle`,{cx:`36`,cy:`54`,r:`2.5`,fill:e})]}),info:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M36 32v18`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`}),(0,s.jsx)(`circle`,{cx:`36`,cy:`22`,r:`2.5`,fill:e})]}),404:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`text`,{x:`36`,y:`44`,textAnchor:`middle`,fontSize:`22`,fontWeight:`bold`,fill:e,children:`404`})]}),403:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M28 30h16v16H28z`,stroke:e,strokeWidth:`3`,fill:`none`}),(0,s.jsx)(`path`,{d:`M32 30v-4a4 4 0 018 0v4`,stroke:e,strokeWidth:`3`,fill:`none`})]}),500:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`text`,{x:`36`,y:`44`,textAnchor:`middle`,fontSize:`22`,fontWeight:`bold`,fill:e,children:`500`})]})};function La(e,t){switch(e){case`success`:return t.success;case`error`:case`500`:return t.danger;case`warning`:return t.warning;case`info`:return t.info;case`404`:case`403`:return t.textMuted}}function Ra({status:e,title:i,subTitle:a,icon:o,extra:c}){let l=t.f(),u=r.o(),d=La(e,l),f=n.m(i),p=a?n.m(a):void 0;return(0,s.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:n.a(`flex flex-col items-center text-center px-6 py-12 font-sans`),style:{animation:u?`none`:`tkxFadeIn 0.3s ease`},children:[(0,s.jsx)(`div`,{className:n.a(`mb-6`),children:o??Ia[e](d)}),(0,s.jsx)(`h2`,{className:n.a(`text-xl font-semibold m-0 mb-2`),style:{color:l.text},children:f}),p&&(0,s.jsx)(`p`,{className:n.a(`text-sm m-0 mb-6 max-w-md leading-relaxed`),style:{color:l.textMuted},children:p}),c&&(0,s.jsx)(`div`,{className:n.a(`flex items-center gap-3 mt-4`),children:c})]})}function za(e){let t=document.querySelector(e);return t?t.getBoundingClientRect():null}function Ba(e,t,n,r){switch(t){case`top`:return{top:e.top-r-12+window.scrollY,left:e.left+e.width/2-n/2+window.scrollX};case`bottom`:return{top:e.bottom+12+window.scrollY,left:e.left+e.width/2-n/2+window.scrollX};case`left`:return{top:e.top+e.height/2-r/2+window.scrollY,left:e.left-n-12+window.scrollX};case`right`:return{top:e.top+e.height/2-r/2+window.scrollY,left:e.right+12+window.scrollX};default:return{top:e.bottom+12+window.scrollY,left:e.left+window.scrollX}}}function Va({steps:e,isOpen:i=!1,onClose:a,current:l,onChange:u}){let d=t.f(),f=r.o(),[p,m]=(0,o.useState)(0),h=l??p,g=(0,o.useRef)(null),[_,v]=(0,o.useState)({top:0,left:0}),[y,b]=(0,o.useState)(null),x=e[h],S=(0,o.useCallback)(()=>{if(!x)return;let e=za(x.target);if(b(e),e&&g.current){let t=g.current.offsetWidth,n=g.current.offsetHeight;v(Ba(e,x.placement??`bottom`,t,n))}},[x]);(0,o.useEffect)(()=>{if(i)return S(),window.addEventListener(`resize`,S),window.addEventListener(`scroll`,S,!0),()=>{window.removeEventListener(`resize`,S),window.removeEventListener(`scroll`,S,!0)}},[i,h,S]),(0,o.useEffect)(()=>{i&&g.current?.focus()},[i,h]);let C=(0,o.useCallback)(e=>{m(e),u?.(e)},[u]),w=(0,o.useCallback)(()=>{h<e.length-1?C(h+1):a?.()},[h,e.length,C,a]),T=(0,o.useCallback)(()=>{h>0&&C(h-1)},[h,C]);if(!i||!x)return null;let E=n.m(x.title),D=n.m(x.description);return(0,c.createPortal)((0,s.jsxs)(`div`,{"aria-hidden":`true`,children:[(0,s.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:9998,backgroundColor:`rgba(0,0,0,0.55)`,clipPath:y?`polygon(0% 0%, 0% 100%, ${y.left-6}px 100%, ${y.left-6}px ${y.top-6}px, ${y.right+6}px ${y.top-6}px, ${y.right+6}px ${y.bottom+6}px, ${y.left-6}px ${y.bottom+6}px, ${y.left-6}px 100%, 100% 100%, 100% 0%)`:void 0,transition:f?`none`:`clip-path 0.25s ease`},onClick:a}),(0,s.jsxs)(`div`,{ref:g,role:`dialog`,"aria-modal":`true`,"aria-label":`Tour step ${h+1} of ${e.length}`,tabIndex:-1,style:{position:`absolute`,zIndex:9999,top:_.top,left:_.left,width:300,backgroundColor:d.surface,border:`1px solid ${d.border}`,borderRadius:10,padding:20,boxShadow:`0 8px 24px ${d.bg}80`,animation:f?`none`:`tkxFadeIn 0.2s ease`,fontFamily:`inherit`},onKeyDown:e=>{e.key===`Escape`&&a?.()},children:[(0,s.jsx)(`h3`,{className:n.a(`m-0 mb-2 text-base font-semibold`),style:{color:d.text},children:E}),(0,s.jsx)(`p`,{className:n.a(`m-0 mb-4 text-sm leading-relaxed`),style:{color:d.textMuted},children:D}),(0,s.jsx)(`div`,{className:n.a(`flex items-center gap-1 mb-4`),"aria-label":`Tour progress`,children:e.map((e,t)=>(0,s.jsx)(`span`,{"aria-hidden":`true`,style:{width:8,height:8,borderRadius:`50%`,backgroundColor:t===h?d.primary:d.border,transition:f?`none`:`background-color 0.2s`}},t))}),(0,s.jsxs)(`div`,{className:n.a(`flex items-center justify-between gap-2`),children:[(0,s.jsx)(`button`,{type:`button`,"aria-label":`Skip tour`,onClick:a,className:n.a(`border-0 bg-transparent cursor-pointer text-sm px-2 py-1`),style:{color:d.textMuted},children:`Skip`}),(0,s.jsxs)(`div`,{className:n.a(`flex gap-2`),children:[h>0&&(0,s.jsx)(`button`,{type:`button`,"aria-label":`Previous step`,onClick:T,className:n.a(`rounded-md border px-3 py-1 text-sm cursor-pointer bg-transparent`),style:{borderColor:d.border,color:d.text},children:`Prev`}),(0,s.jsx)(`button`,{type:`button`,"aria-label":h===e.length-1?`Finish tour`:`Next step`,onClick:w,className:n.a(`rounded-md border-0 px-4 py-1 text-sm cursor-pointer font-medium`),style:{backgroundColor:d.primary,color:`#fff`},children:h===e.length-1?`Finish`:`Next`})]})]})]})]}),document.body)}function Ha(e,t,n,r,i){let a=document.createElement(`canvas`),o=a.getContext(`2d`);if(!o)return``;let s=r*1.5,c=e.length*s,l=Math.max(...e.map(e=>e.length))*r*.6,u=n[0]+l,d=n[1]+c;return a.width=u*2,a.height=d*2,o.scale(2,2),o.translate(u/2,d/2),o.rotate(t*Math.PI/180),o.font=`${r}px sans-serif`,o.fillStyle=i,o.textAlign=`center`,o.textBaseline=`middle`,e.forEach((t,n)=>{let r=(n-(e.length-1)/2)*s;o.fillText(t,0,r)}),a.toDataURL()}function Ua({text:e,children:i,rotate:a=-22,gap:c=[100,100],fontSize:l=14,color:u,zIndex:d=10}){let f=t.f(),p=r.o(),m=(0,o.useRef)(null),[h,g]=(0,o.useState)(``),_=(0,o.useMemo)(()=>(Array.isArray(e)?e:[e]).map(e=>n.m(e)),[e]),v=u??`${f.textMuted}22`,y=(0,o.useCallback)(()=>Ha(_,a,c,l,v),[_,a,c,l,v]);return(0,o.useEffect)(()=>{let e=y();e&&g(`url(${e})`)},[y]),(0,o.useEffect)(()=>{let e=m.current?.querySelector(`[data-watermark]`);if(!e)return;let t=new MutationObserver(()=>{let t=y();t&&(e.style.backgroundImage=`url(${t})`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>t.disconnect()},[y]),(0,s.jsxs)(`div`,{ref:m,className:n.a(`relative`),style:{overflow:`hidden`},children:[i,(0,s.jsx)(`div`,{"data-watermark":!0,"aria-hidden":`true`,className:n.a(`absolute inset-0 pointer-events-none`),style:{zIndex:d,backgroundImage:h,backgroundRepeat:`repeat`,animation:p?`none`:`tkxFadeIn 0.3s ease`}})]})}function Wa(e){if(e)try{return e()}catch{return window}return window}function Ga(e){if(e instanceof Window)return{top:0,bottom:e.innerHeight};let t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom}}function Ka({children:e,offsetTop:i,offsetBottom:a,onChange:c,target:l}){let u=t.f(),d=r.o(),f=(0,o.useRef)(null),p=(0,o.useRef)(null),[m,h]=(0,o.useState)(!1),[g,_]=(0,o.useState)({width:0,height:0}),v=(0,o.useRef)(!1),y=(0,o.useMemo)(()=>n.m(`Sticky content`),[]),b=(0,o.useCallback)(()=>{let e=f.current;if(!e)return;let t=e.getBoundingClientRect(),n=Ga(Wa(l)),r=!1;i===void 0?a!==void 0&&(r=n.bottom-t.bottom<=a):r=t.top-n.top<=i,r!==v.current&&(v.current=r,h(r),_({width:t.width,height:t.height}),c?.(r))},[i,a,c,l]);(0,o.useEffect)(()=>{let e=Wa(l);return b(),e.addEventListener(`scroll`,b,{passive:!0}),window.addEventListener(`resize`,b),()=>{e.removeEventListener(`scroll`,b),window.removeEventListener(`resize`,b)}},[b,l]);let x=m?{position:`fixed`,zIndex:100,...i===void 0?{}:{top:i},...a===void 0?{}:{bottom:a},width:g.width||void 0,transition:d?`none`:`box-shadow 0.2s ease`,boxShadow:`0 2px 8px ${u.border}`}:{};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`div`,{ref:f,"aria-hidden":m,style:m?{height:g.height,width:g.width}:{}}),(0,s.jsx)(`div`,{ref:p,role:`region`,"aria-label":y,className:n.a(m?`tkx-affixed`:``),style:x,children:e})]})}function qa(e){let t=[];for(let n of e)t.push(n),n.children&&t.push(...qa(n.children));return t}function Ja(e){return e.startsWith(`#`)?e.slice(1):e}function Ya({item:e,activeKey:t,depth:r,onClick:i,theme:a,reducedMotion:o}){let c=e.key===t,l=n.m(e.title);return(0,s.jsxs)(`li`,{role:`none`,style:{listStyle:`none`},children:[(0,s.jsx)(`a`,{role:`treeitem`,"aria-current":c?`location`:void 0,href:e.href,onClick:t=>{t.preventDefault(),i(e.href)},className:n.a(`block text-sm py-1 no-underline`),style:{paddingLeft:12+r*16,color:c?a.primary:a.textMuted,fontWeight:c?600:400,borderLeft:`2px solid ${c?a.primary:`transparent`}`,transition:o?`none`:`color 0.15s ease, border-color 0.15s ease`},children:l}),e.children&&e.children.length>0&&(0,s.jsx)(`ul`,{role:`group`,style:{margin:0,padding:0},children:e.children.map(e=>(0,s.jsx)(Ya,{item:e,activeKey:t,depth:r+1,onClick:i,theme:a,reducedMotion:o},e.key))})]})}function Xa({items:e,offsetTop:i=0,getCurrentAnchor:a,onChange:c}){let l=t.f(),u=r.o(),[d,f]=(0,o.useState)(e[0]?.key??``),p=(0,o.useRef)(!1),m=qa(e),h=(0,o.useCallback)(()=>{if(p.current)return;let e=m[0]?.key??``;for(let t of m){let n=Ja(t.href),r=document.getElementById(n);r&&r.getBoundingClientRect().top<=i+10&&(e=t.key)}a&&(e=a(e)),e!==d&&(f(e),c?.(e))},[m,i,a,d,c]);(0,o.useEffect)(()=>(window.addEventListener(`scroll`,h,{passive:!0}),h(),()=>window.removeEventListener(`scroll`,h)),[h]);let g=(0,o.useCallback)(e=>{let t=Ja(e),n=document.getElementById(t);if(!n)return;p.current=!0;let r=n.getBoundingClientRect().top+window.scrollY-i;window.scrollTo({top:r,behavior:u?`auto`:`smooth`});let a=m.find(t=>t.href===e);a&&(f(a.key),c?.(a.key)),setTimeout(()=>{p.current=!1},800)},[m,i,u,c]);return(0,s.jsx)(`nav`,{role:`tree`,"aria-label":`Anchor navigation`,className:n.a(`font-sans`),style:{borderLeft:`1px solid ${l.border}`,padding:`4px 0`},children:(0,s.jsx)(`ul`,{role:`group`,style:{margin:0,padding:0},children:e.map(e=>(0,s.jsx)(Ya,{item:e,activeKey:d,depth:0,onClick:g,theme:l,reducedMotion:u},e.key))})})}function Za(e,t){let n=[e],r=e;for(let e of t){let t=r.find(t=>t.value===e);if(t?.children?.length)n.push(t.children),r=t.children;else break}return n}function Qa(e,t){let n=[],r=e;for(let e of t){let t=r.find(t=>t.value===e);if(t)n.push(t),r=t.children??[];else break}return n}function $a(e,t){return Qa(e,t).map(e=>n.m(e.label)).join(` / `)}function eo({options:e,value:i=[],onChange:a,placeholder:l=`Select...`,label:u,multiple:d=!1}){let f=t.f(),p=r.o(),m=(0,o.useRef)(null),h=(0,o.useRef)(null),[g,_]=(0,o.useState)(!1),[v,y]=(0,o.useState)(i),[b,x]=(0,o.useState)({top:0,left:0,width:0}),S=u?n.m(u):void 0,C=n.m(l),w=i.length>0?$a(e,i):``;(0,o.useEffect)(()=>{if(!g||!m.current)return;let e=m.current.getBoundingClientRect();x({top:e.bottom+4+window.scrollY,left:e.left+window.scrollX,width:Math.max(e.width,200)})},[g]),(0,o.useEffect)(()=>{if(!g)return;let e=e=>{!m.current?.contains(e.target)&&!h.current?.contains(e.target)&&_(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[g]);let T=(0,o.useCallback)((t,n)=>{if(n.disabled)return;let r=[...v.slice(0,t),n.value];if(y(r),!n.children?.length){let t=Qa(e,r);a?.(r,t),d||_(!1)}},[v,e,a,d]),E=(0,o.useCallback)(e=>{e.key===`Escape`?(_(!1),m.current?.focus()):(e.key===`Enter`||e.key===` `)&&(g||(e.preventDefault(),_(!0)))},[g]),D=Za(e,v),O=g?(0,c.createPortal)((0,s.jsx)(`div`,{ref:h,role:`tree`,"aria-label":S??`Cascader options`,className:n.a(`flex rounded-lg border overflow-hidden`),style:{position:`absolute`,zIndex:9999,top:b.top,left:b.left,backgroundColor:f.surface,borderColor:f.border,boxShadow:`0 4px 16px ${f.bg}80`,animation:p?`none`:`tkxFadeIn 0.15s ease`},children:D.map((e,t)=>(0,s.jsx)(`ul`,{role:`group`,className:n.a(`m-0 p-0 overflow-auto`),style:{listStyle:`none`,minWidth:160,maxHeight:260,borderRight:t<D.length-1?`1px solid ${f.border}`:`none`},children:e.map(e=>{let r=v[t]===e.value,i=n.m(e.label);return(0,s.jsxs)(`li`,{role:`treeitem`,"aria-selected":r,"aria-disabled":e.disabled||void 0,"aria-expanded":e.children?.length?r:void 0,className:n.a(`flex items-center justify-between px-3 py-2 cursor-pointer text-sm`),style:{backgroundColor:r?f.surfaceAlt:`transparent`,color:e.disabled?f.textMuted:f.text,opacity:e.disabled?.5:1,cursor:e.disabled?`not-allowed`:`pointer`},onClick:()=>T(t,e),onMouseEnter:()=>{e.disabled||y(n=>[...n.slice(0,t),e.value])},children:[(0,s.jsx)(`span`,{children:i}),e.children&&e.children.length>0&&(0,s.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,style:{color:f.textMuted,flexShrink:0},children:(0,s.jsx)(`path`,{d:`M10 6l6 6-6 6V6z`})})]},e.value)})},t))}),document.body):null;return(0,s.jsxs)(`div`,{className:n.a(`relative font-sans`),onKeyDown:E,children:[S&&(0,s.jsx)(`label`,{className:n.a(`block text-sm font-medium mb-1`),style:{color:f.text},children:S}),(0,s.jsxs)(`button`,{ref:m,type:`button`,role:`combobox`,"aria-expanded":g,"aria-haspopup":`tree`,"aria-label":S??`Cascader`,className:n.a(`w-full flex items-center justify-between rounded-lg border px-3 py-2 text-sm cursor-pointer`),style:{backgroundColor:f.surface,borderColor:g?f.primary:f.border,color:w?f.text:f.textMuted,outline:`none`,minHeight:38,textAlign:`left`},onClick:()=>_(e=>!e),children:[(0,s.jsx)(`span`,{className:n.a(`truncate`),children:w||C}),(0,s.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,style:{color:f.textMuted,transform:g?`rotate(180deg)`:`rotate(0deg)`,transition:p?`none`:`transform 0.2s ease`,flexShrink:0},children:(0,s.jsx)(`path`,{d:`M7 10l5 5 5-5H7z`})})]}),O]})}var to={sm:`8px 12px`,md:`12px 16px`,lg:`16px 20px`};function no({theme:e,reducedMotion:t}){return(0,s.jsxs)(`div`,{className:n.a(`flex items-center gap-3 px-4 py-3`),"aria-hidden":`true`,children:[(0,s.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,backgroundColor:e.surfaceAlt,animation:t?`none`:`tkxPulse 1.5s ease infinite`}}),(0,s.jsxs)(`div`,{className:n.a(`flex-1`),children:[(0,s.jsx)(`div`,{style:{width:`60%`,height:14,borderRadius:4,backgroundColor:e.surfaceAlt,marginBottom:8,animation:t?`none`:`tkxPulse 1.5s ease infinite`}}),(0,s.jsx)(`div`,{style:{width:`40%`,height:12,borderRadius:4,backgroundColor:e.surfaceAlt,animation:t?`none`:`tkxPulse 1.5s ease infinite`}})]})]})}function ro({items:e,header:i,footer:a,bordered:o=!0,size:c=`md`,loading:l=!1,emptyText:u=`No data`,grid:d}){let f=t.f(),p=r.o(),m=n.m(u),h=to[c],g=!!d,_=d?.column??1,v=d?.gutter??16;return(0,s.jsxs)(`div`,{role:`list`,"aria-label":`List`,"aria-busy":l,className:n.a(`font-sans rounded-lg overflow-hidden`),style:{border:o?`1px solid ${f.border}`:`none`,backgroundColor:f.surface},children:[i&&(0,s.jsx)(`div`,{className:n.a(`font-semibold text-sm`),style:{padding:h,color:f.text,borderBottom:`1px solid ${f.border}`,backgroundColor:f.surfaceAlt},children:i}),l&&(0,s.jsx)(`div`,{children:Array.from({length:3}).map((e,t)=>(0,s.jsx)(no,{theme:f,reducedMotion:p},t))}),!l&&e.length===0&&(0,s.jsx)(`div`,{role:`status`,className:n.a(`text-center py-12 text-sm`),style:{color:f.textMuted},children:m}),!l&&e.length>0&&(0,s.jsx)(`div`,{style:g?{display:`grid`,gridTemplateColumns:`repeat(${_}, 1fr)`,gap:v,padding:v}:void 0,children:e.map((t,r)=>{let i=n.m(t.title),a=t.description?n.m(t.description):void 0;return(0,s.jsxs)(`div`,{role:`listitem`,className:n.a(`flex items-start gap-3`),style:{padding:h,borderBottom:!g&&r<e.length-1?`1px solid ${f.border}`:`none`,...g?{border:`1px solid ${f.border}`,borderRadius:8,backgroundColor:f.surface}:{},animation:p?`none`:`tkxFadeIn 0.2s ease ${r*.03}s both`},children:[t.avatar&&(0,s.jsx)(`div`,{"aria-hidden":`true`,className:n.a(`shrink-0`),children:t.avatar}),(0,s.jsxs)(`div`,{className:n.a(`flex-1 min-w-0`),children:[(0,s.jsx)(`div`,{className:n.a(`text-sm font-medium`),style:{color:f.text},children:i}),a&&(0,s.jsx)(`div`,{className:n.a(`text-xs mt-1 leading-relaxed`),style:{color:f.textMuted},children:a})]}),t.extra&&(0,s.jsx)(`div`,{className:n.a(`shrink-0 ml-auto`),style:{color:f.textMuted},children:t.extra}),t.actions&&(0,s.jsx)(`div`,{className:n.a(`shrink-0 flex items-center gap-2`),children:t.actions})]},t.key)})}),a&&(0,s.jsx)(`div`,{className:n.a(`text-sm`),style:{padding:h,color:f.textMuted,borderTop:`1px solid ${f.border}`,backgroundColor:f.surfaceAlt},children:a})]})}function io({locale:e=`en-US`,direction:t,strings:n,children:r}){let i=(0,o.useMemo)(()=>{let r=a.LOCALES[e]??a.enUS,i=n?{...r,...n}:r;return{locale:e,direction:t??(a.isRTL(e)?`rtl`:`ltr`),strings:i}},[e,t,n]);return(0,s.jsx)(a.I18nContext.Provider,{value:i,children:(0,s.jsx)(`div`,{dir:i.direction,style:{direction:i.direction,display:`contents`},children:r})})}function ao({contentId:e=`tkx-main-content`,label:t=`Skip to main content`}){return(0,s.jsx)(`a`,{href:`#${e}`,className:`tkx-skip-nav`,children:t})}function oo({politeness:e=`polite`,children:t,atomic:n=!0}){return(0,s.jsx)(`div`,{role:`status`,"aria-live":e,"aria-atomic":n,className:`tkx-sr-only`,children:t})}function so({active:e,children:t,as:n=`div`}){return(0,s.jsx)(n,{ref:r.i(e),children:t})}function co({as:e,children:t,...n}){return(0,s.jsx)(e??`span`,{className:`tkx-sr-only`,...n,children:t})}function lo(e,t,n,r){let i=e.getBoundingClientRect(),a=t?t.offsetHeight:320,o=t?t.offsetWidth:200,s=window.innerWidth,c=window.innerHeight,l=window.scrollX,u=window.scrollY,d=0,f=0;switch(n){case`bottom-start`:d=i.bottom+u+r,f=i.left+l;break;case`bottom-end`:d=i.bottom+u+r,f=i.right+l-o;break;case`top-start`:d=i.top+u-r-a,f=i.left+l;break;case`top-end`:d=i.top+u-r-a,f=i.right+l-o;break;case`right`:d=i.top+u,f=i.right+l+r;break;case`left`:d=i.top+u,f=i.left+l-r-o;break;default:d=i.bottom+u+r,f=i.left+l}return n.startsWith(`bottom`)&&i.bottom+a>c&&(d=i.top+u-r-a),n.startsWith(`top`)&&i.top-a<0&&(d=i.bottom+u+r),f+o>s+l&&(f=s+l-o-8),f<l&&(f=l+8),{top:d,left:f,minWidth:i.width}}function uo(e,t){if(!t)return e;let n=e.toLowerCase().indexOf(t.toLowerCase());return n===-1?e:(0,s.jsxs)(s.Fragment,{children:[e.slice(0,n),(0,s.jsx)(`mark`,{style:{background:`rgba(0,245,212,0.3)`,color:`inherit`,borderRadius:2},children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}function fo(e,t){let n=[];for(let r of e)for(let e of r.items)e.disabled||(!t||e.label.toLowerCase().includes(t.toLowerCase()))&&n.push(e);return n}function po({groups:e,position:r,maxHeight:i,minWidth:a,selectedKeys:c,multiSelect:l,searchable:u,searchPlaceholder:d,onSelect:f,onClose:p,renderItem:m,menuRef:h,isPortal:g,menuId:_}){let v=t.f(),[y,b]=(0,o.useState)(``),[x,S]=(0,o.useState)(0),[C,w]=(0,o.useState)(null),[T,E]=(0,o.useState)(0),D=(0,o.useRef)(null),O=(0,o.useRef)([]),k=(0,o.useRef)([]),A=y?e.map(e=>({...e,items:e.items.filter(e=>e.label.toLowerCase().includes(y.toLowerCase())||e.description?.toLowerCase().includes(y.toLowerCase())||e.children?.some(e=>e.label.toLowerCase().includes(y.toLowerCase())))})).filter(e=>e.items.length>0):e,j=fo(A,y);(0,o.useEffect)(()=>{u&&D.current?D.current.focus():O.current[0]?.focus(),S(0)},[u]),(0,o.useEffect)(()=>{(!u||y!==``)&&O.current[x]?.focus()},[x,u,y]);let M=(0,o.useCallback)(e=>{switch(e.key){case`ArrowDown`:if(e.preventDefault(),C){let e=(j.find(e=>e.key===C)?.children??[]).filter(e=>!e.disabled);E(t=>Math.min(t+1,e.length-1))}else S(e=>Math.min(e+1,j.length-1));break;case`ArrowUp`:e.preventDefault(),C?E(e=>Math.max(e-1,0)):S(e=>Math.max(e-1,0));break;case`ArrowRight`:{e.preventDefault();let t=j[x];t?.children?.length&&(w(t.key),E(0));break}case`ArrowLeft`:e.preventDefault(),w(null);break;case`Enter`:case` `:if(e.preventDefault(),C){let e=(j.find(e=>e.key===C)?.children??[]).filter(e=>!e.disabled)[T];e&&f(e.key,e)}else{let e=j[x];e&&f(e.key,e)}break;case`Escape`:e.preventDefault(),C?w(null):p();break;case`Tab`:p();break;default:break}},[j,x,p,f,C,T]);(0,o.useEffect)(()=>{C&&k.current[T]?.focus()},[T,C]);let N={position:g?`fixed`:`absolute`,top:g?r.top:void 0,left:g?r.left:void 0,minWidth:Math.max(a,r.minWidth),maxHeight:i,overflowY:`auto`,background:v.surface,border:`1px solid ${v.border}`,borderRadius:8,boxShadow:`0 8px 32px rgba(0,0,0,0.4)`,zIndex:9999,outline:`none`,transformOrigin:`top left`,animation:`tkx-dropdown-in 150ms ease forwards`},P=0;return(0,s.jsxs)(`div`,{ref:h,id:_,role:`menu`,"aria-label":`Dropdown menu`,tabIndex:-1,style:N,onKeyDown:M,children:[(0,s.jsx)(`style`,{children:`
|
|
124
|
+
`,document.head.appendChild(e)}function Oa({size:e,color:t}){return(0,o.createElement)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,role:`img`,"aria-label":`Loading`},(0,o.createElement)(`circle`,{cx:12,cy:12,r:10,stroke:`${t}33`,strokeWidth:2.5,fill:`none`}),(0,o.createElement)(`path`,{d:`M12 2a10 10 0 0 1 10 10`,stroke:t,strokeWidth:2.5,strokeLinecap:`round`,fill:`none`}))}function ka({size:e,borderWidth:t,color:n,reducedMotion:r}){return r?(0,o.createElement)(Oa,{size:e,color:n}):(Da(),(0,o.createElement)(`div`,{role:`img`,"aria-label":`Loading`,style:{width:`${e}px`,height:`${e}px`,border:`${t}px solid ${n}33`,borderTopColor:n,borderRadius:`50%`,animation:`tkx-spin-rotate 0.8s linear infinite`,boxSizing:`border-box`}}))}function Aa({spinning:e=!0,size:i=`md`,tip:a,indicator:s,children:c,fullscreen:l=!1,delay:u=0,style:d}){let f=t.f(),p=r.o(),[m,h]=(0,o.useState)(u===0&&e),g=(0,o.useRef)(null);if((0,o.useEffect)(()=>(e&&u>0?g.current=setTimeout(()=>h(!0),u):h(e),()=>{g.current!==null&&clearTimeout(g.current)}),[e,u]),!m)return c?(0,o.createElement)(`div`,{style:d},c):null;let _=Ta[i],v=a?n.m(a):void 0,y=(0,o.createElement)(`div`,{role:`status`,"aria-live":`polite`,"aria-label":v??`Loading`,style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`8px`}},s??(0,o.createElement)(ka,{size:_.dimension,borderWidth:_.borderWidth,color:f.primary,reducedMotion:p}),v&&(0,o.createElement)(`span`,{style:{color:f.primary,fontSize:_.fontSize,marginTop:`4px`}},v));return l?(0,o.createElement)(`div`,{style:{position:`fixed`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`${f.bg}cc`,zIndex:9999,...d}},y):c?(0,o.createElement)(`div`,{style:{position:`relative`,...d}},(0,o.createElement)(`div`,{style:{filter:`blur(1px)`,opacity:.5,pointerEvents:`none`,userSelect:`none`,transition:p?`none`:`opacity 0.2s, filter 0.2s`}},c),(0,o.createElement)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`${f.bg}66`,borderRadius:`4px`}},y)):(0,o.createElement)(`div`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,...d}},y)}function ja({color:e,mutedColor:t}){return(0,o.createElement)(`svg`,{width:120,height:100,viewBox:`0 0 120 100`,fill:`none`,"aria-hidden":`true`},(0,o.createElement)(`path`,{d:`M20 40 L60 20 L100 40 L60 60 Z`,fill:`${t}18`,stroke:t,strokeWidth:1.5,strokeLinejoin:`round`}),(0,o.createElement)(`path`,{d:`M20 40 L20 65 L60 85 L60 60 Z`,fill:`${t}10`,stroke:t,strokeWidth:1.5,strokeLinejoin:`round`}),(0,o.createElement)(`path`,{d:`M100 40 L100 65 L60 85 L60 60 Z`,fill:`${t}0d`,stroke:t,strokeWidth:1.5,strokeLinejoin:`round`}),(0,o.createElement)(`path`,{d:`M20 40 L40 28 L60 40 L40 52 Z`,fill:`${e}15`,stroke:e,strokeWidth:1,strokeLinejoin:`round`,strokeDasharray:`3 2`}),(0,o.createElement)(`path`,{d:`M60 40 L80 28 L100 40 L80 52 Z`,fill:`${e}15`,stroke:e,strokeWidth:1,strokeLinejoin:`round`,strokeDasharray:`3 2`}))}function Ma({mutedColor:e}){return(0,o.createElement)(`svg`,{width:64,height:64,viewBox:`0 0 64 64`,fill:`none`,"aria-hidden":`true`},(0,o.createElement)(`rect`,{x:16,y:8,width:32,height:40,rx:3,fill:`${e}12`,stroke:e,strokeWidth:1.5}),(0,o.createElement)(`line`,{x1:24,y1:20,x2:40,y2:20,stroke:e,strokeWidth:1.5,strokeLinecap:`round`}),(0,o.createElement)(`line`,{x1:24,y1:28,x2:36,y2:28,stroke:e,strokeWidth:1.5,strokeLinecap:`round`}),(0,o.createElement)(`line`,{x1:24,y1:36,x2:32,y2:36,stroke:e,strokeWidth:1.5,strokeLinecap:`round`}),(0,o.createElement)(`circle`,{cx:32,cy:54,r:6,stroke:e,strokeWidth:1.2,fill:`none`}),(0,o.createElement)(`line`,{x1:28,y1:54,x2:36,y2:54,stroke:e,strokeWidth:1.2,strokeLinecap:`round`}))}function Na({image:e=`default`,description:r=`No data`,children:i,style:a}){let s=t.f(),c=typeof r==`string`?n.m(r):r,l;return l=e===`default`?(0,o.createElement)(ja,{color:s.primary,mutedColor:s.textMuted}):e===`simple`?(0,o.createElement)(Ma,{mutedColor:s.textMuted}):e,(0,o.createElement)(`div`,{role:`status`,style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 16px`,textAlign:`center`,...a}},(0,o.createElement)(`div`,{style:{marginBottom:`12px`,opacity:.85}},l),c&&(0,o.createElement)(`div`,{style:{color:s.textMuted,fontSize:`0.875rem`,lineHeight:`1.5`,maxWidth:`320px`}},c),i&&(0,o.createElement)(`div`,{style:{marginTop:`16px`}},i))}function Pa(e,t,n=`,`){if(typeof e==`string`)return e;let[r,i]=(t===void 0?String(e):e.toFixed(t)).split(`.`),a=r.replace(/\B(?=(\d{3})+(?!\d))/g,n);return i===void 0?a:`${a}.${i}`}function Fa(e,t){if(e<=0)return t.replace(/DD?/g,`0`).replace(/HH?/g,`00`).replace(/mm?/g,`00`).replace(/ss?/g,`00`);let n=Math.floor(e/1e3),r=Math.floor(n/86400),i=Math.floor(n%86400/3600),a=Math.floor(n%3600/60),o=n%60,s=e=>String(e).padStart(2,`0`);return t.replace(/DD/g,s(r)).replace(/D/g,String(r)).replace(/HH/g,s(i)).replace(/H/g,String(i)).replace(/mm/g,s(a)).replace(/m/g,String(a)).replace(/ss/g,s(o)).replace(/s/g,String(o))}function Ia({direction:e,color:t}){return(0,o.createElement)(`svg`,{width:16,height:14,viewBox:`0 0 20 14`,fill:`none`,"aria-hidden":`true`,style:{display:`inline-block`,verticalAlign:`middle`}},(0,o.createElement)(`path`,{d:e===`up`?`M6 10 L10 4 L14 10`:`M6 4 L10 10 L14 4`,stroke:t,strokeWidth:2.5,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`}))}var La=!1;function Ra(){if(La||typeof document>`u`)return;La=!0;let e=document.createElement(`style`);e.id=`tkx-statistic-skeleton`,e.textContent=`@keyframes tkx-stat-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}`,document.head.appendChild(e)}function za({w:e,h:t,alt:n,bdr:r,rm:i}){return i||Ra(),(0,o.createElement)(`div`,{"aria-hidden":`true`,style:{width:e,height:t,borderRadius:`4px`,background:i?n:`linear-gradient(90deg, ${n} 25%, ${r} 50%, ${n} 75%)`,backgroundSize:`200% 100%`,animation:i?`none`:`tkx-stat-shimmer 1.5s ease-in-out infinite`}})}function Ba({title:e,value:i,prefix:a,suffix:s,precision:c,groupSeparator:l=`,`,valueStyle:u,loading:d=!1,trend:f,trendValue:p,style:m}){let h=t.f(),g=r.o(),_=n.m(e),v=p?n.m(p):void 0,y=f===`up`?h.success:f===`down`?h.danger:void 0;return(0,o.createElement)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`4px`,...m}},(0,o.createElement)(`div`,{style:{color:h.textMuted,fontSize:`0.875rem`,lineHeight:`1.4`}},_),d?(0,o.createElement)(za,{w:`120px`,h:`32px`,alt:h.surfaceAlt,bdr:h.border,rm:g}):(0,o.createElement)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`4px`,fontSize:`1.75rem`,fontWeight:700,lineHeight:`1.2`,color:h.text,fontVariantNumeric:`tabular-nums`,...u}},a&&(0,o.createElement)(`span`,{style:{fontSize:`0.75em`,fontWeight:400}},a),(0,o.createElement)(`span`,null,Pa(i,c,l)),s&&(0,o.createElement)(`span`,{style:{fontSize:`0.6em`,fontWeight:400,color:h.textMuted}},s)),f&&(0,o.createElement)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,fontSize:`0.8125rem`,color:y,marginTop:`2px`}},(0,o.createElement)(Ia,{direction:f,color:y}),v&&(0,o.createElement)(`span`,null,v)))}function Va({title:e,value:r,format:i=`HH:mm:ss`,onFinish:a,prefix:s,suffix:c,style:l}){let u=t.f(),d=n.m(e),f=(0,o.useRef)(a);f.current=a;let p=(0,o.useRef)(!1),[m,h]=(0,o.useState)(()=>Math.max(0,r-Date.now()));(0,o.useEffect)(()=>{p.current=!1;let e=()=>{let e=Math.max(0,r-Date.now());h(e),e<=0&&!p.current&&(p.current=!0,f.current?.())};e();let t=setInterval(e,1e3);return()=>clearInterval(t)},[r]);let g=Fa(m,i);return(0,o.createElement)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`4px`,...l}},(0,o.createElement)(`div`,{style:{color:u.textMuted,fontSize:`0.875rem`,lineHeight:`1.4`}},d),(0,o.createElement)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`4px`,fontSize:`1.75rem`,fontWeight:700,lineHeight:`1.2`,color:m<=0?u.danger:u.text,fontVariantNumeric:`tabular-nums`}},s&&(0,o.createElement)(`span`,{style:{fontSize:`0.75em`,fontWeight:400}},s),(0,o.createElement)(`span`,null,g),c&&(0,o.createElement)(`span`,{style:{fontSize:`0.6em`,fontWeight:400,color:u.textMuted}},c)))}var Ha={sm:{height:28,fontSize:12,px:10},md:{height:36,fontSize:14,px:16},lg:{height:44,fontSize:16,px:20}};function Ua({options:e,value:i,onChange:a,size:c=`md`,block:l=!1}){let u=t.f(),d=r.o(),f=(0,o.useRef)(null),[p,m]=(0,o.useState)(()=>Math.max(0,e.findIndex(e=>e.value===i))),[h,g]=(0,o.useState)({}),_=Ha[c];(0,o.useEffect)(()=>{let t=e.findIndex(e=>e.value===i);t>=0&&m(t)},[i,e]),(0,o.useEffect)(()=>{let e=f.current;if(!e)return;let t=e.querySelectorAll(`[data-seg-btn]`)[p];t&&g({left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight,transition:d?`none`:`left 0.2s ease, width 0.2s ease`})},[p,e,d]);let v=(0,o.useCallback)(t=>{let n=e[t];!n||n.disabled||(m(t),a?.(n.value))},[e,a]),y=(0,o.useCallback)(t=>{let n=p;if(t.key===`ArrowRight`||t.key===`ArrowDown`)for(t.preventDefault(),n=(p+1)%e.length;e[n]?.disabled&&n!==p;)n=(n+1)%e.length;else if(t.key===`ArrowLeft`||t.key===`ArrowUp`)for(t.preventDefault(),n=(p-1+e.length)%e.length;e[n]?.disabled&&n!==p;)n=(n-1+e.length)%e.length;n!==p&&(v(n),(f.current?.querySelectorAll(`[data-seg-btn]`))?.[n]?.focus())},[p,e,v]);return(0,s.jsxs)(`div`,{ref:f,role:`radiogroup`,"aria-label":`Segmented control`,className:n.a(`relative inline-flex items-center rounded-lg p-1`),style:{backgroundColor:u.surfaceAlt,border:`1px solid ${u.border}`,width:l?`100%`:void 0},onKeyDown:y,children:[(0,s.jsx)(`div`,{"aria-hidden":`true`,className:n.a(`absolute top-1 rounded-md`),style:{...h,backgroundColor:u.surface,boxShadow:`0 1px 3px ${u.border}`,zIndex:0}}),e.map((e,t)=>{let r=t===p,i=n.m(e.label);return(0,s.jsxs)(`button`,{"data-seg-btn":!0,type:`button`,role:`radio`,"aria-checked":r,"aria-disabled":e.disabled||void 0,disabled:e.disabled,tabIndex:r?0:-1,className:n.a(`relative z-10 flex items-center justify-center gap-1 rounded-md border-0 cursor-pointer`,`font-sans whitespace-nowrap select-none`),style:{height:_.height,fontSize:_.fontSize,padding:`0 ${_.px}px`,flex:l?1:void 0,color:r?u.text:u.textMuted,backgroundColor:`transparent`,opacity:e.disabled?.4:1,fontWeight:r?600:400,transition:d?`none`:`color 0.15s ease`},onClick:()=>v(t),children:[e.icon&&(0,s.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),i]},e.value)})]})}function Wa({options:e,value:i=``,onChange:a,trigger:c=`@`,placeholder:l,label:u}){let d=t.f(),f=r.o(),p=(0,o.useRef)(null),m=(0,o.useRef)(null),[h,g]=(0,o.useState)(i),[_,v]=(0,o.useState)(!1),[y,b]=(0,o.useState)(``),[x,S]=(0,o.useState)(0),[C,w]=(0,o.useState)(-1);(0,o.useEffect)(()=>{i!==void 0&&g(i)},[i]);let T=e.filter(e=>e.label.toLowerCase().includes(y.toLowerCase())),E=(0,o.useCallback)(e=>{let t=e.target.value;g(t),a?.(t);let n=e.target.selectionStart??t.length,r=t.slice(0,n),i=r.lastIndexOf(c);if(i>=0){let e=r.slice(i+c.length);if(!/\s/.test(e)){b(e),w(i),v(!0),S(0);return}}v(!1)},[c,a]),D=(0,o.useCallback)(e=>{let t=h.slice(0,C),n=h.slice(C+c.length+y.length),r=`${t}${c}${e.value} ${n}`;g(r),a?.(r),v(!1),p.current?.focus()},[h,C,c,y,a]),O=(0,o.useCallback)(e=>{_&&(e.key===`ArrowDown`?(e.preventDefault(),S(e=>(e+1)%T.length)):e.key===`ArrowUp`?(e.preventDefault(),S(e=>(e-1+T.length)%T.length)):e.key===`Enter`&&T[x]?(e.preventDefault(),D(T[x])):e.key===`Escape`&&v(!1))},[_,T,x,D]);(0,o.useEffect)(()=>{!_||!m.current||m.current.children[x]?.scrollIntoView({block:`nearest`})},[x,_]);let k=u?n.m(u):void 0,A=l?n.m(l):void 0;return(0,s.jsxs)(`div`,{className:n.a(`relative font-sans`),style:{width:`100%`},children:[k&&(0,s.jsx)(`label`,{className:n.a(`block text-sm font-medium mb-1`),style:{color:d.text},children:k}),(0,s.jsx)(`textarea`,{ref:p,role:`combobox`,"aria-expanded":_,"aria-haspopup":`listbox`,"aria-autocomplete":`list`,"aria-label":k??`Mentions input`,value:h,placeholder:A,onChange:E,onKeyDown:O,onBlur:()=>setTimeout(()=>v(!1),200),className:n.a(`w-full rounded-lg border px-3 py-2 text-sm resize-y`),style:{backgroundColor:d.surface,borderColor:d.border,color:d.text,minHeight:80,outline:`none`},rows:3}),_&&T.length>0&&(0,s.jsx)(`ul`,{ref:m,role:`listbox`,"aria-label":`Mention suggestions`,className:n.a(`absolute left-0 right-0 z-50 rounded-lg border overflow-auto`),style:{backgroundColor:d.surface,borderColor:d.border,maxHeight:200,top:`100%`,marginTop:4,listStyle:`none`,padding:0,boxShadow:`0 4px 12px ${d.bg}80`,animation:f?`none`:`tkxFadeIn 0.15s ease`},children:T.map((e,t)=>(0,s.jsxs)(`li`,{role:`option`,"aria-selected":t===x,className:n.a(`flex items-center gap-3 px-3 py-2 cursor-pointer text-sm`),style:{backgroundColor:t===x?d.surfaceAlt:`transparent`,color:d.text},onMouseDown:t=>{t.preventDefault(),D(e)},onMouseEnter:()=>S(t),children:[e.avatar&&(0,s.jsx)(`img`,{src:n.m(e.avatar),alt:``,"aria-hidden":`true`,width:24,height:24,className:n.a(`rounded-full`),style:{objectFit:`cover`}}),(0,s.jsx)(`span`,{children:n.m(e.label)}),(0,s.jsxs)(`span`,{style:{color:d.textMuted,marginLeft:`auto`},children:[c,n.m(e.value)]})]},e.value))})]})}function Ga(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return Math.abs(t)}function Ka(e){let t=e;return()=>(t=t*1664525+1013904223|0,(t>>>0)/4294967295)}var qa={L:.38,M:.42,Q:.48,H:.55};function Ja(e,t,n){let r=Ka(Ga(e)),i=qa[n]??.42,a=Array.from({length:t},()=>Array.from({length:t},()=>!1)),o=(e,t)=>{for(let n=0;n<7;n++)for(let r=0;r<7;r++){let i=n===0||n===6||r===0||r===6,o=n>=2&&n<=4&&r>=2&&r<=4;a[e+n][t+r]=i||o}};o(0,0),o(0,t-7),o(t-7,0);for(let e=7;e<t-7;e++)a[6][e]=e%2==0,a[e][6]=e%2==0;for(let e=0;e<t;e++)for(let n=0;n<t;n++)e<8&&n<8||e<8&&n>=t-8||e>=t-8&&n<8||e===6||n===6||(a[e][n]=r()<i);return a}function Ya({value:e,size:i=160,color:a,bgColor:c,errorLevel:l=`M`,icon:u,bordered:d=!0}){let f=t.f(),p=r.o(),m=(0,o.useRef)(null),h=n.m(e),g=a??f.text,_=c??f.surface,v=(0,o.useMemo)(()=>Ja(h,25,l),[h,l]);return(0,o.useEffect)(()=>{let e=m.current;if(!e)return;let t=e.getContext(`2d`);if(!t)return;let r=window.devicePixelRatio||1;e.width=i*r,e.height=i*r,t.scale(r,r);let a=i/25;t.fillStyle=_,t.fillRect(0,0,i,i),t.fillStyle=g;for(let e=0;e<25;e++)for(let n=0;n<25;n++)v[e][n]&&t.fillRect(n*a,e*a,a,a);if(u){let e=i*.22,r=(i-e)/2;t.fillStyle=_,t.fillRect(r-2,r-2,e+4,e+4);let a=new Image;a.crossOrigin=`anonymous`,a.onload=()=>{t.drawImage(a,r,r,e,e)},a.src=n.m(u)}},[v,i,g,_,u]),(0,s.jsx)(`div`,{role:`img`,"aria-label":`QR code for: ${h}`,className:n.a(`inline-block rounded-lg`),style:{padding:d?12:0,backgroundColor:d?_:`transparent`,border:d?`1px solid ${f.border}`:`none`,lineHeight:0,animation:p?`none`:`tkxFadeIn 0.2s ease`},children:(0,s.jsx)(`canvas`,{ref:m,"aria-hidden":`true`,style:{width:i,height:i,display:`block`}})})}var Xa={success:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M22 37l9 9 19-19`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),error:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M26 26l20 20M46 26L26 46`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`})]}),warning:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`path`,{d:`M36 6L4 64h64L36 6z`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M36 30v16`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`}),(0,s.jsx)(`circle`,{cx:`36`,cy:`54`,r:`2.5`,fill:e})]}),info:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M36 32v18`,stroke:e,strokeWidth:`4`,strokeLinecap:`round`}),(0,s.jsx)(`circle`,{cx:`36`,cy:`22`,r:`2.5`,fill:e})]}),404:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`text`,{x:`36`,y:`44`,textAnchor:`middle`,fontSize:`22`,fontWeight:`bold`,fill:e,children:`404`})]}),403:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`path`,{d:`M28 30h16v16H28z`,stroke:e,strokeWidth:`3`,fill:`none`}),(0,s.jsx)(`path`,{d:`M32 30v-4a4 4 0 018 0v4`,stroke:e,strokeWidth:`3`,fill:`none`})]}),500:e=>(0,s.jsxs)(`svg`,{width:`72`,height:`72`,viewBox:`0 0 72 72`,fill:`none`,"aria-hidden":`true`,children:[(0,s.jsx)(`circle`,{cx:`36`,cy:`36`,r:`34`,stroke:e,strokeWidth:`3`,fill:`${e}18`}),(0,s.jsx)(`text`,{x:`36`,y:`44`,textAnchor:`middle`,fontSize:`22`,fontWeight:`bold`,fill:e,children:`500`})]})};function Za(e,t){switch(e){case`success`:return t.success;case`error`:case`500`:return t.danger;case`warning`:return t.warning;case`info`:return t.info;case`404`:case`403`:return t.textMuted}}function Qa({status:e,title:i,subTitle:a,icon:o,extra:c}){let l=t.f(),u=r.o(),d=Za(e,l),f=n.m(i),p=a?n.m(a):void 0;return(0,s.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:n.a(`flex flex-col items-center text-center px-6 py-12 font-sans`),style:{animation:u?`none`:`tkxFadeIn 0.3s ease`},children:[(0,s.jsx)(`div`,{className:n.a(`mb-6`),children:o??Xa[e](d)}),(0,s.jsx)(`h2`,{className:n.a(`text-xl font-semibold m-0 mb-2`),style:{color:l.text},children:f}),p&&(0,s.jsx)(`p`,{className:n.a(`text-sm m-0 mb-6 max-w-md leading-relaxed`),style:{color:l.textMuted},children:p}),c&&(0,s.jsx)(`div`,{className:n.a(`flex items-center gap-3 mt-4`),children:c})]})}function $a(e){let t=document.querySelector(e);return t?t.getBoundingClientRect():null}function eo(e,t,n,r){switch(t){case`top`:return{top:e.top-r-12+window.scrollY,left:e.left+e.width/2-n/2+window.scrollX};case`bottom`:return{top:e.bottom+12+window.scrollY,left:e.left+e.width/2-n/2+window.scrollX};case`left`:return{top:e.top+e.height/2-r/2+window.scrollY,left:e.left-n-12+window.scrollX};case`right`:return{top:e.top+e.height/2-r/2+window.scrollY,left:e.right+12+window.scrollX};default:return{top:e.bottom+12+window.scrollY,left:e.left+window.scrollX}}}function to({steps:e,isOpen:i=!1,onClose:a,current:l,onChange:u}){let d=t.f(),f=r.o(),[p,m]=(0,o.useState)(0),h=l??p,g=(0,o.useRef)(null),[_,v]=(0,o.useState)({top:0,left:0}),[y,b]=(0,o.useState)(null),x=e[h],S=(0,o.useCallback)(()=>{if(!x)return;let e=$a(x.target);if(b(e),e&&g.current){let t=g.current.offsetWidth,n=g.current.offsetHeight;v(eo(e,x.placement??`bottom`,t,n))}},[x]);(0,o.useEffect)(()=>{if(i)return S(),window.addEventListener(`resize`,S),window.addEventListener(`scroll`,S,!0),()=>{window.removeEventListener(`resize`,S),window.removeEventListener(`scroll`,S,!0)}},[i,h,S]),(0,o.useEffect)(()=>{i&&g.current?.focus()},[i,h]);let C=(0,o.useCallback)(e=>{m(e),u?.(e)},[u]),w=(0,o.useCallback)(()=>{h<e.length-1?C(h+1):a?.()},[h,e.length,C,a]),T=(0,o.useCallback)(()=>{h>0&&C(h-1)},[h,C]);if(!i||!x)return null;let E=n.m(x.title),D=n.m(x.description);return(0,c.createPortal)((0,s.jsxs)(`div`,{"aria-hidden":`true`,children:[(0,s.jsx)(`div`,{style:{position:`fixed`,inset:0,zIndex:9998,backgroundColor:`rgba(0,0,0,0.55)`,clipPath:y?`polygon(0% 0%, 0% 100%, ${y.left-6}px 100%, ${y.left-6}px ${y.top-6}px, ${y.right+6}px ${y.top-6}px, ${y.right+6}px ${y.bottom+6}px, ${y.left-6}px ${y.bottom+6}px, ${y.left-6}px 100%, 100% 100%, 100% 0%)`:void 0,transition:f?`none`:`clip-path 0.25s ease`},onClick:a}),(0,s.jsxs)(`div`,{ref:g,role:`dialog`,"aria-modal":`true`,"aria-label":`Tour step ${h+1} of ${e.length}`,tabIndex:-1,style:{position:`absolute`,zIndex:9999,top:_.top,left:_.left,width:300,backgroundColor:d.surface,border:`1px solid ${d.border}`,borderRadius:10,padding:20,boxShadow:`0 8px 24px ${d.bg}80`,animation:f?`none`:`tkxFadeIn 0.2s ease`,fontFamily:`inherit`},onKeyDown:e=>{e.key===`Escape`&&a?.()},children:[(0,s.jsx)(`h3`,{className:n.a(`m-0 mb-2 text-base font-semibold`),style:{color:d.text},children:E}),(0,s.jsx)(`p`,{className:n.a(`m-0 mb-4 text-sm leading-relaxed`),style:{color:d.textMuted},children:D}),(0,s.jsx)(`div`,{className:n.a(`flex items-center gap-1 mb-4`),"aria-label":`Tour progress`,children:e.map((e,t)=>(0,s.jsx)(`span`,{"aria-hidden":`true`,style:{width:8,height:8,borderRadius:`50%`,backgroundColor:t===h?d.primary:d.border,transition:f?`none`:`background-color 0.2s`}},t))}),(0,s.jsxs)(`div`,{className:n.a(`flex items-center justify-between gap-2`),children:[(0,s.jsx)(`button`,{type:`button`,"aria-label":`Skip tour`,onClick:a,className:n.a(`border-0 bg-transparent cursor-pointer text-sm px-2 py-1`),style:{color:d.textMuted},children:`Skip`}),(0,s.jsxs)(`div`,{className:n.a(`flex gap-2`),children:[h>0&&(0,s.jsx)(`button`,{type:`button`,"aria-label":`Previous step`,onClick:T,className:n.a(`rounded-md border px-3 py-1 text-sm cursor-pointer bg-transparent`),style:{borderColor:d.border,color:d.text},children:`Prev`}),(0,s.jsx)(`button`,{type:`button`,"aria-label":h===e.length-1?`Finish tour`:`Next step`,onClick:w,className:n.a(`rounded-md border-0 px-4 py-1 text-sm cursor-pointer font-medium`),style:{backgroundColor:d.primary,color:`#fff`},children:h===e.length-1?`Finish`:`Next`})]})]})]})]}),document.body)}function no(e,t,n,r,i){let a=document.createElement(`canvas`),o=a.getContext(`2d`);if(!o)return``;let s=r*1.5,c=e.length*s,l=Math.max(...e.map(e=>e.length))*r*.6,u=n[0]+l,d=n[1]+c;return a.width=u*2,a.height=d*2,o.scale(2,2),o.translate(u/2,d/2),o.rotate(t*Math.PI/180),o.font=`${r}px sans-serif`,o.fillStyle=i,o.textAlign=`center`,o.textBaseline=`middle`,e.forEach((t,n)=>{let r=(n-(e.length-1)/2)*s;o.fillText(t,0,r)}),a.toDataURL()}function ro({text:e,children:i,rotate:a=-22,gap:c=[100,100],fontSize:l=14,color:u,zIndex:d=10}){let f=t.f(),p=r.o(),m=(0,o.useRef)(null),[h,g]=(0,o.useState)(``),_=(0,o.useMemo)(()=>(Array.isArray(e)?e:[e]).map(e=>n.m(e)),[e]),v=u??`${f.textMuted}22`,y=(0,o.useCallback)(()=>no(_,a,c,l,v),[_,a,c,l,v]);return(0,o.useEffect)(()=>{let e=y();e&&g(`url(${e})`)},[y]),(0,o.useEffect)(()=>{let e=m.current?.querySelector(`[data-watermark]`);if(!e)return;let t=new MutationObserver(()=>{let t=y();t&&(e.style.backgroundImage=`url(${t})`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>t.disconnect()},[y]),(0,s.jsxs)(`div`,{ref:m,className:n.a(`relative`),style:{overflow:`hidden`},children:[i,(0,s.jsx)(`div`,{"data-watermark":!0,"aria-hidden":`true`,className:n.a(`absolute inset-0 pointer-events-none`),style:{zIndex:d,backgroundImage:h,backgroundRepeat:`repeat`,animation:p?`none`:`tkxFadeIn 0.3s ease`}})]})}function io(e){if(e)try{return e()}catch{return window}return window}function ao(e){if(e instanceof Window)return{top:0,bottom:e.innerHeight};let t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom}}function oo({children:e,offsetTop:i,offsetBottom:a,onChange:c,target:l}){let u=t.f(),d=r.o(),f=(0,o.useRef)(null),p=(0,o.useRef)(null),[m,h]=(0,o.useState)(!1),[g,_]=(0,o.useState)({width:0,height:0}),v=(0,o.useRef)(!1),y=(0,o.useMemo)(()=>n.m(`Sticky content`),[]),b=(0,o.useCallback)(()=>{let e=f.current;if(!e)return;let t=e.getBoundingClientRect(),n=ao(io(l)),r=!1;i===void 0?a!==void 0&&(r=n.bottom-t.bottom<=a):r=t.top-n.top<=i,r!==v.current&&(v.current=r,h(r),_({width:t.width,height:t.height}),c?.(r))},[i,a,c,l]);(0,o.useEffect)(()=>{let e=io(l);return b(),e.addEventListener(`scroll`,b,{passive:!0}),window.addEventListener(`resize`,b),()=>{e.removeEventListener(`scroll`,b),window.removeEventListener(`resize`,b)}},[b,l]);let x=m?{position:`fixed`,zIndex:100,...i===void 0?{}:{top:i},...a===void 0?{}:{bottom:a},width:g.width||void 0,transition:d?`none`:`box-shadow 0.2s ease`,boxShadow:`0 2px 8px ${u.border}`}:{};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`div`,{ref:f,"aria-hidden":m,style:m?{height:g.height,width:g.width}:{}}),(0,s.jsx)(`div`,{ref:p,role:`region`,"aria-label":y,className:n.a(m?`tkx-affixed`:``),style:x,children:e})]})}function so(e){let t=[];for(let n of e)t.push(n),n.children&&t.push(...so(n.children));return t}function co(e){return e.startsWith(`#`)?e.slice(1):e}function lo({item:e,activeKey:t,depth:r,onClick:i,theme:a,reducedMotion:o}){let c=e.key===t,l=n.m(e.title);return(0,s.jsxs)(`li`,{role:`none`,style:{listStyle:`none`},children:[(0,s.jsx)(`a`,{role:`treeitem`,"aria-current":c?`location`:void 0,href:e.href,onClick:t=>{t.preventDefault(),i(e.href)},className:n.a(`block text-sm py-1 no-underline`),style:{paddingLeft:12+r*16,color:c?a.primary:a.textMuted,fontWeight:c?600:400,borderLeft:`2px solid ${c?a.primary:`transparent`}`,transition:o?`none`:`color 0.15s ease, border-color 0.15s ease`},children:l}),e.children&&e.children.length>0&&(0,s.jsx)(`ul`,{role:`group`,style:{margin:0,padding:0},children:e.children.map(e=>(0,s.jsx)(lo,{item:e,activeKey:t,depth:r+1,onClick:i,theme:a,reducedMotion:o},e.key))})]})}function uo({items:e,offsetTop:i=0,getCurrentAnchor:a,onChange:c}){let l=t.f(),u=r.o(),[d,f]=(0,o.useState)(e[0]?.key??``),p=(0,o.useRef)(!1),m=so(e),h=(0,o.useCallback)(()=>{if(p.current)return;let e=m[0]?.key??``;for(let t of m){let n=co(t.href),r=document.getElementById(n);r&&r.getBoundingClientRect().top<=i+10&&(e=t.key)}a&&(e=a(e)),e!==d&&(f(e),c?.(e))},[m,i,a,d,c]);(0,o.useEffect)(()=>(window.addEventListener(`scroll`,h,{passive:!0}),h(),()=>window.removeEventListener(`scroll`,h)),[h]);let g=(0,o.useCallback)(e=>{let t=co(e),n=document.getElementById(t);if(!n)return;p.current=!0;let r=n.getBoundingClientRect().top+window.scrollY-i;window.scrollTo({top:r,behavior:u?`auto`:`smooth`});let a=m.find(t=>t.href===e);a&&(f(a.key),c?.(a.key)),setTimeout(()=>{p.current=!1},800)},[m,i,u,c]);return(0,s.jsx)(`nav`,{role:`tree`,"aria-label":`Anchor navigation`,className:n.a(`font-sans`),style:{borderLeft:`1px solid ${l.border}`,padding:`4px 0`},children:(0,s.jsx)(`ul`,{role:`group`,style:{margin:0,padding:0},children:e.map(e=>(0,s.jsx)(lo,{item:e,activeKey:d,depth:0,onClick:g,theme:l,reducedMotion:u},e.key))})})}function fo(e,t){let n=[e],r=e;for(let e of t){let t=r.find(t=>t.value===e);if(t?.children?.length)n.push(t.children),r=t.children;else break}return n}function po(e,t){let n=[],r=e;for(let e of t){let t=r.find(t=>t.value===e);if(t)n.push(t),r=t.children??[];else break}return n}function mo(e,t){return po(e,t).map(e=>n.m(e.label)).join(` / `)}function ho({options:e,value:i=[],onChange:a,placeholder:l=`Select...`,label:u,multiple:d=!1}){let f=t.f(),p=r.o(),m=(0,o.useRef)(null),h=(0,o.useRef)(null),[g,_]=(0,o.useState)(!1),[v,y]=(0,o.useState)(i),[b,x]=(0,o.useState)({top:0,left:0,width:0}),S=u?n.m(u):void 0,C=n.m(l),w=i.length>0?mo(e,i):``;(0,o.useEffect)(()=>{if(!g||!m.current)return;let e=m.current.getBoundingClientRect();x({top:e.bottom+4+window.scrollY,left:e.left+window.scrollX,width:Math.max(e.width,200)})},[g]),(0,o.useEffect)(()=>{if(!g)return;let e=e=>{!m.current?.contains(e.target)&&!h.current?.contains(e.target)&&_(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[g]);let T=(0,o.useCallback)((t,n)=>{if(n.disabled)return;let r=[...v.slice(0,t),n.value];if(y(r),!n.children?.length){let t=po(e,r);a?.(r,t),d||_(!1)}},[v,e,a,d]),E=(0,o.useCallback)(e=>{e.key===`Escape`?(_(!1),m.current?.focus()):(e.key===`Enter`||e.key===` `)&&(g||(e.preventDefault(),_(!0)))},[g]),D=fo(e,v),O=g?(0,c.createPortal)((0,s.jsx)(`div`,{ref:h,role:`tree`,"aria-label":S??`Cascader options`,className:n.a(`flex rounded-lg border overflow-hidden`),style:{position:`absolute`,zIndex:9999,top:b.top,left:b.left,backgroundColor:f.surface,borderColor:f.border,boxShadow:`0 4px 16px ${f.bg}80`,animation:p?`none`:`tkxFadeIn 0.15s ease`},children:D.map((e,t)=>(0,s.jsx)(`ul`,{role:`group`,className:n.a(`m-0 p-0 overflow-auto`),style:{listStyle:`none`,minWidth:160,maxHeight:260,borderRight:t<D.length-1?`1px solid ${f.border}`:`none`},children:e.map(e=>{let r=v[t]===e.value,i=n.m(e.label);return(0,s.jsxs)(`li`,{role:`treeitem`,"aria-selected":r,"aria-disabled":e.disabled||void 0,"aria-expanded":e.children?.length?r:void 0,className:n.a(`flex items-center justify-between px-3 py-2 cursor-pointer text-sm`),style:{backgroundColor:r?f.surfaceAlt:`transparent`,color:e.disabled?f.textMuted:f.text,opacity:e.disabled?.5:1,cursor:e.disabled?`not-allowed`:`pointer`},onClick:()=>T(t,e),onMouseEnter:()=>{e.disabled||y(n=>[...n.slice(0,t),e.value])},children:[(0,s.jsx)(`span`,{children:i}),e.children&&e.children.length>0&&(0,s.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,style:{color:f.textMuted,flexShrink:0},children:(0,s.jsx)(`path`,{d:`M10 6l6 6-6 6V6z`})})]},e.value)})},t))}),document.body):null;return(0,s.jsxs)(`div`,{className:n.a(`relative font-sans`),onKeyDown:E,children:[S&&(0,s.jsx)(`label`,{className:n.a(`block text-sm font-medium mb-1`),style:{color:f.text},children:S}),(0,s.jsxs)(`button`,{ref:m,type:`button`,role:`combobox`,"aria-expanded":g,"aria-haspopup":`tree`,"aria-label":S??`Cascader`,className:n.a(`w-full flex items-center justify-between rounded-lg border px-3 py-2 text-sm cursor-pointer`),style:{backgroundColor:f.surface,borderColor:g?f.primary:f.border,color:w?f.text:f.textMuted,outline:`none`,minHeight:38,textAlign:`left`},onClick:()=>_(e=>!e),children:[(0,s.jsx)(`span`,{className:n.a(`truncate`),children:w||C}),(0,s.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,style:{color:f.textMuted,transform:g?`rotate(180deg)`:`rotate(0deg)`,transition:p?`none`:`transform 0.2s ease`,flexShrink:0},children:(0,s.jsx)(`path`,{d:`M7 10l5 5 5-5H7z`})})]}),O]})}var go={sm:`8px 12px`,md:`12px 16px`,lg:`16px 20px`};function _o({theme:e,reducedMotion:t}){return(0,s.jsxs)(`div`,{className:n.a(`flex items-center gap-3 px-4 py-3`),"aria-hidden":`true`,children:[(0,s.jsx)(`div`,{style:{width:40,height:40,borderRadius:`50%`,backgroundColor:e.surfaceAlt,animation:t?`none`:`tkxPulse 1.5s ease infinite`}}),(0,s.jsxs)(`div`,{className:n.a(`flex-1`),children:[(0,s.jsx)(`div`,{style:{width:`60%`,height:14,borderRadius:4,backgroundColor:e.surfaceAlt,marginBottom:8,animation:t?`none`:`tkxPulse 1.5s ease infinite`}}),(0,s.jsx)(`div`,{style:{width:`40%`,height:12,borderRadius:4,backgroundColor:e.surfaceAlt,animation:t?`none`:`tkxPulse 1.5s ease infinite`}})]})]})}function vo({items:e,header:i,footer:a,bordered:o=!0,size:c=`md`,loading:l=!1,emptyText:u=`No data`,grid:d}){let f=t.f(),p=r.o(),m=n.m(u),h=go[c],g=!!d,_=d?.column??1,v=d?.gutter??16;return(0,s.jsxs)(`div`,{role:`list`,"aria-label":`List`,"aria-busy":l,className:n.a(`font-sans rounded-lg overflow-hidden`),style:{border:o?`1px solid ${f.border}`:`none`,backgroundColor:f.surface},children:[i&&(0,s.jsx)(`div`,{className:n.a(`font-semibold text-sm`),style:{padding:h,color:f.text,borderBottom:`1px solid ${f.border}`,backgroundColor:f.surfaceAlt},children:i}),l&&(0,s.jsx)(`div`,{children:Array.from({length:3}).map((e,t)=>(0,s.jsx)(_o,{theme:f,reducedMotion:p},t))}),!l&&e.length===0&&(0,s.jsx)(`div`,{role:`status`,className:n.a(`text-center py-12 text-sm`),style:{color:f.textMuted},children:m}),!l&&e.length>0&&(0,s.jsx)(`div`,{style:g?{display:`grid`,gridTemplateColumns:`repeat(${_}, 1fr)`,gap:v,padding:v}:void 0,children:e.map((t,r)=>{let i=n.m(t.title),a=t.description?n.m(t.description):void 0;return(0,s.jsxs)(`div`,{role:`listitem`,className:n.a(`flex items-start gap-3`),style:{padding:h,borderBottom:!g&&r<e.length-1?`1px solid ${f.border}`:`none`,...g?{border:`1px solid ${f.border}`,borderRadius:8,backgroundColor:f.surface}:{},animation:p?`none`:`tkxFadeIn 0.2s ease ${r*.03}s both`},children:[t.avatar&&(0,s.jsx)(`div`,{"aria-hidden":`true`,className:n.a(`shrink-0`),children:t.avatar}),(0,s.jsxs)(`div`,{className:n.a(`flex-1 min-w-0`),children:[(0,s.jsx)(`div`,{className:n.a(`text-sm font-medium`),style:{color:f.text},children:i}),a&&(0,s.jsx)(`div`,{className:n.a(`text-xs mt-1 leading-relaxed`),style:{color:f.textMuted},children:a})]}),t.extra&&(0,s.jsx)(`div`,{className:n.a(`shrink-0 ml-auto`),style:{color:f.textMuted},children:t.extra}),t.actions&&(0,s.jsx)(`div`,{className:n.a(`shrink-0 flex items-center gap-2`),children:t.actions})]},t.key)})}),a&&(0,s.jsx)(`div`,{className:n.a(`text-sm`),style:{padding:h,color:f.textMuted,borderTop:`1px solid ${f.border}`,backgroundColor:f.surfaceAlt},children:a})]})}function yo({locale:e=`en-US`,direction:t,strings:n,children:r}){let i=(0,o.useMemo)(()=>{let r=a.LOCALES[e]??a.enUS,i=n?{...r,...n}:r;return{locale:e,direction:t??(a.isRTL(e)?`rtl`:`ltr`),strings:i}},[e,t,n]);return(0,s.jsx)(a.I18nContext.Provider,{value:i,children:(0,s.jsx)(`div`,{dir:i.direction,style:{direction:i.direction,display:`contents`},children:r})})}function bo({contentId:e=`tkx-main-content`,label:t=`Skip to main content`}){return(0,s.jsx)(`a`,{href:`#${e}`,className:`tkx-skip-nav`,children:t})}function xo({politeness:e=`polite`,children:t,atomic:n=!0}){return(0,s.jsx)(`div`,{role:`status`,"aria-live":e,"aria-atomic":n,className:`tkx-sr-only`,children:t})}function So({active:e,children:t,as:n=`div`}){return(0,s.jsx)(n,{ref:r.i(e),children:t})}function Co({as:e,children:t,...n}){return(0,s.jsx)(e??`span`,{className:`tkx-sr-only`,...n,children:t})}function wo(e,t,n,r){let i=e.getBoundingClientRect(),a=t?t.offsetHeight:320,o=t?t.offsetWidth:200,s=window.innerWidth,c=window.innerHeight,l=window.scrollX,u=window.scrollY,d=0,f=0;switch(n){case`bottom-start`:d=i.bottom+u+r,f=i.left+l;break;case`bottom-end`:d=i.bottom+u+r,f=i.right+l-o;break;case`top-start`:d=i.top+u-r-a,f=i.left+l;break;case`top-end`:d=i.top+u-r-a,f=i.right+l-o;break;case`right`:d=i.top+u,f=i.right+l+r;break;case`left`:d=i.top+u,f=i.left+l-r-o;break;default:d=i.bottom+u+r,f=i.left+l}return n.startsWith(`bottom`)&&i.bottom+a>c&&(d=i.top+u-r-a),n.startsWith(`top`)&&i.top-a<0&&(d=i.bottom+u+r),f+o>s+l&&(f=s+l-o-8),f<l&&(f=l+8),{top:d,left:f,minWidth:i.width}}function To(e,t){if(!t)return e;let n=e.toLowerCase().indexOf(t.toLowerCase());return n===-1?e:(0,s.jsxs)(s.Fragment,{children:[e.slice(0,n),(0,s.jsx)(`mark`,{style:{background:`rgba(0,245,212,0.3)`,color:`inherit`,borderRadius:2},children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}function Eo(e,t){let n=[];for(let r of e)for(let e of r.items)e.disabled||(!t||e.label.toLowerCase().includes(t.toLowerCase()))&&n.push(e);return n}function Do({groups:e,position:r,maxHeight:i,minWidth:a,selectedKeys:c,multiSelect:l,searchable:u,searchPlaceholder:d,onSelect:f,onClose:p,renderItem:m,menuRef:h,isPortal:g,menuId:_}){let v=t.f(),[y,b]=(0,o.useState)(``),[x,S]=(0,o.useState)(0),[C,w]=(0,o.useState)(null),[T,E]=(0,o.useState)(0),D=(0,o.useRef)(null),O=(0,o.useRef)([]),k=(0,o.useRef)([]),A=y?e.map(e=>({...e,items:e.items.filter(e=>e.label.toLowerCase().includes(y.toLowerCase())||e.description?.toLowerCase().includes(y.toLowerCase())||e.children?.some(e=>e.label.toLowerCase().includes(y.toLowerCase())))})).filter(e=>e.items.length>0):e,j=Eo(A,y);(0,o.useEffect)(()=>{u&&D.current?D.current.focus():O.current[0]?.focus(),S(0)},[u]),(0,o.useEffect)(()=>{(!u||y!==``)&&O.current[x]?.focus()},[x,u,y]);let M=(0,o.useCallback)(e=>{switch(e.key){case`ArrowDown`:if(e.preventDefault(),C){let e=(j.find(e=>e.key===C)?.children??[]).filter(e=>!e.disabled);E(t=>Math.min(t+1,e.length-1))}else S(e=>Math.min(e+1,j.length-1));break;case`ArrowUp`:e.preventDefault(),C?E(e=>Math.max(e-1,0)):S(e=>Math.max(e-1,0));break;case`ArrowRight`:{e.preventDefault();let t=j[x];t?.children?.length&&(w(t.key),E(0));break}case`ArrowLeft`:e.preventDefault(),w(null);break;case`Enter`:case` `:if(e.preventDefault(),C){let e=(j.find(e=>e.key===C)?.children??[]).filter(e=>!e.disabled)[T];e&&f(e.key,e)}else{let e=j[x];e&&f(e.key,e)}break;case`Escape`:e.preventDefault(),C?w(null):p();break;case`Tab`:p();break;default:break}},[j,x,p,f,C,T]);(0,o.useEffect)(()=>{C&&k.current[T]?.focus()},[T,C]);let N={position:g?`fixed`:`absolute`,top:g?r.top:void 0,left:g?r.left:void 0,minWidth:Math.max(a,r.minWidth),maxHeight:i,overflowY:`auto`,background:v.surface,border:`1px solid ${v.border}`,borderRadius:8,boxShadow:`0 8px 32px rgba(0,0,0,0.4)`,zIndex:9999,outline:`none`,transformOrigin:`top left`,animation:`tkx-dropdown-in 150ms ease forwards`},P=0;return(0,s.jsxs)(`div`,{ref:h,id:_,role:`menu`,"aria-label":`Dropdown menu`,tabIndex:-1,style:N,onKeyDown:M,children:[(0,s.jsx)(`style`,{children:`
|
|
120
125
|
@keyframes tkx-dropdown-in {
|
|
121
126
|
from { opacity: 0; transform: scale(0.95); }
|
|
122
127
|
to { opacity: 1; transform: scale(1); }
|
|
123
128
|
}
|
|
124
|
-
`}),u&&(0,s.jsx)(`div`,{style:{padding:`8px 8px 4px`},children:(0,s.jsx)(`input`,{ref:D,type:`text`,value:y,onChange:e=>{b(e.target.value),S(0)},placeholder:d,"aria-label":`Search items`,style:{width:`100%`,boxSizing:`border-box`,padding:`6px 10px`,background:v.surfaceAlt,border:`1px solid ${v.border}`,borderRadius:6,color:v.text,fontSize:13,outline:`none`}})}),A.length===0&&(0,s.jsx)(`div`,{style:{padding:`12px 16px`,color:v.textMuted,fontSize:13,textAlign:`center`},children:`No results found`}),A.map((e,t)=>(0,s.jsxs)(`div`,{role:`group`,"aria-label":e.label,children:[e.label&&(0,s.jsx)(`div`,{style:{padding:`8px 12px 4px`,fontSize:11,fontWeight:600,letterSpacing:`0.06em`,textTransform:`uppercase`,color:v.textMuted},children:n.m(e.label)}),e.items.map(e=>{let t=P;e.disabled||P++;let n=c.includes(e.key),r=t===x&&!e.disabled,i=!!e.children?.length,a=C===e.key,o=m?m(e,n):(0,s.jsx)(
|
|
129
|
+
`}),u&&(0,s.jsx)(`div`,{style:{padding:`8px 8px 4px`},children:(0,s.jsx)(`input`,{ref:D,type:`text`,value:y,onChange:e=>{b(e.target.value),S(0)},placeholder:d,"aria-label":`Search items`,style:{width:`100%`,boxSizing:`border-box`,padding:`6px 10px`,background:v.surfaceAlt,border:`1px solid ${v.border}`,borderRadius:6,color:v.text,fontSize:13,outline:`none`}})}),A.length===0&&(0,s.jsx)(`div`,{style:{padding:`12px 16px`,color:v.textMuted,fontSize:13,textAlign:`center`},children:`No results found`}),A.map((e,t)=>(0,s.jsxs)(`div`,{role:`group`,"aria-label":e.label,children:[e.label&&(0,s.jsx)(`div`,{style:{padding:`8px 12px 4px`,fontSize:11,fontWeight:600,letterSpacing:`0.06em`,textTransform:`uppercase`,color:v.textMuted},children:n.m(e.label)}),e.items.map(e=>{let t=P;e.disabled||P++;let n=c.includes(e.key),r=t===x&&!e.disabled,i=!!e.children?.length,a=C===e.key,o=m?m(e,n):(0,s.jsx)(Oo,{item:e,isSelected:n,isFocused:r,multiSelect:l,query:y,theme:v,hasSubmenu:i});return(0,s.jsxs)(`div`,{children:[e.divider&&(0,s.jsx)(`div`,{role:`separator`,style:{height:1,background:v.border,margin:`4px 0`}}),(0,s.jsxs)(`div`,{ref:e=>{O.current[t]=e},role:`menuitem`,"aria-disabled":e.disabled,"aria-checked":l?n:void 0,"aria-selected":l?void 0:n,"aria-haspopup":i?`menu`:void 0,"aria-expanded":i?a:void 0,tabIndex:e.disabled?-1:0,style:{position:`relative`,cursor:e.disabled?`not-allowed`:`pointer`,opacity:e.disabled?.5:1},onClick:()=>{e.disabled||(i?(w(a?null:e.key),E(0)):f(e.key,e))},onMouseEnter:()=>{e.disabled||(S(t),i?(w(e.key),E(0)):w(null))},onFocus:()=>{e.disabled||S(t)},children:[o,i&&a&&(0,s.jsx)(`div`,{role:`menu`,style:{position:`absolute`,top:0,left:`100%`,minWidth:180,background:v.surface,border:`1px solid ${v.border}`,borderRadius:8,boxShadow:`0 8px 32px rgba(0,0,0,0.4)`,zIndex:1e4,animation:`tkx-dropdown-in 120ms ease forwards`},children:e.children.map((e,t)=>{let n=c.includes(e.key),r=t===T;return(0,s.jsx)(`div`,{ref:e=>{k.current[t]=e},role:`menuitem`,"aria-disabled":e.disabled,"aria-selected":n,tabIndex:e.disabled?-1:0,style:{cursor:e.disabled?`not-allowed`:`pointer`,opacity:e.disabled?.5:1},onClick:t=>{t.stopPropagation(),e.disabled||f(e.key,e)},onMouseEnter:()=>E(t),children:(0,s.jsx)(Oo,{item:e,isSelected:n,isFocused:r,multiSelect:l,query:y,theme:v,hasSubmenu:!1})},e.key)})})]})]},e.key)})]},t))]})}function Oo({item:e,isSelected:t,isFocused:n,multiSelect:r,query:i,theme:a,hasSubmenu:o}){return(0,s.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,padding:`8px 12px`,background:n?e.danger?`${a.danger}20`:`${a.primary}18`:`transparent`,transition:`background 80ms`,color:e.danger?a.danger:a.text,fontSize:14,userSelect:`none`},children:[r&&(0,s.jsx)(`div`,{style:{width:16,height:16,border:`2px solid ${t?a.primary:a.border}`,borderRadius:4,background:t?a.primary:`transparent`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transition:`all 120ms`},children:t&&(0,s.jsx)(`svg`,{width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,children:(0,s.jsx)(`path`,{d:`M1 4l3 3L9 1`,stroke:a.bg,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),e.icon&&(0,s.jsx)(`span`,{style:{display:`flex`,alignItems:`center`,flexShrink:0,color:e.danger?a.danger:a.textMuted},children:e.icon}),(0,s.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,s.jsx)(`div`,{style:{fontWeight:t&&!r?600:400},children:To(e.label,i)}),e.description&&(0,s.jsx)(`div`,{style:{fontSize:12,color:a.textMuted,marginTop:1},children:To(e.description,i)})]}),e.badge!==void 0&&(0,s.jsx)(`span`,{style:{background:a.primary,color:a.bg,fontSize:11,fontWeight:700,borderRadius:10,padding:`1px 7px`,flexShrink:0},children:e.badge}),e.shortcut&&!o&&(0,s.jsx)(`span`,{style:{fontSize:12,color:a.textMuted,flexShrink:0},children:e.shortcut}),o&&(0,s.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,style:{flexShrink:0},children:(0,s.jsx)(`path`,{d:`M4 2l4 4-4 4`,stroke:a.textMuted,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),!r&&t&&(0,s.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,style:{flexShrink:0},children:(0,s.jsx)(`path`,{d:`M2 7l4 4L12 3`,stroke:a.primary,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})}function ko({trigger:e,items:t,groups:n,placement:r=`bottom-start`,onSelect:i,selectedKeys:a,multiSelect:l=!1,searchable:u=!1,searchPlaceholder:d=`Search…`,closeOnSelect:f,disabled:p=!1,maxHeight:m=320,minWidth:h=200,open:g,onOpenChange:_,portal:v=!0,offset:y=6,renderItem:b}){let[x,S]=(0,o.useState)(!1),[C,w]=(0,o.useState)([]),[T,E]=(0,o.useState)({top:0,left:0,minWidth:h}),D=(0,o.useRef)(null),O=(0,o.useRef)(null),k=(0,o.useId)(),A=g===void 0?x:g,j=a===void 0?C:a,M=f===void 0?!l:f,N=n??(t?[{items:t}]:[{items:[]}]),P=(0,o.useCallback)(e=>{g===void 0&&S(e),_?.(e)},[g,_]),F=(0,o.useCallback)((e,t)=>{l&&a===void 0&&w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),i?.(e,t),M&&P(!1)},[l,a,i,M,P]),I=(0,o.useCallback)(()=>P(!1),[P]);(0,o.useEffect)(()=>{A&&D.current&&E(wo(D.current,O.current,r,y))},[A,r,y]),(0,o.useEffect)(()=>{A&&D.current&&O.current&&E(wo(D.current,O.current,r,y))},[A,r,y]),(0,o.useEffect)(()=>{if(!A)return;let e=e=>{let t=e.target;D.current&&!D.current.contains(t)&&O.current&&!O.current.contains(t)&&P(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[A,P]);let L=()=>{p||P(!A)},R=A?(0,s.jsx)(Do,{groups:N,position:T,maxHeight:m,minWidth:h,selectedKeys:j,multiSelect:l,searchable:u,searchPlaceholder:d,onSelect:F,onClose:I,renderItem:b,menuRef:O,isPortal:v,menuId:k}):null;return(0,s.jsxs)(`div`,{style:{display:`inline-block`,position:`relative`},children:[(0,s.jsx)(`div`,{ref:D,onClick:L,"aria-haspopup":`menu`,"aria-expanded":A,"aria-controls":A?k:void 0,"aria-disabled":p,style:{cursor:p?`not-allowed`:`pointer`,opacity:p?.5:1,display:`inline-block`},children:e}),v&&typeof document<`u`?(0,c.createPortal)(R,document.body):R]})}var Ao={sm:4,md:8,lg:12};function jo(e,t){return e>=80?`#10b981`:e>=55?t:e>=30?`#f59e0b`:`#ef4444`}function Mo({value:e,label:r,showLabel:i=!0,size:a=`md`,animate:c=!0,className:l,style:u}){let d=t.f(),f=(0,o.useRef)(null),p=Math.max(0,Math.min(100,e)),m=jo(p,d.primary),h=Ao[a];(0,o.useEffect)(()=>{if(!c||!f.current)return;let e=f.current;e.style.width=`0%`;let t=requestAnimationFrame(()=>{e.style.transition=`width 0.9s cubic-bezier(0.4, 0, 0.2, 1)`,e.style.width=`${p}%`});return()=>cancelAnimationFrame(t)},[p,c]);let g=typeof p==`number`?`${p.toFixed(0)}% AI confidence${r?` for ${r}`:``}`:r;return(0,s.jsxs)(`div`,{className:n.t(n.a(`flex flex-col gap-1`),l),style:u,role:`meter`,"aria-valuenow":p,"aria-valuemin":0,"aria-valuemax":100,"aria-label":g,children:[(r||i)&&(0,s.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:4},children:[r&&(0,s.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:d.textMuted},children:r}),i&&(0,s.jsxs)(`span`,{style:{fontSize:12,fontWeight:700,color:m,marginLeft:`auto`},children:[p.toFixed(0),`%`]})]}),(0,s.jsxs)(`div`,{style:{height:h,borderRadius:h,background:`${d.border}`,overflow:`hidden`,position:`relative`},children:[(0,s.jsx)(`div`,{style:{position:`absolute`,inset:0,background:`linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%)`,backgroundSize:`200% 100%`,animation:`tkx-ai-shimmer 2s linear infinite`,pointerEvents:`none`,zIndex:1}}),(0,s.jsx)(`div`,{ref:f,style:{height:`100%`,width:c?`0%`:`${p}%`,background:`linear-gradient(90deg, ${m}cc, ${m})`,borderRadius:h,boxShadow:`0 0 8px ${m}66`,transition:c?void 0:`width 0.3s ease`}})]}),(0,s.jsxs)(`div`,{style:{fontSize:10,color:d.textMuted,marginTop:2,display:`flex`,gap:4,alignItems:`center`},children:[(0,s.jsx)(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:m,display:`inline-block`,flexShrink:0}}),p>=80?`High confidence`:p>=55?`Moderate confidence`:p>=30?`Low confidence`:`Very low — review manually`]}),(0,s.jsx)(`style`,{children:`
|
|
125
130
|
@keyframes tkx-ai-shimmer {
|
|
126
131
|
0% { background-position: -200% 0; }
|
|
127
132
|
100% { background-position: 200% 0; }
|
|
128
133
|
}
|
|
129
|
-
`})]})}function
|
|
134
|
+
`})]})}function No(e,t){return e>=80?`#10b981`:e>=55?t:e>=30?`#f59e0b`:`#ef4444`}function Po({src:e,name:n,size:r=32}){let i=t.f(),a=n?n.split(` `).map(e=>e[0]).join(``).slice(0,2).toUpperCase():`?`;return e?(0,s.jsx)(`img`,{src:e,alt:n??`avatar`,width:r,height:r,style:{borderRadius:`50%`,objectFit:`cover`,flexShrink:0}}):(0,s.jsx)(`div`,{style:{width:r,height:r,borderRadius:`50%`,flexShrink:0,background:`${i.primary}22`,border:`1px solid ${i.primary}44`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:r*.35,fontWeight:700,color:i.primary},children:a})}function Fo({role:e,content:r,avatar:i,name:a,timestamp:c,streaming:l=!1,confidence:u,copyable:d=!1,className:f,style:p}){let m=t.f(),h=e===`user`,g=e===`system`,_=typeof r==`string`?n.m(r):``,[v,y]=(0,o.useState)(l?``:_),[b,x]=(0,o.useState)(!1),[S,C]=(0,o.useState)(l?``:_),w=(0,o.useRef)(0),T=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!l||typeof r!=`string`){C(_);return}w.current=0,y(``),C(``);let e=setInterval(()=>{w.current++;let t=_.slice(0,w.current);y(t),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>C(t),350),w.current>=_.length&&(clearInterval(e),T.current&&clearTimeout(T.current),C(_))},18);return()=>{clearInterval(e),T.current&&clearTimeout(T.current)}},[_,l,r]);let E=()=>{navigator.clipboard?.writeText(_),x(!0),setTimeout(()=>x(!1),2e3)};if(g)return(0,s.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`8px 0`},children:(0,s.jsx)(`div`,{style:{padding:`6px 16px`,borderRadius:999,fontSize:12,background:`${m.border}`,color:m.textMuted,fontStyle:`italic`},children:typeof r==`string`?n.m(r):r})});let D={maxWidth:`75%`,padding:`12px 16px`,borderRadius:h?`18px 18px 4px 18px`:`18px 18px 18px 4px`,background:h?`linear-gradient(135deg, ${m.primary}, ${m.primary}cc)`:`${m.surface}`,border:h?`none`:`1px solid ${m.border}`,color:h?`#fff`:m.text,fontSize:14,lineHeight:1.65,boxShadow:h?`0 4px 16px -4px ${m.primary}55`:`0 2px 8px -2px rgba(0,0,0,0.2)`,position:`relative`,wordBreak:`break-word`};return(0,s.jsxs)(`div`,{className:n.t(n.a(`flex gap-2`),f),style:{flexDirection:h?`row-reverse`:`row`,alignItems:`flex-end`,...p},children:[(0,s.jsx)(Po,{src:i,name:a??(h?`You`:`AI`)}),(0,s.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4,alignItems:h?`flex-end`:`flex-start`},children:[(a||c)&&(0,s.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,paddingInline:4},children:[a&&(0,s.jsx)(`span`,{style:{fontSize:11,fontWeight:700,color:m.textMuted},children:a}),c&&(0,s.jsx)(`span`,{style:{fontSize:10,color:m.textMuted},children:c})]}),(0,s.jsxs)(`div`,{style:D,role:`article`,"aria-label":h?`Your message`:`Assistant message`,children:[typeof r==`string`?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{"aria-hidden":l?`true`:void 0,children:l?v:n.m(r)}),l&&v.length<_.length&&(0,s.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-block`,width:2,height:14,background:h?`#fff`:m.primary,marginLeft:2,animation:`tkx-blink 1s step-end infinite`,verticalAlign:`text-bottom`}}),l&&(0,s.jsx)(`span`,{"aria-live":`polite`,"aria-atomic":`false`,style:{position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0,0,0,0)`,whiteSpace:`nowrap`,border:0},children:S})]}):r,d&&!h&&(0,s.jsx)(`button`,{onClick:E,title:`Copy message`,style:{position:`absolute`,top:8,right:8,background:`none`,border:`none`,cursor:`pointer`,fontSize:13,color:b?`#10b981`:m.textMuted,padding:`2px 4px`,borderRadius:4,transition:`color 0.2s`},children:b?`✓`:`⎘`})]}),!h&&u!==void 0&&(0,s.jsx)(`div`,{style:{paddingInline:4,width:`100%`,maxWidth:240},children:(0,s.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,s.jsx)(`div`,{style:{flex:1,height:3,borderRadius:3,background:m.border,overflow:`hidden`},children:(0,s.jsx)(`div`,{style:{height:`100%`,width:`${u}%`,background:No(u,m.primary),borderRadius:3,transition:`width 0.8s ease`}})}),(0,s.jsxs)(`span`,{style:{fontSize:10,color:m.textMuted,whiteSpace:`nowrap`},children:[u,`% confident`]})]})})]}),(0,s.jsx)(`style`,{children:`
|
|
130
135
|
@keyframes tkx-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
|
|
131
|
-
`})]})}function
|
|
136
|
+
`})]})}function Io({color:e}){return(0,s.jsx)(`div`,{style:{display:`flex`,gap:4,alignItems:`center`},children:[0,1,2].map(t=>(0,s.jsx)(`div`,{style:{width:7,height:7,borderRadius:`50%`,background:e,animation:`tkx-thinking-dot 1.2s ease-in-out ${t*.18}s infinite`}},t))})}function Lo({color:e}){return(0,s.jsxs)(`div`,{style:{position:`relative`,width:24,height:24},children:[(0,s.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,background:e,opacity:.15,animation:`tkx-thinking-pulse 1.5s ease-out infinite`}}),(0,s.jsx)(`div`,{style:{position:`absolute`,inset:4,borderRadius:`50%`,background:e,opacity:.6,animation:`tkx-thinking-pulse 1.5s ease-out 0.3s infinite`}}),(0,s.jsx)(`div`,{style:{position:`absolute`,inset:8,borderRadius:`50%`,background:e}})]})}function Ro({color:e}){return(0,s.jsx)(`div`,{style:{display:`flex`,gap:3,alignItems:`center`,height:20},children:[0,1,2,3,4].map(t=>(0,s.jsx)(`div`,{style:{width:3,borderRadius:3,background:e,animation:`tkx-thinking-wave 1s ease-in-out ${t*.1}s infinite`}},t))})}function zo({color:e}){return(0,s.jsxs)(`div`,{style:{position:`relative`,width:28,height:28},children:[(0,s.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,border:`2px solid ${e}33`}}),(0,s.jsx)(`div`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,border:`2px solid transparent`,borderTopColor:e,animation:`tkx-thinking-orbit 0.8s linear infinite`}}),(0,s.jsx)(`div`,{style:{position:`absolute`,inset:`38%`,borderRadius:`50%`,background:e,opacity:.8}})]})}var Bo={sm:12,md:14,lg:16};function Vo({label:e=`Thinking…`,steps:r,size:i=`md`,variant:a=`dots`,active:c=!0,className:l,style:u}){let d=t.f(),[f,p]=(0,o.useState)(0);(0,o.useEffect)(()=>{if(!r?.length||!c)return;let e=setInterval(()=>{p(e=>(e+1)%r.length)},1800);return()=>clearInterval(e)},[r,c]);let m=d.primary,h=Bo[i],g={dots:(0,s.jsx)(Io,{color:m}),pulse:(0,s.jsx)(Lo,{color:m}),wave:(0,s.jsx)(Ro,{color:m}),orbit:(0,s.jsx)(zo,{color:m})}[a];return(0,s.jsxs)(`div`,{className:n.t(n.a(`inline-flex flex-col gap-2`),l),style:u,role:`status`,"aria-live":`polite`,"aria-label":c?e:`Done thinking`,children:[(0,s.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,s.jsx)(`div`,{style:{opacity:c?1:.35,transition:`opacity 0.3s`},children:c?g:(0,s.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,background:`#10b981`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,s.jsx)(`span`,{style:{color:`#fff`,fontSize:11,fontWeight:900},children:`✓`})})}),(0,s.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,s.jsx)(`span`,{style:{fontSize:h,fontWeight:600,color:c?d.text:d.textMuted,transition:`color 0.3s`},children:c?r?r[f]:e:`Done`}),c&&(0,s.jsx)(`span`,{style:{fontSize:h-2,color:d.textMuted},children:`⚛ Quantum AI · Amplitude Amplification`})]})]}),r&&r.length>1&&(0,s.jsx)(`div`,{style:{display:`flex`,gap:4,paddingLeft:2},children:r.map((e,t)=>(0,s.jsx)(`div`,{style:{width:t===f?16:6,height:4,borderRadius:4,background:t===f?m:`${m}44`,transition:`all 0.3s ease`}},t))}),(0,s.jsx)(`style`,{children:`
|
|
132
137
|
@keyframes tkx-thinking-dot {
|
|
133
138
|
0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
|
|
134
139
|
40% { transform: scale(1); opacity: 1; }
|
|
@@ -144,4 +149,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
144
149
|
@keyframes tkx-thinking-orbit {
|
|
145
150
|
to { transform: rotate(360deg); }
|
|
146
151
|
}
|
|
147
|
-
`})]})}exports.FocusTrap=
|
|
152
|
+
`})]})}exports.FocusTrap=So,exports.I18nContext=a.I18nContext,exports.I18nProvider=yo,exports.LRUCache=t.N,exports.LiveRegion=xo,exports.Quantum=t.P,exports.SIZE_BORDER_RADIUS=ua,exports.SIZE_FONT=sa,exports.SIZE_HEIGHT=oa,exports.SIZE_ICON=da,exports.SIZE_PADDING_X=ca,exports.SIZE_PADDING_Y=la,exports.Shield=n.u,exports.SkipNav=bo,exports.TKX=t.w,exports.ThemeContext=t.t,exports.ThemeProvider=t.n,exports.TkxAIChatBubble=Fo,exports.TkxAIConfidenceBar=Mo,exports.TkxAIThinking=Vo,exports.TkxAccordion=Ae,exports.TkxAffix=oo,exports.TkxAlert=A,exports.TkxAnchor=uo,exports.TkxAppBar=zr,exports.TkxAutocomplete=pr,exports.TkxAvatar=Y,exports.TkxBadge=C,exports.TkxBottomNav=Wr,exports.TkxBreadcrumb=ir,exports.TkxButton=m,exports.TkxCard=g,exports.TkxCardBody=v,exports.TkxCardFooter=y,exports.TkxCardHeader=_,exports.TkxCarousel=tr,exports.TkxCascader=ho,exports.TkxChat=Ft,exports.TkxChatBubble=Pt,exports.TkxCheckbox=oe,exports.TkxClock=pn,exports.TkxCol=ea,exports.TkxColorPicker=Fn,exports.TkxCommand=$n,exports.TkxConfigProvider=na,exports.TkxContent=Ki,exports.TkxCountdown=Va,exports.TkxDataGrid=oi,exports.TkxDatePicker=tt,exports.TkxDivider=Z,exports.TkxDrawer=Re,exports.TkxDropdown=ko,exports.TkxEmpty=Na,exports.TkxFileUpload=yt,exports.TkxFooter=qi,exports.TkxForm=i.t,exports.TkxFormField=i.n,exports.TkxHeader=Ui,exports.TkxImage=mt,exports.TkxInput=b,exports.TkxLayout=Hi,exports.TkxList=vo,exports.TkxMarkdown=Ri,exports.TkxMasonry=fi,exports.TkxMentions=Wa,exports.TkxMenu=cn,exports.TkxModal=F,exports.TkxNumberInput=Vn,exports.TkxOTP=Gn,exports.TkxPagination=ut,exports.TkxParagraph=wa,exports.TkxPopover=cr,exports.TkxProgress=E,exports.TkxQRCode=Ya,exports.TkxRadio=ue,exports.TkxRadioGroup=de,exports.TkxRating=Ot,exports.TkxResult=Qa,exports.TkxRichTextDisplay=wi,exports.TkxRow=Xi,exports.TkxSegmented=Ua,exports.TkxSelect=ae,exports.TkxSider=Gi,exports.TkxSkeleton=K,exports.TkxSlider=st,exports.TkxSnackbar=Xr,exports.TkxSpeedDial=Pr,exports.TkxSpin=Aa,exports.TkxStatistic=Ba,exports.TkxStepper=wn,exports.TkxTab=B,exports.TkxTabList=z,exports.TkxTabPanel=H,exports.TkxTabPanels=V,exports.TkxTable=X,exports.TkxTabs=R,exports.TkxTag=Vt,exports.TkxTagInput=Ht,exports.TkxText=Ca,exports.TkxThinkingIndicator=Nt,exports.TkxTimeline=Xt,exports.TkxTitle=Sa,exports.TkxToastProvider=Ee,exports.TkxToggle=O,exports.TkxToolbar=br,exports.TkxTooltip=W,exports.TkxTour=to,exports.TkxTransferList=Er,exports.TkxTreeView=vr,exports.TkxVideoPlayer=vn,exports.TkxWatermark=ro,exports.VisuallyHidden=Co,exports.WCAGEngine=t.m,exports.audit=n.d,exports.auroraLight=t.r,exports.batchUpdate=t.F,exports.breakpoints=t.i,exports.contrastRatio=t.h,exports.createFocusTrap=t._,exports.createTheme=t.a,exports.css=t.T,exports.cssVar=t.E,exports.cx=n.t,exports.extractAtomicCSS=n.n,exports.extractCSS=t.D,exports.fnv1aHash=t.I,exports.fromObject=t.O,exports.generatePalette=t.o,exports.getAccessibleForeground=t.v,exports.getAuditLog=n.f,exports.getLocaleDisplayName=_a,exports.injectStyles=t.k,exports.isRTL=a.isRTL,exports.isRtlLocale=ga,exports.keyframes=t.A,exports.meetsAA=t.b,exports.meetsAAA=t.x,exports.memoize=t.L,exports.prefersHighContrast=t.S,exports.prefersReducedMotion=t.C,exports.quantumDark=t.s,exports.radii=t.c,exports.resetAtomicCSS=n.r,exports.resolvePluginUtility=n.i,exports.responsive=t.M,exports.sanitizeProps=n.p,exports.sanitizeString=n.m,exports.shadows=t.l,exports.spacing=t.u,exports.tkx=n.a,exports.tkxListPlugins=n.o,exports.tkxPlugin=n.s,exports.tkxRemovePlugin=n.c,exports.tx=n.l,exports.typography=t.d,exports.useAnnounce=r.t,exports.useClickOutside=r.n,exports.useComponentSize=aa,exports.useConfig=ra,exports.useDirection=a.useDirection,exports.useEscapeKey=r.r,exports.useFocusTrap=r.i,exports.useHighContrast=r.a,exports.useI18n=a.useI18n,exports.useLocale=a.useLocale,exports.useLogicalSpacing=pa,exports.usePrefixCls=ia,exports.useReducedMotion=r.o,exports.useRtlFlip=fa,exports.useTheme=t.f,exports.useTkxCommand=Jn,exports.useTkxForm=i.r,exports.useToast=xe,exports.validateProps=n.h,exports.verifyAuditIntegrity=n.g,exports.zIndex=t.p;
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export * from './src/components/TkxSnackbar';
|
|
|
90
90
|
export * from './src/components/TkxDataGrid';
|
|
91
91
|
export * from './src/components/TkxMasonry';
|
|
92
92
|
export * from './src/components/TkxRichTextDisplay';
|
|
93
|
+
export * from './src/components/TkxMarkdown';
|
|
93
94
|
export * from './src/components/TkxForm';
|
|
94
95
|
export * from './src/components/TkxLayout';
|
|
95
96
|
export * from './src/components/TkxConfigProvider';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAGA,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU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