text: try{webpackJsonpFirebase([3],{116:function(a,b,c){c(117)},117:function(g,e,j){"use strict";function q(a){var b=new Uint8Array(a);return window.btoa(String.fromCharCode.apply(null,b))}function n(a){a.INTERNAL.registerService("messaging",function(a){return self&&"ServiceWorkerGlobalScope"in self?new D(a):new w(a)},{Messaging:w})}Object.defineProperty(e,"__esModule",{value:!0});var o,i=j(0),r={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key"},s=(o={},o[r.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",o[r.AVAILABLE_IN_SW]="This method is available in a service worker context.",o["should-be-overriden"]="This method should be overriden by extended classes.",o["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",o["permission-default"]="The required permissions were not granted and dismissed instead.",o["permission-blocked"]="The required permissions were not granted and blocked instead.",o["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",o["notifications-blocked"]="Notifications have been blocked.",o[r.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",o["sw-registration-expected"]="A service worker registration was the expected input.",o["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",o["invalid-saved-token"]="Unable to access details of the saved token.",o["sw-reg-redundant"]="The service worker being used for push was made redundant.",o["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$message}",o["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",o["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",o["use-sw-before-get-token"]="You must call useServiceWorker() before calling getToken() to ensure your service worker is used.",o["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",o["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",o["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",o["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",o["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",o["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",o["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",o["failed-to-delete-token"]="Unable to delete the currently saved token.",o["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",o["incorrect-gcm-sender-id"]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",o["bad-scope"]="The service worker scope must be a string with at least one character.",o["bad-vapid-key"]="The public VAPID key must be a string with at least one character.",o["bad-subscription"]="The subscription must be a valid PushSubscription.",o["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",o["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",o["failed-delete-vapid-key"]="The VAPID key could not be deleted.",o),v={codes:r,map:s},u=function(a){return q(a).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},t=[4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110],x={userVisibleOnly:!0,applicationServerKey:new Uint8Array(t)},z={ENDPOINT:"https://fcm.googleapis.com",APPLICATION_SERVER_KEY:t,SUBSCRIPTION_OPTIONS:x},h="fcm_token_object_Store",p=function(){function a(){this.e=new i.ErrorFactory("messaging","Messaging",v.map),this.t=null}return a.prototype.r=function(){return this.t?this.t:(this.t=new Promise(function(b,c){var d=indexedDB.open(a.DB_NAME,1);d.onerror=function(a){c(a.target.error)},d.onsuccess=function(a){b(a.target.result)},d.onupgradeneeded=function(a){var b=a.target.result,c=b.createObjectStore(h,{keyPath:"swScope"});c.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),c.createIndex("fcmToken","fcmToken",{unique:!0})}}),this.t)},a.prototype.closeDatabase=function(){var a=this;return this.t?this.t.then(function(b){b.close(),a.t=null}):Promise.resolve()},a.prototype.getTokenDetailsFromToken=function(b){return this.r().then(function(c){return new Promise(function(d,f){var e=c.transaction([h]),g=e.objectStore(h),i=g.index("fcmToken"),j=i.get(b);j.onerror=function(a){f(a.target.error)},j.onsuccess=function(a){d(a.target.result)}})})},a.prototype.n=function(a){return this.r().then(function(b){return new Promise(function(c,d){var e=b.transaction([h]),f=e.objectStore(h),g=f.get(a);g.onerror=function(a){d(a.target.error)},g.onsuccess=function(a){c(a.target.result)}})})},a.prototype.o=function(a){return this.r().then(function(b){return new Promise(function(c,d){var e=b.transaction([h]),f=e.objectStore(h),g=[],i=f.openCursor();i.onerror=function(a){d(a.target.error)},i.onsuccess=function(b){var d=b.target.result;d?(d.value.fcmSenderId===a&&g.push(d.value),d.continue()):c(g)}})})},a.prototype.subscribeToFCM=function(b,d,e){var f=this,g=u(d.getKey("p256dh")),h=u(d.getKey("auth")),i="authorized_entity="+b+"&endpoint="+d.endpoint+"&encryption_key="+g+"&encryption_auth="+h;e&&(i+="&pushSet="+e);var j=new Headers;j.append("Content-Type","application/x-www-form-urlencoded");var k={method:"POST",headers:j,body:i};return fetch(z.ENDPOINT+"/fcm/connect/subscribe",k).then(function(a){return a.json()}).then(function(a){var b=a;if(b.error){var c=b.error.message;throw f.e.create(v.codes.TOKEN_SUBSCRIBE_FAILED,{message:c})}if(!b.token)throw f.e.create(v.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!b.pushSet)throw f.e.create(v.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:b.token,pushSet:b.pushSet}})},a.prototype.i=function(a,b){return a.endpoint===b.endpoint&&u(a.getKey("auth"))===b.auth&&u(a.getKey("p256dh"))===b.p256dh},a.prototype.s=function(a,b,c,d,f){var g={swScope:b.scope,endpoint:c.endpoint,auth:u(c.getKey("auth")),p256dh:u(c.getKey("p256dh")),fcmToken:d,fcmPushSet:f,fcmSenderId:a};return this.r().then(function(a){return new Promise(function(b,c){var d=a.transaction([h],"readwrite"),e=d.objectStore(h),f=e.put(g);f.onerror=function(a){c(a.target.error)},f.onsuccess=function(){b()}})})},a.prototype.getSavedToken=function(a,b){var c=this;return b instanceof ServiceWorkerRegistration?"string"!=typeof a||0===a.length?Promise.reject(this.e.create(v.codes.BAD_SENDER_ID)):this.o(a).then(function(c){if(0!==c.length){var d=c.findIndex(function(c){return b.scope===c.swScope&&a===c.fcmSenderId});if(-1!==d)return c[d]}}).then(function(a){if(a)return b.pushManager.getSubscription().catch(function(){throw c.e.create(v.codes.GET_SUBSCRIPTION_FAILED)}).then(function(b){if(b&&c.i(b,a))return a.fcmToken})}):Promise.reject(this.e.create(v.codes.SW_REGISTRATION_EXPECTED))},a.prototype.createToken=function(a,b){var c=this;if("string"!=typeof a||0===a.length)return Promise.reject(this.e.create(v.codes.BAD_SENDER_ID));if(!(b instanceof ServiceWorkerRegistration))return Promise.reject(this.e.create(v.codes.SW_REGISTRATION_EXPECTED));var d,f;return b.pushManager.getSubscription().then(function(a){return a||b.pushManager.subscribe(z.SUBSCRIPTION_OPTIONS)}).then(function(b){return d=b,c.subscribeToFCM(a,d)}).then(function(e){return f=e,c.s(a,b,d,f.token,f.pushSet)}).then(function(){return f.token})},a.prototype.deleteToken=function(a){var b=this;return"string"!=typeof a||0===a.length?Promise.reject(this.e.create(v.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(a).then(function(c){if(!c)throw b.e.create(v.codes.DELETE_TOKEN_NOT_FOUND);return b.r().then(function(d){return new Promise(function(e,f){var g=d.transaction([h],"readwrite"),i=g.objectStore(h),j=i.delete(c.swScope);j.onerror=function(a){f(a.target.error)},j.onsuccess=function(a){return 0===a.target.result?void f(b.e.create(v.codes.FAILED_TO_DELETE_TOKEN)):void e(c)}})})})},a}(),l="messagingSenderId",B=function(){function a(a){var b=this;if(this.e=new i.ErrorFactory("messaging","Messaging",v.map),!a.options[l]||"string"!=typeof a.options[l])throw this.e.create(v.codes.BAD_SENDER_ID);this.a=a.options[l],this.c=new p,this.app=a,this.INTERNAL={},this.INTERNAL.delete=function(){return b.delete}}return a.prototype.getToken=function(){var a=this,b=this.u();return"granted"===b?this._().then(function(b){return a.c.getSavedToken(a.a,b).then(function(c){return c||a.c.createToken(a.a,b)})}):"denied"===b?Promise.reject(this.e.create(v.codes.NOTIFICATIONS_BLOCKED)):Promise.resolve(null)},a.prototype.deleteToken=function(a){var b=this;return this.c.deleteToken(a).then(function(){return b._().then(function(a){if(a)return a.pushManager.getSubscription()}).then(function(a){if(a)return a.unsubscribe()})})},a.prototype._=function(){throw this.e.create(v.codes.SHOULD_BE_INHERITED)},a.prototype.requestPermission=function(){throw this.e.create(v.codes.AVAILABLE_IN_WINDOW)},a.prototype.useServiceWorker=function(){throw this.e.create(v.codes.AVAILABLE_IN_WINDOW)},a.prototype.onMessage=function(){throw this.e.create(v.codes.AVAILABLE_IN_WINDOW)},a.prototype.onTokenRefresh=function(){throw this.e.create(v.codes.AVAILABLE_IN_WINDOW)},a.prototype.setBackgroundMessageHandler=function(){throw this.e.create(v.codes.AVAILABLE_IN_SW)},a.prototype.delete=function(){return this.c.closeDatabase()},a.prototype.u=function(){return Notification.permission},a.prototype.getTokenManager=function(){return this.c},a}(),C=B,E={TYPE_OF_MSG:"firebase-messaging-msg-type",DATA:"firebase-messaging-msg-data"},F={PARAMS:E,TYPES_OF_MSG:{PUSH_MSG_RECEIVED:"push-msg-received",NOTIFICATION_CLICKED:"notification-clicked"},createNewMsg:function(a,b){return c={},c[E.TYPE_OF_MSG]=a,c[E.DATA]=b,c;var c}},m={path:"/firebase-messaging-sw.js",scope:"/firebase-cloud-messaging-push-scope"},y=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return function(b,c){function d(){this.constructor=b}a(b,c),b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),G=function(a){function b(b){var c=a.call(this,b)||this;return c.d,c.f,c.h=null,c.p=Object(i.createSubscribe)(function(a){c.h=a}),c.l=null,c.g=Object(i.createSubscribe)(function(a){c.l=a}),c.T(),c}return y(b,a),b.prototype.getToken=function(){var b=this;return this.S()?this.b().then(function(){return a.prototype.getToken.call(b)}):Promise.reject(this.e.create(v.codes.UNSUPPORTED_BROWSER))},b.prototype.b=function(){var a=this;if(this.f)return this.f;var b=document.querySelector("link[rel=\"manifest\"]");return this.f=b?fetch(b.href).then(function(a){return a.json()}).catch(function(){return Promise.resolve()}).then(function(b){if(b&&b.gcm_sender_id&&"103953800507"!==b.gcm_sender_id)throw a.e.create(v.codes.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.f},b.prototype.requestPermission=function(){var a=this;return"granted"===Notification.permission?Promise.resolve():new Promise(function(b,c){var d=function(d){return"granted"===d?b():c("denied"===d?a.e.create(v.codes.PERMISSION_BLOCKED):a.e.create(v.codes.PERMISSION_DEFAULT))},f=Notification.requestPermission(function(a){f||d(a)});f&&f.then(d)})},b.prototype.useServiceWorker=function(a){if(!(a instanceof ServiceWorkerRegistration))throw this.e.create(v.codes.SW_REGISTRATION_EXPECTED);if(void 0!==this.d)throw this.e.create(v.codes.USE_SW_BEFORE_GET_TOKEN);this.d=a},b.prototype.onMessage=function(a,b,c){return this.p(a,b,c)},b.prototype.onTokenRefresh=function(a,b,c){return this.g(a,b,c)},b.prototype.v=function(a){var b=this,c=a.installing||a.waiting||a.active;return new Promise(function(d,e){if(!c)return void e(b.e.create(v.codes.NO_SW_IN_REG));if("activated"===c.state)return void d(a);if("redundant"===c.state)return void e(b.e.create(v.codes.SW_REG_REDUNDANT));var f=function(){if("activated"===c.state)d(a);else{if("redundant"!==c.state)return;e(b.e.create(v.codes.SW_REG_REDUNDANT))}c.removeEventListener("statechange",f)};c.addEventListener("statechange",f)})},b.prototype._=function(){var a=this;return this.d?this.v(this.d):(this.d=null,navigator.serviceWorker.register(m.path,{scope:m.scope}).catch(function(b){throw a.e.create(v.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:b.message})}).then(function(b){return a.v(b).then(function(){return a.d=b,b.update(),b})}))},b.prototype.T=function(){var a=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(b){if(b.data&&b.data[F.PARAMS.TYPE_OF_MSG]){var c=b.data;switch(c[F.PARAMS.TYPE_OF_MSG]){case F.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case F.TYPES_OF_MSG.NOTIFICATION_CLICKED:var d=c[F.PARAMS.DATA];a.h.next(d);}}},!1)},b.prototype.S=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},b}(C),w=G,H=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return function(b,c){function d(){this.constructor=b}a(b,c),b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),I=function(a){function b(b){var c=a.call(this,b)||this;return self.addEventListener("push",function(a){return c.I(a)},!1),self.addEventListener("pushsubscriptionchange",function(a){return c.m(a)},!1),self.addEventListener("notificationclick",function(a){return c.y(a)},!1),c.N=null,c}return H(b,a),b.prototype.I=function(a){var b,c=this;try{b=a.data.json()}catch(a){return}var d=this.w().then(function(a){if(!a){var d=c.O(b);if(d){var f=d.title||"";return self.registration.showNotification(f,d)}if(c.N)return c.N(b)}else if(b.notification||c.N)return c.k(b)});a.waitUntil(d)},b.prototype.m=function(a){var b=this,c=this.getToken().then(function(a){if(!a)throw b.e.create(v.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var c=null,d=b.getTokenManager();return d.getTokenDetailsFromToken(a).then(function(a){if(!(c=a))throw b.e.create(v.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(z.SUBSCRIPTION_OPTIONS)}).then(function(a){return d.subscribeToFCM(c.fcmSenderId,a,c.fcmPushSet)}).catch(function(a){return d.deleteToken(c.fcmToken).then(function(){throw b.e.create(v.codes.UNABLE_TO_RESUBSCRIBE,{message:a})})})});a.waitUntil(c)},b.prototype.y=function(a){var b=this;if(a.notification&&a.notification.data&&a.notification.data.FCM_MSG){a.stopImmediatePropagation(),a.notification.close();var c=a.notification.data.FCM_MSG,d=c.notification.click_action;if(d){var e=this.D(d).then(function(a){return a||self.clients.openWindow(d)}).then(function(a){if(a){c.notification,delete c.notification;var d=F.createNewMsg(F.TYPES_OF_MSG.NOTIFICATION_CLICKED,c);return b.A(a,d)}});a.waitUntil(e)}}},b.prototype.O=function(a){if(a&&"object"==typeof a.notification){var b=Object.assign({},a.notification);return b.data=(c={},c.FCM_MSG=a,c),b;var c}},b.prototype.setBackgroundMessageHandler=function(a){if(a&&"function"!=typeof a)throw this.e.create(v.codes.BG_HANDLER_FUNCTION_EXPECTED);this.N=a},b.prototype.D=function(a){var b=new URL(a).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(a){for(var c=null,d=0;d<a.length;d++)if(new URL(a[d].url).href===b){c=a[d];break}if(c)return c.focus(),c})},b.prototype.A=function(a,b){var c=this;return new Promise(function(d,e){return a?void(a.postMessage(b),d()):e(c.e.create(v.codes.NO_WINDOW_CLIENT_TO_MSG))})},b.prototype.w=function(){return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(a){return a.some(function(a){return"visible"===a.visibilityState})})},b.prototype.k=function(a){var b=this;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(c){var d=F.createNewMsg(F.TYPES_OF_MSG.PUSH_MSG_RECEIVED,a);return Promise.all(c.map(function(a){return b.A(a,d)}))})},b.prototype._=function(){return Promise.resolve(self.registration)},b}(C),D=I,A=j(6);e.registerMessaging=n,n(A.default)}},[116])}catch(a){throw Error("Cannot instantiate firebase-messaging.js - be sure to load firebase-app.js first.")}