// 3.76.4 - wrong LPM  error codes
const SDK_VERSION = "3.85.3";
const BRAINTREEGATEWAY_URL = "https://js.braintreegateway.com/web/";
var HTML = {
    DIV: "<div>",
    BR: "<br/>",
    IMG: "<img/>",
    INPUT: "<input>",
    FORM: "<form>",
    CLASS: "class",
    SRC: "src",
    ALT: "alt",
    SCRIPT: "script",
    TYPE_TEXT: "text/javascript",
    HEAD: "head",
    CURSOR: "cursor",
    POINTER: "pointer",
    CHECKED: ":checked",
    TYPE: "type",
    FOOTER: "footer"
};
const CONST = {
    ADD_TO_CART_BUTTON: ".addToCartButton",
    ADD_TO_CART_LAYER: "#cboxContent",
    ADD_TO_CART_DIV: ".addtocart",
    DEFAULT_SPINNER_SIZE: "6",
    PAYPAL_CHECKOUT_IMAGE: ".payPalCheckoutAddToCartImage",
    SINGLE_USE_CHECKBOX: "#singleUseCheckboxAddToCart",
    MINI_CART: ".miniCart",
    MINI_CART_LAYER: "#miniCartLayer",
    PAYPAL_CHECKOUT_MINI_IMAGE: ".payPalCheckoutMiniCartImage",
    SINGLE_USE_MINI_CHECKBOX: "#singleUseCheckboxMiniCart",
    NO_PAYMENT_METHODS_MESSAGE: ".no-payment-methods-message.headline",
    FOOTER: ".footer",
    PAYMENT_OPTIONS: "paymentOptions",
    PAYMENT_OPTIONS_CLASS: ".paymentOptions",
    FOOTER_IMG_SRC: "https://www.paypalobjects.com/webstatic/en_US/i/buttons/cc-badges-ppmcvdam.png",
    PAYMENT_OPTIONS_TEXT: "Payment options",
    GLOBAL_MESSAGES: "#globalMessages",
    PAYPAL_BUTTON_MESSAGE: "#paypalButtonError",
    VALIDATION_CLASS: ".bt_validation",
    ERROR_DIV: "<div class='alert alert-danger'>",
    WARNING_DIV: "<div class='alert alert-warning'>",
    PAYMENT_METHOD_SECTION: "[name=paymentMethodSelection]",
    PAYMENT_METHOD_SECTION_CHECKED: "input[name=paymentMethodSelection]:radio:checked",
    BT_LIBS: [
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/client.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/data-collector.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/paypal-checkout.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/apple-pay.min.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/venmo.min.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/local-payment.min.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/three-d-secure.min.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/client.min.js",
        "https://pay.google.com/gp/p/js/pay.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/google-payment.min.js",
        "https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/integration/v1/sdk.js",
        BRAINTREEGATEWAY_URL + SDK_VERSION + "/js/visa-checkout.min.js",
        BRAINTREEGATEWAY_URL + "dropin/1.33.2/js/dropin.min.js"

    ],
    HOSTED_FIELDS: ".hostedFields",
    HOSTED_FIELDS_FIELDS_EMPTY: "HOSTED_FIELDS_FIELDS_EMPTY",
    HOSTED_FIELDS_FIELDS_INVALID: "HOSTED_FIELDS_FIELDS_INVALID",
    HOSTED_FIELDS_FAILED_TOKENIZATION: "HOSTED_FIELDS_FAILED_TOKENIZATION",
    HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR: "HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR",
    BILLING_ADDRESS_DATA: ".billingAddressData",
    CREADIT_CARD_LABEL_ID: "#creditCardLabelId",
    DISABLED: 'DISABLED',
    ALWAYS: 'ALWAYS',
    AUTO: 'AUTO',
    HEADLINE: 'headline',
    DISABLE_CLICK: 'disableClick',
    PAYPAL: 'paypal',
    APPLEPAY_VAL: "applePay",
    GOOGLEPAY_VAL: "googlePay",
    SRC: "src",
    SELECT_PAYMENT: '#select_payment',
    PAYMENT_METHOD_PAYPAL: '#paymentMethodPayPal',
    IMPORT_PAYPAL_CHECKOUT_DATA_SCRIPT: '#importPayPalCheckoutDataScript',
    PROP_CHECKED: 'checked',
    PAYMENT_TYPE: "payment_type",
    DEVICE_DATA: "device_data",
    IS_3D_SECURE_FLOW: "is3dSecureFlow",
    CARDHOLDER: "cardholder",
    PAYER_EMAIL: "payer_email",
    CARD_TYPE: "card_type",
    CARD_DETAILS: "card_details",
    CARD_EXPIRES_MONTH: "card_expires_month",
    CARD_EXPIRES_YEAR: "card_expires_year",
    PAYMENT_METHOD_NONCE: "bt_payment_method_nonce",
    ATTR_ACTION: "action",
    ATTR_METHOD: "method",
    ATTR_NAME: "name",
    PAYPAL_CMS_IMAGE_SELECTOR: '.paypalimage .cmsimage img',
    PAYPAL_CHECKOUT_IMAGE_SELECTOR: '.payPalCheckoutImage .cmsimage img',
    LIABILITY_SHIFTED: "liability_shifted",
    ERROR_ALERT_NEGATIVE_CSS_CLASS: 'alert alert-danger alert-dismissable braintree-error',
    ERROR_ALERT_SHIPPING_ADDRESS: 'alert alert-danger alert-dismissable getAccAlert alert-shipping-address',
    SKIP_TO_CONTENT: '#skip-to-content',
    FORM_METHOD_POST: "POST",
    BRAINTREE_PAYMENT_FORM_ID: 'braintree-payment-form',
    SUBMIT_CILENT_ORDER_POST_FORM_ID: '#submit_silentOrderPostForm',
    SAVE_PAYMENT_INFO_ID: '#savePaymentInfo',
    SINGLE_USE_CHECKBOX_ID: '#singleUseCheckbox',
    ALERT_POSITIVE_BT_VALIDATION_CSS_CLASS: 'alert positive bt_validation',
    NUMBER_ID: "#number",
    EXPIRATION_DATE_ID: "#expiration-date",
    CVV_ID: "#cvv",
    CREDIT_CARD_PAYMENT_METHOD_ID: '#creditCardPaymentMethod',
    USE_DELIVERY_ADDRESS_ID: '#useDeliveryAddress',
    PAYPAL_EXPRESS_FORM_NAME: "payPalExpress",
    LOCAL_PAYMENT_FORM_NAME: "localPayment",
    VENMO_PAYMENT_FORM_NAME: "venmoPayment",
    VENMO_ACCOUNT: "VenmoAccount",
    GOOGLE_PAY_ACCOUNT: "AndroidPayCard",
    GOOGLE_PAY_PAYMENT_FORM_NAME: "googlePayPayment",
    CUSTOM_SINGLE_USE_CHECKBOX_ID: '#customSingleUseCheckbox',
    PAYPAL_IS_VALID_ID: '#paypal_is_valid',
    PAYPAL_EMAIL_ID: '#paypal_email',
    PAYPAL_EXPRESS_ERROR_ID: '#paypal_express_error',
    CARD_HOLDER_ID: "#cardholderName",
    CONTAINER_CLASS: ".container-fluid",
    PAYPAL_VAL: "paypal",
    BT_VAL: "bt",
    LOCAL_PAYMENTS_VAL: "lpm",
    VENMO_VAL: "venmo",
    PAYPAL_BUTTON_CONTAINER: ".paypal-button-in-popup",
    PAYPAL_BUTTON_CART_CONTAINER: ".paypal-button-in-cart-popup",
    PAYPAL_BUTTON: ".paypal-button",
    MARK_PAYPAL_BUTTON: "#mark-paypal-button",
    GOOGLE_PAY_BUTTON: "#google-pay-button",
    SRC_BUTTON: "#src-button",
    LPM_BUTTONS: "#lpm-buttons",
    VENMO_BUTTON: "#venmo-button",
    VAULT_FLOW: "vault",
    CHECKOUT_FLOW: "checkout",
    TRUE: "true",
    FALSE: "false",
    ON_SUCCESS: "onSuccess",
    INTENT_SALE: "sale",
    APPLE_PAY_BUTTON_SELECTOR: ".apple-pay-button",
    APPLE_PAY_BUTTON: "#apple-pay-button",
    APPLE_PAY_BUTTON_ID: "apple-pay-button",
    HIDE: "hide",
    PAYMENT_METHOD_APPLE_PAY: "#paymentMethodApplePay",
    PAYMENT_METHOD_GOOGLE_PAY: "#paymentMethodGooglePay",
    PAYMENT_METHOD_LOCAL_PAYMENT: "#paymentMethodLpm",
    PAYMENT_METHOD_VENMO: "#paymentMethodVenmo",
    PAYMENT_METHOD_SRC: "#paymentMethodSrc",
    APPLE_PAY_BUTTON_CONTAINER: ".apple-pay-button-container",
    APPLEPAY_SELECTOR: "#applepay",
    VENMO_SELECTOR: "#venmo",
    GOOGLEPAY_SELECTOR: "#googlepay",
    INTENT_AUTHORIZE: "authorize",
    INTENT_CAPTURE: "capture",
    SAVE_PAYMENT_INFO_COMPONENT: "#savePaymentInfoComponent",
    PAYPAL_FUNDING_CARD: "card",
    PAYPAL_FUNDING_PAYLATER: "paylater",
    DROP_IN_CONTAINER: '#dropin-container',
    DROP_IN_MINI_CART_CONTAINER: '#dropin-container-mini-cart',
    DROP_IN_ADD_PAYMENT_CONTAINER: 'dropin-container-add-payment-method',
    DROP_IN_CONTAINER_EXPRESS_CHECKOUT: 'dropin-container-express-checkout',
    DROP_IN_MY_ACCOUNT_CONTAINER: 'dropin-container-my-account',
    DROP_IN_SUBMIT_BUTTON: '#submit-button',
    DROP_IN_SUBMIT_BUTTON_ADD_PAYMENT: 'submit-button-add-payment-method',
    BILLING_ADDRESS_DATA_CONTAINER: 'billingAddressData',
    NO_SAVED_PAYMENT_METHODS_MESSAGE: 'dropin-no-saved-payments',
    LOGIN_SAVE_PAYMENT_INFO_BUTTONS_CONTAINER: 'login-save-payment-info-buttons',
    WAIT_SPINNER: 'wait-spinner',
    MINI_CART_BODY: 'mini-cart-body',
    ADD_TO_CART: 'add-to-cart',
    PAY_PAL_PAY_LATER_MESSAGE: 'paypal-credit-message',
    SECURITY_CANCEL_POPUP_ID: 'security-cancel-popup',
    SAVE_ADDRESS_CHECKBOX:'#shouldSaveAddressMyAccount',
    SAVE_ADDRESS_CHECKBOX_DROP_IN:'#shouldSaveAddressMyAccountDropIn',
    VERIFY_CVV_BUTTON: "verify-cvv-button",
    VERIFY_CVV_CANCEL_BUTTON: "verify-cvv-cancel-button"
};
const EVENTS = {
    HOVER: "hover",
    CLICK: "click",
    CHANGE: "change"
};
