@machinemetrics/mm-react-embeddable 2.0.0-2 → 2.0.0-3

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.
@@ -1,7 +1,7 @@
1
- import E, { createContext as ce, useContext as Z, useState as M, useRef as R, useCallback as g, useEffect as w, useMemo as le } from "react";
2
- import U from "prop-types";
3
- import K from "styled-components";
4
- const Y = ce(null), J = ce({
1
+ import z, { createContext as oe, useContext as v, useState as C, useRef as R, useCallback as h, useEffect as k, useMemo as ue } from "react";
2
+ import T from "prop-types";
3
+ import te from "styled-components";
4
+ const X = oe(null), V = oe({
5
5
  pending: [],
6
6
  authorize: () => {
7
7
  },
@@ -14,69 +14,74 @@ const Y = ce(null), J = ce({
14
14
  originEpochs: {},
15
15
  credentials: {},
16
16
  unsupported: {}
17
- }), de = "access_token", re = (r) => r ? r.kind ? r : r.accessToken ? {
18
- kind: de,
17
+ }), le = "access_token", re = (r) => r ? r.kind ? r : r.accessToken ? {
18
+ kind: le,
19
19
  accessToken: r.accessToken,
20
20
  expiresAt: r.expiresAt || null
21
- } : null : null, fe = /* @__PURE__ */ new Set(["host_not_allowed", "invalid_token", "provider_unavailable"]), X = typeof window != "undefined" && window.location.protocol === "https:", pe = 8e3, Q = (r) => {
21
+ } : null : null, ae = /* @__PURE__ */ new Set([
22
+ "host_not_allowed",
23
+ "unbound_host_bound_guest",
24
+ "invalid_token",
25
+ "provider_unavailable"
26
+ ]), Q = typeof window != "undefined" && window.location.protocol === "https:", de = 8e3, J = (r) => {
22
27
  try {
23
28
  return new URL(r).origin;
24
29
  } catch {
25
30
  return null;
26
31
  }
27
- }, ne = (r, o) => {
28
- const c = o == null ? void 0 : o.origin;
29
- return !c || Q(r == null ? void 0 : r.authUrl) !== c ? null : c;
30
- }, oe = (r) => {
32
+ }, ne = (r, i) => {
33
+ const u = i == null ? void 0 : i.origin;
34
+ return !u || J(r == null ? void 0 : r.authUrl) !== u ? null : u;
35
+ }, se = (r) => {
31
36
  if (!r || /^\d{1,3}(?:\.\d{1,3}){3}$/.test(r) || r.includes(":"))
32
37
  return r;
33
- const o = r.split(".");
34
- return o.length <= 2 ? r : o.slice(-2).join(".");
35
- }, me = (r, o) => {
38
+ const i = r.split(".");
39
+ return i.length <= 2 ? r : i.slice(-2).join(".");
40
+ }, fe = (r, i) => {
36
41
  try {
37
- const c = new URL(r), a = new URL(o);
38
- return c.protocol !== a.protocol ? !0 : oe(c.hostname) !== oe(a.hostname);
42
+ const u = new URL(r), d = new URL(i);
43
+ return u.protocol !== d.protocol ? !0 : se(u.hostname) !== se(d.hostname);
39
44
  } catch {
40
45
  return !0;
41
46
  }
42
- }, he = (r, { onBlocked: o, onClosed: c }) => {
43
- const a = window.open(
47
+ }, pe = (r, { onBlocked: i, onClosed: u }) => {
48
+ const d = window.open(
44
49
  r.authUrl,
45
50
  "mm-embed-auth",
46
51
  "popup,width=600,height=700"
47
52
  );
48
- if (!a)
49
- return o(), () => {
53
+ if (!d)
54
+ return i(), () => {
50
55
  };
51
56
  const p = setInterval(() => {
52
- a.closed && (clearInterval(p), c());
57
+ d.closed && (clearInterval(p), u());
53
58
  }, 1e3);
54
59
  return () => clearInterval(p);
55
- }, ue = ({ children: r, launcher: o, broker: c }) => {
56
- const a = Z(Y), [p, m] = M({}), [L, T] = M({}), [y, d] = M({}), [I, C] = M({}), v = R(y);
57
- v.current = y;
60
+ }, ie = ({ children: r, launcher: i, broker: u }) => {
61
+ const d = v(X), [p, m] = C({}), [j, I] = C({}), [L, O] = C({}), [P, S] = C({}), Z = R(L);
62
+ Z.current = L;
58
63
  const b = R(p);
59
64
  b.current = p;
60
- const $ = R(null), G = R({}), O = R({}), j = R({}), P = R(c);
61
- P.current = c;
62
- const A = g((e) => {
63
- const t = O.current[e];
65
+ const x = R(null), K = R({}), _ = R({}), q = R({}), F = R(u);
66
+ F.current = u;
67
+ const U = h((e) => {
68
+ const t = _.current[e];
64
69
  if (!t)
65
70
  return;
66
- const n = (i) => !i[e] || i[e].clientId ? i : { ...i, [e]: { ...i[e], clientId: t } };
67
- m(n), C(n);
68
- }, []), u = g(
71
+ const n = (o) => !o[e] || o[e].clientId ? o : { ...o, [e]: { ...o[e], clientId: t } };
72
+ m(n), S(n);
73
+ }, []), c = h(
69
74
  (e, t) => {
70
- e && (C((n) => n[e] ? n : {
75
+ e && (S((n) => n[e] ? n : {
71
76
  ...n,
72
- [e]: { origin: e, reason: t, clientId: O.current[e] || null }
73
- }), A(e));
77
+ [e]: { origin: e, reason: t, clientId: _.current[e] || null }
78
+ }), U(e));
74
79
  },
75
- [A]
76
- ), l = g(
80
+ [U]
81
+ ), l = h(
77
82
  (e, { v2: t = !1, origin: n = null } = {}) => {
78
- n && (t && v.current[n] || (m((i) => i[n] ? i : {
79
- ...i,
83
+ n && (t && Z.current[n] || (m((o) => o[n] ? o : {
84
+ ...o,
80
85
  [n]: {
81
86
  origin: n,
82
87
  authUrl: e.authUrl,
@@ -84,61 +89,61 @@ const Y = ce(null), J = ce({
84
89
  // v2 entries try the invisible silent resolver first — but only on a host that can
85
90
  // frame login (https). Otherwise (and for legacy signals) go straight to interactive,
86
91
  // so an http host doesn't wait out a silent frame that can never load login.
87
- status: t && P.current ? "broker" : t && e.silentUrl && X ? "silent" : "interactive",
92
+ status: t && F.current ? "broker" : t && e.silentUrl && Q ? "silent" : "interactive",
88
93
  v2: t,
89
94
  // v1.9: the scope the guest asked for; forwarded verbatim to the broker.
90
95
  scope: e.scope || null,
91
- acceptsCredentials: j.current[n] || null,
96
+ acceptsCredentials: q.current[n] || null,
92
97
  consent: null,
93
98
  error: null,
94
99
  // clientId from the request payload (v2) or the cached init (legacy);
95
100
  // the host resolves the display name from it.
96
- clientId: e.clientId || O.current[n] || null,
101
+ clientId: e.clientId || _.current[n] || null,
97
102
  popupBlocked: !1
98
103
  }
99
- }), A(n)));
104
+ }), U(n)));
100
105
  },
101
- [A]
102
- ), s = g((e) => {
106
+ [U]
107
+ ), s = h((e) => {
103
108
  m((t) => {
104
109
  if (!t[e])
105
110
  return t;
106
111
  const n = { ...t };
107
112
  return delete n[e], n;
108
113
  });
109
- }, []), f = g(
114
+ }, []), a = h(
110
115
  (e) => {
111
- e && (s(e), T((t) => ({
116
+ e && (s(e), I((t) => ({
112
117
  ...t,
113
118
  [e]: (t[e] || 0) + 1
114
119
  })));
115
120
  },
116
121
  [s]
117
- ), x = g((e) => {
122
+ ), E = h((e) => {
118
123
  m((t) => !t[e] || t[e].status === "interactive" ? t : {
119
124
  ...t,
120
125
  [e]: { ...t[e], status: "interactive" }
121
126
  });
122
- }, []), z = g(
127
+ }, []), w = h(
123
128
  (e) => {
124
129
  s(e.origin);
125
130
  },
126
131
  [s]
127
- ), S = g(
132
+ ), $ = h(
128
133
  (e, t) => {
129
134
  const n = ne(e, t);
130
135
  if (n) {
131
- if (me(n, window.location.origin)) {
132
- u(n, "cross-site-legacy");
136
+ if (fe(n, window.location.origin)) {
137
+ c(n, "cross-site-legacy");
133
138
  return;
134
139
  }
135
140
  l(e, { origin: n });
136
141
  }
137
142
  },
138
- [l, u]
143
+ [l, c]
139
144
  );
140
- w(() => {
141
- if (!a)
145
+ k(() => {
146
+ if (!d)
142
147
  return;
143
148
  const e = [
144
149
  // `init` carries the app's OAuth clientId. Cache it by the ATTESTED app
@@ -147,132 +152,132 @@ const Y = ce(null), J = ce({
147
152
  // signals, so it is usually cached by the time an entry is created. The
148
153
  // clientId is only a lookup key: the host resolves the display name from
149
154
  // it, and a broker binds it to the attested origin server-side.
150
- a.addListener("*", "init", (t, n) => {
151
- n != null && n.origin && (t != null && t.clientId) && (O.current[n.origin] = t.clientId, A(n.origin)), n != null && n.origin && Array.isArray(t == null ? void 0 : t.acceptsCredentials) && (j.current[n.origin] = t.acceptsCredentials);
155
+ d.addListener("*", "init", (t, n) => {
156
+ n != null && n.origin && (t != null && t.clientId) && (_.current[n.origin] = t.clientId, U(n.origin)), n != null && n.origin && Array.isArray(t == null ? void 0 : t.acceptsCredentials) && (q.current[n.origin] = t.acceptsCredentials);
152
157
  }),
153
- a.addListener("*", "authorize", S),
154
- a.addListener("*", "login", S),
155
- a.addListener(
158
+ d.addListener("*", "authorize", $),
159
+ d.addListener("*", "login", $),
160
+ d.addListener(
156
161
  "*",
157
162
  "credential-request",
158
163
  (t, n) => l(t, { v2: !0, origin: ne(t, n) })
159
164
  )
160
165
  ];
161
166
  return () => e.forEach((t) => t());
162
- }, [a, S, l, A]), w(() => {
167
+ }, [d, $, l, U]), k(() => {
163
168
  const e = (t) => {
164
169
  const n = t == null ? void 0 : t.data;
165
170
  if (!n || n.type !== "authorized" && n.type !== "authorize-failed")
166
171
  return;
167
- const i = Q(n.authUrl);
168
- if (!(!i || t.origin !== i)) {
172
+ const o = J(n.authUrl);
173
+ if (!(!o || t.origin !== o)) {
169
174
  if (n.type === "authorized") {
170
175
  if (n.accessToken) {
171
- if (!b.current[i])
176
+ if (!b.current[o])
172
177
  return;
173
- d((h) => ({
174
- ...h,
175
- [i]: re({ accessToken: n.accessToken })
176
- })), s(i);
178
+ O((f) => ({
179
+ ...f,
180
+ [o]: re({ accessToken: n.accessToken })
181
+ })), s(o);
177
182
  } else
178
- f(i);
183
+ a(o);
179
184
  return;
180
185
  }
181
- x(i);
186
+ E(o);
182
187
  }
183
188
  };
184
189
  return window.addEventListener("message", e), () => window.removeEventListener("message", e);
185
- }, [s, f, x]);
186
- const _ = g(
190
+ }, [s, a, E]);
191
+ const M = h(
187
192
  (e, t) => {
188
- const n = e == null ? void 0 : e.origin, i = re(t);
189
- !n || !i || (d((h) => ({ ...h, [n]: i })), s(n));
193
+ const n = e == null ? void 0 : e.origin, o = re(t);
194
+ !n || !o || (O((f) => ({ ...f, [n]: o })), s(n));
190
195
  },
191
196
  [s]
192
- ), k = g((e, t) => {
197
+ ), g = h((e, t) => {
193
198
  m((n) => n[e] ? { ...n, [e]: { ...n[e], ...t } } : n);
194
- }, []), F = g(
199
+ }, []), A = h(
195
200
  async (e, { approve: t } = {}) => {
196
- const n = P.current, { origin: i } = e;
197
- let h;
201
+ const n = F.current, { origin: o } = e;
202
+ let f;
198
203
  try {
199
- h = await n(
200
- { origin: i, clientId: e.clientId, scope: e.scope, authUrl: e.authUrl },
204
+ f = await n(
205
+ { origin: o, clientId: e.clientId, scope: e.scope, authUrl: e.authUrl },
201
206
  { approve: t }
202
207
  );
203
208
  } catch {
204
- t ? k(i, { error: { reason: "broker_unavailable" } }) : k(i, {
205
- status: e.silentUrl && X ? "silent" : "interactive"
209
+ t ? g(o, { error: { reason: "broker_unavailable" } }) : g(o, {
210
+ status: e.silentUrl && Q ? "silent" : "interactive"
206
211
  });
207
212
  return;
208
213
  }
209
- if ((h == null ? void 0 : h.status) === 200 && h.credential) {
210
- _(e, h.credential);
214
+ if ((f == null ? void 0 : f.status) === 200 && f.credential) {
215
+ M(e, f.credential);
211
216
  return;
212
217
  }
213
- if ((h == null ? void 0 : h.status) === 409 && h.consentRequired) {
214
- k(i, {
218
+ if ((f == null ? void 0 : f.status) === 409 && f.consentRequired) {
219
+ g(o, {
215
220
  status: "interactive",
216
221
  consent: {
217
- client: h.client || null,
218
- stepUp: !!h.stepUp,
219
- scope: h.scope || e.scope
222
+ client: f.client || null,
223
+ stepUp: !!f.stepUp,
224
+ scope: f.scope || e.scope
220
225
  },
221
226
  error: null
222
227
  });
223
228
  return;
224
229
  }
225
- const N = (h == null ? void 0 : h.error) || "broker_error";
226
- if (!t && fe.has(N)) {
227
- k(i, {
228
- status: e.silentUrl && X ? "silent" : "interactive"
230
+ const Y = (f == null ? void 0 : f.error) || "broker_error";
231
+ if (!t && ae.has(Y)) {
232
+ g(o, {
233
+ status: e.silentUrl && Q ? "silent" : "interactive"
229
234
  });
230
235
  return;
231
236
  }
232
- if (t && N === "consent_denied") {
233
- k(i, { error: null });
237
+ if (t && Y === "consent_denied") {
238
+ g(o, { error: null });
234
239
  return;
235
240
  }
236
- s(i), C((te) => ({
237
- ...te,
238
- [i]: {
239
- origin: i,
240
- reason: `broker:${N}`,
241
- detail: h || null,
242
- clientId: e.clientId || O.current[i] || null
241
+ s(o), S((ee) => ({
242
+ ...ee,
243
+ [o]: {
244
+ origin: o,
245
+ reason: `broker:${Y}`,
246
+ detail: f || null,
247
+ clientId: e.clientId || _.current[o] || null
243
248
  }
244
249
  }));
245
250
  },
246
- [_, k, s]
247
- ), q = R({});
248
- w(() => {
251
+ [M, g, s]
252
+ ), B = R({});
253
+ k(() => {
249
254
  Object.values(p).forEach((e) => {
250
- e.status !== "broker" || q.current[e.origin] || (q.current[e.origin] = !0, F(e).finally(() => {
251
- delete q.current[e.origin];
255
+ e.status !== "broker" || B.current[e.origin] || (B.current[e.origin] = !0, A(e).finally(() => {
256
+ delete B.current[e.origin];
252
257
  }));
253
258
  });
254
- }, [p, F]);
255
- const B = g(
256
- (e) => !P.current || !(e != null && e.consent) ? Promise.resolve() : F(e, { approve: !0 }),
257
- [F]
259
+ }, [p, A]);
260
+ const y = h(
261
+ (e) => !F.current || !(e != null && e.consent) ? Promise.resolve() : A(e, { approve: !0 }),
262
+ [A]
258
263
  );
259
- w(() => {
260
- const e = G.current;
264
+ k(() => {
265
+ const e = K.current;
261
266
  Object.values(p).forEach((t) => {
262
267
  t.status === "silent" && !e[t.origin] && (e[t.origin] = setTimeout(() => {
263
- delete e[t.origin], x(t.origin);
264
- }, pe));
268
+ delete e[t.origin], E(t.origin);
269
+ }, de));
265
270
  }), Object.keys(e).forEach((t) => {
266
271
  (!p[t] || p[t].status !== "silent") && (clearTimeout(e[t]), delete e[t]);
267
272
  });
268
- }, [p, x]), w(() => () => {
269
- $.current && $.current(), Object.values(G.current).forEach(clearTimeout);
273
+ }, [p, E]), k(() => () => {
274
+ x.current && x.current(), Object.values(K.current).forEach(clearTimeout);
270
275
  }, []);
271
- const D = g(
276
+ const W = h(
272
277
  (e) => {
273
- $.current && ($.current(), $.current = null);
274
- const t = o || he;
275
- $.current = t(e, {
278
+ x.current && (x.current(), x.current = null);
279
+ const t = i || pe;
280
+ x.current = t(e, {
276
281
  onBlocked: () => {
277
282
  m((n) => n[e.origin] ? {
278
283
  ...n,
@@ -281,34 +286,34 @@ const Y = ce(null), J = ce({
281
286
  },
282
287
  onClosed: () => {
283
288
  if (e.v2) {
284
- X && m((n) => !n[e.origin] || !n[e.origin].silentUrl ? n : {
289
+ Q && m((n) => !n[e.origin] || !n[e.origin].silentUrl ? n : {
285
290
  ...n,
286
291
  [e.origin]: { ...n[e.origin], status: "silent" }
287
292
  });
288
293
  return;
289
294
  }
290
- f(e.origin);
295
+ a(e.origin);
291
296
  }
292
297
  });
293
298
  },
294
- [o, f]
295
- ), H = {
299
+ [i, a]
300
+ ), D = {
296
301
  // Hosts render UI for interactive entries only; silent resolution is
297
302
  // invisible by design.
298
303
  pending: Object.values(p).filter(
299
304
  (e) => e.status === "interactive"
300
305
  ),
301
- authorize: D,
302
- approve: B,
303
- complete: _,
304
- dismiss: z,
305
- originEpochs: L,
306
- credentials: y,
307
- unsupported: I
308
- }, W = Object.values(p).filter(
306
+ authorize: W,
307
+ approve: y,
308
+ complete: M,
309
+ dismiss: w,
310
+ originEpochs: j,
311
+ credentials: L,
312
+ unsupported: P
313
+ }, H = Object.values(p).filter(
309
314
  (e) => e.status === "silent" && e.silentUrl
310
315
  );
311
- return /* @__PURE__ */ E.createElement(J.Provider, { value: H }, r, W.map((e) => /* @__PURE__ */ E.createElement(
316
+ return /* @__PURE__ */ z.createElement(V.Provider, { value: D }, r, H.map((e) => /* @__PURE__ */ z.createElement(
312
317
  "iframe",
313
318
  {
314
319
  key: `mm-silent-auth-${e.origin}`,
@@ -320,9 +325,9 @@ const Y = ce(null), J = ce({
320
325
  }
321
326
  )));
322
327
  };
323
- ue.propTypes = {
324
- children: U.node,
325
- launcher: U.func,
328
+ ie.propTypes = {
329
+ children: T.node,
330
+ launcher: T.func,
326
331
  /**
327
332
  * `async (request, { approve }) => result` where request =
328
333
  * `{ origin, clientId, scope, authUrl }` (origin is the zone-attested frame origin) and result
@@ -330,169 +335,169 @@ ue.propTypes = {
330
335
  * client }`, `{ status: 409, consentRequired: true, client: { name, hostname }, stepUp }`, or
331
336
  * `{ status, error }`. Provided only by hosts that are themselves first-party clients.
332
337
  */
333
- broker: U.func
338
+ broker: T.func
334
339
  };
335
- const ge = () => Z(J), be = (r) => {
336
- const { originEpochs: o } = Z(J), c = Q(r);
337
- return c && o[c] || 0;
338
- }, Ee = (r) => {
339
- const { credentials: o } = Z(J), c = Q(r);
340
- return c && o[c] || null;
341
- }, ke = (r) => {
342
- const { unsupported: o } = Z(J), c = Q(r);
343
- return c && o[c] || null;
344
- }, we = ({ children: r, authorizationLauncher: o, credentialBroker: c }) => {
345
- const [a, p] = M({}), [m, L] = M({}), T = R({}), y = R({}), d = R({}), I = g((u, l) => {
340
+ const Oe = () => v(V), he = (r) => {
341
+ const { originEpochs: i } = v(V), u = J(r);
342
+ return u && i[u] || 0;
343
+ }, ge = (r) => {
344
+ const { credentials: i } = v(V), u = J(r);
345
+ return u && i[u] || null;
346
+ }, me = (r) => {
347
+ const { unsupported: i } = v(V), u = J(r);
348
+ return u && i[u] || null;
349
+ }, be = ({ children: r, authorizationLauncher: i, credentialBroker: u }) => {
350
+ const [d, p] = C({}), [m, j] = C({}), I = R({}), L = R({}), O = R({}), P = h((c, l) => {
346
351
  var s;
347
- return !!((s = d.current[u]) != null && s.has(l));
348
- }, []), C = g((u, l, s) => {
349
- p((f) => ({ ...f, [u]: { origin: l, frameRef: s } }));
350
- }, []), v = g((u) => {
352
+ return !!((s = O.current[c]) != null && s.has(l));
353
+ }, []), S = h((c, l, s) => {
354
+ p((a) => ({ ...a, [c]: { origin: l, frameRef: s } }));
355
+ }, []), Z = h((c) => {
351
356
  p((l) => {
352
357
  const s = { ...l };
353
- return delete s[u], s;
354
- }), L((l) => {
358
+ return delete s[c], s;
359
+ }), j((l) => {
355
360
  const s = { ...l };
356
- return delete s[u], s;
357
- }), delete d.current[u];
361
+ return delete s[c], s;
362
+ }), delete O.current[c];
358
363
  }, []);
359
- w(() => {
360
- const u = (s = [], f, x) => {
361
- s.forEach((z) => z(f, x));
364
+ k(() => {
365
+ const c = (s = [], a, E) => {
366
+ s.forEach((w) => w(a, E));
362
367
  }, l = (s) => {
363
- var F, q, B, D, H, W, e;
364
- if (!((F = s == null ? void 0 : s.data) != null && F.instanceId))
368
+ var A, B, y, W, D, H, e;
369
+ if (!((A = s == null ? void 0 : s.data) != null && A.instanceId))
365
370
  return;
366
- const { instanceId: f, type: x } = s.data, z = a[f], S = (B = (q = z == null ? void 0 : z.frameRef) == null ? void 0 : q.current) == null ? void 0 : B.contentWindow;
367
- if (!S || s.source !== S || s.origin !== z.origin)
371
+ const { instanceId: a, type: E } = s.data, w = d[a], $ = (y = (B = w == null ? void 0 : w.frameRef) == null ? void 0 : B.current) == null ? void 0 : y.contentWindow;
372
+ if (!$ || s.source !== $ || s.origin !== w.origin)
368
373
  return;
369
- const _ = { origin: s.origin }, k = T.current;
370
- if (x === "response") {
371
- const { callbackId: t, response: n, error: i } = s.data, h = y.current[t];
372
- h && (h(n, i), delete y.current[t]);
374
+ const M = { origin: s.origin }, g = I.current;
375
+ if (E === "response") {
376
+ const { callbackId: t, response: n, error: o } = s.data, f = L.current[t];
377
+ f && (f(n, o), delete L.current[t]);
373
378
  return;
374
379
  }
375
- if (x === "mark-registered") {
380
+ if (E === "mark-registered") {
376
381
  const { requestType: t } = s.data;
377
- d.current[f] || (d.current[f] = /* @__PURE__ */ new Set()), d.current[f].add(t);
382
+ O.current[a] || (O.current[a] = /* @__PURE__ */ new Set()), O.current[a].add(t);
378
383
  return;
379
384
  }
380
- x === "ready" && L((t) => ({ ...t, [f]: !0 })), u((D = k[f]) == null ? void 0 : D[x], s.data, _), u((H = k["*"]) == null ? void 0 : H[x], s.data, _), u((W = k[f]) == null ? void 0 : W["*"], s.data, _), u((e = k["*"]) == null ? void 0 : e["*"], s.data, _);
385
+ E === "ready" && j((t) => ({ ...t, [a]: !0 })), c((W = g[a]) == null ? void 0 : W[E], s.data, M), c((D = g["*"]) == null ? void 0 : D[E], s.data, M), c((H = g[a]) == null ? void 0 : H["*"], s.data, M), c((e = g["*"]) == null ? void 0 : e["*"], s.data, M);
381
386
  };
382
387
  return window.addEventListener("message", l), () => {
383
388
  window.removeEventListener("message", l);
384
389
  };
385
- }, [a]);
386
- const b = g(
387
- (u, l, s) => {
388
- var x, z;
389
- const f = a[u];
390
- if (!f) {
391
- console.warn(`Origin not set for id: ${u}. Unable to send message.`);
390
+ }, [d]);
391
+ const b = h(
392
+ (c, l, s) => {
393
+ var E, w;
394
+ const a = d[c];
395
+ if (!a) {
396
+ console.warn(`Origin not set for id: ${c}. Unable to send message.`);
392
397
  return;
393
398
  }
394
- (z = (x = f == null ? void 0 : f.frameRef) == null ? void 0 : x.current) != null && z.contentWindow && f.frameRef.current.contentWindow.postMessage(
395
- { type: l, ...s, instanceId: u },
396
- f.origin
399
+ (w = (E = a == null ? void 0 : a.frameRef) == null ? void 0 : E.current) != null && w.contentWindow && a.frameRef.current.contentWindow.postMessage(
400
+ { type: l, ...s, instanceId: c },
401
+ a.origin
397
402
  );
398
403
  },
399
- [a]
400
- ), $ = R(0), G = g(() => `${Date.now()}-${++$.current}`, []), O = g(
401
- async (u, l, s = {}) => new Promise((f, x) => {
402
- const z = G(), S = (_, k) => {
403
- delete y.current[z], k ? x(k) : f(_);
404
+ [d]
405
+ ), x = R(0), K = h(() => `${Date.now()}-${++x.current}`, []), _ = h(
406
+ async (c, l, s = {}) => new Promise((a, E) => {
407
+ const w = K(), $ = (M, g) => {
408
+ delete L.current[w], g ? E(g) : a(M);
404
409
  };
405
- y.current[z] = S, b(u, "request", { callbackId: z, requestType: l, data: s });
410
+ L.current[w] = $, b(c, "request", { callbackId: w, requestType: l, data: s });
406
411
  }),
407
412
  [b]
408
- ), j = g(
409
- (u, l) => {
410
- b(u, "load-options", l);
413
+ ), q = h(
414
+ (c, l) => {
415
+ b(c, "load-options", l);
411
416
  },
412
417
  [b]
413
- ), P = g(
414
- (u, l) => {
415
- b(u, "validate", l);
418
+ ), F = h(
419
+ (c, l) => {
420
+ b(c, "validate", l);
416
421
  },
417
422
  [b]
418
- ), A = le(
423
+ ), U = ue(
419
424
  () => ({
420
- registerFrame: C,
421
- unregisterFrame: v,
425
+ registerFrame: S,
426
+ unregisterFrame: Z,
422
427
  sendMessage: b,
423
- sendRequest: O,
424
- loadOptions: j,
425
- validate: P,
426
- hasHandler: I,
428
+ sendRequest: _,
429
+ loadOptions: q,
430
+ validate: F,
431
+ hasHandler: P,
427
432
  readyFrames: m,
428
- addListener: (u, l, s) => (T.current[u] || (T.current[u] = {}), T.current[u][l] || (T.current[u][l] = []), T.current[u][l].push(s), () => {
429
- T.current[u][l] = T.current[u][l].filter((f) => f !== s);
433
+ addListener: (c, l, s) => (I.current[c] || (I.current[c] = {}), I.current[c][l] || (I.current[c][l] = []), I.current[c][l].push(s), () => {
434
+ I.current[c][l] = I.current[c][l].filter((a) => a !== s);
430
435
  })
431
436
  }),
432
437
  [
433
- C,
434
- v,
438
+ S,
439
+ Z,
435
440
  b,
436
- O,
437
- j,
441
+ _,
442
+ q,
443
+ F,
438
444
  P,
439
- I,
440
445
  m
441
446
  ]
442
447
  );
443
- return /* @__PURE__ */ E.createElement(Y.Provider, { value: A }, /* @__PURE__ */ E.createElement(ue, { launcher: o, broker: c }, r));
444
- }, V = (r, o, c) => {
445
- const a = Z(Y);
446
- if (a === null)
448
+ return /* @__PURE__ */ z.createElement(X.Provider, { value: U }, /* @__PURE__ */ z.createElement(ie, { launcher: i, broker: u }, r));
449
+ }, G = (r, i, u) => {
450
+ const d = v(X);
451
+ if (d === null)
447
452
  throw new Error(
448
453
  "useEmbeddedEffect must be used within a MMEmbeddableZoneProvider"
449
454
  );
450
- const p = R(c);
451
- w(() => {
452
- p.current = c;
453
- }, [c]), w(() => {
454
- if (!(!r || !o)) {
455
- if (o.startsWith("key:")) {
456
- const m = o.substring(4);
457
- return a.readyFrames[r] && a.sendMessage(r, "subscribe-key", { keyChord: m }), a.addListener(
455
+ const p = R(u);
456
+ k(() => {
457
+ p.current = u;
458
+ }, [u]), k(() => {
459
+ if (!(!r || !i)) {
460
+ if (i.startsWith("key:")) {
461
+ const m = i.substring(4);
462
+ return d.readyFrames[r] && d.sendMessage(r, "subscribe-key", { keyChord: m }), d.addListener(
458
463
  r,
459
464
  `key-pressed:${m}`,
460
- (...T) => p.current(...T)
465
+ (...I) => p.current(...I)
461
466
  );
462
467
  }
463
- return a.addListener(
468
+ return d.addListener(
464
469
  r,
465
- o,
470
+ i,
466
471
  (...m) => p.current(...m)
467
472
  );
468
473
  }
469
- }, [a, r, o]);
474
+ }, [d, r, i]);
470
475
  };
471
- we.propTypes = {
472
- children: U.node.isRequired,
476
+ be.propTypes = {
477
+ children: T.node.isRequired,
473
478
  /**
474
479
  * Optional interactive-step launcher for embedded authorizations,
475
480
  * `(entry, { onBlocked, onClosed }) => cleanup`. Defaults to a top-level
476
481
  * popup. Hosts that cannot open windows (Android WebView shells) drive
477
482
  * their own UI from useEmbeddedAuthorizations() instead.
478
483
  */
479
- authorizationLauncher: U.func,
484
+ authorizationLauncher: T.func,
480
485
  /**
481
486
  * Optional credential broker for hosts that are first-party MachineMetrics clients
482
487
  * (`async (request, { approve }) => result`, see EmbeddedAuthorizationManager). When present,
483
488
  * v2 credential requests are brokered server-side (no popup, no hidden frame) and consent is
484
489
  * rendered natively by the host from the broker's `client` identity.
485
490
  */
486
- credentialBroker: U.func
491
+ credentialBroker: T.func
487
492
  };
488
- const ee = K.default || K, Re = 1e4, xe = "credentials", Te = (r, o) => `${r}/mm-embedded-interop?id=${encodeURIComponent(o)}&origin=${encodeURIComponent(
493
+ const N = te.default || te, Ee = 1e4, ke = "credentials", Re = (r, i) => `${r}/mm-embedded-interop?id=${encodeURIComponent(i)}&origin=${encodeURIComponent(
489
494
  window.location.origin
490
- )}&caps=${xe}`, Ie = ee.iframe`
495
+ )}&caps=${ke}`, we = N.iframe`
491
496
  width: 100%;
492
497
  height: 100%;
493
498
  border: none;
494
499
  visibility: ${(r) => r.$isReady ? "visible" : "hidden"};
495
- `, ze = ee.div`
500
+ `, Te = N.div`
496
501
  width: 100%;
497
502
  height: 100%;
498
503
  display: flex;
@@ -505,66 +510,66 @@ const ee = K.default || K, Re = 1e4, xe = "credentials", Te = (r, o) => `${r}/mm
505
510
  text-align: center;
506
511
  color: #555;
507
512
  font-size: 14px;
508
- `, Ue = (r) => {
509
- const o = r && r.origin || "This app", c = r && r.reason || "";
510
- switch (c) {
513
+ `, Ie = (r) => {
514
+ const i = r && r.origin || "This app", u = r && r.reason || "";
515
+ switch (u) {
511
516
  case "broker:scope_above_ceiling":
512
517
  return {
513
- title: `${o} can’t be authorized here`,
518
+ title: `${i} can’t be authorized here`,
514
519
  detail: "It asks for permissions your role doesn’t have."
515
520
  };
516
521
  case "broker:origin_mismatch":
517
522
  case "broker:unknown_client":
518
523
  return {
519
- title: `${o} can’t be authorized here`,
524
+ title: `${i} can’t be authorized here`,
520
525
  detail: "It isn’t registered to run at this address."
521
526
  };
522
527
  case "broker:cross_company_principal":
523
528
  return {
524
- title: `${o} can’t be authorized here`,
529
+ title: `${i} can’t be authorized here`,
525
530
  detail: "It can’t be authorized for this account."
526
531
  };
527
532
  default:
528
- return c.startsWith("broker:") ? {
529
- title: `${o} can’t be authorized here`,
533
+ return u.startsWith("broker:") ? {
534
+ title: `${i} can’t be authorized here`,
530
535
  detail: "Authorization was refused."
531
536
  } : {
532
- title: `${o} can’t be embedded here`,
537
+ title: `${i} can’t be embedded here`,
533
538
  detail: "It needs an update to support embedding from a different domain."
534
539
  };
535
540
  }
536
- }, ae = ({ entry: r }) => {
537
- const o = Ue(r);
538
- return /* @__PURE__ */ E.createElement(ze, { "data-reason": r && r.reason || void 0 }, /* @__PURE__ */ E.createElement("div", { style: { fontWeight: 600 } }, o.title), /* @__PURE__ */ E.createElement("div", { style: { fontSize: 12, color: "#888" } }, o.detail));
541
+ }, ce = ({ entry: r }) => {
542
+ const i = Ie(r);
543
+ return /* @__PURE__ */ z.createElement(Te, { "data-reason": r && r.reason || void 0 }, /* @__PURE__ */ z.createElement("div", { style: { fontWeight: 600 } }, i.title), /* @__PURE__ */ z.createElement("div", { style: { fontSize: 12, color: "#888" } }, i.detail));
539
544
  };
540
- ae.propTypes = {
541
- entry: U.shape({
542
- origin: U.string,
543
- name: U.string,
544
- reason: U.string,
545
- detail: U.object
545
+ ce.propTypes = {
546
+ entry: T.shape({
547
+ origin: T.string,
548
+ name: T.string,
549
+ reason: T.string,
550
+ detail: T.object
546
551
  })
547
552
  };
548
- const ye = ee.div`
553
+ const Ue = N.div`
549
554
  height: 100%;
550
555
  display: flex;
551
556
  flex: 1;
552
557
  align-items: center;
553
558
  justify-content: center;
554
- `, Ce = () => /* @__PURE__ */ E.createElement(ye, null, /* @__PURE__ */ E.createElement("div", { style: { textAlign: "center" } }, "This app couldn’t be loaded as an embeddable widget.")), Ae = ({
559
+ `, Ce = () => /* @__PURE__ */ z.createElement(Ue, null, /* @__PURE__ */ z.createElement("div", { style: { textAlign: "center" } }, "This app couldn’t be loaded as an embeddable widget.")), _e = ({
555
560
  id: r,
556
- src: o,
557
- path: c,
558
- onInit: a = () => {
561
+ src: i,
562
+ path: u,
563
+ onInit: d = () => {
559
564
  },
560
565
  onTimeout: p,
561
566
  context: m = {},
562
- params: L = {},
563
- renderUnsupported: T,
564
- renderTimeout: y,
565
- ...d
567
+ params: j = {},
568
+ renderUnsupported: I,
569
+ renderTimeout: L,
570
+ ...O
566
571
  }) => {
567
- if ("isConfiguring" in d)
572
+ if ("isConfiguring" in O)
568
573
  return console.error(
569
574
  "isConfiguring must be passed via the params prop to MMEmbeddableZone"
570
575
  ), null;
@@ -576,194 +581,111 @@ const ye = ee.div`
576
581
  return console.error(
577
582
  "isFullScreen must be passed via the params prop to MMEmbeddableZone"
578
583
  ), null;
579
- const I = R(), [C, v] = M(), [b, $] = M(0), [G, O] = M(!1), [j, P] = M(!1), A = be(o), u = Ee(o), l = ke(o), [s, f] = M(0), [x, z] = M(null), { registerFrame: S, unregisterFrame: _, sendMessage: k } = Z(
580
- Y
581
- ), [F, q] = M(), B = R(), D = R(p), H = R(a), W = R(!1), e = g(() => {
582
- W.current = !1, clearTimeout(B.current), $(0), O(!1), P(!1), z(null);
584
+ const P = R(), [S, Z] = C(), [b, x] = C(0), [K, _] = C(!1), [q, F] = C(!1), U = he(i), c = ge(i), l = me(i), [s, a] = C(0), [E, w] = C(null), { registerFrame: $, unregisterFrame: M, sendMessage: g } = v(
585
+ X
586
+ ), [A, B] = C(), y = R(), W = R(p), D = R(d), H = R(!1), e = h(() => {
587
+ H.current = !1, clearTimeout(y.current), x(0), _(!1), F(!1), w(null);
583
588
  }, []);
584
- w(() => {
585
- (A > 0 || s > 0) && e();
586
- }, [A, s, e]), w(() => {
587
- D.current = p;
588
- }, [p]), w(() => {
589
- H.current = a;
590
- }, [a]), w(() => {
591
- b && k(r, "set-context", {
589
+ k(() => {
590
+ (U > 0 || s > 0) && e();
591
+ }, [U, s, e]), k(() => {
592
+ W.current = p;
593
+ }, [p]), k(() => {
594
+ D.current = d;
595
+ }, [d]), k(() => {
596
+ b && g(r, "set-context", {
592
597
  context: {
593
598
  ...m
594
599
  }
595
600
  });
596
- }, [m, r, b]), w(() => {
597
- b && k(r, "set-params", { params: L });
598
- }, [L, r, b]), w(() => {
599
- c !== void 0 && q((c == null ? void 0 : c.indexOf("/")) === 0 ? c : `/${c}`);
600
- }, [c]), w(() => {
601
- F === void 0 || !b || k(r, "navigate", { path: F });
602
- }, [F, b, r, k]), w(() => {
603
- if (!o || !r || !I)
601
+ }, [m, r, b]), k(() => {
602
+ b && g(r, "set-params", { params: j });
603
+ }, [j, r, b]), k(() => {
604
+ u !== void 0 && B((u == null ? void 0 : u.indexOf("/")) === 0 ? u : `/${u}`);
605
+ }, [u]), k(() => {
606
+ A === void 0 || !b || g(r, "navigate", { path: A });
607
+ }, [A, b, r, g]), k(() => {
608
+ if (!i || !r || !P)
604
609
  return;
605
610
  e();
606
- const i = new URL(o);
607
- return S(r, i.origin, I), H.current(), v(Te(i.origin, r)), () => {
608
- _(r);
611
+ const o = new URL(i);
612
+ return $(r, o.origin, P), D.current(), Z(Re(o.origin, r)), () => {
613
+ M(r);
609
614
  };
610
- }, [o, r, S, I, e]), w(() => {
611
- if (!(!C || W.current))
612
- return B.current = setTimeout(() => {
613
- O(!0), D.current && D.current();
614
- }, Re), () => clearTimeout(B.current);
615
- }, [C, o, A, s]);
616
- const t = g(() => {
617
- W.current = !0, clearTimeout(B.current), O(!1);
615
+ }, [i, r, $, P, e]), k(() => {
616
+ if (!(!S || H.current))
617
+ return y.current = setTimeout(() => {
618
+ _(!0), W.current && W.current();
619
+ }, Ee), () => clearTimeout(y.current);
620
+ }, [S, i, U, s]);
621
+ const t = h(() => {
622
+ H.current = !0, clearTimeout(y.current), _(!1);
618
623
  }, []);
619
- V(r, "init", (i) => {
620
- t(), Array.isArray(i == null ? void 0 : i.acceptsCredentials) && z(i.acceptsCredentials);
621
- }), V(r, "authorize", t), V(r, "login", t), V(r, "credential-request", () => {
622
- t(), P(!0);
623
- }), w(() => {
624
- if (!j || !u)
624
+ G(r, "init", (o) => {
625
+ t(), Array.isArray(o == null ? void 0 : o.acceptsCredentials) && w(o.acceptsCredentials);
626
+ }), G(r, "authorize", t), G(r, "login", t), G(r, "credential-request", () => {
627
+ t(), F(!0);
628
+ }), k(() => {
629
+ if (!q || !c)
625
630
  return;
626
- const i = x;
627
- if (Array.isArray(i) && !i.includes(u.kind))
631
+ const o = E;
632
+ if (Array.isArray(o) && !o.includes(c.kind))
628
633
  return;
629
- const h = u.kind === "access_token" ? { accessToken: u.accessToken } : {};
630
- k(r, "credential", { ...h, credential: u });
631
- }, [j, u, x, r, k]), V(r, "ready", () => {
632
- t(), $((i) => i + 1);
634
+ const f = c.kind === "access_token" ? { accessToken: c.accessToken } : {};
635
+ g(r, "credential", { ...f, credential: c });
636
+ }, [q, c, E, r, g]), G(r, "ready", () => {
637
+ t(), x((o) => o + 1);
633
638
  });
634
639
  const n = R();
635
- return V(r, "heartbeat", () => {
640
+ return G(r, "heartbeat", () => {
636
641
  n.current && clearTimeout(n.current), n.current = setTimeout(() => {
637
- f((i) => i + 1);
642
+ a((o) => o + 1);
638
643
  }, 6e3);
639
- }), w(() => () => {
644
+ }), k(() => () => {
640
645
  n.current && clearTimeout(n.current);
641
- }, []), l ? T ? T(l) : /* @__PURE__ */ E.createElement(ae, { entry: l }) : G && !b ? y ? y() : /* @__PURE__ */ E.createElement(Ce, null) : /* @__PURE__ */ E.createElement(
642
- Ie,
646
+ }, []), l ? I ? I(l) : /* @__PURE__ */ z.createElement(ce, { entry: l }) : K && !b ? L ? L() : /* @__PURE__ */ z.createElement(Ce, null) : /* @__PURE__ */ z.createElement(
647
+ we,
643
648
  {
644
- key: `auth-epoch-${A}-frame-${s}`,
649
+ key: `auth-epoch-${U}-frame-${s}`,
645
650
  $isReady: b,
646
- ref: I,
647
- src: C,
648
- ...d
651
+ ref: P,
652
+ src: S,
653
+ ...O
649
654
  }
650
655
  );
651
656
  };
652
- Ae.propTypes = {
653
- id: U.string,
654
- src: U.string.isRequired,
655
- path: U.string,
656
- onInit: U.func,
657
- onTimeout: U.func,
657
+ _e.propTypes = {
658
+ id: T.string,
659
+ src: T.string.isRequired,
660
+ path: T.string,
661
+ onInit: T.func,
662
+ onTimeout: T.func,
658
663
  /**
659
664
  * Optional host-styled renderer for the structurally-unsupported embed
660
665
  * state (legacy app on a cross-site origin), `(entry) => ReactNode`. Falls
661
666
  * back to a minimal built-in placeholder.
662
667
  */
663
- renderUnsupported: U.func,
668
+ renderUnsupported: T.func,
664
669
  /**
665
670
  * Optional host-styled renderer for the handshake-timeout failure state
666
671
  * (the app is not embeddable / could not load), `() => ReactNode`. Falls
667
672
  * back to a minimal centered message.
668
673
  */
669
- renderTimeout: U.func
670
- };
671
- const Me = K.div`
672
- position: fixed;
673
- inset: 0;
674
- background: rgba(0, 0, 0, 0.45);
675
- display: flex;
676
- align-items: center;
677
- justify-content: center;
678
- z-index: 10000;
679
- `, Oe = K.div`
680
- background: #fff;
681
- border-radius: 8px;
682
- box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
683
- padding: 24px;
684
- width: 480px;
685
- max-width: calc(100vw - 32px);
686
- font-family: sans-serif;
687
- color: #222;
688
- `, _e = K.div`
689
- display: flex;
690
- align-items: center;
691
- justify-content: space-between;
692
- padding: 10px 0;
693
- gap: 16px;
694
- `, Le = K.button`
695
- background: #16a500;
696
- color: #fff;
697
- border: none;
698
- border-radius: 6px;
699
- padding: 9px 18px;
700
- font-size: 14px;
701
- cursor: pointer;
702
- white-space: nowrap;
703
- `, $e = K.p`
704
- color: #b3261e;
705
- font-size: 13px;
706
- margin: 4px 0 0;
707
- `, se = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
708
- let ie = !1;
709
- const Pe = () => {
710
- const { pending: r, authorize: o, dismiss: c } = ge(), a = r.filter((d) => !d.consent), p = r.length - a.length, m = R(null), L = R(null), T = a.length > 0;
711
- if (w(() => {
712
- p > 0 && !ie && (ie = !0, console.error(
713
- "[mm-react-embeddable] EmbeddedAuthorizationPrompt received a brokered consent entry. A host with a credentialBroker must render its own consent UI (useEmbeddedAuthorizations: approve/dismiss); this default prompt only handles the popup path."
714
- ));
715
- }, [p]), w(() => {
716
- if (!T || !m.current)
717
- return;
718
- L.current = document.activeElement;
719
- const d = m.current.querySelector(se);
720
- return d && d.focus(), () => {
721
- const I = L.current;
722
- I && typeof I.focus == "function" && I.focus();
723
- };
724
- }, [T]), !T)
725
- return null;
726
- const y = (d) => {
727
- if (d.key === "Escape") {
728
- d.preventDefault(), a.forEach((b) => c(b));
729
- return;
730
- }
731
- if (d.key !== "Tab" || !m.current)
732
- return;
733
- const I = Array.from(m.current.querySelectorAll(se));
734
- if (I.length === 0)
735
- return;
736
- const C = I[0], v = I[I.length - 1];
737
- d.shiftKey && document.activeElement === C ? (d.preventDefault(), v.focus()) : !d.shiftKey && document.activeElement === v && (d.preventDefault(), C.focus());
738
- };
739
- return /* @__PURE__ */ E.createElement(Me, null, /* @__PURE__ */ E.createElement(
740
- Oe,
741
- {
742
- ref: m,
743
- role: "dialog",
744
- "aria-modal": "true",
745
- "aria-labelledby": "mm-embedded-authorization-title",
746
- onKeyDown: y
747
- },
748
- /* @__PURE__ */ E.createElement("h3", { id: "mm-embedded-authorization-title", style: { margin: "0 0 8px" } }, "Authorization Required"),
749
- /* @__PURE__ */ E.createElement("p", { style: { margin: "0 0 12px", fontSize: 14, color: "#555" } }, "The following apps need you to sign in and authorize them before they can load."),
750
- a.map((d) => /* @__PURE__ */ E.createElement("div", { key: d.origin }, /* @__PURE__ */ E.createElement(_e, null, /* @__PURE__ */ E.createElement("div", null, /* @__PURE__ */ E.createElement("div", { style: { fontWeight: 600 } }, d.origin)), /* @__PURE__ */ E.createElement(Le, { onClick: () => o(d) }, "Authorize")), d.popupBlocked && /* @__PURE__ */ E.createElement($e, null, "The sign-in window was blocked. Allow popups for this site, then try again.")))
751
- ));
674
+ renderTimeout: T.func
752
675
  };
753
676
  export {
754
- de as CREDENTIAL_KIND_ACCESS_TOKEN,
755
- J as EmbeddedAuthorizationContext,
756
- Pe as EmbeddedAuthorizationPrompt,
757
- Ae as MMEmbeddableZone,
758
- Y as MMEmbeddableZoneContext,
759
- we as MMEmbeddableZoneProvider,
760
- me as isCrossSite,
677
+ le as CREDENTIAL_KIND_ACCESS_TOKEN,
678
+ V as EmbeddedAuthorizationContext,
679
+ _e as MMEmbeddableZone,
680
+ X as MMEmbeddableZoneContext,
681
+ be as MMEmbeddableZoneProvider,
682
+ fe as isCrossSite,
761
683
  re as normalizeCredential,
762
- he as popupAuthorizationLauncher,
763
- Ue as unsupportedCopy,
764
- ge as useEmbeddedAuthorizations,
765
- Ee as useEmbeddedCredential,
766
- V as useEmbeddedEffect,
767
- be as useEmbeddedOriginEpoch,
768
- ke as useEmbeddedUnsupported
684
+ pe as popupAuthorizationLauncher,
685
+ Ie as unsupportedCopy,
686
+ Oe as useEmbeddedAuthorizations,
687
+ ge as useEmbeddedCredential,
688
+ G as useEmbeddedEffect,
689
+ he as useEmbeddedOriginEpoch,
690
+ me as useEmbeddedUnsupported
769
691
  };