144await this.ensureScriptLoaded();
let t = this.createWebComponent();
e.innerHTML = "", e.appendChild(t), this.state.container = e, this.state.element = t, this.state.initialized = !0;
} catch (e) {
throw console.error("Failed to render widget:", e),
LowAi Review Evidence
Rendering triggers loading the widget script from environment-specific Zerohash CDN URLs.
dist/index.jsView on unpkg · L144 253OCAL_CDN_HOST || "http://localhost:5173",
dev: "https://sdk-cdn.dev.0hash.com",
cert: "https://sdk-cdn.cert.zerohash.com",
prod: "https://sdk-cdn.zerohash.com",
"eu-cert": "https://sdk-cdn.cert.zerohash.eu",
"eu-prod": "https://sdk-cdn.zerohash.eu"
}, m = "https://sdk-cdn.gating.0hash.com", h = (e, t, n = {}) => {
let { eu: r = !1, legacyAliases: i = !1, local: a = p.local } = n, o = (n) => `${n}/${e}/${t}`, s = {
local: o(a),
dev: o(p.dev),
gating: o(m),
cert: o(p.cert),
LowAi Review Evidence
Rendering triggers loading the widget script from environment-specific Zerohash CDN URLs.
dist/index.jsView on unpkg · L253 1var e = {
dev: "https://grafana-faro-collector.dev.0hash.com/collect",
cert: "https://grafana-faro-collector.cert.zerohash.com/collect",
prod: "https://grafana-faro-collector.zerohash.com/collect",
"eu-cert": "https://grafana-faro-collector.cert.zerohash.eu/collect",
"eu-prod": "https://grafana-faro-collector.zerohash.eu/collect",
sandbox: "https://grafana-faro-collector.cert.zerohash.com/collect",
production: "https://grafana-faro-collect
LowAi Review Evidence
If script loading fails, the runtime sends a diagnostic report to an environment-specific Zerohash collector; the report includes app and environment context, selected JWT claims, browser user agent, and page origin.
dist/index.jsView on unpkg · L1 34return {};
}
}, i = (e, t, r) => e[n(t, r)] ?? e[t] ?? e.prod, a = (e, t, r) => e[n(t, r)] ?? e[t], o = () => void 0, s = () => {
let e = /* @__PURE__ */ new Uint8Array(8);
return globalThis.crypto.getRandomValues(e), Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("");
}, c = (e, t) => {
let n = s(), r = globalThis.__ZH_WEB_SDK_VERSION__, i = {};
return e.claims.participantCode && (i.participant_code = e.claims.participantCode), e.claims.platformName && (i.platform_name = e.claims.platformName), e.claims.platformCode && (i.platform_code = e.claims.platformCode), e.claims.reg
LowAi Review Evidence
If script loading fails, the runtime sends a diagnostic report to an environment-specific Zerohash collector; the report includes app and environment context, selected JWT claims, browser user agent, and page origin.
dist/index.jsView on unpkg · L34 54navigator.userAgent } : void 0,
page: typeof window < "u" ? { url: window.location.origin } : void 0
},
logs: [{
message: `Failed to load the script for ${e.webComponentTag} from ${e.env} environment.`,
level: "error",
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
context: {
LowAi Review Evidence
If script loading fails, the runtime sends a diagnostic report to an environment-specific Zerohash collector; the report includes app and environment context, selected JWT claims, browser user agent, and page origin.
dist/index.jsView on unpkg · L54 73let { sessionId: r, payload: i } = c(t, n);
try {
fetch(e, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-faro-session-id": r
},
body: JSON.stringify(i),
keepalive: !0
}).catch(() => void 0);
} catch {}
}, u = (e) => {
let { webComponentTag: t, appName: n, appVersion: s, scriptUrls: c, fallbackScriptUrls: u, collectorUrls: d, env: f, jwt: p, timeoutMs: m = 15e3, onLoad: h, onError: g } = e;
if (typeof document > "
LowAi Review Evidence
If script loading fails, the runtime sends a diagnostic report to an environment-specific Zerohash collector; the report includes app and environment context, selected JWT claims, browser user agent, and page origin.
dist/index.jsView on unpkg · L73