{"ast":null,"code":"import e from \"@firebase/app\";\nimport { U as r, T as t, q as a, C as s, M as o, a as i, j as n, W as p, z as m, X as f, t as c, Z as u, n as l, s as b, r as g, o as d, Q as h, E as v } from \"./prebuilt-29191f3d-bed1a14c.js\";\nimport { Component as w } from \"@firebase/component\";\nimport \"tslib\";\nimport \"@firebase/util\";\nimport \"@firebase/logger\";\nimport \"@firebase/webchannel-wrapper\";\nvar C = {\n Firestore: r,\n GeoPoint: s,\n Timestamp: o,\n Blob: i,\n Transaction: n,\n WriteBatch: p,\n DocumentReference: m,\n DocumentSnapshot: f,\n Query: c,\n QueryDocumentSnapshot: u,\n QuerySnapshot: l,\n CollectionReference: b,\n FieldPath: g,\n FieldValue: d,\n setLogLevel: h,\n CACHE_SIZE_UNLIMITED: v\n};\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Registers the main Firestore build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\n\nfunction I(e) {\n !\n /**\n * Configures Firestore as part of the Firebase SDK by calling registerService.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\n function (e, r) {\n e.INTERNAL.registerComponent(new w(\"firestore\", function (e) {\n var t = e.getProvider(\"app\").getImmediate();\n return r(t, e.getProvider(\"auth-internal\"));\n }, \"PUBLIC\"\n /* PUBLIC */\n ).setServiceProps(Object.assign({}, C)));\n }(e, function (e, s) {\n return new r(e, new t(e, s), new a());\n }), e.registerVersion(\"@firebase/firestore\", \"2.3.10\");\n}\n\nI(e);\nexport { I as registerFirestore };","map":{"version":3,"sources":["../../src/config.ts","../../index.ts"],"names":["firestoreNamespace","Firestore","GeoPoint","Timestamp","Blob","Transaction","WriteBatch","DocumentReference","DocumentSnapshot","Query","QueryDocumentSnapshot","QuerySnapshot","CollectionReference","FieldPath","FieldValue","setLogLevel","CACHE_SIZE_UNLIMITED","firebase","firestoreFactory","INTERNAL","registerComponent","Component","app","container","getProvider","getImmediate","setServiceProps","registerFirestore","instance","configureForFirebase","auth","ExpFirestore","IndexedDbPersistenceProvider","registerVersion"],"mappings":";;;;;;;IAyCMA,CAAAA,GAAqB;aACzBC,CADyB;YAEzBC,CAFyB;aAGzBC,CAHyB;QAIzBC,CAJyB;eAKzBC,CALyB;cAMzBC,CANyB;qBAOzBC,CAPyB;oBAQzBC,CARyB;SASzBC,CATyB;yBAUzBC,CAVyB;iBAWzBC,CAXyB;uBAYzBC,CAZyB;aAazBC,CAbyB;cAczBC,CAdyB;eAezBC,CAfyB;wBAgBzBC;AAhByB,C;;;;;;;;;;;;;;;;;;;;;;;SCPXW,C,CAAkBC,C,EAAAA;;;;;;;;;YDkChCX,C,EACAC,C,EAAAA;AAKCD,IAAAA,CAAAA,CAAgCE,QAAhCF,CAAyCG,iBAAzCH,CACC,IAAII,CAAJ,CACE,WADF,EAEE,UAAA,CAAA,EAAA;AACE,UAAMC,CAAAA,GAAMC,CAAAA,CAAUC,WAAVD,CAAsB,KAAtBA,EAA6BE,YAA7BF,EAAZ;AACA,aAAOL,CAAAA,CAAiBI,CAAjBJ,EAAsBK,CAAAA,CAAUC,WAAVD,CAAsB,eAAtBA,CAAtBL,CAAP;KAJJ,E;;AAAA,MAOEQ,eAPF,CAOEA,MAAAA,CAAAA,MAAAA,CAAAA,EAAAA,EAAqB1B,CAArB0B,CAPF,CADDT;ACvCDY,G,CACED,C,EACA,UAACN,CAAD,EAAMQ,CAAN,EAAMA;AACJ,WAAA,IAAI7B,CAAJ,CACEqB,CADF,EAEE,IAAIS,CAAJ,CAAiBT,CAAjB,EAAsBQ,CAAtB,CAFF,EAGE,IAAIE,CAAJ,EAHF,CAAA;MAMJJ,CAAAA,CAASK,eAATL,CAASK,qBAATL,EAASK,QAATL,C;;;AAGFD,CAAAA,CAAkBV,CAAlBU,CAAAA","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FirebaseApp, FirebaseNamespace } from '@firebase/app-types';\nimport { _FirebaseNamespace } from '@firebase/app-types/private';\nimport { FirebaseAuthInternalName } from '@firebase/auth-interop-types';\nimport { Component, ComponentType, Provider } from '@firebase/component';\n\nimport {\n CACHE_SIZE_UNLIMITED,\n CollectionReference,\n DocumentReference,\n DocumentSnapshot,\n Firestore,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n Transaction,\n WriteBatch,\n setLogLevel,\n Blob,\n FieldPath,\n GeoPoint,\n Timestamp,\n FieldValue\n} from '../export';\n\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n\n/**\n * Configures Firestore as part of the Firebase SDK by calling registerService.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\nexport function configureForFirebase(\n firebase: FirebaseNamespace,\n firestoreFactory: (\n app: FirebaseApp,\n auth: Provider<FirebaseAuthInternalName>\n ) => Firestore\n): void {\n (firebase as _FirebaseNamespace).INTERNAL.registerComponent(\n new Component(\n 'firestore',\n container => {\n const app = container.getProvider('app').getImmediate()!;\n return firestoreFactory(app, container.getProvider('auth-internal'));\n },\n ComponentType.PUBLIC\n ).setServiceProps({ ...firestoreNamespace })\n );\n}\n","/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport firebase from '@firebase/app';\nimport { FirebaseNamespace } from '@firebase/app-types';\n\nimport {\n Firestore,\n IndexedDbPersistenceProvider,\n ExpFirestore\n} from './export';\nimport { name, version } from './package.json';\nimport { configureForFirebase } from './src/config';\n\nimport './register-module';\n\n/**\n * Registers the main Firestore build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\nexport function registerFirestore(instance: FirebaseNamespace): void {\n configureForFirebase(\n instance,\n (app, auth) =>\n new Firestore(\n app,\n new ExpFirestore(app, auth),\n new IndexedDbPersistenceProvider()\n )\n );\n instance.registerVersion(name, version);\n}\n\nregisterFirestore(firebase);\n"]},"metadata":{},"sourceType":"module"}