PageSourceSearch

https://fleet.heliot.co.th/js/621-legacy.5f327deb.js

js heliot.co.th collected 2026-10-02 02:13:09 UTC 32,180 bytes, 195 lines download raw bytes

1"use strict";(self["webpackChunkheliot_fleet_v4"]=self["webpackChunkheliot_fleet_v4"]||[]).push([[621],{47621:function(e,t,n){n(41684);var r=n(57170),i=n(2460);var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r["throw"](e))}catch(t){o(t)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())})}function a(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(o=0)),o)try{if(n=1,r&&(i=2&a[0]?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(c){a=[6,c],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}Object.create;function c(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{while((void 0===t||t-- >0)&&!(r=o.next()).done)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return s}function l(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var f,p,d=n(91588),h=n(65186),v=(f={},f["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',f["only-available-in-window"]="This method is available in a Window context.",f["only-available-in-sw"]="This method is available in a service worker context.",f["permission-default"]="The notification permission was not granted and dismissed instead.",f["permission-blocked"]="The notification permission was not granted and blocked instead.",f["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",f["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",f["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",f["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",f["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",f["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",f["token-update-no-token"]="FCM returned no token when updating the user to push.",f["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.",f["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",f["invalid-bg-handler"]="The input to setBackgroun
1dMessageHandler() must be a function.",f["invalid-vapid-key"]="The public VAPID key must be a string.",f["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.",f),g=new i.FA("messaging","Messaging",v),b="/firebase-messaging-sw.js",y="/firebase-cloud-messaging-push-scope",w="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",m="https://fcmregistrations.googleapis.com/v1",k="FCM_MSG",S="FirebaseMessaging: ",M="google.c.a.e",T="google.c.a.c_id",I="google.c.a.ts",K="google.c.a.c_l",O=1e3,C=3e3;
2/**
3 * @license
4 * Copyright 2017 Google LLC
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18function D(e){var t=new Uint8Array(e),n=btoa(String.fromCharCode.apply(String,l([],u(t))));return n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function P(e){for(var t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),r=atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return i}
19/**
20 * @license
21 * Copyright 2019 Google LLC
22 *
23 * Licensed under the Apache License, Version 2.0 (the "License");
24 * you may not use this file except in compliance with the License.
25 * You may obtain a copy of the License at
26 *
27 *   http://www.apache.org/licenses/LICENSE-2.0
28 *
29 * Unless required by applicable law or agreed to in writing, software
30 * distributed under the License is distributed on an "AS IS" BASIS,
31 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
34 */(function(e){e["PUSH_RECEIVED"]="push-received",e["NOTIFICATION_CLICKED"]="notification-clicked"})(p||(p={}));var _="fcm_token_details_db",j=5,E="fcm_token_object_Store";function N(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return a(this,function(c){switch(c.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(t=c.sent(),n=t.map(function(e){return e.name}),!n.includes(_))return[2,null];c.label=2;case 2:return r=null,[4,(0,d.openDb)(_,j,function(t){return s(o,void 0,void 0,function(){var n,i,o,s;return a(this,function(a){switch(a.label){case 0:return t.oldVersion<2?[2]:t.objectStoreNames.contains(E)?(n=t.transaction.objectStore(E),[4,n.index("fcmSenderId").get(e)]):[2];case 1:return i=a.sent(),[4,n.clear()];case 2:if(a.sent(),!i)return[2];if(2===t.oldVersion){if(o=i,!o.auth||!o.p256dh||!o.endpoint)return[2];r={token:o.fcmToken,createTime:null!==(s=o.createTime)&&void 0!==s?s:Date.now(),subscriptionOptions:{auth:o.auth,p256dh:o.p256dh,endpoint:o.endpoint,swScope:o.swScope,vapidKey:"string"===typeof o.vapidKey?o.vapidKey:D(o.vapidKey)}}}else(3===t.oldVersion||4===t.oldVersion)&&(o=i,r={token:o.fcmToken,createTime:o.createTime,subscriptionOptions:{auth:D(o.auth),p256dh:D(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:D(o.vapidKey)}});return[2]}})})})];case 3:return i=c.sent(),i.close(),[4,(0,d.deleteDb)(_)];case 4:return c.sent(),[4,(0,d.deleteDb)("fcm_vapid_details_db")];case 5:return c.sent(),[4,(0,d.deleteDb)("undefined")];case 6:return c.sent(),[2,R(r)?r:null]}})})}function R(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return"number"===typeof e.createTime&&e.createTime>0&&"string"===typeof e.token&&e.token.length>0&&"string"===typeof t.auth&&t.auth.length>0&&"string"===typeof t.p256dh&&t.p256dh.length>0&&"string"===typeof t.endpoint&&t.endpoint.length>0&&"string"===typeof t.swScope&&t.swScope.length>0&&"string"===typeof t.vapidKey&&t.vapidKey.length>0}
35/**
36 * @license
37 * Copyright 2019 Google LLC
38 *
39 * Licensed under the Apache License, Version 2.0 (the "License");
40 * you may not use this file except in compliance with the License.
41 * You may obtain a copy of the License at
42 *
43 *   http://www.apache.org/licenses/LICENSE-2.0
44 *
45 * Unless required by applicable law or agreed to in writing, software
46 * distributed under the License is distributed on an "AS IS" BASIS,
47 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48 * See the License for the specific language governing permissions and
49 * limitations under the License.
50 */var x="firebase-messaging-database",A=1,W="firebase-messaging-store",H=null;function U(){return H||(H=(0,d.openDb)(x,A,function(e){switch(e.oldVersion){case 0:e.createObjectStore(W)}})),H}function V(e){return s(this,void 0,void 0,function(){var t,n,r,i;return a(this,function(o){switch(o.label){case 0:return t=L(e),[4,U()];case 1:return n=o.sent(),[4,n.transaction(W).objectStore(W).get(t)];case 2:return r=o.sent(),r?[2,r]:[3,3];case 3:return[4,N(e.appConfig.senderId)];case 4:return i=o.sent(),i?[4,B(e,i)]:[3,6];case 5:return o.sent(),[2,i];case 6:return[2]}})})}function B(e,t){return s(this,void 0,void 0,function(){var n,r,i;return a(this,function(o){switch(o.label){case 0:return n=L(e),[4,U()];case 1:return r=o.sent(),i=r.transaction(W,"readwrite"),[4,i.objectStore(W).put(t,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,t]}})})}function F(e){return s(this,void 0,void 0,function(){var t,n,r;return a(this,function(i){switch(i.label){case 0:return t=L(e),[4,U()];case 1:return n=i.sent(),r=n.transaction(W,"readwrite"),[4,r.objectStore(W).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function L(e){var t=e.appConfig;return t.appId}
51/**
52 * @license
53 * Copyright 2019 Google LLC
54 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
56 * you may not use this file except in compliance with the License.
57 * You may obtain a copy of the License at
58 *
59 *   http://www.apache.org/licenses/LICENSE-2.0
60 *
61 * Unless required by applicable law or agreed to in writing, software
62 * distributed under the License is distributed on an "AS IS" BASIS,
63 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
64 * See the License for the specific language governing permissions and
65 * limitations under the License.
66 */function q(e,t){return s(this,void 0,void 0,function(){var n,r,i,o,s,c,u;return a(this,function(a){switch(a.label){case 0:return[4,z(e)];case 1:n=a.sent(),r=Q(t),i={method:"POST",headers:n,body:JSON.stringify(r)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(J(e.appConfig),i)];case 3:return s=a.sent(),[4,s.json()];case 4:return o=a.sent(),[3,6];case 5:throw c=a.sent(),g.create("token-subscribe-failed",{errorInfo:c});case 6:if(o.error)throw u=o.error.message,g.create("token-subscribe-failed",{errorInfo:u});if(!o.token)throw g.create("token-subscribe-no-token");return[2,o.token]}})})}function G(e,t){return s(this,void 0,void 0,function(){var n,r,i,o,s,c,u;return a(this,function(a){switch(a.label){case 0:return[4,z(e)];case 1:n=a.sent(),r=Q(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(J(e.appConfig)+"/"+t.token,i)];case 3:return s=a.sent(),[4,s.json()];case 4:return o=a.sent(),[3,6];case 5:throw c=a.sent(),g.create("token-update-failed",{errorInfo:c});case 6:if(o.error)throw u=o.error.message,g.create("token-update-failed",{errorInfo:u});if(!o.token)throw g.create("token-update-no-token");return[2,o.token]}})})}function $(e,t){return s(this,void 0,void 0,function(){var n,r,i,o,s,c;return a(this,function(a){switch(a.label){case 0:return[4,z(e)];case 1:n=a.sent(),r={method:"DELETE",headers:n},a.label=2;case 2:return a.trys.push([2,5,,6]),[4,fetch(J(e.appConfig)+"/"+t,r)];case 3:return i=a.sent(),[4,i.json()];case 4:if(o=a.sent(),o.error)throw s=o.error.message,g.create("token-unsubscribe-failed",{errorInfo:s});return[3,6];case 5:throw c=a.sent(),g.create("token-unsubscribe-failed",{errorInfo:c});case 6:return[2]}})})}function J(e){var t=e.projectId;return m+"/projects/"+t+"/registrations"}function z(e){var t=e.appConfig,n=e.installations;return s(this,void 0,void 0,function(){var e;return a(this,function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return e=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+e})]}})})}function Q(e){var t=e.p256dh,n=e.auth,r=e.endpoint,i=e.vapidKey,o={web:{endpoint:r,auth:n,p256dh:t}};return i!==w&&(o.web.applicationPubKey=i),o}
67/**
68 * @license
69 * Copyright 2019 Google LLC
70 *
71 * Licensed under the Apache License, Version 2.0 (the "License");
72 * you may not use this file except in compliance with the License.
73 * You may obtain a copy of the License at
74 *
75 *   http://www.apache.org/licenses/LICENSE-2.0
76 *
77 * Unless required by applicable law or agreed to in writing, software
78 * distributed under the License is distributed on an "AS IS" BASIS,
79 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
80 * See the License for the specific language governing permissions and
81 * limitations under the License.
82 */var X=6048e5;function Y(e,t,n){return s(this,void 0,void 0,function(){var r,i,o,s;return a(this,function(a){switch(a.label){case 0:if("granted"!==Notification.permission)throw g.create("permission-blocked");return[4,ne(t,n)];case 1:return r=a.sent(),[4,V(e)];case 2:return i=a.sent(),o={vapidKey:n,swScope:t.scope,endpoint:r.endpoint,auth:D(r.getKey("auth")),p256dh:D(r.getKey("p256dh"))},i?[3,3]:[2,te(e,o)];case 3:if(re(i.subscriptionOptions,o))return[3,8];a.label=4;case 4:return a.trys.push([4,6,,7]),[4,$(e,i.token)];case 5:return a.sent(),[3,7];case 6:return s=a.sent(),console.warn(s),[3,7];case 7:return[2,te(e,o)];case 8:return Date.now()>=i.createTime+X?[2,ee({token:i.token,createTime:Date.now(),subscriptionOptions:o},e,t)]:[2,i.token];case 9:return[2]}})})}function Z(e,t){return s(this,void 0,void 0,function(){var n,r;return a(this,function(i){switch(i.label){case 0:return[4,V(e)];case 1:return n=i.sent(),n?[4,$(e,n.token)]:[3,4];case 2:return i.sent(),[4,F(e)];case 3:i.sent(),i.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return r=i.sent(),r?[2,r.unsubscribe()]:[2,!0]}})})}function ee(e,t,n){return s(this,void 0,void 0,function(){var r,i,s;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,G(t,e)];case 1:return r=a.sent(),i=o(o({},e),{token:r,createTime:Date.now()}),[4,B(t,i)];case 2:return a.sent(),[2,r];case 3:return s=a.sent(),[4,Z(t,n)];case 4:throw a.sent(),s;case 5:return[2]}})})}function te(e,t){return s(this,void 0,void 0,function(){var n,r;return a(this,function(i){switch(i.label){case 0:return[4,q(e,t)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,B(e,r)];case 2:return i.sent(),[2,r.token]}})})}function ne(e,t){return s(this,void 0,void 0,function(){var n;return a(this,function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return n=r.sent(),n?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:P(t)})]}})})}function re(e,t){var n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,o=t.p256dh===e.p256dh;return n&&r&&i&&o}
83/**
84 * @license
85 * Copyright 2020 Google LLC
86 *
87 * Licensed under the Apache License, Version 2.0 (the "License");
88 * you may not use this file except in compliance with the License.
89 * You may obtain a copy of the License at
90 *
91 *   http://www.apache.org/licenses/LICENSE-2.0
92 *
93 * Unless required by applicable law or agreed to in writing, software
94 * distributed under the License is distributed on an "AS IS" BASIS,
95 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
96 * See the License for the specific language governing permissions and
97 * limitations under the License.
98 */function ie(e){var t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcm_message_id};return oe(t,e),se(t,e),ae(t,e),t}function oe(e,t){if(t.notification){e.notification={};var n=t.notification.title;n&&(e.notification.title=n);var r=t.notification.body;r&&(e.notification.body=r);var i=t.notification.image;i&&(e.notification.image=i)}}function se(e,t){t.data&&(e.data=t.data)}function ae(e,t){if(t.fcmOptions){e.fcmOptions={};var n=t.fcmOptions.link;n&&(e.fcmOptions.link=n);var r=t.fcmOptions.analytics_label;r&&(e.fcmOptions.analyticsLabel=r)}}
99/**
100 * @license
101 * Copyright 2019 Google LLC
102 *
103 * Licensed under the Apache License, Version 2.0 (the "License");
104 * you may not use this file except in compliance with the License.
105 * You may obtain a copy of the License at
106 *
107 *   http://www.apache.org/licenses/LICENSE-2.0
108 *
109 * Unless required by applicable law or agreed to in writing, softw
109are
110 * distributed under the License is distributed on an "AS IS" BASIS,
111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112 * See the License for the specific language governing permissions and
113 * limitations under the License.
114 */function ce(e){return"object"===typeof e&&!!e&&T in e}
115/**
116 * @license
117 * Copyright 2019 Google LLC
118 *
119 * Licensed under the Apache License, Version 2.0 (the "License");
120 * you may not use this file except in compliance with the License.
121 * You may obtain a copy of the License at
122 *
123 *   http://www.apache.org/licenses/LICENSE-2.0
124 *
125 * Unless required by applicable law or agreed to in writing, software
126 * distributed under the License is distributed on an "AS IS" BASIS,
127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128 * See the License for the specific language governing permissions and
129 * limitations under the License.
130 */function ue(e){return new Promise(function(t){setTimeout(t,e)})}
131/**
132 * @license
133 * Copyright 2017 Google LLC
134 *
135 * Licensed under the Apache License, Version 2.0 (the "License");
136 * you may not use this file except in compliance with the License.
137 * You may obtain a copy of the License at
138 *
139 *   http://www.apache.org/licenses/LICENSE-2.0
140 *
141 * Unless required by applicable law or agreed to in writing, software
142 * distributed under the License is distributed on an "AS IS" BASIS,
143 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
144 * See the License for the specific language governing permissions and
145 * limitations under the License.
146 */var le=function(){function e(e){var t=this;this.firebaseDependencies=e,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",function(e){e.waitUntil(t.onPush(e))}),self.addEventListener("pushsubscriptionchange",function(e){e.waitUntil(t.onSubChange(e))}),self.addEventListener("notificationclick",function(e){e.waitUntil(t.onNotificationClick(e))})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(e){if(this.isOnBackgroundMessageUsed=!1,!e||"function"!==typeof e)throw g.create("invalid-bg-handler");this.bgMessageHandler=e},e.prototype.onBackgroundMessage=function(e){var t=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=e,function(){t.bgMessageHandler=null}},e.prototype.getToken=function(){var e,t;return s(this,void 0,void 0,function(){var n;return a(this,function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,V(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(t=null===(e=null===n||void 0===n?void 0:n.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==t?t:w,r.label=2;case 2:return[2,Y(this.firebaseDependencies,self.registration,this.vapidKey)]}})})},e.prototype.deleteToken=function(){return Z(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw g.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw g.create("use-vapid-key-after-get-token");if("string"!==typeof e||0===e.length)throw g.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(){throw g.create("only-available-in-window")},e.prototype.onMessage=function(){throw g.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw g.create("only-available-in-window")},e.prototype.onPush=function(e){return s(this,void 0,void 0,function(){var t,n,r,i;return a(this,function(o){switch(o.label){case 0:return t=pe(e),t?[4,ge()]:(console.debug(S+"failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return n=o.sent(),he(n)?[2,ve(n,t)]:(r=!1,t.notification?[4,be(fe(t))]:[3,3]);case 2:o.sent(),r=!0,o.label=3;case 3:return!0===r&&!1===this.isOnBackgroundMessageUsed?[2]:(this.bgMessageHandler&&(i=ie(t),"function"===typeof this.bgMessageHandler?this.bgMessageHandler(i):this.bgMessageHandler.next(i)),[4,ue(O)]);case 4:return o.sent(),[2]}})})},e.prototype.onSubChange=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i;return a(this,function(o){switch(o.label){case 0:return r=e.newSubscription,r?[3,2]:[4,Z(this.firebaseDependencies,self.registration)];case 1:return o.sent(),[2];case 2:return[4,V(this.firebaseDependencies)];case 3:return i=o.sent(),[4,Z(this.firebaseDependencies,self.registration)];case 4:return o.sent(),[4,Y(this.firebaseDependencies,self.registration,null!==(n=null===(t=null===i||void 0===i?void 0:i.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==n?n:w)];case 5:return o.sent(),[2]}})})},e.prototype.onNotificationClick=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i,o,s,c;return a(this,function(a){switch(a.label){case 0:return r=null===(n=null===(t=e.notification)||void 0===t?void 0:t.data)||void 0===n?void 0:n[k],r?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),i=ye(r),i?(o=new URL(i,self.location.href),s=new URL(self.location.origin),o.host!==s.host?[2]:[4,de(o)]):[2]):[2];case 1:return c=a.sent(),c?[3,4]:[4,self.clients.openWindow(i)];case 2:return c=a.sent(),[4,ue(C)];case 3:return a.sent(),[3,6];case 4:return[4,c.focus()];case 5:c=a.sent(),a.label=6;case 6:return c?(r.messageType=p.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,[2,c.postMessage(r)]):[2]}})})},e}();function fe(e){var t,n=o({},e.notification);return n.data=(t={},t[k]=e,t),n}function pe(e){var t=e.data;if(!t)return null;try{return t.json()}catch(n){return null}}function de(e){return s(this,void 0,void 0,function(){var t,n,r,i,o,s,u;return a(this,function(a){switch(a.label){case 0:return[4,ge()];case 1:t=a.sent();try{for(n=c(t),r=n.next();!r.done;r=n.next())if(i=r.value,o=new URL(i.url,self.location.href),e.host===o.host)return[2,i]}catch(l){s={error:l}}finally{try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(s)throw s.error}}return[2,null]}})})}function he(e){return e.some(function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")})}function ve(e,t){var n,r;t.isFirebaseMessaging=!0,t.messageType=p.PUSH_RECEIVED;try{for(var i=c(e),o=i.next();!o.done;o=i.next()){var s=o.value;s.postMessage(t)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function ge(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function be(e){var t,n=e.actions,r=Notification.maxActions;return n&&r&&n.length>r&&console.warn("This browser only supports "+r+" actions. The remaining actions will not be displayed."),self.registration.showNotification(null!==(t=e.title)&&void 0!==t?t:"",e)}function ye(e){var t,n,r,i=null!==(n=null===(t=e.fcmOptions)||void 0===t?void 0:t.link)&&void 0!==n?n:null===(r=e.notification)||void 0===r?void 0:r.click_action;
146return i||(ce(e.data)?self.location.origin:null)}
147/**
148 * @license
149 * Copyright 2017 Google LLC
150 *
151 * Licensed under the Apache License, Version 2.0 (the "License");
152 * you may not use this file except in compliance with the License.
153 * You may obtain a copy of the License at
154 *
155 *   http://www.apache.org/licenses/LICENSE-2.0
156 *
157 * Unless required by applicable law or agreed to in writing, software
158 * distributed under the License is distributed on an "AS IS" BASIS,
159 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
160 * See the License for the specific language governing permissions and
161 * limitations under the License.
162 */var we=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",function(e){return t.messageEventListener(e)})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.messageEventListener=function(e){return s(this,void 0,void 0,function(){var t,n;return a(this,function(r){switch(r.label){case 0:return t=e.data,t.isFirebaseMessaging?(this.onMessageCallback&&t.messageType===p.PUSH_RECEIVED&&("function"===typeof this.onMessageCallback?this.onMessageCallback(ke(Object.assign({},t))):this.onMessageCallback.next(Object.assign({},t))),n=t.data,ce(n)&&"1"===n[M]?[4,this.logEvent(t.messageType,n)]:[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},e.prototype.getVapidKey=function(){return this.vapidKey},e.prototype.getSwReg=function(){return this.swRegistration},e.prototype.getToken=function(e){return s(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return"default"!==Notification.permission?[3,2]:[4,Notification.requestPermission()];case 1:t.sent(),t.label=2;case 2:if("granted"!==Notification.permission)throw g.create("permission-blocked");return[4,this.updateVapidKey(null===e||void 0===e?void 0:e.vapidKey)];case 3:return t.sent(),[4,this.updateSwReg(null===e||void 0===e?void 0:e.serviceWorkerRegistration)];case 4:return t.sent(),[2,Y(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}})})},e.prototype.updateVapidKey=function(e){return s(this,void 0,void 0,function(){return a(this,function(t){return e?this.vapidKey=e:this.vapidKey||(this.vapidKey=w),[2]})})},e.prototype.updateSwReg=function(e){return s(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return e||this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:if(!e&&this.swRegistration)return[2];if(!(e instanceof ServiceWorkerRegistration))throw g.create("invalid-sw-registration");return this.swRegistration=e,[2]}})})},e.prototype.registerDefaultSw=function(){return s(this,void 0,void 0,function(){var e,t;return a(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this,[4,navigator.serviceWorker.register(b,{scope:y})];case 1:return e.swRegistration=n.sent(),this.swRegistration.update().catch(function(){}),[3,3];case 2:throw t=n.sent(),g.create("failed-service-worker-registration",{browserErrorMessage:t.message});case 3:return[2]}})})},e.prototype.deleteToken=function(){return s(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:return[2,Z(this.firebaseDependencies,this.swRegistration)]}})})},e.prototype.requestPermission=function(){return s(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if(e=t.sent(),"granted"===e)return[2];throw"denied"===e?g.create("permission-blocked"):g.create("permission-default")}})})},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw g.create("use-vapid-key-after-get-token");if("string"!==typeof e||0===e.length)throw g.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw g.create("invalid-sw-registration");if(this.swRegistration)throw g.create("use-sw-after-get-token");this.swRegistration=e},e.prototype.onMessage=function(e){var t=this;return this.onMessageCallback=e,function(){t.onMessageCallback=null}}
162,e.prototype.setBackgroundMessageHandler=function(){throw g.create("only-available-in-sw")},e.prototype.onBackgroundMessage=function(){throw g.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.logEvent=function(e,t){return s(this,void 0,void 0,function(){var n,r;return a(this,function(i){switch(i.label){case 0:return n=me(e),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r=i.sent(),r.logEvent(n,{message_id:t[T],message_name:t[K],message_time:t[I],message_device_time:Math.floor(Date.now()/1e3)}),[2]}})})},e}();function me(e){switch(e){case p.NOTIFICATION_CLICKED:return"notification_open";case p.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}function ke(e){return delete e.messageType,delete e.isFirebaseMessaging,e}
163/**
164 * @license
165 * Copyright 2019 Google LLC
166 *
167 * Licensed under the Apache License, Version 2.0 (the "License");
168 * you may not use this file except in compliance with the License.
169 * You may obtain a copy of the License at
170 *
171 *   http://www.apache.org/licenses/LICENSE-2.0
172 *
173 * Unless required by applicable law or agreed to in writing, software
174 * distributed under the License is distributed on an "AS IS" BASIS,
175 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
176 * See the License for the specific language governing permissions and
177 * limitations under the License.
178 */function Se(e){var t,n;if(!e||!e.options)throw Me("App Configuration Object");if(!e.name)throw Me("App Name");var r=["projectId","apiKey","appId","messagingSenderId"],i=e.options;try{for(var o=c(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(!i[a])throw Me(a)}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return{appName:e.name,projectId:i.projectId,apiKey:i.apiKey,appId:i.appId,senderId:i.messagingSenderId}}function Me(e){return g.create("missing-app-config-values",{valueName:e})}
179/**
180 * @license
181 * Copyright 2017 Google LLC
182 *
183 * Licensed under the Apache License, Version 2.0 (the "License");
184 * you may not use this file except in compliance with the License.
185 * You may obtain a copy of the License at
186 *
187 *   http://www.apache.org/licenses/LICENSE-2.0
188 *
189 * Unless required by applicable law or agreed to in writing, software
190 * distributed under the License is distributed on an "AS IS" BASIS,
191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
192 * See the License for the specific language governing permissions and
193 * limitations under the License.
194 */var Te="messaging";function Ie(e){var t=e.getProvider("app").getImmediate(),n=Se(t),r=e.getProvider("installations").getImmediate(),i=e.getProvider("analytics-internal"),o={app:t,appConfig:n,installations:r,analyticsProvider:i};if(!Oe())throw g.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new le(o):new we(o)}var Ke={isSupported:Oe};function Oe(){return self&&"ServiceWorkerGlobalScope"in self?De():Ce()}function Ce(){return"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}function De(){return"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}h.A.INTERNAL.registerComponent(new r.uA(Te,Ie,"PUBLIC").setServiceProps(Ke))}}]);
195//# sourceMappingURL=621-legacy.5f327deb.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.