435 lines
14 KiB
TypeScript
435 lines
14 KiB
TypeScript
/* Metro module 5182; source: actions/EntitlementActionCreators.tsx; dependencies: [5, 661, 694, 507, 4141, 2] */
|
|
function _fun45662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:6, offset: 0x011948bc, size: 178 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/EntitlementActionCreators.tsx');
|
|
exports.fetchUserEntitlementsForApplication = fetchUserEntitlementsForApplication;
|
|
exports.fetchUserEntitlements = function() {
|
|
return _fetchUserEntitlements.apply(this, arguments);
|
|
};
|
|
exports.fetchGiftableEntitlements = function() {
|
|
return _fetchGiftableEntitlements.apply(this, arguments);
|
|
};
|
|
}
|
|
|
|
function _fetchUserEntitlements() { // fn#45663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:128, offset: 0x0119496e, size: 48 bytes, params: 1, frame: 14
|
|
return env0_3(_fun45665).apply(this, arguments);
|
|
}
|
|
|
|
function _fetchGiftableEntitlements() { // fn#45666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:689, offset: 0x01194afe, size: 48 bytes, params: 1, frame: 14
|
|
return env0_3(_fun45668).apply(this, arguments);
|
|
}
|
|
|
|
function fetchUserEntitlementsForApplication(a0) { // fn#45669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1222, offset: 0x01194c12, size: 169 bytes, params: 2, frame: 17
|
|
let value = a1;
|
|
const env0_0 = a0;
|
|
const r6 = !(value !== undefined) || value;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun45670);
|
|
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
|
const get = HTTP.get;
|
|
const object2 = {};
|
|
object2.url = Endpoints.ENTITLEMENTS_FOR_APPLICATION(a0);
|
|
object2.oldFormErrors = true;
|
|
object2.query = {exclude_consumed: r6};
|
|
object2.rejectWithError = true;
|
|
value = Reflect.apply(get, HTTP, [object2]);
|
|
value = value.then(_fun45671);
|
|
return value.catch(_fun45672);
|
|
}
|
|
|
|
async function _fun45665({withSku, withApplication, excludeEnded, entitlementType}) { // fn#45665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:195, offset: 0x011949b0, size: 334 bytes, params: 2, frame: 21
|
|
var object4;
|
|
var binding2;
|
|
var property;
|
|
var value5;
|
|
var HTTP;
|
|
var get;
|
|
var ENTITLEMENTS_FOR_USER;
|
|
var object3;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var binding3;
|
|
var value9;
|
|
var body;
|
|
var error;
|
|
let value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
reducibleJoin3: while (true) {
|
|
if (withSku !== undefined) {
|
|
break reducibleJoin3;
|
|
}
|
|
value = false;
|
|
withSku = value;
|
|
break reducibleJoin3;
|
|
}
|
|
reducibleJoin5: while (true) {
|
|
if (withApplication !== undefined) {
|
|
break reducibleJoin5;
|
|
}
|
|
value = false;
|
|
withApplication = value;
|
|
break reducibleJoin5;
|
|
}
|
|
reducibleJoin7: while (true) {
|
|
if (excludeEnded !== undefined) {
|
|
break reducibleJoin7;
|
|
}
|
|
value = true;
|
|
excludeEnded = value;
|
|
break reducibleJoin7;
|
|
}
|
|
await undefined;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var value4 = binding(env2_2[2]);
|
|
var dispatch = value4.dispatch;
|
|
Reflect.apply(dispatch, value4, [{type: 'ENTITLEMENTS_FETCH_FOR_USER_START'}]);
|
|
reducibleJoin11: while (true) {
|
|
reduciblePort48: while (true) {
|
|
exceptionLanding47: while (true) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
dispatch = value.dispatch;
|
|
Reflect.apply(dispatch, value, [{type: 'ENTITLEMENTS_FETCH_FOR_USER_FAIL'}]);
|
|
break reduciblePort48;
|
|
}
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
property = binding2[3];
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
HTTP = value5.HTTP;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
get = HTTP.get;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4 = {};
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
ENTITLEMENTS_FOR_USER = binding.ENTITLEMENTS_FOR_USER;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4.url = ENTITLEMENTS_FOR_USER;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object3 = {};
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object3.with_sku = withSku;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object3.with_application = withApplication;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object3.entitlement_type = entitlementType;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object3.exclude_ended = excludeEnded;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4.query = object3;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4.rejectWithError = true;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(get, HTTP, [object4]);
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
await value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
property = binding3[2];
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
dispatch = value9.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4 = {};
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4.type = 'ENTITLEMENTS_FETCH_FOR_USER_SUCCESS';
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
body = value7.body;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4.entitlements = body;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
object4.excludeEnded = excludeEnded;
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value9, [object4]);
|
|
} catch (error) {
|
|
break exceptionLanding47;
|
|
}
|
|
}
|
|
}
|
|
|
|
function* _fun45668() { // fn#45668, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:764, offset: 0x01194b37, size: 219 bytes, params: 1, frame: 17
|
|
var object2;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var httpGetWithCountryCodeQuery;
|
|
var ENTITLEMENTS_GIFTABLE;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var binding3;
|
|
var value8;
|
|
var body;
|
|
var error;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var value3 = binding(env2_2[2]);
|
|
var dispatch = value3.dispatch;
|
|
Reflect.apply(dispatch, value3, [{type: 'ENTITLEMENTS_GIFTABLE_FETCH'}]);
|
|
reducibleJoin3: while (true) {
|
|
reduciblePort31: while (true) {
|
|
exceptionLanding30: while (true) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
break reducibleJoin3;
|
|
}
|
|
binding = env2_1;
|
|
value = binding(env2_2[2]);
|
|
dispatch = value.dispatch;
|
|
Reflect.apply(dispatch, value, [{type: 'ENTITLEMENTS_GIFTABLE_FETCH_FAIL'}]);
|
|
break reduciblePort31;
|
|
}
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
property = binding2[4];
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
httpGetWithCountryCodeQuery = value4.httpGetWithCountryCodeQuery;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
ENTITLEMENTS_GIFTABLE = binding.ENTITLEMENTS_GIFTABLE;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
object2.url = ENTITLEMENTS_GIFTABLE;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
object2.rejectWithError = true;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(httpGetWithCountryCodeQuery, value4, [object2]);
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
yield value5;
|
|
try {
|
|
value6 = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
if (value7) {
|
|
return value6;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
property = binding3[2];
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
value8 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
dispatch = value8.dispatch;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
object2.type = 'ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS';
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
body = value6.body;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
object2.entitlements = body;
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value8, [object2]);
|
|
} catch (error) {
|
|
break exceptionLanding30;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun45670() { // fn#45670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1296, offset: 0x01194cbb, size: 60 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENTITLEMENT_FETCH_APPLICATION_START',
|
|
applicationId: env0_0});
|
|
}
|
|
|
|
function _fun45671(a0) { // fn#45671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1510, offset: 0x01194cf7, size: 78 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENTITLEMENT_FETCH_APPLICATION_SUCCESS',
|
|
applicationId: env0_0, entitlements: a0.body});
|
|
return a0.body;
|
|
}
|
|
|
|
function _fun45672() { // fn#45672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5360:1632, offset: 0x01194d45, size: 60 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ENTITLEMENT_FETCH_APPLICATION_FAIL',
|
|
applicationId: env0_0});
|
|
}
|
|
|