"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
var __values = (this && this.__values) || function(o) {
    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
    if (m) return m.call(o);
    if (o && typeof o.length === "number") return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
/*
Checkout -- finalize purchase and pay.
*/
var icon_1 = require("@cocalc/frontend/components/icon");
var utils_1 = require("@cocalc/util/licenses/purchase/utils");
var misc_1 = require("@cocalc/util/misc");
var antd_1 = require("antd");
var payment_methods_1 = __importDefault(require("components/billing/payment-methods"));
var A_1 = __importDefault(require("components/misc/A"));
var loading_1 = __importDefault(require("components/share/loading"));
var site_name_1 = __importDefault(require("components/share/site-name"));
var post_1 = __importDefault(require("lib/api/post"));
var api_1 = __importDefault(require("lib/hooks/api"));
var mounted_1 = __importDefault(require("lib/hooks/mounted"));
var use_customize_1 = __importDefault(require("lib/use-customize"));
var router_1 = require("next/router");
var react_1 = require("react");
var react_google_recaptcha_v3_1 = require("react-google-recaptcha-v3");
var compute_cost_1 = require("./compute-cost");
var site_license_cost_1 = require("./site-license-cost");
function CheckoutWithCaptcha() {
    var reCaptchaKey = (0, use_customize_1.default)().reCaptchaKey;
    return ((0, jsx_runtime_1.jsx)(react_google_recaptcha_v3_1.GoogleReCaptchaProvider, __assign({ reCaptchaKey: reCaptchaKey }, { children: (0, jsx_runtime_1.jsx)(Checkout, {}) })));
}
exports.default = CheckoutWithCaptcha;
function Checkout() {
    var reCaptchaKey = (0, use_customize_1.default)().reCaptchaKey;
    var executeRecaptcha = (0, react_google_recaptcha_v3_1.useGoogleReCaptcha)().executeRecaptcha;
    var router = (0, router_1.useRouter)();
    var isMounted = (0, mounted_1.default)();
    var _a = __read((0, react_1.useState)(false), 2), placingOrder = _a[0], setPlacingOrder = _a[1];
    var _b = __read((0, react_1.useState)(""), 2), orderError = _b[0], setOrderError = _b[1];
    var _c = __read((0, react_1.useState)(0), 2), subTotal = _c[0], setSubTotal = _c[1];
    var _d = __read((0, react_1.useState)(0), 2), taxRate = _d[0], setTaxRate = _d[1];
    // most likely, user will do the purchase and then see the congratulations page
    (0, react_1.useEffect)(function () {
        router.prefetch("/store/congrats");
    }, []);
    var cart = (0, api_1.default)("/shopping/cart/get");
    var items = (0, react_1.useMemo)(function () {
        var e_1, _a;
        if (!cart.result)
            return undefined;
        var x = [];
        var subTotal = 0;
        try {
            for (var _b = __values(cart.result), _c = _b.next(); !_c.done; _c = _b.next()) {
                var item = _c.value;
                if (!item.checked)
                    continue;
                item.cost = (0, compute_cost_1.computeCost)(item.description);
                subTotal += item.cost.discounted_cost;
                x.push(item);
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            }
            finally { if (e_1) throw e_1.error; }
        }
        setSubTotal(subTotal);
        return x;
    }, [cart.result]);
    if (cart.error) {
        return (0, jsx_runtime_1.jsx)(antd_1.Alert, { type: "error", message: cart.error });
    }
    if (!items) {
        return (0, jsx_runtime_1.jsx)(loading_1.default, { center: true });
    }
    function placeOrder() {
        return __awaiter(this, void 0, void 0, function () {
            var reCaptchaToken, err_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 4, 5, 6]);
                        setOrderError("");
                        setPlacingOrder(true);
                        reCaptchaToken = void 0;
                        if (!reCaptchaKey) return [3 /*break*/, 2];
                        if (!executeRecaptcha) {
                            throw Error("Please wait a few seconds, then try again.");
                        }
                        return [4 /*yield*/, executeRecaptcha("checkout")];
                    case 1:
                        reCaptchaToken = _a.sent();
                        _a.label = 2;
                    case 2: 
                    // This api call tells the backend, "buy everything in my shopping cart."
                    // It succeeds if the purchase goes through.
                    return [4 /*yield*/, (0, post_1.default)("/shopping/cart/checkout", { reCaptchaToken: reCaptchaToken })];
                    case 3:
                        // This api call tells the backend, "buy everything in my shopping cart."
                        // It succeeds if the purchase goes through.
                        _a.sent();
                        // Success!
                        if (!isMounted.current)
                            return [2 /*return*/];
                        // If the user is still viewing the page after the purchase happened, we
                        // send them to the congrats page, which shows them what they recently purchased,
                        // with links about how to use it, etc.
                        router.push("/store/congrats");
                        return [3 /*break*/, 6];
                    case 4:
                        err_1 = _a.sent();
                        // The purchase failed.
                        setOrderError(err_1.message);
                        return [3 /*break*/, 6];
                    case 5:
                        if (!isMounted.current)
                            return [2 /*return*/];
                        setPlacingOrder(false);
                        return [7 /*endfinally*/];
                    case 6: return [2 /*return*/];
                }
            });
        });
    }
    var columns = [
        {
            responsive: ["xs"],
            render: function (_a) {
                var cost = _a.cost, description = _a.description;
                return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(DescriptionColumn, { cost: cost, description: description }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("b", __assign({ style: { fontSize: "11pt" } }, { children: (0, jsx_runtime_1.jsx)(site_license_cost_1.DisplayCost, { cost: cost, simple: true, oneLine: true }) })) })] }));
            },
        },
        {
            responsive: ["sm"],
            title: "Product",
            align: "center",
            render: function () { return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { color: "darkblue" } }, { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "key", style: { fontSize: "24px" } }), (0, jsx_runtime_1.jsx)("div", __assign({ style: { fontSize: "10pt" } }, { children: "Site License" }))] }))); },
        },
        {
            responsive: ["sm"],
            width: "60%",
            render: function (_, _a) {
                var cost = _a.cost, description = _a.description;
                return ((0, jsx_runtime_1.jsx)(DescriptionColumn, { cost: cost, description: description }));
            },
        },
        {
            responsive: ["sm"],
            title: "Price",
            align: "right",
            render: function (_, _a) {
                var cost = _a.cost;
                return ((0, jsx_runtime_1.jsx)("b", __assign({ style: { fontSize: "11pt" } }, { children: (0, jsx_runtime_1.jsx)(site_license_cost_1.DisplayCost, { cost: cost, simple: true }) })));
            },
        },
    ];
    function placeOrderButton() {
        return ((0, jsx_runtime_1.jsx)(antd_1.Button, __assign({ disabled: subTotal == 0 || placingOrder, style: { marginTop: "7px", marginBottom: "15px" }, size: "large", type: "primary", onClick: placeOrder }, { children: placingOrder ? ((0, jsx_runtime_1.jsx)(loading_1.default, __assign({ delay: 0 }, { children: "Placing Order..." }))) : ("Place Your Order") })));
    }
    function renderOrderError() {
        if (!orderError)
            return;
        return ((0, jsx_runtime_1.jsx)(antd_1.Alert, { type: "error", message: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("b", { children: "Error placing order:" }), " ", orderError] }), style: { margin: "30px 0" } }));
    }
    function emptyCart() {
        var _a, _b, _c;
        return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("h3", { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "shopping-cart", style: { marginRight: "5px" } }), ((_a = cart.result) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Nothing in Your ", (0, jsx_runtime_1.jsx)(site_name_1.default, {}), " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/store/cart" }, { children: "Shopping Cart" })), " is Selected"] })), ((_c = (_b = cart.result) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) == 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Your ", (0, jsx_runtime_1.jsx)(site_name_1.default, {}), " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/store/cart" }, { children: "Shopping Cart" })), " is Empty"] }))] }), (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/store/site-license" }, { children: "Buy a License" }))] }));
    }
    function nonemptyCart(items) {
        return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderOrderError(), (0, jsx_runtime_1.jsxs)(antd_1.Row, { children: [(0, jsx_runtime_1.jsx)(antd_1.Col, __assign({ md: 14, sm: 24 }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h3", __assign({ style: { fontSize: "16pt" } }, { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "list", style: { marginRight: "5px" } }), "Checkout (", (0, jsx_runtime_1.jsxs)(A_1.default, __assign({ href: "/store/cart" }, { children: [items.length, " items"] })), ")"] })), (0, jsx_runtime_1.jsx)("h4", __assign({ style: { fontSize: "13pt", marginTop: "20px" } }, { children: "1. Payment Method" })), (0, jsx_runtime_1.jsx)("p", { children: "The default payment method shown below will be used for this purchase." }), (0, jsx_runtime_1.jsx)(payment_methods_1.default, { startMinimized: true, setTaxRate: setTaxRate })] }) })), (0, jsx_runtime_1.jsx)(antd_1.Col, __assign({ md: { offset: 1, span: 9 }, sm: { span: 24, offset: 0 } }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: {
                                            textAlign: "center",
                                            border: "1px solid #ddd",
                                            padding: "15px",
                                            borderRadius: "5px",
                                            minWidth: "300px",
                                        } }, { children: [placeOrderButton(), (0, jsx_runtime_1.jsx)(Terms, {}), (0, jsx_runtime_1.jsx)(OrderSummary, { items: items, taxRate: taxRate }), (0, jsx_runtime_1.jsx)("span", __assign({ style: { fontSize: "13pt" } }, { children: (0, jsx_runtime_1.jsx)(TotalCost, { items: items, taxRate: taxRate }) }))] })), (0, jsx_runtime_1.jsx)(GetAQuote, { items: items })] }) }))] }), (0, jsx_runtime_1.jsxs)("h4", __assign({ style: { fontSize: "13pt", marginTop: "15px" } }, { children: ["2. Review Items (", items.length, ")"] })), (0, jsx_runtime_1.jsx)("div", __assign({ style: { border: "1px solid #eee" } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Table, { showHeader: false, columns: columns, dataSource: items, rowKey: "id", pagination: { hideOnSinglePage: true } }) })), (0, jsx_runtime_1.jsx)("h4", __assign({ style: { fontSize: "13pt", marginTop: "30px" } }, { children: "3. Place Your Order" })), (0, jsx_runtime_1.jsx)("div", __assign({ style: { fontSize: "12pt" } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Row, { children: [(0, jsx_runtime_1.jsx)(antd_1.Col, __assign({ sm: 12 }, { children: placeOrderButton() })), (0, jsx_runtime_1.jsx)(antd_1.Col, __assign({ sm: 12 }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ style: { fontSize: "15pt" } }, { children: [(0, jsx_runtime_1.jsx)(TotalCost, { items: cart.result, taxRate: taxRate }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(Terms, {})] })) }))] }) }))] }));
    }
    return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [items.length == 0 && emptyCart(), items.length > 0 && nonemptyCart(items), renderOrderError()] }));
}
function fullCost(items) {
    var e_2, _a;
    var full_cost = 0;
    try {
        for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
            var _b = items_1_1.value, cost = _b.cost, checked = _b.checked;
            if (checked) {
                full_cost += cost.cost;
            }
        }
    }
    catch (e_2_1) { e_2 = { error: e_2_1 }; }
    finally {
        try {
            if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
        }
        finally { if (e_2) throw e_2.error; }
    }
    return full_cost;
}
function discountedCost(items) {
    var e_3, _a;
    var discounted_cost = 0;
    try {
        for (var items_2 = __values(items), items_2_1 = items_2.next(); !items_2_1.done; items_2_1 = items_2.next()) {
            var _b = items_2_1.value, cost = _b.cost, checked = _b.checked;
            if (checked) {
                discounted_cost += cost.discounted_cost;
            }
        }
    }
    catch (e_3_1) { e_3 = { error: e_3_1 }; }
    finally {
        try {
            if (items_2_1 && !items_2_1.done && (_a = items_2.return)) _a.call(items_2);
        }
        finally { if (e_3) throw e_3.error; }
    }
    return discounted_cost;
}
function TotalCost(_a) {
    var items = _a.items, taxRate = _a.taxRate;
    var cost = discountedCost(items) * (1 + taxRate);
    return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Total: ", (0, jsx_runtime_1.jsx)("b", __assign({ style: { float: "right", color: "darkred" } }, { children: (0, utils_1.money)(cost) }))] }));
}
function OrderSummary(_a) {
    var items = _a.items, taxRate = _a.taxRate;
    var cost = discountedCost(items);
    var full = fullCost(items);
    var tax = cost * taxRate;
    return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { textAlign: "left" } }, { children: [(0, jsx_runtime_1.jsx)("b", __assign({ style: { fontSize: "14pt" } }, { children: "Order Summary" })), (0, jsx_runtime_1.jsxs)("div", { children: ["Items (", items.length, "):", " ", (0, jsx_runtime_1.jsx)("span", __assign({ style: { float: "right" } }, { children: (0, utils_1.money)(full, true) }))] }), full - cost > 0 && ((0, jsx_runtime_1.jsxs)("div", { children: ["Self-service discount (25%):", " ", (0, jsx_runtime_1.jsxs)("span", __assign({ style: { float: "right" } }, { children: ["-", (0, utils_1.money)(full - cost, true)] }))] })), (0, jsx_runtime_1.jsxs)("div", { children: ["Estimated tax:", " ", (0, jsx_runtime_1.jsx)("span", __assign({ style: { float: "right" } }, { children: (0, utils_1.money)(tax, true) }))] })] })));
}
function Terms() {
    return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { color: "#666", fontSize: "10pt" } }, { children: ["By placing your order, you agree to", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/policies/terms", external: true }, { children: "our terms of service" })), " ", "regarding refunds and subscriptions."] })));
}
function DescriptionColumn(_a) {
    var cost = _a.cost, description = _a.description;
    var input = cost.input;
    return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ style: { fontSize: "12pt" } }, { children: [description.title && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("b", { children: description.title }) })), description.description && (0, jsx_runtime_1.jsx)("div", { children: description.description }), (0, site_license_cost_1.describeItem)(input)] })) }));
}
var MIN_AMOUNT = 100;
function GetAQuote(_a) {
    var e_4, _b;
    var items = _a.items;
    var router = (0, router_1.useRouter)();
    var _c = __read((0, react_1.useState)(false), 2), more = _c[0], setMore = _c[1];
    var isSub;
    try {
        for (var items_3 = __values(items), items_3_1 = items_3.next(); !items_3_1.done; items_3_1 = items_3.next()) {
            var item = items_3_1.value;
            if (item.description.period != "range") {
                isSub = true;
                break;
            }
        }
    }
    catch (e_4_1) { e_4 = { error: e_4_1 }; }
    finally {
        try {
            if (items_3_1 && !items_3_1.done && (_b = items_3.return)) _b.call(items_3);
        }
        finally { if (e_4) throw e_4.error; }
    }
    function createSupportRequest() {
        var e_5, _a;
        var x = [];
        try {
            for (var items_4 = __values(items), items_4_1 = items_4.next(); !items_4_1.done; items_4_1 = items_4.next()) {
                var item = items_4_1.value;
                x.push(__assign({ cost: (0, utils_1.money)(item.cost.cost) }, (0, misc_1.copy_without)(item, [
                    "account_id",
                    "added",
                    "removed",
                    "purchased",
                    "checked",
                    "cost",
                ])));
            }
        }
        catch (e_5_1) { e_5 = { error: e_5_1 }; }
        finally {
            try {
                if (items_4_1 && !items_4_1.done && (_a = items_4.return)) _a.call(items_4);
            }
            finally { if (e_5) throw e_5.error; }
        }
        var body = "Hello,\n\nI would like to request a quote.  I filled out the online form with the\ndetails listed below:\n\n```\n".concat(JSON.stringify(x, undefined, 2), "\n```");
        router.push({
            pathname: "/support/new",
            query: {
                hideExtra: true,
                subject: "Request for a quote",
                body: body,
                type: "question",
            },
        });
    }
    return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { paddingTop: "15px" } }, { children: [(0, jsx_runtime_1.jsx)(A_1.default, __assign({ onClick: function () { return setMore(!more); } }, { children: "Need to obtain a quote, invoice, modified terms, a purchase order, to use PayPal or pay via wire transfer, etc.?" })), more && ((0, jsx_runtime_1.jsx)("div", { children: fullCost(items) <= MIN_AMOUNT || isSub ? ((0, jsx_runtime_1.jsx)(antd_1.Alert, { showIcon: true, style: {
                        margin: "15px 0",
                        fontSize: "12pt",
                        borderRadius: "5px",
                    }, type: "warning", message: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Customized payment is available only for", " ", (0, jsx_runtime_1.jsxs)("b", { children: ["non-subscription purchases over $", MIN_AMOUNT] }), ". Make sure your cost before tax and discounts is over $", MIN_AMOUNT, " ", "and ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/store/cart" }, { children: "convert" })), " any subscriptions in your cart to explicit date ranges, then try again. If this is confusing, ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/support/new" }, { children: "make a support request" })), "."] }) })) : ((0, jsx_runtime_1.jsx)(antd_1.Alert, { showIcon: true, style: {
                        margin: "15px 0",
                        fontSize: "12pt",
                        borderRadius: "5px",
                    }, type: "info", message: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Click the button below to copy your shopping cart contents to a support request, and we will take if from there. Note that the 25% self-service discount is ", (0, jsx_runtime_1.jsx)("b", { children: "only available" }), " when you purchase from this page.", (0, jsx_runtime_1.jsx)("div", __assign({ style: { textAlign: "center", marginTop: "5px" } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Button, __assign({ onClick: createSupportRequest }, { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "medkit" }), " Copy cart to support request"] })) }))] }) })) }))] })));
}
//# sourceMappingURL=checkout.js.map