@machinemetrics/mm-react-embeddable 2.0.0 → 2.0.1-1

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