@burdenoff/microfe-comradecircle 2026.723.1 → 2026.730.2
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/comradecircle/ComradeCircleRoutes.d.ts.map +1 -1
- package/dist/comradecircle/ComradeCircleRoutes.js +11 -7
- package/dist/comradecircle/ComradeCircleRoutes.js.map +1 -1
- package/dist/comradecircle/hooks/useComSubscription.d.ts +18 -0
- package/dist/comradecircle/hooks/useComSubscription.d.ts.map +1 -0
- package/dist/comradecircle/hooks/useComSubscription.js +110 -0
- package/dist/comradecircle/hooks/useComSubscription.js.map +1 -0
- package/dist/comradecircle/hooks/useComradeCircleApi.d.ts +51 -1
- package/dist/comradecircle/hooks/useComradeCircleApi.d.ts.map +1 -1
- package/dist/comradecircle/hooks/useComradeCircleApi.js +435 -223
- package/dist/comradecircle/hooks/useComradeCircleApi.js.map +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.js +268 -266
- package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.js +84 -82
- package/dist/comradecircle/pages/events/EventDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/members/MemberProfilePage.d.ts.map +1 -1
- package/dist/comradecircle/pages/members/MemberProfilePage.js +251 -129
- package/dist/comradecircle/pages/members/MemberProfilePage.js.map +1 -1
- package/dist/comradecircle/pages/monetization/MonetizationPage.d.ts +13 -0
- package/dist/comradecircle/pages/monetization/MonetizationPage.d.ts.map +1 -0
- package/dist/comradecircle/pages/monetization/MonetizationPage.js +596 -0
- package/dist/comradecircle/pages/monetization/MonetizationPage.js.map +1 -0
- package/dist/comradecircle/pages/posts/PostThreadPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/posts/PostThreadPage.js +26 -24
- package/dist/comradecircle/pages/posts/PostThreadPage.js.map +1 -1
- package/dist/comradecircle/pages/profile/MyProfilePage.d.ts.map +1 -1
- package/dist/comradecircle/pages/profile/MyProfilePage.js +101 -96
- package/dist/comradecircle/pages/profile/MyProfilePage.js.map +1 -1
- package/dist/comradecircle/types/index.d.ts +126 -0
- package/dist/comradecircle/types/index.d.ts.map +1 -1
- package/dist/comradecircle/utils/shellBridge.d.ts +45 -0
- package/dist/comradecircle/utils/shellBridge.d.ts.map +1 -0
- package/dist/comradecircle/utils/shellBridge.js +19 -0
- package/dist/comradecircle/utils/shellBridge.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComradeCircleRoutes.d.ts","sourceRoot":"","sources":["../../src/comradecircle/ComradeCircleRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ComradeCircleRoutes.d.ts","sourceRoot":"","sources":["../../src/comradecircle/ComradeCircleRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAsDhD,eAAO,MAAM,mBAAmB,EAAE,EA0CjC,CAAC"}
|
|
@@ -6,15 +6,15 @@ import { Navigate as a, Route as o, Routes as s, useLocation as c } from "react-
|
|
|
6
6
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
7
|
import { Spinner as d } from "@burdenoff/fe-libs/ui";
|
|
8
8
|
//#region src/comradecircle/ComradeCircleRoutes.tsx
|
|
9
|
-
var f = i(() => import("./pages/circles/CirclesPage.js").then((e) => ({ default: e.CirclesPage }))), p = i(() => import("./pages/circles/CircleDetailPage.js").then((e) => ({ default: e.CircleDetailPage }))), m = i(() => import("./pages/events/EventsPage.js").then((e) => ({ default: e.EventsPage }))), h = i(() => import("./pages/events/EventDetailPage.js").then((e) => ({ default: e.EventDetailPage }))), g = i(() => import("./pages/members/MembersPage.js").then((e) => ({ default: e.MembersPage }))), _ = i(() => import("./pages/members/MemberProfilePage.js").then((e) => ({ default: e.MemberProfilePage }))), v = i(() => import("./pages/profile/MyProfilePage.js").then((e) => ({ default: e.MyProfilePage }))), y = i(() => import("./pages/posts/PostThreadPage.js").then((e) => ({ default: e.PostThreadPage }))),
|
|
9
|
+
var f = i(() => import("./pages/circles/CirclesPage.js").then((e) => ({ default: e.CirclesPage }))), p = i(() => import("./pages/circles/CircleDetailPage.js").then((e) => ({ default: e.CircleDetailPage }))), m = i(() => import("./pages/events/EventsPage.js").then((e) => ({ default: e.EventsPage }))), h = i(() => import("./pages/events/EventDetailPage.js").then((e) => ({ default: e.EventDetailPage }))), g = i(() => import("./pages/members/MembersPage.js").then((e) => ({ default: e.MembersPage }))), _ = i(() => import("./pages/members/MemberProfilePage.js").then((e) => ({ default: e.MemberProfilePage }))), v = i(() => import("./pages/profile/MyProfilePage.js").then((e) => ({ default: e.MyProfilePage }))), y = i(() => import("./pages/monetization/MonetizationPage.js").then((e) => ({ default: e.MonetizationPage }))), b = i(() => import("./pages/posts/PostThreadPage.js").then((e) => ({ default: e.PostThreadPage }))), x = () => /* @__PURE__ */ l("div", {
|
|
10
10
|
className: "flex min-h-[400px] items-center justify-center",
|
|
11
11
|
children: /* @__PURE__ */ l(d, { size: "lg" })
|
|
12
|
-
}),
|
|
13
|
-
let { basePath: i, isStandalone: d } = e(),
|
|
14
|
-
return
|
|
12
|
+
}), S = () => {
|
|
13
|
+
let { basePath: i, isStandalone: d } = e(), S = c(), C = i === "/" ? "" : (i ?? "").replace(/\/$/, "");
|
|
14
|
+
return C && !d && !(S.pathname === C || S.pathname.startsWith(C + "/")) ? null : /* @__PURE__ */ u("div", {
|
|
15
15
|
className: "flex min-h-full flex-col pb-16 lg:pb-0",
|
|
16
16
|
children: [/* @__PURE__ */ l(r, {
|
|
17
|
-
fallback: /* @__PURE__ */ l(
|
|
17
|
+
fallback: /* @__PURE__ */ l(x, {}),
|
|
18
18
|
children: /* @__PURE__ */ u(s, { children: [
|
|
19
19
|
/* @__PURE__ */ l(o, {
|
|
20
20
|
index: !0,
|
|
@@ -46,12 +46,16 @@ var f = i(() => import("./pages/circles/CirclesPage.js").then((e) => ({ default:
|
|
|
46
46
|
}),
|
|
47
47
|
/* @__PURE__ */ l(o, {
|
|
48
48
|
path: "posts/:postId",
|
|
49
|
-
element: /* @__PURE__ */ l(
|
|
49
|
+
element: /* @__PURE__ */ l(b, {})
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ l(o, {
|
|
52
52
|
path: "profile",
|
|
53
53
|
element: /* @__PURE__ */ l(v, {})
|
|
54
54
|
}),
|
|
55
|
+
/* @__PURE__ */ l(o, {
|
|
56
|
+
path: "monetization",
|
|
57
|
+
element: /* @__PURE__ */ l(y, {})
|
|
58
|
+
}),
|
|
55
59
|
/* @__PURE__ */ l(o, {
|
|
56
60
|
path: "*",
|
|
57
61
|
element: /* @__PURE__ */ l(a, {
|
|
@@ -64,6 +68,6 @@ var f = i(() => import("./pages/circles/CirclesPage.js").then((e) => ({ default:
|
|
|
64
68
|
});
|
|
65
69
|
};
|
|
66
70
|
//#endregion
|
|
67
|
-
export {
|
|
71
|
+
export { S as ComradeCircleRoutes };
|
|
68
72
|
|
|
69
73
|
//# sourceMappingURL=ComradeCircleRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComradeCircleRoutes.js","names":[],"sources":["../../src/comradecircle/ComradeCircleRoutes.tsx"],"sourcesContent":["/**\n * ComradeCircle Routes\n * @module comradecircle\n *\n * Domain routes. The home feed is eager-loaded (primary landing); all other\n * pages are lazy-loaded. Every route maps to a real `com*` backend capability.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { useComradeCircle } from './context/ComradeCircleContext';\nimport { MobileBottomNav } from './components/MobileBottomNav';\n\n// Eager — primary landing\nimport { FeedPage } from './pages/FeedPage';\n\n// Circles (communities → channels → posts)\nconst CirclesPage = lazy(() =>\n import('./pages/circles/CirclesPage').then((m) => ({ default: m.CirclesPage }))\n);\nconst CircleDetailPage = lazy(() =>\n import('./pages/circles/CircleDetailPage').then((m) => ({ default: m.CircleDetailPage }))\n);\n\n// Events + RSVPs\nconst EventsPage = lazy(() =>\n import('./pages/events/EventsPage').then((m) => ({ default: m.EventsPage }))\n);\nconst EventDetailPage = lazy(() =>\n import('./pages/events/EventDetailPage').then((m) => ({ default: m.EventDetailPage }))\n);\n\n// Member directory + profiles\nconst MembersPage = lazy(() =>\n import('./pages/members/MembersPage').then((m) => ({ default: m.MembersPage }))\n);\nconst MemberProfilePage = lazy(() =>\n import('./pages/members/MemberProfilePage').then((m) => ({ default: m.MemberProfilePage }))\n);\n\n// My profile (edit)\nconst MyProfilePage = lazy(() =>\n import('./pages/profile/MyProfilePage').then((m) => ({ default: m.MyProfilePage }))\n);\n\n// Post thread — focused single-post + comments surface (BOFF-3955)\nconst PostThreadPage = lazy(() =>\n import('./pages/posts/PostThreadPage').then((m) => ({ default: m.PostThreadPage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Spinner size=\"lg\" />\n </div>\n);\n\nexport const ComradeCircleRoutes: FC = () => {\n const { basePath, isStandalone } = useComradeCircle();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the current path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col pb-16 lg:pb-0\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={<FeedPage />} />\n\n <Route path=\"circles\" element={<CirclesPage />} />\n <Route path=\"circles/:id\" element={<CircleDetailPage />} />\n\n <Route path=\"events\" element={<EventsPage />} />\n <Route path=\"events/:id\" element={<EventDetailPage />} />\n\n <Route path=\"members\" element={<MembersPage />} />\n <Route path=\"members/:memberId\" element={<MemberProfilePage />} />\n\n <Route path=\"posts/:postId\" element={<PostThreadPage />} />\n\n <Route path=\"profile\" element={<MyProfilePage />} />\n\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n <MobileBottomNav />\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAkBA,IAAM,IAAc,QAClB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAChF,GACM,IAAmB,QACvB,OAAO,uCAAoC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAC1F,GAGM,IAAa,QACjB,OAAO,gCAA6B,MAAM,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAC7E,GACM,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACvF,GAGM,IAAc,QAClB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAChF,GACM,IAAoB,QACxB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAC5F,GAGM,IAAgB,QACpB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CACpF,GAGM,IAAiB,QACrB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACpF,GAEM,UACJ,kBAAC,OAAD;CAAK,WAAU;WACb,kBAAC,GAAD,EAAS,MAAK,KAAM,CAAA;AACjB,CAAA,GAGM,UAAgC;CAC3C,IAAM,EAAE,aAAU,oBAAiB,EAAiB,GAC9C,IAAW,EAAY,GAEvB,IAAqB,MAAa,MAAM,MAAM,KAAY,IAAI,QAAQ,OAAO,EAAE;CAYrF,OATI,KAAsB,CAAC,KAIrB,EAFF,EAAS,aAAa,KACtB,EAAS,SAAS,WAAW,IAAqB,GAAG,KAE9C,OAKT,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GAAU,UAAU,kBAAC,GAAD,CAAa,CAAA;aAC/B,kBAAC,GAAD,EAAA,UAAA;IACE,kBAAC,GAAD;KAAO,OAAA;KAAM,SAAS,kBAAC,GAAD,CAAW,CAAA;IAAI,CAAA;IAErC,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,kBAAC,GAAD,CAAc,CAAA;IAAI,CAAA;IACjD,kBAAC,GAAD;KAAO,MAAK;KAAc,SAAS,kBAAC,GAAD,CAAmB,CAAA;IAAI,CAAA;IAE1D,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,kBAAC,GAAD,CAAa,CAAA;IAAI,CAAA;IAC/C,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,CAAkB,CAAA;IAAI,CAAA;IAExD,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,kBAAC,GAAD,CAAc,CAAA;IAAI,CAAA;IACjD,kBAAC,GAAD;KAAO,MAAK;KAAoB,SAAS,kBAAC,GAAD,CAAoB,CAAA;IAAI,CAAA;IAEjE,kBAAC,GAAD;KAAO,MAAK;KAAgB,SAAS,kBAAC,GAAD,CAAiB,CAAA;IAAI,CAAA;IAE1D,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,kBAAC,GAAD,CAAgB,CAAA;IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"ComradeCircleRoutes.js","names":[],"sources":["../../src/comradecircle/ComradeCircleRoutes.tsx"],"sourcesContent":["/**\n * ComradeCircle Routes\n * @module comradecircle\n *\n * Domain routes. The home feed is eager-loaded (primary landing); all other\n * pages are lazy-loaded. Every route maps to a real `com*` backend capability.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { useComradeCircle } from './context/ComradeCircleContext';\nimport { MobileBottomNav } from './components/MobileBottomNav';\n\n// Eager — primary landing\nimport { FeedPage } from './pages/FeedPage';\n\n// Circles (communities → channels → posts)\nconst CirclesPage = lazy(() =>\n import('./pages/circles/CirclesPage').then((m) => ({ default: m.CirclesPage }))\n);\nconst CircleDetailPage = lazy(() =>\n import('./pages/circles/CircleDetailPage').then((m) => ({ default: m.CircleDetailPage }))\n);\n\n// Events + RSVPs\nconst EventsPage = lazy(() =>\n import('./pages/events/EventsPage').then((m) => ({ default: m.EventsPage }))\n);\nconst EventDetailPage = lazy(() =>\n import('./pages/events/EventDetailPage').then((m) => ({ default: m.EventDetailPage }))\n);\n\n// Member directory + profiles\nconst MembersPage = lazy(() =>\n import('./pages/members/MembersPage').then((m) => ({ default: m.MembersPage }))\n);\nconst MemberProfilePage = lazy(() =>\n import('./pages/members/MemberProfilePage').then((m) => ({ default: m.MemberProfilePage }))\n);\n\n// My profile (edit)\nconst MyProfilePage = lazy(() =>\n import('./pages/profile/MyProfilePage').then((m) => ({ default: m.MyProfilePage }))\n);\n\n// Creator monetization console (BOFF-4454)\nconst MonetizationPage = lazy(() =>\n import('./pages/monetization/MonetizationPage').then((m) => ({ default: m.MonetizationPage }))\n);\n\n// Post thread — focused single-post + comments surface (BOFF-3955)\nconst PostThreadPage = lazy(() =>\n import('./pages/posts/PostThreadPage').then((m) => ({ default: m.PostThreadPage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Spinner size=\"lg\" />\n </div>\n);\n\nexport const ComradeCircleRoutes: FC = () => {\n const { basePath, isStandalone } = useComradeCircle();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the current path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col pb-16 lg:pb-0\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={<FeedPage />} />\n\n <Route path=\"circles\" element={<CirclesPage />} />\n <Route path=\"circles/:id\" element={<CircleDetailPage />} />\n\n <Route path=\"events\" element={<EventsPage />} />\n <Route path=\"events/:id\" element={<EventDetailPage />} />\n\n <Route path=\"members\" element={<MembersPage />} />\n <Route path=\"members/:memberId\" element={<MemberProfilePage />} />\n\n <Route path=\"posts/:postId\" element={<PostThreadPage />} />\n\n <Route path=\"profile\" element={<MyProfilePage />} />\n <Route path=\"monetization\" element={<MonetizationPage />} />\n\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n <MobileBottomNav />\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAkBA,IAAM,IAAc,QAClB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAChF,GACM,IAAmB,QACvB,OAAO,uCAAoC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAC1F,GAGM,IAAa,QACjB,OAAO,gCAA6B,MAAM,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAC7E,GACM,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACvF,GAGM,IAAc,QAClB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAChF,GACM,IAAoB,QACxB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAC5F,GAGM,IAAgB,QACpB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CACpF,GAGM,IAAmB,QACvB,OAAO,4CAAyC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAC/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kBAAC,GAAD,CAAgB,CAAA;IAAI,CAAA;IACnD,kBAAC,GAAD;KAAO,MAAK;KAAe,SAAS,kBAAC,GAAD,CAAmB,CAAA;IAAI,CAAA;IAE3D,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;KAAS,CAAA;IAAI,CAAA;GAChD,EAAA,CAAA;EACA,CAAA,GACV,kBAAC,GAAD,CAAkB,CAAA,CACf;;AAET"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface UseComSubscriptionArgs<TData> {
|
|
2
|
+
/** GraphQL subscription document (string SDL). */
|
|
3
|
+
query: string;
|
|
4
|
+
/** Variables for the subscription. */
|
|
5
|
+
variables?: Record<string, unknown>;
|
|
6
|
+
/** Stable identifier for this subscription, used in error context. */
|
|
7
|
+
operationName: string;
|
|
8
|
+
/** Called for each payload received from the subscription. */
|
|
9
|
+
onData: (data: TData) => void;
|
|
10
|
+
/** Polling fallback invoked when subscription is unavailable / failed. */
|
|
11
|
+
pollFn: () => Promise<void> | void;
|
|
12
|
+
/** Polling interval in ms (default 15s). */
|
|
13
|
+
pollIntervalMs?: number;
|
|
14
|
+
/** Whether to enable the hook at all. */
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function useComSubscription<TData = unknown>({ query, variables, operationName, onData, pollFn, pollIntervalMs, enabled, }: UseComSubscriptionArgs<TData>): void;
|
|
18
|
+
//# sourceMappingURL=useComSubscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComSubscription.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/hooks/useComSubscription.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,sBAAsB,CAAC,KAAK;IAC3C,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,sEAAsE;IACtE,aAAa,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9B,0EAA0E;IAC1E,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnC,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAmBD,wBAAgB,kBAAkB,CAAC,KAAK,GAAG,OAAO,EAAE,EAClD,KAAK,EACL,SAAS,EACT,aAAa,EACb,MAAM,EACN,MAAM,EACN,cAAuB,EACvB,OAAc,GACf,EAAE,sBAAsB,CAAC,KAAK,CAAC,GAAG,IAAI,CAiHtC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { getGraphqlWsClient as e, reportShellError as t } from "../utils/shellBridge.js";
|
|
2
|
+
import { useEffect as n, useMemo as r, useRef as i } from "react";
|
|
3
|
+
//#region src/comradecircle/hooks/useComSubscription.ts
|
|
4
|
+
function a(e) {
|
|
5
|
+
let t = (e instanceof Error ? e.message : typeof e == "string" ? e : e?.message ?? "").toLowerCase();
|
|
6
|
+
return t.includes("cannot query field") || t.includes("unknown field") || t.includes("subscription not supported") || t.includes("not implemented");
|
|
7
|
+
}
|
|
8
|
+
function o({ query: o, variables: s, operationName: c, onData: l, pollFn: u, pollIntervalMs: d = 15e3, enabled: f = !0 }) {
|
|
9
|
+
let p = i(l), m = i(u), h = i(s);
|
|
10
|
+
n(() => {
|
|
11
|
+
p.current = l, m.current = u, h.current = s;
|
|
12
|
+
}, [
|
|
13
|
+
l,
|
|
14
|
+
u,
|
|
15
|
+
s
|
|
16
|
+
]), n(() => {
|
|
17
|
+
if (!f) return;
|
|
18
|
+
let n = e(), r = null, i = null, s = !1, l = () => {
|
|
19
|
+
r ||= (Promise.resolve(m.current()).catch(() => {}), setInterval(() => {
|
|
20
|
+
s || Promise.resolve(m.current()).catch(() => {});
|
|
21
|
+
}, d));
|
|
22
|
+
};
|
|
23
|
+
if (!n) return l(), () => {
|
|
24
|
+
s = !0, r && clearInterval(r);
|
|
25
|
+
};
|
|
26
|
+
try {
|
|
27
|
+
i = n.subscribe({
|
|
28
|
+
query: o,
|
|
29
|
+
variables: h.current,
|
|
30
|
+
operationName: c
|
|
31
|
+
}, {
|
|
32
|
+
next: (e) => {
|
|
33
|
+
if (!s) {
|
|
34
|
+
if (e?.errors && e.errors.length > 0) {
|
|
35
|
+
if (e.errors.some(a)) {
|
|
36
|
+
if (i) {
|
|
37
|
+
try {
|
|
38
|
+
i();
|
|
39
|
+
} catch {}
|
|
40
|
+
i = null;
|
|
41
|
+
}
|
|
42
|
+
l();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
t(/* @__PURE__ */ Error(`Subscription ${c} returned errors`), {
|
|
46
|
+
module: "comradecircle",
|
|
47
|
+
context: {
|
|
48
|
+
operationName: c,
|
|
49
|
+
errors: e.errors
|
|
50
|
+
}
|
|
51
|
+
}, `[comradecircle] subscription ${c} errors`);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (e?.data) try {
|
|
55
|
+
p.current(e.data);
|
|
56
|
+
} catch (e) {
|
|
57
|
+
t(e, {
|
|
58
|
+
module: "comradecircle",
|
|
59
|
+
context: {
|
|
60
|
+
operationName: c,
|
|
61
|
+
phase: "handler"
|
|
62
|
+
}
|
|
63
|
+
}, `[comradecircle] subscription ${c} handler threw`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
error: (e) => {
|
|
68
|
+
if (a(e)) {
|
|
69
|
+
l();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
t(e, {
|
|
73
|
+
module: "comradecircle",
|
|
74
|
+
context: {
|
|
75
|
+
operationName: c,
|
|
76
|
+
phase: "transport"
|
|
77
|
+
}
|
|
78
|
+
}, `[comradecircle] subscription ${c} transport error`), l();
|
|
79
|
+
},
|
|
80
|
+
complete: () => {
|
|
81
|
+
s || l();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
} catch (e) {
|
|
85
|
+
t(e, {
|
|
86
|
+
module: "comradecircle",
|
|
87
|
+
context: {
|
|
88
|
+
operationName: c,
|
|
89
|
+
phase: "subscribe"
|
|
90
|
+
}
|
|
91
|
+
}, `[comradecircle] subscription ${c} subscribe threw`), l();
|
|
92
|
+
}
|
|
93
|
+
return () => {
|
|
94
|
+
if (s = !0, i) try {
|
|
95
|
+
i();
|
|
96
|
+
} catch {}
|
|
97
|
+
r && clearInterval(r);
|
|
98
|
+
};
|
|
99
|
+
}, [
|
|
100
|
+
f,
|
|
101
|
+
o,
|
|
102
|
+
c,
|
|
103
|
+
r(() => JSON.stringify(s ?? {}), [s]),
|
|
104
|
+
d
|
|
105
|
+
]);
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { o as useComSubscription };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=useComSubscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComSubscription.js","names":[],"sources":["../../../src/comradecircle/hooks/useComSubscription.ts"],"sourcesContent":["/**\n * useComSubscription (BOFF-4455)\n *\n * Defensive subscription wrapper for the ComradeCircle live surfaces\n * (`comPostAdded`, `comCommentAdded`, `comEventUpdated`, `comEventRsvpAdded`).\n * Probes the shell-provided graphql-ws client\n * (`globalThis.__burdenoffShell.graphqlWsClient`); if present, opens a\n * subscription over the real WS transport and dispatches each payload to\n * `onData`. If absent — or if the subscription errors with a clear\n * \"unknown field\"/\"not implemented\" signal (the operation isn't on the\n * federated gateway yet, e.g. before this ticket's backend deploy has\n * reconciled) — falls back to a polling loop driven by the caller's\n * `pollFn` at `pollIntervalMs`, so the page never breaks, only degrades.\n *\n * Ported from `microfe-channel/src/channel/hooks/useChannelSubscription.ts`\n * (the fleet's reference defensive-subscription pattern), generic type\n * unchanged.\n */\nimport { useEffect, useMemo, useRef } from 'react';\n\nimport { getGraphqlWsClient, reportShellError } from '../utils/shellBridge';\n\nexport interface UseComSubscriptionArgs<TData> {\n /** GraphQL subscription document (string SDL). */\n query: string;\n /** Variables for the subscription. */\n variables?: Record<string, unknown>;\n /** Stable identifier for this subscription, used in error context. */\n operationName: string;\n /** Called for each payload received from the subscription. */\n onData: (data: TData) => void;\n /** Polling fallback invoked when subscription is unavailable / failed. */\n pollFn: () => Promise<void> | void;\n /** Polling interval in ms (default 15s). */\n pollIntervalMs?: number;\n /** Whether to enable the hook at all. */\n enabled?: boolean;\n}\n\n/** Best-effort detector for \"subscription field not found\" errors. */\nfunction isUnknownFieldError(err: unknown): boolean {\n const msg =\n err instanceof Error\n ? err.message\n : typeof err === 'string'\n ? err\n : ((err as { message?: string } | null)?.message ?? '');\n const lower = msg.toLowerCase();\n return (\n lower.includes('cannot query field') ||\n lower.includes('unknown field') ||\n lower.includes('subscription not supported') ||\n lower.includes('not implemented')\n );\n}\n\nexport function useComSubscription<TData = unknown>({\n query,\n variables,\n operationName,\n onData,\n pollFn,\n pollIntervalMs = 15_000,\n enabled = true,\n}: UseComSubscriptionArgs<TData>): void {\n const onDataRef = useRef(onData);\n const pollFnRef = useRef(pollFn);\n const variablesRef = useRef(variables);\n useEffect(() => {\n onDataRef.current = onData;\n pollFnRef.current = pollFn;\n variablesRef.current = variables;\n }, [onData, pollFn, variables]);\n\n const variablesKey = useMemo(() => JSON.stringify(variables ?? {}), [variables]);\n\n useEffect(() => {\n if (!enabled) return;\n\n const wsClient = getGraphqlWsClient();\n let pollTimer: ReturnType<typeof setInterval> | null = null;\n let unsubSub: (() => void) | null = null;\n let cancelled = false;\n\n const startPolling = () => {\n if (pollTimer) return;\n void Promise.resolve(pollFnRef.current()).catch(() => {});\n pollTimer = setInterval(() => {\n if (cancelled) return;\n void Promise.resolve(pollFnRef.current()).catch(() => {});\n }, pollIntervalMs);\n };\n\n if (!wsClient) {\n startPolling();\n return () => {\n cancelled = true;\n if (pollTimer) clearInterval(pollTimer);\n };\n }\n\n try {\n unsubSub = wsClient.subscribe(\n { query, variables: variablesRef.current, operationName },\n {\n next: (msg) => {\n if (cancelled) return;\n if (msg?.errors && msg.errors.length > 0) {\n if (msg.errors.some(isUnknownFieldError)) {\n if (unsubSub) {\n try {\n unsubSub();\n } catch {\n /* noop */\n }\n unsubSub = null;\n }\n startPolling();\n return;\n }\n reportShellError(\n new Error(`Subscription ${operationName} returned errors`),\n { module: 'comradecircle', context: { operationName, errors: msg.errors } },\n `[comradecircle] subscription ${operationName} errors`\n );\n return;\n }\n if (msg?.data) {\n try {\n onDataRef.current(msg.data as TData);\n } catch (handlerErr) {\n reportShellError(\n handlerErr,\n { module: 'comradecircle', context: { operationName, phase: 'handler' } },\n `[comradecircle] subscription ${operationName} handler threw`\n );\n }\n }\n },\n error: (err) => {\n if (isUnknownFieldError(err)) {\n startPolling();\n return;\n }\n reportShellError(\n err,\n { module: 'comradecircle', context: { operationName, phase: 'transport' } },\n `[comradecircle] subscription ${operationName} transport error`\n );\n startPolling();\n },\n complete: () => {\n if (!cancelled) startPolling();\n },\n }\n );\n } catch (err) {\n reportShellError(\n err,\n { module: 'comradecircle', context: { operationName, phase: 'subscribe' } },\n `[comradecircle] subscription ${operationName} subscribe threw`\n );\n startPolling();\n }\n\n return () => {\n cancelled = true;\n if (unsubSub) {\n try {\n unsubSub();\n } catch {\n /* noop */\n }\n }\n if (pollTimer) clearInterval(pollTimer);\n };\n }, [enabled, query, operationName, variablesKey, pollIntervalMs]);\n}\n"],"mappings":";;;AAwCA,SAAS,EAAoB,GAAuB;CAOlD,IAAM,KALJ,aAAe,QACX,EAAI,UACJ,OAAO,KAAQ,WACb,IACE,GAAqC,WAAW,IACxC,YAAY;CAC9B,OACE,EAAM,SAAS,oBAAoB,KACnC,EAAM,SAAS,eAAe,KAC9B,EAAM,SAAS,4BAA4B,KAC3C,EAAM,SAAS,iBAAiB;AAEpC;AAEA,SAAgB,EAAo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GACxE,gCAAgC,EAAc,eAChD;MACF;KAVF;IAYF;IACA,QAAQ,MAAQ;KACd,IAAI,EAAoB,CAAG,GAAG;MAC5B,EAAa;MACb;KACF;KAMA,AALA,EACE,GACA;MAAE,QAAQ;MAAiB,SAAS;OAAE;OAAe,OAAO;MAAY;KAAE,GAC1E,gCAAgC,EAAc,iBAChD,GACA,EAAa;IACf;IACA,gBAAgB;KACd,AAAK,KAAW,EAAa;IAC/B;GACF,CACF;EACF,SAAS,GAAK;GAMZ,AALA,EACE,GACA;IAAE,QAAQ;IAAiB,SAAS;KAAE;KAAe,OAAO;IAAY;GAAE,GAC1E,gCAAgC,EAAc,iBAChD,GACA,EAAa;EACf;EAEA,aAAa;GAEX,IADA,IAAY,IACR,GACF,IAAI;IACF,EAAS;GACX,QAAQ,CAER;GAEF,AAAI,KAAW,cAAc,CAAS;EACxC;CACF,GAAG;EAAC;EAAS;EAAO;EAtGC,QAAc,KAAK,UAAU,KAAa,CAAC,CAAC,GAAG,CAAC,CAAS,CAsG3C;EAAc;CAAc,CAAC;AAClE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComConnection, ComCircle, ComCircleStatus, ComCircleVisibility, ComChannel, ComComment, ComPost, ComPostStatus, ComPoll, ComPollStatus, ComPollOption, ComEvent, ComEventStatus, ComEventRsvp, ComRsvpStatus, ComProfile, ComMembership, ComMembershipStatus, ComMemberRole, ComFeedFollow, ComFollowTargetType, ComReaction, ComReactionType, ComCreateCircleInput, ComUpdateCircleInput, ComCreateChannelInput, ComUpdateChannelInput, ComCreatePostInput, ComUpdatePostInput, ComCreateCommentInput, ComCreateEventInput, ComUpdateEventInput, ComCreatePollInput, ComFollowInput, ComUpsertProfileInput, PaginationInput } from '../types';
|
|
1
|
+
import { ComConnection, ComCircle, ComCircleStatus, ComCircleVisibility, ComChannel, ComComment, ComPost, ComPostStatus, ComPoll, ComPollStatus, ComPollOption, ComEvent, ComEventStatus, ComEventRsvp, ComRsvpStatus, ComProfile, ComMembership, ComMembershipStatus, ComMemberRole, ComFeedFollow, ComFollowTargetType, ComReaction, ComReactionType, ComCreateCircleInput, ComUpdateCircleInput, ComCreateChannelInput, ComUpdateChannelInput, ComCreatePostInput, ComUpdatePostInput, ComCreateCommentInput, ComCreateEventInput, ComUpdateEventInput, ComCreatePollInput, ComFollowInput, ComUpsertProfileInput, PaginationInput, ComCreatorMembershipTier, ComCreatorMembershipTierConnection, ComPaidEvent, ComPaidEventConnection, ComDigitalProduct, ComDigitalProductConnection, ComTipIntent, ComTipIntentConnection, ComCreateMembershipTierInput, ComCreatePaidEventInput, ComUpdatePaidEventInput, ComCreateDigitalProductInput, ComRecordTipIntentInput } from '../types';
|
|
2
2
|
|
|
3
3
|
export interface CircleFilters {
|
|
4
4
|
status?: ComCircleStatus;
|
|
@@ -54,6 +54,21 @@ export declare const useComReactToPost: () => import('@tanstack/react-query').Us
|
|
|
54
54
|
postId: string;
|
|
55
55
|
type: ComReactionType;
|
|
56
56
|
}, unknown>;
|
|
57
|
+
/**
|
|
58
|
+
* Live-updating channel feed (BOFF-4455). Subscribes to `comPostAdded` over
|
|
59
|
+
* the shell's graphql-ws transport (falling back to polling — see
|
|
60
|
+
* `useComSubscription`) and invalidates the `useComPosts` cache for this
|
|
61
|
+
* channel whenever a new post arrives or the fallback poll fires, so an open
|
|
62
|
+
* `ChannelFeed` picks up the new post on its next render without the member
|
|
63
|
+
* needing to manually refresh.
|
|
64
|
+
*/
|
|
65
|
+
export declare const useComPostAddedLive: (channelId: string | undefined) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Live-updating post thread (BOFF-4455). Subscribes to `comCommentAdded` for
|
|
68
|
+
* a single post and invalidates the `useComPost` cache (which embeds
|
|
69
|
+
* `comments`) so a thread view live-updates on new comments.
|
|
70
|
+
*/
|
|
71
|
+
export declare const useComCommentAddedLive: (postId: string | undefined) => void;
|
|
57
72
|
export declare const useComComments: (postId: string | undefined) => import('@tanstack/react-query').UseQueryResult<ComComment[], Error>;
|
|
58
73
|
export declare const useComAddComment: () => import('@tanstack/react-query').UseMutationResult<ComComment, Error, ComCreateCommentInput, unknown>;
|
|
59
74
|
export declare const useComMyFollows: (targetType?: ComFollowTargetType) => import('@tanstack/react-query').UseQueryResult<ComFeedFollow[], Error>;
|
|
@@ -70,6 +85,14 @@ export interface EventFilters {
|
|
|
70
85
|
}
|
|
71
86
|
export declare const useComEvents: (filters?: EventFilters) => import('@tanstack/react-query').UseQueryResult<ComConnection<ComEvent>, Error>;
|
|
72
87
|
export declare const useComEvent: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<ComEvent | null, Error>;
|
|
88
|
+
/**
|
|
89
|
+
* Live-updating event detail (BOFF-4455). Subscribes to both
|
|
90
|
+
* `comEventUpdated` (lifecycle transitions / edits) and `comEventRsvpAdded`
|
|
91
|
+
* (new/changed RSVPs) for a single event and invalidates the `useComEvent`
|
|
92
|
+
* cache on either, so an open event detail page's status badge and live
|
|
93
|
+
* attendee count update without a manual refresh.
|
|
94
|
+
*/
|
|
95
|
+
export declare const useComEventLive: (eventId: string | undefined) => void;
|
|
73
96
|
export declare const useComCreateEvent: () => import('@tanstack/react-query').UseMutationResult<ComEvent, Error, ComCreateEventInput, unknown>;
|
|
74
97
|
export declare const useComUpdateEvent: () => import('@tanstack/react-query').UseMutationResult<ComEvent, Error, {
|
|
75
98
|
id: string;
|
|
@@ -99,5 +122,32 @@ export interface ProfileFilters {
|
|
|
99
122
|
export declare const useComProfiles: (filters?: ProfileFilters) => import('@tanstack/react-query').UseQueryResult<ComConnection<ComProfile>, Error>;
|
|
100
123
|
export declare const useComProfile: (memberId: string | undefined) => import('@tanstack/react-query').UseQueryResult<ComProfile | null, Error>;
|
|
101
124
|
export declare const useComUpsertProfile: () => import('@tanstack/react-query').UseMutationResult<ComProfile, Error, ComUpsertProfileInput, unknown>;
|
|
125
|
+
export declare const useComListMembershipTiers: (creatorId?: string) => import('@tanstack/react-query').UseQueryResult<ComCreatorMembershipTierConnection, Error>;
|
|
126
|
+
export declare const useComMyMembershipTiers: () => import('@tanstack/react-query').UseQueryResult<ComCreatorMembershipTierConnection, Error>;
|
|
127
|
+
export declare const useComCreateMembershipTier: () => import('@tanstack/react-query').UseMutationResult<ComCreatorMembershipTier, Error, ComCreateMembershipTierInput, unknown>;
|
|
128
|
+
export declare const useComArchiveMembershipTier: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
129
|
+
export declare const useComListPaidEvents: (creatorId?: string) => import('@tanstack/react-query').UseQueryResult<ComPaidEventConnection, Error>;
|
|
130
|
+
export declare const useComMyPaidEvents: () => import('@tanstack/react-query').UseQueryResult<ComPaidEventConnection, Error>;
|
|
131
|
+
export declare const useComCreatePaidEvent: () => import('@tanstack/react-query').UseMutationResult<ComPaidEvent, Error, ComCreatePaidEventInput, unknown>;
|
|
132
|
+
export declare const useComUpdatePaidEvent: () => import('@tanstack/react-query').UseMutationResult<ComPaidEvent, Error, {
|
|
133
|
+
id: string;
|
|
134
|
+
input: ComUpdatePaidEventInput;
|
|
135
|
+
}, unknown>;
|
|
136
|
+
export declare const useComArchivePaidEvent: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
137
|
+
export declare const useComListDigitalProducts: (creatorId?: string) => import('@tanstack/react-query').UseQueryResult<ComDigitalProductConnection, Error>;
|
|
138
|
+
export declare const useComMyDigitalProducts: () => import('@tanstack/react-query').UseQueryResult<ComDigitalProductConnection, Error>;
|
|
139
|
+
export declare const useComCreateDigitalProduct: () => import('@tanstack/react-query').UseMutationResult<ComDigitalProduct, Error, ComCreateDigitalProductInput, unknown>;
|
|
140
|
+
export declare const useComArchiveDigitalProduct: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
141
|
+
export declare const useComMyReceivedTips: () => import('@tanstack/react-query').UseQueryResult<ComTipIntentConnection, Error>;
|
|
142
|
+
export declare const useComMySentTips: () => import('@tanstack/react-query').UseQueryResult<ComTipIntentConnection, Error>;
|
|
143
|
+
export declare const useComRecordTipIntent: () => import('@tanstack/react-query').UseMutationResult<ComTipIntent, Error, ComRecordTipIntentInput, unknown>;
|
|
144
|
+
export declare const useComCancelTipIntent: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
145
|
+
/**
|
|
146
|
+
* Always false today (BOFF-4454 billing boundary — catalog/calculation only,
|
|
147
|
+
* no live payment processor is wired). Lets the FE render an honest "Payment
|
|
148
|
+
* integration pending" state on every purchase/subscribe/tip CTA instead of
|
|
149
|
+
* guessing. Cached like any other read so the UI doesn't re-fetch per render.
|
|
150
|
+
*/
|
|
151
|
+
export declare const useComCreatorHasPaymentsEnabled: (creatorId: string | undefined) => import('@tanstack/react-query').UseQueryResult<boolean, Error>;
|
|
102
152
|
export type { ComReaction };
|
|
103
153
|
//# sourceMappingURL=useComradeCircleApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComradeCircleApi.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/hooks/useComradeCircleApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"useComradeCircleApi.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/hooks/useComradeCircleApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAQH,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,aAAa,EACb,aAAa,EACb,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,mBA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