PageSourceSearch

https://fullempanadas.cl/_next/static/chunks/6410.04c5885b8b3104f7.js

js fullempanadas.cl collected 2026-10-01 16:18:51 UTC 7,422 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6410],{46410:function(e,t,n){"use strict";n.r(t);var r=n(85893),o=n(67294),a=n(26628),i=n(49206),l=n(15797),u=n(92852),d=n(92990),c=n(16556),s=n.n(c);let m=(0,o.forwardRef)(function(e,t){let{total:n,userEmail:c,onTokenReceived:m,hideButton:f=!0}=e,[p,y]=(0,o.useState)(!1),[_,b]=(0,o.useState)(!1),[h,g]=(0,o.useState)(!1),v=(0,o.useRef)(null),w=(0,o.useRef)(null),k=(0,o.useRef)(!1),E=(0,o.useRef)(!1),S=(0,o.useRef)(null),C=(0,o.useRef)(!1);(0,o.useEffect)(()=>{S.current="mp-brick-".concat(Date.now(),"-").concat(Math.random().toString(36).substring(2,11))},[]),(0,o.useEffect)(()=>{let e=()=>{let e=document.querySelectorAll('[data-testid="skeleton-form"]');if(e.length>1)for(let t=1;t<e.length;t+=1){let n=e[t];n&&n.parentNode&&n.parentNode.removeChild(n)}};e();let t=new MutationObserver(()=>{e()});return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-testid"]}),()=>{t.disconnect()}},[]),(0,o.useLayoutEffect)(()=>{E.current||(E.current=!0,g(!0))},[]);let M=(0,a.v9)(e=>{var t;return null===(t=e.core)||void 0===t?void 0:t.settings}),{getDeviceId:L}=(0,l.L)();(0,o.useLayoutEffect)(()=>{k.current=!0,g(e=>e||!0)},[]),(0,o.useLayoutEffect)(()=>{let e="function"==typeof window.matchMedia&&window.matchMedia("(min-width: 1024px)").matches;if(!e)return;let t="__mp_desktop_brick_mounted__";window[t]?g(!1):window[t]=!0},[]),(0,o.useLayoutEffect)(()=>{if(w.current&&h&&k.current){let e=w.current.querySelector("iframe");e||(w.current.innerHTML="")}},[h]),(0,o.useLayoutEffect)(()=>{if(!w.current)return;let e=document.querySelectorAll("[data-mp-brick-root]");e.forEach(e=>{e!==w.current&&e&&e.parentNode&&e.parentNode.removeChild(e)});let t=document.querySelectorAll('[data-testid="skeleton-form"], [data-testid="mp-skeleton-form"]');t.forEach(e=>{!w.current.contains(e)&&e&&e.parentNode&&e.parentNode.removeChild(e)})},[w]),(0,o.useEffect)(()=>{if(!_&&h&&k.current){if(!window.__mp_initialized__)try{(0,i.R6)("APP_USR-10651cce-ad7d-438d-814b-1c608d47e4b8",{locale:"es-CL"}),window.__mp_initialized__=!0}catch(e){console.error("Error initializing MercadoPago:",e),u.Z.paymentFormLoadFailed({tenant:null==M?void 0:M.tenant,paymentMethod:d.ig.mercadoPagoCard,stage:"init",errorMessage:null==e?void 0:e.message});return}b(!0),y(!0)}},[_,h]),(0,o.useEffect)(()=>{let e=w.current;return()=>{k.current=!1,e&&(e.innerHTML="");{let e="function"==typeof window.matchMedia&&window.matchMedia("(min-width: 1024px)").matches;e&&setTimeout(()=>{window.__mp_desktop_brick_mounted__=!1},300)}}},[]);let P=Number.isFinite(n)&&n>0,x=(0,o.useMemo)(()=>({amount:n,payer:{email:c||""}}),[n,c]),A=(0,o.useMemo)(()=>({visual:{hideFormTitle:!0,style:{theme:"default",customVariables:{formPadding:"0px",...(null==M?void 0:M.brandPrimary)&&{baseColor:"#".concat(M.brandPrimary)},...(null==M?void 0:M.brandSecondary)&&{baseColorSecondVariant:"#".concat(M.brandSecondary)}}}},paymentMethods:{maxInstallments:1}}),[null==M?void 0:M.brandPrimary,null==M?void 0:M.brandSecondary]),N=(0,o.useCallback)(async e=>{if(e.token&&m){let t=L();m(e.token,t)}},[m,L]),q=(0,o.useCallback)(()=>{C.current||(C.current=!0,setTimeout(()=>{var e;let t=document.querySelectorAll('[data-testid="skeleton-form"]');t.forEach(e=>{var t;(null===(t=w.current)||void 0===t?void 0:t.contains(e))&&e.setAttribute("data-testid","mp-skeleton-form")});let n=w.current||document,r=n.querySelectorAll("button"),o=Array.from(r).filter(e=>{let t=(e.textContent||"").toLowerCase();return t.includes("pagar")||t.includes("pay")});f&&o.forEach(e=>{e.style.opacity="0",e.style.position="absolute",e.style.left="-9999px",e.style.display="none"});let a=(null===(e=w.current)||void 0===e?void 0:e.parentElement)||w.current||document,i=a.querySelectorAll('[data-testid="skeleton-form"], [data-testid="mp-skeleton-form"]');i.forEach(e=>{e&&e.parentNode&&e.parentNode.removeChild(e)})},150))},[f]),I=(0,o.useCallback)(e=>{u.Z.paymentFormLoadFailed({tenant:null==M?void 0:M.tenant,paymentMethod:d.ig.mercadoPagoCard,stage:"brick_render",errorCode:(null==e?void 0:e.cause)||(null==e?void 0:e.type),errorMessage:null==e?void 0:e.message})},[null==M?void 0:M.tenant]);return((0,o.useEffect)(()=>
1{if(!f)return;let e="mercado-pago-hide-button";if(document.getElementById(e))return;let t=document.createElement("style");return t.id=e,t.textContent='\n        [data-testid="card_payment_submit_button"] {\n          display: none !important;\n        }\n        button[data-testid="card_payment_submit_button"] {\n          display: none !important;\n        }\n        .mercado-pago-container button {\n          display: none !important;\n        }\n        [data-mp-brick-root] button {\n          display: none !important;\n        }\n        /* The submit button is hidden above; also drop its wrapper so its\n           margins don\'t leave a blank gap before the processor footer. */\n        [data-mp-brick-root] [data-testid="submit-wrapper"] {\n          display: none !important;\n        }\n      ',document.head.appendChild(t),()=>{let t=document.getElementById(e);t&&t.remove()}},[f]),(0,o.useEffect)(()=>{let e="mercado-pago-hide-header";if(document.getElementById(e))return;let t=document.createElement("style");t.id=e,t.textContent='\n        [data-mp-brick-root] [data-testid="icon"] {\n          display: none !important;\n        }\n      ',document.head.appendChild(t)},[]),(0,o.useImperativeHandle)(t,()=>({submit:()=>{let e=document.querySelector('[data-testid="card_payment_submit_button"]');if(e&&!e.disabled)return e.click(),!0;let t=document.querySelector("[data-mp-brick-root]");if(t){let e=t.querySelectorAll("button"),n=Array.from(e).filter(e=>{let t=(e.textContent||"").toLowerCase();return(t.includes("pagar")||t.includes("pay"))&&!e.disabled});if(n.length>0)return n[0].click(),!0}let n=document.querySelectorAll("button"),r=Array.from(n).filter(e=>{let t=(e.textContent||"").toLowerCase();return(t.includes("pagar")||t.includes("pay"))&&!e.disabled});return r.length>0&&(r[0].click(),!0)}}),[]),h&&k.current)?(0,r.jsx)("div",{ref:w,className:"".concat(f?s().containerModal:""),"data-mp-brick-root":!0,"data-instance-id":S.current,children:p&&P&&(0,r.jsx)(i.Wg,{ref:v,initialization:x,customization:A,onSubmit:N,onReady:q,onError:I})}):null});t.default=m},15797:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var r=n(67294);function o(){let[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(!0),[a,i]=(0,r.useState)(null),l=(0,r.useCallback)(()=>{let e=window.MP_DEVICE_SESSION_ID;return"string"==typeof e&&e.length>0?e:null},[]),u=(0,r.useCallback)(()=>{let e=document.querySelector('script[src*="mercadopago.com/v2/security.js"]');return null!==e},[]);return(0,r.useEffect)(()=>{if(!u()){i("MercadoPago security script not loaded"),o(!1);return}let e=l();if(e){t(e),o(!1);return}let n=0,r=()=>{let e=l();if(e){t(e),o(!1);return}if((n+=1)>=50){i("Timeout waiting for MercadoPago Device ID"),o(!1);return}setTimeout(r,100)};setTimeout(r,100)},[l,u]),{deviceId:e,isLoading:n,error:a,getDeviceId:l}}},16556:function(e){e.exports={row:"styles_row__EkSWK",wrap:"styles_wrap__6imEH",field:"styles_field__M_joe",label:"styles_label__QT_Sz",input:"styles_input__P_ppc",select:"styles_select__fKEY3",secureField:"styles_secureField__i0jjU",inlineGroup:"styles_inlineGroup__fEM8U",container:"styles_container__ez86u",containerModal:"styles_containerModal__yaPIr"}}}]);

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.