PageSourceSearch

https://meunoalmonte.com/wp-content/plugins/woocommerce-mercadopag…/mp-plugins-components.min.js?ver=8.7.1

js meunoalmonte.com collected 2026-10-08 10:58:44 UTC 51,182 bytes, 1 lines download raw bytes

1(()=>{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)})(),(()=>{class t extends HTMLElement{constructor(){super(),this.state={isOpen:!1,selectedItem:null,focusedIndex:0,hasFocus:!1,isValid:!0,hasInteracted:!1,taxInfo:null}}static get observedAttributes(){return["label","placeholder","hint","required-message","disabled","items","site-id"]}connectedCallback(){this.build()}isIOS(){if(navigator.userAgentData?.platform)return["iOS"].includes(navigator.userAgentData.platform);const t=navigator.userAgent;return/iPad|iPhone|iPod/.test(t)||t.includes("Mac")&&"ontouchend"in document}attributeChangedCallback(t,e,i){if(e!==i)switch(t){case"disabled":this.setDisabled(null!==i);break;case"items":this.setItems(JSON.parse(i||"[]"));break;case"label":this.updateLabel(i);break;case"hint":this.updateHint(i);break;case"required-message":this.setRequiredMessage(i);break;case"site-id":this.updateTaxInfo()}}build(){this.classList.add("andes-dropdown","andes-dropdown--form");const t=document.createElement("div");t.classList.add("andes-dropdown__wrapper");const e=this.createTrigger(),i=this.createMenu(),n=this.createDefaultHelper(),s=this.createErrorHelper(),a=this.createTaxInfo();t.appendChild(e),t.appendChild(i);const r=this.createLabel();this.appendChild(r),this.appendChild(t),this.appendChild(n),this.appendChild(s),this.appendChild(a),this.trigger=e,this.menu=i,this.defaultHelper=n,this.errorHelper=s,this.taxInfo=a,this.itemsContainer=i.querySelector(".andes-dropdown__items"),this.setupEventListeners(),this.itemsContainer&&this.renderItems()}createLabel(){const t=document.createElement("label");return t.className="andes-dropdown__label",t.textContent=this.getAttribute("label")||"",t.setAttribute("tabindex","0"),t.setAttribute("for",this.getAttribute("id")||"andes-dropdown"),t}createTrigger(){const t=document.createElement("button");t.type="button",t.className="andes-dropdown__trigger",t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls","andes-dropdown-menu"),t.setAttribute("data-placeholder",!this.state.selectedItem);const e=document.createElement("span");e.className="andes-dropdown__selected-text",e.textContent=this.getAttribute("placeholder")||"";const i=document.createElement("span");return i.className="andes-dropdown__arrow",t.appendChild(e),t.appendChild(i),t}createMenu(){const t=document.createElement("div");t.className="andes-dropdown__menu",t.setAttribute("role","listbox"),t.setAttribute("tabindex","0"),t.setAttribute("aria-required",this.getAttribute("required")||"false"),t.hidden=!0;const e=document.createElement("div");return e.className="andes-dropdown__items",t.appendChild(e),t}createDefaultHelper(){const t=document.createElement("input-helper");return t.setAttribute("input-id",`${this.getAttribute("id")||"andes-dropdown"}-default`),t.setAttribute("message",this.getAttribute("hint")||""),t.setAttribute("type","message"),t.setAttribute("isVisible",this.getAttribute("hint")?"true":"false"),t}createErrorHelper(){const t=document.createElement("input-helper");return t.setAttribute("input-id",`${this.getAttribute("id")||"andes-dropdown"}-error`),t.setAttribute("message",this.getAttribute("required-message")||""),t.setAttribute("type","error"),t.setAttribute("isVisible","false"),t}createTaxInfo(){const t=document.createElement("div");return t.className="andes-dropdown__tax-info",t.style.display="none",t}setupEventListeners(){this.trigger.addEventListener("click",(()=>this.toggleMenu())),this.trigger.addEventListener("keydown",(t=>this.handleKeyDown(t))),this.trigger.addEventListener("keyup",(t=>this.handleKeyUp(t))),this.trigger.addEventListener("focus",(()=>this.handleFocus())),this.trigger.addEventListener("blur",(()=>this.handleBlur())),this.menu.addEventListener("mousedown",(t=>{t.preventDefault(),t.stopPropagation()})),document.addEventListener("mousedown",(t=>this.handleOutsideClick(t)))}renderItems(){this.itemsContainer&&(this.itemsContainer.innerHTML="",JSON.parse(this.getAttribute("items")||"[]").forEach(((t,e)=>{const i=document.createElement("div");i.className="andes-dropdown__item",i.setAttribute("role","option"),i.setAttribute("aria-selected",this.state.selectedItem&&this.state.selectedItem.value===t.value),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",t.title),i.textContent=t.title,t.disabled&&i.classList.add("andes-dropdown__item--disabled"),this.state.selectedItem&&this.state.selectedItem.value===t.value&&i.classList.add("andes-dropdown__item--selected"),this.state.focusedIndex===e&&this.state.isOpen?(i.classList.add("andes-dropdown__item--focused"),i.setAttribute("aria-selected","true"),this.trigger.setAttribute("aria-activedescendant",`andes-dropdown-item-${e}`),i.id=`andes-dropdown-item-${e}`):(i.setAttribute("aria-selected","false"),i.removeAttribute("id")),t.disabled||(i.addEventListener("mousedown",(i=>{i.preventDefault(),this.selectItem(t,e)})),i.addEventListener("mouseenter",(i=>{this.state.focusedIndex=e,this.isIOS()&&setTimeout((()=>this.selectItem(t,e)),300),this.renderItems()}))),this.itemsContainer.appendChild(i)})))}toggleMenu(){null===this.getAttribute("disabled")&&(this.state.isOpen=!this.state.isOpen,this.updateMenuState(),this.state.isOpen&&(this.state.hasInteracted=!0))}updateMenuState(){this.state.isOpen?(this.menu.hidden=!1,this.classList.add("andes-dropdown--open"),this.trigger.setAttribute("aria-expanded","true"),this.dispatchEvent(new CustomEvent("mp-open-dropdown"))):(this.menu.hidden=!0,this.classList.remove("andes-dropdown--open"),this.trigger.setAttribute("aria-expanded","fal
1se"),this.dispatchEvent(new CustomEvent("mp-close-dropdown"))),this.renderItems()}selectItem(t,e){t.disabled||(this.state.selectedItem=t,this.state.focusedIndex=e,this.state.isOpen=!1,this.updateSelectedText(),this.updateMenuState(),this.updateTaxInfo(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:t})))}updateSelectedText(){const t=this.trigger.querySelector(".andes-dropdown__selected-text");t&&(this.state.selectedItem?(t.textContent=this.state.selectedItem.title,this.trigger.setAttribute("data-placeholder","false")):(t.textContent=this.getAttribute("placeholder")||"",this.trigger.setAttribute("data-placeholder","true")))}handleOutsideClick(t){this.trigger.contains(t.target)||this.menu.contains(t.target)||(this.state.isOpen=!1,this.updateMenuState())}handleKeyDown(t){if(!this.state.isOpen&&("ArrowDown"===t.key||"Enter"===t.key||" "===t.key))return t.preventDefault(),this.state.isOpen=!0,void this.updateMenuState();if(!this.state.isOpen)return;const e=JSON.parse(this.getAttribute("items")||"[]");if("Enter"===t.key||" "===t.key){t.preventDefault();const i=e[this.state.focusedIndex];i&&!i.disabled&&this.selectItem(i,this.state.focusedIndex)}else"Tab"===t.key?t.preventDefault():"Escape"!==t.key&&"Backspace"!==t.key||(t.preventDefault(),this.state.isOpen=!1,this.state.hasInteracted=!0,this.updateMenuState(),this.validate())}handleKeyUp(t){if(!this.state.isOpen)return;const e=JSON.parse(this.getAttribute("items")||"[]");if("Tab"===t.key&&t.shiftKey){let t=this.state.focusedIndex-1;for(;t>=0&&e[t].disabled;)t--;t>=0&&(this.state.focusedIndex=t),this.renderItems()}else if("Tab"===t.key&&!t.shiftKey){let t=this.state.focusedIndex+1;for(;t<e.length&&e[t].disabled;)t++;t<e.length&&(this.state.focusedIndex=t),this.renderItems()}}handleFocus(){if(this.state.hasFocus=!0,this.defaultHelper){const t=this.defaultHelper.querySelector(".mp-helper");t&&(t.style.display="none")}}handleBlur(){this.state.hasFocus=!1,this.state.isOpen=!1,this.updateMenuState(),this.state.hasInteracted&&this.validate()}setItems(t){this.setAttribute("items",JSON.stringify(t)),this.renderItems()}setDisabled(t){t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.classList.toggle("andes-dropdown--disabled",t)}updateLabel(t){const e=this.querySelector(".andes-dropdown__label");e&&(e.textContent=t||"")}updateHint(t){if(this.defaultHelper){this.defaultHelper.updateMessage(t||"");const e=this.defaultHelper.querySelector(".mp-helper");e&&(e.style.display=t?"flex":"none")}}setRequiredMessage(t){this.errorHelper&&this.errorHelper.setAttribute("message",t||"")}setErrorMessage(t){if(this.errorHelper){this.errorHelper.setAttribute("message",t||"");const e=this.errorHelper.querySelector(".mp-helper");if(e&&(e.style.display="flex",e.setAttribute("tabindex","0"),e.setAttribute("aria-label",t||"")),this.defaultHelper){const t=this.defaultHelper.querySelector(".mp-helper");t&&(t.style.display="none",t.setAttribute("tabindex","-1"),t.setAttribute("aria-label",""))}this.classList.add("andes-dropdown--error")}}hideErrorMessage(){if(this.errorHelper){const t=this.errorHelper.querySelector(".mp-helper");t&&(t.style.display="none")}if(this.defaultHelper){const t=this.defaultHelper.querySelector(".mp-helper");t&&(t.style.display="flex")}this.classList.remove("andes-dropdown--error")}validate(){const t=null!==this.getAttribute("required-message"),e=!t||t&&null!==this.state.selectedItem;return this.state.isValid=e,this.state.hasInteracted&&!this.state.isOpen?e?this.hideErrorMessage():this.setErrorMessage(this.getAttribute("required-message")):this.hideErrorMessage(),e}getValue(){return this.state.selectedItem?this.state.selectedItem.value:null}updateTaxInfo(){if(!this.taxInfo)return;const t=this.getAttribute("site-id");if("mla"===t?.toLowerCase()&&this.state.selectedItem?.taxInfo){const{cft:t,tna:e,tea:i}=this.state.selectedItem.taxInfo;if(parseInt(this.state.selectedItem.value,10)>=2){const n=[];if(t&&n.push(`<b>CFTEA: ${t}%</b>`),e&&n.push(`TNA: ${e}%`),i&&n.push(`TEA: ${i}%`),!n.length)return void(this.taxInfo.style.display="none");this.taxInfo.style.display="block",this.taxInfo.innerHTML=n.join(" - ").concat(". Tasa fija.")}else this.taxInfo.style.display="none"}else this.taxInfo.style.display="none"}}customElements.define("andes-dropdown",t)})(),(()=>{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      }
1\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)})(),(()=>{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-input-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-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-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-yape-icon-wrapper {\n        position: relative !important;\n        display: flex !important;\n        align-items: center !important;\n      }
1\n\n      .mp-yape-icon {\n        max-width: 20px !important;\n        margin-left: 4px !important;\n        cursor: pointer !important;\n      }\n\n      .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-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-yape-icon-wrapper:hover .mp-yape-tooltip {\n        display: block !important;\n      }\n\n      .mp-yape-input-container {\n        display: flex !important;\n        gap: 8px !important;\n      }\n\n      .mp-yape-code-input {\n        width: 38px !important;\n        height: 48px !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-yape-code-input:nth-child(4) {\n        margin-left: 10px !important;\n      }\n\n      .mp-input-code-focus {\n        border: 1px solid var(--andes-accent-color) !important;\n      }\n\n      .mp-input-code-error {\n        border: 1px solid #f23d4f !important;\n      }\n\n      @media screen and (max-width: 375px) {\n        .mp-yape-input-container {\n          flex-direction: row !important;\n          gap: 2px !important;\n        }\n\n        .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-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)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}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.createInput(i,n);return t.appendChild(e),t.appendChild(s),t.appendChild(n),t.appendChild(i),t}createLabel(t){const e=document.createElement("input-label");return e.setAttribute("message",t),e.setAttribute("isOptional","false"),e}createInput(t,e){const i=document.createElement("div");i.classList.add("mp-input"),i.setAttribute("id","form-checkout__identificationNumber-container");const n=JSON.parse(this.getAttribute("documents")),s=this.getAttribute("validate"),a=this.createVerticalLine(),r=this.createSelect(i,t,n,s),l=this.createDocument(i,r,t);return r.addEventListener("change",(()=>{i.classList.remove("mp-focus"),i.classList.remove("mp-error"),this.setInpuProperties(r,l),this.setMaskInputDocument(r,l,e)})),i.appendChild(r),i.appendChild(a),i.appendChild(l),this.setMaskInputDocument(r,l,e),i}setInpuProperties(t,e){"CPF"===t.value?(e.value="",e.setAttribute("maxlength","14"),e.setAttribute("placeholder","999.999.999-99")):"CNPJ"===t.value?(e.value="",e.setAttribute("maxlength","18"),e.setAttribute("placeholder","99.999.999/0001-99")):"CI"===t.value?(e.value="",e.setAttribute("maxlength","8"),e.setAttribute("placeholder","99999999")):(e.value="",e.setAttribute("maxlength","20"),e.setAttribute("placeholder",""))}createSelect(t,e,i,n){const s=document.createElement("select");return s.classList.add("mp-document-select"),s.setAttribute("name",this.getAttribute("select-name")),s.setAttribute("id",this.getAttribute("select-id")),s.setAttribute("data-checkout",this.getAttribute("select-data-checkout")),s.setAttribute("data-cy","select-document"),i&&i.forEac
1h((t=>{this.createOption(s,t)})),n&&(s.addEventListener("focus",(()=>{t.classList.add("mp-focus"),e.firstElementChild.style.display="none"})),s.addEventListener("focusout",(()=>{t.classList.remove("mp-focus"),e.firstElementChild.style.display="none"}))),s}createOption(t,e){const i=document.createElement("option");i.innerHTML=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}isValidCPF(t,e){if("string"!=typeof t)return!1;if(!(t=t.replace(/[\s.-]*/gim,""))||0===t.length)return this.updateHelperErrorMessage(e,this.getAttribute("helper-empty")),!1;if("00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1;if(0===parseInt(t,10))return this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1;if(!t||11!==t.length)return this.updateHelperErrorMessage(e,this.getAttribute("helper-invalid")),!1;let i,n=0;for(let e=1;e<=9;e+=1)n+=parseInt(t.substring(e-1,e))*(11-e);if(i=10*n%11,10!==i&&11!==i||(i=0),i!==parseInt(t.substring(9,10)))return this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1;n=0;for(let e=1;e<=10;e+=1)n+=parseInt(t.substring(e-1,e))*(12-e);return i=10*n%11,10!==i&&11!==i||(i=0),i===parseInt(t.substring(10,11))||(this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1)}isValidCNPJ(t,e){if(""===(t=t.replace(/[^\d]+/g,"")))return this.updateHelperErrorMessage(e,this.getAttribute("helper-empty")),!1;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1;if(0===parseInt(t,10))return this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1;if(14!==t.length)return this.updateHelperErrorMessage(e,this.getAttribute("helper-invalid")),!1;let i=t.length-2,n=t.substring(0,i);const s=t.substring(i);let a=0,r=i-7;for(let t=i;t>=1;t-=1)a+=n.charAt(i-t)*r--,r<2&&(r=9);let l=a%11<2?0:11-a%11;if(l!==Number(s.charAt(0)))return this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1;i+=1,n=t.substring(0,i),a=0,r=i-7;for(let t=i;t>=1;t-=1)a+=n.charAt(i-t)*r--,r<2&&(r=9);return l=a%11<2?0:11-a%11,l===Number(s.charAt(1))||(this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1)}isValidCI(t,e){if("string"!=typeof t||0===t.length)return this.updateHelperErrorMessage(e,this.getAttribute("helper-empty")),!1;let i=0,n=0,s=0;const a=t[t.length-1];if(t.length<=6)for(n=t.length;n<7;n+=1)t=`0${t}`;for(n=0;n<7;n+=1)i+=parseInt("2987634"[n],10)*parseInt(t[n],10)%10;return s=i%10==0?0:10-i%10,a===s.toString()||(this.updateHelperErrorMessage(e,this.getAttribute("helper-wrong")),!1)}isValidCC(t,e){return"string"==typeof t&&0!==t.length||(this.updateHelperErrorMessage(e,this.getAttribute("helper-empty")),!1)}isValidCE(t,e){return"string"==typeof t&&0!==t.length||(this.updateHelperErrorMessage(e,this.getAttribute("helper-empty")),!1)}isValidNIT(t,e){return"string"==typeof t&&0!==t.length||(this.updateHelperErrorMessage(e,this.getAttribute("helper-empty")),!1)}setMaskInputDocument(t,e,i){const n={CPF:t=>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"),CNPJ:t=>t.replace(/\D+/g,"").replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1"),CI:t=>t.replace(/\D+/g,"")};e.addEventListener("input",(e=>{if(void 0!==n[t.value]&&(e.target.value=n[t.value](e.target.value)),i){const t=e.target.value.replace(/[^\w\s]/gi,"");i.value=t}}))}createDocument(t,e,i){const n=document.createElement("input");return this.getAttribute("input-id")&&n.setAttribute("id",this.getAttribute("input-id")),n.setAttribute("name",this.getAttribute("input-name")),n.setAttribute("data-checkout",this.getAttribute("input-data-checkout")),n.setAttribute("data-cy","input-document"),n.classList.add("mp-document"),n.type="text",n.inputMode="text",this.setInpuProperties(e,n),n.addEventListener("focus",(()=>{t.classList.add("mp-focus"),t.classList.remove("mp-error"),i.firstElementChild.style.display="none",n.setAttribute("name",this.getAttribute("input-name"))})),n.addEventListener("focusout",(()=>{t.classList.remove("mp-focus");const s={CPF:t=>
1this.isValidCPF(t,i),CNPJ:t=>this.isValidCNPJ(t,i),CI:t=>this.isValidCI(t,i),CC:t=>this.isValidCC(t,i),CE:t=>this.isValidCE(t,i),NIT:t=>this.isValidNIT(t,i)};void 0!==s[e.value]&&(s[e.value](n.value)?(t.classList.remove("mp-error"),i.firstElementChild.style.display="none",n.setAttribute("name",this.getAttribute("input-name"))):(t.classList.add("mp-error"),i.firstElementChild.style.display="flex",n.setAttribute("name",this.getAttribute("flag-error"))))})),n}updateHelperErrorMessage(t,e){t.setAttribute("message",e),t.querySelector(".mp-helper-message").innerHTML=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}}customElements.define("input-document",t)})(),(()=>{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-input-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)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createHelper())}createHelper(){const t=document.createElement("div");t.classList.add("mp-helper"),t.setAttribute("id",this.getAttribute("input-id")),t.setAttribute("data-cy","helper-container"),this.validateVisibility(t);const e=this.getAttribute("message"),i=this.getAttribute("type")||"error",n=this.createHelperMessage(e,i);if("error"===i){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>
1',t.classList.add("mp-helper-icon"),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)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createLabel())}createLabel(){const t=document.createElement("div");t.classList.add("mp-input-label"),t.setAttribute("data-cy","input-label");const e=this.getAttribute("message");t.innerHTML=e;let i=this.getAttribute("isOptional");if("string"==typeof i&&(i="false"!==i),!i){const e=document.createElement("b");e.innerHTML="*",e.style="color: red",t.appendChild(e)}return t}}customElements.define("input-label",t)})(),(()=>{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)})(),(()=>{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)})(),(()=>{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(
1)),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:d}=t,o=this.getAttribute("name"),p=document.createElement("div");return p.classList.add("mp-input-table-label"),p.appendChild(this.createOption(e,o,i,n,r,l,d)),s&&p.appendChild(this.createRowObs(s,a)),p.onclick=()=>{document.getElementById(e).checked=!0},p}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)})(),(()=>{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;e&&!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");
1i&&(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 d=this.querySelector(".mp-input-with-tooltip-tooltip-icon");d.addEventListener("click",(()=>{this._toggleTooltip()})),d.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||this._toggleTooltip()}))}}customElements.define("input-with-tooltip",t)})(),(()=>{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)})(),(()=>{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)})(),(()=>{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)})(),(()=>{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)})(),(()=>{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)})(),(()=>{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)})();

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.