bt-core-app 2.2.39 → 2.2.40
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/bt-core/core/node_modules/@firebase/app/dist/esm/index.esm.mjs +577 -0
- package/dist/bt-core/core/node_modules/@firebase/component/dist/esm/index.esm.mjs +275 -0
- package/dist/bt-core/core/node_modules/@firebase/installations/dist/esm/index.esm.mjs +763 -0
- package/dist/bt-core/core/node_modules/@firebase/logger/dist/esm/index.esm.mjs +101 -0
- package/dist/bt-core/core/node_modules/@firebase/messaging/dist/esm/index.esm.mjs +1278 -0
- package/dist/bt-core/core/node_modules/@firebase/util/dist/index.esm.mjs +444 -0
- package/dist/bt-core/core/node_modules/@firebase/util/dist/postinstall.mjs +5 -0
- package/dist/bt-core/core/node_modules/@mdi/js/mdi.mjs +60 -59
- package/dist/bt-core/core/node_modules/firebase/app/dist/esm/index.esm.mjs +32 -0
- package/dist/bt-core/core/node_modules/idb/build/index.mjs +58 -0
- package/dist/bt-core/core/node_modules/idb/build/wrap-idb-value.mjs +101 -0
- package/dist/components/BT-Firebase-Notification.vue.d.ts +2 -0
- package/dist/components/BT-Firebase-Notification.vue.mjs +106 -0
- package/dist/components/BT-Firebase-Notification.vue2.mjs +4 -0
- package/dist/components.mjs +18 -16
- package/dist/composables/devices.d.ts +1 -0
- package/dist/composables/devices.mjs +12 -7
- package/dist/composables/firebase.d.ts +29 -0
- package/dist/composables/firebase.mjs +80 -0
- package/dist/composables/icons.mjs +58 -57
- package/dist/composables.mjs +200 -195
- package/dist/core.d.ts +2 -0
- package/dist/core2.mjs +89 -88
- package/dist/index-components.d.ts +2 -1
- package/dist/index-composables.d.ts +3 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,1278 @@
|
|
|
1
|
+
import { onIdChange as X } from "../../../installations/dist/esm/index.esm.mjs";
|
|
2
|
+
import { Component as O } from "../../../component/dist/esm/index.esm.mjs";
|
|
3
|
+
import { openDB as G, deleteDB as I } from "../../../../idb/build/index.mjs";
|
|
4
|
+
import { getModularInstance as g, ErrorFactory as Z, validateIndexedDBOpenable as ee, isIndexedDBAvailable as te, areCookiesEnabled as ne } from "../../../util/dist/index.esm.mjs";
|
|
5
|
+
import { _registerComponent as C, registerVersion as N, _getProvider as ie, getApp as oe } from "../../../app/dist/esm/index.esm.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2019 Google LLC
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License.
|
|
12
|
+
* You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
const re = "/firebase-messaging-sw.js", ae = "/firebase-cloud-messaging-push-scope", V = "BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4", se = "https://fcmregistrations.googleapis.com/v1", q = "google.c.a.c_id", ce = "google.c.a.c_l", de = "google.c.a.ts", ue = "google.c.a.e", M = 1e4;
|
|
23
|
+
var F;
|
|
24
|
+
(function(e) {
|
|
25
|
+
e[e.DATA_MESSAGE = 1] = "DATA_MESSAGE", e[e.DISPLAY_NOTIFICATION = 3] = "DISPLAY_NOTIFICATION";
|
|
26
|
+
})(F || (F = {}));
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2018 Google LLC
|
|
30
|
+
*
|
|
31
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
32
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
33
|
+
*
|
|
34
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
35
|
+
*
|
|
36
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
37
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
38
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
39
|
+
* the License.
|
|
40
|
+
*/
|
|
41
|
+
var h;
|
|
42
|
+
(function(e) {
|
|
43
|
+
e.PUSH_RECEIVED = "push-received", e.NOTIFICATION_CLICKED = "notification-clicked", e.FID_REGISTERED = "fid-registered";
|
|
44
|
+
})(h || (h = {}));
|
|
45
|
+
/**
|
|
46
|
+
* @license
|
|
47
|
+
* Copyright 2017 Google LLC
|
|
48
|
+
*
|
|
49
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
50
|
+
* you may not use this file except in compliance with the License.
|
|
51
|
+
* You may obtain a copy of the License at
|
|
52
|
+
*
|
|
53
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
54
|
+
*
|
|
55
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
56
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
57
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
58
|
+
* See the License for the specific language governing permissions and
|
|
59
|
+
* limitations under the License.
|
|
60
|
+
*/
|
|
61
|
+
function u(e) {
|
|
62
|
+
const t = new Uint8Array(e);
|
|
63
|
+
return btoa(String.fromCharCode(...t)).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
64
|
+
}
|
|
65
|
+
function J(e) {
|
|
66
|
+
const t = "=".repeat((4 - e.length % 4) % 4), n = (e + t).replace(/\-/g, "+").replace(/_/g, "/"), i = atob(n), o = new Uint8Array(i.length);
|
|
67
|
+
for (let r = 0; r < i.length; ++r)
|
|
68
|
+
o[r] = i.charCodeAt(r);
|
|
69
|
+
return o;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @license
|
|
73
|
+
* Copyright 2019 Google LLC
|
|
74
|
+
*
|
|
75
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
76
|
+
* you may not use this file except in compliance with the License.
|
|
77
|
+
* You may obtain a copy of the License at
|
|
78
|
+
*
|
|
79
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
80
|
+
*
|
|
81
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
82
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
83
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
84
|
+
* See the License for the specific language governing permissions and
|
|
85
|
+
* limitations under the License.
|
|
86
|
+
*/
|
|
87
|
+
const v = "fcm_token_details_db", fe = 5, K = "fcm_token_object_Store";
|
|
88
|
+
async function le(e) {
|
|
89
|
+
if ("databases" in indexedDB && !(await indexedDB.databases()).map((r) => r.name).includes(v))
|
|
90
|
+
return null;
|
|
91
|
+
let t = null;
|
|
92
|
+
return (await G(v, fe, {
|
|
93
|
+
upgrade: async (i, o, r, a) => {
|
|
94
|
+
if (o < 2 || !i.objectStoreNames.contains(K))
|
|
95
|
+
return;
|
|
96
|
+
const d = a.objectStore(K), p = await d.index("fcmSenderId").get(e);
|
|
97
|
+
if (await d.clear(), !!p) {
|
|
98
|
+
if (o === 2) {
|
|
99
|
+
const s = p;
|
|
100
|
+
if (!s.auth || !s.p256dh || !s.endpoint)
|
|
101
|
+
return;
|
|
102
|
+
t = {
|
|
103
|
+
token: s.fcmToken,
|
|
104
|
+
createTime: s.createTime ?? Date.now(),
|
|
105
|
+
subscriptionOptions: {
|
|
106
|
+
auth: s.auth,
|
|
107
|
+
p256dh: s.p256dh,
|
|
108
|
+
endpoint: s.endpoint,
|
|
109
|
+
swScope: s.swScope,
|
|
110
|
+
vapidKey: typeof s.vapidKey == "string" ? s.vapidKey : u(s.vapidKey)
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
} else if (o === 3) {
|
|
114
|
+
const s = p;
|
|
115
|
+
t = {
|
|
116
|
+
token: s.fcmToken,
|
|
117
|
+
createTime: s.createTime,
|
|
118
|
+
subscriptionOptions: {
|
|
119
|
+
auth: u(s.auth),
|
|
120
|
+
p256dh: u(s.p256dh),
|
|
121
|
+
endpoint: s.endpoint,
|
|
122
|
+
swScope: s.swScope,
|
|
123
|
+
vapidKey: u(s.vapidKey)
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
} else if (o === 4) {
|
|
127
|
+
const s = p;
|
|
128
|
+
t = {
|
|
129
|
+
token: s.fcmToken,
|
|
130
|
+
createTime: s.createTime,
|
|
131
|
+
subscriptionOptions: {
|
|
132
|
+
auth: u(s.auth),
|
|
133
|
+
p256dh: u(s.p256dh),
|
|
134
|
+
endpoint: s.endpoint,
|
|
135
|
+
swScope: s.swScope,
|
|
136
|
+
vapidKey: u(s.vapidKey)
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
})).close(), await I(v), await I("fcm_vapid_details_db"), await I("undefined"), pe(t) ? t : null;
|
|
143
|
+
}
|
|
144
|
+
function pe(e) {
|
|
145
|
+
if (!e || !e.subscriptionOptions)
|
|
146
|
+
return !1;
|
|
147
|
+
const { subscriptionOptions: t } = e;
|
|
148
|
+
return typeof e.createTime == "number" && e.createTime > 0 && typeof e.token == "string" && e.token.length > 0 && typeof t.auth == "string" && t.auth.length > 0 && typeof t.p256dh == "string" && t.p256dh.length > 0 && typeof t.endpoint == "string" && t.endpoint.length > 0 && typeof t.swScope == "string" && t.swScope.length > 0 && typeof t.vapidKey == "string" && t.vapidKey.length > 0;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @license
|
|
152
|
+
* Copyright 2017 Google LLC
|
|
153
|
+
*
|
|
154
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
155
|
+
* you may not use this file except in compliance with the License.
|
|
156
|
+
* You may obtain a copy of the License at
|
|
157
|
+
*
|
|
158
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
159
|
+
*
|
|
160
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
161
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
162
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
163
|
+
* See the License for the specific language governing permissions and
|
|
164
|
+
* limitations under the License.
|
|
165
|
+
*/
|
|
166
|
+
const he = {
|
|
167
|
+
"missing-app-config-values": 'Missing App configuration value: "{$valueName}"',
|
|
168
|
+
"only-available-in-window": "This method is available in a Window context.",
|
|
169
|
+
"only-available-in-sw": "This method is available in a service worker context.",
|
|
170
|
+
"permission-default": "The notification permission was not granted and dismissed instead.",
|
|
171
|
+
"permission-blocked": "The notification permission was not granted and blocked instead.",
|
|
172
|
+
"unsupported-browser": "This browser doesn't support the API's required to use the Firebase SDK.",
|
|
173
|
+
"indexed-db-unsupported": "This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)",
|
|
174
|
+
"failed-service-worker-registration": "We are unable to register the default service worker. {$browserErrorMessage}",
|
|
175
|
+
"token-subscribe-failed": "A problem occurred while subscribing the user to FCM: {$errorInfo}",
|
|
176
|
+
"token-subscribe-no-token": "FCM returned no token when subscribing the user to push.",
|
|
177
|
+
"fid-registration-failed": "A problem occurred while creating an FCM registration via FID: {$errorInfo}",
|
|
178
|
+
"fid-unregister-failed": "A problem occurred while unregistering the FCM registration via FID: {$errorInfo}",
|
|
179
|
+
"fid-registration-idb-schema-unavailable": "Unable to read or persist FID registration metadata because the messaging IndexedDB schema is unavailable (for example, the database could not be upgraded to the latest version).",
|
|
180
|
+
"token-unsubscribe-failed": "A problem occurred while unsubscribing the user from FCM: {$errorInfo}",
|
|
181
|
+
"token-update-failed": "A problem occurred while updating the user from FCM: {$errorInfo}",
|
|
182
|
+
"token-update-no-token": "FCM returned no token when updating the user to push.",
|
|
183
|
+
"use-sw-after-get-token": "The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",
|
|
184
|
+
"invalid-sw-registration": "The input to useServiceWorker() must be a ServiceWorkerRegistration.",
|
|
185
|
+
"invalid-bg-handler": "The input to setBackgroundMessageHandler() must be a function.",
|
|
186
|
+
"invalid-vapid-key": "The public VAPID key must be a string.",
|
|
187
|
+
"use-vapid-key-after-get-token": "The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",
|
|
188
|
+
"invalid-on-registered-handler": "No onRegistered callback handler was provided or registered. Implement onRegistered() before register()."
|
|
189
|
+
}, c = new Z("messaging", "Messaging", he);
|
|
190
|
+
/**
|
|
191
|
+
* @license
|
|
192
|
+
* Copyright 2019 Google LLC
|
|
193
|
+
*
|
|
194
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
|
+
* you may not use this file except in compliance with the License.
|
|
196
|
+
* You may obtain a copy of the License at
|
|
197
|
+
*
|
|
198
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
199
|
+
*
|
|
200
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
202
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
* See the License for the specific language governing permissions and
|
|
204
|
+
* limitations under the License.
|
|
205
|
+
*/
|
|
206
|
+
const P = "firebase-messaging-database", H = 2, l = "firebase-messaging-store", f = "firebase-messaging-fid-registration-store", ge = { openDB: G, deleteDB: I };
|
|
207
|
+
let x = ge, y = null;
|
|
208
|
+
function we(e, t, n) {
|
|
209
|
+
switch (t) {
|
|
210
|
+
case 0:
|
|
211
|
+
if (e.createObjectStore(l), n === 1)
|
|
212
|
+
break;
|
|
213
|
+
case 1:
|
|
214
|
+
n === 2 && e.createObjectStore(f);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function j(e) {
|
|
218
|
+
return {
|
|
219
|
+
upgrade: (t, n) => {
|
|
220
|
+
we(t, n, e);
|
|
221
|
+
},
|
|
222
|
+
blocked: () => {
|
|
223
|
+
},
|
|
224
|
+
blocking: (t, n, i) => {
|
|
225
|
+
var o;
|
|
226
|
+
y = null, (o = i.target) == null || o.close();
|
|
227
|
+
},
|
|
228
|
+
terminated: () => {
|
|
229
|
+
y = null;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function w() {
|
|
234
|
+
return y || (y = x.openDB(P, H, j(2)).catch(() => x.openDB(P, H - 1, j(1)))), y;
|
|
235
|
+
}
|
|
236
|
+
function Q(e, t) {
|
|
237
|
+
return e.objectStoreNames.contains(t);
|
|
238
|
+
}
|
|
239
|
+
function _(e) {
|
|
240
|
+
if (!Q(e, f))
|
|
241
|
+
throw c.create(
|
|
242
|
+
"fid-registration-idb-schema-unavailable"
|
|
243
|
+
/* ErrorCode.FID_REGISTRATION_IDB_SCHEMA_UNAVAILABLE */
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
async function be(e) {
|
|
247
|
+
const t = b(e), i = await (await w()).transaction(l).objectStore(l).get(t);
|
|
248
|
+
if (i)
|
|
249
|
+
return i;
|
|
250
|
+
{
|
|
251
|
+
const o = await le(e.appConfig.senderId);
|
|
252
|
+
if (o)
|
|
253
|
+
return await E(e, o), o;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
async function E(e, t) {
|
|
257
|
+
const n = b(e), i = await w(), o = [l], r = Q(i, f);
|
|
258
|
+
r && o.push(f);
|
|
259
|
+
const a = i.transaction(o, "readwrite");
|
|
260
|
+
return await a.objectStore(l).put(t, n), r && await a.objectStore(f).delete(n), await a.done, t;
|
|
261
|
+
}
|
|
262
|
+
async function ye(e) {
|
|
263
|
+
const t = b(e), i = (await w()).transaction(l, "readwrite");
|
|
264
|
+
await i.objectStore(l).delete(t), await i.done;
|
|
265
|
+
}
|
|
266
|
+
async function R(e) {
|
|
267
|
+
const t = b(e), n = await w();
|
|
268
|
+
return _(n), await n.transaction(f).objectStore(f).get(t);
|
|
269
|
+
}
|
|
270
|
+
async function Te(e, t) {
|
|
271
|
+
const n = b(e), i = await w();
|
|
272
|
+
_(i);
|
|
273
|
+
const o = i.transaction([l, f], "readwrite");
|
|
274
|
+
return await o.objectStore(f).put(t, n), await o.objectStore(l).delete(n), await o.done, t;
|
|
275
|
+
}
|
|
276
|
+
async function me(e) {
|
|
277
|
+
const t = b(e), n = await w();
|
|
278
|
+
_(n);
|
|
279
|
+
const i = n.transaction(f, "readwrite");
|
|
280
|
+
await i.objectStore(f).delete(t), await i.done;
|
|
281
|
+
}
|
|
282
|
+
function b({ appConfig: e }) {
|
|
283
|
+
return e.appId;
|
|
284
|
+
}
|
|
285
|
+
const L = "@firebase/messaging", k = "0.13.3";
|
|
286
|
+
/**
|
|
287
|
+
* @license
|
|
288
|
+
* Copyright 2019 Google LLC
|
|
289
|
+
*
|
|
290
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
291
|
+
* you may not use this file except in compliance with the License.
|
|
292
|
+
* You may obtain a copy of the License at
|
|
293
|
+
*
|
|
294
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
295
|
+
*
|
|
296
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
297
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
298
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
299
|
+
* See the License for the specific language governing permissions and
|
|
300
|
+
* limitations under the License.
|
|
301
|
+
*/
|
|
302
|
+
const Ie = 3, ve = 1e3;
|
|
303
|
+
async function Se(e, t) {
|
|
304
|
+
const n = await m(e), i = A(
|
|
305
|
+
t,
|
|
306
|
+
e.appConfig.appName,
|
|
307
|
+
/* includeSdkVersion= */
|
|
308
|
+
!1
|
|
309
|
+
), o = {
|
|
310
|
+
method: "POST",
|
|
311
|
+
headers: n,
|
|
312
|
+
body: JSON.stringify(i)
|
|
313
|
+
};
|
|
314
|
+
let r;
|
|
315
|
+
try {
|
|
316
|
+
r = await (await fetch(T(e.appConfig), o)).json();
|
|
317
|
+
} catch (a) {
|
|
318
|
+
throw c.create("token-subscribe-failed", {
|
|
319
|
+
errorInfo: a == null ? void 0 : a.toString()
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
if (r.error) {
|
|
323
|
+
const a = r.error.message;
|
|
324
|
+
throw c.create("token-subscribe-failed", {
|
|
325
|
+
errorInfo: a
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
if (!r.token)
|
|
329
|
+
throw c.create(
|
|
330
|
+
"token-subscribe-no-token"
|
|
331
|
+
/* ErrorCode.TOKEN_SUBSCRIBE_NO_TOKEN */
|
|
332
|
+
);
|
|
333
|
+
return r.token;
|
|
334
|
+
}
|
|
335
|
+
async function ke(e, t) {
|
|
336
|
+
var p;
|
|
337
|
+
const n = await m(e), i = A(
|
|
338
|
+
t,
|
|
339
|
+
e.appConfig.appName,
|
|
340
|
+
/* includeSdkVersion= */
|
|
341
|
+
!0
|
|
342
|
+
), o = {
|
|
343
|
+
method: "POST",
|
|
344
|
+
headers: n,
|
|
345
|
+
body: JSON.stringify(i)
|
|
346
|
+
};
|
|
347
|
+
let r;
|
|
348
|
+
try {
|
|
349
|
+
r = await Oe(() => fetch(T(e.appConfig), o), Ie, ve);
|
|
350
|
+
} catch (s) {
|
|
351
|
+
throw c.create("fid-registration-failed", {
|
|
352
|
+
errorInfo: s == null ? void 0 : s.toString()
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
if (r.ok)
|
|
356
|
+
return { responseFid: await Ee(r) };
|
|
357
|
+
let a;
|
|
358
|
+
try {
|
|
359
|
+
a = await r.json();
|
|
360
|
+
} catch {
|
|
361
|
+
throw c.create("fid-registration-failed", {
|
|
362
|
+
errorInfo: r.statusText
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
const d = ((p = a.error) == null ? void 0 : p.message) ?? r.statusText;
|
|
366
|
+
throw c.create("fid-registration-failed", {
|
|
367
|
+
errorInfo: d
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
async function _e(e, t) {
|
|
371
|
+
var r;
|
|
372
|
+
const i = {
|
|
373
|
+
method: "DELETE",
|
|
374
|
+
headers: await m(e)
|
|
375
|
+
};
|
|
376
|
+
let o;
|
|
377
|
+
try {
|
|
378
|
+
o = await fetch(`${T(e.appConfig)}/${t}`, i);
|
|
379
|
+
} catch (a) {
|
|
380
|
+
throw c.create("fid-unregister-failed", {
|
|
381
|
+
errorInfo: a == null ? void 0 : a.toString()
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
if (!o.ok)
|
|
385
|
+
try {
|
|
386
|
+
throw ((r = (await o.json()).error) == null ? void 0 : r.message) ?? o.statusText;
|
|
387
|
+
} catch (a) {
|
|
388
|
+
throw c.create("fid-unregister-failed", {
|
|
389
|
+
errorInfo: typeof a == "string" && a || o.statusText || (a == null ? void 0 : a.toString())
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
async function Ee(e) {
|
|
394
|
+
const t = await e.text();
|
|
395
|
+
if (!t.trim())
|
|
396
|
+
throw c.create("fid-registration-failed", {
|
|
397
|
+
errorInfo: "CreateRegistration succeeded but response body is empty"
|
|
398
|
+
});
|
|
399
|
+
let n;
|
|
400
|
+
try {
|
|
401
|
+
n = JSON.parse(t);
|
|
402
|
+
} catch {
|
|
403
|
+
throw c.create("fid-registration-failed", {
|
|
404
|
+
errorInfo: "CreateRegistration succeeded but response body is not valid JSON"
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
const i = n.name;
|
|
408
|
+
if (typeof i != "string" || i.length === 0)
|
|
409
|
+
throw c.create("fid-registration-failed", {
|
|
410
|
+
errorInfo: "CreateRegistration succeeded but response did not include a non-empty name"
|
|
411
|
+
});
|
|
412
|
+
return Re(i);
|
|
413
|
+
}
|
|
414
|
+
const U = "/registrations/";
|
|
415
|
+
function Re(e) {
|
|
416
|
+
const t = e.indexOf(U);
|
|
417
|
+
if (t !== -1) {
|
|
418
|
+
const n = e.slice(t + U.length);
|
|
419
|
+
if (n.length > 0)
|
|
420
|
+
return n;
|
|
421
|
+
}
|
|
422
|
+
throw c.create("fid-registration-failed", {
|
|
423
|
+
errorInfo: "CreateRegistration succeeded but response name is not a valid registration resource name"
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
async function Ae(e, t) {
|
|
427
|
+
const n = await m(e), i = A(
|
|
428
|
+
t.subscriptionOptions,
|
|
429
|
+
e.appConfig.appName,
|
|
430
|
+
/* includeSdkVersion= */
|
|
431
|
+
!1
|
|
432
|
+
), o = {
|
|
433
|
+
method: "PATCH",
|
|
434
|
+
headers: n,
|
|
435
|
+
body: JSON.stringify(i)
|
|
436
|
+
};
|
|
437
|
+
let r;
|
|
438
|
+
try {
|
|
439
|
+
r = await (await fetch(`${T(e.appConfig)}/${t.token}`, o)).json();
|
|
440
|
+
} catch (a) {
|
|
441
|
+
throw c.create("token-update-failed", {
|
|
442
|
+
errorInfo: a == null ? void 0 : a.toString()
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
if (r.error) {
|
|
446
|
+
const a = r.error.message;
|
|
447
|
+
throw c.create("token-update-failed", {
|
|
448
|
+
errorInfo: a
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
if (!r.token)
|
|
452
|
+
throw c.create(
|
|
453
|
+
"token-update-no-token"
|
|
454
|
+
/* ErrorCode.TOKEN_UPDATE_NO_TOKEN */
|
|
455
|
+
);
|
|
456
|
+
return r.token;
|
|
457
|
+
}
|
|
458
|
+
async function De(e, t) {
|
|
459
|
+
const i = {
|
|
460
|
+
method: "DELETE",
|
|
461
|
+
headers: await m(e)
|
|
462
|
+
};
|
|
463
|
+
try {
|
|
464
|
+
const r = await (await fetch(`${T(e.appConfig)}/${t}`, i)).json();
|
|
465
|
+
if (r.error) {
|
|
466
|
+
const a = r.error.message;
|
|
467
|
+
throw c.create("token-unsubscribe-failed", {
|
|
468
|
+
errorInfo: a
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
} catch (o) {
|
|
472
|
+
throw c.create("token-unsubscribe-failed", {
|
|
473
|
+
errorInfo: o == null ? void 0 : o.toString()
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
async function Oe(e, t, n) {
|
|
478
|
+
let i;
|
|
479
|
+
for (let o = 0; o < t; o++)
|
|
480
|
+
try {
|
|
481
|
+
return await e();
|
|
482
|
+
} catch (r) {
|
|
483
|
+
if (i = r, o < t - 1) {
|
|
484
|
+
const a = n * Math.pow(2, o);
|
|
485
|
+
await new Promise((d) => setTimeout(d, a));
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
throw i;
|
|
489
|
+
}
|
|
490
|
+
function T({ projectId: e }) {
|
|
491
|
+
return `${se}/projects/${e}/registrations`;
|
|
492
|
+
}
|
|
493
|
+
async function m({ appConfig: e, installations: t }) {
|
|
494
|
+
const n = await t.getToken();
|
|
495
|
+
return new Headers({
|
|
496
|
+
"Content-Type": "application/json",
|
|
497
|
+
Accept: "application/json",
|
|
498
|
+
"x-goog-api-key": e.apiKey,
|
|
499
|
+
"x-goog-firebase-installations-auth": `FIS ${n}`
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
function Ce(e, t) {
|
|
503
|
+
var n, i;
|
|
504
|
+
try {
|
|
505
|
+
if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e))
|
|
506
|
+
return new URL(e).host;
|
|
507
|
+
} catch {
|
|
508
|
+
}
|
|
509
|
+
try {
|
|
510
|
+
if (typeof self < "u" && ((n = self.location) != null && n.href))
|
|
511
|
+
return new URL(e, self.location.origin).host;
|
|
512
|
+
} catch {
|
|
513
|
+
}
|
|
514
|
+
return typeof self < "u" && ((i = self.location) != null && i.host) ? self.location.host : t;
|
|
515
|
+
}
|
|
516
|
+
function A({ p256dh: e, auth: t, endpoint: n, vapidKey: i, swScope: o }, r, a) {
|
|
517
|
+
const d = {
|
|
518
|
+
web: {
|
|
519
|
+
origin: Ce(o, r),
|
|
520
|
+
endpoint: n,
|
|
521
|
+
auth: t,
|
|
522
|
+
p256dh: e
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
return a && (d.fcm_sdk_version = k), i !== V && (d.web.applicationPubKey = i), d;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* @license
|
|
529
|
+
* Copyright 2019 Google LLC
|
|
530
|
+
*
|
|
531
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
532
|
+
* you may not use this file except in compliance with the License.
|
|
533
|
+
* You may obtain a copy of the License at
|
|
534
|
+
*
|
|
535
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
536
|
+
*
|
|
537
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
538
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
539
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
540
|
+
* See the License for the specific language governing permissions and
|
|
541
|
+
* limitations under the License.
|
|
542
|
+
*/
|
|
543
|
+
const Ne = 7 * 24 * 60 * 60 * 1e3;
|
|
544
|
+
async function Me(e) {
|
|
545
|
+
const t = await Ke(e.swRegistration, e.vapidKey), n = {
|
|
546
|
+
vapidKey: e.vapidKey,
|
|
547
|
+
swScope: e.swRegistration.scope,
|
|
548
|
+
endpoint: t.endpoint,
|
|
549
|
+
auth: u(t.getKey("auth")),
|
|
550
|
+
p256dh: u(t.getKey("p256dh"))
|
|
551
|
+
}, i = await be(e.firebaseDependencies);
|
|
552
|
+
if (i) {
|
|
553
|
+
if (Pe(i.subscriptionOptions, n))
|
|
554
|
+
return Date.now() >= i.createTime + Ne ? Fe(e, {
|
|
555
|
+
token: i.token,
|
|
556
|
+
createTime: Date.now(),
|
|
557
|
+
subscriptionOptions: n
|
|
558
|
+
}) : i.token;
|
|
559
|
+
try {
|
|
560
|
+
await De(e.firebaseDependencies, i.token);
|
|
561
|
+
} catch (o) {
|
|
562
|
+
console.warn(o);
|
|
563
|
+
}
|
|
564
|
+
return B(e.firebaseDependencies, n);
|
|
565
|
+
} else
|
|
566
|
+
return B(e.firebaseDependencies, n);
|
|
567
|
+
}
|
|
568
|
+
async function Fe(e, t) {
|
|
569
|
+
try {
|
|
570
|
+
const n = await Ae(e.firebaseDependencies, t), i = {
|
|
571
|
+
...t,
|
|
572
|
+
token: n,
|
|
573
|
+
createTime: Date.now()
|
|
574
|
+
};
|
|
575
|
+
return await E(e.firebaseDependencies, i), n;
|
|
576
|
+
} catch (n) {
|
|
577
|
+
throw n;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
async function B(e, t) {
|
|
581
|
+
const i = {
|
|
582
|
+
token: await Se(e, t),
|
|
583
|
+
createTime: Date.now(),
|
|
584
|
+
subscriptionOptions: t
|
|
585
|
+
};
|
|
586
|
+
return await E(e, i), i.token;
|
|
587
|
+
}
|
|
588
|
+
async function Ke(e, t) {
|
|
589
|
+
const n = await e.pushManager.getSubscription();
|
|
590
|
+
return n || e.pushManager.subscribe({
|
|
591
|
+
userVisibleOnly: !0,
|
|
592
|
+
// Chrome <= 75 doesn't support base64-encoded VAPID key. For backward compatibility, VAPID key
|
|
593
|
+
// submitted to pushManager#subscribe must be of type Uint8Array.
|
|
594
|
+
applicationServerKey: J(t)
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
function Pe(e, t) {
|
|
598
|
+
const n = t.vapidKey === e.vapidKey, i = t.endpoint === e.endpoint, o = t.auth === e.auth, r = t.p256dh === e.p256dh;
|
|
599
|
+
return n && i && o && r;
|
|
600
|
+
}
|
|
601
|
+
function He(e, t) {
|
|
602
|
+
const n = e.onRegisteredHandler;
|
|
603
|
+
n && (typeof n == "function" ? n(t) : n.next(t));
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* @license
|
|
607
|
+
* Copyright 2020 Google LLC
|
|
608
|
+
*
|
|
609
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
610
|
+
* you may not use this file except in compliance with the License.
|
|
611
|
+
* You may obtain a copy of the License at
|
|
612
|
+
*
|
|
613
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
614
|
+
*
|
|
615
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
616
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
617
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
618
|
+
* See the License for the specific language governing permissions and
|
|
619
|
+
* limitations under the License.
|
|
620
|
+
*/
|
|
621
|
+
async function xe(e) {
|
|
622
|
+
try {
|
|
623
|
+
e.swRegistration = await navigator.serviceWorker.register(re, {
|
|
624
|
+
scope: ae
|
|
625
|
+
}), e.swRegistration.update().catch(() => {
|
|
626
|
+
}), await je(e.swRegistration);
|
|
627
|
+
} catch (t) {
|
|
628
|
+
throw c.create("failed-service-worker-registration", {
|
|
629
|
+
browserErrorMessage: t == null ? void 0 : t.message
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
async function je(e) {
|
|
634
|
+
return new Promise((t, n) => {
|
|
635
|
+
const i = setTimeout(() => n(new Error(`Service worker not registered after ${M} ms`)), M), o = e.installing || e.waiting;
|
|
636
|
+
e.active ? (clearTimeout(i), t()) : o ? o.onstatechange = (r) => {
|
|
637
|
+
var a;
|
|
638
|
+
((a = r.target) == null ? void 0 : a.state) === "activated" && (o.onstatechange = null, clearTimeout(i), t());
|
|
639
|
+
} : (clearTimeout(i), n(new Error("No incoming service worker found.")));
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* @license
|
|
644
|
+
* Copyright 2020 Google LLC
|
|
645
|
+
*
|
|
646
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
647
|
+
* you may not use this file except in compliance with the License.
|
|
648
|
+
* You may obtain a copy of the License at
|
|
649
|
+
*
|
|
650
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
651
|
+
*
|
|
652
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
653
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
654
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
655
|
+
* See the License for the specific language governing permissions and
|
|
656
|
+
* limitations under the License.
|
|
657
|
+
*/
|
|
658
|
+
async function Y(e, t) {
|
|
659
|
+
if (!t && !e.swRegistration && await xe(e), !(!t && e.swRegistration)) {
|
|
660
|
+
if (!(t instanceof ServiceWorkerRegistration))
|
|
661
|
+
throw c.create(
|
|
662
|
+
"invalid-sw-registration"
|
|
663
|
+
/* ErrorCode.INVALID_SW_REGISTRATION */
|
|
664
|
+
);
|
|
665
|
+
e.swRegistration = t;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* @license
|
|
670
|
+
* Copyright 2020 Google LLC
|
|
671
|
+
*
|
|
672
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
673
|
+
* you may not use this file except in compliance with the License.
|
|
674
|
+
* You may obtain a copy of the License at
|
|
675
|
+
*
|
|
676
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
677
|
+
*
|
|
678
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
679
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
680
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
681
|
+
* See the License for the specific language governing permissions and
|
|
682
|
+
* limitations under the License.
|
|
683
|
+
*/
|
|
684
|
+
async function z(e, t) {
|
|
685
|
+
t ? e.vapidKey = t : e.vapidKey || (e.vapidKey = V);
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* @license
|
|
689
|
+
* Copyright 2020 Google LLC
|
|
690
|
+
*
|
|
691
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
692
|
+
* you may not use this file except in compliance with the License.
|
|
693
|
+
* You may obtain a copy of the License at
|
|
694
|
+
*
|
|
695
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
696
|
+
*
|
|
697
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
698
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
699
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
700
|
+
* See the License for the specific language governing permissions and
|
|
701
|
+
* limitations under the License.
|
|
702
|
+
*/
|
|
703
|
+
const $ = 3;
|
|
704
|
+
async function Le(e, t) {
|
|
705
|
+
const n = await Ue(e.swRegistration, e.vapidKey), i = {
|
|
706
|
+
vapidKey: e.vapidKey,
|
|
707
|
+
swScope: e.swRegistration.scope,
|
|
708
|
+
endpoint: n.endpoint,
|
|
709
|
+
auth: u(n.getKey("auth")),
|
|
710
|
+
p256dh: u(n.getKey("p256dh"))
|
|
711
|
+
}, o = e.firebaseDependencies.installations;
|
|
712
|
+
for (let r = 0; r < $; r++) {
|
|
713
|
+
const { responseFid: a } = await ke(e.firebaseDependencies, i);
|
|
714
|
+
if (a === t)
|
|
715
|
+
return;
|
|
716
|
+
r < $ - 1 && await o.getToken(!0);
|
|
717
|
+
}
|
|
718
|
+
throw c.create("fid-registration-failed", {
|
|
719
|
+
errorInfo: "CreateRegistration response FID does not match Firebase Installation ID"
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
async function Ue(e, t) {
|
|
723
|
+
const n = await e.pushManager.getSubscription();
|
|
724
|
+
return n || e.pushManager.subscribe({
|
|
725
|
+
userVisibleOnly: !0,
|
|
726
|
+
// `PushManager.subscribe` expects a `BufferSource`; `base64ToArray` produces a typed array.
|
|
727
|
+
// Cast to satisfy the lib typing differences across TS DOM versions.
|
|
728
|
+
applicationServerKey: J(t)
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* @license
|
|
733
|
+
* Copyright 2020 Google LLC
|
|
734
|
+
*
|
|
735
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
736
|
+
* you may not use this file except in compliance with the License.
|
|
737
|
+
* You may obtain a copy of the License at
|
|
738
|
+
*
|
|
739
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
740
|
+
*
|
|
741
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
742
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
743
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
744
|
+
* See the License for the specific language governing permissions and
|
|
745
|
+
* limitations under the License.
|
|
746
|
+
*/
|
|
747
|
+
const Be = 7 * 24 * 60 * 60 * 1e3;
|
|
748
|
+
async function D(e, t) {
|
|
749
|
+
if (!navigator)
|
|
750
|
+
throw c.create(
|
|
751
|
+
"only-available-in-window"
|
|
752
|
+
/* ErrorCode.AVAILABLE_IN_WINDOW */
|
|
753
|
+
);
|
|
754
|
+
if (Notification.permission === "default" && await Notification.requestPermission(), Notification.permission !== "granted")
|
|
755
|
+
throw c.create(
|
|
756
|
+
"permission-blocked"
|
|
757
|
+
/* ErrorCode.PERMISSION_BLOCKED */
|
|
758
|
+
);
|
|
759
|
+
if (!e.onRegisteredHandler)
|
|
760
|
+
throw c.create(
|
|
761
|
+
"invalid-on-registered-handler"
|
|
762
|
+
/* ErrorCode.INVALID_ON_REGISTERED_HANDLER */
|
|
763
|
+
);
|
|
764
|
+
await z(e, t == null ? void 0 : t.vapidKey), await Y(e, t == null ? void 0 : t.serviceWorkerRegistration);
|
|
765
|
+
const n = e._registerNotifyChain.catch(() => {
|
|
766
|
+
});
|
|
767
|
+
return e._registerNotifyChain = n.then(async () => {
|
|
768
|
+
const i = await e.firebaseDependencies.installations.getId(), o = await R(e.firebaseDependencies), r = Date.now();
|
|
769
|
+
if ((!o || o.fid !== i || r >= o.lastRegisterTime + Be) && (await Le(e, i), await Te(e.firebaseDependencies, {
|
|
770
|
+
fid: i,
|
|
771
|
+
lastRegisterTime: r,
|
|
772
|
+
vapidKey: e.vapidKey
|
|
773
|
+
})), !e.onRegisteredHandler)
|
|
774
|
+
throw c.create(
|
|
775
|
+
"invalid-on-registered-handler"
|
|
776
|
+
/* ErrorCode.INVALID_ON_REGISTERED_HANDLER */
|
|
777
|
+
);
|
|
778
|
+
He(e, i);
|
|
779
|
+
}), e._registerNotifyChain;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* @license
|
|
783
|
+
* Copyright 2026 Google LLC
|
|
784
|
+
*
|
|
785
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
786
|
+
* you may not use this file except in compliance with the License.
|
|
787
|
+
* You may obtain a copy of the License at
|
|
788
|
+
*
|
|
789
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
790
|
+
*
|
|
791
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
792
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
793
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
794
|
+
* See the License for the specific language governing permissions and
|
|
795
|
+
* limitations under the License.
|
|
796
|
+
*/
|
|
797
|
+
function $e(e, t) {
|
|
798
|
+
return X(t, () => {
|
|
799
|
+
(async () => !e.onRegisteredHandler || !await R(e.firebaseDependencies) || await D(e).catch(() => {
|
|
800
|
+
}))();
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* @license
|
|
805
|
+
* Copyright 2020 Google LLC
|
|
806
|
+
*
|
|
807
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
808
|
+
* you may not use this file except in compliance with the License.
|
|
809
|
+
* You may obtain a copy of the License at
|
|
810
|
+
*
|
|
811
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
812
|
+
*
|
|
813
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
814
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
815
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
816
|
+
* See the License for the specific language governing permissions and
|
|
817
|
+
* limitations under the License.
|
|
818
|
+
*/
|
|
819
|
+
function W(e) {
|
|
820
|
+
const t = {
|
|
821
|
+
from: e.from,
|
|
822
|
+
// eslint-disable-next-line camelcase
|
|
823
|
+
collapseKey: e.collapse_key,
|
|
824
|
+
// eslint-disable-next-line camelcase
|
|
825
|
+
messageId: e.fcmMessageId
|
|
826
|
+
};
|
|
827
|
+
return We(t, e), Ge(t, e), Ve(t, e), t;
|
|
828
|
+
}
|
|
829
|
+
function We(e, t) {
|
|
830
|
+
if (!t.notification)
|
|
831
|
+
return;
|
|
832
|
+
e.notification = {};
|
|
833
|
+
const n = t.notification.title;
|
|
834
|
+
n && (e.notification.title = n);
|
|
835
|
+
const i = t.notification.body;
|
|
836
|
+
i && (e.notification.body = i);
|
|
837
|
+
const o = t.notification.image;
|
|
838
|
+
o && (e.notification.image = o);
|
|
839
|
+
const r = t.notification.icon;
|
|
840
|
+
r && (e.notification.icon = r);
|
|
841
|
+
}
|
|
842
|
+
function Ge(e, t) {
|
|
843
|
+
t.data && (e.data = t.data);
|
|
844
|
+
}
|
|
845
|
+
function Ve(e, t) {
|
|
846
|
+
var o, r, a, d;
|
|
847
|
+
if (!t.fcmOptions && !((o = t.notification) != null && o.click_action))
|
|
848
|
+
return;
|
|
849
|
+
e.fcmOptions = {};
|
|
850
|
+
const n = ((r = t.fcmOptions) == null ? void 0 : r.link) ?? ((a = t.notification) == null ? void 0 : a.click_action);
|
|
851
|
+
n && (e.fcmOptions.link = n);
|
|
852
|
+
const i = (d = t.fcmOptions) == null ? void 0 : d.analytics_label;
|
|
853
|
+
i && (e.fcmOptions.analyticsLabel = i);
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* @license
|
|
857
|
+
* Copyright 2019 Google LLC
|
|
858
|
+
*
|
|
859
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
860
|
+
* you may not use this file except in compliance with the License.
|
|
861
|
+
* You may obtain a copy of the License at
|
|
862
|
+
*
|
|
863
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
864
|
+
*
|
|
865
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
866
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
867
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
868
|
+
* See the License for the specific language governing permissions and
|
|
869
|
+
* limitations under the License.
|
|
870
|
+
*/
|
|
871
|
+
function qe(e) {
|
|
872
|
+
return typeof e == "object" && !!e && q in e;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* @license
|
|
876
|
+
* Copyright 2019 Google LLC
|
|
877
|
+
*
|
|
878
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
879
|
+
* you may not use this file except in compliance with the License.
|
|
880
|
+
* You may obtain a copy of the License at
|
|
881
|
+
*
|
|
882
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
883
|
+
*
|
|
884
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
885
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
886
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
887
|
+
* See the License for the specific language governing permissions and
|
|
888
|
+
* limitations under the License.
|
|
889
|
+
*/
|
|
890
|
+
function Je(e) {
|
|
891
|
+
if (!e || !e.options)
|
|
892
|
+
throw S("App Configuration Object");
|
|
893
|
+
if (!e.name)
|
|
894
|
+
throw S("App Name");
|
|
895
|
+
const t = [
|
|
896
|
+
"projectId",
|
|
897
|
+
"apiKey",
|
|
898
|
+
"appId",
|
|
899
|
+
"messagingSenderId"
|
|
900
|
+
], { options: n } = e;
|
|
901
|
+
for (const i of t)
|
|
902
|
+
if (!n[i])
|
|
903
|
+
throw S(i);
|
|
904
|
+
return {
|
|
905
|
+
appName: e.name,
|
|
906
|
+
projectId: n.projectId,
|
|
907
|
+
apiKey: n.apiKey,
|
|
908
|
+
appId: n.appId,
|
|
909
|
+
senderId: n.messagingSenderId
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
function S(e) {
|
|
913
|
+
return c.create("missing-app-config-values", {
|
|
914
|
+
valueName: e
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* @license
|
|
919
|
+
* Copyright 2020 Google LLC
|
|
920
|
+
*
|
|
921
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
922
|
+
* you may not use this file except in compliance with the License.
|
|
923
|
+
* You may obtain a copy of the License at
|
|
924
|
+
*
|
|
925
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
926
|
+
*
|
|
927
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
928
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
929
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
930
|
+
* See the License for the specific language governing permissions and
|
|
931
|
+
* limitations under the License.
|
|
932
|
+
*/
|
|
933
|
+
class Qe {
|
|
934
|
+
constructor(t, n, i) {
|
|
935
|
+
this.deliveryMetricsExportedToBigQueryEnabled = !1, this.onBackgroundMessageHandler = null, this.onMessageHandler = null, this.onRegisteredHandler = null, this.onUnregisteredHandler = null, this._registerNotifyChain = Promise.resolve(), this._fidChangeUnsubscribe = null, this.logEvents = [], this.logQueue = { state: "stopped" };
|
|
936
|
+
const o = Je(t);
|
|
937
|
+
this.firebaseDependencies = {
|
|
938
|
+
app: t,
|
|
939
|
+
appConfig: o,
|
|
940
|
+
installations: n,
|
|
941
|
+
analyticsProvider: i
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
_delete() {
|
|
945
|
+
return this._fidChangeUnsubscribe && (this._fidChangeUnsubscribe(), this._fidChangeUnsubscribe = null), this.logQueue.state === "scheduled" && clearTimeout(this.logQueue.timerId), this.logQueue = { state: "stopped" }, Promise.resolve();
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* @license
|
|
950
|
+
* Copyright 2020 Google LLC
|
|
951
|
+
*
|
|
952
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
953
|
+
* you may not use this file except in compliance with the License.
|
|
954
|
+
* You may obtain a copy of the License at
|
|
955
|
+
*
|
|
956
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
957
|
+
*
|
|
958
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
959
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
960
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
961
|
+
* See the License for the specific language governing permissions and
|
|
962
|
+
* limitations under the License.
|
|
963
|
+
*/
|
|
964
|
+
async function Ye(e, t) {
|
|
965
|
+
if (!navigator)
|
|
966
|
+
throw c.create(
|
|
967
|
+
"only-available-in-window"
|
|
968
|
+
/* ErrorCode.AVAILABLE_IN_WINDOW */
|
|
969
|
+
);
|
|
970
|
+
if (Notification.permission === "default" && await Notification.requestPermission(), Notification.permission !== "granted")
|
|
971
|
+
throw c.create(
|
|
972
|
+
"permission-blocked"
|
|
973
|
+
/* ErrorCode.PERMISSION_BLOCKED */
|
|
974
|
+
);
|
|
975
|
+
return await z(e, t == null ? void 0 : t.vapidKey), await Y(e, t == null ? void 0 : t.serviceWorkerRegistration), Me(e);
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* @license
|
|
979
|
+
* Copyright 2019 Google LLC
|
|
980
|
+
*
|
|
981
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
982
|
+
* you may not use this file except in compliance with the License.
|
|
983
|
+
* You may obtain a copy of the License at
|
|
984
|
+
*
|
|
985
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
986
|
+
*
|
|
987
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
988
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
989
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
990
|
+
* See the License for the specific language governing permissions and
|
|
991
|
+
* limitations under the License.
|
|
992
|
+
*/
|
|
993
|
+
async function ze(e, t, n) {
|
|
994
|
+
const i = Xe(t);
|
|
995
|
+
(await e.firebaseDependencies.analyticsProvider.get()).logEvent(i, {
|
|
996
|
+
/* eslint-disable camelcase */
|
|
997
|
+
message_id: n[q],
|
|
998
|
+
message_name: n[ce],
|
|
999
|
+
message_time: n[de],
|
|
1000
|
+
message_device_time: Math.floor(Date.now() / 1e3)
|
|
1001
|
+
/* eslint-enable camelcase */
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
function Xe(e) {
|
|
1005
|
+
switch (e) {
|
|
1006
|
+
case h.NOTIFICATION_CLICKED:
|
|
1007
|
+
return "notification_open";
|
|
1008
|
+
case h.PUSH_RECEIVED:
|
|
1009
|
+
return "notification_foreground";
|
|
1010
|
+
default:
|
|
1011
|
+
throw new Error();
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* @license
|
|
1016
|
+
* Copyright 2017 Google LLC
|
|
1017
|
+
*
|
|
1018
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1019
|
+
* you may not use this file except in compliance with the License.
|
|
1020
|
+
* You may obtain a copy of the License at
|
|
1021
|
+
*
|
|
1022
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1023
|
+
*
|
|
1024
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1025
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1026
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1027
|
+
* See the License for the specific language governing permissions and
|
|
1028
|
+
* limitations under the License.
|
|
1029
|
+
*/
|
|
1030
|
+
async function Ze(e, t) {
|
|
1031
|
+
const n = t.data;
|
|
1032
|
+
if (!n.isFirebaseMessaging)
|
|
1033
|
+
return;
|
|
1034
|
+
if (e.onMessageHandler && n.messageType === h.PUSH_RECEIVED && (typeof e.onMessageHandler == "function" ? e.onMessageHandler(W(n)) : e.onMessageHandler.next(W(n))), e.onRegisteredHandler && n.messageType === h.FID_REGISTERED) {
|
|
1035
|
+
const o = n.fid;
|
|
1036
|
+
typeof e.onRegisteredHandler == "function" ? e.onRegisteredHandler(o) : e.onRegisteredHandler.next(o);
|
|
1037
|
+
}
|
|
1038
|
+
const i = n.data;
|
|
1039
|
+
qe(i) && i[ue] === "1" && await ze(e, n.messageType, i);
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* @license
|
|
1043
|
+
* Copyright 2020 Google LLC
|
|
1044
|
+
*
|
|
1045
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1046
|
+
* you may not use this file except in compliance with the License.
|
|
1047
|
+
* You may obtain a copy of the License at
|
|
1048
|
+
*
|
|
1049
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1050
|
+
*
|
|
1051
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1052
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1053
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1054
|
+
* See the License for the specific language governing permissions and
|
|
1055
|
+
* limitations under the License.
|
|
1056
|
+
*/
|
|
1057
|
+
const et = (e) => {
|
|
1058
|
+
const t = new Qe(e.getProvider("app").getImmediate(), e.getProvider("installations-internal").getImmediate(), e.getProvider("analytics-internal"));
|
|
1059
|
+
return navigator.serviceWorker.addEventListener("message", (n) => Ze(t, n)), t._fidChangeUnsubscribe = $e(t, e.getProvider("installations").getImmediate()), t;
|
|
1060
|
+
}, tt = (e) => {
|
|
1061
|
+
const t = e.getProvider("messaging").getImmediate();
|
|
1062
|
+
return {
|
|
1063
|
+
getToken: (i) => Ye(t, i),
|
|
1064
|
+
register: (i) => D(t, i)
|
|
1065
|
+
};
|
|
1066
|
+
};
|
|
1067
|
+
function nt() {
|
|
1068
|
+
C(new O(
|
|
1069
|
+
"messaging",
|
|
1070
|
+
et,
|
|
1071
|
+
"PUBLIC"
|
|
1072
|
+
/* ComponentType.PUBLIC */
|
|
1073
|
+
)), C(new O(
|
|
1074
|
+
"messaging-internal",
|
|
1075
|
+
tt,
|
|
1076
|
+
"PRIVATE"
|
|
1077
|
+
/* ComponentType.PRIVATE */
|
|
1078
|
+
)), N(L, k), N(L, k, "esm2020");
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* @license
|
|
1082
|
+
* Copyright 2020 Google LLC
|
|
1083
|
+
*
|
|
1084
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1085
|
+
* you may not use this file except in compliance with the License.
|
|
1086
|
+
* You may obtain a copy of the License at
|
|
1087
|
+
*
|
|
1088
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1089
|
+
*
|
|
1090
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1091
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1092
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1093
|
+
* See the License for the specific language governing permissions and
|
|
1094
|
+
* limitations under the License.
|
|
1095
|
+
*/
|
|
1096
|
+
async function it() {
|
|
1097
|
+
try {
|
|
1098
|
+
await ee();
|
|
1099
|
+
} catch {
|
|
1100
|
+
return !1;
|
|
1101
|
+
}
|
|
1102
|
+
return typeof window < "u" && te() && ne() && "serviceWorker" in navigator && "PushManager" in window && "Notification" in window && "fetch" in window && ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification") && PushSubscription.prototype.hasOwnProperty("getKey");
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* @license
|
|
1106
|
+
* Copyright 2020 Google LLC
|
|
1107
|
+
*
|
|
1108
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1109
|
+
* you may not use this file except in compliance with the License.
|
|
1110
|
+
* You may obtain a copy of the License at
|
|
1111
|
+
*
|
|
1112
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1113
|
+
*
|
|
1114
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1115
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1116
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1117
|
+
* See the License for the specific language governing permissions and
|
|
1118
|
+
* limitations under the License.
|
|
1119
|
+
*/
|
|
1120
|
+
function ot(e, t) {
|
|
1121
|
+
if (!navigator)
|
|
1122
|
+
throw c.create(
|
|
1123
|
+
"only-available-in-window"
|
|
1124
|
+
/* ErrorCode.AVAILABLE_IN_WINDOW */
|
|
1125
|
+
);
|
|
1126
|
+
return e.onMessageHandler = t, () => {
|
|
1127
|
+
e.onMessageHandler = null;
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* @license
|
|
1132
|
+
* Copyright 2020 Google LLC
|
|
1133
|
+
*
|
|
1134
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1135
|
+
* you may not use this file except in compliance with the License.
|
|
1136
|
+
* You may obtain a copy of the License at
|
|
1137
|
+
*
|
|
1138
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1139
|
+
*
|
|
1140
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1141
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1142
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1143
|
+
* See the License for the specific language governing permissions and
|
|
1144
|
+
* limitations under the License.
|
|
1145
|
+
*/
|
|
1146
|
+
function rt(e, t) {
|
|
1147
|
+
return e.onRegisteredHandler = t, () => {
|
|
1148
|
+
e.onRegisteredHandler === t && (e.onRegisteredHandler = null);
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* @license
|
|
1153
|
+
* Copyright 2026 Google LLC
|
|
1154
|
+
*
|
|
1155
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1156
|
+
* you may not use this file except in compliance with the License.
|
|
1157
|
+
* You may obtain a copy of the License at
|
|
1158
|
+
*
|
|
1159
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1160
|
+
*
|
|
1161
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1162
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1163
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1164
|
+
* See the License for the specific language governing permissions and
|
|
1165
|
+
* limitations under the License.
|
|
1166
|
+
*/
|
|
1167
|
+
function at(e, t) {
|
|
1168
|
+
return e.onUnregisteredHandler = t, () => {
|
|
1169
|
+
e.onUnregisteredHandler === t && (e.onUnregisteredHandler = null);
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* @license
|
|
1174
|
+
* Copyright 2026 Google LLC
|
|
1175
|
+
*
|
|
1176
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1177
|
+
* you may not use this file except in compliance with the License.
|
|
1178
|
+
* You may obtain a copy of the License at
|
|
1179
|
+
*
|
|
1180
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1181
|
+
*
|
|
1182
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1183
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1184
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1185
|
+
* See the License for the specific language governing permissions and
|
|
1186
|
+
* limitations under the License.
|
|
1187
|
+
*/
|
|
1188
|
+
async function st(e) {
|
|
1189
|
+
if (!navigator)
|
|
1190
|
+
throw c.create(
|
|
1191
|
+
"only-available-in-window"
|
|
1192
|
+
/* ErrorCode.AVAILABLE_IN_WINDOW */
|
|
1193
|
+
);
|
|
1194
|
+
const t = await R(e.firebaseDependencies).catch(() => {
|
|
1195
|
+
}), n = (t == null ? void 0 : t.fid) ?? await e.firebaseDependencies.installations.getId();
|
|
1196
|
+
await _e(e.firebaseDependencies, n);
|
|
1197
|
+
try {
|
|
1198
|
+
await me(e.firebaseDependencies);
|
|
1199
|
+
} catch {
|
|
1200
|
+
}
|
|
1201
|
+
try {
|
|
1202
|
+
await ye(e.firebaseDependencies);
|
|
1203
|
+
} catch {
|
|
1204
|
+
}
|
|
1205
|
+
const i = e.onUnregisteredHandler;
|
|
1206
|
+
i && (typeof i == "function" ? i(n) : i.next(n));
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* @license
|
|
1210
|
+
* Copyright 2017 Google LLC
|
|
1211
|
+
*
|
|
1212
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1213
|
+
* you may not use this file except in compliance with the License.
|
|
1214
|
+
* You may obtain a copy of the License at
|
|
1215
|
+
*
|
|
1216
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1217
|
+
*
|
|
1218
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1219
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1220
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1221
|
+
* See the License for the specific language governing permissions and
|
|
1222
|
+
* limitations under the License.
|
|
1223
|
+
*/
|
|
1224
|
+
function pt(e = oe()) {
|
|
1225
|
+
return it().then((t) => {
|
|
1226
|
+
if (!t)
|
|
1227
|
+
throw c.create(
|
|
1228
|
+
"unsupported-browser"
|
|
1229
|
+
/* ErrorCode.UNSUPPORTED_BROWSER */
|
|
1230
|
+
);
|
|
1231
|
+
}, (t) => {
|
|
1232
|
+
throw c.create(
|
|
1233
|
+
"indexed-db-unsupported"
|
|
1234
|
+
/* ErrorCode.INDEXED_DB_UNSUPPORTED */
|
|
1235
|
+
);
|
|
1236
|
+
}), ie(g(e), "messaging").getImmediate();
|
|
1237
|
+
}
|
|
1238
|
+
function ht(e, t) {
|
|
1239
|
+
return e = g(e), ot(e, t);
|
|
1240
|
+
}
|
|
1241
|
+
async function gt(e, t) {
|
|
1242
|
+
return e = g(e), D(e, t);
|
|
1243
|
+
}
|
|
1244
|
+
async function wt(e) {
|
|
1245
|
+
return e = g(e), st(e);
|
|
1246
|
+
}
|
|
1247
|
+
function bt(e, t) {
|
|
1248
|
+
return e = g(e), rt(e, t);
|
|
1249
|
+
}
|
|
1250
|
+
function yt(e, t) {
|
|
1251
|
+
return e = g(e), at(e, t);
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* @license
|
|
1255
|
+
* Copyright 2017 Google LLC
|
|
1256
|
+
*
|
|
1257
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1258
|
+
* you may not use this file except in compliance with the License.
|
|
1259
|
+
* You may obtain a copy of the License at
|
|
1260
|
+
*
|
|
1261
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1262
|
+
*
|
|
1263
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1264
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1265
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1266
|
+
* See the License for the specific language governing permissions and
|
|
1267
|
+
* limitations under the License.
|
|
1268
|
+
*/
|
|
1269
|
+
nt();
|
|
1270
|
+
export {
|
|
1271
|
+
pt as getMessaging,
|
|
1272
|
+
it as isSupported,
|
|
1273
|
+
ht as onMessage,
|
|
1274
|
+
bt as onRegistered,
|
|
1275
|
+
yt as onUnregistered,
|
|
1276
|
+
gt as register,
|
|
1277
|
+
wt as unregister
|
|
1278
|
+
};
|