@zydon/common 2.4.17 → 2.4.18

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.
@@ -0,0 +1,14 @@
1
+ import { a } from './chunk-OR6QR7N2.js';
2
+ import { a as a$1 } from './chunk-MEQXPK2E.js';
3
+ import w from '@mui/lab/LoadingButton';
4
+ import k from '@mui/material/Button';
5
+ import { useState } from 'react';
6
+ import v from '@mui/material/Slider';
7
+ import r from '@mui/material/Stack';
8
+ import S from '@mui/material/TextField';
9
+ import p from '@mui/material/Typography';
10
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
+
12
+ var I=({imageSrc:s,aspectRatio:l,cropShape:c,cropSize:g,onInitialized:h})=>{let[i,n]=useState(1),[t,m]=useState({x:0,y:0}),[u,z]=useState(0);return jsxs(r,{gap:2,children:[jsx(a$1,{imageSrc:s,aspectRatio:l,cropShape:c,zoom:i,crop:t,onZoomChange:n,onCropChange:m,onInitialized:h,rotation:u,onRotationChange:z,cropSize:g}),jsxs(r,{gap:1.5,children:[jsxs(r,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[jsx(p,{component:"label",htmlFor:"zoom-slider",width:85,color:"textSecondary",variant:"body2",children:"Zoom"}),jsx(v,{id:"zoom-slider",value:i,onChange:(e,y)=>n(Array.isArray(y)?y[0]:y),min:.1,max:4,size:"medium",step:.0125}),jsx(S,{size:"small",id:"zoom-slider",type:"number",value:i,onChange:e=>n(Number(e.target.value)),inputProps:{step:.0125},sx:{width:130}})]}),jsxs(r,{direction:"row",gap:4,justifyContent:"flex-start",children:[jsx(p,{component:"label",htmlFor:"rotation-slider",width:"45px",color:"textSecondary",variant:"body2",lineHeight:"39px",children:"Position"}),jsxs(r,{direction:"row",alignItems:"center",gap:3,children:[jsx(p,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"Y"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.y,onChange:e=>m({...t,y:Number(e.target.value)}),sx:{width:90}})]}),jsxs(r,{gap:3,direction:"row",alignItems:"center",children:[jsx(p,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"X"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.x,onChange:e=>m({...t,x:Number(e.target.value)}),sx:{width:90}})]})]})]})]})},b=I;var M=({open:s,onClose:l,label:c,onSave:g,imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m,loading:u})=>jsx(a,{open:s,onClose:l,dialogTitle:c,actions:jsxs(Fragment,{children:[jsx(k,{variant:"outlined",size:"medium",onClick:l,color:"inherit",children:"Cancelar"}),jsx(w,{variant:"contained",size:"medium",onClick:g,loading:u,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",children:jsx(b,{imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m})}),_=M;
13
+
14
+ export { _ as a };
@@ -0,0 +1,8 @@
1
+ import { memo, useId } from 'react';
2
+ import M from '@mui/material/Box';
3
+ import { useTheme } from '@mui/material/styles';
4
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
+
6
+ function c(){let i=useTheme(),a=useId(),r=i.vars.palette.primary.main;return jsxs(Fragment,{children:[jsx("defs",{children:jsxs("linearGradient",{id:a,x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[jsx("stop",{offset:"0%",stopColor:r}),jsx("stop",{offset:"100%",stopColor:r,stopOpacity:"0"})]})}),jsx("path",{fill:`url(#${a})`,fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}function y({hideBackground:i,sx:a,...r}){let n=useTheme(),o=n.vars.palette.primary.main,f=n.vars.palette.primary.dark,t=n.vars.palette.primary.darker;return jsxs(M,{component:"svg",width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",sx:{width:320,maxWidth:1,flexShrink:0,height:"auto",...a},...r,children:[!i&&jsx(c,{}),jsx("defs",{children:jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopOpacity:"0"}),jsx("stop",{offset:"100%"})]})}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),jsx("path",{fill:t,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),jsx("ellipse",{cx:"380.363",cy:"298.487",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),jsx("ellipse",{cx:"390.052",cy:"264.383",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),jsx("ellipse",{cx:"346.97",cy:"270.022",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:o,fillRule:"nonzero",opacity:"0.2"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),jsx("path",{fill:f,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),jsx("ellipse",{cx:"119.593",cy:"258.664",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"101.03",cy:"260.545",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"108.459",cy:"265.905",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("ellipse",{cx:"89.193",cy:"265.433",fill:o,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),jsx("path",{stroke:t,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:o,fillRule:"nonzero",opacity:"0.1"}),jsx("path",{fill:f,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),jsx("path",{fill:o,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),jsx("path",{fill:f,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}var g=memo(y);
7
+
8
+ export { g as a };
@@ -0,0 +1,6 @@
1
+ import p from '@mui/material/Tooltip';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ var t=o=>jsx(p,{...o}),r=t;
5
+
6
+ export { r as a };
@@ -0,0 +1,5 @@
1
+ import { toast } from 'sonner';
2
+
3
+ var c=()=>({showSuccessMessage:a=>{toast.success(a);},showErrorMessage:(a,n)=>{toast.error(i(a,n));}}),o=c,i=(s,t)=>{try{return "message"in s?s.message||t:"data"in s&&s.data&&typeof s.data=="object"&&"message"in s.data&&typeof s.data.message=="string"?s.data.message:t}catch{return t}};
4
+
5
+ export { o as a };
@@ -0,0 +1,11 @@
1
+ import { a as a$1 } from './chunk-RGXSHDAI.js';
2
+ import D from '@mui/material/Box';
3
+ import P from '@mui/material/ButtonBase';
4
+ import L from '@mui/material/IconButton';
5
+ import N from '@mui/material/Stack';
6
+ import S from '@mui/material/Tooltip';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+
9
+ var O=["pdf"],F=["txt"],y=["psd"],R=["doc","docx"],C=["xls","xlsx"],k=["zip","rar","iso"],w=["ai","eps"],M=["ppt","pptx"],E=["wav","aif","mp3","aac"],A=["jpg","jpeg","gif","bmp","png","svg","webp"],B=["m4v","avi","mpg","mp4","webm"];function p(t){let e,o=a(t);return F.includes(o)?e="txt":k.includes(o)?e="zip":E.includes(o)?e="audio":A.includes(o)?e="image":B.includes(o)?e="video":R.includes(o)?e="word":C.includes(o)?e="excel":M.includes(o)?e="powerpoint":O.includes(o)?e="pdf":y.includes(o)?e="photoshop":w.includes(o)?e="illustrator":t?.startsWith("http")?e="image":e=a(t),e}function f(t){let e;switch(p(t)){case"folder":e="IC_FOLDER";break;case"txt":e="IC_TXT";break;case"zip":e="IC_ZIP";break;case"audio":e="IC_AUDIO";break;case"video":e="IC_VIDEO";break;case"word":e="IC_WORD";break;case"excel":e="IC_EXCEL";break;case"powerpoint":e="IC_POWER_POINT";break;case"pdf":e="IC_PDF";break;case"photoshop":e="IC_PTS";break;case"illustrator":e="IC_AI";break;case"image":e="IC_IMG";break;default:e="IC_FILE";}return e}function a(t){return t&&t.split(".").pop()||""}function v(t){return t.split("/").pop()}function u(t){return typeof t=="string"?{key:t,preview:t,name:v(t),type:a(t),size:void 0,path:t,lastModified:void 0,lastModifiedDate:void 0}:{key:`key:${t.name}${t.lastModified||Date.now()}`,name:t.name,size:t.size,path:t.path,type:t.type,preview:t.preview,lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate}}var s={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},K=({sx:t,file:e,tooltip:o,onRemove:m,imageView:h,slotProps:r,onDownload:c,...I})=>{let l=typeof e=="string"?e:URL.createObjectURL(e),{name:b,path:g}=u(e),d=typeof e!="string"&&e.type.startsWith("image/")?"image":p(g||l),T=jsx(D,{component:"img",src:l,className:s.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...r?.img}}),x=jsx(a$1,{icon:f(d),sx:{width:32,height:32,flexShrink:0,...t}}),_=jsxs(N,{component:"span",className:s.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...t},...I,children:[d==="image"&&h?T:x,m&&jsx(P,{onClick:m,className:s.removeBtn,sx:r?.removeBtn,children:jsx(a$1,{icon:"CLOSE_MARK_BUTTON",width:24})}),c&&jsx(L,{onClick:c,className:s.downloadBtn,sx:r?.downloadBtn,size:"small",children:jsx(a$1,{icon:"ARROW_DOWN_CICLE",width:12})})]});return o?jsx(S,{arrow:!0,title:b,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:_}):_};
10
+
11
+ export { p as a, f as b, a as c, v as d, u as e, s as f, K as g };
@@ -0,0 +1,34 @@
1
+ import { c, g, p, n, d, e as e$1, a as a$6, b, h, i as i$1, l, m as m$1, j as j$1, k } from './chunk-4VAXJ4XM.js';
2
+ import { a as a$5 } from './chunk-F5XDRB7N.js';
3
+ import { a as a$1 } from './chunk-H5L4ARDB.js';
4
+ import { e } from './chunk-ANAHA3L6.js';
5
+ import { a as a$7 } from './chunk-NB6L2JSG.js';
6
+ import { x } from './chunk-2P4CXK3O.js';
7
+ import { a as a$4 } from './chunk-FK7DDO5L.js';
8
+ import { i, o } from './chunk-D27ND54J.js';
9
+ import { j } from './chunk-DMQW3LDF.js';
10
+ import { a } from './chunk-RGXSHDAI.js';
11
+ import { a as a$3 } from './chunk-KFZEM7KS.js';
12
+ import { a as a$2 } from './chunk-X24QANPC.js';
13
+ import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
14
+ import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
15
+ import { sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
16
+ import { AnimatePresence, m } from 'framer-motion';
17
+ import Ho from '@mui/material/ButtonBase';
18
+ import Go from '@mui/material/IconButton';
19
+ import { styled, alpha, useTheme } from '@mui/material/styles';
20
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
+ import No from '@mui/material/Box';
22
+ import G from '@mui/material/Stack';
23
+ import Qo from '@mui/material/Tooltip';
24
+ import ro from '@mui/material/Typography';
25
+ import Yo from '@mui/material/Badge';
26
+ import { useDropzone } from 'react-dropzone';
27
+ import Wo from '@mui/material/Button';
28
+ import _t from '@mui/material/FormHelperText';
29
+ import { memo } from 'react';
30
+ import Et from '@mui/material/Dialog';
31
+
32
+ function To({sx:o$1,...t}){let r=useTheme();return jsx(Ho,{sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",color:"common.white",borderRadius:"inherit",transition:r.transitions.create(["opacity"]),"&:hover":{...o({color:i(r.vars.palette.grey["900Channel"],.64)}),opacity:1},...o$1},...t,children:jsx(a,{icon:"ARROW_DOWN_CICLE",width:24})})}function Eo({sx:o,...t}){return jsx(Go,{size:"small",sx:{p:.35,top:4,right:4,position:"absolute",color:"common.white",bgcolor:r=>i(r.vars.palette.grey["900Channel"],.48),"&:hover":{bgcolor:r=>i(r.vars.palette.grey["900Channel"],.72)},...o},...t,children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:12})})}var A={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"};function F({sx:o,file:t,tooltip:r,onRemove:i,imageView:m,slotProps:e,onDownload:p,...l}){let u=typeof t=="string"?t:URL.createObjectURL(t),{name:d,path:a$1}=c(t),n=a$6(a$1||u),g=jsx(No,{component:"img",src:u,className:A.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...e?.img}}),h=jsx(a,{icon:b(n),sx:{width:32,height:32,flexShrink:0,...o}}),f=jsxs(G,{component:"span",className:A.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...o},...l,children:[n==="image"&&m?g:h,i&&jsx(Eo,{onClick:i,className:A.removeBtn,sx:e?.removeBtn}),p&&jsx(To,{onClick:p,className:A.downloadBtn,sx:e?.downloadBtn})]});return r?jsx(Qo,{arrow:!0,title:d,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:f}):f}var ot=({onRemove:o,onHandleMainImage:t,key:r,sx:i,file:m,disableDrag:e,attributes:p,listeners:l,mainUrl:u,innerWidth:d,isDragging:a$1})=>{let n=m===u;return jsx(Yo,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:t&&jsx(m$1,{isMainImage:n,size:"small",onClick:()=>t(m),"aria-label":n?"Remover imagem principal":"Definir como imagem principal",children:jsx(a,{icon:n?"STAR_02":"STAR",width:12})}),children:jsxs(j$1,{width:d,isDragging:a$1,"data-testid":`preview-multi-img-${r}`,...j().inUp,sx:i,children:[jsx(a$7,{disableDrag:e,...p,...l}),jsx(F,{tooltip:!0,imageView:!0,file:m,sx:{position:"absolute",right:10,top:10}}),o&&jsx(k,{size:"small","aria-label":"Remover imagem",onClick:()=>o(m),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})},`badge-${r}`)},Fo=ot;var it=({file:o,thumbnail:t,onRemove:r,onHandleMainImage:i,mainUrl:m,sx:e$1,disableDrag:p=!1})=>{let{key:l$1,name:u="",size:d=0}=c(o),a$1=typeof o=="string",n=p?60:80,{attributes:g,listeners:h$1,setNodeRef:f,transform:b,transition:v,isDragging:R}=useSortable({id:l$1,disabled:p}),S={transform:x.Transform.toString(b),transition:v,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${n+8}px`,height:"68px"};return t?jsx(h,{ref:f,style:S,children:jsx(Fo,{innerWidth:n,isDragging:R,sx:e$1,file:o,disableDrag:p,attributes:g,listeners:h$1,mainUrl:m,onRemove:r,onHandleMainImage:i},l$1)}):jsx(h,{ref:f,style:{...S,height:"80px",width:`${n+38}px`},children:jsxs(i$1,{width:n+30,isDragging:R,"data-testid":`preview-multi-img-${l$1}`,...j().inUp,sx:e$1,children:[jsx(a$7,{disableDrag:p,...g,...h$1}),jsx(F,{file:o}),jsxs(G,{flexGrow:1,sx:{minWidth:0,width:"100%"},children:[jsx(ro,{variant:"subtitle2",noWrap:!0,children:a$1?o:u}),jsx(ro,{variant:"caption",sx:{color:"text.secondary"},children:a$1?"":e(d)})]}),r&&jsx(l,{size:"small","aria-label":"Remover arquivo",onClick:()=>r(o),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})})},Ao=it;var to=({thumbnail:o,files:t,onRemove:r,onReorder:i,onHandleMainImage:m,mainUrl:e,sx:p})=>{let l=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!t?.length)return null;let u=a=>{let{active:n,over:g}=a;if(!(!n||!g||n.id===g.id)&&i){let h=t.findIndex(b=>{let{key:v}=c(b);return v===n.id}),f=t.findIndex(b=>{let{key:v}=c(b);return v===g.id});h!==-1&&f!==-1&&i(h,f);}},d=jsx(AnimatePresence,{initial:!1,children:t.map(a=>jsx(Ao,{file:a,thumbnail:o,onRemove:r,onHandleMainImage:m,mainUrl:e,sx:p,disableDrag:!i},c(a).key))});return i?jsx(DndContext,{sensors:l,collisionDetection:closestCenter,onDragEnd:u,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:t.map(a=>c(a).key),strategy:horizontalListSortingStrategy,children:d})}):d};function Lo({file:o}){let t=typeof o=="string"?o:o.name,r=typeof o=="string"?o:URL.createObjectURL(o);return jsx(No,{sx:{p:1,top:0,left:0,width:1,height:1,position:"absolute"},children:jsx(No,{component:"img",alt:t,src:r,sx:{width:1,height:1,borderRadius:1,objectFit:"cover"}})})}function Er({sx:o,...t}){return jsx(Go,{size:"small",sx:{top:16,right:16,zIndex:9,position:"absolute",color:r=>i(r.vars.palette.common.whiteChannel,.8),bgcolor:r=>i(r.vars.palette.grey["900Channel"],.72),"&:hover":{bgcolor:r=>i(r.vars.palette.grey["900Channel"],.48)},...o},...t,"aria-label":"Remover arquivo",children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:18})})}var xt=({header:o,description:t,sx:r,...i})=>jsxs(G,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...i,children:[jsx(a$1,{sx:{width:220}}),jsxs("div",{children:[jsx(ro,{gutterBottom:!0,variant:"h5",children:o||"Soltar ou selecionar arquivos"}),jsx(ro,{variant:"body2",sx:{color:"text.secondary"},children:t||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(ro,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),io=memo(xt);var Mo=styled(No,{shouldForwardProp:o=>!["isDragActive","isError","disabled"].includes(o)})(({theme:o,isDragActive:t,isError:r,disabled:i})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:o.spacing(5),borderRadius:o.shape.borderRadius,transition:o.transitions.create("padding"),backgroundColor:o.palette.background.neutral,border:`1px dashed ${alpha(o.palette.grey[500],.32)}`,...t&&{opacity:.72},...r&&{color:o.palette.error.main,backgroundColor:o.palette.error.lighter,borderColor:o.palette.error.light},...i&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));var Rt=({sx:o,id:t,tabIndex:r,uploading:i,getRootProps:m,getInputProps:e,isDragActive:p,isError:l,disabled:u,dropZoneSxProps:d$1,dropZoneContent:a,children:n,...g})=>jsxs(d,{children:[i&&jsx(a$4,{"data-testid":"uploading-progress-bar"}),jsxs(No,{sx:{width:1,position:"relative",...o},children:[jsxs(Mo,{...m(),"data-testid":"drop-zone-styled-area",isError:l,isDragActive:p,disabled:!!u,sx:d$1,...g,children:[jsx("input",{...e(),id:t,tabIndex:r}),a]}),n]})]}),ao=Rt;var Tt=({id:o,disabled:t,multiple:r=!1,error:i,helperText:m$1,file:e$1,onDelete:p$1,files:l,thumbnail:u,onRemove:d,onHandleMainImage:a$1,mainUrl:n$1,sx:g$1,dropZoneProps:h,placeholderProps:f,placeholderAlt:b,uploading:v,image:R,tabIndex:S,preview:V="image",onRemoveAll:N,onUpload:w,onReorder:L,...J})=>{let{getRootProps:M,getInputProps:B,isDragActive:P,isDragReject:k,fileRejections:po}=useDropzone({multiple:r,disabled:t,...J}),Q=!!e$1&&!r,X=Q||R,mo=l&&r&&l.length>0,lo=typeof e$1=="string",co=k||!!i;if(V==="file")return jsxs(ao,{id:o,uploading:v,disabled:t,dropZoneSxProps:h,tabIndex:S,getRootProps:M,getInputProps:B,isDragActive:P,isError:co,dropZoneContent:jsxs(Fragment,{children:[!Q&&jsx(io,{}),Q&&jsxs(G,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:U=>`solid 1px ${U.palette.divider}`,...g$1},children:[jsx(F,{file:e$1}),jsxs(G,{flexGrow:1,sx:{minWidth:0},children:[jsx(ro,{variant:"subtitle2",noWrap:!0,children:lo?e$1:e$1.name}),jsx(ro,{variant:"caption",sx:{color:"text.secondary"},children:lo?"":e(e$1.size)})]}),p$1&&jsx(g,{edge:"end",size:"small",disabled:t,"aria-label":"Remover arquivo",onClick:U=>{U.stopPropagation(),p$1();},children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})]}),children:[m$1&&m$1,jsx(p,{files:po}),mo&&jsxs(Fragment,{children:[jsx(No,{sx:{my:3},children:jsx(to,{files:l,thumbnail:u,onRemove:d,onHandleMainImage:a$1,mainUrl:n$1,onReorder:L})}),jsxs(G,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[N&&jsx(Wo,{color:"inherit",variant:"outlined",size:"small",onClick:N,children:"Remover todos"}),w&&jsx(Wo,{size:"small",variant:"contained",onClick:w,children:"Enviar arquivos"})]})]})]});let go=X?{opacity:0}:void 0;return jsxs(ao,{id:o,uploading:v,disabled:t,dropZoneSxProps:h,tabIndex:S,getRootProps:M,getInputProps:B,isDragActive:P,isError:co,dropZoneContent:jsxs(Fragment,{children:[b?jsx(G,{sx:go,children:b}):jsx(io,{sx:go,header:f?.title,description:f?.description}),X&&jsx(Lo,{file:e$1||R||""})]}),children:[m$1&&jsx(_t,{error:!!i,sx:U=>({mx:"14px",color:t?U.palette.grey[500]:void 0}),children:m$1}),jsx(p,{files:po}),X&&p$1&&jsx(n,{size:"small",onClick:p$1,disabled:t,"aria-label":"Remover arquivo",children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})}),mo&&jsx(Fragment,{children:jsx(No,{sx:{my:3,ml:.5},children:jsx(to,{files:l,thumbnail:u,onRemove:d,onHandleMainImage:a$1,mainUrl:n$1,onReorder:L})})})]})},Ko=Tt;var Ft=({onFileCropped:o,onImageUploaded:t,onCancel:r,aspect:i,label:m,image:e$2="",uploading:p,file:l,tabIndex:u,maxSize:d$1,onDropRejected:a$1,...n})=>{let{id:g,setCropModalOpen:h,handleRemove:f,toggleCropModalOpen:b,cropModalOpen:v,cancelChanges:R,saveChanges:S,previewImage:V,setCropper:N,preview:w,closePreviewImage:L,saving:J}=a$2({onFileCropped:o,onImageUploaded:t,onCancel:r}),{error:M}=a$3();return jsxs(Fragment,{children:[jsxs(d,{children:[p&&jsx(a$4,{}),jsx(Ko,{...n,maxSize:d$1,id:g,file:l,onDrop:B=>{if(B.length>0){h(!0);let P=new FileReader;P.addEventListener("load",()=>{let k=P.result?.toString()||"";t(k),o(void 0);}),P.readAsDataURL(B[0]);}},image:e$2,tabIndex:u,onDropRejected:(B,P)=>{let k=B[0]?.errors[0]?.code;t(void 0),o(void 0),M(k==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(d$1)}`:"Erro ao enviar imagem"),a$1&&a$1(B,P);}}),(l||e$2)&&jsxs(e$1,{className:"actions",children:[jsx(Wo,{color:"inherit",startIcon:jsx(a,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:f,children:"Remover"}),jsx(Wo,{color:"inherit",startIcon:jsx(a,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:b,children:"Editar"})]})]}),jsx(a$5,{id:g,open:v,onClose:R,label:m,aspectRatio:i,imageSrc:e$2,onRemove:f,onSave:S,onPreview:V,onInitialized:N,loading:J}),jsx(Et,{open:!!w,onClose:L,scroll:"body",PaperProps:{sx:{p:2}},children:w&&jsx("img",{src:w,alt:"Preview"})})]})},Se=Ft;
33
+
34
+ export { to as a, Lo as b, Er as c, Ko as d, Se as e };
@@ -0,0 +1,11 @@
1
+ import { a } from './chunk-RGXSHDAI.js';
2
+ import { forwardRef, useMemo } from 'react';
3
+ import c from '@mui/material/Box';
4
+ import x from '@mui/material/CircularProgress';
5
+ import y from '@mui/material/IconButton';
6
+ import C from '@mui/material/Tooltip';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ var l=forwardRef(({icon:t,label:i,color:e="primary",loading:r=!1,disabled:B=!1,boxProps:m={},tooltipProps:I={},iconProps:u={},disableTooltip:d=!1,children:n,...M},w)=>{if(!t&&!n)throw new Error("IconButton: icon or children is required");let f=useMemo(()=>t?jsx(a,{icon:t,...u}):n,[t,n,u]),T=useMemo(()=>r?jsx(x,{size:20,color:"inherit"}):f,[r,f]),s=jsx(y,{ref:w,"aria-label":i,color:"inherit",disabled:r||B,...M,children:T});return d?jsx(c,{...m,color:e,children:s}):jsx(c,{...m,color:e,children:jsx(C,{"data-testid":"button-tooltip",...I,title:i,children:jsx("span",{children:s})})})});l.displayName="IconButton";var N=l;
10
+
11
+ export { N as a };
@@ -1,16 +1,5 @@
1
- import { a } from '../../chunk-OR6QR7N2.js';
2
- import { a as a$1 } from '../../chunk-MEQXPK2E.js';
1
+ export { a as default } from '../../chunk-CVUXRFLE.js';
2
+ import '../../chunk-OR6QR7N2.js';
3
+ import '../../chunk-MEQXPK2E.js';
3
4
  import '../../chunk-RGXSHDAI.js';
4
5
  import '../../chunk-CHLVIVDD.js';
5
- import w from '@mui/lab/LoadingButton';
6
- import k from '@mui/material/Button';
7
- import { useState } from 'react';
8
- import v from '@mui/material/Slider';
9
- import r from '@mui/material/Stack';
10
- import S from '@mui/material/TextField';
11
- import p from '@mui/material/Typography';
12
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
-
14
- var I=({imageSrc:s,aspectRatio:l,cropShape:c,cropSize:g,onInitialized:h})=>{let[i,n]=useState(1),[t,m]=useState({x:0,y:0}),[u,z]=useState(0);return jsxs(r,{gap:2,children:[jsx(a$1,{imageSrc:s,aspectRatio:l,cropShape:c,zoom:i,crop:t,onZoomChange:n,onCropChange:m,onInitialized:h,rotation:u,onRotationChange:z,cropSize:g}),jsxs(r,{gap:1.5,children:[jsxs(r,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[jsx(p,{component:"label",htmlFor:"zoom-slider",width:85,color:"textSecondary",variant:"body2",children:"Zoom"}),jsx(v,{id:"zoom-slider",value:i,onChange:(e,y)=>n(Array.isArray(y)?y[0]:y),min:.1,max:4,size:"medium",step:.0125}),jsx(S,{size:"small",id:"zoom-slider",type:"number",value:i,onChange:e=>n(Number(e.target.value)),inputProps:{step:.0125},sx:{width:130}})]}),jsxs(r,{direction:"row",gap:4,justifyContent:"flex-start",children:[jsx(p,{component:"label",htmlFor:"rotation-slider",width:"45px",color:"textSecondary",variant:"body2",lineHeight:"39px",children:"Position"}),jsxs(r,{direction:"row",alignItems:"center",gap:3,children:[jsx(p,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"Y"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.y,onChange:e=>m({...t,y:Number(e.target.value)}),sx:{width:90}})]}),jsxs(r,{gap:3,direction:"row",alignItems:"center",children:[jsx(p,{component:"label",htmlFor:"rotation-slider",color:"textSecondary",variant:"body2",children:"X"}),jsx(S,{size:"small",id:"rotation-slider",type:"number",value:t.x,onChange:e=>m({...t,x:Number(e.target.value)}),sx:{width:90}})]})]})]})]})},b=I;var M=({open:s,onClose:l,label:c,onSave:g,imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m,loading:u})=>jsx(a,{open:s,onClose:l,dialogTitle:c,actions:jsxs(Fragment,{children:[jsx(k,{variant:"outlined",size:"medium",onClick:l,color:"inherit",children:"Cancelar"}),jsx(w,{variant:"contained",size:"medium",onClick:g,loading:u,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",children:jsx(b,{imageSrc:h,aspectRatio:i,cropShape:n,cropSize:t,onInitialized:m})}),_=M;
15
-
16
- export { _ as default };
@@ -0,0 +1,40 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { F as FileThumbnailProps } from '../../types-fc6b8325.js';
3
+ export { E as ExtendFile } from '../../types-fc6b8325.js';
4
+ import '@mui/material/Stack';
5
+ import '@mui/material/styles';
6
+
7
+ declare const fileThumbnailClasses: {
8
+ root: string;
9
+ img: string;
10
+ icon: string;
11
+ removeBtn: string;
12
+ downloadBtn: string;
13
+ };
14
+ declare const FileThumbnail: ({ sx, file, tooltip, onRemove, imageView, slotProps, onDownload, ...other }: FileThumbnailProps) => react_jsx_runtime.JSX.Element;
15
+
16
+ declare function fileFormat(fileUrl: string): string;
17
+ declare function fileThumb(fileUrl: string): string;
18
+ declare function fileTypeByUrl(fileUrl: string): string;
19
+ declare function fileNameByUrl(fileUrl: string): string | undefined;
20
+ declare function fileData(file: File | string): {
21
+ key: string;
22
+ preview: string;
23
+ name: string | undefined;
24
+ type: string;
25
+ size: undefined;
26
+ path: string;
27
+ lastModified: undefined;
28
+ lastModifiedDate: undefined;
29
+ } | {
30
+ key: string;
31
+ name: string;
32
+ size: number;
33
+ path: string | undefined;
34
+ type: string;
35
+ preview: string | undefined;
36
+ lastModified: number;
37
+ lastModifiedDate: Date | undefined;
38
+ };
39
+
40
+ export { FileThumbnail, FileThumbnailProps, fileData, fileFormat, fileNameByUrl, fileThumb, fileThumbnailClasses, fileTypeByUrl };
@@ -0,0 +1,3 @@
1
+ export { g as FileThumbnail, e as fileData, a as fileFormat, d as fileNameByUrl, b as fileThumb, f as fileThumbnailClasses, c as fileTypeByUrl } from '../../chunk-QTPDCBMF.js';
2
+ import '../../chunk-RGXSHDAI.js';
3
+ import '../../chunk-CHLVIVDD.js';
@@ -0,0 +1,353 @@
1
+ import * as react from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { DropzoneOptions, DropzoneRootProps, FileRejection, DropzoneInputProps, useDropzone } from 'react-dropzone';
4
+ import { DraggableAttributes, DraggableSyntheticListeners } from '@dnd-kit/core';
5
+ import { StackProps } from '@mui/material/Stack';
6
+ import { SxProps, Theme } from '@mui/material/styles';
7
+ import { F as FileThumbnailProps } from '../../types-fc6b8325.js';
8
+ import { Area } from 'react-easy-crop';
9
+
10
+ interface FileUpload {
11
+ url: string;
12
+ file: File;
13
+ contentType: string;
14
+ resourceIds: string[];
15
+ }
16
+ type CropSize = {
17
+ width: number;
18
+ height: number;
19
+ } | number;
20
+ type CreateFilesMutation = (files: File[]) => Promise<string[] | undefined>;
21
+ interface FileCreateRequest {
22
+ files: Array<{
23
+ content_type: keyof typeof ContentType;
24
+ name: string;
25
+ }>;
26
+ }
27
+ interface FileCreateResponse {
28
+ files: Array<{
29
+ id: string;
30
+ name: string;
31
+ organization_id: string;
32
+ url: string;
33
+ status: 'PENDING' | 'COMPLETED' | 'FAILED';
34
+ content_type: string;
35
+ content_length: number;
36
+ created_by: string;
37
+ created_at: string;
38
+ updated_by: string;
39
+ updated_at: string;
40
+ }>;
41
+ }
42
+ interface FileQueryRequest {
43
+ ids: string[];
44
+ }
45
+ interface FileQueryResponse {
46
+ files: Array<{
47
+ id: string;
48
+ name: string;
49
+ organization_id: string;
50
+ url: string;
51
+ status: 'PENDING' | 'COMPLETED' | 'FAILED';
52
+ content_type: string;
53
+ content_length: number;
54
+ created_by: string;
55
+ created_at: string;
56
+ updated_by: string;
57
+ updated_at: string;
58
+ }>;
59
+ }
60
+ interface FileGetResponse {
61
+ id: string;
62
+ name: string;
63
+ organization_id: string;
64
+ url: string;
65
+ status: 'PENDING' | 'COMPLETED' | 'FAILED';
66
+ content_type: string;
67
+ content_length: number;
68
+ created_by: string;
69
+ created_at: string;
70
+ updated_by: string;
71
+ updated_at: string;
72
+ }
73
+ interface SingleFilePreviewProps extends StackProps {
74
+ file: File | string;
75
+ aspectRatio?: number;
76
+ isLoading?: boolean;
77
+ cropSize?: CropSize;
78
+ onLoading?: (isLoading: boolean) => void;
79
+ isUploading?: boolean;
80
+ }
81
+ interface PlaceholderProps extends StackProps {
82
+ header?: React.ReactNode;
83
+ description?: React.ReactNode;
84
+ }
85
+ interface SingleFileUploadProps extends DropzoneOptions {
86
+ onFileSelect: (file?: File) => void;
87
+ onRemove?: (file?: File) => void;
88
+ placeholderProps?: PlaceholderProps;
89
+ placeholderAlt?: React.ReactNode;
90
+ file?: File;
91
+ name?: string;
92
+ label?: string;
93
+ id?: string;
94
+ disabled?: boolean;
95
+ error?: string;
96
+ helperText?: string | React.ReactNode;
97
+ sx?: SxProps<Theme>;
98
+ dropZoneSxProps?: SxProps;
99
+ uploading?: boolean;
100
+ tabIndex?: number;
101
+ maxSize?: number;
102
+ }
103
+ interface SingleImageUploadProps extends SingleFileUploadProps {
104
+ aspectRatio?: number;
105
+ enableCrop?: boolean;
106
+ convertToWebp?: boolean;
107
+ cropSize?: CropSize;
108
+ }
109
+ interface MultiFileUploadProps extends Omit<SingleFileUploadProps, 'file' | 'onFileSelect'> {
110
+ onFilesSelect: (files?: File[]) => void;
111
+ onRemoveAll?: (files?: File[]) => void;
112
+ onReorder?: (oldIndex: number, newIndex: number) => void;
113
+ files?: File[];
114
+ maxFiles?: number;
115
+ thumbnail?: boolean;
116
+ }
117
+ interface MultiImageUploadProps extends MultiFileUploadProps {
118
+ aspectRatio?: number;
119
+ enableCrop?: boolean;
120
+ convertToWebp?: boolean;
121
+ cropSize?: CropSize;
122
+ }
123
+ interface SortableItemProps extends StackProps {
124
+ onRemove?: (file?: File) => void;
125
+ file?: File;
126
+ thumbnail?: boolean;
127
+ disableDrag?: boolean;
128
+ }
129
+ interface MultiFilePreviewProps extends StackProps {
130
+ onReorder?: (oldIndex: number, newIndex: number) => void;
131
+ onRemove?: (file?: File) => void;
132
+ files: File[];
133
+ lastNode?: React.ReactNode;
134
+ firstNode?: React.ReactNode;
135
+ thumbnail: boolean;
136
+ slotProps?: {
137
+ thumbnail?: Omit<FileThumbnailProps, 'file'>;
138
+ };
139
+ }
140
+ interface StyledDropZoneProps extends StackProps {
141
+ isDragActive: boolean;
142
+ isError: boolean;
143
+ disabled: boolean;
144
+ }
145
+ type StyledDropZonePropsType = Omit<DropzoneRootProps, 'children' | 'onDrop' | 'onError'> & StyledDropZoneProps;
146
+ interface RejectionFilesProps extends StackProps {
147
+ files: FileRejection[];
148
+ }
149
+ interface ThumbnailBadgeProps {
150
+ onRemove?: (file?: File) => void;
151
+ file: File;
152
+ attributes: DraggableAttributes;
153
+ listeners: DraggableSyntheticListeners;
154
+ innerWidth: number;
155
+ isDragging: boolean;
156
+ disableDrag?: boolean;
157
+ sx?: SxProps<Theme>;
158
+ }
159
+ interface DropZoneProps {
160
+ sx?: SxProps;
161
+ uploading?: boolean;
162
+ id?: string;
163
+ tabIndex?: number;
164
+ getRootProps: () => DropzoneRootProps;
165
+ getInputProps: () => DropzoneInputProps;
166
+ isDragActive: boolean;
167
+ isError: boolean;
168
+ disabled?: boolean;
169
+ dropZoneSxProps?: SxProps;
170
+ dropZoneContent?: React.ReactNode;
171
+ children?: React.ReactNode;
172
+ name?: string;
173
+ }
174
+ interface FileUploadProps {
175
+ createFilesMutation: (params: FileCreateRequest) => {
176
+ unwrap: () => Promise<FileCreateResponse>;
177
+ };
178
+ files?: FileGetResponse[];
179
+ file?: FileGetResponse;
180
+ }
181
+ interface HelperTextProps {
182
+ helperText?: string | React.ReactNode;
183
+ disabled?: boolean;
184
+ isError?: boolean;
185
+ }
186
+ declare enum ContentType {
187
+ APPLICATION_OCTET_STREAM = "application/octet-stream",
188
+ IMAGE_JPEG = "image/jpeg",
189
+ IMAGE_JPG = "image/jpg",
190
+ IMAGE_PNG = "image/png",
191
+ IMAGE_GIF = "image/gif",
192
+ IMAGE_WEBP = "image/webp",
193
+ IMAGE_SVG = "image/svg+xml",
194
+ IMAGE_BMP = "image/bmp",
195
+ IMAGE_TIFF = "image/tiff",
196
+ IMAGE_ICO = "image/x-icon",
197
+ IMAGE_AVIF = "image/avif",
198
+ APPLICATION_PDF = "application/pdf",
199
+ TEXT_PLAIN = "text/plain",
200
+ TEXT_CSV = "text/csv",
201
+ APPLICATION_RTF = "application/rtf",
202
+ APPLICATION_MSWORD = "application/msword",
203
+ APPLICATION_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
204
+ APPLICATION_MSEXCEL = "application/vnd.ms-excel",
205
+ APPLICATION_XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
206
+ APPLICATION_MSPOWERPOINT = "application/vnd.ms-powerpoint",
207
+ APPLICATION_PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
208
+ APPLICATION_ODT = "application/vnd.oasis.opendocument.text",
209
+ APPLICATION_ODS = "application/vnd.oasis.opendocument.spreadsheet",
210
+ APPLICATION_ODP = "application/vnd.oasis.opendocument.presentation",
211
+ APPLICATION_XML = "application/xml",
212
+ TEXT_XML = "text/xml",
213
+ TEXT_HTML = "text/html",
214
+ TEXT_CSS = "text/css",
215
+ APPLICATION_JSON = "application/json",
216
+ TEXT_JAVASCRIPT = "text/javascript",
217
+ APPLICATION_ZIP = "application/zip",
218
+ APPLICATION_GZIP = "application/gzip",
219
+ APPLICATION_RAR = "application/vnd.rar",
220
+ APPLICATION_7Z = "application/x-7z-compressed",
221
+ AUDIO_MPEG = "audio/mpeg",
222
+ AUDIO_WAV = "audio/wav",
223
+ AUDIO_OGG = "audio/ogg",
224
+ AUDIO_WEBM = "audio/webm",
225
+ AUDIO_AAC = "audio/aac",
226
+ VIDEO_MP4 = "video/mp4",
227
+ VIDEO_MPEG = "video/mpeg",
228
+ VIDEO_OGG = "video/ogg",
229
+ VIDEO_WEBM = "video/webm",
230
+ VIDEO_QUICKTIME = "video/quicktime"
231
+ }
232
+ declare enum FileContentType {
233
+ 'application/octet-stream' = "APPLICATION_OCTET_STREAM",
234
+ 'image/jpeg' = "IMAGE_JPEG",
235
+ 'image/jpg' = "IMAGE_JPG",
236
+ 'image/png' = "IMAGE_PNG",
237
+ 'image/gif' = "IMAGE_GIF",
238
+ 'image/webp' = "IMAGE_WEBP",
239
+ 'image/svg+xml' = "IMAGE_SVG",
240
+ 'image/bmp' = "IMAGE_BMP",
241
+ 'image/tiff' = "IMAGE_TIFF",
242
+ 'image/x-icon' = "IMAGE_ICO",
243
+ 'image/avif' = "IMAGE_AVIF",
244
+ 'application/pdf' = "APPLICATION_PDF",
245
+ 'text/plain' = "TEXT_PLAIN",
246
+ 'text/csv' = "TEXT_CSV",
247
+ 'application/rtf' = "APPLICATION_RTF",
248
+ 'application/msword' = "APPLICATION_MSWORD",
249
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' = "APPLICATION_DOCX",
250
+ 'application/vnd.ms-excel' = "APPLICATION_MSEXCEL",
251
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' = "APPLICATION_XLSX",
252
+ 'application/vnd.ms-powerpoint' = "APPLICATION_MSPOWERPOINT",
253
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation' = "APPLICATION_PPTX",
254
+ 'application/vnd.oasis.opendocument.text' = "APPLICATION_ODT",
255
+ 'application/vnd.oasis.opendocument.spreadsheet' = "APPLICATION_ODS",
256
+ 'application/vnd.oasis.opendocument.presentation' = "APPLICATION_ODP",
257
+ 'application/xml' = "APPLICATION_XML",
258
+ 'text/xml' = "TEXT_XML",
259
+ 'text/html' = "TEXT_HTML",
260
+ 'text/css' = "TEXT_CSS",
261
+ 'application/json' = "APPLICATION_JSON",
262
+ 'text/javascript' = "TEXT_JAVASCRIPT",
263
+ 'application/zip' = "APPLICATION_ZIP",
264
+ 'application/gzip' = "APPLICATION_GZIP",
265
+ 'application/vnd.rar' = "APPLICATION_RAR",
266
+ 'application/x-7z-compressed' = "APPLICATION_7Z",
267
+ 'audio/mpeg' = "AUDIO_MPEG",
268
+ 'audio/wav' = "AUDIO_WAV",
269
+ 'audio/ogg' = "AUDIO_OGG",
270
+ 'audio/webm' = "AUDIO_WEBM",
271
+ 'audio/aac' = "AUDIO_AAC",
272
+ 'video/mp4' = "VIDEO_MP4",
273
+ 'video/mpeg' = "VIDEO_MPEG",
274
+ 'video/ogg' = "VIDEO_OGG",
275
+ 'video/webm' = "VIDEO_WEBM",
276
+ 'video/quicktime' = "VIDEO_QUICKTIME"
277
+ }
278
+
279
+ declare const _default$8: react.MemoExoticComponent<({ helperText, disabled, isError }: HelperTextProps) => react_jsx_runtime.JSX.Element | null>;
280
+
281
+ declare const _default$7: react.MemoExoticComponent<({ thumbnail, files, onRemove, onReorder, sx, }: MultiFilePreviewProps) => react_jsx_runtime.JSX.Element | null>;
282
+
283
+ declare const _default$6: react.MemoExoticComponent<({ file, aspectRatio, isUploading, isLoading, onLoading, cropSize, }: SingleFilePreviewProps) => react_jsx_runtime.JSX.Element>;
284
+
285
+ interface UseDropzoneUploaderProps {
286
+ onFileSelect?: (file: File) => void;
287
+ onFilesSelect?: (files: File[]) => void;
288
+ onRemove?: (file?: File) => void;
289
+ filesToUpload?: File | File[] | null;
290
+ dropzoneOptions?: Omit<DropzoneOptions, 'onDrop' | 'onDropRejected'>;
291
+ enableCrop?: boolean;
292
+ customAspectRatio?: number;
293
+ convertToWebp?: boolean;
294
+ maxFiles?: number;
295
+ cropSize?: {
296
+ width: number;
297
+ height: number;
298
+ } | number;
299
+ }
300
+ interface UseDropzoneUploaderReturn {
301
+ file: File | null;
302
+ files: File[];
303
+ aspectRatio: number;
304
+ dropzoneProps: {
305
+ getRootProps: ReturnType<typeof useDropzone>['getRootProps'];
306
+ getInputProps: ReturnType<typeof useDropzone>['getInputProps'];
307
+ isDragActive: boolean;
308
+ isDragReject: boolean;
309
+ fileRejections: readonly FileRejection[];
310
+ };
311
+ cropState: {
312
+ cropModalOpen: boolean;
313
+ imagePreview: string;
314
+ cropLoading: boolean;
315
+ setCropModalOpen: React.Dispatch<React.SetStateAction<boolean>>;
316
+ onCropInitialized: (croppedArea: Area, croppedAreaPixels: Area) => void;
317
+ handleCropSave: () => Promise<void>;
318
+ handleCropCancel: () => void;
319
+ currentImageIndex: number;
320
+ totalPendingImages: number;
321
+ };
322
+ handleRemove: (fileToRemove?: File) => void;
323
+ clearFiles: () => void;
324
+ setFiles: React.Dispatch<React.SetStateAction<File[]>>;
325
+ }
326
+ declare const useDropzoneUploader: ({ filesToUpload, onFileSelect, onFilesSelect, onRemove, dropzoneOptions, enableCrop, customAspectRatio, convertToWebp, maxFiles, cropSize, }: UseDropzoneUploaderProps) => UseDropzoneUploaderReturn;
327
+
328
+ declare const useFileUploadService: ({ createFilesMutation, files, file, }: FileUploadProps) => {
329
+ filesPreview: File[] | undefined;
330
+ filePreview: File | undefined;
331
+ uploadFiles: (files: File[]) => Promise<string[] | undefined>;
332
+ isUploadingFiles: boolean;
333
+ isLoadingPreview: boolean;
334
+ isUploadOrLoadingFiles: boolean;
335
+ uploadFilesError: unknown;
336
+ };
337
+
338
+ declare const _default$5: react.MemoExoticComponent<({ onRemove, onReorder, onFilesSelect, id, disabled, error, helperText, files: filesToUpload, thumbnail, dropZoneSxProps, uploading, tabIndex, maxFiles, ...other }: MultiFileUploadProps) => react_jsx_runtime.JSX.Element>;
339
+
340
+ declare const _default$4: react.MemoExoticComponent<({ onFilesSelect, onRemove, onReorder, id, disabled, error, helperText, files: filesToUpload, dropZoneSxProps, placeholderProps, placeholderAlt, uploading, tabIndex, maxFiles, aspectRatio: customAspectRatio, enableCrop, convertToWebp, cropSize, name, label: customLabel, ...other }: MultiImageUploadProps) => react_jsx_runtime.JSX.Element>;
341
+
342
+ declare const _default$3: react.MemoExoticComponent<({ onFileSelect, onRemove, file: filesToUpload, id, disabled, error, helperText, sx, dropZoneSxProps, uploading, tabIndex, ...other }: SingleFileUploadProps) => react_jsx_runtime.JSX.Element>;
343
+
344
+ declare const _default$2: react.MemoExoticComponent<({ onRemove, onFileSelect, file: filesToUpload, id, disabled, error, helperText, dropZoneSxProps, placeholderProps, placeholderAlt, uploading, tabIndex, aspectRatio: customAspectRatio, enableCrop, convertToWebp, name, label, cropSize, ...other }: SingleImageUploadProps) => react_jsx_runtime.JSX.Element>;
345
+
346
+ declare const _default$1: react.MemoExoticComponent<({ onFileSelect, onRemove, file: filesToUpload, disabled, label, id, tabIndex, error, helperText, sx, name, maxSize, uploading, aspectRatio, enableCrop, convertToWebp, cropSize, ...other }: SingleImageUploadProps) => react_jsx_runtime.JSX.Element>;
347
+
348
+ declare const _default: react.MemoExoticComponent<({ error, name, disabled, sx, ...other }: SingleFileUploadProps) => react_jsx_runtime.JSX.Element>;
349
+
350
+ declare const isImageFile: (mimeType: string) => boolean;
351
+ declare const convertToWebP: (file: File, quality?: number) => Promise<File>;
352
+
353
+ export { ContentType, CreateFilesMutation, CropSize, DropZoneProps, FileContentType, FileCreateRequest, FileCreateResponse, FileGetResponse, FileQueryRequest, FileQueryResponse, FileUpload, FileUploadProps, _default$8 as HelperText, HelperTextProps, _default$7 as MultiFilePreview, MultiFilePreviewProps, MultiFileUploadProps, MultiImageUploadProps, _default$5 as MultipleFileUpload, _default$4 as MultipleImageUpload, PlaceholderProps, RejectionFilesProps, _default$6 as SingleFilePreview, SingleFilePreviewProps, _default$3 as SingleFileUpload, SingleFileUploadProps, _default$2 as SingleImageUpload, SingleImageUploadProps, SortableItemProps, StyledDropZoneProps, StyledDropZonePropsType, ThumbnailBadgeProps, _default$1 as UploadAvatar, _default as UploadSimpleBox, convertToWebP, isImageFile, useDropzoneUploader, useFileUploadService };
@@ -0,0 +1,36 @@
1
+ import { a as a$2 } from '../../chunk-IPOTBSM7.js';
2
+ import { a as a$3 } from '../../chunk-H5L4ARDB.js';
3
+ import { a } from '../../chunk-UUTAIXBZ.js';
4
+ import { e as e$1 } from '../../chunk-ANAHA3L6.js';
5
+ import { e, g } from '../../chunk-QTPDCBMF.js';
6
+ import { a as a$4 } from '../../chunk-CVUXRFLE.js';
7
+ import '../../chunk-OR6QR7N2.js';
8
+ import '../../chunk-MEQXPK2E.js';
9
+ import { a as a$1 } from '../../chunk-NB6L2JSG.js';
10
+ import { x } from '../../chunk-2P4CXK3O.js';
11
+ import { a as a$6 } from '../../chunk-FK7DDO5L.js';
12
+ import { j } from '../../chunk-DMQW3LDF.js';
13
+ import { a as a$5 } from '../../chunk-RGXSHDAI.js';
14
+ import '../../chunk-CHLVIVDD.js';
15
+ import '../../chunk-ILHUUK4X.js';
16
+ import { a as a$7 } from '../../chunk-ONZBWH3C.js';
17
+ import { memo, useRef, useEffect, useMemo, useCallback, useState } from 'react';
18
+ import So from '@mui/material/FormHelperText';
19
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
+ import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
21
+ import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
22
+ import { useSortable, sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy } from '@dnd-kit/sortable';
23
+ import { m, AnimatePresence } from 'framer-motion';
24
+ import ae from '@mui/material/Stack';
25
+ import Be from '@mui/material/Typography';
26
+ import ge from '@mui/material/Box';
27
+ import Oo from '@mui/material/IconButton';
28
+ import Mo from '@mui/material/Paper';
29
+ import { styled, alpha } from '@mui/material/styles';
30
+ import ko from '@mui/material/Badge';
31
+ import { useDropzone } from 'react-dropzone';
32
+ import qr from '@mui/material/CircularProgress';
33
+
34
+ var yo=({helperText:e,disabled:t,isError:r})=>e?jsx(So,{error:r,sx:a=>({mx:"14px",color:t?a.palette.grey[500]:void 0}),children:e}):null,k=memo(yo);var De=styled(ae)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),we=styled(ae)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),Ve=styled(ge,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:t,isError:r,disabled:a})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${alpha(e.palette.grey[500],.32)}`,...t&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...a&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));styled(ae)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}}));var He=styled(Oo)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),Ce=styled("div")({position:"relative",zIndex:1,"&:hover":{zIndex:2}}),Ke=styled(ae,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:t,isDragging:r})=>({width:t,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),Je=styled(m.div)(({theme:e,width:t,isDragging:r})=>({width:t,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),Qe=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),Ye=styled(ge,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:t,disabled:r,hasError:a})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...t&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...a&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),eo=styled(ge)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover":{filter:"blur(3px)"}})),oo=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"})(({theme:e,aspectRatio:t,height:r,width:a,isLoading:i,isUploading:n})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,aspectRatio:t,maxWidth:`calc(${t} * 160px - 16px)`,maxHeight:"calc(160px - 16px)",backgroundColor:e.palette.background.paper,height:r,width:a,transition:"all 0.5s ease-in-out",...i||n?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{},"&:hover":{transition:"all 0.2s ease-in-out"}})),ro=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:t})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...t&&{opacity:.7,filter:"blur(2rem)"}})),to=styled(ae)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(Mo)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var ke=styled(ge,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:t,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...t&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),io=styled(ae)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center"});styled(ae)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.grey[200],color:e.palette.text.disabled,height:160}));var ao=styled(ge,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:t,disabled:r,isError:a,hasFile:i})=>({padding:1,margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${alpha(e.palette.grey[500],.2)}`,...t&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...a&&{borderColor:"error.main"},...i&&{...a&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),no=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),so=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var zo=({onRemove:e$1,sx:t,file:r,disableDrag:a,attributes:i,listeners:n,innerWidth:l,isDragging:g$1})=>{let{key:p}=e(r);return jsx(ko,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(Je,{width:l,isDragging:g$1,"data-testid":`preview-multi-img-${p}`,...j().inUp,sx:t,children:[jsx(a$1,{disableDrag:a,...i,...n}),jsx(g,{tooltip:!0,imageView:!0,file:r}),jsx(we,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e$1&&jsx(so,{size:"small",label:"Remover arquivo",onClick:()=>e$1(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${p}`)},lo=memo(zo);var Go=({file:e$2,thumbnail:t,onRemove:r,sx:a$3,disableDrag:i=!1})=>{let{key:n,name:l="",size:g$1=0}=e(e$2||""),p=typeof e$2=="string",s=i?70:80,{attributes:d,listeners:P,setNodeRef:m,transform:c,transition:I,isDragging:D}=useSortable({id:n,disabled:i}),R={transform:x.Transform.toString(c),transition:I,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${s+8}px`,height:"68px"};return t&&e$2?jsx(Ce,{ref:m,style:R,children:jsx(lo,{innerWidth:s,isDragging:D,sx:a$3,file:e$2,disableDrag:i,attributes:d,listeners:P,onRemove:r})}):jsx(Ce,{ref:m,style:{...R,height:"80px",width:`${s+38}px`},children:jsxs(Ke,{width:s+30,isDragging:D,"data-testid":`preview-multi-img-${n}`,...j().inUp,sx:a$3,children:[jsx(a$1,{disableDrag:i,...d,...P}),e$2&&jsx(g,{file:e$2}),jsxs(ae,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$2,{title:l,children:jsx(Be,{variant:"subtitle2",noWrap:!0,children:l})}),jsx(Be,{variant:"caption",sx:{color:"text.secondary"},children:p?"":e$1(g$1)})]}),jsx(we,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$2),icon:"DELETE_MARK_BUTTON_02"})})]})})},mo=memo(Go);var or=({thumbnail:e$1,files:t,onRemove:r,onReorder:a,sx:i})=>{let n=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!t?.length)return null;let l=p=>{let{active:s,over:d}=p;if(!(!s||!d||s.id===d.id)&&a){let P=t.findIndex(c=>{let{key:I}=e(c);return I===s.id}),m=t.findIndex(c=>{let{key:I}=e(c);return I===d.id});P!==-1&&m!==-1&&a(P,m);}},g=jsx(AnimatePresence,{initial:!1,children:t.map(p=>jsx(mo,{sx:i,file:p,onRemove:r,thumbnail:e$1,disableDrag:!a},e(p).key))});return a?jsx(DndContext,{sensors:n,collisionDetection:closestCenter,onDragEnd:l,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:t.map(p=>e(p).key),strategy:horizontalListSortingStrategy,children:g})}):g},fe=memo(or);var ar=({file:e,aspectRatio:t=1,isUploading:r,isLoading:a,onLoading:i,cropSize:n})=>{let l=useRef(null),g=typeof e=="string"?e:e.name,p=typeof e=="string"?e:URL.createObjectURL(e);useEffect(()=>{l.current&&!l.current.complete?i?.(!0):i?.(!1);},[l,i]);let s=typeof n=="number"?n*t:n?.width,d=typeof n=="number"?n:n?.height;return jsxs(eo,{children:[jsx(oo,{aspectRatio:t,isLoading:a,isUploading:r,width:s,height:d,alt:g,src:p,ref:l,onLoad:()=>i?.(!1),onError:()=>i?.(!1)}),jsx(ro,{alt:g,src:p,isLoading:a,isUploading:r})]})},ze=memo(ar);var ri=e=>e.startsWith("image/"),fo=(e,t=.8)=>new Promise((r,a)=>{let i=document.createElement("canvas"),n=i.getContext("2d"),l=new Image;l.onload=()=>{i.width=l.width,i.height=l.height,n?(n.drawImage(l,0,0),i.toBlob(g=>{if(g){let p=new File([g],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(p);}else a(new Error("Falha ao converter para WebP"));},"image/webp",t)):a(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},l.onerror=()=>a(new Error("Falha ao carregar imagem")),l.src=URL.createObjectURL(e);});var lr=({filesToUpload:e,onFileSelect:t,onFilesSelect:r,onRemove:a,dropzoneOptions:i,enableCrop:n=!1,customAspectRatio:l,convertToWebp:g=!0,maxFiles:p,cropSize:s})=>{let{showErrorMessage:d}=a$7(),P=useMemo(()=>l||(s&&typeof s!="number"?s.width/s.height:1),[l,s]),[m,c]=useState([]),[I,D]=useState(!1),[R,f]=useState(null),[x,w]=useState(null),[u,h]=useState(""),[F,v]=useState(!1),[_,U]=useState([]),[ee,B]=useState(0),y=useMemo(()=>e&&Array.isArray(e)?e.filter(o=>o instanceof File):e&&e instanceof File?[e]:m,[e,m]),$=useMemo(()=>e&&Array.isArray(e)?null:e&&e instanceof File?e:m[0]||null,[e,m]);useEffect(()=>{e&&(Array.isArray(e)?c(e.filter(o=>o instanceof File)):e instanceof File?c([e]):e===null&&c([]));},[e]);let G=useCallback(()=>{if(_.length>0&&n){let o=_[0];f(o),B(b=>b+1);let E=new FileReader;E.onload=()=>{h(E.result),D(!0);},E.readAsDataURL(o);}},[_,n]);useEffect(()=>{G();},[G]);let oe=useCallback((o,E)=>{w(E);},[]),re=async()=>!R||!x?null:new Promise(o=>{let E=document.createElement("canvas"),b=E.getContext("2d"),j=new Image;j.onload=async()=>{let{width:ce,height:V,x:wo,y:Eo}=x,xe=ce,be=V;s&&(typeof s=="number"?(xe=s,be=s/P):(xe=s.width,be=s.height)),E.width=xe,E.height=be,b?(b.drawImage(j,wo,Eo,ce,V,0,0,xe,be),E.toBlob(async Xe=>{if(Xe){let Le=new File([Xe],R.name,{type:R.type,lastModified:Date.now()});if(g)try{Le=await fo(Le);}catch(Ro){d(Ro,"Erro ao converter para WebP");}o(Le);}else o(null);},"image/png")):o(null);},j.src=u;}),te=async()=>{if(!(!R||!x)){v(!0);try{let o=await re();if(o)if(Array.isArray(e)||e===void 0&&r){let b=p?[...y,o].slice(0,p):[...y,o];c(b),r?.(b);}else c([o]),t?.(o);let E=_.slice(1);U(E),D(!1),h(""),f(null),E.length>0&&setTimeout(()=>G(),100);}catch(o){d(o,"Erro ao processar imagem");}finally{v(!1);}}},M=()=>{D(!1),h(""),f(null),U([]),B(0);},L=useCallback(o=>{if(o.length===0)return;if(i?.accept&&Object.keys(i.accept).some(b=>b.includes("image/"))&&n)if(Array.isArray(e)||e===void 0&&r){let b=o.filter(V=>V.type.startsWith("image/")),j=y.map(V=>V.name),ce=b.filter(V=>!j.includes(V.name));if(ce.length===0){d("Todos os arquivos selecionados j\xE1 foram adicionados","Arquivos duplicados");return}U(ce),B(0);}else {let b=o[0];f(b);let j=new FileReader;j.onload=()=>{h(j.result),D(!0);},j.readAsDataURL(b);}else if(Array.isArray(e)||e===void 0&&r){let b=p?[...y,...o].slice(0,p):[...y,...o];c(b),r?.(b);}else {let b=o[0];c([b]),t?.(b);}},[e,y,t,r,n,p,i,d]),N=useCallback(o=>{if(!o.length)return;let E=o[0]?.errors[0]?.code,b=i?.maxSize||3145728;d(E==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e$1(b)}`):E==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):o[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},[i?.maxSize,d]),{getRootProps:C,getInputProps:q,isDragActive:Z,isDragReject:_e,fileRejections:Oe}=useDropzone({onDrop:L,onDropRejected:N,...i}),Me=useCallback(o=>{if(!o){c([]),a?.(void 0);return}if(Array.isArray(e)||e===void 0&&r){let E=m.filter(b=>b.name!==o.name);c(E),a?.(o),r&&r(E);}else c([]),a?.(o);},[e,m,r,a]),Do=useCallback(()=>{c([]),Array.isArray(e)&&r?r([]):!Array.isArray(e)&&t&&t?.(null);},[e,r,t]);return {file:$,files:y,aspectRatio:P,dropzoneProps:{getRootProps:C,getInputProps:q,isDragActive:Z,isDragReject:_e,fileRejections:Oe},cropState:{cropModalOpen:I,imagePreview:u,cropLoading:F,setCropModalOpen:D,onCropInitialized:oe,handleCropSave:te,handleCropCancel:M,currentImageIndex:ee,totalPendingImages:_.length},handleRemove:Me,clearFiles:Do,setFiles:c}},z=lr;var Ne=(o=>(o.APPLICATION_OCTET_STREAM="application/octet-stream",o.IMAGE_JPEG="image/jpeg",o.IMAGE_JPG="image/jpg",o.IMAGE_PNG="image/png",o.IMAGE_GIF="image/gif",o.IMAGE_WEBP="image/webp",o.IMAGE_SVG="image/svg+xml",o.IMAGE_BMP="image/bmp",o.IMAGE_TIFF="image/tiff",o.IMAGE_ICO="image/x-icon",o.IMAGE_AVIF="image/avif",o.APPLICATION_PDF="application/pdf",o.TEXT_PLAIN="text/plain",o.TEXT_CSV="text/csv",o.APPLICATION_RTF="application/rtf",o.APPLICATION_MSWORD="application/msword",o.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",o.APPLICATION_MSEXCEL="application/vnd.ms-excel",o.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",o.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",o.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",o.APPLICATION_ODT="application/vnd.oasis.opendocument.text",o.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",o.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",o.APPLICATION_XML="application/xml",o.TEXT_XML="text/xml",o.TEXT_HTML="text/html",o.TEXT_CSS="text/css",o.APPLICATION_JSON="application/json",o.TEXT_JAVASCRIPT="text/javascript",o.APPLICATION_ZIP="application/zip",o.APPLICATION_GZIP="application/gzip",o.APPLICATION_RAR="application/vnd.rar",o.APPLICATION_7Z="application/x-7z-compressed",o.AUDIO_MPEG="audio/mpeg",o.AUDIO_WAV="audio/wav",o.AUDIO_OGG="audio/ogg",o.AUDIO_WEBM="audio/webm",o.AUDIO_AAC="audio/aac",o.VIDEO_MP4="video/mp4",o.VIDEO_MPEG="video/mpeg",o.VIDEO_OGG="video/ogg",o.VIDEO_WEBM="video/webm",o.VIDEO_QUICKTIME="video/quicktime",o))(Ne||{}),Re=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(Re||{});var cr=({createFilesMutation:e,files:t,file:r})=>{let{showErrorMessage:a}=a$7(),[i,n]=useState(!1),[l,g]=useState(!1),[p,s]=useState(null),[d,P]=useState(void 0),m=useMemo(()=>d?.[0],[d]),c=useMemo(()=>r?[r]:t,[r,t]),I=useCallback(async f=>{if(!f?.length){P(void 0);return}try{g(!0);let x=await Promise.all(f.map(async({url:w,name:u})=>{let F=await(await fetch(w)).blob(),v=u||w.split("/").pop()||"image";return new File([F],v,{type:F.type})}));P(x);}catch(x){console.error("Erro ao carregar preview dos arquivos:",x),P(void 0);}finally{g(!1);}},[]),D=l||i;return useEffect(()=>{I(c);},[c,I]),{filesPreview:d,filePreview:m,uploadFiles:async f=>{if(f?.length){n(!0);try{let x=f[0].type||"application/octet-stream",w=Re[x];if(!w)throw new Error(`Tipo de arquivo n\xE3o suportado: ${x}`);let u=await e({files:[{content_type:w,name:f[0].name}]}).unwrap(),h=u.files.map(v=>v.id);return (await Promise.all(f.map(v=>fetch(u.files[0].url,{method:"PUT",headers:{"Content-Type":x},body:v})))).forEach(v=>{if(!v.ok)throw new Error(`Erro no upload: ${v.statusText}`)}),P(f),h}catch(x){throw s(x),a(x,"Erro no upload"),x}finally{n(!1);}}},isUploadingFiles:i,isLoadingPreview:l,isUploadOrLoadingFiles:D,uploadFilesError:p}},mr=cr;var ur=({sx:e,id:t,name:r,tabIndex:a,uploading:i,getRootProps:n,getInputProps:l,isDragActive:g,isError:p,disabled:s,dropZoneSxProps:d,dropZoneContent:P,children:m,...c})=>jsxs(De,{children:[i&&jsx(a$6,{"data-testid":"uploading-progress-bar"}),jsxs(ge,{sx:{width:1,position:"relative",...e},children:[jsxs(Ve,{...n(),"data-testid":"drop-zone-styled-area",isError:p,isDragActive:g,disabled:!!s,sx:d,...c,children:[jsx("input",{...l(),id:t,tabIndex:a,name:r}),P]}),m]})]}),K=ur;var xr=({header:e,description:t,sx:r,...a})=>jsxs(ae,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...a,children:[jsx(a$3,{sx:{width:220}}),jsxs("div",{children:[jsx(Be,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(Be,{variant:"body2",sx:{color:"text.secondary"},children:t||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(Be,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),J=memo(xr);var vr=({onRemove:e,onReorder:t,onFilesSelect:r,id:a,disabled:i,error:n,helperText:l,files:g,thumbnail:p,dropZoneSxProps:s,uploading:d,tabIndex:P,maxFiles:m,...c})=>{let{files:I,dropzoneProps:D,handleRemove:R}=z({filesToUpload:g,onFilesSelect:r,onRemove:e,dropzoneOptions:{multiple:!0,disabled:i,...c},maxFiles:m}),{getRootProps:f,getInputProps:x,isDragActive:w,isDragReject:u}=D,h=!!I?.length,F=u||!!n;return jsxs(K,{id:a,uploading:d,disabled:i,dropZoneSxProps:s,tabIndex:P,getRootProps:f,getInputProps:x,isDragActive:w,isError:F,dropZoneContent:jsx(J,{}),children:[jsx(k,{disabled:i,helperText:l,isError:F}),h&&jsx(ge,{sx:{my:3},children:jsx(fe,{files:I,thumbnail:!!p,onRemove:e?R:void 0,onReorder:t})})]})},Ar=memo(vr);var Sr=({onFilesSelect:e,onRemove:t,onReorder:r,id:a,disabled:i,error:n,helperText:l,files:g,dropZoneSxProps:p,placeholderProps:s,placeholderAlt:d,uploading:P,tabIndex:m,maxFiles:c,aspectRatio:I,enableCrop:D=!0,convertToWebp:R=!0,cropSize:f,name:x,label:w,...u})=>{let{files:h,dropzoneProps:F,cropState:v,handleRemove:_,aspectRatio:U}=z({filesToUpload:g,onFilesSelect:e,onRemove:t,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:i,...u},enableCrop:D,customAspectRatio:I,convertToWebp:R,maxFiles:c,cropSize:f}),{getRootProps:ee,getInputProps:B,isDragActive:y,isDragReject:$}=F,{cropModalOpen:G,imagePreview:oe,cropLoading:re,onCropInitialized:te,handleCropSave:M,handleCropCancel:L,currentImageIndex:N,totalPendingImages:C}=v,q=!!h?.length,Z=$||!!n,_e=useMemo(()=>{let Oe=w??"Ajustar Imagem",Me=C>1?` (${N} de ${C})`:"";return `${Oe}${Me}`},[w,C,N]);return jsxs(K,{id:a,name:x,uploading:P,disabled:i,dropZoneSxProps:p,tabIndex:m,getRootProps:ee,getInputProps:B,isDragActive:y,isError:Z,dropZoneContent:jsx(Fragment,{children:d?jsx(ae,{children:d}):jsx(J,{header:s?.header,description:s?.description})}),children:[jsx(k,{disabled:i,helperText:l,isError:Z}),q&&jsx(Fragment,{children:jsx(ge,{sx:{my:3,ml:.5},children:jsx(fe,{files:h,thumbnail:!0,onRemove:_,onReorder:r})})}),jsx(a$4,{open:G,onClose:L,label:_e,imageSrc:oe,aspectRatio:U,onInitialized:te,onSave:M,loading:re,cropSize:f})]})},yr=memo(Sr);var Cr=({onFileSelect:e,onRemove:t,file:r,id:a,disabled:i,error:n,helperText:l,sx:g$1,dropZoneSxProps:p,uploading:s,tabIndex:d,...P})=>{let{file:m$1,dropzoneProps:c,handleRemove:I}=z({filesToUpload:r,onFileSelect:e,onRemove:t,dropzoneOptions:{multiple:!1,disabled:i,...P}}),{getRootProps:D,getInputProps:R,isDragActive:f,isDragReject:x}=c,w=useCallback(v=>{v.stopPropagation(),I(m$1||void 0);},[m$1,I]),u=!!m$1,h=typeof m$1=="string",F=x||!!n;return jsx(K,{id:a,uploading:s,disabled:i,dropZoneSxProps:p,tabIndex:d,getRootProps:D,getInputProps:R,isDragActive:f,isError:F,dropZoneContent:jsxs(Fragment,{children:[!u&&jsx(J,{}),u&&jsxs(ae,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:v=>`solid 1px ${v.palette.divider}`,...g$1},children:[jsx(g,{file:m$1}),jsxs(ae,{flexGrow:1,sx:{minWidth:0},children:[jsx(Be,{variant:"subtitle2",noWrap:!0,children:h?m$1:m$1.name}),jsx(Be,{variant:"caption",sx:{color:"text.secondary"},children:h?"":e$1(m$1.size)})]}),t&&jsx(a$2,{title:"Remover arquivo",children:jsx(He,{edge:"end",size:"small",disabled:i,"aria-label":"Remover arquivo",onClick:w,children:jsx(a$5,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:jsx(k,{disabled:i,helperText:l,isError:F})})},kr=memo(Cr);var Gr=({onRemove:e,onFileSelect:t,file:r,id:a,disabled:i,error:n,helperText:l,dropZoneSxProps:g,placeholderProps:p,placeholderAlt:s,uploading:d,tabIndex:P,aspectRatio:m,enableCrop:c=!0,convertToWebp:I=!0,name:D,label:R,cropSize:f,...x})=>{let[w,u]=useState(!1),{file:h,dropzoneProps:F,cropState:v,handleRemove:_,aspectRatio:U}=z({filesToUpload:r,onFileSelect:t,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:i,...x},enableCrop:c,customAspectRatio:m,convertToWebp:I,cropSize:f}),{getRootProps:ee,getInputProps:B,isDragActive:y,isDragReject:$}=F,{cropModalOpen:G,imagePreview:oe,cropLoading:re,onCropInitialized:te,handleCropSave:M,handleCropCancel:L}=v,N=useCallback(()=>{_(h||void 0);},[h,_]),C=!!h,q=$||!!n,Z=C?{opacity:0}:{opacity:1};return jsxs(De,{children:[(d||w)&&jsx(a$6,{}),jsxs(K,{id:a,uploading:d,disabled:i,dropZoneSxProps:g,tabIndex:P,getRootProps:ee,getInputProps:B,isDragActive:y,isError:q,name:D,dropZoneContent:jsxs(Fragment,{children:[s?jsx(ae,{sx:Z,children:s}):jsx(J,{sx:Z,header:p?.title,description:p?.description}),C&&jsx(ze,{file:h,cropSize:f,isLoading:w,isUploading:d,onLoading:u,aspectRatio:U})]}),children:[jsx(k,{disabled:i,helperText:l,isError:q}),C&&e&&jsx(Qe,{size:"small",onClick:N,disabled:i,label:"Remover arquivo",children:jsx(a$5,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$4,{open:G,onClose:L,label:R??"Ajustar Imagem",imageSrc:oe,aspectRatio:U,onInitialized:te,onSave:M,loading:re,cropSize:f})]})]})},Zr=memo(Gr);var Vr=({onFileSelect:e,onRemove:t,file:r,disabled:a,label:i,id:n,tabIndex:l,error:g,helperText:p,sx:s,name:d,maxSize:P,uploading:m,aspectRatio:c=1,enableCrop:I=!0,convertToWebp:D=!0,cropSize:R,...f})=>{let[x,w]=useState(!1),{file:u,dropzoneProps:h,cropState:F,handleRemove:v}=z({filesToUpload:r,onFileSelect:e,onRemove:t,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:a,maxSize:P,...f},enableCrop:I,customAspectRatio:c,convertToWebp:D,cropSize:R}),{getRootProps:_,getInputProps:U,isDragActive:ee,isDragReject:B}=h,{cropModalOpen:y,imagePreview:$,cropLoading:G,onCropInitialized:oe,handleCropSave:re,handleCropCancel:te}=F,M=B||!!g,L=x||m,N=!!t,C=useMemo(()=>u?(w(!0),URL.createObjectURL(u)):"",[u]),q=()=>{w(!1);},Z=()=>N&&u?()=>v(u):_().onClick;return jsxs(Fragment,{children:[jsxs(ao,{sx:s,isError:M,isDragActive:ee,hasFile:!!u,..._(),onClick:Z(),children:[jsxs(to,{children:[u&&jsx(no,{alt:"Avatar Preview",src:C,onLoad:q,...L&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),u&&L&&jsx(io,{children:jsx(qr,{size:135,thickness:1,color:"primary"})}),!u&&!L&&jsxs(ke,{isError:M,hasFile:!1,children:[jsx(a$5,{icon:"ADD_IMAGE",width:32}),jsx(Be,{variant:"caption",textAlign:"center",sx:{color:M?"error.main":"text.disabled"},children:"Adicionar foto"})]}),u&&!L&&jsxs(ke,{isError:M,hasFile:!0,children:[jsx(a$5,{icon:N?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(Be,{variant:"caption",textAlign:"center",sx:{color:M?"error.main":"common.white"},children:N?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:d,id:n,tabIndex:l,...U()}),jsx(ae,{spacing:.5,sx:{pt:1},children:jsx(k,{helperText:p,disabled:a,isError:M})}),u&&!L&&jsx(ae,{direction:"row",justifyContent:"center",spacing:1,sx:{pt:1,mb:-1},children:jsx(Be,{variant:"caption",component:"span",sx:{px:.75,cursor:"pointer",borderRadius:.75,color:"error.main","&:hover":{color:"error.dark",bgcolor:"background.default"}},onClick:()=>v(u),children:"Remover"})})]}),y&&$&&jsx(a$4,{open:y,onClose:te,label:i??"Ajustar Imagem",imageSrc:$,aspectRatio:c,onInitialized:oe,onSave:re,loading:G,cropSize:R,cropShape:"round"})]})},Hr=memo(Vr);var Yr=({error:e,name:t,disabled:r,sx:a,...i})=>{let{getRootProps:n,getInputProps:l,isDragActive:g,isDragReject:p}=useDropzone({disabled:r,...i}),s=p||e;return jsxs(Ye,{...n(),isDragActive:g,hasError:!!s,disabled:!!r,sx:a,"data-testid":"upload-box",children:[jsx("input",{name:t,...l()}),"Selecionar arquivo"]})},et=memo(Yr);
35
+
36
+ export { Ne as ContentType, Re as FileContentType, k as HelperText, fe as MultiFilePreview, Ar as MultipleFileUpload, yr as MultipleImageUpload, ze as SingleFilePreview, kr as SingleFileUpload, Zr as SingleImageUpload, Hr as UploadAvatar, et as UploadSimpleBox, fo as convertToWebP, ri as isImageFile, z as useDropzoneUploader, mr as useFileUploadService };
@@ -1,12 +1,3 @@
1
- import { a } from '../../chunk-RGXSHDAI.js';
1
+ export { a as default } from '../../chunk-UUTAIXBZ.js';
2
+ import '../../chunk-RGXSHDAI.js';
2
3
  import '../../chunk-CHLVIVDD.js';
3
- import { forwardRef, useMemo } from 'react';
4
- import c from '@mui/material/Box';
5
- import x from '@mui/material/CircularProgress';
6
- import y from '@mui/material/IconButton';
7
- import C from '@mui/material/Tooltip';
8
- import { jsx } from 'react/jsx-runtime';
9
-
10
- var l=forwardRef(({icon:t,label:i,color:e="primary",loading:r=!1,disabled:B=!1,boxProps:m={},tooltipProps:I={},iconProps:u={},disableTooltip:d=!1,children:n,...M},w)=>{if(!t&&!n)throw new Error("IconButton: icon or children is required");let f=useMemo(()=>t?jsx(a,{icon:t,...u}):n,[t,n,u]),T=useMemo(()=>r?jsx(x,{size:20,color:"inherit"}):f,[r,f]),s=jsx(y,{ref:w,"aria-label":i,color:"inherit",disabled:r||B,...M,children:T});return d?jsx(c,{...m,color:e,children:s}):jsx(c,{...m,color:e,children:jsx(C,{"data-testid":"button-tooltip",...I,title:i,children:jsx("span",{children:s})})})});l.displayName="IconButton";var N=l;
11
-
12
- export { N as default };
@@ -1,5 +1,5 @@
1
- export { a as default } from '../../chunk-5SLEFUFU.js';
2
- import '../../chunk-ANAHA3L6.js';
1
+ export { a as default } from '../../chunk-WQL4NFBV.js';
3
2
  import '../../chunk-7BK54YIS.js';
3
+ import '../../chunk-ANAHA3L6.js';
4
4
  import '../../chunk-RGXSHDAI.js';
5
5
  import '../../chunk-CHLVIVDD.js';
@@ -1,6 +1 @@
1
- import p from '@mui/material/Tooltip';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- var t=o=>jsx(p,{...o}),r=t;
5
-
6
- export { r as default };
1
+ export { a as default } from '../../chunk-IPOTBSM7.js';
@@ -1,6 +1,6 @@
1
- import { a } from '../../../chunk-5SLEFUFU.js';
2
- import '../../../chunk-ANAHA3L6.js';
1
+ import { a } from '../../../chunk-WQL4NFBV.js';
3
2
  import '../../../chunk-7BK54YIS.js';
3
+ import '../../../chunk-ANAHA3L6.js';
4
4
  import '../../../chunk-RGXSHDAI.js';
5
5
  import '../../../chunk-CHLVIVDD.js';
6
6
  import { useFormContext, Controller } from 'react-hook-form';
@@ -1,4 +1,4 @@
1
- import { b } from '../../../chunk-H2R5EZW7.js';
1
+ import { b } from '../../../chunk-53RMIBJN.js';
2
2
  import '../../../chunk-4VAXJ4XM.js';
3
3
  import '../../../chunk-F5XDRB7N.js';
4
4
  import '../../../chunk-T7I256S6.js';
@@ -1,7 +1,8 @@
1
- import { e } from '../../../chunk-7TQQTKCU.js';
1
+ import { e } from '../../../chunk-THEAXU6M.js';
2
2
  import '../../../chunk-4VAXJ4XM.js';
3
3
  import '../../../chunk-F5XDRB7N.js';
4
4
  import '../../../chunk-T7I256S6.js';
5
+ import '../../../chunk-H5L4ARDB.js';
5
6
  import '../../../chunk-ANAHA3L6.js';
6
7
  import '../../../chunk-OR6QR7N2.js';
7
8
  import '../../../chunk-NB6L2JSG.js';
@@ -1,9 +1,10 @@
1
- export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-H2R5EZW7.js';
2
- export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-7TQQTKCU.js';
1
+ export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-53RMIBJN.js';
2
+ export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-THEAXU6M.js';
3
3
  import { o } from '../../chunk-4VAXJ4XM.js';
4
4
  export { p as RejectionFiles } from '../../chunk-4VAXJ4XM.js';
5
5
  import '../../chunk-F5XDRB7N.js';
6
6
  import '../../chunk-T7I256S6.js';
7
+ import '../../chunk-H5L4ARDB.js';
7
8
  import '../../chunk-ANAHA3L6.js';
8
9
  import '../../chunk-OR6QR7N2.js';
9
10
  import '../../chunk-NB6L2JSG.js';
@@ -1,5 +1 @@
1
- import { toast } from 'sonner';
2
-
3
- var c=()=>({showSuccessMessage:a=>{toast.success(a);},showErrorMessage:(a,n)=>{toast.error(i(a,n));}}),o=c,i=(s,t)=>{try{return "message"in s?s.message||t:"data"in s&&s.data&&typeof s.data=="object"&&"message"in s.data&&typeof s.data.message=="string"?s.data.message:t}catch{return t}};
4
-
5
- export { o as default };
1
+ export { a as default } from '../chunk-ONZBWH3C.js';
@@ -0,0 +1,24 @@
1
+ import { StackProps } from '@mui/material/Stack';
2
+ import { SxProps, Theme } from '@mui/material/styles';
3
+
4
+ interface ExtendFile extends File {
5
+ path?: string;
6
+ preview?: string;
7
+ lastModifiedDate?: Date;
8
+ }
9
+ type FileThumbnailProps = StackProps & {
10
+ tooltip?: boolean;
11
+ file: File | string;
12
+ imageView?: boolean;
13
+ sx?: SxProps<Theme>;
14
+ onDownload?: () => void;
15
+ onRemove?: () => void;
16
+ slotProps?: {
17
+ img?: SxProps<Theme>;
18
+ icon?: SxProps<Theme>;
19
+ removeBtn?: SxProps<Theme>;
20
+ downloadBtn?: SxProps<Theme>;
21
+ };
22
+ };
23
+
24
+ export { ExtendFile as E, FileThumbnailProps as F };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.4.17",
3
+ "version": "2.4.18",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,33 +0,0 @@
1
- import { c, g, p, n, d, e as e$1, a as a$5, b, h, i as i$1, l, m as m$1, j as j$2, k } from './chunk-4VAXJ4XM.js';
2
- import { a as a$4 } from './chunk-F5XDRB7N.js';
3
- import { e } from './chunk-ANAHA3L6.js';
4
- import { a as a$6 } from './chunk-NB6L2JSG.js';
5
- import { x } from './chunk-2P4CXK3O.js';
6
- import { a as a$3 } from './chunk-FK7DDO5L.js';
7
- import { i, o } from './chunk-D27ND54J.js';
8
- import { j as j$1 } from './chunk-DMQW3LDF.js';
9
- import { a } from './chunk-RGXSHDAI.js';
10
- import { a as a$2 } from './chunk-KFZEM7KS.js';
11
- import { a as a$1 } from './chunk-X24QANPC.js';
12
- import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
13
- import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
14
- import { sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
15
- import { AnimatePresence, m } from 'framer-motion';
16
- import V1 from '@mui/material/ButtonBase';
17
- import J1 from '@mui/material/IconButton';
18
- import { styled, alpha, useTheme } from '@mui/material/styles';
19
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
20
- import A1 from '@mui/material/Box';
21
- import j from '@mui/material/Stack';
22
- import t2 from '@mui/material/Tooltip';
23
- import i1 from '@mui/material/Typography';
24
- import e2 from '@mui/material/Badge';
25
- import { useDropzone } from 'react-dropzone';
26
- import $1 from '@mui/material/Button';
27
- import W2 from '@mui/material/FormHelperText';
28
- import { memo, useId } from 'react';
29
- import Z2 from '@mui/material/Dialog';
30
-
31
- function C1({sx:t,...e}){let i$1=useTheme();return jsx(V1,{sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",color:"common.white",borderRadius:"inherit",transition:i$1.transitions.create(["opacity"]),"&:hover":{...o({color:i(i$1.vars.palette.grey["900Channel"],.64)}),opacity:1},...t},...e,children:jsx(a,{icon:"ARROW_DOWN_CICLE",width:24})})}function L1({sx:t,...e}){return jsx(J1,{size:"small",sx:{p:.35,top:4,right:4,position:"absolute",color:"common.white",bgcolor:i$1=>i(i$1.vars.palette.grey["900Channel"],.48),"&:hover":{bgcolor:i$1=>i(i$1.vars.palette.grey["900Channel"],.72)},...t},...e,children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:12})})}var T={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"};function _({sx:t,file:e,tooltip:i,onRemove:l,imageView:r,slotProps:n,onDownload:a$1,...m}){let h=typeof e=="string"?e:URL.createObjectURL(e),{name:f,path:p}=c(e),s=a$5(p||h),u=jsx(A1,{component:"img",src:h,className:T.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...n?.img}}),z=jsx(a,{icon:b(s),sx:{width:32,height:32,flexShrink:0,...t}}),g=jsxs(j,{component:"span",className:T.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...t},...m,children:[s==="image"&&r?u:z,l&&jsx(L1,{onClick:l,className:T.removeBtn,sx:n?.removeBtn}),a$1&&jsx(C1,{onClick:a$1,className:T.downloadBtn,sx:n?.downloadBtn})]});return i?jsx(t2,{arrow:!0,title:f,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:g}):g}var i2=({onRemove:t,onHandleMainImage:e,key:i,sx:l,file:r,disableDrag:n,attributes:a$1,listeners:m,mainUrl:h,innerWidth:f,isDragging:p})=>{let s=r===h;return jsx(e2,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:e&&jsx(m$1,{isMainImage:s,size:"small",onClick:()=>e(r),"aria-label":s?"Remover imagem principal":"Definir como imagem principal",children:jsx(a,{icon:s?"STAR_02":"STAR",width:12})}),children:jsxs(j$2,{width:f,isDragging:p,"data-testid":`preview-multi-img-${i}`,...j$1().inUp,sx:l,children:[jsx(a$6,{disableDrag:n,...a$1,...m}),jsx(_,{tooltip:!0,imageView:!0,file:r,sx:{position:"absolute",right:10,top:10}}),t&&jsx(k,{size:"small","aria-label":"Remover imagem",onClick:()=>t(r),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})},`badge-${i}`)},w1=i2;var s2=({file:t,thumbnail:e$1,onRemove:i,onHandleMainImage:l$1,mainUrl:r,sx:n,disableDrag:a$1=!1})=>{let{key:m,name:h$1="",size:f=0}=c(t),p=typeof t=="string",s=a$1?60:80,{attributes:u,listeners:z,setNodeRef:g,transform:y,transition:R,isDragging:k}=useSortable({id:m,disabled:a$1}),P={transform:x.Transform.toString(y),transition:R,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${s+8}px`,height:"68px"};return e$1?jsx(h,{ref:g,style:P,children:jsx(w1,{innerWidth:s,isDragging:k,sx:n,file:t,disableDrag:a$1,attributes:u,listeners:z,mainUrl:r,onRemove:i,onHandleMainImage:l$1},m)}):jsx(h,{ref:g,style:{...P,height:"80px",width:`${s+38}px`},children:jsxs(i$1,{width:s+30,isDragging:k,"data-testid":`preview-multi-img-${m}`,...j$1().inUp,sx:n,children:[jsx(a$6,{disableDrag:a$1,...u,...z}),jsx(_,{file:t}),jsxs(j,{flexGrow:1,sx:{minWidth:0,width:"100%"},children:[jsx(i1,{variant:"subtitle2",noWrap:!0,children:p?t:h$1}),jsx(i1,{variant:"caption",sx:{color:"text.secondary"},children:p?"":e(f)})]}),i&&jsx(l,{size:"small","aria-label":"Remover arquivo",onClick:()=>i(t),children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})})},E1=s2;var e1=({thumbnail:t,files:e,onRemove:i,onReorder:l,onHandleMainImage:r,mainUrl:n,sx:a})=>{let m=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!e?.length)return null;let h=p=>{let{active:s,over:u}=p;if(!(!s||!u||s.id===u.id)&&l){let z=e.findIndex(y=>{let{key:R}=c(y);return R===s.id}),g=e.findIndex(y=>{let{key:R}=c(y);return R===u.id});z!==-1&&g!==-1&&l(z,g);}},f=jsx(AnimatePresence,{initial:!1,children:e.map(p=>jsx(E1,{file:p,thumbnail:t,onRemove:i,onHandleMainImage:r,mainUrl:n,sx:a,disableDrag:!l},c(p).key))});return l?jsx(DndContext,{sensors:m,collisionDetection:closestCenter,onDragEnd:h,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:e.map(p=>c(p).key),strategy:horizontalListSortingStrategy,children:f})}):f};function U1({file:t}){let e=typeof t=="string"?t:t.name,i=typeof t=="string"?t:URL.createObjectURL(t);return jsx(A1,{sx:{p:1,top:0,left:0,width:1,height:1,position:"absolute"},children:jsx(A1,{component:"img",alt:e,src:i,sx:{width:1,height:1,borderRadius:1,objectFit:"cover"}})})}function qo({sx:t,...e}){return jsx(J1,{size:"small",sx:{top:16,right:16,zIndex:9,position:"absolute",color:i$1=>i(i$1.vars.palette.common.whiteChannel,.8),bgcolor:i$1=>i(i$1.vars.palette.grey["900Channel"],.72),"&:hover":{bgcolor:i$1=>i(i$1.vars.palette.grey["900Channel"],.48)},...t},...e,"aria-label":"Remover arquivo",children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:18})})}function N1(){let t=useTheme(),e=useId(),i=t.vars.palette.primary.main;return jsxs(Fragment,{children:[jsx("defs",{children:jsxs("linearGradient",{id:e,x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[jsx("stop",{offset:"0%",stopColor:i}),jsx("stop",{offset:"100%",stopColor:i,stopOpacity:"0"})]})}),jsx("path",{fill:`url(#${e})`,fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})}function P2({hideBackground:t,sx:e,...i}){let l=useTheme(),r=l.vars.palette.primary.main,n=l.vars.palette.primary.dark,a=l.vars.palette.primary.darker;return jsxs(A1,{component:"svg",width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",sx:{width:320,maxWidth:1,flexShrink:0,height:"auto",...e},...i,children:[!t&&jsx(N1,{}),jsx("defs",{children:jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopOpacity:"0"}),jsx("stop",{offset:"100%"})]})}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),jsx("path",{fill:a,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),jsx("ellipse",{cx:"380.363",cy:"298.487",fill:r,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),jsx("ellipse",{cx:"390.052",cy:"264.383",fill:r,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),jsx("ellipse",{cx:"346.97",cy:"270.022",fill:r,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:r,fillRule:"nonzero",opacity:"0.2"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),jsx("path",{fill:n,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),jsx("ellipse",{cx:"119.593",cy:"258.664",fill:r,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"101.03",cy:"260.545",fill:r,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),jsx("ellipse",{cx:"108.459",cy:"265.905",fill:r,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("ellipse",{cx:"89.193",cy:"265.433",fill:r,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),jsx("path",{stroke:a,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:r,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:r,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:r,fillRule:"nonzero",opacity:"0.1"}),jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:r,fillRule:"nonzero",opacity:"0.1"}),jsx("path",{fill:n,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),jsx("path",{fill:r,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),jsx("path",{fill:n,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})}var Z1=memo(P2);var L2=({header:t,description:e,sx:i,...l})=>jsxs(j,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...i},...l,children:[jsx(Z1,{sx:{width:220}}),jsxs("div",{children:[jsx(i1,{gutterBottom:!0,variant:"h5",children:t||"Soltar ou selecionar arquivos"}),jsx(i1,{variant:"body2",sx:{color:"text.secondary"},children:e||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(i1,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),n1=memo(L2);var q1=styled(A1,{shouldForwardProp:t=>!["isDragActive","isError","disabled"].includes(t)})(({theme:t,isDragActive:e,isError:i,disabled:l})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:t.spacing(5),borderRadius:t.shape.borderRadius,transition:t.transitions.create("padding"),backgroundColor:t.palette.background.neutral,border:`1px dashed ${alpha(t.palette.grey[500],.32)}`,...e&&{opacity:.72},...i&&{color:t.palette.error.main,backgroundColor:t.palette.error.lighter,borderColor:t.palette.error.light},...l&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));var A2=({sx:t,id:e,tabIndex:i,uploading:l,getRootProps:r,getInputProps:n,isDragActive:a,isError:m,disabled:h,dropZoneSxProps:f,dropZoneContent:p,children:s,...u})=>jsxs(d,{children:[l&&jsx(a$3,{"data-testid":"uploading-progress-bar"}),jsxs(A1,{sx:{width:1,position:"relative",...t},children:[jsxs(q1,{...r(),"data-testid":"drop-zone-styled-area",isError:m,isDragActive:a,disabled:!!h,sx:f,...u,children:[jsx("input",{...n(),id:e,tabIndex:i}),p]}),s]})]}),s1=A2;var O2=({id:t,disabled:e$1,multiple:i=!1,error:l,helperText:r,file:n$1,onDelete:a$1,files:m$1,thumbnail:h,onRemove:f,onHandleMainImage:p$1,mainUrl:s,sx:u,dropZoneProps:z,placeholderProps:g$1,placeholderAlt:y,uploading:R,image:k,tabIndex:P,preview:J="image",onRemoveAll:U,onUpload:C,onReorder:W,...Q})=>{let{getRootProps:N,getInputProps:M,isDragActive:F,isDragReject:S,fileRejections:c1}=useDropzone({multiple:i,disabled:e$1,...Q}),X=!!n$1&&!i,o1=X||k,m1=m$1&&i&&m$1.length>0,d1=typeof n$1=="string",f1=S||!!l;if(J==="file")return jsxs(s1,{id:t,uploading:R,disabled:e$1,dropZoneSxProps:z,tabIndex:P,getRootProps:N,getInputProps:M,isDragActive:F,isError:f1,dropZoneContent:jsxs(Fragment,{children:[!X&&jsx(n1,{}),X&&jsxs(j,{component:m.div,...j$1().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:E=>`solid 1px ${E.palette.divider}`,...u},children:[jsx(_,{file:n$1}),jsxs(j,{flexGrow:1,sx:{minWidth:0},children:[jsx(i1,{variant:"subtitle2",noWrap:!0,children:d1?n$1:n$1.name}),jsx(i1,{variant:"caption",sx:{color:"text.secondary"},children:d1?"":e(n$1.size)})]}),a$1&&jsx(g,{edge:"end",size:"small",disabled:e$1,"aria-label":"Remover arquivo",onClick:E=>{E.stopPropagation(),a$1();},children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})})]})]}),children:[r&&r,jsx(p,{files:c1}),m1&&jsxs(Fragment,{children:[jsx(A1,{sx:{my:3},children:jsx(e1,{files:m$1,thumbnail:h,onRemove:f,onHandleMainImage:p$1,mainUrl:s,onReorder:W})}),jsxs(j,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[U&&jsx($1,{color:"inherit",variant:"outlined",size:"small",onClick:U,children:"Remover todos"}),C&&jsx($1,{size:"small",variant:"contained",onClick:C,children:"Enviar arquivos"})]})]})]});let u1=o1?{opacity:0}:void 0;return jsxs(s1,{id:t,uploading:R,disabled:e$1,dropZoneSxProps:z,tabIndex:P,getRootProps:N,getInputProps:M,isDragActive:F,isError:f1,dropZoneContent:jsxs(Fragment,{children:[y?jsx(j,{sx:u1,children:y}):jsx(n1,{sx:u1,header:g$1?.title,description:g$1?.description}),o1&&jsx(U1,{file:n$1||k||""})]}),children:[r&&jsx(W2,{error:!!l,sx:E=>({mx:"14px",color:e$1?E.palette.grey[500]:void 0}),children:r}),jsx(p,{files:c1}),o1&&a$1&&jsx(n,{size:"small",onClick:a$1,disabled:e$1,"aria-label":"Remover arquivo",children:jsx(a,{icon:"DELETE_MARK_BUTTON_02",width:16})}),m1&&jsx(Fragment,{children:jsx(A1,{sx:{my:3,ml:.5},children:jsx(e1,{files:m$1,thumbnail:h,onRemove:f,onHandleMainImage:p$1,mainUrl:s,onReorder:W})})})]})},Y1=O2;var q2=({onFileCropped:t,onImageUploaded:e$2,onCancel:i,aspect:l,label:r,image:n="",uploading:a$5,file:m,tabIndex:h,maxSize:f,onDropRejected:p,...s})=>{let{id:u,setCropModalOpen:z,handleRemove:g,toggleCropModalOpen:y,cropModalOpen:R,cancelChanges:k,saveChanges:P,previewImage:J,setCropper:U,preview:C,closePreviewImage:W,saving:Q}=a$1({onFileCropped:t,onImageUploaded:e$2,onCancel:i}),{error:N}=a$2();return jsxs(Fragment,{children:[jsxs(d,{children:[a$5&&jsx(a$3,{}),jsx(Y1,{...s,maxSize:f,id:u,file:m,onDrop:M=>{if(M.length>0){z(!0);let F=new FileReader;F.addEventListener("load",()=>{let S=F.result?.toString()||"";e$2(S),t(void 0);}),F.readAsDataURL(M[0]);}},image:n,tabIndex:h,onDropRejected:(M,F)=>{let S=M[0]?.errors[0]?.code;e$2(void 0),t(void 0),N(S==="file-too-large"?`Imagem n\xE3o pode ser maior que ${e(f)}`:"Erro ao enviar imagem"),p&&p(M,F);}}),(m||n)&&jsxs(e$1,{className:"actions",children:[jsx($1,{color:"inherit",startIcon:jsx(a,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:g,children:"Remover"}),jsx($1,{color:"inherit",startIcon:jsx(a,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:y,children:"Editar"})]})]}),jsx(a$4,{id:u,open:R,onClose:k,label:r,aspectRatio:l,imageSrc:n,onRemove:g,onSave:P,onPreview:J,onInitialized:U,loading:Q}),jsx(Z2,{open:!!C,onClose:W,scroll:"body",PaperProps:{sx:{p:2}},children:C&&jsx("img",{src:C,alt:"Preview"})})]})},j0=q2;
32
-
33
- export { e1 as a, U1 as b, qo as c, Y1 as d, j0 as e };
File without changes
@@ -1,5 +1,5 @@
1
- import { f } from './chunk-ANAHA3L6.js';
2
1
  import { a } from './chunk-7BK54YIS.js';
2
+ import { f } from './chunk-ANAHA3L6.js';
3
3
  import { a as a$1 } from './chunk-RGXSHDAI.js';
4
4
  import { forwardRef, useState, useRef, useMemo, useCallback } from 'react';
5
5
  import A from '@mui/material/IconButton';