decord/source/modules/billing/actions/StripeActionCreators.tsx

224 lines
6.5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4475
// Function ID: 4476
2026-07-20 16:05:17 +00:00
// Name: _createStripeSetupIntent
2026-07-29 08:29:29 +00:00
// Dependencies: [5, 676, 530, 2]
2026-07-20 16:05:17 +00:00
// Exports: createSetupIntentForPaymentElements, createStripeSetupIntent
2026-08-24 06:08:38 +00:00
// Module 4475 (_createStripeSetupIntent)
import closure_2 from "asyncGeneratorStep" /* 5 */;
import { Endpoints } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
function _createStripeSetupIntent() {
const self = this;
const tmp = callback(() => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c3 = 0;
c4 = 0;
2026-07-29 08:29:29 +00:00
const iter = (function*(arg0, body) {
2026-08-12 06:57:52 +00:00
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw body;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = body;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-08-12 06:57:52 +00:00
}
} else {
try {
c4 = 2;
if (0 === constants) {
if (arg0 === 1) {
c4 = 3;
throw body;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = body;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_2 = tmp5;
2026-08-12 06:57:52 +00:00
const table = tmp2;
2026-08-24 06:08:38 +00:00
obj1 = undefined;
2026-08-12 06:57:52 +00:00
if (obj1 === undefined) {
obj1 = {};
}
constants = 1;
c4 = 1;
return { value: "ct", done: true };
}
} else if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw body;
} else if (arg0 === 2) {
c4 = 3;
const obj2 = { value: null, done: true };
obj2[0] = body;
return obj2;
} else {
const HTTP = obj1(table[2]).HTTP;
const obj3 = { url: null, oldFormErrors: true, rejectWithError: true };
obj3[0] = constants.BILLING_STRIPE_SETUP_INTENT_SECRET;
const merged = Object.assign(obj1);
constants = 2;
c4 = 1;
const obj4 = { value: null, done: false };
obj4[0] = HTTP.post(obj3);
return obj4;
}
} else if (arg0 === 1) {
c4 = 3;
throw body;
} else if (arg0 === 2) {
c4 = 3;
const obj5 = { value: null, done: true };
obj5[0] = body;
return obj5;
} else {
c4 = 3;
obj = { value: null, done: true };
obj[0] = body.body;
return obj;
}
} catch (tmp14) {
c4 = tmp;
throw tmp14;
}
2026-07-29 08:29:29 +00:00
}
})();
iter.next();
return iter;
});
2026-08-24 06:08:38 +00:00
closure_4 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
function _createSetupIntentForPaymentElements() {
const self = this;
const tmp = callback(() => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c3 = 0;
c4 = 0;
2026-07-29 08:29:29 +00:00
const iter = (function*(arg0, body) {
2026-08-12 06:57:52 +00:00
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw body;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = body;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-08-12 06:57:52 +00:00
}
} else {
try {
c4 = 2;
if (0 === constants) {
if (arg0 === 1) {
c4 = 3;
throw body;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = body;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_2 = tmp5;
2026-08-12 06:57:52 +00:00
const table = tmp2;
2026-08-24 06:08:38 +00:00
obj1 = undefined;
2026-08-12 06:57:52 +00:00
if (obj1 === undefined) {
obj1 = {};
}
constants = 1;
c4 = 1;
return { value: "ct", done: true };
}
} else if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw body;
} else if (arg0 === 2) {
c4 = 3;
const obj2 = { value: null, done: true };
obj2[0] = body;
return obj2;
} else {
const HTTP = obj1(table[2]).HTTP;
const obj3 = { url: null, oldFormErrors: true, rejectWithError: true, failImmediatelyWhenRateLimited: true };
obj3[0] = constants.BILLING_STRIPE_SETUP_INTENT_SECRET_FOR_PAYMENT_ELEMENTS;
const merged = Object.assign(obj1);
constants = 2;
c4 = 1;
const obj4 = { value: null, done: false };
obj4[0] = HTTP.post(obj3);
return obj4;
}
} else if (arg0 === 1) {
c4 = 3;
throw body;
} else if (arg0 === 2) {
c4 = 3;
const obj5 = { value: null, done: true };
obj5[0] = body;
return obj5;
} else {
c4 = 3;
obj = { value: null, done: true };
obj[0] = body.body;
return obj;
}
} catch (tmp14) {
c4 = tmp;
throw tmp14;
}
2026-07-29 08:29:29 +00:00
}
})();
iter.next();
return iter;
});
2026-08-24 06:08:38 +00:00
closure_5 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/billing/actions/StripeActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const createStripeSetupIntent = function createStripeSetupIntent() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _createStripeSetupIntent.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};
export const createSetupIntentForPaymentElements = function createSetupIntentForPaymentElements() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _createSetupIntentForPaymentElements.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};