1!function(){function o(o,e){const a=`https://api.mercadopago.com/ppcore/prod/monitor/v1/event/datadog/big/${o}`;navigator.sendBeacon(a,JSON.stringify(e))}function e(o,e){return{value:o,message:e,plugin_version:wc_mercadopago_woocommerce_scripts_params.plugin_version,platform:{name:"woocommerce",uri:wc_mercadopago_woocommerce_scripts_params.theme,version:wc_mercadopago_woocommerce_scripts_params.platform_version,url:`${window.location.origin}${window.location.pathname}`,details:{site_id:wc_mercadopago_woocommerce_scripts_params.site_id||"",environment:"prod",cust_id:wc_mercadopago_woocommerce_scripts_params.cust_id||""}}}}try{const a=document.createElement("script");a.setAttribute("id","mp_behavior_tracking"),a.src="https://http2.mlstatic.com/storage/v1/mercadopago/woocommerce/scripts/behavior-tracking.min.js",a.defer=!0,a.onerror=function(){o("failed_to_load_mp_behavior_tracking",e("true","Unable to load mp behavior tracking on page"))},document.head.appendChild(a)}catch(a){o("failed_to_load_mp_behavior_tracking",e(null,"Failed to load mp behavior tracking script on page"))}}();; 2!function(){const t=wc_mercadopago_health_monitor_params,e={background:["background-color","background-image","background-position-x","background-position-y","background-repeat","background-attachment","background-origin","background-clip","background-size"],border:["border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color"],margin:["margin-top","margin-right","margin-bottom","margin-left"],padding:["padding-top","padding-right","padding-bottom","padding-left"],"border-radius":["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],font:["font-style","font-variant-caps","font-weight","font-size","line-height","font-family"],flex:["flex-grow","flex-shrink","flex-basis"],outline:["outline-color","outline-style","outline-width"],overflow:["overflow-x","overflow-y"],gap:["row-gap","column-gap"],"border-color":["border-top-color","border-right-color","border-bottom-color","border-left-color"],"border-style":["border-top-style","border-right-style","border-bottom-style","border-left-style"],"border-width":["border-top-width","border-right-width","border-bottom-width","border-left-width"]};function o(t,e){const o="https://api.mercadopago.com/ppcore/prod/monitor/v1/event/datadog/big/"+t;navigator.sendBeacon(o,JSON.stringify(e))}function r(e,o){return{value:e,message:o,plugin_version:t.plugin_version,platform:{name:"woocommerce",uri:t.theme,version:t.platform_version,url:`${window.location.origin}${window.location.pathname}`},details:{site_id:t.site_id||"not_available",cust_id:t.cust_id||"not_available",environment:t.is_test?"homol":"prod",sdk_instance_id:window.sessionStorage.getItem("_mp_flow_id")||"not_available"}}}function n(t,n){if(sessionStorage.getItem(n))return;const i=[];t.forEach((function(t){if(!document.querySelector(t))return;const o=function(t){const o=document.querySelector(t);if(!o)return null;const r=[o,...o.querySelectorAll("*")],n=["mercadopago","mercado-pago"];function i(t){if(t.href&&t.href.includes("woocommerce-mercadopago"))return!0;const e=t.ownerNode?.id||"";return n.some((t=>e.includes(t)))}function*s(t){for(const e of t)e.cssRules&&(yield*s(e.cssRules)),e.selectorText&&e.style&&(yield e)}function a(t){return e[t]||[t]}const c=new Map;for(const t of document.styleSheets){if(!i(t))continue;let e;try{e=t.cssRules||t.rules}catch{continue}for(const t of s(e))for(const e of r){try{if(!e.matches(t.selectorText))continue}catch{continue}c.has(e)||c.set(e,new Set);const o=c.get(e);for(const e of t.style)for(const t of a(e))o.add(t)}}const l=new Map;r.forEach((t=>{l.set(t,{transition:t.style.getPropertyValue("transition"),transitionPriority:t.style.getPropertyPriority("transition"),animation:t.style.getPropertyValue("animation"),animationPriority:t.style.getPropertyPriority("animation")}),t.style.setProperty("transition","none","important"),t.style.setProperty("animation","none","important")}));const d=[...document.styleSheets].filter((t=>!i(t))),m=new Map;r.forEach((t=>{const e=t.style.cssText,o="transition: none !important; animation: none !important;";e&&e!==o&&(m.set(t,e),t.style.cssText=o)})),d.forEach((t=>{t.disabled=!0}));const u=new Map;
2c.forEach(((t,e)=>{const o=window.getComputedStyle(e),r={};for(const e of t)r[e]=o.getPropertyValue(e).trim();u.set(e,r)})),d.forEach((t=>{t.disabled=!1})),m.forEach(((t,e)=>{e.style.cssText=t,e.style.setProperty("transition","none","important"),e.style.setProperty("animation","none","important")}));const p={};return u.forEach(((t,e)=>{const o=window.getComputedStyle(e),r={};for(const[e,n]of Object.entries(t)){const t=o.getPropertyValue(e).trim();t!==n&&(r[e]={expected:n,actual:t})}Object.keys(r).length>0&&(p[function(t){if(t.id)return`#${t.id}`;const e=[...t.classList].find((t=>t.startsWith("mp-")));if(e)return`.${e}`;if(t.classList[0])return`.${t.classList[0]}`;const o=t.parentElement,r=o?[...o.children].indexOf(t):0;return`${t.tagName.toLowerCase()}:nth-child(${r+1})`}(e)]=r)})),l.forEach((({transition:t,transitionPriority:e,animation:o,animationPriority:r},n)=>{t?n.style.setProperty("transition",t,e):n.style.removeProperty("transition"),o?n.style.setProperty("animation",o,r):n.style.removeProperty("animation")})),r.forEach((t=>{m.has(t)||0!==t.style.length||t.removeAttribute("style")})),p}(t);o&&Object.keys(o).length>0&&i.push({selector:t,issue:"custom_styles_detected",details:o})})),0!==i.length&&(o("mp_css_conflict_detected",r("true",i.map((t=>`${t.selector} (${t.issue})`)).join("; "))),sessionStorage.setItem(n,"1"))}try{const e=()=>{setTimeout((()=>{try{n([".mp-wallet-button-container"],"mp_health_css_conflict_wallet_sent"),function(){const e="mp_health_script_globals_sent";if(sessionStorage.getItem(e))return;if(!t.is_checkout)return;const n=[{name:"wc_mercadopago_checkout_session_data_register_params",label:"session_data_register"},{name:"mercadopago_melidata_params",label:"melidata_params"},{name:"MelidataClient",label:"melidata_client"},{name:"melidata",label:"melidata_instance"}];t.payment_methods&&t.payment_methods.includes("woo-mercado-pago-custom")&&n.push({name:"wc_mercadopago_supertoken_bundle_params",label:"supertoken_bundle"},{name:"MercadoPago",label:"mercadopago_sdk"});const i=n.filter((function(t){return void 0===window[t.name]})).map((function(t){return t.label}));0!==i.length&&(o("mp_script_missing_globals",r("true",i.join(", "))),sessionStorage.setItem(e,"1"))}()}catch(t){o("mp_health_check_error",r("error",t&&t.message?t.message:"unknown"))}}),3e3)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),document.addEventListener("supertoken_loaded",(function(){try{n([".mp-super-token-payment-methods-list"],"mp_health_css_conflict_supertoken_sent")}catch(t){o("mp_health_check_error",r("error",t&&t.message?t.message:"unknown"))}}),{once:!0})}catch(t){o("mp_health_monitor_error",r("error",t&&t.message?t.message:"unknown"))}}();; 3class MPErrorMessageNormalizer{static DEFAULT_ERROR_MESSAGE="empty error message";static normalize(e){return e&&e.replace(/[\t\n]/g,"").trim()||this.DEFAULT_ERROR_MESSAGE}}class MPCustomEventDispatcher{static MELIDATA_TIMEOUT_MS=5e3;static TIMEOUT_METRIC_URL="https://api.mercadopago.com/ppcore/prod/monitor/v1/event/datadog/big";static#e(e,r){document.dispatchEvent(new CustomEvent(e,{detail:r}))}static waitForMelidata(){return new Promise((e=>{window.melidata?e():window.melidataReady&&"function"==typeof window.melidataReady.then?window.melidataReady.then(e).catch(e):window.melidataReady?e():"complete"!==document.readyState?window.addEventListener("load",(()=>{window.melidataReady&&"function"==typeof window.melidataReady.then?window.melidataReady.then(e).catch(e):e()}),{once:!0}):e()}))}static dispatchWhenReady(e,r){let t;const o=this.waitForMelidata(),s=new Promise((r=>{t=setTimeout((()=>{this.sendTimeoutMetric(e),r()}),this.MELIDATA_TIMEOUT_MS)}));Promise.race([o,s]).then((()=>{clearTimeout(t),this.#e(e,r)})).catch((()=>{}))}static sendTimeoutMetric(e){try{fetch(`${this.TIMEOUT_METRIC_URL}/mp_melidata_load_timeout`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:"true",message:e}),keepalive:!0}).catch((()=>{}))}catch(e){}}}class MPDispatchedErrorTracker{static#r=new Set;static track(e,r){const t=`${r}::${e}`;return!this.#r.has(t)&&(this.#r.add(t),!0)}static reset(){this.#r.clear()}}class MPCheckoutErrorHandler{handle(){throw new Error("Method must be implemented")}}class MPClassicCheckoutErrorHandler extends MPCheckoutErrorHandler{#t="checkout_error";
3#o="form[name=checkout]";#s=".woocommerce-error";ERROR_EVENT_NAME="mp_checkout_error";handle(){document.querySelector(this.#o)&&jQuery(document.body).on(this.#t,((e,r)=>{const t=document.querySelector(this.#s),o=t?.textContent||r,s=MPErrorMessageNormalizer.normalize(o),a=!!t?.querySelector('li[data-mp-source="plugin"]')?"post_submit_mercado_pago":"post_submit_woocommerce";MPCustomEventDispatcher.dispatchWhenReady(this.ERROR_EVENT_NAME,{message:s,errorOrigin:a})}))}}class MPOrderPayCheckoutErrorHandler extends MPCheckoutErrorHandler{#a="form#order_review";#c=[".woocommerce-notices-wrapper .woocommerce-error","#order_review > .woocommerce-error"];ERROR_EVENT_NAME="mp_checkout_error";handle(){const e=document.querySelector(this.#a);e&&(e.addEventListener("submit",(()=>MPDispatchedErrorTracker.reset())),this.handlePageLoadErrors(),this.observeForDynamicErrors(e))}findAllErrorElements(){const e=[];for(const r of this.#c)e.push(...document.querySelectorAll(r));return e}dispatchError(e){const r=MPErrorMessageNormalizer.normalize(e.textContent),t=!!e.querySelector('li[data-mp-source="plugin"]')?"post_submit_mercado_pago":"post_submit_woocommerce";MPDispatchedErrorTracker.track(r,t)&&MPCustomEventDispatcher.dispatchWhenReady(this.ERROR_EVENT_NAME,{message:r,errorOrigin:t})}dispatchAllErrors(e){e.forEach((e=>this.dispatchError(e)))}handlePageLoadErrors(){const e=this.findAllErrorElements();e.length&&this.dispatchAllErrors(e)}observeForDynamicErrors(e){[document.querySelector(".woocommerce-notices-wrapper"),e].filter(Boolean).forEach((e=>{new MutationObserver((e=>{if(!e.some((e=>e.addedNodes.length>0)))return;const r=this.findAllErrorElements();this.dispatchAllErrors(r)})).observe(e,{childList:!0})}))}}class MPBlocksCheckoutErrorHandler extends MPCheckoutErrorHandler{ERROR_EVENT_NAME="mp_checkout_error";handle(e){const r=e?.processingResponse?.paymentDetails?.message,t=MPErrorMessageNormalizer.normalize(r);MPCustomEventDispatcher.dispatchWhenReady(this.ERROR_EVENT_NAME,{message:t,errorOrigin:"post_submit_mercado_pago"})}}class MPCheckoutErrorDispatcher{constructor(){this.handlers=new Map([["classic",new MPClassicCheckoutErrorHandler],["orderPay",new MPOrderPayCheckoutErrorHandler],["blocks",new MPBlocksCheckoutErrorHandler]])}init(){document.addEventListener("DOMContentLoaded",(()=>{this.handlers.get("classic").handle(),this.handlers.get("orderPay").handle()}))}handleBlocksError(e){this.handlers.get("blocks").handle(e)}static dispatchEventWhenBlocksCheckoutErrorOccurred(e){(new MPCheckoutErrorDispatcher).handleBlocksError(e)}}(new MPCheckoutErrorDispatcher).init();; 4class MPCheckoutFieldsDispatcher{static EVENT_NAME_PREFIX="mp_checkout_field_";static addEventListenerDispatcher(t,e,s,i={dispatchOnlyIf:t=>!0,isUsingCardForm:!1,onlyDispatch:!1}){i.onlyDispatch?document.dispatchEvent(new CustomEvent(`${MPCheckoutFieldsDispatcher.EVENT_NAME_PREFIX}${s}`)):i.isUsingCardForm?t?.on(e,(t=>{i.dispatchOnlyIf&&!i.dispatchOnlyIf(t)||document.dispatchEvent(new CustomEvent(`${MPCheckoutFieldsDispatcher.EVENT_NAME_PREFIX}${s}`))})):t?.addEventListener(e,(t=>{i.dispatchOnlyIf&&!i.dispatchOnlyIf(t)||document.dispatchEvent(new CustomEvent(`${MPCheckoutFieldsDispatcher.EVENT_NAME_PREFIX}${s}`))}))}}; 5class MPCheckoutSessionDataRegister{static FLOW_ID_KEY="_mp_flow_id";static PUBLIC_KEY_KEY="_mp_public_key";static FLOW_ID=null;static PUBLIC_KEY=wc_mercadopago_checkout_session_data_register_params.public_key;static LOCALE=wc_mercadopago_checkout_session_data_register_params.locale;static HIDDEN_INPUT_NAME_PREFIX="mercadopago_checkout_session";static FORM_SELECTORS="form#blocks_checkout_form, form[name=checkout], form.wc-block-components-form, form.wc-block-checkout__form, form#order_review";static generateFlowId(){const t=this.generateUUIDV4();if("undefined"==typeof MercadoPago)return t;if(!window.mpSdkInstance){const t=new MercadoPago(this.PUBLIC_KEY,{locale:this.LOCALE});window.mpSdkInstance=t,document.dispatchEvent(new CustomEvent("mp_sdk_instance_ready"))}return"function"==typeof window.mpSdkInstance?.getSDKInstanceId?window.mpSdkInstance.getSDKInstanceId():t}static generateUUIDV4(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues?([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))):"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}static getDataToHiddenInput(){return[{id:this.FLOW_ID_KEY,value:this.FLOW_ID,name:`${this.HIDDEN_INPUT_NAME_PREFIX}[${this.FLOW_ID_KEY}]`}]}static getHiddenInputDataFromBlocksCheckout(){return this.getDataToHiddenInput().reduce(((t,e)=>(t[e.name]=e.value,t)),{})}static registerOnSessionStorage(){sessionStorage.setItem(this.FLOW_ID_KEY,this.FLOW_ID),sessionStorage.setItem(this.PUBLIC_KEY_KEY,this.PUBLIC_KEY)}static registerOnHiddenInput(){this.getDataToHiddenInput().forEac
5h((t=>{document.querySelector(this.FORM_SELECTORS).appendChild(((t,e,n)=>{const o=document.createElement("input");return o.style.display="none",o.setAttribute("type","hidden"),o.setAttribute("id",t),o.setAttribute("name",n),o.setAttribute("value",e),o})(t.id,t.value,t.name))}))}static execute(){document.addEventListener("DOMContentLoaded",(()=>{this.FLOW_ID||document.querySelector(this.FORM_SELECTORS)&&(this.FLOW_ID=this.generateFlowId(),this.registerOnSessionStorage(),this.registerOnHiddenInput(),window.mpHiddenInputDataFromBlocksCheckout=this.getHiddenInputDataFromBlocksCheckout())}))}static registerFlowId(){const t=()=>{try{if(this.FLOW_ID)return;this.FLOW_ID=this.generateFlowId(),this.registerOnSessionStorage(),window.mpHiddenInputDataFromBlocksCheckout=this.getHiddenInputDataFromBlocksCheckout(),document.querySelector(this.FORM_SELECTORS)&&this.registerOnHiddenInput()}catch(t){"function"==typeof window.sendMetric&&window.sendMetric(JSON.stringify(t||{}),t?.message||"unknown","mp_flow_id_fallback_error")}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t,{once:!0}):t()}}MPCheckoutSessionDataRegister.execute(),MPCheckoutSessionDataRegister.registerFlowId();; 6(()=>{var t={26:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-terms-and-conditions-container"),t.setAttribute("data-cy","terms-and-conditions-container"),t.appendChild(this.createText()),t.appendChild(this.createLink()),t}createText(){const t=document.createElement("span");return t.classList.add("mp-terms-and-conditions-text"),t.innerHTML=this.getAttribute("description"),t}createLink(){const t=document.createElement("a");return t.classList.add("mp-terms-and-conditions-link"),t.innerHTML=this.getAttribute("link-text"),t.href=this.getAttribute("link-src"),t.target="blank",t}}customElements.define("terms-and-conditions",t)},454:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!1,max_length:11,max_length_with_mask:14,min_length:11,placeholder:"99.999.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},540:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!0,max_length:10,min_length:5,max_length_with_mask:13,placeholder:"9.999.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},893:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-radio-container"),t.appendChild(this.createRadio()),t.appendChild(this.createLabel()),t}createRadio(){const t=document.createElement("input"),e=this.getAttribute("dataRate");return t.classList.add("mp-input-radio-radio"),t.type="radio",t.id=this.getAttribute("identification"),t.name=this.getAttribute("name"),t.value=this.getAttribute("value"),t.setAttribute("data-cy","input-radio"),e&&t.setAttribute("dataRate",e),t}createLabel(){const t=document.createElement("label");return t.classList.add("mp-input-radio-label"),t.htmlFor=this.getAttribute("identification"),t}}customElements.define("input-radio",t)},938:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!0,max_length:8,max_length_with_mask:10,min_length:7,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},1295:()=>{class t extends HTMLElement{static get observedAttributes(){return["columns","name","button-name","bank-interest-text"]}constructor(){super(),this.index=0,this.limit=5,this.offset=this.limit,this.columns=null,this.total=0}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}setColumns(){return this.columns=JSON.parse(this.getAttribute("columns")),this}setTotal(){return this.total=this.columns.length,this}createContainer(){const t=document.createElement("div");return this.setColumns(),this.columns&&(this.setTotal(),t.classList.add("mp-input-table-container"),t.setAttribute("data-cy","input-table-container"),t.appendChild(this.createList(
6)),t.appendChild(this.createBankInterestDisclaimer())),t}createList(){const t=document.createElement("div");t.classList.add("mp-input-table-list"),t.setAttribute("data-cy","input-table-list");const e=this.createLink();return e.onclick=()=>this.appendItems(this.columns,t,e,!0),this.appendItems(this.columns,t,e,!1),t.appendChild(e),t}createItem(t){const e=document.createElement("div");return e.classList.add("mp-input-table-item"),e.appendChild(this.createLabel(t)),e}createLabel(t){const{id:e,value:i,rowText:n,rowObs:s,highlight:a,img:r,alt:l,dataRate:o}=t,c=this.getAttribute("name"),d=document.createElement("div");return d.classList.add("mp-input-table-label"),d.appendChild(this.createOption(e,c,i,n,r,l,o)),s&&d.appendChild(this.createRowObs(s,a)),d.onclick=()=>{document.getElementById(e).checked=!0},d}createOption(t,e,i,n,s,a,r){const l=document.createElement("div");return l.classList.add("mp-input-table-option"),l.appendChild(this.createRadio(t,e,i,r)),s?l.appendChild(this.createRowTextWithImg(n,s,a)):l.appendChild(this.createRowText(n)),l}createRadio(t,e,i,n){const s=document.createElement("input-radio");return s.setAttribute("name",e),s.setAttribute("value",i),s.setAttribute("identification",t),s.setAttribute("dataRate",n),s}createRowText(t){const e=document.createElement("span");return e.classList.add("mp-input-table-row-text"),e.innerHTML=t,e}createRowTextWithImg(t,e,i){const n=document.createElement("span"),s=document.createElement("payment-method-logo");return s.setAttribute("src",e),s.setAttribute("alt",i),s.style.marginRight="10px",n.classList.add("mp-input-table-row-text-image"),n.innerHTML=t,n.appendChild(s),n}createRowObs(t,e){const i=document.createElement("span");return e?i.classList.add("mp-input-table-row-obs-highlight"):i.classList.add("mp-input-table-row-obs"),i.innerHTML=t,i}createLink(){const t=document.createElement("div");t.classList.add("mp-input-table-container-link");const e=document.createElement("a");return e.setAttribute("id","more-options"),e.classList.add("mp-input-table-link"),e.innerHTML=this.getAttribute("button-name"),t.appendChild(e),t}createBankInterestDisclaimer(){const t=document.createElement("div");t.classList.add("mp-input-table-bank-interest-container");const e=document.createElement("p");return e.classList.add("mp-input-table-bank-interest-text"),e.innerText=this.getAttribute("bank-interest-text"),t.appendChild(e),t}appendItems(t,e,i,n){this.validateLimit();for(let s=this.index;s<this.limit;s+=1)n?e.insertBefore(this.createItem(t[s]),i):e.appendChild(this.createItem(t[s]));this.limit>=this.total&&i.style.setProperty("display","none","important"),this.index+=this.offset,this.limit+=this.offset,this.validateLimit()}validateLimit(){this.limit>this.total&&(this.limit=this.total)}}customElements.define("input-table",t)},1807:(t,e,i)=>{const n=i(2781),s=i(6407),a=i(6135),r=i(938),l=i(9794),o=i(1981),c=i(2603),d=i(3505),p=i(9957),u=i(540),h=i(6020),m=i(7749),g=i(2957),b=i(6133),E=i(454);t.exports=class{static handlers={CPF:n,CNPJ:s,CC:u,MLA_CI:d,MLU_CI:p,MCO_CE:h,MPE_CE:m,MLA_DNI:r,MPE_DNI:l,NIT:g,LC:o,LE:c,RUT:b,RUC:E};static getDefaultCountryHandler(t){for(const[e,i]of Object.entries(this.handlers))if(i.CONFIG&&i.CONFIG.site_id===t&&!0===i.CONFIG.default)return e;return null}static getHandler(t){return this.handlers[t]||a}static mask(t,e){return this.getHandler(t).mask(e)}static validate(t,e){return this.getHandler(t).validate(e)}}},1943:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createLabel())}createLabel(){const t=document.createElement("label");t.classList.add("mp-input-label"),t.setAttribute("data-cy","input-label");const e=this.getAttribute("message");t.textContent=e;const i=this.getAttribute("for");i&&(t.htmlFor=i);let n=this.getAttribute("isOptional");if("string"==typeof n&&(n="false"!==n),!n){const e=document.createElement("b");e.textContent="*",e.style="color: red",t.appendChild(e)}return t}}customElements.define("input-label",t)},1981:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:7,max_length_with_mask:9,min_length:6,placeholder:"9.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2119:()=>{class t extends HTMLElement{helper=this.createHelper();input=this.createInput();connectedCallback(){this.build()}build(){const t=this.createInputField();this.appendChild(t)}createInputField(){const t=document.createElement("div");t.classList.add("mp-yape-input-field"),t.setAttribute("data-cy","input-field-container");const e=this.createLabel(this.getAttribute("label-message"));return t.appendChild(e),t.appendChild(this.input),t.appendChild(this.helper),t}createLabel(t){const e=document.createElement("input-label");return e.setAttribute("message",t),e.setAttribute("isOptional","true"),e}validate(){""===this.input.value?(this.helper.firstElementChild.style.display="flex",document.getElementById("helper-input-field").childNodes[1].innerHTML=document.querySelector("input-field").getAttribute("empty-error-message"),this.input.classList.add("mp-input-field-error"),document.querySelector('[data-cy="input-label"]').style.setProperty("color","#f23d4f","important")):this.input.value.length<11?(this.helper.firstElementChild.style.display="flex",document.getElementById("helper-input-field").childNodes[1].innerHTML=document.querySelector("input-field").getAttribute("invalid-error-message"),this.input.classList.add("mp-input-field-error"),document.querySelector('[data-cy="input-label"]').style.setProperty("color","#f23d4f","important")):(this.helper.firstElementChild.style.display="none",document.querySelector('[data-cy="input-label"]').style.setProperty("color","#111111","important"))}createInput(){const t=document.createElement("input");return t.classList.add("mp-yape-input"),t.setAttribute("id","checkout__yapePhoneNumber"),t.setAttribute("maxlength","11"),t.setAttribute("placeholder","Ej.: 872 123 432"),t.setAttribute("aria-hidden","true"),t.setAttribute("data-cy","input-field"),t.setAttribute("name","phoneNumber"),t.setAttribute("required","true"),t.addEventListener("input",(()=>{const e=t.value.replace(/\D/g,"");let i="";for(let t=0;t<e.length;t+=1)i+=e[t],(t+1)%3==0&&t!==e.length-1&&(i+=" ");t.value=i})),t.addEventListener("focus",(()=>{t.classList.add("mp-input-field-focus"),t.classList.remove("mp-in
6put-field-error"),this.helper.firstElementChild.style.display="none"})),t.addEventListener("blur",(()=>{this.validate()})),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible","false"),t.setAttribute("type","error"),t.setAttribute("message","error"),t.setAttribute("input-id","helper-input-field"),t}}customElements.define("input-field",t)},2577:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createHelper())}createHelper(){const t=document.createElement("div"),e=this.getAttribute("type")||"error";t.classList.add("mp-helper"),t.setAttribute("id",this.getAttribute("input-id")),t.setAttribute("data-cy","helper-container"),t.setAttribute("role","error"===e?"alert":"status"),this.validateVisibility(t);const i=this.getAttribute("message"),n=this.createHelperMessage(i,e);if("error"===e){const e=this.createIcon();t.appendChild(e)}return t.appendChild(n),t}createIcon(){const t=document.createElement("div");return t.innerHTML='\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="12" height="12" rx="6" fill="#CC1818"/><path d="M6.72725 2.90918H5.27271L5.45452 6.90918H6.54543L6.72725 2.90918Z" fill="white"/>\n <path d="M5.99998 7.63645C6.40164 7.63645 6.72725 7.96206 6.72725 8.36373C6.72725 8.76539 6.40164 9.091 5.99998 9.091C5.59832 9.091 5.27271 8.76539 5.27271 8.36373C5.27271 7.96206 5.59832 7.63645 5.99998 7.63645Z" fill="white"/>\n </svg>',t.classList.add("mp-helper-icon"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t}createHelperMessage(t,e){const i=document.createElement("div");return i.textContent=t,i.classList.add("mp-helper-message"),i.classList.add(e),i.setAttribute("data-cy","helper-message"),i}updateMessage(t){this.setAttribute("message",t),this.querySelector(".mp-helper-message").textContent=t}validateVisibility(t){let e=this.getAttribute("isVisible");"string"==typeof e&&(e="false"!==e),t.style.display=e?"flex":"none"}}customElements.define("input-helper",t)},2603:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:7,max_length_with_mask:9,min_length:6,placeholder:"9.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2781:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLB",default:!0,max_length:11,max_length_with_mask:14,placeholder:"999.999.999-99"};static mask(t){return t.replace(/\D+/g,"").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1")}static validate(t){if("string"!=typeof t)return{result:!1,type:this.ERROR_TYPES.INVALID};if(!(t=t.replace(/[\s.-]*/gim,""))||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if("00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return{result:!1,type:this.ERROR_TYPES.WRONG};if(0===parseInt(t,10))return{result:!1,type:this.ERROR_TYPES.WRONG};if(!t||11!==t.length)return{result:!1,type:this.ERROR_TYPES.INVALID};let e,i=0;for(let e=1;e<=9;e+=1)i+=parseInt(t.substring(e-1,e))*(11-e);if(e=10*i%11,10!==e&&11!==e||(e=0),e!==parseInt(t.substring(9,10)))return{result:!1,type:this.ERROR_TYPES.WRONG};i=0;for(let e=1;e<=10;e+=1)i+=parseInt(t.substring(e-1,e))*(12-e);return e=10*i%11,10!==e&&11!==e||(e=0),e!==parseInt(t.substring(10,11))?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}}
6,2957:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!1,max_length:16,min_length:7,max_length_with_mask:16,placeholder:"999.999.999-9"};static mask(t){const e=t.replace(/\D+/g,"");if(e.length<=3)return e;if(e.length<=6)return e.slice(0,-3)+"."+e.slice(-3);if(e.length>=9){const t=e.slice(0,-1),i=e.slice(-1);return`${t.replace(/\B(?=(\d{3})+(?!\d))/g,".")}-${i}`}return e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},2979:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-pix-template-container"),t.setAttribute("data-cy","pix-template-container"),t.appendChild(this.createImage()),t.appendChild(this.createTitle()),t.appendChild(this.createSubtitle()),t}createTitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-title"),t.innerText=this.getAttribute("title"),t}createSubtitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-subtitle"),t.innerText=this.getAttribute("subtitle"),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-pix-template-image"),t.src=this.getAttribute("src"),t.alt=this.getAttribute("alt"),t}}customElements.define("pix-template",t)},3185:()=>{class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.render()}render(){const t=document.createElement("div");t.classList.add("mp-info-notification");const e=document.createElement("div");e.classList.add("content");const i=document.createElement("img");i.src=this.getAttribute("src"),i.alt="Icone de informação",i.classList.add("icon");const n=document.createElement("div");n.classList.add("message"),n.textContent=this.getAttribute("message")||"Mensagem de informação",e.appendChild(i),e.appendChild(n),t.appendChild(e);const s=document.createElement("div");s.classList.add("footer");const a=document.createElement("img");a.src=this.getAttribute("icon"),a.alt="Footer Icon",a.classList.add("footer-icon"),s.appendChild(a),s.appendChild(document.createTextNode(this.getAttribute("footer-text")||"Procesado por Mercado Pago")),this.shadowRoot.append(t),this.shadowRoot.append(s),this.applyStyles()}applyStyles(){const t=document.createElement("style");t.textContent="\n .mp-info-notification {\n display: flex !important;\n flex-direction: column !important;\n padding: 12px !important;\n background-color: #f7f7f7 !important;\n border-radius: 8px !important;\n border-left: 4px solid var(--andes-accent-color) !important;\n margin-bottom: 16px !important;\n }\n\n .content {\n display: flex !important;\n align-items: center !important;\n }\n\n .icon {\n max-width: 16px !important;\n max-height: 16px !important;\n margin-right: 8px !important;\n }\n\n @media (max-width: 600px) {\n .icon {\n margin-bottom: 15px !important;\n }\n }\n\n @media (max-width: 300px) {\n .icon {\n margin-bottom: 35px !important;\n }\n }\n\n .message {\n flex-grow: 1 !important;\n color: #333 !important;\n padding: 10px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 14px !important;\n font-weight: 400 !important;\n line-height: 18px !important;\n text-align: left !important;\n }\n\n .footer {\n display: flex !important;\n align-items: center !important;\n color: #999 !important;\n margin-top: 24px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 15px !important;\n text-align: left !important;\n }
6\n\n .footer-icon {\n max-width: 20px !important;\n margin-right: 8px !important;\n }\n ",this.shadowRoot.appendChild(t)}}customElements.define("checkout-notice",t)},3291:t=>{t.exports=class{static ERROR_TYPES={INVALID:"invalid",EMPTY:"empty",WRONG:"wrong",VALID:"valid"};static validate(t){throw new Error(`Method 'validate()' must be implemented by ${this.name}`)}static mask(t){return t}}},3505:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLA",default:!1,max_length:8,max_length_with_mask:10,min_length:7,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){if("string"!=typeof t||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if((t=t.replace(/[\s.-]/g,"")).length>this.CONFIG.max_length)return{result:!1,type:this.ERROR_TYPES.WRONG};let e=0,i=0,n=0;const s=t[t.length-1];if(t.length<this.CONFIG.min_length)for(i=t.length;i<this.CONFIG.min_length;i+=1)t=`0${t}`;for(i=0;i<this.CONFIG.min_length;i+=1)e+=parseInt("2987634"[i],10)*parseInt(t[i],10)%10;return n=e%10==0?0:10-e%10,s!==n.toString()?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},4073:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-slider-container"),t.appendChild(this.createContent()),t}createContent(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");e.classList.add("mp-payment-method-logo-slider-content"),e.appendChild(this.createImage(t[0]));const i=e.firstChild;return this.createSlider(i,t),e}createImage({src:t,alt:e}){const i=document.createElement("payment-method-logo");return i.setAttribute("src",t),i.setAttribute("alt",e),i}createSlider(t,e,i=0){t.setAttribute("src",e[i].src),t.setAttribute("alt",e[i].alt),i=i<e.length-1?i+1:0,setTimeout((()=>{this.createSlider(t,e,i)}),2e3)}}customElements.define("payment-method-logo-slider",t)},4751:()=>{class t extends HTMLElement{static get observedAttributes(){return["title","description","retryButtonText"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){const t=this.createAlertDetails(),e=this.createCardContent();t.appendChild(e),this.appendChild(t)}createAlertDetails(){const t=document.createElement("div");return t.classList.add("mp-alert-details-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-alert-details-card-content");const e=document.createElement("div");e.classList.add("mp-alert-details-card-content-left");const i=document.createElement("div");i.classList.add("mp-alert-details-card-content-right"),t.appendChild(e),t.appendChild(i);const n=this.createBadge(),s=this.createTitle(),a=this.createDescription(),r=this.createRetryButton();return e.appendChild(n),i.appendChild(s),i.appendChild(a),i.appendChild(r),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-alert-details-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-alert-details-title"),t}createDescription(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("description"),t.classList.add("mp-alert-details-description"),t}createRetryButton(){const t=this.getAttribute("retryButtonText"),e=document.createElement("button");return e.classList.add("mp-alert-details-retry-button"),e.innerHTML=t,e.onclick=()=>document.location.reload(),e}}customElements.define("alert-details",t)},6020:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MCO",default:!1,max_length:7,min_length:6,max_length_with_mask:7,placeholder:"9999999"};static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6045:(t,e,i)=>{const n=i(1807),s={CPF:"CPF",CNPJ:"CNPJ",DNI:"DNI",CI:"CI",LC:"LC",LE:"LE",OTRO:"Otro",RUT:"RUT",CC:"CC",CE:"CE",NIT:"NIT",RUC:"RUC"},a={MPE:{CE:"C.E"}},r=t=>(t||"").replace(/[^a-zA-Z0-9]/g,"").toUpperCase();class l extends HTMLElement{selectObserver=null;selectObserverTimeout=null;connectedCallback(){this.build()}disconnectedCallback(){this.cleanupSelectObserver()}cleanupSelectObserver(){this.selectObserver&&(this.selectObserver.disconnect(),this.selectObserver=null),this.selectObserverTimeout&&(clearTimeout(this.selectObserverTimeout),this.selectObserverTimeout=null)}build(){const t=this.createInputDocument();this.appendChild(t)}createInputDocument(){const t=document.createElement("div");t.classList.add("mp-input-document"),t.setAttribute("data-cy","input-document-container");const e=this.createLabel(this.getAttribute("label-message")),i=this.createHelper(this.getAttribute("helper-empty")),n=this.createHiddenField(this.getAttribute("hidden-id")),s=this.createInstruction(),a=this.createInput(i,n,e);return t.appendChild(e),t.appendChild(a),t.appendChild(n),t.appendChild(i),s&&t.appendChild(s),t}elementId(t){return`${this.getAttribute("select-id")||"mp-doc-number"}-${t}`}hasInstruction(){return!(!this.getAttribute("instruction-range")&&!this.getAttribute("instruction-fixed"))}createInstruction(){if(!this.hasInstruction())return null;const t=document.createElement("span");return t.setAttribute("id",this.elementId("instruction")),t.classList.add("mp-sr-only"),this.instructionElement=t,t}updateInstruction(t){const e=this.instructionElement;if(!e)return;const i=t?.CONFIG?.min_length,n=t?.CONFIG?.max_length;e.textContent=n?i&&i!==n?(this.getAttribute("instruction-range")||"").replace("{min}",i).replace("{max}",n):(this.getAttribute("instruction-fixed")||"").replace("{digits}",n):""}createLabel(t){const e=document.createElement("input-label");e.setAttribute("message",t),e.setAttribute("isOptional","false"),e.setAttribute("id",this.elementId("label"));const i=this.getAttribute("select-id");return i&&e.setAttribute("for",i),e}createInput(t,e,i){const n=document.createElement("div");n.classList.add("mp-input"),n.setAttribute("id","form-checkout__identificationNumber-container");const s=JSON.parse(this.getAttribute("documents")),a=this.getAttribute("validate"),r=this.createVerticalLine(),l=this.createSelect(n,t,s,a),o=this.createDocument(n,l,t,i);return l.addEventListener("change",(()=>{n.classList.remove("mp-focus"),this.clearErrorStates(n,t,i),this.setDocumentValidity(o,t,!1),this.setInputProperties(l,o,this.getAttribute("site-id")),this.setMaskInputDocument(l,o,e)})),n.appendChild(l),n.appendChild(r),n.appendChild(o),this.setMaskInputDocument(l,o,e),s&&0!==s.length||this.observeSelectPopulationFromSdk(l,o),n}buildDocumentNameWithSiteId(t,e){const i=r(t);return`${e&&["CE","DNI","CI"].includes(i)?`${e}_`:""}${i}`.toUpperCase()}setInputProperties(t,e,i){const s=this.buildDocumentNameWithSiteId(t.value,i),a=n.getHandler(s);e.value="",e.setAttribute("maxlength",this.getPermissiveMaxLength(t.value,a)),e.setAttribute("placeholder",a.CONFIG.placeholder),this.updateInstruction(a)}getPermissiveMaxLength(t,e){const i={CPF:11,CNPJ:14,CI:8}[t]??20;return e.mask("9".repeat(i)).length}observeSelectPopulationFromSdk(t,e){this.cleanupSelectObserver();const i=new MutationObserver((()=>
6{if(!this.isConnected||0===t.options.length)return;const i=this.getAttribute("site-id"),s=n.getDefaultCountryHandler(i);this.normalizeDocumentOptionLabels(t,i);const a=s&&Array.from(t.options).find((t=>this.buildDocumentNameWithSiteId(t.value,i)===s));t.value=a?a.value:t.options[0].value,this.setInputProperties(t,e,this.getAttribute("site-id")),this.cleanupSelectObserver()}));this.selectObserver=i,i.observe(t,{childList:!0,subtree:!1}),this.selectObserverTimeout=setTimeout((()=>{this.isConnected&&this.cleanupSelectObserver()}),15e3)}normalizeDocumentOptionLabels(t,e){const i=(e||"").toUpperCase(),n=a[i]||{};Array.from(t.options).forEach((t=>{const e=r(t.value),i=n[e]||s[e];i&&(t.textContent=i)}))}createSelect(t,e,i,s){const a=document.createElement("select");if(a.classList.add("mp-document-select"),a.setAttribute("name",this.getAttribute("select-name")),a.setAttribute("id",this.getAttribute("select-id")),a.setAttribute("data-checkout",this.getAttribute("select-data-checkout")),a.setAttribute("data-cy","select-document"),a.setAttribute("aria-required","true"),i&&i.length>0){i.forEach((t=>{this.createOption(a,t)}));const t=this.getAttribute("site-id"),e=n.getDefaultCountryHandler(t),s=e&&i.find((i=>this.buildDocumentNameWithSiteId(i,t)===e));a.value=s||a.options[0].value}return s&&(a.addEventListener("focus",(()=>{t.classList.add("mp-focus"),e.firstElementChild.style.display="none"})),a.addEventListener("focusout",(()=>{t.classList.remove("mp-focus"),e.firstElementChild.style.display="none"}))),a}createOption(t,e){const i=document.createElement("option");i.textContent=e,i.value=e,t.appendChild(i)}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}createVerticalLine(){const t=document.createElement("div");return t.classList.add("mp-vertical-line"),t}setMaskInputDocument(t,e,i){e.addEventListener("input",(s=>{const a=this.buildDocumentNameWithSiteId(t.value,this.getAttribute("site-id")),r=n.getHandler(a);if(r&&r.mask&&(s.target.value=r.mask(s.target.value)),i){const t=s.target.value.toUpperCase().replace(/[^A-Z0-9]/g,"");i.value=t}this.validateDocumentRealTime(s.target,t,e.parentElement)}))}validateDocumentRealTime(t,e,i){const s=i.parentElement.querySelector("input-helper"),a=i.parentElement.querySelector("input-label"),r=this.buildDocumentNameWithSiteId(e.value,this.getAttribute("site-id")),l=n.validate(r,t.value);l.result||this.updateHelperErrorMessage(s,this.getAttribute(`helper-${l.type}`)),this.updateValidationState(l.result,t,i,s,a)}updateValidationState(t,e,i,n,s){t?this.setValidState(e,i,n,s):this.setInvalidState(e,i,n,s)}setValidState(t,e,i,n){e.classList.remove("mp-error","mp-error-2px"),i.firstElementChild.style.display="none",t.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!1),this.setDocumentValidity(t,i,!1)}setDocumentValidity(t,e,i){t.setAttribute("aria-invalid",i?"true":"false");const n=e&&e.getAttribute("id"),s=[this.hasInstruction()?this.elementId("instruction"):null,i?n:null].filter(Boolean);s.length?t.setAttribute("aria-describedby",s.join(" ")):t.removeAttribute("aria-describedby")}setInvalidState(t,e,i,n){""===t.value.trim()?(e.classList.add("mp-error-2px"),i.firstElementChild.style.display="flex",t.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!0)):(e.classList.add("mp-error-2px"),i.firstElementChild.style.display="flex",t.setAttribute("name",this.getAttribute("flag-error")),this.updateLabelState(n,!0)),this.setDocumentValidity(t,i,!0)}createDocument(t,e,i,n){const s=document.createElement("input");return this.getAttribute("input-id")&&s.setAttribute("id",this.getAttribute("input-id")),s.setAttribute("name",this.getAttribute("input-name")),s.setAttribute("data-checkout",this.getAttribute("input-data-checkout")),s.setAttribute("data-cy","input-document"),s.setAttribute("aria-labelledby",this.elementId("label")),s.setAttribute("aria-required","true"),this.hasInstruction()&&s.setAttribute("aria-describedby",this.elementId("instruction")),s.classList.add("mp-document"),s.type="text",s.inputMode="text",this.setInputProperties(e,s,this.getAttribute("site-id")),s.addEventListener("focus",(()=>{this.handleInputFocus(t,i,s,n)})),s.addEventListener("focusout",(()=>{this.handleInputFocusOut(t,i,s,n)})),s}handleInputFocus(t,e,i,n){if(t.classList.contains("mp-error"))return t.classList.remove("mp-error"),void t.classList.add("mp-error-2px");t.classList.remove("mp-error-2px"),t.classList.add("mp-focus"),e.firstElementChild.style.display="none",i.setAttribute("name",this.getAttribute("input-name")),this.updateLabelState(n,!1),this.setDocumentValidity(i,e,!1)}markInvalidFromSubmit(){const t=this.querySelector("input.mp-document"),e=this.querySelector("input-helper");t&&e&&this.setDocumentValidity(t,e,!0)}handleInputFocusOut(t,e,i,n){t.classList.remove("mp-focus"),""===i.value.trim()?(this.clearErrorStates(t,e,n),this.setDocumentValidity(i,e,!1)):this.handleNonEmptyInput(t)}clearErrorStates(t,e,i){t.classList.remove("mp-error-2px","mp-error"),e&&(e.firstElementChild.style.display="none"),this.updateLabelState(i,!1)}handleNonEmptyInput(t){t.classList.contains("mp-error-2px")&&(t.classList.remove("mp-error-2px"),t.classList.add("mp-error"))}updateLabelState(t,e){e?t.firstElementChild.classList.add("mp-label-error"):t.firstElementChild.classList.remove("mp-label-error")}updateHelperErrorMessage(t,e){t.updateMessage(e)}createHelper(t){const e=document.createElement("input-helper");return e.setAttribute("isVisible",!1),e.setAttribute("type","error"),e.setAttribute("message",t),e.setAttribute("input-id","mp-doc-number-helper"),e.setAttribute("id",this.elementId("helper")),e}}customElements.define("input-document",l)},6133:(t,e,i)=>{const n=i(3291);
6t.exports=class extends n{static CONFIG={site_id:"MLC",default:!0,max_length:9,max_length_with_mask:12,min_length:8,placeholder:"99.999.999-9"};static mask(t){const e=t.replace(/[^0-9kK]/g,"").toUpperCase();if(e.length<=3)return e;if(e.length>7){const t=e.slice(0,-1),i=e.slice(-1);let n;return n=t.length<=3?t:t.length<=6?t.slice(0,-3)+"."+t.slice(-3):t.slice(0,-6)+"."+t.slice(-6,-3)+"."+t.slice(-3),n+"-"+i}return e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6135:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:null,default:!1,min_length:5,max_length:20,max_length_with_mask:20,placeholder:""};static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},6139:()=>{class t extends HTMLElement{connectedCallback(){this.render()}getBadgeIcon(t="warning"){return{error:"X",warning:"!"}[t]}render(){const t=this.getAttribute("description")||"",e=this.getAttribute("type")||"warning",i=this.getBadgeIcon(e);this.innerHTML=`\n <div class="mp-andes-notice-card ${e}">\n <div class="mp-andes-notice-card-content">\n <div class="mp-andes-notice-badge ${e}">${i}</div>\n <span class="mp-andes-notice-description">\n ${t}\n </span>\n </div>\n </div>\n `}}customElements.define("andes-notice",t)},6407:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLB",default:!1,max_length:14,max_length_with_mask:18,placeholder:"99.999.999/9999-99"};static WEIGHTS_DV1=[5,4,3,2,9,8,7,6,5,4,3,2];static WEIGHTS_DV2=[6,5,4,3,2,9,8,7,6,5,4,3,2];static mask(t){const e=t.replace(/[^A-Za-z0-9]/g,""),i=(e.slice(0,12)+e.slice(12).replace(/[^0-9]/g,"")).slice(0,14),n=i.slice(0,2),s=i.slice(2,5),a=i.slice(5,8),r=i.slice(8,12),l=i.slice(12,14);let o=n;return s&&(o+=`.${s}`),a&&(o+=`.${a}`),r&&(o+=`/${r}`),l&&(o+=`-${l}`),o}static charToValue(t){return t.charCodeAt(0)-48}static calculateCheckDigit(t,e){let i=0;for(let n=0;n<t.length;n++)i+=this.charToValue(t[n])*e[n];const n=i%11;return n<2?0:11-n}static validate(t){if("string"!=typeof t)return{result:!1,type:this.ERROR_TYPES.EMPTY};const e=t.replace(/[^A-Za-z0-9]/g,"").toUpperCase();if(""===e)return{result:!1,type:this.ERROR_TYPES.EMPTY};if(14!==e.length)return{result:!1,type:this.ERROR_TYPES.INVALID};if(!/^[A-Z0-9]{12}[0-9]{2}$/.test(e))return{result:!1,type:this.ERROR_TYPES.INVALID};if(/^(.)\1+$/.test(e))return{result:!1,type:this.ERROR_TYPES.WRONG};const i=e.substring(0,12),n=parseInt(e[12],10),s=parseInt(e[13],10),a=this.calculateCheckDigit(i,this.WEIGHTS_DV1);if(a!==n)return{result:!1,type:this.ERROR_TYPES.WRONG};const r=i+a.toString();return this.calculateCheckDigit(r,this.WEIGHTS_DV2)!==s?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}},7117:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-select-container"),t.appendChild(this.createLabel()),t.appendChild(this.createInput()),t.appendChild(this.createHelper()),t}createInput(){const t=document.createElement("div");return t.classList.add("mp-input-select-input"),t.appendChild(this.createSelect()),t}createSelect(){const t=document.createElement("select"),e=this.getAttribute("name");t.classList.add("mp-input-select-select"),t.setAttribute("id",e),t.setAttribute("name",e);const i=this.getAttribute("options")&&JSON.parse(this.getAttribute("options"));if(this.getAttribute("default-option")){const e=document.createElement("option");e.setAttribute("selected","selected"),e.setAttribute("hidden","hidden"),e.innerHTML=this.getAttribute("default-option"),t.appendChild(e)}return i&&0!==i.length&&i.forEach((e=>{t.appendChild(this.createOption(e))})),t}createOption(t){const e=document.createElement("option");return e.innerHTML=t.description,e.value=t.id,e}createLabel(){const t=document.createElement("input-label"),e=this.getAttribute("optional");return t.setAttribute("message",this.getAttribute("label")),"false"===e?t.setAttribute("isOptional",e):t.setAttribute("isOptional","true"),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible",!1),t.setAttribute("message",this.getAttribute("helper-message")),t.setAttribute("input-id","mp-doc-number-helper"),t.setAttribute("type","message"),t}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}}customElements.define("input-select",t)},7702:()=>{class t extends HTMLElement{static get observedAttributes(){return["src","alt"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-container"),t.appendChild(this.createImage()),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-payment-method-logo-image"),t.alt=this.getAttribute("alt"),t.src=this.getAttribute("src"),t.onerror=t=>t.target?.parentNode?.parentNode?.parentNode?.removeChild(t.target.parentNode.parentNode),t}}customElements.define("payment-method-logo",t)},7749:(t,e,i)=>{const n=i(3291);
6t.exports=class extends n{static CONFIG={site_id:"MPE",default:!1,max_length:12,max_length_with_mask:15,min_length:6,placeholder:"999.999.999.999"};static mask(t){const e=t.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();return e.length<=3?e:e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.length<=9?e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3):e.slice(0,-9)+"."+e.slice(-9,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},7887:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){const t=this.createTestMode(),e=this.createCardHeader(),i=this.createCardContent();t.appendChild(e),t.appendChild(i),this.appendChild(t)}createTestMode(){const t=document.createElement("div");return t.classList.add("mp-test-mode-card"),t.setAttribute("data-cy","test-mode-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=document.createElement("p");e.innerHTML=this.getAttribute("description"),e.classList.add("mp-test-mode-description"),e.setAttribute("data-cy","test-mode-description"),t.appendChild(e);const i=this.getAttribute("link-text"),n=this.getAttribute("link-src"),s=document.createElement("a");return s.classList.add("mp-test-mode-link"),s.innerHTML=i,s.href=n,s.target="blank",e.appendChild(s),t}createCardHeader(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=this.createBadge(),i=this.createTitle();return t.appendChild(e),t.appendChild(i),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-test-mode-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-test-mode-title"),t.setAttribute("data-cy","test-mode-title"),t}}customElements.define("test-mode",t)},8051:()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");return e.classList.add("mp-payment-methods-container"),t.forEach((t=>{e.appendChild(this.createPaymentMethodType(t))})),e}createPaymentMethodType(t){const{title:e,label:i,payment_methods:n}=t,s=document.createElement("div");return s.classList.add("mp-payment-method-type-container"),n&&0!==n.length&&(s.appendChild(this.createHeader(e,i)),s.appendChild(this.createContent(n))),s}createHeader(t,e){const i=document.createElement("div");return i.classList.add("mp-payment-methods-header"),t&&i.appendChild(this.createTitle(t)),e&&i.appendChild(this.createBadge(e)),i}createTitle(t){const e=document.createElement("p");return e.classList.add("mp-payment-methods-title"),e.innerHTML=t,e}createBadge(t){const e=document.createElement("div"),i=document.createElement("span");return i.classList.add("mp-payment-methods-badge-text"),i.innerHTML=t,e.classList.add("mp-payment-methods-badge"),e.appendChild(i),e}createContent(t){const e=document.createElement("div");return e.classList.add("mp-payment-methods-content"),t.forEach((t=>{e.appendChild(this.createImage(t))})),e}createImage(t){const{src:e,alt:i}=t,n=document.createElement("payment-method-logo");return n.setAttribute("src",e),n.setAttribute("alt",i),n}}customElements.define("payment-methods",t)},9241:()=>{class t extends HTMLElement{helper=this.createHelper();inputContainer=this.createInputContainer();connectedCallback(){this.build()}build(){const t=document.createElement("div");t.classList.add("mp-yape-input-code-container");const e=document.createElement("div");e.classList.add("mp-yape-label-container");const i=document.createElement("label");i.setAttribute("id","yape-input-code-label"),i.textContent=this.getAttribute("label")||"Código de aprobación";const n=document.createElement("div");n.classList.add("mp-yape-icon-wrapper");const s=document.createElement("img");s.src=this.getAttribute("src"),s.alt="Icone de ajuda",s.classList.add("mp-yape-icon");const a=document.createElement("div");a.classList.add("mp-yape-tooltip"),a.textContent=this.getAttribute("tooltip-text")||"Encuéntralo en el menú de la app de Yape.",n.appendChild(s),n.appendChild(a),e.appendChild(i),e.appendChild(n),t.appendChild(e),this.inputs=[];for(let t=0;t<6;t+=1){const e=document.createElement("input");e.type="text",e.maxLength="1",e.classList.add("mp-yape-code-input"),e.setAttribute("input-index",t),this.inputs.push(e),e.addEventListener("input",(e=>{/\d/.test(e.target.value)?1===e.target.value.length&&t<5&&this.inputs[t+1].focus():e.target.value="",this.updateClassesOnInput()})),e.addEventListener("keydown",(t=>{const e=parseInt(t.target.getAttribute("input-index"));"ArrowLeft"===t.key&&e>0?this.inputs[e-1].focus():"ArrowRight"===t.key&&e<5?this.inputs[e+1].focus():"Backspace"===t.key&&e>0&&!t.target.value&&this.inputs[e-1].focus()})),0===t&&e.addEventListener("paste",(t=>this.handlePaste(t))),e.addEventListener("focus",(()=>{e.classList.add("mp-input-code-focus"),e.classList.remove("mp-in
6put-code-error"),this.helper.firstElementChild.style.display="none",document.getElementById("yape-input-code-label").style.color="#111111"})),e.addEventListener("blur",(()=>{setTimeout((()=>{this.validate()}),100)})),this.inputContainer.appendChild(e)}t.appendChild(this.inputContainer),this.appendChild(t),this.appendChild(this.helper),this.applyStyles()}validate(){this.checkForErrors(this.helper,this.inputContainer)}handlePaste(t){if(t.preventDefault(),!Array.isArray(this.inputs))return;const e=((t.clipboardData||window.clipboardData).getData("text")||"").split("").filter((t=>/\d/.test(t)));e.length>0&&e.forEach(((t,e)=>{e<this.inputs.length&&(this.inputs[e].value=t)})),this.updateClassesOnInput()}updateClassesOnInput(){this.inputs.forEach((t=>{t.classList.remove("mp-input-code-error"),t.classList.add("mp-input-code-focus")}))}checkForErrors(t,e){const i=e.querySelectorAll("input"),n=Array.from(i).every((t=>""!==t.value)),s=Array.from(i).some((t=>""!==t.value));document.activeElement.classList.contains("mp-yape-code-input")||n||(i.forEach((t=>t.classList.add("mp-input-code-error"))),t.firstElementChild.style.display="flex",document.getElementById("yape-input-code-label").style.color="#f23d4f",document.getElementById("helper-approval-code").childNodes[1].innerHTML=s?document.querySelector("input-code").getAttribute("invalid-error-message"):document.querySelector("input-code").getAttribute("empty-error-message"))}applyStyles(){const t=document.createElement("style");t.textContent="\n .mp-checkout-container .mp-yape-input-code-container {\n display: flex !important;\n flex-direction: column !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n }\n\n .mp-checkout-container .mp-yape-label-container {\n display: flex !important;\n align-items: flex-start !important;\n margin-bottom: -8px !important;\n font-style: normal !important;\n font-weight: 400 !important;\n height: 30px !important;\n line-height: 18px !important;\n font-size: 14px !important;\n padding-left: 6px !important\n }\n\n .mp-checkout-container .mp-yape-icon-wrapper {\n position: relative !important;\n display: flex !important;\n align-items: center !important;\n }\n\n .mp-checkout-container .mp-yape-icon {\n max-width: 20px !important;\n margin-left: 4px !important;\n cursor: pointer !important;\n }\n\n .mp-checkout-container .mp-yape-tooltip {\n display: none !important;\n position: absolute !important;\n top: -55px !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n background-color: white !important;\n padding: 8px !important;\n border-radius: 8px !important;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;\n z-index: 100 !important;\n white-space: nowrap !important;\n pointer-events: none !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-size: 14px !important;\n font-weight: 400 !important;\n line-height: 28px !important;\n text-align: left !important;\n\n }\n\n .mp-checkout-container .mp-yape-tooltip::after {\n content: \"\";\n position: absolute;\n bottom: -8px;\n left: 51%;\n transform: translateX(-70%);\n border-width: 8px 8px 0 8px;\n border-style: solid;\n z-index: 101;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n clip-path: polygon(100% 0%, 0% 0%, 50% 100%);\n color: white;\n }\n\n .mp-checkout-container .mp-yape-icon-wrapper:hover .mp-yape-tooltip {\n display: block !important;\n }\n\n .mp-checkout-container .mp-yape-input-container {\n display: flex !important;\n gap: 8px !important;\n }\n\n .mp-checkout-container .mp-yape-code-input {\n width: 38px !important;\n height: 48px !important;\n background: #ffffff !important;\n text-align: center !important;\n font-size: 24px !important;\n border: 1px solid #ccc !important;\n border-radius: 4px !important;\n font-size: 16px !important;\n line-height: 20px !important;\n font-family: 'Proxima Nova', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;\n font-weight: 400 !important;\n box-sizing: border-box;\n }\n\n .mp-checkout-container .mp-yape-code-input:nth-child(4) {\n margin-left: 10px !important;\n }\n\n .mp-checkout-container .mp-input-code-focus {\n border: 1px solid var(--andes-accent-color) !important;\n }\n\n .mp-checkout-container .mp-input-code-error {\n border: 1px solid #f23d4f !important;\n }\n\n @media screen and (max-width: 375px) {\n #mp-checkout-yape-root.mp-checkout-yape-container .mp-yape-input-container {\n flex-direction: row !important;\n gap: 2px !important;\n }\n\n #mp-checkout-yape-root.mp-checkout-yape-container {\n padding: 24px 0!important;\n }\n }\n\n @media only screen and (min-width: 376px) and (max-width: 480px) {\n #mp-checkout-yape-root.mp-checkout-yape-container {\n padding: 24px 0!important;\n }\n }\n ",this.appendChild(t)}createInputContainer(){const t=document.createElement("div");return t.classList.add("mp-yape-input-container"),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible",!1),t.setAttribute("type","error"),t.setAttribute("message","error"),t.setAttribute("input-id","helper-approval-code"),t}}customElements.define("input-code",t)},9604:()=>{class t extends HTMLElement{static get observedAttributes(){return["label","placeholder","value","tooltip","validation-regexp","error-message","tooltip-position","tooltip-label"]}constructor(){super(),this._value="",this._showError=!1,this._inputEl=null,this._onDocumentClick=this._onDocumentClick.bind(this)}connectedCallback(){this._value=this.getAttribute("value")||"",this.render()}disconnectedCallback(){document.removeEventListener("click",this._onDocumentClick)}attributeChangedCallback(t,e,i){"value"===t&&this._inputEl&&this._inputEl.value!==i&&(this._inputEl.value=i||"",this._value=i||""),"value"!==t&&this.render()}get value(){return this._inputEl?this._inputEl.value:this._value}set value(t){this.setAttribute("value",t),this._inputEl&&(this._inputEl.value=t),this._value=t}_validate(t){const e=this.getAttribute("validation-regexp");if(!e||!t)return!0;try{return new RegExp(e).test(t)}catch{return!0}}_onInput(t){this._value=t.target.value,this.setAttribute("value",this._value),this._showError&&(this._showError=!1,this._updateErrorState())}_onChange(t){const e=t.target.value;
6e&&!this._validate(e)?this._showError=!0:this._showError=!1,this._updateErrorState(),this.dispatchEvent(new CustomEvent("change",{detail:{value:e,valid:!this._showError}}))}_onDocumentClick(t){this.contains(t.target)||this._hideTooltip()}_toggleTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.contains("show")?this._hideTooltip():this._showTooltip()}_showTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.add("show"),document.addEventListener("click",this._onDocumentClick)}_hideTooltip(){this.querySelector(".mp-input-with-tooltip-tooltip-content").classList.remove("show"),document.removeEventListener("click",this._onDocumentClick)}_updateErrorState(){const t=this.querySelector(".mp-input-with-tooltip-input-container"),e=this.querySelector(".mp-input-with-tooltip-label");t&&(this._showError?(t.classList.add("error"),e.classList.add("error")):(t.classList.remove("error"),e.classList.remove("error")));const i=this.querySelector(".mp-input-with-tooltip-helper-error");i&&(i.style.display=this._showError?"flex":"none")}render(){const t=this.getAttribute("label")||"",e=this.getAttribute("placeholder")||"",i=this.getAttribute("tooltip")||"",n=this.getAttribute("tooltip-label")||"Mais informações",s=this.getAttribute("error-message")||"Valor inválido",a=this._value||"",r=this._showError,l=this.getAttribute("tooltip-position")||"right";this.innerHTML=`\n <label\n tabindex="0"\n for="mp-input-with-tooltip-input"\n class="mp-input-with-tooltip-label"\n >${t}</label>\n <div class="mp-input-with-tooltip-input-container${r?" error":""}">\n <input\n id="mp-input-with-tooltip-input"\n class="mp-input-with-tooltip-input"\n placeholder="${e}"\n value="${a}"\n />\n <span\n class="mp-input-with-tooltip-tooltip-icon"\n tabindex="0"\n aria-label="${n}"\n role="button"\n >?</span>\n <div\n aria-describedby="mp-input-with-tooltip-tooltip-content"\n class="mp-input-with-tooltip-tooltip-content mp-input-with-tooltip-tooltip-${l}"\n >\n <span\n id="mp-input-with-tooltip-tooltip-content"\n tabindex="0"\n role="tooltip"\n >\n ${i}\n </span>\n </div>\n </div>\n <div\n id="mp-input-with-tooltip-helper-error"\n tabindex="0"\n class="mp-input-with-tooltip-helper-error"\n style="display:${r?"block":"none"}"\n >\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <rect width="12" height="12" rx="6" fill="#CC1818"/>\n <path d="M6.72725 2.90918H5.27271L5.45452 6.90918H6.54543L6.72725 2.90918Z" fill="white"/>\n <path d="M5.99998 7.63645C6.40164 7.63645 6.72725 7.96206 6.72725 8.36373C6.72725 8.76539 6.40164 9.091 5.99998 9.091C5.59832 9.091 5.27271 8.76539 5.27271 8.36373C5.27271 7.96206 5.59832 7.63645 5.99998 7.63645Z" fill="white"/>\n </svg>\n ${s}\n </div>\n `,this._inputEl=this.querySelector("input"),this._inputEl.value=a,this._inputEl.addEventListener("input",this._onInput.bind(this)),this._inputEl.addEventListener("change",this._onChange.bind(this));const o=this.querySelector(".mp-input-with-tooltip-tooltip-icon");o.addEventListener("click",(()=>{this._toggleTooltip()})),o.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||this._toggleTooltip()}))}}customElements.define("input-with-tooltip",t)},9794:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MPE",default:!0,max_length:9,max_length_with_mask:12,min_length:8,placeholder:"99.999.999"};static mask(t){const e=t.replace(/\D+/g,"");return e.length<=2?e:`${e.slice(0,2)}.${e.slice(2).replace(/(\d{3})(?=\d)/g,"$1.")}`}static validate(t){return"string"!=typeof t||0===t.length?{result:!1,type:this.ERROR_TYPES.EMPTY}:{result:!0,type:this.ERROR_TYPES.VALID}}}},9957:(t,e,i)=>{const n=i(3291);t.exports=class extends n{static CONFIG={site_id:"MLU",default:!0,max_length:8,max_length_with_mask:11,min_length:7,placeholder:"9.999.999-9"};static mask(t){const e=t.replace(/\D+/g,"");if(e.length<=3)return e;if(e.length>6){const t=e.slice(0,-1),i=e.slice(-1);let n;return n=t.length<=3?t:t.length<=6?t.slice(0,-3)+"."+t.slice(-3):t.slice(0,-6)+"."+t.slice(-6,-3)+"."+t.slice(-3),n+"-"+i}return e.length<=6?e.slice(0,-3)+"."+e.slice(-3):e.slice(0,-6)+"."+e.slice(-6,-3)+"."+e.slice(-3)}static validate(t){if("string"!=typeof t||0===t.length)return{result:!1,type:this.ERROR_TYPES.EMPTY};if((t=t.replace(/[\s.-]/g,"")).length>this.CONFIG.max_length)return{result:!1,type:this.ERROR_TYPES.WRONG};let e=0,i=0,n=0;const s=t[t.length-1];if(t.length<this.CONFIG.min_length)for(i=t.length;i<this.CONFIG.min_length;i+=1)t=`0${t}`;for(i=0;i<this.CONFIG.min_length;i+=1)e+=parseInt("2987634"[i],10)*parseInt(t[i],10)%10;return n=e%10==0?0:10-e%10,s!==n.toString()?{result:!1,type:this.ERROR_TYPES.WRONG}:{result:!0,type:this.ERROR_TYPES.VALID}}}}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,i),a.exports}i(4751),i(6139),i(3185),i(9241),i(540),i(6407),i(2781),i(3291),i(1807),i(6135),i(1981),i(2603),i(6020),i(3505),i(938),i(9957),i(7749),i(9794),i(2957),i(454),i(6133),i(6045),i(2119),i(2577),i(1943),i(893),i(7117),i(1295),i(9604),i(4073),i(7702),i(8051),i(2979),i(26),i(7887)})();; 7!function(n){"use strict";n((function(){n(document.body).on("change",'input[name="payment_method"]',(function(){n("body").trigger("update_checkout")}))}))}(jQuery);; 8function sendMetric(o,i,e,n={}){const t=wc_mercadopago_checkout_metrics_params,a="https://api.mercadopago.com/ppcore/prod/monitor/v1/event/datadog/big/"+e,r={value:`${o}`,message:`${i}`,plugin_version:t.plugin_version,platform:{name:"woocommerce",uri:`${window.location.origin}${t.location}_${t.theme}_${t.site_id}_${t.currency}`,version:t.platform_version,url:`${window.location.origin}${window.location.pathname}`},details:{...n,site_id:t.site_id,environment:"prod",sdk_instance_id:window.sessionStorage.getItem("_mp_flow_id")||"not_available",cust_id:t.cust_id}};navigator.sendBeacon(a,JSON.stringify(r))}; 9const TOKENIZATION_SECURE_FIELDS=["cardNumber","expirationDate","securityCode"],TOKENIZATION_MESSAGE_SECURITY_FIELDS="invalid_security_fields",TOKENIZATION_MESSAGE_CARDHOLDER_FIELDS="invalid_cardholder_fields",TOKENIZATION_FIELD_BY_NON_PCI_CODE={221:"cardholderName",316:"cardholderName",212:"document",322:"document",214:"document",324:"document"};function normalizeTokenizationField(e){return"expirationMonth"===e||"expirationYear"===e?"expirationDate":e}function tokenizationFieldOf(e){return e?.field&&e?.details?.reason?normalizeTokenizationField(e.field):e?.code&&TOKENIZATION_FIELD_BY_NON_PCI_CODE[e.code]||null}function dedupeJoin(e){return[...new Set(e.filter(Boolean))].join(",")}function classifyTokenizationError(e){const n=[],i=[],o=[],t=[];if(e.forEach((e=>{const r=tokenizationFieldOf(e);r&&TOKENIZATION_SECURE_FIELDS.includes(r)?n.includes(r)||n.push(r):"cardholderName"===r?i.push(e?.message):"document"===r?o.push(e?.message):e?.message&&t.push(e.message)})),n.length){return{message:"invalid_security_fields",reason:TOKENIZATION_SECURE_FIELDS.filter((e=>n.includes(e))).join(",")}}const r=dedupeJoin([...i,...o,...t]);return i.length||o.length?{message:"invalid_cardholder_fields",reason:r}:{message:null,reason:r||"unknown"}}async function callSdkWithMetrics(e,n){try{return await e()}catch(e){const i=String(e?.status??0),o="undefined"!=typeof document&&"custom"===document.querySelector("#mp_checkout_type")?.value&&"createCardToken"===n&&Array.isArray(e)&&e.some((e=>e?.details?.reason||e?.code))?classifyTokenizationError(e):null,t=o&&o.message||("string"==typeof e?e:null)||e?.message||e?.cause?.[0]?.description||"Unknown SDK error";if("function"==typeof window.sendMetric){const e={api_route:n};o&&(e.reason=o.reason),window.sendMetric(i,t,"mp_api_error",e)}throw e}}window.callSdkWithMetrics=callSdkWithMetrics;; 10window.addEventListener("load",(function(){try{const e=document.createElement("script");e.setAttribute("id","mp_woocommerce_security_session"),e.src="https://www.mercadopago.com/v2/security.js",e.async=!0,e.defer=!0,e.onerror=function(){console.warn("Error on loading mp
10security js script")},document.body.appendChild(e)}catch(e){console.warn(e)}}));;
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.