@metapages/metapage 1.4.2 → 1.4.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.
package/dist/index.js CHANGED
@@ -49,7 +49,7 @@ var Vt = { exports: {} };
49
49
  retryDelay: 1e3,
50
50
  retryOn: []
51
51
  };
52
- return r = Object.assign(a, r), function(f, c) {
52
+ return r = Object.assign(a, r), function(l, c) {
53
53
  var d = r.retries, y = r.retryDelay, w = r.retryOn;
54
54
  if (c && c.retries !== void 0)
55
55
  if (s(c.retries))
@@ -68,25 +68,25 @@ var Vt = { exports: {} };
68
68
  throw new i("retryOn property expects an array or function");
69
69
  return new Promise(function(_, S) {
70
70
  var v = function(b) {
71
- var A = typeof Request < "u" && f instanceof Request ? f.clone() : f;
72
- o(A, c).then(function(M) {
73
- if (Array.isArray(w) && w.indexOf(M.status) === -1)
74
- _(M);
71
+ var A = typeof Request < "u" && l instanceof Request ? l.clone() : l;
72
+ o(A, c).then(function(I) {
73
+ if (Array.isArray(w) && w.indexOf(I.status) === -1)
74
+ _(I);
75
75
  else if (typeof w == "function")
76
76
  try {
77
- return Promise.resolve(w(b, null, M)).then(function(R) {
78
- R ? x(b, null, M) : _(M);
77
+ return Promise.resolve(w(b, null, I)).then(function(R) {
78
+ R ? x(b, null, I) : _(I);
79
79
  }).catch(S);
80
80
  } catch (R) {
81
81
  S(R);
82
82
  }
83
83
  else
84
- b < d ? x(b, null, M) : _(M);
85
- }).catch(function(M) {
84
+ b < d ? x(b, null, I) : _(I);
85
+ }).catch(function(I) {
86
86
  if (typeof w == "function")
87
87
  try {
88
- Promise.resolve(w(b, M, null)).then(function(R) {
89
- R ? x(b, M, null) : S(M);
88
+ Promise.resolve(w(b, I, null)).then(function(R) {
89
+ R ? x(b, I, null) : S(I);
90
90
  }).catch(function(R) {
91
91
  S(R);
92
92
  });
@@ -94,11 +94,11 @@ var Vt = { exports: {} };
94
94
  S(R);
95
95
  }
96
96
  else
97
- b < d ? x(b, M, null) : S(M);
97
+ b < d ? x(b, I, null) : S(I);
98
98
  });
99
99
  };
100
- function x(b, A, M) {
101
- var R = typeof y == "function" ? y(b, A, M) : y;
100
+ function x(b, A, I) {
101
+ var R = typeof y == "function" ? y(b, A, I) : y;
102
102
  setTimeout(function() {
103
103
  v(++b);
104
104
  }, R);
@@ -193,7 +193,7 @@ function Ye(e, t) {
193
193
  const n = $(e);
194
194
  return (n ? Q(n) : e)[t];
195
195
  }
196
- function le(e, t) {
196
+ function fe(e, t) {
197
197
  return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
198
198
  }
199
199
  function it(e) {
@@ -293,10 +293,10 @@ function we(e, t, n, s, i) {
293
293
  if (s.length > 0) {
294
294
  const a = s.indexOf(r);
295
295
  if (r && typeof r == "object" && a !== -1)
296
- throw s[0] === r ? new Error("Forbids circular reference") : new Error(`Forbids circular reference: ~/${i.slice(0, a).map((u, f) => {
296
+ throw s[0] === r ? new Error("Forbids circular reference") : new Error(`Forbids circular reference: ~/${i.slice(0, a).map((u, l) => {
297
297
  if (typeof u == "symbol")
298
298
  return `[${u.toString()}]`;
299
- const c = s[f];
299
+ const c = s[l];
300
300
  return typeof u == "object" && (c instanceof Map || c instanceof Set) ? Array.from(c.keys()).indexOf(u) : u;
301
301
  }).join("/")}`);
302
302
  s.push(r), i.push(t);
@@ -354,8 +354,8 @@ function Xt(e, t, n) {
354
354
  if (ge(r)) {
355
355
  const u = $(r);
356
356
  K(u);
357
- const f = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
358
- Le(s ? i : e, o, f);
357
+ const l = !((a = u.assignedMap) === null || a === void 0) && a.size || u.operated ? u.copy : u.original;
358
+ Le(s ? i : e, o, l);
359
359
  } else
360
360
  Xt(r, t, n);
361
361
  }), i) {
@@ -388,45 +388,45 @@ function gt(e, t, n, s) {
388
388
  i && (i.callbacks || (i.callbacks = []), i.callbacks.push((o, r) => {
389
389
  var a;
390
390
  const u = e.type === 3 ? e.setMap : e.copy;
391
- if (le(pe(u, t), n)) {
392
- let f = i.original;
393
- i.copy && (f = i.copy), rt(e), ot(e, s, o, r), e.options.enableAutoFreeze && (e.options.updatedValues = (a = e.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), e.options.updatedValues.set(f, i.original)), Le(u, t, f);
391
+ if (fe(pe(u, t), n)) {
392
+ let l = i.original;
393
+ i.copy && (l = i.copy), rt(e), ot(e, s, o, r), e.options.enableAutoFreeze && (e.options.updatedValues = (a = e.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), e.options.updatedValues.set(l, i.original)), Le(u, t, l);
394
394
  }
395
395
  }), e.options.enableAutoFreeze && i.finalities !== e.finalities && (e.options.enableAutoFreeze = !1)), ee(n, e.options) && e.finalities.draft.push(() => {
396
396
  const o = e.type === 3 ? e.setMap : e.copy;
397
- le(pe(o, t), n) && Pn(e, t);
397
+ fe(pe(o, t), n) && Pn(e, t);
398
398
  });
399
399
  }
400
400
  function Tn(e, t, n, s, i) {
401
401
  let { original: o, assignedMap: r, options: a } = e, u = e.copy;
402
402
  u.length < o.length && ([o, u] = [u, o], [n, s] = [s, n]);
403
- for (let f = 0; f < o.length; f += 1)
404
- if (r.get(f.toString()) && u[f] !== o[f]) {
405
- const c = t.concat([f]), d = _e(c, i);
403
+ for (let l = 0; l < o.length; l += 1)
404
+ if (r.get(l.toString()) && u[l] !== o[l]) {
405
+ const c = t.concat([l]), d = _e(c, i);
406
406
  n.push({
407
407
  op: B.Replace,
408
408
  path: d,
409
409
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
410
- value: Be(u[f])
410
+ value: Be(u[l])
411
411
  }), s.push({
412
412
  op: B.Replace,
413
413
  path: d,
414
414
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
415
- value: Be(o[f])
415
+ value: Be(o[l])
416
416
  });
417
417
  }
418
- for (let f = o.length; f < u.length; f += 1) {
419
- const c = t.concat([f]), d = _e(c, i);
418
+ for (let l = o.length; l < u.length; l += 1) {
419
+ const c = t.concat([l]), d = _e(c, i);
420
420
  n.push({
421
421
  op: B.Add,
422
422
  path: d,
423
423
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
424
- value: Be(u[f])
424
+ value: Be(u[l])
425
425
  });
426
426
  }
427
427
  if (o.length < u.length) {
428
- const { arrayLengthAssignment: f = !0 } = a.enablePatches;
429
- if (f) {
428
+ const { arrayLengthAssignment: l = !0 } = a.enablePatches;
429
+ if (l) {
430
430
  const c = t.concat(["length"]), d = _e(c, i);
431
431
  s.push({
432
432
  op: B.Replace,
@@ -445,39 +445,39 @@ function Tn(e, t, n, s, i) {
445
445
  }
446
446
  function Dn({ original: e, copy: t, assignedMap: n }, s, i, o, r) {
447
447
  n.forEach((a, u) => {
448
- const f = pe(e, u), c = Be(pe(t, u)), d = a ? Ie(e, u) ? B.Replace : B.Add : B.Remove;
449
- if (le(f, c) && d === B.Replace)
448
+ const l = pe(e, u), c = Be(pe(t, u)), d = a ? Ie(e, u) ? B.Replace : B.Add : B.Remove;
449
+ if (fe(l, c) && d === B.Replace)
450
450
  return;
451
451
  const y = s.concat(u), w = _e(y, r);
452
- i.push(d === B.Remove ? { op: d, path: w } : { op: d, path: w, value: c }), o.push(d === B.Add ? { op: B.Remove, path: w } : d === B.Remove ? { op: B.Add, path: w, value: f } : { op: B.Replace, path: w, value: f });
452
+ i.push(d === B.Remove ? { op: d, path: w } : { op: d, path: w, value: c }), o.push(d === B.Add ? { op: B.Remove, path: w } : d === B.Remove ? { op: B.Add, path: w, value: l } : { op: B.Replace, path: w, value: l });
453
453
  });
454
454
  }
455
- function kn({ original: e, copy: t }, n, s, i, o) {
455
+ function Hn({ original: e, copy: t }, n, s, i, o) {
456
456
  let r = 0;
457
457
  e.forEach((a) => {
458
458
  if (!t.has(a)) {
459
- const u = n.concat([r]), f = _e(u, o);
459
+ const u = n.concat([r]), l = _e(u, o);
460
460
  s.push({
461
461
  op: B.Remove,
462
- path: f,
462
+ path: l,
463
463
  value: a
464
464
  }), i.unshift({
465
465
  op: B.Add,
466
- path: f,
466
+ path: l,
467
467
  value: a
468
468
  });
469
469
  }
470
470
  r += 1;
471
471
  }), r = 0, t.forEach((a) => {
472
472
  if (!e.has(a)) {
473
- const u = n.concat([r]), f = _e(u, o);
473
+ const u = n.concat([r]), l = _e(u, o);
474
474
  s.push({
475
475
  op: B.Add,
476
- path: f,
476
+ path: l,
477
477
  value: a
478
478
  }), i.unshift({
479
479
  op: B.Remove,
480
- path: f,
480
+ path: l,
481
481
  value: a
482
482
  });
483
483
  }
@@ -493,12 +493,12 @@ function $e(e, t, n, s) {
493
493
  case 1:
494
494
  return Tn(e, t, n, s, i);
495
495
  case 3:
496
- return kn(e, t, n, s, i);
496
+ return Hn(e, t, n, s, i);
497
497
  }
498
498
  }
499
- let Hn = !1;
499
+ let kn = !1;
500
500
  const Fe = (e, t, n = !1) => {
501
- if (typeof e == "object" && e !== null && (!ee(e, t) || n) && !Hn)
501
+ if (typeof e == "object" && e !== null && (!ee(e, t) || n) && !kn)
502
502
  throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
503
503
  }, at = {
504
504
  get size() {
@@ -509,7 +509,7 @@ const Fe = (e, t, n = !1) => {
509
509
  },
510
510
  set(e, t) {
511
511
  const n = $(this), s = Q(n);
512
- return (!s.has(e) || !le(s.get(e), t)) && (K(n), oe(n), n.assignedMap.set(e, !0), n.copy.set(e, t), gt(n, e, t, $e)), this;
512
+ return (!s.has(e) || !fe(s.get(e), t)) && (K(n), oe(n), n.assignedMap.set(e, !0), n.copy.set(e, t), gt(n, e, t, $e)), this;
513
513
  },
514
514
  delete(e) {
515
515
  if (!this.has(e))
@@ -588,8 +588,8 @@ const Fe = (e, t, n = !1) => {
588
588
  return o;
589
589
  const r = o.value;
590
590
  let a = e.setMap.get(r);
591
- const u = $(a), f = ((i = (s = e.options).mark) === null || i === void 0 ? void 0 : i.call(s, a, Y)) === Y.mutable;
592
- if (e.options.strict && Fe(r, e.options, f), !f && !u && ee(r, e.options) && !e.finalized && e.original.has(r)) {
591
+ const u = $(a), l = ((i = (s = e.options).mark) === null || i === void 0 ? void 0 : i.call(s, a, Y)) === Y.mutable;
592
+ if (e.options.strict && Fe(r, e.options, l), !l && !u && ee(r, e.options) && !e.finalized && e.original.has(r)) {
593
593
  const c = mt.createDraft({
594
594
  original: r,
595
595
  parentDraft: e,
@@ -679,30 +679,30 @@ const Fe = (e, t, n = !1) => {
679
679
  return e;
680
680
  let r;
681
681
  if (e.options.mark) {
682
- const f = t === "size" && (e.original instanceof Map || e.original instanceof Set) ? Reflect.get(e.original, t) : Reflect.get(e.original, t, n);
683
- if (r = e.options.mark(f, Y), r === Y.mutable)
684
- return e.options.strict && Fe(f, e.options, !0), f;
682
+ const l = t === "size" && (e.original instanceof Map || e.original instanceof Set) ? Reflect.get(e.original, t) : Reflect.get(e.original, t, n);
683
+ if (r = e.options.mark(l, Y), r === Y.mutable)
684
+ return e.options.strict && Fe(l, e.options, !0), l;
685
685
  }
686
686
  const a = Q(e);
687
687
  if (a instanceof Map && Nn.includes(t)) {
688
688
  if (t === "size")
689
689
  return Object.getOwnPropertyDescriptor(at, "size").get.call(e.proxy);
690
- const f = at[t];
691
- if (f)
692
- return f.bind(e.proxy);
690
+ const l = at[t];
691
+ if (l)
692
+ return l.bind(e.proxy);
693
693
  }
694
694
  if (a instanceof Set && jn.includes(t)) {
695
695
  if (t === "size")
696
696
  return Object.getOwnPropertyDescriptor(ut, "size").get.call(e.proxy);
697
- const f = ut[t];
698
- if (f)
699
- return f.bind(e.proxy);
697
+ const l = ut[t];
698
+ if (l)
699
+ return l.bind(e.proxy);
700
700
  }
701
701
  if (!Ie(a, t)) {
702
- const f = Lt(a, t);
703
- return f ? "value" in f ? f.value : (
702
+ const l = Lt(a, t);
703
+ return l ? "value" in l ? l.value : (
704
704
  // !case: support for getter
705
- (i = f.get) === null || i === void 0 ? void 0 : i.call(e.proxy)
705
+ (i = l.get) === null || i === void 0 ? void 0 : i.call(e.proxy)
706
706
  ) : void 0;
707
707
  }
708
708
  const u = a[t];
@@ -716,8 +716,8 @@ const Fe = (e, t, n = !1) => {
716
716
  finalities: e.finalities,
717
717
  options: e.options
718
718
  }), typeof r == "function") {
719
- const f = $(e.copy[t]);
720
- return K(f), oe(f), f.copy;
719
+ const l = $(e.copy[t]);
720
+ return K(l), oe(l), l.copy;
721
721
  }
722
722
  return e.copy[t];
723
723
  }
@@ -734,7 +734,7 @@ const Fe = (e, t, n = !1) => {
734
734
  if (o != null && o.set)
735
735
  return o.set.call(e.proxy, n), !0;
736
736
  const r = Ye(Q(e), t), a = $(r);
737
- return a && le(a.original, n) ? (e.copy[t] = n, e.assignedMap = (s = e.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), e.assignedMap.set(t, !1), !0) : (le(n, r) && (n !== void 0 || Ie(e.original, t)) || (K(e), oe(e), Ie(e.original, t) && le(n, e.original[t]) ? e.assignedMap.delete(t) : e.assignedMap.set(t, !0), e.copy[t] = n, gt(e, t, n, $e)), !0);
737
+ return a && fe(a.original, n) ? (e.copy[t] = n, e.assignedMap = (s = e.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), e.assignedMap.set(t, !1), !0) : (fe(n, r) && (n !== void 0 || Ie(e.original, t)) || (K(e), oe(e), Ie(e.original, t) && fe(n, e.original[t]) ? e.assignedMap.delete(t) : e.assignedMap.set(t, !0), e.copy[t] = n, gt(e, t, n, $e)), !0);
738
738
  },
739
739
  has(e, t) {
740
740
  return t in Q(e);
@@ -779,8 +779,8 @@ function bt(e) {
779
779
  setMap: r === 3 ? new Map(t.entries()) : void 0
780
780
  };
781
781
  (s || "key" in e) && (a.key = s);
782
- const { proxy: u, revoke: f } = Proxy.revocable(r === 1 ? Object.assign([], a) : a, Qt);
783
- if (i.revoke.push(f), qt.add(u), a.proxy = u, n) {
782
+ const { proxy: u, revoke: l } = Proxy.revocable(r === 1 ? Object.assign([], a) : a, Qt);
783
+ if (i.revoke.push(l), qt.add(u), a.proxy = u, n) {
784
784
  const c = n;
785
785
  c.finalities.draft.push((d, y) => {
786
786
  var w, _;
@@ -810,9 +810,9 @@ function Un(e, t, n, s, i) {
810
810
  if (r != null && r.operated)
811
811
  for (; r.finalities.draft.length > 0; )
812
812
  r.finalities.draft.pop()(n, s);
813
- const f = u ? t[0] : r ? r.operated ? r.copy : r.original : e;
814
- return r && it(r), i && we(f, f, r == null ? void 0 : r.options.updatedValues), [
815
- f,
813
+ const l = u ? t[0] : r ? r.operated ? r.copy : r.original : e;
814
+ return r && it(r), i && we(l, l, r == null ? void 0 : r.options.updatedValues), [
815
+ l,
816
816
  n && u ? [{ op: B.Replace, path: [], value: t[0] }] : n,
817
817
  s && u ? [{ op: B.Replace, path: [], value: a }] : s
818
818
  ];
@@ -835,8 +835,8 @@ function Bn(e, t) {
835
835
  return [
836
836
  a,
837
837
  (u = []) => {
838
- const [f, c, d] = Un(a, u, i, o, t.enableAutoFreeze);
839
- return t.enablePatches ? [f, c, d] : f;
838
+ const [l, c, d] = Un(a, u, i, o, t.enableAutoFreeze);
839
+ return t.enablePatches ? [l, c, d] : l;
840
840
  }
841
841
  ];
842
842
  }
@@ -846,12 +846,12 @@ function ct(e) {
846
846
  const u = $(r);
847
847
  if (u && t && u.finalities === t.finalities) {
848
848
  e.isContainDraft = !0;
849
- const f = u.original;
849
+ const l = u.original;
850
850
  if (a instanceof Set) {
851
851
  const c = Array.from(a);
852
- a.clear(), c.forEach((d) => a.add(o === d ? f : d));
852
+ a.clear(), c.forEach((d) => a.add(o === d ? l : d));
853
853
  } else
854
- Le(a, o, f);
854
+ Le(a, o, l);
855
855
  } else
856
856
  typeof r == "object" && r !== null && (e.value = r, e.isRoot = !1, ct(e));
857
857
  }), i && (e.isContainDraft || console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."), s && console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."));
@@ -877,7 +877,7 @@ function Yt(e) {
877
877
  } else
878
878
  s = e;
879
879
  return _t(s, (o, r) => {
880
- if (t && le(pe(t.original, o), r))
880
+ if (t && fe(pe(t.original, o), r))
881
881
  return;
882
882
  const a = Yt(r);
883
883
  a !== r && (s === e && i(), Le(s, o, a));
@@ -897,7 +897,7 @@ const Fn = (e) => {
897
897
  return function(R, ...D) {
898
898
  return t(R, (O) => n.call(this, O, ...D), s);
899
899
  };
900
- const u = n, f = s;
900
+ const u = n, l = s;
901
901
  let c = i;
902
902
  if (typeof s != "function" && (c = s), c !== void 0 && Object.prototype.toString.call(c) !== "[object Object]")
903
903
  throw new Error(`Invalid options: ${c}, 'options' should be an object.`);
@@ -926,14 +926,14 @@ const Fn = (e) => {
926
926
  }
927
927
  let A;
928
928
  try {
929
- A = f(x);
929
+ A = l(x);
930
930
  } catch (R) {
931
931
  throw it($(x)), R;
932
932
  }
933
- const M = (R) => {
933
+ const I = (R) => {
934
934
  const D = $(x);
935
935
  if (!ge(R)) {
936
- if (R !== void 0 && !le(R, x) && (D != null && D.operated))
936
+ if (R !== void 0 && !fe(R, x) && (D != null && D.operated))
937
937
  throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
938
938
  const L = R == null ? void 0 : R[Cn];
939
939
  if (L) {
@@ -957,18 +957,18 @@ const Fn = (e) => {
957
957
  }
958
958
  return b([R]);
959
959
  };
960
- return A instanceof Promise ? A.then(M, (R) => {
960
+ return A instanceof Promise ? A.then(I, (R) => {
961
961
  throw it($(x)), R;
962
- }) : M(A);
962
+ }) : I(A);
963
963
  };
964
- }, C = Fn();
964
+ }, M = Fn();
965
965
  Object.prototype.constructor.toString();
966
966
  const zn = dt(fetch), Zt = async (e, t) => {
967
967
  if (!e)
968
968
  throw "Metapage definition null";
969
- if (!e.version)
970
- throw 'Missing "version" key in metapage definition';
971
- if (!t)
969
+ if (e.version || (e = M(e, (s) => {
970
+ s.version = "0.3";
971
+ })), !t)
972
972
  throw 'Missing "version" argument';
973
973
  if (V(t, Je) > 0)
974
974
  try {
@@ -1018,14 +1018,14 @@ const zn = dt(fetch), Zt = async (e, t) => {
1018
1018
  throw `Unknow version ${n} to ${t}`;
1019
1019
  }
1020
1020
  return s;
1021
- }, Jn = (e) => C(e, (t) => {
1021
+ }, Jn = (e) => M(e, (t) => {
1022
1022
  t.version = "0.3";
1023
- }), Wn = (e) => C(e, (t) => {
1023
+ }), Wn = (e) => M(e, (t) => {
1024
1024
  t.version = "0.2";
1025
- }), Kn = (e) => C(e, (t) => {
1025
+ }), Kn = (e) => M(e, (t) => {
1026
1026
  const n = t;
1027
1027
  delete n.plugins, n.version = "1";
1028
- }), Xn = (e) => C(e, (t) => (t.version = "0.3", t)), Re = (e) => {
1028
+ }), Xn = (e) => M(e, (t) => (t.version = "0.3", t)), Re = (e) => {
1029
1029
  if (e === "latest")
1030
1030
  return Je;
1031
1031
  if (V(e, "0.2") < 0)
@@ -1063,8 +1063,9 @@ const zn = dt(fetch), Zt = async (e, t) => {
1063
1063
  }, Qn = async (e) => en(e, pt), Yn = (e, t) => {
1064
1064
  if (!e)
1065
1065
  throw "Metaframe definition null";
1066
- if (!e.version)
1067
- throw 'Missing "version" key in metaframe definition';
1066
+ e.version || (e = M(e, (i) => {
1067
+ i.version = "0.3";
1068
+ }));
1068
1069
  let n = ue(e.version);
1069
1070
  if (n === t)
1070
1071
  return e;
@@ -1103,11 +1104,11 @@ const zn = dt(fetch), Zt = async (e, t) => {
1103
1104
  }, Zn = async (e, t) => {
1104
1105
  if (e)
1105
1106
  return Qn(e);
1106
- }, es = (e) => C(e, (t) => {
1107
+ }, es = (e) => M(e, (t) => {
1107
1108
  t.version = "0.3", delete t.allow;
1108
- }), ts = (e) => C(e, (t) => {
1109
+ }), ts = (e) => M(e, (t) => {
1109
1110
  t.version = "0.4";
1110
- }), ns = (e) => C(e, (t) => {
1111
+ }), ns = (e) => M(e, (t) => {
1111
1112
  if (t.version = "0.5", !(t != null && t.metadata))
1112
1113
  return;
1113
1114
  const n = t.metadata.title;
@@ -1116,7 +1117,7 @@ const zn = dt(fetch), Zt = async (e, t) => {
1116
1117
  delete t.metadata.descriptionUrl, t.metadata.description = s;
1117
1118
  const i = t.metadata.keywords;
1118
1119
  delete t.metadata.keywords, t.metadata.tags = i;
1119
- }), ss = (e) => C(e, (t) => {
1120
+ }), ss = (e) => M(e, (t) => {
1120
1121
  if (t.version = "0.4", !(t != null && t.metadata))
1121
1122
  return;
1122
1123
  const n = t.metadata.name;
@@ -1125,16 +1126,16 @@ const zn = dt(fetch), Zt = async (e, t) => {
1125
1126
  delete t.metadata.description, t.metadata.descriptionUrl = s;
1126
1127
  const i = t.metadata.tags;
1127
1128
  delete t.metadata.tags, t.metadata.keywords = i;
1128
- }), is = (e) => C(e, (t) => {
1129
+ }), is = (e) => M(e, (t) => {
1129
1130
  var n;
1130
1131
  t.version = "1", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1131
- }), rs = (e) => C(e, (t) => {
1132
+ }), rs = (e) => M(e, (t) => {
1132
1133
  var n;
1133
1134
  t.version = "0.6", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1134
- }), os = (e) => C(e, (t) => {
1135
+ }), os = (e) => M(e, (t) => {
1135
1136
  var n;
1136
1137
  t.version = "0.6", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1137
- }), as = (e) => C(e, (t) => {
1138
+ }), as = (e) => M(e, (t) => {
1138
1139
  var n;
1139
1140
  t.version = "0.5", (n = t == null ? void 0 : t.metadata) != null && n.operations && delete t.metadata.operations;
1140
1141
  }), ue = (e) => {
@@ -1165,17 +1166,17 @@ var je = function(e) {
1165
1166
  }, de = function(e) {
1166
1167
  var t = e.length * 0.75, n = e.length, s, i = 0, o, r, a, u;
1167
1168
  e[e.length - 1] === "=" && (t--, e[e.length - 2] === "=" && t--);
1168
- var f = new ArrayBuffer(t), c = new Uint8Array(f);
1169
+ var l = new ArrayBuffer(t), c = new Uint8Array(l);
1169
1170
  for (s = 0; s < n; s += 4)
1170
1171
  o = Ee[e.charCodeAt(s)], r = Ee[e.charCodeAt(s + 1)], a = Ee[e.charCodeAt(s + 2)], u = Ee[e.charCodeAt(s + 3)], c[i++] = o << 2 | r >> 4, c[i++] = (r & 15) << 4 | a >> 2, c[i++] = (a & 3) << 6 | u & 63;
1171
- return f;
1172
+ return l;
1172
1173
  };
1173
- const We = async (e) => C(e, async (t) => {
1174
+ const We = async (e) => M(e, async (t) => {
1174
1175
  for (const n of Object.keys(e)) {
1175
1176
  const s = await us(e[n]);
1176
1177
  return t[n] = s, t;
1177
1178
  }
1178
- }), Ce = async (e) => C(e, async (t) => {
1179
+ }), Ce = async (e) => M(e, async (t) => {
1179
1180
  for (const n of Object.keys(e)) {
1180
1181
  const s = await tn(e[n]);
1181
1182
  return t[n] = s, t;
@@ -1307,10 +1308,10 @@ var X;
1307
1308
  (function(e) {
1308
1309
  e.InputsUpdate = "InputsUpdate", e.OutputsUpdate = "OutputsUpdate", e.SetupIframeClientRequest = "SetupIframeClientRequest", e.SetupIframeServerResponseAck = "SetupIframeServerResponseAck", e.HashParamsUpdate = "HashParamsUpdate";
1309
1310
  })(X || (X = {}));
1310
- var fe;
1311
+ var le;
1311
1312
  (function(e) {
1312
1313
  e.InputsUpdate = "InputsUpdate", e.MessageAck = "MessageAck", e.SetupIframeServerResponse = "SetupIframeServerResponse";
1313
- })(fe || (fe = {}));
1314
+ })(le || (le = {}));
1314
1315
  const Ri = -32700, Oi = -32600, Ai = -32601, Si = -32602, Ei = -32603;
1315
1316
  function Mi(e) {
1316
1317
  switch (typeof e) {
@@ -1330,30 +1331,30 @@ var nn = { exports: {} };
1330
1331
  function s() {
1331
1332
  }
1332
1333
  Object.create && (s.prototype = /* @__PURE__ */ Object.create(null), new s().__proto__ || (n = !1));
1333
- function i(u, f, c) {
1334
- this.fn = u, this.context = f, this.once = c || !1;
1334
+ function i(u, l, c) {
1335
+ this.fn = u, this.context = l, this.once = c || !1;
1335
1336
  }
1336
- function o(u, f, c, d, y) {
1337
+ function o(u, l, c, d, y) {
1337
1338
  if (typeof c != "function")
1338
1339
  throw new TypeError("The listener must be a function");
1339
- var w = new i(c, d || u, y), _ = n ? n + f : f;
1340
+ var w = new i(c, d || u, y), _ = n ? n + l : l;
1340
1341
  return u._events[_] ? u._events[_].fn ? u._events[_] = [u._events[_], w] : u._events[_].push(w) : (u._events[_] = w, u._eventsCount++), u;
1341
1342
  }
1342
- function r(u, f) {
1343
- --u._eventsCount === 0 ? u._events = new s() : delete u._events[f];
1343
+ function r(u, l) {
1344
+ --u._eventsCount === 0 ? u._events = new s() : delete u._events[l];
1344
1345
  }
1345
1346
  function a() {
1346
1347
  this._events = new s(), this._eventsCount = 0;
1347
1348
  }
1348
1349
  a.prototype.eventNames = function() {
1349
- var f = [], c, d;
1350
+ var l = [], c, d;
1350
1351
  if (this._eventsCount === 0)
1351
- return f;
1352
+ return l;
1352
1353
  for (d in c = this._events)
1353
- t.call(c, d) && f.push(n ? d.slice(1) : d);
1354
- return Object.getOwnPropertySymbols ? f.concat(Object.getOwnPropertySymbols(c)) : f;
1355
- }, a.prototype.listeners = function(f) {
1356
- var c = n ? n + f : f, d = this._events[c];
1354
+ t.call(c, d) && l.push(n ? d.slice(1) : d);
1355
+ return Object.getOwnPropertySymbols ? l.concat(Object.getOwnPropertySymbols(c)) : l;
1356
+ }, a.prototype.listeners = function(l) {
1357
+ var c = n ? n + l : l, d = this._events[c];
1357
1358
  if (!d)
1358
1359
  return [];
1359
1360
  if (d.fn)
@@ -1361,16 +1362,16 @@ var nn = { exports: {} };
1361
1362
  for (var y = 0, w = d.length, _ = new Array(w); y < w; y++)
1362
1363
  _[y] = d[y].fn;
1363
1364
  return _;
1364
- }, a.prototype.listenerCount = function(f) {
1365
- var c = n ? n + f : f, d = this._events[c];
1365
+ }, a.prototype.listenerCount = function(l) {
1366
+ var c = n ? n + l : l, d = this._events[c];
1366
1367
  return d ? d.fn ? 1 : d.length : 0;
1367
- }, a.prototype.emit = function(f, c, d, y, w, _) {
1368
- var S = n ? n + f : f;
1368
+ }, a.prototype.emit = function(l, c, d, y, w, _) {
1369
+ var S = n ? n + l : l;
1369
1370
  if (!this._events[S])
1370
1371
  return !1;
1371
1372
  var v = this._events[S], x = arguments.length, b, A;
1372
1373
  if (v.fn) {
1373
- switch (v.once && this.removeListener(f, v.fn, void 0, !0), x) {
1374
+ switch (v.once && this.removeListener(l, v.fn, void 0, !0), x) {
1374
1375
  case 1:
1375
1376
  return v.fn.call(v.context), !0;
1376
1377
  case 2:
@@ -1388,9 +1389,9 @@ var nn = { exports: {} };
1388
1389
  b[A - 1] = arguments[A];
1389
1390
  v.fn.apply(v.context, b);
1390
1391
  } else {
1391
- var M = v.length, R;
1392
- for (A = 0; A < M; A++)
1393
- switch (v[A].once && this.removeListener(f, v[A].fn, void 0, !0), x) {
1392
+ var I = v.length, R;
1393
+ for (A = 0; A < I; A++)
1394
+ switch (v[A].once && this.removeListener(l, v[A].fn, void 0, !0), x) {
1394
1395
  case 1:
1395
1396
  v[A].fn.call(v[A].context);
1396
1397
  break;
@@ -1411,12 +1412,12 @@ var nn = { exports: {} };
1411
1412
  }
1412
1413
  }
1413
1414
  return !0;
1414
- }, a.prototype.on = function(f, c, d) {
1415
- return o(this, f, c, d, !1);
1416
- }, a.prototype.once = function(f, c, d) {
1417
- return o(this, f, c, d, !0);
1418
- }, a.prototype.removeListener = function(f, c, d, y) {
1419
- var w = n ? n + f : f;
1415
+ }, a.prototype.on = function(l, c, d) {
1416
+ return o(this, l, c, d, !1);
1417
+ }, a.prototype.once = function(l, c, d) {
1418
+ return o(this, l, c, d, !0);
1419
+ }, a.prototype.removeListener = function(l, c, d, y) {
1420
+ var w = n ? n + l : l;
1420
1421
  if (!this._events[w])
1421
1422
  return this;
1422
1423
  if (!c)
@@ -1430,22 +1431,22 @@ var nn = { exports: {} };
1430
1431
  v.length ? this._events[w] = v.length === 1 ? v[0] : v : r(this, w);
1431
1432
  }
1432
1433
  return this;
1433
- }, a.prototype.removeAllListeners = function(f) {
1434
+ }, a.prototype.removeAllListeners = function(l) {
1434
1435
  var c;
1435
- return f ? (c = n ? n + f : f, this._events[c] && r(this, c)) : (this._events = new s(), this._eventsCount = 0), this;
1436
+ return l ? (c = n ? n + l : l, this._events[c] && r(this, c)) : (this._events = new s(), this._eventsCount = 0), this;
1436
1437
  }, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = n, a.EventEmitter = a, e.exports = a;
1437
1438
  })(nn);
1438
1439
  var vt = nn.exports;
1439
1440
  function cs(e) {
1440
1441
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1441
1442
  }
1442
- var fs = function(e, t) {
1443
+ var ls = function(e, t) {
1443
1444
  t || (t = {}), typeof t == "function" && (t = { cmp: t });
1444
1445
  var n = typeof t.cycles == "boolean" ? t.cycles : !1, s = t.cmp && /* @__PURE__ */ function(o) {
1445
1446
  return function(r) {
1446
1447
  return function(a, u) {
1447
- var f = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1448
- return o(f, c);
1448
+ var l = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1449
+ return o(l, c);
1449
1450
  };
1450
1451
  };
1451
1452
  }(t.cmp), i = [];
@@ -1468,16 +1469,16 @@ var fs = function(e, t) {
1468
1469
  return JSON.stringify("__cycle__");
1469
1470
  throw new TypeError("Converting circular structure to JSON");
1470
1471
  }
1471
- var f = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1472
+ var l = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1472
1473
  for (u = "", a = 0; a < c.length; a++) {
1473
1474
  var d = c[a], y = o(r[d]);
1474
1475
  y && (u && (u += ","), u += JSON.stringify(d) + ":" + y);
1475
1476
  }
1476
- return i.splice(f, 1), "{" + u + "}";
1477
+ return i.splice(l, 1), "{" + u + "}";
1477
1478
  }
1478
1479
  }(e);
1479
1480
  };
1480
- const ls = /* @__PURE__ */ cs(fs), ps = (e) => sn(ls(e)), hs = (e) => {
1481
+ const fs = /* @__PURE__ */ cs(ls), ps = (e) => sn(fs(e)), hs = (e) => {
1481
1482
  if (e && e.length > 0)
1482
1483
  return JSON.parse(rn(e));
1483
1484
  }, sn = (e) => btoa(encodeURIComponent(e)), rn = (e) => decodeURIComponent(atob(e)), on = (e) => {
@@ -1521,7 +1522,7 @@ const ls = /* @__PURE__ */ cs(fs), ps = (e) => sn(ls(e)), hs = (e) => {
1521
1522
  return e;
1522
1523
  const r = Object.keys(i);
1523
1524
  r.sort();
1524
- const a = r.map((u, f) => `${u}=${encodeURI(i[u])}`).join("&");
1525
+ const a = r.map((u, l) => `${u}=${encodeURI(i[u])}`).join("&");
1525
1526
  return `${s}?${a}`;
1526
1527
  }, _s = (e, t) => {
1527
1528
  const n = Pe(e, t);
@@ -1554,8 +1555,8 @@ var xs = function(e, t) {
1554
1555
  var n = typeof t.cycles == "boolean" ? t.cycles : !1, s = t.cmp && function(o) {
1555
1556
  return function(r) {
1556
1557
  return function(a, u) {
1557
- var f = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1558
- return o(f, c);
1558
+ var l = { key: a, value: r[a] }, c = { key: u, value: r[u] };
1559
+ return o(l, c);
1559
1560
  };
1560
1561
  };
1561
1562
  }(t.cmp), i = [];
@@ -1578,12 +1579,12 @@ var xs = function(e, t) {
1578
1579
  return JSON.stringify("__cycle__");
1579
1580
  throw new TypeError("Converting circular structure to JSON");
1580
1581
  }
1581
- var f = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1582
+ var l = i.push(r) - 1, c = Object.keys(r).sort(s && s(r));
1582
1583
  for (u = "", a = 0; a < c.length; a++) {
1583
1584
  var d = c[a], y = o(r[d]);
1584
1585
  y && (u && (u += ","), u += JSON.stringify(d) + ":" + y);
1585
1586
  }
1586
- return i.splice(f, 1), "{" + u + "}";
1587
+ return i.splice(l, 1), "{" + u + "}";
1587
1588
  }
1588
1589
  }(e);
1589
1590
  };
@@ -1598,13 +1599,13 @@ const Ls = () => {
1598
1599
  } catch {
1599
1600
  return !1;
1600
1601
  }
1601
- }, fn = {
1602
+ }, ln = {
1602
1603
  version: Je,
1603
1604
  metaframes: {}
1604
1605
  };
1605
1606
  class Ps extends vt.EventEmitter {
1606
1607
  constructor() {
1607
- super(), this._definition = fn, this.getDefinition = this.getDefinition.bind(this);
1608
+ super(), this._definition = ln, this.getDefinition = this.getDefinition.bind(this);
1608
1609
  }
1609
1610
  error(t) {
1610
1611
  throw "Subclass should implement";
@@ -1613,16 +1614,16 @@ class Ps extends vt.EventEmitter {
1613
1614
  return this._definition;
1614
1615
  }
1615
1616
  }
1616
- const ze = (e, t) => t ? C(e, (n) => {
1617
+ const ze = (e, t) => t ? M(e, (n) => {
1617
1618
  Object.keys(t).forEach((s) => {
1618
1619
  t[s] === void 0 ? delete n[s] : n[s] = t[s];
1619
1620
  });
1620
- }) : e, Ii = (e) => window.location.search ? new URLSearchParams(window.location.search).get(e) : null, Ci = () => new URLSearchParams(window.location.search).has(xe.mp_debug), ft = () => {
1621
+ }) : e, Ii = (e) => window.location.search ? new URLSearchParams(window.location.search).get(e) : null, Ci = () => new URLSearchParams(window.location.search).has(xe.mp_debug), lt = () => {
1621
1622
  const e = new URLSearchParams(window.location.search).get(xe.mp_debug);
1622
1623
  return e === "true" || e === "1";
1623
- }, $i = (e = 8) => wt(e), Ts = (e = 8) => wt(e), xi = (e = 8) => wt(e), kt = "abcdefghijklmnopqrstuvwxyz0123456789", wt = (e = 8) => {
1624
- for (var t = "", n = kt.length, s = 0; s < e; s++)
1625
- t += kt.charAt(Math.floor(Math.random() * n));
1624
+ }, $i = (e = 8) => wt(e), Ts = (e = 8) => wt(e), xi = (e = 8) => wt(e), Ht = "abcdefghijklmnopqrstuvwxyz0123456789", wt = (e = 8) => {
1625
+ for (var t = "", n = Ht.length, s = 0; s < e; s++)
1626
+ t += Ht.charAt(Math.floor(Math.random() * n));
1626
1627
  return t;
1627
1628
  }, Rt = (e, t, n) => {
1628
1629
  t = t || "000", t && t.trim() == "" && (t = void 0);
@@ -1632,12 +1633,12 @@ const ze = (e, t) => t ? C(e, (n) => {
1632
1633
  n && (i = `${i}; background: #${n}`), s = `%c${s}`, window.console.log(s, i);
1633
1634
  } else
1634
1635
  window.console.log(s);
1635
- }, ln = (e) => ks(Ds(e)), Ds = (e) => {
1636
+ }, fn = (e) => Hs(Ds(e)), Ds = (e) => {
1636
1637
  var t = 0;
1637
1638
  for (let n = 0; n < e.length; n++)
1638
1639
  t = e.charCodeAt(n) + ((t << 5) - t);
1639
1640
  return t;
1640
- }, ks = (e) => {
1641
+ }, Hs = (e) => {
1641
1642
  var t = (e & 16777215).toString(16).toUpperCase();
1642
1643
  return "00000".substring(0, 6 - t.length) + t;
1643
1644
  }, Ze = () => document.readyState == "complete" || document.readyState == "interactive", Ot = async () => Ze() ? Promise.resolve() : new Promise((e) => {
@@ -1675,7 +1676,7 @@ var U;
1675
1676
  })(U || (U = {}));
1676
1677
  class te extends vt.EventEmitter {
1677
1678
  constructor(t) {
1678
- if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = re.WaitingForPageLoad, this._messageSendCount = 0, this.debug = ft(), this.isInputOutputBlobSerialization = !0, this.id = window.name, this.debug = ft(), this._isIframe = Ls(), this.addListener = this.addListener.bind(this), this.dispose = this.dispose.bind(this), this.error = this.error.bind(this), this.getInput = this.getInput.bind(this), this.getInputs = this.getInputs.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.onInput = this.onInput.bind(this), this.onInputs = this.onInputs.bind(this), this.onMessage = this.onMessage.bind(this), this.sendRpc = this.sendRpc.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInternalInputsAndNotify = this.setInternalInputsAndNotify.bind(this), this.setOutput = this.setOutput.bind(this), this.setOutputs = this.setOutputs.bind(this), this.warn = this.warn.bind(this), this._resolveSetupIframeServerResponse = this._resolveSetupIframeServerResponse.bind(this), this.addListenerReturnDisposer = this.addListenerReturnDisposer.bind(this), this.connected = this.connected.bind(this), this.isConnected = this.isConnected.bind(this), this.disableNotifyOnHashUrlChange = this.disableNotifyOnHashUrlChange.bind(this), this._onHashUrlChange = this._onHashUrlChange.bind(this), this.setParameter = this.setParameter.bind(this), this.setParameterBoolean = this.setParameterBoolean.bind(this), this.setParameterJson = this.setParameterJson.bind(this), this.setParameterBase64 = this.setParameterBase64.bind(this), this.setParameterFloat = this.setParameterFloat.bind(this), this.setParameterInt = this.setParameterInt.bind(this), this.getParameter = this.getParameter.bind(this), this.getParameterBoolean = this.getParameterBoolean.bind(this), this.getParameterJson = this.getParameterJson.bind(this), this.getParameterBase64 = this.getParameterBase64.bind(this), this.getParameterFloat = this.getParameterFloat.bind(this), this.getParameterInt = this.getParameterInt.bind(this), this.deleteParameter = this.deleteParameter.bind(this), !this._isIframe) {
1679
+ if (super(), this._inputPipeValues = {}, this._outputPipeValues = {}, this._state = re.WaitingForPageLoad, this._messageSendCount = 0, this.debug = lt(), this.isInputOutputBlobSerialization = !0, this.id = window.name, this.debug = lt(), this._isIframe = Ls(), this.addListener = this.addListener.bind(this), this.dispose = this.dispose.bind(this), this.error = this.error.bind(this), this.getInput = this.getInput.bind(this), this.getInputs = this.getInputs.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.onInput = this.onInput.bind(this), this.onInputs = this.onInputs.bind(this), this.onMessage = this.onMessage.bind(this), this.sendRpc = this.sendRpc.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInternalInputsAndNotify = this.setInternalInputsAndNotify.bind(this), this.setOutput = this.setOutput.bind(this), this.setOutputs = this.setOutputs.bind(this), this.warn = this.warn.bind(this), this._resolveSetupIframeServerResponse = this._resolveSetupIframeServerResponse.bind(this), this.addListenerReturnDisposer = this.addListenerReturnDisposer.bind(this), this.connected = this.connected.bind(this), this.isConnected = this.isConnected.bind(this), this.disableNotifyOnHashUrlChange = this.disableNotifyOnHashUrlChange.bind(this), this._onHashUrlChange = this._onHashUrlChange.bind(this), this.setParameter = this.setParameter.bind(this), this.setParameterBoolean = this.setParameterBoolean.bind(this), this.setParameterJson = this.setParameterJson.bind(this), this.setParameterBase64 = this.setParameterBase64.bind(this), this.setParameterFloat = this.setParameterFloat.bind(this), this.setParameterInt = this.setParameterInt.bind(this), this.getParameter = this.getParameter.bind(this), this.getParameterBoolean = this.getParameterBoolean.bind(this), this.getParameterJson = this.getParameterJson.bind(this), this.getParameterBase64 = this.getParameterBase64.bind(this), this.getParameterFloat = this.getParameterFloat.bind(this), this.getParameterInt = this.getParameterInt.bind(this), this.deleteParameter = this.deleteParameter.bind(this), !this._isIframe) {
1679
1680
  this.log("Not an iframe, metaframe code disabled");
1680
1681
  return;
1681
1682
  }
@@ -1689,7 +1690,7 @@ class te extends vt.EventEmitter {
1689
1690
  _resolveSetupIframeServerResponse(t) {
1690
1691
  if (this._state === re.WaitingForPageLoad)
1691
1692
  throw "Got message but page has not finished loading, we should never get in this state";
1692
- (async () => this._parentId ? this.log("Got JsonRpcMethods.SetupIframeServerResponse but already resolved") : (this._parentVersion = t.version, this.color = ln(this.id), this._parentId = t.parentId, this.log(`metapage[${this._parentId}](v${this._parentVersion ? this._parentVersion : "unknown"}) registered`), t.state && t.state.inputs && (this.isInputOutputBlobSerialization ? this._inputPipeValues = await Ce(t.state.inputs) : this._inputPipeValues = t.state.inputs), this._state = re.Ready, this.sendRpc(X.SetupIframeServerResponseAck, {
1693
+ (async () => this._parentId ? this.log("Got JsonRpcMethods.SetupIframeServerResponse but already resolved") : (this._parentVersion = t.version, this.color = fn(this.id), this._parentId = t.parentId, this.log(`metapage[${this._parentId}](v${this._parentVersion ? this._parentVersion : "unknown"}) registered`), t.state && t.state.inputs && (this.isInputOutputBlobSerialization ? this._inputPipeValues = await Ce(t.state.inputs) : this._inputPipeValues = t.state.inputs), this._state = re.Ready, this.sendRpc(X.SetupIframeServerResponseAck, {
1693
1694
  version: te.version
1694
1695
  }), this._inputPipeValues && Object.keys(this._inputPipeValues).length > 0 && (this.emit(U.Inputs, this._inputPipeValues), this.listenerCount(U.Input) > 0 && Object.keys(this._inputPipeValues).forEach((n) => this.emit(U.Input, n, this._inputPipeValues[n]))), this.emit(U.Connected), this.sendRpc(X.OutputsUpdate, this._outputPipeValues)))();
1695
1696
  }
@@ -1812,20 +1813,20 @@ class te extends vt.EventEmitter {
1812
1813
  let s = t.data;
1813
1814
  if (s.jsonrpc === "2.0") {
1814
1815
  var n = s.method;
1815
- if (!(n == fe.SetupIframeServerResponse || s.parentId == this._parentId && s.iframeId == this.id)) {
1816
+ if (!(n == le.SetupIframeServerResponse || s.parentId == this._parentId && s.iframeId == this.id)) {
1816
1817
  this.log(`window.message: received message but jsonrpc.parentId=${s.parentId} _parentId=${this._parentId} jsonrpc.iframeId=${s.iframeId} id=${this.id}`);
1817
1818
  return;
1818
1819
  }
1819
1820
  switch (n) {
1820
- case fe.SetupIframeServerResponse:
1821
+ case le.SetupIframeServerResponse:
1821
1822
  this._resolveSetupIframeServerResponse(s.params);
1822
1823
  break;
1823
- case fe.InputsUpdate:
1824
+ case le.InputsUpdate:
1824
1825
  if (this._state !== re.Ready)
1825
1826
  throw "Got InputsUpdate but metaframe is not MetaframeLoadingState.Ready";
1826
1827
  this.setInternalInputsAndNotify(s.params.inputs);
1827
1828
  break;
1828
- case fe.MessageAck:
1829
+ case le.MessageAck:
1829
1830
  this.debug && this.log(`ACK: ${JSON.stringify(s)}`);
1830
1831
  break;
1831
1832
  default:
@@ -1885,9 +1886,9 @@ te.MESSAGE = U.Message;
1885
1886
  te.deserializeInputs = Ce;
1886
1887
  te.serializeInputs = We;
1887
1888
  var Ke = {};
1888
- const ie = "\\\\/", Ht = `[^${ie}]`, ce = "\\.", Hs = "\\+", Ns = "\\?", Xe = "\\/", js = "(?=.)", hn = "[^/]", At = `(?:${Xe}|$)`, dn = `(?:^|${Xe})`, St = `${ce}{1,2}${At}`, Us = `(?!${ce})`, Bs = `(?!${dn}${St})`, Fs = `(?!${ce}{0,1}${At})`, zs = `(?!${St})`, Gs = `[^.${Xe}]`, Vs = `${hn}*?`, Js = "/", mn = {
1889
+ const ie = "\\\\/", kt = `[^${ie}]`, ce = "\\.", ks = "\\+", Ns = "\\?", Xe = "\\/", js = "(?=.)", hn = "[^/]", At = `(?:${Xe}|$)`, dn = `(?:^|${Xe})`, St = `${ce}{1,2}${At}`, Us = `(?!${ce})`, Bs = `(?!${dn}${St})`, Fs = `(?!${ce}{0,1}${At})`, zs = `(?!${St})`, Gs = `[^.${Xe}]`, Vs = `${hn}*?`, Js = "/", mn = {
1889
1890
  DOT_LITERAL: ce,
1890
- PLUS_LITERAL: Hs,
1891
+ PLUS_LITERAL: ks,
1891
1892
  QMARK_LITERAL: Ns,
1892
1893
  SLASH_LITERAL: Xe,
1893
1894
  ONE_CHAR: js,
@@ -1905,8 +1906,8 @@ const ie = "\\\\/", Ht = `[^${ie}]`, ce = "\\.", Hs = "\\+", Ns = "\\?", Xe = "\
1905
1906
  }, Ws = {
1906
1907
  ...mn,
1907
1908
  SLASH_LITERAL: `[${ie}]`,
1908
- QMARK: Ht,
1909
- STAR: `${Ht}*?`,
1909
+ QMARK: kt,
1910
+ STAR: `${kt}*?`,
1910
1911
  DOTS_SLASH: `${ce}{1,2}(?:[${ie}]|$)`,
1911
1912
  NO_DOT: `(?!${ce})`,
1912
1913
  NO_DOTS: `(?!(?:^|[${ie}])${ce}{1,2}(?:[${ie}]|$))`,
@@ -2073,8 +2074,8 @@ var qe = {
2073
2074
  let a = o;
2074
2075
  return a.startsWith("./") && (a = a.slice(2), r.prefix = "./"), a;
2075
2076
  }, e.wrapOutput = (o, r = {}, a = {}) => {
2076
- const u = a.contains ? "" : "^", f = a.contains ? "" : "$";
2077
- let c = `${u}(?:${o})${f}`;
2077
+ const u = a.contains ? "" : "^", l = a.contains ? "" : "$";
2078
+ let c = `${u}(?:${o})${l}`;
2078
2079
  return r.negated === !0 && (c = `(?:^(?!${c}).*$)`), c;
2079
2080
  }, e.basename = (o, { windows: r } = {}) => r ? o.replace(/[\\/]$/, "").replace(/.*[\\/]/, "") : o.replace(/\/$/, "").replace(/.*\//, "");
2080
2081
  })(Ke);
@@ -2113,37 +2114,37 @@ const Nt = Ke, {
2113
2114
  e.isPrefix !== !0 && (e.depth = e.isGlobstar ? 1 / 0 : 1);
2114
2115
  }, ti = (e, t) => {
2115
2116
  const n = t || {}, s = e.length - 1, i = n.parts === !0 || n.scanToEnd === !0, o = [], r = [], a = [];
2116
- let u = e, f = -1, c = 0, d = 0, y = !1, w = !1, _ = !1, S = !1, v = !1, x = !1, b = !1, A = !1, M = !1, R = 0, D, O, L = { value: "", depth: 0, isGlob: !1 };
2117
- const z = () => f >= s, h = () => u.charCodeAt(f + 1), H = () => (D = O, u.charCodeAt(++f));
2118
- for (; f < s; ) {
2119
- O = H();
2117
+ let u = e, l = -1, c = 0, d = 0, y = !1, w = !1, _ = !1, S = !1, v = !1, x = !1, b = !1, A = !1, I = !1, R = 0, D, O, L = { value: "", depth: 0, isGlob: !1 };
2118
+ const z = () => l >= s, h = () => u.charCodeAt(l + 1), k = () => (D = O, u.charCodeAt(++l));
2119
+ for (; l < s; ) {
2120
+ O = k();
2120
2121
  let J;
2121
2122
  if (O === Me) {
2122
- b = L.backslashes = !0, O = H(), O === nt && (x = !0);
2123
+ b = L.backslashes = !0, O = k(), O === nt && (x = !0);
2123
2124
  continue;
2124
2125
  }
2125
2126
  if (x === !0 || O === nt) {
2126
- for (R++; z() !== !0 && (O = H()); ) {
2127
+ for (R++; z() !== !0 && (O = k()); ) {
2127
2128
  if (O === Me) {
2128
- b = L.backslashes = !0, H();
2129
+ b = L.backslashes = !0, k();
2129
2130
  continue;
2130
2131
  }
2131
2132
  if (O === nt) {
2132
2133
  R++;
2133
2134
  continue;
2134
2135
  }
2135
- if (x !== !0 && O === tt && (O = H()) === tt) {
2136
- if (y = L.isBrace = !0, _ = L.isGlob = !0, M = !0, i === !0)
2136
+ if (x !== !0 && O === tt && (O = k()) === tt) {
2137
+ if (y = L.isBrace = !0, _ = L.isGlob = !0, I = !0, i === !0)
2137
2138
  continue;
2138
2139
  break;
2139
2140
  }
2140
2141
  if (x !== !0 && O === qs) {
2141
- if (y = L.isBrace = !0, _ = L.isGlob = !0, M = !0, i === !0)
2142
+ if (y = L.isBrace = !0, _ = L.isGlob = !0, I = !0, i === !0)
2142
2143
  continue;
2143
2144
  break;
2144
2145
  }
2145
2146
  if (O === Zs && (R--, R === 0)) {
2146
- x = !1, y = L.isBrace = !0, M = !0;
2147
+ x = !1, y = L.isBrace = !0, I = !0;
2147
2148
  break;
2148
2149
  }
2149
2150
  }
@@ -2152,24 +2153,24 @@ const Nt = Ke, {
2152
2153
  break;
2153
2154
  }
2154
2155
  if (O === yn) {
2155
- if (o.push(f), r.push(L), L = { value: "", depth: 0, isGlob: !1 }, M === !0)
2156
+ if (o.push(l), r.push(L), L = { value: "", depth: 0, isGlob: !1 }, I === !0)
2156
2157
  continue;
2157
- if (D === tt && f === c + 1) {
2158
+ if (D === tt && l === c + 1) {
2158
2159
  c += 2;
2159
2160
  continue;
2160
2161
  }
2161
- d = f + 1;
2162
+ d = l + 1;
2162
2163
  continue;
2163
2164
  }
2164
2165
  if (n.noext !== !0 && (O === Ys || O === Xs || O === et || O === Ut || O === jt) === !0 && h() === st) {
2165
- if (_ = L.isGlob = !0, S = L.isExtglob = !0, M = !0, i === !0) {
2166
- for (; z() !== !0 && (O = H()); ) {
2166
+ if (_ = L.isGlob = !0, S = L.isExtglob = !0, I = !0, i === !0) {
2167
+ for (; z() !== !0 && (O = k()); ) {
2167
2168
  if (O === Me) {
2168
- b = L.backslashes = !0, O = H();
2169
+ b = L.backslashes = !0, O = k();
2169
2170
  continue;
2170
2171
  }
2171
2172
  if (O === Bt) {
2172
- _ = L.isGlob = !0, M = !0;
2173
+ _ = L.isGlob = !0, I = !0;
2173
2174
  break;
2174
2175
  }
2175
2176
  }
@@ -2178,40 +2179,40 @@ const Nt = Ke, {
2178
2179
  break;
2179
2180
  }
2180
2181
  if (O === et) {
2181
- if (D === et && (v = L.isGlobstar = !0), _ = L.isGlob = !0, M = !0, i === !0)
2182
+ if (D === et && (v = L.isGlobstar = !0), _ = L.isGlob = !0, I = !0, i === !0)
2182
2183
  continue;
2183
2184
  break;
2184
2185
  }
2185
2186
  if (O === Ut) {
2186
- if (_ = L.isGlob = !0, M = !0, i === !0)
2187
+ if (_ = L.isGlob = !0, I = !0, i === !0)
2187
2188
  continue;
2188
2189
  break;
2189
2190
  }
2190
2191
  if (O === Qs)
2191
- for (; z() !== !0 && (J = H()); ) {
2192
+ for (; z() !== !0 && (J = k()); ) {
2192
2193
  if (J === Me) {
2193
- b = L.backslashes = !0, H();
2194
+ b = L.backslashes = !0, k();
2194
2195
  continue;
2195
2196
  }
2196
2197
  if (J === ei) {
2197
- if (w = L.isBracket = !0, _ = L.isGlob = !0, M = !0, i === !0)
2198
+ if (w = L.isBracket = !0, _ = L.isGlob = !0, I = !0, i === !0)
2198
2199
  continue;
2199
2200
  break;
2200
2201
  }
2201
2202
  }
2202
- if (n.nonegate !== !0 && O === jt && f === c) {
2203
+ if (n.nonegate !== !0 && O === jt && l === c) {
2203
2204
  A = L.negated = !0, c++;
2204
2205
  continue;
2205
2206
  }
2206
2207
  if (n.noparen !== !0 && O === st) {
2207
2208
  if (_ = L.isGlob = !0, i === !0) {
2208
- for (; z() !== !0 && (O = H()); ) {
2209
+ for (; z() !== !0 && (O = k()); ) {
2209
2210
  if (O === st) {
2210
- b = L.backslashes = !0, O = H();
2211
+ b = L.backslashes = !0, O = k();
2211
2212
  continue;
2212
2213
  }
2213
2214
  if (O === Bt) {
2214
- M = !0;
2215
+ I = !0;
2215
2216
  break;
2216
2217
  }
2217
2218
  }
@@ -2220,20 +2221,20 @@ const Nt = Ke, {
2220
2221
  break;
2221
2222
  }
2222
2223
  if (_ === !0) {
2223
- if (M = !0, i === !0)
2224
+ if (I = !0, i === !0)
2224
2225
  continue;
2225
2226
  break;
2226
2227
  }
2227
2228
  }
2228
2229
  n.noext === !0 && (S = !1, _ = !1);
2229
- let k = u, he = "", l = "";
2230
- c > 0 && (he = u.slice(0, c), u = u.slice(c), d -= c), k && _ === !0 && d > 0 ? (k = u.slice(0, d), l = u.slice(d)) : _ === !0 ? (k = "", l = u) : k = u, k && k !== "" && k !== "/" && k !== u && Ft(k.charCodeAt(k.length - 1)) && (k = k.slice(0, -1)), n.unescape === !0 && (l && (l = Nt.removeBackslashes(l)), k && b === !0 && (k = Nt.removeBackslashes(k)));
2230
+ let H = u, he = "", f = "";
2231
+ c > 0 && (he = u.slice(0, c), u = u.slice(c), d -= c), H && _ === !0 && d > 0 ? (H = u.slice(0, d), f = u.slice(d)) : _ === !0 ? (H = "", f = u) : H = u, H && H !== "" && H !== "/" && H !== u && Ft(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), n.unescape === !0 && (f && (f = Nt.removeBackslashes(f)), H && b === !0 && (H = Nt.removeBackslashes(H)));
2231
2232
  const p = {
2232
2233
  prefix: he,
2233
2234
  input: e,
2234
2235
  start: c,
2235
- base: k,
2236
- glob: l,
2236
+ base: H,
2237
+ glob: f,
2237
2238
  isBrace: y,
2238
2239
  isBracket: w,
2239
2240
  isGlob: _,
@@ -2281,7 +2282,7 @@ const Ge = qe, Z = Ke, {
2281
2282
  let i = e.length;
2282
2283
  if (i > s)
2283
2284
  throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);
2284
- const o = { type: "bos", value: "", output: n.prepend || "" }, r = [o], a = n.capture ? "" : "?:", u = Ge.globChars(n.windows), f = Ge.extglobChars(u), {
2285
+ const o = { type: "bos", value: "", output: n.prepend || "" }, r = [o], a = n.capture ? "" : "?:", u = Ge.globChars(n.windows), l = Ge.extglobChars(u), {
2285
2286
  DOT_LITERAL: c,
2286
2287
  PLUS_LITERAL: d,
2287
2288
  SLASH_LITERAL: y,
@@ -2292,10 +2293,10 @@ const Ge = qe, Z = Ke, {
2292
2293
  NO_DOTS_SLASH: x,
2293
2294
  QMARK: b,
2294
2295
  QMARK_NO_DOT: A,
2295
- STAR: M,
2296
+ STAR: I,
2296
2297
  START_ANCHOR: R
2297
2298
  } = u, D = (g) => `(${a}(?:(?!${R}${g.dot ? _ : c}).)*?)`, O = n.dot ? "" : S, L = n.dot ? b : A;
2298
- let z = n.bash === !0 ? D(n) : M;
2299
+ let z = n.bash === !0 ? D(n) : I;
2299
2300
  n.capture && (z = `(${z})`), typeof n.noext == "boolean" && (n.noextglob = n.noext);
2300
2301
  const h = {
2301
2302
  input: e,
@@ -2315,8 +2316,8 @@ const Ge = qe, Z = Ke, {
2315
2316
  tokens: r
2316
2317
  };
2317
2318
  e = Z.removePrefix(e, h), i = e.length;
2318
- const H = [], k = [], he = [];
2319
- let l = o, p;
2319
+ const k = [], H = [], he = [];
2320
+ let f = o, p;
2320
2321
  const J = () => h.index === i - 1, T = h.peek = (g = 1) => e[h.index + g], se = h.advance = () => e[++h.index], ae = () => e.slice(h.index + 1), q = (g = "", N = 0) => {
2321
2322
  h.consumed += g, h.index += N;
2322
2323
  }, Te = (g) => {
@@ -2330,28 +2331,28 @@ const Ge = qe, Z = Ke, {
2330
2331
  h[g]++, he.push(g);
2331
2332
  }, me = (g) => {
2332
2333
  h[g]--, he.pop();
2333
- }, I = (g) => {
2334
- if (l.type === "globstar") {
2335
- const N = h.braces > 0 && (g.type === "comma" || g.type === "brace"), m = g.extglob === !0 || H.length && (g.type === "pipe" || g.type === "paren");
2336
- g.type !== "slash" && g.type !== "paren" && !N && !m && (h.output = h.output.slice(0, -l.output.length), l.type = "star", l.value = "*", l.output = z, h.output += l.output);
2334
+ }, C = (g) => {
2335
+ if (f.type === "globstar") {
2336
+ const N = h.braces > 0 && (g.type === "comma" || g.type === "brace"), m = g.extglob === !0 || k.length && (g.type === "pipe" || g.type === "paren");
2337
+ g.type !== "slash" && g.type !== "paren" && !N && !m && (h.output = h.output.slice(0, -f.output.length), f.type = "star", f.value = "*", f.output = z, h.output += f.output);
2337
2338
  }
2338
- if (H.length && g.type !== "paren" && !f[g.value] && (H[H.length - 1].inner += g.value), (g.value || g.output) && Te(g), l && l.type === "text" && g.type === "text") {
2339
- l.value += g.value, l.output = (l.output || "") + g.value;
2339
+ if (k.length && g.type !== "paren" && !l[g.value] && (k[k.length - 1].inner += g.value), (g.value || g.output) && Te(g), f && f.type === "text" && g.type === "text") {
2340
+ f.value += g.value, f.output = (f.output || "") + g.value;
2340
2341
  return;
2341
2342
  }
2342
- g.prev = l, r.push(g), l = g;
2343
- }, ke = (g, N) => {
2344
- const m = { ...f[N], conditions: 1, inner: "" };
2345
- m.prev = l, m.parens = h.parens, m.output = h.output;
2343
+ g.prev = f, r.push(g), f = g;
2344
+ }, He = (g, N) => {
2345
+ const m = { ...l[N], conditions: 1, inner: "" };
2346
+ m.prev = f, m.parens = h.parens, m.output = h.output;
2346
2347
  const P = (n.capture ? "(" : "") + m.open;
2347
- De("parens"), I({ type: g, value: N, output: h.output ? "" : w }), I({ type: "paren", extglob: !0, value: se(), output: P }), H.push(m);
2348
+ De("parens"), C({ type: g, value: N, output: h.output ? "" : w }), C({ type: "paren", extglob: !0, value: se(), output: P }), k.push(m);
2348
2349
  }, Rn = (g) => {
2349
2350
  let N = g.close + (n.capture ? ")" : "");
2350
2351
  if (g.type === "negate") {
2351
2352
  let m = z;
2352
2353
  g.inner && g.inner.length > 1 && g.inner.includes("/") && (m = D(n)), (m !== z || J() || /^\)+$/.test(ae())) && (N = g.close = `)$))${m}`), g.prev.type === "bos" && J() && (h.negatedExtglob = !0);
2353
2354
  }
2354
- I({ type: "paren", extglob: !0, value: p, output: N }), me("parens");
2355
+ C({ type: "paren", extglob: !0, value: p, output: N }), me("parens");
2355
2356
  };
2356
2357
  if (n.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
2357
2358
  let g = !1, N = e.replace(ri, (m, P, j, W, G, Qe) => W === "\\" ? (g = !0, m) : W === "?" ? P ? P + W + (G ? b.repeat(G.length) : "") : Qe === 0 ? L + (G ? b.repeat(G.length) : "") : b.repeat(j.length) : W === "." ? c.repeat(j.length) : W === "*" ? P ? P + W + (G ? z : "") : z : P ? m : `\\${m}`);
@@ -2365,51 +2366,51 @@ const Ge = qe, Z = Ke, {
2365
2366
  if (m === "/" && n.bash !== !0 || m === "." || m === ";")
2366
2367
  continue;
2367
2368
  if (!m) {
2368
- p += "\\", I({ type: "text", value: p });
2369
+ p += "\\", C({ type: "text", value: p });
2369
2370
  continue;
2370
2371
  }
2371
2372
  const P = /^\\+/.exec(ae());
2372
2373
  let j = 0;
2373
2374
  if (P && P[0].length > 2 && (j = P[0].length, h.index += j, j % 2 !== 0 && (p += "\\")), n.unescape === !0 ? p = se() || "" : p += se() || "", h.brackets === 0) {
2374
- I({ type: "text", value: p });
2375
+ C({ type: "text", value: p });
2375
2376
  continue;
2376
2377
  }
2377
2378
  }
2378
- if (h.brackets > 0 && (p !== "]" || l.value === "[" || l.value === "[^")) {
2379
+ if (h.brackets > 0 && (p !== "]" || f.value === "[" || f.value === "[^")) {
2379
2380
  if (n.posix !== !1 && p === ":") {
2380
- const m = l.value.slice(1);
2381
- if (m.includes("[") && (l.posix = !0, m.includes(":"))) {
2382
- const P = l.value.lastIndexOf("["), j = l.value.slice(0, P), W = l.value.slice(P + 2), G = si[W];
2381
+ const m = f.value.slice(1);
2382
+ if (m.includes("[") && (f.posix = !0, m.includes(":"))) {
2383
+ const P = f.value.lastIndexOf("["), j = f.value.slice(0, P), W = f.value.slice(P + 2), G = si[W];
2383
2384
  if (G) {
2384
- l.value = j + G, h.backtrack = !0, se(), !o.output && r.indexOf(l) === 1 && (o.output = w);
2385
+ f.value = j + G, h.backtrack = !0, se(), !o.output && r.indexOf(f) === 1 && (o.output = w);
2385
2386
  continue;
2386
2387
  }
2387
2388
  }
2388
2389
  }
2389
- (p === "[" && T() !== ":" || p === "-" && T() === "]") && (p = `\\${p}`), p === "]" && (l.value === "[" || l.value === "[^") && (p = `\\${p}`), n.posix === !0 && p === "!" && l.value === "[" && (p = "^"), l.value += p, Te({ value: p });
2390
+ (p === "[" && T() !== ":" || p === "-" && T() === "]") && (p = `\\${p}`), p === "]" && (f.value === "[" || f.value === "[^") && (p = `\\${p}`), n.posix === !0 && p === "!" && f.value === "[" && (p = "^"), f.value += p, Te({ value: p });
2390
2391
  continue;
2391
2392
  }
2392
2393
  if (h.quotes === 1 && p !== '"') {
2393
- p = Z.escapeRegex(p), l.value += p, Te({ value: p });
2394
+ p = Z.escapeRegex(p), f.value += p, Te({ value: p });
2394
2395
  continue;
2395
2396
  }
2396
2397
  if (p === '"') {
2397
- h.quotes = h.quotes === 1 ? 0 : 1, n.keepQuotes === !0 && I({ type: "text", value: p });
2398
+ h.quotes = h.quotes === 1 ? 0 : 1, n.keepQuotes === !0 && C({ type: "text", value: p });
2398
2399
  continue;
2399
2400
  }
2400
2401
  if (p === "(") {
2401
- De("parens"), I({ type: "paren", value: p });
2402
+ De("parens"), C({ type: "paren", value: p });
2402
2403
  continue;
2403
2404
  }
2404
2405
  if (p === ")") {
2405
2406
  if (h.parens === 0 && n.strictBrackets === !0)
2406
2407
  throw new SyntaxError(ve("opening", "("));
2407
- const m = H[H.length - 1];
2408
+ const m = k[k.length - 1];
2408
2409
  if (m && h.parens === m.parens + 1) {
2409
- Rn(H.pop());
2410
+ Rn(k.pop());
2410
2411
  continue;
2411
2412
  }
2412
- I({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }), me("parens");
2413
+ C({ type: "paren", value: p, output: h.parens ? ")" : "\\)" }), me("parens");
2413
2414
  continue;
2414
2415
  }
2415
2416
  if (p === "[") {
@@ -2419,30 +2420,30 @@ const Ge = qe, Z = Ke, {
2419
2420
  p = `\\${p}`;
2420
2421
  } else
2421
2422
  De("brackets");
2422
- I({ type: "bracket", value: p });
2423
+ C({ type: "bracket", value: p });
2423
2424
  continue;
2424
2425
  }
2425
2426
  if (p === "]") {
2426
- if (n.nobracket === !0 || l && l.type === "bracket" && l.value.length === 1) {
2427
- I({ type: "text", value: p, output: `\\${p}` });
2427
+ if (n.nobracket === !0 || f && f.type === "bracket" && f.value.length === 1) {
2428
+ C({ type: "text", value: p, output: `\\${p}` });
2428
2429
  continue;
2429
2430
  }
2430
2431
  if (h.brackets === 0) {
2431
2432
  if (n.strictBrackets === !0)
2432
2433
  throw new SyntaxError(ve("opening", "["));
2433
- I({ type: "text", value: p, output: `\\${p}` });
2434
+ C({ type: "text", value: p, output: `\\${p}` });
2434
2435
  continue;
2435
2436
  }
2436
2437
  me("brackets");
2437
- const m = l.value.slice(1);
2438
- if (l.posix !== !0 && m[0] === "^" && !m.includes("/") && (p = `/${p}`), l.value += p, Te({ value: p }), n.literalBrackets === !1 || Z.hasRegexChars(m))
2438
+ const m = f.value.slice(1);
2439
+ if (f.posix !== !0 && m[0] === "^" && !m.includes("/") && (p = `/${p}`), f.value += p, Te({ value: p }), n.literalBrackets === !1 || Z.hasRegexChars(m))
2439
2440
  continue;
2440
- const P = Z.escapeRegex(l.value);
2441
- if (h.output = h.output.slice(0, -l.value.length), n.literalBrackets === !0) {
2442
- h.output += P, l.value = P;
2441
+ const P = Z.escapeRegex(f.value);
2442
+ if (h.output = h.output.slice(0, -f.value.length), n.literalBrackets === !0) {
2443
+ h.output += P, f.value = P;
2443
2444
  continue;
2444
2445
  }
2445
- l.value = `(${a}${P}|${l.value})`, h.output += l.value;
2446
+ f.value = `(${a}${P}|${f.value})`, h.output += f.value;
2446
2447
  continue;
2447
2448
  }
2448
2449
  if (p === "{" && n.nobrace !== !0) {
@@ -2454,13 +2455,13 @@ const Ge = qe, Z = Ke, {
2454
2455
  outputIndex: h.output.length,
2455
2456
  tokensIndex: h.tokens.length
2456
2457
  };
2457
- k.push(m), I(m);
2458
+ H.push(m), C(m);
2458
2459
  continue;
2459
2460
  }
2460
2461
  if (p === "}") {
2461
- const m = k[k.length - 1];
2462
+ const m = H[H.length - 1];
2462
2463
  if (n.nobrace === !0 || !m) {
2463
- I({ type: "text", value: p, output: p });
2464
+ C({ type: "text", value: p, output: p });
2464
2465
  continue;
2465
2466
  }
2466
2467
  let P = ")";
@@ -2476,64 +2477,64 @@ const Ge = qe, Z = Ke, {
2476
2477
  for (const G of W)
2477
2478
  h.output += G.output || G.value;
2478
2479
  }
2479
- I({ type: "brace", value: p, output: P }), me("braces"), k.pop();
2480
+ C({ type: "brace", value: p, output: P }), me("braces"), H.pop();
2480
2481
  continue;
2481
2482
  }
2482
2483
  if (p === "|") {
2483
- H.length > 0 && H[H.length - 1].conditions++, I({ type: "text", value: p });
2484
+ k.length > 0 && k[k.length - 1].conditions++, C({ type: "text", value: p });
2484
2485
  continue;
2485
2486
  }
2486
2487
  if (p === ",") {
2487
2488
  let m = p;
2488
- const P = k[k.length - 1];
2489
- P && he[he.length - 1] === "braces" && (P.comma = !0, m = "|"), I({ type: "comma", value: p, output: m });
2489
+ const P = H[H.length - 1];
2490
+ P && he[he.length - 1] === "braces" && (P.comma = !0, m = "|"), C({ type: "comma", value: p, output: m });
2490
2491
  continue;
2491
2492
  }
2492
2493
  if (p === "/") {
2493
- if (l.type === "dot" && h.index === h.start + 1) {
2494
- h.start = h.index + 1, h.consumed = "", h.output = "", r.pop(), l = o;
2494
+ if (f.type === "dot" && h.index === h.start + 1) {
2495
+ h.start = h.index + 1, h.consumed = "", h.output = "", r.pop(), f = o;
2495
2496
  continue;
2496
2497
  }
2497
- I({ type: "slash", value: p, output: y });
2498
+ C({ type: "slash", value: p, output: y });
2498
2499
  continue;
2499
2500
  }
2500
2501
  if (p === ".") {
2501
- if (h.braces > 0 && l.type === "dot") {
2502
- l.value === "." && (l.output = c);
2503
- const m = k[k.length - 1];
2504
- l.type = "dots", l.output += p, l.value += p, m.dots = !0;
2502
+ if (h.braces > 0 && f.type === "dot") {
2503
+ f.value === "." && (f.output = c);
2504
+ const m = H[H.length - 1];
2505
+ f.type = "dots", f.output += p, f.value += p, m.dots = !0;
2505
2506
  continue;
2506
2507
  }
2507
- if (h.braces + h.parens === 0 && l.type !== "bos" && l.type !== "slash") {
2508
- I({ type: "text", value: p, output: c });
2508
+ if (h.braces + h.parens === 0 && f.type !== "bos" && f.type !== "slash") {
2509
+ C({ type: "text", value: p, output: c });
2509
2510
  continue;
2510
2511
  }
2511
- I({ type: "dot", value: p, output: c });
2512
+ C({ type: "dot", value: p, output: c });
2512
2513
  continue;
2513
2514
  }
2514
2515
  if (p === "?") {
2515
- if (!(l && l.value === "(") && n.noextglob !== !0 && T() === "(" && T(2) !== "?") {
2516
- ke("qmark", p);
2516
+ if (!(f && f.value === "(") && n.noextglob !== !0 && T() === "(" && T(2) !== "?") {
2517
+ He("qmark", p);
2517
2518
  continue;
2518
2519
  }
2519
- if (l && l.type === "paren") {
2520
+ if (f && f.type === "paren") {
2520
2521
  const P = T();
2521
2522
  let j = p;
2522
2523
  if (P === "<" && !Z.supportsLookbehinds())
2523
2524
  throw new Error("Node.js v10 or higher is required for regex lookbehinds");
2524
- (l.value === "(" && !/[!=<:]/.test(P) || P === "<" && !/<([!=]|\w+>)/.test(ae())) && (j = `\\${p}`), I({ type: "text", value: p, output: j });
2525
+ (f.value === "(" && !/[!=<:]/.test(P) || P === "<" && !/<([!=]|\w+>)/.test(ae())) && (j = `\\${p}`), C({ type: "text", value: p, output: j });
2525
2526
  continue;
2526
2527
  }
2527
- if (n.dot !== !0 && (l.type === "slash" || l.type === "bos")) {
2528
- I({ type: "qmark", value: p, output: A });
2528
+ if (n.dot !== !0 && (f.type === "slash" || f.type === "bos")) {
2529
+ C({ type: "qmark", value: p, output: A });
2529
2530
  continue;
2530
2531
  }
2531
- I({ type: "qmark", value: p, output: b });
2532
+ C({ type: "qmark", value: p, output: b });
2532
2533
  continue;
2533
2534
  }
2534
2535
  if (p === "!") {
2535
2536
  if (n.noextglob !== !0 && T() === "(" && (T(2) !== "?" || !/[!=<:]/.test(T(3)))) {
2536
- ke("negate", p);
2537
+ He("negate", p);
2537
2538
  continue;
2538
2539
  }
2539
2540
  if (n.nonegate !== !0 && h.index === 0) {
@@ -2543,94 +2544,94 @@ const Ge = qe, Z = Ke, {
2543
2544
  }
2544
2545
  if (p === "+") {
2545
2546
  if (n.noextglob !== !0 && T() === "(" && T(2) !== "?") {
2546
- ke("plus", p);
2547
+ He("plus", p);
2547
2548
  continue;
2548
2549
  }
2549
- if (l && l.value === "(" || n.regex === !1) {
2550
- I({ type: "plus", value: p, output: d });
2550
+ if (f && f.value === "(" || n.regex === !1) {
2551
+ C({ type: "plus", value: p, output: d });
2551
2552
  continue;
2552
2553
  }
2553
- if (l && (l.type === "bracket" || l.type === "paren" || l.type === "brace") || h.parens > 0) {
2554
- I({ type: "plus", value: p });
2554
+ if (f && (f.type === "bracket" || f.type === "paren" || f.type === "brace") || h.parens > 0) {
2555
+ C({ type: "plus", value: p });
2555
2556
  continue;
2556
2557
  }
2557
- I({ type: "plus", value: d });
2558
+ C({ type: "plus", value: d });
2558
2559
  continue;
2559
2560
  }
2560
2561
  if (p === "@") {
2561
2562
  if (n.noextglob !== !0 && T() === "(" && T(2) !== "?") {
2562
- I({ type: "at", extglob: !0, value: p, output: "" });
2563
+ C({ type: "at", extglob: !0, value: p, output: "" });
2563
2564
  continue;
2564
2565
  }
2565
- I({ type: "text", value: p });
2566
+ C({ type: "text", value: p });
2566
2567
  continue;
2567
2568
  }
2568
2569
  if (p !== "*") {
2569
2570
  (p === "$" || p === "^") && (p = `\\${p}`);
2570
2571
  const m = ii.exec(ae());
2571
- m && (p += m[0], h.index += m[0].length), I({ type: "text", value: p });
2572
+ m && (p += m[0], h.index += m[0].length), C({ type: "text", value: p });
2572
2573
  continue;
2573
2574
  }
2574
- if (l && (l.type === "globstar" || l.star === !0)) {
2575
- l.type = "star", l.star = !0, l.value += p, l.output = z, h.backtrack = !0, h.globstar = !0, q(p);
2575
+ if (f && (f.type === "globstar" || f.star === !0)) {
2576
+ f.type = "star", f.star = !0, f.value += p, f.output = z, h.backtrack = !0, h.globstar = !0, q(p);
2576
2577
  continue;
2577
2578
  }
2578
2579
  let g = ae();
2579
2580
  if (n.noextglob !== !0 && /^\([^?]/.test(g)) {
2580
- ke("star", p);
2581
+ He("star", p);
2581
2582
  continue;
2582
2583
  }
2583
- if (l.type === "star") {
2584
+ if (f.type === "star") {
2584
2585
  if (n.noglobstar === !0) {
2585
2586
  q(p);
2586
2587
  continue;
2587
2588
  }
2588
- const m = l.prev, P = m.prev, j = m.type === "slash" || m.type === "bos", W = P && (P.type === "star" || P.type === "globstar");
2589
+ const m = f.prev, P = m.prev, j = m.type === "slash" || m.type === "bos", W = P && (P.type === "star" || P.type === "globstar");
2589
2590
  if (n.bash === !0 && (!j || g[0] && g[0] !== "/")) {
2590
- I({ type: "star", value: p, output: "" });
2591
+ C({ type: "star", value: p, output: "" });
2591
2592
  continue;
2592
2593
  }
2593
- const G = h.braces > 0 && (m.type === "comma" || m.type === "brace"), Qe = H.length && (m.type === "pipe" || m.type === "paren");
2594
+ const G = h.braces > 0 && (m.type === "comma" || m.type === "brace"), Qe = k.length && (m.type === "pipe" || m.type === "paren");
2594
2595
  if (!j && m.type !== "paren" && !G && !Qe) {
2595
- I({ type: "star", value: p, output: "" });
2596
+ C({ type: "star", value: p, output: "" });
2596
2597
  continue;
2597
2598
  }
2598
2599
  for (; g.slice(0, 3) === "/**"; ) {
2599
- const He = e[h.index + 4];
2600
- if (He && He !== "/")
2600
+ const ke = e[h.index + 4];
2601
+ if (ke && ke !== "/")
2601
2602
  break;
2602
2603
  g = g.slice(3), q("/**", 3);
2603
2604
  }
2604
2605
  if (m.type === "bos" && J()) {
2605
- l.type = "globstar", l.value += p, l.output = D(n), h.output = l.output, h.globstar = !0, q(p);
2606
+ f.type = "globstar", f.value += p, f.output = D(n), h.output = f.output, h.globstar = !0, q(p);
2606
2607
  continue;
2607
2608
  }
2608
2609
  if (m.type === "slash" && m.prev.type !== "bos" && !W && J()) {
2609
- h.output = h.output.slice(0, -(m.output + l.output).length), m.output = `(?:${m.output}`, l.type = "globstar", l.output = D(n) + (n.strictSlashes ? ")" : "|$)"), l.value += p, h.globstar = !0, h.output += m.output + l.output, q(p);
2610
+ h.output = h.output.slice(0, -(m.output + f.output).length), m.output = `(?:${m.output}`, f.type = "globstar", f.output = D(n) + (n.strictSlashes ? ")" : "|$)"), f.value += p, h.globstar = !0, h.output += m.output + f.output, q(p);
2610
2611
  continue;
2611
2612
  }
2612
2613
  if (m.type === "slash" && m.prev.type !== "bos" && g[0] === "/") {
2613
- const He = g[1] !== void 0 ? "|$" : "";
2614
- h.output = h.output.slice(0, -(m.output + l.output).length), m.output = `(?:${m.output}`, l.type = "globstar", l.output = `${D(n)}${y}|${y}${He})`, l.value += p, h.output += m.output + l.output, h.globstar = !0, q(p + se()), I({ type: "slash", value: "/", output: "" });
2614
+ const ke = g[1] !== void 0 ? "|$" : "";
2615
+ h.output = h.output.slice(0, -(m.output + f.output).length), m.output = `(?:${m.output}`, f.type = "globstar", f.output = `${D(n)}${y}|${y}${ke})`, f.value += p, h.output += m.output + f.output, h.globstar = !0, q(p + se()), C({ type: "slash", value: "/", output: "" });
2615
2616
  continue;
2616
2617
  }
2617
2618
  if (m.type === "bos" && g[0] === "/") {
2618
- l.type = "globstar", l.value += p, l.output = `(?:^|${y}|${D(n)}${y})`, h.output = l.output, h.globstar = !0, q(p + se()), I({ type: "slash", value: "/", output: "" });
2619
+ f.type = "globstar", f.value += p, f.output = `(?:^|${y}|${D(n)}${y})`, h.output = f.output, h.globstar = !0, q(p + se()), C({ type: "slash", value: "/", output: "" });
2619
2620
  continue;
2620
2621
  }
2621
- h.output = h.output.slice(0, -l.output.length), l.type = "globstar", l.output = D(n), l.value += p, h.output += l.output, h.globstar = !0, q(p);
2622
+ h.output = h.output.slice(0, -f.output.length), f.type = "globstar", f.output = D(n), f.value += p, h.output += f.output, h.globstar = !0, q(p);
2622
2623
  continue;
2623
2624
  }
2624
2625
  const N = { type: "star", value: p, output: z };
2625
2626
  if (n.bash === !0) {
2626
- N.output = ".*?", (l.type === "bos" || l.type === "slash") && (N.output = O + N.output), I(N);
2627
+ N.output = ".*?", (f.type === "bos" || f.type === "slash") && (N.output = O + N.output), C(N);
2627
2628
  continue;
2628
2629
  }
2629
- if (l && (l.type === "bracket" || l.type === "paren") && n.regex === !0) {
2630
- N.output = p, I(N);
2630
+ if (f && (f.type === "bracket" || f.type === "paren") && n.regex === !0) {
2631
+ N.output = p, C(N);
2631
2632
  continue;
2632
2633
  }
2633
- (h.index === h.start || l.type === "slash" || l.type === "dot") && (l.type === "dot" ? (h.output += v, l.output += v) : n.dot === !0 ? (h.output += x, l.output += x) : (h.output += O, l.output += O), T() !== "*" && (h.output += w, l.output += w)), I(N);
2634
+ (h.index === h.start || f.type === "slash" || f.type === "dot") && (f.type === "dot" ? (h.output += v, f.output += v) : n.dot === !0 ? (h.output += x, f.output += x) : (h.output += O, f.output += O), T() !== "*" && (h.output += w, f.output += w)), C(N);
2634
2635
  }
2635
2636
  for (; h.brackets > 0; ) {
2636
2637
  if (n.strictBrackets === !0)
@@ -2647,7 +2648,7 @@ const Ge = qe, Z = Ke, {
2647
2648
  throw new SyntaxError(ve("closing", "}"));
2648
2649
  h.output = Z.escapeLast(h.output, "{"), me("braces");
2649
2650
  }
2650
- if (n.strictSlashes !== !0 && (l.type === "star" || l.type === "bracket") && I({ type: "maybe_slash", value: "", output: `${y}?` }), h.backtrack === !0) {
2651
+ if (n.strictSlashes !== !0 && (f.type === "star" || f.type === "bracket") && C({ type: "maybe_slash", value: "", output: `${y}?` }), h.backtrack === !0) {
2651
2652
  h.output = "";
2652
2653
  for (const g of h.tokens)
2653
2654
  h.output += g.output != null ? g.output : g.value, g.suffix && (h.output += g.suffix);
@@ -2664,15 +2665,15 @@ gn.fastpaths = (e, t) => {
2664
2665
  SLASH_LITERAL: r,
2665
2666
  ONE_CHAR: a,
2666
2667
  DOTS_SLASH: u,
2667
- NO_DOT: f,
2668
+ NO_DOT: l,
2668
2669
  NO_DOTS: c,
2669
2670
  NO_DOTS_SLASH: d,
2670
2671
  STAR: y,
2671
2672
  START_ANCHOR: w
2672
- } = Ge.globChars(n.windows), _ = n.dot ? c : f, S = n.dot ? d : f, v = n.capture ? "" : "?:", x = { negated: !1, prefix: "" };
2673
+ } = Ge.globChars(n.windows), _ = n.dot ? c : l, S = n.dot ? d : l, v = n.capture ? "" : "?:", x = { negated: !1, prefix: "" };
2673
2674
  let b = n.bash === !0 ? ".*?" : y;
2674
2675
  n.capture && (b = `(${b})`);
2675
- const A = (O) => O.noglobstar === !0 ? b : `(${v}(?:(?!${w}${O.dot ? u : o}).)*?)`, M = (O) => {
2676
+ const A = (O) => O.noglobstar === !0 ? b : `(${v}(?:(?!${w}${O.dot ? u : o}).)*?)`, I = (O) => {
2676
2677
  switch (O) {
2677
2678
  case "*":
2678
2679
  return `${_}${a}${b}`;
@@ -2694,16 +2695,16 @@ gn.fastpaths = (e, t) => {
2694
2695
  const L = /^(.*?)\.(\w+)$/.exec(O);
2695
2696
  if (!L)
2696
2697
  return;
2697
- const z = M(L[1]);
2698
+ const z = I(L[1]);
2698
2699
  return z ? z + o + L[2] : void 0;
2699
2700
  }
2700
2701
  }
2701
2702
  }, R = Z.removePrefix(e, x);
2702
- let D = M(R);
2703
+ let D = I(R);
2703
2704
  return D && n.strictSlashes !== !0 && (D += `${r}?`), D;
2704
2705
  };
2705
2706
  var ai = gn;
2706
- const ui = ni, lt = ai, bn = Ke, ci = qe, fi = (e) => e && typeof e == "object" && !Array.isArray(e), F = (e, t, n = !1) => {
2707
+ const ui = ni, ft = ai, bn = Ke, ci = qe, li = (e) => e && typeof e == "object" && !Array.isArray(e), F = (e, t, n = !1) => {
2707
2708
  if (Array.isArray(e)) {
2708
2709
  const c = e.map((y) => F(y, t, n));
2709
2710
  return (y) => {
@@ -2715,7 +2716,7 @@ const ui = ni, lt = ai, bn = Ke, ci = qe, fi = (e) => e && typeof e == "object"
2715
2716
  return !1;
2716
2717
  };
2717
2718
  }
2718
- const s = fi(e) && e.tokens && e.input;
2719
+ const s = li(e) && e.tokens && e.input;
2719
2720
  if (e === "" || typeof e != "string" && !s)
2720
2721
  throw new TypeError("Expected pattern to be a non-empty string");
2721
2722
  const i = t || {}, o = i.windows, r = s ? F.compileRe(e, t) : F.makeRe(e, t, !1, !0), a = r.state;
@@ -2725,11 +2726,11 @@ const ui = ni, lt = ai, bn = Ke, ci = qe, fi = (e) => e && typeof e == "object"
2725
2726
  const c = { ...t, ignore: null, onMatch: null, onResult: null };
2726
2727
  u = F(i.ignore, c, n);
2727
2728
  }
2728
- const f = (c, d = !1) => {
2729
+ const l = (c, d = !1) => {
2729
2730
  const { isMatch: y, match: w, output: _ } = F.test(c, r, t, { glob: e, posix: o }), S = { glob: e, state: a, regex: r, posix: o, input: c, output: _, match: w, isMatch: y };
2730
2731
  return typeof i.onResult == "function" && i.onResult(S), y === !1 ? (S.isMatch = !1, d ? S : !1) : u(c) ? (typeof i.onIgnore == "function" && i.onIgnore(S), S.isMatch = !1, d ? S : !1) : (typeof i.onMatch == "function" && i.onMatch(S), d ? S : !0);
2731
2732
  };
2732
- return n && (f.state = a), f;
2733
+ return n && (l.state = a), l;
2733
2734
  };
2734
2735
  F.test = (e, t, n, { glob: s, posix: i } = {}) => {
2735
2736
  if (typeof e != "string")
@@ -2742,7 +2743,7 @@ F.test = (e, t, n, { glob: s, posix: i } = {}) => {
2742
2743
  };
2743
2744
  F.matchBase = (e, t, n) => (t instanceof RegExp ? t : F.makeRe(t, n)).test(bn.basename(e));
2744
2745
  F.isMatch = (e, t, n) => F(t, n)(e);
2745
- F.parse = (e, t) => Array.isArray(e) ? e.map((n) => F.parse(n, t)) : lt(e, { ...t, fastpaths: !1 });
2746
+ F.parse = (e, t) => Array.isArray(e) ? e.map((n) => F.parse(n, t)) : ft(e, { ...t, fastpaths: !1 });
2746
2747
  F.scan = (e, t) => ui(e, t);
2747
2748
  F.compileRe = (e, t, n = !1, s = !1) => {
2748
2749
  if (n === !0)
@@ -2758,7 +2759,7 @@ F.makeRe = (e, t, n = !1, s = !1) => {
2758
2759
  throw new TypeError("Expected a non-empty string");
2759
2760
  const i = t || {};
2760
2761
  let o = { negated: !1, fastpaths: !0 }, r = "", a;
2761
- return e.startsWith("./") && (e = e.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (a = lt.fastpaths(e, t)), a === void 0 ? (o = lt(e, t), o.prefix = r + (o.prefix || "")) : o.output = a, F.compileRe(o, t, n, s);
2762
+ return e.startsWith("./") && (e = e.slice(2), r = o.prefix = "./"), i.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (a = ft.fastpaths(e, t)), a === void 0 ? (o = ft(e, t), o.prefix = r + (o.prefix || "")) : o.output = a, F.compileRe(o, t, n, s);
2762
2763
  };
2763
2764
  F.toRegex = (e, t) => {
2764
2765
  try {
@@ -2771,7 +2772,7 @@ F.toRegex = (e, t) => {
2771
2772
  }
2772
2773
  };
2773
2774
  F.constants = ci;
2774
- var li = F, pi = li;
2775
+ var fi = F, pi = fi;
2775
2776
  const hi = /* @__PURE__ */ ht(pi);
2776
2777
  class di extends vt.EventEmitter {
2777
2778
  constructor(t, n, s, i, o, r = !1) {
@@ -2790,9 +2791,9 @@ class di extends vt.EventEmitter {
2790
2791
  var a = new URL(this.url);
2791
2792
  a.searchParams.set(xe.mp_debug, "true"), this.url = a.href;
2792
2793
  }
2793
- this.id = s, this._parentId = i, this._color = ln(this.id), this._consoleBackgroundColor = o, this._iframe = document.createElement("iframe"), this._iframe.name = this.id;
2794
+ this.id = s, this._parentId = i, this._color = fn(this.id), this._consoleBackgroundColor = o, this._iframe = document.createElement("iframe"), this._iframe.name = this.id;
2794
2795
  const u = this;
2795
- this.iframe = new Promise((f) => {
2796
+ this.iframe = new Promise((l) => {
2796
2797
  Ot().then(async () => {
2797
2798
  var c, d, y, w;
2798
2799
  if (u._iframe) {
@@ -2804,7 +2805,7 @@ class di extends vt.EventEmitter {
2804
2805
  return;
2805
2806
  _ && _.allow && (u._iframe.allow = _.allow);
2806
2807
  }
2807
- u._iframe.src = this.url, f(u._iframe);
2808
+ u._iframe.src = this.url, l(u._iframe);
2808
2809
  }
2809
2810
  });
2810
2811
  }), this.ack = this.ack.bind(this), this.dispose = this.dispose.bind(this), this.getDefinition = this.getDefinition.bind(this), this.getDefinitionUrl = this.getDefinitionUrl.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.onInput = this.onInput.bind(this), this.onInputs = this.onInputs.bind(this), this.onOutput = this.onOutput.bind(this), this.onOutputs = this.onOutputs.bind(this), this.register = this.register.bind(this), this.registered = this.registered.bind(this), this.sendInputs = this.sendInputs.bind(this), this.sendOrBufferPostMessage = this.sendOrBufferPostMessage.bind(this), this.sendRpc = this.sendRpc.bind(this), this.sendRpcInternal = this.sendRpcInternal.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setMetapage = this.setMetapage.bind(this), this.setOutput = this.setOutput.bind(this), this.setOutputs = this.setOutputs.bind(this), this.addListenerReturnDisposer = this.addListenerReturnDisposer.bind(this), this.isDisposed = this.isDisposed.bind(this);
@@ -2908,7 +2909,7 @@ Error: ${n}`);
2908
2909
  },
2909
2910
  version: Gt
2910
2911
  };
2911
- this.sendRpcInternal(fe.SetupIframeServerResponse, t);
2912
+ this.sendRpcInternal(le.SetupIframeServerResponse, t);
2912
2913
  }
2913
2914
  registered(t) {
2914
2915
  if (this.log({ m: "MetapageIFrameRpcClient.registered", inputs: this.inputs }), !this._loaded) {
@@ -2920,7 +2921,7 @@ Error: ${n}`);
2920
2921
  }
2921
2922
  }
2922
2923
  async sendInputs(t) {
2923
- t && (t = await We(t), !this.isDisposed() && this.sendRpc(fe.InputsUpdate, {
2924
+ t && (t = await We(t), !this.isDisposed() && this.sendRpc(le.InputsUpdate, {
2924
2925
  inputs: t,
2925
2926
  parentId: this._parentId
2926
2927
  }));
@@ -2943,7 +2944,7 @@ Error: ${n}`);
2943
2944
  var n = {
2944
2945
  message: t
2945
2946
  };
2946
- this.sendRpc(fe.MessageAck, n);
2947
+ this.sendRpc(le.MessageAck, n);
2947
2948
  }
2948
2949
  }
2949
2950
  log(t) {
@@ -2978,7 +2979,7 @@ Error: ${n}`);
2978
2979
  }
2979
2980
  }
2980
2981
  }
2981
- const ye = C({
2982
+ const ye = M({
2982
2983
  metaframes: {
2983
2984
  inputs: {},
2984
2985
  outputs: {}
@@ -2998,7 +2999,7 @@ class ne extends Ps {
2998
2999
  return s.setDefinition(t);
2999
3000
  }
3000
3001
  constructor(t) {
3001
- super(), this._state = ye, this._metaframes = C({}, (n) => n), this.debug = ft(), this._internalReceivedMessageCounter = 0, this._cachedInputLookupMap = C({}, (n) => n), this._inputMap = {}, this._id = t && t.id ? t.id : Ts(), this._consoleBackgroundColor = t && t.color ? t.color : yi, this.addPipe = this.addPipe.bind(this), this.dispose = this.dispose.bind(this), this.addMetaframe = this.addMetaframe.bind(this), this.getInputsFromOutput = this.getInputsFromOutput.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframeIds = this.getMetaframeIds.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframes = this.getMetaframes.bind(this), this.getState = this.getState.bind(this), this.getStateMetaframes = this.getStateMetaframes.bind(this), this.isValidJSONRpcMessage = this.isValidJSONRpcMessage.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.metaframeIds = this.metaframeIds.bind(this), this.metaframes = this.metaframes.bind(this), this.onMessage = this.onMessage.bind(this), this.removeAll = this.removeAll.bind(this), this.removeMetaframe = this.removeMetaframe.bind(this), this.setDebugFromUrlParams = this.setDebugFromUrlParams.bind(this), this.setDefinition = this.setDefinition.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInputStateOnlyMetaframeInputValue = this.setInputStateOnlyMetaframeInputValue.bind(this), this.setInputStateOnlyMetaframeInputMap = this.setInputStateOnlyMetaframeInputMap.bind(this), this.setInputStateOnlyMetapageInstanceInputs = this.setInputStateOnlyMetapageInstanceInputs.bind(this), this.setOutputStateOnlyMetaframeInputValue = this.setOutputStateOnlyMetaframeInputValue.bind(this), this.setOutputStateOnlyMetaframeInputMap = this.setOutputStateOnlyMetaframeInputMap.bind(this), this.setOutputStateOnlyMetapageInstanceInputs = this.setOutputStateOnlyMetapageInstanceInputs.bind(this), this.setMetaframeClientInputAndSentClientEvent = this.setMetaframeClientInputAndSentClientEvent.bind(this), this.setState = this.setState.bind(this), this.isDisposed = this.isDisposed.bind(this), this._emitDefinitionEvent = this._emitDefinitionEvent.bind(this), Ot().then(() => {
3002
+ super(), this._state = ye, this._metaframes = M({}, (n) => n), this.debug = lt(), this._internalReceivedMessageCounter = 0, this._cachedInputLookupMap = M({}, (n) => n), this._inputMap = {}, this._id = t && t.id ? t.id : Ts(), this._consoleBackgroundColor = t && t.color ? t.color : yi, this.addPipe = this.addPipe.bind(this), this.dispose = this.dispose.bind(this), this.addMetaframe = this.addMetaframe.bind(this), this.getInputsFromOutput = this.getInputsFromOutput.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframeIds = this.getMetaframeIds.bind(this), this.getMetaframe = this.getMetaframe.bind(this), this.getMetaframes = this.getMetaframes.bind(this), this.getState = this.getState.bind(this), this.getStateMetaframes = this.getStateMetaframes.bind(this), this.isValidJSONRpcMessage = this.isValidJSONRpcMessage.bind(this), this.log = this.log.bind(this), this.logInternal = this.logInternal.bind(this), this.metaframeIds = this.metaframeIds.bind(this), this.metaframes = this.metaframes.bind(this), this.onMessage = this.onMessage.bind(this), this.removeAll = this.removeAll.bind(this), this.removeMetaframe = this.removeMetaframe.bind(this), this.setDebugFromUrlParams = this.setDebugFromUrlParams.bind(this), this.setDefinition = this.setDefinition.bind(this), this.setInput = this.setInput.bind(this), this.setInputs = this.setInputs.bind(this), this.setInputStateOnlyMetaframeInputValue = this.setInputStateOnlyMetaframeInputValue.bind(this), this.setInputStateOnlyMetaframeInputMap = this.setInputStateOnlyMetaframeInputMap.bind(this), this.setInputStateOnlyMetapageInstanceInputs = this.setInputStateOnlyMetapageInstanceInputs.bind(this), this.setOutputStateOnlyMetaframeInputValue = this.setOutputStateOnlyMetaframeInputValue.bind(this), this.setOutputStateOnlyMetaframeInputMap = this.setOutputStateOnlyMetaframeInputMap.bind(this), this.setOutputStateOnlyMetapageInstanceInputs = this.setOutputStateOnlyMetapageInstanceInputs.bind(this), this.setMetaframeClientInputAndSentClientEvent = this.setMetaframeClientInputAndSentClientEvent.bind(this), this.setState = this.setState.bind(this), this.isDisposed = this.isDisposed.bind(this), this._emitDefinitionEvent = this._emitDefinitionEvent.bind(this), Ot().then(() => {
3002
3003
  this.isDisposed() || (window.addEventListener("message", this.onMessage), this.log("Initialized"));
3003
3004
  });
3004
3005
  }
@@ -3018,7 +3019,7 @@ class ne extends Ps {
3018
3019
  return this._state;
3019
3020
  }
3020
3021
  setState(t) {
3021
- this._state = C(t, (n) => n), this.getMetaframeIds().forEach((n) => {
3022
+ this._state = M(t, (n) => n), this.getMetaframeIds().forEach((n) => {
3022
3023
  this.getMetaframe(n).setInputs(this._state.metaframes.inputs[n]), this.getMetaframe(n).setOutputs(this._state.metaframes.outputs[n]);
3023
3024
  }), this.listenerCount(E.State) > 0 && ye !== this._state && this.emit(E.State, this._state);
3024
3025
  }
@@ -3044,12 +3045,12 @@ class ne extends Ps {
3044
3045
  const i = this._definition;
3045
3046
  return this._definition = s, Object.keys(this._metaframes).forEach((o) => {
3046
3047
  (!s.metaframes || !s.metaframes[o]) && this.removeMetaframe(o);
3047
- }), n && (this._state = C(n, (o) => o)), s.metaframes && Object.keys(s.metaframes).forEach((o) => {
3048
+ }), n && (this._state = M(n, (o) => o)), s.metaframes && Object.keys(s.metaframes).forEach((o) => {
3048
3049
  if (!this._metaframes.hasOwnProperty(o)) {
3049
3050
  const r = s.metaframes[o];
3050
3051
  this.addMetaframe(o, r);
3051
3052
  }
3052
- }), i !== fn && window.setTimeout(() => {
3053
+ }), i !== ln && window.setTimeout(() => {
3053
3054
  !this.isDisposed() && s === this._definition && (this._emitDefinitionEvent(), n && this.listenerCount(E.State) > 0 && ye !== this._state && this.emit(E.State, this._state));
3054
3055
  }, 0), this;
3055
3056
  }
@@ -3063,26 +3064,26 @@ class ne extends Ps {
3063
3064
  }
3064
3065
  }
3065
3066
  addPipe(t, n) {
3066
- this._inputMap = C(this._inputMap, (s) => {
3067
+ this._inputMap = M(this._inputMap, (s) => {
3067
3068
  s[t] || (s[t] = []), s[t].push(n);
3068
3069
  });
3069
3070
  }
3070
3071
  removeMetaframe(t) {
3071
- this._metaframes[t] && (this._metaframes[t].dispose(), this._metaframes = C(this._metaframes, (n) => {
3072
+ this._metaframes[t] && (this._metaframes[t].dispose(), this._metaframes = M(this._metaframes, (n) => {
3072
3073
  delete n[t];
3073
- }), this._state = C(this._state, (n) => {
3074
+ }), this._state = M(this._state, (n) => {
3074
3075
  delete n.metaframes.inputs[t], delete n.metaframes.outputs[t];
3075
- }), this._inputMap = C(this._inputMap, (n) => {
3076
+ }), this._inputMap = M(this._inputMap, (n) => {
3076
3077
  delete n[t], Object.keys(n).forEach((s) => {
3077
3078
  const i = n[s];
3078
3079
  let o = 0;
3079
3080
  for (; o <= i.length; )
3080
3081
  i[o] && i[o].metaframe === t ? i.splice(o, 1) : o++;
3081
3082
  });
3082
- }), this._cachedInputLookupMap = C({}, (n) => n));
3083
+ }), this._cachedInputLookupMap = M({}, (n) => n));
3083
3084
  }
3084
3085
  removeAll() {
3085
- Object.keys(this._metaframes).forEach((t) => this._metaframes[t].dispose()), this._metaframes = C({}, (t) => t), this._state = ye, this._inputMap = C({}, (t) => t), this._cachedInputLookupMap = C({}, (t) => t);
3086
+ Object.keys(this._metaframes).forEach((t) => this._metaframes[t].dispose()), this._metaframes = M({}, (t) => t), this._state = ye, this._inputMap = M({}, (t) => t), this._cachedInputLookupMap = M({}, (t) => t);
3086
3087
  }
3087
3088
  metaframes() {
3088
3089
  return this.getMetaframes();
@@ -3109,7 +3110,7 @@ class ne extends Ps {
3109
3110
  if (!n.url)
3110
3111
  throw this.emitErrorMessage(`Metaframe definition missing url id=${t}`), `Metaframe definition missing url id=${t}`;
3111
3112
  var s = new di(this, n.url, t, this._id, this._consoleBackgroundColor, this.debug).setMetapage(this);
3112
- return this._metaframes = C(this._metaframes, (i) => {
3113
+ return this._metaframes = M(this._metaframes, (i) => {
3113
3114
  i[t] = s;
3114
3115
  }), s.addListener(E.Error, (i) => {
3115
3116
  this.emit(E.Error, {
@@ -3132,9 +3133,9 @@ class ne extends Ps {
3132
3133
  this.emit(E.Error, t);
3133
3134
  }
3134
3135
  getInputsFromOutput(t, n) {
3135
- return this._cachedInputLookupMap[t] || (this._cachedInputLookupMap = C(this._cachedInputLookupMap, (s) => {
3136
- s[t] = C({}, (i) => i);
3137
- })), this._cachedInputLookupMap[t][n] || (this._cachedInputLookupMap = C(this._cachedInputLookupMap, (s) => {
3136
+ return this._cachedInputLookupMap[t] || (this._cachedInputLookupMap = M(this._cachedInputLookupMap, (s) => {
3137
+ s[t] = M({}, (i) => i);
3138
+ })), this._cachedInputLookupMap[t][n] || (this._cachedInputLookupMap = M(this._cachedInputLookupMap, (s) => {
3138
3139
  var i = [];
3139
3140
  s[t][n] = i, Object.keys(this._inputMap).forEach((o) => {
3140
3141
  o !== t && this._inputMap[o].forEach((r) => {
@@ -3206,7 +3207,7 @@ class ne extends Ps {
3206
3207
  this._setStateOnlyMetaframeInputMap(!0, t, n);
3207
3208
  }
3208
3209
  _setStateOnlyMetaframeInputValue(t, n, s, i) {
3209
- this._state = C(this._state, (o) => {
3210
+ this._state = M(this._state, (o) => {
3210
3211
  if (!this._metaframes.hasOwnProperty(n))
3211
3212
  throw `No metaframe: ${n}`;
3212
3213
  o.metaframes || (o.metaframes = { inputs: {}, outputs: {} }), t ? o.metaframes.inputs || (o.metaframes.inputs = {}) : o.metaframes.outputs || (o.metaframes.outputs = {});
@@ -3215,7 +3216,7 @@ class ne extends Ps {
3215
3216
  });
3216
3217
  }
3217
3218
  _setStateOnlyMetaframeInputMap(t, n, s) {
3218
- !s || Object.keys(s).length === 0 || (this._state = C(this._state, (i) => {
3219
+ !s || Object.keys(s).length === 0 || (this._state = M(this._state, (i) => {
3219
3220
  if (!this._metaframes.hasOwnProperty(n))
3220
3221
  throw `No metaframe: ${n}`;
3221
3222
  let r = t ? i.metaframes.inputs : i.metaframes.outputs;
@@ -3225,7 +3226,7 @@ class ne extends Ps {
3225
3226
  }));
3226
3227
  }
3227
3228
  _setStateOnlyMetaframes(t, n) {
3228
- !n || Object.keys(n).length === 0 || (this._state = C(this._state, (s) => {
3229
+ !n || Object.keys(n).length === 0 || (this._state = M(this._state, (s) => {
3229
3230
  Object.keys(n).forEach((i) => {
3230
3231
  var o = n[i];
3231
3232
  if (typeof o != "object")
@@ -3264,18 +3265,18 @@ class ne extends Ps {
3264
3265
  }
3265
3266
  break;
3266
3267
  case X.OutputsUpdate:
3267
- const f = r.params;
3268
- if (!f || Object.keys(f).length === 0)
3268
+ const l = r.params;
3269
+ if (!l || Object.keys(l).length === 0)
3269
3270
  break;
3270
3271
  if (this._metaframes[a]) {
3271
3272
  var s = this._metaframes[a];
3272
- this.setOutputStateOnlyMetaframeInputMap(a, f), s.setOutputs(f);
3273
+ this.setOutputStateOnlyMetaframeInputMap(a, l), s.setOutputs(l);
3273
3274
  var i = !1;
3274
- const c = Object.keys(f), d = {};
3275
+ const c = Object.keys(l), d = {};
3275
3276
  c.forEach((y, w) => {
3276
3277
  const _ = this.getInputsFromOutput(a, y);
3277
3278
  _.length > 0 && _.forEach((S) => {
3278
- d[S.metaframe] || (d[S.metaframe] = {}), d[S.metaframe][S.pipe] = f[y], i = !0;
3279
+ d[S.metaframe] || (d[S.metaframe] = {}), d[S.metaframe][S.pipe] = l[y], i = !0;
3279
3280
  });
3280
3281
  }), i && (this.setInputStateOnlyMetapageInstanceInputs(d), Object.keys(d).forEach((y) => {
3281
3282
  this._metaframes[y].setInputs(d[y]);
@@ -3293,7 +3294,7 @@ class ne extends Ps {
3293
3294
  case X.HashParamsUpdate:
3294
3295
  if (u) {
3295
3296
  const c = r.params, d = new URL(u.url);
3296
- d.hash = c.hash, u.url = d.href, this._definition = C(this._definition, (y) => {
3297
+ d.hash = c.hash, u.url = d.href, this._definition = M(this._definition, (y) => {
3297
3298
  y.metaframes[c.metaframe].url = d.href;
3298
3299
  }), this._emitDefinitionEvent();
3299
3300
  }
@@ -3328,7 +3329,7 @@ const vn = dt(fetch), Di = async (e, t) => {
3328
3329
  retryDelay: 1e3
3329
3330
  })).json();
3330
3331
  return await Zt(i, t || "1");
3331
- }, ki = async (e, t) => {
3332
+ }, Hi = async (e, t) => {
3332
3333
  const n = new URL(e);
3333
3334
  n.pathname = n.pathname + (n.pathname.endsWith("/") ? "metaframe.json" : "/metaframe.json");
3334
3335
  const i = await (await vn(n.href, {
@@ -3337,14 +3338,14 @@ const vn = dt(fetch), Di = async (e, t) => {
3337
3338
  retryDelay: 1e3
3338
3339
  })).json();
3339
3340
  return await en(i, t || "1");
3340
- }, Hi = (e) => e ? !(e != null && e.inputs && Object.keys(e.inputs).length > 0 || e != null && e.outputs && Object.keys(e.outputs).length > 0 || e != null && e.allow || e != null && e.metadata && Object.keys(e.metadata).length > 0) : !0;
3341
+ }, ki = (e) => e ? !(e != null && e.inputs && Object.keys(e.inputs).length > 0 || e != null && e.outputs && Object.keys(e.outputs).length > 0 || e != null && e.allow || e != null && e.metadata && Object.keys(e.metadata).length > 0) : !0;
3341
3342
  export {
3342
- fn as INITIAL_NULL_METAPAGE_DEFINITION,
3343
+ ln as INITIAL_NULL_METAPAGE_DEFINITION,
3343
3344
  Ei as INTERNAL_ERROR,
3344
3345
  Si as INVALID_PARAMS,
3345
3346
  Oi as INVALID_REQUEST,
3346
3347
  X as JsonRpcMethodsFromChild,
3347
- fe as JsonRpcMethodsFromParent,
3348
+ le as JsonRpcMethodsFromParent,
3348
3349
  _i as METAFRAME_JSON_FILE,
3349
3350
  gi as METAPAGE_KEY_DEFINITION,
3350
3351
  bi as METAPAGE_KEY_STATE,
@@ -3377,14 +3378,14 @@ export {
3377
3378
  Ti as getLibraryVersionMatching,
3378
3379
  ue as getMatchingMetaframeVersion,
3379
3380
  Re as getMatchingMetapageVersion,
3380
- ki as getMetaframeDefinitionFromUrl,
3381
+ Hi as getMetaframeDefinitionFromUrl,
3381
3382
  Di as getMetapageDefinitionFromUrl,
3382
3383
  Ii as getUrlParam,
3383
3384
  Ci as getUrlParamDebug,
3384
3385
  Ds as hashCode,
3385
- ks as intToRGB,
3386
- ft as isDebugFromUrlsParams,
3387
- Hi as isEmptyMetaframeDefinition,
3386
+ Hs as intToRGB,
3387
+ lt as isDebugFromUrlsParams,
3388
+ ki as isEmptyMetaframeDefinition,
3388
3389
  Ls as isIframe,
3389
3390
  Mi as isJsonRpcId,
3390
3391
  Ze as isPageLoaded,
@@ -3398,7 +3399,7 @@ export {
3398
3399
  tn as possiblyDeserializeDatarefToValue,
3399
3400
  us as possiblySerializeValueToDataref,
3400
3401
  We as serializeInputs,
3401
- ln as stringToRgb,
3402
+ fn as stringToRgb,
3402
3403
  vi as valueToFile
3403
3404
  };
3404
3405
  //# sourceMappingURL=index.js.map