PageSourceSearch

https://xmacna.ai/_nuxt/C6uGlNnK.js

js xmacna.ai collected 2026-10-05 13:24:15 UTC 16,554 bytes, 1 lines download raw bytes

1import{_ as ne}from"./0TAyzOoh.js";import{_ as re}from"./Bsr9gsXp.js";import{_ as Y}from"./osqaVy29.js";import{_ as se}from"./D38dgDGl.js";import{_ as F}from"./C9Q6WIAX.js";import{_ as le}from"./CuEAYnGq.js";import ie from"./9pjYCGkJ.js";import{_ as ue}from"./C7ekgcrX.js";import{d as H,k as B,C as A,s as $,D as ce,b as h,o as l,A as i,z as m,a as E,c as x,B as g,e as a,m as C,n as y,f as k,r as D,g as G,t as S,F as j,h as U,w as I,E as de,T as pe,i as J,j as q,l as R,p as O,G as fe,H as me,I as ge,q as z,J as ye,K as ve,L as he,M as be,u as we,N as _e,O as ke,_ as xe}from"./Bcc8-a-q.js";import{_ as Ce}from"./DRqE0jdy.js";import{_ as $e,d as Ae}from"./D8LUW1OM.js";import{_ as Se}from"./cabmBHyt.js";import{_ as K}from"./Dgs6hFTu.js";import{U as Be}from"./CfUektVg.js";import{u as Q}from"./CdE3OqS9.js";import{u as Ue}from"./B8rpExb1.js";import{u as Te}from"./BIr6Uitx.js";import{u as je}from"./DeukoLxz.js";import{Y as Me,G as Ne}from"./CP5dzy76.js";import{h as V,S as ze}from"./5UZX8MeU.js";import"./ClL-Wh03.js";import"./C8HfZjon.js";import"./Bl7E7JBY.js";import"./BclhCOHB.js";import"./CNUNWXew.js";import"./BcP8u4_i.js";import"./DaCGjvL5.js";import"./C1Wiwm26.js";import"./CFKx4z_S.js";import"./oaYCrmSY.js";import"./D3ZPBIcn.js";const Pe={wrapper:"w-full pointer-events-auto",container:"relative overflow-hidden",inner:"w-0 flex-1",title:"text-sm font-medium text-gray-900 dark:text-white",description:"mt-1 text-sm leading-4 text-gray-500 dark:text-gray-400",descriptionOnly:"mt-0 leading-5",actions:"flex items-center gap-2 mt-3 flex-shrink-0",background:"bg-white dark:bg-gray-900",shadow:"shadow-lg",rounded:"rounded-lg",padding:"p-4",gap:"gap-3",ring:"ring-1 ring-gray-200 dark:ring-gray-800",icon:{base:"flex-shrink-0 w-5 h-5",color:"text-{color}-500 dark:text-{color}-400"},avatar:{base:"flex-shrink-0 self-center",size:"md"},progress:{base:"absolute bottom-0 end-0 start-0 h-1",background:"bg-{color}-500 dark:bg-{color}-400"},transition:{enterActiveClass:"transform ease-out duration-300 transition",enterFromClass:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterToClass:"translate-y-0 opacity-100 sm:translate-x-0",leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},default:{color:"primary",icon:null,timeout:5e3,closeButton:{icon:"i-heroicons-x-mark-20-solid",color:"gray",variant:"link",padded:!1},actionButton:{size:"xs",color:"white"}}},Oe={wrapper:"fixed flex flex-col justify-end z-[55]",position:"bottom-0 end-0",width:"w-full sm:w-96",container:"px-4 sm:px-6 py-6 space-y-3 overflow-y-auto"},Ie=H({__name:"PortalSearch",props:{placeholder:{type:String,default:"Search items"}},emits:["close"],setup(e,{emit:d}){const u=d,p=ce(),r=[{id:"projects",label:"Go to Projects",click:()=>A("/portal/projects")},{id:"files",label:"Go to Files",click:()=>A("/portal/files")},{id:"invoices",label:"Go to Invoices",click:()=>A("/portal/billing/invoices")},{id:"acccount",label:"Go to My Account",click:()=>A("/portal/account")}],b=B(()=>[{key:"search",label:t=>t&&`Results matching “${t}”...`,search:async t=>{if(c.value=!0,!t||t.length<3)return c.value=!1,[];try{const{data:w}=await $fetch("/api/portal/search",{params:{search:t,collections:["os_projects","os_tasks","os_invoices","help_articles"]},headers:p});return w.map(v=>({id:v.id,label:v.title,href:v.url,suffix:v.type}))}catch{}finally{c.value=!1}}},{key:"actions",commands:r}].filter(Boolean));function _(t){t.click?t.click():t.to?A(t.to):t.href&&A(t.href),u("close")}const s=$(null);$(""),$([]),$(null);const c=$(!1),n={wrapper:"flex flex-col flex-1 min-h-0 bg-gray-50 dark:bg-gray-800",input:{wrapper:"relative flex items-center mx-3 py-3",base:"w-full rounded border-2 border-primary-500 placeholder-gray-400 dark:placeholder-gray-500 focus:border-primary-500 focus:outline-none focus:ring-0 bg-white dark:bg-gray-900",padding:"px-4",height:"h-14",size:"text-lg",icon:{base:"pointer-events-none absolute left-3 text-primary-500 dark:text-primary-400",size:"h-6 w-6"}},group:{wrapper:"p-3 relative",label:"-mx-3 px-3 -mt-4 mb-2 py-1 text-sm font-semibold text-primary-500 dark:text-primary-400 font-semibold sticky top-0 bg-gray-50 dark:bg-gray-800 z-10",container:"space-y-1",command:{base:"flex justify-between select-none items-center rounded px-2 py-4 gap-2 relative font-medium text-sm group shadow",active:"bg-primary-500 dark:bg-primary-400 text-white",inactive:"bg-white dark:bg-gray-900",label:"flex min-w-0 justify-between",suffix:"text-xs",icon:{base:"flex-shrink-0 w-6 h-6",active:"text-white",inactive:"text-gray-400 dark:text-gray-500"}}},emptyState:{wrapper:"flex flex-col items-center justify-center flex-1 py-9",label:"text-sm text-center text-gray-500 dark:text-gray-400",queryLabel:"text-lg text-center text-gray-900 dark:text-white",icon:"w-12 h-12 mx-auto text-gray-400 dark:text-gray-500 mb-4"}};return(t,w)=>{const v=$e;return l(),h("div",null,[i(v,{ref_key:"commandPaletteRef",ref:s,loading:m(c),groups:m(b),ui:n,"onUpdate:modelValue":_},null,8,["loading","groups"])])}}});function Ve(e,d,u){let p=null;const{pause:r,resume:b,timestamp:_}=Ue({controls:!0}),s=$(null),c=B(()=>s.value?d-(_.value-s.value):0);function n(...f){p=setTimeout(()=>{p=null,s.value=null,e(...f)},c.value)}function t(){p&&(clearTimeout(p),p=null)}function w(){s.value=Date.now(),n()}function v(){t(),r()}function M(){t(),r()}function T(){n(),b(),s.value=(s.value||0)+(Date.now()-_.value)}return w(),{start:w,stop:v,pause:M,resume:T,remaining:c}}const N=J(z.ui.strategy,z.ui.notification,Pe),De=H({components:{UIcon:Be,UAvatar:F,UButton:K},inheritAttrs:!1,props:{id:{type:[String,Number],required:!0},title:{type:String,default:null},description:{type:String,default:null},icon:{type:String,default:()=>N.default.icon},avatar:{type:Object,default:null},closeButton:{type:Object,default:()=>N.default.closeButton},timeout:{type:Number,default:()=>N.default.timeout},actions:{type:Array,default:()=>[]},callback:{type:Function,default:null},color:{type:String,default:()=>N.default.color,validator(e){return["gray",...z.ui.colors].includes(e)}},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},pauseTimeoutOnHover:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:d}){const{ui:u,attrs:p}=Q("notification",q(e,"ui"),N);let r=null;const b=$(e.timeout),_=B(()=>{var f,P;return R(O(u.value.wrapper,(f=u.value.background)==null?void 0:f.replaceAll("{color}",e.color),u.value.rounded,u.value.shadow,(P=u.value.ring)==null?void 0:P.replaceAll("{color}",e.color)),e.class)}),s=B(()=>{var f;return O(u.value.progress.base,(f=u.value.progress.background)==null?void 0:f.replaceAll("{color}",e.color))}),c=B(()=>({width:`${b.value/e.timeout*100||0}%`})),n=B(()=>{var f;return O(u.value.icon.base,(f=u.value.icon.color)==null?void 0:f.replaceAll("{color}",e.color))});function t(){e.pauseTimeoutOnHover&&r&&r.pause()}function w(){e.pauseTimeoutOnHover&&r&&r.resume()}function v(){r&&r.stop(),e.callback&&e.callback(),d("close")}function M(f){r&&r.stop(),f.click&&f.click(),d("close")}
1function T(){r&&r.stop(),e.timeout&&(r=Ve(()=>{v()},e.timeout),ye(()=>{b.value=r.remaining.value}))}return fe(()=>e.timeout,T),me(T),ge(()=>{r&&r.stop()}),{ui:u,attrs:p,wrapperClass:_,progressClass:s,progressStyle:c,iconClass:n,onMouseover:t,onMouseleave:w,onClose:v,onAction:M,twMerge:R}}});function Ge(e,d,u,p,r,b){const _=Y,s=F,c=K;return l(),x(pe,C({appear:""},e.ui.transition),{default:g(()=>[a("div",C({class:e.wrapperClass,role:"status"},e.attrs,{onMouseover:d[0]||(d[0]=(...n)=>e.onMouseover&&e.onMouseover(...n)),onMouseleave:d[1]||(d[1]=(...n)=>e.onMouseleave&&e.onMouseleave(...n))}),[a("div",{class:y([e.ui.container,e.ui.rounded,e.ui.ring])},[a("div",{class:y(["flex",[e.ui.padding,e.ui.gap,{"items-start":e.description||e.$slots.description,"items-center":!e.description&&!e.$slots.description}]])},[e.icon?(l(),x(_,{key:0,name:e.icon,class:y(e.iconClass)},null,8,["name","class"])):k("",!0),e.avatar?(l(),x(s,C({key:1},{size:e.ui.avatar.size,...e.avatar},{class:e.ui.avatar.base}),null,16,["class"])):k("",!0),a("div",{class:y(e.ui.inner)},[e.title||e.$slots.title?(l(),h("p",{key:0,class:y(e.ui.title)},[D(e.$slots,"title",{title:e.title},()=>[G(S(e.title),1)])],2)):k("",!0),e.description||e.$slots.description?(l(),h("div",{key:1,class:y(e.twMerge(e.ui.description,!e.title&&!e.$slots.title&&e.ui.descriptionOnly))},[D(e.$slots,"description",{description:e.description},()=>[G(S(e.description),1)])],2)):k("",!0),(e.description||e.$slots.description)&&e.actions.length?(l(),h("div",{key:2,class:y(e.ui.actions)},[(l(!0),h(j,null,U(e.actions,(n,t)=>(l(),x(c,C({key:t},{ref_for:!0},{...e.ui.default.actionButton||{},...n},{onClick:I(w=>e.onAction(n),["stop"])}),null,16,["onClick"]))),128))],2)):k("",!0)],2),e.closeButton||!e.description&&!e.$slots.description&&e.actions.length?(l(),h("div",{key:2,class:y(e.twMerge(e.ui.actions,"mt-0"))},[!e.description&&!e.$slots.description&&e.actions.length?(l(!0),h(j,{key:0},U(e.actions,(n,t)=>(l(),x(c,C({key:t},{ref_for:!0},{...e.ui.default.actionButton||{},...n},{onClick:I(w=>e.onAction(n),["stop"])}),null,16,["onClick"]))),128)):k("",!0),e.closeButton?(l(),x(c,C({key:1,"aria-label":"Close"},{...e.ui.default.closeButton||{},...e.closeButton},{onClick:I(e.onClose,["stop"])}),null,16,["onClick"])):k("",!0)],2)):k("",!0)],2),e.timeout?(l(),h("div",{key:0,class:y(e.progressClass),style:de(e.progressStyle)},null,6)):k("",!0)],2)],16)]),_:3},16)}const W=E(De,[["render",Ge]]),Re=J(z.ui.strategy,z.ui.notifications,Oe),Fe=H({components:{UNotification:W},inheritAttrs:!1,props:{class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:d,attrs:u}=Q("notifications",q(e,"ui"),Re),p=Te(),r=be("notifications",()=>[]),b=B(()=>R(O(d.value.wrapper,d.value.position,d.value.width),e.class));return{ui:d,attrs:u,toast:p,notifications:r,wrapperClass:b}}});function He(e,d,u,p,r,b){const _=W;return l(),x(he,{to:"body"},[e.notifications.length?(l(),h("div",C({key:0,class:e.wrapperClass,role:"region"},e.attrs),[a("div",{class:y(e.ui.container)},[(l(!0),h(j,null,U(e.notifications,s=>(l(),h("div",{key:s.id},[i(_,C({ref_for:!0},s,{class:s.click&&"cursor-pointer",onClick:c=>s.click&&s.click(s),onClose:c=>e.toast.remove(s.id)}),ve({_:2},[U(e.$slots,(c,n)=>({name:n,fn:g(t=>[D(e.$slots,n,C({ref_for:!0},t))])}))]),1040,["class","onClick","onClose"])]))),128))],2)],16)):k("",!0)])}const Le=E(Fe,[["render",He]]),Ye={class:"flex h-full transition duration-150 bg-gray-100 dark:bg-gray-950"},Ee={class:"hidden p-3 md:block"},Je={class:"relative w-24 h-full bg-gray-900 rounded-panel z-50"},qe={class:"flex flex-col items-center w-full h-full py-6"},Ke={class:"flex items-center flex-shrink-0"},Qe={class:"flex flex-col justify-between flex-1 h-full gap-y-4"},We={class:"w-full px-2 mt-6 space-y-1"},Xe={class:"mt-2"},Ze={class:"flex flex-col items-center justify-center w-full px-2 space-y-2"},et={class:"mt-2"},tt={class:"fixed inset-0 z-40 flex"},ot={class:"absolute right-0 p-1 top-1 -mr-14"},at={class:"flex items-center flex-shrink-0 px-4"},nt={class:"flex-1 h-0 px-2 mt-5 overflow-y-auto"},rt={class:"flex flex-col h-full"},st={class:"space-y-1"},lt={class:"flex flex-col flex-1 overflow-y-auto"}
1,it=["onClick"],ut={class:"w-full max-w-5xl p-4 mx-auto space-y-6"},Rt={__name:"portal",setup(e){const{logout:d,user:u}=we(),p=ne;function r(){const n=$(!1);return Ae({meta_k:{usingInput:!0,handler:()=>{n.value=!n.value}}}),{showCommandPalette:n}}const b={top:[{name:"Créditos",href:"/portal",icon:"material-symbols:monetization-on"},{name:"Painel",href:"/portal/interacoes-diarias",icon:"material-symbols:bar-chart-rounded"},{name:"Atendimentos",href:"/portal/conversas-ia",icon:"material-symbols:chat-outline-rounded"},{name:"GAIA",href:"/portal/fd",icon:"material-symbols:smart-toy-outline"},{name:"Usuário",href:"/portal/account",icon:"material-symbols:account-circle-outline"}],bottom:[{name:"Help",href:"/portal/help",icon:"material-symbols:help-outline-rounded"}]},_=[[{label:"Your Profile",icon:"i-heroicons-user-circle",click:()=>{A("/portal/account#profile")}},{label:"Sign out",icon:"i-heroicons-arrow-left-on-rectangle",click:()=>d()}]],{showCommandPalette:s}=r(),c=$(!1);return(n,t)=>{const w=re,v=Y,M=se,T=F,f=le,P=ie,X=ue,Z=xe,ee=Ce,te=Ie,oe=Se,ae=Le;return l(),h("div",Ye,[a("div",Ee,[a("div",Je,[a("div",qe,[a("div",Ke,[i(w,{class:"w-20 text-white",alt:"Your Company"})]),a("div",Qe,[a("div",We,[(l(!0),h(j,null,U(b.top,o=>(l(),x(ke(o.href?m(p):"button"),{key:o.name,href:o.href??void 0,class:y([o.current?"bg-gray-800 text-white":"text-gray-100 hover:bg-gray-800 hover:text-white","group flex w-full flex-col items-center rounded-card py-3 px-2 text-xs font-bold "]),"aria-current":o.current?"page":void 0,onClick:L=>o.click?o.click():void 0},{default:g(()=>[i(v,{name:o.icon,class:y([o.current?"text-white":"text-gray-300 group-hover:text-white","h-6 w-6"]),"aria-hidden":"true"},null,8,["name","class"]),a("span",Xe,S(o.name),1)]),_:2},1032,["href","class","aria-current","onClick"]))),128))]),a("div",Ze,[(l(!0),h(j,null,U(b.bottom,o=>(l(),x(m(p),{key:o.name,href:o.href,class:y([o.current?"bg-gray-800 text-white":"text-gray-100 hover:bg-gray-800 hover:text-white","group flex w-full flex-col items-center rounded-card py-3 px-2 text-xs font-bold "]),"aria-current":o.current?"page":void 0},{default:g(()=>[i(v,{name:o.icon,class:y([o.current?"text-white":"text-gray-300 group-hover:text-white","h-6 w-6"]),"aria-hidden":"true"},null,8,["name","class"]),a("span",et,S(o.name),1)]),_:2},1032,["href","class","aria-current"]))),128)),i(M,{bg:"dark",class:""}),i(f,{class:"relative z-[70]",items:_},{default:g(()=>[a("button",null,[t[4]||(t[4]=a("span",{class:"sr-only"},"Open user menu",-1)),i(T,{class:"w-12 h-12 mx-auto",src:m(u).avatar,alt:("userName"in n?n.userName:m(je))(m(u))},null,8,["src","alt"])])]),_:1})])])])])]),i(m(ze),{as:"template",show:m(c)},{default:g(()=>[i(m(Me),{as:"div",class:"relative z-50 md:hidden",onClose:t[1]||(t[1]=o=>c.value=!1)},{default:g(()=>[i(m(V),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:g(()=>t[5]||(t[5]=[a("div",{class:"fixed inset-0 bg-gray-600 bg-opacity-75"},null,-1)])),_:1,__:[5]}),a("div",tt,[i(m(V),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:g(()=>[i(m(Ne),{class:"relative flex flex-col flex-1 w-full max-w-xs pt-5 pb-4 bg-gray-700"},{default:g(()=>[i(m(V),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:g(()=>[a("div",ot,[a("button",{type:"button",class:"flex items-center justify-center w-12 h-12 rounded-full focus:outline-none focus:ring-2 focus:ring-white",onClick:t[0]||(t[0]=o=>c.value=!1)},[i(P,{name:"heroicons:x-mark",class:"w-6 h-6 text-white","aria-hidden":"true"}),t[6]||(t[6]=a("span",{class:"sr-only"},"Close sidebar",-1))])])]),_:1}),a("div",at,[i(w,{class:"w-auto h-8",alt:"Your Company"})]),a("div",nt,[a("nav",rt,[a("div",st,[(l(!0),h(j,null,U(b.top,o=>(l(),x(m(p),{key:o.name,href:o.href,class:y([o.current?"bg-gray-800 text-white":"text-gray-100 hover:bg-gray-800 hover:text-white","group flex items-center rounded-md py-2 px-3 text-sm font-medium "]),"aria-current":o.current?"page":void 0},{default:g(()=>[i(v,{name:o.icon,class:y([o.current?"text-white":"text-gray-300 group-hover:text-white","mr-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["name","class"]),a("span",null,S(o.name),1)]),_:2},1032,["href","class","aria-current"]))),128))])])])]),_:1})]),_:1}
1),t[7]||(t[7]=a("div",{class:"flex-shrink-0 w-14","aria-hidden":"true"},null,-1))])]),_:1})]),_:1},8,["show"]),a("div",lt,[i(ee,null,{error:g(({error:o,clearError:L})=>[i(X,{type:"error"},{default:g(()=>[G(S(o),1)]),_:2},1024),a("button",{class:"mt-4 text-sm text-gray-500 underline",onClick:L},"Try again",8,it),a("p",null,"An error occurred: "+S(o),1)]),default:g(()=>[a("div",ut,[i(Z)])]),_:1})]),i(oe,{modelValue:m(s),"onUpdate:modelValue":t[3]||(t[3]=o=>_e(s)?s.value=o:null)},{default:g(()=>[i(te,{onClose:t[2]||(t[2]=o=>s.value=!1)})]),_:1},8,["modelValue"]),i(ae)])}}};export{Rt 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.