{"version":3,"sources":["webpack:////workdir/node_modules/vuex-persist/dist/esm/index.js","webpack:////workdir/node_modules/vuefire/dist/vuefire.esm.js","webpack:///(webpack)/buildin/module.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///(webpack)/buildin/global.js","webpack:////workdir/node_modules/vuex/dist/vuex.esm.js","webpack:////workdir/node_modules/yeast/index.js"],"names":["MockStorage","Object","keys","this","length","index","key","data","toString","SimplePromiseQueue","_queue","_flushing","promise","push","Promise","resolve","flushQueue","chain","nextTask","shift","then","options","replaceArrays","arrayMerge","destinationArray","sourceArray","concatArrays","target","source","concat","merge","into","from","mergeOption","FlattedJSON","JSON","VuexPersistence","_mutex","subscriber","store","handler","subscribe","subscribed","supportCircular","localStorageLitmus","window","localStorage","getItem","err","storage","Error","reducer","modules","state","reduce","a","i","filter","mutation","strictMode","RESTORE_MUTATION","savedState","mergedState","propertyName","_vm","$set","asyncStorage","restoreState","value","parse","saveState","setItem","stringify","plugin","restored","commit","replaceState","enqueue","walkGet","obj","path","split","walkSet","pop","Array","isArray","splice","Number","isObject","o","isTimestamp","toDate","isDocumentRef","onSnapshot","callOnceWithArg","fn","argFn","called","createRecordFromRTDBSnapshot","snapshot","val","res","defineProperty","DEFAULT_OPTIONS","reset","serialize","wait","createSnapshot","doc","id","extractRefs","oldDoc","subs","dataAndRefs","subsByPath","resultSubs","subKey","sub","recursiveExtract","result","refs","getOwnPropertyNames","forEach","descriptor","getOwnPropertyDescriptor","enumerable","ref","Date","longitude","latitude","newRef","DEFAULT_OPTIONS$1","maxRefDepth","unsubscribeAll","unsub","updateDataFromDocumentSnapshot","ops","depth","_a","set","subscribeToRefs","subscribeToDocument","create","unbind","exists","refKeys","missingKeys","refKey","indexOf","resolvedCount","totalToResolve","validResolves","deepResolve","docPath","bind","bindCollection","extraOptions","vm","collection","reject","isResolved","assign","array","originalResolve","arraySubs","change","added","newIndex","_b","undefined","add","modified","oldIndex","oldData","remove","removed","docChanges","count_1","expectedItems_1","validDocs_1","c","type","bindDocument","document","ops$1","bind$1","_firestoreUnbinds","defaultOptions$1","bindName","unbindName","firestorePlugin","Vue","pluginOptions","strategies","config","optionMergeStrategies","firestore","provide","globalOptions","prototype","$firestoreRefs","userOptions","mixin","beforeCreate","created","$options","call","beforeDestroy","module","exports","webpackPolyfill","deprecate","paths","children","get","l","originalModule","g","Function","e","applyMixin","version","vuexInit","_init","init","$store","parent","global","devtoolHook","__VUE_DEVTOOLS_GLOBAL_HOOK__","devtoolPlugin","_devtoolHook","emit","on","targetState","prepend","subscribeAction","action","find","list","f","deepCopy","cache","hit","original","copy","forEachValue","isPromise","partial","arg","Module","rawModule","runtime","_children","_rawModule","rawState","prototypeAccessors","namespaced","configurable","addChild","removeChild","getChild","hasChild","update","actions","mutations","getters","forEachChild","forEachGetter","forEachAction","forEachMutation","defineProperties","ModuleCollection","rawRootModule","register","targetModule","newModule","root","getNamespace","namespace","this$1","slice","rawChildModule","unregister","child","isRegistered","Store","install","plugins","strict","_committing","_actions","_actionSubscribers","_mutations","_wrappedGetters","_modules","_modulesNamespaceMap","_subscribers","_watcherVM","_makeLocalGettersCache","dispatch","payload","installModule","resetStoreVM","useDevtools","devtools","prototypeAccessors$1","genericSubscribe","unshift","resetStore","hot","oldVm","wrappedGetters","computed","silent","$$state","enableStrictMode","_withCommit","_data","nextTick","$destroy","rootState","isRoot","parentState","getNestedState","moduleName","local","context","makeLocalContext","namespacedType","registerMutation","registerAction","getter","registerGetter","noNamespace","_type","_payload","_options","args","unifyObjectStyle","makeLocalGetters","gettersProxy","splitPos","localType","entry","rootGetters","catch","rawGetter","$watch","deep","sync","_Vue","v","before","all","map","after","error","watch","cb","registerModule","preserveState","unregisterModule","delete","hasModule","hotUpdate","newOptions","committing","mapState","normalizeNamespace","states","normalizeMap","getModuleByNamespace","vuex","mapMutations","len","arguments","apply","mapGetters","mapActions","createNamespacedHelpers","isValidMap","charAt","helper","createLogger","collapsed","stateBefore","stateAfter","transformer","mutationTransformer","mut","actionFilter","actionTransformer","act","logMutations","logActions","logger","console","prevState","nextState","formattedTime","getFormattedTime","formattedMutation","message","startMessage","log","endMessage","formattedAction","groupCollapsed","group","groupEnd","time","pad","getHours","getMinutes","getSeconds","getMilliseconds","repeat","str","times","join","num","maxLength","prev","alphabet","seed","encode","encoded","Math","floor","decode","decoded","yeast","now"],"mappings":"8GAAA,yBAKA,IAAIA,EAGAA,EAAc,MACV,aACI,OAAOC,OAAOC,KAAKC,MAAMC,OAE7B,IAAIC,GACA,OAAOJ,OAAOC,KAAKC,MAAME,GAE7B,QAAQC,EAAKC,GACTJ,KAAKG,GAAOC,EAAKC,WAErB,QAAQF,GACJ,OAAOH,KAAKG,GAEhB,WAAWA,UACAH,KAAKG,GAEhB,QACI,IAAK,IAAIA,KAAOL,OAAOC,KAAKC,aACjBA,KAAKG,KAO5B,MAAMG,EACF,cACIN,KAAKO,OAAS,GACdP,KAAKQ,WAAY,EAErB,QAAQC,GAEJ,OADAT,KAAKO,OAAOG,KAAKD,GACZT,KAAKQ,UAGHG,QAAQC,UAFJZ,KAAKa,aAIpB,aACIb,KAAKQ,WAAY,EACjB,MAAMM,EAAQ,KACV,MAAMC,EAAWf,KAAKO,OAAOS,QAC7B,GAAID,EACA,OAAOA,EAASE,KAAKH,GAGrBd,KAAKQ,WAAY,GAGzB,OAAOG,QAAQC,QAAQE,MAI/B,MAAMI,EAAU,CACZC,cAAe,CACXC,WAAY,CAACC,EAAkBC,EAAaJ,IAAYI,GAE5DC,aAAc,CACVH,WAAY,CAACI,EAAQC,EAAQP,IAAYM,EAAOE,UAAUD,KAGlE,SAASE,EAAMC,EAAMC,EAAMC,GACvB,OAAO,IAAUF,EAAMC,EAAMX,EAAQY,IAGzC,IAAIC,EAAcC,KAKlB,MAAMC,EAOF,YAAYf,GAERlB,KAAKkC,OAAS,IAAI5B,EAMlBN,KAAKmC,WAAcC,GAAWC,GAAYD,EAAME,UAAUD,GACnC,qBAAZnB,IACPA,EAAU,IACdlB,KAAKG,IAAuB,MAAfe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E,EAAO,EACPjX,EAAI,EAUR,SAASkX,EAAOL,GACd,IAAIM,EAAU,GAEd,GACEA,EAAUH,EAASH,EAAMja,GAAUua,EACnCN,EAAMO,KAAKC,MAAMR,EAAMja,SAChBia,EAAM,GAEf,OAAOM,EAUT,SAASG,EAAOZ,GACd,IAAIa,EAAU,EAEd,IAAKvX,EAAI,EAAGA,EAAI0W,EAAI9Z,OAAQoD,IAC1BuX,EAAUA,EAAU3a,EAAS+V,EAAI+D,EAAIpC,OAAOtU,IAG9C,OAAOuX,EAST,SAASC,IACP,IAAIC,EAAMP,GAAQ,IAAI3S,MAEtB,OAAIkT,IAAQV,GAAaE,EAAO,EAAGF,EAAOU,GACnCA,EAAK,IAAKP,EAAOD,KAM1B,KAAOjX,EAAIpD,EAAQoD,IAAK2S,EAAIqE,EAAShX,IAAMA,EAK3CwX,EAAMN,OAASA,EACfM,EAAMF,OAASA,EACf9N,EAAOC,QAAU+N","file":"static/js/app-c78ea1d8.js","sourcesContent":["import deepmerge from 'deepmerge';\n\n/**\r\n * Created by championswimmer on 22/07/17.\r\n */\r\nlet MockStorage;\r\n// @ts-ignore\r\n{\r\n MockStorage = class {\r\n get length() {\r\n return Object.keys(this).length;\r\n }\r\n key(index) {\r\n return Object.keys(this)[index];\r\n }\r\n setItem(key, data) {\r\n this[key] = data.toString();\r\n }\r\n getItem(key) {\r\n return this[key];\r\n }\r\n removeItem(key) {\r\n delete this[key];\r\n }\r\n clear() {\r\n for (let key of Object.keys(this)) {\r\n delete this[key];\r\n }\r\n }\r\n };\r\n}\n\n// tslint:disable: variable-name\r\nclass SimplePromiseQueue {\r\n constructor() {\r\n this._queue = [];\r\n this._flushing = false;\r\n }\r\n enqueue(promise) {\r\n this._queue.push(promise);\r\n if (!this._flushing) {\r\n return this.flushQueue();\r\n }\r\n return Promise.resolve();\r\n }\r\n flushQueue() {\r\n this._flushing = true;\r\n const chain = () => {\r\n const nextTask = this._queue.shift();\r\n if (nextTask) {\r\n return nextTask.then(chain);\r\n }\r\n else {\r\n this._flushing = false;\r\n }\r\n };\r\n return Promise.resolve(chain());\r\n }\r\n}\n\nconst options = {\r\n replaceArrays: {\r\n arrayMerge: (destinationArray, sourceArray, options) => sourceArray\r\n },\r\n concatArrays: {\r\n arrayMerge: (target, source, options) => target.concat(...source)\r\n }\r\n};\r\nfunction merge(into, from, mergeOption) {\r\n return deepmerge(into, from, options[mergeOption]);\r\n}\n\nlet FlattedJSON = JSON;\r\n/**\r\n * A class that implements the vuex persistence.\r\n * @type S type of the 'state' inside the store (default: any)\r\n */\r\nclass VuexPersistence {\r\n /**\r\n * Create a {@link VuexPersistence} object.\r\n * Use the plugin
function of this class as a\r\n * Vuex plugin.\r\n * @param {PersistOptions} options\r\n */\r\n constructor(options) {\r\n // tslint:disable-next-line:variable-name\r\n this._mutex = new SimplePromiseQueue();\r\n /**\r\n * Creates a subscriber on the store. automatically is used\r\n * when this is used a vuex plugin. Not for manual usage.\r\n * @param store\r\n */\r\n this.subscriber = (store) => (handler) => store.subscribe(handler);\r\n if (typeof options === 'undefined')\r\n options = {};\r\n this.key = ((options.key != null) ? options.key : 'vuex');\r\n this.subscribed = false;\r\n this.supportCircular = options.supportCircular || false;\r\n if (this.supportCircular) {\r\n FlattedJSON = require('flatted');\r\n }\r\n this.mergeOption = options.mergeOption || 'replaceArrays';\r\n let localStorageLitmus = true;\r\n try {\r\n window.localStorage.getItem('');\r\n }\r\n catch (err) {\r\n localStorageLitmus = false;\r\n }\r\n /**\r\n * 1. First, prefer storage sent in optinos\r\n * 2. Otherwise, use window.localStorage if available\r\n * 3. Finally, try to use MockStorage\r\n * 4. None of above? Well we gotta fail.\r\n */\r\n if (options.storage) {\r\n this.storage = options.storage;\r\n }\r\n else if (localStorageLitmus) {\r\n this.storage = window.localStorage;\r\n }\r\n else if (MockStorage) {\r\n this.storage = new MockStorage();\r\n }\r\n else {\r\n throw new Error(\"Neither 'window' is defined, nor 'MockStorage' is available\");\r\n }\r\n /**\r\n * How this works is -\r\n * 1. If there is options.reducer function, we use that, if not;\r\n * 2. We check options.modules;\r\n * 1. If there is no options.modules array, we use entire state in reducer\r\n * 2. Otherwise, we create a reducer that merges all those state modules that are\r\n * defined in the options.modules[] array\r\n * @type {((state: S) => {}) | ((state: S) => S) | ((state: any) => {})}\r\n */\r\n this.reducer = ((options.reducer != null)\r\n ? options.reducer\r\n : ((options.modules == null)\r\n ? ((state) => state)\r\n : ((state) => options.modules.reduce((a, i) => merge(a, { [i]: state[i] }, this.mergeOption), { /* start empty accumulator*/}))));\r\n this.filter = options.filter || ((mutation) => true);\r\n this.strictMode = options.strictMode || false;\r\n this.RESTORE_MUTATION = function RESTORE_MUTATION(state, savedState) {\r\n const mergedState = merge(state, savedState || {}, this.mergeOption);\r\n for (const propertyName of Object.keys(mergedState)) {\r\n this._vm.$set(state, propertyName, mergedState[propertyName]);\r\n }\r\n };\r\n this.asyncStorage = options.asyncStorage || false;\r\n if (this.asyncStorage) {\r\n /**\r\n * Async {@link #VuexPersistence.restoreState} implementation\r\n * @type {((key: string, storage?: Storage) =>\r\n * (Promise | S)) | ((key: string, storage: AsyncStorage) => Promise)}\r\n */\r\n this.restoreState = ((options.restoreState != null)\r\n ? options.restoreState\r\n : ((key, storage) => (storage).getItem(key)\r\n .then((value) => typeof value === 'string' // If string, parse, or else, just return\r\n ? (this.supportCircular\r\n ? FlattedJSON.parse(value || '{}')\r\n : JSON.parse(value || '{}'))\r\n : (value || {}))));\r\n /**\r\n * Async {@link #VuexPersistence.saveState} implementation\r\n * @type {((key: string, state: {}, storage?: Storage) =>\r\n * (Promise | void)) | ((key: string, state: {}, storage?: Storage) => Promise)}\r\n */\r\n this.saveState = ((options.saveState != null)\r\n ? options.saveState\r\n : ((key, state, storage) => (storage).setItem(key, // Second argument is state _object_ if asyc storage, stringified otherwise\r\n // do not stringify the state if the storage type is async\r\n (this.asyncStorage\r\n ? merge({}, state || {}, this.mergeOption)\r\n : (this.supportCircular\r\n ? FlattedJSON.stringify(state)\r\n : JSON.stringify(state))))));\r\n /**\r\n * Async version of plugin\r\n * @param {Store} store\r\n */\r\n this.plugin = (store) => {\r\n /**\r\n * For async stores, we're capturing the Promise returned\r\n * by the `restoreState()` function in a `restored` property\r\n * on the store itself. This would allow app developers to\r\n * determine when and if the store's state has indeed been\r\n * refreshed. This approach was suggested by GitHub user @hotdogee.\r\n * See https://github.com/championswimmer/vuex-persist/pull/118#issuecomment-500914963\r\n * @since 2.1.0\r\n */\r\n store.restored = (this.restoreState(this.key, this.storage)).then((savedState) => {\r\n /**\r\n * If in strict mode, do only via mutation\r\n */\r\n if (this.strictMode) {\r\n store.commit('RESTORE_MUTATION', savedState);\r\n }\r\n else {\r\n store.replaceState(merge(store.state, savedState || {}, this.mergeOption));\r\n }\r\n this.subscriber(store)((mutation, state) => {\r\n if (this.filter(mutation)) {\r\n this._mutex.enqueue(this.saveState(this.key, this.reducer(state), this.storage));\r\n }\r\n });\r\n this.subscribed = true;\r\n });\r\n };\r\n }\r\n else {\r\n /**\r\n * Sync {@link #VuexPersistence.restoreState} implementation\r\n * @type {((key: string, storage?: Storage) =>\r\n * (Promise | S)) | ((key: string, storage: Storage) => (any | string | {}))}\r\n */\r\n this.restoreState = ((options.restoreState != null)\r\n ? options.restoreState\r\n : ((key, storage) => {\r\n const value = (storage).getItem(key);\r\n if (typeof value === 'string') { // If string, parse, or else, just return\r\n return (this.supportCircular\r\n ? FlattedJSON.parse(value || '{}')\r\n : JSON.parse(value || '{}'));\r\n }\r\n else {\r\n return (value || {});\r\n }\r\n }));\r\n /**\r\n * Sync {@link #VuexPersistence.saveState} implementation\r\n * @type {((key: string, state: {}, storage?: Storage) =>\r\n * (Promise | void)) | ((key: string, state: {}, storage?: Storage) => Promise)}\r\n */\r\n this.saveState = ((options.saveState != null)\r\n ? options.saveState\r\n : ((key, state, storage) => (storage).setItem(key, // Second argument is state _object_ if localforage, stringified otherwise\r\n (this.supportCircular\r\n ? FlattedJSON.stringify(state)\r\n : JSON.stringify(state)))));\r\n /**\r\n * Sync version of plugin\r\n * @param {Store} store\r\n */\r\n this.plugin = (store) => {\r\n const savedState = this.restoreState(this.key, this.storage);\r\n if (this.strictMode) {\r\n store.commit('RESTORE_MUTATION', savedState);\r\n }\r\n else {\r\n store.replaceState(merge(store.state, savedState || {}, this.mergeOption));\r\n }\r\n this.subscriber(store)((mutation, state) => {\r\n if (this.filter(mutation)) {\r\n this.saveState(this.key, this.reducer(state), this.storage);\r\n }\r\n });\r\n this.subscribed = true;\r\n };\r\n }\r\n }\r\n}\n\nexport default VuexPersistence;\nexport { MockStorage, VuexPersistence };\n//# sourceMappingURL=index.js.map\n","/*!\n * vuefire v2.2.5\n * (c) 2020 Eduardo San Martin Morote\n * @license MIT\n */\n/**\r\n * Walks a path inside an object\r\n * walkGet({ a: { b: true }}), 'a.b') -> true\r\n * @param obj\r\n * @param path\r\n */\r\nfunction walkGet(obj, path) {\r\n // TODO: development warning when target[key] does not exist\r\n return path.split('.').reduce(function (target, key) { return target[key]; }, obj);\r\n}\r\n/**\r\n * Deeply set a property in an object with a string path\r\n * walkSet({ a: { b: true }}, 'a.b', false)\r\n * @param obj\r\n * @param path\r\n * @param value\r\n * @returns an array with the element that was replaced or the value that was set\r\n */\r\nfunction walkSet(obj, path, value) {\r\n // path can be a number\r\n var keys = ('' + path).split('.');\r\n var key = keys.pop(); // split will produce at least one element array\r\n var target = keys.reduce(function (target, key) {\r\n // TODO: dev errors\r\n return target[key];\r\n }, obj);\r\n return Array.isArray(target) ? target.splice(Number(key), 1, value) : (target[key] = value);\r\n}\r\n/**\r\n * Checks if a variable is an object\r\n * @param o\r\n */\r\nfunction isObject(o) {\r\n return o && typeof o === 'object';\r\n}\r\n/**\r\n * Checks if a variable is a Date\r\n * @param o\r\n */\r\nfunction isTimestamp(o) {\r\n return o.toDate;\r\n}\r\n/**\r\n * Checks if a variable is a Firestore Document Reference\r\n * @param o\r\n */\r\nfunction isDocumentRef(o) {\r\n return o && o.onSnapshot;\r\n}\r\n/**\r\n * Wraps a function so it gets called only once\r\n * @param fn Function to be called once\r\n * @param argFn Function to compute the argument passed to fn\r\n */\r\nfunction callOnceWithArg(fn, argFn) {\r\n /** @type {boolean | undefined} */\r\n var called = false;\r\n return function () {\r\n if (!called) {\r\n called = true;\r\n return fn(argFn());\r\n }\r\n };\r\n}\n\n/**\r\n * Convert firebase RTDB snapshot into a bindable data record.\r\n *\r\n * @param snapshot\r\n * @return\r\n */\r\nfunction createRecordFromRTDBSnapshot(snapshot) {\r\n var value = snapshot.val();\r\n var res = isObject(value) ? value : Object.defineProperty({}, '.value', { value: value });\r\n // if (isObject(value)) {\r\n // res = value\r\n // } else {\r\n // res = {}\r\n // Object.defineProperty(res, '.value', { value })\r\n // }\r\n Object.defineProperty(res, '.key', { value: snapshot.key });\r\n return res;\r\n}\r\n/**\r\n * Find the index for an object with given key.\r\n *\r\n * @param array\r\n * @param key\r\n * @return the index where the key was found\r\n */\r\nfunction indexForKey(array, key) {\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i]['.key'] === key)\r\n return i;\r\n }\r\n return -1;\r\n}\n\nvar DEFAULT_OPTIONS = {\r\n reset: true,\r\n serialize: createRecordFromRTDBSnapshot,\r\n wait: false,\r\n};\r\n/**\r\n * Binds a RTDB reference as an object\r\n * @param param0\r\n * @param options\r\n * @returns a function to be called to stop listeninng for changes\r\n */\r\nfunction rtdbBindAsObject(_a, extraOptions) {\r\n var vm = _a.vm, key = _a.key, document = _a.document, resolve = _a.resolve, reject = _a.reject, ops = _a.ops;\r\n if (extraOptions === void 0) { extraOptions = DEFAULT_OPTIONS; }\r\n var options = Object.assign({}, DEFAULT_OPTIONS, extraOptions);\r\n var listener = document.on('value', function (snapshot) {\r\n ops.set(vm, key, options.serialize(snapshot));\r\n }, reject);\r\n document.once('value', resolve);\r\n return function (reset) {\r\n document.off('value', listener);\r\n if (reset !== false) {\r\n var value = typeof reset === 'function' ? reset() : null;\r\n ops.set(vm, key, value);\r\n }\r\n };\r\n}\r\n/**\r\n * Binds a RTDB reference or query as an array\r\n * @param param0\r\n * @param options\r\n * @returns a function to be called to stop listeninng for changes\r\n */\r\nfunction rtdbBindAsArray(_a, extraOptions) {\r\n var vm = _a.vm, key = _a.key, collection = _a.collection, resolve = _a.resolve, reject = _a.reject, ops = _a.ops;\r\n if (extraOptions === void 0) { extraOptions = DEFAULT_OPTIONS; }\r\n var options = Object.assign({}, DEFAULT_OPTIONS, extraOptions);\r\n var array = options.wait ? [] : ops.set(vm, key, []);\r\n var childAdded = collection.on('child_added', function (snapshot, prevKey) {\r\n var index = prevKey ? indexForKey(array, prevKey) + 1 : 0;\r\n ops.add(array, index, options.serialize(snapshot));\r\n }, reject);\r\n var childRemoved = collection.on('child_removed', function (snapshot) {\r\n ops.remove(array, indexForKey(array, snapshot.key));\r\n }, reject);\r\n var childChanged = collection.on('child_changed', function (snapshot) {\r\n ops.set(array, indexForKey(array, snapshot.key), options.serialize(snapshot));\r\n }, reject);\r\n var childMoved = collection.on('child_moved', function (snapshot, prevKey) {\r\n var index = indexForKey(array, snapshot.key);\r\n var oldRecord = ops.remove(array, index)[0];\r\n var newIndex = prevKey ? indexForKey(array, prevKey) + 1 : 0;\r\n ops.add(array, newIndex, oldRecord);\r\n }, reject);\r\n collection.once('value', function (data) {\r\n if (options.wait)\r\n ops.set(vm, key, array);\r\n resolve(data);\r\n });\r\n return function (reset) {\r\n collection.off('child_added', childAdded);\r\n collection.off('child_changed', childChanged);\r\n collection.off('child_removed', childRemoved);\r\n collection.off('child_moved', childMoved);\r\n if (reset !== false) {\r\n var value = typeof reset === 'function' ? reset() : [];\r\n ops.set(vm, key, value);\r\n }\r\n };\r\n}\n\n// TODO: fix type not to be any\r\nfunction createSnapshot(doc) {\r\n // TODO: it should create a deep copy instead because otherwise we will modify internal data\r\n // defaults everything to false, so no need to set\r\n return Object.defineProperty(doc.data() || {}, 'id', { value: doc.id });\r\n}\r\nfunction extractRefs(doc, oldDoc, subs) {\r\n var dataAndRefs = [{}, {}];\r\n var subsByPath = Object.keys(subs).reduce(function (resultSubs, subKey) {\r\n var sub = subs[subKey];\r\n resultSubs[sub.path] = sub.data();\r\n return resultSubs;\r\n }, {});\r\n function recursiveExtract(doc, oldDoc, path, result) {\r\n // make it easier to later on access the value\r\n oldDoc = oldDoc || {};\r\n var data = result[0], refs = result[1];\r\n // Add all properties that are not enumerable (not visible in the for loop)\r\n // getOwnPropertyDescriptors does not exist on IE\r\n Object.getOwnPropertyNames(doc).forEach(function (propertyName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(doc, propertyName);\r\n if (descriptor && !descriptor.enumerable) {\r\n Object.defineProperty(data, propertyName, descriptor);\r\n }\r\n });\r\n // recursively traverse doc to copy values and extract references\r\n for (var key in doc) {\r\n var ref = doc[key];\r\n if (\r\n // primitives\r\n ref == null ||\r\n // Firestore < 4.13\r\n ref instanceof Date ||\r\n isTimestamp(ref) ||\r\n (ref.longitude && ref.latitude) // GeoPoint\r\n ) {\r\n data[key] = ref;\r\n }\r\n else if (isDocumentRef(ref)) {\r\n // allow values to be null (like non-existant refs)\r\n // TODO: better typing since this isObject shouldn't be necessary but it doesn't work\r\n data[key] =\r\n typeof oldDoc === 'object' &&\r\n key in oldDoc &&\r\n // only copy refs if they were refs before\r\n // https://github.com/vuejs/vuefire/issues/831\r\n typeof oldDoc[key] != 'string'\r\n ? oldDoc[key]\r\n : ref.path;\r\n // TODO: handle subpathes?\r\n refs[path + key] = ref;\r\n }\r\n else if (Array.isArray(ref)) {\r\n data[key] = Array(ref.length);\r\n // fill existing refs into data but leave the rest empty\r\n for (var i = 0; i < ref.length; i++) {\r\n var newRef = ref[i];\r\n // TODO: this only works with array of primitives but not with nested properties like objects with References\r\n if (newRef && newRef.path in subsByPath)\r\n data[key][i] = subsByPath[newRef.path];\r\n }\r\n // the oldArray is in this case the same array with holes unless the array already existed\r\n recursiveExtract(ref, oldDoc[key] || data[key], path + key + '.', [data[key], refs]);\r\n }\r\n else if (isObject(ref)) {\r\n data[key] = {};\r\n recursiveExtract(ref, oldDoc[key], path + key + '.', [data[key], refs]);\r\n }\r\n else {\r\n data[key] = ref;\r\n }\r\n }\r\n }\r\n recursiveExtract(doc, oldDoc, '', dataAndRefs);\r\n return dataAndRefs;\r\n}\n\nvar DEFAULT_OPTIONS$1 = {\r\n maxRefDepth: 2,\r\n reset: true,\r\n serialize: createSnapshot,\r\n wait: false,\r\n};\r\nfunction unsubscribeAll(subs) {\r\n for (var sub in subs) {\r\n subs[sub].unsub();\r\n }\r\n}\r\nfunction updateDataFromDocumentSnapshot(options, target, path, snapshot, subs, ops, depth, resolve) {\r\n var _a = extractRefs(options.serialize(snapshot), walkGet(target, path), subs), data = _a[0], refs = _a[1];\r\n ops.set(target, path, data);\r\n subscribeToRefs(options, target, path, subs, refs, ops, depth, resolve);\r\n}\r\nfunction subscribeToDocument(_a, options) {\r\n var ref = _a.ref, target = _a.target, path = _a.path, depth = _a.depth, resolve = _a.resolve, ops = _a.ops;\r\n var subs = Object.create(null);\r\n var unbind = ref.onSnapshot(function (snapshot) {\r\n if (snapshot.exists) {\r\n updateDataFromDocumentSnapshot(options, target, path, snapshot, subs, ops, depth, resolve);\r\n }\r\n else {\r\n ops.set(target, path, null);\r\n resolve();\r\n }\r\n });\r\n return function () {\r\n unbind();\r\n unsubscribeAll(subs);\r\n };\r\n}\r\n// NOTE: not convinced by the naming of subscribeToRefs and subscribeToDocument\r\n// first one is calling the other on every ref and subscribeToDocument may call\r\n// updateDataFromDocumentSnapshot which may call subscribeToRefs as well\r\nfunction subscribeToRefs(options, target, path, subs, refs, ops, depth, resolve) {\r\n var refKeys = Object.keys(refs);\r\n var missingKeys = Object.keys(subs).filter(function (refKey) { return refKeys.indexOf(refKey) < 0; });\r\n // unbind keys that are no longer there\r\n missingKeys.forEach(function (refKey) {\r\n subs[refKey].unsub();\r\n delete subs[refKey];\r\n });\r\n if (!refKeys.length || ++depth > options.maxRefDepth)\r\n return resolve(path);\r\n var resolvedCount = 0;\r\n var totalToResolve = refKeys.length;\r\n var validResolves = Object.create(null);\r\n function deepResolve(key) {\r\n if (key in validResolves) {\r\n if (++resolvedCount >= totalToResolve)\r\n resolve(path);\r\n }\r\n }\r\n refKeys.forEach(function (refKey) {\r\n var sub = subs[refKey];\r\n var ref = refs[refKey];\r\n var docPath = path + \".\" + refKey;\r\n validResolves[docPath] = true;\r\n // unsubscribe if bound to a different ref\r\n if (sub) {\r\n if (sub.path !== ref.path)\r\n sub.unsub();\r\n // if has already be bound and as we always walk the objects, it will work\r\n else\r\n return;\r\n }\r\n subs[refKey] = {\r\n data: function () { return walkGet(target, docPath); },\r\n unsub: subscribeToDocument({\r\n ref: ref,\r\n target: target,\r\n path: docPath,\r\n depth: depth,\r\n ops: ops,\r\n resolve: deepResolve.bind(null, docPath),\r\n }, options),\r\n path: ref.path,\r\n };\r\n });\r\n}\r\n// TODO: refactor without using an object to improve size like the other functions\r\nfunction bindCollection(_a, extraOptions) {\r\n var vm = _a.vm, key = _a.key, collection = _a.collection, ops = _a.ops, resolve = _a.resolve, reject = _a.reject;\r\n if (extraOptions === void 0) { extraOptions = DEFAULT_OPTIONS$1; }\r\n var options = Object.assign({}, DEFAULT_OPTIONS$1, extraOptions); // fill default values\r\n // TODO support pathes? nested.obj.list (walkSet)\r\n var array = options.wait ? [] : ops.set(vm, key, []);\r\n var originalResolve = resolve;\r\n var isResolved;\r\n // contain ref subscriptions of objects\r\n // arraySubs is a mirror of array\r\n var arraySubs = [];\r\n var change = {\r\n added: function (_a) {\r\n var newIndex = _a.newIndex, doc = _a.doc;\r\n arraySubs.splice(newIndex, 0, Object.create(null));\r\n var subs = arraySubs[newIndex];\r\n var _b = extractRefs(options.serialize(doc), undefined, subs), data = _b[0], refs = _b[1];\r\n ops.add(array, newIndex, data);\r\n subscribeToRefs(options, array, newIndex, subs, refs, ops, 0, resolve.bind(null, doc));\r\n },\r\n modified: function (_a) {\r\n var oldIndex = _a.oldIndex, newIndex = _a.newIndex, doc = _a.doc;\r\n var subs = arraySubs[oldIndex];\r\n var oldData = array[oldIndex];\r\n var _b = extractRefs(options.serialize(doc), oldData, subs), data = _b[0], refs = _b[1];\r\n // only move things around after extracting refs\r\n // only move things around after extracting refs\r\n arraySubs.splice(newIndex, 0, subs);\r\n ops.remove(array, oldIndex);\r\n ops.add(array, newIndex, data);\r\n subscribeToRefs(options, array, newIndex, subs, refs, ops, 0, resolve);\r\n },\r\n removed: function (_a) {\r\n var oldIndex = _a.oldIndex;\r\n ops.remove(array, oldIndex);\r\n unsubscribeAll(arraySubs.splice(oldIndex, 1)[0]);\r\n },\r\n };\r\n var unbind = collection.onSnapshot(function (snapshot) {\r\n // console.log('pending', metadata.hasPendingWrites)\r\n // docs.forEach(d => console.log('doc', d, '\\n', 'data', d.data()))\r\n // NOTE: this will only be triggered once and it will be with all the documents\r\n // from the query appearing as added\r\n // (https://firebase.google.com/docs/firestore/query-data/listen#view_changes_between_snapshots)\r\n var docChanges = \r\n /* istanbul ignore next */\r\n typeof snapshot.docChanges === 'function'\r\n ? snapshot.docChanges()\r\n : /* istanbul ignore next to support firebase < 5*/\r\n snapshot.docChanges;\r\n if (!isResolved && docChanges.length) {\r\n // isResolved is only meant to make sure we do the check only once\r\n isResolved = true;\r\n var count_1 = 0;\r\n var expectedItems_1 = docChanges.length;\r\n var validDocs_1 = Object.create(null);\r\n for (var i = 0; i < expectedItems_1; i++) {\r\n validDocs_1[docChanges[i].doc.id] = true;\r\n }\r\n resolve = function (_a) {\r\n var id = _a.id;\r\n if (id in validDocs_1) {\r\n if (++count_1 >= expectedItems_1) {\r\n // if wait is true, finally set the array\r\n if (options.wait)\r\n ops.set(vm, key, array);\r\n originalResolve(vm[key]);\r\n // reset resolve to noop\r\n resolve = function () { };\r\n }\r\n }\r\n };\r\n }\r\n docChanges.forEach(function (c) {\r\n change[c.type](c);\r\n });\r\n // resolves when array is empty\r\n // since this can only happen once, there is no need to guard against it\r\n // being called multiple times\r\n if (!docChanges.length) {\r\n if (options.wait)\r\n ops.set(vm, key, array);\r\n resolve(array);\r\n }\r\n }, reject);\r\n return function (reset) {\r\n unbind();\r\n if (reset !== false) {\r\n var value = typeof reset === 'function' ? reset() : [];\r\n ops.set(vm, key, value);\r\n }\r\n arraySubs.forEach(unsubscribeAll);\r\n };\r\n}\r\n/**\r\n * Binds a Document to a property of vm\r\n * @param param0\r\n * @param extraOptions\r\n */\r\nfunction bindDocument(_a, extraOptions) {\r\n var vm = _a.vm, key = _a.key, document = _a.document, resolve = _a.resolve, reject = _a.reject, ops = _a.ops;\r\n if (extraOptions === void 0) { extraOptions = DEFAULT_OPTIONS$1; }\r\n var options = Object.assign({}, DEFAULT_OPTIONS$1, extraOptions); // fill default values\r\n // TODO: warning check if key exists?\r\n // const boundRefs = Object.create(null)\r\n var subs = Object.create(null);\r\n // bind here the function so it can be resolved anywhere\r\n // this is specially useful for refs\r\n resolve = callOnceWithArg(resolve, function () { return walkGet(vm, key); });\r\n var unbind = document.onSnapshot(function (snapshot) {\r\n if (snapshot.exists) {\r\n updateDataFromDocumentSnapshot(options, vm, key, snapshot, subs, ops, 0, resolve);\r\n }\r\n else {\r\n ops.set(vm, key, null);\r\n resolve(null);\r\n }\r\n }, reject);\r\n return function (reset) {\r\n unbind();\r\n if (reset !== false) {\r\n var value = typeof reset === 'function' ? reset() : null;\r\n ops.set(vm, key, value);\r\n }\r\n unsubscribeAll(subs);\r\n };\r\n}\n\n/**\r\n * Returns the original reference of a Firebase reference or query across SDK versions.\r\n *\r\n * @param {firebase.firebase.database.Reference|firebase.firebase.database.Query} refOrQuery\r\n * @return {firebase.firebase.database.Reference}\r\n */\r\nfunction getRef(refOrQuery) {\r\n return refOrQuery.ref;\r\n}\r\nvar ops = {\r\n set: function (target, key, value) { return walkSet(target, key, value); },\r\n add: function (array, index, data) { return array.splice(index, 0, data); },\r\n remove: function (array, index) { return array.splice(index, 1); },\r\n};\r\nfunction bind(vm, key, source, options) {\r\n return new Promise(function (resolve, reject) {\r\n var unbind;\r\n if (Array.isArray(vm[key])) {\r\n unbind = rtdbBindAsArray({\r\n vm: vm,\r\n key: key,\r\n collection: source,\r\n resolve: resolve,\r\n reject: reject,\r\n ops: ops,\r\n }, options);\r\n }\r\n else {\r\n unbind = rtdbBindAsObject({\r\n vm: vm,\r\n key: key,\r\n document: source,\r\n resolve: resolve,\r\n reject: reject,\r\n ops: ops,\r\n }, options);\r\n }\r\n vm._firebaseUnbinds[key] = unbind;\r\n });\r\n}\r\nfunction unbind(vm, key, reset) {\r\n vm._firebaseUnbinds[key](reset);\r\n delete vm._firebaseSources[key];\r\n delete vm._firebaseUnbinds[key];\r\n}\r\nvar defaultOptions = {\r\n bindName: '$rtdbBind',\r\n unbindName: '$rtdbUnbind',\r\n serialize: DEFAULT_OPTIONS.serialize,\r\n reset: DEFAULT_OPTIONS.reset,\r\n wait: DEFAULT_OPTIONS.wait,\r\n};\r\nvar rtdbPlugin = function rtdbPlugin(Vue, pluginOptions) {\r\n if (pluginOptions === void 0) { pluginOptions = defaultOptions; }\r\n var strategies = Vue.config.optionMergeStrategies;\r\n strategies.firebase = strategies.provide;\r\n var globalOptions = Object.assign({}, defaultOptions, pluginOptions);\r\n var bindName = globalOptions.bindName, unbindName = globalOptions.unbindName;\r\n Vue.prototype[unbindName] = function rtdbUnbind(key, reset) {\r\n unbind(this, key, reset);\r\n };\r\n // add $rtdbBind and $rtdbUnbind methods\r\n Vue.prototype[bindName] = function rtdbBind(key, source, userOptions) {\r\n var options = Object.assign({}, globalOptions, userOptions);\r\n if (this._firebaseUnbinds[key]) {\r\n // @ts-ignore\r\n this[unbindName](key, \r\n // if wait, allow overriding with a function or reset, otherwise, force reset to false\r\n // else pass the reset option\r\n options.wait ? (typeof options.reset === 'function' ? options.reset : false) : options.reset);\r\n }\r\n var promise = bind(this, key, source, options);\r\n // @ts-ignore\r\n this._firebaseSources[key] = source;\r\n // @ts-ignore\r\n this.$firebaseRefs[key] = getRef(source);\r\n return promise;\r\n };\r\n // handle firebase option\r\n Vue.mixin({\r\n beforeCreate: function () {\r\n this.$firebaseRefs = Object.create(null);\r\n this._firebaseSources = Object.create(null);\r\n this._firebaseUnbinds = Object.create(null);\r\n },\r\n created: function () {\r\n var bindings = this.$options.firebase;\r\n if (typeof bindings === 'function')\r\n bindings =\r\n // @ts-ignore\r\n bindings.call(this);\r\n if (!bindings)\r\n return;\r\n for (var key in bindings) {\r\n // @ts-ignore\r\n this[bindName](key, bindings[key], globalOptions);\r\n }\r\n },\r\n beforeDestroy: function () {\r\n for (var key in this._firebaseUnbinds) {\r\n this._firebaseUnbinds[key]();\r\n }\r\n // @ts-ignore\r\n this._firebaseSources = null;\r\n // @ts-ignore\r\n this._firebaseUnbinds = null;\r\n // @ts-ignore\r\n this.$firebaseRefs = null;\r\n },\r\n });\r\n};\n\nvar ops$1 = {\r\n set: function (target, key, value) { return walkSet(target, key, value); },\r\n add: function (array, index, data) { return array.splice(index, 0, data); },\r\n remove: function (array, index) { return array.splice(index, 1); },\r\n};\r\nfunction bind$1(vm, key, ref, ops, options) {\r\n return new Promise(function (resolve, reject) {\r\n var unbind;\r\n if ('where' in ref) {\r\n unbind = bindCollection({\r\n vm: vm,\r\n key: key,\r\n ops: ops,\r\n collection: ref,\r\n resolve: resolve,\r\n reject: reject,\r\n }, options);\r\n }\r\n else {\r\n unbind = bindDocument({\r\n vm: vm,\r\n key: key,\r\n ops: ops,\r\n document: ref,\r\n resolve: resolve,\r\n reject: reject,\r\n }, options);\r\n }\r\n vm._firestoreUnbinds[key] = unbind;\r\n });\r\n}\r\nvar defaultOptions$1 = {\r\n bindName: '$bind',\r\n unbindName: '$unbind',\r\n serialize: DEFAULT_OPTIONS$1.serialize,\r\n reset: DEFAULT_OPTIONS$1.reset,\r\n wait: DEFAULT_OPTIONS$1.wait,\r\n};\r\nvar firestorePlugin = function firestorePlugin(Vue, pluginOptions) {\r\n if (pluginOptions === void 0) { pluginOptions = defaultOptions$1; }\r\n var strategies = Vue.config.optionMergeStrategies;\r\n strategies.firestore = strategies.provide;\r\n var globalOptions = Object.assign({}, defaultOptions$1, pluginOptions);\r\n var bindName = globalOptions.bindName, unbindName = globalOptions.unbindName;\r\n Vue.prototype[unbindName] = function firestoreUnbind(key, reset) {\r\n this._firestoreUnbinds[key](reset);\r\n delete this._firestoreUnbinds[key];\r\n delete this.$firestoreRefs[key];\r\n };\r\n Vue.prototype[bindName] = function firestoreBind(key, ref, userOptions) {\r\n var options = Object.assign({}, globalOptions, userOptions);\r\n if (this._firestoreUnbinds[key]) {\r\n this[unbindName](key, \r\n // if wait, allow overriding with a function or reset, otherwise, force reset to false\r\n // else pass the reset option\r\n options.wait ? (typeof options.reset === 'function' ? options.reset : false) : options.reset);\r\n }\r\n var promise = bind$1(this, key, ref, ops$1, options);\r\n // @ts-ignore we are allowed to write it\r\n this.$firestoreRefs[key] = ref;\r\n return promise;\r\n };\r\n Vue.mixin({\r\n beforeCreate: function () {\r\n this._firestoreUnbinds = Object.create(null);\r\n this.$firestoreRefs = Object.create(null);\r\n },\r\n created: function () {\r\n var firestore = this.$options.firestore;\r\n var refs = typeof firestore === 'function' ? firestore.call(this) : firestore;\r\n if (!refs)\r\n return;\r\n for (var key in refs) {\r\n // @ts-ignore\r\n this[bindName](key, refs[key], globalOptions);\r\n }\r\n },\r\n beforeDestroy: function () {\r\n for (var subKey in this._firestoreUnbinds) {\r\n this._firestoreUnbinds[subKey]();\r\n }\r\n // @ts-ignore we are allowed to write it\r\n this._firestoreUnbinds = null;\r\n // @ts-ignore we are allowed to write it\r\n this.$firestoreRefs = null;\r\n },\r\n });\r\n};\n\nexport { firestorePlugin, rtdbPlugin };\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/*!\n * vuex v3.6.2\n * (c) 2021 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n }, { prepend: true });\n\n store.subscribeAction(function (action, state) {\n devtoolHook.emit('vuex:action', action, state);\n }, { prepend: true });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\nfunction find (list, f) {\n return list.filter(f)[0]\n}\n\n/**\n * Deep copy the given object considering circular structure.\n * This function caches all nested objects and its copies.\n * If it detects circular structure, use cached copy to avoid infinite loop.\n *\n * @param {*} obj\n * @param {Array