@iclips/ui 1.2.12 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/illustrations.d.ts +9 -13
- package/dist/components/ui/illustrations.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +621 -683
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -220,5 +220,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
220
220
|
</html>
|
|
221
221
|
`),p.document.close(),p.onload=()=>{setTimeout(()=>{p.print(),p.close(),a==null||a()},250)}}catch(u){i==null||i(u),console.error("Erro ao imprimir contrato:",u)}},downloadPDF:()=>{try{s==null||s(),setTimeout(()=>{console.log("PDF gerado (simulado):",{contractNumber:e,timestamp:new Date().toISOString()}),o==null||o()},1500),console.info("usePrintContract: downloadPDF é uma implementação simulada. Para gerar PDFs reais, integre com html2pdf.js ou jsPDF. Veja a documentação do hook para exemplos.")}catch(u){f==null||f(u),console.error("Erro ao gerar PDF:",u)}}}}function VI({data:t,logo:e,showActions:n=!0,showSummary:r=!0,showServices:a=!0,showInfo:i=!1,className:s,onPrintStart:o,onPrintSuccess:f,onPrintError:c,onDownloadStart:d,onDownloadSuccess:u,onDownloadError:p}){const h=T.useRef(null),{printContract:m,downloadPDF:g}=M2(h,t.numeroContrato,{onPrintStart:o,onPrintSuccess:f,onPrintError:c,onDownloadStart:d,onDownloadSuccess:u,onDownloadError:p}),b=x=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(x);return l.jsxs("div",{className:v("space-y-6",s),children:[n&&l.jsxs(Mr,{className:"no-print",children:[l.jsx(sa,{children:l.jsxs(oa,{className:"flex items-center justify-between",children:[l.jsx("span",{children:"Ações do Documento"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(H,{variant:"outline",size:"sm",onClick:g,className:"gap-2",children:[l.jsx(k.Download,{className:"h-4 w-4"}),"Download PDF"]}),l.jsxs(H,{variant:"default",size:"sm",onClick:m,className:"gap-2",children:[l.jsx(k.Printer,{className:"h-4 w-4"}),"Imprimir"]})]})]})}),r&&l.jsx(la,{children:l.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Nº do Contrato"}),l.jsx("p",{className:"font-semibold",children:t.numeroContrato})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Cliente"}),l.jsx("p",{className:"font-semibold",children:t.cliente.nome})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Valor do Fee"}),l.jsx("p",{className:"font-semibold",children:b(t.valorFee)})]})]})})]}),l.jsx("div",{className:"bg-white rounded-lg shadow-sm p-8",children:l.jsx("div",{ref:h,children:l.jsx(tu,{data:t,showPreview:!0,logo:e,showServices:a})})}),i&&l.jsxs(Mr,{className:"no-print",children:[l.jsx(sa,{children:l.jsxs(oa,{className:"flex items-center gap-2",children:[l.jsx(k.Eye,{className:"h-5 w-5"}),"Sobre este Template"]})}),l.jsx(la,{children:l.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[l.jsxs("p",{children:["✅ ",l.jsx("strong",{children:"Design System:"})," Utiliza a paleta de cores e tipografia do iClips"]}),l.jsxs("p",{children:["✅ ",l.jsx("strong",{children:"Impressão Otimizada:"})," Layout preparado para impressão em A4"]}),l.jsxs("p",{children:["✅ ",l.jsx("strong",{children:"Componentes Reutilizáveis:"})," PrintHeader, PrintFooter, PrintTable, PrintSignature"]}),l.jsxs("p",{children:["✅ ",l.jsx("strong",{children:"Quebras de Página:"})," Configuradas automaticamente para evitar cortes"]}),l.jsxs("p",{children:["✅ ",l.jsx("strong",{children:"Profissional:"})," Layout clean e adequado para documentos legais"]})]})})]})]})}const j2=T.forwardRef(({data:t,logo:e,showServices:n=!0,className:r},a)=>l.jsx("div",{className:v("bg-white rounded-lg shadow-sm p-8",r),ref:a,children:l.jsx(tu,{data:t,showPreview:!0,logo:e,showServices:n})}));j2.displayName="ContractPrintPreview";const Go=T.forwardRef(({className:t,inputClassName:e,containerClassName:n,style:r,value:a,defaultValue:i=0,onChange:s,min:o=Number.MIN_SAFE_INTEGER,max:f=Number.MAX_SAFE_INTEGER,step:c=1,precision:d=0,formatOptions:u,locale:p="pt-BR",allowMouseWheel:h=!1,clampValueOnBlur:m=!0,keepWithinRange:g=!0,showButtons:b=!0,buttonLayout:x="vertical",buttonPosition:w="right",disabled:j,readOnly:y,...N},C)=>{const[L,S]=T.useState(i),[I,z]=T.useState(""),[P,_]=T.useState(!1),V=T.useRef(null),Y=a!==void 0?a:L,X=T.useCallback(F=>u?new Intl.NumberFormat(p,u).format(F):F.toFixed(d),[u,p,d]),E=F=>{const Se=F.replace(/[^\d,.-]/g,"").replace(",","."),Oe=parseFloat(Se);return isNaN(Oe)?0:Oe},Q=F=>g?Math.min(Math.max(F,o),f):F,q=T.useCallback((F,oe=!1)=>{const Se=oe?Q(F):F;a===void 0&&S(Se),s&&s(Se)},[a,s,o,f,g]);T.useEffect(()=>{P||z(X(Y))},[Y,X,P]);const fe=()=>{if(j||y)return;const F=Y+c;F<=f&&q(F)},ve=()=>{if(j||y)return;const F=Y-c;F>=o&&q(F)},Ie=F=>{const Se=F.target.value.replace(/[^\d,.-]/g,"");z(Se);const Oe=E(Se);q(Oe,!1)},Ce=F=>{if(_(!1),m){const oe=Q(Y);q(oe,!1),z(X(oe))}else z(X(Y));N.onBlur&&N.onBlur(F)},G=F=>{_(!0),z(Y.toString()),F.target.select(),N.onFocus&&N.onFocus(F)},K=F=>{j||y||(F.key==="ArrowUp"?(F.preventDefault(),fe()):F.key==="ArrowDown"&&(F.preventDefault(),ve()),N.onKeyDown&&N.onKeyDown(F))},A=F=>{!h||j||y||!P||(F.preventDefault(),F.deltaY<0?fe():F.deltaY>0&&ve())};T.useImperativeHandle(C,()=>V.current);const U=()=>{if(!b)return null;const F=l.jsx("button",{type:"button",onClick:fe,disabled:j||y||Y>=f,tabIndex:-1,"aria-label":"Increment",className:v("inline-flex items-center justify-center transition-colors","hover:bg-muted active:bg-accent","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",x==="vertical"&&"h-4 w-7 rounded-sm",x==="horizontal"&&"h-9 w-9 rounded-l-md border-r border-input bg-input-background"),children:x==="vertical"?l.jsx(k.ChevronUp,{className:"h-3 w-3"}):l.jsx(k.Plus,{className:"h-4 w-4"})},"inc"),oe=l.jsx("button",{type:"button",onClick:ve,disabled:j||y||Y<=o,tabIndex:-1,"aria-label":"Decrement",className:v("inline-flex items-center justify-center transition-colors","hover:bg-muted active:bg-accent","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",x==="vertical"&&"h-4 w-7 rounded-sm",x==="horizontal"&&"h-9 w-9 rounded-r-md border-l border-input bg-input-background"),children:x==="vertical"?l.jsx(k.ChevronDown,{className:"h-3 w-3"}):l.jsx(k.Minus,{className:"h-4 w-4"})},"dec");if(x==="vertical")return l.jsxs("div",{className:v("flex flex-col items-center justify-center gap-[2px] self-stretch px-1 shrink-0 overflow-hidden",w==="right"?"order-2 border-l border-input rounded-r-md":"order-[-1] border-r border-input rounded-l-md"),children:[F,oe]});if(x==="horizontal")return[oe,F]};return x==="horizontal"&&b?l.jsxs("div",{className:v("inline-flex items-center w-full",n),style:r,children:[U(),l.jsx("input",{ref:V,type:"text",inputMode:"decimal","data-slot":"input",className:v("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 border-y px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:relative focus-visible:z-10 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","text-center tabular-nums",t),value:I,onChange:Ie,onBlur:Ce,onFocus:G,onKeyDown:K,onWheel:A,disabled:j,readOnly:y,"aria-valuemin":o,"aria-valuemax":f,"aria-valuenow":Y,role:"spinbutton",...N})]}):l.jsxs("div",{className:v("inline-flex w-full items-stretch",n),style:r,children:[l.jsx("input",{ref:V,type:"text",inputMode:"decimal","data-slot":"input",className:v("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","tabular-nums",b&&x==="vertical"&&w==="right"&&"text-right rounded-r-none border-r-0",b&&x==="vertical"&&w==="left"&&"text-left rounded-l-none border-l-0",!b&&"text-right",e,t),value:I,onChange:Ie,onBlur:Ce,onFocus:G,onKeyDown:K,onWheel:A,disabled:j,readOnly:y,"aria-valuemin":o,"aria-valuemax":f,"aria-valuenow":Y,role:"spinbutton",...N}),U()]})});Go.displayName="NumberInput";function nu({className:t,...e}){return l.jsx("textarea",{"data-slot":"textarea",className:v("resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function C2({className:t,...e}){return l.jsx("div",{"data-slot":"input-group",role:"group",className:v("group/input-group cn-input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",t),...e})}const GI=$t.cva("cn-input-group-addon flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"cn-input-group-addon-align-inline-start order-first","inline-end":"cn-input-group-addon-align-inline-end order-last","block-start":"cn-input-group-addon-align-block-start order-first w-full justify-start","block-end":"cn-input-group-addon-align-block-end order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function gc({className:t,align:e="inline-start",...n}){return l.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:v(GI({align:e}),t),onClick:r=>{var a,i;r.target.closest("button")||(i=(a=r.currentTarget.parentElement)==null?void 0:a.querySelector("input"))==null||i.focus()},...n})}const YI=$t.cva("flex items-center gap-2 text-sm shadow-none",{variants:{size:{default:"h-7",sm:"h-6",xs:"h-5","icon-xs":"size-5"}},defaultVariants:{size:"default"}});function QI({className:t,size:e,variant:n="ghost",type:r="button",...a}){return l.jsx(H,{"data-slot":"input-group-button",type:r,variant:n,className:v(YI({size:e}),t),...a})}function WI({className:t,...e}){return l.jsx("span",{"data-slot":"input-group-text",className:v("text-muted-foreground text-sm",t),...e})}function $I({className:t,...e}){return l.jsx(Ht,{"data-slot":"input-group-control",className:v("cn-input-group-input flex-1",t),...e})}function ZI({className:t,...e}){return l.jsx(nu,{"data-slot":"input-group-control",className:v("cn-input-group-textarea flex-1 resize-none",t),...e})}const qI={BRL:{symbol:"R$",icon:k.Coins,locale:"pt-BR"},USD:{symbol:"$",icon:k.DollarSign,locale:"en-US"},EUR:{symbol:"€",icon:k.Euro,locale:"de-DE"}},L2=T.forwardRef(({className:t,currency:e="BRL",locale:n,showSymbol:r=!1,symbolPosition:a="start",min:i=0,...s},o)=>{const f=qI[e],c=n||f.locale,d=f.icon;return r?l.jsxs(C2,{className:t,children:[a==="start"&&l.jsx(gc,{children:l.jsx(d,{className:"h-4 w-4 text-muted-foreground"})}),l.jsx(Go,{ref:o,className:v("border-none shadow-none ring-0 focus-visible:ring-0 focus-visible:border-transparent",a==="start"?"pl-2":"pr-2"),min:i,precision:2,formatOptions:{style:"currency",currency:e,minimumFractionDigits:2,maximumFractionDigits:2},locale:c,...s}),a==="end"&&l.jsx(gc,{align:"inline-end",children:l.jsx(d,{className:"h-4 w-4 text-muted-foreground"})})]}):l.jsx(Go,{ref:o,className:t,min:i,precision:2,formatOptions:{style:"currency",currency:e,minimumFractionDigits:2,maximumFractionDigits:2},locale:c,...s})});L2.displayName="CurrencyInput";const KI=()=>{const t=new Date;return t.setHours(0,0,0,0),[{label:"Hoje",value:{from:t,to:t}},{label:"Últimos 7 dias",value:{from:B.subDays(t,6),to:t}},{label:"Últimos 30 dias",value:{from:B.subDays(t,29),to:t}},{label:"Este mês",value:{from:B.startOfMonth(t),to:t}},{label:"Mês passado",value:{from:B.startOfMonth(B.subMonths(t,1)),to:B.endOfMonth(B.subMonths(t,1))}}]};function N2({value:t,onChange:e,placeholder:n="Selecione um período",disabled:r=!1,minDate:a,maxDate:i,dateFormat:s="dd/MM/yyyy",locale:o=yt,className:f,error:c=!1,numberOfMonths:d=2,showTime:u=!1,timeFormat:p="24h",minuteStep:h=15,presets:m,showDefaultPresets:g=!0,id:b,name:x}){const[w,j]=T.useState(!1),[y,N]=T.useState(""),[C,L]=T.useState(!1),S=u?`${s} HH:mm`:s,I=T.useMemo(()=>u?["dd/MM/yyyy HH:mm","dd/MM/yy HH:mm","d/M/yyyy HH:mm","d/M/yy HH:mm"]:["dd/MM/yyyy","dd/MM/yy","d/M/yyyy","d/M/yy"],[u]);T.useEffect(()=>{if(t!=null&&t.from){const G=B.format(t.from,S,{locale:o}),K=t.to?B.format(t.to,S,{locale:o}):"";N(K?`${G} → ${K}`:G),L(!1)}else N(""),L(!1)},[t,S,o]);const z=T.useMemo(()=>[...g?KI():[],...m||[]],[m,g]),P=T.useMemo(()=>{if(!(t!=null&&t.from))return"00:00";const G=t.from.getHours().toString().padStart(2,"0"),K=t.from.getMinutes().toString().padStart(2,"0");return`${G}:${K}`},[t==null?void 0:t.from]),_=T.useMemo(()=>{if(!(t!=null&&t.to))return"23:59";const G=t.to.getHours().toString().padStart(2,"0"),K=t.to.getMinutes().toString().padStart(2,"0");return`${G}:${K}`},[t==null?void 0:t.to]),V=G=>{if(!G){e==null||e(void 0);return}if(u){if(G.from){const[K,A]=P.split(":").map(Number);G.from.setHours(K,A,0,0)}if(G.to){const[K,A]=_.split(":").map(Number);G.to.setHours(K,A,0,0)}}else G.from&&G.from.setHours(0,0,0,0),G.to&&G.to.setHours(23,59,59,999);e==null||e(G)},Y=G=>{if(!(t!=null&&t.from))return;const K=new Date(t.from),[A,U]=G.split(":").map(Number);K.setHours(A,U,0,0),e==null||e({...t,from:K})},X=G=>{if(!(t!=null&&t.to))return;const K=new Date(t.to),[A,U]=G.split(":").map(Number);K.setHours(A,U,0,0),e==null||e({...t,to:K})},E=G=>{const K={from:new Date(G.value.from),to:new Date(G.value.to)};if(u){const[A,U]=P.split(":").map(Number),[F,oe]=_.split(":").map(Number);K.from.setHours(A,U,0,0),K.to.setHours(F,oe,0,0)}e==null||e(K)},Q=G=>{const K=G.trim();if(!K)return null;for(const A of I)try{const U=B.parse(K,A,new Date);if(B.isValid(U)){if(a&&U<a||i&&U>i)continue;return U}}catch{continue}return null},q=G=>{const K=G.trim();if(!K)return null;const A=["→","-","até","a"];let U=null,F=null;for(const oe of A)if(K.includes(oe)){const Se=K.split(oe).map(Oe=>Oe.trim());if(Se.length===2&&(U=Q(Se[0]),F=Q(Se[1]),U&&F))break}return U||(U=Q(K),U&&(F=new Date(U))),!U||!F?null:(U>F&&([U,F]=[F,U]),{from:U,to:F})},fe=G=>{const K=G.target.value;N(K),L(!1)},ve=()=>{if(!y.trim()){e==null||e(void 0),L(!1);return}const G=q(y);G?(e==null||e(G),L(!1)):L(!0)},Ie=G=>{if(G.key==="Enter")G.preventDefault(),ve(),C||j(!0);else if(G.key==="Escape"){if(G.preventDefault(),t!=null&&t.from){const K=B.format(t.from,S,{locale:o}),A=t.to?B.format(t.to,S,{locale:o}):"";N(A?`${K} → ${A}`:K)}else N("");L(!1)}},Ce=G=>{G.stopPropagation(),e==null||e(void 0),N(""),L(!1)};return l.jsxs(ot,{open:w,onOpenChange:j,children:[l.jsx(Ze,{asChild:!0,children:l.jsxs("div",{className:"relative w-full",children:[l.jsx(Ht,{id:b,name:x,value:y,onChange:fe,onBlur:ve,onKeyDown:Ie,placeholder:n,disabled:r,"aria-invalid":c||C,className:v("pr-20",(c||C)&&"border-destructive focus-visible:ring-destructive/20",f)}),l.jsxs("div",{className:"absolute inset-y-0 right-0 flex items-center gap-1 pr-1",children:[y&&!r&&l.jsxs(H,{type:"button",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 hover:bg-transparent",onClick:Ce,tabIndex:-1,children:[l.jsx(k.X,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),l.jsx("span",{className:"sr-only",children:"Limpar"})]}),l.jsxs(H,{type:"button",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 hover:bg-transparent",disabled:r,onClick:()=>j(!0),tabIndex:-1,children:[l.jsx(k.CalendarIcon,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("span",{className:"sr-only",children:"Abrir calendário"})]})]})]})}),l.jsx(qe,{className:"w-auto p-0",align:"start",children:l.jsxs("div",{className:"flex",children:[z.length>0&&l.jsxs("div",{className:"border-r p-3 space-y-1 min-w-[140px]",children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Atalhos"}),z.map(G=>l.jsx(H,{variant:"ghost",size:"sm",className:"w-full justify-start text-sm h-8",onClick:()=>E(G),children:G.label},G.label))]}),l.jsxs("div",{children:[l.jsx(Qo,{mode:"range",selected:t,onSelect:V,numberOfMonths:d,disabled:G=>!!(a&&G<a||i&&G>i),locale:o,autoFocus:!0}),u&&(t==null?void 0:t.from)&&(t==null?void 0:t.to)&&l.jsxs("div",{className:"border-t p-3 flex gap-6",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Hora início"}),l.jsx(pi,{value:P,onChange:Y,format:p,minuteStep:h,variant:"select",showIcon:!1})]}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Hora fim"}),l.jsx(pi,{value:_,onChange:X,format:p,minuteStep:h,variant:"select",showIcon:!1})]})]}),l.jsxs("div",{className:"border-t p-3 flex justify-end gap-2",children:[l.jsx(H,{variant:"outline",size:"sm",onClick:()=>{e==null||e(void 0)},children:"Limpar"}),l.jsx(H,{size:"sm",onClick:()=>j(!1),children:"Confirmar"})]})]})]})})]})}N2.displayName="DateRangePicker";var XI=pN,eD=ke.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),tD=eD;const ru=$t.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function k2({className:t,variant:e,size:n,...r}){return l.jsx(Dx.Root,{"data-slot":"toggle",className:v(ru({variant:e,size:n,className:t})),...r})}const nt=({onClick:t,isActive:e=!1,disabled:n=!1,children:r,title:a})=>l.jsx(k2,{pressed:e,onPressedChange:t,disabled:n,size:"sm",className:"h-8 w-8 p-0",title:a,children:r}),nD=({editor:t,variant:e})=>{if(!t)return null;const n=()=>{const a=t.getAttributes("link").href,i=window.prompt("URL",a);if(i!==null){if(i===""){t.chain().focus().extendMarkRange("link").unsetLink().run();return}t.chain().focus().extendMarkRange("link").setLink({href:i}).run()}},r=()=>{const a=window.prompt("URL da imagem");a&&t.chain().focus().setImage({src:a}).run()};return l.jsxs("div",{className:v("flex flex-wrap items-center gap-1 p-2 border-b bg-muted/30 sticky top-0 z-10",e==="full"?"px-4 py-2":"px-2 py-1"),children:[l.jsxs("div",{className:"flex items-center gap-0.5 mr-2",children:[l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>t.chain().focus().undo().run(),disabled:!t.can().undo(),children:l.jsx(k.Undo,{className:"h-4 w-4"})}),l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>t.chain().focus().redo().run(),disabled:!t.can().redo(),children:l.jsx(k.Redo,{className:"h-4 w-4"})})]}),l.jsx(Hn,{orientation:"vertical",className:"h-6 mx-1"}),e==="full"&&l.jsxs(l.Fragment,{children:[l.jsx(nt,{onClick:()=>t.chain().focus().toggleHeading({level:1}).run(),isActive:t.isActive("heading",{level:1}),title:"Título 1",children:l.jsx(k.Heading1,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleHeading({level:2}).run(),isActive:t.isActive("heading",{level:2}),title:"Título 2",children:l.jsx(k.Heading2,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleHeading({level:3}).run(),isActive:t.isActive("heading",{level:3}),title:"Título 3",children:l.jsx(k.Heading3,{className:"h-4 w-4"})}),l.jsx(Hn,{orientation:"vertical",className:"h-6 mx-1"})]}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleBold().run(),isActive:t.isActive("bold"),title:"Negrito",children:l.jsx(k.Bold,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleItalic().run(),isActive:t.isActive("italic"),title:"Itálico",children:l.jsx(k.Italic,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleUnderline().run(),isActive:t.isActive("underline"),title:"Sublinhado",children:l.jsx(k.Underline,{className:"h-4 w-4"})}),e==="full"&&l.jsx(nt,{onClick:()=>t.chain().focus().toggleStrike().run(),isActive:t.isActive("strike"),title:"Tachado",children:l.jsx(k.Strikethrough,{className:"h-4 w-4"})}),l.jsx(Hn,{orientation:"vertical",className:"h-6 mx-1"}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleBulletList().run(),isActive:t.isActive("bulletList"),title:"Lista com marcadores",children:l.jsx(k.List,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleOrderedList().run(),isActive:t.isActive("orderedList"),title:"Lista numerada",children:l.jsx(k.ListOrdered,{className:"h-4 w-4"})}),e==="full"&&l.jsxs(l.Fragment,{children:[l.jsx(nt,{onClick:()=>t.chain().focus().setTextAlign("left").run(),isActive:t.isActive({textAlign:"left"}),title:"Alinhar à esquerda",children:l.jsx(k.AlignLeft,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:()=>t.chain().focus().setTextAlign("center").run(),isActive:t.isActive({textAlign:"center"}),title:"Centralizar",children:l.jsx(k.AlignCenter,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:()=>t.chain().focus().setTextAlign("right").run(),isActive:t.isActive({textAlign:"right"}),title:"Alinhar à direita",children:l.jsx(k.AlignRight,{className:"h-4 w-4"})})]}),l.jsx(Hn,{orientation:"vertical",className:"h-6 mx-1"}),l.jsx(nt,{onClick:()=>t.chain().focus().toggleBlockquote().run(),isActive:t.isActive("blockquote"),title:"Citação",children:l.jsx(k.Quote,{className:"h-4 w-4"})}),l.jsx(nt,{onClick:n,isActive:t.isActive("link"),title:"Link",children:l.jsx(k.Link,{className:"h-4 w-4"})}),e==="full"&&l.jsx(nt,{onClick:r,title:"Imagem",children:l.jsx(k.Image,{className:"h-4 w-4"})})]})};function rD({content:t="",onChange:e,placeholder:n="Comece a escrever...",variant:r="simple",className:a,readOnly:i=!1,label:s}){var c,d;const o=T.useMemo(()=>[zg.configure({heading:{levels:[1,2,3]}}),Og.configure({HTMLAttributes:{class:"rounded-lg border shadow-sm max-w-full"}}),XI.configure({placeholder:n}),tD.configure({types:["heading","paragraph"]})],[n]),f=ag({extensions:o,content:t,editable:!i,onUpdate:({editor:u})=>{e==null||e(u.getHTML())},editorProps:{attributes:{class:v("prose prose-stone dark:prose-invert max-w-none focus:outline-none","prose-headings:font-semibold prose-headings:tracking-tight","prose-h1:text-3xl prose-h2:text-2xl prose-h3:text-xl","prose-p:leading-7 prose-p:my-3","prose-blockquote:border-l-4 prose-blockquote:border-primary/50 prose-blockquote:pl-4 prose-blockquote:italic","prose-ul:list-disc prose-ul:pl-6 prose-ol:list-decimal prose-ol:pl-6","prose-img:rounded-lg prose-img:shadow-md prose-img:my-6",r==="full"?"min-h-[400px] p-8":"min-h-[120px] px-3 py-2")}}});return f?l.jsxs("div",{className:v("flex flex-col w-full",a),children:[s&&l.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:s}),l.jsxs("div",{className:v("border rounded-lg bg-background overflow-hidden transition-shadow focus-within:ring-2 focus-within:ring-primary/20",i&&"opacity-80 bg-muted/30 pointer-events-none border-transparent"),children:[!i&&l.jsx(nD,{editor:f,variant:r}),l.jsx("div",{className:v("bg-background relative",r==="full"?"bg-white dark:bg-zinc-950":""),children:l.jsx(sd,{editor:f})})]}),!i&&r==="full"&&l.jsxs("div",{className:"text-xs text-muted-foreground mt-1.5 text-right px-1",children:[((d=(c=f.storage.characterCount)==null?void 0:c.words)==null?void 0:d.call(c))||0," palavras"]})]}):null}function aD({...t}){return l.jsx(Kn.Drawer.Root,{"data-slot":"drawer",...t})}const S2=T.forwardRef(({...t},e)=>l.jsx(Kn.Drawer.Trigger,{ref:e,"data-slot":"drawer-trigger",...t}));S2.displayName="DrawerTrigger";function iD({...t}){return l.jsx(Kn.Drawer.Portal,{"data-slot":"drawer-portal",...t})}const T2=T.forwardRef(({...t},e)=>l.jsx(Kn.Drawer.Close,{ref:e,"data-slot":"drawer-close",...t}));T2.displayName="DrawerClose";const I2=T.forwardRef(({className:t,...e},n)=>l.jsx(Kn.Drawer.Overlay,{ref:n,"data-slot":"drawer-overlay",className:v("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e}));I2.displayName="DrawerOverlay";const D2=T.forwardRef(({className:t,children:e,...n},r)=>l.jsxs(iD,{"data-slot":"drawer-portal",children:[l.jsx(I2,{}),l.jsxs(Kn.Drawer.Content,{ref:r,"data-slot":"drawer-content",className:v("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...n,children:[l.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e]})]}));D2.displayName="DrawerContent";function sD({className:t,...e}){return l.jsx("div",{"data-slot":"drawer-header",className:v("flex flex-col gap-1.5 p-4",t),...e})}function oD({className:t,...e}){return l.jsx("div",{"data-slot":"drawer-footer",className:v("mt-auto flex flex-col gap-2 p-4",t),...e})}const E2=T.forwardRef(({className:t,...e},n)=>l.jsx(Kn.Drawer.Title,{ref:n,"data-slot":"drawer-title",className:v("text-foreground font-semibold",t),...e}));E2.displayName="DrawerTitle";const A2=T.forwardRef(({className:t,...e},n)=>l.jsx(Kn.Drawer.Description,{ref:n,"data-slot":"drawer-description",className:v("text-muted-foreground text-sm",t),...e}));A2.displayName="DrawerDescription";function lD({value:t,options:e,onValueChange:n,onCancel:r,disabled:a=!1,variant:i="default",confirmTitle:s="Confirmar alteração",confirmDescription:o="Tem certeza que deseja alterar este valor?",confirmButtonText:f="Confirmar",cancelButtonText:c="Cancelar",skipConfirmation:d=!1,isLoading:u=!1,renderValue:p,className:h,...m},g){const[b,x]=T.useState(null),[w,j]=T.useState(!1),[y,N]=T.useState(!1),[C,L]=T.useState(!1),S=T.useMemo(()=>e.find(E=>E.value===t),[e,t]),I=T.useMemo(()=>b?e.find(E=>E.value===b):null,[e,b]),z=T.useCallback(E=>{if(E===t){N(!1);return}x(E),N(!1),d?P(E):j(!0)},[t,d]),P=T.useCallback(async E=>{const Q=E??b;if(Q){L(!0);try{await n(Q),j(!1),x(null)}catch(q){console.error("Error confirming value change:",q)}finally{L(!1)}}},[b,n]),_=T.useCallback(()=>{j(!1),x(null),r==null||r()},[r]),V=T.useCallback(()=>p&&S?p(t,S):S?l.jsxs(l.Fragment,{children:[S.icon,S.label]}):t,[p,t,S]),Y=(S==null?void 0:S.variant)||i,X=S==null?void 0:S.className;return a?l.jsx("div",{ref:g,className:v("inline-flex",h),...m,children:l.jsx(he,{variant:Y,className:X,children:V()})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:g,className:v("inline-flex",h),...m,children:l.jsxs(Bi,{open:y,onOpenChange:N,children:[l.jsx(Hi,{asChild:!0,disabled:u,children:l.jsxs(he,{variant:Y,className:v("cursor-pointer hover:opacity-80 transition-opacity gap-1.5",u&&"opacity-50 cursor-not-allowed",X),children:[V(),!u&&l.jsx(k.ChevronDown,{className:"h-3 w-3"})]})}),l.jsx(Fi,{align:"start",className:"w-48",children:e.map(E=>l.jsxs(mr,{onClick:()=>z(E.value),className:"gap-2",children:[E.icon&&l.jsx("span",{className:"w-4 h-4",children:E.icon}),l.jsx("span",{className:"flex-1",children:E.label}),E.value===t&&l.jsx(k.Check,{className:"h-4 w-4 text-primary"})]},String(E.value)))})]})}),l.jsx(Ui,{open:w,onOpenChange:j,children:l.jsxs(_i,{children:[l.jsxs(Ji,{children:[l.jsx(Vi,{children:s}),l.jsx(Gi,{children:o})]}),I&&l.jsxs("div",{className:"flex items-center gap-3 py-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"De:"}),l.jsxs(he,{variant:(S==null?void 0:S.variant)||i,className:S==null?void 0:S.className,children:[S==null?void 0:S.icon,(S==null?void 0:S.label)||t]})]}),l.jsx("span",{className:"text-muted-foreground",children:"→"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Para:"}),l.jsxs(he,{variant:I.variant||i,className:I.className,children:[I.icon,I.label]})]})]}),l.jsxs(Zo,{children:[l.jsx(H,{variant:"outline",onClick:_,disabled:C,children:c}),l.jsx(H,{onClick:()=>P(),disabled:C,children:C?"Confirmando...":f})]})]})})]})}const z2=T.forwardRef(lD);z2.displayName="EditableBadge";const fD={"first-use":"bg-primary/8 text-primary",cleared:"bg-success/10 text-success","no-results":"bg-muted text-muted-foreground",error:"bg-destructive/10 text-destructive"};function cD({icon:t,title:e,description:n,variant:r="first-use",primaryAction:a,secondaryAction:i,className:s}){return l.jsxs("div",{className:v("flex flex-col items-center justify-center gap-4 py-12 px-6 text-center",s),role:"status","aria-live":"polite",children:[l.jsx("div",{className:v("flex size-16 items-center justify-center rounded-2xl",fD[r]),"aria-hidden":"true",children:l.jsx(t,{className:"size-8"})}),l.jsxs("div",{className:"max-w-sm space-y-1.5",children:[l.jsx("h3",{className:"text-base font-semibold leading-snug text-foreground",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n})]}),(a||i)&&l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 pt-1",children:[a&&l.jsx(H,{variant:a.variant??"default",onClick:a.onClick,children:a.label}),i&&l.jsx(H,{variant:i.variant??"outline",onClick:i.onClick,children:i.label})]})]})}function O2({className:t,...e}){return l.jsx(Yo.Root,{"data-slot":"tabs",className:v("flex flex-col gap-2",t),...e})}function P2({className:t,...e}){return l.jsx(Yo.List,{"data-slot":"tabs-list",className:v("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",t),...e})}function _s({className:t,...e}){return l.jsx(Yo.Trigger,{"data-slot":"tabs-trigger",className:v("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function dD({className:t,...e}){return l.jsx(Yo.Content,{"data-slot":"tabs-content",className:v("flex-1 outline-none",t),...e})}const R2=M.createContext({dragDropManager:void 0});function St(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Gp=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Yp=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qp={INIT:"@@redux/INIT"+Yp(),REPLACE:"@@redux/REPLACE"+Yp()};function uD(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function hD(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(gD(t))return"date";if(mD(t))return"error";var n=pD(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function pD(t){return typeof t.constructor=="function"?t.constructor.name:null}function mD(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function gD(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Wr(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=hD(t)),e}function B2(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?St(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?St(1):"Expected the enhancer to be a function. Instead, received: '"+Wr(n)+"'");return n(B2)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?St(2):"Expected the root reducer to be a function. Instead, received: '"+Wr(t)+"'");var a=t,i=e,s=[],o=s,f=!1;function c(){o===s&&(o=s.slice())}function d(){if(f)throw new Error(process.env.NODE_ENV==="production"?St(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function u(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?St(4):"Expected the listener to be a function. Instead, received: '"+Wr(g)+"'");if(f)throw new Error(process.env.NODE_ENV==="production"?St(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var b=!0;return c(),o.push(g),function(){if(b){if(f)throw new Error(process.env.NODE_ENV==="production"?St(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");b=!1,c();var w=o.indexOf(g);o.splice(w,1),s=null}}}function p(g){if(!uD(g))throw new Error(process.env.NODE_ENV==="production"?St(7):"Actions must be plain objects. Instead, the actual type was: '"+Wr(g)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?St(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(f)throw new Error(process.env.NODE_ENV==="production"?St(9):"Reducers may not dispatch actions.");try{f=!0,i=a(i,g)}finally{f=!1}for(var b=s=o,x=0;x<b.length;x++){var w=b[x];w()}return g}function h(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?St(10):"Expected the nextReducer to be a function. Instead, received: '"+Wr(g));a=g,p({type:Qp.REPLACE})}function m(){var g,b=u;return g={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(process.env.NODE_ENV==="production"?St(11):"Expected the observer to be an object. Instead, received: '"+Wr(w)+"'");function j(){w.next&&w.next(d())}j();var y=b(j);return{unsubscribe:y}}},g[Gp]=function(){return this},g}return p({type:Qp.INIT}),r={dispatch:p,subscribe:u,getState:d,replaceReducer:h},r[Gp]=m,r}function ne(t,e,...n){if(bD()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let a=0;r=new Error(e.replace(/%s/g,function(){return n[a++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function bD(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function xD(t,e,n){return e.split(".").reduce((r,a)=>r&&r[a]?r[a]:n||null,t)}function yD(t,e){return t.filter(n=>n!==e)}function H2(t){return typeof t=="object"}function vD(t,e){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};t.forEach(r),e.forEach(r);const a=[];return n.forEach((i,s)=>{i===1&&a.push(s)}),a}function wD(t,e){return t.filter(n=>e.indexOf(n)>-1)}const au="dnd-core/INIT_COORDS",Sl="dnd-core/BEGIN_DRAG",iu="dnd-core/PUBLISH_DRAG_SOURCE",Tl="dnd-core/HOVER",Il="dnd-core/DROP",Dl="dnd-core/END_DRAG";function Wp(t,e){return{type:au,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const MD={type:au,payload:{clientOffset:null,sourceClientOffset:null}};function jD(t){return function(n=[],r={publishSource:!0}){const{publishSource:a=!0,clientOffset:i,getSourceClientOffset:s}=r,o=t.getMonitor(),f=t.getRegistry();t.dispatch(Wp(i)),CD(n,o,f);const c=kD(n,o);if(c==null){t.dispatch(MD);return}let d=null;if(i){if(!s)throw new Error("getSourceClientOffset must be defined");LD(s),d=s(c)}t.dispatch(Wp(i,d));const p=f.getSource(c).beginDrag(o,c);if(p==null)return;ND(p),f.pinSource(c);const h=f.getSourceType(c);return{type:Sl,payload:{itemType:h,item:p,sourceId:c,clientOffset:i||null,sourceClientOffset:d||null,isSourcePublic:!!a}}}}function CD(t,e,n){ne(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){ne(n.getSource(r),"Expected sourceIds to be registered.")})}function LD(t){ne(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function ND(t){ne(H2(t),"Item must be an object.")}function kD(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function SD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function TD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){SD(t,a,n[a])})}return t}function ID(t){return function(n={}){const r=t.getMonitor(),a=t.getRegistry();DD(r),zD(r).forEach((s,o)=>{const f=ED(s,o,a,r),c={type:Il,payload:{dropResult:TD({},n,f)}};t.dispatch(c)})}}function DD(t){ne(t.isDragging(),"Cannot call drop while not dragging."),ne(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function ED(t,e,n,r){const a=n.getTarget(t);let i=a?a.drop(r,t):void 0;return AD(i),typeof i>"u"&&(i=e===0?{}:r.getDropResult()),i}function AD(t){ne(typeof t>"u"||H2(t),"Drop result must either be an object or undefined.")}function zD(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function OD(t){return function(){const n=t.getMonitor(),r=t.getRegistry();PD(n);const a=n.getSourceId();return a!=null&&(r.getSource(a,!0).endDrag(n,a),r.unpinSource()),{type:Dl}}}function PD(t){ne(t.isDragging(),"Cannot call endDrag while not dragging.")}function bc(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function RD(t){return function(n,{clientOffset:r}={}){BD(n);const a=n.slice(0),i=t.getMonitor(),s=t.getRegistry(),o=i.getItemType();return FD(a,s,o),HD(a,i,s),UD(a,i,s),{type:Tl,payload:{targetIds:a,clientOffset:r||null}}}}function BD(t){ne(Array.isArray(t),"Expected targetIds to be an array.")}function HD(t,e,n){ne(e.isDragging(),"Cannot call hover while not dragging."),ne(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const a=t[r];ne(t.lastIndexOf(a)===r,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(a);ne(i,"Expected targetIds to be registered.")}}function FD(t,e,n){for(let r=t.length-1;r>=0;r--){const a=t[r],i=e.getTargetType(a);bc(i,n)||t.splice(r,1)}}function UD(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function _D(t){return function(){if(t.getMonitor().isDragging())return{type:iu}}}function JD(t){return{beginDrag:jD(t),publishDragSource:_D(t),hover:RD(t),drop:ID(t),endDrag:OD(t)}}class VD{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(i){return(...s)=>{const o=i.apply(e,s);typeof o<"u"&&n(o)}}const a=JD(this);return Object.keys(a).reduce((i,s)=>{const o=a[s];return i[s]=r(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function GD(t,e){return{x:t.x+e.x,y:t.y+e.y}}function F2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function YD(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:F2(GD(e,r),n)}function QD(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:F2(e,n)}const ui=[],su=[];ui.__IS_NONE__=!0;su.__IS_ALL__=!0;function WD(t,e){return t===ui?!1:t===su||typeof e>"u"?!0:wD(e,t).length>0}class $D{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;ne(typeof e=="function","listener must be a function."),ne(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let a=this.store.getState().stateId;const i=()=>{const s=this.store.getState(),o=s.stateId;try{o===a||o===a+1&&!WD(s.dirtyHandlerIds,r)||e()}finally{a=o}};return this.store.subscribe(i)}subscribeToOffsetChange(e){ne(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const a=this.store.getState().dragOffset;a!==n&&(n=a,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return ne(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(ne(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),a=this.getItemType();return bc(r,a)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(ne(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),a=this.getItemType();return r!==a?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const a=this.registry.getTargetType(e),i=this.getItemType();if(i&&!bc(a,i))return!1;const s=this.getTargetIds();if(!s.length)return!1;const o=s.indexOf(e);return r?o===s.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return YD(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return QD(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const $p=typeof global<"u"?global:self,U2=$p.MutationObserver||$p.WebKitMutationObserver;function _2(t){return function(){const n=setTimeout(a,0),r=setInterval(a,50);function a(){clearTimeout(n),clearInterval(r),t()}}}function ZD(t){let e=1;const n=new U2(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const qD=typeof U2=="function"?ZD:_2;class KD{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,a=e.length-this.index;r<a;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=qD(this.flush),this.requestErrorThrow=_2(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class XD{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class eE{create(e){const n=this.freeTasks,r=n.length?n.pop():new XD(this.onError,a=>n[n.length]=a);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const J2=new KD,tE=new eE(J2.registerPendingError);function nE(t){J2.enqueueTask(tE.create(t))}const ou="dnd-core/ADD_SOURCE",lu="dnd-core/ADD_TARGET",fu="dnd-core/REMOVE_SOURCE",El="dnd-core/REMOVE_TARGET";function rE(t){return{type:ou,payload:{sourceId:t}}}function aE(t){return{type:lu,payload:{targetId:t}}}function iE(t){return{type:fu,payload:{sourceId:t}}}function sE(t){return{type:El,payload:{targetId:t}}}function oE(t){ne(typeof t.canDrag=="function","Expected canDrag to be a function."),ne(typeof t.beginDrag=="function","Expected beginDrag to be a function."),ne(typeof t.endDrag=="function","Expected endDrag to be a function.")}function lE(t){ne(typeof t.canDrop=="function","Expected canDrop to be a function."),ne(typeof t.hover=="function","Expected hover to be a function."),ne(typeof t.drop=="function","Expected beginDrag to be a function.")}function xc(t,e){if(e&&Array.isArray(t)){t.forEach(n=>xc(n,!1));return}ne(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var At;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(At||(At={}));let fE=0;function cE(){return fE++}function dE(t){const e=cE().toString();switch(t){case At.SOURCE:return`S${e}`;case At.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Zp(t){switch(t[0]){case"S":return At.SOURCE;case"T":return At.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function qp(t,e){const n=t.entries();let r=!1;do{const{done:a,value:[,i]}=n.next();if(i===e)return!0;r=!!a}while(!r);return!1}class uE{addSource(e,n){xc(e),oE(n);const r=this.addHandler(At.SOURCE,e,n);return this.store.dispatch(rE(r)),r}addTarget(e,n){xc(e,!0),lE(n);const r=this.addHandler(At.TARGET,e,n);return this.store.dispatch(aE(r)),r}containsHandler(e){return qp(this.dragSources,e)||qp(this.dropTargets,e)}getSource(e,n=!1){return ne(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return ne(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return ne(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return ne(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Zp(e)===At.SOURCE}isTargetId(e){return Zp(e)===At.TARGET}removeSource(e){ne(this.getSource(e),"Expected an existing source."),this.store.dispatch(iE(e)),nE(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){ne(this.getTarget(e),"Expected an existing target."),this.store.dispatch(sE(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);ne(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){ne(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const a=dE(e);return this.types.set(a,n),e===At.SOURCE?this.dragSources.set(a,r):e===At.TARGET&&this.dropTargets.set(a,r),a}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const hE=(t,e)=>t===e;function pE(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function mE(t,e,n=hE){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function gE(t=ui,e){switch(e.type){case Tl:break;case ou:case lu:case El:case fu:return ui;case Sl:case iu:case Dl:case Il:default:return su}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,a=vD(n,r);if(!(a.length>0||!mE(n,r)))return ui;const s=r[r.length-1],o=n[n.length-1];return s!==o&&(s&&a.push(s),o&&a.push(o)),a}function bE(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xE(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){bE(t,a,n[a])})}return t}const Kp={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function yE(t=Kp,e){const{payload:n}=e;switch(e.type){case au:case Sl:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Tl:return pE(t.clientOffset,n.clientOffset)?t:xE({},t,{clientOffset:n.clientOffset});case Dl:case Il:return Kp;default:return t}}function vE(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){vE(t,a,n[a])})}return t}const wE={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ME(t=wE,e){const{payload:n}=e;switch(e.type){case Sl:return $r({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case iu:return $r({},t,{isSourcePublic:!0});case Tl:return $r({},t,{targetIds:n.targetIds});case El:return t.targetIds.indexOf(n.targetId)===-1?t:$r({},t,{targetIds:yD(t.targetIds,n.targetId)});case Il:return $r({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Dl:return $r({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function jE(t=0,e){switch(e.type){case ou:case lu:return t+1;case fu:case El:return t-1;default:return t}}function CE(t=0){return t+1}function LE(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function NE(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){LE(t,a,n[a])})}return t}function kE(t={},e){return{dirtyHandlerIds:gE(t.dirtyHandlerIds,{type:e.type,payload:NE({},e.payload,{prevTargetIds:xD(t,"dragOperation.targetIds",[])})}),dragOffset:yE(t.dragOffset,e),refCount:jE(t.refCount,e),dragOperation:ME(t.dragOperation,e),stateId:CE(t.stateId)}}function SE(t,e=void 0,n={},r=!1){const a=TE(r),i=new $D(a,new uE(a)),s=new VD(a,i),o=t(s,e,n);return s.receiveBackend(o),s}function TE(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return B2(kE,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function IE(t,e){if(t==null)return{};var n=DE(t,e),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function DE(t,e){if(t==null)return{};var n={},r=Object.keys(t),a,i;for(i=0;i<r.length;i++)a=r[i],!(e.indexOf(a)>=0)&&(n[a]=t[a]);return n}let Xp=0;const Js=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var V2=M.memo(function(e){var{children:n}=e,r=IE(e,["children"]);const[a,i]=EE(r);return M.useEffect(()=>{if(i){const s=G2();return++Xp,()=>{--Xp===0&&(s[Js]=null)}}},[]),l.jsx(R2.Provider,{value:a,children:n})});function EE(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=AE(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function AE(t,e=G2(),n,r){const a=e;return a[Js]||(a[Js]={dragDropManager:SE(t,e,n,r)}),a[Js]}function G2(){return typeof global<"u"?global:window}function zE(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xf,e0;function OE(){return e0||(e0=1,xf=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!t(e[a],n[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;a--!==0;){var s=i[a];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}),xf}var PE=OE();const RE=zE(PE),Tr=typeof window<"u"?M.useLayoutEffect:M.useEffect;function BE(t,e,n){const[r,a]=M.useState(()=>e(t)),i=M.useCallback(()=>{const s=e(t);RE(r,s)||(a(s),n&&n())},[r,t,n]);return Tr(i),[r,i]}function HE(t,e,n){const[r,a]=BE(t,e,n);return Tr(function(){const s=t.getHandlerId();if(s!=null)return t.subscribeToStateChange(a,{handlerIds:[s]})},[t,a]),r}function Y2(t,e,n){return HE(e,t||(()=>({})),()=>n.reconnect())}function Q2(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),M.useMemo(()=>typeof t=="function"?t():t,n)}function FE(t){return M.useMemo(()=>t.hooks.dragSource(),[t])}function UE(t){return M.useMemo(()=>t.hooks.dragPreview(),[t])}let yf=!1,vf=!1;class _E{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){ne(!yf,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return yf=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{yf=!1}}isDragging(){if(!this.sourceId)return!1;ne(!vf,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return vf=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{vf=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let wf=!1;class JE{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;ne(!wf,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return wf=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{wf=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function VE(t,e,n){const r=n.getRegistry(),a=r.addTarget(t,e);return[a,()=>r.removeTarget(a)]}function GE(t,e,n){const r=n.getRegistry(),a=r.addSource(t,e);return[a,()=>r.removeSource(a)]}function yc(t,e,n,r){let a;if(a!==void 0)return!!a;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),s=Object.keys(e);if(i.length!==s.length)return!1;const o=Object.prototype.hasOwnProperty.bind(e);for(let f=0;f<i.length;f++){const c=i[f];if(!o(c))return!1;const d=t[c],u=e[c];if(a=void 0,a===!1||a===void 0&&d!==u)return!1}return!0}function vc(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function YE(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function QE(t){return(e=null,n=null)=>{if(!M.isValidElement(e)){const i=e;return t(i,n),i}const r=e;return YE(r),WE(r,n?i=>t(i,n):t)}}function W2(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const a=QE(r);e[n]=()=>a}}),e}function t0(t,e){typeof t=="function"?t(e):t.current=e}function WE(t,e){const n=t.ref;return ne(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?M.cloneElement(t,{ref:r=>{t0(n,r),t0(e,r)}}):M.cloneElement(t,{ref:e})}class $E{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!yc(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!yc(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=W2({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,vc(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,vc(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class ZE{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!yc(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=W2({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,vc(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Sa(){const{dragDropManager:t}=M.useContext(R2);return ne(t!=null,"Expected drag drop context"),t}function qE(t,e){const n=Sa(),r=M.useMemo(()=>new $E(n.getBackend()),[n]);return Tr(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),Tr(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function KE(){const t=Sa();return M.useMemo(()=>new _E(t),[t])}class XE{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,a=this.monitor,{isDragging:i}=r;return i?i(a):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:a}=e;a&&a(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function e5(t,e,n){const r=M.useMemo(()=>new XE(t,e,n),[e,n]);return M.useEffect(()=>{r.spec=t},[t]),r}function t5(t){return M.useMemo(()=>{const e=t.type;return ne(e!=null,"spec.type must be defined"),e},[t])}function n5(t,e,n){const r=Sa(),a=e5(t,e,n),i=t5(t);Tr(function(){if(i!=null){const[o,f]=GE(i,a,r);return e.receiveHandlerId(o),n.receiveHandlerId(o),f}},[r,e,n,a,i])}function r5(t,e){const n=Q2(t,e);ne(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=KE(),a=qE(n.options,n.previewOptions);return n5(n,r,a),[Y2(n.collect,r,a),FE(a),UE(a)]}function a5(t){return M.useMemo(()=>t.hooks.dropTarget(),[t])}function i5(t){const e=Sa(),n=M.useMemo(()=>new ZE(e.getBackend()),[e]);return Tr(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function s5(){const t=Sa();return M.useMemo(()=>new JE(t),[t])}function o5(t){const{accept:e}=t;return M.useMemo(()=>(ne(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class l5{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function f5(t,e){const n=M.useMemo(()=>new l5(t,e),[e]);return M.useEffect(()=>{n.spec=t},[t]),n}function c5(t,e,n){const r=Sa(),a=f5(t,e),i=o5(t);Tr(function(){const[o,f]=VE(i,a,r);return e.receiveHandlerId(o),n.receiveHandlerId(o),f},[r,e,a,n,i.map(s=>s.toString()).join("|")])}function cu(t,e){const n=Q2(t,e),r=s5(),a=i5(n.options);return c5(n,r,a),[Y2(n.collect,r,a),a5(a)]}function $2(t){let e=null;return()=>(e==null&&(e=t()),e)}function d5(t,e){return t.filter(n=>n!==e)}function u5(t,e){const n=new Set,r=i=>n.add(i);t.forEach(r),e.forEach(r);const a=[];return n.forEach(i=>a.push(i)),a}class h5{enter(e){const n=this.entered.length,r=a=>this.isNodeInDocument(a)&&(!a.contains||a.contains(e));return this.entered=u5(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=d5(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class p5{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const a=this.config.exposeProperties[r];a!=null&&(n[r]={value:a(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Z2="__NATIVE_FILE__",q2="__NATIVE_URL__",K2="__NATIVE_TEXT__",X2="__NATIVE_HTML__",n0=Object.freeze(Object.defineProperty({__proto__:null,FILE:Z2,HTML:X2,TEXT:K2,URL:q2},Symbol.toStringTag,{value:"Module"}));function Mf(t,e,n){const r=e.reduce((a,i)=>a||t.getData(i),"");return r??n}const wc={[Z2]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[X2]:{exposeProperties:{html:(t,e)=>Mf(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[q2]:{exposeProperties:{urls:(t,e)=>Mf(t,e,"").split(`
|
|
222
222
|
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[K2]:{exposeProperties:{text:(t,e)=>Mf(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function m5(t,e){const n=wc[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new p5(n);return r.loadDataTransfer(e),r}function jf(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(wc).filter(n=>{const r=wc[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(a=>e.indexOf(a)>-1):!1})[0]||null}const g5=$2(()=>/firefox/i.test(navigator.userAgent)),e4=$2(()=>!!window.safari);class r0{interpolate(e){const{xs:n,ys:r,c1s:a,c2s:i,c3s:s}=this;let o=n.length-1;if(e===n[o])return r[o];let f=0,c=s.length-1,d;for(;f<=c;){d=Math.floor(.5*(f+c));const h=n[d];if(h<e)f=d+1;else if(h>e)c=d-1;else return r[d]}o=Math.max(0,c);const u=e-n[o],p=u*u;return r[o]+a[o]*u+i[o]*p+s[o]*u*p}constructor(e,n){const{length:r}=e,a=[];for(let h=0;h<r;h++)a.push(h);a.sort((h,m)=>e[h]<e[m]?-1:1);const i=[],s=[];let o,f;for(let h=0;h<r-1;h++)o=e[h+1]-e[h],f=n[h+1]-n[h],i.push(o),s.push(f/o);const c=[s[0]];for(let h=0;h<i.length-1;h++){const m=s[h],g=s[h+1];if(m*g<=0)c.push(0);else{o=i[h];const b=i[h+1],x=o+b;c.push(3*x/((x+b)/m+(x+o)/g))}}c.push(s[s.length-1]);const d=[],u=[];let p;for(let h=0;h<c.length-1;h++){p=s[h];const m=c[h],g=1/i[h],b=m+c[h+1]-p-p;d.push((p-m-b)*g),u.push(b*g*g)}this.xs=e,this.ys=n,this.c1s=c,this.c2s=d,this.c3s=u}}const b5=1;function t4(t){const e=t.nodeType===b5?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Ds(t){return{x:t.clientX,y:t.clientY}}function x5(t){var e;return t.nodeName==="IMG"&&(g5()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function y5(t,e,n,r){let a=t?e.width:n,i=t?e.height:r;return e4()&&t&&(i/=window.devicePixelRatio,a/=window.devicePixelRatio),{dragPreviewWidth:a,dragPreviewHeight:i}}function v5(t,e,n,r,a){const i=x5(e),o=t4(i?t:e),f={x:n.x-o.x,y:n.y-o.y},{offsetWidth:c,offsetHeight:d}=t,{anchorX:u,anchorY:p}=r,{dragPreviewWidth:h,dragPreviewHeight:m}=y5(i,e,c,d),g=()=>{let C=new r0([0,.5,1],[f.y,f.y/d*m,f.y+m-d]).interpolate(p);return e4()&&i&&(C+=(window.devicePixelRatio-1)*m),C},b=()=>new r0([0,.5,1],[f.x,f.x/c*h,f.x+h-c]).interpolate(u),{offsetX:x,offsetY:w}=a,j=x===0||x,y=w===0||w;return{x:j?x:b(),y:y?w:g()}}class w5{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function M5(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){M5(t,a,n[a])})}return t}class j5{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const a=s=>this.handleDragStart(s,e),i=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",a),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",a),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=s=>this.handleDragEnter(s,e),a=s=>this.handleDragOver(s,e),i=s=>this.handleDrop(s,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",a),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",a),n.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return a0({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return a0({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(n0).some(n=>n0[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=m5(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=a=>{const i=this.sourceNodes.get(a);return i&&t4(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=a=>!!(a&&this.document&&this.document.body&&this.document.body.contains(a)),this.endDragIfSourceWasRemovedFromDOM=()=>{const a=this.currentDragSourceNode;a==null||this.isNodeInDocument(a)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=a=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(a||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=a=>{if(a.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const s=Ds(a);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:o}=a,f=jf(o);if(this.monitor.isDragging()){if(o&&typeof o.setDragImage=="function"){const d=this.monitor.getSourceId(),u=this.sourceNodes.get(d),p=this.sourcePreviewNodes.get(d)||u;if(p){const{anchorX:h,anchorY:m,offsetX:g,offsetY:b}=this.getCurrentSourcePreviewNodeOptions(),j=v5(u,p,s,{anchorX:h,anchorY:m},{offsetX:g,offsetY:b});o.setDragImage(p,j.x,j.y)}}try{o==null||o.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(a.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(f)this.beginDragNativeItem(f);else{if(o&&!o.types&&(a.target&&!a.target.hasAttribute||!a.target.hasAttribute("draggable")))return;a.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=a=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}if(!this.enterLeaveCounter.enter(a.target)||this.monitor.isDragging())return;const{dataTransfer:o}=a,f=jf(o);f&&this.beginDragNativeItem(f,o)},this.handleTopDragEnter=a=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=a.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Ds(a)}),i.some(o=>this.monitor.canDropOnTarget(o))&&(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=a=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}},this.handleTopDragOver=a=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect="none");return}this.altKeyPressed=a.altKey,this.lastClientOffset=Ds(a),this.scheduleHover(i),(i||[]).some(o=>this.monitor.canDropOnTarget(o))?(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?a.preventDefault():(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=a=>{this.isDraggingNativeItem()&&a.preventDefault(),this.enterLeaveCounter.leave(a.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=a=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;a.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}else jf(a.dataTransfer)&&a.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=a=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Ds(a)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=a=>{const i=a.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(a.preventDefault(),i.dragDrop()))},this.options=new w5(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new h5(this.isNodeInDocument)}}const n4=function(e,n,r){return new j5(e,n,r)},Ri={TASK:"task"},r4={instagram:k.Instagram,linkedin:k.Linkedin,facebook:k.Facebook,twitter:k.Twitter,youtube:k.Youtube,blog:k.Calendar,other:k.Calendar},Cf={instagram:"text-pink-600",linkedin:"text-blue-700",facebook:"text-blue-600",twitter:"text-sky-500",youtube:"text-red-600",blog:"text-orange-500",other:"text-gray-500"},Mc={idea:"bg-gray-100 text-gray-600 border-gray-200",planned:"bg-blue-50 text-blue-600 border-blue-200","in-progress":"bg-yellow-50 text-yellow-600 border-yellow-200",approval:"bg-purple-50 text-purple-600 border-purple-200",scheduled:"bg-green-50 text-green-600 border-green-200",published:"bg-slate-800 text-white border-slate-700"},i0=["bg-blue-50 border-blue-100 text-blue-700","bg-green-50 border-green-100 text-green-700","bg-purple-50 border-purple-100 text-purple-700","bg-orange-50 border-orange-100 text-orange-700","bg-pink-50 border-pink-100 text-pink-700","bg-yellow-50 border-yellow-100 text-yellow-700"],s0=t=>{const e=t.split("").reduce((n,r)=>n+r.charCodeAt(0),0);return i0[e%i0.length]};function Al({task:t,view:e="month",mode:n="editorial",onClick:r,style:a}){var p;const[{isDragging:i},s]=r5(()=>({type:Ri.TASK,item:{id:t.id,type:Ri.TASK},collect:h=>({isDragging:!!h.isDragging()})}),[t.id]),o=t.channel?r4[t.channel]:k.Calendar,f=t.date?new Date(t.date):null,c=t.endDate?new Date(t.endDate):f?B.addHours(f,1):null,d=f?B.format(f,"HH:mm"):null,u=f&&c?`${B.format(f,"HH:mm")} - ${B.format(c,"HH:mm")}`:d;return n==="editorial"&&(e==="week"||e==="day")?l.jsxs("div",{ref:s,onClick:r,className:v("relative group cursor-pointer bg-white border rounded-md shadow-sm hover:shadow-md transition-all mb-3 overflow-hidden",i?"opacity-50":"opacity-100",t.status==="published"?"border-l-4 border-l-slate-800":"border-l-4 border-l-[#7F26BF]"),children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-gray-50/50",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(o,{size:14,className:v(t.channel?Cf[t.channel]:"text-gray-400")}),d&&l.jsx("span",{className:"text-xs font-medium text-gray-500",children:d})]}),l.jsx("div",{className:"opacity-0 group-hover:opacity-100 text-gray-400 cursor-grab",children:l.jsx(k.GripVertical,{size:14})})]}),t.imageUrl&&l.jsx("div",{className:"w-full aspect-video bg-gray-100 relative border-b",children:l.jsx("img",{src:t.imageUrl,alt:"",className:"w-full h-full object-cover"})}),l.jsxs("div",{className:"p-3",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-900 line-clamp-2 mb-2 leading-snug",children:t.title}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(he,{variant:"outline",className:v("px-1.5 py-0 text-[10px] h-5 font-normal uppercase tracking-wide",Mc[t.status]),children:t.status}),t.assignees&&t.assignees.length>0&&l.jsx("div",{className:"flex -space-x-2",children:t.assignees.slice(0,2).map((h,m)=>l.jsxs(Ft,{className:"w-5 h-5 border border-white",children:[l.jsx(Cn,{src:h.avatar}),l.jsx(Ut,{className:"text-[8px]",children:h.name[0]})]},m))})]})]})]}):n==="editorial"&&e==="month"?l.jsxs("div",{ref:s,onClick:r,className:v("relative group cursor-pointer bg-white border rounded-md shadow-sm hover:shadow-md transition-all mb-1 overflow-hidden flex items-center gap-2 p-1.5",i?"opacity-50":"opacity-100",t.status==="published"?"border-l-4 border-l-slate-800":"border-l-4 border-l-[#7F26BF]"),children:[t.imageUrl&&l.jsx("div",{className:"w-8 h-8 flex-shrink-0 bg-gray-100 rounded overflow-hidden",children:l.jsx("img",{src:t.imageUrl,alt:"",className:"w-full h-full object-cover"})}),l.jsx("div",{className:"min-w-0 flex-1",children:l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(o,{size:12,className:v(t.channel?Cf[t.channel]:"text-gray-400")}),l.jsx("span",{className:"truncate font-medium text-xs",children:t.title})]})})]}):n==="execution"&&(e==="week"||e==="day")?l.jsxs("div",{ref:s,onClick:r,style:a,className:v("absolute z-10 rounded-md border shadow-sm p-1.5 text-xs flex flex-col overflow-hidden hover:overflow-visible hover:h-auto! hover:min-h-[min-content] hover:z-50 transition-all cursor-pointer group",i?"opacity-50":"opacity-100",t.color||s0(t.id)),children:[l.jsxs("div",{className:"flex items-center gap-1 mb-0.5 font-semibold opacity-75 text-[10px] leading-none",children:[l.jsx(k.Clock,{size:10}),l.jsx("span",{className:"truncate",children:u})]}),l.jsx("div",{className:"font-bold leading-tight mb-1 line-clamp-2 text-[11px]",children:t.title}),l.jsxs("div",{className:"mt-auto flex items-center justify-between pt-1",children:[l.jsx("div",{className:"flex -space-x-1.5",children:(p=t.assignees)==null?void 0:p.map((h,m)=>l.jsxs(Ft,{className:"w-4 h-4 border border-white",children:[l.jsx(Cn,{src:h.avatar}),l.jsx(Ut,{className:"text-[8px]",children:h.name[0]})]},m))}),t.status!=="published"&&l.jsx("div",{className:v("w-2 h-2 rounded-full",Mc[t.status].split(" ")[1].replace("text-","bg-"))})]})]}):n==="execution"&&e==="month"?l.jsxs("div",{ref:s,onClick:r,className:v("relative group cursor-pointer rounded px-2 py-1 mb-1 text-xs truncate font-medium transition-all",i?"opacity-50":"opacity-100",t.color||s0(t.id).replace("bg-","bg-opacity-20 bg-")),children:[d," ",t.title]}):l.jsxs("div",{ref:s,onClick:r,className:v("relative group cursor-pointer bg-white border rounded-md shadow-sm hover:shadow-md transition-all mb-2 p-2 flex items-start gap-3",i?"opacity-50":"opacity-100",n==="editorial"&&(t.status==="published"?"border-l-4 border-l-slate-800":"border-l-4 border-l-[#7F26BF]")),children:[n==="editorial"&&t.imageUrl&&l.jsx("div",{className:"w-10 h-10 flex-shrink-0 bg-gray-100 rounded overflow-hidden",children:l.jsx("img",{src:t.imageUrl,alt:"",className:"w-full h-full object-cover"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[n==="editorial"&&l.jsx(o,{size:12,className:v(t.channel?Cf[t.channel]:"text-gray-400")}),l.jsx("span",{className:"truncate font-medium text-sm",children:t.title})]}),l.jsx(he,{variant:"secondary",className:"text-[10px] h-4 px-1 py-0",children:t.status})]})]})}function C5({days:t,tasks:e,onDropTask:n,onTaskClick:r,onAddClick:a,view:i}){return l.jsx("div",{className:v("grid h-full min-h-[calc(100vh-200px)] bg-gray-50/30",i==="week"?"grid-cols-7 divide-x":"grid-cols-1 border-x"),children:t.map(s=>{const o=e.filter(f=>f.date&&B.isSameDay(new Date(f.date),s)).sort((f,c)=>f.date&&c.date?new Date(f.date).getTime()-new Date(c.date).getTime():0);return l.jsx(L5,{day:s,tasks:o,onDropTask:n,onTaskClick:r,onAddClick:a,isToday:B.isToday(s)},s.toISOString())})})}function L5({day:t,tasks:e,onDropTask:n,onTaskClick:r,onAddClick:a,isToday:i}){const[{isOver:s},o]=cu(()=>({accept:Ri.TASK,drop:f=>n(f.id,t),collect:f=>({isOver:!!f.isOver()})}),[t,n]);return l.jsxs("div",{ref:o,className:v("flex flex-col h-full min-h-0 transition-colors",s&&"bg-purple-50 ring-inset ring-2 ring-[#7F26BF]"),children:[l.jsxs("div",{className:v("p-2 text-center border-b bg-white sticky top-0 z-10",i&&"bg-purple-50/50"),children:[l.jsx("div",{className:"text-xs font-semibold uppercase text-gray-500 mb-1",children:B.format(t,"EEE")}),l.jsx("div",{className:v("w-8 h-8 rounded-full flex items-center justify-center mx-auto text-sm font-medium",i?"bg-[#7F26BF] text-white":"text-gray-900 bg-gray-100"),children:B.format(t,"d")})]}),l.jsxs("div",{className:"flex-1 p-2 space-y-3 overflow-y-auto",children:[l.jsxs(H,{variant:"outline",size:"sm",className:"w-full mb-2 justify-center px-1",onClick:()=>a(t),children:[l.jsx(k.Plus,{size:12,className:"flex-shrink-0"}),l.jsx("span",{className:"truncate ml-1.5 hidden xl:inline",children:"Add Post"}),l.jsx("span",{className:"truncate ml-1.5 inline xl:hidden",children:"Add"})]}),e.map(f=>l.jsx(Al,{task:f,view:"week",mode:"editorial",onClick:()=>r(f)},f.id))]})]})}function N5({days:t,tasks:e,onDropTask:n,onTaskClick:r,onAddClick:a}){const i=Array.from({length:24},(s,o)=>o);return l.jsxs("div",{className:"flex h-full relative overflow-y-auto bg-white select-none",children:[l.jsxs("div",{className:"w-14 flex-shrink-0 border-r bg-white sticky left-0 z-30",children:[l.jsx("div",{className:"h-10 border-b bg-white sticky top-0 z-40 flex-shrink-0"})," ",i.map(s=>l.jsx("div",{className:"h-24 border-b text-right pr-2 pt-2 text-xs text-gray-400 font-medium relative",children:l.jsx("span",{className:"-top-2.5 relative",children:B.format(B.setHours(new Date,s),"ha")})},s))]}),l.jsxs("div",{className:"flex flex-1 min-w-0 relative",children:[t.map((s,o)=>{const f=e.filter(c=>c.date&&B.isSameDay(new Date(c.date),s));return l.jsx(k5,{day:s,tasks:f,onDropTask:n,onTaskClick:r,onAddClick:a,isLast:o===t.length-1,HOURS:i},s.toISOString())}),l.jsxs("div",{className:"absolute inset-0 pointer-events-none z-0",children:[l.jsx("div",{className:"h-10 border-b bg-transparent"})," ",i.map(s=>l.jsx("div",{className:"h-24 border-b border-dashed border-gray-100 w-full"},s))]})]})]})}function k5({day:t,tasks:e,onDropTask:n,onTaskClick:r,onAddClick:a,isLast:i,HOURS:s}){const[{isOver:o},f]=cu(()=>({accept:Ri.TASK,drop:(c,d)=>{n(c.id,t)},collect:c=>({isOver:!!c.isOver()})}),[t,n]);return l.jsxs("div",{ref:f,className:v("flex-1 relative min-w-[150px]",!i&&"border-r",o&&"bg-blue-50/30"),children:[l.jsx("div",{className:"sticky top-0 z-20 bg-white border-b h-10 flex items-center justify-center shadow-sm",children:l.jsxs("div",{className:"text-xs font-bold text-gray-500",children:[B.format(t,"EEE")," ",l.jsx("span",{className:v("ml-1",B.isToday(t)&&"text-blue-600"),children:B.format(t,"d")})]})}),s.map(c=>l.jsx("div",{className:"h-24 w-full absolute hover:bg-gray-50/50 transition-colors cursor-pointer z-10",style:{top:`${c*96+40}px`},onClick:d=>{d.stopPropagation();const u=new Date(t);u.setHours(c,0),a(u)}},c)),e.map(c=>{const d=c.date?new Date(c.date):new Date,u=c.endDate?new Date(c.endDate):B.addHours(d,1),p=B.getHours(d),h=B.getMinutes(d);let m=B.differenceInMinutes(u,d);m<30&&(m=30);const g=p*96+h/60*96+40,b=m/60*96;return l.jsx(Al,{task:c,view:"week",mode:"execution",onClick:()=>r(c),style:{top:`${g}px`,height:`${b}px`,left:"4px",right:"4px",position:"absolute"}},c.id)})]})}function a4({days:t,tasks:e,currentDate:n,onDropTask:r,onTaskClick:a,onAddClick:i,mode:s}){return l.jsx("div",{className:"grid grid-cols-7 auto-rows-fr min-h-[800px]",children:t.map(o=>{const f=e.filter(c=>c.date&&B.isSameDay(new Date(c.date),o));return l.jsx(S5,{date:o,tasks:f,isCurrentMonth:B.isSameMonth(o,n),onDropTask:r,onTaskClick:a,onAddClick:i,mode:s},o.toISOString())})})}function S5({date:t,tasks:e,isCurrentMonth:n,onDropTask:r,onTaskClick:a,onAddClick:i,mode:s}){const[{isOver:o},f]=cu(()=>({accept:Ri.TASK,drop:d=>r(d.id,t),collect:d=>({isOver:!!d.isOver()})}),[t,r]),c=B.isToday(t);return l.jsxs("div",{ref:f,className:v("min-h-[120px] border-b border-r p-2 relative transition-colors group flex flex-col",!n&&"bg-gray-50/50 text-gray-400",o&&"bg-purple-50 ring-2 ring-inset ring-[#7F26BF]",c&&"bg-purple-50/30"),children:[l.jsxs("div",{className:"flex justify-between items-start mb-2",children:[l.jsx("span",{className:v("text-sm font-medium rounded-full w-7 h-7 flex items-center justify-center",c?"bg-[#7F26BF] text-white":"text-gray-700"),children:B.format(t,"d")}),l.jsx(H,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>i(t),children:l.jsx(k.Plus,{size:14})})]}),l.jsx("div",{className:"flex-1 flex flex-col gap-1",children:e.map(d=>l.jsx(Al,{task:d,view:"month",mode:s,onClick:()=>a(d)},d.id))})]})}function i4({isOpen:t,onClose:e,task:n,onSave:r,isNew:a=!1}){const[i,s]=M.useState(n||{});M.useMemo(()=>{s(n||{})},[n]);const o=()=>{r(i),e()};return l.jsx(Ui,{open:t,onOpenChange:f=>!f&&e(),children:l.jsxs(_i,{className:"sm:max-w-[600px]",children:[l.jsxs(Ji,{children:[l.jsx(Vi,{children:a?"Create New Task":"Edit Task"}),l.jsx(Gi,{children:a?"Enter the details for the new task below.":"Modify the details of the selected task."})]}),l.jsxs("div",{className:"grid gap-6 py-4",children:[l.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[l.jsx("label",{htmlFor:"title",className:"text-right text-sm font-medium",children:"Title"}),l.jsx("input",{id:"title",className:"col-span-3 flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",value:i.title||"",onChange:f=>s({...i,title:f.target.value}),placeholder:"e.g. New Feature Announcement"})]}),l.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[l.jsx("label",{className:"text-right text-sm font-medium",children:"Time"}),l.jsxs("div",{className:"col-span-3 flex gap-2 items-center",children:[l.jsx("input",{type:"date",className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm",value:i.date instanceof Date?B.format(i.date,"yyyy-MM-dd"):typeof i.date=="string"?i.date.split("T")[0]:"",onChange:f=>{const c=f.target.value,d=i.date instanceof Date?i.date:new Date,u=new Date(`${c}T${B.format(d,"HH:mm")}`);s({...i,date:u})}}),l.jsx("span",{className:"text-sm text-gray-500",children:"at"}),l.jsx("input",{type:"time",className:"w-32 flex h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm",value:i.date instanceof Date?B.format(i.date,"HH:mm"):"09:00",onChange:f=>{const c=f.target.value,d=i.date instanceof Date?B.format(i.date,"yyyy-MM-dd"):B.format(new Date,"yyyy-MM-dd");s({...i,date:new Date(`${d}T${c}`)})}})]})]}),l.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[l.jsx("label",{htmlFor:"channel",className:"text-right text-sm font-medium",children:"Channel / Category"}),l.jsx("select",{id:"channel",className:"col-span-3 flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm",value:i.channel||"instagram",onChange:f=>s({...i,channel:f.target.value}),children:Object.keys(r4).map(f=>l.jsx("option",{value:f,children:f.charAt(0).toUpperCase()+f.slice(1)},f))})]}),l.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[l.jsx("label",{htmlFor:"status",className:"text-right text-sm font-medium",children:"Status"}),l.jsx("select",{id:"status",className:"col-span-3 flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm",value:i.status||"idea",onChange:f=>s({...i,status:f.target.value}),children:Object.keys(Mc).map(f=>l.jsx("option",{value:f,children:f.charAt(0).toUpperCase()+f.slice(1)},f))})]}),l.jsxs("div",{className:"grid grid-cols-4 items-start gap-4",children:[l.jsx("label",{htmlFor:"description",className:"text-right text-sm font-medium pt-2",children:"Description"}),l.jsx("textarea",{id:"description",className:"col-span-3 flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",value:i.description||"",onChange:f=>s({...i,description:f.target.value}),placeholder:"Details about this post..."})]})]}),l.jsxs(Zo,{children:[l.jsx(H,{variant:"outline",onClick:e,children:"Cancel"}),l.jsx(H,{className:"bg-[#7F26BF] hover:bg-[#6E21A6]",onClick:o,children:"Save Changes"})]})]})})}function s4({tasks:t,onTaskUpdate:e,onTaskCreate:n,defaultView:r="month"}){const[a,i]=M.useState(new Date),[s,o]=M.useState(r),[f,c]=M.useState(!0),[d,u]=M.useState(!1),[p,h]=M.useState(null),[m,g]=M.useState(!1),b=M.useMemo(()=>{let z,P;if(s==="month"){const _=B.startOfMonth(a),V=B.endOfMonth(_);z=B.startOfWeek(_),P=B.endOfWeek(V)}else s==="week"?(z=B.startOfWeek(a),P=B.endOfWeek(a)):(z=a,P=a);return B.eachDayOfInterval({start:z,end:P})},[a,s]),x=t.filter(z=>!z.date),w=t.filter(z=>z.date);return{currentDate:a,view:s,setView:o,isSidebarOpen:f,setIsSidebarOpen:c,isModalOpen:d,setIsModalOpen:u,editingTask:p,isNewTask:m,calendarDays:b,unplannedTasks:x,scheduledTasks:w,handlePrev:()=>{i(s==="month"?B.subMonths(a,1):s==="week"?B.addDays(a,-7):B.addDays(a,-1))},handleNext:()=>{i(s==="month"?B.addMonths(a,1):s==="week"?B.addDays(a,7):B.addDays(a,1))},handleToday:()=>i(new Date),handleDropTask:(z,P,_)=>{const V=t.find(Y=>Y.id===z);if(V){let Y=new Date(P);if(s==="month"||_==="editorial")if(V.date){const E=new Date(V.date);Y.setHours(E.getHours(),E.getMinutes())}else Y.setHours(9,0);const X={...V,date:Y};e(X)}},handleTaskClick:z=>{h(z),g(!1),u(!0)},handleAddClick:z=>{const P=z||new Date;B.getHours(P)===0&&B.getMinutes(P)===0&&P.setHours(9,0),h({date:P,status:"idea",channel:"instagram"}),g(!0),u(!0)},handleModalSave:z=>{m?n&&n(z):z.id&&e(z),u(!1)}}}function o4({isOpen:t,setIsOpen:e,tasks:n,onAddClick:r,onTaskClick:a,mode:i}){return t?l.jsxs("div",{className:"w-72 border-r bg-gray-50/50 flex flex-col transition-all duration-300 flex-shrink-0",children:[l.jsxs("div",{className:"p-4 border-b bg-white flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h3",{className:"font-semibold text-sm text-gray-900",children:"Backlog"}),l.jsx(he,{variant:"secondary",className:"bg-gray-100 text-xs",children:n.length})]}),l.jsx(H,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>e(!1),children:l.jsx(k.PanelLeftClose,{size:16})})]}),l.jsx("div",{className:"px-4 pt-3 bg-white pb-3 border-b space-y-2",children:l.jsxs(H,{onClick:r,variant:"outline",size:"sm",className:"w-full justify-start pl-2",children:[l.jsx(k.Plus,{size:12,className:"mr-1.5"})," New Task"]})}),l.jsx(Wo,{className:"flex-1 p-3",children:l.jsx("div",{className:"space-y-2",children:n.length===0?l.jsx("div",{className:"text-center py-10 px-4 border-2 border-dashed border-gray-200 rounded-lg",children:l.jsx("p",{className:"text-xs text-gray-400",children:"No unscheduled items"})}):n.map(s=>l.jsx(Al,{task:s,view:"backlog",mode:i,onClick:()=>a(s)},s.id))})})]}):l.jsxs("div",{className:"border-r bg-white flex flex-col items-center py-4 w-12 flex-shrink-0 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>e(!0),children:[l.jsx(k.PanelLeftOpen,{className:"text-gray-500 mb-4",size:20}),l.jsx("div",{className:"flex-1 flex items-center justify-center min-h-0",children:l.jsx("div",{className:"whitespace-nowrap text-xs font-medium text-gray-400 -rotate-90 transform",children:"BACKLOG"})}),l.jsx(he,{className:"mt-2 h-5 w-5 p-0 flex items-center justify-center rounded-full bg-[#7F26BF] text-[10px]",children:n.length})]})}function l4({title:t,onPrev:e,onNext:n,onToday:r,onAdd:a,view:i,setView:s}){return l.jsxs("div",{className:"flex flex-col xl:flex-row items-center justify-between p-4 border-b gap-4 flex-shrink-0 bg-white",children:[l.jsxs("div",{className:"flex items-center gap-4 w-full xl:w-auto justify-between xl:justify-start",children:[l.jsxs("div",{className:"flex items-center border rounded-md bg-white shadow-sm",children:[l.jsx(H,{variant:"ghost",size:"icon",onClick:e,className:"h-8 w-8 rounded-r-none",children:l.jsx(k.ChevronLeft,{className:"h-4 w-4"})}),l.jsx(H,{variant:"ghost",onClick:r,className:"h-8 px-3 rounded-none border-x text-sm font-medium hover:bg-gray-50",children:"Today"}),l.jsx(H,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8 rounded-l-none",children:l.jsx(k.ChevronRight,{className:"h-4 w-4"})})]}),l.jsx("h2",{className:"text-lg font-bold text-gray-900 whitespace-nowrap",children:t})]}),l.jsxs("div",{className:"flex items-center gap-3 w-full xl:w-auto overflow-x-auto pb-1 xl:pb-0 justify-end",children:[l.jsx(O2,{value:i,onValueChange:o=>s(o),className:"flex-shrink-0",children:l.jsxs(P2,{className:"h-9",children:[l.jsx(_s,{value:"month",className:"text-xs",children:"Month"}),l.jsx(_s,{value:"week",className:"text-xs",children:"Week"}),l.jsx(_s,{value:"day",className:"text-xs",children:"Day"})]})}),l.jsxs(H,{variant:"default",className:"h-9 px-4 flex-shrink-0",onClick:a,children:[l.jsx(k.Plus,{className:"mr-2 h-4 w-4"})," Create"]})]})]})}function f4({days:t}){return l.jsx("div",{className:"grid grid-cols-7 border-b bg-gray-50 flex-shrink-0 divide-x",children:t.slice(0,7).map((e,n)=>l.jsx("div",{className:"py-2 text-center group",children:l.jsx("div",{className:v("text-xs font-semibold uppercase tracking-wider",B.isToday(e)?"text-[#7F26BF]":"text-gray-500"),children:B.format(e,"EEE")})},n))})}function T5(t){const e=s4({...t,defaultView:"month"});return l.jsx(V2,{backend:n4,children:l.jsxs("div",{className:v("flex h-[calc(100vh-100px)] bg-background border rounded-lg overflow-hidden shadow-sm",t.className),children:[l.jsx(o4,{isOpen:e.isSidebarOpen,setIsOpen:e.setIsSidebarOpen,tasks:e.unplannedTasks,onAddClick:()=>e.handleAddClick(),onTaskClick:e.handleTaskClick,mode:"editorial"}),l.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-white",children:[l.jsx(l4,{title:e.view==="day"?B.format(e.currentDate,"MMM d, yyyy"):B.format(e.currentDate,"MMMM yyyy"),onPrev:e.handlePrev,onNext:e.handleNext,onToday:e.handleToday,onAdd:()=>e.handleAddClick(e.currentDate),view:e.view,setView:e.setView,mode:"editorial"}),e.view==="month"&&l.jsx(f4,{days:e.calendarDays}),l.jsx("div",{className:"flex-1 overflow-hidden flex flex-col relative",children:e.view==="month"?l.jsx(a4,{days:e.calendarDays,tasks:e.scheduledTasks,currentDate:e.currentDate,onDropTask:(n,r)=>e.handleDropTask(n,r,"editorial"),onTaskClick:e.handleTaskClick,onAddClick:e.handleAddClick,mode:"editorial"}):l.jsx(C5,{days:e.calendarDays,tasks:e.scheduledTasks,onDropTask:(n,r)=>e.handleDropTask(n,r,"editorial"),onTaskClick:e.handleTaskClick,onAddClick:e.handleAddClick,view:e.view})})]}),e.isModalOpen&&l.jsx(i4,{isOpen:e.isModalOpen,onClose:()=>e.setIsModalOpen(!1),task:e.editingTask||{},onSave:e.handleModalSave,isNew:e.isNewTask})]})})}function I5(t){const e=s4({...t,defaultView:"week"});return l.jsx(V2,{backend:n4,children:l.jsxs("div",{className:v("flex h-[calc(100vh-100px)] bg-background border rounded-lg overflow-hidden shadow-sm",t.className),children:[l.jsx(o4,{isOpen:e.isSidebarOpen,setIsOpen:e.setIsSidebarOpen,tasks:e.unplannedTasks,onAddClick:()=>e.handleAddClick(),onTaskClick:e.handleTaskClick,mode:"execution"}),l.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-white",children:[l.jsx(l4,{title:e.view==="day"?B.format(e.currentDate,"MMM d, yyyy"):B.format(e.currentDate,"MMMM yyyy"),onPrev:e.handlePrev,onNext:e.handleNext,onToday:e.handleToday,onAdd:()=>e.handleAddClick(e.currentDate),view:e.view,setView:e.setView,mode:"execution"}),e.view==="month"&&l.jsx(f4,{days:e.calendarDays}),l.jsx("div",{className:"flex-1 overflow-hidden flex flex-col relative",children:e.view==="month"?l.jsx(a4,{days:e.calendarDays,tasks:e.scheduledTasks,currentDate:e.currentDate,onDropTask:(n,r)=>e.handleDropTask(n,r,"execution"),onTaskClick:e.handleTaskClick,onAddClick:e.handleAddClick,mode:"execution"}):l.jsx(N5,{days:e.calendarDays,tasks:e.scheduledTasks,onDropTask:(n,r)=>e.handleDropTask(n,r,"execution"),onTaskClick:e.handleTaskClick,onAddClick:e.handleAddClick})})]}),e.isModalOpen&&l.jsx(i4,{isOpen:e.isModalOpen,onClose:()=>e.setIsModalOpen(!1),task:e.editingTask||{},onSave:e.handleModalSave,isNew:e.isNewTask})]})})}const D5=Vs.FormProvider,c4=T.createContext({}),E5=({...t})=>l.jsx(c4.Provider,{value:{name:t.name},children:l.jsx(Vs.Controller,{...t})}),ts=()=>{const t=T.useContext(c4),e=T.useContext(d4),{getFieldState:n}=Vs.useFormContext(),r=Vs.useFormState({name:t.name}),a=n(t.name,r);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:i}=e;return{id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},d4=T.createContext({});function A5({className:t,...e}){const n=T.useId();return l.jsx(d4.Provider,{value:{id:n},children:l.jsx("div",{"data-slot":"form-item",className:v("grid gap-2",t),...e})})}function z5({className:t,...e}){const{error:n,formItemId:r}=ts();return l.jsx(Ue,{"data-slot":"form-label","data-error":!!n,className:v("data-[error=true]:text-destructive",t),htmlFor:r,...e})}function O5({...t}){const{error:e,formItemId:n,formDescriptionId:r,formMessageId:a}=ts();return l.jsx(Nn.Slot,{"data-slot":"form-control",id:n,"aria-describedby":e?`${r} ${a}`:`${r}`,"aria-invalid":!!e,...t})}function P5({className:t,...e}){const{formDescriptionId:n}=ts();return l.jsx("p",{"data-slot":"form-description",id:n,className:v("text-muted-foreground text-sm",t),...e})}function R5({className:t,...e}){const{error:n,formMessageId:r}=ts(),a=n?String((n==null?void 0:n.message)??""):e.children;return a?l.jsx("p",{"data-slot":"form-message",id:r,className:v("text-destructive text-sm",t),...e,children:a}):null}const u4={"not-started":{label:"Não iniciada",icon:k.Circle,variant:"outline",barColor:"bg-gray-300 dark:bg-gray-600"},"in-progress":{label:"Em progresso",icon:k.Clock,variant:"default",barColor:"bg-primary"},"on-hold":{label:"Em espera",icon:k.AlertCircle,variant:"secondary",barColor:"bg-cyan-500"},completed:{label:"Concluída",icon:k.CheckCircle2,variant:"outline",barColor:"bg-green-500"},delayed:{label:"Atrasada",icon:k.AlertCircle,variant:"destructive",barColor:"bg-red-500"},cancelled:{label:"Cancelada",icon:k.AlertCircle,variant:"destructive",barColor:"bg-orange-500"}},o0=["#7F26BF","#0086E6","#24B347","#F26924","#E91E63","#9C27B0","#00BCD4","#FF9800"];function B5(t,e,n,r,a){const i=B.differenceInDays(r,n),s=B.differenceInDays(t,n),o=B.differenceInDays(e,t)+1,f=s/i*100,c=o/i*100;return{left:f,width:c}}const h4=T.memo(({task:t,timelineStart:e,timelineEnd:n,columnWidth:r,rowHeight:a,onTaskClick:i,onTaskEdit:s})=>{const{left:o,width:f}=B5(t.startDate,t.endDate,e,n),c=u4[t.status],d=c.icon;return t.milestone?l.jsxs("div",{className:"absolute group/milestone",style:{left:`${o}%`,top:"50%",transform:"translateY(-50%)"},children:[l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx("div",{className:v("w-4 h-4 rotate-45 cursor-pointer transition-all hover:scale-125",c.barColor),onClick:()=>i==null?void 0:i(t),role:"button",tabIndex:0,"aria-label":`Milestone: ${t.name}`})}),l.jsx(it,{side:"top",className:"max-w-sm",children:l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-medium",children:t.name}),l.jsx("p",{className:"text-xs opacity-90",children:"📍 Marco importante"}),l.jsxs("p",{className:"text-xs opacity-90",children:["📅 ",B.format(t.startDate,"dd/MM/yyyy",{locale:yt})]})]})})]}),s&&l.jsx("button",{className:"absolute -right-6 top-1/2 -translate-y-1/2 opacity-0 group-hover/milestone:opacity-100 transition-opacity bg-background border rounded p-1 shadow-md hover:bg-primary hover:text-primary-foreground",onClick:u=>{u.stopPropagation(),s(t)},"aria-label":"Editar marco",children:l.jsx(k.Edit,{className:"size-3"})})]}):l.jsxs(ot,{children:[l.jsx(Ze,{asChild:!0,children:l.jsxs("div",{className:"absolute group/task cursor-pointer",style:{left:`${o}%`,width:`${f}%`,top:"20%",height:"60%"},onClick:()=>i==null?void 0:i(t),role:"button",tabIndex:0,"aria-label":`Task: ${t.name}, Status: ${c.label}, Progress: ${t.progress}%`,children:[l.jsx("div",{className:v("absolute inset-0 rounded-lg transition-all",c.barColor,"group-hover/task:shadow-lg group-hover/task:scale-[1.02]","opacity-90 group-hover/task:opacity-100")}),t.progress>0&&l.jsx("div",{className:"absolute inset-0 rounded-lg bg-white/20 dark:bg-black/20",style:{clipPath:`inset(0 ${100-t.progress}% 0 0)`}}),l.jsxs("div",{className:"absolute inset-0 flex items-center px-2 gap-1.5",children:[l.jsx(d,{className:"size-3 text-white flex-shrink-0"}),l.jsx("span",{className:"text-xs text-white truncate",children:t.name}),t.assignee&&l.jsx("div",{className:"ml-auto flex-shrink-0",children:l.jsx(Ft,{className:"size-5 border border-white/50",children:l.jsx(Ut,{className:"bg-white/20 text-white text-[8px]",children:t.assignee.initials||t.assignee.name.substring(0,2).toUpperCase()})})})]}),s&&l.jsx("button",{className:"absolute -right-7 top-1/2 -translate-y-1/2 opacity-0 group-hover/task:opacity-100 transition-opacity bg-background border rounded p-1.5 shadow-lg hover:bg-primary hover:text-primary-foreground z-20",onClick:u=>{u.stopPropagation(),s(t)},"aria-label":"Editar tarefa",children:l.jsx(k.Edit,{className:"size-3.5"})})]})}),l.jsx(qe,{className:"w-80",align:"start",children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"font-medium mb-1",children:t.name}),t.description&&l.jsx("p",{className:"text-sm text-muted-foreground",children:t.description})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(k.Calendar,{className:"size-4 text-muted-foreground"}),l.jsxs("span",{children:[B.format(t.startDate,"dd/MM/yyyy",{locale:yt})," -"," ",B.format(t.endDate,"dd/MM/yyyy",{locale:yt})]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(k.Clock,{className:"size-4 text-muted-foreground"}),l.jsxs("span",{children:[B.differenceInDays(t.endDate,t.startDate)+1," dias"]})]}),t.assignee&&l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(k.User,{className:"size-4 text-muted-foreground"}),l.jsx("span",{children:t.assignee.name})]})]}),l.jsxs("div",{className:"flex items-center justify-between pt-2 border-t",children:[l.jsxs(he,{variant:c.variant,className:"gap-1",children:[l.jsx(d,{className:"size-3"}),c.label]}),l.jsxs("span",{className:"text-sm text-muted-foreground",children:[t.progress,"% concluído"]})]})]})})]})});h4.displayName="TaskRow";const H5=["DOM","SEG","TER","QUA","QUI","SEX","SAB"],p4=T.forwardRef(({tasks:t,projects:e=[],onTaskClick:n,onTaskEdit:r,rowHeight:a=48,columnWidth:i=40,groupBy:s="projects"},o)=>{const[f,c]=T.useState(new Date),[d,u]=T.useState(new Set),p=B.startOfMonth(f),h=B.endOfMonth(f),m=B.eachDayOfInterval({start:p,end:h}),g=()=>c(B.subMonths(f,1)),b=()=>c(B.addMonths(f,1)),x=()=>c(new Date),w=T.useMemo(()=>{if(s==="assignees"){const y=new Map;return t.forEach(C=>{var S;const L=((S=C.assignee)==null?void 0:S.name)||"Sem responsável";y.has(L)||y.set(L,[]),y.get(L).push(C)}),Array.from(y.entries()).map(([C,L],S)=>{var I,z,P;return{id:C,name:C,color:(I=L[0])!=null&&I.assignee?o0[S%o0.length]:"#999",initials:((P=(z=L[0])==null?void 0:z.assignee)==null?void 0:P.initials)||"??",tasks:L}})}else{const y=new Map;return t.forEach(N=>{const C=N.projectId;y.has(C)||y.set(C,[]),y.get(C).push(N)}),e.length>0?e.map(C=>({...C,tasks:y.get(C.id)||[]})).filter(C=>C.tasks.length>0):[{id:"default",name:"Tarefas",color:"#7F26BF",tasks:t}]}},[t,e,s]),j=y=>{u(N=>{const C=new Set(N);return C.has(y)?C.delete(y):C.add(y),C})};return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(H,{variant:"ghost",size:"icon",onClick:g,children:l.jsx(k.ChevronLeft,{className:"h-4 w-4"})}),l.jsx("h2",{className:"text-lg font-bold min-w-[200px] text-center",children:B.format(f,"MMMM yyyy",{locale:yt})}),l.jsx(H,{variant:"ghost",size:"icon",onClick:b,children:l.jsx(k.ChevronRight,{className:"h-4 w-4"})})]}),l.jsx(H,{variant:"outline",size:"sm",onClick:x,children:"Hoje"})]}),l.jsx("div",{ref:o,className:v("gantt-chart overflow-hidden rounded-lg border bg-card flex flex-col"),role:"grid","aria-label":"Gantt Chart",children:l.jsx("div",{className:"overflow-auto max-h-[600px] relative",children:l.jsxs("div",{style:{minWidth:"max-content"},children:[l.jsxs("div",{className:"sticky top-0 z-40 flex bg-background border-b shadow-sm",children:[l.jsx("div",{className:"sticky left-0 z-50 border-r bg-background flex items-center px-4",style:{width:"280px",height:"50px"},children:l.jsx("span",{className:"font-medium text-sm",children:s==="assignees"?"Colaboradores":"Tarefas"})}),l.jsx("div",{className:"flex",children:m.map(y=>{const N=B.isWeekend(y);return l.jsx("div",{className:v("flex-shrink-0 border-r text-center bg-background",N&&"bg-muted/20"),style:{width:`${i}px`},children:l.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-0.5 py-1",children:[l.jsx("span",{className:"text-[10px] font-bold leading-none text-foreground",children:H5[y.getDay()]}),l.jsx("span",{className:"text-[10px] text-muted-foreground leading-none",children:B.format(y,"d",{locale:yt})})]})},y.toISOString())})})]}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex pointer-events-none pl-[280px]",children:m.map(y=>{const N=B.isWeekend(y),C=B.isSameDay(y,new Date);return l.jsx("div",{className:v("flex-shrink-0 h-full",N&&"bg-muted/10",C&&"bg-primary/5"),style:{width:`${i}px`}},`grid-${y.toISOString()}`)})}),w.map(y=>{const N=d.has(y.id);return l.jsxs("div",{children:[l.jsxs("div",{className:"flex sticky-container",children:[l.jsxs("div",{className:"sticky left-0 z-30 w-[280px] border-r bg-background flex items-center gap-2 px-3 py-2 border-b hover:bg-muted/50 transition-colors cursor-pointer",style:{height:`${a}px`},onClick:()=>j(y.id),children:[N?l.jsx(k.ChevronRight,{className:"size-4 text-muted-foreground"}):l.jsx(k.ChevronDown,{className:"size-4 text-muted-foreground"}),s==="assignees"&&y.initials?l.jsx(Ft,{className:"size-6",children:l.jsx(Ut,{style:{backgroundColor:y.color},className:"text-white text-[10px]",children:y.initials})}):l.jsx("div",{className:"size-3 rounded-full flex-shrink-0",style:{backgroundColor:y.color||"var(--primary)"}}),l.jsx("span",{className:"font-medium text-sm truncate",children:y.name}),l.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:y.tasks.length})]}),l.jsx("div",{className:"flex-1 border-b",style:{height:`${a}px`}})]}),!N&&y.tasks.map(C=>l.jsxs("div",{className:"flex sticky-container group",children:[l.jsxs("div",{className:"sticky left-0 z-30 w-[280px] border-r bg-background flex items-center gap-2 px-3 py-2 pl-9 border-b hover:bg-muted/20 transition-colors",style:{height:`${a}px`},children:[l.jsx("div",{className:v("size-2 rounded-full flex-shrink-0",C.milestone&&"rotate-45"),style:{backgroundColor:y.color}}),l.jsx("span",{className:"text-sm truncate flex-1",children:C.name}),s==="projects"&&C.assignee&&l.jsx(Ft,{className:"size-6 opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx(Ut,{className:"text-[10px]",children:C.assignee.initials||C.assignee.name.substring(0,2).toUpperCase()})}),r&&l.jsx(k.Edit,{className:"size-4 text-muted-foreground cursor-pointer hover:text-primary ml-2 opacity-0 group-hover:opacity-100",onClick:()=>r(C)})]}),l.jsx("div",{className:"relative flex-1 border-b",style:{height:`${a}px`},children:l.jsx(h4,{task:C,timelineStart:p,timelineEnd:h,columnWidth:i,rowHeight:a,onTaskClick:n,onTaskEdit:r})})]},C.id))]},y.id)}),(()=>{const y=new Date;if(y>=p&&y<=h){const C=280+B.differenceInDays(y,p)*i+i/2;return l.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-primary pointer-events-none z-20",style:{left:`${C}px`},children:l.jsx("div",{className:"absolute -top-1 -left-1.5 size-3 rounded-full bg-primary shadow-sm"})})}return null})()]})]})})})]})});p4.displayName="GanttChart";const m4=T.forwardRef(({className:t},e)=>l.jsxs("div",{ref:e,className:v("flex flex-wrap gap-4",t),children:[Object.entries(u4).map(([n,r])=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:v("size-3 rounded",r.barColor)}),l.jsx("span",{className:"text-sm text-muted-foreground",children:r.label})]},n)),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"size-3 rotate-45 bg-primary"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Marco"})]})]}));m4.displayName="GanttLegend";function F5({...t}){return l.jsx(Gs.Root,{"data-slot":"hover-card",...t})}function U5({...t}){return l.jsx(Gs.Trigger,{"data-slot":"hover-card-trigger",...t})}function _5({className:t,align:e="center",sideOffset:n=4,...r}){return l.jsx(Gs.Portal,{"data-slot":"hover-card-portal",children:l.jsx(Gs.Content,{"data-slot":"hover-card-content",align:e,sideOffset:n,className:v("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...r})})}function J5({validationState:t,validate:e,onChange:n,className:r,...a}){const[i,s]=T.useState("idle"),o=t??i;function f(c){if(t===void 0&&e){const d=e(c.target.value);s(d===null?"idle":d?"valid":"invalid")}n==null||n(c)}return l.jsxs("div",{className:"relative flex items-center",children:[l.jsx(Ht,{className:v(o!=="idle"&&"pr-9",r),"aria-invalid":o==="invalid"||void 0,onChange:f,...a}),o==="valid"&&l.jsx(k.CheckCircle2,{className:"absolute right-3 size-4 text-green-600 pointer-events-none","aria-hidden":"true"}),o==="invalid"&&l.jsx(k.XCircle,{className:"absolute right-3 size-4 text-destructive pointer-events-none","aria-hidden":"true"})]})}function V5({className:t,containerClassName:e,...n}){return l.jsx(d0.OTPInput,{"data-slot":"input-otp",containerClassName:v("flex items-center gap-2 has-disabled:opacity-50",e),className:v("disabled:cursor-not-allowed",t),...n})}function G5({className:t,...e}){return l.jsx("div",{"data-slot":"input-otp-group",className:v("flex items-center gap-1",t),...e})}function Y5({index:t,className:e,...n}){const r=T.useContext(d0.OTPInputContext),{char:a,hasFakeCaret:i,isActive:s}=(r==null?void 0:r.slots[t])??{};return l.jsxs("div",{"data-slot":"input-otp-slot","data-active":s,className:v("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm bg-input-background transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",e),...n,children:[a,i&&l.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:l.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function Q5({...t}){return l.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...t,children:l.jsx(k.MinusIcon,{})})}function du({className:t,value:e,...n}){return l.jsx(mu.Root,{"data-slot":"progress",className:v("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...n,children:l.jsx(mu.Indicator,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})})}const W5={low:{color:"bg-blue-500",label:"Baixa",textColor:"text-blue-700",bgColor:"bg-blue-50 dark:bg-blue-950/20"},medium:{color:"bg-yellow-500",label:"Média",textColor:"text-yellow-700",bgColor:"bg-yellow-50 dark:bg-yellow-950/20"},high:{color:"bg-orange-500",label:"Alta",textColor:"text-orange-700",bgColor:"bg-orange-50 dark:bg-orange-950/20"},urgent:{color:"bg-red-500",label:"Urgente",textColor:"text-red-700",bgColor:"bg-red-50 dark:bg-red-950/20"}},g4=T.forwardRef(({title:t,description:e,coverImage:n,thumbnailImage:r,tags:a=[],assignees:i=[],priority:s,dueDate:o,comments:f,attachments:c,checklist:d,progress:u,status:p,variant:h="default",isDragging:m=!1,onClick:g,onEdit:b,onDelete:x,onDuplicate:w,className:j},y)=>{const N=o&&new Date(o)<new Date,C=s?W5[s]:null,L=I=>{const z=I.getDate().toString().padStart(2,"0"),P=(I.getMonth()+1).toString().padStart(2,"0");return`${z}/${P}`},S=I=>{I.target.closest("button")||I.target.closest("[role='menuitem']")||g==null||g()};return l.jsxs(Mr,{ref:y,className:v("group cursor-grab active:cursor-grabbing transition-all duration-200","hover:shadow-lg hover:scale-[1.02]",m&&"opacity-50 rotate-2 scale-105 shadow-2xl cursor-grabbing",s&&"border-l-4",s==="low"&&"border-l-blue-500",s==="medium"&&"border-l-yellow-500",s==="high"&&"border-l-orange-500",s==="urgent"&&"border-l-red-500",h==="compact"&&"hover:scale-[1.01]",j),onClick:S,children:[n&&h!=="compact"&&l.jsxs("div",{className:"relative w-full h-40 overflow-hidden rounded-t-lg",children:[l.jsx("img",{src:n,alt:t,className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"}),s&&l.jsx("div",{className:"absolute top-2 right-2",children:l.jsxs(he,{variant:"secondary",className:v("shadow-sm",C==null?void 0:C.bgColor),children:[l.jsx("div",{className:v("w-2 h-2 rounded-full mr-1",C==null?void 0:C.color)}),C==null?void 0:C.label]})})]}),l.jsxs(sa,{className:v(h==="compact"?"p-3 pb-2":"p-4 pb-3"),children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[r&&!n&&l.jsx("img",{src:r,alt:t,className:"w-10 h-10 rounded object-cover flex-shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx(oa,{className:v("line-clamp-2",h==="compact"?"text-sm":"text-base"),children:t}),p&&h==="detailed"&&l.jsx(he,{variant:"outline",className:"mt-1 text-xs",children:p})]})]}),e&&h!=="compact"&&l.jsx(p0,{className:"mt-2 line-clamp-2 text-xs",children:e})]}),(b||x||w)&&l.jsxs(Bi,{children:[l.jsx(Hi,{asChild:!0,children:l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",children:l.jsx(k.MoreVertical,{className:"h-4 w-4"})})}),l.jsxs(Fi,{align:"end",children:[b&&l.jsx(mr,{onClick:b,children:"Editar"}),w&&l.jsx(mr,{onClick:w,children:"Duplicar"}),x&&l.jsx(mr,{onClick:x,className:"text-destructive",children:"Excluir"})]})]})]}),a.length>0&&l.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[a.slice(0,h==="compact"?2:3).map(I=>l.jsx(he,{variant:"secondary",className:"text-xs",style:I.color?{backgroundColor:I.color+"20",color:I.color,borderColor:I.color+"40"}:void 0,children:I.label},I.id)),a.length>(h==="compact"?2:3)&&l.jsxs(he,{variant:"secondary",className:"text-xs",children:["+",a.length-(h==="compact"?2:3)]})]}),s&&!n&&h==="detailed"&&l.jsxs(he,{variant:"secondary",className:v("mt-2 w-fit text-xs",C==null?void 0:C.bgColor),children:[l.jsx("div",{className:v("w-2 h-2 rounded-full mr-1",C==null?void 0:C.color)}),C==null?void 0:C.label]})]}),u!==void 0&&h!=="compact"&&l.jsx(la,{className:"px-4 pb-3 pt-0",children:l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[l.jsx("span",{children:"Progresso"}),l.jsxs("span",{children:[u,"%"]})]}),l.jsx(du,{value:u,className:"h-1.5"})]})}),l.jsxs(m0,{className:v("flex items-center justify-between gap-2",h==="compact"?"px-3 pb-3 pt-1":"px-4 pb-4 pt-2"),children:[l.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground flex-wrap",children:[o&&l.jsxs("div",{className:v("flex items-center gap-1",N&&"text-destructive font-medium"),children:[N&&l.jsx(k.AlertCircle,{className:"h-3 w-3"}),l.jsx(k.Calendar,{className:"h-3 w-3"}),l.jsx("span",{children:L(o)})]}),d&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(k.CheckSquare,{className:"h-3 w-3"}),l.jsxs("span",{children:[d.completed,"/",d.total]})]}),f!==void 0&&f>0&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(k.MessageSquare,{className:"h-3 w-3"}),l.jsx("span",{children:f})]}),c!==void 0&&c>0&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(k.Paperclip,{className:"h-3 w-3"}),l.jsx("span",{children:c})]})]}),i.length>0&&l.jsxs("div",{className:"flex -space-x-2",children:[i.slice(0,3).map(I=>l.jsxs(Ft,{className:"h-6 w-6 border-2 border-background",children:[I.avatar&&l.jsx(Cn,{src:I.avatar,alt:I.name}),l.jsx(Ut,{className:"text-xs",children:I.initials||I.name.slice(0,2).toUpperCase()})]},I.id)),i.length>3&&l.jsxs("div",{className:"h-6 w-6 rounded-full border-2 border-background bg-muted flex items-center justify-center text-xs",children:["+",i.length-3]})]})]})]})});g4.displayName="KanbanCard";const b4=T.forwardRef(({title:t,primaryContent:e,secondaryContent:n,trendValue:r,trendLabel:a,icon:i=k.Activity,isLoading:s=!1,onClick:o,className:f},c)=>s?l.jsxs(Mr,{ref:c,className:f,children:[l.jsx(sa,{className:"pb-1",children:l.jsxs(oa,{className:"text-sm flex items-center gap-2",children:[l.jsx(Bn,{className:"h-4 w-4 rounded"}),l.jsx(Bn,{className:"h-4 w-24"})]})}),l.jsxs(la,{className:"space-y-1 pt-0",children:[l.jsx(Bn,{className:"h-8 w-32"}),l.jsx(Bn,{className:"h-3 w-full"})]})]}):l.jsxs(Mr,{ref:c,onClick:o,className:v(o&&"cursor-pointer hover:bg-accent/50 transition-colors",f),children:[l.jsx(sa,{className:"pb-1",children:l.jsxs(oa,{className:"text-sm flex items-center gap-2 text-muted-foreground",children:[l.jsx(i,{className:"h-4 w-4 text-muted-foreground"}),t]})}),l.jsxs(la,{className:"space-y-1 pt-0",children:[l.jsxs("div",{className:"flex items-baseline flex-wrap gap-2",children:[l.jsx("span",{className:"text-2xl font-bold",children:e}),r!==void 0&&l.jsxs(he,{variant:"secondary",className:v("px-1.5 py-0 h-auto text-xs",r>0?"text-green-600":"text-red-600"),children:[r>0?l.jsx(k.TrendingUp,{className:"h-3 w-3 mr-0.5 inline"}):l.jsx(k.TrendingDown,{className:"h-3 w-3 mr-0.5 inline"}),a]})]}),n&&l.jsx("p",{className:"text-xs text-muted-foreground",children:n})]})]}));b4.displayName="KPICard";function $5(t){return t?t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(1)} GB`:""}function Z5(t){if(!t)return"";try{return new Date(t).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function q5(t,e){if(t.length<=e)return t;const n=t.lastIndexOf(".");if(n===-1)return t.substring(0,e-3)+"...";const r=t.substring(n);return t.substring(0,n).substring(0,e-r.length-3)+"..."+r}function K5({attachments:t,onDownload:e,onRemove:n,onView:r,showDownload:a=!0,showRemove:i=!1,showView:s=!1,maxFilenameLength:o=40,variant:f="compact",emptyMessage:c="Nenhum anexo",isLoading:d=!1,className:u}){const[p,h]=M.useState({}),m=async(g,b,x)=>{if(!x)return;const w=g.chave||g.nomeOriginal;h(j=>({...j,[w]:b}));try{await x(g)}finally{h(j=>({...j,[w]:null}))}};return d?l.jsx("div",{className:v("space-y-2",u),children:[1,2,3].map(g=>l.jsxs("div",{className:"flex items-center gap-2 p-3 border rounded bg-muted/30 animate-pulse",children:[l.jsx("div",{className:"h-4 w-4 bg-muted-foreground/20 rounded"}),l.jsx("div",{className:"h-4 flex-1 bg-muted-foreground/20 rounded"})]},g))}):t.length===0?l.jsx("div",{className:v("text-center py-6 text-sm text-muted-foreground border rounded-lg bg-muted/20",u),children:c}):l.jsx("div",{className:v("space-y-2",u),children:t.map((g,b)=>{const x=g.chave||g.id||`${g.nomeOriginal}-${b}`,w=p[g.chave||g.nomeOriginal],j=w==="download",y=w==="view",N=(()=>{switch(g.status){case"completed":return l.jsx(he,{variant:"outline",className:"bg-green-50 text-green-600 border-green-200 hover:bg-green-50",children:"✓ Enviado"});case"uploading":return l.jsx(he,{variant:"outline",className:"bg-blue-50 text-blue-600 border-blue-200 hover:bg-blue-50",children:"Enviando..."});case"failed":return l.jsx(he,{variant:"outline",className:"bg-red-50 text-red-600 border-red-200 hover:bg-red-50",children:"✗ Erro"});case"retrying":return l.jsx(he,{variant:"outline",className:"bg-yellow-50 text-yellow-600 border-yellow-200 hover:bg-yellow-50",children:"Tentando..."});default:return null}})();return f==="detailed"?l.jsx("div",{className:v("p-4 border rounded-lg bg-card transition-colors",g.status==="failed"&&"border-red-200 bg-red-50/30"),children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[l.jsx(k.Paperclip,{className:"h-5 w-5 text-muted-foreground mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx("p",{className:"text-sm font-medium truncate",children:g.nomeOriginal})}),l.jsx(it,{children:l.jsx("p",{children:g.nomeOriginal})})]})}),l.jsxs("div",{className:"flex items-center gap-2 mt-1 text-xs text-muted-foreground",children:[g.tamanhoBytes&&l.jsx("span",{children:$5(g.tamanhoBytes)}),g.tamanhoBytes&&g.dataUpload&&l.jsx("span",{children:"•"}),g.dataUpload&&l.jsx("span",{children:Z5(g.dataUpload)})]}),g.status==="uploading"&&typeof g.progress=="number"&&l.jsx(du,{value:g.progress,className:"h-1 mt-2"}),g.status==="failed"&&g.erro&&l.jsxs("div",{className:"flex items-center gap-1 mt-2 text-xs text-red-600",children:[l.jsx(k.AlertCircle,{className:"h-3 w-3"}),l.jsx("span",{children:g.erro})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[N,g.status==="completed"&&l.jsxs(l.Fragment,{children:[s&&r&&l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>m(g,"view",r),disabled:y,children:l.jsx(k.Eye,{className:"h-4 w-4"})})}),l.jsx(it,{children:"Visualizar"})]})}),a&&e&&l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>m(g,"download",e),disabled:j,children:l.jsx(k.Download,{className:"h-4 w-4"})})}),l.jsx(it,{children:"Baixar"})]})}),i&&n&&l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>n(g),children:l.jsx(k.Trash2,{className:"h-4 w-4"})})}),l.jsx(it,{children:"Remover"})]})})]})]})]})},x):l.jsxs("div",{className:v("flex items-center justify-between gap-2 p-3 border rounded-lg bg-muted/30 transition-colors",g.status==="failed"&&"border-red-200 bg-red-50/30"),children:[l.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[l.jsx(k.Paperclip,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx("span",{className:"text-sm truncate",children:q5(g.nomeOriginal,o)})}),l.jsx(it,{children:l.jsx("p",{className:"max-w-xs break-all",children:g.nomeOriginal})})]})}),g.status==="uploading"&&typeof g.progress=="number"&&l.jsxs("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:[g.progress,"%"]}),N]}),g.status==="completed"&&l.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[s&&r&&l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>m(g,"view",r),disabled:y,children:l.jsx(k.Eye,{className:"h-4 w-4"})})}),l.jsx(it,{children:"Visualizar"})]})}),a&&e&&l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>m(g,"download",e),disabled:j,children:l.jsx(k.Download,{className:"h-4 w-4"})})}),l.jsx(it,{children:"Baixar"})]})}),i&&n&&l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>n(g),children:l.jsx(k.Trash2,{className:"h-4 w-4"})})}),l.jsx(it,{children:"Remover"})]})})]}),g.status==="failed"&&g.erro&&l.jsx(It,{children:l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:l.jsx(k.AlertCircle,{className:"h-4 w-4 text-red-600 flex-shrink-0"})}),l.jsx(it,{children:l.jsx("p",{children:g.erro})})]})})]},x)})})}function X5({className:t,...e}){return l.jsx(Qe.Root,{"data-slot":"menubar",className:v("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",t),...e})}function eA({...t}){return l.jsx(Qe.Menu,{"data-slot":"menubar-menu",...t})}function tA({...t}){return l.jsx(Qe.Group,{"data-slot":"menubar-group",...t})}function x4({...t}){return l.jsx(Qe.Portal,{"data-slot":"menubar-portal",...t})}function nA({...t}){return l.jsx(Qe.RadioGroup,{"data-slot":"menubar-radio-group",...t})}function rA({className:t,...e}){return l.jsx(Qe.Trigger,{"data-slot":"menubar-trigger",className:v("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",t),...e})}function aA({className:t,align:e="start",alignOffset:n=-4,sideOffset:r=8,...a}){return l.jsx(x4,{children:l.jsx(Qe.Content,{"data-slot":"menubar-content",align:e,alignOffset:n,sideOffset:r,className:v("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",t),...a})})}function iA({className:t,inset:e,variant:n="default",...r}){return l.jsx(Qe.Item,{"data-slot":"menubar-item","data-inset":e,"data-variant":n,className:v("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r})}function sA({className:t,children:e,checked:n,...r}){return l.jsxs(Qe.CheckboxItem,{"data-slot":"menubar-checkbox-item",className:v("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:n,...r,children:[l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(Qe.ItemIndicator,{children:l.jsx(k.CheckIcon,{className:"size-4"})})}),e]})}function oA({className:t,children:e,...n}){return l.jsxs(Qe.RadioItem,{"data-slot":"menubar-radio-item",className:v("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n,children:[l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(Qe.ItemIndicator,{children:l.jsx(k.CircleIcon,{className:"size-2 fill-current"})})}),e]})}function lA({className:t,inset:e,...n}){return l.jsx(Qe.Label,{"data-slot":"menubar-label","data-inset":e,className:v("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...n})}function fA({className:t,...e}){return l.jsx(Qe.Separator,{"data-slot":"menubar-separator",className:v("bg-border -mx-1 my-1 h-px",t),...e})}function cA({className:t,...e}){return l.jsx("span",{"data-slot":"menubar-shortcut",className:v("text-muted-foreground ml-auto text-xs tracking-widest",t),...e})}function dA({...t}){return l.jsx(Qe.Sub,{"data-slot":"menubar-sub",...t})}function uA({className:t,inset:e,children:n,...r}){return l.jsxs(Qe.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":e,className:v("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",t),...r,children:[n,l.jsx(k.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})}function hA({className:t,...e}){return l.jsx(Qe.SubContent,{"data-slot":"menubar-sub-content",className:v("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),...e})}function pA({className:t,children:e,viewport:n=!0,...r}){return l.jsxs(Dr.Root,{"data-slot":"navigation-menu","data-viewport":n,className:v("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...r,children:[e,n&&l.jsx(yA,{})]})}function mA({className:t,...e}){return l.jsx(Dr.List,{"data-slot":"navigation-menu-list",className:v("group flex flex-1 list-none items-center justify-center gap-1",t),...e})}function gA({className:t,...e}){return l.jsx(Dr.Item,{"data-slot":"navigation-menu-item",className:v("relative",t),...e})}const y4=$t.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");function bA({className:t,children:e,...n}){return l.jsxs(Dr.Trigger,{"data-slot":"navigation-menu-trigger",className:v(y4(),"group",t),...n,children:[e," ",l.jsx(k.ChevronDownIcon,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function xA({className:t,...e}){return l.jsx(Dr.Content,{"data-slot":"navigation-menu-content",className:v("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",t),...e})}function yA({className:t,...e}){return l.jsx("div",{className:v("absolute top-full left-0 isolate z-50 flex justify-center"),children:l.jsx(Dr.Viewport,{"data-slot":"navigation-menu-viewport",className:v("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",t),...e})})}function vA({className:t,...e}){return l.jsx(Dr.Link,{"data-slot":"navigation-menu-link",className:v("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",t),...e})}function wA({title:t,description:e,breadcrumbs:n,secondaryNavCollapsed:r=!1,onSecondaryNavToggle:a,className:i}){return l.jsxs("div",{className:v("border-b bg-background",i),children:[l.jsxs("div",{className:"flex h-14 items-center gap-4 px-6",children:[a&&l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",onClick:a,title:r?"Mostrar menu lateral":"Ocultar menu lateral",children:r?l.jsx(k.PanelLeftOpen,{className:"h-4 w-4"}):l.jsx(k.PanelLeftClose,{className:"h-4 w-4"})}),n&&n.length>0&&l.jsx(A0,{children:l.jsx(z0,{children:n.map((s,o)=>l.jsxs(T.Fragment,{children:[o>0&&l.jsx(B0,{}),l.jsx(O0,{children:o===n.length-1?l.jsx(R0,{children:s.label}):s.href?l.jsx(P0,{href:s.href,children:s.label}):l.jsx("span",{children:s.label})})]},o))})}),!n&&l.jsx("div",{className:"flex-1",children:l.jsx("h1",{className:"text-lg font-semibold",children:t})})]}),e&&l.jsx("div",{className:"border-t px-6 py-3",children:l.jsx("p",{className:"text-sm text-muted-foreground",children:e})})]})}function MA({title:t,icon:e,badge:n,secondaryNavCollapsed:r=!1,onSecondaryNavToggle:a,className:i}){return l.jsxs("div",{className:v("flex h-14 items-center gap-3 border-b bg-background px-6",i),children:[a&&l.jsx(H,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",onClick:a,title:r?"Mostrar menu lateral":"Ocultar menu lateral",children:r?l.jsx(k.PanelLeftOpen,{className:"h-4 w-4"}):l.jsx(k.PanelLeftClose,{className:"h-4 w-4"})}),e&&l.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:l.jsx(e,{className:"h-4 w-4 text-primary"})}),l.jsx("h1",{className:"flex-1 text-lg font-semibold",children:t}),n&&l.jsx("div",{className:"shrink-0",children:n})]})}function jA({title:t,subtitle:e,actions:n,className:r}){return l.jsxs("div",{className:v("flex items-start justify-between gap-4",r),children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:t}),e&&l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e})]}),n&&l.jsx("div",{className:"flex items-center gap-2",children:n})]})}function CA({className:t,...e}){return l.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:v("mx-auto flex w-full justify-center",t),...e})}function LA({className:t,...e}){return l.jsx("ul",{"data-slot":"pagination-content",className:v("flex flex-row items-center gap-1",t),...e})}function NA({...t}){return l.jsx("li",{"data-slot":"pagination-item",...t})}function uu({className:t,isActive:e,size:n="icon",...r}){return l.jsx("a",{"aria-current":e?"page":void 0,"data-slot":"pagination-link","data-active":e,className:v(Jn({variant:e?"outline":"ghost",size:n}),t),...r})}function kA({className:t,...e}){return l.jsxs(uu,{"aria-label":"Go to previous page",size:"default",className:v("gap-1 px-2.5 sm:pl-2.5",t),...e,children:[l.jsx(k.ChevronLeftIcon,{}),l.jsx("span",{className:"hidden sm:block",children:"Previous"})]})}function SA({className:t,...e}){return l.jsxs(uu,{"aria-label":"Go to next page",size:"default",className:v("gap-1 px-2.5 sm:pr-2.5",t),...e,children:[l.jsx("span",{className:"hidden sm:block",children:"Next"}),l.jsx(k.ChevronRightIcon,{})]})}function TA({className:t,...e}){return l.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:v("flex size-9 items-center justify-center",t),...e,children:[l.jsx(k.MoreHorizontalIcon,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]})}const v4=T.forwardRef(({className:t,showToggle:e=!0,...n},r)=>{const[a,i]=T.useState(!1);return l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:a?"text":"password","data-slot":"input",className:v("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e&&"pr-10",t),ref:r,...n}),e&&l.jsx("button",{type:"button",onClick:()=>i(!a),className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",tabIndex:-1,"aria-label":a?"Hide password":"Show password",children:a?l.jsx(k.EyeOff,{className:"h-4 w-4 text-muted-foreground"}):l.jsx(k.Eye,{className:"h-4 w-4 text-muted-foreground"})})]})});v4.displayName="PasswordInput";function IA({className:t,...e}){return l.jsx(Nf.Root,{"data-slot":"radio-group",className:v("grid gap-3",t),...e})}function DA({className:t,...e}){return l.jsx(Nf.Item,{"data-slot":"radio-group-item",className:v("peer h-5 w-5 shrink-0 rounded-full border border-gray-300 bg-white shadow-sm transition-all hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:l.jsx(Nf.Indicator,{"data-slot":"radio-group-indicator",className:"flex items-center justify-center",children:l.jsx("div",{className:"h-2 w-2 rounded-full bg-white"})})})}function EA({className:t,...e}){return l.jsx(Lc.PanelGroup,{"data-slot":"resizable-panel-group",className:v("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}function AA({...t}){return l.jsx(Lc.Panel,{"data-slot":"resizable-panel",...t})}function zA({withHandle:t,className:e,...n}){return l.jsx(Lc.PanelResizeHandle,{"data-slot":"resizable-handle",className:v("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...n,children:t&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(k.GripVerticalIcon,{className:"size-2.5"})})})}function OA({filters:t=[],onSelectFilter:e,onToggleFavorite:n,onDeleteFilter:r,className:a}){const i=t.filter(o=>o.isFavorite),s=t.filter(o=>!o.isFavorite);return l.jsxs(Bi,{children:[l.jsx(Hi,{asChild:!0,children:l.jsxs(H,{variant:"outline",size:"sm",className:v("gap-2",a),children:[l.jsx(k.Download,{className:"h-4 w-4"}),"Filtros salvos",t.length>0&&l.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.length,")"]})]})}),l.jsx(Fi,{align:"start",className:"w-[280px]",children:t.length===0?l.jsx("div",{className:"px-2 py-6 text-center text-sm text-muted-foreground",children:"No saved filters yet"}):l.jsxs(l.Fragment,{children:[i.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Favorites"}),i.map(o=>l.jsx(l0,{filter:o,onSelect:e,onToggleFavorite:n,onDelete:r},o.id)),s.length>0&&l.jsx(Qs,{})]}),s.length>0&&l.jsxs(l.Fragment,{children:[i.length>0&&l.jsx("div",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground",children:"Todos filtros"}),s.map(o=>l.jsx(l0,{filter:o,onSelect:e,onToggleFavorite:n,onDelete:r},o.id))]})]})})]})}function l0({filter:t,onSelect:e,onToggleFavorite:n,onDelete:r}){return l.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5 hover:bg-muted rounded-sm group",children:[l.jsx("button",{onClick:a=>{a.stopPropagation(),n==null||n(t.id)},className:"p-1 hover:bg-accent rounded-sm",children:l.jsx(k.Star,{className:v("h-3.5 w-3.5",t.isFavorite?"fill-yellow-500 text-yellow-500":"text-muted-foreground")})}),l.jsxs("button",{onClick:()=>e==null?void 0:e(t.id),className:"flex-1 text-left px-2",children:[l.jsx("div",{className:"text-sm",children:t.name}),t.description&&l.jsx("div",{className:"text-xs text-muted-foreground",children:t.description}),t.filterCount!==void 0&&l.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:[t.filterCount," ",t.filterCount===1?"filter":"filters"]})]}),l.jsx("button",{onClick:a=>{a.stopPropagation(),r==null||r(t.id)},className:"p-1 hover:bg-accent rounded-sm opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx(k.Trash2,{className:"h-3.5 w-3.5 text-destructive"})})]})}function w4({...t}){return l.jsx(Ae.Root,{"data-slot":"sheet",...t})}function PA({...t}){return l.jsx(Ae.Trigger,{"data-slot":"sheet-trigger",...t})}function RA({...t}){return l.jsx(Ae.Close,{"data-slot":"sheet-close",...t})}function BA({...t}){return l.jsx(Ae.Portal,{"data-slot":"sheet-portal",...t})}const M4=T.forwardRef(({className:t,...e},n)=>l.jsx(Ae.Overlay,{ref:n,"data-slot":"sheet-overlay",className:v("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e}));M4.displayName=Ae.Overlay.displayName;function j4({className:t,children:e,side:n="right",...r}){return l.jsxs(BA,{children:[l.jsx(M4,{}),l.jsxs(Ae.Content,{"data-slot":"sheet-content",className:v("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...r,children:[e,l.jsxs(Ae.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[l.jsx(k.XIcon,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function C4({className:t,...e}){return l.jsx("div",{"data-slot":"sheet-header",className:v("flex flex-col gap-1.5 p-4",t),...e})}function HA({className:t,...e}){return l.jsx("div",{"data-slot":"sheet-footer",className:v("mt-auto flex flex-col gap-2 p-4",t),...e})}function L4({className:t,...e}){return l.jsx(Ae.Title,{"data-slot":"sheet-title",className:v("text-foreground font-semibold",t),...e})}function N4({className:t,...e}){return l.jsx(Ae.Description,{"data-slot":"sheet-description",className:v("text-muted-foreground text-sm",t),...e})}const Lf=768;function k4(){const[t,e]=T.useState(void 0);return T.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Lf-1}px)`),r=()=>{e(window.innerWidth<Lf)};return n.addEventListener("change",r),e(window.innerWidth<Lf),()=>n.removeEventListener("change",r)},[]),!!t}const FA="sidebar_state",UA=3600*24*7,_A="16rem",JA="18rem",VA="3rem",GA="b",S4=T.createContext(null);function ns(){const t=T.useContext(S4);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function YA({defaultOpen:t=!0,open:e,onOpenChange:n,className:r,style:a,children:i,...s}){const o=k4(),[f,c]=T.useState(!1),[d,u]=T.useState(t),p=e??d,h=T.useCallback(x=>{const w=typeof x=="function"?x(p):x;n?n(w):u(w),document.cookie=`${FA}=${w}; path=/; max-age=${UA}`},[n,p]),m=T.useCallback(()=>o?c(x=>!x):h(x=>!x),[o,h,c]);T.useEffect(()=>{const x=w=>{w.key===GA&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),m())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[m]);const g=p?"expanded":"collapsed",b=T.useMemo(()=>({state:g,open:p,setOpen:h,isMobile:o,openMobile:f,setOpenMobile:c,toggleSidebar:m}),[g,p,h,o,f,c,m]);return l.jsx(S4.Provider,{value:b,children:l.jsx(It,{delayDuration:0,children:l.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":_A,"--sidebar-width-icon":VA,...a},className:v("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...s,children:i})})})}function QA({side:t="left",variant:e="sidebar",collapsible:n="offcanvas",className:r,children:a,...i}){const{isMobile:s,state:o,openMobile:f,setOpenMobile:c}=ns();return n==="none"?l.jsx("div",{"data-slot":"sidebar",className:v("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...i,children:a}):s?l.jsx(w4,{open:f,onOpenChange:c,...i,children:l.jsxs(j4,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":JA},side:t,children:[l.jsxs(C4,{className:"sr-only",children:[l.jsx(L4,{children:"Sidebar"}),l.jsx(N4,{children:"Displays the mobile sidebar."})]}),l.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):l.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":o,"data-collapsible":o==="collapsed"?n:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[l.jsx("div",{"data-slot":"sidebar-gap",className:v("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),l.jsx("div",{"data-slot":"sidebar-container",className:v("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:l.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:a})})]})}function WA({className:t,onClick:e,...n}){const{toggleSidebar:r}=ns();return l.jsxs(H,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:v("size-7",t),onClick:a=>{e==null||e(a),r()},...n,children:[l.jsx(k.PanelLeftIcon,{}),l.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function $A({className:t,...e}){const{toggleSidebar:n}=ns();return l.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:v("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...e})}function ZA({className:t,...e}){return l.jsx("main",{"data-slot":"sidebar-inset",className:v("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...e})}function qA({className:t,...e}){return l.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:v("flex flex-col gap-2 p-2",t),...e})}function KA({className:t,...e}){return l.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:v("flex flex-col gap-2 p-2",t),...e})}function XA({className:t,...e}){return l.jsx(Hn,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:v("bg-sidebar-border mx-2 w-auto",t),...e})}function e8({className:t,...e}){return l.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:v("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...e})}function t8({className:t,...e}){return l.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:v("relative flex w-full min-w-0 flex-col p-2",t),...e})}function n8({className:t,asChild:e=!1,...n}){const r=e?Nn.Slot:"div";return l.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:v("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function r8({className:t,asChild:e=!1,...n}){const r=e?Nn.Slot:"button";return l.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:v("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",t),...n})}function a8({className:t,...e}){return l.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:v("w-full text-sm",t),...e})}function i8({className:t,...e}){return l.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:v("flex w-full min-w-0 flex-col gap-1",t),...e})}function s8({className:t,...e}){return l.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:v("group/menu-item relative",t),...e})}const o8=$t.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function l8({asChild:t=!1,isActive:e=!1,variant:n="default",size:r="default",tooltip:a,className:i,...s}){const o=t?Nn.Slot:"button",{isMobile:f,state:c}=ns(),d=l.jsx(o,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":e,className:v(o8({variant:n,size:r}),i),...s});return a?(typeof a=="string"&&(a={children:a}),l.jsxs(rt,{children:[l.jsx(at,{asChild:!0,children:d}),l.jsx(it,{side:"right",align:"center",hidden:c!=="collapsed"||f,...a})]})):d}function f8({className:t,asChild:e=!1,showOnHover:n=!1,...r}){const a=e?Nn.Slot:"button";return l.jsx(a,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:v("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",t),...r})}function c8({className:t,...e}){return l.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:v("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),...e})}function d8({className:t,showIcon:e=!1,...n}){const r=T.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return l.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:v("flex h-8 items-center gap-2 rounded-md px-2",t),...n,children:[e&&l.jsx(Bn,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),l.jsx(Bn,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function u8({className:t,...e}){return l.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:v("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...e})}function h8({className:t,...e}){return l.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:v("group/menu-sub-item relative",t),...e})}function p8({asChild:t=!1,size:e="md",isActive:n=!1,className:r,...a}){const i=t?Nn.Slot:"a";return l.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":e,"data-active":n,className:v("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...a})}function T4({className:t,defaultValue:e,value:n,min:r=0,max:a=100,...i}){const s=T.useMemo(()=>Array.isArray(n)?n:Array.isArray(e)?e:[r,a],[n,e,r,a]);return l.jsxs(hs.Root,{"data-slot":"slider",defaultValue:e,value:n,min:r,max:a,className:v("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...i,children:[l.jsx(hs.Track,{"data-slot":"slider-track",className:v("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-4 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:l.jsx(hs.Range,{"data-slot":"slider-range",className:v("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(o,f)=>l.jsx(hs.Thumb,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},f))]})}const I4=$t.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-white dark:bg-zinc-900 border border-input hover:bg-accent hover:text-accent-foreground text-foreground",google:"bg-white dark:bg-zinc-900 border border-input hover:bg-accent text-foreground",github:"bg-[#24292F] hover:bg-[#24292F]/90 text-white dark:bg-[#24292F] dark:hover:bg-[#24292F]/80",facebook:"bg-[#1877F2] hover:bg-[#1877F2]/90 text-white",apple:"bg-black hover:bg-black/90 text-white dark:bg-white dark:hover:bg-white/90 dark:text-black",microsoft:"bg-white dark:bg-zinc-900 border border-input hover:bg-accent text-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),m8=()=>l.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",children:[l.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),l.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),l.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),l.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),g8=()=>l.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),b8=()=>l.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),x8=()=>l.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",children:[l.jsx("path",{d:"M11.4 11.4H2V2h9.4v9.4z",fill:"#F25022"}),l.jsx("path",{d:"M22 11.4h-9.4V2H22v9.4z",fill:"#7FBA00"}),l.jsx("path",{d:"M11.4 22H2v-9.4h9.4V22z",fill:"#00A4EF"}),l.jsx("path",{d:"M22 22h-9.4v-9.4H22V22z",fill:"#FFB900"})]}),D4=T.forwardRef(({className:t,variant:e,size:n,provider:r,children:a,...i},s)=>{const o=e||r,f=()=>{switch(r){case"google":return l.jsx(m8,{});case"github":return l.jsx(k.Github,{className:"h-5 w-5"});case"facebook":return l.jsx(b8,{});case"apple":return l.jsx(g8,{});case"microsoft":return l.jsx(x8,{});default:return null}},c=()=>`Continue with ${{google:"Google",github:"GitHub",facebook:"Facebook",apple:"Apple",microsoft:"Microsoft"}[r]}`;return l.jsxs("button",{className:v(I4({variant:o,size:n,className:t})),ref:s,...i,children:[f(),l.jsx("span",{children:a||c()})]})});D4.displayName="SocialButton";function E4({className:t,...e}){return l.jsx(gu.Root,{"data-slot":"switch",className:v("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:l.jsx(gu.Thumb,{"data-slot":"switch-thumb",className:v("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const y8=[{value:"not-started",label:"Não iniciada",color:"bg-gray-500"},{value:"in-progress",label:"Em progresso",color:"bg-primary"},{value:"on-hold",label:"Em espera",color:"bg-cyan-500"},{value:"completed",label:"Concluída",color:"bg-green-500"},{value:"delayed",label:"Atrasada",color:"bg-red-500"},{value:"cancelled",label:"Cancelada",color:"bg-orange-500"}];function v8({task:t,open:e,onOpenChange:n,onSave:r,availableTasks:a=[],availableAssignees:i=[]}){var x;const[s,o]=T.useState(null),[f,c]=T.useState(!1),[d,u]=T.useState(!1);if(T.useEffect(()=>{t&&o({...t})},[t]),!s)return null;const p=()=>{r(s),n(!1)},h=(w,j)=>{o(y=>y?{...y,[w]:j}:null)},m=w=>{o(j=>{if(!j)return null;const y=j.dependencies||[],N=y.includes(w)?y.filter(C=>C!==w):[...y,w];return{...j,dependencies:N}})},g=a.filter(w=>w.id!==s.id),b=s.name.trim()!==""&&s.startDate<=s.endDate;return l.jsx(Ui,{open:e,onOpenChange:n,children:l.jsxs(_i,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[l.jsxs(Ji,{children:[l.jsx(Vi,{children:"Editar Tarefa"}),l.jsx(Gi,{children:'Altere os detalhes da tarefa abaixo. As mudanças serão salvas ao clicar em "Salvar alterações".'})]}),l.jsxs("div",{className:"space-y-6 py-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{htmlFor:"task-name",children:"Nome da Tarefa *"}),l.jsx(Ht,{id:"task-name",value:s.name,onChange:w=>h("name",w.target.value),placeholder:"Ex: Briefing com cliente"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{htmlFor:"task-description",children:"Descrição"}),l.jsx(nu,{id:"task-description",value:s.description||"",onChange:w=>h("description",w.target.value),placeholder:"Adicione detalhes sobre esta tarefa...",rows:3})]}),l.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{children:"Data de Início *"}),l.jsxs(ot,{open:f,onOpenChange:c,children:[l.jsx(Ze,{asChild:!0,children:l.jsxs(H,{variant:"outline",className:v("w-full justify-start text-left font-normal",!s.startDate&&"text-muted-foreground"),children:[l.jsx(k.CalendarIcon,{className:"mr-2 size-4"}),s.startDate?B.format(s.startDate,"dd/MM/yyyy",{locale:yt}):"Selecionar data"]})}),l.jsx(qe,{className:"w-auto p-0",align:"start",children:l.jsx(Calendar,{mode:"single",selected:s.startDate,onSelect:w=>{w&&(h("startDate",w),c(!1))},initialFocus:!0})})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{children:"Data de Término *"}),l.jsxs(ot,{open:d,onOpenChange:u,children:[l.jsx(Ze,{asChild:!0,children:l.jsxs(H,{variant:"outline",className:v("w-full justify-start text-left font-normal",!s.endDate&&"text-muted-foreground"),children:[l.jsx(k.CalendarIcon,{className:"mr-2 size-4"}),s.endDate?B.format(s.endDate,"dd/MM/yyyy",{locale:yt}):"Selecionar data"]})}),l.jsx(qe,{className:"w-auto p-0",align:"start",children:l.jsx(Calendar,{mode:"single",selected:s.endDate,onSelect:w=>{w&&(h("endDate",w),u(!1))},disabled:w=>s.startDate?w<s.startDate:!1,initialFocus:!0})})]})]})]}),s.startDate>s.endDate&&l.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900",children:[l.jsx(k.AlertCircle,{className:"size-4 text-red-600 flex-shrink-0"}),l.jsx("p",{className:"text-sm text-red-900 dark:text-red-200",children:"A data de término deve ser posterior à data de início"})]}),l.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{htmlFor:"task-status",children:"Status"}),l.jsxs(Xt,{value:s.status,onValueChange:w=>h("status",w),children:[l.jsx(tn,{id:"task-status",children:l.jsx(en,{})}),l.jsx(nn,{children:y8.map(w=>l.jsx(Dt,{value:w.value,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:v("size-2 rounded-full",w.color)}),w.label]})},w.value))})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{htmlFor:"task-assignee",children:"Responsável"}),l.jsxs(Xt,{value:((x=s.assignee)==null?void 0:x.name)||"",onValueChange:w=>{const j=i.find(y=>y.name===w);h("assignee",j||void 0)},children:[l.jsx(tn,{id:"task-assignee",children:l.jsx(en,{placeholder:"Selecionar responsável"})}),l.jsx(nn,{children:i.map(w=>l.jsx(Dt,{value:w.name,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(k.User,{className:"size-4"}),w.name]})},w.name))})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Ue,{children:"Progresso"}),l.jsxs("span",{className:"text-sm font-medium",children:[s.progress,"%"]})]}),l.jsx(T4,{value:[s.progress],onValueChange:w=>h("progress",w[0]),max:100,step:5,className:"w-full"}),l.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[l.jsx("span",{children:"0%"}),l.jsx("span",{children:"50%"}),l.jsx("span",{children:"100%"})]})]}),l.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg border",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Ue,{htmlFor:"milestone-toggle",className:"cursor-pointer",children:"Marco Importante (Milestone)"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Marcos aparecem como losangos no cronograma"})]}),l.jsx(E4,{id:"milestone-toggle",checked:s.milestone||!1,onCheckedChange:w=>h("milestone",w)})]}),g.length>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(k.Link2,{className:"size-4 text-muted-foreground"}),l.jsx(Ue,{children:"Dependências"})]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Selecione as tarefas que precisam ser concluídas antes desta"}),l.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-3",children:g.map(w=>{var y;const j=((y=s.dependencies)==null?void 0:y.includes(w.id))||!1;return l.jsxs("div",{className:v("flex items-center gap-3 p-2 rounded-md cursor-pointer transition-colors",j?"bg-primary/10 border border-primary/20":"hover:bg-muted/50"),onClick:()=>m(w.id),children:[l.jsx("div",{className:v("size-4 rounded border-2 flex items-center justify-center transition-all",j?"bg-primary border-primary":"border-muted-foreground"),children:j&&l.jsx("div",{className:"size-2 rounded-sm bg-white"})}),l.jsx("span",{className:"text-sm flex-1",children:w.name}),w.assignee&&l.jsx(he,{variant:"outline",className:"text-xs",children:w.assignee.name})]},w.id)})}),s.dependencies&&s.dependencies.length>0&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.dependencies.length," dependência(s) selecionada(s)"]})]})]}),l.jsxs(Zo,{children:[l.jsx(H,{variant:"outline",onClick:()=>n(!1),children:"Cancelar"}),l.jsx(H,{onClick:p,disabled:!b,children:"Salvar alterações"})]})]})})}const w8=t=>{switch(t){case"create":return l.jsx(k.PlusCircle,{className:"h-4 w-4 text-green-600"});case"status_change":return l.jsx(k.RefreshCw,{className:"h-4 w-4 text-blue-600"});case"comment":return l.jsx(k.MessageSquare,{className:"h-4 w-4 text-slate-500"});case"upload":return l.jsx(k.Paperclip,{className:"h-4 w-4 text-orange-600"});case"assignment":return l.jsx(k.User,{className:"h-4 w-4 text-purple-600"});case"update":return l.jsx(k.Pencil,{className:"h-4 w-4 text-amber-600"});default:return l.jsx(k.Circle,{className:"h-4 w-4 text-slate-400"})}},M8=t=>{switch(t){case"create":return"bg-green-50 border-green-200";case"status_change":return"bg-blue-50 border-blue-200";case"comment":return"bg-slate-50 border-slate-200";case"upload":return"bg-orange-50 border-orange-200";case"assignment":return"bg-purple-50 border-purple-200";case"update":return"bg-amber-50 border-amber-200";default:return"bg-slate-50 border-slate-200"}},j8=({event:t,isLast:e,onDetailsOpen:n})=>{var o,f,c,d,u,p,h;const[r,a]=T.useState(!1),i=!!((o=t.metadata)!=null&&o.before||(f=t.metadata)!=null&&f.after||(c=t.metadata)!=null&&c.details),s=m=>{a(m),m&&n&&n(t)};return l.jsxs("div",{className:"flex gap-4 group",children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("div",{className:v("flex items-center justify-center w-8 h-8 rounded-full border shadow-sm z-10 transition-colors","bg-background group-hover:border-primary/50",M8(t.action)),children:w8(t.action)}),!e&&l.jsx("div",{className:"w-px h-full bg-border group-hover:bg-primary/20 transition-colors min-h-[2rem]"})]}),l.jsx("div",{className:"flex-1 pb-8 min-w-0",children:l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground/90",children:[l.jsx("span",{className:"font-semibold",children:t.user.name}),l.jsx("span",{className:"text-muted-foreground font-normal",children:t.title})]}),l.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",title:B.format(t.timestamp,"PPpp",{locale:yt}),children:B.formatDistanceToNow(t.timestamp,{addSuffix:!0,locale:yt})})]}),i&&l.jsxs(_0,{open:r,onOpenChange:s,className:"mt-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[t.action==="upload"&&((d=t.metadata)==null?void 0:d.fileName)&&l.jsxs(he,{variant:"outline",className:"gap-1 font-normal bg-muted/30 text-muted-foreground hover:bg-muted/50",children:[l.jsx(k.FileText,{className:"h-3 w-3"}),t.metadata.fileName]}),l.jsx(J0,{asChild:!0,children:l.jsxs(H,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs text-muted-foreground hover:text-primary gap-1",children:[r?"Ocultar detalhes":"Ver detalhes",l.jsx(k.ChevronRight,{className:v("h-3 w-3 transition-transform duration-200",r&&"rotate-90")})]})})]}),l.jsx(V0,{className:"mt-2",children:l.jsxs("div",{className:"rounded-md border bg-muted/30 p-3 text-sm animate-in slide-in-from-top-2 duration-200",children:[(((u=t.metadata)==null?void 0:u.before)||((p=t.metadata)==null?void 0:p.after))&&l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4",children:[t.metadata.before&&l.jsx("div",{className:"flex-1 p-2 rounded bg-background/50 border border-dashed text-muted-foreground line-through text-xs",children:t.metadata.before}),t.metadata.before&&t.metadata.after&&l.jsx(k.ArrowRight,{className:"h-4 w-4 text-muted-foreground hidden sm:block"}),t.metadata.after&&l.jsx("div",{className:"flex-1 p-2 rounded bg-background border border-l-4 border-l-[#7F26BF] shadow-sm text-foreground text-xs font-medium",children:t.metadata.after})]}),((h=t.metadata)==null?void 0:h.details)&&l.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-xs",children:t.metadata.details})]})})]})]})})]})},C8=({events:t,className:e,onDetailsOpen:n})=>l.jsx("div",{className:v("flex flex-col",e),children:t.map((r,a)=>l.jsx(j8,{event:r,isLast:a===t.length-1,onDetailsOpen:n},r.id))});function L8(t){const{theme:e="system"}=Nx.useTheme();return l.jsx(u0.Toaster,{theme:e,className:"toaster group",toastOptions:{unstyled:!0,classNames:{toast:"w-full rounded-lg border px-4 py-3 shadow-lg flex items-start gap-3 bg-card text-card-foreground border-border",title:"font-medium text-sm",description:"text-sm mt-1",actionButton:"inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-8 px-3",cancelButton:"inline-flex items-center justify-center rounded-md text-sm font-medium bg-muted text-muted-foreground hover:bg-muted/90 h-8 px-3",closeButton:"absolute right-2 top-2 rounded-md p-1 text-foreground/50 hover:text-foreground",error:"!bg-red-50 dark:!bg-red-950/30 !text-red-700 dark:!text-red-400 !border-red-200 dark:!border-red-800 [&_[data-title]]:text-red-700 dark:[&_[data-title]]:text-red-400 [&_[data-description]]:text-red-700/90 dark:[&_[data-description]]:text-red-400/90",success:"!bg-green-100 dark:!bg-green-950/30 !text-green-800 dark:!text-green-400 !border-green-300 dark:!border-green-800 [&_[data-title]]:text-green-800 dark:[&_[data-title]]:text-green-400 [&_[data-description]]:text-green-800 dark:[&_[data-description]]:text-green-400",warning:"!bg-yellow-50 dark:!bg-yellow-950/30 !text-yellow-700 dark:!text-yellow-400 !border-yellow-200 dark:!border-yellow-800 [&_[data-title]]:text-yellow-700 dark:[&_[data-title]]:text-yellow-400 [&_[data-description]]:text-yellow-700/90 dark:[&_[data-description]]:text-yellow-400/90",info:"!bg-cyan-50 dark:!bg-cyan-950/30 !text-cyan-700 dark:!text-cyan-400 !border-cyan-200 dark:!border-cyan-800 [&_[data-title]]:text-cyan-700 dark:[&_[data-title]]:text-cyan-400 [&_[data-description]]:text-cyan-700/90 dark:[&_[data-description]]:text-cyan-400/90"}},...t})}const A4=T.createContext({size:"default",variant:"default"});function N8({className:t,variant:e,size:n,children:r,...a}){return l.jsx(h0.Root,{"data-slot":"toggle-group","data-variant":e,"data-size":n,className:v("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",t),...a,children:l.jsx(A4.Provider,{value:{variant:e,size:n},children:r})})}function k8({className:t,children:e,variant:n,size:r,...a}){const i=T.useContext(A4);return l.jsx(h0.Item,{"data-slot":"toggle-group-item","data-variant":i.variant||n,"data-size":i.size||r,className:v(ru({variant:i.variant||n,size:i.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",t),...a,children:e})}const z4=T.createContext(void 0);function O4(){const t=T.useContext(z4);if(!t)throw new Error("UnderlineTabs components must be used within UnderlineTabs");return t}function S8({defaultValue:t,value:e,onValueChange:n,children:r,className:a}){const[i,s]=T.useState(t||""),o=e!==void 0?e:i,f=c=>{e===void 0&&s(c),n==null||n(c)};return l.jsx(z4.Provider,{value:{value:o,onValueChange:f},children:l.jsx("div",{className:v("w-full",a),role:"tablist",children:r})})}function T8({children:t,className:e}){return l.jsx("div",{className:v("border-b border-border bg-background",e),children:l.jsx("div",{className:"flex",children:t})})}function I8({value:t,children:e,className:n,disabled:r=!1}){const{value:a,onValueChange:i}=O4(),s=a===t;return l.jsx("button",{type:"button",role:"tab","aria-selected":s,"aria-disabled":r,disabled:r,onClick:()=>!r&&i(t),className:v("px-4 h-12 text-sm font-medium border-b-2 transition-colors relative","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",s?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-border",n),children:e})}function D8({value:t,children:e,className:n}){const{value:r}=O4();return r!==t?null:l.jsx("div",{role:"tabpanel","aria-labelledby":t,className:v("mt-4",n),children:e})}function E8(t,e){const n=e*1024*1024;return t.size>n?`Arquivo muito grande. Máximo: ${e}MB`:null}function A8(t,e){if(!e)return null;const n=e.split(",").map(s=>s.trim().toLowerCase()),r=t.name.toLowerCase(),a=t.type.toLowerCase();return n.some(s=>{if(s.includes("*")){const[o]=s.split("/");return a.startsWith(o+"/")}return s.startsWith(".")?r.endsWith(s):a===s})?null:"Tipo de arquivo não suportado"}function z8({onFilesSelected:t,accept:e,multiple:n=!0,maxFiles:r=10,maxSizeMB:a=50,disabled:i=!1,isUploading:s=!1,title:o="Clique para fazer upload de arquivos",description:f,icon:c,className:d,onError:u}){const[p,h]=M.useState(!1),m=M.useRef(null),g=M.useCallback(L=>{u==null||u(L)},[u]),b=M.useCallback(L=>{if(!L||L.length===0)return;const S=Array.from(L);if(S.length>r){g(`Máximo de ${r} arquivo(s) permitido(s)`);return}const I=[],z=[];for(const P of S){const _=E8(P,a);if(_){z.push(`${P.name}: ${_}`);continue}const V=A8(P,e);if(V){z.push(`${P.name}: ${V}`);continue}I.push(P)}z.length>0&&g(z.join(`
|
|
223
|
-
`)),I.length>0&&t(I),m.current&&(m.current.value="")},[r,a,e,t,g]),x=M.useCallback(()=>{var L;i||s||(L=m.current)==null||L.click()},[i,s]),w=M.useCallback(L=>{b(L.target.files)},[b]),j=M.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!i&&!s&&h(!0)},[i,s]),y=M.useCallback(L=>{L.preventDefault(),L.stopPropagation(),h(!1)},[]),N=M.useCallback(L=>{L.preventDefault(),L.stopPropagation(),h(!1),!(i||s)&&b(L.dataTransfer.files)},[i,s,b]),C=f||(()=>{const L=[];if(e){const S=e.split(",").map(I=>I.trim().replace(".","").toUpperCase()).join(", ");L.push(S)}return a&&L.push(`máx ${a}MB cada`),L.join(" • ")})();return l.jsxs("div",{className:v("relative border-2 border-dashed rounded-lg p-8 text-center transition-all cursor-pointer","hover:border-primary/50 hover:bg-muted/30",p&&"border-primary bg-primary/5 scale-[1.02]",(i||s)&&"opacity-50 cursor-not-allowed hover:border-dashed hover:bg-transparent",s&&"animate-pulse",d),onClick:x,onDragOver:j,onDragLeave:y,onDrop:N,children:[l.jsx("input",{ref:m,type:"file",multiple:n,accept:e,className:"hidden",onChange:w,disabled:i||s}),l.jsxs("div",{className:"flex flex-col items-center gap-3",children:[c||l.jsx("div",{className:v("transition-transform",p&&"scale-110"),children:s?l.jsx("div",{className:"h-12 w-12 mx-auto",children:l.jsxs("svg",{className:"animate-spin h-12 w-12 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):l.jsx(k.Upload,{className:v("h-12 w-12 mx-auto text-muted-foreground transition-colors",p&&"text-primary")})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:v("font-medium transition-colors",p&&"text-primary",s&&"text-muted-foreground"),children:s?"Enviando arquivos...":p?"Solte os arquivos aqui":o}),C&&l.jsx("p",{className:"text-xs text-muted-foreground",children:C}),!i&&!s&&n&&r>1&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Você pode selecionar até ",r," arquivo(s)"]})]}),i&&l.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(k.AlertCircle,{className:"h-3 w-3"}),l.jsx("span",{children:"Upload desabilitado"})]})]})]})}const Ta={sm:"w-24 h-24",md:"w-32 h-32",lg:"w-48 h-48"};function P4({className:t,size:e="md",primaryColor:n="var(--purple-500)",secondaryColor:r="var(--purple-100)"}){return l.jsxs("svg",{className:v(Ta[e],t),viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("circle",{cx:"60",cy:"60",r:"55",fill:r,opacity:"0.5"}),l.jsx("rect",{x:"30",y:"45",width:"60",height:"40",rx:"4",fill:n,opacity:"0.2"}),l.jsx("rect",{x:"30",y:"45",width:"60",height:"15",rx:"4",fill:n}),l.jsx("path",{d:"M35 60 L60 75 L85 60",stroke:n,strokeWidth:"3",fill:"none"}),l.jsx("circle",{cx:"25",cy:"35",r:"3",fill:n,opacity:"0.6"}),l.jsx("circle",{cx:"95",cy:"40",r:"2",fill:n,opacity:"0.4"}),l.jsx("circle",{cx:"100",cy:"70",r:"2.5",fill:n,opacity:"0.5"})]})}function R4({className:t,size:e="md",primaryColor:n="var(--purple-500)",secondaryColor:r="var(--purple-100)"}){return l.jsxs("svg",{className:v(Ta[e],t),viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("circle",{cx:"60",cy:"60",r:"55",fill:r,opacity:"0.5"}),l.jsx("circle",{cx:"52",cy:"52",r:"22",stroke:n,strokeWidth:"4",fill:"none"}),l.jsx("line",{x1:"68",y1:"68",x2:"88",y2:"88",stroke:n,strokeWidth:"4",strokeLinecap:"round"}),l.jsx("line",{x1:"45",y1:"45",x2:"59",y2:"59",stroke:n,strokeWidth:"3",strokeLinecap:"round",opacity:"0.6"}),l.jsx("line",{x1:"59",y1:"45",x2:"45",y2:"59",stroke:n,strokeWidth:"3",strokeLinecap:"round",opacity:"0.6"})]})}function B4({className:t,size:e="md",primaryColor:n="var(--purple-500)",secondaryColor:r="var(--purple-100)"}){return l.jsxs("svg",{className:v(Ta[e],t),viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("circle",{cx:"60",cy:"60",r:"55",fill:r,opacity:"0.5"}),l.jsx("path",{d:"M25 40 L25 85 L95 85 L95 45 L55 45 L50 40 Z",fill:n,opacity:"0.3"}),l.jsx("path",{d:"M25 50 L25 85 L95 85 L95 50 Z",fill:n,opacity:"0.6"}),l.jsx("line",{x1:"60",y1:"60",x2:"60",y2:"76",stroke:"white",strokeWidth:"3",strokeLinecap:"round"}),l.jsx("line",{x1:"52",y1:"68",x2:"68",y2:"68",stroke:"white",strokeWidth:"3",strokeLinecap:"round"})]})}function H4({className:t,size:e="md",primaryColor:n="var(--purple-500)",secondaryColor:r="var(--purple-100)"}){return l.jsxs("svg",{className:v(Ta[e],t),viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("circle",{cx:"60",cy:"60",r:"55",fill:r,opacity:"0.5"}),l.jsx("rect",{x:"28",y:"35",width:"64",height:"55",rx:"4",fill:n,opacity:"0.2"}),l.jsx("rect",{x:"28",y:"35",width:"64",height:"15",rx:"4",fill:n}),l.jsx("rect",{x:"40",y:"30",width:"4",height:"12",rx:"2",fill:n}),l.jsx("rect",{x:"76",y:"30",width:"4",height:"12",rx:"2",fill:n}),l.jsx("circle",{cx:"45",cy:"62",r:"3",fill:n,opacity:"0.3"}),l.jsx("circle",{cx:"60",cy:"62",r:"3",fill:n,opacity:"0.3"}),l.jsx("circle",{cx:"75",cy:"62",r:"3",fill:n,opacity:"0.3"}),l.jsx("circle",{cx:"45",cy:"77",r:"3",fill:n,opacity:"0.3"}),l.jsx("circle",{cx:"60",cy:"77",r:"3",fill:n,opacity:"0.3"}),l.jsx("circle",{cx:"75",cy:"77",r:"3",fill:n,opacity:"0.3"})]})}function F4({className:t,size:e="md",primaryColor:n="var(--red-500)",secondaryColor:r="var(--red-100)"}){return l.jsxs("svg",{className:v(Ta[e],t),viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("circle",{cx:"60",cy:"60",r:"55",fill:r,opacity:"0.5"}),l.jsx("path",{d:"M60 30 L90 80 L30 80 Z",fill:n,opacity:"0.2",stroke:n,strokeWidth:"3"}),l.jsx("line",{x1:"60",y1:"48",x2:"60",y2:"62",stroke:n,strokeWidth:"4",strokeLinecap:"round"}),l.jsx("circle",{cx:"60",cy:"70",r:"2.5",fill:n})]})}function U4({className:t,size:e="md",primaryColor:n="var(--green-500)",secondaryColor:r="var(--green-100)"}){return l.jsxs("svg",{className:v(Ta[e],t),viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("circle",{cx:"60",cy:"60",r:"55",fill:r,opacity:"0.5"}),l.jsx("circle",{cx:"60",cy:"60",r:"30",fill:n,opacity:"0.2",stroke:n,strokeWidth:"3"}),l.jsx("path",{d:"M45 60 L55 70 L75 50",stroke:n,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}const O8={EmptyInbox:P4,EmptySearch:R4,EmptyProjects:B4,EmptyCalendar:H4,ErrorState:F4,SuccessState:U4};function P8({data:t,showPreview:e=!1,logo:n}){const r=i=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(i),a=i=>new Date(i).toLocaleDateString("pt-BR",{year:"numeric",month:"long",day:"numeric"});return l.jsxs("div",{className:v("proposal-template bg-white text-black",e?"shadow-lg rounded-lg p-8 max-w-5xl mx-auto my-8":"p-0"),style:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12pt",lineHeight:"1.6"},children:[l.jsx(Xd,{logo:n,companyName:t.agency.name,contactInfo:{email:t.agency.email,phone:t.agency.phone},documentType:"Proposta Comercial",documentNumber:t.proposalNumber,issueDate:a(t.issueDate)}),l.jsx(st,{children:l.jsx(pr,{columns:2,items:[{label:"Nº da Proposta",value:t.proposalNumber,highlight:!0},{label:"Validade",value:a(t.validUntil)},{label:"Cliente",value:t.client.name,highlight:!0},...t.client.contact?[{label:"Contato",value:t.client.contact}]:[]]})}),l.jsxs(st,{title:"Projeto",children:[l.jsx("h3",{className:"text-base font-semibold text-primary mb-3",children:t.projectTitle}),t.projectDescription&&l.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:t.projectDescription})]}),t.objectives&&t.objectives.length>0&&l.jsx(st,{title:"Objetivos",children:l.jsx("ul",{className:"list-disc list-inside space-y-2",children:t.objectives.map((i,s)=>l.jsx("li",{className:"text-sm text-gray-700",children:i},s))})}),l.jsxs(st,{title:"Escopo e Investimento",children:[l.jsx(Vo,{columns:[{header:"Item",key:"name",width:"35%"},{header:"Descrição",key:"description",width:"30%"},{header:"Qtd.",key:"quantity",align:"center",width:"10%",render:i=>i||"-"},{header:"Valor Unit.",key:"unitPrice",align:"right",width:"12.5%",render:i=>i?r(i):"-"},{header:"Valor Total",key:"totalPrice",align:"right",width:"12.5%",render:i=>r(i)}],data:t.items,striped:!0,density:"comfortable"}),l.jsx("div",{className:"mt-6 flex justify-end",children:l.jsxs("div",{className:"w-80 space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-gray-600",children:"Subtotal:"}),l.jsx("span",{className:"font-semibold",children:r(t.subtotal)})]}),t.discount&&t.discount>0&&l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-gray-600",children:"Desconto:"}),l.jsxs("span",{className:"font-semibold text-green-600",children:["- ",r(t.discount)]})]}),l.jsxs("div",{className:"border-t-2 border-primary pt-2 flex justify-between",children:[l.jsx("span",{className:"font-semibold text-base",children:"Total:"}),l.jsx("span",{className:"font-semibold text-lg text-primary",children:r(t.total)})]})]})})]}),(t.paymentConditions||t.deliveryTime)&&l.jsx(st,{title:"Condições Comerciais",children:l.jsx(pr,{columns:1,items:[...t.paymentConditions?[{label:"Forma de Pagamento",value:t.paymentConditions}]:[],...t.deliveryTime?[{label:"Prazo de Entrega",value:t.deliveryTime}]:[]]})}),t.notes&&l.jsx(st,{title:"Observações",children:l.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:t.notes})}),l.jsx(eu,{signatures:[{label:"APROVAÇÃO DO CLIENTE",name:t.client.name,role:t.client.contact}],layout:"vertical",instructionText:"Para aprovar esta proposta, assine abaixo e retorne para o e-mail indicado no cabeçalho."}),l.jsx(Kd,{pageNumber:1,totalPages:1,footerText:`Proposta válida até ${a(t.validUntil)}`})]})}Object.defineProperty(exports,"toast",{enumerable:!0,get:()=>u0.toast});exports.Accordion=Ex;exports.AccordionContent=Ox;exports.AccordionItem=Ax;exports.AccordionTrigger=zx;exports.AdvancedDataTable=N0;exports.Alert=Iy;exports.AlertDescription=Ey;exports.AlertDialog=Ay;exports.AlertDialogAction=Uy;exports.AlertDialogCancel=_y;exports.AlertDialogContent=Py;exports.AlertDialogDescription=Fy;exports.AlertDialogFooter=By;exports.AlertDialogHeader=Ry;exports.AlertDialogTitle=Hy;exports.AlertDialogTrigger=zy;exports.AlertTitle=Dy;exports.AppLayoutPrimaryNav=Xy;exports.AppLayoutSecondaryNav=ev;exports.AppLayoutUserMenu=D0;exports.AspectRatio=tv;exports.AuthLayout=E0;exports.Avatar=Ft;exports.AvatarFallback=Ut;exports.AvatarImage=Cn;exports.Badge=he;exports.BrandLogo=Ys;exports.Breadcrumb=A0;exports.BreadcrumbEllipsis=nv;exports.BreadcrumbItem=O0;exports.BreadcrumbLink=P0;exports.BreadcrumbList=z0;exports.BreadcrumbPage=R0;exports.BreadcrumbSeparator=B0;exports.Button=H;exports.Calendar=Qo;exports.Card=Mr;exports.CardAction=Px;exports.CardContent=la;exports.CardDescription=p0;exports.CardFooter=m0;exports.CardHeader=sa;exports.CardTitle=oa;exports.Carousel=rv;exports.CarouselContent=av;exports.CarouselItem=iv;exports.CarouselNext=ov;exports.CarouselPrevious=sv;exports.ChartContainer=fv;exports.ChartLegend=hv;exports.ChartLegendContent=pv;exports.ChartTooltip=dv;exports.ChartTooltipContent=uv;exports.Checkbox=j0;exports.Collapsible=_0;exports.CollapsibleContent=V0;exports.CollapsibleTrigger=J0;exports.ColorPicker=mv;exports.Command=Y0;exports.CommandDialog=yv;exports.CommandEmpty=Mv;exports.CommandGroup=jv;exports.CommandInput=vv;exports.CommandItem=Lv;exports.CommandList=wv;exports.CommandSeparator=Cv;exports.CommandShortcut=Nv;exports.CommentSystem=NI;exports.CompactPageHeader=MA;exports.ContentSectionHeader=jA;exports.ContextMenu=kI;exports.ContextMenuCheckboxItem=RI;exports.ContextMenuContent=OI;exports.ContextMenuGroup=TI;exports.ContextMenuItem=PI;exports.ContextMenuLabel=HI;exports.ContextMenuPortal=II;exports.ContextMenuRadioGroup=EI;exports.ContextMenuRadioItem=BI;exports.ContextMenuSeparator=FI;exports.ContextMenuShortcut=UI;exports.ContextMenuSub=DI;exports.ContextMenuSubContent=zI;exports.ContextMenuSubTrigger=AI;exports.ContextMenuTrigger=SI;exports.ContractPrint=VI;exports.ContractPrintPreview=j2;exports.ContractTemplate=tu;exports.CurrencyInput=L2;exports.DataTable=L0;exports.DatePicker=Dc;exports.DateRangePicker=N2;exports.Dialog=Ui;exports.DialogClose=xv;exports.DialogContent=_i;exports.DialogDescription=Gi;exports.DialogFooter=Zo;exports.DialogHeader=Ji;exports.DialogTitle=Vi;exports.DialogTrigger=gv;exports.DocumentEditor=rD;exports.Drawer=aD;exports.DrawerClose=T2;exports.DrawerContent=D2;exports.DrawerDescription=A2;exports.DrawerFooter=oD;exports.DrawerHeader=sD;exports.DrawerTitle=E2;exports.DrawerTrigger=S2;exports.DropdownMenu=Bi;exports.DropdownMenuCheckboxItem=Vy;exports.DropdownMenuContent=Fi;exports.DropdownMenuGroup=T0;exports.DropdownMenuItem=mr;exports.DropdownMenuLabel=I0;exports.DropdownMenuPortal=Jy;exports.DropdownMenuRadioGroup=Gy;exports.DropdownMenuRadioItem=Yy;exports.DropdownMenuSeparator=Qs;exports.DropdownMenuShortcut=Qy;exports.DropdownMenuSub=Wy;exports.DropdownMenuSubContent=Zy;exports.DropdownMenuSubTrigger=$y;exports.DropdownMenuTrigger=Hi;exports.EditableBadge=z2;exports.EditorialCalendar=T5;exports.EmptyCalendarIllustration=H4;exports.EmptyInboxIllustration=P4;exports.EmptyProjectsIllustration=B4;exports.EmptySearchIllustration=R4;exports.EmptyState=cD;exports.ErrorStateIllustration=F4;exports.FileAttachmentList=K5;exports.FileUploadZone=z8;exports.FilterBar=M0;exports.FilterBuilder=C0;exports.FilterChip=w0;exports.Form=D5;exports.FormControl=O5;exports.FormDescription=P5;exports.FormField=E5;exports.FormItem=A5;exports.FormLabel=z5;exports.FormMessage=R5;exports.GanttChart=p4;exports.GanttLegend=m4;exports.HoverCard=F5;exports.HoverCardContent=_5;exports.HoverCardTrigger=U5;exports.Illustrations=O8;exports.ImageWithFallback=w2;exports.Input=Ht;exports.InputGroup=C2;exports.InputGroupAddon=gc;exports.InputGroupButton=QI;exports.InputGroupInput=$I;exports.InputGroupText=WI;exports.InputGroupTextarea=ZI;exports.InputOTP=V5;exports.InputOTPGroup=G5;exports.InputOTPSeparator=Q5;exports.InputOTPSlot=Y5;exports.InputValidation=J5;exports.KPICard=b4;exports.KanbanCard=g4;exports.Label=Ue;exports.MentionList=kd;exports.Menubar=X5;exports.MenubarCheckboxItem=sA;exports.MenubarContent=aA;exports.MenubarGroup=tA;exports.MenubarItem=iA;exports.MenubarLabel=lA;exports.MenubarMenu=eA;exports.MenubarPortal=x4;exports.MenubarRadioGroup=nA;exports.MenubarRadioItem=oA;exports.MenubarSeparator=fA;exports.MenubarShortcut=cA;exports.MenubarSub=dA;exports.MenubarSubContent=hA;exports.MenubarSubTrigger=uA;exports.MenubarTrigger=rA;exports.NavigationMenu=pA;exports.NavigationMenuContent=xA;exports.NavigationMenuItem=gA;exports.NavigationMenuLink=vA;exports.NavigationMenuList=mA;exports.NavigationMenuTrigger=bA;exports.NumberInput=Go;exports.PageHeader=wA;exports.Pagination=CA;exports.PaginationContent=LA;exports.PaginationEllipsis=TA;exports.PaginationItem=NA;exports.PaginationLink=uu;exports.PaginationNext=SA;exports.PaginationPrevious=kA;exports.PasswordInput=v4;exports.Popover=ot;exports.PopoverContent=qe;exports.PopoverTrigger=Ze;exports.PrintFooter=Kd;exports.PrintHeader=Xd;exports.PrintInfoGrid=pr;exports.PrintSection=st;exports.PrintSignature=eu;exports.PrintTable=Vo;exports.Progress=du;exports.ProposalTemplate=P8;exports.RadioGroup=IA;exports.RadioGroupItem=DA;exports.ResizableHandle=zA;exports.ResizablePanel=AA;exports.ResizablePanelGroup=EA;exports.SavedFilters=OA;exports.ScrollArea=Wo;exports.ScrollBar=S0;exports.Select=Xt;exports.SelectContent=nn;exports.SelectGroup=Rx;exports.SelectItem=Dt;exports.SelectLabel=Bx;exports.SelectSeparator=Hx;exports.SelectTrigger=tn;exports.SelectValue=en;exports.Separator=Hn;exports.Sheet=w4;exports.SheetClose=RA;exports.SheetContent=j4;exports.SheetDescription=N4;exports.SheetFooter=HA;exports.SheetHeader=C4;exports.SheetTitle=L4;exports.SheetTrigger=PA;exports.Sidebar=QA;exports.SidebarContent=e8;exports.SidebarFooter=KA;exports.SidebarGroup=t8;exports.SidebarGroupAction=r8;exports.SidebarGroupContent=a8;exports.SidebarGroupLabel=n8;exports.SidebarHeader=qA;exports.SidebarInset=ZA;exports.SidebarMenu=i8;exports.SidebarMenuAction=f8;exports.SidebarMenuBadge=c8;exports.SidebarMenuButton=l8;exports.SidebarMenuItem=s8;exports.SidebarMenuSkeleton=d8;exports.SidebarMenuSub=u8;exports.SidebarMenuSubButton=p8;exports.SidebarMenuSubItem=h8;exports.SidebarProvider=YA;exports.SidebarRail=$A;exports.SidebarSeparator=XA;exports.SidebarTrigger=WA;exports.Skeleton=Bn;exports.Slider=T4;exports.SocialButton=D4;exports.SuccessStateIllustration=U4;exports.Switch=E4;exports.Table=Nc;exports.TableBody=Sc;exports.TableCaption=b0;exports.TableCell=Za;exports.TableFooter=g0;exports.TableHead=Tc;exports.TableHeader=kc;exports.TablePagination=Ic;exports.TableRow=ea;exports.Tabs=O2;exports.TabsContent=dD;exports.TabsList=P2;exports.TabsTrigger=_s;exports.TaskCalendar=I5;exports.TaskEditDialog=v8;exports.Textarea=nu;exports.TimePicker=pi;exports.Timeline=C8;exports.Toaster=L8;exports.Toggle=k2;exports.ToggleGroup=N8;exports.ToggleGroupItem=k8;exports.Tooltip=rt;exports.TooltipContent=it;exports.TooltipProvider=It;exports.TooltipTrigger=at;exports.UnderlineTabs=S8;exports.UnderlineTabsContent=D8;exports.UnderlineTabsList=T8;exports.UnderlineTabsTrigger=I8;exports.badgeVariants=v0;exports.buttonVariants=Jn;exports.calculatePaginationMetadata=y0;exports.cn=v;exports.dadosContratoExemplo=JI;exports.getPageNumbers=x0;exports.navigationMenuTriggerStyle=y4;exports.socialButtonVariants=I4;exports.toggleVariants=ru;exports.useFormField=ts;exports.useIsMobile=k4;exports.usePrintContract=M2;exports.useSidebar=ns;
|
|
223
|
+
`)),I.length>0&&t(I),m.current&&(m.current.value="")},[r,a,e,t,g]),x=M.useCallback(()=>{var L;i||s||(L=m.current)==null||L.click()},[i,s]),w=M.useCallback(L=>{b(L.target.files)},[b]),j=M.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!i&&!s&&h(!0)},[i,s]),y=M.useCallback(L=>{L.preventDefault(),L.stopPropagation(),h(!1)},[]),N=M.useCallback(L=>{L.preventDefault(),L.stopPropagation(),h(!1),!(i||s)&&b(L.dataTransfer.files)},[i,s,b]),C=f||(()=>{const L=[];if(e){const S=e.split(",").map(I=>I.trim().replace(".","").toUpperCase()).join(", ");L.push(S)}return a&&L.push(`máx ${a}MB cada`),L.join(" • ")})();return l.jsxs("div",{className:v("relative border-2 border-dashed rounded-lg p-8 text-center transition-all cursor-pointer","hover:border-primary/50 hover:bg-muted/30",p&&"border-primary bg-primary/5 scale-[1.02]",(i||s)&&"opacity-50 cursor-not-allowed hover:border-dashed hover:bg-transparent",s&&"animate-pulse",d),onClick:x,onDragOver:j,onDragLeave:y,onDrop:N,children:[l.jsx("input",{ref:m,type:"file",multiple:n,accept:e,className:"hidden",onChange:w,disabled:i||s}),l.jsxs("div",{className:"flex flex-col items-center gap-3",children:[c||l.jsx("div",{className:v("transition-transform",p&&"scale-110"),children:s?l.jsx("div",{className:"h-12 w-12 mx-auto",children:l.jsxs("svg",{className:"animate-spin h-12 w-12 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):l.jsx(k.Upload,{className:v("h-12 w-12 mx-auto text-muted-foreground transition-colors",p&&"text-primary")})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:v("font-medium transition-colors",p&&"text-primary",s&&"text-muted-foreground"),children:s?"Enviando arquivos...":p?"Solte os arquivos aqui":o}),C&&l.jsx("p",{className:"text-xs text-muted-foreground",children:C}),!i&&!s&&n&&r>1&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Você pode selecionar até ",r," arquivo(s)"]})]}),i&&l.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(k.AlertCircle,{className:"h-3 w-3"}),l.jsx("span",{children:"Upload desabilitado"})]})]})]})}const O8={sm:"w-24 h-24",md:"w-32 h-32",lg:"w-48 h-48"};function Ta({src:t,alt:e,size:n="md",className:r}){return l.jsx("img",{src:t,alt:e,className:v(O8[n],"object-contain",r)})}function P4({size:t="md",className:e}){return l.jsx(Ta,{src:"/illustrations/empty-task-approved.png",alt:"Caixa de entrada vazia",size:t,className:e})}function R4({size:t="md",className:e}){return l.jsx(Ta,{src:"/illustrations/empty-no-results.png",alt:"Nenhum resultado encontrado",size:t,className:e})}function B4({size:t="md",className:e}){return l.jsx(Ta,{src:"/illustrations/create-record.png",alt:"Nenhum projeto criado",size:t,className:e})}function H4({size:t="md",className:e}){return l.jsx(Ta,{src:"/illustrations/scheduled-tasks.png",alt:"Calendário sem eventos",size:t,className:e})}function F4({size:t="md",className:e}){return l.jsx(Ta,{src:"/illustrations/empty-not-found.png",alt:"Erro ou item não encontrado",size:t,className:e})}function U4({size:t="md",className:e}){return l.jsx(Ta,{src:"/illustrations/success-checkmark.png",alt:"Ação concluída com sucesso",size:t,className:e})}const P8={EmptyInbox:P4,EmptySearch:R4,EmptyProjects:B4,EmptyCalendar:H4,ErrorState:F4,SuccessState:U4};function R8({data:t,showPreview:e=!1,logo:n}){const r=i=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(i),a=i=>new Date(i).toLocaleDateString("pt-BR",{year:"numeric",month:"long",day:"numeric"});return l.jsxs("div",{className:v("proposal-template bg-white text-black",e?"shadow-lg rounded-lg p-8 max-w-5xl mx-auto my-8":"p-0"),style:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"12pt",lineHeight:"1.6"},children:[l.jsx(Xd,{logo:n,companyName:t.agency.name,contactInfo:{email:t.agency.email,phone:t.agency.phone},documentType:"Proposta Comercial",documentNumber:t.proposalNumber,issueDate:a(t.issueDate)}),l.jsx(st,{children:l.jsx(pr,{columns:2,items:[{label:"Nº da Proposta",value:t.proposalNumber,highlight:!0},{label:"Validade",value:a(t.validUntil)},{label:"Cliente",value:t.client.name,highlight:!0},...t.client.contact?[{label:"Contato",value:t.client.contact}]:[]]})}),l.jsxs(st,{title:"Projeto",children:[l.jsx("h3",{className:"text-base font-semibold text-primary mb-3",children:t.projectTitle}),t.projectDescription&&l.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:t.projectDescription})]}),t.objectives&&t.objectives.length>0&&l.jsx(st,{title:"Objetivos",children:l.jsx("ul",{className:"list-disc list-inside space-y-2",children:t.objectives.map((i,s)=>l.jsx("li",{className:"text-sm text-gray-700",children:i},s))})}),l.jsxs(st,{title:"Escopo e Investimento",children:[l.jsx(Vo,{columns:[{header:"Item",key:"name",width:"35%"},{header:"Descrição",key:"description",width:"30%"},{header:"Qtd.",key:"quantity",align:"center",width:"10%",render:i=>i||"-"},{header:"Valor Unit.",key:"unitPrice",align:"right",width:"12.5%",render:i=>i?r(i):"-"},{header:"Valor Total",key:"totalPrice",align:"right",width:"12.5%",render:i=>r(i)}],data:t.items,striped:!0,density:"comfortable"}),l.jsx("div",{className:"mt-6 flex justify-end",children:l.jsxs("div",{className:"w-80 space-y-2",children:[l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-gray-600",children:"Subtotal:"}),l.jsx("span",{className:"font-semibold",children:r(t.subtotal)})]}),t.discount&&t.discount>0&&l.jsxs("div",{className:"flex justify-between text-sm",children:[l.jsx("span",{className:"text-gray-600",children:"Desconto:"}),l.jsxs("span",{className:"font-semibold text-green-600",children:["- ",r(t.discount)]})]}),l.jsxs("div",{className:"border-t-2 border-primary pt-2 flex justify-between",children:[l.jsx("span",{className:"font-semibold text-base",children:"Total:"}),l.jsx("span",{className:"font-semibold text-lg text-primary",children:r(t.total)})]})]})})]}),(t.paymentConditions||t.deliveryTime)&&l.jsx(st,{title:"Condições Comerciais",children:l.jsx(pr,{columns:1,items:[...t.paymentConditions?[{label:"Forma de Pagamento",value:t.paymentConditions}]:[],...t.deliveryTime?[{label:"Prazo de Entrega",value:t.deliveryTime}]:[]]})}),t.notes&&l.jsx(st,{title:"Observações",children:l.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:t.notes})}),l.jsx(eu,{signatures:[{label:"APROVAÇÃO DO CLIENTE",name:t.client.name,role:t.client.contact}],layout:"vertical",instructionText:"Para aprovar esta proposta, assine abaixo e retorne para o e-mail indicado no cabeçalho."}),l.jsx(Kd,{pageNumber:1,totalPages:1,footerText:`Proposta válida até ${a(t.validUntil)}`})]})}Object.defineProperty(exports,"toast",{enumerable:!0,get:()=>u0.toast});exports.Accordion=Ex;exports.AccordionContent=Ox;exports.AccordionItem=Ax;exports.AccordionTrigger=zx;exports.AdvancedDataTable=N0;exports.Alert=Iy;exports.AlertDescription=Ey;exports.AlertDialog=Ay;exports.AlertDialogAction=Uy;exports.AlertDialogCancel=_y;exports.AlertDialogContent=Py;exports.AlertDialogDescription=Fy;exports.AlertDialogFooter=By;exports.AlertDialogHeader=Ry;exports.AlertDialogTitle=Hy;exports.AlertDialogTrigger=zy;exports.AlertTitle=Dy;exports.AppLayoutPrimaryNav=Xy;exports.AppLayoutSecondaryNav=ev;exports.AppLayoutUserMenu=D0;exports.AspectRatio=tv;exports.AuthLayout=E0;exports.Avatar=Ft;exports.AvatarFallback=Ut;exports.AvatarImage=Cn;exports.Badge=he;exports.BrandLogo=Ys;exports.Breadcrumb=A0;exports.BreadcrumbEllipsis=nv;exports.BreadcrumbItem=O0;exports.BreadcrumbLink=P0;exports.BreadcrumbList=z0;exports.BreadcrumbPage=R0;exports.BreadcrumbSeparator=B0;exports.Button=H;exports.Calendar=Qo;exports.Card=Mr;exports.CardAction=Px;exports.CardContent=la;exports.CardDescription=p0;exports.CardFooter=m0;exports.CardHeader=sa;exports.CardTitle=oa;exports.Carousel=rv;exports.CarouselContent=av;exports.CarouselItem=iv;exports.CarouselNext=ov;exports.CarouselPrevious=sv;exports.ChartContainer=fv;exports.ChartLegend=hv;exports.ChartLegendContent=pv;exports.ChartTooltip=dv;exports.ChartTooltipContent=uv;exports.Checkbox=j0;exports.Collapsible=_0;exports.CollapsibleContent=V0;exports.CollapsibleTrigger=J0;exports.ColorPicker=mv;exports.Command=Y0;exports.CommandDialog=yv;exports.CommandEmpty=Mv;exports.CommandGroup=jv;exports.CommandInput=vv;exports.CommandItem=Lv;exports.CommandList=wv;exports.CommandSeparator=Cv;exports.CommandShortcut=Nv;exports.CommentSystem=NI;exports.CompactPageHeader=MA;exports.ContentSectionHeader=jA;exports.ContextMenu=kI;exports.ContextMenuCheckboxItem=RI;exports.ContextMenuContent=OI;exports.ContextMenuGroup=TI;exports.ContextMenuItem=PI;exports.ContextMenuLabel=HI;exports.ContextMenuPortal=II;exports.ContextMenuRadioGroup=EI;exports.ContextMenuRadioItem=BI;exports.ContextMenuSeparator=FI;exports.ContextMenuShortcut=UI;exports.ContextMenuSub=DI;exports.ContextMenuSubContent=zI;exports.ContextMenuSubTrigger=AI;exports.ContextMenuTrigger=SI;exports.ContractPrint=VI;exports.ContractPrintPreview=j2;exports.ContractTemplate=tu;exports.CurrencyInput=L2;exports.DataTable=L0;exports.DatePicker=Dc;exports.DateRangePicker=N2;exports.Dialog=Ui;exports.DialogClose=xv;exports.DialogContent=_i;exports.DialogDescription=Gi;exports.DialogFooter=Zo;exports.DialogHeader=Ji;exports.DialogTitle=Vi;exports.DialogTrigger=gv;exports.DocumentEditor=rD;exports.Drawer=aD;exports.DrawerClose=T2;exports.DrawerContent=D2;exports.DrawerDescription=A2;exports.DrawerFooter=oD;exports.DrawerHeader=sD;exports.DrawerTitle=E2;exports.DrawerTrigger=S2;exports.DropdownMenu=Bi;exports.DropdownMenuCheckboxItem=Vy;exports.DropdownMenuContent=Fi;exports.DropdownMenuGroup=T0;exports.DropdownMenuItem=mr;exports.DropdownMenuLabel=I0;exports.DropdownMenuPortal=Jy;exports.DropdownMenuRadioGroup=Gy;exports.DropdownMenuRadioItem=Yy;exports.DropdownMenuSeparator=Qs;exports.DropdownMenuShortcut=Qy;exports.DropdownMenuSub=Wy;exports.DropdownMenuSubContent=Zy;exports.DropdownMenuSubTrigger=$y;exports.DropdownMenuTrigger=Hi;exports.EditableBadge=z2;exports.EditorialCalendar=T5;exports.EmptyCalendarIllustration=H4;exports.EmptyInboxIllustration=P4;exports.EmptyProjectsIllustration=B4;exports.EmptySearchIllustration=R4;exports.EmptyState=cD;exports.ErrorStateIllustration=F4;exports.FileAttachmentList=K5;exports.FileUploadZone=z8;exports.FilterBar=M0;exports.FilterBuilder=C0;exports.FilterChip=w0;exports.Form=D5;exports.FormControl=O5;exports.FormDescription=P5;exports.FormField=E5;exports.FormItem=A5;exports.FormLabel=z5;exports.FormMessage=R5;exports.GanttChart=p4;exports.GanttLegend=m4;exports.HoverCard=F5;exports.HoverCardContent=_5;exports.HoverCardTrigger=U5;exports.Illustrations=P8;exports.ImageWithFallback=w2;exports.Input=Ht;exports.InputGroup=C2;exports.InputGroupAddon=gc;exports.InputGroupButton=QI;exports.InputGroupInput=$I;exports.InputGroupText=WI;exports.InputGroupTextarea=ZI;exports.InputOTP=V5;exports.InputOTPGroup=G5;exports.InputOTPSeparator=Q5;exports.InputOTPSlot=Y5;exports.InputValidation=J5;exports.KPICard=b4;exports.KanbanCard=g4;exports.Label=Ue;exports.MentionList=kd;exports.Menubar=X5;exports.MenubarCheckboxItem=sA;exports.MenubarContent=aA;exports.MenubarGroup=tA;exports.MenubarItem=iA;exports.MenubarLabel=lA;exports.MenubarMenu=eA;exports.MenubarPortal=x4;exports.MenubarRadioGroup=nA;exports.MenubarRadioItem=oA;exports.MenubarSeparator=fA;exports.MenubarShortcut=cA;exports.MenubarSub=dA;exports.MenubarSubContent=hA;exports.MenubarSubTrigger=uA;exports.MenubarTrigger=rA;exports.NavigationMenu=pA;exports.NavigationMenuContent=xA;exports.NavigationMenuItem=gA;exports.NavigationMenuLink=vA;exports.NavigationMenuList=mA;exports.NavigationMenuTrigger=bA;exports.NumberInput=Go;exports.PageHeader=wA;exports.Pagination=CA;exports.PaginationContent=LA;exports.PaginationEllipsis=TA;exports.PaginationItem=NA;exports.PaginationLink=uu;exports.PaginationNext=SA;exports.PaginationPrevious=kA;exports.PasswordInput=v4;exports.Popover=ot;exports.PopoverContent=qe;exports.PopoverTrigger=Ze;exports.PrintFooter=Kd;exports.PrintHeader=Xd;exports.PrintInfoGrid=pr;exports.PrintSection=st;exports.PrintSignature=eu;exports.PrintTable=Vo;exports.Progress=du;exports.ProposalTemplate=R8;exports.RadioGroup=IA;exports.RadioGroupItem=DA;exports.ResizableHandle=zA;exports.ResizablePanel=AA;exports.ResizablePanelGroup=EA;exports.SavedFilters=OA;exports.ScrollArea=Wo;exports.ScrollBar=S0;exports.Select=Xt;exports.SelectContent=nn;exports.SelectGroup=Rx;exports.SelectItem=Dt;exports.SelectLabel=Bx;exports.SelectSeparator=Hx;exports.SelectTrigger=tn;exports.SelectValue=en;exports.Separator=Hn;exports.Sheet=w4;exports.SheetClose=RA;exports.SheetContent=j4;exports.SheetDescription=N4;exports.SheetFooter=HA;exports.SheetHeader=C4;exports.SheetTitle=L4;exports.SheetTrigger=PA;exports.Sidebar=QA;exports.SidebarContent=e8;exports.SidebarFooter=KA;exports.SidebarGroup=t8;exports.SidebarGroupAction=r8;exports.SidebarGroupContent=a8;exports.SidebarGroupLabel=n8;exports.SidebarHeader=qA;exports.SidebarInset=ZA;exports.SidebarMenu=i8;exports.SidebarMenuAction=f8;exports.SidebarMenuBadge=c8;exports.SidebarMenuButton=l8;exports.SidebarMenuItem=s8;exports.SidebarMenuSkeleton=d8;exports.SidebarMenuSub=u8;exports.SidebarMenuSubButton=p8;exports.SidebarMenuSubItem=h8;exports.SidebarProvider=YA;exports.SidebarRail=$A;exports.SidebarSeparator=XA;exports.SidebarTrigger=WA;exports.Skeleton=Bn;exports.Slider=T4;exports.SocialButton=D4;exports.SuccessStateIllustration=U4;exports.Switch=E4;exports.Table=Nc;exports.TableBody=Sc;exports.TableCaption=b0;exports.TableCell=Za;exports.TableFooter=g0;exports.TableHead=Tc;exports.TableHeader=kc;exports.TablePagination=Ic;exports.TableRow=ea;exports.Tabs=O2;exports.TabsContent=dD;exports.TabsList=P2;exports.TabsTrigger=_s;exports.TaskCalendar=I5;exports.TaskEditDialog=v8;exports.Textarea=nu;exports.TimePicker=pi;exports.Timeline=C8;exports.Toaster=L8;exports.Toggle=k2;exports.ToggleGroup=N8;exports.ToggleGroupItem=k8;exports.Tooltip=rt;exports.TooltipContent=it;exports.TooltipProvider=It;exports.TooltipTrigger=at;exports.UnderlineTabs=S8;exports.UnderlineTabsContent=D8;exports.UnderlineTabsList=T8;exports.UnderlineTabsTrigger=I8;exports.badgeVariants=v0;exports.buttonVariants=Jn;exports.calculatePaginationMetadata=y0;exports.cn=v;exports.dadosContratoExemplo=JI;exports.getPageNumbers=x0;exports.navigationMenuTriggerStyle=y4;exports.socialButtonVariants=I4;exports.toggleVariants=ru;exports.useFormField=ts;exports.useIsMobile=k4;exports.usePrintContract=M2;exports.useSidebar=ns;
|
|
224
224
|
//# sourceMappingURL=index.cjs.map
|