decord/stable/source/modules/premium/UserTrialActionCreators.android.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

96 lines
3.1 KiB
TypeScript

// Module ID: 13650
// Function ID: 13651
// Name: UserTrialActionCreators
// Dependencies: [5, 7728, 1074, 1271, 573, 2]
// Module 13650 (UserTrialActionCreators)
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import UserTrialOfferRecord from "UserTrialOfferRecord" /* 7728 */;
const require = fn;
const Constants = fn(1074);
({ Endpoints: hasOwnProperty, PaymentGateways: metroRequire } = Constants);
const size = fn(2);
const result = size.fileFinishedImporting("modules/premium/UserTrialActionCreators.android.tsx");
export default {
acknowledgeUserTrialOffer(userTrialOffer) {
return (async (arg0, value) => {
if (c5 === 2) {
c5 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c5 = 2;
if (0 === c4) {
if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 === 2) {
c5 = 3;
const obj3 = { value, done: true };
return obj3;
} else {
userTrialOffer = tmp7;
let body;
if (!userTrialOffer.hasAcknowledged) {
c3 = 1;
const HTTP = userTrialOffer(tmp26[3]).HTTP;
const request = { url: c5.USER_TRIAL_OFFER_ACKNOWLEDGED(tmp38.id), body: null, rejectWithError: null };
const obj4 = { payment_gateway: constants.GOOGLE };
request.body = obj4;
request.rejectWithError = userTrialOffer(tmp26[3]).rejectWithMigratedError();
c4 = 2;
c5 = 1;
const obj5 = { value: HTTP.post(request), done: false };
return obj5;
}
}
} else {
if (1 === tmp7) {
c3 = 0;
if (404 === tmp26.status) {
tmp3(tmp26[4]).dispatch({ type: "BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS", userTrialOffer: null });
const obj10 = tmp3(tmp26[4]);
}
} else if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 !== 2) {
body = value.body;
let fromServer = null;
if (null != body) {
fromServer = c4.createFromServer(body);
}
const obj7 = { type: "BILLING_USER_TRIAL_OFFER_ACKNOWLEDGED_SUCCESS", userTrialOffer: fromServer };
tmp3(tmp26[4]).dispatch(obj7);
c3 = 0;
const obj = tmp3(tmp26[4]);
}
c3 = 0;
c5 = 3;
const obj8 = { value, done: true };
return obj8;
}
c5 = 3;
} catch (tmp26) {
if (tmp4 === c3) {
c5 = tmp2;
throw tmp26;
} else {
c4 = tmp;
}
}
}
})();
}
};