1(this.webpackJsonpERP_APP=this.webpackJsonpERP_APP||[]).push([[0],{211:function(e,t,n){},212:function(e,t,n){},234:function(e,t,n){},235:function(e,t,n){},236:function(e,t,n){},239:function(e,t,n){},242:function(e,t,n){},243:function(e,t,n){},244:function(e,t,n){},247:function(e,t,n){},248:function(e,t,n){},249:function(e,t,n){},250:function(e,t,n){},251:function(e,t,n){},253:function(e,t,n){},254:function(e,t,n){},255:function(e,t,n){"use strict";n.r(t);var i=n(1),c=n.n(i),a=n(63),o=n.n(a),r=(n(211),n(212),n(165)),s=n.n(r),l=n(11),d="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?"http://localhost:2001/":"/api_site/",u=s.a.create({baseURL:d,validateStatus:function(e){return 401!==e&&422!==e&&500!==e||l.b.warn("Entre com a sua conta \ud83d\ude01"),205===e?(l.b.error("Erro. "),e):e>=200&&e<300}}),j=function(){var e=window.location.hostname;if("localhost"===e||"127.0.0.1"===e)return"ngklsdng\xe7sghslkg5482436552345asfasfasf";var t=new URLSearchParams(window.location.search).get("prot");return t&&t.length>5?t:e.replace(/^www\./,"")};u.interceptors.request.use((function(e){return e.headers["X-Site-Protocol"]=j(),e}),(function(e){return Promise.reject(e)}));var b=u,p=s.a.create({baseURL:d,validateStatus:function(e){return e>=200&&e<300}});p.interceptors.request.use((function(e){return e.headers["X-Site-Protocol"]=j(),e}),(function(e){return Promise.reject(e)}));var x=n(39),h=n(27),m=n(4),g=n(69),f=n.n(g),O=n(90),v=n(166);function y(e){return e.replace(/[^0-9a-zA-Z\xe1\xe0\xe2\xe3\xe9\xe8\xea\xed\xed\xf3\xf2\xf4\xf5\xfa\xf9\xfc\xc1\xc0\xc2\xc3\xc9\xc8\xca\xcd\xcd\xd3\xd2\xd4\xd5\xda\xd9\xdc\xe7\xc7@$&*=#~.,;:?!()-/\\\xa7\xb1\xaa\xba\xb0\xa8\xab\xbb\u2018\u2019\u201c\u201d\u201e\u201e\u2026\u2020\u2021\u2022\xb0\u2014\u2015\u20a9\u20a9\u20ac\xa3\xa5\xa7\xb5\u20b5\u20bd\uffe5\u7b26\u53f7_\u2026%"'~\u2026\u2020\u2021\u2022\xb0\u2014\u2015\u20a9\u20a9\u20ac\xa3\xa5\xa7\xb5\u20b5\u20bd\uffe5 \u7b26\u53f7_\[\]{}<>]/g,"")}function k(e){return String(e).replace(/\D/g,"")}var S=function(e){if(!v.isMobile)try{var t=document.getElementsByName(e);1===t.length&&t[0].focus()}catch(n){alert("Objeto n\xe3o encontrado!")}},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;"Enter"!=e.key&&"Next"!=e.key&&"Go"!=e.key&&"Okay"!=e.key&&"Ok"!=e.key||t&&S(t)};function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t;return null==e&&void 0==e&&NaN==e||String(e).length>0&&("NONE"==String(e).toUpperCase()||"NULL"==String(e).toUpperCase()||"undefined"==String(e).toLowerCase()||(n=String(e))),n}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t;if(isNaN(e)||null!=e||NaN!=e||void 0!=e){var i=String(e);n=i.split(".").length-1>=1?parseInt(i.split(".")[0])||t:i.split(",").length-1>=1?parseInt(i.split(",")[0])||t:parseInt(e)||t}else n=""==e||String(e).length<=0?t:parseInt(e);return n}function A(e){if(0===Object.keys(e).length)return!0;var t=String(JSON.stringify(e));return t.length>=2&&t.length<=8?"{}"==(t=String(t).replaceAll(" ",""))||"[]"==t||"{[]}"==t||"[{}]"==t||"{{}}"==t||"[[]]"==t||"[{{}}}"==t:!(String(e).length>2)}function z(){return _.apply(this,arguments)}function _(){return _=Object(O.a)(f.a.mark((function e(){var t,n,i,c,a,o,r,s,d,u,j=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=j.length>0&&void 0!==j[0]?j[0]:"",n=j.length>1&&void 0!==j[1]?j[1]:{},i=j.length>2&&void 0!==j[2]?j[2]:function(){},c=j.length>3&&void 0!==j[3]&&j[3],a=j.length>4&&void 0!==j[4]?j[4]:function(){},o=j.length>5&&void 0!==j[5]?j[5]:function(){},a&&a(!0),e.prev=7,e.next=10,b.post("/"+t,n,{headers:{"Content-Type":"application/json",Authorization:"Bearer "+localStorage.getItem("tk")}});case 10:r=e.sent,a&&a(!1),r&&r.data&&0==r.data.err?i(r.data.res):(c||(s=r&&r.data?r.data.err_tx||"Erro desconhecido na API":"Resposta inv\xe1lida do servidor",l.b.warn(s)),o(r?r.data:{err:1,err_tx:"Sem dados"})),e.next=21;break;case 15:e.prev=15,e.t0=e.catch(7),a&&a(!1),console.error("AsyncGet Error:",e.t0),c||401!==(u=null===e.t0||void 0===e.t0||null===(d=e.t0.response)||void 0===d?void 0:d.status)&&422!==u&&l.b.error("Erro de conex\xe3o ou execu\xe7\xe3o: "+String(e.t0.message||e.t0)),o({err:1,err_tx:String(e.t0)});case 21:case"end":return e.stop()}}),e,null,[[7,15]])}))),_.apply(this,arguments)}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=arguments.length>4&&void 0!==arguments[4]&&arguments[4];c&&alert("A:"+e);
1var a=e.toLocaleString("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t});return a.length<=0&&(a=1===t?"0,0":2===t?"0,00":3===t?"0,000":4===t?"0,0000":"0"),c&&alert("R:"+a),String(n).length>0?String(i).length>0?String(n)+a+String(i):a:String(i).length>0?a+String(i):a}function E(e){if(!e||0===e.length)return{score:-1,label:"",color:"transparent"};var t,n=0;e.length>=6&&(t=e,!["123456","654321","987654","456789","0123456789"].some((function(e){return t.includes(e)})))&&!function(e){return/(.)\1{4,}/.test(e)}(e)&&(n=1),1===n&&(function(e){return/[a-zA-Z]/.test(e)&&/[0-9]/.test(e)}(e)||function(e){return/[!#$&\@*\-_+]/.test(e)}(e))&&(n=2);return[{label:"Fraca",color:"#ff4d4f",score:0},{label:"Moderada",color:"#faad14",score:1},{label:"Forte",color:"#52ae1a",score:2}][n]}var I=n(3),B=Object(i.createContext)({}),R=function(e){var t=e.children,n=Object(i.useState)(!0),c=Object(m.a)(n,2),a=c[0],o=c[1],r=Object(i.useState)(""),s=Object(m.a)(r,2),d=s[0],u=s[1],j=Object(i.useState)(""),b=Object(m.a)(j,2),p=b[0],x=b[1],h=Object(i.useState)("black"),g=Object(m.a)(h,2),f=g[0],O=g[1],v=Object(i.useState)("black"),y=Object(m.a)(v,2),k=y[0],S=y[1],C=Object(i.useState)(1),w=Object(m.a)(C,2),A=w[0],_=w[1],P=Object(i.useState)(""),E=Object(m.a)(P,2),R=E[0],F=E[1],L=Object(i.useState)(""),D=Object(m.a)(L,2),W=D[0],T=D[1],q=Object(i.useState)(""),M=Object(m.a)(q,2),H=M[0],V=M[1],Q=Object(i.useState)(""),U=Object(m.a)(Q,2),X=U[0],G=U[1],J=Object(i.useState)(""),K=Object(m.a)(J,2),Z=K[0],Y=K[1],$=Object(i.useState)(""),ee=Object(m.a)($,2),te=ee[0],ne=ee[1],ie=Object(i.useState)(""),ce=Object(m.a)(ie,2),ae=ce[0],oe=ce[1],re=Object(i.useState)(""),se=Object(m.a)(re,2),le=se[0],de=se[1],ue=Object(i.useState)(0),je=Object(m.a)(ue,2),be=je[0],pe=je[1],xe=Object(i.useState)(""),he=Object(m.a)(xe,2),me=he[0],ge=he[1],fe=Object(i.useState)(""),Oe=Object(m.a)(fe,2),ve=Oe[0],ye=Oe[1],ke=Object(i.useState)([]),Se=Object(m.a)(ke,2),Ce=Se[0],Ne=Se[1],we=Object(i.useState)("Aux A"),Ae=Object(m.a)(we,2),ze=Ae[0],_e=Ae[1],Pe=Object(i.useState)("Aux B"),Ee=Object(m.a)(Pe,2),Ie=Ee[0],Be=Ee[1],Re=Object(i.useState)("Aux C"),Fe=Object(m.a)(Re,2),Le=Fe[0],De=Fe[1],We=Object(i.useState)({itens:[],total:0}),Te=Object(m.a)(We,2),qe=Te[0],Me=Te[1],He=Object(i.useState)(!1),Ve=Object(m.a)(He,2),Qe=Ve[0],Ue=Ve[1],Xe=Object(i.useState)("Entrar"),Ge=Object(m.a)(Xe,2),Je=Ge[0],Ke=Ge[1],Ze=Object(i.useState)(""),Ye=Object(m.a)(Ze,2),$e=Ye[0],et=Ye[1],tt=Object(i.useState)(0),nt=Object(m.a)(tt,2),it=nt[0],ct=nt[1],at=Object(i.useState)(0),ot=Object(m.a)(at,2),rt=ot[0],st=ot[1],lt=Object(i.useState)([]),dt=Object(m.a)(lt,2),ut=dt[0],jt=dt[1],bt=Object(i.useState)(!1),pt=Object(m.a)(bt,2),xt=pt[0],ht=pt[1],mt=Object(i.useState)([]),gt=Object(m.a)(mt,2),ft=gt[0],Ot=gt[1],vt=Object(i.useState)(0),yt=Object(m.a)(vt,2),kt=yt[0],St=yt[1],Ct=Object(i.useRef)(""),Nt=Object(i.useRef)(null);Object(i.useEffect)((function(){if(document.querySelectorAll(".tracking-script").forEach((function(e){return e.remove()})),me&&me.length>5){var e=document.createElement("script");e.async=!0,e.className="tracking-script",e.src="https://www.googletagmanager.com/gtag/js?id=".concat(me),document.head.appendChild(e);var t=document.createElement("script");t.className="tracking-script",t.innerHTML="\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '".concat(me,"', { send_page_view: false });\n "),document.head.appendChild(t)}if(ve&&ve.length>5){var n=document.createElement("script");n.className="tracking-script",n.innerHTML="\n !function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '".concat(ve,"');\n "),document.head.appendChild(n)}var i=Ct.current||window.location.pathname+window.location.search;(me||ve)&&(wt(i),Nt.current&&At(Nt.current))}),[me,ve]);var wt=function(e){var t=e||window.location.pathname+window.location.search;Ct.current=t,window.gtag&&me&&(window.gtag("config",me,{page_path:t,page_location:window.location.href,page_title:document.title}),window.gtag("event","page_view",{page_path:t,page_location:window.location.href,page_title:document.title})),window.fbq&&ve&&window.fbq("track","PageView")},At=function(e){if(e){Nt.current=e;var t=Number(e.valor)||0,n=!1,i=!1;window.gtag&&me&&(window.gtag("event","view_item",{currency:"BRL",value:t,items:[{item_id:String(e.uuid),item_name:String(e.descri),price:t,quantity:1}]}
1),n=!0),window.fbq&&ve&&(window.fbq("track","ViewContent",{content_ids:[String(e.uuid)],content_name:String(e.descri),content_type:"product",value:t,currency:"BRL"}),i=!0);var c=Boolean(me),a=Boolean(ve);c&&!n||a&&!i||(Nt.current=null)}},zt=function(e){if(e){var t=Number(e.valor)||0,n=Number(e.qtd)||1;window.gtag&&me&&window.gtag("event","add_to_cart",{currency:"BRL",value:t*n,items:[{item_id:String(e.uuid),item_name:String(e.descri),price:t,quantity:n}]}),window.fbq&&ve&&window.fbq("track","AddToCart",{content_ids:[String(e.uuid)],content_name:String(e.descri),content_type:"product",value:t*n,currency:"BRL"})}},_t=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=N(localStorage.getItem("tk"));t.length>10&&z("carrinhoVer",{},(function(t){var n=0;t.itens&&t.itens.forEach((function(e){n+=e.valor*e.qtd})),Me({itens:t.itens||[],total:n}),e&&n>0&&setTimeout((function(){Ue(!0),setTimeout((function(){return Ue(!1)}),1300)}),1300)}),!0)},Pt=function(e,t,n){if(n&&"undefined"!==n){var i=document.querySelector(e);if(!i){var c=e.split("[")[0];i=document.createElement(c),e.includes("name=")&&i.setAttribute("name",e.split('"')[1]),e.includes("property=")&&i.setAttribute("property",e.split('"')[1]),e.includes("rel=")&&i.setAttribute("rel",e.split('"')[1]),document.head.appendChild(i)}i.setAttribute(t,n)}};return Object(i.useEffect)((function(){o(!0),z("getSite",{},(function(e){var t=String(e.site.nome),n=N(e.site.descricao),i=N(e.site.logo),c=(N(e.site.icon),N(e.site.url)),a=e.site.cor||"#000000";document.title=t,Pt('meta[name="description"]',"content",n),Pt('meta[name="theme-color"]',"content",a),Pt('link[rel="icon"]',"href",i),Pt('link[rel="apple-touch-icon"]',"href",i),Pt('link[rel="canonical"]',"href",c),Pt('meta[property="og:site_name"]',"content",t),Pt('meta[property="og:title"]',"content",t),Pt('meta[property="og:description"]',"content",n),Pt('meta[property="og:url"]',"content",c),Pt('meta[property="og:image"]',"content",i),Pt('meta[property="og:type"]',"content","website"),Pt('meta[name="twitter:card"]',"content","summary_large_image"),Pt('meta[name="twitter:title"]',"content",t),Pt('meta[name="twitter:description"]',"content",n),Pt('meta[name="twitter:image"]',"content",i),u(e.site.nome),x(e.site.url),O(e.site.cor),S(e.site.corTexto),_(e.site.status),F(N(e.site.aviso)),T(N(e.site.logo)),V(N(e.site.icon)),G(N(e.site.descricao)),Y(N(e.site.email)),ne(N(e.site.fone)),oe(N(e.site.rodape_links)),de(N(e.site.rodape_obs)),pe(e.site.banner_tipo||0),ge(N(e.site.google_tag)),ye(N(e.site.facebook_pixel)),Ne(e.site.menu_topo||[]),_e(N(e.site.aux_a)||"Aux A"),Be(N(e.site.aux_b)||"Aux B"),De(N(e.site.aux_c)||"Aux C"),St(Number(e.site.agendamento)||0),o(!1)}),!1,null,(function(e){ht(!0),o(!1)})),_t(!0)}),[]),Object(I.jsx)(B.Provider,{value:{loading:a,siteNome:d,siteUrl:p,siteCor:f,siteCorTexto:k,siteLogo:W,siteIcon:H,siteStatus:A,siteAviso:R,siteDescri:X,siteEmail:Z,siteFone:te,siteRodapeLinks:ae,siteRodapeObs:le,siteBannerTipo:be,siteGoogleTag:me,siteFacebookPixel:ve,siteMenuTopo:Ce,siteAuxA:ze,siteAuxB:Ie,siteAuxC:Le,trackPageView:wt,trackViewContent:At,trackAddToCart:zt,trackPurchase:function(e,t,n){var i=Number(t)||0,c=Array.isArray(n)?n:[];window.gtag&&me&&window.gtag("event","purchase",{transaction_id:String(e),value:i,currency:"BRL",items:c.map((function(e){return{item_id:String(e.uuid),item_name:String(e.descri),price:Number(e.valor)||0,quantity:Number(e.qtd)||1}}))}),window.fbq&&ve&&window.fbq("track","Purchase",{content_ids:c.map((function(e){return String(e.uuid)})),content_type:"product",value:i,currency:"BRL"})},updateTag:Pt,updateSiteMeta:function(){d&&(document.title=d,Pt('meta[name="description"]',"content",X),Pt('meta[name="theme-color"]',"content",f),Pt('link[rel="icon"]',"href",W),Pt('link[rel="apple-touch-icon"]',"href",W),Pt('link[rel="canonical"]',"href",p),Pt('meta[property="og:site_name"]',"content",d),Pt('meta[property="og:title"]',"content",d),Pt('meta[property="og:description"]',"content",X),Pt('meta[property="og:url"]',"content",p),Pt('meta[property="og:image"]',"content",W),Pt('meta[property="og:type"]',"content","website"),Pt('meta[name="twitter:card"]',"content","summary_large_image"),Pt('meta[name="twitter:title"]',"content",d),Pt('meta[name="twitter:description"]',"content",X),Pt('meta[name="twitter:image"]',"content",W))},cart:qe,setCart:Me,fetchCart:_t,addToCart:function(e,t){return new Promise((function(n){if(N(localStorage.getItem("tk")).length<10)return st(2),l.b.info("Acesse sua conta ou ca
1dastre-se para continuar!"),void n(!1);z("carrinhoAdd",{uuid:e,qtd:t},(function(i){var c=0;i.itens&&i.itens.forEach((function(e){c+=e.valor*e.qtd})),Me({itens:i.itens||[],total:c});var a=i.itens.find((function(t){return t.uuid===e}));a&&zt({uuid:e,descri:a.descri,valor:a.valor,qtd:t}),Ue(!0),setTimeout((function(){return Ue(!1)}),1e3),n(!0)}),!1,null,(function(){return n(!1)}))}))},isCartAnimating:Qe,userNome:Je,setUserNome:Ke,userCep:$e,setUserCep:et,isMensal:it,setIsMensal:ct,showUserBox:rt,setShowUserBox:st,pedidos:ut,setPedidos:jt,fetchPedidos:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;z("meusPedidos",{},(function(e){jt(e.pedidos||[]),st(5)}),!1,e)},fetchPerfil:function(){st(4)},siteError:xt,inventario:ft,setInventario:Ot,fetchInventario:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;z("meuInventario",{},(function(e){Ot(e.inventario||[]),st(6)}),!1,e)},siteAgendamento:kt},children:t})},F=n(17),L=(n(234),n(235),n(28)),D=n(268),W=n(106),T=n(203),q=n(2),M=n(5),H=(n(236),n(131)),V=n(99),Q=n(51),U=(n(237),n(108)),X=n(167),G=n.n(X),J=(n(183),n(188),n(266),n(271),n(123)),K=n(71),Z=(n(205),n(168),n(160)),Y=(n(156),n(278),n(279),n(280),n(281),n(32),n(169)),$=n(22),ee=n(196);n(239);function te(e){var t=e.zindex,n=void 0===t?9999:t,c=e.children,a=e.txFechar,o=void 0===a?"Fechar":a,r=e.corFechar,s=void 0===r?"#F65835":r,l=e.cor,d=e.titulo,u=e.carregando,j=void 0!==u&&u,b=e.blockFundo,p=void 0!==b&&b,x=e.click_close,h=void 0===x?function(){}:x,m=e.btn_sim,g=void 0===m?null:m,f=e.btn_nao,O=void 0===f?null:f,v=e.btn_sim_tx,y=void 0===v?"":v,k=e.btn_nao_tx,S=void 0===k?"":k,C=e.width,N=void 0===C?"":C,w=e.height,A=void 0===w?"":w,z=e.btn_sim_direita,_=void 0!==z&&z,P=(Object(i.useRef)(null),function(e){"modal-fundo"==e.target.id&&(j||p||E())});Object(i.useEffect)((function(){return document.addEventListener("click",P,!0),function(){document.removeEventListener("click",P,!0)}}),[]);var E=function(e){h(),document.removeEventListener("click",P,!0)},B=function(){return y&&Object(I.jsx)(le,{onClick:function(){g?g():E()},texto:y,borda:!0,bordaCor:"green",cor:"white",fundo:"green"})},R=function(){return S&&Object(I.jsx)(le,{onClick:function(){O?O():E()},texto:S,borda:!0,bordaCor:"red"})};return Object(I.jsx)("div",{className:"modal",id:"modal-fundo",style:{zIndex:n},children:Object(I.jsxs)("div",{className:"modal-container",style:{width:N||"560px",height:A||"auto",backgroundColor:l||"white"},children:[Object(I.jsxs)("div",{className:"modal-titulo",style:"-s"===o?{justifyContent:"center"}:{},children:["-s"!=o&&Object(I.jsxs)("button",{className:"close",style:{backgroundColor:s},onClick:function(){E()},children:[Object(I.jsx)(H.b,{size:23,color:"#FFF"}),o]}),Object(I.jsx)("h2",{style:"-s"===o?{textAlign:"center",width:"100%"}:{},children:d})]}),Object(I.jsx)("div",{className:"row",children:Object(I.jsxs)(oe,{display:j,children:[c,Object(I.jsx)("div",{className:"modal-btns",children:_?Object(I.jsxs)(I.Fragment,{children:[R(),B()]}):Object(I.jsxs)(I.Fragment,{children:[B(),R()]})})]})})]})})}n(197),J.a.Option;function ne(e){return String(function(e){return Math.floor(Math.random()*(e-1+1))+1}(e))}var ie=function(e){var t=e.id,n=e.children,i=e.icon,c=e.modelo,a=void 0===c?1:c,o=e.className,r=e.width,s=e.minWidth,l=e.maxWidth,d=e.cor,u=e.titulo,j=e.bordaCor,b=e.bordaSize,p=void 0===b?2:b,x=e.semFoco,h=e.multiline,m=e.disabled,g=e.marginTop,f=e.marginBottom,O=e.marginLeft,v=e.height,y=void 0===v?"37px":v,k=e.minHeight,S=e.style,C=void 0===S?{}:S,N=e.styleInterno,w=void 0===N?{}:N,A=e.pulse,z=void 0!==A&&A;var _=y;function P(e){return e?" + 5px ":" + 0px "}y||null!=y||(_="37px");var E=!1;4==a&&(E=!0);var B,R=E?"calc("+_+P(h)+")":u&&String(u).length>0?"calc("+_+P(h)+" + 18px)":"calc("+_+P(h)+")";return Object(I.jsx)(I.Fragment,{children:Object(I.jsx)("div",{id:t||null,className:"bmolder "+(B=a,(1==B?"bedit-fundo-model-1":2==B?"bedit-fundo-model-2":3==B?"bedit-fundo-model-3":"bedit-fundo-model-4")+" ")+(z?" bm-force-pulse ":" ")+(o?" "+o:" "),tabIndex:x?"-1":null,style:Object(M.a)(Object(M.a)({},C),{},{width:r&&r,minWidth:s&&s,maxWidth:l&&l,height:R,minHeight:k&&k,border:j?String(p)+"px solid "+String(j):null,marginTop:g||null,marginBottom:f||null,marginLeft:O||null,backgroundColor:m?"rgb(242, 242, 242)":d||"white"}),children:i?Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"row",height:"100%",width:"100%",paddingRight:"8px"},children:[Object(I.jsx)("div",{style:{display:"flex",flexDirection:"row",height:"auto",alignItems:"center",justifyContent:"center",paddingLeft:"8px",paddingRight:"8px"},children:i}),Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",
1justifyContent:"center",marginBottom:"0px"},children:[u&&String(u).length>0&&Object(I.jsx)("div",{className:"bedit-item-title",children:u}),Object(I.jsx)("div",{style:{height:"auto",width:"100%",backgroundColor:d||"white",overflow:"hidden"},children:n})]})]})}):Object(I.jsxs)(I.Fragment,{children:[u&&String(u).length>0&&Object(I.jsx)("div",{className:"bedit-item-title",style:{marginTop:4==a?"2px":null,marginLeft:4==a?"2px":null},children:u}),4==a&&Object(I.jsx)("div",{style:{borderRight:"1px solid rgba(222, 230, 235, 1)",width:"1px",height:"70%",marginLeft:"4px"}}),Object(I.jsx)("div",{style:Object(M.a)(Object(M.a)({},w),{},{height:"100%",width:"100%",display:"flex",backgroundColor:d||"white",overflow:"hidden"}),children:n})]})})})},ce=function(e){var t=e.id,n=e.name,c=e.next,a=e.nextKeyDown,o=e.titulo,r=e.modelo,s=e.reef,l=e.className,d=e.height,u=e.minHeight,j=e.width,b=e.maxWidth,p=e.minWidth,x=e.cor,h=e.is,g=e.limite,f=e.value,O=e.setValue,v=e.disabled,w=e.tipo_numero,A=e.tipo_alfa,z=e.tipo_valor,_=e.tipo_pass,P=e.tipo_doc,E=e.multiline,B=e.mask,R=e.upper,F=e.pulse,D=void 0===F||F,T=e.autoComplete,q=e.semTeclado,M=void 0!==q&&q,H=e.help,Q=void 0===H?"":H,U=e.btnExtraClick,X=e.btnExtraHint,J=void 0===X?"":X,K=e.autoQuebra,Y=e.btnExtraIcon,$=void 0===Y?Object(I.jsx)(V.a,{size:17}):Y,ee=e.placeHolderColor,te=void 0!==ee&&ee,ce=e.delayChange,ae=e.detectaKeyEnter,oe=void 0===ae||ae,re=e.buscar,se=e.bold,le=e.fontCor,de=void 0===le?"black":le,ue=e.fontSize,je=e.hint,be=e.onEnter,pe=e.onKeyEnter,xe=e.onKeyUp,he=e.onExit,me=e.align,ge=e.btn_busca_tx,fe=e.btn_busca_auto,Oe=e.sugest,ve="BEdit"+ne(999)+ne(99)+ne(999)+String(String(o).length)+ne(999)+ne(9),ye=Object(i.useState)(null),ke=Object(m.a)(ye,2),Se=ke[0],Ce=ke[1];function Ne(){if(ce){return Se&&clearTimeout(Se),f&&Ce(setTimeout((function(){ce(f)}),500)),function(){return clearTimeout(Se)}}}Object(i.useEffect)((function(){}),[f]);var we=Object(i.useState)(f),Ae=Object(m.a)(we,2),ze=Ae[0],_e=Ae[1];function Pe(e){var t="";return t=1==e?"bedit bedit-model-1":2==e?"bedit bedit-model-2":"bedit bedit-model-3",te&&(t+=" bedit-color-place-holder "),t+" "}return Object(i.useEffect)((function(){if(f!=ze)if(g&&g>=1)if(K&&String(f).length>g){var e=String(f);_e(String(e).substring(0,g)),K((function(){return String(e).substring(g,g+219)})),S(c)}else _e(String(f).substring(0,g));else _e(f)}),[f]),Object(i.useEffect)((function(){if(f!=ze)if(g&&g>=1)if(K&&String(ze).length>g){var e=String(ze);O(String(e).substring(0,g)),K((function(){return String(e).substring(g,g+219)})),S(c)}else O(String(ze).substring(0,g));else O(ze)}),[ze]),Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)(ie,{modelo:r||1,className:l,height:d||null,minHeight:u||null,maxWidth:b,width:j,minWidth:p,cor:x,titulo:o&&Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",overflow:"hidden",alignItems:"center"},onClick:function(){!function(e){try{var t=document.getElementById(e);t&&t.focus()}catch(n){alert("Objeto n\xe3o encontrado!")}}(t||ve)},children:[Object(I.jsx)("p",{children:o}),h?"OK"==h||"ALERTA"==h?"":Object(I.jsx)("p",{style:{color:"red"},children:String(h)}):null,g>0&&Object(I.jsx)(I.Fragment,{children:Object(I.jsx)("div",{className:"bcombo-btn-extra",style:{marginTop:"2px",marginRight:"5px",cursor:"default"},children:parseInt(k(j))>=100&&Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("p",{children:[N(f).length>=g?g:N(f).length,Object(I.jsx)("strong",{style:{marginLeft:"3px",marginRight:"3px"},children:"/"}),g]})})})}),U&&Object(I.jsx)(I.Fragment,{children:Object(I.jsx)("div",{className:"bcombo-btn-extra",style:{marginTop:"2px",marginRight:"5px"},children:Object(I.jsx)(W.a,{title:J,children:Object(I.jsx)("div",{onClick:function(){U()},children:$})})})}),String(Q).length>0&&Object(I.jsx)("div",{children:Object(I.jsx)(W.a,{title:String(Q),zIndex:999999,children:Object(I.jsx)(L.l,{size:14,color:"rgb(69, 106, 121)",style:{marginLeft:"5px"}})})})]})}),disabled:v,bordaCor:h?"OK"==h?"rgb(4, 228, 0)":"ALERTA"==h?"rgb(253, 255, 15)":"red":null,children:[1==E?Object(I.jsx)("textarea",{id:t||ve,name:n||null,className:Pe(r||1)+(D?" bmolder-input ":""),type:w||z?"number":"text",ref:s,style:{backgroundColor:x||null,textAlign:me||null,fontWeight:se?700:null,minHeight:u||null,textTransform:R||A?"uppercase":null},disabled:v,placeholder:je&&je,onFocus:function(e){return e.target.select(),be?be():null},maxlength:g&&g>0?String(g):null,onKeyDown:re&&f.length>0?null:function(e){return C(e,c)},onKeyUp:re?function(e){return"Enter"==e.key||"Next"==e.key||"Go"==e.key||"Okay"==e.key||"Ok"==e.key||"Alt"==e.key?(re(f),C(e,c)):xe?xe(e.key.toLowerCase()):null}:xe?function(e){return xe(e.key.toLowerCase())}:null,onChange:function(e){return O&&O(e.target.value)},value:f}):B?Object(I.jsx)(G.a,{id:t||ve,name:n||null,mask:B,maxlength:g&&g>0?String(g):null,className:Pe(r||1)+(D?" bmolder-input ":""),type:w||z?"number":P?"tel":"text",ref:s,style:{backgroundColor:x||null,textAlign:me||null,color:de||"black",fontSize:ue||null,fontWeight:se?700:null,textTransform:R||A?"uppercase":null},disabled:v,placeholder:je&&je,onFocus:function(e){return e.target.select(),be?be():null},onBlur:he?function(){he()}:null,onKeyDown:re?null:function(e){return C(e,c)},onKeyUp:function(e){Ne(),re&&("Enter"==e.key||"Next"==e.key||"Go"==e.key||"Okay"==e.key||"Ok"==e.key||"Alt"==e.key)?(re(f),C(e,c)):xe&&xe(e.key.toLowerCase())},onChange:function(e){return O&&O(e.target.value)},value:f}):Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("input",{id:t||ve,inputmode:M&&"none",name:n||null,className:Pe(r||1)+(D?" bmolder-input ":""),type:w||z?"text":re?"search":_?"password":"text",ref:s,autoComplete:_?T:"off",style:{backgroundColor:x||null,textAlign:me||null,color:de||"black",fontSize:ue||null,fontWeight:se?700:null,textTransform:R||A?"uppercase":null},disabled:v,up:!0,placeholder:je&&je,onFocus:function(e){return e.target.select(),be?be():null},onBlur:he?function(){he()}:null,onKeyDown:function(e){"ArrowDown"==e.key&&a?(e.preventDefault(),S(a)):re&&oe||(C(e,c),!A||" "!=e.key&&" "!=e.key&&'"'!=e.key&&"'"!=e.key&&"\xa8"!=e.key&&"&"!=e.key&&"%"!=e.key&&"$"!=e.key&&"!"!=e.key&&"*"!=e.key&&"_"!=e.key&&"-"!=e.key&&"="!=e.key&&"+"!=e.key&&"-"!=e.key&&"/"!=e.key&&"\\"!=e.key&&","!=e.key&&"."!=e.key&&":"!=e.key&&";"!=e.key&&"?"!=e.key&&"\xaa"!=e.key&&"\xba"!=e.key&&"<"!=e.key&&">"!=e.key&&"("!=e.key&&")"!=e.key&&"["!=e.key&&"]"!=e.key&&"{"!=e.key&&"}"!=e.key&&"|"!=e.key&&"."!=e.key||e.preventDefault(),w&&e.key<0&&e.key>9&&e.preventDefault())},onKeyUp:function(){Ne()},onKeyPress:re&&oe?function(e){return"Enter"==e.key||"Next"==e.key||"Go"==e.key||"Okay"==e.key||"Ok"==e.key||"Alt"==e.key?(re(f),C(e,c)):xe?xe(e.key.toLowerCase()):null}:pe&&oe?function(e){return("Enter"==e.key||"Next"==e.key||"Go"==e.key||"Okay"==e.key||"Ok"==e.key||"Alt"==e.key)&&pe(e)}:xe?function(e){return xe(e.key.toLowerCase())}:null,value:g&&g>=1?String(ze).substring(0,g):ze,onChange:function(e){return O&&(w?O(k(String(e.target.value))):R?O(y(e.target.value.toUpperCase())):A?O(y(function(){var e=N(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toUpperCase();
1return(e=(e=(e=(e=e.BReplace(" ","").BReplace(" ","").BReplace('"',"").BReplace("'","").BReplace("\xa8","").BReplace("'","").BReplace("!","")).BReplace("@","").BReplace("#","").BReplace("$","").BReplace("%","").BReplace("&","").BReplace("*","").BReplace("(","")).BReplace(")","").BReplace("-","").BReplace("_","").BReplace("+","").BReplace("=","").BReplace("\xa7","").BReplace("\xac","")).BReplace("\\","").BReplace("|","").BReplace("<","").BReplace(">","").BReplace(",","").BReplace(".","").BReplace(":","")).BReplace(";","").BReplace("?","").BReplace("\xaa","").BReplace("\xba","").BReplace("\xb0","").BReplace("/","").BReplace(" ","")}(e.target.value))):_e(y(e.target.value)))},list:Oe?"sugestoes":""}),Oe&&Object(I.jsx)(I.Fragment,{children:Object(I.jsx)("datalist",{id:"sugestoes",children:Oe})})]}),fe&&Object(I.jsx)(I.Fragment,{children:Object(I.jsx)(W.a,{title:"Busca autom\xe1tica ativada",children:Object(I.jsx)("div",{style:{marginRight:"0px",marginTop:"0px",padding:"4px",width:"auto",height:"100%",display:"flex",alignItems:"center"},children:Object(I.jsxs)("div",{style:{marginRight:"0px",marginTop:"0px",padding:"4px",width:"auto",paddingLeft:"7px",paddingRight:"6px",height:"100%",display:"flex",alignItems:"center",justifyContent:"space-around",backgroundColor:"rgb(231, 231, 231)",borderRadius:"10px"},children:[Object(I.jsxs)("p",{style:{fontSize:"11px",color:"rgb(150, 150, 150)"},children:[ge?"-"==ge?"":ge:"auto"," "]}),Object(I.jsx)(Z.a,{size:14,style:{minWidth:"14px"},color:"rgb(150, 150, 150)",onClick:function(e){re&&(re(f),C(e,c))}})]})})})}),re&&!fe&&Object(I.jsx)("div",{style:{height:"100%",display:"flex",alignItems:"center",paddingTop:"2px"},children:Object(I.jsx)(Z.a,{size:18,style:{marginRight:"8px",cursor:"pointer",minWidth:"18px"},onClick:function(e){re&&(re(f),C(e,c))}})})]})})},ae=function(e){var t=e.children,n=e.titulo,c=e.sub,a=e.submenu,o=e.voltar,r=e.sem_margem,s=void 0===r||r,l=(e.onMenuClick,e.visible),d=void 0===l||l,u=e.txBusca,j=void 0===u?function(){}:u,b=e.verFiltros,p=void 0===b||b,g=Object(i.useContext)(B),f=g.siteNome,O=(g.loading,g.setUser,g.user,g.menuAberto,g.setMenuAberto,g.siteDescri),v=g.siteEmail,y=g.siteFone,S=g.siteRodapeLinks,C=g.siteRodapeObs,N=g.fetchPedidos,w=g.siteCor,A=g.siteCorTexto;Object(h.h)();Object(i.useEffect)((function(){}),[]);return Object(I.jsx)(I.Fragment,{children:d?Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("div",{className:"app-box",children:[Object(I.jsx)(me,{voltar:o,titulo:n,name:c,sub:a,txBusca:function(e){j(e)},verFiltros:p}),Object(I.jsxs)("div",{className:"app-content ".concat(s?"app-padding-sem":"app-padding-com"," ").concat(p?"":"app-content-clean"),children:[Object(I.jsx)("div",{className:"app-main-content",children:t}),Object(I.jsx)("footer",{className:"app-footer",style:{backgroundColor:w,color:A},children:Object(I.jsxs)("div",{className:"footer-container",children:[Object(I.jsxs)("div",{className:"footer-grid",children:[Object(I.jsxs)("div",{className:"footer-col",children:[Object(I.jsx)("h3",{className:"footer-brand",children:Object(I.jsx)(x.b,{to:"/",style:{color:A,textDecoration:"none"},children:f||"BeiTec Systems"})}),Object(I.jsx)("p",{className:"footer-description",style:{color:A,opacity:.8},children:O||"Simplificando o seu neg\xf3cio com tecnologia de ponta e solu\xe7\xf5es inteligentes."})]}),Object(I.jsxs)("div",{className:"footer-col",style:{gridColumn:"span 2"},children:[Object(I.jsx)("h4",{style:{color:A},children:"Links \xdateis"}),Object(I.jsx)("ul",{children:S?S.split(";").filter((function(e){return e.includes("|")})).map((function(e,t){var n=e.split("|"),i=Object(m.a)(n,2),c=i[0],a=i[1];return"ACAO_PEDIDOS"===a?Object(I.jsx)("li",{children:Object(I.jsx)("span",{style:{cursor:"pointer",color:A},onClick:function(){return N()},children:c})},t):a.startsWith("http")||a.includes(".")?Object(I.jsx)("li",{children:Object(I.jsx)("a",{href:a.startsWith("http")?a:"https://".concat(a),target:"_blank",rel:"noopener noreferrer",style:{color:A},children:c})},t):Object(I.jsx)("li",{children:Object(I.jsx)("li",{children:Object(I.jsx)(x.b,{to:a.startsWith("/")?a:"/".concat(a),style:{color:A},children:c})},t)},t)})):null})]}),Object(I.jsxs)("div",{className:"footer-col",children:[Object(I.jsx)("h4",{style:{color:A},children:"Contato"}),v&&Object(I.jsxs)("p",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Object(I.jsx)($.f,{size:16,color:A}),Object(I.jsx)("a",{href:"mailto:".concat(v),style:{color:A},children:v})]}),y&&Object(I.jsxs)("p",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Object(I.jsx)(L.q,{size:16,color:"#25D366"}),Object(I.jsx)("a",{href:"https://wa.me/".concat(k(y).startsWith("55")?k(y):"55".concat(k(y))),target:"_blank",rel:"noopener noreferrer",style:{color:A},children:y})]})]})]}),Object(I.jsxs)("div",{className:"footer-stamps",children:[Object(I.jsxs)("div",{className:"stamp-badge",children:[Object(I.jsx)($.q,{size:20}),Object(I.jsx)("span",{children:"SSL Secure"})]}),Object(I.jsxs)("div",{className:"stamp-badge",children:[Object(I.jsx)($.e,{size:20}),Object(I.jsx)("span",{children:"Cookies Free"})]}),Object(I.jsxs)("div",{className:"stamp-beitec",onClick:function(){window.open("https://beitec.com.br","_blank")},children:[Object(I.jsx)("span",{children:"Tecnologia"}
1),Object(I.jsxs)("strong",{children:["BEITEC",Object(I.jsx)("span",{className:"reg-symbol",children:"\xae"})]})]})]}),Object(I.jsxs)("div",{className:"footer-payments",children:[Object(I.jsxs)("span",{className:"payment-label",style:{color:A,opacity:.8},children:["Pagamento via ",Object(I.jsx)("strong",{children:"PagSeguro"})]}),Object(I.jsxs)("div",{className:"payment-icons",children:[Object(I.jsx)("img",{src:"https://stc.pagseguro.uol.com.br/public/img/payment-methods-flags/68x30/visa.png",alt:"Visa",referrerPolicy:"no-referrer"}),Object(I.jsx)("img",{src:"https://stc.pagseguro.uol.com.br/public/img/payment-methods-flags/68x30/mastercard.png",alt:"Mastercard",referrerPolicy:"no-referrer"}),Object(I.jsx)("img",{src:"https://stc.pagseguro.uol.com.br/public/img/payment-methods-flags/68x30/elo.png",alt:"Elo",referrerPolicy:"no-referrer"}),Object(I.jsx)("img",{src:"https://stc.pagseguro.uol.com.br/public/img/payment-methods-flags/68x30/hipercard.png",alt:"Hipercard",referrerPolicy:"no-referrer"}),Object(I.jsx)("img",{src:"https://stc.pagseguro.uol.com.br/public/img/payment-methods-flags/68x30/amex.png",alt:"American Express",referrerPolicy:"no-referrer"}),Object(I.jsx)("img",{src:"https://stc.pagseguro.uol.com.br/public/img/payment-methods-flags/68x30/diners.png",alt:"Diners",referrerPolicy:"no-referrer"}),Object(I.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[Object(I.jsxs)("div",{style:{backgroundColor:"#fff",height:"22px",minWidth:"40px",padding:"0 6px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0px 1px 2px rgba(0,0,0,0.1)"},title:"Pix",children:[Object(I.jsx)(Y.a,{size:14,color:"#32bcad"}),Object(I.jsx)("span",{style:{fontSize:"11px",fontWeight:"800",color:"#32bcad",marginLeft:"3px",letterSpacing:"-0.2px"},children:"pix"})]}),Object(I.jsxs)("div",{style:{backgroundColor:"#fff",height:"22px",padding:"0 6px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0px 1px 2px rgba(0,0,0,0.1)"},title:"Boleto",children:[Object(I.jsx)(L.a,{size:16,color:"#1e293b"}),Object(I.jsx)("span",{style:{fontSize:"10px",fontWeight:"800",color:"#1e293b",marginLeft:"4px",letterSpacing:"-0.5px"},children:"BOLETO"})]})]})]})]}),Object(I.jsx)("div",{className:"footer-bottom",style:{borderTop:"1px solid ".concat(A,"22")},children:Object(I.jsx)("p",{style:{color:A,opacity:.6},children:C})})]})})]})]})}):t})},oe=function(e){var t=e.children,n=e.display,i=void 0!==n&&n,c=e.carregando,a=void 0===c||c,o=e.texto,r=void 0===o?"Carregando...":o,s=e.sub,l=void 0===s?"":s;e.txBtn,e.corBtn,e.onClick;return Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("div",{className:i?"bspin-content":"",children:[t,Object(I.jsx)("div",{className:"bspin-box",style:{display:i?"block":"none"},children:Object(I.jsx)("div",{className:"bspin-center",children:a&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)(U.a,{style:{fontSize:38},spin:!0}),Object(I.jsx)("p",{className:"bspin-texto",children:r}),Object(I.jsx)("p",{children:l})]})})})]})})},re=function(e){var t=e.className,n=e.style,i=e.id,c=e.children,a=e.display,o=void 0!==a&&a,r=e.carregando,s=void 0===r||r,l=e.focavel,d=void 0!==l&&l,u=e.texto,j=void 0===u?"Carregando...":u,b=e.sub,p=e.opacidade,x=e.onBlur,h=e.onKeyUp,m=e.txBtn,g=e.corBtn,f=void 0===g?"black":g,O=e.onClickFundo,v=e.onClick;return Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("div",{className:(t?t+" ":"")+"bspin-div-div",tabIndex:d?"0":null,onBlur:x&&x,onKeyUp:h&&h,style:n,id:i,autoComplete:"off",onClick:O,children:[Object(I.jsx)("div",{className:"bspin-div-box",style:{display:o?"block":"none",opacity:p||null},children:Object(I.jsxs)("div",{className:"bspin-div-center",children:[Object(I.jsxs)("div",{className:"bspin-div-tx",children:[s&&Object(I.jsx)(I.Fragment,{children:Object(I.jsx)("div",{style:{height:"40px",width:"40px"},children:Object(I.jsx)(U.a,{style:{fontSize:24,color:"black",marginRight:"8px"},spin:!0})})}),j.length>0&&Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("div",{className:"bspin-div-info",children:[Object(I.jsx)("p",{className:"bspin-div-texto",style:{fontSize:14},children:j}),b&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("div",{children:b})," "]})]})})]}),Object(I.jsx)("div",{children:m&&v&&Object(I.jsx)(le,{cor:f,texto:m,onClick:function(){v()}})})]})}),c]})})};function se(e){if(e.length<=6){if("black"==e)return"rgb(15, 15, 15)";if("black"==e)return"rgb(15, 15, 15)";if("blue"==e)return"rgb(17, 23, 220)";if("green"==e)return"rgb(23, 196, 0)";if("orange"==e)return"rgb(235, 106, 0)";if("red"==e)return"rgb(236, 0, 0)";if("yellow"==e)return"rgb(224, 221, 41)";if("gray"==e)return"rgb(104, 104, 104)";if("white"==e)return"rgb(255, 255, 255)";if("pink"==e)return"rgb(249, 21, 181)";if("purple"==e)return"rgba(176, 16, 216, 1)";if("grey"==e)return"rgb(81, 81, 81)"}return e}var le=function(e){var t,n=e.icon,c=e.fundo,a=void 0===c?"rgb(250, 254, 255)":c,o=e.cor,r=void 0===o?"black":o,s=e.sel,l=void 0===s?"blue":s,d=e.padding,u=e.n
1ame,j=e.fontSize,b=void 0===j?"1.06rem":j,p=e.borda,h=void 0===p||p,g=e.bordaCor,f=void 0===g?"rgb(183, 183, 183)":g,O=e.bordaSize,v=void 0===O?1:O,y=e.texto,k=e.novaAba,S=void 0!==k&&k,C=e.emAlerta,w=void 0!==C&&C,A=e.keyAction,z=void 0===A?"":A,_=e.keyActionDouble,P=void 0===_||_,E=e.action,R=e.height,F=void 0===R?"32px":R,D=e.width,T=void 0===D?"auto":D,M=e.minWidth,H=e.maxWidth,V=e.disabled,Q=e.carregando,U=void 0!==Q&&Q,X=e.check,G=void 0!==X&&X,J=e.marginLeft,K=e.semFoco,Z=void 0!==K&&K,Y=e.onClick,$=void 0===Y?function(){}:Y,te=e.txTipo,ne=e.iconPos,ie=void 0===ne?"start":ne,ce=e.to,ae=e.help,oe=void 0===ae?"":ae,le=Object(i.useContext)(B).fatVencida,de=v;G&&(de+=1);var ue=String(V||U?"grey":G?l:se(f)),je=ue.replace("rgb","rgba").replace(")",", 0.4)"),be=String(v)+"px solid "+je,pe=String(de)+"px solid "+ue,xe=Object(i.useState)(!1),he=Object(m.a)(xe,2),me=he[0],ge=he[1],fe=Object(i.useState)(0),Oe=Object(m.a)(fe,2),ve=Oe[0],ye=Oe[1];Object(i.useEffect)((function(){ye(0)}),[]);var ke=function(e){var t=e.keyAction,n=void 0===t?"":t,c=e.double,a=void 0===c||c,o=(e.isKeyPressed,e.setIsKeyPressed),r=e.action,s=void 0===r?function(){}:r;return Object(i.useEffect)((function(){var e,t=n&&n.length>0?n.includes(",")?String(n).split(","):[n]:[],i=function(n){t.includes(n.key)&&(a?(ye(ve+1),e||(ve>=1?(clearTimeout(e),o(!1),ye(0),s()):0==ve&&(o(!0),e=setTimeout((function(){clearTimeout(e),o(!1),ye(0)}),400)))):(clearTimeout(e),o(!1),ye(0),s()))};return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),Object(I.jsx)(I.Fragment,{})},Se=Math.random();return Object(I.jsxs)(I.Fragment,{children:[z&&N(z).length>=1?Object(I.jsx)(ke,{keyAction:z,double:P,isKeyPressed:me,setIsKeyPressed:ge,action:function(){E()}}):null,le||V||U?Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)(re,{item_pai:"div-"+Se,style:(t={marginLeft:"3px",height:F,width:T,paddingLeft:d||null},Object(q.a)(t,"marginLeft",J||null),Object(q.a)(t,"paddingRight",d||null),t),texto:"",display:!!U,carregando:U,opacidade:"0.3",children:[y&&"hint"==te?Object(I.jsxs)("button",{id:Se,className:"b-button",onClick:$,tabIndex:Z?"-1":null,style:{fontSize:b,height:F,lineHeight:"14px",width:T,paddingLeft:d||null,paddingRight:d||null,color:"grey",border:h?be:"none",backgroundColor:a},disabled:!0,children:[" ",n&&Object(I.jsx)("div",{className:"b-button-icon",children:n})]}):y&&"hide"==te?Object(I.jsxs)("button",{id:Se,className:"b-button b-button-tx-auto-hide",onClick:$,tabIndex:Z?"-1":null,style:{fontSize:b,lineHeight:"14px",height:F,width:T,paddingLeft:d||null,paddingRight:d||null,color:"grey",border:h?be:"none",backgroundColor:a},disabled:!0,children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),Object(I.jsx)("div",{className:"txtx",children:y})]}):y&&"hide/check"==te?Object(I.jsxs)("button",{id:Se,className:"b-button ".concat(!G&&"b-button-tx-auto-hide"," "),onClick:$,tabIndex:Z?"-1":null,style:{fontSize:b,height:F,lineHeight:"14px",width:T,paddingLeft:d||null,paddingRight:d||null,color:"grey",border:h?be:"none",backgroundColor:a},disabled:!0,children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),G?Object(I.jsx)("div",{className:"b-button-texto",children:y}):Object(I.jsx)("div",{className:"txtx",children:Object(I.jsx)("div",{className:"b-button-texto",children:y})})]}):Object(I.jsxs)("button",{id:Se,className:"b-button",onClick:$,tabIndex:Z?"-1":null,style:{fontSize:b,lineHeight:"14px",height:F,width:T,paddingLeft:d||null,paddingRight:d||null,color:"grey",border:h?be:"none",backgroundColor:a},disabled:!0,children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),y?"check"==te?G?Object(I.jsx)("div",{className:"b-button-texto",children:y}):null:Object(I.jsx)("div",{className:"b-button-texto",children:y}):null]}),le&&Object(I.jsx)("div",{style:{height:"100%",width:"100%",backgroundColor:"rgba(201, 75, 75, 0.18)",borderRadius:"20px",position:"absolute",top:0,display:"flex",alignItems:"center",justifyContent:"center"},children:Object(I.jsx)(W.a,{title:"Recurso bloqueado",children:Object(I.jsx)(ee.a,{color:"red",size:20})})})]})}):Object(I.jsx)(I.Fragment,{children:y&&"hint"==te?Object(I.jsx)(I.Fragment,{children:ce?Object(I.jsx)(W.a,{title:y,children:Object(I.jsx)(x.b,{id:Se,className:"b-button b-normal noprint",onClick:$,target:S?"_blank":null,to:ce,name:u||null,tabIndex:Z?"-1":null,style:{fontSize:b,height:F,width:T,paddingLeft:0,paddingRight:0,color:r,borderTop:h?be:"none",borderLeft:h?be:"none",borderRight:h?be:"none",borderBottom:h?pe:"none",backgroundColor:a},children:n&&Object(I.jsx)("div",{className:"b-button-icon",children:n})})}):Object(I.jsx)(W.a,{title:y,children:Object(I.jsx)("button",{id:Se,className:"b-button b-normal noprint",onClick:$,name:u||null,tabIndex:Z?"-1":null,style:{fontSize:b,height:F,width:T,paddingLeft:0,paddingRight:0,alignItems:"center",justifyContent:"center",color:r,lineHeight:"14px",borderTop:h?be:"none",borderLeft:h?be:"none",borderRight:h?be:"none",borderBottom:h?pe:"none",backgroundColor:a},children:n&&Object(I.jsx)("div",{className:"b-button-icon",style:{marginRight:"0px"},children:n})})})}):y&&"hide"==te?ce?Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)(x.b,{id:Se,className:"b-button b-normal b-button-tx-auto-hide noprint",onClick:$,target:S?"_blank":null,to:ce,name:u||null,tabIndex:Z?"-1":null,style:{fontSize:b,height:F,marginLeft:J||null,width:T,maxWidth:H||null,paddingLeft:d||null,paddingRight:d||null,color:r,borderTop:h?be:"none",borderLeft:h?be:"none",borderRight:h?be:"none",borderBottom:h?pe:"none",backgroundColor:a},children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),Object(I.jsx)("div",{className:"txtx",children:y})]})}):Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("button",{id:Se,className:"b-button b-normal b-button-tx-auto-hide noprint",onClick:$,name:u||null,tabIndex:Z?"-1":null,style:{fontSize:b,height:F,marginLeft:J||null,width:T,maxWidth:H||null,paddingLeft:d||null,paddingRight:d||null,color:r,borderTop:h?be:"none",borderLeft:h?be:"none",lineHeight:"14px",borderRight:h?be:"none",borderBottom:h?pe:"none",backgroundColor:a},children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),Object(I.jsx)("div",{className:"txtx",children:y})]})}):y&&"hide/check"==te?ce?Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)(x.b,{id:Se,className:"b-button b-normal ".concat(!G&&" b
1-button-tx-auto-hide"," noprint "),tabIndex:Z?"-1":null,onClick:$,target:"_blank",to:ce,name:u||null,style:{fontSize:b,height:F,marginLeft:J||null,width:T,maxWidth:H||null,paddingLeft:d||null,paddingRight:d||null,color:r,borderTop:h?be:"none",borderLeft:h?be:"none",borderRight:h?be:"none",borderBottom:h?pe:"none",backgroundColor:a},children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),G?y:Object(I.jsx)("div",{className:"txtx",children:y})]})}):Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("button",{id:Se,className:"b-button b-normal ".concat(!G&&" b-button-tx-auto-hide noprint"," "),tabIndex:Z?"-1":null,onClick:$,name:u||null,style:{fontSize:b,height:F,marginLeft:J||null,width:T,maxWidth:H||null,paddingLeft:d||null,paddingRight:d||null,color:r,lineHeight:"14px",borderTop:h?be:"none",borderLeft:h?be:"none",borderRight:h?be:"none",borderBottom:h?pe:"none",backgroundColor:a},children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),G?y:Object(I.jsx)("div",{className:"txtx",children:y})]})}):ce?Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)(x.b,{id:Se,className:"b-button b-normal noprint",onClick:$,target:S?"_blank":null,tabIndex:Z?"-1":null,to:ce,name:u||null,style:{fontSize:b,height:F,marginLeft:J||null,width:T,maxWidth:H||null,lineHeight:"14px",paddingLeft:d||null,paddingRight:d||null,color:r,border:h?be:"none",backgroundColor:a},children:[n&&Object(I.jsx)("div",{className:"b-button-icon",children:n}),y?"check"==te?G?Object(I.jsx)("div",{className:"b-button-texto",children:y}):null:Object(I.jsx)("div",{className:"b-button-texto",children:y}):null]})}):Object(I.jsx)(I.Fragment,{children:Object(I.jsxs)("button",{id:Se,className:"b-button b-normal noprint "+(me?" b-anima ":"")+" "+(w?" b-button-borda ":""),tabIndex:Z?"-1":null,onClick:$,name:u||null,style:{fontSize:b,height:F,width:T,minWidth:M||null,maxWidth:H||null,lineHeight:"14px",marginLeft:J||null,paddingLeft:d||null,paddingRight:d||null,borderTop:h?be:"none",borderLeft:h?be:"none",borderRight:h?be:"none",borderBottom:h?pe:"none",backgroundColor:a,color:r},children:[n&&"start"==ie&&Object(I.jsx)("div",{className:"b-button-icon",style:{},children:n}),y?"check"==te?G?Object(I.jsx)("div",{className:"b-button-texto",children:y}):null:Object(I.jsx)("div",{className:"b-button-texto",style:{},children:y}):null,n&&"end"==ie&&Object(I.jsx)("div",{className:"b-button-icon-end",style:{},children:n}),String(oe).length>0&&Object(I.jsx)("div",{children:Object(I.jsx)(W.a,{title:String(oe),zIndex:999999,children:Object(I.jsx)(L.l,{size:14,color:"rgb(69, 106, 121)",style:{marginLeft:"5px"}})})})]})})})]})};var de=n(170),ue=n(62),je=n(204);n(242);function be(e){e.children;var t=e.prot,n=void 0===t?"":t,c=e.height,a=e.width,o=e.r2,r=void 0===o||o,s=Object(i.useState)(!0),l=Object(m.a)(s,2),d=(l[0],l[1],Object(i.useState)("")),u=Object(m.a)(d,2),j=u[0],b=u[1];return Object(i.useEffect)((function(){n.length>10&&r&&String(n).length>30&&b(String(n))}),[n]),Object(I.jsx)("div",{className:"bimg-content",style:{height:c||null,width:a||null},children:Object(I.jsx)("div",{className:"bimg-fundo",children:String(j).length>30?Object(I.jsx)(I.Fragment,{children:Object(I.jsx)("img",{src:j,alt:""})}):Object(I.jsx)(I.Fragment,{children:Object(I.jsx)("img",{id:"45das52154-preview",alt:""})})})})}var pe=function(e,t){try{var n,i,c;if(e.startsWith("#")){var a=e.replace("#","");n=parseInt(a.substring(0,2),16),i=parseInt(a.substring(2,4),16),c=parseInt(a.substring(4,6),16)}else{if(!e.startsWith("rgb"))return e;var o=e.match(/\d+/g);n=parseInt(o[0]),i=parseInt(o[1]),c=parseInt(o[2])}return n=Math.floor(n+t/100*(255-n)),i=Math.floor(i+t/100*(255-i)),c=Math.floor(c+t/100*(255-c)),"rgb(".concat(n,", ").concat(i,", ").concat(c,")")}catch(r){return e}},xe=function(e){try{if(!e)return"#000";var t=String(e).trim();if(t.startsWith("#"))return 9===t.length?t.substring(0,7):5===t.length?t.substring(0,4):t;if(t.startsWith("rgb")){var n=t.match(/\d+/g);if(n&&n.length>=3)return"rgb(".concat(n[0],", ").concat(n[1],", ").concat(n[2],")")}return t}catch(i){return e}},he=function(e){var t=E(e.password);return-1===t.score?null:Object(I.jsxs)("div",{style:{marginTop:"-4px",marginBottom:"10px"},children:[Object(I.jsxs)("div",{style:{display:"flex",gap:"4px",height:"4px",marginBottom:"4px"},children:[Object(I.jsx)("div",{style:{flex:1,backgroundColor:t.score>=0?t.color:"#efefef",borderRadius:"2px",transition:"all 0.3s"}}),Object(I.jsx)("div",{style:{flex:1,backgroundColor:t.score>=1?t.color:"#efefef",borderRadius:"2px",transition:"all 0.3s"}}),Object(I.jsx)("div",{style:{flex:1,backgroundColor:t.score>=2?t.color:"#efefef",borderRadius:"2px",transition:"all 0.3s"}})]}),Object(I.jsxs)("div",{style:{fontSize:"11px",color:t.color,fontWeight:"bold",textAlign:"right",textTransform:"uppercase",letterSpacing:"0.5px"},children:["Senha ",t.label]})]})};function me(e){e.voltar,e.children;var t,n=e.titulo,a=void 0===n?"":n,o=(e.name,e.txBusca,e.verFiltros),r=void 0===o||o,s=Object(h.h)(),d=Object(i.useContext)(B),u=d.siteNome,j=d.siteCor,b=d.siteCorTexto,p=d.siteLogo,x=d.siteIcon,g=d.cart,f=d.setCart,O=d.fetchCart,v=d.isCartAnimating,y=d.userNome,k=d.setUserNome,S=(d.userCep,d.setUserCep),C=d.isMensal,A=d.setIsMensal,_=d.showUserBox,R=d.setShowUserBox,F=d.pedidos,q=(d.setPedidos,d.fetchPedidos),M=(d.fetchPerfil,d.siteMenuTopo),H=d.inventario,V=d.fetchInventario,Q=d.siteAgendamento,U=Object(i.useState)(!1),X=Object(m.a)(U,2),G=X[0],J=X[1],K=Object(i.useState)(window.innerWidth),Z=Object(m.a)(K,2),Y=Z[0],ee=Z[1],te=Object(i.useState)(""),ne=Object(m.a)(te,2),ie=ne[0],ae=ne[1],oe=Object(i.useState)(!1),re=Object(m.a)(oe,2),se=re[0],me=re[1],ge=Object(i.useState)(!1),fe=Object(m.a)(ge,2),Oe=fe[0],ve=fe[1],ye=Object(i.useState)(!0),ke=Object(m.a)(ye,2),Se=ke[0],Ce=ke[1],Ne=Object(i.useState)(0),we=Object(m.a)(Ne,2),Ae=we[0],ze=we[1];Object(i.useEffect)((function(){var e=function(e){var t=e.target,n=t.scrollTop,i=t.scrollHeight-t.clientHeight;if(n<10)return Se||Ce(!0),void ze(n);if(n>i-50)ze(n);else{var c=n-Ae;Math.abs(c)<15||(c>0&&n>150?Se&&Ce(!1):c<0&&(Se||Ce(!0)),ze(n))}},t=document.querySelector(".app-content");
1if(t)return ze(t.scrollTop),t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}),[Ae,Se]);var _e=Object(i.useState)(""),Pe=Object(m.a)(_e,2),Ee=Pe[0],Ie=Pe[1],Be=Object(i.useState)(""),Re=Object(m.a)(Be,2),Fe=Re[0],Le=Re[1],De=Object(i.useState)(!1),We=Object(m.a)(De,2),Te=We[0],qe=We[1],Me=Object(i.useState)(!1),He=Object(m.a)(Me,2),Ve=He[0],Qe=He[1],Ue=Object(i.useState)(""),Xe=Object(m.a)(Ue,2),Ge=Xe[0],Je=Xe[1],Ke=Object(i.useState)(""),Ze=Object(m.a)(Ke,2),Ye=Ze[0],$e=Ze[1],et=Object(i.useState)(""),tt=Object(m.a)(et,2),nt=tt[0],it=tt[1],ct=Object(i.useState)(""),at=Object(m.a)(ct,2),ot=at[0],rt=at[1],st=Object(i.useState)(""),lt=Object(m.a)(st,2),dt=(lt[0],lt[1],Object(i.useState)("")),ut=Object(m.a)(dt,2),jt=ut[0],bt=ut[1],pt=Object(i.useState)(""),xt=Object(m.a)(pt,2),ht=xt[0],mt=xt[1],gt=Object(i.useState)(""),ft=Object(m.a)(gt,2),Ot=ft[0],vt=ft[1],yt=Object(i.useState)(""),kt=Object(m.a)(yt,2),St=kt[0],Ct=kt[1],Nt=Object(i.useState)(""),wt=Object(m.a)(Nt,2),At=wt[0],zt=wt[1],_t=Object(i.useState)(""),Pt=Object(m.a)(_t,2),Et=Pt[0],It=Pt[1],Bt=Object(i.useState)(""),Rt=Object(m.a)(Bt,2),Ft=Rt[0],Lt=Rt[1],Dt=Object(i.useState)(""),Wt=Object(m.a)(Dt,2),Tt=Wt[0],qt=Wt[1],Mt=Object(i.useState)(""),Ht=Object(m.a)(Mt,2),Vt=Ht[0],Qt=Ht[1],Ut=Object(i.useState)(""),Xt=Object(m.a)(Ut,2),Gt=Xt[0],Jt=Xt[1],Kt=Object(i.useState)(""),Zt=Object(m.a)(Kt,2),Yt=Zt[0],$t=Zt[1],en=Object(i.useState)("view"),tn=Object(m.a)(en,2),nn=tn[0],cn=tn[1],an=Object(i.useState)(""),on=Object(m.a)(an,2),rn=on[0],sn=on[1],ln=Object(i.useState)(""),dn=Object(m.a)(ln,2),un=dn[0],jn=dn[1],bn=Object(i.useState)(""),pn=Object(m.a)(bn,2),xn=pn[0],hn=pn[1];Object(i.useEffect)((function(){var e=N(St).replace(/\D/g,"");8===e.length&&z("buscarCEP",{cep:e},(function(e){e.ende&&(qt(e.ende.rua||Tt),Lt(e.ende.bairro||Ft),It(e.ende.cidade||Et),zt(e.ende.uf||At))}),!1)}),[St]);var mn=Object(i.useState)([]),gn=Object(m.a)(mn,2),fn=gn[0],On=gn[1];Object(i.useEffect)((function(){!function(){var e=(new Date).toISOString().split("T")[0],t=localStorage.getItem("site_departamentos"),n=localStorage.getItem("site_departamentos_date");if(t&&n===e)try{var i=JSON.parse(t);if(i)return void On(i)}catch(c){}z("getDepartamentos",{},(function(t){t.departamentos&&(On(t.departamentos),localStorage.setItem("site_departamentos",JSON.stringify(t.departamentos)),localStorage.setItem("site_departamentos_date",e))}),!1)}()}),[]);return Object(i.useEffect)((function(){if(x&&x.length>5){var e=document.querySelector("link[rel~='icon']")||document.createElement("link");e.type="image/x-icon",e.rel="icon",e.href="https://pub-af17930b82914f6db336d25907b884b7.r2.dev/".concat(x),document.getElementsByTagName("head")[0].appendChild(e)}}),[x]),Object(i.useEffect)((function(){document.documentElement.style.setProperty("--site-cor",xe(j)),document.documentElement.style.setProperty("--site-cor-texto",xe(b))}),[j,b]),Object(i.useEffect)((function(){function e(){ee(window.innerWidth)}return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),Object(i.useEffect)((function(){J(Y<901)}),[Y]),Object(i.useEffect)((function(){var e=N(localStorage.getItem("tk"));e.length>10&&z("getState",{tk:e},(function(e){k(e.user.nome),S(N(e.user.cep)),A(w(e.user.is_mensal))}),!0)}),[]),Object(I.jsxs)(I.Fragment,{children:[Object(I.jsxs)("div",{className:"header-fixed-container",style:{position:"fixed",top:0,left:0,right:0,zIndex:9999,backgroundColor:xe(j),transition:"transform 0.4s cubic-bezier(0.4, 0, 0.2, 1)",transform:Se?"translateY(0)":"translateY(-100%)",pointerEvents:Se?"all":"none",boxShadow:Se?"0 4px 12px rgba(0,0,0,0.15)":"none"},children:[Object(I.jsxs)("div",{className:"title-title",style:{backgroundColor:xe(j),color:b},children:[Object(I.jsxs)("div",{className:"title-dados",children:[Object(I.jsxs)("div",{className:"cx-lateral",onClick:function(){return s("/")},style:{display:"flex",alignItems:"center",cursor:"pointer",gap:"10px"},children:[Object(I.jsx)("img",{src:p.length>5?"https://pub-af17930b82914f6db336d25907b884b7.r2.dev/".concat(p):"data:image/png;
1base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAAArCAYAAAC5DiCcAAAYlElEQVR4nO2ceXRX5ZnHP/n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HLD8///dmNt/MnjOz23ft2nUAsDvuuGNtbW3tsuTk5KNz586tj8ViTyxevHgn7qTUjBkzrK2tzV5++WV/ONaQ+7GampqdHR0dh+bMmeNPVXUUFxeX1NXVNZhZ+cUXX7zRt49EIodKS0tXdHZ22qxZs3x7W7BggZlZ7J577mkFbNSoUTZhwgSbPHlyw969e3csXLjQsrKyeoqKihoLCgrs4YcfNjPrtZaWm53LuMfgVYOvGvynQa/BaoOHQy5j79vNiHfMFYvFPrJ//36rrq7e5Z5daGbXdXV15ZSXl3+rqqqqzczsyJEjf12zZs3HzWyqmd2+c+fOxs2bN/s00urr6xvLy8ubt23bZnv27PGPD5tZqZk9vXHjxhWbNm3qNv3fqe+Y2dfN7Jw777yzYvLkyWZmR8zsB+ZS07KyMtuxI8hoa2pqNpSXl/9q586dvVu3bq3aunXr66aUNrZv377ukpKSlzo6Or5vZt1m1mKNjeMtJyfJoN3goMFwgwUGxww2G+w3iPkY4m1nxDvoOsPMfuTo/qgp719jqkEsdkT3cJuZfcLMbjGz1aZ/5nUisM3MngjdHzOzhWY2dtOmTbVbtmypNgnPYNBpqmWUWfBPyWotqFk0m9lD7neHNTXlOIEwd33WCYMZrImrSfS8l3YGkIcqfPNRzl+JahCHUW1gBMr3I6iG4KuHLWjzLfzJX7Nr611HquuXhfL/Ea59GkoDe9EnAPUo0JuJagjxHwODqpz1qH4QRedOa1ClcYQbs8XdG83NWxgz5ijNzZ9GRxUK0O52FYorjqB6Sw5Q9797RRKBOiRVCgAAAABJRU5ErkJggg==",alt:"",style:{height:"45px"}}),p.length>10?"":Object(I.jsx)("span",{style:{fontSize:"24px",fontWeight:"800",color:b},children:u||"BeiTec"})]}),!G&&a&&Object(I.jsx)("div",{style:{marginLeft:"20px",paddingLeft:"20px",borderLeft:"1px solid ".concat(xe(b),"44"),fontSize:"18px",fontWeight:"500",opacity:.8},children:a})]}),r&&Object(I.jsx)("div",{className:"title-search",children:Object(I.jsx)(ce,{modelo:2,cor:pe(j,30),setValue:ae,value:ie,hint:"Busque aqui",width:"100%",fontCor:b,fontSize:16,buscar:function(e){s("/busca/"+e)}})}),Object(I.jsxs)("div",{className:"title-actions",style:{display:"flex",alignItems:"center",gap:"15p
1x"},children:[r&&Object(I.jsxs)("div",{className:"title-cart ".concat(v?"animating":""),onClick:function(){O(),me(!0)},children:[Object(I.jsx)(L.o,{size:22,color:b}),Object(I.jsx)("span",{style:{fontSize:"15px",fontWeight:"700",color:b},children:P(g.total)})]}),Object(I.jsxs)("div",{className:"title-title-user",onClick:function(){return R(1)},style:{color:b,display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},children:["Entrar"!==y&&Object(I.jsx)("span",{style:{fontSize:"13px",fontWeight:"bold",maxWidth:"100px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",opacity:.9},children:N(y).split(" ")[0]}),Object(I.jsx)("div",{style:{width:"35px",height:"35px",borderRadius:"50%",backgroundColor:pe(j,30),display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid rgba(255,255,255,0.3)"},children:Object(I.jsx)(de.b,{size:22,color:b})})]})]})]}),r&&Object(I.jsxs)("div",{style:{height:"50px",width:"100%",backgroundColor:pe(j,15),color:b,display:"flex",alignItems:"center",justifyContent:"start",paddingLeft:"5%",gap:"25px",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1)",borderBottom:"1px solid rgba(0,0,0,0.05)",overflowX:"auto",whiteSpace:"nowrap"},children:[Object(I.jsx)(D.a,{menu:{items:fn.map((function(e){var t;return{key:e.id,label:Object(I.jsx)("span",{onClick:function(t){t.stopPropagation(),s("/busca/".concat(e.nome,"?id_dep=").concat(e.id,"&all=1"))},style:{fontWeight:"600",display:"inline-block",width:"100%"},children:e.nome}),children:null===(t=e.grupos)||void 0===t?void 0:t.map((function(e){var t;return{key:e.id,label:Object(I.jsx)("span",{onClick:function(t){t.stopPropagation(),s("/busca/".concat(e.nome,"?id_grupo=").concat(e.id,"&all=1"))},style:{fontWeight:"500",display:"inline-block",width:"100%"},children:e.nome}),children:null===(t=e.subgrupos)||void 0===t?void 0:t.map((function(e){return{key:e.id,label:Object(I.jsx)("span",{style:{fontSize:"13px"},children:e.nome}),onClick:function(){return s("/busca/".concat(e.nome,"?id_subgrupo=").concat(e.id,"&all=1"))}}}))}}))}}))},trigger:["click"],overlayClassName:"categorias-menu-overlay",children:Object(I.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",fontSize:"15px",fontWeight:"700",padding:"8px 12px",borderRadius:"6px",color:b},children:[Object(I.jsx)(de.a,{size:20})," Categorias ",Object(I.jsx)(je.a,{style:{fontSize:"10px"}})]})}),M&&M.map((function(e){var t=Object(I.jsx)("div",{style:{cursor:e.acao_url?"pointer":"default",fontSize:"14px",fontWeight:"600",color:b},onClick:function(){e.acao_url&&(e.acao_url.startsWith("http")?window.open(e.acao_url,"_blank"):s(e.acao_url))},children:e.texto});return Object(I.jsx)(c.a.Fragment,{children:e.help&&e.help.length>0?Object(I.jsx)(W.a,{title:e.help,placement:"bottom",children:t}):t},e.id)})),1===Q&&Object(I.jsx)("div",{style:{cursor:"pointer",fontSize:"14px",fontWeight:"600",color:b},onClick:function(){return s("/agendamento")},children:"Agende Aqui"})]})]}),_>0&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("div",{className:"menu-user-fundo",style:{zIndex:1e4},onClick:function(){return R(0)}}),Object(I.jsxs)("div",{className:"menu-user-box ".concat(_>=4?"wide-box":""),style:{zIndex:10001},children:[Object(I.jsxs)("div",{className:"user-box-header",children:[Object(I.jsx)("h3",{children:"Entrar"!==y?"Ol\xe1, ".concat(y):"Sua Conta"}),Object(I.jsx)("p",{children:"Entrar"!==y?"Gerencie seu perfil e pedidos":"Acesse sua conta para continuar"})]}),Oe?Object(I.jsx)("div",{style:{padding:"40px",textAlign:"center"},children:Object(I.jsx)(T.a,{size:"large"})}):Object(I.jsxs)(I.Fragment,{children:[1===_&&Object(I.jsxs)("div",{className:"menu-user-infos",children:["Entrar"!==y&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsxs)("div",{className:"menu-item-row",onClick:function(){z("getPerfil",{},(function(e){var t=e.perfil;bt(t.nome||""),mt(t.email||""),vt(t.doc||""),$t(t.celular||""),t.ende&&(Ct(t.ende.cep||""),zt(t.ende.uf||""),It(t.ende.cidade||""),Lt(t.ende.bairro||""),qt(t.ende.rua||""),Qt(t.ende.nro||""),Jt(t.ende.complemento||"")),cn("view"),sn(""),jn(""),hn(""),R(4)}),!1,(function(e){return ve(e)}))},children:[Object(I.jsx)(ue.i,{size:20})," Meu Perfil"]}
1),Object(I.jsxs)("div",{className:"menu-item-row",onClick:function(){return V(ve)},children:[Object(I.jsx)(ue.e,{size:20})," Meu Invent\xe1rio"]}),1===Q&&Object(I.jsxs)("div",{className:"menu-item-row",onClick:function(){R(0),s("/?showAgendamentos=1")},children:[Object(I.jsx)(ue.d,{size:20})," Meus Agendamentos"]}),Object(I.jsx)(W.a,{title:"Em breve",placement:"left",children:Object(I.jsxs)("div",{className:"menu-item-row disabled",style:{opacity:.4,cursor:"not-allowed"},children:[Object(I.jsx)(ue.f,{size:20})," Meus Favoritos"]})}),Object(I.jsxs)("div",{className:"menu-item-row",onClick:function(){q(ve),R(5)},children:[Object(I.jsx)(ue.g,{size:20})," Meus Pedidos"]}),1===C&&Object(I.jsxs)("div",{className:"menu-item-row",onClick:function(){R(0),s("/?showMensalidades="+Date.now())},children:[Object(I.jsx)($.c,{size:20})," Minhas Mensalidades"]}),Object(I.jsxs)("div",{className:"menu-item-row",style:{color:"#ef4444"},onClick:function(){localStorage.setItem("tk",""),s("/"),R(0),k("Entrar")},children:[Object(I.jsx)(ue.b,{size:20})," Sair"]})]}),"Entrar"===y&&Object(I.jsx)("div",{style:{padding:"10px"},children:Object(I.jsx)(le,{texto:"Entrar",width:"100%",onClick:function(){return R(2)}})})]}),2===_&&Object(I.jsxs)("div",{className:"menu-user-infos",style:{padding:"20px"},children:[Object(I.jsx)(ce,{titulo:"E-mail",width:"100%",value:Ee,setValue:Ie}),Object(I.jsx)(ce,{titulo:"Senha",width:"100%",value:Fe,setValue:Le,tipo_pass:!0}),Object(I.jsx)("div",{style:{height:"15px"}}),Object(I.jsx)(le,{texto:"Entrar agora",width:"100%",fundo:"#0d4381",cor:"white",carregando:Te,onClick:function(){Ee&&Fe?(qe(!0),z("login",{email:Ee,senha:Fe},(function(e){qe(!1),localStorage.setItem("tk",e.tk),k(e.user.nome),S(N(e.user.cep)),A(w(e.user.is_mensal)),R(0)}),!1,null,(function(){qe(!1)}))):l.b.warn("Preencha todos os campos!")}}),Object(I.jsxs)("p",{onClick:function(){return R(3)},style:{textAlign:"center",fontSize:"12px",marginTop:"10px",cursor:"pointer"},children:["N\xe3o tem conta? ",Object(I.jsx)("b",{children:"Registre-se"})]})]}),3===_&&Object(I.jsxs)("div",{className:"menu-user-infos",style:{padding:"20px"},children:[Object(I.jsx)(ce,{titulo:"Nome",value:Ge,setValue:Je,width:"100%"}),Object(I.jsx)(ce,{titulo:"E-mail",value:Ye,setValue:$e,width:"100%"}),Object(I.jsx)(ce,{titulo:"CPF",value:nt,setValue:it,width:"100%",mask:[/\d/,/\d/,/\d/,".",/\d/,/\d/,/\d/,".",/\d/,/\d/,/\d/,"-",/\d/,/\d/]}),Object(I.jsx)(ce,{titulo:"Senha",value:ot,setValue:rt,width:"100%",tipo_pass:!0}),Object(I.jsx)(he,{password:ot}),Object(I.jsx)(le,{texto:"Criar Conta",width:"100%",fundo:"#0d4381",cor:"white",carregando:Ve,onClick:function(){0!==E(ot).score?nt.length<11?l.b.warn("CPF inv\xe1lido!"):(Qe(!0),z("registrar",{email:Ye,nome:Ge,senha:ot,cpf:nt},(function(e){Qe(!1),localStorage.setItem("tk",e.tk),k(e.user.nome),S(""),A(w(e.user.is_mensal)),R(0)}),!1,null,(function(){Qe(!1)}))):l.b.warn("Senha muito fraca! Use pelo menos 6 caracteres e evite sequ\xeancias.")}}),Object(I.jsxs)("p",{onClick:function(){return R(2)},style:{textAlign:"center",fontSize:"12px",marginTop:"10px",cursor:"pointer"},children:["J\xe1 tem conta? ",Object(I.jsx)("b",{children:"Fa\xe7a Login"})]})]}),4===_&&Object(I.jsxs)("div",{className:"menu-user-infos",style:{padding:"20px",overflowY:"auto",maxHeight:"70vh"},children:["view"===nn&&Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[Object(I.jsxs)("div",{style:{background:"#f8fafc",padding:"15px",borderRadius:"8px"},children:[Object(I.jsx)("div",{style:{fontWeight:"bold",color:j,marginBottom:"8px"},children:"Meus Dados"}),Object(I.jsxs)("div",{style:{fontSize:"13px",color:"#333"},children:[Object(I.jsx)("b",{children:"Nome:"})," ",jt]}),Object(I.jsxs)("div",{style:{fontSize:"13px",color:"#333"},children:[Object(I.jsx)("b",{children:"E-mail:"})," ",ht]}),Object(I.jsxs)("div",{style:{fontSize:"13px",color:"#333"},children:[Object(I.jsx)("b",{children:"CPF:"})," ",Ot]}),Object(I.jsxs)("div",{style:{fontSize:"13px",color:"#333"},children:[Object(I.jsx)("b",{children:"Celular:"})," ",Yt]})]}),Object(I.jsxs)("div",{style:{background:"#f8fafc",padding:"15px",borderRadius:"8px"},children:[Object(I.jsx)("div",{style:{fontWeight:"bold",color:j,marginBottom:"8px"},children:"Endere\xe7o de Entrega Principal"}),Object(I.jsxs)("div",{style:{fontSize:"13px",color:"#333"},children:[Tt,", ",Vt," ",Gt]}
1),Object(I.jsxs)("div",{style:{fontSize:"13px",color:"#333"},children:[Ft," - ",Et,"/",At]}),Object(I.jsxs)("div",{style:{fontSize:"13px",color:"#333"},children:["CEP: ",St]})]}),Object(I.jsxs)("div",{style:{marginTop:"15px",display:"flex",gap:"8px",flexDirection:"column"},children:[Object(I.jsx)(le,{texto:"Alterar Dados",width:"100%",onClick:function(){return cn("edit")},fundo:j,cor:b}),Object(I.jsx)(le,{texto:"Alterar Senha",width:"100%",onClick:function(){return cn("senha")}}),Object(I.jsx)(le,{texto:"Voltar",width:"100%",onClick:function(){return R(1)},fundo:"transparent"})]})]}),"edit"===nn&&Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[Object(I.jsx)(ce,{titulo:"Nome",value:jt,setValue:bt,width:"100%"}),Object(I.jsx)(ce,{titulo:"E-mail",value:ht,setValue:mt,width:"100%"}),Object(I.jsx)(ce,{titulo:"CPF",value:Ot,setValue:vt,width:"100%"}),Object(I.jsx)(ce,{titulo:"Celular",value:Yt,setValue:$t,width:"100%",mask:["(",/\d/,/\d/,")"," ",/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/]}),Object(I.jsx)(ce,{titulo:"CEP",value:St,setValue:Ct,width:"100%",mask:[/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/]}),Object(I.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[Object(I.jsx)(ce,{titulo:"Rua",value:Tt,setValue:qt,width:"70%"}),Object(I.jsx)(ce,{titulo:"N\xba",value:Vt,setValue:Qt,width:"30%"})]}),Object(I.jsx)(ce,{titulo:"Complemento",value:Gt,setValue:Jt,width:"100%"}),Object(I.jsx)(ce,{titulo:"Bairro",value:Ft,setValue:Lt,width:"100%"}),Object(I.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[Object(I.jsx)(ce,{titulo:"Cidade",value:Et,setValue:It,width:"70%"}),Object(I.jsx)(ce,{titulo:"UF",value:At,setValue:zt,width:"30%"})]}),Object(I.jsxs)("div",{style:{marginTop:"15px",display:"flex",gap:"8px",flexDirection:"column"},children:[Object(I.jsx)(le,{texto:"Salvar",width:"100%",onClick:function(){z("salvarPerfil",{nome:jt,email:ht,cpf:String(Ot).replace(/\D/g,""),cep:String(St).replace(/\D/g,""),uf:At,cidade:Et,bairro:Ft,rua:Tt,nro:Vt,complemento:Gt,celular:Yt},(function(e){l.b.success("Perfil salvo com sucesso!"),k(e.perfil.nome),S(N(e.ende.cep)),cn("view")}),!1)},fundo:j,cor:b}),Object(I.jsx)(le,{texto:"Cancelar",width:"100%",onClick:function(){return cn("view")},fundo:"transparent"})]})]}),"senha"===nn&&Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[Object(I.jsx)("div",{style:{fontWeight:"bold",color:j,marginBottom:"8px"},children:"Trocar Senha"}),Object(I.jsx)(ce,{titulo:"Senha Atual",value:rn,setValue:sn,width:"100%",tipo_pass:!0}),Object(I.jsx)(ce,{titulo:"Nova Senha",value:un,setValue:jn,width:"100%",tipo_pass:!0}),Object(I.jsx)(he,{password:un}),Object(I.jsx)(ce,{titulo:"Repita a Nova Senha",value:xn,setValue:hn,width:"100%",tipo_pass:!0}),Object(I.jsxs)("div",{style:{marginTop:"15px",display:"flex",gap:"8px",flexDirection:"column"},children:[Object(I.jsx)(le,{texto:"Atualizar Senha",width:"100%",onClick:function(){un===xn?un.length<4?l.b.error("A nova senha deve ter no m\xednimo 4 caracteres."):0!==E(un).score?z("alterarSenha",{senha_atual:rn,senha_nova:un},(function(e){l.b.success("Senha alterada com sucesso!"),cn("view"),sn(""),jn(""),hn("")}),!1,(function(e){return ve(e)})):l.b.warn("A senha \xe9 muito fraca! Tente uma senha mais longa, misturando letras e n\xfameros."):l.b.error("As novas senhas n\xe3o conferem!")},fundo:j,cor:b}),Object(I.jsx)(le,{texto:"Cancelar",width:"100%",onClick:function(){return cn("view")},fundo:"transparent"})]})]})]}),5===_&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("div",{className:"menu-user-list",children:F.length>0?F.map((function(e,t){return Object(I.jsxs)("div",{className:"pedido-card-item",onClick:function(){R(0),s("/pedido/"+e.prot)},children:[Object(I.jsxs)("div",{className:"pedido-info-main",children:[Object(I.jsxs)("div",{className:"pedido-nro",children:["Pedido #",e.nro||e.id]}),Object(I.jsxs)("div",{className:"pedido-secundario",children:[e.data," \xe0s ",e.hora," \u2022 ",Object(I.jsx)("span",{className:"status-text ".concat(1===e.status_mov?"concluido":3===e.status_mov?"cancelado":"aguardando"),children:1===e.status_mov?"Pago":3===e.status_mov?"Cancelado":"Pendente"})]})]}),Object(I.jsx)("div",{className:"pedido-valor-col",children:Object(I.jsx)("div",{className:"pedido-valor",children:P(e.vlr_total)})})]},t)})):Object(I.jsx)("div",{style:{padding:"20px",textAlign:"center",color:"#64748b"},children:"Nenhum pedido encontrado"})}),Object(I.jsx)("div",{className:"menu-user-footer",children:Object(I.jsx)(le,{texto:"Voltar",width:"100%",onClick:function(){return R(1)}})})]}),6===_&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("div",{className:"menu-user-list",children:H.length>0?H.map((function(e,t){var n,i,c,a,o=N(null===(n=e.produto)||void 0===n?void 0:n.aux_f).trim(),r
1=o.length>0;return Object(I.jsxs)("div",{className:"pedido-card-item",onClick:function(){if(r){var e=o;e.startsWith("http://")||e.startsWith("https://")||(e="https://pub-af17930b82914f6db336d25907b884b7.r2.dev/"+e),window.open(e,"_blank")}},style:{cursor:r?"pointer":"default",padding:"12px 15px",borderRadius:"12px",display:"flex",alignItems:"center",gap:"15px",background:"#fff",marginBottom:"10px",border:"1px solid #f1f5f9",transition:"all 0.2s ease"},children:[Object(I.jsx)("div",{style:{width:"52px",height:"52px",background:"#f8fafc",borderRadius:"10px",overflow:"hidden",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},children:Object(I.jsx)(be,{prot:N(null===(i=e.produto)||void 0===i?void 0:i.img).length>10?"https://pub-a3d9416779ae4b158f887d962e20597e.r2.dev/"+e.produto.img:""})}),Object(I.jsxs)("div",{style:{flex:1,minWidth:0},children:[Object(I.jsxs)("div",{style:{fontSize:"14px",fontWeight:"700",color:"#1e293b",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginBottom:"2px"},children:[(null===(c=e.produto)||void 0===c?void 0:c.descricao)||"Produto",3===w(null===(a=e.produto)||void 0===a?void 0:a.tipo)&&r&&Object(I.jsx)("div",{style:{marginTop:"5px"},children:Object(I.jsxs)("span",{style:{color:j,fontSize:"11px",fontWeight:"bold",display:"flex",alignItems:"center",gap:"4px"},children:[Object(I.jsx)($.k,{size:14})," ACESSAR CONTE\xdaDO"]})})]}),Object(I.jsxs)("div",{style:{fontSize:"12px",color:"#64748b",display:"flex",alignItems:"center",gap:"6px"},children:[Object(I.jsxs)("span",{children:["Qtd: ",Object(I.jsx)("b",{children:parseInt(e.qtd,10)})]}),Object(I.jsx)("span",{style:{color:"#cbd5e1"},children:"\u2022"}),Object(I.jsxs)("span",{children:["\xdaltima em: ",e.ultima_compra]})]})]})]},t)})):Object(I.jsxs)("div",{style:{padding:"60px 20px",textAlign:"center",color:"#94a3b8"},children:[Object(I.jsx)(ue.e,{size:48,style:{opacity:.2,marginBottom:"15px"}}),Object(I.jsx)("p",{style:{fontSize:"14px"},children:"Seu invent\xe1rio est\xe1 vazio."})]})}),Object(I.jsx)("div",{className:"menu-user-footer",children:Object(I.jsx)(le,{texto:"Voltar",width:"100%",onClick:function(){return R(1)},fundo:"transparent"})})]})]})]})]}),se&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("div",{className:"menu-user-fundo",style:{zIndex:1e4},onClick:function(){return me(!1)}}),Object(I.jsxs)("div",{className:"cart-modal-box",style:{zIndex:10001},children:[Object(I.jsxs)("div",{className:"cart-modal-header",children:[Object(I.jsx)("h3",{children:"Meu Carrinho"}),Object(I.jsx)(ue.j,{size:24,onClick:function(){return me(!1)},style:{cursor:"pointer"}})]}),Object(I.jsx)("div",{className:"cart-modal-content",children:(null===(t=g.itens)||void 0===t?void 0:t.length)>0?g.itens.map((function(e,t){return Object(I.jsxs)("div",{className:"cart-item-row",children:[Object(I.jsx)("div",{className:"cart-item-img",children:Object(I.jsx)(be,{prot:N(e.img).length>10?"https://pub-a3d9416779ae4b158f887d962e20597e.r2.dev/"+e.img:""})}),Object(I.jsxs)("div",{className:"cart-item-info",children:[Object(I.jsx)("div",{className:"cart-item-name",children:e.descri}),Object(I.jsxs)("div",{className:"cart-item-price-row",children:[Object(I.jsxs)("span",{className:"cart-item-qty",children:[parseInt(e.qtd,10),"x"]}),Object(I.jsx)("span",{className:"cart-item-price",children:P(e.valor)})]})]}),Object(I.jsxs)("div",{className:"cart-item-total-col",children:[Object(I.jsx)("div",{className:"cart-item-total",children:P(e.valor*e.qtd)}),Object(I.jsx)(ue.h,{size:18,className:"cart-item-remove",onClick:function(){z("carrinhoRemover",{uuid:e.uuid},(function(e){var t=0;e.itens&&e.itens.forEach((function(e){t+=e.valor*e.qtd})),f({itens:e.itens||[],total:t})}),!1)}})]})]},t)})):Object(I.jsx)("div",{className:"cart-empty-state",children:Object(I.jsx)("p",{children:"Seu carrinho est\xe1 vazio"})})}),g.total>0&&Object(I.jsxs)("div",{className:"cart-modal-footer",children:[Object(I.jsxs)("div",{className:"cart-footer-total",children:[Object(I.jsx)("span",{children:"Total do Pedido:"}),Object(I.jsx)("span",{className:"total-value",children:P(g.total)})]}),Object(I.jsx)("div",{className:"cart-footer-btns",children:Object(I.jsx)(le,{texto:"Finalizar Pedido",
1width:"100%",onClick:function(){if(N(localStorage.getItem("tk")).length<10)return R(2),void l.b.info("Acesse sua conta ou cadastre-se para finalizar seu pedido!");z("finalizarPedido",{},(function(e){l.b.success("Pedido gerado! Vamos para o checkout."),f({itens:[],total:0}),me(!1),s("/checkout/"+e.prot)}),!1)},fundo:"#0d4381",cor:"white",height:"48px"})})]})]})]})]})}var ge=n(147),fe=(n(243),n(273)),Oe=n(114),ve=(n.p,n.p,n.p,n.p,n(244),n.p+"static/media/placeholder_prod.7357f43e.png"),ye=function(e){var t=e.p,n=e.isLocal,c=void 0!==n&&n,a=Object(i.useContext)(B).siteCor,o=Object(h.h)(),r=c?"99544112101":String(t.uuid),s=c?t.titulo:t.descri,l=c?t.sub:"".concat(t.aux_a||""," - ").concat(t.aux_b||""),d=!l||""===l.trim()||"-"===l.trim()||"- -"===l.trim(),u=c?t.valor:3===w(t.tipo)&&0===parseFloat(t.valor)?"Gr\xe1tis":P(t.valor),j=c||t.img?t.img:"";return Object(I.jsxs)("div",{className:"product-card-item",onClick:function(){o("/p/"+r)},children:[Object(I.jsx)("div",{className:"product-card-capa",children:function(){var e=c?j||ve:j&&String(j).length>10?null:ve,t=!c&&j&&String(j).length>10;return Object(I.jsx)("div",{className:"product-card-image-wrapper",children:t?Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("div",{className:"product-card-bg-blur",children:Object(I.jsx)(be,{prot:String(j)})}),Object(I.jsx)("div",{className:"product-card-main-img",children:t?Object(I.jsx)(be,{prot:String(j)}):Object(I.jsx)("img",{src:e,alt:s})})]}):Object(I.jsxs)("div",{className:"product-card-main-img",style:{backgroundColor:"rgba(244, 252, 255, 1)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10px"},children:[Object(I.jsx)(Q.b,{size:28}),Object(I.jsx)("p",{children:"sem imagem"})]})})}()}),Object(I.jsxs)("div",{className:"product-card-content",children:[Object(I.jsx)("div",{className:"product-card-titulo ".concat(d?"no-sub":""),children:s}),!d&&Object(I.jsx)("div",{className:"product-card-infos",children:l}),Object(I.jsxs)("div",{className:"product-card-footer",children:[Object(I.jsx)("div",{className:"product-card-emojis"}),Object(I.jsxs)("div",{className:"product-card-price-container",children:[function(){var e=w(t.qtd),n=w(t.desconto),i=w(t.tipo_desc),c=w(t.tipo),a=[];if(3===c&&a.push(Object(I.jsx)("div",{className:"card-tag tag-digital",children:"Digital"},"digital")),n>0){var o=2===i?"R$ ".concat(n," off"):"desconto ".concat(n,"%");a.push(Object(I.jsx)("div",{className:"card-tag tag-discount",children:o},"desc"))}return e<=0&&3!==c?a.push(Object(I.jsx)("div",{className:"card-tag tag-out",children:"sem estoque"},"stock")):1===e&&3!==c&&a.push(Object(I.jsx)("div",{className:"card-tag tag-low",children:"estoque baixo 1un"},"stock")),1===w(t.site_frete_gratis)&&a.push(Object(I.jsx)("div",{className:"card-tag tag-free-shipping",children:"Frete Gr\xe1tis"},"frete")),0===a.length?null:Object(I.jsx)("div",{className:"product-card-tags-row",children:a})}(),w(t.desconto)>0&&Object(I.jsx)("div",{className:"product-card-old-price",children:P(t.valor_original)}),Object(I.jsxs)("div",{className:"product-card-new-price",style:{color:a},children:[u,"Gr\xe1tis"===u&&Object(I.jsx)("span",{className:"gratis-star",children:"\u2728"})]})]})]})]})]})},ke=function(e){Object(ge.a)(e);var t=Object(i.useContext)(B),n=t.siteCor,c=(t.siteCorTexto,Object(h.h)()),a=Object(i.useRef)({}),o=Object(i.useState)(!1),r=Object(m.a)(o,2),s=r[0],l=r[1],d=Object(i.useState)([]),u=Object(m.a)(d,2),j=u[0],b=u[1],p=Object(i.useState)([]),x=Object(m.a)(p,2),g=x[0],f=x[1],O=Object(i.useState)({}),v=Object(m.a)(O,2),y=v[0],k=v[1],S=function(e){var t=a.current[e];if(t){var n=t.scrollLeft>10,i=t.scrollLeft<t.scrollWidth-t.clientWidth-10;k((function(t){var c,a;return(null===(c=t[e])||void 0===c?void 0:c.left)===n&&(null===(a=t[e])||void 0===a?void 0:a.right)===i?t:Object(M.a)(Object(M.a)({},t),{},Object(q.a)({},e,{left:n,right:i}))}))}};Object(i.useEffect)((function(){l(!0),z("mainPage",{},(function(e){b(e.paginas||[]),f(e.banners||[]),l(!1),setTimeout((function(){(e.paginas||[]).forEach((function(e){return S(e.id)}
1))}),600)}),!1)}),[]);var C=function(e,t){var n=a.current[e];n&&n.scrollBy({left:"R"===t?400:-400,behavior:"smooth"})};return Object(I.jsx)("div",{className:"vitrine-page",style:{"--site-cor":n},children:Object(I.jsxs)(T.a,{spinning:s,children:[g&&g.length>0&&Object(I.jsx)("div",{className:"banner-carousel",children:Object(I.jsx)(fe.a,{autoplay:!0,effect:"fade",arrows:!0,prevArrow:Object(I.jsx)("div",{className:"seta-banner-custom",children:Object(I.jsx)(Q.d,{size:20})}),nextArrow:Object(I.jsx)("div",{className:"seta-banner-custom",children:Object(I.jsx)(Q.e,{size:20})}),children:g.map((function(e){return Object(I.jsxs)("div",{className:"banner-item",onClick:function(){return e.link&&window.open(e.link,"_blank")},children:[e.titulo&&Object(I.jsx)("div",{className:"banner-content",children:Object(I.jsx)("h2",{children:e.titulo})}),Object(I.jsx)("div",{className:"banner-image-wrapper",children:e.img?Object(I.jsx)("img",{src:e.img,alt:e.titulo}):Object(I.jsx)("div",{className:"banner-placeholder",children:Object(I.jsx)("span",{children:"Sem Imagem"})})})]},e.id)}))})}),j.map((function(e){var t,i;return Object(I.jsxs)("div",{className:"vitrine-secao ".concat(2===e.tipo?"secao-destaque":""," ").concat(e.fundo_compacto?"com-fundo-compacto":""),style:Object(M.a)(Object(M.a)({},2===e.tipo?{border:"2px solid ".concat(e.cor||"#3498db","44"),background:"linear-gradient(135deg, #ffffff 0%, ".concat(e.cor||"#3498db","08 100%)")}:{}),e.fundo_compacto?{backgroundImage:"url(".concat(e.fundo_compacto,")"),backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),children:[Object(I.jsxs)("div",{className:"secao-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid rgba(0,0,0,0.05)"},children:[Object(I.jsxs)("h2",{style:{color:"#000000",display:"flex",alignItems:"center",gap:"12px",fontSize:"18px",fontWeight:"500",margin:0,textTransform:"uppercase"},children:[Object(I.jsx)("span",{style:{width:"5px",height:"24px",backgroundColor:e.cor||n,borderRadius:"4px",display:"inline-block"}}),e.titulo||e.nome||"Produtos em Destaque"]}),Object(I.jsx)("div",{className:"secao-more",style:{color:"white"!==n?n:"#3498db",fontWeight:"800",fontSize:"13px",cursor:"pointer"},onClick:function(){return c("/busca/".concat(e.titulo||e.nome,"?id_pagina=").concat(e.id,"&all=1"))},children:"VER TUDO"})]}),Object(I.jsxs)("div",{className:"carrossel-container",style:{position:"relative"},children:[(null===(t=y[e.id])||void 0===t?void 0:t.left)&&Object(I.jsx)("div",{className:"seta-carrossel esquerda",onClick:function(){return C(e.id,"L")},style:{backgroundColor:n,color:"white"},children:Object(I.jsx)(Q.d,{size:20})}),Object(I.jsx)("div",{className:"prods_fundo",ref:function(t){a.current[e.id]=t},onScroll:function(){return S(e.id)},children:e.produtos.map((function(e){return Object(I.jsx)(ye,{p:e},e.uuid)}))}),(!y[e.id]||(null===(i=y[e.id])||void 0===i?void 0:i.right))&&Object(I.jsx)("div",{className:"seta-carrossel direita",onClick:function(){return C(e.id,"R")},style:{backgroundColor:n,color:"white"},children:Object(I.jsx)(Q.e,{size:20})})]})]},e.id)})),!s&&0===j.length&&Object(I.jsx)("div",{className:"vitrine-secao",style:{textAlign:"center",padding:"60px"},children:Object(I.jsx)(Oe.a,{description:"Nenhuma se\xe7\xe3o configurada para a p\xe1gina inicial."})})]})})};function Se(e){e.children,e.name;var t=Object(i.useState)(""),c=Object(m.a)(t,2),a=(c[0],c[1],Object(i.useState)("")),o=Object(m.a)(a,2),r=(o[0],o[1]),s=Object(i.useState)(!1),d=Object(m.a)(s,2),u=d[0],j=d[1],p=Object(h.g)();Object(i.useEffect)((function(){p.search.includes("showMensalidades")&&(j(!0),setTimeout((function(){var e=document.querySelector(".mensalidade-container");e&&e.scrollIntoView({behavior:"smooth",block:"center"})}),500))}),[p]);JSON.stringify(Object.values(n(246).networkInterfaces()).flat());var x=Object(i.useContext)(B),g=x.siteStatus,f=x.siteCor,O=x.siteFone,v=x.siteAviso,y=x.isMensal,k=x.siteAgendamento,S=x.userNome,C=Object(i.useState)([]),w=Object(m.a)(C,2),A=w[0],_=w[1],P=Object(i.useState)(!1),E=Object(m.a)(P,2),R=E[0],D=E[1],W=Object(i.useState)([]),T=Object(m.a)(W,2),q=T[0],M=T[1],H=Object(i.useState)(!1),V=Object(m.a)(H,2),Q=(V[0],V[1]);Object(i.useEffect)((function(){1===k&&S&&"Entrar"!==S?(Q(!0),b.post("/getMeusAgend
1amentos",{},{headers:{Authorization:"Bearer ".concat(localStorage.getItem("tk"))}}).then((function(e){var t;0===e.data.err&&(null===(t=e.data.res)||void 0===t?void 0:t.agendamentos)&&M(e.data.res.agendamentos)})).finally((function(){return Q(!1)}))):M([])}),[k,S]),Object(i.useEffect)((function(){p.search.includes("showAgendamentos")&&setTimeout((function(){var e=document.querySelector(".agendamento-widget-container");e&&e.scrollIntoView({behavior:"smooth",block:"center"})}),500)}),[p]);var U=Object(i.useState)(null),X=Object(m.a)(U,2),G=X[0],J=X[1],Z=Object(i.useState)(null),Y=Object(m.a)(Z,2),ee=Y[0],te=Y[1],ne=Object(i.useState)([]),ie=Object(m.a)(ne,2),ce=ie[0],oe=ie[1];Object(i.useEffect)((function(){1===y&&(D(!0),z("getMensalidades",{},(function(e){var t=e.mensalidades||[];_(t);var n=t.filter((function(e){return"Vencida"===e.status}));n.length>0?(n.sort((function(e,t){return new Date(e.data_raw)-new Date(t.data_raw)})),J(n[0])):J(null);var i=t.filter((function(e){return"A Vencer"===e.status}));i.length>0?(i.sort((function(e,t){return new Date(e.data_raw)-new Date(t.data_raw)})),te(i[0])):te(null)}),!1,D))}),[y]);return 0===g?Object(I.jsx)("div",{className:"maintenance-full-overlay",children:Object(I.jsxs)("div",{className:"maintenance-card",children:[Object(I.jsx)("div",{className:"maintenance-icon-wrapper",children:Object(I.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"#f97316",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Object(I.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),Object(I.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}),Object(I.jsx)("h1",{children:"Site em Manuten\xe7\xe3o"}),Object(I.jsx)("div",{style:{marginTop:"25px",marginBottom:"30px",display:"flex",justifyContent:"center"},children:Object(I.jsx)(le,{texto:"Falar no WhatsApp",onClick:function(){var e=N(O).replace(/\D/g,""),t=e.startsWith("55")?e:"55"+e;window.open("https://wa.me/".concat(t),"_blank")},icon:Object(I.jsx)(L.q,{size:20}),fundo:"#25D366",cor:"white",width:"240px",height:"48px"})}),Object(I.jsx)("div",{className:"maintenance-badge",children:"Em breve"})]})}):Object(I.jsx)(I.Fragment,{children:Object(I.jsx)(ae,{titulo:"",sub:"",txBusca:function(e){r(e)},children:Object(I.jsxs)("div",{className:"dash_fundo",children:[Object(I.jsx)("div",{className:"dash_menu_topo"}),Object(I.jsxs)("div",{className:"dash_content",children:[q.length>0&&Object(I.jsxs)("div",{className:"agendamento-widget-container",style:{backgroundColor:"#fff",padding:"25px",borderRadius:"16px",margin:"20px",boxShadow:"0 4px 15px rgba(0,0,0,0.05)",border:"1px solid #eaeaea"},children:[Object(I.jsxs)("h3",{style:{margin:"0 0 20px 0",display:"flex",alignItems:"center",gap:"10px",fontSize:"20px",color:"#333"},children:[Object(I.jsx)(ue.d,{size:26,color:f})," Seus Agendamentos"]}),Object(I.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"15px"},children:q.map((function(e){return Object(I.jsxs)("div",{style:{padding:"15px 20px",borderRadius:"10px",borderLeft:"5px solid ".concat(f),backgroundColor:"#f8fafc",display:"flex",flexDirection:"column",gap:"6px"},children:[Object(I.jsx)("strong",{style:{fontSize:"16px",color:"#111"},children:e.grupo||"Agendamento"}),Object(I.jsxs)("span",{style:{fontSize:"15px",color:"#555"},children:["Data: ",Object(I.jsx)("b",{children:e.data})]}),Object(I.jsxs)("span",{style:{fontSize:"15px",color:"#555"},children:["Hor\xe1rio: ",Object(I.jsxs)("b",{children:[e.hora_inicio," - ",e.hora_fim]})]})]},e.id)}))})]}),v&&v.length>2&&Object(I.jsxs)("div",{className:"maintenance-inline-notice",style:{backgroundColor:"#eff6ff",border:"1px solid #bfdbfe",borderRadius:"16px",padding:"14px",margin:"20px",marginBottom:"10px",display:"flex",alignItems:"center",gap:"15px",overflow:"hidden"},children:[Object(I.jsx)("div",{style:{backgroundColor:"#3b82f6",width:"40px",height:"40px",borderRadius:"10px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:Object(I.jsx)($.i,{size:24,color:"white"})}),Object(I.jsxs)("div",{children:[Object(I.jsx)("h4",{style:{margin:0,color:"#1e40af",fontWeight:"700",fontSize:"15px"},children:v.includes("|")?v.split("|")[0]:"Aviso"}),Object(I.jsx)("p",{style:{margin:0,color:"#1d4ed8",fontSize:"13px",opacity:.9},children:v.includes("|")?v.split("|")[1]:v})]})]}),1===y&&Object(I.jsxs)("div",{className:"mensalidade-container",style:{margin:"20px",padding:"16px",backgroundColor:"#fff",borderRadius:"16px",boxShadow:"0 4px 12px rgba(0,0,0,0.05)",borderLeft:"5px solid #ef4444"},children:[Object(I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px"},children:[Object(I.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Object(I.jsx)($.c,{size:24,color:"#ef4444"}),Object(I.jsx)("h3",{style:{margin:0,fontSize:"16px",fontWeight:"700",color:"#1f2937"},children:"Mensalidades"})]}),Object(I.jsx)(K.a,{type:"link",onClick:function(){return j(!0)},style:{padding:0,height:"auto",fontWeight:"600",fontSize:"12px"},children:"Ver Detalhes \u2192"})]}),Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"10px"},children:[G?Object(I.jsxs)("div",{style:{flex:"1",minWidth:"220px",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 14px",backgroundColor:"#fee2e2",borderRadius:"10px"},children:[Object(I.jsxs)("div",{children:[Object(I.jsx)("div",{style:{fontWeight:"700",color:"#991b1b",fontSize:"13px"},children:"Fatura Vencida"}
1),Object(I.jsx)("div",{style:{fontSize:"11px",color:"#b91c1c"},children:G.data})]}),Object(I.jsxs)("div",{style:{fontWeight:"800",color:"#991b1b",fontSize:"15px"},children:["R$ ",Number(G.valor).toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}):Object(I.jsx)("div",{style:{flex:"1",minWidth:"220px",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 14px",backgroundColor:"#ecfdf5",borderRadius:"10px"},children:Object(I.jsxs)("div",{children:[Object(I.jsx)("div",{style:{fontWeight:"700",color:"#065f46",fontSize:"13px"},children:"Tudo em dia!"}),Object(I.jsx)("div",{style:{fontSize:"11px",color:"#047857"},children:"Nenhuma fatura em atraso."})]})}),ee&&Object(I.jsxs)("div",{style:{flex:"1",minWidth:"220px",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 14px",backgroundColor:"#f3f4f6",borderRadius:"10px"},children:[Object(I.jsxs)("div",{children:[Object(I.jsx)("div",{style:{fontWeight:"600",color:"#4b5563",fontSize:"13px"},children:"Pr\xf3xima Fatura"}),Object(I.jsx)("div",{style:{fontSize:"11px",color:"#6b7280"},children:ee.data})]}),Object(I.jsxs)("div",{style:{fontWeight:"700",color:"#1f2937",fontSize:"15px"},children:["R$ ",Number(ee.valor).toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]})]})]}),u&&Object(I.jsx)("div",{className:"maintenance-full-overlay",style:{zIndex:2e3},children:Object(I.jsxs)("div",{className:"maintenance-card",style:{maxWidth:"600px",width:"90%"},children:[Object(I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",borderBottom:"1px solid #f3f4f6",paddingBottom:"10px"},children:[Object(I.jsx)("h2",{style:{margin:0,fontSize:"20px",fontWeight:"700"},children:"Hist\xf3rico de Mensalidades"}),Object(I.jsx)(K.a,{onClick:function(){return j(!1)},type:"text",style:{fontSize:"18px",fontWeight:"700"},children:"X"})]}),Object(I.jsxs)("div",{style:{textAlign:"left",display:"flex",flexDirection:"column",gap:"15px"},children:[Object(I.jsxs)("div",{style:{padding:"15px",backgroundColor:"#f9fafb",borderRadius:"12px",border:"1px solid #e5e7eb"},children:[Object(I.jsx)("div",{style:{fontWeight:"700",marginBottom:"10px",color:"#374151"},children:"Plano Atual: Assinatura Premium"}),Object(I.jsxs)("div",{style:{fontSize:"14px",color:"#6b7280"},children:["Status do Cadastro: ",Object(I.jsx)("span",{style:{color:"#059669",fontWeight:"600"},children:"Ativo (is_mensal = 1)"})]})]}),Object(I.jsx)("div",{style:{maxHeight:"300px",overflowY:"auto"},children:Object(I.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[Object(I.jsx)("thead",{children:Object(I.jsxs)("tr",{style:{borderBottom:"2px solid #f3f4f6",textAlign:"left"},children:[Object(I.jsx)("th",{style:{padding:"10px",width:"30px"}}),Object(I.jsx)("th",{style:{padding:"10px",fontSize:"13px",color:"#6b7280"},children:"Data"}),Object(I.jsx)("th",{style:{padding:"10px",fontSize:"13px",color:"#6b7280"},children:"Refer\xeancia"}),Object(I.jsx)("th",{style:{padding:"10px",fontSize:"13px",color:"#6b7280"},children:"Valor"}),Object(I.jsx)("th",{style:{padding:"10px",fontSize:"13px",color:"#6b7280"},children:"Status"})]})}),Object(I.jsx)("tbody",{children:0===A.length?Object(I.jsx)("tr",{children:Object(I.jsx)("td",{colSpan:"4",style:{padding:"20px",textAlign:"center",color:"#9ca3af"},children:"Nenhuma mensalidade encontrada."})}):A.map((function(e,t){return Object(I.jsxs)("tr",{style:{borderBottom:"1px solid #f3f4f6"},children:[Object(I.jsx)("td",{style:{padding:"10px"},children:"Paga"!==e.status&&Object(I.jsx)("input",{type:"checkbox",checked:ce.includes(e.id),onChange:function(){return t=e.id,void(ce.includes(t)?oe(ce.filter((function(e){return e!==t}))):oe([].concat(Object(F.a)(ce),[t])));var t},style:{cursor:"pointer",transform:"scale(1.2)"}})}),Object(I.jsx)("td",{style:{padding:"10px",fontSize:"13px"},children:e.data}),Object(I.jsx)("td",{style:{padding:"10px",fontSize:"13px"},children:e.referencia}),Object(I.jsxs)("td",{style:{padding:"10px",fontSize:"13px"}
1,children:["R$ ",Number(e.valor).toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),Object(I.jsx)("td",{style:{padding:"10px",fontSize:"13px",fontWeight:"600",color:"Paga"===e.status?"#059669":"Vencida"===e.status?"#ef4444":"#3b82f6"},children:e.status})]},t)}))})]})}),ce.length>0&&Object(I.jsxs)("div",{style:{marginTop:"15px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"15px"},children:[Object(I.jsxs)("div",{style:{fontWeight:"600",color:"#374151"},children:["Selecionadas: ",ce.length]}),Object(I.jsx)(le,{texto:"Pagar Selecionadas (R$ ".concat(A.filter((function(e){return ce.includes(e.id)})).reduce((function(e,t){return e+t.valor}),0).toLocaleString("pt-BR",{minimumFractionDigits:2}),")"),fundo:"#3b82f6",onClick:function(){0!==ce.length&&(D(!0),z("gerarPedidoMensalidade",{mensalidades:ce},(function(e){e&&e.prot?window.location.href="/checkout/"+e.prot:l.b.error(e.erro||"Erro ao processar mensalidades")}),!0,D))},carregando:R})]})]}),Object(I.jsx)("div",{style:{marginTop:"25px"},children:Object(I.jsx)(le,{texto:"Fechar",onClick:function(){return j(!1)},width:"100%"})})]})}),Object(I.jsx)(ke,{})]})]})})})}n(247);var Ce=n(202),Ne=n(199),we=function(e){Object(ge.a)(e);Object(i.useContext)(B).siteCor,Object(h.h)();var t=Object(h.g)(),n=Object(h.i)().uri_busca,c=Object(i.useState)(!1),a=Object(m.a)(c,2),o=a[0],r=a[1],s=Object(i.useState)([]),l=Object(m.a)(s,2),d=l[0],u=l[1],j=Object(i.useState)(1),b=Object(m.a)(j,2),p=b[0],x=b[1],g=Object(i.useState)(0),f=Object(m.a)(g,2),O=f[0],v=f[1],y=Object(i.useState)("relevancia"),k=Object(m.a)(y,2),S=k[0],C=k[1],A=Object(i.useState)(null),_=Object(m.a)(A,2),P=_[0],E=_[1];Object(i.useEffect)((function(){x(1)}),[n,t.search,S]),Object(i.useEffect)((function(){var e=new URLSearchParams(t.search),i=e.get("id_dep"),c=e.get("id_grupo"),a=e.get("id_subgrupo"),o=e.get("id_pagina"),s={busca:"1"===e.get("all")?"":String(n),page:p,sort:S};i&&(s.id_dep=i),c&&(s.id_grupo=c),a&&(s.id_subgrupo=a),o&&(s.id_pagina=o),(N(n).length>0||i||c||a||o)&&(r(!0),z("busca",s,(function(e){u(e.prods||[]),v(e.total||0),e.pagina_info?E(e.pagina_info):E(null),r(!1)}),!1,(function(e){return r(e)})))}),[n,t.search,p,S]);var R=w(null===P||void 0===P?void 0:P.formato_page),F=d;return Object(I.jsx)(ae,{titulo:(null===P||void 0===P?void 0:P.titulo)||"Busca",sub:(null===P||void 0===P?void 0:P.titulo)?"":n,voltar:!0,children:Object(I.jsx)("div",{className:"busca-page ".concat((null===P||void 0===P?void 0:P.fundo_page)?"com-fundo-page":""),style:(null===P||void 0===P?void 0:P.fundo_page)?{backgroundImage:"url(".concat(P.fundo_page,")"),backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"fixed"}:{},children:Object(I.jsx)(T.a,{spinning:o,children:Object(I.jsxs)("div",{style:{minHeight:"400px",width:"100%"},children:[Object(I.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"25px"},children:Object(I.jsx)("div",{className:"ordenacao-wrapper",children:Object(I.jsxs)(Ce.a,{children:[Object(I.jsx)("span",{style:{color:"#64748b",fontSize:"14px"},children:"Ordenar por:"}),Object(I.jsxs)(J.a,{value:S,onChange:function(e){return C(e)},style:{width:160},bordered:!1,className:"select-moderno",children:[Object(I.jsx)(J.a.Option,{value:"relevancia",children:"Selecione..."}),Object(I.jsx)(J.a.Option,{value:"menor_valor",children:"Menor Pre\xe7o"}),Object(I.jsx)(J.a.Option,{value:"maior_valor",children:"Maior Pre\xe7o"})]})]})})}),Object(I.jsx)("div",{className:"prods_fundo formato-layout-".concat(R),children:F&&F.length>0?F.map((function(e){return Object(I.jsx)(ye,{p:e},e.uuid)})):!o&&Object(I.jsx)("div",{style:{gridColumn:"1 / -1",padding:"100px 0",display:"flex",justifyContent:"center"},children:Object(I.jsx)(Oe.a,{description:"Nenhum produto encontrado para esta busca."})})}),O>15&&!o&&Object(I.jsx)("div",{style:{width:"100%",marginTop:"50px",display:"flex",justifyContent:"center",paddingBottom:"50px"},children:Object(I.jsx)(Ne.a,{current:p,total:O,pageSize:15,onChange:function(e){x(e),window.scrollTo(0,0)},showSizeChanger:!1})})]})})})})},Ae=(n(248),function(e){e.setValue;var t,n=e.value,c=Object(i.useContext)(B),a=c.siteCor,o=c.siteCorTexto,r=c.addToCart,s=c.trackViewContent,d=c.siteFone,u=c.setCart,j=c.updateTag,b=c.siteNome,p=c.updateSiteMeta,x=c.userCep,g=c.setShowUserBox,v=c.fetchInventario,y=c.siteAuxA,k=c.siteAuxB,S=c.siteAuxC,C=function(e){if(!e)return null;var t=/(https?:\/\/[^\s]+)/g;return e.split(t).map((function(e,n){if(t.test(e)){var i=e;return(i.endsWith(".")||i.endsWith(",")||i.endsWith(";"))&&(i=i.slice(0,-1)),Object(I.jsx)("div",{style:{margin:"15px 0",display:"block"},children:Object(I.jsx)(le,{texto:"Acessar Link",fundo:a||"#0d4381",cor:o||"#ffffff",onClick:function(){return window.open(i,"_blank")},width:"220px",height:"40px"})},n)}return e}))};Object(i.useEffect)((function(){return function(){p()}}),[]);var _=Object(h.i)().uuid,E=Object(h.h)(),R=Object(i.useState)(!1),F=Object(m.a)(R,2),W=F[0],q=F[1],M=Object(i.useState)(""),H=Object(m.a)(M,2),V=H[0],U=H[1],X=Object(i.useState)(1),G=Object(m.a)(X,2),J=G[0],K=G[1],Z=Object(i.useState)(""),Y=Object(m.a)(Z,2),ee=Y[0],ne=Y[1],ie=Object(i.useState)([]),oe=Object(m.a)(ie,2),re=oe[0],se=oe[1];Object(i.useEffect)((function(){N(x).length>=8&&N(ee).length<2&&ne(x)}),[x,ee]);var de=Object(i.useState)([]),je=Object(m.a)(de,2),pe=je[0],xe=je[1],he=Object(i.useState)(0),me=Object(m.a)(he,2),ge=me[0],fe=me[1],Oe=Object(i.useState)(null),ve=Object(m.a)(Oe,2),ye=ve[0],ke=ve[1];Object(i.useEffect)((function(){var e;if((null===pe||void 0===pe||null===(e=pe.prod)||void 0===e?void 0:e.grade_itens)&&pe.prod.grade_itens.length>1){for(var t=null,n=function(){var e=c[i];if(new Set(pe.prod.grade_itens.map((function(t){return t[e]})).filter((function(e){return e}))).size>1)return t=e,"break"},i=0,c=["aux_b","aux_a","aux_c","aux_d","aux_e","descri"];i<c.length;i++){if("break"===n())break}ke(t||"descri")}else ke(null)}),[pe]);var Se=function(){N(ee).length<8?l.b.warn("Informe um CEP v\xe1lido!"):z("calcularFrete",{uuid:N(V),cep:N(ee).replace(/\D/g,"")},(function(e){se(e.frete)}
1),!1)},Ce=Object(i.useState)(!1),Ne=Object(m.a)(Ce,2),we=Ne[0],Ae=Ne[1];Object(i.useEffect)((function(){var e=_||n;N(e).length>2&&z("getItem",{uuid:N(e)},(function(e){if(xe(e),e.prod&&!A(e.prod)){U(e.prod.uuid),Ae(!1);var t="".concat(e.prod.descri," - ").concat(b),n=N(e.prod.meta_descri)||N(e.prod.descri),i=N(e.prod.img),c=window.location.href;if(document.title=t,j('meta[name="description"]',"content",n),j('meta[property="og:title"]',"content",t),j('meta[property="og:description"]',"content",n),j('meta[property="og:image"]',"content",i),j('meta[property="og:url"]',"content",c),j('meta[property="og:type"]',"content","product"),j('meta[name="twitter:title"]',"content",t),j('meta[name="twitter:description"]',"content",n),j('meta[name="twitter:image"]',"content",i),s({uuid:e.prod.uuid,descri:e.prod.descri,valor:e.prod.valor_venda}),_&&e.prod.descri&&window.location.pathname.includes("/p/")){var a=N(e.prod.descri).trim().replace(/\s+/g,"_");window.history.replaceState(null,"","/p/".concat(e.prod.uuid,"/").concat(a))}}else Ae(!0)}),!1,q)}),[n,_]);var ze=Object(i.useState)(!1),_e=Object(m.a)(ze,2),Pe=_e[0],Ee=_e[1],Ie=Object(i.useState)(!1),Be=Object(m.a)(Ie,2),Re=Be[0],Fe=Be[1],Le=Object(i.useState)(!1),De=Object(m.a)(Le,2),We=De[0],Te=De[1],qe=Object(i.useState)(!1),Me=Object(m.a)(qe,2),He=Me[0],Ve=Me[1],Qe=Object(i.useState)(!1),Ue=Object(m.a)(Qe,2),Xe=Ue[0],Ge=Ue[1],Je=Object(i.useState)(!1),Ke=Object(m.a)(Je,2),Ze=Ke[0],Ye=Ke[1],$e=function(){if(N(localStorage.getItem("tk")).length<10)return g(2),void l.b.info("Acesse sua conta ou cadastre-se para adquirir!");Ge(!0),z("adquirirGratuito",{uuid:V},(function(e){Ge(!1),Ye(!0)}),!1,null,(function(){Ge(!1)}))},et=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=N(localStorage.getItem("tk"));if(t.length<10)return g(2),void l.b.info("Acesse sua conta ou cadastre-se para comprar!");Ve(e),Te(!0)},tt=function(){var e=Object(O.a)(f.a.mark((function e(){var t,n,i,c;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=w(null===pe||void 0===pe||null===(t=pe.prod)||void 0===t?void 0:t.qtd),c=3===w(null===pe||void 0===pe||null===(n=pe.prod)||void 0===n?void 0:n.tipo),!(i<=0)||c){e.next=5;break}return l.b.error("Produto sem estoque dispon\xedvel."),e.abrupt("return");case 5:if(!(J>i)||c){e.next=8;break}return l.b.error("Quantidade superior ao estoque dispon\xedvel (".concat(i,").")),e.abrupt("return");case 8:return Fe(!0),e.next=11,r(V,J);case 11:e.sent?He?z("finalizarPedido",{},(function(e){Fe(!1),Te(!1),u({itens:[],total:0}),E("/checkout/"+e.prot)}),!1,null,(function(){Fe(!1),Te(!1)})):(Fe(!1),Te(!1),Ee(!0)):Fe(!1);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(I.jsxs)(ae,{sub:"",children:[Ze&&Object(I.jsx)(te,{titulo:"Adquirido com Sucesso! \ud83c\udf89",click_close:function(){return Ye(!1)},width:"450px",zindex:1e4,children:Object(I.jsxs)("div",{className:"modal_sucesso_content",style:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",padding:"20px"},children:[Object(I.jsx)("div",{style:{background:"#dcfce7",borderRadius:"50%",padding:"20px",marginBottom:"20px",display:"flex",justifyContent:"center",alignItems:"center"},children:Object(I.jsx)(ue.a,{size:48,color:"#22c55e"})}),Object(I.jsx)("h3",{style:{fontSize:"20px",fontWeight:"700",color:"#1e293b",marginBottom:"10px"},children:"Obrigado por adquirir!"}),Object(I.jsxs)("p",{style:{color:"#64748b",fontSize:"14px",lineHeight:"1.6",marginBottom:"25px"},children:["O item ",Object(I.jsx)("strong",{children:null===pe||void 0===pe||null===(t=pe.prod)||void 0===t?void 0:t.descri})," j\xe1 est\xe1 dispon\xedvel no seu invent\xe1rio digital. Aproveite o seu conte\xfado!"]}),Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"10px",width:"100%"},children:[Object(I.jsx)(le,{texto:"Acessar Conte\xfado",fundo:"#10b981",cor:"#ffffff",onClick:function(){var e;Ye(!1);var t=N(null===pe||void 0===pe||null===(e=pe.prod)||void 0===e?void 0:e.aux_f).trim();t.length>0?(t.startsWith("http://")||t.startsWith("https://")||(t="https://pub-af17930b82914f6db336d25907b884b7.r2.dev/"+t),window.open(t,"_blank")):v()},width:"100%",height:"42px"}),Object(I.jsx)(le,{texto:"Abrir Invent\xe1rio",fundo:"#f1f5f9",cor:"#475569",onClick:function(){Ye(!1),v()},width:"100%",height:"42px"})]})]})}),We&&Object(I.jsx)(te,{titulo:"Confirmar Quantidade",txFechar:"-s",click_close:function(){return Te(!1)},btn_sim:tt,btn_sim_tx:"Confirmar",btn_nao:function(){return Te(!1)},btn_nao_tx:"Cancelar",carregando:Re,width:"400px",zindex:1e4,btn_sim_direita:!0,children:Object(I.jsxs)("div",{className:"modal_qtd_content",children:[Object(I.jsxs)("div",{className:"modal_qtd_info",children:[Object(I.jsx)("h3",{className:"modal_qtd_titulo",children:pe.prod.descri}),Object(I.jsx)("p",{className:"modal_qtd_sub",children:"Selecione a quantidade para o seu pedido"})]}),Object(I.jsxs)("div",{className:"qtd_selector_premium",children:[Object(I.jsx)("div",{className:"btn_round_qtd ".concat(J<=1?"disabled":""),onClick:function(){return J>1&&K(J-1)},children:Object(I.jsx)(L.i,{})}),Object(I.jsxs)("div",{className:"qtd_display",children:[Object(I.jsx)("span",{className:"qtd_val",style:{color:a},children:J}),Object(I.jsx)("span",{className:"qtd_lbl",children:pe.prod.unidade||"Unidade"})]}),Object(I.jsx)("div",{className:"btn_round_qtd ".concat(J>=w(pe.prod.qtd)&&3!==w(pe.prod.tipo)?"disabled":""),onClick:function(){return(3===w(pe.prod.tipo)||J<w(pe.prod.qtd))&&K(J+1)},children:Object(I.jsx)(L.k,{})})]}),Object(I.jsxs)("div",{className:"stock_badge_premium",children:[Object(I.jsx)("div",{className:"dot"}
1),Object(I.jsx)("span",{children:3===w(pe.prod.tipo)?"Disponibilidade Digital":"Estoque: ".concat(w(pe.prod.qtd)," unidades dispon\xedveis")})]})]})}),Object(I.jsxs)("div",{className:"prod_fundo",children:[W&&Object(I.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"300px",flexDirection:"column"},children:[Object(I.jsx)(T.a,{size:"large"}),Object(I.jsx)("span",{style:{marginTop:"15px",color:"#64748b",fontSize:"15px",fontWeight:"500"},children:"Carregando produto..."})]}),we&&!W&&Object(I.jsx)("div",{style:{textAlign:"center",width:"100%",marginTop:"50px",display:"flex",flexDirection:"column",gap:"20px",alignItems:"center"},children:Object(I.jsxs)("div",{style:{background:"#f8fafc",padding:"40px",borderRadius:"16px",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.05)",maxWidth:"500px"},children:[Object(I.jsx)($.j,{size:48,color:"#94a3b8",style:{marginBottom:"15px"}}),Object(I.jsx)("h2",{style:{color:"#1e293b",fontSize:"24px",fontWeight:"800",marginBottom:"10px"},children:"Produto n\xe3o encontrado"}),Object(I.jsx)("p",{style:{color:"#64748b",fontSize:"15px",marginBottom:"25px"},children:"O produto que voc\xea tentou acessar n\xe3o est\xe1 mais dispon\xedvel ou a URL est\xe1 incorreta."}),Object(I.jsx)(le,{texto:"Voltar para a p\xe1gina anterior",fundo:"#0d4381",cor:"#ffffff",onClick:function(){return E(-1)},icon:Object(I.jsx)($.a,{size:16}),width:"100%"})]})}),!A(pe)&&!A(pe.prod)&&!W&&function(){var e=N(pe.prod.img),t=e.length>20&&!e.includes("null")&&!e.includes("undefined"),n=pe.prod.imgs&&Array.isArray(pe.prod.imgs)&&pe.prod.imgs.length>0?pe.prod.imgs:t?[e]:[],i=n.length>0?n[ge]||n[0]:"";return Object(I.jsxs)("div",{className:"prod_box",style:t?{}:{flexDirection:"column",maxWidth:"800px",margin:"0 auto"},children:[t&&Object(I.jsxs)("div",{className:"prod_capa_box",children:[Object(I.jsxs)("div",{className:"prod_voltar_lateral",onClick:function(){return E(-1)},children:[Object(I.jsx)($.a,{size:18}),Object(I.jsx)("span",{children:"Voltar"})]}),Object(I.jsxs)("div",{className:"prod_capa",style:{position:"relative"},children:[Object(I.jsx)(be,{prot:String(i)}),n.length>1&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("div",{className:"prod_img_nav prod_img_prev",onClick:function(e){e.stopPropagation(),fe(ge>0?ge-1:n.length-1)},children:Object(I.jsx)($.a,{})}),Object(I.jsx)("div",{className:"prod_img_nav prod_img_next",onClick:function(e){e.stopPropagation(),fe(ge<n.length-1?ge+1:0)},children:Object(I.jsx)($.a,{style:{transform:"rotate(180deg)"}})}),Object(I.jsx)("div",{className:"prod_img_miniaturas",style:{display:"flex",gap:"10px",marginTop:"15px",overflowX:"auto",paddingBottom:"5px"},children:n.map((function(e,t){return Object(I.jsx)("div",{onClick:function(){return fe(t)},style:{width:"60px",height:"60px",borderRadius:"8px",border:t===ge?"2px solid ".concat(a||"#0d4381"):"1px solid #e2e8f0",cursor:"pointer",overflow:"hidden",flexShrink:0,opacity:t===ge?1:.6,transition:"all 0.2s"},children:Object(I.jsx)("img",{src:e,alt:"Miniatura",style:{width:"100%",height:"100%",objectFit:"contain"}})},t)}))})]})]})]}),Object(I.jsxs)("div",{className:"prod_infos_box",children:[!t&&Object(I.jsxs)("div",{className:"prod_voltar_lateral",onClick:function(){return E(-1)},style:{display:"flex",alignItems:"center",gap:"6px",color:"#64748b",fontSize:"14px",fontWeight:600,cursor:"pointer",width:"fit-content"},children:[Object(I.jsx)($.a,{size:18}),Object(I.jsx)("span",{children:"Voltar"})]}),Object(I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",width:"100%",gap:"15px"},children:[Object(I.jsx)("h1",{className:"prod_titulo_destaque",style:{color:a,margin:0},children:pe.prod.descri}),Object(I.jsx)(D.a,{menu:{items:[{key:"1",label:Object(I.jsxs)("div",{onClick:function(){navigator.clipboard.writeText(window.location.href),l.b.success("Link copiado!")},style:{display:"flex",alignItems:"center",gap:"10px",padding:"6px 4px",fontSize:"15px",color:"#334155"},children:[Object(I.jsx)(L.h,{size:18,color:"#64748b"})," Copiar link"]})},{key:"2",label:Object(I.jsxs)("div",{onClick:function(){var e,t=(null===pe||void 0===pe||null===(e=pe.prod)||void 0===e?void 0:e.descri)||b;
1window.open("https://api.whatsapp.com/send?text=".concat(encodeURIComponent(t+" "+window.location.href)),"_blank")},style:{display:"flex",alignItems:"center",gap:"10px",padding:"6px 4px",fontSize:"15px",color:"#334155"},children:[Object(I.jsx)(L.q,{size:18,color:"#25D366"})," WhatsApp"]})},{key:"3",label:Object(I.jsxs)("div",{onClick:function(){window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(window.location.href)),"_blank")},style:{display:"flex",alignItems:"center",gap:"10px",padding:"6px 4px",fontSize:"15px",color:"#334155"},children:[Object(I.jsx)(L.d,{size:18,color:"#1877F2"})," Facebook"]})},{key:"4",label:Object(I.jsxs)("div",{onClick:function(){navigator.clipboard.writeText(window.location.href),l.b.success("Link copiado! Cole no seu Instagram."),setTimeout((function(){return window.open("https://instagram.com","_blank")}),1500)},style:{display:"flex",alignItems:"center",gap:"10px",padding:"6px 4px",fontSize:"15px",color:"#334155"},children:[Object(I.jsx)(L.f,{size:18,color:"#E1306C"})," Instagram"]})}]},trigger:["click"],placement:"bottomRight",children:Object(I.jsx)("div",{style:{cursor:"pointer",padding:"10px",borderRadius:"50%",background:"#f1f5f9",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"2px",transition:"all 0.2s",boxShadow:"0 2px 4px rgba(0,0,0,0.05)"},children:Object(I.jsx)(L.n,{size:18,color:a})})})]}),pe.prod.grade_itens&&pe.prod.grade_itens.length>1&&ye&&Object(I.jsxs)("div",{className:"prod_grade_container",style:{marginTop:"10px",marginBottom:"15px"},children:[Object(I.jsx)("div",{className:"section_label",style:{marginBottom:"10px",fontSize:"14px",fontWeight:"600",color:"#64748b"},children:"Outras Op\xe7\xf5es:"}),Object(I.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"},children:pe.prod.grade_itens.map((function(e,t){var n=e.uuid===pe.prod.uuid;return Object(I.jsx)("div",{onClick:function(){n||E("/p/".concat(e.uuid,"/").concat(e.descri.trim().replace(/\s+/g,"_")))},style:{padding:"8px 16px",border:n?"2px solid ".concat(a||"#0d4381"):"1px solid #cbd5e1",borderRadius:"8px",cursor:n?"default":"pointer",backgroundColor:n?a?a+"15":"#0d438115":"#fff",color:n?a||"#0d4381":"#334155",fontWeight:n?"600":"400",transition:"all 0.2s",fontSize:"14px",userSelect:"none"},onMouseOver:function(e){n||(e.currentTarget.style.borderColor=a||"#0d4381",e.currentTarget.style.color=a||"#0d4381")},onMouseOut:function(e){n||(e.currentTarget.style.borderColor="#cbd5e1",e.currentTarget.style.color="#334155")},children:e[ye]},t)}))})]}),Object(I.jsxs)("div",{className:"prod_pre_compra_row",children:[Object(I.jsxs)("div",{className:"prod_valores_box",style:{margin:0,boxShadow:"none",padding:0},children:[Object(I.jsxs)("div",{className:"prod_status_tags",style:{marginBottom:"8px",gap:"6px"},children:[w(pe.prod.qtd)<=0&&3!==w(pe.prod.tipo)?Object(I.jsx)("div",{className:"prod_aviso",style:{backgroundColor:"#fee2e2",color:"#ef4444",padding:"4px 10px",fontSize:"12px"},children:"sem estoque"}):1===w(pe.prod.qtd)&&3!==w(pe.prod.tipo)?Object(I.jsx)("div",{className:"prod_aviso",style:{backgroundColor:"#fef3c7",color:"#f59e0b",padding:"4px 10px",fontSize:"12px"},children:"estoque baixo 1un"}):3===w(pe.prod.tipo)?Object(I.jsx)("div",{className:"prod_aviso",style:{backgroundColor:"#dcfce7",color:"#22c55e",padding:"4px 10px",fontSize:"12px"},children:"Dispon\xedvel Digital"}):Object(I.jsx)("div",{className:"prod_aviso",style:{backgroundColor:"#dcfce7",color:"#22c55e",padding:"4px 10px",fontSize:"12px"},children:"estoque dispon\xedvel"}),w(pe.prod.desconto)>0&&Object(I.jsx)("div",{className:"prod_aviso",style:{backgroundColor:"#ef4444",color:"white",padding:"4px 10px",fontSize:"12px"},children:2===w(pe.prod.tipo_desc)?"R$ ".concat(pe.prod.desconto," off"):"desconto ".concat(pe.prod.desconto,"%")}),1==pe.prod.site_frete_gratis&&Object(I.jsxs)("div",{className:"prod_frete_gratis",style:{padding:"4px 10px",fontSize:"12px"},children:[Object(I.jsx)($.l,{size:14})," Frete Gr\xe1tis"]})]}),3===w(pe.prod.tipo)&&0===parseFloat(pe.prod.valor_venda)?Object(I.jsx)("div",{className:"prod_preco_main",style:{color:"#22c55e",fontWeight:"bold"},children:"Gr\xe1tis"}):Object(I.jsxs)(I.Fragment,{children:[w(pe.prod.desconto)>0&&Object(I.jsx)("div",{style:{textDecoration:"line-through",color:"#94a3b8",fontSize:"16px",fontWeight:"600",marginBottom:"-5px"},children:P(pe.prod.valor_original)}),Object(I.jsxs)("div",{className:"prod_preco_main",children:[Object(I.jsx)("span",{className:"cifrao",children:"R$"}),P(pe.prod.valor_venda).replace("R$","")]})]}),Object(I.jsx)("div",{className:"prod_unidade",children:3===w(pe.prod.tipo)?"Acesso Digital":Object(I.jsxs)(I.Fragment,{children:[pe.prod.unidade||"UN"," / ",w(pe.prod.qtd)<=0?"Sem estoque":1===w(pe.prod.qtd)?"Estoque baixo":"Estoque dispon\xedvel (".concat(pe.prod.qtd,")")]})})]}),Object(I.jsx)("div",{className:"prod_acoes_horizontal",children:Pe?Object(I.jsxs)("div",{className:"prod_adicionado_feedback_horizontal",children:[Object(I.jsx)(Q.a,{size:24,color:"#059669"}),Object(I.jsxs)("span",{children:[Object(I.jsx)("strong",{children:"Adicionado!"})," Confira seu carrinho."]}),Object(I.jsx)(le,{texto:"Adicionar mais",fundo:"#f1f5f9",cor:"#64748b",onClick:function(){return Ee(!1)}})]}):w(pe.prod.qtd)<=0&&3!==w(pe.prod.tipo)?Object(I.jsxs)("div",{className:"prod_indisponivel_container",children:[Object(I.jsx)("div",{className:"prod_indisponivel_badge",children:"PRODUTO INDISPON\xcdVEL"}),Object(I.jsx)(le,{icon:Object(I.jsx)(L.q,{size:22}),texto:"Fale conosco para saber mais",fundo:"#25D366",cor:"#fff",height:"48px",fontSize:"14px",borda:!1,onClick:function(){var e="Ol\xe1! Tenho interesse no produto *".concat(pe.prod.descri,"*, mas vi que est\xe1 indispon\xedvel no site. Poderia me dar mais informa\xe7\xf5es?"),t=N(d).replace(/\D/g,"");window.open("https://wa.me/".concat(t,"?text=").concat(encodeURIComponent(e)),"_blank")},width:"100%"})]}):3===w(pe.prod.tipo)&&0===parseFloat(pe.prod.valor_venda)?Object(I.jsx)("div",{style:{display:"flex",gap:"30px",alignItems:"center"},children:Object(I.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"10px",alignItems:"center"},children:Object(I.jsx)(le,{icon:Object(I.jsx)(Q.a,{size:20,color:"#fff"}),texto:"Adquirir Gratuitamente",onClick:$e,fundo:"#10b981",cor:"#fff",carregando:Xe,width:"250px",height:"46px"})})}):Object(I.jsx)("div",{style:{display:"flex",gap:"30px",alignItems:"center"},children:Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"10px",alignItems:"center"},children:[Object(I.jsx)(le,{icon:Object(I.jsx)(Q.a,{size:20,color:o}),texto:"Comprar Agora",onClick:function(){return et(!0)},fundo:a,cor:o,carregando:Re,width:"180px"}
1),Object(I.jsx)(le,{icon:Object(I.jsx)(Q.c,{size:20,color:a}),texto:"Carrinho",onClick:function(){return et(!1)},fundo:"transparent",cor:a,bordaSize:3,bordaCor:"".concat(a),carregando:Re,width:"180px"})]})})})]}),(pe.prod.aux_a||pe.prod.aux_b||pe.prod.aux_c||pe.prod.ano||pe.prod.paginas||pe.prod.idade)&&Object(I.jsxs)("div",{className:"prod_detalhes_tecnicos",children:[Object(I.jsxs)("div",{className:"section_label",children:[Object(I.jsx)(ue.c,{})," Detalhes do Item"]}),Object(I.jsxs)("div",{className:"detalhes_grid",children:[pe.prod.aux_a&&Object(I.jsxs)("div",{className:"detalhe_item",children:[Object(I.jsx)("label",{children:y||"Aux A"}),Object(I.jsx)("span",{children:pe.prod.aux_a})]}),pe.prod.aux_b&&Object(I.jsxs)("div",{className:"detalhe_item",children:[Object(I.jsx)("label",{children:k||"Aux B"}),Object(I.jsx)("span",{children:pe.prod.aux_b})]}),pe.prod.aux_c&&Object(I.jsxs)("div",{className:"detalhe_item",children:[Object(I.jsx)("label",{children:S||"Aux C"}),Object(I.jsx)("span",{children:pe.prod.aux_c})]}),pe.prod.ano&&Object(I.jsxs)("div",{className:"detalhe_item",children:[Object(I.jsx)("label",{children:"Ano"}),Object(I.jsx)("span",{children:pe.prod.ano})]}),pe.prod.paginas&&Object(I.jsxs)("div",{className:"detalhe_item",children:[Object(I.jsx)("label",{children:"P\xe1ginas"}),Object(I.jsx)("span",{children:pe.prod.paginas})]}),pe.prod.idade&&Object(I.jsxs)("div",{className:"detalhe_item",children:[Object(I.jsx)("label",{children:"Idade M\xednima"}),Object(I.jsx)("span",{children:pe.prod.idade})]})]})]}),3!==w(pe.prod.tipo)&&Object(I.jsxs)("div",{className:"prod_frete_container",children:[Object(I.jsxs)("div",{className:"section_label",children:[Object(I.jsx)($.l,{})," Calcular Frete e Prazos"]}),Object(I.jsxs)("div",{className:"prod_cep_form",children:[Object(I.jsx)(ce,{hint:"00000-000",modelo:2,width:"150px",value:ee,setValue:ne,mask:[/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/]}),Object(I.jsx)(le,{texto:"Calcular",fundo:"#f1f5f9",onClick:Se})]}),Object(I.jsx)("div",{className:"prod_frete_results",children:re&&re.length>0?re.map((function(e,t){return Object(I.jsxs)("div",{className:"frete_option",children:[Object(I.jsx)("span",{className:"frete_nome",children:e.nome}),Object(I.jsx)("span",{className:"frete_prazo",children:e.prazo}),Object(I.jsx)("span",{className:"frete_valor",children:e.valor>0?P(e.valor):"Gr\xe1tis"})]},t)})):Object(I.jsx)("p",{className:"frete_hint",children:"Informe seu CEP para ver as op\xe7\xf5es de entrega."})})]}),pe.prod.meta_descri&&Object(I.jsxs)("div",{className:"prod_sinopsis_container",children:[Object(I.jsxs)("div",{className:"section_label",children:[Object(I.jsx)($.j,{})," Descri\xe7\xe3o do Produto"]}),Object(I.jsx)("div",{className:"prod_sinop_text",style:{whiteSpace:"pre-wrap"},children:C(pe.prod.meta_descri)})]})]})]})}()]})]})}),ze=(n(249),n(269)),_e=n(267),Pe=n(264),Ee=n(265),Ie=n(274),Be=n(277),Re=n(270),Fe=n(200),Le=n(272),De=ze.a.Step,We=function(){var e,t,n,c,a,o=Object(h.i)().prot,r=Object(h.h)(),s=Object(i.useContext)(B),d=s.siteCor,u=s.siteCorTexto,j=(s.fetchCart,s.siteFone),b=s.trackPurchase,p=Object(i.useState)(!0),x=Object(m.a)(p,2),g=x[0],v=x[1],y=Object(i.useState)(null),k=Object(m.a)(y,2),S=k[0],C=k[1],A=Object(i.useState)(0),_=Object(m.a)(A,2),E=_[0],R=_[1],F=Object(i.useState)([]),D=Object(m.a)(F,2),q=D[0],H=D[1],V=Object(i.useState)(null),Q=Object(m.a)(V,2),U=Q[0],X=Q[1],G=Object(i.useState)(null),K=Object(m.a)(G,2),Z=K[0],Y=K[1],ee=Object(i.useState)(null),te=Object(m.a)(ee,2),ne=te[0],ie=te[1],oe=Object(i.useState)(!1),re=Object(m.a)(oe,2),se=re[0],de=re[1],ue=Object(i.useState)(0),je=Object(m.a)(ue,2),pe=je[0],xe=je[1],he=Object(i.useState)(null),me=Object(m.a)(he,2),ge=me[0],fe=me[1],Oe=Object(i.useState)(!1),ve=Object(m.a)(Oe,2),ye=ve[0],ke=ve[1],Se=Object(i.useState)({cc_num:"",cc_name:"",cc_exp_m:"",cc_exp_y:"",cc_cvv:""}),Ce=Object(m.a)(Se,2),Ne=Ce[0],we=Ce[1],Ae=Object(i.useState)(1),We=Object(m.a)(Ae,2),Te=We[0],qe=We[1],Me=Object(i.useState)(!1),He=Object(m.a)(Me,2),Ve=He[0],Qe=He[1],Ue=function(){var e=N(j).replace(/\D/g,""),t=e.startsWith("55")?e:"55"+e;window.open("https://wa.me/".concat(t),"_blank")},Xe=null===S||void 0===S||null===(e=S.itens)||void 0===e?void 0:e.every((function(e){var t;
1return 3===w(null===(t=e.produto)||void 0===t?void 0:t.tipo)})),Ge=function(){z("getPedidoEtapas",{prot_ped:o},(function(e){if(e.pedido){var t,n;C(e.pedido),R(e.pedido.etapa-1);var i=null===(t=e.pedido.itens)||void 0===t?void 0:t.every((function(e){var t;return 3===w(null===(t=e.produto)||void 0===t?void 0:t.tipo)}));(null===(n=e.pedido.ende)||void 0===n?void 0:n.cep)&&!i&&(!(c=e.pedido.ende.cep)||String(c).length<8||Xe||z("calcularFrete",{prot_ped:o,cep:String(c).replace(/\D/g,"")},(function(e){H(e.frete||[])}),!1))}var c}),!1,(function(e){return v(e)}),(function(e){l.b.error("Erro ao carregar pedido."),r("/")}))};Object(i.useEffect)((function(){Ge()}),[o]),Object(i.useEffect)((function(){var e=null;return(ge&&"PIX"===ge.metodo||3===E&&S&&1!==S.status)&&(e=setInterval((function(){z("getPedidoEtapas",{prot_ped:o},(function(t){t.pedido&&1===t.pedido.status&&(clearInterval(e),fe(null),l.b.success("Pagamento confirmado com sucesso!"),Je(5,1))}),!0)}),4e3)),function(){e&&clearInterval(e)}}),[ge,E,null===S||void 0===S?void 0:S.status,o]);var Je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i={prot_ped:o,etapa:e,status:t,id_forma:n};3===e&&U&&(i.frete_vlr=U.valor,i.id_frete=U.id),z("avancarEtapa",i,(function(e){e.pedido&&(C(e.pedido),R(e.pedido.etapa-1),1===t&&(l.b.success("Pagamento confirmado!"),b(o,parseFloat(e.pedido.total_vlr)+parseFloat(e.pedido.frete_vlr||0),e.pedido.itens.map((function(e){var t,n;return{uuid:null===(t=e.produto)||void 0===t?void 0:t.uuid,descri:e.obs||(null===(n=e.produto)||void 0===n?void 0:n.descricao),valor:e.valor_un,qtd:e.qtd}})))))}),!1,(function(e){return v(e)}))},Ke=Object(i.useState)(!1),Ze=Object(m.a)(Ke,2),Ye=Ze[0],$e=Ze[1],et=Object(i.useState)({cep:"",uf:"",cidade:"",bairro:"",rua:"",nro:"",complemento:"",nome:"",email:"",cpf:"",celular:""}),tt=Object(m.a)(et,2),nt=tt[0],it=tt[1];Object(i.useEffect)((function(){var e=N(nt.cep).replace(/\D/g,"");8===e.length&&z("buscarCEP",{cep:e},(function(e){e.ende&&it((function(t){return Object(M.a)(Object(M.a)({},t),{},{rua:e.ende.rua||t.rua,bairro:e.ende.bairro||t.bairro,cidade:e.ende.cidade||t.cidade,uf:e.ende.uf||t.uf})}))}),!1)}),[nt.cep]);var ct=function(){it({cep:S.ende.cep||"",uf:S.ende.uf||"",cidade:S.ende.cidade||"",bairro:S.ende.bairro||"",rua:S.ende.rua||"",nro:S.ende.nro||"",complemento:S.ende.complemento||"",nome:S.user.nome||"",email:S.user.email||"",cpf:S.user.doc||"",celular:S.user.celular||""}),$e(!0)},at=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};de(!0),xe(0);var i=null,c=!1,a=Date.now(),r=2e3,s=setInterval((function(){var e=Date.now()-a,t=Math.min(e/r*95,95);c&&e>=r?(clearInterval(s),xe(100),setTimeout((function(){if(de(!1),i&&"PIX"===i.metodo)fe(i);else if(i&&"BOLETO"===i.metodo)fe(i);else if(i&&"CREDIT_CARD"===i.metodo&&"CONFIRMED"===i.status)l.b.success("Pagamento aprovado!"),fe(null),we({cc_num:"",cc_name:"",cc_exp_m:"",cc_exp_y:"",cc_cvv:""}),qe(1),ke(!1),Je(5,1);else if(i&&"CREDIT_CARD"===i.metodo&&"PENDING"===i.status)l.b.info("Pagamento em an\xe1lise pelo banco emissor."),fe(null),we({cc_num:"",cc_name:"",cc_exp_m:"",cc_exp_y:"",cc_cvv:""}),qe(1),ke(!1),Je(5,0);else if(i&&i.url)window.location.href=i.url;else{var e,t=(null===(e=i)||void 0===e?void 0:e.err_tx)||"Erro ao processar pagamento. Tente novamente.";l.b.error(t)}}),400)):xe(t)}),100);z("iniciaPagamento",Object(M.a)(Object(M.a)({prot_ped:o,id_forma:null===e||void 0===e?void 0:e.id,metodo:t},Ne),n),(function(e){i=e,c=!0}),!0,null,(function(e){c=!0,i={err_tx:(null===e||void 0===e?void 0:e.err_tx)||"Servidor indispon\xedvel ou erro na conex\xe3o."}}))};if(g)return Object(I.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"50px"},children:Object(I.jsx)(T.a,{size:"large"})});if(!S)return Object(I.jsx)(ae,{titulo:"Erro",voltar:!0,children:Object(I.jsxs)("div",{style:{textAlign:"center",padding:"50px"},children:[Object(I.jsx)("h3",{children:"Pedido n\xe3o encontrado."}),Object(I.jsx)("p",{children:"O protocolo informado pode estar incorreto ou voc\xea n\xe3o tem permiss\xe3o para acess\xe1-lo."}),Object(I.jsx)(le,{texto:"Voltar para a Loja",onClick:function(){return r("/")}})]})});var ot=parseFloat(S.total_vlr)+(U?parseFloat(U.valor):0),rt=3===S.status;return Object(I.jsxs)(ae,{titulo:"Checkout de Pedido",sub:o,voltar:!0,verFiltros:!1,children:[Object(I.jsxs)("div",{className:"checkout-container",children:[Object(I.jsxs)(ze.a,{current:E,className:"checkout-steps",size:"small",responsive:!1,style:{"--ant-primary-color":d},children:[Object(I.jsx)(De,{title:"Produtos",icon:Object(I.jsx)($.b,{})}),Object(I.jsx)(De,{title:"Entrega",icon:Object(I.jsx)($.m,{})}),Object(I.jsx)(De,{title:"Pagamento",icon:Object(I.jsx)($.o,{})}),Object(I.jsx)(De,{title:"Processando",icon:Object(I.jsx)($.h,{})}),Object(I.jsx)(De,{title:"Conclu\xeddo",icon:Object(I.jsx)($.d,{})})]}),Object(I.jsx)("div",{className:"checkout-content",children:rt?Object(I.jsx)(_e.a,{title:"Pedido Cancelado",className:"checkout-card",style:{textAlign:"center"},children:Object(I.jsxs)("div",{style:{padding:"20px"},children:[Object(I.jsx)("div",{style:{color:"#cf1322",fontSize:"24px",fontWeight:"bold"},children:"Este pedido foi cancelado."}),Object(I.jsx)("p",{style:{marginTop:"10px",color:"#666"},children:"N\xe3o \xe9 poss\xedvel prosseguir com o pagamento de um pedido cancelado."}),Object(I.jsx)("div",{className:"checkout-actions",style:{justifyContent:"center",marginTop:"20px"},children:Object(I.jsx)(le,{texto:"Ir para Meus Pedidos",onClick:function(){return r("/")}})})]})}):Object(I.jsxs)(I.Fragment,{children:[0===E&&Object(I.jsxs)(_e.a,{title:"Revise seus Produtos",className:"checkout-card",children:[Object(I.jsx)("div",{className:"checkout-items-list",children:null===(t=S.itens)||void 0===t?void 0:t.map((function(e,t){var n,i,c,a;return Object(I.jsxs)("div",{className:"checkout-item-card",children:[Object(I.jsx)("div",{className:"item-img",children:Object(I.jsx)(be,{prot:N(null===(n=e.produto)||void 0===n?void 0:n.img).length>10?"https://pub-a3d9416779ae4b158f887d962e20597e.r2.dev/"+(null===(i=e.produto)||void 0===i?void 0:i.img):""})}),Object(I.jsxs)("div",{className:"item-details",children:[Object(I.jsx)("div",{className:"item-name",children:e.obs||(null===(c=e.produto)||void 0===c?void 0:c.descricao)||"Produto Sem Nome"}),Object(I.jsxs)("div",{className:"item-subtext",children:["C\xf3digo de Barras: ",e.gtin||(null===(a=e.produto)||void 0===a?void 0:a.gtin)||"-"]}),Object(I.jsxs)("div",{className:"item-subtext",children:[parseInt(e.qtd,10)," unidade(s)"]})]}),Object(I.jsxs)("div",{className:"item-price-info",children:[Object(I.jsx)("div",{className:"item-total",children:P(parseFloat(e.valor_un)*parseFloat(e.qtd))}),Object(I.jsxs)("div",{className:"item-un",children:["Un unit.: ",P(parseFloat(e.valor_un))]})]})]},t)}))}),Object(I.jsxs)("div",{className:"checkout-total-footer",children:[Object(I.jsx)("span",{className:"total-label",children:"Subtotal do Pedido:"}),Object(I.jsx)("span",{className:"total-value",children:P(S.total_vlr)})]}),Object(I.jsx)("div",{className:"checkout-actions",children:Object(I.jsx)(le,{texto:"Confirmar Produtos",onClick:function(){return Je(2)},fundo:d,cor:u,height:"48px",width:"240px"})})]}),1===E&&Object(I.jsx)(_e.a,{title:"Dados de Entrega",className:"checkout-card",extra:!Ye&&Object(I.jsx)(le,{texto:"Atualizar meus dados",onClick:ct,height:"30px"}),children:Ye?Object(I.jsxs)("div",{className:"edit-address-form",children:[Object(I.jsxs)(Pe.a,{gutter:[16,16],children:[Object(I.jsx)(Ee.a,{span:24,children:Object(I.jsx)("div",{style:{fontWeight:"bold",marginBottom:"5px",color:d},children:"Dados Pessoais"})}),Object(I.jsx)(Ee.a,{span:12,children:Object(I.jsx)(ce,{titulo:"Nome",value:nt.nome,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{nome:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:12,children:Object(I.jsx)(ce,{titulo:"Email",value:nt.email,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{email:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:8,children:Object(I.jsx)(ce,{titulo:"CPF",value:nt.cpf,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{cpf:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:8,children:Object(I.jsx)(ce,{titulo:"Celular",value:nt.celular,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{celular:e}))},mask:["(",/\d/,/\d/,")"," ",/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],width:"100%"})}),Object(I.jsx)(Ee.a,{span:24,children:Object(I.jsx)("div",{style:{fontWeight:"bold",marginBottom:"5px",marginTop:"10px",color:d},children:"Endere\xe7o de Entrega"})}),Object(I.jsx)(Ee.a,{span:8,children:Object(I.jsx)(ce,{titulo:"CEP",value:nt.cep,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{cep:e}))},mask:[/\d/,/\d/,/\d/,/\d/,/\d/,"-",/\d/,/\d/,/\d/],width:"100%"})}),Object(I.jsx)(Ee.a,{span:12,children:Object(I.jsx)(ce,{titulo:"Rua",value:nt.rua,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{rua:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:4,children:Object(I.jsx)(ce,{titulo:"N\xba",value:nt.nro,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{nro:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:10,children:Object(I.jsx)(ce,{titulo:"Bairro",value:nt.bairro,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{bairro:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:10,children:Object(I.jsx)(ce,{titulo:"Cidade",value:nt.cidade,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{cidade:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:4,children:Object(I.jsx)(ce,{titulo:"UF",value:nt.uf,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{uf:e}))},width:"100%"})}),Object(I.jsx)(Ee.a,{span:24,children:Object(I.jsx)(ce,{titulo:"Complemento",value:nt.complemento,setValue:function(e){return it(Object(M.a)(Object(M.a)({},nt),{},{complemento:e}))},width:"100%"})})]}),Object(I.jsxs)("div",{className:"checkout-actions",style:{marginTop:"20px"},children:[Object(I.jsx)(le,{texto:"Cancelar",onClick:function(){return $e(!1)},fundo:"transparent",borda:!1}),Object(I.jsx)(le,{texto:"Salvar Endere\xe7o",onClick:function(){z("salvarPerfil",Object(M.a)(Object(M.a)({},nt),{},{cep:String(nt.cep).replace(/\D/g,""),cpf:String(nt.cpf).replace(/\D/g,""),celular:String(nt.celular).replace(/\D/g,"")}),(function(e){l.b.success("Dados atualizados!"),$e(!1),Ge()}),!1,(function(e){return v(e)}))},fundo:d,cor:u})]})]}):Object(I.jsxs)("div",{className:"delivery-summary",children:[Object(I.jsxs)("div",{className:"delivery-section",children:[Object(I.jsxs)("div",{className:"section-header",children:[Object(I.jsx)($.b,{}),Object(I.jsx)("span",{children:"Dados de Identifica\xe7\xe3o"})]}),Object(I.jsxs)("div",{className:"data-grid",children:[Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"Nome Completo"}),Object(I.jsx)("span",{children:S.user.nome})]}),Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"CPF / Documento"}),Object(I.jsx)("span",{children:S.user.doc})]}),Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"E-mail de C
1ontato"}),Object(I.jsx)("span",{children:S.user.email})]}),Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"WhatsApp / Celular"}),Object(I.jsx)("span",{children:N(S.user.celular).replace(/\D/g,"").replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3")})]})]})]}),Object(I.jsxs)("div",{className:"delivery-section",children:[Object(I.jsxs)("div",{className:"section-header",children:[Object(I.jsx)($.m,{}),Object(I.jsx)("span",{children:"Local de Entrega"})]}),S.ende.id?Object(I.jsxs)("div",{className:"data-grid",children:[Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"Logradouro / Rua"}),Object(I.jsxs)("span",{children:[S.ende.rua,", ",S.ende.nro]})]}),Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"Bairro"}),Object(I.jsx)("span",{children:S.ende.bairro})]}),Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"Cidade / UF"}),Object(I.jsxs)("span",{children:[S.ende.cidade," - ",S.ende.uf]})]}),Object(I.jsxs)("div",{className:"data-item",children:[Object(I.jsx)("label",{children:"CEP"}),Object(I.jsx)("span",{children:S.ende.cep})]}),S.ende.complemento&&Object(I.jsxs)("div",{className:"data-item",style:{gridColumn:"span 2"},children:[Object(I.jsx)("label",{children:"Complemento"}),Object(I.jsx)("span",{children:S.ende.complemento})]})]}):Object(I.jsxs)("div",{style:{textAlign:"center",padding:"20px",background:"#fff1f0",borderRadius:"12px"},children:[Object(I.jsx)("div",{style:{color:"#cf1322",fontWeight:"bold"},children:"Endere\xe7o n\xe3o localizado!"}),Object(I.jsx)("p",{style:{margin:"8px 0",fontSize:"13px"},children:"Voc\xea precisa cadastrar um endere\xe7o para prosseguir."}),Object(I.jsx)(le,{texto:"Cadastrar Agora",onClick:ct,height:"36px"})]})]}),S.ende.id&&!Xe&&Object(I.jsxs)("div",{className:"delivery-section full-width",children:[Object(I.jsxs)("div",{className:"section-header",children:[Object(I.jsx)($.o,{}
1),Object(I.jsx)("span",{children:"Op\xe7\xf5es de Envio"})]}),q.length>0?Object(I.jsx)("div",{className:"frete-selection-container",children:Object(I.jsx)(Ie.a.Group,{onChange:function(e){return X(e.target.value)},value:U,className:"frete-radio-group",children:q.map((function(e,t){return Object(I.jsx)(Ie.a.Button,{value:e,className:"frete-option-button",children:Object(I.jsxs)("div",{className:"frete-option-content",children:[Object(I.jsxs)("div",{className:"frete-option-info",children:[Object(I.jsx)("span",{className:"frete-name",children:e.nome}),Object(I.jsxs)("span",{className:"frete-prazo",children:["Entrega em ",e.prazo]})]}),Object(I.jsx)("div",{className:"frete-option-price",children:e.valor<=0?Object(I.jsx)("span",{className:"gratis",children:"Gr\xe1tis"}):Object(I.jsx)("span",{className:"valor",children:P(e.valor)})})]})},t)}))})}):Object(I.jsxs)("div",{style:{textAlign:"center",padding:"20px",color:"#888",background:"#f8fafc",borderRadius:"12px"},children:[Object(I.jsx)(T.a,{size:"small",style:{marginRight:"10px"}}),S.ende.cep?"Calculando melhores op\xe7\xf5es de frete...":"Aguardando defini\xe7\xe3o do endere\xe7o."]}),U&&Object(I.jsxs)("div",{className:"checkout-total-footer",style:{marginTop:"20px"},children:[Object(I.jsx)("span",{className:"total-label",children:"Total com Entrega:"}),Object(I.jsx)("span",{className:"total-value",style:{color:d},children:P(ot)})]})]}),Xe&&Object(I.jsxs)("div",{style:{marginTop:"20px",padding:"15px",background:"#f0f9ff",border:"1px solid #bae6fd",borderRadius:"12px",textAlign:"center"},children:[Object(I.jsx)("div",{style:{color:"#0369a1",fontWeight:"bold"},children:"Acesso Digital Confirmado"}),Object(I.jsx)("p",{style:{margin:"5px 0 0",fontSize:"13px",color:"#0c4a6e"},children:"Este pedido cont\xe9m apenas produtos digitais. O acesso ser\xe1 liberado ap\xf3s o pagamento."})]}),Object(I.jsxs)("div",{className:"help-box",onClick:Ue,children:[Object(I.jsx)(L.q,{size:22,color:"#25D366"}),Object(I.jsxs)("span",{children:["Precisa de ajuda? ",Object(I.jsx)("strong",{children:"Chame no WhatsApp"})]})]}),Object(I.jsxs)("div",{className:"checkout-actions",children:[Object(I.jsx)(le,{texto:"Voltar",onClick:function(){return Je(1)},fundo:"transparent",borda:!1}),Object(I.jsx)(W.a,{title:S.ende.id&&(U||Xe)?"":"Verifique seus dados para seguir",children:Object(I.jsx)("div",{className:S.ende.id&&(U||Xe)?"btn-pulse-anim":"",children:Object(I.jsx)(le,{texto:"Confirmar Entrega",onClick:function(){return Je(3)},disabled:!S.ende.id||!U&&!Xe,fundo:d,cor:u})})})]})]})}),2===E&&Object(I.jsxs)(_e.a,{title:"Pagamento",className:"checkout-card",children:[Object(I.jsxs)("div",{style:{textAlign:"right",fontSize:"18px",fontWeight:"bold",marginBottom:"20px"},children:["Valor a Pagar: ",P(ot)]}),Object(I.jsx)(Be.a,{}),Object(I.jsx)("p",{children:"Escolha a forma de pagamento abaixo:"}),Object(I.jsx)("div",{className:"payment-options-list",children:(null===(n=S.pag_formas)||void 0===n?void 0:n.length)>0?S.pag_formas.map((function(e){return Object(I.jsx)(_e.a,{className:"payment-method-card",onClick:function(){1===e.tipo?Je(4,null,e.id):4===e.tipo||2===e.tipo?Y(e):3!==e.tipo&&5!==e.tipo||at(e)},hoverable:!0,children:Object(I.jsxs)("div",{className:"payment-card-content",children:[Object(I.jsx)("div",{className:"payment-icon-box",children:2===e.tipo?Object(I.jsx)("img",{src:"data:image/webp;base64,UklGRn4JAABXRUJQVlA4IHIJAAAQJgCdASp3AHIAPnUYnU6koSSkmTCQDoliAM8cR3xnJG8e+D+eTOL15eXPbd6SPMA/T/p1eMz6yXnM+kB1QHPse07+29idfoPDXrKbnN8e0n+RfePSN2K8AL17/mt4Iyd6jMyNUnj2/2/qE/+f+p9CX0r+y/s5+mF7H/2b9nb9rmY7Ohf/pOyZ9vgcdGegcyZ5n/MJz1D6GEzMn9iGOicUib4tnvCbbFPSINLRWFpfLW2+X8dbg+XS16Py57mXCaqesPSBGENObsFJiztpiDPxy/CpLk4mDQ0D9tutk9lNjxu5U9T2PXA2jqg7f4kA8mfSANR14c06xgpbWuPnj8GEbljSRf618cg9Mm46Nz2ubGkFt2xLo0vQVQcCVv3xsMWGHR+8flGDTbGA4q6PDAUpJ0/61mGUsUwAAP7+Vdv0JSBnRCI0DAYnO4V2vfdNaWXlDRy75XKPsEmnU5nAr1f2JsX2BGwK/v/Ma86XdTHZq5BICId9fNBEhN+e8fpNAyg+r1s7Ao0spWQU/A/fvnNuLy0NqE91JfteSi44K7dwAKD5AxcP8IzKmJxPW+Agin5J2X66XuHsfOMakL88eMWYOJ93vhheY1X7WG+zlyp8EZZdcGnmgieDVKu+UHtp3AG2e44U+LYEgLTcWC8soBozc0lUyp49xqFfvR2U0U+Wx7mw+N0tKYFuZY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tna0OgVgra18OPuwv78uL1suacD7/4De7T8PHmIP3Rwj3LbgZfayIzIATId4r/jcbBk3g5DWgDuRh1L2N/q0EUxKVO7352tYqOO+IX9L4Ear/Ka6ityWKqwAPiXsF2pHhnka30xHGq+f18nKWMaHX6MP9+X9W36ep6V/K19fXjhPgjptN34XaabrJGCoEiyR96JEqWvQD66kb+dGX5i+rlY8Y+G5D9Hm/8SfEwzfMUEwYmA6TnncYx/1LZ2FJQmN0LCKe/zvzhuXJYDLPHzvY+/+QJcKYu0EA5mskx2J289/4SrT7dsmckTG8i5B/sghiJTzFMaaRTJHdQx8E3FVwEXJA4KSTxBH+/7tKVwPZoJgk2JXco0JuGHlIxq8czA/nMb3cWJcFPjGyWCQJsO7bMiv662LXE+Kx9o2W5fiDEAMboUAl2oczlPoHVKPqF+gaidTpPQOKo5afvVRzNSemgKZP9UURVg+nXLzGKWiclojJk6AgMZwmoH8Ye2MGCONu0+I6Fs3jmci48tZYbnmeJJWJYXcVB59Oc9V5Ul3RgaBQcw4bdph2LuJv5lDF4dZQgeMKen8dMGoub+2PoNY1PyH7tYY+Lj5H3DFHdK1GYvydoVmWYE6PS3xoSeuta7teajT6JM3529eUjp9VJt4GSe4wQookqRHsIbUOcHiw74CmNy6dUOotbenD6VBBQqmjjKUJ+WcSEhf63JVvk5L4aCW6R/9ImBXMQZg7mAtgPixDwRMwc+k/3cYrePL7ACWRuVbuAEqJ64uQJCPhjbwiOEUZUdy99NFiP1WfoLSksAGJYAAAAAA==",alt:"Stone",className:"payment-bank-logo"}):4===e.tipo?Object(I.jsx)("img",{src:"https://ajuda.asaas.com/hc/theming_assets/01HZRPB38G749E7X94098T2172",alt:"Asaas",className:"payment-bank-logo",style:{objectFit:"contain",width:"50px",height:"20px"}}):5===e.tipo?Object(I.jsx)("img",{src:"https://http2.mlstatic.com/frontend-assets/ui-navigation/5.18.9/mercadopago/[email protected]",alt:"Mercado Pago",className:"payment-bank-logo",style:{objectFit:"contain",width:"60px",height:"20px"}}):Object(I.jsx)($.c,{})}),Object(I.jsxs)("div",{className:"payment-info",children:[Object(I.jsx)("div",{className:"payment-name",children:e.nome}),Object(I.jsx)("div",{className:"payment-obs",children:e.obs})]}),Object(I.jsxs)("div",{className:"payment-action",children:[Object(I.jsx)("span",{children:2===e.tipo?"PagSeguro":3===e.tipo?"Pagar.me":4===e.tipo?"Asaas":5===e.tipo?"Mercado Pago":"Pagar agora"}),Object(I.jsx)($.a,{style:{transform:"rotate(180deg)",fontSize:"12px",marginLeft:"8px"}})]})]})},e.id)})):Object(I.jsx)("div",{style:{textAlign:"center",color:"#999",padding:"20px"},children:"Nenhuma forma de pagamento dispon\xedvel para este site."})}),Object(I.jsxs)("div",{className:"help-box",onClick:Ue,children:[Object(I.jsx)(L.q,{size:22,color:"#25D366"}),Object(I.jsxs)("span",{children:["D\xfavida no pagamento? ",Object(I.jsx)("strong",{children:"Chame no WhatsApp"})]})]}),Object(I.jsx)(Be.a,{}
1),Object(I.jsx)("div",{className:"checkout-actions",children:Object(I.jsx)(le,{texto:"Voltar",onClick:function(){return Je(2)},fundo:"transparent",borda:!1})})]}),3===E&&Object(I.jsxs)(_e.a,{title:"Processando seu Pedido",className:"checkout-card",style:{textAlign:"center"},children:[Object(I.jsx)(T.a,{size:"large",style:{margin:"20px 0"}}),Object(I.jsx)("p",{children:"Estamos aguardando a confirma\xe7\xe3o do seu pagamento..."}),Object(I.jsxs)("div",{className:"checkout-actions",style:{justifyContent:"center",marginTop:"20px",gap:"15px"},children:[1!==S.status&&Object(I.jsx)(le,{texto:"Alterar Forma de Pagamento",onClick:function(){return Je(3)},fundo:d,cor:u}),Object(I.jsx)(le,{texto:"Ver Detalhes do Pedido",onClick:function(){return r("/pedido/".concat(o))},fundo:"transparent"})]})]}),4===E&&Object(I.jsxs)(_e.a,{title:"Pedido Realizado!",className:"checkout-card",style:{textAlign:"center"},children:[Object(I.jsx)($.d,{size:60,color:"#52c41a"}),Object(I.jsx)("h2",{style:{marginTop:"15px"},children:"Tudo certo!"}),Object(I.jsxs)("p",{children:["Seu pedido ",Object(I.jsx)("strong",{children:o})," foi confirmado e j\xe1 estamos preparando para o envio."]}),Object(I.jsxs)("p",{children:["Status: ",1===S.status?"Pago":"Aguardando"]}),Object(I.jsxs)("div",{className:"checkout-actions",style:{justifyContent:"center",gap:"10px"},children:[Object(I.jsx)(le,{texto:"Ver Detalhes do Pedido",onClick:function(){return r("/pedido/".concat(o))}}),Object(I.jsx)(le,{texto:"Ir para a Loja",onClick:function(){return r("/")},fundo:"transparent"})]})]})]})})]}),Object(I.jsx)(Re.a,{open:se,footer:null,closable:!1,centered:!0,className:"payment-loading-modal",bodyStyle:{padding:"30px"},children:Object(I.jsxs)("div",{style:{textAlign:"center"},children:[Object(I.jsx)("div",{className:"loading-spinner-wrapper",style:{marginBottom:"20px"},children:Object(I.jsx)(T.a,{size:"large"})}),Object(I.jsx)("h3",{style:{fontSize:"18px",fontWeight:"bold",marginBottom:"10px"},children:"Iniciando Pagamento Seguro"}),Object(I.jsx)("p",{style:{color:"#666",marginBottom:"20px"},children:"Estamos processando seu pedido e estabelecendo uma conex\xe3o criptografada com a operadora. Aguarde alguns instantes."}),Object(I.jsx)(Fe.a,{percent:Math.floor(pe),status:"active",strokeColor:d,showInfo:!1}),Object(I.jsx)("div",{style:{marginTop:"12px",fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Isso pode levar alguns segundos. N\xe3o feche ou atualize esta p\xe1gina."})]})}),Object(I.jsx)(Re.a,{open:!!Z,onCancel:function(){return Y(null)},title:"Selecione a Forma de Pagamento",footer:null,centered:!0,children:Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"15px",marginTop:"20px",marginBottom:"10px"},children:[Object(I.jsx)(_e.a,{className:"payment-method-card",hoverable:!0,onClick:function(){ie(Z),Y(null),ke(!0)},children:Object(I.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"15px"},children:[Object(I.jsx)($.o,{size:28,color:d}),Object(I.jsx)("span",{style:{fontSize:"16px",fontWeight:"500"},children:"Cart\xe3o de Cr\xe9dito"})]})}),Object(I.jsx)(_e.a,{className:"payment-method-card",hoverable:!0,onClick:function(){Y(null),at(Z,"PIX")},children:Object(I.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"15px"},children:[Object(I.jsx)("img",{src:"https://logospng.org/download/pix/logo-pix-icone-1024.png",alt:"Pix",style:{width:"28px",height:"28px",objectFit:"contain"}}),Object(I.jsx)("span",{style:{fontSize:"16px",fontWeight:"500"},children:"PIX"})]})}),Object(I.jsx)(_e.a,{className:"payment-method-card",hoverable:!0,onClick:function(){Y(null),at(Z,"BOLETO")},children:Object(I.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"15px"},children:[Object(I.jsx)($.b,{size:28,color:d}),Object(I.jsx)("span",{style:{fontSize:"16px",fontWeight:"500"},children:"Boleto Banc\xe1rio"})]})})]})}),Object(I.jsx)(Re.a,{open:ye,onCancel:function(){return ke(!1)},title:"Pagamento com Cart\xe3o",footer:null,centered:!0,className:"checkout-cc-modal",bodyStyle:{padding:"24px"},children:Object(I.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"16px",marginTop:"10px"},children:[Object(I.jsxs)("div",{className:"cc-field",children:[Object(I.jsx)("label",{style:{fontSize:"13px",fontWeight:"600",color:"#555",marginBottom:"6px",display:"block"},children:"N\xfamero do Cart\xe3o"}),Object(I.jsxs)("div",{style:{position:"relative"},children:[Object(I.jsx)(Le.a,{size:"large",placeholder:"0000 0000 0000 0000",value:Ne.cc_num,maxLength:19,onCh
1ange:function(e){var t=e.target.value.replace(/\D/g,"");t=t.replace(/(\d{4})/g,"$1 ").trim(),we(Object(M.a)(Object(M.a)({},Ne),{},{cc_num:t}))},style:{paddingRight:"40px",fontFamily:"monospace",fontSize:"16px"}}),Ne.cc_num&&Ne.cc_num.replace(/\D/g,"").length>=1&&function(){var e=Ne.cc_num.replace(/\D/g,""),t=null;return/^4/.test(e)?t="https://upload.wikimedia.org/wikipedia/commons/4/41/Visa_Logo.png":/^5[1-5]/.test(e)?t="https://upload.wikimedia.org/wikipedia/commons/b/b7/MasterCard_Logo.svg":/^3[47]/.test(e)?t="https://upload.wikimedia.org/wikipedia/commons/f/fa/American_Express_logo_%282018%29.svg":/^((5067)|(4576)|(4011))/.test(e)?t="https://upload.wikimedia.org/wikipedia/commons/f/f4/Elo_cart%C3%A3o.svg":/^3841/.test(e)&&(t="https://upload.wikimedia.org/wikipedia/commons/a/ab/Hipercard_logo.svg"),t?Object(I.jsx)("img",{src:t,alt:"brand",style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",height:"20px",objectFit:"contain"}}):Object(I.jsx)($.o,{style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",fontSize:"20px",color:"#999"}})}()]})]}),Object(I.jsxs)("div",{className:"cc-field",children:[Object(I.jsx)("label",{style:{fontSize:"13px",fontWeight:"600",color:"#555",marginBottom:"6px",display:"block"},children:"Nome do Titular"}),Object(I.jsx)(Le.a,{size:"large",placeholder:"Como impresso no cart\xe3o",value:Ne.cc_name,onChange:function(e){return we(Object(M.a)(Object(M.a)({},Ne),{},{cc_name:e.target.value.toUpperCase()}))}})]}),Object(I.jsxs)(Pe.a,{gutter:16,children:[Object(I.jsxs)(Ee.a,{span:14,children:[Object(I.jsx)("label",{style:{fontSize:"13px",fontWeight:"600",color:"#555",marginBottom:"6px",display:"block"},children:"Validade"}),Object(I.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[Object(I.jsx)(Le.a,{size:"large",placeholder:"MM",maxLength:2,value:Ne.cc_exp_m,onChange:function(e){return we(Object(M.a)(Object(M.a)({},Ne),{},{cc_exp_m:e.target.value.replace(/\D/g,"")}))},style:{textAlign:"center"}}),Object(I.jsx)("span",{style:{fontSize:"20px",color:"#ccc",lineHeight:"40px"},children:"/"}),Object(I.jsx)(Le.a,{size:"large",placeholder:"AAAA",maxLength:4,value:Ne.cc_exp_y,onChange:function(e){return we(Object(M.a)(Object(M.a)({},Ne),{},{cc_exp_y:e.target.value.replace(/\D/g,"")}))},style:{textAlign:"center"}})]})]}),Object(I.jsxs)(Ee.a,{span:10,children:[Object(I.jsx)("label",{style:{fontSize:"13px",fontWeight:"600",color:"#555",marginBottom:"6px",display:"block"},children:"CVV"}),Object(I.jsx)(Le.a,{size:"large",placeholder:"123",maxLength:4,value:Ne.cc_cvv,onChange:function(e){return we(Object(M.a)(Object(M.a)({},Ne),{},{cc_cvv:e.target.value.replace(/\D/g,"")}))},style:{textAlign:"center",fontFamily:"monospace",fontSize:"16px"}})]})]}),Object(I.jsxs)("div",{className:"cc-field",children:[Object(I.jsx)("label",{style:{fontSize:"13px",fontWeight:"600",color:"#555",marginBottom:"6px",display:"block"},children:"Op\xe7\xf5es de Parcelamento"}),Object(I.jsx)(J.a,{size:"large",style:{width:"100%"},value:Te,onChange:function(e){return qe(e)},children:Array.from({length:12},(function(e,t){return t+1})).map((function(e){var t=ot/e;return Object(I.jsxs)(J.a.Option,{value:e,children:[e,"x de ",P(t)," ",1===e?"(\xe0 vista)":"sem juros"]},e)}))})]}),Object(I.jsx)("div",{style:{marginTop:"24px"},children:Object(I.jsx)(le,{texto:Ve?"Processando Cart\xe3o...":"Confirmar Pagamento",disabled:Ve,onClick:Object(O.a)(f.a.mark((function e(){var t,n,i;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ne.cc_num&&Ne.cc_name&&Ne.cc_exp_m&&Ne.cc_exp_y&&Ne.cc_cvv){e.next=3;break}return l.b.error("Preencha todos os campos do cart\xe3o."),e.abrupt("return");case 3:if(2!==(null===(t=ne||Z)||void 0===t?void 0:t.tipo)){e.next=23;break}return Qe(!0),e.prev=6,e.next=9,new Promise((function(e,t){if(window.PagSeguro)e(window.PagSeguro);else{var n=document.getElementById("pagseguro-sdk");if(n)return n.onload=function(){return e(window.PagSeguro)},void(n.onerror=function(){return t(new Error("Erro ao carregar SDK PagBank"))});var i=document.createElement("script");i.id="pagseguro-sdk",i.src="https://assets.pagseguro.com.br/checkout-sdk-js/rc/dist/browser/pagseguro.min.js",i.onload=function(){return e(window.PagSeguro)},i.onerror=function(){return t(new Error("Erro ao carregar SDK PagBank"))},document.body.appendChild(i)}}));case 9:if((n=e.sent)&&n.encryptCard){e.next=14;break}return l.b.error("Erro ao inicializar SDK de seguran\xe7a do PagBank."),Qe(!1),e.abrupt("return");case 14:z("getPagSeguroPublicKey",{id_forma:t.id},(function(e){var i=null===e||void 0===e?void 0:e.public_key;if(!i)return l.b.error("N\xe3o foi poss\xedvel obter chave p\xfablica do PagBank."),void Qe(!1);var c=2===Ne.cc_exp_y.trim().length?"20".concat(Ne.cc_exp_y.trim()):Ne.cc_exp_y.trim(),a=n.encryptCard({publicKey:i,holder:Ne.cc_name.trim(),number:Ne.cc_num.replace(/\D/g,""),expMonth:Ne.cc_exp_m.trim().padStart(2,"0"),expYear:c,securityCode:Ne.cc_cvv.trim()});if(null===a||void 0===a?void 0:a.hasErrors){var o,r=null===(o=a.errors)||void 0===o?void 0:o.map((function(e){return e.message||e.code})).join(", ");return l.b.error("Dados do cart\xe3o inv\xe1lidos: ".concat(r||"Verifique n\xfamero, validade e CVV")),void Qe(!1)}var s=null===a||void 0===a?void 0:a.encryptedCard;if(!s)return l.b.error("Falha ao criptografar dados do cart\xe3o com seguran\xe7a."),void Qe(!1);Qe(!1),ke(!1),Y(null),at(t,"CREDIT_CARD",{card_encrypted:s,installments:Te})}),!0,null,(function(e){Qe(!1),l.b.error((null===e||void 0===e?void 0:e.err_tx)||"Erro ao obter chave p\xfablica do PagBank.")})),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(6),Qe(!1),l.b.error("Falha ao carregar componente seguro do PagBank.");case 21:e.next=27;break;case 23:ke(!1),i=ne||Z,Y(null),at(i,"CREDIT_CARD",{installments:Te});case 27:case"end":return e.stop()}}),e,null,[[6,17]])}))),block:!0})})]})}),Object(I.jsx)(Re.a,{open:!!ge,onCancel:function(){fe(null),Ge()}
1,title:"Conclua seu Pagamento",footer:null,centered:!0,children:Object(I.jsxs)("div",{style:{textAlign:"center",padding:"20px"},children:["PIX"===(null===ge||void 0===ge?void 0:ge.metodo)&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("h3",{children:"Escaneie o QR Code abaixo"}),Object(I.jsx)("div",{style:{margin:"20px 0"},children:Object(I.jsx)("img",{src:(null===(c=ge.pix_qr)||void 0===c?void 0:c.startsWith("data:"))||(null===(a=ge.pix_qr)||void 0===a?void 0:a.startsWith("http"))?ge.pix_qr:"data:image/png;base64,".concat(ge.pix_qr),alt:"PIX QR Code",style:{width:"200px",height:"200px",objectFit:"contain"}})}),Object(I.jsx)(ce,{label:"Pix Copia e Cola",value:ge.pix_copia_cola,readOnly:!0}),Object(I.jsx)("div",{style:{marginTop:"20px"},children:Object(I.jsx)(le,{texto:"Copiar C\xf3digo",onClick:function(){navigator.clipboard.writeText(ge.pix_copia_cola),l.b.success("C\xf3digo copiado!")},fundo:"transparent",borda:!0})})]}),"BOLETO"===(null===ge||void 0===ge?void 0:ge.metodo)&&Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)("h3",{children:"Seu boleto foi gerado"}),Object(I.jsx)("p",{style:{marginBottom:"20px",color:"#666"},children:"Clique no bot\xe3o abaixo para abrir o boleto e realizar o pagamento."}),ge.boleto_url&&Object(I.jsx)(le,{texto:"Abrir Boleto Banc\xe1rio",onClick:function(){return window.open(ge.boleto_url,"_blank")}}),ge.barcode&&Object(I.jsxs)("div",{style:{marginTop:"20px",textAlign:"left"},children:[Object(I.jsx)(ce,{label:"Linha Digit\xe1vel / C\xf3digo de Barras",value:ge.barcode,readOnly:!0}),Object(I.jsx)("div",{style:{marginTop:"10px",textAlign:"center"},children:Object(I.jsx)(le,{texto:"Copiar Linha Digit\xe1vel",onClick:function(){navigator.clipboard.writeText(ge.barcode),l.b.success("Linha digit\xe1vel copiada!")},fundo:"transparent",borda:!0})})]})]}),Object(I.jsx)("div",{style:{marginTop:"25px"},children:Object(I.jsx)(le,{texto:"Voltar para Pedido",onClick:function(){fe(null),Je(5,0)}})})]})})]})},Te=(n(250),n(275)),qe=n(276),Me=function(){var e,t,n,c,a,o,r,s,d=Object(h.i)().prot,u=Object(h.h)(),j=Object(i.useState)(!0),b=Object(m.a)(j,2),p=b[0],x=b[1],g=Object(i.useState)(null),f=Object(m.a)(g,2),O=f[0],v=f[1],y=function(){z("getPedidoEtapas",{prot_ped:d},(function(e){e.pedido&&v(e.pedido)}),!1,(function(e){return x(e)}),(function(e){l.b.error("Erro ao carregar detalhes do pedido."),u("/")}))};if(Object(i.useEffect)((function(){y()}),[d]),p)return Object(I.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"50px"},children:Object(I.jsx)(T.a,{size:"large"})});if(!O)return Object(I.jsx)(ae,{titulo:"Erro",voltar:!0,children:Object(I.jsxs)("div",{style:{textAlign:"center",padding:"50px"},children:[Object(I.jsx)("h3",{children:"Pedido n\xe3o encontrado."}),Object(I.jsx)(le,{texto:"Voltar para a Loja",onClick:function(){return u("/")}})]})});var k=1===O.status,S=3===O.status;return Object(I.jsx)(ae,{titulo:"Detalhes do Pedido",sub:d,voltar:!0,verFiltros:!1,children:Object(I.jsx)("div",{className:"pedido-detalhe-container",children:Object(I.jsxs)(Pe.a,{gutter:[20,20],children:[Object(I.jsxs)(Ee.a,{xs:24,md:16,children:[Object(I.jsxs)(_e.a,{className:"detalhe-card",children:[Object(I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[Object(I.jsxs)("div",{children:[Object(I.jsxs)("h2",{style:{margin:0},children:["Pedido #",O.nro||d]}),Object(I.jsxs)("span",{style:{color:"#888"},children:["Realizado em ",O.data," \xe0s ",O.hora]})]}),Object(I.jsx)("div",{className:"status-badge ".concat(S?"cancelado":k?"concluido":"aguardando"),children:S?"Pedido Cancelado":k?"Pagamento Confirmado":"Aguardando Pagamento"})]}),Object(I.jsxs)(Be.a,{orientation:"left",children:[Object(I.jsx)($.b,{style:{verticalAlign:"middle",marginRight:"5px"}})," Itens do Pedido"]}),Object(I.jsx)(Te.a,{itemLayout:"horizontal",dataSource:O.itens,renderItem:function(e){var t,n,i,c,a;return Object(I.jsx)(Te.a.Item,{extra:Object(I.jsx)("strong",{children:P(parseFloat(e.valor_un)*parseFloat(e.qtd))}),children:Object(I.jsx)(Te.a.Item.Meta,{avatar:Object(I.jsx)("div",{style:{width:"60px",height:"60px"},children:Object(I.jsx)(be,{prot:String((null===(t=e.produto)||void 0===t?void 0:t.img)||"")})}),title:Object(I.jsxs)("div",{children:[e.obs||(null===(n=e.produto)||void 0===n?void 0:n.descricao),k&&3===w(null===(i=e.produto)||void 0===i?void 0:i.tipo)&&(null===(c=e.produto)||void 0===c?void 0:c.aux_f)&&Object(I.jsx)("div",{style:{marginTop:"5px"},children:Object(I.jsxs)("a",{href:e.produto.aux_f,target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",fontSize:"13px",display:"flex",alignItems:"center",gap:"4px"},children:[Object(I.jsx)($.k,{size:16})," Acessar Produto Digital"]})})]}),description:"GTIN: ".concat(e.gtin||(null===(a=e.produto)||void 0===a?void 0:a.gtin)," | Qtd: ").concat(parseInt(e.qtd,10)," x ").concat(P(parseFloat(e.valor_un)))})})}})]}),Object(I.jsx)(_e.a,{title:Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)($.m,{style:{marginRight:"8px"}})," Endere\xe7o de Entrega"]}),className:"detalhe-card",children:Object(I.jsxs)(qe.b,{bordered:!0,column:1,size:"small",children:[Object(I.jsx)(qe.b.Item,{label:"Destinat\xe1rio",children:null===(e=O.user)||void 0===e?void 0:e.nome}),Object(I.jsxs)(qe.b.Item,{label:"Endere\xe7o",children:[null===(t=O.ende)||void 0===t?void 0:t.rua,", ",null===(n=O.ende)||void 0===n?void 0:n.nro,(null===(c=O.ende)||void 0===c?void 0:c.complemento)&&" - ".concat(O.ende.complemento),Object(I.jsx)("br",{}),null===(a=O.ende)||void 0===a?void 0:a.bairro," - ",null===(o=O.ende)||void 0===o?void 0:o.cidade,"/",null===(r=O.ende)||void 0===r?void 0:r.uf,Object(I.jsx)("br",{}),"CEP: ",null===(s=O.ende)||void 0===s?void 0:s.cep]})]})}),Object(I.jsx)(_e.a,{title:Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)($.g,{style:{marginRight:"8px"}})," Hist\xf3rico do Pedido"]}),className:"detalhe-card",children:Object(I.jsx)(Te.a,{size:"small",dataSource:O.historico||[],renderItem:function(e){return Object(I.jsx)(Te.a.Item,{children:Object(I.jsxs)("div",{style:{width:"100%"},children:[Object(I.jsx)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},children:Object(I.jsxs)("small",{style:{color:"#888"},children:[e.data," \xe0s ",e.hora]})}),Object(I.jsx)("div",{style:{fontSize:"14px"},children:e.texto})]})})}})})]}),Object(I.jsxs)(Ee.a,{xs:24,md:8,children:[Object(I.jsxs)(_e.a,{title:Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)($.o,{style:{marginRight:"8px"}})," Resumo Financeiro"]}),className:"detalhe-card",children:[Object(I.jsxs)("div",{className:"totais-resumo",children:[Object(I.jsxs)("div",{className:"linha-total",children:[Object(I.jsx)("span",{children:"Subtotal Itens:"}),Object(I.jsx)("span",{children:P(O.total_vlr)})]}),Object(I.jsxs)("div",{className:"linha-total",children:[Object(I.jsx)("span",{children:"Frete:"}),Object(I.jsx)("span",{children:O.frete_vlr>0?P(O.frete_vlr):"Gr\xe1tis"})]}),Object(I.jsxs)("div",{className:"linha-total final",children:[Object(I.jsx)("span",{children:"Total:"}
1),Object(I.jsx)("span",{children:P(parseFloat(O.total_vlr)+parseFloat(O.frete_vlr||0))})]})]}),k&&Object(I.jsxs)("div",{style:{marginTop:"20px",textAlign:"center",backgroundColor:"#f6ffed",border:"1px solid #b7eb8f",padding:"15px",borderRadius:"8px"},children:[Object(I.jsx)($.d,{color:"#52c41a",size:24}),Object(I.jsx)("div",{style:{color:"#389e0d",fontWeight:"bold"},children:"Pedido em Prepara\xe7\xe3o"}),Object(I.jsx)("small",{children:"Obrigado por comprar conosco!"})]}),S&&Object(I.jsxs)("div",{style:{marginTop:"20px",textAlign:"center",backgroundColor:"#fff1f0",border:"1px solid #ffa39e",padding:"15px",borderRadius:"8px"},children:[Object(I.jsx)("div",{style:{color:"#cf1322",fontWeight:"bold",fontSize:"16px"},children:"Pedido Cancelado"}),Object(I.jsx)("small",{children:"Este pedido foi cancelado e n\xe3o pode ser processado."})]})]}),!k&&!S&&w(O.etapa)<4&&Object(I.jsx)("div",{style:{marginBottom:"15px"},children:Object(I.jsx)(le,{texto:"Continuar para Checkout",width:"100%",onClick:function(){return u("/checkout/".concat(d))},fundo:"#1890ff",cor:"#fff"})}),!k&&!S&&Object(I.jsx)("div",{style:{marginBottom:"10px"},children:Object(I.jsx)(le,{texto:"Cancelar Pedido",width:"100%",onClick:function(){window.confirm("Tem certeza que deseja cancelar este pedido? Esta a\xe7\xe3o n\xe3o pode ser desfeita.")&&z("avancarEtapa",{prot_ped:d,etapa:O.etapa,status:3},(function(e){l.b.info("Pedido cancelado com sucesso."),y()}),!1,(function(e){return x(e)}))},fundo:"transparent",cor:"#cf1322",borda:!1})}),Object(I.jsx)(le,{texto:"Voltar para a Loja",width:"100%",onClick:function(){return u("/")},fundo:"transparent"})]})]})})})},He=(n(251),function(e){if(!e)return"";var t=String(e).replace(/\D/g,"");t.length>11&&(t=t.substring(0,11));var n=t;return t.length>2&&(n="(".concat(t.substring(0,2),") ").concat(t.substring(2))),t.length>7&&(n="(".concat(t.substring(0,2),") ").concat(t.substring(2,7),"-").concat(t.substring(7))),n});function Ve(){var e=Object(i.useContext)(B),t=e.siteCor,n=e.userNome,c=e.setShowUserBox,a=Object(i.useState)(1),o=Object(m.a)(a,2),r=o[0],s=o[1],d=Object(i.useState)([]),u=Object(m.a)(d,2),j=u[0],p=u[1],x=Object(i.useState)(null),h=Object(m.a)(x,2),g=h[0],f=h[1],O=Object(i.useState)(""),v=Object(m.a)(O,2),y=v[0],k=v[1],S=Object(i.useState)([]),C=Object(m.a)(S,2),N=C[0],w=C[1],A=Object(i.useState)(null),z=Object(m.a)(A,2),_=z[0],P=z[1],E=Object(i.useState)(!1),R=Object(m.a)(E,2),F=R[0],L=R[1],D=Object(i.useState)(""),W=Object(m.a)(D,2),T=W[0],q=W[1],M=Object(i.useState)(""),H=Object(m.a)(M,2),V=H[0],Q=H[1],U=Object(i.useState)(!1),X=Object(m.a)(U,2),G=X[0],J=X[1],K=Object(i.useState)(!1),Z=Object(m.a)(K,2),Y=Z[0],$=Z[1],ee=Object(i.useState)(!1),te=Object(m.a)(ee,2),ne=te[0],ie=te[1];Object(i.useEffect)((function(){b.post("/getAgendaGrupos").then((function(e){0===e.data.err&&e.data.res&&p(e.data.res)})).catch((function(e){return console.error("Erro ao buscar grupos",e)}))}),[]),Object(i.useEffect)((function(){g&&y&&(L(!0),w([]),P(null),b.post("/getAgendaSlots",{id_grupo:g.id,data:y}).then((function(e){0===e.data.err&&w(e.data.res||[])})).finally((function(){return L(!1)})))}),[g,y]);var ce=function(){return _&&g&&y?G&&(!V||V.length<8)?l.b.warn("Por favor, informe um n\xfamero de telefone/WhatsApp v\xe1lido."):(ie(!0),void b.post("/postAgendamento",{id_grupo:g.id,data:y,hora_inicio:_.hora_inicio,hora_fim:_.hora_fim,observacao:T,celular:G?V:""},{headers:{Authorization:"Bearer ".concat(localStorage.getItem("tk"))}}).then((function(e){var t;0===e.data.err?(l.b.success((null===(t=e.data.res)||void 0===t?void 0:t.msg)||"Agendado com sucesso!"),s(4)):l.b.error(e.data.err_tx||"Erro ao agendar")})).catch((function(e){l.b.error("Erro de conex\xe3o")})).finally((function(){return ie(!1)}))):(l.b.error("Informa\xe7\xf5es incompletas. Por favor, selecione novamente."),void s(1))};return Object(I.jsx)(ae,{children:Object(I.jsxs)("div",{className:"agendamento-container",children:[Object(I.jsxs)("div",{className:"agendamento-header",style:{backgroundColor:t},children:[Object(I.jsx)("h2",{children:"Agendamento Online"}),Object(I.jsxs)("p",{children:[1===r&&"Escolha o servi\xe7o desejado",2===r&&"Escolha uma data e um hor\xe1rio",3===r&&"Confirme seu Contato",4===r&&"Agendamento Confirmado!"]})]}),Object(I.jsxs)("div",{className:"agendamento-content",children:[1===r&&Object(I.jsxs)("div",{className:"agendamento-step",children:[Object(I.jsx)("h3",{children:"Servi\xe7os Dispon\xedveis"}),Object(I.jsxs)("div",{className:"grupos-grid",children:[0===j.length&&Object(I.jsx)("p",{children:"Nenhum servi\xe7o dispon\xedvel no momento."}),j.map((function(e){return Object(I.jsxs)("div",{className:"grupo-card",onClick:function(){return f(e),void s(2)},style:{borderLeftColor:e.cor||t},children:[Object(I.jsx)("h4",{children:e.nome}),e.descricao&&Object(I.jsx)("p",{children:e.descricao})]},e.id)}))]})]}),2===r&&Object(I.jsxs)("div",{className:"agendamento-step",children:[Object(I.jsx)("div",{className:"step-back",onClick:function(){return s(1)},children:"\u2190 Voltar para Servi\xe7os"}),Object(I.jsx)("h3",{children:null===g||void 0===g?void 0:g.nome}),Object(I.jsxs)("div",{className:"data-picker",children:[Object(I.jsx)("label",{children:"Selecione a Data:"}),Object(I.jsx)("input",{type:"date",min:(new Date).toISOString().split("T")[0],value:y,onChange:function(e){return k(e.target.value)}})]}),y&&Object(I.jsxs)("div",{className:"slots-container",children:[Object(I.jsxs)("h4",{children:["Hor\xe1rios Livres em ",y.split("-").reverse().join("/")]}),F?Object(I.jsx)("div",{className:"spinner"}):Object(I.jsx)(I.Fragment,{children:0===N.length?Object(I.jsx)("p",{className:"no-slots",children:"Nenhum hor\xe1rio dispon\xedvel para esta data."}):Object(I.jsx)("div",{className:"slots-grid",children:N.map((function(e,n){return Object(I.jsxs)("div",{className:"slot-card ".concat(e.livre?"":"blocked"," ").concat((null===_||void 0===_?void 0:_.hora_inicio)===e.hora_inicio&&e.livre?"selected":""),onClick:function(){return e.livre&&P(e)},style:{backgroundColor:(null===_||void 0===_?void 0:_.hora_inicio)===e.hora_inicio&&e.livre?t:e.livre?"#f0f0f0":"#f5f5f5",color:e.livre?"#333":"#aaa",textDecoration:e.livre?"none":"line-through",cursor:e.livre?"pointer":"not-allowed",opacity:e.livre?1:.6},children:[e.hora_inicio," - ",e.hora_fim]},n)}))})})]}),_&&Object(I.jsxs)("div",{className:"confirm-section",children:[Object(I.jsx)("textarea",{placeholder:"Alguma observa\xe7\xe3o? (Opcional)",value:T,onChange:function(e){return q(e.target.value)},className:"agendamento-obs"}),Object(I.jsx)("button",{className:"btn-confirmar",onClick:function(){return _?"Entrar"!==n&&n?($(!0),void b.post("/getPerfil",{},{headers:{Authorization:"Bearer ".concat(localStorage.getItem("tk"))}}).then((function(e){var t;if(0===e.data.err&&(null===(t=e.data.res)||void 0===t?void 0:t.perfil)){var n=e.data.res.perfil.celular||e.data.res.perfil.fone||"";Q(n),J(!n),s(3)}else l.b.error("Erro ao buscar seu perfil")})).catch((function(e){return l.b.error("Erro de conex\xe3o ao buscar perfil")})).finally((function(){return $(!1)}
1))):(l.b.info("Fa\xe7a login ou cadastre-se para agendar"),void c(1)):l.b.warn("Selecione um hor\xe1rio")},disabled:Y,style:{backgroundColor:t},children:Y?"Aguarde...":"Continuar"})]})]}),3===r&&Object(I.jsxs)("div",{className:"agendamento-step",children:[Object(I.jsx)("div",{className:"step-back",onClick:function(){return s(2)},children:"\u2190 Voltar aos Hor\xe1rios"}),Object(I.jsx)("h3",{children:"Contato"}),Object(I.jsx)("p",{children:"Precisamos de um contato (prefer\xeancia WhatsApp) para confirmar seu hor\xe1rio."}),Object(I.jsx)("div",{className:"contact-verification",children:G?Object(I.jsxs)("div",{className:"contact-edit",children:[Object(I.jsx)("label",{children:"Telefone / WhatsApp:"}),Object(I.jsx)("input",{type:"text",placeholder:"(DDD) XXXXX-XXXX",value:He(V),onChange:function(e){return Q(e.target.value.replace(/\D/g,""))},className:"agendamento-input"}),Object(I.jsx)("button",{className:"btn-confirmar mt-4",onClick:ce,disabled:ne,style:{backgroundColor:t,width:"100%"},children:ne?"Aguarde...":"Salvar e Confirmar Agendamento"})]}):Object(I.jsxs)("div",{className:"contact-show",children:[Object(I.jsx)("p",{children:He(V)}),Object(I.jsx)("button",{className:"btn-confirmar",onClick:ce,disabled:ne,style:{backgroundColor:t,width:"100%"},children:ne?"Aguarde...":"Sim, este n\xfamero est\xe1 correto"}),Object(I.jsx)("button",{className:"btn-secondary",onClick:function(){return J(!0)},children:"N\xe3o, quero alterar o n\xfamero"})]})})]}),4===r&&Object(I.jsxs)("div",{className:"agendamento-success",children:[Object(I.jsx)("div",{className:"success-icon",style:{color:t},children:"\u2713"}),Object(I.jsx)("h3",{children:"Seu agendamento foi confirmado!"}),Object(I.jsxs)("p",{children:[Object(I.jsx)("strong",{children:"Servi\xe7o:"})," ",null===g||void 0===g?void 0:g.nome]}),Object(I.jsxs)("p",{children:[Object(I.jsx)("strong",{children:"Data:"})," ",y.split("-").reverse().join("/")]}),Object(I.jsxs)("p",{children:[Object(I.jsx)("strong",{children:"Hor\xe1rio:"})," ",null===_||void 0===_?void 0:_.hora_inicio]}),Object(I.jsx)("button",{className:"btn-confirmar mt-4",style:{backgroundColor:t},onClick:function(){s(1),k(""),P(null)},children:"Fazer Novo Agendamento"})]})]})]})})}n(252),n(253);function Qe(){return Object(I.jsx)("div",{className:"error-page-overlay",children:Object(I.jsxs)("div",{className:"error-card",children:[Object(I.jsx)("div",{className:"error-icon-wrapper",children:Object(I.jsx)(L.c,{size:48,color:"#ef4444"})}),Object(I.jsx)("h1",{children:"Ops! Algo deu errado"}),Object(I.jsx)("p",{children:"N\xe3o conseguimos identificar o site ou o endere\xe7o est\xe1 incorreto."}),Object(I.jsx)("div",{className:"error-details",children:Object(I.jsx)("code",{children:"Erro 001: Site n\xe3o identificado"})}),Object(I.jsx)("div",{className:"error-actions",children:Object(I.jsx)(le,{texto:"Tentar Novamente",onClick:function(){return window.location.reload()},fundo:"#f3f4f6",cor:"#374151",width:"240px",height:"48px"})})]})})}function Ue(){var e=Object(h.g)(),t=Object(i.useContext)(B).trackPageView;return Object(i.useEffect)((function(){t(e.pathname+e.search)}),[e,t]),null}var Xe=function(){var e=Object(i.useContext)(B),t=e.loading,n=e.siteError,c=e.siteAgendamento;return n?Object(I.jsx)(Qe,{}):t?Object(I.jsxs)("div",{className:"app-loading-overlay",children:[Object(I.jsx)("div",{className:"loading-spinner"}),Object(I.jsx)("div",{className:"loading-text",children:"Carregando..."})]}):Object(I.jsxs)(x.a,{children:[Object(I.jsx)(Ue,{}),Object(I.jsx)(l.a,{autoClose:2e3}),Object(I.jsxs)(h.e,{children:[Object(I.jsx)(h.c,{exact:!0,path:"/",element:Object(I.jsx)(Se,{})}),Object(I.jsx)(h.c,{exact:!0,path:"/busca/:uri_busca",element:Object(I.jsx)(we,{})}),Object(I.jsx)(h.c,{exact:!0,path:"/p/:uuid",element:Object(I.jsx)(Ae,{})}),Object(I.jsx)(h.c,{exact:!0,path:"/p/:uuid/:titulo",element:Object(I.jsx)(Ae,{})}),Object(I.jsx)(h.c,{exact:!0,path:"/checkout/:prot",element:Object(I.jsx)(We,{})}),Object(I.jsx)(h.c,{exact:!0,path:"/pedido/:prot",element:Object(I.jsx)(Me,{})}),1===c&&Object(I.jsx)(h.c,{exact:!0,path:"/agendamento",element:Object(I.jsx)(Ve,{})})]})]})},Ge=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,282)).then((function(t){var n=t.getCLS,i=t.getFID,c=t.getFCP,a=t.getLCP,o=t.getTTFB;n(e),i(e),c(e),a(e),o(e)}))};n(254);o.a.render(Object(I.jsx)(c.a.StrictMode,{children:Object(I.jsx)(R,{children:Object(I.jsx)(Xe,{})})}),document.getElementById("root")),Ge()}},[[255,1,2]]]); 2//# sourceMappingURL=main.b70bead2.chunk.js.map
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.