@flamingo-stack/openframe-frontend-core 0.0.644 → 0.0.645

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 (211) hide show
  1. package/README.md +2 -2
  2. package/dist/{chunk-FOSIR4QF.js → chunk-3DWDJ54N.js} +5 -5
  3. package/dist/{chunk-CBXZSTAG.cjs → chunk-3J7YNAYI.cjs} +973 -793
  4. package/dist/chunk-3J7YNAYI.cjs.map +1 -0
  5. package/dist/{chunk-3DGRXC74.js → chunk-3PGYHT67.js} +5 -5
  6. package/dist/{chunk-YB6FI2G3.js → chunk-3SMLYVM2.js} +1 -1
  7. package/dist/{chunk-YB6FI2G3.js.map → chunk-3SMLYVM2.js.map} +1 -1
  8. package/dist/{chunk-DCCY54LU.cjs → chunk-46G4WFA7.cjs} +14 -14
  9. package/dist/{chunk-DCCY54LU.cjs.map → chunk-46G4WFA7.cjs.map} +1 -1
  10. package/dist/{chunk-OMSUWB6A.cjs → chunk-4A4DQSTI.cjs} +118 -118
  11. package/dist/{chunk-OMSUWB6A.cjs.map → chunk-4A4DQSTI.cjs.map} +1 -1
  12. package/dist/{chunk-4EEUB62O.js → chunk-4HVWGYHI.js} +2 -2
  13. package/dist/{chunk-UKV52KAP.cjs → chunk-56FDKQ7R.cjs} +44 -44
  14. package/dist/{chunk-UKV52KAP.cjs.map → chunk-56FDKQ7R.cjs.map} +1 -1
  15. package/dist/{chunk-G5U4JP45.js → chunk-5ONM3FHQ.js} +4 -4
  16. package/dist/{chunk-PFV4DAX5.js → chunk-6PMUA6JW.js} +10 -10
  17. package/dist/{chunk-GELNUDBT.cjs → chunk-77BLJHKI.cjs} +10 -10
  18. package/dist/{chunk-GELNUDBT.cjs.map → chunk-77BLJHKI.cjs.map} +1 -1
  19. package/dist/{chunk-KJWPAJRT.js → chunk-7EI3NES7.js} +3 -3
  20. package/dist/{chunk-3IXDZI3R.cjs → chunk-DOVVKQMZ.cjs} +3 -3
  21. package/dist/{chunk-3IXDZI3R.cjs.map → chunk-DOVVKQMZ.cjs.map} +1 -1
  22. package/dist/{chunk-KOQCA5X5.cjs → chunk-DWJREJRA.cjs} +5 -5
  23. package/dist/{chunk-KOQCA5X5.cjs.map → chunk-DWJREJRA.cjs.map} +1 -1
  24. package/dist/{chunk-S2KMNFFN.js → chunk-EI3SLIWL.js} +7 -7
  25. package/dist/{chunk-7R2DIGG4.cjs → chunk-EX5PJGVA.cjs} +76 -76
  26. package/dist/{chunk-7R2DIGG4.cjs.map → chunk-EX5PJGVA.cjs.map} +1 -1
  27. package/dist/{chunk-GBEUGDZG.cjs → chunk-F6U2H42L.cjs} +23 -23
  28. package/dist/{chunk-GBEUGDZG.cjs.map → chunk-F6U2H42L.cjs.map} +1 -1
  29. package/dist/{chunk-KEKN76JR.js → chunk-FRQ2DE5Z.js} +5 -5
  30. package/dist/{chunk-3UBT2OIX.cjs → chunk-GPZ6Q2NP.cjs} +74 -74
  31. package/dist/{chunk-3UBT2OIX.cjs.map → chunk-GPZ6Q2NP.cjs.map} +1 -1
  32. package/dist/{chunk-JOV64HW5.js → chunk-GRBZC5N3.js} +3 -3
  33. package/dist/{chunk-CHIHYC7Q.cjs → chunk-GSD62VAY.cjs} +21 -21
  34. package/dist/{chunk-CHIHYC7Q.cjs.map → chunk-GSD62VAY.cjs.map} +1 -1
  35. package/dist/{chunk-UEXIMEVU.js → chunk-GSNX2GDA.js} +10 -10
  36. package/dist/{chunk-LPMDCQLL.js → chunk-H3EJDISW.js} +2 -2
  37. package/dist/{chunk-RNMGKAS6.js → chunk-HDCIDJSP.js} +15 -15
  38. package/dist/{chunk-7Q5XXPCB.js → chunk-HHE7UNGR.js} +14 -14
  39. package/dist/{chunk-KOLVBEW5.js → chunk-IWISVG4P.js} +3 -3
  40. package/dist/{chunk-GNKM6R55.cjs → chunk-JH5P72AF.cjs} +25 -25
  41. package/dist/{chunk-GNKM6R55.cjs.map → chunk-JH5P72AF.cjs.map} +1 -1
  42. package/dist/{chunk-LCK7T2RM.cjs → chunk-JU6SBF3C.cjs} +13 -13
  43. package/dist/{chunk-LCK7T2RM.cjs.map → chunk-JU6SBF3C.cjs.map} +1 -1
  44. package/dist/{chunk-27RD5XTP.js → chunk-JZVSQT2V.js} +5 -5
  45. package/dist/{chunk-F2KBCLUG.js → chunk-KKSSA4CS.js} +2 -2
  46. package/dist/{chunk-MRIOYSXH.js → chunk-KYIOOOQY.js} +5 -5
  47. package/dist/{chunk-FKBM6U43.js → chunk-LZLT67PE.js} +2 -2
  48. package/dist/{chunk-LZYPSDFE.cjs → chunk-M2MTAES4.cjs} +90 -90
  49. package/dist/{chunk-LZYPSDFE.cjs.map → chunk-M2MTAES4.cjs.map} +1 -1
  50. package/dist/{chunk-B3Z3RJRW.js → chunk-M4AD2PHE.js} +5 -5
  51. package/dist/{chunk-BVQEU5JB.js → chunk-MT5A25AX.js} +2 -2
  52. package/dist/{chunk-TTVOBWAH.js → chunk-MTC6DWVH.js} +5 -5
  53. package/dist/{chunk-OVXYX47B.cjs → chunk-N4Q5GKBN.cjs} +19 -19
  54. package/dist/{chunk-OVXYX47B.cjs.map → chunk-N4Q5GKBN.cjs.map} +1 -1
  55. package/dist/{chunk-FAD5WURS.cjs → chunk-OGBM3JPR.cjs} +124 -124
  56. package/dist/{chunk-FAD5WURS.cjs.map → chunk-OGBM3JPR.cjs.map} +1 -1
  57. package/dist/chunk-OXB6LRBK.js +20 -0
  58. package/dist/chunk-OXB6LRBK.js.map +1 -0
  59. package/dist/{chunk-TGUA3C4U.cjs → chunk-Q7XUKTBB.cjs} +9 -9
  60. package/dist/{chunk-TGUA3C4U.cjs.map → chunk-Q7XUKTBB.cjs.map} +1 -1
  61. package/dist/{chunk-RFFF2EYD.cjs → chunk-QXML4X4W.cjs} +15 -15
  62. package/dist/{chunk-RFFF2EYD.cjs.map → chunk-QXML4X4W.cjs.map} +1 -1
  63. package/dist/{chunk-HOGOQA2X.js → chunk-R3CH2ASE.js} +3 -3
  64. package/dist/{chunk-SKABQX44.js → chunk-RUC2V3VH.js} +7 -7
  65. package/dist/{chunk-MCQAOIUK.cjs → chunk-SID5YPKF.cjs} +37 -37
  66. package/dist/{chunk-MCQAOIUK.cjs.map → chunk-SID5YPKF.cjs.map} +1 -1
  67. package/dist/{chunk-HPWLIYRL.js → chunk-T36DLNMO.js} +14 -14
  68. package/dist/{chunk-UPKZU6QU.cjs → chunk-U2YLMFJK.cjs} +1 -1
  69. package/dist/{chunk-UPKZU6QU.cjs.map → chunk-U2YLMFJK.cjs.map} +1 -1
  70. package/dist/{chunk-B5IFXCRF.cjs → chunk-UF7AUQ3M.cjs} +41 -41
  71. package/dist/{chunk-B5IFXCRF.cjs.map → chunk-UF7AUQ3M.cjs.map} +1 -1
  72. package/dist/{chunk-IXD6SHQ6.js → chunk-ULJNU46H.js} +6 -6
  73. package/dist/{chunk-CCWI3622.cjs → chunk-VTYP25OW.cjs} +4 -4
  74. package/dist/{chunk-CCWI3622.cjs.map → chunk-VTYP25OW.cjs.map} +1 -1
  75. package/dist/{chunk-C5Y5T6GC.cjs → chunk-WIYSHSNU.cjs} +20 -20
  76. package/dist/{chunk-C5Y5T6GC.cjs.map → chunk-WIYSHSNU.cjs.map} +1 -1
  77. package/dist/{chunk-T3C3JLGV.cjs → chunk-WKX7DYFM.cjs} +8 -8
  78. package/dist/{chunk-T3C3JLGV.cjs.map → chunk-WKX7DYFM.cjs.map} +1 -1
  79. package/dist/{chunk-4WVWRFGP.js → chunk-WSRGTWQL.js} +9 -9
  80. package/dist/chunk-X7CEWD6V.cjs +20 -0
  81. package/dist/chunk-X7CEWD6V.cjs.map +1 -0
  82. package/dist/{chunk-I57XLISO.js → chunk-X7LGHPH5.js} +195 -15
  83. package/dist/chunk-X7LGHPH5.js.map +1 -0
  84. package/dist/{chunk-5JUTGEZE.js → chunk-XBTZOO74.js} +2 -2
  85. package/dist/{chunk-RWURXICE.cjs → chunk-XGD6SCHN.cjs} +44 -44
  86. package/dist/{chunk-RWURXICE.cjs.map → chunk-XGD6SCHN.cjs.map} +1 -1
  87. package/dist/{chunk-RB6L5EGM.cjs → chunk-XILTWY3L.cjs} +1131 -1131
  88. package/dist/{chunk-RB6L5EGM.cjs.map → chunk-XILTWY3L.cjs.map} +1 -1
  89. package/dist/{chunk-EHAYNUOL.cjs → chunk-XOGD2AME.cjs} +3 -3
  90. package/dist/{chunk-EHAYNUOL.cjs.map → chunk-XOGD2AME.cjs.map} +1 -1
  91. package/dist/{chunk-IIXB5REN.cjs → chunk-YEXV52L5.cjs} +16 -16
  92. package/dist/{chunk-IIXB5REN.cjs.map → chunk-YEXV52L5.cjs.map} +1 -1
  93. package/dist/{chunk-65EVGKFV.cjs → chunk-YQZXCJQL.cjs} +14 -14
  94. package/dist/{chunk-65EVGKFV.cjs.map → chunk-YQZXCJQL.cjs.map} +1 -1
  95. package/dist/{chunk-N6HNK25A.cjs → chunk-YWUZL3RT.cjs} +11 -11
  96. package/dist/{chunk-N6HNK25A.cjs.map → chunk-YWUZL3RT.cjs.map} +1 -1
  97. package/dist/{chunk-VE52MSYC.js → chunk-Z7UIO5RQ.js} +8 -8
  98. package/dist/components/calendar.cjs +10 -10
  99. package/dist/components/calendar.js +2 -2
  100. package/dist/components/case-studies/index.cjs +30 -30
  101. package/dist/components/case-studies/index.js +14 -14
  102. package/dist/components/chat/embeddable-chat.d.ts +1 -1
  103. package/dist/components/chat/index.cjs +9 -9
  104. package/dist/components/chat/index.js +8 -8
  105. package/dist/components/chat/utils/source-row-cta.d.ts +1 -1
  106. package/dist/components/command.d.ts +7 -7
  107. package/dist/components/contact/index.cjs +15 -15
  108. package/dist/components/contact/index.js +14 -14
  109. package/dist/components/docs/index.cjs +18 -18
  110. package/dist/components/docs/index.js +17 -17
  111. package/dist/components/embeds/index.cjs +15 -15
  112. package/dist/components/embeds/index.js +14 -14
  113. package/dist/components/faq/index.cjs +16 -16
  114. package/dist/components/faq/index.js +15 -15
  115. package/dist/components/features/index.cjs +14 -14
  116. package/dist/components/features/index.js +13 -13
  117. package/dist/components/help-center-pages/index.cjs +37 -37
  118. package/dist/components/help-center-pages/index.js +28 -28
  119. package/dist/components/icons/index.cjs +3 -3
  120. package/dist/components/icons/index.js +2 -2
  121. package/dist/components/index.cjs +115 -115
  122. package/dist/components/index.cjs.map +1 -1
  123. package/dist/components/index.js +31 -31
  124. package/dist/components/index.js.map +1 -1
  125. package/dist/components/meeting-scheduler/index.cjs +119 -119
  126. package/dist/components/meeting-scheduler/index.js +15 -15
  127. package/dist/components/navigation/index.cjs +17 -17
  128. package/dist/components/navigation/index.js +16 -16
  129. package/dist/components/onboarding-guides/index.cjs +18 -18
  130. package/dist/components/onboarding-guides/index.js +17 -17
  131. package/dist/components/related-content/index.cjs +10 -10
  132. package/dist/components/related-content/index.js +9 -9
  133. package/dist/components/resizable.d.ts +1 -1
  134. package/dist/components/tickets/index.cjs +19 -19
  135. package/dist/components/tickets/index.js +18 -18
  136. package/dist/components/ui/file-manager/index.cjs +57 -57
  137. package/dist/components/ui/file-manager/index.js +4 -4
  138. package/dist/components/ui/index.cjs +14 -14
  139. package/dist/components/ui/index.js +13 -13
  140. package/dist/contexts/chat-runtime-context.d.ts +1 -1
  141. package/dist/contexts/index.cjs +2 -2
  142. package/dist/contexts/index.js +1 -1
  143. package/dist/hooks/index.cjs +7 -7
  144. package/dist/hooks/index.js +6 -6
  145. package/dist/index.cjs +36 -28
  146. package/dist/index.cjs.map +1 -1
  147. package/dist/index.js +30 -22
  148. package/dist/index.js.map +1 -1
  149. package/dist/platform-domains.cjs +43 -0
  150. package/dist/platform-domains.cjs.map +1 -1
  151. package/dist/platform-domains.d.ts +62 -4
  152. package/dist/platform-domains.d.ts.map +1 -1
  153. package/dist/platform-domains.js +39 -1
  154. package/dist/platform-domains.js.map +1 -1
  155. package/dist/types/index.cjs +0 -104
  156. package/dist/types/index.cjs.map +1 -1
  157. package/dist/types/index.js +0 -104
  158. package/dist/types/index.js.map +1 -1
  159. package/dist/utils/cn.d.ts +0 -21
  160. package/dist/utils/cn.d.ts.map +1 -1
  161. package/dist/utils/index.cjs +53 -25
  162. package/dist/utils/index.cjs.map +1 -1
  163. package/dist/utils/index.d.ts +1 -2
  164. package/dist/utils/index.d.ts.map +1 -1
  165. package/dist/utils/index.js +49 -25
  166. package/dist/utils/index.js.map +1 -1
  167. package/package.json +1 -1
  168. package/src/__tests__/platform-domains.test.ts +124 -0
  169. package/src/components/chat/embeddable-chat.tsx +2 -2
  170. package/src/components/chat/utils/__tests__/source-row-cta.test.ts +2 -2
  171. package/src/components/chat/utils/source-row-cta.ts +4 -4
  172. package/src/components/made-with-love.tsx +2 -2
  173. package/src/contexts/chat-runtime-context.tsx +1 -1
  174. package/src/platform-domains.ts +99 -4
  175. package/src/utils/.cn.md +3 -23
  176. package/src/utils/cn.ts +0 -47
  177. package/src/utils/index.ts +9 -2
  178. package/dist/chunk-23V5BSHD.cjs +0 -169
  179. package/dist/chunk-23V5BSHD.cjs.map +0 -1
  180. package/dist/chunk-CBXZSTAG.cjs.map +0 -1
  181. package/dist/chunk-I57XLISO.js.map +0 -1
  182. package/dist/chunk-O4MCCKKN.js +0 -169
  183. package/dist/chunk-O4MCCKKN.js.map +0 -1
  184. /package/dist/{chunk-FOSIR4QF.js.map → chunk-3DWDJ54N.js.map} +0 -0
  185. /package/dist/{chunk-3DGRXC74.js.map → chunk-3PGYHT67.js.map} +0 -0
  186. /package/dist/{chunk-4EEUB62O.js.map → chunk-4HVWGYHI.js.map} +0 -0
  187. /package/dist/{chunk-G5U4JP45.js.map → chunk-5ONM3FHQ.js.map} +0 -0
  188. /package/dist/{chunk-PFV4DAX5.js.map → chunk-6PMUA6JW.js.map} +0 -0
  189. /package/dist/{chunk-KJWPAJRT.js.map → chunk-7EI3NES7.js.map} +0 -0
  190. /package/dist/{chunk-S2KMNFFN.js.map → chunk-EI3SLIWL.js.map} +0 -0
  191. /package/dist/{chunk-KEKN76JR.js.map → chunk-FRQ2DE5Z.js.map} +0 -0
  192. /package/dist/{chunk-JOV64HW5.js.map → chunk-GRBZC5N3.js.map} +0 -0
  193. /package/dist/{chunk-UEXIMEVU.js.map → chunk-GSNX2GDA.js.map} +0 -0
  194. /package/dist/{chunk-LPMDCQLL.js.map → chunk-H3EJDISW.js.map} +0 -0
  195. /package/dist/{chunk-RNMGKAS6.js.map → chunk-HDCIDJSP.js.map} +0 -0
  196. /package/dist/{chunk-7Q5XXPCB.js.map → chunk-HHE7UNGR.js.map} +0 -0
  197. /package/dist/{chunk-KOLVBEW5.js.map → chunk-IWISVG4P.js.map} +0 -0
  198. /package/dist/{chunk-27RD5XTP.js.map → chunk-JZVSQT2V.js.map} +0 -0
  199. /package/dist/{chunk-F2KBCLUG.js.map → chunk-KKSSA4CS.js.map} +0 -0
  200. /package/dist/{chunk-MRIOYSXH.js.map → chunk-KYIOOOQY.js.map} +0 -0
  201. /package/dist/{chunk-FKBM6U43.js.map → chunk-LZLT67PE.js.map} +0 -0
  202. /package/dist/{chunk-B3Z3RJRW.js.map → chunk-M4AD2PHE.js.map} +0 -0
  203. /package/dist/{chunk-BVQEU5JB.js.map → chunk-MT5A25AX.js.map} +0 -0
  204. /package/dist/{chunk-TTVOBWAH.js.map → chunk-MTC6DWVH.js.map} +0 -0
  205. /package/dist/{chunk-HOGOQA2X.js.map → chunk-R3CH2ASE.js.map} +0 -0
  206. /package/dist/{chunk-SKABQX44.js.map → chunk-RUC2V3VH.js.map} +0 -0
  207. /package/dist/{chunk-HPWLIYRL.js.map → chunk-T36DLNMO.js.map} +0 -0
  208. /package/dist/{chunk-IXD6SHQ6.js.map → chunk-ULJNU46H.js.map} +0 -0
  209. /package/dist/{chunk-4WVWRFGP.js.map → chunk-WSRGTWQL.js.map} +0 -0
  210. /package/dist/{chunk-5JUTGEZE.js.map → chunk-XBTZOO74.js.map} +0 -0
  211. /package/dist/{chunk-VE52MSYC.js.map → chunk-Z7UIO5RQ.js.map} +0 -0
@@ -42,7 +42,7 @@ import {
42
42
  WhatsAppIcon,
43
43
  XLogo,
44
44
  YouTubeIcon
45
- } from "./chunk-LPMDCQLL.js";
45
+ } from "./chunk-H3EJDISW.js";
46
46
  import {
47
47
  AlertCircleIcon,
48
48
  AlertTriangleIcon,
@@ -174,7 +174,7 @@ import {
174
174
  safeHref,
175
175
  sortBitesByCreatedAtDesc,
176
176
  useCoverImageFallback
177
- } from "./chunk-FOSIR4QF.js";
177
+ } from "./chunk-3DWDJ54N.js";
178
178
  import {
179
179
  next_image_default
180
180
  } from "./chunk-MDKCTSDS.js";
@@ -187,14 +187,14 @@ import {
187
187
  getPlatformDisplayName,
188
188
  useAuthedAssetSrc,
189
189
  useAuthedImageSrc
190
- } from "./chunk-FKBM6U43.js";
190
+ } from "./chunk-LZLT67PE.js";
191
191
  import {
192
192
  OpenFrameLogo
193
193
  } from "./chunk-OTX6XNSA.js";
194
194
  import {
195
195
  useChatRuntime,
196
196
  useRequiredChatRuntime
197
- } from "./chunk-YB6FI2G3.js";
197
+ } from "./chunk-3SMLYVM2.js";
198
198
  import {
199
199
  COLLISION_PADDING_PX,
200
200
  CollisionBoundaryContext,
@@ -206,20 +206,19 @@ import {
206
206
  Skeleton,
207
207
  useCollisionBoundary,
208
208
  usePortalContainer
209
- } from "./chunk-5JUTGEZE.js";
209
+ } from "./chunk-XBTZOO74.js";
210
210
  import {
211
211
  SearchIcon
212
212
  } from "./chunk-6U3IUD57.js";
213
213
  import {
214
214
  Button
215
- } from "./chunk-4EEUB62O.js";
215
+ } from "./chunk-4HVWGYHI.js";
216
216
  import {
217
217
  next_link_default
218
218
  } from "./chunk-BTROSBHF.js";
219
219
  import {
220
- cn,
221
- getBaseUrl
222
- } from "./chunk-O4MCCKKN.js";
220
+ cn
221
+ } from "./chunk-OXB6LRBK.js";
223
222
  import {
224
223
  acquireClient,
225
224
  releaseClient,
@@ -7106,9 +7105,9 @@ var ChatMessageEnhanced = forwardRef16(
7106
7105
  /* @__PURE__ */ new Map()
7107
7106
  );
7108
7107
  const refByKey = useMemo8(() => {
7109
- const byKey = /* @__PURE__ */ new Map();
7110
- for (const described of refs ?? []) byKey.set(`${described.type}:${described.id}`, described);
7111
- return byKey;
7108
+ const byKey2 = /* @__PURE__ */ new Map();
7109
+ for (const described of refs ?? []) byKey2.set(`${described.type}:${described.id}`, described);
7110
+ return byKey2;
7112
7111
  }, [refs]);
7113
7112
  const renderingPlan = useMemo8(() => {
7114
7113
  if (!hasMarkerSupport) return null;
@@ -14845,6 +14844,179 @@ function defaultTableIdForDocumentType(documentType) {
14845
14844
 
14846
14845
  // src/components/chat/utils/source-row-cta.ts
14847
14846
  import { FileText as FileText3 } from "lucide-react";
14847
+
14848
+ // src/platform-domains.ts
14849
+ var PLATFORM_DOMAINS = [
14850
+ { key: "marketing-hub", defaultUrl: "https://marketing-hub.flamingo.so", envVar: "NEXT_PUBLIC_MARKETING_HUB_URL" },
14851
+ { key: "company-hub", defaultUrl: "https://company-hub.flamingo.so", envVar: "NEXT_PUBLIC_COMPANY_HUB_URL" },
14852
+ { key: "product-hub", defaultUrl: "https://product-hub.flamingo.so", envVar: "NEXT_PUBLIC_PRODUCT_HUB_URL" },
14853
+ { key: "revenue-hub", defaultUrl: "https://revenue-hub.flamingo.so", envVar: "NEXT_PUBLIC_REVENUE_HUB_URL" },
14854
+ { key: "people-hub", defaultUrl: "https://people-hub.flamingo.so", envVar: "NEXT_PUBLIC_PEOPLE_HUB_URL" },
14855
+ { key: "openmsp", defaultUrl: "https://www.openmsp.ai", envVar: "NEXT_PUBLIC_OPENMSP_URL" },
14856
+ // ORDERING INVARIANT (first-wins, load-bearing): `flamingo` MUST precede `flamingo-teaser` + `universal`.
14857
+ // All three resolve to www.flamingo.run; the reverse index is first-wins → flamingo claims the shared host,
14858
+ // teaser keeps only its unique flamingo.cx aliases, universal contributes no unique host.
14859
+ // ⚠️ DO NOT REORDER — enforced by the module-load self-check at the bottom of this file.
14860
+ { key: "flamingo", defaultUrl: "https://www.flamingo.run", envVar: "NEXT_PUBLIC_FLAMINGO_URL" },
14861
+ { key: "tmcg", defaultUrl: "https://www.tmcg.miami", envVar: "NEXT_PUBLIC_TMCG_URL" },
14862
+ { key: "mlg", defaultUrl: "https://www.mlg.soccer", envVar: "NEXT_PUBLIC_MLG_URL" },
14863
+ {
14864
+ key: "flamingo-teaser",
14865
+ defaultUrl: "https://www.flamingo.run",
14866
+ envVar: "NEXT_PUBLIC_FLAMINGO_URL",
14867
+ aliasHostnames: ["flamingo.cx", "www.flamingo.cx"]
14868
+ },
14869
+ {
14870
+ key: "openframe",
14871
+ defaultUrl: "https://openframe.ai",
14872
+ envVar: "NEXT_PUBLIC_OPENFRAME_URL",
14873
+ aliasHostnames: ["openframe.ai", "www.openframe.ai", "hub.openframe.ai"]
14874
+ },
14875
+ {
14876
+ key: "openframe-dashboard",
14877
+ defaultUrl: "https://openframe.ai",
14878
+ envVar: "NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL",
14879
+ pseudo: true
14880
+ },
14881
+ { key: "universal", defaultUrl: "https://www.flamingo.run", envVar: "NEXT_PUBLIC_FLAMINGO_URL" }
14882
+ ];
14883
+ var ENV_OVERRIDES = {
14884
+ NEXT_PUBLIC_MARKETING_HUB_URL: process.env.NEXT_PUBLIC_MARKETING_HUB_URL,
14885
+ NEXT_PUBLIC_COMPANY_HUB_URL: process.env.NEXT_PUBLIC_COMPANY_HUB_URL,
14886
+ NEXT_PUBLIC_PRODUCT_HUB_URL: process.env.NEXT_PUBLIC_PRODUCT_HUB_URL,
14887
+ NEXT_PUBLIC_REVENUE_HUB_URL: process.env.NEXT_PUBLIC_REVENUE_HUB_URL,
14888
+ NEXT_PUBLIC_PEOPLE_HUB_URL: process.env.NEXT_PUBLIC_PEOPLE_HUB_URL,
14889
+ NEXT_PUBLIC_OPENMSP_URL: process.env.NEXT_PUBLIC_OPENMSP_URL,
14890
+ NEXT_PUBLIC_FLAMINGO_URL: process.env.NEXT_PUBLIC_FLAMINGO_URL,
14891
+ NEXT_PUBLIC_TMCG_URL: process.env.NEXT_PUBLIC_TMCG_URL,
14892
+ NEXT_PUBLIC_MLG_URL: process.env.NEXT_PUBLIC_MLG_URL,
14893
+ NEXT_PUBLIC_OPENFRAME_URL: process.env.NEXT_PUBLIC_OPENFRAME_URL,
14894
+ NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL: process.env.NEXT_PUBLIC_OPENFRAME_DASHBOARD_URL
14895
+ };
14896
+ function byKey(key) {
14897
+ return PLATFORM_DOMAINS.find((e) => e.key === key);
14898
+ }
14899
+ function envOverrideFor(key) {
14900
+ const envVar = byKey(key)?.envVar;
14901
+ if (!envVar) return null;
14902
+ return ENV_OVERRIDES[envVar] || null;
14903
+ }
14904
+ function ensureScheme(url) {
14905
+ const trimmed = url.trim();
14906
+ if (/^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed)) return trimmed;
14907
+ return `https://${trimmed.replace(/^\/+/, "")}`;
14908
+ }
14909
+ function getPlatformProductionUrl(platform) {
14910
+ const resolved = envOverrideFor(platform) ?? byKey(platform)?.defaultUrl ?? envOverrideFor("flamingo") ?? "https://www.flamingo.run";
14911
+ return ensureScheme(resolved);
14912
+ }
14913
+ function getPlatformUrl(platform, options = {}) {
14914
+ const url = options.environment !== "production" && process.env.NODE_ENV !== "production" ? process.env.NEXT_PUBLIC_DEV_URL || "http://localhost:3000" : getPlatformProductionUrl(platform);
14915
+ return url.replace(/\/+$/, "");
14916
+ }
14917
+ function getDeploymentUrl(options) {
14918
+ if (typeof window !== "undefined") return window.location.origin;
14919
+ const configured = options.configuredUrl?.trim();
14920
+ if (configured) return ensureScheme(configured).replace(/\/+$/, "");
14921
+ if (process.env.VERCEL_ENV === "preview" && process.env.VERCEL_URL) {
14922
+ return ensureScheme(process.env.VERCEL_URL).replace(/\/+$/, "");
14923
+ }
14924
+ if (process.env.VERCEL_ENV === "production" || process.env.NODE_ENV === "production") {
14925
+ return getPlatformUrl(options.platform, { environment: "production" });
14926
+ }
14927
+ return (process.env.NEXT_PUBLIC_DEV_URL || `http://localhost:${process.env.PORT ?? 3e3}`).replace(/\/+$/, "");
14928
+ }
14929
+ var LOCAL_HOSTNAME = /^(localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\])$/i;
14930
+ function isLocalUrl(url) {
14931
+ try {
14932
+ return LOCAL_HOSTNAME.test(new URL(url).hostname);
14933
+ } catch {
14934
+ return false;
14935
+ }
14936
+ }
14937
+ function getRequestOrigin(headers, options) {
14938
+ const host = headers.get("host");
14939
+ if (!host) return getDeploymentUrl(options);
14940
+ const local = LOCAL_HOSTNAME.test(host.replace(/:\d+$/, ""));
14941
+ const proto = headers.get("x-forwarded-proto")?.split(",")[0].trim() || (local ? "http" : "https");
14942
+ return `${proto}://${host}`;
14943
+ }
14944
+ function resolveRedirectTarget(origin, target) {
14945
+ const url = new URL(target, origin);
14946
+ if (!/^https?:\/\//i.test(target) && url.origin !== new URL(origin).origin) {
14947
+ throw new Error(`resolveRedirectTarget: "${target}" is not a same-origin path`);
14948
+ }
14949
+ return url;
14950
+ }
14951
+ function hostOf(value) {
14952
+ if (!value) return null;
14953
+ try {
14954
+ return new URL(value).hostname.toLowerCase();
14955
+ } catch {
14956
+ return null;
14957
+ }
14958
+ }
14959
+ function expandWwwApex(host) {
14960
+ if (host.startsWith("www.")) return [host, host.slice(4)];
14961
+ if (host.split(".").length === 2) return [host, `www.${host}`];
14962
+ return [host];
14963
+ }
14964
+ function toRegistrableBaseDomain(host) {
14965
+ const parts = host.split(".");
14966
+ if (parts.length >= 2) return parts.slice(-2).join(".");
14967
+ return void 0;
14968
+ }
14969
+ function aliasHostsOf(key) {
14970
+ return byKey(key)?.aliasHostnames ?? [];
14971
+ }
14972
+ function hostsForEntry(entry, opts) {
14973
+ const resolved = hostOf(getPlatformProductionUrl(entry.key));
14974
+ const hosts = resolved ? expandWwwApex(resolved) : [];
14975
+ if (opts.includeAliases) hosts.push(...aliasHostsOf(entry.key));
14976
+ return hosts;
14977
+ }
14978
+ function getPlatformByHostname(hostname) {
14979
+ const host = hostname.toLowerCase();
14980
+ for (const entry of PLATFORM_DOMAINS) {
14981
+ if (entry.pseudo) continue;
14982
+ if (hostsForEntry(entry, { includeAliases: true }).includes(host)) return entry.key;
14983
+ }
14984
+ return null;
14985
+ }
14986
+ function isPreviewHost(hostname) {
14987
+ return hostname.endsWith(".vercel.app");
14988
+ }
14989
+ function getAllPlatformBaseDomains() {
14990
+ if (typeof window === "undefined") return [];
14991
+ const hostname = window.location.hostname;
14992
+ if (hostname === "localhost" || hostname === "127.0.0.1" || hostname.startsWith("127.")) {
14993
+ return [];
14994
+ }
14995
+ const previewEnv = process.env.VERCEL_ENV === "preview" || process.env.NEXT_PUBLIC_VERCEL_ENV === "preview" || isPreviewHost(hostname);
14996
+ if (previewEnv) {
14997
+ return [".vercel.app", "vercel.app"];
14998
+ }
14999
+ const baseDomains = /* @__PURE__ */ new Set();
15000
+ for (const entry of PLATFORM_DOMAINS) {
15001
+ if (entry.pseudo) continue;
15002
+ const host = hostOf(getPlatformProductionUrl(entry.key));
15003
+ if (!host) continue;
15004
+ const base = toRegistrableBaseDomain(host);
15005
+ if (base) {
15006
+ baseDomains.add(`.${base}`);
15007
+ baseDomains.add(base);
15008
+ }
15009
+ }
15010
+ return Array.from(baseDomains);
15011
+ }
15012
+ var _orderIdx = (k) => PLATFORM_DOMAINS.findIndex((e) => e.key === k);
15013
+ if (_orderIdx("flamingo") > _orderIdx("flamingo-teaser") || _orderIdx("flamingo") > _orderIdx("universal") || getPlatformByHostname("flamingo.cx") !== "flamingo-teaser" || getPlatformByHostname("hub.openframe.ai") !== "openframe") {
15014
+ console.error(
15015
+ "[platform-domains] \u26A0\uFE0F PLATFORM_DOMAINS ordering invariant violated \u2014 `flamingo` must precede `flamingo-teaser`/`universal`, and the openframe/teaser aliases must be intact. Do not reorder the table."
15016
+ );
15017
+ }
15018
+
15019
+ // src/components/chat/utils/source-row-cta.ts
14848
15020
  function sanitizePath(path) {
14849
15021
  return (path || "").replace(/[^a-zA-Z0-9/_\-.]/g, "");
14850
15022
  }
@@ -14879,11 +15051,11 @@ function resolveSourceRowCTA(row, ctx = {}) {
14879
15051
  const docTarget = row.documentType ? ctx.docPlatformTargets?.[row.documentType] : void 0;
14880
15052
  if (docTarget) {
14881
15053
  const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
14882
- const base = `${getBaseUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
15054
+ const base = `${getPlatformUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
14883
15055
  href = safeHref(new URL(safePath, base).toString()) ?? null;
14884
15056
  targetPlatform = docTarget.platform;
14885
15057
  } else if (ctx.chipBasePlatform) {
14886
- const base = `${getBaseUrl(ctx.chipBasePlatform)}/knowledge-base/`;
15058
+ const base = `${getPlatformUrl(ctx.chipBasePlatform)}/knowledge-base/`;
14887
15059
  href = safeHref(new URL(safePath, base).toString()) ?? null;
14888
15060
  targetPlatform = ctx.chipBasePlatform;
14889
15061
  } else if (ctx.baseRoute) {
@@ -25842,6 +26014,14 @@ export {
25842
26014
  getSourceLabel,
25843
26015
  DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID,
25844
26016
  defaultTableIdForDocumentType,
26017
+ byKey,
26018
+ getPlatformProductionUrl,
26019
+ getPlatformUrl,
26020
+ getDeploymentUrl,
26021
+ isLocalUrl,
26022
+ getRequestOrigin,
26023
+ resolveRedirectTarget,
26024
+ getAllPlatformBaseDomains,
25845
26025
  resolveSourceRowCTA,
25846
26026
  resolveSourceIcon,
25847
26027
  chatCardLabel,
@@ -25928,4 +26108,4 @@ export {
25928
26108
  buildStreamFrames,
25929
26109
  EmbeddableChat
25930
26110
  };
25931
- //# sourceMappingURL=chunk-I57XLISO.js.map
26111
+ //# sourceMappingURL=chunk-X7LGHPH5.js.map