PageSourceSearch

https://imovpro.ai/assets/Suporte-Cg9BPyC_.js

js imovpro.ai collected 2026-10-05 12:49:50 UTC 9,357 bytes, 11 lines download raw bytes

1import{j as e}from"./query-DxNp_YDj.js";import{e as J,r}from"./vendor-DKTPAWVq.js";import{g as O,u as K,aR as E,a0 as Q,m as o,bk as b,d as T,h as n,aa as z,C as Y,B as F,bs as Z,bt as ee,aU as te}from"./index-x1zwJIug.js";import{S as se}from"./search-CiiK6p7D.js";import{C as P}from"./chevron-down-Bo6jdv2e.js";import{M as re}from"./message-square-BjeabzWQ.js";import{S as A}from"./send-BQ5G3n5f.js";import{S as ae}from"./shield-DXMNf6No.js";import"./ui-Cjs-gcbd.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const oe=O("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const ne=O("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]),ie={rocket:oe,video:te,"credit-card":ee,shield:ae,wrench:ne,code:Z};function le({icon:s}){const c=s?ie[s]??b:b;return e.jsx(c,{className:"h-5 w-5"})}function be(){const{t:s}=K(),{locale:c}=J(),[j,R]=r.useState([]),[B,D]=r.useState(!0),[W,H]=r.useState(null),[U,y]=r.useState(null),[i,V]=r.useState(""),[d,N]=r.useState(""),[m,w]=r.useState(""),[v,C]=r.useState(!1),[X,S]=r.useState(!1),[k,L]=r.useState(""),q=r.useCallback(async()=>{try{const t=await E.get(`/api/v1/support/faq?locale=${c??"pt"}`);R(t)}catch{}finally{D(!1)}},[c]);r.useEffect(()=>{q()},[q]);const _=t=>{H(a=>a===t?null:t),y(null)},$=t=>{y(a=>a===t?null:t)},x=d.trim(),h=m.trim(),g=d.length>0&&x.length<3,f=m.length>0&&h.length<10,G=async t=>{if(t.preventDefault(),!(!x||g||!h||f)){C(!0),L("");try{await E.post("/api/v1/support/ticket",{subject:d.trim(),message:m.trim()}),S(!0),N(""),w("")}catch{L(s("support.sendError"))}finally{C(!1)}}},I=i.trim()?j.map(t=>({...t,items:t.items.filter(a=>a.question.toLowerCase().includes(i.toLowerCase())||a.answer.toLowerCase().includes(i.toLowerCase()))})).filter(t=>t.items.length>0):j,M=i.trim().length>0;return e.jsx(Q,{children:e.jsxs("div",{className:"mx-auto w-full max-w-3xl px-4 py-8 sm:px-6 lg:px-8",children:[e.jsxs(o.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"mb-8 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl gradient-brand shadow-glow",children:e.jsx(b,{className:"h-7 w-7 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground sm:text-3xl",children:s("support.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("support.subtitle")})]}),e.jsxs(o.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.05},className:"relative mb-8",children:[e.jsx(se,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"text",value:i,onChange:t=>V(t.target.value),placeholder:s("support.searchPlaceholder"),className:"w-full rounded-xl border border-border bg-card py-3 pl-10 pr-4 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),B?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx(T,{className:"h-6 w-6 animate-spin text-primary"})}):I.length===0?e.jsx("div",{className:"rounded-2xl border border-border bg-card p-8 text-center",children:e.jsx("p",{className:"text-muted-foreground",children:s(M?"support.noResults":"support.noFaq")})}):e.jsx(o.div,{initial:{opacity:0}
11,animate:{opacity:1},transition:{delay:.1},className:"space-y-3",children:I.map((t,a)=>{const u=M||W===t.id;return e.jsxs(o.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.05*a},className:"overflow-hidden rounded-2xl border border-border bg-card shadow-soft",children:[e.jsxs("button",{type:"button",onClick:()=>_(t.id),className:n("flex w-full items-center gap-3 px-5 py-4 text-left transition-colors",u?"bg-primary/5":"hover:bg-muted/50"),children:[e.jsx("div",{className:n("flex h-9 w-9 shrink-0 items-center justify-center rounded-xl transition-colors",u?"gradient-brand text-white shadow-glow":"bg-muted text-muted-foreground"),children:e.jsx(le,{icon:t.icon})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("support.questionsCount",{count:t.items.length})})]}),e.jsx(P,{className:n("h-5 w-5 shrink-0 text-muted-foreground transition-transform duration-200",u&&"rotate-180")})]}),e.jsx(z,{initial:!1,children:u&&e.jsx(o.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:e.jsx("div",{className:"border-t border-border/50 px-5 py-2",children:t.items.map(l=>{const p=U===l.id;return e.jsxs("div",{className:"border-b border-border/30 last:border-b-0",children:[e.jsxs("button",{type:"button",onClick:()=>$(l.id),className:"flex w-full items-center gap-3 py-3.5 text-left group",children:[e.jsx("div",{className:n("flex h-6 w-6 shrink-0 items-center justify-center rounded-lg transition-colors",p?"bg-primary/10 text-primary":"bg-transparent text-muted-foreground group-hover:bg-muted"),children:e.jsx(re,{className:"h-3.5 w-3.5"})}),e.jsx("span",{className:n("flex-1 text-sm font-medium transition-colors",p?"text-primary":"text-foreground/90 group-hover:text-foreground"),children:l.question}),e.jsx(P,{className:n("h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200",p&&"rotate-180")})]}),e.jsx(z,{initial:!1,children:p&&e.jsx(o.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15,ease:"easeInOut"},className:"overflow-hidden",children:e.jsx("div",{className:"pb-4 pl-9 pr-2",children:e.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:l.answer})})})})]},l.id)})})})})]},t.id)})}),e.jsx(o.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.2},className:"mt-10",children:e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 shadow-soft sm:p-8",children:[e.jsxs("div",{className:"mb-6 text-center",children:[e.jsx("div",{className:"mx-auto mb-3 flex h-11 w-11 items-center justify-center rounded-xl bg-primary/10",children:e.jsx(A,{className:"h-5 w-5 text-primary"})}),e.jsx("h2",{className:"text-lg font-bold text-foreground",children:s("support.contactTitle")}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s("support.contactSubtitle")})]}),X?e.jsxs(o.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"flex flex-col items-center gap-3 py-6",children:[e.jsx(Y,{className:"h-12 w-12 text-green-500"}),e.jsx("p",{className:"text-center font-medium text-foreground",children:s("support.sentTitle")}),e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:s("support.sentDesc")}),e.jsx(F,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>S(!1),children:s("support.sendAnother")})]}):e.jsxs("form",{onSubmit:G,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-subject",className:"mb-1.5 block text-sm font-medium text-foreground",children:s("support.subject")}),e.jsx("input",{id:"support-subject",type:"text",value:d,onChange:t=>N(t.target.value),placeholder:s("support.subjectPlaceholder"),maxLength:200,required:!0,className:"w-full rounded-xl border border-border bg-background px-4 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"}),g&&e.jsx("p",{className:"mt-1 text-xs text-destructive",children:s("support.minChars",{count:3})})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"support-message",className:"mb-1.5 block text-sm font-medium text-foreground",children:s("support.message")}),e.jsx("textarea",{id:"support-message",value:m,onChange:t=>w(t.target.value),placeholder:s("support.messagePlaceholder"),maxLength:5e3,required:!0,rows:5,className:"w-full resize-none rounded-xl border border-border bg-background px-4 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"}),f&&e.jsx("p",{className:"mt-1 text-xs text-destructive",children:s("support.minChars",{count:10})})]}),k&&e.jsx("p",{className:"text-sm text-destructive",children:k}),e.jsx(F,{type:"submit",disabled:v||!x||g||!h||f,className:"w-full gradient-brand text-white shadow-glow hover:opacity-95",children:v?e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"mr-2 h-4 w-4 animate-spin"}),s("support.sending")]}):e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"mr-2 h-4 w-4"}),s("support.send")]})})]})]})})]})})}export{be as default};

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.