1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7362],{77362:function(n,e,i){i.d(e,{mk:function(){return En},Z6:function(){return kn},iH:function(){return On},_K:function(){return Bn}});var t=i(85893),r=i(67294),s=i(8193),l=i(63750),o=i(89583),a=i(1853),c=i(35282),d=i(8387),u=i(7305),h=i(66177),f=i(94656),p=i(26696),x=i(26042),m=i(47516),v=i(11163),g=i(57293),j=i(7984),C=i(73926),w=i(7297),y=i(186);function b(){var n=(0,w.Z)(["\n width: 100%;\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n align-items: flex-end;\n gap: 32px;\n\n .filters-wrapper {\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: 16px;\n }\n\n .item-search {\n display: flex;\n gap: 8px;\n width: 100%;\n align-items: flex-end;\n\n button {\n height: fit-content;\n width: 100%;\n }\n }\n\n .item-wrapper {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0;\n\n > span {\n font-size: ",";\n color: ",";\n }\n\n &:first-child {\n width: 100%;\n }\n }\n\n }\n\n .filter-total {\n display: inline;\n font-size: ",";\n color: ",";\n }\n\n @media screen and (min-width: 1024px) {\n .filters-wrapper {\n flex-direction: row;\n flex-wrap: nowrap;\n }\n }\n\n .item-search {\n max-width: 360px ;\n }\n "]);return b=function(){return n},n}function k(){var n=(0,w.Z)(["\n ","\n"]);return k=function(){return n},n}function P(){var n=(0,w.Z)(["\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0;\n\n .react-dropdown-select {\n height: 32px;\n input {\n display: none;\n }\n }\n\n @media screen and (min-width: 1024px) {\n flex-direction: row;\n\n .item-wrapper {\n width: 25%;\n /* &:not(:first-child) {\n } */\n\n &:first-child {\n width: 25%;\n }\n /*\n &:nth-child(2) {\n width: 32%;\n } */\n }\n }\n"]);return P=function(){return n},n}var Z=y.ZP.div.withConfig({componentId:"sc-b52a8c7e-0"})(k(),(function(n){var e=n.theme;return(0,y.iv)(b(),e.sizes.smaller,e.colors.gray300,e.sizes.smaller,e.colors.gray200)})),z=y.ZP.div.withConfig({componentId:"sc-b52a8c7e-1"})(P()),S=function(n){var e,i,r=n.totalClients,s=n.handleSearchClients,o=n.setCurrentPage,c=n.queryKey,d=(0,j.v0)(c),u=d.allFields,h=d.setAllFields,f=d.setFilter,p=d.setOrderBy,w=d.setTag,y=d.submitSearchPaginate,b=d.hasValueToSearch,k=d.paginateQuerySearch,P=d.removeQueryParams,S=(0,v.useRouter)();return(0,t.jsxs)(Z,{children:[(0,t.jsxs)("form",{onSubmit:function(n){n.preventDefault(),y()},className:"filters-wrapper",children:[(0,t.jsxs)(z,{children:[(0,t.jsxs)("div",{className:"item-wrapper",children:[(0,t.jsx)("span",{children:"Nome/E-mail/Tel.:"}),(0,t.jsx)(g.Mj,{className:"search",loading:!1,value:u,onChange:function(n){return h(n.target.value)},placeholder:"Busque por nome/e-mail/tel...",style:{padding:6}})]}),(0,t.jsxs)("div",{className:"item-wrapper",children:[(0,t.jsx)("span",{children:"Ordenar por campo:"}),(0,t.jsx)(g.Lt,{size:"sm",placeholder:"Ordenar por campo",values:(null===(e=S.query)||void 0===e?void 0:e.filter)?C.BW.filter((function(n){var e;return n.value===(null===(e=S.query)||void 0===e?void 0:e.filter)})):[(0,x.Z)({},C.BW[0])],options:C.BW,onChange:function(n){0!==n.length&&f(String(n[0].value))},searchable:!1})]}),(0,t.jsxs)("div",{className:"item-wrapper",children:[(0,t.jsx)("span",{children:"Ordem:"}),(0,t.jsx)(g.Lt,{size:"sm",placeholder:"Ordem",values:[{label:"Decrescente",value:"desc"}],options:[{label:"Crescente",value:"asc"},{label:"Decrescente",value:"desc"}],onChange:function(n){return p(n[0].value)},searchable:!1,className:"dropdown"})]}),(0,t.jsxs)("div",{className:"item-wrapper",children:[(0,t.jsx)("span",{children:"Filtro por tags:"}),(0,t.jsx)(g.Lt,{size:"sm",placeholder:"Tags do cliente",values:(null===(i=S.query)||void 0===i?void 0:i.tag)?C.Sl.filter((function(n){var e;return n.value===(null===(e=S.query)||void 0===e?void 0:e.tag)})):[(0,x.Z)({}
1,C.Sl[0])],options:C.Sl,onChange:function(n){0!==n.length&&w(String(n[0].value))},searchable:!1})]})]}),(0,t.jsxs)("div",{className:"item-search",children:[(0,t.jsxs)(a.KM,{size:"sm",type:"submit",disabled:!b,children:[(0,t.jsx)(m.Goc,{size:16}),"Pesquisar"]}),(0,t.jsxs)(a.kq,{size:"sm",type:"button",onClick:function(){h(""),f("noFilter"),p("desc"),w("all"),s({}),o(1),P()},disabled:!k,children:["Limpar pesquisa ",(0,t.jsx)(l.z3f,{size:16})]})]})]}),(0,t.jsxs)("p",{className:"filter-total",children:["Total (",r||0,")"]})]})};function I(){var n=(0,w.Z)(["\n min-height: 100vh;\n width: 100%;\n padding: 80px 20px;\n display: flex;\n justify-content: center;\n\n > main {\n padding-top: 16px;\n padding-bottom: 32px;\n width: 100%;\n max-width: 880px;\n }\n\n h3 {\n font-size: ",";\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: ",";\n margin: 16px 0 32px;\n }\n\n .header-area {\n width: 100%;\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n\n > button {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: ",";\n }\n\n @media screen and (min-width: 768px) {\n flex-direction: row;\n }\n }\n\n .search-area {\n max-width: 372px;\n position: relative;\n margin-bottom: 24px;\n }\n\n .clients-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n #scroll-checker-clients {\n width: 100%;\n }\n\n .action-buttons {\n display: flex;\n flex-direction: column;\n gap: 12px;\n\n button {\n display: flex;\n gap: 4px;\n }\n\n &,\n button {\n width: 100%;\n }\n\n @media screen and (min-width: 475px) {\n flex-direction: row;\n\n &,\n button {\n width: fit-content;\n }\n }\n }\n\n @media screen and (min-width: 1024px) {\n padding: 96px 60px 44px;\n\n > main {\n max-width: 1240px;\n }\n\n .clients-list {\n display: grid;\n grid-template-columns: repeat(3, minmax(264px, 410px));\n }\n }\n"]);return I=function(){return n},n}function N(){var n=(0,w.Z)(["\n margin-top: -56px;\n\n "," {\n gap: 8px;\n align-items: center;\n margin-bottom: 16px;\n }\n"]);return N=function(){return n},n}var B=y.ZP.div.withConfig({componentId:"sc-7e59dc5f-0"})(I(),(function(n){return n.theme.sizes.big}),(function(n){return n.theme.colors.gray800}),(function(n){return n.theme.sizes.smaller})),E=y.ZP.div.withConfig({componentId:"sc-7e59dc5f-1"})(N(),a.kq),O=i(69396),q=i(53854),F=i(5434),D=i(79352),T=i(2141),A=i(29081),L=i(61347),_="scrollPosition",M=(0,L.y$)("session"),R=function(n){var e=n.children;return(0,r.useEffect)((function(){var n=M.get(_);n&&(window.scrollTo(0,parseInt(n,10)),M.remove(_));var e=function(){M.set(_,window.scrollY.toString())};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),e},V=i(65229),W=i(62249);function Y(){var n=(0,w.Z)(["\n margin-top: 16px;\n overflow-y: auto;\n"]);return Y=function(){return n},n}function K(){var n=(0,w.Z)(["\n &:not("," > &):hover {\n &,\n > td {\n transition: background-color 500ms;\n\n background-color: ",";\n }\n }\n "]);return K=function(){return n},n}function Q(){var n=(0,w.Z)(["\n ","\n"]);return Q=function(){return n},n}function X(){var n=(0,w.Z)(["\n white-space: nowrap;\n\n &.clickable {\n cursor: pointer;\n &.selected {\n background-color: ",";\n }\n\n &:hover {\n transition: background-color 500ms;\n background-color: ",";\n }\n }\n\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n"]);return X=function(){return n},n}function H(){var n=(0,w.Z)(["\n max-width: 320px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n\n > img {\n height: 20px;\n margin-right: 4px;\n margin-bottom: -4px;\n }\n\n svg {\n margin: 0 auto;\n cursor: pointer;\n }\n"]);return H=function(){return n},n}function G(){var n=(0,w.Z)(["\n "," {\n cursor: default;\n\n ",":not(:first-child) {\n min-width: 140px;\n }\n\n ",":nth-child(2) {\n width: 240px;\n }\n\n ",":nth-child(3) {\n width: 200px;\n }\n\n ",":nth-child(6) {\n width: 196px;\n }\n\n & + "," > td {\n border-top: 1px solid ",";\n }\n }\n\n "," {\n text-align: center;\n padding: 1rem 0.5rem;\n vertical-align: middle;\n font-size: ",";\n font-weight: normal;\n\n .options-buttons {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 4px;\n justify-items: center;\n }\n }\n "]);return G=function(){return n},n}function $(){var n=(0,w.Z)(["\n ","\n"]);return $=function(){return n},n}function U(){var n=(0,w.Z)(["\n "," {\n color: ",";\n background-color: ",";\n position: sticky;\n top: 0;\n z-index: 1;\n }\n\n "," {\n font-weight: ",";\n padding: 0.75rem 0.5rem;\n vertical-align: middle;\n text-align: center;\n\n border-bottom: 1px solid ",";\n }\n "]);return U=function(){return n},n}function J(){var n=(0,w.Z)(["\n ","\n"]);return J=function(){return n},n}function nn(){var n=(0,w.Z)(["\n position: relative;\n\n table-layout: auto;\n width: 100%;\n\n border-collapse: separate;\n border-spacing: 0;\n border: 1px solid ",";\n border-radius: ",";\n\n "," ",":first-child {\n border-top-left-radius: ",";\n }\n\n "," ",":first-child,\n "," ",":first-child {\n color: ",";\n font-weight: ",";\n background-color: ",";\n\n position: sticky;\n left: 0;\n }\n\n ",":last-child {\n text-decoration: underline;\n }\n "]);return nn=function(){return n},n}function en(){var n=(0,w.Z)(["\n ","\n"]);return en=function(){return n},n}function tn(){var n=(0,w.Z)(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 24px;\n gap: 4px;\n\n img {\n height: 20px;\n }\n"]);return tn=function(){return n},n}function rn(){var n=(0,w.Z)(["\n color: ",";\n text-shadow: none;\n user-select: all;\n margin: 0 auto;\n\n svg {\n margin: 0;\n }\n "]);return rn=function(){return n},n}function sn(){var n=(0,w.Z)(["\n font-size: ",";\n color: transparent;\n text-shadow: rgba(255, 255, 255, 0.4) 0px 0px 10px;\n user-select: none;\n width: fit-content;\n\n ","\n "]);return sn=function(){return n},n}function ln(){var n=(0,w.Z)(["\n ","\n"]);return ln=function(){return n},n}function on(){var n=(0,w.Z)(["\n display: flex;\n align-items: center;\n gap: 4px;\n"]);return on=function(){return n},n}var an=(0,y.ZP)(W.E.div).withConfig({componentId:"sc-1d060268-0"})(Y()),cn=y.ZP.tr.withConfig({componentId:"sc-1d060268-1"})(Q(),(function(n){var e=n.theme;return(0,y.iv)(K(),fn,e.colors.black250)})),dn=y.ZP.th.withConfig({componentId:"sc-1d060268-2"})(X(),(function(n){return n.theme.colors.black100}),(function(n){return n.theme.colors.black200})),un=y.ZP.td.withConfig({componentId:"sc-1d060268-3"})(H()),hn=y.ZP.tbody.withConfig({componentId:"sc-1d060268-4"})($(),(function(n){var e=n.theme;return(0,y.iv)(G(),cn,un,un,un,un,cn,e.colors.grayAlt,un,e.sizes.smaller)})),fn=y.ZP.thead.withConfig({componentId:"sc-1d060268-5"})(J(),(function(n){var e=n.theme;return(0,y.iv)(U(),cn,e.colors.white200,e.colors.blackDarker,dn,e.weights.medium,e.colors.grayAlt)}
1)),pn=y.ZP.table.withConfig({componentId:"sc-1d060268-6"})(en(),(function(n){var e=n.theme;return(0,y.iv)(nn(),e.colors.grayAlt,e.borders.minimal,cn,dn,e.borders.minimal,cn,dn,cn,un,e.colors.white100,e.weights.medium,e.colors.blackDarker,un)})),xn=(y.ZP.div.withConfig({componentId:"sc-1d060268-7"})(tn()),y.ZP.span.withConfig({componentId:"sc-1d060268-8"})(ln(),(function(n){var e=n.theme,i=n.type,t=void 0===i?"heavy":i,r=n.showInfo,s=void 0===r?0:r;return(0,y.iv)(sn(),"heavy"===t?e.sizes.smaller:e.sizes.small,1===s&&(0,y.iv)(rn(),e.colors.gray400))}))),mn=y.ZP.div.withConfig({componentId:"sc-1d060268-9"})(on()),vn=function(n){var e,i=n.data,l=n.clientDisplayed,o=n.onClickEye,d=n.openModalClientData,f=n.setCurrentPage,v=n.isShowAllInformation,g=void 0!==v&&v,w=n.setClients,y=(0,j.B2)().requestCreateClientSession,b=(0,r.useState)(!1),k=b[0],P=b[1],Z=function(n){return n.length<=11?(0,h.Hc)(n):(0,h.Hc)(null===n||void 0===n?void 0:n.slice(2))};return(0,t.jsx)(R,{children:(0,t.jsx)(an,{variants:C.Ic,initial:"hidden",animate:"visible",custom:{delay:1},children:(0,t.jsxs)(pn,{children:[(0,t.jsx)(fn,{children:(0,t.jsxs)(cn,{children:[(0,t.jsx)(dn,{children:" "}),(0,t.jsx)(dn,{children:(0,t.jsx)("span",{children:"Nome"})}),(0,t.jsx)(dn,{children:(0,t.jsx)("span",{children:"\xdaltimo login"})}),(0,t.jsx)(dn,{children:(0,t.jsx)("span",{children:"Conta criada"})}),(0,t.jsx)(dn,{children:"Tag"}),(0,t.jsx)(dn,{children:"Telefone"}),(0,t.jsx)(dn,{children:(0,t.jsx)("span",{children:"PL"})}),(0,t.jsx)(dn,{children:"Ferramentas"})]})}),(0,t.jsx)(hn,{children:null===i||void 0===i?void 0:i.map((function(n,i){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(cn,{onClick:function(){return null},children:[(0,t.jsx)(un,{children:i+1}),(0,t.jsx)(un,{children:(0,h.Zx)(n.name||"")}),(0,t.jsx)(un,{children:(v=null===n||void 0===n?void 0:n.last_login,v?(0,T.Z)(new Date(v).getTime(),{addSuffix:!0,locale:A.Z}):"-")}),(0,t.jsx)(un,{children:(r=null===n||void 0===n?void 0:n.created_at,r?(0,T.Z)(new Date(r).getTime(),{addSuffix:!0,locale:A.Z}):"-")}),(0,t.jsx)(un,{children:(0,V.w)(null===n||void 0===n?void 0:n.tag)}),(0,t.jsx)(un,{children:n.id===l||g?(0,t.jsxs)(mn,{children:[(0,t.jsx)(c.jF,{phone:null===n||void 0===n?void 0:n.phone,children:(0,t.jsxs)(xn,{style:{display:"flex",alignItems:"center",gap:"4px"},showInfo:l||g?1:0,children:[Z((null===n||void 0===n?void 0:n.phone)||""),(0,t.jsx)(D.nmQ,{size:18})]})}),(0,t.jsx)(F.Fqs,{size:18,onClick:function(){return(0,h.Xj)((null===n||void 0===n?void 0:n.phone)||"")},id:"copySvg"})]}):(0,t.jsx)(xn,{children:Z("89999999999 999 ")})}),(0,t.jsx)(un,{children:(0,t.jsx)(xn,{showInfo:n.id===l||g?1:0,children:(0,h.Ri)(null!==(e=null===n||void 0===n?void 0:n.total_pl)&&void 0!==e?e:null===n||void 0===n?void 0:n.initialPl)})}),(0,t.jsx)(un,{children:(0,t.jsxs)("div",{className:"options-buttons",children:[!g&&(0,t.jsx)(a.hU,{tip:"Exibir informa\xe7\xf5es",tipId:"clientHideData",onClick:function(){return o(null===n||void 0===n?void 0:n.id)},children:n.id===l?(0,t.jsx)(D.VhL,{}):(0,t.jsx)(D.nO8,{})}),(0,t.jsx)(a.hU,{tip:"Mais detalhes sobre cliente",tipId:"clientInformation",onClick:function(){return d(n)},children:(0,t.jsx)(s.Ehc,{size:18})}),(0,t.jsx)(a.hU,{tip:"Iniciar sess\xe3o na conta do usu\xe1rio",tipId:"requestSession",onClick:function(){return(null===n||void 0===n?void 0:n.is_deleted)?(0,h.CF)("N\xe3o \xe9 poss\xedvel acessar uma conta exclu\xedda","error"):y(n.id)},disabled:null===n||void 0===n?void 0:n.is_deleted,children:(0,t.jsx)(q.BpP,(0,O.Z)((0,x.Z)({},(null===n||void 0===n?void 0:n.is_deleted)?{color:"#5f5f5f"}:{}),{size:18}))}),!g&&(0,t.jsx)(a.hU,{tip:"Remover cliente da sua lista",tipId:"removeClient",onClick:function(){return P(!0)},children:(0,t.jsx)(m.GH,{size:18})}),g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.LH,{client:n,setClients:w}),(0,t.jsx)(p.i6,{client:n,setClients:w})]})]})})]},n.id),(0,t.jsx)(u.AB,{isOpen:k,children:(0,t.jsx)(p.Yn,{isExcluded:!1,client:n,deletedAccount:null===n||void 0===n?void 0:n.is_deleted,setCurrentPage:f,onClose:function(){return P(!1)}})})]});var r,v}))})]})})})},gn=i(89782),jn=i(29815),Cn=i(6728),wn=i(88767),yn=i(3045);var bn=function(n){var e=(0,r.useState)([]),i=e[0],t=e[1],s=(0,r.useState)(0),l=s[0],o=s[1],a=(0,r.useState)(0),c=a[0],d=a[1],u=function(n){return(0,wn.useQuery)(n,(function(){}),{staleTime:yn.i})}(n),h=u.data,f=(0,Cn.n)().isSuccess,p=function(){var n;(null===h||void 0===h?void 0:h.clients)&&(t((0,jn.Z)(h.clients)),d((function(e){return null!==(n=h.totalCount)&&void 0!==n?n:e})))};return(0,r.useEffect)((function(){p()}),[f,h]),(0,r.useEffect)((function(){var n=new IntersectionObserver((function(n){n.some((function(n){return n.isIntersecting}))&&o((function(n){return n+1}))}));return n.observe(document.querySelector("#scroll-checker-clients")),function(){return n.disconnect()}}),[]),{clientsList:h,totalClients:c,filterClients:i,currentPage:l,setCurrentPage:o,handleFilterClients:p}},kn=function(){var n=(0,gn.sX)().selectClient,e=bn("myClients"),i=e.totalClients,x=e.filterClients,m=e.currentPage,v=e.setCurrentPage,g=(0,j.nj)("myClients"),C=g.isLoading,w=g.clientsPaginate,y=g.handleSearchClientPaginate,b=(0,r.useState)(!1),k=b[0],P=b[1],Z=(0,r.useState)(!1),z=Z[0],I=Z[1],N=(0,r.useState)(null),O=N[0],q=N[1],F=(0,r.useRef)(!0),D=(0,r.useState)("cards"),T=D[0],A=D[1],L=function(n){return q((function(e){return e===n?"":n}))};return(0,r.useEffect)((function(){if(F.current)F.current=!1;else if(!(m>(null===w||void 0===w?void 0:w.pagesTotal)||0===m))try{y({page:m})}catch(n){(0,h.CF)("Ocorreu um erro no servidor ao tentar listar clientes","error")}}),[m]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.$y,{title:"Business | Clientes"}),(0,t.jsxs)(B,{children:[(0,t.jsx)(d.h4,{}),(0,t.jsxs)("main",{children:[(0,t.jsxs)("div",{className:"header-area",children:[(0,t.jsx)("h3",{children:"Meus clientes"}),(0,t.jsxs)("div",{className:"action-buttons",children:[(0,t.jsxs)(a.kq,{type:"button",onClick:function(){return(0,h.YQ)("https://forms.clickup.com/9007130840/f/8cdvu6r-1647/BXQZVVIE4GYN0SOXVQ")},children:[(0,t.jsx)(o.iq7,{size:14}),"Reportar um bug"]}
1),(0,t.jsxs)(a.KM,{type:"button",onClick:function(){return P(!0)},children:[(0,t.jsx)(s.vM4,{size:14}),"Cadastrar cliente"]})]})]}),(0,t.jsx)("div",{className:"divider"}),(0,t.jsx)(S,{handleSearchClients:y,setCurrentPage:v,totalClients:i,queryKey:"myClients"}),(0,t.jsxs)(E,{children:[(0,t.jsxs)(a.kq,{onClick:function(){A((function(n){return"cards"===n?"list":"cards"}))},children:["Visualizar"," ","cards"===T?(0,t.jsx)(l.Ps6,{size:20}):(0,t.jsx)(l.gc_,{size:18})]}),"cards"===T?(0,t.jsx)("div",{className:"clients-list",children:null===x||void 0===x?void 0:x.map((function(e,i){return(0,t.jsx)(f.Wv,{client:e,allowInteractions:!0,animationDelay:i/1.5,onClickEye:L,length:null===x||void 0===x?void 0:x.length,showInfo:e.id===O,onClick:function(e){n(e),I(!0)},setCurrentPage:v},"".concat(e.id))}))}):(0,t.jsx)("div",{className:"clients-tab",children:(0,t.jsx)(vn,{data:x,onClickEye:L,clientDisplayed:O,openModalClientData:function(e){n(e),I(!0)},setCurrentPage:v})})]}),(0,t.jsx)("div",{id:"scroll-checker-clients"}),C&&(0,t.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:(0,t.jsx)(c.su,{size:"md"})})]})]}),(0,t.jsx)(u.AB,{isOpen:z,children:(0,t.jsx)(p.Yl,{setCurrentPage:v,onClose:function(){return I(!1)}})}),(0,t.jsx)(u.AB,{isOpen:k,children:(0,t.jsx)(p.Tl,{onClose:function(){return P(!1)}})})]})},Pn=i(55545);function Zn(){var n=(0,w.Z)(["\n min-height: 100vh;\n width: 100%;\n padding: 80px 20px;\n display: flex;\n justify-content: center;\n\n > main {\n width: 100%;\n max-width: 880px;\n }\n\n h3 {\n font-size: ",";\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: ",";\n margin: 16px 0 32px;\n }\n\n .unregistered {\n text-align: center;\n color: ",";\n font-size: ",";\n }\n\n .clients-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding-right: 8px;\n }\n\n .header-area {\n width: 100%;\n display: flex;\n justify-content: space-between;\n\n > button {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: ",";\n }\n }\n\n .search-area {\n max-width: 372px;\n position: relative;\n margin-bottom: 24px;\n }\n\n .see-more {\n width: 100%;\n margin-top: 32px;\n display: flex;\n justify-content: flex-end;\n }\n\n .load-clients-btn {\n padding: 16px 24px;\n }\n\n #scroll-checker-search-clients {\n width: 100%;\n }\n\n @media screen and (min-width: 1024px) {\n padding: 96px 60px 44px;\n\n > main {\n max-width: 1240px;\n }\n\n .clients-list {\n display: grid;\n grid-template-columns: repeat(3, minmax(264px, 410px));\n }\n }\n"]);return Zn=function(){return n},n}function zn(){var n=(0,w.Z)(["\n padding: 0px;\n\n p {\n font-size: ",";\n }\n\n .dropdown-filter {\n > div {\n input {\n background: ",";\n display: none;\n }\n }\n }\n\n .form-inputs {\n margin: 24px 0px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n\n div:first-child {\n > p {\n margin-bottom: 8px;\n }\n }\n }\n\n @media screen and (min-width: 425px) {\n min-width: 380px;\n }\n"]);return zn=function(){return n},n}var Sn=y.ZP.div.withConfig({componentId:"sc-c54c1c44-0"})(Zn(),(function(n){return n.theme.sizes.big}),(function(n){return n.theme.colors.gray800}),(function(n){return n.theme.colors.gray500}),(function(n){return n.theme.sizes.smaller}),(function(n){return n.theme.sizes.smaller})),In=(0,y.ZP)(Pn.OC).withConfig({componentId:"sc-c54c1c44-1"})(zn(),(function(n){return n.theme.sizes.smaller}),(function(n){return n.theme.colors.gray800})),Nn={name:"Nome ",email:"E-mail ",phone:"Telefone "},Bn=function(){var n=(0,r.useRef)(null),e=(0,j.to)(),i=e.clients,l=e.handleSearchClients,o=e.handleSeeMore,h=e.handleToggleModal,x=e.isLoadingSearch,m=e.selectFilter,v=e.field,C=e.value,w=e.setValue,y=e.clientDisplayed,b=e.setClientDisplayed,k=e.isOpenClientModal,P=e.setIsOpenClientModal,Z=e.isOpenSearchModal,z=e.searchedClients,S=(0,gn.sX)().selectClient;return(0,r.useEffect)((function(){Z&&n.current.focus()}),[Z]),(0,r.useEffect)((function(){var n=new IntersectionObserver((function(n){n.some((function(n){return n.isIntersecting}))&&o()}));return n.observe(document.querySelector("#scroll-checker-search-clients")),function(){return n.disconnect()}}),[z]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.$y,{title:"Business | Buscar clientes"}),(0,t.jsxs)(Sn,{children:[(0,t.jsx)(d.h4,{}),(0,t.jsxs)("main",{children:[(0,t.jsxs)("div",{className:"header-area",children:[(0,t.jsx)("h3",{children:"Clientes"}),(0,t.jsxs)(a.kq,{type:"button",onClick:h,children:[(0,t.jsx)(s.RB5,{size:14}),"Nova busca"]})]}),(0,t.jsx)("div",{className:"divider"}),x&&!i.length?(0,t.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:(0,t.jsx)(c.su,{size:"md"})}):(0,t.jsx)("div",{className:"clients-list",children:i&&(null===i||void 0===i?void 0:i.map((function(n,e){return(0,t.jsx)(f.Wv,{client:n,allowInteractions:!1,allowAdvisorName:!0,animationDelay:e,length:null===i||void 0===i?void 0:i.length,onClickEye:function(n){return b((function(e){return e===n?"":n}))},showInfo:n.id===y,onClick:function(n){S(n),P(!0)},isShowAllInformation:!0},"".concat(n.id,"-").concat(e))})))}),!x&&!(null===i||void 0===i?void 0:i.length)&&(0,t.jsx)("p",{className:"unregistered",children:"Nenhum registro encontrado."}),(0,t.jsx)("div",{id:"scroll-checker-search-clients"})]})]}),(0,t.jsx)(u.AB,{isOpen:Z,children:(0,t.jsx)(d.u_,{enableButtons:!0,primaryBtn:{onClick:l,text:"Buscar"},secondaryBtn:{onClick:h},maxWidth:"460px",title:"Buscar Cliente(s)",children:(0,t.jsx)(In,{children:(0,t.jsxs)("div",{className:"form-inputs",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Filtrar por:"}),(0,t.jsx)(g.Lt,{options:[{label:"Nome",value:"name"},{label:"E-mail",value:"email"},{label:"Telefone",value:"phone"}],placeholder:"Filtro",values:[{label:"Nome",value:"name"}],onChange:function(n){var e;return m(null===(e=n[0])||void 0===e?void 0:e.value)},className:"dropdown-filter"})]}),(0,t.jsx)(g.sp,{label:"\n ".concat(Nn[v],"\n do cliente:\n "),placeholder:Nn[v],type:"phone"===v?"tel":v,color:"light",value:C,onChange:function(n){return w(n.target.value)},inputRef:n})]})})})}),(0,t.jsx)(u.AB,{isOpen:k,children:(0,t.jsx)(p.Yl,{onClose:function(){return P(!1)}})})]})},En=function(n){var e=n.advisor,i=(0,gn.sX)().selectClient,s=(0,r.useRef)(!0),l=(0,r.useState)(null),o=l[0],a=l[1],x=(0,r.useState)(!1),m=x[0],v=x[1],g=bn("advisorClients"),C=g.totalClients,w=g.filterClients,y=g.currentPage,b=g.setCurrentPage,k=(0,j.nj)("advisorClients"),P=k.isLoading,Z=k.clientsPaginate,z=k.handleSearchClientPaginate;return(0,r.useEffect)((function(){if(s.current)s.current=!1;else if(!(y>(null===Z||void 0===Z?void 0:Z.pagesTotal)||0===y))try{z({page:y})}catch(n){(0,h.CF)("Ocorreu um erro no servidor ao tentar listar clientes","error")}}),[y]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.$y,{title:"Business | Gest\xe3o de clientes"}),(0,t.jsxs)(B,{children:[(0,t.jsx)(d.h4,{}),(0,t.jsxs)("main",{children:[(0,t.jsx)("div",{className:"header-area",children:(0,t.jsxs)("h3",{children:["Gest\xe3o de clientes -"," ",(0,h.Zx)((null===e||void 0===e?void 0:e.name)||"")]})}),(0,t.jsx)("div",{className:"divider"}),(0,t.jsx)(S,{handleSearchClients:z,setCurrentPage:b,totalClients:C,queryKey:"advisorClients"}),(0,t.jsx)("div",{className:"clients-list",children:null===w||void 0===w?void 0:w.map((function(n,e){return(0,t.jsx)(f.Wv,{client:n,allowInteractions:!1,animationDelay:e,length:null===w||void 0===w?void 0:w.length,onClickEye:function(n){return a((function(e){return e===n?"":n}))},showInfo:n.id===o,onClick:function(n){i(n),v(!0)},setCurrentPage:b},"".concat(n.id,"-").concat(e))}))}),(0,t.jsx)("div",{id:"scroll-checker-clients"}),P&&(0,t.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:(0,t.jsx)(c.su,{size:"md"})})]})]}),(0,t.jsx)(u.AB,{isOpen:m,children:(0,t.jsx)(p.Yl,{setCurrentPage:b,onClose:function(){return v(!1)}})})]})},On=function(){var n=(0,gn.sX)().selectClient,e=bn("leadsClients"),i=e.totalClients,s=e.filterClients,o=e.currentPage,x=e.setCurrentPage,m=(0,j.nj)("leadsClients"),v=m.isLoading,g=m.clientsPaginate,C=m.handleSearchClientPaginate,w=(0,r.useState)(!1),y=w[0],b=w[1],k=(0,r.useState)(!1),P=k[0],Z=k[1],z=(0,r.useState)(null),I=z[0],N=z[1],O=(0,r.useRef)(!0),q=(0,r.useState)("list"),F=q[0],D=q[1];return(0,r.useEffect)((function(){if(O.current)O.current=!1;else if(!(o>(null===g||void 0===g?void 0:g.pagesTotal)||0===o))try{C({page:o})}catch(n){(0,h.CF)("Ocorreu um erro no servidor ao tentar listar clientes","error")}}),[o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.$y,{title:"Business | Clientes"}),(0,t.jsxs)(B,{children:[(0,t.jsx)(d.h4,{}),(0,t.jsxs)("main",{children:[(0,t.jsx)("div",{className:"header-area",children:(0,t.jsx)("h3",{children:"Leads"})}),(0,t.jsx)("div",{className:"divider"}),(0,t.jsx)(S,{handleSearchClients:C,setCurrentPage:x,totalClients:i,queryKey:"leadsClients"}),(0,t.jsxs)(E,{children:[(0,t.jsxs)(a.kq,{onClick:function(){D((function(n){return"cards"===n?"list":"cards"}))},children:["Visualizar"," ","cards"===F?(0,t.jsx)(l.Ps6,{size:20}):(0,t.jsx)(l.gc_,{size:18})]}),"cards"===F?(0,t.jsx)("div",{className:"clients-list",children:null===s||void 0===s?void 0:s.map((function(e,i){return(0,t.jsx)(f.Wv,{client:e,allowInteractions:!0,animationDelay:i/1.5,length:null===s||void 0===s?void 0:s.length,onClickEye:function(n){return N((function(e){return e===n?"":n}))},showInfo:e.id===I,onClick:function(e){n(e),Z(!0)},setCurrentPage:x,isShowAllInformation:!0},"".concat(e.id))}))}):(0,t.jsx)("div",{className:"clients-tab",children:(0,t.jsx)(vn,{data:s,onClickEye:function(n){return N((function(e){return e===n?"":n}))},clientDisplayed:I,openModalClientData:function(e){n(e),Z(!0)},setCurrentPage:x})})]}),(0,t.jsx)("div",{id:"scroll-checker-clients"}),v&&(0,t.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:(0,t.jsx)(c.su,{size:"md"})})]})]}),(0,t.jsx)(u.AB,{isOpen:P,children:(0,t.jsx)(p.Yl,{setCurrentPage:x,onClose:function(){return Z(!1)}})}),(0,t.jsx)(u.AB,{isOpen:y,children:(0,t.jsx)(p.Tl,{onClose:function(){return b(!1)}})})]})}}}]);
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.