@1d1s/design-system 0.2.21 → 0.2.22

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 (39) hide show
  1. package/dist/components/Accordion/Accordion.stories.d.ts +1 -1
  2. package/dist/components/AppHeader/AppHeader.stories.d.ts +1 -1
  3. package/dist/components/BannerCarousel/BannerCarousel.stories.d.ts +1 -1
  4. package/dist/components/Button/Button.stories.d.ts +1 -1
  5. package/dist/components/Calendar/Calendar.stories.d.ts +1 -1
  6. package/dist/components/ChallengeCard/ChallengeCard.stories.d.ts +1 -1
  7. package/dist/components/ChallengeListItem/ChallengeListItem.stories.d.ts +1 -1
  8. package/dist/components/CheckContainer/CheckContainer.stories.d.ts +1 -1
  9. package/dist/components/CheckList/CheckList.stories.d.ts +1 -1
  10. package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -1
  11. package/dist/components/CircleAvatar/CircleAvatar.stories.d.ts +1 -1
  12. package/dist/components/CircularProgress/CircularProgress.stories.d.ts +1 -1
  13. package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -1
  14. package/dist/components/Dialog/Dialog.stories.d.ts +1 -1
  15. package/dist/components/DiaryCard/DiaryCard.stories.d.ts +1 -1
  16. package/dist/components/DiaryListItem/DiaryListItem.stories.d.ts +1 -1
  17. package/dist/components/Dropdown/Dropdown.stories.d.ts +1 -1
  18. package/dist/components/GoalAddList/GoalAddList.stories.d.ts +1 -1
  19. package/dist/components/Icons/Icons.stories.d.ts +1 -1
  20. package/dist/components/ImagePicker/ImagePicker.stories.d.ts +1 -1
  21. package/dist/components/InfoButton/InfoButton.stories.d.ts +1 -1
  22. package/dist/components/PageWatermark/PageWatermark.stories.d.ts +1 -1
  23. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  24. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +1 -1
  25. package/dist/components/RightSidebar/RightSidebar.stories.d.ts +1 -1
  26. package/dist/components/ScheduleCalendar/ScheduleCalendar.stories.d.ts +1 -1
  27. package/dist/components/StatContainer/StatContainer.stories.d.ts +1 -1
  28. package/dist/components/StepIndicator/StepIndicator.stories.d.ts +1 -1
  29. package/dist/components/Streak/Streak.stories.d.ts +1 -1
  30. package/dist/components/Tag/Tag.stories.d.ts +1 -1
  31. package/dist/components/Text/Text.stories.d.ts +1 -1
  32. package/dist/components/TextField/TextField.stories.d.ts +1 -1
  33. package/dist/components/Toggle/Toggle.stories.d.ts +1 -1
  34. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  35. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  36. package/dist/components/UserListItem/UserListItem.stories.d.ts +1 -1
  37. package/dist/index.es.js +1 -1
  38. package/dist/index.umd.js +1 -1
  39. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Accordion } from './Accordion';
3
3
  declare const meta: Meta<typeof Accordion>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { AppHeader } from './AppHeader';
3
3
  declare const meta: Meta<typeof AppHeader>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { BannerCarousel } from './BannerCarousel';
3
3
  declare const meta: Meta<typeof BannerCarousel>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Button } from './Button';
3
3
  declare const meta: Meta<typeof Button>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Calendar } from './Calendar';
3
3
  declare const meta: Meta<typeof Calendar>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { ChallengeCard } from './ChallengeCard';
3
3
  declare const meta: Meta<typeof ChallengeCard>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { ChallengeListItem } from './ChallengeListItem';
3
3
  declare const meta: Meta<typeof ChallengeListItem>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { CheckContainer } from './CheckContainer';
3
3
  declare const meta: Meta<typeof CheckContainer>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { CheckList } from './CheckList';
3
3
  declare const meta: Meta<typeof CheckList>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Checkbox } from './Checkbox';
3
3
  declare const meta: Meta<typeof Checkbox>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { CircleAvatar } from './CircleAvatar';
3
3
  declare const meta: Meta<typeof CircleAvatar>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { CircularProgress } from './CircularProgress';
3
3
  declare const meta: Meta<typeof CircularProgress>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { DatePicker } from './DatePicker';
3
3
  declare const meta: Meta<typeof DatePicker>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Dialog } from './Dialog';
3
3
  declare const meta: Meta<typeof Dialog>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { DiaryCard } from './DiaryCard';
3
3
  declare const meta: Meta<typeof DiaryCard>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { DiaryListItem } from './DiaryListItem';
3
3
  declare const meta: Meta<typeof DiaryListItem>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Select } from './Dropdown';
3
3
  declare const meta: Meta<typeof Select>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { GoalAddList } from './GoalAddList';
3
3
  declare const meta: Meta<typeof GoalAddList>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  declare const IconGallery: ({ size, color }: {
3
3
  size: number;
4
4
  color: string;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { ImagePicker } from './ImagePicker';
3
3
  declare const meta: Meta<typeof ImagePicker>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { InfoButton } from './InfoButton';
3
3
  declare const meta: Meta<typeof InfoButton>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { PageWatermark } from './PageWatermark';
3
3
  declare const meta: Meta<typeof PageWatermark>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Pagination } from './Pagination';
3
3
  declare const meta: Meta<typeof Pagination>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { ProgressBar } from './ProgressBar';
3
3
  declare const meta: Meta<typeof ProgressBar>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { RightSidebar } from './RightSidebar';
3
3
  declare const meta: Meta<typeof RightSidebar>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { ScheduleCalendar } from './ScheduleCalendar';
3
3
  declare const meta: Meta<typeof ScheduleCalendar>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { StatContainer } from './StatContainer';
3
3
  declare const meta: Meta<typeof StatContainer>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { StepIndicator } from './StepIndicator';
3
3
  declare const meta: Meta<typeof StepIndicator>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Streak } from './Streak';
3
3
  declare const meta: Meta<typeof Streak>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Tag } from './Tag';
3
3
  declare const meta: Meta<typeof Tag>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Text } from './Text';
3
3
  declare const meta: Meta<typeof Text>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { TextField } from './TextField';
3
3
  declare const meta: Meta<typeof TextField>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Toggle } from './Toggle';
3
3
  declare const meta: Meta<typeof Toggle>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { ToggleGroup } from './ToggleGroup';
3
3
  declare const meta: Meta<typeof ToggleGroup>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { Tooltip } from './Tooltip';
3
3
  declare const meta: Meta<typeof Tooltip>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { UserListItem } from './UserListItem';
3
3
  declare const meta: Meta<typeof UserListItem>;
4
4
  export default meta;
package/dist/index.es.js CHANGED
@@ -12318,7 +12318,7 @@ function Ny({
12318
12318
  ),
12319
12319
  children: [
12320
12320
  /* @__PURE__ */ s(En, { className: "h-3.5 w-3.5 text-gray-700" }),
12321
- /* @__PURE__ */ s(O, { size: "caption1", weight: "medium", className: "text-gray-700", children: r })
12321
+ /* @__PURE__ */ s(O, { size: "caption1", weight: "medium", className: "text-gray-700 whitespace-nowrap", children: r })
12322
12322
  ]
12323
12323
  }
12324
12324
  )
package/dist/index.umd.js CHANGED
@@ -42,4 +42,4 @@
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Pv="DialogDescriptionWarning",Ev=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nl(Pv).contentName}}.`;return h.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},_v=Vi,Mv=Yi,Tv=Ui,Dv=Ki,Ov=Qi,Iv=Xi,Lv=Ji,rl=el;const Fv=_v,Wv=Mv,ol=Tv,zv=rl;function al({className:e,...t}){return s.jsx(Dv,{className:A("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function Bv({className:e,children:t,...n}){return s.jsxs(ol,{children:[s.jsx(al,{}),s.jsxs(Ov,{className:A("fixed top-[50%] left-[50%] z-50","w-full max-w-[calc(100%-2rem)] sm:max-w-md","translate-x-[-50%] translate-y-[-50%]","rounded-2 bg-white p-4 sm:p-6 shadow-default","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","[&_[data-slot=button].h-13]:!h-11","[&_[data-slot=button].h-13]:!px-3.5","[&_[data-slot=button].h-11]:!h-9","[&_[data-slot=button]_.text-lg]:!text-base","[&_[data-slot=button]_.text-base]:!text-sm","duration-200",e),...n,children:[t,s.jsxs(rl,{className:"absolute top-3 right-3 sm:top-4 sm:right-4 rounded-full p-1.5 opacity-70 transition-opacity hover:opacity-100 focus:outline-none cursor-pointer",children:[s.jsx(kn,{width:18,height:18,className:"text-gray-500 sm:w-5 sm:h-5"}),s.jsx("span",{className:"sr-only",children:"닫기"})]})]})]})}function $v({className:e,...t}){return s.jsx("div",{className:A("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Hv({className:e,...t}){return s.jsx("div",{className:A("mt-4 sm:mt-6 flex flex-row justify-end gap-2",e),...t})}function Vv({className:e,children:t,...n}){return s.jsx(Iv,{asChild:!0,...n,children:s.jsx(I,{size:"heading2",weight:"bold",className:A("text-black",e),children:t})})}function jv({className:e,children:t,...n}){return s.jsx(Lv,{asChild:!0,...n,children:s.jsx(I,{size:"body2",weight:"regular",className:A("text-gray-600 mt-2",e),children:t})})}function Yv({imageUrl:e,alt:t,percent:n,emotion:r,isLiked:o,likeCount:a,onToggleLike:i}){const l={happy:"😎",soso:"🙂",sad:"🥲"},c=Math.min(Math.max(n,0),100),d=!!(e&&e.trim().length>0);return s.jsxs("div",{className:"relative aspect-4/5 w-full overflow-hidden bg-gray-100",children:[d?s.jsx(lt,{src:e,alt:t,fill:!0,className:"h-full w-full object-cover"}):s.jsx(Qt,{className:"h-full w-full",logoSize:"lg"}),d?s.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-linear-to-t from-black/15 to-transparent"}):null,s.jsx("div",{className:"absolute top-3 left-3 z-20",children:s.jsx("div",{className:"relative flex h-10 w-10 items-center justify-center rounded-full bg-white shadow-[0_6px_14px_rgba(34,34,34,0.2)] sm:h-12 sm:w-12",children:s.jsx(Xr,{value:c,size:"sm",showPercentage:!0})})}),s.jsx("div",{className:"absolute top-3 right-3 z-20 text-2xl leading-none sm:text-3xl",children:s.jsx("span",{role:"img","aria-label":r,children:l[r]})}),s.jsx("div",{className:"absolute bottom-3 left-3 z-20",children:s.jsxs("button",{type:"button",onClick:u=>{u.stopPropagation(),i()},className:"inline-flex cursor-pointer items-center gap-1 rounded-full bg-main-800 px-3 py-1.5 text-white shadow-[0_4px_10px_rgba(34,34,34,0.25)] transition-colors hover:bg-main-900",children:[o?s.jsx(Cr,{width:14,height:14,className:"text-white"}):s.jsx(xr,{width:14,height:14,className:"text-white"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-white",children:a})]})})]})}function Gv({title:e,user:t,userImage:n,challengeLabel:r,onChallengeClick:o,date:a}){return s.jsxs("div",{className:"flex w-full flex-col gap-2 p-3 sm:gap-3 sm:p-4",children:[s.jsx(I,{as:"p",size:"body2",weight:"bold",className:"line-clamp-2 min-h-8 leading-tight text-gray-900 sm:text-xl sm:min-h-10",children:e}),s.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),o?.()},className:A("block w-full cursor-pointer rounded-1 px-1 py-0.5 text-left transition-colors","hover:bg-gray-100"),children:s.jsx(I,{size:"caption1",weight:"medium",className:"block w-full truncate text-blue-500 sm:text-lg",children:r})}),s.jsx("div",{className:"h-px w-full bg-gray-200"}),s.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[s.jsx(xt,{imageUrl:n,size:"sm"}),s.jsxs("div",{className:"flex flex-col gap-0.5 sm:gap-1",children:[s.jsx(I,{size:"caption1",weight:"bold",className:"text-gray-900 sm:text-lg",children:t}),s.jsx(I,{size:"caption3",weight:"regular",className:"text-gray-500 sm:text-sm",children:a})]})]})]})}function Uv({imageUrl:e,percent:t,likes:n,isLiked:r,defaultLiked:o=!1,onLikeToggle:a,title:i,user:l,userImage:c,challengeLabel:d,totalMemberCount:u,onChallengeClick:f,date:g,emotion:v="happy",onClick:b}){const p=typeof r=="boolean",[m,w]=P.useState(o),[y,x]=P.useState(n),N=p?r:m,S=p?n:y;P.useEffect(()=>{p||x(n)},[p,n]);const M=()=>{const k=!N,z=Math.max(0,S+(k?1:-1));p||(w(k),x(z)),a?.(k)},E=typeof u=="number"?u<=1?"개인":"단체":d;return s.jsx("div",{className:A("block w-full",b&&"cursor-pointer"),onClick:b,children:s.jsxs("div",{className:"overflow-hidden rounded-4 border border-gray-200 bg-white transition-transform duration-200 hover:-translate-y-1 hover:shadow-lg",children:[s.jsx(Yv,{imageUrl:e,alt:i,percent:t,emotion:v,isLiked:N,likeCount:S,onToggleLike:M}),s.jsx(Gv,{title:i,user:l,userImage:c,challengeLabel:E,onChallengeClick:f,date:g})]})})}const Kv={happy:"😎",soso:"🙂",sad:"🥲"};function Qv({title:e,imageUrl:t,percent:n,emotion:r="happy",likes:o,isLiked:a,defaultLiked:i=!1,onLikeToggle:l,user:c,userImage:d,challengeLabel:u,totalMemberCount:f,onChallengeClick:g,date:v,onClick:b,className:p}){const m=typeof a=="boolean",[w,y]=P.useState(i),[x,N]=P.useState(o),S=m?a:w,M=m?o:x;P.useEffect(()=>{m||N(o)},[m,o]);const E=B=>{B.stopPropagation();const Y=!S,K=Math.max(0,M+(Y?1:-1));m||(y(Y),N(K)),l?.(Y)},k=!!(t&&t.trim().length>0),z=Math.min(Math.max(n,0),100),j=typeof f=="number"?f<=1?"개인":"단체":u;return s.jsxs("div",{className:A("flex min-w-[320px] gap-3 rounded-4 border border-gray-200 bg-white p-3 transition-all duration-200 ease-in-out hover:-translate-y-1 hover:shadow-default sm:min-w-[560px]",b&&"cursor-pointer",p),onClick:b,children:[s.jsxs("div",{className:"relative -mb-3 -ml-3 -mt-3 w-[100px] shrink-0 self-stretch overflow-hidden rounded-l-3 bg-gray-100 sm:w-[140px]",children:[k?s.jsx(lt,{src:t,alt:e,width:128,height:128,className:"h-full w-full object-cover"}):s.jsx(Qt,{className:"h-full w-full",logoSize:"sm"}),k?s.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-6 bg-linear-to-t from-black/10 to-transparent"}):null,s.jsx("div",{className:"absolute top-2 left-2 z-10",children:s.jsx("div",{className:"relative flex h-9 w-9 items-center justify-center rounded-full bg-white shadow-[0_4px_10px_rgba(34,34,34,0.18)]",children:s.jsx(Xr,{value:z,size:"sm",showPercentage:!0})})}),s.jsx("div",{className:"absolute top-2 right-2 z-10 text-xl leading-none",children:s.jsx("span",{role:"img","aria-label":r,children:Kv[r]})})]}),s.jsxs("div",{className:"flex flex-1 flex-col min-w-0 gap-2 py-0.5",children:[s.jsx(I,{as:"p",size:"body1",weight:"bold",className:"line-clamp-2 leading-snug text-gray-900",children:e}),s.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),g?.()},className:"block w-fit cursor-pointer rounded-1 px-1 py-0.5 text-left transition-colors hover:bg-gray-100",children:s.jsx(I,{size:"caption1",weight:"medium",className:"truncate text-blue-500",children:j})}),s.jsx("div",{className:"h-px w-full bg-gray-200"}),s.jsxs("div",{className:"mt-auto flex items-center justify-between",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[s.jsx(xt,{imageUrl:d,size:"sm"}),s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[s.jsx(I,{size:"caption2",weight:"bold",className:"truncate text-gray-900",children:c}),s.jsx(I,{size:"caption2",weight:"regular",className:"shrink-0 text-gray-500",children:v})]})]}),s.jsxs("button",{type:"button",onClick:E,className:"flex shrink-0 items-center gap-1 text-gray-500 transition-colors hover:text-red-500",children:[S?s.jsx(Cr,{width:15,height:15,className:"text-red-500"}):s.jsx(xr,{width:15,height:15}),s.jsx(I,{size:"caption2",weight:"medium",className:"text-inherit",children:M})]})]})]})]})}function sl(e,[t,n]){return Math.min(n,Math.max(t,e))}var il=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qv="VisuallyHidden",ll=h.forwardRef((e,t)=>s.jsx(G.span,{...e,ref:t,style:{...il,...e.style}}));ll.displayName=qv;var Xv=ll,Zv=[" ","Enter","ArrowUp","ArrowDown"],Jv=[" ","Enter"],gt="Select",[tr,nr,Rv]=cr(gt),[zt]=Ae(gt,[Rv,Dt]),rr=Dt(),[e0,at]=zt(gt),[t0,n0]=zt(gt),cl=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:f,disabled:g,required:v,form:b}=e,p=rr(t),[m,w]=h.useState(null),[y,x]=h.useState(null),[N,S]=h.useState(!1),M=hn(d),[E,k]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:gt}),[z,j]=Ce({prop:i,defaultProp:l,onChange:c,caller:gt}),B=h.useRef(null),Y=m?b||!!m.closest("form"):!0,[K,U]=h.useState(new Set),O=Array.from(K).map(T=>T.props.value).join(";");return s.jsx(mo,{...p,children:s.jsxs(e0,{required:v,scope:t,trigger:m,onTriggerChange:w,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:S,contentId:Pe(),value:z,onValueChange:j,open:E,onOpenChange:k,dir:M,triggerPointerDownPosRef:B,disabled:g,children:[s.jsx(tr.Provider,{scope:t,children:s.jsx(t0,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(T=>{U(_=>new Set(_).add(T))},[]),onNativeOptionRemove:h.useCallback(T=>{U(_=>{const C=new Set(_);return C.delete(T),C})},[]),children:n})}),Y?s.jsxs(Il,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:f,value:z,onChange:T=>j(T.target.value),disabled:g,form:b,children:[z===void 0?s.jsx("option",{value:""}):null,Array.from(K)]},O):null]})})};cl.displayName=gt;var dl="SelectTrigger",ul=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=rr(n),i=at(dl,n),l=i.disabled||r,c=J(t,i.onTriggerChange),d=nr(n),u=h.useRef("touch"),[f,g,v]=Fl(p=>{const m=d().filter(x=>!x.disabled),w=m.find(x=>x.value===i.value),y=Wl(m,p,w);y!==void 0&&i.onValueChange(y.value)}),b=p=>{l||(i.onOpenChange(!0),v()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return s.jsx(jn,{asChild:!0,...a,children:s.jsx(G.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Ll(i.value)?"":void 0,...o,ref:c,onClick:V(o.onClick,p=>{p.currentTarget.focus(),u.current!=="mouse"&&b(p)}),onPointerDown:V(o.onPointerDown,p=>{u.current=p.pointerType;const m=p.target;m.hasPointerCapture(p.pointerId)&&m.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(b(p),p.preventDefault())}),onKeyDown:V(o.onKeyDown,p=>{const m=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&g(p.key),!(m&&p.key===" ")&&Zv.includes(p.key)&&(b(),p.preventDefault())})})})});ul.displayName=dl;var fl="SelectValue",hl=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,c=at(fl,n),{onValueNodeHasChildrenChange:d}=c,u=a!==void 0,f=J(t,c.onValueNodeChange);return fe(()=>{d(u)},[d,u]),s.jsx(G.span,{...l,ref:f,style:{pointerEvents:"none"},children:Ll(c.value)?s.jsx(s.Fragment,{children:i}):a})});hl.displayName=fl;var r0="SelectIcon",pl=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return s.jsx(G.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});pl.displayName=r0;var o0="SelectPortal",gl=e=>s.jsx(en,{asChild:!0,...e});gl.displayName=o0;var mt="SelectContent",ml=h.forwardRef((e,t)=>{const n=at(mt,e.__scopeSelect),[r,o]=h.useState();if(fe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?dn.createPortal(s.jsx(vl,{scope:e.__scopeSelect,children:s.jsx(tr.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(bl,{...e,ref:t})});ml.displayName=mt;var Le=10,[vl,st]=zt(mt),a0="SelectContentImpl",s0=vt("SelectContent.RemoveScroll"),bl=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:p,avoidCollisions:m,...w}=e,y=at(mt,n),[x,N]=h.useState(null),[S,M]=h.useState(null),E=J(t,L=>N(L)),[k,z]=h.useState(null),[j,B]=h.useState(null),Y=nr(n),[K,U]=h.useState(!1),O=h.useRef(!1);h.useEffect(()=>{if(x)return wo(x)},[x]),Rr();const T=h.useCallback(L=>{const[ne,...ie]=Y().map(re=>re.ref.current),[q]=ie.slice(-1),R=document.activeElement;for(const re of L)if(re===R||(re?.scrollIntoView({block:"nearest"}),re===ne&&S&&(S.scrollTop=0),re===q&&S&&(S.scrollTop=S.scrollHeight),re?.focus(),document.activeElement!==R))return},[Y,S]),_=h.useCallback(()=>T([k,x]),[T,k,x]);h.useEffect(()=>{K&&_()},[K,_]);const{onOpenChange:C,triggerPointerDownPosRef:$}=y;h.useEffect(()=>{if(x){let L={x:0,y:0};const ne=q=>{L={x:Math.abs(Math.round(q.pageX)-($.current?.x??0)),y:Math.abs(Math.round(q.pageY)-($.current?.y??0))}},ie=q=>{L.x<=10&&L.y<=10?q.preventDefault():x.contains(q.target)||C(!1),document.removeEventListener("pointermove",ne),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",ie,{capture:!0})}}},[x,C,$]),h.useEffect(()=>{const L=()=>C(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[C]);const[X,he]=Fl(L=>{const ne=Y().filter(R=>!R.disabled),ie=ne.find(R=>R.ref.current===document.activeElement),q=Wl(ne,L,ie);q&&setTimeout(()=>q.ref.current.focus())}),ke=h.useCallback((L,ne,ie)=>{const q=!O.current&&!ie;(y.value!==void 0&&y.value===ne||q)&&(z(L),q&&(O.current=!0))},[y.value]),se=h.useCallback(()=>x?.focus(),[x]),ae=h.useCallback((L,ne,ie)=>{const q=!O.current&&!ie;(y.value!==void 0&&y.value===ne||q)&&B(L)},[y.value]),ge=r==="popper"?Io:yl,me=ge===Io?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:p,avoidCollisions:m}:{};return s.jsx(vl,{scope:n,content:x,viewport:S,onViewportChange:M,itemRefCallback:ke,selectedItem:k,onItemLeave:se,itemTextRefCallback:ae,focusSelectedItem:_,selectedItemText:j,position:r,isPositioned:K,searchRef:X,children:s.jsx(Zn,{as:s0,allowPinchZoom:!0,children:s.jsx(Dn,{asChild:!0,trapped:y.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:V(o,L=>{y.trigger?.focus({preventScroll:!0}),L.preventDefault()}),children:s.jsx(Xt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:s.jsx(ge,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:L=>L.preventDefault(),...w,...me,onPlaced:()=>U(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:V(w.onKeyDown,L=>{const ne=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!ne&&L.key.length===1&&he(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let q=Y().filter(R=>!R.disabled).map(R=>R.ref.current);if(["ArrowUp","End"].includes(L.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const R=L.target,re=q.indexOf(R);q=q.slice(re+1)}setTimeout(()=>T(q)),L.preventDefault()}})})})})})})});bl.displayName=a0;var i0="SelectItemAlignedPosition",yl=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=at(mt,n),i=st(mt,n),[l,c]=h.useState(null),[d,u]=h.useState(null),f=J(t,E=>u(E)),g=nr(n),v=h.useRef(!1),b=h.useRef(!0),{viewport:p,selectedItem:m,selectedItemText:w,focusSelectedItem:y}=i,x=h.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&p&&m&&w){const E=a.trigger.getBoundingClientRect(),k=d.getBoundingClientRect(),z=a.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(a.dir!=="rtl"){const R=j.left-k.left,re=z.left-R,xe=E.left-re,Z=E.width+xe,ve=Math.max(Z,k.width),be=window.innerWidth-Le,cn=sl(re,[Le,Math.max(Le,be-ve)]);l.style.minWidth=Z+"px",l.style.left=cn+"px"}else{const R=k.right-j.right,re=window.innerWidth-z.right-R,xe=window.innerWidth-E.right-re,Z=E.width+xe,ve=Math.max(Z,k.width),be=window.innerWidth-Le,cn=sl(re,[Le,Math.max(Le,be-ve)]);l.style.minWidth=Z+"px",l.style.right=cn+"px"}const B=g(),Y=window.innerHeight-Le*2,K=p.scrollHeight,U=window.getComputedStyle(d),O=parseInt(U.borderTopWidth,10),T=parseInt(U.paddingTop,10),_=parseInt(U.borderBottomWidth,10),C=parseInt(U.paddingBottom,10),$=O+T+K+C+_,X=Math.min(m.offsetHeight*5,$),he=window.getComputedStyle(p),ke=parseInt(he.paddingTop,10),se=parseInt(he.paddingBottom,10),ae=E.top+E.height/2-Le,ge=Y-ae,me=m.offsetHeight/2,L=m.offsetTop+me,ne=O+T+L,ie=$-ne;if(ne<=ae){const R=B.length>0&&m===B[B.length-1].ref.current;l.style.bottom="0px";const re=d.clientHeight-p.offsetTop-p.offsetHeight,xe=Math.max(ge,me+(R?se:0)+re+_),Z=ne+xe;l.style.height=Z+"px"}else{const R=B.length>0&&m===B[0].ref.current;l.style.top="0px";const xe=Math.max(ae,O+p.offsetTop+(R?ke:0)+me)+ie;l.style.height=xe+"px",p.scrollTop=ne-ae+p.offsetTop}l.style.margin=`${Le}px 0`,l.style.minHeight=X+"px",l.style.maxHeight=Y+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[g,a.trigger,a.valueNode,l,d,p,m,w,a.dir,r]);fe(()=>x(),[x]);const[N,S]=h.useState();fe(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const M=h.useCallback(E=>{E&&b.current===!0&&(x(),y?.(),b.current=!1)},[x,y]);return s.jsx(c0,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:M,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:s.jsx(G.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});yl.displayName=i0;var l0="SelectPopperPosition",Io=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Le,...a}=e,i=rr(n);return s.jsx(vo,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Io.displayName=l0;var[c0,Lo]=zt(mt,{}),Fo="SelectViewport",wl=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=st(Fo,n),i=Lo(Fo,n),l=J(t,a.onViewportChange),c=h.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(tr.Slot,{scope:n,children:s.jsx(G.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:V(o.onScroll,d=>{const u=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:g}=i;if(g?.current&&f){const v=Math.abs(c.current-u.scrollTop);if(v>0){const b=window.innerHeight-Le*2,p=parseFloat(f.style.minHeight),m=parseFloat(f.style.height),w=Math.max(p,m);if(w<b){const y=w+v,x=Math.min(b,y),N=y-x;f.style.height=x+"px",f.style.bottom==="0px"&&(u.scrollTop=N>0?N:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});wl.displayName=Fo;var xl="SelectGroup",[d0,u0]=zt(xl),Cl=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pe();return s.jsx(d0,{scope:n,id:o,children:s.jsx(G.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Cl.displayName=xl;var Nl="SelectLabel",Sl=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=u0(Nl,n);return s.jsx(G.div,{id:o.id,...r,ref:t})});Sl.displayName=Nl;var or="SelectItem",[f0,kl]=zt(or),Al=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=at(or,n),c=st(or,n),d=l.value===r,[u,f]=h.useState(a??""),[g,v]=h.useState(!1),b=J(t,y=>c.itemRefCallback?.(y,r,o)),p=Pe(),m=h.useRef("touch"),w=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(f0,{scope:n,value:r,disabled:o,textId:p,isSelected:d,onItemTextChange:h.useCallback(y=>{f(x=>x||(y?.textContent??"").trim())},[]),children:s.jsx(tr.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:s.jsx(G.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:V(i.onFocus,()=>v(!0)),onBlur:V(i.onBlur,()=>v(!1)),onClick:V(i.onClick,()=>{m.current!=="mouse"&&w()}),onPointerUp:V(i.onPointerUp,()=>{m.current==="mouse"&&w()}),onPointerDown:V(i.onPointerDown,y=>{m.current=y.pointerType}),onPointerMove:V(i.onPointerMove,y=>{m.current=y.pointerType,o?c.onItemLeave?.():m.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:V(i.onKeyDown,y=>{c.searchRef?.current!==""&&y.key===" "||(Jv.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Al.displayName=or;var nn="SelectItemText",Pl=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=at(nn,n),l=st(nn,n),c=kl(nn,n),d=n0(nn,n),[u,f]=h.useState(null),g=J(t,w=>f(w),c.onItemTextChange,w=>l.itemTextRefCallback?.(w,c.value,c.disabled)),v=u?.textContent,b=h.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:p,onNativeOptionRemove:m}=d;return fe(()=>(p(b),()=>m(b)),[p,m,b]),s.jsxs(s.Fragment,{children:[s.jsx(G.span,{id:c.textId,...a,ref:g}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?dn.createPortal(a.children,i.valueNode):null]})});Pl.displayName=nn;var El="SelectItemIndicator",_l=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kl(El,n).isSelected?s.jsx(G.span,{"aria-hidden":!0,...r,ref:t}):null});_l.displayName=El;var Wo="SelectScrollUpButton",Ml=h.forwardRef((e,t)=>{const n=st(Wo,e.__scopeSelect),r=Lo(Wo,e.__scopeSelect),[o,a]=h.useState(!1),i=J(t,r.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollTop>0;a(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?s.jsx(Dl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Ml.displayName=Wo;var zo="SelectScrollDownButton",Tl=h.forwardRef((e,t)=>{const n=st(zo,e.__scopeSelect),r=Lo(zo,e.__scopeSelect),[o,a]=h.useState(!1),i=J(t,r.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?s.jsx(Dl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Tl.displayName=zo;var Dl=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=st("SelectScrollButton",n),i=h.useRef(null),l=nr(n),c=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),fe(()=>{l().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),s.jsx(G.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:V(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:V(o.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:V(o.onPointerLeave,()=>{c()})})}),h0="SelectSeparator",Ol=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(G.div,{"aria-hidden":!0,...r,ref:t})});Ol.displayName=h0;var Bo="SelectArrow",p0=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=rr(n),a=at(Bo,n),i=st(Bo,n);return a.open&&i.position==="popper"?s.jsx(bo,{...o,...r,ref:t}):null});p0.displayName=Bo;var g0="SelectBubbleInput",Il=h.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=h.useRef(null),a=J(r,o),i=ws(t);return h.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const f=new Event("change",{bubbles:!0});u.call(l,t),l.dispatchEvent(f)}},[i,t]),s.jsx(G.select,{...n,style:{...il,...n.style},ref:a,defaultValue:t})});Il.displayName=g0;function Ll(e){return e===""||e===void 0}function Fl(e){const t=et(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(i=>{const l=n.current+i;t(l),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Wl(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=m0(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function m0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var v0=cl,b0=ul,y0=hl,w0=pl,x0=gl,C0=ml,N0=wl,S0=Cl,k0=Sl,A0=Al,P0=Pl,E0=_l,_0=Ml,M0=Tl,T0=Ol;const D0=v0,O0=S0,I0=y0;function L0({className:e,size:t="default",children:n,...r}){const o=t==="sm";return s.jsxs(b0,{"data-slot":"select-trigger","data-size":t,className:A("group flex w-full items-center justify-between whitespace-nowrap border-2 bg-white outline-none transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-gray-500 focus-visible:ring-3 focus-visible:ring-main-300/60",o?"h-10 min-w-[150px] rounded-3 border-gray-300 px-3.5":"h-10 min-w-[150px] rounded-3 border-gray-300 px-4 shadow-[0_4px_10px_rgba(34,34,34,0.06)]",e),...r,children:[s.jsx(I,{size:"body2",weight:"medium",className:"line-clamp-1 text-gray-900",children:n}),s.jsx(w0,{asChild:!0,children:s.jsx(wn,{"data-slot":"select-chevron",className:A("pointer-events-none shrink-0 text-gray-600 transition-transform duration-200 group-data-[state=open]:rotate-180","h-4 w-4"),strokeWidth:2.8})})]})}function F0({className:e,children:t,...n}){return s.jsxs(A0,{"data-slot":"select-item",className:A("relative flex w-full cursor-pointer items-center gap-3 rounded-2 px-3.5 py-2.5 outline-hidden select-none","text-gray-900 transition-colors focus:bg-gray-100 focus:text-gray-900","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center",children:s.jsx(E0,{children:s.jsx(Ct,{className:"size-4 text-main-800"})})}),s.jsx(P0,{children:s.jsx(I,{size:"body2",weight:"medium",children:t})})]})}function W0({className:e,...t}){return s.jsx(T0,{"data-slot":"select-separator",className:A("pointer-events-none my-1 h-px bg-gray-200",e),...t})}function zl({className:e,...t}){return s.jsx(_0,{"data-slot":"select-scroll-up-button",className:A("flex cursor-default items-center justify-center py-1 text-gray-600",e),...t,children:s.jsx($a,{className:"size-4"})})}function Bl({className:e,...t}){return s.jsx(M0,{"data-slot":"select-scroll-down-button",className:A("flex cursor-default items-center justify-center py-1 text-gray-600",e),...t,children:s.jsx(wn,{className:"size-4"})})}function z0({className:e,children:t,position:n="popper",...r}){return s.jsx(x0,{children:s.jsxs(C0,{"data-slot":"select-content",className:A("relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1","rounded-[24px] border-2 border-gray-300 bg-white shadow-[0_10px_20px_rgba(34,34,34,0.1)]",e),position:n,...r,children:[s.jsx(zl,{}),s.jsx(N0,{className:A("p-2",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:t}),s.jsx(Bl,{})]})})}function B0({className:e,...t}){return s.jsx(k0,{"data-slot":"select-label",className:A("px-4 py-2 text-xs font-bold text-gray-500",e),...t})}function $0({goals:e,defaultGoals:t=[],onGoalsChange:n,placeholder:r="목표를 입력하세요",disabled:o=!1,addOnBlur:a=!1,inputAriaLabel:i="목표 입력",className:l,...c}){const d=e!==void 0,[u,f]=P.useState(t),[g,v]=P.useState(""),b=P.useRef(!1),p=d?e:u,m=x=>{d||f(x),n?.(x)},w=()=>{if(o)return;const x=g.trim();x&&(m([...p,x]),v(""))},y=x=>{o||m(p.filter((N,S)=>S!==x))};return s.jsxs("div",{className:A("flex w-full flex-col gap-4",l),...c,children:[p.map((x,N)=>s.jsxs("div",{className:"flex h-16 w-full items-center justify-between rounded-4 border border-gray-300 bg-white px-5",children:[s.jsx(I,{size:"body1",weight:"bold",className:"line-clamp-1 text-gray-900",children:x}),s.jsx("button",{type:"button","aria-label":`목표 삭제: ${x}`,disabled:o,onClick:()=>y(N),className:A("inline-flex h-8 w-8 items-center justify-center rounded-2 text-gray-600 transition-colors hover:cursor-pointer",!o&&"hover:bg-gray-100 hover:text-gray-700",o&&"cursor-not-allowed text-gray-400"),children:s.jsx(kn,{className:"h-5 w-5"})})]},`${x}-${N}`)),s.jsx("input",{type:"text",value:g,disabled:o,"aria-label":i,placeholder:r,onChange:x=>v(x.target.value),onCompositionStart:()=>{b.current=!0},onCompositionEnd:()=>{b.current=!1},onKeyDown:x=>{x.key==="Enter"&&(x.nativeEvent.isComposing||b.current||x.nativeEvent.keyCode===229||(x.preventDefault(),w()))},onBlur:()=>{a&&w()},className:A("h-16 w-full rounded-4 border border-gray-300 bg-white px-5","text-xl font-medium text-gray-900 placeholder:text-gray-500","outline-none transition-all duration-200","focus-visible:border-main-500 focus-visible:ring-3 focus-visible:ring-main-300/60",o&&"cursor-not-allowed opacity-60")})]})}function H0({onChange:e,size:t=300,defaultImageUrl:n,changeLabel:r="Change",...o}){const a=Math.max(t,120),i=Math.max(Math.round(a*.3),28),l=Math.max(Math.round(i*.6),18),c=P.useRef(null),d=P.useRef(null),[u,f]=P.useState(n??null),g=()=>{c.current?.click()};P.useEffect(()=>{f(n??null)},[n]),P.useEffect(()=>()=>{d.current&&URL.revokeObjectURL(d.current)},[]);const v=b=>{const p=b.target.files?.[0];if(p){d.current&&URL.revokeObjectURL(d.current);const m=URL.createObjectURL(p);d.current=m,f(m)}};return s.jsxs("div",{className:"relative inline-flex",style:{width:a,height:a},children:[s.jsx("input",{type:"file",accept:"image/*",ref:c,className:"hidden",onChange:b=>{e!==void 0&&e(b),v(b)},...o}),s.jsx("button",{type:"button",onClick:g,"aria-label":"이미지 선택",className:A("relative h-full w-full overflow-hidden rounded-full","cursor-pointer",u?"bg-main-300":"border-2 border-dashed border-gray-400 bg-white"),children:u?s.jsx("img",{src:u,alt:"이미지 미리보기",className:"h-full w-full object-cover",loading:"lazy"}):s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsx(Vt,{width:l,height:i,className:"text-gray-300"})})}),s.jsxs("button",{type:"button",onClick:g,className:A("absolute bottom-0 left-1/2 z-10 inline-flex h-9 -translate-x-1/2 translate-y-1/2 items-center gap-1.5 rounded-full border border-gray-200 bg-white px-5","cursor-pointer shadow-[0_6px_16px_rgba(34,34,34,0.16)]"),children:[s.jsx(An,{className:"h-3.5 w-3.5 text-gray-700"}),s.jsx(I,{size:"caption1",weight:"medium",className:"text-gray-700",children:r})]})]})}function V0({mainText:e,subText:t,imageSrc:n,imageAlt:r="icon",gradientFrom:o,gradientTo:a,onClick:i,className:l}){return s.jsxs("div",{className:A("relative overflow-hidden rounded-2 text-white","flex flex-col justify-between","p-4 sm:p-4 lg:p-6","h-24 w-full sm:h-36 lg:h-47.5 lg:w-56","hover:shadow-default hover:-translate-y-1 transition-all duration-300",i&&"cursor-pointer",l),style:{backgroundImage:`linear-gradient(to bottom right, ${o}, ${a})`},onClick:i,children:[s.jsxs("div",{className:"flex w-full flex-col gap-0.5 sm:gap-1",children:[s.jsx(I,{size:"caption3",weight:"medium",className:"opacity-80",children:e}),s.jsx(I,{size:"caption2",weight:"bold",className:"mt-0.5 sm:text-xl sm:mt-1 lg:text-2xl",children:t})]}),s.jsx("div",{className:"absolute bottom-2 left-2 sm:bottom-4 sm:left-4 lg:bottom-6 lg:left-6",children:s.jsx(lt,{src:n,alt:r,width:24,height:40,className:"object-contain sm:w-9 sm:h-15 lg:w-12 lg:h-19.5"})}),s.jsx(I,{size:"body2",weight:"bold",className:"absolute right-2 bottom-2 sm:right-4 sm:bottom-4 sm:text-3xl lg:right-6 lg:bottom-6 lg:text-4xl",children:"→"})]})}function j0(){return s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(Vt,{width:24,height:40,className:"text-gray-300"}),s.jsx(I,{size:"body1",weight:"bold",className:"my-2.5 text-gray-300",children:"1D1S"})]})}const rn="...";function Y0({currentPage:e,totalPages:t,siblingCount:n=1}){return h.useMemo(()=>{if(n+5>=t)return Array.from({length:t},(f,g)=>g+1);const a=Math.max(e-n,1),i=Math.min(e+n,t),l=a>2,c=i<t-2,d=1,u=t;if(!l&&c){const f=3+2*n;return[...Array.from({length:f},(v,b)=>b+1),rn,t]}if(l&&!c){const f=3+2*n,g=Array.from({length:f},(v,b)=>t-f+b+1);return[d,rn,...g]}if(l&&c){const f=Array.from({length:i-a+1},(g,v)=>a+v);return[d,rn,...f,rn,u]}},[t,e,n])}function G0({currentPage:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o}){const a=Y0({currentPage:e,totalPages:t,siblingCount:r});if(e===0||t<2)return null;const i=()=>{e<t&&n(e+1)},l=()=>{e>1&&n(e-1)};return s.jsxs("nav",{role:"navigation","aria-label":"Pagination",className:A("flex items-center justify-center gap-3",o),children:[s.jsx(de,{onClick:l,disabled:e===1,variant:"outlined",size:"icon",className:"rounded-3 border-gray-300 bg-white text-gray-600 hover:bg-gray-100 disabled:bg-gray-100 disabled:text-gray-400","aria-label":"Go to previous page",children:s.jsx(Nn,{className:"h-5 w-5"})}),a?.map((c,d)=>{if(c===rn)return s.jsx("div",{className:"flex h-10 min-w-10 items-center justify-center px-1",children:s.jsx("span",{className:"text-lg font-medium text-gray-400",children:"..."})},`dots-${d}`);const u=c===e;return s.jsx(de,{onClick:()=>n(c),variant:u?"default":"secondary",size:"icon",className:A("rounded-3",u?"bg-main-800 text-white shadow-[0_8px_16px_rgba(255,87,34,0.3)] hover:bg-main-800":"bg-gray-100 text-gray-700 hover:bg-gray-200"),"aria-current":u?"page":void 0,children:s.jsx("span",{className:A("text-2xl leading-none",u?"font-bold text-white":"font-medium text-gray-700"),children:c})},c)}),s.jsx(de,{onClick:i,disabled:e===t,variant:"outlined",size:"icon",className:"rounded-3 border-gray-300 bg-white text-gray-600 hover:bg-gray-100 disabled:bg-gray-100 disabled:text-gray-400","aria-label":"Go to next page",children:s.jsx(Sn,{className:"h-5 w-5"})})]})}function $l({value:e,label:t,showLabel:n,showValueText:r=!0,valueText:o,infinite:a=!1,thickness:i=6,fillColor:l,trackColor:c,className:d,labelClassName:u,valueClassName:f,trackClassName:g,fillClassName:v,...b}){const p=Math.min(Math.max(e,0),100),m=a?"100%":`${p}%`,w=o??(a?"∞":`${p}%`),y=n??t!==void 0;return s.jsxs("div",{className:A("w-full",d),...b,children:[(y||r)&&s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y?s.jsx(I,{size:"caption1",weight:"medium",className:A("line-clamp-1 text-gray-800",u),children:t}):s.jsx("span",{}),r?s.jsx(I,{size:"caption1",weight:"medium",className:A("shrink-0 text-gray-600",f),children:w}):null]}),s.jsx("div",{className:A("mt-2.5 overflow-hidden rounded-full bg-gray-200",g),style:{height:`${i}px`,...c?{backgroundColor:c}:{}},children:s.jsx("div",{className:A("h-full rounded-full bg-main-800 transition-all duration-200",v),style:{width:m,...l?{backgroundColor:l}:{}}})})]})}function U0({value:e}){const t=Math.max(0,Math.floor(e)),[n,r]=P.useState(0);P.useEffect(()=>{let a=0;const i=performance.now(),l=Math.min(1400,Math.max(500,t*30)),c=u=>1-(1-u)**3;r(0);const d=u=>{const f=u-i,g=Math.min(f/l,1),v=Math.floor(t*c(g));r(v),g<1&&(a=requestAnimationFrame(d))};return a=requestAnimationFrame(d),()=>{cancelAnimationFrame(a)}},[t]);const o=Math.max(String(t).length,1);return s.jsx("span",{className:"inline-flex justify-start tabular-nums",style:{minWidth:`${o}ch`},children:n})}function Fe({className:e}){return s.jsx("span",{"aria-hidden":!0,className:A("block animate-pulse rounded-md bg-gray-200",e)})}function Bt({className:e}){return s.jsx("span",{"aria-hidden":!0,className:A("block h-12 w-12 shrink-0 animate-pulse bg-gray-200",e),style:{borderRadius:"9999px"}})}function on({loading:e,skeleton:t,children:n,className:r,durationMs:o=280}){return s.jsxs("div",{className:A("relative",r),children:[s.jsx("div",{className:A("transition-opacity ease-out",e?"pointer-events-none opacity-0":"opacity-100"),style:{transitionDuration:`${o}ms`},"aria-hidden":e,children:n}),s.jsx("div",{className:A("pointer-events-none absolute inset-0 transition-opacity ease-out",e?"opacity-100":"opacity-0"),style:{transitionDuration:`${o}ms`},"aria-hidden":!e,children:t})]})}const K0=[{id:"1",title:"알고리즘 부시기",progress:56,tone:"blue"},{id:"2",title:"새벽 러닝",progress:84,tone:"green"}],Q0={blue:"#3b82f6",green:"#22c55e",orange:"#ff5722"};function q0({isLoggedIn:e=!0,isLoading:t=!1,userName:n,userSubtitle:r,userImage:o,streakDays:a,fixed:i=!0,collapsible:l=!0,className:c,diaryButtonLabel:d="일지 작성하기",myPageButtonLabel:u="마이페이지",loginButtonLabel:f="로그인",loginPromptMessage:g="로그인하고 연속 기록을 시작해보세요",settingButtonLabel:v="설정",challengeTitle:b="참여중인 챌린지",challenges:p=K0,emptyChallengeMessage:m="챌린지가 없어요.",joinChallengeButtonLabel:w="챌린지 참여하기",joinChallengeMaxUserCount:y,createChallengeButtonLabel:x="챌린지 생성하기",onCollapseClick:N,onOpenSettings:S,onWriteDiary:M,onGoMyPage:E,onLogin:k,onJoinChallenge:z,onCreateChallenge:j,onChallengeClick:B}){const[T,_]=P.useState(!1),[C,$]=P.useState("expanded"),[X,he]=P.useState(!0),[ke,se]=P.useState(!1),[ae,ge]=P.useState(null),me=P.useRef(null),L=P.useRef([]),ne=typeof y=="number"&&y<=0,ie=()=>{L.current.forEach(Z=>clearTimeout(Z)),L.current=[]},q=(Z,ve)=>{const be=setTimeout(()=>{Z(),L.current=L.current.filter(cn=>cn!==be)},ve);L.current.push(be)};P.useEffect(()=>()=>{ie()},[]);const R=()=>{const Z=me.current;return Z?Math.max(Math.ceil(Z.scrollHeight),0):null},re=()=>{const Z=me.current;if(!Z)return null;const ve=Z.style.height;Z.style.height="auto";const be=R();return Z.style.height=ve,be},xe=()=>{if(ke)return;const Z=!T,ve=me.current?.offsetHeight;ve&&ve>0&&ge(ve),se(!0),he(!1),N?.(),ie(),q(()=>{_(Z),$(Z?"collapsed":"expanded")},140),q(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{const be=re();be&&be>0&&ge(be)})})},440),q(()=>{he(!0)},720),q(()=>{ge(null),se(!1)},940)};return s.jsxs("div",{className:A("z-40 transition-[width] duration-300 ease-in-out",i?"fixed top-4 right-3 max-h-[calc(100vh-2rem)]":"relative max-h-190",T?"w-22":"w-69",c),children:[l&&s.jsx(de,{type:"button",variant:"outlined",size:"icon","aria-label":"사이드바 접기",onClick:xe,disabled:ke,className:"absolute top-6 -left-4 z-20 h-8 w-8 min-w-8 rounded-full p-0 text-gray-500 shadow-sm",children:s.jsx(Sn,{className:A("h-4 w-4 transition-transform duration-200",T?"rotate-180":"rotate-0")})}),s.jsx("aside",{ref:me,className:A("relative flex w-full flex-col overflow-x-hidden overflow-y-auto rounded-4 border border-gray-200 bg-white p-3 shadow-[0_6px_16px_rgba(34,34,34,0.06)]",ae!==null&&"transition-[height] duration-300 ease-in-out",i&&"max-h-[calc(100vh-2rem)]",!i&&"max-h-full"),style:{height:ae?`${ae}px`:void 0},children:s.jsx("div",{className:A("flex h-full w-full transition-opacity ease-out",X?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),style:{transitionDuration:`${X?220:140}ms`},"aria-hidden":!X,children:C==="expanded"?s.jsxs("div",{className:"flex w-full flex-col px-2 py-2",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsx(on,{loading:t,skeleton:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bt,{}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(Fe,{className:"h-6 w-24 rounded-sm"}),s.jsx(Fe,{className:"h-4 w-28 rounded-sm"})]})]}),children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(xt,{imageUrl:o,size:"md",className:"ring-2 ring-mint-900/40"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(I,{size:"body1",weight:"bold",className:"text-gray-900",children:e?n??"고라니":"게스트"}),s.jsx(I,{size:"caption1",weight:"regular",className:"text-gray-600",children:e?r??"":"로그인 후 이용 가능"})]})]})}),s.jsx(on,{loading:t,skeleton:s.jsx(Fe,{className:"h-9 w-9 rounded-full"}),children:e?s.jsx(de,{type:"button",variant:"ghost",size:"icon","aria-label":"설정",onClick:S,className:"text-gray-500 hover:text-gray-700",children:s.jsx(kr,{className:"h-5 w-5"})}):null})]}),s.jsx("div",{className:"mt-6 rounded-3 border border-main-400 bg-main-200 px-4 py-4 text-center",children:s.jsx(on,{loading:t,skeleton:s.jsxs("div",{children:[s.jsx(Fe,{className:"mx-auto h-4 w-20 rounded-sm"}),s.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2",children:[s.jsx(Bt,{className:"h-7 w-7"}),s.jsx(Fe,{className:"h-9 w-16 rounded-sm"}),s.jsx(Fe,{className:"h-5 w-12 rounded-sm"})]})]}),children:s.jsxs("div",{children:[s.jsx(I,{as:"p",size:"caption1",weight:"medium",className:"text-gray-700",children:"현재 연속 기록"}),e?s.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2.5",children:[s.jsx(Ba,{className:"h-7 w-7 text-main-800",strokeWidth:2.2}),s.jsx(I,{size:"heading1",weight:"bold",className:"text-main-800",children:s.jsx(U0,{value:a})}),s.jsx(I,{size:"body1",weight:"bold",className:"text-gray-800",children:"Days"})]}):s.jsx(I,{as:"p",size:"caption1",weight:"medium",className:"mt-3 block leading-tight text-gray-700",children:g})]})})}),s.jsx(on,{loading:t,skeleton:s.jsxs("div",{children:[s.jsx(Fe,{className:"mt-5 h-10 w-full rounded-2"}),s.jsx(Fe,{className:"mt-3 h-10 w-full rounded-2"}),s.jsxs("div",{className:"mt-5 pt-5",children:[s.jsx(Fe,{className:"h-4 w-30 rounded-sm"}),s.jsx("div",{className:"mt-4 flex flex-col gap-3",children:Array.from({length:2},(Z,ve)=>s.jsxs("div",{className:"rounded-2 border border-gray-100 px-3 py-3",children:[s.jsx(Fe,{className:"h-4 w-32 rounded-sm"}),s.jsx(Fe,{className:"mt-3 h-2 w-full rounded-full"})]},ve))})]})]}),children:e?s.jsxs(s.Fragment,{children:[s.jsxs(de,{className:"mt-5 w-full",size:"medium",disabled:p.length===0,onClick:M,children:[s.jsx(An,{className:"h-4 w-4"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:d})]}),s.jsxs(de,{variant:"outlined",className:"mt-3 w-full",size:"medium",onClick:E,children:[s.jsx(Nt,{className:"h-4 w-4"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:u})]}),s.jsxs("div",{className:"mt-5 pt-5",children:[s.jsx(I,{size:"caption1",weight:"medium",className:"text-gray-500",children:b}),p.length>0?s.jsx("div",{className:"mt-4 flex flex-col gap-1",children:p.map(Z=>{const ve=Z.tone??"blue";return s.jsx("div",{role:B?"button":void 0,tabIndex:B?0:void 0,onClick:B?()=>B(Z):void 0,onKeyDown:B?be=>{(be.key==="Enter"||be.key===" ")&&B(Z)}:void 0,className:A("-mx-2 rounded-2 px-2 py-2 transition-colors duration-150",B&&"cursor-pointer hover:bg-gray-100 active:bg-gray-200"),children:s.jsx($l,{label:Z.title,value:Z.progress,infinite:Z.hasDeadline===!1,fillColor:Q0[ve]})},Z.id)})}):s.jsxs("div",{className:"mt-4",children:[s.jsx(I,{as:"p",size:"caption1",weight:"medium",className:"text-gray-600",children:m}),s.jsxs("div",{className:"mt-3 flex flex-col gap-2.5",children:[s.jsx(de,{type:"button",className:"w-full",size:"medium",disabled:ne,onClick:z,children:w}),s.jsx(de,{type:"button",variant:"outlined",className:"w-full",size:"medium",onClick:j,children:x})]})]})]})]}):s.jsxs(de,{className:"mt-5 w-full",size:"medium",onClick:k,children:[s.jsx(Nr,{className:"h-4 w-4"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:f})]})})]}):s.jsx("div",{className:"flex w-full flex-col items-center pt-2",children:s.jsx(on,{loading:t,className:"w-full",skeleton:s.jsxs("div",{className:"flex w-full flex-col items-center",children:[s.jsx(Bt,{}),s.jsxs("div",{className:"mt-5 flex flex-col items-center gap-3",children:[s.jsx(Bt,{className:"h-10 w-10"}),s.jsx(Bt,{className:"h-10 w-10"}),s.jsx(Bt,{className:"h-10 w-10"})]})]}),children:s.jsxs("div",{className:"flex w-full flex-col items-center",children:[s.jsx(xt,{imageUrl:o,size:"md",className:"ring-2 ring-mint-900/40"}),s.jsx("div",{className:"mt-5 flex flex-col items-center gap-3",children:e?s.jsxs(s.Fragment,{children:[s.jsx(de,{type:"button",size:"icon","aria-label":d,onClick:M,children:s.jsx(An,{className:"h-4 w-4"})}),s.jsx(de,{type:"button",variant:"outlined",size:"icon","aria-label":u,onClick:E,children:s.jsx(Nt,{className:"h-4 w-4"})}),s.jsx(de,{type:"button",variant:"outlined",size:"icon","aria-label":v,onClick:S,children:s.jsx(kr,{className:"h-4 w-4"})})]}):s.jsx(de,{type:"button",size:"icon","aria-label":f,onClick:k,children:s.jsx(Nr,{className:"h-4 w-4"})})})]})})})})})]})}const X0=["SUN","MON","TUE","WED","THU","FRI","SAT"];function Z0(e){return e===void 0?"100%":typeof e=="number"?`${e}%`:e}function J0(e="default"){return e==="strong"?"text-gray-900 font-bold":e==="accent"?"text-main-800 font-bold":e==="muted"?"text-gray-500 font-medium":"text-gray-600 font-medium"}function R0(e="main"){return e==="soft"?"bg-main-600/50":"bg-main-800"}function eb({rows:e,weekLabels:t=[...X0],cellMinHeight:n=140,className:r}){return s.jsx("div",{className:A("w-full overflow-hidden rounded-4 border border-gray-300 bg-white",r),children:s.jsxs("table",{className:"w-full table-fixed border-collapse",children:[s.jsx("thead",{children:s.jsx("tr",{children:t.map((o,a)=>s.jsx("th",{className:A("h-8 border-b border-r border-gray-300 bg-gray-100 px-1 text-center align-middle sm:h-12 sm:px-2.5",a===t.length-1&&"border-r-0"),scope:"col",children:s.jsx(I,{size:"caption3",weight:"bold",className:"text-gray-600 sm:text-lg",children:o})},`${o}-${a}`))})}),s.jsx("tbody",{children:e.map((o,a)=>s.jsx("tr",{children:o.map((i,l)=>{const c=i.colSpan??1,d=i.id??`r${a}-c${l}`,u=o.slice(0,l+1).reduce((f,g)=>f+(g.colSpan??1),0)>=7;return s.jsx("td",{colSpan:c,className:A("border-r border-b border-gray-300 align-top",u&&"border-r-0"),children:s.jsx("div",{className:A("flex h-full flex-col gap-1 p-1 sm:gap-2 sm:p-2",i.muted&&"bg-gray-300",i.highlighted&&"bg-main-200 ring-1 ring-inset ring-main-400"),style:{minHeight:`${n}px`},children:i.content?i.content:s.jsxs(s.Fragment,{children:[i.day!==void 0?s.jsx(I,{size:"caption3",weight:"medium",className:A("leading-tight sm:text-lg",J0(i.dayTone)),children:i.day}):null,i.title!==void 0?s.jsx(I,{size:"caption3",weight:"bold",className:"line-clamp-1 text-gray-900 sm:text-lg",children:i.title}):null,i.bars&&i.bars.length>0?s.jsx("div",{className:"mt-0.5 flex flex-col gap-1",children:i.bars.map((f,g)=>s.jsx("span",{className:A("block h-1 rounded-full transition-all duration-200 sm:h-1.5",R0(f.tone)),style:{width:Z0(f.width)}},`${d}-bar-${g}`))}):null,i.subtitle!==void 0?s.jsx(I,{size:"caption3",weight:"medium",className:"hidden text-gray-600 sm:block",children:i.subtitle}):null]})})},d)})},`row-${a}`))})]})})}function tb({icon:e,iconName:t,title:n,value:r,unit:o,className:a,iconClassName:i,...l}){const c=e??(t?s.jsx(ja,{name:t,size:32}):null);return s.jsxs("div",{className:A("rounded-[24px] border border-gray-200 bg-white p-7","shadow-[0_1px_4px_rgba(17,17,17,0.08)]","w-full",a),...l,children:[s.jsxs("div",{className:"flex items-center gap-3.5",children:[s.jsx("div",{className:A("text-main-800","[&_svg]:h-8 [&_svg]:w-8",i),children:c}),s.jsx(I,{size:"heading2",weight:"medium",className:"leading-tight text-gray-600",children:n})]}),s.jsxs("div",{className:"mt-6 flex items-end gap-1.5",children:[s.jsx(I,{size:"display1",weight:"bold",className:"text-gray-900",children:r}),s.jsx(I,{size:"heading2",weight:"medium",className:"pb-1 text-gray-600",children:o})]})]})}const nb={sm:{circle:"h-7 w-7",trackTop:"top-3.5",checkIcon:"h-3 w-3",numberSize:"caption1",labelSize:"body2",labelMargin:"mt-3"},md:{circle:"h-10 w-10",trackTop:"top-5",checkIcon:"h-4 w-4",numberSize:"body1",labelSize:"heading2",labelMargin:"mt-5"},lg:{circle:"h-14 w-14",trackTop:"top-7",checkIcon:"h-5 w-5",numberSize:"body1",labelSize:"heading1",labelMargin:"mt-7"}};function rb({steps:e,currentStep:t,size:n="md",className:r}){const o=nb[n];if(e.length===0)return s.jsx("div",{className:A("w-full",r)});const a=Math.max(e.length-1,0),i=Math.min(Math.max(t-1,0),a),l=`${100/(e.length*2)}%`,c=a===0?100:i/a*100;return s.jsx("div",{className:A("w-full",r),children:s.jsxs("div",{className:"relative",children:[e.length>1?s.jsxs("div",{className:A("absolute",o.trackTop),style:{left:l,right:l},children:[s.jsx("div",{className:"h-0.5 w-full bg-gray-200"}),s.jsx("div",{className:"absolute top-0 left-0 h-0.5 bg-main-800 transition-all duration-300 ease-in-out",style:{width:`${c}%`}})]}):null,s.jsx("ol",{className:"relative z-10 flex items-start",children:e.map((d,u)=>{const f=u<i,g=u===i,v=d.id??`step-${u}`;return s.jsxs("li",{className:"flex flex-1 flex-col items-center",children:[s.jsx("span",{className:A("flex items-center justify-center rounded-full border-2 bg-white transition-colors duration-200",o.circle,f&&"border-main-800 bg-main-800 text-white",g&&"border-main-800 bg-main-800 text-white ring-4 ring-main-300",!f&&!g&&"border-gray-300 text-gray-600"),"aria-current":g?"step":void 0,children:f?s.jsx(Ct,{className:o.checkIcon,strokeWidth:2.5}):s.jsx(I,{size:o.numberSize,weight:"bold",className:A(g?"text-white":"text-gray-600"),children:u+1})}),s.jsx(I,{size:o.labelSize,weight:g?"bold":"medium",className:A("text-center leading-tight",o.labelMargin,f&&"text-gray-900",g&&"text-main-800",!f&&!g&&"text-gray-600"),children:d.label})]},v)})})]})})}function ob({data:e=[],size:t=26,gap:n=8,className:r,renderCellActions:o}){const[a,i]=P.useState(null),[l,c]=P.useState(null),d=P.useRef(null),u=P.useRef(!1),f=P.useRef(!1),g=()=>{d.current!==null&&(clearTimeout(d.current),d.current=null)},v=b=>b<=0?"bg-gray-100":b===1?"bg-main-300":b===2?"bg-main-500":b===3?"bg-main-700":"bg-main-800";return s.jsx("div",{className:A("w-full overflow-x-auto pb-2",r),children:s.jsx("div",{className:"grid w-max grid-flow-col grid-rows-7",style:{gridTemplateRows:`repeat(7, ${t}px)`,gridAutoColumns:`${t}px`,gap:`${n}px`},children:e.map((b,p)=>s.jsxs(Ao,{open:a===p,onOpenChange:m=>{if(!m){if(u.current){u.current=!1;return}i(null),c(null),f.current=!0,setTimeout(()=>{f.current=!1},200)}},children:[s.jsx(Po,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":`${b.date} · ${b.count}회 활동`,className:A("cursor-pointer transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-800 focus-visible:ring-offset-1",v(b.count),l===p&&"ring-2 ring-gray-800 ring-offset-1"),style:{width:t,height:t,borderRadius:`${Math.max(4,Math.round(t*.23))}px`},onMouseEnter:()=>{g(),l===null&&!f.current&&i(p)},onMouseLeave:()=>{l===null&&(d.current=setTimeout(()=>i(null),80))},onClick:()=>{g(),l===p?(c(null),i(null),f.current=!0,setTimeout(()=>{f.current=!1},200)):(u.current=!0,c(p),i(p))}})}),s.jsx(Eo,{children:s.jsxs(_o,{side:"top",sideOffset:4,onOpenAutoFocus:m=>m.preventDefault(),onMouseEnter:()=>{g()},onMouseLeave:()=>{l===null&&i(null)},className:A("z-50 min-w-[120px] rounded-xl bg-gray-900 px-3 py-2 text-white shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2"),children:[s.jsxs("p",{className:"whitespace-nowrap text-xs",children:[b.date," · ",b.count,"회 활동"]}),l===p&&o?s.jsx("div",{className:"mt-2",children:o(b)}):null]})})]},p))})})}const Hl=dt(["w-full transition-all duration-200 outline-none","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-gray-500","focus-visible:outline-none"],{variants:{variant:{default:["rounded-3 border border-gray-300 bg-white px-5 text-gray-900 shadow-none","focus-visible:border-main-500 focus-visible:ring-3 focus-visible:ring-main-300/60"],search:["rounded-3 !h-10 border border-gray-300 bg-white pl-11 pr-4 text-gray-700 placeholder:text-gray-500","focus-visible:border-main-500 focus-visible:ring-3 focus-visible:ring-main-300/60"]},multiline:{false:"h-10 py-0",true:"min-h-[320px] resize-none py-8 align-top leading-relaxed"}},defaultVariants:{variant:"default",multiline:!1}});function ab(e,t){return"body2"}function sb({label:e,labelHint:t,required:n,htmlFor:r}){return e?s.jsxs("label",{htmlFor:r,className:"mb-2 inline-flex items-center gap-2",children:[s.jsx(I,{size:"body1",weight:"bold",className:"text-gray-900",children:e}),n?s.jsx(I,{size:"body1",weight:"bold",className:"text-main-800",children:"*"}):null,t?s.jsx(I,{size:"body1",weight:"regular",className:"text-gray-500",children:t}):null]}):null}const $o=h.forwardRef(({className:e,variant:t="default",label:n,labelHint:r,error:o,type:a,multiline:i=!1,rows:l=8,cols:c,required:d,id:u,...f},g)=>{const v=t==="search",b=ab(t,i);return s.jsxs("div",{className:"flex w-full flex-col",children:[s.jsx(sb,{label:n,labelHint:r,required:d,htmlFor:u}),s.jsxs("div",{className:"relative w-full",children:[i?s.jsx("textarea",{id:u,rows:l,cols:c,required:d,className:A(Cn({size:b,weight:"regular"}),Hl({variant:t,multiline:!0}),e),ref:g,...f}):s.jsx("input",{id:u,type:a,required:d,className:A(Cn({size:b,weight:v?"light":"regular"}),Hl({variant:t,multiline:!1}),e),ref:g,...f}),v&&!i?s.jsx(Va,{width:20,height:20,className:"pointer-events-none absolute top-1/2 left-3.5 -translate-y-1/2 text-gray-500"}):null]}),o?s.jsx(I,{size:"caption1",weight:"regular",className:"mt-2 text-warning",children:o}):null]})});$o.displayName="TextField";const Vl=h.forwardRef((e,t)=>s.jsx($o,{...e,ref:t,multiline:!0}));Vl.displayName="TextArea";var jl="Toggle",Ho=h.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[i,l]=Ce({prop:n,onChange:o,defaultProp:r??!1,caller:jl});return s.jsx(G.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:V(e.onClick,()=>{e.disabled||l(!i)})})});Ho.displayName=jl;var ib=Ho;const lb=dt(["inline-flex w-fit items-center justify-center gap-2.5 border bg-white whitespace-nowrap","text-gray-700 transition-all duration-200","cursor-pointer disabled:pointer-events-none disabled:opacity-50","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-main-300/60","hover:bg-gray-100","data-[state=on]:border-main-800 data-[state=on]:bg-main-800 data-[state=on]:text-white","data-[state=on]:shadow-[0_4px_10px_rgba(255,87,34,0.22)]"],{variants:{shape:{rounded:"h-10 rounded-full px-5",square:"h-10 rounded-3 px-4"}},defaultVariants:{shape:"rounded"}});function cb({icon:e,shape:t="rounded",children:n,className:r,...o}){return s.jsxs(ib,{className:A(lb({shape:t}),r),...o,children:[e?s.jsx("span",{className:"inline-flex items-center justify-center text-[18px] leading-none text-inherit [&>svg]:h-5 [&>svg]:w-5",children:e}):null,s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:n})]})}var Vo="rovingFocusGroup.onEntryFocus",db={bubbles:!1,cancelable:!0},an="RovingFocusGroup",[jo,Yl,ub]=cr(an),[fb,Gl]=Ae(an,[ub]),[hb,pb]=fb(an),Ul=h.forwardRef((e,t)=>s.jsx(jo.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(jo.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(gb,{...e,ref:t})})}));Ul.displayName=an;var gb=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=e,g=h.useRef(null),v=J(t,g),b=hn(a),[p,m]=Ce({prop:i,defaultProp:l??null,onChange:c,caller:an}),[w,y]=h.useState(!1),x=et(d),N=Yl(n),S=h.useRef(!1),[M,E]=h.useState(0);return h.useEffect(()=>{const k=g.current;if(k)return k.addEventListener(Vo,x),()=>k.removeEventListener(Vo,x)},[x]),s.jsx(hb,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:p,onItemFocus:h.useCallback(k=>m(k),[m]),onItemShiftTab:h.useCallback(()=>y(!0),[]),onFocusableItemAdd:h.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:h.useCallback(()=>E(k=>k-1),[]),children:s.jsx(G.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{S.current=!0}),onFocus:V(e.onFocus,k=>{const z=!S.current;if(k.target===k.currentTarget&&z&&!w){const j=new CustomEvent(Vo,db);if(k.currentTarget.dispatchEvent(j),!j.defaultPrevented){const B=N().filter(T=>T.focusable),Y=B.find(T=>T.active),K=B.find(T=>T.id===p),O=[Y,K,...B].filter(Boolean).map(T=>T.ref.current);ql(O,u)}}S.current=!1}),onBlur:V(e.onBlur,()=>y(!1))})})}),Kl="RovingFocusGroupItem",Ql=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...l}=e,c=Pe(),d=a||c,u=pb(Kl,n),f=u.currentTabStopId===d,g=Yl(n),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:p}=u;return h.useEffect(()=>{if(r)return v(),()=>b()},[r,v,b]),s.jsx(jo.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:s.jsx(G.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...l,ref:t,onMouseDown:V(e.onMouseDown,m=>{r?u.onItemFocus(d):m.preventDefault()}),onFocus:V(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:V(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const w=bb(m,u.orientation,u.dir);if(w!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let x=g().filter(N=>N.focusable).map(N=>N.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const N=x.indexOf(m.currentTarget);x=u.loop?yb(x,N+1):x.slice(N+1)}setTimeout(()=>ql(x))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:p!=null}):i})})});Ql.displayName=Kl;var mb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vb(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bb(e,t,n){const r=vb(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return mb[r]}function ql(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function yb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wb=Ul,xb=Ql,it="ToggleGroup",[Xl]=Ae(it,[Gl]),Zl=Gl(),Yo=P.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return s.jsx(Cb,{...o,ref:t})}if(n==="multiple"){const o=r;return s.jsx(Nb,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${it}\``)});Yo.displayName=it;var[Jl,Rl]=Xl(it),Cb=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,l]=Ce({prop:n,defaultProp:r??"",onChange:o,caller:it});return s.jsx(Jl,{scope:e.__scopeToggleGroup,type:"single",value:P.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:P.useCallback(()=>l(""),[l]),children:s.jsx(ec,{...a,ref:t})})}),Nb=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,l]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:it}),c=P.useCallback(u=>l((f=[])=>[...f,u]),[l]),d=P.useCallback(u=>l((f=[])=>f.filter(g=>g!==u)),[l]);return s.jsx(Jl,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:d,children:s.jsx(ec,{...a,ref:t})})});Yo.displayName=it;var[Sb,kb]=Xl(it),ec=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...c}=e,d=Zl(n),u=hn(i),f={role:"group",dir:u,...c};return s.jsx(Sb,{scope:n,rovingFocus:o,disabled:r,children:o?s.jsx(wb,{asChild:!0,...d,orientation:a,dir:u,loop:l,children:s.jsx(G.div,{...f,ref:t})}):s.jsx(G.div,{...f,ref:t})})}),ar="ToggleGroupItem",tc=P.forwardRef((e,t)=>{const n=Rl(ar,e.__scopeToggleGroup),r=kb(ar,e.__scopeToggleGroup),o=Zl(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,l={...e,pressed:a,disabled:i},c=P.useRef(null);return r.rovingFocus?s.jsx(xb,{asChild:!0,...o,focusable:!i,active:a,ref:c,children:s.jsx(nc,{...l,ref:t})}):s.jsx(nc,{...l,ref:t})});tc.displayName=ar;var nc=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Rl(ar,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(Ho,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Ab=Yo,Pb=tc;const Eb=dt(["inline-flex w-fit items-center justify-center gap-2.5 border bg-white whitespace-nowrap","text-gray-700 transition-all duration-200","cursor-pointer disabled:pointer-events-none disabled:opacity-50","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-main-300/60","hover:bg-gray-100","data-[state=on]:border-main-800 data-[state=on]:bg-main-800 data-[state=on]:text-white","data-[state=on]:shadow-[0_4px_10px_rgba(255,87,34,0.22)]"],{variants:{shape:{rounded:"h-10 rounded-full px-5",square:"h-10 rounded-3 px-4"}},defaultVariants:{shape:"rounded"}});function _b({children:e,className:t,...n}){return s.jsx(Ab,{"data-slot":"toggle-group",className:A("flex flex-wrap gap-4 rounded-none",t),...n,children:e})}function Mb({icon:e,shape:t="rounded",children:n,className:r,...o}){return s.jsxs(Pb,{"data-slot":"toggle-group-item",className:A(Eb({shape:t}),r),...o,children:[e?s.jsx("span",{className:"inline-flex items-center justify-center text-[18px] leading-none text-inherit [&>svg]:h-5 [&>svg]:w-5",children:e}):null,s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:n})]})}var[sr]=Ae("Tooltip",[Dt]),ir=Dt(),rc="TooltipProvider",Tb=700,Go="tooltip.open",[Db,Uo]=sr(rc),oc=e=>{const{__scopeTooltip:t,delayDuration:n=Tb,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=h.useRef(!0),l=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),s.jsx(Db,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};oc.displayName=rc;var sn="Tooltip",[Ob,ln]=sr(sn),ac=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,c=Uo(sn,e.__scopeTooltip),d=ir(t),[u,f]=h.useState(null),g=Pe(),v=h.useRef(0),b=i??c.disableHoverableContent,p=l??c.delayDuration,m=h.useRef(!1),[w,y]=Ce({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Go))):c.onClose(),a?.(E)},caller:sn}),x=h.useMemo(()=>w?m.current?"delayed-open":"instant-open":"closed",[w]),N=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,m.current=!1,y(!0)},[y]),S=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),M=h.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{m.current=!0,y(!0),v.current=0},p)},[p,y]);return h.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),s.jsx(mo,{...d,children:s.jsx(Ob,{scope:t,contentId:g,open:w,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?M():N()},[c.isOpenDelayedRef,M,N]),onTriggerLeave:h.useCallback(()=>{b?S():(window.clearTimeout(v.current),v.current=0)},[S,b]),onOpen:N,onClose:S,disableHoverableContent:b,children:n})})};ac.displayName=sn;var Ko="TooltipTrigger",sc=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ln(Ko,n),a=Uo(Ko,n),i=ir(n),l=h.useRef(null),c=J(t,l,o.onTriggerChange),d=h.useRef(!1),u=h.useRef(!1),f=h.useCallback(()=>d.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),s.jsx(jn,{asChild:!0,...i,children:s.jsx(G.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:V(e.onPointerMove,g=>{g.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:V(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:V(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});sc.displayName=Ko;var Qo="TooltipPortal",[Ib,Lb]=sr(Qo,{forceMount:void 0}),ic=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=ln(Qo,t);return s.jsx(Ib,{scope:t,forceMount:n,children:s.jsx(We,{present:n||a.open,children:s.jsx(en,{asChild:!0,container:o,children:r})})})};ic.displayName=Qo;var $t="TooltipContent",lc=h.forwardRef((e,t)=>{const n=Lb($t,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=ln($t,e.__scopeTooltip);return s.jsx(We,{present:r||i.open,children:i.disableHoverableContent?s.jsx(cc,{side:o,...a,ref:t}):s.jsx(Fb,{side:o,...a,ref:t})})}),Fb=h.forwardRef((e,t)=>{const n=ln($t,e.__scopeTooltip),r=Uo($t,e.__scopeTooltip),o=h.useRef(null),a=J(t,o),[i,l]=h.useState(null),{trigger:c,onClose:d}=n,u=o.current,{onPointerInTransitChange:f}=r,g=h.useCallback(()=>{l(null),f(!1)},[f]),v=h.useCallback((b,p)=>{const m=b.currentTarget,w={x:b.clientX,y:b.clientY},y=Hb(w,m.getBoundingClientRect()),x=Vb(w,y),N=jb(p.getBoundingClientRect()),S=Gb([...x,...N]);l(S),f(!0)},[f]);return h.useEffect(()=>()=>g(),[g]),h.useEffect(()=>{if(c&&u){const b=m=>v(m,u),p=m=>v(m,c);return c.addEventListener("pointerleave",b),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",p)}}},[c,u,v,g]),h.useEffect(()=>{if(i){const b=p=>{const m=p.target,w={x:p.clientX,y:p.clientY},y=c?.contains(m)||u?.contains(m),x=!Yb(w,i);y?g():x&&(g(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,u,i,d,g]),s.jsx(cc,{...e,ref:a})}),[Wb,zb]=sr(sn,{isInside:!1}),Bb=pc("TooltipContent"),cc=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,c=ln($t,n),d=ir(n),{onClose:u}=c;return h.useEffect(()=>(document.addEventListener(Go,u),()=>document.removeEventListener(Go,u)),[u]),h.useEffect(()=>{if(c.trigger){const f=g=>{g.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),s.jsx(Xt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:s.jsxs(vo,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(Bb,{children:r}),s.jsx(Wb,{scope:n,isInside:!0,children:s.jsx(Xv,{id:c.contentId,role:"tooltip",children:o||r})})]})})});lc.displayName=$t;var dc="TooltipArrow",$b=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ir(n);return zb(dc,n).isInside?null:s.jsx(bo,{...o,...r,ref:t})});$b.displayName=dc;function Hb(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Vb(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function jb(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Yb(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],c=t[i],d=l.x,u=l.y,f=c.x,g=c.y;u>r!=g>r&&n<(f-d)*(r-u)/(g-u)+d&&(o=!o)}return o}function Gb(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ub(t)}function Ub(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Kb=oc,Qb=ac,qb=sc,Xb=ic,Zb=lc;function Jb({delayDuration:e=200,...t}){return s.jsx(Kb,{delayDuration:e,...t})}const Rb=Qb,ey=qb;function ty({className:e,sideOffset:t=4,...n}){return s.jsx(Xb,{children:s.jsx(Zb,{sideOffset:t,className:A("z-50 overflow-hidden rounded-1.5 bg-gray-900 px-3 py-1.5 text-caption2 text-white shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})})}function ny({className:e,userName:t,userImageSrc:n,timeLabel:r,isAuthor:o=!1,onAccept:a,onReject:i}){return s.jsxs("div",{className:A("flex h-[50px] items-center justify-between gap-3 rounded-3 border border-gray-200 bg-white px-3",e),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsx("div",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-gray-200",children:n?s.jsx(lt,{src:n,alt:`${t} profile`,fill:!0,className:"object-cover"}):s.jsx(Nt,{className:"h-4.5 w-4.5 text-gray-500"})}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx(I,{size:"body2",weight:"bold",className:"line-clamp-1 text-gray-900",children:t}),r?s.jsx(I,{size:"caption2",weight:"regular",className:"text-gray-600",children:r}):null]})]}),o?s.jsx("div",{className:"flex shrink-0 items-center gap-2",children:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button","aria-label":"수락",onClick:a,className:"inline-flex h-9 w-9 items-center justify-center rounded-2 bg-main-200 text-main-800 transition-colors hover:bg-main-300",children:s.jsx(Ct,{className:"h-4.5 w-4.5",strokeWidth:2.6})}),s.jsx("button",{type:"button","aria-label":"거절",onClick:i,className:"inline-flex h-9 w-9 items-center justify-center rounded-2 bg-gray-100 text-gray-600 transition-colors hover:bg-gray-200",children:s.jsx(kn,{className:"h-4.5 w-4.5",strokeWidth:2.4})})]})}):null]})}D.Accordion=Fd,D.AccordionContent=Bd,D.AccordionItem=Wd,D.AccordionTrigger=zd,D.AppHeader=gu,D.BannerCarousel=yu,D.Button=de,D.Calendar=Ur,D.ChallengeCard=Ip,D.ChallengeListItem=Lp,D.CheckContainer=Fp,D.CheckList=Hp,D.Checkbox=qr,D.CircleAvatar=xt,D.CircularProgress=Xr,D.DatePicker=bv,D.Dialog=Fv,D.DialogClose=zv,D.DialogContent=Bv,D.DialogDescription=jv,D.DialogFooter=Hv,D.DialogHeader=$v,D.DialogOverlay=al,D.DialogPortal=ol,D.DialogTitle=Vv,D.DialogTrigger=Wv,D.DiaryCard=Uv,D.DiaryListItem=Qv,D.GoalAddList=$0,D.Icon=ja,D.ImagePicker=H0,D.ImagePlaceholder=Qt,D.InfoButton=V0,D.PageWatermark=j0,D.Pagination=G0,D.ProgressBar=$l,D.RangeDatePicker=yv,D.RightSidebar=q0,D.ScheduleCalendar=eb,D.Select=D0,D.SelectContent=z0,D.SelectGroup=O0,D.SelectItem=F0,D.SelectLabel=B0,D.SelectScrollDownButton=Bl,D.SelectScrollUpButton=zl,D.SelectSeparator=W0,D.SelectTrigger=L0,D.SelectValue=I0,D.StatContainer=tb,D.StepIndicator=rb,D.Streak=ob,D.Tag=qt,D.Text=I,D.TextArea=Vl,D.TextField=$o,D.Toggle=cb,D.ToggleGroup=_b,D.ToggleGroupItem=Mb,D.Tooltip=Rb,D.TooltipContent=ty,D.TooltipProvider=Jb,D.TooltipTrigger=ey,D.UserListItem=ny,D.cn=A,D.textVariants=Cn,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Pv="DialogDescriptionWarning",Ev=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nl(Pv).contentName}}.`;return h.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},_v=Vi,Mv=Yi,Tv=Ui,Dv=Ki,Ov=Qi,Iv=Xi,Lv=Ji,rl=el;const Fv=_v,Wv=Mv,ol=Tv,zv=rl;function al({className:e,...t}){return s.jsx(Dv,{className:A("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function Bv({className:e,children:t,...n}){return s.jsxs(ol,{children:[s.jsx(al,{}),s.jsxs(Ov,{className:A("fixed top-[50%] left-[50%] z-50","w-full max-w-[calc(100%-2rem)] sm:max-w-md","translate-x-[-50%] translate-y-[-50%]","rounded-2 bg-white p-4 sm:p-6 shadow-default","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","[&_[data-slot=button].h-13]:!h-11","[&_[data-slot=button].h-13]:!px-3.5","[&_[data-slot=button].h-11]:!h-9","[&_[data-slot=button]_.text-lg]:!text-base","[&_[data-slot=button]_.text-base]:!text-sm","duration-200",e),...n,children:[t,s.jsxs(rl,{className:"absolute top-3 right-3 sm:top-4 sm:right-4 rounded-full p-1.5 opacity-70 transition-opacity hover:opacity-100 focus:outline-none cursor-pointer",children:[s.jsx(kn,{width:18,height:18,className:"text-gray-500 sm:w-5 sm:h-5"}),s.jsx("span",{className:"sr-only",children:"닫기"})]})]})]})}function $v({className:e,...t}){return s.jsx("div",{className:A("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Hv({className:e,...t}){return s.jsx("div",{className:A("mt-4 sm:mt-6 flex flex-row justify-end gap-2",e),...t})}function Vv({className:e,children:t,...n}){return s.jsx(Iv,{asChild:!0,...n,children:s.jsx(I,{size:"heading2",weight:"bold",className:A("text-black",e),children:t})})}function jv({className:e,children:t,...n}){return s.jsx(Lv,{asChild:!0,...n,children:s.jsx(I,{size:"body2",weight:"regular",className:A("text-gray-600 mt-2",e),children:t})})}function Yv({imageUrl:e,alt:t,percent:n,emotion:r,isLiked:o,likeCount:a,onToggleLike:i}){const l={happy:"😎",soso:"🙂",sad:"🥲"},c=Math.min(Math.max(n,0),100),d=!!(e&&e.trim().length>0);return s.jsxs("div",{className:"relative aspect-4/5 w-full overflow-hidden bg-gray-100",children:[d?s.jsx(lt,{src:e,alt:t,fill:!0,className:"h-full w-full object-cover"}):s.jsx(Qt,{className:"h-full w-full",logoSize:"lg"}),d?s.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-linear-to-t from-black/15 to-transparent"}):null,s.jsx("div",{className:"absolute top-3 left-3 z-20",children:s.jsx("div",{className:"relative flex h-10 w-10 items-center justify-center rounded-full bg-white shadow-[0_6px_14px_rgba(34,34,34,0.2)] sm:h-12 sm:w-12",children:s.jsx(Xr,{value:c,size:"sm",showPercentage:!0})})}),s.jsx("div",{className:"absolute top-3 right-3 z-20 text-2xl leading-none sm:text-3xl",children:s.jsx("span",{role:"img","aria-label":r,children:l[r]})}),s.jsx("div",{className:"absolute bottom-3 left-3 z-20",children:s.jsxs("button",{type:"button",onClick:u=>{u.stopPropagation(),i()},className:"inline-flex cursor-pointer items-center gap-1 rounded-full bg-main-800 px-3 py-1.5 text-white shadow-[0_4px_10px_rgba(34,34,34,0.25)] transition-colors hover:bg-main-900",children:[o?s.jsx(Cr,{width:14,height:14,className:"text-white"}):s.jsx(xr,{width:14,height:14,className:"text-white"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-white",children:a})]})})]})}function Gv({title:e,user:t,userImage:n,challengeLabel:r,onChallengeClick:o,date:a}){return s.jsxs("div",{className:"flex w-full flex-col gap-2 p-3 sm:gap-3 sm:p-4",children:[s.jsx(I,{as:"p",size:"body2",weight:"bold",className:"line-clamp-2 min-h-8 leading-tight text-gray-900 sm:text-xl sm:min-h-10",children:e}),s.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),o?.()},className:A("block w-full cursor-pointer rounded-1 px-1 py-0.5 text-left transition-colors","hover:bg-gray-100"),children:s.jsx(I,{size:"caption1",weight:"medium",className:"block w-full truncate text-blue-500 sm:text-lg",children:r})}),s.jsx("div",{className:"h-px w-full bg-gray-200"}),s.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[s.jsx(xt,{imageUrl:n,size:"sm"}),s.jsxs("div",{className:"flex flex-col gap-0.5 sm:gap-1",children:[s.jsx(I,{size:"caption1",weight:"bold",className:"text-gray-900 sm:text-lg",children:t}),s.jsx(I,{size:"caption3",weight:"regular",className:"text-gray-500 sm:text-sm",children:a})]})]})]})}function Uv({imageUrl:e,percent:t,likes:n,isLiked:r,defaultLiked:o=!1,onLikeToggle:a,title:i,user:l,userImage:c,challengeLabel:d,totalMemberCount:u,onChallengeClick:f,date:g,emotion:v="happy",onClick:b}){const p=typeof r=="boolean",[m,w]=P.useState(o),[y,x]=P.useState(n),N=p?r:m,S=p?n:y;P.useEffect(()=>{p||x(n)},[p,n]);const M=()=>{const k=!N,z=Math.max(0,S+(k?1:-1));p||(w(k),x(z)),a?.(k)},E=typeof u=="number"?u<=1?"개인":"단체":d;return s.jsx("div",{className:A("block w-full",b&&"cursor-pointer"),onClick:b,children:s.jsxs("div",{className:"overflow-hidden rounded-4 border border-gray-200 bg-white transition-transform duration-200 hover:-translate-y-1 hover:shadow-lg",children:[s.jsx(Yv,{imageUrl:e,alt:i,percent:t,emotion:v,isLiked:N,likeCount:S,onToggleLike:M}),s.jsx(Gv,{title:i,user:l,userImage:c,challengeLabel:E,onChallengeClick:f,date:g})]})})}const Kv={happy:"😎",soso:"🙂",sad:"🥲"};function Qv({title:e,imageUrl:t,percent:n,emotion:r="happy",likes:o,isLiked:a,defaultLiked:i=!1,onLikeToggle:l,user:c,userImage:d,challengeLabel:u,totalMemberCount:f,onChallengeClick:g,date:v,onClick:b,className:p}){const m=typeof a=="boolean",[w,y]=P.useState(i),[x,N]=P.useState(o),S=m?a:w,M=m?o:x;P.useEffect(()=>{m||N(o)},[m,o]);const E=B=>{B.stopPropagation();const Y=!S,K=Math.max(0,M+(Y?1:-1));m||(y(Y),N(K)),l?.(Y)},k=!!(t&&t.trim().length>0),z=Math.min(Math.max(n,0),100),j=typeof f=="number"?f<=1?"개인":"단체":u;return s.jsxs("div",{className:A("flex min-w-[320px] gap-3 rounded-4 border border-gray-200 bg-white p-3 transition-all duration-200 ease-in-out hover:-translate-y-1 hover:shadow-default sm:min-w-[560px]",b&&"cursor-pointer",p),onClick:b,children:[s.jsxs("div",{className:"relative -mb-3 -ml-3 -mt-3 w-[100px] shrink-0 self-stretch overflow-hidden rounded-l-3 bg-gray-100 sm:w-[140px]",children:[k?s.jsx(lt,{src:t,alt:e,width:128,height:128,className:"h-full w-full object-cover"}):s.jsx(Qt,{className:"h-full w-full",logoSize:"sm"}),k?s.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-6 bg-linear-to-t from-black/10 to-transparent"}):null,s.jsx("div",{className:"absolute top-2 left-2 z-10",children:s.jsx("div",{className:"relative flex h-9 w-9 items-center justify-center rounded-full bg-white shadow-[0_4px_10px_rgba(34,34,34,0.18)]",children:s.jsx(Xr,{value:z,size:"sm",showPercentage:!0})})}),s.jsx("div",{className:"absolute top-2 right-2 z-10 text-xl leading-none",children:s.jsx("span",{role:"img","aria-label":r,children:Kv[r]})})]}),s.jsxs("div",{className:"flex flex-1 flex-col min-w-0 gap-2 py-0.5",children:[s.jsx(I,{as:"p",size:"body1",weight:"bold",className:"line-clamp-2 leading-snug text-gray-900",children:e}),s.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),g?.()},className:"block w-fit cursor-pointer rounded-1 px-1 py-0.5 text-left transition-colors hover:bg-gray-100",children:s.jsx(I,{size:"caption1",weight:"medium",className:"truncate text-blue-500",children:j})}),s.jsx("div",{className:"h-px w-full bg-gray-200"}),s.jsxs("div",{className:"mt-auto flex items-center justify-between",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[s.jsx(xt,{imageUrl:d,size:"sm"}),s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[s.jsx(I,{size:"caption2",weight:"bold",className:"truncate text-gray-900",children:c}),s.jsx(I,{size:"caption2",weight:"regular",className:"shrink-0 text-gray-500",children:v})]})]}),s.jsxs("button",{type:"button",onClick:E,className:"flex shrink-0 items-center gap-1 text-gray-500 transition-colors hover:text-red-500",children:[S?s.jsx(Cr,{width:15,height:15,className:"text-red-500"}):s.jsx(xr,{width:15,height:15}),s.jsx(I,{size:"caption2",weight:"medium",className:"text-inherit",children:M})]})]})]})]})}function sl(e,[t,n]){return Math.min(n,Math.max(t,e))}var il=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qv="VisuallyHidden",ll=h.forwardRef((e,t)=>s.jsx(G.span,{...e,ref:t,style:{...il,...e.style}}));ll.displayName=qv;var Xv=ll,Zv=[" ","Enter","ArrowUp","ArrowDown"],Jv=[" ","Enter"],gt="Select",[tr,nr,Rv]=cr(gt),[zt]=Ae(gt,[Rv,Dt]),rr=Dt(),[e0,at]=zt(gt),[t0,n0]=zt(gt),cl=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:f,disabled:g,required:v,form:b}=e,p=rr(t),[m,w]=h.useState(null),[y,x]=h.useState(null),[N,S]=h.useState(!1),M=hn(d),[E,k]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:gt}),[z,j]=Ce({prop:i,defaultProp:l,onChange:c,caller:gt}),B=h.useRef(null),Y=m?b||!!m.closest("form"):!0,[K,U]=h.useState(new Set),O=Array.from(K).map(T=>T.props.value).join(";");return s.jsx(mo,{...p,children:s.jsxs(e0,{required:v,scope:t,trigger:m,onTriggerChange:w,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:S,contentId:Pe(),value:z,onValueChange:j,open:E,onOpenChange:k,dir:M,triggerPointerDownPosRef:B,disabled:g,children:[s.jsx(tr.Provider,{scope:t,children:s.jsx(t0,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(T=>{U(_=>new Set(_).add(T))},[]),onNativeOptionRemove:h.useCallback(T=>{U(_=>{const C=new Set(_);return C.delete(T),C})},[]),children:n})}),Y?s.jsxs(Il,{"aria-hidden":!0,required:v,tabIndex:-1,name:u,autoComplete:f,value:z,onChange:T=>j(T.target.value),disabled:g,form:b,children:[z===void 0?s.jsx("option",{value:""}):null,Array.from(K)]},O):null]})})};cl.displayName=gt;var dl="SelectTrigger",ul=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=rr(n),i=at(dl,n),l=i.disabled||r,c=J(t,i.onTriggerChange),d=nr(n),u=h.useRef("touch"),[f,g,v]=Fl(p=>{const m=d().filter(x=>!x.disabled),w=m.find(x=>x.value===i.value),y=Wl(m,p,w);y!==void 0&&i.onValueChange(y.value)}),b=p=>{l||(i.onOpenChange(!0),v()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return s.jsx(jn,{asChild:!0,...a,children:s.jsx(G.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Ll(i.value)?"":void 0,...o,ref:c,onClick:V(o.onClick,p=>{p.currentTarget.focus(),u.current!=="mouse"&&b(p)}),onPointerDown:V(o.onPointerDown,p=>{u.current=p.pointerType;const m=p.target;m.hasPointerCapture(p.pointerId)&&m.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(b(p),p.preventDefault())}),onKeyDown:V(o.onKeyDown,p=>{const m=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&g(p.key),!(m&&p.key===" ")&&Zv.includes(p.key)&&(b(),p.preventDefault())})})})});ul.displayName=dl;var fl="SelectValue",hl=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,c=at(fl,n),{onValueNodeHasChildrenChange:d}=c,u=a!==void 0,f=J(t,c.onValueNodeChange);return fe(()=>{d(u)},[d,u]),s.jsx(G.span,{...l,ref:f,style:{pointerEvents:"none"},children:Ll(c.value)?s.jsx(s.Fragment,{children:i}):a})});hl.displayName=fl;var r0="SelectIcon",pl=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return s.jsx(G.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});pl.displayName=r0;var o0="SelectPortal",gl=e=>s.jsx(en,{asChild:!0,...e});gl.displayName=o0;var mt="SelectContent",ml=h.forwardRef((e,t)=>{const n=at(mt,e.__scopeSelect),[r,o]=h.useState();if(fe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?dn.createPortal(s.jsx(vl,{scope:e.__scopeSelect,children:s.jsx(tr.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(bl,{...e,ref:t})});ml.displayName=mt;var Le=10,[vl,st]=zt(mt),a0="SelectContentImpl",s0=vt("SelectContent.RemoveScroll"),bl=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:p,avoidCollisions:m,...w}=e,y=at(mt,n),[x,N]=h.useState(null),[S,M]=h.useState(null),E=J(t,L=>N(L)),[k,z]=h.useState(null),[j,B]=h.useState(null),Y=nr(n),[K,U]=h.useState(!1),O=h.useRef(!1);h.useEffect(()=>{if(x)return wo(x)},[x]),Rr();const T=h.useCallback(L=>{const[ne,...ie]=Y().map(re=>re.ref.current),[q]=ie.slice(-1),R=document.activeElement;for(const re of L)if(re===R||(re?.scrollIntoView({block:"nearest"}),re===ne&&S&&(S.scrollTop=0),re===q&&S&&(S.scrollTop=S.scrollHeight),re?.focus(),document.activeElement!==R))return},[Y,S]),_=h.useCallback(()=>T([k,x]),[T,k,x]);h.useEffect(()=>{K&&_()},[K,_]);const{onOpenChange:C,triggerPointerDownPosRef:$}=y;h.useEffect(()=>{if(x){let L={x:0,y:0};const ne=q=>{L={x:Math.abs(Math.round(q.pageX)-($.current?.x??0)),y:Math.abs(Math.round(q.pageY)-($.current?.y??0))}},ie=q=>{L.x<=10&&L.y<=10?q.preventDefault():x.contains(q.target)||C(!1),document.removeEventListener("pointermove",ne),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",ie,{capture:!0})}}},[x,C,$]),h.useEffect(()=>{const L=()=>C(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[C]);const[X,he]=Fl(L=>{const ne=Y().filter(R=>!R.disabled),ie=ne.find(R=>R.ref.current===document.activeElement),q=Wl(ne,L,ie);q&&setTimeout(()=>q.ref.current.focus())}),ke=h.useCallback((L,ne,ie)=>{const q=!O.current&&!ie;(y.value!==void 0&&y.value===ne||q)&&(z(L),q&&(O.current=!0))},[y.value]),se=h.useCallback(()=>x?.focus(),[x]),ae=h.useCallback((L,ne,ie)=>{const q=!O.current&&!ie;(y.value!==void 0&&y.value===ne||q)&&B(L)},[y.value]),ge=r==="popper"?Io:yl,me=ge===Io?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:p,avoidCollisions:m}:{};return s.jsx(vl,{scope:n,content:x,viewport:S,onViewportChange:M,itemRefCallback:ke,selectedItem:k,onItemLeave:se,itemTextRefCallback:ae,focusSelectedItem:_,selectedItemText:j,position:r,isPositioned:K,searchRef:X,children:s.jsx(Zn,{as:s0,allowPinchZoom:!0,children:s.jsx(Dn,{asChild:!0,trapped:y.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:V(o,L=>{y.trigger?.focus({preventScroll:!0}),L.preventDefault()}),children:s.jsx(Xt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:s.jsx(ge,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:L=>L.preventDefault(),...w,...me,onPlaced:()=>U(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:V(w.onKeyDown,L=>{const ne=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!ne&&L.key.length===1&&he(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let q=Y().filter(R=>!R.disabled).map(R=>R.ref.current);if(["ArrowUp","End"].includes(L.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const R=L.target,re=q.indexOf(R);q=q.slice(re+1)}setTimeout(()=>T(q)),L.preventDefault()}})})})})})})});bl.displayName=a0;var i0="SelectItemAlignedPosition",yl=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=at(mt,n),i=st(mt,n),[l,c]=h.useState(null),[d,u]=h.useState(null),f=J(t,E=>u(E)),g=nr(n),v=h.useRef(!1),b=h.useRef(!0),{viewport:p,selectedItem:m,selectedItemText:w,focusSelectedItem:y}=i,x=h.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&p&&m&&w){const E=a.trigger.getBoundingClientRect(),k=d.getBoundingClientRect(),z=a.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(a.dir!=="rtl"){const R=j.left-k.left,re=z.left-R,xe=E.left-re,Z=E.width+xe,ve=Math.max(Z,k.width),be=window.innerWidth-Le,cn=sl(re,[Le,Math.max(Le,be-ve)]);l.style.minWidth=Z+"px",l.style.left=cn+"px"}else{const R=k.right-j.right,re=window.innerWidth-z.right-R,xe=window.innerWidth-E.right-re,Z=E.width+xe,ve=Math.max(Z,k.width),be=window.innerWidth-Le,cn=sl(re,[Le,Math.max(Le,be-ve)]);l.style.minWidth=Z+"px",l.style.right=cn+"px"}const B=g(),Y=window.innerHeight-Le*2,K=p.scrollHeight,U=window.getComputedStyle(d),O=parseInt(U.borderTopWidth,10),T=parseInt(U.paddingTop,10),_=parseInt(U.borderBottomWidth,10),C=parseInt(U.paddingBottom,10),$=O+T+K+C+_,X=Math.min(m.offsetHeight*5,$),he=window.getComputedStyle(p),ke=parseInt(he.paddingTop,10),se=parseInt(he.paddingBottom,10),ae=E.top+E.height/2-Le,ge=Y-ae,me=m.offsetHeight/2,L=m.offsetTop+me,ne=O+T+L,ie=$-ne;if(ne<=ae){const R=B.length>0&&m===B[B.length-1].ref.current;l.style.bottom="0px";const re=d.clientHeight-p.offsetTop-p.offsetHeight,xe=Math.max(ge,me+(R?se:0)+re+_),Z=ne+xe;l.style.height=Z+"px"}else{const R=B.length>0&&m===B[0].ref.current;l.style.top="0px";const xe=Math.max(ae,O+p.offsetTop+(R?ke:0)+me)+ie;l.style.height=xe+"px",p.scrollTop=ne-ae+p.offsetTop}l.style.margin=`${Le}px 0`,l.style.minHeight=X+"px",l.style.maxHeight=Y+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[g,a.trigger,a.valueNode,l,d,p,m,w,a.dir,r]);fe(()=>x(),[x]);const[N,S]=h.useState();fe(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const M=h.useCallback(E=>{E&&b.current===!0&&(x(),y?.(),b.current=!1)},[x,y]);return s.jsx(c0,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:M,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:s.jsx(G.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});yl.displayName=i0;var l0="SelectPopperPosition",Io=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Le,...a}=e,i=rr(n);return s.jsx(vo,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Io.displayName=l0;var[c0,Lo]=zt(mt,{}),Fo="SelectViewport",wl=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=st(Fo,n),i=Lo(Fo,n),l=J(t,a.onViewportChange),c=h.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(tr.Slot,{scope:n,children:s.jsx(G.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:V(o.onScroll,d=>{const u=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:g}=i;if(g?.current&&f){const v=Math.abs(c.current-u.scrollTop);if(v>0){const b=window.innerHeight-Le*2,p=parseFloat(f.style.minHeight),m=parseFloat(f.style.height),w=Math.max(p,m);if(w<b){const y=w+v,x=Math.min(b,y),N=y-x;f.style.height=x+"px",f.style.bottom==="0px"&&(u.scrollTop=N>0?N:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});wl.displayName=Fo;var xl="SelectGroup",[d0,u0]=zt(xl),Cl=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pe();return s.jsx(d0,{scope:n,id:o,children:s.jsx(G.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Cl.displayName=xl;var Nl="SelectLabel",Sl=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=u0(Nl,n);return s.jsx(G.div,{id:o.id,...r,ref:t})});Sl.displayName=Nl;var or="SelectItem",[f0,kl]=zt(or),Al=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=at(or,n),c=st(or,n),d=l.value===r,[u,f]=h.useState(a??""),[g,v]=h.useState(!1),b=J(t,y=>c.itemRefCallback?.(y,r,o)),p=Pe(),m=h.useRef("touch"),w=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(f0,{scope:n,value:r,disabled:o,textId:p,isSelected:d,onItemTextChange:h.useCallback(y=>{f(x=>x||(y?.textContent??"").trim())},[]),children:s.jsx(tr.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:s.jsx(G.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:V(i.onFocus,()=>v(!0)),onBlur:V(i.onBlur,()=>v(!1)),onClick:V(i.onClick,()=>{m.current!=="mouse"&&w()}),onPointerUp:V(i.onPointerUp,()=>{m.current==="mouse"&&w()}),onPointerDown:V(i.onPointerDown,y=>{m.current=y.pointerType}),onPointerMove:V(i.onPointerMove,y=>{m.current=y.pointerType,o?c.onItemLeave?.():m.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:V(i.onKeyDown,y=>{c.searchRef?.current!==""&&y.key===" "||(Jv.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Al.displayName=or;var nn="SelectItemText",Pl=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=at(nn,n),l=st(nn,n),c=kl(nn,n),d=n0(nn,n),[u,f]=h.useState(null),g=J(t,w=>f(w),c.onItemTextChange,w=>l.itemTextRefCallback?.(w,c.value,c.disabled)),v=u?.textContent,b=h.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:p,onNativeOptionRemove:m}=d;return fe(()=>(p(b),()=>m(b)),[p,m,b]),s.jsxs(s.Fragment,{children:[s.jsx(G.span,{id:c.textId,...a,ref:g}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?dn.createPortal(a.children,i.valueNode):null]})});Pl.displayName=nn;var El="SelectItemIndicator",_l=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kl(El,n).isSelected?s.jsx(G.span,{"aria-hidden":!0,...r,ref:t}):null});_l.displayName=El;var Wo="SelectScrollUpButton",Ml=h.forwardRef((e,t)=>{const n=st(Wo,e.__scopeSelect),r=Lo(Wo,e.__scopeSelect),[o,a]=h.useState(!1),i=J(t,r.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollTop>0;a(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?s.jsx(Dl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Ml.displayName=Wo;var zo="SelectScrollDownButton",Tl=h.forwardRef((e,t)=>{const n=st(zo,e.__scopeSelect),r=Lo(zo,e.__scopeSelect),[o,a]=h.useState(!1),i=J(t,r.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?s.jsx(Dl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Tl.displayName=zo;var Dl=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=st("SelectScrollButton",n),i=h.useRef(null),l=nr(n),c=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),fe(()=>{l().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),s.jsx(G.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:V(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:V(o.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:V(o.onPointerLeave,()=>{c()})})}),h0="SelectSeparator",Ol=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(G.div,{"aria-hidden":!0,...r,ref:t})});Ol.displayName=h0;var Bo="SelectArrow",p0=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=rr(n),a=at(Bo,n),i=st(Bo,n);return a.open&&i.position==="popper"?s.jsx(bo,{...o,...r,ref:t}):null});p0.displayName=Bo;var g0="SelectBubbleInput",Il=h.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=h.useRef(null),a=J(r,o),i=ws(t);return h.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const f=new Event("change",{bubbles:!0});u.call(l,t),l.dispatchEvent(f)}},[i,t]),s.jsx(G.select,{...n,style:{...il,...n.style},ref:a,defaultValue:t})});Il.displayName=g0;function Ll(e){return e===""||e===void 0}function Fl(e){const t=et(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(i=>{const l=n.current+i;t(l),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Wl(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=m0(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function m0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var v0=cl,b0=ul,y0=hl,w0=pl,x0=gl,C0=ml,N0=wl,S0=Cl,k0=Sl,A0=Al,P0=Pl,E0=_l,_0=Ml,M0=Tl,T0=Ol;const D0=v0,O0=S0,I0=y0;function L0({className:e,size:t="default",children:n,...r}){const o=t==="sm";return s.jsxs(b0,{"data-slot":"select-trigger","data-size":t,className:A("group flex w-full items-center justify-between whitespace-nowrap border-2 bg-white outline-none transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-gray-500 focus-visible:ring-3 focus-visible:ring-main-300/60",o?"h-10 min-w-[150px] rounded-3 border-gray-300 px-3.5":"h-10 min-w-[150px] rounded-3 border-gray-300 px-4 shadow-[0_4px_10px_rgba(34,34,34,0.06)]",e),...r,children:[s.jsx(I,{size:"body2",weight:"medium",className:"line-clamp-1 text-gray-900",children:n}),s.jsx(w0,{asChild:!0,children:s.jsx(wn,{"data-slot":"select-chevron",className:A("pointer-events-none shrink-0 text-gray-600 transition-transform duration-200 group-data-[state=open]:rotate-180","h-4 w-4"),strokeWidth:2.8})})]})}function F0({className:e,children:t,...n}){return s.jsxs(A0,{"data-slot":"select-item",className:A("relative flex w-full cursor-pointer items-center gap-3 rounded-2 px-3.5 py-2.5 outline-hidden select-none","text-gray-900 transition-colors focus:bg-gray-100 focus:text-gray-900","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center",children:s.jsx(E0,{children:s.jsx(Ct,{className:"size-4 text-main-800"})})}),s.jsx(P0,{children:s.jsx(I,{size:"body2",weight:"medium",children:t})})]})}function W0({className:e,...t}){return s.jsx(T0,{"data-slot":"select-separator",className:A("pointer-events-none my-1 h-px bg-gray-200",e),...t})}function zl({className:e,...t}){return s.jsx(_0,{"data-slot":"select-scroll-up-button",className:A("flex cursor-default items-center justify-center py-1 text-gray-600",e),...t,children:s.jsx($a,{className:"size-4"})})}function Bl({className:e,...t}){return s.jsx(M0,{"data-slot":"select-scroll-down-button",className:A("flex cursor-default items-center justify-center py-1 text-gray-600",e),...t,children:s.jsx(wn,{className:"size-4"})})}function z0({className:e,children:t,position:n="popper",...r}){return s.jsx(x0,{children:s.jsxs(C0,{"data-slot":"select-content",className:A("relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1","rounded-[24px] border-2 border-gray-300 bg-white shadow-[0_10px_20px_rgba(34,34,34,0.1)]",e),position:n,...r,children:[s.jsx(zl,{}),s.jsx(N0,{className:A("p-2",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:t}),s.jsx(Bl,{})]})})}function B0({className:e,...t}){return s.jsx(k0,{"data-slot":"select-label",className:A("px-4 py-2 text-xs font-bold text-gray-500",e),...t})}function $0({goals:e,defaultGoals:t=[],onGoalsChange:n,placeholder:r="목표를 입력하세요",disabled:o=!1,addOnBlur:a=!1,inputAriaLabel:i="목표 입력",className:l,...c}){const d=e!==void 0,[u,f]=P.useState(t),[g,v]=P.useState(""),b=P.useRef(!1),p=d?e:u,m=x=>{d||f(x),n?.(x)},w=()=>{if(o)return;const x=g.trim();x&&(m([...p,x]),v(""))},y=x=>{o||m(p.filter((N,S)=>S!==x))};return s.jsxs("div",{className:A("flex w-full flex-col gap-4",l),...c,children:[p.map((x,N)=>s.jsxs("div",{className:"flex h-16 w-full items-center justify-between rounded-4 border border-gray-300 bg-white px-5",children:[s.jsx(I,{size:"body1",weight:"bold",className:"line-clamp-1 text-gray-900",children:x}),s.jsx("button",{type:"button","aria-label":`목표 삭제: ${x}`,disabled:o,onClick:()=>y(N),className:A("inline-flex h-8 w-8 items-center justify-center rounded-2 text-gray-600 transition-colors hover:cursor-pointer",!o&&"hover:bg-gray-100 hover:text-gray-700",o&&"cursor-not-allowed text-gray-400"),children:s.jsx(kn,{className:"h-5 w-5"})})]},`${x}-${N}`)),s.jsx("input",{type:"text",value:g,disabled:o,"aria-label":i,placeholder:r,onChange:x=>v(x.target.value),onCompositionStart:()=>{b.current=!0},onCompositionEnd:()=>{b.current=!1},onKeyDown:x=>{x.key==="Enter"&&(x.nativeEvent.isComposing||b.current||x.nativeEvent.keyCode===229||(x.preventDefault(),w()))},onBlur:()=>{a&&w()},className:A("h-16 w-full rounded-4 border border-gray-300 bg-white px-5","text-xl font-medium text-gray-900 placeholder:text-gray-500","outline-none transition-all duration-200","focus-visible:border-main-500 focus-visible:ring-3 focus-visible:ring-main-300/60",o&&"cursor-not-allowed opacity-60")})]})}function H0({onChange:e,size:t=300,defaultImageUrl:n,changeLabel:r="Change",...o}){const a=Math.max(t,120),i=Math.max(Math.round(a*.3),28),l=Math.max(Math.round(i*.6),18),c=P.useRef(null),d=P.useRef(null),[u,f]=P.useState(n??null),g=()=>{c.current?.click()};P.useEffect(()=>{f(n??null)},[n]),P.useEffect(()=>()=>{d.current&&URL.revokeObjectURL(d.current)},[]);const v=b=>{const p=b.target.files?.[0];if(p){d.current&&URL.revokeObjectURL(d.current);const m=URL.createObjectURL(p);d.current=m,f(m)}};return s.jsxs("div",{className:"relative inline-flex",style:{width:a,height:a},children:[s.jsx("input",{type:"file",accept:"image/*",ref:c,className:"hidden",onChange:b=>{e!==void 0&&e(b),v(b)},...o}),s.jsx("button",{type:"button",onClick:g,"aria-label":"이미지 선택",className:A("relative h-full w-full overflow-hidden rounded-full","cursor-pointer",u?"bg-main-300":"border-2 border-dashed border-gray-400 bg-white"),children:u?s.jsx("img",{src:u,alt:"이미지 미리보기",className:"h-full w-full object-cover",loading:"lazy"}):s.jsx("div",{className:"flex h-full w-full items-center justify-center",children:s.jsx(Vt,{width:l,height:i,className:"text-gray-300"})})}),s.jsxs("button",{type:"button",onClick:g,className:A("absolute bottom-0 left-1/2 z-10 inline-flex h-9 -translate-x-1/2 translate-y-1/2 items-center gap-1.5 rounded-full border border-gray-200 bg-white px-5","cursor-pointer shadow-[0_6px_16px_rgba(34,34,34,0.16)]"),children:[s.jsx(An,{className:"h-3.5 w-3.5 text-gray-700"}),s.jsx(I,{size:"caption1",weight:"medium",className:"text-gray-700 whitespace-nowrap",children:r})]})]})}function V0({mainText:e,subText:t,imageSrc:n,imageAlt:r="icon",gradientFrom:o,gradientTo:a,onClick:i,className:l}){return s.jsxs("div",{className:A("relative overflow-hidden rounded-2 text-white","flex flex-col justify-between","p-4 sm:p-4 lg:p-6","h-24 w-full sm:h-36 lg:h-47.5 lg:w-56","hover:shadow-default hover:-translate-y-1 transition-all duration-300",i&&"cursor-pointer",l),style:{backgroundImage:`linear-gradient(to bottom right, ${o}, ${a})`},onClick:i,children:[s.jsxs("div",{className:"flex w-full flex-col gap-0.5 sm:gap-1",children:[s.jsx(I,{size:"caption3",weight:"medium",className:"opacity-80",children:e}),s.jsx(I,{size:"caption2",weight:"bold",className:"mt-0.5 sm:text-xl sm:mt-1 lg:text-2xl",children:t})]}),s.jsx("div",{className:"absolute bottom-2 left-2 sm:bottom-4 sm:left-4 lg:bottom-6 lg:left-6",children:s.jsx(lt,{src:n,alt:r,width:24,height:40,className:"object-contain sm:w-9 sm:h-15 lg:w-12 lg:h-19.5"})}),s.jsx(I,{size:"body2",weight:"bold",className:"absolute right-2 bottom-2 sm:right-4 sm:bottom-4 sm:text-3xl lg:right-6 lg:bottom-6 lg:text-4xl",children:"→"})]})}function j0(){return s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(Vt,{width:24,height:40,className:"text-gray-300"}),s.jsx(I,{size:"body1",weight:"bold",className:"my-2.5 text-gray-300",children:"1D1S"})]})}const rn="...";function Y0({currentPage:e,totalPages:t,siblingCount:n=1}){return h.useMemo(()=>{if(n+5>=t)return Array.from({length:t},(f,g)=>g+1);const a=Math.max(e-n,1),i=Math.min(e+n,t),l=a>2,c=i<t-2,d=1,u=t;if(!l&&c){const f=3+2*n;return[...Array.from({length:f},(v,b)=>b+1),rn,t]}if(l&&!c){const f=3+2*n,g=Array.from({length:f},(v,b)=>t-f+b+1);return[d,rn,...g]}if(l&&c){const f=Array.from({length:i-a+1},(g,v)=>a+v);return[d,rn,...f,rn,u]}},[t,e,n])}function G0({currentPage:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o}){const a=Y0({currentPage:e,totalPages:t,siblingCount:r});if(e===0||t<2)return null;const i=()=>{e<t&&n(e+1)},l=()=>{e>1&&n(e-1)};return s.jsxs("nav",{role:"navigation","aria-label":"Pagination",className:A("flex items-center justify-center gap-3",o),children:[s.jsx(de,{onClick:l,disabled:e===1,variant:"outlined",size:"icon",className:"rounded-3 border-gray-300 bg-white text-gray-600 hover:bg-gray-100 disabled:bg-gray-100 disabled:text-gray-400","aria-label":"Go to previous page",children:s.jsx(Nn,{className:"h-5 w-5"})}),a?.map((c,d)=>{if(c===rn)return s.jsx("div",{className:"flex h-10 min-w-10 items-center justify-center px-1",children:s.jsx("span",{className:"text-lg font-medium text-gray-400",children:"..."})},`dots-${d}`);const u=c===e;return s.jsx(de,{onClick:()=>n(c),variant:u?"default":"secondary",size:"icon",className:A("rounded-3",u?"bg-main-800 text-white shadow-[0_8px_16px_rgba(255,87,34,0.3)] hover:bg-main-800":"bg-gray-100 text-gray-700 hover:bg-gray-200"),"aria-current":u?"page":void 0,children:s.jsx("span",{className:A("text-2xl leading-none",u?"font-bold text-white":"font-medium text-gray-700"),children:c})},c)}),s.jsx(de,{onClick:i,disabled:e===t,variant:"outlined",size:"icon",className:"rounded-3 border-gray-300 bg-white text-gray-600 hover:bg-gray-100 disabled:bg-gray-100 disabled:text-gray-400","aria-label":"Go to next page",children:s.jsx(Sn,{className:"h-5 w-5"})})]})}function $l({value:e,label:t,showLabel:n,showValueText:r=!0,valueText:o,infinite:a=!1,thickness:i=6,fillColor:l,trackColor:c,className:d,labelClassName:u,valueClassName:f,trackClassName:g,fillClassName:v,...b}){const p=Math.min(Math.max(e,0),100),m=a?"100%":`${p}%`,w=o??(a?"∞":`${p}%`),y=n??t!==void 0;return s.jsxs("div",{className:A("w-full",d),...b,children:[(y||r)&&s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y?s.jsx(I,{size:"caption1",weight:"medium",className:A("line-clamp-1 text-gray-800",u),children:t}):s.jsx("span",{}),r?s.jsx(I,{size:"caption1",weight:"medium",className:A("shrink-0 text-gray-600",f),children:w}):null]}),s.jsx("div",{className:A("mt-2.5 overflow-hidden rounded-full bg-gray-200",g),style:{height:`${i}px`,...c?{backgroundColor:c}:{}},children:s.jsx("div",{className:A("h-full rounded-full bg-main-800 transition-all duration-200",v),style:{width:m,...l?{backgroundColor:l}:{}}})})]})}function U0({value:e}){const t=Math.max(0,Math.floor(e)),[n,r]=P.useState(0);P.useEffect(()=>{let a=0;const i=performance.now(),l=Math.min(1400,Math.max(500,t*30)),c=u=>1-(1-u)**3;r(0);const d=u=>{const f=u-i,g=Math.min(f/l,1),v=Math.floor(t*c(g));r(v),g<1&&(a=requestAnimationFrame(d))};return a=requestAnimationFrame(d),()=>{cancelAnimationFrame(a)}},[t]);const o=Math.max(String(t).length,1);return s.jsx("span",{className:"inline-flex justify-start tabular-nums",style:{minWidth:`${o}ch`},children:n})}function Fe({className:e}){return s.jsx("span",{"aria-hidden":!0,className:A("block animate-pulse rounded-md bg-gray-200",e)})}function Bt({className:e}){return s.jsx("span",{"aria-hidden":!0,className:A("block h-12 w-12 shrink-0 animate-pulse bg-gray-200",e),style:{borderRadius:"9999px"}})}function on({loading:e,skeleton:t,children:n,className:r,durationMs:o=280}){return s.jsxs("div",{className:A("relative",r),children:[s.jsx("div",{className:A("transition-opacity ease-out",e?"pointer-events-none opacity-0":"opacity-100"),style:{transitionDuration:`${o}ms`},"aria-hidden":e,children:n}),s.jsx("div",{className:A("pointer-events-none absolute inset-0 transition-opacity ease-out",e?"opacity-100":"opacity-0"),style:{transitionDuration:`${o}ms`},"aria-hidden":!e,children:t})]})}const K0=[{id:"1",title:"알고리즘 부시기",progress:56,tone:"blue"},{id:"2",title:"새벽 러닝",progress:84,tone:"green"}],Q0={blue:"#3b82f6",green:"#22c55e",orange:"#ff5722"};function q0({isLoggedIn:e=!0,isLoading:t=!1,userName:n,userSubtitle:r,userImage:o,streakDays:a,fixed:i=!0,collapsible:l=!0,className:c,diaryButtonLabel:d="일지 작성하기",myPageButtonLabel:u="마이페이지",loginButtonLabel:f="로그인",loginPromptMessage:g="로그인하고 연속 기록을 시작해보세요",settingButtonLabel:v="설정",challengeTitle:b="참여중인 챌린지",challenges:p=K0,emptyChallengeMessage:m="챌린지가 없어요.",joinChallengeButtonLabel:w="챌린지 참여하기",joinChallengeMaxUserCount:y,createChallengeButtonLabel:x="챌린지 생성하기",onCollapseClick:N,onOpenSettings:S,onWriteDiary:M,onGoMyPage:E,onLogin:k,onJoinChallenge:z,onCreateChallenge:j,onChallengeClick:B}){const[T,_]=P.useState(!1),[C,$]=P.useState("expanded"),[X,he]=P.useState(!0),[ke,se]=P.useState(!1),[ae,ge]=P.useState(null),me=P.useRef(null),L=P.useRef([]),ne=typeof y=="number"&&y<=0,ie=()=>{L.current.forEach(Z=>clearTimeout(Z)),L.current=[]},q=(Z,ve)=>{const be=setTimeout(()=>{Z(),L.current=L.current.filter(cn=>cn!==be)},ve);L.current.push(be)};P.useEffect(()=>()=>{ie()},[]);const R=()=>{const Z=me.current;return Z?Math.max(Math.ceil(Z.scrollHeight),0):null},re=()=>{const Z=me.current;if(!Z)return null;const ve=Z.style.height;Z.style.height="auto";const be=R();return Z.style.height=ve,be},xe=()=>{if(ke)return;const Z=!T,ve=me.current?.offsetHeight;ve&&ve>0&&ge(ve),se(!0),he(!1),N?.(),ie(),q(()=>{_(Z),$(Z?"collapsed":"expanded")},140),q(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{const be=re();be&&be>0&&ge(be)})})},440),q(()=>{he(!0)},720),q(()=>{ge(null),se(!1)},940)};return s.jsxs("div",{className:A("z-40 transition-[width] duration-300 ease-in-out",i?"fixed top-4 right-3 max-h-[calc(100vh-2rem)]":"relative max-h-190",T?"w-22":"w-69",c),children:[l&&s.jsx(de,{type:"button",variant:"outlined",size:"icon","aria-label":"사이드바 접기",onClick:xe,disabled:ke,className:"absolute top-6 -left-4 z-20 h-8 w-8 min-w-8 rounded-full p-0 text-gray-500 shadow-sm",children:s.jsx(Sn,{className:A("h-4 w-4 transition-transform duration-200",T?"rotate-180":"rotate-0")})}),s.jsx("aside",{ref:me,className:A("relative flex w-full flex-col overflow-x-hidden overflow-y-auto rounded-4 border border-gray-200 bg-white p-3 shadow-[0_6px_16px_rgba(34,34,34,0.06)]",ae!==null&&"transition-[height] duration-300 ease-in-out",i&&"max-h-[calc(100vh-2rem)]",!i&&"max-h-full"),style:{height:ae?`${ae}px`:void 0},children:s.jsx("div",{className:A("flex h-full w-full transition-opacity ease-out",X?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),style:{transitionDuration:`${X?220:140}ms`},"aria-hidden":!X,children:C==="expanded"?s.jsxs("div",{className:"flex w-full flex-col px-2 py-2",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsx(on,{loading:t,skeleton:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bt,{}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(Fe,{className:"h-6 w-24 rounded-sm"}),s.jsx(Fe,{className:"h-4 w-28 rounded-sm"})]})]}),children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(xt,{imageUrl:o,size:"md",className:"ring-2 ring-mint-900/40"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(I,{size:"body1",weight:"bold",className:"text-gray-900",children:e?n??"고라니":"게스트"}),s.jsx(I,{size:"caption1",weight:"regular",className:"text-gray-600",children:e?r??"":"로그인 후 이용 가능"})]})]})}),s.jsx(on,{loading:t,skeleton:s.jsx(Fe,{className:"h-9 w-9 rounded-full"}),children:e?s.jsx(de,{type:"button",variant:"ghost",size:"icon","aria-label":"설정",onClick:S,className:"text-gray-500 hover:text-gray-700",children:s.jsx(kr,{className:"h-5 w-5"})}):null})]}),s.jsx("div",{className:"mt-6 rounded-3 border border-main-400 bg-main-200 px-4 py-4 text-center",children:s.jsx(on,{loading:t,skeleton:s.jsxs("div",{children:[s.jsx(Fe,{className:"mx-auto h-4 w-20 rounded-sm"}),s.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2",children:[s.jsx(Bt,{className:"h-7 w-7"}),s.jsx(Fe,{className:"h-9 w-16 rounded-sm"}),s.jsx(Fe,{className:"h-5 w-12 rounded-sm"})]})]}),children:s.jsxs("div",{children:[s.jsx(I,{as:"p",size:"caption1",weight:"medium",className:"text-gray-700",children:"현재 연속 기록"}),e?s.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2.5",children:[s.jsx(Ba,{className:"h-7 w-7 text-main-800",strokeWidth:2.2}),s.jsx(I,{size:"heading1",weight:"bold",className:"text-main-800",children:s.jsx(U0,{value:a})}),s.jsx(I,{size:"body1",weight:"bold",className:"text-gray-800",children:"Days"})]}):s.jsx(I,{as:"p",size:"caption1",weight:"medium",className:"mt-3 block leading-tight text-gray-700",children:g})]})})}),s.jsx(on,{loading:t,skeleton:s.jsxs("div",{children:[s.jsx(Fe,{className:"mt-5 h-10 w-full rounded-2"}),s.jsx(Fe,{className:"mt-3 h-10 w-full rounded-2"}),s.jsxs("div",{className:"mt-5 pt-5",children:[s.jsx(Fe,{className:"h-4 w-30 rounded-sm"}),s.jsx("div",{className:"mt-4 flex flex-col gap-3",children:Array.from({length:2},(Z,ve)=>s.jsxs("div",{className:"rounded-2 border border-gray-100 px-3 py-3",children:[s.jsx(Fe,{className:"h-4 w-32 rounded-sm"}),s.jsx(Fe,{className:"mt-3 h-2 w-full rounded-full"})]},ve))})]})]}),children:e?s.jsxs(s.Fragment,{children:[s.jsxs(de,{className:"mt-5 w-full",size:"medium",disabled:p.length===0,onClick:M,children:[s.jsx(An,{className:"h-4 w-4"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:d})]}),s.jsxs(de,{variant:"outlined",className:"mt-3 w-full",size:"medium",onClick:E,children:[s.jsx(Nt,{className:"h-4 w-4"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:u})]}),s.jsxs("div",{className:"mt-5 pt-5",children:[s.jsx(I,{size:"caption1",weight:"medium",className:"text-gray-500",children:b}),p.length>0?s.jsx("div",{className:"mt-4 flex flex-col gap-1",children:p.map(Z=>{const ve=Z.tone??"blue";return s.jsx("div",{role:B?"button":void 0,tabIndex:B?0:void 0,onClick:B?()=>B(Z):void 0,onKeyDown:B?be=>{(be.key==="Enter"||be.key===" ")&&B(Z)}:void 0,className:A("-mx-2 rounded-2 px-2 py-2 transition-colors duration-150",B&&"cursor-pointer hover:bg-gray-100 active:bg-gray-200"),children:s.jsx($l,{label:Z.title,value:Z.progress,infinite:Z.hasDeadline===!1,fillColor:Q0[ve]})},Z.id)})}):s.jsxs("div",{className:"mt-4",children:[s.jsx(I,{as:"p",size:"caption1",weight:"medium",className:"text-gray-600",children:m}),s.jsxs("div",{className:"mt-3 flex flex-col gap-2.5",children:[s.jsx(de,{type:"button",className:"w-full",size:"medium",disabled:ne,onClick:z,children:w}),s.jsx(de,{type:"button",variant:"outlined",className:"w-full",size:"medium",onClick:j,children:x})]})]})]})]}):s.jsxs(de,{className:"mt-5 w-full",size:"medium",onClick:k,children:[s.jsx(Nr,{className:"h-4 w-4"}),s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:f})]})})]}):s.jsx("div",{className:"flex w-full flex-col items-center pt-2",children:s.jsx(on,{loading:t,className:"w-full",skeleton:s.jsxs("div",{className:"flex w-full flex-col items-center",children:[s.jsx(Bt,{}),s.jsxs("div",{className:"mt-5 flex flex-col items-center gap-3",children:[s.jsx(Bt,{className:"h-10 w-10"}),s.jsx(Bt,{className:"h-10 w-10"}),s.jsx(Bt,{className:"h-10 w-10"})]})]}),children:s.jsxs("div",{className:"flex w-full flex-col items-center",children:[s.jsx(xt,{imageUrl:o,size:"md",className:"ring-2 ring-mint-900/40"}),s.jsx("div",{className:"mt-5 flex flex-col items-center gap-3",children:e?s.jsxs(s.Fragment,{children:[s.jsx(de,{type:"button",size:"icon","aria-label":d,onClick:M,children:s.jsx(An,{className:"h-4 w-4"})}),s.jsx(de,{type:"button",variant:"outlined",size:"icon","aria-label":u,onClick:E,children:s.jsx(Nt,{className:"h-4 w-4"})}),s.jsx(de,{type:"button",variant:"outlined",size:"icon","aria-label":v,onClick:S,children:s.jsx(kr,{className:"h-4 w-4"})})]}):s.jsx(de,{type:"button",size:"icon","aria-label":f,onClick:k,children:s.jsx(Nr,{className:"h-4 w-4"})})})]})})})})})]})}const X0=["SUN","MON","TUE","WED","THU","FRI","SAT"];function Z0(e){return e===void 0?"100%":typeof e=="number"?`${e}%`:e}function J0(e="default"){return e==="strong"?"text-gray-900 font-bold":e==="accent"?"text-main-800 font-bold":e==="muted"?"text-gray-500 font-medium":"text-gray-600 font-medium"}function R0(e="main"){return e==="soft"?"bg-main-600/50":"bg-main-800"}function eb({rows:e,weekLabels:t=[...X0],cellMinHeight:n=140,className:r}){return s.jsx("div",{className:A("w-full overflow-hidden rounded-4 border border-gray-300 bg-white",r),children:s.jsxs("table",{className:"w-full table-fixed border-collapse",children:[s.jsx("thead",{children:s.jsx("tr",{children:t.map((o,a)=>s.jsx("th",{className:A("h-8 border-b border-r border-gray-300 bg-gray-100 px-1 text-center align-middle sm:h-12 sm:px-2.5",a===t.length-1&&"border-r-0"),scope:"col",children:s.jsx(I,{size:"caption3",weight:"bold",className:"text-gray-600 sm:text-lg",children:o})},`${o}-${a}`))})}),s.jsx("tbody",{children:e.map((o,a)=>s.jsx("tr",{children:o.map((i,l)=>{const c=i.colSpan??1,d=i.id??`r${a}-c${l}`,u=o.slice(0,l+1).reduce((f,g)=>f+(g.colSpan??1),0)>=7;return s.jsx("td",{colSpan:c,className:A("border-r border-b border-gray-300 align-top",u&&"border-r-0"),children:s.jsx("div",{className:A("flex h-full flex-col gap-1 p-1 sm:gap-2 sm:p-2",i.muted&&"bg-gray-300",i.highlighted&&"bg-main-200 ring-1 ring-inset ring-main-400"),style:{minHeight:`${n}px`},children:i.content?i.content:s.jsxs(s.Fragment,{children:[i.day!==void 0?s.jsx(I,{size:"caption3",weight:"medium",className:A("leading-tight sm:text-lg",J0(i.dayTone)),children:i.day}):null,i.title!==void 0?s.jsx(I,{size:"caption3",weight:"bold",className:"line-clamp-1 text-gray-900 sm:text-lg",children:i.title}):null,i.bars&&i.bars.length>0?s.jsx("div",{className:"mt-0.5 flex flex-col gap-1",children:i.bars.map((f,g)=>s.jsx("span",{className:A("block h-1 rounded-full transition-all duration-200 sm:h-1.5",R0(f.tone)),style:{width:Z0(f.width)}},`${d}-bar-${g}`))}):null,i.subtitle!==void 0?s.jsx(I,{size:"caption3",weight:"medium",className:"hidden text-gray-600 sm:block",children:i.subtitle}):null]})})},d)})},`row-${a}`))})]})})}function tb({icon:e,iconName:t,title:n,value:r,unit:o,className:a,iconClassName:i,...l}){const c=e??(t?s.jsx(ja,{name:t,size:32}):null);return s.jsxs("div",{className:A("rounded-[24px] border border-gray-200 bg-white p-7","shadow-[0_1px_4px_rgba(17,17,17,0.08)]","w-full",a),...l,children:[s.jsxs("div",{className:"flex items-center gap-3.5",children:[s.jsx("div",{className:A("text-main-800","[&_svg]:h-8 [&_svg]:w-8",i),children:c}),s.jsx(I,{size:"heading2",weight:"medium",className:"leading-tight text-gray-600",children:n})]}),s.jsxs("div",{className:"mt-6 flex items-end gap-1.5",children:[s.jsx(I,{size:"display1",weight:"bold",className:"text-gray-900",children:r}),s.jsx(I,{size:"heading2",weight:"medium",className:"pb-1 text-gray-600",children:o})]})]})}const nb={sm:{circle:"h-7 w-7",trackTop:"top-3.5",checkIcon:"h-3 w-3",numberSize:"caption1",labelSize:"body2",labelMargin:"mt-3"},md:{circle:"h-10 w-10",trackTop:"top-5",checkIcon:"h-4 w-4",numberSize:"body1",labelSize:"heading2",labelMargin:"mt-5"},lg:{circle:"h-14 w-14",trackTop:"top-7",checkIcon:"h-5 w-5",numberSize:"body1",labelSize:"heading1",labelMargin:"mt-7"}};function rb({steps:e,currentStep:t,size:n="md",className:r}){const o=nb[n];if(e.length===0)return s.jsx("div",{className:A("w-full",r)});const a=Math.max(e.length-1,0),i=Math.min(Math.max(t-1,0),a),l=`${100/(e.length*2)}%`,c=a===0?100:i/a*100;return s.jsx("div",{className:A("w-full",r),children:s.jsxs("div",{className:"relative",children:[e.length>1?s.jsxs("div",{className:A("absolute",o.trackTop),style:{left:l,right:l},children:[s.jsx("div",{className:"h-0.5 w-full bg-gray-200"}),s.jsx("div",{className:"absolute top-0 left-0 h-0.5 bg-main-800 transition-all duration-300 ease-in-out",style:{width:`${c}%`}})]}):null,s.jsx("ol",{className:"relative z-10 flex items-start",children:e.map((d,u)=>{const f=u<i,g=u===i,v=d.id??`step-${u}`;return s.jsxs("li",{className:"flex flex-1 flex-col items-center",children:[s.jsx("span",{className:A("flex items-center justify-center rounded-full border-2 bg-white transition-colors duration-200",o.circle,f&&"border-main-800 bg-main-800 text-white",g&&"border-main-800 bg-main-800 text-white ring-4 ring-main-300",!f&&!g&&"border-gray-300 text-gray-600"),"aria-current":g?"step":void 0,children:f?s.jsx(Ct,{className:o.checkIcon,strokeWidth:2.5}):s.jsx(I,{size:o.numberSize,weight:"bold",className:A(g?"text-white":"text-gray-600"),children:u+1})}),s.jsx(I,{size:o.labelSize,weight:g?"bold":"medium",className:A("text-center leading-tight",o.labelMargin,f&&"text-gray-900",g&&"text-main-800",!f&&!g&&"text-gray-600"),children:d.label})]},v)})})]})})}function ob({data:e=[],size:t=26,gap:n=8,className:r,renderCellActions:o}){const[a,i]=P.useState(null),[l,c]=P.useState(null),d=P.useRef(null),u=P.useRef(!1),f=P.useRef(!1),g=()=>{d.current!==null&&(clearTimeout(d.current),d.current=null)},v=b=>b<=0?"bg-gray-100":b===1?"bg-main-300":b===2?"bg-main-500":b===3?"bg-main-700":"bg-main-800";return s.jsx("div",{className:A("w-full overflow-x-auto pb-2",r),children:s.jsx("div",{className:"grid w-max grid-flow-col grid-rows-7",style:{gridTemplateRows:`repeat(7, ${t}px)`,gridAutoColumns:`${t}px`,gap:`${n}px`},children:e.map((b,p)=>s.jsxs(Ao,{open:a===p,onOpenChange:m=>{if(!m){if(u.current){u.current=!1;return}i(null),c(null),f.current=!0,setTimeout(()=>{f.current=!1},200)}},children:[s.jsx(Po,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":`${b.date} · ${b.count}회 활동`,className:A("cursor-pointer transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-800 focus-visible:ring-offset-1",v(b.count),l===p&&"ring-2 ring-gray-800 ring-offset-1"),style:{width:t,height:t,borderRadius:`${Math.max(4,Math.round(t*.23))}px`},onMouseEnter:()=>{g(),l===null&&!f.current&&i(p)},onMouseLeave:()=>{l===null&&(d.current=setTimeout(()=>i(null),80))},onClick:()=>{g(),l===p?(c(null),i(null),f.current=!0,setTimeout(()=>{f.current=!1},200)):(u.current=!0,c(p),i(p))}})}),s.jsx(Eo,{children:s.jsxs(_o,{side:"top",sideOffset:4,onOpenAutoFocus:m=>m.preventDefault(),onMouseEnter:()=>{g()},onMouseLeave:()=>{l===null&&i(null)},className:A("z-50 min-w-[120px] rounded-xl bg-gray-900 px-3 py-2 text-white shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2"),children:[s.jsxs("p",{className:"whitespace-nowrap text-xs",children:[b.date," · ",b.count,"회 활동"]}),l===p&&o?s.jsx("div",{className:"mt-2",children:o(b)}):null]})})]},p))})})}const Hl=dt(["w-full transition-all duration-200 outline-none","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-gray-500","focus-visible:outline-none"],{variants:{variant:{default:["rounded-3 border border-gray-300 bg-white px-5 text-gray-900 shadow-none","focus-visible:border-main-500 focus-visible:ring-3 focus-visible:ring-main-300/60"],search:["rounded-3 !h-10 border border-gray-300 bg-white pl-11 pr-4 text-gray-700 placeholder:text-gray-500","focus-visible:border-main-500 focus-visible:ring-3 focus-visible:ring-main-300/60"]},multiline:{false:"h-10 py-0",true:"min-h-[320px] resize-none py-8 align-top leading-relaxed"}},defaultVariants:{variant:"default",multiline:!1}});function ab(e,t){return"body2"}function sb({label:e,labelHint:t,required:n,htmlFor:r}){return e?s.jsxs("label",{htmlFor:r,className:"mb-2 inline-flex items-center gap-2",children:[s.jsx(I,{size:"body1",weight:"bold",className:"text-gray-900",children:e}),n?s.jsx(I,{size:"body1",weight:"bold",className:"text-main-800",children:"*"}):null,t?s.jsx(I,{size:"body1",weight:"regular",className:"text-gray-500",children:t}):null]}):null}const $o=h.forwardRef(({className:e,variant:t="default",label:n,labelHint:r,error:o,type:a,multiline:i=!1,rows:l=8,cols:c,required:d,id:u,...f},g)=>{const v=t==="search",b=ab(t,i);return s.jsxs("div",{className:"flex w-full flex-col",children:[s.jsx(sb,{label:n,labelHint:r,required:d,htmlFor:u}),s.jsxs("div",{className:"relative w-full",children:[i?s.jsx("textarea",{id:u,rows:l,cols:c,required:d,className:A(Cn({size:b,weight:"regular"}),Hl({variant:t,multiline:!0}),e),ref:g,...f}):s.jsx("input",{id:u,type:a,required:d,className:A(Cn({size:b,weight:v?"light":"regular"}),Hl({variant:t,multiline:!1}),e),ref:g,...f}),v&&!i?s.jsx(Va,{width:20,height:20,className:"pointer-events-none absolute top-1/2 left-3.5 -translate-y-1/2 text-gray-500"}):null]}),o?s.jsx(I,{size:"caption1",weight:"regular",className:"mt-2 text-warning",children:o}):null]})});$o.displayName="TextField";const Vl=h.forwardRef((e,t)=>s.jsx($o,{...e,ref:t,multiline:!0}));Vl.displayName="TextArea";var jl="Toggle",Ho=h.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[i,l]=Ce({prop:n,onChange:o,defaultProp:r??!1,caller:jl});return s.jsx(G.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:V(e.onClick,()=>{e.disabled||l(!i)})})});Ho.displayName=jl;var ib=Ho;const lb=dt(["inline-flex w-fit items-center justify-center gap-2.5 border bg-white whitespace-nowrap","text-gray-700 transition-all duration-200","cursor-pointer disabled:pointer-events-none disabled:opacity-50","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-main-300/60","hover:bg-gray-100","data-[state=on]:border-main-800 data-[state=on]:bg-main-800 data-[state=on]:text-white","data-[state=on]:shadow-[0_4px_10px_rgba(255,87,34,0.22)]"],{variants:{shape:{rounded:"h-10 rounded-full px-5",square:"h-10 rounded-3 px-4"}},defaultVariants:{shape:"rounded"}});function cb({icon:e,shape:t="rounded",children:n,className:r,...o}){return s.jsxs(ib,{className:A(lb({shape:t}),r),...o,children:[e?s.jsx("span",{className:"inline-flex items-center justify-center text-[18px] leading-none text-inherit [&>svg]:h-5 [&>svg]:w-5",children:e}):null,s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:n})]})}var Vo="rovingFocusGroup.onEntryFocus",db={bubbles:!1,cancelable:!0},an="RovingFocusGroup",[jo,Yl,ub]=cr(an),[fb,Gl]=Ae(an,[ub]),[hb,pb]=fb(an),Ul=h.forwardRef((e,t)=>s.jsx(jo.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(jo.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(gb,{...e,ref:t})})}));Ul.displayName=an;var gb=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=e,g=h.useRef(null),v=J(t,g),b=hn(a),[p,m]=Ce({prop:i,defaultProp:l??null,onChange:c,caller:an}),[w,y]=h.useState(!1),x=et(d),N=Yl(n),S=h.useRef(!1),[M,E]=h.useState(0);return h.useEffect(()=>{const k=g.current;if(k)return k.addEventListener(Vo,x),()=>k.removeEventListener(Vo,x)},[x]),s.jsx(hb,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:p,onItemFocus:h.useCallback(k=>m(k),[m]),onItemShiftTab:h.useCallback(()=>y(!0),[]),onFocusableItemAdd:h.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:h.useCallback(()=>E(k=>k-1),[]),children:s.jsx(G.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{S.current=!0}),onFocus:V(e.onFocus,k=>{const z=!S.current;if(k.target===k.currentTarget&&z&&!w){const j=new CustomEvent(Vo,db);if(k.currentTarget.dispatchEvent(j),!j.defaultPrevented){const B=N().filter(T=>T.focusable),Y=B.find(T=>T.active),K=B.find(T=>T.id===p),O=[Y,K,...B].filter(Boolean).map(T=>T.ref.current);ql(O,u)}}S.current=!1}),onBlur:V(e.onBlur,()=>y(!1))})})}),Kl="RovingFocusGroupItem",Ql=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...l}=e,c=Pe(),d=a||c,u=pb(Kl,n),f=u.currentTabStopId===d,g=Yl(n),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:p}=u;return h.useEffect(()=>{if(r)return v(),()=>b()},[r,v,b]),s.jsx(jo.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:s.jsx(G.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...l,ref:t,onMouseDown:V(e.onMouseDown,m=>{r?u.onItemFocus(d):m.preventDefault()}),onFocus:V(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:V(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const w=bb(m,u.orientation,u.dir);if(w!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let x=g().filter(N=>N.focusable).map(N=>N.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const N=x.indexOf(m.currentTarget);x=u.loop?yb(x,N+1):x.slice(N+1)}setTimeout(()=>ql(x))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:p!=null}):i})})});Ql.displayName=Kl;var mb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vb(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bb(e,t,n){const r=vb(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return mb[r]}function ql(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function yb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wb=Ul,xb=Ql,it="ToggleGroup",[Xl]=Ae(it,[Gl]),Zl=Gl(),Yo=P.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return s.jsx(Cb,{...o,ref:t})}if(n==="multiple"){const o=r;return s.jsx(Nb,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${it}\``)});Yo.displayName=it;var[Jl,Rl]=Xl(it),Cb=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,l]=Ce({prop:n,defaultProp:r??"",onChange:o,caller:it});return s.jsx(Jl,{scope:e.__scopeToggleGroup,type:"single",value:P.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:P.useCallback(()=>l(""),[l]),children:s.jsx(ec,{...a,ref:t})})}),Nb=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,l]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:it}),c=P.useCallback(u=>l((f=[])=>[...f,u]),[l]),d=P.useCallback(u=>l((f=[])=>f.filter(g=>g!==u)),[l]);return s.jsx(Jl,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:d,children:s.jsx(ec,{...a,ref:t})})});Yo.displayName=it;var[Sb,kb]=Xl(it),ec=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...c}=e,d=Zl(n),u=hn(i),f={role:"group",dir:u,...c};return s.jsx(Sb,{scope:n,rovingFocus:o,disabled:r,children:o?s.jsx(wb,{asChild:!0,...d,orientation:a,dir:u,loop:l,children:s.jsx(G.div,{...f,ref:t})}):s.jsx(G.div,{...f,ref:t})})}),ar="ToggleGroupItem",tc=P.forwardRef((e,t)=>{const n=Rl(ar,e.__scopeToggleGroup),r=kb(ar,e.__scopeToggleGroup),o=Zl(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,l={...e,pressed:a,disabled:i},c=P.useRef(null);return r.rovingFocus?s.jsx(xb,{asChild:!0,...o,focusable:!i,active:a,ref:c,children:s.jsx(nc,{...l,ref:t})}):s.jsx(nc,{...l,ref:t})});tc.displayName=ar;var nc=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Rl(ar,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(Ho,{...l,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Ab=Yo,Pb=tc;const Eb=dt(["inline-flex w-fit items-center justify-center gap-2.5 border bg-white whitespace-nowrap","text-gray-700 transition-all duration-200","cursor-pointer disabled:pointer-events-none disabled:opacity-50","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-main-300/60","hover:bg-gray-100","data-[state=on]:border-main-800 data-[state=on]:bg-main-800 data-[state=on]:text-white","data-[state=on]:shadow-[0_4px_10px_rgba(255,87,34,0.22)]"],{variants:{shape:{rounded:"h-10 rounded-full px-5",square:"h-10 rounded-3 px-4"}},defaultVariants:{shape:"rounded"}});function _b({children:e,className:t,...n}){return s.jsx(Ab,{"data-slot":"toggle-group",className:A("flex flex-wrap gap-4 rounded-none",t),...n,children:e})}function Mb({icon:e,shape:t="rounded",children:n,className:r,...o}){return s.jsxs(Pb,{"data-slot":"toggle-group-item",className:A(Eb({shape:t}),r),...o,children:[e?s.jsx("span",{className:"inline-flex items-center justify-center text-[18px] leading-none text-inherit [&>svg]:h-5 [&>svg]:w-5",children:e}):null,s.jsx(I,{size:"body2",weight:"bold",className:"text-inherit",children:n})]})}var[sr]=Ae("Tooltip",[Dt]),ir=Dt(),rc="TooltipProvider",Tb=700,Go="tooltip.open",[Db,Uo]=sr(rc),oc=e=>{const{__scopeTooltip:t,delayDuration:n=Tb,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=h.useRef(!0),l=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),s.jsx(Db,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};oc.displayName=rc;var sn="Tooltip",[Ob,ln]=sr(sn),ac=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,c=Uo(sn,e.__scopeTooltip),d=ir(t),[u,f]=h.useState(null),g=Pe(),v=h.useRef(0),b=i??c.disableHoverableContent,p=l??c.delayDuration,m=h.useRef(!1),[w,y]=Ce({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Go))):c.onClose(),a?.(E)},caller:sn}),x=h.useMemo(()=>w?m.current?"delayed-open":"instant-open":"closed",[w]),N=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,m.current=!1,y(!0)},[y]),S=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),M=h.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{m.current=!0,y(!0),v.current=0},p)},[p,y]);return h.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),s.jsx(mo,{...d,children:s.jsx(Ob,{scope:t,contentId:g,open:w,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?M():N()},[c.isOpenDelayedRef,M,N]),onTriggerLeave:h.useCallback(()=>{b?S():(window.clearTimeout(v.current),v.current=0)},[S,b]),onOpen:N,onClose:S,disableHoverableContent:b,children:n})})};ac.displayName=sn;var Ko="TooltipTrigger",sc=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ln(Ko,n),a=Uo(Ko,n),i=ir(n),l=h.useRef(null),c=J(t,l,o.onTriggerChange),d=h.useRef(!1),u=h.useRef(!1),f=h.useCallback(()=>d.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),s.jsx(jn,{asChild:!0,...i,children:s.jsx(G.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:V(e.onPointerMove,g=>{g.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:V(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:V(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});sc.displayName=Ko;var Qo="TooltipPortal",[Ib,Lb]=sr(Qo,{forceMount:void 0}),ic=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=ln(Qo,t);return s.jsx(Ib,{scope:t,forceMount:n,children:s.jsx(We,{present:n||a.open,children:s.jsx(en,{asChild:!0,container:o,children:r})})})};ic.displayName=Qo;var $t="TooltipContent",lc=h.forwardRef((e,t)=>{const n=Lb($t,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=ln($t,e.__scopeTooltip);return s.jsx(We,{present:r||i.open,children:i.disableHoverableContent?s.jsx(cc,{side:o,...a,ref:t}):s.jsx(Fb,{side:o,...a,ref:t})})}),Fb=h.forwardRef((e,t)=>{const n=ln($t,e.__scopeTooltip),r=Uo($t,e.__scopeTooltip),o=h.useRef(null),a=J(t,o),[i,l]=h.useState(null),{trigger:c,onClose:d}=n,u=o.current,{onPointerInTransitChange:f}=r,g=h.useCallback(()=>{l(null),f(!1)},[f]),v=h.useCallback((b,p)=>{const m=b.currentTarget,w={x:b.clientX,y:b.clientY},y=Hb(w,m.getBoundingClientRect()),x=Vb(w,y),N=jb(p.getBoundingClientRect()),S=Gb([...x,...N]);l(S),f(!0)},[f]);return h.useEffect(()=>()=>g(),[g]),h.useEffect(()=>{if(c&&u){const b=m=>v(m,u),p=m=>v(m,c);return c.addEventListener("pointerleave",b),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",p)}}},[c,u,v,g]),h.useEffect(()=>{if(i){const b=p=>{const m=p.target,w={x:p.clientX,y:p.clientY},y=c?.contains(m)||u?.contains(m),x=!Yb(w,i);y?g():x&&(g(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,u,i,d,g]),s.jsx(cc,{...e,ref:a})}),[Wb,zb]=sr(sn,{isInside:!1}),Bb=pc("TooltipContent"),cc=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,c=ln($t,n),d=ir(n),{onClose:u}=c;return h.useEffect(()=>(document.addEventListener(Go,u),()=>document.removeEventListener(Go,u)),[u]),h.useEffect(()=>{if(c.trigger){const f=g=>{g.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),s.jsx(Xt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:s.jsxs(vo,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(Bb,{children:r}),s.jsx(Wb,{scope:n,isInside:!0,children:s.jsx(Xv,{id:c.contentId,role:"tooltip",children:o||r})})]})})});lc.displayName=$t;var dc="TooltipArrow",$b=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ir(n);return zb(dc,n).isInside?null:s.jsx(bo,{...o,...r,ref:t})});$b.displayName=dc;function Hb(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Vb(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function jb(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Yb(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],c=t[i],d=l.x,u=l.y,f=c.x,g=c.y;u>r!=g>r&&n<(f-d)*(r-u)/(g-u)+d&&(o=!o)}return o}function Gb(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Ub(t)}function Ub(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Kb=oc,Qb=ac,qb=sc,Xb=ic,Zb=lc;function Jb({delayDuration:e=200,...t}){return s.jsx(Kb,{delayDuration:e,...t})}const Rb=Qb,ey=qb;function ty({className:e,sideOffset:t=4,...n}){return s.jsx(Xb,{children:s.jsx(Zb,{sideOffset:t,className:A("z-50 overflow-hidden rounded-1.5 bg-gray-900 px-3 py-1.5 text-caption2 text-white shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})})}function ny({className:e,userName:t,userImageSrc:n,timeLabel:r,isAuthor:o=!1,onAccept:a,onReject:i}){return s.jsxs("div",{className:A("flex h-[50px] items-center justify-between gap-3 rounded-3 border border-gray-200 bg-white px-3",e),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsx("div",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-gray-200",children:n?s.jsx(lt,{src:n,alt:`${t} profile`,fill:!0,className:"object-cover"}):s.jsx(Nt,{className:"h-4.5 w-4.5 text-gray-500"})}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx(I,{size:"body2",weight:"bold",className:"line-clamp-1 text-gray-900",children:t}),r?s.jsx(I,{size:"caption2",weight:"regular",className:"text-gray-600",children:r}):null]})]}),o?s.jsx("div",{className:"flex shrink-0 items-center gap-2",children:s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button","aria-label":"수락",onClick:a,className:"inline-flex h-9 w-9 items-center justify-center rounded-2 bg-main-200 text-main-800 transition-colors hover:bg-main-300",children:s.jsx(Ct,{className:"h-4.5 w-4.5",strokeWidth:2.6})}),s.jsx("button",{type:"button","aria-label":"거절",onClick:i,className:"inline-flex h-9 w-9 items-center justify-center rounded-2 bg-gray-100 text-gray-600 transition-colors hover:bg-gray-200",children:s.jsx(kn,{className:"h-4.5 w-4.5",strokeWidth:2.4})})]})}):null]})}D.Accordion=Fd,D.AccordionContent=Bd,D.AccordionItem=Wd,D.AccordionTrigger=zd,D.AppHeader=gu,D.BannerCarousel=yu,D.Button=de,D.Calendar=Ur,D.ChallengeCard=Ip,D.ChallengeListItem=Lp,D.CheckContainer=Fp,D.CheckList=Hp,D.Checkbox=qr,D.CircleAvatar=xt,D.CircularProgress=Xr,D.DatePicker=bv,D.Dialog=Fv,D.DialogClose=zv,D.DialogContent=Bv,D.DialogDescription=jv,D.DialogFooter=Hv,D.DialogHeader=$v,D.DialogOverlay=al,D.DialogPortal=ol,D.DialogTitle=Vv,D.DialogTrigger=Wv,D.DiaryCard=Uv,D.DiaryListItem=Qv,D.GoalAddList=$0,D.Icon=ja,D.ImagePicker=H0,D.ImagePlaceholder=Qt,D.InfoButton=V0,D.PageWatermark=j0,D.Pagination=G0,D.ProgressBar=$l,D.RangeDatePicker=yv,D.RightSidebar=q0,D.ScheduleCalendar=eb,D.Select=D0,D.SelectContent=z0,D.SelectGroup=O0,D.SelectItem=F0,D.SelectLabel=B0,D.SelectScrollDownButton=Bl,D.SelectScrollUpButton=zl,D.SelectSeparator=W0,D.SelectTrigger=L0,D.SelectValue=I0,D.StatContainer=tb,D.StepIndicator=rb,D.Streak=ob,D.Tag=qt,D.Text=I,D.TextArea=Vl,D.TextField=$o,D.Toggle=cb,D.ToggleGroup=_b,D.ToggleGroupItem=Mb,D.Tooltip=Rb,D.TooltipContent=ty,D.TooltipProvider=Jb,D.TooltipTrigger=ey,D.UserListItem=ny,D.cn=A,D.textVariants=Cn,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1d1s/design-system",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "main": "dist/index.umd.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",