@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,911 +1,14 @@
1
- import * as React from 'react';
2
- import { createContext, useRef, useState, useContext, useCallback } from 'react';
3
- import { Mail, Phone, MapPin, Clock, Send } from 'lucide-react';
4
- import ReCAPTCHA from 'react-google-recaptcha';
5
- import { toast } from 'sonner';
6
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
- import { Helmet } from 'react-helmet-async';
8
- import { Slot } from '@radix-ui/react-slot';
9
- import { cva } from 'class-variance-authority';
10
- import { clsx } from 'clsx';
11
- import { twMerge } from 'tailwind-merge';
12
- import * as LabelPrimitive from '@radix-ui/react-label';
13
-
14
- var __defProp = Object.defineProperty;
15
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
17
-
18
- // src/client/security.ts
19
- var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "::1"]);
20
- var RESERVED_HEADERS = /* @__PURE__ */ new Set([
21
- "authorization",
22
- "cookie",
23
- "x-actor-id",
24
- "x-actor-type",
25
- "x-consent-granted-by",
26
- "x-consent-scope",
27
- "x-consent-granted-at",
28
- "x-consent-expires-at"
29
- ]);
30
- function validateGatewayUrl(value) {
31
- let url;
32
- try {
33
- url = new URL(value);
34
- } catch {
35
- throw new Error("Gateway URL must be a valid absolute URL");
36
- }
37
- if (url.protocol === "https:") {
38
- return url.toString();
39
- }
40
- if (url.protocol === "http:" && LOOPBACK_HOSTS.has(url.hostname.toLowerCase())) {
41
- return url.toString();
42
- }
43
- throw new Error("Gateway URL must use HTTPS unless it targets localhost");
44
- }
45
- function sanitizeHeaders(headers) {
46
- if (!headers) return void 0;
47
- return Object.fromEntries(
48
- Object.entries(headers).filter(
49
- ([key]) => !RESERVED_HEADERS.has(key.toLowerCase())
50
- )
51
- );
52
- }
53
- var CF_ACCESS_GATED_HOSTS = /* @__PURE__ */ new Set([
54
- "alphagraphql.burdenoff.com",
55
- "alphagraphqlworkspaces.burdenoff.com"
56
- ]);
57
- function cfAccessHeaders(gatewayUrl, cfAccess) {
58
- const clientId = cfAccess?.clientId?.trim();
59
- const clientSecret = cfAccess?.clientSecret?.trim();
60
- if (!clientId || !clientSecret) return {};
61
- let host;
62
- try {
63
- host = new URL(gatewayUrl).hostname.toLowerCase();
64
- } catch {
65
- return {};
66
- }
67
- if (!CF_ACCESS_GATED_HOSTS.has(host)) return {};
68
- return {
69
- "CF-Access-Client-Id": clientId,
70
- "CF-Access-Client-Secret": clientSecret
71
- };
72
- }
73
-
74
- // src/client/graphql-client.ts
75
- var _WebSDKClient = class _WebSDKClient {
76
- constructor(config) {
77
- __publicField(this, "config");
78
- __publicField(this, "queryCache", /* @__PURE__ */ new Map());
79
- __publicField(this, "inflight", /* @__PURE__ */ new Map());
80
- this.config = {
81
- ...config,
82
- gatewayUrl: validateGatewayUrl(config.gatewayUrl),
83
- headers: sanitizeHeaders(config.headers)
84
- };
85
- }
86
- getConfig() {
87
- return this.config;
88
- }
89
- /**
90
- * Execute a GraphQL query (with deduplication and caching).
91
- *
92
- * Pass `{ cache: false }` to bypass the cache entirely — required for poll
93
- * loops, where every tick must reach the network.
94
- */
95
- async query(query, variables, options) {
96
- if (options?.cache === false) {
97
- return this.request(query, variables, true, options.timeoutMs);
98
- }
99
- const cacheKey = JSON.stringify({ query, variables });
100
- const cached = this.queryCache.get(cacheKey);
101
- if (cached) {
102
- if (Date.now() - cached.ts < _WebSDKClient.CACHE_TTL) {
103
- return cached.data;
104
- }
105
- this.queryCache.delete(cacheKey);
106
- }
107
- const existing = this.inflight.get(cacheKey);
108
- if (existing) {
109
- return existing;
110
- }
111
- const promise = this.request(query, variables, true, options?.timeoutMs).then((result) => {
112
- if (result.data && !result.errors?.length) {
113
- if (this.queryCache.size >= _WebSDKClient.MAX_CACHE_ENTRIES) {
114
- const oldestEntry = this.queryCache.keys().next().value;
115
- if (oldestEntry) {
116
- this.queryCache.delete(oldestEntry);
117
- }
118
- }
119
- this.queryCache.set(cacheKey, { data: result, ts: Date.now() });
120
- }
121
- return result;
122
- }).finally(() => {
123
- this.inflight.delete(cacheKey);
124
- });
125
- this.inflight.set(cacheKey, promise);
126
- return promise;
127
- }
128
- /**
129
- * Execute a GraphQL mutation
130
- */
131
- async mutate(mutation, variables, options) {
132
- return this.request(mutation, variables, false, options?.timeoutMs);
133
- }
134
- /** HTTP statuses worth another attempt — transient server/edge conditions. */
135
- static isRetriableStatus(status) {
136
- return status === 429 || status === 408 || status >= 500 && status < 600;
137
- }
138
- static sleep(ms) {
139
- return new Promise((resolve) => setTimeout(resolve, ms));
140
- }
141
- /**
142
- * Perform the HTTP call with a hard timeout. Every outcome resolves to a
143
- * GraphQLResponse — callers never hang, so a UI's `loading` state always
144
- * settles into data or a renderable error.
145
- */
146
- async attempt(query, variables, timeoutMs) {
147
- const controller = new AbortController();
148
- const timer = setTimeout(() => controller.abort(), timeoutMs);
149
- try {
150
- const response = await fetch(this.config.gatewayUrl, {
151
- method: "POST",
152
- headers: {
153
- "Content-Type": "application/json",
154
- "x-product-id": this.config.productId,
155
- ...this.config.headers,
156
- ...cfAccessHeaders(this.config.gatewayUrl, this.config.cfAccess)
157
- },
158
- body: JSON.stringify({ query, variables }),
159
- signal: controller.signal
160
- });
161
- if (!response.ok) {
162
- console.error(
163
- "[WebSDK] GraphQL request failed",
164
- response.status,
165
- response.statusText
166
- );
167
- return {
168
- res: {
169
- errors: [
170
- {
171
- message: `HTTP ${response.status}: ${response.statusText}`,
172
- extensions: { code: `HTTP_${response.status}` }
173
- }
174
- ]
175
- },
176
- retriable: _WebSDKClient.isRetriableStatus(response.status)
177
- };
178
- }
179
- return {
180
- res: await response.json(),
181
- retriable: false
182
- };
183
- } catch (error) {
184
- const aborted = error instanceof Error && (error.name === "AbortError" || controller.signal.aborted);
185
- const message = aborted ? `Request timed out after ${timeoutMs}ms` : error instanceof Error ? error.message : "Network error";
186
- console.error("[WebSDK] Network error", message);
187
- return {
188
- res: {
189
- errors: [
190
- {
191
- message,
192
- extensions: { code: aborted ? "TIMEOUT" : "NETWORK_ERROR" }
193
- }
194
- ]
195
- },
196
- // Transport-level failures are worth one more try; a genuine outage
197
- // just fails twice quickly and still renders an error state.
198
- retriable: true
199
- };
200
- } finally {
201
- clearTimeout(timer);
202
- }
203
- }
204
- async request(query, variables, retry = true, timeoutOverrideMs) {
205
- const timeoutMs = timeoutOverrideMs ?? this.config.timeoutMs ?? _WebSDKClient.DEFAULT_TIMEOUT_MS;
206
- const maxRetries = retry ? this.config.maxRetries ?? _WebSDKClient.DEFAULT_MAX_RETRIES : 0;
207
- let last;
208
- for (let i = 0; i <= maxRetries; i++) {
209
- const { res, retriable } = await this.attempt(
210
- query,
211
- variables,
212
- timeoutMs
213
- );
214
- if (!retriable || i === maxRetries) return res;
215
- last = res;
216
- await _WebSDKClient.sleep(
217
- _WebSDKClient.RETRY_BASE_DELAY_MS * (i + 1) + Math.random() * 200
218
- );
219
- }
220
- return last;
221
- }
222
- };
223
- __publicField(_WebSDKClient, "CACHE_TTL", 5 * 60 * 1e3);
224
- // 5 minutes
225
- __publicField(_WebSDKClient, "MAX_CACHE_ENTRIES", 100);
226
- __publicField(_WebSDKClient, "DEFAULT_TIMEOUT_MS", 12e3);
227
- __publicField(_WebSDKClient, "DEFAULT_MAX_RETRIES", 1);
228
- __publicField(_WebSDKClient, "RETRY_BASE_DELAY_MS", 400);
229
- var WebSDKContext = createContext(null);
230
- function useWebSDK() {
231
- const client = useContext(WebSDKContext);
232
- if (!client) {
233
- throw new Error("useWebSDK must be used within a WebSDKProvider");
234
- }
235
- return client;
236
- }
237
- function useWebSDKConfig() {
238
- const client = useWebSDK();
239
- return client.getConfig();
240
- }
241
- var RECAPTCHA_WIDGET_HEIGHT = 78;
242
- function useDeferredRecaptcha(siteKey) {
243
- const [engaged, setEngaged] = useState(false);
244
- const arm = useCallback(() => setEngaged(true), []);
245
- const enabled = siteKey.length > 0;
246
- return {
247
- armed: enabled && engaged,
248
- arm,
249
- formProps: enabled && !engaged ? { onFocus: arm, onPointerDown: arm } : {}
250
- };
251
- }
252
-
253
- // src/utils/product-slug.ts
254
- var PRODUCT_SLUG_RENAMES = Object.freeze(
255
- [Object.freeze({ legacy: "botlit", current: "botmanor" })]
256
- );
257
- Object.freeze(
258
- Object.fromEntries(PRODUCT_SLUG_RENAMES.map((r) => [r.legacy, r.current]))
259
- );
260
- var ProductContext = createContext({
261
- product: null,
262
- loading: true,
263
- error: null,
264
- hasProvider: false,
265
- refetch: () => {
266
- }
267
- });
268
- function useProduct() {
269
- return useContext(ProductContext);
270
- }
271
- function canonicalFromLocation() {
272
- if (typeof window === "undefined" || !window.location) return void 0;
273
- const { origin, pathname } = window.location;
274
- if (!origin || origin === "null") return void 0;
275
- const path = pathname === "/" ? "/" : pathname.replace(/\/+$/, "");
276
- return `${origin}${path}`;
277
- }
278
- function resolveImageUrl(image, base) {
279
- if (!image || /^https?:\/\//i.test(image)) return image;
280
- if (!base) return image;
281
- try {
282
- return new URL(image, base).toString();
283
- } catch {
284
- return image;
285
- }
286
- }
287
- function serializeJsonLd(data) {
288
- return JSON.stringify(data).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
289
- }
290
- function PageHead({
291
- title,
292
- description,
293
- productName,
294
- keywords,
295
- image,
296
- url,
297
- favicon,
298
- robots = "index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1",
299
- locale = "en_US",
300
- twitterHandle,
301
- themeColor = "#000000",
302
- author,
303
- structuredData,
304
- additionalMeta
305
- }) {
306
- const fullTitle = productName && !title.includes(productName) ? `${title} | ${productName}` : title;
307
- const resolvedUrl = url ?? canonicalFromLocation();
308
- const fullImageUrl = resolveImageUrl(image, resolvedUrl);
309
- const structuredDataItems = structuredData ? Array.isArray(structuredData) ? structuredData : [structuredData] : [];
310
- return /* @__PURE__ */ jsxs(Helmet, { children: [
311
- /* @__PURE__ */ jsx("title", { children: fullTitle }),
312
- /* @__PURE__ */ jsx("meta", { name: "title", content: fullTitle }),
313
- description ? /* @__PURE__ */ jsx("meta", { name: "description", content: description }) : null,
314
- keywords ? /* @__PURE__ */ jsx("meta", { name: "keywords", content: keywords }) : null,
315
- author ? /* @__PURE__ */ jsx("meta", { name: "author", content: author }) : null,
316
- /* @__PURE__ */ jsx("meta", { name: "robots", content: robots }),
317
- resolvedUrl ? /* @__PURE__ */ jsx("link", { rel: "canonical", href: resolvedUrl }) : null,
318
- favicon ? /* @__PURE__ */ jsx("link", { rel: "icon", href: favicon }) : null,
319
- /* @__PURE__ */ jsx("meta", { property: "og:type", content: "website" }),
320
- /* @__PURE__ */ jsx("meta", { property: "og:title", content: fullTitle }),
321
- description ? /* @__PURE__ */ jsx("meta", { property: "og:description", content: description }) : null,
322
- fullImageUrl ? /* @__PURE__ */ jsx("meta", { property: "og:image", content: fullImageUrl }) : null,
323
- resolvedUrl ? /* @__PURE__ */ jsx("meta", { property: "og:url", content: resolvedUrl }) : null,
324
- /* @__PURE__ */ jsx("meta", { property: "og:locale", content: locale }),
325
- productName ? /* @__PURE__ */ jsx("meta", { property: "og:site_name", content: productName }) : null,
326
- /* @__PURE__ */ jsx("meta", { name: "twitter:card", content: "summary_large_image" }),
327
- /* @__PURE__ */ jsx("meta", { name: "twitter:title", content: fullTitle }),
328
- description ? /* @__PURE__ */ jsx("meta", { name: "twitter:description", content: description }) : null,
329
- fullImageUrl ? /* @__PURE__ */ jsx("meta", { name: "twitter:image", content: fullImageUrl }) : null,
330
- twitterHandle ? /* @__PURE__ */ jsx("meta", { name: "twitter:creator", content: twitterHandle }) : null,
331
- /* @__PURE__ */ jsx("meta", { name: "theme-color", content: themeColor }),
332
- structuredDataItems.map((data, index) => /* @__PURE__ */ jsx("script", { type: "application/ld+json", children: serializeJsonLd(data) }, `ld-${index}`)),
333
- additionalMeta?.map((meta, index) => /* @__PURE__ */ jsx(
334
- "meta",
335
- {
336
- ...meta.name ? { name: meta.name } : {},
337
- ...meta.property ? { property: meta.property } : {},
338
- content: meta.content
339
- },
340
- `meta-${index}`
341
- ))
342
- ] });
343
- }
344
- function cn(...inputs) {
345
- return twMerge(clsx(inputs));
346
- }
347
- var buttonVariants = cva(
348
- "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",
349
- {
350
- variants: {
351
- variant: {
352
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
353
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
354
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
355
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
356
- ghost: "hover:bg-accent hover:text-accent-foreground",
357
- link: "text-primary underline-offset-4 hover:underline"
358
- },
359
- size: {
360
- default: "h-9 px-4 py-2",
361
- sm: "h-8 rounded-md px-3 text-xs",
362
- lg: "h-10 rounded-md px-8",
363
- icon: "h-9 w-9"
364
- }
365
- },
366
- defaultVariants: {
367
- variant: "default",
368
- size: "default"
369
- }
370
- }
371
- );
372
- var Button = React.forwardRef(
373
- ({ className, variant, size, asChild = false, ...props }, ref) => {
374
- const Comp = asChild ? Slot : "button";
375
- return /* @__PURE__ */ jsx(
376
- Comp,
377
- {
378
- className: cn(buttonVariants({ variant, size, className })),
379
- ref,
380
- ...props
381
- }
382
- );
383
- }
384
- );
385
- Button.displayName = "Button";
386
- var Input = React.forwardRef(
387
- ({ className, type, ...props }, ref) => {
388
- return /* @__PURE__ */ jsx(
389
- "input",
390
- {
391
- type,
392
- className: cn(
393
- "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",
394
- className
395
- ),
396
- ref,
397
- ...props
398
- }
399
- );
400
- }
401
- );
402
- Input.displayName = "Input";
403
- var labelVariants = cva(
404
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
405
- );
406
- var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
407
- LabelPrimitive.Root,
408
- {
409
- ref,
410
- className: cn(labelVariants(), className),
411
- ...props
412
- }
413
- ));
414
- Label.displayName = LabelPrimitive.Root.displayName;
415
- var Select = React.forwardRef(({ className, children, ...props }, ref) => {
416
- return /* @__PURE__ */ jsx(
417
- "select",
418
- {
419
- className: cn(
420
- "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",
421
- // Inline SVG chevron: SVG inside a `background-image: url(data:…)`
422
- // does NOT inherit `currentColor` from the host element (the SVG is
423
- // its own document with no parent CSS context), so the stroke is
424
- // hardcoded to a muted slate-400 (#94a3b8). Matches the muted
425
- // foreground token visually in both light and dark themes well
426
- // enough for a passive chevron — addresses #9 review feedback.
427
- `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>")]`,
428
- className
429
- ),
430
- ref,
431
- ...props,
432
- children
433
- }
434
- );
435
- });
436
- Select.displayName = "Select";
437
- var Textarea = React.forwardRef(({ className, ...props }, ref) => {
438
- return /* @__PURE__ */ jsx(
439
- "textarea",
440
- {
441
- className: cn(
442
- "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",
443
- className
444
- ),
445
- ref,
446
- ...props
447
- }
448
- );
449
- });
450
- Textarea.displayName = "Textarea";
451
- var DEFAULT_CONTACT_CATEGORIES = [
452
- { value: "general", label: "General enquiry" },
453
- { value: "sales", label: "Sales" },
454
- { value: "support", label: "Support" },
455
- { value: "partnership", label: "Partnership" },
456
- { value: "press", label: "Press / media" },
457
- { value: "careers", label: "Careers" },
458
- { value: "security", label: "Security disclosure" }
459
- ];
460
- var SUBMIT_CONTACT_INQUIRY_MUTATION = (
461
- /* GraphQL */
462
- `
463
- mutation SubmitContactInquiry($input: SubmitContactInquiryInput!) {
464
- submitContactInquiry(input: $input) {
465
- success
466
- message
467
- }
468
- }
469
- `
470
- );
471
- async function submitContactForm(client, data, productId) {
472
- try {
473
- const result = await client.mutate(SUBMIT_CONTACT_INQUIRY_MUTATION, {
474
- input: {
475
- name: `${data.firstName} ${data.lastName}`,
476
- email: data.email.trim().toLowerCase(),
477
- company: data.company || void 0,
478
- subject: data.subject,
479
- message: data.message,
480
- productId,
481
- // Send `category` only when the user actually picked one. Older
482
- // backend deployments without the `category` field in the
483
- // `SubmitContactInquiryInput` schema would reject any unknown
484
- // field; spreading conditionally keeps the SDK forward-
485
- // compatible.
486
- ...data.category ? { category: data.category } : {},
487
- ...data.recaptchaToken ? { recaptchaToken: data.recaptchaToken } : {}
488
- }
489
- });
490
- if (result.errors?.length) {
491
- const errorMsg = result.errors[0]?.message ?? "Failed to send message";
492
- return { success: false, message: errorMsg };
493
- }
494
- const response = result.data?.submitContactInquiry;
495
- if (response?.success) {
496
- return {
497
- success: true,
498
- message: response.message || "Message sent successfully!"
499
- };
500
- }
501
- return {
502
- success: false,
503
- message: response?.message || "Failed to send message"
504
- };
505
- } catch (error) {
506
- console.error("Contact form submission error:", error);
507
- return {
508
- success: false,
509
- message: "Network error. Please try again."
510
- };
511
- }
512
- }
513
- function replacePlaceholders(text, productName, email) {
514
- return text.replace(/{productName}/g, productName).replace(/{email}/g, email);
515
- }
516
- function ContactPage({
517
- productName,
518
- recaptchaSiteKey,
519
- contactEmail,
520
- contactPhone,
521
- officeAddress,
522
- responseTime = "We typically respond within 24 hours",
523
- heroTitle = "Get in Touch",
524
- 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.",
525
- headingLevel = 1,
526
- // Backward-compatibility: default to `[]` so existing consumers
527
- // (fluidgrids/burdenoff/algoshred websites) that don't pass
528
- // `categories` continue to render with NO dropdown — same behavior
529
- // they had before this SDK version. To opt in, pass an explicit
530
- // `categories={…}` array (or the exported `DEFAULT_CONTACT_CATEGORIES`
531
- // constant for the sane Burdenoff-generic vocabulary).
532
- categories = [],
533
- categoryLabel = "Category",
534
- categoryPlaceholder = "Select a category",
535
- categoryRequired = true,
536
- additionalOptions = [
537
- {
538
- title: "Sales Inquiries",
539
- description: "Ready to see {productName} in action? Our sales team is here to help.",
540
- buttonText: "Contact Sales",
541
- buttonLink: `mailto:${contactEmail}`
542
- },
543
- {
544
- title: "Technical Support",
545
- description: "Need help with your {productName} setup? Our support team is ready.",
546
- buttonText: "Get Support",
547
- buttonLink: `mailto:${contactEmail}`
548
- },
549
- {
550
- title: "Partnership",
551
- description: "Interested in partnering with {productName}? Let's explore opportunities.",
552
- buttonText: "Partner With Us",
553
- buttonLink: `mailto:${contactEmail}`
554
- }
555
- ],
556
- seo
557
- }) {
558
- const client = useWebSDK();
559
- const config = useWebSDKConfig();
560
- const { product } = useProduct();
561
- const resolvedProductId = product?.id || config.productId;
562
- const displayName = productName ?? product?.name ?? config.productId;
563
- const effectiveRecaptchaSiteKey = recaptchaSiteKey ?? product?.recaptchaSiteKey ?? config.recaptchaSiteKey ?? "";
564
- const recaptchaRef = useRef(null);
565
- const recaptchaGate = useDeferredRecaptcha(effectiveRecaptchaSiteKey);
566
- const [isSubmitting, setIsSubmitting] = useState(false);
567
- const [submitStatus, setSubmitStatus] = useState("idle");
568
- const handleSubmit = async (e) => {
569
- e.preventDefault();
570
- const recaptchaToken = recaptchaRef.current?.getValue() ?? "";
571
- if (effectiveRecaptchaSiteKey && !recaptchaToken) {
572
- recaptchaGate.arm();
573
- toast.error("Please complete the reCAPTCHA verification");
574
- return;
575
- }
576
- setIsSubmitting(true);
577
- setSubmitStatus("idle");
578
- const form = e.currentTarget;
579
- try {
580
- const formData = new FormData(form);
581
- const showCategory = categories.length > 0;
582
- const rawCategory = showCategory ? (formData.get("category") ?? "").trim() : "";
583
- if (showCategory && categoryRequired && !rawCategory) {
584
- toast.error("Please select a category");
585
- setIsSubmitting(false);
586
- return;
587
- }
588
- const contactData = {
589
- firstName: formData.get("firstName"),
590
- lastName: formData.get("lastName"),
591
- email: formData.get("email"),
592
- company: formData.get("company"),
593
- category: rawCategory || void 0,
594
- subject: formData.get("subject"),
595
- message: formData.get("message"),
596
- recaptchaToken
597
- };
598
- const result = await submitContactForm(
599
- client,
600
- contactData,
601
- resolvedProductId
602
- );
603
- if (result.success) {
604
- setSubmitStatus("success");
605
- toast.success(
606
- result.message ?? `Thank you for contacting ${displayName}. We'll get back to you within 24 hours.`
607
- );
608
- if (form) {
609
- form.reset();
610
- }
611
- recaptchaRef.current?.reset();
612
- } else {
613
- setSubmitStatus("error");
614
- toast.error(
615
- result.message ?? "Failed to send message. Please try again."
616
- );
617
- recaptchaRef.current?.reset();
618
- }
619
- } catch (error) {
620
- console.error("Error submitting form:", error);
621
- setSubmitStatus("error");
622
- toast.error("Failed to send message. Please try again later.");
623
- recaptchaRef.current?.reset();
624
- } finally {
625
- setIsSubmitting(false);
626
- }
627
- };
628
- const heroDescriptionText = replacePlaceholders(
629
- heroDescription,
630
- displayName,
631
- contactEmail
632
- ).trim();
633
- const hasHero = heroTitle.trim() !== "" || heroDescriptionText !== "";
634
- return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
635
- seo && /* @__PURE__ */ jsx(
636
- PageHead,
637
- {
638
- title: seo.title ?? `Contact ${displayName} - Get in Touch With Our Team`,
639
- 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.`,
640
- productName: displayName,
641
- keywords: seo.keywords ?? `contact ${displayName.toLowerCase()}, sales inquiries, customer support, technical support, partnership opportunities, get in touch`,
642
- image: seo.image ?? "/og-image-contact.png",
643
- url: seo.url
644
- }
645
- ),
646
- hasHero && /* @__PURE__ */ jsx(
647
- "section",
648
- {
649
- 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",
650
- children: /* @__PURE__ */ jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center max-w-3xl mx-auto", children: [
651
- !heroTitle.trim() ? null : headingLevel === 2 ? /* @__PURE__ */ jsx("h2", { className: "text-2xl md:text-3xl font-bold mb-3", children: heroTitle }) : /* @__PURE__ */ jsx("h1", { className: "text-3xl sm:text-4xl md:text-5xl font-bold mb-4 sm:mb-6", children: heroTitle }),
652
- heroDescriptionText && /* @__PURE__ */ jsx("p", { className: "text-lg sm:text-xl text-muted-foreground leading-relaxed", children: heroDescriptionText })
653
- ] }) })
654
- }
655
- ),
656
- /* @__PURE__ */ jsx("section", { className: "py-12 sm:py-16 md:py-20 lg:py-24", children: /* @__PURE__ */ jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs("div", { className: "grid sm:grid-cols-1 lg:grid-cols-3 gap-8 sm:gap-10 lg:gap-12", children: [
657
- /* @__PURE__ */ jsxs("div", { className: "lg:col-span-1 order-2 lg:order-1", children: [
658
- /* @__PURE__ */ jsx("h2", { className: "text-xl sm:text-2xl font-bold mb-4 sm:mb-6", children: "Contact Information" }),
659
- /* @__PURE__ */ jsxs("div", { className: "space-y-4 sm:space-y-6", children: [
660
- /* @__PURE__ */ jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
661
- /* @__PURE__ */ 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__ */ jsx(Mail, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
662
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
663
- /* @__PURE__ */ jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Email" }),
664
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm sm:text-base break-all", children: contactEmail })
665
- ] })
666
- ] }),
667
- contactPhone && /* @__PURE__ */ jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
668
- /* @__PURE__ */ 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__ */ jsx(Phone, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
669
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
670
- /* @__PURE__ */ jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Phone" }),
671
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm sm:text-base", children: contactPhone })
672
- ] })
673
- ] }),
674
- /* @__PURE__ */ jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
675
- /* @__PURE__ */ 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__ */ jsx(MapPin, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
676
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
677
- /* @__PURE__ */ jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Office" }),
678
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm sm:text-base leading-relaxed", children: [
679
- officeAddress.line1,
680
- /* @__PURE__ */ jsx("br", {}),
681
- officeAddress.line2,
682
- /* @__PURE__ */ jsx("br", {}),
683
- officeAddress.line3,
684
- /* @__PURE__ */ jsx("br", {}),
685
- officeAddress.country
686
- ] })
687
- ] })
688
- ] }),
689
- /* @__PURE__ */ jsxs("div", { className: "flex items-start space-x-3 sm:space-x-4", children: [
690
- /* @__PURE__ */ 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__ */ jsx(Clock, { className: "h-4 w-4 sm:h-5 sm:w-5 text-primary" }) }),
691
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
692
- /* @__PURE__ */ jsx("h3", { className: "font-semibold mb-1 text-sm sm:text-base", children: "Response Time" }),
693
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm sm:text-base", children: responseTime })
694
- ] })
695
- ] })
696
- ] })
697
- ] }),
698
- /* @__PURE__ */ jsx("div", { className: "lg:col-span-2 order-1 lg:order-2", children: /* @__PURE__ */ jsxs("div", { className: "bg-card border rounded-lg p-4 sm:p-6 md:p-8", children: [
699
- /* @__PURE__ */ jsx("h2", { className: "text-xl sm:text-2xl font-bold mb-4 sm:mb-6", children: "Send us a Message" }),
700
- /* @__PURE__ */ jsxs(
701
- "form",
702
- {
703
- onSubmit: handleSubmit,
704
- className: "space-y-4 sm:space-y-6",
705
- ...recaptchaGate.formProps,
706
- children: [
707
- /* @__PURE__ */ jsxs("div", { className: "grid sm:grid-cols-2 gap-4 sm:gap-6", children: [
708
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
709
- /* @__PURE__ */ jsx(
710
- Label,
711
- {
712
- htmlFor: "firstName",
713
- className: "text-sm sm:text-base",
714
- children: "First Name *"
715
- }
716
- ),
717
- /* @__PURE__ */ jsx(
718
- Input,
719
- {
720
- id: "firstName",
721
- name: "firstName",
722
- required: true,
723
- placeholder: "John",
724
- className: "text-sm sm:text-base"
725
- }
726
- )
727
- ] }),
728
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
729
- /* @__PURE__ */ jsx(
730
- Label,
731
- {
732
- htmlFor: "lastName",
733
- className: "text-sm sm:text-base",
734
- children: "Last Name *"
735
- }
736
- ),
737
- /* @__PURE__ */ jsx(
738
- Input,
739
- {
740
- id: "lastName",
741
- name: "lastName",
742
- required: true,
743
- placeholder: "Doe",
744
- className: "text-sm sm:text-base"
745
- }
746
- )
747
- ] })
748
- ] }),
749
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
750
- /* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "text-sm sm:text-base", children: "Email *" }),
751
- /* @__PURE__ */ jsx(
752
- Input,
753
- {
754
- id: "email",
755
- name: "email",
756
- type: "email",
757
- required: true,
758
- placeholder: "john@company.com",
759
- className: "text-sm sm:text-base"
760
- }
761
- )
762
- ] }),
763
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
764
- /* @__PURE__ */ jsx(Label, { htmlFor: "company", className: "text-sm sm:text-base", children: "Company" }),
765
- /* @__PURE__ */ jsx(
766
- Input,
767
- {
768
- id: "company",
769
- name: "company",
770
- placeholder: "Acme Inc.",
771
- className: "text-sm sm:text-base"
772
- }
773
- )
774
- ] }),
775
- categories.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
776
- /* @__PURE__ */ jsxs(
777
- Label,
778
- {
779
- htmlFor: "category",
780
- className: "text-sm sm:text-base",
781
- children: [
782
- categoryLabel,
783
- categoryRequired ? " *" : ""
784
- ]
785
- }
786
- ),
787
- /* @__PURE__ */ jsxs(
788
- Select,
789
- {
790
- id: "category",
791
- name: "category",
792
- required: categoryRequired,
793
- defaultValue: "",
794
- className: "text-sm sm:text-base",
795
- children: [
796
- /* @__PURE__ */ jsx("option", { value: "", disabled: categoryRequired, children: categoryPlaceholder }),
797
- categories.map((c) => /* @__PURE__ */ jsx("option", { value: c.value, children: c.label }, c.value))
798
- ]
799
- }
800
- )
801
- ] }),
802
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
803
- /* @__PURE__ */ jsx(Label, { htmlFor: "subject", className: "text-sm sm:text-base", children: "Subject *" }),
804
- /* @__PURE__ */ jsx(
805
- Input,
806
- {
807
- id: "subject",
808
- name: "subject",
809
- required: true,
810
- placeholder: "How can we help you?",
811
- className: "text-sm sm:text-base"
812
- }
813
- )
814
- ] }),
815
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
816
- /* @__PURE__ */ jsx(Label, { htmlFor: "message", className: "text-sm sm:text-base", children: "Message *" }),
817
- /* @__PURE__ */ jsx(
818
- Textarea,
819
- {
820
- id: "message",
821
- name: "message",
822
- required: true,
823
- placeholder: "Tell us more about your needs...",
824
- rows: 5,
825
- className: "text-sm sm:text-base min-h-[120px] sm:min-h-[150px] resize-y"
826
- }
827
- )
828
- ] }),
829
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
830
- effectiveRecaptchaSiteKey && /* @__PURE__ */ jsx(
831
- "div",
832
- {
833
- className: "flex justify-center sm:justify-start",
834
- style: { minHeight: RECAPTCHA_WIDGET_HEIGHT },
835
- children: recaptchaGate.armed && /* @__PURE__ */ jsx(
836
- ReCAPTCHA,
837
- {
838
- ref: recaptchaRef,
839
- sitekey: effectiveRecaptchaSiteKey
840
- }
841
- )
842
- }
843
- ),
844
- /* @__PURE__ */ jsx(
845
- Button,
846
- {
847
- type: "submit",
848
- size: "lg",
849
- disabled: isSubmitting,
850
- className: "w-full sm:w-auto min-w-[200px]",
851
- children: isSubmitting ? "Sending..." : /* @__PURE__ */ jsxs(Fragment, { children: [
852
- "Send Message ",
853
- /* @__PURE__ */ jsx(Send, { className: "ml-2 h-4 w-4" })
854
- ] })
855
- }
856
- )
857
- ] }),
858
- submitStatus === "success" && /* @__PURE__ */ jsxs("div", { className: "p-3 sm:p-4 bg-green-50 border border-green-200 rounded-lg text-green-800 mt-4", children: [
859
- /* @__PURE__ */ jsx("p", { className: "font-medium text-sm sm:text-base", children: "Message sent successfully!" }),
860
- /* @__PURE__ */ jsxs("p", { className: "text-xs sm:text-sm mt-1", children: [
861
- "Thank you for contacting ",
862
- displayName,
863
- ". We'll get back to you within 24 hours."
864
- ] })
865
- ] }),
866
- submitStatus === "error" && /* @__PURE__ */ jsxs("div", { className: "p-3 sm:p-4 bg-red-50 border border-red-200 rounded-lg text-red-800 mt-4", children: [
867
- /* @__PURE__ */ jsx("p", { className: "font-medium text-sm sm:text-base", children: "Failed to send message" }),
868
- /* @__PURE__ */ jsxs("p", { className: "text-xs sm:text-sm mt-1", children: [
869
- "Please try again later or contact us directly at",
870
- " ",
871
- contactEmail
872
- ] })
873
- ] })
874
- ]
875
- }
876
- )
877
- ] }) })
878
- ] }) }) }),
879
- additionalOptions.length > 0 && /* @__PURE__ */ jsx("section", { className: "py-12 sm:py-16 md:py-20 lg:py-24 bg-muted/30", children: /* @__PURE__ */ jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
880
- /* @__PURE__ */ jsx("h2", { className: "text-2xl sm:text-3xl font-bold text-center mb-8 sm:mb-12", children: "More Ways to Connect" }),
881
- /* @__PURE__ */ 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__ */ jsxs(
882
- "div",
883
- {
884
- className: "text-center p-4 sm:p-6 bg-card border rounded-lg",
885
- children: [
886
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-base sm:text-lg mb-2", children: option.title }),
887
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm sm:text-base mb-4 leading-relaxed", children: replacePlaceholders(
888
- option.description,
889
- displayName,
890
- contactEmail
891
- ) }),
892
- /* @__PURE__ */ jsx(
893
- Button,
894
- {
895
- variant: "outline",
896
- asChild: true,
897
- className: "text-sm sm:text-base",
898
- children: /* @__PURE__ */ jsx("a", { href: option.buttonLink, children: option.buttonText })
899
- }
900
- )
901
- ]
902
- },
903
- index
904
- )) })
905
- ] }) })
906
- ] });
907
- }
908
-
909
- export { ContactPage, DEFAULT_CONTACT_CATEGORIES };
1
+ export { ContactPage, DEFAULT_CONTACT_CATEGORIES } from '../chunk-PXRHVVOU.mjs';
2
+ import '../chunk-6IBFBWC5.mjs';
3
+ import '../chunk-VZLDSNH4.mjs';
4
+ import '../chunk-WTVTI5TO.mjs';
5
+ import '../chunk-34RX5P75.mjs';
6
+ import '../chunk-N5EC53MH.mjs';
7
+ import '../chunk-KHYXK7FG.mjs';
8
+ import '../chunk-R7G6TWIS.mjs';
9
+ import '../chunk-GCFLCO2Z.mjs';
10
+ import '../chunk-KZANIV3S.mjs';
11
+ import '../chunk-5JRJ57CL.mjs';
12
+ import '../chunk-VNS5WDWO.mjs';
910
13
  //# sourceMappingURL=contact.mjs.map
911
14
  //# sourceMappingURL=contact.mjs.map