mirror of
https://github.com/discourse/discourse.git
synced 2024-12-19 23:16:00 +08:00
140 lines
65 KiB
Diff
140 lines
65 KiB
Diff
diff --git a/dist/-private/array.d.ts.map b/dist/-private/array.d.ts.map
|
|
index aa3d9ff546e443781610002ad61b381be7ed148a..c34ce1b8d50371e14fcde9b3b0bda316c8d92909 100644
|
|
--- a/dist/-private/array.d.ts.map
|
|
+++ b/dist/-private/array.d.ts.map
|
|
@@ -1 +1 @@
|
|
-{"version":3,"file":"-private/array.d.ts","sourceRoot":"","sources":["../src/-private/array.ts"],"names":[],"mappings":"AAkDA,cAAM,YAAY,CAAC,CAAC,GAAG,OAAO;;IAC5B;;;OAGG;;;;;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;IAErE;;;;;OAKG;;;;;;;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EACd,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,EAC7B,OAAO,CAAC,EAAE,OAAO,GAChB,YAAY,CAAC,CAAC,CAAC;IAYlB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;gBAI9B,GAAG,GAAE,CAAC,EAAO;CAgF1B;AAYD,UAAU,YAAY,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;CAAG"}
|
|
\ No newline at end of file
|
|
+{"version":3,"file":"-private/array.d.ts","sourceRoot":"","sources":["../src/-private/array.ts"],"names":[],"mappings":"AAkDA,cAAM,YAAY,CAAC,CAAC,GAAG,OAAO;;IAC5B;;;OAGG;;;;;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;IAErE;;;;;OAKG;;;;;;;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EACd,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,EAC7B,OAAO,CAAC,EAAE,OAAO,GAChB,YAAY,CAAC,CAAC,CAAC;IAYlB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;gBAI9B,GAAG,GAAE,CAAC,EAAO;CAkF1B;AAYD,UAAU,YAAY,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;CAAG"}
|
|
\ No newline at end of file
|
|
diff --git a/dist/-private/array.js b/dist/-private/array.js
|
|
index 37194ae8e30a1f1554c6d441e766d890a86d06b0..728d9d52f56aecf64b87bbdfe7bf7ffd1d3a3ad2 100644
|
|
--- a/dist/-private/array.js
|
|
+++ b/dist/-private/array.js
|
|
@@ -34,6 +34,7 @@ var _collection = /*#__PURE__*/new WeakMap();
|
|
var _storages = /*#__PURE__*/new WeakMap();
|
|
var _readStorageFor = /*#__PURE__*/new WeakSet();
|
|
var _dirtyStorageFor = /*#__PURE__*/new WeakSet();
|
|
+var _dirtyCollection = /*#__PURE__*/new WeakSet();
|
|
class TrackedArray {
|
|
/**
|
|
* Creates an array from an iterable object.
|
|
@@ -54,6 +55,7 @@ class TrackedArray {
|
|
return new TrackedArray(arr);
|
|
}
|
|
constructor(arr = []) {
|
|
+ _classPrivateMethodInitSpec(this, _dirtyCollection);
|
|
_classPrivateMethodInitSpec(this, _dirtyStorageFor);
|
|
_classPrivateMethodInitSpec(this, _readStorageFor);
|
|
_classPrivateFieldInitSpec(this, _collection, {
|
|
@@ -93,11 +95,8 @@ class TrackedArray {
|
|
set(target, prop, value /*, _receiver */) {
|
|
target[prop] = value;
|
|
let index = convertToInt(prop);
|
|
- if (index !== null) {
|
|
- _classPrivateMethodGet(self, _dirtyStorageFor, _dirtyStorageFor2).call(self, index);
|
|
- setValue(_classPrivateFieldGet(self, _collection), null);
|
|
- } else if (prop === 'length') {
|
|
- setValue(_classPrivateFieldGet(self, _collection), null);
|
|
+ if (index !== null || prop === 'length') {
|
|
+ _classPrivateMethodGet(self, _dirtyCollection, _dirtyCollection2).call(self);
|
|
}
|
|
return true;
|
|
},
|
|
@@ -127,11 +126,9 @@ function _readStorageFor2(index) {
|
|
}
|
|
getValue(storage);
|
|
}
|
|
-function _dirtyStorageFor2(index) {
|
|
- const storage = _classPrivateFieldGet(this, _storages).get(index);
|
|
- if (storage) {
|
|
- setValue(storage, null);
|
|
- }
|
|
+function _dirtyCollection2() {
|
|
+ setValue(_classPrivateFieldGet(this, _collection), null);
|
|
+ _classPrivateFieldGet(this, _storages).clear();
|
|
}
|
|
|
|
// Ensure instanceof works correctly
|
|
diff --git a/dist/-private/array.js.map b/dist/-private/array.js.map
|
|
index c363292ff9aeb7c17969715b667566eb89176d94..92943c02d0e7ab174d206a2905432dd784f186cc 100644
|
|
--- a/dist/-private/array.js.map
|
|
+++ b/dist/-private/array.js.map
|
|
@@ -1 +1 @@
|
|
-{"version":3,"file":"array.js","sources":["../../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","../../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js","../../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","../../src/-private/array.ts"],"sourcesContent":["export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}","/* eslint-disable @typescript-eslint/no-explicit-any */\n// Unfortunately, TypeScript's ability to do inference *or* type-checking in a\n// `Proxy`'s body is very limited, so we have to use a number of casts `as any`\n// to make the internal accesses work. The type safety of these is guaranteed at\n// the *call site* instead of within the body: you cannot do `Array.blah` in TS,\n// and it will blow up in JS in exactly the same way, so it is safe to assume\n// that properties within the getter have the correct type in TS.\n\nimport {\n TrackedStorage,\n createStorage,\n getValue,\n setValue,\n} from 'ember-tracked-storage-polyfill';\n\nconst ARRAY_GETTER_METHODS = new Set<string | symbol | number>([\n Symbol.iterator,\n 'concat',\n 'entries',\n 'every',\n 'fill',\n 'filter',\n 'find',\n 'findIndex',\n 'flat',\n 'flatMap',\n 'forEach',\n 'includes',\n 'indexOf',\n 'join',\n 'keys',\n 'lastIndexOf',\n 'map',\n 'reduce',\n 'reduceRight',\n 'slice',\n 'some',\n 'values',\n]);\n\nfunction convertToInt(prop: number | string | symbol): number | null {\n if (typeof prop === 'symbol') return null;\n\n const num = Number(prop);\n\n if (isNaN(num)) return null;\n\n return num % 1 === 0 ? num : null;\n}\n\nclass TrackedArray<T = unknown> {\n /**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n */\n static from<T>(iterable: Iterable<T> | ArrayLike<T>): TrackedArray<T>;\n\n /**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n * @param mapfn A mapping function to call on every element of the array.\n * @param thisArg Value of 'this' used to invoke the mapfn.\n */\n static from<T, U>(\n iterable: Iterable<T> | ArrayLike<T>,\n mapfn: (v: T, k: number) => U,\n thisArg?: unknown\n ): TrackedArray<U>;\n\n static from<T, U>(\n iterable: Iterable<T> | ArrayLike<T>,\n mapfn?: (v: T, k: number) => U,\n thisArg?: unknown\n ): TrackedArray<T> | TrackedArray<U> {\n return mapfn\n ? new TrackedArray(Array.from(iterable, mapfn, thisArg))\n : new TrackedArray(Array.from(iterable));\n }\n\n static of<T>(...arr: T[]): TrackedArray<T> {\n return new TrackedArray(arr);\n }\n\n constructor(arr: T[] = []) {\n let clone = arr.slice();\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let self = this;\n\n let boundFns = new Map();\n\n return new Proxy(clone, {\n get(target, prop /*, _receiver */) {\n let index = convertToInt(prop);\n\n if (index !== null) {\n self.#readStorageFor(index);\n getValue(self.#collection);\n\n return target[index];\n } else if (prop === 'length') {\n getValue(self.#collection);\n } else if (ARRAY_GETTER_METHODS.has(prop)) {\n let fn = boundFns.get(prop);\n\n if (fn === undefined) {\n fn = (...args: unknown[]) => {\n getValue(self.#collection);\n return (target as any)[prop](...args);\n };\n\n boundFns.set(prop, fn);\n }\n\n return fn;\n }\n\n return (target as any)[prop];\n },\n\n set(target, prop, value /*, _receiver */) {\n (target as any)[prop] = value;\n\n let index = convertToInt(prop);\n\n if (index !== null) {\n self.#dirtyStorageFor(index);\n setValue(self.#collection, null);\n } else if (prop === 'length') {\n setValue(self.#collection, null);\n }\n\n return true;\n },\n\n getPrototypeOf() {\n return TrackedArray.prototype;\n },\n }) as TrackedArray<T>;\n }\n\n #collection = createStorage(null, () => false);\n\n #storages = new Map<number, TrackedStorage<null>>();\n\n #readStorageFor(index: number) {\n const storages = this.#storages;\n let storage = storages.get(index);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(index, storage);\n }\n\n getValue(storage);\n }\n\n #dirtyStorageFor(index: number): void {\n const storage = this.#storages.get(index);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n}\n\n// This rule is correctly in the general case, but it doesn't understand\n// declaration merging, which is how we're using the interface here. This\n// declaration says that `TrackedArray` acts just like `Array<T>`, but also has\n// the properties declared via the `class` declaration above -- but without the\n// cost of a subclass, which is much slower that the proxied array behavior.\n// That is: a `TrackedArray` *is* an `Array`, just with a proxy in front of\n// accessors and setters, rather than a subclass of an `Array` which would be\n// de-optimized by the browsers.\n//\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface TrackedArray<T = unknown> extends Array<T> {}\n\nexport default TrackedArray;\n\n// Ensure instanceof works correctly\nObject.setPrototypeOf(TrackedArray.prototype, Array.prototype);\n"],"names":["_classApplyDescriptorGet","receiver","descriptor","get","call","value","_classExtractFieldDescriptor","privateMap","action","has","TypeError","_classPrivateFieldGet","classExtractFieldDescriptor","classApplyDescriptorGet","ARRAY_GETTER_METHODS","Set","Symbol","iterator","convertToInt","prop","num","Number","isNaN","TrackedArray","from","iterable","mapfn","thisArg","Array","of","arr","constructor","createStorage","Map","clone","slice","self","boundFns","Proxy","target","index","getValue","fn","undefined","args","set","setValue","getPrototypeOf","prototype","storages","storage","Object","setPrototypeOf"],"mappings":";;AAAe,SAASA,wBAAwB,CAACC,QAAQ,EAAEC,UAAU,EAAE;EACrE,IAAIA,UAAU,CAACC,GAAG,EAAE;AAClB,IAAA,OAAOD,UAAU,CAACC,GAAG,CAACC,IAAI,CAACH,QAAQ,CAAC,CAAA;AACtC,GAAA;EACA,OAAOC,UAAU,CAACG,KAAK,CAAA;AACzB;;ACLe,SAASC,4BAA4B,CAACL,QAAQ,EAAEM,UAAU,EAAEC,MAAM,EAAE;AACjF,EAAA,IAAI,CAACD,UAAU,CAACE,GAAG,CAACR,QAAQ,CAAC,EAAE;IAC7B,MAAM,IAAIS,SAAS,CAAC,eAAe,GAAGF,MAAM,GAAG,gCAAgC,CAAC,CAAA;AAClF,GAAA;AACA,EAAA,OAAOD,UAAU,CA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CAAC7B,YAAY,CAACyB,SAAS,EAAEpB,KAAK,CAACoB,SAAS,CAAC;;;;"}
|
|
\ No newline at end of file
|
|
+{"version":3,"file":"array.js","sources":["../../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","../../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js","../../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","../../src/-private/array.ts"],"sourcesContent":["export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}","/* eslint-disable @typescript-eslint/no-explicit-any */\n// Unfortunately, TypeScript's ability to do inference *or* type-checking in a\n// `Proxy`'s body is very limited, so we have to use a number of casts `as any`\n// to make the internal accesses work. The type safety of these is guaranteed at\n// the *call site* instead of within the body: you cannot do `Array.blah` in TS,\n// and it will blow up in JS in exactly the same way, so it is safe to assume\n// that properties within the getter have the correct type in TS.\n\nimport {\n TrackedStorage,\n createStorage,\n getValue,\n setValue,\n} from 'ember-tracked-storage-polyfill';\n\nconst ARRAY_GETTER_METHODS = new Set<string | symbol | number>([\n Symbol.iterator,\n 'concat',\n 'entries',\n 'every',\n 'fill',\n 'filter',\n 'find',\n 'findIndex',\n 'flat',\n 'flatMap',\n 'forEach',\n 'includes',\n 'indexOf',\n 'join',\n 'keys',\n 'lastIndexOf',\n 'map',\n 'reduce',\n 'reduceRight',\n 'slice',\n 'some',\n 'values',\n]);\n\nfunction convertToInt(prop: number | string | symbol): number | null {\n if (typeof prop === 'symbol') return null;\n\n const num = Number(prop);\n\n if (isNaN(num)) return null;\n\n return num % 1 === 0 ? num : null;\n}\n\nclass TrackedArray<T = unknown> {\n /**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n */\n static from<T>(iterable: Iterable<T> | ArrayLike<T>): TrackedArray<T>;\n\n /**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n * @param mapfn A mapping function to call on every element of the array.\n * @param thisArg Value of 'this' used to invoke the mapfn.\n */\n static from<T, U>(\n iterable: Iterable<T> | ArrayLike<T>,\n mapfn: (v: T, k: number) => U,\n thisArg?: unknown\n ): TrackedArray<U>;\n\n static from<T, U>(\n iterable: Iterable<T> | ArrayLike<T>,\n mapfn?: (v: T, k: number) => U,\n thisArg?: unknown\n ): TrackedArray<T> | TrackedArray<U> {\n return mapfn\n ? new TrackedArray(Array.from(iterable, mapfn, thisArg))\n : new TrackedArray(Array.from(iterable));\n }\n\n static of<T>(...arr: T[]): TrackedArray<T> {\n return new TrackedArray(arr);\n }\n\n constructor(arr: T[] = []) {\n let clone = arr.slice();\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let self = this;\n\n let boundFns = new Map();\n\n return new Proxy(clone, {\n get(target, prop /*, _receiver */) {\n let index = convertToInt(prop);\n\n if (index !== null) {\n self.#readStorageFor(index);\n getValue(self.#collection);\n\n return target[index];\n } else if (prop === 'length') {\n getValue(self.#collection);\n } else if (ARRAY_GETTER_METHODS.has(prop)) {\n let fn = boundFns.get(prop);\n\n if (fn === undefined) {\n fn = (...args: unknown[]) => {\n getValue(self.#collection);\n return (target as any)[prop](...args);\n };\n\n boundFns.set(prop, fn);\n }\n\n return fn;\n }\n\n return (target as any)[prop];\n },\n\n set(target, prop, value /*, _receiver */) {\n (target as any)[prop] = value;\n\n let index = convertToInt(prop);\n\n if (index !== null || prop === 'length') {\n self.#dirtyCollection();\n }\n\n return true;\n },\n\n getPrototypeOf() {\n return TrackedArray.prototype;\n },\n }) as TrackedArray<T>;\n }\n\n #collection = createStorage(null, () => false);\n\n #storages = new Map<number, TrackedStorage<null>>();\n\n #readStorageFor(index: number) {\n const storages = this.#storages;\n let storage = storages.get(index);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(index, storage);\n }\n\n getValue(storage);\n }\n\n #dirtyStorageFor(index: number): void {\n const storage = this.#storages.get(index);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n #dirtyCollection() {\n setValue(this.#collection, null);\n this.#storages.clear();\n }\n}\n\n// This rule is correctly in the general case, but it doesn't understand\n// declaration merging, which is how we're using the interface here. This\n// declaration says that `TrackedArray` acts just like `Array<T>`, but also has\n// the properties declared via the `class` declaration above -- but without the\n// cost of a subclass, which is much slower that the proxied array behavior.\n// That is: a `TrackedArray` *is* an `Array`, just with a proxy in front of\n// accessors and setters, rather than a subclass of an `Array` which would be\n// de-optimized by the browsers.\n//\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface TrackedArray<T = unknown> extends Array<T> {}\n\nexport default TrackedArray;\n\n// Ensure instanceof works correctly\nObject.setPrototypeOf(TrackedArray.prototype, Array.prototype);\n"],"names":["_classApplyDescriptorGet","receiver","descriptor","get","call","value","_classExtractFieldDescriptor","privateMap","action","has","TypeError","_classPrivateFieldGet","classExtractFieldDescriptor","classApplyDescriptorGet","ARRAY_GETTER_METHODS","Set","Symbol","iterator","convertToInt","prop","num","Number","isNaN","TrackedArray","from","iterable","mapfn","thisArg","Array","of","arr","constructor","createStorage","Map","clone","slice","self","boundFns","Proxy","target","index","getValue","fn","undefined","args","set","getPrototypeOf","prototype","storages","storage","setValue","clear","Object","setPrototypeOf"],"mappings":";;AAAe,SAASA,wBAAwB,CAACC,QAAQ,EAAEC,UAAU,EAAE;EACrE,IAAIA,UAAU,CAACC,GA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CAAC,qBAAA,CAAA,IAAI,EAAc,WAAA,CAAA,EAAA,IAAI,CAAC,CAAA;EAChC,qBAAI,CAAA,IAAA,EAAA,SAAA,CAAA,CAAWC,KAAK,EAAE,CAAA;AACxB,CAAA;;AAiBF;AACAC,MAAM,CAACC,cAAc,CAAC9B,YAAY,CAACwB,SAAS,EAAEnB,KAAK,CAACmB,SAAS,CAAC;;;;"}
|
|
\ No newline at end of file
|
|
diff --git a/dist/-private/map.js b/dist/-private/map.js
|
|
index ede4d374e29051732e4efcb3ce19851b64b0a839..f220d187fed5537aa817c080c3ca9e7339fcf4bc 100644
|
|
--- a/dist/-private/map.js
|
|
+++ b/dist/-private/map.js
|
|
@@ -76,12 +76,14 @@ class TrackedMap {
|
|
delete(key) {
|
|
this.dirtyStorageFor(key);
|
|
setValue(this.collection, null);
|
|
+ this.storages.delete(key);
|
|
return this.vals.delete(key);
|
|
}
|
|
|
|
// **** ALL SETTERS ****
|
|
clear() {
|
|
this.storages.forEach(s => setValue(s, null));
|
|
+ this.storages.clear();
|
|
setValue(this.collection, null);
|
|
this.vals.clear();
|
|
}
|
|
@@ -128,6 +130,7 @@ class TrackedWeakMap {
|
|
}
|
|
delete(key) {
|
|
this.dirtyStorageFor(key);
|
|
+ this.storages.delete(key);
|
|
return this.vals.delete(key);
|
|
}
|
|
get [Symbol.toStringTag]() {
|
|
diff --git a/dist/-private/map.js.map b/dist/-private/map.js.map
|
|
index d75767f21d5129a0513c5c95213b7fc48231518b..5ff28279011f33ed122e7b596d1eea8e908ba904 100644
|
|
--- a/dist/-private/map.js.map
|
|
+++ b/dist/-private/map.js.map
|
|
@@ -1 +1 @@
|
|
-{"version":3,"file":"map.js","sources":["../../src/-private/map.ts"],"sourcesContent":["import {\n TrackedStorage,\n createStorage,\n getValue,\n setValue,\n} from 'ember-tracked-storage-polyfill';\n\nexport class TrackedMap<K = unknown, V = unknown> implements Map<K, V> {\n private collection = createStorage(null, () => false);\n\n private storages: Map<K, TrackedStorage<null>> = new Map();\n\n private vals: Map<K, V>;\n\n private readStorageFor(key: K): void {\n const { storages } = this;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n getValue(storage);\n }\n\n private dirtyStorageFor(key: K): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor();\n constructor(entries: readonly (readonly [K, V])[] | null);\n constructor(iterable: Iterable<readonly [K, V]>);\n constructor(\n existing?:\n | readonly (readonly [K, V])[]\n | Iterable<readonly [K, V]>\n | null\n | undefined\n ) {\n // TypeScript doesn't correctly resolve the overloads for calling the `Map`\n // constructor for the no-value constructor. This resolves that.\n this.vals = existing ? new Map(existing) : new Map();\n }\n\n // **** KEY GETTERS ****\n get(key: K): V | undefined {\n // entangle the storage for the key\n this.readStorageFor(key);\n\n return this.vals.get(key);\n }\n\n has(key: K): boolean {\n this.readStorageFor(key);\n\n return this.vals.has(key);\n }\n\n // **** ALL GETTERS ****\n entries(): IterableIterator<[K, V]> {\n getValue(this.collection);\n\n return this.vals.entries();\n }\n\n keys(): IterableIterator<K> {\n getValue(this.collection);\n\n return this.vals.keys();\n }\n\n values(): IterableIterator<V> {\n getValue(this.collection);\n\n return this.vals.values();\n }\n\n forEach(fn: (value: V, key: K, map: Map<K, V>) => void): void {\n getValue(this.collection);\n\n this.vals.forEach(fn);\n }\n\n get size(): number {\n getValue(this.collection);\n\n return this.vals.size;\n }\n\n [Symbol.iterator](): IterableIterator<[K, V]> {\n getValue(this.collection);\n\n return this.vals[Symbol.iterator]();\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n\n // **** KEY SETTERS ****\n set(key: K, value: V): this {\n this.dirtyStorageFor(key);\n setValue(this.collection, null);\n\n this.vals.set(key, value);\n\n return this;\n }\n\n delete(key: K): boolean {\n this.dirtyStorageFor(key);\n setValue(this.collection, null);\n\n return this.vals.delete(key);\n }\n\n // **** ALL SETTERS ****\n clear(): void {\n this.storages.forEach((s) => setValue(s, null));\n setValue(this.collection, null);\n\n this.vals.clear();\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedMap.prototype, Map.prototype);\n\nexport class TrackedWeakMap<K extends object = object, V = unknown>\n implements WeakMap<K, V>\n{\n private storages: WeakMap<K, TrackedStorage<null>> = new WeakMap();\n\n private vals: WeakMap<K, V>;\n\n private readStorageFor(key: K): void {\n const { storages } = this;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n getValue(storage);\n }\n\n private dirtyStorageFor(key: K): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor();\n constructor(iterable: Iterable<readonly [K, V]>);\n constructor(entries: readonly [K, V][] | null);\n constructor(\n existing?: readonly [K, V][] | Iterable<readonly [K, V]> | null | undefined\n ) {\n // TypeScript doesn't correctly resolve the overloads for calling the `Map`\n // constructor for the no-value constructor. This resolves that.\n this.vals = existing ? new WeakMap(existing) : new WeakMap();\n }\n\n get(key: K): V | undefined {\n this.readStorageFor(key);\n\n return this.vals.get(key);\n }\n\n has(key: K): boolean {\n this.readStorageFor(key);\n\n return this.vals.has(key);\n }\n\n set(key: K, value: V): this {\n this.dirtyStorageFor(key);\n\n this.vals.set(key, value);\n\n return this;\n }\n\n delete(key: K): boolean {\n this.dirtyStorageFor(key);\n\n return this.vals.delete(key);\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakMap.prototype, WeakMap.prototype);\n"],"names":["TrackedMap","collection","createStorage","storages","Map","readStorageFor","key","storage","get","undefined","set","getValue","dirtyStorageFor","setValue","constructor","existing","vals","has","entries","keys","values","forEach","fn","size","Symbol","iterator","toStringTag","value","delete","clear","s","Object","setPrototypeOf","prototype","TrackedWeakMap","WeakMap"],"mappings":";;AAOO,MAAMA,UAAU,CAAgD;AAC7DC,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N,GAAG,CAAC,CAAA;AAEzB,IAAA,OAAO,IAAI,CAACU,IAAI,CAACY,MAAM,CAACtB,GAAG,CAAC,CAAA;AAC9B,GAAA;EAEA,KAAKkB,MAAM,CAACE,WAAW,CAAY,GAAA;AACjC,IAAA,OAAO,IAAI,CAACV,IAAI,CAACQ,MAAM,CAACE,WAAW,CAAC,CAAA;AACtC,GAAA;AACF,CAAA;;AAEA;AACAK,MAAM,CAACC,cAAc,CAACE,cAAc,CAACD,SAAS,EAAEE,OAAO,CAACF,SAAS,CAAC;;;;"}
|
|
\ No newline at end of file
|
|
+{"version":3,"file":"map.js","sources":["../../src/-private/map.ts"],"sourcesContent":["import {\n TrackedStorage,\n createStorage,\n getValue,\n setValue,\n} from 'ember-tracked-storage-polyfill';\n\nexport class TrackedMap<K = unknown, V = unknown> implements Map<K, V> {\n private collection = createStorage(null, () => false);\n\n private storages: Map<K, TrackedStorage<null>> = new Map();\n\n private vals: Map<K, V>;\n\n private readStorageFor(key: K): void {\n const { storages } = this;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n getValue(storage);\n }\n\n private dirtyStorageFor(key: K): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor();\n constructor(entries: readonly (readonly [K, V])[] | null);\n constructor(iterable: Iterable<readonly [K, V]>);\n constructor(\n existing?:\n | readonly (readonly [K, V])[]\n | Iterable<readonly [K, V]>\n | null\n | undefined\n ) {\n // TypeScript doesn't correctly resolve the overloads for calling the `Map`\n // constructor for the no-value constructor. This resolves that.\n this.vals = existing ? new Map(existing) : new Map();\n }\n\n // **** KEY GETTERS ****\n get(key: K): V | undefined {\n // entangle the storage for the key\n this.readStorageFor(key);\n\n return this.vals.get(key);\n }\n\n has(key: K): boolean {\n this.readStorageFor(key);\n\n return this.vals.has(key);\n }\n\n // **** ALL GETTERS ****\n entries(): IterableIterator<[K, V]> {\n getValue(this.collection);\n\n return this.vals.entries();\n }\n\n keys(): IterableIterator<K> {\n getValue(this.collection);\n\n return this.vals.keys();\n }\n\n values(): IterableIterator<V> {\n getValue(this.collection);\n\n return this.vals.values();\n }\n\n forEach(fn: (value: V, key: K, map: Map<K, V>) => void): void {\n getValue(this.collection);\n\n this.vals.forEach(fn);\n }\n\n get size(): number {\n getValue(this.collection);\n\n return this.vals.size;\n }\n\n [Symbol.iterator](): IterableIterator<[K, V]> {\n getValue(this.collection);\n\n return this.vals[Symbol.iterator]();\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n\n // **** KEY SETTERS ****\n set(key: K, value: V): this {\n this.dirtyStorageFor(key);\n setValue(this.collection, null);\n\n this.vals.set(key, value);\n\n return this;\n }\n\n delete(key: K): boolean {\n this.dirtyStorageFor(key);\n setValue(this.collection, null);\n\n this.storages.delete(key);\n return this.vals.delete(key);\n }\n\n // **** ALL SETTERS ****\n clear(): void {\n this.storages.forEach((s) => setValue(s, null));\n this.storages.clear();\n\n setValue(this.collection, null);\n this.vals.clear();\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedMap.prototype, Map.prototype);\n\nexport class TrackedWeakMap<K extends object = object, V = unknown>\n implements WeakMap<K, V>\n{\n private storages: WeakMap<K, TrackedStorage<null>> = new WeakMap();\n\n private vals: WeakMap<K, V>;\n\n private readStorageFor(key: K): void {\n const { storages } = this;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n getValue(storage);\n }\n\n private dirtyStorageFor(key: K): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor();\n constructor(iterable: Iterable<readonly [K, V]>);\n constructor(entries: readonly [K, V][] | null);\n constructor(\n existing?: readonly [K, V][] | Iterable<readonly [K, V]> | null | undefined\n ) {\n // TypeScript doesn't correctly resolve the overloads for calling the `Map`\n // constructor for the no-value constructor. This resolves that.\n this.vals = existing ? new WeakMap(existing) : new WeakMap();\n }\n\n get(key: K): V | undefined {\n this.readStorageFor(key);\n\n return this.vals.get(key);\n }\n\n has(key: K): boolean {\n this.readStorageFor(key);\n\n return this.vals.has(key);\n }\n\n set(key: K, value: V): this {\n this.dirtyStorageFor(key);\n\n this.vals.set(key, value);\n\n return this;\n }\n\n delete(key: K): boolean {\n this.dirtyStorageFor(key);\n\n this.storages.delete(key);\n return this.vals.delete(key);\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakMap.prototype, WeakMap.prototype);\n"],"names":["TrackedMap","collection","createStorage","storages","Map","readStorageFor","key","storage","get","undefined","set","getValue","dirtyStorageFor","setValue","constructor","existing","vals","has","entries","keys","values","forEach","fn","size","Symbol","iterator","toStringTag","value","delete","clear","s","Object","setPrototypeOf","prototype","TrackedWeakMap","WeakMap"],"mappings":";;AAOO,MAAMA,UAAU,CAAgD;AAC7DC,EAAAA,UAAU,GAAGC,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAA;EAE7CC,QAAQ,GAAiC,IAAIC,GAAG,EAAE,CAAA;EAIlDC,cAAc,CAACC,GAAM,EAAQ;IACnC,MAAM;AAAEH,MAAAA,QAAAA;AAAS,KAAC,GAAG,IAAI,CAAA;AACzB,IAAA,IAAII,OAAO,GAAGJ,QAAQ,CAACK,GAAG,CAACF,GAAG,CAAC,CAAA;IAE/B,IAAIC,OAAO,KAAKE,SAAS,EAAE;AACzBF,MAAAA,OAAO,GAAGL,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAA;AAC1CC,MAAAA,QAAQ,CAACO,GAAG,CAACJ,GAAG,EAAEC,OAAO,CAAC,CAAA;AAC5B,KAAA;IAEAI,QAAQ,CAACJ,OAAO,CAAC,CAAA;AACnB,GAAA;EAEQK,eAAe,CAACN,GAAM,EAAQ;IACpC,MAAMC,OAAO,GAAG,IAAI,CAACJ,QAAQ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d09c258fccb8aae803b6..44df87ab187511b4da0ea47158fad1cc2643890e 100644
|
|
--- a/dist/-private/set.js
|
|
+++ b/dist/-private/set.js
|
|
@@ -67,6 +67,7 @@ class TrackedSet {
|
|
delete(value) {
|
|
this.dirtyStorageFor(value);
|
|
setValue(this.collection, null);
|
|
+ this.storages.delete(value);
|
|
return this.vals.delete(value);
|
|
}
|
|
|
|
@@ -74,6 +75,7 @@ class TrackedSet {
|
|
clear() {
|
|
this.storages.forEach(s => setValue(s, null));
|
|
setValue(this.collection, null);
|
|
+ this.storages.clear();
|
|
this.vals.clear();
|
|
}
|
|
}
|
|
@@ -112,6 +114,7 @@ class TrackedWeakSet {
|
|
}
|
|
delete(value) {
|
|
this.dirtyStorageFor(value);
|
|
+ this.storages.delete(value);
|
|
return this.vals.delete(value);
|
|
}
|
|
get [Symbol.toStringTag]() {
|
|
diff --git a/dist/-private/set.js.map b/dist/-private/set.js.map
|
|
index f2b3867aaaff38e4608de854d0b6bd31017d9153..0f761b60cca57ad4692b0aaaaf52d49e6b8f48a7 100644
|
|
--- a/dist/-private/set.js.map
|
|
+++ b/dist/-private/set.js.map
|
|
@@ -1 +1 @@
|
|
-{"version":3,"file":"set.js","sources":["../../src/-private/set.ts"],"sourcesContent":["import {\n TrackedStorage,\n createStorage,\n getValue,\n setValue,\n} from 'ember-tracked-storage-polyfill';\n\nexport class TrackedSet<T = unknown> implements Set<T> {\n private collection = createStorage(null, () => false);\n\n private storages: Map<T, TrackedStorage<null>> = new Map();\n\n private vals: Set<T>;\n\n private storageFor(key: T): TrackedStorage<null> {\n const storages = this.storages;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n return storage;\n }\n\n private dirtyStorageFor(key: T): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor();\n constructor(values: readonly T[] | null);\n constructor(iterable: Iterable<T>);\n constructor(existing?: readonly T[] | Iterable<T> | null | undefined) {\n this.vals = new Set(existing);\n }\n\n // **** KEY GETTERS ****\n has(value: T): boolean {\n getValue(this.storageFor(value));\n\n return this.vals.has(value);\n }\n\n // **** ALL GETTERS ****\n entries(): IterableIterator<[T, T]> {\n getValue(this.collection);\n\n return this.vals.entries();\n }\n\n keys(): IterableIterator<T> {\n getValue(this.collection);\n\n return this.vals.keys();\n }\n\n values(): IterableIterator<T> {\n getValue(this.collection);\n\n return this.vals.values();\n }\n\n forEach(fn: (value1: T, value2: T, set: Set<T>) => void): void {\n getValue(this.collection);\n\n this.vals.forEach(fn);\n }\n\n get size(): number {\n getValue(this.collection);\n\n return this.vals.size;\n }\n\n [Symbol.iterator](): IterableIterator<T> {\n getValue(this.collection);\n\n return this.vals[Symbol.iterator]();\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n\n // **** KEY SETTERS ****\n add(value: T): this {\n this.dirtyStorageFor(value);\n setValue(this.collection, null);\n\n this.vals.add(value);\n\n return this;\n }\n\n delete(value: T): boolean {\n this.dirtyStorageFor(value);\n setValue(this.collection, null);\n\n return this.vals.delete(value);\n }\n\n // **** ALL SETTERS ****\n clear(): void {\n this.storages.forEach((s) => setValue(s, null));\n setValue(this.collection, null);\n\n this.vals.clear();\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedSet.prototype, Set.prototype);\n\nexport class TrackedWeakSet<T extends object = object> implements WeakSet<T> {\n private storages: WeakMap<T, TrackedStorage<null>> = new WeakMap();\n\n private vals: WeakSet<T>;\n\n private storageFor(key: T): TrackedStorage<null> {\n const storages = this.storages;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n return storage;\n }\n\n private dirtyStorageFor(key: T): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor(values?: readonly T[] | null) {\n this.vals = new WeakSet(values);\n }\n\n has(value: T): boolean {\n getValue(this.storageFor(value));\n\n return this.vals.has(value);\n }\n\n add(value: T): this {\n // Add to vals first to get better error message\n this.vals.add(value);\n\n this.dirtyStorageFor(value);\n\n return this;\n }\n\n delete(value: T): boolean {\n this.dirtyStorageFor(value);\n\n return this.vals.delete(value);\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakSet.prototype, WeakSet.prototype);\n"],"names":["TrackedSet","collection","createStorage","storages","Map","storageFor","key","storage","get","undefined","set","dirtyStorageFor","setValue","constructor","existing","vals","Set","has","value","getValue","entries","keys","values","forEach","fn","size","Symbol","iterator","toStringTag","add","delete","clear","s","Object","setPrototypeOf","prototype","TrackedWeakSet","WeakMap","WeakSet"],"mappings":";;AAOO,MAAMA,UAAU,CAAgC;AAC7CC,EAAAA,UAAU,GAAGC,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAA;EAE7CC,QAAQ,GAAiC,IAAIC,GAAG,EAAE,CAAA;EAIlDC,UAAU,CAACC,GAAM,EAAwB;AAC/C,IAAA,MAAMH,QAAQ,GAAG,IAAI,CAACA,QAAQ,CAAA;AAC9B,IAAA,IAAII,OAAO,GAAGJ,QAAQ,CAACK,GAAG,CAACF,GAAG,CAAC,CAAA;IAE/B,IAAIC,OAAO,KAAKE,SAAS,EAAE;AACzBF,MAAAA,OAAO,GAAGL,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAA;AAC1CC,MAAAA,QAAQ,CAACO,GAAG,CAACJ,GAAG,EAAEC,OAAO,CAAC,CAAA;AAC5B,KAAA;AAEA,IAAA,OAAOA,OAAO,CAAA;AAChB,GAAA;EAEQI,eAAe,CAACL,GAAM,EAAQ;IACpC,MAAMC,OAAO,GAAG,IAAI,CAACJ,QAAQ,CAACK,GAAG,CAACF,GAAG,CAAC,CAAA;AAEtC,IAAA,IAAIC,OAAO,EAAE;AACXK,MAAAA,QAAQ,CAACL,OAAO,EAAE,IAAI,CAA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AAI,CAACP,eAAe,CAACO,KAAK,CAAC,CAAA;AAE3B,IAAA,OAAO,IAAI,CAACH,IAAI,CAACe,MAAM,CAACZ,KAAK,CAAC,CAAA;AAChC,GAAA;EAEA,KAAKQ,MAAM,CAACE,WAAW,CAAY,GAAA;AACjC,IAAA,OAAO,IAAI,CAACb,IAAI,CAACW,MAAM,CAACE,WAAW,CAAC,CAAA;AACtC,GAAA;AACF,CAAA;;AAEA;AACAK,MAAM,CAACC,cAAc,CAACE,cAAc,CAACD,SAAS,EAAEG,OAAO,CAACH,SAAS,CAAC;;;;"}
|
|
\ No newline at end of file
|
|
+{"version":3,"file":"set.js","sources":["../../src/-private/set.ts"],"sourcesContent":["import {\n TrackedStorage,\n createStorage,\n getValue,\n setValue,\n} from 'ember-tracked-storage-polyfill';\n\nexport class TrackedSet<T = unknown> implements Set<T> {\n private collection = createStorage(null, () => false);\n\n private storages: Map<T, TrackedStorage<null>> = new Map();\n\n private vals: Set<T>;\n\n private storageFor(key: T): TrackedStorage<null> {\n const storages = this.storages;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n return storage;\n }\n\n private dirtyStorageFor(key: T): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor();\n constructor(values: readonly T[] | null);\n constructor(iterable: Iterable<T>);\n constructor(existing?: readonly T[] | Iterable<T> | null | undefined) {\n this.vals = new Set(existing);\n }\n\n // **** KEY GETTERS ****\n has(value: T): boolean {\n getValue(this.storageFor(value));\n\n return this.vals.has(value);\n }\n\n // **** ALL GETTERS ****\n entries(): IterableIterator<[T, T]> {\n getValue(this.collection);\n\n return this.vals.entries();\n }\n\n keys(): IterableIterator<T> {\n getValue(this.collection);\n\n return this.vals.keys();\n }\n\n values(): IterableIterator<T> {\n getValue(this.collection);\n\n return this.vals.values();\n }\n\n forEach(fn: (value1: T, value2: T, set: Set<T>) => void): void {\n getValue(this.collection);\n\n this.vals.forEach(fn);\n }\n\n get size(): number {\n getValue(this.collection);\n\n return this.vals.size;\n }\n\n [Symbol.iterator](): IterableIterator<T> {\n getValue(this.collection);\n\n return this.vals[Symbol.iterator]();\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n\n // **** KEY SETTERS ****\n add(value: T): this {\n this.dirtyStorageFor(value);\n setValue(this.collection, null);\n\n this.vals.add(value);\n\n return this;\n }\n\n delete(value: T): boolean {\n this.dirtyStorageFor(value);\n setValue(this.collection, null);\n\n this.storages.delete(value);\n return this.vals.delete(value);\n }\n\n // **** ALL SETTERS ****\n clear(): void {\n this.storages.forEach((s) => setValue(s, null));\n setValue(this.collection, null);\n\n this.storages.clear();\n this.vals.clear();\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedSet.prototype, Set.prototype);\n\nexport class TrackedWeakSet<T extends object = object> implements WeakSet<T> {\n private storages: WeakMap<T, TrackedStorage<null>> = new WeakMap();\n\n private vals: WeakSet<T>;\n\n private storageFor(key: T): TrackedStorage<null> {\n const storages = this.storages;\n let storage = storages.get(key);\n\n if (storage === undefined) {\n storage = createStorage(null, () => false);\n storages.set(key, storage);\n }\n\n return storage;\n }\n\n private dirtyStorageFor(key: T): void {\n const storage = this.storages.get(key);\n\n if (storage) {\n setValue(storage, null);\n }\n }\n\n constructor(values?: readonly T[] | null) {\n this.vals = new WeakSet(values);\n }\n\n has(value: T): boolean {\n getValue(this.storageFor(value));\n\n return this.vals.has(value);\n }\n\n add(value: T): this {\n // Add to vals first to get better error message\n this.vals.add(value);\n\n this.dirtyStorageFor(value);\n\n return this;\n }\n\n delete(value: T): boolean {\n this.dirtyStorageFor(value);\n\n this.storages.delete(value);\n return this.vals.delete(value);\n }\n\n get [Symbol.toStringTag](): string {\n return this.vals[Symbol.toStringTag];\n }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakSet.prototype, WeakSet.prototype);\n"],"names":["TrackedSet","collection","createStorage","storages","Map","storageFor","key","storage","get","undefined","set","dirtyStorageFor","setValue","constructor","existing","vals","Set","has","value","getValue","entries","keys","values","forEach","fn","size","Symbol","iterator","toStringTag","add","delete","clear","s","Object","setPrototypeOf","prototype","TrackedWeakSet","WeakMap","WeakSet"],"mappings":";;AAOO,MAAMA,UAAU,CAAgC;AAC7CC,EAAAA,UAAU,GAAGC,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAA;EAE7CC,QAAQ,GAAiC,IAAIC,GAAG,EAAE,CAAA;EAIlDC,UAAU,CAACC,GAAM,EAAwB;AAC/C,IAAA,MAAMH,QAAQ,GAAG,IAAI,CAACA,QAAQ,CAAA;AAC9B,IAAA,IAAII,OAAO,GAAGJ,QAAQ,CAACK,GAAG,CAACF,GAAG,CAAC,CAAA;IAE/B,IAAIC,OAAO,KAAKE,SAAS,EAAE;AACzBF,MAAAA,OAAO,GAAGL,aAAa,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAA;AAC1CC,MAAAA,QAAQ,CAACO,GAAG,CAACJ,GAAG,EAAEC,OAAO,CAAC,CAAA;AAC5B,KAAA;AAEA,IAAA,OAAOA,OAAO,CAAA;AAChB,GAAA;EAEQI,eAAe,CAACL,GAAM,EAAQ;IACpC,MAAMC,OAAO,GAAG,IAAI,CAACJ,QAAQ,CAACK,GAAG,CAACF,GAAG,CAAC,CAAA;AAEtC,IAAA,IAAIC,OAAO,EAAE;AACXK,MAAAA,QAAQ,CAACL,OAAO,EAAE,IAAI,CAAC,CAAA;AACzB,KAAA;AACF,GAAA;EAKAM,WAAW,CAACC,QAAwD,EAAE;AACpE,IAAA,IAAI,CAACC,IAAI,GAAG,IAAIC,GAAG,CAACF,QAAQ,CAAC,CAAA;AAC/B,GAAA;;AAEA;EACAG,GAAG,CAACC,KAAQ,EAAW;AACrBC,IAAAA,QAAQ,CAAC,IAAI,CAACd,UAAU,CAACa,KAAK,CAAC,CAAC,CAAA;AAEhC,IAAA,OAAO,IAAI,CAACH,IAAI,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