gearboxdownloadmodal 8.5.3 → 8.5.5
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.es.js
CHANGED
|
@@ -285,18 +285,18 @@ function gl() {
|
|
|
285
285
|
if (wi && ii && typeof wi.stack == "string") {
|
|
286
286
|
for (var li = wi.stack.split(`
|
|
287
287
|
`), xi = ii.stack.split(`
|
|
288
|
-
`),
|
|
288
|
+
`), ki = li.length - 1, Wi = xi.length - 1; ki >= 1 && Wi >= 0 && li[ki] !== xi[Wi]; )
|
|
289
289
|
Wi--;
|
|
290
|
-
for (;
|
|
291
|
-
if (li[
|
|
292
|
-
if (
|
|
290
|
+
for (; ki >= 1 && Wi >= 0; ki--, Wi--)
|
|
291
|
+
if (li[ki] !== xi[Wi]) {
|
|
292
|
+
if (ki !== 1 || Wi !== 1)
|
|
293
293
|
do
|
|
294
|
-
if (
|
|
294
|
+
if (ki--, Wi--, Wi < 0 || li[ki] !== xi[Wi]) {
|
|
295
295
|
var ie = `
|
|
296
|
-
` + li[
|
|
296
|
+
` + li[ki].replace(" at new ", " at ");
|
|
297
297
|
return d.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", d.displayName)), typeof d == "function" && ai.set(d, ie), ie;
|
|
298
298
|
}
|
|
299
|
-
while (
|
|
299
|
+
while (ki >= 1 && Wi >= 0);
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
@@ -362,8 +362,8 @@ function gl() {
|
|
|
362
362
|
throw xi.name = "Invariant Violation", xi;
|
|
363
363
|
}
|
|
364
364
|
li = d[qi](E, qi, ii, N, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
365
|
-
} catch (
|
|
366
|
-
li =
|
|
365
|
+
} catch (ki) {
|
|
366
|
+
li = ki;
|
|
367
367
|
}
|
|
368
368
|
li && !(li instanceof Error) && (T(Ki), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ii || "React class", N, qi, typeof li), T(null)), li instanceof Error && !(li.message in Pi) && (Pi[li.message] = !0, T(Ki), k("Failed %s type: %s", N, li.message), T(null));
|
|
369
369
|
}
|
|
@@ -422,7 +422,7 @@ function gl() {
|
|
|
422
422
|
ge[N] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', f(bi.current.type), d.ref), ge[N] = !0);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Ji(d, E) {
|
|
426
426
|
{
|
|
427
427
|
var N = function() {
|
|
428
428
|
At || (At = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", E));
|
|
@@ -480,13 +480,13 @@ function gl() {
|
|
|
480
480
|
for (hi in E)
|
|
481
481
|
Gi.call(E, hi) && !re.hasOwnProperty(hi) && (qi[hi] = E[hi]);
|
|
482
482
|
if (d && d.defaultProps) {
|
|
483
|
-
var
|
|
484
|
-
for (hi in
|
|
485
|
-
qi[hi] === void 0 && (qi[hi] =
|
|
483
|
+
var ki = d.defaultProps;
|
|
484
|
+
for (hi in ki)
|
|
485
|
+
qi[hi] === void 0 && (qi[hi] = ki[hi]);
|
|
486
486
|
}
|
|
487
487
|
if (li || xi) {
|
|
488
488
|
var Wi = typeof d == "function" ? d.displayName || d.name || "Unknown" : d;
|
|
489
|
-
li &&
|
|
489
|
+
li && Ji(qi, Wi), xi && Vi(qi, Wi);
|
|
490
490
|
}
|
|
491
491
|
return ke(d, li, xi, Ki, ii, bi.current, qi);
|
|
492
492
|
}
|
|
@@ -618,8 +618,8 @@ Check the top-level render call using <` + N + ">.");
|
|
|
618
618
|
(d === void 0 || typeof d == "object" && d !== null && Object.keys(d).length === 0) && (li += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
619
619
|
var xi = tl(Ki);
|
|
620
620
|
xi ? li += xi : li += ar();
|
|
621
|
-
var
|
|
622
|
-
d === null ?
|
|
621
|
+
var ki;
|
|
622
|
+
d === null ? ki = "null" : Ii(d) ? ki = "array" : d !== void 0 && d.$$typeof === i ? (ki = "<" + (f(d.type) || "Unknown") + " />", li = " Did you accidentally export a JSX literal instead of a component?") : ki = typeof d, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ki, li);
|
|
623
623
|
}
|
|
624
624
|
var Wi = _i(d, E, N, Ki, hi);
|
|
625
625
|
if (Wi == null)
|
|
@@ -10040,7 +10040,8 @@ async function ko(e, i, t) {
|
|
|
10040
10040
|
_id: i,
|
|
10041
10041
|
networks: t.networks,
|
|
10042
10042
|
versions: t.versions,
|
|
10043
|
-
interactions: t.interactions || ["0 click"]
|
|
10043
|
+
interactions: t.interactions || ["0 click"],
|
|
10044
|
+
extras: t.extras || {}
|
|
10044
10045
|
})).data;
|
|
10045
10046
|
}
|
|
10046
10047
|
const yI = ({
|
|
@@ -10077,12 +10078,12 @@ const yI = ({
|
|
|
10077
10078
|
adikteev: "Copy CDN"
|
|
10078
10079
|
}, bi = () => {
|
|
10079
10080
|
t(e);
|
|
10080
|
-
}, re = async (ni,
|
|
10081
|
+
}, re = async (ni, Ji, Vi) => {
|
|
10081
10082
|
if (H(!0), l === "Flex" && R.flex === !1 && R.customer !== "playableFactoryInternal") {
|
|
10082
10083
|
p("|ACCESS|"), H(!1);
|
|
10083
10084
|
return;
|
|
10084
10085
|
}
|
|
10085
|
-
if (_ && _.length > 0 &&
|
|
10086
|
+
if (_ && _.length > 0 && Ji === "download")
|
|
10086
10087
|
try {
|
|
10087
10088
|
if (!c || !c._id)
|
|
10088
10089
|
throw new Error("Game data is required for multi-version download");
|
|
@@ -10100,16 +10101,16 @@ const yI = ({
|
|
|
10100
10101
|
urlType: G,
|
|
10101
10102
|
responsiveType: "responsive"
|
|
10102
10103
|
};
|
|
10103
|
-
if (ge ?
|
|
10104
|
+
if (ge ? Ji === "copy" ? (b(!0), Ji = "download", ke.molocoGenerateHtml = !0) : z(!0) : Gt && (ke.responsiveType = Vi), console.log("getVersion", ni, Ji, ke), ni === "cdn") {
|
|
10104
10105
|
j(!0), await F(!0), H(!1);
|
|
10105
10106
|
return;
|
|
10106
10107
|
}
|
|
10107
|
-
return ni === "adikteev" && (
|
|
10108
|
+
return ni === "adikteev" && (Ji = "copy"), new Promise((_i, ye) => {
|
|
10108
10109
|
it(
|
|
10109
10110
|
A,
|
|
10110
10111
|
ni,
|
|
10111
10112
|
Ie ? I : null,
|
|
10112
|
-
|
|
10113
|
+
Ji,
|
|
10113
10114
|
h,
|
|
10114
10115
|
ke
|
|
10115
10116
|
).then(($i) => {
|
|
@@ -10120,23 +10121,24 @@ const yI = ({
|
|
|
10120
10121
|
});
|
|
10121
10122
|
}, At = async (ni = !1) => {
|
|
10122
10123
|
ni ? b(!0) : z(!0);
|
|
10123
|
-
const
|
|
10124
|
+
const Ji = {
|
|
10124
10125
|
molocoGenerateHtml: !1
|
|
10125
10126
|
};
|
|
10126
|
-
if (ni && (
|
|
10127
|
+
if (ni && (Ji.molocoGenerateHtml = !0), _ && _.length > 0)
|
|
10127
10128
|
try {
|
|
10128
10129
|
if (!c || !c._id)
|
|
10129
10130
|
throw new Error("Game data is required for multi-version download");
|
|
10130
10131
|
const Vi = await ko(q, c._id, {
|
|
10131
10132
|
networks: ["moloco"],
|
|
10132
|
-
versions: _
|
|
10133
|
+
versions: _,
|
|
10134
|
+
extras: Ji
|
|
10133
10135
|
}), ke = u + "/" + Vi.url, ye = await (await fetch(ke)).blob(), $i = window.URL.createObjectURL(ye), Ti = document.createElement("a");
|
|
10134
10136
|
return Ti.href = $i, Ti.download = Vi.url.split("/").pop() || "download.zip", document.body.appendChild(Ti), Ti.click(), window.URL.revokeObjectURL($i), document.body.removeChild(Ti), H(!1), ni ? b(!1) : z(!1), V(!1), Vi.url;
|
|
10135
10137
|
} catch (Vi) {
|
|
10136
10138
|
console.log("multi-version single network download error", Vi), H(!1), p(Vi.message, Vi);
|
|
10137
10139
|
return;
|
|
10138
10140
|
}
|
|
10139
|
-
it(A, o, Ie ? I : null, "download", h,
|
|
10141
|
+
it(A, o, Ie ? I : null, "download", h, Ji).then((Vi) => {
|
|
10140
10142
|
ni ? b(!1) : z(!1), V(!1);
|
|
10141
10143
|
}).catch((Vi) => {
|
|
10142
10144
|
p(Vi.message, Vi);
|
|
@@ -10144,8 +10146,8 @@ const yI = ({
|
|
|
10144
10146
|
}, Yt = async () => {
|
|
10145
10147
|
ei(!0);
|
|
10146
10148
|
const ni = await CI(q, A, o, l);
|
|
10147
|
-
let
|
|
10148
|
-
at(
|
|
10149
|
+
let Ji = `${u}/${ni == null ? void 0 : ni.url}`;
|
|
10150
|
+
at(Ji) ? (ai(!0), setTimeout(() => ai(!1), 2e3), ei(!1)) : (J(Ji), ei(!1));
|
|
10149
10151
|
}, ge = o === "moloco" || o === "molocoV2", Gt = o === "google", bt = gi.find((ni) => ni.name === o);
|
|
10150
10152
|
return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
10151
10153
|
/* @__PURE__ */ m.jsxs(
|
|
@@ -10283,8 +10285,8 @@ const yI = ({
|
|
|
10283
10285
|
Ni(!0);
|
|
10284
10286
|
else {
|
|
10285
10287
|
g("download");
|
|
10286
|
-
const
|
|
10287
|
-
o === "cdn" && K && K.willSpendCredit && !v || o !== "cdn" && K && K.willSpendCredit ? (Z(!0), x("download"), L(!0)) : ["Playable", "Flex", "Ready"].includes(l) && (!
|
|
10288
|
+
const Ji = I.iosUrl, Vi = I.googleUrl;
|
|
10289
|
+
o === "cdn" && K && K.willSpendCredit && !v || o !== "cdn" && K && K.willSpendCredit ? (Z(!0), x("download"), L(!0)) : ["Playable", "Flex", "Ready"].includes(l) && (!Ji || !Vi) ? (Z(!0), W(!0)) : (W(!1), L(!1), await re(o, "download"));
|
|
10288
10290
|
}
|
|
10289
10291
|
},
|
|
10290
10292
|
children: ge ? /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
@@ -10340,8 +10342,8 @@ const yI = ({
|
|
|
10340
10342
|
if (ni.stopPropagation(), Si)
|
|
10341
10343
|
return;
|
|
10342
10344
|
g("copyLink");
|
|
10343
|
-
const
|
|
10344
|
-
K && (K != null && K.willSpendCredit) ? (x("copy"), Z(!0), L(!0)) : l !== "Import" && (!
|
|
10345
|
+
const Ji = I.iosUrl, Vi = I.googleUrl;
|
|
10346
|
+
K && (K != null && K.willSpendCredit) ? (x("copy"), Z(!0), L(!0)) : l !== "Import" && (!Ji || !Vi) ? (Z(!0), W(!0)) : (L(!1), W(!1), await re(o, "copy"), Y(!0), setTimeout(() => Y(!1), 2e3));
|
|
10345
10347
|
},
|
|
10346
10348
|
disabled: k,
|
|
10347
10349
|
isCopied: Si,
|
|
@@ -10355,8 +10357,8 @@ const yI = ({
|
|
|
10355
10357
|
typeOfProduct: l,
|
|
10356
10358
|
onClickDonwload: async (ni) => {
|
|
10357
10359
|
ni.stopPropagation(), g("copyLink");
|
|
10358
|
-
const
|
|
10359
|
-
K && (K != null && K.willSpendCredit) ? (x("download"), Z(!0), L(!0)) : l !== "Import" && (!
|
|
10360
|
+
const Ji = I.iosUrl, Vi = I.googleUrl;
|
|
10361
|
+
K && (K != null && K.willSpendCredit) ? (x("download"), Z(!0), L(!0)) : l !== "Import" && (!Ji || !Vi) ? (Z(!0), W(!0)) : (L(!1), W(!1), await At(!0));
|
|
10360
10362
|
},
|
|
10361
10363
|
disabled: k,
|
|
10362
10364
|
children: [
|