@feedmepos/mf-mdm 1.6.9-beta.260 → 1.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as jt, ref as Wt, watch as ue, onMounted as Ht, resolveComponent as Ue, openBlock as de, createElementBlock as Me, createBlock as qt, createVNode as zt, nextTick as $t } from "vue";
|
|
2
|
-
import { r as pe, g as tt, i as
|
|
2
|
+
import { r as pe, g as tt, i as Bt, a as Gt, _, b as De, C as Fe, c as nt, d as Kt, e as it, f as Jt, S as W, h as F, E as ve, j as Xt, k as Yt, L as rt, l as p, m as Qt, F as Ie, n as Zt, o as en, q as H, p as tn, s as nn, u as rn, t as sn, v as on, w as an } from "./index-0a146f41.js";
|
|
3
3
|
import { useCoreStore as cn } from "@feedmepos/mf-common";
|
|
4
4
|
import "pinia";
|
|
5
5
|
var ln = "firebase", un = "10.14.1";
|
|
@@ -55,7 +55,7 @@ const Y = new Qt("@firebase/auth");
|
|
|
55
55
|
function hn(n, ...e) {
|
|
56
56
|
Y.logLevel <= rt.WARN && Y.warn(`Auth (${W}): ${n}`, ...e);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function G(n, ...e) {
|
|
59
59
|
Y.logLevel <= rt.ERROR && Y.error(`Auth (${W}): ${n}`, ...e);
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -102,7 +102,7 @@ function l(n, e, ...t) {
|
|
|
102
102
|
}
|
|
103
103
|
function v(n) {
|
|
104
104
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
105
|
-
throw
|
|
105
|
+
throw G(e), new Error(e);
|
|
106
106
|
}
|
|
107
107
|
function T(n, e) {
|
|
108
108
|
n || v(e);
|
|
@@ -188,7 +188,7 @@ function gn() {
|
|
|
188
188
|
*/
|
|
189
189
|
class q {
|
|
190
190
|
constructor(e, t) {
|
|
191
|
-
this.shortDelay = e, this.longDelay = t, T(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
191
|
+
this.shortDelay = e, this.longDelay = t, T(t > e, "Short delay should be less than long delay!"), this.isMobile = Bt() || Gt();
|
|
192
192
|
}
|
|
193
193
|
get() {
|
|
194
194
|
return pn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
@@ -412,17 +412,17 @@ async function lt(n, e, t) {
|
|
|
412
412
|
r.clearNetworkTimeout();
|
|
413
413
|
const o = await s.json();
|
|
414
414
|
if ("needConfirmation" in o)
|
|
415
|
-
throw
|
|
415
|
+
throw B(n, "account-exists-with-different-credential", o);
|
|
416
416
|
if (s.ok && !("errorMessage" in o))
|
|
417
417
|
return o;
|
|
418
418
|
{
|
|
419
419
|
const c = s.ok ? o.errorMessage : o.error.message, [a, u] = c.split(" : ");
|
|
420
420
|
if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
|
|
421
|
-
throw
|
|
421
|
+
throw B(n, "credential-already-in-use", o);
|
|
422
422
|
if (a === "EMAIL_EXISTS")
|
|
423
|
-
throw
|
|
423
|
+
throw B(n, "email-already-in-use", o);
|
|
424
424
|
if (a === "USER_DISABLED")
|
|
425
|
-
throw
|
|
425
|
+
throw B(n, "user-disabled", o);
|
|
426
426
|
const h = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
427
427
|
if (u)
|
|
428
428
|
throw at(n, h, u);
|
|
@@ -458,7 +458,7 @@ class vn {
|
|
|
458
458
|
clearTimeout(this.timer);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function B(n, e, t) {
|
|
462
462
|
const i = {
|
|
463
463
|
appName: n.name
|
|
464
464
|
};
|
|
@@ -538,12 +538,12 @@ function he(n) {
|
|
|
538
538
|
function Ee(n) {
|
|
539
539
|
const [e, t, i] = n.split(".");
|
|
540
540
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
541
|
-
return
|
|
541
|
+
return G("JWT malformed, contained fewer than 3 sections"), null;
|
|
542
542
|
try {
|
|
543
543
|
const r = Zt(t);
|
|
544
|
-
return r ? JSON.parse(r) : (
|
|
544
|
+
return r ? JSON.parse(r) : (G("Failed to decode base64 JWT payload"), null);
|
|
545
545
|
} catch (r) {
|
|
546
|
-
return
|
|
546
|
+
return G("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
function Ve(n) {
|
|
@@ -783,7 +783,7 @@ async function Sn(n, e) {
|
|
|
783
783
|
refreshToken: t.refresh_token
|
|
784
784
|
};
|
|
785
785
|
}
|
|
786
|
-
async function
|
|
786
|
+
async function Rn(n, e) {
|
|
787
787
|
return x(n, "POST", "/v2/accounts:revokeToken", ne(n, e));
|
|
788
788
|
}
|
|
789
789
|
/**
|
|
@@ -984,7 +984,7 @@ class I {
|
|
|
984
984
|
}
|
|
985
985
|
static _fromJSON(e, t) {
|
|
986
986
|
var i, r, s, o, c, a, u, h;
|
|
987
|
-
const d = (i = t.displayName) !== null && i !== void 0 ? i : void 0, f = (r = t.email) !== null && r !== void 0 ? r : void 0, E = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, N = (o = t.photoURL) !== null && o !== void 0 ? o : void 0,
|
|
987
|
+
const d = (i = t.displayName) !== null && i !== void 0 ? i : void 0, f = (r = t.email) !== null && r !== void 0 ? r : void 0, E = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, N = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, Pe = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, oe = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, Ae = (u = t.createdAt) !== null && u !== void 0 ? u : void 0, Ce = (h = t.lastLoginAt) !== null && h !== void 0 ? h : void 0, { uid: ae, emailVerified: Oe, isAnonymous: Ne, providerData: ce, stsTokenManager: Le } = t;
|
|
988
988
|
l(
|
|
989
989
|
ae && Le,
|
|
990
990
|
e,
|
|
@@ -1007,7 +1007,7 @@ class I {
|
|
|
1007
1007
|
e,
|
|
1008
1008
|
"internal-error"
|
|
1009
1009
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1010
|
-
), k(E, e.name), k(N, e.name), k(
|
|
1010
|
+
), k(E, e.name), k(N, e.name), k(Pe, e.name), k(oe, e.name), k(Ae, e.name), k(Ce, e.name);
|
|
1011
1011
|
const le = new I({
|
|
1012
1012
|
uid: ae,
|
|
1013
1013
|
auth: e,
|
|
@@ -1017,7 +1017,7 @@ class I {
|
|
|
1017
1017
|
isAnonymous: Ne,
|
|
1018
1018
|
photoURL: N,
|
|
1019
1019
|
phoneNumber: E,
|
|
1020
|
-
tenantId:
|
|
1020
|
+
tenantId: Pe,
|
|
1021
1021
|
stsTokenManager: xt,
|
|
1022
1022
|
createdAt: Ae,
|
|
1023
1023
|
lastLoginAt: Ce
|
|
@@ -1286,11 +1286,11 @@ function yt(n = p()) {
|
|
|
1286
1286
|
function ke(n = p()) {
|
|
1287
1287
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function bn(n = p()) {
|
|
1290
1290
|
var e;
|
|
1291
1291
|
return ke(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function Pn() {
|
|
1294
1294
|
return en() && document.documentMode === 10;
|
|
1295
1295
|
}
|
|
1296
1296
|
function Tt(n = p()) {
|
|
@@ -1692,7 +1692,7 @@ class Ln {
|
|
|
1692
1692
|
token: e,
|
|
1693
1693
|
idToken: t
|
|
1694
1694
|
};
|
|
1695
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
1695
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await Rn(this, i);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
1698
|
toJSON() {
|
|
@@ -2138,7 +2138,7 @@ class C extends St {
|
|
|
2138
2138
|
* See the License for the specific language governing permissions and
|
|
2139
2139
|
* limitations under the License.
|
|
2140
2140
|
*/
|
|
2141
|
-
class
|
|
2141
|
+
class Rt {
|
|
2142
2142
|
/**
|
|
2143
2143
|
* Constructor for generic OAuth providers.
|
|
2144
2144
|
*
|
|
@@ -2191,7 +2191,7 @@ class Pt {
|
|
|
2191
2191
|
* See the License for the specific language governing permissions and
|
|
2192
2192
|
* limitations under the License.
|
|
2193
2193
|
*/
|
|
2194
|
-
class z extends
|
|
2194
|
+
class z extends Rt {
|
|
2195
2195
|
constructor() {
|
|
2196
2196
|
super(...arguments), this.scopes = [];
|
|
2197
2197
|
}
|
|
@@ -2297,7 +2297,7 @@ S.PROVIDER_ID = "facebook.com";
|
|
|
2297
2297
|
* See the License for the specific language governing permissions and
|
|
2298
2298
|
* limitations under the License.
|
|
2299
2299
|
*/
|
|
2300
|
-
class
|
|
2300
|
+
class R extends z {
|
|
2301
2301
|
constructor() {
|
|
2302
2302
|
super(
|
|
2303
2303
|
"google.com"
|
|
@@ -2319,8 +2319,8 @@ class P extends z {
|
|
|
2319
2319
|
*/
|
|
2320
2320
|
static credential(e, t) {
|
|
2321
2321
|
return C._fromParams({
|
|
2322
|
-
providerId:
|
|
2323
|
-
signInMethod:
|
|
2322
|
+
providerId: R.PROVIDER_ID,
|
|
2323
|
+
signInMethod: R.GOOGLE_SIGN_IN_METHOD,
|
|
2324
2324
|
idToken: e,
|
|
2325
2325
|
accessToken: t
|
|
2326
2326
|
});
|
|
@@ -2331,7 +2331,7 @@ class P extends z {
|
|
|
2331
2331
|
* @param userCredential - The user credential.
|
|
2332
2332
|
*/
|
|
2333
2333
|
static credentialFromResult(e) {
|
|
2334
|
-
return
|
|
2334
|
+
return R.credentialFromTaggedObject(e);
|
|
2335
2335
|
}
|
|
2336
2336
|
/**
|
|
2337
2337
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2340,7 +2340,7 @@ class P extends z {
|
|
|
2340
2340
|
* @param userCredential - The user credential.
|
|
2341
2341
|
*/
|
|
2342
2342
|
static credentialFromError(e) {
|
|
2343
|
-
return
|
|
2343
|
+
return R.credentialFromTaggedObject(e.customData || {});
|
|
2344
2344
|
}
|
|
2345
2345
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2346
2346
|
if (!e)
|
|
@@ -2349,14 +2349,14 @@ class P extends z {
|
|
|
2349
2349
|
if (!t && !i)
|
|
2350
2350
|
return null;
|
|
2351
2351
|
try {
|
|
2352
|
-
return
|
|
2352
|
+
return R.credential(t, i);
|
|
2353
2353
|
} catch {
|
|
2354
2354
|
return null;
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
2357
|
}
|
|
2358
|
-
|
|
2359
|
-
|
|
2358
|
+
R.GOOGLE_SIGN_IN_METHOD = "google.com";
|
|
2359
|
+
R.PROVIDER_ID = "google.com";
|
|
2360
2360
|
/**
|
|
2361
2361
|
* @license
|
|
2362
2362
|
* Copyright 2020 Google LLC
|
|
@@ -2373,7 +2373,7 @@ P.PROVIDER_ID = "google.com";
|
|
|
2373
2373
|
* See the License for the specific language governing permissions and
|
|
2374
2374
|
* limitations under the License.
|
|
2375
2375
|
*/
|
|
2376
|
-
class
|
|
2376
|
+
class b extends z {
|
|
2377
2377
|
constructor() {
|
|
2378
2378
|
super(
|
|
2379
2379
|
"github.com"
|
|
@@ -2387,8 +2387,8 @@ class R extends z {
|
|
|
2387
2387
|
*/
|
|
2388
2388
|
static credential(e) {
|
|
2389
2389
|
return C._fromParams({
|
|
2390
|
-
providerId:
|
|
2391
|
-
signInMethod:
|
|
2390
|
+
providerId: b.PROVIDER_ID,
|
|
2391
|
+
signInMethod: b.GITHUB_SIGN_IN_METHOD,
|
|
2392
2392
|
accessToken: e
|
|
2393
2393
|
});
|
|
2394
2394
|
}
|
|
@@ -2398,7 +2398,7 @@ class R extends z {
|
|
|
2398
2398
|
* @param userCredential - The user credential.
|
|
2399
2399
|
*/
|
|
2400
2400
|
static credentialFromResult(e) {
|
|
2401
|
-
return
|
|
2401
|
+
return b.credentialFromTaggedObject(e);
|
|
2402
2402
|
}
|
|
2403
2403
|
/**
|
|
2404
2404
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2407,20 +2407,20 @@ class R extends z {
|
|
|
2407
2407
|
* @param userCredential - The user credential.
|
|
2408
2408
|
*/
|
|
2409
2409
|
static credentialFromError(e) {
|
|
2410
|
-
return
|
|
2410
|
+
return b.credentialFromTaggedObject(e.customData || {});
|
|
2411
2411
|
}
|
|
2412
2412
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2413
2413
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
2414
2414
|
return null;
|
|
2415
2415
|
try {
|
|
2416
|
-
return
|
|
2416
|
+
return b.credential(e.oauthAccessToken);
|
|
2417
2417
|
} catch {
|
|
2418
2418
|
return null;
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2423
|
-
|
|
2422
|
+
b.GITHUB_SIGN_IN_METHOD = "github.com";
|
|
2423
|
+
b.PROVIDER_ID = "github.com";
|
|
2424
2424
|
/**
|
|
2425
2425
|
* @license
|
|
2426
2426
|
* Copyright 2020 Google LLC
|
|
@@ -2437,7 +2437,7 @@ R.PROVIDER_ID = "github.com";
|
|
|
2437
2437
|
* See the License for the specific language governing permissions and
|
|
2438
2438
|
* limitations under the License.
|
|
2439
2439
|
*/
|
|
2440
|
-
class
|
|
2440
|
+
class P extends z {
|
|
2441
2441
|
constructor() {
|
|
2442
2442
|
super(
|
|
2443
2443
|
"twitter.com"
|
|
@@ -2452,8 +2452,8 @@ class b extends z {
|
|
|
2452
2452
|
*/
|
|
2453
2453
|
static credential(e, t) {
|
|
2454
2454
|
return C._fromParams({
|
|
2455
|
-
providerId:
|
|
2456
|
-
signInMethod:
|
|
2455
|
+
providerId: P.PROVIDER_ID,
|
|
2456
|
+
signInMethod: P.TWITTER_SIGN_IN_METHOD,
|
|
2457
2457
|
oauthToken: e,
|
|
2458
2458
|
oauthTokenSecret: t
|
|
2459
2459
|
});
|
|
@@ -2464,7 +2464,7 @@ class b extends z {
|
|
|
2464
2464
|
* @param userCredential - The user credential.
|
|
2465
2465
|
*/
|
|
2466
2466
|
static credentialFromResult(e) {
|
|
2467
|
-
return
|
|
2467
|
+
return P.credentialFromTaggedObject(e);
|
|
2468
2468
|
}
|
|
2469
2469
|
/**
|
|
2470
2470
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2473,7 +2473,7 @@ class b extends z {
|
|
|
2473
2473
|
* @param userCredential - The user credential.
|
|
2474
2474
|
*/
|
|
2475
2475
|
static credentialFromError(e) {
|
|
2476
|
-
return
|
|
2476
|
+
return P.credentialFromTaggedObject(e.customData || {});
|
|
2477
2477
|
}
|
|
2478
2478
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2479
2479
|
if (!e)
|
|
@@ -2482,14 +2482,14 @@ class b extends z {
|
|
|
2482
2482
|
if (!t || !i)
|
|
2483
2483
|
return null;
|
|
2484
2484
|
try {
|
|
2485
|
-
return
|
|
2485
|
+
return P.credential(t, i);
|
|
2486
2486
|
} catch {
|
|
2487
2487
|
return null;
|
|
2488
2488
|
}
|
|
2489
2489
|
}
|
|
2490
2490
|
}
|
|
2491
|
-
|
|
2492
|
-
|
|
2491
|
+
P.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
|
2492
|
+
P.PROVIDER_ID = "twitter.com";
|
|
2493
2493
|
/**
|
|
2494
2494
|
* @license
|
|
2495
2495
|
* Copyright 2020 Google LLC
|
|
@@ -2567,7 +2567,7 @@ class Z extends Ie {
|
|
|
2567
2567
|
return new Z(e, t, i, r);
|
|
2568
2568
|
}
|
|
2569
2569
|
}
|
|
2570
|
-
function
|
|
2570
|
+
function bt(n, e, t, i) {
|
|
2571
2571
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
2572
2572
|
throw s.code === "auth/multi-factor-auth-required" ? Z._fromErrorAndOperation(n, s, e, i) : s;
|
|
2573
2573
|
});
|
|
@@ -2598,7 +2598,7 @@ async function $n(n, e, t = !1) {
|
|
|
2598
2598
|
return Promise.reject(A(i));
|
|
2599
2599
|
const r = "reauthenticate";
|
|
2600
2600
|
try {
|
|
2601
|
-
const s = await j(n,
|
|
2601
|
+
const s = await j(n, bt(i, r, e, n), t);
|
|
2602
2602
|
l(
|
|
2603
2603
|
s.idToken,
|
|
2604
2604
|
i,
|
|
@@ -2643,10 +2643,10 @@ async function $n(n, e, t = !1) {
|
|
|
2643
2643
|
* See the License for the specific language governing permissions and
|
|
2644
2644
|
* limitations under the License.
|
|
2645
2645
|
*/
|
|
2646
|
-
async function
|
|
2646
|
+
async function Bn(n, e, t = !1) {
|
|
2647
2647
|
if (_(n.app))
|
|
2648
2648
|
return Promise.reject(A(n));
|
|
2649
|
-
const i = "signIn", r = await
|
|
2649
|
+
const i = "signIn", r = await bt(n, i, e), s = await O._fromIdTokenResponse(n, i, r);
|
|
2650
2650
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2651
2651
|
}
|
|
2652
2652
|
/**
|
|
@@ -2665,7 +2665,7 @@ async function Gn(n, e, t = !1) {
|
|
|
2665
2665
|
* See the License for the specific language governing permissions and
|
|
2666
2666
|
* limitations under the License.
|
|
2667
2667
|
*/
|
|
2668
|
-
async function
|
|
2668
|
+
async function Gn(n, e) {
|
|
2669
2669
|
return ut(n, "POST", "/v1/accounts:signInWithCustomToken", ne(n, e));
|
|
2670
2670
|
}
|
|
2671
2671
|
/**
|
|
@@ -2687,7 +2687,7 @@ async function Bn(n, e) {
|
|
|
2687
2687
|
async function Kn(n, e) {
|
|
2688
2688
|
if (_(n.app))
|
|
2689
2689
|
return Promise.reject(A(n));
|
|
2690
|
-
const t = ie(n), i = await
|
|
2690
|
+
const t = ie(n), i = await Gn(t, {
|
|
2691
2691
|
token: e,
|
|
2692
2692
|
returnSecureToken: !0
|
|
2693
2693
|
}), r = await O._fromIdTokenResponse(t, "signIn", i);
|
|
@@ -2716,7 +2716,7 @@ const ee = "__sak";
|
|
|
2716
2716
|
* See the License for the specific language governing permissions and
|
|
2717
2717
|
* limitations under the License.
|
|
2718
2718
|
*/
|
|
2719
|
-
class
|
|
2719
|
+
class Pt {
|
|
2720
2720
|
constructor(e, t) {
|
|
2721
2721
|
this.storageRetriever = e, this.type = t;
|
|
2722
2722
|
}
|
|
@@ -2758,7 +2758,7 @@ class bt {
|
|
|
2758
2758
|
* limitations under the License.
|
|
2759
2759
|
*/
|
|
2760
2760
|
const Yn = 1e3, Qn = 10;
|
|
2761
|
-
class At extends
|
|
2761
|
+
class At extends Pt {
|
|
2762
2762
|
constructor() {
|
|
2763
2763
|
super(
|
|
2764
2764
|
() => window.localStorage,
|
|
@@ -2785,7 +2785,7 @@ class At extends bt {
|
|
|
2785
2785
|
const o = this.storage.getItem(i);
|
|
2786
2786
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2787
2787
|
}, s = this.storage.getItem(i);
|
|
2788
|
-
|
|
2788
|
+
Pn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Qn) : r();
|
|
2789
2789
|
}
|
|
2790
2790
|
notifyListeners(e, t) {
|
|
2791
2791
|
this.localCache[e] = t;
|
|
@@ -2854,7 +2854,7 @@ const Zn = At;
|
|
|
2854
2854
|
* See the License for the specific language governing permissions and
|
|
2855
2855
|
* limitations under the License.
|
|
2856
2856
|
*/
|
|
2857
|
-
class Ct extends
|
|
2857
|
+
class Ct extends Pt {
|
|
2858
2858
|
constructor() {
|
|
2859
2859
|
super(
|
|
2860
2860
|
() => window.sessionStorage,
|
|
@@ -3001,7 +3001,7 @@ re.receivers = [];
|
|
|
3001
3001
|
* See the License for the specific language governing permissions and
|
|
3002
3002
|
* limitations under the License.
|
|
3003
3003
|
*/
|
|
3004
|
-
function
|
|
3004
|
+
function Re(n = "", e = 10) {
|
|
3005
3005
|
let t = "";
|
|
3006
3006
|
for (let i = 0; i < e; i++)
|
|
3007
3007
|
t += Math.floor(Math.random() * 10);
|
|
@@ -3057,7 +3057,7 @@ class ti {
|
|
|
3057
3057
|
);
|
|
3058
3058
|
let s, o;
|
|
3059
3059
|
return new Promise((c, a) => {
|
|
3060
|
-
const u =
|
|
3060
|
+
const u = Re("", 20);
|
|
3061
3061
|
r.port1.start();
|
|
3062
3062
|
const h = setTimeout(() => {
|
|
3063
3063
|
a(new Error(
|
|
@@ -3217,7 +3217,7 @@ function _e() {
|
|
|
3217
3217
|
});
|
|
3218
3218
|
});
|
|
3219
3219
|
}
|
|
3220
|
-
async function
|
|
3220
|
+
async function Be(n, e, t) {
|
|
3221
3221
|
const i = se(n, !0).put({
|
|
3222
3222
|
[Ut]: e,
|
|
3223
3223
|
value: t
|
|
@@ -3228,7 +3228,7 @@ async function ci(n, e) {
|
|
|
3228
3228
|
const t = se(n, !1).get(e), i = await new $(t).toPromise();
|
|
3229
3229
|
return i === void 0 ? null : i.value;
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3231
|
+
function Ge(n, e) {
|
|
3232
3232
|
const t = se(n, !0).delete(e);
|
|
3233
3233
|
return new $(t).toPromise();
|
|
3234
3234
|
}
|
|
@@ -3322,7 +3322,7 @@ class Mt {
|
|
|
3322
3322
|
if (!indexedDB)
|
|
3323
3323
|
return !1;
|
|
3324
3324
|
const e = await _e();
|
|
3325
|
-
return await
|
|
3325
|
+
return await Be(e, ee, "1"), await Ge(e, ee), !0;
|
|
3326
3326
|
} catch {
|
|
3327
3327
|
}
|
|
3328
3328
|
return !1;
|
|
@@ -3336,14 +3336,14 @@ class Mt {
|
|
|
3336
3336
|
}
|
|
3337
3337
|
}
|
|
3338
3338
|
async _set(e, t) {
|
|
3339
|
-
return this._withPendingWrite(async () => (await this._withRetries((i) =>
|
|
3339
|
+
return this._withPendingWrite(async () => (await this._withRetries((i) => Be(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3340
3340
|
}
|
|
3341
3341
|
async _get(e) {
|
|
3342
3342
|
const t = await this._withRetries((i) => ci(i, e));
|
|
3343
3343
|
return this.localCache[e] = t, t;
|
|
3344
3344
|
}
|
|
3345
3345
|
async _remove(e) {
|
|
3346
|
-
return this._withPendingWrite(async () => (await this._withRetries((t) =>
|
|
3346
|
+
return this._withPendingWrite(async () => (await this._withRetries((t) => Ge(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
|
|
3347
3347
|
}
|
|
3348
3348
|
async _poll() {
|
|
3349
3349
|
const e = await this._withRetries((r) => {
|
|
@@ -3425,7 +3425,7 @@ function hi(n, e) {
|
|
|
3425
3425
|
* See the License for the specific language governing permissions and
|
|
3426
3426
|
* limitations under the License.
|
|
3427
3427
|
*/
|
|
3428
|
-
class
|
|
3428
|
+
class be extends St {
|
|
3429
3429
|
constructor(e) {
|
|
3430
3430
|
super(
|
|
3431
3431
|
"custom",
|
|
@@ -3456,7 +3456,7 @@ class Re extends St {
|
|
|
3456
3456
|
}
|
|
3457
3457
|
}
|
|
3458
3458
|
function fi(n) {
|
|
3459
|
-
return
|
|
3459
|
+
return Bn(n.auth, new be(n), n.bypassAuthState);
|
|
3460
3460
|
}
|
|
3461
3461
|
function pi(n) {
|
|
3462
3462
|
const { auth: e, user: t } = n;
|
|
@@ -3465,7 +3465,7 @@ function pi(n) {
|
|
|
3465
3465
|
e,
|
|
3466
3466
|
"internal-error"
|
|
3467
3467
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3468
|
-
), $n(t, new
|
|
3468
|
+
), $n(t, new be(n), n.bypassAuthState);
|
|
3469
3469
|
}
|
|
3470
3470
|
async function gi(n) {
|
|
3471
3471
|
const { auth: e, user: t } = n;
|
|
@@ -3474,7 +3474,7 @@ async function gi(n) {
|
|
|
3474
3474
|
e,
|
|
3475
3475
|
"internal-error"
|
|
3476
3476
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3477
|
-
), zn(t, new
|
|
3477
|
+
), zn(t, new be(n), n.bypassAuthState);
|
|
3478
3478
|
}
|
|
3479
3479
|
/**
|
|
3480
3480
|
* @license
|
|
@@ -3591,7 +3591,7 @@ class L extends Dt {
|
|
|
3591
3591
|
}
|
|
3592
3592
|
async onExecution() {
|
|
3593
3593
|
T(this.filter.length === 1, "Popup operations only handle one event");
|
|
3594
|
-
const e =
|
|
3594
|
+
const e = Re();
|
|
3595
3595
|
this.authWindow = await this.resolver._openPopup(
|
|
3596
3596
|
this.auth,
|
|
3597
3597
|
this.provider,
|
|
@@ -3763,7 +3763,7 @@ class Si {
|
|
|
3763
3763
|
let t = !1;
|
|
3764
3764
|
return this.consumers.forEach((i) => {
|
|
3765
3765
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3766
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3766
|
+
}), this.hasHandledPotentialRedirect || !Ri(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3767
3767
|
}
|
|
3768
3768
|
sendToConsumer(e, t) {
|
|
3769
3769
|
var i;
|
|
@@ -3790,7 +3790,7 @@ function Ke(n) {
|
|
|
3790
3790
|
function Ft({ type: n, error: e }) {
|
|
3791
3791
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3792
3792
|
}
|
|
3793
|
-
function
|
|
3793
|
+
function Ri(n) {
|
|
3794
3794
|
switch (n.type) {
|
|
3795
3795
|
case "signInViaRedirect":
|
|
3796
3796
|
case "linkViaRedirect":
|
|
@@ -3818,7 +3818,7 @@ function Pi(n) {
|
|
|
3818
3818
|
* See the License for the specific language governing permissions and
|
|
3819
3819
|
* limitations under the License.
|
|
3820
3820
|
*/
|
|
3821
|
-
async function
|
|
3821
|
+
async function bi(n, e = {}) {
|
|
3822
3822
|
return x(n, "GET", "/v1/projects", e);
|
|
3823
3823
|
}
|
|
3824
3824
|
/**
|
|
@@ -3837,11 +3837,11 @@ async function Ri(n, e = {}) {
|
|
|
3837
3837
|
* See the License for the specific language governing permissions and
|
|
3838
3838
|
* limitations under the License.
|
|
3839
3839
|
*/
|
|
3840
|
-
const
|
|
3840
|
+
const Pi = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ai = /^https?/;
|
|
3841
3841
|
async function Ci(n) {
|
|
3842
3842
|
if (n.config.emulator)
|
|
3843
3843
|
return;
|
|
3844
|
-
const { authorizedDomains: e } = await
|
|
3844
|
+
const { authorizedDomains: e } = await bi(n);
|
|
3845
3845
|
for (const t of e)
|
|
3846
3846
|
try {
|
|
3847
3847
|
if (Oi(t))
|
|
@@ -3862,7 +3862,7 @@ function Oi(n) {
|
|
|
3862
3862
|
}
|
|
3863
3863
|
if (!Ai.test(t))
|
|
3864
3864
|
return !1;
|
|
3865
|
-
if (
|
|
3865
|
+
if (Pi.test(n))
|
|
3866
3866
|
return i === n;
|
|
3867
3867
|
const r = n.replace(/\./g, "\\.");
|
|
3868
3868
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4035,7 +4035,7 @@ const Hi = {
|
|
|
4035
4035
|
resizable: "yes",
|
|
4036
4036
|
statusbar: "yes",
|
|
4037
4037
|
toolbar: "no"
|
|
4038
|
-
}, qi = 500, zi = 600, $i = "_blank",
|
|
4038
|
+
}, qi = 500, zi = 600, $i = "_blank", Bi = "http://localhost";
|
|
4039
4039
|
class Xe {
|
|
4040
4040
|
constructor(e) {
|
|
4041
4041
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4048,7 +4048,7 @@ class Xe {
|
|
|
4048
4048
|
}
|
|
4049
4049
|
}
|
|
4050
4050
|
}
|
|
4051
|
-
function
|
|
4051
|
+
function Gi(n, e, t, i = qi, r = zi) {
|
|
4052
4052
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4053
4053
|
let c = "";
|
|
4054
4054
|
const a = Object.assign(Object.assign({}, Hi), {
|
|
@@ -4057,9 +4057,9 @@ function Bi(n, e, t, i = qi, r = zi) {
|
|
|
4057
4057
|
top: s,
|
|
4058
4058
|
left: o
|
|
4059
4059
|
}), u = p().toLowerCase();
|
|
4060
|
-
t && (c = _t(u) ? $i : t), gt(u) && (e = e ||
|
|
4060
|
+
t && (c = _t(u) ? $i : t), gt(u) && (e = e || Bi, a.scrollbars = "yes");
|
|
4061
4061
|
const h = Object.entries(a).reduce((f, [E, N]) => `${f}${E}=${N},`, "");
|
|
4062
|
-
if (
|
|
4062
|
+
if (bn(u) && c !== "_self")
|
|
4063
4063
|
return Ki(e || "", c), new Xe(null);
|
|
4064
4064
|
const d = window.open(e || "", c, h);
|
|
4065
4065
|
l(
|
|
@@ -4117,7 +4117,7 @@ async function Ye(n, e, t, i, r, s) {
|
|
|
4117
4117
|
v: W,
|
|
4118
4118
|
eventId: r
|
|
4119
4119
|
};
|
|
4120
|
-
if (e instanceof
|
|
4120
|
+
if (e instanceof Rt) {
|
|
4121
4121
|
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", nn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4122
4122
|
for (const [h, d] of Object.entries(s || {}))
|
|
4123
4123
|
o[h] = d;
|
|
@@ -4163,7 +4163,7 @@ class Zi {
|
|
|
4163
4163
|
var s;
|
|
4164
4164
|
T((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4165
4165
|
const o = await Ye(e, t, i, ge(), r);
|
|
4166
|
-
return
|
|
4166
|
+
return Gi(e, o, Re());
|
|
4167
4167
|
}
|
|
4168
4168
|
async _openRedirect(e, t, i, r) {
|
|
4169
4169
|
await this._originValidation(e);
|
|
@@ -4425,7 +4425,7 @@ const lr = { class: "bg-white flex flex-col max-h-dvh" }, ur = {
|
|
|
4425
4425
|
__name: "App",
|
|
4426
4426
|
setup(n) {
|
|
4427
4427
|
const e = Wt(!1), { currentBusiness: t, readRestaurants: i, fetchUserPermissions: r, sessionUser: s, signIn: o } = cn(), c = rn();
|
|
4428
|
-
sn().length === 0 ? on({ apiKey: "
|
|
4428
|
+
sn().length === 0 ? on({ apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "128512026847", measurementId: "G-LTKS7N2HQS" }) : it();
|
|
4429
4429
|
const a = async () => {
|
|
4430
4430
|
var d;
|
|
4431
4431
|
try {
|
|
@@ -4436,7 +4436,7 @@ const lr = { class: "bg-white flex flex-col max-h-dvh" }, ur = {
|
|
|
4436
4436
|
}, u = () => {
|
|
4437
4437
|
const { init: d } = an();
|
|
4438
4438
|
d({
|
|
4439
|
-
apiKey: "
|
|
4439
|
+
apiKey: "6GhcttsJ9Rj9cTevcdrpin",
|
|
4440
4440
|
url: {}.VITE_FEATURE_FLAG_URL
|
|
4441
4441
|
}).catch((f) => console.warn("Feature flag initialization failed:", f));
|
|
4442
4442
|
}, h = async () => {
|
|
@@ -2994,7 +2994,7 @@ const Ti = { class: "fm-typo-en-body-md-400" }, Ii = { class: "xs:flex-col-rever
|
|
|
2994
2994
|
var te;
|
|
2995
2995
|
if (!l.restaurantId)
|
|
2996
2996
|
return;
|
|
2997
|
-
const d = "
|
|
2997
|
+
const d = "prod", $ = l.type === Q.Enum.KDS || ((te = l == null ? void 0 : l.appVersion) == null ? void 0 : te.packageName) === "cc.feedme.kds" ? gi : _i;
|
|
2998
2998
|
u.open({
|
|
2999
2999
|
message: t("device.logs.redirect", { name: l.name ?? pe(l.restaurantId) }),
|
|
3000
3000
|
type: "success",
|
package/dist/app.js
CHANGED
|
@@ -1188,14 +1188,14 @@ const r = {
|
|
|
1188
1188
|
{
|
|
1189
1189
|
path: "/",
|
|
1190
1190
|
name: "$devices",
|
|
1191
|
-
component: e(() => import("./DeviceList-
|
|
1191
|
+
component: e(() => import("./DeviceList-df758ad5.js"))
|
|
1192
1192
|
}
|
|
1193
1193
|
], u = {
|
|
1194
1194
|
"en-US": i,
|
|
1195
1195
|
"zh-CN": n,
|
|
1196
1196
|
"th-TH": a,
|
|
1197
1197
|
"zh-Hant": c
|
|
1198
|
-
}, p = e(() => import("./App-
|
|
1198
|
+
}, p = e(() => import("./App-01a86b39.js"));
|
|
1199
1199
|
export {
|
|
1200
1200
|
p as FmApp,
|
|
1201
1201
|
u as i18nMessages,
|