@processhub-lib/react 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1143 @@
1
+ import * as n from "react";
2
+ import $e, { createContext as xr, useState as se, useRef as yr, useEffect as Ze } from "react";
3
+ import { c as L } from "./classnames-2Mts7qXW.js";
4
+ var fe = { exports: {} }, Y = {};
5
+ /**
6
+ * @license React
7
+ * react-jsx-runtime.production.min.js
8
+ *
9
+ * Copyright (c) Facebook, Inc. and its affiliates.
10
+ *
11
+ * This source code is licensed under the MIT license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */
14
+ var Ie;
15
+ function Er() {
16
+ if (Ie) return Y;
17
+ Ie = 1;
18
+ var v = $e, d = Symbol.for("react.element"), w = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, R = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function C(x, u, b) {
20
+ var i, g = {}, j = null, P = null;
21
+ b !== void 0 && (j = "" + b), u.key !== void 0 && (j = "" + u.key), u.ref !== void 0 && (P = u.ref);
22
+ for (i in u) m.call(u, i) && !_.hasOwnProperty(i) && (g[i] = u[i]);
23
+ if (x && x.defaultProps) for (i in u = x.defaultProps, u) g[i] === void 0 && (g[i] = u[i]);
24
+ return { $$typeof: d, type: x, key: j, ref: P, props: g, _owner: R.current };
25
+ }
26
+ return Y.Fragment = w, Y.jsx = C, Y.jsxs = C, Y;
27
+ }
28
+ var U = {};
29
+ /**
30
+ * @license React
31
+ * react-jsx-runtime.development.js
32
+ *
33
+ * Copyright (c) Facebook, Inc. and its affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */
38
+ var Ve;
39
+ function wr() {
40
+ return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && function() {
41
+ var v = $e, d = Symbol.for("react.element"), w = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), x = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), i = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), D = Symbol.iterator, B = "@@iterator";
42
+ function H(e) {
43
+ if (e === null || typeof e != "object")
44
+ return null;
45
+ var r = D && e[D] || e[B];
46
+ return typeof r == "function" ? r : null;
47
+ }
48
+ var O = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
49
+ function y(e) {
50
+ {
51
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
52
+ t[a - 1] = arguments[a];
53
+ V("error", e, t);
54
+ }
55
+ }
56
+ function V(e, r, t) {
57
+ {
58
+ var a = O.ReactDebugCurrentFrame, s = a.getStackAddendum();
59
+ s !== "" && (r += "%s", t = t.concat([s]));
60
+ var c = t.map(function(l) {
61
+ return String(l);
62
+ });
63
+ c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
64
+ }
65
+ }
66
+ var z = !1, Q = !1, J = !1, E = !1, F = !1, ve;
67
+ ve = Symbol.for("react.module.reference");
68
+ function Ue(e) {
69
+ return !!(typeof e == "string" || typeof e == "function" || e === m || e === _ || F || e === R || e === b || e === i || E || e === P || z || Q || J || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === g || e.$$typeof === C || e.$$typeof === x || e.$$typeof === u || // This needs to include all possible module reference object
70
+ // types supported by any Flight configuration anywhere since
71
+ // we don't know which Flight build this will end up being used
72
+ // with.
73
+ e.$$typeof === ve || e.getModuleId !== void 0));
74
+ }
75
+ function Be(e, r, t) {
76
+ var a = e.displayName;
77
+ if (a)
78
+ return a;
79
+ var s = r.displayName || r.name || "";
80
+ return s !== "" ? t + "(" + s + ")" : t;
81
+ }
82
+ function be(e) {
83
+ return e.displayName || "Context";
84
+ }
85
+ function k(e) {
86
+ if (e == null)
87
+ return null;
88
+ if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
89
+ return e.displayName || e.name || null;
90
+ if (typeof e == "string")
91
+ return e;
92
+ switch (e) {
93
+ case m:
94
+ return "Fragment";
95
+ case w:
96
+ return "Portal";
97
+ case _:
98
+ return "Profiler";
99
+ case R:
100
+ return "StrictMode";
101
+ case b:
102
+ return "Suspense";
103
+ case i:
104
+ return "SuspenseList";
105
+ }
106
+ if (typeof e == "object")
107
+ switch (e.$$typeof) {
108
+ case x:
109
+ var r = e;
110
+ return be(r) + ".Consumer";
111
+ case C:
112
+ var t = e;
113
+ return be(t._context) + ".Provider";
114
+ case u:
115
+ return Be(e, e.render, "ForwardRef");
116
+ case g:
117
+ var a = e.displayName || null;
118
+ return a !== null ? a : k(e.type) || "Memo";
119
+ case j: {
120
+ var s = e, c = s._payload, l = s._init;
121
+ try {
122
+ return k(l(c));
123
+ } catch {
124
+ return null;
125
+ }
126
+ }
127
+ }
128
+ return null;
129
+ }
130
+ var M = Object.assign, $ = 0, ge, pe, he, me, xe, ye, Ee;
131
+ function we() {
132
+ }
133
+ we.__reactDisabledLog = !0;
134
+ function He() {
135
+ {
136
+ if ($ === 0) {
137
+ ge = console.log, pe = console.info, he = console.warn, me = console.error, xe = console.group, ye = console.groupCollapsed, Ee = console.groupEnd;
138
+ var e = {
139
+ configurable: !0,
140
+ enumerable: !0,
141
+ value: we,
142
+ writable: !0
143
+ };
144
+ Object.defineProperties(console, {
145
+ info: e,
146
+ log: e,
147
+ warn: e,
148
+ error: e,
149
+ group: e,
150
+ groupCollapsed: e,
151
+ groupEnd: e
152
+ });
153
+ }
154
+ $++;
155
+ }
156
+ }
157
+ function ze() {
158
+ {
159
+ if ($--, $ === 0) {
160
+ var e = {
161
+ configurable: !0,
162
+ enumerable: !0,
163
+ writable: !0
164
+ };
165
+ Object.defineProperties(console, {
166
+ log: M({}, e, {
167
+ value: ge
168
+ }),
169
+ info: M({}, e, {
170
+ value: pe
171
+ }),
172
+ warn: M({}, e, {
173
+ value: he
174
+ }),
175
+ error: M({}, e, {
176
+ value: me
177
+ }),
178
+ group: M({}, e, {
179
+ value: xe
180
+ }),
181
+ groupCollapsed: M({}, e, {
182
+ value: ye
183
+ }),
184
+ groupEnd: M({}, e, {
185
+ value: Ee
186
+ })
187
+ });
188
+ }
189
+ $ < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
190
+ }
191
+ }
192
+ var ee = O.ReactCurrentDispatcher, re;
193
+ function q(e, r, t) {
194
+ {
195
+ if (re === void 0)
196
+ try {
197
+ throw Error();
198
+ } catch (s) {
199
+ var a = s.stack.trim().match(/\n( *(at )?)/);
200
+ re = a && a[1] || "";
201
+ }
202
+ return `
203
+ ` + re + e;
204
+ }
205
+ }
206
+ var te = !1, K;
207
+ {
208
+ var Je = typeof WeakMap == "function" ? WeakMap : Map;
209
+ K = new Je();
210
+ }
211
+ function Re(e, r) {
212
+ if (!e || te)
213
+ return "";
214
+ {
215
+ var t = K.get(e);
216
+ if (t !== void 0)
217
+ return t;
218
+ }
219
+ var a;
220
+ te = !0;
221
+ var s = Error.prepareStackTrace;
222
+ Error.prepareStackTrace = void 0;
223
+ var c;
224
+ c = ee.current, ee.current = null, He();
225
+ try {
226
+ if (r) {
227
+ var l = function() {
228
+ throw Error();
229
+ };
230
+ if (Object.defineProperty(l.prototype, "props", {
231
+ set: function() {
232
+ throw Error();
233
+ }
234
+ }), typeof Reflect == "object" && Reflect.construct) {
235
+ try {
236
+ Reflect.construct(l, []);
237
+ } catch (S) {
238
+ a = S;
239
+ }
240
+ Reflect.construct(e, [], l);
241
+ } else {
242
+ try {
243
+ l.call();
244
+ } catch (S) {
245
+ a = S;
246
+ }
247
+ e.call(l.prototype);
248
+ }
249
+ } else {
250
+ try {
251
+ throw Error();
252
+ } catch (S) {
253
+ a = S;
254
+ }
255
+ e();
256
+ }
257
+ } catch (S) {
258
+ if (S && a && typeof S.stack == "string") {
259
+ for (var o = S.stack.split(`
260
+ `), A = a.stack.split(`
261
+ `), p = o.length - 1, h = A.length - 1; p >= 1 && h >= 0 && o[p] !== A[h]; )
262
+ h--;
263
+ for (; p >= 1 && h >= 0; p--, h--)
264
+ if (o[p] !== A[h]) {
265
+ if (p !== 1 || h !== 1)
266
+ do
267
+ if (p--, h--, h < 0 || o[p] !== A[h]) {
268
+ var T = `
269
+ ` + o[p].replace(" at new ", " at ");
270
+ return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && K.set(e, T), T;
271
+ }
272
+ while (p >= 1 && h >= 0);
273
+ break;
274
+ }
275
+ }
276
+ } finally {
277
+ te = !1, ee.current = c, ze(), Error.prepareStackTrace = s;
278
+ }
279
+ var I = e ? e.displayName || e.name : "", N = I ? q(I) : "";
280
+ return typeof e == "function" && K.set(e, N), N;
281
+ }
282
+ function qe(e, r, t) {
283
+ return Re(e, !1);
284
+ }
285
+ function Ke(e) {
286
+ var r = e.prototype;
287
+ return !!(r && r.isReactComponent);
288
+ }
289
+ function G(e, r, t) {
290
+ if (e == null)
291
+ return "";
292
+ if (typeof e == "function")
293
+ return Re(e, Ke(e));
294
+ if (typeof e == "string")
295
+ return q(e);
296
+ switch (e) {
297
+ case b:
298
+ return q("Suspense");
299
+ case i:
300
+ return q("SuspenseList");
301
+ }
302
+ if (typeof e == "object")
303
+ switch (e.$$typeof) {
304
+ case u:
305
+ return qe(e.render);
306
+ case g:
307
+ return G(e.type, r, t);
308
+ case j: {
309
+ var a = e, s = a._payload, c = a._init;
310
+ try {
311
+ return G(c(s), r, t);
312
+ } catch {
313
+ }
314
+ }
315
+ }
316
+ return "";
317
+ }
318
+ var W = Object.prototype.hasOwnProperty, _e = {}, je = O.ReactDebugCurrentFrame;
319
+ function X(e) {
320
+ if (e) {
321
+ var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
322
+ je.setExtraStackFrame(t);
323
+ } else
324
+ je.setExtraStackFrame(null);
325
+ }
326
+ function Ge(e, r, t, a, s) {
327
+ {
328
+ var c = Function.call.bind(W);
329
+ for (var l in e)
330
+ if (c(e, l)) {
331
+ var o = void 0;
332
+ try {
333
+ if (typeof e[l] != "function") {
334
+ var A = Error((a || "React class") + ": " + t + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
335
+ throw A.name = "Invariant Violation", A;
336
+ }
337
+ o = e[l](r, l, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
338
+ } catch (p) {
339
+ o = p;
340
+ }
341
+ o && !(o instanceof Error) && (X(s), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, l, typeof o), X(null)), o instanceof Error && !(o.message in _e) && (_e[o.message] = !0, X(s), y("Failed %s type: %s", t, o.message), X(null));
342
+ }
343
+ }
344
+ }
345
+ var Xe = Array.isArray;
346
+ function ae(e) {
347
+ return Xe(e);
348
+ }
349
+ function Qe(e) {
350
+ {
351
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
352
+ return t;
353
+ }
354
+ }
355
+ function er(e) {
356
+ try {
357
+ return Ae(e), !1;
358
+ } catch {
359
+ return !0;
360
+ }
361
+ }
362
+ function Ae(e) {
363
+ return "" + e;
364
+ }
365
+ function Ce(e) {
366
+ if (er(e))
367
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), Ae(e);
368
+ }
369
+ var Se = O.ReactCurrentOwner, rr = {
370
+ key: !0,
371
+ ref: !0,
372
+ __self: !0,
373
+ __source: !0
374
+ }, Te, Oe;
375
+ function tr(e) {
376
+ if (W.call(e, "ref")) {
377
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
378
+ if (r && r.isReactWarning)
379
+ return !1;
380
+ }
381
+ return e.ref !== void 0;
382
+ }
383
+ function ar(e) {
384
+ if (W.call(e, "key")) {
385
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
386
+ if (r && r.isReactWarning)
387
+ return !1;
388
+ }
389
+ return e.key !== void 0;
390
+ }
391
+ function nr(e, r) {
392
+ typeof e.ref == "string" && Se.current;
393
+ }
394
+ function or(e, r) {
395
+ {
396
+ var t = function() {
397
+ Te || (Te = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
398
+ };
399
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
400
+ get: t,
401
+ configurable: !0
402
+ });
403
+ }
404
+ }
405
+ function lr(e, r) {
406
+ {
407
+ var t = function() {
408
+ Oe || (Oe = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
409
+ };
410
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
411
+ get: t,
412
+ configurable: !0
413
+ });
414
+ }
415
+ }
416
+ var ir = function(e, r, t, a, s, c, l) {
417
+ var o = {
418
+ // This tag allows us to uniquely identify this as a React Element
419
+ $$typeof: d,
420
+ // Built-in properties that belong on the element
421
+ type: e,
422
+ key: r,
423
+ ref: t,
424
+ props: l,
425
+ // Record the component responsible for creating this element.
426
+ _owner: c
427
+ };
428
+ return o._store = {}, Object.defineProperty(o._store, "validated", {
429
+ configurable: !1,
430
+ enumerable: !1,
431
+ writable: !0,
432
+ value: !1
433
+ }), Object.defineProperty(o, "_self", {
434
+ configurable: !1,
435
+ enumerable: !1,
436
+ writable: !1,
437
+ value: a
438
+ }), Object.defineProperty(o, "_source", {
439
+ configurable: !1,
440
+ enumerable: !1,
441
+ writable: !1,
442
+ value: s
443
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
444
+ };
445
+ function sr(e, r, t, a, s) {
446
+ {
447
+ var c, l = {}, o = null, A = null;
448
+ t !== void 0 && (Ce(t), o = "" + t), ar(r) && (Ce(r.key), o = "" + r.key), tr(r) && (A = r.ref, nr(r, s));
449
+ for (c in r)
450
+ W.call(r, c) && !rr.hasOwnProperty(c) && (l[c] = r[c]);
451
+ if (e && e.defaultProps) {
452
+ var p = e.defaultProps;
453
+ for (c in p)
454
+ l[c] === void 0 && (l[c] = p[c]);
455
+ }
456
+ if (o || A) {
457
+ var h = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
458
+ o && or(l, h), A && lr(l, h);
459
+ }
460
+ return ir(e, o, A, s, a, Se.current, l);
461
+ }
462
+ }
463
+ var ne = O.ReactCurrentOwner, Pe = O.ReactDebugCurrentFrame;
464
+ function Z(e) {
465
+ if (e) {
466
+ var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
467
+ Pe.setExtraStackFrame(t);
468
+ } else
469
+ Pe.setExtraStackFrame(null);
470
+ }
471
+ var oe;
472
+ oe = !1;
473
+ function le(e) {
474
+ return typeof e == "object" && e !== null && e.$$typeof === d;
475
+ }
476
+ function ke() {
477
+ {
478
+ if (ne.current) {
479
+ var e = k(ne.current.type);
480
+ if (e)
481
+ return `
482
+
483
+ Check the render method of \`` + e + "`.";
484
+ }
485
+ return "";
486
+ }
487
+ }
488
+ function ur(e) {
489
+ return "";
490
+ }
491
+ var Le = {};
492
+ function cr(e) {
493
+ {
494
+ var r = ke();
495
+ if (!r) {
496
+ var t = typeof e == "string" ? e : e.displayName || e.name;
497
+ t && (r = `
498
+
499
+ Check the top-level render call using <` + t + ">.");
500
+ }
501
+ return r;
502
+ }
503
+ }
504
+ function Fe(e, r) {
505
+ {
506
+ if (!e._store || e._store.validated || e.key != null)
507
+ return;
508
+ e._store.validated = !0;
509
+ var t = cr(r);
510
+ if (Le[t])
511
+ return;
512
+ Le[t] = !0;
513
+ var a = "";
514
+ e && e._owner && e._owner !== ne.current && (a = " It was passed a child from " + k(e._owner.type) + "."), Z(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), Z(null);
515
+ }
516
+ }
517
+ function Me(e, r) {
518
+ {
519
+ if (typeof e != "object")
520
+ return;
521
+ if (ae(e))
522
+ for (var t = 0; t < e.length; t++) {
523
+ var a = e[t];
524
+ le(a) && Fe(a, r);
525
+ }
526
+ else if (le(e))
527
+ e._store && (e._store.validated = !0);
528
+ else if (e) {
529
+ var s = H(e);
530
+ if (typeof s == "function" && s !== e.entries)
531
+ for (var c = s.call(e), l; !(l = c.next()).done; )
532
+ le(l.value) && Fe(l.value, r);
533
+ }
534
+ }
535
+ }
536
+ function fr(e) {
537
+ {
538
+ var r = e.type;
539
+ if (r == null || typeof r == "string")
540
+ return;
541
+ var t;
542
+ if (typeof r == "function")
543
+ t = r.propTypes;
544
+ else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
545
+ // Inner props are checked in the reconciler.
546
+ r.$$typeof === g))
547
+ t = r.propTypes;
548
+ else
549
+ return;
550
+ if (t) {
551
+ var a = k(r);
552
+ Ge(t, e.props, "prop", a, e);
553
+ } else if (r.PropTypes !== void 0 && !oe) {
554
+ oe = !0;
555
+ var s = k(r);
556
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
557
+ }
558
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
559
+ }
560
+ }
561
+ function dr(e) {
562
+ {
563
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
564
+ var a = r[t];
565
+ if (a !== "children" && a !== "key") {
566
+ Z(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Z(null);
567
+ break;
568
+ }
569
+ }
570
+ e.ref !== null && (Z(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), Z(null));
571
+ }
572
+ }
573
+ var Ne = {};
574
+ function De(e, r, t, a, s, c) {
575
+ {
576
+ var l = Ue(e);
577
+ if (!l) {
578
+ var o = "";
579
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
580
+ var A = ur();
581
+ A ? o += A : o += ke();
582
+ var p;
583
+ e === null ? p = "null" : ae(e) ? p = "array" : e !== void 0 && e.$$typeof === d ? (p = "<" + (k(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, o);
584
+ }
585
+ var h = sr(e, r, t, s, c);
586
+ if (h == null)
587
+ return h;
588
+ if (l) {
589
+ var T = r.children;
590
+ if (T !== void 0)
591
+ if (a)
592
+ if (ae(T)) {
593
+ for (var I = 0; I < T.length; I++)
594
+ Me(T[I], e);
595
+ Object.freeze && Object.freeze(T);
596
+ } else
597
+ y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
598
+ else
599
+ Me(T, e);
600
+ }
601
+ if (W.call(r, "key")) {
602
+ var N = k(e), S = Object.keys(r).filter(function(mr) {
603
+ return mr !== "key";
604
+ }), ie = S.length > 0 ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}";
605
+ if (!Ne[N + ie]) {
606
+ var hr = S.length > 0 ? "{" + S.join(": ..., ") + ": ...}" : "{}";
607
+ y(`A props object containing a "key" prop is being spread into JSX:
608
+ let props = %s;
609
+ <%s {...props} />
610
+ React keys must be passed directly to JSX without using spread:
611
+ let props = %s;
612
+ <%s key={someKey} {...props} />`, ie, N, hr, N), Ne[N + ie] = !0;
613
+ }
614
+ }
615
+ return e === m ? dr(h) : fr(h), h;
616
+ }
617
+ }
618
+ function vr(e, r, t) {
619
+ return De(e, r, t, !0);
620
+ }
621
+ function br(e, r, t) {
622
+ return De(e, r, t, !1);
623
+ }
624
+ var gr = br, pr = vr;
625
+ U.Fragment = m, U.jsx = gr, U.jsxs = pr;
626
+ }()), U;
627
+ }
628
+ process.env.NODE_ENV === "production" ? fe.exports = Er() : fe.exports = wr();
629
+ var f = fe.exports;
630
+ const ue = {
631
+ green: {
632
+ solid: {
633
+ bg: "bg-green-500",
634
+ hover: "hover:bg-green-600",
635
+ text: "text-white",
636
+ border: "border-green-500"
637
+ },
638
+ outline: {
639
+ bg: "bg-transparent",
640
+ hover: "hover:bg-green-500 hover:text-white",
641
+ text: "text-green-600",
642
+ border: "border-green-500"
643
+ },
644
+ ghost: {
645
+ bg: "bg-transparent",
646
+ hover: "hover:bg-green-100",
647
+ text: "text-green-600",
648
+ border: "border-transparent"
649
+ }
650
+ },
651
+ blue: {
652
+ solid: {
653
+ bg: "bg-blue-500",
654
+ hover: "hover:bg-blue-600",
655
+ text: "text-white",
656
+ border: "border-blue-500"
657
+ },
658
+ outline: {
659
+ bg: "bg-transparent",
660
+ hover: "hover:bg-blue-500 hover:text-white",
661
+ text: "text-blue-600",
662
+ border: "border-blue-500"
663
+ },
664
+ ghost: {
665
+ bg: "bg-transparent",
666
+ hover: "hover:bg-blue-100",
667
+ text: "text-blue-600",
668
+ border: "border-transparent"
669
+ }
670
+ },
671
+ red: {
672
+ solid: {
673
+ bg: "bg-red-500",
674
+ hover: "hover:bg-red-600",
675
+ text: "text-white",
676
+ border: "border-red-500"
677
+ },
678
+ outline: {
679
+ bg: "bg-transparent",
680
+ hover: "hover:bg-red-500 hover:text-white",
681
+ text: "text-red-600",
682
+ border: "border-red-500"
683
+ },
684
+ ghost: {
685
+ bg: "bg-transparent",
686
+ hover: "hover:bg-red-100",
687
+ text: "text-red-600",
688
+ border: "border-transparent"
689
+ }
690
+ },
691
+ yellow: {
692
+ solid: {
693
+ bg: "bg-yellow-500",
694
+ hover: "hover:bg-yellow-600",
695
+ text: "text-black",
696
+ border: "border-yellow-500"
697
+ },
698
+ outline: {
699
+ bg: "bg-transparent",
700
+ hover: "hover:bg-yellow-500 hover:text-black",
701
+ text: "text-yellow-600",
702
+ border: "border-yellow-500"
703
+ },
704
+ ghost: {
705
+ bg: "bg-transparent",
706
+ hover: "hover:bg-yellow-100",
707
+ text: "text-yellow-600",
708
+ border: "border-transparent"
709
+ }
710
+ },
711
+ primary: {
712
+ solid: {
713
+ bg: "bg-primary",
714
+ hover: "hover:bg-primary/90",
715
+ text: "text-primary-foreground",
716
+ border: "border-primary"
717
+ },
718
+ outline: {
719
+ bg: "bg-transparent",
720
+ hover: "hover:bg-primary hover:text-primary-foreground",
721
+ text: "text-primary",
722
+ border: "border-primary"
723
+ },
724
+ ghost: {
725
+ bg: "bg-transparent",
726
+ hover: "hover:bg-primary/10",
727
+ text: "text-primary",
728
+ border: "border-transparent"
729
+ }
730
+ },
731
+ secondary: {
732
+ solid: {
733
+ bg: "bg-secondary",
734
+ hover: "hover:bg-secondary/80",
735
+ text: "text-secondary-foreground",
736
+ border: "border-secondary"
737
+ },
738
+ outline: {
739
+ bg: "bg-transparent",
740
+ hover: "hover:bg-secondary hover:text-secondary-foreground",
741
+ text: "text-secondary",
742
+ border: "border-secondary"
743
+ },
744
+ ghost: {
745
+ bg: "bg-transparent",
746
+ hover: "hover:bg-secondary/10",
747
+ text: "text-secondary",
748
+ border: "border-transparent"
749
+ }
750
+ },
751
+ destructive: {
752
+ solid: {
753
+ bg: "bg-destructive",
754
+ hover: "hover:bg-destructive/90",
755
+ text: "text-destructive-foreground",
756
+ border: "border-destructive"
757
+ },
758
+ outline: {
759
+ bg: "bg-transparent",
760
+ hover: "hover:bg-destructive hover:text-destructive-foreground",
761
+ text: "text-destructive",
762
+ border: "border-destructive"
763
+ },
764
+ ghost: {
765
+ bg: "bg-transparent",
766
+ hover: "hover:bg-destructive/10",
767
+ text: "text-destructive",
768
+ border: "border-transparent"
769
+ }
770
+ },
771
+ card: {
772
+ solid: {
773
+ bg: "bg-card",
774
+ hover: "hover:bg-accent",
775
+ text: "text-card-foreground",
776
+ border: "border-border"
777
+ },
778
+ outline: {
779
+ bg: "bg-transparent",
780
+ hover: "hover:bg-accent",
781
+ text: "text-card-foreground",
782
+ border: "border-border"
783
+ },
784
+ ghost: {
785
+ bg: "bg-transparent",
786
+ hover: "hover:bg-accent/50",
787
+ text: "text-card-foreground",
788
+ border: "border-transparent"
789
+ }
790
+ }
791
+ };
792
+ function Rr({
793
+ title: v,
794
+ icon: d,
795
+ positionIcon: w,
796
+ color: m = "green",
797
+ variant: R = "solid",
798
+ disable: _ = !1,
799
+ className: C,
800
+ type: x = "button",
801
+ onClick: u = () => {
802
+ }
803
+ }) {
804
+ const b = m in ue ? ue[m] : ue.green, i = b[R] || b.solid, g = L(
805
+ // "cursor-pointer flex items-center justify-center gap-2 text-md font-bold rounded-lg p-2.5 w-auto border transition-colors duration-150",
806
+ "cursor-pointer flex items-center justify-center gap-2 px-4 py-2 rounded-lg transition-colors shadow-sm font-medium text-sm border",
807
+ i.bg,
808
+ i.hover,
809
+ i.text,
810
+ i.border,
811
+ {
812
+ "opacity-50 cursor-not-allowed": _
813
+ },
814
+ C
815
+ );
816
+ return /* @__PURE__ */ f.jsxs(
817
+ "button",
818
+ {
819
+ type: x,
820
+ onClick: (j) => !_ && (u == null ? void 0 : u(j)),
821
+ disabled: _,
822
+ className: g,
823
+ children: [
824
+ w === "left" && d,
825
+ v && /* @__PURE__ */ f.jsx("span", { className: "first-letter:uppercase", children: v }),
826
+ w === "right" && d
827
+ ]
828
+ }
829
+ );
830
+ }
831
+ function _r({
832
+ field: v,
833
+ title: d,
834
+ id: w,
835
+ type: m,
836
+ placeholder: R,
837
+ className: _,
838
+ value: C,
839
+ iconPosition: x,
840
+ icon: u,
841
+ error: b,
842
+ ...i
843
+ }) {
844
+ return /* @__PURE__ */ f.jsxs("div", { className: "flex flex-col gap-2", children: [
845
+ d && /* @__PURE__ */ f.jsxs(
846
+ "label",
847
+ {
848
+ htmlFor: w,
849
+ className: L("block text-md font-medium text-foreground", {
850
+ "text-red-700": b
851
+ }),
852
+ children: [
853
+ i.required && /* @__PURE__ */ f.jsx("span", { className: "text-red-500", children: "* " }),
854
+ d,
855
+ ":"
856
+ ]
857
+ }
858
+ ),
859
+ /* @__PURE__ */ f.jsxs(
860
+ "div",
861
+ {
862
+ className: L(
863
+ "flex items-center justify-between border border-border text-foreground text-sm rounded-lg w-full",
864
+ {
865
+ "text-red-500 placeholder-red-500 border-red-500 focus:ring-red-500 focus:border-red-500": b,
866
+ "p-2.5": u,
867
+ "bg-input cursor-pointer": !i.disabled,
868
+ "bg-gray-400/40 cursor-not-allowed": i.disabled
869
+ }
870
+ ),
871
+ children: [
872
+ x === "left" && u,
873
+ /* @__PURE__ */ f.jsx(
874
+ "input",
875
+ {
876
+ type: m,
877
+ id: w,
878
+ name: String(v),
879
+ value: C,
880
+ placeholder: R,
881
+ className: L(
882
+ "bg-transparent border-none text-foreground text-sm focus:outline-none w-full",
883
+ {
884
+ "ml-3": x === "left",
885
+ "p-2.5": !u,
886
+ "cursor-pointer": !i.disabled,
887
+ "cursor-not-allowed": i.disabled,
888
+ className: _
889
+ }
890
+ ),
891
+ onChange: i.onChange,
892
+ ...i
893
+ }
894
+ ),
895
+ x === "right" && u
896
+ ]
897
+ }
898
+ ),
899
+ b && /* @__PURE__ */ f.jsx("div", { className: "mt-2", children: /* @__PURE__ */ f.jsx("p", { className: "text-sm text-red-600 dark:text-red-500", children: b }) })
900
+ ] });
901
+ }
902
+ const jr = /* @__PURE__ */ new Map([
903
+ [
904
+ "bold",
905
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M237.24,213.21C216.12,203,204,180.64,204,152V134.73a19.94,19.94,0,0,0-12.62-18.59l-24.86-9.81a4,4,0,0,1-2.26-5.14l21.33-53A32,32,0,0,0,167.17,6,32.13,32.13,0,0,0,126.25,24.2l-.07.18-21,53.09a3.94,3.94,0,0,1-2.14,2.2,3.89,3.89,0,0,1-3,.06L74.6,69.43A19.89,19.89,0,0,0,52.87,74C31.06,96.43,20,122.68,20,152a115.46,115.46,0,0,0,32.29,80.3A12,12,0,0,0,61,236H232a12,12,0,0,0,5.24-22.79ZM68.19,92.73,91.06,102A28,28,0,0,0,127.5,86.31l20.95-53a8.32,8.32,0,0,1,10.33-4.81,8,8,0,0,1,4.61,10.57,1.17,1.17,0,0,0,0,.11L142,92.29a28.05,28.05,0,0,0,15.68,36.33L180,137.45V152c0,1,0,2.07.05,3.1l-122.44-49A101.91,101.91,0,0,1,68.19,92.73ZM116.74,212a83.73,83.73,0,0,1-22.09-39,12,12,0,0,0-23.25,6,110.27,110.27,0,0,0,14.49,33H66.25A91.53,91.53,0,0,1,44,152a84,84,0,0,1,3.41-24.11l136.67,54.66A86.58,86.58,0,0,0,198.66,212Z" }))
906
+ ],
907
+ [
908
+ "duotone",
909
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
910
+ "path",
911
+ {
912
+ d: "M192.8,165.12,43.93,105.57A110.88,110.88,0,0,1,61.47,82.38a8,8,0,0,1,8.67-1.81L95.52,90.85a16,16,0,0,0,20.82-9l21-53.1c4.15-10,15.47-15.33,25.63-11.53a20,20,0,0,1,11.51,26.39L153.13,96.71a16,16,0,0,0,8.93,20.75L187,127.3a8,8,0,0,1,5,7.43V152A104.58,104.58,0,0,0,192.8,165.12Z",
913
+ opacity: "0.2"
914
+ }
915
+ ), /* @__PURE__ */ n.createElement("path", { d: "M235.5,216.81c-22.56-11-35.5-34.58-35.5-64.8V134.73a15.94,15.94,0,0,0-10.09-14.87L165,110a8,8,0,0,1-4.48-10.34l21.32-53a28,28,0,0,0-16.1-37,28.14,28.14,0,0,0-35.82,16,.61.61,0,0,0,0,.12L108.9,79a8,8,0,0,1-10.37,4.49L73.11,73.14A15.89,15.89,0,0,0,55.74,76.8C34.68,98.45,24,123.75,24,152a111.45,111.45,0,0,0,31.18,77.53A8,8,0,0,0,61,232H232a8,8,0,0,0,3.5-15.19ZM67.14,88l25.41,10.3a24,24,0,0,0,31.23-13.45l21-53c2.56-6.11,9.47-9.27,15.43-7a12,12,0,0,1,6.88,15.92L145.69,93.76a24,24,0,0,0,13.43,31.14L184,134.73V152c0,.33,0,.66,0,1L55.77,101.71A108.84,108.84,0,0,1,67.14,88Zm48,128a87.53,87.53,0,0,1-24.34-42,8,8,0,0,0-15.49,4,105.16,105.16,0,0,0,18.36,38H64.44A95.54,95.54,0,0,1,40,152a85.9,85.9,0,0,1,7.73-36.29l137.8,55.12c3,18,10.56,33.48,21.89,45.16Z" }))
916
+ ],
917
+ [
918
+ "fill",
919
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M235.29,216.7C212.86,205.69,200,182.12,200,152V134.69a15.94,15.94,0,0,0-10.09-14.87l-28.65-11.46A8,8,0,0,1,156.79,98l22.32-56.67C184,28.79,178,14.21,165.34,9.51a24,24,0,0,0-30.7,13.71L112.25,80.08a8,8,0,0,1-10.41,4.5L73.11,73.08a15.91,15.91,0,0,0-17.38,3.66C34.68,98.4,24,123.71,24,152a111.53,111.53,0,0,0,31.15,77.53A8.06,8.06,0,0,0,61,232H232a8,8,0,0,0,8-7.51A8.21,8.21,0,0,0,235.29,216.7ZM115.11,216a87.52,87.52,0,0,1-24.26-41.71,8.21,8.21,0,0,0-9.25-6.18A8,8,0,0,0,75.28,178a105.33,105.33,0,0,0,18.36,38H64.44A95.62,95.62,0,0,1,40,152a85.92,85.92,0,0,1,7.73-36.3l137.8,55.13c3,18.06,10.55,33.5,21.89,45.19Z" }))
920
+ ],
921
+ [
922
+ "light",
923
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M234.62,218.6C211.35,207.29,198,183,198,152V134.7a14,14,0,0,0-8.82-13l-24.89-9.83a10,10,0,0,1-5.59-13L180,45.9a26,26,0,0,0-15-34.33c-12.95-4.83-27.88,1.84-33.31,15l-21,53.11a10,10,0,0,1-13,5.61L72.37,75a13.9,13.9,0,0,0-15.2,3.19C36.49,99.42,26,124.26,26,152a109.53,109.53,0,0,0,30.62,76.16A6,6,0,0,0,61,230H232a6,6,0,0,0,2.62-11.4ZM65.77,86.52a2,2,0,0,1,2.12-.43l25.4,10.29a22,22,0,0,0,28.63-12.32l21-53c3-7.13,11-10.81,18-8.21a14,14,0,0,1,8,18.54l-21.36,53.1A22.05,22.05,0,0,0,159.86,123l24.88,9.83A2,2,0,0,1,186,134.7V152c0,1.34,0,2.65.08,4L52.74,102.61A110.07,110.07,0,0,1,65.77,86.52ZM114.33,218a89.6,89.6,0,0,1-25.5-43.5,6,6,0,1,0-11.62,3A102.87,102.87,0,0,0,97.81,218H63.56A97.56,97.56,0,0,1,38,152a87.42,87.42,0,0,1,8.71-38.86L187.35,169.4c3.15,19.92,11.77,36.66,25,48.6Z" }))
924
+ ],
925
+ [
926
+ "regular",
927
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M235.5,216.81c-22.56-11-35.5-34.58-35.5-64.8V134.73a15.94,15.94,0,0,0-10.09-14.87L165,110a8,8,0,0,1-4.48-10.34l21.32-53a28,28,0,0,0-16.1-37,28.14,28.14,0,0,0-35.82,16,.61.61,0,0,0,0,.12L108.9,79a8,8,0,0,1-10.37,4.49L73.11,73.14A15.89,15.89,0,0,0,55.74,76.8C34.68,98.45,24,123.75,24,152a111.45,111.45,0,0,0,31.18,77.53A8,8,0,0,0,61,232H232a8,8,0,0,0,3.5-15.19ZM67.14,88l25.41,10.3a24,24,0,0,0,31.23-13.45l21-53c2.56-6.11,9.47-9.27,15.43-7a12,12,0,0,1,6.88,15.92L145.69,93.76a24,24,0,0,0,13.43,31.14L184,134.73V152c0,.33,0,.66,0,1L55.77,101.71A108.84,108.84,0,0,1,67.14,88Zm48,128a87.53,87.53,0,0,1-24.34-42,8,8,0,0,0-15.49,4,105.16,105.16,0,0,0,18.36,38H64.44A95.54,95.54,0,0,1,40,152a85.9,85.9,0,0,1,7.73-36.29l137.8,55.12c3,18,10.56,33.48,21.89,45.16Z" }))
928
+ ],
929
+ [
930
+ "thin",
931
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M233.75,220.4C209.76,208.75,196,183.82,196,152V134.72a12,12,0,0,0-7.56-11.15l-24.89-9.83a12,12,0,0,1-6.71-15.55l21.33-53a23.88,23.88,0,0,0-31.93-31A24.72,24.72,0,0,0,133.62,27.3l-21,53.1A12,12,0,0,1,97,87.13L71.63,76.84a12,12,0,0,0-13,2.73C38.3,100.45,28,124.82,28,152a107.5,107.5,0,0,0,30.07,74.77A4,4,0,0,0,61,228H232a4,4,0,0,0,1.75-7.6ZM64.34,85.15a3.94,3.94,0,0,1,4.3-.89L94,94.55a20,20,0,0,0,26-11.2l21-53C144.39,22.19,153.61,18,161.58,21a16,16,0,0,1,9.19,21.16L149.41,95.22a20,20,0,0,0,11.18,26l24.9,9.83a4,4,0,0,1,2.51,3.72V152c0,2.36.08,4.69.22,7l-138.5-55.4A110.84,110.84,0,0,1,64.34,85.15ZM113.56,220A91.35,91.35,0,0,1,86.9,175a4,4,0,0,0-7.75,2,100.21,100.21,0,0,0,23.09,43H62.68A99.5,99.5,0,0,1,36,152a89.37,89.37,0,0,1,9.73-41.4L189.13,168c3.22,22,13.23,40.09,28.8,52Z" }))
932
+ ]
933
+ ]), Ar = /* @__PURE__ */ new Map([
934
+ [
935
+ "bold",
936
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z" }))
937
+ ],
938
+ [
939
+ "duotone",
940
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z", opacity: "0.2" }), /* @__PURE__ */ n.createElement("path", { d: "M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
941
+ ],
942
+ [
943
+ "fill",
944
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z" }))
945
+ ],
946
+ [
947
+ "light",
948
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z" }))
949
+ ],
950
+ [
951
+ "regular",
952
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
953
+ ],
954
+ [
955
+ "thin",
956
+ /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("path", { d: "M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z" }))
957
+ ]
958
+ ]), Cr = xr({
959
+ color: "currentColor",
960
+ size: "1em",
961
+ weight: "regular",
962
+ mirrored: !1
963
+ }), de = n.forwardRef(
964
+ (v, d) => {
965
+ const {
966
+ alt: w,
967
+ color: m,
968
+ size: R,
969
+ weight: _,
970
+ mirrored: C,
971
+ children: x,
972
+ weights: u,
973
+ ...b
974
+ } = v, {
975
+ color: i = "currentColor",
976
+ size: g,
977
+ weight: j = "regular",
978
+ mirrored: P = !1,
979
+ ...D
980
+ } = n.useContext(Cr);
981
+ return /* @__PURE__ */ n.createElement(
982
+ "svg",
983
+ {
984
+ ref: d,
985
+ xmlns: "http://www.w3.org/2000/svg",
986
+ width: R ?? g,
987
+ height: R ?? g,
988
+ fill: m ?? i,
989
+ viewBox: "0 0 256 256",
990
+ transform: C || P ? "scale(-1, 1)" : void 0,
991
+ ...D,
992
+ ...b
993
+ },
994
+ !!w && /* @__PURE__ */ n.createElement("title", null, w),
995
+ x,
996
+ u.get(_ ?? j)
997
+ );
998
+ }
999
+ );
1000
+ de.displayName = "IconBase";
1001
+ const We = n.forwardRef((v, d) => /* @__PURE__ */ n.createElement(de, { ref: d, ...v, weights: jr }));
1002
+ We.displayName = "BroomIcon";
1003
+ const Ye = n.forwardRef((v, d) => /* @__PURE__ */ n.createElement(de, { ref: d, ...v, weights: Ar }));
1004
+ Ye.displayName = "MagnifyingGlassIcon";
1005
+ function ce(v, d) {
1006
+ return d.split(".").reduce((w, m) => w ? w[m] : void 0, v);
1007
+ }
1008
+ function Or({
1009
+ field: v,
1010
+ title: d,
1011
+ id: w,
1012
+ placeholder: m,
1013
+ value: R,
1014
+ options: _,
1015
+ icon: C,
1016
+ iconPosition: x = "right",
1017
+ optionPosition: u = "left",
1018
+ error: b,
1019
+ required: i,
1020
+ onChange: g,
1021
+ selected: j,
1022
+ isClearable: P,
1023
+ searchable: D = !1
1024
+ }) {
1025
+ const [B, H] = se(""), [O, y] = se(!1), V = yr(null), [z, Q] = se("");
1026
+ Ze(() => {
1027
+ function E(F) {
1028
+ V.current && !V.current.contains(F.target) && y(!1);
1029
+ }
1030
+ return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
1031
+ }, []);
1032
+ const J = (E) => {
1033
+ g == null || g(E), y(!1);
1034
+ };
1035
+ return Ze(() => {
1036
+ Q(R);
1037
+ }, [R]), /* @__PURE__ */ f.jsxs("div", { className: "flex flex-col gap-2 w-full relative", ref: V, children: [
1038
+ d && /* @__PURE__ */ f.jsxs(
1039
+ "label",
1040
+ {
1041
+ htmlFor: w,
1042
+ className: L("block text-md font-medium text-foreground", {
1043
+ "text-red-700": b
1044
+ }),
1045
+ children: [
1046
+ i && /* @__PURE__ */ f.jsx("span", { className: "text-red-500", children: "*" }),
1047
+ " ",
1048
+ d ? `${d}:` : ""
1049
+ ]
1050
+ }
1051
+ ),
1052
+ /* @__PURE__ */ f.jsxs(
1053
+ "div",
1054
+ {
1055
+ className: L(
1056
+ "cursor-pointer flex items-center justify-between bg-input border border-border text-foreground text-sm rounded-lg w-full p-2.5 pr-8",
1057
+ { "border-red-500": b }
1058
+ ),
1059
+ onClick: () => y(!O),
1060
+ children: [
1061
+ x === "left" && C,
1062
+ /* @__PURE__ */ f.jsx("span", { className: `flex-1 ${x === "left" && "ml-3"}`, children: z || m || "Selecione..." }),
1063
+ x === "right" && C
1064
+ ]
1065
+ }
1066
+ ),
1067
+ O && /* @__PURE__ */ f.jsxs(
1068
+ "ul",
1069
+ {
1070
+ className: L(
1071
+ "absolute top-full w-auto max-h-72 overflow-y-auto border border-border rounded-lg bg-card z-50 shadow-lg mt-1",
1072
+ {
1073
+ "left-0": u === "left",
1074
+ "right-0": u === "right"
1075
+ }
1076
+ ),
1077
+ children: [
1078
+ /* @__PURE__ */ f.jsx(
1079
+ "li",
1080
+ {
1081
+ className: "p-3 cursor-pointer text-foreground",
1082
+ onClick: () => P && J({}),
1083
+ children: m || "Selecione..."
1084
+ },
1085
+ "select-placeholder"
1086
+ ),
1087
+ D && /* @__PURE__ */ f.jsxs("li", { className: "px-2 cursor-pointer text-foreground flex gap-2 items-center justify-start", children: [
1088
+ /* @__PURE__ */ f.jsx("div", { className: "flex-1", children: /* @__PURE__ */ f.jsx(
1089
+ _r,
1090
+ {
1091
+ field: "",
1092
+ title: "",
1093
+ id: "search-select",
1094
+ name: "search-select",
1095
+ placeholder: "Buscar",
1096
+ icon: /* @__PURE__ */ f.jsx(Ye, {}),
1097
+ iconPosition: "left",
1098
+ onChange: (E) => H(E.target.value),
1099
+ value: B
1100
+ }
1101
+ ) }),
1102
+ /* @__PURE__ */ f.jsx(
1103
+ Rr,
1104
+ {
1105
+ color: "blue",
1106
+ title: "",
1107
+ icon: /* @__PURE__ */ f.jsx(We, {}),
1108
+ positionIcon: "left",
1109
+ onClick: (E) => {
1110
+ E == null || E.stopPropagation(), g == null || g({}), H("");
1111
+ },
1112
+ className: "m-0"
1113
+ }
1114
+ )
1115
+ ] }),
1116
+ _.filter((E) => {
1117
+ const F = ce(E, v);
1118
+ return String(F).toLowerCase().includes(B.toLowerCase());
1119
+ }).map((E, F) => /* @__PURE__ */ f.jsx(
1120
+ "li",
1121
+ {
1122
+ className: L(
1123
+ "p-2 hover:bg-primary cursor-pointer text-foreground",
1124
+ {
1125
+ "bg-primary": ce(E, v) === R || (j == null ? void 0 : j[v]) === E[v]
1126
+ }
1127
+ ),
1128
+ onClick: () => J(E),
1129
+ children: ce(E, v)
1130
+ },
1131
+ `select-option-${F}`
1132
+ ))
1133
+ ]
1134
+ }
1135
+ ),
1136
+ b && /* @__PURE__ */ f.jsx("p", { className: "text-sm text-red-600 mt-1", children: b })
1137
+ ] });
1138
+ }
1139
+ export {
1140
+ Rr as B,
1141
+ _r as I,
1142
+ Or as S
1143
+ };