{"version":3,"file":"js/chunk-vendors-ad07232f.a6df2086.js","mappings":"4LAEA,SAASA,EAAcC,GACnB,IAAIC,EAAK,CACLC,KAAM,sBACNC,UAAW,QACXC,KAAM,CACFF,KAAM,OACNG,MAAO,wBAEXC,aAAcC,EAAoBP,IAElCQ,EAAM,CACNN,KAAM,WACNO,YAAa,CAACR,IAElB,OAAOO,CACX,CACA,SAASE,EAAiBV,EAAKW,GAC3B,IAAIC,EAAO,CACPV,KAAM,qBACNW,cAAe,CACXX,KAAM,YACNE,KAAM,CACFF,KAAM,OACNG,MAAOM,GAAY,eAG3BP,KAAM,CACFF,KAAM,OACNG,MAAO,wBAEXC,aAAcC,EAAoBP,IAElCQ,EAAM,CACNN,KAAM,WACNO,YAAa,CAACG,IAElB,OAAOJ,CACX,CACA,SAASD,EAAoBP,GACzB,GAAmB,kBAARA,GACQ,mBAARA,GACQ,kBAARA,GACQ,qBAARA,GACC,OAARA,EACA,OAAO,KAEX,GAAIc,MAAMC,QAAQf,GACd,OAAOO,EAAoBP,EAAI,IAEnC,IAAIgB,EAAa,GACjBC,OAAOC,KAAKlB,GAAKmB,SAAQ,SAAUC,GAC/B,IAAIC,EAAed,EAAoBP,EAAIoB,IACvCE,EAAQ,CACRpB,KAAM,QACNE,KAAM,CACFF,KAAM,OACNG,MAAOe,GAEXd,aAAce,QAAgBE,GAElCP,EAAWQ,KAAKF,EACpB,IACA,IAAIhB,EAAe,CACfJ,KAAM,eACNc,WAAYA,GAEhB,OAAOV,CACX,CACA,IAmGImB,EAnGAC,EAAoB,CACpBxB,KAAM,WACNO,YAAa,CACT,CACIP,KAAM,sBACNC,UAAW,QACXC,KAAM,KACNuB,oBAAqB,KACrBC,WAAY,GACZtB,aAAc,CACVJ,KAAM,eACNc,WAAY,CACR,CACId,KAAM,QACN2B,MAAO,KACPzB,KAAM,CACFF,KAAM,OACNG,MAAO,cAEXyB,UAAW,GACXF,WAAY,GACZtB,aAAc,WAQlCyB,EAAe,WACf,SAASA,IACT,C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,IAAIzD,EAAQA,IAEpCA,CACX,CACA,OAAOjB,CACX,EACA+T,EAAcjU,UAAU8U,iBAAmB,WACvC,IAAI9N,EAAQzG,KACPA,KAAK6T,kBACN7T,KAAK2T,QAAQ/U,SAAQ,SAAUwV,GAAK,OAAO3N,EAAM0N,oBAAoBC,EAAI,GAEjF,EACAV,EAAcjU,UAAU0U,oBAAsB,SAAUC,GACpDA,EAAE5R,SAASxC,KAAKwU,KAAK,CACjBtU,MAAOkU,EAAElU,MACTC,UAAWiU,EAAEjU,UACb6N,eAAgBoG,EAAEpG,gBAAkBoG,EAAEpG,iBACtCjO,WAAYqU,EAAErU,aAEtB,EACO2T,CACX,CAtLoB,CAsLlBlU,E","sources":["webpack://campus-addresses/./node_modules/apollo-cache/lib/bundle.esm.js","webpack://campus-addresses/./node_modules/apollo-cache-inmemory/node_modules/@wry/context/lib/context.esm.js","webpack://campus-addresses/./node_modules/apollo-cache-inmemory/node_modules/optimism/lib/bundle.esm.js","webpack://campus-addresses/./node_modules/apollo-cache-inmemory/node_modules/ts-invariant/lib/invariant.esm.js","webpack://campus-addresses/./node_modules/apollo-cache-inmemory/lib/bundle.esm.js"],"sourcesContent":["import { getFragmentQueryDocument } from 'apollo-utilities';\n\nfunction queryFromPojo(obj) {\n var op = {\n kind: 'OperationDefinition',\n operation: 'query',\n name: {\n kind: 'Name',\n value: 'GeneratedClientQuery',\n },\n selectionSet: selectionSetFromObj(obj),\n };\n var out = {\n kind: 'Document',\n definitions: [op],\n };\n return out;\n}\nfunction fragmentFromPojo(obj, typename) {\n var frag = {\n kind: 'FragmentDefinition',\n typeCondition: {\n kind: 'NamedType',\n name: {\n kind: 'Name',\n value: typename || '__FakeType',\n },\n },\n name: {\n kind: 'Name',\n value: 'GeneratedClientQuery',\n },\n selectionSet: selectionSetFromObj(obj),\n };\n var out = {\n kind: 'Document',\n definitions: [frag],\n };\n return out;\n}\nfunction selectionSetFromObj(obj) {\n if (typeof obj === 'number' ||\n typeof obj === 'boolean' ||\n typeof obj === 'string' ||\n typeof obj === 'undefined' ||\n obj === null) {\n return null;\n }\n if (Array.isArray(obj)) {\n return selectionSetFromObj(obj[0]);\n }\n var selections = [];\n Object.keys(obj).forEach(function (key) {\n var nestedSelSet = selectionSetFromObj(obj[key]);\n var field = {\n kind: 'Field',\n name: {\n kind: 'Name',\n value: key,\n },\n selectionSet: nestedSelSet || undefined,\n };\n selections.push(field);\n });\n var selectionSet = {\n kind: 'SelectionSet',\n selections: selections,\n };\n return selectionSet;\n}\nvar justTypenameQuery = {\n kind: 'Document',\n definitions: [\n {\n kind: 'OperationDefinition',\n operation: 'query',\n name: null,\n variableDefinitions: null,\n directives: [],\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n {\n kind: 'Field',\n alias: null,\n name: {\n kind: 'Name',\n value: '__typename',\n },\n arguments: [],\n directives: [],\n selectionSet: null,\n },\n ],\n },\n },\n ],\n};\n\nvar ApolloCache = (function () {\n function ApolloCache() {\n }\n ApolloCache.prototype.transformDocument = function (document) {\n return document;\n };\n ApolloCache.prototype.transformForLink = function (document) {\n return document;\n };\n ApolloCache.prototype.readQuery = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.read({\n query: options.query,\n variables: options.variables,\n optimistic: optimistic,\n });\n };\n ApolloCache.prototype.readFragment = function (options, optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return this.read({\n query: getFragmentQueryDocument(options.fragment, options.fragmentName),\n variables: options.variables,\n rootId: options.id,\n optimistic: optimistic,\n });\n };\n ApolloCache.prototype.writeQuery = function (options) {\n this.write({\n dataId: 'ROOT_QUERY',\n result: options.data,\n query: options.query,\n variables: options.variables,\n });\n };\n ApolloCache.prototype.writeFragment = function (options) {\n this.write({\n dataId: options.id,\n result: options.data,\n variables: options.variables,\n query: getFragmentQueryDocument(options.fragment, options.fragmentName),\n });\n };\n ApolloCache.prototype.writeData = function (_a) {\n var id = _a.id, data = _a.data;\n if (typeof id !== 'undefined') {\n var typenameResult = null;\n try {\n typenameResult = this.read({\n rootId: id,\n optimistic: false,\n query: justTypenameQuery,\n });\n }\n catch (e) {\n }\n var __typename = (typenameResult && typenameResult.__typename) || '__ClientData';\n var dataToWrite = Object.assign({ __typename: __typename }, data);\n this.writeFragment({\n id: id,\n fragment: fragmentFromPojo(dataToWrite, __typename),\n data: dataToWrite,\n });\n }\n else {\n this.writeQuery({ query: queryFromPojo(data), data: data });\n }\n };\n return ApolloCache;\n}());\n\nvar Cache;\n(function (Cache) {\n})(Cache || (Cache = {}));\n\nexport { ApolloCache, Cache };\n//# sourceMappingURL=bundle.esm.js.map\n","// This currentContext variable will only be used if the makeSlotClass\r\n// function is called, which happens only if this is the first copy of the\r\n// @wry/context package to be imported.\r\nvar currentContext = null;\r\n// This unique internal object is used to denote the absence of a value\r\n// for a given Slot, and is never exposed to outside code.\r\nvar MISSING_VALUE = {};\r\nvar idCounter = 1;\r\n// Although we can't do anything about the cost of duplicated code from\r\n// accidentally bundling multiple copies of the @wry/context package, we can\r\n// avoid creating the Slot class more than once using makeSlotClass.\r\nvar makeSlotClass = function () { return /** @class */ (function () {\r\n function Slot() {\r\n // If you have a Slot object, you can find out its slot.id, but you cannot\r\n // guess the slot.id of a Slot you don't have access to, thanks to the\r\n // randomized suffix.\r\n this.id = [\r\n \"slot\",\r\n idCounter++,\r\n Date.now(),\r\n Math.random().toString(36).slice(2),\r\n ].join(\":\");\r\n }\r\n Slot.prototype.hasValue = function () {\r\n for (var context_1 = currentContext; context_1; context_1 = context_1.parent) {\r\n // We use the Slot object iself as a key to its value, which means the\r\n // value cannot be obtained without a reference to the Slot object.\r\n if (this.id in context_1.slots) {\r\n var value = context_1.slots[this.id];\r\n if (value === MISSING_VALUE)\r\n break;\r\n if (context_1 !== currentContext) {\r\n // Cache the value in currentContext.slots so the next lookup will\r\n // be faster. This caching is safe because the tree of contexts and\r\n // the values of the slots are logically immutable.\r\n currentContext.slots[this.id] = value;\r\n }\r\n return true;\r\n }\r\n }\r\n if (currentContext) {\r\n // If a value was not found for this Slot, it's never going to be found\r\n // no matter how many times we look it up, so we might as well cache\r\n // the absence of the value, too.\r\n currentContext.slots[this.id] = MISSING_VALUE;\r\n }\r\n return false;\r\n };\r\n Slot.prototype.getValue = function () {\r\n if (this.hasValue()) {\r\n return currentContext.slots[this.id];\r\n }\r\n };\r\n Slot.prototype.withValue = function (value, callback, \r\n // Given the prevalence of arrow functions, specifying arguments is likely\r\n // to be much more common than specifying `this`, hence this ordering:\r\n args, thisArg) {\r\n var _a;\r\n var slots = (_a = {\r\n __proto__: null\r\n },\r\n _a[this.id] = value,\r\n _a);\r\n var parent = currentContext;\r\n currentContext = { parent: parent, slots: slots };\r\n try {\r\n // Function.prototype.apply allows the arguments array argument to be\r\n // omitted or undefined, so args! is fine here.\r\n return callback.apply(thisArg, args);\r\n }\r\n finally {\r\n currentContext = parent;\r\n }\r\n };\r\n // Capture the current context and wrap a callback function so that it\r\n // reestablishes the captured context when called.\r\n Slot.bind = function (callback) {\r\n var context = currentContext;\r\n return function () {\r\n var saved = currentContext;\r\n try {\r\n currentContext = context;\r\n return callback.apply(this, arguments);\r\n }\r\n finally {\r\n currentContext = saved;\r\n }\r\n };\r\n };\r\n // Immediately run a callback function without any captured context.\r\n Slot.noContext = function (callback, \r\n // Given the prevalence of arrow functions, specifying arguments is likely\r\n // to be much more common than specifying `this`, hence this ordering:\r\n args, thisArg) {\r\n if (currentContext) {\r\n var saved = currentContext;\r\n try {\r\n currentContext = null;\r\n // Function.prototype.apply allows the arguments array argument to be\r\n // omitted or undefined, so args! is fine here.\r\n return callback.apply(thisArg, args);\r\n }\r\n finally {\r\n currentContext = saved;\r\n }\r\n }\r\n else {\r\n return callback.apply(thisArg, args);\r\n }\r\n };\r\n return Slot;\r\n}()); };\r\n// We store a single global implementation of the Slot class as a permanent\r\n// non-enumerable symbol property of the Array constructor. This obfuscation\r\n// does nothing to prevent access to the Slot class, but at least it ensures\r\n// the implementation (i.e. currentContext) cannot be tampered with, and all\r\n// copies of the @wry/context package (hopefully just one) will share the\r\n// same Slot implementation. Since the first copy of the @wry/context package\r\n// to be imported wins, this technique imposes a very high cost for any\r\n// future breaking changes to the Slot class.\r\nvar globalKey = \"@wry/context:Slot\";\r\nvar host = Array;\r\nvar Slot = host[globalKey] || function () {\r\n var Slot = makeSlotClass();\r\n try {\r\n Object.defineProperty(host, globalKey, {\r\n value: host[globalKey] = Slot,\r\n enumerable: false,\r\n writable: false,\r\n configurable: false,\r\n });\r\n }\r\n finally {\r\n return Slot;\r\n }\r\n}();\n\nvar bind = Slot.bind, noContext = Slot.noContext;\r\nfunction setTimeoutWithContext(callback, delay) {\r\n return setTimeout(bind(callback), delay);\r\n}\r\n// Turn any generator function into an async function (using yield instead\r\n// of await), with context automatically preserved across yields.\r\nfunction asyncFromGen(genFn) {\r\n return function () {\r\n var gen = genFn.apply(this, arguments);\r\n var boundNext = bind(gen.next);\r\n var boundThrow = bind(gen.throw);\r\n return new Promise(function (resolve, reject) {\r\n function invoke(method, argument) {\r\n try {\r\n var result = method.call(gen, argument);\r\n }\r\n catch (error) {\r\n return reject(error);\r\n }\r\n var next = result.done ? resolve : invokeNext;\r\n if (isPromiseLike(result.value)) {\r\n result.value.then(next, result.done ? reject : invokeThrow);\r\n }\r\n else {\r\n next(result.value);\r\n }\r\n }\r\n var invokeNext = function (value) { return invoke(boundNext, value); };\r\n var invokeThrow = function (error) { return invoke(boundThrow, error); };\r\n invokeNext();\r\n });\r\n };\r\n}\r\nfunction isPromiseLike(value) {\r\n return value && typeof value.then === \"function\";\r\n}\r\n// If you use the fibers npm package to implement coroutines in Node.js,\r\n// you should call this function at least once to ensure context management\r\n// remains coherent across any yields.\r\nvar wrappedFibers = [];\r\nfunction wrapYieldingFiberMethods(Fiber) {\r\n // There can be only one implementation of Fiber per process, so this array\r\n // should never grow longer than one element.\r\n if (wrappedFibers.indexOf(Fiber) < 0) {\r\n var wrap = function (obj, method) {\r\n var fn = obj[method];\r\n obj[method] = function () {\r\n return noContext(fn, arguments, this);\r\n };\r\n };\r\n // These methods can yield, according to\r\n // https://github.com/laverdet/node-fibers/blob/ddebed9b8ae3883e57f822e2108e6943e5c8d2a8/fibers.js#L97-L100\r\n wrap(Fiber, \"yield\");\r\n wrap(Fiber.prototype, \"run\");\r\n wrap(Fiber.prototype, \"throwInto\");\r\n wrappedFibers.push(Fiber);\r\n }\r\n return Fiber;\r\n}\n\nexport { Slot, asyncFromGen, bind, noContext, setTimeoutWithContext as setTimeout, wrapYieldingFiberMethods };\n//# sourceMappingURL=context.esm.js.map\n","import { Slot } from '@wry/context';\nexport { asyncFromGen, bind as bindContext, noContext, setTimeout } from '@wry/context';\n\nfunction defaultDispose() { }\r\nvar Cache = /** @class */ (function () {\r\n function Cache(max, dispose) {\r\n if (max === void 0) { max = Infinity; }\r\n if (dispose === void 0) { dispose = defaultDispose; }\r\n this.max = max;\r\n this.dispose = dispose;\r\n this.map = new Map();\r\n this.newest = null;\r\n this.oldest = null;\r\n }\r\n Cache.prototype.has = function (key) {\r\n return this.map.has(key);\r\n };\r\n Cache.prototype.get = function (key) {\r\n var entry = this.getEntry(key);\r\n return entry && entry.value;\r\n };\r\n Cache.prototype.getEntry = function (key) {\r\n var entry = this.map.get(key);\r\n if (entry && entry !== this.newest) {\r\n var older = entry.older, newer = entry.newer;\r\n if (newer) {\r\n newer.older = older;\r\n }\r\n if (older) {\r\n older.newer = newer;\r\n }\r\n entry.older = this.newest;\r\n entry.older.newer = entry;\r\n entry.newer = null;\r\n this.newest = entry;\r\n if (entry === this.oldest) {\r\n this.oldest = newer;\r\n }\r\n }\r\n return entry;\r\n };\r\n Cache.prototype.set = function (key, value) {\r\n var entry = this.getEntry(key);\r\n if (entry) {\r\n return entry.value = value;\r\n }\r\n entry = {\r\n key: key,\r\n value: value,\r\n newer: null,\r\n older: this.newest\r\n };\r\n if (this.newest) {\r\n this.newest.newer = entry;\r\n }\r\n this.newest = entry;\r\n this.oldest = this.oldest || entry;\r\n this.map.set(key, entry);\r\n return entry.value;\r\n };\r\n Cache.prototype.clean = function () {\r\n while (this.oldest && this.map.size > this.max) {\r\n this.delete(this.oldest.key);\r\n }\r\n };\r\n Cache.prototype.delete = function (key) {\r\n var entry = this.map.get(key);\r\n if (entry) {\r\n if (entry === this.newest) {\r\n this.newest = entry.older;\r\n }\r\n if (entry === this.oldest) {\r\n this.oldest = entry.newer;\r\n }\r\n if (entry.newer) {\r\n entry.newer.older = entry.older;\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer;\r\n }\r\n this.map.delete(key);\r\n this.dispose(entry.value, key);\r\n return true;\r\n }\r\n return false;\r\n };\r\n return Cache;\r\n}());\n\nvar parentEntrySlot = new Slot();\n\nvar reusableEmptyArray = [];\r\nvar emptySetPool = [];\r\nvar POOL_TARGET_SIZE = 100;\r\n// Since this package might be used browsers, we should avoid using the\r\n// Node built-in assert module.\r\nfunction assert(condition, optionalMessage) {\r\n if (!condition) {\r\n throw new Error(optionalMessage || \"assertion failure\");\r\n }\r\n}\r\nfunction valueIs(a, b) {\r\n var len = a.length;\r\n return (\r\n // Unknown values are not equal to each other.\r\n len > 0 &&\r\n // Both values must be ordinary (or both exceptional) to be equal.\r\n len === b.length &&\r\n // The underlying value or exception must be the same.\r\n a[len - 1] === b[len - 1]);\r\n}\r\nfunction valueGet(value) {\r\n switch (value.length) {\r\n case 0: throw new Error(\"unknown value\");\r\n case 1: return value[0];\r\n case 2: throw value[1];\r\n }\r\n}\r\nfunction valueCopy(value) {\r\n return value.slice(0);\r\n}\r\nvar Entry = /** @class */ (function () {\r\n function Entry(fn, args) {\r\n this.fn = fn;\r\n this.args = args;\r\n this.parents = new Set();\r\n this.childValues = new Map();\r\n // When this Entry has children that are dirty, this property becomes\r\n // a Set containing other Entry objects, borrowed from emptySetPool.\r\n // When the set becomes empty, it gets recycled back to emptySetPool.\r\n this.dirtyChildren = null;\r\n this.dirty = true;\r\n this.recomputing = false;\r\n this.value = [];\r\n ++Entry.count;\r\n }\r\n // This is the most important method of the Entry API, because it\r\n // determines whether the cached this.value can be returned immediately,\r\n // or must be recomputed. The overall performance of the caching system\r\n // depends on the truth of the following observations: (1) this.dirty is\r\n // usually false, (2) this.dirtyChildren is usually null/empty, and thus\r\n // (3) valueGet(this.value) is usually returned without recomputation.\r\n Entry.prototype.recompute = function () {\r\n assert(!this.recomputing, \"already recomputing\");\r\n if (!rememberParent(this) && maybeReportOrphan(this)) {\r\n // The recipient of the entry.reportOrphan callback decided to dispose\r\n // of this orphan entry by calling entry.dispose(), so we don't need to\r\n // (and should not) proceed with the recomputation.\r\n return void 0;\r\n }\r\n return mightBeDirty(this)\r\n ? reallyRecompute(this)\r\n : valueGet(this.value);\r\n };\r\n Entry.prototype.setDirty = function () {\r\n if (this.dirty)\r\n return;\r\n this.dirty = true;\r\n this.value.length = 0;\r\n reportDirty(this);\r\n // We can go ahead and unsubscribe here, since any further dirty\r\n // notifications we receive will be redundant, and unsubscribing may\r\n // free up some resources, e.g. file watchers.\r\n maybeUnsubscribe(this);\r\n };\r\n Entry.prototype.dispose = function () {\r\n var _this = this;\r\n forgetChildren(this).forEach(maybeReportOrphan);\r\n maybeUnsubscribe(this);\r\n // Because this entry has been kicked out of the cache (in index.js),\r\n // we've lost the ability to find out if/when this entry becomes dirty,\r\n // whether that happens through a subscription, because of a direct call\r\n // to entry.setDirty(), or because one of its children becomes dirty.\r\n // Because of this loss of future information, we have to assume the\r\n // worst (that this entry might have become dirty very soon), so we must\r\n // immediately mark this entry's parents as dirty. Normally we could\r\n // just call entry.setDirty() rather than calling parent.setDirty() for\r\n // each parent, but that would leave this entry in parent.childValues\r\n // and parent.dirtyChildren, which would prevent the child from being\r\n // truly forgotten.\r\n this.parents.forEach(function (parent) {\r\n parent.setDirty();\r\n forgetChild(parent, _this);\r\n });\r\n };\r\n Entry.count = 0;\r\n return Entry;\r\n}());\r\nfunction rememberParent(child) {\r\n var parent = parentEntrySlot.getValue();\r\n if (parent) {\r\n child.parents.add(parent);\r\n if (!parent.childValues.has(child)) {\r\n parent.childValues.set(child, []);\r\n }\r\n if (mightBeDirty(child)) {\r\n reportDirtyChild(parent, child);\r\n }\r\n else {\r\n reportCleanChild(parent, child);\r\n }\r\n return parent;\r\n }\r\n}\r\nfunction reallyRecompute(entry) {\r\n // Since this recomputation is likely to re-remember some of this\r\n // entry's children, we forget our children here but do not call\r\n // maybeReportOrphan until after the recomputation finishes.\r\n var originalChildren = forgetChildren(entry);\r\n // Set entry as the parent entry while calling recomputeNewValue(entry).\r\n parentEntrySlot.withValue(entry, recomputeNewValue, [entry]);\r\n if (maybeSubscribe(entry)) {\r\n // If we successfully recomputed entry.value and did not fail to\r\n // (re)subscribe, then this Entry is no longer explicitly dirty.\r\n setClean(entry);\r\n }\r\n // Now that we've had a chance to re-remember any children that were\r\n // involved in the recomputation, we can safely report any orphan\r\n // children that remain.\r\n originalChildren.forEach(maybeReportOrphan);\r\n return valueGet(entry.value);\r\n}\r\nfunction recomputeNewValue(entry) {\r\n entry.recomputing = true;\r\n // Set entry.value as unknown.\r\n entry.value.length = 0;\r\n try {\r\n // If entry.fn succeeds, entry.value will become a normal Value.\r\n entry.value[0] = entry.fn.apply(null, entry.args);\r\n }\r\n catch (e) {\r\n // If entry.fn throws, entry.value will become exceptional.\r\n entry.value[1] = e;\r\n }\r\n // Either way, this line is always reached.\r\n entry.recomputing = false;\r\n}\r\nfunction mightBeDirty(entry) {\r\n return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);\r\n}\r\nfunction setClean(entry) {\r\n entry.dirty = false;\r\n if (mightBeDirty(entry)) {\r\n // This Entry may still have dirty children, in which case we can't\r\n // let our parents know we're clean just yet.\r\n return;\r\n }\r\n reportClean(entry);\r\n}\r\nfunction reportDirty(child) {\r\n child.parents.forEach(function (parent) { return reportDirtyChild(parent, child); });\r\n}\r\nfunction reportClean(child) {\r\n child.parents.forEach(function (parent) { return reportCleanChild(parent, child); });\r\n}\r\n// Let a parent Entry know that one of its children may be dirty.\r\nfunction reportDirtyChild(parent, child) {\r\n // Must have called rememberParent(child) before calling\r\n // reportDirtyChild(parent, child).\r\n assert(parent.childValues.has(child));\r\n assert(mightBeDirty(child));\r\n if (!parent.dirtyChildren) {\r\n parent.dirtyChildren = emptySetPool.pop() || new Set;\r\n }\r\n else if (parent.dirtyChildren.has(child)) {\r\n // If we already know this child is dirty, then we must have already\r\n // informed our own parents that we are dirty, so we can terminate\r\n // the recursion early.\r\n return;\r\n }\r\n parent.dirtyChildren.add(child);\r\n reportDirty(parent);\r\n}\r\n// Let a parent Entry know that one of its children is no longer dirty.\r\nfunction reportCleanChild(parent, child) {\r\n // Must have called rememberChild(child) before calling\r\n // reportCleanChild(parent, child).\r\n assert(parent.childValues.has(child));\r\n assert(!mightBeDirty(child));\r\n var childValue = parent.childValues.get(child);\r\n if (childValue.length === 0) {\r\n parent.childValues.set(child, valueCopy(child.value));\r\n }\r\n else if (!valueIs(childValue, child.value)) {\r\n parent.setDirty();\r\n }\r\n removeDirtyChild(parent, child);\r\n if (mightBeDirty(parent)) {\r\n return;\r\n }\r\n reportClean(parent);\r\n}\r\nfunction removeDirtyChild(parent, child) {\r\n var dc = parent.dirtyChildren;\r\n if (dc) {\r\n dc.delete(child);\r\n if (dc.size === 0) {\r\n if (emptySetPool.length < POOL_TARGET_SIZE) {\r\n emptySetPool.push(dc);\r\n }\r\n parent.dirtyChildren = null;\r\n }\r\n }\r\n}\r\n// If the given entry has a reportOrphan method, and no remaining parents,\r\n// call entry.reportOrphan and return true iff it returns true. The\r\n// reportOrphan function should return true to indicate entry.dispose()\r\n// has been called, and the entry has been removed from any other caches\r\n// (see index.js for the only current example).\r\nfunction maybeReportOrphan(entry) {\r\n return entry.parents.size === 0 &&\r\n typeof entry.reportOrphan === \"function\" &&\r\n entry.reportOrphan() === true;\r\n}\r\n// Removes all children from this entry and returns an array of the\r\n// removed children.\r\nfunction forgetChildren(parent) {\r\n var children = reusableEmptyArray;\r\n if (parent.childValues.size > 0) {\r\n children = [];\r\n parent.childValues.forEach(function (_value, child) {\r\n forgetChild(parent, child);\r\n children.push(child);\r\n });\r\n }\r\n // After we forget all our children, this.dirtyChildren must be empty\r\n // and therefore must have been reset to null.\r\n assert(parent.dirtyChildren === null);\r\n return children;\r\n}\r\nfunction forgetChild(parent, child) {\r\n child.parents.delete(parent);\r\n parent.childValues.delete(child);\r\n removeDirtyChild(parent, child);\r\n}\r\nfunction maybeSubscribe(entry) {\r\n if (typeof entry.subscribe === \"function\") {\r\n try {\r\n maybeUnsubscribe(entry); // Prevent double subscriptions.\r\n entry.unsubscribe = entry.subscribe.apply(null, entry.args);\r\n }\r\n catch (e) {\r\n // If this Entry has a subscribe function and it threw an exception\r\n // (or an unsubscribe function it previously returned now throws),\r\n // return false to indicate that we were not able to subscribe (or\r\n // unsubscribe), and this Entry should remain dirty.\r\n entry.setDirty();\r\n return false;\r\n }\r\n }\r\n // Returning true indicates either that there was no entry.subscribe\r\n // function or that it succeeded.\r\n return true;\r\n}\r\nfunction maybeUnsubscribe(entry) {\r\n var unsubscribe = entry.unsubscribe;\r\n if (typeof unsubscribe === \"function\") {\r\n entry.unsubscribe = void 0;\r\n unsubscribe();\r\n }\r\n}\n\n// A trie data structure that holds object keys weakly, yet can also hold\r\n// non-object keys, unlike the native `WeakMap`.\r\nvar KeyTrie = /** @class */ (function () {\r\n function KeyTrie(weakness) {\r\n this.weakness = weakness;\r\n }\r\n KeyTrie.prototype.lookup = function () {\r\n var array = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n array[_i] = arguments[_i];\r\n }\r\n return this.lookupArray(array);\r\n };\r\n KeyTrie.prototype.lookupArray = function (array) {\r\n var node = this;\r\n array.forEach(function (key) { return node = node.getChildTrie(key); });\r\n return node.data || (node.data = Object.create(null));\r\n };\r\n KeyTrie.prototype.getChildTrie = function (key) {\r\n var map = this.weakness && isObjRef(key)\r\n ? this.weak || (this.weak = new WeakMap())\r\n : this.strong || (this.strong = new Map());\r\n var child = map.get(key);\r\n if (!child)\r\n map.set(key, child = new KeyTrie(this.weakness));\r\n return child;\r\n };\r\n return KeyTrie;\r\n}());\r\nfunction isObjRef(value) {\r\n switch (typeof value) {\r\n case \"object\":\r\n if (value === null)\r\n break;\r\n // Fall through to return true...\r\n case \"function\":\r\n return true;\r\n }\r\n return false;\r\n}\n\n// The defaultMakeCacheKey function is remarkably powerful, because it gives\r\n// a unique object for any shallow-identical list of arguments. If you need\r\n// to implement a custom makeCacheKey function, you may find it helpful to\r\n// delegate the final work to defaultMakeCacheKey, which is why we export it\r\n// here. However, you may want to avoid defaultMakeCacheKey if your runtime\r\n// does not support WeakMap, or you have the ability to return a string key.\r\n// In those cases, just write your own custom makeCacheKey functions.\r\nvar keyTrie = new KeyTrie(typeof WeakMap === \"function\");\r\nfunction defaultMakeCacheKey() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return keyTrie.lookupArray(args);\r\n}\r\nvar caches = new Set();\r\nfunction wrap(originalFunction, options) {\r\n if (options === void 0) { options = Object.create(null); }\r\n var cache = new Cache(options.max || Math.pow(2, 16), function (entry) { return entry.dispose(); });\r\n var disposable = !!options.disposable;\r\n var makeCacheKey = options.makeCacheKey || defaultMakeCacheKey;\r\n function optimistic() {\r\n if (disposable && !parentEntrySlot.hasValue()) {\r\n // If there's no current parent computation, and this wrapped\r\n // function is disposable (meaning we don't care about entry.value,\r\n // just dependency tracking), then we can short-cut everything else\r\n // in this function, because entry.recompute() is going to recycle\r\n // the entry object without recomputing anything, anyway.\r\n return void 0;\r\n }\r\n var key = makeCacheKey.apply(null, arguments);\r\n if (key === void 0) {\r\n return originalFunction.apply(null, arguments);\r\n }\r\n var args = Array.prototype.slice.call(arguments);\r\n var entry = cache.get(key);\r\n if (entry) {\r\n entry.args = args;\r\n }\r\n else {\r\n entry = new Entry(originalFunction, args);\r\n cache.set(key, entry);\r\n entry.subscribe = options.subscribe;\r\n if (disposable) {\r\n entry.reportOrphan = function () { return cache.delete(key); };\r\n }\r\n }\r\n var value = entry.recompute();\r\n // Move this entry to the front of the least-recently used queue,\r\n // since we just finished computing its value.\r\n cache.set(key, entry);\r\n caches.add(cache);\r\n // Clean up any excess entries in the cache, but only if there is no\r\n // active parent entry, meaning we're not in the middle of a larger\r\n // computation that might be flummoxed by the cleaning.\r\n if (!parentEntrySlot.hasValue()) {\r\n caches.forEach(function (cache) { return cache.clean(); });\r\n caches.clear();\r\n }\r\n // If options.disposable is truthy, the caller of wrap is telling us\r\n // they don't care about the result of entry.recompute(), so we should\r\n // avoid returning the value, so it won't be accidentally used.\r\n return disposable ? void 0 : value;\r\n }\r\n optimistic.dirty = function () {\r\n var key = makeCacheKey.apply(null, arguments);\r\n var child = key !== void 0 && cache.get(key);\r\n if (child) {\r\n child.setDirty();\r\n }\r\n };\r\n return optimistic;\r\n}\n\nexport { KeyTrie, defaultMakeCacheKey, wrap };\n//# sourceMappingURL=bundle.esm.js.map\n","import { __extends } from 'tslib';\n\nvar genericMessage = \"Invariant Violation\";\r\nvar _a = Object.setPrototypeOf, setPrototypeOf = _a === void 0 ? function (obj, proto) {\r\n obj.__proto__ = proto;\r\n return obj;\r\n} : _a;\r\nvar InvariantError = /** @class */ (function (_super) {\r\n __extends(InvariantError, _super);\r\n function InvariantError(message) {\r\n if (message === void 0) { message = genericMessage; }\r\n var _this = _super.call(this, typeof message === \"number\"\r\n ? genericMessage + \": \" + message + \" (see https://github.com/apollographql/invariant-packages)\"\r\n : message) || this;\r\n _this.framesToPop = 1;\r\n _this.name = genericMessage;\r\n setPrototypeOf(_this, InvariantError.prototype);\r\n return _this;\r\n }\r\n return InvariantError;\r\n}(Error));\r\nfunction invariant(condition, message) {\r\n if (!condition) {\r\n throw new InvariantError(message);\r\n }\r\n}\r\nfunction wrapConsoleMethod(method) {\r\n return function () {\r\n return console[method].apply(console, arguments);\r\n };\r\n}\r\n(function (invariant) {\r\n invariant.warn = wrapConsoleMethod(\"warn\");\r\n invariant.error = wrapConsoleMethod(\"error\");\r\n})(invariant || (invariant = {}));\r\n// Code that uses ts-invariant with rollup-plugin-invariant may want to\r\n// import this process stub to avoid errors evaluating process.env.NODE_ENV.\r\n// However, because most ESM-to-CJS compilers will rewrite the process import\r\n// as tsInvariant.process, which prevents proper replacement by minifiers, we\r\n// also attempt to define the stub globally when it is not already defined.\r\nvar processStub = { env: {} };\r\nif (typeof process === \"object\") {\r\n processStub = process;\r\n}\r\nelse\r\n try {\r\n // Using Function to evaluate this assignment in global scope also escapes\r\n // the strict mode of the current module, thereby allowing the assignment.\r\n // Inspired by https://github.com/facebook/regenerator/pull/369.\r\n Function(\"stub\", \"process = stub\")(processStub);\r\n }\r\n catch (atLeastWeTried) {\r\n // The assignment can fail if a Content Security Policy heavy-handedly\r\n // forbids Function usage. In those environments, developers should take\r\n // extra care to replace process.env.NODE_ENV in their production builds,\r\n // or define an appropriate global.process polyfill.\r\n }\r\nvar invariant$1 = invariant;\n\nexport default invariant$1;\nexport { InvariantError, invariant, processStub as process };\n//# sourceMappingURL=invariant.esm.js.map\n","import { __assign, __extends } from 'tslib';\nimport { ApolloCache } from 'apollo-cache';\nimport { isTest, getQueryDefinition, assign, getDefaultValues, isEqual, getMainDefinition, getFragmentDefinitions, createFragmentMap, shouldInclude, isField, resultKeyNameFromField, isInlineFragment, mergeDeepArray, argumentsObjectFromField, getDirectiveInfoFromField, maybeDeepFreeze, isIdValue, getStoreKeyName, toIdValue, isJsonValue, canUseWeakMap, getOperationDefinition, isProduction, storeKeyNameFromField, addTypenameToDocument } from 'apollo-utilities';\nimport { wrap, KeyTrie } from 'optimism';\nimport { invariant, InvariantError } from 'ts-invariant';\n\nvar haveWarned = false;\nfunction shouldWarn() {\n var answer = !haveWarned;\n if (!isTest()) {\n haveWarned = true;\n }\n return answer;\n}\nvar HeuristicFragmentMatcher = (function () {\n function HeuristicFragmentMatcher() {\n }\n HeuristicFragmentMatcher.prototype.ensureReady = function () {\n return Promise.resolve();\n };\n HeuristicFragmentMatcher.prototype.canBypassInit = function () {\n return true;\n };\n HeuristicFragmentMatcher.prototype.match = function (idValue, typeCondition, context) {\n var obj = context.store.get(idValue.id);\n var isRootQuery = idValue.id === 'ROOT_QUERY';\n if (!obj) {\n return isRootQuery;\n }\n var _a = obj.__typename, __typename = _a === void 0 ? isRootQuery && 'Query' : _a;\n if (!__typename) {\n if (shouldWarn()) {\n process.env.NODE_ENV === \"production\" || invariant.warn(\"You're using fragments in your queries, but either don't have the addTypename:\\n true option set in Apollo Client, or you are trying to write a fragment to the store without the __typename.\\n Please turn on the addTypename option and include __typename when writing fragments so that Apollo Client\\n can accurately match fragments.\");\n process.env.NODE_ENV === \"production\" || invariant.warn('Could not find __typename on Fragment ', typeCondition, obj);\n process.env.NODE_ENV === \"production\" || invariant.warn(\"DEPRECATION WARNING: using fragments without __typename is unsupported behavior \" +\n \"and will be removed in future versions of Apollo client. You should fix this and set addTypename to true now.\");\n }\n return 'heuristic';\n }\n if (__typename === typeCondition) {\n return true;\n }\n if (shouldWarn()) {\n process.env.NODE_ENV === \"production\" || invariant.error('You are using the simple (heuristic) fragment matcher, but your ' +\n 'queries contain union or interface types. Apollo Client will not be ' +\n 'able to accurately map fragments. To make this error go away, use ' +\n 'the `IntrospectionFragmentMatcher` as described in the docs: ' +\n 'https://www.apollographql.com/docs/react/advanced/fragments.html#fragment-matcher');\n }\n return 'heuristic';\n };\n return HeuristicFragmentMatcher;\n}());\nvar IntrospectionFragmentMatcher = (function () {\n function IntrospectionFragmentMatcher(options) {\n if (options && options.introspectionQueryResultData) {\n this.possibleTypesMap = this.parseIntrospectionResult(options.introspectionQueryResultData);\n this.isReady = true;\n }\n else {\n this.isReady = false;\n }\n this.match = this.match.bind(this);\n }\n IntrospectionFragmentMatcher.prototype.match = function (idValue, typeCondition, context) {\n process.env.NODE_ENV === \"production\" ? invariant(this.isReady, 1) : invariant(this.isReady, 'FragmentMatcher.match() was called before FragmentMatcher.init()');\n var obj = context.store.get(idValue.id);\n var isRootQuery = idValue.id === 'ROOT_QUERY';\n if (!obj) {\n return isRootQuery;\n }\n var _a = obj.__typename, __typename = _a === void 0 ? isRootQuery && 'Query' : _a;\n process.env.NODE_ENV === \"production\" ? invariant(__typename, 2) : invariant(__typename, \"Cannot match fragment because __typename property is missing: \" + JSON.stringify(obj));\n if (__typename === typeCondition) {\n return true;\n }\n var implementingTypes = this.possibleTypesMap[typeCondition];\n if (__typename &&\n implementingTypes &&\n implementingTypes.indexOf(__typename) > -1) {\n return true;\n }\n return false;\n };\n IntrospectionFragmentMatcher.prototype.parseIntrospectionResult = function (introspectionResultData) {\n var typeMap = {};\n introspectionResultData.__schema.types.forEach(function (type) {\n if (type.kind === 'UNION' || type.kind === 'INTERFACE') {\n typeMap[type.name] = type.possibleTypes.map(function (implementingType) { return implementingType.name; });\n }\n });\n return typeMap;\n };\n return IntrospectionFragmentMatcher;\n}());\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar DepTrackingCache = (function () {\n function DepTrackingCache(data) {\n var _this = this;\n if (data === void 0) { data = Object.create(null); }\n this.data = data;\n this.depend = wrap(function (dataId) { return _this.data[dataId]; }, {\n disposable: true,\n makeCacheKey: function (dataId) {\n return dataId;\n },\n });\n }\n DepTrackingCache.prototype.toObject = function () {\n return this.data;\n };\n DepTrackingCache.prototype.get = function (dataId) {\n this.depend(dataId);\n return this.data[dataId];\n };\n DepTrackingCache.prototype.set = function (dataId, value) {\n var oldValue = this.data[dataId];\n if (value !== oldValue) {\n this.data[dataId] = value;\n this.depend.dirty(dataId);\n }\n };\n DepTrackingCache.prototype.delete = function (dataId) {\n if (hasOwn.call(this.data, dataId)) {\n delete this.data[dataId];\n this.depend.dirty(dataId);\n }\n };\n DepTrackingCache.prototype.clear = function () {\n this.replace(null);\n };\n DepTrackingCache.prototype.replace = function (newData) {\n var _this = this;\n if (newData) {\n Object.keys(newData).forEach(function (dataId) {\n _this.set(dataId, newData[dataId]);\n });\n Object.keys(this.data).forEach(function (dataId) {\n if (!hasOwn.call(newData, dataId)) {\n _this.delete(dataId);\n }\n });\n }\n else {\n Object.keys(this.data).forEach(function (dataId) {\n _this.delete(dataId);\n });\n }\n };\n return DepTrackingCache;\n}());\nfunction defaultNormalizedCacheFactory(seed) {\n return new DepTrackingCache(seed);\n}\n\nvar StoreReader = (function () {\n function StoreReader(_a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, _c = _b.cacheKeyRoot, cacheKeyRoot = _c === void 0 ? new KeyTrie(canUseWeakMap) : _c, _d = _b.freezeResults, freezeResults = _d === void 0 ? false : _d;\n var _e = this, executeStoreQuery = _e.executeStoreQuery, executeSelectionSet = _e.executeSelectionSet, executeSubSelectedArray = _e.executeSubSelectedArray;\n this.freezeResults = freezeResults;\n this.executeStoreQuery = wrap(function (options) {\n return executeStoreQuery.call(_this, options);\n }, {\n makeCacheKey: function (_a) {\n var query = _a.query, rootValue = _a.rootValue, contextValue = _a.contextValue, variableValues = _a.variableValues, fragmentMatcher = _a.fragmentMatcher;\n if (contextValue.store instanceof DepTrackingCache) {\n return cacheKeyRoot.lookup(contextValue.store, query, fragmentMatcher, JSON.stringify(variableValues), rootValue.id);\n }\n }\n });\n this.executeSelectionSet = wrap(function (options) {\n return executeSelectionSet.call(_this, options);\n }, {\n makeCacheKey: function (_a) {\n var selectionSet = _a.selectionSet, rootValue = _a.rootValue, execContext = _a.execContext;\n if (execContext.contextValue.store instanceof DepTrackingCache) {\n return cacheKeyRoot.lookup(execContext.contextValue.store, selectionSet, execContext.fragmentMatcher, JSON.stringify(execContext.variableValues), rootValue.id);\n }\n }\n });\n this.executeSubSelectedArray = wrap(function (options) {\n return executeSubSelectedArray.call(_this, options);\n }, {\n makeCacheKey: function (_a) {\n var field = _a.field, array = _a.array, execContext = _a.execContext;\n if (execContext.contextValue.store instanceof DepTrackingCache) {\n return cacheKeyRoot.lookup(execContext.contextValue.store, field, array, JSON.stringify(execContext.variableValues));\n }\n }\n });\n }\n StoreReader.prototype.readQueryFromStore = function (options) {\n return this.diffQueryAgainstStore(__assign(__assign({}, options), { returnPartialData: false })).result;\n };\n StoreReader.prototype.diffQueryAgainstStore = function (_a) {\n var store = _a.store, query = _a.query, variables = _a.variables, previousResult = _a.previousResult, _b = _a.returnPartialData, returnPartialData = _b === void 0 ? true : _b, _c = _a.rootId, rootId = _c === void 0 ? 'ROOT_QUERY' : _c, fragmentMatcherFunction = _a.fragmentMatcherFunction, config = _a.config;\n var queryDefinition = getQueryDefinition(query);\n variables = assign({}, getDefaultValues(queryDefinition), variables);\n var context = {\n store: store,\n dataIdFromObject: config && config.dataIdFromObject,\n cacheRedirects: (config && config.cacheRedirects) || {},\n };\n var execResult = this.executeStoreQuery({\n query: query,\n rootValue: {\n type: 'id',\n id: rootId,\n generated: true,\n typename: 'Query',\n },\n contextValue: context,\n variableValues: variables,\n fragmentMatcher: fragmentMatcherFunction,\n });\n var hasMissingFields = execResult.missing && execResult.missing.length > 0;\n if (hasMissingFields && !returnPartialData) {\n execResult.missing.forEach(function (info) {\n if (info.tolerable)\n return;\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(8) : new InvariantError(\"Can't find field \" + info.fieldName + \" on object \" + JSON.stringify(info.object, null, 2) + \".\");\n });\n }\n if (previousResult) {\n if (isEqual(previousResult, execResult.result)) {\n execResult.result = previousResult;\n }\n }\n return {\n result: execResult.result,\n complete: !hasMissingFields,\n };\n };\n StoreReader.prototype.executeStoreQuery = function (_a) {\n var query = _a.query, rootValue = _a.rootValue, contextValue = _a.contextValue, variableValues = _a.variableValues, _b = _a.fragmentMatcher, fragmentMatcher = _b === void 0 ? defaultFragmentMatcher : _b;\n var mainDefinition = getMainDefinition(query);\n var fragments = getFragmentDefinitions(query);\n var fragmentMap = createFragmentMap(fragments);\n var execContext = {\n query: query,\n fragmentMap: fragmentMap,\n contextValue: contextValue,\n variableValues: variableValues,\n fragmentMatcher: fragmentMatcher,\n };\n return this.executeSelectionSet({\n selectionSet: mainDefinition.selectionSet,\n rootValue: rootValue,\n execContext: execContext,\n });\n };\n StoreReader.prototype.executeSelectionSet = function (_a) {\n var _this = this;\n var selectionSet = _a.selectionSet, rootValue = _a.rootValue, execContext = _a.execContext;\n var fragmentMap = execContext.fragmentMap, contextValue = execContext.contextValue, variables = execContext.variableValues;\n var finalResult = { result: null };\n var objectsToMerge = [];\n var object = contextValue.store.get(rootValue.id);\n var typename = (object && object.__typename) ||\n (rootValue.id === 'ROOT_QUERY' && 'Query') ||\n void 0;\n function handleMissing(result) {\n var _a;\n if (result.missing) {\n finalResult.missing = finalResult.missing || [];\n (_a = finalResult.missing).push.apply(_a, result.missing);\n }\n return result.result;\n }\n selectionSet.selections.forEach(function (selection) {\n var _a;\n if (!shouldInclude(selection, variables)) {\n return;\n }\n if (isField(selection)) {\n var fieldResult = handleMissing(_this.executeField(object, typename, selection, execContext));\n if (typeof fieldResult !== 'undefined') {\n objectsToMerge.push((_a = {},\n _a[resultKeyNameFromField(selection)] = fieldResult,\n _a));\n }\n }\n else {\n var fragment = void 0;\n if (isInlineFragment(selection)) {\n fragment = selection;\n }\n else {\n fragment = fragmentMap[selection.name.value];\n if (!fragment) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(9) : new InvariantError(\"No fragment named \" + selection.name.value);\n }\n }\n var typeCondition = fragment.typeCondition && fragment.typeCondition.name.value;\n var match = !typeCondition ||\n execContext.fragmentMatcher(rootValue, typeCondition, contextValue);\n if (match) {\n var fragmentExecResult = _this.executeSelectionSet({\n selectionSet: fragment.selectionSet,\n rootValue: rootValue,\n execContext: execContext,\n });\n if (match === 'heuristic' && fragmentExecResult.missing) {\n fragmentExecResult = __assign(__assign({}, fragmentExecResult), { missing: fragmentExecResult.missing.map(function (info) {\n return __assign(__assign({}, info), { tolerable: true });\n }) });\n }\n objectsToMerge.push(handleMissing(fragmentExecResult));\n }\n }\n });\n finalResult.result = mergeDeepArray(objectsToMerge);\n if (this.freezeResults && process.env.NODE_ENV !== 'production') {\n Object.freeze(finalResult.result);\n }\n return finalResult;\n };\n StoreReader.prototype.executeField = function (object, typename, field, execContext) {\n var variables = execContext.variableValues, contextValue = execContext.contextValue;\n var fieldName = field.name.value;\n var args = argumentsObjectFromField(field, variables);\n var info = {\n resultKey: resultKeyNameFromField(field),\n directives: getDirectiveInfoFromField(field, variables),\n };\n var readStoreResult = readStoreResolver(object, typename, fieldName, args, contextValue, info);\n if (Array.isArray(readStoreResult.result)) {\n return this.combineExecResults(readStoreResult, this.executeSubSelectedArray({\n field: field,\n array: readStoreResult.result,\n execContext: execContext,\n }));\n }\n if (!field.selectionSet) {\n assertSelectionSetForIdValue(field, readStoreResult.result);\n if (this.freezeResults && process.env.NODE_ENV !== 'production') {\n maybeDeepFreeze(readStoreResult);\n }\n return readStoreResult;\n }\n if (readStoreResult.result == null) {\n return readStoreResult;\n }\n return this.combineExecResults(readStoreResult, this.executeSelectionSet({\n selectionSet: field.selectionSet,\n rootValue: readStoreResult.result,\n execContext: execContext,\n }));\n };\n StoreReader.prototype.combineExecResults = function () {\n var execResults = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n execResults[_i] = arguments[_i];\n }\n var missing;\n execResults.forEach(function (execResult) {\n if (execResult.missing) {\n missing = missing || [];\n missing.push.apply(missing, execResult.missing);\n }\n });\n return {\n result: execResults.pop().result,\n missing: missing,\n };\n };\n StoreReader.prototype.executeSubSelectedArray = function (_a) {\n var _this = this;\n var field = _a.field, array = _a.array, execContext = _a.execContext;\n var missing;\n function handleMissing(childResult) {\n if (childResult.missing) {\n missing = missing || [];\n missing.push.apply(missing, childResult.missing);\n }\n return childResult.result;\n }\n array = array.map(function (item) {\n if (item === null) {\n return null;\n }\n if (Array.isArray(item)) {\n return handleMissing(_this.executeSubSelectedArray({\n field: field,\n array: item,\n execContext: execContext,\n }));\n }\n if (field.selectionSet) {\n return handleMissing(_this.executeSelectionSet({\n selectionSet: field.selectionSet,\n rootValue: item,\n execContext: execContext,\n }));\n }\n assertSelectionSetForIdValue(field, item);\n return item;\n });\n if (this.freezeResults && process.env.NODE_ENV !== 'production') {\n Object.freeze(array);\n }\n return { result: array, missing: missing };\n };\n return StoreReader;\n}());\nfunction assertSelectionSetForIdValue(field, value) {\n if (!field.selectionSet && isIdValue(value)) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(10) : new InvariantError(\"Missing selection set for object of type \" + value.typename + \" returned for query field \" + field.name.value);\n }\n}\nfunction defaultFragmentMatcher() {\n return true;\n}\nfunction assertIdValue(idValue) {\n process.env.NODE_ENV === \"production\" ? invariant(isIdValue(idValue), 11) : invariant(isIdValue(idValue), \"Encountered a sub-selection on the query, but the store doesn't have an object reference. This should never happen during normal use unless you have custom code that is directly manipulating the store; please file an issue.\");\n}\nfunction readStoreResolver(object, typename, fieldName, args, context, _a) {\n var resultKey = _a.resultKey, directives = _a.directives;\n var storeKeyName = fieldName;\n if (args || directives) {\n storeKeyName = getStoreKeyName(storeKeyName, args, directives);\n }\n var fieldValue = void 0;\n if (object) {\n fieldValue = object[storeKeyName];\n if (typeof fieldValue === 'undefined' &&\n context.cacheRedirects &&\n typeof typename === 'string') {\n var type = context.cacheRedirects[typename];\n if (type) {\n var resolver = type[fieldName];\n if (resolver) {\n fieldValue = resolver(object, args, {\n getCacheKey: function (storeObj) {\n var id = context.dataIdFromObject(storeObj);\n return id && toIdValue({\n id: id,\n typename: storeObj.__typename,\n });\n },\n });\n }\n }\n }\n }\n if (typeof fieldValue === 'undefined') {\n return {\n result: fieldValue,\n missing: [{\n object: object,\n fieldName: storeKeyName,\n tolerable: false,\n }],\n };\n }\n if (isJsonValue(fieldValue)) {\n fieldValue = fieldValue.json;\n }\n return {\n result: fieldValue,\n };\n}\n\nvar ObjectCache = (function () {\n function ObjectCache(data) {\n if (data === void 0) { data = Object.create(null); }\n this.data = data;\n }\n ObjectCache.prototype.toObject = function () {\n return this.data;\n };\n ObjectCache.prototype.get = function (dataId) {\n return this.data[dataId];\n };\n ObjectCache.prototype.set = function (dataId, value) {\n this.data[dataId] = value;\n };\n ObjectCache.prototype.delete = function (dataId) {\n this.data[dataId] = void 0;\n };\n ObjectCache.prototype.clear = function () {\n this.data = Object.create(null);\n };\n ObjectCache.prototype.replace = function (newData) {\n this.data = newData || Object.create(null);\n };\n return ObjectCache;\n}());\nfunction defaultNormalizedCacheFactory$1(seed) {\n return new ObjectCache(seed);\n}\n\nvar WriteError = (function (_super) {\n __extends(WriteError, _super);\n function WriteError() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'WriteError';\n return _this;\n }\n return WriteError;\n}(Error));\nfunction enhanceErrorWithDocument(error, document) {\n var enhancedError = new WriteError(\"Error writing result to store for query:\\n \" + JSON.stringify(document));\n enhancedError.message += '\\n' + error.message;\n enhancedError.stack = error.stack;\n return enhancedError;\n}\nvar StoreWriter = (function () {\n function StoreWriter() {\n }\n StoreWriter.prototype.writeQueryToStore = function (_a) {\n var query = _a.query, result = _a.result, _b = _a.store, store = _b === void 0 ? defaultNormalizedCacheFactory() : _b, variables = _a.variables, dataIdFromObject = _a.dataIdFromObject, fragmentMatcherFunction = _a.fragmentMatcherFunction;\n return this.writeResultToStore({\n dataId: 'ROOT_QUERY',\n result: result,\n document: query,\n store: store,\n variables: variables,\n dataIdFromObject: dataIdFromObject,\n fragmentMatcherFunction: fragmentMatcherFunction,\n });\n };\n StoreWriter.prototype.writeResultToStore = function (_a) {\n var dataId = _a.dataId, result = _a.result, document = _a.document, _b = _a.store, store = _b === void 0 ? defaultNormalizedCacheFactory() : _b, variables = _a.variables, dataIdFromObject = _a.dataIdFromObject, fragmentMatcherFunction = _a.fragmentMatcherFunction;\n var operationDefinition = getOperationDefinition(document);\n try {\n return this.writeSelectionSetToStore({\n result: result,\n dataId: dataId,\n selectionSet: operationDefinition.selectionSet,\n context: {\n store: store,\n processedData: {},\n variables: assign({}, getDefaultValues(operationDefinition), variables),\n dataIdFromObject: dataIdFromObject,\n fragmentMap: createFragmentMap(getFragmentDefinitions(document)),\n fragmentMatcherFunction: fragmentMatcherFunction,\n },\n });\n }\n catch (e) {\n throw enhanceErrorWithDocument(e, document);\n }\n };\n StoreWriter.prototype.writeSelectionSetToStore = function (_a) {\n var _this = this;\n var result = _a.result, dataId = _a.dataId, selectionSet = _a.selectionSet, context = _a.context;\n var variables = context.variables, store = context.store, fragmentMap = context.fragmentMap;\n selectionSet.selections.forEach(function (selection) {\n var _a;\n if (!shouldInclude(selection, variables)) {\n return;\n }\n if (isField(selection)) {\n var resultFieldKey = resultKeyNameFromField(selection);\n var value = result[resultFieldKey];\n if (typeof value !== 'undefined') {\n _this.writeFieldToStore({\n dataId: dataId,\n value: value,\n field: selection,\n context: context,\n });\n }\n else {\n var isDefered = false;\n var isClient = false;\n if (selection.directives && selection.directives.length) {\n isDefered = selection.directives.some(function (directive) { return directive.name && directive.name.value === 'defer'; });\n isClient = selection.directives.some(function (directive) { return directive.name && directive.name.value === 'client'; });\n }\n if (!isDefered && !isClient && context.fragmentMatcherFunction) {\n process.env.NODE_ENV === \"production\" || invariant.warn(\"Missing field \" + resultFieldKey + \" in \" + JSON.stringify(result, null, 2).substring(0, 100));\n }\n }\n }\n else {\n var fragment = void 0;\n if (isInlineFragment(selection)) {\n fragment = selection;\n }\n else {\n fragment = (fragmentMap || {})[selection.name.value];\n process.env.NODE_ENV === \"production\" ? invariant(fragment, 3) : invariant(fragment, \"No fragment named \" + selection.name.value + \".\");\n }\n var matches = true;\n if (context.fragmentMatcherFunction && fragment.typeCondition) {\n var id = dataId || 'self';\n var idValue = toIdValue({ id: id, typename: undefined });\n var fakeContext = {\n store: new ObjectCache((_a = {}, _a[id] = result, _a)),\n cacheRedirects: {},\n };\n var match = context.fragmentMatcherFunction(idValue, fragment.typeCondition.name.value, fakeContext);\n if (!isProduction() && match === 'heuristic') {\n process.env.NODE_ENV === \"production\" || invariant.error('WARNING: heuristic fragment matching going on!');\n }\n matches = !!match;\n }\n if (matches) {\n _this.writeSelectionSetToStore({\n result: result,\n selectionSet: fragment.selectionSet,\n dataId: dataId,\n context: context,\n });\n }\n }\n });\n return store;\n };\n StoreWriter.prototype.writeFieldToStore = function (_a) {\n var _b;\n var field = _a.field, value = _a.value, dataId = _a.dataId, context = _a.context;\n var variables = context.variables, dataIdFromObject = context.dataIdFromObject, store = context.store;\n var storeValue;\n var storeObject;\n var storeFieldName = storeKeyNameFromField(field, variables);\n if (!field.selectionSet || value === null) {\n storeValue =\n value != null && typeof value === 'object'\n ?\n { type: 'json', json: value }\n :\n value;\n }\n else if (Array.isArray(value)) {\n var generatedId = dataId + \".\" + storeFieldName;\n storeValue = this.processArrayValue(value, generatedId, field.selectionSet, context);\n }\n else {\n var valueDataId = dataId + \".\" + storeFieldName;\n var generated = true;\n if (!isGeneratedId(valueDataId)) {\n valueDataId = '$' + valueDataId;\n }\n if (dataIdFromObject) {\n var semanticId = dataIdFromObject(value);\n process.env.NODE_ENV === \"production\" ? invariant(!semanticId || !isGeneratedId(semanticId), 4) : invariant(!semanticId || !isGeneratedId(semanticId), 'IDs returned by dataIdFromObject cannot begin with the \"$\" character.');\n if (semanticId ||\n (typeof semanticId === 'number' && semanticId === 0)) {\n valueDataId = semanticId;\n generated = false;\n }\n }\n if (!isDataProcessed(valueDataId, field, context.processedData)) {\n this.writeSelectionSetToStore({\n dataId: valueDataId,\n result: value,\n selectionSet: field.selectionSet,\n context: context,\n });\n }\n var typename = value.__typename;\n storeValue = toIdValue({ id: valueDataId, typename: typename }, generated);\n storeObject = store.get(dataId);\n var escapedId = storeObject && storeObject[storeFieldName];\n if (escapedId !== storeValue && isIdValue(escapedId)) {\n var hadTypename = escapedId.typename !== undefined;\n var hasTypename = typename !== undefined;\n var typenameChanged = hadTypename && hasTypename && escapedId.typename !== typename;\n process.env.NODE_ENV === \"production\" ? invariant(!generated || escapedId.generated || typenameChanged, 5) : invariant(!generated || escapedId.generated || typenameChanged, \"Store error: the application attempted to write an object with no provided id but the store already contains an id of \" + escapedId.id + \" for this object. The selectionSet that was trying to be written is:\\n\" + JSON.stringify(field));\n process.env.NODE_ENV === \"production\" ? invariant(!hadTypename || hasTypename, 6) : invariant(!hadTypename || hasTypename, \"Store error: the application attempted to write an object with no provided typename but the store already contains an object with typename of \" + escapedId.typename + \" for the object of id \" + escapedId.id + \". The selectionSet that was trying to be written is:\\n\" + JSON.stringify(field));\n if (escapedId.generated) {\n if (typenameChanged) {\n if (!generated) {\n store.delete(escapedId.id);\n }\n }\n else {\n mergeWithGenerated(escapedId.id, storeValue.id, store);\n }\n }\n }\n }\n storeObject = store.get(dataId);\n if (!storeObject || !isEqual(storeValue, storeObject[storeFieldName])) {\n store.set(dataId, __assign(__assign({}, storeObject), (_b = {}, _b[storeFieldName] = storeValue, _b)));\n }\n };\n StoreWriter.prototype.processArrayValue = function (value, generatedId, selectionSet, context) {\n var _this = this;\n return value.map(function (item, index) {\n if (item === null) {\n return null;\n }\n var itemDataId = generatedId + \".\" + index;\n if (Array.isArray(item)) {\n return _this.processArrayValue(item, itemDataId, selectionSet, context);\n }\n var generated = true;\n if (context.dataIdFromObject) {\n var semanticId = context.dataIdFromObject(item);\n if (semanticId) {\n itemDataId = semanticId;\n generated = false;\n }\n }\n if (!isDataProcessed(itemDataId, selectionSet, context.processedData)) {\n _this.writeSelectionSetToStore({\n dataId: itemDataId,\n result: item,\n selectionSet: selectionSet,\n context: context,\n });\n }\n return toIdValue({ id: itemDataId, typename: item.__typename }, generated);\n });\n };\n return StoreWriter;\n}());\nfunction isGeneratedId(id) {\n return id[0] === '$';\n}\nfunction mergeWithGenerated(generatedKey, realKey, cache) {\n if (generatedKey === realKey) {\n return false;\n }\n var generated = cache.get(generatedKey);\n var real = cache.get(realKey);\n var madeChanges = false;\n Object.keys(generated).forEach(function (key) {\n var value = generated[key];\n var realValue = real[key];\n if (isIdValue(value) &&\n isGeneratedId(value.id) &&\n isIdValue(realValue) &&\n !isEqual(value, realValue) &&\n mergeWithGenerated(value.id, realValue.id, cache)) {\n madeChanges = true;\n }\n });\n cache.delete(generatedKey);\n var newRealValue = __assign(__assign({}, generated), real);\n if (isEqual(newRealValue, real)) {\n return madeChanges;\n }\n cache.set(realKey, newRealValue);\n return true;\n}\nfunction isDataProcessed(dataId, field, processedData) {\n if (!processedData) {\n return false;\n }\n if (processedData[dataId]) {\n if (processedData[dataId].indexOf(field) >= 0) {\n return true;\n }\n else {\n processedData[dataId].push(field);\n }\n }\n else {\n processedData[dataId] = [field];\n }\n return false;\n}\n\nvar defaultConfig = {\n fragmentMatcher: new HeuristicFragmentMatcher(),\n dataIdFromObject: defaultDataIdFromObject,\n addTypename: true,\n resultCaching: true,\n freezeResults: false,\n};\nfunction defaultDataIdFromObject(result) {\n if (result.__typename) {\n if (result.id !== undefined) {\n return result.__typename + \":\" + result.id;\n }\n if (result._id !== undefined) {\n return result.__typename + \":\" + result._id;\n }\n }\n return null;\n}\nvar hasOwn$1 = Object.prototype.hasOwnProperty;\nvar OptimisticCacheLayer = (function (_super) {\n __extends(OptimisticCacheLayer, _super);\n function OptimisticCacheLayer(optimisticId, parent, transaction) {\n var _this = _super.call(this, Object.create(null)) || this;\n _this.optimisticId = optimisticId;\n _this.parent = parent;\n _this.transaction = transaction;\n return _this;\n }\n OptimisticCacheLayer.prototype.toObject = function () {\n return __assign(__assign({}, this.parent.toObject()), this.data);\n };\n OptimisticCacheLayer.prototype.get = function (dataId) {\n return hasOwn$1.call(this.data, dataId)\n ? this.data[dataId]\n : this.parent.get(dataId);\n };\n return OptimisticCacheLayer;\n}(ObjectCache));\nvar InMemoryCache = (function (_super) {\n __extends(InMemoryCache, _super);\n function InMemoryCache(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this) || this;\n _this.watches = new Set();\n _this.typenameDocumentCache = new Map();\n _this.cacheKeyRoot = new KeyTrie(canUseWeakMap);\n _this.silenceBroadcast = false;\n _this.config = __assign(__assign({}, defaultConfig), config);\n if (_this.config.customResolvers) {\n process.env.NODE_ENV === \"production\" || invariant.warn('customResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating customResolvers in the next major version.');\n _this.config.cacheRedirects = _this.config.customResolvers;\n }\n if (_this.config.cacheResolvers) {\n process.env.NODE_ENV === \"production\" || invariant.warn('cacheResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating cacheResolvers in the next major version.');\n _this.config.cacheRedirects = _this.config.cacheResolvers;\n }\n _this.addTypename = !!_this.config.addTypename;\n _this.data = _this.config.resultCaching\n ? new DepTrackingCache()\n : new ObjectCache();\n _this.optimisticData = _this.data;\n _this.storeWriter = new StoreWriter();\n _this.storeReader = new StoreReader({\n cacheKeyRoot: _this.cacheKeyRoot,\n freezeResults: config.freezeResults,\n });\n var cache = _this;\n var maybeBroadcastWatch = cache.maybeBroadcastWatch;\n _this.maybeBroadcastWatch = wrap(function (c) {\n return maybeBroadcastWatch.call(_this, c);\n }, {\n makeCacheKey: function (c) {\n if (c.optimistic) {\n return;\n }\n if (c.previousResult) {\n return;\n }\n if (cache.data instanceof DepTrackingCache) {\n return cache.cacheKeyRoot.lookup(c.query, JSON.stringify(c.variables));\n }\n }\n });\n return _this;\n }\n InMemoryCache.prototype.restore = function (data) {\n if (data)\n this.data.replace(data);\n return this;\n };\n InMemoryCache.prototype.extract = function (optimistic) {\n if (optimistic === void 0) { optimistic = false; }\n return (optimistic ? this.optimisticData : this.data).toObject();\n };\n InMemoryCache.prototype.read = function (options) {\n if (typeof options.rootId === 'string' &&\n typeof this.data.get(options.rootId) === 'undefined') {\n return null;\n }\n var fragmentMatcher = this.config.fragmentMatcher;\n var fragmentMatcherFunction = fragmentMatcher && fragmentMatcher.match;\n return this.storeReader.readQueryFromStore({\n store: options.optimistic ? this.optimisticData : this.data,\n query: this.transformDocument(options.query),\n variables: options.variables,\n rootId: options.rootId,\n fragmentMatcherFunction: fragmentMatcherFunction,\n previousResult: options.previousResult,\n config: this.config,\n }) || null;\n };\n InMemoryCache.prototype.write = function (write) {\n var fragmentMatcher = this.config.fragmentMatcher;\n var fragmentMatcherFunction = fragmentMatcher && fragmentMatcher.match;\n this.storeWriter.writeResultToStore({\n dataId: write.dataId,\n result: write.result,\n variables: write.variables,\n document: this.transformDocument(write.query),\n store: this.data,\n dataIdFromObject: this.config.dataIdFromObject,\n fragmentMatcherFunction: fragmentMatcherFunction,\n });\n this.broadcastWatches();\n };\n InMemoryCache.prototype.diff = function (query) {\n var fragmentMatcher = this.config.fragmentMatcher;\n var fragmentMatcherFunction = fragmentMatcher && fragmentMatcher.match;\n return this.storeReader.diffQueryAgainstStore({\n store: query.optimistic ? this.optimisticData : this.data,\n query: this.transformDocument(query.query),\n variables: query.variables,\n returnPartialData: query.returnPartialData,\n previousResult: query.previousResult,\n fragmentMatcherFunction: fragmentMatcherFunction,\n config: this.config,\n });\n };\n InMemoryCache.prototype.watch = function (watch) {\n var _this = this;\n this.watches.add(watch);\n return function () {\n _this.watches.delete(watch);\n };\n };\n InMemoryCache.prototype.evict = function (query) {\n throw process.env.NODE_ENV === \"production\" ? new InvariantError(7) : new InvariantError(\"eviction is not implemented on InMemory Cache\");\n };\n InMemoryCache.prototype.reset = function () {\n this.data.clear();\n this.broadcastWatches();\n return Promise.resolve();\n };\n InMemoryCache.prototype.removeOptimistic = function (idToRemove) {\n var toReapply = [];\n var removedCount = 0;\n var layer = this.optimisticData;\n while (layer instanceof OptimisticCacheLayer) {\n if (layer.optimisticId === idToRemove) {\n ++removedCount;\n }\n else {\n toReapply.push(layer);\n }\n layer = layer.parent;\n }\n if (removedCount > 0) {\n this.optimisticData = layer;\n while (toReapply.length > 0) {\n var layer_1 = toReapply.pop();\n this.performTransaction(layer_1.transaction, layer_1.optimisticId);\n }\n this.broadcastWatches();\n }\n };\n InMemoryCache.prototype.performTransaction = function (transaction, optimisticId) {\n var _a = this, data = _a.data, silenceBroadcast = _a.silenceBroadcast;\n this.silenceBroadcast = true;\n if (typeof optimisticId === 'string') {\n this.data = this.optimisticData = new OptimisticCacheLayer(optimisticId, this.optimisticData, transaction);\n }\n try {\n transaction(this);\n }\n finally {\n this.silenceBroadcast = silenceBroadcast;\n this.data = data;\n }\n this.broadcastWatches();\n };\n InMemoryCache.prototype.recordOptimisticTransaction = function (transaction, id) {\n return this.performTransaction(transaction, id);\n };\n InMemoryCache.prototype.transformDocument = function (document) {\n if (this.addTypename) {\n var result = this.typenameDocumentCache.get(document);\n if (!result) {\n result = addTypenameToDocument(document);\n this.typenameDocumentCache.set(document, result);\n this.typenameDocumentCache.set(result, result);\n }\n return result;\n }\n return document;\n };\n InMemoryCache.prototype.broadcastWatches = function () {\n var _this = this;\n if (!this.silenceBroadcast) {\n this.watches.forEach(function (c) { return _this.maybeBroadcastWatch(c); });\n }\n };\n InMemoryCache.prototype.maybeBroadcastWatch = function (c) {\n c.callback(this.diff({\n query: c.query,\n variables: c.variables,\n previousResult: c.previousResult && c.previousResult(),\n optimistic: c.optimistic,\n }));\n };\n return InMemoryCache;\n}(ApolloCache));\n\nexport { HeuristicFragmentMatcher, InMemoryCache, IntrospectionFragmentMatcher, ObjectCache, StoreReader, StoreWriter, WriteError, assertIdValue, defaultDataIdFromObject, defaultNormalizedCacheFactory$1 as defaultNormalizedCacheFactory, enhanceErrorWithDocument };\n//# sourceMappingURL=bundle.esm.js.map\n"],"names":["queryFromPojo","obj","op","kind","operation","name","value","selectionSet","selectionSetFromObj","out","definitions","fragmentFromPojo","typename","frag","typeCondition","Array","isArray","selections","Object","keys","forEach","key","nestedSelSet","field","undefined","push","Cache","justTypenameQuery","variableDefinitions","directives","alias","arguments","ApolloCache","prototype","transformDocument","document","transformForLink","readQuery","options","optimistic","this","read","query","variables","readFragment","fragment","fragmentName","rootId","id","writeQuery","write","dataId","result","data","writeFragment","writeData","_a","typenameResult","e","__typename","dataToWrite","assign","currentContext","MISSING_VALUE","idCounter","makeSlotClass","Slot","Date","now","Math","random","toString","slice","join","hasValue","context_1","parent","slots","getValue","withValue","callback","args","thisArg","__proto__","apply","bind","context","saved","noContext","globalKey","host","defineProperty","enumerable","writable","configurable","defaultDispose","max","dispose","Infinity","map","Map","newest","oldest","has","get","entry","getEntry","older","newer","set","clean","size","delete","parentEntrySlot","reusableEmptyArray","emptySetPool","POOL_TARGET_SIZE","assert","condition","optionalMessage","Error","valueIs","a","b","len","length","valueGet","valueCopy","Entry","fn","parents","Set","childValues","dirtyChildren","dirty","recomputing","count","recompute","rememberParent","maybeReportOrphan","mightBeDirty","reallyRecompute","setDirty","reportDirty","maybeUnsubscribe","_this","forgetChildren","forgetChild","child","add","reportDirtyChild","reportCleanChild","originalChildren","recomputeNewValue","maybeSubscribe","setClean","reportClean","pop","childValue","removeDirtyChild","dc","reportOrphan","children","_value","subscribe","unsubscribe","KeyTrie","weakness","lookup","array","_i","lookupArray","node","getChildTrie","create","isObjRef","weak","WeakMap","strong","keyTrie","defaultMakeCacheKey","caches","wrap","originalFunction","cache","pow","disposable","makeCacheKey","call","clear","genericMessage","setPrototypeOf","proto","InvariantError","_super","message","framesToPop","wrapConsoleMethod","method","console","invariant","warn","error","processStub","env","process","Function","atLeastWeTried","haveWarned","shouldWarn","answer","HeuristicFragmentMatcher","ensureReady","Promise","resolve","canBypassInit","match","idValue","store","isRootQuery","hasOwn","IntrospectionFragmentMatcher","introspectionQueryResultData","possibleTypesMap","parseIntrospectionResult","isReady","implementingTypes","indexOf","introspectionResultData","typeMap","__schema","types","type","possibleTypes","implementingType","hasOwnProperty","DepTrackingCache","depend","toObject","oldValue","replace","newData","defaultNormalizedCacheFactory","seed","StoreReader","_b","_c","cacheKeyRoot","_d","freezeResults","_e","executeStoreQuery","executeSelectionSet","executeSubSelectedArray","rootValue","contextValue","variableValues","fragmentMatcher","JSON","stringify","execContext","readQueryFromStore","diffQueryAgainstStore","returnPartialData","previousResult","fragmentMatcherFunction","config","queryDefinition","dataIdFromObject","cacheRedirects","execResult","generated","hasMissingFields","missing","info","tolerable","complete","defaultFragmentMatcher","mainDefinition","fragments","fragmentMap","finalResult","objectsToMerge","object","handleMissing","selection","fieldResult","executeField","fragmentExecResult","fieldName","resultKey","readStoreResult","readStoreResolver","combineExecResults","assertSelectionSetForIdValue","execResults","childResult","item","storeKeyName","fieldValue","resolver","getCacheKey","storeObj","json","ObjectCache","WriteError","enhanceErrorWithDocument","enhancedError","stack","StoreWriter","writeQueryToStore","writeResultToStore","operationDefinition","writeSelectionSetToStore","processedData","resultFieldKey","writeFieldToStore","isDefered","isClient","some","directive","matches","fakeContext","storeValue","storeObject","storeFieldName","generatedId","processArrayValue","valueDataId","isGeneratedId","semanticId","isDataProcessed","escapedId","hadTypename","hasTypename","typenameChanged","mergeWithGenerated","index","itemDataId","generatedKey","realKey","real","madeChanges","realValue","newRealValue","defaultConfig","defaultDataIdFromObject","addTypename","resultCaching","_id","hasOwn$1","OptimisticCacheLayer","optimisticId","transaction","InMemoryCache","watches","typenameDocumentCache","silenceBroadcast","customResolvers","cacheResolvers","optimisticData","storeWriter","storeReader","maybeBroadcastWatch","c","restore","extract","broadcastWatches","diff","watch","evict","reset","removeOptimistic","idToRemove","toReapply","removedCount","layer","layer_1","performTransaction","recordOptimisticTransaction"],"sourceRoot":""}