@burdenoff/website-sdk 2026.1101.1 → 2026.1101.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.
Files changed (276) hide show
  1. package/README.md +42 -8
  2. package/dist/analytics/index.js +19 -69
  3. package/dist/analytics/index.js.map +1 -1
  4. package/dist/analytics/index.mjs +3 -69
  5. package/dist/analytics/index.mjs.map +1 -1
  6. package/dist/avatar-live/index.js +1 -0
  7. package/dist/avatar-live/index.js.map +1 -1
  8. package/dist/avatar-live/index.mjs +1 -0
  9. package/dist/avatar-live/index.mjs.map +1 -1
  10. package/dist/avatar-live-view/index.js +10 -30
  11. package/dist/avatar-live-view/index.js.map +1 -1
  12. package/dist/avatar-live-view/index.mjs +4 -24
  13. package/dist/avatar-live-view/index.mjs.map +1 -1
  14. package/dist/chunk-23H4JUL4.js +41 -0
  15. package/dist/chunk-23H4JUL4.js.map +1 -0
  16. package/dist/chunk-34RX5P75.mjs +25 -0
  17. package/dist/chunk-34RX5P75.mjs.map +1 -0
  18. package/dist/chunk-3LFFY7AZ.js +184 -0
  19. package/dist/chunk-3LFFY7AZ.js.map +1 -0
  20. package/dist/chunk-3X26GE4S.js +2794 -0
  21. package/dist/chunk-3X26GE4S.js.map +1 -0
  22. package/dist/chunk-45GCA4GG.js +85 -0
  23. package/dist/chunk-45GCA4GG.js.map +1 -0
  24. package/dist/chunk-4SAGVLHN.js +876 -0
  25. package/dist/chunk-4SAGVLHN.js.map +1 -0
  26. package/dist/chunk-4U6YAII5.js +218 -0
  27. package/dist/chunk-4U6YAII5.js.map +1 -0
  28. package/dist/chunk-5GMTBOO6.js +21 -0
  29. package/dist/chunk-5GMTBOO6.js.map +1 -0
  30. package/dist/chunk-5JRJ57CL.mjs +329 -0
  31. package/dist/chunk-5JRJ57CL.mjs.map +1 -0
  32. package/dist/chunk-6C2DKIC7.js +4 -0
  33. package/dist/chunk-6C2DKIC7.js.map +1 -0
  34. package/dist/chunk-6IBFBWC5.mjs +17 -0
  35. package/dist/chunk-6IBFBWC5.mjs.map +1 -0
  36. package/dist/chunk-6KY2ZRVI.js +116 -0
  37. package/dist/chunk-6KY2ZRVI.js.map +1 -0
  38. package/dist/chunk-6VJT3SM4.mjs +182 -0
  39. package/dist/chunk-6VJT3SM4.mjs.map +1 -0
  40. package/dist/chunk-6YZUFMK2.mjs +40 -0
  41. package/dist/chunk-6YZUFMK2.mjs.map +1 -0
  42. package/dist/chunk-7A6R7CGG.js +47 -0
  43. package/dist/chunk-7A6R7CGG.js.map +1 -0
  44. package/dist/chunk-7PWL4V2R.js +4 -0
  45. package/dist/chunk-7PWL4V2R.js.map +1 -0
  46. package/dist/chunk-AA33WDYS.js +161 -0
  47. package/dist/chunk-AA33WDYS.js.map +1 -0
  48. package/dist/chunk-AHRGFXV2.js +525 -0
  49. package/dist/chunk-AHRGFXV2.js.map +1 -0
  50. package/dist/chunk-B63XLDZH.mjs +109 -0
  51. package/dist/chunk-B63XLDZH.mjs.map +1 -0
  52. package/dist/chunk-BX2USEWF.mjs +35 -0
  53. package/dist/chunk-BX2USEWF.mjs.map +1 -0
  54. package/dist/chunk-BYSZT35R.js +150 -0
  55. package/dist/chunk-BYSZT35R.js.map +1 -0
  56. package/dist/chunk-C6OJIHNO.js +12 -0
  57. package/dist/chunk-C6OJIHNO.js.map +1 -0
  58. package/dist/chunk-COOELBX7.mjs +63 -0
  59. package/dist/chunk-COOELBX7.mjs.map +1 -0
  60. package/dist/chunk-D2TW7MNC.mjs +2771 -0
  61. package/dist/chunk-D2TW7MNC.mjs.map +1 -0
  62. package/dist/chunk-D5KEZ6V6.mjs +3 -0
  63. package/dist/chunk-D5KEZ6V6.mjs.map +1 -0
  64. package/dist/chunk-E3GUGJMY.js +46 -0
  65. package/dist/chunk-E3GUGJMY.js.map +1 -0
  66. package/dist/chunk-EBZ2HGJ2.mjs +52 -0
  67. package/dist/chunk-EBZ2HGJ2.mjs.map +1 -0
  68. package/dist/chunk-EDLTUOIA.mjs +210 -0
  69. package/dist/chunk-EDLTUOIA.mjs.map +1 -0
  70. package/dist/chunk-EJQSOT4X.js +4 -0
  71. package/dist/chunk-EJQSOT4X.js.map +1 -0
  72. package/dist/chunk-EUPFS6MZ.mjs +2019 -0
  73. package/dist/chunk-EUPFS6MZ.mjs.map +1 -0
  74. package/dist/chunk-F3XWDC3B.js +77 -0
  75. package/dist/chunk-F3XWDC3B.js.map +1 -0
  76. package/dist/chunk-FFADMVIK.mjs +5127 -0
  77. package/dist/chunk-FFADMVIK.mjs.map +1 -0
  78. package/dist/chunk-FJWS7BKT.mjs +3 -0
  79. package/dist/chunk-FJWS7BKT.mjs.map +1 -0
  80. package/dist/chunk-FJZJDUOR.mjs +3 -0
  81. package/dist/chunk-FJZJDUOR.mjs.map +1 -0
  82. package/dist/chunk-GCFLCO2Z.mjs +145 -0
  83. package/dist/chunk-GCFLCO2Z.mjs.map +1 -0
  84. package/dist/chunk-GEXC4LRP.js +61 -0
  85. package/dist/chunk-GEXC4LRP.js.map +1 -0
  86. package/dist/chunk-GTRAXQGC.mjs +3 -0
  87. package/dist/chunk-GTRAXQGC.mjs.map +1 -0
  88. package/dist/chunk-IKOIRUKW.js +270 -0
  89. package/dist/chunk-IKOIRUKW.js.map +1 -0
  90. package/dist/chunk-IXTWOPRN.js +45 -0
  91. package/dist/chunk-IXTWOPRN.js.map +1 -0
  92. package/dist/chunk-JDXOXGOK.js +547 -0
  93. package/dist/chunk-JDXOXGOK.js.map +1 -0
  94. package/dist/chunk-JSLDWYV7.mjs +558 -0
  95. package/dist/chunk-JSLDWYV7.mjs.map +1 -0
  96. package/dist/chunk-JXLSTVBK.js +336 -0
  97. package/dist/chunk-JXLSTVBK.js.map +1 -0
  98. package/dist/chunk-KHYXK7FG.mjs +49 -0
  99. package/dist/chunk-KHYXK7FG.mjs.map +1 -0
  100. package/dist/chunk-KSMBOWQQ.js +2034 -0
  101. package/dist/chunk-KSMBOWQQ.js.map +1 -0
  102. package/dist/chunk-KU2PXHGB.mjs +83 -0
  103. package/dist/chunk-KU2PXHGB.mjs.map +1 -0
  104. package/dist/chunk-KZANIV3S.mjs +37 -0
  105. package/dist/chunk-KZANIV3S.mjs.map +1 -0
  106. package/dist/chunk-L4BP6YOB.js +20 -0
  107. package/dist/chunk-L4BP6YOB.js.map +1 -0
  108. package/dist/chunk-MRKA2OAF.mjs +75 -0
  109. package/dist/chunk-MRKA2OAF.mjs.map +1 -0
  110. package/dist/chunk-N5EC53MH.mjs +80 -0
  111. package/dist/chunk-N5EC53MH.mjs.map +1 -0
  112. package/dist/chunk-NZANQGDM.mjs +34 -0
  113. package/dist/chunk-NZANQGDM.mjs.map +1 -0
  114. package/dist/chunk-O4GS3XPZ.js +10 -0
  115. package/dist/chunk-O4GS3XPZ.js.map +1 -0
  116. package/dist/chunk-O76QDGRM.js +5154 -0
  117. package/dist/chunk-O76QDGRM.js.map +1 -0
  118. package/dist/chunk-OYEUNZJY.js +114 -0
  119. package/dist/chunk-OYEUNZJY.js.map +1 -0
  120. package/dist/chunk-PHXAGQNB.js +74 -0
  121. package/dist/chunk-PHXAGQNB.js.map +1 -0
  122. package/dist/chunk-PIHHPP7J.mjs +16 -0
  123. package/dist/chunk-PIHHPP7J.mjs.map +1 -0
  124. package/dist/chunk-PXRHVVOU.mjs +499 -0
  125. package/dist/chunk-PXRHVVOU.mjs.map +1 -0
  126. package/dist/chunk-QMA6U6AU.js +36 -0
  127. package/dist/chunk-QMA6U6AU.js.map +1 -0
  128. package/dist/chunk-R6J7IULF.js +44 -0
  129. package/dist/chunk-R6J7IULF.js.map +1 -0
  130. package/dist/chunk-R7G6TWIS.mjs +10 -0
  131. package/dist/chunk-R7G6TWIS.mjs.map +1 -0
  132. package/dist/chunk-RUMGFI6L.mjs +544 -0
  133. package/dist/chunk-RUMGFI6L.mjs.map +1 -0
  134. package/dist/chunk-S54JWSJF.js +565 -0
  135. package/dist/chunk-S54JWSJF.js.map +1 -0
  136. package/dist/chunk-SK5UGG6A.js +2041 -0
  137. package/dist/chunk-SK5UGG6A.js.map +1 -0
  138. package/dist/chunk-SKIYDKIS.mjs +70 -0
  139. package/dist/chunk-SKIYDKIS.mjs.map +1 -0
  140. package/dist/chunk-SZNS5IK6.mjs +322 -0
  141. package/dist/chunk-SZNS5IK6.mjs.map +1 -0
  142. package/dist/chunk-T7JIPZAC.js +66 -0
  143. package/dist/chunk-T7JIPZAC.js.map +1 -0
  144. package/dist/chunk-TGYQHO2E.mjs +864 -0
  145. package/dist/chunk-TGYQHO2E.mjs.map +1 -0
  146. package/dist/chunk-TT3MHN42.mjs +8 -0
  147. package/dist/chunk-TT3MHN42.mjs.map +1 -0
  148. package/dist/chunk-UM55U65W.mjs +268 -0
  149. package/dist/chunk-UM55U65W.mjs.map +1 -0
  150. package/dist/chunk-UQ2HALUD.js +72 -0
  151. package/dist/chunk-UQ2HALUD.js.map +1 -0
  152. package/dist/chunk-UXWT7G77.js +82 -0
  153. package/dist/chunk-UXWT7G77.js.map +1 -0
  154. package/dist/chunk-VNS5WDWO.mjs +7 -0
  155. package/dist/chunk-VNS5WDWO.mjs.map +1 -0
  156. package/dist/chunk-VRWZLGR7.js +4 -0
  157. package/dist/chunk-VRWZLGR7.js.map +1 -0
  158. package/dist/chunk-VZLDSNH4.mjs +22 -0
  159. package/dist/chunk-VZLDSNH4.mjs.map +1 -0
  160. package/dist/chunk-W6P3YETJ.js +92 -0
  161. package/dist/chunk-W6P3YETJ.js.map +1 -0
  162. package/dist/chunk-WPKFFQCR.mjs +90 -0
  163. package/dist/chunk-WPKFFQCR.mjs.map +1 -0
  164. package/dist/chunk-WTVTI5TO.mjs +22 -0
  165. package/dist/chunk-WTVTI5TO.mjs.map +1 -0
  166. package/dist/chunk-XJOBZ4RJ.js +44 -0
  167. package/dist/chunk-XJOBZ4RJ.js.map +1 -0
  168. package/dist/chunk-XP2JDNDU.js +325 -0
  169. package/dist/chunk-XP2JDNDU.js.map +1 -0
  170. package/dist/chunk-Y4V5CEWD.mjs +112 -0
  171. package/dist/chunk-Y4V5CEWD.mjs.map +1 -0
  172. package/dist/chunk-YERN2UWM.js +116 -0
  173. package/dist/chunk-YERN2UWM.js.map +1 -0
  174. package/dist/chunk-ZKJQWFAA.mjs +114 -0
  175. package/dist/chunk-ZKJQWFAA.mjs.map +1 -0
  176. package/dist/chunk-ZOON3S3Y.mjs +138 -0
  177. package/dist/chunk-ZOON3S3Y.mjs.map +1 -0
  178. package/dist/chunk-ZP6QRAYC.mjs +2024 -0
  179. package/dist/chunk-ZP6QRAYC.mjs.map +1 -0
  180. package/dist/chunk-ZSTFX7FV.js +9 -0
  181. package/dist/chunk-ZSTFX7FV.js.map +1 -0
  182. package/dist/client/index.js +23 -331
  183. package/dist/client/index.js.map +1 -1
  184. package/dist/client/index.mjs +3 -330
  185. package/dist/client/index.mjs.map +1 -1
  186. package/dist/comparison/index.js +28 -111
  187. package/dist/comparison/index.js.map +1 -1
  188. package/dist/comparison/index.mjs +2 -107
  189. package/dist/comparison/index.mjs.map +1 -1
  190. package/dist/components/contact.js +21 -931
  191. package/dist/components/contact.js.map +1 -1
  192. package/dist/components/contact.mjs +12 -909
  193. package/dist/components/contact.mjs.map +1 -1
  194. package/dist/components/electron-download.js +12 -124
  195. package/dist/components/electron-download.js.map +1 -1
  196. package/dist/components/electron-download.mjs +4 -106
  197. package/dist/components/electron-download.mjs.map +1 -1
  198. package/dist/components/explore-cta.js +8 -112
  199. package/dist/components/explore-cta.js.map +1 -1
  200. package/dist/components/explore-cta.mjs +3 -114
  201. package/dist/components/explore-cta.mjs.map +1 -1
  202. package/dist/components/explore.js +62 -7833
  203. package/dist/components/explore.js.map +1 -1
  204. package/dist/components/explore.mjs +13 -7800
  205. package/dist/components/explore.mjs.map +1 -1
  206. package/dist/components/launch-countdown.js +8 -83
  207. package/dist/components/launch-countdown.js.map +1 -1
  208. package/dist/components/launch-countdown.mjs +3 -85
  209. package/dist/components/launch-countdown.mjs.map +1 -1
  210. package/dist/components/newsletter.js +20 -993
  211. package/dist/components/newsletter.js.map +1 -1
  212. package/dist/components/newsletter.mjs +11 -971
  213. package/dist/components/newsletter.mjs.map +1 -1
  214. package/dist/components/partners.js +24 -1302
  215. package/dist/components/partners.js.map +1 -1
  216. package/dist/components/partners.mjs +15 -1276
  217. package/dist/components/partners.mjs.map +1 -1
  218. package/dist/components/pricing.js +49 -1249
  219. package/dist/components/pricing.js.map +1 -1
  220. package/dist/components/pricing.mjs +8 -1226
  221. package/dist/components/pricing.mjs.map +1 -1
  222. package/dist/components/problems-solved.js +8 -150
  223. package/dist/components/problems-solved.js.map +1 -1
  224. package/dist/components/problems-solved.mjs +4 -133
  225. package/dist/components/problems-solved.mjs.map +1 -1
  226. package/dist/components/resource-links.js +8 -304
  227. package/dist/components/resource-links.js.map +1 -1
  228. package/dist/components/resource-links.mjs +5 -308
  229. package/dist/components/resource-links.mjs.map +1 -1
  230. package/dist/components/social-links.js +8 -343
  231. package/dist/components/social-links.js.map +1 -1
  232. package/dist/components/social-links.mjs +5 -347
  233. package/dist/components/social-links.mjs.map +1 -1
  234. package/dist/components/unsubscribe.js +10 -627
  235. package/dist/components/unsubscribe.js.map +1 -1
  236. package/dist/components/unsubscribe.mjs +6 -611
  237. package/dist/components/unsubscribe.mjs.map +1 -1
  238. package/dist/components/waitlist.js +21 -1001
  239. package/dist/components/waitlist.js.map +1 -1
  240. package/dist/components/waitlist.mjs +12 -982
  241. package/dist/components/waitlist.mjs.map +1 -1
  242. package/dist/components/website-switcher.js +12 -175
  243. package/dist/components/website-switcher.js.map +1 -1
  244. package/dist/components/website-switcher.mjs +4 -157
  245. package/dist/components/website-switcher.mjs.map +1 -1
  246. package/dist/content/index.js +118 -3616
  247. package/dist/content/index.js.map +1 -1
  248. package/dist/content/index.mjs +12 -3567
  249. package/dist/content/index.mjs.map +1 -1
  250. package/dist/hooks/index.js +37 -2321
  251. package/dist/hooks/index.js.map +1 -1
  252. package/dist/hooks/index.mjs +6 -2318
  253. package/dist/hooks/index.mjs.map +1 -1
  254. package/dist/index.d.mts +1 -1
  255. package/dist/index.d.ts +1 -1
  256. package/dist/index.js +4145 -20599
  257. package/dist/index.js.map +1 -1
  258. package/dist/index.mjs +3766 -20567
  259. package/dist/index.mjs.map +1 -1
  260. package/dist/product/index.js +20 -393
  261. package/dist/product/index.js.map +1 -1
  262. package/dist/product/index.mjs +5 -394
  263. package/dist/product/index.mjs.map +1 -1
  264. package/dist/seo/index.js +8 -76
  265. package/dist/seo/index.js.map +1 -1
  266. package/dist/seo/index.mjs +3 -78
  267. package/dist/seo/index.mjs.map +1 -1
  268. package/dist/store/index.js +51 -2650
  269. package/dist/store/index.js.map +1 -1
  270. package/dist/store/index.mjs +13 -2619
  271. package/dist/store/index.mjs.map +1 -1
  272. package/dist/utils/index.js +69 -134
  273. package/dist/utils/index.js.map +1 -1
  274. package/dist/utils/index.mjs +5 -122
  275. package/dist/utils/index.mjs.map +1 -1
  276. package/package.json +2 -1
@@ -1,1308 +1,30 @@
1
1
  'use strict';
2
2
 
3
- var React = require('react');
4
- var lucideReact = require('lucide-react');
5
- var ReCAPTCHA = require('react-google-recaptcha');
6
- var sonner = require('sonner');
7
- var jsxRuntime = require('react/jsx-runtime');
8
- var reactHelmetAsync = require('react-helmet-async');
9
- var reactSlot = require('@radix-ui/react-slot');
10
- var classVarianceAuthority = require('class-variance-authority');
11
- var clsx = require('clsx');
12
- var tailwindMerge = require('tailwind-merge');
13
- var LabelPrimitive = require('@radix-ui/react-label');
14
- var DOMPurify = require('isomorphic-dompurify');
15
- var ReactMarkdown = require('react-markdown');
16
- var rehypeSanitize = require('rehype-sanitize');
17
- var remarkGfm = require('remark-gfm');
18
-
19
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
20
-
21
- function _interopNamespace(e) {
22
- if (e && e.__esModule) return e;
23
- var n = Object.create(null);
24
- if (e) {
25
- Object.keys(e).forEach(function (k) {
26
- if (k !== 'default') {
27
- var d = Object.getOwnPropertyDescriptor(e, k);
28
- Object.defineProperty(n, k, d.get ? d : {
29
- enumerable: true,
30
- get: function () { return e[k]; }
31
- });
32
- }
33
- });
34
- }
35
- n.default = e;
36
- return Object.freeze(n);
37
- }
38
-
39
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
40
- var ReCAPTCHA__default = /*#__PURE__*/_interopDefault(ReCAPTCHA);
41
- var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
42
- var DOMPurify__default = /*#__PURE__*/_interopDefault(DOMPurify);
43
- var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
44
- var rehypeSanitize__default = /*#__PURE__*/_interopDefault(rehypeSanitize);
45
- var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
46
-
47
- var __defProp = Object.defineProperty;
48
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
49
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
50
-
51
- // src/client/security.ts
52
- var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "::1"]);
53
- var RESERVED_HEADERS = /* @__PURE__ */ new Set([
54
- "authorization",
55
- "cookie",
56
- "x-actor-id",
57
- "x-actor-type",
58
- "x-consent-granted-by",
59
- "x-consent-scope",
60
- "x-consent-granted-at",
61
- "x-consent-expires-at"
62
- ]);
63
- function validateGatewayUrl(value) {
64
- let url;
65
- try {
66
- url = new URL(value);
67
- } catch {
68
- throw new Error("Gateway URL must be a valid absolute URL");
69
- }
70
- if (url.protocol === "https:") {
71
- return url.toString();
72
- }
73
- if (url.protocol === "http:" && LOOPBACK_HOSTS.has(url.hostname.toLowerCase())) {
74
- return url.toString();
75
- }
76
- throw new Error("Gateway URL must use HTTPS unless it targets localhost");
77
- }
78
- function sanitizeHeaders(headers) {
79
- if (!headers) return void 0;
80
- return Object.fromEntries(
81
- Object.entries(headers).filter(
82
- ([key]) => !RESERVED_HEADERS.has(key.toLowerCase())
83
- )
84
- );
85
- }
86
- var CF_ACCESS_GATED_HOSTS = /* @__PURE__ */ new Set([
87
- "alphagraphql.burdenoff.com",
88
- "alphagraphqlworkspaces.burdenoff.com"
89
- ]);
90
- function cfAccessHeaders(gatewayUrl, cfAccess) {
91
- const clientId = cfAccess?.clientId?.trim();
92
- const clientSecret = cfAccess?.clientSecret?.trim();
93
- if (!clientId || !clientSecret) return {};
94
- let host;
95
- try {
96
- host = new URL(gatewayUrl).hostname.toLowerCase();
97
- } catch {
98
- return {};
99
- }
100
- if (!CF_ACCESS_GATED_HOSTS.has(host)) return {};
101
- return {
102
- "CF-Access-Client-Id": clientId,
103
- "CF-Access-Client-Secret": clientSecret
104
- };
105
- }
106
-
107
- // src/client/graphql-client.ts
108
- var _WebSDKClient = class _WebSDKClient {
109
- constructor(config) {
110
- __publicField(this, "config");
111
- __publicField(this, "queryCache", /* @__PURE__ */ new Map());
112
- __publicField(this, "inflight", /* @__PURE__ */ new Map());
113
- this.config = {
114
- ...config,
115
- gatewayUrl: validateGatewayUrl(config.gatewayUrl),
116
- headers: sanitizeHeaders(config.headers)
117
- };
118
- }
119
- getConfig() {
120
- return this.config;
121
- }
122
- /**
123
- * Execute a GraphQL query (with deduplication and caching).
124
- *
125
- * Pass `{ cache: false }` to bypass the cache entirely — required for poll
126
- * loops, where every tick must reach the network.
127
- */
128
- async query(query, variables, options) {
129
- if (options?.cache === false) {
130
- return this.request(query, variables, true, options.timeoutMs);
131
- }
132
- const cacheKey = JSON.stringify({ query, variables });
133
- const cached = this.queryCache.get(cacheKey);
134
- if (cached) {
135
- if (Date.now() - cached.ts < _WebSDKClient.CACHE_TTL) {
136
- return cached.data;
137
- }
138
- this.queryCache.delete(cacheKey);
139
- }
140
- const existing = this.inflight.get(cacheKey);
141
- if (existing) {
142
- return existing;
143
- }
144
- const promise = this.request(query, variables, true, options?.timeoutMs).then((result) => {
145
- if (result.data && !result.errors?.length) {
146
- if (this.queryCache.size >= _WebSDKClient.MAX_CACHE_ENTRIES) {
147
- const oldestEntry = this.queryCache.keys().next().value;
148
- if (oldestEntry) {
149
- this.queryCache.delete(oldestEntry);
150
- }
151
- }
152
- this.queryCache.set(cacheKey, { data: result, ts: Date.now() });
153
- }
154
- return result;
155
- }).finally(() => {
156
- this.inflight.delete(cacheKey);
157
- });
158
- this.inflight.set(cacheKey, promise);
159
- return promise;
160
- }
161
- /**
162
- * Execute a GraphQL mutation
163
- */
164
- async mutate(mutation, variables, options) {
165
- return this.request(mutation, variables, false, options?.timeoutMs);
166
- }
167
- /** HTTP statuses worth another attempt — transient server/edge conditions. */
168
- static isRetriableStatus(status) {
169
- return status === 429 || status === 408 || status >= 500 && status < 600;
170
- }
171
- static sleep(ms) {
172
- return new Promise((resolve) => setTimeout(resolve, ms));
173
- }
174
- /**
175
- * Perform the HTTP call with a hard timeout. Every outcome resolves to a
176
- * GraphQLResponse — callers never hang, so a UI's `loading` state always
177
- * settles into data or a renderable error.
178
- */
179
- async attempt(query, variables, timeoutMs) {
180
- const controller = new AbortController();
181
- const timer = setTimeout(() => controller.abort(), timeoutMs);
182
- try {
183
- const response = await fetch(this.config.gatewayUrl, {
184
- method: "POST",
185
- headers: {
186
- "Content-Type": "application/json",
187
- "x-product-id": this.config.productId,
188
- ...this.config.headers,
189
- ...cfAccessHeaders(this.config.gatewayUrl, this.config.cfAccess)
190
- },
191
- body: JSON.stringify({ query, variables }),
192
- signal: controller.signal
193
- });
194
- if (!response.ok) {
195
- console.error(
196
- "[WebSDK] GraphQL request failed",
197
- response.status,
198
- response.statusText
199
- );
200
- return {
201
- res: {
202
- errors: [
203
- {
204
- message: `HTTP ${response.status}: ${response.statusText}`,
205
- extensions: { code: `HTTP_${response.status}` }
206
- }
207
- ]
208
- },
209
- retriable: _WebSDKClient.isRetriableStatus(response.status)
210
- };
211
- }
212
- return {
213
- res: await response.json(),
214
- retriable: false
215
- };
216
- } catch (error) {
217
- const aborted = error instanceof Error && (error.name === "AbortError" || controller.signal.aborted);
218
- const message = aborted ? `Request timed out after ${timeoutMs}ms` : error instanceof Error ? error.message : "Network error";
219
- console.error("[WebSDK] Network error", message);
220
- return {
221
- res: {
222
- errors: [
223
- {
224
- message,
225
- extensions: { code: aborted ? "TIMEOUT" : "NETWORK_ERROR" }
226
- }
227
- ]
228
- },
229
- // Transport-level failures are worth one more try; a genuine outage
230
- // just fails twice quickly and still renders an error state.
231
- retriable: true
232
- };
233
- } finally {
234
- clearTimeout(timer);
235
- }
236
- }
237
- async request(query, variables, retry = true, timeoutOverrideMs) {
238
- const timeoutMs = timeoutOverrideMs ?? this.config.timeoutMs ?? _WebSDKClient.DEFAULT_TIMEOUT_MS;
239
- const maxRetries = retry ? this.config.maxRetries ?? _WebSDKClient.DEFAULT_MAX_RETRIES : 0;
240
- let last;
241
- for (let i = 0; i <= maxRetries; i++) {
242
- const { res, retriable } = await this.attempt(
243
- query,
244
- variables,
245
- timeoutMs
246
- );
247
- if (!retriable || i === maxRetries) return res;
248
- last = res;
249
- await _WebSDKClient.sleep(
250
- _WebSDKClient.RETRY_BASE_DELAY_MS * (i + 1) + Math.random() * 200
251
- );
252
- }
253
- return last;
254
- }
255
- };
256
- __publicField(_WebSDKClient, "CACHE_TTL", 5 * 60 * 1e3);
257
- // 5 minutes
258
- __publicField(_WebSDKClient, "MAX_CACHE_ENTRIES", 100);
259
- __publicField(_WebSDKClient, "DEFAULT_TIMEOUT_MS", 12e3);
260
- __publicField(_WebSDKClient, "DEFAULT_MAX_RETRIES", 1);
261
- __publicField(_WebSDKClient, "RETRY_BASE_DELAY_MS", 400);
262
- var WebSDKContext = React.createContext(null);
263
- function useWebSDK() {
264
- const client = React.useContext(WebSDKContext);
265
- if (!client) {
266
- throw new Error("useWebSDK must be used within a WebSDKProvider");
267
- }
268
- return client;
269
- }
270
- function useWebSDKConfig() {
271
- const client = useWebSDK();
272
- return client.getConfig();
273
- }
274
- var RECAPTCHA_WIDGET_HEIGHT = 78;
275
- function useDeferredRecaptcha(siteKey) {
276
- const [engaged, setEngaged] = React.useState(false);
277
- const arm = React.useCallback(() => setEngaged(true), []);
278
- const enabled = siteKey.length > 0;
279
- return {
280
- armed: enabled && engaged,
281
- arm,
282
- formProps: enabled && !engaged ? { onFocus: arm, onPointerDown: arm } : {}
283
- };
284
- }
285
-
286
- // src/utils/product-slug.ts
287
- var PRODUCT_SLUG_RENAMES = Object.freeze(
288
- [Object.freeze({ legacy: "botlit", current: "botmanor" })]
289
- );
290
- Object.freeze(
291
- Object.fromEntries(PRODUCT_SLUG_RENAMES.map((r) => [r.legacy, r.current]))
292
- );
293
- var ProductContext = React.createContext({
294
- product: null,
295
- loading: true,
296
- error: null,
297
- hasProvider: false,
298
- refetch: () => {
299
- }
3
+ var chunkXP2JDNDU_js = require('../chunk-XP2JDNDU.js');
4
+ require('../chunk-4U6YAII5.js');
5
+ require('../chunk-GEXC4LRP.js');
6
+ require('../chunk-AHRGFXV2.js');
7
+ require('../chunk-L4BP6YOB.js');
8
+ require('../chunk-R6J7IULF.js');
9
+ require('../chunk-IXTWOPRN.js');
10
+ require('../chunk-7A6R7CGG.js');
11
+ require('../chunk-UXWT7G77.js');
12
+ require('../chunk-UQ2HALUD.js');
13
+ require('../chunk-C6OJIHNO.js');
14
+ require('../chunk-BYSZT35R.js');
15
+ require('../chunk-E3GUGJMY.js');
16
+ require('../chunk-JXLSTVBK.js');
17
+ require('../chunk-ZSTFX7FV.js');
18
+
19
+
20
+
21
+ Object.defineProperty(exports, "PartnersPage", {
22
+ enumerable: true,
23
+ get: function () { return chunkXP2JDNDU_js.PartnersPage; }
300
24
  });
301
- function useProduct() {
302
- return React.useContext(ProductContext);
303
- }
304
- function canonicalFromLocation() {
305
- if (typeof window === "undefined" || !window.location) return void 0;
306
- const { origin, pathname } = window.location;
307
- if (!origin || origin === "null") return void 0;
308
- const path = pathname === "/" ? "/" : pathname.replace(/\/+$/, "");
309
- return `${origin}${path}`;
310
- }
311
- function resolveImageUrl(image, base) {
312
- if (!image || /^https?:\/\//i.test(image)) return image;
313
- if (!base) return image;
314
- try {
315
- return new URL(image, base).toString();
316
- } catch {
317
- return image;
318
- }
319
- }
320
- function serializeJsonLd(data) {
321
- return JSON.stringify(data).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
322
- }
323
- function PageHead({
324
- title,
325
- description,
326
- productName,
327
- keywords,
328
- image,
329
- url,
330
- favicon,
331
- robots = "index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1",
332
- locale = "en_US",
333
- twitterHandle,
334
- themeColor = "#000000",
335
- author,
336
- structuredData,
337
- additionalMeta
338
- }) {
339
- const fullTitle = productName && !title.includes(productName) ? `${title} | ${productName}` : title;
340
- const resolvedUrl = url ?? canonicalFromLocation();
341
- const fullImageUrl = resolveImageUrl(image, resolvedUrl);
342
- const structuredDataItems = structuredData ? Array.isArray(structuredData) ? structuredData : [structuredData] : [];
343
- return /* @__PURE__ */ jsxRuntime.jsxs(reactHelmetAsync.Helmet, { children: [
344
- /* @__PURE__ */ jsxRuntime.jsx("title", { children: fullTitle }),
345
- /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "title", content: fullTitle }),
346
- description ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "description", content: description }) : null,
347
- keywords ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "keywords", content: keywords }) : null,
348
- author ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "author", content: author }) : null,
349
- /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "robots", content: robots }),
350
- resolvedUrl ? /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "canonical", href: resolvedUrl }) : null,
351
- favicon ? /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "icon", href: favicon }) : null,
352
- /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:type", content: "website" }),
353
- /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:title", content: fullTitle }),
354
- description ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:description", content: description }) : null,
355
- fullImageUrl ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:image", content: fullImageUrl }) : null,
356
- resolvedUrl ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:url", content: resolvedUrl }) : null,
357
- /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:locale", content: locale }),
358
- productName ? /* @__PURE__ */ jsxRuntime.jsx("meta", { property: "og:site_name", content: productName }) : null,
359
- /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:card", content: "summary_large_image" }),
360
- /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:title", content: fullTitle }),
361
- description ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:description", content: description }) : null,
362
- fullImageUrl ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:image", content: fullImageUrl }) : null,
363
- twitterHandle ? /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "twitter:creator", content: twitterHandle }) : null,
364
- /* @__PURE__ */ jsxRuntime.jsx("meta", { name: "theme-color", content: themeColor }),
365
- structuredDataItems.map((data, index) => /* @__PURE__ */ jsxRuntime.jsx("script", { type: "application/ld+json", children: serializeJsonLd(data) }, `ld-${index}`)),
366
- additionalMeta?.map((meta, index) => /* @__PURE__ */ jsxRuntime.jsx(
367
- "meta",
368
- {
369
- ...meta.name ? { name: meta.name } : {},
370
- ...meta.property ? { property: meta.property } : {},
371
- content: meta.content
372
- },
373
- `meta-${index}`
374
- ))
375
- ] });
376
- }
377
- function cn(...inputs) {
378
- return tailwindMerge.twMerge(clsx.clsx(inputs));
379
- }
380
- var buttonVariants = classVarianceAuthority.cva(
381
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
382
- {
383
- variants: {
384
- variant: {
385
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
386
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
387
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
388
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
389
- ghost: "hover:bg-accent hover:text-accent-foreground",
390
- link: "text-primary underline-offset-4 hover:underline"
391
- },
392
- size: {
393
- default: "h-9 px-4 py-2",
394
- sm: "h-8 rounded-md px-3 text-xs",
395
- lg: "h-10 rounded-md px-8",
396
- icon: "h-9 w-9"
397
- }
398
- },
399
- defaultVariants: {
400
- variant: "default",
401
- size: "default"
402
- }
403
- }
404
- );
405
- var Button = React__namespace.forwardRef(
406
- ({ className, variant, size, asChild = false, ...props }, ref) => {
407
- const Comp = asChild ? reactSlot.Slot : "button";
408
- return /* @__PURE__ */ jsxRuntime.jsx(
409
- Comp,
410
- {
411
- className: cn(buttonVariants({ variant, size, className })),
412
- ref,
413
- ...props
414
- }
415
- );
416
- }
417
- );
418
- Button.displayName = "Button";
419
- var Input = React__namespace.forwardRef(
420
- ({ className, type, ...props }, ref) => {
421
- return /* @__PURE__ */ jsxRuntime.jsx(
422
- "input",
423
- {
424
- type,
425
- className: cn(
426
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
427
- className
428
- ),
429
- ref,
430
- ...props
431
- }
432
- );
433
- }
434
- );
435
- Input.displayName = "Input";
436
- var labelVariants = classVarianceAuthority.cva(
437
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
438
- );
439
- var Label = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
440
- LabelPrimitive__namespace.Root,
441
- {
442
- ref,
443
- className: cn(labelVariants(), className),
444
- ...props
445
- }
446
- ));
447
- Label.displayName = LabelPrimitive__namespace.Root.displayName;
448
- var Select = React__namespace.forwardRef(({ className, children, ...props }, ref) => {
449
- return /* @__PURE__ */ jsxRuntime.jsx(
450
- "select",
451
- {
452
- className: cn(
453
- "flex h-9 w-full appearance-none rounded-md border border-input bg-transparent bg-[length:1rem_1rem] bg-[right_0.75rem_center] bg-no-repeat px-3 py-1 pr-8 text-base shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
454
- // Inline SVG chevron: SVG inside a `background-image: url(data:…)`
455
- // does NOT inherit `currentColor` from the host element (the SVG is
456
- // its own document with no parent CSS context), so the stroke is
457
- // hardcoded to a muted slate-400 (#94a3b8). Matches the muted
458
- // foreground token visually in both light and dark themes well
459
- // enough for a passive chevron — addresses #9 review feedback.
460
- `bg-[url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")]`,
461
- className
462
- ),
463
- ref,
464
- ...props,
465
- children
466
- }
467
- );
25
+ Object.defineProperty(exports, "stripLeadingHeading", {
26
+ enumerable: true,
27
+ get: function () { return chunkXP2JDNDU_js.stripLeadingHeading; }
468
28
  });
469
- Select.displayName = "Select";
470
- var Textarea = React__namespace.forwardRef(({ className, ...props }, ref) => {
471
- return /* @__PURE__ */ jsxRuntime.jsx(
472
- "textarea",
473
- {
474
- className: cn(
475
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
476
- className
477
- ),
478
- ref,
479
- ...props
480
- }
481
- );
482
- });
483
- Textarea.displayName = "Textarea";
484
- var SUBMIT_CONTACT_INQUIRY_MUTATION = (
485
- /* GraphQL */
486
- `
487
- mutation SubmitContactInquiry($input: SubmitContactInquiryInput!) {
488
- submitContactInquiry(input: $input) {
489
- success
490
- message
491
- }
492
- }
493
- `
494
- );
495
- async function submitContactForm(client, data, productId) {
496
- try {
497
- const result = await client.mutate(SUBMIT_CONTACT_INQUIRY_MUTATION, {
498
- input: {
499
- name: `${data.firstName} ${data.lastName}`,
500
- email: data.email.trim().toLowerCase(),
501
- company: data.company || void 0,
502
- subject: data.subject,
503
- message: data.message,
504
- productId,
505
- // Send `category` only when the user actually picked one. Older
506
- // backend deployments without the `category` field in the
507
- // `SubmitContactInquiryInput` schema would reject any unknown
508
- // field; spreading conditionally keeps the SDK forward-
509
- // compatible.
510
- ...data.category ? { category: data.category } : {},
511
- ...data.recaptchaToken ? { recaptchaToken: data.recaptchaToken } : {}
512
- }
513
- });
514
- if (result.errors?.length) {
515
- const errorMsg = result.errors[0]?.message ?? "Failed to send message";
516
- return { success: false, message: errorMsg };
517
- }
518
- const response = result.data?.submitContactInquiry;
519
- if (response?.success) {
520
- return {
521
- success: true,
522
- message: response.message || "Message sent successfully!"
523
- };
524
- }
525
- return {
526
- success: false,
527
- message: response?.message || "Failed to send message"
528
- };
529
- } catch (error) {
530
- console.error("Contact form submission error:", error);
531
- return {
532
- success: false,
533
- message: "Network error. Please try again."
534
- };
535
- }
536
- }
537
- function replacePlaceholders(text, productName, email) {
538
- return text.replace(/{productName}/g, productName).replace(/{email}/g, email);
539
- }
540
- function ContactPage({
541
- productName,
542
- recaptchaSiteKey,
543
- contactEmail,
544
- contactPhone,
545
- officeAddress,
546
- responseTime = "We typically respond within 24 hours",
547
- heroTitle = "Get in Touch",
548
- heroDescription = "Have questions about {productName}? We're here to help. Reach out to our team and we'll get back to you as soon as possible.",
549
- headingLevel = 1,
550
- // Backward-compatibility: default to `[]` so existing consumers
551
- // (fluidgrids/burdenoff/algoshred websites) that don't pass
552
- // `categories` continue to render with NO dropdown — same behavior
553
- // they had before this SDK version. To opt in, pass an explicit
554
- // `categories={…}` array (or the exported `DEFAULT_CONTACT_CATEGORIES`
555
- // constant for the sane Burdenoff-generic vocabulary).
556
- categories = [],
557
- categoryLabel = "Category",
558
- categoryPlaceholder = "Select a category",
559
- categoryRequired = true,
560
- additionalOptions = [
561
- {
562
- title: "Sales Inquiries",
563
- description: "Ready to see {productName} in action? Our sales team is here to help.",
564
- buttonText: "Contact Sales",
565
- buttonLink: `mailto:${contactEmail}`
566
- },
567
- {
568
- title: "Technical Support",
569
- description: "Need help with your {productName} setup? Our support team is ready.",
570
- buttonText: "Get Support",
571
- buttonLink: `mailto:${contactEmail}`
572
- },
573
- {
574
- title: "Partnership",
575
- description: "Interested in partnering with {productName}? Let's explore opportunities.",
576
- buttonText: "Partner With Us",
577
- buttonLink: `mailto:${contactEmail}`
578
- }
579
- ],
580
- seo
581
- }) {
582
- const client = useWebSDK();
583
- const config = useWebSDKConfig();
584
- const { product } = useProduct();
585
- const resolvedProductId = product?.id || config.productId;
586
- const displayName = productName ?? product?.name ?? config.productId;
587
- const effectiveRecaptchaSiteKey = recaptchaSiteKey ?? product?.recaptchaSiteKey ?? config.recaptchaSiteKey ?? "";
588
- const recaptchaRef = React.useRef(null);
589
- const recaptchaGate = useDeferredRecaptcha(effectiveRecaptchaSiteKey);
590
- const [isSubmitting, setIsSubmitting] = React.useState(false);
591
- const [submitStatus, setSubmitStatus] = React.useState("idle");
592
- const handleSubmit = async (e) => {
593
- e.preventDefault();
594
- const recaptchaToken = recaptchaRef.current?.getValue() ?? "";
595
- if (effectiveRecaptchaSiteKey && !recaptchaToken) {
596
- recaptchaGate.arm();
597
- sonner.toast.error("Please complete the reCAPTCHA verification");
598
- return;
599
- }
600
- setIsSubmitting(true);
601
- setSubmitStatus("idle");
602
- const form = e.currentTarget;
603
- try {
604
- const formData = new FormData(form);
605
- const showCategory = categories.length > 0;
606
- const rawCategory = showCategory ? (formData.get("category") ?? "").trim() : "";
607
- if (showCategory && categoryRequired && !rawCategory) {
608
- sonner.toast.error("Please select a category");
609
- setIsSubmitting(false);
610
- return;
611
- }
612
- const contactData = {
613
- firstName: formData.get("firstName"),
614
- lastName: formData.get("lastName"),
615
- email: formData.get("email"),
616
- company: formData.get("company"),
617
- category: rawCategory || void 0,
618
- subject: formData.get("subject"),
619
- message: formData.get("message"),
620
- recaptchaToken
621
- };
622
- const result = await submitContactForm(
623
- client,
624
- contactData,
625
- resolvedProductId
626
- );
627
- if (result.success) {
628
- setSubmitStatus("success");
629
- sonner.toast.success(
630
- result.message ?? `Thank you for contacting ${displayName}. We'll get back to you within 24 hours.`
631
- );
632
- if (form) {
633
- form.reset();
634
- }
635
- recaptchaRef.current?.reset();
636
- } else {
637
- setSubmitStatus("error");
638
- sonner.toast.error(
639
- result.message ?? "Failed to send message. Please try again."
640
- );
641
- recaptchaRef.current?.reset();
642
- }
643
- } catch (error) {
644
- console.error("Error submitting form:", error);
645
- setSubmitStatus("error");
646
- sonner.toast.error("Failed to send message. Please try again later.");
647
- recaptchaRef.current?.reset();
648
- } finally {
649
- setIsSubmitting(false);
650
- }
651
- };
652
- const heroDescriptionText = replacePlaceholders(
653
- heroDescription,
654
- displayName,
655
- contactEmail
656
- ).trim();
657
- const hasHero = heroTitle.trim() !== "" || heroDescriptionText !== "";
658
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
659
- seo && /* @__PURE__ */ jsxRuntime.jsx(
660
- PageHead,
661
- {
662
- title: seo.title ?? `Contact ${displayName} - Get in Touch With Our Team`,
663
- description: seo.description ?? `Ready to transform your business? Contact our team for sales inquiries, technical support, or partnership opportunities. We're here to help you succeed.`,
664
- productName: displayName,
665
- keywords: seo.keywords ?? `contact ${displayName.toLowerCase()}, sales inquiries, customer support, technical support, partnership opportunities, get in touch`,
666
- image: seo.image ?? "/og-image-contact.png",
667
- url: seo.url
668
- }
669
- ),
670
- hasHero && /* @__PURE__ */ jsxRuntime.jsx(
671
- "section",
672
- {
673
- className: headingLevel === 2 ? "py-12 md:py-16" : "bg-gradient-to-b from-background to-muted/20 py-12 sm:py-16 md:py-20 lg:py-24",
674
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-3xl mx-auto", children: [
675
- !heroTitle.trim() ? null : headingLevel === 2 ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl md:text-3xl font-bold mb-3", children: heroTitle }) : /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl sm:text-4xl md:text-5xl font-bold mb-4 sm:mb-6", children: heroTitle }),
676
- heroDescriptionText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg sm:text-xl text-muted-foreground leading-relaxed", children: heroDescriptionText })
677
- ] }) })
678
- }
679
- ),
680
- /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 sm:py-16 md:py-20 lg:py-24", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid sm:grid-cols-1 lg:grid-cols-3 gap-8 sm:gap-10 lg:gap-12", children: [
681
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-1 order-2 lg:order-1", children: [
682
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl sm:text-2xl font-bold mb-4 sm:mb-6", children: "Contact Information" }),
683
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 sm:space-y-6", children: [
684
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
685
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 sm:w-10 sm:h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
686
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
687
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Email" }),
688
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm sm:text-base break-all", children: contactEmail })
689
- ] })
690
- ] }),
691
- contactPhone && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
692
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 sm:w-10 sm:h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Phone, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
693
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
694
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Phone" }),
695
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm sm:text-base", children: contactPhone })
696
- ] })
697
- ] }),
698
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
699
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 sm:w-10 sm:h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPin, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
700
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
701
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Office" }),
702
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground text-sm sm:text-base leading-relaxed", children: [
703
- officeAddress.line1,
704
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
705
- officeAddress.line2,
706
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
707
- officeAddress.line3,
708
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
709
- officeAddress.country
710
- ] })
711
- ] })
712
- ] }),
713
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
714
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 sm:w-10 sm:h-10 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
715
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
716
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Response Time" }),
717
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm sm:text-base", children: responseTime })
718
- ] })
719
- ] })
720
- ] })
721
- ] }),
722
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:col-span-2 order-1 lg:order-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-card border rounded-lg p-4 sm:p-6 md:p-8", children: [
723
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl sm:text-2xl font-bold mb-4 sm:mb-6", children: "Send us a Message" }),
724
- /* @__PURE__ */ jsxRuntime.jsxs(
725
- "form",
726
- {
727
- onSubmit: handleSubmit,
728
- className: "space-y-4 sm:space-y-6",
729
- ...recaptchaGate.formProps,
730
- children: [
731
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid sm:grid-cols-2 gap-4 sm:gap-6", children: [
732
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
733
- /* @__PURE__ */ jsxRuntime.jsx(
734
- Label,
735
- {
736
- htmlFor: "firstName",
737
- className: "text-sm sm:text-base",
738
- children: "First Name *"
739
- }
740
- ),
741
- /* @__PURE__ */ jsxRuntime.jsx(
742
- Input,
743
- {
744
- id: "firstName",
745
- name: "firstName",
746
- required: true,
747
- placeholder: "John",
748
- className: "text-sm sm:text-base"
749
- }
750
- )
751
- ] }),
752
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
753
- /* @__PURE__ */ jsxRuntime.jsx(
754
- Label,
755
- {
756
- htmlFor: "lastName",
757
- className: "text-sm sm:text-base",
758
- children: "Last Name *"
759
- }
760
- ),
761
- /* @__PURE__ */ jsxRuntime.jsx(
762
- Input,
763
- {
764
- id: "lastName",
765
- name: "lastName",
766
- required: true,
767
- placeholder: "Doe",
768
- className: "text-sm sm:text-base"
769
- }
770
- )
771
- ] })
772
- ] }),
773
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
774
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "email", className: "text-sm sm:text-base", children: "Email *" }),
775
- /* @__PURE__ */ jsxRuntime.jsx(
776
- Input,
777
- {
778
- id: "email",
779
- name: "email",
780
- type: "email",
781
- required: true,
782
- placeholder: "john@company.com",
783
- className: "text-sm sm:text-base"
784
- }
785
- )
786
- ] }),
787
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
788
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "company", className: "text-sm sm:text-base", children: "Company" }),
789
- /* @__PURE__ */ jsxRuntime.jsx(
790
- Input,
791
- {
792
- id: "company",
793
- name: "company",
794
- placeholder: "Acme Inc.",
795
- className: "text-sm sm:text-base"
796
- }
797
- )
798
- ] }),
799
- categories.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
800
- /* @__PURE__ */ jsxRuntime.jsxs(
801
- Label,
802
- {
803
- htmlFor: "category",
804
- className: "text-sm sm:text-base",
805
- children: [
806
- categoryLabel,
807
- categoryRequired ? " *" : ""
808
- ]
809
- }
810
- ),
811
- /* @__PURE__ */ jsxRuntime.jsxs(
812
- Select,
813
- {
814
- id: "category",
815
- name: "category",
816
- required: categoryRequired,
817
- defaultValue: "",
818
- className: "text-sm sm:text-base",
819
- children: [
820
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: categoryRequired, children: categoryPlaceholder }),
821
- categories.map((c) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: c.value, children: c.label }, c.value))
822
- ]
823
- }
824
- )
825
- ] }),
826
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
827
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "subject", className: "text-sm sm:text-base", children: "Subject *" }),
828
- /* @__PURE__ */ jsxRuntime.jsx(
829
- Input,
830
- {
831
- id: "subject",
832
- name: "subject",
833
- required: true,
834
- placeholder: "How can we help you?",
835
- className: "text-sm sm:text-base"
836
- }
837
- )
838
- ] }),
839
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
840
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "message", className: "text-sm sm:text-base", children: "Message *" }),
841
- /* @__PURE__ */ jsxRuntime.jsx(
842
- Textarea,
843
- {
844
- id: "message",
845
- name: "message",
846
- required: true,
847
- placeholder: "Tell us more about your needs...",
848
- rows: 5,
849
- className: "text-sm sm:text-base min-h-[120px] sm:min-h-[150px] resize-y"
850
- }
851
- )
852
- ] }),
853
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
854
- effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx(
855
- "div",
856
- {
857
- className: "flex justify-center sm:justify-start",
858
- style: { minHeight: RECAPTCHA_WIDGET_HEIGHT },
859
- children: recaptchaGate.armed && /* @__PURE__ */ jsxRuntime.jsx(
860
- ReCAPTCHA__default.default,
861
- {
862
- ref: recaptchaRef,
863
- sitekey: effectiveRecaptchaSiteKey
864
- }
865
- )
866
- }
867
- ),
868
- /* @__PURE__ */ jsxRuntime.jsx(
869
- Button,
870
- {
871
- type: "submit",
872
- size: "lg",
873
- disabled: isSubmitting,
874
- className: "w-full sm:w-auto min-w-[200px]",
875
- children: isSubmitting ? "Sending..." : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
876
- "Send Message ",
877
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "ml-2 h-4 w-4" })
878
- ] })
879
- }
880
- )
881
- ] }),
882
- submitStatus === "success" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 sm:p-4 bg-green-50 border border-green-200 rounded-lg text-green-800 mt-4", children: [
883
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-sm sm:text-base", children: "Message sent successfully!" }),
884
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs sm:text-sm mt-1", children: [
885
- "Thank you for contacting ",
886
- displayName,
887
- ". We'll get back to you within 24 hours."
888
- ] })
889
- ] }),
890
- submitStatus === "error" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 sm:p-4 bg-red-50 border border-red-200 rounded-lg text-red-800 mt-4", children: [
891
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-sm sm:text-base", children: "Failed to send message" }),
892
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs sm:text-sm mt-1", children: [
893
- "Please try again later or contact us directly at",
894
- " ",
895
- contactEmail
896
- ] })
897
- ] })
898
- ]
899
- }
900
- )
901
- ] }) })
902
- ] }) }) }),
903
- additionalOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 sm:py-16 md:py-20 lg:py-24 bg-muted/30", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
904
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl sm:text-3xl font-bold text-center mb-8 sm:mb-12", children: "More Ways to Connect" }),
905
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8 max-w-5xl mx-auto", children: additionalOptions.map((option, index) => /* @__PURE__ */ jsxRuntime.jsxs(
906
- "div",
907
- {
908
- className: "text-center p-4 sm:p-6 bg-card border rounded-lg",
909
- children: [
910
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-base sm:text-lg mb-2", children: option.title }),
911
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm sm:text-base mb-4 leading-relaxed", children: replacePlaceholders(
912
- option.description,
913
- displayName,
914
- contactEmail
915
- ) }),
916
- /* @__PURE__ */ jsxRuntime.jsx(
917
- Button,
918
- {
919
- variant: "outline",
920
- asChild: true,
921
- className: "text-sm sm:text-base",
922
- children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: option.buttonLink, children: option.buttonText })
923
- }
924
- )
925
- ]
926
- },
927
- index
928
- )) })
929
- ] }) })
930
- ] });
931
- }
932
- function MarkdownLink({
933
- href,
934
- children,
935
- // react-markdown passes the hast node to every override; it is not a DOM attribute.
936
- node: _node,
937
- ...props
938
- }) {
939
- const isExternal = typeof href === "string" && (href.startsWith("http://") || href.startsWith("https://"));
940
- return /* @__PURE__ */ jsxRuntime.jsx(
941
- "a",
942
- {
943
- href,
944
- ...props,
945
- ...isExternal ? { target: "_blank", rel: "noopener noreferrer" } : { rel: "noopener noreferrer" },
946
- children
947
- }
948
- );
949
- }
950
- var defaultComponents = {
951
- a: MarkdownLink
952
- };
953
- function Markdown({
954
- children,
955
- className,
956
- inline,
957
- components,
958
- rehypePlugins
959
- }) {
960
- const content = /* @__PURE__ */ jsxRuntime.jsx(
961
- ReactMarkdown__default.default,
962
- {
963
- remarkPlugins: [remarkGfm__default.default],
964
- rehypePlugins: [rehypeSanitize__default.default, ...rehypePlugins ?? []],
965
- components: { ...defaultComponents, ...components },
966
- ...inline ? { disallowedElements: ["p"], unwrapDisallowed: true } : {},
967
- children
968
- }
969
- );
970
- if (inline) {
971
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className, children: content });
972
- }
973
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: content });
974
- }
975
- function ContentRenderer({
976
- content,
977
- format = "markdown",
978
- className
979
- }) {
980
- if (format === "markdown") {
981
- return /* @__PURE__ */ jsxRuntime.jsx(Markdown, { className, children: content });
982
- }
983
- if (format === "html") {
984
- const sanitized = DOMPurify__default.default.sanitize(content);
985
- return /* @__PURE__ */ jsxRuntime.jsx(
986
- "div",
987
- {
988
- className,
989
- dangerouslySetInnerHTML: { __html: sanitized }
990
- }
991
- );
992
- }
993
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx("pre", { style: { whiteSpace: "pre-wrap", fontFamily: "inherit" }, children: content }) });
994
- }
995
- var PARTNER_CONTENT_QUERY = `
996
- query PartnerContent($productId: String!, $limit: Int) {
997
- publicContentPages(productId: $productId, limit: $limit, offset: 0) {
998
- items {
999
- id
1000
- title
1001
- slug
1002
- excerpt
1003
- content
1004
- contentFormat
1005
- thumbnail
1006
- tags
1007
- publishedAt
1008
- lastUpdated
1009
- }
1010
- }
1011
- }
1012
- `;
1013
- var PARTNER_DOCUMENTS_QUERY = `
1014
- query PartnerDocuments($productId: String!, $limit: Int) {
1015
- publicPressKitAssets(productId: $productId, limit: $limit, offset: 0) {
1016
- items {
1017
- id
1018
- category
1019
- title
1020
- description
1021
- fileUrl
1022
- fileName
1023
- fileSize
1024
- mimeType
1025
- version
1026
- tags
1027
- sortOrder
1028
- updatedAt
1029
- }
1030
- }
1031
- }
1032
- `;
1033
- function formatFileSize(bytes) {
1034
- if (!bytes || bytes <= 0) return "";
1035
- const units = ["B", "KB", "MB", "GB"];
1036
- let i = 0;
1037
- let n = bytes;
1038
- while (n >= 1024 && i < units.length - 1) {
1039
- n /= 1024;
1040
- i++;
1041
- }
1042
- return `${n.toFixed(n >= 10 || i === 0 ? 0 : 1)} ${units[i]}`;
1043
- }
1044
- async function downloadDocument(e, doc) {
1045
- e.preventDefault();
1046
- const name = doc.fileName || doc.fileUrl.split("/").pop()?.split("?")[0] || doc.title || "partner-document";
1047
- const openInTab = () => window.open(doc.fileUrl, "_blank", "noopener,noreferrer");
1048
- try {
1049
- const res = await fetch(doc.fileUrl, { mode: "cors" });
1050
- if (!res.ok) {
1051
- openInTab();
1052
- return;
1053
- }
1054
- const blob = await res.blob();
1055
- const objUrl = URL.createObjectURL(blob);
1056
- const a = document.createElement("a");
1057
- a.href = objUrl;
1058
- a.download = name;
1059
- document.body.appendChild(a);
1060
- a.click();
1061
- a.remove();
1062
- URL.revokeObjectURL(objUrl);
1063
- } catch {
1064
- openInTab();
1065
- }
1066
- }
1067
- function PartnerHero({
1068
- title,
1069
- subtitle
1070
- }) {
1071
- return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "bg-gradient-to-b from-background to-muted/20 py-16 md:py-24", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto px-4 max-w-4xl text-center", children: [
1072
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl md:text-5xl font-bold tracking-tight text-foreground mb-4", children: title }),
1073
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto", children: subtitle })
1074
- ] }) });
1075
- }
1076
- function stripLeadingHeading(content, format) {
1077
- if (format === "html") {
1078
- return content.replace(/^\s*<h1\b[^>]*>[\s\S]*?<\/h1>\s*/i, "");
1079
- }
1080
- return content.replace(/^\s*#\s+.*(?:\r?\n)*/, "");
1081
- }
1082
- function PartnerContentSection({
1083
- page
1084
- }) {
1085
- return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 md:py-16", children: /* @__PURE__ */ jsxRuntime.jsx(
1086
- "div",
1087
- {
1088
- className: [
1089
- "mx-auto max-w-3xl px-4",
1090
- // Headings
1091
- "[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:tracking-tight [&_h1]:mt-0 [&_h1]:mb-6",
1092
- "[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:tracking-tight [&_h2]:mt-10 [&_h2]:mb-4",
1093
- "[&_h3]:text-xl [&_h3]:font-semibold [&_h3]:mt-7 [&_h3]:mb-3",
1094
- "[&_h4]:text-lg [&_h4]:font-semibold [&_h4]:mt-6 [&_h4]:mb-2",
1095
- // Block elements
1096
- "[&_p]:my-4 [&_p]:leading-relaxed [&_p]:text-base",
1097
- "[&_ul]:my-4 [&_ul]:pl-6 [&_ul]:list-disc [&_ul]:space-y-1",
1098
- "[&_ol]:my-4 [&_ol]:pl-6 [&_ol]:list-decimal [&_ol]:space-y-1",
1099
- "[&_li]:leading-relaxed",
1100
- "[&_li>p]:my-1",
1101
- "[&_blockquote]:border-l-4 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:my-4 [&_blockquote]:text-muted-foreground",
1102
- "[&_hr]:my-8 [&_hr]:border-border",
1103
- // Inline elements
1104
- "[&_strong]:font-semibold [&_strong]:text-foreground",
1105
- "[&_em]:italic",
1106
- "[&_a]:underline [&_a]:underline-offset-2 [&_a]:text-accent hover:[&_a]:text-accent/80 [&_a]:transition-colors",
1107
- "[&_code]:rounded [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:text-sm [&_code]:font-mono",
1108
- "[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-4 [&_pre]:text-sm",
1109
- "[&_pre>code]:bg-transparent [&_pre>code]:p-0"
1110
- ].join(" "),
1111
- children: page.content && /* @__PURE__ */ jsxRuntime.jsx(
1112
- ContentRenderer,
1113
- {
1114
- content: stripLeadingHeading(page.content, page.contentFormat),
1115
- format: (
1116
- // Validate before passing; unknown formats fall through to
1117
- // ContentRenderer's default behavior (markdown rendering)
1118
- // rather than getting silently force-cast to an
1119
- // unsupported variant.
1120
- page.contentFormat === "markdown" || page.contentFormat === "html" ? page.contentFormat : void 0
1121
- )
1122
- }
1123
- )
1124
- }
1125
- ) });
1126
- }
1127
- function PartnerDocumentCard({ doc }) {
1128
- const sizeLabel = formatFileSize(doc.fileSize);
1129
- const ext = doc.fileName?.split(".").pop()?.toUpperCase();
1130
- return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "flex flex-col gap-3 rounded-xl border border-border bg-card p-5 shadow-sm hover:shadow-md transition-shadow", children: [
1131
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
1132
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted p-2.5 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { size: 20, className: "text-muted-foreground" }) }),
1133
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
1134
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-foreground truncate", children: doc.title }),
1135
- doc.version && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
1136
- "Version ",
1137
- doc.version
1138
- ] })
1139
- ] })
1140
- ] }),
1141
- doc.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground line-clamp-3", children: doc.description }),
1142
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 mt-auto pt-2 border-t border-border/60", children: [
1143
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-muted-foreground flex items-center gap-2", children: [
1144
- ext && /* @__PURE__ */ jsxRuntime.jsx("span", { children: ext }),
1145
- sizeLabel && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1146
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: "\xB7" }),
1147
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: sizeLabel })
1148
- ] })
1149
- ] }),
1150
- /* @__PURE__ */ jsxRuntime.jsxs(
1151
- "a",
1152
- {
1153
- href: doc.fileUrl,
1154
- download: doc.fileName ?? void 0,
1155
- onClick: (e) => void downloadDocument(e, doc),
1156
- className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium text-foreground hover:bg-muted transition-colors",
1157
- children: [
1158
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { size: 14 }),
1159
- "Download"
1160
- ]
1161
- }
1162
- )
1163
- ] })
1164
- ] });
1165
- }
1166
- function PartnerDocumentsSection({
1167
- title,
1168
- subtitle,
1169
- docs
1170
- }) {
1171
- return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-12 md:py-16 bg-muted/20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto px-4 max-w-5xl", children: [
1172
- /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-8 md:mb-10 text-center", children: [
1173
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl md:text-3xl font-bold text-foreground mb-2", children: title }),
1174
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground max-w-2xl mx-auto", children: subtitle })
1175
- ] }),
1176
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: docs.map((doc) => /* @__PURE__ */ jsxRuntime.jsx(PartnerDocumentCard, { doc }, doc.id)) })
1177
- ] }) });
1178
- }
1179
- var DEFAULT_PARTNER_CATEGORY = {
1180
- value: "partnership",
1181
- label: "Partner program"
1182
- };
1183
- function PartnersPage(props) {
1184
- const {
1185
- productName: productNameProp,
1186
- heroTitle = "Partner with us",
1187
- heroSubtitle,
1188
- contentTag = "partner",
1189
- contentSlug,
1190
- documentsTag = "partner",
1191
- documentsTitle = "Partner Documents",
1192
- documentsSubtitle,
1193
- showContactForm = true,
1194
- contactCategory,
1195
- formTitle = "Become a partner",
1196
- formSubtitle,
1197
- contactEmail,
1198
- contactPhone,
1199
- officeAddress,
1200
- responseTime,
1201
- recaptchaSiteKey,
1202
- additionalOptions,
1203
- seoTitle,
1204
- seoDescription,
1205
- seoKeywords,
1206
- className
1207
- } = props;
1208
- const client = useWebSDK();
1209
- const config = useWebSDKConfig();
1210
- const { product } = useProduct();
1211
- const resolvedProductId = product?.id ?? config?.productId ?? productNameProp ?? "";
1212
- const resolvedProductName = productNameProp ?? product?.name ?? config?.productId ?? "our team";
1213
- const [contentPage, setContentPage] = React.useState(null);
1214
- const [docs, setDocs] = React.useState([]);
1215
- const [loading, setLoading] = React.useState(true);
1216
- React.useEffect(() => {
1217
- if (!client || !resolvedProductId) {
1218
- setContentPage(null);
1219
- setDocs([]);
1220
- setLoading(false);
1221
- return;
1222
- }
1223
- let cancelled = false;
1224
- setLoading(true);
1225
- void Promise.allSettled([
1226
- client.query(PARTNER_CONTENT_QUERY, { productId: resolvedProductId, limit: 50 }),
1227
- client.query(
1228
- PARTNER_DOCUMENTS_QUERY,
1229
- { productId: resolvedProductId, limit: 50 }
1230
- )
1231
- ]).then(([contentResult, docsResult]) => {
1232
- if (cancelled) return;
1233
- if (contentResult.status === "rejected") {
1234
- setContentPage(null);
1235
- } else if (contentResult.status === "fulfilled") {
1236
- const items = contentResult.value.data?.publicContentPages?.items ?? [];
1237
- const match = contentSlug ? items.find((p) => p.slug === contentSlug) : items.find((p) => p.tags?.includes(contentTag));
1238
- setContentPage(match ?? null);
1239
- }
1240
- if (docsResult.status === "rejected") {
1241
- setDocs([]);
1242
- } else if (docsResult.status === "fulfilled") {
1243
- const items = docsResult.value.data?.publicPressKitAssets?.items ?? [];
1244
- const filtered = items.filter(
1245
- (d) => d.category === "DOCUMENT" && d.tags?.includes(documentsTag) && !!d.fileUrl
1246
- ).sort(
1247
- (a, b) => a.sortOrder - b.sortOrder
1248
- );
1249
- setDocs(filtered);
1250
- }
1251
- setLoading(false);
1252
- });
1253
- return () => {
1254
- cancelled = true;
1255
- };
1256
- }, [client, resolvedProductId, contentSlug, contentTag, documentsTag]);
1257
- let partnerCategories;
1258
- if (contactCategory === false) {
1259
- partnerCategories = [];
1260
- } else if (Array.isArray(contactCategory)) {
1261
- partnerCategories = contactCategory.length > 0 ? contactCategory : [DEFAULT_PARTNER_CATEGORY];
1262
- } else {
1263
- partnerCategories = [contactCategory ?? DEFAULT_PARTNER_CATEGORY];
1264
- }
1265
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
1266
- /* @__PURE__ */ jsxRuntime.jsx(
1267
- PageHead,
1268
- {
1269
- title: seoTitle ?? `${heroTitle} \u2014 ${resolvedProductName}`,
1270
- description: seoDescription ?? heroSubtitle ?? `Join the ${resolvedProductName} partner programme.`,
1271
- keywords: seoKeywords
1272
- }
1273
- ),
1274
- /* @__PURE__ */ jsxRuntime.jsx(PartnerHero, { title: heroTitle, subtitle: heroSubtitle }),
1275
- !loading && contentPage && /* @__PURE__ */ jsxRuntime.jsx(PartnerContentSection, { page: contentPage }),
1276
- !loading && docs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1277
- PartnerDocumentsSection,
1278
- {
1279
- title: documentsTitle,
1280
- subtitle: documentsSubtitle,
1281
- docs
1282
- }
1283
- ),
1284
- showContactForm && /* @__PURE__ */ jsxRuntime.jsx(
1285
- ContactPage,
1286
- {
1287
- productName: resolvedProductName,
1288
- heroTitle: formTitle,
1289
- headingLevel: 2,
1290
- heroDescription: formSubtitle ?? `Tell us about your organisation and a partner manager from ${resolvedProductName} will be in touch.`,
1291
- contactEmail,
1292
- contactPhone,
1293
- officeAddress,
1294
- responseTime,
1295
- recaptchaSiteKey,
1296
- additionalOptions,
1297
- categories: partnerCategories,
1298
- categoryLabel: "Partnership type",
1299
- categoryRequired: partnerCategories.length > 0
1300
- }
1301
- )
1302
- ] });
1303
- }
1304
-
1305
- exports.PartnersPage = PartnersPage;
1306
- exports.stripLeadingHeading = stripLeadingHeading;
1307
29
  //# sourceMappingURL=partners.js.map
1308
30
  //# sourceMappingURL=partners.js.map