174 lines
8.5 KiB
React
174 lines
8.5 KiB
React
/* Metro module 7352; source: unknown; dependencies: [65, 5, 57, 31, 33, 7337, 7349] */
|
|
function _fun59225(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:6, offset: 0x016e35fd, size: 225 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(65) /* metro dependency 65 */;
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
let value = require(31) /* metro dependency 31 */;
|
|
const env0_5 = value.useContext;
|
|
const env0_6 = value.useEffect;
|
|
const env0_7 = value.useMemo;
|
|
const env0_8 = value.useState;
|
|
value = importDefault(31) /* metro dependency 31 */;
|
|
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
|
const env0_10 = value.createContext(null);
|
|
exports.useIAPContext = useIAPContext;
|
|
exports.withIAPContext = function(a0) {
|
|
var env0_0 = a0;
|
|
return _fun59228;
|
|
};
|
|
}
|
|
|
|
function useIAPContext() { // fn#59226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:254, offset: 0x016e36de, size: 59 bytes, params: 1, frame: 12
|
|
const value = useContext(env0_10);
|
|
if (value) {
|
|
return value;
|
|
}
|
|
const Error = global.Error;
|
|
throw new Error('You need wrap your app with withIAPContext HOC');
|
|
}
|
|
|
|
function withIAPContext(a0) { // fn#59227, offset: 0x016e3719, size: 16 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return WrapperComponent;
|
|
}
|
|
|
|
function WrapperComponent(a0) { // fn#59228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:423, owner: withIAPContext.WrapperComponent, offset: 0x016e3729, size: 505 bytes, params: 2, frame: 34
|
|
const value2 = useState(false);
|
|
let binding = env1_4;
|
|
const value3 = binding(value2, 2);
|
|
const property = value3[0];
|
|
const env0_0 = property;
|
|
const property2 = value3[1];
|
|
const [property3, property4] = binding(useState([]), 2);
|
|
const [property5, env0_5] = binding(useState([]), 2);
|
|
const [property6, property7] = binding(useState([]), 2);
|
|
const [property8, property9] = binding(useState([]), 2);
|
|
const [property10, property11] = binding(useState([]), 2);
|
|
const [property12, property13] = binding(useState(), 2);
|
|
const [property14, env0_15] = binding(useState(), 2);
|
|
const [property15, property16] = binding(useState(), 2);
|
|
const [property17, env0_19] = binding(useState(), 2);
|
|
const value13 = useMemo(_fun59229, [property, property3, property6, property5, property8, property10, property12,
|
|
property14, property15, property17, property2, property4, property7, property9, property11, property13,
|
|
property16]);
|
|
useEffect(_fun59230, []);
|
|
useEffect(_fun59232, [property]);
|
|
const Provider = env1_10.Provider;
|
|
binding = env0_0;
|
|
const Object = global.Object;
|
|
return (
|
|
<Provider value={value13}>
|
|
{((Component) => <Component {...Object.assign({}, a0)} />)(binding)}
|
|
</Provider>
|
|
);
|
|
}
|
|
|
|
function _fun59229() { // fn#59229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:769, offset: 0x016e3922, size: 162 bytes, params: 1, frame: 3
|
|
return {connected: env0_0, products: env0_2, subscriptions: env0_6, promotedProductsIOS: env0_4,
|
|
purchaseHistory: env0_8, availablePurchases: env0_10, currentPurchase: env0_12, currentTransaction: env0_14,
|
|
currentPurchaseError: env0_16, initConnectionError: env0_18, setConnected: env0_1, setProducts: env0_3,
|
|
setSubscriptions: env0_7, setPurchaseHistory: env0_9, setAvailablePurchases: env0_11,
|
|
setCurrentPurchase: env0_13, setCurrentPurchaseError: env0_17};
|
|
}
|
|
|
|
function _fun59230() { // fn#59230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1163, offset: 0x016e39c4, size: 72 bytes, params: 1, frame: 12
|
|
var environment;
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(7337) /* metro dependency 7337 */;
|
|
value = value.initConnection();
|
|
value = value.then(_fun59231);
|
|
value.catch(env0_19);
|
|
}
|
|
|
|
function _fun59232() { // fn#59232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1255, offset: 0x016e3a28, size: 172 bytes, params: 1, frame: 17
|
|
var environment;
|
|
var moduleValue4;
|
|
if (env0_0) {
|
|
value = environment.__proto__.__proto__;
|
|
var env0_0 = (require(7349) /* metro dependency 7349 */).purchaseUpdatedListener(_fun59233());
|
|
var env0_1 = (require(7349) /* metro dependency 7349 */).transactionListener(_fun59237());
|
|
var env0_2 = (require(7349) /* metro dependency 7349 */).purchaseErrorListener(_fun59241);
|
|
moduleValue4 = require(7349) /* metro dependency 7349 */;
|
|
var env0_3 = moduleValue4.promotedProductListener(env2_3(_fun59243));
|
|
return _fun59245;
|
|
}
|
|
}
|
|
|
|
function _fun59231(a0) { // fn#59231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1205, offset: 0x016e3a0c, size: 28 bytes, params: 2, frame: 11
|
|
env1_19(undefined);
|
|
env1_1(a0);
|
|
}
|
|
|
|
function _fun59233() { // fn#59233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1310, offset: 0x016e3ad4, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env3_3(_fun59235);
|
|
return _fun59236;
|
|
}
|
|
|
|
function _fun59237() { // fn#59237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1446, offset: 0x016e3b24, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env3_3(_fun59239);
|
|
return _fun59240;
|
|
}
|
|
|
|
function _fun59241(a0) { // fn#59241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1628, offset: 0x016e3b93, size: 28 bytes, params: 2, frame: 11
|
|
env1_13(undefined);
|
|
env1_17(a0);
|
|
}
|
|
|
|
function* _fun59243() { // fn#59243, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1695, offset: 0x016e3bb8, size: 94 bytes, params: 1, frame: 14
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
var IapIos = env4_0(env4_1[5]).IapIos;
|
|
var getPromotedProductIOS = IapIos.getPromotedProductIOS;
|
|
yield Reflect.apply(getPromotedProductIOS, IapIos, []);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
env2_5(_fun59244);
|
|
}
|
|
}
|
|
|
|
function _fun59245() { // fn#59245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1821, offset: 0x016e3c5c, size: 81 bytes, params: 1, frame: 11
|
|
env0_0.remove();
|
|
env0_2.remove();
|
|
if (env0_3 != null) {
|
|
env0_3.remove();
|
|
}
|
|
if (env0_1 != null) {
|
|
env0_1.remove();
|
|
}
|
|
}
|
|
|
|
function* _fun59235(a0) { // fn#59235, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1330, offset: 0x016e3afd, size: 39 bytes, params: 2, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
env3_17(undefined);
|
|
env3_13(a0);
|
|
}
|
|
}
|
|
|
|
function* _fun59239(a0) { // fn#59239, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1466, offset: 0x016e3b4d, size: 70 bytes, params: 2, frame: 16
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
const binding = env3_17;
|
|
const value3 = undefined;
|
|
binding(a0 == null ? value3 : a0.error);
|
|
env3_15(a0 == null ? value3 : a0.transaction);
|
|
return value3;
|
|
}
|
|
|
|
function _fun59244(a0) { // fn#59244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7530:1761, offset: 0x016e3c16, size: 70 bytes, params: 2, frame: 17
|
|
const items2 = [];
|
|
const concat = items2.concat;
|
|
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
const binding = env5_2;
|
|
return Reflect.apply(concat, items2, [binding(a0), binding(env0_0 ? [env0_0] : [])]);
|
|
}
|
|
|