@feedmepos/mf-financing 0.0.37-dev → 0.0.39-dev

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/app.d.ts CHANGED
@@ -15,6 +15,10 @@ export declare const i18nMessages: {
15
15
  title: string;
16
16
  description: string;
17
17
  };
18
+ forbidden: {
19
+ title: string;
20
+ description: string;
21
+ };
18
22
  stepper: {
19
23
  title: string;
20
24
  description: string;
@@ -167,6 +171,10 @@ export declare const i18nMessages: {
167
171
  title: string;
168
172
  description: string;
169
173
  };
174
+ forbidden: {
175
+ title: string;
176
+ description: string;
177
+ };
170
178
  stepper: {
171
179
  title: string;
172
180
  description: string;
package/dist/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRouter as In, createWebHistory as wn, useRoute as En } from "vue-router";
2
- import { computed as Tn, defineComponent as Sn, watch as An, onMounted as Pn, resolveComponent as kn, openBlock as Cn, createBlock as Rn, unref as On } from "vue";
2
+ import { computed as Tn, defineComponent as Sn, watch as An, onMounted as Pn, resolveComponent as kn, openBlock as Rn, createBlock as Cn, unref as On } from "vue";
3
3
  import { defineStore as Nn } from "pinia";
4
4
  import { useCoreStore as Dn } from "@feedmepos/mf-common";
5
5
  const Ln = {
@@ -14,6 +14,10 @@ const Ln = {
14
14
  title: "No restaurants found",
15
15
  description: "Create a restaurant to continue with financing."
16
16
  },
17
+ forbidden: {
18
+ title: "Access Restricted",
19
+ description: "Only the business owner can access the financing application. Please contact your business owner for assistance."
20
+ },
17
21
  stepper: {
18
22
  title: "POS Financing Pre-requisites",
19
23
  description: "Complete the steps below to get your POS financing ready.",
@@ -165,6 +169,10 @@ const Ln = {
165
169
  title: "未找到餐厅",
166
170
  description: "请先创建餐厅以继续融资。"
167
171
  },
172
+ forbidden: {
173
+ title: "访问受限",
174
+ description: "仅商业所有者可以访问融资申请。请联系您的商业所有者获取帮助。"
175
+ },
168
176
  stepper: {
169
177
  title: "POS融资先决条件",
170
178
  description: "完成以下步骤以准备好您的POS融资。",
@@ -312,7 +320,7 @@ const Ln = {
312
320
  {
313
321
  path: "/application",
314
322
  name: "mf-financing-application",
315
- component: () => import("./Application-DgsKcVbg.js"),
323
+ component: () => import("./Application-DSpOdyZp.js"),
316
324
  meta: {
317
325
  sidebarDisplay: "i18n:financing.routes.application"
318
326
  }
@@ -320,7 +328,7 @@ const Ln = {
320
328
  {
321
329
  path: "/application/submission",
322
330
  name: "mf-financing-application-submission",
323
- component: () => import("./Submission-DEMyz5Ym.js")
331
+ component: () => import("./Submission-D94PmATc.js")
324
332
  }
325
333
  ];
326
334
  In({
@@ -545,7 +553,7 @@ const Hn = function(n) {
545
553
  return Pt.encodeByteArray(e, !0);
546
554
  }, kt = function(n) {
547
555
  return Hn(n).replace(/\./g, "");
548
- }, Ct = function(n) {
556
+ }, Rt = function(n) {
549
557
  try {
550
558
  return Pt.decodeString(n, !0);
551
559
  } catch (e) {
@@ -609,7 +617,7 @@ const Wn = () => jn().__FIREBASE_DEFAULTS__, zn = () => {
609
617
  } catch {
610
618
  return;
611
619
  }
612
- const e = n && Ct(n[1]);
620
+ const e = n && Rt(n[1]);
613
621
  return e && JSON.parse(e);
614
622
  }, Be = () => {
615
623
  try {
@@ -621,7 +629,7 @@ const Wn = () => jn().__FIREBASE_DEFAULTS__, zn = () => {
621
629
  }, Gn = (n) => {
622
630
  var e, t;
623
631
  return (t = (e = Be()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
624
- }, Rt = () => {
632
+ }, Ct = () => {
625
633
  var n;
626
634
  return (n = Be()) === null || n === void 0 ? void 0 : n.config;
627
635
  }, Ot = (n) => {
@@ -1320,7 +1328,7 @@ function yr() {
1320
1328
  IDBCursor.prototype.continuePrimaryKey
1321
1329
  ]);
1322
1330
  }
1323
- const Dt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap();
1331
+ const Dt = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap();
1324
1332
  function br(n) {
1325
1333
  const e = new Promise((t, r) => {
1326
1334
  const i = () => {
@@ -1338,7 +1346,7 @@ function br(n) {
1338
1346
  }), Fe.set(e, n), e;
1339
1347
  }
1340
1348
  function Ir(n) {
1341
- if (Re.has(n))
1349
+ if (Ce.has(n))
1342
1350
  return;
1343
1351
  const e = new Promise((t, r) => {
1344
1352
  const i = () => {
@@ -1350,13 +1358,13 @@ function Ir(n) {
1350
1358
  };
1351
1359
  n.addEventListener("complete", s), n.addEventListener("error", o), n.addEventListener("abort", o);
1352
1360
  });
1353
- Re.set(n, e);
1361
+ Ce.set(n, e);
1354
1362
  }
1355
1363
  let Oe = {
1356
1364
  get(n, e, t) {
1357
1365
  if (n instanceof IDBTransaction) {
1358
1366
  if (e === "done")
1359
- return Re.get(n);
1367
+ return Ce.get(n);
1360
1368
  if (e === "objectStoreNames")
1361
1369
  return n.objectStoreNames || Lt.get(n);
1362
1370
  if (e === "store")
@@ -1461,7 +1469,7 @@ class kr {
1461
1469
  // auth token refresh, and installations will send this string.
1462
1470
  getPlatformInfoString() {
1463
1471
  return this.container.getProviders().map((t) => {
1464
- if (Cr(t)) {
1472
+ if (Rr(t)) {
1465
1473
  const r = t.getImmediate();
1466
1474
  return `${r.library}/${r.version}`;
1467
1475
  } else
@@ -1469,7 +1477,7 @@ class kr {
1469
1477
  }).filter((t) => t).join(" ");
1470
1478
  }
1471
1479
  }
1472
- function Cr(n) {
1480
+ function Rr(n) {
1473
1481
  const e = n.getComponent();
1474
1482
  return (e == null ? void 0 : e.type) === "VERSION";
1475
1483
  }
@@ -1490,7 +1498,7 @@ const Ne = "@firebase/app", it = "0.10.13";
1490
1498
  * See the License for the specific language governing permissions and
1491
1499
  * limitations under the License.
1492
1500
  */
1493
- const E = new Nt("@firebase/app"), Rr = "@firebase/app-compat", Or = "@firebase/analytics-compat", Nr = "@firebase/analytics", Dr = "@firebase/app-check-compat", Lr = "@firebase/app-check", Mr = "@firebase/auth", Ur = "@firebase/auth-compat", xr = "@firebase/database", Br = "@firebase/data-connect", Fr = "@firebase/database-compat", Vr = "@firebase/functions", $r = "@firebase/functions-compat", Hr = "@firebase/installations", jr = "@firebase/installations-compat", Wr = "@firebase/messaging", zr = "@firebase/messaging-compat", qr = "@firebase/performance", Gr = "@firebase/performance-compat", Kr = "@firebase/remote-config", Jr = "@firebase/remote-config-compat", Yr = "@firebase/storage", Xr = "@firebase/storage-compat", Qr = "@firebase/firestore", Zr = "@firebase/vertexai-preview", ei = "@firebase/firestore-compat", ti = "firebase", ni = "10.14.1";
1501
+ const E = new Nt("@firebase/app"), Cr = "@firebase/app-compat", Or = "@firebase/analytics-compat", Nr = "@firebase/analytics", Dr = "@firebase/app-check-compat", Lr = "@firebase/app-check", Mr = "@firebase/auth", Ur = "@firebase/auth-compat", xr = "@firebase/database", Br = "@firebase/data-connect", Fr = "@firebase/database-compat", Vr = "@firebase/functions", $r = "@firebase/functions-compat", Hr = "@firebase/installations", jr = "@firebase/installations-compat", Wr = "@firebase/messaging", zr = "@firebase/messaging-compat", qr = "@firebase/performance", Gr = "@firebase/performance-compat", Kr = "@firebase/remote-config", Jr = "@firebase/remote-config-compat", Yr = "@firebase/storage", Xr = "@firebase/storage-compat", Qr = "@firebase/firestore", Zr = "@firebase/vertexai-preview", ei = "@firebase/firestore-compat", ti = "firebase", ni = "10.14.1";
1494
1502
  /**
1495
1503
  * @license
1496
1504
  * Copyright 2019 Google LLC
@@ -1509,7 +1517,7 @@ const E = new Nt("@firebase/app"), Rr = "@firebase/app-compat", Or = "@firebase/
1509
1517
  */
1510
1518
  const De = "[DEFAULT]", ri = {
1511
1519
  [Ne]: "fire-core",
1512
- [Rr]: "fire-core-compat",
1520
+ [Cr]: "fire-core-compat",
1513
1521
  [Nr]: "fire-analytics",
1514
1522
  [Or]: "fire-analytics-compat",
1515
1523
  [Lr]: "fire-app-check",
@@ -1694,7 +1702,7 @@ function Ut(n, e = {}) {
1694
1702
  throw N.create("bad-app-name", {
1695
1703
  appName: String(i)
1696
1704
  });
1697
- if (t || (t = Rt()), !t)
1705
+ if (t || (t = Ct()), !t)
1698
1706
  throw N.create(
1699
1707
  "no-options"
1700
1708
  /* AppError.NO_OPTIONS */
@@ -1713,7 +1721,7 @@ function Ut(n, e = {}) {
1713
1721
  }
1714
1722
  function ai(n = De) {
1715
1723
  const e = le.get(n);
1716
- if (!e && n === De && Rt())
1724
+ if (!e && n === De && Ct())
1717
1725
  return Ut();
1718
1726
  if (!e)
1719
1727
  throw N.create("no-app", { appName: n });
@@ -2513,7 +2521,7 @@ function je(n) {
2513
2521
  if (e === void 0 || t === void 0 || r === void 0)
2514
2522
  return ie("JWT malformed, contained fewer than 3 sections"), null;
2515
2523
  try {
2516
- const i = Ct(t);
2524
+ const i = Rt(t);
2517
2525
  return i ? JSON.parse(i) : (ie("Failed to decode base64 JWT payload"), null);
2518
2526
  } catch (i) {
2519
2527
  return ie("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
@@ -2557,10 +2565,10 @@ async function Y(n, e, t = !1) {
2557
2565
  try {
2558
2566
  return await e;
2559
2567
  } catch (r) {
2560
- throw r instanceof L && Ci(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2568
+ throw r instanceof L && Ri(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2561
2569
  }
2562
2570
  }
2563
- function Ci({ code: n }) {
2571
+ function Ri({ code: n }) {
2564
2572
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
2565
2573
  }
2566
2574
  /**
@@ -2579,7 +2587,7 @@ function Ci({ code: n }) {
2579
2587
  * See the License for the specific language governing permissions and
2580
2588
  * limitations under the License.
2581
2589
  */
2582
- class Ri {
2590
+ class Ci {
2583
2591
  constructor(e) {
2584
2592
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
2585
2593
  }
@@ -2875,7 +2883,7 @@ function A(n, e) {
2875
2883
  class I {
2876
2884
  constructor(e) {
2877
2885
  var { uid: t, auth: r, stsTokenManager: i } = e, s = Ve(e, ["uid", "auth", "stsTokenManager"]);
2878
- this.providerId = "firebase", this.proactiveRefresh = new Ri(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Ue(s.createdAt || void 0, s.lastLoginAt || void 0);
2886
+ this.providerId = "firebase", this.proactiveRefresh = new Ci(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Ue(s.createdAt || void 0, s.lastLoginAt || void 0);
2879
2887
  }
2880
2888
  async getIdToken(e) {
2881
2889
  const t = await Y(this, this.stsTokenManager.getToken(this.auth, e));
@@ -4346,7 +4354,7 @@ k.PROVIDER_ID = "google.com";
4346
4354
  * See the License for the specific language governing permissions and
4347
4355
  * limitations under the License.
4348
4356
  */
4349
- class C extends te {
4357
+ class R extends te {
4350
4358
  constructor() {
4351
4359
  super(
4352
4360
  "github.com"
@@ -4360,8 +4368,8 @@ class C extends te {
4360
4368
  */
4361
4369
  static credential(e) {
4362
4370
  return U._fromParams({
4363
- providerId: C.PROVIDER_ID,
4364
- signInMethod: C.GITHUB_SIGN_IN_METHOD,
4371
+ providerId: R.PROVIDER_ID,
4372
+ signInMethod: R.GITHUB_SIGN_IN_METHOD,
4365
4373
  accessToken: e
4366
4374
  });
4367
4375
  }
@@ -4371,7 +4379,7 @@ class C extends te {
4371
4379
  * @param userCredential - The user credential.
4372
4380
  */
4373
4381
  static credentialFromResult(e) {
4374
- return C.credentialFromTaggedObject(e);
4382
+ return R.credentialFromTaggedObject(e);
4375
4383
  }
4376
4384
  /**
4377
4385
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4380,20 +4388,20 @@ class C extends te {
4380
4388
  * @param userCredential - The user credential.
4381
4389
  */
4382
4390
  static credentialFromError(e) {
4383
- return C.credentialFromTaggedObject(e.customData || {});
4391
+ return R.credentialFromTaggedObject(e.customData || {});
4384
4392
  }
4385
4393
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4386
4394
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
4387
4395
  return null;
4388
4396
  try {
4389
- return C.credential(e.oauthAccessToken);
4397
+ return R.credential(e.oauthAccessToken);
4390
4398
  } catch {
4391
4399
  return null;
4392
4400
  }
4393
4401
  }
4394
4402
  }
4395
- C.GITHUB_SIGN_IN_METHOD = "github.com";
4396
- C.PROVIDER_ID = "github.com";
4403
+ R.GITHUB_SIGN_IN_METHOD = "github.com";
4404
+ R.PROVIDER_ID = "github.com";
4397
4405
  /**
4398
4406
  * @license
4399
4407
  * Copyright 2020 Google LLC
@@ -4410,7 +4418,7 @@ C.PROVIDER_ID = "github.com";
4410
4418
  * See the License for the specific language governing permissions and
4411
4419
  * limitations under the License.
4412
4420
  */
4413
- class R extends te {
4421
+ class C extends te {
4414
4422
  constructor() {
4415
4423
  super(
4416
4424
  "twitter.com"
@@ -4425,8 +4433,8 @@ class R extends te {
4425
4433
  */
4426
4434
  static credential(e, t) {
4427
4435
  return U._fromParams({
4428
- providerId: R.PROVIDER_ID,
4429
- signInMethod: R.TWITTER_SIGN_IN_METHOD,
4436
+ providerId: C.PROVIDER_ID,
4437
+ signInMethod: C.TWITTER_SIGN_IN_METHOD,
4430
4438
  oauthToken: e,
4431
4439
  oauthTokenSecret: t
4432
4440
  });
@@ -4437,7 +4445,7 @@ class R extends te {
4437
4445
  * @param userCredential - The user credential.
4438
4446
  */
4439
4447
  static credentialFromResult(e) {
4440
- return R.credentialFromTaggedObject(e);
4448
+ return C.credentialFromTaggedObject(e);
4441
4449
  }
4442
4450
  /**
4443
4451
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4446,7 +4454,7 @@ class R extends te {
4446
4454
  * @param userCredential - The user credential.
4447
4455
  */
4448
4456
  static credentialFromError(e) {
4449
- return R.credentialFromTaggedObject(e.customData || {});
4457
+ return C.credentialFromTaggedObject(e.customData || {});
4450
4458
  }
4451
4459
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4452
4460
  if (!e)
@@ -4455,14 +4463,14 @@ class R extends te {
4455
4463
  if (!t || !r)
4456
4464
  return null;
4457
4465
  try {
4458
- return R.credential(t, r);
4466
+ return C.credential(t, r);
4459
4467
  } catch {
4460
4468
  return null;
4461
4469
  }
4462
4470
  }
4463
4471
  }
4464
- R.TWITTER_SIGN_IN_METHOD = "twitter.com";
4465
- R.PROVIDER_ID = "twitter.com";
4472
+ C.TWITTER_SIGN_IN_METHOD = "twitter.com";
4473
+ C.PROVIDER_ID = "twitter.com";
4466
4474
  /**
4467
4475
  * @license
4468
4476
  * Copyright 2020 Google LLC
@@ -5682,7 +5690,7 @@ class As extends _n {
5682
5690
  }
5683
5691
  }
5684
5692
  async function Ps(n, e) {
5685
- const t = Rs(e), r = Cs(n);
5693
+ const t = Cs(e), r = Rs(n);
5686
5694
  if (!await r._isAvailable())
5687
5695
  return !1;
5688
5696
  const i = await r._get(t) === "true";
@@ -5691,10 +5699,10 @@ async function Ps(n, e) {
5691
5699
  function ks(n, e) {
5692
5700
  oe.set(n._key(), e);
5693
5701
  }
5694
- function Cs(n) {
5702
+ function Rs(n) {
5695
5703
  return w(n._redirectPersistence);
5696
5704
  }
5697
- function Rs(n) {
5705
+ function Cs(n) {
5698
5706
  return se(Ss, n.config.apiKey, n.name);
5699
5707
  }
5700
5708
  async function Os(n, e, t = !1) {
@@ -6125,7 +6133,7 @@ function oo({ config: n }) {
6125
6133
  * See the License for the specific language governing permissions and
6126
6134
  * limitations under the License.
6127
6135
  */
6128
- const Ce = "webStorageSupport";
6136
+ const Re = "webStorageSupport";
6129
6137
  class ao {
6130
6138
  constructor() {
6131
6139
  this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = hn, this._completeRedirectFn = Os, this._overrideRedirectResult = ks;
@@ -6168,9 +6176,9 @@ class ao {
6168
6176
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: r }, this.iframes[e._key()] = t, r;
6169
6177
  }
6170
6178
  _isIframeWebStorageSupported(e, t) {
6171
- this.iframes[e._key()].send(Ce, { type: Ce }, (i) => {
6179
+ this.iframes[e._key()].send(Re, { type: Re }, (i) => {
6172
6180
  var s;
6173
- const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Ce];
6181
+ const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Re];
6174
6182
  o !== void 0 && t(!!o), T(
6175
6183
  e,
6176
6184
  "internal-error"
@@ -6406,7 +6414,7 @@ const Eo = /* @__PURE__ */ Sn({
6406
6414
  t.isIframe && parent.postMessage({ event: "ready" }, "*");
6407
6415
  }), (o, c) => {
6408
6416
  const a = kn("RouterView");
6409
- return Cn(), Rn(a, {
6417
+ return Rn(), Cn(a, {
6410
6418
  key: On(r).path
6411
6419
  });
6412
6420
  };
@@ -0,0 +1,3 @@
1
+ export declare const useFinancingAccess: () => {
2
+ hasFinancingAccess: import("vue").ComputedRef<boolean>;
3
+ };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-financing",
3
- "version": "0.0.37-dev",
3
+ "version": "0.0.39-dev",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"