diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index b29a1494c8123..5821a9851d619 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -1cd77a4ff7a2189003965246a3cfc475d2d9857d +4c34a7ffc59207e8baa19e8c4698a2f90a46177c diff --git a/compiled/facebook-www/ReactCacheOld-dev.classic.js b/compiled/facebook-www/ReactCacheOld-dev.classic.js new file mode 100644 index 0000000000000..249a31223d71a --- /dev/null +++ b/compiled/facebook-www/ReactCacheOld-dev.classic.js @@ -0,0 +1,341 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @noflow + * @nolint + * @preventMunge + * @preserve-invariant-messages + */ + +"use strict"; + +if (__DEV__) { + (function () { + "use strict"; + + var React = require("react"); + var Scheduler = require("scheduler"); + + // This refers to a WWW module. + var warningWWW = require("warning"); + function error(format) { + { + { + for ( + var _len2 = arguments.length, + args = new Array(_len2 > 1 ? _len2 - 1 : 0), + _key2 = 1; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 1] = arguments[_key2]; + } + + printWarning("error", format, args); + } + } + } + + function printWarning(level, format, args) { + { + var React = require("react"); + + var ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. + + if (ReactSharedInternals != null) { + var stack = ReactSharedInternals.getStackAddendum(); + + if (stack !== "") { + format += "%s"; + args.push(stack); + } + } // TODO: don't ignore level and pass it down somewhere too. + + args.unshift(format); + args.unshift(false); + warningWWW.apply(null, args); + } + } + + // use dynamic dispatch for CommonJS interop named imports. + + var scheduleCallback = Scheduler.unstable_scheduleCallback, + IdlePriority = Scheduler.unstable_IdlePriority; + function createLRU(limit) { + var LIMIT = limit; // Circular, doubly-linked list + + var first = null; + var size = 0; + var cleanUpIsScheduled = false; + + function scheduleCleanUp() { + if (cleanUpIsScheduled === false && size > LIMIT) { + // The cache size exceeds the limit. Schedule a callback to delete the + // least recently used entries. + cleanUpIsScheduled = true; + scheduleCallback(IdlePriority, cleanUp); + } + } + + function cleanUp() { + cleanUpIsScheduled = false; + deleteLeastRecentlyUsedEntries(LIMIT); + } + + function deleteLeastRecentlyUsedEntries(targetSize) { + // Delete entries from the cache, starting from the end of the list. + if (first !== null) { + var resolvedFirst = first; + var last = resolvedFirst.previous; + + while (size > targetSize && last !== null) { + var onDelete = last.onDelete; + var previous = last.previous; + last.onDelete = null; // Remove from the list + + last.previous = last.next = null; + + if (last === first) { + // Reached the head of the list. + first = last = null; + } else { + first.previous = previous; + previous.next = first; + last = previous; + } + + size -= 1; // Call the destroy method after removing the entry from the list. If it + // throws, the rest of cache will not be deleted, but it will be in a + // valid state. + + onDelete(); + } + } + } + + function add(value, onDelete) { + var entry = { + value: value, + onDelete: onDelete, + next: null, + previous: null + }; + + if (first === null) { + entry.previous = entry.next = entry; + first = entry; + } else { + // Append to head + var last = first.previous; + last.next = entry; + entry.previous = last; + first.previous = entry; + entry.next = first; + first = entry; + } + + size += 1; + return entry; + } + + function update(entry, newValue) { + entry.value = newValue; + } + + function access(entry) { + var next = entry.next; + + if (next !== null) { + // Entry already cached + var resolvedFirst = first; + + if (first !== entry) { + // Remove from current position + var previous = entry.previous; + previous.next = next; + next.previous = previous; // Append to head + + var last = resolvedFirst.previous; + last.next = entry; + entry.previous = last; + resolvedFirst.previous = entry; + entry.next = resolvedFirst; + first = entry; + } + } + + scheduleCleanUp(); + return entry.value; + } + + function setLimit(newLimit) { + LIMIT = newLimit; + scheduleCleanUp(); + } + + return { + add: add, + update: update, + access: access, + setLimit: setLimit + }; + } + + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + var SharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + + function readContext(Context) { + var dispatcher = SharedInternals.H; + + if (dispatcher === null) { + // This wasn't being minified but we're going to retire this package anyway. + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error( + "react-cache: read and preload may only be called from within a " + + "component's render. They are not supported in event handlers or " + + "lifecycle methods." + ); + } + + return dispatcher.readContext(Context); + } // $FlowFixMe[missing-local-annot] + + function identityHashFn(input) { + { + if ( + typeof input !== "string" && + typeof input !== "number" && + typeof input !== "boolean" && + input !== undefined && + input !== null + ) { + error( + "Invalid key type. Expected a string, number, symbol, or boolean, " + + "but instead received: %s" + + "\n\nTo use non-primitive values as keys, you must pass a hash " + + "function as the second argument to createResource().", + input + ); + } + } + + return input; + } + + var CACHE_LIMIT = 500; + var lru = createLRU(CACHE_LIMIT); + var entries = new Map(); + var CacheContext = React.createContext(null); + + function accessResult(resource, fetch, input, key) { + var entriesForResource = entries.get(resource); + + if (entriesForResource === undefined) { + entriesForResource = new Map(); + entries.set(resource, entriesForResource); + } + + var entry = entriesForResource.get(key); + + if (entry === undefined) { + var thenable = fetch(input); + thenable.then( + function (value) { + if (newResult.status === Pending) { + var resolvedResult = newResult; + resolvedResult.status = Resolved; + resolvedResult.value = value; + } + }, + function (error) { + if (newResult.status === Pending) { + var rejectedResult = newResult; + rejectedResult.status = Rejected; + rejectedResult.value = error; + } + } + ); + var newResult = { + status: Pending, + value: thenable + }; + var newEntry = lru.add( + newResult, + deleteEntry.bind(null, resource, key) + ); + entriesForResource.set(key, newEntry); + return newResult; + } else { + return lru.access(entry); + } + } + + function deleteEntry(resource, key) { + var entriesForResource = entries.get(resource); + + if (entriesForResource !== undefined) { + entriesForResource.delete(key); + + if (entriesForResource.size === 0) { + entries.delete(resource); + } + } + } + + function unstable_createResource(fetch, maybeHashInput) { + var hashInput = + maybeHashInput !== undefined ? maybeHashInput : identityHashFn; + var resource = { + read: function (input) { + // react-cache currently doesn't rely on context, but it may in the + // future, so we read anyway to prevent access outside of render. + readContext(CacheContext); + var key = hashInput(input); + var result = accessResult(resource, fetch, input, key); + + switch (result.status) { + case Pending: { + var suspender = result.value; + throw suspender; + } + + case Resolved: { + var value = result.value; + return value; + } + + case Rejected: { + var error = result.value; + throw error; + } + + default: + // Should be unreachable + return undefined; + } + }, + preload: function (input) { + // react-cache currently doesn't rely on context, but it may in the + // future, so we read anyway to prevent access outside of render. + readContext(CacheContext); + var key = hashInput(input); + accessResult(resource, fetch, input, key); + } + }; + return resource; + } + function unstable_setGlobalCacheLimit(limit) { + lru.setLimit(limit); + } + + exports.unstable_createResource = unstable_createResource; + exports.unstable_setGlobalCacheLimit = unstable_setGlobalCacheLimit; + })(); +} diff --git a/compiled/facebook-www/ReactCacheOld-dev.modern.js b/compiled/facebook-www/ReactCacheOld-dev.modern.js new file mode 100644 index 0000000000000..249a31223d71a --- /dev/null +++ b/compiled/facebook-www/ReactCacheOld-dev.modern.js @@ -0,0 +1,341 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @noflow + * @nolint + * @preventMunge + * @preserve-invariant-messages + */ + +"use strict"; + +if (__DEV__) { + (function () { + "use strict"; + + var React = require("react"); + var Scheduler = require("scheduler"); + + // This refers to a WWW module. + var warningWWW = require("warning"); + function error(format) { + { + { + for ( + var _len2 = arguments.length, + args = new Array(_len2 > 1 ? _len2 - 1 : 0), + _key2 = 1; + _key2 < _len2; + _key2++ + ) { + args[_key2 - 1] = arguments[_key2]; + } + + printWarning("error", format, args); + } + } + } + + function printWarning(level, format, args) { + { + var React = require("react"); + + var ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // Defensive in case this is fired before React is initialized. + + if (ReactSharedInternals != null) { + var stack = ReactSharedInternals.getStackAddendum(); + + if (stack !== "") { + format += "%s"; + args.push(stack); + } + } // TODO: don't ignore level and pass it down somewhere too. + + args.unshift(format); + args.unshift(false); + warningWWW.apply(null, args); + } + } + + // use dynamic dispatch for CommonJS interop named imports. + + var scheduleCallback = Scheduler.unstable_scheduleCallback, + IdlePriority = Scheduler.unstable_IdlePriority; + function createLRU(limit) { + var LIMIT = limit; // Circular, doubly-linked list + + var first = null; + var size = 0; + var cleanUpIsScheduled = false; + + function scheduleCleanUp() { + if (cleanUpIsScheduled === false && size > LIMIT) { + // The cache size exceeds the limit. Schedule a callback to delete the + // least recently used entries. + cleanUpIsScheduled = true; + scheduleCallback(IdlePriority, cleanUp); + } + } + + function cleanUp() { + cleanUpIsScheduled = false; + deleteLeastRecentlyUsedEntries(LIMIT); + } + + function deleteLeastRecentlyUsedEntries(targetSize) { + // Delete entries from the cache, starting from the end of the list. + if (first !== null) { + var resolvedFirst = first; + var last = resolvedFirst.previous; + + while (size > targetSize && last !== null) { + var onDelete = last.onDelete; + var previous = last.previous; + last.onDelete = null; // Remove from the list + + last.previous = last.next = null; + + if (last === first) { + // Reached the head of the list. + first = last = null; + } else { + first.previous = previous; + previous.next = first; + last = previous; + } + + size -= 1; // Call the destroy method after removing the entry from the list. If it + // throws, the rest of cache will not be deleted, but it will be in a + // valid state. + + onDelete(); + } + } + } + + function add(value, onDelete) { + var entry = { + value: value, + onDelete: onDelete, + next: null, + previous: null + }; + + if (first === null) { + entry.previous = entry.next = entry; + first = entry; + } else { + // Append to head + var last = first.previous; + last.next = entry; + entry.previous = last; + first.previous = entry; + entry.next = first; + first = entry; + } + + size += 1; + return entry; + } + + function update(entry, newValue) { + entry.value = newValue; + } + + function access(entry) { + var next = entry.next; + + if (next !== null) { + // Entry already cached + var resolvedFirst = first; + + if (first !== entry) { + // Remove from current position + var previous = entry.previous; + previous.next = next; + next.previous = previous; // Append to head + + var last = resolvedFirst.previous; + last.next = entry; + entry.previous = last; + resolvedFirst.previous = entry; + entry.next = resolvedFirst; + first = entry; + } + } + + scheduleCleanUp(); + return entry.value; + } + + function setLimit(newLimit) { + LIMIT = newLimit; + scheduleCleanUp(); + } + + return { + add: add, + update: update, + access: access, + setLimit: setLimit + }; + } + + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + var SharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + + function readContext(Context) { + var dispatcher = SharedInternals.H; + + if (dispatcher === null) { + // This wasn't being minified but we're going to retire this package anyway. + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error( + "react-cache: read and preload may only be called from within a " + + "component's render. They are not supported in event handlers or " + + "lifecycle methods." + ); + } + + return dispatcher.readContext(Context); + } // $FlowFixMe[missing-local-annot] + + function identityHashFn(input) { + { + if ( + typeof input !== "string" && + typeof input !== "number" && + typeof input !== "boolean" && + input !== undefined && + input !== null + ) { + error( + "Invalid key type. Expected a string, number, symbol, or boolean, " + + "but instead received: %s" + + "\n\nTo use non-primitive values as keys, you must pass a hash " + + "function as the second argument to createResource().", + input + ); + } + } + + return input; + } + + var CACHE_LIMIT = 500; + var lru = createLRU(CACHE_LIMIT); + var entries = new Map(); + var CacheContext = React.createContext(null); + + function accessResult(resource, fetch, input, key) { + var entriesForResource = entries.get(resource); + + if (entriesForResource === undefined) { + entriesForResource = new Map(); + entries.set(resource, entriesForResource); + } + + var entry = entriesForResource.get(key); + + if (entry === undefined) { + var thenable = fetch(input); + thenable.then( + function (value) { + if (newResult.status === Pending) { + var resolvedResult = newResult; + resolvedResult.status = Resolved; + resolvedResult.value = value; + } + }, + function (error) { + if (newResult.status === Pending) { + var rejectedResult = newResult; + rejectedResult.status = Rejected; + rejectedResult.value = error; + } + } + ); + var newResult = { + status: Pending, + value: thenable + }; + var newEntry = lru.add( + newResult, + deleteEntry.bind(null, resource, key) + ); + entriesForResource.set(key, newEntry); + return newResult; + } else { + return lru.access(entry); + } + } + + function deleteEntry(resource, key) { + var entriesForResource = entries.get(resource); + + if (entriesForResource !== undefined) { + entriesForResource.delete(key); + + if (entriesForResource.size === 0) { + entries.delete(resource); + } + } + } + + function unstable_createResource(fetch, maybeHashInput) { + var hashInput = + maybeHashInput !== undefined ? maybeHashInput : identityHashFn; + var resource = { + read: function (input) { + // react-cache currently doesn't rely on context, but it may in the + // future, so we read anyway to prevent access outside of render. + readContext(CacheContext); + var key = hashInput(input); + var result = accessResult(resource, fetch, input, key); + + switch (result.status) { + case Pending: { + var suspender = result.value; + throw suspender; + } + + case Resolved: { + var value = result.value; + return value; + } + + case Rejected: { + var error = result.value; + throw error; + } + + default: + // Should be unreachable + return undefined; + } + }, + preload: function (input) { + // react-cache currently doesn't rely on context, but it may in the + // future, so we read anyway to prevent access outside of render. + readContext(CacheContext); + var key = hashInput(input); + accessResult(resource, fetch, input, key); + } + }; + return resource; + } + function unstable_setGlobalCacheLimit(limit) { + lru.setLimit(limit); + } + + exports.unstable_createResource = unstable_createResource; + exports.unstable_setGlobalCacheLimit = unstable_setGlobalCacheLimit; + })(); +} diff --git a/compiled/facebook-www/ReactCacheOld-prod.classic.js b/compiled/facebook-www/ReactCacheOld-prod.classic.js new file mode 100644 index 0000000000000..7a6213e9d01a3 --- /dev/null +++ b/compiled/facebook-www/ReactCacheOld-prod.classic.js @@ -0,0 +1,171 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @noflow + * @nolint + * @preventMunge + * @preserve-invariant-messages + */ + +"use strict"; +var React = require("react"), + Scheduler = require("scheduler"), + scheduleCallback = Scheduler.unstable_scheduleCallback, + IdlePriority = Scheduler.unstable_IdlePriority, + SharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +function readContext(Context) { + var dispatcher = SharedInternals.H; + if (null === dispatcher) + throw Error( + "react-cache: read and preload may only be called from within a component's render. They are not supported in event handlers or lifecycle methods." + ); + return dispatcher.readContext(Context); +} +function identityHashFn(input) { + return input; +} +var lru = (function (limit) { + function scheduleCleanUp() { + !1 === cleanUpIsScheduled && + size > LIMIT && + ((cleanUpIsScheduled = !0), scheduleCallback(IdlePriority, cleanUp)); + } + function cleanUp() { + cleanUpIsScheduled = !1; + var targetSize = LIMIT; + if (null !== first) + for (var last = first.previous; size > targetSize && null !== last; ) { + var onDelete = last.onDelete, + previous = last.previous; + last.onDelete = null; + last.previous = last.next = null; + last === first + ? (first = last = null) + : ((first.previous = previous), + (previous.next = first), + (last = previous)); + --size; + onDelete(); + } + } + var LIMIT = limit, + first = null, + size = 0, + cleanUpIsScheduled = !1; + return { + add: function (value, onDelete) { + value = { + value: value, + onDelete: onDelete, + next: null, + previous: null + }; + null === first + ? (value.previous = value.next = value) + : ((onDelete = first.previous), + (onDelete.next = value), + (value.previous = onDelete), + (first.previous = value), + (value.next = first)); + first = value; + size += 1; + return value; + }, + update: function (entry, newValue) { + entry.value = newValue; + }, + access: function (entry) { + var next = entry.next; + if (null !== next) { + var resolvedFirst = first; + if (first !== entry) { + var previous = entry.previous; + previous.next = next; + next.previous = previous; + next = resolvedFirst.previous; + next.next = entry; + entry.previous = next; + resolvedFirst.previous = entry; + entry.next = resolvedFirst; + first = entry; + } + } + scheduleCleanUp(); + return entry.value; + }, + setLimit: function (newLimit) { + LIMIT = newLimit; + scheduleCleanUp(); + } + }; + })(500), + entries = new Map(), + CacheContext = React.createContext(null); +function accessResult(resource, fetch, input, key) { + var entriesForResource = entries.get(resource); + void 0 === entriesForResource && + ((entriesForResource = new Map()), + entries.set(resource, entriesForResource)); + var entry = entriesForResource.get(key); + if (void 0 === entry) { + fetch = fetch(input); + fetch.then( + function (value) { + if (0 === newResult.status) { + var resolvedResult = newResult; + resolvedResult.status = 1; + resolvedResult.value = value; + } + }, + function (error) { + if (0 === newResult.status) { + var rejectedResult = newResult; + rejectedResult.status = 2; + rejectedResult.value = error; + } + } + ); + var newResult = { status: 0, value: fetch }; + resource = lru.add(newResult, deleteEntry.bind(null, resource, key)); + entriesForResource.set(key, resource); + return newResult; + } + return lru.access(entry); +} +function deleteEntry(resource, key) { + var entriesForResource = entries.get(resource); + void 0 !== entriesForResource && + (entriesForResource.delete(key), + 0 === entriesForResource.size && entries.delete(resource)); +} +exports.unstable_createResource = function (fetch, maybeHashInput) { + var hashInput = void 0 !== maybeHashInput ? maybeHashInput : identityHashFn, + resource = { + read: function (input) { + readContext(CacheContext); + var key = hashInput(input); + input = accessResult(resource, fetch, input, key); + switch (input.status) { + case 0: + throw input.value; + case 1: + return input.value; + case 2: + throw input.value; + } + }, + preload: function (input) { + readContext(CacheContext); + var key = hashInput(input); + accessResult(resource, fetch, input, key); + } + }; + return resource; +}; +exports.unstable_setGlobalCacheLimit = function (limit) { + lru.setLimit(limit); +}; diff --git a/compiled/facebook-www/ReactCacheOld-prod.modern.js b/compiled/facebook-www/ReactCacheOld-prod.modern.js new file mode 100644 index 0000000000000..7a6213e9d01a3 --- /dev/null +++ b/compiled/facebook-www/ReactCacheOld-prod.modern.js @@ -0,0 +1,171 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @noflow + * @nolint + * @preventMunge + * @preserve-invariant-messages + */ + +"use strict"; +var React = require("react"), + Scheduler = require("scheduler"), + scheduleCallback = Scheduler.unstable_scheduleCallback, + IdlePriority = Scheduler.unstable_IdlePriority, + SharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +function readContext(Context) { + var dispatcher = SharedInternals.H; + if (null === dispatcher) + throw Error( + "react-cache: read and preload may only be called from within a component's render. They are not supported in event handlers or lifecycle methods." + ); + return dispatcher.readContext(Context); +} +function identityHashFn(input) { + return input; +} +var lru = (function (limit) { + function scheduleCleanUp() { + !1 === cleanUpIsScheduled && + size > LIMIT && + ((cleanUpIsScheduled = !0), scheduleCallback(IdlePriority, cleanUp)); + } + function cleanUp() { + cleanUpIsScheduled = !1; + var targetSize = LIMIT; + if (null !== first) + for (var last = first.previous; size > targetSize && null !== last; ) { + var onDelete = last.onDelete, + previous = last.previous; + last.onDelete = null; + last.previous = last.next = null; + last === first + ? (first = last = null) + : ((first.previous = previous), + (previous.next = first), + (last = previous)); + --size; + onDelete(); + } + } + var LIMIT = limit, + first = null, + size = 0, + cleanUpIsScheduled = !1; + return { + add: function (value, onDelete) { + value = { + value: value, + onDelete: onDelete, + next: null, + previous: null + }; + null === first + ? (value.previous = value.next = value) + : ((onDelete = first.previous), + (onDelete.next = value), + (value.previous = onDelete), + (first.previous = value), + (value.next = first)); + first = value; + size += 1; + return value; + }, + update: function (entry, newValue) { + entry.value = newValue; + }, + access: function (entry) { + var next = entry.next; + if (null !== next) { + var resolvedFirst = first; + if (first !== entry) { + var previous = entry.previous; + previous.next = next; + next.previous = previous; + next = resolvedFirst.previous; + next.next = entry; + entry.previous = next; + resolvedFirst.previous = entry; + entry.next = resolvedFirst; + first = entry; + } + } + scheduleCleanUp(); + return entry.value; + }, + setLimit: function (newLimit) { + LIMIT = newLimit; + scheduleCleanUp(); + } + }; + })(500), + entries = new Map(), + CacheContext = React.createContext(null); +function accessResult(resource, fetch, input, key) { + var entriesForResource = entries.get(resource); + void 0 === entriesForResource && + ((entriesForResource = new Map()), + entries.set(resource, entriesForResource)); + var entry = entriesForResource.get(key); + if (void 0 === entry) { + fetch = fetch(input); + fetch.then( + function (value) { + if (0 === newResult.status) { + var resolvedResult = newResult; + resolvedResult.status = 1; + resolvedResult.value = value; + } + }, + function (error) { + if (0 === newResult.status) { + var rejectedResult = newResult; + rejectedResult.status = 2; + rejectedResult.value = error; + } + } + ); + var newResult = { status: 0, value: fetch }; + resource = lru.add(newResult, deleteEntry.bind(null, resource, key)); + entriesForResource.set(key, resource); + return newResult; + } + return lru.access(entry); +} +function deleteEntry(resource, key) { + var entriesForResource = entries.get(resource); + void 0 !== entriesForResource && + (entriesForResource.delete(key), + 0 === entriesForResource.size && entries.delete(resource)); +} +exports.unstable_createResource = function (fetch, maybeHashInput) { + var hashInput = void 0 !== maybeHashInput ? maybeHashInput : identityHashFn, + resource = { + read: function (input) { + readContext(CacheContext); + var key = hashInput(input); + input = accessResult(resource, fetch, input, key); + switch (input.status) { + case 0: + throw input.value; + case 1: + return input.value; + case 2: + throw input.value; + } + }, + preload: function (input) { + readContext(CacheContext); + var key = hashInput(input); + accessResult(resource, fetch, input, key); + } + }; + return resource; +}; +exports.unstable_setGlobalCacheLimit = function (limit) { + lru.setLimit(limit); +};