!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).firebase=t()}(this,function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function n(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 r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function i(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=i(e[n],t[n]));return e}var o=(s.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,r))}},s);function s(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}var a,c,u,l="FirebaseError",f=(a=Error,e(c=d,u=a),c.prototype=null===u?Object.create(u):(p.prototype=u.prototype,new p),d);function p(){this.constructor=c}function d(e,t){var n=a.call(this,t)||this;return n.code=e,n.name=l,Object.setPrototypeOf(n,d.prototype),Error.captureStackTrace&&Error.captureStackTrace(n,h.prototype.create),n}var h=(v.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r,i=t[0]||{},o=this.service+"/"+e,s=this.errors[e],a=s?(r=i,s.replace(g,function(e,t){var n=r[t];return null!=n?String(n):"<"+t+"?>"})):"Error",c=this.serviceName+": "+a+" ("+o+").",u=new f(o,c),l=0,p=Object.keys(i);l<p.length;l++){var d=p[l];"_"!==d.slice(-1)&&(d in u&&console.warn('Overwriting FirebaseError base field "'+d+'" can cause unexpected behavior.'),u[d]=i[d])}return u},v);function v(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var g=/\{\$([^}]+)}/g;function b(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function y(e,t){var n=new m(e,t);return n.subscribe.bind(n)}var m=(w.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},w.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},w.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},w.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=["next","error","complete"];n<r.length;n++){var i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}(e)?e:{next:e,error:t,complete:n}).next&&(r.next=k),void 0===r.error&&(r.error=k),void 0===r.complete&&(r.complete=k);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}}),this.observers.push(r),o},w.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],--this.observerCount,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},w.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},w.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},w.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},w);function w(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}function k(){}var _=(S.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},S.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},S.prototype.setServiceProps=function(e){return this.serviceProps=e,this},S);function S(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}var I="[DEFAULT]",E=(C.prototype.get=function(e){void 0===e&&(e=I);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new o;this.instancesDeferred.set(t,n);try{var r=this.getOrInitializeService(t);r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},C.prototype.getImmediate=function(e){var n=t({identifier:I,optional:!1},e),r=n.identifier,i=n.optional,o=this.normalizeInstanceIdentifier(r);try{var s=this.getOrInitializeService(o);if(s)return s;if(i)return null;throw Error("Service "+this.name+" is not available")}catch(e){if(i)return null;throw e}},C.prototype.getComponent=function(){return this.component},C.prototype.setComponent=function(e){var t,i;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if("EAGER"===(this.component=e).instantiationMode)try{this.getOrInitializeService(I)}catch(e){}try{for(var o=n(this.instancesDeferred.entries()),s=o.next();!s.done;s=o.next()){var a=r(s.value,2),c=a[0],u=a[1],l=this.normalizeInstanceIdentifier(c);try{var f=this.getOrInitializeService(l);u.resolve(f)}catch(e){}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}},C.prototype.clearInstance=function(e){void 0===e&&(e=I),this.instancesDeferred.delete(e),this.instances.delete(e)},C.prototype.delete=function(){return function(e,t,n,r){return new(n=n||Promise)(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}(this,void 0,void 0,function(){var e;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=0<(i=o.trys).length&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}(this,function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(e.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}),e.filter(function(e){return"_delete"in e}).map(function(e){return e._delete()})))];case 1:return t.sent(),[2]}})})},C.prototype.isComponentSet=function(){return null!=this.component},C.prototype.getOrInitializeService=function(e){var t,n=this.instances.get(e);return!n&&this.component&&(n=this.component.instanceFactory(this.container,(t=e)===I?void 0:t),this.instances.set(e,n)),n||null},C.prototype.normalizeInstanceIdentifier=function(e){return!this.component||this.component.multipleInstances?e:I},C);function C(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}var O,P=(T.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},T.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},T.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new E(e,this);return this.providers.set(e,t),t},T.prototype.getProviders=function(){return Array.from(this.providers.values())},T);function T(e){this.name=e,this.providers=new Map}function D(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var N,x,j=[];function A(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var i=(new Date).toISOString(),o=K[t];if(!o)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[o].apply(console,D(["["+i+"] "+e.name+":"],n))}}(x=N=N||{})[x.DEBUG=0]="DEBUG",x[x.VERBOSE=1]="VERBOSE",x[x.INFO=2]="INFO",x[x.WARN=3]="WARN",x[x.ERROR=4]="ERROR",x[x.SILENT=5]="SILENT";var M,R={debug:N.DEBUG,verbose:N.VERBOSE,info:N.INFO,warn:N.WARN,error:N.ERROR,silent:N.SILENT},L=N.INFO,K=((O={})[N.DEBUG]="log",O[N.VERBOSE]="log",O[N.INFO]="info",O[N.WARN]="warn",O[N.ERROR]="error",O),F=(Object.defineProperty(B.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in N))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),B.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?R[e]:e},Object.defineProperty(B.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),B.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,D([this,N.DEBUG],e)),this._logHandler.apply(this,D([this,N.DEBUG],e))},B.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,D([this,N.VERBOSE],e)),this._logHandler.apply(this,D([this,N.VERBOSE],e))},B.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,D([this,N.INFO],e)),this._logHandler.apply(this,D([this,N.INFO],e))},B.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,D([this,N.WARN],e)),this._logHandler.apply(this,D([this,N.WARN],e))},B.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,D([this,N.ERROR],e)),this._logHandler.apply(this,D([this,N.ERROR],e))},B);function B(e){this.name=e,this._logLevel=L,this._logHandler=A,this._userLogHandler=null,j.push(this)}function H(e){j.forEach(function(t){t.setLogLevel(e)})}var V,q=((M={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",M["bad-app-name"]="Illegal App name: '{$appName}",M["duplicate-app"]="Firebase App named '{$appName}' already exists",M["app-deleted"]="Firebase App named '{$appName}' already deleted",M["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",M["invalid-log-argument"]="First argument to `onLog` must be null or a function.",M),W=new h("app","Firebase",q),U="@firebase/app",z="[DEFAULT]",$=((V={})[U]="fire-core",V["@firebase/analytics"]="fire-analytics",V["@firebase/auth"]="fire-auth",V["@firebase/database"]="fire-rtdb",V["@firebase/functions"]="fire-fn",V["@firebase/installations"]="fire-iid",V["@firebase/messaging"]="fire-fcm",V["@firebase/performance"]="fire-perf",V["@firebase/remote-config"]="fire-rc",V["@firebase/storage"]="fire-gcs",V["@firebase/firestore"]="fire-fst",V["fire-js"]="fire-js",V["firebase-wrapper"]="fire-js-all",V),G=new F("@firebase/app"),Y=(Object.defineProperty(J.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(J.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),J.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map(function(e){return e.delete()}))}).then(function(){e.isDeleted_=!0})},J.prototype._getService=function(e,t){return void 0===t&&(t=z),this.checkDestroyed_(),this.container.getProvider(e).getImmediate({identifier:t})},J.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=z),this.container.getProvider(e).clearInstance(t)},J.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){G.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},J.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},J.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw W.create("app-deleted",{appName:this.name_})},J);function J(e,t,r){var o,s,a=this;this.firebase_=r,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=i(void 0,e),this.container=new P(t.name),this._addComponent(new _("app",function(){return a},"PUBLIC"));try{for(var c=n(this.firebase_.INTERNAL.components.values()),u=c.next();!u.done;u=c.next()){var l=u.value;this._addComponent(l)}}catch(e){o={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}}Y.prototype.name&&Y.prototype.options||Y.prototype.delete||console.log("dc");var Z="7.22.1";var Q,X=function e(){var r=function(e){var t={},r=new Map,o={__esModule:!0,initializeApp:function(n,r){void 0===r&&(r={}),"object"==typeof r&&null!==r||(r={name:r});var i=r;void 0===i.name&&(i.name=z);var s=i.name;if("string"!=typeof s||!s)throw W.create("bad-app-name",{appName:String(s)});if(b(t,s))throw W.create("duplicate-app",{appName:s});var a=new e(n,i,o);return t[s]=a},app:s,registerVersion:function(e,t,n){var r,i=null!==(r=$[e])&&void 0!==r?r:e;n&&(i+="-"+n);var o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){var c=['Unable to register library "'+i+'" with version "'+t+'":'];return o&&c.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&s&&c.push("and"),s&&c.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void G.warn(c.join(" "))}a(new _(i+"-version",function(){return{library:i,version:t}},"VERSION"))},setLogLevel:H,onLog:function(e,t){if(null!==e&&"function"!=typeof e)throw W.create("invalid-log-argument",{appName:name});!function(e,t){for(var n=0,r=j;n<r.length;n++)!function(n){var r=null;t&&t.level&&(r=R[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];var s=i.map(function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(function(e){return e}).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:N[n].toLowerCase(),message:s,args:i,type:t.name})}}(r[n])}(e,t)},apps:null,SDK_VERSION:Z,INTERNAL:{registerComponent:a,removeApp:function(e){delete t[e]},components:r,useAsService:function(e,t){return"serverAuth"===t?null:t}}};function s(e){if(!b(t,e=e||z))throw W.create("no-app",{appName:e});return t[e]}function a(a){var c,u,l,f=a.name;if(r.has(f))return G.debug("There were multiple attempts to register component "+f+"."),"PUBLIC"===a.type?o[f]:null;r.set(f,a),"PUBLIC"===a.type&&(l=function(e){if(void 0===e&&(e=s()),"function"!=typeof e[f])throw W.create("invalid-app-argument",{appName:f});return e[f]()},void 0!==a.serviceProps&&i(l,a.serviceProps),o[f]=l,e.prototype[f]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._getService.bind(this,f).apply(this,a.multipleInstances?e:[])});try{for(var p=n(Object.keys(t)),d=p.next();!d.done;d=p.next()){var h=d.value;t[h]._addComponent(a)}}catch(u){c={error:u}}finally{try{d&&!d.done&&(u=p.return)&&u.call(p)}finally{if(c)throw c.error}}return"PUBLIC"===a.type?o[f]:null}return o.default=o,Object.defineProperty(o,"apps",{get:function(){return Object.keys(t).map(function(e){return t[e]})}}),s.App=e,o}(Y);return r.INTERNAL=t(t({},r.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){i(r,e)},createSubscribe:y,ErrorFactory:h,deepExtend:i}),r}(),ee=(te.prototype.getPlatformInfoString=function(){return this.container.getProviders().map(function(e){if("VERSION"!==(null==(t=e.getComponent())?void 0:t.type))return null;var t,n=e.getImmediate();return n.library+"/"+n.version}).filter(function(e){return e}).join(" ")},te);function te(e){this.container=e}"object"==typeof self&&self.self===self&&void 0!==self.firebase&&(G.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n "),(Q=self.firebase.SDK_VERSION)&&0<=Q.indexOf("LITE")&&G.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n "));var ne=X.initializeApp;X.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(e){return}}()&&G.warn('\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/rollup-plugin-node-resolve\n '),ne.apply(void 0,e)};var re,ie=X;return(re=ie).INTERNAL.registerComponent(new _("platform-logger",function(e){return new ee(e)},"PRIVATE")),re.registerVersion(U,"0.6.11",void 0),re.registerVersion("fire-js",""),ie.registerVersion("firebase","7.22.1","app"),ie}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).firebase)}(this,function(e){"use strict";try{(function(){var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e),n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t,n,r){return new(n=n||Promise)(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function o(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=0<(i=o.trys).length&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function s(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 a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}(arguments[t]));return e}var c,u,l,f="FirebaseError",p=(c=Error,n(u=h,l=c),u.prototype=null===l?Object.create(l):(d.prototype=l.prototype,new d),h);function d(){this.constructor=u}function h(e,t){var n=c.call(this,t)||this;return n.code=e,n.name=f,Object.setPrototypeOf(n,h.prototype),Error.captureStackTrace&&Error.captureStackTrace(n,v.prototype.create),n}var v=(g.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r,i=t[0]||{},o=this.service+"/"+e,s=this.errors[e],a=s?(r=i,s.replace(b,function(e,t){var n=r[t];return null!=n?String(n):"<"+t+"?>"})):"Error",c=this.serviceName+": "+a+" ("+o+").",u=new p(o,c),l=0,f=Object.keys(i);l<f.length;l++){var d=f[l];"_"!==d.slice(-1)&&(d in u&&console.warn('Overwriting FirebaseError base field "'+d+'" can cause unexpected behavior.'),u[d]=i[d])}return u},g);function g(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var b=/\{\$([^}]+)}/g,y=(m.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},m.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},m.prototype.setServiceProps=function(e){return this.serviceProps=e,this},m);function m(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}function w(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function k(e,t,n){var r,i=new Promise(function(i,o){w(r=e[t].apply(e,n)).then(i,o)});return i.request=r,i}function _(e,t,n){n.forEach(function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})})}function S(e,t,n,r){r.forEach(function(r){r in n.prototype&&(e.prototype[r]=function(){return k(this[t],r,arguments)})})}function I(e,t,n,r){r.forEach(function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})})}function E(e,t,n,r){r.forEach(function(r){r in n.prototype&&(e.prototype[r]=function(){return e=this[t],(n=k(e,r,arguments)).then(function(e){if(e)return new O(e,n.request)});var e,n})})}function C(e){this._index=e}function O(e,t){this._cursor=e,this._request=t}function P(e){this._store=e}function T(e){this._tx=e,this.complete=new Promise(function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}})}function D(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new T(n)}function N(e){this._db=e}function x(e,t,n){var r=k(indexedDB,"open",[e,t]),i=r.request;return i&&(i.onupgradeneeded=function(e){n&&n(new D(i.result,e.oldVersion,i.transaction))}),r.then(function(e){return new N(e)})}function j(e){return k(indexedDB,"deleteDatabase",[e])}_(C,"_index",["name","keyPath","multiEntry","unique"]),S(C,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),E(C,"_index",IDBIndex,["openCursor","openKeyCursor"]),_(O,"_cursor",["direction","key","primaryKey","value"]),S(O,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(e){e in IDBCursor.prototype&&(O.prototype[e]=function(){var t=this,n=arguments;return Promise.resolve().then(function(){return t._cursor[e].apply(t._cursor,n),w(t._request).then(function(e){if(e)return new O(e,t._request)})})})}),P.prototype.createIndex=function(){return new C(this._store.createIndex.apply(this._store,arguments))},P.prototype.index=function(){return new C(this._store.index.apply(this._store,arguments))},_(P,"_store",["name","keyPath","indexNames","autoIncrement"]),S(P,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),E(P,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),I(P,"_store",IDBObjectStore,["deleteIndex"]),T.prototype.objectStore=function(){return new P(this._tx.objectStore.apply(this._tx,arguments))},_(T,"_tx",["objectStoreNames","mode"]),I(T,"_tx",IDBTransaction,["abort"]),D.prototype.createObjectStore=function(){return new P(this._db.createObjectStore.apply(this._db,arguments))},_(D,"_db",["name","version","objectStoreNames"]),I(D,"_db",IDBDatabase,["deleteObjectStore","close"]),N.prototype.transaction=function(){return new T(this._db.transaction.apply(this._db,arguments))},_(N,"_db",["name","version","objectStoreNames"]),I(N,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(e){[P,C].forEach(function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var t,n=(t=arguments,Array.prototype.slice.call(t)),r=n[n.length-1],i=this._store||this._index,o=i[e].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})})}),[C,P].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise(function(i){n.iterateCursor(e,function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)})})})});var A,M="0.4.17",R=1e4,L="w:"+M,K="FIS_v2",F="https://firebaseinstallations.googleapis.com/v1",B=36e5,H=((A={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',A["not-registered"]="Firebase Installation is not registered.",A["installation-not-found"]="Firebase Installation not found.",A["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',A["app-offline"]="Could not process request. Application offline.",A["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",A),V=new v("installations","Installations",H);function q(e){return e instanceof p&&e.code.includes("request-failed")}function W(e){var t=e.projectId;return F+"/projects/"+t+"/installations"}function U(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function z(e,t){return i(this,void 0,void 0,function(){var n,r;return o(this,function(i){switch(i.label){case 0:return[4,t.json()];case 1:return n=i.sent(),r=n.error,[2,V.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}})})}function $(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function G(e,t){var n=t.refreshToken,r=$(e);return r.append("Authorization",K+" "+n),r}function Y(e){return i(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,e()];case 1:return 500<=(t=n.sent()).status&&t.status<600?[2,e()]:[2,t]}})})}function J(e){return new Promise(function(t){setTimeout(t,e)})}var Z=/^[cdef][\w-]{21}$/,Q="";function X(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return btoa(String.fromCharCode.apply(String,a(e))).replace(/\+/g,"-").replace(/\//g,"_")}(e).substr(0,22);return Z.test(t)?t:Q}catch(e){return Q}}function ee(e){return e.appName+"!"+e.appId}var te=new Map;function ne(e,t){var n=ee(e);re(n,t),function(e,t){var n=oe();n&&n.postMessage({key:e,fid:t}),se()}(n,t)}function re(e,t){var n,r,i=te.get(e);if(i)try{for(var o=s(i),a=o.next();!a.done;a=o.next())(0,a.value)(t)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var ie=null;function oe(){return!ie&&"BroadcastChannel"in self&&((ie=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){re(e.data.key,e.data.fid)}),ie}function se(){0===te.size&&ie&&(ie.close(),ie=null)}var ae,ce,ue="firebase-installations-database",le=1,fe="firebase-installations-store",pe=null;function de(){return pe=pe||x(ue,le,function(e){0===e.oldVersion&&e.createObjectStore(fe)})}function he(e,t){return i(this,void 0,void 0,function(){var n,r,i,s,a;return o(this,function(o){switch(o.label){case 0:return n=ee(e),[4,de()];case 1:return r=o.sent(),i=r.transaction(fe,"readwrite"),[4,(s=i.objectStore(fe)).get(n)];case 2:return a=o.sent(),[4,s.put(t,n)];case 3:return o.sent(),[4,i.complete];case 4:return o.sent(),a&&a.fid===t.fid||ne(e,t.fid),[2,t]}})})}function ve(e){return i(this,void 0,void 0,function(){var t,n,r;return o(this,function(i){switch(i.label){case 0:return t=ee(e),[4,de()];case 1:return n=i.sent(),[4,(r=n.transaction(fe,"readwrite")).objectStore(fe).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function ge(e,t){return i(this,void 0,void 0,function(){var n,r,i,s,a,c;return o(this,function(o){switch(o.label){case 0:return n=ee(e),[4,de()];case 1:return r=o.sent(),i=r.transaction(fe,"readwrite"),[4,(s=i.objectStore(fe)).get(n)];case 2:return a=o.sent(),void 0!==(c=t(a))?[3,4]:[4,s.delete(n)];case 3:return o.sent(),[3,6];case 4:return[4,s.put(c,n)];case 5:o.sent(),o.label=6;case 6:return[4,i.complete];case 7:return o.sent(),!c||a&&a.fid===c.fid||ne(e,c.fid),[2,c]}})})}function be(e){return i(this,void 0,void 0,function(){var t,n,r;return o(this,function(s){switch(s.label){case 0:return[4,ge(e,function(n){var r=me(n||{fid:X(),registrationStatus:0}),s=function(e,t){if(0!==t.registrationStatus)return 1===t.registrationStatus?{installationEntry:t,registrationPromise:function(e){return i(this,void 0,void 0,function(){var t,n,r,i;return o(this,function(o){switch(o.label){case 0:return[4,ye(e)];case 1:t=o.sent(),o.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,J(100)];case 3:return o.sent(),[4,ye(e)];case 4:return t=o.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,be(e)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,t]}})})}(e)}:{installationEntry:t};if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(V.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=function(e,t){return i(this,void 0,void 0,function(){var n,r;return o(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,7]),[4,function(e,n){var r=t.fid;return i(this,void 0,void 0,function(){var t,n,i,s,a,c;return o(this,function(o){switch(o.label){case 0:return t=W(e),n=$(e),i={fid:r,authVersion:K,appId:e.appId,sdkVersion:L},s={method:"POST",headers:n,body:JSON.stringify(i)},[4,Y(function(){return fetch(t,s)})];case 1:return(a=o.sent()).ok?[4,a.json()]:[3,3];case 2:return[2,{fid:(c=o.sent()).fid||r,registrationStatus:2,refreshToken:c.refreshToken,authToken:U(c.authToken)}];case 3:return[4,z("Create Installation",a)];case 4:throw o.sent()}})})}(e)];case 1:return n=s.sent(),[2,he(e,n)];case 2:return q(r=s.sent())&&409===r.serverCode?[4,ve(e)]:[3,4];case 3:return s.sent(),[3,6];case 4:return[4,he(e,{fid:t.fid,registrationStatus:0})];case 5:s.sent(),s.label=6;case 6:throw r;case 7:return[2]}})})}(e,n);return{installationEntry:n,registrationPromise:r}}(e,r);return t=s.registrationPromise,s.installationEntry})];case 1:return(n=s.sent()).fid!==Q?[3,3]:(r={},[4,t]);case 2:return[2,(r.installationEntry=s.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:t}]}})})}function ye(e){return ge(e,function(e){if(!e)throw V.create("installation-not-found");return me(e)})}function me(e){return 1===(t=e).registrationStatus&&t.registrationTime+R<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function we(e,t){var n=e.appConfig,r=e.platformLoggerProvider;return i(this,void 0,void 0,function(){var e,i,s,a,c,u;return o(this,function(o){switch(o.label){case 0:return l=n,f=t.fid,e=W(l)+"/"+f+"/authTokens:generate",i=G(n,t),(s=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",s.getPlatformInfoString()),a={installation:{sdkVersion:L}},c={method:"POST",headers:i,body:JSON.stringify(a)},[4,Y(function(){return fetch(e,c)})];case 1:return(u=o.sent()).ok?[4,u.json()]:[3,3];case 2:return[2,U(o.sent())];case 3:return[4,z("Generate Auth Token",u)];case 4:throw o.sent()}var l,f})})}function ke(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,function(){var n,s,a;return o(this,function(c){switch(c.label){case 0:return[4,ge(e.appConfig,function(s){if(!Se(s))throw V.create("not-registered");var a,c,u,l=s.authToken;if(t||2!==(u=l).requestStatus||function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+B}(u)){if(1===l.requestStatus)return n=function(e,t){return i(this,void 0,void 0,function(){var n,r;return o(this,function(i){switch(i.label){case 0:return[4,_e(e.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,J(100)];case 3:return i.sent(),[4,_e(e.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,ke(e,t)]:[2,r]}})})}(e,t),s;if(!navigator.onLine)throw V.create("app-offline");var f=(a=s,c={requestStatus:1,requestTime:Date.now()},r(r({},a),{authToken:c}));return n=function(e,t){return i(this,void 0,void 0,function(){var n,i,s;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,we(e,t)];case 1:return n=o.sent(),s=r(r({},t),{authToken:n}),[4,he(e.appConfig,s)];case 2:return o.sent(),[2,n];case 3:return!q(i=o.sent())||401!==i.serverCode&&404!==i.serverCode?[3,5]:[4,ve(e.appConfig)];case 4:return o.sent(),[3,7];case 5:return s=r(r({},t),{authToken:{requestStatus:0}}),[4,he(e.appConfig,s)];case 6:o.sent(),o.label=7;case 7:throw i;case 8:return[2]}})})}(e,f),f}return s})];case 1:return s=c.sent(),n?[4,n]:[3,3];case 2:return a=c.sent(),[3,4];case 3:a=s.authToken,c.label=4;case 4:return[2,a]}})})}function _e(e){return ge(e,function(e){if(!Se(e))throw V.create("not-registered");var t;return 1===(t=e.authToken).requestStatus&&t.requestTime+R<Date.now()?r(r({},e),{authToken:{requestStatus:0}}):e})}function Se(e){return void 0!==e&&2===e.registrationStatus}function Ie(e,t){return i(this,void 0,void 0,function(){var n,r,i,s;return o(this,function(o){switch(o.label){case 0:return a=e,c=t.fid,n=W(a)+"/"+c,r=G(e,t),i={method:"DELETE",headers:r},[4,Y(function(){return fetch(n,i)})];case 1:return(s=o.sent()).ok?[3,3]:[4,z("Delete Installation",s)];case 2:throw o.sent();case 3:return[2]}var a,c})})}function Ee(e){return V.create("missing-app-config-values",{valueName:e})}(ae=t.default).INTERNAL.registerComponent(new y("installations",function(e){var t=e.getProvider("app").getImmediate(),n={appConfig:function(e){var t,n;if(!e||!e.options)throw Ee("App Configuration");if(!e.name)throw Ee("App Name");try{for(var r=s(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!e.options[o])throw Ee(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:e.getProvider("platform-logger")};return{app:t,getId:function(){return function(e){return i(this,void 0,void 0,function(){var t,n,r;return o(this,function(i){switch(i.label){case 0:return[4,be(e.appConfig)];case 1:return t=i.sent(),n=t.installationEntry,(r=t.registrationPromise)?r.catch(console.error):ke(e).catch(console.error),[2,n.fid]}})})}(n)},getToken:function(e){return function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,function(e){return i(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,be(e)];case 1:return(t=n.sent().registrationPromise)?[4,t]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})}(e.appConfig)];case 1:return n.sent(),[4,ke(e,t)];case 2:return[2,n.sent().token]}})})}(n,e)},delete:function(){return function(e){return i(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return[4,ge(t=e.appConfig,function(e){if(!e||0!==e.registrationStatus)return e})];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw V.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw V.create("app-offline");case 3:return[4,Ie(t,n)];case 4:return r.sent(),[4,ve(t)];case 5:r.sent(),r.label=6;case 6:return[2]}})})}(n)},onIdChange:function(e){return function(e,t){var n=e.appConfig;return function(e,t){oe();var n=ee(e),r=te.get(n);r||(r=new Set,te.set(n,r)),r.add(t)}(n,t),function(){var e,r,i;e=t,r=ee(n),(i=te.get(r))&&(i.delete(e),0===i.size&&te.delete(r),se())}}(n,e)}}},"PUBLIC")),ae.registerVersion("@firebase/installations",M);var Ce,Oe,Pe=((ce={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',ce["only-available-in-window"]="This method is available in a Window context.",ce["only-available-in-sw"]="This method is available in a service worker context.",ce["permission-default"]="The notification permission was not granted and dismissed instead.",ce["permission-blocked"]="The notification permission was not granted and blocked instead.",ce["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",ce["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",ce["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",ce["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",ce["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",ce["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",ce["token-update-no-token"]="FCM returned no token when updating the user to push.",ce["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.",ce["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",ce["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",ce["invalid-vapid-key"]="The public VAPID key must be a string.",ce["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.",ce),Te=new v("messaging","Messaging",Pe),De="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",Ne="https://fcmregistrations.googleapis.com/v1",xe="FCM_MSG",je="google.c.a.c_id";function Ae(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,a(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}(Oe=Ce=Ce||{}).PUSH_RECEIVED="push-received",Oe.NOTIFICATION_CLICKED="notification-clicked";var Me="fcm_token_details_db",Re=5,Le="fcm_token_object_Store";function Ke(e){return i(this,void 0,void 0,function(){var t,n=this;return o(this,function(r){switch(r.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(!r.sent().map(function(e){return e.name}).includes(Me))return[2,null];r.label=2;case 2:return t=null,[4,x(Me,Re,function(r){return i(n,void 0,void 0,function(){var n,i,s,a;return o(this,function(o){switch(o.label){case 0:return r.oldVersion<2?[2]:r.objectStoreNames.contains(Le)?[4,(n=r.transaction.objectStore(Le)).index("fcmSenderId").get(e)]:[2];case 1:return i=o.sent(),[4,n.clear()];case 2:if(o.sent(),!i)return[2];if(2===r.oldVersion){if(!(s=i).auth||!s.p256dh||!s.endpoint)return[2];t={token:s.fcmToken,createTime:null!==(a=s.createTime)&&void 0!==a?a:Date.now(),subscriptionOptions:{auth:s.auth,p256dh:s.p256dh,endpoint:s.endpoint,swScope:s.swScope,vapidKey:"string"==typeof s.vapidKey?s.vapidKey:Ae(s.vapidKey)}}}else(3===r.oldVersion||4===r.oldVersion)&&(t={token:(s=i).fcmToken,createTime:s.createTime,subscriptionOptions:{auth:Ae(s.auth),p256dh:Ae(s.p256dh),endpoint:s.endpoint,swScope:s.swScope,vapidKey:Ae(s.vapidKey)}});return[2]}})})})];case 3:return r.sent().close(),[4,j(Me)];case 4:return r.sent(),[4,j("fcm_vapid_details_db")];case 5:return r.sent(),[4,j("undefined")];case 6:return r.sent(),[2,function(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return"number"==typeof e.createTime&&0<e.createTime&&"string"==typeof e.token&&0<e.token.length&&"string"==typeof t.auth&&0<t.auth.length&&"string"==typeof t.p256dh&&0<t.p256dh.length&&"string"==typeof t.endpoint&&0<t.endpoint.length&&"string"==typeof t.swScope&&0<t.swScope.length&&"string"==typeof t.vapidKey&&0<t.vapidKey.length}(t)?t:null]}})})}var Fe="firebase-messaging-database",Be=1,He="firebase-messaging-store",Ve=null;function qe(){return Ve=Ve||x(Fe,Be,function(e){0===e.oldVersion&&e.createObjectStore(He)})}function We(e){return i(this,void 0,void 0,function(){var t,n,r;return o(this,function(i){switch(i.label){case 0:return t=ze(e),[4,qe()];case 1:return[4,i.sent().transaction(He).objectStore(He).get(t)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,Ke(e.appConfig.senderId)];case 4:return(r=i.sent())?[4,Ue(e,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}})})}function Ue(e,t){return i(this,void 0,void 0,function(){var n,r,i;return o(this,function(o){switch(o.label){case 0:return n=ze(e),[4,qe()];case 1:return r=o.sent(),[4,(i=r.transaction(He,"readwrite")).objectStore(He).put(t,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,t]}})})}function ze(e){return e.appConfig.appId}function $e(e,t){return i(this,void 0,void 0,function(){var n,r,i,s,a;return o(this,function(o){switch(o.label){case 0:return[4,Ye(e)];case 1:n=o.sent(),r={method:"DELETE",headers:n},o.label=2;case 2:return o.trys.push([2,5,,6]),[4,fetch(Ge(e.appConfig)+"/"+t,r)];case 3:return[4,o.sent().json()];case 4:if((i=o.sent()).error)throw s=i.error.message,Te.create("token-unsubscribe-failed",{errorInfo:s});return[3,6];case 5:throw a=o.sent(),Te.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}})})}function Ge(e){var t=e.projectId;return Ne+"/projects/"+t+"/registrations"}function Ye(e){var t=e.appConfig,n=e.installations;return i(this,void 0,void 0,function(){var e;return o(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 Je(e){var t=e.p256dh,n=e.auth,r=e.endpoint,i=e.vapidKey,o={web:{endpoint:r,auth:n,p256dh:t}};return i!==De&&(o.web.applicationPubKey=i),o}function Ze(e,t,n){return i(this,void 0,void 0,function(){var s,a,c,u;return o(this,function(l){switch(l.label){case 0:if("granted"!==Notification.permission)throw Te.create("permission-blocked");return[4,function(e,t){return i(this,void 0,void 0,function(){var n;return o(this,function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}(t)})]}})})}(t,n)];case 1:return s=l.sent(),[4,We(e)];case 2:return a=l.sent(),c={vapidKey:n,swScope:t.scope,endpoint:s.endpoint,auth:Ae(s.getKey("auth")),p256dh:Ae(s.getKey("p256dh"))},a?[3,3]:[2,Xe(e,c)];case 3:if(f=a.subscriptionOptions,d=(p=c).vapidKey===f.vapidKey,h=p.endpoint===f.endpoint,v=p.auth===f.auth,g=p.p256dh===f.p256dh,d&&h&&v&&g)return[3,8];l.label=4;case 4:return l.trys.push([4,6,,7]),[4,$e(e,a.token)];case 5:return l.sent(),[3,7];case 6:return u=l.sent(),console.warn(u),[3,7];case 7:return[2,Xe(e,c)];case 8:return Date.now()>=a.createTime+6048e5?[2,function(e,t,n){return i(this,void 0,void 0,function(){var s,a,c;return o(this,function(u){switch(u.label){case 0:return u.trys.push([0,3,,5]),[4,function(e,t){return i(this,void 0,void 0,function(){var n,r,i,s,a,c;return o(this,function(o){switch(o.label){case 0:return[4,Ye(e)];case 1:n=o.sent(),r=Je(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},o.label=2;case 2:return o.trys.push([2,5,,6]),[4,fetch(Ge(e.appConfig)+"/"+t.token,i)];case 3:return[4,o.sent().json()];case 4:return s=o.sent(),[3,6];case 5:throw a=o.sent(),Te.create("token-update-failed",{errorInfo:a});case 6:if(s.error)throw c=s.error.message,Te.create("token-update-failed",{errorInfo:c});if(!s.token)throw Te.create("token-update-no-token");return[2,s.token]}})})}(t,e)];case 1:return s=u.sent(),a=r(r({},e),{token:s,createTime:Date.now()}),[4,Ue(t,a)];case 2:return u.sent(),[2,s];case 3:return c=u.sent(),[4,Qe(t,n)];case 4:throw u.sent(),c;case 5:return[2]}})})}({token:a.token,createTime:Date.now(),subscriptionOptions:c},e,t)]:[2,a.token];case 9:return[2]}var f,p,d,h,v,g})})}function Qe(e,t){return i(this,void 0,void 0,function(){var n,r;return o(this,function(s){switch(s.label){case 0:return[4,We(e)];case 1:return(n=s.sent())?[4,$e(e,n.token)]:[3,4];case 2:return s.sent(),[4,function(e){return i(this,void 0,void 0,function(){var t,n,r;return o(this,function(i){switch(i.label){case 0:return t=ze(e),[4,qe()];case 1:return n=i.sent(),[4,(r=n.transaction(He,"readwrite")).objectStore(He).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}(e)];case 3:s.sent(),s.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return(r=s.sent())?[2,r.unsubscribe()]:[2,!0]}})})}function Xe(e,t){return i(this,void 0,void 0,function(){var n,r;return o(this,function(s){switch(s.label){case 0:return[4,function(e,t){return i(this,void 0,void 0,function(){var n,r,i,s,a,c;return o(this,function(o){switch(o.label){case 0:return[4,Ye(e)];case 1:n=o.sent(),r=Je(t),i={method:"POST",headers:n,body:JSON.stringify(r)},o.label=2;case 2:return o.trys.push([2,5,,6]),[4,fetch(Ge(e.appConfig),i)];case 3:return[4,o.sent().json()];case 4:return s=o.sent(),[3,6];case 5:throw a=o.sent(),Te.create("token-subscribe-failed",{errorInfo:a});case 6:if(s.error)throw c=s.error.message,Te.create("token-subscribe-failed",{errorInfo:c});if(!s.token)throw Te.create("token-subscribe-no-token");return[2,s.token]}})})}(e,t)];case 1:return n=s.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,Ue(e,r)];case 2:return s.sent(),[2,r.token]}})})}function et(e){return"object"==typeof e&&e&&je in e}var tt=(Object.defineProperty(nt.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),nt.prototype.setBackgroundMessageHandler=function(e){if(this.isOnBackgroundMessageUsed=!1,!e||"function"!=typeof e)throw Te.create("invalid-bg-handler");this.bgMessageHandler=e},nt.prototype.onBackgroundMessage=function(e){var t=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=e,function(){t.bgMessageHandler=null}},nt.prototype.getToken=function(){var e,t;return i(this,void 0,void 0,function(){var n;return o(this,function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,We(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(t=null===(e=null==n?void 0:n.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==t?t:De,r.label=2;case 2:return[2,Ze(this.firebaseDependencies,self.registration,this.vapidKey)]}})})},nt.prototype.deleteToken=function(){return Qe(this.firebaseDependencies,self.registration)},nt.prototype.requestPermission=function(){throw Te.create("only-available-in-window")},nt.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw Te.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw Te.create("invalid-vapid-key");this.vapidKey=e},nt.prototype.useServiceWorker=function(){throw Te.create("only-available-in-window")},nt.prototype.onMessage=function(){throw Te.create("only-available-in-window")},nt.prototype.onTokenRefresh=function(){throw Te.create("only-available-in-window")},nt.prototype.onPush=function(e){return i(this,void 0,void 0,function(){var t,n,i,a;return o(this,function(o){switch(o.label){case 0:return(t=function(t){var n=e.data;if(!n)return null;try{return n.json()}catch(t){return null}}())?[4,rt()]:(console.debug("FirebaseMessaging: failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return(n=o.sent()).some(function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")})?[2,function(e,t){var n,r;t.isFirebaseMessaging=!0,t.messageType=Ce.PUSH_RECEIVED;try{for(var i=s(e),o=i.next();!o.done;o=i.next())o.value.postMessage(t)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(n,t)]:(i=!1,t.notification?[4,function(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)}(((l=r({},(c=t).notification)).data=((u={})[xe]=c,u),l))]:[3,3]);case 2:o.sent(),i=!0,o.label=3;case 3:return!0===i&&!1===this.isOnBackgroundMessageUsed?[2]:(this.bgMessageHandler&&(a=function(e){var t={from:e.from,collapseKey:e.collapse_key};return function(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)}}(t,e),function(e,t){t.data&&(e.data=t.data)}(t,e),function(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)}}(t,e),t}(t),"function"==typeof this.bgMessageHandler?this.bgMessageHandler(a):this.bgMessageHandler.next(a)),[2])}var c,u,l})})},nt.prototype.onSubChange=function(e){var t,n;return i(this,void 0,void 0,function(){var r;return o(this,function(i){switch(i.label){case 0:return e.newSubscription?[3,2]:[4,Qe(this.firebaseDependencies,self.registration)];case 1:return i.sent(),[2];case 2:return[4,We(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Qe(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,Ze(this.firebaseDependencies,self.registration,null!==(n=null===(t=null==r?void 0:r.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==n?n:De)];case 5:return i.sent(),[2]}})})},nt.prototype.onNotificationClick=function(e){var t,n;return i(this,void 0,void 0,function(){var r,a,c,u,l;return o(this,function(f){switch(f.label){case 0:return(r=null===(n=null===(t=e.notification)||void 0===t?void 0:t.data)||void 0===n?void 0:n[xe])?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(a=function(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;return i||(et(e.data)?self.location.origin:null)}(r))?(c=new URL(a,self.location.href),u=new URL(self.location.origin),c.host!==u.host?[2]:[4,function(e){return i(this,void 0,void 0,function(){var t,n,r,i,a,c,u;return o(this,function(o){switch(o.label){case 0:return[4,rt()];case 1:t=o.sent();try{for(n=s(t),r=n.next();!r.done;r=n.next())if(i=r.value,a=new URL(i.url,self.location.href),e.host===a.host)return[2,i]}catch(o){c={error:o}}finally{try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(c)throw c.error}}return[2,null]}})})}(c)]):[2]):[2];case 1:return(l=f.sent())?[3,4]:[4,self.clients.openWindow(a)];case 2:return l=f.sent(),[4,(3e3,new Promise(function(e){setTimeout(e,3e3)}))];case 3:return f.sent(),[3,6];case 4:return[4,l.focus()];case 5:l=f.sent(),f.label=6;case 6:return l?(r.messageType=Ce.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,[2,l.postMessage(r)]):[2]}})})},nt);function nt(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))})}function rt(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}var it=(Object.defineProperty(ot.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),ot.prototype.messageEventListener=function(e){return i(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:return(t=e.data).isFirebaseMessaging?(this.onMessageCallback&&t.messageType===Ce.PUSH_RECEIVED&&("function"==typeof this.onMessageCallback?this.onMessageCallback((delete(i=Object.assign({},t)).messageType,delete i.isFirebaseMessaging,i)):this.onMessageCallback.next(Object.assign({},t))),et(n=t.data)&&"1"===n["google.c.a.e"]?[4,this.logEvent(t.messageType,n)]:[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return[2]}var i})})},ot.prototype.getVapidKey=function(){return this.vapidKey},ot.prototype.getSwReg=function(){return this.swRegistration},ot.prototype.getToken=function(e){return i(this,void 0,void 0,function(){return o(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 Te.create("permission-blocked");return[4,this.updateVapidKey(null==e?void 0:e.vapidKey)];case 3:return t.sent(),[4,this.updateSwReg(null==e?void 0:e.serviceWorkerRegistration)];case 4:return t.sent(),[2,Ze(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}})})},ot.prototype.updateVapidKey=function(e){return i(this,void 0,void 0,function(){return o(this,function(t){return e?this.vapidKey=e:this.vapidKey||(this.vapidKey=De),[2]})})},ot.prototype.updateSwReg=function(e){return i(this,void 0,void 0,function(){return o(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 Te.create("invalid-sw-registration");return this.swRegistration=e,[2]}})})},ot.prototype.registerDefaultSw=function(){return i(this,void 0,void 0,function(){var e,t;return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 1:return e.swRegistration=n.sent(),this.swRegistration.update().catch(function(){}),[3,3];case 2:throw t=n.sent(),Te.create("failed-service-worker-registration",{browserErrorMessage:t.message});case 3:return[2]}})})},ot.prototype.deleteToken=function(){return i(this,void 0,void 0,function(){return o(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,Qe(this.firebaseDependencies,this.swRegistration)]}})})},ot.prototype.requestPermission=function(){return i(this,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?Te.create("permission-blocked"):Te.create("permission-default")}})})},ot.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw Te.create("use-vapid-key-after-get-token");if("string"!=typeof e||0===e.length)throw Te.create("invalid-vapid-key");this.vapidKey=e},ot.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw Te.create("invalid-sw-registration");if(this.swRegistration)throw Te.create("use-sw-after-get-token");this.swRegistration=e},ot.prototype.onMessage=function(e){var t=this;return this.onMessageCallback=e,function(){t.onMessageCallback=null}},ot.prototype.setBackgroundMessageHandler=function(){throw Te.create("only-available-in-sw")},ot.prototype.onBackgroundMessage=function(){throw Te.create("only-available-in-sw")},ot.prototype.onTokenRefresh=function(){return function(){}},ot.prototype.logEvent=function(e,t){return i(this,void 0,void 0,function(){var n;return o(this,function(r){switch(r.label){case 0:return n=function(t){switch(e){case Ce.NOTIFICATION_CLICKED:return"notification_open";case Ce.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:t[je],message_name:t["google.c.a.c_l"],message_time:t["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}})})},ot);function ot(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",function(e){return t.messageEventListener(e)})}function st(e){return Te.create("missing-app-config-values",{valueName:e})}var at={isSupported:ct};function ct(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"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")}t.default.INTERNAL.registerComponent(new y("messaging",function(e){var t=e.getProvider("app").getImmediate(),n={app:t,appConfig:function(e){var t,n;if(!e||!e.options)throw st("App Configuration Object");if(!e.name)throw st("App Name");var r=e.options;try{for(var i=s(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var a=o.value;if(!r[a])throw st(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return{appName:e.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(t),installations:e.getProvider("installations").getImmediate(),analyticsProvider:e.getProvider("analytics-internal")};if(!ct())throw Te.create("unsupported-browser");return new(self&&"ServiceWorkerGlobalScope"in self?tt:it)(n)},"PUBLIC").setServiceProps(at))}).apply(this,arguments)}catch(e){throw console.error(e),new Error("Cannot instantiate firebase-messaging.js - be sure to load firebase-app.js first.")}});let rpTemp="<div class=\"at_rp_ctn at-slideDown\"><div class=\"at_rp_b\"><div style=\"display:flex\"><div style=\"padding-right:30px;\"><img class=\"at_rp_i\" alt=\"notification icon\" src=\"data:image/svg+xml,%3Csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M33.232 28.434a2.5 2.5 0 001.768.733 1.667 1.667 0 010 3.333H5a1.667 1.667 0 110-3.333 2.5 2.5 0 002.5-2.5v-8.104A13.262 13.262 0 0118.333 5.122V1.667a1.666 1.666 0 113.334 0v3.455A13.262 13.262 0 0132.5 18.563v8.104a2.5 2.5 0 00.732 1.767zM16.273 35h7.454a.413.413 0 01.413.37 4.167 4.167 0 11-8.28 0 .417.417 0 01.413-.37z' fill='%23BDC4CB'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h40v40H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\"></div><div>We'd like to send you notifications for the latest news and updates.</div></div><div style=\"text-align:right; margin-top:30px;\"><button class=\"at_rp_btn at_rp_btn_e\">No thanks</button><button class=\"at_rp_btn at_rp_btn_ok\" onclick=\"AdTruePushSDK.rp();\">Allow</button></div></div></div>\n<style type=\"text/css\">\n.at_rp_wp{position:fixed; top:0; left:0; width:100%; z-index:999; display:none;}.at_rp_ctn{width:96%; max-width:456px; margin:0 auto;}.at_rp_b{background:#fff; border-radius:0 0 6px 6px; box-shadow:0 2px 10px rgba(0,0,0,0.2); padding:25px 25px; line-height:1.5rem; font-family:'Segoe UI', sans-serif; color:#051b2c;}.at_rp_i{height:52px;}.at_rp_btn{padding:10px 20px; background:#fff; border:none; border-radius:6px; font-family:inherit; font-size:1rem; cursor:pointer;transition: all 0.5s;-moz-transition: all 0.5s;outline: none;}.at_rp_btn:active,.at_rp_btn:hover,.at_rp_btn:focus{border:none;}.at_rp_btn_ok{background:#1A73E8;color:#fff;}.at_rp_btn_ok:hover{background:#005DA4;}.at_rp_btn_e{color:#1A73E8;}.at-slideDown{animation-name:at-slideDown;-webkit-animation-name:at-slideDown;animation-duration:.5s;-webkit-animation-duration:.5s;animation-timing-function:ease;-webkit-animation-timing-function:ease;visibility:visible!important}@keyframes at-slideDown{0%{transform:translateY(-100%)}100%{transform:translateY(0)}}@-webkit-keyframes at-slideDown{0%{-webkit-transform:translateY(-100%)}100%{-webkit-transform:translateY(0)}}\n</style>";function atRpIc(){let e=document.getElementsByClassName("at_rp_wp")[0];e.style.display="flex",e.className="at_rp_wp slideDown",document.getElementsByClassName("at_rp_btn_e")[0].onclick=function(){localStorage.setItem("at_rp_no_ms",Math.floor(Date.now()/1e3)),e.style.display="none"}}let AdTruePushSDK={atConfig:{},init:function(e={}){AdTruePushSDK.atConfig=e,window.addEventListener("load",function(){if("granted"===Notification.permission)AdTruePushSDK.initWorker();else{if("denied"!==Notification.permission)return!0===AdTruePushSDK.atConfig.rPC?AdTruePushSDK.requestPermission():AdTruePushSDK.requestPermissionPopup();if(!e.https)return AdTruePushSDK.requestPermissionPopup()}})},initWorker:function(){firebase.initializeApp({apiKey:"AIzaSyDhwbRVlorPdDvq0VcY3R6Gb6Y-sFlrQlI",projectId:"advads-6969",messagingSenderId:"829875981972",appId:"1:829875981972:web:148180baa6f431cc56ee81"});const e=firebase.messaging();"serviceWorker"in navigator&&navigator.serviceWorker.register("/at-service-worker.js").then(t=>{e.getToken({serviceWorkerRegistration:t}).then(e=>{e&&(t.active.postMessage(JSON.stringify({appId:AdTruePushSDK.atConfig.appId,token:e})),AdTruePushSDK.saveToken(e))}).catch(e=>{})})},requestPermissionPopup:function(){let e=localStorage.getItem("at_rp_no_ms"),t=localStorage.getItem("at_rp_yes_ms");if(e||t)return!1;let n=document.createElement("div");n.className="at_rp_wp",n.innerHTML=rpTemp,document.body.appendChild(n),setTimeout("atRpIc()",1e3)},rp:function(){if(document.getElementsByClassName("at_rp_wp")[0].style.display="none",this.atConfig.hasOwnProperty("https")&&this.atConfig.https)return this.requestPermission();{localStorage.setItem("at_rp_yes_ms",Math.floor(Date.now()/1e3));let e="https://peaknews.today/subscribe/?appId="+AdTruePushSDK.atConfig.appId;return this.popupwindow(e,"",600,560)}},requestPermission:function(e=!0){if("granted"===Notification.permission)return!0;"denied"!==Notification.permission&&Notification.requestPermission().then(t=>{if("granted"===t){console.log("Notification permission granted.");new Notification("Thank you for subscription");return e&&AdTruePushSDK.initWorker(),AdTruePushSDK.atConfig.apx&&(mess.innerHTML="<b>Thank you for subscribing</b>",setTimeout("window.close()",5e3)),!0}return console.log("Unable to get permission to notify."),!1})},saveToken:function(e){let t=Math.floor(Date.now()/1e3);var n=localStorage.getItem("last_chklive")?parseInt(localStorage.getItem("last_chklive")):0;if(this.tokenState()===e&&t-n>21600&&fetch("https://s.onepush.app/cl/",{method:"post",mode:"no-cors",headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"token="+e}).then(e=>{localStorage.setItem("last_chklive",t)}).catch(function(e){}),this.tokenState()===e)return!1;let r={user_agent:navigator.userAgent,domain:location.hostname,token:e,appId:this.atConfig.appId},i=JSON.stringify(r),o="https://s.onepush.app/f/?d="+encodeURIComponent(btoa(i)),s=document.createElement("img");s.setAttribute("src",o),s.style.width="1px",s.style.height="1px",s.style.position="absolute",s.style.bottom="0",document.body.appendChild(s),this.tokenState(e),localStorage.setItem("last_chklive",t)},tokenState:function(e=null){return null!==e&&localStorage.setItem("at_rp_s_t",e),localStorage.getItem("at_rp_s_t")},popupwindow:function(e,t,n,r){var i=void 0!==window.screenLeft?window.screenLeft:screen.left,o=void 0!==window.screenTop?window.screenTop:screen.top,s=(window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width)/2-n/2+i,a=(window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/2-r/2+o,c=window.open(e,t,"scrollbars=yes, width="+n+", height="+r+", top="+a+", left="+s);window.focus&&c.focus()}};