useblocks 1.1.44 → 1.1.45-alpha.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.
Files changed (30) hide show
  1. package/iframe/js/amp.CVC2Iq48.js +1 -1
  2. package/iframe/js/iframe-eblock.js +1 -1
  3. package/iframe/js/iframe.js +1 -1
  4. package/iframe/js/rules.4N5s3OV-.js +1 -1
  5. package/npm-publish.manifest.json +13 -13
  6. package/package.json +1 -1
  7. package/singlepage_headless_plugin.html +1 -1
  8. package/static/core/{5c3e8d4b.js → 14cff333.js} +7 -7
  9. package/static/core/{8d86c5ce.js → 3bc4209c.js} +6 -6
  10. package/static/core/{ed0ecf0a.js → 5e3ab56f.js} +2817 -2740
  11. package/static/core/{632d894f.js → 77335b77.js} +160 -155
  12. package/static/core/{48b80eec.js → 8b396ea4.js} +3 -3
  13. package/static/core/{bb774fb9.js → 8b5ee65e.js} +3494 -3290
  14. package/static/core/{d2b26db6.js → b65e0b0f.js} +5 -5
  15. package/static/core/{a59902082.js → c58680692.js} +5 -5
  16. package/static/core/{c83c7a73.js → d6adee45.js} +4 -4
  17. package/static/core/{517cec3c.js → e21aa8f0.js} +4353 -4035
  18. package/static/core/{04557bf3.js → e4447e90.js} +3 -3
  19. package/static/core/{d8749999.js → f88e6ea1.js} +7 -7
  20. package/static/esm/{2fb07398.js → 0fc6b3d1.js} +907 -793
  21. package/static/esm/e8a1f01d.js +131 -0
  22. package/two_step_headless_plugin.html +1 -1
  23. package/useblocks-core.6257ace9.js +663 -0
  24. package/useblocks-esm.js +1522 -1319
  25. package/useblocks.d.ts +8 -0
  26. package/useblocks.js +4186 -3875
  27. package/static/esm/dab4cdfd.js +0 -127
  28. package/useblocks-core.bb621219.js +0 -637
  29. /package/iframe/{iframe-eblock.bb621219.html → iframe-eblock.6257ace9.html} +0 -0
  30. /package/iframe/{iframe.bb621219.html → iframe.6257ace9.html} +0 -0
@@ -1,11 +1,11 @@
1
- __useblocks__.define("static/core/632d894f.js", [
1
+ __useblocks__.define("static/core/77335b77.js", [
2
2
  "require",
3
3
  "exports",
4
4
  "module",
5
5
  "static/core/bd36b180.js",
6
- "static/core/bb774fb9.js"
7
- ], function(Ee, m, Dt) {
8
- const He = Ee("./bd36b180.js"), y = Ee("./bb774fb9.js");
6
+ "static/core/8b5ee65e.js"
7
+ ], function(Ee, g, Dt) {
8
+ const ke = Ee("./bd36b180.js"), y = Ee("./8b5ee65e.js");
9
9
  function Ae(t) {
10
10
  return function(a) {
11
11
  return {
@@ -32,17 +32,17 @@ __useblocks__.define("static/core/632d894f.js", [
32
32
  };
33
33
  };
34
34
  }
35
- function ke() {
35
+ function Je() {
36
36
  const t = new Date();
37
37
  return t.valueOf() - t.getTimezoneOffset() * 60 * 1e3;
38
38
  }
39
- function Je(t) {
39
+ function $e(t) {
40
40
  const a = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), i = atob(a), c = new Uint8Array(i.length);
41
41
  for (let d = 0; d < i.length; d++) c[d] = i.charCodeAt(d);
42
42
  return new TextDecoder().decode(c);
43
43
  }
44
44
  function Ie(t) {
45
- const [a, i, c] = t.split("."), d = JSON.parse(Je(i));
45
+ const [a, i, c] = t.split("."), d = JSON.parse($e(i));
46
46
  return {
47
47
  exp: d.exp,
48
48
  createdAt: d.iat,
@@ -50,7 +50,7 @@ __useblocks__.define("static/core/632d894f.js", [
50
50
  };
51
51
  }
52
52
  var ae = y.createIdentifier$1();
53
- function $e(t, a, i, c) {
53
+ function Pe(t, a, i, c) {
54
54
  t.inject(ae, void 0), t.injectFactory(ae, async (d, u) => {
55
55
  try {
56
56
  let h = u ? await u : void 0;
@@ -58,13 +58,13 @@ __useblocks__.define("static/core/632d894f.js", [
58
58
  const S = t.getInstance(y.STANDALONE_BOOTSTRAP_TOKEN_ID);
59
59
  S && (h = await S);
60
60
  }
61
- return a ? !h || (Ie(h)?.exp ?? 0) * 1e3 <= ke() ? await a(i, c, h) : h : "";
61
+ return a ? !h || (Ie(h)?.exp ?? 0) * 1e3 <= Je() ? await a(i, c, h) : h : "";
62
62
  } catch {
63
63
  return "";
64
64
  }
65
65
  }, !0);
66
66
  }
67
- var xe = Ae((t) => {
67
+ var Xe = Ae((t) => {
68
68
  let a, i, c;
69
69
  return t.addService(y.REQUEST_HANDLER_ID, { execute: async (d) => {
70
70
  if (a) {
@@ -73,12 +73,12 @@ __useblocks__.define("static/core/632d894f.js", [
73
73
  }
74
74
  } }), { setOptions(d) {
75
75
  const u = !y.deepEqual(i, d.user), h = c !== d.project;
76
- (a !== d.getAuthToken || u || h) && (a = d.getAuthToken, i = d.user, c = d.project, $e(t, a, d.user, d.project));
76
+ (a !== d.getAuthToken || u || h) && (a = d.getAuthToken, i = d.user, c = d.project, Pe(t, a, d.user, d.project));
77
77
  } };
78
- }), _e = He.__commonJSMin(((t, a) => {
78
+ }), _e = ke.__commonJSMin(((t, a) => {
79
79
  (function(i) {
80
80
  "use strict";
81
- var c = i.setTimeout, d = i.clearTimeout, u = i.XMLHttpRequest, h = i.XDomainRequest, S = i.ActiveXObject, U = i.EventSource, O = i.document, W = i.Promise, Q = i.fetch, M = i.Response, D = i.TextDecoder, Y = i.TextEncoder, $ = i.AbortController;
81
+ var c = i.setTimeout, d = i.clearTimeout, u = i.XMLHttpRequest, h = i.XDomainRequest, S = i.ActiveXObject, U = i.EventSource, O = i.document, k = i.Promise, Q = i.fetch, M = i.Response, D = i.TextDecoder, Y = i.TextEncoder, $ = i.AbortController;
82
82
  if (typeof window < "u" && typeof O < "u" && !("readyState" in O) && O.body == null && (O.readyState = "loading", window.addEventListener("load", function(e) {
83
83
  O.readyState = "complete";
84
84
  }, !1)), u == null && S != null && (u = function() {
@@ -120,16 +120,16 @@ __useblocks__.define("static/core/632d894f.js", [
120
120
  this.bitsNeeded = 0, this.codePoint = 0;
121
121
  }
122
122
  le.prototype.decode = function(e) {
123
- function n(g, T, f) {
124
- if (f === 1) return g >= 128 >> T && g << T <= 2047;
125
- if (f === 2) return g >= 2048 >> T && g << T <= 55295 || g >= 57344 >> T && g << T <= 65535;
126
- if (f === 3) return g >= 65536 >> T && g << T <= 1114111;
123
+ function n(m, T, f) {
124
+ if (f === 1) return m >= 128 >> T && m << T <= 2047;
125
+ if (f === 2) return m >= 2048 >> T && m << T <= 55295 || m >= 57344 >> T && m << T <= 65535;
126
+ if (f === 3) return m >= 65536 >> T && m << T <= 1114111;
127
127
  throw new Error();
128
128
  }
129
- function o(g, T) {
130
- if (g === 6) return T >> 6 > 15 ? 3 : T > 31 ? 2 : 1;
131
- if (g === 12) return T > 15 ? 3 : 2;
132
- if (g === 18) return 3;
129
+ function o(m, T) {
130
+ if (m === 6) return T >> 6 > 15 ? 3 : T > 31 ? 2 : 1;
131
+ if (m === 12) return T > 15 ? 3 : 2;
132
+ if (m === 18) return 3;
133
133
  throw new Error();
134
134
  }
135
135
  for (var r = 65533, l = "", s = this.bitsNeeded, v = this.codePoint, b = 0; b < e.length; b += 1) {
@@ -146,10 +146,10 @@ __useblocks__.define("static/core/632d894f.js", [
146
146
  };
147
147
  (D == null || Y == null || !At()) && (D = le);
148
148
  var q = function() {};
149
- function x(e) {
149
+ function X(e) {
150
150
  this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = q, this.onload = q, this.onerror = q, this.onreadystatechange = q, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = q;
151
151
  }
152
- x.prototype.open = function(e, n) {
152
+ X.prototype.open = function(e, n) {
153
153
  this._abort(!0);
154
154
  var o = this, r = this._xhr, l = 1, s = 0;
155
155
  this._abort = function(f) {
@@ -183,7 +183,7 @@ __useblocks__.define("static/core/632d894f.js", [
183
183
  else throw new TypeError();
184
184
  o.onreadystatechange();
185
185
  }
186
- }, g = function(f) {
186
+ }, m = function(f) {
187
187
  r != null && (r.readyState === 4 ? (!("onload" in r) || !("onerror" in r) || !("onabort" in r)) && p(r.responseText === "" ? "error" : "load", f) : r.readyState === 3 ? "onprogress" in r || b() : r.readyState === 2 && v());
188
188
  }, T = function() {
189
189
  s = c(function() {
@@ -197,20 +197,20 @@ __useblocks__.define("static/core/632d894f.js", [
197
197
  }), "onabort" in r && (r.onabort = function(f) {
198
198
  p("abort", f);
199
199
  }), "onprogress" in r && (r.onprogress = b), "onreadystatechange" in r && (r.onreadystatechange = function(f) {
200
- g(f);
200
+ m(f);
201
201
  }), ("contentType" in r || !("ontimeout" in u.prototype)) && (n += (n.indexOf("?") === -1 ? "?" : "&") + "padding=true"), r.open(e, n, !0), "readyState" in r && (s = c(function() {
202
202
  T();
203
203
  }, 0));
204
- }, x.prototype.abort = function() {
204
+ }, X.prototype.abort = function() {
205
205
  this._abort(!1);
206
- }, x.prototype.getResponseHeader = function(e) {
206
+ }, X.prototype.getResponseHeader = function(e) {
207
207
  return this._contentType;
208
- }, x.prototype.setRequestHeader = function(e, n) {
208
+ }, X.prototype.setRequestHeader = function(e, n) {
209
209
  var o = this._xhr;
210
210
  "setRequestHeader" in o && o.setRequestHeader(e, n);
211
- }, x.prototype.getAllResponseHeaders = function() {
211
+ }, X.prototype.getAllResponseHeaders = function() {
212
212
  return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
213
- }, x.prototype.send = function() {
213
+ }, X.prototype.send = function() {
214
214
  if ((!("ontimeout" in u.prototype) || !("sendAsBinary" in u.prototype) && !("mozAnon" in u.prototype)) && O != null && O.readyState != null && O.readyState !== "complete") {
215
215
  var e = this;
216
216
  e._sendTimeout = c(function() {
@@ -226,65 +226,65 @@ __useblocks__.define("static/core/632d894f.js", [
226
226
  throw o;
227
227
  }
228
228
  };
229
- function Le(e) {
229
+ function Me(e) {
230
230
  return e.replace(/[A-Z]/g, function(n) {
231
231
  return String.fromCharCode(n.charCodeAt(0) + 32);
232
232
  });
233
233
  }
234
- function Me(e) {
234
+ function De(e) {
235
235
  for (var n = Object.create(null), o = e.split(`\r
236
236
  `), r = 0; r < o.length; r += 1) {
237
237
  var l = o[r].split(": "), s = l.shift(), v = l.join(": ");
238
- n[Le(s)] = v;
238
+ n[Me(s)] = v;
239
239
  }
240
240
  this._map = n;
241
241
  }
242
- Me.prototype.get = function(e) {
243
- return this._map[Le(e)];
242
+ De.prototype.get = function(e) {
243
+ return this._map[Me(e)];
244
244
  }, u != null && u.HEADERS_RECEIVED == null && (u.HEADERS_RECEIVED = 2);
245
- function De() {}
246
- De.prototype.open = function(e, n, o, r, l, s, v) {
245
+ function qe() {}
246
+ qe.prototype.open = function(e, n, o, r, l, s, v) {
247
247
  e.open("GET", l);
248
248
  var b = 0;
249
249
  e.onprogress = function() {
250
- var g = e.responseText.slice(b);
251
- b += g.length, o(g);
252
- }, e.onerror = function(g) {
253
- g.preventDefault(), r(new Error("NetworkError"));
250
+ var m = e.responseText.slice(b);
251
+ b += m.length, o(m);
252
+ }, e.onerror = function(m) {
253
+ m.preventDefault(), r(new Error("NetworkError"));
254
254
  }, e.onload = function() {
255
255
  r(null);
256
256
  }, e.onabort = function() {
257
257
  r(null);
258
258
  }, e.onreadystatechange = function() {
259
259
  if (e.readyState === u.HEADERS_RECEIVED) {
260
- var g = e.status, T = e.statusText;
261
- n(g, T, e.getResponseHeader("Content-Type"), new Me(e.getAllResponseHeaders()));
260
+ var m = e.status, T = e.statusText;
261
+ n(m, T, e.getResponseHeader("Content-Type"), new De(e.getAllResponseHeaders()));
262
262
  }
263
263
  }, e.withCredentials = s;
264
264
  for (var p in v) Object.prototype.hasOwnProperty.call(v, p) && e.setRequestHeader(p, v[p]);
265
265
  return e.send(), e;
266
266
  };
267
- function qe(e) {
267
+ function Ne(e) {
268
268
  this._headers = e;
269
269
  }
270
- qe.prototype.get = function(e) {
270
+ Ne.prototype.get = function(e) {
271
271
  return this._headers.get(e);
272
272
  };
273
- function Ne() {}
274
- Ne.prototype.open = function(e, n, o, r, l, s, v) {
275
- var b = null, p = new $(), g = p.signal, T = new D();
273
+ function Ge() {}
274
+ Ge.prototype.open = function(e, n, o, r, l, s, v) {
275
+ var b = null, p = new $(), m = p.signal, T = new D();
276
276
  return Q(l, {
277
277
  headers: v,
278
278
  credentials: s ? "include" : "same-origin",
279
- signal: g,
279
+ signal: m,
280
280
  cache: "no-store"
281
281
  }).then(function(f) {
282
- return b = f.body.getReader(), n(f.status, f.statusText, f.headers.get("Content-Type"), new qe(f.headers)), new W(function(w, F) {
282
+ return b = f.body.getReader(), n(f.status, f.statusText, f.headers.get("Content-Type"), new Ne(f.headers)), new k(function(w, F) {
283
283
  var ce = function() {
284
- b.read().then(function(C) {
285
- C.done ? w(void 0) : (o(T.decode(C.value, { stream: !0 })), ce());
286
- }).catch(function(C) {
287
- F(C);
284
+ b.read().then(function(j) {
285
+ j.done ? w(void 0) : (o(T.decode(j.value, { stream: !0 })), ce());
286
+ }).catch(function(j) {
287
+ F(j);
288
288
  });
289
289
  };
290
290
  ce();
@@ -300,7 +300,7 @@ __useblocks__.define("static/core/632d894f.js", [
300
300
  function ie() {
301
301
  this._listeners = Object.create(null);
302
302
  }
303
- function Ge(e) {
303
+ function Ue(e) {
304
304
  c(function() {
305
305
  throw e;
306
306
  }, 0);
@@ -313,7 +313,7 @@ __useblocks__.define("static/core/632d894f.js", [
313
313
  try {
314
314
  typeof l.handleEvent == "function" ? l.handleEvent(e) : l.call(this, e);
315
315
  } catch (s) {
316
- Ge(s);
316
+ Ue(s);
317
317
  }
318
318
  }
319
319
  }, ie.prototype.addEventListener = function(e, n) {
@@ -333,56 +333,56 @@ __useblocks__.define("static/core/632d894f.js", [
333
333
  function Z(e) {
334
334
  this.type = e, this.target = void 0;
335
335
  }
336
- function Ue(e, n) {
336
+ function Qe(e, n) {
337
337
  Z.call(this, e), this.data = n.data, this.lastEventId = n.lastEventId;
338
338
  }
339
- Ue.prototype = Object.create(Z.prototype);
339
+ Qe.prototype = Object.create(Z.prototype);
340
340
  function he(e, n) {
341
341
  Z.call(this, e), this.status = n.status, this.statusText = n.statusText, this.headers = n.headers;
342
342
  }
343
343
  he.prototype = Object.create(Z.prototype);
344
- function Qe(e, n) {
344
+ function Fe(e, n) {
345
345
  Z.call(this, e), this.error = n.error;
346
346
  }
347
- Qe.prototype = Object.create(Z.prototype);
348
- var ye = -1, k = 0, ee = 1, se = 2, ge = -1, J = 0, me = 1, Fe = 2, It = 3, _t = /^text\/event\-stream(;.*)?$/i, Pt = 1e3, Ot = 18e6, Se = function(e, n) {
347
+ Fe.prototype = Object.create(Z.prototype);
348
+ var ye = -1, W = 0, ee = 1, se = 2, ge = -1, J = 0, me = 1, Be = 2, It = 3, Pt = /^text\/event\-stream(;.*)?$/i, _t = 1e3, Ot = 18e6, Se = function(e, n) {
349
349
  var o = e == null ? n : parseInt(e, 10);
350
350
  return o !== o && (o = n), Te(o);
351
351
  }, Te = function(e) {
352
- return Math.min(Math.max(e, Pt), Ot);
352
+ return Math.min(Math.max(e, _t), Ot);
353
353
  }, te = function(e, n, o) {
354
354
  try {
355
355
  typeof n == "function" && n.call(e, o);
356
356
  } catch (r) {
357
- Ge(r);
357
+ Ue(r);
358
358
  }
359
359
  };
360
360
  function N(e, n) {
361
361
  ie.call(this), n = n || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, Rt(this, e, n);
362
362
  }
363
- function Ct() {
363
+ function jt() {
364
364
  return u != null && "withCredentials" in u.prototype || h == null ? new u() : new h();
365
365
  }
366
- var jt = Q != null && M != null && "body" in M.prototype;
366
+ var Ct = Q != null && M != null && "body" in M.prototype;
367
367
  function Rt(e, n, o) {
368
368
  n = String(n);
369
- var r = !!o.withCredentials, l = o.lastEventIdQueryParameterName || "lastEventId", s = Te(1e3), v = Se(o.heartbeatTimeout, 45e3), b = "", p = s, g = !1, T = 0, f = o.headers || {}, w = o.Transport, F = jt && w == null ? void 0 : new x(w != null ? new w() : Ct()), ce = w != null && typeof w != "string" ? new w() : F == null ? new Ne() : new De(), C = void 0, j = 0, G = ye, re = "", fe = "", B = "", ve = "", _ = J, be = 0, X = 0, Lt = function(A, E, R, L) {
370
- if (G === k) if (A === 200 && R != null && _t.test(R)) {
371
- G = ee, g = Date.now(), p = s, e.readyState = ee;
372
- var P = new he("open", {
369
+ var r = !!o.withCredentials, l = o.lastEventIdQueryParameterName || "lastEventId", s = Te(1e3), v = Se(o.heartbeatTimeout, 45e3), b = "", p = s, m = !1, T = 0, f = o.headers || {}, w = o.Transport, F = Ct && w == null ? void 0 : new X(w != null ? new w() : jt()), ce = w != null && typeof w != "string" ? new w() : F == null ? new Ge() : new qe(), j = void 0, C = 0, G = ye, re = "", fe = "", B = "", ve = "", P = J, be = 0, x = 0, Lt = function(A, E, R, L) {
370
+ if (G === W) if (A === 200 && R != null && Pt.test(R)) {
371
+ G = ee, m = Date.now(), p = s, e.readyState = ee;
372
+ var _ = new he("open", {
373
373
  status: A,
374
374
  statusText: E,
375
375
  headers: L
376
376
  });
377
- e.dispatchEvent(P), te(e, e.onopen, P);
377
+ e.dispatchEvent(_), te(e, e.onopen, _);
378
378
  } else {
379
379
  A !== 200 ? (E && (E = E.replace(/\s+/g, " ")), "" + A + E) : "" + (R == null ? "-" : R.replace(/\s+/g, " ")), we();
380
- var P = new he("error", {
380
+ var _ = new he("error", {
381
381
  status: A,
382
382
  statusText: E,
383
383
  headers: L
384
384
  });
385
- e.dispatchEvent(P), te(e, e.onerror, P);
385
+ e.dispatchEvent(_), te(e, e.onerror, _);
386
386
  }
387
387
  }, Mt = function(A) {
388
388
  if (G === ee) {
@@ -390,24 +390,24 @@ __useblocks__.define("static/core/632d894f.js", [
390
390
  var L = A.charCodeAt(R);
391
391
  (L === 10 || L === 13) && (E = R);
392
392
  }
393
- var P = (E !== -1 ? ve : "") + A.slice(0, E + 1);
394
- ve = (E === -1 ? ve : "") + A.slice(E + 1), A !== "" && (g = Date.now(), T += A.length);
395
- for (var I = 0; I < P.length; I += 1) {
396
- var L = P.charCodeAt(I);
397
- if (_ === ge && L === 10) _ = J;
398
- else if (_ === ge && (_ = J), L === 13 || L === 10) {
399
- if (_ !== J) {
400
- _ === me && (X = I + 1);
401
- var z = P.slice(be, X - 1), H = P.slice(X + (X < I && P.charCodeAt(X) === 32 ? 1 : 0), I);
393
+ var _ = (E !== -1 ? ve : "") + A.slice(0, E + 1);
394
+ ve = (E === -1 ? ve : "") + A.slice(E + 1), A !== "" && (m = Date.now(), T += A.length);
395
+ for (var I = 0; I < _.length; I += 1) {
396
+ var L = _.charCodeAt(I);
397
+ if (P === ge && L === 10) P = J;
398
+ else if (P === ge && (P = J), L === 13 || L === 10) {
399
+ if (P !== J) {
400
+ P === me && (x = I + 1);
401
+ var z = _.slice(be, x - 1), H = _.slice(x + (x < I && _.charCodeAt(x) === 32 ? 1 : 0), I);
402
402
  z === "data" ? (re += `
403
- `, re += H) : z === "id" ? fe = H : z === "event" ? B = H : z === "retry" ? (s = Se(H, s), p = s) : z === "heartbeatTimeout" && (v = Se(H, v), j !== 0 && (d(j), j = c(function() {
403
+ `, re += H) : z === "id" ? fe = H : z === "event" ? B = H : z === "retry" ? (s = Se(H, s), p = s) : z === "heartbeatTimeout" && (v = Se(H, v), C !== 0 && (d(C), C = c(function() {
404
404
  ue();
405
405
  }, v)));
406
406
  }
407
- if (_ === J) {
407
+ if (P === J) {
408
408
  if (re !== "") {
409
409
  b = fe, B === "" && (B = "message");
410
- var ne = new Ue(B, {
410
+ var ne = new Qe(B, {
411
411
  data: re.slice(1),
412
412
  lastEventId: fe
413
413
  });
@@ -415,34 +415,34 @@ __useblocks__.define("static/core/632d894f.js", [
415
415
  }
416
416
  re = "", B = "";
417
417
  }
418
- _ = L === 13 ? ge : J;
419
- } else _ === J && (be = I, _ = me), _ === me ? L === 58 && (X = I + 1, _ = Fe) : _ === Fe && (_ = It);
418
+ P = L === 13 ? ge : J;
419
+ } else P === J && (be = I, P = me), P === me ? L === 58 && (x = I + 1, P = Be) : P === Be && (P = It);
420
420
  }
421
421
  }
422
- }, ze = function(A) {
423
- if (G === ee || G === k) {
424
- G = ye, j !== 0 && (d(j), j = 0), j = c(function() {
422
+ }, He = function(A) {
423
+ if (G === ee || G === W) {
424
+ G = ye, C !== 0 && (d(C), C = 0), C = c(function() {
425
425
  ue();
426
- }, p), p = Te(Math.min(s * 16, p * 2)), e.readyState = k;
427
- var E = new Qe("error", { error: A });
426
+ }, p), p = Te(Math.min(s * 16, p * 2)), e.readyState = W;
427
+ var E = new Fe("error", { error: A });
428
428
  e.dispatchEvent(E), te(e, e.onerror, E);
429
429
  }
430
430
  }, we = function() {
431
- G = se, C != null && (C.abort(), C = void 0), j !== 0 && (d(j), j = 0), e.readyState = se;
431
+ G = se, j != null && (j.abort(), j = void 0), C !== 0 && (d(C), C = 0), e.readyState = se;
432
432
  }, ue = function() {
433
- if (j = 0, G !== ye) {
434
- if (!g && C != null) ze(new Error("No activity within " + v + " milliseconds. " + (G === k ? "No response received." : T + " chars received.") + " Reconnecting.")), C != null && (C.abort(), C = void 0);
433
+ if (C = 0, G !== ye) {
434
+ if (!m && j != null) He(new Error("No activity within " + v + " milliseconds. " + (G === W ? "No response received." : T + " chars received.") + " Reconnecting.")), j != null && (j.abort(), j = void 0);
435
435
  else {
436
- var A = Math.max((g || Date.now()) + v - Date.now(), 1);
437
- g = !1, j = c(function() {
436
+ var A = Math.max((m || Date.now()) + v - Date.now(), 1);
437
+ m = !1, C = c(function() {
438
438
  ue();
439
439
  }, A);
440
440
  }
441
441
  return;
442
442
  }
443
- g = !1, T = 0, j = c(function() {
443
+ m = !1, T = 0, C = c(function() {
444
444
  ue();
445
- }, v), G = k, re = "", B = "", fe = b, ve = "", be = 0, X = 0, _ = J;
445
+ }, v), G = W, re = "", B = "", fe = b, ve = "", be = 0, x = 0, P = J;
446
446
  var E = n;
447
447
  if (n.slice(0, 5) !== "data:" && n.slice(0, 5) !== "blob:" && b !== "") {
448
448
  var R = n.indexOf("?");
@@ -450,40 +450,40 @@ __useblocks__.define("static/core/632d894f.js", [
450
450
  return ne === l ? "" : H;
451
451
  }), E += (n.indexOf("?") === -1 ? "?" : "&") + l + "=" + encodeURIComponent(b);
452
452
  }
453
- var L = e.withCredentials, P = {};
454
- P.Accept = "text/event-stream";
453
+ var L = e.withCredentials, _ = {};
454
+ _.Accept = "text/event-stream";
455
455
  var I = e.headers;
456
- if (I != null) for (var z in I) Object.prototype.hasOwnProperty.call(I, z) && (P[z] = I[z]);
456
+ if (I != null) for (var z in I) Object.prototype.hasOwnProperty.call(I, z) && (_[z] = I[z]);
457
457
  try {
458
- C = ce.open(F, Lt, Mt, ze, E, L, P);
458
+ j = ce.open(F, Lt, Mt, He, E, L, _);
459
459
  } catch (H) {
460
460
  throw we(), H;
461
461
  }
462
462
  };
463
- e.url = n, e.readyState = k, e.withCredentials = r, e.headers = f, e._close = we, ue();
463
+ e.url = n, e.readyState = W, e.withCredentials = r, e.headers = f, e._close = we, ue();
464
464
  }
465
- N.prototype = Object.create(ie.prototype), N.prototype.CONNECTING = k, N.prototype.OPEN = ee, N.prototype.CLOSED = se, N.prototype.close = function() {
465
+ N.prototype = Object.create(ie.prototype), N.prototype.CONNECTING = W, N.prototype.OPEN = ee, N.prototype.CLOSED = se, N.prototype.close = function() {
466
466
  this._close();
467
- }, N.CONNECTING = k, N.OPEN = ee, N.CLOSED = se, N.prototype.withCredentials = void 0;
468
- var Be = U;
469
- u != null && (U == null || !("withCredentials" in U.prototype)) && (Be = N), (function(e) {
467
+ }, N.CONNECTING = W, N.OPEN = ee, N.CLOSED = se, N.prototype.withCredentials = void 0;
468
+ var ze = U;
469
+ u != null && (U == null || !("withCredentials" in U.prototype)) && (ze = N), (function(e) {
470
470
  if (typeof a == "object" && typeof a.exports == "object") {
471
471
  var n = e(t);
472
472
  n !== void 0 && (a.exports = n);
473
473
  } else typeof define == "function" && define.amd ? define(["exports"], e) : e(i);
474
474
  })(function(e) {
475
- e.EventSourcePolyfill = N, e.NativeEventSource = U, e.EventSource = Be;
475
+ e.EventSourcePolyfill = N, e.NativeEventSource = U, e.EventSource = ze;
476
476
  });
477
477
  })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : t : globalThis);
478
- })), Xe = _e();
478
+ })), xe = _e();
479
479
  function Ve({ candidates: t, headers: a, createEventSource: i, onMessage: c, onError: d }) {
480
480
  const u = t.filter(Boolean);
481
481
  let h = !1, S = null;
482
482
  const U = () => {
483
483
  S?.close(), S = null;
484
- }, O = (W) => {
484
+ }, O = (k) => {
485
485
  if (h) return;
486
- const Q = u[W];
486
+ const Q = u[k];
487
487
  if (!Q) {
488
488
  d?.(new Error("Failed to connect to EventSource through proxy chain"));
489
489
  return;
@@ -494,8 +494,8 @@ __useblocks__.define("static/core/632d894f.js", [
494
494
  h || S !== M || c(D);
495
495
  }, M.onerror = (D) => {
496
496
  if (!(h || S !== M)) {
497
- if (U(), W + 1 < u.length) {
498
- O(W + 1);
497
+ if (U(), k + 1 < u.length) {
498
+ O(k + 1);
499
499
  return;
500
500
  }
501
501
  d?.(D);
@@ -525,7 +525,7 @@ __useblocks__.define("static/core/632d894f.js", [
525
525
  results: []
526
526
  };
527
527
  }
528
- var Pe = y.createApi({
528
+ var Oe = y.createApi({
529
529
  reducerPath: "imageApi",
530
530
  baseQuery: void 0,
531
531
  endpoints: (t) => ({
@@ -581,7 +581,7 @@ __useblocks__.define("static/core/632d894f.js", [
581
581
  getAiImageSSE: t.query({
582
582
  queryFn: (a) => ({ data: [] }),
583
583
  async onCacheEntryAdded({ task_id: a, entity_id: i, setError: c }, d) {
584
- const { updateCachedData: u, cacheEntryRemoved: h } = d, S = y.getClient(d).baseUrl || y.normalizeBaseUrl("https://app.useblocks.io/api"), U = d.getState().configSlice?.config, O = y.di.getInstance(d, y.SECURITY_MODULE_ID) !== void 0, W = y.PLUGIN.isPlugin ? await y.di.getInstance(d, ae) : y.api.get(y.APP_COOKIES.em_token), Q = W ? { Authorization: `Bearer ${W}` } : {}, M = `${S}/ai-generator/v1/ai-status?entity_id=${i}&stream=1&task_id=${a}`, D = y.resolveBackendProxyRequestCandidates(M, {
584
+ const { updateCachedData: u, cacheEntryRemoved: h } = d, S = y.getClient(d).baseUrl || y.normalizeBaseUrl("https://app.useblocks.io/api"), U = d.getState().configSlice?.config, O = y.di.getInstance(d, y.SECURITY_MODULE_ID) !== void 0, k = y.PLUGIN.isPlugin ? await y.di.getInstance(d, ae) : y.api.get(y.APP_COOKIES.em_token), Q = k ? { Authorization: `Bearer ${k}` } : {}, M = `${S}/ai-generator/v1/ai-status?entity_id=${i}&stream=1&task_id=${a}`, D = y.resolveBackendProxyRequestCandidates(M, {
585
585
  config: U,
586
586
  method: "GET",
587
587
  requestType: "ai",
@@ -589,7 +589,7 @@ __useblocks__.define("static/core/632d894f.js", [
589
589
  }), Y = Ve({
590
590
  candidates: D.length > 0 ? D : [M],
591
591
  headers: Q,
592
- createEventSource: ($, K) => new Xe.EventSourcePolyfill($, K),
592
+ createEventSource: ($, K) => new xe.EventSourcePolyfill($, K),
593
593
  onMessage: ($) => {
594
594
  const K = JSON.parse($.data);
595
595
  u((le) => {
@@ -618,7 +618,7 @@ __useblocks__.define("static/core/632d894f.js", [
618
618
  }
619
619
  } })
620
620
  })
621
- }), { useLazyGetImageInfoQuery: et, useGetImageInfoQuery: qt, useGetSearchImageQuery: Nt, useLazyGetSearchImageQuery: tt, useSendAiImageRequestQuery: Gt, useLazySendAiImageRequestQuery: rt, useGetAiImageQuery: Ut, useLazyGetAiImageQuery: Qt, useGetUnsplashImageQuery: Ft, useLazyGetUnsplashImageQuery: nt, useGetSearchGifQuery: Bt, useLazyGetSearchGifQuery: at, useGetAiImageSSEQuery: zt, useLazyGetAiImageSSEQuery: ot } = Pe, it = "https://app.useblocks.io/api".replaceAll(/[\\/]$/g, ""), pe = "wp-json/limits/v1", st = "wp-json/subscription/v2", Oe = y.createApi({
621
+ }), { useLazyGetImageInfoQuery: et, useGetImageInfoQuery: qt, useGetSearchImageQuery: Nt, useLazyGetSearchImageQuery: tt, useSendAiImageRequestQuery: Gt, useLazySendAiImageRequestQuery: rt, useGetAiImageQuery: Ut, useLazyGetAiImageQuery: Qt, useGetUnsplashImageQuery: Ft, useLazyGetUnsplashImageQuery: nt, useGetSearchGifQuery: Bt, useLazyGetSearchGifQuery: at, useGetAiImageSSEQuery: zt, useLazyGetAiImageSSEQuery: ot } = Oe, it = "https://app.useblocks.io/api".replaceAll(/[\\/]$/g, ""), pe = "wp-json/limits/v1", st = "wp-json/subscription/v2", je = y.createApi({
622
622
  reducerPath: "limitsApi",
623
623
  baseQuery: y.fetchBaseQueryApp({ baseUrl: it }),
624
624
  tagTypes: [
@@ -659,19 +659,19 @@ __useblocks__.define("static/core/632d894f.js", [
659
659
  providesTags: ["SubscriptionMe"]
660
660
  })
661
661
  })
662
- }), { useGetLimitsStatsQuery: ct, useLazyGetLimitsStatsQuery: Ht, useGetLimitsStatsByTypeQuery: Wt, useLazyGetLimitsStatsByTypeQuery: ut, useGetLimitsWarningsQuery: dt, useLazyGetLimitsWarningsQuery: kt, useGetSubscriptionMeV2Query: Jt, useLazyGetSubscriptionMeV2Query: $t } = Oe, Ce = new URLSearchParams(window.location.search), je = Ce.get("tag"), lt = Ce.get("folder"), ft = y.createState({
662
+ }), { useGetLimitsStatsQuery: ct, useLazyGetLimitsStatsQuery: Ht, useGetLimitsStatsByTypeQuery: kt, useLazyGetLimitsStatsByTypeQuery: ut, useGetLimitsWarningsQuery: dt, useLazyGetLimitsWarningsQuery: Wt, useGetSubscriptionMeV2Query: Jt, useLazyGetSubscriptionMeV2Query: $t } = je, Ce = new URLSearchParams(window.location.search), Re = Ce.get("tag"), lt = Ce.get("folder"), ft = y.createState({
663
663
  activeModal: "",
664
664
  switchToPlanRequestTitle: "",
665
665
  secondModal: "",
666
666
  projectsTotal: "",
667
667
  projectsTotalPages: "",
668
668
  folders: [],
669
- activeTagId: je || null,
670
- activeFolderId: lt || (je ? null : "all"),
669
+ activeTagId: Re || null,
670
+ activeFolderId: lt || (Re ? null : "all"),
671
671
  activeTab: null,
672
672
  activeIntegration: null,
673
673
  addNewProjectInitialTitle: null
674
- }), V = "projectsPageSlice", Re = y.createSlice({
674
+ }), V = "projectsPageSlice", Le = y.createSlice({
675
675
  name: V,
676
676
  initialState: ft,
677
677
  reducers: {
@@ -719,148 +719,153 @@ __useblocks__.define("static/core/632d894f.js", [
719
719
  a.folders = i;
720
720
  });
721
721
  }
722
- }), { openModal: vt, openAddNewProjectModal: xt, setSwitchToPlanRequestTitle: pt, setActiveTab: ht, closeModal: yt, openSecondModal: gt, closeSecondModal: mt, setFolders: Xt, setActiveTagId: Vt, setActiveIntegration: Yt } = Re.actions, St = (t) => t[V].activeTab, Tt = (t) => t[V].activeModal, bt = (t) => t[V].secondModal, wt = (t) => t[V].projectsTotal, Et = (t) => t[V].activeIntegration;
723
- Object.defineProperty(m, "OAuthMixin", {
722
+ }), { openModal: vt, openAddNewProjectModal: Xt, setSwitchToPlanRequestTitle: pt, setActiveTab: ht, closeModal: yt, openSecondModal: gt, closeSecondModal: mt, setFolders: xt, setActiveTagId: Vt, setActiveIntegration: Yt } = Le.actions, St = (t) => t[V].activeTab, Tt = (t) => t[V].activeModal, bt = (t) => t[V].secondModal, wt = (t) => t[V].projectsTotal, Et = (t) => t[V].activeIntegration;
723
+ Object.defineProperty(g, "OAuthMixin", {
724
724
  enumerable: !0,
725
725
  get: function() {
726
- return xe;
726
+ return Xe;
727
727
  }
728
- }), Object.defineProperty(m, "TOKEN_ID", {
728
+ }), Object.defineProperty(g, "TOKEN_ID", {
729
729
  enumerable: !0,
730
730
  get: function() {
731
731
  return ae;
732
732
  }
733
- }), Object.defineProperty(m, "closeModal", {
733
+ }), Object.defineProperty(g, "closeModal", {
734
734
  enumerable: !0,
735
735
  get: function() {
736
736
  return yt;
737
737
  }
738
- }), Object.defineProperty(m, "closeSecondModal", {
738
+ }), Object.defineProperty(g, "closeSecondModal", {
739
739
  enumerable: !0,
740
740
  get: function() {
741
741
  return mt;
742
742
  }
743
- }), Object.defineProperty(m, "combineMixins", {
743
+ }), Object.defineProperty(g, "combineMixins", {
744
744
  enumerable: !0,
745
745
  get: function() {
746
746
  return We;
747
747
  }
748
- }), Object.defineProperty(m, "decodeJwt", {
748
+ }), Object.defineProperty(g, "decodeJwt", {
749
749
  enumerable: !0,
750
750
  get: function() {
751
751
  return Ie;
752
752
  }
753
- }), Object.defineProperty(m, "defineMixin", {
753
+ }), Object.defineProperty(g, "defineMixin", {
754
754
  enumerable: !0,
755
755
  get: function() {
756
756
  return Ae;
757
757
  }
758
- }), Object.defineProperty(m, "imageApi", {
758
+ }), Object.defineProperty(g, "imageApi", {
759
759
  enumerable: !0,
760
760
  get: function() {
761
- return Pe;
761
+ return Oe;
762
762
  }
763
- }), Object.defineProperty(m, "limitsApi", {
763
+ }), Object.defineProperty(g, "limitsApi", {
764
764
  enumerable: !0,
765
765
  get: function() {
766
- return Oe;
766
+ return je;
767
767
  }
768
- }), Object.defineProperty(m, "openModal", {
768
+ }), Object.defineProperty(g, "openModal", {
769
769
  enumerable: !0,
770
770
  get: function() {
771
771
  return vt;
772
772
  }
773
- }), Object.defineProperty(m, "openSecondModal", {
773
+ }), Object.defineProperty(g, "openSecondModal", {
774
774
  enumerable: !0,
775
775
  get: function() {
776
776
  return gt;
777
777
  }
778
- }), Object.defineProperty(m, "projectsPageSlice", {
778
+ }), Object.defineProperty(g, "projectsPageSlice", {
779
+ enumerable: !0,
780
+ get: function() {
781
+ return Le;
782
+ }
783
+ }), Object.defineProperty(g, "recreateTokenProvider", {
779
784
  enumerable: !0,
780
785
  get: function() {
781
- return Re;
786
+ return Pe;
782
787
  }
783
- }), Object.defineProperty(m, "require_eventsource", {
788
+ }), Object.defineProperty(g, "require_eventsource", {
784
789
  enumerable: !0,
785
790
  get: function() {
786
791
  return _e;
787
792
  }
788
- }), Object.defineProperty(m, "selectActiveIntegration", {
793
+ }), Object.defineProperty(g, "selectActiveIntegration", {
789
794
  enumerable: !0,
790
795
  get: function() {
791
796
  return Et;
792
797
  }
793
- }), Object.defineProperty(m, "selectActiveModal", {
798
+ }), Object.defineProperty(g, "selectActiveModal", {
794
799
  enumerable: !0,
795
800
  get: function() {
796
801
  return Tt;
797
802
  }
798
- }), Object.defineProperty(m, "selectActiveTab", {
803
+ }), Object.defineProperty(g, "selectActiveTab", {
799
804
  enumerable: !0,
800
805
  get: function() {
801
806
  return St;
802
807
  }
803
- }), Object.defineProperty(m, "selectProjectsTotal", {
808
+ }), Object.defineProperty(g, "selectProjectsTotal", {
804
809
  enumerable: !0,
805
810
  get: function() {
806
811
  return wt;
807
812
  }
808
- }), Object.defineProperty(m, "selectSecondModal", {
813
+ }), Object.defineProperty(g, "selectSecondModal", {
809
814
  enumerable: !0,
810
815
  get: function() {
811
816
  return bt;
812
817
  }
813
- }), Object.defineProperty(m, "setActiveTab", {
818
+ }), Object.defineProperty(g, "setActiveTab", {
814
819
  enumerable: !0,
815
820
  get: function() {
816
821
  return ht;
817
822
  }
818
- }), Object.defineProperty(m, "setSwitchToPlanRequestTitle", {
823
+ }), Object.defineProperty(g, "setSwitchToPlanRequestTitle", {
819
824
  enumerable: !0,
820
825
  get: function() {
821
826
  return pt;
822
827
  }
823
- }), Object.defineProperty(m, "useGetLimitsStatsQuery", {
828
+ }), Object.defineProperty(g, "useGetLimitsStatsQuery", {
824
829
  enumerable: !0,
825
830
  get: function() {
826
831
  return ct;
827
832
  }
828
- }), Object.defineProperty(m, "useGetLimitsWarningsQuery", {
833
+ }), Object.defineProperty(g, "useGetLimitsWarningsQuery", {
829
834
  enumerable: !0,
830
835
  get: function() {
831
836
  return dt;
832
837
  }
833
- }), Object.defineProperty(m, "useLazyGetAiImageSSEQuery", {
838
+ }), Object.defineProperty(g, "useLazyGetAiImageSSEQuery", {
834
839
  enumerable: !0,
835
840
  get: function() {
836
841
  return ot;
837
842
  }
838
- }), Object.defineProperty(m, "useLazyGetImageInfoQuery", {
843
+ }), Object.defineProperty(g, "useLazyGetImageInfoQuery", {
839
844
  enumerable: !0,
840
845
  get: function() {
841
846
  return et;
842
847
  }
843
- }), Object.defineProperty(m, "useLazyGetLimitsStatsByTypeQuery", {
848
+ }), Object.defineProperty(g, "useLazyGetLimitsStatsByTypeQuery", {
844
849
  enumerable: !0,
845
850
  get: function() {
846
851
  return ut;
847
852
  }
848
- }), Object.defineProperty(m, "useLazyGetSearchGifQuery", {
853
+ }), Object.defineProperty(g, "useLazyGetSearchGifQuery", {
849
854
  enumerable: !0,
850
855
  get: function() {
851
856
  return at;
852
857
  }
853
- }), Object.defineProperty(m, "useLazyGetSearchImageQuery", {
858
+ }), Object.defineProperty(g, "useLazyGetSearchImageQuery", {
854
859
  enumerable: !0,
855
860
  get: function() {
856
861
  return tt;
857
862
  }
858
- }), Object.defineProperty(m, "useLazyGetUnsplashImageQuery", {
863
+ }), Object.defineProperty(g, "useLazyGetUnsplashImageQuery", {
859
864
  enumerable: !0,
860
865
  get: function() {
861
866
  return nt;
862
867
  }
863
- }), Object.defineProperty(m, "useLazySendAiImageRequestQuery", {
868
+ }), Object.defineProperty(g, "useLazySendAiImageRequestQuery", {
864
869
  enumerable: !0,
865
870
  get: function() {
866
871
  return rt;