Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

firebase-performance-standalone-compat.es2017.js 88KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  1. !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";
  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. */
  18. /**
  19. * @license
  20. * Copyright 2017 Google LLC
  21. *
  22. * Licensed under the Apache License, Version 2.0 (the "License");
  23. * you may not use this file except in compliance with the License.
  24. * You may obtain a copy of the License at
  25. *
  26. * http://www.apache.org/licenses/LICENSE-2.0
  27. *
  28. * Unless required by applicable law or agreed to in writing, software
  29. * distributed under the License is distributed on an "AS IS" BASIS,
  30. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  31. * See the License for the specific language governing permissions and
  32. * limitations under the License.
  33. */const e=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},t={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){const i=e[t],a=t+1<e.length,o=a?e[t+1]:0,s=t+2<e.length,c=s?e[t+2]:0,l=i>>2,u=(3&i)<<4|o>>4;let p=(15&o)<<2|c>>6,h=63&c;s||(h=64,a||(p=64)),r.push(n[l],n[u],n[p],n[h])}return r.join("")},encodeString(t,n){return this.HAS_NATIVE_SUPPORT&&!n?btoa(t):this.encodeByteArray(e(t),n)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){const a=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{const a=e[n++],o=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&o)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){const i=n[e.charAt(t++)],a=t<e.length?n[e.charAt(t)]:0;++t;const o=t<e.length?n[e.charAt(t)]:64;++t;const s=t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==a||null==o||null==s)throw Error();const c=i<<2|a>>4;if(r.push(c),64!==o){const e=a<<4&240|o>>2;if(r.push(e),64!==s){const e=o<<6&192|s;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},n=function(n){return function(n){const r=e(n);return t.encodeByteArray(r,!0)}(n).replace(/\./g,"")};function r(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(const n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=r(e[n],t[n]));return e}
  34. /**
  35. * @license
  36. * Copyright 2022 Google LLC
  37. *
  38. * Licensed under the Apache License, Version 2.0 (the "License");
  39. * you may not use this file except in compliance with the License.
  40. * You may obtain a copy of the License at
  41. *
  42. * http://www.apache.org/licenses/LICENSE-2.0
  43. *
  44. * Unless required by applicable law or agreed to in writing, software
  45. * distributed under the License is distributed on an "AS IS" BASIS,
  46. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  47. * See the License for the specific language governing permissions and
  48. * limitations under the License.
  49. */
  50. const i=()=>
  51. /**
  52. * @license
  53. * Copyright 2022 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. */
  67. function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,a=()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const n=e&&function(e){try{return t.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}(e[1]);return n&&JSON.parse(n)},o=()=>{try{return i()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||a()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}};
  68. /**
  69. * @license
  70. * Copyright 2017 Google LLC
  71. *
  72. * Licensed under the Apache License, Version 2.0 (the "License");
  73. * you may not use this file except in compliance with the License.
  74. * You may obtain a copy of the License at
  75. *
  76. * http://www.apache.org/licenses/LICENSE-2.0
  77. *
  78. * Unless required by applicable law or agreed to in writing, software
  79. * distributed under the License is distributed on an "AS IS" BASIS,
  80. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  81. * See the License for the specific language governing permissions and
  82. * limitations under the License.
  83. */
  84. class s{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function c(){try{return"object"==typeof indexedDB}catch(e){return!1}}function l(){return new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}}))}class u extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,u.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,p.prototype.create)}}class p{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?function(e,t){return e.replace(h,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(i,n):"Error",o=`${this.serviceName}: ${a} (${r}).`;return new u(r,o,n)}}const h=/\{\$([^}]+)}/g;
  85. /**
  86. * @license
  87. * Copyright 2017 Google LLC
  88. *
  89. * Licensed under the Apache License, Version 2.0 (the "License");
  90. * you may not use this file except in compliance with the License.
  91. * You may obtain a copy of the License at
  92. *
  93. * http://www.apache.org/licenses/LICENSE-2.0
  94. *
  95. * Unless required by applicable law or agreed to in writing, software
  96. * distributed under the License is distributed on an "AS IS" BASIS,
  97. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  98. * See the License for the specific language governing permissions and
  99. * limitations under the License.
  100. */function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],a=t[i];if(g(n)&&g(a)){if(!d(n,a))return!1}else if(n!==a)return!1}for(const e of r)if(!n.includes(e))return!1;return!0}function g(e){return null!==e&&"object"==typeof e}
  101. /**
  102. * @license
  103. * Copyright 2021 Google LLC
  104. *
  105. * Licensed under the Apache License, Version 2.0 (the "License");
  106. * you may not use this file except in compliance with the License.
  107. * You may obtain a copy of the License at
  108. *
  109. * http://www.apache.org/licenses/LICENSE-2.0
  110. *
  111. * Unless required by applicable law or agreed to in writing, software
  112. * distributed under the License is distributed on an "AS IS" BASIS,
  113. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  114. * See the License for the specific language governing permissions and
  115. * limitations under the License.
  116. */class m{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}
  117. /**
  118. * @license
  119. * Copyright 2019 Google LLC
  120. *
  121. * Licensed under the Apache License, Version 2.0 (the "License");
  122. * you may not use this file except in compliance with the License.
  123. * You may obtain a copy of the License at
  124. *
  125. * http://www.apache.org/licenses/LICENSE-2.0
  126. *
  127. * Unless required by applicable law or agreed to in writing, software
  128. * distributed under the License is distributed on an "AS IS" BASIS,
  129. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  130. * See the License for the specific language governing permissions and
  131. * limitations under the License.
  132. */const b="[DEFAULT]";
  133. /**
  134. * @license
  135. * Copyright 2019 Google LLC
  136. *
  137. * Licensed under the Apache License, Version 2.0 (the "License");
  138. * you may not use this file except in compliance with the License.
  139. * You may obtain a copy of the License at
  140. *
  141. * http://www.apache.org/licenses/LICENSE-2.0
  142. *
  143. * Unless required by applicable law or agreed to in writing, software
  144. * distributed under the License is distributed on an "AS IS" BASIS,
  145. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  146. * See the License for the specific language governing permissions and
  147. * limitations under the License.
  148. */class v{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new s;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}}getComponent(){return this.component}setComponent(e){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(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
  149. /**
  150. * @license
  151. * Copyright 2019 Google LLC
  152. *
  153. * Licensed under the Apache License, Version 2.0 (the "License");
  154. * you may not use this file except in compliance with the License.
  155. * You may obtain a copy of the License at
  156. *
  157. * http://www.apache.org/licenses/LICENSE-2.0
  158. *
  159. * Unless required by applicable law or agreed to in writing, software
  160. * distributed under the License is distributed on an "AS IS" BASIS,
  161. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  162. * See the License for the specific language governing permissions and
  163. * limitations under the License.
  164. */(e))try{this.getOrInitializeService({instanceIdentifier:b})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e="[DEFAULT]"){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e="[DEFAULT]"){return this.instances.has(e)}getOptions(e="[DEFAULT]"){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const a=this.instances.get(r);return a&&e(a,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===b?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}var r;return n||null}normalizeInstanceIdentifier(e="[DEFAULT]"){return this.component?this.component.multipleInstances?e:b:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class _{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new v(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
  165. /**
  166. * @license
  167. * Copyright 2017 Google LLC
  168. *
  169. * Licensed under the Apache License, Version 2.0 (the "License");
  170. * you may not use this file except in compliance with the License.
  171. * You may obtain a copy of the License at
  172. *
  173. * http://www.apache.org/licenses/LICENSE-2.0
  174. *
  175. * Unless required by applicable law or agreed to in writing, software
  176. * distributed under the License is distributed on an "AS IS" BASIS,
  177. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  178. * See the License for the specific language governing permissions and
  179. * limitations under the License.
  180. */const w=[];var y;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(y||(y={}));const E={debug:y.DEBUG,verbose:y.VERBOSE,info:y.INFO,warn:y.WARN,error:y.ERROR,silent:y.SILENT},I=y.INFO,S={[y.DEBUG]:"log",[y.VERBOSE]:"log",[y.INFO]:"info",[y.WARN]:"warn",[y.ERROR]:"error"},T=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),i=S[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)};class C{constructor(e){this.name=e,this._logLevel=I,this._logHandler=T,this._userLogHandler=null,w.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in y))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?E[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,y.DEBUG,...e),this._logHandler(this,y.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,y.VERBOSE,...e),this._logHandler(this,y.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,y.INFO,...e),this._logHandler(this,y.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,y.WARN,...e),this._logHandler(this,y.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,y.ERROR,...e),this._logHandler(this,y.ERROR,...e)}}let A,D;const N=new WeakMap,O=new WeakMap,k=new WeakMap,L=new WeakMap,P=new WeakMap;let M={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return O.get(e);if("objectStoreNames"===t)return e.objectStoreNames||k.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return $(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function B(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(D||(D=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(j(this),t),$(N.get(this))}:function(...t){return $(e.apply(j(this),t))}:function(t,...n){const r=e.call(j(this),t,...n);return k.set(r,t.sort?t.sort():[t]),$(r)}}function R(e){return"function"==typeof e?B(e):(e instanceof IDBTransaction&&function(e){if(O.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));O.set(e,t)}(e),t=e,(A||(A=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,M):e);var t}function $(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t($(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&N.set(t,e)})).catch((()=>{})),P.set(t,e),t}(e);if(L.has(e))return L.get(e);const t=R(e);return t!==e&&(L.set(e,t),P.set(t,e)),t}const j=e=>P.get(e);function F(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=$(o);return r&&o.addEventListener("upgradeneeded",(e=>{r($(o.result),e.oldVersion,e.newVersion,$(o.transaction))})),n&&o.addEventListener("blocked",(()=>n())),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(()=>i()))})).catch((()=>{})),s}const U=["get","getKey","getAll","getAllKeys","count"],H=["put","add","delete","clear"],V=new Map;function x(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(V.get(t))return V.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=H.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!U.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return V.set(t,a),a}M=(e=>({...e,get:(t,n,r)=>x(t,n)||e.get(t,n,r),has:(t,n)=>!!x(t,n)||e.has(t,n)}))(M);
  181. /**
  182. * @license
  183. * Copyright 2019 Google LLC
  184. *
  185. * Licensed under the Apache License, Version 2.0 (the "License");
  186. * you may not use this file except in compliance with the License.
  187. * You may obtain a copy of the License at
  188. *
  189. * http://www.apache.org/licenses/LICENSE-2.0
  190. *
  191. * Unless required by applicable law or agreed to in writing, software
  192. * distributed under the License is distributed on an "AS IS" BASIS,
  193. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  194. * See the License for the specific language governing permissions and
  195. * limitations under the License.
  196. */
  197. class z{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const q="@firebase/app",W="0.9.1",K=new C("@firebase/app"),J="[DEFAULT]",G={[q]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},Y=new Map,X=new Map;function Z(e,t){try{e.container.addComponent(t)}catch(n){K.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Q(e){const t=e.name;if(X.has(t))return K.debug(`There were multiple attempts to register component ${t}.`),!1;X.set(t,e);for(const t of Y.values())Z(t,e);return!0}function ee(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}
  198. /**
  199. * @license
  200. * Copyright 2019 Google LLC
  201. *
  202. * Licensed under the Apache License, Version 2.0 (the "License");
  203. * you may not use this file except in compliance with the License.
  204. * You may obtain a copy of the License at
  205. *
  206. * http://www.apache.org/licenses/LICENSE-2.0
  207. *
  208. * Unless required by applicable law or agreed to in writing, software
  209. * distributed under the License is distributed on an "AS IS" BASIS,
  210. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  211. * See the License for the specific language governing permissions and
  212. * limitations under the License.
  213. */
  214. const te=new p("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});
  215. /**
  216. * @license
  217. * Copyright 2019 Google LLC
  218. *
  219. * Licensed under the Apache License, Version 2.0 (the "License");
  220. * you may not use this file except in compliance with the License.
  221. * You may obtain a copy of the License at
  222. *
  223. * http://www.apache.org/licenses/LICENSE-2.0
  224. *
  225. * Unless required by applicable law or agreed to in writing, software
  226. * distributed under the License is distributed on an "AS IS" BASIS,
  227. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  228. * See the License for the specific language governing permissions and
  229. * limitations under the License.
  230. */
  231. class ne{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new m("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw te.create("app-deleted",{appName:this._name})}}
  232. /**
  233. * @license
  234. * Copyright 2019 Google LLC
  235. *
  236. * Licensed under the Apache License, Version 2.0 (the "License");
  237. * you may not use this file except in compliance with the License.
  238. * You may obtain a copy of the License at
  239. *
  240. * http://www.apache.org/licenses/LICENSE-2.0
  241. *
  242. * Unless required by applicable law or agreed to in writing, software
  243. * distributed under the License is distributed on an "AS IS" BASIS,
  244. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  245. * See the License for the specific language governing permissions and
  246. * limitations under the License.
  247. */const re="9.16.0";function ie(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const r=Object.assign({name:J,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!=typeof i||!i)throw te.create("bad-app-name",{appName:String(i)});var a;if(n||(n=null===(a=o())||void 0===a?void 0:a.config),!n)throw te.create("no-options");const s=Y.get(i);if(s){if(d(n,s.options)&&d(r,s.config))return s;throw te.create("duplicate-app",{appName:i})}const c=new _(i);for(const e of X.values())c.addComponent(e);const l=new ne(n,r,c);return Y.set(i,l),l}async function ae(e){const t=e.name;Y.has(t)&&(Y.delete(t),await Promise.all(e.container.getProviders().map((e=>e.delete()))),e.isDeleted=!0)}function oe(e,t,n){var r;let i=null!==(r=G[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){const e=[`Unable to register library "${i}" with version "${t}":`];return a&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),a&&o&&e.push("and"),o&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void K.warn(e.join(" "))}Q(new m(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}function se(e,t){if(null!==e&&"function"!=typeof e)throw te.create("invalid-log-argument");!function(e,t){for(const n of w){let r=null;t&&t.level&&(r=E[t.level]),n.userLogHandler=null===e?null:(t,n,...i)=>{const a=i.map((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((e=>e)).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:y[n].toLowerCase(),message:a,args:i,type:t.name})}}}(e,t)}function ce(e){var t;t=e,w.forEach((e=>{e.setLogLevel(t)}))}
  248. /**
  249. * @license
  250. * Copyright 2021 Google LLC
  251. *
  252. * Licensed under the Apache License, Version 2.0 (the "License");
  253. * you may not use this file except in compliance with the License.
  254. * You may obtain a copy of the License at
  255. *
  256. * http://www.apache.org/licenses/LICENSE-2.0
  257. *
  258. * Unless required by applicable law or agreed to in writing, software
  259. * distributed under the License is distributed on an "AS IS" BASIS,
  260. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  261. * See the License for the specific language governing permissions and
  262. * limitations under the License.
  263. */const le="firebase-heartbeat-store";let ue=null;function pe(){return ue||(ue=F("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(le)}}).catch((e=>{throw te.create("idb-open",{originalErrorMessage:e.message})}))),ue}async function he(e,t){try{const n=(await pe()).transaction(le,"readwrite"),r=n.objectStore(le);return await r.put(t,fe(e)),n.done}catch(e){if(e instanceof u)K.warn(e.message);else{const t=te.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});K.warn(t.message)}}}function fe(e){return`${e.name}!${e.options.appId}`}
  264. /**
  265. * @license
  266. * Copyright 2021 Google LLC
  267. *
  268. * Licensed under the Apache License, Version 2.0 (the "License");
  269. * you may not use this file except in compliance with the License.
  270. * You may obtain a copy of the License at
  271. *
  272. * http://www.apache.org/licenses/LICENSE-2.0
  273. *
  274. * Unless required by applicable law or agreed to in writing, software
  275. * distributed under the License is distributed on an "AS IS" BASIS,
  276. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  277. * See the License for the specific language governing permissions and
  278. * limitations under the License.
  279. */class de{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new me(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=ge();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=ge(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),be(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),be(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=n(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function ge(){return(new Date).toISOString().substring(0,10)}class me{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!c()&&l().then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){return await async function(e){try{return(await pe()).transaction(le).objectStore(le).get(fe(e))}catch(e){if(e instanceof u)K.warn(e.message);else{const t=te.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});K.warn(t.message)}}}(this.app)||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return he(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return he(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function be(e){return n(JSON.stringify({version:2,heartbeats:e})).length}
  280. /**
  281. * @license
  282. * Copyright 2019 Google LLC
  283. *
  284. * Licensed under the Apache License, Version 2.0 (the "License");
  285. * you may not use this file except in compliance with the License.
  286. * You may obtain a copy of the License at
  287. *
  288. * http://www.apache.org/licenses/LICENSE-2.0
  289. *
  290. * Unless required by applicable law or agreed to in writing, software
  291. * distributed under the License is distributed on an "AS IS" BASIS,
  292. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  293. * See the License for the specific language governing permissions and
  294. * limitations under the License.
  295. */var ve;ve="",Q(new m("platform-logger",(e=>new z(e)),"PRIVATE")),Q(new m("heartbeat",(e=>new de(e)),"PRIVATE")),oe(q,W,ve),oe(q,W,"esm2017"),oe("fire-js","");var _e=Object.freeze({__proto__:null,SDK_VERSION:re,_DEFAULT_ENTRY_NAME:J,_addComponent:Z,_addOrOverwriteComponent:function(e,t){e.container.addOrOverwriteComponent(t)},_apps:Y,_clearComponents:function(){X.clear()},_components:X,_getProvider:ee,_registerComponent:Q,_removeServiceInstance:function(e,t,n="[DEFAULT]"){ee(e,t).clearInstance(n)},deleteApp:ae,getApp:function(e="[DEFAULT]"){const t=Y.get(e);if(!t&&e===J)return ie();if(!t)throw te.create("no-app",{appName:e});return t},getApps:function(){return Array.from(Y.values())},initializeApp:ie,onLog:se,registerVersion:oe,setLogLevel:ce,FirebaseError:u});
  296. /**
  297. * @license
  298. * Copyright 2019 Google LLC
  299. *
  300. * Licensed under the Apache License, Version 2.0 (the "License");
  301. * you may not use this file except in compliance with the License.
  302. * You may obtain a copy of the License at
  303. *
  304. * http://www.apache.org/licenses/LICENSE-2.0
  305. *
  306. * Unless required by applicable law or agreed to in writing, software
  307. * distributed under the License is distributed on an "AS IS" BASIS,
  308. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  309. * See the License for the specific language governing permissions and
  310. * limitations under the License.
  311. */class we{constructor(e,t){this._delegate=e,this.firebase=t,Z(e,new m("app-compat",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return this.firebase.INTERNAL.removeApp(this.name),ae(this._delegate)}_getService(e,t="[DEFAULT]"){return this._delegate.checkDestroyed(),this._delegate.container.getProvider(e).getImmediate({identifier:t})}}
  312. /**
  313. * @license
  314. * Copyright 2019 Google LLC
  315. *
  316. * Licensed under the Apache License, Version 2.0 (the "License");
  317. * you may not use this file except in compliance with the License.
  318. * You may obtain a copy of the License at
  319. *
  320. * http://www.apache.org/licenses/LICENSE-2.0
  321. *
  322. * Unless required by applicable law or agreed to in writing, software
  323. * distributed under the License is distributed on an "AS IS" BASIS,
  324. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  325. * See the License for the specific language governing permissions and
  326. * limitations under the License.
  327. */const ye=new p("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."});
  328. /**
  329. * @license
  330. * Copyright 2019 Google LLC
  331. *
  332. * Licensed under the Apache License, Version 2.0 (the "License");
  333. * you may not use this file except in compliance with the License.
  334. * You may obtain a copy of the License at
  335. *
  336. * http://www.apache.org/licenses/LICENSE-2.0
  337. *
  338. * Unless required by applicable law or agreed to in writing, software
  339. * distributed under the License is distributed on an "AS IS" BASIS,
  340. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  341. * See the License for the specific language governing permissions and
  342. * limitations under the License.
  343. */
  344. function Ee(e){const t={},n={__esModule:!0,initializeApp:function(r,i={}){const a=ie(r,i);if(f(t,a.name))return t[a.name];const o=new e(a,n);return t[a.name]=o,o},app:i,registerVersion:oe,setLogLevel:ce,onLog:se,apps:null,SDK_VERSION:re,INTERNAL:{registerComponent:function(t){const a=t.name,o=a.replace("-compat","");if(Q(t)&&"PUBLIC"===t.type){const s=(e=i())=>{if("function"!=typeof e[o])throw ye.create("invalid-app-argument",{appName:a});return e[o]()};void 0!==t.serviceProps&&r(s,t.serviceProps),n[o]=s,e.prototype[o]=function(...e){return this._getService.bind(this,a).apply(this,t.multipleInstances?e:[])}}return"PUBLIC"===t.type?n[o]:null},removeApp:function(e){delete t[e]},useAsService:function(e,t){if("serverAuth"===t)return null;return t},modularAPIs:_e}};function i(e){if(!f(t,e=e||J))throw ye.create("no-app",{appName:e});return t[e]}return n.default=n,Object.defineProperty(n,"apps",{get:function(){return Object.keys(t).map((e=>t[e]))}}),i.App=e,n}
  345. /**
  346. * @license
  347. * Copyright 2019 Google LLC
  348. *
  349. * Licensed under the Apache License, Version 2.0 (the "License");
  350. * you may not use this file except in compliance with the License.
  351. * You may obtain a copy of the License at
  352. *
  353. * http://www.apache.org/licenses/LICENSE-2.0
  354. *
  355. * Unless required by applicable law or agreed to in writing, software
  356. * distributed under the License is distributed on an "AS IS" BASIS,
  357. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  358. * See the License for the specific language governing permissions and
  359. * limitations under the License.
  360. */
  361. /**
  362. * @license
  363. * Copyright 2019 Google LLC
  364. *
  365. * Licensed under the Apache License, Version 2.0 (the "License");
  366. * you may not use this file except in compliance with the License.
  367. * You may obtain a copy of the License at
  368. *
  369. * http://www.apache.org/licenses/LICENSE-2.0
  370. *
  371. * Unless required by applicable law or agreed to in writing, software
  372. * distributed under the License is distributed on an "AS IS" BASIS,
  373. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  374. * See the License for the specific language governing permissions and
  375. * limitations under the License.
  376. */
  377. const Ie=function(){const e=Ee(we);e.SDK_VERSION=`${e.SDK_VERSION}_LITE`;const t=e.INTERNAL.registerComponent;return e.INTERNAL.registerComponent=function(e){if("PUBLIC"===e.type&&!e.name.includes("performance")&&!e.name.includes("installations"))throw Error(`${name} cannot register with the standalone perf instance`);return t(e)},e}();!
  378. /**
  379. * @license
  380. * Copyright 2019 Google LLC
  381. *
  382. * Licensed under the Apache License, Version 2.0 (the "License");
  383. * you may not use this file except in compliance with the License.
  384. * You may obtain a copy of the License at
  385. *
  386. * http://www.apache.org/licenses/LICENSE-2.0
  387. *
  388. * Unless required by applicable law or agreed to in writing, software
  389. * distributed under the License is distributed on an "AS IS" BASIS,
  390. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  391. * See the License for the specific language governing permissions and
  392. * limitations under the License.
  393. */
  394. function(e){oe("@firebase/app-compat","0.2.1",e)}("lite");
  395. /**
  396. * @license
  397. * Copyright 2020 Google LLC
  398. *
  399. * Licensed under the Apache License, Version 2.0 (the "License");
  400. * you may not use this file except in compliance with the License.
  401. * You may obtain a copy of the License at
  402. *
  403. * http://www.apache.org/licenses/LICENSE-2.0
  404. *
  405. * Unless required by applicable law or agreed to in writing, software
  406. * distributed under the License is distributed on an "AS IS" BASIS,
  407. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  408. * See the License for the specific language governing permissions and
  409. * limitations under the License.
  410. */
  411. Ie.registerVersion("firebase","9.16.0","app-compat");const Se="@firebase/installations",Te="0.6.1",Ce=1e4,Ae="w:0.6.1",De="FIS_v2",Ne=36e5,Oe=new p("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function ke(e){return e instanceof u&&e.code.includes("request-failed")}
  412. /**
  413. * @license
  414. * Copyright 2019 Google LLC
  415. *
  416. * Licensed under the Apache License, Version 2.0 (the "License");
  417. * you may not use this file except in compliance with the License.
  418. * You may obtain a copy of the License at
  419. *
  420. * http://www.apache.org/licenses/LICENSE-2.0
  421. *
  422. * Unless required by applicable law or agreed to in writing, software
  423. * distributed under the License is distributed on an "AS IS" BASIS,
  424. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  425. * See the License for the specific language governing permissions and
  426. * limitations under the License.
  427. */function Le({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function Pe(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function Me(e,t){const n=(await t.json()).error;return Oe.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function Be({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Re(e,{refreshToken:t}){const n=Be(e);return n.append("Authorization",function(e){return`FIS_v2 ${e}`}
  428. /**
  429. * @license
  430. * Copyright 2019 Google LLC
  431. *
  432. * Licensed under the Apache License, Version 2.0 (the "License");
  433. * you may not use this file except in compliance with the License.
  434. * You may obtain a copy of the License at
  435. *
  436. * http://www.apache.org/licenses/LICENSE-2.0
  437. *
  438. * Unless required by applicable law or agreed to in writing, software
  439. * distributed under the License is distributed on an "AS IS" BASIS,
  440. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  441. * See the License for the specific language governing permissions and
  442. * limitations under the License.
  443. */(t)),n}async function $e(e){const t=await e();return t.status>=500&&t.status<600?e():t}
  444. /**
  445. * @license
  446. * Copyright 2019 Google LLC
  447. *
  448. * Licensed under the Apache License, Version 2.0 (the "License");
  449. * you may not use this file except in compliance with the License.
  450. * You may obtain a copy of the License at
  451. *
  452. * http://www.apache.org/licenses/LICENSE-2.0
  453. *
  454. * Unless required by applicable law or agreed to in writing, software
  455. * distributed under the License is distributed on an "AS IS" BASIS,
  456. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  457. * See the License for the specific language governing permissions and
  458. * limitations under the License.
  459. */
  460. function je(e){return new Promise((t=>{setTimeout(t,e)}))}
  461. /**
  462. * @license
  463. * Copyright 2019 Google LLC
  464. *
  465. * Licensed under the Apache License, Version 2.0 (the "License");
  466. * you may not use this file except in compliance with the License.
  467. * You may obtain a copy of the License at
  468. *
  469. * http://www.apache.org/licenses/LICENSE-2.0
  470. *
  471. * Unless required by applicable law or agreed to in writing, software
  472. * distributed under the License is distributed on an "AS IS" BASIS,
  473. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  474. * See the License for the specific language governing permissions and
  475. * limitations under the License.
  476. */
  477. /**
  478. * @license
  479. * Copyright 2019 Google LLC
  480. *
  481. * Licensed under the Apache License, Version 2.0 (the "License");
  482. * you may not use this file except in compliance with the License.
  483. * You may obtain a copy of the License at
  484. *
  485. * http://www.apache.org/licenses/LICENSE-2.0
  486. *
  487. * Unless required by applicable law or agreed to in writing, software
  488. * distributed under the License is distributed on an "AS IS" BASIS,
  489. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  490. * See the License for the specific language governing permissions and
  491. * limitations under the License.
  492. */
  493. const Fe=/^[cdef][\w-]{21}$/;function Ue(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){return(t=e,btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var t}
  494. /**
  495. * @license
  496. * Copyright 2019 Google LLC
  497. *
  498. * Licensed under the Apache License, Version 2.0 (the "License");
  499. * you may not use this file except in compliance with the License.
  500. * You may obtain a copy of the License at
  501. *
  502. * http://www.apache.org/licenses/LICENSE-2.0
  503. *
  504. * Unless required by applicable law or agreed to in writing, software
  505. * distributed under the License is distributed on an "AS IS" BASIS,
  506. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  507. * See the License for the specific language governing permissions and
  508. * limitations under the License.
  509. */(e);return Fe.test(t)?t:""}catch(e){return""}}function He(e){return`${e.appName}!${e.appId}`}
  510. /**
  511. * @license
  512. * Copyright 2019 Google LLC
  513. *
  514. * Licensed under the Apache License, Version 2.0 (the "License");
  515. * you may not use this file except in compliance with the License.
  516. * You may obtain a copy of the License at
  517. *
  518. * http://www.apache.org/licenses/LICENSE-2.0
  519. *
  520. * Unless required by applicable law or agreed to in writing, software
  521. * distributed under the License is distributed on an "AS IS" BASIS,
  522. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  523. * See the License for the specific language governing permissions and
  524. * limitations under the License.
  525. */const Ve=new Map;function xe(e,t){const n=He(e);ze(n,t),function(e,t){const n=function(){!qe&&"BroadcastChannel"in self&&(qe=new BroadcastChannel("[Firebase] FID Change"),qe.onmessage=e=>{ze(e.data.key,e.data.fid)});return qe}();n&&n.postMessage({key:e,fid:t});0===Ve.size&&qe&&(qe.close(),qe=null)}(n,t)}function ze(e,t){const n=Ve.get(e);if(n)for(const e of n)e(t)}let qe=null;
  526. /**
  527. * @license
  528. * Copyright 2019 Google LLC
  529. *
  530. * Licensed under the Apache License, Version 2.0 (the "License");
  531. * you may not use this file except in compliance with the License.
  532. * You may obtain a copy of the License at
  533. *
  534. * http://www.apache.org/licenses/LICENSE-2.0
  535. *
  536. * Unless required by applicable law or agreed to in writing, software
  537. * distributed under the License is distributed on an "AS IS" BASIS,
  538. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  539. * See the License for the specific language governing permissions and
  540. * limitations under the License.
  541. */
  542. const We="firebase-installations-store";let Ke=null;function Je(){return Ke||(Ke=F("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(We)}})),Ke}async function Ge(e,t){const n=He(e),r=(await Je()).transaction(We,"readwrite"),i=r.objectStore(We),a=await i.get(n);return await i.put(t,n),await r.done,a&&a.fid===t.fid||xe(e,t.fid),t}async function Ye(e){const t=He(e),n=(await Je()).transaction(We,"readwrite");await n.objectStore(We).delete(t),await n.done}async function Xe(e,t){const n=He(e),r=(await Je()).transaction(We,"readwrite"),i=r.objectStore(We),a=await i.get(n),o=t(a);return void 0===o?await i.delete(n):await i.put(o,n),await r.done,!o||a&&a.fid===o.fid||xe(e,o.fid),o}
  543. /**
  544. * @license
  545. * Copyright 2019 Google LLC
  546. *
  547. * Licensed under the Apache License, Version 2.0 (the "License");
  548. * you may not use this file except in compliance with the License.
  549. * You may obtain a copy of the License at
  550. *
  551. * http://www.apache.org/licenses/LICENSE-2.0
  552. *
  553. * Unless required by applicable law or agreed to in writing, software
  554. * distributed under the License is distributed on an "AS IS" BASIS,
  555. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  556. * See the License for the specific language governing permissions and
  557. * limitations under the License.
  558. */async function Ze(e){let t;const n=await Xe(e.appConfig,(n=>{const r=function(e){return tt(e||{fid:Ue(),registrationStatus:0})}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(Oe.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=Le(e),i=Be(e),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={fid:n,authVersion:De,appId:e.appId,sdkVersion:Ae},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await $e((()=>fetch(r,s)));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:Pe(e.authToken)}}throw await Me("Create Installation",c)}(e,t);return Ge(e.appConfig,n)}catch(n){throw ke(n)&&409===n.customData.serverCode?await Ye(e.appConfig):await Ge(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Qe(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}));return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function Qe(e){let t=await et(e.appConfig);for(;1===t.registrationStatus;)await je(100),t=await et(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await Ze(e);return n||t}return t}function et(e){return Xe(e,(e=>{if(!e)throw Oe.create("installation-not-found");return tt(e)}))}function tt(e){return 1===(t=e).registrationStatus&&t.registrationTime+Ce<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t;
  559. /**
  560. * @license
  561. * Copyright 2019 Google LLC
  562. *
  563. * Licensed under the Apache License, Version 2.0 (the "License");
  564. * you may not use this file except in compliance with the License.
  565. * You may obtain a copy of the License at
  566. *
  567. * http://www.apache.org/licenses/LICENSE-2.0
  568. *
  569. * Unless required by applicable law or agreed to in writing, software
  570. * distributed under the License is distributed on an "AS IS" BASIS,
  571. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  572. * See the License for the specific language governing permissions and
  573. * limitations under the License.
  574. */}async function nt({appConfig:e,heartbeatServiceProvider:t},n){const r=function(e,{fid:t}){return`${Le(e)}/${t}/authTokens:generate`}
  575. /**
  576. * @license
  577. * Copyright 2019 Google LLC
  578. *
  579. * Licensed under the Apache License, Version 2.0 (the "License");
  580. * you may not use this file except in compliance with the License.
  581. * You may obtain a copy of the License at
  582. *
  583. * http://www.apache.org/licenses/LICENSE-2.0
  584. *
  585. * Unless required by applicable law or agreed to in writing, software
  586. * distributed under the License is distributed on an "AS IS" BASIS,
  587. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  588. * See the License for the specific language governing permissions and
  589. * limitations under the License.
  590. */(e,n),i=Re(e,n),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={installation:{sdkVersion:Ae,appId:e.appId}},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await $e((()=>fetch(r,s)));if(c.ok){return Pe(await c.json())}throw await Me("Generate Auth Token",c)}async function rt(e,t=!1){let n;const r=await Xe(e.appConfig,(r=>{if(!at(r))throw Oe.create("not-registered");const i=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Ne}(e)}(i))return r;if(1===i.requestStatus)return n=async function(e,t){let n=await it(e.appConfig);for(;1===n.authToken.requestStatus;)await je(100),n=await it(e.appConfig);const r=n.authToken;return 0===r.requestStatus?rt(e,t):r}(e,t),r;{if(!navigator.onLine)throw Oe.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(r);return n=async function(e,t){try{const n=await nt(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await Ge(e.appConfig,r),n}catch(n){if(!ke(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await Ge(e.appConfig,n)}else await Ye(e.appConfig);throw n}}(e,t),t}}));return n?await n:r.authToken}function it(e){return Xe(e,(e=>{if(!at(e))throw Oe.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+Ce<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e;var n;
  591. /**
  592. * @license
  593. * Copyright 2019 Google LLC
  594. *
  595. * Licensed under the Apache License, Version 2.0 (the "License");
  596. * you may not use this file except in compliance with the License.
  597. * You may obtain a copy of the License at
  598. *
  599. * http://www.apache.org/licenses/LICENSE-2.0
  600. *
  601. * Unless required by applicable law or agreed to in writing, software
  602. * distributed under the License is distributed on an "AS IS" BASIS,
  603. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  604. * See the License for the specific language governing permissions and
  605. * limitations under the License.
  606. */}))}function at(e){return void 0!==e&&2===e.registrationStatus}
  607. /**
  608. * @license
  609. * Copyright 2019 Google LLC
  610. *
  611. * Licensed under the Apache License, Version 2.0 (the "License");
  612. * you may not use this file except in compliance with the License.
  613. * You may obtain a copy of the License at
  614. *
  615. * http://www.apache.org/licenses/LICENSE-2.0
  616. *
  617. * Unless required by applicable law or agreed to in writing, software
  618. * distributed under the License is distributed on an "AS IS" BASIS,
  619. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  620. * See the License for the specific language governing permissions and
  621. * limitations under the License.
  622. */
  623. async function ot(e,t=!1){const n=e;await async function(e){const{registrationPromise:t}=await Ze(e);t&&await t}
  624. /**
  625. * @license
  626. * Copyright 2019 Google LLC
  627. *
  628. * Licensed under the Apache License, Version 2.0 (the "License");
  629. * you may not use this file except in compliance with the License.
  630. * You may obtain a copy of the License at
  631. *
  632. * http://www.apache.org/licenses/LICENSE-2.0
  633. *
  634. * Unless required by applicable law or agreed to in writing, software
  635. * distributed under the License is distributed on an "AS IS" BASIS,
  636. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  637. * See the License for the specific language governing permissions and
  638. * limitations under the License.
  639. */(n);return(await rt(n,t)).token}function st(e){return Oe.create("missing-app-config-values",{valueName:e})}
  640. /**
  641. * @license
  642. * Copyright 2020 Google LLC
  643. *
  644. * Licensed under the Apache License, Version 2.0 (the "License");
  645. * you may not use this file except in compliance with the License.
  646. * You may obtain a copy of the License at
  647. *
  648. * http://www.apache.org/licenses/LICENSE-2.0
  649. *
  650. * Unless required by applicable law or agreed to in writing, software
  651. * distributed under the License is distributed on an "AS IS" BASIS,
  652. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  653. * See the License for the specific language governing permissions and
  654. * limitations under the License.
  655. */const ct="installations",lt=e=>{const t=ee(e.getProvider("app").getImmediate(),ct).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await Ze(t);return r?r.catch(console.error):rt(t).catch(console.error),n.fid}(t),getToken:e=>ot(t,e)}};Q(new m(ct,(e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw st("App Configuration");if(!e.name)throw st("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw st(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:ee(t,"heartbeat"),_delete:()=>Promise.resolve()}}),"PUBLIC")),Q(new m("installations-internal",lt,"PRIVATE")),oe(Se,Te),oe(Se,Te,"esm2017");const ut="@firebase/performance",pt="0.6.1",ht=pt,ft="FB-PERF-TRACE-MEASURE",dt="_wt_",gt="_fcp",mt="_fid",bt="@firebase/performance/config",vt="@firebase/performance/configexpire",_t="Performance",wt=new p("performance",_t,{"trace started":"Trace {$traceName} was started before.","trace stopped":"Trace {$traceName} is not running.","nonpositive trace startTime":"Trace {$traceName} startTime should be positive.","nonpositive trace duration":"Trace {$traceName} duration should be positive.","no window":"Window is not available.","no app id":"App id is not available.","no project id":"Project id is not available.","no api key":"Api key is not available.","invalid cc log":"Attempted to queue invalid cc event","FB not default":"Performance can only start when Firebase app instance is the default one.","RC response not ok":"RC response is not ok","invalid attribute name":"Attribute name {$attributeName} is invalid.","invalid attribute value":"Attribute value {$attributeValue} is invalid.","invalid custom metric name":"Custom metric name {$customMetricName} is invalid","invalid String merger input":"Input for String merger is invalid, contact support team to resolve.","already initialized":"initializePerformance() has already been called with different options. To avoid this error, call initializePerformance() with the same options as when it was originally called, or call getPerformance() to return the already initialized instance."}),yt=new C(_t);
  656. /**
  657. * @license
  658. * Copyright 2020 Google LLC
  659. *
  660. * Licensed under the Apache License, Version 2.0 (the "License");
  661. * you may not use this file except in compliance with the License.
  662. * You may obtain a copy of the License at
  663. *
  664. * http://www.apache.org/licenses/LICENSE-2.0
  665. *
  666. * Unless required by applicable law or agreed to in writing, software
  667. * distributed under the License is distributed on an "AS IS" BASIS,
  668. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  669. * See the License for the specific language governing permissions and
  670. * limitations under the License.
  671. */
  672. let Et,It,St,Tt;yt.logLevel=y.INFO;class Ct{constructor(e){if(this.window=e,!e)throw wt.create("no window");this.performance=e.performance,this.PerformanceObserver=e.PerformanceObserver,this.windowLocation=e.location,this.navigator=e.navigator,this.document=e.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=e.localStorage),e.perfMetrics&&e.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=e.perfMetrics.onFirstInputDelay)}getUrl(){return this.windowLocation.href.split("?")[0]}mark(e){this.performance&&this.performance.mark&&this.performance.mark(e)}measure(e,t,n){this.performance&&this.performance.measure&&this.performance.measure(e,t,n)}getEntriesByType(e){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(e):[]}getEntriesByName(e){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(e):[]}getTimeOrigin(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)}requiredApisAvailable(){return fetch&&Promise&&"undefined"!=typeof navigator&&navigator.cookieEnabled?!!c()||(yt.info("IndexedDB is not supported by current browswer"),!1):(yt.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)}setupObserver(e,t){if(!this.PerformanceObserver)return;new this.PerformanceObserver((e=>{for(const n of e.getEntries())t(n)})).observe({entryTypes:[e]})}static getInstance(){return void 0===Et&&(Et=new Ct(It)),Et}}function At(){return St}
  673. /**
  674. * @license
  675. * Copyright 2020 Google LLC
  676. *
  677. * Licensed under the Apache License, Version 2.0 (the "License");
  678. * you may not use this file except in compliance with the License.
  679. * You may obtain a copy of the License at
  680. *
  681. * http://www.apache.org/licenses/LICENSE-2.0
  682. *
  683. * Unless required by applicable law or agreed to in writing, software
  684. * distributed under the License is distributed on an "AS IS" BASIS,
  685. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  686. * See the License for the specific language governing permissions and
  687. * limitations under the License.
  688. */
  689. function Dt(e,t){const n=e.length-t.length;if(n<0||n>1)throw wt.create("invalid String merger input");const r=[];for(let n=0;n<e.length;n++)r.push(e.charAt(n)),t.length>n&&r.push(t.charAt(n));return r.join("")}
  690. /**
  691. * @license
  692. * Copyright 2019 Google LLC
  693. *
  694. * Licensed under the Apache License, Version 2.0 (the "License");
  695. * you may not use this file except in compliance with the License.
  696. * You may obtain a copy of the License at
  697. *
  698. * http://www.apache.org/licenses/LICENSE-2.0
  699. *
  700. * Unless required by applicable law or agreed to in writing, software
  701. * distributed under the License is distributed on an "AS IS" BASIS,
  702. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  703. * See the License for the specific language governing permissions and
  704. * limitations under the License.
  705. */class Nt{constructor(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=Dt("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=Dt("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}getFlTransportFullUrl(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)}static getInstance(){return void 0===Tt&&(Tt=new Nt),Tt}}
  706. /**
  707. * @license
  708. * Copyright 2020 Google LLC
  709. *
  710. * Licensed under the Apache License, Version 2.0 (the "License");
  711. * you may not use this file except in compliance with the License.
  712. * You may obtain a copy of the License at
  713. *
  714. * http://www.apache.org/licenses/LICENSE-2.0
  715. *
  716. * Unless required by applicable law or agreed to in writing, software
  717. * distributed under the License is distributed on an "AS IS" BASIS,
  718. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  719. * See the License for the specific language governing permissions and
  720. * limitations under the License.
  721. */var Ot;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"}(Ot||(Ot={}));const kt=["firebase_","google_","ga_"],Lt=new RegExp("^[a-zA-Z]\\w*$");function Pt(){const e=Ct.getInstance().navigator;return(null==e?void 0:e.serviceWorker)?e.serviceWorker.controller?2:3:1}function Mt(){switch(Ct.getInstance().document.visibilityState){case"visible":return Ot.VISIBLE;case"hidden":return Ot.HIDDEN;default:return Ot.UNKNOWN}}function Bt(){const e=Ct.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}
  722. /**
  723. * @license
  724. * Copyright 2020 Google LLC
  725. *
  726. * Licensed under the Apache License, Version 2.0 (the "License");
  727. * you may not use this file except in compliance with the License.
  728. * You may obtain a copy of the License at
  729. *
  730. * http://www.apache.org/licenses/LICENSE-2.0
  731. *
  732. * Unless required by applicable law or agreed to in writing, software
  733. * distributed under the License is distributed on an "AS IS" BASIS,
  734. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  735. * See the License for the specific language governing permissions and
  736. * limitations under the License.
  737. */
  738. function Rt(e){var t;const n=null===(t=e.options)||void 0===t?void 0:t.appId;if(!n)throw wt.create("no app id");return n}
  739. /**
  740. * @license
  741. * Copyright 2020 Google LLC
  742. *
  743. * Licensed under the Apache License, Version 2.0 (the "License");
  744. * you may not use this file except in compliance with the License.
  745. * You may obtain a copy of the License at
  746. *
  747. * http://www.apache.org/licenses/LICENSE-2.0
  748. *
  749. * Unless required by applicable law or agreed to in writing, software
  750. * distributed under the License is distributed on an "AS IS" BASIS,
  751. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  752. * See the License for the specific language governing permissions and
  753. * limitations under the License.
  754. */
  755. const $t="0.0.1",jt={loggingEnabled:!0},Ft="FIREBASE_INSTALLATIONS_AUTH";function Ut(e,t){const n=function(){const e=Ct.getInstance().localStorage;if(!e)return;const t=e.getItem(vt);if(!(t&&(n=t,Number(n)>Date.now())))return;var n;const r=e.getItem(bt);if(!r)return;try{return JSON.parse(r)}catch(e){return}}();return n?(Vt(n),Promise.resolve()):function(e,t){return function(e){const t=e.getToken();return t.then((e=>{})),t}(e.installations).then((n=>{const r=function(e){var t;const n=null===(t=e.options)||void 0===t?void 0:t.projectId;if(!n)throw wt.create("no project id");return n}(e.app),i=function(e){var t;const n=null===(t=e.options)||void 0===t?void 0:t.apiKey;if(!n)throw wt.create("no api key");return n}(e.app),a=new Request(`https://firebaseremoteconfig.googleapis.com/v1/projects/${r}/namespaces/fireperf:fetch?key=${i}`,{method:"POST",headers:{Authorization:`${Ft} ${n}`},body:JSON.stringify({app_instance_id:t,app_instance_id_token:n,app_id:Rt(e.app),app_version:ht,sdk_version:$t})});return fetch(a).then((e=>{if(e.ok)return e.json();throw wt.create("RC response not ok")}))})).catch((()=>{yt.info(Ht)}))}(e,t).then(Vt).then((e=>function(e){const t=Ct.getInstance().localStorage;if(!e||!t)return;t.setItem(bt,JSON.stringify(e)),t.setItem(vt,String(Date.now()+60*Nt.getInstance().configTimeToLive*60*1e3))}(e)),(()=>{}))}const Ht="Could not fetch config, will use default configs";function Vt(e){if(!e)return e;const t=Nt.getInstance(),n=e.entries||{};return void 0!==n.fpr_enabled?t.loggingEnabled="true"===String(n.fpr_enabled):t.loggingEnabled=jt.loggingEnabled,n.fpr_log_source?t.logSource=Number(n.fpr_log_source):jt.logSource&&(t.logSource=jt.logSource),n.fpr_log_endpoint_url?t.logEndPointUrl=n.fpr_log_endpoint_url:jt.logEndPointUrl&&(t.logEndPointUrl=jt.logEndPointUrl),n.fpr_log_transport_key?t.transportKey=n.fpr_log_transport_key:jt.transportKey&&(t.transportKey=jt.transportKey),void 0!==n.fpr_vc_network_request_sampling_rate?t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate):void 0!==jt.networkRequestsSamplingRate&&(t.networkRequestsSamplingRate=jt.networkRequestsSamplingRate),void 0!==n.fpr_vc_trace_sampling_rate?t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate):void 0!==jt.tracesSamplingRate&&(t.tracesSamplingRate=jt.tracesSamplingRate),t.logTraceAfterSampling=xt(t.tracesSamplingRate),t.logNetworkAfterSampling=xt(t.networkRequestsSamplingRate),e}function xt(e){return Math.random()<=e}
  756. /**
  757. * @license
  758. * Copyright 2020 Google LLC
  759. *
  760. * Licensed under the Apache License, Version 2.0 (the "License");
  761. * you may not use this file except in compliance with the License.
  762. * You may obtain a copy of the License at
  763. *
  764. * http://www.apache.org/licenses/LICENSE-2.0
  765. *
  766. * Unless required by applicable law or agreed to in writing, software
  767. * distributed under the License is distributed on an "AS IS" BASIS,
  768. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  769. * See the License for the specific language governing permissions and
  770. * limitations under the License.
  771. */let zt,qt=1;function Wt(e){return qt=2,zt=zt||function(e){return function(){const e=Ct.getInstance().document;return new Promise((t=>{if(e&&"complete"!==e.readyState){const n=()=>{"complete"===e.readyState&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()}))}().then((()=>function(e){const t=e.getId();return t.then((e=>{St=e})),t}(e.installations))).then((t=>Ut(e,t))).then((()=>Kt()),(()=>Kt()))}(e),zt}function Kt(){qt=3}
  772. /**
  773. * @license
  774. * Copyright 2020 Google LLC
  775. *
  776. * Licensed under the Apache License, Version 2.0 (the "License");
  777. * you may not use this file except in compliance with the License.
  778. * You may obtain a copy of the License at
  779. *
  780. * http://www.apache.org/licenses/LICENSE-2.0
  781. *
  782. * Unless required by applicable law or agreed to in writing, software
  783. * distributed under the License is distributed on an "AS IS" BASIS,
  784. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  785. * See the License for the specific language governing permissions and
  786. * limitations under the License.
  787. */const Jt=1e4;let Gt,Yt=3,Xt=[],Zt=!1;function Qt(e){setTimeout((()=>{if(0!==Yt)return Xt.length?void function(){const e=Xt.splice(0,1e3),t=e.map((e=>({source_extension_json_proto3:e.message,event_time_ms:String(e.eventTime)})));(function(e,t){return function(e){const t=Nt.getInstance().getFlTransportFullUrl();return fetch(t,{method:"POST",body:JSON.stringify(e)})}(e).then((e=>(e.ok||yt.info("Call to Firebase backend failed."),e.json()))).then((e=>{const n=Number(e.nextRequestWaitMillis);let r=Jt;isNaN(n)||(r=Math.max(n,r));const i=e.logResponseDetails;Array.isArray(i)&&i.length>0&&"RETRY_REQUEST_LATER"===i[0].responseAction&&(Xt=[...t,...Xt],yt.info("Retry transport request later.")),Yt=3,Qt(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:Nt.getInstance().logSource,log_event:t},e).catch((()=>{Xt=[...e,...Xt],Yt--,yt.info(`Tries left: ${Yt}.`),Qt(Jt)}))}():Qt(Jt)}),e)}function en(e){return(...t)=>{!function(e){if(!e.eventTime||!e.message)throw wt.create("invalid cc log");Xt=[...Xt,e]}({message:e(...t),eventTime:Date.now()})}}
  788. /**
  789. * @license
  790. * Copyright 2020 Google LLC
  791. *
  792. * Licensed under the Apache License, Version 2.0 (the "License");
  793. * you may not use this file except in compliance with the License.
  794. * You may obtain a copy of the License at
  795. *
  796. * http://www.apache.org/licenses/LICENSE-2.0
  797. *
  798. * Unless required by applicable law or agreed to in writing, software
  799. * distributed under the License is distributed on an "AS IS" BASIS,
  800. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  801. * See the License for the specific language governing permissions and
  802. * limitations under the License.
  803. */function tn(e,t){Gt||(Gt=en(an)),Gt(e,t)}function nn(e){const t=Nt.getInstance();!t.instrumentationEnabled&&e.isAuto||(t.dataCollectionEnabled||e.isAuto)&&Ct.getInstance().requiredApisAvailable()&&(e.isAuto&&Mt()!==Ot.VISIBLE||(3===qt?rn(e):Wt(e.performanceController).then((()=>rn(e)),(()=>rn(e)))))}function rn(e){if(!At())return;const t=Nt.getInstance();t.loggingEnabled&&t.logTraceAfterSampling&&setTimeout((()=>tn(e,1)),0)}function an(e,t){return 0===t?function(e){const t={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},n={application_info:on(e.performanceController.app),network_request_metric:t};return JSON.stringify(n)}(e):function(e){const t={name:e.name,is_auto:e.isAuto,client_start_time_us:e.startTimeUs,duration_us:e.durationUs};0!==Object.keys(e.counters).length&&(t.counters=e.counters);const n=e.getAttributes();0!==Object.keys(n).length&&(t.custom_attributes=n);const r={application_info:on(e.performanceController.app),trace_metric:t};return JSON.stringify(r)}(e)}function on(e){return{google_app_id:Rt(e),app_instance_id:At(),web_app_info:{sdk_version:ht,page_url:Ct.getInstance().getUrl(),service_worker_status:Pt(),visibility_state:Mt(),effective_connection_type:Bt()},application_process_state:0}}
  804. /**
  805. * @license
  806. * Copyright 2020 Google LLC
  807. *
  808. * Licensed under the Apache License, Version 2.0 (the "License");
  809. * you may not use this file except in compliance with the License.
  810. * You may obtain a copy of the License at
  811. *
  812. * http://www.apache.org/licenses/LICENSE-2.0
  813. *
  814. * Unless required by applicable law or agreed to in writing, software
  815. * distributed under the License is distributed on an "AS IS" BASIS,
  816. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  817. * See the License for the specific language governing permissions and
  818. * limitations under the License.
  819. */const sn=["_fp",gt,mt];
  820. /**
  821. * @license
  822. * Copyright 2020 Google LLC
  823. *
  824. * Licensed under the Apache License, Version 2.0 (the "License");
  825. * you may not use this file except in compliance with the License.
  826. * You may obtain a copy of the License at
  827. *
  828. * http://www.apache.org/licenses/LICENSE-2.0
  829. *
  830. * Unless required by applicable law or agreed to in writing, software
  831. * distributed under the License is distributed on an "AS IS" BASIS,
  832. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  833. * See the License for the specific language governing permissions and
  834. * limitations under the License.
  835. */
  836. class cn{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.isAuto=n,this.state=1,this.customAttributes={},this.counters={},this.api=Ct.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark=`FB-PERF-TRACE-START-${this.randomId}-${this.name}`,this.traceStopMark=`FB-PERF-TRACE-STOP-${this.randomId}-${this.name}`,this.traceMeasure=r||`FB-PERF-TRACE-MEASURE-${this.randomId}-${this.name}`,r&&this.calculateTraceMetrics())}start(){if(1!==this.state)throw wt.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(2!==this.state)throw wt.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),nn(this)}record(e,t,n){if(e<=0)throw wt.create("nonpositive trace startTime",{traceName:this.name});if(t<=0)throw wt.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*t),this.startTimeUs=Math.floor(1e3*e),n&&n.attributes&&(this.customAttributes=Object.assign({},n.attributes)),n&&n.metrics)for(const e of Object.keys(n.metrics))isNaN(Number(n.metrics[e]))||(this.counters[e]=Math.floor(Number(n.metrics[e])));nn(this)}incrementMetric(e,t=1){void 0===this.counters[e]?this.putMetric(e,t):this.putMetric(e,this.counters[e]+t)}putMetric(e,t){if(!function(e,t){return!(0===e.length||e.length>100)&&(t&&t.startsWith(dt)&&sn.indexOf(e)>-1||!e.startsWith("_"))}(e,this.name))throw wt.create("invalid custom metric name",{customMetricName:e});this.counters[e]=function(e){const t=Math.floor(e);return t<e&&yt.info(`Metric value should be an Integer, setting the value as : ${t}.`),t}(null!=t?t:0)}getMetric(e){return this.counters[e]||0}putAttribute(e,t){const n=function(e){return!(0===e.length||e.length>40)&&(!kt.some((t=>e.startsWith(t)))&&!!e.match(Lt))}(e),r=function(e){return 0!==e.length&&e.length<=100}(t);if(n&&r)this.customAttributes[e]=t;else{if(!n)throw wt.create("invalid attribute name",{attributeName:e});if(!r)throw wt.create("invalid attribute value",{attributeValue:t})}}getAttribute(e){return this.customAttributes[e]}removeAttribute(e){void 0!==this.customAttributes[e]&&delete this.customAttributes[e]}getAttributes(){return Object.assign({},this.customAttributes)}setStartTime(e){this.startTimeUs=e}setDuration(e){this.durationUs=e}calculateTraceMetrics(){const e=this.api.getEntriesByName(this.traceMeasure),t=e&&e[0];t&&(this.durationUs=Math.floor(1e3*t.duration),this.startTimeUs=Math.floor(1e3*(t.startTime+this.api.getTimeOrigin())))}static createOobTrace(e,t,n,r){const i=Ct.getInstance().getUrl();if(!i)return;const a=new cn(e,dt+i,!0),o=Math.floor(1e3*Ct.getInstance().getTimeOrigin());a.setStartTime(o),t&&t[0]&&(a.setDuration(Math.floor(1e3*t[0].duration)),a.putMetric("domInteractive",Math.floor(1e3*t[0].domInteractive)),a.putMetric("domContentLoadedEventEnd",Math.floor(1e3*t[0].domContentLoadedEventEnd)),a.putMetric("loadEventEnd",Math.floor(1e3*t[0].loadEventEnd)));if(n){const e=n.find((e=>"first-paint"===e.name));e&&e.startTime&&a.putMetric("_fp",Math.floor(1e3*e.startTime));const t=n.find((e=>"first-contentful-paint"===e.name));t&&t.startTime&&a.putMetric(gt,Math.floor(1e3*t.startTime)),r&&a.putMetric(mt,Math.floor(1e3*r))}nn(a)}static createUserTimingTrace(e,t){nn(new cn(e,t,!1,t))}}
  837. /**
  838. * @license
  839. * Copyright 2020 Google LLC
  840. *
  841. * Licensed under the Apache License, Version 2.0 (the "License");
  842. * you may not use this file except in compliance with the License.
  843. * You may obtain a copy of the License at
  844. *
  845. * http://www.apache.org/licenses/LICENSE-2.0
  846. *
  847. * Unless required by applicable law or agreed to in writing, software
  848. * distributed under the License is distributed on an "AS IS" BASIS,
  849. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  850. * See the License for the specific language governing permissions and
  851. * limitations under the License.
  852. */function ln(e,t){const n=t;if(!n||void 0===n.responseStart)return;const r=Ct.getInstance().getTimeOrigin(),i=Math.floor(1e3*(n.startTime+r)),a=n.responseStart?Math.floor(1e3*(n.responseStart-n.startTime)):void 0,o=Math.floor(1e3*(n.responseEnd-n.startTime));!function(e){const t=Nt.getInstance();if(!t.instrumentationEnabled)return;const n=e.url,r=t.logEndPointUrl.split("?")[0],i=t.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&t.loggingEnabled&&t.logNetworkAfterSampling&&setTimeout((()=>tn(e,0)),0)}({performanceController:e,url:n.name&&n.name.split("?")[0],responsePayloadBytes:n.transferSize,startTimeUs:i,timeToResponseInitiatedUs:a,timeToResponseCompletedUs:o})}
  853. /**
  854. * @license
  855. * Copyright 2020 Google LLC
  856. *
  857. * Licensed under the Apache License, Version 2.0 (the "License");
  858. * you may not use this file except in compliance with the License.
  859. * You may obtain a copy of the License at
  860. *
  861. * http://www.apache.org/licenses/LICENSE-2.0
  862. *
  863. * Unless required by applicable law or agreed to in writing, software
  864. * distributed under the License is distributed on an "AS IS" BASIS,
  865. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  866. * See the License for the specific language governing permissions and
  867. * limitations under the License.
  868. */function un(e){At()&&(setTimeout((()=>function(e){const t=Ct.getInstance(),n=t.getEntriesByType("navigation"),r=t.getEntriesByType("paint");if(t.onFirstInputDelay){let i=setTimeout((()=>{cn.createOobTrace(e,n,r),i=void 0}),5e3);t.onFirstInputDelay((t=>{i&&(clearTimeout(i),cn.createOobTrace(e,n,r,t))}))}else cn.createOobTrace(e,n,r)}(e)),0),setTimeout((()=>function(e){const t=Ct.getInstance(),n=t.getEntriesByType("resource");for(const t of n)ln(e,t);t.setupObserver("resource",(t=>ln(e,t)))}(e)),0),setTimeout((()=>function(e){const t=Ct.getInstance(),n=t.getEntriesByType("measure");for(const t of n)pn(e,t);t.setupObserver("measure",(t=>pn(e,t)))}(e)),0))}function pn(e,t){const n=t.name;n.substring(0,ft.length)!==ft&&cn.createUserTimingTrace(e,n)}
  869. /**
  870. * @license
  871. * Copyright 2020 Google LLC
  872. *
  873. * Licensed under the Apache License, Version 2.0 (the "License");
  874. * you may not use this file except in compliance with the License.
  875. * You may obtain a copy of the License at
  876. *
  877. * http://www.apache.org/licenses/LICENSE-2.0
  878. *
  879. * Unless required by applicable law or agreed to in writing, software
  880. * distributed under the License is distributed on an "AS IS" BASIS,
  881. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  882. * See the License for the specific language governing permissions and
  883. * limitations under the License.
  884. */class hn{constructor(e,t){this.app=e,this.installations=t,this.initialized=!1}_init(e){this.initialized||(void 0!==(null==e?void 0:e.dataCollectionEnabled)&&(this.dataCollectionEnabled=e.dataCollectionEnabled),void 0!==(null==e?void 0:e.instrumentationEnabled)&&(this.instrumentationEnabled=e.instrumentationEnabled),Ct.getInstance().requiredApisAvailable()?l().then((e=>{e&&(Zt||(Qt(5500),Zt=!0),Wt(this).then((()=>un(this)),(()=>un(this))),this.initialized=!0)})).catch((e=>{yt.info(`Environment doesn't support IndexedDB: ${e}`)})):yt.info('Firebase Performance cannot start if the browser does not support "Fetch" and "Promise", or cookies are disabled.'))}set instrumentationEnabled(e){Nt.getInstance().instrumentationEnabled=e}get instrumentationEnabled(){return Nt.getInstance().instrumentationEnabled}set dataCollectionEnabled(e){Nt.getInstance().dataCollectionEnabled=e}get dataCollectionEnabled(){return Nt.getInstance().dataCollectionEnabled}}Q(new m("performance",((e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("installations-internal").getImmediate();if("[DEFAULT]"!==n.name)throw wt.create("FB not default");if("undefined"==typeof window)throw wt.create("no window");!function(e){It=e}
  885. /**
  886. * @license
  887. * Copyright 2020 Google LLC
  888. *
  889. * Licensed under the Apache License, Version 2.0 (the "License");
  890. * you may not use this file except in compliance with the License.
  891. * You may obtain a copy of the License at
  892. *
  893. * http://www.apache.org/licenses/LICENSE-2.0
  894. *
  895. * Unless required by applicable law or agreed to in writing, software
  896. * distributed under the License is distributed on an "AS IS" BASIS,
  897. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  898. * See the License for the specific language governing permissions and
  899. * limitations under the License.
  900. */(window);const i=new hn(n,r);return i._init(t),i}),"PUBLIC")),oe(ut,pt),oe(ut,pt,"esm2017");
  901. /**
  902. * @license
  903. * Copyright 2020 Google LLC
  904. *
  905. * Licensed under the Apache License, Version 2.0 (the "License");
  906. * you may not use this file except in compliance with the License.
  907. * You may obtain a copy of the License at
  908. *
  909. * http://www.apache.org/licenses/LICENSE-2.0
  910. *
  911. * Unless required by applicable law or agreed to in writing, software
  912. * distributed under the License is distributed on an "AS IS" BASIS,
  913. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  914. * See the License for the specific language governing permissions and
  915. * limitations under the License.
  916. */
  917. class fn{constructor(e,t){this.app=e,this._delegate=t}get instrumentationEnabled(){return this._delegate.instrumentationEnabled}set instrumentationEnabled(e){this._delegate.instrumentationEnabled=e}get dataCollectionEnabled(){return this._delegate.dataCollectionEnabled}set dataCollectionEnabled(e){this._delegate.dataCollectionEnabled=e}trace(e){return function(e,t){var n;return e=(n=e)&&n._delegate?n._delegate:n,new cn(e,t)}(this._delegate,e)}}function dn(e){const t=e.getProvider("app-compat").getImmediate(),n=e.getProvider("performance").getImmediate();return new fn(t,n)}
  918. /**
  919. * @license
  920. * Copyright 2020 Google LLC
  921. *
  922. * Licensed under the Apache License, Version 2.0 (the "License");
  923. * you may not use this file except in compliance with the License.
  924. * You may obtain a copy of the License at
  925. *
  926. * http://www.apache.org/licenses/LICENSE-2.0
  927. *
  928. * Unless required by applicable law or agreed to in writing, software
  929. * distributed under the License is distributed on an "AS IS" BASIS,
  930. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  931. * See the License for the specific language governing permissions and
  932. * limitations under the License.
  933. */
  934. var gn;(gn=Ie).INTERNAL.registerComponent(new m("performance-compat",dn,"PUBLIC")),gn.registerVersion("@firebase/performance-compat","0.2.1");
  935. /**
  936. * @license
  937. * Copyright 2019 Google LLC
  938. *
  939. * Licensed under the Apache License, Version 2.0 (the "License");
  940. * you may not use this file except in compliance with the License.
  941. * You may obtain a copy of the License at
  942. *
  943. * http://www.apache.org/licenses/LICENSE-2.0
  944. *
  945. * Unless required by applicable law or agreed to in writing, software
  946. * distributed under the License is distributed on an "AS IS" BASIS,
  947. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  948. * See the License for the specific language governing permissions and
  949. * limitations under the License.
  950. */
  951. return Ie.registerVersion("firebase","9.16.0","compat-lite"),Ie}));
  952. //# sourceMappingURL=firebase-performance-standalone-compat.es2017.js.map