/* Metro module 1228; source: stores/MobileCacheSnapshotStore.tsx; dependencies: [6, 7, 15, 17, 18, 694, 44, 587, 566, 2] */ function _fun13772(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:6, offset: 0x00df4835, size: 222 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(7) /* metro dependency 7 */; const env0_5 = importDefault(15) /* metro dependency 15 */; const env0_6 = importDefault(17) /* metro dependency 17 */; const env0_7 = importDefault(18) /* metro dependency 18 */; const Store = (importDefault(566) /* metro dependency 566: flux */).Store; const value = _fun13776(Store); value.allStores = []; (require(2) /* metro dependency 2 */).fileFinishedImporting('stores/MobileCacheSnapshotStore.tsx'); exports.default = value; } function _isNativeReflectConstruct_13773() { // fn#13773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:148, offset: 0x00df4913, size: 94 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_13773_isNativeReflectConstruct = function() { return !!result; })(); } function _fun13776(a0) { // fn#13776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:347, offset: 0x00df4971, size: 188 bytes, params: 2, frame: 17 const closure = MobileCacheSnapshotStore; env0_7(closure, a0); return env0_4(closure, [{key: 'persistKey', get: function() { return '' + this.getClass().displayName + '-snapshot'; }}, {key: 'clear', value: function() { var Storage = require(dependencyMap[7]).Storage; Storage.remove(this.persistKey); }}, {key: 'save', value: function() { var Storage = require(dependencyMap[7]).Storage; Storage.set(this.persistKey, this.takeSnapshot()); }}, {key: 'readSnapshot', value: value_13783}, {key: 'getClass', value: function() { return this.constructor; }}], [{key: 'clearAll', value: function() { MobileCacheSnapshotStore.allStores.forEach(_fun13786); }}]); } function MobileCacheSnapshotStore(a0, a1) { // fn#13777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:359, offset: 0x00df4a2d, size: 309 bytes, params: 3, frame: 26 var environment; let value = environment.__proto__; env1_3(this, MobileCacheSnapshotStore); const items2 = [importDefault(694) /* metro dependency 694: Dispatcher */]; const object2 = {}; copyDataProperties(object2, a0, undefined); object2['CLEAR_CACHES'] = MobileCacheSnapshotStoreCLEAR_CACHES; object2['WRITE_CACHES'] = MobileCacheSnapshotStoreWRITE_CACHES; items2[1] = object2; items2[2] = a1; const value3 = env1_6(MobileCacheSnapshotStore); value = env1_5(this, _isNativeReflectConstruct_13773() ? global.Reflect.construct(value3, items2, env1_6(this).constructor) : value3.apply(this, items2)); const defaultImport2 = importDefault(44) /* metro dependency 44 */; const getClass = value.getClass; defaultImport2(Reflect.apply(getClass, value, []).displayName != null, 'Snapshot stores need a display name'); defaultImport2(!('CLEAR_CACHES' in a0), "MobileCacheSnapshotStores cannot use the 'CLEAR_CACHES' action"); defaultImport2(!('WRITE_CACHES' in a0), "MobileCacheSnapshotStores cannot use the 'WRITE_CACHES' action"); MobileCacheSnapshotStore.allStores.push(value); return value; } function value_13783(a0) { // fn#13783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:1340, offset: 0x00df4c31, size: 83 bytes, params: 2, frame: 13 let value = environment.__proto__; const Storage = (require(587) /* metro dependency 587: Storage */).Storage; value = Storage.get(this.persistKey); const value2 = null; return value2 == value || value.version !== a0 ? value2 : value.data; } function value_13785() { // fn#13785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:1522, offset: 0x00df4c84, size: 34 bytes, params: 1, frame: 11 MobileCacheSnapshotStore.allStores.forEach(function(a0) { return a0.clear(); }); } function MobileCacheSnapshotStoreCLEAR_CACHES() { // fn#13778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:636, owner: MobileCacheSnapshotStore.CLEAR_CACHES, offset: 0x00df4b62, size: 21 bytes, params: 1, frame: 9 env0_0.clear(); return false; } function MobileCacheSnapshotStoreWRITE_CACHES() { // fn#13779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1355:668, owner: MobileCacheSnapshotStore.WRITE_CACHES, offset: 0x00df4b77, size: 21 bytes, params: 1, frame: 9 env0_0.save(); return false; }