@banou/media-player 0.2.2 → 0.2.4

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/build/index.js CHANGED
@@ -21,16 +21,16 @@ function Kt() {
21
21
  if (Xr)
22
22
  return ir;
23
23
  Xr = 1;
24
- var e = ht, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
24
+ var e = ht, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
25
25
  function l(u, d, v) {
26
26
  var m, h = {}, y = null, k = null;
27
27
  v !== void 0 && (y = "" + v), d.key !== void 0 && (y = "" + d.key), d.ref !== void 0 && (k = d.ref);
28
28
  for (m in d)
29
- a.call(d, m) && !i.hasOwnProperty(m) && (h[m] = d[m]);
29
+ a.call(d, m) && !o.hasOwnProperty(m) && (h[m] = d[m]);
30
30
  if (u && u.defaultProps)
31
31
  for (m in d = u.defaultProps, d)
32
32
  h[m] === void 0 && (h[m] = d[m]);
33
- return { $$typeof: r, type: u, key: y, ref: k, props: h, _owner: o.current };
33
+ return { $$typeof: r, type: u, key: y, ref: k, props: h, _owner: i.current };
34
34
  }
35
35
  return ir.Fragment = t, ir.jsx = l, ir.jsxs = l, ir;
36
36
  }
@@ -47,7 +47,7 @@ var sr = {};
47
47
  var Zr;
48
48
  function Ht() {
49
49
  return Zr || (Zr = 1, process.env.NODE_ENV !== "production" && function() {
50
- var e = ht, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), N = Symbol.iterator, b = "@@iterator";
50
+ var e = ht, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), N = Symbol.iterator, b = "@@iterator";
51
51
  function x(n) {
52
52
  if (n === null || typeof n != "object")
53
53
  return null;
@@ -75,7 +75,7 @@ function Ht() {
75
75
  var I = !1, f = !1, B = !1, R = !1, Oe = !1, we;
76
76
  we = Symbol.for("react.module.reference");
77
77
  function Ae(n) {
78
- return !!(typeof n == "string" || typeof n == "function" || n === a || n === i || Oe || n === o || n === v || n === m || R || n === k || I || f || B || typeof n == "object" && n !== null && (n.$$typeof === y || n.$$typeof === h || n.$$typeof === l || n.$$typeof === u || n.$$typeof === d || // This needs to include all possible module reference object
78
+ return !!(typeof n == "string" || typeof n == "function" || n === a || n === o || Oe || n === i || n === v || n === m || R || n === k || I || f || B || typeof n == "object" && n !== null && (n.$$typeof === y || n.$$typeof === h || n.$$typeof === l || n.$$typeof === u || n.$$typeof === d || // This needs to include all possible module reference object
79
79
  // types supported by any Flight configuration anywhere since
80
80
  // we don't know which Flight build this will end up being used
81
81
  // with.
@@ -103,9 +103,9 @@ function Ht() {
103
103
  return "Fragment";
104
104
  case t:
105
105
  return "Portal";
106
- case i:
107
- return "Profiler";
108
106
  case o:
107
+ return "Profiler";
108
+ case i:
109
109
  return "StrictMode";
110
110
  case v:
111
111
  return "Suspense";
@@ -648,9 +648,9 @@ function Zt(e) {
648
648
  var Qt = /* @__PURE__ */ function() {
649
649
  function e(t) {
650
650
  var a = this;
651
- this._insertTag = function(o) {
652
- var i;
653
- a.tags.length === 0 ? a.insertionPoint ? i = a.insertionPoint.nextSibling : a.prepend ? i = a.container.firstChild : i = a.before : i = a.tags[a.tags.length - 1].nextSibling, a.container.insertBefore(o, i), a.tags.push(o);
651
+ this._insertTag = function(i) {
652
+ var o;
653
+ a.tags.length === 0 ? a.insertionPoint ? o = a.insertionPoint.nextSibling : a.prepend ? o = a.container.firstChild : o = a.before : o = a.tags[a.tags.length - 1].nextSibling, a.container.insertBefore(i, o), a.tags.push(i);
654
654
  }, this.isSpeedy = t.speedy === void 0 ? process.env.NODE_ENV === "production" : t.speedy, this.tags = [], this.ctr = 0, this.nonce = t.nonce, this.key = t.key, this.container = t.container, this.prepend = t.prepend, this.insertionPoint = t.insertionPoint, this.before = null;
655
655
  }
656
656
  var r = e.prototype;
@@ -658,21 +658,21 @@ var Qt = /* @__PURE__ */ function() {
658
658
  a.forEach(this._insertTag);
659
659
  }, r.insert = function(a) {
660
660
  this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Zt(this));
661
- var o = this.tags[this.tags.length - 1];
661
+ var i = this.tags[this.tags.length - 1];
662
662
  if (process.env.NODE_ENV !== "production") {
663
- var i = a.charCodeAt(0) === 64 && a.charCodeAt(1) === 105;
664
- i && this._alreadyInsertedOrderInsensitiveRule && console.error(`You're attempting to insert the following rule:
665
- ` + a + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."), this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !i;
663
+ var o = a.charCodeAt(0) === 64 && a.charCodeAt(1) === 105;
664
+ o && this._alreadyInsertedOrderInsensitiveRule && console.error(`You're attempting to insert the following rule:
665
+ ` + a + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."), this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !o;
666
666
  }
667
667
  if (this.isSpeedy) {
668
- var l = Xt(o);
668
+ var l = Xt(i);
669
669
  try {
670
670
  l.insertRule(a, l.cssRules.length);
671
671
  } catch (u) {
672
672
  process.env.NODE_ENV !== "production" && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(a) && console.error('There was a problem inserting the following rule: "' + a + '"', u);
673
673
  }
674
674
  } else
675
- o.appendChild(document.createTextNode(a));
675
+ i.appendChild(document.createTextNode(a));
676
676
  this.ctr++;
677
677
  }, r.flush = function() {
678
678
  this.tags.forEach(function(a) {
@@ -714,8 +714,8 @@ function sn(e, r) {
714
714
  return e.map(r).join("");
715
715
  }
716
716
  var Sr = 1, rr = 1, yt = 0, pe = 0, Q = 0, tr = "";
717
- function xr(e, r, t, a, o, i, l) {
718
- return { value: e, root: r, parent: t, type: a, props: o, children: i, line: Sr, column: rr, length: l, return: "" };
717
+ function xr(e, r, t, a, i, o, l) {
718
+ return { value: e, root: r, parent: t, type: a, props: i, children: o, line: Sr, column: rr, length: l, return: "" };
719
719
  }
720
720
  function cr(e, r) {
721
721
  return nn(xr("", null, null, "", null, null, 0), e, { length: -e.length }, r);
@@ -821,8 +821,8 @@ function mn(e) {
821
821
  function gn(e) {
822
822
  return Et(yr("", null, null, null, [""], e = wt(e), 0, [0], e));
823
823
  }
824
- function yr(e, r, t, a, o, i, l, u, d) {
825
- for (var v = 0, m = 0, h = l, y = 0, k = 0, N = 0, b = 1, x = 1, _ = 1, S = 0, P = "", I = o, f = i, B = a, R = P; x; )
824
+ function yr(e, r, t, a, i, o, l, u, d) {
825
+ for (var v = 0, m = 0, h = l, y = 0, k = 0, N = 0, b = 1, x = 1, _ = 1, S = 0, P = "", I = i, f = o, B = a, R = P; x; )
826
826
  switch (N = S, S = ye()) {
827
827
  case 40:
828
828
  if (N != 108 && te(R, h - 1) == 58) {
@@ -868,16 +868,16 @@ function yr(e, r, t, a, o, i, l, u, d) {
868
868
  case 59:
869
869
  R += ";";
870
870
  default:
871
- if (pr(B = rt(R, r, t, v, m, o, u, P, I = [], f = [], h), i), S === 123)
871
+ if (pr(B = rt(R, r, t, v, m, i, u, P, I = [], f = [], h), o), S === 123)
872
872
  if (m === 0)
873
- yr(R, r, B, B, I, i, h, u, f);
873
+ yr(R, r, B, B, I, o, h, u, f);
874
874
  else
875
875
  switch (y === 99 && te(R, 3) === 110 ? 100 : y) {
876
876
  case 100:
877
877
  case 108:
878
878
  case 109:
879
879
  case 115:
880
- yr(e, B, B, a && pr(rt(e, B, B, 0, 0, o, u, P, o, I = [], h), f), o, f, h, u, a ? I : f);
880
+ yr(e, B, B, a && pr(rt(e, B, B, 0, 0, i, u, P, i, I = [], h), f), i, f, h, u, a ? I : f);
881
881
  break;
882
882
  default:
883
883
  yr(R, B, B, B, [""], f, 0, u, f);
@@ -908,13 +908,13 @@ function yr(e, r, t, a, o, i, l, u, d) {
908
908
  N === 45 && Te(R) == 2 && (b = 0);
909
909
  }
910
910
  }
911
- return i;
911
+ return o;
912
912
  }
913
- function rt(e, r, t, a, o, i, l, u, d, v, m) {
914
- for (var h = o - 1, y = o === 0 ? i : [""], k = Ur(y), N = 0, b = 0, x = 0; N < a; ++N)
913
+ function rt(e, r, t, a, i, o, l, u, d, v, m) {
914
+ for (var h = i - 1, y = i === 0 ? o : [""], k = Ur(y), N = 0, b = 0, x = 0; N < a; ++N)
915
915
  for (var _ = 0, S = lr(e, h + 1, h = tn(b = l[N])), P = e; _ < k; ++_)
916
916
  (P = bt(b > 0 ? y[_] + " " + S : M(S, /&\f/g, y[_]))) && (d[x++] = P);
917
- return xr(e, r, t, o === 0 ? Vr : u, d, v, m);
917
+ return xr(e, r, t, i === 0 ? Vr : u, d, v, m);
918
918
  }
919
919
  function hn(e, r, t) {
920
920
  return xr(e, r, t, jr, kr(cn()), lr(e, 2, -2), 0);
@@ -923,8 +923,8 @@ function tt(e, r, t, a) {
923
923
  return xr(e, r, t, Br, lr(e, 0, a), lr(e, a + 1, -1), a);
924
924
  }
925
925
  function er(e, r) {
926
- for (var t = "", a = Ur(e), o = 0; o < a; o++)
927
- t += r(e[o], o, e, r) || "";
926
+ for (var t = "", a = Ur(e), i = 0; i < a; i++)
927
+ t += r(e[i], i, e, r) || "";
928
928
  return t;
929
929
  }
930
930
  function pn(e, r, t, a) {
@@ -946,9 +946,9 @@ function pn(e, r, t, a) {
946
946
  }
947
947
  function vn(e) {
948
948
  var r = Ur(e);
949
- return function(t, a, o, i) {
949
+ return function(t, a, i, o) {
950
950
  for (var l = "", u = 0; u < r; u++)
951
- l += e[u](t, a, o, i) || "";
951
+ l += e[u](t, a, i, o) || "";
952
952
  return l;
953
953
  };
954
954
  }
@@ -964,28 +964,28 @@ function yn(e) {
964
964
  };
965
965
  }
966
966
  var wn = function(r, t, a) {
967
- for (var o = 0, i = 0; o = i, i = Pe(), o === 38 && i === 12 && (t[a] = 1), !ur(i); )
967
+ for (var i = 0, o = 0; i = o, o = Pe(), i === 38 && o === 12 && (t[a] = 1), !ur(o); )
968
968
  ye();
969
969
  return dr(r, pe);
970
970
  }, En = function(r, t) {
971
- var a = -1, o = 44;
971
+ var a = -1, i = 44;
972
972
  do
973
- switch (ur(o)) {
973
+ switch (ur(i)) {
974
974
  case 0:
975
- o === 38 && Pe() === 12 && (t[a] = 1), r[a] += wn(pe - 1, t, a);
975
+ i === 38 && Pe() === 12 && (t[a] = 1), r[a] += wn(pe - 1, t, a);
976
976
  break;
977
977
  case 2:
978
- r[a] += br(o);
978
+ r[a] += br(i);
979
979
  break;
980
980
  case 4:
981
- if (o === 44) {
981
+ if (i === 44) {
982
982
  r[++a] = Pe() === 58 ? "&\f" : "", t[a] = r[a].length;
983
983
  break;
984
984
  }
985
985
  default:
986
- r[a] += kr(o);
986
+ r[a] += kr(i);
987
987
  }
988
- while (o = ye());
988
+ while (i = ye());
989
989
  return r;
990
990
  }, Nn = function(r, t) {
991
991
  return Et(En(wt(r), t));
@@ -993,14 +993,14 @@ var wn = function(r, t, a) {
993
993
  if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo
994
994
  // negative .length indicates that this rule has been already prefixed
995
995
  r.length < 1)) {
996
- for (var t = r.value, a = r.parent, o = r.column === a.column && r.line === a.line; a.type !== "rule"; )
996
+ for (var t = r.value, a = r.parent, i = r.column === a.column && r.line === a.line; a.type !== "rule"; )
997
997
  if (a = a.parent, !a)
998
998
  return;
999
- if (!(r.props.length === 1 && t.charCodeAt(0) !== 58 && !nt.get(a)) && !o) {
999
+ if (!(r.props.length === 1 && t.charCodeAt(0) !== 58 && !nt.get(a)) && !i) {
1000
1000
  nt.set(r, !0);
1001
- for (var i = [], l = Nn(t, i), u = a.props, d = 0, v = 0; d < l.length; d++)
1001
+ for (var o = [], l = Nn(t, o), u = a.props, d = 0, v = 0; d < l.length; d++)
1002
1002
  for (var m = 0; m < u.length; m++, v++)
1003
- r.props[v] = i[d] ? l[d].replace(/&\f/g, u[m]) : u[m] + " " + l[d];
1003
+ r.props[v] = o[d] ? l[d].replace(/&\f/g, u[m]) : u[m] + " " + l[d];
1004
1004
  }
1005
1005
  }
1006
1006
  }, Sn = function(r) {
@@ -1013,13 +1013,13 @@ var wn = function(r, t, a) {
1013
1013
  }, xn = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason", _n = function(r) {
1014
1014
  return r.type === "comm" && r.children.indexOf(xn) > -1;
1015
1015
  }, Rn = function(r) {
1016
- return function(t, a, o) {
1016
+ return function(t, a, i) {
1017
1017
  if (!(t.type !== "rule" || r.compat)) {
1018
- var i = t.value.match(/(:first|:nth|:nth-last)-child/g);
1019
- if (i) {
1018
+ var o = t.value.match(/(:first|:nth|:nth-last)-child/g);
1019
+ if (o) {
1020
1020
  for (var l = !!t.parent, u = l ? t.parent.children : (
1021
1021
  // global rule at the root level
1022
- o
1022
+ i
1023
1023
  ), d = u.length - 1; d >= 0; d--) {
1024
1024
  var v = u[d];
1025
1025
  if (v.line < t.line)
@@ -1030,7 +1030,7 @@ var wn = function(r, t, a) {
1030
1030
  break;
1031
1031
  }
1032
1032
  }
1033
- i.forEach(function(m) {
1033
+ o.forEach(function(m) {
1034
1034
  console.error('The pseudo class "' + m + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + m.split("-child")[0] + '-of-type".');
1035
1035
  });
1036
1036
  }
@@ -1162,7 +1162,7 @@ function kt(e, r) {
1162
1162
  }
1163
1163
  return e;
1164
1164
  }
1165
- var Pn = function(r, t, a, o) {
1165
+ var Pn = function(r, t, a, i) {
1166
1166
  if (r.length > -1 && !r.return)
1167
1167
  switch (r.type) {
1168
1168
  case Br:
@@ -1171,24 +1171,24 @@ var Pn = function(r, t, a, o) {
1171
1171
  case vt:
1172
1172
  return er([cr(r, {
1173
1173
  value: M(r.value, "@", "@" + L)
1174
- })], o);
1174
+ })], i);
1175
1175
  case Vr:
1176
1176
  if (r.length)
1177
- return sn(r.props, function(i) {
1178
- switch (on(i, /(::plac\w+|:read-\w+)/)) {
1177
+ return sn(r.props, function(o) {
1178
+ switch (on(o, /(::plac\w+|:read-\w+)/)) {
1179
1179
  case ":read-only":
1180
1180
  case ":read-write":
1181
1181
  return er([cr(r, {
1182
- props: [M(i, /:(read-\w+)/, ":" + wr + "$1")]
1183
- })], o);
1182
+ props: [M(o, /:(read-\w+)/, ":" + wr + "$1")]
1183
+ })], i);
1184
1184
  case "::placeholder":
1185
1185
  return er([cr(r, {
1186
- props: [M(i, /:(plac\w+)/, ":" + L + "input-$1")]
1186
+ props: [M(o, /:(plac\w+)/, ":" + L + "input-$1")]
1187
1187
  }), cr(r, {
1188
- props: [M(i, /:(plac\w+)/, ":" + wr + "$1")]
1188
+ props: [M(o, /:(plac\w+)/, ":" + wr + "$1")]
1189
1189
  }), cr(r, {
1190
- props: [M(i, /:(plac\w+)/, oe + "input-$1")]
1191
- })], o);
1190
+ props: [M(o, /:(plac\w+)/, oe + "input-$1")]
1191
+ })], i);
1192
1192
  }
1193
1193
  return "";
1194
1194
  });
@@ -1205,17 +1205,17 @@ If multiple caches share the same key they might "fight" for each other's style
1205
1205
  x.indexOf(" ") !== -1 && (document.head.appendChild(b), b.setAttribute("data-s", ""));
1206
1206
  });
1207
1207
  }
1208
- var o = r.stylisPlugins || On;
1208
+ var i = r.stylisPlugins || On;
1209
1209
  if (process.env.NODE_ENV !== "production" && /[^a-z-]/.test(t))
1210
1210
  throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + t + '" was passed');
1211
- var i = {}, l, u = [];
1211
+ var o = {}, l, u = [];
1212
1212
  l = r.container || document.head, Array.prototype.forEach.call(
1213
1213
  // this means we will ignore elements which don't have a space in them which
1214
1214
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1215
1215
  document.querySelectorAll('style[data-emotion^="' + t + ' "]'),
1216
1216
  function(b) {
1217
1217
  for (var x = b.getAttribute("data-emotion").split(" "), _ = 1; _ < x.length; _++)
1218
- i[x[_]] = !0;
1218
+ o[x[_]] = !0;
1219
1219
  u.push(b);
1220
1220
  }
1221
1221
  );
@@ -1230,7 +1230,7 @@ If multiple caches share the same key they might "fight" for each other's style
1230
1230
  b.root || (b.return ? m.insert(b.return) : b.value && b.type !== jr && m.insert(b.value + "{}"));
1231
1231
  } : bn(function(b) {
1232
1232
  m.insert(b);
1233
- })], y = vn(v.concat(o, h)), k = function(x) {
1233
+ })], y = vn(v.concat(i, h)), k = function(x) {
1234
1234
  return er(gn(x), y);
1235
1235
  };
1236
1236
  d = function(x, _, S, P) {
@@ -1252,7 +1252,7 @@ If multiple caches share the same key they might "fight" for each other's style
1252
1252
  insertionPoint: r.insertionPoint
1253
1253
  }),
1254
1254
  nonce: r.nonce,
1255
- inserted: i,
1255
+ inserted: o,
1256
1256
  registered: {},
1257
1257
  insert: d
1258
1258
  };
@@ -1271,7 +1271,7 @@ function In() {
1271
1271
  if (ot)
1272
1272
  return D;
1273
1273
  ot = 1;
1274
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, v = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, y = e ? Symbol.for("react.suspense_list") : 60120, k = e ? Symbol.for("react.memo") : 60115, N = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, _ = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1274
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, v = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, y = e ? Symbol.for("react.suspense_list") : 60120, k = e ? Symbol.for("react.memo") : 60115, N = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, _ = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1275
1275
  function P(f) {
1276
1276
  if (typeof f == "object" && f !== null) {
1277
1277
  var B = f.$$typeof;
@@ -1281,8 +1281,8 @@ function In() {
1281
1281
  case d:
1282
1282
  case v:
1283
1283
  case a:
1284
- case i:
1285
1284
  case o:
1285
+ case i:
1286
1286
  case h:
1287
1287
  return f;
1288
1288
  default:
@@ -1305,7 +1305,7 @@ function In() {
1305
1305
  function I(f) {
1306
1306
  return P(f) === v;
1307
1307
  }
1308
- return D.AsyncMode = d, D.ConcurrentMode = v, D.ContextConsumer = u, D.ContextProvider = l, D.Element = r, D.ForwardRef = m, D.Fragment = a, D.Lazy = N, D.Memo = k, D.Portal = t, D.Profiler = i, D.StrictMode = o, D.Suspense = h, D.isAsyncMode = function(f) {
1308
+ return D.AsyncMode = d, D.ConcurrentMode = v, D.ContextConsumer = u, D.ContextProvider = l, D.Element = r, D.ForwardRef = m, D.Fragment = a, D.Lazy = N, D.Memo = k, D.Portal = t, D.Profiler = o, D.StrictMode = i, D.Suspense = h, D.isAsyncMode = function(f) {
1309
1309
  return I(f) || P(f) === d;
1310
1310
  }, D.isConcurrentMode = I, D.isContextConsumer = function(f) {
1311
1311
  return P(f) === u;
@@ -1324,13 +1324,13 @@ function In() {
1324
1324
  }, D.isPortal = function(f) {
1325
1325
  return P(f) === t;
1326
1326
  }, D.isProfiler = function(f) {
1327
- return P(f) === i;
1328
- }, D.isStrictMode = function(f) {
1329
1327
  return P(f) === o;
1328
+ }, D.isStrictMode = function(f) {
1329
+ return P(f) === i;
1330
1330
  }, D.isSuspense = function(f) {
1331
1331
  return P(f) === h;
1332
1332
  }, D.isValidElementType = function(f) {
1333
- return typeof f == "string" || typeof f == "function" || f === a || f === v || f === i || f === o || f === h || f === y || typeof f == "object" && f !== null && (f.$$typeof === N || f.$$typeof === k || f.$$typeof === l || f.$$typeof === u || f.$$typeof === m || f.$$typeof === x || f.$$typeof === _ || f.$$typeof === S || f.$$typeof === b);
1333
+ return typeof f == "string" || typeof f == "function" || f === a || f === v || f === o || f === i || f === h || f === y || typeof f == "object" && f !== null && (f.$$typeof === N || f.$$typeof === k || f.$$typeof === l || f.$$typeof === u || f.$$typeof === m || f.$$typeof === x || f.$$typeof === _ || f.$$typeof === S || f.$$typeof === b);
1334
1334
  }, D.typeOf = P, D;
1335
1335
  }
1336
1336
  var F = {};
@@ -1345,10 +1345,10 @@ var F = {};
1345
1345
  var it;
1346
1346
  function $n() {
1347
1347
  return it || (it = 1, process.env.NODE_ENV !== "production" && function() {
1348
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, v = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, y = e ? Symbol.for("react.suspense_list") : 60120, k = e ? Symbol.for("react.memo") : 60115, N = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, _ = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1348
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, v = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, y = e ? Symbol.for("react.suspense_list") : 60120, k = e ? Symbol.for("react.memo") : 60115, N = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, _ = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1349
1349
  function P(s) {
1350
1350
  return typeof s == "string" || typeof s == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1351
- s === a || s === v || s === i || s === o || s === h || s === y || typeof s == "object" && s !== null && (s.$$typeof === N || s.$$typeof === k || s.$$typeof === l || s.$$typeof === u || s.$$typeof === m || s.$$typeof === x || s.$$typeof === _ || s.$$typeof === S || s.$$typeof === b);
1351
+ s === a || s === v || s === o || s === i || s === h || s === y || typeof s == "object" && s !== null && (s.$$typeof === N || s.$$typeof === k || s.$$typeof === l || s.$$typeof === u || s.$$typeof === m || s.$$typeof === x || s.$$typeof === _ || s.$$typeof === S || s.$$typeof === b);
1352
1352
  }
1353
1353
  function I(s) {
1354
1354
  if (typeof s == "object" && s !== null) {
@@ -1360,8 +1360,8 @@ function $n() {
1360
1360
  case d:
1361
1361
  case v:
1362
1362
  case a:
1363
- case i:
1364
1363
  case o:
1364
+ case i:
1365
1365
  case h:
1366
1366
  return W;
1367
1367
  default:
@@ -1382,7 +1382,7 @@ function $n() {
1382
1382
  }
1383
1383
  }
1384
1384
  }
1385
- var f = d, B = v, R = u, Oe = l, we = r, Ae = m, Ie = a, ue = N, H = k, J = t, fe = i, X = o, Ee = h, ne = !1;
1385
+ var f = d, B = v, R = u, Oe = l, we = r, Ae = m, Ie = a, ue = N, H = k, J = t, fe = o, X = i, Ee = h, ne = !1;
1386
1386
  function ae(s) {
1387
1387
  return ne || (ne = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), ee(s) || I(s) === d;
1388
1388
  }
@@ -1414,10 +1414,10 @@ function $n() {
1414
1414
  return I(s) === t;
1415
1415
  }
1416
1416
  function ie(s) {
1417
- return I(s) === i;
1417
+ return I(s) === o;
1418
1418
  }
1419
1419
  function be(s) {
1420
- return I(s) === o;
1420
+ return I(s) === i;
1421
1421
  }
1422
1422
  function je(s) {
1423
1423
  return I(s) === h;
@@ -1445,12 +1445,12 @@ xt[St.Memo] = Dn;
1445
1445
  var Fn = !0;
1446
1446
  function jn(e, r, t) {
1447
1447
  var a = "";
1448
- return t.split(" ").forEach(function(o) {
1449
- e[o] !== void 0 ? r.push(e[o] + ";") : a += o + " ";
1448
+ return t.split(" ").forEach(function(i) {
1449
+ e[i] !== void 0 ? r.push(e[i] + ";") : a += i + " ";
1450
1450
  }), a;
1451
1451
  }
1452
1452
  var _t = function(r, t, a) {
1453
- var o = r.key + "-" + t.name;
1453
+ var i = r.key + "-" + t.name;
1454
1454
  // we only need to add the styles to the registered cache if the
1455
1455
  // class name could be used further down
1456
1456
  // the tree but if it's a string tag, we know it won't
@@ -1460,25 +1460,25 @@ var _t = function(r, t, a) {
1460
1460
  // in node since emotion-server relies on whether a style is in
1461
1461
  // the registered cache to know whether a style is global or not
1462
1462
  // also, note that this check will be dead code eliminated in the browser
1463
- Fn === !1) && r.registered[o] === void 0 && (r.registered[o] = t.styles);
1463
+ Fn === !1) && r.registered[i] === void 0 && (r.registered[i] = t.styles);
1464
1464
  }, Vn = function(r, t, a) {
1465
1465
  _t(r, t, a);
1466
- var o = r.key + "-" + t.name;
1466
+ var i = r.key + "-" + t.name;
1467
1467
  if (r.inserted[t.name] === void 0) {
1468
- var i = t;
1468
+ var o = t;
1469
1469
  do
1470
- r.insert(t === i ? "." + o : "", i, r.sheet, !0), i = i.next;
1471
- while (i !== void 0);
1470
+ r.insert(t === o ? "." + i : "", o, r.sheet, !0), o = o.next;
1471
+ while (o !== void 0);
1472
1472
  }
1473
1473
  };
1474
1474
  function Bn(e) {
1475
- for (var r = 0, t, a = 0, o = e.length; o >= 4; ++a, o -= 4)
1475
+ for (var r = 0, t, a = 0, i = e.length; i >= 4; ++a, i -= 4)
1476
1476
  t = e.charCodeAt(a) & 255 | (e.charCodeAt(++a) & 255) << 8 | (e.charCodeAt(++a) & 255) << 16 | (e.charCodeAt(++a) & 255) << 24, t = /* Math.imul(k, m): */
1477
1477
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */
1478
1478
  t >>> 24, r = /* Math.imul(k, m): */
1479
1479
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
1480
1480
  (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
1481
- switch (o) {
1481
+ switch (i) {
1482
1482
  case 3:
1483
1483
  r ^= (e.charCodeAt(a + 2) & 255) << 16;
1484
1484
  case 2:
@@ -1552,12 +1552,12 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
1552
1552
  case "animation":
1553
1553
  case "animationName":
1554
1554
  if (typeof t == "string")
1555
- return t.replace(Rt, function(a, o, i) {
1555
+ return t.replace(Rt, function(a, i, o) {
1556
1556
  return Re = {
1557
- name: o,
1558
- styles: i,
1557
+ name: i,
1558
+ styles: o,
1559
1559
  next: Re
1560
- }, o;
1560
+ }, i;
1561
1561
  });
1562
1562
  }
1563
1563
  return Un[r] !== 1 && !zr(r) && typeof t == "number" && t !== 0 ? t + "px" : t;
@@ -1568,8 +1568,8 @@ if (process.env.NODE_ENV !== "production") {
1568
1568
  if (r === "content" && (typeof t != "string" || qn.indexOf(t) === -1 && !Wn.test(t) && (t.charAt(0) !== t.charAt(t.length - 1) || t.charAt(0) !== '"' && t.charAt(0) !== "'")))
1569
1569
  throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + t + "\"'`");
1570
1570
  var a = Gn(r, t);
1571
- return a !== "" && !zr(r) && r.indexOf("-") !== -1 && lt[r] === void 0 && (lt[r] = !0, console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + r.replace(Kn, "ms-").replace(Hn, function(o, i) {
1572
- return i.toUpperCase();
1571
+ return a !== "" && !zr(r) && r.indexOf("-") !== -1 && lt[r] === void 0 && (lt[r] = !0, console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + r.replace(Kn, "ms-").replace(Hn, function(i, o) {
1572
+ return o.toUpperCase();
1573
1573
  }) + "?")), a;
1574
1574
  };
1575
1575
  }
@@ -1601,15 +1601,15 @@ function fr(e, r, t) {
1601
1601
  styles: a.styles,
1602
1602
  next: Re
1603
1603
  }, a = a.next;
1604
- var o = t.styles + ";";
1605
- return process.env.NODE_ENV !== "production" && t.map !== void 0 && (o += t.map), o;
1604
+ var i = t.styles + ";";
1605
+ return process.env.NODE_ENV !== "production" && t.map !== void 0 && (i += t.map), i;
1606
1606
  }
1607
1607
  return Jn(e, r, t);
1608
1608
  }
1609
1609
  case "function": {
1610
1610
  if (e !== void 0) {
1611
- var i = Re, l = t(e);
1612
- return Re = i, fr(e, r, l);
1611
+ var o = Re, l = t(e);
1612
+ return Re = o, fr(e, r, l);
1613
1613
  } else
1614
1614
  process.env.NODE_ENV !== "production" && console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");
1615
1615
  break;
@@ -1637,29 +1637,29 @@ You should wrap it with \`css\` like this:
1637
1637
  function Jn(e, r, t) {
1638
1638
  var a = "";
1639
1639
  if (Array.isArray(t))
1640
- for (var o = 0; o < t.length; o++)
1641
- a += fr(e, r, t[o]) + ";";
1640
+ for (var i = 0; i < t.length; i++)
1641
+ a += fr(e, r, t[i]) + ";";
1642
1642
  else
1643
- for (var i in t) {
1644
- var l = t[i];
1643
+ for (var o in t) {
1644
+ var l = t[o];
1645
1645
  if (typeof l != "object")
1646
- r != null && r[l] !== void 0 ? a += i + "{" + r[l] + "}" : ct(l) && (a += Pr(i) + ":" + Er(i, l) + ";");
1646
+ r != null && r[l] !== void 0 ? a += o + "{" + r[l] + "}" : ct(l) && (a += Pr(o) + ":" + Er(o, l) + ";");
1647
1647
  else {
1648
- if (i === "NO_COMPONENT_SELECTOR" && process.env.NODE_ENV !== "production")
1648
+ if (o === "NO_COMPONENT_SELECTOR" && process.env.NODE_ENV !== "production")
1649
1649
  throw new Error(Ct);
1650
1650
  if (Array.isArray(l) && typeof l[0] == "string" && (r == null || r[l[0]] === void 0))
1651
1651
  for (var u = 0; u < l.length; u++)
1652
- ct(l[u]) && (a += Pr(i) + ":" + Er(i, l[u]) + ";");
1652
+ ct(l[u]) && (a += Pr(o) + ":" + Er(o, l[u]) + ";");
1653
1653
  else {
1654
1654
  var d = fr(e, r, l);
1655
- switch (i) {
1655
+ switch (o) {
1656
1656
  case "animation":
1657
1657
  case "animationName": {
1658
- a += Pr(i) + ":" + d + ";";
1658
+ a += Pr(o) + ":" + d + ";";
1659
1659
  break;
1660
1660
  }
1661
1661
  default:
1662
- process.env.NODE_ENV !== "production" && i === "undefined" && console.error(zn), a += i + "{" + d + "}";
1662
+ process.env.NODE_ENV !== "production" && o === "undefined" && console.error(zn), a += o + "{" + d + "}";
1663
1663
  }
1664
1664
  }
1665
1665
  }
@@ -1671,23 +1671,23 @@ process.env.NODE_ENV !== "production" && (Tt = /\/\*#\ssourceMappingURL=data:app
1671
1671
  var Re, ft = function(r, t, a) {
1672
1672
  if (r.length === 1 && typeof r[0] == "object" && r[0] !== null && r[0].styles !== void 0)
1673
1673
  return r[0];
1674
- var o = !0, i = "";
1674
+ var i = !0, o = "";
1675
1675
  Re = void 0;
1676
1676
  var l = r[0];
1677
- l == null || l.raw === void 0 ? (o = !1, i += fr(a, t, l)) : (process.env.NODE_ENV !== "production" && l[0] === void 0 && console.error(st), i += l[0]);
1677
+ l == null || l.raw === void 0 ? (i = !1, o += fr(a, t, l)) : (process.env.NODE_ENV !== "production" && l[0] === void 0 && console.error(st), o += l[0]);
1678
1678
  for (var u = 1; u < r.length; u++)
1679
- i += fr(a, t, r[u]), o && (process.env.NODE_ENV !== "production" && l[u] === void 0 && console.error(st), i += l[u]);
1679
+ o += fr(a, t, r[u]), i && (process.env.NODE_ENV !== "production" && l[u] === void 0 && console.error(st), o += l[u]);
1680
1680
  var d;
1681
- process.env.NODE_ENV !== "production" && (i = i.replace(Tt, function(y) {
1681
+ process.env.NODE_ENV !== "production" && (o = o.replace(Tt, function(y) {
1682
1682
  return d = y, "";
1683
1683
  })), ut.lastIndex = 0;
1684
- for (var v = "", m; (m = ut.exec(i)) !== null; )
1684
+ for (var v = "", m; (m = ut.exec(o)) !== null; )
1685
1685
  v += "-" + // $FlowFixMe we know it's not null
1686
1686
  m[1];
1687
- var h = Bn(i) + v;
1687
+ var h = Bn(o) + v;
1688
1688
  return process.env.NODE_ENV !== "production" ? {
1689
1689
  name: h,
1690
- styles: i,
1690
+ styles: o,
1691
1691
  map: d,
1692
1692
  next: Re,
1693
1693
  toString: function() {
@@ -1695,7 +1695,7 @@ var Re, ft = function(r, t, a) {
1695
1695
  }
1696
1696
  } : {
1697
1697
  name: h,
1698
- styles: i,
1698
+ styles: o,
1699
1699
  next: Re
1700
1700
  };
1701
1701
  }, Xn = function(r) {
@@ -1715,8 +1715,8 @@ process.env.NODE_ENV !== "production" && (Yr.displayName = "EmotionCacheContext"
1715
1715
  Yr.Provider;
1716
1716
  var ea = function(r) {
1717
1717
  return /* @__PURE__ */ pt(function(t, a) {
1718
- var o = Vt(Yr);
1719
- return r(t, o, a);
1718
+ var i = Vt(Yr);
1719
+ return r(t, i, a);
1720
1720
  });
1721
1721
  }, Pt = /* @__PURE__ */ Fe.createContext({});
1722
1722
  process.env.NODE_ENV !== "production" && (Pt.displayName = "EmotionThemeContext");
@@ -1733,12 +1733,12 @@ var dt = function(r) {
1733
1733
  if (r)
1734
1734
  for (var t = r.split(`
1735
1735
  `), a = 0; a < t.length; a++) {
1736
- var o = ra(t[a]);
1737
- if (o) {
1738
- if (ta.has(o))
1736
+ var i = ra(t[a]);
1737
+ if (i) {
1738
+ if (ta.has(i))
1739
1739
  break;
1740
- if (/^[A-Z]/.test(o))
1741
- return na(o);
1740
+ if (/^[A-Z]/.test(i))
1741
+ return na(i);
1742
1742
  }
1743
1743
  }
1744
1744
  }, Mr = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Dr = "__EMOTION_LABEL_PLEASE_DO_NOT_USE__", Ot = function(r, t) {
@@ -1746,24 +1746,24 @@ var dt = function(r) {
1746
1746
  t.css.indexOf(":") !== -1)
1747
1747
  throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + t.css + "`");
1748
1748
  var a = {};
1749
- for (var o in t)
1750
- _r.call(t, o) && (a[o] = t[o]);
1749
+ for (var i in t)
1750
+ _r.call(t, i) && (a[i] = t[i]);
1751
1751
  if (a[Mr] = r, process.env.NODE_ENV !== "production" && t.css && (typeof t.css != "object" || typeof t.css.name != "string" || t.css.name.indexOf("-") === -1)) {
1752
- var i = aa(new Error().stack);
1753
- i && (a[Dr] = i);
1752
+ var o = aa(new Error().stack);
1753
+ o && (a[Dr] = o);
1754
1754
  }
1755
1755
  return a;
1756
1756
  }, oa = function(r) {
1757
- var t = r.cache, a = r.serialized, o = r.isStringTag;
1758
- return _t(t, a, o), Qn(function() {
1759
- return Vn(t, a, o);
1757
+ var t = r.cache, a = r.serialized, i = r.isStringTag;
1758
+ return _t(t, a, i), Qn(function() {
1759
+ return Vn(t, a, i);
1760
1760
  }), null;
1761
1761
  }, At = /* @__PURE__ */ ea(function(e, r, t) {
1762
1762
  var a = e.css;
1763
1763
  typeof a == "string" && r.registered[a] !== void 0 && (a = r.registered[a]);
1764
- var o = e[Mr], i = [a], l = "";
1765
- typeof e.className == "string" ? l = jn(r.registered, i, e.className) : e.className != null && (l = e.className + " ");
1766
- var u = ft(i, void 0, Fe.useContext(Pt));
1764
+ var i = e[Mr], o = [a], l = "";
1765
+ typeof e.className == "string" ? l = jn(r.registered, o, e.className) : e.className != null && (l = e.className + " ");
1766
+ var u = ft(o, void 0, Fe.useContext(Pt));
1767
1767
  if (process.env.NODE_ENV !== "production" && u.name.indexOf("-") === -1) {
1768
1768
  var d = e[Dr];
1769
1769
  d && (u = ft([u, "label:" + d + ";"]));
@@ -1775,8 +1775,8 @@ var dt = function(r) {
1775
1775
  return v.ref = t, v.className = l, /* @__PURE__ */ Fe.createElement(Fe.Fragment, null, /* @__PURE__ */ Fe.createElement(oa, {
1776
1776
  cache: r,
1777
1777
  serialized: u,
1778
- isStringTag: typeof o == "string"
1779
- }), /* @__PURE__ */ Fe.createElement(o, v));
1778
+ isStringTag: typeof i == "string"
1779
+ }), /* @__PURE__ */ Fe.createElement(i, v));
1780
1780
  });
1781
1781
  process.env.NODE_ENV !== "production" && (At.displayName = "EmotionCssPropInternal");
1782
1782
  var It = At, Ze = Jt;
@@ -1788,42 +1788,42 @@ function ge(e, r, t) {
1788
1788
  }
1789
1789
  function ia(e, r) {
1790
1790
  let t = null, a = null;
1791
- return function(...i) {
1791
+ return function(...o) {
1792
1792
  const l = this;
1793
- t === null ? r.apply(l, i) : a = i, clearTimeout(t), t = setTimeout(() => {
1793
+ t === null ? r.apply(l, o) : a = o, clearTimeout(t), t = setTimeout(() => {
1794
1794
  a && (r.apply(l, a), a = null), t = null;
1795
1795
  }, e);
1796
1796
  };
1797
1797
  }
1798
1798
  const sa = (e, r) => {
1799
- let t, a, o;
1800
- const i = (l, u, d) => (v) => {
1799
+ let t, a, i;
1800
+ const o = (l, u, d) => (v) => {
1801
1801
  const m = performance.now();
1802
1802
  return setTimeout(() => {
1803
- if (!o) {
1803
+ if (!i) {
1804
1804
  t = void 0, a = void 0;
1805
1805
  return;
1806
1806
  }
1807
- const h = (async () => r(...o))();
1808
- o = void 0, h.then(u).catch((N) => {
1807
+ const h = (async () => r(...i))();
1808
+ i = void 0, h.then(u).catch((N) => {
1809
1809
  console.error(N), d(N);
1810
1810
  });
1811
1811
  let y, k;
1812
1812
  a = new Promise((N, b) => {
1813
1813
  y = N, k = b;
1814
- }), t = h.then(i(m, y, k)).catch((N) => (console.error(N), i(l, y, k)(N)));
1814
+ }), t = h.then(o(m, y, k)).catch((N) => (console.error(N), o(l, y, k)(N)));
1815
1815
  }, e - (m - l)), v;
1816
1816
  };
1817
1817
  return (...l) => {
1818
- if (o = l, t)
1818
+ if (i = l, t)
1819
1819
  return a;
1820
1820
  {
1821
1821
  const u = performance.now(), d = (async () => r(...l))();
1822
- o = void 0;
1822
+ i = void 0;
1823
1823
  let v, m;
1824
1824
  return a = new Promise((h, y) => {
1825
1825
  v = h, m = y;
1826
- }), t = d.then(i(u, v, m)).catch((h) => (console.error(h), i(u, v, m)(h))), d;
1826
+ }), t = d.then(o(u, v, m)).catch((h) => (console.error(h), o(u, v, m)(h))), d;
1827
1827
  }
1828
1828
  };
1829
1829
  }, ca = (e) => (r) => new ReadableStream({
@@ -1833,7 +1833,7 @@ const sa = (e, r) => {
1833
1833
  this.reader = r.getReader();
1834
1834
  },
1835
1835
  async pull(t) {
1836
- const { leftOverData: a } = this, o = async ({ buffer: u = new Uint8Array(e), currentSize: d = 0 } = {}) => {
1836
+ const { leftOverData: a } = this, i = async ({ buffer: u = new Uint8Array(e), currentSize: d = 0 } = {}) => {
1837
1837
  const { value: v, done: m } = await this.reader.read();
1838
1838
  if (d === 0 && a && (u.set(a), d += a.byteLength, this.leftOverData = void 0), m) {
1839
1839
  const k = { buffer: u.slice(0, d), currentSize: d, done: m };
@@ -1841,9 +1841,9 @@ const sa = (e, r) => {
1841
1841
  }
1842
1842
  let h;
1843
1843
  const y = v.slice(0, e - d);
1844
- return h = d + y.byteLength, u.set(y, d), h === e ? (this.leftOverData = v.slice(e - d), { buffer: u, currentSize: h, done: !1 }) : o({ buffer: u, currentSize: h });
1845
- }, { buffer: i, done: l } = await o();
1846
- i?.byteLength && t.enqueue(i), l && t.close();
1844
+ return h = d + y.byteLength, u.set(y, d), h === e ? (this.leftOverData = v.slice(e - d), { buffer: u, currentSize: h, done: !1 }) : i({ buffer: u, currentSize: h });
1845
+ }, { buffer: o, done: l } = await i();
1846
+ o?.byteLength && t.enqueue(o), l && t.close();
1847
1847
  },
1848
1848
  cancel() {
1849
1849
  this.reader.cancel(), this.leftOverData = void 0;
@@ -1861,7 +1861,7 @@ const sa = (e, r) => {
1861
1861
  if (this.buffers.length >= e)
1862
1862
  return;
1863
1863
  this.currentPullPromise = this.reader.read();
1864
- const { value: i, done: l } = await this.currentPullPromise;
1864
+ const { value: o, done: l } = await this.currentPullPromise;
1865
1865
  if (this.currentPullPromise = void 0, l) {
1866
1866
  try {
1867
1867
  for (const u of this.buffers)
@@ -1871,17 +1871,23 @@ const sa = (e, r) => {
1871
1871
  }
1872
1872
  return;
1873
1873
  }
1874
- return this.buffers.push(i), i;
1875
- }, o = async () => {
1874
+ return this.buffers.push(o), o;
1875
+ }, i = async () => {
1876
1876
  if (!(this.buffers.length >= e)) {
1877
1877
  if (this.buffers.length === 0)
1878
- return await a() ? o() : void 0;
1879
- a().then((i) => {
1880
- i && o();
1878
+ return await a() ? i() : void 0;
1879
+ a().then((o) => {
1880
+ o && i();
1881
1881
  });
1882
1882
  }
1883
1883
  };
1884
- await o(), t.enqueue(this.buffers.shift()), o();
1884
+ await i();
1885
+ try {
1886
+ t.enqueue(this.buffers.shift()), i();
1887
+ } catch (o) {
1888
+ if (!(o instanceof TypeError && (o.message === "ReadableStreamDefaultController.enqueue: Cannot enqueue into a stream that has already been requested to close." || o.message === "Failed to execute 'enqueue' on 'ReadableStreamDefaultController': Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed")))
1889
+ throw o;
1890
+ }
1885
1891
  },
1886
1892
  cancel() {
1887
1893
  this.reader.cancel();
@@ -1971,16 +1977,16 @@ const sa = (e, r) => {
1971
1977
  }
1972
1978
  ) : null
1973
1979
  ] }), mt = ({ ref: e, defaultValue: r }) => {
1974
- const [t, a] = Y(r), [o, i] = Y(!1), l = (u) => {
1975
- if (i(!0), !e.current)
1980
+ const [t, a] = Y(r), [i, o] = Y(!1), l = (u) => {
1981
+ if (o(!0), !e.current)
1976
1982
  return;
1977
1983
  const { clientX: d } = u, { left: v, right: m } = e.current.getBoundingClientRect();
1978
1984
  a(Math.min(Math.max((d - v) / (m - v), 0), 1));
1979
1985
  };
1980
1986
  return he(() => {
1981
- if (!o)
1987
+ if (!i)
1982
1988
  return;
1983
- const u = () => i(!1), d = (v) => {
1989
+ const u = () => o(!1), d = (v) => {
1984
1990
  if (!e.current)
1985
1991
  return;
1986
1992
  const { clientX: m } = v, { left: h, right: y } = e.current.getBoundingClientRect();
@@ -1989,9 +1995,9 @@ const sa = (e, r) => {
1989
1995
  return document.addEventListener("mousemove", d), document.addEventListener("mouseup", u), () => {
1990
1996
  document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", u);
1991
1997
  };
1992
- }, [o]), {
1998
+ }, [i]), {
1993
1999
  value: t,
1994
- scrubbing: o,
2000
+ scrubbing: i,
1995
2001
  scrub: l
1996
2002
  };
1997
2003
  }, da = JSON.parse(`[{"tag":"zu","name":"isiZulu","originalName":"isiZulu","locale":"zu-ZA"},{"tag":"zh","name":"Chinese","originalName":"中文","locale":"zh-CHS"},{"tag":"yo","name":"Yoruba","originalName":"Yoruba","locale":"yo-NG"},{"tag":"xh","name":"isiXhosa","originalName":"isiXhosa","locale":"xh-ZA"},{"tag":"wo","name":"Wolof","originalName":"Wolof","locale":"wo-SN"},{"tag":"vi","name":"Vietnamese","originalName":"Tiếng Việt","locale":"vi"},{"tag":"uz","name":"Uzbek","originalName":"U'zbek","locale":"uz"},{"tag":"ur","name":"Urdu","originalName":"اُردو","locale":"ur"},{"tag":"uk","name":"Ukrainian","originalName":"україньска","locale":"uk"},{"tag":"ug","name":"Uyghur","originalName":"ئۇيغۇرچە","locale":"ug-CN"},{"tag":"tzm","name":"Tamazight","originalName":"Tamazight","locale":"tzm-Latn-DZ"},{"tag":"tt","name":"Tatar","originalName":"Татар","locale":"tt"},{"tag":"tr","name":"Turkish","originalName":"Türkçe","locale":"tr"},{"tag":"tn","name":"Setswana","originalName":"Setswana","locale":"tn-ZA"},{"tag":"tk","name":"Turkmen","originalName":"türkmençe","locale":"tk-TM"},{"tag":"th","name":"Thai","originalName":"ไทย","locale":"th"},{"tag":"tg","name":"Tajik","originalName":"Тоҷикӣ","locale":"tg-Cyrl-TJ"},{"tag":"te","name":"Telugu","originalName":"తెలుగు","locale":"te"},{"tag":"ta","name":"Tamil","originalName":"தமிழ்","locale":"ta"},{"tag":"syr","name":"Syriac","originalName":"ܣܘܪܝܝܐ","locale":"syr"},{"tag":"sw","name":"Kiswahili","originalName":"Kiswahili","locale":"sw"},{"tag":"sv","name":"Swedish","originalName":"svenska","locale":"sv"},{"tag":"sr","name":"Serbian","originalName":"srpski","locale":"sr"},{"tag":"sq","name":"Albanian","originalName":"shqipe","locale":"sq"},{"tag":"sms","name":"Sami","originalName":"sääm´ǩiõll","locale":"sms-FI"},{"tag":"smn","name":"Sami","originalName":"sämikielâ","locale":"smn-FI"},{"tag":"smj","name":"Sami","originalName":"julevusámegiella","locale":"smj-NO"},{"tag":"sma","name":"Sami","originalName":"åarjelsaemiengiele","locale":"sma-NO"},{"tag":"sl","name":"Slovenian","originalName":"slovenski","locale":"sl"},{"tag":"sk","name":"Slovak","originalName":"slovenčina","locale":"sk"},{"tag":"si","name":"Sinhala","originalName":"සිංහ","locale":"si-LK"},{"tag":"se","name":"Sami","originalName":"davvisámegiella","locale":"se-FI"},{"tag":"sah","name":"Yakut","originalName":"саха","locale":"sah-RU"},{"tag":"sa","name":"Sanskrit","originalName":"संस्कृत","locale":"sa"},{"tag":"rw","name":"Kinyarwanda","originalName":"Kinyarwanda","locale":"rw-RW"},{"tag":"ru","name":"Russian","originalName":"русский","locale":"ru"},{"tag":"ro","name":"Romanian","originalName":"română","locale":"ro"},{"tag":"rm","name":"Romansh","originalName":"Rumantsch","locale":"rm-CH"},{"tag":"quz","name":"Quechua","originalName":"runasimi","locale":"quz-BO"},{"tag":"qut","name":"K'iche","originalName":"K'iche","locale":"qut-GT"},{"tag":"pt","name":"Portuguese","originalName":"Português","locale":"pt"},{"tag":"ps","name":"Pashto","originalName":"پښتو","locale":"ps-AF"},{"tag":"prs","name":"Dari","originalName":"درى","locale":"prs-AF"},{"tag":"pl","name":"Polish","originalName":"polski","locale":"pl"},{"tag":"pa","name":"Punjabi","originalName":"ਪੰਜਾਬੀ","locale":"pa"},{"tag":"or","name":"Oriya","originalName":"ଓଡ଼ିଆ","locale":"or-IN"},{"tag":"oc","name":"Occitan","originalName":"Occitan","locale":"oc-FR"},{"tag":"nso","name":"Sesotho sa Leboa","originalName":"Sesotho sa Leboa","locale":"nso-ZA"},{"tag":"no","name":"Norwegian","originalName":"norsk","locale":"no"},{"tag":"nn","name":"Norwegian, Nynorsk","originalName":"norsk, nynorsk","locale":"nn-NO"},{"tag":"nl","name":"Dutch","originalName":"Nederlands","locale":"nl"},{"tag":"ne","name":"Nepali","originalName":"नेपाली","locale":"ne-NP"},{"tag":"nb","name":"Norwegian, Bokmål","originalName":"norsk, bokmål","locale":"nb-NO"},{"tag":"mt","name":"Maltese","originalName":"Malti","locale":"mt-MT"},{"tag":"ms","name":"Malay","originalName":"Bahasa Malaysia","locale":"ms"},{"tag":"mr","name":"Marathi","originalName":"मराठी","locale":"mr"},{"tag":"moh","name":"Mohawk","originalName":"Kanien'kéha","locale":"moh-CA"},{"tag":"mn","name":"Mongolian","originalName":"Монгол хэл","locale":"mn"},{"tag":"ml","name":"Malayalam","originalName":"മലയാളം","locale":"ml-IN"},{"tag":"mk","name":"Macedonian","originalName":"македонски јазик","locale":"mk"},{"tag":"mi","name":"Maori","originalName":"Reo Māori","locale":"mi-NZ"},{"tag":"lv","name":"Latvian","originalName":"latviešu","locale":"lv"},{"tag":"lt","name":"Lithuanian","originalName":"lietuvių","locale":"lt"},{"tag":"lo","name":"Lao","originalName":"ລາວ","locale":"lo-LA"},{"tag":"lb","name":"Luxembourgish","originalName":"Lëtzebuergesch","locale":"lb-LU"},{"tag":"ky","name":"Kyrgyz","originalName":"Кыргыз","locale":"ky"},{"tag":"kok","name":"Konkani","originalName":"कोंकणी","locale":"kok"},{"tag":"ko","name":"Korean","originalName":"한국어","locale":"ko"},{"tag":"kn","name":"Kannada","originalName":"ಕನ್ನಡ","locale":"kn"},{"tag":"km","name":"Khmer","originalName":"ខ្មែរ","locale":"km-KH"},{"tag":"kl","name":"Greenlandic","originalName":"kalaallisut","locale":"kl-GL"},{"tag":"kk","name":"Kazakh","originalName":"Қазащb","locale":"kk"},{"tag":"ka","name":"Georgian","originalName":"ქართული","locale":"ka"},{"tag":"ja","name":"Japanese","originalName":"日本語","locale":"ja"},{"tag":"iu","name":"Inuktitut","originalName":"ᐃᓄᒃᑎᑐᑦ","locale":"iu-Cans-CA"},{"tag":"it","name":"Italian","originalName":"italiano","locale":"it"},{"tag":"is","name":"Icelandic","originalName":"íslenska","locale":"is"},{"tag":"ii","name":"Yi","originalName":"ꆈꌠꁱꂷ","locale":"ii-CN"},{"tag":"ig","name":"Igbo","originalName":"Igbo","locale":"ig-NG"},{"tag":"id","name":"Indonesian","originalName":"Bahasa Indonesia","locale":"id"},{"tag":"hy","name":"Armenian","originalName":"Հայերեն","locale":"hy"},{"tag":"hu","name":"Hungarian","originalName":"magyar","locale":"hu"},{"tag":"hsb","name":"Upper Sorbian","originalName":"hornjoserbšćina","locale":"hsb-DE"},{"tag":"hr","name":"Croatian","originalName":"hrvatski","locale":"hr"},{"tag":"hi","name":"Hindi","originalName":"हिंदी","locale":"hi"},{"tag":"he","name":"Hebrew","originalName":"עברית","locale":"he"},{"tag":"ha","name":"Hausa","originalName":"Hausa","locale":"ha-Latn-NG"},{"tag":"gu","name":"Gujarati","originalName":"ગુજરાતી","locale":"gu"},{"tag":"gsw","name":"Alsatian","originalName":"Elsässisch","locale":"gsw-FR"},{"tag":"gl","name":"Galician","originalName":"galego","locale":"gl"},{"tag":"gd","name":"Scottish Gaelic","originalName":"Gàidhlig","locale":"gd-GB"},{"tag":"ga","name":"Irish","originalName":"Gaeilge","locale":"ga-IE"},{"tag":"fy","name":"Frisian","originalName":"Frysk","locale":"fy-NL"},{"tag":"fr","name":"French","originalName":"français","locale":"fr"},{"tag":"fo","name":"Faroese","originalName":"føroyskt","locale":"fo"},{"tag":"fil","name":"Filipino","originalName":"Filipino","locale":"fil-PH"},{"tag":"fi","name":"Finnish","originalName":"suomi","locale":"fi"},{"tag":"fa","name":"Persian","originalName":"فارسى","locale":"fa"},{"tag":"eu","name":"Basque","originalName":"euskara","locale":"eu"},{"tag":"et","name":"Estonian","originalName":"eesti","locale":"et"},{"tag":"es","name":"Spanish","originalName":"español","locale":"es"},{"tag":"en","name":"English","originalName":"English","locale":"en"},{"tag":"el","name":"Greek","originalName":"ελληνικά","locale":"el"},{"tag":"dv","name":"Divehi","originalName":"ދިވެހިބަސް","locale":"dv"},{"tag":"dsb","name":"Lower Sorbian","originalName":"dolnoserbšćina","locale":"dsb-DE"},{"tag":"de","name":"German","originalName":"Deutsch","locale":"de"},{"tag":"da","name":"Danish","originalName":"dansk","locale":"da"},{"tag":"cy","name":"Welsh","originalName":"Cymraeg","locale":"cy-GB"},{"tag":"cs","name":"Czech","originalName":"čeština","locale":"cs"},{"tag":"co","name":"Corsican","originalName":"Corsu","locale":"co-FR"},{"tag":"ca","name":"Catalan","originalName":"català","locale":"ca"},{"tag":"bs","name":"Bosnian","originalName":"босански","locale":"bs-Cyrl-BA"},{"tag":"br","name":"Breton","originalName":"brezhoneg","locale":"br-FR"},{"tag":"bo","name":"Tibetan","originalName":"བོད་ཡིག","locale":"bo-CN"},{"tag":"bn","name":"Bengali","originalName":"বাংলা","locale":"bn-BD"},{"tag":"bg","name":"Bulgarian","originalName":"български","locale":"bg"},{"tag":"be","name":"Belarusian","originalName":"Беларускі","locale":"be"},{"tag":"ba","name":"Bashkir","originalName":"Башҡорт","locale":"ba-RU"},{"tag":"az","name":"Azeri","originalName":"Azərbaycan­ılı","locale":"az"},{"tag":"as","name":"Assamese","originalName":"অসমীয়া","locale":"as-IN"},{"tag":"arn","name":"Mapudungun","originalName":"Mapudungun","locale":"arn-CL"},{"tag":"ar","name":"Arabic","originalName":"العربية","locale":"ar"},{"tag":"am","name":"Amharic","originalName":"አማርኛ","locale":"am-ET"},{"tag":"af","name":"Afrikaans","originalName":"Afrikaans","locale":"af"},{"tag":"iv","name":"Invariant Language","originalName":"Invariant Language","locale":""},{"tag":"Two letter","name":"English","originalName":"Native","locale":"Culture .NET"}]`), gt = (e) => da.find((r) => r.tag === e)?.name, ma = (e) => {
@@ -2001,11 +2007,11 @@ const sa = (e, r) => {
2001
2007
  });
2002
2008
  return he(() => {
2003
2009
  localStorage.setItem(e, JSON.stringify(r));
2004
- }, [e, r]), (a, o) => (he(() => {
2005
- t((i) => ({ ...i, [a]: o }));
2010
+ }, [e, r]), (a, i) => (he(() => {
2011
+ t((o) => ({ ...o, [a]: i }));
2006
2012
  }, []), [
2007
2013
  r[a],
2008
- (i) => t(typeof i == "function" ? (l) => ({ ...l, [a]: i(l[a]) }) : (l) => ({ ...l, [a]: i }))
2014
+ (o) => t(typeof o == "function" ? (l) => ({ ...l, [a]: o(l[a]) }) : (l) => ({ ...l, [a]: o }))
2009
2015
  ]);
2010
2016
  }, ga = Nr`
2011
2017
  position: relative;
@@ -2271,8 +2277,8 @@ const sa = (e, r) => {
2271
2277
  currentTime: r,
2272
2278
  togglePlay: t,
2273
2279
  seek: a,
2274
- setVolume: o,
2275
- isSubtitleMenuHidden: i,
2280
+ setVolume: i,
2281
+ isSubtitleMenuHidden: o,
2276
2282
  setIsSubtitleMenuHidden: l,
2277
2283
  isErrorMenuHidden: u,
2278
2284
  setIsErrorMenuHidden: d,
@@ -2295,10 +2301,10 @@ const sa = (e, r) => {
2295
2301
  we !== void 0 && a(we * (e ?? 0));
2296
2302
  }, [we]), he(() => {
2297
2303
  if (X) {
2298
- o(0), Ee(X), ae && fe(ae);
2304
+ i(0), Ee(X), ae && fe(ae);
2299
2305
  return;
2300
2306
  }
2301
- ae !== void 0 && (o(ae ** 2), fe(ae), Ee(X));
2307
+ ae !== void 0 && (i(ae ** 2), fe(ae), Ee(X));
2302
2308
  }, [ae, X]);
2303
2309
  const ee = () => {
2304
2310
  R(!1);
@@ -2309,7 +2315,7 @@ const sa = (e, r) => {
2309
2315
  }, Ce = (s, w, W) => {
2310
2316
  v(w === void 0 ? w : W);
2311
2317
  }, $e = (s) => {
2312
- if (!i && s.relatedTarget === null) {
2318
+ if (!o && s.relatedTarget === null) {
2313
2319
  l((W) => !W);
2314
2320
  return;
2315
2321
  }
@@ -2417,9 +2423,9 @@ const sa = (e, r) => {
2417
2423
  "Error"
2418
2424
  ] })
2419
2425
  ] }) : null }),
2420
- /* @__PURE__ */ p(Xe, { id: "subtitle-button-tooltip", globalEventOff: "click", effect: "solid", place: "top", disable: !i, children: "Subtitles" }),
2426
+ /* @__PURE__ */ p(Xe, { id: "subtitle-button-tooltip", globalEventOff: "click", effect: "solid", place: "top", disable: !o, children: "Subtitles" }),
2421
2427
  /* @__PURE__ */ p("div", { className: "subtitle-area", children: y.length ? /* @__PURE__ */ ge(Ze, { children: [
2422
- /* @__PURE__ */ p("div", { className: `subtitle-menu ${i ? "hide" : ""}`, children: i ? null : [...y, void 0].map(
2428
+ /* @__PURE__ */ p("div", { className: `subtitle-menu ${o ? "hide" : ""}`, children: o ? null : [...y, void 0].map(
2423
2429
  (s, w) => /* @__PURE__ */ p("button", { onClick: (W) => Ce(W, s, w), children: /* @__PURE__ */ p(ve, { subtitleTrack: s }) }, s ? w : "disabled")
2424
2430
  ) }),
2425
2431
  /* @__PURE__ */ p("button", { className: "subtitle-menu-button", "data-tip": !0, "data-for": "subtitle-button-tooltip", onClick: $e, children: /* @__PURE__ */ p(ve, { subtitleTrack: b }) })
@@ -2457,8 +2463,8 @@ overflow: hidden;
2457
2463
  isPlaying: r,
2458
2464
  loading: t,
2459
2465
  duration: a,
2460
- loadedTime: o,
2461
- currentTime: i,
2466
+ loadedTime: i,
2467
+ currentTime: o,
2462
2468
  pictureInPicture: l,
2463
2469
  fullscreen: u,
2464
2470
  play: d,
@@ -2552,10 +2558,10 @@ overflow: hidden;
2552
2558
  setVolume: h,
2553
2559
  subtitleTrack: ee,
2554
2560
  tracks: k,
2555
- currentTime: i,
2561
+ currentTime: o,
2556
2562
  duration: a,
2557
2563
  isPlaying: r,
2558
- loadedTime: o,
2564
+ loadedTime: i,
2559
2565
  errors: b,
2560
2566
  customControls: x
2561
2567
  }
@@ -2586,8 +2592,8 @@ overflow: hidden;
2586
2592
  baseBufferSize: r = ba,
2587
2593
  size: t,
2588
2594
  fetch: a,
2589
- customControls: o,
2590
- publicPath: i,
2595
+ customControls: i,
2596
+ publicPath: o,
2591
2597
  wasmUrl: l,
2592
2598
  libavWorkerUrl: u,
2593
2599
  libavWorkerOptions: d,
@@ -2603,7 +2609,7 @@ overflow: hidden;
2603
2609
  let w, W;
2604
2610
  return (async () => {
2605
2611
  w = m({
2606
- publicPath: i,
2612
+ publicPath: o,
2607
2613
  workerUrl: u,
2608
2614
  workerOptions: d,
2609
2615
  bufferSize: r,
@@ -2796,7 +2802,7 @@ overflow: hidden;
2796
2802
  attachments: B,
2797
2803
  tracks: Oe,
2798
2804
  errors: Ae,
2799
- customControls: o,
2805
+ customControls: i,
2800
2806
  libassWorkerUrl: v,
2801
2807
  wasmUrl: l
2802
2808
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banou/media-player",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
package/src/index.tsx CHANGED
@@ -307,6 +307,7 @@ const FKNVideo = forwardRef<HTMLVideoElement, VideoHTMLAttributes<HTMLInputEleme
307
307
  chunks = []
308
308
  await remuxer.seek(seekTime)
309
309
  const chunk1 = await pull()
310
+ // firefox sometimes throws "Uncaught (in promise) DOMException: An attempt was made to use an object that is not, or is no longer, usable"
310
311
  sourceBuffer.timestampOffset = chunk1.pts
311
312
  await appendBuffer(chunk1.buffer)
312
313
  if (firstSeekPaused === false) {
package/src/main.tsx CHANGED
@@ -12,7 +12,7 @@ const mountStyle = css`
12
12
  `
13
13
 
14
14
  const BASE_BUFFER_SIZE = 5_000_000
15
- const STREAM_RESPONSES = false
15
+ const BACKPRESSURE_STREAM_ENABLED = !navigator.userAgent.includes("Firefox")
16
16
 
17
17
  const Mount = () => {
18
18
  const [videoElemRef, setVideoElemRef] = useState<HTMLVideoElement | null>()
@@ -28,7 +28,7 @@ const Mount = () => {
28
28
  '/video9.mkv',
29
29
  {
30
30
  headers: {
31
- Range: `bytes=${offset}-${end ?? ''}`
31
+ Range: `bytes=${offset}-${end ?? (!BACKPRESSURE_STREAM_ENABLED ? Math.min(offset + BASE_BUFFER_SIZE, size!) : '')}`
32
32
  }
33
33
  }
34
34
  )
package/src/utils.ts CHANGED
@@ -227,8 +227,19 @@ export const toBufferedStream = (SIZE: number) => (stream: ReadableStream) =>
227
227
  }
228
228
 
229
229
  await tryToBuffer()
230
- controller.enqueue(this.buffers.shift())
231
- tryToBuffer()
230
+ try {
231
+ controller.enqueue(this.buffers.shift())
232
+ tryToBuffer()
233
+ } catch(err) {
234
+ if (!(
235
+ err instanceof TypeError && (
236
+ err.message === 'ReadableStreamDefaultController.enqueue: Cannot enqueue into a stream that has already been requested to close.' ||
237
+ err.message === `Failed to execute 'enqueue' on 'ReadableStreamDefaultController': Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed`
238
+ )
239
+ )) {
240
+ throw err
241
+ }
242
+ }
232
243
  },
233
244
  cancel() {
234
245
  this.reader!.cancel()