jQuery(document).ready(function (e) {
    function a() {
        "undefined" != typeof jQuery().block &&
            jQuery("body").block({
                message:
                    '<img src="' +
                    t4aTwintFrontend.overlayIconUrl +
                    '" data-no-lazy="1" alt="' +
                    t4aTwintFrontend.texts.overlayAlt +
                    '" style="max-width: 100px;" /><p>' +
                    t4aTwintFrontend.texts.overlayMessage +
                    "</p>",
                overlayCSS: { background: "#fff", opacity: 0.6 },
                css: {
                    padding: 20,
                    textAlign: "center",
                    color: "#555",
                    border: "1px solid black",
                    backgroundColor: "#fff",
                    cursor: "wait",
                    lineHeight: "32px",
                    width: "60%",
                    maxWidth: "400px",
                },
            });
        var a = { action: "t4a_twint_frontend", twnt_tw_action: "background_task", order_id: t.data("order_id") };
        (e.ajax({
            type: "POST",
            url: t4aTwintFrontend.ajaxUrl,
            data: a,
            success: function (e) {},
            error: function (e) {},
        }),
            (window.location = t.data("url")));
    }
    var t = e("#twnt_tw-payment-element");
    if (t.length) {
        a();
    }
});
