PageSourceSearch

https://autoscr.ai/_next/static/chunks/7858-3b42b8439f67fa60.js?dpl=dpl_HZ2QwMkvkfcgstzZfRwTn6aWMvkJ

js autoscr.ai collected 2026-10-05 15:20:02 UTC 12,772 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="320f9eb8-a7a7-4389-9cc5-535c885843b9",e._sentryDebugIdIdentifier="sentry-dbid-320f9eb8-a7a7-4389-9cc5-535c885843b9")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7858],{34033:(e,t,a)=>{a.d(t,{AE:()=>r,Af:()=>l,FS:()=>i,y:()=>n});let i=[{code:"CR",name:"Costa Rica"},{code:"US",name:"Estados Unidos"},{code:"MX",name:"M\xe9xico"},{code:"PA",name:"Panam\xe1"},{code:"NI",name:"Nicaragua"},{code:"GT",name:"Guatemala"},{code:"SV",name:"El Salvador"},{code:"HN",name:"Honduras"},{code:"CO",name:"Colombia"},{code:"ES",name:"Espa\xf1a"}],r=[{code:"SJ",name:"San Jos\xe9"},{code:"A",name:"Alajuela"},{code:"C",name:"Cartago"},{code:"H",name:"Heredia"},{code:"G",name:"Guanacaste"},{code:"P",name:"Puntarenas"},{code:"L",name:"Lim\xf3n"}];function l(e){for(let t of[{field:"firstName",test:e=>e.length>=1&&e.length<=50&&s.test(e),reason:"Nombre requerido (1-50 caracteres, solo letras)."},{field:"lastName",test:e=>e.length>=1&&e.length<=50&&s.test(e),reason:"Apellido requerido (1-50 caracteres, solo letras)."},{field:"email",test:e=>o.test(e),reason:"Email inv\xe1lido."},{field:"telephone",test:e=>d.test(e),reason:"Tel\xe9fono debe ser +CC seguido de 7-15 d\xedgitos (ej. +50688881111)."},{field:"address",test:e=>e.length>=5&&e.length<=200,reason:"Direcci\xf3n requerida (5-200 caracteres)."},{field:"city",test:e=>e.length>=1&&e.length<=80,reason:"Ciudad requerida (1-80 caracteres)."},{field:"state",test:e=>e.length>=1&&e.length<=80,reason:"Provincia requerida (1-80 caracteres)."},{field:"zipPostCode",test:e=>e.length>=4&&e.length<=10,reason:"C\xf3digo postal requerido (4-10 caracteres)."},{field:"country",test:e=>c.test(e),reason:"Pa\xeds requerido (ISO 3166-1 alpha-2, ej. CR)."}])if(!t.test(e[t.field]))return{field:t.field,reason:t.reason};return null}function n(e){let t=e.trim();if(0===t.length)return{reason:"Ingres\xe1 el n\xfamero de tarjeta."};let a=t.replace(/[\s-]/g,"");return/^\d+$/.test(a)?a.length<12||a.length>19?{reason:"El n\xfamero de tarjeta debe tener entre 12 y 19 d\xedgitos."}:!function(e){let t=0,a=!1;for(let i=e.length-1;i>=0;i--){let r=e.charCodeAt(i)-48;a&&(r*=2)>9&&(r-=9),t+=r,a=!a}return t%10==0}(a)?{reason:"N\xfamero de tarjeta inv\xe1lido — revis\xe1 los d\xedgitos."}:null:{reason:"El n\xfamero de tarjeta solo debe tener d\xedgitos."}}let s=/^[\p{L} '-]+$/u,o=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,d=/^\+\d{1,3}\d{7,15}$/,c=/^[A-Z]{2}$/},53074:(e,t,a)=>{a.d(t,{TilopayCheckout:()=>s});var i=a(43971),r=a(83257),l=a(12547),n=a(34033);function s(e){let{billingDetails:t,currency:a="CRC",language:s="es",onError:c,orderId:u,redirectPath:m,submitLabel:f="Pagar",externalSubmit:p=!1,onSubmitStateChange:g}=e,[h,b]=(0,l.useState)("loading-sdk"),[y,v]=(0,l.useState)(null),[k,C]=(0,l.useState)(null),[j,x]=(0,l.useState)(!1),[T,N]=(0,l.useState)([]),[P,E]=(0,l.useState)(null),S=(0,l.useRef)(null),w=(0,l.useRef)(!1),I=(0,l.useRef)(h);I.current=h;let F=(0,l.useRef)(!1),R=(0,l.useRef)(!0);(0,l.useEffect)(()=>(R.current=!0,()=>{R.current=!1}),[]);let $=(0,l.useRef)(!1),D=(0,l.useCallback)(e=>{v(e),b("error"),c?.(e)},[c]),A=(0,l.useRef)(D);A.current=D,(0,l.useEffect)(()=>{if("fetching-token"!==h)return;let e=!1;return(async()=>{try{let t=await fetch("/api/payments/login-token",{method:"POST",headers:{"content-type":"application/json"}});if(e)return;if(!t.ok)return void D({kind:"token-fetch-failed",status:t.status});let a=await t.json();if(e)return;C(a.token),b("initializing")}catch{e||D({kind:"token-fetch-failed",status:0})}})(),()=>{e=!0}},[h,D]),(0,l.useEffect)(()=>{if("initializing"!==h||!k||!j||w.current)return;w.current=!0;let t=window.Tilopay;if(!t)return void A.current({kind:"sdk-init-failed",message:"Tilopay global not present at init time"});let i=!1;return(async()=>{try{let r=function(e){if(!e.redirectPath.startsWith("/")||e.redirectPath.startsWith("//")||e.redirectPath.includes("\\"))throw Error('TilopayCheckout: redirectPath must be a same-origin relative path starting with "/", with no backslashes');if(0===e.orderId.length||e.orderId.length>128||!/^[a-zA-Z0-9_-]+$/.test(e.orderId))throw Error("TilopayCheckout: orderId must be 1-128 chars of [a-zA-Z0-9_-]");let t=`${window.location.origin}${e.redirectPath}`,a={token:e.token,currency:e.currency,orderNumber:e.orderId,redirect:t,language:e.language,billToFirstName:e.billingDetails.firstName,billToLastName:e.billingDetails.lastName,billToEmail:e.billingDetails.email,billToTelephone:e.billingDetails.telephone,billToAddress:e.billingDetails.address,billToCity:e.billingDetails.city,billToState:e.billingDetails.state,billToZipPost
1Code:e.billingDetails.zipPostCode,billToCountry:e.billingDetails.country};return"one-time"===e.mode?{...a,subscription:0,amount:(e.amountCents??0)/100}:{...a,subscription:1,plan_id:e.planId}}({...e,token:k,currency:a,language:s}),l=await t.Init(r);if(i)return;if("success"!==l.message.toLowerCase())return void A.current({kind:"sdk-init-failed",message:l.message});N(l.methods??[]),b("ready")}catch(e){if(!i){let t=e instanceof Error?e.message:String(e);console.error("Tilopay.Init threw:",t),A.current({kind:"sdk-init-failed",message:t})}}})(),()=>{i=!0,w.current=!1}},[h,k,j]);let q=(0,l.useCallback)(()=>{if(!R.current||"ready"!==I.current||F.current)return;let e=(0,n.Af)(t);if(e)return void c?.({kind:"validation-failed",field:e.field,reason:e.reason});let a=S.current?.value;if(void 0!==a){let e=(0,n.y)(a);if(e){E(e.reason),c?.({kind:"validation-failed",field:"card",reason:e.reason});return}}E(null);let i=window.Tilopay;if(!i)return void D({kind:"sdk-init-failed",message:"Tilopay global lost before submit"});F.current=!0,b("submitting");try{i.updateOptions?.({billToFirstName:t.firstName,billToLastName:t.lastName,billToEmail:t.email,billToTelephone:t.telephone,billToAddress:t.address,billToCity:t.city,billToState:t.state,billToZipPostCode:t.zipPostCode,billToCountry:t.country});let e=i.startPayment();e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&e.message.length>0?D({kind:"sdk-init-failed",message:e.message}):e&&"function"==typeof e.then&&e.catch(e=>{R.current&&D({kind:"sdk-init-failed",message:e instanceof Error?e.message:String(e)})})}catch(e){D({kind:"sdk-init-failed",message:e instanceof Error?e.message:String(e)})}},[t,c,D]);(0,l.useEffect)(()=>{g?.({submit:q,disabled:"ready"!==h,busy:"submitting"===h})},[g,q,h]);let z=(0,l.useCallback)(()=>{$.current||b("fetching-token")},[]),_=(0,l.useCallback)(()=>{$.current||($.current=!0,D({kind:"sdk-load-failed"}))},[D]),L=(0,l.useCallback)(()=>{x(!0)},[]),O=(0,l.useCallback)(()=>{$.current||($.current=!0,D({kind:"sdk-load-failed"}))},[D]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.default,{src:"https://code.jquery.com/jquery-3.7.1.min.js",integrity:"sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=",crossOrigin:"anonymous",strategy:"afterInteractive",onLoad:L,onError:O,"data-testid":"tilopay-jquery-script"}),(0,i.jsx)(r.default,{src:"https://app.tilopay.com/sdk/v1/sdk.min.js",strategy:"afterInteractive",onLoad:z,onError:_,"data-testid":"tilopay-sdk-script"}),(0,i.jsxs)("div",{className:"tilopay-sdk-fields","aria-label":"Pago seguro v\xeda Tilopay",children:[(0,i.jsx)("label",{htmlFor:"method",children:"Tipo de tarjeta"}),(0,i.jsx)("select",{id:"method",name:"method",disabled:"ready"!==h,children:0===T.length?(0,i.jsx)("option",{value:"",children:"Seleccion\xe1 un m\xe9todo de pago"}):T.map((e,t)=>{let a=d(e,["code","value","id","name"])??`tilopay-method-${t}`,r=d(e,["name","label","code"])??a;return(0,i.jsx)("option",{value:a,children:r},a)})}),(0,i.jsx)("label",{htmlFor:"cards",children:"Tarjetas guardadas"}),(0,i.jsx)("select",{id:"cards",name:"cards",defaultValue:"",children:(0,i.jsx)("option",{value:"",children:"Sin tarjetas guardadas"})}),(0,i.jsx)("label",{htmlFor:"ccnumber",children:"N\xfamero de tarjeta"}),(0,i.jsx)("input",{id:"ccnumber",name:"ccnumber",type:"text",autoComplete:"cc-number",ref:S,"aria-invalid":!!P||void 0,"aria-describedby":P?"ccnumber-error":void 0,onInput:P?()=>E(null):void 0}),P?(0,i.jsx)("p",{id:"ccnumber-error",role:"alert",className:"tilopay-field-error",children:P}):null,(0,i.jsx)("label",{htmlFor:"expdate",children:"Vencimiento (MM/YY)"}),(0,i.jsx)("input",{id:"expdate",name:"expdate",type:"text",autoComplete:"cc-exp"}),(0,i.jsx)("label",{htmlFor:"cvv",children:"CVV"}),(0,i.jsx)("input",{id:"cvv",name:"cvv",type:"text",autoComplete:"cc-csc"}),(0,i.jsx)("div",{id:"result","aria-live":"polite"})]}),p?null:(0,i.jsx)("button",{type:"button",onClick:q,disabled:"ready"!==h,"aria-busy":"submitting"===h,children:"submitting"===h?"Procesando…":f}),y?(0,i.jsx)(o,{state:y}):null]})}function o({state:e}){let t=function(e){switch(e.kind){case"sdk-load-failed":return"No pudimos cargar el procesador de pagos. Recarg\xe1 la p\xe1gina.";case"token-fetch-failed":if(401===e.status)return"Tu sesi\xf3n expir\xf3 — inici\xe1 sesi\xf3n y volv\xe9 a esta p\xe1gina.";
1return"Procesador de pagos no disponible. Intent\xe1 de nuevo en unos minutos.";case"sdk-init-failed":return"No pudimos inicializar el formulario de pago. Intent\xe1 recargar la p\xe1gina.";case"validation-failed":return e.reason;default:return"Algo sali\xf3 mal. Recarg\xe1 la p\xe1gina."}}(e),a="sdk-load-failed"===e.kind||"sdk-init-failed"===e.kind||"token-fetch-failed"===e.kind&&401!==e.status;return(0,i.jsxs)("div",{role:"alert",className:"tilopay-error-banner",children:[(0,i.jsx)("p",{children:t}),a?(0,i.jsx)("button",{type:"button",onClick:()=>window.location.reload(),children:"Reintentar"}):null]})}function d(e,t){for(let a of t){let t=e[a];if("string"==typeof t&&t.length>0)return t}return null}},86561:(e,t,a)=>{a.d(t,{BillingDetailsForm:()=>u});var i=a(43971),r=a(12547),l=a(34033);let n="OTHER",s={firstName:"Nombre",lastName:"Apellido",email:"Email",telephone:"Tel\xe9fono",address:"Direcci\xf3n",city:"Ciudad",state:"Provincia",zipPostCode:"C\xf3digo postal",country:"Pa\xeds"},o={firstName:"given-name",lastName:"family-name",email:"email",telephone:"tel",address:"street-address",city:"address-level2",state:"address-level1",zipPostCode:"postal-code",country:"country"},d={firstName:"text",lastName:"text",email:"email",telephone:"tel",address:"text",city:"text",state:"text",zipPostCode:"text",country:"text"},c=["firstName","lastName","email","telephone","address","city","state","zipPostCode","country"];function u({value:e,onChange:t,errors:a,disabled:u}){let[m,f]=(0,r.useState)(()=>""!==e.country&&!l.FS.some(t=>t.code===e.country));return(0,i.jsx)("form",{noValidate:!0,"aria-label":"Datos de facturaci\xf3n",children:c.map(r=>{let c=a?.[r],p=`billing-${r}`,g="state"===r&&"CR"===e.country.toUpperCase(),h="country"===r;return(0,i.jsxs)("div",{className:`tilopay-billing-field tilopay-billing-field--${r}`,children:[(0,i.jsx)("label",{htmlFor:p,children:s[r]}),g?(0,i.jsxs)("select",{id:p,name:r,autoComplete:o[r],value:e[r],disabled:u,"aria-invalid":c?"true":"false","aria-describedby":c?`${p}-error`:void 0,onChange:a=>t({...e,[r]:a.target.value}),children:[(0,i.jsx)("option",{value:"",children:"Seleccion\xe1 tu provincia"}),l.AE.map(e=>(0,i.jsx)("option",{value:e.code,children:e.name},e.code))]}):h&&m?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{id:p,name:r,type:"text",inputMode:"text",maxLength:2,autoComplete:o[r],placeholder:"ej. FR",value:e[r],disabled:u,"aria-invalid":c?"true":"false","aria-describedby":c?`${p}-error`:`${p}-hint`,onChange:a=>t({...e,[r]:a.target.value.toUpperCase()})}),(0,i.jsx)("p",{id:`${p}-hint`,className:"tilopay-billing-hint",children:"C\xf3digo ISO 3166-1 alfa-2 de tu pa\xeds (2 letras, ej. FR para Francia)."}),(0,i.jsx)("button",{type:"button",className:"tilopay-billing-link-button",disabled:u,onClick:()=>{f(!1),t({...e,[r]:""})},children:"Elegir de la lista"})]}):h?(0,i.jsxs)("select",{id:p,name:r,autoComplete:o[r],value:e[r],disabled:u,"aria-invalid":c?"true":"false","aria-describedby":c?`${p}-error`:void 0,onChange:a=>{if(a.target.value===n){f(!0),t({...e,[r]:""});return}t({...e,[r]:a.target.value})},children:[(0,i.jsx)("option",{value:"",children:"Seleccion\xe1 tu pa\xeds"}),l.FS.map(e=>(0,i.jsx)("option",{value:e.code,children:e.name},e.code)),(0,i.jsx)("option",{value:n,children:"Otro pa\xeds…"})]}):(0,i.jsx)("input",{id:p,name:r,type:d[r],autoComplete:o[r],value:e[r],disabled:u,"aria-invalid":c?"true":"false","aria-describedby":c?`${p}-error`:void 0,onChange:a=>t({...e,[r]:a.target.value})}),c?(0,i.jsx)("p",{id:`${p}-error`,role:"alert",className:"tilopay-billing-error",children:c}):null]},r)})})}}}]);

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.