@zydon/common 1.4.43 → 1.4.44

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.
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Summary/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,SAAS;;qMAIpB,CAAC;AAEH,eAAO,MAAM,KAAK;;6nDAEf,CAAC;AAEJ,eAAO,MAAM,KAAK;;6nDAGf,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Summary/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,SAAS;;qMAIpB,CAAC;AAEH,eAAO,MAAM,KAAK;;6nDAKf,CAAC;AAEJ,eAAO,MAAM,KAAK;;6nDAGf,CAAC"}
@@ -1,4 +1,4 @@
1
- import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-92b4801a.js";
1
+ import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-b37267fa.js";
2
2
  import wn, { useContext as _t, useId as _s, useEffect as Ws } from "react";
3
3
  import "@mui/material";
4
4
  import "@emotion/react";
@@ -7751,7 +7751,7 @@ const s5u = ({
7751
7751
  ...a,
7752
7752
  children: n
7753
7753
  }
7754
- ), n11 = () => import("./features-1b95b3e7.js").then((e) => e.default), fAn = ({ children: e }) => /* @__PURE__ */ d.jsx(hr1, { strict: !0, features: n11, children: /* @__PURE__ */ d.jsxs(pn.div, { style: { height: "100%" }, children: [
7754
+ ), n11 = () => import("./features-d4234717.js").then((e) => e.default), fAn = ({ children: e }) => /* @__PURE__ */ d.jsx(hr1, { strict: !0, features: n11, children: /* @__PURE__ */ d.jsxs(pn.div, { style: { height: "100%" }, children: [
7755
7755
  " ",
7756
7756
  e,
7757
7757
  " "
@@ -279250,10 +279250,12 @@ const jpt = ({ fileRejections: e }) => e.length ? /* @__PURE__ */ d.jsx(
279250
279250
  ] });
279251
279251
  }, ilu = Ce(T)({
279252
279252
  display: "grid",
279253
- gridTemplateColumns: "auto auto",
279254
- alignItems: "center"
279253
+ gridTemplateColumns: "auto auto"
279255
279254
  }), olu = Ce(je)(({ theme: e }) => ({
279256
- color: e.palette.grey[600]
279255
+ color: e.palette.grey[600],
279256
+ display: "flex",
279257
+ gap: "8px",
279258
+ alignItems: "center"
279257
279259
  })), ulu = Ce(je)(({ theme: e }) => ({
279258
279260
  textAlign: "right",
279259
279261
  color: e.palette.grey[800]
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ae as u, b6 as p, af as d, ag as m, b8 as C, b7 as v, ah as S, ai as T, bZ as g, c1 as k, c0 as A, b$ as P, b9 as F, bb as I, bc as h, aj as y, ak as B, al as D, am as x, an as E, ao as M, ap as f, bd as w, be as L, bf as R, aq as N, bu as U, ar as G, as as W, at as H, au as O, b2 as q, bw as z, bg as V, av as j, bh as K, b0 as Z, aw as J, ax as Q, bx as X, ay as Y, a9 as _, az as $, aA as aa, bi as sa, aB as ea, ab as oa, aC as ta, aD as ra, bj as ba, bS as ia, aE as la, aF as na, aG as ca, bz as ua, bA as pa, by as da, ba as ma, bk as Ca, aa as va, aH as Sa, bl as Ta, bm as ga, aI as ka, a_ as Aa, aJ as Pa, bn as Fa, aK as Ia, aL as ha, aM as ya, aN as Ba, b4 as Da, bt as xa, b1 as Ea, bT as Ma, bU as fa, aO as wa, aP as La, aQ as Ra, aR as Na, a$ as Ua, bs as Ga, bo as Wa, bB as Ha, aS as Oa, c5 as qa, c6 as za, c3 as Va, c8 as ja, c7 as Ka, c4 as Za, bv as Ja, aT as Qa, aU as Xa, bp as Ya, b3 as _a, bV as $a, aV as as, aW as ss, bq as es, aX as os, a8 as ts, aY as rs, br as bs, b5 as is, aZ as ls, bW as ns, cB as cs, cC as us, cv as ps, c9 as ds, bX as ms, cs as Cs, ct as vs, cu as Ss, ca as Ts, cE as gs, ad as ks, cA as As, cz as Ps, cw as Fs, cx as Is, cb as hs, co as ys, b_ as Bs, cc as Ds, cd as xs, ce as Es, cp as Ms, cf as fs, cg as ws, cq as Ls, ac as Rs, cr as Ns, cm as Us, cl as Gs, ck as Ws, cn as Hs, ch as Os, bY as qs, c2 as zs, ci as Vs, cj as js, cD as Ks, cy as Zs, bP as Js, bQ as Qs, bR as Xs, bI as Ys, bL as _s, bD as $s, bF as ae, bK as se, bC as ee, bJ as oe, bH as te, bG as re, bN as be, bO as ie, bM as le, bE as ne } from "./index-92b4801a.js";
1
+ import { ae as u, b6 as p, af as d, ag as m, b8 as C, b7 as v, ah as S, ai as T, bZ as g, c1 as k, c0 as A, b$ as P, b9 as F, bb as I, bc as h, aj as y, ak as B, al as D, am as x, an as E, ao as M, ap as f, bd as w, be as L, bf as R, aq as N, bu as U, ar as G, as as W, at as H, au as O, b2 as q, bw as z, bg as V, av as j, bh as K, b0 as Z, aw as J, ax as Q, bx as X, ay as Y, a9 as _, az as $, aA as aa, bi as sa, aB as ea, ab as oa, aC as ta, aD as ra, bj as ba, bS as ia, aE as la, aF as na, aG as ca, bz as ua, bA as pa, by as da, ba as ma, bk as Ca, aa as va, aH as Sa, bl as Ta, bm as ga, aI as ka, a_ as Aa, aJ as Pa, bn as Fa, aK as Ia, aL as ha, aM as ya, aN as Ba, b4 as Da, bt as xa, b1 as Ea, bT as Ma, bU as fa, aO as wa, aP as La, aQ as Ra, aR as Na, a$ as Ua, bs as Ga, bo as Wa, bB as Ha, aS as Oa, c5 as qa, c6 as za, c3 as Va, c8 as ja, c7 as Ka, c4 as Za, bv as Ja, aT as Qa, aU as Xa, bp as Ya, b3 as _a, bV as $a, aV as as, aW as ss, bq as es, aX as os, a8 as ts, aY as rs, br as bs, b5 as is, aZ as ls, bW as ns, cB as cs, cC as us, cv as ps, c9 as ds, bX as ms, cs as Cs, ct as vs, cu as Ss, ca as Ts, cE as gs, ad as ks, cA as As, cz as Ps, cw as Fs, cx as Is, cb as hs, co as ys, b_ as Bs, cc as Ds, cd as xs, ce as Es, cp as Ms, cf as fs, cg as ws, cq as Ls, ac as Rs, cr as Ns, cm as Us, cl as Gs, ck as Ws, cn as Hs, ch as Os, bY as qs, c2 as zs, ci as Vs, cj as js, cD as Ks, cy as Zs, bP as Js, bQ as Qs, bR as Xs, bI as Ys, bL as _s, bD as $s, bF as ae, bK as se, bC as ee, bJ as oe, bH as te, bG as re, bN as be, bO as ie, bM as le, bE as ne } from "./index-b37267fa.js";
2
2
  import "react";
3
3
  import "@mui/material";
4
4
  import "@emotion/react";
@@ -35406,4 +35406,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
35406
35406
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p22(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O22(e){if(Array.isArray(e))return JBn(e)}function GUn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function YUn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GUn(Object(n),!0).forEach(function(a){KUn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GUn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function KUn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Omt(e,t){return M22(e)||w22(e,t)||XUn(e,t)||j22()}function j22(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35407
35407
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XUn(e,t){if(e){if(typeof e=="string")return JBn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JBn(e,t)}}function JBn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function w22(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function M22(e){if(Array.isArray(e))return e}var L22="file-invalid-type",P22="file-too-large",E22="file-too-small",k22="too-many-files",S22=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:L22,message:"File type must be ".concat(n)}},QUn=function(t){return{code:P22,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},JUn=function(t){return{code:E22,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},D22={code:k22,message:"Too many files"};function qUn(e,t){var n=e.type==="application/x-moz-file"||b22(e,t);return[n,n?null:S22(t)]}function eGn(e,t,n){if(hT(e.size))if(hT(t)&&hT(n)){if(e.size>n)return[!1,QUn(n)];if(e.size<t)return[!1,JUn(t)]}else{if(hT(t)&&e.size<t)return[!1,JUn(t)];if(hT(n)&&e.size>n)return[!1,QUn(n)]}return[!0,null]}function hT(e){return e!=null}function B22(e){var t=e.files,n=e.accept,a=e.minSize,r=e.maxSize,u=e.multiple,c=e.maxFiles,l=e.validator;return!u&&t.length>1||u&&c>=1&&t.length>c?!1:t.every(function(f){var s=qUn(f,n),g=Omt(s,1),_=g[0],m=eGn(f,a,r),v=Omt(m,1),C=v[0],h=l?l(f):null;return _&&C&&!h})}function HCt(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ACt(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function tGn(e){e.preventDefault()}function I22(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function W22(e){return e.indexOf("Edge/")!==-1}function $22(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return I22(e)||W22(e)}function kc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){for(var r=arguments.length,u=new Array(r>1?r-1:0),c=1;c<r;c++)u[c-1]=arguments[c];return t.some(function(l){return!HCt(a)&&l&&l.apply(void 0,[a].concat(u)),HCt(a)})}}function x22(){return"showOpenFilePicker"in window}function z22(e){if(hT(e)){var t=Object.entries(e).filter(function(n){var a=Omt(n,2),r=a[0],u=a[1],c=!0;return nGn(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(u)||!u.every(rGn))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(n,a){var r=Omt(a,2),u=r[0],c=r[1];return YUn(YUn({},n),{},KUn({},u,c))},{});return[{description:"Files",accept:t}]}return e}function H22(e){if(hT(e))return Object.entries(e).reduce(function(t,n){var a=Omt(n,2),r=a[0],u=a[1];return[].concat(UUn(t),[r],UUn(u))},[]).filter(function(t){return nGn(t)||rGn(t)}).join(",")}function A22(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function R22(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function nGn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function rGn(e){return/^.*\.[\w]+$/.test(e)}var V22=["children"],F22=["open"],N22=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],T22=["refKey","onChange","onClick"];function Z22(e){return Y22(e)||G22(e)||aGn(e)||U22()}function U22(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
35408
35408
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G22(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y22(e){if(Array.isArray(e))return eIn(e)}function qBn(e,t){return Q22(e)||X22(e,t)||aGn(e,t)||K22()}function K22(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35409
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aGn(e,t){if(e){if(typeof e=="string")return eIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eIn(e,t)}}function eIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function X22(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Q22(e){if(Array.isArray(e))return e}function iGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iGn(Object(n),!0).forEach(function(a){tIn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function tIn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RCt(e,t){if(e==null)return{};var n=J22(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function J22(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var nIn=o.forwardRef(function(e,t){var n=e.children,a=RCt(e,V22),r=VCt(a),u=r.open,c=RCt(r,F22);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(Pt(Pt({},c),{},{open:u})))});nIn.displayName="Dropzone";var oGn={disabled:!1,getFilesFromEvent:f22,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};nIn.defaultProps=oGn,nIn.propTypes={children:P.func,accept:P.objectOf(P.arrayOf(P.string)),multiple:P.bool,preventDropOnDocument:P.bool,noClick:P.bool,noKeyboard:P.bool,noDrag:P.bool,noDragEventsBubbling:P.bool,minSize:P.number,maxSize:P.number,maxFiles:P.number,disabled:P.bool,getFilesFromEvent:P.func,onFileDialogCancel:P.func,onFileDialogOpen:P.func,useFsAccessApi:P.bool,autoFocus:P.bool,onDragEnter:P.func,onDragLeave:P.func,onDragOver:P.func,onDrop:P.func,onDropAccepted:P.func,onDropRejected:P.func,onError:P.func,validator:P.func};var rIn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function VCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Pt(Pt({},oGn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,g=t.onDragLeave,_=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,E=t.noClick,M=t.noKeyboard,j=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,I=o.useMemo(function(){return H22(n)},[n]),A=o.useMemo(function(){return z22(n)},[n]),F=o.useMemo(function(){return typeof b=="function"?b:uGn},[b]),W=o.useMemo(function(){return typeof h=="function"?h:uGn},[h]),z=o.useRef(null),T=o.useRef(null),H=o.useReducer(q22,rIn),Z=qBn(H,2),X=Z[0],J=Z[1],V=X.isFocused,N=X.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&x22()),ie=function(){!Y.current&&N&&setTimeout(function(){if(T.current){var he=T.current.files;he.length||(J({type:"closeDialog"}),W())}},300)};o.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[T,N,W,Y]);var ee=o.useRef([]),fe=function(he){z.current&&z.current.contains(he.target)||(he.preventDefault(),ee.current=[])};o.useEffect(function(){return w&&(document.addEventListener("dragover",tGn,!1),document.addEventListener("drop",fe,!1)),function(){w&&(document.removeEventListener("dragover",tGn),document.removeEventListener("drop",fe))}},[z,w]),o.useEffect(function(){return!a&&y&&z.current&&z.current.focus(),function(){}},[z,y,a]);var ce=o.useCallback(function(q){D?D(q):console.error(q)},[D]),be=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),ee.current=[].concat(Z22(ee.current),[q.target]),ACt(q)&&Promise.resolve(r(q)).then(function(he){if(!(HCt(q)&&!k)){var at=he.length,He=at>0&&B22({files:he,accept:I,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),Et=at>0&&!He;J({isDragAccept:He,isDragReject:Et,isDragActive:!0,type:"setDraggedFiles"}),s&&s(q)}}).catch(function(he){return ce(he)})},[r,s,ce,k,I,c,u,l,f,S]),le=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=ACt(q);if(he&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return he&&_&&_(q),!1},[_,k]),te=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=ee.current.filter(function(He){return z.current&&z.current.contains(He)}),at=he.indexOf(q.target);at!==-1&&he.splice(at,1),ee.current=he,!(he.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ACt(q)&&g&&g(q))},[z,g,k]),ge=o.useCallback(function(q,he){var at=[],He=[];q.forEach(function(Et){var we=qUn(Et,I),qt=qBn(we,2),mn=qt[0],Sc=qt[1],KO=eGn(Et,c,u),XO=qBn(KO,2),CT=XO[0],bT=XO[1],yT=S?S(Et):null;if(mn&&CT&&!yT)at.push(Et);else{var pT=[Sc,bT];yT&&(pT=pT.concat(yT)),He.push({file:Et,errors:pT.filter(function(OT){return OT})})}}),(!l&&at.length>1||l&&f>=1&&at.length>f)&&(at.forEach(function(Et){He.push({file:Et,errors:[D22]})}),at.splice(0)),J({acceptedFiles:at,fileRejections:He,type:"setFiles"}),m&&m(at,He,he),He.length>0&&C&&C(He,he),at.length>0&&v&&v(at,he)},[J,l,I,c,u,f,m,v,C,S]),We=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),ee.current=[],ACt(q)&&Promise.resolve(r(q)).then(function(he){HCt(q)&&!k||ge(he,q)}).catch(function(he){return ce(he)}),J({type:"reset"})},[r,ge,ce,k]),U=o.useCallback(function(){if(Y.current){J({type:"openDialog"}),F();var q={multiple:l,types:A};window.showOpenFilePicker(q).then(function(he){return r(he)}).then(function(he){ge(he,null),J({type:"closeDialog"})}).catch(function(he){A22(he)?(W(he),J({type:"closeDialog"})):R22(he)?(Y.current=!1,T.current?(T.current.value=null,T.current.click()):ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ce(he)});return}T.current&&(J({type:"openDialog"}),F(),T.current.value=null,T.current.click())},[J,F,W,p,ge,ce,A,l]),qe=o.useCallback(function(q){!z.current||!z.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),U())},[z,U]),se=o.useCallback(function(){J({type:"focus"})},[]),ne=o.useCallback(function(){J({type:"blur"})},[]),_e=o.useCallback(function(){E||($22()?setTimeout(U,0):U())},[E,U]),je=function(he){return a?null:he},K=function(he){return M?null:je(he)},Oe=function(he){return j?null:je(he)},Pe=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,at=he===void 0?"ref":he,He=q.role,Et=q.onKeyDown,we=q.onFocus,qt=q.onBlur,mn=q.onClick,Sc=q.onDragEnter,KO=q.onDragOver,XO=q.onDragLeave,CT=q.onDrop,bT=RCt(q,N22);return Pt(Pt(tIn({onKeyDown:K(kc(Et,qe)),onFocus:K(kc(we,se)),onBlur:K(kc(qt,ne)),onClick:je(kc(mn,_e)),onDragEnter:Oe(kc(Sc,be)),onDragOver:Oe(kc(KO,le)),onDragLeave:Oe(kc(XO,te)),onDrop:Oe(kc(CT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},at,z),!a&&!M?{tabIndex:0}:{}),bT)}},[z,qe,se,ne,_e,be,le,te,We,M,j,a]),ze=o.useCallback(function(q){q.stopPropagation()},[]),Zt=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,at=he===void 0?"ref":he,He=q.onChange,Et=q.onClick,we=RCt(q,T22),qt=tIn({accept:I,multiple:l,type:"file",style:{display:"none"},onChange:je(kc(He,We)),onClick:je(kc(Et,ze)),tabIndex:-1},at,T);return Pt(Pt({},qt),we)}},[T,n,l,We,a]);return Pt(Pt({},X),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Zt,rootRef:z,inputRef:T,open:je(U)})}function q22(e,t){switch(t.type){case"focus":return Pt(Pt({},e),{},{isFocused:!0});case"blur":return Pt(Pt({},e),{},{isFocused:!1});case"openDialog":return Pt(Pt({},rIn),{},{isFileDialogActive:!0});case"closeDialog":return Pt(Pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Pt(Pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Pt(Pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Pt({},rIn);default:return e}}function uGn(){}const aIn=({fileRejections:e})=>e.length?d.jsx(O.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>Q(t.palette.error.main,.08),borderColor:t=>Q(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=KBn(t);return d.jsxs(O.Box,{sx:{my:1},children:[d.jsxs(O.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?MCt(r):""]}),n.map(u=>d.jsxs(O.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,eu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx(O.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:d.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},cGn=Bt("div")(({theme:e})=>({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 ${Q(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),lGn=({header:e,description:t,sx:n,...a})=>d.jsxs(O.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[d.jsx(PWn,{sx:{width:220}}),d.jsxs("div",{children:[d.jsx(O.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),d.jsx(O.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||d.jsxs(d.Fragment,{children:["Solte os arquivos aqui ou clique",d.jsx(O.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),fGn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,preview:y="image",onRemoveAll:w,onUpload:E,...M})=>{const{getRootProps:j,getInputProps:k,isDragActive:D,isDragReject:S,fileRejections:I}=VCt({multiple:n,disabled:t,...M}),A=!!u&&!n,F=A||b,W=l&&n&&l.length>0,z=typeof u=="string",T=S||!!a;return y==="file"?d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(cGn,{...j(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"}},children:[d.jsx("input",{...k()}),d.jsx(lGn,{sx:{...A&&{display:"none"}}}),A&&d.jsxs(O.Stack,{component:nn.div,...zT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:H=>`solid 1px ${H.palette.divider}`,...m},children:[d.jsx(XBn,{file:u}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:z?u:u.name}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:z?"":MCt(u.size)})]}),c&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]})]}),r&&r,d.jsx(aIn,{fileRejections:I}),W&&d.jsxs(d.Fragment,{children:[d.jsx(O.Box,{sx:{my:3},children:d.jsx(AUn,{files:l,thumbnail:f,onRemove:s})}),d.jsxs(O.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[w&&d.jsx(O.Button,{color:"inherit",variant:"outlined",size:"small",onClick:w,children:"Remover todos"}),E&&d.jsx(O.Button,{size:"small",variant:"contained",onClick:E,children:"Enviar arquivos"})]})]})]}):d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(cGn,{...j(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[d.jsx("input",{...k(),id:e,tabIndex:p}),h?d.jsx(O.Stack,{sx:{...F&&{opacity:0}},children:h}):d.jsx(lGn,{sx:{...F&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),F&&d.jsx(eu2,{file:u||b||""})]}),r&&d.jsx(O.FormHelperText,{error:!!a,sx:H=>({mx:"14px",color:t?H.palette.grey[500]:void 0}),children:r}),d.jsx(aIn,{fileRejections:I}),F&&c&&d.jsx(O.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:H=>Q(H.palette.common.white,.8),bgcolor:H=>Q(H.palette.grey[900],.72),"&:hover":{bgcolor:H=>Q(H.palette.grey[900],.48)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:18})}),W&&d.jsx(d.Fragment,{children:d.jsx(O.Box,{sx:{my:3},children:d.jsx(AUn,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_})})})]})},tu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},nu2=Bt("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${Q(e.palette.grey[500],.32)}`})),ru2=Bt("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),sGn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:g,isDragReject:_,fileRejections:m}=VCt({multiple:!1,disabled:a,...l}),v=!!t||n,C=_||!!e;return d.jsxs(d.Fragment,{children:[d.jsxs(nu2,{...f(),sx:{...g&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[d.jsx("input",{...s(),tabIndex:c}),v&&d.jsx(tu2,{file:t||n||""}),d.jsxs(ru2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>Q(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[d.jsx(Ce,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),d.jsx(O.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,d.jsx(aIn,{fileRejections:m})]})},au2=Bt("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:Q(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),iu2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=VCt({disabled:n,...u}),g=s||t;return d.jsxs(au2,{...c(),sx:{...f&&{opacity:.72},...g&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[d.jsx("input",{...l(),tabIndex:r}),e||d.jsx(Ce,{icon:"CLOUD_UPLOAD",width:28})]})},dGn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=kht(),[s,g]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&g(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>g(void 0)}},gGn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[g,_]=o.useState(.5);return d.jsx(SUn,{open:t,onClose:n,dialogTitle:a,actions:d.jsxs(d.Fragment,{children:[d.jsx(O.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),d.jsx(O.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:d.jsxs(O.Stack,{gap:2,children:[d.jsx(iUn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:g,onZoomChange:_}),d.jsxs(O.Stack,{gap:1.5,children:[d.jsxs(O.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[d.jsx(O.Typography,{variant:"body1",children:"Zoom"}),d.jsx(O.Slider,{value:g,onChange:(m,v)=>_(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},ou2=O.styled(O.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),uu2=O.styled(O.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:O.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),cu2=O.styled(O.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),_Gn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:w,closePreviewImage:E}=dGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(ou2,{children:[c&&d.jsx(gCt,{}),d.jsx(fGn,{...s,id:g,file:l,onDrop:M=>{if(M.length>0){_(!0);const j=new FileReader;j.addEventListener("load",()=>{var D;const k=((D=j.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),j.readAsDataURL(M[0])}},image:u,tabIndex:f}),(l||u)&&d.jsxs(uu2,{className:"actions",children:[d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),d.jsx(gGn,{id:g,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),d.jsx(O.Dialog,{open:!!w,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:w&&d.jsx("img",{src:w,alt:"Preview"})})]})},lu2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),mGn=({children:e,...t})=>d.jsx(lu2,{borderRadius:1,gap:3,padding:3,...t,children:e}),fu2=O.styled(O.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),su2=O.styled(O.Button)(()=>({fontWeight:"fontWeightSemiBold"})),du2=O.styled(Ce)(({theme:e})=>({color:e.palette.primary.main})),gu2=({selectedTitle:e,onSelect:t,options:n})=>{const a=RSn();return d.jsxs(d.Fragment,{children:[d.jsx(su2,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:d.jsx(du2,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:d.jsx(fu2,{component:"span",children:e.label})}),d.jsx(kUn,{open:a.open,onClose:a.onClose,children:n.map(r=>d.jsx(O.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},_u2=O.styled(O.Stack)({display:"grid",gridTemplateColumns:"auto auto",alignItems:"center"}),mu2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[600]})),vu2=O.styled(O.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),hu2=({data:e,...t})=>e.length===0?null:d.jsx(_u2,{gap:1,...t,children:e.map(n=>[d.jsx(mu2,{variant:"body2",children:n.label},`label:${n.id}`),d.jsx(vu2,{variant:"body2",children:n.value},`value:${n.id}`)])}),Cu2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),bu2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),yu2=O.styled(O.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),pu2=O.styled(O.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),Ou2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),ju2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),wu2=O.styled(O.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),Mu2=O.styled(Zce)(()=>({height:1,"& .simplebar-content":{height:1}})),Lu2=O.styled(O.Stack)(()=>({position:"fixed",width:"202px"})),Pu2=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",children:[d.jsx(Cu2,{children:d.jsx(Mu2,{children:d.jsxs(Lu2,{children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>d.jsxs(O.Stack,{children:[d.jsxs(wu2,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"start",behavior:"smooth"})},children:[u.title,u.isRequired&&d.jsx("span",{children:"*"})]}),c<t.length-1&&d.jsx(O.Divider,{})]},c))]})})}),d.jsxs(O.Stack,{width:"100%",alignItems:"center",mb:8,children:[d.jsx(bu2,{children:d.jsxs(yu2,{children:[d.jsxs(O.Stack,{flexDirection:"row",gap:2,alignItems:"center",children:[d.jsx(O.IconButton,{color:"primary",onClick:()=>r(),children:d.jsx(Ce,{icon:"CHEVRON_LEFT"})}),d.jsx(O.Typography,{variant:"h4",children:e}),n]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[d.jsx(ySn,{disabled:!0}),a]})]})}),d.jsx(pu2,{children:t.map(u=>d.jsxs(O.Stack,{paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[d.jsx(Ou2,{ref:u.ref,children:u.title}),d.jsx(ju2,{children:u.subTitle}),d.jsx(mGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),Eu2=O.styled(O.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),ku2=O.styled(O.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),Su2=O.styled(O.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),Du2=O.styled(O.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),vGn=O.styled(O.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Bu2=O.styled(O.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Iu2=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:l,productImage:f,child:s,previewLinkImage:g,hasPreviewLink:_})=>d.jsx(Eu2,{children:d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),d.jsxs(ku2,{children:[d.jsxs(O.Stack,{direction:"row",pb:3,gap:.5,children:[d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"error.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"warning.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"success.main"})})]}),d.jsxs(O.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[d.jsxs(O.Stack,{gap:1,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&d.jsx(Su2,{children:d.jsx("img",{alt:"Logo",src:t})}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),d.jsx(Ce,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),d.jsx(YO,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(YO,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:5,children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),c&&d.jsx(O.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((m,v)=>d.jsxs(d.Fragment,{children:[d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:m}),v<c.length-1&&d.jsx(O.Box,{width:4,height:16,children:d.jsx(Ce,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),l&&d.jsx(O.Stack,{pt:2,children:l.map((m,v)=>d.jsxs(O.Stack,{gap:1,children:[d.jsx(O.Typography,{variant:"subtitle1",color:"#4E5BEC",children:m.title}),d.jsx(YO,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:m.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},v))}),s]}),f&&d.jsx(Du2,{children:d.jsx("img",{alt:"ProductImage",src:f})})]})]}),_&&d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),d.jsxs(vGn,{children:[g&&d.jsx(Bu2,{children:d.jsx("img",{alt:"PreviewLinkImage",src:g,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),d.jsxs(O.Stack,{gap:.2,p:2,width:"100%",children:[d.jsx(O.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),d.jsx(vGn,{children:d.jsxs(O.Stack,{direction:"row",gap:1,alignItems:"center",children:[d.jsx(O.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:d.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),d.jsxs(O.Stack,{padding:1,gap:.2,width:"80%",children:[d.jsx(YO,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(YO,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(YO,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Wu2=O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center",overflow:"hidden"})),$u2=O.styled(O.Stack)(()=>({backgroundColor:"#F5F5F5",padding:8,width:"100%",justifyContent:"space-between",alignItems:"center",gap:12,"& .MuiInputBase-root":{backgroundColor:"#fff"}}));O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center"}));const xu2=O.styled(O.Collapse)(()=>({width:"100%",padding:"12px 16px"})),zu2=({description:e,name:t,children:n,header:a,onDelete:r})=>{const[u,c]=kht(!0);return d.jsxs(Wu2,{children:[d.jsxs($u2,{direction:"row",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:1.5,flex:1,children:[d.jsx(O.IconButton,{edge:"end",onClick:c,children:d.jsx(Ce,{icon:u?"CHEVRON_UP":"CHEVRON_RIGHT"})}),d.jsx(O.Typography,{variant:"overline",color:"text.primary",children:t}),d.jsx(O.Typography,{variant:"overline",color:"text.secondary",children:e}),d.jsx(O.Stack,{flex:1,children:a})]}),d.jsx(O.IconButton,{color:"error",onClick:r,children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]}),d.jsx(xu2,{in:u,timeout:"auto",unmountOnExit:!0,children:n})]})},Hu2=O.styled(O.ToggleButtonGroup)(({theme:e})=>({button:{textTransform:"none"},"& .MuiToggleButton-primary:hover":{backgroundColor:`${e.palette.primary.dark}`,color:e.palette.primary.contrastText},"& button:not(.Mui-selected):hover":{backgroundColor:e.palette.primary.lighter,color:e.palette.primary.main},"& .Mui-selected":{backgroundColor:`${e.palette.primary.main} !important`,color:`${e.palette.primary.contrastText} !important`}})),Au2=e=>d.jsx(Hu2,{...e}),Ru2=O.styled(O.Card,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:t})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:t?e.palette.primary.main:e.palette.grey[300],color:e.palette.primary.main,backgroundColor:t?O.alpha(e.palette.primary.main,.04):"white","&:hover":{borderColor:e.palette.primary.main}})),hGn=({title:e,action:t,loading:n,items:a,values:r,onChange:u})=>{const[c,l]=o.useState(),f=h=>r.includes(h),s=c?a.filter(h=>h.title.toLowerCase().includes(c.toLowerCase())):a,g=h=>{const b=f(h.value);let p;b?p=r.filter(y=>y!==h.value):p=[...r,h.value],u(p)},_=()=>{r.length===a.length?u([]):u(a.map(h=>h.value))},m=new Intl.PluralRules("pt-BR"),v=new Map([["one","selecionado"],["other","selecionados"]]),C=h=>{const b=m.select(h),p=v.get(b);return`${h} ${p}`};return d.jsxs(O.Stack,{gap:1.5,height:450,children:[d.jsxs(O.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e}),d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:r.length===0?"nenhum selecionado":C(r.length)})]}),d.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1.5,children:[d.jsx(xCt,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:h=>l(h),onKeyDown:h=>{h.key==="Enter"&&h.preventDefault()}}),t?d.jsx(d.Fragment,{children:t}):d.jsx(O.Button,{onClick:_,size:"small",children:d.jsx(O.Typography,{variant:"overline",children:"TODOS"})})]}),d.jsx(Zce,{children:d.jsx(O.Stack,{flex:1,mb:2,children:d.jsx(WCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",mt:3,children:d.jsx(O.CircularProgress,{})}),isEmpty:a.length===0,empty:d.jsx(tmt,{sx:{svg:{height:140}},text:c?`Não foi possivel encontrar o item "${c}"`:"Nenhum item disponível"}),children:d.jsx(O.Grid,{container:!0,spacing:1.5,children:s.map(h=>d.jsx(O.Grid,{item:!0,xs:4,children:d.jsx(Ru2,{active:f(h.value),onClick:()=>g(h),children:d.jsxs(O.Stack,{padding:1.5,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsx(O.Typography,{color:f(h.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:h.title}),f(h.value)&&d.jsx(Ce,{icon:"CHECK_CIRCLE",width:24})]}),h.options.map(b=>d.jsx(O.Typography,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${b.label}: ${b.value}`},b.label))]})})},h.title))})})})})]})},cn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>d.jsx(O.TextField,{...f,onChange:g=>{f.onChange(g),a&&a(g)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},Vu2=O.styled(O.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}}));O.styled(O.IconButton)(()=>({height:"38px",alignSelf:"center"}));const Fu2=O.styled(O.Typography)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),Nu2=O.styled(O.Alert)(({theme:e})=>({backgroundColor:`${O.alpha(e.palette.primary.main,.03)}`,border:`1px solid ${O.alpha(e.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:e.palette.primary.main}})),Tu2=()=>{const e=()=>{const t="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(t,"_blank")};return d.jsx(Nu2,{severity:"info",children:d.jsxs(O.Typography,{color:"grey",variant:"caption",children:["Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",d.jsx(Fu2,{variant:"caption",color:"primary",onClick:()=>e(),children:"acessando a documentação do Webhook"})]})})},Zu2=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],Uu2=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}],Gu2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Be.useFormContext(),{fields:r,append:u,remove:c}=Be.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return d.jsxs(d.Fragment,{children:[n&&d.jsx(Tu2,{}),t&&d.jsx(cn,{name:"name",label:"Nome do webhook"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(cn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),d.jsx(cn,{name:"filter",label:"Filtro"})]}),t&&e&&d.jsxs(d.Fragment,{children:[d.jsx(cn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(cn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),d.jsx(cn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(Vu2,{onClick:()=>navigator.clipboard.writeText(e.resource_id),children:d.jsx(Ce,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),d.jsx(cn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(FCt,{fullWidth:!0,options:Zu2,name:"content_type",label:"Tipo de conteúdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conteúdo é obrigatório"}}}),d.jsx(FCt,{fullWidth:!0,options:Uu2,name:"http_method",label:"Método HTTP",required:!0,rules:{required:{value:!0,message:"Campo Método HTTP é obrigatório"}}})]}),d.jsx(O.Typography,{variant:"overline",color:"grey",children:"Cabeçalho"}),r==null?void 0:r.map((f,s)=>d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(cn,{name:`headers.${s}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),d.jsx(cn,{name:`headers.${s}.value`,label:"Valor"}),d.jsx(O.IconButton,{color:"error",onClick:()=>c(s),children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),d.jsx(wRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),d.jsx(O.Divider,{})]})},FCt=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(hSn,{...c,...r,onChange:f=>{a&&a(f,c.value),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},CGn=({name:e,helperText:t,rules:n,onChange:a,error:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{name:l,onChange:f,value:s,ref:g},fieldState:{error:_}})=>d.jsx(UBn,{ref:g,...u,name:l,value:s,error:r||!!_,helperText:(_==null?void 0:_.message)||t,onChange:({target:{value:m}})=>{a&&a(m),f(m)}})})},Yu2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,g=`${e}.state`,_=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return d.jsxs(O.Stack,{gap:1.5,...t,children:[d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(CGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),d.jsxs(O.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[d.jsx(cn,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),d.jsx(cn,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(cn,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),d.jsx(cn,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),d.jsxs(O.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[d.jsx(FCt,{name:g,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),d.jsx(cn,{name:_,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},Ku2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:t,render:({field:u,fieldState:{error:c}})=>d.jsx(bSn,{...u,...a,onChange:l=>{u.onChange(l)},error:!!c,helperText:(c==null?void 0:c.message)||n})})},Xu2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>d.jsxs("div",{children:[d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&d.jsx(O.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Qu2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Be.useFormContext(),g=(_,m)=>_.includes(m)?_.filter(v=>v!==m):[..._,m];return d.jsx(Be.Controller,{name:t,control:s,rules:n,render:({field:{value:_=[],...m},fieldState:{error:v}})=>d.jsxs(O.FormControl,{component:"fieldset",children:[a&&d.jsx(O.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),d.jsx(O.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{checked:_.includes(C.value),onChange:()=>m.onChange(g(_,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&d.jsx(O.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},Ju2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Be.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},g=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),w=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&w!==null&&w.focus(),v(m)};D_t("paste",s,u);const _=t.some(m=>f[m]);return d.jsxs(O.Stack,{children:[d.jsx(O.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>d.jsx(Be.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>d.jsx(O.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{g(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),_&&d.jsx(O.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},qu2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>d.jsx(RNn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},ec2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(jT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},tc2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:g},fieldState:{error:_}})=>d.jsx(jT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>g({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!_,helperText:(_==null?void 0:_.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},nc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(jT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},rc2=({id:e,children:t,onSubmit:n,methods:a,...r})=>d.jsx(Be.FormProvider,{...a,children:d.jsx(O.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),ac2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>d.jsx(FBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},ic2=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>d.jsx(O.Autocomplete,{...l,onChange:(s,g)=>{r&&r(g),l.onChange(g)},renderInput:s=>d.jsx(O.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},oc2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(ECt,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},uc2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:g}=Be.useFormContext(),_=g(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=ICt(_,a,c,r,u);return d.jsx(cn,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:d.jsx(Ce,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const w=ICt(y,a,c,r,u);return!w.hasNumberChar||!w.hasSpecialCharacter||!w.hasUpperCaseChar||!w.isLengthValid?"Senha inválida":f&&f.fieldPassword&&g(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},cc2=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:g,disabled:_,...m})=>{const{control:v}=Be.useFormContext(),C=a?`${e}-${a}`:"";return d.jsx(Be.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>d.jsxs(O.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&d.jsx(O.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:g,children:a}),d.jsx(O.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>d.jsx(O.FormControlLabel,{value:p.value,control:d.jsx(O.Radio,{inputProps:{tabIndex:s},disabled:_,checked:p.value===h.value,icon:p.icon,checkedIcon:p.icon}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${O.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:O.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&d.jsx(O.FormHelperText,{error:!!b,sx:p=>({color:_?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},lc2=({name:e,helperText:t,onChange:n,tabIndex:a,size:r,label:u,...c})=>{const{control:l}=Be.useFormContext(),f=s=>d.jsx(O.Switch,{...s,checked:s.value,onChange:(g,_)=>{s.onChange(g),n&&n(g,_)},inputProps:{tabIndex:a},size:r});return d.jsx(Be.Controller,{name:e,control:l,render:({field:s,fieldState:{error:g}})=>d.jsxs("div",{children:[u?d.jsx(O.FormControlLabel,{label:u,control:f(s),...c}):f(s),(!!g||t)&&d.jsx(O.FormHelperText,{error:!!g,sx:_=>({mx:"14px",color:c.disabled?_.palette.grey[500]:void 0}),children:g?g==null?void 0:g.message:t})]})})},fc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(jT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},sc2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:w}=dGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&d.jsx(cu2,{}),d.jsx(sGn,{...s,id:g,file:l,onDrop:E=>{if(E.length>0){_(!0);const M=new FileReader;M.addEventListener("load",()=>{var k;const j=((k=M.result)==null?void 0:k.toString())||"";t(j),e(void 0)}),M.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),d.jsx(gGn,{id:g,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),d.jsx(O.Dialog,{open:!!y,onClose:w,scroll:"body",PaperProps:{sx:{p:2}},children:y&&d.jsx("img",{src:y,alt:"Preview"})})]})};function bGn(e,t){const{watch:n,setValue:a}=Be.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const dc2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=bGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(sc2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},gc2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=bGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(_Gn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},yGn=O.styled(O.Button)(({theme:e})=>({borderColor:e.palette.grey[300]})),pGn=O.styled(O.Box)(({theme:e})=>({border:"1.5px solid",borderColor:e.palette.grey[300],height:450,width:"40%",borderRadius:8})),_c2=({selectedItems:e,items:t,loading:n,searchText:a,onAdd:r,onRemove:u,search:c,itemsTitle:l,selectedItemsTitle:f,additionalContent:s,enableSearchInSelectedItems:g,onSearch:_})=>{const[m,v]=o.useState(""),C=O.debounce(_,400),h=t.filter(W=>!e.some(z=>z.id===W.id)),b=e.filter(W=>{var z;return(z=W.name)==null?void 0:z.toLowerCase().includes(m.toLowerCase())}),p=g?b:t.filter(W=>e.some(z=>z.id===W.id)),[y,w]=o.useState([]),[E,M]=o.useState([]),j=()=>{r(y),w([])},k=()=>{u(E),M([])},D=W=>{M(W?p:[])},S=W=>{w(W?h:[])},I=(W,z)=>{M(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},A=(W,z)=>{w(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},F=W=>{W.key==="Enter"&&W.preventDefault()};return d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:3,children:[d.jsx(pGn,{display:"flex",flex:1,children:d.jsxs(O.Stack,{flex:1,children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:y.length>0&&y.length!==h.length,checked:y.length>0&&y.length===h.length,onChange:W=>S(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${l} cadastrados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${y.length}/${h.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,flex:1,children:[d.jsxs(O.Stack,{direction:"row",gap:1,children:[d.jsx(xCt,{iconPosition:"start",placeholder:"Buscar",onKeyDown:F,size:"small",fullWidth:!0,trigger:"change",onSearch:W=>C(W)}),s]}),d.jsx(WCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:h.length===0,empty:d.jsx(tmt,{text:c?`Nenhum ${a} encontrado`:`Nenhum ${a} disponível`,sx:{svg:{height:140}}}),children:d.jsx(Zce,{sx:{maxHeight:280},children:h.map(W=>d.jsxs(O.Stack,{gap:1,marginTop:"8px",children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:y.includes(W),onChange:z=>A(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})}),d.jsxs(O.Stack,{gap:3,children:[d.jsx(yGn,{variant:"outlined",onClick:j,children:d.jsx(Ce,{icon:"ARROW_RIGHT_SIMPLE"})}),d.jsx(yGn,{variant:"outlined",onClick:k,children:d.jsx(Ce,{icon:"ARROW_LEFT_SIMPLE"})})]}),d.jsx(pGn,{display:"flex",flex:1,children:d.jsxs(O.Stack,{flex:1,children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:E.length>0&&E.length!==p.length,checked:E.length>0&&E.length===p.length,onChange:W=>D(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${f} selecionados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${E.length}/${p.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,gap:1,children:[g&&d.jsx(xCt,{iconPosition:"start",placeholder:"Buscar",size:"small",fullWidth:!0,trigger:"change",onSearch:W=>v(W??""),onKeyDown:F}),d.jsx(WCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:p.length===0,empty:d.jsx(tmt,{text:m?`Nenhum ${a} encontrado`:`Nenhum ${a} selecionado`,sx:{svg:{height:140},marginTop:"56px",backgroundColor:"transparent"}}),children:d.jsx(Zce,{sx:{maxHeight:280},children:p.map(W=>d.jsxs(O.Stack,{gap:1,children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:E.includes(W),onChange:z=>I(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})})]})})},mc2=({name:e,rules:t,...n})=>{const{control:a}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:a,rules:t,render:({field:r})=>d.jsx(hGn,{...r,...n})})},vc2=Object.freeze(Object.defineProperty({__proto__:null,default:ntr},Symbol.toStringTag,{value:"Module"}));R.ActionButton=wRn,R.Address=Yu2,R.Autocomplete=hSn,R.AutocompleteDetailed=bSn,R.AutocompleteDetailedField=Ku2,R.AutocompleteField=FCt,R.BuilderLayout=XDo,R.BuilderSidebar=LHo,R.Carousel=nko,R.CarouselArrowIndex=bko,R.CarouselArrows=uko,R.CarouselDots=oko,R.Checkbox=Xu2,R.Codes=Ju2,R.ColorPickerField=qu2,R.ColorPickerInput=RNn,R.Common=Ar2,R.CommonSSR=Vr2,R.Confirm=Fr2,R.CustomAvatar=CSn,R.CustomAvatarGroup=zRn,R.DataGrid=Ur2,R.DatePicker=ec2,R.DateRangePicker=tc2,R.DateTimePicker=nc2,R.Delayed=Gr2,R.DialogAnimate=Etr,R.Drawer=a12,R.EmptyContent=rAn,R.EmptyView=tmt,R.Error=o12,R.ExpandableGroup=zu2,R.FabButtonAnimate=uzn,R.Field=cn,R.FixedProgressBar=gCt,R.Form=rc2,R.FrameSkeleton=Pu2,R.HelpButton=ySn,R.Icon=Ce,R.IconButtonAnimate=czn,R.Iconify=LZn,R.IllustrationEmptyContent=EWn,R.ImageCrop=iUn,R.Incrementer=FBn,R.IncrementerField=ac2,R.Label=bUn,R.Lightbox=pDo,R.LoadingScreen=Wi2,R.MaskedInput=UBn,R.MaskedInputField=CGn,R.MaterialDesignContent=Hyt,R.MenuPopover=kUn,R.Modal=SUn,R.ModalActions=to2,R.MotionContainer=Ftr,R.MotionLazyContainer=kyt,R.MotionViewport=Vtr,R.MultiCheckbox=Qu2,R.MultipleChipField=ic2,R.NoData=kWn,R.NumberInput=ECt,R.NumberInputField=oc2,R.PasswordField=uc2,R.PasswordRules=co2,R.PopoverSelect=gu2,R.Portal=DUn,R.RadioGroupField=cc2,R.Result=WCt,R.SavedChanges=So2,R.Scrollbar=Zce,R.SearchInput=xCt,R.SelectableCards=hGn,R.SelectableCardsField=mc2,R.SeoPreview=Iu2,R.SnackbarContent=zyt,R.SnackbarProvider=$zn,R.SplashScreen=Do2,R.Steps=Wo2,R.StyledTab=$o2,R.StyledTabs=xo2,R.Summary=hu2,R.SwapList=_c2,R.Switch=lc2,R.TRANSITION=SWn,R.TabPanel=zo2,R.TableEmptyRows=Lko,R.TableHeadCustom=Eko,R.TableNoData=wko,R.TablePaginationCustom=Sko,R.TableSelectedAction=kko,R.TableSkeleton=Mko,R.TextAnimate=ktr,R.TextMaxLine=YO,R.ThemeProvider=HTn,R.TimePicker=fc2,R.ToggleButtonGroup=Au2,R.Transition=Ivt,R.Upload=fGn,R.UploadAvatar=sGn,R.UploadAvatarWithCropField=dc2,R.UploadBox=iu2,R.UploadIllustration=PWn,R.UploadWithCrop=_Gn,R.UploadWithCropField=gc2,R.Webhook=Gu2,R.WhiteBox=mGn,R.color=Cn2,R.compare=fHo,R.cssStyles=hko,R.emptyRows=yko,R.file=lo2,R.formatNumber=ci2,R.formatTime=po2,R.getComparator=pko,R.loadable=ko2,R.m=nn,R.mask=Po2,R.number=ni2,R.routes=jo2,R.sort=Lo2,R.useActiveElement=QDo,R.useApiMessage=bHo,R.useCarousel=rko,R.useCopyToClipboard=JDo,R.useDatagrid=qDo,R.useDeepCompareEffect=dHo,R.useEventCallback=VSn,R.useEventListener=D_t,R.useIsMounting=_Ho,R.useIsomorphicLayoutEffect=$Vn,R.useLightBox=wDo,R.useLocalStorage=OHo,R.useOffSetTop=CHo,R.useOnClickOutside=hHo,R.usePagination=vHo,R.usePopover=RSn,R.useResponsive=Eyt,R.useSnackbar=xzn,R.useTable=Oko,R.useTabs=mHo,R.useToggle=kht,R.uuidv4=Eo2,R.validators=io2,R.varBgColor=ZXn,R.varBgKenburns=UXn,R.varBgPan=GXn,R.varBounce=FXn,R.varContainer=avt,R.varFade=zT,R.varFlip=AXn,R.varHover=TXn,R.varPath=xXn,R.varRotate=NXn,R.varScale=VXn,R.varSlide=RXn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=zXn,R.varZoom=HXn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
35409
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aGn(e,t){if(e){if(typeof e=="string")return eIn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eIn(e,t)}}function eIn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function X22(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Q22(e){if(Array.isArray(e))return e}function iGn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iGn(Object(n),!0).forEach(function(a){tIn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iGn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function tIn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RCt(e,t){if(e==null)return{};var n=J22(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function J22(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var nIn=o.forwardRef(function(e,t){var n=e.children,a=RCt(e,V22),r=VCt(a),u=r.open,c=RCt(r,F22);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(Pt(Pt({},c),{},{open:u})))});nIn.displayName="Dropzone";var oGn={disabled:!1,getFilesFromEvent:f22,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};nIn.defaultProps=oGn,nIn.propTypes={children:P.func,accept:P.objectOf(P.arrayOf(P.string)),multiple:P.bool,preventDropOnDocument:P.bool,noClick:P.bool,noKeyboard:P.bool,noDrag:P.bool,noDragEventsBubbling:P.bool,minSize:P.number,maxSize:P.number,maxFiles:P.number,disabled:P.bool,getFilesFromEvent:P.func,onFileDialogCancel:P.func,onFileDialogOpen:P.func,useFsAccessApi:P.bool,autoFocus:P.bool,onDragEnter:P.func,onDragLeave:P.func,onDragOver:P.func,onDrop:P.func,onDropAccepted:P.func,onDropRejected:P.func,onError:P.func,validator:P.func};var rIn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function VCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Pt(Pt({},oGn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,g=t.onDragLeave,_=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,E=t.noClick,M=t.noKeyboard,j=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,I=o.useMemo(function(){return H22(n)},[n]),A=o.useMemo(function(){return z22(n)},[n]),F=o.useMemo(function(){return typeof b=="function"?b:uGn},[b]),W=o.useMemo(function(){return typeof h=="function"?h:uGn},[h]),z=o.useRef(null),T=o.useRef(null),H=o.useReducer(q22,rIn),Z=qBn(H,2),X=Z[0],J=Z[1],V=X.isFocused,N=X.isFileDialogActive,Y=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&x22()),ie=function(){!Y.current&&N&&setTimeout(function(){if(T.current){var he=T.current.files;he.length||(J({type:"closeDialog"}),W())}},300)};o.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[T,N,W,Y]);var ee=o.useRef([]),fe=function(he){z.current&&z.current.contains(he.target)||(he.preventDefault(),ee.current=[])};o.useEffect(function(){return w&&(document.addEventListener("dragover",tGn,!1),document.addEventListener("drop",fe,!1)),function(){w&&(document.removeEventListener("dragover",tGn),document.removeEventListener("drop",fe))}},[z,w]),o.useEffect(function(){return!a&&y&&z.current&&z.current.focus(),function(){}},[z,y,a]);var ce=o.useCallback(function(q){D?D(q):console.error(q)},[D]),be=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),ee.current=[].concat(Z22(ee.current),[q.target]),ACt(q)&&Promise.resolve(r(q)).then(function(he){if(!(HCt(q)&&!k)){var at=he.length,He=at>0&&B22({files:he,accept:I,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),Et=at>0&&!He;J({isDragAccept:He,isDragReject:Et,isDragActive:!0,type:"setDraggedFiles"}),s&&s(q)}}).catch(function(he){return ce(he)})},[r,s,ce,k,I,c,u,l,f,S]),le=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=ACt(q);if(he&&q.dataTransfer)try{q.dataTransfer.dropEffect="copy"}catch{}return he&&_&&_(q),!1},[_,k]),te=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q);var he=ee.current.filter(function(He){return z.current&&z.current.contains(He)}),at=he.indexOf(q.target);at!==-1&&he.splice(at,1),ee.current=he,!(he.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ACt(q)&&g&&g(q))},[z,g,k]),ge=o.useCallback(function(q,he){var at=[],He=[];q.forEach(function(Et){var we=qUn(Et,I),qt=qBn(we,2),mn=qt[0],Sc=qt[1],KO=eGn(Et,c,u),XO=qBn(KO,2),CT=XO[0],bT=XO[1],yT=S?S(Et):null;if(mn&&CT&&!yT)at.push(Et);else{var pT=[Sc,bT];yT&&(pT=pT.concat(yT)),He.push({file:Et,errors:pT.filter(function(OT){return OT})})}}),(!l&&at.length>1||l&&f>=1&&at.length>f)&&(at.forEach(function(Et){He.push({file:Et,errors:[D22]})}),at.splice(0)),J({acceptedFiles:at,fileRejections:He,type:"setFiles"}),m&&m(at,He,he),He.length>0&&C&&C(He,he),at.length>0&&v&&v(at,he)},[J,l,I,c,u,f,m,v,C,S]),We=o.useCallback(function(q){q.preventDefault(),q.persist(),Pe(q),ee.current=[],ACt(q)&&Promise.resolve(r(q)).then(function(he){HCt(q)&&!k||ge(he,q)}).catch(function(he){return ce(he)}),J({type:"reset"})},[r,ge,ce,k]),U=o.useCallback(function(){if(Y.current){J({type:"openDialog"}),F();var q={multiple:l,types:A};window.showOpenFilePicker(q).then(function(he){return r(he)}).then(function(he){ge(he,null),J({type:"closeDialog"})}).catch(function(he){A22(he)?(W(he),J({type:"closeDialog"})):R22(he)?(Y.current=!1,T.current?(T.current.value=null,T.current.click()):ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ce(he)});return}T.current&&(J({type:"openDialog"}),F(),T.current.value=null,T.current.click())},[J,F,W,p,ge,ce,A,l]),qe=o.useCallback(function(q){!z.current||!z.current.isEqualNode(q.target)||(q.key===" "||q.key==="Enter"||q.keyCode===32||q.keyCode===13)&&(q.preventDefault(),U())},[z,U]),se=o.useCallback(function(){J({type:"focus"})},[]),ne=o.useCallback(function(){J({type:"blur"})},[]),_e=o.useCallback(function(){E||($22()?setTimeout(U,0):U())},[E,U]),je=function(he){return a?null:he},K=function(he){return M?null:je(he)},Oe=function(he){return j?null:je(he)},Pe=function(he){k&&he.stopPropagation()},xe=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,at=he===void 0?"ref":he,He=q.role,Et=q.onKeyDown,we=q.onFocus,qt=q.onBlur,mn=q.onClick,Sc=q.onDragEnter,KO=q.onDragOver,XO=q.onDragLeave,CT=q.onDrop,bT=RCt(q,N22);return Pt(Pt(tIn({onKeyDown:K(kc(Et,qe)),onFocus:K(kc(we,se)),onBlur:K(kc(qt,ne)),onClick:je(kc(mn,_e)),onDragEnter:Oe(kc(Sc,be)),onDragOver:Oe(kc(KO,le)),onDragLeave:Oe(kc(XO,te)),onDrop:Oe(kc(CT,We)),role:typeof He=="string"&&He!==""?He:"presentation"},at,z),!a&&!M?{tabIndex:0}:{}),bT)}},[z,qe,se,ne,_e,be,le,te,We,M,j,a]),ze=o.useCallback(function(q){q.stopPropagation()},[]),Zt=o.useMemo(function(){return function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=q.refKey,at=he===void 0?"ref":he,He=q.onChange,Et=q.onClick,we=RCt(q,T22),qt=tIn({accept:I,multiple:l,type:"file",style:{display:"none"},onChange:je(kc(He,We)),onClick:je(kc(Et,ze)),tabIndex:-1},at,T);return Pt(Pt({},qt),we)}},[T,n,l,We,a]);return Pt(Pt({},X),{},{isFocused:V&&!a,getRootProps:xe,getInputProps:Zt,rootRef:z,inputRef:T,open:je(U)})}function q22(e,t){switch(t.type){case"focus":return Pt(Pt({},e),{},{isFocused:!0});case"blur":return Pt(Pt({},e),{},{isFocused:!1});case"openDialog":return Pt(Pt({},rIn),{},{isFileDialogActive:!0});case"closeDialog":return Pt(Pt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Pt(Pt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Pt(Pt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Pt({},rIn);default:return e}}function uGn(){}const aIn=({fileRejections:e})=>e.length?d.jsx(O.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>Q(t.palette.error.main,.08),borderColor:t=>Q(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=KBn(t);return d.jsxs(O.Box,{sx:{my:1},children:[d.jsxs(O.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?MCt(r):""]}),n.map(u=>d.jsxs(O.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,eu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx(O.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:d.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},cGn=Bt("div")(({theme:e})=>({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 ${Q(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),lGn=({header:e,description:t,sx:n,...a})=>d.jsxs(O.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[d.jsx(PWn,{sx:{width:220}}),d.jsxs("div",{children:[d.jsx(O.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),d.jsx(O.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||d.jsxs(d.Fragment,{children:["Solte os arquivos aqui ou clique",d.jsx(O.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),fGn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_,sx:m,dropZoneProps:v,placeholderProps:C,placeholderAlt:h,image:b,tabIndex:p,preview:y="image",onRemoveAll:w,onUpload:E,...M})=>{const{getRootProps:j,getInputProps:k,isDragActive:D,isDragReject:S,fileRejections:I}=VCt({multiple:n,disabled:t,...M}),A=!!u&&!n,F=A||b,W=l&&n&&l.length>0,z=typeof u=="string",T=S||!!a;return y==="file"?d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(cGn,{...j(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"}},children:[d.jsx("input",{...k()}),d.jsx(lGn,{sx:{...A&&{display:"none"}}}),A&&d.jsxs(O.Stack,{component:nn.div,...zT().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:H=>`solid 1px ${H.palette.divider}`,...m},children:[d.jsx(XBn,{file:u}),d.jsxs(O.Stack,{flexGrow:1,sx:{minWidth:0},children:[d.jsx(O.Typography,{variant:"subtitle2",noWrap:!0,children:z?u:u.name}),d.jsx(O.Typography,{variant:"caption",sx:{color:"text.secondary"},children:z?"":MCt(u.size)})]}),c&&d.jsx(O.IconButton,{edge:"end",size:"small",onClick:c,children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON"})})]})]}),r&&r,d.jsx(aIn,{fileRejections:I}),W&&d.jsxs(d.Fragment,{children:[d.jsx(O.Box,{sx:{my:3},children:d.jsx(AUn,{files:l,thumbnail:f,onRemove:s})}),d.jsxs(O.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[w&&d.jsx(O.Button,{color:"inherit",variant:"outlined",size:"small",onClick:w,children:"Remover todos"}),E&&d.jsx(O.Button,{size:"small",variant:"contained",onClick:E,children:"Enviar arquivos"})]})]})]}):d.jsxs(O.Box,{sx:{width:1,position:"relative",...m},children:[d.jsxs(cGn,{...j(),sx:{...D&&{opacity:.72},...T&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...v},children:[d.jsx("input",{...k(),id:e,tabIndex:p}),h?d.jsx(O.Stack,{sx:{...F&&{opacity:0}},children:h}):d.jsx(lGn,{sx:{...F&&{opacity:0}},header:C==null?void 0:C.title,description:C==null?void 0:C.description}),F&&d.jsx(eu2,{file:u||b||""})]}),r&&d.jsx(O.FormHelperText,{error:!!a,sx:H=>({mx:"14px",color:t?H.palette.grey[500]:void 0}),children:r}),d.jsx(aIn,{fileRejections:I}),F&&c&&d.jsx(O.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:H=>Q(H.palette.common.white,.8),bgcolor:H=>Q(H.palette.grey[900],.72),"&:hover":{bgcolor:H=>Q(H.palette.grey[900],.48)}},children:d.jsx(Ce,{icon:"CLOSE_MARK_BUTTON",width:18})}),W&&d.jsx(d.Fragment,{children:d.jsx(O.Box,{sx:{my:3},children:d.jsx(AUn,{files:l,thumbnail:f,onRemove:s,onHandleMainImage:g,mainUrl:_})})})]})},tu2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return d.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},nu2=Bt("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${Q(e.palette.grey[500],.32)}`})),ru2=Bt("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),sGn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:g,isDragReject:_,fileRejections:m}=VCt({multiple:!1,disabled:a,...l}),v=!!t||n,C=_||!!e;return d.jsxs(d.Fragment,{children:[d.jsxs(nu2,{...f(),sx:{...g&&{opacity:.72},...C&&{borderColor:"error.light",...v&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...v&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[d.jsx("input",{...s(),tabIndex:c}),v&&d.jsx(tu2,{file:t||n||""}),d.jsxs(ru2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...v&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>Q(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[d.jsx(Ce,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),d.jsx(O.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,d.jsx(aIn,{fileRejections:m})]})},au2=Bt("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:Q(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),iu2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=VCt({disabled:n,...u}),g=s||t;return d.jsxs(au2,{...c(),sx:{...f&&{opacity:.72},...g&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[d.jsx("input",{...l(),tabIndex:r}),e||d.jsx(Ce,{icon:"CLOUD_UPLOAD",width:28})]})},dGn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,l,f]=kht(),[s,g]=o.useState();return{id:a,setCropModalOpen:f,handleRemove:()=>{e(void 0),t(void 0),f(!1)},toggleCropModalOpen:l,cropModalOpen:c,cancelChanges:()=>{n&&n(),f(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(b=>{if(!b)return;const p=new File([b],"imagem");e(p),l()},"image/png",1)},previewImage:()=>{r!==void 0&&g(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:s,closePreviewImage:()=>g(void 0)}},gGn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:l,aspectRatio:f,onInitialized:s})=>{const[g,_]=o.useState(.5);return d.jsx(SUn,{open:t,onClose:n,dialogTitle:a,actions:d.jsxs(d.Fragment,{children:[d.jsx(O.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),d.jsx(O.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:d.jsxs(O.Stack,{gap:2,children:[d.jsx(iUn,{imageSrc:l,aspectRatio:f,onInitialized:s,zoom:g,onZoomChange:_}),d.jsxs(O.Stack,{gap:1.5,children:[d.jsxs(O.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[d.jsx(O.Typography,{variant:"body1",children:"Zoom"}),d.jsx(O.Slider,{value:g,onChange:(m,v)=>_(Array.isArray(v)?v[0]:v),min:.1,max:2,size:"medium",step:.0125})]}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),d.jsx(O.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},ou2=O.styled(O.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),uu2=O.styled(O.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:O.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),cu2=O.styled(O.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),_Gn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,toggleCropModalOpen:v,cropModalOpen:C,cancelChanges:h,saveChanges:b,previewImage:p,setCropper:y,preview:w,closePreviewImage:E}=dGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(ou2,{children:[c&&d.jsx(gCt,{}),d.jsx(fGn,{...s,id:g,file:l,onDrop:M=>{if(M.length>0){_(!0);const j=new FileReader;j.addEventListener("load",()=>{var D;const k=((D=j.result)==null?void 0:D.toString())||"";t(k),e(void 0)}),j.readAsDataURL(M[0])}},image:u,tabIndex:f}),(l||u)&&d.jsxs(uu2,{className:"actions",children:[d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:m,children:"Remover"}),d.jsx(O.Button,{color:"inherit",startIcon:d.jsx(Ce,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:v,children:"Editar"})]})]}),d.jsx(gGn,{id:g,open:C,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:b,onPreview:p,onInitialized:y}),d.jsx(O.Dialog,{open:!!w,onClose:E,scroll:"body",PaperProps:{sx:{p:2}},children:w&&d.jsx("img",{src:w,alt:"Preview"})})]})},lu2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),mGn=({children:e,...t})=>d.jsx(lu2,{borderRadius:1,gap:3,padding:3,...t,children:e}),fu2=O.styled(O.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),su2=O.styled(O.Button)(()=>({fontWeight:"fontWeightSemiBold"})),du2=O.styled(Ce)(({theme:e})=>({color:e.palette.primary.main})),gu2=({selectedTitle:e,onSelect:t,options:n})=>{const a=RSn();return d.jsxs(d.Fragment,{children:[d.jsx(su2,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:d.jsx(du2,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:d.jsx(fu2,{component:"span",children:e.label})}),d.jsx(kUn,{open:a.open,onClose:a.onClose,children:n.map(r=>d.jsx(O.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},_u2=O.styled(O.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),mu2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[600],display:"flex",gap:"8px",alignItems:"center"})),vu2=O.styled(O.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),hu2=({data:e,...t})=>e.length===0?null:d.jsx(_u2,{gap:1,...t,children:e.map(n=>[d.jsx(mu2,{variant:"body2",children:n.label},`label:${n.id}`),d.jsx(vu2,{variant:"body2",children:n.value},`value:${n.id}`)])}),Cu2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),bu2=O.styled(O.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),yu2=O.styled(O.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),pu2=O.styled(O.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),Ou2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),ju2=O.styled(O.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),wu2=O.styled(O.Button)(({theme:e})=>({paddingTop:6,paddingBottom:6,paddingLeft:0,margin:0,marginBottom:4,marginTop:4,width:"100%",display:"block",cursor:"pointer",color:e.palette.grey[600],textAlign:"left",fontWeight:400,fontSize:14,"> span":{color:e.palette.error.main}})),Mu2=O.styled(Zce)(()=>({height:1,"& .simplebar-content":{height:1}})),Lu2=O.styled(O.Stack)(()=>({position:"fixed",width:"202px"})),Pu2=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",children:[d.jsx(Cu2,{children:d.jsx(Mu2,{children:d.jsxs(Lu2,{children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>d.jsxs(O.Stack,{children:[d.jsxs(wu2,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"start",behavior:"smooth"})},children:[u.title,u.isRequired&&d.jsx("span",{children:"*"})]}),c<t.length-1&&d.jsx(O.Divider,{})]},c))]})})}),d.jsxs(O.Stack,{width:"100%",alignItems:"center",mb:8,children:[d.jsx(bu2,{children:d.jsxs(yu2,{children:[d.jsxs(O.Stack,{flexDirection:"row",gap:2,alignItems:"center",children:[d.jsx(O.IconButton,{color:"primary",onClick:()=>r(),children:d.jsx(Ce,{icon:"CHEVRON_LEFT"})}),d.jsx(O.Typography,{variant:"h4",children:e}),n]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[d.jsx(ySn,{disabled:!0}),a]})]})}),d.jsx(pu2,{children:t.map(u=>d.jsxs(O.Stack,{paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[d.jsx(Ou2,{ref:u.ref,children:u.title}),d.jsx(ju2,{children:u.subTitle}),d.jsx(mGn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),Eu2=O.styled(O.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),ku2=O.styled(O.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),Su2=O.styled(O.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),Du2=O.styled(O.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),vGn=O.styled(O.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Bu2=O.styled(O.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Iu2=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:l,productImage:f,child:s,previewLinkImage:g,hasPreviewLink:_})=>d.jsx(Eu2,{children:d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),d.jsxs(ku2,{children:[d.jsxs(O.Stack,{direction:"row",pb:3,gap:.5,children:[d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"error.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"warning.main"})}),d.jsx(O.Box,{height:0,width:10,children:d.jsx(Ce,{icon:"CIRCLE",width:30,color:"success.main"})})]}),d.jsxs(O.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[d.jsxs(O.Stack,{gap:1,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&d.jsx(Su2,{children:d.jsx("img",{alt:"Logo",src:t})}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),d.jsx(Ce,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),d.jsx(YO,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(YO,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:5,children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),c&&d.jsx(O.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((m,v)=>d.jsxs(d.Fragment,{children:[d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:m}),v<c.length-1&&d.jsx(O.Box,{width:4,height:16,children:d.jsx(Ce,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),l&&d.jsx(O.Stack,{pt:2,children:l.map((m,v)=>d.jsxs(O.Stack,{gap:1,children:[d.jsx(O.Typography,{variant:"subtitle1",color:"#4E5BEC",children:m.title}),d.jsx(YO,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:m.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},v))}),s]}),f&&d.jsx(Du2,{children:d.jsx("img",{alt:"ProductImage",src:f})})]})]}),_&&d.jsxs(O.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),d.jsxs(vGn,{children:[g&&d.jsx(Bu2,{children:d.jsx("img",{alt:"PreviewLinkImage",src:g,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),d.jsxs(O.Stack,{gap:.2,p:2,width:"100%",children:[d.jsx(O.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(O.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),d.jsx(vGn,{children:d.jsxs(O.Stack,{direction:"row",gap:1,alignItems:"center",children:[d.jsx(O.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:d.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),d.jsxs(O.Stack,{padding:1,gap:.2,width:"80%",children:[d.jsx(YO,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),d.jsx(YO,{variant:"caption",color:"grey.600",children:u??"A Páscoa chegou e a Sua Empresa está com ofertas chocantes em tecnologia! Descontos de até 50% em notebooks, smartphones, tablets e muito mais!"}),d.jsx(YO,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Wu2=O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center",overflow:"hidden"})),$u2=O.styled(O.Stack)(()=>({backgroundColor:"#F5F5F5",padding:8,width:"100%",justifyContent:"space-between",alignItems:"center",gap:12,"& .MuiInputBase-root":{backgroundColor:"#fff"}}));O.styled(O.Stack)(({theme:e})=>({border:`1px solid ${O.alpha(e.palette.grey[500],.32)}`,borderRadius:8,alignItems:"center"}));const xu2=O.styled(O.Collapse)(()=>({width:"100%",padding:"12px 16px"})),zu2=({description:e,name:t,children:n,header:a,onDelete:r})=>{const[u,c]=kht(!0);return d.jsxs(Wu2,{children:[d.jsxs($u2,{direction:"row",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:1.5,flex:1,children:[d.jsx(O.IconButton,{edge:"end",onClick:c,children:d.jsx(Ce,{icon:u?"CHEVRON_UP":"CHEVRON_RIGHT"})}),d.jsx(O.Typography,{variant:"overline",color:"text.primary",children:t}),d.jsx(O.Typography,{variant:"overline",color:"text.secondary",children:e}),d.jsx(O.Stack,{flex:1,children:a})]}),d.jsx(O.IconButton,{color:"error",onClick:r,children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]}),d.jsx(xu2,{in:u,timeout:"auto",unmountOnExit:!0,children:n})]})},Hu2=O.styled(O.ToggleButtonGroup)(({theme:e})=>({button:{textTransform:"none"},"& .MuiToggleButton-primary:hover":{backgroundColor:`${e.palette.primary.dark}`,color:e.palette.primary.contrastText},"& button:not(.Mui-selected):hover":{backgroundColor:e.palette.primary.lighter,color:e.palette.primary.main},"& .Mui-selected":{backgroundColor:`${e.palette.primary.main} !important`,color:`${e.palette.primary.contrastText} !important`}})),Au2=e=>d.jsx(Hu2,{...e}),Ru2=O.styled(O.Card,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:t})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:t?e.palette.primary.main:e.palette.grey[300],color:e.palette.primary.main,backgroundColor:t?O.alpha(e.palette.primary.main,.04):"white","&:hover":{borderColor:e.palette.primary.main}})),hGn=({title:e,action:t,loading:n,items:a,values:r,onChange:u})=>{const[c,l]=o.useState(),f=h=>r.includes(h),s=c?a.filter(h=>h.title.toLowerCase().includes(c.toLowerCase())):a,g=h=>{const b=f(h.value);let p;b?p=r.filter(y=>y!==h.value):p=[...r,h.value],u(p)},_=()=>{r.length===a.length?u([]):u(a.map(h=>h.value))},m=new Intl.PluralRules("pt-BR"),v=new Map([["one","selecionado"],["other","selecionados"]]),C=h=>{const b=m.select(h),p=v.get(b);return`${h} ${p}`};return d.jsxs(O.Stack,{gap:1.5,height:450,children:[d.jsxs(O.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:e}),d.jsx(O.Typography,{variant:"overline",color:"text.disabled",children:r.length===0?"nenhum selecionado":C(r.length)})]}),d.jsxs(O.Stack,{direction:"row",alignItems:"center",spacing:1.5,children:[d.jsx(xCt,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:h=>l(h),onKeyDown:h=>{h.key==="Enter"&&h.preventDefault()}}),t?d.jsx(d.Fragment,{children:t}):d.jsx(O.Button,{onClick:_,size:"small",children:d.jsx(O.Typography,{variant:"overline",children:"TODOS"})})]}),d.jsx(Zce,{children:d.jsx(O.Stack,{flex:1,mb:2,children:d.jsx(WCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",mt:3,children:d.jsx(O.CircularProgress,{})}),isEmpty:a.length===0,empty:d.jsx(tmt,{sx:{svg:{height:140}},text:c?`Não foi possivel encontrar o item "${c}"`:"Nenhum item disponível"}),children:d.jsx(O.Grid,{container:!0,spacing:1.5,children:s.map(h=>d.jsx(O.Grid,{item:!0,xs:4,children:d.jsx(Ru2,{active:f(h.value),onClick:()=>g(h),children:d.jsxs(O.Stack,{padding:1.5,width:"100%",children:[d.jsxs(O.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsx(O.Typography,{color:f(h.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:h.title}),f(h.value)&&d.jsx(Ce,{icon:"CHECK_CIRCLE",width:24})]}),h.options.map(b=>d.jsx(O.Typography,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${b.label}: ${b.value}`},b.label))]})})},h.title))})})})})]})},cn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>d.jsx(O.TextField,{...f,onChange:g=>{f.onChange(g),a&&a(g)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},Vu2=O.styled(O.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}}));O.styled(O.IconButton)(()=>({height:"38px",alignSelf:"center"}));const Fu2=O.styled(O.Typography)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),Nu2=O.styled(O.Alert)(({theme:e})=>({backgroundColor:`${O.alpha(e.palette.primary.main,.03)}`,border:`1px solid ${O.alpha(e.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:e.palette.primary.main}})),Tu2=()=>{const e=()=>{const t="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(t,"_blank")};return d.jsx(Nu2,{severity:"info",children:d.jsxs(O.Typography,{color:"grey",variant:"caption",children:["Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",d.jsx(Fu2,{variant:"caption",color:"primary",onClick:()=>e(),children:"acessando a documentação do Webhook"})]})})},Zu2=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],Uu2=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}],Gu2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Be.useFormContext(),{fields:r,append:u,remove:c}=Be.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return d.jsxs(d.Fragment,{children:[n&&d.jsx(Tu2,{}),t&&d.jsx(cn,{name:"name",label:"Nome do webhook"}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(cn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),d.jsx(cn,{name:"filter",label:"Filtro"})]}),t&&e&&d.jsxs(d.Fragment,{children:[d.jsx(cn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),d.jsxs(O.Stack,{direction:"row",gap:2,children:[d.jsx(cn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),d.jsx(cn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(Vu2,{onClick:()=>navigator.clipboard.writeText(e.resource_id),children:d.jsx(Ce,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),d.jsx(cn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(FCt,{fullWidth:!0,options:Zu2,name:"content_type",label:"Tipo de conteúdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conteúdo é obrigatório"}}}),d.jsx(FCt,{fullWidth:!0,options:Uu2,name:"http_method",label:"Método HTTP",required:!0,rules:{required:{value:!0,message:"Campo Método HTTP é obrigatório"}}})]}),d.jsx(O.Typography,{variant:"overline",color:"grey",children:"Cabeçalho"}),r==null?void 0:r.map((f,s)=>d.jsxs(O.Stack,{direction:"row",gap:2,alignItems:"center",children:[d.jsx(cn,{name:`headers.${s}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),d.jsx(cn,{name:`headers.${s}.value`,label:"Valor"}),d.jsx(O.IconButton,{color:"error",onClick:()=>c(s),children:d.jsx(Ce,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),d.jsx(wRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),d.jsx(O.Divider,{})]})},FCt=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(hSn,{...c,...r,onChange:f=>{a&&a(f,c.value),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},CGn=({name:e,helperText:t,rules:n,onChange:a,error:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:{name:l,onChange:f,value:s,ref:g},fieldState:{error:_}})=>d.jsx(UBn,{ref:g,...u,name:l,value:s,error:r||!!_,helperText:(_==null?void 0:_.message)||t,onChange:({target:{value:m}})=>{a&&a(m),f(m)}})})},Yu2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,g=`${e}.state`,_=`${e}.city`,m=v=>{v.key==="Enter"&&v.preventDefault()};return d.jsxs(O.Stack,{gap:1.5,...t,children:[d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(CGn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.CircularProgress,{size:24})})},rules:a,onKeyDown:m,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),d.jsxs(O.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[d.jsx(cn,{name:c,label:"Logradouro",onKeyDown:m,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),d.jsx(cn,{name:l,label:"Número",onKeyDown:m,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),d.jsxs(O.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[d.jsx(cn,{name:f,label:"Bairro",onKeyDown:m,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),d.jsx(cn,{name:s,label:"Complemento",onKeyDown:m,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),d.jsxs(O.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[d.jsx(FCt,{name:g,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),d.jsx(cn,{name:_,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},Ku2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:t,render:({field:u,fieldState:{error:c}})=>d.jsx(bSn,{...u,...a,onChange:l=>{u.onChange(l)},error:!!c,helperText:(c==null?void 0:c.message)||n})})},Xu2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>d.jsxs("div",{children:[d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&d.jsx(O.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},Qu2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Be.useFormContext(),g=(_,m)=>_.includes(m)?_.filter(v=>v!==m):[..._,m];return d.jsx(Be.Controller,{name:t,control:s,rules:n,render:({field:{value:_=[],...m},fieldState:{error:v}})=>d.jsxs(O.FormControl,{component:"fieldset",children:[a&&d.jsx(O.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),d.jsx(O.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>d.jsx(O.FormControlLabel,{control:d.jsx(O.Checkbox,{checked:_.includes(C.value),onChange:()=>m.onChange(g(_,C.value))}),label:C.label,...f},C.value))}),(!!v||c)&&d.jsx(O.FormHelperText,{error:!!v,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:v?v==null?void 0:v.message:c})]})})},Ju2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Be.useFormContext(),s=m=>{const v=m.clipboardData.getData("text").split("");t.map((C,h)=>l(C,v[h])),m.preventDefault()},g=(m,v)=>{const{maxLength:C,value:h,name:b}=m.target,p=b.replace(e,""),y=Number(p),w=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(m.target.value=h[0]),h.length>=C&&y<6&&w!==null&&w.focus(),v(m)};D_t("paste",s,u);const _=t.some(m=>f[m]);return d.jsxs(O.Stack,{children:[d.jsx(O.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((m,v)=>d.jsx(Be.Controller,{name:`${e}${v+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>d.jsx(O.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:v===0,placeholder:"-",onChange:b=>{g(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},m))}),_&&d.jsx(O.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},qu2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>d.jsx(RNn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},ec2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(jT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},tc2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:g},fieldState:{error:_}})=>d.jsx(jT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:m=>g({startDate:m[0],endDate:m[1]}),onError:m=>{f(e,{message:m[0]||m[1]||void 0})},...c,slotProps:{textField:({position:m})=>{var v;return{...(v=c.slotProps)==null?void 0:v.textField,required:u,error:!!_,helperText:(_==null?void 0:_.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:m==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},nc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(jT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},rc2=({id:e,children:t,onSubmit:n,methods:a,...r})=>d.jsx(Be.FormProvider,{...a,children:d.jsx(O.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),ac2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>d.jsx(FBn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},ic2=({name:e,label:t="",rules:n,helperText:a,changed:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:n,render:({field:l,fieldState:{error:f}})=>d.jsx(O.Autocomplete,{...l,onChange:(s,g)=>{r&&r(g),l.onChange(g)},renderInput:s=>d.jsx(O.TextField,{label:t,error:!!f,helperText:f?f==null?void 0:f.message:a,...s}),...u})})},oc2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>d.jsx(ECt,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},uc2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:g}=Be.useFormContext(),_=g(e),[m,v]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=ICt(_,a,c,r,u);return d.jsx(cn,{...s,name:e,type:m?"text":"password",InputProps:{endAdornment:d.jsx(O.InputAdornment,{position:"end",children:d.jsx(O.IconButton,{onClick:()=>v(!m),edge:"end","aria-label":"Mostrar/Ocultar senha",tabIndex:-1,children:d.jsx(Ce,{icon:m?"VIEW_ON":"VIEW_OFF"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const w=ICt(y,a,c,r,u);return!w.hasNumberChar||!w.hasSpecialCharacter||!w.hasUpperCaseChar||!w.isLengthValid?"Senha inválida":f&&f.fieldPassword&&g(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},cc2=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:g,disabled:_,...m})=>{const{control:v}=Be.useFormContext(),C=a?`${e}-${a}`:"";return d.jsx(Be.Controller,{name:e,control:v,rules:t,render:({field:h,fieldState:{error:b}})=>d.jsxs(O.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&d.jsx(O.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:g,children:a}),d.jsx(O.RadioGroup,{...m,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>d.jsx(O.FormControlLabel,{value:p.value,control:d.jsx(O.Radio,{inputProps:{tabIndex:s},disabled:_,checked:p.value===h.value,icon:p.icon,checkedIcon:p.icon}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${O.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:O.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&d.jsx(O.FormHelperText,{error:!!b,sx:p=>({color:_?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},lc2=({name:e,helperText:t,onChange:n,tabIndex:a,size:r,label:u,...c})=>{const{control:l}=Be.useFormContext(),f=s=>d.jsx(O.Switch,{...s,checked:s.value,onChange:(g,_)=>{s.onChange(g),n&&n(g,_)},inputProps:{tabIndex:a},size:r});return d.jsx(Be.Controller,{name:e,control:l,render:({field:s,fieldState:{error:g}})=>d.jsxs("div",{children:[u?d.jsx(O.FormControlLabel,{label:u,control:f(s),...c}):f(s),(!!g||t)&&d.jsx(O.FormHelperText,{error:!!g,sx:_=>({mx:"14px",color:c.disabled?_.palette.grey[500]:void 0}),children:g?g==null?void 0:g.message:t})]})})},fc2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var g;return d.jsx(jT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(g=u.slotProps)==null?void 0:g.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},sc2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:l,tabIndex:f,...s})=>{const{id:g,setCropModalOpen:_,handleRemove:m,cropModalOpen:v,cancelChanges:C,saveChanges:h,previewImage:b,setCropper:p,preview:y,closePreviewImage:w}=dGn({onFileCropped:e,onImageUploaded:t,onCancel:n});return d.jsxs(d.Fragment,{children:[d.jsxs(O.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[c&&d.jsx(cu2,{}),d.jsx(sGn,{...s,id:g,file:l,onDrop:E=>{if(E.length>0){_(!0);const M=new FileReader;M.addEventListener("load",()=>{var k;const j=((k=M.result)==null?void 0:k.toString())||"";t(j),e(void 0)}),M.readAsDataURL(E[0])}},image:u,tabIndex:f})]}),d.jsx(gGn,{id:g,open:v,onClose:C,label:r,aspectRatio:a,imageSrc:u,onRemove:m,onSave:h,onPreview:b,onInitialized:p}),d.jsx(O.Dialog,{open:!!y,onClose:w,scroll:"body",PaperProps:{sx:{p:2}},children:y&&d.jsx("img",{src:y,alt:"Preview"})})]})};function bGn(e,t){const{watch:n,setValue:a}=Be.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async m=>{if(!m){a(e,void 0),u(void 0);return}a(e,m),u(Object.assign(m,{preview:URL.createObjectURL(m)}))},uploadFiles:async m=>{a(e,[...c,...m.map(v=>Object.assign(v,{preview:URL.createObjectURL(v)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:m=>{const v=c.filter(C=>C!==m);a(e,v)},file:r,setFileValue:u}}const dc2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=bGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(sc2,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},gc2=({name:e,rules:t,helperText:n,aspect:a,label:r,image:u,onFileCropped:c,onImageUploaded:l,onCancel:f,...s})=>{const{control:g}=Be.useFormContext(),{uploadFile:_,file:m,setFileValue:v}=bGn(e);return d.jsx(Be.Controller,{name:e,control:g,rules:t,render:({field:{value:C},fieldState:{error:h}})=>d.jsx(_Gn,{accept:{"image/*":[]},file:C?m:void 0,onFileCropped:b=>{_(b),c&&c(b)},onImageUploaded:l,onCancel:()=>{v(void 0),f&&f()},error:!!h,disableMultiple:!0,helperText:(!!h||n)&&d.jsx(O.FormHelperText,{error:!!h,sx:{px:2},children:h?h==null?void 0:h.message:n}),aspect:a,label:r,image:u,...s})})},yGn=O.styled(O.Button)(({theme:e})=>({borderColor:e.palette.grey[300]})),pGn=O.styled(O.Box)(({theme:e})=>({border:"1.5px solid",borderColor:e.palette.grey[300],height:450,width:"40%",borderRadius:8})),_c2=({selectedItems:e,items:t,loading:n,searchText:a,onAdd:r,onRemove:u,search:c,itemsTitle:l,selectedItemsTitle:f,additionalContent:s,enableSearchInSelectedItems:g,onSearch:_})=>{const[m,v]=o.useState(""),C=O.debounce(_,400),h=t.filter(W=>!e.some(z=>z.id===W.id)),b=e.filter(W=>{var z;return(z=W.name)==null?void 0:z.toLowerCase().includes(m.toLowerCase())}),p=g?b:t.filter(W=>e.some(z=>z.id===W.id)),[y,w]=o.useState([]),[E,M]=o.useState([]),j=()=>{r(y),w([])},k=()=>{u(E),M([])},D=W=>{M(W?p:[])},S=W=>{w(W?h:[])},I=(W,z)=>{M(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},A=(W,z)=>{w(z?T=>[...T,W]:T=>T.filter(H=>H.id!==W.id))},F=W=>{W.key==="Enter"&&W.preventDefault()};return d.jsx(O.Stack,{children:d.jsxs(O.Stack,{direction:"row",alignItems:"center",gap:3,children:[d.jsx(pGn,{display:"flex",flex:1,children:d.jsxs(O.Stack,{flex:1,children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:y.length>0&&y.length!==h.length,checked:y.length>0&&y.length===h.length,onChange:W=>S(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${l} cadastrados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${y.length}/${h.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,flex:1,children:[d.jsxs(O.Stack,{direction:"row",gap:1,children:[d.jsx(xCt,{iconPosition:"start",placeholder:"Buscar",onKeyDown:F,size:"small",fullWidth:!0,trigger:"change",onSearch:W=>C(W)}),s]}),d.jsx(WCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:h.length===0,empty:d.jsx(tmt,{text:c?`Nenhum ${a} encontrado`:`Nenhum ${a} disponível`,sx:{svg:{height:140}}}),children:d.jsx(Zce,{sx:{maxHeight:280},children:h.map(W=>d.jsxs(O.Stack,{gap:1,marginTop:"8px",children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:y.includes(W),onChange:z=>A(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})}),d.jsxs(O.Stack,{gap:3,children:[d.jsx(yGn,{variant:"outlined",onClick:j,children:d.jsx(Ce,{icon:"ARROW_RIGHT_SIMPLE"})}),d.jsx(yGn,{variant:"outlined",onClick:k,children:d.jsx(Ce,{icon:"ARROW_LEFT_SIMPLE"})})]}),d.jsx(pGn,{display:"flex",flex:1,children:d.jsxs(O.Stack,{flex:1,children:[d.jsxs(O.Stack,{direction:"row",gap:1,padding:2,children:[d.jsx(O.Checkbox,{size:"small",indeterminate:E.length>0&&E.length!==p.length,checked:E.length>0&&E.length===p.length,onChange:W=>D(W.target.checked)}),d.jsxs(O.Stack,{children:[d.jsx(O.Typography,{variant:"subtitle2",color:"text.primary",children:`${f} selecionados(as)`}),d.jsx(O.Typography,{variant:"caption",color:"text.disabled",children:`${E.length}/${p.length} selecionados`})]})]}),d.jsx(O.Divider,{}),d.jsxs(O.Stack,{p:2,gap:1,children:[g&&d.jsx(xCt,{iconPosition:"start",placeholder:"Buscar",size:"small",fullWidth:!0,trigger:"change",onSearch:W=>v(W??""),onKeyDown:F}),d.jsx(WCt,{isLoading:n,loading:d.jsx(O.Stack,{alignItems:"center",justifyContent:"center",flex:1,children:d.jsx(O.CircularProgress,{})}),isEmpty:p.length===0,empty:d.jsx(tmt,{text:m?`Nenhum ${a} encontrado`:`Nenhum ${a} selecionado`,sx:{svg:{height:140},marginTop:"56px",backgroundColor:"transparent"}}),children:d.jsx(Zce,{sx:{maxHeight:280},children:p.map(W=>d.jsxs(O.Stack,{gap:1,children:[d.jsxs(O.Stack,{direction:"row",gap:.5,alignItems:"center",marginTop:"8px",children:[d.jsx(O.Checkbox,{size:"small",checked:E.includes(W),onChange:z=>I(W,z.target.checked)}),W.label]}),d.jsx(O.Divider,{})]},W.id))})})]})]})})]})})},mc2=({name:e,rules:t,...n})=>{const{control:a}=Be.useFormContext();return d.jsx(Be.Controller,{name:e,control:a,rules:t,render:({field:r})=>d.jsx(hGn,{...r,...n})})},vc2=Object.freeze(Object.defineProperty({__proto__:null,default:ntr},Symbol.toStringTag,{value:"Module"}));R.ActionButton=wRn,R.Address=Yu2,R.Autocomplete=hSn,R.AutocompleteDetailed=bSn,R.AutocompleteDetailedField=Ku2,R.AutocompleteField=FCt,R.BuilderLayout=XDo,R.BuilderSidebar=LHo,R.Carousel=nko,R.CarouselArrowIndex=bko,R.CarouselArrows=uko,R.CarouselDots=oko,R.Checkbox=Xu2,R.Codes=Ju2,R.ColorPickerField=qu2,R.ColorPickerInput=RNn,R.Common=Ar2,R.CommonSSR=Vr2,R.Confirm=Fr2,R.CustomAvatar=CSn,R.CustomAvatarGroup=zRn,R.DataGrid=Ur2,R.DatePicker=ec2,R.DateRangePicker=tc2,R.DateTimePicker=nc2,R.Delayed=Gr2,R.DialogAnimate=Etr,R.Drawer=a12,R.EmptyContent=rAn,R.EmptyView=tmt,R.Error=o12,R.ExpandableGroup=zu2,R.FabButtonAnimate=uzn,R.Field=cn,R.FixedProgressBar=gCt,R.Form=rc2,R.FrameSkeleton=Pu2,R.HelpButton=ySn,R.Icon=Ce,R.IconButtonAnimate=czn,R.Iconify=LZn,R.IllustrationEmptyContent=EWn,R.ImageCrop=iUn,R.Incrementer=FBn,R.IncrementerField=ac2,R.Label=bUn,R.Lightbox=pDo,R.LoadingScreen=Wi2,R.MaskedInput=UBn,R.MaskedInputField=CGn,R.MaterialDesignContent=Hyt,R.MenuPopover=kUn,R.Modal=SUn,R.ModalActions=to2,R.MotionContainer=Ftr,R.MotionLazyContainer=kyt,R.MotionViewport=Vtr,R.MultiCheckbox=Qu2,R.MultipleChipField=ic2,R.NoData=kWn,R.NumberInput=ECt,R.NumberInputField=oc2,R.PasswordField=uc2,R.PasswordRules=co2,R.PopoverSelect=gu2,R.Portal=DUn,R.RadioGroupField=cc2,R.Result=WCt,R.SavedChanges=So2,R.Scrollbar=Zce,R.SearchInput=xCt,R.SelectableCards=hGn,R.SelectableCardsField=mc2,R.SeoPreview=Iu2,R.SnackbarContent=zyt,R.SnackbarProvider=$zn,R.SplashScreen=Do2,R.Steps=Wo2,R.StyledTab=$o2,R.StyledTabs=xo2,R.Summary=hu2,R.SwapList=_c2,R.Switch=lc2,R.TRANSITION=SWn,R.TabPanel=zo2,R.TableEmptyRows=Lko,R.TableHeadCustom=Eko,R.TableNoData=wko,R.TablePaginationCustom=Sko,R.TableSelectedAction=kko,R.TableSkeleton=Mko,R.TextAnimate=ktr,R.TextMaxLine=YO,R.ThemeProvider=HTn,R.TimePicker=fc2,R.ToggleButtonGroup=Au2,R.Transition=Ivt,R.Upload=fGn,R.UploadAvatar=sGn,R.UploadAvatarWithCropField=dc2,R.UploadBox=iu2,R.UploadIllustration=PWn,R.UploadWithCrop=_Gn,R.UploadWithCropField=gc2,R.Webhook=Gu2,R.WhiteBox=mGn,R.color=Cn2,R.compare=fHo,R.cssStyles=hko,R.emptyRows=yko,R.file=lo2,R.formatNumber=ci2,R.formatTime=po2,R.getComparator=pko,R.loadable=ko2,R.m=nn,R.mask=Po2,R.number=ni2,R.routes=jo2,R.sort=Lo2,R.useActiveElement=QDo,R.useApiMessage=bHo,R.useCarousel=rko,R.useCopyToClipboard=JDo,R.useDatagrid=qDo,R.useDeepCompareEffect=dHo,R.useEventCallback=VSn,R.useEventListener=D_t,R.useIsMounting=_Ho,R.useIsomorphicLayoutEffect=$Vn,R.useLightBox=wDo,R.useLocalStorage=OHo,R.useOffSetTop=CHo,R.useOnClickOutside=hHo,R.usePagination=vHo,R.usePopover=RSn,R.useResponsive=Eyt,R.useSnackbar=xzn,R.useTable=Oko,R.useTabs=mHo,R.useToggle=kht,R.uuidv4=Eo2,R.validators=io2,R.varBgColor=ZXn,R.varBgKenburns=UXn,R.varBgPan=GXn,R.varBounce=FXn,R.varContainer=avt,R.varFade=zT,R.varFlip=AXn,R.varHover=TXn,R.varPath=xXn,R.varRotate=NXn,R.varScale=VXn,R.varSlide=RXn,R.varTranEnter=$e,R.varTranExit=Ne,R.varTranHover=zXn,R.varZoom=HXn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
3
  "private": false,
4
- "version": "1.4.43",
4
+ "version": "1.4.44",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",