{"version":3,"sources":["wc-square.min.js"],"names":["_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","indexOf","jQuery","document","ready","$","window","WC_Square_Payment_Form_Handler","args","this","set_payment_fields","bind","get_form_params","handle_input_event","handle_verify_buyer_response","id","id_dasherized","csc_required","enabled_card_types","square_card_types","ajax_log_nonce","ajax_url","application_id","currency_code","general_error","input_styles","is_3ds_enabled","is_3d_secure_enabled","is_add_payment_method_page","is_checkout_registration_enabled","is_user_logged_in","location_id","logging_enabled","form","handle_checkout_page","handle_pay_page","log","handle_add_payment_method_page","params","body","on","val","payment_form","recalculateSize","value","_this","handle_saved_payment_methods","validate_payment_data","$new_payment_method_selection","form_handler","change","slideUp","slideDown","is","show_save_payment_checkbox","hide_save_payment_checkbox","_this2","submit","_this3","_","field","ref","form_fields","attr","replaceWith","handle_form_loaded","destroy","SqPaymentForm","build","_this4","card_number","expiration","csc","postal_code","applicationId","locationId","cardNumber","elementId","placeholder","data","expirationDate","cvv","postalCode","inputClass","inputStyles","callbacks","inputEventReceived","event","cardNonceResponseReceived","errors","nonce","cardData","handle_card_nonce_response","unsupportedBrowserDetected","handle_unsupported_browser","paymentFormLoaded","setPostalCode","addClass","$input","eventType","handle_card_brand_change","cardBrand","brand","card_class","c","replace","call","tokenized_card_id","has_nonce","get_tokenized_payment_method_id","has_verification_token","block_ui","verifyBuyer","get_verification_details","requestCardNonce","find","message","handle_errors","log_data","last_4","exp_month","exp_year","billing_postal_code","verification_result","token","ref1","ref2","ref3","ref4","ref5","ref6","ref7","ref8","ref9","verification_details","billingContact","familyName","givenName","email","country","region","city","phone","addressLines","intent","get_intent","amount","get_amount","currencyCode","$save_method_input","save_payment_method","field_order","messages","_this5","arguments","undefined","sort","a","b","console","error","each","index","type","push","render_errors","unblock_ui","remove","prepend","join","removeClass","unblock","blur","animate","scrollTop","offset","top","block","overlayCSS","background","opacity","$parent_row","closest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