UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

25 lines (24 loc) 560 B
import r from "../managers/braze-instance.js"; import dr from "./dust-provider-factory.js"; export function subscribeToDust() { const t = r.l(), n = r.nn(); if (!t || !n) return null; const o = dr.o(), s = () => { if (!o.Et()) { o.cn(); const r = n.rn(() => { t.fn() && o.mn(); }); return r && o.Lt(r), o.un() && o.an(), r; } return o.Et(); }; return ( t.Tr(() => { r.ao() && (t.fn() ? (o.mn(), s()) : (o.hn(), o.un() && o.en())); }), t.fn() ? s() : null ); }