@feedmepos/mf-payment 1.1.13 → 1.1.14-beta.1
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/{PayoutAccount-lT5iiQa-.js → PayoutAccount-BhC9GdVa.js} +7 -6
- package/dist/{PayoutAccount-DH1z58gO.js → PayoutAccount-BjcP1n1D.js} +8 -7
- package/dist/{PayoutAccountSetting-BuUync07.js → PayoutAccountSetting-61UI9TTU.js} +3 -3
- package/dist/{Restaurant-31NaCvCd.js → Restaurant-BEjGTeZK.js} +4 -4
- package/dist/{RestaurantSetting-ByCb54gA.js → RestaurantSetting-CH5KXJd-.js} +3 -3
- package/dist/{Settlement-MPJE29Ry.js → Settlement-CpWtqcbV.js} +3 -3
- package/dist/{Settlement-DUHtGLUl.js → Settlement-Ekk7fPLv.js} +3 -3
- package/dist/{SettlementTransactions-BIs9YpoK.js → SettlementTransactions-CytrIXUM.js} +3 -3
- package/dist/{SettlementTransactions-BAMliC1r.js → SettlementTransactions-DddCRhIs.js} +3 -3
- package/dist/{Terminal-DID1yck1.js → Terminal-5BRplzny.js} +6 -6
- package/dist/TerminalSetting-D8nuI1Gv.js +587 -0
- package/dist/{Transaction-VhRzUzbg.js → Transaction-Bnm30wxt.js} +9 -8
- package/dist/{Transaction-Bfr51t2I.js → Transaction-D2qgyVJA.js} +5 -5
- package/dist/{TransactionOld-DP6geerP.js → TransactionOld-DL9vMDXr.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-DMYLTNO7.js → TransactionTable.vue_vue_type_script_setup_true_lang-PXvQ-nrK.js} +3 -3
- package/dist/{app-dky8a2sP.js → app--PNGHtZ3.js} +338 -338
- package/dist/app.js +1 -1
- package/dist/{assets-CGSnvwg_.js → assets-BAvqcM2y.js} +30 -28
- package/dist/{grafana-DpTNZERD.js → grafana-XJlaGQ8C.js} +7 -10
- package/dist/{index-yCRcX8ql.js → index-B4xE-ETp.js} +12862 -12264
- package/dist/{index-O5yk1zsL.js → index-DXzezAJQ.js} +4 -3
- package/dist/{index-B_tCR11q.js → index-DsT_D8r0.js} +1 -1
- package/dist/index-DtHh0OLe.js +162 -0
- package/dist/{index-KziNLTAM.js → index-SqBpMlb0.js} +1 -1
- package/dist/{index-l4KSc_D9.js → index-pPbE76Vg.js} +1 -1
- package/dist/{index-CcFjStnT.js → index-s6srEUqZ.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-JJ6R-Wfm.js → index.vue_vue_type_script_setup_true_lang-aFl1Lbk1.js} +1 -1
- package/dist/model/transaction.d.ts +1 -2
- package/dist/package.json +2 -2
- package/dist/payout-account-TSBuddbd.js +1953 -0
- package/dist/stores/payoutAccount.d.ts +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +90 -0
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +22 -28
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +40 -40
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +20 -20
- package/package.json +2 -2
- package/dist/TerminalSetting-B9w9AaTE.js +0 -497
- package/dist/payout-account-BVO1uUOe.js +0 -1819
@@ -0,0 +1,1953 @@
|
|
1
|
+
import { _ as rt, C as st, r as ye, S as it, g as re, a as ot, b as at, c as pe, F as ut, d as ct, e as lt } from "./app--PNGHtZ3.js";
|
2
|
+
import { a as ht, c as dt, d as ft } from "./index-B4xE-ETp.js";
|
3
|
+
import { _ as G } from "./index-DtHh0OLe.js";
|
4
|
+
import { useCoreStore as _t } from "@feedmepos/mf-common";
|
5
|
+
/**
|
6
|
+
* @license
|
7
|
+
* Copyright 2017 Google LLC
|
8
|
+
*
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
+
* you may not use this file except in compliance with the License.
|
11
|
+
* You may obtain a copy of the License at
|
12
|
+
*
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
14
|
+
*
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
+
* See the License for the specific language governing permissions and
|
19
|
+
* limitations under the License.
|
20
|
+
*/
|
21
|
+
const Pe = "firebasestorage.googleapis.com", $e = "storageBucket", pt = 2 * 60 * 1e3, mt = 10 * 60 * 1e3;
|
22
|
+
/**
|
23
|
+
* @license
|
24
|
+
* Copyright 2017 Google LLC
|
25
|
+
*
|
26
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
27
|
+
* you may not use this file except in compliance with the License.
|
28
|
+
* You may obtain a copy of the License at
|
29
|
+
*
|
30
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
31
|
+
*
|
32
|
+
* Unless required by applicable law or agreed to in writing, software
|
33
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
34
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
35
|
+
* See the License for the specific language governing permissions and
|
36
|
+
* limitations under the License.
|
37
|
+
*/
|
38
|
+
class O extends ut {
|
39
|
+
/**
|
40
|
+
* @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and
|
41
|
+
* added to the end of the message.
|
42
|
+
* @param message - Error message.
|
43
|
+
* @param status_ - Corresponding HTTP Status Code
|
44
|
+
*/
|
45
|
+
constructor(e, n, r = 0) {
|
46
|
+
super(de(e), `Firebase Storage: ${n} (${de(e)})`), this.status_ = r, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this, O.prototype);
|
47
|
+
}
|
48
|
+
get status() {
|
49
|
+
return this.status_;
|
50
|
+
}
|
51
|
+
set status(e) {
|
52
|
+
this.status_ = e;
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* Compares a `StorageErrorCode` against this error's code, filtering out the prefix.
|
56
|
+
*/
|
57
|
+
_codeEquals(e) {
|
58
|
+
return de(e) === this.code;
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* Optional response message that was added by the server.
|
62
|
+
*/
|
63
|
+
get serverResponse() {
|
64
|
+
return this.customData.serverResponse;
|
65
|
+
}
|
66
|
+
set serverResponse(e) {
|
67
|
+
this.customData.serverResponse = e, this.customData.serverResponse ? this.message = `${this._baseMessage}
|
68
|
+
${this.customData.serverResponse}` : this.message = this._baseMessage;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
var A;
|
72
|
+
(function(t) {
|
73
|
+
t.UNKNOWN = "unknown", t.OBJECT_NOT_FOUND = "object-not-found", t.BUCKET_NOT_FOUND = "bucket-not-found", t.PROJECT_NOT_FOUND = "project-not-found", t.QUOTA_EXCEEDED = "quota-exceeded", t.UNAUTHENTICATED = "unauthenticated", t.UNAUTHORIZED = "unauthorized", t.UNAUTHORIZED_APP = "unauthorized-app", t.RETRY_LIMIT_EXCEEDED = "retry-limit-exceeded", t.INVALID_CHECKSUM = "invalid-checksum", t.CANCELED = "canceled", t.INVALID_EVENT_NAME = "invalid-event-name", t.INVALID_URL = "invalid-url", t.INVALID_DEFAULT_BUCKET = "invalid-default-bucket", t.NO_DEFAULT_BUCKET = "no-default-bucket", t.CANNOT_SLICE_BLOB = "cannot-slice-blob", t.SERVER_FILE_WRONG_SIZE = "server-file-wrong-size", t.NO_DOWNLOAD_URL = "no-download-url", t.INVALID_ARGUMENT = "invalid-argument", t.INVALID_ARGUMENT_COUNT = "invalid-argument-count", t.APP_DELETED = "app-deleted", t.INVALID_ROOT_OPERATION = "invalid-root-operation", t.INVALID_FORMAT = "invalid-format", t.INTERNAL_ERROR = "internal-error", t.UNSUPPORTED_ENVIRONMENT = "unsupported-environment";
|
74
|
+
})(A || (A = {}));
|
75
|
+
function de(t) {
|
76
|
+
return "storage/" + t;
|
77
|
+
}
|
78
|
+
function ke() {
|
79
|
+
const t = "An unknown error occurred, please check the error payload for server response.";
|
80
|
+
return new O(A.UNKNOWN, t);
|
81
|
+
}
|
82
|
+
function gt(t) {
|
83
|
+
return new O(A.OBJECT_NOT_FOUND, "Object '" + t + "' does not exist.");
|
84
|
+
}
|
85
|
+
function bt(t) {
|
86
|
+
return new O(A.QUOTA_EXCEEDED, "Quota for bucket '" + t + "' exceeded, please view quota on https://firebase.google.com/pricing/.");
|
87
|
+
}
|
88
|
+
function kt() {
|
89
|
+
const t = "User is not authenticated, please authenticate using Firebase Authentication and try again.";
|
90
|
+
return new O(A.UNAUTHENTICATED, t);
|
91
|
+
}
|
92
|
+
function Bt() {
|
93
|
+
return new O(A.UNAUTHORIZED_APP, "This app does not have permission to access Firebase Storage on this project.");
|
94
|
+
}
|
95
|
+
function At(t) {
|
96
|
+
return new O(A.UNAUTHORIZED, "User does not have permission to access '" + t + "'.");
|
97
|
+
}
|
98
|
+
function Ot() {
|
99
|
+
return new O(A.RETRY_LIMIT_EXCEEDED, "Max retry time for operation exceeded, please try again.");
|
100
|
+
}
|
101
|
+
function Rt() {
|
102
|
+
return new O(A.CANCELED, "User canceled the upload/download.");
|
103
|
+
}
|
104
|
+
function Tt(t) {
|
105
|
+
return new O(A.INVALID_URL, "Invalid URL '" + t + "'.");
|
106
|
+
}
|
107
|
+
function St(t) {
|
108
|
+
return new O(A.INVALID_DEFAULT_BUCKET, "Invalid default bucket '" + t + "'.");
|
109
|
+
}
|
110
|
+
function wt() {
|
111
|
+
return new O(A.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + $e + "' property when initializing the app?");
|
112
|
+
}
|
113
|
+
function yt() {
|
114
|
+
return new O(A.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
|
115
|
+
}
|
116
|
+
function Ct() {
|
117
|
+
return new O(A.NO_DOWNLOAD_URL, "The given file does not have any download URLs.");
|
118
|
+
}
|
119
|
+
function Nt(t) {
|
120
|
+
return new O(A.UNSUPPORTED_ENVIRONMENT, `${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);
|
121
|
+
}
|
122
|
+
function me(t) {
|
123
|
+
return new O(A.INVALID_ARGUMENT, t);
|
124
|
+
}
|
125
|
+
function Ke() {
|
126
|
+
return new O(A.APP_DELETED, "The Firebase app was deleted.");
|
127
|
+
}
|
128
|
+
function It(t) {
|
129
|
+
return new O(A.INVALID_ROOT_OPERATION, "The operation '" + t + "' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').");
|
130
|
+
}
|
131
|
+
function te(t, e) {
|
132
|
+
return new O(A.INVALID_FORMAT, "String does not match format '" + t + "': " + e);
|
133
|
+
}
|
134
|
+
function ee(t) {
|
135
|
+
throw new O(A.INTERNAL_ERROR, "Internal error: " + t);
|
136
|
+
}
|
137
|
+
/**
|
138
|
+
* @license
|
139
|
+
* Copyright 2017 Google LLC
|
140
|
+
*
|
141
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
142
|
+
* you may not use this file except in compliance with the License.
|
143
|
+
* You may obtain a copy of the License at
|
144
|
+
*
|
145
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
146
|
+
*
|
147
|
+
* Unless required by applicable law or agreed to in writing, software
|
148
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
149
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
150
|
+
* See the License for the specific language governing permissions and
|
151
|
+
* limitations under the License.
|
152
|
+
*/
|
153
|
+
class D {
|
154
|
+
constructor(e, n) {
|
155
|
+
this.bucket = e, this.path_ = n;
|
156
|
+
}
|
157
|
+
get path() {
|
158
|
+
return this.path_;
|
159
|
+
}
|
160
|
+
get isRoot() {
|
161
|
+
return this.path.length === 0;
|
162
|
+
}
|
163
|
+
fullServerUrl() {
|
164
|
+
const e = encodeURIComponent;
|
165
|
+
return "/b/" + e(this.bucket) + "/o/" + e(this.path);
|
166
|
+
}
|
167
|
+
bucketOnlyServerUrl() {
|
168
|
+
return "/b/" + encodeURIComponent(this.bucket) + "/o";
|
169
|
+
}
|
170
|
+
static makeFromBucketSpec(e, n) {
|
171
|
+
let r;
|
172
|
+
try {
|
173
|
+
r = D.makeFromUrl(e, n);
|
174
|
+
} catch {
|
175
|
+
return new D(e, "");
|
176
|
+
}
|
177
|
+
if (r.path === "")
|
178
|
+
return r;
|
179
|
+
throw St(e);
|
180
|
+
}
|
181
|
+
static makeFromUrl(e, n) {
|
182
|
+
let r = null;
|
183
|
+
const s = "([A-Za-z0-9.\\-_]+)";
|
184
|
+
function o(I) {
|
185
|
+
I.path.charAt(I.path.length - 1) === "/" && (I.path_ = I.path_.slice(0, -1));
|
186
|
+
}
|
187
|
+
const i = "(/(.*))?$", h = new RegExp("^gs://" + s + i, "i"), d = { bucket: 1, path: 3 };
|
188
|
+
function m(I) {
|
189
|
+
I.path_ = decodeURIComponent(I.path);
|
190
|
+
}
|
191
|
+
const B = "v[A-Za-z0-9_]+", b = n.replace(/[.]/g, "\\."), T = "(/([^?#]*).*)?$", S = new RegExp(`^https?://${b}/${B}/b/${s}/o${T}`, "i"), C = { bucket: 1, path: 3 }, x = n === Pe ? "(?:storage.googleapis.com|storage.cloud.google.com)" : n, N = "([^?#]*)", Y = new RegExp(`^https?://${x}/${s}/${N}`, "i"), M = [
|
192
|
+
{ regex: h, indices: d, postModify: o },
|
193
|
+
{
|
194
|
+
regex: S,
|
195
|
+
indices: C,
|
196
|
+
postModify: m
|
197
|
+
},
|
198
|
+
{
|
199
|
+
regex: Y,
|
200
|
+
indices: { bucket: 1, path: 2 },
|
201
|
+
postModify: m
|
202
|
+
}
|
203
|
+
];
|
204
|
+
for (let I = 0; I < M.length; I++) {
|
205
|
+
const $ = M[I], P = $.regex.exec(e);
|
206
|
+
if (P) {
|
207
|
+
const se = P[$.indices.bucket];
|
208
|
+
let V = P[$.indices.path];
|
209
|
+
V || (V = ""), r = new D(se, V), $.postModify(r);
|
210
|
+
break;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
if (r == null)
|
214
|
+
throw Tt(e);
|
215
|
+
return r;
|
216
|
+
}
|
217
|
+
}
|
218
|
+
class Et {
|
219
|
+
constructor(e) {
|
220
|
+
this.promise_ = Promise.reject(e);
|
221
|
+
}
|
222
|
+
/** @inheritDoc */
|
223
|
+
getPromise() {
|
224
|
+
return this.promise_;
|
225
|
+
}
|
226
|
+
/** @inheritDoc */
|
227
|
+
cancel(e = !1) {
|
228
|
+
}
|
229
|
+
}
|
230
|
+
/**
|
231
|
+
* @license
|
232
|
+
* Copyright 2017 Google LLC
|
233
|
+
*
|
234
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
235
|
+
* you may not use this file except in compliance with the License.
|
236
|
+
* You may obtain a copy of the License at
|
237
|
+
*
|
238
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
239
|
+
*
|
240
|
+
* Unless required by applicable law or agreed to in writing, software
|
241
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
242
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
243
|
+
* See the License for the specific language governing permissions and
|
244
|
+
* limitations under the License.
|
245
|
+
*/
|
246
|
+
function Ut(t, e, n) {
|
247
|
+
let r = 1, s = null, o = null, i = !1, h = 0;
|
248
|
+
function d() {
|
249
|
+
return h === 2;
|
250
|
+
}
|
251
|
+
let m = !1;
|
252
|
+
function B(...N) {
|
253
|
+
m || (m = !0, e.apply(null, N));
|
254
|
+
}
|
255
|
+
function b(N) {
|
256
|
+
s = setTimeout(() => {
|
257
|
+
s = null, t(S, d());
|
258
|
+
}, N);
|
259
|
+
}
|
260
|
+
function T() {
|
261
|
+
o && clearTimeout(o);
|
262
|
+
}
|
263
|
+
function S(N, ...Y) {
|
264
|
+
if (m) {
|
265
|
+
T();
|
266
|
+
return;
|
267
|
+
}
|
268
|
+
if (N) {
|
269
|
+
T(), B.call(null, N, ...Y);
|
270
|
+
return;
|
271
|
+
}
|
272
|
+
if (d() || i) {
|
273
|
+
T(), B.call(null, N, ...Y);
|
274
|
+
return;
|
275
|
+
}
|
276
|
+
r < 64 && (r *= 2);
|
277
|
+
let M;
|
278
|
+
h === 1 ? (h = 2, M = 0) : M = (r + Math.random()) * 1e3, b(M);
|
279
|
+
}
|
280
|
+
let C = !1;
|
281
|
+
function x(N) {
|
282
|
+
C || (C = !0, T(), !m && (s !== null ? (N || (h = 2), clearTimeout(s), b(0)) : N || (h = 1)));
|
283
|
+
}
|
284
|
+
return b(0), o = setTimeout(() => {
|
285
|
+
i = !0, x(!0);
|
286
|
+
}, n), x;
|
287
|
+
}
|
288
|
+
function Mt(t) {
|
289
|
+
t(!1);
|
290
|
+
}
|
291
|
+
/**
|
292
|
+
* @license
|
293
|
+
* Copyright 2017 Google LLC
|
294
|
+
*
|
295
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
296
|
+
* you may not use this file except in compliance with the License.
|
297
|
+
* You may obtain a copy of the License at
|
298
|
+
*
|
299
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
300
|
+
*
|
301
|
+
* Unless required by applicable law or agreed to in writing, software
|
302
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
303
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
304
|
+
* See the License for the specific language governing permissions and
|
305
|
+
* limitations under the License.
|
306
|
+
*/
|
307
|
+
function vt(t) {
|
308
|
+
return t !== void 0;
|
309
|
+
}
|
310
|
+
function Dt(t) {
|
311
|
+
return typeof t == "object" && !Array.isArray(t);
|
312
|
+
}
|
313
|
+
function Be(t) {
|
314
|
+
return typeof t == "string" || t instanceof String;
|
315
|
+
}
|
316
|
+
function Ce(t) {
|
317
|
+
return Ae() && t instanceof Blob;
|
318
|
+
}
|
319
|
+
function Ae() {
|
320
|
+
return typeof Blob < "u";
|
321
|
+
}
|
322
|
+
function Ne(t, e, n, r) {
|
323
|
+
if (r < e)
|
324
|
+
throw me(`Invalid value for '${t}'. Expected ${e} or greater.`);
|
325
|
+
if (r > n)
|
326
|
+
throw me(`Invalid value for '${t}'. Expected ${n} or less.`);
|
327
|
+
}
|
328
|
+
/**
|
329
|
+
* @license
|
330
|
+
* Copyright 2017 Google LLC
|
331
|
+
*
|
332
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
333
|
+
* you may not use this file except in compliance with the License.
|
334
|
+
* You may obtain a copy of the License at
|
335
|
+
*
|
336
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
337
|
+
*
|
338
|
+
* Unless required by applicable law or agreed to in writing, software
|
339
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
340
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
341
|
+
* See the License for the specific language governing permissions and
|
342
|
+
* limitations under the License.
|
343
|
+
*/
|
344
|
+
function he(t, e, n) {
|
345
|
+
let r = e;
|
346
|
+
return n == null && (r = `https://${e}`), `${n}://${r}/v0${t}`;
|
347
|
+
}
|
348
|
+
function xe(t) {
|
349
|
+
const e = encodeURIComponent;
|
350
|
+
let n = "?";
|
351
|
+
for (const r in t)
|
352
|
+
if (t.hasOwnProperty(r)) {
|
353
|
+
const s = e(r) + "=" + e(t[r]);
|
354
|
+
n = n + s + "&";
|
355
|
+
}
|
356
|
+
return n = n.slice(0, -1), n;
|
357
|
+
}
|
358
|
+
var q;
|
359
|
+
(function(t) {
|
360
|
+
t[t.NO_ERROR = 0] = "NO_ERROR", t[t.NETWORK_ERROR = 1] = "NETWORK_ERROR", t[t.ABORT = 2] = "ABORT";
|
361
|
+
})(q || (q = {}));
|
362
|
+
/**
|
363
|
+
* @license
|
364
|
+
* Copyright 2022 Google LLC
|
365
|
+
*
|
366
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
367
|
+
* you may not use this file except in compliance with the License.
|
368
|
+
* You may obtain a copy of the License at
|
369
|
+
*
|
370
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
371
|
+
*
|
372
|
+
* Unless required by applicable law or agreed to in writing, software
|
373
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
374
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
375
|
+
* See the License for the specific language governing permissions and
|
376
|
+
* limitations under the License.
|
377
|
+
*/
|
378
|
+
function Lt(t, e) {
|
379
|
+
const n = t >= 500 && t < 600, s = [
|
380
|
+
// Request Timeout: web server didn't receive full request in time.
|
381
|
+
408,
|
382
|
+
// Too Many Requests: you're getting rate-limited, basically.
|
383
|
+
429
|
384
|
+
].indexOf(t) !== -1, o = e.indexOf(t) !== -1;
|
385
|
+
return n || s || o;
|
386
|
+
}
|
387
|
+
/**
|
388
|
+
* @license
|
389
|
+
* Copyright 2017 Google LLC
|
390
|
+
*
|
391
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
392
|
+
* you may not use this file except in compliance with the License.
|
393
|
+
* You may obtain a copy of the License at
|
394
|
+
*
|
395
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
396
|
+
*
|
397
|
+
* Unless required by applicable law or agreed to in writing, software
|
398
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
399
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
400
|
+
* See the License for the specific language governing permissions and
|
401
|
+
* limitations under the License.
|
402
|
+
*/
|
403
|
+
class Pt {
|
404
|
+
constructor(e, n, r, s, o, i, h, d, m, B, b, T = !0) {
|
405
|
+
this.url_ = e, this.method_ = n, this.headers_ = r, this.body_ = s, this.successCodes_ = o, this.additionalRetryCodes_ = i, this.callback_ = h, this.errorCallback_ = d, this.timeout_ = m, this.progressCallback_ = B, this.connectionFactory_ = b, this.retry = T, this.pendingConnection_ = null, this.backoffId_ = null, this.canceled_ = !1, this.appDelete_ = !1, this.promise_ = new Promise((S, C) => {
|
406
|
+
this.resolve_ = S, this.reject_ = C, this.start_();
|
407
|
+
});
|
408
|
+
}
|
409
|
+
/**
|
410
|
+
* Actually starts the retry loop.
|
411
|
+
*/
|
412
|
+
start_() {
|
413
|
+
const e = (r, s) => {
|
414
|
+
if (s) {
|
415
|
+
r(!1, new ue(!1, null, !0));
|
416
|
+
return;
|
417
|
+
}
|
418
|
+
const o = this.connectionFactory_();
|
419
|
+
this.pendingConnection_ = o;
|
420
|
+
const i = (h) => {
|
421
|
+
const d = h.loaded, m = h.lengthComputable ? h.total : -1;
|
422
|
+
this.progressCallback_ !== null && this.progressCallback_(d, m);
|
423
|
+
};
|
424
|
+
this.progressCallback_ !== null && o.addUploadProgressListener(i), o.send(this.url_, this.method_, this.body_, this.headers_).then(() => {
|
425
|
+
this.progressCallback_ !== null && o.removeUploadProgressListener(i), this.pendingConnection_ = null;
|
426
|
+
const h = o.getErrorCode() === q.NO_ERROR, d = o.getStatus();
|
427
|
+
if (!h || Lt(d, this.additionalRetryCodes_) && this.retry) {
|
428
|
+
const B = o.getErrorCode() === q.ABORT;
|
429
|
+
r(!1, new ue(!1, null, B));
|
430
|
+
return;
|
431
|
+
}
|
432
|
+
const m = this.successCodes_.indexOf(d) !== -1;
|
433
|
+
r(!0, new ue(m, o));
|
434
|
+
});
|
435
|
+
}, n = (r, s) => {
|
436
|
+
const o = this.resolve_, i = this.reject_, h = s.connection;
|
437
|
+
if (s.wasSuccessCode)
|
438
|
+
try {
|
439
|
+
const d = this.callback_(h, h.getResponse());
|
440
|
+
vt(d) ? o(d) : o();
|
441
|
+
} catch (d) {
|
442
|
+
i(d);
|
443
|
+
}
|
444
|
+
else if (h !== null) {
|
445
|
+
const d = ke();
|
446
|
+
d.serverResponse = h.getErrorText(), this.errorCallback_ ? i(this.errorCallback_(h, d)) : i(d);
|
447
|
+
} else if (s.canceled) {
|
448
|
+
const d = this.appDelete_ ? Ke() : Rt();
|
449
|
+
i(d);
|
450
|
+
} else {
|
451
|
+
const d = Ot();
|
452
|
+
i(d);
|
453
|
+
}
|
454
|
+
};
|
455
|
+
this.canceled_ ? n(!1, new ue(!1, null, !0)) : this.backoffId_ = Ut(e, n, this.timeout_);
|
456
|
+
}
|
457
|
+
/** @inheritDoc */
|
458
|
+
getPromise() {
|
459
|
+
return this.promise_;
|
460
|
+
}
|
461
|
+
/** @inheritDoc */
|
462
|
+
cancel(e) {
|
463
|
+
this.canceled_ = !0, this.appDelete_ = e || !1, this.backoffId_ !== null && Mt(this.backoffId_), this.pendingConnection_ !== null && this.pendingConnection_.abort();
|
464
|
+
}
|
465
|
+
}
|
466
|
+
class ue {
|
467
|
+
constructor(e, n, r) {
|
468
|
+
this.wasSuccessCode = e, this.connection = n, this.canceled = !!r;
|
469
|
+
}
|
470
|
+
}
|
471
|
+
function $t(t, e) {
|
472
|
+
e !== null && e.length > 0 && (t.Authorization = "Firebase " + e);
|
473
|
+
}
|
474
|
+
function Kt(t, e) {
|
475
|
+
t["X-Firebase-Storage-Version"] = "webjs/" + (e ?? "AppManager");
|
476
|
+
}
|
477
|
+
function xt(t, e) {
|
478
|
+
e && (t["X-Firebase-GMPID"] = e);
|
479
|
+
}
|
480
|
+
function Ht(t, e) {
|
481
|
+
e !== null && (t["X-Firebase-AppCheck"] = e);
|
482
|
+
}
|
483
|
+
function Yt(t, e, n, r, s, o, i = !0) {
|
484
|
+
const h = xe(t.urlParams), d = t.url + h, m = Object.assign({}, t.headers);
|
485
|
+
return xt(m, e), $t(m, n), Kt(m, o), Ht(m, r), new Pt(d, t.method, m, t.body, t.successCodes, t.additionalRetryCodes, t.handler, t.errorHandler, t.timeout, t.progressCallback, s, i);
|
486
|
+
}
|
487
|
+
/**
|
488
|
+
* @license
|
489
|
+
* Copyright 2017 Google LLC
|
490
|
+
*
|
491
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
492
|
+
* you may not use this file except in compliance with the License.
|
493
|
+
* You may obtain a copy of the License at
|
494
|
+
*
|
495
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
496
|
+
*
|
497
|
+
* Unless required by applicable law or agreed to in writing, software
|
498
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
499
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
500
|
+
* See the License for the specific language governing permissions and
|
501
|
+
* limitations under the License.
|
502
|
+
*/
|
503
|
+
function Ft() {
|
504
|
+
return typeof BlobBuilder < "u" ? BlobBuilder : typeof WebKitBlobBuilder < "u" ? WebKitBlobBuilder : void 0;
|
505
|
+
}
|
506
|
+
function jt(...t) {
|
507
|
+
const e = Ft();
|
508
|
+
if (e !== void 0) {
|
509
|
+
const n = new e();
|
510
|
+
for (let r = 0; r < t.length; r++)
|
511
|
+
n.append(t[r]);
|
512
|
+
return n.getBlob();
|
513
|
+
} else {
|
514
|
+
if (Ae())
|
515
|
+
return new Blob(t);
|
516
|
+
throw new O(A.UNSUPPORTED_ENVIRONMENT, "This browser doesn't seem to support creating Blobs");
|
517
|
+
}
|
518
|
+
}
|
519
|
+
function Gt(t, e, n) {
|
520
|
+
return t.webkitSlice ? t.webkitSlice(e, n) : t.mozSlice ? t.mozSlice(e, n) : t.slice ? t.slice(e, n) : null;
|
521
|
+
}
|
522
|
+
/**
|
523
|
+
* @license
|
524
|
+
* Copyright 2021 Google LLC
|
525
|
+
*
|
526
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
527
|
+
* you may not use this file except in compliance with the License.
|
528
|
+
* You may obtain a copy of the License at
|
529
|
+
*
|
530
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
531
|
+
*
|
532
|
+
* Unless required by applicable law or agreed to in writing, software
|
533
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
534
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
535
|
+
* See the License for the specific language governing permissions and
|
536
|
+
* limitations under the License.
|
537
|
+
*/
|
538
|
+
function Vt(t) {
|
539
|
+
if (typeof atob > "u")
|
540
|
+
throw Nt("base-64");
|
541
|
+
return atob(t);
|
542
|
+
}
|
543
|
+
/**
|
544
|
+
* @license
|
545
|
+
* Copyright 2017 Google LLC
|
546
|
+
*
|
547
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
548
|
+
* you may not use this file except in compliance with the License.
|
549
|
+
* You may obtain a copy of the License at
|
550
|
+
*
|
551
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
552
|
+
*
|
553
|
+
* Unless required by applicable law or agreed to in writing, software
|
554
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
555
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
556
|
+
* See the License for the specific language governing permissions and
|
557
|
+
* limitations under the License.
|
558
|
+
*/
|
559
|
+
const K = {
|
560
|
+
/**
|
561
|
+
* Indicates the string should be interpreted "raw", that is, as normal text.
|
562
|
+
* The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte
|
563
|
+
* sequence.
|
564
|
+
* Example: The string 'Hello! \\ud83d\\ude0a' becomes the byte sequence
|
565
|
+
* 48 65 6c 6c 6f 21 20 f0 9f 98 8a
|
566
|
+
*/
|
567
|
+
RAW: "raw",
|
568
|
+
/**
|
569
|
+
* Indicates the string should be interpreted as base64-encoded data.
|
570
|
+
* Padding characters (trailing '='s) are optional.
|
571
|
+
* Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence
|
572
|
+
* ad 69 8e fb e1 3a b7 bf eb 97
|
573
|
+
*/
|
574
|
+
BASE64: "base64",
|
575
|
+
/**
|
576
|
+
* Indicates the string should be interpreted as base64url-encoded data.
|
577
|
+
* Padding characters (trailing '='s) are optional.
|
578
|
+
* Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence
|
579
|
+
* ad 69 8e fb e1 3a b7 bf eb 97
|
580
|
+
*/
|
581
|
+
BASE64URL: "base64url",
|
582
|
+
/**
|
583
|
+
* Indicates the string is a data URL, such as one obtained from
|
584
|
+
* canvas.toDataURL().
|
585
|
+
* Example: the string 'data:application/octet-stream;base64,aaaa'
|
586
|
+
* becomes the byte sequence
|
587
|
+
* 69 a6 9a
|
588
|
+
* (the content-type "application/octet-stream" is also applied, but can
|
589
|
+
* be overridden in the metadata object).
|
590
|
+
*/
|
591
|
+
DATA_URL: "data_url"
|
592
|
+
};
|
593
|
+
class fe {
|
594
|
+
constructor(e, n) {
|
595
|
+
this.data = e, this.contentType = n || null;
|
596
|
+
}
|
597
|
+
}
|
598
|
+
function Wt(t, e) {
|
599
|
+
switch (t) {
|
600
|
+
case K.RAW:
|
601
|
+
return new fe(He(e));
|
602
|
+
case K.BASE64:
|
603
|
+
case K.BASE64URL:
|
604
|
+
return new fe(Ye(t, e));
|
605
|
+
case K.DATA_URL:
|
606
|
+
return new fe(qt(e), Xt(e));
|
607
|
+
}
|
608
|
+
throw ke();
|
609
|
+
}
|
610
|
+
function He(t) {
|
611
|
+
const e = [];
|
612
|
+
for (let n = 0; n < t.length; n++) {
|
613
|
+
let r = t.charCodeAt(n);
|
614
|
+
if (r <= 127)
|
615
|
+
e.push(r);
|
616
|
+
else if (r <= 2047)
|
617
|
+
e.push(192 | r >> 6, 128 | r & 63);
|
618
|
+
else if ((r & 64512) === 55296)
|
619
|
+
if (!(n < t.length - 1 && (t.charCodeAt(n + 1) & 64512) === 56320))
|
620
|
+
e.push(239, 191, 189);
|
621
|
+
else {
|
622
|
+
const o = r, i = t.charCodeAt(++n);
|
623
|
+
r = 65536 | (o & 1023) << 10 | i & 1023, e.push(240 | r >> 18, 128 | r >> 12 & 63, 128 | r >> 6 & 63, 128 | r & 63);
|
624
|
+
}
|
625
|
+
else
|
626
|
+
(r & 64512) === 56320 ? e.push(239, 191, 189) : e.push(224 | r >> 12, 128 | r >> 6 & 63, 128 | r & 63);
|
627
|
+
}
|
628
|
+
return new Uint8Array(e);
|
629
|
+
}
|
630
|
+
function zt(t) {
|
631
|
+
let e;
|
632
|
+
try {
|
633
|
+
e = decodeURIComponent(t);
|
634
|
+
} catch {
|
635
|
+
throw te(K.DATA_URL, "Malformed data URL.");
|
636
|
+
}
|
637
|
+
return He(e);
|
638
|
+
}
|
639
|
+
function Ye(t, e) {
|
640
|
+
switch (t) {
|
641
|
+
case K.BASE64: {
|
642
|
+
const s = e.indexOf("-") !== -1, o = e.indexOf("_") !== -1;
|
643
|
+
if (s || o)
|
644
|
+
throw te(t, "Invalid character '" + (s ? "-" : "_") + "' found: is it base64url encoded?");
|
645
|
+
break;
|
646
|
+
}
|
647
|
+
case K.BASE64URL: {
|
648
|
+
const s = e.indexOf("+") !== -1, o = e.indexOf("/") !== -1;
|
649
|
+
if (s || o)
|
650
|
+
throw te(t, "Invalid character '" + (s ? "+" : "/") + "' found: is it base64 encoded?");
|
651
|
+
e = e.replace(/-/g, "+").replace(/_/g, "/");
|
652
|
+
break;
|
653
|
+
}
|
654
|
+
}
|
655
|
+
let n;
|
656
|
+
try {
|
657
|
+
n = Vt(e);
|
658
|
+
} catch (s) {
|
659
|
+
throw s.message.includes("polyfill") ? s : te(t, "Invalid character found");
|
660
|
+
}
|
661
|
+
const r = new Uint8Array(n.length);
|
662
|
+
for (let s = 0; s < n.length; s++)
|
663
|
+
r[s] = n.charCodeAt(s);
|
664
|
+
return r;
|
665
|
+
}
|
666
|
+
class Fe {
|
667
|
+
constructor(e) {
|
668
|
+
this.base64 = !1, this.contentType = null;
|
669
|
+
const n = e.match(/^data:([^,]+)?,/);
|
670
|
+
if (n === null)
|
671
|
+
throw te(K.DATA_URL, "Must be formatted 'data:[<mediatype>][;base64],<data>");
|
672
|
+
const r = n[1] || null;
|
673
|
+
r != null && (this.base64 = Jt(r, ";base64"), this.contentType = this.base64 ? r.substring(0, r.length - 7) : r), this.rest = e.substring(e.indexOf(",") + 1);
|
674
|
+
}
|
675
|
+
}
|
676
|
+
function qt(t) {
|
677
|
+
const e = new Fe(t);
|
678
|
+
return e.base64 ? Ye(K.BASE64, e.rest) : zt(e.rest);
|
679
|
+
}
|
680
|
+
function Xt(t) {
|
681
|
+
return new Fe(t).contentType;
|
682
|
+
}
|
683
|
+
function Jt(t, e) {
|
684
|
+
return t.length >= e.length ? t.substring(t.length - e.length) === e : !1;
|
685
|
+
}
|
686
|
+
/**
|
687
|
+
* @license
|
688
|
+
* Copyright 2017 Google LLC
|
689
|
+
*
|
690
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
691
|
+
* you may not use this file except in compliance with the License.
|
692
|
+
* You may obtain a copy of the License at
|
693
|
+
*
|
694
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
695
|
+
*
|
696
|
+
* Unless required by applicable law or agreed to in writing, software
|
697
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
698
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
699
|
+
* See the License for the specific language governing permissions and
|
700
|
+
* limitations under the License.
|
701
|
+
*/
|
702
|
+
class j {
|
703
|
+
constructor(e, n) {
|
704
|
+
let r = 0, s = "";
|
705
|
+
Ce(e) ? (this.data_ = e, r = e.size, s = e.type) : e instanceof ArrayBuffer ? (n ? this.data_ = new Uint8Array(e) : (this.data_ = new Uint8Array(e.byteLength), this.data_.set(new Uint8Array(e))), r = this.data_.length) : e instanceof Uint8Array && (n ? this.data_ = e : (this.data_ = new Uint8Array(e.length), this.data_.set(e)), r = e.length), this.size_ = r, this.type_ = s;
|
706
|
+
}
|
707
|
+
size() {
|
708
|
+
return this.size_;
|
709
|
+
}
|
710
|
+
type() {
|
711
|
+
return this.type_;
|
712
|
+
}
|
713
|
+
slice(e, n) {
|
714
|
+
if (Ce(this.data_)) {
|
715
|
+
const r = this.data_, s = Gt(r, e, n);
|
716
|
+
return s === null ? null : new j(s);
|
717
|
+
} else {
|
718
|
+
const r = new Uint8Array(this.data_.buffer, e, n - e);
|
719
|
+
return new j(r, !0);
|
720
|
+
}
|
721
|
+
}
|
722
|
+
static getBlob(...e) {
|
723
|
+
if (Ae()) {
|
724
|
+
const n = e.map((r) => r instanceof j ? r.data_ : r);
|
725
|
+
return new j(jt.apply(null, n));
|
726
|
+
} else {
|
727
|
+
const n = e.map((i) => Be(i) ? Wt(K.RAW, i).data : i.data_);
|
728
|
+
let r = 0;
|
729
|
+
n.forEach((i) => {
|
730
|
+
r += i.byteLength;
|
731
|
+
});
|
732
|
+
const s = new Uint8Array(r);
|
733
|
+
let o = 0;
|
734
|
+
return n.forEach((i) => {
|
735
|
+
for (let h = 0; h < i.length; h++)
|
736
|
+
s[o++] = i[h];
|
737
|
+
}), new j(s, !0);
|
738
|
+
}
|
739
|
+
}
|
740
|
+
uploadData() {
|
741
|
+
return this.data_;
|
742
|
+
}
|
743
|
+
}
|
744
|
+
/**
|
745
|
+
* @license
|
746
|
+
* Copyright 2017 Google LLC
|
747
|
+
*
|
748
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
749
|
+
* you may not use this file except in compliance with the License.
|
750
|
+
* You may obtain a copy of the License at
|
751
|
+
*
|
752
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
753
|
+
*
|
754
|
+
* Unless required by applicable law or agreed to in writing, software
|
755
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
756
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
757
|
+
* See the License for the specific language governing permissions and
|
758
|
+
* limitations under the License.
|
759
|
+
*/
|
760
|
+
function je(t) {
|
761
|
+
let e;
|
762
|
+
try {
|
763
|
+
e = JSON.parse(t);
|
764
|
+
} catch {
|
765
|
+
return null;
|
766
|
+
}
|
767
|
+
return Dt(e) ? e : null;
|
768
|
+
}
|
769
|
+
/**
|
770
|
+
* @license
|
771
|
+
* Copyright 2017 Google LLC
|
772
|
+
*
|
773
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
774
|
+
* you may not use this file except in compliance with the License.
|
775
|
+
* You may obtain a copy of the License at
|
776
|
+
*
|
777
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
778
|
+
*
|
779
|
+
* Unless required by applicable law or agreed to in writing, software
|
780
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
781
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
782
|
+
* See the License for the specific language governing permissions and
|
783
|
+
* limitations under the License.
|
784
|
+
*/
|
785
|
+
function Zt(t) {
|
786
|
+
if (t.length === 0)
|
787
|
+
return null;
|
788
|
+
const e = t.lastIndexOf("/");
|
789
|
+
return e === -1 ? "" : t.slice(0, e);
|
790
|
+
}
|
791
|
+
function Qt(t, e) {
|
792
|
+
const n = e.split("/").filter((r) => r.length > 0).join("/");
|
793
|
+
return t.length === 0 ? n : t + "/" + n;
|
794
|
+
}
|
795
|
+
function Ge(t) {
|
796
|
+
const e = t.lastIndexOf("/", t.length - 2);
|
797
|
+
return e === -1 ? t : t.slice(e + 1);
|
798
|
+
}
|
799
|
+
/**
|
800
|
+
* @license
|
801
|
+
* Copyright 2017 Google LLC
|
802
|
+
*
|
803
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
804
|
+
* you may not use this file except in compliance with the License.
|
805
|
+
* You may obtain a copy of the License at
|
806
|
+
*
|
807
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
808
|
+
*
|
809
|
+
* Unless required by applicable law or agreed to in writing, software
|
810
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
811
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
812
|
+
* See the License for the specific language governing permissions and
|
813
|
+
* limitations under the License.
|
814
|
+
*/
|
815
|
+
function en(t, e) {
|
816
|
+
return e;
|
817
|
+
}
|
818
|
+
class U {
|
819
|
+
constructor(e, n, r, s) {
|
820
|
+
this.server = e, this.local = n || e, this.writable = !!r, this.xform = s || en;
|
821
|
+
}
|
822
|
+
}
|
823
|
+
let ce = null;
|
824
|
+
function tn(t) {
|
825
|
+
return !Be(t) || t.length < 2 ? t : Ge(t);
|
826
|
+
}
|
827
|
+
function Ve() {
|
828
|
+
if (ce)
|
829
|
+
return ce;
|
830
|
+
const t = [];
|
831
|
+
t.push(new U("bucket")), t.push(new U("generation")), t.push(new U("metageneration")), t.push(new U("name", "fullPath", !0));
|
832
|
+
function e(o, i) {
|
833
|
+
return tn(i);
|
834
|
+
}
|
835
|
+
const n = new U("name");
|
836
|
+
n.xform = e, t.push(n);
|
837
|
+
function r(o, i) {
|
838
|
+
return i !== void 0 ? Number(i) : i;
|
839
|
+
}
|
840
|
+
const s = new U("size");
|
841
|
+
return s.xform = r, t.push(s), t.push(new U("timeCreated")), t.push(new U("updated")), t.push(new U("md5Hash", null, !0)), t.push(new U("cacheControl", null, !0)), t.push(new U("contentDisposition", null, !0)), t.push(new U("contentEncoding", null, !0)), t.push(new U("contentLanguage", null, !0)), t.push(new U("contentType", null, !0)), t.push(new U("metadata", "customMetadata", !0)), ce = t, ce;
|
842
|
+
}
|
843
|
+
function nn(t, e) {
|
844
|
+
function n() {
|
845
|
+
const r = t.bucket, s = t.fullPath, o = new D(r, s);
|
846
|
+
return e._makeStorageReference(o);
|
847
|
+
}
|
848
|
+
Object.defineProperty(t, "ref", { get: n });
|
849
|
+
}
|
850
|
+
function rn(t, e, n) {
|
851
|
+
const r = {};
|
852
|
+
r.type = "file";
|
853
|
+
const s = n.length;
|
854
|
+
for (let o = 0; o < s; o++) {
|
855
|
+
const i = n[o];
|
856
|
+
r[i.local] = i.xform(r, e[i.server]);
|
857
|
+
}
|
858
|
+
return nn(r, t), r;
|
859
|
+
}
|
860
|
+
function We(t, e, n) {
|
861
|
+
const r = je(e);
|
862
|
+
return r === null ? null : rn(t, r, n);
|
863
|
+
}
|
864
|
+
function sn(t, e, n, r) {
|
865
|
+
const s = je(e);
|
866
|
+
if (s === null || !Be(s.downloadTokens))
|
867
|
+
return null;
|
868
|
+
const o = s.downloadTokens;
|
869
|
+
if (o.length === 0)
|
870
|
+
return null;
|
871
|
+
const i = encodeURIComponent;
|
872
|
+
return o.split(",").map((m) => {
|
873
|
+
const B = t.bucket, b = t.fullPath, T = "/b/" + i(B) + "/o/" + i(b), S = he(T, n, r), C = xe({
|
874
|
+
alt: "media",
|
875
|
+
token: m
|
876
|
+
});
|
877
|
+
return S + C;
|
878
|
+
})[0];
|
879
|
+
}
|
880
|
+
function on(t, e) {
|
881
|
+
const n = {}, r = e.length;
|
882
|
+
for (let s = 0; s < r; s++) {
|
883
|
+
const o = e[s];
|
884
|
+
o.writable && (n[o.server] = t[o.local]);
|
885
|
+
}
|
886
|
+
return JSON.stringify(n);
|
887
|
+
}
|
888
|
+
class Oe {
|
889
|
+
constructor(e, n, r, s) {
|
890
|
+
this.url = e, this.method = n, this.handler = r, this.timeout = s, this.urlParams = {}, this.headers = {}, this.body = null, this.errorHandler = null, this.progressCallback = null, this.successCodes = [200], this.additionalRetryCodes = [];
|
891
|
+
}
|
892
|
+
}
|
893
|
+
/**
|
894
|
+
* @license
|
895
|
+
* Copyright 2017 Google LLC
|
896
|
+
*
|
897
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
898
|
+
* you may not use this file except in compliance with the License.
|
899
|
+
* You may obtain a copy of the License at
|
900
|
+
*
|
901
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
902
|
+
*
|
903
|
+
* Unless required by applicable law or agreed to in writing, software
|
904
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
905
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
906
|
+
* See the License for the specific language governing permissions and
|
907
|
+
* limitations under the License.
|
908
|
+
*/
|
909
|
+
function ze(t) {
|
910
|
+
if (!t)
|
911
|
+
throw ke();
|
912
|
+
}
|
913
|
+
function an(t, e) {
|
914
|
+
function n(r, s) {
|
915
|
+
const o = We(t, s, e);
|
916
|
+
return ze(o !== null), o;
|
917
|
+
}
|
918
|
+
return n;
|
919
|
+
}
|
920
|
+
function un(t, e) {
|
921
|
+
function n(r, s) {
|
922
|
+
const o = We(t, s, e);
|
923
|
+
return ze(o !== null), sn(o, s, t.host, t._protocol);
|
924
|
+
}
|
925
|
+
return n;
|
926
|
+
}
|
927
|
+
function qe(t) {
|
928
|
+
function e(n, r) {
|
929
|
+
let s;
|
930
|
+
return n.getStatus() === 401 ? /* This exact message string is the only consistent part of the */ /* server's error response that identifies it as an App Check error. */ n.getErrorText().includes("Firebase App Check token is invalid") ? s = Bt() : s = kt() : n.getStatus() === 402 ? s = bt(t.bucket) : n.getStatus() === 403 ? s = At(t.path) : s = r, s.status = n.getStatus(), s.serverResponse = r.serverResponse, s;
|
931
|
+
}
|
932
|
+
return e;
|
933
|
+
}
|
934
|
+
function Xe(t) {
|
935
|
+
const e = qe(t);
|
936
|
+
function n(r, s) {
|
937
|
+
let o = e(r, s);
|
938
|
+
return r.getStatus() === 404 && (o = gt(t.path)), o.serverResponse = s.serverResponse, o;
|
939
|
+
}
|
940
|
+
return n;
|
941
|
+
}
|
942
|
+
function cn(t, e, n) {
|
943
|
+
const r = e.fullServerUrl(), s = he(r, t.host, t._protocol), o = "GET", i = t.maxOperationRetryTime, h = new Oe(s, o, un(t, n), i);
|
944
|
+
return h.errorHandler = Xe(e), h;
|
945
|
+
}
|
946
|
+
function ln(t, e) {
|
947
|
+
const n = e.fullServerUrl(), r = he(n, t.host, t._protocol), s = "DELETE", o = t.maxOperationRetryTime;
|
948
|
+
function i(d, m) {
|
949
|
+
}
|
950
|
+
const h = new Oe(r, s, i, o);
|
951
|
+
return h.successCodes = [200, 204], h.errorHandler = Xe(e), h;
|
952
|
+
}
|
953
|
+
function hn(t, e) {
|
954
|
+
return t && t.contentType || e && e.type() || "application/octet-stream";
|
955
|
+
}
|
956
|
+
function dn(t, e, n) {
|
957
|
+
const r = Object.assign({}, n);
|
958
|
+
return r.fullPath = t.path, r.size = e.size(), r.contentType || (r.contentType = hn(null, e)), r;
|
959
|
+
}
|
960
|
+
function fn(t, e, n, r, s) {
|
961
|
+
const o = e.bucketOnlyServerUrl(), i = {
|
962
|
+
"X-Goog-Upload-Protocol": "multipart"
|
963
|
+
};
|
964
|
+
function h() {
|
965
|
+
let M = "";
|
966
|
+
for (let I = 0; I < 2; I++)
|
967
|
+
M = M + Math.random().toString().slice(2);
|
968
|
+
return M;
|
969
|
+
}
|
970
|
+
const d = h();
|
971
|
+
i["Content-Type"] = "multipart/related; boundary=" + d;
|
972
|
+
const m = dn(e, r, s), B = on(m, n), b = "--" + d + `\r
|
973
|
+
Content-Type: application/json; charset=utf-8\r
|
974
|
+
\r
|
975
|
+
` + B + `\r
|
976
|
+
--` + d + `\r
|
977
|
+
Content-Type: ` + m.contentType + `\r
|
978
|
+
\r
|
979
|
+
`, T = `\r
|
980
|
+
--` + d + "--", S = j.getBlob(b, r, T);
|
981
|
+
if (S === null)
|
982
|
+
throw yt();
|
983
|
+
const C = { name: m.fullPath }, x = he(o, t.host, t._protocol), N = "POST", Y = t.maxUploadRetryTime, H = new Oe(x, N, an(t, n), Y);
|
984
|
+
return H.urlParams = C, H.headers = i, H.body = S.uploadData(), H.errorHandler = qe(e), H;
|
985
|
+
}
|
986
|
+
class _n {
|
987
|
+
constructor() {
|
988
|
+
this.sent_ = !1, this.xhr_ = new XMLHttpRequest(), this.initXhr(), this.errorCode_ = q.NO_ERROR, this.sendPromise_ = new Promise((e) => {
|
989
|
+
this.xhr_.addEventListener("abort", () => {
|
990
|
+
this.errorCode_ = q.ABORT, e();
|
991
|
+
}), this.xhr_.addEventListener("error", () => {
|
992
|
+
this.errorCode_ = q.NETWORK_ERROR, e();
|
993
|
+
}), this.xhr_.addEventListener("load", () => {
|
994
|
+
e();
|
995
|
+
});
|
996
|
+
});
|
997
|
+
}
|
998
|
+
send(e, n, r, s) {
|
999
|
+
if (this.sent_)
|
1000
|
+
throw ee("cannot .send() more than once");
|
1001
|
+
if (this.sent_ = !0, this.xhr_.open(n, e, !0), s !== void 0)
|
1002
|
+
for (const o in s)
|
1003
|
+
s.hasOwnProperty(o) && this.xhr_.setRequestHeader(o, s[o].toString());
|
1004
|
+
return r !== void 0 ? this.xhr_.send(r) : this.xhr_.send(), this.sendPromise_;
|
1005
|
+
}
|
1006
|
+
getErrorCode() {
|
1007
|
+
if (!this.sent_)
|
1008
|
+
throw ee("cannot .getErrorCode() before sending");
|
1009
|
+
return this.errorCode_;
|
1010
|
+
}
|
1011
|
+
getStatus() {
|
1012
|
+
if (!this.sent_)
|
1013
|
+
throw ee("cannot .getStatus() before sending");
|
1014
|
+
try {
|
1015
|
+
return this.xhr_.status;
|
1016
|
+
} catch {
|
1017
|
+
return -1;
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
getResponse() {
|
1021
|
+
if (!this.sent_)
|
1022
|
+
throw ee("cannot .getResponse() before sending");
|
1023
|
+
return this.xhr_.response;
|
1024
|
+
}
|
1025
|
+
getErrorText() {
|
1026
|
+
if (!this.sent_)
|
1027
|
+
throw ee("cannot .getErrorText() before sending");
|
1028
|
+
return this.xhr_.statusText;
|
1029
|
+
}
|
1030
|
+
/** Aborts the request. */
|
1031
|
+
abort() {
|
1032
|
+
this.xhr_.abort();
|
1033
|
+
}
|
1034
|
+
getResponseHeader(e) {
|
1035
|
+
return this.xhr_.getResponseHeader(e);
|
1036
|
+
}
|
1037
|
+
addUploadProgressListener(e) {
|
1038
|
+
this.xhr_.upload != null && this.xhr_.upload.addEventListener("progress", e);
|
1039
|
+
}
|
1040
|
+
removeUploadProgressListener(e) {
|
1041
|
+
this.xhr_.upload != null && this.xhr_.upload.removeEventListener("progress", e);
|
1042
|
+
}
|
1043
|
+
}
|
1044
|
+
class pn extends _n {
|
1045
|
+
initXhr() {
|
1046
|
+
this.xhr_.responseType = "text";
|
1047
|
+
}
|
1048
|
+
}
|
1049
|
+
function Re() {
|
1050
|
+
return new pn();
|
1051
|
+
}
|
1052
|
+
/**
|
1053
|
+
* @license
|
1054
|
+
* Copyright 2019 Google LLC
|
1055
|
+
*
|
1056
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
1057
|
+
* you may not use this file except in compliance with the License.
|
1058
|
+
* You may obtain a copy of the License at
|
1059
|
+
*
|
1060
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
1061
|
+
*
|
1062
|
+
* Unless required by applicable law or agreed to in writing, software
|
1063
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
1064
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
1065
|
+
* See the License for the specific language governing permissions and
|
1066
|
+
* limitations under the License.
|
1067
|
+
*/
|
1068
|
+
class X {
|
1069
|
+
constructor(e, n) {
|
1070
|
+
this._service = e, n instanceof D ? this._location = n : this._location = D.makeFromUrl(n, e.host);
|
1071
|
+
}
|
1072
|
+
/**
|
1073
|
+
* Returns the URL for the bucket and path this object references,
|
1074
|
+
* in the form gs://<bucket>/<object-path>
|
1075
|
+
* @override
|
1076
|
+
*/
|
1077
|
+
toString() {
|
1078
|
+
return "gs://" + this._location.bucket + "/" + this._location.path;
|
1079
|
+
}
|
1080
|
+
_newRef(e, n) {
|
1081
|
+
return new X(e, n);
|
1082
|
+
}
|
1083
|
+
/**
|
1084
|
+
* A reference to the root of this object's bucket.
|
1085
|
+
*/
|
1086
|
+
get root() {
|
1087
|
+
const e = new D(this._location.bucket, "");
|
1088
|
+
return this._newRef(this._service, e);
|
1089
|
+
}
|
1090
|
+
/**
|
1091
|
+
* The name of the bucket containing this reference's object.
|
1092
|
+
*/
|
1093
|
+
get bucket() {
|
1094
|
+
return this._location.bucket;
|
1095
|
+
}
|
1096
|
+
/**
|
1097
|
+
* The full path of this object.
|
1098
|
+
*/
|
1099
|
+
get fullPath() {
|
1100
|
+
return this._location.path;
|
1101
|
+
}
|
1102
|
+
/**
|
1103
|
+
* The short name of this object, which is the last component of the full path.
|
1104
|
+
* For example, if fullPath is 'full/path/image.png', name is 'image.png'.
|
1105
|
+
*/
|
1106
|
+
get name() {
|
1107
|
+
return Ge(this._location.path);
|
1108
|
+
}
|
1109
|
+
/**
|
1110
|
+
* The `StorageService` instance this `StorageReference` is associated with.
|
1111
|
+
*/
|
1112
|
+
get storage() {
|
1113
|
+
return this._service;
|
1114
|
+
}
|
1115
|
+
/**
|
1116
|
+
* A `StorageReference` pointing to the parent location of this `StorageReference`, or null if
|
1117
|
+
* this reference is the root.
|
1118
|
+
*/
|
1119
|
+
get parent() {
|
1120
|
+
const e = Zt(this._location.path);
|
1121
|
+
if (e === null)
|
1122
|
+
return null;
|
1123
|
+
const n = new D(this._location.bucket, e);
|
1124
|
+
return new X(this._service, n);
|
1125
|
+
}
|
1126
|
+
/**
|
1127
|
+
* Utility function to throw an error in methods that do not accept a root reference.
|
1128
|
+
*/
|
1129
|
+
_throwIfRoot(e) {
|
1130
|
+
if (this._location.path === "")
|
1131
|
+
throw It(e);
|
1132
|
+
}
|
1133
|
+
}
|
1134
|
+
function mn(t, e, n) {
|
1135
|
+
t._throwIfRoot("uploadBytes");
|
1136
|
+
const r = fn(t.storage, t._location, Ve(), new j(e, !0), n);
|
1137
|
+
return t.storage.makeRequestWithTokens(r, Re).then((s) => ({
|
1138
|
+
metadata: s,
|
1139
|
+
ref: t
|
1140
|
+
}));
|
1141
|
+
}
|
1142
|
+
function gn(t) {
|
1143
|
+
t._throwIfRoot("getDownloadURL");
|
1144
|
+
const e = cn(t.storage, t._location, Ve());
|
1145
|
+
return t.storage.makeRequestWithTokens(e, Re).then((n) => {
|
1146
|
+
if (n === null)
|
1147
|
+
throw Ct();
|
1148
|
+
return n;
|
1149
|
+
});
|
1150
|
+
}
|
1151
|
+
function bn(t) {
|
1152
|
+
t._throwIfRoot("deleteObject");
|
1153
|
+
const e = ln(t.storage, t._location);
|
1154
|
+
return t.storage.makeRequestWithTokens(e, Re);
|
1155
|
+
}
|
1156
|
+
function kn(t, e) {
|
1157
|
+
const n = Qt(t._location.path, e), r = new D(t._location.bucket, n);
|
1158
|
+
return new X(t.storage, r);
|
1159
|
+
}
|
1160
|
+
/**
|
1161
|
+
* @license
|
1162
|
+
* Copyright 2017 Google LLC
|
1163
|
+
*
|
1164
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
1165
|
+
* you may not use this file except in compliance with the License.
|
1166
|
+
* You may obtain a copy of the License at
|
1167
|
+
*
|
1168
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
1169
|
+
*
|
1170
|
+
* Unless required by applicable law or agreed to in writing, software
|
1171
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
1172
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
1173
|
+
* See the License for the specific language governing permissions and
|
1174
|
+
* limitations under the License.
|
1175
|
+
*/
|
1176
|
+
function Bn(t) {
|
1177
|
+
return /^[A-Za-z]+:\/\//.test(t);
|
1178
|
+
}
|
1179
|
+
function An(t, e) {
|
1180
|
+
return new X(t, e);
|
1181
|
+
}
|
1182
|
+
function Je(t, e) {
|
1183
|
+
if (t instanceof Te) {
|
1184
|
+
const n = t;
|
1185
|
+
if (n._bucket == null)
|
1186
|
+
throw wt();
|
1187
|
+
const r = new X(n, n._bucket);
|
1188
|
+
return e != null ? Je(r, e) : r;
|
1189
|
+
} else
|
1190
|
+
return e !== void 0 ? kn(t, e) : t;
|
1191
|
+
}
|
1192
|
+
function On(t, e) {
|
1193
|
+
if (e && Bn(e)) {
|
1194
|
+
if (t instanceof Te)
|
1195
|
+
return An(t, e);
|
1196
|
+
throw me("To use ref(service, url), the first argument must be a Storage instance.");
|
1197
|
+
} else
|
1198
|
+
return Je(t, e);
|
1199
|
+
}
|
1200
|
+
function Ie(t, e) {
|
1201
|
+
const n = e == null ? void 0 : e[$e];
|
1202
|
+
return n == null ? null : D.makeFromBucketSpec(n, t);
|
1203
|
+
}
|
1204
|
+
function Rn(t, e, n, r = {}) {
|
1205
|
+
t.host = `${e}:${n}`, t._protocol = "http";
|
1206
|
+
const { mockUserToken: s } = r;
|
1207
|
+
s && (t._overrideAuthToken = typeof s == "string" ? s : ct(s, t.app.options.projectId));
|
1208
|
+
}
|
1209
|
+
class Te {
|
1210
|
+
constructor(e, n, r, s, o) {
|
1211
|
+
this.app = e, this._authProvider = n, this._appCheckProvider = r, this._url = s, this._firebaseVersion = o, this._bucket = null, this._host = Pe, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = pt, this._maxUploadRetryTime = mt, this._requests = /* @__PURE__ */ new Set(), s != null ? this._bucket = D.makeFromBucketSpec(s, this._host) : this._bucket = Ie(this._host, this.app.options);
|
1212
|
+
}
|
1213
|
+
/**
|
1214
|
+
* The host string for this service, in the form of `host` or
|
1215
|
+
* `host:port`.
|
1216
|
+
*/
|
1217
|
+
get host() {
|
1218
|
+
return this._host;
|
1219
|
+
}
|
1220
|
+
set host(e) {
|
1221
|
+
this._host = e, this._url != null ? this._bucket = D.makeFromBucketSpec(this._url, e) : this._bucket = Ie(e, this.app.options);
|
1222
|
+
}
|
1223
|
+
/**
|
1224
|
+
* The maximum time to retry uploads in milliseconds.
|
1225
|
+
*/
|
1226
|
+
get maxUploadRetryTime() {
|
1227
|
+
return this._maxUploadRetryTime;
|
1228
|
+
}
|
1229
|
+
set maxUploadRetryTime(e) {
|
1230
|
+
Ne(
|
1231
|
+
"time",
|
1232
|
+
/* minValue=*/
|
1233
|
+
0,
|
1234
|
+
/* maxValue= */
|
1235
|
+
Number.POSITIVE_INFINITY,
|
1236
|
+
e
|
1237
|
+
), this._maxUploadRetryTime = e;
|
1238
|
+
}
|
1239
|
+
/**
|
1240
|
+
* The maximum time to retry operations other than uploads or downloads in
|
1241
|
+
* milliseconds.
|
1242
|
+
*/
|
1243
|
+
get maxOperationRetryTime() {
|
1244
|
+
return this._maxOperationRetryTime;
|
1245
|
+
}
|
1246
|
+
set maxOperationRetryTime(e) {
|
1247
|
+
Ne(
|
1248
|
+
"time",
|
1249
|
+
/* minValue=*/
|
1250
|
+
0,
|
1251
|
+
/* maxValue= */
|
1252
|
+
Number.POSITIVE_INFINITY,
|
1253
|
+
e
|
1254
|
+
), this._maxOperationRetryTime = e;
|
1255
|
+
}
|
1256
|
+
async _getAuthToken() {
|
1257
|
+
if (this._overrideAuthToken)
|
1258
|
+
return this._overrideAuthToken;
|
1259
|
+
const e = this._authProvider.getImmediate({ optional: !0 });
|
1260
|
+
if (e) {
|
1261
|
+
const n = await e.getToken();
|
1262
|
+
if (n !== null)
|
1263
|
+
return n.accessToken;
|
1264
|
+
}
|
1265
|
+
return null;
|
1266
|
+
}
|
1267
|
+
async _getAppCheckToken() {
|
1268
|
+
const e = this._appCheckProvider.getImmediate({ optional: !0 });
|
1269
|
+
return e ? (await e.getToken()).token : null;
|
1270
|
+
}
|
1271
|
+
/**
|
1272
|
+
* Stop running requests and prevent more from being created.
|
1273
|
+
*/
|
1274
|
+
_delete() {
|
1275
|
+
return this._deleted || (this._deleted = !0, this._requests.forEach((e) => e.cancel()), this._requests.clear()), Promise.resolve();
|
1276
|
+
}
|
1277
|
+
/**
|
1278
|
+
* Returns a new firebaseStorage.Reference object referencing this StorageService
|
1279
|
+
* at the given Location.
|
1280
|
+
*/
|
1281
|
+
_makeStorageReference(e) {
|
1282
|
+
return new X(this, e);
|
1283
|
+
}
|
1284
|
+
/**
|
1285
|
+
* @param requestInfo - HTTP RequestInfo object
|
1286
|
+
* @param authToken - Firebase auth token
|
1287
|
+
*/
|
1288
|
+
_makeRequest(e, n, r, s, o = !0) {
|
1289
|
+
if (this._deleted)
|
1290
|
+
return new Et(Ke());
|
1291
|
+
{
|
1292
|
+
const i = Yt(e, this._appId, r, s, n, this._firebaseVersion, o);
|
1293
|
+
return this._requests.add(i), i.getPromise().then(() => this._requests.delete(i), () => this._requests.delete(i)), i;
|
1294
|
+
}
|
1295
|
+
}
|
1296
|
+
async makeRequestWithTokens(e, n) {
|
1297
|
+
const [r, s] = await Promise.all([
|
1298
|
+
this._getAuthToken(),
|
1299
|
+
this._getAppCheckToken()
|
1300
|
+
]);
|
1301
|
+
return this._makeRequest(e, n, r, s).getPromise();
|
1302
|
+
}
|
1303
|
+
}
|
1304
|
+
const Ee = "@firebase/storage", Ue = "0.13.2";
|
1305
|
+
/**
|
1306
|
+
* @license
|
1307
|
+
* Copyright 2020 Google LLC
|
1308
|
+
*
|
1309
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
1310
|
+
* you may not use this file except in compliance with the License.
|
1311
|
+
* You may obtain a copy of the License at
|
1312
|
+
*
|
1313
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
1314
|
+
*
|
1315
|
+
* Unless required by applicable law or agreed to in writing, software
|
1316
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
1317
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
1318
|
+
* See the License for the specific language governing permissions and
|
1319
|
+
* limitations under the License.
|
1320
|
+
*/
|
1321
|
+
const Ze = "storage";
|
1322
|
+
function Tn(t, e, n) {
|
1323
|
+
return t = re(t), mn(t, e, n);
|
1324
|
+
}
|
1325
|
+
function Sn(t) {
|
1326
|
+
return t = re(t), gn(t);
|
1327
|
+
}
|
1328
|
+
function wn(t) {
|
1329
|
+
return t = re(t), bn(t);
|
1330
|
+
}
|
1331
|
+
function Me(t, e) {
|
1332
|
+
return t = re(t), On(t, e);
|
1333
|
+
}
|
1334
|
+
function ve(t = pe(), e) {
|
1335
|
+
t = re(t);
|
1336
|
+
const r = ot(t, Ze).getImmediate({
|
1337
|
+
identifier: e
|
1338
|
+
}), s = at("storage");
|
1339
|
+
return s && yn(r, ...s), r;
|
1340
|
+
}
|
1341
|
+
function yn(t, e, n, r = {}) {
|
1342
|
+
Rn(t, e, n, r);
|
1343
|
+
}
|
1344
|
+
function Cn(t, { instanceIdentifier: e }) {
|
1345
|
+
const n = t.getProvider("app").getImmediate(), r = t.getProvider("auth-internal"), s = t.getProvider("app-check-internal");
|
1346
|
+
return new Te(n, r, s, e, it);
|
1347
|
+
}
|
1348
|
+
function Nn() {
|
1349
|
+
rt(new st(
|
1350
|
+
Ze,
|
1351
|
+
Cn,
|
1352
|
+
"PUBLIC"
|
1353
|
+
/* ComponentType.PUBLIC */
|
1354
|
+
).setMultipleInstances(!0)), ye(Ee, Ue, ""), ye(Ee, Ue, "esm2017");
|
1355
|
+
}
|
1356
|
+
Nn();
|
1357
|
+
const ne = {
|
1358
|
+
async update(t, e, n) {
|
1359
|
+
const r = ve(pe(), n), s = Me(r, t);
|
1360
|
+
return await Tn(s, e), Sn(s);
|
1361
|
+
},
|
1362
|
+
async delete(t, e) {
|
1363
|
+
const n = ve(pe(), e), r = Me(n, t);
|
1364
|
+
await wn(r);
|
1365
|
+
}
|
1366
|
+
};
|
1367
|
+
var Se = {}, Qe = {};
|
1368
|
+
(function(t) {
|
1369
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.Malaysia = t.F_BANK_NAME = void 0;
|
1370
|
+
var e;
|
1371
|
+
(function(i) {
|
1372
|
+
i.maybank = "MAYBANK", i.cimbBank = "CIMB_BANK", i.rhbBank = "RHB_BANK", i.bankIslam = "BANK_ISLAM", i.bankMuamalat = "BANK_MUAMALAT", i.bankRakyat = "BANK_RAKYAT", i.bankSimpananNasional = "BANK_SIMPANAN_NASIONAL", i.citiBank = "CITIBANK", i.hongLeongBank = "HONG_LEONG_BANK", i.hsbcBank = "HSBC_BANK", i.ocbcBank = "OCBC_BANK", i.publicBank = "PUBLIC_BANK", i.affinBank = "AFFIN_BANK", i.amBank = "AMBANK", i.agroBank = "AGRO_BANK", i.allianceBank = "ALLIANCE_BANK", i.alRajhiBank = "AL_RAJHI_BANK", i.bankOfChina = "BANK_OF_CHINA", i.bankOfAmerica = "BANK_OF_AMERICA", i.bankOfTokyoMitsubishiUFJ = "BANK_OF_TOKYO_MITSUBISHI_UFJ", i.bnpParibas = "BNP_PARIBAS", i.deutscheBank = "DEUTSCHE_BANK", i.industrialCommercialBankOfChina = "INDUSTRIAL_COMMERCIAL_BANK_OF_CHINA", i.jpMorganChaseBank = "JP_MORGAN_CHASE_BANK", i.kuwaitFinanceHouse = "KUWAIT_FINANCE_HOUSE", i.mizuhoBank = "MIZUHO_BANK", i.standardCharteredBank = "STANDARD_CHARTERED_BANK", i.sumitomoMitsuiBankingCorporation = "SUMITOMO_MITSUI_BANKING_CORPORATION", i.theRoyalBankOfScotland = "THE_ROYAL_BANK_OF_SCOTLAND", i.unitedOverseasBank = "UNITED_OVERSEAS_BANK", i.mbsbBankBerhad = "MBSB_BANK_BERHAD";
|
1373
|
+
})(e = t.F_BANK_NAME || (t.F_BANK_NAME = {}));
|
1374
|
+
const n = {
|
1375
|
+
[e.maybank]: "MBBEMYKL",
|
1376
|
+
[e.cimbBank]: "CIBBMYKL",
|
1377
|
+
[e.rhbBank]: "RHBBMYKL",
|
1378
|
+
[e.bankIslam]: "BIMBMYKL",
|
1379
|
+
[e.bankMuamalat]: "BMMBMYKL",
|
1380
|
+
[e.bankRakyat]: "BKRMMYKL",
|
1381
|
+
[e.bankSimpananNasional]: "BSNAMYK1",
|
1382
|
+
[e.citiBank]: "CITIMYKL",
|
1383
|
+
[e.hongLeongBank]: "HLBBMYKL",
|
1384
|
+
[e.hsbcBank]: "HBMBMYKL",
|
1385
|
+
[e.ocbcBank]: "OCBCMYKL",
|
1386
|
+
[e.publicBank]: "PBBEMYKL",
|
1387
|
+
[e.affinBank]: "PHBMMYKL",
|
1388
|
+
[e.amBank]: "ARBKMYKL",
|
1389
|
+
[e.agroBank]: "AGOBMYKL",
|
1390
|
+
[e.allianceBank]: "MFBBMYKL",
|
1391
|
+
[e.alRajhiBank]: "RJHIMYKL",
|
1392
|
+
[e.bankOfChina]: "BKCHMYKL",
|
1393
|
+
[e.bankOfAmerica]: "BOFAMY2X",
|
1394
|
+
[e.bankOfTokyoMitsubishiUFJ]: "BOTKMYKX",
|
1395
|
+
[e.bnpParibas]: "BNPAMYKL",
|
1396
|
+
[e.deutscheBank]: "DEUTMYKL",
|
1397
|
+
[e.industrialCommercialBankOfChina]: "ICBKMYKL",
|
1398
|
+
[e.jpMorganChaseBank]: "CHASMYKX",
|
1399
|
+
[e.kuwaitFinanceHouse]: "KFHOMYKL",
|
1400
|
+
[e.mizuhoBank]: "MHCBMYKA",
|
1401
|
+
[e.standardCharteredBank]: "SCBLMYKX",
|
1402
|
+
[e.sumitomoMitsuiBankingCorporation]: "SMBCMYKL",
|
1403
|
+
[e.theRoyalBankOfScotland]: "ABNAMYKL",
|
1404
|
+
[e.unitedOverseasBank]: "UOVBMYKL",
|
1405
|
+
[e.mbsbBankBerhad]: "AFBQMYKL"
|
1406
|
+
}, r = {
|
1407
|
+
[e.maybank]: "MAYBANK",
|
1408
|
+
[e.cimbBank]: "CIMB_BANK",
|
1409
|
+
[e.rhbBank]: "RHB_BANK",
|
1410
|
+
[e.bankIslam]: "BANK_ISLAM",
|
1411
|
+
[e.bankMuamalat]: "BANK_MUAMALAT",
|
1412
|
+
[e.bankRakyat]: "BANK_RAKYAT",
|
1413
|
+
[e.bankSimpananNasional]: "BANK_SIMPANAN_NASIONAL",
|
1414
|
+
[e.citiBank]: "CITIBANK",
|
1415
|
+
[e.hongLeongBank]: "HONG_LEONG_BANK",
|
1416
|
+
[e.hsbcBank]: "HSBC_BANK",
|
1417
|
+
[e.ocbcBank]: "OCBC_BANK",
|
1418
|
+
[e.publicBank]: "PUBLIC_BANK",
|
1419
|
+
[e.affinBank]: "AFFIN_BANK",
|
1420
|
+
[e.amBank]: "AMBANK",
|
1421
|
+
[e.agroBank]: "AGRO_BANK",
|
1422
|
+
[e.allianceBank]: "ALLIANCE_BANK",
|
1423
|
+
[e.alRajhiBank]: "AL_RAJHI_BANK",
|
1424
|
+
[e.bankOfChina]: "BANK_OF_CHINA",
|
1425
|
+
[e.bankOfAmerica]: "BANK_OF_AMERICA",
|
1426
|
+
[e.bankOfTokyoMitsubishiUFJ]: "BANK_OF_TOKYO_MITSUBISHI_UFJ",
|
1427
|
+
[e.bnpParibas]: "BNP_PARIBAS",
|
1428
|
+
[e.deutscheBank]: "DEUTSCHE_BANK",
|
1429
|
+
[e.industrialCommercialBankOfChina]: "INDUSTRIAL_COMMERCIAL_BANK_OF_CHINA",
|
1430
|
+
[e.jpMorganChaseBank]: "JP_MORGAN_CHASE_BANK",
|
1431
|
+
[e.kuwaitFinanceHouse]: "KUWAIT_FINANCE_HOUSE",
|
1432
|
+
[e.mizuhoBank]: "MIZUHO_BANK",
|
1433
|
+
[e.standardCharteredBank]: "STANDARD_CHARTERED_BANK",
|
1434
|
+
[e.sumitomoMitsuiBankingCorporation]: "SUMITOMO_MITSUI_BANKING_CORPORATION",
|
1435
|
+
[e.theRoyalBankOfScotland]: "THE_ROYAL_BANK_OF_SCOTLAND_BERHARD",
|
1436
|
+
[e.unitedOverseasBank]: "UNITED_OVERSEAS_BANK",
|
1437
|
+
[e.mbsbBankBerhad]: "MBSB_BANK_BERHAD"
|
1438
|
+
};
|
1439
|
+
function s(i) {
|
1440
|
+
return n[i];
|
1441
|
+
}
|
1442
|
+
function o(i) {
|
1443
|
+
return r[i];
|
1444
|
+
}
|
1445
|
+
t.Malaysia = {
|
1446
|
+
F_BANK_NAME: e,
|
1447
|
+
name: r,
|
1448
|
+
swiftCode: n,
|
1449
|
+
readSwiftCode: s,
|
1450
|
+
readName: o
|
1451
|
+
};
|
1452
|
+
})(Qe);
|
1453
|
+
var et = {};
|
1454
|
+
(function(t) {
|
1455
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.Singapore = t.F_BANK_NAME = void 0;
|
1456
|
+
var e;
|
1457
|
+
(function(i) {
|
1458
|
+
i.dbsBank = "DBS_BANK", i.ocbcBank = "OCBC_BANK", i.maybank = "MAYBANK", i.hsbcBank = "HSBC_BANK", i.unitedOverseasBank = "UNITED_OVERSEAS_BANK", i.cimbBank = "CIMB_BANK", i.rhbBank = "RHB_BANK", i.standardCharteredBank = "STANDARD_CHARTERED_BANK";
|
1459
|
+
})(e = t.F_BANK_NAME || (t.F_BANK_NAME = {}));
|
1460
|
+
const n = {
|
1461
|
+
[e.maybank]: "MBBESGSG",
|
1462
|
+
[e.cimbBank]: "CIBBSGSG",
|
1463
|
+
[e.rhbBank]: "RHBBSGSG",
|
1464
|
+
[e.hsbcBank]: "HSBCSGS2",
|
1465
|
+
[e.ocbcBank]: "OCBCSGSG",
|
1466
|
+
[e.standardCharteredBank]: "SCBLSG22",
|
1467
|
+
[e.unitedOverseasBank]: "UOVBSGSG",
|
1468
|
+
[e.dbsBank]: "DBSSSGSG"
|
1469
|
+
}, r = {
|
1470
|
+
[e.maybank]: "MAYBANK",
|
1471
|
+
[e.cimbBank]: "CIMB_BANK",
|
1472
|
+
[e.rhbBank]: "RHB_BANK",
|
1473
|
+
[e.hsbcBank]: "HSBC_BANK",
|
1474
|
+
[e.ocbcBank]: "OCBC_BANK",
|
1475
|
+
[e.standardCharteredBank]: "STANDARD_CHARTERED_BANK",
|
1476
|
+
[e.unitedOverseasBank]: "UNITED_OVERSEAS_BANK",
|
1477
|
+
[e.dbsBank]: "DBS_BANK"
|
1478
|
+
};
|
1479
|
+
function s(i) {
|
1480
|
+
return n[i];
|
1481
|
+
}
|
1482
|
+
function o(i) {
|
1483
|
+
return r[i];
|
1484
|
+
}
|
1485
|
+
t.Singapore = {
|
1486
|
+
F_BANK_NAME: e,
|
1487
|
+
name: r,
|
1488
|
+
swiftCode: n,
|
1489
|
+
readSwiftCode: s,
|
1490
|
+
readName: o
|
1491
|
+
};
|
1492
|
+
})(et);
|
1493
|
+
Object.defineProperty(Se, "__esModule", { value: !0 });
|
1494
|
+
var tt = Se.Bank = void 0;
|
1495
|
+
const ge = ht, In = Qe, En = et, Un = {
|
1496
|
+
[ge.F_COUNTRY.enum.MY]: In.Malaysia,
|
1497
|
+
[ge.F_COUNTRY.enum.SG]: En.Singapore
|
1498
|
+
}, Mn = (t = ge.F_COUNTRY.enum.MY) => Un[t];
|
1499
|
+
tt = Se.Bank = Mn;
|
1500
|
+
var nt = { exports: {} };
|
1501
|
+
(function(t, e) {
|
1502
|
+
(function(n, r) {
|
1503
|
+
t.exports = r();
|
1504
|
+
})(dt, function() {
|
1505
|
+
var n = 1e3, r = 6e4, s = 36e5, o = "millisecond", i = "second", h = "minute", d = "hour", m = "day", B = "week", b = "month", T = "quarter", S = "year", C = "date", x = "Invalid Date", N = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, H = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(f) {
|
1506
|
+
var c = ["th", "st", "nd", "rd"], a = f % 100;
|
1507
|
+
return "[" + f + (c[(a - 20) % 10] || c[a] || c[0]) + "]";
|
1508
|
+
} }, M = function(f, c, a) {
|
1509
|
+
var l = String(f);
|
1510
|
+
return !l || l.length >= c ? f : "" + Array(c + 1 - l.length).join(a) + f;
|
1511
|
+
}, I = { s: M, z: function(f) {
|
1512
|
+
var c = -f.utcOffset(), a = Math.abs(c), l = Math.floor(a / 60), u = a % 60;
|
1513
|
+
return (c <= 0 ? "+" : "-") + M(l, 2, "0") + ":" + M(u, 2, "0");
|
1514
|
+
}, m: function f(c, a) {
|
1515
|
+
if (c.date() < a.date()) return -f(a, c);
|
1516
|
+
var l = 12 * (a.year() - c.year()) + (a.month() - c.month()), u = c.clone().add(l, b), _ = a - u < 0, p = c.clone().add(l + (_ ? -1 : 1), b);
|
1517
|
+
return +(-(l + (a - u) / (_ ? u - p : p - u)) || 0);
|
1518
|
+
}, a: function(f) {
|
1519
|
+
return f < 0 ? Math.ceil(f) || 0 : Math.floor(f);
|
1520
|
+
}, p: function(f) {
|
1521
|
+
return { M: b, y: S, w: B, d: m, D: C, h: d, m: h, s: i, ms: o, Q: T }[f] || String(f || "").toLowerCase().replace(/s$/, "");
|
1522
|
+
}, u: function(f) {
|
1523
|
+
return f === void 0;
|
1524
|
+
} }, $ = "en", P = {};
|
1525
|
+
P[$] = H;
|
1526
|
+
var se = "$isDayjsObject", V = function(f) {
|
1527
|
+
return f instanceof oe || !(!f || !f[se]);
|
1528
|
+
}, ie = function f(c, a, l) {
|
1529
|
+
var u;
|
1530
|
+
if (!c) return $;
|
1531
|
+
if (typeof c == "string") {
|
1532
|
+
var _ = c.toLowerCase();
|
1533
|
+
P[_] && (u = _), a && (P[_] = a, u = _);
|
1534
|
+
var p = c.split("-");
|
1535
|
+
if (!u && p.length > 1) return f(p[0]);
|
1536
|
+
} else {
|
1537
|
+
var k = c.name;
|
1538
|
+
P[k] = c, u = k;
|
1539
|
+
}
|
1540
|
+
return !l && u && ($ = u), u || !l && $;
|
1541
|
+
}, w = function(f, c) {
|
1542
|
+
if (V(f)) return f.clone();
|
1543
|
+
var a = typeof c == "object" ? c : {};
|
1544
|
+
return a.date = f, a.args = arguments, new oe(a);
|
1545
|
+
}, g = I;
|
1546
|
+
g.l = ie, g.i = V, g.w = function(f, c) {
|
1547
|
+
return w(f, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
|
1548
|
+
};
|
1549
|
+
var oe = function() {
|
1550
|
+
function f(a) {
|
1551
|
+
this.$L = ie(a.locale, null, !0), this.parse(a), this.$x = this.$x || a.x || {}, this[se] = !0;
|
1552
|
+
}
|
1553
|
+
var c = f.prototype;
|
1554
|
+
return c.parse = function(a) {
|
1555
|
+
this.$d = function(l) {
|
1556
|
+
var u = l.date, _ = l.utc;
|
1557
|
+
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
1558
|
+
if (g.u(u)) return /* @__PURE__ */ new Date();
|
1559
|
+
if (u instanceof Date) return new Date(u);
|
1560
|
+
if (typeof u == "string" && !/Z$/i.test(u)) {
|
1561
|
+
var p = u.match(N);
|
1562
|
+
if (p) {
|
1563
|
+
var k = p[2] - 1 || 0, R = (p[7] || "0").substring(0, 3);
|
1564
|
+
return _ ? new Date(Date.UTC(p[1], k, p[3] || 1, p[4] || 0, p[5] || 0, p[6] || 0, R)) : new Date(p[1], k, p[3] || 1, p[4] || 0, p[5] || 0, p[6] || 0, R);
|
1565
|
+
}
|
1566
|
+
}
|
1567
|
+
return new Date(u);
|
1568
|
+
}(a), this.init();
|
1569
|
+
}, c.init = function() {
|
1570
|
+
var a = this.$d;
|
1571
|
+
this.$y = a.getFullYear(), this.$M = a.getMonth(), this.$D = a.getDate(), this.$W = a.getDay(), this.$H = a.getHours(), this.$m = a.getMinutes(), this.$s = a.getSeconds(), this.$ms = a.getMilliseconds();
|
1572
|
+
}, c.$utils = function() {
|
1573
|
+
return g;
|
1574
|
+
}, c.isValid = function() {
|
1575
|
+
return this.$d.toString() !== x;
|
1576
|
+
}, c.isSame = function(a, l) {
|
1577
|
+
var u = w(a);
|
1578
|
+
return this.startOf(l) <= u && u <= this.endOf(l);
|
1579
|
+
}, c.isAfter = function(a, l) {
|
1580
|
+
return w(a) < this.startOf(l);
|
1581
|
+
}, c.isBefore = function(a, l) {
|
1582
|
+
return this.endOf(l) < w(a);
|
1583
|
+
}, c.$g = function(a, l, u) {
|
1584
|
+
return g.u(a) ? this[l] : this.set(u, a);
|
1585
|
+
}, c.unix = function() {
|
1586
|
+
return Math.floor(this.valueOf() / 1e3);
|
1587
|
+
}, c.valueOf = function() {
|
1588
|
+
return this.$d.getTime();
|
1589
|
+
}, c.startOf = function(a, l) {
|
1590
|
+
var u = this, _ = !!g.u(l) || l, p = g.p(a), k = function(z, v) {
|
1591
|
+
var F = g.w(u.$u ? Date.UTC(u.$y, v, z) : new Date(u.$y, v, z), u);
|
1592
|
+
return _ ? F : F.endOf(m);
|
1593
|
+
}, R = function(z, v) {
|
1594
|
+
return g.w(u.toDate()[z].apply(u.toDate("s"), (_ ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(v)), u);
|
1595
|
+
}, y = this.$W, E = this.$M, L = this.$D, J = "set" + (this.$u ? "UTC" : "");
|
1596
|
+
switch (p) {
|
1597
|
+
case S:
|
1598
|
+
return _ ? k(1, 0) : k(31, 11);
|
1599
|
+
case b:
|
1600
|
+
return _ ? k(1, E) : k(0, E + 1);
|
1601
|
+
case B:
|
1602
|
+
var W = this.$locale().weekStart || 0, Z = (y < W ? y + 7 : y) - W;
|
1603
|
+
return k(_ ? L - Z : L + (6 - Z), E);
|
1604
|
+
case m:
|
1605
|
+
case C:
|
1606
|
+
return R(J + "Hours", 0);
|
1607
|
+
case d:
|
1608
|
+
return R(J + "Minutes", 1);
|
1609
|
+
case h:
|
1610
|
+
return R(J + "Seconds", 2);
|
1611
|
+
case i:
|
1612
|
+
return R(J + "Milliseconds", 3);
|
1613
|
+
default:
|
1614
|
+
return this.clone();
|
1615
|
+
}
|
1616
|
+
}, c.endOf = function(a) {
|
1617
|
+
return this.startOf(a, !1);
|
1618
|
+
}, c.$set = function(a, l) {
|
1619
|
+
var u, _ = g.p(a), p = "set" + (this.$u ? "UTC" : ""), k = (u = {}, u[m] = p + "Date", u[C] = p + "Date", u[b] = p + "Month", u[S] = p + "FullYear", u[d] = p + "Hours", u[h] = p + "Minutes", u[i] = p + "Seconds", u[o] = p + "Milliseconds", u)[_], R = _ === m ? this.$D + (l - this.$W) : l;
|
1620
|
+
if (_ === b || _ === S) {
|
1621
|
+
var y = this.clone().set(C, 1);
|
1622
|
+
y.$d[k](R), y.init(), this.$d = y.set(C, Math.min(this.$D, y.daysInMonth())).$d;
|
1623
|
+
} else k && this.$d[k](R);
|
1624
|
+
return this.init(), this;
|
1625
|
+
}, c.set = function(a, l) {
|
1626
|
+
return this.clone().$set(a, l);
|
1627
|
+
}, c.get = function(a) {
|
1628
|
+
return this[g.p(a)]();
|
1629
|
+
}, c.add = function(a, l) {
|
1630
|
+
var u, _ = this;
|
1631
|
+
a = Number(a);
|
1632
|
+
var p = g.p(l), k = function(E) {
|
1633
|
+
var L = w(_);
|
1634
|
+
return g.w(L.date(L.date() + Math.round(E * a)), _);
|
1635
|
+
};
|
1636
|
+
if (p === b) return this.set(b, this.$M + a);
|
1637
|
+
if (p === S) return this.set(S, this.$y + a);
|
1638
|
+
if (p === m) return k(1);
|
1639
|
+
if (p === B) return k(7);
|
1640
|
+
var R = (u = {}, u[h] = r, u[d] = s, u[i] = n, u)[p] || 1, y = this.$d.getTime() + a * R;
|
1641
|
+
return g.w(y, this);
|
1642
|
+
}, c.subtract = function(a, l) {
|
1643
|
+
return this.add(-1 * a, l);
|
1644
|
+
}, c.format = function(a) {
|
1645
|
+
var l = this, u = this.$locale();
|
1646
|
+
if (!this.isValid()) return u.invalidDate || x;
|
1647
|
+
var _ = a || "YYYY-MM-DDTHH:mm:ssZ", p = g.z(this), k = this.$H, R = this.$m, y = this.$M, E = u.weekdays, L = u.months, J = u.meridiem, W = function(v, F, Q, ae) {
|
1648
|
+
return v && (v[F] || v(l, _)) || Q[F].slice(0, ae);
|
1649
|
+
}, Z = function(v) {
|
1650
|
+
return g.s(k % 12 || 12, v, "0");
|
1651
|
+
}, z = J || function(v, F, Q) {
|
1652
|
+
var ae = v < 12 ? "AM" : "PM";
|
1653
|
+
return Q ? ae.toLowerCase() : ae;
|
1654
|
+
};
|
1655
|
+
return _.replace(Y, function(v, F) {
|
1656
|
+
return F || function(Q) {
|
1657
|
+
switch (Q) {
|
1658
|
+
case "YY":
|
1659
|
+
return String(l.$y).slice(-2);
|
1660
|
+
case "YYYY":
|
1661
|
+
return g.s(l.$y, 4, "0");
|
1662
|
+
case "M":
|
1663
|
+
return y + 1;
|
1664
|
+
case "MM":
|
1665
|
+
return g.s(y + 1, 2, "0");
|
1666
|
+
case "MMM":
|
1667
|
+
return W(u.monthsShort, y, L, 3);
|
1668
|
+
case "MMMM":
|
1669
|
+
return W(L, y);
|
1670
|
+
case "D":
|
1671
|
+
return l.$D;
|
1672
|
+
case "DD":
|
1673
|
+
return g.s(l.$D, 2, "0");
|
1674
|
+
case "d":
|
1675
|
+
return String(l.$W);
|
1676
|
+
case "dd":
|
1677
|
+
return W(u.weekdaysMin, l.$W, E, 2);
|
1678
|
+
case "ddd":
|
1679
|
+
return W(u.weekdaysShort, l.$W, E, 3);
|
1680
|
+
case "dddd":
|
1681
|
+
return E[l.$W];
|
1682
|
+
case "H":
|
1683
|
+
return String(k);
|
1684
|
+
case "HH":
|
1685
|
+
return g.s(k, 2, "0");
|
1686
|
+
case "h":
|
1687
|
+
return Z(1);
|
1688
|
+
case "hh":
|
1689
|
+
return Z(2);
|
1690
|
+
case "a":
|
1691
|
+
return z(k, R, !0);
|
1692
|
+
case "A":
|
1693
|
+
return z(k, R, !1);
|
1694
|
+
case "m":
|
1695
|
+
return String(R);
|
1696
|
+
case "mm":
|
1697
|
+
return g.s(R, 2, "0");
|
1698
|
+
case "s":
|
1699
|
+
return String(l.$s);
|
1700
|
+
case "ss":
|
1701
|
+
return g.s(l.$s, 2, "0");
|
1702
|
+
case "SSS":
|
1703
|
+
return g.s(l.$ms, 3, "0");
|
1704
|
+
case "Z":
|
1705
|
+
return p;
|
1706
|
+
}
|
1707
|
+
return null;
|
1708
|
+
}(v) || p.replace(":", "");
|
1709
|
+
});
|
1710
|
+
}, c.utcOffset = function() {
|
1711
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
1712
|
+
}, c.diff = function(a, l, u) {
|
1713
|
+
var _, p = this, k = g.p(l), R = w(a), y = (R.utcOffset() - this.utcOffset()) * r, E = this - R, L = function() {
|
1714
|
+
return g.m(p, R);
|
1715
|
+
};
|
1716
|
+
switch (k) {
|
1717
|
+
case S:
|
1718
|
+
_ = L() / 12;
|
1719
|
+
break;
|
1720
|
+
case b:
|
1721
|
+
_ = L();
|
1722
|
+
break;
|
1723
|
+
case T:
|
1724
|
+
_ = L() / 3;
|
1725
|
+
break;
|
1726
|
+
case B:
|
1727
|
+
_ = (E - y) / 6048e5;
|
1728
|
+
break;
|
1729
|
+
case m:
|
1730
|
+
_ = (E - y) / 864e5;
|
1731
|
+
break;
|
1732
|
+
case d:
|
1733
|
+
_ = E / s;
|
1734
|
+
break;
|
1735
|
+
case h:
|
1736
|
+
_ = E / r;
|
1737
|
+
break;
|
1738
|
+
case i:
|
1739
|
+
_ = E / n;
|
1740
|
+
break;
|
1741
|
+
default:
|
1742
|
+
_ = E;
|
1743
|
+
}
|
1744
|
+
return u ? _ : g.a(_);
|
1745
|
+
}, c.daysInMonth = function() {
|
1746
|
+
return this.endOf(b).$D;
|
1747
|
+
}, c.$locale = function() {
|
1748
|
+
return P[this.$L];
|
1749
|
+
}, c.locale = function(a, l) {
|
1750
|
+
if (!a) return this.$L;
|
1751
|
+
var u = this.clone(), _ = ie(a, l, !0);
|
1752
|
+
return _ && (u.$L = _), u;
|
1753
|
+
}, c.clone = function() {
|
1754
|
+
return g.w(this.$d, this);
|
1755
|
+
}, c.toDate = function() {
|
1756
|
+
return new Date(this.valueOf());
|
1757
|
+
}, c.toJSON = function() {
|
1758
|
+
return this.isValid() ? this.toISOString() : null;
|
1759
|
+
}, c.toISOString = function() {
|
1760
|
+
return this.$d.toISOString();
|
1761
|
+
}, c.toString = function() {
|
1762
|
+
return this.$d.toUTCString();
|
1763
|
+
}, f;
|
1764
|
+
}(), we = oe.prototype;
|
1765
|
+
return w.prototype = we, [["$ms", o], ["$s", i], ["$m", h], ["$H", d], ["$W", m], ["$M", b], ["$y", S], ["$D", C]].forEach(function(f) {
|
1766
|
+
we[f[1]] = function(c) {
|
1767
|
+
return this.$g(c, f[0], f[1]);
|
1768
|
+
};
|
1769
|
+
}), w.extend = function(f, c) {
|
1770
|
+
return f.$i || (f(c, oe, w), f.$i = !0), w;
|
1771
|
+
}, w.locale = ie, w.isDayjs = V, w.unix = function(f) {
|
1772
|
+
return w(1e3 * f);
|
1773
|
+
}, w.en = P[$], w.Ls = P, w.p = {}, w;
|
1774
|
+
});
|
1775
|
+
})(nt);
|
1776
|
+
var vn = nt.exports;
|
1777
|
+
const Dn = /* @__PURE__ */ ft(vn);
|
1778
|
+
function Ln(t) {
|
1779
|
+
return t.toLowerCase();
|
1780
|
+
}
|
1781
|
+
var Pn = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], $n = /[^A-Z0-9]+/gi;
|
1782
|
+
function Kn(t, e) {
|
1783
|
+
e === void 0 && (e = {});
|
1784
|
+
for (var n = e.splitRegexp, r = n === void 0 ? Pn : n, s = e.stripRegexp, o = s === void 0 ? $n : s, i = e.transform, h = i === void 0 ? Ln : i, d = e.delimiter, m = d === void 0 ? " " : d, B = De(De(t, r, "$1\0$2"), o, "\0"), b = 0, T = B.length; B.charAt(b) === "\0"; )
|
1785
|
+
b++;
|
1786
|
+
for (; B.charAt(T - 1) === "\0"; )
|
1787
|
+
T--;
|
1788
|
+
return B.slice(b, T).split("\0").map(h).join(m);
|
1789
|
+
}
|
1790
|
+
function De(t, e, n) {
|
1791
|
+
return e instanceof RegExp ? t.replace(e, n) : e.reduce(function(r, s) {
|
1792
|
+
return r.replace(s, n);
|
1793
|
+
}, t);
|
1794
|
+
}
|
1795
|
+
function xn(t) {
|
1796
|
+
return t.charAt(0).toUpperCase() + t.substr(1);
|
1797
|
+
}
|
1798
|
+
function Hn(t, e) {
|
1799
|
+
var n = t.toLowerCase();
|
1800
|
+
return e === 0 ? xn(n) : n;
|
1801
|
+
}
|
1802
|
+
function le(t, e) {
|
1803
|
+
return e === void 0 && (e = {}), Kn(t, lt({ delimiter: " ", transform: Hn }, e));
|
1804
|
+
}
|
1805
|
+
function Yn(t, e = []) {
|
1806
|
+
const n = JSON.parse(JSON.stringify(t));
|
1807
|
+
return e.length > 0 && e.forEach((r) => {
|
1808
|
+
n[r] !== void 0 && delete n[r];
|
1809
|
+
}), n;
|
1810
|
+
}
|
1811
|
+
function Fn(t, e) {
|
1812
|
+
var r, s, o, i, h, d, m;
|
1813
|
+
const n = e ? Yn(e) : void 0;
|
1814
|
+
return {
|
1815
|
+
_id: (n == null ? void 0 : n._id) ?? "",
|
1816
|
+
notifyUrl: (n == null ? void 0 : n.notifyUrl) ?? "",
|
1817
|
+
store: {
|
1818
|
+
id: (n == null ? void 0 : n.store.id) ?? "",
|
1819
|
+
event: (n == null ? void 0 : n.store.event) ?? G.F_PAYOUT_FOR.Enum.ORDERING,
|
1820
|
+
bank: {
|
1821
|
+
name: ((r = n == null ? void 0 : n.store.bank) == null ? void 0 : r.name) ?? be.bankNameOptions()[0].value,
|
1822
|
+
type: ((s = n == null ? void 0 : n.store.bank) == null ? void 0 : s.type) ?? be.bankTypeOptions()[0].value,
|
1823
|
+
holderName: ((o = n == null ? void 0 : n.store.bank) == null ? void 0 : o.holderName) ?? "",
|
1824
|
+
accountNumber: ((i = n == null ? void 0 : n.store.bank) == null ? void 0 : i.accountNumber) ?? ""
|
1825
|
+
},
|
1826
|
+
keyPerson: {
|
1827
|
+
name: ((h = n == null ? void 0 : n.store.keyPerson) == null ? void 0 : h.name) ?? "",
|
1828
|
+
phone: ((d = n == null ? void 0 : n.store.keyPerson) == null ? void 0 : d.phone) ?? "",
|
1829
|
+
email: ((m = n == null ? void 0 : n.store.keyPerson) == null ? void 0 : m.email) ?? ""
|
1830
|
+
},
|
1831
|
+
ssm: (n == null ? void 0 : n.store.ssm) ?? "",
|
1832
|
+
bankStatement: (n == null ? void 0 : n.store.bankStatement) ?? "",
|
1833
|
+
exteriorPhoto: (n == null ? void 0 : n.store.exteriorPhoto) ?? ""
|
1834
|
+
},
|
1835
|
+
enable: (n == null ? void 0 : n.enable) ?? !1,
|
1836
|
+
methods: (n == null ? void 0 : n.methods) ?? [],
|
1837
|
+
status: (n == null ? void 0 : n.status) ?? G.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW,
|
1838
|
+
businessId: t
|
1839
|
+
};
|
1840
|
+
}
|
1841
|
+
function jn(t) {
|
1842
|
+
return t.reduce(
|
1843
|
+
(e, n) => ([G.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW].some((r) => r == n.status) ? e.NEW.push({
|
1844
|
+
...n
|
1845
|
+
}) : e.EXISTED.push({
|
1846
|
+
...n
|
1847
|
+
}), e),
|
1848
|
+
{
|
1849
|
+
NEW: [],
|
1850
|
+
EXISTED: []
|
1851
|
+
}
|
1852
|
+
);
|
1853
|
+
}
|
1854
|
+
async function _e(t) {
|
1855
|
+
await ne.delete(t);
|
1856
|
+
}
|
1857
|
+
async function Le(t, e, n) {
|
1858
|
+
const r = Dn().toISOString();
|
1859
|
+
if (t.restaurantId)
|
1860
|
+
return await ne.update(
|
1861
|
+
`restaurant/${t.restaurantId}/documents/${e}/${r}.pdf`,
|
1862
|
+
n
|
1863
|
+
);
|
1864
|
+
if (t.businessId)
|
1865
|
+
return await ne.update(
|
1866
|
+
`business/${t.businessId}/documents/${e}/${r}.pdf`,
|
1867
|
+
n
|
1868
|
+
);
|
1869
|
+
throw "Not implemented";
|
1870
|
+
}
|
1871
|
+
async function Gn(t, e) {
|
1872
|
+
if (t.restaurantId)
|
1873
|
+
return await ne.update(
|
1874
|
+
`restaurant/${t.restaurantId}/exterior/photo`,
|
1875
|
+
e
|
1876
|
+
);
|
1877
|
+
if (t.businessId)
|
1878
|
+
return await ne.update(
|
1879
|
+
`business/${t.businessId}/exterior/photo`,
|
1880
|
+
e
|
1881
|
+
);
|
1882
|
+
throw "Not implemented";
|
1883
|
+
}
|
1884
|
+
async function Vn(t, e, n) {
|
1885
|
+
e.store.ssm && n.newSSM && await _e(e.store.ssm), e.store.bankStatement && n.newBankStatement && await _e(e.store.bankStatement), e.store.exteriorPhoto && n.newExteriorPhoto && await _e(e.store.exteriorPhoto);
|
1886
|
+
let r = e.methods;
|
1887
|
+
n.payoutSetting.methods.length > 0 && (r = n.payoutSetting.methods);
|
1888
|
+
let s = e.store.ssm || "";
|
1889
|
+
n.newSSM && (s = await Le(t, "ssm", n.newSSM));
|
1890
|
+
let o = e.store.bankStatement || "";
|
1891
|
+
n.newBankStatement && (o = await Le(
|
1892
|
+
t,
|
1893
|
+
"bankStatement",
|
1894
|
+
n.newBankStatement
|
1895
|
+
));
|
1896
|
+
let i = e.store.exteriorPhoto || "";
|
1897
|
+
return n.newExteriorPhoto && (i = await Gn(
|
1898
|
+
t,
|
1899
|
+
n.newExteriorPhoto
|
1900
|
+
)), {
|
1901
|
+
...e,
|
1902
|
+
methods: r,
|
1903
|
+
store: {
|
1904
|
+
...e.store,
|
1905
|
+
id: n.payoutSetting.store.id,
|
1906
|
+
keyPerson: n.payoutSetting.store.keyPerson,
|
1907
|
+
bank: n.payoutSetting.store.bank,
|
1908
|
+
ssm: s,
|
1909
|
+
bankStatement: o,
|
1910
|
+
exteriorPhoto: i,
|
1911
|
+
event: n.payoutSetting.store.event
|
1912
|
+
},
|
1913
|
+
status: G.F_PAYOUT_ACCOUNT_STATUS.Enum.PENDING,
|
1914
|
+
notifyUrl: n.payoutSetting.store.event === G.F_PAYOUT_FOR.Enum.MARKETING ? "http://marketing-api-service:3000/customer/callback/store" : "http://order-backend:3000/backend/payment"
|
1915
|
+
};
|
1916
|
+
}
|
1917
|
+
const be = {
|
1918
|
+
bankNameOptions() {
|
1919
|
+
const t = _t().currentCountry.value, e = tt(t).F_BANK_NAME;
|
1920
|
+
return Object.values(e).map((n) => ({
|
1921
|
+
label: le(n),
|
1922
|
+
value: n
|
1923
|
+
}));
|
1924
|
+
},
|
1925
|
+
bankTypeOptions() {
|
1926
|
+
return Object.values(G.F_BANK_TYPE.Values).map((t) => ({
|
1927
|
+
label: le(t),
|
1928
|
+
value: t
|
1929
|
+
}));
|
1930
|
+
},
|
1931
|
+
storeEventOptions() {
|
1932
|
+
return Object.values(G.F_PAYOUT_FOR.Values).map((t) => ({
|
1933
|
+
label: le(t),
|
1934
|
+
value: t
|
1935
|
+
}));
|
1936
|
+
},
|
1937
|
+
statusOptions() {
|
1938
|
+
return Object.values(G.F_PAYOUT_ACCOUNT_STATUS.Values).map((t) => ({
|
1939
|
+
label: le(t),
|
1940
|
+
value: t
|
1941
|
+
}));
|
1942
|
+
}
|
1943
|
+
}, Jn = {
|
1944
|
+
mergeData: Vn,
|
1945
|
+
initPayoutAccount: Fn,
|
1946
|
+
groupByStatus: jn,
|
1947
|
+
PayoutConfig: be
|
1948
|
+
};
|
1949
|
+
export {
|
1950
|
+
be as P,
|
1951
|
+
Jn as a,
|
1952
|
+
Yn as c
|
1953
|
+
};
|