@tryghost/activitypub 3.1.11 → 3.1.13

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 (57) hide show
  1. package/dist/activitypub.js +1 -1
  2. package/dist/{at-sign-Mjg-pZ6w.mjs → at-sign-WxdwrLgJ.mjs} +3 -3
  3. package/dist/{at-sign-Mjg-pZ6w.mjs.map → at-sign-WxdwrLgJ.mjs.map} +1 -1
  4. package/dist/{avatar-flipboard-DrqqZst3.mjs → avatar-flipboard-DSiWdH0F.mjs} +3 -3
  5. package/dist/{avatar-flipboard-DrqqZst3.mjs.map → avatar-flipboard-DSiWdH0F.mjs.map} +1 -1
  6. package/dist/{bluesky-sharing-Chejq-Bq.mjs → bluesky-sharing-B86jF6P2.mjs} +4 -4
  7. package/dist/{bluesky-sharing-Chejq-Bq.mjs.map → bluesky-sharing-B86jF6P2.mjs.map} +1 -1
  8. package/dist/{copy-Ba_lzzCd.mjs → copy-Dv_Mr41S.mjs} +3 -3
  9. package/dist/{copy-Ba_lzzCd.mjs.map → copy-Dv_Mr41S.mjs.map} +1 -1
  10. package/dist/{deleted-feed-item-BfpxKMlB.mjs → deleted-feed-item-DwgIr7vo.mjs} +3 -3
  11. package/dist/{deleted-feed-item-BfpxKMlB.mjs.map → deleted-feed-item-DwgIr7vo.mjs.map} +1 -1
  12. package/dist/{edit-profile-jtzZtWG8.mjs → edit-profile-BJDgAblO.mjs} +3 -3
  13. package/dist/{edit-profile-jtzZtWG8.mjs.map → edit-profile-BJDgAblO.mjs.map} +1 -1
  14. package/dist/{feed-BkSec9BE.mjs → feed-Dg6CeeCP.mjs} +4 -4
  15. package/dist/{feed-BkSec9BE.mjs.map → feed-Dg6CeeCP.mjs.map} +1 -1
  16. package/dist/{hash-D8uyJrFB.mjs → hash-CSsTpjMi.mjs} +3 -3
  17. package/dist/{hash-D8uyJrFB.mjs.map → hash-CSsTpjMi.mjs.map} +1 -1
  18. package/dist/{inbox-DZqNPQ3D.mjs → inbox-DexTffBg.mjs} +3 -3
  19. package/dist/{inbox-DZqNPQ3D.mjs.map → inbox-DexTffBg.mjs.map} +1 -1
  20. package/dist/{index-nevBSPxu.mjs → index-BCgaO9tm.mjs} +2 -2
  21. package/dist/{index-nevBSPxu.mjs.map → index-BCgaO9tm.mjs.map} +1 -1
  22. package/dist/{index-D8Ct0JF0.mjs → index-BgIuNjJ4.mjs} +6 -6
  23. package/dist/{index-D8Ct0JF0.mjs.map → index-BgIuNjJ4.mjs.map} +1 -1
  24. package/dist/{index-psiB4m1D.mjs → index-C5SK4d-U.mjs} +7 -7
  25. package/dist/{index-psiB4m1D.mjs.map → index-C5SK4d-U.mjs.map} +1 -1
  26. package/dist/{index-DYjHwtl7.mjs → index-D0zVs-Le.mjs} +4 -4
  27. package/dist/{index-DYjHwtl7.mjs.map → index-D0zVs-Le.mjs.map} +1 -1
  28. package/dist/{index-CSkOAA7W.mjs → index-DHVdVxus.mjs} +155 -126
  29. package/dist/index-DHVdVxus.mjs.map +1 -0
  30. package/dist/{index-CCW2g6Oi.mjs → index-DunzATiq.mjs} +2 -2
  31. package/dist/{index-CCW2g6Oi.mjs.map → index-DunzATiq.mjs.map} +1 -1
  32. package/dist/{index-Bq0BHGkI.mjs → index-Kd9Hi0Fn.mjs} +7 -7
  33. package/dist/{index-Bq0BHGkI.mjs.map → index-Kd9Hi0Fn.mjs.map} +1 -1
  34. package/dist/{index-CQNBd3-F.mjs → index-Vj6Uo60G.mjs} +9 -9
  35. package/dist/{index-CQNBd3-F.mjs.map → index-Vj6Uo60G.mjs.map} +1 -1
  36. package/dist/{moderation-DFdpfisa.mjs → moderation-DltWXOVa.mjs} +3 -3
  37. package/dist/{moderation-DFdpfisa.mjs.map → moderation-DltWXOVa.mjs.map} +1 -1
  38. package/dist/{note-kWeM_V5e.mjs → note-m0fl222x.mjs} +4 -4
  39. package/dist/{note-kWeM_V5e.mjs.map → note-m0fl222x.mjs.map} +1 -1
  40. package/dist/{reply-1lPjfeAY.mjs → reply-BwjYYb5Y.mjs} +3 -3
  41. package/dist/{reply-1lPjfeAY.mjs.map → reply-BwjYYb5Y.mjs.map} +1 -1
  42. package/dist/{separator-COhI8ngj.mjs → separator-CdEv3ahM.mjs} +2 -2
  43. package/dist/{separator-COhI8ngj.mjs.map → separator-CdEv3ahM.mjs.map} +1 -1
  44. package/dist/{settings-CEx9EwpB.mjs → settings-BdWI832x.mjs} +3 -3
  45. package/dist/{settings-CEx9EwpB.mjs.map → settings-BdWI832x.mjs.map} +1 -1
  46. package/dist/{step-1-DoxN5zA3.mjs → step-1-xd_G9AFI.mjs} +3 -3
  47. package/dist/{step-1-DoxN5zA3.mjs.map → step-1-xd_G9AFI.mjs.map} +1 -1
  48. package/dist/{step-2-BWvVMlaH.mjs → step-2-C-T0bLP6.mjs} +6 -6
  49. package/dist/{step-2-BWvVMlaH.mjs.map → step-2-C-T0bLP6.mjs.map} +1 -1
  50. package/dist/{step-3-Dnq4l5zZ.mjs → step-3-Cxv0ahQZ.mjs} +8 -8
  51. package/dist/{step-3-Dnq4l5zZ.mjs.map → step-3-Cxv0ahQZ.mjs.map} +1 -1
  52. package/dist/{tabs-DTWhZwdk.mjs → tabs-BDqPEpa2.mjs} +4 -4
  53. package/dist/{tabs-DTWhZwdk.mjs.map → tabs-BDqPEpa2.mjs.map} +1 -1
  54. package/dist/{topic-filter-4W4f_LiH.mjs → topic-filter-C1NL6HYi.mjs} +2 -2
  55. package/dist/{topic-filter-4W4f_LiH.mjs.map → topic-filter-C1NL6HYi.mjs.map} +1 -1
  56. package/package.json +17 -2
  57. package/dist/index-CSkOAA7W.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { j as e, ar as k, A as N, c as f, d as y, b as v, as as P, e as _, H as R, B as g, at as z, C as I, a9 as M, S as b, P as B, aa as W, L as U, F as A, i as E, k as $, E as H, f as D, au as O, av as Q, aw as V, ax as T, ay as X } from "./index-CSkOAA7W.mjs";
2
- import { S as C } from "./separator-COhI8ngj.mjs";
3
- import { H as q } from "./hash-D8uyJrFB.mjs";
1
+ import { j as e, ar as k, A as N, c as f, d as y, b as v, as as P, e as _, H as R, B as g, at as z, C as I, a9 as M, S as b, P as B, aa as W, L as U, F as A, i as E, k as $, E as H, f as D, au as O, av as Q, aw as V, ax as T, ay as X } from "./index-DHVdVxus.mjs";
2
+ import { S as C } from "./separator-CdEv3ahM.mjs";
3
+ import { H as q } from "./hash-CSsTpjMi.mjs";
4
4
  const p = ({ user: n }) => /* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsxs("div", { className: "relative my-5 w-full hover:cursor-pointer", children: [
5
5
  /* @__PURE__ */ e.jsx("div", { className: "pointer-events-none absolute top-4 left-4", children: /* @__PURE__ */ e.jsx(N, { author: n }) }),
6
6
  /* @__PURE__ */ e.jsx("div", { "aria-label": "New post", className: "text inset-0 flex h-[72px] w-full items-center justify-start rounded-lg bg-white pl-[68px] text-left text-[1.5rem] font-normal tracking-normal text-gray-500 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] transition-all hover:bg-white hover:shadow-[0_5px_24px_0px_rgba(0,0,0,0.05),0px_14px_12px_-9px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] dark:border dark:border-gray-925 dark:bg-black dark:shadow-none dark:hover:border-gray-800 dark:hover:bg-black dark:hover:shadow-none", children: "What's new?" })
@@ -204,4 +204,4 @@ const p = ({ user: n }) => /* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */
204
204
  export {
205
205
  ee as default
206
206
  };
207
- //# sourceMappingURL=feed-BkSec9BE.mjs.map
207
+ //# sourceMappingURL=feed-Dg6CeeCP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"feed-BkSec9BE.mjs","sources":["../src/views/feed/components/feed-input.tsx","../src/views/feed/components/suggested-profiles.tsx","../src/views/feed/components/feed-list.tsx","../src/views/feed/feed.tsx"],"sourcesContent":["import APAvatar from '@src/components/global/ap-avatar';\nimport NewNoteModal from '@src/components/modals/new-note-modal';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\n\nconst FeedInput: React.FC<{user?: ActorProperties}> = ({user}) => {\n return (\n <NewNoteModal>\n <div className='relative my-5 w-full hover:cursor-pointer'>\n <div className='pointer-events-none absolute top-4 left-4'>\n <APAvatar author={user as ActorProperties} />\n </div>\n <div aria-label='New post' className='text inset-0 flex h-[72px] w-full items-center justify-start rounded-lg bg-white pl-[68px] text-left text-[1.5rem] font-normal tracking-normal text-gray-500 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] transition-all hover:bg-white hover:shadow-[0_5px_24px_0px_rgba(0,0,0,0.05),0px_14px_12px_-9px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] dark:border dark:border-gray-925 dark:bg-black dark:shadow-none dark:hover:border-gray-800 dark:hover:bg-black dark:hover:shadow-none'>What&apos;s new?</div>\n </div>\n </NewNoteModal>\n );\n};\n\nexport default FeedInput;","import APAvatar from '@src/components/global/ap-avatar';\nimport FollowButton from '@src/components/global/follow-button';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport {Account} from '@src/api/activitypub';\nimport {Button, Separator, Skeleton} from '@tryghost/shade/components';\nimport {H4} from '@tryghost/shade/primitives';\nimport {LucideIcon} from '@tryghost/shade/utils';\nimport {useEffect, useRef, useState} from 'react';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\nimport {useSuggestedProfilesForUser} from '@src/hooks/use-activity-pub-queries';\n\nconst SuggestedProfiles: React.FC = () => {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const navigate = useNavigateWithBasePath();\n const [canScrollLeft, setCanScrollLeft] = useState(false);\n const [canScrollRight, setCanScrollRight] = useState(true);\n\n const {suggestedProfilesQuery, updateSuggestedProfile} = useSuggestedProfilesForUser('index', 10);\n const {data: suggestedProfilesData = [], isLoading: isLoadingSuggestedProfiles} = suggestedProfilesQuery;\n\n const updateScrollButtons = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const canScrollL = container.scrollLeft > 0;\n const canScrollR = container.scrollLeft < container.scrollWidth - container.clientWidth;\n\n setCanScrollLeft(canScrollL);\n setCanScrollRight(canScrollR);\n };\n\n useEffect(() => {\n updateScrollButtons();\n }, [suggestedProfilesData]);\n\n if (!isLoadingSuggestedProfiles && (!suggestedProfilesData || suggestedProfilesData.length < 4)) {\n return null;\n }\n\n const handleDismiss = (profileId: string) => {\n // TODO: Implement dismiss functionality\n void profileId;\n };\n\n const handleFollow = (profile: Account) => {\n updateSuggestedProfile(profile.id, {\n followedByMe: true\n });\n };\n\n const handleUnfollow = (profile: Account) => {\n updateSuggestedProfile(profile.id, {\n followedByMe: false\n });\n };\n\n const scrollLeft = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const cardWidth = 160 + 16; // w-40 (160px) + gap-4 (16px)\n container.scrollBy({left: -cardWidth * 2, behavior: 'smooth'});\n };\n\n const scrollRight = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const cardWidth = 160 + 16; // w-40 (160px) + gap-4 (16px)\n container.scrollBy({left: cardWidth * 2, behavior: 'smooth'});\n };\n\n return (\n <>\n <div className='pt-4 pb-7'>\n <div className='mb-3 flex items-center justify-between'>\n <H4 className='text-lg font-semibold text-black dark:text-white'>More people to follow</H4>\n <Button className='px-0 font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white' variant='link' onClick={() => navigate('/explore')}>\n Find more &rarr;\n </Button>\n </div>\n\n <div className='relative'>\n {canScrollLeft && (\n <Button\n className='absolute top-1/2 -left-10 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white'\n variant='ghost'\n onClick={scrollLeft}\n >\n <LucideIcon.ChevronLeft className='size-6!' />\n </Button>\n )}\n\n {canScrollRight && (\n <Button\n className='absolute top-1/2 -right-10 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white'\n variant='ghost'\n onClick={scrollRight}\n >\n <LucideIcon.ChevronRight className='size-6!' />\n </Button>\n )}\n\n <div\n ref={scrollContainerRef}\n className='flex snap-x snap-mandatory gap-4 overflow-x-auto'\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none'\n }}\n onScroll={updateScrollButtons}\n >\n {(isLoadingSuggestedProfiles ? Array(10).fill(null) : (suggestedProfilesData || [])).map((profile, index) => (\n <div\n key={profile?.id || `loading-${index}`}\n className='relative w-40 shrink-0 snap-start rounded-lg bg-gray-75 p-4 dark:bg-gray-925/30'\n onClick={!isLoadingSuggestedProfiles && profile ? () => navigate(`/profile/${profile.handle}`) : undefined}\n >\n <Button\n className='absolute top-1 right-2 hidden p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300'\n variant='link'\n onClick={(e) => {\n e.stopPropagation();\n handleDismiss(profile?.id || '');\n }}\n >\n <LucideIcon.X className='size-4' />\n </Button>\n\n <div className='flex flex-col items-center text-center'>\n <div className='mb-3'>\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='size-16 rounded-full' />\n ) : (\n <ProfilePreviewHoverCard actor={profile} align='center'>\n <div>\n <APAvatar\n author={{\n icon: {url: profile?.avatarUrl || ''},\n name: profile?.name || '',\n handle: profile?.handle || ''\n }}\n size='md'\n />\n </div>\n </ProfilePreviewHoverCard>\n )}\n </div>\n\n <span className='mb-6 w-full truncate font-semibold text-black dark:text-white'>\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='h-5 w-32' />\n ) : (\n profile?.name || ''\n )}\n </span>\n\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='h-8 w-16' />\n ) : (\n <FollowButton\n following={profile?.followedByMe || false}\n handle={profile?.handle || ''}\n type='primary'\n onFollow={() => profile && handleFollow(profile)}\n onUnfollow={() => profile && handleUnfollow(profile)}\n />\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n <Separator />\n </>\n );\n};\n\nexport default SuggestedProfiles;\n","import FeedInput from './feed-input';\nimport FeedItem from '@src/components/feed/feed-item';\nimport Layout from '@src/components/layout';\nimport NewNoteModal from '@src/components/modals/new-note-modal';\nimport SuggestedProfiles from './suggested-profiles';\nimport {Activity} from '@src/api/activitypub';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\nimport {Button, LoadingIndicator, Separator} from '@tryghost/shade/components';\nimport {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';\nimport {LucideIcon} from '@tryghost/shade/utils';\nimport {isPendingActivity} from '@src/utils/pending-activity';\nimport {useEffect, useRef} from 'react';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\n\nexport type FeedListProps = {\n isLoading: boolean,\n activities: Activity[],\n user: ActorProperties,\n fetchNextPage: () => void,\n hasNextPage: boolean,\n isFetchingNextPage: boolean\n}\n\nconst FeedList:React.FC<FeedListProps> = ({\n isLoading,\n activities,\n user,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage\n}) => {\n const navigate = useNavigateWithBasePath();\n\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreRef = useRef<HTMLDivElement | null>(null);\n const endLoadMoreRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n\n observerRef.current = new IntersectionObserver((entries) => {\n if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {\n fetchNextPage();\n }\n });\n\n if (loadMoreRef.current) {\n observerRef.current.observe(loadMoreRef.current);\n }\n\n if (endLoadMoreRef.current) {\n observerRef.current.observe(endLoadMoreRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [hasNextPage, isFetchingNextPage, fetchNextPage]);\n\n const loadMoreIndex = Math.max(0, Math.floor(activities.length * 0.75) - 1);\n\n return (\n <Layout>\n <div className='flex w-full flex-col'>\n <div className='w-full'>\n {activities.length > 0 ? (\n <div className='my-4'>\n <div className='mx-auto flex items-start gap-11'>\n <div className='flex w-full min-w-0 flex-col items-center'>\n <div className='flex w-full max-w-[620px] min-w-0 flex-col items-start'>\n <FeedInput user={user} />\n <ul className='mx-auto flex w-full flex-col px-4 max-lg:px-0' data-testid=\"feed-list\">\n {activities.map((activity, index) => (\n <li\n // eslint-disable-next-line react/no-array-index-key\n key={`${activity.id}-${activity.type}-${index}`} // We are using index here as activity.id is cannot be guaranteed to be unique at the moment\n data-testid=\"feed-item\"\n data-test-view-article\n >\n <FeedItem\n actor={activity.actor}\n allowDelete={activity.object.authored}\n commentCount={activity.object.replyCount ?? 0}\n isLoading={isLoading}\n isPending={isPendingActivity(activity.id)}\n layout={'feed'}\n likeCount={activity.object.likeCount ?? 0}\n object={activity.object}\n repostCount={activity.object.repostCount ?? 0}\n type={activity.type}\n onClick={() => {\n navigate(`/notes/${encodeURIComponent(activity.id)}`);\n }}\n />\n {index < activities.length - 1 && (\n <Separator />\n )}\n {index === 3 && (\n <SuggestedProfiles />\n )}\n {index === loadMoreIndex && (\n <div ref={loadMoreRef} className='h-1'></div>\n )}\n </li>\n ))}\n {isFetchingNextPage && (\n <li className='flex flex-col items-center justify-center gap-4 text-center'>\n <LoadingIndicator size='md' />\n </li>\n )}\n </ul>\n <div ref={endLoadMoreRef} className='h-1'></div>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className='flex w-full flex-col items-center gap-10'>\n <div className='mt-4 flex w-full max-w-[620px] flex-col items-center'>\n <FeedInput user={user} />\n <div className='mt-[-128px]'>\n <EmptyViewIndicator>\n <EmptyViewIcon><LucideIcon.Hash /></EmptyViewIcon>\n <div>The Feed is the stream of thoughts and <span className='text-black dark:text-white'>bite-sized updates</span> from people you follow in the Social Web. It&apos;s looking a little empty right now but once the people you follow start posting, their updates will show up here.</div>\n <NewNoteModal>\n <Button className='text-white dark:text-black'>\n <LucideIcon.FilePen />\n Write your first note\n </Button>\n </NewNoteModal>\n </EmptyViewIndicator>\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n </Layout>\n );\n};\n\nexport default FeedList;\n","import AppError from '@components/layout/error';\nimport FeedList from './components/feed-list';\nimport React from 'react';\nimport {isApiError} from '@src/api/activitypub';\nimport {\n useFeedForUser,\n useUserDataForUser\n} from '@hooks/use-activity-pub-queries';\n\nconst Feed: React.FC = () => {\n const {feedQuery} = useFeedForUser({enabled: true});\n const {data, error, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading} = feedQuery;\n\n const activities = (data?.pages.flatMap(page => page.posts) ?? Array.from({length: 5}, (_, index) => ({id: `placeholder-${index}`, object: {}})));\n\n const {data: user} = useUserDataForUser('index');\n\n if (error && isApiError(error)) {\n return <AppError errorCode={error.code} statusCode={error.statusCode}/>;\n }\n\n return <FeedList\n activities={activities}\n fetchNextPage={fetchNextPage}\n hasNextPage={hasNextPage!}\n isFetchingNextPage={isFetchingNextPage}\n isLoading={isLoading}\n user={user!}\n />;\n};\n\nexport default Feed;\n"],"names":["FeedInput","user","jsx","NewNoteModal","jsxs","APAvatar","SuggestedProfiles","scrollContainerRef","useRef","navigate","useNavigateWithBasePath","canScrollLeft","setCanScrollLeft","useState","canScrollRight","setCanScrollRight","suggestedProfilesQuery","updateSuggestedProfile","useSuggestedProfilesForUser","suggestedProfilesData","isLoadingSuggestedProfiles","updateScrollButtons","container","canScrollL","canScrollR","useEffect","handleDismiss","profileId","handleFollow","profile","handleUnfollow","scrollLeft","scrollRight","Fragment","H4","Button","LucideIcon.ChevronLeft","LucideIcon.ChevronRight","index","e","LucideIcon.X","Skeleton","ProfilePreviewHoverCard","FollowButton","Separator","FeedList","isLoading","activities","fetchNextPage","hasNextPage","isFetchingNextPage","observerRef","loadMoreRef","endLoadMoreRef","entries","loadMoreIndex","Layout","activity","FeedItem","isPendingActivity","LoadingIndicator","EmptyViewIndicator","EmptyViewIcon","LucideIcon.Hash","LucideIcon.FilePen","Feed","feedQuery","useFeedForUser","data","error","page","_","useUserDataForUser","isApiError","AppError"],"mappings":";;;AAIA,MAAMA,IAAgD,CAAC,EAAC,MAAAC,QAEhDC,gBAAAA,EAAAA,IAACC,GAAA,EACG,UAAAC,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAU,6CACX,UAAA;AAAA,EAAAF,gBAAAA,EAAAA,IAAC,SAAI,WAAU,6CACX,gCAACG,GAAA,EAAS,QAAQJ,GAAyB,EAAA,CAC/C;AAAA,wBACC,OAAA,EAAI,cAAW,YAAW,WAAU,miBAAkiB,UAAA,cAAA,CAAgB;AAAA,EAAA,CAC3lB,EAAA,CACJ,GCFFK,IAA8B,MAAM;AACtC,QAAMC,IAAqBC,EAAuB,IAAI,GAChDC,IAAWC,EAAA,GACX,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAI,GAEnD,EAAC,wBAAAG,GAAwB,wBAAAC,EAAA,IAA0BC,EAA4B,SAAS,EAAE,GAC1F,EAAC,MAAMC,IAAwB,CAAA,GAAI,WAAWC,MAA8BJ,GAE5EK,IAAsB,MAAM;AAC9B,UAAMC,IAAYf,EAAmB;AACrC,QAAI,CAACe;AACD;AAGJ,UAAMC,IAAaD,EAAU,aAAa,GACpCE,IAAaF,EAAU,aAAaA,EAAU,cAAcA,EAAU;AAE5E,IAAAV,EAAiBW,CAAU,GAC3BR,EAAkBS,CAAU;AAAA,EAChC;AAMA,MAJAC,EAAU,MAAM;AACZ,IAAAJ,EAAA;AAAA,EACJ,GAAG,CAACF,CAAqB,CAAC,GAEtB,CAACC,MAA+B,CAACD,KAAyBA,EAAsB,SAAS;AACzF,WAAO;AAGX,QAAMO,IAAgB,CAACC,MAAsB;AAAA,EAG7C,GAEMC,IAAe,CAACC,MAAqB;AACvC,IAAAZ,EA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BAAAC;AAAA,MACA,WAAAJ;AAAA,MACA,MAAA7C;AAAA,IAAA;AAAA,EAAA;AAER;"}
1
+ {"version":3,"file":"feed-Dg6CeeCP.mjs","sources":["../src/views/feed/components/feed-input.tsx","../src/views/feed/components/suggested-profiles.tsx","../src/views/feed/components/feed-list.tsx","../src/views/feed/feed.tsx"],"sourcesContent":["import APAvatar from '@src/components/global/ap-avatar';\nimport NewNoteModal from '@src/components/modals/new-note-modal';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\n\nconst FeedInput: React.FC<{user?: ActorProperties}> = ({user}) => {\n return (\n <NewNoteModal>\n <div className='relative my-5 w-full hover:cursor-pointer'>\n <div className='pointer-events-none absolute top-4 left-4'>\n <APAvatar author={user as ActorProperties} />\n </div>\n <div aria-label='New post' className='text inset-0 flex h-[72px] w-full items-center justify-start rounded-lg bg-white pl-[68px] text-left text-[1.5rem] font-normal tracking-normal text-gray-500 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] transition-all hover:bg-white hover:shadow-[0_5px_24px_0px_rgba(0,0,0,0.05),0px_14px_12px_-9px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] dark:border dark:border-gray-925 dark:bg-black dark:shadow-none dark:hover:border-gray-800 dark:hover:bg-black dark:hover:shadow-none'>What&apos;s new?</div>\n </div>\n </NewNoteModal>\n );\n};\n\nexport default FeedInput;","import APAvatar from '@src/components/global/ap-avatar';\nimport FollowButton from '@src/components/global/follow-button';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport {Account} from '@src/api/activitypub';\nimport {Button, Separator, Skeleton} from '@tryghost/shade/components';\nimport {H4} from '@tryghost/shade/primitives';\nimport {LucideIcon} from '@tryghost/shade/utils';\nimport {useEffect, useRef, useState} from 'react';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\nimport {useSuggestedProfilesForUser} from '@src/hooks/use-activity-pub-queries';\n\nconst SuggestedProfiles: React.FC = () => {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const navigate = useNavigateWithBasePath();\n const [canScrollLeft, setCanScrollLeft] = useState(false);\n const [canScrollRight, setCanScrollRight] = useState(true);\n\n const {suggestedProfilesQuery, updateSuggestedProfile} = useSuggestedProfilesForUser('index', 10);\n const {data: suggestedProfilesData = [], isLoading: isLoadingSuggestedProfiles} = suggestedProfilesQuery;\n\n const updateScrollButtons = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const canScrollL = container.scrollLeft > 0;\n const canScrollR = container.scrollLeft < container.scrollWidth - container.clientWidth;\n\n setCanScrollLeft(canScrollL);\n setCanScrollRight(canScrollR);\n };\n\n useEffect(() => {\n updateScrollButtons();\n }, [suggestedProfilesData]);\n\n if (!isLoadingSuggestedProfiles && (!suggestedProfilesData || suggestedProfilesData.length < 4)) {\n return null;\n }\n\n const handleDismiss = (profileId: string) => {\n // TODO: Implement dismiss functionality\n void profileId;\n };\n\n const handleFollow = (profile: Account) => {\n updateSuggestedProfile(profile.id, {\n followedByMe: true\n });\n };\n\n const handleUnfollow = (profile: Account) => {\n updateSuggestedProfile(profile.id, {\n followedByMe: false\n });\n };\n\n const scrollLeft = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const cardWidth = 160 + 16; // w-40 (160px) + gap-4 (16px)\n container.scrollBy({left: -cardWidth * 2, behavior: 'smooth'});\n };\n\n const scrollRight = () => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n const cardWidth = 160 + 16; // w-40 (160px) + gap-4 (16px)\n container.scrollBy({left: cardWidth * 2, behavior: 'smooth'});\n };\n\n return (\n <>\n <div className='pt-4 pb-7'>\n <div className='mb-3 flex items-center justify-between'>\n <H4 className='text-lg font-semibold text-black dark:text-white'>More people to follow</H4>\n <Button className='px-0 font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white' variant='link' onClick={() => navigate('/explore')}>\n Find more &rarr;\n </Button>\n </div>\n\n <div className='relative'>\n {canScrollLeft && (\n <Button\n className='absolute top-1/2 -left-10 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white'\n variant='ghost'\n onClick={scrollLeft}\n >\n <LucideIcon.ChevronLeft className='size-6!' />\n </Button>\n )}\n\n {canScrollRight && (\n <Button\n className='absolute top-1/2 -right-10 z-10 size-10 -translate-y-1/2 text-gray-700 hover:bg-transparent max-lg:hidden dark:text-gray-600 dark:hover:text-white'\n variant='ghost'\n onClick={scrollRight}\n >\n <LucideIcon.ChevronRight className='size-6!' />\n </Button>\n )}\n\n <div\n ref={scrollContainerRef}\n className='flex snap-x snap-mandatory gap-4 overflow-x-auto'\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none'\n }}\n onScroll={updateScrollButtons}\n >\n {(isLoadingSuggestedProfiles ? Array(10).fill(null) : (suggestedProfilesData || [])).map((profile, index) => (\n <div\n key={profile?.id || `loading-${index}`}\n className='relative w-40 shrink-0 snap-start rounded-lg bg-gray-75 p-4 dark:bg-gray-925/30'\n onClick={!isLoadingSuggestedProfiles && profile ? () => navigate(`/profile/${profile.handle}`) : undefined}\n >\n <Button\n className='absolute top-1 right-2 hidden p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300'\n variant='link'\n onClick={(e) => {\n e.stopPropagation();\n handleDismiss(profile?.id || '');\n }}\n >\n <LucideIcon.X className='size-4' />\n </Button>\n\n <div className='flex flex-col items-center text-center'>\n <div className='mb-3'>\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='size-16 rounded-full' />\n ) : (\n <ProfilePreviewHoverCard actor={profile} align='center'>\n <div>\n <APAvatar\n author={{\n icon: {url: profile?.avatarUrl || ''},\n name: profile?.name || '',\n handle: profile?.handle || ''\n }}\n size='md'\n />\n </div>\n </ProfilePreviewHoverCard>\n )}\n </div>\n\n <span className='mb-6 w-full truncate font-semibold text-black dark:text-white'>\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='h-5 w-32' />\n ) : (\n profile?.name || ''\n )}\n </span>\n\n {isLoadingSuggestedProfiles ? (\n <Skeleton className='h-8 w-16' />\n ) : (\n <FollowButton\n following={profile?.followedByMe || false}\n handle={profile?.handle || ''}\n type='primary'\n onFollow={() => profile && handleFollow(profile)}\n onUnfollow={() => profile && handleUnfollow(profile)}\n />\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n <Separator />\n </>\n );\n};\n\nexport default SuggestedProfiles;\n","import FeedInput from './feed-input';\nimport FeedItem from '@src/components/feed/feed-item';\nimport Layout from '@src/components/layout';\nimport NewNoteModal from '@src/components/modals/new-note-modal';\nimport SuggestedProfiles from './suggested-profiles';\nimport {Activity} from '@src/api/activitypub';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\nimport {Button, LoadingIndicator, Separator} from '@tryghost/shade/components';\nimport {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';\nimport {LucideIcon} from '@tryghost/shade/utils';\nimport {isPendingActivity} from '@src/utils/pending-activity';\nimport {useEffect, useRef} from 'react';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\n\nexport type FeedListProps = {\n isLoading: boolean,\n activities: Activity[],\n user: ActorProperties,\n fetchNextPage: () => void,\n hasNextPage: boolean,\n isFetchingNextPage: boolean\n}\n\nconst FeedList:React.FC<FeedListProps> = ({\n isLoading,\n activities,\n user,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage\n}) => {\n const navigate = useNavigateWithBasePath();\n\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreRef = useRef<HTMLDivElement | null>(null);\n const endLoadMoreRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n\n observerRef.current = new IntersectionObserver((entries) => {\n if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {\n fetchNextPage();\n }\n });\n\n if (loadMoreRef.current) {\n observerRef.current.observe(loadMoreRef.current);\n }\n\n if (endLoadMoreRef.current) {\n observerRef.current.observe(endLoadMoreRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [hasNextPage, isFetchingNextPage, fetchNextPage]);\n\n const loadMoreIndex = Math.max(0, Math.floor(activities.length * 0.75) - 1);\n\n return (\n <Layout>\n <div className='flex w-full flex-col'>\n <div className='w-full'>\n {activities.length > 0 ? (\n <div className='my-4'>\n <div className='mx-auto flex items-start gap-11'>\n <div className='flex w-full min-w-0 flex-col items-center'>\n <div className='flex w-full max-w-[620px] min-w-0 flex-col items-start'>\n <FeedInput user={user} />\n <ul className='mx-auto flex w-full flex-col px-4 max-lg:px-0' data-testid=\"feed-list\">\n {activities.map((activity, index) => (\n <li\n // eslint-disable-next-line react/no-array-index-key\n key={`${activity.id}-${activity.type}-${index}`} // We are using index here as activity.id is cannot be guaranteed to be unique at the moment\n data-testid=\"feed-item\"\n data-test-view-article\n >\n <FeedItem\n actor={activity.actor}\n allowDelete={activity.object.authored}\n commentCount={activity.object.replyCount ?? 0}\n isLoading={isLoading}\n isPending={isPendingActivity(activity.id)}\n layout={'feed'}\n likeCount={activity.object.likeCount ?? 0}\n object={activity.object}\n repostCount={activity.object.repostCount ?? 0}\n type={activity.type}\n onClick={() => {\n navigate(`/notes/${encodeURIComponent(activity.id)}`);\n }}\n />\n {index < activities.length - 1 && (\n <Separator />\n )}\n {index === 3 && (\n <SuggestedProfiles />\n )}\n {index === loadMoreIndex && (\n <div ref={loadMoreRef} className='h-1'></div>\n )}\n </li>\n ))}\n {isFetchingNextPage && (\n <li className='flex flex-col items-center justify-center gap-4 text-center'>\n <LoadingIndicator size='md' />\n </li>\n )}\n </ul>\n <div ref={endLoadMoreRef} className='h-1'></div>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className='flex w-full flex-col items-center gap-10'>\n <div className='mt-4 flex w-full max-w-[620px] flex-col items-center'>\n <FeedInput user={user} />\n <div className='mt-[-128px]'>\n <EmptyViewIndicator>\n <EmptyViewIcon><LucideIcon.Hash /></EmptyViewIcon>\n <div>The Feed is the stream of thoughts and <span className='text-black dark:text-white'>bite-sized updates</span> from people you follow in the Social Web. It&apos;s looking a little empty right now but once the people you follow start posting, their updates will show up here.</div>\n <NewNoteModal>\n <Button className='text-white dark:text-black'>\n <LucideIcon.FilePen />\n Write your first note\n </Button>\n </NewNoteModal>\n </EmptyViewIndicator>\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n </Layout>\n );\n};\n\nexport default FeedList;\n","import AppError from '@components/layout/error';\nimport FeedList from './components/feed-list';\nimport React from 'react';\nimport {isApiError} from '@src/api/activitypub';\nimport {\n useFeedForUser,\n useUserDataForUser\n} from '@hooks/use-activity-pub-queries';\n\nconst Feed: React.FC = () => {\n const {feedQuery} = useFeedForUser({enabled: true});\n const {data, error, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading} = feedQuery;\n\n const activities = (data?.pages.flatMap(page => page.posts) ?? Array.from({length: 5}, (_, index) => ({id: `placeholder-${index}`, object: {}})));\n\n const {data: user} = useUserDataForUser('index');\n\n if (error && isApiError(error)) {\n return <AppError errorCode={error.code} statusCode={error.statusCode}/>;\n }\n\n return <FeedList\n activities={activities}\n fetchNextPage={fetchNextPage}\n hasNextPage={hasNextPage!}\n isFetchingNextPage={isFetchingNextPage}\n isLoading={isLoading}\n user={user!}\n />;\n};\n\nexport default Feed;\n"],"names":["FeedInput","user","jsx","NewNoteModal","jsxs","APAvatar","SuggestedProfiles","scrollContainerRef","useRef","navigate","useNavigateWithBasePath","canScrollLeft","setCanScrollLeft","useState","canScrollRight","setCanScrollRight","suggestedProfilesQuery","updateSuggestedProfile","useSuggestedProfilesForUser","suggestedProfilesData","isLoadingSuggestedProfiles","updateScrollButtons","container","canScrollL","canScrollR","useEffect","handleDismiss","profileId","handleFollow","profile","handleUnfollow","scrollLeft","scrollRight","Fragment","H4","Button","LucideIcon.ChevronLeft","LucideIcon.ChevronRight","index","e","LucideIcon.X","Skeleton","ProfilePreviewHoverCard","FollowButton","Separator","FeedList","isLoading","activities","fetchNextPage","hasNextPage","isFetchingNextPage","observerRef","loadMoreRef","endLoadMoreRef","entries","loadMoreIndex","Layout","activity","FeedItem","isPendingActivity","LoadingIndicator","EmptyViewIndicator","EmptyViewIcon","LucideIcon.Hash","LucideIcon.FilePen","Feed","feedQuery","useFeedForUser","data","error","page","_","useUserDataForUser","isApiError","AppError"],"mappings":";;;AAIA,MAAMA,IAAgD,CAAC,EAAC,MAAAC,QAEhDC,gBAAAA,EAAAA,IAACC,GAAA,EACG,UAAAC,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAU,6CACX,UAAA;AAAA,EAAAF,gBAAAA,EAAAA,IAAC,SAAI,WAAU,6CACX,gCAACG,GAAA,EAAS,QAAQJ,GAAyB,EAAA,CAC/C;AAAA,wBACC,OAAA,EAAI,cAAW,YAAW,WAAU,miBAAkiB,UAAA,cAAA,CAAgB;AAAA,EAAA,CAC3lB,EAAA,CACJ,GCFFK,IAA8B,MAAM;AACtC,QAAMC,IAAqBC,EAAuB,IAAI,GAChDC,IAAWC,EAAA,GACX,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAI,GAEnD,EAAC,wBAAAG,GAAwB,wBAAAC,EAAA,IAA0BC,EAA4B,SAAS,EAAE,GAC1F,EAAC,MAAMC,IAAwB,CAAA,GAAI,WAAWC,MAA8BJ,GAE5EK,IAAsB,MAAM;AAC9B,UAAMC,IAAYf,EAAmB;AACrC,QAAI,CAACe;AACD;AAGJ,UAAMC,IAAaD,EAAU,aAAa,GACpCE,IAAaF,EAAU,aAAaA,EAAU,cAAcA,EAAU;AAE5E,IAAAV,EAAiBW,CAAU,GAC3BR,EAAkBS,CAAU;AAAA,EAChC;AAMA,MAJAC,EAAU,MAAM;AACZ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AIH,KAASI,EAAWJ,CAAK,0BACjBK,GAAA,EAAS,WAAWL,EAAM,MAAM,YAAYA,EAAM,YAAW,IAGlEnE,gBAAAA,EAAAA;AAAAA,IAAC2C;AAAA,IAAA;AAAA,MACJ,YAAAE;AAAA,MACA,eAAAC;AAAA,MACA,aAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,WAAAJ;AAAA,MACA,MAAA7C;AAAA,IAAA;AAAA,EAAA;AAER;"}
@@ -1,6 +1,6 @@
1
- import { a6 as e } from "./index-CSkOAA7W.mjs";
1
+ import { a6 as e } from "./index-DHVdVxus.mjs";
2
2
  /**
3
- * @license lucide-react v0.553.0 - ISC
3
+ * @license lucide-react v0.577.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
@@ -14,4 +14,4 @@ const y = [
14
14
  export {
15
15
  x as H
16
16
  };
17
- //# sourceMappingURL=hash-D8uyJrFB.mjs.map
17
+ //# sourceMappingURL=hash-CSsTpjMi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"hash-D8uyJrFB.mjs","sources":["../../../node_modules/.pnpm/lucide-react@0.553.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/hash.js"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"line\", { x1: \"4\", x2: \"20\", y1: \"9\", y2: \"9\", key: \"4lhtct\" }],\n [\"line\", { x1: \"4\", x2: \"20\", y1: \"15\", y2: \"15\", key: \"vyu0kd\" }],\n [\"line\", { x1: \"10\", x2: \"8\", y1: \"3\", y2: \"21\", key: \"1ggp8o\" }],\n [\"line\", { x1: \"16\", x2: \"14\", y1: \"3\", y2: \"21\", key: \"weycgp\" }]\n];\nconst Hash = createLucideIcon(\"hash\", __iconNode);\n\nexport { __iconNode, Hash as default };\n//# sourceMappingURL=hash.js.map\n"],"names":["__iconNode","Hash","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC/D,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EACjE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAChE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AACnE,GACMC,IAAOC,EAAiB,QAAQF,CAAU;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"hash-CSsTpjMi.mjs","sources":["../../../node_modules/.pnpm/lucide-react@0.577.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/hash.js"],"sourcesContent":["/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"line\", { x1: \"4\", x2: \"20\", y1: \"9\", y2: \"9\", key: \"4lhtct\" }],\n [\"line\", { x1: \"4\", x2: \"20\", y1: \"15\", y2: \"15\", key: \"vyu0kd\" }],\n [\"line\", { x1: \"10\", x2: \"8\", y1: \"3\", y2: \"21\", key: \"1ggp8o\" }],\n [\"line\", { x1: \"16\", x2: \"14\", y1: \"3\", y2: \"21\", key: \"weycgp\" }]\n];\nconst Hash = createLucideIcon(\"hash\", __iconNode);\n\nexport { __iconNode, Hash as default };\n//# sourceMappingURL=hash.js.map\n"],"names":["__iconNode","Hash","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC/D,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EACjE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAChE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AACnE,GACMC,IAAOC,EAAiB,QAAQF,CAAU;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
- import { a6 as o } from "./index-CSkOAA7W.mjs";
1
+ import { a6 as o } from "./index-DHVdVxus.mjs";
2
2
  /**
3
- * @license lucide-react v0.553.0 - ISC
3
+ * @license lucide-react v0.577.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
@@ -18,4 +18,4 @@ const t = [
18
18
  export {
19
19
  e as I
20
20
  };
21
- //# sourceMappingURL=inbox-DZqNPQ3D.mjs.map
21
+ //# sourceMappingURL=inbox-DexTffBg.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"inbox-DZqNPQ3D.mjs","sources":["../../../node_modules/.pnpm/lucide-react@0.553.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/inbox.js"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"polyline\", { points: \"22 12 16 12 14 15 10 15 8 12 2 12\", key: \"o97t9d\" }],\n [\n \"path\",\n {\n d: \"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\",\n key: \"oot6mr\"\n }\n ]\n];\nconst Inbox = createLucideIcon(\"inbox\", __iconNode);\n\nexport { __iconNode, Inbox as default };\n//# sourceMappingURL=inbox.js.map\n"],"names":["__iconNode","Inbox","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,YAAY,EAAE,QAAQ,qCAAqC,KAAK,SAAQ,CAAE;AAAA,EAC3E;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AACA,GACMC,IAAQC,EAAiB,SAASF,CAAU;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"inbox-DexTffBg.mjs","sources":["../../../node_modules/.pnpm/lucide-react@0.577.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/inbox.js"],"sourcesContent":["/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"polyline\", { points: \"22 12 16 12 14 15 10 15 8 12 2 12\", key: \"o97t9d\" }],\n [\n \"path\",\n {\n d: \"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\",\n key: \"oot6mr\"\n }\n ]\n];\nconst Inbox = createLucideIcon(\"inbox\", __iconNode);\n\nexport { __iconNode, Inbox as default };\n//# sourceMappingURL=inbox.js.map\n"],"names":["__iconNode","Inbox","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,YAAY,EAAE,QAAQ,qCAAqC,KAAK,SAAQ,CAAE;AAAA,EAC3E;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AACA,GACMC,IAAQC,EAAiB,SAASF,CAAU;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { ag as U, R as g, ah as D, j as d, ai as G, aj as X, ak as Z, ae as P, al as ee, e as k, am as B, an as x, c as L, ao as te, b as K, ap as oe, W as y } from "./index-CSkOAA7W.mjs";
1
+ import { ag as U, R as g, ah as D, j as d, ai as G, aj as X, ak as Z, ae as P, al as ee, e as k, am as B, an as x, c as L, ao as te, b as K, ap as oe, W as y } from "./index-DHVdVxus.mjs";
2
2
  function ne(e) {
3
3
  const o = e + "CollectionProvider", [i, r] = U(o), [w, I] = i(
4
4
  o,
@@ -216,4 +216,4 @@ export {
216
216
  Ce as c,
217
217
  ce as u
218
218
  };
219
- //# sourceMappingURL=index-nevBSPxu.mjs.map
219
+ //# sourceMappingURL=index-BCgaO9tm.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-nevBSPxu.mjs","sources":["../../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@18.3.7_@types+react@18.3.28__@types+r_4e264787f1cadc3b39e6411b3bc7d186/node_modules/@radix-ui/react-collection/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@18.3.28_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@18.3.7_@types+react@18.3.28__@type_6f10866f94bcb38b5caff30079bbebd2/node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b","DirectionContext","React.createContext","useDirection","localDir","globalDir","React.useContext","ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","createRovingFocusGroupContext","createRovingFocusGroupScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React.forwardRef","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","React.useRef","direction","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","React.useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","React.useEffect","node","React.useCallback","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","itemProps","autoId","useId","id","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";AAQA,SAASA,GAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAG,EAAE;AAAA,EAC1E,GACQM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE;AACxD,WAAuBE,gBAAAA,EAAAA,IAAIT,GAAwB,EAAE,OAAAI,GAAO,SAAAI,GAAS,eAAeF,GAAK,UAAAD,GAAU;AAAA,EACrG;AACA,EAAAH,EAAmB,cAAcN;AACjC,QAAMc,IAAuBf,IAAO,kBAC9BgB,IAAqBC,EAAWF,CAAoB,GACpDG,IAAiBN,EAAM;AAAA,IAC3B,CAACJ,GAAOW,MAAiB;AACvB,YAAM,EAAE,OAAAV,GAAO,UAAAC,EAAQ,IAAKF,GACtBY,IAAUd,EAAqBS,GAAsBN,CAAK,GAC1DY,IAAeC,EAAgBH,GAAcC,EAAQ,aAAa;AACxE,aAAuBN,gBAAAA,EAAAA,IAAIE,GAAoB,EAAE,KAAKK,GAAc,UAAAX,EAAQ,CAAE;AAAA,IAChF;AAAA,EACJ;AACE,EAAAQ,EAAe,cAAcH;AAC7B,QAAMQ,IAAiBvB,IAAO,sBACxBwB,IAAiB,8BACjBC,IAAyBR,EAAWM,CAAc,GAClDG,IAAqBd,EAAM;AAAA,IAC/B,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
1
+ {"version":3,"file":"index-BCgaO9tm.mjs","sources":["../../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@18.3.7_@types+react@18.3.28__@types+r_4e264787f1cadc3b39e6411b3bc7d186/node_modules/@radix-ui/react-collection/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@18.3.28_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@18.3.7_@types+react@18.3.28__@type_6f10866f94bcb38b5caff30079bbebd2/node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b","DirectionContext","React.createContext","useDirection","localDir","globalDir","React.useContext","ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","createRovingFocusGroupContext","createRovingFocusGroupScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React.forwardRef","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","React.useRef","direction","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","React.useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","React.useEffect","node","React.useCallback","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","itemProps","autoId","useId","id","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";AAQA,SAASA,GAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAG,EAAE;AAAA,EAC1E,GACQM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE;AACxD,WAAuBE,gBAAAA,EAAA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GAAO9B,GAAaE,GAAK;AAC/C,QAAMsD,IAAMD,GAAqBzB,EAAM,KAAK5B,CAAG;AAC/C,MAAI,EAAAF,MAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAASwD,CAAG,MACtE,EAAAxD,MAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAASwD,CAAG;AACzE,WAAOF,GAAwBE,CAAG;AACpC;AACA,SAASlB,EAAWmB,GAAYC,IAAgB,IAAO;AACrD,QAAMC,IAA6B,SAAS;AAC5C,aAAWC,KAAaH;AAGtB,QAFIG,MAAcD,MAClBC,EAAU,MAAM,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAOrE,GACPsE,KAAO1B;","x_google_ignoreList":[0,1,2]}
@@ -1,8 +1,8 @@
1
- import { a6 as E, j as t, aK as H, R as u, d as C, aL as O, c as g, e as L, ax as D, ay as V, L as q, E as G, f as K, aM as Q, S as w, A as $, B as Z, aN as J, aa as P, h as b, r as X, ad as U, aO as Y, aP as ee, k as te, P as se } from "./index-CSkOAA7W.mjs";
2
- import { A as ae } from "./at-sign-Mjg-pZ6w.mjs";
3
- import { R as ne } from "./reply-1lPjfeAY.mjs";
1
+ import { a6 as E, j as t, aK as H, R as u, d as C, aL as O, c as g, e as L, ax as D, ay as V, L as q, E as G, f as K, aM as Q, S as w, A as $, B as Z, aN as J, aa as P, h as b, r as X, ad as U, aO as Y, aP as ee, k as te, P as se } from "./index-DHVdVxus.mjs";
2
+ import { A as ae } from "./at-sign-WxdwrLgJ.mjs";
3
+ import { R as ne } from "./reply-BwjYYb5Y.mjs";
4
4
  /**
5
- * @license lucide-react v0.553.0 - ISC
5
+ * @license lucide-react v0.577.0 - ISC
6
6
  *
7
7
  * This source code is licensed under the ISC license.
8
8
  * See the LICENSE file in the root directory of this source tree.
@@ -14,7 +14,7 @@ const le = [
14
14
  ["path", { d: "M11 6h6a2 2 0 0 1 2 2v10", key: "2f72bc" }]
15
15
  ], re = E("repeat-2", le);
16
16
  /**
17
- * @license lucide-react v0.553.0 - ISC
17
+ * @license lucide-react v0.577.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
@@ -364,4 +364,4 @@ const fe = ({ group: a }) => {
364
364
  export {
365
365
  Ne as default
366
366
  };
367
- //# sourceMappingURL=index-D8Ct0JF0.mjs.map
367
+ //# sourceMappingURL=index-BgIuNjJ4.mjs.map