@aivex/ui 1.2.0-dev.35 → 1.2.0-dev.36

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.
Files changed (51) hide show
  1. package/README.md +68 -0
  2. package/dist/{Button-DLfTdKpW.js → Button-CuvXiYtX.js} +1381 -1436
  3. package/dist/Button-CuvXiYtX.js.map +1 -0
  4. package/dist/Button-DXf0LWOC.cjs +2 -0
  5. package/dist/Button-DXf0LWOC.cjs.map +1 -0
  6. package/dist/IconButton-CrrS0BMg.cjs +2 -0
  7. package/dist/{IconButton-CfbfwHu2.cjs.map → IconButton-CrrS0BMg.cjs.map} +1 -1
  8. package/dist/{IconButton-CQG1Pw51.js → IconButton-DusjiWye.js} +14 -13
  9. package/dist/{IconButton-CQG1Pw51.js.map → IconButton-DusjiWye.js.map} +1 -1
  10. package/dist/comment.cjs +1 -1
  11. package/dist/comment.cjs.map +1 -1
  12. package/dist/comment.js +51 -41
  13. package/dist/comment.js.map +1 -1
  14. package/dist/components/Calendar/Calendar.d.ts +13 -2
  15. package/dist/components/Calendar/Calendar.test.d.ts +1 -0
  16. package/dist/components/Calendar/date.d.ts +2 -2
  17. package/dist/components/Calendar/date.test.d.ts +1 -0
  18. package/dist/components/Calendar/index.d.ts +1 -1
  19. package/dist/components/Drawer/Drawer.d.ts +2 -1
  20. package/dist/components/ShapeEditor/_components/SettingsPanel.d.ts +1 -2
  21. package/dist/components/ShapeEditor/_model/strings.d.ts +1 -0
  22. package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +2 -2
  23. package/dist/components/ShapeEditor/_state/useSelectionActions.d.ts +1 -1
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +1351 -1389
  28. package/dist/index.js.map +1 -1
  29. package/dist/keyboard-9B-R6uN0.cjs +2 -0
  30. package/dist/keyboard-9B-R6uN0.cjs.map +1 -0
  31. package/dist/{Switch-D7Dzld4x.js → keyboard-DUqwZll5.js} +178 -105
  32. package/dist/keyboard-DUqwZll5.js.map +1 -0
  33. package/dist/shape-editor.cjs +1 -1
  34. package/dist/shape-editor.cjs.map +1 -1
  35. package/dist/shape-editor.js +1180 -1190
  36. package/dist/shape-editor.js.map +1 -1
  37. package/dist/styles.css +1 -1
  38. package/dist/utils/keyboard.d.ts +3 -0
  39. package/dist/utils/useModalAutoFocus.d.ts +5 -0
  40. package/dist/utils.cjs +2 -0
  41. package/dist/utils.cjs.map +1 -0
  42. package/dist/utils.js +59 -0
  43. package/dist/utils.js.map +1 -0
  44. package/package.json +20 -22
  45. package/dist/Button-BcJuLWuX.cjs +0 -2
  46. package/dist/Button-BcJuLWuX.cjs.map +0 -1
  47. package/dist/Button-DLfTdKpW.js.map +0 -1
  48. package/dist/IconButton-CfbfwHu2.cjs +0 -2
  49. package/dist/Switch-BTWZAzgl.cjs +0 -2
  50. package/dist/Switch-BTWZAzgl.cjs.map +0 -1
  51. package/dist/Switch-D7Dzld4x.js.map +0 -1
@@ -1,2 +0,0 @@
1
- const e=require(`./Button-BcJuLWuX.cjs`);let t=require(`@radix-ui/react-avatar`);t=e.ma(t,1);let n=require(`class-variance-authority`),r=require(`@radix-ui/react-tooltip`);r=e.ma(r,1);let i=require(`react/jsx-runtime`),a=require(`@radix-ui/react-slot`);var o=(0,n.cva)(`aivex:z-50 aivex:max-w-[720px] aivex:rounded-sm aivex:bg-static-gray aivex:px-md aivex:py-xs aivex:text-body-md-regular aivex:text-text-on-color aivex:whitespace-pre-wrap aivex:break-words aivex:pointer-events-none aivex:shadow-md aivex:select-none`,{variants:{placement:{top:``,bottom:``,left:``,right:``}},defaultVariants:{placement:`top`}}),s=(0,n.cva)(`aivex:fill-static-gray`,{variants:{placement:{top:``,bottom:``,left:``,right:``}},defaultVariants:{placement:`top`}});function c({content:t,children:n,placement:a=`top`,disabled:c=!1,ref:l}){let u=a??`top`;return c?(0,i.jsx)(i.Fragment,{children:n}):(0,i.jsx)(r.Provider,{delayDuration:0,children:(0,i.jsxs)(r.Root,{children:[(0,i.jsx)(r.Trigger,{asChild:!0,children:(0,i.jsx)(`span`,{ref:l,className:`aivex:inline-flex`,children:n})}),(0,i.jsx)(r.Portal,{children:(0,i.jsxs)(r.Content,{side:u,sideOffset:8,className:e.pa(o({placement:u})),children:[t,(0,i.jsx)(r.Arrow,{width:8,height:4,className:e.pa(s({placement:u}))})]})})]})})}var l=(0,n.cva)(`aivex:inline-flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:overflow-hidden aivex:select-none aivex:leading-none aivex:text-text-primary`,{variants:{size:{xxs:`aivex:w-4 aivex:h-4 aivex:text-label-sm`,xs:`aivex:w-5 aivex:h-5 aivex:text-label-md`,sm:`aivex:w-6 aivex:h-6 aivex:text-label-md`,md:`aivex:w-8 aivex:h-8 aivex:text-label-lg`,lg:`aivex:w-9 aivex:h-9 aivex:text-label-xl`,xl:`aivex:w-12 aivex:h-12 aivex:text-label-xl`,"2xl":`aivex:w-14 aivex:h-14 aivex:text-label-xl`},type:{round:`aivex:rounded-full aivex:bg-category-indigo-bg`,square:`aivex:bg-category-indigo-bg`,image:`aivex:rounded-full aivex:border aivex:border-border-subtle aivex:bg-bg-secondary`}},compoundVariants:[{type:`square`,size:[`xxs`,`xs`,`sm`],className:`aivex:rounded-xs`},{type:`square`,size:[`md`,`lg`],className:`aivex:rounded-sm`},{type:`square`,size:[`xl`,`2xl`],className:`aivex:rounded-md`}],defaultVariants:{size:`md`,type:`round`}}),u=[`aivex:bg-category-blue-bg aivex:text-category-blue-text`,`aivex:bg-category-green-bg aivex:text-category-green-text`,`aivex:bg-category-orange-bg aivex:text-category-orange-text`,`aivex:bg-category-violet-bg aivex:text-category-violet-text`,`aivex:bg-category-teal-bg aivex:text-category-teal-text`,`aivex:bg-category-pink-bg aivex:text-category-pink-text`,`aivex:bg-category-cyan-bg aivex:text-category-cyan-text`,`aivex:bg-category-red-bg aivex:text-category-red-text`,`aivex:bg-category-lime-bg aivex:text-category-lime-text`,`aivex:bg-category-yellow-bg aivex:text-category-yellow-text`,`aivex:bg-category-indigo-bg aivex:text-category-indigo-text`];function d(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return u[t%u.length]}function f({initials:e,name:t,icon:n}){return(e??t?.trim().slice(0,1).toUpperCase())||(n??null)}function p({className:n,size:r,type:a,src:o,alt:s,initials:u,icon:p,name:m,bgColor:h,showTooltip:g,delayMs:_=600,style:v,ref:y,...b}){let x=f({initials:u,name:m,icon:p}),S=m??u,C=!o&&!h&&S?d(S):void 0,w=(0,i.jsxs)(t.Root,{ref:y,className:e.pa(l({size:r,type:a}),C,n),style:h?{backgroundColor:h,...v}:v,...b,children:[o&&(0,i.jsx)(t.Image,{src:o,alt:s??`avatar`,className:`aivex:w-full aivex:h-full aivex:object-cover`}),(0,i.jsx)(t.Fallback,{delayMs:o?_:0,className:`aivex:inline-flex aivex:h-full aivex:w-full aivex:items-center aivex:justify-center aivex:leading-none`,children:x})]});return g&&m?(0,i.jsx)(c,{content:m,children:w}):w}var m=(0,n.cva)(`aivex:relative aivex:group aivex:inline-flex aivex:cursor-pointer aivex:items-center aivex:justify-center aivex:transition-colors aivex:disabled:pointer-events-none aivex:disabled:opacity-disable aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand`,{variants:{size:{xs:`aivex:size-xl aivex:rounded-xs`,sm:`aivex:size-2xl aivex:rounded-xs`,md:`aivex:size-3xl aivex:rounded-sm`},shape:{rectangle:``,rounded:`aivex:rounded-full`}},defaultVariants:{size:`sm`,shape:`rectangle`}}),h={xs:`aivex:size-xl`,sm:`aivex:size-2xl`,md:`aivex:size-3xl`},g={xs:`aivex:-inset-2xs`,sm:`aivex:-inset-xs`,md:`aivex:-inset-xs`},_={xs:{rectangle:`aivex:rounded-xs`,rounded:`aivex:rounded-full`},sm:{rectangle:`aivex:rounded-sm`,rounded:`aivex:rounded-full`},md:{rectangle:`aivex:rounded-md`,rounded:`aivex:rounded-full`}};function v({className:t,size:n=`sm`,shape:r=`rectangle`,color:o=`primary`,error:s=!1,asChild:c=!1,children:l,ref:u,...d}){let f=c?a.Slot:`button`,p=s?`aivex:text-icon-danger`:o===`white`?`aivex:text-static-white`:`aivex:text-icon-primary`,v=s?`danger`:o===`white`?`white`:`default`,y=n??`sm`,b=r??`rectangle`;return(0,i.jsxs)(f,{ref:u,type:c?void 0:`button`,className:e.pa(m({size:n,shape:r}),p,t),...d,children:[(0,i.jsx)(e.fa,{variant:v,fill:!1,interactive:!0,className:e.pa(g[y],_[y][b])}),(0,i.jsx)(`span`,{className:e.pa(`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0`,h[y]),children:l})]})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return v}});
2
- //# sourceMappingURL=IconButton-CfbfwHu2.cjs.map
@@ -1,2 +0,0 @@
1
- const e=require(`./Button-BcJuLWuX.cjs`);let t=require(`class-variance-authority`),n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-dropdown-menu`);r=e.ma(r,1);let i=require(`react`),a=require(`@radix-ui/react-slider`);a=e.ma(a,1);let o=require(`@radix-ui/react-switch`);o=e.ma(o,1);var s=(0,t.cva)(`aivex:relative aivex:overflow-hidden aivex:group aivex:flex aivex:w-full aivex:items-center aivex:gap-md aivex:px-md aivex:py-sm aivex:text-label-lg aivex:rounded-md aivex:transition-colors aivex:cursor-pointer aivex:select-none aivex:outline-none aivex:data-[disabled]:opacity-disable aivex:data-[disabled]:pointer-events-none`,{variants:{danger:{true:`aivex:text-text-danger`,false:`aivex:text-text-primary`}},defaultVariants:{danger:!1}}),c=e.pa(`aivex:flex aivex:flex-col aivex:rounded-md aivex:bg-bg-primary aivex:p-md aivex:overflow-clip`,`aivex:shadow-md aivex:border aivex:border-border-subtle aivex:min-w-[160px]`,`aivex:z-50 aivex:outline-none`,`aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out`,`aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0`,`aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95`);function l(e){return(0,n.jsx)(r.Root,{...e})}function u({ref:e,...t}){return(0,n.jsx)(r.Trigger,{ref:e,...t})}function d({className:t,sideOffset:i=4,ref:a,...o}){return(0,n.jsx)(r.Portal,{children:(0,n.jsx)(r.Content,{ref:a,sideOffset:i,className:e.pa(c,t),...o})})}function f({className:t,ref:i,...a}){return(0,n.jsx)(r.Group,{ref:i,className:e.pa(`aivex:flex aivex:flex-col`,t),...a})}function p({className:t,ref:i,...a}){return(0,n.jsx)(r.Separator,{ref:i,className:e.pa(`aivex:h-px aivex:bg-border-subtle aivex:w-full aivex:my-xs`,t),...a})}function m({className:t,ref:i,...a}){return(0,n.jsx)(r.Label,{ref:i,className:e.pa(`aivex:px-md aivex:py-2xs aivex:text-label-md aivex:text-text-tertiary aivex:select-none`,t),...a})}function h({className:t,label:i,icon:a,danger:o=!1,asChild:c,children:l,ref:u,...d}){if(c)return(0,n.jsx)(r.Item,{ref:u,asChild:!0,className:e.pa(s({danger:o}),t),...d,children:l});let f=i??l;return(0,n.jsxs)(r.Item,{ref:u,className:e.pa(s({danger:o}),t),...d,children:[(0,n.jsx)(e.fa,{variant:o?`danger`:`default`}),a&&(0,n.jsx)(`span`,{className:e.pa(`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0`,o?`aivex:text-icon-danger`:`aivex:text-icon-secondary`),children:a}),(0,n.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:f})]})}function g({className:t,label:i,icon:a,children:o,ref:c,...l}){let u=i??o;return(0,n.jsxs)(r.CheckboxItem,{ref:c,className:e.pa(s(),t),...l,children:[(0,n.jsx)(e.fa,{variant:`default`}),(0,n.jsx)(C,{children:(0,n.jsx)(r.ItemIndicator,{children:(0,n.jsx)(e.dt,{size:20})})}),a&&(0,n.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:a}),(0,n.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:u})]})}function _({className:t,ref:i,...a}){return(0,n.jsx)(r.RadioGroup,{ref:i,className:e.pa(`aivex:flex aivex:flex-col`,t),...a})}function v({className:t,label:i,icon:a,children:o,ref:c,...l}){let u=i??o;return(0,n.jsxs)(r.RadioItem,{ref:c,className:e.pa(s(),t),...l,children:[(0,n.jsx)(e.fa,{variant:`default`}),(0,n.jsx)(C,{children:(0,n.jsx)(r.ItemIndicator,{children:(0,n.jsx)(e.dt,{size:20})})}),a&&(0,n.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:a}),(0,n.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:u})]})}function y({className:t,ref:r,...i}){return(0,n.jsx)(`span`,{ref:r,className:e.pa(`aivex:inline-flex aivex:items-center aivex:justify-center aivex:min-h-5 aivex:min-w-5 aivex:px-2xs aivex:rounded-xs aivex:border aivex:border-border-subtle aivex:text-label-md aivex:text-text-tertiary aivex:ml-auto`,t),...i})}function b(e){return(0,n.jsx)(r.Sub,{...e})}function x({className:t,label:i,icon:a,children:o,ref:c,...l}){let u=i??o;return(0,n.jsxs)(r.SubTrigger,{ref:c,className:e.pa(s(),t),...l,children:[(0,n.jsx)(e.fa,{variant:`default`}),a&&(0,n.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:a}),(0,n.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:u}),(0,n.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:(0,n.jsx)(e.Wt,{size:16})})]})}function S({className:t,sideOffset:i=4,ref:a,...o}){return(0,n.jsx)(r.Portal,{children:(0,n.jsx)(r.SubContent,{ref:a,sideOffset:i,className:e.pa(c,t),...o})})}function C({children:e}){return(0,n.jsx)(`span`,{"aria-hidden":!0,className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:w-5 aivex:h-5 aivex:text-icon-primary`,children:e})}var w=Object.assign(l,{Trigger:u,Content:d,Item:h,Group:f,Separator:p,Label:m,CheckboxItem:g,RadioGroup:_,RadioItem:v,Sub:b,SubTrigger:x,SubContent:S,Shortcut:y}),T=(0,t.cva)(`aivex:shrink-0`,{variants:{strength:{basic:``,bold:``},direction:{horizontal:`aivex:w-full`,vertical:`aivex:h-full`}},compoundVariants:[{strength:`basic`,direction:`horizontal`,className:`aivex:border-t aivex:border-border-default`},{strength:`basic`,direction:`vertical`,className:`aivex:border-l aivex:border-border-default`},{strength:`bold`,direction:`horizontal`,className:`aivex:border-t-2 aivex:border-border-subtle`},{strength:`bold`,direction:`vertical`,className:`aivex:border-l-2 aivex:border-border-subtle`}],defaultVariants:{strength:`basic`,direction:`horizontal`}});function E({className:t,strength:r,direction:i,ref:a,...o}){return(0,n.jsx)(`hr`,{ref:a,"aria-orientation":i===`vertical`?`vertical`:`horizontal`,className:e.pa(T({strength:r,direction:i}),t),...o})}function D({className:t,trackClassName:r,trackRootClassName:o,thumbClassName:s,defaultValue:c=[50],value:l,min:u=0,max:d=100,step:f=1,onValueChange:p,ref:m,...h}){let g=l!==void 0,[_,v]=(0,i.useState)(c),y=g?l:_,b=e=>{g||v(e),p?.(e)},x=(0,i.useMemo)(()=>{let e=d-u||1;return[...y].sort((e,t)=>e-t).map(t=>(t-u)/e*100)},[y,u,d]),S=(0,i.useMemo)(()=>{let e=[0,...x,100];return e.slice(0,-1).map((t,n)=>({left:t,width:e[n+1]-t}))},[x]);return(0,n.jsxs)(a.Root,{ref:m,className:e.pa(`aivex:relative aivex:flex aivex:w-full aivex:touch-none aivex:select-none aivex:items-center aivex:outline-none`,`aivex:data-[disabled]:pointer-events-none aivex:data-[disabled]:opacity-disable`,t),defaultValue:c,value:l,min:u,max:d,step:f,onValueChange:b,...h,children:[(0,n.jsx)(a.Track,{className:e.pa(`aivex:relative aivex:h-2 aivex:w-full aivex:grow aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-tertiary`,o),children:S.map(({left:t,width:i},a)=>{let o=a===+(x.length>=2)?`aivex:bg-bg-brand`:`aivex:bg-bg-tertiary`;return(0,n.jsx)(`div`,{className:e.pa(`aivex:absolute aivex:top-0 aivex:h-full aivex:rounded-full`,typeof r==`string`?r:r?.(a)??o),style:{left:`${t}%`,width:`${i}%`}},a)})}),y.map((t,r)=>(0,n.jsx)(a.Thumb,{className:e.pa(`aivex:z-10 aivex:block aivex:h-6 aivex:w-6 aivex:box-border aivex:rounded-full aivex:border-2 aivex:border-border-brand aivex:bg-bg-primary aivex:shadow-sm`,`aivex:cursor-pointer aivex:transition-transform aivex:hover:scale-110`,`aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand`,`aivex:disabled:pointer-events-none`,typeof s==`string`?s:s?.(r))},r))]})}var O=(0,t.cva)(`aivex:relative aivex:inline-flex aivex:shrink-0 aivex:items-center aivex:rounded-full aivex:transition-colors aivex:duration-200 aivex:cursor-pointer aivex:bg-bg-tertiary aivex:data-[state=checked]:bg-bg-brand aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand aivex:disabled:cursor-not-allowed aivex:disabled:opacity-disable`,{variants:{size:{sm:`aivex:w-6 aivex:h-4`,md:`aivex:w-8 aivex:h-5`,lg:`aivex:w-10 aivex:h-6`}},defaultVariants:{size:`md`}}),k={sm:`aivex:w-2.5 aivex:h-2.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[11px]`,md:`aivex:w-3.5 aivex:h-3.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[15px]`,lg:`aivex:w-[18px] aivex:h-[18px] aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[19px]`},A={sm:`aivex:h-4`,md:`aivex:h-5`,lg:`aivex:h-6`};function j({className:t,label:r,size:a=`md`,disabled:s,id:c,ref:l,...u}){let d=a??`md`,f=(0,i.useId)(),p=c??f;return(0,n.jsxs)(`span`,{className:e.pa(`aivex:inline-flex aivex:items-center aivex:gap-md`,s&&`aivex:opacity-disable`),children:[(0,n.jsx)(o.Root,{ref:l,id:p,disabled:s,className:e.pa(O({size:d}),t),...u,children:(0,n.jsx)(o.Thumb,{className:e.pa(`aivex:block aivex:rounded-full aivex:bg-white aivex:shadow-[var(--aivex-elevation-sm)] aivex:transition-transform aivex:duration-200 aivex:will-change-transform`,k[d])})}),r&&(0,n.jsx)(`label`,{htmlFor:p,className:e.pa(`aivex:inline-flex aivex:items-center aivex:cursor-pointer aivex:select-none aivex:text-label-lg aivex:text-text-primary`,s&&`aivex:cursor-not-allowed`,A[d]),children:r})]})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return j}});
2
- //# sourceMappingURL=Switch-BTWZAzgl.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Switch-BTWZAzgl.cjs","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { cva } from \"class-variance-authority\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { CheckIcon, DirectionRightIcon } from \"@/components/Icon\";\nimport { InteractionLayer } from \"@/components/InteractionLayer\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── menuItemVariants ─────────────────────────────────────────────────────────\n\nconst menuItemVariants = cva(\n \"aivex:relative aivex:overflow-hidden aivex:group aivex:flex aivex:w-full aivex:items-center aivex:gap-md aivex:px-md aivex:py-sm aivex:text-label-lg aivex:rounded-md aivex:transition-colors aivex:cursor-pointer aivex:select-none aivex:outline-none aivex:data-[disabled]:opacity-disable aivex:data-[disabled]:pointer-events-none\",\n {\n variants: {\n danger: {\n true: \"aivex:text-text-danger\",\n false: \"aivex:text-text-primary\",\n },\n },\n defaultVariants: {\n danger: false,\n },\n },\n);\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:rounded-md aivex:bg-bg-primary aivex:p-md aivex:overflow-clip\",\n \"aivex:shadow-md aivex:border aivex:border-border-subtle aivex:min-w-[160px]\",\n \"aivex:z-50 aivex:outline-none\",\n \"aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out\",\n \"aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0\",\n \"aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95\",\n);\n\n// ─── Root ─────────────────────────────────────────────────────────────────────\n\ntype MenuRootProps = ComponentPropsWithoutRef<typeof DropdownMenu.Root>;\n\nfunction MenuRoot(props: MenuRootProps) {\n return <DropdownMenu.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype MenuTriggerProps = ComponentPropsWithoutRef<typeof DropdownMenu.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\nfunction MenuTrigger({ ref, ...props }: MenuTriggerProps) {\n return <DropdownMenu.Trigger ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype MenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuContent({ className, sideOffset = 4, ref, ...props }: MenuContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Group ────────────────────────────────────────────────────────────────────\n\ntype MenuGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.Group> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuGroup({ className, ref, ...props }: MenuGroupProps) {\n return (\n <DropdownMenu.Group\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── Separator ────────────────────────────────────────────────────────────────\n\ntype MenuSeparatorProps = ComponentPropsWithoutRef<typeof DropdownMenu.Separator> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSeparator({ className, ref, ...props }: MenuSeparatorProps) {\n return (\n <DropdownMenu.Separator\n ref={ref}\n className={cn(\"aivex:h-px aivex:bg-border-subtle aivex:w-full aivex:my-xs\", className)}\n {...props}\n />\n );\n}\n\n// ─── Label ────────────────────────────────────────────────────────────────────\n\ntype MenuLabelProps = ComponentPropsWithoutRef<typeof DropdownMenu.Label> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuLabel({ className, ref, ...props }: MenuLabelProps) {\n return (\n <DropdownMenu.Label\n ref={ref}\n className={cn(\n \"aivex:px-md aivex:py-2xs aivex:text-label-md aivex:text-text-tertiary aivex:select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Item ─────────────────────────────────────────────────────────────────────\n\ninterface MenuItemProps\n extends Omit<ComponentPropsWithoutRef<typeof DropdownMenu.Item>, \"children\"> {\n /** label/icon으로 렌더할 때 사용. asChild 모드에선 무시 */\n label?: ReactNode;\n icon?: ReactNode;\n danger?: boolean;\n /** Radix asChild — 자식 컴포넌트(Link 등)에 메뉴 동작/스타일 위임 */\n asChild?: boolean;\n children?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuItem({\n className,\n label,\n icon,\n danger = false,\n asChild,\n children,\n ref,\n ...props\n}: MenuItemProps) {\n if (asChild) {\n return (\n <DropdownMenu.Item\n ref={ref}\n asChild\n className={cn(menuItemVariants({ danger }), className)}\n {...props}\n >\n {children}\n </DropdownMenu.Item>\n );\n }\n const content = label ?? children;\n return (\n <DropdownMenu.Item ref={ref} className={cn(menuItemVariants({ danger }), className)} {...props}>\n <InteractionLayer variant={danger ? \"danger\" : \"default\"} />\n {icon && (\n <span\n className={cn(\n \"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0\",\n danger ? \"aivex:text-icon-danger\" : \"aivex:text-icon-secondary\",\n )}\n >\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.Item>\n );\n}\n\n// ─── CheckboxItem ─────────────────────────────────────────────────────────────\n\ninterface MenuCheckboxItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.CheckboxItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuCheckboxItem({\n className,\n label,\n icon,\n children,\n ref,\n ...props\n}: MenuCheckboxItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.CheckboxItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.CheckboxItem>\n );\n}\n\n// ─── RadioGroup ───────────────────────────────────────────────────────────────\n\ntype MenuRadioGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.RadioGroup> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuRadioGroup({ className, ref, ...props }: MenuRadioGroupProps) {\n return (\n <DropdownMenu.RadioGroup\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── RadioItem ────────────────────────────────────────────────────────────────\n\ninterface MenuRadioItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.RadioItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuRadioItem({ className, label, icon, children, ref, ...props }: MenuRadioItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.RadioItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.RadioItem>\n );\n}\n\n// ─── Shortcut ─────────────────────────────────────────────────────────────────\n\ntype MenuShortcutProps = ComponentPropsWithoutRef<\"span\"> & {\n ref?: Ref<HTMLSpanElement>;\n};\n\nfunction MenuShortcut({ className, ref, ...props }: MenuShortcutProps) {\n return (\n <span\n ref={ref}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:justify-center aivex:min-h-5 aivex:min-w-5 aivex:px-2xs aivex:rounded-xs aivex:border aivex:border-border-subtle aivex:text-label-md aivex:text-text-tertiary aivex:ml-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Sub ──────────────────────────────────────────────────────────────────────\n\ntype MenuSubProps = ComponentPropsWithoutRef<typeof DropdownMenu.Sub>;\n\nfunction MenuSub(props: MenuSubProps) {\n return <DropdownMenu.Sub {...props} />;\n}\n\ninterface MenuSubTriggerProps extends ComponentPropsWithoutRef<typeof DropdownMenu.SubTrigger> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuSubTrigger({ className, label, icon, children, ref, ...props }: MenuSubTriggerProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.SubTrigger ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n <DirectionRightIcon size={16} />\n </span>\n </DropdownMenu.SubTrigger>\n );\n}\n\ntype MenuSubContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.SubContent> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSubContent({ className, sideOffset = 4, ref, ...props }: MenuSubContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Internal: CheckSlot ──────────────────────────────────────────────────────\n\n/** 체크 아이콘 자리(20px) — indicator는 활성 시에만 보이지만 자리는 항상 확보 */\nfunction CheckSlot({ children }: { children: ReactNode }) {\n return (\n <span\n aria-hidden\n className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:w-5 aivex:h-5 aivex:text-icon-primary\"\n >\n {children}\n </span>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Separator: MenuSeparator,\n Label: MenuLabel,\n CheckboxItem: MenuCheckboxItem,\n RadioGroup: MenuRadioGroup,\n RadioItem: MenuRadioItem,\n Sub: MenuSub,\n SubTrigger: MenuSubTrigger,\n SubContent: MenuSubContent,\n Shortcut: MenuShortcut,\n});\n\nexport type {\n MenuCheckboxItemProps,\n MenuContentProps,\n MenuGroupProps,\n MenuItemProps,\n MenuLabelProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuRootProps,\n MenuSeparatorProps,\n MenuShortcutProps,\n MenuSubContentProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuTriggerProps,\n};\nexport { Menu };\n","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { HTMLAttributes, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst dividerVariants = cva(\"aivex:shrink-0\", {\n variants: {\n strength: {\n basic: \"\",\n bold: \"\",\n },\n direction: {\n horizontal: \"aivex:w-full\",\n vertical: \"aivex:h-full\",\n },\n },\n compoundVariants: [\n {\n strength: \"basic\",\n direction: \"horizontal\",\n className: \"aivex:border-t aivex:border-border-default\",\n },\n {\n strength: \"basic\",\n direction: \"vertical\",\n className: \"aivex:border-l aivex:border-border-default\",\n },\n {\n strength: \"bold\",\n direction: \"horizontal\",\n className: \"aivex:border-t-2 aivex:border-border-subtle\",\n },\n {\n strength: \"bold\",\n direction: \"vertical\",\n className: \"aivex:border-l-2 aivex:border-border-subtle\",\n },\n ],\n defaultVariants: {\n strength: \"basic\",\n direction: \"horizontal\",\n },\n});\n\nexport interface DividerProps\n extends HTMLAttributes<HTMLHRElement>,\n VariantProps<typeof dividerVariants> {\n ref?: Ref<HTMLHRElement>;\n}\n\nfunction Divider({ className, strength, direction, ref, ...props }: DividerProps) {\n return (\n <hr\n ref={ref}\n aria-orientation={direction === \"vertical\" ? \"vertical\" : \"horizontal\"}\n className={cn(dividerVariants({ strength, direction }), className)}\n {...props}\n />\n );\n}\n\nexport { Divider, dividerVariants };\n","import * as SliderPrimitive from \"@radix-ui/react-slider\";\nimport type { ComponentPropsWithoutRef, Ref } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nexport interface SliderProps extends ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n trackClassName?: string | ((index: number) => string | undefined);\n /** 트랙 자체(높이 등)를 한 번씩 다르게 써야 하는 호스트를 위한 국소 오버라이드. */\n trackRootClassName?: string;\n thumbClassName?: string | ((index: number) => string | undefined);\n ref?: Ref<HTMLSpanElement>;\n}\n\nfunction Slider({\n className,\n trackClassName,\n trackRootClassName,\n thumbClassName,\n defaultValue = [50],\n value,\n min = 0,\n max = 100,\n step = 1,\n onValueChange,\n ref,\n ...props\n}: SliderProps) {\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<number[]>(defaultValue);\n const currentValues = isControlled ? value : internalValue;\n\n const handleValueChange = (newValue: number[]) => {\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n };\n\n const percentages = useMemo(() => {\n const range = max - min || 1;\n const sortedValues = [...currentValues].sort((a, b) => a - b);\n\n return sortedValues.map((currentValue) => ((currentValue - min) / range) * 100);\n }, [currentValues, min, max]);\n\n const segments = useMemo(() => {\n const points = [0, ...percentages, 100];\n\n return points.slice(0, -1).map((left, index) => ({\n left,\n width: points[index + 1] - left,\n }));\n }, [percentages]);\n\n return (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"aivex:relative aivex:flex aivex:w-full aivex:touch-none aivex:select-none aivex:items-center aivex:outline-none\",\n \"aivex:data-[disabled]:pointer-events-none aivex:data-[disabled]:opacity-disable\",\n className,\n )}\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n step={step}\n onValueChange={handleValueChange}\n {...props}\n >\n <SliderPrimitive.Track\n className={cn(\n \"aivex:relative aivex:h-2 aivex:w-full aivex:grow aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-tertiary\",\n trackRootClassName,\n )}\n >\n {segments.map(({ left, width }, index) => {\n const activeIndex = percentages.length >= 2 ? 1 : 0;\n const defaultSegmentClassName =\n index === activeIndex ? \"aivex:bg-bg-brand\" : \"aivex:bg-bg-tertiary\";\n\n return (\n <div\n key={index}\n className={cn(\n \"aivex:absolute aivex:top-0 aivex:h-full aivex:rounded-full\",\n typeof trackClassName === \"string\"\n ? trackClassName\n : (trackClassName?.(index) ?? defaultSegmentClassName),\n )}\n style={{ left: `${left}%`, width: `${width}%` }}\n />\n );\n })}\n </SliderPrimitive.Track>\n {currentValues.map((_, index) => (\n <SliderPrimitive.Thumb\n key={index}\n className={cn(\n \"aivex:z-10 aivex:block aivex:h-6 aivex:w-6 aivex:box-border aivex:rounded-full aivex:border-2 aivex:border-border-brand aivex:bg-bg-primary aivex:shadow-sm\",\n \"aivex:cursor-pointer aivex:transition-transform aivex:hover:scale-110\",\n \"aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand\",\n \"aivex:disabled:pointer-events-none\",\n typeof thumbClassName === \"string\" ? thumbClassName : thumbClassName?.(index),\n )}\n />\n ))}\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n","import * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { type ComponentPropsWithoutRef, type Ref, useId } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst switchTrackVariants = cva(\n // off 트랙은 bg/tertiary(반투명 채움) — border/default를 쓰면 테두리색이 면으로 깔려 탁해진다.\n \"aivex:relative aivex:inline-flex aivex:shrink-0 aivex:items-center aivex:rounded-full aivex:transition-colors aivex:duration-200 aivex:cursor-pointer aivex:bg-bg-tertiary aivex:data-[state=checked]:bg-bg-brand aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand aivex:disabled:cursor-not-allowed aivex:disabled:opacity-disable\",\n {\n variants: {\n size: {\n sm: \"aivex:w-6 aivex:h-4\",\n md: \"aivex:w-8 aivex:h-5\",\n lg: \"aivex:w-10 aivex:h-6\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n\ntype SwitchSize = NonNullable<VariantProps<typeof switchTrackVariants>[\"size\"]>;\n\n// 시안 규칙: 노브는 트랙 상하좌우 3px 안쪽 → 노브 = 트랙 높이 - 6.\n// md(32×20, 노브 14px)가 시안 SM과 정확히 일치하고, sm·lg는 같은 규칙으로 맞춘다.\nconst thumbClass: Record<SwitchSize, string> = {\n sm: \"aivex:w-2.5 aivex:h-2.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[11px]\",\n md: \"aivex:w-3.5 aivex:h-3.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[15px]\",\n lg: \"aivex:w-[18px] aivex:h-[18px] aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[19px]\",\n};\n\nconst switchLabelSizeClass: Record<SwitchSize, string> = {\n sm: \"aivex:h-4\",\n md: \"aivex:h-5\",\n lg: \"aivex:h-6\",\n};\n\nexport interface SwitchProps\n extends Omit<\n ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>,\n \"asChild\" | \"children\" | \"onCheckedChange\"\n >,\n VariantProps<typeof switchTrackVariants> {\n label?: string;\n // 배포된 선언을 소비할 때도 콜백 인자의 contextual typing을 보존한다.\n onCheckedChange?: (checked: boolean) => void;\n ref?: Ref<HTMLButtonElement>;\n}\n\nfunction Switch({ className, label, size = \"md\", disabled, id, ref, ...props }: SwitchProps) {\n const resolvedSize = size ?? \"md\";\n const generatedId = useId();\n const switchId = id ?? generatedId;\n\n return (\n <span\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:gap-md\",\n disabled && \"aivex:opacity-disable\",\n )}\n >\n <SwitchPrimitive.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n className={cn(switchTrackVariants({ size: resolvedSize }), className)}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n \"aivex:block aivex:rounded-full aivex:bg-white aivex:shadow-[var(--aivex-elevation-sm)] aivex:transition-transform aivex:duration-200 aivex:will-change-transform\",\n thumbClass[resolvedSize],\n )}\n />\n </SwitchPrimitive.Root>\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:cursor-pointer aivex:select-none aivex:text-label-lg aivex:text-text-primary\",\n disabled && \"aivex:cursor-not-allowed\",\n switchLabelSizeClass[resolvedSize],\n )}\n >\n {label}\n </label>\n )}\n </span>\n );\n}\n\nexport { Switch };\n"],"mappings":"oSAWA,IAAM,GAAA,EAAA,EAAA,KACJ,0UACA,CACE,SAAU,CACR,OAAQ,CACN,KAAM,yBACN,MAAO,0BACR,CACF,CACD,gBAAiB,CACf,OAAQ,GACT,CACF,CACF,CAEK,EAAmB,EAAA,GACvB,gGACA,8EACA,gCACA,2EACA,yEACA,2EACD,CAMD,SAAS,EAAS,EAAsB,CACtC,OAAO,EAAA,EAAA,KAAC,EAAa,KAAd,CAAmB,GAAI,EAAS,CAAA,CASzC,SAAS,EAAY,CAAE,MAAK,GAAG,GAA2B,CACxD,OAAO,EAAA,EAAA,KAAC,EAAa,QAAd,CAA2B,MAAK,GAAI,EAAS,CAAA,CAStD,SAAS,EAAY,CAAE,YAAW,aAAa,EAAG,MAAK,GAAG,GAA2B,CACnF,OACE,EAAA,EAAA,KAAC,EAAa,OAAd,CAAA,UACE,EAAA,EAAA,KAAC,EAAa,QAAd,CACO,MACO,aACZ,UAAW,EAAA,GAAG,EAAkB,EAAU,CAC1C,GAAI,EACJ,CAAA,CACkB,CAAA,CAU1B,SAAS,EAAU,CAAE,YAAW,MAAK,GAAG,GAAyB,CAC/D,OACE,EAAA,EAAA,KAAC,EAAa,MAAd,CACO,MACL,UAAW,EAAA,GAAG,4BAA6B,EAAU,CACrD,GAAI,EACJ,CAAA,CAUN,SAAS,EAAc,CAAE,YAAW,MAAK,GAAG,GAA6B,CACvE,OACE,EAAA,EAAA,KAAC,EAAa,UAAd,CACO,MACL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A,CACmB,CAAA,CACtB,IACC,EAAA,EAAA,KAAC,QAAD,CACE,QAAS,EACT,UAAW,EAAA,GACT,0HACA,GAAY,2BACZ,EAAqB,GACtB,UAEA,EACK,CAAA,CAEL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Switch-D7Dzld4x.js","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { cva } from \"class-variance-authority\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { CheckIcon, DirectionRightIcon } from \"@/components/Icon\";\nimport { InteractionLayer } from \"@/components/InteractionLayer\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── menuItemVariants ─────────────────────────────────────────────────────────\n\nconst menuItemVariants = cva(\n \"aivex:relative aivex:overflow-hidden aivex:group aivex:flex aivex:w-full aivex:items-center aivex:gap-md aivex:px-md aivex:py-sm aivex:text-label-lg aivex:rounded-md aivex:transition-colors aivex:cursor-pointer aivex:select-none aivex:outline-none aivex:data-[disabled]:opacity-disable aivex:data-[disabled]:pointer-events-none\",\n {\n variants: {\n danger: {\n true: \"aivex:text-text-danger\",\n false: \"aivex:text-text-primary\",\n },\n },\n defaultVariants: {\n danger: false,\n },\n },\n);\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:rounded-md aivex:bg-bg-primary aivex:p-md aivex:overflow-clip\",\n \"aivex:shadow-md aivex:border aivex:border-border-subtle aivex:min-w-[160px]\",\n \"aivex:z-50 aivex:outline-none\",\n \"aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out\",\n \"aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0\",\n \"aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95\",\n);\n\n// ─── Root ─────────────────────────────────────────────────────────────────────\n\ntype MenuRootProps = ComponentPropsWithoutRef<typeof DropdownMenu.Root>;\n\nfunction MenuRoot(props: MenuRootProps) {\n return <DropdownMenu.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype MenuTriggerProps = ComponentPropsWithoutRef<typeof DropdownMenu.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\nfunction MenuTrigger({ ref, ...props }: MenuTriggerProps) {\n return <DropdownMenu.Trigger ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype MenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuContent({ className, sideOffset = 4, ref, ...props }: MenuContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Group ────────────────────────────────────────────────────────────────────\n\ntype MenuGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.Group> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuGroup({ className, ref, ...props }: MenuGroupProps) {\n return (\n <DropdownMenu.Group\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── Separator ────────────────────────────────────────────────────────────────\n\ntype MenuSeparatorProps = ComponentPropsWithoutRef<typeof DropdownMenu.Separator> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSeparator({ className, ref, ...props }: MenuSeparatorProps) {\n return (\n <DropdownMenu.Separator\n ref={ref}\n className={cn(\"aivex:h-px aivex:bg-border-subtle aivex:w-full aivex:my-xs\", className)}\n {...props}\n />\n );\n}\n\n// ─── Label ────────────────────────────────────────────────────────────────────\n\ntype MenuLabelProps = ComponentPropsWithoutRef<typeof DropdownMenu.Label> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuLabel({ className, ref, ...props }: MenuLabelProps) {\n return (\n <DropdownMenu.Label\n ref={ref}\n className={cn(\n \"aivex:px-md aivex:py-2xs aivex:text-label-md aivex:text-text-tertiary aivex:select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Item ─────────────────────────────────────────────────────────────────────\n\ninterface MenuItemProps\n extends Omit<ComponentPropsWithoutRef<typeof DropdownMenu.Item>, \"children\"> {\n /** label/icon으로 렌더할 때 사용. asChild 모드에선 무시 */\n label?: ReactNode;\n icon?: ReactNode;\n danger?: boolean;\n /** Radix asChild — 자식 컴포넌트(Link 등)에 메뉴 동작/스타일 위임 */\n asChild?: boolean;\n children?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuItem({\n className,\n label,\n icon,\n danger = false,\n asChild,\n children,\n ref,\n ...props\n}: MenuItemProps) {\n if (asChild) {\n return (\n <DropdownMenu.Item\n ref={ref}\n asChild\n className={cn(menuItemVariants({ danger }), className)}\n {...props}\n >\n {children}\n </DropdownMenu.Item>\n );\n }\n const content = label ?? children;\n return (\n <DropdownMenu.Item ref={ref} className={cn(menuItemVariants({ danger }), className)} {...props}>\n <InteractionLayer variant={danger ? \"danger\" : \"default\"} />\n {icon && (\n <span\n className={cn(\n \"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0\",\n danger ? \"aivex:text-icon-danger\" : \"aivex:text-icon-secondary\",\n )}\n >\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.Item>\n );\n}\n\n// ─── CheckboxItem ─────────────────────────────────────────────────────────────\n\ninterface MenuCheckboxItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.CheckboxItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuCheckboxItem({\n className,\n label,\n icon,\n children,\n ref,\n ...props\n}: MenuCheckboxItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.CheckboxItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.CheckboxItem>\n );\n}\n\n// ─── RadioGroup ───────────────────────────────────────────────────────────────\n\ntype MenuRadioGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.RadioGroup> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuRadioGroup({ className, ref, ...props }: MenuRadioGroupProps) {\n return (\n <DropdownMenu.RadioGroup\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── RadioItem ────────────────────────────────────────────────────────────────\n\ninterface MenuRadioItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.RadioItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuRadioItem({ className, label, icon, children, ref, ...props }: MenuRadioItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.RadioItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.RadioItem>\n );\n}\n\n// ─── Shortcut ─────────────────────────────────────────────────────────────────\n\ntype MenuShortcutProps = ComponentPropsWithoutRef<\"span\"> & {\n ref?: Ref<HTMLSpanElement>;\n};\n\nfunction MenuShortcut({ className, ref, ...props }: MenuShortcutProps) {\n return (\n <span\n ref={ref}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:justify-center aivex:min-h-5 aivex:min-w-5 aivex:px-2xs aivex:rounded-xs aivex:border aivex:border-border-subtle aivex:text-label-md aivex:text-text-tertiary aivex:ml-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Sub ──────────────────────────────────────────────────────────────────────\n\ntype MenuSubProps = ComponentPropsWithoutRef<typeof DropdownMenu.Sub>;\n\nfunction MenuSub(props: MenuSubProps) {\n return <DropdownMenu.Sub {...props} />;\n}\n\ninterface MenuSubTriggerProps extends ComponentPropsWithoutRef<typeof DropdownMenu.SubTrigger> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuSubTrigger({ className, label, icon, children, ref, ...props }: MenuSubTriggerProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.SubTrigger ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n <DirectionRightIcon size={16} />\n </span>\n </DropdownMenu.SubTrigger>\n );\n}\n\ntype MenuSubContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.SubContent> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSubContent({ className, sideOffset = 4, ref, ...props }: MenuSubContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Internal: CheckSlot ──────────────────────────────────────────────────────\n\n/** 체크 아이콘 자리(20px) — indicator는 활성 시에만 보이지만 자리는 항상 확보 */\nfunction CheckSlot({ children }: { children: ReactNode }) {\n return (\n <span\n aria-hidden\n className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:w-5 aivex:h-5 aivex:text-icon-primary\"\n >\n {children}\n </span>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Separator: MenuSeparator,\n Label: MenuLabel,\n CheckboxItem: MenuCheckboxItem,\n RadioGroup: MenuRadioGroup,\n RadioItem: MenuRadioItem,\n Sub: MenuSub,\n SubTrigger: MenuSubTrigger,\n SubContent: MenuSubContent,\n Shortcut: MenuShortcut,\n});\n\nexport type {\n MenuCheckboxItemProps,\n MenuContentProps,\n MenuGroupProps,\n MenuItemProps,\n MenuLabelProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuRootProps,\n MenuSeparatorProps,\n MenuShortcutProps,\n MenuSubContentProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuTriggerProps,\n};\nexport { Menu };\n","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { HTMLAttributes, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst dividerVariants = cva(\"aivex:shrink-0\", {\n variants: {\n strength: {\n basic: \"\",\n bold: \"\",\n },\n direction: {\n horizontal: \"aivex:w-full\",\n vertical: \"aivex:h-full\",\n },\n },\n compoundVariants: [\n {\n strength: \"basic\",\n direction: \"horizontal\",\n className: \"aivex:border-t aivex:border-border-default\",\n },\n {\n strength: \"basic\",\n direction: \"vertical\",\n className: \"aivex:border-l aivex:border-border-default\",\n },\n {\n strength: \"bold\",\n direction: \"horizontal\",\n className: \"aivex:border-t-2 aivex:border-border-subtle\",\n },\n {\n strength: \"bold\",\n direction: \"vertical\",\n className: \"aivex:border-l-2 aivex:border-border-subtle\",\n },\n ],\n defaultVariants: {\n strength: \"basic\",\n direction: \"horizontal\",\n },\n});\n\nexport interface DividerProps\n extends HTMLAttributes<HTMLHRElement>,\n VariantProps<typeof dividerVariants> {\n ref?: Ref<HTMLHRElement>;\n}\n\nfunction Divider({ className, strength, direction, ref, ...props }: DividerProps) {\n return (\n <hr\n ref={ref}\n aria-orientation={direction === \"vertical\" ? \"vertical\" : \"horizontal\"}\n className={cn(dividerVariants({ strength, direction }), className)}\n {...props}\n />\n );\n}\n\nexport { Divider, dividerVariants };\n","import * as SliderPrimitive from \"@radix-ui/react-slider\";\nimport type { ComponentPropsWithoutRef, Ref } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nexport interface SliderProps extends ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n trackClassName?: string | ((index: number) => string | undefined);\n /** 트랙 자체(높이 등)를 한 번씩 다르게 써야 하는 호스트를 위한 국소 오버라이드. */\n trackRootClassName?: string;\n thumbClassName?: string | ((index: number) => string | undefined);\n ref?: Ref<HTMLSpanElement>;\n}\n\nfunction Slider({\n className,\n trackClassName,\n trackRootClassName,\n thumbClassName,\n defaultValue = [50],\n value,\n min = 0,\n max = 100,\n step = 1,\n onValueChange,\n ref,\n ...props\n}: SliderProps) {\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<number[]>(defaultValue);\n const currentValues = isControlled ? value : internalValue;\n\n const handleValueChange = (newValue: number[]) => {\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n };\n\n const percentages = useMemo(() => {\n const range = max - min || 1;\n const sortedValues = [...currentValues].sort((a, b) => a - b);\n\n return sortedValues.map((currentValue) => ((currentValue - min) / range) * 100);\n }, [currentValues, min, max]);\n\n const segments = useMemo(() => {\n const points = [0, ...percentages, 100];\n\n return points.slice(0, -1).map((left, index) => ({\n left,\n width: points[index + 1] - left,\n }));\n }, [percentages]);\n\n return (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"aivex:relative aivex:flex aivex:w-full aivex:touch-none aivex:select-none aivex:items-center aivex:outline-none\",\n \"aivex:data-[disabled]:pointer-events-none aivex:data-[disabled]:opacity-disable\",\n className,\n )}\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n step={step}\n onValueChange={handleValueChange}\n {...props}\n >\n <SliderPrimitive.Track\n className={cn(\n \"aivex:relative aivex:h-2 aivex:w-full aivex:grow aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-tertiary\",\n trackRootClassName,\n )}\n >\n {segments.map(({ left, width }, index) => {\n const activeIndex = percentages.length >= 2 ? 1 : 0;\n const defaultSegmentClassName =\n index === activeIndex ? \"aivex:bg-bg-brand\" : \"aivex:bg-bg-tertiary\";\n\n return (\n <div\n key={index}\n className={cn(\n \"aivex:absolute aivex:top-0 aivex:h-full aivex:rounded-full\",\n typeof trackClassName === \"string\"\n ? trackClassName\n : (trackClassName?.(index) ?? defaultSegmentClassName),\n )}\n style={{ left: `${left}%`, width: `${width}%` }}\n />\n );\n })}\n </SliderPrimitive.Track>\n {currentValues.map((_, index) => (\n <SliderPrimitive.Thumb\n key={index}\n className={cn(\n \"aivex:z-10 aivex:block aivex:h-6 aivex:w-6 aivex:box-border aivex:rounded-full aivex:border-2 aivex:border-border-brand aivex:bg-bg-primary aivex:shadow-sm\",\n \"aivex:cursor-pointer aivex:transition-transform aivex:hover:scale-110\",\n \"aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand\",\n \"aivex:disabled:pointer-events-none\",\n typeof thumbClassName === \"string\" ? thumbClassName : thumbClassName?.(index),\n )}\n />\n ))}\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n","import * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { type ComponentPropsWithoutRef, type Ref, useId } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst switchTrackVariants = cva(\n // off 트랙은 bg/tertiary(반투명 채움) — border/default를 쓰면 테두리색이 면으로 깔려 탁해진다.\n \"aivex:relative aivex:inline-flex aivex:shrink-0 aivex:items-center aivex:rounded-full aivex:transition-colors aivex:duration-200 aivex:cursor-pointer aivex:bg-bg-tertiary aivex:data-[state=checked]:bg-bg-brand aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand aivex:disabled:cursor-not-allowed aivex:disabled:opacity-disable\",\n {\n variants: {\n size: {\n sm: \"aivex:w-6 aivex:h-4\",\n md: \"aivex:w-8 aivex:h-5\",\n lg: \"aivex:w-10 aivex:h-6\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n\ntype SwitchSize = NonNullable<VariantProps<typeof switchTrackVariants>[\"size\"]>;\n\n// 시안 규칙: 노브는 트랙 상하좌우 3px 안쪽 → 노브 = 트랙 높이 - 6.\n// md(32×20, 노브 14px)가 시안 SM과 정확히 일치하고, sm·lg는 같은 규칙으로 맞춘다.\nconst thumbClass: Record<SwitchSize, string> = {\n sm: \"aivex:w-2.5 aivex:h-2.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[11px]\",\n md: \"aivex:w-3.5 aivex:h-3.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[15px]\",\n lg: \"aivex:w-[18px] aivex:h-[18px] aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[19px]\",\n};\n\nconst switchLabelSizeClass: Record<SwitchSize, string> = {\n sm: \"aivex:h-4\",\n md: \"aivex:h-5\",\n lg: \"aivex:h-6\",\n};\n\nexport interface SwitchProps\n extends Omit<\n ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>,\n \"asChild\" | \"children\" | \"onCheckedChange\"\n >,\n VariantProps<typeof switchTrackVariants> {\n label?: string;\n // 배포된 선언을 소비할 때도 콜백 인자의 contextual typing을 보존한다.\n onCheckedChange?: (checked: boolean) => void;\n ref?: Ref<HTMLButtonElement>;\n}\n\nfunction Switch({ className, label, size = \"md\", disabled, id, ref, ...props }: SwitchProps) {\n const resolvedSize = size ?? \"md\";\n const generatedId = useId();\n const switchId = id ?? generatedId;\n\n return (\n <span\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:gap-md\",\n disabled && \"aivex:opacity-disable\",\n )}\n >\n <SwitchPrimitive.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n className={cn(switchTrackVariants({ size: resolvedSize }), className)}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n \"aivex:block aivex:rounded-full aivex:bg-white aivex:shadow-[var(--aivex-elevation-sm)] aivex:transition-transform aivex:duration-200 aivex:will-change-transform\",\n thumbClass[resolvedSize],\n )}\n />\n </SwitchPrimitive.Root>\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:cursor-pointer aivex:select-none aivex:text-label-lg aivex:text-text-primary\",\n disabled && \"aivex:cursor-not-allowed\",\n switchLabelSizeClass[resolvedSize],\n )}\n >\n {label}\n </label>\n )}\n </span>\n );\n}\n\nexport { Switch };\n"],"mappings":";;;;;;;;AAWA,IAAM,IAAmB,EACvB,2UACA;CACE,UAAU,EACR,QAAQ;EACN,MAAM;EACN,OAAO;EACR,EACF;CACD,iBAAiB,EACf,QAAQ,IACT;CACF,CACF,EAEK,IAAmB,EACvB,iGACA,+EACA,iCACA,4EACA,0EACA,2EACD;AAMD,SAAS,EAAS,GAAsB;AACtC,QAAO,kBAAC,EAAa,MAAd,EAAmB,GAAI,GAAS,CAAA;;AASzC,SAAS,EAAY,EAAE,QAAK,GAAG,KAA2B;AACxD,QAAO,kBAAC,EAAa,SAAd;EAA2B;EAAK,GAAI;EAAS,CAAA;;AAStD,SAAS,EAAY,EAAE,cAAW,gBAAa,GAAG,QAAK,GAAG,KAA2B;AACnF,QACE,kBAAC,EAAa,QAAd,EAAA,UACE,kBAAC,EAAa,SAAd;EACO;EACO;EACZ,WAAW,EAAG,G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