export function supportsApplePay() {
    var iOSversion = getiOSversion();
    var isMacOS = navigator.platform.indexOf("Mac") !== -1;
    if (isMacOS || (iOSversion && iOSversion[0] >= 17)) {
        if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
            return true;
        }
    }
    return false;
}
function getiOSversion() {
    if (/iP(hone|od|ad)/.test(navigator.platform)) {
        // supports iOS 2.0 and later:
        var v = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
        if (!v) {
            return null;
        }
        return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
    }
    return null;
}