@grapadigital/shared-app-modules 0.0.182 → 0.0.183

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,26 +1,28 @@
1
- import { l as x, V as v, c, $ as C, B as f, aI as z, aJ as I, aK as S, bf as M, ac as H, ad as _, ah as w, ag as A, ae as L, ai as j } from "./chuncks/switch.BF6I8Lqo.js";
2
- import { jsx as e, jsxs as o, Fragment as D } from "react/jsx-runtime";
3
- import { QueryErrorResetBoundary as R } from "@tanstack/react-query";
4
- import { Suspense as $, useState as B, useRef as E, useEffect as P } from "react";
5
- import { n as q } from "./chuncks/youtube-icon.component.CaEGEuTv.js";
6
- import { u as Fe, v as Me, z as He, M as _e, D as Ae, E as Le, F as je, G as De, H as Re, J as $e, K as Be, L as Ee, t as Pe, w as qe, N as Oe, O as Ke, o as Qe, p as Ve, q as Xe, r as Je, s as Ye, Q as Ge, x as We, y as Ue, R as Ze, X as et, Y as tt } from "./chuncks/youtube-icon.component.CaEGEuTv.js";
7
- import { S as b, c as O, T as K, a as Q, b as V } from "./chuncks/tooltip.BR6kaw4f.js";
8
- import { parseISO as k, differenceInCalendarDays as X, format as J } from "date-fns";
9
- const Y = [
1
+ import { aZ as p, w as S, c, F as z, B as k, aq as _, ar as M, as as I, bf as H, W as L, X as D, $ as N, _ as $, Y as j, a0 as B } from "./chuncks/switch.D4GUsewk.js";
2
+ import { jsx as e, jsxs as d, Fragment as T } from "react/jsx-runtime";
3
+ import { QueryErrorResetBoundary as O, useQuery as P } from "@tanstack/react-query";
4
+ import { Suspense as q, useState as F, useRef as A, useEffect as R, useMemo as K } from "react";
5
+ import { n as U, o as X, M as Q, p as V } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
6
+ import { w as Ve, x as Ge, E as We, Q as Ye, G as Ze, H as Je, F as et, J as tt, K as nt, L as at, N as rt, O as st, v as it, y as lt, R as ot, U as dt, q as ct, r as gt, s as ut, t as xt, u as mt, V as bt, z as ht, D as pt, W as ft, X as yt, Y as wt } from "./chuncks/youtube-icon.component.Dasmq5T5.js";
7
+ import { S as w, c as G, T as W, a as Y, b as Z, B as J } from "./chuncks/badge.Cur4Mrd7.js";
8
+ import { parseISO as v, differenceInCalendarDays as ee, format as te } from "date-fns";
9
+ import { a as ne, u as ae } from "./chuncks/use-shared-app-modules.hook.jCQwZaT8.js";
10
+ import "./chuncks/shared-app-modules.provider.DRJ7n4Cj.js";
11
+ const re = [
10
12
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
11
13
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
12
14
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
13
- ], G = x("circle-alert", Y);
14
- const W = [
15
+ ], se = p("circle-alert", re);
16
+ const ie = [
15
17
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
16
18
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
17
19
  ["path", { d: "M12 17h.01", key: "p32p05" }]
18
- ], U = x("circle-question-mark", W);
19
- const Z = [
20
+ ], le = p("circle-question-mark", ie);
21
+ const oe = [
20
22
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
21
23
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
22
- ], ee = x("copy", Z);
23
- const te = [
24
+ ], de = p("copy", oe);
25
+ const ce = [
24
26
  [
25
27
  "path",
26
28
  {
@@ -32,14 +34,14 @@ const te = [
32
34
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
33
35
  ["path", { d: "M16 13H8", key: "t4e002" }],
34
36
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
35
- ], ae = x("file-text", te);
36
- const re = [
37
+ ], ge = p("file-text", ce);
38
+ const ue = [
37
39
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
38
40
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
39
41
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
40
42
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
41
- ], ne = x("refresh-cw", re);
42
- const le = [
43
+ ], xe = p("refresh-cw", ue);
44
+ const me = [
43
45
  [
44
46
  "path",
45
47
  {
@@ -49,61 +51,61 @@ const le = [
49
51
  ],
50
52
  ["path", { d: "M12 9v4", key: "juzpu7" }],
51
53
  ["path", { d: "M12 17h.01", key: "p32p05" }]
52
- ], se = x("triangle-alert", le);
53
- function ie({
54
- icon: r = se,
55
- title: a = "Algo deu errado",
56
- description: n = "Não foi possível concluir esta operação no momento. Tente novamente em alguns instantes. Se o problema persistir, entre em contato com o suporte.",
57
- onRetry: l,
58
- tip: s,
59
- className: t,
60
- ...i
54
+ ], be = p("triangle-alert", me);
55
+ function he({
56
+ icon: a = be,
57
+ title: t = "Algo deu errado",
58
+ description: r = "Não foi possível concluir esta operação no momento. Tente novamente em alguns instantes. Se o problema persistir, entre em contato com o suporte.",
59
+ onRetry: s,
60
+ tip: i,
61
+ className: n,
62
+ ...l
61
63
  }) {
62
- return /* @__PURE__ */ e(v, { className: c(t), ...i, children: /* @__PURE__ */ o(C, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
63
- /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(r, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
64
- /* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: a }),
65
- /* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: n }),
66
- l && /* @__PURE__ */ o(f, { onClick: l, variant: "outline", className: "mt-6", children: [
67
- /* @__PURE__ */ e(ne, {}),
64
+ return /* @__PURE__ */ e(S, { className: c(n), ...l, children: /* @__PURE__ */ d(z, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
65
+ /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(a, { "aria-hidden": "true", className: "text-destructive/60 size-16" }) }),
66
+ /* @__PURE__ */ e("h3", { className: "text-foreground mb-2 text-lg font-semibold", children: t }),
67
+ /* @__PURE__ */ e("p", { className: "text-muted-foreground max-w-md text-sm leading-relaxed", children: r }),
68
+ s && /* @__PURE__ */ d(k, { onClick: s, variant: "outline", className: "mt-6", children: [
69
+ /* @__PURE__ */ e(xe, {}),
68
70
  "Tentar novamente"
69
71
  ] }),
70
- s && /* @__PURE__ */ e("div", { className: "bg-destructive/5 border-destructive/20 mt-6 rounded-lg border border-dashed px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-muted-foreground text-xs", children: s }) })
72
+ i && /* @__PURE__ */ e("div", { className: "bg-destructive/5 border-destructive/20 mt-6 rounded-lg border border-dashed px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-muted-foreground text-xs", children: i }) })
71
73
  ] }) });
72
74
  }
73
- function pe({
74
- suspenseFallback: r = oe,
75
- errorFallback: a = ie,
76
- children: n
75
+ function Ee({
76
+ suspenseFallback: a = pe,
77
+ errorFallback: t = he,
78
+ children: r
77
79
  }) {
78
- return /* @__PURE__ */ e($, { fallback: /* @__PURE__ */ e(r, {}), children: /* @__PURE__ */ e(R, { children: ({ reset: l }) => /* @__PURE__ */ e(
79
- q,
80
+ return /* @__PURE__ */ e(q, { fallback: /* @__PURE__ */ e(a, {}), children: /* @__PURE__ */ e(O, { children: ({ reset: s }) => /* @__PURE__ */ e(
81
+ U,
80
82
  {
81
- onReset: l,
82
- fallbackRender: ({ resetErrorBoundary: s, error: t }) => /* @__PURE__ */ e(a, { error: t, onRetry: s }),
83
- children: n
83
+ onReset: s,
84
+ fallbackRender: ({ resetErrorBoundary: i, error: n }) => /* @__PURE__ */ e(t, { error: n, onRetry: i }),
85
+ children: r
84
86
  }
85
87
  ) }) });
86
88
  }
87
- function oe() {
88
- return /* @__PURE__ */ e(b, { className: "h-[13.75625rem]" });
89
+ function pe() {
90
+ return /* @__PURE__ */ e(w, { className: "h-[13.75625rem]" });
89
91
  }
90
- function ye({
91
- content: r,
92
- align: a,
93
- asChild: n,
94
- className: l,
95
- openDelay: s = 0,
96
- closeDelay: t = 0,
97
- children: i,
98
- disabled: d = !1,
99
- ...m
92
+ function He({
93
+ content: a,
94
+ align: t,
95
+ asChild: r,
96
+ className: s,
97
+ openDelay: i = 0,
98
+ closeDelay: n = 0,
99
+ children: l,
100
+ disabled: o = !1,
101
+ ...x
100
102
  }) {
101
- return /* @__PURE__ */ e(D, { children: d === !0 ? i : /* @__PURE__ */ o(z, { openDelay: s, closeDelay: t, ...m, children: [
102
- /* @__PURE__ */ e(I, { asChild: n, children: i }),
103
- /* @__PURE__ */ e(S, { align: a, className: l, children: r })
103
+ return /* @__PURE__ */ e(T, { children: o === !0 ? l : /* @__PURE__ */ d(_, { openDelay: i, closeDelay: n, ...x, children: [
104
+ /* @__PURE__ */ e(M, { asChild: r, children: l }),
105
+ /* @__PURE__ */ e(I, { align: t, className: s, children: a })
104
106
  ] }) });
105
107
  }
106
- const de = {
108
+ const fe = {
107
109
  red: { bg: "bg-red-50", text: "text-red-600" },
108
110
  orange: { bg: "bg-orange-50", text: "text-orange-600" },
109
111
  amber: { bg: "bg-amber-50", text: "text-amber-600" },
@@ -126,7 +128,7 @@ const de = {
126
128
  zinc: { bg: "bg-zinc-200", text: "text-zinc-800" },
127
129
  neutral: { bg: "bg-neutral-200", text: "text-neutral-800" },
128
130
  stone: { bg: "bg-stone-200", text: "text-stone-800" }
129
- }, ce = {
131
+ }, ye = {
130
132
  red: { bg: "bg-red-500", text: "text-white" },
131
133
  orange: { bg: "bg-orange-500", text: "text-white" },
132
134
  amber: { bg: "bg-amber-500", text: "text-white" },
@@ -150,266 +152,387 @@ const de = {
150
152
  neutral: { bg: "bg-neutral-500", text: "text-white" },
151
153
  stone: { bg: "bg-stone-500", text: "text-white" },
152
154
  black: { bg: "bg-black", text: "text-white" }
153
- }, N = {
155
+ }, C = {
154
156
  xs: "size-3",
155
157
  sm: "size-4",
156
158
  md: "size-5",
157
159
  lg: "size-6",
158
160
  xl: "size-7"
159
161
  };
160
- function we({
161
- size: r,
162
- color: a,
163
- className: n,
164
- icon: l,
165
- filled: s
162
+ function Le({
163
+ size: a,
164
+ color: t,
165
+ className: r,
166
+ icon: s,
167
+ filled: i
166
168
  }) {
167
- const t = s ? ce[a] : de[a], i = r ? N[r] : N.md;
168
- return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", t?.bg, n), children: /* @__PURE__ */ e(l, { className: c(i, t?.text) }) });
169
+ const n = i ? ye[t] : fe[t], l = a ? C[a] : C.md;
170
+ return /* @__PURE__ */ e("div", { className: c("w-fit p-2 rounded-lg", n?.bg, r), children: /* @__PURE__ */ e(s, { className: c(l, n?.text) }) });
169
171
  }
170
- function ke({ className: r, ...a }) {
171
- return /* @__PURE__ */ e("div", { className: c("divide-y", r), ...a });
172
+ function De({ className: a, ...t }) {
173
+ return /* @__PURE__ */ e("div", { className: c("divide-y", a), ...t });
172
174
  }
173
- function Ne({
174
- label: r,
175
- value: a,
176
- tooltip: n,
177
- highlight: l = !1,
178
- negative: s = !1,
179
- positive: t = !1,
180
- isPercentage: i = !1,
181
- isDate: d = !1,
182
- isText: m = !1,
183
- isInvoiced: p = !1,
184
- hasCopyButton: u = !1,
185
- enableHoverableContent: T = !1,
186
- handleCopy: y
175
+ function $e({
176
+ label: a,
177
+ value: t,
178
+ tooltip: r,
179
+ highlight: s = !1,
180
+ negative: i = !1,
181
+ positive: n = !1,
182
+ isPercentage: l = !1,
183
+ isDate: o = !1,
184
+ isText: x = !1,
185
+ isInvoiced: f = !1,
186
+ hasCopyButton: b = !1,
187
+ enableHoverableContent: y = !1,
188
+ handleCopy: h
187
189
  }) {
188
- let g = "";
189
- if (d && typeof a == "string" && !p && l) {
190
- const F = k(a), h = X(F, /* @__PURE__ */ new Date());
191
- h > 15 ? g = "bg-yellow-100 font-bold" : h > 7 ? g = "bg-yellow-300 font-bold" : h >= 0 ? g = "bg-red-300 font-bold" : g = "bg-red-500 text-white font-bold";
192
- } else l && (g = "bg-[#ffe0b2] font-bold");
193
- return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", g), children: /* @__PURE__ */ o(z, { openDelay: 0, closeDelay: 0, children: [
194
- /* @__PURE__ */ e(I, { children: /* @__PURE__ */ o("div", { className: "flex justify-between", children: [
195
- /* @__PURE__ */ o(
190
+ let m = "";
191
+ if (o && typeof t == "string" && !f && s) {
192
+ const u = v(t), g = ee(u, /* @__PURE__ */ new Date());
193
+ g > 15 ? m = "bg-yellow-100 font-bold" : g > 7 ? m = "bg-yellow-300 font-bold" : g >= 0 ? m = "bg-red-300 font-bold" : m = "bg-red-500 text-white font-bold";
194
+ } else s && (m = "bg-[#ffe0b2] font-bold");
195
+ return /* @__PURE__ */ e("div", { className: c("px-2 py-1 text-sm", m), children: /* @__PURE__ */ d(_, { openDelay: 0, closeDelay: 0, children: [
196
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ d("div", { className: "flex justify-between", children: [
197
+ /* @__PURE__ */ d(
196
198
  "span",
197
199
  {
198
200
  className: c(
199
201
  "flex flex-row gap-1",
200
- s ? "text-red-600" : t ? "text-green-600" : ""
202
+ i ? "text-red-600" : n ? "text-green-600" : ""
201
203
  ),
202
204
  children: [
203
- r,
205
+ a,
204
206
  " ",
205
- /* @__PURE__ */ e(G, { className: "size-3.5" })
207
+ /* @__PURE__ */ e(se, { className: "size-3.5" })
206
208
  ]
207
209
  }
208
210
  ),
209
- /* @__PURE__ */ o(
211
+ /* @__PURE__ */ d(
210
212
  "span",
211
213
  {
212
214
  className: c(
213
215
  "flex flex-row justify-end gap-2 text-right",
214
- s ? "text-red-600" : t ? "text-green-600" : ""
216
+ i ? "text-red-600" : n ? "text-green-600" : ""
215
217
  ),
216
218
  children: [
217
- i && typeof a == "number" ? `${a.toFixed(2)}%` : d && typeof a == "string" ? J(k(a), "dd/MM/yyyy") : m && typeof a == "string" ? a : `R$ ${a.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
218
- u && y && /* @__PURE__ */ e(ee, { size: 15, onClick: () => y(a) })
219
+ l && typeof t == "number" ? `${t.toFixed(2)}%` : o && typeof t == "string" ? te(v(t), "dd/MM/yyyy") : x && typeof t == "string" ? t : `R$ ${t.toLocaleString("pt-BR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`,
220
+ b && h && /* @__PURE__ */ e(de, { size: 15, onClick: () => h(t) })
219
221
  ]
220
222
  }
221
223
  )
222
224
  ] }) }),
223
225
  /* @__PURE__ */ e(
224
- S,
226
+ I,
225
227
  {
226
228
  align: "start",
227
- className: c(!T && "pointer-events-none"),
228
- children: /* @__PURE__ */ o("div", { className: "space-y-0.5", children: [
229
- /* @__PURE__ */ e("div", { className: "font-medium", children: r }),
230
- /* @__PURE__ */ e("div", { className: "font-normal opacity-80", children: n })
229
+ className: c(!y && "pointer-events-none"),
230
+ children: /* @__PURE__ */ d("div", { className: "space-y-0.5", children: [
231
+ /* @__PURE__ */ e("div", { className: "font-medium", children: a }),
232
+ /* @__PURE__ */ e("div", { className: "font-normal opacity-80", children: r })
231
233
  ] })
232
234
  }
233
235
  )
234
236
  ] }) });
235
237
  }
236
- function ve({
237
- icon: r = ae,
238
- title: a,
239
- description: n,
240
- tip: l,
241
- className: s,
242
- ...t
238
+ function je({
239
+ icon: a = ge,
240
+ title: t,
241
+ description: r,
242
+ tip: s,
243
+ className: i,
244
+ ...n
243
245
  }) {
244
- return /* @__PURE__ */ e(v, { className: c(s), ...t, children: /* @__PURE__ */ o(C, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
246
+ return /* @__PURE__ */ e(S, { className: c(i), ...n, children: /* @__PURE__ */ d(z, { className: "flex flex-col items-center justify-center px-6 py-12 text-center", children: [
245
247
  /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
246
- r,
248
+ a,
247
249
  {
248
250
  "aria-hidden": "true",
249
251
  className: "size-16 text-muted-foreground/40"
250
252
  }
251
253
  ) }),
252
- /* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children: a }),
253
- /* @__PURE__ */ e("p", { className: "max-w-md text-sm leading-relaxed text-muted-foreground", children: n }),
254
- l && /* @__PURE__ */ e("div", { className: "mt-6 rounded-lg border border-dashed border-muted-foreground/20 bg-muted/50 px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: l }) })
254
+ /* @__PURE__ */ e("h3", { className: "mb-2 text-lg font-semibold text-foreground", children: t }),
255
+ /* @__PURE__ */ e("p", { className: "max-w-md text-sm leading-relaxed text-muted-foreground", children: r }),
256
+ s && /* @__PURE__ */ e("div", { className: "mt-6 rounded-lg border border-dashed border-muted-foreground/20 bg-muted/50 px-4 py-2", children: /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s }) })
255
257
  ] }) });
256
258
  }
257
- function Ce({
258
- actions: r,
259
- icon: a = U
259
+ function Be({
260
+ actions: a,
261
+ icon: t = le
260
262
  }) {
261
- const [n, l] = B(!1), s = E(null);
262
- return P(() => {
263
- if (!n) return;
264
- const t = (d) => {
265
- s.current?.contains(d.target) || l(!1);
266
- }, i = (d) => {
267
- d.key === "Escape" && l(!1);
263
+ const [r, s] = F(!1), i = A(null);
264
+ return R(() => {
265
+ if (!r) return;
266
+ const n = (o) => {
267
+ i.current?.contains(o.target) || s(!1);
268
+ }, l = (o) => {
269
+ o.key === "Escape" && s(!1);
268
270
  };
269
- return document.addEventListener("mousedown", t), document.addEventListener("keydown", i), () => {
270
- document.removeEventListener("mousedown", t), document.removeEventListener("keydown", i);
271
+ return document.addEventListener("mousedown", n), document.addEventListener("keydown", l), () => {
272
+ document.removeEventListener("mousedown", n), document.removeEventListener("keydown", l);
271
273
  };
272
- }, [n]), /* @__PURE__ */ e(O, { children: /* @__PURE__ */ o(
274
+ }, [r]), /* @__PURE__ */ e(G, { children: /* @__PURE__ */ d(
273
275
  "div",
274
276
  {
275
- ref: s,
277
+ ref: i,
276
278
  className: "fixed bottom-6 right-6 z-50 flex flex-col items-end gap-3",
277
279
  children: [
278
- /* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: r.map((t, i) => /* @__PURE__ */ e(
280
+ /* @__PURE__ */ e("div", { className: "flex flex-col items-end gap-3", children: a.map((n, l) => /* @__PURE__ */ e(
279
281
  "div",
280
282
  {
281
283
  className: c(
282
284
  "transition-all duration-200 ease-out",
283
- n ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
285
+ r ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
284
286
  ),
285
- style: { transitionDelay: n ? `${i * 30}ms` : "0ms" },
286
- children: /* @__PURE__ */ o(K, { children: [
287
- /* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ e(
288
- f,
287
+ style: { transitionDelay: r ? `${l * 30}ms` : "0ms" },
288
+ children: /* @__PURE__ */ d(W, { children: [
289
+ /* @__PURE__ */ e(Y, { asChild: !0, children: /* @__PURE__ */ e(
290
+ k,
289
291
  {
290
292
  size: "icon",
291
293
  variant: "outline",
292
- disabled: t.disabled,
293
- "aria-disabled": t.disabled,
294
+ disabled: n.disabled,
295
+ "aria-disabled": n.disabled,
294
296
  className: c(
295
297
  "size-11 rounded-full shadow-md",
296
- t.disabled && "opacity-50"
298
+ n.disabled && "opacity-50"
297
299
  ),
298
300
  onClick: () => {
299
- t.disabled || (t.onClick(), l(!1));
301
+ n.disabled || (n.onClick(), s(!1));
300
302
  },
301
- children: /* @__PURE__ */ e(t.icon, { className: "size-5" })
303
+ children: /* @__PURE__ */ e(n.icon, { className: "size-5" })
302
304
  }
303
305
  ) }),
304
- /* @__PURE__ */ e(V, { side: "left", children: t.label })
306
+ /* @__PURE__ */ e(Z, { side: "left", children: n.label })
305
307
  ] })
306
308
  },
307
- t.label
309
+ n.label
308
310
  )) }),
309
311
  /* @__PURE__ */ e(
310
- f,
312
+ k,
311
313
  {
312
314
  size: "icon",
313
315
  variant: "outline",
314
316
  className: "size-11 rounded-full shadow-md",
315
- "aria-label": n ? "Fechar menu de ajuda" : "Abrir menu de ajuda",
316
- "aria-expanded": n,
317
- onClick: () => l((t) => !t),
318
- children: n ? /* @__PURE__ */ e(M, { className: "size-5" }) : /* @__PURE__ */ e(a, { className: "size-5" })
317
+ "aria-label": r ? "Fechar menu de ajuda" : "Abrir menu de ajuda",
318
+ "aria-expanded": r,
319
+ onClick: () => s((n) => !n),
320
+ children: r ? /* @__PURE__ */ e(H, { className: "size-5" }) : /* @__PURE__ */ e(t, { className: "size-5" })
319
321
  }
320
322
  )
321
323
  ]
322
324
  }
323
325
  ) });
324
326
  }
325
- function ze({
326
- columns: r = 9,
327
- rows: a = 20,
328
- hasActions: n = !1,
329
- actionsCount: l = 1
327
+ function Oe({
328
+ columns: a = 9,
329
+ rows: t = 20,
330
+ hasActions: r = !1,
331
+ actionsCount: s = 1
330
332
  }) {
331
- return /* @__PURE__ */ o(H, { children: [
332
- /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(w, { children: Array.from({ length: r }).map((s, t) => {
333
- const i = n && t === r - 1;
333
+ return /* @__PURE__ */ d(L, { children: [
334
+ /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(N, { children: Array.from({ length: a }).map((i, n) => {
335
+ const l = r && n === a - 1;
334
336
  return /* @__PURE__ */ e(
335
- A,
337
+ $,
336
338
  {
337
- className: i ? "w-0 text-right" : "",
339
+ className: l ? "w-0 text-right" : "",
338
340
  children: /* @__PURE__ */ e(
339
- b,
341
+ w,
340
342
  {
341
- className: i ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
343
+ className: l ? "ml-auto h-4 w-8" : "h-4 w-[60%]"
342
344
  }
343
345
  )
344
346
  },
345
- t
347
+ n
346
348
  );
347
349
  }) }) }),
348
- /* @__PURE__ */ e(L, { children: Array.from({ length: a }).map((s, t) => /* @__PURE__ */ e(w, { className: "h-[3.05rem]", children: Array.from({ length: r }).map((i, d) => {
349
- const m = n && d === r - 1;
350
- return /* @__PURE__ */ e(j, { children: m ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: l }).map((p, u) => /* @__PURE__ */ e(b, { className: "ml-auto size-8" }, u)) }) : /* @__PURE__ */ e(b, { className: "h-4 w-full" }) }, d);
351
- }) }, t)) })
350
+ /* @__PURE__ */ e(j, { children: Array.from({ length: t }).map((i, n) => /* @__PURE__ */ e(N, { className: "h-[3.05rem]", children: Array.from({ length: a }).map((l, o) => {
351
+ const x = r && o === a - 1;
352
+ return /* @__PURE__ */ e(B, { children: x ? /* @__PURE__ */ e("div", { className: "flex gap-2", children: Array.from({ length: s }).map((f, b) => /* @__PURE__ */ e(w, { className: "ml-auto size-8" }, b)) }) : /* @__PURE__ */ e(w, { className: "h-4 w-full" }) }, o);
353
+ }) }, n)) })
352
354
  ] });
353
355
  }
354
- function Ie({
355
- size: r = 24,
356
- color: a = "currentColor",
357
- ...n
356
+ const we = "@[__display__](__id__)", E = /@\[([^\]]+)\]\(([^)]+)\)/g;
357
+ function Pe(a) {
358
+ const t = [], r = new RegExp(E);
359
+ let s;
360
+ for (; (s = r.exec(a)) !== null; )
361
+ t.push({ display: s[1], id: s[2] });
362
+ return t;
363
+ }
364
+ const ke = async ({
365
+ organizationId: a,
366
+ search: t,
367
+ environment: r
368
+ }) => (await X(r).get(`/organizations/${a}/users`, {
369
+ params: { q: t }
370
+ })).data;
371
+ function Ne(a, t) {
372
+ const { environments: r } = ne();
373
+ return P({
374
+ queryKey: ["organization-users", a, t],
375
+ queryFn: () => ke({
376
+ organizationId: a,
377
+ search: t,
378
+ environment: r.VITE_BACKEND_API_ORGANIZATION_URL ?? ""
379
+ }),
380
+ enabled: a.length > 0 && t.length > 0
381
+ });
382
+ }
383
+ const ve = {
384
+ control: {
385
+ fontSize: 14,
386
+ minHeight: 36
387
+ },
388
+ input: {
389
+ padding: "8px 12px",
390
+ border: "1px solid var(--border, #d4d4d8)",
391
+ borderRadius: 6,
392
+ outline: "none"
393
+ },
394
+ highlighter: {
395
+ padding: "8px 12px",
396
+ border: "1px solid transparent"
397
+ },
398
+ suggestions: {
399
+ list: {
400
+ backgroundColor: "var(--popover, #fff)",
401
+ border: "1px solid var(--border, #d4d4d8)",
402
+ borderRadius: 6,
403
+ fontSize: 14,
404
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.12)",
405
+ overflow: "hidden"
406
+ },
407
+ item: {
408
+ padding: "6px 12px",
409
+ "&focused": {
410
+ backgroundColor: "var(--accent, #f4f4f5)"
411
+ }
412
+ }
413
+ }
414
+ }, Ce = {
415
+ backgroundColor: "var(--accent, #e4e4e7)",
416
+ borderRadius: 4
417
+ };
418
+ function qe({
419
+ value: a,
420
+ onChange: t,
421
+ onBlur: r,
422
+ organizationId: s,
423
+ placeholder: i,
424
+ disabled: n,
425
+ singleLine: l = !0
426
+ }) {
427
+ const [o, x] = F(""), f = ae(o, 200), { data: b } = Ne(s, f), y = A(void 0), h = K(
428
+ () => b?.map((u) => ({ id: u._id, display: u.username })) ?? [],
429
+ [b]
430
+ );
431
+ return R(() => {
432
+ y.current?.(h);
433
+ }, [h]), /* @__PURE__ */ e(
434
+ Q,
435
+ {
436
+ value: a,
437
+ onChange: (u, g) => t(g),
438
+ onBlur: r,
439
+ placeholder: i,
440
+ disabled: n,
441
+ singleLine: l,
442
+ allowSuggestionsAboveCursor: !0,
443
+ style: ve,
444
+ children: /* @__PURE__ */ e(
445
+ V,
446
+ {
447
+ trigger: "@",
448
+ markup: we,
449
+ data: (u, g) => {
450
+ y.current = g, x(u), g(h);
451
+ },
452
+ displayTransform: (u, g) => `@${g}`,
453
+ appendSpaceOnAdd: !0,
454
+ style: Ce
455
+ }
456
+ )
457
+ }
458
+ );
459
+ }
460
+ function Ke({ text: a, className: t }) {
461
+ const r = new RegExp(E), s = [];
462
+ let i = 0, n, l = 0;
463
+ for (; (n = r.exec(a)) !== null; )
464
+ n.index > i && s.push(
465
+ /* @__PURE__ */ e("span", { children: a.slice(i, n.index) }, l++)
466
+ ), s.push(
467
+ /* @__PURE__ */ d(J, { variant: "secondary", className: t, children: [
468
+ "@",
469
+ n[1]
470
+ ] }, l++)
471
+ ), i = n.index + n[0].length;
472
+ return i < a.length && s.push(/* @__PURE__ */ e("span", { children: a.slice(i) }, l++)), /* @__PURE__ */ e(T, { children: s });
473
+ }
474
+ function Ue({
475
+ size: a = 24,
476
+ color: t = "currentColor",
477
+ ...r
358
478
  }) {
359
479
  return /* @__PURE__ */ e(
360
480
  "svg",
361
481
  {
362
482
  xmlns: "http://www.w3.org/2000/svg",
363
- width: r,
364
- height: r,
483
+ width: a,
484
+ height: a,
365
485
  viewBox: "0 0 24 24",
366
486
  fill: "none",
367
- stroke: a,
487
+ stroke: t,
368
488
  "stroke-width": "2",
369
489
  "stroke-linecap": "round",
370
490
  "stroke-linejoin": "round",
371
491
  className: "lucide lucide-twitter-icon lucide-twitter",
372
- ...n,
492
+ ...r,
373
493
  children: /* @__PURE__ */ e("path", { d: "M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" })
374
494
  }
375
495
  );
376
496
  }
377
497
  export {
378
- pe as AsyncBoundary,
379
- Fe as CampaignsSelectInput,
380
- Me as ClientSelectInput,
381
- ie as ErrorCard,
382
- He as FieldCalendar,
383
- _e as FieldCheckbox,
384
- Ae as FieldClientSelectInput,
385
- Le as FieldInput,
386
- je as FieldLabelWithAsterisk,
387
- De as FieldProfileSelectInput,
388
- Re as FieldSaleSelectInput,
389
- $e as FieldSelect,
390
- Be as FieldSwitch,
391
- Ee as FieldTextarea,
392
- ye as HoverContent,
393
- we as IconBadge,
394
- Pe as Image,
395
- qe as InfluencerSelectInput,
396
- Oe as InstagramIcon,
397
- Ke as LinkedInIcon,
398
- ke as List,
399
- Ne as ListRow,
400
- ve as NotFoundCard,
401
- Qe as PageHeader,
402
- Ve as PageHeaderActions,
403
- Xe as PageHeaderContent,
404
- Je as PageHeaderDescription,
405
- Ye as PageHeaderTitle,
406
- Ge as PinterestIcon,
407
- We as ProfileSelectInput,
408
- Ue as SaleSelectInput,
409
- Ce as SpeedDialButton,
410
- ze as TableSkeleton,
411
- Ze as TikTokIcon,
412
- Ie as TwitterIcon,
413
- et as XIcon,
414
- tt as YoutubeIcon
498
+ Ee as AsyncBoundary,
499
+ Ve as CampaignsSelectInput,
500
+ Ge as ClientSelectInput,
501
+ he as ErrorCard,
502
+ We as FieldCalendar,
503
+ Ye as FieldCheckbox,
504
+ Ze as FieldClientSelectInput,
505
+ Je as FieldInput,
506
+ et as FieldLabelWithAsterisk,
507
+ tt as FieldProfileSelectInput,
508
+ nt as FieldSaleSelectInput,
509
+ at as FieldSelect,
510
+ rt as FieldSwitch,
511
+ st as FieldTextarea,
512
+ He as HoverContent,
513
+ Le as IconBadge,
514
+ it as Image,
515
+ lt as InfluencerSelectInput,
516
+ ot as InstagramIcon,
517
+ dt as LinkedInIcon,
518
+ De as List,
519
+ $e as ListRow,
520
+ qe as MentionInput,
521
+ Ke as MentionText,
522
+ je as NotFoundCard,
523
+ ct as PageHeader,
524
+ gt as PageHeaderActions,
525
+ ut as PageHeaderContent,
526
+ xt as PageHeaderDescription,
527
+ mt as PageHeaderTitle,
528
+ bt as PinterestIcon,
529
+ ht as ProfileSelectInput,
530
+ pt as SaleSelectInput,
531
+ Be as SpeedDialButton,
532
+ Oe as TableSkeleton,
533
+ ft as TikTokIcon,
534
+ Ue as TwitterIcon,
535
+ yt as XIcon,
536
+ wt as YoutubeIcon,
537
+ Pe as parseMentions
415
538
  };