PageSourceSearch

https://www.jamar.com/cdn/shop/t/986/assets/jamar-salesforce-form.BCFAW7fD.min.js

js jamar.com collected 2026-10-03 21:44:44 UTC 3,545 bytes, 1 lines download raw bytes

1import{m as i,af as n,ag as d,ae as l}from"./theme.D5GpFpk3.min.js";import{J as c}from"./just-validate.es.K-8qVy6Y.min.js";import{s as t}from"./sanitize-func.C-9_75VK.min.js";import"./modulepreload-polyfill.BCYanipZ.min.js";i.data("jamarSalesforceForm",()=>({departments:[],department:"",cities:[],citie:"",isSubmitting:!1,fechaTexto:"",async init(){this.initDatePicker(),this.setUpValidator(),await this.getDepartment()},onFechaChange(e){const r=e.target.value;if(!r){this.fechaTexto="";return}const[s,a,o]=r.split("-");this.fechaTexto=`${o}/${a}/${s}`},initDatePicker(){const e=this.$refs.fechaBoda;e&&typeof e.showPicker=="function"&&e.addEventListener("click",()=>{e.showPicker()})},async getDepartment(){const e=await fetch(n(),{method:"GET",headers:{"Content-Type":"application/json"}}),{data:r}=await e.json();this.departments=r},async onDepartmentChange(){if(!this.department)return;const e=await fetch(d({department:this.department}),{method:"GET",headers:{"Content-Type":"application/json"}}),{data:r}=await e.json();this.cities=r},setUpValidator(){new c(this.$refs.form,{validateBeforeSubmitting:!0,errorLabelCssClass:["just-validate-error-label","text-fine","mt-1"],errorLabelStyle:{color:"#A21A10"}}).addField(this.$refs.nombre,[{rule:"required",errorMessage:"Ingresa el nombre de la novia o del novio."},{rule:"customRegexp",value:/^[a-zA-ZáéíóúÁÉÍÓÚñÑ\s]+$/,errorMessage:"El nombre solo puede contener letras"}]).addField(this.$refs.cedula,[{rule:"required",errorMessage:"Digita el número de cédula."}]).addField(this.$refs.email,[{rule:"required",errorMessage:"Ingresa un correo electrónico válido."},{rule:"email",errorMessage:"Ingresa un correo electrónico válido."}]).addField(this.$refs.celular,[{rule:"required",errorMessage:"Ingresa un número celular."}]).addField(this.$refs.departamento,[{rule:"required",errorMessage:"Selecciona el departamento donde viven."}]).addField(this.$refs.ciudad,[{rule:"required",errorMessage:"Selecciona la ciudad donde viven."}]).addField(this.$refs.fechaBoda,[{rule:"required",errorMessage:"Selecciona la fecha de la boda."}]).addField(this.$refs.terms,[{rule:"required",errorMessage:"Debes aceptar los términos y condiciones y el tratamiento de datos*"}]).onSuccess(()=>this.onSubmit())},async onSubmit(){const e=this.departments.find(a=>a.code===this.department),r=this.cities.find(a=>a.code===this.$refs.ciudad.value),s={nombre:t(this.$refs.nombre.value),identificacion:this.$refs.cedula.value,idCliente:`JA_${this.$refs.cedula.value}`,correoElectronico:t(this.$refs.email.value),whatsapp:`+57${this.$refs.celular.value}`,departamento:(e==null?void 0:e.label)||this.department,ciudadResidencia:(r==null?void 0:r.label)||this.$refs.ciudad.value,empresa:"JA",nomPais:"Colombia",FechaEvento:this.$refs.fechaBoda.value,origen:"Web Site",descripcion:"Club Novios Jamar",webSite:window.location.href};try{this.isSubmitting=!0,await this.sendToSalesForceform(s),this.showSuccess()}catch(a){console.error("Error sending data to Salesforce:",a),this.isSubmitting=!1}},showSuccess(){this.$refs.contentWrapper.classList.add("hidden"),this.$refs.successWrapper.classList.remove("hidden"),this.$refs.successWrapper.classList.add("flex")},async sendToSalesForceform(e){const r=await fetch(l(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok)throw new Error("Error sending data to Salesforce");return r.json()}}));class h extends HTMLElement{connectedCallback(){i.initTree(this)}}window.customElements.define("jamar-salesforce-form",h);

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.