@edifice.io/collect-frontend 1.0.11 → 1.0.12-develop.2.20261109161908

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 (116) hide show
  1. package/lib/AppHeaderCollection-BPHwd0pS.js +205 -0
  2. package/lib/CXEL7IU7-bSp8E8Ma.js +42 -0
  3. package/lib/Collection-C6ys5-Bv.js +506 -0
  4. package/lib/CollectionsLayout-B66EiXm4.js +100 -0
  5. package/lib/CollectionsList-BRBbyb-s.js +324 -0
  6. package/lib/DeleteCollectionModal-Cw-IZLvp.js +71 -0
  7. package/lib/DropdownActionTable-BoodZZI9.js +84 -0
  8. package/lib/FormEdit-Di-Y4r45.js +111 -0
  9. package/lib/HASRA6WW-CE5UWlEo.js +9093 -0
  10. package/lib/I3HPI4QX-DcsxmYEr.js +33 -0
  11. package/lib/MembersEdit-WFk8DkwB.js +81 -0
  12. package/lib/MineSubmission-DfAVKzBY.js +27 -0
  13. package/lib/Root-B_xgOphI.js +20 -0
  14. package/lib/SearchBarCollect-DBKaVVDV.js +23 -0
  15. package/lib/Submission-pY2ZvgER.js +337 -0
  16. package/lib/SubmissionList-ZKL__RHu.js +204 -0
  17. package/lib/emptyscreen-list-collection-CWGxO4Ss.js +4 -0
  18. package/lib/index-D-6KhgeS.js +3856 -0
  19. package/lib/index.d.ts +1 -14
  20. package/lib/index.js +19 -15071
  21. package/lib/{components → src/components}/AppHeaderCollection.d.ts +1 -1
  22. package/lib/{features → src/features}/collect-form/components/CollectForm.d.ts +1 -1
  23. package/lib/{features → src/features}/collect-form/components/index.d.ts +1 -1
  24. package/lib/{features → src/features}/collect-form/hooks/useCreateCollectionForm.d.ts +1 -1
  25. package/lib/{features → src/features}/creation-wizard/components/FormCreate.d.ts +1 -1
  26. package/lib/{features → src/features}/creation-wizard/components/Members.d.ts +1 -1
  27. package/lib/{features → src/features}/creation-wizard/components/WizardContext.d.ts +1 -1
  28. package/lib/{features → src/features}/menu/store/menuStore.d.ts +1 -1
  29. package/lib/{hooks → src/hooks}/useSearch.d.ts +1 -1
  30. package/lib/{hooks → src/hooks}/useWizard.d.ts +1 -1
  31. package/lib/src/index.d.ts +14 -0
  32. package/lib/submission.queries-Dt5NuCXz.js +147 -0
  33. package/lib/useGetStatusSubmission-DxHmLPxr.js +57 -0
  34. package/package.json +5 -5
  35. /package/lib/{components → src/components}/AppActionHeader.d.ts +0 -0
  36. /package/lib/{components → src/components}/AppActionHeaderContext.d.ts +0 -0
  37. /package/lib/{components → src/components}/CollectApp/CollectApp.d.ts +0 -0
  38. /package/lib/{components → src/components}/CollectApp/CollectAppContext.d.ts +0 -0
  39. /package/lib/{components → src/components}/CollectAppActionHeader.d.ts +0 -0
  40. /package/lib/{components → src/components}/InstructionCard.d.ts +0 -0
  41. /package/lib/{components → src/components}/SearchBarCollect.d.ts +0 -0
  42. /package/lib/{components → src/components}/SubmissionCard.d.ts +0 -0
  43. /package/lib/{config → src/config}/constants.d.ts +0 -0
  44. /package/lib/{features → src/features}/collect-form/hooks/index.d.ts +0 -0
  45. /package/lib/{features → src/features}/collect-form/index.d.ts +0 -0
  46. /package/lib/{features → src/features}/collection-actions/components/CollectionActions.d.ts +0 -0
  47. /package/lib/{features → src/features}/collection-list/components/CollectionListTable.d.ts +0 -0
  48. /package/lib/{features → src/features}/collection-list/components/CollectionListTableBody.d.ts +0 -0
  49. /package/lib/{features → src/features}/collection-list/components/CollectionListTableFooter.d.ts +0 -0
  50. /package/lib/{features → src/features}/collection-list/components/CollectionListTableHead.d.ts +0 -0
  51. /package/lib/{features → src/features}/collection-list/hooks/useCollectionListTableBody.d.ts +0 -0
  52. /package/lib/{features → src/features}/collection-list/hooks/useCollectionListTableHead.d.ts +0 -0
  53. /package/lib/{features → src/features}/collection-list/hooks/useCollectionPagination.d.ts +0 -0
  54. /package/lib/{features → src/features}/collection-list/store/collectionListStore.d.ts +0 -0
  55. /package/lib/{features → src/features}/collection-submissions-list/components/CollectionSubmissionsList.d.ts +0 -0
  56. /package/lib/{features → src/features}/collection-submissions-list/components/CollectionSubmissionsListMobile.d.ts +0 -0
  57. /package/lib/{features → src/features}/collection-submissions-list/components/CollectionSubmissionsListTr.d.ts +0 -0
  58. /package/lib/{features → src/features}/collection-submissions-list/components/CollectionSubmissionsListView.d.ts +0 -0
  59. /package/lib/{features → src/features}/collection-submissions-list/components/CollectionSubmissionsRender.d.ts +0 -0
  60. /package/lib/{features → src/features}/collection-submissions-list/hooks/useCollectionSubmissionsList.d.ts +0 -0
  61. /package/lib/{features → src/features}/collection-submissions-list/store/collectionSubmissionListStore.d.ts +0 -0
  62. /package/lib/{features → src/features}/creation-wizard/CreationWizard.d.ts +0 -0
  63. /package/lib/{features → src/features}/creation-wizard/components/WizardHeader.d.ts +0 -0
  64. /package/lib/{features → src/features}/creation-wizard/components/WizardLayout.d.ts +0 -0
  65. /package/lib/{features → src/features}/creation-wizard/hooks/useAddMember.d.ts +0 -0
  66. /package/lib/{features → src/features}/creation-wizard/sharing.utils.d.ts +0 -0
  67. /package/lib/{features → src/features}/creation-wizard/store/wizardStore.d.ts +0 -0
  68. /package/lib/{features → src/features}/dropdown-actions/components/DropdownActionTable.d.ts +0 -0
  69. /package/lib/{features → src/features}/dropdown-actions/hooks/useDropdownActionTable.d.ts +0 -0
  70. /package/lib/{features → src/features}/menu/components/CollectMenu.d.ts +0 -0
  71. /package/lib/{features → src/features}/menu/components/DesktopMenu.d.ts +0 -0
  72. /package/lib/{features → src/features}/menu/components/MenuContext.d.ts +0 -0
  73. /package/lib/{features → src/features}/menu/components/MobileMenu.d.ts +0 -0
  74. /package/lib/{features → src/features}/modal/components/DeleteCollectionModal.d.ts +0 -0
  75. /package/lib/{features → src/features}/modal/components/InstructionModal.d.ts +0 -0
  76. /package/lib/{features → src/features}/modal/components/UpdateSubmissionModal.d.ts +0 -0
  77. /package/lib/{features → src/features}/modal/hooks/useDeleteCollectionModal.d.ts +0 -0
  78. /package/lib/{features → src/features}/submission/components/SubmissionEdit.d.ts +0 -0
  79. /package/lib/{features → src/features}/submission/components/SubmissionView.d.ts +0 -0
  80. /package/lib/{features → src/features}/submission-actions/components/SubmissionActions.d.ts +0 -0
  81. /package/lib/{features → src/features}/submission-list/components/SubmissionFilter.d.ts +0 -0
  82. /package/lib/{features → src/features}/submission-list/components/SubmissionsListView.d.ts +0 -0
  83. /package/lib/{features → src/features}/submission-list/hooks/useSubmissionPagination.d.ts +0 -0
  84. /package/lib/{features → src/features}/submission-list/store/submissionListStore.d.ts +0 -0
  85. /package/lib/{hooks → src/hooks}/useGetStatusSubmission.d.ts +0 -0
  86. /package/lib/{hooks → src/hooks}/useStepNavigations.d.ts +0 -0
  87. /package/lib/{hooks → src/hooks}/useSubmissionForm.d.ts +0 -0
  88. /package/lib/{i18n.d.ts → src/i18n.d.ts} +0 -0
  89. /package/lib/{main.d.ts → src/main.d.ts} +0 -0
  90. /package/lib/{models → src/models}/collect.d.ts +0 -0
  91. /package/lib/{models → src/models}/menu.d.ts +0 -0
  92. /package/lib/{pages → src/pages}/Collection.d.ts +0 -0
  93. /package/lib/{pages → src/pages}/CollectionsLayout.d.ts +0 -0
  94. /package/lib/{pages → src/pages}/CollectionsList.d.ts +0 -0
  95. /package/lib/{pages → src/pages}/FormEdit.d.ts +0 -0
  96. /package/lib/{pages → src/pages}/MembersEdit.d.ts +0 -0
  97. /package/lib/{pages → src/pages}/MineSubmission.d.ts +0 -0
  98. /package/lib/{pages → src/pages}/NotFound.d.ts +0 -0
  99. /package/lib/{pages → src/pages}/PageError.d.ts +0 -0
  100. /package/lib/{pages → src/pages}/Root.d.ts +0 -0
  101. /package/lib/{pages → src/pages}/Submission.d.ts +0 -0
  102. /package/lib/{pages → src/pages}/SubmissionList.d.ts +0 -0
  103. /package/lib/{providers → src/providers}/index.d.ts +0 -0
  104. /package/lib/{routes → src/routes}/wizard/wizard.d.ts +0 -0
  105. /package/lib/{services → src/services}/api/collection.service.d.ts +0 -0
  106. /package/lib/{services → src/services}/api/submission.services.d.ts +0 -0
  107. /package/lib/{services → src/services}/api/user.service.d.ts +0 -0
  108. /package/lib/{services → src/services}/queries/collection.queries.d.ts +0 -0
  109. /package/lib/{services → src/services}/queries/index.d.ts +0 -0
  110. /package/lib/{services → src/services}/queries/submission.queries.d.ts +0 -0
  111. /package/lib/{services → src/services}/queries/user.queries.d.ts +0 -0
  112. /package/lib/{store → src/store}/collectionActionStore.d.ts +0 -0
  113. /package/lib/{store → src/store}/createSelectors.d.ts +0 -0
  114. /package/lib/{store → src/store}/userActionStore.d.ts +0 -0
  115. /package/lib/{utils → src/utils}/attachment.d.ts +0 -0
  116. /package/lib/{utils → src/utils}/deadline.d.ts +0 -0
@@ -0,0 +1,3856 @@
1
+ var ln = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var cn = (e, t, n) => t.has(e) || ln("Cannot " + n);
5
+ var b = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), N = (e, t, n) => t.has(e) ? ln("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), T = (e, t, n, r) => (cn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
6
+ import { jsx as f, jsxs as _, Fragment as En } from "react/jsx-runtime";
7
+ import { WORKFLOW_RIGHTS as qt, SharingPermission as dt, CollectionClient as Wr } from "@edifice.io/collect-client-rest";
8
+ import { useEdificeClient as ue, useHasWorkflow as $t, Button as te, EdificeClientProvider as Nn, Heading as en, Layout as Xr, Stepper as xn, Grid as G, FormControl as ne, Label as be, Input as Rn, DatePicker as Pn, AddAttachments as Mn, useIsAdmlcOrAdmc as Ln, useUser as kn, useDebounce as Yr, Flex as ht, Combobox as Zr, Alert as Jr, UserRightsList as es, useToast as ts, EdificeThemeProvider as ns, LoadingScreen as rs, Menu as Pt, Tree as ss } from "@edifice.io/react";
9
+ import { IconPlus as os, IconLabel as _n, IconFlag as Fn, IconTextPage as Un, IconBookmark as is, IconGroupAvatar as ls, IconArrowLeft as cs, IconArrowRight as an, IconSubmission as as, IconCollect as us } from "@edifice.io/react/icons";
10
+ import { useTranslation as fe, Trans as fs } from "react-i18next";
11
+ import { useNavigate as Be, useRouteError as Bn, useLocation as Vn, Form as qn, Routes as ds, Route as un, createBrowserRouter as hs, createMemoryRouter as ms, RouterProvider as ps } from "react-router-dom";
12
+ import * as K from "react";
13
+ import { createContext as It, useContext as At, useState as ae, useEffect as Q, useMemo as Tt, useRef as re, useReducer as ys, useLayoutEffect as gs, Suspense as bs, useCallback as fn } from "react";
14
+ import { useQueryClient as H, onlineManager as $n, QueryClient as vs, QueryCache as Ss, QueryClientProvider as Kn, queryOptions as Mt, useMutation as de, useQuery as it, useInfiniteQuery as Gn } from "@tanstack/react-query";
15
+ import { createRoot as Cs } from "react-dom/client";
16
+ import { ERROR_CODE as ws, odeServices as ve } from "@edifice.io/client";
17
+ import { t as Lt } from "i18next";
18
+ import { Editor as Qn } from "@edifice.io/react/editor";
19
+ import { useForm as jn, Controller as Se } from "react-hook-form";
20
+ import { create as tn } from "zustand";
21
+ const Hn = It(
22
+ {
23
+ basePath: ""
24
+ }
25
+ );
26
+ function Is({
27
+ basePath: e = "",
28
+ children: t
29
+ }) {
30
+ return /* @__PURE__ */ f(Hn.Provider, { value: { basePath: e }, children: t });
31
+ }
32
+ const As = () => At(Hn), Ts = (e, t) => {
33
+ const n = e.endsWith("/") ? e.slice(0, -1) : e, r = t.startsWith("/") ? t : `/${t}`;
34
+ return `${n}${r}`;
35
+ };
36
+ function Os() {
37
+ const { appCode: e } = ue(), { t } = fe(e), { basePath: n } = As(), r = Be();
38
+ return $t(qt.COLLECTION_CREATE) && /* @__PURE__ */ f(
39
+ te,
40
+ {
41
+ "data-testid": "collect-collection-app-header-create-collection-button",
42
+ type: "button",
43
+ color: "primary",
44
+ leftIcon: /* @__PURE__ */ f(os, {}),
45
+ onClick: () => r(Ts(n, "/create/form")),
46
+ children: t("collection.appHeaderAction.button.newCollection")
47
+ }
48
+ );
49
+ }
50
+ var v = {
51
+ context: void 0,
52
+ registry: void 0,
53
+ effects: void 0,
54
+ done: !1,
55
+ getContextId() {
56
+ return dn(this.context.count);
57
+ },
58
+ getNextContextId() {
59
+ return dn(this.context.count++);
60
+ }
61
+ };
62
+ function dn(e) {
63
+ const t = String(e), n = t.length - 1;
64
+ return v.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
65
+ }
66
+ function qe(e) {
67
+ v.context = e;
68
+ }
69
+ var Dn = !1, Es = (e, t) => e === t, pt = Symbol("solid-proxy"), zn = typeof Proxy == "function", Wn = Symbol("solid-track"), yt = {
70
+ equals: Es
71
+ }, Xn = nr, J = 1, gt = 2, Yn = {
72
+ owned: null,
73
+ cleanups: null,
74
+ context: null,
75
+ owner: null
76
+ }, kt = {}, I = null, _t = null, Ns = null, x = null, q = null, Z = null, Ot = 0;
77
+ function le(e, t) {
78
+ const n = x, r = I, s = e.length === 0, o = t === void 0 ? r : t, i = s ? Yn : {
79
+ owned: null,
80
+ cleanups: null,
81
+ context: o ? o.context : null,
82
+ owner: o
83
+ }, l = s ? e : () => e(() => B(() => Qe(i)));
84
+ I = i, x = null;
85
+ try {
86
+ return W(l, !0);
87
+ } finally {
88
+ x = n, I = r;
89
+ }
90
+ }
91
+ function U(e, t) {
92
+ t = t ? Object.assign({}, yt, t) : yt;
93
+ const n = {
94
+ value: e,
95
+ observers: null,
96
+ observerSlots: null,
97
+ comparator: t.equals || void 0
98
+ }, r = (s) => (typeof s == "function" && (s = s(n.value)), tr(n, s));
99
+ return [er.bind(n), r];
100
+ }
101
+ function xs(e, t, n) {
102
+ const r = Et(e, t, !0, J);
103
+ Ve(r);
104
+ }
105
+ function ce(e, t, n) {
106
+ const r = Et(e, t, !1, J);
107
+ Ve(r);
108
+ }
109
+ function Zn(e, t, n) {
110
+ Xn = Vs;
111
+ const r = Et(e, t, !1, J);
112
+ (!n || !n.render) && (r.user = !0), Z ? Z.push(r) : Ve(r);
113
+ }
114
+ function V(e, t, n) {
115
+ n = n ? Object.assign({}, yt, n) : yt;
116
+ const r = Et(e, t, !0, 0);
117
+ return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Ve(r), er.bind(r);
118
+ }
119
+ function Rs(e) {
120
+ return e && typeof e == "object" && "then" in e;
121
+ }
122
+ function Ps(e, t, n) {
123
+ let r, s, o;
124
+ r = !0, s = e, o = {};
125
+ let i = null, l = kt, c = null, a = !1, d = "initialValue" in o, u = typeof r == "function" && V(r);
126
+ const m = /* @__PURE__ */ new Set(), [h, y] = (o.storage || U)(o.initialValue), [p, S] = U(void 0), [L, C] = U(void 0, {
127
+ equals: !1
128
+ }), [F, w] = U(d ? "ready" : "unresolved");
129
+ v.context && (c = v.getNextContextId(), o.ssrLoadFrom === "initial" ? l = o.initialValue : v.load && v.has(c) && (l = v.load(c)));
130
+ function k(A, E, M, P) {
131
+ return i === A && (i = null, P !== void 0 && (d = !0), (A === l || E === l) && o.onHydrated && queueMicrotask(
132
+ () => o.onHydrated(P, {
133
+ value: E
134
+ })
135
+ ), l = kt, D(E, M)), E;
136
+ }
137
+ function D(A, E) {
138
+ W(() => {
139
+ E === void 0 && y(() => A), w(E !== void 0 ? "errored" : d ? "ready" : "unresolved"), S(E);
140
+ for (const M of m.keys()) M.decrement();
141
+ m.clear();
142
+ }, !1);
143
+ }
144
+ function g() {
145
+ const A = Fs, E = h(), M = p();
146
+ if (M !== void 0 && !i) throw M;
147
+ return x && x.user, E;
148
+ }
149
+ function O(A = !0) {
150
+ if (A !== !1 && a) return;
151
+ a = !1;
152
+ const E = u ? u() : r;
153
+ if (E == null || E === !1) {
154
+ k(i, B(h));
155
+ return;
156
+ }
157
+ const M = l !== kt ? l : B(
158
+ () => s(E, {
159
+ value: h(),
160
+ refetching: A
161
+ })
162
+ );
163
+ return Rs(M) ? (i = M, "value" in M ? (M.status === "success" ? k(i, M.value, void 0, E) : k(i, void 0, Kt(M.value), E), M) : (a = !0, queueMicrotask(() => a = !1), W(() => {
164
+ w(d ? "refreshing" : "pending"), C();
165
+ }, !1), M.then(
166
+ (P) => k(M, P, void 0, E),
167
+ (P) => k(M, void 0, Kt(P), E)
168
+ ))) : (k(i, M, void 0, E), M);
169
+ }
170
+ return Object.defineProperties(g, {
171
+ state: {
172
+ get: () => F()
173
+ },
174
+ error: {
175
+ get: () => p()
176
+ },
177
+ loading: {
178
+ get() {
179
+ const A = F();
180
+ return A === "pending" || A === "refreshing";
181
+ }
182
+ },
183
+ latest: {
184
+ get() {
185
+ if (!d) return g();
186
+ const A = p();
187
+ if (A && !i) throw A;
188
+ return h();
189
+ }
190
+ }
191
+ }), u ? xs(() => O(!1)) : O(!1), [
192
+ g,
193
+ {
194
+ refetch: O,
195
+ mutate: y
196
+ }
197
+ ];
198
+ }
199
+ function ll(e) {
200
+ return W(e, !1);
201
+ }
202
+ function B(e) {
203
+ if (x === null) return e();
204
+ const t = x;
205
+ x = null;
206
+ try {
207
+ return e();
208
+ } finally {
209
+ x = t;
210
+ }
211
+ }
212
+ function cl(e, t, n) {
213
+ const r = Array.isArray(e);
214
+ let s, o = n && n.defer;
215
+ return (i) => {
216
+ let l;
217
+ if (r) {
218
+ l = Array(e.length);
219
+ for (let a = 0; a < e.length; a++) l[a] = e[a]();
220
+ } else l = e();
221
+ if (o)
222
+ return o = !1, i;
223
+ const c = B(() => t(l, s, i));
224
+ return s = l, c;
225
+ };
226
+ }
227
+ function Ms(e) {
228
+ Zn(() => B(e));
229
+ }
230
+ function Ge(e) {
231
+ return I === null || (I.cleanups === null ? I.cleanups = [e] : I.cleanups.push(e)), e;
232
+ }
233
+ function hn() {
234
+ return I;
235
+ }
236
+ function Ls(e, t) {
237
+ const n = I, r = x;
238
+ I = e, x = null;
239
+ try {
240
+ return W(t, !0);
241
+ } catch (s) {
242
+ nn(s);
243
+ } finally {
244
+ I = n, x = r;
245
+ }
246
+ }
247
+ function ks(e) {
248
+ const t = x, n = I;
249
+ return Promise.resolve().then(() => {
250
+ x = t, I = n;
251
+ let r;
252
+ return W(e, !1), x = I = null, r ? r.done : void 0;
253
+ });
254
+ }
255
+ var [_s, al] = /* @__PURE__ */ U(!1);
256
+ function ul() {
257
+ return [_s, ks];
258
+ }
259
+ function fl(e, t) {
260
+ const n = Symbol("context");
261
+ return {
262
+ id: n,
263
+ Provider: qs(n),
264
+ defaultValue: e
265
+ };
266
+ }
267
+ function dl(e) {
268
+ let t;
269
+ return I && I.context && (t = I.context[e.id]) !== void 0 ? t : e.defaultValue;
270
+ }
271
+ function Jn(e) {
272
+ const t = V(e), n = V(() => Gt(t()));
273
+ return n.toArray = () => {
274
+ const r = n();
275
+ return Array.isArray(r) ? r : r != null ? [r] : [];
276
+ }, n;
277
+ }
278
+ var Fs;
279
+ function er() {
280
+ if (this.sources && this.state)
281
+ if (this.state === J) Ve(this);
282
+ else {
283
+ const e = q;
284
+ q = null, W(() => vt(this), !1), q = e;
285
+ }
286
+ if (x) {
287
+ const e = this.observers ? this.observers.length : 0;
288
+ x.sources ? (x.sources.push(this), x.sourceSlots.push(e)) : (x.sources = [this], x.sourceSlots = [e]), this.observers ? (this.observers.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
289
+ }
290
+ return this.value;
291
+ }
292
+ function tr(e, t, n) {
293
+ let r = e.value;
294
+ return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && W(() => {
295
+ for (let s = 0; s < e.observers.length; s += 1) {
296
+ const o = e.observers[s], i = _t && _t.running;
297
+ i && _t.disposed.has(o), (i ? !o.tState : !o.state) && (o.pure ? q.push(o) : Z.push(o), o.observers && rr(o)), i || (o.state = J);
298
+ }
299
+ if (q.length > 1e6)
300
+ throw q = [], new Error();
301
+ }, !1)), t;
302
+ }
303
+ function Ve(e) {
304
+ if (!e.fn) return;
305
+ Qe(e);
306
+ const t = Ot;
307
+ Us(
308
+ e,
309
+ e.value,
310
+ t
311
+ );
312
+ }
313
+ function Us(e, t, n) {
314
+ let r;
315
+ const s = I, o = x;
316
+ x = I = e;
317
+ try {
318
+ r = e.fn(t);
319
+ } catch (i) {
320
+ return e.pure && (e.state = J, e.owned && e.owned.forEach(Qe), e.owned = null), e.updatedAt = n + 1, nn(i);
321
+ } finally {
322
+ x = o, I = s;
323
+ }
324
+ (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? tr(e, r) : e.value = r, e.updatedAt = n);
325
+ }
326
+ function Et(e, t, n, r = J, s) {
327
+ const o = {
328
+ fn: e,
329
+ state: r,
330
+ updatedAt: null,
331
+ owned: null,
332
+ sources: null,
333
+ sourceSlots: null,
334
+ cleanups: null,
335
+ value: t,
336
+ owner: I,
337
+ context: I ? I.context : null,
338
+ pure: n
339
+ };
340
+ return I === null || I !== Yn && (I.owned ? I.owned.push(o) : I.owned = [o]), o;
341
+ }
342
+ function bt(e) {
343
+ if (e.state === 0) return;
344
+ if (e.state === gt) return vt(e);
345
+ if (e.suspense && B(e.suspense.inFallback)) return e.suspense.effects.push(e);
346
+ const t = [e];
347
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Ot); )
348
+ e.state && t.push(e);
349
+ for (let n = t.length - 1; n >= 0; n--)
350
+ if (e = t[n], e.state === J)
351
+ Ve(e);
352
+ else if (e.state === gt) {
353
+ const r = q;
354
+ q = null, W(() => vt(e, t[0]), !1), q = r;
355
+ }
356
+ }
357
+ function W(e, t) {
358
+ if (q) return e();
359
+ let n = !1;
360
+ t || (q = []), Z ? n = !0 : Z = [], Ot++;
361
+ try {
362
+ const r = e();
363
+ return Bs(n), r;
364
+ } catch (r) {
365
+ n || (Z = null), q = null, nn(r);
366
+ }
367
+ }
368
+ function Bs(e) {
369
+ if (q && (nr(q), q = null), e) return;
370
+ const t = Z;
371
+ Z = null, t.length && W(() => Xn(t), !1);
372
+ }
373
+ function nr(e) {
374
+ for (let t = 0; t < e.length; t++) bt(e[t]);
375
+ }
376
+ function Vs(e) {
377
+ let t, n = 0;
378
+ for (t = 0; t < e.length; t++) {
379
+ const r = e[t];
380
+ r.user ? e[n++] = r : bt(r);
381
+ }
382
+ if (v.context) {
383
+ if (v.count) {
384
+ v.effects || (v.effects = []), v.effects.push(...e.slice(0, n));
385
+ return;
386
+ }
387
+ qe();
388
+ }
389
+ for (v.effects && (v.done || !v.count) && (e = [...v.effects, ...e], n += v.effects.length, delete v.effects), t = 0; t < n; t++) bt(e[t]);
390
+ }
391
+ function vt(e, t) {
392
+ e.state = 0;
393
+ for (let n = 0; n < e.sources.length; n += 1) {
394
+ const r = e.sources[n];
395
+ if (r.sources) {
396
+ const s = r.state;
397
+ s === J ? r !== t && (!r.updatedAt || r.updatedAt < Ot) && bt(r) : s === gt && vt(r, t);
398
+ }
399
+ }
400
+ }
401
+ function rr(e) {
402
+ for (let t = 0; t < e.observers.length; t += 1) {
403
+ const n = e.observers[t];
404
+ n.state || (n.state = gt, n.pure ? q.push(n) : Z.push(n), n.observers && rr(n));
405
+ }
406
+ }
407
+ function Qe(e) {
408
+ let t;
409
+ if (e.sources)
410
+ for (; e.sources.length; ) {
411
+ const n = e.sources.pop(), r = e.sourceSlots.pop(), s = n.observers;
412
+ if (s && s.length) {
413
+ const o = s.pop(), i = n.observerSlots.pop();
414
+ r < s.length && (o.sourceSlots[i] = r, s[r] = o, n.observerSlots[r] = i);
415
+ }
416
+ }
417
+ if (e.tOwned) {
418
+ for (t = e.tOwned.length - 1; t >= 0; t--) Qe(e.tOwned[t]);
419
+ delete e.tOwned;
420
+ }
421
+ if (e.owned) {
422
+ for (t = e.owned.length - 1; t >= 0; t--) Qe(e.owned[t]);
423
+ e.owned = null;
424
+ }
425
+ if (e.cleanups) {
426
+ for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t]();
427
+ e.cleanups = null;
428
+ }
429
+ e.state = 0;
430
+ }
431
+ function Kt(e) {
432
+ return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
433
+ cause: e
434
+ });
435
+ }
436
+ function nn(e, t = I) {
437
+ throw Kt(e);
438
+ }
439
+ function Gt(e) {
440
+ if (typeof e == "function" && !e.length) return Gt(e());
441
+ if (Array.isArray(e)) {
442
+ const t = [];
443
+ for (let n = 0; n < e.length; n++) {
444
+ const r = Gt(e[n]);
445
+ Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
446
+ }
447
+ return t;
448
+ }
449
+ return e;
450
+ }
451
+ function qs(e, t) {
452
+ return function(r) {
453
+ let s;
454
+ return ce(
455
+ () => s = B(() => (I.context = {
456
+ ...I.context,
457
+ [e]: r.value
458
+ }, Jn(() => r.children))),
459
+ void 0
460
+ ), s;
461
+ };
462
+ }
463
+ var Qt = Symbol("fallback");
464
+ function St(e) {
465
+ for (let t = 0; t < e.length; t++) e[t]();
466
+ }
467
+ function $s(e, t, n = {}) {
468
+ let r = [], s = [], o = [], i = 0, l = t.length > 1 ? [] : null;
469
+ return Ge(() => St(o)), () => {
470
+ let c = e() || [], a = c.length, d, u;
471
+ return c[Wn], B(() => {
472
+ let h, y, p, S, L, C, F, w, k;
473
+ if (a === 0)
474
+ i !== 0 && (St(o), o = [], r = [], s = [], i = 0, l && (l = [])), n.fallback && (r = [Qt], s[0] = le((D) => (o[0] = D, n.fallback())), i = 1);
475
+ else if (i === 0) {
476
+ for (s = new Array(a), u = 0; u < a; u++)
477
+ r[u] = c[u], s[u] = le(m);
478
+ i = a;
479
+ } else {
480
+ for (p = new Array(a), S = new Array(a), l && (L = new Array(a)), C = 0, F = Math.min(i, a); C < F && r[C] === c[C]; C++) ;
481
+ for (F = i - 1, w = a - 1; F >= C && w >= C && r[F] === c[w]; F--, w--)
482
+ p[w] = s[F], S[w] = o[F], l && (L[w] = l[F]);
483
+ for (h = /* @__PURE__ */ new Map(), y = new Array(w + 1), u = w; u >= C; u--)
484
+ k = c[u], d = h.get(k), y[u] = d === void 0 ? -1 : d, h.set(k, u);
485
+ for (d = C; d <= F; d++)
486
+ k = r[d], u = h.get(k), u !== void 0 && u !== -1 ? (p[u] = s[d], S[u] = o[d], l && (L[u] = l[d]), u = y[u], h.set(k, u)) : o[d]();
487
+ for (u = C; u < a; u++)
488
+ u in p ? (s[u] = p[u], o[u] = S[u], l && (l[u] = L[u], l[u](u))) : s[u] = le(m);
489
+ s = s.slice(0, i = a), r = c.slice(0);
490
+ }
491
+ return s;
492
+ });
493
+ function m(h) {
494
+ if (o[u] = h, l) {
495
+ const [y, p] = U(u);
496
+ return l[u] = p, t(c[u], y);
497
+ }
498
+ return t(c[u]);
499
+ }
500
+ };
501
+ }
502
+ function Ks(e, t, n = {}) {
503
+ let r = [], s = [], o = [], i = [], l = 0, c;
504
+ return Ge(() => St(o)), () => {
505
+ const a = e() || [], d = a.length;
506
+ return a[Wn], B(() => {
507
+ if (d === 0)
508
+ return l !== 0 && (St(o), o = [], r = [], s = [], l = 0, i = []), n.fallback && (r = [Qt], s[0] = le((m) => (o[0] = m, n.fallback())), l = 1), s;
509
+ for (r[0] === Qt && (o[0](), o = [], r = [], s = [], l = 0), c = 0; c < d; c++)
510
+ c < r.length && r[c] !== a[c] ? i[c](() => a[c]) : c >= r.length && (s[c] = le(u));
511
+ for (; c < r.length; c++)
512
+ o[c]();
513
+ return l = i.length = o.length = d, r = a.slice(0), s = s.slice(0, l);
514
+ });
515
+ function u(m) {
516
+ o[c] = m;
517
+ const [h, y] = U(a[c]);
518
+ return i[c] = y, t(h, c);
519
+ }
520
+ };
521
+ }
522
+ function sr(e, t) {
523
+ return B(() => e(t || {}));
524
+ }
525
+ function lt() {
526
+ return !0;
527
+ }
528
+ var jt = {
529
+ get(e, t, n) {
530
+ return t === pt ? n : e.get(t);
531
+ },
532
+ has(e, t) {
533
+ return t === pt ? !0 : e.has(t);
534
+ },
535
+ set: lt,
536
+ deleteProperty: lt,
537
+ getOwnPropertyDescriptor(e, t) {
538
+ return {
539
+ configurable: !0,
540
+ enumerable: !0,
541
+ get() {
542
+ return e.get(t);
543
+ },
544
+ set: lt,
545
+ deleteProperty: lt
546
+ };
547
+ },
548
+ ownKeys(e) {
549
+ return e.keys();
550
+ }
551
+ };
552
+ function Ft(e) {
553
+ return (e = typeof e == "function" ? e() : e) ? e : {};
554
+ }
555
+ function Gs() {
556
+ for (let e = 0, t = this.length; e < t; ++e) {
557
+ const n = this[e]();
558
+ if (n !== void 0) return n;
559
+ }
560
+ }
561
+ function or(...e) {
562
+ let t = !1;
563
+ for (let i = 0; i < e.length; i++) {
564
+ const l = e[i];
565
+ t = t || !!l && pt in l, e[i] = typeof l == "function" ? (t = !0, V(l)) : l;
566
+ }
567
+ if (zn && t)
568
+ return new Proxy(
569
+ {
570
+ get(i) {
571
+ for (let l = e.length - 1; l >= 0; l--) {
572
+ const c = Ft(e[l])[i];
573
+ if (c !== void 0) return c;
574
+ }
575
+ },
576
+ has(i) {
577
+ for (let l = e.length - 1; l >= 0; l--)
578
+ if (i in Ft(e[l])) return !0;
579
+ return !1;
580
+ },
581
+ keys() {
582
+ const i = [];
583
+ for (let l = 0; l < e.length; l++)
584
+ i.push(...Object.keys(Ft(e[l])));
585
+ return [...new Set(i)];
586
+ }
587
+ },
588
+ jt
589
+ );
590
+ const n = {}, r = /* @__PURE__ */ Object.create(null);
591
+ for (let i = e.length - 1; i >= 0; i--) {
592
+ const l = e[i];
593
+ if (!l) continue;
594
+ const c = Object.getOwnPropertyNames(l);
595
+ for (let a = c.length - 1; a >= 0; a--) {
596
+ const d = c[a];
597
+ if (d === "__proto__" || d === "constructor") continue;
598
+ const u = Object.getOwnPropertyDescriptor(l, d);
599
+ if (!r[d])
600
+ r[d] = u.get ? {
601
+ enumerable: !0,
602
+ configurable: !0,
603
+ get: Gs.bind(n[d] = [u.get.bind(l)])
604
+ } : u.value !== void 0 ? u : void 0;
605
+ else {
606
+ const m = n[d];
607
+ m && (u.get ? m.push(u.get.bind(l)) : u.value !== void 0 && m.push(() => u.value));
608
+ }
609
+ }
610
+ }
611
+ const s = {}, o = Object.keys(r);
612
+ for (let i = o.length - 1; i >= 0; i--) {
613
+ const l = o[i], c = r[l];
614
+ c && c.get ? Object.defineProperty(s, l, c) : s[l] = c ? c.value : void 0;
615
+ }
616
+ return s;
617
+ }
618
+ function Qs(e, ...t) {
619
+ if (zn && pt in e) {
620
+ const s = new Set(t.length > 1 ? t.flat() : t[0]), o = t.map((i) => new Proxy(
621
+ {
622
+ get(l) {
623
+ return i.includes(l) ? e[l] : void 0;
624
+ },
625
+ has(l) {
626
+ return i.includes(l) && l in e;
627
+ },
628
+ keys() {
629
+ return i.filter((l) => l in e);
630
+ }
631
+ },
632
+ jt
633
+ ));
634
+ return o.push(
635
+ new Proxy(
636
+ {
637
+ get(i) {
638
+ return s.has(i) ? void 0 : e[i];
639
+ },
640
+ has(i) {
641
+ return s.has(i) ? !1 : i in e;
642
+ },
643
+ keys() {
644
+ return Object.keys(e).filter((i) => !s.has(i));
645
+ }
646
+ },
647
+ jt
648
+ )
649
+ ), o;
650
+ }
651
+ const n = {}, r = t.map(() => ({}));
652
+ for (const s of Object.getOwnPropertyNames(e)) {
653
+ const o = Object.getOwnPropertyDescriptor(e, s), i = !o.get && !o.set && o.enumerable && o.writable && o.configurable;
654
+ let l = !1, c = 0;
655
+ for (const a of t)
656
+ a.includes(s) && (l = !0, i ? r[c][s] = o.value : Object.defineProperty(r[c], s, o)), ++c;
657
+ l || (i ? n[s] = o.value : Object.defineProperty(n, s, o));
658
+ }
659
+ return [...r, n];
660
+ }
661
+ function ir(e) {
662
+ let t, n;
663
+ const r = (s) => {
664
+ const o = v.context;
665
+ if (o) {
666
+ const [l, c] = U();
667
+ v.count || (v.count = 0), v.count++, (n || (n = e())).then((a) => {
668
+ !v.done && qe(o), v.count--, c(() => a.default), qe();
669
+ }), t = l;
670
+ } else if (!t) {
671
+ const [l] = Ps(() => (n || (n = e())).then((c) => c.default));
672
+ t = l;
673
+ }
674
+ let i;
675
+ return V(
676
+ () => (i = t()) ? B(() => {
677
+ if (!o || v.done) return i(s);
678
+ const l = v.context;
679
+ qe(o);
680
+ const c = i(s);
681
+ return qe(l), c;
682
+ }) : ""
683
+ );
684
+ };
685
+ return r.preload = () => n || ((n = e()).then((s) => t = () => s.default), n), r;
686
+ }
687
+ var js = 0;
688
+ function hl() {
689
+ return v.context ? v.getNextContextId() : `cl-${js++}`;
690
+ }
691
+ var lr = (e) => `Stale read from <${e}>.`;
692
+ function ml(e) {
693
+ const t = "fallback" in e && {
694
+ fallback: () => e.fallback
695
+ };
696
+ return V($s(() => e.each, e.children, t || void 0));
697
+ }
698
+ function pl(e) {
699
+ const t = "fallback" in e && {
700
+ fallback: () => e.fallback
701
+ };
702
+ return V(Ks(() => e.each, e.children, t || void 0));
703
+ }
704
+ function yl(e) {
705
+ const t = e.keyed, n = V(() => e.when, void 0, void 0), r = t ? n : V(n, void 0, {
706
+ equals: (s, o) => !s == !o
707
+ });
708
+ return V(
709
+ () => {
710
+ const s = r();
711
+ if (s) {
712
+ const o = e.children;
713
+ return typeof o == "function" && o.length > 0 ? B(
714
+ () => o(
715
+ t ? s : () => {
716
+ if (!B(r)) throw lr("Show");
717
+ return n();
718
+ }
719
+ )
720
+ ) : o;
721
+ }
722
+ return e.fallback;
723
+ },
724
+ void 0,
725
+ void 0
726
+ );
727
+ }
728
+ function gl(e) {
729
+ const t = Jn(() => e.children), n = V(() => {
730
+ const r = t(), s = Array.isArray(r) ? r : [r];
731
+ let o = () => {
732
+ };
733
+ for (let i = 0; i < s.length; i++) {
734
+ const l = i, c = s[i], a = o, d = V(
735
+ () => a() ? void 0 : c.when,
736
+ void 0,
737
+ void 0
738
+ ), u = c.keyed ? d : V(d, void 0, {
739
+ equals: (m, h) => !m == !h
740
+ });
741
+ o = () => a() || (u() ? [l, d, c] : void 0);
742
+ }
743
+ return o;
744
+ });
745
+ return V(
746
+ () => {
747
+ const r = n()();
748
+ if (!r) return e.fallback;
749
+ const [s, o, i] = r, l = i.children;
750
+ return typeof l == "function" && l.length > 0 ? B(
751
+ () => l(
752
+ i.keyed ? o() : () => {
753
+ var a;
754
+ if (((a = B(n)()) == null ? void 0 : a[0]) !== s) throw lr("Match");
755
+ return o();
756
+ }
757
+ )
758
+ ) : l;
759
+ },
760
+ void 0,
761
+ void 0
762
+ );
763
+ }
764
+ function bl(e) {
765
+ return e;
766
+ }
767
+ var Hs = [
768
+ "allowfullscreen",
769
+ "async",
770
+ "autofocus",
771
+ "autoplay",
772
+ "checked",
773
+ "controls",
774
+ "default",
775
+ "disabled",
776
+ "formnovalidate",
777
+ "hidden",
778
+ "indeterminate",
779
+ "inert",
780
+ "ismap",
781
+ "loop",
782
+ "multiple",
783
+ "muted",
784
+ "nomodule",
785
+ "novalidate",
786
+ "open",
787
+ "playsinline",
788
+ "readonly",
789
+ "required",
790
+ "reversed",
791
+ "seamless",
792
+ "selected"
793
+ ], Ds = /* @__PURE__ */ new Set([
794
+ "className",
795
+ "value",
796
+ "readOnly",
797
+ "formNoValidate",
798
+ "isMap",
799
+ "noModule",
800
+ "playsInline",
801
+ ...Hs
802
+ ]), zs = /* @__PURE__ */ new Set([
803
+ "innerHTML",
804
+ "textContent",
805
+ "innerText",
806
+ "children"
807
+ ]), Ws = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
808
+ className: "class",
809
+ htmlFor: "for"
810
+ }), Xs = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
811
+ class: "className",
812
+ formnovalidate: {
813
+ $: "formNoValidate",
814
+ BUTTON: 1,
815
+ INPUT: 1
816
+ },
817
+ ismap: {
818
+ $: "isMap",
819
+ IMG: 1
820
+ },
821
+ nomodule: {
822
+ $: "noModule",
823
+ SCRIPT: 1
824
+ },
825
+ playsinline: {
826
+ $: "playsInline",
827
+ VIDEO: 1
828
+ },
829
+ readonly: {
830
+ $: "readOnly",
831
+ INPUT: 1,
832
+ TEXTAREA: 1
833
+ }
834
+ });
835
+ function Ys(e, t) {
836
+ const n = Xs[e];
837
+ return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
838
+ }
839
+ var Zs = /* @__PURE__ */ new Set([
840
+ "beforeinput",
841
+ "click",
842
+ "dblclick",
843
+ "contextmenu",
844
+ "focusin",
845
+ "focusout",
846
+ "input",
847
+ "keydown",
848
+ "keyup",
849
+ "mousedown",
850
+ "mousemove",
851
+ "mouseout",
852
+ "mouseover",
853
+ "mouseup",
854
+ "pointerdown",
855
+ "pointermove",
856
+ "pointerout",
857
+ "pointerover",
858
+ "pointerup",
859
+ "touchend",
860
+ "touchmove",
861
+ "touchstart"
862
+ ]), Js = /* @__PURE__ */ new Set([
863
+ "altGlyph",
864
+ "altGlyphDef",
865
+ "altGlyphItem",
866
+ "animate",
867
+ "animateColor",
868
+ "animateMotion",
869
+ "animateTransform",
870
+ "circle",
871
+ "clipPath",
872
+ "color-profile",
873
+ "cursor",
874
+ "defs",
875
+ "desc",
876
+ "ellipse",
877
+ "feBlend",
878
+ "feColorMatrix",
879
+ "feComponentTransfer",
880
+ "feComposite",
881
+ "feConvolveMatrix",
882
+ "feDiffuseLighting",
883
+ "feDisplacementMap",
884
+ "feDistantLight",
885
+ "feDropShadow",
886
+ "feFlood",
887
+ "feFuncA",
888
+ "feFuncB",
889
+ "feFuncG",
890
+ "feFuncR",
891
+ "feGaussianBlur",
892
+ "feImage",
893
+ "feMerge",
894
+ "feMergeNode",
895
+ "feMorphology",
896
+ "feOffset",
897
+ "fePointLight",
898
+ "feSpecularLighting",
899
+ "feSpotLight",
900
+ "feTile",
901
+ "feTurbulence",
902
+ "filter",
903
+ "font",
904
+ "font-face",
905
+ "font-face-format",
906
+ "font-face-name",
907
+ "font-face-src",
908
+ "font-face-uri",
909
+ "foreignObject",
910
+ "g",
911
+ "glyph",
912
+ "glyphRef",
913
+ "hkern",
914
+ "image",
915
+ "line",
916
+ "linearGradient",
917
+ "marker",
918
+ "mask",
919
+ "metadata",
920
+ "missing-glyph",
921
+ "mpath",
922
+ "path",
923
+ "pattern",
924
+ "polygon",
925
+ "polyline",
926
+ "radialGradient",
927
+ "rect",
928
+ "set",
929
+ "stop",
930
+ "svg",
931
+ "switch",
932
+ "symbol",
933
+ "text",
934
+ "textPath",
935
+ "tref",
936
+ "tspan",
937
+ "use",
938
+ "view",
939
+ "vkern"
940
+ ]), eo = {
941
+ xlink: "http://www.w3.org/1999/xlink",
942
+ xml: "http://www.w3.org/XML/1998/namespace"
943
+ };
944
+ function to(e, t, n) {
945
+ let r = n.length, s = t.length, o = r, i = 0, l = 0, c = t[s - 1].nextSibling, a = null;
946
+ for (; i < s || l < o; ) {
947
+ if (t[i] === n[l]) {
948
+ i++, l++;
949
+ continue;
950
+ }
951
+ for (; t[s - 1] === n[o - 1]; )
952
+ s--, o--;
953
+ if (s === i) {
954
+ const d = o < r ? l ? n[l - 1].nextSibling : n[o - l] : c;
955
+ for (; l < o; ) e.insertBefore(n[l++], d);
956
+ } else if (o === l)
957
+ for (; i < s; )
958
+ (!a || !a.has(t[i])) && t[i].remove(), i++;
959
+ else if (t[i] === n[o - 1] && n[l] === t[s - 1]) {
960
+ const d = t[--s].nextSibling;
961
+ e.insertBefore(n[l++], t[i++].nextSibling), e.insertBefore(n[--o], d), t[s] = n[o];
962
+ } else {
963
+ if (!a) {
964
+ a = /* @__PURE__ */ new Map();
965
+ let u = l;
966
+ for (; u < o; ) a.set(n[u], u++);
967
+ }
968
+ const d = a.get(t[i]);
969
+ if (d != null)
970
+ if (l < d && d < o) {
971
+ let u = i, m = 1, h;
972
+ for (; ++u < s && u < o && !((h = a.get(t[u])) == null || h !== d + m); )
973
+ m++;
974
+ if (m > d - l) {
975
+ const y = t[i];
976
+ for (; l < d; ) e.insertBefore(n[l++], y);
977
+ } else e.replaceChild(n[l++], t[i++]);
978
+ } else i++;
979
+ else t[i++].remove();
980
+ }
981
+ }
982
+ }
983
+ var $e = "_$DX_DELEGATE";
984
+ function cr(e, t, n, r = {}) {
985
+ let s;
986
+ return le((o) => {
987
+ s = o, t === document ? e() : Dt(t, e(), t.firstChild ? null : void 0, n);
988
+ }, r.owner), () => {
989
+ s(), t.textContent = "";
990
+ };
991
+ }
992
+ function vl(e, t, n, r) {
993
+ let s;
994
+ const o = () => {
995
+ const l = document.createElement("template");
996
+ return l.innerHTML = e, l.content.firstChild;
997
+ }, i = t ? () => B(() => document.importNode(s || (s = o()), !0)) : () => (s || (s = o())).cloneNode(!0);
998
+ return i.cloneNode = i, i;
999
+ }
1000
+ function no(e, t = window.document) {
1001
+ const n = t[$e] || (t[$e] = /* @__PURE__ */ new Set());
1002
+ for (let r = 0, s = e.length; r < s; r++) {
1003
+ const o = e[r];
1004
+ n.has(o) || (n.add(o), t.addEventListener(o, ar));
1005
+ }
1006
+ }
1007
+ function Sl(e = window.document) {
1008
+ if (e[$e]) {
1009
+ for (let t of e[$e].keys()) e.removeEventListener(t, ar);
1010
+ delete e[$e];
1011
+ }
1012
+ }
1013
+ function Ht(e, t, n) {
1014
+ he(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
1015
+ }
1016
+ function ro(e, t, n, r) {
1017
+ he(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
1018
+ }
1019
+ function so(e, t, n) {
1020
+ he(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
1021
+ }
1022
+ function oo(e, t) {
1023
+ he(e) || (t == null ? e.removeAttribute("class") : e.className = t);
1024
+ }
1025
+ function io(e, t, n, r) {
1026
+ if (r)
1027
+ Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
1028
+ else if (Array.isArray(n)) {
1029
+ const s = n[0];
1030
+ e.addEventListener(t, n[0] = (o) => s.call(e, n[1], o));
1031
+ } else e.addEventListener(t, n, typeof n != "function" && n);
1032
+ }
1033
+ function lo(e, t, n = {}) {
1034
+ const r = Object.keys(t || {}), s = Object.keys(n);
1035
+ let o, i;
1036
+ for (o = 0, i = s.length; o < i; o++) {
1037
+ const l = s[o];
1038
+ !l || l === "undefined" || t[l] || (mn(e, l, !1), delete n[l]);
1039
+ }
1040
+ for (o = 0, i = r.length; o < i; o++) {
1041
+ const l = r[o], c = !!t[l];
1042
+ !l || l === "undefined" || n[l] === c || !c || (mn(e, l, !0), n[l] = c);
1043
+ }
1044
+ return n;
1045
+ }
1046
+ function co(e, t, n) {
1047
+ if (!t) return n ? Ht(e, "style") : t;
1048
+ const r = e.style;
1049
+ if (typeof t == "string") return r.cssText = t;
1050
+ typeof n == "string" && (r.cssText = n = void 0), n || (n = {}), t || (t = {});
1051
+ let s, o;
1052
+ for (o in n)
1053
+ t[o] == null && r.removeProperty(o), delete n[o];
1054
+ for (o in t)
1055
+ s = t[o], s !== n[o] && (r.setProperty(o, s), n[o] = s);
1056
+ return n;
1057
+ }
1058
+ function ao(e, t = {}, n, r) {
1059
+ const s = {};
1060
+ return r || ce(
1061
+ () => s.children = je(e, t.children, s.children)
1062
+ ), ce(() => typeof t.ref == "function" && uo(t.ref, e)), ce(() => fo(e, t, n, !0, s, !0)), s;
1063
+ }
1064
+ function uo(e, t, n) {
1065
+ return B(() => e(t, n));
1066
+ }
1067
+ function Dt(e, t, n, r) {
1068
+ if (n !== void 0 && !r && (r = []), typeof t != "function") return je(e, t, r, n);
1069
+ ce((s) => je(e, t(), s, n), r);
1070
+ }
1071
+ function fo(e, t, n, r, s = {}, o = !1) {
1072
+ t || (t = {});
1073
+ for (const i in s)
1074
+ if (!(i in t)) {
1075
+ if (i === "children") continue;
1076
+ s[i] = pn(e, i, null, s[i], n, o, t);
1077
+ }
1078
+ for (const i in t) {
1079
+ if (i === "children")
1080
+ continue;
1081
+ const l = t[i];
1082
+ s[i] = pn(e, i, l, s[i], n, o, t);
1083
+ }
1084
+ }
1085
+ function ho(e) {
1086
+ let t, n;
1087
+ return !he() || !(t = v.registry.get(n = po())) ? e() : (v.completed && v.completed.add(t), v.registry.delete(n), t);
1088
+ }
1089
+ function he(e) {
1090
+ return !!v.context && !v.done && (!e || e.isConnected);
1091
+ }
1092
+ function mo(e) {
1093
+ return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
1094
+ }
1095
+ function mn(e, t, n) {
1096
+ const r = t.trim().split(/\s+/);
1097
+ for (let s = 0, o = r.length; s < o; s++)
1098
+ e.classList.toggle(r[s], n);
1099
+ }
1100
+ function pn(e, t, n, r, s, o, i) {
1101
+ let l, c, a, d, u;
1102
+ if (t === "style") return co(e, n, r);
1103
+ if (t === "classList") return lo(e, n, r);
1104
+ if (n === r) return r;
1105
+ if (t === "ref")
1106
+ o || n(e);
1107
+ else if (t.slice(0, 3) === "on:") {
1108
+ const m = t.slice(3);
1109
+ r && e.removeEventListener(m, r, typeof r != "function" && r), n && e.addEventListener(m, n, typeof n != "function" && n);
1110
+ } else if (t.slice(0, 10) === "oncapture:") {
1111
+ const m = t.slice(10);
1112
+ r && e.removeEventListener(m, r, !0), n && e.addEventListener(m, n, !0);
1113
+ } else if (t.slice(0, 2) === "on") {
1114
+ const m = t.slice(2).toLowerCase(), h = Zs.has(m);
1115
+ if (!h && r) {
1116
+ const y = Array.isArray(r) ? r[0] : r;
1117
+ e.removeEventListener(m, y);
1118
+ }
1119
+ (h || n) && (io(e, m, n, h), h && no([m]));
1120
+ } else if (t.slice(0, 5) === "attr:")
1121
+ Ht(e, t.slice(5), n);
1122
+ else if (t.slice(0, 5) === "bool:")
1123
+ so(e, t.slice(5), n);
1124
+ else if ((u = t.slice(0, 5) === "prop:") || (a = zs.has(t)) || !s && ((d = Ys(t, e.tagName)) || (c = Ds.has(t))) || (l = e.nodeName.includes("-") || "is" in i)) {
1125
+ if (u)
1126
+ t = t.slice(5), c = !0;
1127
+ else if (he(e)) return n;
1128
+ t === "class" || t === "className" ? oo(e, n) : l && !c && !a ? e[mo(t)] = n : e[d || t] = n;
1129
+ } else {
1130
+ const m = s && t.indexOf(":") > -1 && eo[t.split(":")[0]];
1131
+ m ? ro(e, m, t, n) : Ht(e, Ws[t] || t, n);
1132
+ }
1133
+ return n;
1134
+ }
1135
+ function ar(e) {
1136
+ if (v.registry && v.events && v.events.find(([c, a]) => a === e))
1137
+ return;
1138
+ let t = e.target;
1139
+ const n = `$$${e.type}`, r = e.target, s = e.currentTarget, o = (c) => Object.defineProperty(e, "target", {
1140
+ configurable: !0,
1141
+ value: c
1142
+ }), i = () => {
1143
+ const c = t[n];
1144
+ if (c && !t.disabled) {
1145
+ const a = t[`${n}Data`];
1146
+ if (a !== void 0 ? c.call(t, a, e) : c.call(t, e), e.cancelBubble) return;
1147
+ }
1148
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && o(t.host), !0;
1149
+ }, l = () => {
1150
+ for (; i() && (t = t._$host || t.parentNode || t.host); ) ;
1151
+ };
1152
+ if (Object.defineProperty(e, "currentTarget", {
1153
+ configurable: !0,
1154
+ get() {
1155
+ return t || document;
1156
+ }
1157
+ }), v.registry && !v.done && (v.done = _$HY.done = !0), e.composedPath) {
1158
+ const c = e.composedPath();
1159
+ o(c[0]);
1160
+ for (let a = 0; a < c.length - 2 && (t = c[a], !!i()); a++) {
1161
+ if (t._$host) {
1162
+ t = t._$host, l();
1163
+ break;
1164
+ }
1165
+ if (t.parentNode === s)
1166
+ break;
1167
+ }
1168
+ } else l();
1169
+ o(r);
1170
+ }
1171
+ function je(e, t, n, r, s) {
1172
+ const o = he(e);
1173
+ if (o) {
1174
+ !n && (n = [...e.childNodes]);
1175
+ let c = [];
1176
+ for (let a = 0; a < n.length; a++) {
1177
+ const d = n[a];
1178
+ d.nodeType === 8 && d.data.slice(0, 2) === "!$" ? d.remove() : c.push(d);
1179
+ }
1180
+ n = c;
1181
+ }
1182
+ for (; typeof n == "function"; ) n = n();
1183
+ if (t === n) return n;
1184
+ const i = typeof t, l = r !== void 0;
1185
+ if (e = l && n[0] && n[0].parentNode || e, i === "string" || i === "number") {
1186
+ if (o || i === "number" && (t = t.toString(), t === n))
1187
+ return n;
1188
+ if (l) {
1189
+ let c = n[0];
1190
+ c && c.nodeType === 3 ? c.data !== t && (c.data = t) : c = document.createTextNode(t), n = me(e, n, r, c);
1191
+ } else
1192
+ n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
1193
+ } else if (t == null || i === "boolean") {
1194
+ if (o) return n;
1195
+ n = me(e, n, r);
1196
+ } else {
1197
+ if (i === "function")
1198
+ return ce(() => {
1199
+ let c = t();
1200
+ for (; typeof c == "function"; ) c = c();
1201
+ n = je(e, c, n, r);
1202
+ }), () => n;
1203
+ if (Array.isArray(t)) {
1204
+ const c = [], a = n && Array.isArray(n);
1205
+ if (zt(c, t, n, s))
1206
+ return ce(() => n = je(e, c, n, r, !0)), () => n;
1207
+ if (o) {
1208
+ if (!c.length) return n;
1209
+ if (r === void 0) return n = [...e.childNodes];
1210
+ let d = c[0];
1211
+ if (d.parentNode !== e) return n;
1212
+ const u = [d];
1213
+ for (; (d = d.nextSibling) !== r; ) u.push(d);
1214
+ return n = u;
1215
+ }
1216
+ if (c.length === 0) {
1217
+ if (n = me(e, n, r), l) return n;
1218
+ } else a ? n.length === 0 ? yn(e, c, r) : to(e, n, c) : (n && me(e), yn(e, c));
1219
+ n = c;
1220
+ } else if (t.nodeType) {
1221
+ if (o && t.parentNode) return n = l ? [t] : t;
1222
+ if (Array.isArray(n)) {
1223
+ if (l) return n = me(e, n, r, t);
1224
+ me(e, n, null, t);
1225
+ } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
1226
+ n = t;
1227
+ }
1228
+ }
1229
+ return n;
1230
+ }
1231
+ function zt(e, t, n, r) {
1232
+ let s = !1;
1233
+ for (let o = 0, i = t.length; o < i; o++) {
1234
+ let l = t[o], c = n && n[e.length], a;
1235
+ if (!(l == null || l === !0 || l === !1)) if ((a = typeof l) == "object" && l.nodeType)
1236
+ e.push(l);
1237
+ else if (Array.isArray(l))
1238
+ s = zt(e, l, c) || s;
1239
+ else if (a === "function")
1240
+ if (r) {
1241
+ for (; typeof l == "function"; ) l = l();
1242
+ s = zt(
1243
+ e,
1244
+ Array.isArray(l) ? l : [l],
1245
+ Array.isArray(c) ? c : [c]
1246
+ ) || s;
1247
+ } else
1248
+ e.push(l), s = !0;
1249
+ else {
1250
+ const d = String(l);
1251
+ c && c.nodeType === 3 && c.data === d ? e.push(c) : e.push(document.createTextNode(d));
1252
+ }
1253
+ }
1254
+ return s;
1255
+ }
1256
+ function yn(e, t, n = null) {
1257
+ for (let r = 0, s = t.length; r < s; r++) e.insertBefore(t[r], n);
1258
+ }
1259
+ function me(e, t, n, r) {
1260
+ if (n === void 0) return e.textContent = "";
1261
+ const s = r || document.createTextNode("");
1262
+ if (t.length) {
1263
+ let o = !1;
1264
+ for (let i = t.length - 1; i >= 0; i--) {
1265
+ const l = t[i];
1266
+ if (s !== l) {
1267
+ const c = l.parentNode === e;
1268
+ !o && !i ? c ? e.replaceChild(s, l) : e.insertBefore(s, n) : c && l.remove();
1269
+ } else o = !0;
1270
+ }
1271
+ } else e.insertBefore(s, n);
1272
+ return [s];
1273
+ }
1274
+ function po() {
1275
+ return v.getNextContextId();
1276
+ }
1277
+ var yo = "http://www.w3.org/2000/svg";
1278
+ function ur(e, t = !1) {
1279
+ return t ? document.createElementNS(yo, e) : document.createElement(e);
1280
+ }
1281
+ function Cl(e) {
1282
+ const { useShadow: t } = e, n = document.createTextNode(""), r = () => e.mount || document.body, s = hn();
1283
+ let o, i = !!v.context;
1284
+ return Zn(
1285
+ () => {
1286
+ i && (hn().user = i = !1), o || (o = Ls(s, () => V(() => e.children)));
1287
+ const l = r();
1288
+ if (l instanceof HTMLHeadElement) {
1289
+ const [c, a] = U(!1), d = () => a(!0);
1290
+ le((u) => Dt(l, () => c() ? u() : o(), null)), Ge(d);
1291
+ } else {
1292
+ const c = ur(e.isSVG ? "g" : "div", e.isSVG), a = t && c.attachShadow ? c.attachShadow({
1293
+ mode: "open"
1294
+ }) : c;
1295
+ Object.defineProperty(c, "_$host", {
1296
+ get() {
1297
+ return n.parentNode;
1298
+ },
1299
+ configurable: !0
1300
+ }), Dt(a, o), l.appendChild(c), e.ref && e.ref(c), Ge(() => l.removeChild(c));
1301
+ }
1302
+ },
1303
+ void 0,
1304
+ {
1305
+ render: !i
1306
+ }
1307
+ ), n;
1308
+ }
1309
+ function go(e, t) {
1310
+ const n = V(e);
1311
+ return V(() => {
1312
+ const r = n();
1313
+ switch (typeof r) {
1314
+ case "function":
1315
+ return B(() => r(t));
1316
+ case "string":
1317
+ const s = Js.has(r), o = v.context ? ho() : ur(r, s);
1318
+ return ao(o, t, s), o;
1319
+ }
1320
+ });
1321
+ }
1322
+ function wl(e) {
1323
+ const [, t] = Qs(e, ["component"]);
1324
+ return go(() => e.component, t);
1325
+ }
1326
+ var bo = class {
1327
+ constructor() {
1328
+ this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
1329
+ }
1330
+ set(e, t) {
1331
+ this.keyToValue.set(e, t), this.valueToKey.set(t, e);
1332
+ }
1333
+ getByKey(e) {
1334
+ return this.keyToValue.get(e);
1335
+ }
1336
+ getByValue(e) {
1337
+ return this.valueToKey.get(e);
1338
+ }
1339
+ clear() {
1340
+ this.keyToValue.clear(), this.valueToKey.clear();
1341
+ }
1342
+ }, fr = class {
1343
+ constructor(e) {
1344
+ this.generateIdentifier = e, this.kv = new bo();
1345
+ }
1346
+ register(e, t) {
1347
+ this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
1348
+ }
1349
+ clear() {
1350
+ this.kv.clear();
1351
+ }
1352
+ getIdentifier(e) {
1353
+ return this.kv.getByValue(e);
1354
+ }
1355
+ getValue(e) {
1356
+ return this.kv.getByKey(e);
1357
+ }
1358
+ }, vo = class extends fr {
1359
+ constructor() {
1360
+ super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
1361
+ }
1362
+ register(e, t) {
1363
+ typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(e, t.allowProps), super.register(e, t.identifier)) : super.register(e, t);
1364
+ }
1365
+ getAllowedProps(e) {
1366
+ return this.classToAllowedProps.get(e);
1367
+ }
1368
+ };
1369
+ function So(e) {
1370
+ if ("values" in Object)
1371
+ return Object.values(e);
1372
+ const t = [];
1373
+ for (const n in e)
1374
+ e.hasOwnProperty(n) && t.push(e[n]);
1375
+ return t;
1376
+ }
1377
+ function Co(e, t) {
1378
+ const n = So(e);
1379
+ if ("find" in n)
1380
+ return n.find(t);
1381
+ const r = n;
1382
+ for (let s = 0; s < r.length; s++) {
1383
+ const o = r[s];
1384
+ if (t(o))
1385
+ return o;
1386
+ }
1387
+ }
1388
+ function Ue(e, t) {
1389
+ Object.entries(e).forEach(([n, r]) => t(r, n));
1390
+ }
1391
+ function mt(e, t) {
1392
+ return e.indexOf(t) !== -1;
1393
+ }
1394
+ function gn(e, t) {
1395
+ for (let n = 0; n < e.length; n++) {
1396
+ const r = e[n];
1397
+ if (t(r))
1398
+ return r;
1399
+ }
1400
+ }
1401
+ var wo = class {
1402
+ constructor() {
1403
+ this.transfomers = {};
1404
+ }
1405
+ register(e) {
1406
+ this.transfomers[e.name] = e;
1407
+ }
1408
+ findApplicable(e) {
1409
+ return Co(this.transfomers, (t) => t.isApplicable(e));
1410
+ }
1411
+ findByName(e) {
1412
+ return this.transfomers[e];
1413
+ }
1414
+ }, Io = (e) => Object.prototype.toString.call(e).slice(8, -1), dr = (e) => typeof e > "u", Ao = (e) => e === null, He = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Wt = (e) => He(e) && Object.keys(e).length === 0, se = (e) => Array.isArray(e), To = (e) => typeof e == "string", Oo = (e) => typeof e == "number" && !isNaN(e), Eo = (e) => typeof e == "boolean", No = (e) => e instanceof RegExp, De = (e) => e instanceof Map, ze = (e) => e instanceof Set, hr = (e) => Io(e) === "Symbol", xo = (e) => e instanceof Date && !isNaN(e.valueOf()), Ro = (e) => e instanceof Error, bn = (e) => typeof e == "number" && isNaN(e), Po = (e) => Eo(e) || Ao(e) || dr(e) || Oo(e) || To(e) || hr(e), Mo = (e) => typeof e == "bigint", Lo = (e) => e === 1 / 0 || e === -1 / 0, ko = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), _o = (e) => e instanceof URL, mr = (e) => e.replace(/\./g, "\\."), Ut = (e) => e.map(String).map(mr).join("."), Ke = (e) => {
1415
+ const t = [];
1416
+ let n = "";
1417
+ for (let s = 0; s < e.length; s++) {
1418
+ let o = e.charAt(s);
1419
+ if (o === "\\" && e.charAt(s + 1) === ".") {
1420
+ n += ".", s++;
1421
+ continue;
1422
+ }
1423
+ if (o === ".") {
1424
+ t.push(n), n = "";
1425
+ continue;
1426
+ }
1427
+ n += o;
1428
+ }
1429
+ const r = n;
1430
+ return t.push(r), t;
1431
+ };
1432
+ function z(e, t, n, r) {
1433
+ return {
1434
+ isApplicable: e,
1435
+ annotation: t,
1436
+ transform: n,
1437
+ untransform: r
1438
+ };
1439
+ }
1440
+ var pr = [
1441
+ z(dr, "undefined", () => null, () => {
1442
+ }),
1443
+ z(Mo, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
1444
+ z(xo, "Date", (e) => e.toISOString(), (e) => new Date(e)),
1445
+ z(Ro, "Error", (e, t) => {
1446
+ const n = {
1447
+ name: e.name,
1448
+ message: e.message
1449
+ };
1450
+ return t.allowedErrorProps.forEach((r) => {
1451
+ n[r] = e[r];
1452
+ }), n;
1453
+ }, (e, t) => {
1454
+ const n = new Error(e.message);
1455
+ return n.name = e.name, n.stack = e.stack, t.allowedErrorProps.forEach((r) => {
1456
+ n[r] = e[r];
1457
+ }), n;
1458
+ }),
1459
+ z(No, "regexp", (e) => "" + e, (e) => {
1460
+ const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
1461
+ return new RegExp(t, n);
1462
+ }),
1463
+ z(
1464
+ ze,
1465
+ "set",
1466
+ // (sets only exist in es6+)
1467
+ // eslint-disable-next-line es5/no-es6-methods
1468
+ (e) => [...e.values()],
1469
+ (e) => new Set(e)
1470
+ ),
1471
+ z(De, "map", (e) => [...e.entries()], (e) => new Map(e)),
1472
+ z((e) => bn(e) || Lo(e), "number", (e) => bn(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
1473
+ z((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
1474
+ z(_o, "URL", (e) => e.toString(), (e) => new URL(e))
1475
+ ];
1476
+ function Nt(e, t, n, r) {
1477
+ return {
1478
+ isApplicable: e,
1479
+ annotation: t,
1480
+ transform: n,
1481
+ untransform: r
1482
+ };
1483
+ }
1484
+ var yr = Nt((e, t) => hr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
1485
+ const r = n.symbolRegistry.getValue(t[1]);
1486
+ if (!r)
1487
+ throw new Error("Trying to deserialize unknown symbol");
1488
+ return r;
1489
+ }), Fo = [
1490
+ Int8Array,
1491
+ Uint8Array,
1492
+ Int16Array,
1493
+ Uint16Array,
1494
+ Int32Array,
1495
+ Uint32Array,
1496
+ Float32Array,
1497
+ Float64Array,
1498
+ Uint8ClampedArray
1499
+ ].reduce((e, t) => (e[t.name] = t, e), {}), gr = Nt(ko, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
1500
+ const n = Fo[t[1]];
1501
+ if (!n)
1502
+ throw new Error("Trying to deserialize unknown typed array");
1503
+ return new n(e);
1504
+ });
1505
+ function br(e, t) {
1506
+ return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
1507
+ }
1508
+ var vr = Nt(br, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
1509
+ const n = t.classRegistry.getAllowedProps(e.constructor);
1510
+ if (!n)
1511
+ return { ...e };
1512
+ const r = {};
1513
+ return n.forEach((s) => {
1514
+ r[s] = e[s];
1515
+ }), r;
1516
+ }, (e, t, n) => {
1517
+ const r = n.classRegistry.getValue(t[1]);
1518
+ if (!r)
1519
+ throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
1520
+ return Object.assign(Object.create(r.prototype), e);
1521
+ }), Sr = Nt((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
1522
+ const r = n.customTransformerRegistry.findByName(t[1]);
1523
+ if (!r)
1524
+ throw new Error("Trying to deserialize unknown custom value");
1525
+ return r.deserialize(e);
1526
+ }), Uo = [vr, yr, Sr, gr], vn = (e, t) => {
1527
+ const n = gn(Uo, (s) => s.isApplicable(e, t));
1528
+ if (n)
1529
+ return {
1530
+ value: n.transform(e, t),
1531
+ type: n.annotation(e, t)
1532
+ };
1533
+ const r = gn(pr, (s) => s.isApplicable(e, t));
1534
+ if (r)
1535
+ return {
1536
+ value: r.transform(e, t),
1537
+ type: r.annotation
1538
+ };
1539
+ }, Cr = {};
1540
+ pr.forEach((e) => {
1541
+ Cr[e.annotation] = e;
1542
+ });
1543
+ var Bo = (e, t, n) => {
1544
+ if (se(t))
1545
+ switch (t[0]) {
1546
+ case "symbol":
1547
+ return yr.untransform(e, t, n);
1548
+ case "class":
1549
+ return vr.untransform(e, t, n);
1550
+ case "custom":
1551
+ return Sr.untransform(e, t, n);
1552
+ case "typed-array":
1553
+ return gr.untransform(e, t, n);
1554
+ default:
1555
+ throw new Error("Unknown transformation: " + t);
1556
+ }
1557
+ else {
1558
+ const r = Cr[t];
1559
+ if (!r)
1560
+ throw new Error("Unknown transformation: " + t);
1561
+ return r.untransform(e, n);
1562
+ }
1563
+ }, ye = (e, t) => {
1564
+ const n = e.keys();
1565
+ for (; t > 0; )
1566
+ n.next(), t--;
1567
+ return n.next().value;
1568
+ };
1569
+ function wr(e) {
1570
+ if (mt(e, "__proto__"))
1571
+ throw new Error("__proto__ is not allowed as a property");
1572
+ if (mt(e, "prototype"))
1573
+ throw new Error("prototype is not allowed as a property");
1574
+ if (mt(e, "constructor"))
1575
+ throw new Error("constructor is not allowed as a property");
1576
+ }
1577
+ var Vo = (e, t) => {
1578
+ wr(t);
1579
+ for (let n = 0; n < t.length; n++) {
1580
+ const r = t[n];
1581
+ if (ze(e))
1582
+ e = ye(e, +r);
1583
+ else if (De(e)) {
1584
+ const s = +r, o = +t[++n] == 0 ? "key" : "value", i = ye(e, s);
1585
+ switch (o) {
1586
+ case "key":
1587
+ e = i;
1588
+ break;
1589
+ case "value":
1590
+ e = e.get(i);
1591
+ break;
1592
+ }
1593
+ } else
1594
+ e = e[r];
1595
+ }
1596
+ return e;
1597
+ }, Xt = (e, t, n) => {
1598
+ if (wr(t), t.length === 0)
1599
+ return n(e);
1600
+ let r = e;
1601
+ for (let o = 0; o < t.length - 1; o++) {
1602
+ const i = t[o];
1603
+ if (se(r)) {
1604
+ const l = +i;
1605
+ r = r[l];
1606
+ } else if (He(r))
1607
+ r = r[i];
1608
+ else if (ze(r)) {
1609
+ const l = +i;
1610
+ r = ye(r, l);
1611
+ } else if (De(r)) {
1612
+ if (o === t.length - 2)
1613
+ break;
1614
+ const c = +i, a = +t[++o] == 0 ? "key" : "value", d = ye(r, c);
1615
+ switch (a) {
1616
+ case "key":
1617
+ r = d;
1618
+ break;
1619
+ case "value":
1620
+ r = r.get(d);
1621
+ break;
1622
+ }
1623
+ }
1624
+ }
1625
+ const s = t[t.length - 1];
1626
+ if (se(r) ? r[+s] = n(r[+s]) : He(r) && (r[s] = n(r[s])), ze(r)) {
1627
+ const o = ye(r, +s), i = n(o);
1628
+ o !== i && (r.delete(o), r.add(i));
1629
+ }
1630
+ if (De(r)) {
1631
+ const o = +t[t.length - 2], i = ye(r, o);
1632
+ switch (+s == 0 ? "key" : "value") {
1633
+ case "key": {
1634
+ const c = n(i);
1635
+ r.set(c, r.get(i)), c !== i && r.delete(i);
1636
+ break;
1637
+ }
1638
+ case "value": {
1639
+ r.set(i, n(r.get(i)));
1640
+ break;
1641
+ }
1642
+ }
1643
+ }
1644
+ return e;
1645
+ };
1646
+ function Yt(e, t, n = []) {
1647
+ if (!e)
1648
+ return;
1649
+ if (!se(e)) {
1650
+ Ue(e, (o, i) => Yt(o, t, [...n, ...Ke(i)]));
1651
+ return;
1652
+ }
1653
+ const [r, s] = e;
1654
+ s && Ue(s, (o, i) => {
1655
+ Yt(o, t, [...n, ...Ke(i)]);
1656
+ }), t(r, n);
1657
+ }
1658
+ function qo(e, t, n) {
1659
+ return Yt(t, (r, s) => {
1660
+ e = Xt(e, s, (o) => Bo(o, r, n));
1661
+ }), e;
1662
+ }
1663
+ function $o(e, t) {
1664
+ function n(r, s) {
1665
+ const o = Vo(e, Ke(s));
1666
+ r.map(Ke).forEach((i) => {
1667
+ e = Xt(e, i, () => o);
1668
+ });
1669
+ }
1670
+ if (se(t)) {
1671
+ const [r, s] = t;
1672
+ r.forEach((o) => {
1673
+ e = Xt(e, Ke(o), () => e);
1674
+ }), s && Ue(s, n);
1675
+ } else
1676
+ Ue(t, n);
1677
+ return e;
1678
+ }
1679
+ var Ko = (e, t) => He(e) || se(e) || De(e) || ze(e) || br(e, t);
1680
+ function Go(e, t, n) {
1681
+ const r = n.get(e);
1682
+ r ? r.push(t) : n.set(e, [t]);
1683
+ }
1684
+ function Qo(e, t) {
1685
+ const n = {};
1686
+ let r;
1687
+ return e.forEach((s) => {
1688
+ if (s.length <= 1)
1689
+ return;
1690
+ t || (s = s.map((l) => l.map(String)).sort((l, c) => l.length - c.length));
1691
+ const [o, ...i] = s;
1692
+ o.length === 0 ? r = i.map(Ut) : n[Ut(o)] = i.map(Ut);
1693
+ }), r ? Wt(n) ? [r] : [r, n] : Wt(n) ? void 0 : n;
1694
+ }
1695
+ var Ir = (e, t, n, r, s = [], o = [], i = /* @__PURE__ */ new Map()) => {
1696
+ const l = Po(e);
1697
+ if (!l) {
1698
+ Go(e, s, t);
1699
+ const h = i.get(e);
1700
+ if (h)
1701
+ return r ? {
1702
+ transformedValue: null
1703
+ } : h;
1704
+ }
1705
+ if (!Ko(e, n)) {
1706
+ const h = vn(e, n), y = h ? {
1707
+ transformedValue: h.value,
1708
+ annotations: [h.type]
1709
+ } : {
1710
+ transformedValue: e
1711
+ };
1712
+ return l || i.set(e, y), y;
1713
+ }
1714
+ if (mt(o, e))
1715
+ return {
1716
+ transformedValue: null
1717
+ };
1718
+ const c = vn(e, n), a = (c == null ? void 0 : c.value) ?? e, d = se(a) ? [] : {}, u = {};
1719
+ Ue(a, (h, y) => {
1720
+ if (y === "__proto__" || y === "constructor" || y === "prototype")
1721
+ throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);
1722
+ const p = Ir(h, t, n, r, [...s, y], [...o, e], i);
1723
+ d[y] = p.transformedValue, se(p.annotations) ? u[y] = p.annotations : He(p.annotations) && Ue(p.annotations, (S, L) => {
1724
+ u[mr(y) + "." + L] = S;
1725
+ });
1726
+ });
1727
+ const m = Wt(u) ? {
1728
+ transformedValue: d,
1729
+ annotations: c ? [c.type] : void 0
1730
+ } : {
1731
+ transformedValue: d,
1732
+ annotations: c ? [c.type, u] : u
1733
+ };
1734
+ return l || i.set(e, m), m;
1735
+ };
1736
+ function Ar(e) {
1737
+ return Object.prototype.toString.call(e).slice(8, -1);
1738
+ }
1739
+ function Sn(e) {
1740
+ return Ar(e) === "Array";
1741
+ }
1742
+ function jo(e) {
1743
+ if (Ar(e) !== "Object")
1744
+ return !1;
1745
+ const t = Object.getPrototypeOf(e);
1746
+ return !!t && t.constructor === Object && t === Object.prototype;
1747
+ }
1748
+ function Ho(e, t, n, r, s) {
1749
+ const o = {}.propertyIsEnumerable.call(r, t) ? "enumerable" : "nonenumerable";
1750
+ o === "enumerable" && (e[t] = n), s && o === "nonenumerable" && Object.defineProperty(e, t, {
1751
+ value: n,
1752
+ enumerable: !1,
1753
+ writable: !0,
1754
+ configurable: !0
1755
+ });
1756
+ }
1757
+ function Zt(e, t = {}) {
1758
+ if (Sn(e))
1759
+ return e.map((s) => Zt(s, t));
1760
+ if (!jo(e))
1761
+ return e;
1762
+ const n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols(e);
1763
+ return [...n, ...r].reduce((s, o) => {
1764
+ if (Sn(t.props) && !t.props.includes(o))
1765
+ return s;
1766
+ const i = e[o], l = Zt(i, t);
1767
+ return Ho(s, o, l, e, t.nonenumerable), s;
1768
+ }, {});
1769
+ }
1770
+ var R = class {
1771
+ /**
1772
+ * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
1773
+ */
1774
+ constructor({ dedupe: e = !1 } = {}) {
1775
+ this.classRegistry = new vo(), this.symbolRegistry = new fr((t) => t.description ?? ""), this.customTransformerRegistry = new wo(), this.allowedErrorProps = [], this.dedupe = e;
1776
+ }
1777
+ serialize(e) {
1778
+ const t = /* @__PURE__ */ new Map(), n = Ir(e, t, this, this.dedupe), r = {
1779
+ json: n.transformedValue
1780
+ };
1781
+ n.annotations && (r.meta = {
1782
+ ...r.meta,
1783
+ values: n.annotations
1784
+ });
1785
+ const s = Qo(t, this.dedupe);
1786
+ return s && (r.meta = {
1787
+ ...r.meta,
1788
+ referentialEqualities: s
1789
+ }), r;
1790
+ }
1791
+ deserialize(e) {
1792
+ const { json: t, meta: n } = e;
1793
+ let r = Zt(t);
1794
+ return n != null && n.values && (r = qo(r, n.values, this)), n != null && n.referentialEqualities && (r = $o(r, n.referentialEqualities)), r;
1795
+ }
1796
+ stringify(e) {
1797
+ return JSON.stringify(this.serialize(e));
1798
+ }
1799
+ parse(e) {
1800
+ return this.deserialize(JSON.parse(e));
1801
+ }
1802
+ registerClass(e, t) {
1803
+ this.classRegistry.register(e, t);
1804
+ }
1805
+ registerSymbol(e, t) {
1806
+ this.symbolRegistry.register(e, t);
1807
+ }
1808
+ registerCustom(e, t) {
1809
+ this.customTransformerRegistry.register({
1810
+ name: t,
1811
+ ...e
1812
+ });
1813
+ }
1814
+ allowErrorProps(...e) {
1815
+ this.allowedErrorProps.push(...e);
1816
+ }
1817
+ };
1818
+ R.defaultInstance = new R();
1819
+ R.serialize = R.defaultInstance.serialize.bind(R.defaultInstance);
1820
+ R.deserialize = R.defaultInstance.deserialize.bind(R.defaultInstance);
1821
+ R.stringify = R.defaultInstance.stringify.bind(R.defaultInstance);
1822
+ R.parse = R.defaultInstance.parse.bind(R.defaultInstance);
1823
+ R.registerClass = R.defaultInstance.registerClass.bind(R.defaultInstance);
1824
+ R.registerSymbol = R.defaultInstance.registerSymbol.bind(R.defaultInstance);
1825
+ R.registerCustom = R.defaultInstance.registerCustom.bind(R.defaultInstance);
1826
+ R.allowErrorProps = R.defaultInstance.allowErrorProps.bind(R.defaultInstance);
1827
+ var Do = R.serialize, Il = R.stringify;
1828
+ function Al(e) {
1829
+ return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
1830
+ }
1831
+ function Tl(e, t) {
1832
+ return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
1833
+ }
1834
+ function Ol({
1835
+ queryState: e,
1836
+ observerCount: t,
1837
+ isStale: n
1838
+ }) {
1839
+ return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
1840
+ }
1841
+ function El({
1842
+ status: e,
1843
+ isPaused: t
1844
+ }) {
1845
+ return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
1846
+ }
1847
+ function Nl(e) {
1848
+ return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
1849
+ }
1850
+ var xl = (e, t = !1) => {
1851
+ const {
1852
+ json: n
1853
+ } = Do(e);
1854
+ return JSON.stringify(n, null, t ? 2 : void 0);
1855
+ }, ct = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, zo = (e, t) => e.queryHash.localeCompare(t.queryHash), Tr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Wo = (e, t) => ct(e) === ct(t) ? Tr(e, t) : ct(e) > ct(t) ? 1 : -1, Rl = {
1856
+ status: Wo,
1857
+ "query hash": zo,
1858
+ "last updated": Tr
1859
+ }, at = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Or = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Xo = (e, t) => at(e) === at(t) ? Or(e, t) : at(e) > at(t) ? 1 : -1, Pl = {
1860
+ status: Xo,
1861
+ "last updated": Or
1862
+ }, Ml = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Ll = () => {
1863
+ const [e, t] = U("dark");
1864
+ return Ms(() => {
1865
+ const n = window.matchMedia("(prefers-color-scheme: dark)");
1866
+ t(n.matches ? "dark" : "light");
1867
+ const r = (s) => {
1868
+ t(s.matches ? "dark" : "light");
1869
+ };
1870
+ n.addEventListener("change", r), Ge(() => n.removeEventListener("change", r));
1871
+ }), e;
1872
+ }, ut = (e, t, n) => {
1873
+ if (t.length === 0)
1874
+ return n;
1875
+ if (e instanceof Map) {
1876
+ const r = new Map(e);
1877
+ if (t.length === 1)
1878
+ return r.set(t[0], n), r;
1879
+ const [s, ...o] = t;
1880
+ return r.set(s, ut(r.get(s), o, n)), r;
1881
+ }
1882
+ if (e instanceof Set) {
1883
+ const r = ut(Array.from(e), t, n);
1884
+ return new Set(r);
1885
+ }
1886
+ if (Array.isArray(e)) {
1887
+ const r = [...e];
1888
+ if (t.length === 1)
1889
+ return r[t[0]] = n, r;
1890
+ const [s, ...o] = t;
1891
+ return r[s] = ut(r[s], o, n), r;
1892
+ }
1893
+ if (e instanceof Object) {
1894
+ const r = {
1895
+ ...e
1896
+ };
1897
+ if (t.length === 1)
1898
+ return r[t[0]] = n, r;
1899
+ const [s, ...o] = t;
1900
+ return r[s] = ut(r[s], o, n), r;
1901
+ }
1902
+ return e;
1903
+ }, ft = (e, t) => {
1904
+ if (e instanceof Map) {
1905
+ const n = new Map(e);
1906
+ if (t.length === 1)
1907
+ return n.delete(t[0]), n;
1908
+ const [r, ...s] = t;
1909
+ return n.set(r, ft(n.get(r), s)), n;
1910
+ }
1911
+ if (e instanceof Set) {
1912
+ const n = ft(Array.from(e), t);
1913
+ return new Set(n);
1914
+ }
1915
+ if (Array.isArray(e)) {
1916
+ const n = [...e];
1917
+ if (t.length === 1)
1918
+ return n.filter((o, i) => i.toString() !== t[0]);
1919
+ const [r, ...s] = t;
1920
+ return n[r] = ft(n[r], s), n;
1921
+ }
1922
+ if (e instanceof Object) {
1923
+ const n = {
1924
+ ...e
1925
+ };
1926
+ if (t.length === 1)
1927
+ return delete n[t[0]], n;
1928
+ const [r, ...s] = t;
1929
+ return n[r] = ft(n[r], s), n;
1930
+ }
1931
+ return e;
1932
+ }, Er = (e, t) => {
1933
+ if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
1934
+ const r = document.createElement("style"), s = document.createTextNode("");
1935
+ r.appendChild(s), r.id = "_goober", r.setAttribute("nonce", e), t ? t.appendChild(r) : document.head.appendChild(r);
1936
+ }, we, Xe, Ye, Ze, oe, Je, Ie, Ae, Te, Oe, Ee, Ne, et, Tn, Yo = (Tn = class {
1937
+ constructor(e) {
1938
+ N(this, we);
1939
+ N(this, Xe);
1940
+ N(this, Ye);
1941
+ N(this, Ze);
1942
+ N(this, oe, !1);
1943
+ N(this, Je);
1944
+ N(this, Ie);
1945
+ N(this, Ae);
1946
+ N(this, Te);
1947
+ N(this, Oe);
1948
+ N(this, Ee);
1949
+ N(this, Ne);
1950
+ N(this, et);
1951
+ const {
1952
+ client: t,
1953
+ queryFlavor: n,
1954
+ version: r,
1955
+ onlineManager: s,
1956
+ buttonPosition: o,
1957
+ position: i,
1958
+ initialIsOpen: l,
1959
+ errorTypes: c,
1960
+ styleNonce: a,
1961
+ shadowDOMTarget: d
1962
+ } = e;
1963
+ T(this, we, U(t)), T(this, Ye, n), T(this, Ze, r), T(this, Xe, s), T(this, Je, a), T(this, Ie, d), T(this, Ae, U(o)), T(this, Te, U(i)), T(this, Oe, U(l)), T(this, Ee, U(c));
1964
+ }
1965
+ setButtonPosition(e) {
1966
+ b(this, Ae)[1](e);
1967
+ }
1968
+ setPosition(e) {
1969
+ b(this, Te)[1](e);
1970
+ }
1971
+ setInitialIsOpen(e) {
1972
+ b(this, Oe)[1](e);
1973
+ }
1974
+ setErrorTypes(e) {
1975
+ b(this, Ee)[1](e);
1976
+ }
1977
+ setClient(e) {
1978
+ b(this, we)[1](e);
1979
+ }
1980
+ mount(e) {
1981
+ if (b(this, oe))
1982
+ throw new Error("Devtools is already mounted");
1983
+ const t = cr(() => {
1984
+ const n = this, [r] = b(this, Ae), [s] = b(this, Te), [o] = b(this, Oe), [i] = b(this, Ee), [l] = b(this, we);
1985
+ let c;
1986
+ return b(this, Ne) ? c = b(this, Ne) : (c = ir(() => import("./I3HPI4QX-DcsxmYEr.js")), T(this, Ne, c)), Er(b(this, Je), b(this, Ie)), sr(c, or({
1987
+ get queryFlavor() {
1988
+ return b(n, Ye);
1989
+ },
1990
+ get version() {
1991
+ return b(n, Ze);
1992
+ },
1993
+ get onlineManager() {
1994
+ return b(n, Xe);
1995
+ },
1996
+ get shadowDOMTarget() {
1997
+ return b(n, Ie);
1998
+ }
1999
+ }, {
2000
+ get client() {
2001
+ return l();
2002
+ },
2003
+ get buttonPosition() {
2004
+ return r();
2005
+ },
2006
+ get position() {
2007
+ return s();
2008
+ },
2009
+ get initialIsOpen() {
2010
+ return o();
2011
+ },
2012
+ get errorTypes() {
2013
+ return i();
2014
+ }
2015
+ }));
2016
+ }, e);
2017
+ T(this, oe, !0), T(this, et, t);
2018
+ }
2019
+ unmount() {
2020
+ var e;
2021
+ if (!b(this, oe))
2022
+ throw new Error("Devtools is not mounted");
2023
+ (e = b(this, et)) == null || e.call(this), T(this, oe, !1);
2024
+ }
2025
+ }, we = new WeakMap(), Xe = new WeakMap(), Ye = new WeakMap(), Ze = new WeakMap(), oe = new WeakMap(), Je = new WeakMap(), Ie = new WeakMap(), Ae = new WeakMap(), Te = new WeakMap(), Oe = new WeakMap(), Ee = new WeakMap(), Ne = new WeakMap(), et = new WeakMap(), Tn), xe, tt, nt, rt, ie, st, Re, Pe, Me, Le, ke, _e, Fe, ot, On, Zo = (On = class {
2026
+ constructor(e) {
2027
+ N(this, xe);
2028
+ N(this, tt);
2029
+ N(this, nt);
2030
+ N(this, rt);
2031
+ N(this, ie, !1);
2032
+ N(this, st);
2033
+ N(this, Re);
2034
+ N(this, Pe);
2035
+ N(this, Me);
2036
+ N(this, Le);
2037
+ N(this, ke);
2038
+ N(this, _e);
2039
+ N(this, Fe);
2040
+ N(this, ot);
2041
+ const {
2042
+ client: t,
2043
+ queryFlavor: n,
2044
+ version: r,
2045
+ onlineManager: s,
2046
+ buttonPosition: o,
2047
+ position: i,
2048
+ initialIsOpen: l,
2049
+ errorTypes: c,
2050
+ styleNonce: a,
2051
+ shadowDOMTarget: d,
2052
+ onClose: u
2053
+ } = e;
2054
+ T(this, xe, U(t)), T(this, nt, n), T(this, rt, r), T(this, tt, s), T(this, st, a), T(this, Re, d), T(this, Pe, U(o)), T(this, Me, U(i)), T(this, Le, U(l)), T(this, ke, U(c)), T(this, _e, U(u));
2055
+ }
2056
+ setButtonPosition(e) {
2057
+ b(this, Pe)[1](e);
2058
+ }
2059
+ setPosition(e) {
2060
+ b(this, Me)[1](e);
2061
+ }
2062
+ setInitialIsOpen(e) {
2063
+ b(this, Le)[1](e);
2064
+ }
2065
+ setErrorTypes(e) {
2066
+ b(this, ke)[1](e);
2067
+ }
2068
+ setClient(e) {
2069
+ b(this, xe)[1](e);
2070
+ }
2071
+ setOnClose(e) {
2072
+ b(this, _e)[1](() => e);
2073
+ }
2074
+ mount(e) {
2075
+ if (b(this, ie))
2076
+ throw new Error("Devtools is already mounted");
2077
+ const t = cr(() => {
2078
+ const n = this, [r] = b(this, Pe), [s] = b(this, Me), [o] = b(this, Le), [i] = b(this, ke), [l] = b(this, xe), [c] = b(this, _e);
2079
+ let a;
2080
+ return b(this, Fe) ? a = b(this, Fe) : (a = ir(() => import("./CXEL7IU7-bSp8E8Ma.js")), T(this, Fe, a)), Er(b(this, st), b(this, Re)), sr(a, or({
2081
+ get queryFlavor() {
2082
+ return b(n, nt);
2083
+ },
2084
+ get version() {
2085
+ return b(n, rt);
2086
+ },
2087
+ get onlineManager() {
2088
+ return b(n, tt);
2089
+ },
2090
+ get shadowDOMTarget() {
2091
+ return b(n, Re);
2092
+ }
2093
+ }, {
2094
+ get client() {
2095
+ return l();
2096
+ },
2097
+ get buttonPosition() {
2098
+ return r();
2099
+ },
2100
+ get position() {
2101
+ return s();
2102
+ },
2103
+ get initialIsOpen() {
2104
+ return o();
2105
+ },
2106
+ get errorTypes() {
2107
+ return i();
2108
+ },
2109
+ get onClose() {
2110
+ return c();
2111
+ }
2112
+ }));
2113
+ }, e);
2114
+ T(this, ie, !0), T(this, ot, t);
2115
+ }
2116
+ unmount() {
2117
+ var e;
2118
+ if (!b(this, ie))
2119
+ throw new Error("Devtools is not mounted");
2120
+ (e = b(this, ot)) == null || e.call(this), T(this, ie, !1);
2121
+ }
2122
+ }, xe = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), ie = new WeakMap(), st = new WeakMap(), Re = new WeakMap(), Pe = new WeakMap(), Me = new WeakMap(), Le = new WeakMap(), ke = new WeakMap(), _e = new WeakMap(), Fe = new WeakMap(), ot = new WeakMap(), On);
2123
+ function Jo(e) {
2124
+ const t = H(e.client), n = K.useRef(null), {
2125
+ buttonPosition: r,
2126
+ position: s,
2127
+ initialIsOpen: o,
2128
+ errorTypes: i,
2129
+ styleNonce: l,
2130
+ shadowDOMTarget: c
2131
+ } = e, [a] = K.useState(
2132
+ new Yo({
2133
+ client: t,
2134
+ queryFlavor: "React Query",
2135
+ version: "5",
2136
+ onlineManager: $n,
2137
+ buttonPosition: r,
2138
+ position: s,
2139
+ initialIsOpen: o,
2140
+ errorTypes: i,
2141
+ styleNonce: l,
2142
+ shadowDOMTarget: c
2143
+ })
2144
+ );
2145
+ return K.useEffect(() => {
2146
+ a.setClient(t);
2147
+ }, [t, a]), K.useEffect(() => {
2148
+ r && a.setButtonPosition(r);
2149
+ }, [r, a]), K.useEffect(() => {
2150
+ s && a.setPosition(s);
2151
+ }, [s, a]), K.useEffect(() => {
2152
+ a.setInitialIsOpen(o || !1);
2153
+ }, [o, a]), K.useEffect(() => {
2154
+ a.setErrorTypes(i || []);
2155
+ }, [i, a]), K.useEffect(() => (n.current && a.mount(n.current), () => {
2156
+ a.unmount();
2157
+ }), [a]), /* @__PURE__ */ f("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
2158
+ }
2159
+ function ei(e) {
2160
+ const t = H(e.client), n = K.useRef(null), { errorTypes: r, styleNonce: s, shadowDOMTarget: o } = e, [i] = K.useState(
2161
+ new Zo({
2162
+ client: t,
2163
+ queryFlavor: "React Query",
2164
+ version: "5",
2165
+ onlineManager: $n,
2166
+ buttonPosition: "bottom-left",
2167
+ position: "bottom",
2168
+ initialIsOpen: !0,
2169
+ errorTypes: r,
2170
+ styleNonce: s,
2171
+ shadowDOMTarget: o,
2172
+ onClose: e.onClose
2173
+ })
2174
+ );
2175
+ return K.useEffect(() => {
2176
+ i.setClient(t);
2177
+ }, [t, i]), K.useEffect(() => {
2178
+ i.setOnClose(e.onClose ?? (() => {
2179
+ }));
2180
+ }, [e.onClose, i]), K.useEffect(() => {
2181
+ i.setErrorTypes(r || []);
2182
+ }, [r, i]), K.useEffect(() => (n.current && i.mount(n.current), () => {
2183
+ i.unmount();
2184
+ }), [i]), /* @__PURE__ */ f(
2185
+ "div",
2186
+ {
2187
+ style: { height: "500px", ...e.style },
2188
+ className: "tsqd-parent-container",
2189
+ ref: n
2190
+ }
2191
+ );
2192
+ }
2193
+ var Nr = process.env.NODE_ENV !== "development" ? function() {
2194
+ return null;
2195
+ } : Jo;
2196
+ process.env.NODE_ENV;
2197
+ const Jt = new vs({
2198
+ queryCache: new Ss({
2199
+ onError: (e) => {
2200
+ typeof e == "string" && e === ws.NOT_LOGGED_IN && window.location.replace("/auth/login");
2201
+ }
2202
+ }),
2203
+ defaultOptions: {
2204
+ queries: {
2205
+ retry: !1,
2206
+ refetchOnWindowFocus: !1,
2207
+ staleTime: 1e3 * 60 * 2
2208
+ }
2209
+ }
2210
+ }), kl = ({ children: e }) => /* @__PURE__ */ _(Kn, { client: Jt, children: [
2211
+ /* @__PURE__ */ f(
2212
+ Nn,
2213
+ {
2214
+ params: {
2215
+ app: "collect"
2216
+ },
2217
+ children: e
2218
+ }
2219
+ ),
2220
+ /* @__PURE__ */ f(Nr, { initialIsOpen: !1 })
2221
+ ] }), ti = () => {
2222
+ const e = Bn(), t = Be(), { appCode: n } = ue(), { t: r } = fe(n);
2223
+ return e && console.error(e), /* @__PURE__ */ _("div", { className: "d-flex flex-column gap-16 align-items-center mt-64", children: [
2224
+ /* @__PURE__ */ f(en, { level: "h2", headingStyle: "h2", className: "text-secondary", children: r("oops") }),
2225
+ /* @__PURE__ */ f("div", { className: "text", children: r("notfound.or.unauthorized") }),
2226
+ /* @__PURE__ */ f(te, { color: "primary", onClick: () => t(-1), children: r("back") })
2227
+ ] });
2228
+ }, ni = () => {
2229
+ const e = Bn(), t = Be();
2230
+ return console.error(e), /* @__PURE__ */ f(Xr, { children: /* @__PURE__ */ _("div", { className: "d-flex flex-column gap-16 align-items-center mt-64", children: [
2231
+ /* @__PURE__ */ f(en, { level: "h2", headingStyle: "h2", className: "text-secondary", children: Lt("oops") }),
2232
+ /* @__PURE__ */ f("div", { className: "text", children: Lt("e404.page") }),
2233
+ /* @__PURE__ */ f(te, { color: "primary", onClick: () => t(-1), children: Lt("back") })
2234
+ ] }) });
2235
+ }, ri = 100, si = 100, _l = 100, Ct = 80, Bt = "collect-wizard-data", ge = ["form", "members"], Cn = {
2236
+ title: "",
2237
+ description: "",
2238
+ deadline: void 0,
2239
+ attachments: [],
2240
+ sharings: []
2241
+ }, oi = () => {
2242
+ const [e, t] = ae(() => {
2243
+ const s = localStorage.getItem(Bt);
2244
+ return s ? JSON.parse(s) : Cn;
2245
+ });
2246
+ return Q(() => {
2247
+ localStorage.setItem(Bt, JSON.stringify(e));
2248
+ }, [e]), {
2249
+ wizardData: e,
2250
+ setWizardData: t,
2251
+ updateWizardData: (s) => {
2252
+ t((o) => ({
2253
+ ...o,
2254
+ ...s
2255
+ }));
2256
+ },
2257
+ resetWizardData: () => {
2258
+ localStorage.removeItem(Bt), t(Cn);
2259
+ }
2260
+ };
2261
+ };
2262
+ function rn() {
2263
+ const e = Be(), n = Vn().pathname, r = ge.findIndex(
2264
+ (i) => n.includes(i)
2265
+ );
2266
+ return {
2267
+ currentStep: r,
2268
+ nextStep: () => {
2269
+ const i = r + 1;
2270
+ i < ge.length && e(`/create/${ge[i]}`);
2271
+ },
2272
+ backStep: () => {
2273
+ const i = r - 1;
2274
+ i >= 0 ? e(`/create/${ge[i]}`) : e("/");
2275
+ }
2276
+ };
2277
+ }
2278
+ const ii = (e) => Number.parseInt(e ?? "0", 10) || 0, li = (e) => {
2279
+ const t = e.mimeType || "application/octet-stream";
2280
+ return {
2281
+ id: String(e.id),
2282
+ name: e.name,
2283
+ filename: e.name,
2284
+ charset: "UTF-8",
2285
+ contentTransferEncoding: "binary",
2286
+ contentType: t,
2287
+ size: ii(e.size),
2288
+ file: new File([], e.name, { type: t })
2289
+ };
2290
+ }, wt = (e) => (e ?? []).map(
2291
+ (t) => li(t)
2292
+ ), Fl = (e, t) => `/collect/api/collections/${e}/attachments/${t}?download=true`, Ul = (e, t, n) => `/collect/api/collections/${e}/submissions/${t}/attachments/${n}?download=true`, sn = (e) => {
2293
+ const t = e;
2294
+ t.use = {};
2295
+ for (const n of Object.keys(t.getState()))
2296
+ t.use[n] = () => t((r) => r[n]);
2297
+ return t;
2298
+ }, ci = tn((e) => ({
2299
+ isFormValid: !1,
2300
+ setIsFormValid: (t) => e({ isFormValid: t })
2301
+ })), xr = sn(ci);
2302
+ function Rr({ title: e }) {
2303
+ return /* @__PURE__ */ f(en, { className: "text-truncate", children: e });
2304
+ }
2305
+ const ai = ({
2306
+ wizardData: e,
2307
+ updateWizardData: t,
2308
+ collection: n,
2309
+ onRemoveAttachment: r
2310
+ }) => {
2311
+ const { appCode: s } = ue(), { t: o } = fe(s), { currentStep: i, nextStep: l } = rn(), c = xr.use.setIsFormValid(), a = Tt(
2312
+ () => ({
2313
+ title: (e == null ? void 0 : e.title) ?? (n == null ? void 0 : n.name) ?? "",
2314
+ description: (e == null ? void 0 : e.description) ?? (n != null && n.content ? n.content : ""),
2315
+ deadline: (e == null ? void 0 : e.deadline) ?? (n != null && n.deadline ? new Date(n.deadline) : void 0),
2316
+ attachments: (e == null ? void 0 : e.attachments) ?? wt(n == null ? void 0 : n.attachments) ?? [],
2317
+ sharings: (e == null ? void 0 : e.sharings) ?? []
2318
+ }),
2319
+ [e, n]
2320
+ ), d = re(a.description), [u, m] = ae(
2321
+ () => (e == null ? void 0 : e.attachments) ?? wt(n == null ? void 0 : n.attachments) ?? []
2322
+ ), {
2323
+ control: h,
2324
+ watch: y,
2325
+ register: p,
2326
+ handleSubmit: S,
2327
+ setValue: L,
2328
+ formState: { isValid: C }
2329
+ } = jn({
2330
+ defaultValues: a
2331
+ });
2332
+ Q(() => {
2333
+ const g = y((O) => {
2334
+ t == null || t(O);
2335
+ });
2336
+ return () => g.unsubscribe();
2337
+ }, [y]), Q(() => {
2338
+ c(C);
2339
+ }, [C]);
2340
+ const F = (g) => {
2341
+ t == null || t(g), l();
2342
+ }, w = ({ editor: g }) => {
2343
+ L("description", g.isEmpty ? "" : g.getHTML());
2344
+ }, k = (g) => {
2345
+ m(g), L("attachments", g);
2346
+ }, D = (g) => {
2347
+ r == null || r(g);
2348
+ };
2349
+ return /* @__PURE__ */ _(En, { children: [
2350
+ /* @__PURE__ */ f(Rr, { title: o("collection.wizard.form.title") }),
2351
+ /* @__PURE__ */ f("div", { className: "mb-24", children: /* @__PURE__ */ f(xn, { currentStep: i, nbSteps: 2 }) }),
2352
+ /* @__PURE__ */ f(
2353
+ qn,
2354
+ {
2355
+ id: "formCreateCollection",
2356
+ role: "form",
2357
+ onSubmit: S(F),
2358
+ children: /* @__PURE__ */ _(G, { children: [
2359
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "5", xl: "6", className: "g-start-xl-2", children: /* @__PURE__ */ _(ne, { id: "collectionTitle", isRequired: !0, children: [
2360
+ /* @__PURE__ */ f(be, { leftIcon: /* @__PURE__ */ f(_n, {}), children: o("collection.wizard.create.form.title") }),
2361
+ /* @__PURE__ */ f(
2362
+ Rn,
2363
+ {
2364
+ "data-testid": "collect-create-collection-input-title",
2365
+ type: "text",
2366
+ ...p("title", {
2367
+ required: !0,
2368
+ maxLength: Ct,
2369
+ pattern: {
2370
+ value: /[^ ]/,
2371
+ message: "invalid title"
2372
+ }
2373
+ }),
2374
+ size: "md",
2375
+ maxLength: Ct,
2376
+ placeholder: o(
2377
+ "collection.wizard.create.form.title.placeholder"
2378
+ ),
2379
+ showCounter: !0
2380
+ }
2381
+ )
2382
+ ] }) }),
2383
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "3", xl: "4", children: /* @__PURE__ */ _(ne, { id: "collectionDeadline", isRequired: !0, children: [
2384
+ /* @__PURE__ */ f(be, { leftIcon: /* @__PURE__ */ f(Fn, {}), children: o("collection.wizard.create.form.deadline") }),
2385
+ /* @__PURE__ */ f(
2386
+ Se,
2387
+ {
2388
+ name: "deadline",
2389
+ control: h,
2390
+ rules: { required: !0 },
2391
+ render: ({ field: g }) => /* @__PURE__ */ f(
2392
+ Pn,
2393
+ {
2394
+ "data-testid": "collect-create-collection-input-deadline",
2395
+ value: g.value,
2396
+ onChange: g.onChange,
2397
+ onBlur: g.onBlur,
2398
+ className: "w-full form-control"
2399
+ }
2400
+ )
2401
+ }
2402
+ )
2403
+ ] }) }),
2404
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "8", xl: "10", className: "g-start-xl-2", children: /* @__PURE__ */ _(
2405
+ ne,
2406
+ {
2407
+ id: "collectionDescription",
2408
+ isOptional: !0,
2409
+ className: "collectionDescription",
2410
+ children: [
2411
+ /* @__PURE__ */ f(be, { leftIcon: /* @__PURE__ */ f(Un, {}), children: o("collection.wizard.create.form.description") }),
2412
+ /* @__PURE__ */ f(
2413
+ Se,
2414
+ {
2415
+ name: "description",
2416
+ control: h,
2417
+ render: () => /* @__PURE__ */ f(
2418
+ Qn,
2419
+ {
2420
+ "data-testid": "collect-create-collection-input-description",
2421
+ id: "collectionDescription",
2422
+ content: d.current,
2423
+ placeholder: o(
2424
+ "collection.wizard.create.form.description.placeholder"
2425
+ ),
2426
+ onContentChange: w,
2427
+ mode: "edit"
2428
+ }
2429
+ )
2430
+ }
2431
+ )
2432
+ ]
2433
+ }
2434
+ ) }),
2435
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "5", className: "g-start-xl-2", children: /* @__PURE__ */ f(ne, { id: "collectionAttachments", isOptional: !0, children: /* @__PURE__ */ f(
2436
+ Se,
2437
+ {
2438
+ name: "attachments",
2439
+ control: h,
2440
+ render: () => /* @__PURE__ */ f(
2441
+ Mn,
2442
+ {
2443
+ "data-testid": "collect-create-collection-input-attachments",
2444
+ attachments: u,
2445
+ editMode: !0,
2446
+ onChange: k,
2447
+ onRemoveAttachment: D
2448
+ }
2449
+ )
2450
+ }
2451
+ ) }) })
2452
+ ] })
2453
+ }
2454
+ )
2455
+ ] });
2456
+ }, ui = (e) => e === dt.MANAGE ? ["contrib", "manager"] : [e], fi = (e) => e.includes("manager") ? dt.MANAGE : e.includes("contrib") ? dt.CONTRIB : dt.VIEW, di = (e) => ({
2457
+ recipientId: e.recipient.entId,
2458
+ recipientType: e.recipient.type,
2459
+ permission: ui(e.permission),
2460
+ displayName: e.recipient.displayName ?? ""
2461
+ }), Pr = (e) => ({
2462
+ recipientId: e.recipientId,
2463
+ recipientType: e.recipientType,
2464
+ permission: fi(e.permission)
2465
+ }), hi = (e) => ({
2466
+ recipientId: e.recipientId,
2467
+ recipientType: e.recipientType
2468
+ }), mi = (e, t) => ({
2469
+ deleteSharings: e.map(hi),
2470
+ newSharings: t.map(Pr)
2471
+ }), wn = (e) => `${e.recipientType}:${e.recipientId}`, Bl = (e, t) => {
2472
+ const n = new Map(
2473
+ e.map((i) => [wn(i), i])
2474
+ ), r = new Map(
2475
+ t.map((i) => [wn(i), i])
2476
+ ), s = [], o = [];
2477
+ return n.forEach((i, l) => {
2478
+ const c = r.get(l);
2479
+ if (!c) {
2480
+ s.push(i);
2481
+ return;
2482
+ }
2483
+ JSON.stringify(i.permission) !== JSON.stringify(c.permission) && (s.push(i), o.push(c));
2484
+ }), r.forEach((i, l) => {
2485
+ n.has(l) || o.push(i);
2486
+ }), mi(s, o);
2487
+ }, pi = async (e, t) => {
2488
+ if (e.filter(
2489
+ (o) => o.recipientType === "group" && !o.displayName
2490
+ ).length === 0)
2491
+ return e;
2492
+ const r = await t(""), s = new Map(
2493
+ r.map((o) => [o.id, o.displayName])
2494
+ );
2495
+ return e.map((o) => {
2496
+ if (o.recipientType !== "group" || o.displayName)
2497
+ return o;
2498
+ const i = s.get(o.recipientId);
2499
+ return i !== void 0 ? { ...o, displayName: i } : { ...o, notVisible: !0 };
2500
+ });
2501
+ };
2502
+ var Y = /* @__PURE__ */ ((e) => (e.USER = "User", e.GROUP = "Group", e.BROADCAST_GROUP = "BroadcastGroup", e.SHAREBOOKMARK = "ShareBookmark", e))(Y || {});
2503
+ const yi = () => ({
2504
+ async searchVisibles(e, t) {
2505
+ return (await ve.http().get(
2506
+ "/communication/visible/search",
2507
+ e !== void 0 ? {
2508
+ queryParams: {
2509
+ query: e,
2510
+ mode: "excludeFamily",
2511
+ ...t && { includeHidden: "true" }
2512
+ }
2513
+ } : void 0
2514
+ )).filter(
2515
+ (r) => r.type !== "BroadcastGroup"
2516
+ /* BROADCAST_GROUP */
2517
+ );
2518
+ },
2519
+ fetchUsersByGroup(e) {
2520
+ return ve.http().get(`/communication/visible/group/${e}`);
2521
+ },
2522
+ fetchSharebookmark(e) {
2523
+ return ve.http().get(`/directory/sharebookmark/${e}`);
2524
+ }
2525
+ }), Vt = yi(), Ce = {
2526
+ base: ["user"],
2527
+ /**
2528
+ * Get a filtered list of visible users. Filtering is done by the *backend*.
2529
+ * @param search The search string to filter the users
2530
+ * @returns The query options for the search visible users
2531
+ */
2532
+ searchVisibles(e, t) {
2533
+ return Mt({
2534
+ queryKey: [
2535
+ ...Ce.base,
2536
+ "search",
2537
+ e ? { search: e } : void 0,
2538
+ t ? { includeHidden: t } : void 0
2539
+ ],
2540
+ queryFn: () => Vt.searchVisibles(e, t),
2541
+ staleTime: 1 / 0
2542
+ // This data will never change during user's session.
2543
+ });
2544
+ },
2545
+ /**
2546
+ * Get users belonging to a specific group
2547
+ * @param groupId The ID of the group to fetch users from
2548
+ * @returns The query options for fetching users by group
2549
+ */
2550
+ fetchUsersByGroup(e) {
2551
+ return Mt({
2552
+ queryKey: [...Ce.base, "group", e],
2553
+ queryFn: () => Vt.fetchUsersByGroup(e),
2554
+ staleTime: 5 * 60 * 1e3,
2555
+ // 5 minutes - group membership changes less frequently
2556
+ enabled: !!e
2557
+ });
2558
+ },
2559
+ fetchSharebookmark(e) {
2560
+ return Mt({
2561
+ queryKey: [
2562
+ ...Ce.base,
2563
+ "sharebookmark",
2564
+ e
2565
+ ],
2566
+ queryFn: () => Vt.fetchSharebookmark(e),
2567
+ staleTime: 5 * 60 * 1e3,
2568
+ // 5 minutes - share bookmarks change less frequently
2569
+ enabled: !!e
2570
+ });
2571
+ }
2572
+ };
2573
+ function gi(e, t, n) {
2574
+ if (e && (!n || n.length < 3))
2575
+ return { triggerSearch: !1 };
2576
+ const s = t === "all-at-once" ? n.substring(0, 3) : void 0, o = n.length > 3;
2577
+ function i() {
2578
+ const l = ve.idiom().removeAccents, c = l(n).toLowerCase();
2579
+ return o ? (a) => {
2580
+ let d = "", u = "";
2581
+ const m = a.displayName ?? void 0;
2582
+ if (m) {
2583
+ d = l(m).toLowerCase();
2584
+ const h = d.split(" ");
2585
+ u = h.length > 1 ? h[1] + " " + h[0] : d;
2586
+ }
2587
+ return d.indexOf(c) !== -1 || u.indexOf(c) !== -1;
2588
+ } : void 0;
2589
+ }
2590
+ return {
2591
+ triggerSearch: !0,
2592
+ backendFilter: s,
2593
+ frontendFilter: i()
2594
+ };
2595
+ }
2596
+ const Mr = (e) => {
2597
+ const t = H(), n = "all-at-once", { isAdmlcOrAdmc: r } = Ln();
2598
+ return { searchVisible: async (o) => {
2599
+ const { triggerSearch: i, backendFilter: l, frontendFilter: c } = gi(
2600
+ r,
2601
+ n,
2602
+ o
2603
+ );
2604
+ if (!i) return Promise.resolve([]);
2605
+ const a = await t.ensureQueryData(
2606
+ Ce.searchVisibles(l, e == null ? void 0 : e.includeHidden)
2607
+ );
2608
+ return c ? a.filter(c) : a;
2609
+ } };
2610
+ }, bi = tn(
2611
+ (e) => ({
2612
+ usersCollection: [],
2613
+ usersToAdd: [],
2614
+ usersToDelete: [],
2615
+ setUsersCollection: (t) => e({ usersCollection: t }),
2616
+ addUsersToAdd: (t) => e((n) => {
2617
+ const r = new Set(t.map((s) => s.recipientId));
2618
+ return {
2619
+ usersToAdd: [
2620
+ ...n.usersToAdd.filter((s) => !r.has(s.recipientId)),
2621
+ ...t
2622
+ ],
2623
+ usersToDelete: n.usersToDelete.filter(
2624
+ (s) => !r.has(s.recipientId)
2625
+ )
2626
+ };
2627
+ }),
2628
+ addUsersToDelete: (t) => e((n) => {
2629
+ const r = new Set(t.map((s) => s.recipientId));
2630
+ return {
2631
+ usersToDelete: [
2632
+ ...n.usersToDelete.filter(
2633
+ (s) => !r.has(s.recipientId)
2634
+ ),
2635
+ ...t
2636
+ ],
2637
+ usersToAdd: n.usersToAdd.filter(
2638
+ (s) => !r.has(s.recipientId)
2639
+ )
2640
+ };
2641
+ }),
2642
+ resetUsersDiff: () => e({ usersToAdd: [], usersToDelete: [] })
2643
+ })
2644
+ ), pe = sn(
2645
+ bi
2646
+ ), vi = {
2647
+ searchInputValue: "",
2648
+ searchResults: [],
2649
+ searchAPIResults: [],
2650
+ isSearching: !1,
2651
+ isAddingMembers: !1
2652
+ };
2653
+ function Si(e, t) {
2654
+ switch (t.type) {
2655
+ case "onChange":
2656
+ return { ...e, searchInputValue: t.payload };
2657
+ case "isSearching":
2658
+ return { ...e, isSearching: t.payload };
2659
+ case "isAddingMembers":
2660
+ return { ...e, isAddingMembers: t.payload };
2661
+ case "addResult":
2662
+ return { ...e, searchResults: t.payload };
2663
+ case "addApiResult":
2664
+ return { ...e, searchAPIResults: t.payload };
2665
+ case "emptyResult":
2666
+ return { ...e, searchResults: t.payload };
2667
+ default:
2668
+ throw new Error("Unhandled action type");
2669
+ }
2670
+ }
2671
+ const Ci = () => {
2672
+ var k, D;
2673
+ const [e, t] = ys(Si, vi), { usersCollection: n } = pe(), r = kn(), s = Yr(
2674
+ e.searchInputValue,
2675
+ 500
2676
+ ), { searchVisible: o } = Mr({ includeHidden: !0 }), { isAdmlcOrAdmc: i } = Ln(), l = H(), c = (g) => {
2677
+ switch (g.type) {
2678
+ case Y.USER:
2679
+ return null;
2680
+ case Y.GROUP:
2681
+ case Y.BROADCAST_GROUP:
2682
+ return /* @__PURE__ */ f(ls, {});
2683
+ case Y.SHAREBOOKMARK:
2684
+ return /* @__PURE__ */ f(is, {});
2685
+ default:
2686
+ return null;
2687
+ }
2688
+ };
2689
+ Q(() => {
2690
+ F(s);
2691
+ }, [s]);
2692
+ const a = (g) => g.filter(
2693
+ (O) => {
2694
+ var A;
2695
+ return !n.some((E) => E.recipientId === O.id) && O.id !== ((A = r == null ? void 0 : r.user) == null ? void 0 : A.userId);
2696
+ }
2697
+ ), d = (g) => g.map((O) => ({
2698
+ value: O.id,
2699
+ label: O.displayName,
2700
+ icon: c(O)
2701
+ })), u = (g) => d(a(g)), m = (g, O) => ({
2702
+ displayName: g.displayName,
2703
+ permission: ["contrib"],
2704
+ recipientId: g.id,
2705
+ recipientType: O
2706
+ }), h = (g) => g.map((O) => ({
2707
+ id: O.id,
2708
+ displayName: O.name
2709
+ })), y = (g, O) => ({
2710
+ name: g.name,
2711
+ id: g.id,
2712
+ groups: h(g.groups),
2713
+ users: O
2714
+ });
2715
+ Q(() => {
2716
+ t({
2717
+ type: "addResult",
2718
+ payload: u(e.searchAPIResults)
2719
+ });
2720
+ }, [e.searchAPIResults, n, (k = r == null ? void 0 : r.user) == null ? void 0 : k.userId]);
2721
+ const p = (g) => {
2722
+ t({
2723
+ type: "addApiResult",
2724
+ payload: g
2725
+ }), t({
2726
+ type: "addResult",
2727
+ payload: u(g)
2728
+ });
2729
+ }, S = async (g) => {
2730
+ var E, M;
2731
+ t({ type: "isAddingMembers", payload: !0 });
2732
+ const O = g[0];
2733
+ if (!O)
2734
+ return t({ type: "isAddingMembers", payload: !1 }), [];
2735
+ const A = e.searchAPIResults.find(
2736
+ (P) => P.id === O
2737
+ );
2738
+ if (!A)
2739
+ return t({ type: "isAddingMembers", payload: !1 }), [];
2740
+ try {
2741
+ if (A.type === Y.USER)
2742
+ return [m(A, "user")];
2743
+ if (A.type === Y.GROUP || A.type === Y.BROADCAST_GROUP)
2744
+ return [m(A, "group")];
2745
+ if (A.type === Y.SHAREBOOKMARK) {
2746
+ const P = await l.fetchQuery(
2747
+ Ce.fetchSharebookmark(A.id)
2748
+ );
2749
+ let ee = [];
2750
+ if (((E = P == null ? void 0 : P.users) == null ? void 0 : E.length) > 0 && (ee = [
2751
+ y(P, P.users)
2752
+ ]), ((M = P == null ? void 0 : P.groups) == null ? void 0 : M.length) > 0) {
2753
+ const xt = P.groups.map(
2754
+ (Rt) => l.fetchQuery(
2755
+ Ce.fetchUsersByGroup(Rt.id)
2756
+ )
2757
+ ), zr = await Promise.all(
2758
+ xt
2759
+ );
2760
+ ee = [
2761
+ y(
2762
+ P,
2763
+ zr.flatMap(
2764
+ (Rt) => Rt.map((on) => ({
2765
+ id: on.id,
2766
+ displayName: on.displayName
2767
+ }))
2768
+ )
2769
+ )
2770
+ ];
2771
+ }
2772
+ return ee;
2773
+ }
2774
+ return [];
2775
+ } finally {
2776
+ t({ type: "isAddingMembers", payload: !1 });
2777
+ }
2778
+ }, L = (g) => {
2779
+ const O = g.target.value;
2780
+ t({
2781
+ type: "onChange",
2782
+ payload: O
2783
+ }), t({
2784
+ type: "addResult",
2785
+ payload: u(e.searchAPIResults)
2786
+ });
2787
+ }, C = i ? 3 : 1, F = async (g, O = !1) => {
2788
+ if (t({
2789
+ type: "isSearching",
2790
+ payload: !0
2791
+ }), g.length >= C || O) {
2792
+ const E = g.length >= C || O && g.length > 0 ? await o(g) : [];
2793
+ p(E);
2794
+ } else
2795
+ t({
2796
+ type: "emptyResult",
2797
+ payload: []
2798
+ });
2799
+ t({
2800
+ type: "isSearching",
2801
+ payload: !1
2802
+ });
2803
+ }, w = !e.isSearching && s.length >= C && ((D = e.searchResults) == null ? void 0 : D.length) === 0;
2804
+ return {
2805
+ state: e,
2806
+ searchMinLength: C,
2807
+ isSearchLoading: e.isSearching,
2808
+ isAddingMembers: e.isAddingMembers,
2809
+ hasSearchNoResults: w,
2810
+ handleSearchInputChange: L,
2811
+ handleSearchSubmit: S
2812
+ };
2813
+ }, wi = ({
2814
+ handleSearchSubmit: e,
2815
+ initialSharings: t,
2816
+ onSharingsChange: n
2817
+ }) => {
2818
+ const r = pe.use.usersCollection(), s = pe.use.setUsersCollection(), o = pe.use.addUsersToAdd(), i = pe.use.addUsersToDelete(), l = pe.use.resetUsersDiff(), c = re(null), a = (h) => {
2819
+ if (h.length === 0) return;
2820
+ const y = [...r, ...h].filter(
2821
+ (p, S, L) => L.findIndex((C) => C.recipientId === p.recipientId) === S
2822
+ );
2823
+ s(y), o(h), n == null || n(y);
2824
+ }, d = (h) => {
2825
+ if (h.length === 0) return;
2826
+ const y = new Set(h.map((S) => S.recipientId)), p = r.filter(
2827
+ (S) => !y.has(S.recipientId)
2828
+ );
2829
+ s(p), i(h), n == null || n(p);
2830
+ }, u = (h) => {
2831
+ h.length !== 0 && (s(h), n == null || n(h));
2832
+ }, m = async (h) => {
2833
+ (await e(h)).forEach((p) => {
2834
+ var S;
2835
+ (S = c.current) == null || S.addItem(p);
2836
+ });
2837
+ };
2838
+ return Q(() => {
2839
+ s(t ?? []);
2840
+ }, [t, s]), Q(() => () => {
2841
+ l();
2842
+ }, [l]), {
2843
+ handleAddItems: a,
2844
+ handleDeleteItems: d,
2845
+ handleUpdateItems: u,
2846
+ handleSearchResultsChange: m,
2847
+ setUsersCollection: s,
2848
+ addUsersToAdd: o,
2849
+ addUsersToDelete: i,
2850
+ userRightsListRef: c
2851
+ };
2852
+ };
2853
+ function Ii({
2854
+ wizardData: e,
2855
+ updateWizardData: t,
2856
+ collection: n,
2857
+ onSharingsChange: r
2858
+ }) {
2859
+ var M;
2860
+ const { appCode: s } = ue(), { t: o } = fe(s), { currentStep: i } = rn(), l = i < 0 ? 0 : i, c = kn(), { searchVisible: a } = Mr({ includeHidden: !0 }), [d, u] = ae([]), m = Tt(() => {
2861
+ var P, ee;
2862
+ return (P = e == null ? void 0 : e.sharings) != null && P.length ? e.sharings : (ee = n == null ? void 0 : n.sharings) != null && ee.length ? n.sharings.map(di) : [];
2863
+ }, [n == null ? void 0 : n.sharings, e == null ? void 0 : e.sharings]);
2864
+ Q(() => {
2865
+ (async () => {
2866
+ const ee = await pi(
2867
+ m,
2868
+ a
2869
+ );
2870
+ u(ee.filter((xt) => !xt.notVisible));
2871
+ })();
2872
+ }, []);
2873
+ const {
2874
+ state: { searchResults: h, searchInputValue: y },
2875
+ isSearchLoading: p,
2876
+ isAddingMembers: S,
2877
+ hasSearchNoResults: L,
2878
+ searchMinLength: C,
2879
+ handleSearchInputChange: F,
2880
+ handleSearchSubmit: w
2881
+ } = Ci(), {
2882
+ handleAddItems: k,
2883
+ handleDeleteItems: D,
2884
+ handleUpdateItems: g,
2885
+ handleSearchResultsChange: O,
2886
+ userRightsListRef: A
2887
+ } = wi({
2888
+ handleSearchSubmit: w,
2889
+ initialSharings: d,
2890
+ onSharingsChange: (P) => {
2891
+ t == null || t({ sharings: P }), r == null || r(P);
2892
+ }
2893
+ }), E = S ? [
2894
+ {
2895
+ value: "loading",
2896
+ label: o("community.search.addingMembers"),
2897
+ disabled: !0
2898
+ }
2899
+ ] : h ?? [];
2900
+ return /* @__PURE__ */ _(G, { className: "gap-24", children: [
2901
+ /* @__PURE__ */ _(G.Col, { sm: "4", md: "8", lg: "3", xl: "5", children: [
2902
+ /* @__PURE__ */ _(ht, { gap: "16", direction: "column", children: [
2903
+ /* @__PURE__ */ f(Rr, { title: o("collection.wizard.members.title") }),
2904
+ /* @__PURE__ */ f("div", { className: "mb-24", children: /* @__PURE__ */ f(xn, { currentStep: l, nbSteps: 2 }) })
2905
+ ] }),
2906
+ /* @__PURE__ */ f(
2907
+ Zr,
2908
+ {
2909
+ "data-testid": "collect-create-add-user-input-search",
2910
+ value: y,
2911
+ placeholder: o("collection.user.search.placeholder"),
2912
+ isLoading: p,
2913
+ noResult: L,
2914
+ options: E,
2915
+ searchMinLength: C,
2916
+ onSearchInputChange: F,
2917
+ onSearchResultsChange: O
2918
+ }
2919
+ ),
2920
+ /* @__PURE__ */ f(Jr, { type: "info", className: "mt-24", children: /* @__PURE__ */ f(
2921
+ fs,
2922
+ {
2923
+ t: o,
2924
+ i18nKey: "collection.wizard.members.alert.message",
2925
+ components: {
2926
+ strong: /* @__PURE__ */ f("strong", {})
2927
+ }
2928
+ }
2929
+ ) })
2930
+ ] }),
2931
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "8", lg: "5", xl: "7", children: /* @__PURE__ */ f(
2932
+ es,
2933
+ {
2934
+ "data-testid": "collect-create-add-user-table",
2935
+ ref: A,
2936
+ initialSharings: d,
2937
+ isCreating: !!e,
2938
+ isLoading: !1,
2939
+ isReadOnly: !1,
2940
+ onAddItems: k,
2941
+ onChange: g,
2942
+ onDeleteItems: D,
2943
+ ownerId: ((M = c.user) == null ? void 0 : M.userId) ?? "",
2944
+ resourceRights: {
2945
+ contrib: {
2946
+ default: !0,
2947
+ excludes: ["manager"],
2948
+ priority: 2,
2949
+ requires: ["contrib"],
2950
+ displayName: o("collection.members.right.displayName.recipient")
2951
+ },
2952
+ manager: {
2953
+ default: !1,
2954
+ excludes: ["contrib"],
2955
+ priority: 4,
2956
+ requires: ["manager"],
2957
+ displayName: o("collection.members.right.displayName.manager")
2958
+ }
2959
+ }
2960
+ },
2961
+ `sharing-${d.length}`
2962
+ ) })
2963
+ ] });
2964
+ }
2965
+ const Lr = It(null), Ai = () => {
2966
+ const e = At(Lr);
2967
+ if (!e)
2968
+ throw new Error("Cannot be rendered outside the Wizard Layout");
2969
+ return e;
2970
+ }, kr = "/collect/api", j = new Wr({
2971
+ httpService: ve.http(),
2972
+ baseUrl: kr
2973
+ }), $ = {
2974
+ getCollections: (e) => j.getCollections(e),
2975
+ getCollectionsToSubmit: (e) => j.getCollectionsToSubmit(e),
2976
+ getCollection: (e) => j.getCollection(e),
2977
+ createCollection: (e) => j.createCollection(e),
2978
+ updateCollection: (e, t) => j.updateCollection(e, t),
2979
+ deleteCollection: (e) => j.deleteCollection(e),
2980
+ updateSharingCollection: (e, t) => j.updateCollectionSharings(e, t),
2981
+ getCollectionsToSubmitByIds: (e, t) => j.getCollectionsToSubmit({ ids: e, ...t }),
2982
+ getCollectionsCount: (e) => j.getCollectionsCount(e ?? {}),
2983
+ getCollectionsToSubmitCount: (e) => j.getCollectionsToSubmitCount(e ?? {}),
2984
+ addAttachments: async (e, t) => {
2985
+ const n = new FormData();
2986
+ return t.files.forEach((r) => {
2987
+ n.append("files", r);
2988
+ }), ve.http().postFile(`${kr}/collections/${e}/attachments`, n, {
2989
+ headers: { "Content-Type": "multipart/form-data" }
2990
+ });
2991
+ },
2992
+ deleteAttachment: (e, t) => j.removeAttachments(e, t)
2993
+ }, We = {
2994
+ base: ["collections"],
2995
+ baseToSubmit: ["collectionsToSubmit"]
2996
+ }, _r = (e) => ({
2997
+ queryKey: [...We.base, "collections", e],
2998
+ queryFn: ({ pageParam: t = 1 }) => $.getCollections({
2999
+ ...e,
3000
+ size: ri,
3001
+ page: t
3002
+ }),
3003
+ staleTime: 5e3,
3004
+ initialPageParam: 1,
3005
+ refetchOnMount: !0,
3006
+ getNextPageParam: (t) => {
3007
+ const { currentPage: n, totalPages: r } = t.meta || {};
3008
+ return n < r ? n + 1 : void 0;
3009
+ }
3010
+ }), Ti = (e) => Gn(_r(e)), Fr = (e) => ({
3011
+ queryKey: [...We.base, "collectionsToSubmit", e],
3012
+ queryFn: ({ pageParam: t = 1 }) => $.getCollectionsToSubmit({
3013
+ ...e,
3014
+ size: si,
3015
+ page: t
3016
+ }),
3017
+ staleTime: 5e3,
3018
+ initialPageParam: 1,
3019
+ refetchOnMount: !0,
3020
+ getNextPageParam: (t) => {
3021
+ const { currentPage: n, totalPages: r } = t.meta || {};
3022
+ return n < r ? n + 1 : void 0;
3023
+ }
3024
+ }), Oi = (e) => Gn(Fr(e)), Ur = (e) => ({
3025
+ queryKey: ["collection", e],
3026
+ queryFn: () => $.getCollection(e)
3027
+ }), Ei = (e) => it({
3028
+ ...Ur(e),
3029
+ enabled: !!e
3030
+ }), Br = (e, t = {}) => ({
3031
+ queryKey: ["collections", e, t],
3032
+ queryFn: () => $.getCollections({ ids: e, ...t }),
3033
+ enabled: e.length > 0
3034
+ }), Ni = (e, t) => it({
3035
+ ...Br(e, t)
3036
+ }), Vr = (e, t = {}) => ({
3037
+ queryKey: ["collectionsToSubmit", e, t],
3038
+ queryFn: () => $.getCollectionsToSubmitByIds(e, t),
3039
+ enabled: e.length > 0
3040
+ }), xi = (e, t) => it({
3041
+ ...Vr(e, t)
3042
+ }), qr = () => {
3043
+ const e = H();
3044
+ return de({
3045
+ mutationFn: (t) => $.createCollection(t),
3046
+ onSuccess: () => {
3047
+ e.invalidateQueries({
3048
+ queryKey: We.base
3049
+ }), e.invalidateQueries({
3050
+ queryKey: We.baseToSubmit
3051
+ });
3052
+ }
3053
+ });
3054
+ }, Ri = () => {
3055
+ const e = H();
3056
+ return de({
3057
+ mutationFn: ({ id: t, data: n }) => $.updateCollection(t, n),
3058
+ onSuccess: (t, n) => {
3059
+ e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({ queryKey: ["collection", n.id] });
3060
+ }
3061
+ });
3062
+ }, Pi = () => {
3063
+ const e = H();
3064
+ return de({
3065
+ mutationFn: (t) => $.deleteCollection(t),
3066
+ onSuccess: () => {
3067
+ e.invalidateQueries({ queryKey: ["collections"] });
3068
+ }
3069
+ });
3070
+ }, Mi = () => {
3071
+ const e = H();
3072
+ return de({
3073
+ mutationFn: ({
3074
+ id: t,
3075
+ data: n
3076
+ }) => $.updateSharingCollection(t, n),
3077
+ onSuccess: (t, n) => {
3078
+ e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({ queryKey: ["collection", n.id] });
3079
+ }
3080
+ });
3081
+ }, $r = (e = {}) => {
3082
+ var t;
3083
+ return {
3084
+ queryKey: ["collections", "count", e],
3085
+ queryFn: () => $.getCollectionsCount(e),
3086
+ enabled: (((t = e.ids) == null ? void 0 : t.length) ?? 0) > 0
3087
+ };
3088
+ }, Li = (e) => it({
3089
+ ...$r(e)
3090
+ }), Kr = (e = {}) => {
3091
+ var t;
3092
+ return {
3093
+ queryKey: ["collectionsToSubmit", "count", e],
3094
+ queryFn: () => $.getCollectionsToSubmitCount(e),
3095
+ enabled: (((t = e.ids) == null ? void 0 : t.length) ?? 0) > 0
3096
+ };
3097
+ }, ki = (e) => it({
3098
+ ...Kr(e)
3099
+ }), Gr = () => {
3100
+ const e = H();
3101
+ return de({
3102
+ mutationFn: ({
3103
+ id: t,
3104
+ files: n
3105
+ }) => $.addAttachments(t, n),
3106
+ onSuccess: (t, n) => {
3107
+ e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({ queryKey: ["collection", n.id] });
3108
+ }
3109
+ });
3110
+ }, _i = () => {
3111
+ const e = H();
3112
+ return de({
3113
+ mutationFn: ({
3114
+ collectionId: t,
3115
+ attachmentId: n
3116
+ }) => $.deleteAttachment(t, n),
3117
+ onSuccess: (t, n) => {
3118
+ e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({
3119
+ queryKey: ["collection", n.collectionId]
3120
+ });
3121
+ }
3122
+ });
3123
+ }, In = ({
3124
+ children: e
3125
+ }) => {
3126
+ const t = re(null), { appCode: n } = ue(), { t: r } = fe(n), s = ts(), { currentStep: o, backStep: i, nextStep: l } = rn(), { wizardData: c, resetWizardData: a } = Ai(), d = qr(), u = Gr(), m = xr.use.isFormValid(), h = Be(), [y, p] = ae(!1);
3127
+ gs(() => {
3128
+ var C;
3129
+ (C = t.current) == null || C.scrollIntoView({
3130
+ behavior: "smooth",
3131
+ block: "center"
3132
+ });
3133
+ }, [o]);
3134
+ const S = () => {
3135
+ a == null || a(), h("/");
3136
+ }, L = async () => {
3137
+ try {
3138
+ p(!0);
3139
+ const C = await d.mutateAsync({
3140
+ name: c.title,
3141
+ content: c.description,
3142
+ deadline: c.deadline ?? /* @__PURE__ */ new Date(),
3143
+ // FIXME: faire une vraie traduction dans le format attendu par le backend avant envoi
3144
+ sharings: c.sharings.map(Pr)
3145
+ });
3146
+ c.attachments.length > 0 && await u.mutateAsync({
3147
+ id: C.id,
3148
+ files: {
3149
+ files: c.attachments.map((F) => F.file)
3150
+ }
3151
+ }), s.success(r("collection.toast.success.collection.create"), {
3152
+ duration: 1e4,
3153
+ isDismissible: !0
3154
+ }), h(`/list-collections/id/${C.id}`), a();
3155
+ } catch (C) {
3156
+ s.error(r("collection.toast.error.collection.create"), {
3157
+ duration: 1e4,
3158
+ isDismissible: !0
3159
+ }), console.log(C);
3160
+ } finally {
3161
+ p(!1);
3162
+ }
3163
+ };
3164
+ return /* @__PURE__ */ _("div", { className: "w-100 p-24 px-md-8 px-lg-64", children: [
3165
+ /* @__PURE__ */ f(
3166
+ ht,
3167
+ {
3168
+ ref: t,
3169
+ direction: "column",
3170
+ gap: "16",
3171
+ className: "py-24 pb-lg-48 pt-lg-32",
3172
+ children: e
3173
+ }
3174
+ ),
3175
+ o === 1 ? /* @__PURE__ */ _(ht, { justify: "end", className: "mt-auto pb-64 px-16 gap-16", children: [
3176
+ /* @__PURE__ */ f(
3177
+ te,
3178
+ {
3179
+ "data-testid": "collect-add-attachments-button-previous",
3180
+ variant: "ghost",
3181
+ color: "tertiary",
3182
+ leftIcon: /* @__PURE__ */ f(cs, {}),
3183
+ onClick: i,
3184
+ children: r("collection.previous")
3185
+ }
3186
+ ),
3187
+ /* @__PURE__ */ f(
3188
+ te,
3189
+ {
3190
+ "data-testid": "collect-add-attachments-button-create-ignore-share",
3191
+ variant: "outline",
3192
+ color: "primary",
3193
+ isLoading: y,
3194
+ loadingPosition: "right",
3195
+ onClick: () => L(),
3196
+ children: r("collection.wizard.button.create.ignore.share")
3197
+ }
3198
+ ),
3199
+ /* @__PURE__ */ f(
3200
+ te,
3201
+ {
3202
+ "data-testid": "collect-add-attachments-button-create-collect",
3203
+ variant: "filled",
3204
+ color: "primary",
3205
+ isLoading: y,
3206
+ loadingPosition: "right",
3207
+ rightIcon: /* @__PURE__ */ f(an, {}),
3208
+ onClick: () => L(),
3209
+ children: r("collection.wizard.button.create.collect")
3210
+ }
3211
+ )
3212
+ ] }) : /* @__PURE__ */ _(ht, { justify: "end", className: "mt-auto pb-64 px-16 gap-16", children: [
3213
+ /* @__PURE__ */ f(
3214
+ te,
3215
+ {
3216
+ "data-testid": "collect-add-attachments-button-cancel",
3217
+ variant: "ghost",
3218
+ color: "tertiary",
3219
+ onClick: S,
3220
+ children: r("collection.cancel")
3221
+ }
3222
+ ),
3223
+ /* @__PURE__ */ f(
3224
+ te,
3225
+ {
3226
+ "data-testid": "collect-add-attachments-button-next",
3227
+ variant: "filled",
3228
+ color: "primary",
3229
+ rightIcon: /* @__PURE__ */ f(an, {}),
3230
+ onClick: l,
3231
+ type: "submit",
3232
+ form: "formCreateCollection",
3233
+ disabled: !m,
3234
+ children: r("collection.next")
3235
+ }
3236
+ )
3237
+ ] })
3238
+ ] });
3239
+ };
3240
+ function Fi() {
3241
+ const { wizardData: e, updateWizardData: t, resetWizardData: n } = oi(), r = Tt(
3242
+ () => ({
3243
+ wizardData: e,
3244
+ updateWizardData: t,
3245
+ resetWizardData: n
3246
+ }),
3247
+ [e, t, n]
3248
+ );
3249
+ return /* @__PURE__ */ f(Lr.Provider, { value: r, children: /* @__PURE__ */ _(ds, { children: [
3250
+ /* @__PURE__ */ f(
3251
+ un,
3252
+ {
3253
+ path: ge[0],
3254
+ element: /* @__PURE__ */ f(In, { children: /* @__PURE__ */ f(
3255
+ ai,
3256
+ {
3257
+ wizardData: e,
3258
+ updateWizardData: t
3259
+ }
3260
+ ) })
3261
+ }
3262
+ ),
3263
+ /* @__PURE__ */ f(
3264
+ un,
3265
+ {
3266
+ path: ge[1],
3267
+ element: /* @__PURE__ */ f(In, { children: /* @__PURE__ */ f(
3268
+ Ii,
3269
+ {
3270
+ wizardData: e,
3271
+ updateWizardData: t
3272
+ }
3273
+ ) })
3274
+ }
3275
+ )
3276
+ ] }) });
3277
+ }
3278
+ function Ui() {
3279
+ return /* @__PURE__ */ f(Fi, {});
3280
+ }
3281
+ const Qr = (e, t) => {
3282
+ const { header: n = !0 } = t ?? {}, r = async () => ({ header: n });
3283
+ return [
3284
+ {
3285
+ path: "/",
3286
+ loader: r,
3287
+ async lazy() {
3288
+ const { loader: s, Root: o } = await import("./Root-B_xgOphI.js");
3289
+ return {
3290
+ loader: async () => {
3291
+ const i = await r(), l = await s() ?? {};
3292
+ return { ...i, ...l };
3293
+ },
3294
+ Component: o
3295
+ };
3296
+ },
3297
+ children: [
3298
+ {
3299
+ async lazy() {
3300
+ const { loader: s, Component: o } = await import("./CollectionsLayout-B66EiXm4.js");
3301
+ return { loader: s, Component: o };
3302
+ },
3303
+ children: [
3304
+ {
3305
+ index: !0,
3306
+ async lazy() {
3307
+ const { loader: s, CollectionsList: o } = await import("./CollectionsList-BRBbyb-s.js");
3308
+ return {
3309
+ loader: () => s(e),
3310
+ Component: o
3311
+ };
3312
+ }
3313
+ },
3314
+ {
3315
+ path: "list-collections",
3316
+ async lazy() {
3317
+ const { loader: s, CollectionsList: o } = await import("./CollectionsList-BRBbyb-s.js");
3318
+ return {
3319
+ loader: () => s(e),
3320
+ Component: o
3321
+ };
3322
+ }
3323
+ },
3324
+ {
3325
+ path: "list-submissions",
3326
+ async lazy() {
3327
+ const { loader: s, SubmissionsList: o } = await import("./SubmissionList-ZKL__RHu.js");
3328
+ return {
3329
+ loader: () => s(e),
3330
+ Component: o
3331
+ };
3332
+ }
3333
+ }
3334
+ ]
3335
+ },
3336
+ {
3337
+ path: "create/*",
3338
+ element: /* @__PURE__ */ f(Ui, {})
3339
+ },
3340
+ {
3341
+ path: "list-collections/id/:collectionId",
3342
+ async lazy() {
3343
+ const { loader: s, Collection: o } = await import("./Collection-C6ys5-Bv.js");
3344
+ return { loader: () => s(e), Component: o };
3345
+ }
3346
+ },
3347
+ {
3348
+ path: "list-collections/id/:collectionId/submission/mine",
3349
+ async lazy() {
3350
+ const { MineSubmission: s } = await import("./MineSubmission-DfAVKzBY.js");
3351
+ return { Component: s };
3352
+ }
3353
+ },
3354
+ {
3355
+ path: "list-collections/id/:collectionId/submission/:submissionId",
3356
+ async lazy() {
3357
+ const { loader: s, Submission: o } = await import("./Submission-pY2ZvgER.js");
3358
+ return { loader: () => s(e), Component: o };
3359
+ }
3360
+ },
3361
+ {
3362
+ path: "id/:collectionId/members",
3363
+ async lazy() {
3364
+ const { loader: s, MembersEdit: o } = await import("./MembersEdit-WFk8DkwB.js");
3365
+ return {
3366
+ loader: () => s(e),
3367
+ Component: o
3368
+ };
3369
+ }
3370
+ },
3371
+ {
3372
+ path: "id/:collectionId/form",
3373
+ async lazy() {
3374
+ const { loader: s, FormEdit: o } = await import("./FormEdit-Di-Y4r45.js");
3375
+ return { loader: () => s(e), Component: o };
3376
+ }
3377
+ }
3378
+ ],
3379
+ errorElement: /* @__PURE__ */ f(ti, {})
3380
+ },
3381
+ { path: "*", element: /* @__PURE__ */ f(ni, {}) }
3382
+ ];
3383
+ }, Bi = "./", Vl = (e, t) => hs(Qr(e, t), {
3384
+ basename: Bi
3385
+ }), jr = It({
3386
+ header: !0,
3387
+ showMenu: !0
3388
+ });
3389
+ function Vi({
3390
+ header: e = !0,
3391
+ showMenu: t = !0,
3392
+ children: n
3393
+ }) {
3394
+ return /* @__PURE__ */ f(jr.Provider, { value: { header: e, showMenu: t }, children: n });
3395
+ }
3396
+ const ql = () => At(jr), qi = "collect:route-change", $l = ({
3397
+ header: e,
3398
+ showMenu: t,
3399
+ currentPath: n,
3400
+ className: r
3401
+ }) => {
3402
+ const s = re(null), o = re(null), i = re(null), l = re(process.env.NODE_ENV === "development"), c = (u) => u ? u.startsWith("/") ? u : `/${u}` : "/", a = (u) => {
3403
+ window.dispatchEvent(
3404
+ new CustomEvent(qi, {
3405
+ detail: { path: u }
3406
+ })
3407
+ );
3408
+ }, d = (u, m = "collect") => u.map((h, y) => {
3409
+ const p = h.id ?? `${m}-${h.path ?? "root"}-${y}`, S = {
3410
+ ...h,
3411
+ id: p
3412
+ };
3413
+ return h.children && (S.children = d(h.children, p)), S;
3414
+ });
3415
+ return Q(() => {
3416
+ if (!s.current)
3417
+ return;
3418
+ o.current || (o.current = Cs(s.current)), i.current || (i.current = ms(
3419
+ d(Qr(Jt, { header: e })),
3420
+ { initialEntries: [c(n)] }
3421
+ )), a(i.current.state.location.pathname);
3422
+ const u = i.current.subscribe((m) => {
3423
+ a(m.location.pathname);
3424
+ });
3425
+ return o.current.render(
3426
+ /* @__PURE__ */ _(Kn, { client: Jt, children: [
3427
+ /* @__PURE__ */ f(Nn, { params: { app: "collect" }, children: /* @__PURE__ */ f(ns, { children: /* @__PURE__ */ f(Vi, { header: e, showMenu: t, children: /* @__PURE__ */ f(bs, { fallback: /* @__PURE__ */ f(rs, {}), children: /* @__PURE__ */ f(ps, { router: i.current }) }) }) }) }),
3428
+ /* @__PURE__ */ f(Nr, { initialIsOpen: !1 })
3429
+ ] })
3430
+ ), () => {
3431
+ if (u(), l.current) {
3432
+ l.current = !1;
3433
+ return;
3434
+ }
3435
+ const m = o.current;
3436
+ o.current = null, i.current = null, m && setTimeout(() => m.unmount(), 0);
3437
+ };
3438
+ }, []), Q(() => {
3439
+ if (!i.current || !n)
3440
+ return;
3441
+ const u = c(n);
3442
+ `${i.current.state.location.pathname}${i.current.state.location.search}${i.current.state.location.hash}` !== u && i.current.navigate(u);
3443
+ }, [n]), /* @__PURE__ */ f("div", { ref: s, className: r });
3444
+ }, Kl = ({
3445
+ basePath: e
3446
+ }) => /* @__PURE__ */ f(Is, { basePath: e, children: /* @__PURE__ */ f(Os, {}) }), X = {
3447
+ LIST_COLLECTIONS: "list-collections",
3448
+ LIST_SUBMISSIONS: "list-submissions"
3449
+ }, $i = tn((e) => ({
3450
+ mobileMenuOpen: !1,
3451
+ selectedMenu: "list-collections",
3452
+ setMobileMenuOpen: (t) => e({ mobileMenuOpen: t }),
3453
+ setSelectedMenu: (t) => e({ selectedMenu: t })
3454
+ })), Ki = sn($i), Hr = It({
3455
+ showMenu: !0,
3456
+ basePath: ""
3457
+ });
3458
+ function Gi({
3459
+ showMenu: e = !0,
3460
+ basePath: t = "",
3461
+ children: n
3462
+ }) {
3463
+ return /* @__PURE__ */ f(Hr.Provider, { value: { showMenu: e, basePath: t }, children: n });
3464
+ }
3465
+ const Qi = () => At(Hr), ji = () => {
3466
+ const e = Be(), { pathname: t } = Vn(), { appCode: n } = ue(), { t: r } = fe(n), s = Ki.use.setSelectedMenu(), { showMenu: o, basePath: i } = Qi(), l = o !== !1, c = $t(qt.COLLECTION_CREATE), a = $t(qt.COLLECTION_ACCESS), d = [
3467
+ ...c ? [
3468
+ {
3469
+ id: X.LIST_COLLECTIONS,
3470
+ name: r("collection.collection")
3471
+ }
3472
+ ] : [],
3473
+ {
3474
+ id: X.LIST_SUBMISSIONS,
3475
+ name: r("collection.submission")
3476
+ }
3477
+ ], u = (p) => {
3478
+ switch (p) {
3479
+ case X.LIST_COLLECTIONS:
3480
+ return /* @__PURE__ */ f(us, {});
3481
+ case X.LIST_SUBMISSIONS:
3482
+ return /* @__PURE__ */ f(as, {});
3483
+ default:
3484
+ return null;
3485
+ }
3486
+ }, m = (p) => {
3487
+ s(p), e(`${i}/${p}`);
3488
+ }, h = (p, S) => S ? p.startsWith(S) ? p.slice(S.length) || "/" : null : p, y = () => {
3489
+ const p = {
3490
+ "/": X.LIST_COLLECTIONS,
3491
+ "/list-collections": X.LIST_COLLECTIONS,
3492
+ "/list-submissions": X.LIST_SUBMISSIONS
3493
+ }, S = h(t, i);
3494
+ if (S === null) return null;
3495
+ const L = p[S] || null;
3496
+ return !c && L === X.LIST_COLLECTIONS ? X.LIST_SUBMISSIONS : L;
3497
+ };
3498
+ return a && /* @__PURE__ */ _(
3499
+ "div",
3500
+ {
3501
+ className: `border-end pt-16 pe-16 ps-0 ${l ? " h-100 pb-16" : ""}`,
3502
+ style: l ? void 0 : { marginBottom: "-10px" },
3503
+ children: [
3504
+ /* @__PURE__ */ f("p", { className: "caption text-uppercase fw-semibold text-gray-700", children: r("collection.title") }),
3505
+ /* @__PURE__ */ _(Pt, { label: r("collection.title"), children: [
3506
+ /* @__PURE__ */ f(Pt.Item, { children: /* @__PURE__ */ f("div", { className: "treeview ps-16 pt-16", children: /* @__PURE__ */ f(
3507
+ ss,
3508
+ {
3509
+ nodes: d,
3510
+ selectedNodeId: y(),
3511
+ showIcon: !1,
3512
+ renderNode: ({ node: p }) => /* @__PURE__ */ _("div", { className: "d-flex align-items-center gap-8", children: [
3513
+ u(p.id),
3514
+ /* @__PURE__ */ f("span", { children: p.name })
3515
+ ] }),
3516
+ onTreeItemClick: m
3517
+ }
3518
+ ) }) }),
3519
+ /* @__PURE__ */ f(Pt.Item, { children: /* @__PURE__ */ f("div", { className: "separator-dashed w-100 mt-12 my-12" }) })
3520
+ ] })
3521
+ ]
3522
+ }
3523
+ );
3524
+ }, Gl = ({ showMenu: e, basePath: t }) => /* @__PURE__ */ f(Gi, { showMenu: e, basePath: t, children: /* @__PURE__ */ f(ji, {}) }), Ql = ({
3525
+ initialData: e,
3526
+ collection: t,
3527
+ onDataChange: n,
3528
+ onValidityChange: r,
3529
+ i18nNamespace: s
3530
+ }) => {
3531
+ const { appCode: o } = ue(), { t: i } = fe(s ?? o), l = re(
3532
+ (e == null ? void 0 : e.description) ?? (t == null ? void 0 : t.content) ?? ""
3533
+ ), [c, a] = ae(
3534
+ () => (e == null ? void 0 : e.attachments) ?? wt(t == null ? void 0 : t.attachments) ?? []
3535
+ ), d = Tt(
3536
+ () => ({
3537
+ title: (e == null ? void 0 : e.title) ?? (t == null ? void 0 : t.name) ?? "",
3538
+ description: (e == null ? void 0 : e.description) ?? (t != null && t.content ? t.content : ""),
3539
+ deadline: (e == null ? void 0 : e.deadline) ?? (t != null && t.deadline ? new Date(t.deadline) : void 0),
3540
+ attachments: (e == null ? void 0 : e.attachments) ?? wt(t == null ? void 0 : t.attachments) ?? [],
3541
+ sharings: (e == null ? void 0 : e.sharings) ?? []
3542
+ }),
3543
+ [e, t]
3544
+ ), {
3545
+ control: u,
3546
+ watch: m,
3547
+ register: h,
3548
+ setValue: y,
3549
+ handleSubmit: p,
3550
+ formState: { isValid: S }
3551
+ } = jn({
3552
+ defaultValues: d
3553
+ });
3554
+ Q(() => {
3555
+ const w = m((k) => {
3556
+ n == null || n(k);
3557
+ });
3558
+ return () => w.unsubscribe();
3559
+ }, [m, n]), Q(() => {
3560
+ r == null || r(S);
3561
+ }, [S, r]);
3562
+ const L = ({ editor: w }) => {
3563
+ const k = w.isEmpty ? "" : w.getHTML();
3564
+ y("description", k);
3565
+ }, C = (w) => {
3566
+ a(w), y("attachments", w);
3567
+ };
3568
+ return /* @__PURE__ */ f(En, { children: /* @__PURE__ */ f(
3569
+ qn,
3570
+ {
3571
+ id: "formCreateCollection",
3572
+ role: "form",
3573
+ onSubmit: p((w) => {
3574
+ n == null || n(w);
3575
+ }),
3576
+ children: /* @__PURE__ */ _(G, { children: [
3577
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "5", xl: "8", children: /* @__PURE__ */ _(ne, { id: "collectionTitle", isRequired: !0, children: [
3578
+ /* @__PURE__ */ f(be, { leftIcon: /* @__PURE__ */ f(_n, {}), children: i("collection.wizard.create.form.title") }),
3579
+ /* @__PURE__ */ f(
3580
+ Rn,
3581
+ {
3582
+ "data-testid": "collect-create-collection-input-title",
3583
+ type: "text",
3584
+ ...h("title", {
3585
+ required: !0,
3586
+ maxLength: Ct,
3587
+ pattern: {
3588
+ value: /[^ ]/,
3589
+ message: "invalid title"
3590
+ }
3591
+ }),
3592
+ size: "md",
3593
+ maxLength: Ct,
3594
+ placeholder: i(
3595
+ "collection.wizard.create.form.title.placeholder"
3596
+ ),
3597
+ showCounter: !0
3598
+ }
3599
+ )
3600
+ ] }) }),
3601
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "3", xl: "4", children: /* @__PURE__ */ _(ne, { id: "collectionDeadline", isRequired: !0, children: [
3602
+ /* @__PURE__ */ f(be, { leftIcon: /* @__PURE__ */ f(Fn, {}), children: i("collection.wizard.create.form.deadline") }),
3603
+ /* @__PURE__ */ f(
3604
+ Se,
3605
+ {
3606
+ name: "deadline",
3607
+ control: u,
3608
+ rules: { required: !0 },
3609
+ render: ({ field: w }) => /* @__PURE__ */ f(
3610
+ Pn,
3611
+ {
3612
+ "data-testid": "collect-create-collection-input-deadline",
3613
+ value: w.value,
3614
+ onChange: w.onChange,
3615
+ onBlur: w.onBlur,
3616
+ className: "w-full form-control"
3617
+ }
3618
+ )
3619
+ }
3620
+ )
3621
+ ] }) }),
3622
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "8", xl: "12", children: /* @__PURE__ */ _(
3623
+ ne,
3624
+ {
3625
+ id: "collectionDescription",
3626
+ isOptional: !0,
3627
+ className: "collectionDescription",
3628
+ children: [
3629
+ /* @__PURE__ */ f(be, { leftIcon: /* @__PURE__ */ f(Un, {}), children: i("collection.wizard.create.form.description") }),
3630
+ /* @__PURE__ */ f(
3631
+ Se,
3632
+ {
3633
+ name: "description",
3634
+ control: u,
3635
+ render: () => /* @__PURE__ */ f(
3636
+ Qn,
3637
+ {
3638
+ "data-testid": "collect-create-collection-input-description",
3639
+ id: "collectionDescription",
3640
+ content: l.current,
3641
+ placeholder: i(
3642
+ "collection.wizard.create.form.description.placeholder"
3643
+ ),
3644
+ onContentChange: L,
3645
+ mode: "edit"
3646
+ }
3647
+ )
3648
+ }
3649
+ )
3650
+ ]
3651
+ }
3652
+ ) }),
3653
+ /* @__PURE__ */ f(G.Col, { sm: "4", md: "5", children: /* @__PURE__ */ f(ne, { id: "collectionAttachments", isOptional: !0, children: /* @__PURE__ */ f(
3654
+ Se,
3655
+ {
3656
+ name: "attachments",
3657
+ control: u,
3658
+ render: () => /* @__PURE__ */ f(
3659
+ Mn,
3660
+ {
3661
+ "data-testid": "collect-create-collection-input-attachments",
3662
+ attachments: c,
3663
+ editMode: !0,
3664
+ onChange: C
3665
+ }
3666
+ )
3667
+ }
3668
+ ) }) })
3669
+ ] })
3670
+ }
3671
+ ) });
3672
+ }, Dr = (e) => {
3673
+ const t = new Date(e);
3674
+ return t.setHours(23, 59, 59, 999), t;
3675
+ }, jl = (e, t = /* @__PURE__ */ new Date()) => Dr(e) < t, An = {
3676
+ title: "",
3677
+ description: "",
3678
+ deadline: void 0,
3679
+ attachments: [],
3680
+ sharings: []
3681
+ }, Hl = () => {
3682
+ const [e, t] = ae(An), [n, r] = ae(!1), s = fn((i) => {
3683
+ t((l) => ({ ...l, ...i })), r(!0);
3684
+ }, []), o = fn(() => {
3685
+ t(An), r(!1);
3686
+ }, []);
3687
+ return {
3688
+ formData: e,
3689
+ updateFormData: s,
3690
+ resetFormData: o,
3691
+ isDirty: n
3692
+ };
3693
+ }, Dl = ({
3694
+ onSuccess: e,
3695
+ onError: t
3696
+ }) => {
3697
+ const n = H(), r = de({
3698
+ mutationFn: async (s) => {
3699
+ const o = {
3700
+ name: s.title,
3701
+ content: s.description,
3702
+ deadline: Dr(s.deadline ?? /* @__PURE__ */ new Date()),
3703
+ sharings: s.sharings.flatMap(
3704
+ (l) => l.permission.map(
3705
+ (c) => ({
3706
+ recipientId: l.recipientId,
3707
+ recipientType: l.recipientType,
3708
+ permission: c
3709
+ })
3710
+ )
3711
+ )
3712
+ }, i = await $.createCollection(o);
3713
+ return s.attachments.length > 0 && await $.addAttachments(i.id, {
3714
+ files: s.attachments.map((l) => l.file)
3715
+ }), i;
3716
+ },
3717
+ onSuccess: (s) => {
3718
+ n.invalidateQueries({ queryKey: ["collections"] }), e == null || e(s);
3719
+ },
3720
+ onError: (s) => {
3721
+ t == null || t(s);
3722
+ }
3723
+ });
3724
+ return {
3725
+ createCollection: async (s) => {
3726
+ var o;
3727
+ if (!((o = s.title) != null && o.trim()))
3728
+ throw new Error("Title is required");
3729
+ return r.mutateAsync(s);
3730
+ },
3731
+ isPending: r.isPending,
3732
+ isError: r.isError,
3733
+ error: r.error
3734
+ };
3735
+ }, zl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3736
+ __proto__: null,
3737
+ collectionQueryOptions: Ur,
3738
+ collectionsByIdsQueryOptions: Br,
3739
+ collectionsCountQueryOptions: $r,
3740
+ collectionsInfiniteQueryOptions: _r,
3741
+ collectionsQueryOptions: We,
3742
+ collectionsToSubmitByIdsQueryOptions: Vr,
3743
+ collectionsToSubmitCountByIdsQueryOptions: Kr,
3744
+ collectionsToSubmitInfiniteQueryOptions: Fr,
3745
+ useAddAttachments: Gr,
3746
+ useCollection: Ei,
3747
+ useCollectionsByIds: Ni,
3748
+ useCollectionsCount: Li,
3749
+ useCollectionsInfiniteQueryOptions: Ti,
3750
+ useCollectionsToSubmitByIds: xi,
3751
+ useCollectionsToSubmitCountByIds: ki,
3752
+ useCreateCollection: qr,
3753
+ useDeleteCollection: Pi,
3754
+ useDeleteCollectionAttachment: _i,
3755
+ useLoadNextPageCollectionToSubmit: Oi,
3756
+ useUpdateCollection: Ri,
3757
+ useUpdateSharingCollection: Mi
3758
+ }, Symbol.toStringTag, { value: "Module" }));
3759
+ export {
3760
+ uo as $,
3761
+ Os as A,
3762
+ V as B,
3763
+ Gl as C,
3764
+ sr as D,
3765
+ U as E,
3766
+ ai as F,
3767
+ Zn as G,
3768
+ fl as H,
3769
+ Ms as I,
3770
+ Cl as J,
3771
+ Dt as K,
3772
+ ce as L,
3773
+ X as M,
3774
+ oo as N,
3775
+ Sl as O,
3776
+ ti as P,
3777
+ no as Q,
3778
+ dl as R,
3779
+ yl as S,
3780
+ Ge as T,
3781
+ Rl as U,
3782
+ Pl as V,
3783
+ Bt as W,
3784
+ cl as X,
3785
+ Ht as Y,
3786
+ vl as Z,
3787
+ Tl as _,
3788
+ ql as a,
3789
+ hl as a0,
3790
+ ll as a1,
3791
+ Al as a2,
3792
+ El as a3,
3793
+ Ol as a4,
3794
+ Nl as a5,
3795
+ xl as a6,
3796
+ ml as a7,
3797
+ Ml as a8,
3798
+ B as a9,
3799
+ Jt as aA,
3800
+ Vl as aB,
3801
+ As as aC,
3802
+ Dl as aD,
3803
+ Hl as aE,
3804
+ Qi as aF,
3805
+ Wn as aa,
3806
+ ao as ab,
3807
+ or as ac,
3808
+ le as ad,
3809
+ Do as ae,
3810
+ pl as af,
3811
+ ut as ag,
3812
+ ul as ah,
3813
+ io as ai,
3814
+ Il as aj,
3815
+ bl as ak,
3816
+ gl as al,
3817
+ ft as am,
3818
+ Qs as an,
3819
+ wl as ao,
3820
+ xs as ap,
3821
+ Hn as aq,
3822
+ Is as ar,
3823
+ $l as as,
3824
+ Kl as at,
3825
+ Ql as au,
3826
+ Hr as av,
3827
+ Gi as aw,
3828
+ kl as ax,
3829
+ Bi as ay,
3830
+ zl as az,
3831
+ Ti as b,
3832
+ sn as c,
3833
+ _r as d,
3834
+ Oi as e,
3835
+ Fr as f,
3836
+ Fl as g,
3837
+ Ul as h,
3838
+ jl as i,
3839
+ Ei as j,
3840
+ Ur as k,
3841
+ Pi as l,
3842
+ wt as m,
3843
+ xi as n,
3844
+ Mi as o,
3845
+ pe as p,
3846
+ Ii as q,
3847
+ di as r,
3848
+ Bl as s,
3849
+ Ri as t,
3850
+ Ki as u,
3851
+ Gr as v,
3852
+ _i as w,
3853
+ Dr as x,
3854
+ _l as y,
3855
+ Ll as z
3856
+ };