stargazer-ui 1.0.3 → 1.0.5

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.
Files changed (135) hide show
  1. package/dist/BaseTypes.d.ts +4 -0
  2. package/dist/cjs/index.js +2 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/components/Button/Button.d.ts +4 -0
  5. package/dist/components/Button/Button.types.d.ts +7 -0
  6. package/dist/components/Button/Button.types.js +1 -0
  7. package/dist/components/Button/index.d.ts +1 -0
  8. package/dist/components/Button/index.js +4 -0
  9. package/dist/components/Card/Card.d.ts +34 -0
  10. package/dist/components/Card/Card.js +18 -0
  11. package/dist/components/Card/Card.types.d.ts +24 -0
  12. package/dist/components/Card/Card.types.js +1 -0
  13. package/dist/components/Card/index.d.ts +1 -0
  14. package/dist/components/Card/index.js +4 -0
  15. package/dist/{CloseButton/index.d.ts → components/CloseButton/CloseButton.d.ts} +1 -5
  16. package/dist/components/CloseButton/CloseButton.types.d.ts +5 -0
  17. package/dist/components/CloseButton/CloseButton.types.js +1 -0
  18. package/dist/components/CloseButton/index.d.ts +1 -0
  19. package/dist/components/CloseButton/index.js +4 -0
  20. package/dist/{Dropdown/index.d.ts → components/Dropdown/Dropdown.d.ts} +18 -55
  21. package/dist/{Dropdown/index.js → components/Dropdown/Dropdown.js} +31 -30
  22. package/dist/components/Dropdown/Dropdown.types.d.ts +55 -0
  23. package/dist/components/Dropdown/Dropdown.types.js +1 -0
  24. package/dist/components/Dropdown/index.d.ts +1 -0
  25. package/dist/components/Dropdown/index.js +4 -0
  26. package/dist/components/FloatingLabel/FloatingLabel.d.ts +4 -0
  27. package/dist/components/FloatingLabel/FloatingLabel.js +13 -0
  28. package/dist/components/FloatingLabel/FloatingLabel.types.d.ts +9 -0
  29. package/dist/components/FloatingLabel/FloatingLabel.types.js +1 -0
  30. package/dist/components/FloatingLabel/index.d.ts +1 -0
  31. package/dist/components/FloatingLabel/index.js +4 -0
  32. package/dist/components/Form/Form.d.ts +17 -0
  33. package/dist/{Form/index.js → components/Form/Form.js} +16 -15
  34. package/dist/components/Form/Form.types.d.ts +50 -0
  35. package/dist/components/Form/Form.types.js +1 -0
  36. package/dist/components/Form/index.d.ts +1 -0
  37. package/dist/components/Form/index.js +4 -0
  38. package/dist/components/Grid/Grid.d.ts +5 -0
  39. package/dist/components/Grid/Grid.js +36 -0
  40. package/dist/components/Grid/index.d.ts +1 -0
  41. package/dist/components/Grid/index.js +4 -0
  42. package/dist/components/InputGroup/InputGroup.d.ts +6 -0
  43. package/dist/components/InputGroup/InputGroup.js +8 -0
  44. package/dist/components/InputGroup/InputGroup.types.d.ts +10 -0
  45. package/dist/components/InputGroup/InputGroup.types.js +1 -0
  46. package/dist/components/InputGroup/index.d.ts +1 -0
  47. package/dist/components/InputGroup/index.js +4 -0
  48. package/dist/components/Modal/Modal.d.ts +40 -0
  49. package/dist/components/Modal/Modal.js +100 -0
  50. package/dist/components/Modal/Modal.types.d.ts +40 -0
  51. package/dist/components/Modal/Modal.types.js +1 -0
  52. package/dist/components/Modal/index.d.ts +1 -0
  53. package/dist/components/Modal/index.js +4 -0
  54. package/dist/components/Nav/Nav.d.ts +30 -0
  55. package/dist/components/Nav/Nav.js +13 -0
  56. package/dist/components/Nav/Nav.types.d.ts +17 -0
  57. package/dist/components/Nav/Nav.types.js +1 -0
  58. package/dist/components/Nav/index.d.ts +1 -0
  59. package/dist/components/Nav/index.js +4 -0
  60. package/dist/components/NavBar/Navbar.d.ts +20 -0
  61. package/dist/components/NavBar/Navbar.js +17 -0
  62. package/dist/components/NavBar/Navbar.types.d.ts +18 -0
  63. package/dist/components/NavBar/Navbar.types.js +1 -0
  64. package/dist/components/NavBar/index.d.ts +1 -0
  65. package/dist/components/NavBar/index.js +4 -0
  66. package/dist/components/NavDropdown/NavDropdown.d.ts +35 -0
  67. package/dist/components/NavDropdown/NavDropdown.js +62 -0
  68. package/dist/components/NavDropdown/NavDropdown.types.d.ts +5 -0
  69. package/dist/components/NavDropdown/NavDropdown.types.js +1 -0
  70. package/dist/components/NavDropdown/index.d.ts +1 -0
  71. package/dist/components/NavDropdown/index.js +4 -0
  72. package/dist/components/OffCanvas/OffCanvas.d.ts +3 -0
  73. package/dist/components/OffCanvas/OffCanvas.js +2266 -0
  74. package/dist/components/OffCanvas/index.d.ts +1 -0
  75. package/dist/components/OffCanvas/index.js +4 -0
  76. package/dist/components/Overlay/Overlay.d.ts +3 -0
  77. package/dist/components/Overlay/index.d.ts +1 -0
  78. package/dist/components/Overlay/index.js +4 -0
  79. package/dist/components/Popout/Popout.d.ts +22 -0
  80. package/dist/components/Popout/Popout.js +72 -0
  81. package/dist/components/Popout/Popout.types.d.ts +36 -0
  82. package/dist/components/Popout/Popout.types.js +1 -0
  83. package/dist/components/Popout/index.d.ts +1 -0
  84. package/dist/components/Popout/index.js +4 -0
  85. package/dist/components/Spinner/Spinner.d.ts +4 -0
  86. package/dist/components/Spinner/Spinner.js +9 -0
  87. package/dist/components/Spinner/Spinner.types.d.ts +7 -0
  88. package/dist/components/Spinner/Spinner.types.js +1 -0
  89. package/dist/components/Spinner/index.d.ts +1 -0
  90. package/dist/components/Spinner/index.js +4 -0
  91. package/dist/components/Table/Table.d.ts +4 -0
  92. package/dist/components/Table/Table.js +9 -0
  93. package/dist/components/Table/Table.types.d.ts +7 -0
  94. package/dist/components/Table/Table.types.js +1 -0
  95. package/dist/components/Table/index.d.ts +1 -0
  96. package/dist/components/Table/index.js +4 -0
  97. package/dist/components/Tabs/Tabs.d.ts +9 -0
  98. package/dist/components/Tabs/Tabs.js +77 -0
  99. package/dist/components/Tabs/Tabs.types.d.ts +35 -0
  100. package/dist/components/Tabs/Tabs.types.js +1 -0
  101. package/dist/components/Tabs/index.d.ts +1 -0
  102. package/dist/components/Tabs/index.js +4 -0
  103. package/dist/components/ToggleButton/ToggleButton.d.ts +9 -0
  104. package/dist/components/ToggleButton/ToggleButton.js +11 -0
  105. package/dist/components/ToggleButton/ToggleButton.types.d.ts +0 -0
  106. package/dist/components/ToggleButton/ToggleButton.types.js +1 -0
  107. package/dist/components/ToggleButton/index.d.ts +1 -0
  108. package/dist/components/ToggleButton/index.js +4 -0
  109. package/dist/components/index.d.ts +19 -0
  110. package/dist/components/index.js +19 -0
  111. package/dist/esm/index.js +2 -0
  112. package/dist/esm/index.js.map +1 -0
  113. package/dist/index.d.ts +1 -0
  114. package/dist/index.js +19 -0
  115. package/dist/types.d.ts +2 -0
  116. package/package.json +18 -4
  117. package/dist/Button/index.d.ts +0 -9
  118. package/dist/Card/index.d.ts +0 -92
  119. package/dist/Card/index.js +0 -18
  120. package/dist/FloatingLabel/index.js +0 -13
  121. package/dist/Form/index.d.ts +0 -61
  122. package/dist/InputGroup/index.js +0 -7
  123. package/dist/Modal/index.js +0 -85
  124. package/dist/Nav/index.js +0 -14
  125. package/dist/NavBar/index.js +0 -16
  126. package/dist/NavDropdown/index.js +0 -850
  127. package/dist/Popout/index.js +0 -85
  128. package/dist/Tabs/index.js +0 -69
  129. package/dist/ToggleButton/index.js +0 -11
  130. package/dist/main.js +0 -30
  131. package/dist/stylesheets/stargazerui.css +0 -3759
  132. package/dist/stylesheets/stargazerui.css.map +0 -1
  133. /package/dist/{Button/index.js → components/Button/Button.js} +0 -0
  134. /package/dist/{CloseButton/index.js → components/CloseButton/CloseButton.js} +0 -0
  135. /package/dist/{Overlay/index.js → components/Overlay/Overlay.js} +0 -0
@@ -1,850 +0,0 @@
1
- import { jsx as x, jsxs as Ce } from "react/jsx-runtime";
2
- import { forwardRef as ze, useState as ce, useCallback as De, useMemo as Ne } from "react";
3
- import A, { DropdownContext as ke } from "../Dropdown/index.js";
4
- function Ae(e) {
5
- if (typeof e != "object" || e === null)
6
- return !1;
7
- let t = e;
8
- for (; Object.getPrototypeOf(t) !== null; )
9
- t = Object.getPrototypeOf(t);
10
- return Object.getPrototypeOf(e) === t || Object.getPrototypeOf(e) === null;
11
- }
12
- function Fe(e) {
13
- return Ae(e) && "type" in e && typeof e.type == "string";
14
- }
15
- var he = Symbol.for("immer-nothing"), ue = Symbol.for("immer-draftable"), y = Symbol.for("immer-state"), Ie = process.env.NODE_ENV !== "production" ? [
16
- // All error codes, starting by 0:
17
- function(e) {
18
- return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
19
- },
20
- function(e) {
21
- return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`;
22
- },
23
- "This object has been frozen and should not be mutated",
24
- function(e) {
25
- return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + e;
26
- },
27
- "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
28
- "Immer forbids circular references",
29
- "The first or second argument to `produce` must be a function",
30
- "The third argument to `produce` must be a function or undefined",
31
- "First argument to `createDraft` must be a plain object, an array, or an immerable object",
32
- "First argument to `finishDraft` must be a draft returned by `createDraft`",
33
- function(e) {
34
- return `'current' expects a draft, got: ${e}`;
35
- },
36
- "Object.defineProperty() cannot be used on an Immer draft",
37
- "Object.setPrototypeOf() cannot be used on an Immer draft",
38
- "Immer only supports deleting array indices",
39
- "Immer only supports setting array indices and the 'length' property",
40
- function(e) {
41
- return `'original' expects a draft, got: ${e}`;
42
- }
43
- // Note: if more errors are added, the errorOffset in Patches.ts should be increased
44
- // See Patches.ts for additional errors
45
- ] : [];
46
- function d(e, ...t) {
47
- if (process.env.NODE_ENV !== "production") {
48
- const r = Ie[e], n = typeof r == "function" ? r.apply(null, t) : r;
49
- throw new Error(`[Immer] ${n}`);
50
- }
51
- throw new Error(
52
- `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
53
- );
54
- }
55
- var C = Object.getPrototypeOf;
56
- function b(e) {
57
- return !!e && !!e[y];
58
- }
59
- function S(e) {
60
- var t;
61
- return e ? _e(e) || Array.isArray(e) || !!e[ue] || !!((t = e.constructor) != null && t[ue]) || U(e) || V(e) : !1;
62
- }
63
- var je = Object.prototype.constructor.toString();
64
- function _e(e) {
65
- if (!e || typeof e != "object")
66
- return !1;
67
- const t = C(e);
68
- if (t === null)
69
- return !0;
70
- const r = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
71
- return r === Object ? !0 : typeof r == "function" && Function.toString.call(r) === je;
72
- }
73
- function D(e, t) {
74
- q(e) === 0 ? Object.entries(e).forEach(([r, n]) => {
75
- t(r, n, e);
76
- }) : e.forEach((r, n) => t(n, r, e));
77
- }
78
- function q(e) {
79
- const t = e[y];
80
- return t ? t.type_ : Array.isArray(e) ? 1 : U(e) ? 2 : V(e) ? 3 : 0;
81
- }
82
- function Y(e, t) {
83
- return q(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
84
- }
85
- function we(e, t, r) {
86
- const n = q(e);
87
- n === 2 ? e.set(t, r) : n === 3 ? e.add(r) : e[t] = r;
88
- }
89
- function Me(e, t) {
90
- return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
91
- }
92
- function U(e) {
93
- return e instanceof Map;
94
- }
95
- function V(e) {
96
- return e instanceof Set;
97
- }
98
- function v(e) {
99
- return e.copy_ || e.base_;
100
- }
101
- function Z(e, t) {
102
- if (U(e))
103
- return new Map(e);
104
- if (V(e))
105
- return new Set(e);
106
- if (Array.isArray(e))
107
- return Array.prototype.slice.call(e);
108
- if (!t && _e(e))
109
- return C(e) ? { ...e } : Object.assign(/* @__PURE__ */ Object.create(null), e);
110
- const r = Object.getOwnPropertyDescriptors(e);
111
- delete r[y];
112
- let n = Reflect.ownKeys(r);
113
- for (let o = 0; o < n.length; o++) {
114
- const i = n[o], s = r[i];
115
- s.writable === !1 && (s.writable = !0, s.configurable = !0), (s.get || s.set) && (r[i] = {
116
- configurable: !0,
117
- writable: !0,
118
- // could live with !!desc.set as well here...
119
- enumerable: s.enumerable,
120
- value: e[i]
121
- });
122
- }
123
- return Object.create(C(e), r);
124
- }
125
- function ne(e, t = !1) {
126
- return K(e) || b(e) || !S(e) || (q(e) > 1 && (e.set = e.add = e.clear = e.delete = Re), Object.freeze(e), t && D(e, (r, n) => ne(n, !0))), e;
127
- }
128
- function Re() {
129
- d(2);
130
- }
131
- function K(e) {
132
- return Object.isFrozen(e);
133
- }
134
- var Te = {};
135
- function O(e) {
136
- const t = Te[e];
137
- return t || d(0, e), t;
138
- }
139
- var N;
140
- function ge() {
141
- return N;
142
- }
143
- function xe(e, t) {
144
- return {
145
- drafts_: [],
146
- parent_: e,
147
- immer_: t,
148
- // Whenever the modified draft contains a draft from another scope, we
149
- // need to prevent auto-freezing so the unowned draft can be finalized.
150
- canAutoFreeze_: !0,
151
- unfinalizedDrafts_: 0
152
- };
153
- }
154
- function ae(e, t) {
155
- t && (O("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
156
- }
157
- function L(e) {
158
- ee(e), e.drafts_.forEach($e), e.drafts_ = null;
159
- }
160
- function ee(e) {
161
- e === N && (N = e.parent_);
162
- }
163
- function fe(e) {
164
- return N = xe(N, e);
165
- }
166
- function $e(e) {
167
- const t = e[y];
168
- t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
169
- }
170
- function le(e, t) {
171
- t.unfinalizedDrafts_ = t.drafts_.length;
172
- const r = t.drafts_[0];
173
- return e !== void 0 && e !== r ? (r[y].modified_ && (L(t), d(4)), S(e) && (e = $(t, e), t.parent_ || W(t, e)), t.patches_ && O("Patches").generateReplacementPatches_(
174
- r[y].base_,
175
- e,
176
- t.patches_,
177
- t.inversePatches_
178
- )) : e = $(t, r, []), L(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== he ? e : void 0;
179
- }
180
- function $(e, t, r) {
181
- if (K(t))
182
- return t;
183
- const n = t[y];
184
- if (!n)
185
- return D(
186
- t,
187
- (o, i) => de(e, n, t, o, i, r)
188
- ), t;
189
- if (n.scope_ !== e)
190
- return t;
191
- if (!n.modified_)
192
- return W(e, n.base_, !0), n.base_;
193
- if (!n.finalized_) {
194
- n.finalized_ = !0, n.scope_.unfinalizedDrafts_--;
195
- const o = n.copy_;
196
- let i = o, s = !1;
197
- n.type_ === 3 && (i = new Set(o), o.clear(), s = !0), D(
198
- i,
199
- (c, u) => de(e, n, o, c, u, r, s)
200
- ), W(e, o, !1), r && e.patches_ && O("Patches").generatePatches_(
201
- n,
202
- r,
203
- e.patches_,
204
- e.inversePatches_
205
- );
206
- }
207
- return n.copy_;
208
- }
209
- function de(e, t, r, n, o, i, s) {
210
- if (process.env.NODE_ENV !== "production" && o === r && d(5), b(o)) {
211
- const c = i && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
212
- !Y(t.assigned_, n) ? i.concat(n) : void 0, u = $(e, o, c);
213
- if (we(r, n, u), b(u))
214
- e.canAutoFreeze_ = !1;
215
- else
216
- return;
217
- } else
218
- s && r.add(o);
219
- if (S(o) && !K(o)) {
220
- if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
221
- return;
222
- $(e, o), (!t || !t.scope_.parent_) && W(e, o);
223
- }
224
- }
225
- function W(e, t, r = !1) {
226
- !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && ne(t, r);
227
- }
228
- function We(e, t) {
229
- const r = Array.isArray(e), n = {
230
- type_: r ? 1 : 0,
231
- // Track which produce call this is associated with.
232
- scope_: t ? t.scope_ : ge(),
233
- // True for both shallow and deep changes.
234
- modified_: !1,
235
- // Used during finalization.
236
- finalized_: !1,
237
- // Track which properties have been assigned (true) or deleted (false).
238
- assigned_: {},
239
- // The parent draft state.
240
- parent_: t,
241
- // The base state.
242
- base_: e,
243
- // The base proxy.
244
- draft_: null,
245
- // set below
246
- // The base copy with any updated values.
247
- copy_: null,
248
- // Called by the `produce` function.
249
- revoke_: null,
250
- isManual_: !1
251
- };
252
- let o = n, i = oe;
253
- r && (o = [n], i = k);
254
- const { revoke: s, proxy: c } = Proxy.revocable(o, i);
255
- return n.draft_ = c, n.revoke_ = s, c;
256
- }
257
- var oe = {
258
- get(e, t) {
259
- if (t === y)
260
- return e;
261
- const r = v(e);
262
- if (!Y(r, t))
263
- return qe(e, r, t);
264
- const n = r[t];
265
- return e.finalized_ || !S(n) ? n : n === J(e.base_, t) ? (Q(e), e.copy_[t] = re(n, e)) : n;
266
- },
267
- has(e, t) {
268
- return t in v(e);
269
- },
270
- ownKeys(e) {
271
- return Reflect.ownKeys(v(e));
272
- },
273
- set(e, t, r) {
274
- const n = ve(v(e), t);
275
- if (n != null && n.set)
276
- return n.set.call(e.draft_, r), !0;
277
- if (!e.modified_) {
278
- const o = J(v(e), t), i = o == null ? void 0 : o[y];
279
- if (i && i.base_ === r)
280
- return e.copy_[t] = r, e.assigned_[t] = !1, !0;
281
- if (Me(r, o) && (r !== void 0 || Y(e.base_, t)))
282
- return !0;
283
- Q(e), te(e);
284
- }
285
- return e.copy_[t] === r && // special case: handle new props with value 'undefined'
286
- (r !== void 0 || t in e.copy_) || // special case: NaN
287
- Number.isNaN(r) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = r, e.assigned_[t] = !0), !0;
288
- },
289
- deleteProperty(e, t) {
290
- return J(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, Q(e), te(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
291
- },
292
- // Note: We never coerce `desc.value` into an Immer draft, because we can't make
293
- // the same guarantee in ES5 mode.
294
- getOwnPropertyDescriptor(e, t) {
295
- const r = v(e), n = Reflect.getOwnPropertyDescriptor(r, t);
296
- return n && {
297
- writable: !0,
298
- configurable: e.type_ !== 1 || t !== "length",
299
- enumerable: n.enumerable,
300
- value: r[t]
301
- };
302
- },
303
- defineProperty() {
304
- d(11);
305
- },
306
- getPrototypeOf(e) {
307
- return C(e.base_);
308
- },
309
- setPrototypeOf() {
310
- d(12);
311
- }
312
- }, k = {};
313
- D(oe, (e, t) => {
314
- k[e] = function() {
315
- return arguments[0] = arguments[0][0], t.apply(this, arguments);
316
- };
317
- });
318
- k.deleteProperty = function(e, t) {
319
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && d(13), k.set.call(this, e, t, void 0);
320
- };
321
- k.set = function(e, t, r) {
322
- return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && d(14), oe.set.call(this, e[0], t, r, e[0]);
323
- };
324
- function J(e, t) {
325
- const r = e[y];
326
- return (r ? v(r) : e)[t];
327
- }
328
- function qe(e, t, r) {
329
- var o;
330
- const n = ve(t, r);
331
- return n ? "value" in n ? n.value : (
332
- // This is a very special case, if the prop is a getter defined by the
333
- // prototype, we should invoke it with the draft as context!
334
- (o = n.get) == null ? void 0 : o.call(e.draft_)
335
- ) : void 0;
336
- }
337
- function ve(e, t) {
338
- if (!(t in e))
339
- return;
340
- let r = C(e);
341
- for (; r; ) {
342
- const n = Object.getOwnPropertyDescriptor(r, t);
343
- if (n)
344
- return n;
345
- r = C(r);
346
- }
347
- }
348
- function te(e) {
349
- e.modified_ || (e.modified_ = !0, e.parent_ && te(e.parent_));
350
- }
351
- function Q(e) {
352
- e.copy_ || (e.copy_ = Z(
353
- e.base_,
354
- e.scope_.immer_.useStrictShallowCopy_
355
- ));
356
- }
357
- var Ue = class {
358
- constructor(e) {
359
- this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (t, r, n) => {
360
- if (typeof t == "function" && typeof r != "function") {
361
- const i = r;
362
- r = t;
363
- const s = this;
364
- return function(u = i, ...a) {
365
- return s.produce(u, (f) => r.call(this, f, ...a));
366
- };
367
- }
368
- typeof r != "function" && d(6), n !== void 0 && typeof n != "function" && d(7);
369
- let o;
370
- if (S(t)) {
371
- const i = fe(this), s = re(t, void 0);
372
- let c = !0;
373
- try {
374
- o = r(s), c = !1;
375
- } finally {
376
- c ? L(i) : ee(i);
377
- }
378
- return ae(i, n), le(o, i);
379
- } else if (!t || typeof t != "object") {
380
- if (o = r(t), o === void 0 && (o = t), o === he && (o = void 0), this.autoFreeze_ && ne(o, !0), n) {
381
- const i = [], s = [];
382
- O("Patches").generateReplacementPatches_(t, o, i, s), n(i, s);
383
- }
384
- return o;
385
- } else
386
- d(1, t);
387
- }, this.produceWithPatches = (t, r) => {
388
- if (typeof t == "function")
389
- return (s, ...c) => this.produceWithPatches(s, (u) => t(u, ...c));
390
- let n, o;
391
- return [this.produce(t, r, (s, c) => {
392
- n = s, o = c;
393
- }), n, o];
394
- }, typeof (e == null ? void 0 : e.autoFreeze) == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof (e == null ? void 0 : e.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
395
- }
396
- createDraft(e) {
397
- S(e) || d(8), b(e) && (e = be(e));
398
- const t = fe(this), r = re(e, void 0);
399
- return r[y].isManual_ = !0, ee(t), r;
400
- }
401
- finishDraft(e, t) {
402
- const r = e && e[y];
403
- (!r || !r.isManual_) && d(9);
404
- const { scope_: n } = r;
405
- return ae(n, t), le(void 0, n);
406
- }
407
- /**
408
- * Pass true to automatically freeze all copies created by Immer.
409
- *
410
- * By default, auto-freezing is enabled.
411
- */
412
- setAutoFreeze(e) {
413
- this.autoFreeze_ = e;
414
- }
415
- /**
416
- * Pass true to enable strict shallow copy.
417
- *
418
- * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
419
- */
420
- setUseStrictShallowCopy(e) {
421
- this.useStrictShallowCopy_ = e;
422
- }
423
- applyPatches(e, t) {
424
- let r;
425
- for (r = t.length - 1; r >= 0; r--) {
426
- const o = t[r];
427
- if (o.path.length === 0 && o.op === "replace") {
428
- e = o.value;
429
- break;
430
- }
431
- }
432
- r > -1 && (t = t.slice(r + 1));
433
- const n = O("Patches").applyPatches_;
434
- return b(e) ? n(e, t) : this.produce(
435
- e,
436
- (o) => n(o, t)
437
- );
438
- }
439
- };
440
- function re(e, t) {
441
- const r = U(e) ? O("MapSet").proxyMap_(e, t) : V(e) ? O("MapSet").proxySet_(e, t) : We(e, t);
442
- return (t ? t.scope_ : ge()).drafts_.push(r), r;
443
- }
444
- function be(e) {
445
- return b(e) || d(10, e), Se(e);
446
- }
447
- function Se(e) {
448
- if (!S(e) || K(e))
449
- return e;
450
- const t = e[y];
451
- let r;
452
- if (t) {
453
- if (!t.modified_)
454
- return t.base_;
455
- t.finalized_ = !0, r = Z(e, t.scope_.immer_.useStrictShallowCopy_);
456
- } else
457
- r = Z(e, !0);
458
- return D(r, (n, o) => {
459
- we(r, n, Se(o));
460
- }), t && (t.finalized_ = !1), r;
461
- }
462
- var m = new Ue();
463
- m.produce;
464
- m.produceWithPatches.bind(
465
- m
466
- );
467
- m.setAutoFreeze.bind(m);
468
- m.setUseStrictShallowCopy.bind(m);
469
- m.applyPatches.bind(m);
470
- m.createDraft.bind(m);
471
- m.finishDraft.bind(m);
472
- var Ve = (e, t, r) => {
473
- if (t.length === 1 && t[0] === r) {
474
- let n = !1;
475
- try {
476
- const o = {};
477
- e(o) === o && (n = !0);
478
- } catch {
479
- }
480
- if (n) {
481
- let o;
482
- try {
483
- throw new Error();
484
- } catch (i) {
485
- ({ stack: o } = i);
486
- }
487
- console.warn(
488
- `The result function returned its own inputs without modification. e.g
489
- \`createSelector([state => state.todos], todos => todos)\`
490
- This could lead to inefficient memoization and unnecessary re-renders.
491
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,
492
- { stack: o }
493
- );
494
- }
495
- }
496
- }, Ke = (e, t, r) => {
497
- const { memoize: n, memoizeOptions: o } = t, { inputSelectorResults: i, inputSelectorResultsCopy: s } = e, c = n(() => ({}), ...o);
498
- if (!(c.apply(null, i) === c.apply(null, s))) {
499
- let a;
500
- try {
501
- throw new Error();
502
- } catch (f) {
503
- ({ stack: a } = f);
504
- }
505
- console.warn(
506
- `An input selector returned a different result when passed same arguments.
507
- This means your output selector will likely run more frequently than intended.
508
- Avoid returning a new reference inside your input selector, e.g.
509
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,
510
- {
511
- arguments: r,
512
- firstInputs: i,
513
- secondInputs: s,
514
- stack: a
515
- }
516
- );
517
- }
518
- }, Be = {
519
- inputStabilityCheck: "once",
520
- identityFunctionCheck: "once"
521
- };
522
- function Ge(e, t = `expected a function, instead received ${typeof e}`) {
523
- if (typeof e != "function")
524
- throw new TypeError(t);
525
- }
526
- function He(e, t = `expected an object, instead received ${typeof e}`) {
527
- if (typeof e != "object")
528
- throw new TypeError(t);
529
- }
530
- function Xe(e, t = "expected all items to be functions, instead received the following types: ") {
531
- if (!e.every((r) => typeof r == "function")) {
532
- const r = e.map(
533
- (n) => typeof n == "function" ? `function ${n.name || "unnamed"}()` : typeof n
534
- ).join(", ");
535
- throw new TypeError(`${t}[${r}]`);
536
- }
537
- }
538
- var pe = (e) => Array.isArray(e) ? e : [e];
539
- function Je(e) {
540
- const t = Array.isArray(e[0]) ? e[0] : e;
541
- return Xe(
542
- t,
543
- "createSelector expects all input-selectors to be functions, but received the following types: "
544
- ), t;
545
- }
546
- function ye(e, t) {
547
- const r = [], { length: n } = e;
548
- for (let o = 0; o < n; o++)
549
- r.push(e[o].apply(null, t));
550
- return r;
551
- }
552
- var Qe = (e, t) => {
553
- const { identityFunctionCheck: r, inputStabilityCheck: n } = {
554
- ...Be,
555
- ...t
556
- };
557
- return {
558
- identityFunctionCheck: {
559
- shouldRun: r === "always" || r === "once" && e,
560
- run: Ve
561
- },
562
- inputStabilityCheck: {
563
- shouldRun: n === "always" || n === "once" && e,
564
- run: Ke
565
- }
566
- };
567
- }, Ye = class {
568
- constructor(e) {
569
- this.value = e;
570
- }
571
- deref() {
572
- return this.value;
573
- }
574
- }, Ze = typeof WeakRef < "u" ? WeakRef : Ye, Le = 0, me = 1;
575
- function T() {
576
- return {
577
- s: Le,
578
- v: void 0,
579
- o: null,
580
- p: null
581
- };
582
- }
583
- function ie(e, t = {}) {
584
- let r = T();
585
- const { resultEqualityCheck: n } = t;
586
- let o, i = 0;
587
- function s() {
588
- var l;
589
- let c = r;
590
- const { length: u } = arguments;
591
- for (let _ = 0, g = u; _ < g; _++) {
592
- const h = arguments[_];
593
- if (typeof h == "function" || typeof h == "object" && h !== null) {
594
- let p = c.o;
595
- p === null && (c.o = p = /* @__PURE__ */ new WeakMap());
596
- const w = p.get(h);
597
- w === void 0 ? (c = T(), p.set(h, c)) : c = w;
598
- } else {
599
- let p = c.p;
600
- p === null && (c.p = p = /* @__PURE__ */ new Map());
601
- const w = p.get(h);
602
- w === void 0 ? (c = T(), p.set(h, c)) : c = w;
603
- }
604
- }
605
- const a = c;
606
- let f;
607
- if (c.s === me ? f = c.v : (f = e.apply(null, arguments), i++), a.s = me, n) {
608
- const _ = ((l = o == null ? void 0 : o.deref) == null ? void 0 : l.call(o)) ?? o;
609
- _ != null && n(_, f) && (f = _, i !== 0 && i--), o = typeof f == "object" && f !== null || typeof f == "function" ? new Ze(f) : f;
610
- }
611
- return a.v = f, f;
612
- }
613
- return s.clearCache = () => {
614
- r = T(), s.resetResultsCount();
615
- }, s.resultsCount = () => i, s.resetResultsCount = () => {
616
- i = 0;
617
- }, s;
618
- }
619
- function Oe(e, ...t) {
620
- const r = typeof e == "function" ? {
621
- memoize: e,
622
- memoizeOptions: t
623
- } : e, n = (...o) => {
624
- let i = 0, s = 0, c, u = {}, a = o.pop();
625
- typeof a == "object" && (u = a, a = o.pop()), Ge(
626
- a,
627
- `createSelector expects an output function after the inputs, but received: [${typeof a}]`
628
- );
629
- const f = {
630
- ...r,
631
- ...u
632
- }, {
633
- memoize: l,
634
- memoizeOptions: _ = [],
635
- argsMemoize: g = ie,
636
- argsMemoizeOptions: h = [],
637
- devModeChecks: p = {}
638
- } = f, w = pe(_), I = pe(h), E = Je(o), H = l(function() {
639
- return i++, a.apply(
640
- null,
641
- arguments
642
- );
643
- }, ...w);
644
- let P = !0;
645
- const j = g(function() {
646
- s++;
647
- const z = ye(
648
- E,
649
- arguments
650
- );
651
- if (c = H.apply(null, z), process.env.NODE_ENV !== "production") {
652
- const { identityFunctionCheck: M, inputStabilityCheck: R } = Qe(P, p);
653
- if (M.shouldRun && M.run(
654
- a,
655
- z,
656
- c
657
- ), R.shouldRun) {
658
- const Pe = ye(
659
- E,
660
- arguments
661
- );
662
- R.run(
663
- { inputSelectorResults: z, inputSelectorResultsCopy: Pe },
664
- { memoize: l, memoizeOptions: w },
665
- arguments
666
- );
667
- }
668
- P && (P = !1);
669
- }
670
- return c;
671
- }, ...I);
672
- return Object.assign(j, {
673
- resultFunc: a,
674
- memoizedResultFunc: H,
675
- dependencies: E,
676
- dependencyRecomputations: () => s,
677
- resetDependencyRecomputations: () => {
678
- s = 0;
679
- },
680
- lastResult: () => c,
681
- recomputations: () => i,
682
- resetRecomputations: () => {
683
- i = 0;
684
- },
685
- memoize: l,
686
- argsMemoize: g
687
- });
688
- };
689
- return Object.assign(n, {
690
- withTypes: () => n
691
- }), n;
692
- }
693
- var et = /* @__PURE__ */ Oe(ie), tt = Object.assign(
694
- (e, t = et) => {
695
- He(
696
- e,
697
- `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`
698
- );
699
- const r = Object.keys(e), n = r.map(
700
- (i) => e[i]
701
- );
702
- return t(
703
- n,
704
- (...i) => i.reduce((s, c, u) => (s[r[u]] = c, s), {})
705
- );
706
- },
707
- { withTypes: () => tt }
708
- ), rt = (...e) => {
709
- const t = Oe(...e), r = Object.assign((...n) => {
710
- const o = t(...n), i = (s, ...c) => o(b(s) ? be(s) : s, ...c);
711
- return Object.assign(i, o), i;
712
- }, {
713
- withTypes: () => r
714
- });
715
- return r;
716
- };
717
- rt(ie);
718
- function B(e, t) {
719
- function r(...n) {
720
- if (t) {
721
- let o = t(...n);
722
- if (!o)
723
- throw new Error(process.env.NODE_ENV === "production" ? G(0) : "prepareAction did not return an object");
724
- return {
725
- type: e,
726
- payload: o.payload,
727
- ..."meta" in o && {
728
- meta: o.meta
729
- },
730
- ..."error" in o && {
731
- error: o.error
732
- }
733
- };
734
- }
735
- return {
736
- type: e,
737
- payload: n[0]
738
- };
739
- }
740
- return r.toString = () => `${e}`, r.type = e, r.match = (n) => Fe(n) && n.type === e, r;
741
- }
742
- process.env.NODE_ENV;
743
- var nt = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", Ee = (e = 21) => {
744
- let t = "", r = e;
745
- for (; r--; )
746
- t += nt[Math.random() * 64 | 0];
747
- return t;
748
- }, ot = (e, t) => {
749
- if (typeof e != "function")
750
- throw new Error(process.env.NODE_ENV === "production" ? G(32) : `${t} is not a function`);
751
- }, se = "listenerMiddleware", it = (e) => {
752
- let {
753
- type: t,
754
- actionCreator: r,
755
- matcher: n,
756
- predicate: o,
757
- effect: i
758
- } = e;
759
- if (t)
760
- o = B(t).match;
761
- else if (r)
762
- t = r.type, o = r.match;
763
- else if (n)
764
- o = n;
765
- else if (!o)
766
- throw new Error(process.env.NODE_ENV === "production" ? G(21) : "Creating or removing a listener requires one of the known fields for matching an action");
767
- return ot(i, "options.listener"), {
768
- predicate: o,
769
- type: t,
770
- effect: i
771
- };
772
- }, st = Object.assign((e) => {
773
- const {
774
- type: t,
775
- predicate: r,
776
- effect: n
777
- } = it(e);
778
- return {
779
- id: Ee(),
780
- effect: n,
781
- type: t,
782
- predicate: r,
783
- pending: /* @__PURE__ */ new Set(),
784
- unsubscribe: () => {
785
- throw new Error(process.env.NODE_ENV === "production" ? G(22) : "Unsubscribe not initialized");
786
- }
787
- };
788
- }, {
789
- withTypes: () => st
790
- }), ct = Object.assign(B(`${se}/add`), {
791
- withTypes: () => ct
792
- });
793
- B(`${se}/removeAll`);
794
- var ut = Object.assign(B(`${se}/remove`), {
795
- withTypes: () => ut
796
- });
797
- function G(e) {
798
- return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
799
- }
800
- const at = (e, t, r = !1) => {
801
- const n = r ? "top-end" : "top-start", o = r ? "top-start" : "top-end", i = r ? "bottom-end" : "bottom-start", s = r ? "bottom-start" : "bottom-end", c = r ? "right-start" : "left-start", u = r ? "right-end" : "left-end", a = r ? "left-start" : "right-start", f = r ? "left-end" : "right-end";
802
- let l = e ? s : i;
803
- return t === "up" ? l = e ? o : n : t === "end" ? l = e ? f : a : t === "start" ? l = e ? u : c : t === "down-centered" ? l = "bottom" : t === "up-centered" && (l = "top"), l;
804
- }, ft = ({ children: e, value: t, ...r }) => /* @__PURE__ */ x(ke.Provider, { value: t, ...r, children: e }), F = ze(({
805
- children: e,
806
- className: t,
807
- onSelect: r,
808
- onToggle: n,
809
- controlID: o,
810
- toggleProps: i,
811
- title: s,
812
- menuProps: c,
813
- drop: u = "down",
814
- align: a = "start",
815
- autoClose: f = !0,
816
- show: l = "default",
817
- ..._
818
- }, g) => {
819
- const [h, p] = ce(l === "default" ? !1 : l), [w, I] = ce({ case: "" }), E = De((M) => {
820
- M.stopPropagation(), p((R) => !R);
821
- }, []), P = at(a === "end", u), j = {
822
- down: "dropdown",
823
- "down-centered": "dropdown-center",
824
- up: "dropup",
825
- "up-centered": "dropup-center dropup",
826
- end: "dropend",
827
- start: "dropstart"
828
- }, X = o || "nav-dropdown-" + Ee(), z = Ne(() => ({
829
- align: a,
830
- drop: u,
831
- showInternal: l != "default" && n ? l : h,
832
- handleToggle: l != "default" && n ? n : E,
833
- placement: P,
834
- directionClasses: j,
835
- controlID: X,
836
- activeDescendant: w,
837
- setActiveDescendant: I
838
- }), [a, u, l, h, n, E, P, j, o, w, I]);
839
- return /* @__PURE__ */ x("div", { test: "true", id: o + "-wrapper", ref: g, className: `sg-dropdown${t ? " " + t : ""} sg-nav-item`, ..._, children: /* @__PURE__ */ Ce(ft, { value: z, children: [
840
- /* @__PURE__ */ x(A.Toggle, { navDropdown: !0, ...i, children: s }),
841
- /* @__PURE__ */ x(F.Menu, { ...c, children: e })
842
- ] }) });
843
- });
844
- F.Toggle = A.Toggle;
845
- F.Menu = A.Menu;
846
- F.Item = A.Item;
847
- F.Divider = A.Divider;
848
- export {
849
- F as default
850
- };