1import{a as e}from"./masks-C5JVZ-19.js";import{t}from"./dom-BcXq5yYT.js";import{t as n}from"./street-number-sn-DEH6ndYj.js";document.addEventListener(`DOMContentLoaded`,()=>{e(document.getElementById(`reg_billing_cpf_cnpj`),{isPF:!0}),e(document.getElementById(`customer_cpf_cnpj`),{isPF:!0}),n(`reg_billing_number_sn`,`reg_billing_number`)}),document.addEventListener(`change`,t=>{if(t.target?.matches?.(`.my_account_person_type`)){let n=String(t.target.value)===`1`;e(document.getElementById(`reg_billing_cpf_cnpj`),{isPF:n})}if(t.target?.matches?.(`.customer_person_type`)){let n=String(t.target.value)===`1`;e(document.getElementById(`customer_cpf_cnpj`),{isPF:n})}}),jQuery(document).on(`click`,`a.return_to`,function(){jQuery(`#form_checkout_password, #form_checkout_password_confirm`).fadeOut(400,function(){jQuery(`#form_checkout_login`).fadeIn(400)})}),jQuery(document).on(`submit`,`#form_checkout_login`,function(e){e.preventDefault();let n=jQuery(this).serializeArray(),r=window.TZ?.baseUrl??``;jQuery.ajax({headers:{accept:`application/json`,"Access-Control-Allow-Origin":`*`},url:`${r}/tz-checkout/?customer_email=${n[0].value}&customer_person_type=${n[1].value}&customer_cpf_cnpj=${n[2].value}`,success:e=>{let n=JSON.parse(e),r=jQuery(`h3.subtitle.authenticated`);n.has_account?jQuery(`.form-checkout-login`).fadeOut(400,function(){jQuery(`.form-checkout-password`).fadeIn(400),jQuery(`input.customer-email`).val(n.user_email),r.html(`Olá ${t(n.first_name)}, falta pouco para finalizar sua compra.`)}):jQuery(`.form-checkout-login`).fadeOut(400,function(){jQuery(`.form-checkout-password-confirm`).fadeIn(400),jQuery(`input.customer-email`).val(n.user_email)})},error:e=>console.error(`Erro ao buscar dados de cliente: ${e.responseText}`),beforeSend:()=>jQuery(`.customer-email-control`).addClass(`is-loading`),complete:()=>{jQuery(`.customer-email-control`).removeClass(`is-loading`),jQuery(`.is-login-error`).addClass(`hidden`),jQuery(`.customer-password`).removeClass(`is-danger`)}})}),jQuery(document).on(`submit`,`#form_checkout_password`,function(e){e.preventDefault();let t=jQuery(this).serializeArray(),n=window.TZ?.baseUrl??``;jQuery.ajax({headers:{accept:`application/json`,"Access-Control-Allow-Origin":`*`},method:`POST`,url:`${n}/tz-checkout`,data:t,success:e=>{let t=JSON.parse(e);t.logged?document.location.reload():(jQuery(`.is-login-error`).removeClass(`hidden`).html(t.errors),jQuery(`.customer-password`).addClass(`is-danger`))},error:e=>console.error(`Erro ao autenticar cliente: ${e.responseText}`),beforeSend:()=>jQuery(`.customer-auth-control`).addClass(`is-loading`),complete:()=>jQuery(`.customer-auth-control`).removeClass(`is-loading`)})}),jQuery(document).on(`submit`,`#form_checkout_password_confirm`,function(e){e.preventDefault();let t=jQuery(this).serializeArray(),n=window.TZ?.baseUrl??``;if(t[1].value!==t[2].value){jQuery(`.is-password-error`).removeClass(`hidden`).html(`As senhas digitadas não são iguais.`),jQuery(`.customer-password-confirm`).addClass(`is-danger`);return}jQuery(`.is-password-error`).addClass(`hidden`).html(``),jQuery(`.customer-password-confirm`).removeClass(`is-danger`),jQuery.ajax({headers:{accept:`application/json`,"Access-Control-Allow-Origin":`*`},method:`POST`,url:`${n}/tz-checkout`,data:t,success:e=>{let t=JSON.parse(e);t.logged?document.location.reload():(jQuery(`.is-password-error`).removeClass(`hidden`).html(t.errorMessage),jQuery(`.customer-password-confirm`).addClass(`is-danger`))},error:e=>console.error(`Erro ao registrar cliente: ${e.responseText}`),beforeSend:()=>jQuery(`.customer-auth-control`).addClass(`is-loading`),complete:()=>jQuery(`.customer-auth-control`).removeClass(`is-loading`)})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.