@zydon/common 1.3.95 → 1.3.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Filters/ListingRules/index.d.ts +1 -1
- package/dist/components/Filters/ListingRules/index.d.ts.map +1 -1
- package/dist/components/Filters/ListingRules/props.d.ts +1 -0
- package/dist/components/Filters/ListingRules/props.d.ts.map +1 -1
- package/dist/{features-73644b31.js → features-0f44879a.js} +1 -1
- package/dist/{index-c21a2bd7.js → index-b3a209cf.js} +16 -14
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ListingRulesProps } from '../../Filters/ListingRules/props';
|
|
2
|
-
declare const ListingRules: ({ rules }: ListingRulesProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ListingRules: ({ rules, setRuleType }: ListingRulesProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ListingRules;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Filters/ListingRules/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAQ1E,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Filters/ListingRules/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAQ1E,QAAA,MAAM,YAAY,2BAA4B,iBAAiB,4CAoE9D,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/components/Filters/ListingRules/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,SAAS,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/components/Filters/ListingRules/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,SAAS,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;CAEL"}
|
|
@@ -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-
|
|
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-b3a209cf.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 zf2 = ({
|
|
|
7751
7751
|
...a,
|
|
7752
7752
|
children: n
|
|
7753
7753
|
}
|
|
7754
|
-
), i1a = () => import("./features-
|
|
7754
|
+
), i1a = () => import("./features-0f44879a.js").then((e) => e.default), _Fn = ({ children: e }) => /* @__PURE__ */ O.jsx(yaa, { strict: !0, features: i1a, children: /* @__PURE__ */ O.jsxs(fr.div, { style: { height: "100%" }, children: [
|
|
7755
7755
|
" ",
|
|
7756
7756
|
e,
|
|
7757
7757
|
" "
|
|
@@ -278985,15 +278985,17 @@ const TUn = ({ fileRejections: e }) => e.length ? /* @__PURE__ */ O.jsx(
|
|
|
278985
278985
|
})), ds2 = Qt(ZRn)(() => ({
|
|
278986
278986
|
display: "flex",
|
|
278987
278987
|
justifyContent: "space-between"
|
|
278988
|
-
})), K02 = ({ rules: e }) => {
|
|
278989
|
-
const [
|
|
278988
|
+
})), K02 = ({ rules: e, setRuleType: t }) => {
|
|
278989
|
+
const [n, a] = Ne(), { setValue: r } = kt();
|
|
278990
278990
|
_t(() => {
|
|
278991
|
-
e && e.length > 0 &&
|
|
278991
|
+
if (e && e.length > 0 && (a(e[0].value), t))
|
|
278992
|
+
return t(e[0].value);
|
|
278992
278993
|
}, []), _t(() => () => {
|
|
278993
|
-
|
|
278994
|
+
r("config", {});
|
|
278994
278995
|
}, []);
|
|
278995
|
-
const
|
|
278996
|
-
|
|
278996
|
+
const u = (c, s) => {
|
|
278997
|
+
if (s !== null && (a(s), t))
|
|
278998
|
+
return t(s);
|
|
278997
278999
|
};
|
|
278998
279000
|
return /* @__PURE__ */ O.jsxs(ae, { gap: 2, children: [
|
|
278999
279001
|
/* @__PURE__ */ O.jsx(
|
|
@@ -279012,24 +279014,24 @@ const TUn = ({ fileRejections: e }) => e.length ? /* @__PURE__ */ O.jsx(
|
|
|
279012
279014
|
ds2,
|
|
279013
279015
|
{
|
|
279014
279016
|
color: "primary",
|
|
279015
|
-
value:
|
|
279017
|
+
value: n,
|
|
279016
279018
|
size: "small",
|
|
279017
279019
|
exclusive: !0,
|
|
279018
|
-
onChange:
|
|
279019
|
-
children: e.map((
|
|
279020
|
+
onChange: u,
|
|
279021
|
+
children: e.map((c, s) => /* @__PURE__ */ O.jsx(
|
|
279020
279022
|
fs2,
|
|
279021
279023
|
{
|
|
279022
|
-
value:
|
|
279024
|
+
value: c.value,
|
|
279023
279025
|
size: "small",
|
|
279024
279026
|
color: "primary",
|
|
279025
|
-
children: /* @__PURE__ */ O.jsx(Pe, { variant: "body2", children:
|
|
279027
|
+
children: /* @__PURE__ */ O.jsx(Pe, { variant: "body2", children: c.toggleTitle })
|
|
279026
279028
|
},
|
|
279027
|
-
|
|
279029
|
+
s
|
|
279028
279030
|
))
|
|
279029
279031
|
}
|
|
279030
279032
|
),
|
|
279031
279033
|
e && e.map(
|
|
279032
|
-
(
|
|
279034
|
+
(c, s) => c.value === n ? /* @__PURE__ */ O.jsx("div", { children: c.component }, s) : null
|
|
279033
279035
|
)
|
|
279034
279036
|
] });
|
|
279035
279037
|
}, gs2 = Oe(ZRn)(
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as u, b8 as p, b4 as d, ae as m, af as C, ba as v, b9 as S, ag as T, ah as g, b_ as A, c2 as k, c1 as P, c0 as F, bb as I, bd as h, be as y, ai as B, aj as D, ak as x, al as M, am as R, an as w, ao as f, bf as E, bg as L, bh as N, ap as U, bv as G, aq as W, ar as H, as as O, at as q, b5 as z, bx as V, bi as j, b1 as K, au as Q, bj as Z, a$ as J, av as X, aw as Y, by as _, ax as $, a9 as aa, ay as sa, az as ea, bk as oa, aA as ta, ab as ra, b3 as ia, aB as ba, b2 as na, aC as la, bl as ca, bT as ua, aD as pa, aE as da, aF as ma, bA as Ca, bB as va, bz as Sa, bc as Ta, bm as ga, aa as Aa, aG as ka, bn as Pa, bo as Fa, aH as Ia, aZ as ha, aI as ya, bp as Ba, aJ as Da, aK as xa, aL as Ma, aM as Ra, b0 as wa, bU as fa, bV as Ea, aN as La, aO as Na, aP as Ua, aQ as Ga, a_ as Wa, bu as Ha, bq as Oa, bC as qa, aR as za, c6 as Va, c7 as ja, c4 as Ka, c9 as Qa, c8 as Za, c5 as Ja, bw as Xa, aS as Ya, aT as _a, br as $a, b6 as as, bW as ss, aU as es, aV as os, bs as ts, aW as rs, a8 as is, aX as bs, bt as ns, b7 as ls, aY as cs, bX as us, cz as ps, cA as ds, ct as ms, ca as Cs, bY as vs, cq as Ss, cr as Ts, cs as gs, cC as As, cb as ks, cD as Ps, cy as Fs, cx as Is, cu as hs, cv as ys, cc as Bs, cp as Ds, b$ as xs, cd as Ms, ce as Rs, cf as ws, cg as fs, ch as Es, ac as Ls, cn as Ns, cm as Us, cl as Gs, co as Ws, ci as Hs, bZ as Os, c3 as qs, cj as zs, ck as Vs, cB as js, cw as Ks, bQ as Qs, bR as Zs, bS as Js, bJ as Xs, bM as Ys, bE as _s, bG as $s, bL as ae, bD as se, bK as ee, bI as oe, bH as te, bO as re, bP as ie, bN as be, bF as ne } from "./index-
|
|
1
|
+
import { ad as u, b8 as p, b4 as d, ae as m, af as C, ba as v, b9 as S, ag as T, ah as g, b_ as A, c2 as k, c1 as P, c0 as F, bb as I, bd as h, be as y, ai as B, aj as D, ak as x, al as M, am as R, an as w, ao as f, bf as E, bg as L, bh as N, ap as U, bv as G, aq as W, ar as H, as as O, at as q, b5 as z, bx as V, bi as j, b1 as K, au as Q, bj as Z, a$ as J, av as X, aw as Y, by as _, ax as $, a9 as aa, ay as sa, az as ea, bk as oa, aA as ta, ab as ra, b3 as ia, aB as ba, b2 as na, aC as la, bl as ca, bT as ua, aD as pa, aE as da, aF as ma, bA as Ca, bB as va, bz as Sa, bc as Ta, bm as ga, aa as Aa, aG as ka, bn as Pa, bo as Fa, aH as Ia, aZ as ha, aI as ya, bp as Ba, aJ as Da, aK as xa, aL as Ma, aM as Ra, b0 as wa, bU as fa, bV as Ea, aN as La, aO as Na, aP as Ua, aQ as Ga, a_ as Wa, bu as Ha, bq as Oa, bC as qa, aR as za, c6 as Va, c7 as ja, c4 as Ka, c9 as Qa, c8 as Za, c5 as Ja, bw as Xa, aS as Ya, aT as _a, br as $a, b6 as as, bW as ss, aU as es, aV as os, bs as ts, aW as rs, a8 as is, aX as bs, bt as ns, b7 as ls, aY as cs, bX as us, cz as ps, cA as ds, ct as ms, ca as Cs, bY as vs, cq as Ss, cr as Ts, cs as gs, cC as As, cb as ks, cD as Ps, cy as Fs, cx as Is, cu as hs, cv as ys, cc as Bs, cp as Ds, b$ as xs, cd as Ms, ce as Rs, cf as ws, cg as fs, ch as Es, ac as Ls, cn as Ns, cm as Us, cl as Gs, co as Ws, ci as Hs, bZ as Os, c3 as qs, cj as zs, ck as Vs, cB as js, cw as Ks, bQ as Qs, bR as Zs, bS as Js, bJ as Xs, bM as Ys, bE as _s, bG as $s, bL as ae, bD as se, bK as ee, bI as oe, bH as te, bO as re, bP as ie, bN as be, bF as ne } from "./index-b3a209cf.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
package/dist/index.umd.cjs
CHANGED
|
@@ -35406,7 +35406,7 @@ 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 bcu(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ycu(e){if(Array.isArray(e))return mWn(e)}function VKn(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 FKn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VKn(Object(n),!0).forEach(function(a){NKn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VKn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function NKn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Evt(e,t){return jcu(e)||Ocu(e,t)||TKn(e,t)||pcu()}function pcu(){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 TKn(e,t){if(e){if(typeof e=="string")return mWn(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 mWn(e,t)}}function mWn(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 Ocu(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,s;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(l){u=!0,s=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw s}}return a}}function jcu(e){if(Array.isArray(e))return e}var wcu="file-invalid-type",Mcu="file-too-large",Lcu="file-too-small",Pcu="too-many-files",Ecu=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:wcu,message:"File type must be ".concat(n)}},ZKn=function(t){return{code:Mcu,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},UKn=function(t){return{code:Lcu,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},kcu={code:Pcu,message:"Too many files"};function GKn(e,t){var n=e.type==="application/x-moz-file"||hcu(e,t);return[n,n?null:Ecu(t)]}function KKn(e,t,n){if(nZ(e.size))if(nZ(t)&&nZ(n)){if(e.size>n)return[!1,ZKn(n)];if(e.size<t)return[!1,UKn(t)]}else{if(nZ(t)&&e.size<t)return[!1,UKn(t)];if(nZ(n)&&e.size>n)return[!1,ZKn(n)]}return[!0,null]}function nZ(e){return e!=null}function Scu(e){var t=e.files,n=e.accept,a=e.minSize,r=e.maxSize,u=e.multiple,c=e.maxFiles,s=e.validator;return!u&&t.length>1||u&&c>=1&&t.length>c?!1:t.every(function(l){var d=GKn(l,n),f=Evt(d,1),g=f[0],_=KKn(l,a,r),m=Evt(_,1),v=m[0],h=s?s(l):null;return g&&v&&!h})}function Tbt(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Zbt(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 YKn(e){e.preventDefault()}function Dcu(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Icu(e){return e.indexOf("Edge/")!==-1}function Bcu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Dcu(e)||Icu(e)}function il(){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(s){return!Tbt(a)&&s&&s.apply(void 0,[a].concat(u)),Tbt(a)})}}function Wcu(){return"showOpenFilePicker"in window}function $cu(e){if(nZ(e)){var t=Object.entries(e).filter(function(n){var a=Evt(n,2),r=a[0],u=a[1],c=!0;return XKn(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(QKn))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(n,a){var r=Evt(a,2),u=r[0],c=r[1];return FKn(FKn({},n),{},NKn({},u,c))},{});return[{description:"Files",accept:t}]}return e}function xcu(e){if(nZ(e))return Object.entries(e).reduce(function(t,n){var a=Evt(n,2),r=a[0],u=a[1];return[].concat(HKn(t),[r],HKn(u))},[]).filter(function(t){return XKn(t)||QKn(t)}).join(",")}function Acu(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Rcu(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function XKn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function QKn(e){return/^.*\.[\w]+$/.test(e)}var zcu=["children"],Hcu=["open"],Vcu=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Fcu=["refKey","onChange","onClick"];function Ncu(e){return Ucu(e)||Zcu(e)||JKn(e)||Tcu()}function Tcu(){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 Zcu(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ucu(e){if(Array.isArray(e))return hWn(e)}function vWn(e,t){return Ycu(e)||Kcu(e,t)||JKn(e,t)||Gcu()}function Gcu(){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 JKn(e,t){if(e){if(typeof e=="string")return hWn(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 hWn(e,t)}}function hWn(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 Kcu(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,s;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(l){u=!0,s=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw s}}return a}}function Ycu(e){if(Array.isArray(e))return e}function qKn(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 Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qKn(Object(n),!0).forEach(function(a){CWn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qKn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function CWn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ubt(e,t){if(e==null)return{};var n=Xcu(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 Xcu(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 bWn=o.forwardRef(function(e,t){var n=e.children,a=Ubt(e,zcu),r=Gbt(a),u=r.open,c=Ubt(r,Hcu);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(Xt(Xt({},c),{},{open:u})))});bWn.displayName="Dropzone";var eYn={disabled:!1,getFilesFromEvent:ccu,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};bWn.defaultProps=eYn,bWn.propTypes={children:F.func,accept:F.objectOf(F.arrayOf(F.string)),multiple:F.bool,preventDropOnDocument:F.bool,noClick:F.bool,noKeyboard:F.bool,noDrag:F.bool,noDragEventsBubbling:F.bool,minSize:F.number,maxSize:F.number,maxFiles:F.number,disabled:F.bool,getFilesFromEvent:F.func,onFileDialogCancel:F.func,onFileDialogOpen:F.func,useFsAccessApi:F.bool,autoFocus:F.bool,onDragEnter:F.func,onDragLeave:F.func,onDragOver:F.func,onDrop:F.func,onDropAccepted:F.func,onDropRejected:F.func,onError:F.func,validator:F.func};var yWn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Gbt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Xt(Xt({},eYn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,s=t.multiple,l=t.maxFiles,d=t.onDragEnter,f=t.onDragLeave,g=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,C=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,S=t.preventDropOnDocument,w=t.noClick,j=t.noKeyboard,b=t.noDrag,M=t.noDragEventsBubbling,P=t.onError,k=t.validator,W=o.useMemo(function(){return xcu(n)},[n]),I=o.useMemo(function(){return $cu(n)},[n]),D=o.useMemo(function(){return typeof C=="function"?C:tYn},[C]),E=o.useMemo(function(){return typeof h=="function"?h:tYn},[h]),L=o.useRef(null),B=o.useRef(null),$=o.useReducer(Qcu,yWn),x=vWn($,2),R=x[0],H=x[1],z=R.isFocused,N=R.isFileDialogActive,K=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&Wcu()),Z=function(){!K.current&&N&&setTimeout(function(){if(B.current){var Le=B.current.files;Le.length||(H({type:"closeDialog"}),E())}},300)};o.useEffect(function(){return window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)}},[B,N,E,K]);var T=o.useRef([]),U=function(Le){L.current&&L.current.contains(Le.target)||(Le.preventDefault(),T.current=[])};o.useEffect(function(){return S&&(document.addEventListener("dragover",YKn,!1),document.addEventListener("drop",U,!1)),function(){S&&(document.removeEventListener("dragover",YKn),document.removeEventListener("drop",U))}},[L,S]),o.useEffect(function(){return!a&&y&&L.current&&L.current.focus(),function(){}},[L,y,a]);var Y=o.useCallback(function(me){P?P(me):console.error(me)},[P]),te=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me),T.current=[].concat(Ncu(T.current),[me.target]),Zbt(me)&&Promise.resolve(r(me)).then(function(Le){if(!(Tbt(me)&&!M)){var ae=Le.length,le=ae>0&&Scu({files:Le,accept:W,minSize:c,maxSize:u,multiple:s,maxFiles:l,validator:k}),ye=ae>0&&!le;H({isDragAccept:le,isDragReject:ye,isDragActive:!0,type:"setDraggedFiles"}),d&&d(me)}}).catch(function(Le){return Y(Le)})},[r,d,Y,M,W,c,u,s,l,k]),re=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me);var Le=Zbt(me);if(Le&&me.dataTransfer)try{me.dataTransfer.dropEffect="copy"}catch{}return Le&&g&&g(me),!1},[g,M]),q=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me);var Le=T.current.filter(function(le){return L.current&&L.current.contains(le)}),ae=Le.indexOf(me.target);ae!==-1&&Le.splice(ae,1),T.current=Le,!(Le.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Zbt(me)&&f&&f(me))},[L,f,M]),ie=o.useCallback(function(me,Le){var ae=[],le=[];me.forEach(function(ye){var ge=GKn(ye,W),Be=vWn(ge,2),Qe=Be[0],dt=Be[1],vt=KKn(ye,c,u),ut=vWn(vt,2),Ye=ut[0],$t=ut[1],kn=k?k(ye):null;if(Qe&&Ye&&!kn)ae.push(ye);else{var e1=[dt,$t];kn&&(e1=e1.concat(kn)),le.push({file:ye,errors:e1.filter(function(xn){return xn})})}}),(!s&&ae.length>1||s&&l>=1&&ae.length>l)&&(ae.forEach(function(ye){le.push({file:ye,errors:[kcu]})}),ae.splice(0)),H({acceptedFiles:ae,fileRejections:le,type:"setFiles"}),_&&_(ae,le,Le),le.length>0&&v&&v(le,Le),ae.length>0&&m&&m(ae,Le)},[H,s,W,c,u,l,_,m,v,k]),de=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me),T.current=[],Zbt(me)&&Promise.resolve(r(me)).then(function(Le){Tbt(me)&&!M||ie(Le,me)}).catch(function(Le){return Y(Le)}),H({type:"reset"})},[r,ie,Y,M]),oe=o.useCallback(function(){if(K.current){H({type:"openDialog"}),D();var me={multiple:s,types:I};window.showOpenFilePicker(me).then(function(Le){return r(Le)}).then(function(Le){ie(Le,null),H({type:"closeDialog"})}).catch(function(Le){Acu(Le)?(E(Le),H({type:"closeDialog"})):Rcu(Le)?(K.current=!1,B.current?(B.current.value=null,B.current.click()):Y(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."))):Y(Le)});return}B.current&&(H({type:"openDialog"}),D(),B.current.value=null,B.current.click())},[H,D,E,p,ie,Y,I,s]),ze=o.useCallback(function(me){!L.current||!L.current.isEqualNode(me.target)||(me.key===" "||me.key==="Enter"||me.keyCode===32||me.keyCode===13)&&(me.preventDefault(),oe())},[L,oe]),_e=o.useCallback(function(){H({type:"focus"})},[]),ue=o.useCallback(function(){H({type:"blur"})},[]),he=o.useCallback(function(){w||(Bcu()?setTimeout(oe,0):oe())},[w,oe]),Me=function(Le){return a?null:Le},se=function(Le){return j?null:Me(Le)},Se=function(Le){return b?null:Me(Le)},We=function(Le){M&&Le.stopPropagation()},Ge=o.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Le=me.refKey,ae=Le===void 0?"ref":Le,le=me.role,ye=me.onKeyDown,ge=me.onFocus,Be=me.onBlur,Qe=me.onClick,dt=me.onDragEnter,vt=me.onDragOver,ut=me.onDragLeave,Ye=me.onDrop,$t=Ubt(me,Vcu);return Xt(Xt(CWn({onKeyDown:se(il(ye,ze)),onFocus:se(il(ge,_e)),onBlur:se(il(Be,ue)),onClick:Me(il(Qe,he)),onDragEnter:Se(il(dt,te)),onDragOver:Se(il(vt,re)),onDragLeave:Se(il(ut,q)),onDrop:Se(il(Ye,de)),role:typeof le=="string"&&le!==""?le:"presentation"},ae,L),!a&&!j?{tabIndex:0}:{}),$t)}},[L,ze,_e,ue,he,te,re,q,de,j,b,a]),Ze=o.useCallback(function(me){me.stopPropagation()},[]),It=o.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Le=me.refKey,ae=Le===void 0?"ref":Le,le=me.onChange,ye=me.onClick,ge=Ubt(me,Fcu),Be=CWn({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:Me(il(le,de)),onClick:Me(il(ye,Ze)),tabIndex:-1},ae,B);return Xt(Xt({},Be),ge)}},[B,n,s,de,a]);return Xt(Xt({},R),{},{isFocused:z&&!a,getRootProps:Ge,getInputProps:It,rootRef:L,inputRef:B,open:Me(oe)})}function Qcu(e,t){switch(t.type){case"focus":return Xt(Xt({},e),{},{isFocused:!0});case"blur":return Xt(Xt({},e),{},{isFocused:!1});case"openDialog":return Xt(Xt({},yWn),{},{isFileDialogActive:!0});case"closeDialog":return Xt(Xt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Xt(Xt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Xt(Xt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Xt({},yWn);default:return e}}function tYn(){}const nYn=({fileRejections:e})=>e.length?O.jsx(A.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>ve(t.palette.error.main,.08),borderColor:t=>ve(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=gWn(t);return O.jsxs(A.Box,{sx:{my:1},children:[O.jsxs(A.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?eWn(r):""]}),n.map(u=>O.jsxs(A.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,Jcu=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return O.jsx(A.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:O.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},qcu=zt("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 ${ve(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),elu=({header:e,description:t,sx:n,...a})=>O.jsxs(A.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[O.jsx(jxn,{sx:{width:220}}),O.jsxs("div",{children:[O.jsx(A.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),O.jsx(A.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||O.jsxs(O.Fragment,{children:["Solte os arquivos aqui ou clique",O.jsx(A.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),rYn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:s,thumbnail:l,onRemove:d,onHandleMainImage:f,mainUrl:g,sx:_,dropZoneProps:m,placeholderProps:v,placeholderAlt:h,image:C,tabIndex:p,...y})=>{const{getRootProps:S,getInputProps:w,isDragActive:j,isDragReject:b,fileRejections:M}=Gbt({multiple:n,disabled:t,...y}),P=!!u&&!n||C,k=s&&n&&s.length>0,W=b||!!a;return O.jsxs(A.Box,{sx:{width:1,position:"relative",..._},children:[O.jsxs(qcu,{...S(),sx:{...j&&{opacity:.72},...W&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...m},children:[O.jsx("input",{...w(),id:e,tabIndex:p}),h?O.jsx(A.Stack,{sx:{...P&&{opacity:0}},children:h}):O.jsx(elu,{sx:{...P&&{opacity:0}},header:v==null?void 0:v.title,description:v==null?void 0:v.description}),P&&O.jsx(Jcu,{file:u||C||""})]}),r&&O.jsx(A.FormHelperText,{error:!!a,sx:I=>({mx:"14px",color:t?I.palette.grey[500]:void 0}),children:r}),O.jsx(nYn,{fileRejections:M}),P&&c&&O.jsx(A.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:I=>ve(I.palette.common.white,.8),bgcolor:I=>ve(I.palette.grey[900],.72),"&:hover":{bgcolor:I=>ve(I.palette.grey[900],.48)}},children:O.jsx(we,{icon:"CLOSE_MARK_BUTTON",width:18})}),k&&O.jsx(O.Fragment,{children:O.jsx(A.Box,{sx:{my:3},children:O.jsx(acu,{files:s,thumbnail:l,onRemove:d,onHandleMainImage:f,mainUrl:g})})})]})},tlu=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return O.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},nlu=zt("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 ${ve(e.palette.grey[500],.32)}`})),rlu=zt("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})})),aYn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...s})=>{const{getRootProps:l,getInputProps:d,isDragActive:f,isDragReject:g,fileRejections:_}=Gbt({multiple:!1,disabled:a,...s}),m=!!t||n,v=g||!!e;return O.jsxs(O.Fragment,{children:[O.jsxs(nlu,{...l(),sx:{...f&&{opacity:.72},...v&&{borderColor:"error.light",...m&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...m&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[O.jsx("input",{...d(),tabIndex:c}),m&&O.jsx(tlu,{file:t||n||""}),O.jsxs(rlu,{className:"placeholder",sx:{"&:hover":{opacity:.72},...m&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>ve(h.palette.grey[900],.64)},...v&&{color:"error.main",bgcolor:"error.lighter"}},children:[O.jsx(we,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),O.jsx(A.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,O.jsx(nYn,{fileRejections:_})]})},alu=zt("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:ve(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),ilu=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:s,isDragActive:l,isDragReject:d}=Gbt({disabled:n,...u}),f=d||t;return O.jsxs(alu,{...c(),sx:{...l&&{opacity:.72},...f&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[O.jsx("input",{...s(),tabIndex:r}),e||O.jsx(we,{icon:"CLOUD_UPLOAD",width:28})]})},iYn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,s,l]=xmt(),[d,f]=o.useState();return{id:a,setCropModalOpen:l,handleRemove:()=>{e(void 0),t(void 0),l(!1)},toggleCropModalOpen:s,cropModalOpen:c,cancelChanges:()=>{n&&n(),l(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(C=>{if(!C)return;const p=new File([C],"imagem");e(p),s()},"image/png",1)},previewImage:()=>{r!==void 0&&f(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:d,closePreviewImage:()=>f(void 0)}},oYn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:s,aspectRatio:l,onInitialized:d})=>{const[f,g]=o.useState(.5);return O.jsx(MKn,{open:t,onClose:n,dialogTitle:a,actions:O.jsxs(O.Fragment,{children:[O.jsx(A.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),O.jsx(A.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:O.jsxs(A.Stack,{gap:2,children:[O.jsx(tKn,{imageSrc:s,aspectRatio:l,onInitialized:d,zoom:f,onZoomChange:g}),O.jsxs(A.Stack,{gap:1.5,children:[O.jsxs(A.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[O.jsx(A.Typography,{variant:"body1",children:"Zoom"}),O.jsx(A.Slider,{value:f,onChange:(_,m)=>g(Array.isArray(m)?m[0]:m),min:.1,max:2,size:"medium",step:.0125})]}),O.jsxs(A.Stack,{direction:"row",gap:2,children:[O.jsx(A.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:O.jsx(we,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),O.jsx(A.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:O.jsx(we,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),O.jsx(A.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:O.jsx(we,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},olu=A.styled(A.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ulu=A.styled(A.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:A.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),clu=A.styled(A.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),uYn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:s,tabIndex:l,...d})=>{const{id:f,setCropModalOpen:g,handleRemove:_,toggleCropModalOpen:m,cropModalOpen:v,cancelChanges:h,saveChanges:C,previewImage:p,setCropper:y,preview:S,closePreviewImage:w}=iYn({onFileCropped:e,onImageUploaded:t,onCancel:n});return O.jsxs(O.Fragment,{children:[O.jsxs(olu,{children:[c&&O.jsx(Obt,{}),O.jsx(rYn,{...d,id:f,file:s,onDrop:j=>{if(j.length>0){g(!0);const b=new FileReader;b.addEventListener("load",()=>{var P;const M=((P=b.result)==null?void 0:P.toString())||"";t(M),e(void 0)}),b.readAsDataURL(j[0])}},image:u,tabIndex:l}),(s||u)&&O.jsxs(ulu,{className:"actions",children:[O.jsx(A.Button,{color:"inherit",startIcon:O.jsx(we,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:_,children:"Remover"}),O.jsx(A.Button,{color:"inherit",startIcon:O.jsx(we,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:m,children:"Editar"})]})]}),O.jsx(oYn,{id:f,open:v,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:_,onSave:C,onPreview:p,onInitialized:y}),O.jsx(A.Dialog,{open:!!S,onClose:w,scroll:"body",PaperProps:{sx:{p:2}},children:S&&O.jsx("img",{src:S,alt:"Preview"})})]})},llu=A.styled(A.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),cYn=({children:e,...t})=>O.jsx(llu,{borderRadius:1,gap:3,padding:3,...t,children:e}),slu=A.styled(A.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),flu=A.styled(A.Button)(()=>({fontWeight:"fontWeightSemiBold"})),dlu=A.styled(we)(({theme:e})=>({color:e.palette.primary.main})),glu=({selectedTitle:e,onSelect:t,options:n})=>{const a=Amt();return O.jsxs(O.Fragment,{children:[O.jsx(flu,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:O.jsx(dlu,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:O.jsx(slu,{component:"span",children:e.label})}),O.jsx(wKn,{open:a.open,onClose:a.onClose,children:n.map(r=>O.jsx(A.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},_lu=A.styled(A.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),mlu=A.styled(A.Typography)(({theme:e})=>({color:e.palette.grey[600]})),vlu=A.styled(A.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),hlu=({data:e,...t})=>e.length===0?null:O.jsx(_lu,{gap:1,...t,children:e.map(n=>[O.jsx(mlu,{variant:"body2",children:n.label},`label:${n.id}`),O.jsx(vlu,{variant:"body2",children:n.value},`value:${n.id}`)])}),Clu=A.styled(A.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),blu=A.styled(A.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),ylu=A.styled(A.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),plu=A.styled(A.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),Olu=A.styled(A.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),jlu=A.styled(A.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),wlu=A.styled(A.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}})),Mlu=A.styled(ZT)(()=>({height:1,"& .simplebar-content":{height:1}})),Llu=A.styled(A.Stack)(()=>({position:"fixed",width:"202px"})),Plu=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>O.jsx(A.Stack,{children:O.jsxs(A.Stack,{direction:"row",children:[O.jsx(Clu,{children:O.jsx(Mlu,{children:O.jsxs(Llu,{children:[O.jsx(A.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>O.jsxs(A.Stack,{children:[O.jsxs(wlu,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"end",behavior:"smooth"})},children:[u.title,u.isRequired&&O.jsx("span",{children:"*"})]}),c<t.length-1&&O.jsx(A.Divider,{})]},c))]})})}),O.jsxs(A.Stack,{width:"100%",alignItems:"center",mb:8,children:[O.jsx(blu,{children:O.jsxs(ylu,{children:[O.jsxs(A.Stack,{flexDirection:"row",gap:2,children:[O.jsx(A.IconButton,{color:"primary",onClick:()=>r(),children:O.jsx(we,{icon:"CHEVRON_LEFT"})}),O.jsx(A.Typography,{variant:"h4",children:e}),n]}),O.jsxs(A.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[O.jsx(xDn,{disabled:!0}),a]})]})}),O.jsx(plu,{children:t.map(u=>O.jsxs(A.Stack,{ref:u.ref,paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[O.jsx(Olu,{children:u.title}),O.jsx(jlu,{children:u.subTitle}),O.jsx(cYn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),Elu=A.styled(A.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),klu=A.styled(A.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),Slu=A.styled(A.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),Dlu=A.styled(A.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),lYn=A.styled(A.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Ilu=A.styled(A.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Blu=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:s,productImage:l,child:d,previewLinkImage:f,hasPreviewLink:g})=>O.jsx(Elu,{children:O.jsxs(A.Stack,{gap:3,display:"flex",flex:1,children:[O.jsx(A.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),O.jsxs(klu,{children:[O.jsxs(A.Stack,{direction:"row",pb:3,gap:.5,children:[O.jsx(A.Box,{height:0,width:10,children:O.jsx(we,{icon:"CIRCLE",width:30,color:"error.main"})}),O.jsx(A.Box,{height:0,width:10,children:O.jsx(we,{icon:"CIRCLE",width:30,color:"warning.main"})}),O.jsx(A.Box,{height:0,width:10,children:O.jsx(we,{icon:"CIRCLE",width:30,color:"success.main"})})]}),O.jsxs(A.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[O.jsxs(A.Stack,{gap:1,width:"100%",children:[O.jsxs(A.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&O.jsx(Slu,{children:O.jsx("img",{alt:"Logo",src:t})}),O.jsxs(A.Stack,{children:[O.jsx(A.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),O.jsxs(A.Stack,{direction:"row",gap:2,children:[O.jsx(A.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),O.jsx(we,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),O.jsx(Wj,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),O.jsx(Wj,{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&&O.jsx(A.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((_,m)=>O.jsxs(O.Fragment,{children:[O.jsx(A.Typography,{variant:"caption",color:"text.disabled",children:_}),m<c.length-1&&O.jsx(A.Box,{width:4,height:16,children:O.jsx(we,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),s&&O.jsx(A.Stack,{pt:2,children:s.map((_,m)=>O.jsxs(A.Stack,{gap:1,children:[O.jsx(A.Typography,{variant:"subtitle1",color:"#4E5BEC",children:_.title}),O.jsx(Wj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:_.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},m))}),d]}),l&&O.jsx(Dlu,{children:O.jsx("img",{alt:"ProductImage",src:l})})]})]}),g&&O.jsxs(A.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[O.jsx(A.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),O.jsxs(lYn,{children:[f&&O.jsx(Ilu,{children:O.jsx("img",{alt:"PreviewLinkImage",src:f,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),O.jsxs(A.Stack,{gap:.2,p:2,width:"100%",children:[O.jsx(A.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),O.jsx(A.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!"}),O.jsx(A.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),O.jsx(lYn,{children:O.jsxs(A.Stack,{direction:"row",gap:1,alignItems:"center",children:[O.jsx(A.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:O.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),O.jsxs(A.Stack,{padding:1,gap:.2,width:"80%",children:[O.jsx(Wj,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),O.jsx(Wj,{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!"}),O.jsx(Wj,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Wlu=A.styled(iWn)(({theme:e})=>({backgroundColor:`${A.alpha(e.palette.grey[400],.2)}`,cursor:"pointer"})),$lu=A.styled(ZT)(()=>({maxHeight:"260px"})),xlu=({items:e})=>{const{setValue:t,getValues:n}=Re.useFormContext(),[a,r]=o.useState(-1),[u,c]=o.useState(""),s=Object.fromEntries(e.map((C,p)=>[p,[]])),[l,d]=o.useState(s);o.useEffect(()=>()=>{t("config",{})},[]);const f=(C,p)=>{r(p?C:-1),p&&g()},g=()=>{c("")},_=(C,p,y)=>{const S=y.target.checked?[...l[a],p]:l[a].filter(w=>w!==p);d({...l,[a]:S}),h(C,S)},m=C=>{c(C)},v=()=>{const p=e[a].list.every(y=>l[a].includes(y.value))?[]:[...e[a].list.map(y=>y.value)];d({...l,[a]:p}),h(e[a].name,p)},h=(C,p)=>{const y={},S=n("config"),w=e[a];if(w){const j=w.list.filter(b=>l[a].includes(b.value)).map(b=>b.value);y[w.name]={type:"FIELD",values:w.name===C?p:j},t("config",{...S,...y})}};return O.jsx(O.Fragment,{children:e.map((C,p)=>O.jsxs(A.Accordion,{expanded:a===p,onChange:(y,S)=>f(p,S),children:[O.jsx(A.AccordionSummary,{expandIcon:O.jsx(we,{icon:"CHEVRON_UP"}),id:`${p}`,children:O.jsxs(A.Stack,{alignItems:"center",direction:"row",children:[O.jsx(A.Typography,{variant:"subtitle2",color:"grey.600",children:C.label}),O.jsxs(Wlu,{variant:"soft",color:"primary",marginLeft:1,children:[l[p].length," selecionados"]})]})}),O.jsxs(A.AccordionDetails,{children:[O.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:1,children:[O.jsx(Fle,{onSearch:m,onChange:y=>m(y.target.value),iconPosition:"start",size:"small",placeholder:"Buscar",value:u,fullWidth:!0}),O.jsx(A.Button,{onClick:()=>v(),size:"small",children:O.jsx(A.Typography,{variant:"overline",children:"TODOS"})})]}),O.jsx($lu,{children:O.jsx(A.List,{children:a>-1&&(C.list.filter(y=>y.label.toLowerCase().includes(u.toLowerCase())).map((y,S)=>O.jsx(A.ListItem,{children:O.jsx(A.FormControlLabel,{control:O.jsx(A.Checkbox,{size:"small",checked:l[a].includes(y.value),onChange:w=>_(C.name,y.value,w),name:y.label}),label:O.jsx(A.Typography,{variant:"caption",color:"grey.600",children:y.label})})},S)).length===0?O.jsx(uvt,{sx:{svg:{height:100}},text:"Nenhum registro para ser apresentado"}):C.list.filter(y=>y.label.toLowerCase().includes(u.toLowerCase())).map((y,S)=>O.jsx(A.ListItem,{children:O.jsx(A.FormControlLabel,{control:O.jsx(A.Checkbox,{size:"small",checked:l[a].includes(y.value),onChange:w=>_(C.name,y.value,w),name:y.label}),label:O.jsx(A.Typography,{variant:"caption",color:"grey.600",children:y.label})})},S)))})})]})]},p))})},Alu=({columns:e,rows:t,loading:n,fetching:a,totalRows:r,handlePaginationChange:u})=>{const{setValue:c}=Re.useFormContext(),{apiRef:s,page:l,perPage:d}=zFn();o.useEffect(()=>()=>{c("config",{})},[]);const[f,g]=o.useState([]),[_,m]=o.useState(),v=C=>{g(C),c("config.products",{type:"FIELD",values:C})},h=()=>{const C=_==null?void 0:_.toLowerCase();return t.filter(p=>Object.values(p).some(y=>typeof y=="string"||y instanceof String?y.toLowerCase().includes(C||""):!1))};return O.jsxs(A.Stack,{gap:2,children:[O.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[O.jsx(Fle,{onSearch:C=>m(C),onChange:C=>m(C.target.value),iconPosition:"start",size:"small",placeholder:"Buscar"}),O.jsxs(A.Typography,{variant:"body1",color:"text.disabled",children:[f.length," selecionados"]})]}),O.jsx(CBn,{apiRef:s,columns:e,rows:h(),pagination:!0,paginationModel:{page:l,pageSize:d},rowCount:r,paginationMode:"server",onPaginationModelChange:u,initialState:{pagination:{paginationModel:{pageSize:5,page:l}}},loading:n,fetching:a,checkboxSelection:!0,onRowSelectionModelChange:v})]})},Rlu=zt(A.ToggleButton)(({theme:e})=>({width:"100%","&.Mui-selected":{backgroundColor:e.palette.primary.main,color:e.palette.common.white,"&:hover":{backgroundColor:e.palette.primary.main}}})),zlu=zt(A.ToggleButtonGroup)(()=>({display:"flex",justifyContent:"space-between"})),Hlu=({rules:e})=>{const[t,n]=o.useState(),{setValue:a}=Re.useFormContext();o.useEffect(()=>{e&&e.length>0&&n(e[0].value)},[]),o.useEffect(()=>()=>{a("config",{})},[]);const r=(u,c)=>{c!==null&&n(c)};return O.jsxs(A.Stack,{gap:2,children:[O.jsx(pn,{name:"name",label:"Nome da regra",required:!0,rules:{required:{value:!0,message:"Nome da regra é obrigatório"}}}),O.jsx(A.Typography,{color:"grey.500",variant:"overline",children:"Selecione a regra"}),e&&O.jsx(zlu,{color:"primary",value:t,size:"small",exclusive:!0,onChange:r,children:e.map((u,c)=>O.jsx(Rlu,{value:u.value,size:"small",color:"primary",children:O.jsx(A.Typography,{variant:"body2",children:u.toggleTitle})},c))}),e&&e.map((u,c)=>u.value===t?O.jsx("div",{children:u.component},c):null)]})},Vlu=A.styled(A.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`}})),sYn=e=>O.jsx(Vlu,{...e});var fYn={exports:{}};(function(e,t){(function(){var n="ace",a=function(){return this}();!a&&typeof window<"u"&&(a=window);var r=function(f,g,_){if(typeof f!="string"){r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(_=g),r.modules[f]||(r.payloads[f]=_,r.modules[f]=null)};r.modules={},r.payloads={};var u=function(f,g,_){if(typeof g=="string"){var m=l(f,g);if(m!=null)return _&&_(),m}else if(Object.prototype.toString.call(g)==="[object Array]"){for(var v=[],h=0,C=g.length;h<C;++h){var p=l(f,g[h]);if(p==null&&c.original)return;v.push(p)}return _&&_.apply(null,v)||!0}},c=function(f,g){var _=u("",f,g);return _==null&&c.original?c.original.apply(this,arguments):_},s=function(f,g){if(g.indexOf("!")!==-1){var _=g.split("!");return s(f,_[0])+"!"+s(f,_[1])}if(g.charAt(0)=="."){var m=f.split("/").slice(0,-1).join("/");for(g=m+"/"+g;g.indexOf(".")!==-1&&v!=g;){var v=g;g=g.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return g},l=function(f,g){g=s(f,g);var _=r.modules[g];if(!_){if(_=r.payloads[g],typeof _=="function"){var m={},v={id:g,uri:"",exports:m,packaged:!0},h=function(p,y){return u(g,p,y)},C=_(h,m,v);m=C||v.exports,r.modules[g]=m,delete r.payloads[g]}_=r.modules[g]=m||_}return _};function d(f){var g=a;f&&(a[f]||(a[f]={}),g=a[f]),(!g.define||!g.define.packaged)&&(r.original=g.define,g.define=r,g.define.packaged=!0),(!g.require||!g.require.packaged)&&(c.original=g.require,g.require=c,g.require.packaged=!0)}d(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,a,r){function u(c,s,l){Object.defineProperty(c,s,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||u(String.prototype,"startsWith",function(c,s){return s=s||0,this.lastIndexOf(c,s)===s}),String.prototype.endsWith||u(String.prototype,"endsWith",function(c,s){var l=this;(s===void 0||s>l.length)&&(s=l.length),s-=c.length;var d=l.indexOf(c,s);return d!==-1&&d===s}),String.prototype.repeat||u(String.prototype,"repeat",function(c){for(var s="",l=this;c>0;)c&1&&(s+=l),(c>>=1)&&(l+=l);return s}),String.prototype.includes||u(String.prototype,"includes",function(c,s){return this.indexOf(c,s)!=-1}),Object.assign||(Object.assign=function(c){if(c==null)throw new TypeError("Cannot convert undefined or null to object");for(var s=Object(c),l=1;l<arguments.length;l++){var d=arguments[l];d!=null&&Object.keys(d).forEach(function(f){s[f]=d[f]})}return s}),Object.values||(Object.values=function(c){return Object.keys(c).map(function(s){return c[s]})}),Array.prototype.find||u(Array.prototype,"find",function(c){for(var s=this.length,l=arguments[1],d=0;d<s;d++){var f=this[d];if(c.call(l,f,d,this))return f}}),Array.prototype.findIndex||u(Array.prototype,"findIndex",function(c){for(var s=this.length,l=arguments[1],d=0;d<s;d++){var f=this[d];if(c.call(l,f,d,this))return d}}),Array.prototype.includes||u(Array.prototype,"includes",function(c,s){return this.indexOf(c,s)!=-1}),Array.prototype.fill||u(Array.prototype,"fill",function(c){for(var s=this,l=s.length>>>0,d=arguments[1],f=d>>0,g=f<0?Math.max(l+f,0):Math.min(f,l),_=arguments[2],m=_===void 0?l:_>>0,v=m<0?Math.max(l+m,0):Math.min(m,l);g<v;)s[g]=c,g++;return s}),Array.of||u(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,a,r){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,a,r){a.deepCopy=function u(c){if(typeof c!="object"||!c)return c;var s;if(Array.isArray(c)){s=[];for(var l=0;l<c.length;l++)s[l]=u(c[l]);return s}if(Object.prototype.toString.call(c)!=="[object Object]")return c;s={};for(var l in c)s[l]=u(c[l]);return s}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,a,r){a.last=function(s){return s[s.length-1]},a.stringReverse=function(s){return s.split("").reverse().join("")},a.stringRepeat=function(s,l){for(var d="";l>0;)l&1&&(d+=s),(l>>=1)&&(s+=s);return d};var u=/^\s\s*/,c=/\s\s*$/;a.stringTrimLeft=function(s){return s.replace(u,"")},a.stringTrimRight=function(s){return s.replace(c,"")},a.copyObject=function(s){var l={};for(var d in s)l[d]=s[d];return l},a.copyArray=function(s){for(var l=[],d=0,f=s.length;d<f;d++)s[d]&&typeof s[d]=="object"?l[d]=this.copyObject(s[d]):l[d]=s[d];return l},a.deepCopy=n("./deep_copy").deepCopy,a.arrayToMap=function(s){for(var l={},d=0;d<s.length;d++)l[s[d]]=1;return l},a.createMap=function(s){var l=Object.create(null);for(var d in s)l[d]=s[d];return l},a.arrayRemove=function(s,l){for(var d=0;d<=s.length;d++)l===s[d]&&s.splice(d,1)},a.escapeRegExp=function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},a.escapeHTML=function(s){return(""+s).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},a.getMatchOffsets=function(s,l){var d=[];return s.replace(l,function(f){d.push({offset:arguments[arguments.length-2],length:f.length})}),d},a.deferredCall=function(s){var l=null,d=function(){l=null,s()},f=function(g){return f.cancel(),l=setTimeout(d,g||0),f};return f.schedule=f,f.call=function(){return this.cancel(),s(),f},f.cancel=function(){return clearTimeout(l),l=null,f},f.isPending=function(){return l},f},a.delayedCall=function(s,l){var d=null,f=function(){d=null,s()},g=function(_){d==null&&(d=setTimeout(f,_||l))};return g.delay=function(_){d&&clearTimeout(d),d=setTimeout(f,_||l)},g.schedule=g,g.call=function(){this.cancel(),s()},g.cancel=function(){d&&clearTimeout(d),d=null},g.isPending=function(){return d},g},a.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},a.skipEmptyMatch=function(s,l,d){return d&&s.codePointAt(l)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,a,r){a.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},a.getOS=function(){return a.isMac?a.OS.MAC:a.isLinux?a.OS.LINUX:a.OS.WINDOWS};var u=typeof navigator=="object"?navigator:{},c=(/mac|win|linux/i.exec(u.platform)||["other"])[0].toLowerCase(),s=u.userAgent||"",l=u.appName||"";a.isWin=c=="win",a.isMac=c=="mac",a.isLinux=c=="linux",a.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),a.isOldIE=a.isIE&&a.isIE<9,a.isGecko=a.isMozilla=s.match(/ Gecko\/\d+/),a.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",a.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,a.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,a.isSafari=parseFloat(s.split(" Safari/")[1])&&!a.isChrome||void 0,a.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,a.isAIR=s.indexOf("AdobeAIR")>=0,a.isAndroid=s.indexOf("Android")>=0,a.isChromeOS=s.indexOf(" CrOS ")>=0,a.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,a.isIOS&&(a.isMac=!0),a.isMobile=a.isIOS||a.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,a,r){var u=n("./useragent"),c="http://www.w3.org/1999/xhtml";a.buildDom=function _(m,v,h){if(typeof m=="string"&&m){var C=document.createTextNode(m);return v&&v.appendChild(C),C}if(!Array.isArray(m))return m&&m.appendChild&&v&&v.appendChild(m),m;if(typeof m[0]!="string"||!m[0]){for(var p=[],y=0;y<m.length;y++){var S=_(m[y],v,h);S&&p.push(S)}return p}var w=document.createElement(m[0]),j=m[1],b=1;j&&typeof j=="object"&&!Array.isArray(j)&&(b=2);for(var y=b;y<m.length;y++)_(m[y],w,h);return b==2&&Object.keys(j).forEach(function(M){var P=j[M];M==="class"?w.className=Array.isArray(P)?P.join(" "):P:typeof P=="function"||M=="value"||M[0]=="$"?w[M]=P:M==="ref"?h&&(h[P]=w):M==="style"?typeof P=="string"&&(w.style.cssText=P):P!=null&&w.setAttribute(M,P)}),v&&v.appendChild(w),w},a.getDocumentHead=function(_){return _||(_=document),_.head||_.getElementsByTagName("head")[0]||_.documentElement},a.createElement=function(_,m){return document.createElementNS?document.createElementNS(m||c,_):document.createElement(_)},a.removeChildren=function(_){_.innerHTML=""},a.createTextNode=function(_,m){var v=m?m.ownerDocument:document;return v.createTextNode(_)},a.createFragment=function(_){var m=_?_.ownerDocument:document;return m.createDocumentFragment()},a.hasCssClass=function(_,m){var v=(_.className+"").split(/\s+/g);return v.indexOf(m)!==-1},a.addCssClass=function(_,m){a.hasCssClass(_,m)||(_.className+=" "+m)},a.removeCssClass=function(_,m){for(var v=_.className.split(/\s+/g);;){var h=v.indexOf(m);if(h==-1)break;v.splice(h,1)}_.className=v.join(" ")},a.toggleCssClass=function(_,m){for(var v=_.className.split(/\s+/g),h=!0;;){var C=v.indexOf(m);if(C==-1)break;h=!1,v.splice(C,1)}return h&&v.push(m),_.className=v.join(" "),h},a.setCssClass=function(_,m,v){v?a.addCssClass(_,m):a.removeCssClass(_,m)},a.hasCssString=function(_,m){var v=0,h;if(m=m||document,h=m.querySelectorAll("style")){for(;v<h.length;)if(h[v++].id===_)return!0}},a.removeElementById=function(_,m){m=m||document,m.getElementById(_)&&m.getElementById(_).remove()};var s,l=[];a.useStrictCSP=function(_){s=_,_==!1?d():l||(l=[])};function d(){var _=l;l=null,_&&_.forEach(function(m){f(m[0],m[1])})}function f(_,m,v){if(!(typeof document>"u")){if(l){if(v)d();else if(v===!1)return l.push([_,m])}if(!s){var h=v;!v||!v.getRootNode?h=document:(h=v.getRootNode(),(!h||h==v)&&(h=document));var C=h.ownerDocument||h;if(m&&a.hasCssString(m,h))return null;m&&(_+=`
|
|
35409
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JKn(e,t){if(e){if(typeof e=="string")return hWn(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 hWn(e,t)}}function hWn(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 Kcu(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,s;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(l){u=!0,s=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw s}}return a}}function Ycu(e){if(Array.isArray(e))return e}function qKn(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 Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qKn(Object(n),!0).forEach(function(a){CWn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qKn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function CWn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ubt(e,t){if(e==null)return{};var n=Xcu(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 Xcu(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 bWn=o.forwardRef(function(e,t){var n=e.children,a=Ubt(e,zcu),r=Gbt(a),u=r.open,c=Ubt(r,Hcu);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(Xt(Xt({},c),{},{open:u})))});bWn.displayName="Dropzone";var eYn={disabled:!1,getFilesFromEvent:ccu,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};bWn.defaultProps=eYn,bWn.propTypes={children:F.func,accept:F.objectOf(F.arrayOf(F.string)),multiple:F.bool,preventDropOnDocument:F.bool,noClick:F.bool,noKeyboard:F.bool,noDrag:F.bool,noDragEventsBubbling:F.bool,minSize:F.number,maxSize:F.number,maxFiles:F.number,disabled:F.bool,getFilesFromEvent:F.func,onFileDialogCancel:F.func,onFileDialogOpen:F.func,useFsAccessApi:F.bool,autoFocus:F.bool,onDragEnter:F.func,onDragLeave:F.func,onDragOver:F.func,onDrop:F.func,onDropAccepted:F.func,onDropRejected:F.func,onError:F.func,validator:F.func};var yWn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Gbt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Xt(Xt({},eYn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,s=t.multiple,l=t.maxFiles,d=t.onDragEnter,f=t.onDragLeave,g=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,C=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,S=t.preventDropOnDocument,w=t.noClick,j=t.noKeyboard,b=t.noDrag,M=t.noDragEventsBubbling,P=t.onError,k=t.validator,W=o.useMemo(function(){return xcu(n)},[n]),I=o.useMemo(function(){return $cu(n)},[n]),D=o.useMemo(function(){return typeof C=="function"?C:tYn},[C]),E=o.useMemo(function(){return typeof h=="function"?h:tYn},[h]),L=o.useRef(null),B=o.useRef(null),$=o.useReducer(Qcu,yWn),x=vWn($,2),R=x[0],H=x[1],z=R.isFocused,N=R.isFileDialogActive,K=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&Wcu()),Z=function(){!K.current&&N&&setTimeout(function(){if(B.current){var Le=B.current.files;Le.length||(H({type:"closeDialog"}),E())}},300)};o.useEffect(function(){return window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)}},[B,N,E,K]);var T=o.useRef([]),U=function(Le){L.current&&L.current.contains(Le.target)||(Le.preventDefault(),T.current=[])};o.useEffect(function(){return S&&(document.addEventListener("dragover",YKn,!1),document.addEventListener("drop",U,!1)),function(){S&&(document.removeEventListener("dragover",YKn),document.removeEventListener("drop",U))}},[L,S]),o.useEffect(function(){return!a&&y&&L.current&&L.current.focus(),function(){}},[L,y,a]);var Y=o.useCallback(function(me){P?P(me):console.error(me)},[P]),te=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me),T.current=[].concat(Ncu(T.current),[me.target]),Zbt(me)&&Promise.resolve(r(me)).then(function(Le){if(!(Tbt(me)&&!M)){var ae=Le.length,le=ae>0&&Scu({files:Le,accept:W,minSize:c,maxSize:u,multiple:s,maxFiles:l,validator:k}),ye=ae>0&&!le;H({isDragAccept:le,isDragReject:ye,isDragActive:!0,type:"setDraggedFiles"}),d&&d(me)}}).catch(function(Le){return Y(Le)})},[r,d,Y,M,W,c,u,s,l,k]),re=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me);var Le=Zbt(me);if(Le&&me.dataTransfer)try{me.dataTransfer.dropEffect="copy"}catch{}return Le&&g&&g(me),!1},[g,M]),q=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me);var Le=T.current.filter(function(le){return L.current&&L.current.contains(le)}),ae=Le.indexOf(me.target);ae!==-1&&Le.splice(ae,1),T.current=Le,!(Le.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Zbt(me)&&f&&f(me))},[L,f,M]),ie=o.useCallback(function(me,Le){var ae=[],le=[];me.forEach(function(ye){var ge=GKn(ye,W),Be=vWn(ge,2),Qe=Be[0],dt=Be[1],vt=KKn(ye,c,u),ut=vWn(vt,2),Ye=ut[0],$t=ut[1],kn=k?k(ye):null;if(Qe&&Ye&&!kn)ae.push(ye);else{var e1=[dt,$t];kn&&(e1=e1.concat(kn)),le.push({file:ye,errors:e1.filter(function(xn){return xn})})}}),(!s&&ae.length>1||s&&l>=1&&ae.length>l)&&(ae.forEach(function(ye){le.push({file:ye,errors:[kcu]})}),ae.splice(0)),H({acceptedFiles:ae,fileRejections:le,type:"setFiles"}),_&&_(ae,le,Le),le.length>0&&v&&v(le,Le),ae.length>0&&m&&m(ae,Le)},[H,s,W,c,u,l,_,m,v,k]),de=o.useCallback(function(me){me.preventDefault(),me.persist(),We(me),T.current=[],Zbt(me)&&Promise.resolve(r(me)).then(function(Le){Tbt(me)&&!M||ie(Le,me)}).catch(function(Le){return Y(Le)}),H({type:"reset"})},[r,ie,Y,M]),oe=o.useCallback(function(){if(K.current){H({type:"openDialog"}),D();var me={multiple:s,types:I};window.showOpenFilePicker(me).then(function(Le){return r(Le)}).then(function(Le){ie(Le,null),H({type:"closeDialog"})}).catch(function(Le){Acu(Le)?(E(Le),H({type:"closeDialog"})):Rcu(Le)?(K.current=!1,B.current?(B.current.value=null,B.current.click()):Y(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."))):Y(Le)});return}B.current&&(H({type:"openDialog"}),D(),B.current.value=null,B.current.click())},[H,D,E,p,ie,Y,I,s]),ze=o.useCallback(function(me){!L.current||!L.current.isEqualNode(me.target)||(me.key===" "||me.key==="Enter"||me.keyCode===32||me.keyCode===13)&&(me.preventDefault(),oe())},[L,oe]),_e=o.useCallback(function(){H({type:"focus"})},[]),ue=o.useCallback(function(){H({type:"blur"})},[]),he=o.useCallback(function(){w||(Bcu()?setTimeout(oe,0):oe())},[w,oe]),Me=function(Le){return a?null:Le},se=function(Le){return j?null:Me(Le)},Se=function(Le){return b?null:Me(Le)},We=function(Le){M&&Le.stopPropagation()},Ge=o.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Le=me.refKey,ae=Le===void 0?"ref":Le,le=me.role,ye=me.onKeyDown,ge=me.onFocus,Be=me.onBlur,Qe=me.onClick,dt=me.onDragEnter,vt=me.onDragOver,ut=me.onDragLeave,Ye=me.onDrop,$t=Ubt(me,Vcu);return Xt(Xt(CWn({onKeyDown:se(il(ye,ze)),onFocus:se(il(ge,_e)),onBlur:se(il(Be,ue)),onClick:Me(il(Qe,he)),onDragEnter:Se(il(dt,te)),onDragOver:Se(il(vt,re)),onDragLeave:Se(il(ut,q)),onDrop:Se(il(Ye,de)),role:typeof le=="string"&&le!==""?le:"presentation"},ae,L),!a&&!j?{tabIndex:0}:{}),$t)}},[L,ze,_e,ue,he,te,re,q,de,j,b,a]),Ze=o.useCallback(function(me){me.stopPropagation()},[]),It=o.useMemo(function(){return function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Le=me.refKey,ae=Le===void 0?"ref":Le,le=me.onChange,ye=me.onClick,ge=Ubt(me,Fcu),Be=CWn({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:Me(il(le,de)),onClick:Me(il(ye,Ze)),tabIndex:-1},ae,B);return Xt(Xt({},Be),ge)}},[B,n,s,de,a]);return Xt(Xt({},R),{},{isFocused:z&&!a,getRootProps:Ge,getInputProps:It,rootRef:L,inputRef:B,open:Me(oe)})}function Qcu(e,t){switch(t.type){case"focus":return Xt(Xt({},e),{},{isFocused:!0});case"blur":return Xt(Xt({},e),{},{isFocused:!1});case"openDialog":return Xt(Xt({},yWn),{},{isFileDialogActive:!0});case"closeDialog":return Xt(Xt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Xt(Xt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Xt(Xt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Xt({},yWn);default:return e}}function tYn(){}const nYn=({fileRejections:e})=>e.length?O.jsx(A.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>ve(t.palette.error.main,.08),borderColor:t=>ve(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=gWn(t);return O.jsxs(A.Box,{sx:{my:1},children:[O.jsxs(A.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?eWn(r):""]}),n.map(u=>O.jsxs(A.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,Jcu=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return O.jsx(A.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:O.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},qcu=zt("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 ${ve(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),elu=({header:e,description:t,sx:n,...a})=>O.jsxs(A.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[O.jsx(jxn,{sx:{width:220}}),O.jsxs("div",{children:[O.jsx(A.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),O.jsx(A.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||O.jsxs(O.Fragment,{children:["Solte os arquivos aqui ou clique",O.jsx(A.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),rYn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:s,thumbnail:l,onRemove:d,onHandleMainImage:f,mainUrl:g,sx:_,dropZoneProps:m,placeholderProps:v,placeholderAlt:h,image:C,tabIndex:p,...y})=>{const{getRootProps:S,getInputProps:w,isDragActive:j,isDragReject:b,fileRejections:M}=Gbt({multiple:n,disabled:t,...y}),P=!!u&&!n||C,k=s&&n&&s.length>0,W=b||!!a;return O.jsxs(A.Box,{sx:{width:1,position:"relative",..._},children:[O.jsxs(qcu,{...S(),sx:{...j&&{opacity:.72},...W&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...m},children:[O.jsx("input",{...w(),id:e,tabIndex:p}),h?O.jsx(A.Stack,{sx:{...P&&{opacity:0}},children:h}):O.jsx(elu,{sx:{...P&&{opacity:0}},header:v==null?void 0:v.title,description:v==null?void 0:v.description}),P&&O.jsx(Jcu,{file:u||C||""})]}),r&&O.jsx(A.FormHelperText,{error:!!a,sx:I=>({mx:"14px",color:t?I.palette.grey[500]:void 0}),children:r}),O.jsx(nYn,{fileRejections:M}),P&&c&&O.jsx(A.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:I=>ve(I.palette.common.white,.8),bgcolor:I=>ve(I.palette.grey[900],.72),"&:hover":{bgcolor:I=>ve(I.palette.grey[900],.48)}},children:O.jsx(we,{icon:"CLOSE_MARK_BUTTON",width:18})}),k&&O.jsx(O.Fragment,{children:O.jsx(A.Box,{sx:{my:3},children:O.jsx(acu,{files:s,thumbnail:l,onRemove:d,onHandleMainImage:f,mainUrl:g})})})]})},tlu=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return O.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},nlu=zt("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 ${ve(e.palette.grey[500],.32)}`})),rlu=zt("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})})),aYn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...s})=>{const{getRootProps:l,getInputProps:d,isDragActive:f,isDragReject:g,fileRejections:_}=Gbt({multiple:!1,disabled:a,...s}),m=!!t||n,v=g||!!e;return O.jsxs(O.Fragment,{children:[O.jsxs(nlu,{...l(),sx:{...f&&{opacity:.72},...v&&{borderColor:"error.light",...m&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...m&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[O.jsx("input",{...d(),tabIndex:c}),m&&O.jsx(tlu,{file:t||n||""}),O.jsxs(rlu,{className:"placeholder",sx:{"&:hover":{opacity:.72},...m&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>ve(h.palette.grey[900],.64)},...v&&{color:"error.main",bgcolor:"error.lighter"}},children:[O.jsx(we,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),O.jsx(A.Typography,{variant:"caption",children:t?"Atualizar foto":"Carregar foto"})]})]}),r&&r,O.jsx(nYn,{fileRejections:_})]})},alu=zt("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:ve(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),ilu=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:s,isDragActive:l,isDragReject:d}=Gbt({disabled:n,...u}),f=d||t;return O.jsxs(alu,{...c(),sx:{...l&&{opacity:.72},...f&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[O.jsx("input",{...s(),tabIndex:r}),e||O.jsx(we,{icon:"CLOUD_UPLOAD",width:28})]})},iYn=({onFileCropped:e,onImageUploaded:t,onCancel:n})=>{const a=o.useId(),[r,u]=o.useState(),[c,s,l]=xmt(),[d,f]=o.useState();return{id:a,setCropModalOpen:l,handleRemove:()=>{e(void 0),t(void 0),l(!1)},toggleCropModalOpen:s,cropModalOpen:c,cancelChanges:()=>{n&&n(),l(!1)},saveChanges:()=>{r!==void 0&&r.getCroppedCanvas().toBlob(C=>{if(!C)return;const p=new File([C],"imagem");e(p),s()},"image/png",1)},previewImage:()=>{r!==void 0&&f(r.getCroppedCanvas().toDataURL())},setCropper:u,preview:d,closePreviewImage:()=>f(void 0)}},oYn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,onPreview:c,imageSrc:s,aspectRatio:l,onInitialized:d})=>{const[f,g]=o.useState(.5);return O.jsx(MKn,{open:t,onClose:n,dialogTitle:a,actions:O.jsxs(O.Fragment,{children:[O.jsx(A.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),O.jsx(A.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),fullWidth:!0,maxWidth:"sm",keepMounted:!0,children:O.jsxs(A.Stack,{gap:2,children:[O.jsx(tKn,{imageSrc:s,aspectRatio:l,onInitialized:d,zoom:f,onZoomChange:g}),O.jsxs(A.Stack,{gap:1.5,children:[O.jsxs(A.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",children:[O.jsx(A.Typography,{variant:"body1",children:"Zoom"}),O.jsx(A.Slider,{value:f,onChange:(_,m)=>g(Array.isArray(m)?m[0]:m),min:.1,max:2,size:"medium",step:.0125})]}),O.jsxs(A.Stack,{direction:"row",gap:2,children:[O.jsx(A.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:O.jsx(we,{icon:"DELETE_MARK_BUTTON_02"}),onClick:u,children:"Remover"}),O.jsx(A.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:O.jsx(we,{icon:"PLAY_SIMPLE"}),onClick:c,children:"Pré-visualizar"}),O.jsx(A.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:O.jsx(we,{icon:"SEARCH_IMAGE"}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})})},olu=A.styled(A.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ulu=A.styled(A.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:A.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),clu=A.styled(A.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),uYn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,label:r,image:u="",uploading:c,file:s,tabIndex:l,...d})=>{const{id:f,setCropModalOpen:g,handleRemove:_,toggleCropModalOpen:m,cropModalOpen:v,cancelChanges:h,saveChanges:C,previewImage:p,setCropper:y,preview:S,closePreviewImage:w}=iYn({onFileCropped:e,onImageUploaded:t,onCancel:n});return O.jsxs(O.Fragment,{children:[O.jsxs(olu,{children:[c&&O.jsx(Obt,{}),O.jsx(rYn,{...d,id:f,file:s,onDrop:j=>{if(j.length>0){g(!0);const b=new FileReader;b.addEventListener("load",()=>{var P;const M=((P=b.result)==null?void 0:P.toString())||"";t(M),e(void 0)}),b.readAsDataURL(j[0])}},image:u,tabIndex:l}),(s||u)&&O.jsxs(ulu,{className:"actions",children:[O.jsx(A.Button,{color:"inherit",startIcon:O.jsx(we,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:_,children:"Remover"}),O.jsx(A.Button,{color:"inherit",startIcon:O.jsx(we,{icon:"SEARCH_IMAGE",color:"primary.maon"}),onClick:m,children:"Editar"})]})]}),O.jsx(oYn,{id:f,open:v,onClose:h,label:r,aspectRatio:a,imageSrc:u,onRemove:_,onSave:C,onPreview:p,onInitialized:y}),O.jsx(A.Dialog,{open:!!S,onClose:w,scroll:"body",PaperProps:{sx:{p:2}},children:S&&O.jsx("img",{src:S,alt:"Preview"})})]})},llu=A.styled(A.Stack)(({theme:e})=>({backgroundColor:"#fff",border:`1px solid ${e.palette.grey[300]}`})),cYn=({children:e,...t})=>O.jsx(llu,{borderRadius:1,gap:3,padding:3,...t,children:e}),slu=A.styled(A.Box)(()=>({marginLeft:"4px",fontWeight:"fontWeightBold"})),flu=A.styled(A.Button)(()=>({fontWeight:"fontWeightSemiBold"})),dlu=A.styled(we)(({theme:e})=>({color:e.palette.primary.main})),glu=({selectedTitle:e,onSelect:t,options:n})=>{const a=Amt();return O.jsxs(O.Fragment,{children:[O.jsx(flu,{disableRipple:!0,color:"inherit",onClick:a.onOpen,endIcon:O.jsx(dlu,{icon:a.open?"CHEVRON_UP":"ARROW_DOWN_SIMPLE"}),children:O.jsx(slu,{component:"span",children:e.label})}),O.jsx(wKn,{open:a.open,onClose:a.onClose,children:n.map(r=>O.jsx(A.MenuItem,{selected:r.value===e.value,onClick:()=>{a.onClose(),t(r.value)},children:r.label},r.value))})]})},_lu=A.styled(A.Stack)({display:"grid",gridTemplateColumns:"auto auto"}),mlu=A.styled(A.Typography)(({theme:e})=>({color:e.palette.grey[600]})),vlu=A.styled(A.Typography)(({theme:e})=>({textAlign:"right",color:e.palette.grey[800]})),hlu=({data:e,...t})=>e.length===0?null:O.jsx(_lu,{gap:1,...t,children:e.map(n=>[O.jsx(mlu,{variant:"body2",children:n.label},`label:${n.id}`),O.jsx(vlu,{variant:"body2",children:n.value},`value:${n.id}`)])}),Clu=A.styled(A.Stack)(({theme:e})=>({backgroundColor:"#fff",minWidth:"250px",padding:24,minHeight:"100vh",borderRight:`1px solid ${e.palette.grey[300]}`})),blu=A.styled(A.Stack)(({theme:e})=>({backgroundColor:"#fff",position:"sticky",top:0,zIndex:999,width:"100%",padding:24,gap:24,borderBottom:`1px solid ${e.palette.grey[300]}`})),ylu=A.styled(A.Stack)({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:24}),plu=A.styled(A.Stack)(({theme:e})=>({height:"100%",width:"50%",flex:1,[e.breakpoints.down(1680)]:{width:"70%"}})),Olu=A.styled(A.Typography)(({theme:e})=>({color:e.palette.grey[800],fontSize:18,fontWeight:700})),jlu=A.styled(A.Typography)(({theme:e})=>({color:e.palette.grey[500],fontSize:14,fontWeight:400,paddingBottom:24})),wlu=A.styled(A.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}})),Mlu=A.styled(ZT)(()=>({height:1,"& .simplebar-content":{height:1}})),Llu=A.styled(A.Stack)(()=>({position:"fixed",width:"202px"})),Plu=({title:e,sections:t,headerLeftContent:n,headerRightContent:a,onClickBack:r})=>O.jsx(A.Stack,{children:O.jsxs(A.Stack,{direction:"row",children:[O.jsx(Clu,{children:O.jsx(Mlu,{children:O.jsxs(Llu,{children:[O.jsx(A.Typography,{variant:"overline",color:"text.disabled",fontWeight:700,children:"ACESSO RÁPIDO"}),t.map((u,c)=>O.jsxs(A.Stack,{children:[O.jsxs(wlu,{onClick:()=>{u.ref.current&&u.ref.current.scrollIntoView({block:"end",behavior:"smooth"})},children:[u.title,u.isRequired&&O.jsx("span",{children:"*"})]}),c<t.length-1&&O.jsx(A.Divider,{})]},c))]})})}),O.jsxs(A.Stack,{width:"100%",alignItems:"center",mb:8,children:[O.jsx(blu,{children:O.jsxs(ylu,{children:[O.jsxs(A.Stack,{flexDirection:"row",gap:2,children:[O.jsx(A.IconButton,{color:"primary",onClick:()=>r(),children:O.jsx(we,{icon:"CHEVRON_LEFT"})}),O.jsx(A.Typography,{variant:"h4",children:e}),n]}),O.jsxs(A.Stack,{direction:"row",gap:2,alignItems:"center",minWidth:"max-content",children:[O.jsx(xDn,{disabled:!0}),a]})]})}),O.jsx(plu,{children:t.map(u=>O.jsxs(A.Stack,{ref:u.ref,paddingTop:3,paddingBottom:2,alignItems:"start",width:"100%",children:[O.jsx(Olu,{children:u.title}),O.jsx(jlu,{children:u.subTitle}),O.jsx(cYn,{width:"100%",borderRadius:1,gap:1.5,padding:3,children:u.child})]},u.title))})]})]})}),Elu=A.styled(A.Box)(({theme:e})=>({padding:24,borderRadius:8,height:"auto",maxWidth:800,backgroundColor:e.palette.background.default,border:`1px solid ${e.palette.grey[300]}`})),klu=A.styled(A.Stack)(({theme:e})=>({minHeight:180,maxWidth:700,border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff",padding:24})),Slu=A.styled(A.Box)(()=>({maxWidth:70,maxHeight:40,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),Dlu=A.styled(A.Box)(({theme:e})=>({backgroundColor:e.palette.background.default,maxWidth:90,maxHeight:80,alignItems:"center","&, img":{flex:1,display:"flex",objectFit:"cover",borderRadius:8}})),lYn=A.styled(A.Stack)(({theme:e})=>({border:`4px dotted ${e.palette.grey[300]}`,borderRadius:8,backgroundColor:"#fff"})),Ilu=A.styled(A.Box)(({theme:e})=>({width:"auto",height:120,overflow:"hidden",padding:2,borderBottom:`4px dotted ${e.palette.grey[300]}`})),Blu=({titlePreview:e,logoImage:t,brandingName:n,url:a,title:r,description:u,keyWords:c,customTitles:s,productImage:l,child:d,previewLinkImage:f,hasPreviewLink:g})=>O.jsx(Elu,{children:O.jsxs(A.Stack,{gap:3,display:"flex",flex:1,children:[O.jsx(A.Typography,{variant:"overline",color:"text.disabled",children:e??"PRÉ-VISUALIZAÇÃO"}),O.jsxs(klu,{children:[O.jsxs(A.Stack,{direction:"row",pb:3,gap:.5,children:[O.jsx(A.Box,{height:0,width:10,children:O.jsx(we,{icon:"CIRCLE",width:30,color:"error.main"})}),O.jsx(A.Box,{height:0,width:10,children:O.jsx(we,{icon:"CIRCLE",width:30,color:"warning.main"})}),O.jsx(A.Box,{height:0,width:10,children:O.jsx(we,{icon:"CIRCLE",width:30,color:"success.main"})})]}),O.jsxs(A.Stack,{flexDirection:"row",gap:2,justifyContent:"space-between",children:[O.jsxs(A.Stack,{gap:1,width:"100%",children:[O.jsxs(A.Stack,{direction:"row",gap:1.5,pb:.5,children:[t&&O.jsx(Slu,{children:O.jsx("img",{alt:"Logo",src:t})}),O.jsxs(A.Stack,{children:[O.jsx(A.Typography,{variant:"overline",color:"grey.600",pb:.5,children:n??"SUAEMPRESA"}),O.jsxs(A.Stack,{direction:"row",gap:2,children:[O.jsx(A.Typography,{variant:"caption",color:"grey.600",children:a??"https://www.exemplo.com"}),O.jsx(we,{icon:"MORE_OPTIONS_VERTICAL",width:15,color:"grey.500"})]})]})]}),O.jsx(Wj,{variant:"subtitle1",color:"#4E5BEC",overflow:"hidden",textOverflow:"ellipsis",line:5,children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),O.jsx(Wj,{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&&O.jsx(A.Stack,{direction:"row",gap:1,alignItems:"center",children:c.map((_,m)=>O.jsxs(O.Fragment,{children:[O.jsx(A.Typography,{variant:"caption",color:"text.disabled",children:_}),m<c.length-1&&O.jsx(A.Box,{width:4,height:16,children:O.jsx(we,{icon:"CIRCLE",color:"text.disabled",width:10})})]}))}),s&&O.jsx(A.Stack,{pt:2,children:s.map((_,m)=>O.jsxs(A.Stack,{gap:1,children:[O.jsx(A.Typography,{variant:"subtitle1",color:"#4E5BEC",children:_.title}),O.jsx(Wj,{variant:"caption",color:"text.disabled",overflow:"hidden",textOverflow:"ellipsis",line:1,children:_.description??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys stansince the 1500"})]},m))}),d]}),l&&O.jsx(Dlu,{children:O.jsx("img",{alt:"ProductImage",src:l})})]})]}),g&&O.jsxs(A.Stack,{gap:3,display:"flex",flex:1,width:"100%",children:[O.jsx(A.Typography,{variant:"overline",color:"text.disabled",children:"pré-visualização link de compartilhamento".toUpperCase()}),O.jsxs(lYn,{children:[f&&O.jsx(Ilu,{children:O.jsx("img",{alt:"PreviewLinkImage",src:f,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:8}})}),O.jsxs(A.Stack,{gap:.2,p:2,width:"100%",children:[O.jsx(A.Typography,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),O.jsx(A.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!"}),O.jsx(A.Typography,{variant:"caption",color:"grey.500",children:a??"https://www.exemplo.com"})]})]}),O.jsx(lYn,{children:O.jsxs(A.Stack,{direction:"row",gap:1,alignItems:"center",children:[O.jsx(A.Box,{width:100,height:95,bgcolor:"grey.100",p:.5,alignItems:"center",children:O.jsx("img",{alt:"Logo",src:t,style:{width:"100%",height:"100%",objectFit:"contain",borderRadius:8}})}),O.jsxs(A.Stack,{padding:1,gap:.2,width:"80%",children:[O.jsx(Wj,{variant:"caption",children:r??"Suampresa | Páscoa 2024: Ovos de chocolate? Que nada! Descontos em tecnologia!"}),O.jsx(Wj,{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!"}),O.jsx(Wj,{variant:"caption",color:"grey.500",line:1,children:a??"https://www.exemplo.com"})]})]})})]})]})}),Wlu=A.styled(iWn)(({theme:e})=>({backgroundColor:`${A.alpha(e.palette.grey[400],.2)}`,cursor:"pointer"})),$lu=A.styled(ZT)(()=>({maxHeight:"260px"})),xlu=({items:e})=>{const{setValue:t,getValues:n}=Re.useFormContext(),[a,r]=o.useState(-1),[u,c]=o.useState(""),s=Object.fromEntries(e.map((C,p)=>[p,[]])),[l,d]=o.useState(s);o.useEffect(()=>()=>{t("config",{})},[]);const f=(C,p)=>{r(p?C:-1),p&&g()},g=()=>{c("")},_=(C,p,y)=>{const S=y.target.checked?[...l[a],p]:l[a].filter(w=>w!==p);d({...l,[a]:S}),h(C,S)},m=C=>{c(C)},v=()=>{const p=e[a].list.every(y=>l[a].includes(y.value))?[]:[...e[a].list.map(y=>y.value)];d({...l,[a]:p}),h(e[a].name,p)},h=(C,p)=>{const y={},S=n("config"),w=e[a];if(w){const j=w.list.filter(b=>l[a].includes(b.value)).map(b=>b.value);y[w.name]={type:"FIELD",values:w.name===C?p:j},t("config",{...S,...y})}};return O.jsx(O.Fragment,{children:e.map((C,p)=>O.jsxs(A.Accordion,{expanded:a===p,onChange:(y,S)=>f(p,S),children:[O.jsx(A.AccordionSummary,{expandIcon:O.jsx(we,{icon:"CHEVRON_UP"}),id:`${p}`,children:O.jsxs(A.Stack,{alignItems:"center",direction:"row",children:[O.jsx(A.Typography,{variant:"subtitle2",color:"grey.600",children:C.label}),O.jsxs(Wlu,{variant:"soft",color:"primary",marginLeft:1,children:[l[p].length," selecionados"]})]})}),O.jsxs(A.AccordionDetails,{children:[O.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",gap:1,children:[O.jsx(Fle,{onSearch:m,onChange:y=>m(y.target.value),iconPosition:"start",size:"small",placeholder:"Buscar",value:u,fullWidth:!0}),O.jsx(A.Button,{onClick:()=>v(),size:"small",children:O.jsx(A.Typography,{variant:"overline",children:"TODOS"})})]}),O.jsx($lu,{children:O.jsx(A.List,{children:a>-1&&(C.list.filter(y=>y.label.toLowerCase().includes(u.toLowerCase())).map((y,S)=>O.jsx(A.ListItem,{children:O.jsx(A.FormControlLabel,{control:O.jsx(A.Checkbox,{size:"small",checked:l[a].includes(y.value),onChange:w=>_(C.name,y.value,w),name:y.label}),label:O.jsx(A.Typography,{variant:"caption",color:"grey.600",children:y.label})})},S)).length===0?O.jsx(uvt,{sx:{svg:{height:100}},text:"Nenhum registro para ser apresentado"}):C.list.filter(y=>y.label.toLowerCase().includes(u.toLowerCase())).map((y,S)=>O.jsx(A.ListItem,{children:O.jsx(A.FormControlLabel,{control:O.jsx(A.Checkbox,{size:"small",checked:l[a].includes(y.value),onChange:w=>_(C.name,y.value,w),name:y.label}),label:O.jsx(A.Typography,{variant:"caption",color:"grey.600",children:y.label})})},S)))})})]})]},p))})},Alu=({columns:e,rows:t,loading:n,fetching:a,totalRows:r,handlePaginationChange:u})=>{const{setValue:c}=Re.useFormContext(),{apiRef:s,page:l,perPage:d}=zFn();o.useEffect(()=>()=>{c("config",{})},[]);const[f,g]=o.useState([]),[_,m]=o.useState(),v=C=>{g(C),c("config.products",{type:"FIELD",values:C})},h=()=>{const C=_==null?void 0:_.toLowerCase();return t.filter(p=>Object.values(p).some(y=>typeof y=="string"||y instanceof String?y.toLowerCase().includes(C||""):!1))};return O.jsxs(A.Stack,{gap:2,children:[O.jsxs(A.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[O.jsx(Fle,{onSearch:C=>m(C),onChange:C=>m(C.target.value),iconPosition:"start",size:"small",placeholder:"Buscar"}),O.jsxs(A.Typography,{variant:"body1",color:"text.disabled",children:[f.length," selecionados"]})]}),O.jsx(CBn,{apiRef:s,columns:e,rows:h(),pagination:!0,paginationModel:{page:l,pageSize:d},rowCount:r,paginationMode:"server",onPaginationModelChange:u,initialState:{pagination:{paginationModel:{pageSize:5,page:l}}},loading:n,fetching:a,checkboxSelection:!0,onRowSelectionModelChange:v})]})},Rlu=zt(A.ToggleButton)(({theme:e})=>({width:"100%","&.Mui-selected":{backgroundColor:e.palette.primary.main,color:e.palette.common.white,"&:hover":{backgroundColor:e.palette.primary.main}}})),zlu=zt(A.ToggleButtonGroup)(()=>({display:"flex",justifyContent:"space-between"})),Hlu=({rules:e,setRuleType:t})=>{const[n,a]=o.useState(),{setValue:r}=Re.useFormContext();o.useEffect(()=>{if(e&&e.length>0&&(a(e[0].value),t))return t(e[0].value)},[]),o.useEffect(()=>()=>{r("config",{})},[]);const u=(c,s)=>{if(s!==null&&(a(s),t))return t(s)};return O.jsxs(A.Stack,{gap:2,children:[O.jsx(pn,{name:"name",label:"Nome da regra",required:!0,rules:{required:{value:!0,message:"Nome da regra é obrigatório"}}}),O.jsx(A.Typography,{color:"grey.500",variant:"overline",children:"Selecione a regra"}),e&&O.jsx(zlu,{color:"primary",value:n,size:"small",exclusive:!0,onChange:u,children:e.map((c,s)=>O.jsx(Rlu,{value:c.value,size:"small",color:"primary",children:O.jsx(A.Typography,{variant:"body2",children:c.toggleTitle})},s))}),e&&e.map((c,s)=>c.value===n?O.jsx("div",{children:c.component},s):null)]})},Vlu=A.styled(A.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`}})),sYn=e=>O.jsx(Vlu,{...e});var fYn={exports:{}};(function(e,t){(function(){var n="ace",a=function(){return this}();!a&&typeof window<"u"&&(a=window);var r=function(f,g,_){if(typeof f!="string"){r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(_=g),r.modules[f]||(r.payloads[f]=_,r.modules[f]=null)};r.modules={},r.payloads={};var u=function(f,g,_){if(typeof g=="string"){var m=l(f,g);if(m!=null)return _&&_(),m}else if(Object.prototype.toString.call(g)==="[object Array]"){for(var v=[],h=0,C=g.length;h<C;++h){var p=l(f,g[h]);if(p==null&&c.original)return;v.push(p)}return _&&_.apply(null,v)||!0}},c=function(f,g){var _=u("",f,g);return _==null&&c.original?c.original.apply(this,arguments):_},s=function(f,g){if(g.indexOf("!")!==-1){var _=g.split("!");return s(f,_[0])+"!"+s(f,_[1])}if(g.charAt(0)=="."){var m=f.split("/").slice(0,-1).join("/");for(g=m+"/"+g;g.indexOf(".")!==-1&&v!=g;){var v=g;g=g.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return g},l=function(f,g){g=s(f,g);var _=r.modules[g];if(!_){if(_=r.payloads[g],typeof _=="function"){var m={},v={id:g,uri:"",exports:m,packaged:!0},h=function(p,y){return u(g,p,y)},C=_(h,m,v);m=C||v.exports,r.modules[g]=m,delete r.payloads[g]}_=r.modules[g]=m||_}return _};function d(f){var g=a;f&&(a[f]||(a[f]={}),g=a[f]),(!g.define||!g.define.packaged)&&(r.original=g.define,g.define=r,g.define.packaged=!0),(!g.require||!g.require.packaged)&&(c.original=g.require,g.require=c,g.require.packaged=!0)}d(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,a,r){function u(c,s,l){Object.defineProperty(c,s,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||u(String.prototype,"startsWith",function(c,s){return s=s||0,this.lastIndexOf(c,s)===s}),String.prototype.endsWith||u(String.prototype,"endsWith",function(c,s){var l=this;(s===void 0||s>l.length)&&(s=l.length),s-=c.length;var d=l.indexOf(c,s);return d!==-1&&d===s}),String.prototype.repeat||u(String.prototype,"repeat",function(c){for(var s="",l=this;c>0;)c&1&&(s+=l),(c>>=1)&&(l+=l);return s}),String.prototype.includes||u(String.prototype,"includes",function(c,s){return this.indexOf(c,s)!=-1}),Object.assign||(Object.assign=function(c){if(c==null)throw new TypeError("Cannot convert undefined or null to object");for(var s=Object(c),l=1;l<arguments.length;l++){var d=arguments[l];d!=null&&Object.keys(d).forEach(function(f){s[f]=d[f]})}return s}),Object.values||(Object.values=function(c){return Object.keys(c).map(function(s){return c[s]})}),Array.prototype.find||u(Array.prototype,"find",function(c){for(var s=this.length,l=arguments[1],d=0;d<s;d++){var f=this[d];if(c.call(l,f,d,this))return f}}),Array.prototype.findIndex||u(Array.prototype,"findIndex",function(c){for(var s=this.length,l=arguments[1],d=0;d<s;d++){var f=this[d];if(c.call(l,f,d,this))return d}}),Array.prototype.includes||u(Array.prototype,"includes",function(c,s){return this.indexOf(c,s)!=-1}),Array.prototype.fill||u(Array.prototype,"fill",function(c){for(var s=this,l=s.length>>>0,d=arguments[1],f=d>>0,g=f<0?Math.max(l+f,0):Math.min(f,l),_=arguments[2],m=_===void 0?l:_>>0,v=m<0?Math.max(l+m,0):Math.min(m,l);g<v;)s[g]=c,g++;return s}),Array.of||u(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,a,r){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,a,r){a.deepCopy=function u(c){if(typeof c!="object"||!c)return c;var s;if(Array.isArray(c)){s=[];for(var l=0;l<c.length;l++)s[l]=u(c[l]);return s}if(Object.prototype.toString.call(c)!=="[object Object]")return c;s={};for(var l in c)s[l]=u(c[l]);return s}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,a,r){a.last=function(s){return s[s.length-1]},a.stringReverse=function(s){return s.split("").reverse().join("")},a.stringRepeat=function(s,l){for(var d="";l>0;)l&1&&(d+=s),(l>>=1)&&(s+=s);return d};var u=/^\s\s*/,c=/\s\s*$/;a.stringTrimLeft=function(s){return s.replace(u,"")},a.stringTrimRight=function(s){return s.replace(c,"")},a.copyObject=function(s){var l={};for(var d in s)l[d]=s[d];return l},a.copyArray=function(s){for(var l=[],d=0,f=s.length;d<f;d++)s[d]&&typeof s[d]=="object"?l[d]=this.copyObject(s[d]):l[d]=s[d];return l},a.deepCopy=n("./deep_copy").deepCopy,a.arrayToMap=function(s){for(var l={},d=0;d<s.length;d++)l[s[d]]=1;return l},a.createMap=function(s){var l=Object.create(null);for(var d in s)l[d]=s[d];return l},a.arrayRemove=function(s,l){for(var d=0;d<=s.length;d++)l===s[d]&&s.splice(d,1)},a.escapeRegExp=function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},a.escapeHTML=function(s){return(""+s).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},a.getMatchOffsets=function(s,l){var d=[];return s.replace(l,function(f){d.push({offset:arguments[arguments.length-2],length:f.length})}),d},a.deferredCall=function(s){var l=null,d=function(){l=null,s()},f=function(g){return f.cancel(),l=setTimeout(d,g||0),f};return f.schedule=f,f.call=function(){return this.cancel(),s(),f},f.cancel=function(){return clearTimeout(l),l=null,f},f.isPending=function(){return l},f},a.delayedCall=function(s,l){var d=null,f=function(){d=null,s()},g=function(_){d==null&&(d=setTimeout(f,_||l))};return g.delay=function(_){d&&clearTimeout(d),d=setTimeout(f,_||l)},g.schedule=g,g.call=function(){this.cancel(),s()},g.cancel=function(){d&&clearTimeout(d),d=null},g.isPending=function(){return d},g},a.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},a.skipEmptyMatch=function(s,l,d){return d&&s.codePointAt(l)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,a,r){a.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},a.getOS=function(){return a.isMac?a.OS.MAC:a.isLinux?a.OS.LINUX:a.OS.WINDOWS};var u=typeof navigator=="object"?navigator:{},c=(/mac|win|linux/i.exec(u.platform)||["other"])[0].toLowerCase(),s=u.userAgent||"",l=u.appName||"";a.isWin=c=="win",a.isMac=c=="mac",a.isLinux=c=="linux",a.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),a.isOldIE=a.isIE&&a.isIE<9,a.isGecko=a.isMozilla=s.match(/ Gecko\/\d+/),a.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",a.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,a.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,a.isSafari=parseFloat(s.split(" Safari/")[1])&&!a.isChrome||void 0,a.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,a.isAIR=s.indexOf("AdobeAIR")>=0,a.isAndroid=s.indexOf("Android")>=0,a.isChromeOS=s.indexOf(" CrOS ")>=0,a.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,a.isIOS&&(a.isMac=!0),a.isMobile=a.isIOS||a.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,a,r){var u=n("./useragent"),c="http://www.w3.org/1999/xhtml";a.buildDom=function _(m,v,h){if(typeof m=="string"&&m){var C=document.createTextNode(m);return v&&v.appendChild(C),C}if(!Array.isArray(m))return m&&m.appendChild&&v&&v.appendChild(m),m;if(typeof m[0]!="string"||!m[0]){for(var p=[],y=0;y<m.length;y++){var S=_(m[y],v,h);S&&p.push(S)}return p}var w=document.createElement(m[0]),j=m[1],b=1;j&&typeof j=="object"&&!Array.isArray(j)&&(b=2);for(var y=b;y<m.length;y++)_(m[y],w,h);return b==2&&Object.keys(j).forEach(function(M){var P=j[M];M==="class"?w.className=Array.isArray(P)?P.join(" "):P:typeof P=="function"||M=="value"||M[0]=="$"?w[M]=P:M==="ref"?h&&(h[P]=w):M==="style"?typeof P=="string"&&(w.style.cssText=P):P!=null&&w.setAttribute(M,P)}),v&&v.appendChild(w),w},a.getDocumentHead=function(_){return _||(_=document),_.head||_.getElementsByTagName("head")[0]||_.documentElement},a.createElement=function(_,m){return document.createElementNS?document.createElementNS(m||c,_):document.createElement(_)},a.removeChildren=function(_){_.innerHTML=""},a.createTextNode=function(_,m){var v=m?m.ownerDocument:document;return v.createTextNode(_)},a.createFragment=function(_){var m=_?_.ownerDocument:document;return m.createDocumentFragment()},a.hasCssClass=function(_,m){var v=(_.className+"").split(/\s+/g);return v.indexOf(m)!==-1},a.addCssClass=function(_,m){a.hasCssClass(_,m)||(_.className+=" "+m)},a.removeCssClass=function(_,m){for(var v=_.className.split(/\s+/g);;){var h=v.indexOf(m);if(h==-1)break;v.splice(h,1)}_.className=v.join(" ")},a.toggleCssClass=function(_,m){for(var v=_.className.split(/\s+/g),h=!0;;){var C=v.indexOf(m);if(C==-1)break;h=!1,v.splice(C,1)}return h&&v.push(m),_.className=v.join(" "),h},a.setCssClass=function(_,m,v){v?a.addCssClass(_,m):a.removeCssClass(_,m)},a.hasCssString=function(_,m){var v=0,h;if(m=m||document,h=m.querySelectorAll("style")){for(;v<h.length;)if(h[v++].id===_)return!0}},a.removeElementById=function(_,m){m=m||document,m.getElementById(_)&&m.getElementById(_).remove()};var s,l=[];a.useStrictCSP=function(_){s=_,_==!1?d():l||(l=[])};function d(){var _=l;l=null,_&&_.forEach(function(m){f(m[0],m[1])})}function f(_,m,v){if(!(typeof document>"u")){if(l){if(v)d();else if(v===!1)return l.push([_,m])}if(!s){var h=v;!v||!v.getRootNode?h=document:(h=v.getRootNode(),(!h||h==v)&&(h=document));var C=h.ownerDocument||h;if(m&&a.hasCssString(m,h))return null;m&&(_+=`
|
|
35410
35410
|
/*# sourceURL=ace/css/`+m+" */");var p=a.createElement("style");p.appendChild(C.createTextNode(_)),m&&(p.id=m),h==C&&(h=a.getDocumentHead(C)),h.insertBefore(p,h.firstChild)}}}if(a.importCssString=f,a.importCssStylsheet=function(_,m){a.buildDom(["link",{rel:"stylesheet",href:_}],a.getDocumentHead(m))},a.scrollbarWidth=function(_){var m=a.createElement("ace_inner");m.style.width="100%",m.style.minWidth="0px",m.style.height="200px",m.style.display="block";var v=a.createElement("ace_outer"),h=v.style;h.position="absolute",h.left="-10000px",h.overflow="hidden",h.width="200px",h.minWidth="0px",h.height="150px",h.display="block",v.appendChild(m);var C=_&&_.documentElement||document&&document.documentElement;if(!C)return 0;C.appendChild(v);var p=m.offsetWidth;h.overflow="scroll";var y=m.offsetWidth;return p===y&&(y=v.clientWidth),C.removeChild(v),p-y},a.computedStyle=function(_,m){return window.getComputedStyle(_,"")||{}},a.setStyle=function(_,m,v){_[m]!==v&&(_[m]=v)},a.HAS_CSS_ANIMATION=!1,a.HAS_CSS_TRANSFORMS=!1,a.HI_DPI=u.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,u.isChromeOS&&(a.HI_DPI=!1),typeof document<"u"){var g=document.createElement("div");a.HI_DPI&&g.style.transform!==void 0&&(a.HAS_CSS_TRANSFORMS=!0),!u.isEdge&&typeof g.style.animationName<"u"&&(a.HAS_CSS_ANIMATION=!0),g=null}a.HAS_CSS_TRANSFORMS?a.translate=function(_,m,v){_.style.transform="translate("+Math.round(m)+"px, "+Math.round(v)+"px)"}:a.translate=function(_,m,v){_.style.top=Math.round(v)+"px",_.style.left=Math.round(m)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,a,r){/*
|
|
35411
35411
|
* based on code from:
|
|
35412
35412
|
*
|