@axcode/axcloud-sdk 0.2.0-dev.1e6c3d5 → 0.2.0-dev.5dc7e06

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,428 +1,13 @@
1
1
  'use strict';
2
2
 
3
+ var chunk2IVJTMRB_js = require('./chunk-2IVJTMRB.js');
4
+ var chunkZOQAXLCZ_js = require('./chunk-ZOQAXLCZ.js');
5
+ var chunk7K5N3DQ4_js = require('./chunk-7K5N3DQ4.js');
3
6
  var react = require('react');
4
7
  var auth0React = require('@auth0/auth0-react');
5
8
  var reactQuery = require('@tanstack/react-query');
6
9
  var jsxRuntime = require('react/jsx-runtime');
7
10
 
8
- // src/core/errors.ts
9
- var AxCloudError = class _AxCloudError extends Error {
10
- constructor(message, code, status, details) {
11
- super(message);
12
- this.name = "AxCloudError";
13
- this.code = code;
14
- this.status = status;
15
- this.details = details;
16
- const ErrorWithCapture = Error;
17
- if (ErrorWithCapture.captureStackTrace) {
18
- ErrorWithCapture.captureStackTrace(this, _AxCloudError);
19
- }
20
- }
21
- static fromResponse(status, body) {
22
- const details = typeof body === "object" ? body : void 0;
23
- const message = (typeof details?.message === "string" ? details.message : void 0) || (typeof details?.error === "string" ? details.error : void 0);
24
- switch (status) {
25
- case 401:
26
- return new _AxCloudError(
27
- message || "Authentication required",
28
- "UNAUTHORIZED",
29
- status,
30
- details
31
- );
32
- case 403:
33
- return new _AxCloudError(message || "Access denied", "FORBIDDEN", status, details);
34
- case 404:
35
- return new _AxCloudError(message || "Resource not found", "NOT_FOUND", status, details);
36
- case 422:
37
- return new _AxCloudError(
38
- message || "Validation failed",
39
- "VALIDATION_ERROR",
40
- status,
41
- details
42
- );
43
- default:
44
- if (status >= 500) {
45
- return new _AxCloudError(message || "Server error", "SERVER_ERROR", status, details);
46
- }
47
- return new _AxCloudError(message || "An error occurred", "UNKNOWN_ERROR", status, details);
48
- }
49
- }
50
- static networkError(originalError) {
51
- const isDev = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
52
- const message = isDev && originalError?.message ? originalError.message : "Network request failed";
53
- return new _AxCloudError(
54
- message,
55
- "NETWORK_ERROR",
56
- 0,
57
- isDev ? { originalError: originalError?.message } : void 0
58
- );
59
- }
60
- static timeoutError(timeoutMs) {
61
- return new _AxCloudError(`Request timed out after ${timeoutMs}ms`, "TIMEOUT_ERROR", 0, {
62
- timeout: timeoutMs
63
- });
64
- }
65
- };
66
- function isAxCloudError(error) {
67
- return error instanceof AxCloudError;
68
- }
69
-
70
- // src/core/client.ts
71
- var AxCloudClient = class {
72
- constructor(config) {
73
- this.baseUrl = config.baseUrl.replace(/\/$/, "");
74
- this.getAccessToken = config.getAccessToken;
75
- this.apiKey = config.apiKey;
76
- this.defaultTimeout = config.timeout ?? 3e4;
77
- }
78
- /**
79
- * Update the access token getter (used when auth state changes)
80
- */
81
- setAccessTokenGetter(getter) {
82
- this.getAccessToken = getter;
83
- }
84
- /**
85
- * Build URL with query parameters
86
- */
87
- buildUrl(path, params) {
88
- const url = new URL(`${this.baseUrl}${path}`);
89
- if (params) {
90
- Object.entries(params).forEach(([key, value]) => {
91
- if (value !== void 0) {
92
- url.searchParams.append(key, String(value));
93
- }
94
- });
95
- }
96
- return url.toString();
97
- }
98
- /**
99
- * API key should only be sent to public endpoints.
100
- * This avoids leaking public keys to authenticated/internal routes.
101
- */
102
- shouldAttachApiKey(path) {
103
- const normalized = path.startsWith("/") ? path : `/${path}`;
104
- return normalized.startsWith("/public/") || normalized.startsWith("/api/public/") || normalized.startsWith("/content/public/") || normalized.startsWith("/media/public/") || normalized.startsWith("/documents/public/") || normalized.startsWith("/barnsport/public/") || normalized.startsWith("/api/barnsport/public/");
105
- }
106
- /**
107
- * Make an authenticated request
108
- */
109
- async request(path, options = {}) {
110
- const { body, params, headers: customHeaders, timeout, ...restOptions } = options;
111
- const headers = {
112
- "Content-Type": "application/json"
113
- };
114
- if (customHeaders) {
115
- const customHeadersRecord = customHeaders;
116
- Object.assign(headers, customHeadersRecord);
117
- }
118
- if (this.apiKey && this.shouldAttachApiKey(path)) {
119
- headers["x-api-key"] = this.apiKey;
120
- }
121
- if (this.getAccessToken) {
122
- try {
123
- const token = await this.getAccessToken();
124
- if (token) {
125
- headers["Authorization"] = `Bearer ${token}`;
126
- }
127
- } catch (error) {
128
- if (typeof process !== "undefined" && process.env?.NODE_ENV === "development") {
129
- console.warn(
130
- "[AxCloud SDK] Failed to fetch access token:",
131
- error instanceof Error ? error.message : error
132
- );
133
- }
134
- }
135
- }
136
- const url = this.buildUrl(path, params);
137
- const controller = new AbortController();
138
- const requestTimeout = timeout ?? this.defaultTimeout;
139
- const timeoutId = setTimeout(() => controller.abort(), requestTimeout);
140
- try {
141
- const response = await fetch(url, {
142
- ...restOptions,
143
- headers,
144
- body: body ? JSON.stringify(body) : void 0,
145
- signal: controller.signal
146
- });
147
- const contentType = response.headers.get("content-type");
148
- const isJson = contentType?.includes("application/json");
149
- if (!response.ok) {
150
- const errorBody = isJson ? await response.json().catch(() => null) : null;
151
- throw AxCloudError.fromResponse(response.status, errorBody);
152
- }
153
- if (response.status === 204) {
154
- return {};
155
- }
156
- return isJson ? await response.json() : {};
157
- } catch (error) {
158
- if (error instanceof AxCloudError) {
159
- throw error;
160
- }
161
- if (error instanceof Error && error.name === "AbortError") {
162
- throw AxCloudError.timeoutError(requestTimeout);
163
- }
164
- throw AxCloudError.networkError(error instanceof Error ? error : void 0);
165
- } finally {
166
- clearTimeout(timeoutId);
167
- }
168
- }
169
- /**
170
- * GET request
171
- */
172
- get(path, params) {
173
- return this.request(path, { method: "GET", params });
174
- }
175
- /**
176
- * POST request
177
- */
178
- post(path, body) {
179
- return this.request(path, { method: "POST", body });
180
- }
181
- /**
182
- * PUT request
183
- */
184
- put(path, body) {
185
- return this.request(path, { method: "PUT", body });
186
- }
187
- /**
188
- * PATCH request
189
- */
190
- patch(path, body) {
191
- return this.request(path, { method: "PATCH", body });
192
- }
193
- /**
194
- * DELETE request
195
- */
196
- delete(path) {
197
- return this.request(path, { method: "DELETE" });
198
- }
199
- };
200
- var clientRegistry = /* @__PURE__ */ new WeakMap();
201
- function createClient(config, key) {
202
- const client = new AxCloudClient(config);
203
- if (key) {
204
- clientRegistry.set(key, client);
205
- }
206
- return client;
207
- }
208
- function getClient(key) {
209
- if (key) {
210
- const client = clientRegistry.get(key);
211
- if (client) {
212
- return client;
213
- }
214
- }
215
- throw new Error("AxCloud client not found. Make sure AxCloudProvider is mounted and use useAxCloudContext() to get the client.");
216
- }
217
-
218
- // src/core/analytics.ts
219
- var EVENT_NAME_PATTERN = /^[a-z][a-z0-9_]{1,63}$/;
220
- var PROPERTY_KEY_PATTERN = /^[a-z][a-z0-9_]{0,47}$/;
221
- var SENSITIVE_PROPERTY_PATTERN = /(^|_)(auth0|email|name|password|query|search|secret|token|trace|user|userid)($|_)/;
222
- var EMAIL_VALUE_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
223
- var OPAQUE_SEGMENT_PATTERNS = [
224
- /^[0-9a-f]{8}-[0-9a-f-]{27,}$/i,
225
- /^(org|user|section|document|content|poll|invitation|invite|trace|chan)[_-][a-z0-9_-]+$/i,
226
- /^[a-f0-9]{20,}$/i,
227
- /^[a-z0-9_-]{32,}$/i
228
- ];
229
- var scriptLoads = /* @__PURE__ */ new Map();
230
- function isLocalAnalyticsHostname(hostname) {
231
- return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1";
232
- }
233
- function sanitizeAnalyticsPath(pathname, customNormalizer) {
234
- const rawPath = pathname.split(/[?#]/, 1)[0] || "/";
235
- const normalizedInput = rawPath.startsWith("/") ? rawPath : `/${rawPath}`;
236
- const custom = customNormalizer?.(normalizedInput);
237
- if (custom === null) return null;
238
- const path = custom ?? normalizedInput;
239
- const cleanPath = path.split(/[?#]/, 1)[0] || "/";
240
- const segments = cleanPath.split("/").map((segment) => {
241
- if (!segment) return segment;
242
- let decoded = segment;
243
- try {
244
- decoded = decodeURIComponent(segment);
245
- } catch {
246
- }
247
- return OPAQUE_SEGMENT_PATTERNS.some((pattern) => pattern.test(decoded)) ? ":id" : segment;
248
- });
249
- return segments.join("/") || "/";
250
- }
251
- function sanitizeAnalyticsEventData(data) {
252
- if (!data) return void 0;
253
- const sanitized = {};
254
- for (const [rawKey, rawValue] of Object.entries(data).slice(0, 20)) {
255
- const key = rawKey.trim().toLowerCase();
256
- if (!PROPERTY_KEY_PATTERN.test(key) || SENSITIVE_PROPERTY_PATTERN.test(key)) continue;
257
- if (typeof rawValue === "string") {
258
- const value = rawValue.trim();
259
- if (!value || value.length > 100 || EMAIL_VALUE_PATTERN.test(value)) continue;
260
- sanitized[key] = value;
261
- continue;
262
- }
263
- if (typeof rawValue === "number" && Number.isFinite(rawValue)) {
264
- sanitized[key] = rawValue;
265
- continue;
266
- }
267
- if (typeof rawValue === "boolean") sanitized[key] = rawValue;
268
- }
269
- return Object.keys(sanitized).length > 0 ? sanitized : void 0;
270
- }
271
- function isAllowedAnalyticsEvent(eventName, allowedEvents) {
272
- return EVENT_NAME_PATTERN.test(eventName) && Boolean(allowedEvents?.includes(eventName));
273
- }
274
- async function fetchAnalyticsPublicConfig(input) {
275
- const baseUrl = input.apiUrl.replace(/\/$/, "");
276
- const url = new URL(`${baseUrl}/analytics/public/config`);
277
- url.searchParams.set("orgId", input.orgId);
278
- url.searchParams.set("siteKey", input.siteKey);
279
- url.searchParams.set("stage", input.stage);
280
- url.searchParams.set("hostname", input.hostname);
281
- const response = await fetch(url, {
282
- method: "GET",
283
- headers: { Accept: "application/json" },
284
- signal: input.signal
285
- });
286
- if (!response.ok) throw new Error(`Analytics configuration returned ${response.status}`);
287
- return response.json();
288
- }
289
- function loadAnalyticsScript(config, doc = document) {
290
- if (!config.enabled || !config.websiteId || !config.scriptUrl) {
291
- return Promise.reject(new Error("Analytics tracker configuration is incomplete"));
292
- }
293
- const key = `${config.scriptUrl}|${config.websiteId}`;
294
- const existingPromise = scriptLoads.get(key);
295
- if (existingPromise) return existingPromise;
296
- const existing = doc.querySelector(
297
- `script[data-axcloud-analytics-site="${config.websiteId}"]`
298
- );
299
- if (existing && doc.defaultView?.umami) {
300
- return Promise.resolve();
301
- }
302
- const promise = new Promise((resolve, reject) => {
303
- const script = existing || doc.createElement("script");
304
- const onLoad = () => resolve();
305
- const onError = () => reject(new Error("Analytics tracker failed to load"));
306
- script.addEventListener("load", onLoad, { once: true });
307
- script.addEventListener("error", onError, { once: true });
308
- if (!existing) {
309
- script.src = config.scriptUrl;
310
- script.defer = true;
311
- script.dataset.websiteId = config.websiteId;
312
- script.dataset.axcloudAnalyticsSite = config.websiteId;
313
- script.dataset.autoTrack = String(config.autoTrack === true);
314
- if (config.hostUrl) script.dataset.hostUrl = config.hostUrl;
315
- if (config.domains?.length) script.dataset.domains = config.domains.join(",");
316
- if (config.respectDoNotTrack !== false) script.dataset.doNotTrack = "true";
317
- if (config.excludeSearch !== false) script.dataset.excludeSearch = "true";
318
- if (config.excludeHash !== false) script.dataset.excludeHash = "true";
319
- doc.head.appendChild(script);
320
- }
321
- }).catch((error) => {
322
- scriptLoads.delete(key);
323
- throw error;
324
- });
325
- scriptLoads.set(key, promise);
326
- return promise;
327
- }
328
- function sendAnalyticsPageView(pathname, options, targetWindow = window) {
329
- const path = sanitizeAnalyticsPath(pathname, options.normalizePath);
330
- const umami = targetWindow.umami;
331
- if (!path || !umami) return false;
332
- umami.track({ url: path, title: targetWindow.document.title });
333
- return true;
334
- }
335
- function sendAnalyticsEvent(eventName, data, allowedEvents, targetWindow = window) {
336
- const umami = targetWindow.umami;
337
- if (!umami || !isAllowedAnalyticsEvent(eventName, allowedEvents)) return false;
338
- umami.track(eventName, sanitizeAnalyticsEventData(data));
339
- return true;
340
- }
341
-
342
- // src/core/contentSlots.ts
343
- var SLOT_ATTRIBUTE_KEYS = ["slot", "field", "key", "name"];
344
- function getContentSlotMap(content) {
345
- const fields = isRecord(content?.fields) ? { ...content?.fields } : {};
346
- for (const block of content?.blocks || []) {
347
- const slot = getBlockSlot(block);
348
- if (!slot) continue;
349
- if (!(slot in fields)) fields[slot] = blockToSlotValue(block);
350
- }
351
- return fields;
352
- }
353
- function createContentSlotReader(content) {
354
- const fields = getContentSlotMap(content);
355
- const value = (key, fallback) => {
356
- return key in fields ? fields[key] : fallback;
357
- };
358
- const unsafeHtml = (key, fallback = "") => stringifySlotValue(value(key, fallback));
359
- return {
360
- fields,
361
- value,
362
- text: (key, fallback = "") => stringifySlotValue(value(key, fallback)),
363
- html: unsafeHtml,
364
- unsafeHtml,
365
- list: (key, fallback = []) => slotValueToList(value(key, fallback)),
366
- image: (key, fallback) => slotValueToImage(value(key, fallback))
367
- };
368
- }
369
- function getBlockSlot(block) {
370
- const attributes = block.attributes || {};
371
- for (const key of SLOT_ATTRIBUTE_KEYS) {
372
- const value = attributes[key];
373
- if (typeof value === "string" && value.trim()) return value.trim();
374
- }
375
- return void 0;
376
- }
377
- function blockToSlotValue(block) {
378
- if (block.attributes && "value" in block.attributes) {
379
- return block.attributes.value;
380
- }
381
- if (block.type === "list") {
382
- return Array.isArray(block.items) ? block.items : [];
383
- }
384
- if (block.type === "image" && block.url) {
385
- return {
386
- url: block.url,
387
- alt: block.alt,
388
- caption: block.caption
389
- };
390
- }
391
- return block.content ?? "";
392
- }
393
- function stringifySlotValue(value) {
394
- if (value === void 0 || value === null) return "";
395
- if (typeof value === "string") return value;
396
- if (typeof value === "number" || typeof value === "boolean") return String(value);
397
- if (Array.isArray(value)) return value.map((item) => stringifySlotValue(item)).filter(Boolean).join("\n");
398
- return "";
399
- }
400
- function slotValueToList(value) {
401
- if (Array.isArray(value)) {
402
- return value.map((item) => stringifySlotValue(item)).filter(Boolean);
403
- }
404
- if (typeof value === "string") {
405
- return value.split(/\r?\n/).map((item) => item.trim()).filter(Boolean);
406
- }
407
- return [];
408
- }
409
- function slotValueToImage(value) {
410
- if (isRecord(value) && typeof value.url === "string") {
411
- return {
412
- url: value.url,
413
- alt: typeof value.alt === "string" ? value.alt : void 0,
414
- caption: typeof value.caption === "string" ? value.caption : void 0
415
- };
416
- }
417
- if (typeof value === "string" && value) {
418
- return { url: value };
419
- }
420
- return void 0;
421
- }
422
- function isRecord(value) {
423
- return !!value && typeof value === "object" && !Array.isArray(value);
424
- }
425
-
426
11
  // src/core/types.ts
427
12
  function userHasPermission(user, permission) {
428
13
  if (user.permissions && user.permissions.length > 0) {
@@ -628,135 +213,6 @@ async function castVote(votingApiUrl, params) {
628
213
  await ensureOk(response);
629
214
  return readJson(response);
630
215
  }
631
- var AxCloudContext = react.createContext(null);
632
- function useAxCloudContext() {
633
- const context = react.useContext(AxCloudContext);
634
- if (!context) {
635
- throw new Error("useAxCloudContext must be used within a AxCloudProvider");
636
- }
637
- return context;
638
- }
639
- var NAVIGATION_EVENT = "axcloud-sdk:navigation";
640
- var historySubscriberCount = 0;
641
- var originalPushState = null;
642
- var originalReplaceState = null;
643
- function subscribeToNavigation(callback) {
644
- if (typeof window === "undefined") return () => void 0;
645
- if (historySubscriberCount === 0) {
646
- originalPushState = window.history.pushState.bind(window.history);
647
- originalReplaceState = window.history.replaceState.bind(window.history);
648
- window.history.pushState = ((...args) => {
649
- originalPushState?.(...args);
650
- window.dispatchEvent(new Event(NAVIGATION_EVENT));
651
- });
652
- window.history.replaceState = ((...args) => {
653
- originalReplaceState?.(...args);
654
- window.dispatchEvent(new Event(NAVIGATION_EVENT));
655
- });
656
- }
657
- historySubscriberCount += 1;
658
- window.addEventListener("popstate", callback);
659
- window.addEventListener(NAVIGATION_EVENT, callback);
660
- return () => {
661
- window.removeEventListener("popstate", callback);
662
- window.removeEventListener(NAVIGATION_EVENT, callback);
663
- historySubscriberCount = Math.max(0, historySubscriberCount - 1);
664
- if (historySubscriberCount === 0) {
665
- if (originalPushState) window.history.pushState = originalPushState;
666
- if (originalReplaceState) window.history.replaceState = originalReplaceState;
667
- originalPushState = null;
668
- originalReplaceState = null;
669
- }
670
- };
671
- }
672
- function doNotTrackEnabled(config) {
673
- if (config.respectDoNotTrack === false || typeof navigator === "undefined") return false;
674
- return navigator.doNotTrack === "1";
675
- }
676
- function useAnalyticsRuntime(config) {
677
- const [enabled, setEnabled] = react.useState(false);
678
- const [ready, setReady] = react.useState(false);
679
- const publicConfigRef = react.useRef(null);
680
- const optionsRef = react.useRef(config.analytics);
681
- optionsRef.current = config.analytics;
682
- const trackPageView = react.useCallback(
683
- (pathname) => {
684
- if (!ready || !optionsRef.current || typeof window === "undefined") return false;
685
- return sendAnalyticsPageView(pathname || window.location.pathname, optionsRef.current);
686
- },
687
- [ready]
688
- );
689
- const track = react.useCallback(
690
- (eventName, data) => {
691
- if (!ready || typeof window === "undefined") return false;
692
- return sendAnalyticsEvent(eventName, data, publicConfigRef.current?.allowedEvents);
693
- },
694
- [ready]
695
- );
696
- react.useEffect(() => {
697
- const options = config.analytics;
698
- setEnabled(false);
699
- setReady(false);
700
- publicConfigRef.current = null;
701
- if (!options?.enabled || !options.siteKey || typeof window === "undefined") return void 0;
702
- if (isLocalAnalyticsHostname(window.location.hostname) && !options.trackLocalhost)
703
- return void 0;
704
- const controller = new AbortController();
705
- let cancelled = false;
706
- let unsubscribe = () => void 0;
707
- const initialize = async () => {
708
- try {
709
- const publicConfig = await fetchAnalyticsPublicConfig({
710
- apiUrl: config.apiUrl,
711
- orgId: config.orgId,
712
- siteKey: options.siteKey,
713
- stage: config.stage,
714
- hostname: window.location.hostname,
715
- signal: controller.signal
716
- });
717
- if (cancelled || !publicConfig.enabled || doNotTrackEnabled(publicConfig)) return;
718
- publicConfigRef.current = publicConfig;
719
- setEnabled(true);
720
- await loadAnalyticsScript(publicConfig);
721
- if (cancelled) return;
722
- setReady(true);
723
- if (!publicConfig.autoTrack) {
724
- const trackCurrentPage = () => {
725
- sendAnalyticsPageView(window.location.pathname, options);
726
- };
727
- trackCurrentPage();
728
- unsubscribe = subscribeToNavigation(trackCurrentPage);
729
- }
730
- } catch (error) {
731
- if (!cancelled && !(error instanceof Error && error.name === "AbortError")) {
732
- setEnabled(false);
733
- setReady(false);
734
- }
735
- }
736
- };
737
- void initialize();
738
- return () => {
739
- cancelled = true;
740
- controller.abort();
741
- unsubscribe();
742
- };
743
- }, [
744
- config.analytics?.enabled,
745
- config.analytics?.siteKey,
746
- config.analytics?.trackLocalhost,
747
- config.analytics?.normalizePath,
748
- config.apiUrl,
749
- config.orgId,
750
- config.stage
751
- ]);
752
- return react.useMemo(
753
- () => ({ enabled, ready, track, trackPageView }),
754
- [enabled, ready, track, trackPageView]
755
- );
756
- }
757
- function useAnalytics() {
758
- return useAxCloudContext().analytics;
759
- }
760
216
 
761
217
  // src/react/auth/auth0Invitation.ts
762
218
  var AUTH0_INVITATION_PATTERN = /^[A-Za-z0-9_-]{1,2048}$/;
@@ -777,7 +233,7 @@ function createDefaultQueryClient() {
777
233
  staleTime: 1e3 * 60,
778
234
  gcTime: 1e3 * 60 * 30,
779
235
  retry: (failureCount, error) => {
780
- if (isAxCloudError(error) && error.status >= 400 && error.status < 500) {
236
+ if (chunk7K5N3DQ4_js.isAxCloudError(error) && error.status >= 400 && error.status < 500) {
781
237
  return false;
782
238
  }
783
239
  return failureCount < 2;
@@ -810,7 +266,7 @@ function AxCloudInnerProvider({
810
266
  timeout
811
267
  }) {
812
268
  const { getAccessTokenSilently, isAuthenticated, isLoading, user } = auth0React.useAuth0();
813
- const analytics = useAnalyticsRuntime(config);
269
+ const analytics = chunk2IVJTMRB_js.useAnalyticsRuntime(config);
814
270
  const [, setOwnerGeneration] = react.useState(0);
815
271
  const currentSubject = isLoading ? void 0 : isAuthenticated ? user?.sub : null;
816
272
  const currentOwnerSignature = currentSubject === void 0 ? void 0 : createQueryClientOwnerSignature(config, currentSubject);
@@ -834,7 +290,7 @@ function AxCloudInnerProvider({
834
290
  }
835
291
  } : async () => void 0;
836
292
  const client = react.useMemo(() => {
837
- return new AxCloudClient({
293
+ return new chunk7K5N3DQ4_js.AxCloudClient({
838
294
  baseUrl: config.apiUrl,
839
295
  apiKey: config.apiKey,
840
296
  timeout,
@@ -864,7 +320,7 @@ function AxCloudInnerProvider({
864
320
  [config, client, isAuthenticated, isLoading, user?.sub, clearContentCache, analytics]
865
321
  );
866
322
  const identityReady = currentOwnerSignature !== void 0 && !ownerNeedsActivation;
867
- return /* @__PURE__ */ jsxRuntime.jsx(AxCloudContext.Provider, { value: contextValue, children: identityReady ? children : null });
323
+ return /* @__PURE__ */ jsxRuntime.jsx(chunk7K5N3DQ4_js.AxCloudContext.Provider, { value: contextValue, children: identityReady ? children : null });
868
324
  }
869
325
  function AxCloudProvider({
870
326
  children,
@@ -907,7 +363,7 @@ function AxCloudProvider({
907
363
  ) });
908
364
  }
909
365
  function useAuth() {
910
- const { config, client, clearContentCache } = useAxCloudContext();
366
+ const { config, client, clearContentCache } = chunk7K5N3DQ4_js.useAxCloudContext();
911
367
  const {
912
368
  isAuthenticated,
913
369
  isLoading,
@@ -988,7 +444,7 @@ function useAuth() {
988
444
  ...data.retry_after_seconds !== void 0 ? { retryAfterSeconds: data.retry_after_seconds } : {}
989
445
  };
990
446
  } catch (requestError) {
991
- if (isAxCloudError(requestError) && requestError.status === 429) {
447
+ if (chunk7K5N3DQ4_js.isAxCloudError(requestError) && requestError.status === 429) {
992
448
  const responseDetails = requestError.details?.details;
993
449
  const retryAfterSeconds = Number(
994
450
  responseDetails && typeof responseDetails === "object" ? responseDetails.retry_after_seconds : void 0
@@ -1236,7 +692,7 @@ function normalizeCurrentUserResponse(raw, configuredOrgId) {
1236
692
  }
1237
693
  function useUser() {
1238
694
  const { isAuthenticated, isLoading: isAuthLoading, user: auth0User } = auth0React.useAuth0();
1239
- const { client, stage, orgId } = useAxCloudContext();
695
+ const { client, stage, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1240
696
  const queryKey = currentUserQueryKey(stage, orgId, auth0User?.sub);
1241
697
  const query = reactQuery.useQuery({
1242
698
  queryKey,
@@ -1284,7 +740,7 @@ function useUser() {
1284
740
  };
1285
741
  }
1286
742
  function useUpdateMyProfile() {
1287
- const { client, stage } = useAxCloudContext();
743
+ const { client, stage } = chunk7K5N3DQ4_js.useAxCloudContext();
1288
744
  const queryClient = reactQuery.useQueryClient();
1289
745
  return reactQuery.useMutation({
1290
746
  mutationFn: (updates) => client.patch("/api/users/me/profile", updates),
@@ -1297,7 +753,7 @@ function useUpdateMyProfile() {
1297
753
  });
1298
754
  }
1299
755
  function useOrg() {
1300
- const { client, orgId, stage, isPublicMode } = useAxCloudContext();
756
+ const { client, orgId, stage, isPublicMode } = chunk7K5N3DQ4_js.useAxCloudContext();
1301
757
  const usePublicEndpoint = isPublicMode;
1302
758
  const query = reactQuery.useQuery({
1303
759
  queryKey: ["axcloud", "organization", orgId, stage, usePublicEndpoint],
@@ -1343,184 +799,14 @@ function useOrg() {
1343
799
  };
1344
800
  }
1345
801
 
1346
- // src/react/contentQueryPolicy.ts
1347
- var CONTENT_STALE_TIME_MS = 6e4;
1348
- function shouldRetryContentRequest(failureCount, error) {
1349
- if (isAxCloudError(error) && error.status >= 400 && error.status < 500) {
1350
- return false;
1351
- }
1352
- return failureCount < 2;
1353
- }
1354
- function normalizeContentCollectionType(contentType) {
1355
- switch (contentType.toLowerCase()) {
1356
- case "news":
1357
- return "news";
1358
- case "page":
1359
- case "pages":
1360
- return "pages";
1361
- case "event":
1362
- case "events":
1363
- return "events";
1364
- default:
1365
- throw new Error(`Unsupported AxCloud content collection type: ${contentType}`);
1366
- }
1367
- }
1368
- function normalizeContentDetailType(contentType) {
1369
- switch (contentType.toLowerCase()) {
1370
- case "news":
1371
- return "news";
1372
- case "page":
1373
- case "pages":
1374
- return "page";
1375
- case "event":
1376
- case "events":
1377
- return "event";
1378
- default:
1379
- throw new Error(`Unsupported AxCloud content detail type: ${contentType}`);
1380
- }
1381
- }
1382
- function getContentAccessState(context, publicOnly) {
1383
- if (publicOnly) {
1384
- return { mode: "public", enabled: true, subject: "anonymous" };
1385
- }
1386
- const isLoading = context.isAuthLoading ?? false;
1387
- if (isLoading) {
1388
- return { mode: "pending", enabled: false, subject: "auth-loading" };
1389
- }
1390
- const hasExplicitAuthState = typeof context.isAuthenticated === "boolean";
1391
- const isAuthenticated = context.isAuthenticated ?? !context.isPublicMode;
1392
- if (!isAuthenticated) {
1393
- return { mode: "public", enabled: true, subject: "anonymous" };
1394
- }
1395
- if (hasExplicitAuthState && !context.authSubject) {
1396
- return { mode: "pending", enabled: false, subject: "auth-subject-pending" };
1397
- }
1398
- const subject = context.authSubject || "legacy-authenticated-session";
1399
- return { mode: "member", enabled: Boolean(subject), subject };
1400
- }
1401
-
1402
- // src/react/hooks/useContent.ts
1403
- function useContent(contentType, options = {}) {
1404
- const context = useAxCloudContext();
1405
- const { client, config, orgId, stage } = context;
1406
- const collectionType = normalizeContentCollectionType(contentType);
1407
- const {
1408
- publicOnly = false,
1409
- page = 1,
1410
- pageSize = 20,
1411
- search,
1412
- sortBy = collectionType === "news" ? "publishedAt" : "createdAt",
1413
- sortOrder = "desc",
1414
- tags,
1415
- lang
1416
- } = options;
1417
- const access = getContentAccessState(context, publicOnly);
1418
- const deliveryScope = access.mode === "member" ? "members" : "public";
1419
- const params = {
1420
- page,
1421
- pageSize,
1422
- search,
1423
- sort: sortBy,
1424
- order: sortOrder,
1425
- tags: tags?.length ? tags.join(",") : void 0,
1426
- lang
1427
- };
1428
- const query = reactQuery.useQuery({
1429
- queryKey: [
1430
- "axcloud",
1431
- "content",
1432
- "collection",
1433
- stage,
1434
- config.apiUrl,
1435
- orgId,
1436
- access.mode,
1437
- access.subject,
1438
- collectionType,
1439
- params
1440
- ],
1441
- queryFn: () => client.get(
1442
- `/content/${deliveryScope}/${orgId}/${collectionType}`,
1443
- params
1444
- ),
1445
- enabled: access.enabled,
1446
- staleTime: CONTENT_STALE_TIME_MS,
1447
- refetchOnWindowFocus: true,
1448
- retry: shouldRetryContentRequest
1449
- });
1450
- const items = query.data?.items ?? [];
1451
- return {
1452
- data: items,
1453
- count: query.data?.count ?? items.length,
1454
- total: query.data?.total ?? items.length,
1455
- page: query.data?.page ?? page,
1456
- pageSize: query.data?.pageSize ?? pageSize,
1457
- hasMore: query.data?.hasMore ?? false,
1458
- nextCursor: query.data?.nextCursor,
1459
- isLoading: access.mode === "pending" || query.isLoading,
1460
- isFetching: query.isFetching,
1461
- isError: query.isError,
1462
- error: query.error,
1463
- refetch: query.refetch
1464
- };
1465
- }
1466
- function useContentItem(contentType, idOrSlug, options = {}) {
1467
- const context = useAxCloudContext();
1468
- const { client, config, orgId, stage } = context;
1469
- const detailType = normalizeContentDetailType(contentType);
1470
- const { publicOnly = false, lang } = options;
1471
- const access = getContentAccessState(context, publicOnly);
1472
- const deliveryScope = access.mode === "member" ? "members" : "public";
1473
- const query = reactQuery.useQuery({
1474
- queryKey: [
1475
- "axcloud",
1476
- "content",
1477
- "item",
1478
- stage,
1479
- config.apiUrl,
1480
- orgId,
1481
- access.mode,
1482
- access.subject,
1483
- detailType,
1484
- idOrSlug,
1485
- lang
1486
- ],
1487
- queryFn: () => {
1488
- const encodedIdOrSlug = encodeURIComponent(idOrSlug);
1489
- const endpoint = `/content/${deliveryScope}/${orgId}/items/${detailType}/${encodedIdOrSlug}`;
1490
- return lang ? client.get(endpoint, { lang }) : client.get(endpoint);
1491
- },
1492
- enabled: access.enabled && Boolean(idOrSlug),
1493
- staleTime: CONTENT_STALE_TIME_MS,
1494
- refetchOnWindowFocus: true,
1495
- retry: shouldRetryContentRequest
1496
- });
1497
- return {
1498
- data: query.data ?? null,
1499
- isLoading: access.mode === "pending" || query.isLoading,
1500
- isFetching: query.isFetching,
1501
- isError: query.isError,
1502
- error: query.error,
1503
- refetch: query.refetch
1504
- };
1505
- }
1506
- function usePageContent(slug, options = {}) {
1507
- const state = useContentItem("page", slug, options);
1508
- const reader = react.useMemo(() => createContentSlotReader(state.data), [state.data]);
1509
- return {
1510
- ...state,
1511
- page: state.data,
1512
- ...reader
1513
- };
1514
- }
1515
-
1516
802
  // src/react/hooks/useNews.ts
1517
803
  function useNews(options = {}) {
1518
- return useContent("news", options);
804
+ return chunk2IVJTMRB_js.useContent("news", options);
1519
805
  }
1520
806
  function useMySection(options = {}) {
1521
807
  const { includeMembers = true } = options;
1522
808
  const { isAuthenticated } = auth0React.useAuth0();
1523
- const { client, orgId, stage } = useAxCloudContext();
809
+ const { client, orgId, stage } = chunk7K5N3DQ4_js.useAxCloudContext();
1524
810
  const { user, sectionId, isLoading: isUserLoading } = useUser();
1525
811
  const query = reactQuery.useQuery({
1526
812
  queryKey: ["axcloud", "mySection", orgId, sectionId, includeMembers, stage],
@@ -1554,7 +840,7 @@ function useMySection(options = {}) {
1554
840
  };
1555
841
  }
1556
842
  function useSections() {
1557
- const { client, orgId, stage } = useAxCloudContext();
843
+ const { client, orgId, stage } = chunk7K5N3DQ4_js.useAxCloudContext();
1558
844
  const query = reactQuery.useQuery({
1559
845
  queryKey: ["axcloud", "sections", orgId, stage],
1560
846
  queryFn: async () => {
@@ -1573,7 +859,7 @@ function useSections() {
1573
859
  };
1574
860
  }
1575
861
  function useForms(options = {}) {
1576
- const { client, stage } = useAxCloudContext();
862
+ const { client, stage } = chunk7K5N3DQ4_js.useAxCloudContext();
1577
863
  const { formType, status, limit = 50, cursor } = options;
1578
864
  const query = reactQuery.useQuery({
1579
865
  queryKey: ["axcloud", "forms", "submissions", stage, formType, status, limit, cursor],
@@ -1599,7 +885,7 @@ function useForms(options = {}) {
1599
885
  };
1600
886
  }
1601
887
  function useFormStats(options = {}) {
1602
- const { client, stage } = useAxCloudContext();
888
+ const { client, stage } = chunk7K5N3DQ4_js.useAxCloudContext();
1603
889
  const { days = 30 } = options;
1604
890
  const query = reactQuery.useQuery({
1605
891
  queryKey: ["axcloud", "forms", "stats", stage, days],
@@ -1620,7 +906,7 @@ function useFormStats(options = {}) {
1620
906
  };
1621
907
  }
1622
908
  function useUpdateFormSubmission() {
1623
- const { client, stage } = useAxCloudContext();
909
+ const { client, stage } = chunk7K5N3DQ4_js.useAxCloudContext();
1624
910
  const queryClient = reactQuery.useQueryClient();
1625
911
  return reactQuery.useMutation({
1626
912
  mutationFn: async ({
@@ -1636,7 +922,7 @@ function useUpdateFormSubmission() {
1636
922
  });
1637
923
  }
1638
924
  function useCodeBallot({ pollId, votingApiUrl }) {
1639
- const { orgId, config } = useAxCloudContext();
925
+ const { orgId, config } = chunk7K5N3DQ4_js.useAxCloudContext();
1640
926
  const baseUrl = votingApiUrl || `${config.apiUrl.replace(/\/$/, "")}/voting`;
1641
927
  const [stage, setStage] = react.useState("enter_code");
1642
928
  const [code, setCode] = react.useState("");
@@ -1707,7 +993,7 @@ function useCodeBallot({ pollId, votingApiUrl }) {
1707
993
  }
1708
994
  var LINKED_ACCOUNTS_QUERY_KEY = ["axcloud", "linked-accounts"];
1709
995
  function useLinkedAccounts() {
1710
- const { client, stage } = useAxCloudContext();
996
+ const { client, stage } = chunk7K5N3DQ4_js.useAxCloudContext();
1711
997
  const { isAuthenticated } = useAuth();
1712
998
  const queryClient = reactQuery.useQueryClient();
1713
999
  const query = reactQuery.useQuery({
@@ -1758,7 +1044,7 @@ function useLinkedAccounts() {
1758
1044
  };
1759
1045
  }
1760
1046
  function useBranding() {
1761
- const { client, orgId } = useAxCloudContext();
1047
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1762
1048
  const query = reactQuery.useQuery({
1763
1049
  queryKey: ["axcloud", "media", "branding", orgId],
1764
1050
  queryFn: async () => {
@@ -1780,7 +1066,7 @@ function useBranding() {
1780
1066
  };
1781
1067
  }
1782
1068
  function useLogo() {
1783
- const { client, orgId } = useAxCloudContext();
1069
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1784
1070
  const query = reactQuery.useQuery({
1785
1071
  queryKey: ["axcloud", "media", "logo", orgId],
1786
1072
  queryFn: async () => {
@@ -1801,7 +1087,7 @@ function useLogo() {
1801
1087
  };
1802
1088
  }
1803
1089
  function useAvatar(userId) {
1804
- const { client, orgId } = useAxCloudContext();
1090
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1805
1091
  const query = reactQuery.useQuery({
1806
1092
  queryKey: ["axcloud", "media", "avatar", orgId, userId],
1807
1093
  queryFn: async () => {
@@ -1822,7 +1108,7 @@ function useAvatar(userId) {
1822
1108
  };
1823
1109
  }
1824
1110
  function useMediaList(type = "media", limit = 50) {
1825
- const { client, orgId } = useAxCloudContext();
1111
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1826
1112
  const query = reactQuery.useQuery({
1827
1113
  queryKey: ["axcloud", "media", "list", orgId, type, limit],
1828
1114
  queryFn: async () => {
@@ -1844,7 +1130,7 @@ function useMediaList(type = "media", limit = 50) {
1844
1130
  };
1845
1131
  }
1846
1132
  function useMedia(mediaId) {
1847
- const { client, orgId } = useAxCloudContext();
1133
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1848
1134
  const query = reactQuery.useQuery({
1849
1135
  queryKey: ["axcloud", "media", "file", orgId, mediaId],
1850
1136
  queryFn: async () => {
@@ -1871,7 +1157,7 @@ function buildDocumentParams(options) {
1871
1157
  };
1872
1158
  }
1873
1159
  function useDocuments(options) {
1874
- const { client, orgId } = useAxCloudContext();
1160
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1875
1161
  const params = buildDocumentParams(options);
1876
1162
  const query = reactQuery.useQuery({
1877
1163
  queryKey: ["axcloud", "documents", "list", orgId, options],
@@ -1891,7 +1177,7 @@ function useDocuments(options) {
1891
1177
  };
1892
1178
  }
1893
1179
  function useDocumentDownload(documentId) {
1894
- const { client, orgId } = useAxCloudContext();
1180
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1895
1181
  const query = reactQuery.useQuery({
1896
1182
  queryKey: ["axcloud", "documents", "download", orgId, documentId],
1897
1183
  queryFn: async () => {
@@ -1916,7 +1202,7 @@ function useDocumentDownload(documentId) {
1916
1202
  };
1917
1203
  }
1918
1204
  function useMemberDocuments(options) {
1919
- const { client, orgId } = useAxCloudContext();
1205
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1920
1206
  const params = buildDocumentParams(options);
1921
1207
  const folderId = options?.folderId;
1922
1208
  const query = reactQuery.useQuery({
@@ -1939,7 +1225,7 @@ function useMemberDocuments(options) {
1939
1225
  };
1940
1226
  }
1941
1227
  function useMemberDocumentFolders() {
1942
- const { client, orgId } = useAxCloudContext();
1228
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1943
1229
  const query = reactQuery.useQuery({
1944
1230
  queryKey: ["axcloud", "documents", "member", "folders", orgId],
1945
1231
  queryFn: async () => {
@@ -1958,7 +1244,7 @@ function useMemberDocumentFolders() {
1958
1244
  };
1959
1245
  }
1960
1246
  function useMemberDocumentDownload(documentId) {
1961
- const { client, orgId } = useAxCloudContext();
1247
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
1962
1248
  const query = reactQuery.useQuery({
1963
1249
  queryKey: ["axcloud", "documents", "member", "download", orgId, documentId],
1964
1250
  queryFn: async () => {
@@ -1982,126 +1268,6 @@ function useMemberDocumentDownload(documentId) {
1982
1268
  refetch: query.refetch
1983
1269
  };
1984
1270
  }
1985
- function useBarnsportMunicipalities() {
1986
- const { client, orgId } = useAxCloudContext();
1987
- const query = reactQuery.useQuery({
1988
- queryKey: ["axcloud", "barnsport", "municipalities", orgId],
1989
- queryFn: () => client.get(
1990
- `/barnsport/public/${orgId}/municipalities`
1991
- ),
1992
- staleTime: 1e3 * 60 * 30
1993
- });
1994
- return {
1995
- municipalities: query.data?.items ?? [],
1996
- count: query.data?.count ?? 0,
1997
- isLoading: query.isLoading,
1998
- isError: query.isError,
1999
- error: query.error,
2000
- refetch: query.refetch
2001
- };
2002
- }
2003
- function useBarnsportSports() {
2004
- const { client, orgId } = useAxCloudContext();
2005
- const query = reactQuery.useQuery({
2006
- queryKey: ["axcloud", "barnsport", "sports", orgId],
2007
- queryFn: () => client.get(
2008
- `/barnsport/public/${orgId}/sports`
2009
- ),
2010
- staleTime: 1e3 * 60 * 30
2011
- });
2012
- return {
2013
- sports: query.data?.items ?? [],
2014
- count: query.data?.count ?? 0,
2015
- isLoading: query.isLoading,
2016
- isError: query.isError,
2017
- error: query.error,
2018
- refetch: query.refetch
2019
- };
2020
- }
2021
- function useBarnsportSport(slug) {
2022
- const { client, orgId } = useAxCloudContext();
2023
- const query = reactQuery.useQuery({
2024
- queryKey: ["axcloud", "barnsport", "sport", orgId, slug],
2025
- queryFn: () => client.get(
2026
- `/barnsport/public/${orgId}/sports/${slug || ""}`
2027
- ),
2028
- enabled: Boolean(slug),
2029
- staleTime: 1e3 * 60 * 15
2030
- });
2031
- return {
2032
- sport: query.data?.sport ?? null,
2033
- isLoading: query.isLoading,
2034
- isError: query.isError,
2035
- error: query.error,
2036
- refetch: query.refetch
2037
- };
2038
- }
2039
- function useBarnsportActivities(filters = {}) {
2040
- const { client, orgId } = useAxCloudContext();
2041
- const params = { ...filters };
2042
- const query = reactQuery.useQuery({
2043
- queryKey: ["axcloud", "barnsport", "activities", orgId, filters],
2044
- queryFn: () => client.get(
2045
- `/barnsport/public/${orgId}/activities`,
2046
- params
2047
- ),
2048
- staleTime: 1e3 * 60 * 5
2049
- });
2050
- return {
2051
- activities: query.data?.items ?? [],
2052
- count: query.data?.count ?? 0,
2053
- nextCursor: query.data?.nextCursor ?? null,
2054
- isLoading: query.isLoading,
2055
- isError: query.isError,
2056
- error: query.error,
2057
- refetch: query.refetch
2058
- };
2059
- }
2060
- function useBarnsportActivity(slug) {
2061
- const { client, orgId } = useAxCloudContext();
2062
- const query = reactQuery.useQuery({
2063
- queryKey: ["axcloud", "barnsport", "activity", orgId, slug],
2064
- queryFn: () => client.get(
2065
- `/barnsport/public/${orgId}/activities/${slug || ""}`
2066
- ),
2067
- enabled: Boolean(slug),
2068
- staleTime: 1e3 * 60 * 5
2069
- });
2070
- return {
2071
- activity: query.data?.activity ?? null,
2072
- isLoading: query.isLoading,
2073
- isError: query.isError,
2074
- error: query.error,
2075
- refetch: query.refetch
2076
- };
2077
- }
2078
- function useBarnsportSitemap(baseUrl) {
2079
- const { client, orgId } = useAxCloudContext();
2080
- const query = reactQuery.useQuery({
2081
- queryKey: ["axcloud", "barnsport", "sitemap", orgId, baseUrl],
2082
- queryFn: () => client.get(`/barnsport/public/${orgId}/sitemap`, {
2083
- baseUrl
2084
- }),
2085
- staleTime: 1e3 * 60 * 15
2086
- });
2087
- return {
2088
- sitemap: query.data ?? null,
2089
- urls: query.data?.urls ?? [],
2090
- isLoading: query.isLoading,
2091
- isError: query.isError,
2092
- error: query.error,
2093
- refetch: query.refetch
2094
- };
2095
- }
2096
- function useSubmitBarnsportInterest() {
2097
- const { client, orgId } = useAxCloudContext();
2098
- return reactQuery.useMutation({
2099
- mutationFn: (submission) => client.post(
2100
- `/barnsport/public/${orgId}/interest`,
2101
- submission
2102
- )
2103
- });
2104
- }
2105
1271
  function LoginButton({
2106
1272
  children = "Log in",
2107
1273
  returnTo,
@@ -2345,8 +1511,106 @@ function LinkedAccountsList({
2345
1511
  ] });
2346
1512
  }
2347
1513
 
2348
- exports.AxCloudClient = AxCloudClient;
2349
- exports.AxCloudError = AxCloudError;
1514
+ Object.defineProperty(exports, "createContentSlotReader", {
1515
+ enumerable: true,
1516
+ get: function () { return chunk2IVJTMRB_js.createContentSlotReader; }
1517
+ });
1518
+ Object.defineProperty(exports, "fetchAnalyticsPublicConfig", {
1519
+ enumerable: true,
1520
+ get: function () { return chunk2IVJTMRB_js.fetchAnalyticsPublicConfig; }
1521
+ });
1522
+ Object.defineProperty(exports, "getContentSlotMap", {
1523
+ enumerable: true,
1524
+ get: function () { return chunk2IVJTMRB_js.getContentSlotMap; }
1525
+ });
1526
+ Object.defineProperty(exports, "isAllowedAnalyticsEvent", {
1527
+ enumerable: true,
1528
+ get: function () { return chunk2IVJTMRB_js.isAllowedAnalyticsEvent; }
1529
+ });
1530
+ Object.defineProperty(exports, "isLocalAnalyticsHostname", {
1531
+ enumerable: true,
1532
+ get: function () { return chunk2IVJTMRB_js.isLocalAnalyticsHostname; }
1533
+ });
1534
+ Object.defineProperty(exports, "sanitizeAnalyticsEventData", {
1535
+ enumerable: true,
1536
+ get: function () { return chunk2IVJTMRB_js.sanitizeAnalyticsEventData; }
1537
+ });
1538
+ Object.defineProperty(exports, "sanitizeAnalyticsPath", {
1539
+ enumerable: true,
1540
+ get: function () { return chunk2IVJTMRB_js.sanitizeAnalyticsPath; }
1541
+ });
1542
+ Object.defineProperty(exports, "useAnalytics", {
1543
+ enumerable: true,
1544
+ get: function () { return chunk2IVJTMRB_js.useAnalytics; }
1545
+ });
1546
+ Object.defineProperty(exports, "useAnalyticsRuntime", {
1547
+ enumerable: true,
1548
+ get: function () { return chunk2IVJTMRB_js.useAnalyticsRuntime; }
1549
+ });
1550
+ Object.defineProperty(exports, "useContent", {
1551
+ enumerable: true,
1552
+ get: function () { return chunk2IVJTMRB_js.useContent; }
1553
+ });
1554
+ Object.defineProperty(exports, "useContentItem", {
1555
+ enumerable: true,
1556
+ get: function () { return chunk2IVJTMRB_js.useContentItem; }
1557
+ });
1558
+ Object.defineProperty(exports, "usePageContent", {
1559
+ enumerable: true,
1560
+ get: function () { return chunk2IVJTMRB_js.usePageContent; }
1561
+ });
1562
+ Object.defineProperty(exports, "useBarnsportActivities", {
1563
+ enumerable: true,
1564
+ get: function () { return chunkZOQAXLCZ_js.useBarnsportActivities; }
1565
+ });
1566
+ Object.defineProperty(exports, "useBarnsportActivity", {
1567
+ enumerable: true,
1568
+ get: function () { return chunkZOQAXLCZ_js.useBarnsportActivity; }
1569
+ });
1570
+ Object.defineProperty(exports, "useBarnsportMunicipalities", {
1571
+ enumerable: true,
1572
+ get: function () { return chunkZOQAXLCZ_js.useBarnsportMunicipalities; }
1573
+ });
1574
+ Object.defineProperty(exports, "useBarnsportSitemap", {
1575
+ enumerable: true,
1576
+ get: function () { return chunkZOQAXLCZ_js.useBarnsportSitemap; }
1577
+ });
1578
+ Object.defineProperty(exports, "useBarnsportSport", {
1579
+ enumerable: true,
1580
+ get: function () { return chunkZOQAXLCZ_js.useBarnsportSport; }
1581
+ });
1582
+ Object.defineProperty(exports, "useBarnsportSports", {
1583
+ enumerable: true,
1584
+ get: function () { return chunkZOQAXLCZ_js.useBarnsportSports; }
1585
+ });
1586
+ Object.defineProperty(exports, "useSubmitBarnsportInterest", {
1587
+ enumerable: true,
1588
+ get: function () { return chunkZOQAXLCZ_js.useSubmitBarnsportInterest; }
1589
+ });
1590
+ Object.defineProperty(exports, "AxCloudClient", {
1591
+ enumerable: true,
1592
+ get: function () { return chunk7K5N3DQ4_js.AxCloudClient; }
1593
+ });
1594
+ Object.defineProperty(exports, "AxCloudError", {
1595
+ enumerable: true,
1596
+ get: function () { return chunk7K5N3DQ4_js.AxCloudError; }
1597
+ });
1598
+ Object.defineProperty(exports, "createClient", {
1599
+ enumerable: true,
1600
+ get: function () { return chunk7K5N3DQ4_js.createClient; }
1601
+ });
1602
+ Object.defineProperty(exports, "getClient", {
1603
+ enumerable: true,
1604
+ get: function () { return chunk7K5N3DQ4_js.getClient; }
1605
+ });
1606
+ Object.defineProperty(exports, "isAxCloudError", {
1607
+ enumerable: true,
1608
+ get: function () { return chunk7K5N3DQ4_js.isAxCloudError; }
1609
+ });
1610
+ Object.defineProperty(exports, "useAxCloudContext", {
1611
+ enumerable: true,
1612
+ get: function () { return chunk7K5N3DQ4_js.useAxCloudContext; }
1613
+ });
2350
1614
  exports.AxCloudProvider = AxCloudProvider;
2351
1615
  exports.LinkedAccountsList = LinkedAccountsList;
2352
1616
  exports.LoginButton = LoginButton;
@@ -2357,35 +1621,14 @@ exports.castVote = castVote;
2357
1621
  exports.castVoteWithCode = castVoteWithCode;
2358
1622
  exports.checkEligibility = checkEligibility;
2359
1623
  exports.checkVotingCode = checkVotingCode;
2360
- exports.createClient = createClient;
2361
- exports.createContentSlotReader = createContentSlotReader;
2362
1624
  exports.createFormHelper = createFormHelper;
2363
- exports.fetchAnalyticsPublicConfig = fetchAnalyticsPublicConfig;
2364
1625
  exports.getBallot = getBallot;
2365
- exports.getClient = getClient;
2366
- exports.getContentSlotMap = getContentSlotMap;
2367
1626
  exports.getVotingReceipt = getVotingReceipt;
2368
- exports.isAllowedAnalyticsEvent = isAllowedAnalyticsEvent;
2369
- exports.isAxCloudError = isAxCloudError;
2370
- exports.isLocalAnalyticsHostname = isLocalAnalyticsHostname;
2371
- exports.sanitizeAnalyticsEventData = sanitizeAnalyticsEventData;
2372
- exports.sanitizeAnalyticsPath = sanitizeAnalyticsPath;
2373
1627
  exports.submitForm = submitForm;
2374
- exports.useAnalytics = useAnalytics;
2375
- exports.useAnalyticsRuntime = useAnalyticsRuntime;
2376
1628
  exports.useAuth = useAuth;
2377
1629
  exports.useAvatar = useAvatar;
2378
- exports.useAxCloudContext = useAxCloudContext;
2379
- exports.useBarnsportActivities = useBarnsportActivities;
2380
- exports.useBarnsportActivity = useBarnsportActivity;
2381
- exports.useBarnsportMunicipalities = useBarnsportMunicipalities;
2382
- exports.useBarnsportSitemap = useBarnsportSitemap;
2383
- exports.useBarnsportSport = useBarnsportSport;
2384
- exports.useBarnsportSports = useBarnsportSports;
2385
1630
  exports.useBranding = useBranding;
2386
1631
  exports.useCodeBallot = useCodeBallot;
2387
- exports.useContent = useContent;
2388
- exports.useContentItem = useContentItem;
2389
1632
  exports.useDocumentDownload = useDocumentDownload;
2390
1633
  exports.useDocuments = useDocuments;
2391
1634
  exports.useFormStats = useFormStats;
@@ -2401,9 +1644,7 @@ exports.useModuleAccess = useModuleAccess;
2401
1644
  exports.useMySection = useMySection;
2402
1645
  exports.useNews = useNews;
2403
1646
  exports.useOrg = useOrg;
2404
- exports.usePageContent = usePageContent;
2405
1647
  exports.useSections = useSections;
2406
- exports.useSubmitBarnsportInterest = useSubmitBarnsportInterest;
2407
1648
  exports.useUpdateFormSubmission = useUpdateFormSubmission;
2408
1649
  exports.useUpdateMyProfile = useUpdateMyProfile;
2409
1650
  exports.useUser = useUser;