@armoyu/ui 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/Providers.d.ts +6 -0
- package/dist/app/Providers.d.ts.map +1 -0
- package/dist/app/Providers.js +37 -0
- package/dist/app/Providers.js.map +1 -0
- package/dist/app/api/proxy/[...path]/route.d.ts +22 -0
- package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -0
- package/dist/app/api/proxy/[...path]/route.js +97 -0
- package/dist/app/api/proxy/[...path]/route.js.map +1 -0
- package/dist/app/layout.d.ts.map +1 -1
- package/dist/app/layout.js +16 -23
- package/dist/app/layout.js.map +1 -1
- package/dist/components/RollingNumber.d.ts +6 -6
- package/dist/components/RollingNumber.js +23 -23
- package/dist/components/RollingNumber.js.map +1 -1
- package/dist/components/StatsGrid.d.ts +5 -5
- package/dist/components/modules/auth/Dashboard.d.ts +1 -1
- package/dist/components/modules/auth/PostCard.d.ts +25 -24
- package/dist/components/modules/auth/PostCard.d.ts.map +1 -1
- package/dist/components/modules/auth/PostCard.js +115 -112
- package/dist/components/modules/auth/PostCard.js.map +1 -1
- package/dist/components/modules/auth/PostInteractionsModal.d.ts +11 -11
- package/dist/components/modules/auth/RepostModal.d.ts +21 -21
- package/dist/components/modules/auth/SidebarLeft.d.ts +1 -1
- package/dist/components/modules/auth/SidebarLeft.d.ts.map +1 -1
- package/dist/components/modules/auth/SidebarLeft.js +8 -40
- package/dist/components/modules/auth/SidebarLeft.js.map +1 -1
- package/dist/components/modules/auth/Stories.d.ts +1 -1
- package/dist/components/modules/auth/StoryViewer.d.ts +9 -9
- package/dist/components/modules/auth/widgets/EconomyWidget.d.ts +2 -0
- package/dist/components/modules/auth/widgets/EconomyWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/EconomyWidget.js +38 -0
- package/dist/components/modules/auth/widgets/EconomyWidget.js.map +1 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.d.ts +2 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.js +36 -0
- package/dist/components/modules/auth/widgets/LeagueWidget.js.map +1 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.d.ts +2 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.js +36 -0
- package/dist/components/modules/auth/widgets/MinecraftWidget.js.map +1 -0
- package/dist/components/modules/auth/widgets/RankingWidget.d.ts +5 -0
- package/dist/components/modules/auth/widgets/RankingWidget.d.ts.map +1 -0
- package/dist/components/modules/auth/widgets/RankingWidget.js +79 -0
- package/dist/components/modules/auth/widgets/RankingWidget.js.map +1 -0
- package/dist/components/modules/chat/ChatContainer.d.ts +1 -1
- package/dist/components/modules/chat/ChatInput.d.ts +4 -4
- package/dist/components/modules/chat/ChatList.d.ts +6 -6
- package/dist/components/modules/chat/ChatNotes.d.ts +1 -1
- package/dist/components/modules/community/GroupHeader.d.ts +10 -10
- package/dist/components/modules/community/GroupMenu.d.ts +9 -9
- package/dist/components/modules/community/SchoolCard.d.ts +6 -6
- package/dist/components/modules/community/SurveyCard.d.ts +6 -6
- package/dist/components/modules/forum/ForumBoard.d.ts +16 -16
- package/dist/components/modules/forum/ForumBoard.js +6 -6
- package/dist/components/modules/forum/ForumBoard.js.map +1 -1
- package/dist/components/modules/forum/TopicItem.d.ts +15 -15
- package/dist/components/modules/forum/TopicItem.js +6 -6
- package/dist/components/modules/forum/TopicItem.js.map +1 -1
- package/dist/components/modules/guest/Introduction.d.ts +1 -1
- package/dist/components/modules/magaza/BackToStore.d.ts +1 -1
- package/dist/components/modules/magaza/StoreHeader.d.ts +5 -5
- package/dist/components/modules/news/NewsCard.d.ts +11 -11
- package/dist/components/modules/news/NewsComments.d.ts +1 -1
- package/dist/components/modules/profile/ProfileContent.d.ts +4 -4
- package/dist/components/modules/profile/ProfileContent.d.ts.map +1 -1
- package/dist/components/modules/profile/ProfileContent.js +98 -70
- package/dist/components/modules/profile/ProfileContent.js.map +1 -1
- package/dist/components/modules/profile/ProfileHeader.d.ts +7 -7
- package/dist/components/modules/profile/ProfileHeader.js +19 -19
- package/dist/components/modules/profile/ProfileHeader.js.map +1 -1
- package/dist/components/modules/profile/ProfileStats.d.ts +6 -1
- package/dist/components/modules/profile/ProfileStats.d.ts.map +1 -1
- package/dist/components/modules/profile/ProfileStats.js +11 -6
- package/dist/components/modules/profile/ProfileStats.js.map +1 -1
- package/dist/components/modules/profile/TeamSelectorModal.d.ts +10 -10
- package/dist/components/modules/profile/tabs/AboutTab.d.ts +10 -0
- package/dist/components/modules/profile/tabs/AboutTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/AboutTab.js +9 -0
- package/dist/components/modules/profile/tabs/AboutTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/CareerTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/CareerTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/CareerTab.js +46 -0
- package/dist/components/modules/profile/tabs/CareerTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/FriendsTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/FriendsTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/FriendsTab.js +8 -0
- package/dist/components/modules/profile/tabs/FriendsTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/GamesTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/GamesTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/GamesTab.js +37 -0
- package/dist/components/modules/profile/tabs/GamesTab.js.map +1 -0
- package/dist/components/modules/profile/tabs/PostsTab.d.ts +7 -0
- package/dist/components/modules/profile/tabs/PostsTab.d.ts.map +1 -0
- package/dist/components/modules/profile/tabs/PostsTab.js +81 -0
- package/dist/components/modules/profile/tabs/PostsTab.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.d.ts +2 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.js +6 -0
- package/dist/components/modules/profile/widgets/ProfileBadgesWidget.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.d.ts +6 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.js +6 -0
- package/dist/components/modules/profile/widgets/ProfileCloudWidget.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.d.ts +8 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.js +12 -0
- package/dist/components/modules/profile/widgets/ProfileFriendsWidget.js.map +1 -0
- package/dist/components/modules/stations/StationCard.d.ts +2 -2
- package/dist/components/modules/stations/StationQRModal.d.ts +9 -9
- package/dist/components/shared/DevTools.d.ts +2 -0
- package/dist/components/shared/DevTools.d.ts.map +1 -0
- package/dist/components/shared/DevTools.js +39 -0
- package/dist/components/shared/DevTools.js.map +1 -0
- package/dist/components/shared/FloatingChatButton.d.ts +4 -4
- package/dist/components/shared/Header.d.ts +1 -1
- package/dist/components/shared/Header.d.ts.map +1 -1
- package/dist/components/shared/Header.js +108 -97
- package/dist/components/shared/Header.js.map +1 -1
- package/dist/components/shared/LoginModal.d.ts +4 -4
- package/dist/components/shared/LoginModal.d.ts.map +1 -1
- package/dist/components/shared/LoginModal.js +65 -69
- package/dist/components/shared/LoginModal.js.map +1 -1
- package/dist/components/shared/MainLayoutWrapper.d.ts +3 -3
- package/dist/components/showcase/ProfileTab.d.ts.map +1 -1
- package/dist/components/showcase/ProfileTab.js +43 -3
- package/dist/components/showcase/ProfileTab.js.map +1 -1
- package/dist/components/showcase/SocialTab.d.ts.map +1 -1
- package/dist/components/showcase/SocialTab.js +86 -2
- package/dist/components/showcase/SocialTab.js.map +1 -1
- package/dist/context/ArmoyuContext.d.ts +42 -0
- package/dist/context/ArmoyuContext.d.ts.map +1 -0
- package/dist/context/ArmoyuContext.js +76 -0
- package/dist/context/ArmoyuContext.js.map +1 -0
- package/dist/context/AuthContext.d.ts +18 -18
- package/dist/context/AuthContext.d.ts.map +1 -1
- package/dist/context/AuthContext.js +97 -74
- package/dist/context/AuthContext.js.map +1 -1
- package/dist/context/CartContext.d.ts +16 -16
- package/dist/context/SocketContext.d.ts +12 -12
- package/dist/context/SocketContext.d.ts.map +1 -1
- package/dist/context/SocketContext.js +31 -30
- package/dist/context/SocketContext.js.map +1 -1
- package/dist/index.d.ts +67 -65
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -80
- package/dist/index.js.map +1 -1
- package/dist/lib/ArmoyuUI.d.ts +18 -0
- package/dist/lib/ArmoyuUI.d.ts.map +1 -0
- package/dist/lib/ArmoyuUI.js +25 -0
- package/dist/lib/ArmoyuUI.js.map +1 -0
- package/dist/lib/constants/educationData.d.ts +7 -7
- package/dist/lib/constants/seedData.d.ts +164 -164
- package/dist/lib/constants/seedData.d.ts.map +1 -1
- package/dist/lib/constants/seedData.js +694 -694
- package/dist/lib/constants/seedData.js.map +1 -1
- package/dist/lib/constants/stationData.d.ts +13 -13
- package/dist/lib/constants/stationData.js +166 -166
- package/dist/lib/constants/stationData.js.map +1 -1
- package/dist/lib/constants/surveyData.d.ts +2 -2
- package/dist/lib/constants/teamData.d.ts +12 -12
- package/package.json +14 -12
- package/next.config.ts +0 -13
- package/postcss.config.js +0 -6
- package/src/app/layout.tsx +0 -67
- package/src/app/page.tsx +0 -101
- package/src/components/Button.tsx +0 -41
- package/src/components/GenderStatsBar.tsx +0 -66
- package/src/components/RollingNumber.tsx +0 -50
- package/src/components/Slider.tsx +0 -114
- package/src/components/StatsGrid.tsx +0 -35
- package/src/components/ViewModeToggle.tsx +0 -39
- package/src/components/modules/auth/Dashboard.tsx +0 -649
- package/src/components/modules/auth/MediaLightbox.tsx +0 -112
- package/src/components/modules/auth/PostCard.tsx +0 -556
- package/src/components/modules/auth/PostInteractionsModal.tsx +0 -138
- package/src/components/modules/auth/RepostModal.tsx +0 -167
- package/src/components/modules/auth/SidebarLeft.tsx +0 -237
- package/src/components/modules/auth/Stories.tsx +0 -69
- package/src/components/modules/auth/StoryViewer.tsx +0 -146
- package/src/components/modules/chat/ChatContainer.tsx +0 -332
- package/src/components/modules/chat/ChatInput.tsx +0 -57
- package/src/components/modules/chat/ChatList.tsx +0 -179
- package/src/components/modules/chat/ChatMessage.tsx +0 -43
- package/src/components/modules/chat/ChatNotes.tsx +0 -58
- package/src/components/modules/community/GroupHeader.tsx +0 -111
- package/src/components/modules/community/GroupMenu.tsx +0 -82
- package/src/components/modules/community/SchoolCard.tsx +0 -104
- package/src/components/modules/community/SurveyCard.tsx +0 -149
- package/src/components/modules/forum/ForumBoard.tsx +0 -78
- package/src/components/modules/forum/ForumPost.tsx +0 -71
- package/src/components/modules/forum/NewTopicModal.tsx +0 -112
- package/src/components/modules/forum/TopicItem.tsx +0 -72
- package/src/components/modules/galleries/GalleryCard.tsx +0 -66
- package/src/components/modules/giveaways/GiveawayCard.tsx +0 -76
- package/src/components/modules/groups/ApplicationModal.tsx +0 -133
- package/src/components/modules/groups/GroupCard.tsx +0 -96
- package/src/components/modules/guest/Introduction.tsx +0 -60
- package/src/components/modules/magaza/BackToStore.tsx +0 -53
- package/src/components/modules/magaza/StoreHeader.tsx +0 -74
- package/src/components/modules/news/NewsCard.tsx +0 -66
- package/src/components/modules/news/NewsComments.tsx +0 -141
- package/src/components/modules/profile/CloudStorageModal.tsx +0 -200
- package/src/components/modules/profile/EditProfileModal.tsx +0 -191
- package/src/components/modules/profile/ProfileContent.tsx +0 -491
- package/src/components/modules/profile/ProfileHeader.tsx +0 -128
- package/src/components/modules/profile/ProfileStats.tsx +0 -72
- package/src/components/modules/profile/TeamSelectorModal.tsx +0 -129
- package/src/components/modules/stations/StationCard.tsx +0 -95
- package/src/components/modules/stations/StationQRModal.tsx +0 -102
- package/src/components/shared/FloatingChatButton.tsx +0 -57
- package/src/components/shared/Footer.tsx +0 -77
- package/src/components/shared/Header.tsx +0 -799
- package/src/components/shared/LoginModal.tsx +0 -208
- package/src/components/shared/MainLayoutWrapper.tsx +0 -15
- package/src/components/shared/PageWidth.tsx +0 -22
- package/src/components/showcase/CommunityTab.tsx +0 -22
- package/src/components/showcase/CorporateTab.tsx +0 -38
- package/src/components/showcase/GeneralTab.tsx +0 -41
- package/src/components/showcase/MessagesTab.tsx +0 -26
- package/src/components/showcase/ProfileTab.tsx +0 -20
- package/src/components/showcase/ShopTab.tsx +0 -24
- package/src/components/showcase/SocialTab.tsx +0 -28
- package/src/context/AuthContext.tsx +0 -104
- package/src/context/CartContext.tsx +0 -93
- package/src/context/ChatContext.tsx +0 -32
- package/src/context/LayoutContext.tsx +0 -29
- package/src/context/SocketContext.tsx +0 -50
- package/src/context/ThemeContext.tsx +0 -52
- package/src/index.ts +0 -96
- package/src/lib/constants/educationData.ts +0 -124
- package/src/lib/constants/punishmentData.ts +0 -201
- package/src/lib/constants/seedData.ts +0 -758
- package/src/lib/constants/stationData.ts +0 -170
- package/src/lib/constants/surveyData.ts +0 -53
- package/src/lib/constants/teamData.ts +0 -69
- package/src/lib/utils/numberFormat.ts +0 -16
- package/src/lib/utils/odpUtils.ts +0 -51
- package/src/types/index.ts +0 -1
- package/src/types/stats.ts +0 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Providers.d.ts","sourceRoot":"","sources":["../../src/app/Providers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAaxC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAoDrD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { ArmoyuApi } from "@armoyu/core";
|
|
5
|
+
import { ArmoyuProvider } from "../context/ArmoyuContext";
|
|
6
|
+
import { ThemeProvider } from "../context/ThemeContext";
|
|
7
|
+
import { AuthProvider } from "../context/AuthContext";
|
|
8
|
+
import { SocketProvider } from "../context/SocketContext";
|
|
9
|
+
import { LayoutProvider } from "../context/LayoutContext";
|
|
10
|
+
import { CartProvider } from "../context/CartContext";
|
|
11
|
+
import { ChatProvider } from "../context/ChatContext";
|
|
12
|
+
import { ArmoyuUI } from '../lib/ArmoyuUI';
|
|
13
|
+
import { DevTools } from '../components/shared/DevTools';
|
|
14
|
+
export function Providers({ children }) {
|
|
15
|
+
const [ui] = useState(() => {
|
|
16
|
+
try {
|
|
17
|
+
// Use local proxy to avoid CORS issues in development
|
|
18
|
+
const baseUrl = typeof window !== 'undefined' ? `${window.location.origin}/api/proxy` : '/api/proxy';
|
|
19
|
+
const api = new ArmoyuApi("armoyu_showcase_key", {
|
|
20
|
+
baseUrl: baseUrl
|
|
21
|
+
});
|
|
22
|
+
return new ArmoyuUI(api);
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
console.error("[ARMOYU] Initialization Error:", e);
|
|
26
|
+
// Fallback
|
|
27
|
+
return new ArmoyuUI(new ArmoyuApi("fallback", { baseUrl: "" }));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return (_jsx(ArmoyuProvider, { ui: ui, navigation: {
|
|
31
|
+
profilePrefix: '/p',
|
|
32
|
+
groupPrefix: '/g',
|
|
33
|
+
forumPrefix: '/topluluk/forum',
|
|
34
|
+
educationPrefix: '/akademi'
|
|
35
|
+
}, children: _jsx(ThemeProvider, { children: _jsx(AuthProvider, { children: _jsx(SocketProvider, { children: _jsx(LayoutProvider, { children: _jsx(CartProvider, { children: _jsxs(ChatProvider, { children: [_jsxs("div", { className: "fixed inset-0 pointer-events-none z-[-1]", children: [_jsx("div", { className: "absolute top-[-10%] left-[-10%] w-[40%] h-[40%] bg-blue-600/20 blur-[120px] rounded-full" }), _jsx("div", { className: "absolute bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-purple-600/20 blur-[120px] rounded-full" })] }), _jsx(DevTools, {}), children] }) }) }) }) }) }) }));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=Providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Providers.js","sourceRoot":"","sources":["../../src/app/Providers.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAMzD,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAkB;IACpD,MAAM,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE;QACzB,IAAI,CAAC;YACH,sDAAsD;YACtD,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC;YAErG,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,qBAAqB,EAAE;gBAC/C,OAAO,EAAE,OAAO;aACjB,CAAC,CAAC;YACH,OAAO,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAC;YACnD,WAAW;YACX,OAAO,IAAI,QAAQ,CAAC,IAAI,SAAS,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,cAAc,IACb,EAAE,EAAE,EAAE,EACN,UAAU,EAAE;YACV,aAAa,EAAE,IAAI;YACnB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,iBAAiB;YAC9B,eAAe,EAAE,UAAU;SAC5B,YAED,KAAC,aAAa,cACZ,KAAC,YAAY,cACX,KAAC,cAAc,cACb,KAAC,cAAc,cACb,KAAC,YAAY,cACX,MAAC,YAAY,eAEX,eAAK,SAAS,EAAC,0CAA0C,aACvD,cAAK,SAAS,EAAC,0FAA0F,GAAG,EAC5G,cAAK,SAAS,EAAC,gGAAgG,GAAG,IAC9G,EAGN,KAAC,QAAQ,KAAG,EAGX,QAAQ,IACI,GACF,GACA,GACF,GACJ,GACD,GACD,CAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
export declare function POST(req: NextRequest, { params }: {
|
|
3
|
+
params: Promise<{
|
|
4
|
+
path: string[];
|
|
5
|
+
}>;
|
|
6
|
+
}): Promise<NextResponse<any>>;
|
|
7
|
+
export declare function GET(req: NextRequest, { params }: {
|
|
8
|
+
params: Promise<{
|
|
9
|
+
path: string[];
|
|
10
|
+
}>;
|
|
11
|
+
}): Promise<NextResponse<any>>;
|
|
12
|
+
export declare function PUT(req: NextRequest, { params }: {
|
|
13
|
+
params: Promise<{
|
|
14
|
+
path: string[];
|
|
15
|
+
}>;
|
|
16
|
+
}): Promise<NextResponse<any>>;
|
|
17
|
+
export declare function DELETE(req: NextRequest, { params }: {
|
|
18
|
+
params: Promise<{
|
|
19
|
+
path: string[];
|
|
20
|
+
}>;
|
|
21
|
+
}): Promise<NextResponse<any>>;
|
|
22
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../src/app/api/proxy/[...path]/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAsB,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,8BAG/F;AAED,wBAAsB,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,8BAG9F;AAED,wBAAsB,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,8BAG9F;AAED,wBAAsB,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;CAAE,8BAGjG"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { NextResponse } from 'next/server';
|
|
2
|
+
export async function POST(req, { params }) {
|
|
3
|
+
const { path } = await params;
|
|
4
|
+
return handleProxy(req, path);
|
|
5
|
+
}
|
|
6
|
+
export async function GET(req, { params }) {
|
|
7
|
+
const { path } = await params;
|
|
8
|
+
return handleProxy(req, path);
|
|
9
|
+
}
|
|
10
|
+
export async function PUT(req, { params }) {
|
|
11
|
+
const { path } = await params;
|
|
12
|
+
return handleProxy(req, path);
|
|
13
|
+
}
|
|
14
|
+
export async function DELETE(req, { params }) {
|
|
15
|
+
const { path } = await params;
|
|
16
|
+
return handleProxy(req, path);
|
|
17
|
+
}
|
|
18
|
+
async function handleProxy(req, pathSegments) {
|
|
19
|
+
const apiKey = req.headers.get('x-api-key') || '';
|
|
20
|
+
const endpoint = '/' + pathSegments.join('/');
|
|
21
|
+
if (!apiKey) {
|
|
22
|
+
return NextResponse.json({ durum: 0, aciklama: 'X-API-KEY header missing' }, { status: 400 });
|
|
23
|
+
}
|
|
24
|
+
// Target Armoyu API host
|
|
25
|
+
const targetHost = 'https://api.aramizdakioyuncu.com';
|
|
26
|
+
// Prevent double /botlar/[apiKey] prefixing
|
|
27
|
+
let targetUrl;
|
|
28
|
+
if (endpoint.startsWith(`/botlar/${apiKey}`)) {
|
|
29
|
+
targetUrl = `${targetHost}${endpoint}`;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
targetUrl = `${targetHost}/botlar/${apiKey}${endpoint}`;
|
|
33
|
+
}
|
|
34
|
+
const method = req.method;
|
|
35
|
+
const headers = new Headers();
|
|
36
|
+
// Helper to safely set headers and avoid ISO-8859-1 errors
|
|
37
|
+
const safeSetHeader = (key, value) => {
|
|
38
|
+
if (!value)
|
|
39
|
+
return;
|
|
40
|
+
const isAscii = /^[ -~]*$/.test(value);
|
|
41
|
+
if (isAscii) {
|
|
42
|
+
headers.set(key, value);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
console.warn(`[Proxy] Skipping header ${key} due to non-ASCII characters`);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
// Whitelist of headers to forward
|
|
49
|
+
const allowedHeaders = ['authorization', 'content-type', 'x-api-key', 'accept', 'user-agent', 'x-requested-with'];
|
|
50
|
+
req.headers.forEach((value, key) => {
|
|
51
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
52
|
+
safeSetHeader(key, value);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
if (apiKey) {
|
|
56
|
+
safeSetHeader('X-API-KEY', apiKey);
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
const fetchOptions = {
|
|
60
|
+
method,
|
|
61
|
+
headers,
|
|
62
|
+
cache: 'no-store'
|
|
63
|
+
};
|
|
64
|
+
if (method !== 'GET' && method !== 'HEAD') {
|
|
65
|
+
try {
|
|
66
|
+
const bodyClone = req.clone();
|
|
67
|
+
const arrayBuffer = await bodyClone.arrayBuffer();
|
|
68
|
+
if (arrayBuffer.byteLength > 0) {
|
|
69
|
+
fetchOptions.body = arrayBuffer;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (bodyError) {
|
|
73
|
+
console.warn(`[Proxy] Body read warning: ${bodyError.message}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const response = await fetch(targetUrl, fetchOptions);
|
|
77
|
+
const responseText = await response.text();
|
|
78
|
+
let responseData;
|
|
79
|
+
try {
|
|
80
|
+
responseData = JSON.parse(responseText);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
responseData = responseText;
|
|
84
|
+
}
|
|
85
|
+
return NextResponse.json(responseData, { status: response.status });
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
console.error(`[Proxy Error] ${method} ${targetUrl}:`, error);
|
|
89
|
+
return NextResponse.json({
|
|
90
|
+
durum: 0,
|
|
91
|
+
aciklama: `Proxy Error: ${error.message}`,
|
|
92
|
+
targetUrl,
|
|
93
|
+
error: error.stack
|
|
94
|
+
}, { status: 500 });
|
|
95
|
+
}
|
|
96
|
+
}
|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AiB,MAAM,IAAI,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9D,OAAO,YAAY,CAAC,IAAI,CAAC;YACvB,KAAK,EAAE,CAAC;YACR,QAAQ,EAAE,gBAAgB,KAAK,CAAC,OAAO,EAAE;YACzC,SAAS;YACT,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACtB,CAAC;AACH,CAAC"}
|
package/dist/app/layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGrC,OAAO,gBAAgB,CAAC;AAKxB,eAAO,MAAM,QAAQ,EAAE,QAGtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GACT,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC,2CA8BD"}
|
package/dist/app/layout.js
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Inter } from 'next/font/google';
|
|
3
|
+
import Script from 'next/script';
|
|
3
4
|
import "../globals.css";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { AuthProvider } from "../context/AuthContext";
|
|
7
|
-
import { SocketProvider } from "../context/SocketContext";
|
|
8
|
-
import { CartProvider } from "../context/CartContext";
|
|
9
|
-
import { ChatProvider } from "../context/ChatContext";
|
|
10
|
-
const inter = Inter({
|
|
11
|
-
subsets: ['latin'],
|
|
12
|
-
variable: '--font-inter',
|
|
13
|
-
});
|
|
5
|
+
import { Providers } from './Providers';
|
|
6
|
+
const inter = Inter({ subsets: ['latin'] });
|
|
14
7
|
export const metadata = {
|
|
15
8
|
title: "ARMOYU UI Showcase",
|
|
16
9
|
description: "Visual component gallery for Armoyu UI Library",
|
|
17
10
|
};
|
|
18
11
|
export default function RootLayout({ children, }) {
|
|
19
|
-
return (_jsxs("html", { lang: "tr", className: "scroll-smooth dark", suppressHydrationWarning: true, children: [_jsx("head", { children: _jsx("
|
|
20
|
-
__html: `
|
|
21
|
-
(function() {
|
|
22
|
-
try {
|
|
23
|
-
var theme = localStorage.getItem('armoyu_theme');
|
|
24
|
-
if (theme === 'light') {
|
|
25
|
-
document.documentElement.classList.remove('dark');
|
|
26
|
-
} else {
|
|
27
|
-
document.documentElement.classList.add('dark');
|
|
28
|
-
}
|
|
29
|
-
} catch (e) {}
|
|
30
|
-
})();
|
|
12
|
+
return (_jsxs("html", { lang: "tr", className: "scroll-smooth dark", suppressHydrationWarning: true, children: [_jsx("head", { children: _jsx(Script, { id: "theme-initializer", strategy: "beforeInteractive", dangerouslySetInnerHTML: {
|
|
13
|
+
__html: `
|
|
14
|
+
(function() {
|
|
15
|
+
try {
|
|
16
|
+
var theme = localStorage.getItem('armoyu_theme');
|
|
17
|
+
if (theme === 'light') {
|
|
18
|
+
document.documentElement.classList.remove('dark');
|
|
19
|
+
} else {
|
|
20
|
+
document.documentElement.classList.add('dark');
|
|
21
|
+
}
|
|
22
|
+
} catch (e) {}
|
|
23
|
+
})();
|
|
31
24
|
`,
|
|
32
|
-
} }) }), _jsx("body", { className: `${inter.
|
|
25
|
+
} }) }), _jsx("body", { className: `${inter.className} bg-armoyu-bg text-armoyu-text min-h-screen flex flex-col antialiased relative transition-colors duration-500`, children: _jsx(Providers, { children: children }) })] }));
|
|
33
26
|
}
|
|
34
27
|
//# sourceMappingURL=layout.js.map
|
package/dist/app/layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/app/layout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/app/layout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,KAAK,GAAG,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,gDAAgD;CAC9D,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GAGR;IACA,OAAO,CACL,gBAAM,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,oBAAoB,EAAC,wBAAwB,mBACrE,yBACE,KAAC,MAAM,IACL,EAAE,EAAC,mBAAmB,EACtB,QAAQ,EAAC,mBAAmB,EAC5B,uBAAuB,EAAE;wBACvB,MAAM,EAAE;;;;;;;;;;;aAWP;qBACF,GACD,GACG,EACP,eAAM,SAAS,EAAE,GAAG,KAAK,CAAC,SAAS,+GAA+G,YAChJ,KAAC,SAAS,cACP,QAAQ,GACC,GACP,IACF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
interface RollingNumberProps {
|
|
2
|
-
value: number | string;
|
|
3
|
-
className?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function RollingNumber({ value, className }: RollingNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
1
|
+
interface RollingNumberProps {
|
|
2
|
+
value: number | string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function RollingNumber({ value, className }: RollingNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
7
|
//# sourceMappingURL=RollingNumber.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
4
|
-
export function RollingNumber({ value, className = "" }) {
|
|
5
|
-
const [digits, setDigits] = useState([]);
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
setDigits(value.toString().split(''));
|
|
8
|
-
}, [value]);
|
|
9
|
-
return (_jsx("div", { className: `flex items-
|
|
10
|
-
}
|
|
11
|
-
function Digit({ char }) {
|
|
12
|
-
const isNumber = !isNaN(parseInt(char));
|
|
13
|
-
const [offset, setOffset] = useState(0);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (isNumber) {
|
|
16
|
-
setOffset(parseInt(char) * 100);
|
|
17
|
-
}
|
|
18
|
-
}, [char, isNumber]);
|
|
19
|
-
if (!isNumber) {
|
|
20
|
-
return _jsx("span", { className: "inline-block transition-all duration-500
|
|
21
|
-
}
|
|
22
|
-
return (_jsx("div", { className: "relative w-[0.
|
|
23
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
export function RollingNumber({ value, className = "" }) {
|
|
5
|
+
const [digits, setDigits] = useState([]);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
setDigits(value.toString().split(''));
|
|
8
|
+
}, [value]);
|
|
9
|
+
return (_jsx("div", { className: `flex items-center overflow-hidden h-[1.2em] leading-[1.2em] ${className}`, children: digits.map((digit, idx) => (_jsx(Digit, { char: digit }, `${idx}-${digit}`))) }));
|
|
10
|
+
}
|
|
11
|
+
function Digit({ char }) {
|
|
12
|
+
const isNumber = !isNaN(parseInt(char));
|
|
13
|
+
const [offset, setOffset] = useState(0);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (isNumber) {
|
|
16
|
+
setOffset(parseInt(char) * 100);
|
|
17
|
+
}
|
|
18
|
+
}, [char, isNumber]);
|
|
19
|
+
if (!isNumber) {
|
|
20
|
+
return _jsx("span", { className: "inline-block transition-all duration-500", children: char });
|
|
21
|
+
}
|
|
22
|
+
return (_jsx("div", { className: "relative w-[0.6em] h-[1.2em] flex flex-col transition-transform duration-500 ease-out", style: { transform: `translateY(-${offset}%)` }, children: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((n) => (_jsx("span", { className: "h-[1.2em] flex items-center justify-center shrink-0", children: n }, n))) }));
|
|
23
|
+
}
|
|
24
24
|
//# sourceMappingURL=RollingNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RollingNumber.js","sourceRoot":"","sources":["../../src/components/RollingNumber.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAOnD,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAsB;IACzE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAEnD,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACL,cAAK,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"RollingNumber.js","sourceRoot":"","sources":["../../src/components/RollingNumber.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAOnD,MAAM,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EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACzC,eAAc,SAAS,EAAC,qDAAqD,YAC1E,CAAC,IADO,CAAC,CAEL,CACR,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GlobalStats } from "@armoyu/core";
|
|
2
|
-
export interface StatsGridProps {
|
|
3
|
-
stats: GlobalStats;
|
|
4
|
-
}
|
|
5
|
-
export declare function StatsGrid({ stats }: StatsGridProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { GlobalStats } from "@armoyu/core";
|
|
2
|
+
export interface StatsGridProps {
|
|
3
|
+
stats: GlobalStats;
|
|
4
|
+
}
|
|
5
|
+
export declare function StatsGrid({ stats }: StatsGridProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=StatsGrid.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function Dashboard(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function Dashboard(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=Dashboard.d.ts.map
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { PostMedia } from './MediaLightbox';
|
|
2
|
-
import { User } from '@armoyu/core';
|
|
3
|
-
export interface PostCardProps {
|
|
4
|
-
id: string;
|
|
5
|
-
author: User | null;
|
|
6
|
-
content: string;
|
|
7
|
-
imageUrl?: string;
|
|
8
|
-
media?: PostMedia[];
|
|
9
|
-
createdAt: string;
|
|
10
|
-
stats: {
|
|
11
|
-
likes: number;
|
|
12
|
-
comments: number;
|
|
13
|
-
reposts?: number;
|
|
14
|
-
shares: number;
|
|
15
|
-
};
|
|
16
|
-
hashtags?: string[];
|
|
17
|
-
onTagClick?: (tag: string) => void;
|
|
18
|
-
isPending?: boolean;
|
|
19
|
-
likeList?: User[];
|
|
20
|
-
repostList?: User[];
|
|
21
|
-
commentList?: any[];
|
|
22
|
-
repostOf?: any;
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { PostMedia } from './MediaLightbox';
|
|
2
|
+
import { User } from '@armoyu/core';
|
|
3
|
+
export interface PostCardProps {
|
|
4
|
+
id: string;
|
|
5
|
+
author: User | null;
|
|
6
|
+
content: string;
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
media?: PostMedia[];
|
|
9
|
+
createdAt: string;
|
|
10
|
+
stats: {
|
|
11
|
+
likes: number;
|
|
12
|
+
comments: number;
|
|
13
|
+
reposts?: number;
|
|
14
|
+
shares: number;
|
|
15
|
+
};
|
|
16
|
+
hashtags?: string[];
|
|
17
|
+
onTagClick?: (tag: string) => void;
|
|
18
|
+
isPending?: boolean;
|
|
19
|
+
likeList?: User[];
|
|
20
|
+
repostList?: User[];
|
|
21
|
+
commentList?: any[];
|
|
22
|
+
repostOf?: any;
|
|
23
|
+
profilePrefix?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function PostCard({ id, author, content, imageUrl, media, createdAt, stats, hashtags, onTagClick, isPending, likeList, repostList, commentList, repostOf, profilePrefix }: PostCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
26
|
//# sourceMappingURL=PostCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../../src/components/modules/auth/PostCard.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM3D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PostCard.d.ts","sourceRoot":"","sources":["../../../../src/components/modules/auth/PostCard.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM3D,OAAO,EAAE,IAAI,EAAE,MAA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