akpm-akb-audit-handler 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CDN/akb-audit-handler-component.js +1329 -1245
- package/package.json +1 -1
|
@@ -1,145 +1,142 @@
|
|
|
1
|
-
/* Version: 1.0.
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
/* Version: 1.0.12 */
|
|
2
|
+
var Qa = Object.defineProperty;
|
|
3
|
+
var zn = (e) => {
|
|
4
4
|
throw TypeError(e);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
7
|
-
var te = (e, t, r) =>
|
|
8
|
-
var C = (e, t, r) => (
|
|
9
|
-
var
|
|
10
|
-
typeof window < "u" && ((
|
|
11
|
-
const
|
|
12
|
-
var
|
|
13
|
-
const
|
|
6
|
+
var Za = (e, t, r) => t in e ? Qa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
7
|
+
var te = (e, t, r) => Za(e, typeof t != "symbol" ? t + "" : t, r), Qr = (e, t, r) => t.has(e) || zn("Cannot " + r);
|
|
8
|
+
var C = (e, t, r) => (Qr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ue = (e, t, r) => t.has(e) ? zn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), _e = (e, t, r, n) => (Qr(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), At = (e, t, r) => (Qr(e, t, "access private method"), r);
|
|
9
|
+
var Wn;
|
|
10
|
+
typeof window < "u" && ((Wn = window.__svelte ?? (window.__svelte = {})).v ?? (Wn.v = /* @__PURE__ */ new Set())).add("5");
|
|
11
|
+
const ei = 1, ti = 2, ri = 16, ni = 1, ai = 4, ii = 8, oi = 16, si = 1, li = 2, Gn = "[", pn = "[!", hn = "]", Gt = {}, ce = Symbol(), di = "http://www.w3.org/1999/xhtml", Kn = !1;
|
|
12
|
+
var gn = Array.isArray, ci = Array.prototype.indexOf, mn = Array.from, Cr = Object.keys, tr = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, ui = Object.getOwnPropertyDescriptors, fi = Object.prototype, vi = Array.prototype, Xn = Object.getPrototypeOf, On = Object.isExtensible;
|
|
13
|
+
const Ct = () => {
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function Qn(e) {
|
|
16
16
|
for (var t = 0; t < e.length; t++)
|
|
17
17
|
e[t]();
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function pi() {
|
|
20
20
|
var e, t, r = new Promise((n, a) => {
|
|
21
21
|
e = n, t = a;
|
|
22
22
|
});
|
|
23
23
|
return { promise: r, resolve: e, reject: t };
|
|
24
24
|
}
|
|
25
|
-
const $e = 2,
|
|
25
|
+
const $e = 2, _n = 4, bn = 8, lr = 16, nt = 32, _t = 64, Zn = 128, Ne = 256, Pr = 512, ve = 1024, ze = 2048, bt = 4096, Re = 8192, Rt = 16384, xn = 32768, yn = 65536, Cn = 1 << 17, hi = 1 << 18, dr = 1 << 19, gi = 1 << 20, an = 1 << 21, kn = 1 << 22, Pt = 1 << 23, Nr = Symbol("$state"), ea = Symbol("legacy props"), mi = Symbol(""), wn = new class extends Error {
|
|
26
26
|
constructor() {
|
|
27
27
|
super(...arguments);
|
|
28
28
|
te(this, "name", "StaleReactionError");
|
|
29
29
|
te(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
30
30
|
}
|
|
31
|
-
}(),
|
|
32
|
-
function
|
|
31
|
+
}(), En = 3, _r = 8;
|
|
32
|
+
function _i() {
|
|
33
33
|
throw new Error("https://svelte.dev/e/await_outside_boundary");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function bi(e) {
|
|
36
36
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function xi() {
|
|
39
39
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function yi(e) {
|
|
42
42
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ki() {
|
|
45
45
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function wi(e) {
|
|
48
48
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Ei() {
|
|
51
51
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function $i() {
|
|
54
54
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
58
|
-
}
|
|
59
|
-
function wi() {
|
|
56
|
+
function Si() {
|
|
60
57
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
61
58
|
}
|
|
62
|
-
function
|
|
59
|
+
function Ti() {
|
|
63
60
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
64
61
|
}
|
|
65
|
-
function
|
|
62
|
+
function qi() {
|
|
66
63
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
67
64
|
}
|
|
68
|
-
function
|
|
65
|
+
function Ur(e) {
|
|
69
66
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
70
67
|
}
|
|
71
|
-
let
|
|
72
|
-
function
|
|
73
|
-
|
|
68
|
+
let V = !1;
|
|
69
|
+
function et(e) {
|
|
70
|
+
V = e;
|
|
74
71
|
}
|
|
75
72
|
let G;
|
|
76
73
|
function Ie(e) {
|
|
77
74
|
if (e === null)
|
|
78
|
-
throw
|
|
75
|
+
throw Ur(), Gt;
|
|
79
76
|
return G = e;
|
|
80
77
|
}
|
|
81
|
-
function
|
|
78
|
+
function Br() {
|
|
82
79
|
return Ie(
|
|
83
80
|
/** @type {TemplateNode} */
|
|
84
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ ot(G)
|
|
85
82
|
);
|
|
86
83
|
}
|
|
87
84
|
function b(e) {
|
|
88
|
-
if (
|
|
89
|
-
if (/* @__PURE__ */
|
|
90
|
-
throw
|
|
85
|
+
if (V) {
|
|
86
|
+
if (/* @__PURE__ */ ot(G) !== null)
|
|
87
|
+
throw Ur(), Gt;
|
|
91
88
|
G = e;
|
|
92
89
|
}
|
|
93
90
|
}
|
|
94
|
-
function
|
|
95
|
-
if (
|
|
91
|
+
function hr(e = 1) {
|
|
92
|
+
if (V) {
|
|
96
93
|
for (var t = e, r = G; t--; )
|
|
97
94
|
r = /** @type {TemplateNode} */
|
|
98
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ ot(r);
|
|
99
96
|
G = r;
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
|
-
function
|
|
99
|
+
function on() {
|
|
103
100
|
for (var e = 0, t = G; ; ) {
|
|
104
|
-
if (t.nodeType ===
|
|
101
|
+
if (t.nodeType === _r) {
|
|
105
102
|
var r = (
|
|
106
103
|
/** @type {Comment} */
|
|
107
104
|
t.data
|
|
108
105
|
);
|
|
109
|
-
if (r ===
|
|
106
|
+
if (r === hn) {
|
|
110
107
|
if (e === 0) return t;
|
|
111
108
|
e -= 1;
|
|
112
|
-
} else (r ===
|
|
109
|
+
} else (r === Gn || r === pn) && (e += 1);
|
|
113
110
|
}
|
|
114
111
|
var n = (
|
|
115
112
|
/** @type {TemplateNode} */
|
|
116
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ ot(t)
|
|
117
114
|
);
|
|
118
115
|
t.remove(), t = n;
|
|
119
116
|
}
|
|
120
117
|
}
|
|
121
|
-
function
|
|
122
|
-
if (!e || e.nodeType !==
|
|
123
|
-
throw
|
|
118
|
+
function ta(e) {
|
|
119
|
+
if (!e || e.nodeType !== _r)
|
|
120
|
+
throw Ur(), Gt;
|
|
124
121
|
return (
|
|
125
122
|
/** @type {Comment} */
|
|
126
123
|
e.data
|
|
127
124
|
);
|
|
128
125
|
}
|
|
129
|
-
function
|
|
126
|
+
function ra(e) {
|
|
130
127
|
return e === this.v;
|
|
131
128
|
}
|
|
132
|
-
function
|
|
129
|
+
function na(e, t) {
|
|
133
130
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
134
131
|
}
|
|
135
|
-
function
|
|
136
|
-
return !
|
|
132
|
+
function aa(e) {
|
|
133
|
+
return !na(e, this.v);
|
|
137
134
|
}
|
|
138
|
-
let
|
|
139
|
-
function
|
|
135
|
+
let ji = !1, Oe = null;
|
|
136
|
+
function Mr(e) {
|
|
140
137
|
Oe = e;
|
|
141
138
|
}
|
|
142
|
-
function
|
|
139
|
+
function at(e, t = !1, r) {
|
|
143
140
|
Oe = {
|
|
144
141
|
p: Oe,
|
|
145
142
|
c: null,
|
|
@@ -149,7 +146,7 @@ function rt(e, t = !1, r) {
|
|
|
149
146
|
l: null
|
|
150
147
|
};
|
|
151
148
|
}
|
|
152
|
-
function
|
|
149
|
+
function it(e) {
|
|
153
150
|
var t = (
|
|
154
151
|
/** @type {ComponentContext} */
|
|
155
152
|
Oe
|
|
@@ -157,29 +154,29 @@ function nt(e) {
|
|
|
157
154
|
if (r !== null) {
|
|
158
155
|
t.e = null;
|
|
159
156
|
for (var n of r)
|
|
160
|
-
|
|
157
|
+
Ea(n);
|
|
161
158
|
}
|
|
162
159
|
return e !== void 0 && (t.x = e), Oe = t.p, e ?? /** @type {T} */
|
|
163
160
|
{};
|
|
164
161
|
}
|
|
165
|
-
function
|
|
162
|
+
function ia() {
|
|
166
163
|
return !0;
|
|
167
164
|
}
|
|
168
|
-
const
|
|
169
|
-
function
|
|
170
|
-
var t =
|
|
165
|
+
const Ai = /* @__PURE__ */ new WeakMap();
|
|
166
|
+
function Ni(e) {
|
|
167
|
+
var t = B;
|
|
171
168
|
if (t === null)
|
|
172
|
-
return
|
|
173
|
-
if ((t.f &
|
|
174
|
-
if ((t.f &
|
|
175
|
-
throw !t.parent && e instanceof Error &&
|
|
169
|
+
return U.f |= Pt, e;
|
|
170
|
+
if ((t.f & xn) === 0) {
|
|
171
|
+
if ((t.f & Zn) === 0)
|
|
172
|
+
throw !t.parent && e instanceof Error && oa(e), e;
|
|
176
173
|
t.b.error(e);
|
|
177
174
|
} else
|
|
178
|
-
|
|
175
|
+
$n(e, t);
|
|
179
176
|
}
|
|
180
|
-
function
|
|
177
|
+
function $n(e, t) {
|
|
181
178
|
for (; t !== null; ) {
|
|
182
|
-
if ((t.f &
|
|
179
|
+
if ((t.f & Zn) !== 0)
|
|
183
180
|
try {
|
|
184
181
|
t.b.error(e);
|
|
185
182
|
return;
|
|
@@ -188,62 +185,62 @@ function wn(e, t) {
|
|
|
188
185
|
}
|
|
189
186
|
t = t.parent;
|
|
190
187
|
}
|
|
191
|
-
throw e instanceof Error &&
|
|
188
|
+
throw e instanceof Error && oa(e), e;
|
|
192
189
|
}
|
|
193
|
-
function
|
|
194
|
-
const t =
|
|
195
|
-
t && (
|
|
190
|
+
function oa(e) {
|
|
191
|
+
const t = Ai.get(e);
|
|
192
|
+
t && (tr(e, "message", {
|
|
196
193
|
value: t.message
|
|
197
|
-
}),
|
|
194
|
+
}), tr(e, "stack", {
|
|
198
195
|
value: t.stack
|
|
199
196
|
}));
|
|
200
197
|
}
|
|
201
|
-
const
|
|
202
|
-
let
|
|
203
|
-
function
|
|
204
|
-
var e =
|
|
205
|
-
|
|
198
|
+
const Ii = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
|
|
199
|
+
let ut = [], rr = [];
|
|
200
|
+
function sa() {
|
|
201
|
+
var e = ut;
|
|
202
|
+
ut = [], Qn(e);
|
|
206
203
|
}
|
|
207
|
-
function
|
|
208
|
-
var e =
|
|
209
|
-
|
|
204
|
+
function la() {
|
|
205
|
+
var e = rr;
|
|
206
|
+
rr = [], Qn(e);
|
|
210
207
|
}
|
|
211
|
-
function
|
|
212
|
-
return
|
|
208
|
+
function zi() {
|
|
209
|
+
return ut.length > 0 || rr.length > 0;
|
|
213
210
|
}
|
|
214
|
-
function
|
|
215
|
-
if (
|
|
216
|
-
var t =
|
|
211
|
+
function da(e) {
|
|
212
|
+
if (ut.length === 0 && !gr) {
|
|
213
|
+
var t = ut;
|
|
217
214
|
queueMicrotask(() => {
|
|
218
|
-
t ===
|
|
215
|
+
t === ut && sa();
|
|
219
216
|
});
|
|
220
217
|
}
|
|
221
|
-
|
|
218
|
+
ut.push(e);
|
|
222
219
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
220
|
+
function Oi(e) {
|
|
221
|
+
rr.length === 0 && Ii(la), rr.push(e);
|
|
225
222
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
223
|
+
function Ci() {
|
|
224
|
+
ut.length > 0 && sa(), rr.length > 0 && la();
|
|
228
225
|
}
|
|
229
|
-
function
|
|
226
|
+
function Pi() {
|
|
230
227
|
const e = (
|
|
231
228
|
/** @type {Effect} */
|
|
232
|
-
|
|
229
|
+
B.b
|
|
233
230
|
);
|
|
234
|
-
return e === null &&
|
|
231
|
+
return e === null && _i(), e;
|
|
235
232
|
}
|
|
236
233
|
// @__NO_SIDE_EFFECTS__
|
|
237
|
-
function
|
|
238
|
-
var t = $e | ze, r =
|
|
234
|
+
function Hr(e) {
|
|
235
|
+
var t = $e | ze, r = U !== null && (U.f & $e) !== 0 ? (
|
|
239
236
|
/** @type {Derived} */
|
|
240
|
-
|
|
237
|
+
U
|
|
241
238
|
) : null;
|
|
242
|
-
return
|
|
239
|
+
return B === null || r !== null && (r.f & Ne) !== 0 ? t |= Ne : B.f |= dr, {
|
|
243
240
|
ctx: Oe,
|
|
244
241
|
deps: null,
|
|
245
242
|
effects: null,
|
|
246
|
-
equals:
|
|
243
|
+
equals: ra,
|
|
247
244
|
f: t,
|
|
248
245
|
fn: e,
|
|
249
246
|
reactions: null,
|
|
@@ -253,17 +250,17 @@ function Fr(e) {
|
|
|
253
250
|
ce
|
|
254
251
|
),
|
|
255
252
|
wv: 0,
|
|
256
|
-
parent: r ??
|
|
253
|
+
parent: r ?? B,
|
|
257
254
|
ac: null
|
|
258
255
|
};
|
|
259
256
|
}
|
|
260
257
|
// @__NO_SIDE_EFFECTS__
|
|
261
|
-
function
|
|
258
|
+
function Mi(e, t) {
|
|
262
259
|
let r = (
|
|
263
260
|
/** @type {Effect | null} */
|
|
264
|
-
|
|
261
|
+
B
|
|
265
262
|
);
|
|
266
|
-
r === null &&
|
|
263
|
+
r === null && xi();
|
|
267
264
|
var n = (
|
|
268
265
|
/** @type {Boundary} */
|
|
269
266
|
r.b
|
|
@@ -271,11 +268,11 @@ function Ci(e, t) {
|
|
|
271
268
|
/** @type {Promise<V>} */
|
|
272
269
|
/** @type {unknown} */
|
|
273
270
|
void 0
|
|
274
|
-
), i =
|
|
271
|
+
), i = br(
|
|
275
272
|
/** @type {V} */
|
|
276
273
|
ce
|
|
277
|
-
), o = null, l = !
|
|
278
|
-
return
|
|
274
|
+
), o = null, l = !U;
|
|
275
|
+
return Ki(() => {
|
|
279
276
|
try {
|
|
280
277
|
var d = e();
|
|
281
278
|
o && Promise.resolve(d).catch(() => {
|
|
@@ -288,10 +285,10 @@ function Ci(e, t) {
|
|
|
288
285
|
var v = (
|
|
289
286
|
/** @type {Batch} */
|
|
290
287
|
Q
|
|
291
|
-
),
|
|
292
|
-
l && (n.update_pending_count(1),
|
|
288
|
+
), _ = n.is_pending();
|
|
289
|
+
l && (n.update_pending_count(1), _ || v.increment());
|
|
293
290
|
const p = (c, h = void 0) => {
|
|
294
|
-
o = null,
|
|
291
|
+
o = null, _ || v.activate(), h ? h !== wn && (i.f |= Pt, Dr(i, h)) : ((i.f & Pt) !== 0 && (i.f ^= Pt), Dr(i, c)), l && (n.update_pending_count(-1), _ || v.decrement()), va();
|
|
295
292
|
};
|
|
296
293
|
if (a.then(p, (c) => p(null, c || "unknown")), v)
|
|
297
294
|
return () => {
|
|
@@ -299,36 +296,36 @@ function Ci(e, t) {
|
|
|
299
296
|
};
|
|
300
297
|
}), new Promise((d) => {
|
|
301
298
|
function u(v) {
|
|
302
|
-
function
|
|
299
|
+
function _() {
|
|
303
300
|
v === a ? d(i) : u(a);
|
|
304
301
|
}
|
|
305
|
-
v.then(
|
|
302
|
+
v.then(_, _);
|
|
306
303
|
}
|
|
307
304
|
u(a);
|
|
308
305
|
});
|
|
309
306
|
}
|
|
310
307
|
// @__NO_SIDE_EFFECTS__
|
|
311
|
-
function
|
|
312
|
-
const t = /* @__PURE__ */
|
|
313
|
-
return
|
|
308
|
+
function Pn(e) {
|
|
309
|
+
const t = /* @__PURE__ */ Hr(e);
|
|
310
|
+
return Ia(t), t;
|
|
314
311
|
}
|
|
315
312
|
// @__NO_SIDE_EFFECTS__
|
|
316
|
-
function
|
|
317
|
-
const t = /* @__PURE__ */
|
|
318
|
-
return t.equals =
|
|
313
|
+
function ca(e) {
|
|
314
|
+
const t = /* @__PURE__ */ Hr(e);
|
|
315
|
+
return t.equals = aa, t;
|
|
319
316
|
}
|
|
320
|
-
function
|
|
317
|
+
function ua(e) {
|
|
321
318
|
var t = e.effects;
|
|
322
319
|
if (t !== null) {
|
|
323
320
|
e.effects = null;
|
|
324
321
|
for (var r = 0; r < t.length; r += 1)
|
|
325
|
-
|
|
322
|
+
Ye(
|
|
326
323
|
/** @type {Effect} */
|
|
327
324
|
t[r]
|
|
328
325
|
);
|
|
329
326
|
}
|
|
330
327
|
}
|
|
331
|
-
function
|
|
328
|
+
function Di(e) {
|
|
332
329
|
for (var t = e.parent; t !== null; ) {
|
|
333
330
|
if ((t.f & $e) === 0)
|
|
334
331
|
return (
|
|
@@ -339,58 +336,58 @@ function Mi(e) {
|
|
|
339
336
|
}
|
|
340
337
|
return null;
|
|
341
338
|
}
|
|
342
|
-
function
|
|
343
|
-
var t, r =
|
|
344
|
-
|
|
339
|
+
function Sn(e) {
|
|
340
|
+
var t, r = B;
|
|
341
|
+
gt(Di(e));
|
|
345
342
|
try {
|
|
346
|
-
|
|
343
|
+
ua(e), t = Pa(e);
|
|
347
344
|
} finally {
|
|
348
|
-
|
|
345
|
+
gt(r);
|
|
349
346
|
}
|
|
350
347
|
return t;
|
|
351
348
|
}
|
|
352
|
-
function
|
|
353
|
-
var t =
|
|
354
|
-
if (e.equals(t) || (e.v = t, e.wv =
|
|
355
|
-
var r = (
|
|
349
|
+
function fa(e) {
|
|
350
|
+
var t = Sn(e);
|
|
351
|
+
if (e.equals(t) || (e.v = t, e.wv = Oa()), !Lt) {
|
|
352
|
+
var r = (ft || (e.f & Ne) !== 0) && e.deps !== null ? bt : ve;
|
|
356
353
|
be(e, r);
|
|
357
354
|
}
|
|
358
355
|
}
|
|
359
|
-
function
|
|
360
|
-
const n =
|
|
356
|
+
function Ri(e, t, r) {
|
|
357
|
+
const n = Hr;
|
|
361
358
|
if (t.length === 0) {
|
|
362
359
|
r(e.map(n));
|
|
363
360
|
return;
|
|
364
361
|
}
|
|
365
362
|
var a = Q, i = (
|
|
366
363
|
/** @type {Effect} */
|
|
367
|
-
|
|
368
|
-
), o =
|
|
369
|
-
Promise.all(t.map((d) => /* @__PURE__ */
|
|
364
|
+
B
|
|
365
|
+
), o = Li(), l = Pi();
|
|
366
|
+
Promise.all(t.map((d) => /* @__PURE__ */ Mi(d))).then((d) => {
|
|
370
367
|
a?.activate(), o();
|
|
371
368
|
try {
|
|
372
369
|
r([...e.map(n), ...d]);
|
|
373
370
|
} catch (u) {
|
|
374
|
-
(i.f &
|
|
371
|
+
(i.f & Rt) === 0 && $n(u, i);
|
|
375
372
|
}
|
|
376
|
-
a?.deactivate(),
|
|
373
|
+
a?.deactivate(), va();
|
|
377
374
|
}).catch((d) => {
|
|
378
375
|
l.error(d);
|
|
379
376
|
});
|
|
380
377
|
}
|
|
381
|
-
function
|
|
382
|
-
var e =
|
|
378
|
+
function Li() {
|
|
379
|
+
var e = B, t = U, r = Oe, n = Q;
|
|
383
380
|
return function() {
|
|
384
|
-
|
|
381
|
+
gt(e), We(t), Mr(r), n?.activate();
|
|
385
382
|
};
|
|
386
383
|
}
|
|
387
|
-
function
|
|
388
|
-
|
|
384
|
+
function va() {
|
|
385
|
+
gt(null), We(null), Mr(null);
|
|
389
386
|
}
|
|
390
|
-
const
|
|
391
|
-
let Q = null,
|
|
392
|
-
var
|
|
393
|
-
const
|
|
387
|
+
const Zr = /* @__PURE__ */ new Set();
|
|
388
|
+
let Q = null, Ir = null, Mn = /* @__PURE__ */ new Set(), Dt = [], Vr = null, sn = !1, gr = !1;
|
|
389
|
+
var wr, Qt, dt, Er, $r, It, Zt, zt, ct, er, Sr, Tr, Le, pa, zr, ln;
|
|
390
|
+
const Fr = class Fr {
|
|
394
391
|
constructor() {
|
|
395
392
|
ue(this, Le);
|
|
396
393
|
/**
|
|
@@ -404,28 +401,28 @@ const Dr = class Dr {
|
|
|
404
401
|
* They keys of this map are identical to `this.#current`
|
|
405
402
|
* @type {Map<Source, any>}
|
|
406
403
|
*/
|
|
407
|
-
ue(this,
|
|
404
|
+
ue(this, wr, /* @__PURE__ */ new Map());
|
|
408
405
|
/**
|
|
409
406
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
410
407
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
411
408
|
* @type {Set<() => void>}
|
|
412
409
|
*/
|
|
413
|
-
ue(this,
|
|
410
|
+
ue(this, Qt, /* @__PURE__ */ new Set());
|
|
414
411
|
/**
|
|
415
412
|
* The number of async effects that are currently in flight
|
|
416
413
|
*/
|
|
417
|
-
ue(this,
|
|
414
|
+
ue(this, dt, 0);
|
|
418
415
|
/**
|
|
419
416
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
420
417
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
421
418
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
422
419
|
*/
|
|
423
|
-
ue(this,
|
|
420
|
+
ue(this, Er, null);
|
|
424
421
|
/**
|
|
425
422
|
* True if an async effect inside this batch resolved and
|
|
426
423
|
* its parent branch was already deleted
|
|
427
424
|
*/
|
|
428
|
-
ue(this,
|
|
425
|
+
ue(this, $r, !1);
|
|
429
426
|
/**
|
|
430
427
|
* Async effects (created inside `async_derived`) encountered during processing.
|
|
431
428
|
* These run after the rest of the batch has updated, since they should
|
|
@@ -438,7 +435,7 @@ const Dr = class Dr {
|
|
|
438
435
|
* `<svelte:boundary>` — these do not prevent the batch from committing
|
|
439
436
|
* @type {Effect[]}
|
|
440
437
|
*/
|
|
441
|
-
ue(this,
|
|
438
|
+
ue(this, Zt, []);
|
|
442
439
|
/**
|
|
443
440
|
* Template effects and `$effect.pre` effects, which run when
|
|
444
441
|
* a batch is committed
|
|
@@ -449,23 +446,23 @@ const Dr = class Dr {
|
|
|
449
446
|
* The same as `#render_effects`, but for `$effect` (which runs after)
|
|
450
447
|
* @type {Effect[]}
|
|
451
448
|
*/
|
|
452
|
-
ue(this,
|
|
449
|
+
ue(this, ct, []);
|
|
453
450
|
/**
|
|
454
451
|
* Block effects, which may need to re-run on subsequent flushes
|
|
455
452
|
* in order to update internal sources (e.g. each block items)
|
|
456
453
|
* @type {Effect[]}
|
|
457
454
|
*/
|
|
458
|
-
ue(this,
|
|
455
|
+
ue(this, er, []);
|
|
459
456
|
/**
|
|
460
457
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
461
458
|
* @type {Effect[]}
|
|
462
459
|
*/
|
|
463
|
-
ue(this,
|
|
460
|
+
ue(this, Sr, []);
|
|
464
461
|
/**
|
|
465
462
|
* Deferred effects that are MAYBE_DIRTY
|
|
466
463
|
* @type {Effect[]}
|
|
467
464
|
*/
|
|
468
|
-
ue(this,
|
|
465
|
+
ue(this, Tr, []);
|
|
469
466
|
/**
|
|
470
467
|
* A set of branches that still exist, but will be destroyed when this batch
|
|
471
468
|
* is committed — we skip over these during `process`
|
|
@@ -478,20 +475,20 @@ const Dr = class Dr {
|
|
|
478
475
|
* @param {Effect[]} root_effects
|
|
479
476
|
*/
|
|
480
477
|
process(t) {
|
|
481
|
-
|
|
478
|
+
Dt = [], Ir = null;
|
|
482
479
|
for (const a of t)
|
|
483
|
-
At(this, Le,
|
|
484
|
-
if (C(this, It).length === 0 && C(this,
|
|
485
|
-
At(this, Le,
|
|
486
|
-
var r = C(this, zt), n = C(this,
|
|
487
|
-
_e(this, zt, []), _e(this,
|
|
480
|
+
At(this, Le, pa).call(this, a);
|
|
481
|
+
if (C(this, It).length === 0 && C(this, dt) === 0) {
|
|
482
|
+
At(this, Le, ln).call(this);
|
|
483
|
+
var r = C(this, zt), n = C(this, ct);
|
|
484
|
+
_e(this, zt, []), _e(this, ct, []), _e(this, er, []), Ir = Q, Q = null, Dn(r), Dn(n), Q === null ? Q = this : Zr.delete(this), C(this, Er)?.resolve();
|
|
488
485
|
} else
|
|
489
|
-
At(this, Le,
|
|
486
|
+
At(this, Le, zr).call(this, C(this, zt)), At(this, Le, zr).call(this, C(this, ct)), At(this, Le, zr).call(this, C(this, er));
|
|
490
487
|
for (const a of C(this, It))
|
|
491
|
-
|
|
492
|
-
for (const a of C(this,
|
|
493
|
-
|
|
494
|
-
_e(this, It, []), _e(this,
|
|
488
|
+
Xt(a);
|
|
489
|
+
for (const a of C(this, Zt))
|
|
490
|
+
Xt(a);
|
|
491
|
+
_e(this, It, []), _e(this, Zt, []);
|
|
495
492
|
}
|
|
496
493
|
/**
|
|
497
494
|
* Associate a change to a given source with the current
|
|
@@ -500,47 +497,47 @@ const Dr = class Dr {
|
|
|
500
497
|
* @param {any} value
|
|
501
498
|
*/
|
|
502
499
|
capture(t, r) {
|
|
503
|
-
C(this,
|
|
500
|
+
C(this, wr).has(t) || C(this, wr).set(t, r), this.current.set(t, t.v);
|
|
504
501
|
}
|
|
505
502
|
activate() {
|
|
506
503
|
Q = this;
|
|
507
504
|
}
|
|
508
505
|
deactivate() {
|
|
509
|
-
Q = null,
|
|
510
|
-
for (const t of
|
|
511
|
-
if (
|
|
506
|
+
Q = null, Ir = null;
|
|
507
|
+
for (const t of Mn)
|
|
508
|
+
if (Mn.delete(t), t(), Q !== null)
|
|
512
509
|
break;
|
|
513
510
|
}
|
|
514
511
|
neuter() {
|
|
515
|
-
_e(this,
|
|
512
|
+
_e(this, $r, !0);
|
|
516
513
|
}
|
|
517
514
|
flush() {
|
|
518
|
-
|
|
515
|
+
Dt.length > 0 ? ha() : At(this, Le, ln).call(this), Q === this && (C(this, dt) === 0 && Zr.delete(this), this.deactivate());
|
|
519
516
|
}
|
|
520
517
|
increment() {
|
|
521
|
-
_e(this,
|
|
518
|
+
_e(this, dt, C(this, dt) + 1);
|
|
522
519
|
}
|
|
523
520
|
decrement() {
|
|
524
|
-
if (_e(this,
|
|
525
|
-
for (const t of C(this,
|
|
526
|
-
be(t, ze),
|
|
527
|
-
for (const t of C(this,
|
|
528
|
-
be(t,
|
|
529
|
-
_e(this, zt, []), _e(this,
|
|
521
|
+
if (_e(this, dt, C(this, dt) - 1), C(this, dt) === 0) {
|
|
522
|
+
for (const t of C(this, Sr))
|
|
523
|
+
be(t, ze), ar(t);
|
|
524
|
+
for (const t of C(this, Tr))
|
|
525
|
+
be(t, bt), ar(t);
|
|
526
|
+
_e(this, zt, []), _e(this, ct, []), this.flush();
|
|
530
527
|
} else
|
|
531
528
|
this.deactivate();
|
|
532
529
|
}
|
|
533
530
|
/** @param {() => void} fn */
|
|
534
531
|
add_callback(t) {
|
|
535
|
-
C(this,
|
|
532
|
+
C(this, Qt).add(t);
|
|
536
533
|
}
|
|
537
534
|
settled() {
|
|
538
|
-
return (C(this,
|
|
535
|
+
return (C(this, Er) ?? _e(this, Er, pi())).promise;
|
|
539
536
|
}
|
|
540
537
|
static ensure() {
|
|
541
538
|
if (Q === null) {
|
|
542
|
-
const t = Q = new
|
|
543
|
-
|
|
539
|
+
const t = Q = new Fr();
|
|
540
|
+
Zr.add(Q), gr || Fr.enqueue(() => {
|
|
544
541
|
Q === t && t.flush();
|
|
545
542
|
});
|
|
546
543
|
}
|
|
@@ -548,28 +545,28 @@ const Dr = class Dr {
|
|
|
548
545
|
}
|
|
549
546
|
/** @param {() => void} task */
|
|
550
547
|
static enqueue(t) {
|
|
551
|
-
|
|
548
|
+
da(t);
|
|
552
549
|
}
|
|
553
550
|
};
|
|
554
|
-
|
|
551
|
+
wr = new WeakMap(), Qt = new WeakMap(), dt = new WeakMap(), Er = new WeakMap(), $r = new WeakMap(), It = new WeakMap(), Zt = new WeakMap(), zt = new WeakMap(), ct = new WeakMap(), er = new WeakMap(), Sr = new WeakMap(), Tr = new WeakMap(), Le = new WeakSet(), /**
|
|
555
552
|
* Traverse the effect tree, executing effects or stashing
|
|
556
553
|
* them for later execution as appropriate
|
|
557
554
|
* @param {Effect} root
|
|
558
555
|
*/
|
|
559
|
-
|
|
556
|
+
pa = function(t) {
|
|
560
557
|
t.f ^= ve;
|
|
561
558
|
for (var r = t.first; r !== null; ) {
|
|
562
|
-
var n = r.f, a = (n & (
|
|
559
|
+
var n = r.f, a = (n & (nt | _t)) !== 0, i = a && (n & ve) !== 0, o = i || (n & Re) !== 0 || this.skipped_effects.has(r);
|
|
563
560
|
if (!o && r.fn !== null) {
|
|
564
561
|
if (a)
|
|
565
562
|
r.f ^= ve;
|
|
566
|
-
else if ((n &
|
|
567
|
-
C(this,
|
|
563
|
+
else if ((n & _n) !== 0)
|
|
564
|
+
C(this, ct).push(r);
|
|
568
565
|
else if ((n & ve) === 0)
|
|
569
|
-
if ((n &
|
|
570
|
-
var l = r.b?.is_pending() ? C(this,
|
|
566
|
+
if ((n & kn) !== 0) {
|
|
567
|
+
var l = r.b?.is_pending() ? C(this, Zt) : C(this, It);
|
|
571
568
|
l.push(r);
|
|
572
|
-
} else
|
|
569
|
+
} else Yr(r) && ((r.f & lr) !== 0 && C(this, er).push(r), Xt(r));
|
|
573
570
|
var d = r.first;
|
|
574
571
|
if (d !== null) {
|
|
575
572
|
r = d;
|
|
@@ -583,95 +580,95 @@ ua = function(t) {
|
|
|
583
580
|
}, /**
|
|
584
581
|
* @param {Effect[]} effects
|
|
585
582
|
*/
|
|
586
|
-
|
|
583
|
+
zr = function(t) {
|
|
587
584
|
for (const r of t)
|
|
588
|
-
((r.f & ze) !== 0 ? C(this,
|
|
585
|
+
((r.f & ze) !== 0 ? C(this, Sr) : C(this, Tr)).push(r), be(r, ve);
|
|
589
586
|
t.length = 0;
|
|
590
587
|
}, /**
|
|
591
588
|
* Append and remove branches to/from the DOM
|
|
592
589
|
*/
|
|
593
|
-
|
|
594
|
-
if (!C(this,
|
|
595
|
-
for (const t of C(this,
|
|
590
|
+
ln = function() {
|
|
591
|
+
if (!C(this, $r))
|
|
592
|
+
for (const t of C(this, Qt))
|
|
596
593
|
t();
|
|
597
|
-
C(this,
|
|
594
|
+
C(this, Qt).clear();
|
|
598
595
|
};
|
|
599
|
-
let
|
|
596
|
+
let nr = Fr;
|
|
600
597
|
function re(e) {
|
|
601
|
-
var t =
|
|
602
|
-
|
|
598
|
+
var t = gr;
|
|
599
|
+
gr = !0;
|
|
603
600
|
try {
|
|
604
601
|
for (var r; ; ) {
|
|
605
|
-
if (
|
|
606
|
-
return
|
|
602
|
+
if (Ci(), Dt.length === 0 && !zi() && (Q?.flush(), Dt.length === 0))
|
|
603
|
+
return Vr = null, /** @type {T} */
|
|
607
604
|
r;
|
|
608
|
-
|
|
605
|
+
ha();
|
|
609
606
|
}
|
|
610
607
|
} finally {
|
|
611
|
-
|
|
608
|
+
gr = t;
|
|
612
609
|
}
|
|
613
610
|
}
|
|
614
|
-
function
|
|
615
|
-
var e =
|
|
616
|
-
|
|
611
|
+
function ha() {
|
|
612
|
+
var e = Kt;
|
|
613
|
+
sn = !0;
|
|
617
614
|
try {
|
|
618
615
|
var t = 0;
|
|
619
|
-
for (
|
|
620
|
-
var r =
|
|
616
|
+
for (Fn(!0); Dt.length > 0; ) {
|
|
617
|
+
var r = nr.ensure();
|
|
621
618
|
if (t++ > 1e3) {
|
|
622
619
|
var n, a;
|
|
623
|
-
|
|
620
|
+
Fi();
|
|
624
621
|
}
|
|
625
|
-
r.process(
|
|
622
|
+
r.process(Dt), vt.clear();
|
|
626
623
|
}
|
|
627
624
|
} finally {
|
|
628
|
-
|
|
625
|
+
sn = !1, Fn(e), Vr = null;
|
|
629
626
|
}
|
|
630
627
|
}
|
|
631
|
-
function
|
|
628
|
+
function Fi() {
|
|
632
629
|
try {
|
|
633
|
-
|
|
630
|
+
Ei();
|
|
634
631
|
} catch (e) {
|
|
635
|
-
|
|
632
|
+
$n(e, Vr);
|
|
636
633
|
}
|
|
637
634
|
}
|
|
638
635
|
let Nt = null;
|
|
639
|
-
function
|
|
636
|
+
function Dn(e) {
|
|
640
637
|
var t = e.length;
|
|
641
638
|
if (t !== 0) {
|
|
642
639
|
for (var r = 0; r < t; ) {
|
|
643
640
|
var n = e[r++];
|
|
644
|
-
if ((n.f & (
|
|
645
|
-
|
|
641
|
+
if ((n.f & (Rt | Re)) === 0 && Yr(n) && (Nt = [], Xt(n), n.deps === null && n.first === null && n.nodes_start === null && (n.teardown === null && n.ac === null ? ja(n) : n.fn = null), Nt?.length > 0)) {
|
|
642
|
+
vt.clear();
|
|
646
643
|
for (const a of Nt)
|
|
647
|
-
|
|
644
|
+
Xt(a);
|
|
648
645
|
Nt = [];
|
|
649
646
|
}
|
|
650
647
|
}
|
|
651
648
|
Nt = null;
|
|
652
649
|
}
|
|
653
650
|
}
|
|
654
|
-
function
|
|
655
|
-
for (var t =
|
|
651
|
+
function ar(e) {
|
|
652
|
+
for (var t = Vr = e; t.parent !== null; ) {
|
|
656
653
|
t = t.parent;
|
|
657
654
|
var r = t.f;
|
|
658
|
-
if (
|
|
655
|
+
if (sn && t === B && (r & lr) !== 0)
|
|
659
656
|
return;
|
|
660
|
-
if ((r & (
|
|
657
|
+
if ((r & (_t | nt)) !== 0) {
|
|
661
658
|
if ((r & ve) === 0) return;
|
|
662
659
|
t.f ^= ve;
|
|
663
660
|
}
|
|
664
661
|
}
|
|
665
|
-
|
|
662
|
+
Dt.push(t);
|
|
666
663
|
}
|
|
667
|
-
const
|
|
668
|
-
function
|
|
664
|
+
const vt = /* @__PURE__ */ new Map();
|
|
665
|
+
function br(e, t) {
|
|
669
666
|
var r = {
|
|
670
667
|
f: 0,
|
|
671
668
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
672
669
|
v: e,
|
|
673
670
|
reactions: null,
|
|
674
|
-
equals:
|
|
671
|
+
equals: ra,
|
|
675
672
|
rv: 0,
|
|
676
673
|
wv: 0
|
|
677
674
|
};
|
|
@@ -679,67 +676,67 @@ function gr(e, t) {
|
|
|
679
676
|
}
|
|
680
677
|
// @__NO_SIDE_EFFECTS__
|
|
681
678
|
function z(e, t) {
|
|
682
|
-
const r =
|
|
683
|
-
return
|
|
679
|
+
const r = br(e);
|
|
680
|
+
return Ia(r), r;
|
|
684
681
|
}
|
|
685
682
|
// @__NO_SIDE_EFFECTS__
|
|
686
|
-
function
|
|
687
|
-
const n =
|
|
688
|
-
return t || (n.equals =
|
|
683
|
+
function ga(e, t = !1, r = !0) {
|
|
684
|
+
const n = br(e);
|
|
685
|
+
return t || (n.equals = aa), n;
|
|
689
686
|
}
|
|
690
687
|
function f(e, t, r = !1) {
|
|
691
|
-
|
|
688
|
+
U !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
692
689
|
// to ensure we error if state is set inside an inspect effect
|
|
693
|
-
(!
|
|
690
|
+
(!Ve || (U.f & Cn) !== 0) && ia() && (U.f & ($e | lr | kn | Cn)) !== 0 && !tt?.includes(e) && qi();
|
|
694
691
|
let n = r ? Ae(t) : t;
|
|
695
|
-
return
|
|
692
|
+
return Dr(e, n);
|
|
696
693
|
}
|
|
697
|
-
function
|
|
694
|
+
function Dr(e, t) {
|
|
698
695
|
if (!e.equals(t)) {
|
|
699
696
|
var r = e.v;
|
|
700
|
-
|
|
701
|
-
var n =
|
|
702
|
-
n.capture(e, r), (e.f & $e) !== 0 && ((e.f & ze) !== 0 &&
|
|
697
|
+
Lt ? vt.set(e, t) : vt.set(e, r), e.v = t;
|
|
698
|
+
var n = nr.ensure();
|
|
699
|
+
n.capture(e, r), (e.f & $e) !== 0 && ((e.f & ze) !== 0 && Sn(
|
|
703
700
|
/** @type {Derived} */
|
|
704
701
|
e
|
|
705
|
-
), be(e, (e.f & Ne) === 0 ? ve :
|
|
702
|
+
), be(e, (e.f & Ne) === 0 ? ve : bt)), e.wv = Oa(), ma(e, ze), B !== null && (B.f & ve) !== 0 && (B.f & (nt | _t)) === 0 && (qe === null ? Zi([e]) : qe.push(e));
|
|
706
703
|
}
|
|
707
704
|
return t;
|
|
708
705
|
}
|
|
709
|
-
function
|
|
706
|
+
function en(e) {
|
|
710
707
|
f(e, e.v + 1);
|
|
711
708
|
}
|
|
712
|
-
function
|
|
709
|
+
function ma(e, t) {
|
|
713
710
|
var r = e.reactions;
|
|
714
711
|
if (r !== null)
|
|
715
712
|
for (var n = r.length, a = 0; a < n; a++) {
|
|
716
713
|
var i = r[a], o = i.f, l = (o & ze) === 0;
|
|
717
|
-
l && be(i, t), (o & $e) !== 0 ?
|
|
714
|
+
l && be(i, t), (o & $e) !== 0 ? ma(
|
|
718
715
|
/** @type {Derived} */
|
|
719
716
|
i,
|
|
720
|
-
|
|
721
|
-
) : l && ((o &
|
|
717
|
+
bt
|
|
718
|
+
) : l && ((o & lr) !== 0 && Nt !== null && Nt.push(
|
|
722
719
|
/** @type {Effect} */
|
|
723
720
|
i
|
|
724
|
-
),
|
|
721
|
+
), ar(
|
|
725
722
|
/** @type {Effect} */
|
|
726
723
|
i
|
|
727
724
|
));
|
|
728
725
|
}
|
|
729
726
|
}
|
|
730
727
|
function Ae(e) {
|
|
731
|
-
if (typeof e != "object" || e === null ||
|
|
728
|
+
if (typeof e != "object" || e === null || Nr in e)
|
|
732
729
|
return e;
|
|
733
|
-
const t =
|
|
734
|
-
if (t !==
|
|
730
|
+
const t = Xn(e);
|
|
731
|
+
if (t !== fi && t !== vi)
|
|
735
732
|
return e;
|
|
736
|
-
var r = /* @__PURE__ */ new Map(), n =
|
|
733
|
+
var r = /* @__PURE__ */ new Map(), n = gn(e), a = /* @__PURE__ */ z(0), i = Mt, o = (l) => {
|
|
737
734
|
if (Mt === i)
|
|
738
735
|
return l();
|
|
739
|
-
var d =
|
|
740
|
-
|
|
736
|
+
var d = U, u = Mt;
|
|
737
|
+
We(null), Bn(i);
|
|
741
738
|
var v = l();
|
|
742
|
-
return
|
|
739
|
+
return We(d), Bn(u), v;
|
|
743
740
|
};
|
|
744
741
|
return n && r.set("length", /* @__PURE__ */ z(
|
|
745
742
|
/** @type {any[]} */
|
|
@@ -749,11 +746,11 @@ function Ae(e) {
|
|
|
749
746
|
e,
|
|
750
747
|
{
|
|
751
748
|
defineProperty(l, d, u) {
|
|
752
|
-
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) &&
|
|
749
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Si();
|
|
753
750
|
var v = r.get(d);
|
|
754
751
|
return v === void 0 ? v = o(() => {
|
|
755
|
-
var
|
|
756
|
-
return r.set(d,
|
|
752
|
+
var _ = /* @__PURE__ */ z(u.value);
|
|
753
|
+
return r.set(d, _), _;
|
|
757
754
|
}) : f(v, u.value, !0), !0;
|
|
758
755
|
},
|
|
759
756
|
deleteProperty(l, d) {
|
|
@@ -761,18 +758,18 @@ function Ae(e) {
|
|
|
761
758
|
if (u === void 0) {
|
|
762
759
|
if (d in l) {
|
|
763
760
|
const v = o(() => /* @__PURE__ */ z(ce));
|
|
764
|
-
r.set(d, v),
|
|
761
|
+
r.set(d, v), en(a);
|
|
765
762
|
}
|
|
766
763
|
} else
|
|
767
|
-
f(u, ce),
|
|
764
|
+
f(u, ce), en(a);
|
|
768
765
|
return !0;
|
|
769
766
|
},
|
|
770
767
|
get(l, d, u) {
|
|
771
|
-
if (d ===
|
|
768
|
+
if (d === Nr)
|
|
772
769
|
return e;
|
|
773
|
-
var v = r.get(d),
|
|
774
|
-
if (v === void 0 && (!
|
|
775
|
-
var c = Ae(
|
|
770
|
+
var v = r.get(d), _ = d in l;
|
|
771
|
+
if (v === void 0 && (!_ || Ot(l, d)?.writable) && (v = o(() => {
|
|
772
|
+
var c = Ae(_ ? l[d] : ce), h = /* @__PURE__ */ z(c);
|
|
776
773
|
return h;
|
|
777
774
|
}), r.set(d, v)), v !== void 0) {
|
|
778
775
|
var p = s(v);
|
|
@@ -786,8 +783,8 @@ function Ae(e) {
|
|
|
786
783
|
var v = r.get(d);
|
|
787
784
|
v && (u.value = s(v));
|
|
788
785
|
} else if (u === void 0) {
|
|
789
|
-
var
|
|
790
|
-
if (
|
|
786
|
+
var _ = r.get(d), p = _?.v;
|
|
787
|
+
if (_ !== void 0 && p !== ce)
|
|
791
788
|
return {
|
|
792
789
|
enumerable: !0,
|
|
793
790
|
configurable: !0,
|
|
@@ -798,52 +795,52 @@ function Ae(e) {
|
|
|
798
795
|
return u;
|
|
799
796
|
},
|
|
800
797
|
has(l, d) {
|
|
801
|
-
if (d ===
|
|
798
|
+
if (d === Nr)
|
|
802
799
|
return !0;
|
|
803
800
|
var u = r.get(d), v = u !== void 0 && u.v !== ce || Reflect.has(l, d);
|
|
804
|
-
if (u !== void 0 ||
|
|
801
|
+
if (u !== void 0 || B !== null && (!v || Ot(l, d)?.writable)) {
|
|
805
802
|
u === void 0 && (u = o(() => {
|
|
806
803
|
var p = v ? Ae(l[d]) : ce, c = /* @__PURE__ */ z(p);
|
|
807
804
|
return c;
|
|
808
805
|
}), r.set(d, u));
|
|
809
|
-
var
|
|
810
|
-
if (
|
|
806
|
+
var _ = s(u);
|
|
807
|
+
if (_ === ce)
|
|
811
808
|
return !1;
|
|
812
809
|
}
|
|
813
810
|
return v;
|
|
814
811
|
},
|
|
815
812
|
set(l, d, u, v) {
|
|
816
|
-
var
|
|
813
|
+
var _ = r.get(d), p = d in l;
|
|
817
814
|
if (n && d === "length")
|
|
818
815
|
for (var c = u; c < /** @type {Source<number>} */
|
|
819
|
-
|
|
816
|
+
_.v; c += 1) {
|
|
820
817
|
var h = r.get(c + "");
|
|
821
818
|
h !== void 0 ? f(h, ce) : c in l && (h = o(() => /* @__PURE__ */ z(ce)), r.set(c + "", h));
|
|
822
819
|
}
|
|
823
|
-
if (
|
|
824
|
-
(!p || Ot(l, d)?.writable) && (
|
|
820
|
+
if (_ === void 0)
|
|
821
|
+
(!p || Ot(l, d)?.writable) && (_ = o(() => /* @__PURE__ */ z(void 0)), f(_, Ae(u)), r.set(d, _));
|
|
825
822
|
else {
|
|
826
|
-
p =
|
|
823
|
+
p = _.v !== ce;
|
|
827
824
|
var E = o(() => Ae(u));
|
|
828
|
-
f(
|
|
825
|
+
f(_, E);
|
|
829
826
|
}
|
|
830
827
|
var g = Reflect.getOwnPropertyDescriptor(l, d);
|
|
831
828
|
if (g?.set && g.set.call(v, u), !p) {
|
|
832
829
|
if (n && typeof d == "string") {
|
|
833
|
-
var
|
|
830
|
+
var m = (
|
|
834
831
|
/** @type {Source<number>} */
|
|
835
832
|
r.get("length")
|
|
836
833
|
), S = Number(d);
|
|
837
|
-
Number.isInteger(S) && S >=
|
|
834
|
+
Number.isInteger(S) && S >= m.v && f(m, S + 1);
|
|
838
835
|
}
|
|
839
|
-
|
|
836
|
+
en(a);
|
|
840
837
|
}
|
|
841
838
|
return !0;
|
|
842
839
|
},
|
|
843
840
|
ownKeys(l) {
|
|
844
841
|
s(a);
|
|
845
|
-
var d = Reflect.ownKeys(l).filter((
|
|
846
|
-
var p = r.get(
|
|
842
|
+
var d = Reflect.ownKeys(l).filter((_) => {
|
|
843
|
+
var p = r.get(_);
|
|
847
844
|
return p === void 0 || p.v !== ce;
|
|
848
845
|
});
|
|
849
846
|
for (var [u, v] of r)
|
|
@@ -851,84 +848,84 @@ function Ae(e) {
|
|
|
851
848
|
return d;
|
|
852
849
|
},
|
|
853
850
|
setPrototypeOf() {
|
|
854
|
-
|
|
851
|
+
Ti();
|
|
855
852
|
}
|
|
856
853
|
}
|
|
857
854
|
);
|
|
858
855
|
}
|
|
859
|
-
var
|
|
860
|
-
function
|
|
861
|
-
if (
|
|
862
|
-
|
|
856
|
+
var Rn, _a, ba, xa;
|
|
857
|
+
function dn() {
|
|
858
|
+
if (Rn === void 0) {
|
|
859
|
+
Rn = window, _a = /Firefox/.test(navigator.userAgent);
|
|
863
860
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
864
|
-
|
|
861
|
+
ba = Ot(t, "firstChild").get, xa = Ot(t, "nextSibling").get, On(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), On(r) && (r.__t = void 0);
|
|
865
862
|
}
|
|
866
863
|
}
|
|
867
|
-
function
|
|
864
|
+
function Je(e = "") {
|
|
868
865
|
return document.createTextNode(e);
|
|
869
866
|
}
|
|
870
867
|
// @__NO_SIDE_EFFECTS__
|
|
871
|
-
function
|
|
872
|
-
return
|
|
868
|
+
function ht(e) {
|
|
869
|
+
return ba.call(e);
|
|
873
870
|
}
|
|
874
871
|
// @__NO_SIDE_EFFECTS__
|
|
875
|
-
function
|
|
876
|
-
return
|
|
872
|
+
function ot(e) {
|
|
873
|
+
return xa.call(e);
|
|
877
874
|
}
|
|
878
875
|
function y(e, t) {
|
|
879
|
-
if (!
|
|
880
|
-
return /* @__PURE__ */
|
|
876
|
+
if (!V)
|
|
877
|
+
return /* @__PURE__ */ ht(e);
|
|
881
878
|
var r = (
|
|
882
879
|
/** @type {TemplateNode} */
|
|
883
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ ht(G)
|
|
884
881
|
);
|
|
885
882
|
if (r === null)
|
|
886
|
-
r = G.appendChild(
|
|
887
|
-
else if (t && r.nodeType !==
|
|
888
|
-
var n =
|
|
883
|
+
r = G.appendChild(Je());
|
|
884
|
+
else if (t && r.nodeType !== En) {
|
|
885
|
+
var n = Je();
|
|
889
886
|
return r?.before(n), Ie(n), n;
|
|
890
887
|
}
|
|
891
888
|
return Ie(r), r;
|
|
892
889
|
}
|
|
893
890
|
function Ee(e, t) {
|
|
894
|
-
if (!
|
|
891
|
+
if (!V) {
|
|
895
892
|
var r = (
|
|
896
893
|
/** @type {DocumentFragment} */
|
|
897
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ ht(
|
|
898
895
|
/** @type {Node} */
|
|
899
896
|
e
|
|
900
897
|
)
|
|
901
898
|
);
|
|
902
|
-
return r instanceof Comment && r.data === "" ? /* @__PURE__ */
|
|
899
|
+
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ ot(r) : r;
|
|
903
900
|
}
|
|
904
901
|
return G;
|
|
905
902
|
}
|
|
906
903
|
function $(e, t = 1, r = !1) {
|
|
907
|
-
let n =
|
|
904
|
+
let n = V ? G : e;
|
|
908
905
|
for (var a; t--; )
|
|
909
906
|
a = n, n = /** @type {TemplateNode} */
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
if (!
|
|
907
|
+
/* @__PURE__ */ ot(n);
|
|
908
|
+
if (!V)
|
|
912
909
|
return n;
|
|
913
|
-
if (r && n?.nodeType !==
|
|
914
|
-
var i =
|
|
910
|
+
if (r && n?.nodeType !== En) {
|
|
911
|
+
var i = Je();
|
|
915
912
|
return n === null ? a?.after(i) : n.before(i), Ie(i), i;
|
|
916
913
|
}
|
|
917
914
|
return Ie(n), /** @type {TemplateNode} */
|
|
918
915
|
n;
|
|
919
916
|
}
|
|
920
|
-
function
|
|
917
|
+
function Tn(e) {
|
|
921
918
|
e.textContent = "";
|
|
922
919
|
}
|
|
923
|
-
function
|
|
920
|
+
function ya() {
|
|
924
921
|
return !1;
|
|
925
922
|
}
|
|
926
|
-
function
|
|
927
|
-
|
|
923
|
+
function Ui(e) {
|
|
924
|
+
V && /* @__PURE__ */ ht(e) !== null && Tn(e);
|
|
928
925
|
}
|
|
929
|
-
let
|
|
930
|
-
function
|
|
931
|
-
|
|
926
|
+
let Ln = !1;
|
|
927
|
+
function ka() {
|
|
928
|
+
Ln || (Ln = !0, document.addEventListener(
|
|
932
929
|
"reset",
|
|
933
930
|
(e) => {
|
|
934
931
|
Promise.resolve().then(() => {
|
|
@@ -945,31 +942,31 @@ function ba() {
|
|
|
945
942
|
{ capture: !0 }
|
|
946
943
|
));
|
|
947
944
|
}
|
|
948
|
-
function
|
|
949
|
-
var t =
|
|
950
|
-
|
|
945
|
+
function Jr(e) {
|
|
946
|
+
var t = U, r = B;
|
|
947
|
+
We(null), gt(null);
|
|
951
948
|
try {
|
|
952
949
|
return e();
|
|
953
950
|
} finally {
|
|
954
|
-
|
|
951
|
+
We(t), gt(r);
|
|
955
952
|
}
|
|
956
953
|
}
|
|
957
|
-
function
|
|
958
|
-
e.addEventListener(t, () =>
|
|
954
|
+
function Bi(e, t, r, n = r) {
|
|
955
|
+
e.addEventListener(t, () => Jr(r));
|
|
959
956
|
const a = e.__on_r;
|
|
960
957
|
a ? e.__on_r = () => {
|
|
961
958
|
a(), n(!0);
|
|
962
|
-
} : e.__on_r = () => n(!0),
|
|
959
|
+
} : e.__on_r = () => n(!0), ka();
|
|
963
960
|
}
|
|
964
|
-
function
|
|
965
|
-
|
|
961
|
+
function Hi(e) {
|
|
962
|
+
B === null && U === null && wi(), U !== null && (U.f & Ne) !== 0 && B === null && ki(), Lt && yi();
|
|
966
963
|
}
|
|
967
|
-
function
|
|
964
|
+
function Vi(e, t) {
|
|
968
965
|
var r = t.last;
|
|
969
966
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
970
967
|
}
|
|
971
|
-
function
|
|
972
|
-
var a =
|
|
968
|
+
function Ge(e, t, r, n = !0) {
|
|
969
|
+
var a = B;
|
|
973
970
|
a !== null && (a.f & Re) !== 0 && (e |= Re);
|
|
974
971
|
var i = {
|
|
975
972
|
ctx: Oe,
|
|
@@ -991,34 +988,34 @@ function We(e, t, r, n = !0) {
|
|
|
991
988
|
};
|
|
992
989
|
if (r)
|
|
993
990
|
try {
|
|
994
|
-
|
|
991
|
+
Xt(i), i.f |= xn;
|
|
995
992
|
} catch (d) {
|
|
996
|
-
throw
|
|
993
|
+
throw Ye(i), d;
|
|
997
994
|
}
|
|
998
|
-
else t !== null &&
|
|
995
|
+
else t !== null && ar(i);
|
|
999
996
|
if (n) {
|
|
1000
997
|
var o = i;
|
|
1001
998
|
if (r && o.deps === null && o.teardown === null && o.nodes_start === null && o.first === o.last && // either `null`, or a singular child
|
|
1002
|
-
(o.f &
|
|
999
|
+
(o.f & dr) === 0 && (o = o.first), o !== null && (o.parent = a, a !== null && Vi(o, a), U !== null && (U.f & $e) !== 0 && (e & _t) === 0)) {
|
|
1003
1000
|
var l = (
|
|
1004
1001
|
/** @type {Derived} */
|
|
1005
|
-
|
|
1002
|
+
U
|
|
1006
1003
|
);
|
|
1007
1004
|
(l.effects ?? (l.effects = [])).push(o);
|
|
1008
1005
|
}
|
|
1009
1006
|
}
|
|
1010
1007
|
return i;
|
|
1011
1008
|
}
|
|
1012
|
-
function
|
|
1013
|
-
const t =
|
|
1009
|
+
function Ji(e) {
|
|
1010
|
+
const t = Ge(bn, null, !1);
|
|
1014
1011
|
return be(t, ve), t.teardown = e, t;
|
|
1015
1012
|
}
|
|
1016
|
-
function
|
|
1017
|
-
|
|
1013
|
+
function wa(e) {
|
|
1014
|
+
Hi();
|
|
1018
1015
|
var t = (
|
|
1019
1016
|
/** @type {Effect} */
|
|
1020
|
-
|
|
1021
|
-
), r = !
|
|
1017
|
+
B.f
|
|
1018
|
+
), r = !U && (t & nt) !== 0 && (t & xn) === 0;
|
|
1022
1019
|
if (r) {
|
|
1023
1020
|
var n = (
|
|
1024
1021
|
/** @type {ComponentContext} */
|
|
@@ -1026,112 +1023,112 @@ function xa(e) {
|
|
|
1026
1023
|
);
|
|
1027
1024
|
(n.e ?? (n.e = [])).push(e);
|
|
1028
1025
|
} else
|
|
1029
|
-
return
|
|
1026
|
+
return Ea(e);
|
|
1030
1027
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
1028
|
+
function Ea(e) {
|
|
1029
|
+
return Ge(_n | gi, e, !1);
|
|
1033
1030
|
}
|
|
1034
|
-
function
|
|
1035
|
-
|
|
1036
|
-
const t =
|
|
1031
|
+
function Yi(e) {
|
|
1032
|
+
nr.ensure();
|
|
1033
|
+
const t = Ge(_t | dr, e, !0);
|
|
1037
1034
|
return () => {
|
|
1038
|
-
|
|
1035
|
+
Ye(t);
|
|
1039
1036
|
};
|
|
1040
1037
|
}
|
|
1041
|
-
function
|
|
1042
|
-
|
|
1043
|
-
const t =
|
|
1038
|
+
function Wi(e) {
|
|
1039
|
+
nr.ensure();
|
|
1040
|
+
const t = Ge(_t | dr, e, !0);
|
|
1044
1041
|
return (r = {}) => new Promise((n) => {
|
|
1045
|
-
r.outro ?
|
|
1046
|
-
|
|
1047
|
-
}) : (
|
|
1042
|
+
r.outro ? qn(t, () => {
|
|
1043
|
+
Ye(t), n(void 0);
|
|
1044
|
+
}) : (Ye(t), n(void 0));
|
|
1048
1045
|
});
|
|
1049
1046
|
}
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1047
|
+
function Gi(e) {
|
|
1048
|
+
return Ge(_n, e, !1);
|
|
1052
1049
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1050
|
+
function Ki(e) {
|
|
1051
|
+
return Ge(kn | dr, e, !0);
|
|
1055
1052
|
}
|
|
1056
|
-
function
|
|
1057
|
-
return
|
|
1053
|
+
function $a(e, t = 0) {
|
|
1054
|
+
return Ge(bn | t, e, !0);
|
|
1058
1055
|
}
|
|
1059
1056
|
function fe(e, t = [], r = []) {
|
|
1060
|
-
|
|
1061
|
-
|
|
1057
|
+
Ri(t, r, (n) => {
|
|
1058
|
+
Ge(bn, () => e(...n.map(s)), !0);
|
|
1062
1059
|
});
|
|
1063
1060
|
}
|
|
1064
|
-
function
|
|
1065
|
-
var r =
|
|
1061
|
+
function Sa(e, t = 0) {
|
|
1062
|
+
var r = Ge(lr | t, e, !0);
|
|
1066
1063
|
return r;
|
|
1067
1064
|
}
|
|
1068
|
-
function
|
|
1069
|
-
return
|
|
1065
|
+
function ir(e, t = !0) {
|
|
1066
|
+
return Ge(nt | dr, e, !0, t);
|
|
1070
1067
|
}
|
|
1071
|
-
function
|
|
1068
|
+
function Ta(e) {
|
|
1072
1069
|
var t = e.teardown;
|
|
1073
1070
|
if (t !== null) {
|
|
1074
|
-
const r =
|
|
1075
|
-
|
|
1071
|
+
const r = Lt, n = U;
|
|
1072
|
+
Un(!0), We(null);
|
|
1076
1073
|
try {
|
|
1077
1074
|
t.call(null);
|
|
1078
1075
|
} finally {
|
|
1079
|
-
|
|
1076
|
+
Un(r), We(n);
|
|
1080
1077
|
}
|
|
1081
1078
|
}
|
|
1082
1079
|
}
|
|
1083
|
-
function
|
|
1080
|
+
function qa(e, t = !1) {
|
|
1084
1081
|
var r = e.first;
|
|
1085
1082
|
for (e.first = e.last = null; r !== null; ) {
|
|
1086
1083
|
const a = r.ac;
|
|
1087
|
-
a !== null &&
|
|
1088
|
-
a.abort(
|
|
1084
|
+
a !== null && Jr(() => {
|
|
1085
|
+
a.abort(wn);
|
|
1089
1086
|
});
|
|
1090
1087
|
var n = r.next;
|
|
1091
|
-
(r.f &
|
|
1088
|
+
(r.f & _t) !== 0 ? r.parent = null : Ye(r, t), r = n;
|
|
1092
1089
|
}
|
|
1093
1090
|
}
|
|
1094
|
-
function
|
|
1091
|
+
function Xi(e) {
|
|
1095
1092
|
for (var t = e.first; t !== null; ) {
|
|
1096
1093
|
var r = t.next;
|
|
1097
|
-
(t.f &
|
|
1094
|
+
(t.f & nt) === 0 && Ye(t), t = r;
|
|
1098
1095
|
}
|
|
1099
1096
|
}
|
|
1100
|
-
function
|
|
1097
|
+
function Ye(e, t = !0) {
|
|
1101
1098
|
var r = !1;
|
|
1102
|
-
(t || (e.f &
|
|
1099
|
+
(t || (e.f & hi) !== 0) && e.nodes_start !== null && e.nodes_end !== null && (Qi(
|
|
1103
1100
|
e.nodes_start,
|
|
1104
1101
|
/** @type {TemplateNode} */
|
|
1105
1102
|
e.nodes_end
|
|
1106
|
-
), r = !0),
|
|
1103
|
+
), r = !0), qa(e, t && !r), Rr(e, 0), be(e, Rt);
|
|
1107
1104
|
var n = e.transitions;
|
|
1108
1105
|
if (n !== null)
|
|
1109
1106
|
for (const i of n)
|
|
1110
1107
|
i.stop();
|
|
1111
|
-
|
|
1108
|
+
Ta(e);
|
|
1112
1109
|
var a = e.parent;
|
|
1113
|
-
a !== null && a.first !== null &&
|
|
1110
|
+
a !== null && a.first !== null && ja(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = e.ac = null;
|
|
1114
1111
|
}
|
|
1115
|
-
function
|
|
1112
|
+
function Qi(e, t) {
|
|
1116
1113
|
for (; e !== null; ) {
|
|
1117
1114
|
var r = e === t ? null : (
|
|
1118
1115
|
/** @type {TemplateNode} */
|
|
1119
|
-
/* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ ot(e)
|
|
1120
1117
|
);
|
|
1121
1118
|
e.remove(), e = r;
|
|
1122
1119
|
}
|
|
1123
1120
|
}
|
|
1124
|
-
function
|
|
1121
|
+
function ja(e) {
|
|
1125
1122
|
var t = e.parent, r = e.prev, n = e.next;
|
|
1126
1123
|
r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
|
|
1127
1124
|
}
|
|
1128
|
-
function
|
|
1125
|
+
function qn(e, t) {
|
|
1129
1126
|
var r = [];
|
|
1130
|
-
|
|
1131
|
-
|
|
1127
|
+
jn(e, r, !0), Aa(r, () => {
|
|
1128
|
+
Ye(e), t && t();
|
|
1132
1129
|
});
|
|
1133
1130
|
}
|
|
1134
|
-
function
|
|
1131
|
+
function Aa(e, t) {
|
|
1135
1132
|
var r = e.length;
|
|
1136
1133
|
if (r > 0) {
|
|
1137
1134
|
var n = () => --r || t();
|
|
@@ -1140,157 +1137,157 @@ function Ta(e, t) {
|
|
|
1140
1137
|
} else
|
|
1141
1138
|
t();
|
|
1142
1139
|
}
|
|
1143
|
-
function
|
|
1140
|
+
function jn(e, t, r) {
|
|
1144
1141
|
if ((e.f & Re) === 0) {
|
|
1145
1142
|
if (e.f ^= Re, e.transitions !== null)
|
|
1146
1143
|
for (const o of e.transitions)
|
|
1147
1144
|
(o.is_global || r) && t.push(o);
|
|
1148
1145
|
for (var n = e.first; n !== null; ) {
|
|
1149
|
-
var a = n.next, i = (n.f &
|
|
1150
|
-
|
|
1146
|
+
var a = n.next, i = (n.f & yn) !== 0 || (n.f & nt) !== 0;
|
|
1147
|
+
jn(n, t, i ? r : !1), n = a;
|
|
1151
1148
|
}
|
|
1152
1149
|
}
|
|
1153
1150
|
}
|
|
1154
|
-
function
|
|
1155
|
-
|
|
1151
|
+
function An(e) {
|
|
1152
|
+
Na(e, !0);
|
|
1156
1153
|
}
|
|
1157
|
-
function
|
|
1154
|
+
function Na(e, t) {
|
|
1158
1155
|
if ((e.f & Re) !== 0) {
|
|
1159
|
-
e.f ^= Re, (e.f & ve) === 0 && (be(e, ze),
|
|
1156
|
+
e.f ^= Re, (e.f & ve) === 0 && (be(e, ze), ar(e));
|
|
1160
1157
|
for (var r = e.first; r !== null; ) {
|
|
1161
|
-
var n = r.next, a = (r.f &
|
|
1162
|
-
|
|
1158
|
+
var n = r.next, a = (r.f & yn) !== 0 || (r.f & nt) !== 0;
|
|
1159
|
+
Na(r, a ? t : !1), r = n;
|
|
1163
1160
|
}
|
|
1164
1161
|
if (e.transitions !== null)
|
|
1165
1162
|
for (const i of e.transitions)
|
|
1166
1163
|
(i.is_global || t) && i.in();
|
|
1167
1164
|
}
|
|
1168
1165
|
}
|
|
1169
|
-
let
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
let Rt = !1;
|
|
1174
|
-
function Ln(e) {
|
|
1175
|
-
Rt = e;
|
|
1166
|
+
let Kt = !1;
|
|
1167
|
+
function Fn(e) {
|
|
1168
|
+
Kt = e;
|
|
1176
1169
|
}
|
|
1177
|
-
let
|
|
1178
|
-
function
|
|
1179
|
-
|
|
1170
|
+
let Lt = !1;
|
|
1171
|
+
function Un(e) {
|
|
1172
|
+
Lt = e;
|
|
1180
1173
|
}
|
|
1181
|
-
let U = null;
|
|
1182
|
-
function
|
|
1174
|
+
let U = null, Ve = !1;
|
|
1175
|
+
function We(e) {
|
|
1183
1176
|
U = e;
|
|
1184
1177
|
}
|
|
1185
|
-
let
|
|
1186
|
-
function
|
|
1187
|
-
|
|
1178
|
+
let B = null;
|
|
1179
|
+
function gt(e) {
|
|
1180
|
+
B = e;
|
|
1181
|
+
}
|
|
1182
|
+
let tt = null;
|
|
1183
|
+
function Ia(e) {
|
|
1184
|
+
U !== null && (tt === null ? tt = [e] : tt.push(e));
|
|
1188
1185
|
}
|
|
1189
1186
|
let ge = null, we = 0, qe = null;
|
|
1190
|
-
function
|
|
1187
|
+
function Zi(e) {
|
|
1191
1188
|
qe = e;
|
|
1192
1189
|
}
|
|
1193
|
-
let
|
|
1194
|
-
function
|
|
1190
|
+
let za = 1, xr = 0, Mt = xr;
|
|
1191
|
+
function Bn(e) {
|
|
1195
1192
|
Mt = e;
|
|
1196
1193
|
}
|
|
1197
|
-
let
|
|
1198
|
-
function
|
|
1199
|
-
return ++
|
|
1194
|
+
let ft = !1;
|
|
1195
|
+
function Oa() {
|
|
1196
|
+
return ++za;
|
|
1200
1197
|
}
|
|
1201
|
-
function
|
|
1198
|
+
function Yr(e) {
|
|
1202
1199
|
var t = e.f;
|
|
1203
1200
|
if ((t & ze) !== 0)
|
|
1204
1201
|
return !0;
|
|
1205
|
-
if ((t &
|
|
1202
|
+
if ((t & bt) !== 0) {
|
|
1206
1203
|
var r = e.deps, n = (t & Ne) !== 0;
|
|
1207
1204
|
if (r !== null) {
|
|
1208
|
-
var a, i, o = (t &
|
|
1209
|
-
if ((o || l) && (
|
|
1205
|
+
var a, i, o = (t & Pr) !== 0, l = n && B !== null && !ft, d = r.length;
|
|
1206
|
+
if ((o || l) && (B === null || (B.f & Rt) === 0)) {
|
|
1210
1207
|
var u = (
|
|
1211
1208
|
/** @type {Derived} */
|
|
1212
1209
|
e
|
|
1213
1210
|
), v = u.parent;
|
|
1214
1211
|
for (a = 0; a < d; a++)
|
|
1215
1212
|
i = r[a], (o || !i?.reactions?.includes(u)) && (i.reactions ?? (i.reactions = [])).push(u);
|
|
1216
|
-
o && (u.f ^=
|
|
1213
|
+
o && (u.f ^= Pr), l && v !== null && (v.f & Ne) === 0 && (u.f ^= Ne);
|
|
1217
1214
|
}
|
|
1218
1215
|
for (a = 0; a < d; a++)
|
|
1219
|
-
if (i = r[a],
|
|
1216
|
+
if (i = r[a], Yr(
|
|
1220
1217
|
/** @type {Derived} */
|
|
1221
1218
|
i
|
|
1222
|
-
) &&
|
|
1219
|
+
) && fa(
|
|
1223
1220
|
/** @type {Derived} */
|
|
1224
1221
|
i
|
|
1225
1222
|
), i.wv > e.wv)
|
|
1226
1223
|
return !0;
|
|
1227
1224
|
}
|
|
1228
|
-
(!n ||
|
|
1225
|
+
(!n || B !== null && !ft) && be(e, ve);
|
|
1229
1226
|
}
|
|
1230
1227
|
return !1;
|
|
1231
1228
|
}
|
|
1232
|
-
function
|
|
1229
|
+
function Ca(e, t, r = !0) {
|
|
1233
1230
|
var n = e.reactions;
|
|
1234
|
-
if (n !== null && !
|
|
1231
|
+
if (n !== null && !tt?.includes(e))
|
|
1235
1232
|
for (var a = 0; a < n.length; a++) {
|
|
1236
1233
|
var i = n[a];
|
|
1237
|
-
(i.f & $e) !== 0 ?
|
|
1234
|
+
(i.f & $e) !== 0 ? Ca(
|
|
1238
1235
|
/** @type {Derived} */
|
|
1239
1236
|
i,
|
|
1240
1237
|
t,
|
|
1241
1238
|
!1
|
|
1242
|
-
) : t === i && (r ? be(i, ze) : (i.f & ve) !== 0 && be(i,
|
|
1239
|
+
) : t === i && (r ? be(i, ze) : (i.f & ve) !== 0 && be(i, bt), ar(
|
|
1243
1240
|
/** @type {Effect} */
|
|
1244
1241
|
i
|
|
1245
1242
|
));
|
|
1246
1243
|
}
|
|
1247
1244
|
}
|
|
1248
|
-
function
|
|
1245
|
+
function Pa(e) {
|
|
1249
1246
|
var E;
|
|
1250
|
-
var t = ge, r = we, n = qe, a =
|
|
1247
|
+
var t = ge, r = we, n = qe, a = U, i = ft, o = tt, l = Oe, d = Ve, u = Mt, v = e.f;
|
|
1251
1248
|
ge = /** @type {null | Value[]} */
|
|
1252
|
-
null, we = 0, qe = null,
|
|
1253
|
-
e.ac.abort(
|
|
1249
|
+
null, we = 0, qe = null, ft = (v & Ne) !== 0 && (Ve || !Kt || U === null), U = (v & (nt | _t)) === 0 ? e : null, tt = null, Mr(e.ctx), Ve = !1, Mt = ++xr, e.ac !== null && (Jr(() => {
|
|
1250
|
+
e.ac.abort(wn);
|
|
1254
1251
|
}), e.ac = null);
|
|
1255
1252
|
try {
|
|
1256
|
-
e.f |=
|
|
1257
|
-
var
|
|
1253
|
+
e.f |= an;
|
|
1254
|
+
var _ = (
|
|
1258
1255
|
/** @type {Function} */
|
|
1259
1256
|
e.fn
|
|
1260
|
-
), p =
|
|
1257
|
+
), p = _(), c = e.deps;
|
|
1261
1258
|
if (ge !== null) {
|
|
1262
1259
|
var h;
|
|
1263
|
-
if (
|
|
1260
|
+
if (Rr(e, we), c !== null && we > 0)
|
|
1264
1261
|
for (c.length = we + ge.length, h = 0; h < ge.length; h++)
|
|
1265
1262
|
c[we + h] = ge[h];
|
|
1266
1263
|
else
|
|
1267
1264
|
e.deps = c = ge;
|
|
1268
|
-
if (!
|
|
1265
|
+
if (!ft || // Deriveds that already have reactions can cleanup, so we still add them as reactions
|
|
1269
1266
|
(v & $e) !== 0 && /** @type {import('#client').Derived} */
|
|
1270
1267
|
e.reactions !== null)
|
|
1271
1268
|
for (h = we; h < c.length; h++)
|
|
1272
1269
|
((E = c[h]).reactions ?? (E.reactions = [])).push(e);
|
|
1273
|
-
} else c !== null && we < c.length && (
|
|
1274
|
-
if (
|
|
1270
|
+
} else c !== null && we < c.length && (Rr(e, we), c.length = we);
|
|
1271
|
+
if (ia() && qe !== null && !Ve && c !== null && (e.f & ($e | bt | ze)) === 0)
|
|
1275
1272
|
for (h = 0; h < /** @type {Source[]} */
|
|
1276
1273
|
qe.length; h++)
|
|
1277
|
-
|
|
1274
|
+
Ca(
|
|
1278
1275
|
qe[h],
|
|
1279
1276
|
/** @type {Effect} */
|
|
1280
1277
|
e
|
|
1281
1278
|
);
|
|
1282
|
-
return a !== null && a !== e && (
|
|
1283
|
-
qe))), (e.f &
|
|
1279
|
+
return a !== null && a !== e && (xr++, qe !== null && (n === null ? n = qe : n.push(.../** @type {Source[]} */
|
|
1280
|
+
qe))), (e.f & Pt) !== 0 && (e.f ^= Pt), p;
|
|
1284
1281
|
} catch (g) {
|
|
1285
|
-
return
|
|
1282
|
+
return Ni(g);
|
|
1286
1283
|
} finally {
|
|
1287
|
-
e.f ^=
|
|
1284
|
+
e.f ^= an, ge = t, we = r, qe = n, U = a, ft = i, tt = o, Mr(l), Ve = d, Mt = u;
|
|
1288
1285
|
}
|
|
1289
1286
|
}
|
|
1290
|
-
function
|
|
1287
|
+
function eo(e, t) {
|
|
1291
1288
|
let r = t.reactions;
|
|
1292
1289
|
if (r !== null) {
|
|
1293
|
-
var n =
|
|
1290
|
+
var n = ci.call(r, e);
|
|
1294
1291
|
if (n !== -1) {
|
|
1295
1292
|
var a = r.length - 1;
|
|
1296
1293
|
a === 0 ? r = t.reactions = null : (r[n] = r[a], r.pop());
|
|
@@ -1299,53 +1296,53 @@ function Qi(e, t) {
|
|
|
1299
1296
|
r === null && (t.f & $e) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1300
1297
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1301
1298
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1302
|
-
(ge === null || !ge.includes(t)) && (be(t,
|
|
1299
|
+
(ge === null || !ge.includes(t)) && (be(t, bt), (t.f & (Ne | Pr)) === 0 && (t.f ^= Pr), ua(
|
|
1303
1300
|
/** @type {Derived} **/
|
|
1304
1301
|
t
|
|
1305
|
-
),
|
|
1302
|
+
), Rr(
|
|
1306
1303
|
/** @type {Derived} **/
|
|
1307
1304
|
t,
|
|
1308
1305
|
0
|
|
1309
1306
|
));
|
|
1310
1307
|
}
|
|
1311
|
-
function
|
|
1308
|
+
function Rr(e, t) {
|
|
1312
1309
|
var r = e.deps;
|
|
1313
1310
|
if (r !== null)
|
|
1314
1311
|
for (var n = t; n < r.length; n++)
|
|
1315
|
-
|
|
1312
|
+
eo(e, r[n]);
|
|
1316
1313
|
}
|
|
1317
|
-
function
|
|
1314
|
+
function Xt(e) {
|
|
1318
1315
|
var t = e.f;
|
|
1319
|
-
if ((t &
|
|
1316
|
+
if ((t & Rt) === 0) {
|
|
1320
1317
|
be(e, ve);
|
|
1321
|
-
var r =
|
|
1322
|
-
|
|
1318
|
+
var r = B, n = Kt;
|
|
1319
|
+
B = e, Kt = !0;
|
|
1323
1320
|
try {
|
|
1324
|
-
(t &
|
|
1325
|
-
var a =
|
|
1326
|
-
e.teardown = typeof a == "function" ? a : null, e.wv =
|
|
1321
|
+
(t & lr) !== 0 ? Xi(e) : qa(e), Ta(e);
|
|
1322
|
+
var a = Pa(e);
|
|
1323
|
+
e.teardown = typeof a == "function" ? a : null, e.wv = za;
|
|
1327
1324
|
var i;
|
|
1328
|
-
|
|
1325
|
+
Kn && ji && (e.f & ze) !== 0 && e.deps;
|
|
1329
1326
|
} finally {
|
|
1330
|
-
|
|
1327
|
+
Kt = n, B = r;
|
|
1331
1328
|
}
|
|
1332
1329
|
}
|
|
1333
1330
|
}
|
|
1334
|
-
async function
|
|
1331
|
+
async function to() {
|
|
1335
1332
|
await Promise.resolve(), re();
|
|
1336
1333
|
}
|
|
1337
1334
|
function s(e) {
|
|
1338
1335
|
var t = e.f, r = (t & $e) !== 0;
|
|
1339
|
-
if (
|
|
1340
|
-
var n =
|
|
1341
|
-
if (!n && !
|
|
1342
|
-
var a =
|
|
1343
|
-
if ((
|
|
1344
|
-
e.rv <
|
|
1336
|
+
if (U !== null && !Ve) {
|
|
1337
|
+
var n = B !== null && (B.f & Rt) !== 0;
|
|
1338
|
+
if (!n && !tt?.includes(e)) {
|
|
1339
|
+
var a = U.deps;
|
|
1340
|
+
if ((U.f & an) !== 0)
|
|
1341
|
+
e.rv < xr && (e.rv = xr, ge === null && a !== null && a[we] === e ? we++ : ge === null ? ge = [e] : (!ft || !ge.includes(e)) && ge.push(e));
|
|
1345
1342
|
else {
|
|
1346
|
-
(
|
|
1343
|
+
(U.deps ?? (U.deps = [])).push(e);
|
|
1347
1344
|
var i = e.reactions;
|
|
1348
|
-
i === null ? e.reactions = [
|
|
1345
|
+
i === null ? e.reactions = [U] : i.includes(U) || i.push(U);
|
|
1349
1346
|
}
|
|
1350
1347
|
}
|
|
1351
1348
|
} else if (r && /** @type {Derived} */
|
|
@@ -1357,71 +1354,71 @@ function s(e) {
|
|
|
1357
1354
|
), l = o.parent;
|
|
1358
1355
|
l !== null && (l.f & Ne) === 0 && (o.f ^= Ne);
|
|
1359
1356
|
}
|
|
1360
|
-
if (
|
|
1361
|
-
if (
|
|
1362
|
-
return
|
|
1357
|
+
if (Lt) {
|
|
1358
|
+
if (vt.has(e))
|
|
1359
|
+
return vt.get(e);
|
|
1363
1360
|
if (r) {
|
|
1364
1361
|
o = /** @type {Derived} */
|
|
1365
1362
|
e;
|
|
1366
1363
|
var d = o.v;
|
|
1367
|
-
return ((o.f & ve) === 0 && o.reactions !== null ||
|
|
1364
|
+
return ((o.f & ve) === 0 && o.reactions !== null || Ma(o)) && (d = Sn(o)), vt.set(o, d), d;
|
|
1368
1365
|
}
|
|
1369
1366
|
} else r && (o = /** @type {Derived} */
|
|
1370
|
-
e,
|
|
1371
|
-
if ((e.f &
|
|
1367
|
+
e, Yr(o) && fa(o));
|
|
1368
|
+
if ((e.f & Pt) !== 0)
|
|
1372
1369
|
throw e.v;
|
|
1373
1370
|
return e.v;
|
|
1374
1371
|
}
|
|
1375
|
-
function
|
|
1372
|
+
function Ma(e) {
|
|
1376
1373
|
if (e.v === ce) return !0;
|
|
1377
1374
|
if (e.deps === null) return !1;
|
|
1378
1375
|
for (const t of e.deps)
|
|
1379
|
-
if (
|
|
1376
|
+
if (vt.has(t) || (t.f & $e) !== 0 && Ma(
|
|
1380
1377
|
/** @type {Derived} */
|
|
1381
1378
|
t
|
|
1382
1379
|
))
|
|
1383
1380
|
return !0;
|
|
1384
1381
|
return !1;
|
|
1385
1382
|
}
|
|
1386
|
-
function
|
|
1387
|
-
var t =
|
|
1383
|
+
function Wr(e) {
|
|
1384
|
+
var t = Ve;
|
|
1388
1385
|
try {
|
|
1389
|
-
return
|
|
1386
|
+
return Ve = !0, e();
|
|
1390
1387
|
} finally {
|
|
1391
|
-
|
|
1388
|
+
Ve = t;
|
|
1392
1389
|
}
|
|
1393
1390
|
}
|
|
1394
|
-
const
|
|
1391
|
+
const ro = -7169;
|
|
1395
1392
|
function be(e, t) {
|
|
1396
|
-
e.f = e.f &
|
|
1393
|
+
e.f = e.f & ro | t;
|
|
1397
1394
|
}
|
|
1398
|
-
const
|
|
1399
|
-
function
|
|
1395
|
+
const Da = /* @__PURE__ */ new Set(), cn = /* @__PURE__ */ new Set();
|
|
1396
|
+
function no(e, t, r, n = {}) {
|
|
1400
1397
|
function a(i) {
|
|
1401
|
-
if (n.capture ||
|
|
1402
|
-
return
|
|
1398
|
+
if (n.capture || vr.call(t, i), !i.cancelBubble)
|
|
1399
|
+
return Jr(() => r?.call(this, i));
|
|
1403
1400
|
}
|
|
1404
|
-
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ?
|
|
1401
|
+
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? da(() => {
|
|
1405
1402
|
t.addEventListener(e, a, n);
|
|
1406
1403
|
}) : t.addEventListener(e, a, n), a;
|
|
1407
1404
|
}
|
|
1408
|
-
function
|
|
1409
|
-
var i = { capture: n, passive: a }, o =
|
|
1405
|
+
function Wt(e, t, r, n, a) {
|
|
1406
|
+
var i = { capture: n, passive: a }, o = no(e, t, r, i);
|
|
1410
1407
|
(t === document.body || // @ts-ignore
|
|
1411
1408
|
t === window || // @ts-ignore
|
|
1412
1409
|
t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
|
|
1413
|
-
t instanceof HTMLMediaElement) &&
|
|
1410
|
+
t instanceof HTMLMediaElement) && Ji(() => {
|
|
1414
1411
|
t.removeEventListener(e, o, i);
|
|
1415
1412
|
});
|
|
1416
1413
|
}
|
|
1417
|
-
function
|
|
1414
|
+
function Ft(e) {
|
|
1418
1415
|
for (var t = 0; t < e.length; t++)
|
|
1419
|
-
|
|
1420
|
-
for (var r of
|
|
1416
|
+
Da.add(e[t]);
|
|
1417
|
+
for (var r of cn)
|
|
1421
1418
|
r(e);
|
|
1422
1419
|
}
|
|
1423
|
-
let
|
|
1424
|
-
function
|
|
1420
|
+
let Hn = null;
|
|
1421
|
+
function vr(e) {
|
|
1425
1422
|
var t = this, r = (
|
|
1426
1423
|
/** @type {Node} */
|
|
1427
1424
|
t.ownerDocument
|
|
@@ -1429,8 +1426,8 @@ function cr(e) {
|
|
|
1429
1426
|
/** @type {null | Element} */
|
|
1430
1427
|
a[0] || e.target
|
|
1431
1428
|
);
|
|
1432
|
-
|
|
1433
|
-
var o = 0, l =
|
|
1429
|
+
Hn = e;
|
|
1430
|
+
var o = 0, l = Hn === e && e.__root;
|
|
1434
1431
|
if (l) {
|
|
1435
1432
|
var d = a.indexOf(l);
|
|
1436
1433
|
if (d !== -1 && (t === document || t === /** @type {any} */
|
|
@@ -1445,14 +1442,14 @@ function cr(e) {
|
|
|
1445
1442
|
}
|
|
1446
1443
|
if (i = /** @type {Element} */
|
|
1447
1444
|
a[o] || e.target, i !== t) {
|
|
1448
|
-
|
|
1445
|
+
tr(e, "currentTarget", {
|
|
1449
1446
|
configurable: !0,
|
|
1450
1447
|
get() {
|
|
1451
1448
|
return i || r;
|
|
1452
1449
|
}
|
|
1453
1450
|
});
|
|
1454
|
-
var v =
|
|
1455
|
-
|
|
1451
|
+
var v = U, _ = B;
|
|
1452
|
+
We(null), gt(null);
|
|
1456
1453
|
try {
|
|
1457
1454
|
for (var p, c = []; i !== null; ) {
|
|
1458
1455
|
var h = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
@@ -1463,9 +1460,9 @@ function cr(e) {
|
|
|
1463
1460
|
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1464
1461
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1465
1462
|
e.target === i))
|
|
1466
|
-
if (
|
|
1467
|
-
var [g, ...
|
|
1468
|
-
g.apply(i, [e, ...
|
|
1463
|
+
if (gn(E)) {
|
|
1464
|
+
var [g, ...m] = E;
|
|
1465
|
+
g.apply(i, [e, ...m]);
|
|
1469
1466
|
} else
|
|
1470
1467
|
E.call(i, e);
|
|
1471
1468
|
} catch (S) {
|
|
@@ -1483,64 +1480,64 @@ function cr(e) {
|
|
|
1483
1480
|
throw p;
|
|
1484
1481
|
}
|
|
1485
1482
|
} finally {
|
|
1486
|
-
e.__root = t, delete e.currentTarget,
|
|
1483
|
+
e.__root = t, delete e.currentTarget, We(v), gt(_);
|
|
1487
1484
|
}
|
|
1488
1485
|
}
|
|
1489
1486
|
}
|
|
1490
|
-
function
|
|
1487
|
+
function ao(e) {
|
|
1491
1488
|
var t = document.createElement("template");
|
|
1492
1489
|
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
|
|
1493
1490
|
}
|
|
1494
|
-
function
|
|
1491
|
+
function pt(e, t) {
|
|
1495
1492
|
var r = (
|
|
1496
1493
|
/** @type {Effect} */
|
|
1497
|
-
|
|
1494
|
+
B
|
|
1498
1495
|
);
|
|
1499
1496
|
r.nodes_start === null && (r.nodes_start = e, r.nodes_end = t);
|
|
1500
1497
|
}
|
|
1501
1498
|
// @__NO_SIDE_EFFECTS__
|
|
1502
1499
|
function R(e, t) {
|
|
1503
|
-
var r = (t &
|
|
1500
|
+
var r = (t & si) !== 0, n = (t & li) !== 0, a, i = !e.startsWith("<!>");
|
|
1504
1501
|
return () => {
|
|
1505
|
-
if (
|
|
1506
|
-
return
|
|
1507
|
-
a === void 0 && (a =
|
|
1508
|
-
/* @__PURE__ */
|
|
1502
|
+
if (V)
|
|
1503
|
+
return pt(G, null), G;
|
|
1504
|
+
a === void 0 && (a = ao(i ? e : "<!>" + e), r || (a = /** @type {Node} */
|
|
1505
|
+
/* @__PURE__ */ ht(a)));
|
|
1509
1506
|
var o = (
|
|
1510
1507
|
/** @type {TemplateNode} */
|
|
1511
|
-
n ||
|
|
1508
|
+
n || _a ? document.importNode(a, !0) : a.cloneNode(!0)
|
|
1512
1509
|
);
|
|
1513
1510
|
if (r) {
|
|
1514
1511
|
var l = (
|
|
1515
1512
|
/** @type {TemplateNode} */
|
|
1516
|
-
/* @__PURE__ */
|
|
1513
|
+
/* @__PURE__ */ ht(o)
|
|
1517
1514
|
), d = (
|
|
1518
1515
|
/** @type {TemplateNode} */
|
|
1519
1516
|
o.lastChild
|
|
1520
1517
|
);
|
|
1521
|
-
|
|
1518
|
+
pt(l, d);
|
|
1522
1519
|
} else
|
|
1523
|
-
|
|
1520
|
+
pt(o, o);
|
|
1524
1521
|
return o;
|
|
1525
1522
|
};
|
|
1526
1523
|
}
|
|
1527
|
-
function
|
|
1528
|
-
if (!
|
|
1529
|
-
var t =
|
|
1530
|
-
return
|
|
1524
|
+
function io(e = "") {
|
|
1525
|
+
if (!V) {
|
|
1526
|
+
var t = Je(e + "");
|
|
1527
|
+
return pt(t, t), t;
|
|
1531
1528
|
}
|
|
1532
1529
|
var r = G;
|
|
1533
|
-
return r.nodeType !==
|
|
1530
|
+
return r.nodeType !== En && (r.before(r = Je()), Ie(r)), pt(r, r), r;
|
|
1534
1531
|
}
|
|
1535
|
-
function
|
|
1536
|
-
if (
|
|
1537
|
-
return
|
|
1538
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), r =
|
|
1539
|
-
return e.append(t, r),
|
|
1532
|
+
function rt() {
|
|
1533
|
+
if (V)
|
|
1534
|
+
return pt(G, null), G;
|
|
1535
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = Je();
|
|
1536
|
+
return e.append(t, r), pt(t, r), e;
|
|
1540
1537
|
}
|
|
1541
1538
|
function j(e, t) {
|
|
1542
|
-
if (
|
|
1543
|
-
|
|
1539
|
+
if (V) {
|
|
1540
|
+
B.nodes_end = G, Br();
|
|
1544
1541
|
return;
|
|
1545
1542
|
}
|
|
1546
1543
|
e !== null && e.before(
|
|
@@ -1548,103 +1545,103 @@ function j(e, t) {
|
|
|
1548
1545
|
t
|
|
1549
1546
|
);
|
|
1550
1547
|
}
|
|
1551
|
-
const
|
|
1552
|
-
function
|
|
1553
|
-
return
|
|
1548
|
+
const oo = ["touchstart", "touchmove"];
|
|
1549
|
+
function so(e) {
|
|
1550
|
+
return oo.includes(e);
|
|
1554
1551
|
}
|
|
1555
1552
|
function le(e, t) {
|
|
1556
1553
|
var r = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1557
1554
|
r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = r + "");
|
|
1558
1555
|
}
|
|
1559
|
-
function
|
|
1560
|
-
return
|
|
1556
|
+
function Ra(e, t) {
|
|
1557
|
+
return La(e, t);
|
|
1561
1558
|
}
|
|
1562
|
-
function
|
|
1563
|
-
|
|
1564
|
-
const r = t.target, n =
|
|
1559
|
+
function lo(e, t) {
|
|
1560
|
+
dn(), t.intro = t.intro ?? !1;
|
|
1561
|
+
const r = t.target, n = V, a = G;
|
|
1565
1562
|
try {
|
|
1566
1563
|
for (var i = (
|
|
1567
1564
|
/** @type {TemplateNode} */
|
|
1568
|
-
/* @__PURE__ */
|
|
1569
|
-
); i && (i.nodeType !==
|
|
1570
|
-
i.data !==
|
|
1565
|
+
/* @__PURE__ */ ht(r)
|
|
1566
|
+
); i && (i.nodeType !== _r || /** @type {Comment} */
|
|
1567
|
+
i.data !== Gn); )
|
|
1571
1568
|
i = /** @type {TemplateNode} */
|
|
1572
|
-
/* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ ot(i);
|
|
1573
1570
|
if (!i)
|
|
1574
|
-
throw
|
|
1575
|
-
|
|
1571
|
+
throw Gt;
|
|
1572
|
+
et(!0), Ie(
|
|
1576
1573
|
/** @type {Comment} */
|
|
1577
1574
|
i
|
|
1578
|
-
),
|
|
1579
|
-
const o =
|
|
1580
|
-
if (G === null || G.nodeType !==
|
|
1581
|
-
G.data !==
|
|
1582
|
-
throw
|
|
1583
|
-
return
|
|
1575
|
+
), Br();
|
|
1576
|
+
const o = La(e, { ...t, anchor: i });
|
|
1577
|
+
if (G === null || G.nodeType !== _r || /** @type {Comment} */
|
|
1578
|
+
G.data !== hn)
|
|
1579
|
+
throw Ur(), Gt;
|
|
1580
|
+
return et(!1), /** @type {Exports} */
|
|
1584
1581
|
o;
|
|
1585
1582
|
} catch (o) {
|
|
1586
1583
|
if (o instanceof Error && o.message.split(`
|
|
1587
1584
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1588
1585
|
throw o;
|
|
1589
|
-
return o !==
|
|
1586
|
+
return o !== Gt && console.warn("Failed to hydrate: ", o), t.recover === !1 && $i(), dn(), Tn(r), et(!1), Ra(e, t);
|
|
1590
1587
|
} finally {
|
|
1591
|
-
|
|
1588
|
+
et(n), Ie(a);
|
|
1592
1589
|
}
|
|
1593
1590
|
}
|
|
1594
|
-
const
|
|
1595
|
-
function
|
|
1596
|
-
|
|
1597
|
-
var l = /* @__PURE__ */ new Set(), d = (
|
|
1598
|
-
for (var p = 0; p <
|
|
1599
|
-
var c =
|
|
1591
|
+
const Jt = /* @__PURE__ */ new Map();
|
|
1592
|
+
function La(e, { target: t, anchor: r, props: n = {}, events: a, context: i, intro: o = !0 }) {
|
|
1593
|
+
dn();
|
|
1594
|
+
var l = /* @__PURE__ */ new Set(), d = (_) => {
|
|
1595
|
+
for (var p = 0; p < _.length; p++) {
|
|
1596
|
+
var c = _[p];
|
|
1600
1597
|
if (!l.has(c)) {
|
|
1601
1598
|
l.add(c);
|
|
1602
|
-
var h =
|
|
1603
|
-
t.addEventListener(c,
|
|
1604
|
-
var E =
|
|
1605
|
-
E === void 0 ? (document.addEventListener(c,
|
|
1599
|
+
var h = so(c);
|
|
1600
|
+
t.addEventListener(c, vr, { passive: h });
|
|
1601
|
+
var E = Jt.get(c);
|
|
1602
|
+
E === void 0 ? (document.addEventListener(c, vr, { passive: h }), Jt.set(c, 1)) : Jt.set(c, E + 1);
|
|
1606
1603
|
}
|
|
1607
1604
|
}
|
|
1608
1605
|
};
|
|
1609
|
-
d(
|
|
1610
|
-
var u = void 0, v =
|
|
1611
|
-
var
|
|
1612
|
-
return
|
|
1606
|
+
d(mn(Da)), cn.add(d);
|
|
1607
|
+
var u = void 0, v = Wi(() => {
|
|
1608
|
+
var _ = r ?? t.appendChild(Je());
|
|
1609
|
+
return ir(() => {
|
|
1613
1610
|
if (i) {
|
|
1614
|
-
|
|
1611
|
+
at({});
|
|
1615
1612
|
var p = (
|
|
1616
1613
|
/** @type {ComponentContext} */
|
|
1617
1614
|
Oe
|
|
1618
1615
|
);
|
|
1619
1616
|
p.c = i;
|
|
1620
1617
|
}
|
|
1621
|
-
a && (n.$$events = a),
|
|
1618
|
+
a && (n.$$events = a), V && pt(
|
|
1622
1619
|
/** @type {TemplateNode} */
|
|
1623
|
-
|
|
1620
|
+
_,
|
|
1624
1621
|
null
|
|
1625
|
-
), u = e(
|
|
1622
|
+
), u = e(_, n) || {}, V && (B.nodes_end = G), i && it();
|
|
1626
1623
|
}), () => {
|
|
1627
1624
|
for (var p of l) {
|
|
1628
|
-
t.removeEventListener(p,
|
|
1625
|
+
t.removeEventListener(p, vr);
|
|
1629
1626
|
var c = (
|
|
1630
1627
|
/** @type {number} */
|
|
1631
|
-
|
|
1628
|
+
Jt.get(p)
|
|
1632
1629
|
);
|
|
1633
|
-
--c === 0 ? (document.removeEventListener(p,
|
|
1630
|
+
--c === 0 ? (document.removeEventListener(p, vr), Jt.delete(p)) : Jt.set(p, c);
|
|
1634
1631
|
}
|
|
1635
|
-
|
|
1632
|
+
cn.delete(d), _ !== r && _.parentNode?.removeChild(_);
|
|
1636
1633
|
};
|
|
1637
1634
|
});
|
|
1638
|
-
return
|
|
1635
|
+
return un.set(u, v), u;
|
|
1639
1636
|
}
|
|
1640
|
-
let
|
|
1641
|
-
function
|
|
1642
|
-
const r =
|
|
1643
|
-
return r ? (
|
|
1637
|
+
let un = /* @__PURE__ */ new WeakMap();
|
|
1638
|
+
function co(e, t) {
|
|
1639
|
+
const r = un.get(e);
|
|
1640
|
+
return r ? (un.delete(e), r(t)) : Promise.resolve();
|
|
1644
1641
|
}
|
|
1645
|
-
function
|
|
1646
|
-
Oe === null &&
|
|
1647
|
-
const t =
|
|
1642
|
+
function or(e) {
|
|
1643
|
+
Oe === null && bi(), wa(() => {
|
|
1644
|
+
const t = Wr(e);
|
|
1648
1645
|
if (typeof t == "function") return (
|
|
1649
1646
|
/** @type {() => void} */
|
|
1650
1647
|
t
|
|
@@ -1652,47 +1649,47 @@ function ar(e) {
|
|
|
1652
1649
|
});
|
|
1653
1650
|
}
|
|
1654
1651
|
function Y(e, t, r = !1) {
|
|
1655
|
-
|
|
1656
|
-
var n = e, a = null, i = null, o = ce, l = r ?
|
|
1652
|
+
V && Br();
|
|
1653
|
+
var n = e, a = null, i = null, o = ce, l = r ? yn : 0, d = !1;
|
|
1657
1654
|
const u = (c, h = !0) => {
|
|
1658
1655
|
d = !0, p(h, c);
|
|
1659
1656
|
};
|
|
1660
1657
|
var v = null;
|
|
1661
|
-
function
|
|
1658
|
+
function _() {
|
|
1662
1659
|
v !== null && (v.lastChild.remove(), n.before(v), v = null);
|
|
1663
1660
|
var c = o ? a : i, h = o ? i : a;
|
|
1664
|
-
c &&
|
|
1661
|
+
c && An(c), h && qn(h, () => {
|
|
1665
1662
|
o ? i = null : a = null;
|
|
1666
1663
|
});
|
|
1667
1664
|
}
|
|
1668
1665
|
const p = (c, h) => {
|
|
1669
1666
|
if (o === (o = c)) return;
|
|
1670
1667
|
let E = !1;
|
|
1671
|
-
if (
|
|
1672
|
-
const
|
|
1673
|
-
!!o ===
|
|
1668
|
+
if (V) {
|
|
1669
|
+
const M = ta(n) === pn;
|
|
1670
|
+
!!o === M && (n = on(), Ie(n), et(!1), E = !0);
|
|
1674
1671
|
}
|
|
1675
|
-
var g =
|
|
1676
|
-
if (g && (v = document.createDocumentFragment(), v.append(
|
|
1672
|
+
var g = ya(), m = n;
|
|
1673
|
+
if (g && (v = document.createDocumentFragment(), v.append(m = Je())), o ? a ?? (a = h && ir(() => h(m))) : i ?? (i = h && ir(() => h(m))), g) {
|
|
1677
1674
|
var S = (
|
|
1678
1675
|
/** @type {Batch} */
|
|
1679
1676
|
Q
|
|
1680
1677
|
), A = o ? a : i, O = o ? i : a;
|
|
1681
|
-
A && S.skipped_effects.delete(A), O && S.skipped_effects.add(O), S.add_callback(
|
|
1678
|
+
A && S.skipped_effects.delete(A), O && S.skipped_effects.add(O), S.add_callback(_);
|
|
1682
1679
|
} else
|
|
1683
|
-
|
|
1684
|
-
E &&
|
|
1680
|
+
_();
|
|
1681
|
+
E && et(!0);
|
|
1685
1682
|
};
|
|
1686
|
-
|
|
1683
|
+
Sa(() => {
|
|
1687
1684
|
d = !1, t(u), d || p(null, null);
|
|
1688
|
-
}, l),
|
|
1685
|
+
}, l), V && (n = G);
|
|
1689
1686
|
}
|
|
1690
|
-
function
|
|
1687
|
+
function yr(e, t) {
|
|
1691
1688
|
return t;
|
|
1692
1689
|
}
|
|
1693
|
-
function
|
|
1690
|
+
function uo(e, t, r) {
|
|
1694
1691
|
for (var n = e.items, a = [], i = t.length, o = 0; o < i; o++)
|
|
1695
|
-
|
|
1692
|
+
jn(t[o].e, a, !0);
|
|
1696
1693
|
var l = i > 0 && a.length === 0 && r !== null;
|
|
1697
1694
|
if (l) {
|
|
1698
1695
|
var d = (
|
|
@@ -1700,139 +1697,139 @@ function lo(e, t, r) {
|
|
|
1700
1697
|
/** @type {Element} */
|
|
1701
1698
|
r.parentNode
|
|
1702
1699
|
);
|
|
1703
|
-
|
|
1700
|
+
Tn(d), d.append(
|
|
1704
1701
|
/** @type {Element} */
|
|
1705
1702
|
r
|
|
1706
1703
|
), n.clear(), Ue(e, t[0].prev, t[i - 1].next);
|
|
1707
1704
|
}
|
|
1708
|
-
|
|
1705
|
+
Aa(a, () => {
|
|
1709
1706
|
for (var u = 0; u < i; u++) {
|
|
1710
1707
|
var v = t[u];
|
|
1711
|
-
l || (n.delete(v.k), Ue(e, v.prev, v.next)),
|
|
1708
|
+
l || (n.delete(v.k), Ue(e, v.prev, v.next)), Ye(v.e, !l);
|
|
1712
1709
|
}
|
|
1713
1710
|
});
|
|
1714
1711
|
}
|
|
1715
|
-
function
|
|
1712
|
+
function kr(e, t, r, n, a, i = null) {
|
|
1716
1713
|
var o = e, l = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
|
|
1717
1714
|
{
|
|
1718
1715
|
var d = (
|
|
1719
1716
|
/** @type {Element} */
|
|
1720
1717
|
e
|
|
1721
1718
|
);
|
|
1722
|
-
o =
|
|
1719
|
+
o = V ? Ie(
|
|
1723
1720
|
/** @type {Comment | Text} */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
) : d.appendChild(
|
|
1721
|
+
/* @__PURE__ */ ht(d)
|
|
1722
|
+
) : d.appendChild(Je());
|
|
1726
1723
|
}
|
|
1727
|
-
|
|
1728
|
-
var u = null, v = !1,
|
|
1724
|
+
V && Br();
|
|
1725
|
+
var u = null, v = !1, _ = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ ca(() => {
|
|
1729
1726
|
var g = r();
|
|
1730
|
-
return
|
|
1727
|
+
return gn(g) ? g : g == null ? [] : mn(g);
|
|
1731
1728
|
}), c, h;
|
|
1732
1729
|
function E() {
|
|
1733
|
-
|
|
1730
|
+
fo(
|
|
1734
1731
|
h,
|
|
1735
1732
|
c,
|
|
1736
1733
|
l,
|
|
1737
|
-
|
|
1734
|
+
_,
|
|
1738
1735
|
o,
|
|
1739
1736
|
a,
|
|
1740
1737
|
t,
|
|
1741
1738
|
n,
|
|
1742
1739
|
r
|
|
1743
|
-
), i !== null && (c.length === 0 ? u ?
|
|
1740
|
+
), i !== null && (c.length === 0 ? u ? An(u) : u = ir(() => i(o)) : u !== null && qn(u, () => {
|
|
1744
1741
|
u = null;
|
|
1745
1742
|
}));
|
|
1746
1743
|
}
|
|
1747
|
-
|
|
1744
|
+
Sa(() => {
|
|
1748
1745
|
h ?? (h = /** @type {Effect} */
|
|
1749
|
-
|
|
1746
|
+
B), c = /** @type {V[]} */
|
|
1750
1747
|
s(p);
|
|
1751
1748
|
var g = c.length;
|
|
1752
1749
|
if (v && g === 0)
|
|
1753
1750
|
return;
|
|
1754
1751
|
v = g === 0;
|
|
1755
|
-
let
|
|
1756
|
-
if (
|
|
1757
|
-
var S =
|
|
1758
|
-
S !== (g === 0) && (o =
|
|
1759
|
-
}
|
|
1760
|
-
if (
|
|
1761
|
-
for (var A = null, O,
|
|
1762
|
-
if (G.nodeType ===
|
|
1763
|
-
G.data ===
|
|
1752
|
+
let m = !1;
|
|
1753
|
+
if (V) {
|
|
1754
|
+
var S = ta(o) === pn;
|
|
1755
|
+
S !== (g === 0) && (o = on(), Ie(o), et(!1), m = !0);
|
|
1756
|
+
}
|
|
1757
|
+
if (V) {
|
|
1758
|
+
for (var A = null, O, M = 0; M < g; M++) {
|
|
1759
|
+
if (G.nodeType === _r && /** @type {Comment} */
|
|
1760
|
+
G.data === hn) {
|
|
1764
1761
|
o = /** @type {Comment} */
|
|
1765
|
-
G,
|
|
1762
|
+
G, m = !0, et(!1);
|
|
1766
1763
|
break;
|
|
1767
1764
|
}
|
|
1768
|
-
var w = c[
|
|
1769
|
-
O =
|
|
1765
|
+
var w = c[M], N = n(w, M);
|
|
1766
|
+
O = fn(
|
|
1770
1767
|
G,
|
|
1771
1768
|
l,
|
|
1772
1769
|
A,
|
|
1773
1770
|
null,
|
|
1774
1771
|
w,
|
|
1775
1772
|
N,
|
|
1776
|
-
|
|
1773
|
+
M,
|
|
1777
1774
|
a,
|
|
1778
1775
|
t,
|
|
1779
1776
|
r
|
|
1780
1777
|
), l.items.set(N, O), A = O;
|
|
1781
1778
|
}
|
|
1782
|
-
g > 0 && Ie(
|
|
1779
|
+
g > 0 && Ie(on());
|
|
1783
1780
|
}
|
|
1784
|
-
if (
|
|
1785
|
-
g === 0 && i && (u =
|
|
1786
|
-
else if (
|
|
1781
|
+
if (V)
|
|
1782
|
+
g === 0 && i && (u = ir(() => i(o)));
|
|
1783
|
+
else if (ya()) {
|
|
1787
1784
|
var X = /* @__PURE__ */ new Set(), D = (
|
|
1788
1785
|
/** @type {Batch} */
|
|
1789
1786
|
Q
|
|
1790
1787
|
);
|
|
1791
|
-
for (
|
|
1792
|
-
w = c[
|
|
1793
|
-
var
|
|
1794
|
-
|
|
1788
|
+
for (M = 0; M < g; M += 1) {
|
|
1789
|
+
w = c[M], N = n(w, M);
|
|
1790
|
+
var H = l.items.get(N) ?? _.get(N);
|
|
1791
|
+
H ? Fa(H, w, M) : (O = fn(
|
|
1795
1792
|
null,
|
|
1796
1793
|
l,
|
|
1797
1794
|
null,
|
|
1798
1795
|
null,
|
|
1799
1796
|
w,
|
|
1800
1797
|
N,
|
|
1801
|
-
|
|
1798
|
+
M,
|
|
1802
1799
|
a,
|
|
1803
1800
|
t,
|
|
1804
1801
|
r,
|
|
1805
1802
|
!0
|
|
1806
|
-
),
|
|
1803
|
+
), _.set(N, O)), X.add(N);
|
|
1807
1804
|
}
|
|
1808
1805
|
for (const [W, ne] of l.items)
|
|
1809
1806
|
X.has(W) || D.skipped_effects.add(ne.e);
|
|
1810
1807
|
D.add_callback(E);
|
|
1811
1808
|
} else
|
|
1812
1809
|
E();
|
|
1813
|
-
|
|
1814
|
-
}),
|
|
1810
|
+
m && et(!0), s(p);
|
|
1811
|
+
}), V && (o = G);
|
|
1815
1812
|
}
|
|
1816
|
-
function
|
|
1817
|
-
var u = t.length, v = r.items,
|
|
1813
|
+
function fo(e, t, r, n, a, i, o, l, d) {
|
|
1814
|
+
var u = t.length, v = r.items, _ = r.first, p = _, c, h = null, E = [], g = [], m, S, A, O;
|
|
1818
1815
|
for (O = 0; O < u; O += 1) {
|
|
1819
|
-
if (
|
|
1820
|
-
var
|
|
1821
|
-
if (
|
|
1822
|
-
n.delete(S), v.set(S,
|
|
1816
|
+
if (m = t[O], S = l(m, O), A = v.get(S), A === void 0) {
|
|
1817
|
+
var M = n.get(S);
|
|
1818
|
+
if (M !== void 0) {
|
|
1819
|
+
n.delete(S), v.set(S, M);
|
|
1823
1820
|
var w = h ? h.next : p;
|
|
1824
|
-
Ue(r, h,
|
|
1821
|
+
Ue(r, h, M), Ue(r, M, w), tn(M, w, a), h = M;
|
|
1825
1822
|
} else {
|
|
1826
1823
|
var N = p ? (
|
|
1827
1824
|
/** @type {TemplateNode} */
|
|
1828
1825
|
p.e.nodes_start
|
|
1829
1826
|
) : a;
|
|
1830
|
-
h =
|
|
1827
|
+
h = fn(
|
|
1831
1828
|
N,
|
|
1832
1829
|
r,
|
|
1833
1830
|
h,
|
|
1834
1831
|
h === null ? r.first : h.next,
|
|
1835
|
-
|
|
1832
|
+
m,
|
|
1836
1833
|
S,
|
|
1837
1834
|
O,
|
|
1838
1835
|
i,
|
|
@@ -1843,19 +1840,19 @@ function co(e, t, r, n, a, i, o, l, d) {
|
|
|
1843
1840
|
v.set(S, h), E = [], g = [], p = h.next;
|
|
1844
1841
|
continue;
|
|
1845
1842
|
}
|
|
1846
|
-
if (
|
|
1843
|
+
if (Fa(A, m, O), (A.e.f & Re) !== 0 && An(A.e), A !== p) {
|
|
1847
1844
|
if (c !== void 0 && c.has(A)) {
|
|
1848
1845
|
if (E.length < g.length) {
|
|
1849
1846
|
var X = g[0], D;
|
|
1850
1847
|
h = X.prev;
|
|
1851
|
-
var
|
|
1848
|
+
var H = E[0], W = E[E.length - 1];
|
|
1852
1849
|
for (D = 0; D < E.length; D += 1)
|
|
1853
|
-
|
|
1850
|
+
tn(E[D], X, a);
|
|
1854
1851
|
for (D = 0; D < g.length; D += 1)
|
|
1855
1852
|
c.delete(g[D]);
|
|
1856
|
-
Ue(r,
|
|
1853
|
+
Ue(r, H.prev, W.next), Ue(r, h, H), Ue(r, W, X), p = X, h = W, O -= 1, E = [], g = [];
|
|
1857
1854
|
} else
|
|
1858
|
-
c.delete(A),
|
|
1855
|
+
c.delete(A), tn(A, p, a), Ue(r, A.prev, A.next), Ue(r, A, h === null ? r.first : h.next), Ue(r, h, A), h = A;
|
|
1859
1856
|
continue;
|
|
1860
1857
|
}
|
|
1861
1858
|
for (E = [], g = []; p !== null && p.k !== S; )
|
|
@@ -1867,24 +1864,24 @@ function co(e, t, r, n, a, i, o, l, d) {
|
|
|
1867
1864
|
E.push(A), h = A, p = A.next;
|
|
1868
1865
|
}
|
|
1869
1866
|
if (p !== null || c !== void 0) {
|
|
1870
|
-
for (var ne = c === void 0 ? [] :
|
|
1867
|
+
for (var ne = c === void 0 ? [] : mn(c); p !== null; )
|
|
1871
1868
|
(p.e.f & Re) === 0 && ne.push(p), p = p.next;
|
|
1872
1869
|
var me = ne.length;
|
|
1873
1870
|
if (me > 0) {
|
|
1874
|
-
var
|
|
1875
|
-
|
|
1871
|
+
var F = u === 0 ? a : null;
|
|
1872
|
+
uo(r, ne, F);
|
|
1876
1873
|
}
|
|
1877
1874
|
}
|
|
1878
1875
|
e.first = r.first && r.first.e, e.last = h && h.e;
|
|
1879
1876
|
for (var K of n.values())
|
|
1880
|
-
|
|
1877
|
+
Ye(K.e);
|
|
1881
1878
|
n.clear();
|
|
1882
1879
|
}
|
|
1883
|
-
function
|
|
1884
|
-
|
|
1880
|
+
function Fa(e, t, r, n) {
|
|
1881
|
+
Dr(e.v, t), e.i = r;
|
|
1885
1882
|
}
|
|
1886
|
-
function
|
|
1887
|
-
var
|
|
1883
|
+
function fn(e, t, r, n, a, i, o, l, d, u, v) {
|
|
1884
|
+
var _ = (d & ei) !== 0, p = (d & ri) === 0, c = _ ? p ? /* @__PURE__ */ ga(a, !1, !1) : br(a) : a, h = (d & ti) === 0 ? o : br(o), E = {
|
|
1888
1885
|
i: h,
|
|
1889
1886
|
v: c,
|
|
1890
1887
|
k: i,
|
|
@@ -1897,19 +1894,19 @@ function cn(e, t, r, n, a, i, o, l, d, u, v) {
|
|
|
1897
1894
|
try {
|
|
1898
1895
|
if (e === null) {
|
|
1899
1896
|
var g = document.createDocumentFragment();
|
|
1900
|
-
g.append(e =
|
|
1897
|
+
g.append(e = Je());
|
|
1901
1898
|
}
|
|
1902
|
-
return E.e =
|
|
1899
|
+
return E.e = ir(() => l(
|
|
1903
1900
|
/** @type {Node} */
|
|
1904
1901
|
e,
|
|
1905
1902
|
c,
|
|
1906
1903
|
h,
|
|
1907
1904
|
u
|
|
1908
|
-
),
|
|
1905
|
+
), V), E.e.prev = r && r.e, E.e.next = n && n.e, r === null ? v || (t.first = E) : (r.next = E, r.e.next = E.e), n !== null && (n.prev = E, n.e.prev = E.e), E;
|
|
1909
1906
|
} finally {
|
|
1910
1907
|
}
|
|
1911
1908
|
}
|
|
1912
|
-
function
|
|
1909
|
+
function tn(e, t, r) {
|
|
1913
1910
|
for (var n = e.next ? (
|
|
1914
1911
|
/** @type {TemplateNode} */
|
|
1915
1912
|
e.next.e.nodes_start
|
|
@@ -1922,7 +1919,7 @@ function Zr(e, t, r) {
|
|
|
1922
1919
|
); i !== null && i !== n; ) {
|
|
1923
1920
|
var o = (
|
|
1924
1921
|
/** @type {TemplateNode} */
|
|
1925
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ ot(i)
|
|
1926
1923
|
);
|
|
1927
1924
|
a.before(i), i = o;
|
|
1928
1925
|
}
|
|
@@ -1930,8 +1927,8 @@ function Zr(e, t, r) {
|
|
|
1930
1927
|
function Ue(e, t, r) {
|
|
1931
1928
|
t === null ? e.first = r : (t.next = r, t.e.next = r && r.e), r !== null && (r.prev = t, r.e.prev = t && t.e);
|
|
1932
1929
|
}
|
|
1933
|
-
function
|
|
1934
|
-
|
|
1930
|
+
function cr(e, t) {
|
|
1931
|
+
Gi(() => {
|
|
1935
1932
|
var r = e.getRootNode(), n = (
|
|
1936
1933
|
/** @type {ShadowRoot} */
|
|
1937
1934
|
r.host ? (
|
|
@@ -1949,9 +1946,9 @@ function lr(e, t) {
|
|
|
1949
1946
|
}
|
|
1950
1947
|
});
|
|
1951
1948
|
}
|
|
1952
|
-
const
|
|
1949
|
+
const Vn = [...`
|
|
1953
1950
|
\r\f \v\uFEFF`];
|
|
1954
|
-
function
|
|
1951
|
+
function vo(e, t, r) {
|
|
1955
1952
|
var n = e == null ? "" : "" + e;
|
|
1956
1953
|
if (t && (n = n ? n + " " + t : t), r) {
|
|
1957
1954
|
for (var a in r)
|
|
@@ -1960,19 +1957,19 @@ function uo(e, t, r) {
|
|
|
1960
1957
|
else if (n.length)
|
|
1961
1958
|
for (var i = a.length, o = 0; (o = n.indexOf(a, o)) >= 0; ) {
|
|
1962
1959
|
var l = o + i;
|
|
1963
|
-
(o === 0 ||
|
|
1960
|
+
(o === 0 || Vn.includes(n[o - 1])) && (l === n.length || Vn.includes(n[l])) ? n = (o === 0 ? "" : n.substring(0, o)) + n.substring(l + 1) : o = l;
|
|
1964
1961
|
}
|
|
1965
1962
|
}
|
|
1966
1963
|
return n === "" ? null : n;
|
|
1967
1964
|
}
|
|
1968
|
-
function
|
|
1965
|
+
function po(e, t) {
|
|
1969
1966
|
return e == null ? null : String(e);
|
|
1970
1967
|
}
|
|
1971
|
-
function
|
|
1968
|
+
function pr(e, t, r, n, a, i) {
|
|
1972
1969
|
var o = e.__className;
|
|
1973
|
-
if (
|
|
1974
|
-
var l =
|
|
1975
|
-
(!
|
|
1970
|
+
if (V || o !== r || o === void 0) {
|
|
1971
|
+
var l = vo(r, n, i);
|
|
1972
|
+
(!V || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = r;
|
|
1976
1973
|
} else if (i && a !== i)
|
|
1977
1974
|
for (var d in i) {
|
|
1978
1975
|
var u = !!i[d];
|
|
@@ -1980,117 +1977,166 @@ function ur(e, t, r, n, a, i) {
|
|
|
1980
1977
|
}
|
|
1981
1978
|
return i;
|
|
1982
1979
|
}
|
|
1983
|
-
function
|
|
1980
|
+
function Jn(e, t, r, n) {
|
|
1984
1981
|
var a = e.__style;
|
|
1985
|
-
if (
|
|
1986
|
-
var i =
|
|
1987
|
-
(!
|
|
1982
|
+
if (V || a !== t) {
|
|
1983
|
+
var i = po(t);
|
|
1984
|
+
(!V || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
|
|
1988
1985
|
}
|
|
1989
1986
|
return n;
|
|
1990
1987
|
}
|
|
1991
|
-
const
|
|
1992
|
-
function
|
|
1993
|
-
if (
|
|
1988
|
+
const ho = Symbol("is custom element"), go = Symbol("is html");
|
|
1989
|
+
function sr(e) {
|
|
1990
|
+
if (V) {
|
|
1994
1991
|
var t = !1, r = () => {
|
|
1995
1992
|
if (!t) {
|
|
1996
1993
|
if (t = !0, e.hasAttribute("value")) {
|
|
1997
1994
|
var n = e.value;
|
|
1998
|
-
|
|
1995
|
+
mr(e, "value", null), e.value = n;
|
|
1999
1996
|
}
|
|
2000
1997
|
if (e.hasAttribute("checked")) {
|
|
2001
1998
|
var a = e.checked;
|
|
2002
|
-
|
|
1999
|
+
mr(e, "checked", null), e.checked = a;
|
|
2003
2000
|
}
|
|
2004
2001
|
}
|
|
2005
2002
|
};
|
|
2006
|
-
e.__on_r = r,
|
|
2003
|
+
e.__on_r = r, Oi(r), ka();
|
|
2007
2004
|
}
|
|
2008
2005
|
}
|
|
2009
|
-
function
|
|
2010
|
-
var r =
|
|
2006
|
+
function vn(e, t) {
|
|
2007
|
+
var r = Nn(e);
|
|
2011
2008
|
r.value === (r.value = // treat null and undefined the same for the initial value
|
|
2012
2009
|
t ?? void 0) || // @ts-expect-error
|
|
2013
2010
|
// `progress` elements always need their value set when it's `0`
|
|
2014
2011
|
e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
|
|
2015
2012
|
}
|
|
2016
|
-
function
|
|
2017
|
-
var r =
|
|
2013
|
+
function Ua(e, t) {
|
|
2014
|
+
var r = Nn(e);
|
|
2018
2015
|
r.checked !== (r.checked = // treat null and undefined the same for the initial value
|
|
2019
2016
|
t ?? void 0) && (e.checked = t);
|
|
2020
2017
|
}
|
|
2021
|
-
function
|
|
2022
|
-
var a =
|
|
2023
|
-
|
|
2018
|
+
function mr(e, t, r, n) {
|
|
2019
|
+
var a = Nn(e);
|
|
2020
|
+
V && (a[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || a[t] !== (a[t] = r) && (t === "loading" && (e[mi] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && mo(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2024
2021
|
}
|
|
2025
|
-
function
|
|
2022
|
+
function Nn(e) {
|
|
2026
2023
|
return (
|
|
2027
2024
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2028
2025
|
// @ts-expect-error
|
|
2029
2026
|
e.__attributes ?? (e.__attributes = {
|
|
2030
|
-
[
|
|
2031
|
-
[
|
|
2027
|
+
[ho]: e.nodeName.includes("-"),
|
|
2028
|
+
[go]: e.namespaceURI === di
|
|
2032
2029
|
})
|
|
2033
2030
|
);
|
|
2034
2031
|
}
|
|
2035
|
-
var
|
|
2036
|
-
function
|
|
2037
|
-
var t = e.getAttribute("is") || e.nodeName, r =
|
|
2032
|
+
var Yn = /* @__PURE__ */ new Map();
|
|
2033
|
+
function mo(e) {
|
|
2034
|
+
var t = e.getAttribute("is") || e.nodeName, r = Yn.get(t);
|
|
2038
2035
|
if (r) return r;
|
|
2039
|
-
|
|
2036
|
+
Yn.set(t, r = []);
|
|
2040
2037
|
for (var n, a = e, i = Element.prototype; i !== a; ) {
|
|
2041
|
-
n =
|
|
2038
|
+
n = ui(a);
|
|
2042
2039
|
for (var o in n)
|
|
2043
2040
|
n[o].set && r.push(o);
|
|
2044
|
-
a =
|
|
2041
|
+
a = Xn(a);
|
|
2045
2042
|
}
|
|
2046
2043
|
return r;
|
|
2047
2044
|
}
|
|
2048
|
-
function
|
|
2045
|
+
function Lr(e, t, r = t) {
|
|
2049
2046
|
var n = /* @__PURE__ */ new WeakSet();
|
|
2050
|
-
|
|
2047
|
+
Bi(e, "input", async (a) => {
|
|
2051
2048
|
var i = a ? e.defaultValue : e.value;
|
|
2052
|
-
if (i =
|
|
2049
|
+
if (i = rn(e) ? nn(i) : i, r(i), Q !== null && n.add(Q), await to(), i !== (i = t())) {
|
|
2053
2050
|
var o = e.selectionStart, l = e.selectionEnd;
|
|
2054
2051
|
e.value = i ?? "", l !== null && (e.selectionStart = o, e.selectionEnd = Math.min(l, e.value.length));
|
|
2055
2052
|
}
|
|
2056
2053
|
}), // If we are hydrating and the value has since changed,
|
|
2057
2054
|
// then use the updated value from the input instead.
|
|
2058
|
-
(
|
|
2055
|
+
(V && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
|
|
2059
2056
|
// TODO Svelte 6: remove input.value check and set to empty string?
|
|
2060
|
-
|
|
2057
|
+
Wr(t) == null && e.value) && (r(rn(e) ? nn(e.value) : e.value), Q !== null && n.add(Q)), $a(() => {
|
|
2061
2058
|
var a = t();
|
|
2062
2059
|
if (e === document.activeElement) {
|
|
2063
2060
|
var i = (
|
|
2064
2061
|
/** @type {Batch} */
|
|
2065
|
-
|
|
2062
|
+
Ir ?? Q
|
|
2066
2063
|
);
|
|
2067
2064
|
if (n.has(i))
|
|
2068
2065
|
return;
|
|
2069
2066
|
}
|
|
2070
|
-
|
|
2067
|
+
rn(e) && a === nn(e.value) || e.type === "date" && !a && !e.value || a !== e.value && (e.value = a ?? "");
|
|
2071
2068
|
});
|
|
2072
2069
|
}
|
|
2073
|
-
function
|
|
2070
|
+
function rn(e) {
|
|
2074
2071
|
var t = e.type;
|
|
2075
2072
|
return t === "number" || t === "range";
|
|
2076
2073
|
}
|
|
2077
|
-
function
|
|
2074
|
+
function nn(e) {
|
|
2078
2075
|
return e === "" ? null : +e;
|
|
2079
2076
|
}
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2077
|
+
function _o(e, t, r) {
|
|
2078
|
+
if (e == null)
|
|
2079
|
+
return t(void 0), Ct;
|
|
2080
|
+
const n = Wr(
|
|
2081
|
+
() => e.subscribe(
|
|
2082
|
+
t,
|
|
2083
|
+
// @ts-expect-error
|
|
2084
|
+
r
|
|
2085
|
+
)
|
|
2086
|
+
);
|
|
2087
|
+
return n.unsubscribe ? () => n.unsubscribe() : n;
|
|
2088
|
+
}
|
|
2089
|
+
const Yt = [];
|
|
2090
|
+
function bo(e, t = Ct) {
|
|
2091
|
+
let r = null;
|
|
2092
|
+
const n = /* @__PURE__ */ new Set();
|
|
2093
|
+
function a(l) {
|
|
2094
|
+
if (na(e, l) && (e = l, r)) {
|
|
2095
|
+
const d = !Yt.length;
|
|
2096
|
+
for (const u of n)
|
|
2097
|
+
u[1](), Yt.push(u, e);
|
|
2098
|
+
if (d) {
|
|
2099
|
+
for (let u = 0; u < Yt.length; u += 2)
|
|
2100
|
+
Yt[u][0](Yt[u + 1]);
|
|
2101
|
+
Yt.length = 0;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
function i(l) {
|
|
2106
|
+
a(l(
|
|
2107
|
+
/** @type {T} */
|
|
2108
|
+
e
|
|
2109
|
+
));
|
|
2110
|
+
}
|
|
2111
|
+
function o(l, d = Ct) {
|
|
2112
|
+
const u = [l, d];
|
|
2113
|
+
return n.add(u), n.size === 1 && (r = t(a, i) || Ct), l(
|
|
2114
|
+
/** @type {T} */
|
|
2115
|
+
e
|
|
2116
|
+
), () => {
|
|
2117
|
+
n.delete(u), n.size === 0 && r && (r(), r = null);
|
|
2118
|
+
};
|
|
2119
|
+
}
|
|
2120
|
+
return { set: a, update: i, subscribe: o };
|
|
2121
|
+
}
|
|
2122
|
+
function Ba(e) {
|
|
2123
|
+
let t;
|
|
2124
|
+
return _o(e, (r) => t = r)(), t;
|
|
2125
|
+
}
|
|
2126
|
+
let Ar = !1;
|
|
2127
|
+
function xo(e) {
|
|
2128
|
+
var t = Ar;
|
|
2083
2129
|
try {
|
|
2084
|
-
return
|
|
2130
|
+
return Ar = !1, [e(), Ar];
|
|
2085
2131
|
} finally {
|
|
2086
|
-
|
|
2132
|
+
Ar = t;
|
|
2087
2133
|
}
|
|
2088
2134
|
}
|
|
2089
2135
|
function ae(e, t, r, n) {
|
|
2090
|
-
var a = (r &
|
|
2136
|
+
var a = (r & ii) !== 0, i = (r & oi) !== 0, o = (
|
|
2091
2137
|
/** @type {V} */
|
|
2092
2138
|
n
|
|
2093
|
-
), l = !0, d = () => (l && (l = !1, o = i ?
|
|
2139
|
+
), l = !0, d = () => (l && (l = !1, o = i ? Wr(
|
|
2094
2140
|
/** @type {() => V} */
|
|
2095
2141
|
n
|
|
2096
2142
|
) : (
|
|
@@ -2098,15 +2144,15 @@ function ae(e, t, r, n) {
|
|
|
2098
2144
|
n
|
|
2099
2145
|
)), o), u;
|
|
2100
2146
|
if (a) {
|
|
2101
|
-
var v =
|
|
2147
|
+
var v = Nr in e || ea in e;
|
|
2102
2148
|
u = Ot(e, t)?.set ?? (v && t in e ? (S) => e[t] = S : void 0);
|
|
2103
2149
|
}
|
|
2104
|
-
var
|
|
2105
|
-
a ? [
|
|
2150
|
+
var _, p = !1;
|
|
2151
|
+
a ? [_, p] = xo(() => (
|
|
2106
2152
|
/** @type {V} */
|
|
2107
2153
|
e[t]
|
|
2108
|
-
)) :
|
|
2109
|
-
e[t]
|
|
2154
|
+
)) : _ = /** @type {V} */
|
|
2155
|
+
e[t];
|
|
2110
2156
|
var c;
|
|
2111
2157
|
if (c = () => {
|
|
2112
2158
|
var S = (
|
|
@@ -2114,7 +2160,7 @@ function ae(e, t, r, n) {
|
|
|
2114
2160
|
e[t]
|
|
2115
2161
|
);
|
|
2116
2162
|
return S === void 0 ? d() : (l = !0, S);
|
|
2117
|
-
}, (r &
|
|
2163
|
+
}, (r & ai) === 0)
|
|
2118
2164
|
return c;
|
|
2119
2165
|
if (u) {
|
|
2120
2166
|
var h = e.$$legacy;
|
|
@@ -2125,11 +2171,11 @@ function ae(e, t, r, n) {
|
|
|
2125
2171
|
})
|
|
2126
2172
|
);
|
|
2127
2173
|
}
|
|
2128
|
-
var E = !1, g = ((r &
|
|
2174
|
+
var E = !1, g = ((r & ni) !== 0 ? Hr : ca)(() => (E = !1, c()));
|
|
2129
2175
|
a && s(g);
|
|
2130
|
-
var
|
|
2176
|
+
var m = (
|
|
2131
2177
|
/** @type {Effect} */
|
|
2132
|
-
|
|
2178
|
+
B
|
|
2133
2179
|
);
|
|
2134
2180
|
return (
|
|
2135
2181
|
/** @type {() => V} */
|
|
@@ -2138,15 +2184,15 @@ function ae(e, t, r, n) {
|
|
|
2138
2184
|
const O = A ? s(g) : a ? Ae(S) : S;
|
|
2139
2185
|
return f(g, O), E = !0, o !== void 0 && (o = O), S;
|
|
2140
2186
|
}
|
|
2141
|
-
return
|
|
2187
|
+
return Lt && E || (m.f & Rt) !== 0 ? g.v : s(g);
|
|
2142
2188
|
})
|
|
2143
2189
|
);
|
|
2144
2190
|
}
|
|
2145
|
-
function
|
|
2146
|
-
return new
|
|
2191
|
+
function yo(e) {
|
|
2192
|
+
return new ko(e);
|
|
2147
2193
|
}
|
|
2148
|
-
var
|
|
2149
|
-
class
|
|
2194
|
+
var Ze, je;
|
|
2195
|
+
class ko {
|
|
2150
2196
|
/**
|
|
2151
2197
|
* @param {ComponentConstructorOptions & {
|
|
2152
2198
|
* component: any;
|
|
@@ -2154,11 +2200,11 @@ class _o {
|
|
|
2154
2200
|
*/
|
|
2155
2201
|
constructor(t) {
|
|
2156
2202
|
/** @type {any} */
|
|
2157
|
-
ue(this,
|
|
2203
|
+
ue(this, Ze);
|
|
2158
2204
|
/** @type {Record<string, any>} */
|
|
2159
2205
|
ue(this, je);
|
|
2160
2206
|
var r = /* @__PURE__ */ new Map(), n = (i, o) => {
|
|
2161
|
-
var l = /* @__PURE__ */
|
|
2207
|
+
var l = /* @__PURE__ */ ga(o, !1, !1);
|
|
2162
2208
|
return r.set(i, l), l;
|
|
2163
2209
|
};
|
|
2164
2210
|
const a = new Proxy(
|
|
@@ -2168,23 +2214,23 @@ class _o {
|
|
|
2168
2214
|
return s(r.get(o) ?? n(o, Reflect.get(i, o)));
|
|
2169
2215
|
},
|
|
2170
2216
|
has(i, o) {
|
|
2171
|
-
return o ===
|
|
2217
|
+
return o === ea ? !0 : (s(r.get(o) ?? n(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
2172
2218
|
},
|
|
2173
2219
|
set(i, o, l) {
|
|
2174
2220
|
return f(r.get(o) ?? n(o, l), l), Reflect.set(i, o, l);
|
|
2175
2221
|
}
|
|
2176
2222
|
}
|
|
2177
2223
|
);
|
|
2178
|
-
_e(this, je, (t.hydrate ?
|
|
2224
|
+
_e(this, je, (t.hydrate ? lo : Ra)(t.component, {
|
|
2179
2225
|
target: t.target,
|
|
2180
2226
|
anchor: t.anchor,
|
|
2181
2227
|
props: a,
|
|
2182
2228
|
context: t.context,
|
|
2183
2229
|
intro: t.intro ?? !1,
|
|
2184
2230
|
recover: t.recover
|
|
2185
|
-
})), (!t?.props?.$$host || t.sync === !1) && re(), _e(this,
|
|
2231
|
+
})), (!t?.props?.$$host || t.sync === !1) && re(), _e(this, Ze, a.$$events);
|
|
2186
2232
|
for (const i of Object.keys(C(this, je)))
|
|
2187
|
-
i === "$set" || i === "$destroy" || i === "$on" ||
|
|
2233
|
+
i === "$set" || i === "$destroy" || i === "$on" || tr(this, i, {
|
|
2188
2234
|
get() {
|
|
2189
2235
|
return C(this, je)[i];
|
|
2190
2236
|
},
|
|
@@ -2198,7 +2244,7 @@ class _o {
|
|
|
2198
2244
|
(i) => {
|
|
2199
2245
|
Object.assign(a, i);
|
|
2200
2246
|
}, C(this, je).$destroy = () => {
|
|
2201
|
-
|
|
2247
|
+
co(C(this, je));
|
|
2202
2248
|
};
|
|
2203
2249
|
}
|
|
2204
2250
|
/** @param {Record<string, any>} props */
|
|
@@ -2211,10 +2257,10 @@ class _o {
|
|
|
2211
2257
|
* @returns {any}
|
|
2212
2258
|
*/
|
|
2213
2259
|
$on(t, r) {
|
|
2214
|
-
C(this,
|
|
2260
|
+
C(this, Ze)[t] = C(this, Ze)[t] || [];
|
|
2215
2261
|
const n = (...a) => r.call(this, ...a);
|
|
2216
|
-
return C(this,
|
|
2217
|
-
C(this,
|
|
2262
|
+
return C(this, Ze)[t].push(n), () => {
|
|
2263
|
+
C(this, Ze)[t] = C(this, Ze)[t].filter(
|
|
2218
2264
|
/** @param {any} fn */
|
|
2219
2265
|
(a) => a !== n
|
|
2220
2266
|
);
|
|
@@ -2224,9 +2270,9 @@ class _o {
|
|
|
2224
2270
|
C(this, je).$destroy();
|
|
2225
2271
|
}
|
|
2226
2272
|
}
|
|
2227
|
-
|
|
2228
|
-
let
|
|
2229
|
-
typeof HTMLElement == "function" && (
|
|
2273
|
+
Ze = new WeakMap(), je = new WeakMap();
|
|
2274
|
+
let Ha;
|
|
2275
|
+
typeof HTMLElement == "function" && (Ha = class extends HTMLElement {
|
|
2230
2276
|
/**
|
|
2231
2277
|
* @param {*} $$componentCtor
|
|
2232
2278
|
* @param {*} $$slots
|
|
@@ -2289,16 +2335,16 @@ typeof HTMLElement == "function" && (La = class extends HTMLElement {
|
|
|
2289
2335
|
};
|
|
2290
2336
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2291
2337
|
return;
|
|
2292
|
-
const r = {}, n =
|
|
2338
|
+
const r = {}, n = wo(this);
|
|
2293
2339
|
for (const a of this.$$s)
|
|
2294
2340
|
a in n && (a === "default" && !this.$$d.children ? (this.$$d.children = t(a), r.default = !0) : r[a] = t(a));
|
|
2295
2341
|
for (const a of this.attributes) {
|
|
2296
2342
|
const i = this.$$g_p(a.name);
|
|
2297
|
-
i in this.$$d || (this.$$d[i] =
|
|
2343
|
+
i in this.$$d || (this.$$d[i] = Or(i, a.value, this.$$p_d, "toProp"));
|
|
2298
2344
|
}
|
|
2299
2345
|
for (const a in this.$$p_d)
|
|
2300
2346
|
!(a in this.$$d) && this[a] !== void 0 && (this.$$d[a] = this[a], delete this[a]);
|
|
2301
|
-
this.$$c =
|
|
2347
|
+
this.$$c = yo({
|
|
2302
2348
|
component: this.$$ctor,
|
|
2303
2349
|
target: this.shadowRoot || this,
|
|
2304
2350
|
props: {
|
|
@@ -2306,13 +2352,13 @@ typeof HTMLElement == "function" && (La = class extends HTMLElement {
|
|
|
2306
2352
|
$$slots: r,
|
|
2307
2353
|
$$host: this
|
|
2308
2354
|
}
|
|
2309
|
-
}), this.$$me =
|
|
2310
|
-
|
|
2355
|
+
}), this.$$me = Yi(() => {
|
|
2356
|
+
$a(() => {
|
|
2311
2357
|
this.$$r = !0;
|
|
2312
|
-
for (const a of
|
|
2358
|
+
for (const a of Cr(this.$$c)) {
|
|
2313
2359
|
if (!this.$$p_d[a]?.reflect) continue;
|
|
2314
2360
|
this.$$d[a] = this.$$c[a];
|
|
2315
|
-
const i =
|
|
2361
|
+
const i = Or(
|
|
2316
2362
|
a,
|
|
2317
2363
|
this.$$d[a],
|
|
2318
2364
|
this.$$p_d,
|
|
@@ -2339,7 +2385,7 @@ typeof HTMLElement == "function" && (La = class extends HTMLElement {
|
|
|
2339
2385
|
* @param {string} newValue
|
|
2340
2386
|
*/
|
|
2341
2387
|
attributeChangedCallback(t, r, n) {
|
|
2342
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] =
|
|
2388
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = Or(t, n, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
2343
2389
|
}
|
|
2344
2390
|
disconnectedCallback() {
|
|
2345
2391
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2350,12 +2396,12 @@ typeof HTMLElement == "function" && (La = class extends HTMLElement {
|
|
|
2350
2396
|
* @param {string} attribute_name
|
|
2351
2397
|
*/
|
|
2352
2398
|
$$g_p(t) {
|
|
2353
|
-
return
|
|
2399
|
+
return Cr(this.$$p_d).find(
|
|
2354
2400
|
(r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
|
|
2355
2401
|
) || t;
|
|
2356
2402
|
}
|
|
2357
2403
|
});
|
|
2358
|
-
function
|
|
2404
|
+
function Or(e, t, r, n) {
|
|
2359
2405
|
const a = r[e]?.type;
|
|
2360
2406
|
if (t = a === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e])
|
|
2361
2407
|
return t;
|
|
@@ -2385,7 +2431,7 @@ function Nr(e, t, r, n) {
|
|
|
2385
2431
|
return t;
|
|
2386
2432
|
}
|
|
2387
2433
|
}
|
|
2388
|
-
function
|
|
2434
|
+
function wo(e) {
|
|
2389
2435
|
const t = {};
|
|
2390
2436
|
return e.childNodes.forEach((r) => {
|
|
2391
2437
|
t[
|
|
@@ -2394,24 +2440,24 @@ function bo(e) {
|
|
|
2394
2440
|
] = !0;
|
|
2395
2441
|
}), t;
|
|
2396
2442
|
}
|
|
2397
|
-
function
|
|
2398
|
-
let o = class extends
|
|
2443
|
+
function xt(e, t, r, n, a, i) {
|
|
2444
|
+
let o = class extends Ha {
|
|
2399
2445
|
constructor() {
|
|
2400
2446
|
super(e, r, a), this.$$p_d = t;
|
|
2401
2447
|
}
|
|
2402
2448
|
static get observedAttributes() {
|
|
2403
|
-
return
|
|
2449
|
+
return Cr(t).map(
|
|
2404
2450
|
(l) => (t[l].attribute || l).toLowerCase()
|
|
2405
2451
|
);
|
|
2406
2452
|
}
|
|
2407
2453
|
};
|
|
2408
|
-
return
|
|
2409
|
-
|
|
2454
|
+
return Cr(t).forEach((l) => {
|
|
2455
|
+
tr(o.prototype, l, {
|
|
2410
2456
|
get() {
|
|
2411
2457
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2412
2458
|
},
|
|
2413
2459
|
set(d) {
|
|
2414
|
-
d =
|
|
2460
|
+
d = Or(l, d, t), this.$$d[l] = d;
|
|
2415
2461
|
var u = this.$$c;
|
|
2416
2462
|
if (u) {
|
|
2417
2463
|
var v = Ot(u, l)?.get;
|
|
@@ -2420,7 +2466,7 @@ function bt(e, t, r, n, a, i) {
|
|
|
2420
2466
|
}
|
|
2421
2467
|
});
|
|
2422
2468
|
}), n.forEach((l) => {
|
|
2423
|
-
|
|
2469
|
+
tr(o.prototype, l, {
|
|
2424
2470
|
get() {
|
|
2425
2471
|
return this.$$c?.[l];
|
|
2426
2472
|
}
|
|
@@ -2428,7 +2474,7 @@ function bt(e, t, r, n, a, i) {
|
|
|
2428
2474
|
}), e.element = /** @type {any} */
|
|
2429
2475
|
o, o;
|
|
2430
2476
|
}
|
|
2431
|
-
const
|
|
2477
|
+
const Ke = (e) => {
|
|
2432
2478
|
switch (e) {
|
|
2433
2479
|
case "aks_svi":
|
|
2434
2480
|
return "sviluppo";
|
|
@@ -2451,8 +2497,8 @@ const xt = (e) => {
|
|
|
2451
2497
|
default:
|
|
2452
2498
|
return "development";
|
|
2453
2499
|
}
|
|
2454
|
-
},
|
|
2455
|
-
switch (
|
|
2500
|
+
}, Eo = () => {
|
|
2501
|
+
switch (L.getEnvironmentId()) {
|
|
2456
2502
|
case "aks_svi":
|
|
2457
2503
|
return "http://localhost:8081/v1";
|
|
2458
2504
|
case "aks_qua":
|
|
@@ -2462,20 +2508,14 @@ const xt = (e) => {
|
|
|
2462
2508
|
default:
|
|
2463
2509
|
return "https://aks-audit-handler-back-573906316236.europe-west1.run.app/v1";
|
|
2464
2510
|
}
|
|
2465
|
-
},
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
}, ko = () => {
|
|
2469
|
-
const t = document.cookie.split(";").find((r) => r.includes("akb-audit-handler-envid"));
|
|
2470
|
-
return t ? t.split("=")[1] : "";
|
|
2471
|
-
}, wo = async () => {
|
|
2472
|
-
let e = V.getEnvironmentId(), t = `https://${xt(e)}.aksiliasuite.com/api/v1/check_permission/intelligenzaartificiale`;
|
|
2473
|
-
e == "aks_svi" && (t = "http://mike.aksiliasuite.com/api/v1/check_permission/intelligenzaartificiale");
|
|
2511
|
+
}, $o = () => Ba(In).token || "", So = () => Ba(In).envId || "", To = async () => {
|
|
2512
|
+
let e = L.getEnvironmentId(), t = `https://${Ke(e)}.aksiliasuite.com/api/v1/check_permission/intelligenzaartificiale`;
|
|
2513
|
+
e == "aks_svi" && (t = "https://test.aksiliasuite.com/api/v1/check_permission/intelligenzaartificiale");
|
|
2474
2514
|
let r = await fetch(t, {
|
|
2475
2515
|
method: "GET",
|
|
2476
2516
|
headers: {
|
|
2477
2517
|
"Content-Type": "application/json",
|
|
2478
|
-
"x-token":
|
|
2518
|
+
"x-token": L.getToken(),
|
|
2479
2519
|
"ngrok-skip-browser-warning": "true"
|
|
2480
2520
|
}
|
|
2481
2521
|
});
|
|
@@ -2485,12 +2525,12 @@ const xt = (e) => {
|
|
|
2485
2525
|
console.log("User level data:", n);
|
|
2486
2526
|
let a = n.result.reduce((i, o) => Math.max(i, o.level), 0);
|
|
2487
2527
|
return console.log("Highest user level:", a), a;
|
|
2488
|
-
},
|
|
2489
|
-
getUrl:
|
|
2490
|
-
getToken:
|
|
2491
|
-
getEnvironmentId:
|
|
2492
|
-
};
|
|
2493
|
-
class
|
|
2528
|
+
}, L = {
|
|
2529
|
+
getUrl: Eo,
|
|
2530
|
+
getToken: $o,
|
|
2531
|
+
getEnvironmentId: So
|
|
2532
|
+
}, In = bo({ token: "", envId: "" });
|
|
2533
|
+
class mt {
|
|
2494
2534
|
constructor(t, r, n, a, i, o) {
|
|
2495
2535
|
te(this, "_id");
|
|
2496
2536
|
te(this, "name");
|
|
@@ -2511,70 +2551,70 @@ class gt {
|
|
|
2511
2551
|
};
|
|
2512
2552
|
}
|
|
2513
2553
|
static fromJSON(t) {
|
|
2514
|
-
return new
|
|
2554
|
+
return new mt(t._id, t.name, t.status, t.ai_output || [], t.response_id, t.suite_id);
|
|
2515
2555
|
}
|
|
2516
2556
|
}
|
|
2517
|
-
const
|
|
2518
|
-
const r = await (await fetch(`${
|
|
2557
|
+
const qo = async (e) => {
|
|
2558
|
+
const r = await (await fetch(`${L.getUrl()}/${e}`, {
|
|
2519
2559
|
headers: {
|
|
2520
|
-
envid:
|
|
2521
|
-
akstoken:
|
|
2560
|
+
envid: L.getEnvironmentId(),
|
|
2561
|
+
akstoken: L.getToken()
|
|
2522
2562
|
}
|
|
2523
2563
|
})).json();
|
|
2524
|
-
return
|
|
2525
|
-
},
|
|
2564
|
+
return mt.fromJSON(r.result);
|
|
2565
|
+
}, jo = async () => (await (await fetch(`${L.getUrl()}/`, {
|
|
2526
2566
|
headers: {
|
|
2527
|
-
envid:
|
|
2528
|
-
akstoken:
|
|
2567
|
+
envid: L.getEnvironmentId(),
|
|
2568
|
+
akstoken: L.getToken()
|
|
2529
2569
|
}
|
|
2530
|
-
})).json()).result.map((r) =>
|
|
2570
|
+
})).json()).result.map((r) => mt.fromJSON(r)), Ao = async (e, t) => {
|
|
2531
2571
|
const r = new FormData();
|
|
2532
2572
|
r.append("name", e), r.append("file", t);
|
|
2533
|
-
const n = await fetch(`${
|
|
2573
|
+
const n = await fetch(`${L.getUrl()}/`, {
|
|
2534
2574
|
method: "POST",
|
|
2535
2575
|
headers: {
|
|
2536
|
-
envid:
|
|
2537
|
-
akstoken:
|
|
2576
|
+
envid: L.getEnvironmentId(),
|
|
2577
|
+
akstoken: L.getToken()
|
|
2538
2578
|
},
|
|
2539
2579
|
body: r
|
|
2540
2580
|
});
|
|
2541
2581
|
if (!n.ok)
|
|
2542
2582
|
throw new Error(`Error creating audit: ${n.statusText}`);
|
|
2543
2583
|
const a = await n.json();
|
|
2544
|
-
return
|
|
2545
|
-
},
|
|
2546
|
-
const t = await fetch(`${
|
|
2584
|
+
return mt.fromJSON(a.result);
|
|
2585
|
+
}, No = async (e) => {
|
|
2586
|
+
const t = await fetch(`${L.getUrl()}/${e._id}`, {
|
|
2547
2587
|
method: "PUT",
|
|
2548
2588
|
headers: {
|
|
2549
2589
|
"Content-Type": "application/json",
|
|
2550
|
-
envid:
|
|
2551
|
-
akstoken:
|
|
2590
|
+
envid: L.getEnvironmentId(),
|
|
2591
|
+
akstoken: L.getToken()
|
|
2552
2592
|
},
|
|
2553
2593
|
body: JSON.stringify(e.toJSON())
|
|
2554
2594
|
});
|
|
2555
2595
|
if (!t.ok)
|
|
2556
2596
|
throw new Error(`Error updating audit: ${t.statusText}`);
|
|
2557
2597
|
const r = await t.json();
|
|
2558
|
-
return
|
|
2559
|
-
},
|
|
2560
|
-
const t = await fetch(`${
|
|
2598
|
+
return mt.fromJSON(r);
|
|
2599
|
+
}, Io = async (e) => {
|
|
2600
|
+
const t = await fetch(`${L.getUrl()}/${e}`, {
|
|
2561
2601
|
method: "DELETE",
|
|
2562
2602
|
headers: {
|
|
2563
|
-
envid:
|
|
2564
|
-
akstoken:
|
|
2603
|
+
envid: L.getEnvironmentId(),
|
|
2604
|
+
akstoken: L.getToken()
|
|
2565
2605
|
}
|
|
2566
2606
|
});
|
|
2567
2607
|
if (!t.ok)
|
|
2568
2608
|
throw new Error(`Error deleting audit: ${t.statusText}`);
|
|
2569
2609
|
}, Be = {
|
|
2570
|
-
get:
|
|
2571
|
-
getAll:
|
|
2572
|
-
create:
|
|
2573
|
-
update:
|
|
2574
|
-
delete:
|
|
2610
|
+
get: qo,
|
|
2611
|
+
getAll: jo,
|
|
2612
|
+
create: Ao,
|
|
2613
|
+
update: No,
|
|
2614
|
+
delete: Io
|
|
2575
2615
|
};
|
|
2576
|
-
var
|
|
2577
|
-
const
|
|
2616
|
+
var zo = /* @__PURE__ */ R('<div class="d-flex justify-content-center align-items-center" style="height: 200px;"><div class="spinner-border text-primary" role="status"><span class="visually-hidden">Loading...</span></div></div>'), Oo = /* @__PURE__ */ R('<div class="alert alert-info" role="alert">Nessun audit disponibile. Crea un nuovo assessment per iniziare.</div>'), Co = (e, t, r) => t()(s(r)._id), Po = (e, t, r) => e.key === "Enter" && t()(s(r)._id), Mo = (e, t, r) => t(s(r)._id, e), Do = /* @__PURE__ */ R('<div class="audit-card svelte-k2fv35" role="button" tabindex="0"><div class="card-decoration svelte-k2fv35"><i class="fa-solid fa-file-lines svelte-k2fv35"></i></div> <div class="card-content svelte-k2fv35"><h3 class="svelte-k2fv35"> </h3> <div class="card-footer svelte-k2fv35"><span class="view-label svelte-k2fv35"><i class="fa-solid fa-eye svelte-k2fv35"></i> Visualizza</span></div></div> <button class="btn-delete svelte-k2fv35" title="Elimina audit" aria-label="Elimina audit"><i class="fa-solid fa-trash svelte-k2fv35"></i></button></div>'), Ro = /* @__PURE__ */ R('<div class="audit-list svelte-k2fv35"></div>');
|
|
2617
|
+
const Lo = {
|
|
2578
2618
|
hash: "svelte-k2fv35",
|
|
2579
2619
|
code: `.audit-list.svelte-k2fv35 {display:grid;grid-template-columns:repeat(auto-fill, minmax(350px, 1fr));gap:2rem;padding:1rem 0;}.audit-card.svelte-k2fv35 {background:linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);border:2px solid #e9ecef;border-radius:16px;padding:0;cursor:pointer;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);text-align:left;position:relative;overflow:hidden;box-shadow:0 2px 8px rgba(0, 0, 0, 0.08);}.audit-card.svelte-k2fv35::before {content:"";position:absolute;top:0;left:0;width:100%;height:4px;background:linear-gradient(90deg, #295dcf 0%, #1e4aad 100%);transform:scaleX(0);transform-origin:left;transition:transform 0.3s ease;}.audit-card.svelte-k2fv35:hover::before {transform:scaleX(1);}.audit-card.svelte-k2fv35:hover {border-color:#295dcf;box-shadow:0 8px 24px rgba(41, 93, 207, 0.15),\r
|
|
2580
2620
|
0 4px 12px rgba(0, 0, 0, 0.1);transform:translateY(-4px);}.card-decoration.svelte-k2fv35 {background:linear-gradient(135deg, #295dcf 0%, #1e4aad 100%);padding:2rem;display:flex;align-items:center;justify-content:center;}.card-decoration.svelte-k2fv35 i:where(.svelte-k2fv35) {font-size:3rem;color:white;opacity:0.9;transition:all 0.3s ease;}.audit-card.svelte-k2fv35:hover .card-decoration:where(.svelte-k2fv35) i:where(.svelte-k2fv35) {transform:scale(1.1) rotate(5deg);opacity:1;}.card-content.svelte-k2fv35 {padding:1.5rem 2rem 1.25rem;}.audit-card.svelte-k2fv35 h3:where(.svelte-k2fv35) {margin:0 0 1rem 0;color:#2c3e50;font-size:1.25rem;font-weight:600;line-height:1.4;min-height:2.8rem;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;transition:color 0.3s ease;}.audit-card.svelte-k2fv35:hover h3:where(.svelte-k2fv35) {color:#295dcf;}.card-footer.svelte-k2fv35 {display:flex;align-items:center;padding-top:0.75rem;border-top:1px solid #e9ecef;}.view-label.svelte-k2fv35 {display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:#6c757d;font-weight:500;transition:color 0.3s ease;}.view-label.svelte-k2fv35 i:where(.svelte-k2fv35) {font-size:1rem;transition:transform 0.3s ease;}.audit-card.svelte-k2fv35:hover .view-label:where(.svelte-k2fv35) {color:#295dcf;}.audit-card.svelte-k2fv35:hover .view-label:where(.svelte-k2fv35) i:where(.svelte-k2fv35) {transform:translateX(3px);}.btn-delete.svelte-k2fv35 {position:absolute;top:12px;right:12px;background:rgba(255, 255, 255, 0.95);border:1px solid #dc3545;border-radius:8px;padding:0.5rem 0.75rem;cursor:pointer;transition:all 0.3s ease;color:#dc3545;font-size:0.9rem;z-index:10;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);}.btn-delete.svelte-k2fv35:hover {background:#dc3545;color:white;transform:scale(1.1);box-shadow:0 4px 8px rgba(220, 53, 69, 0.3);}.btn-delete.svelte-k2fv35 i:where(.svelte-k2fv35) {pointer-events:none;}\r
|
|
@@ -2583,10 +2623,10 @@ const Mo = {
|
|
|
2583
2623
|
@media (max-width: 768px) {.audit-list.svelte-k2fv35 {grid-template-columns:1fr;gap:1.5rem;}\r
|
|
2584
2624
|
}`
|
|
2585
2625
|
};
|
|
2586
|
-
function
|
|
2587
|
-
|
|
2626
|
+
function Va(e, t) {
|
|
2627
|
+
at(t, !0), cr(e, Lo);
|
|
2588
2628
|
let r = /* @__PURE__ */ z(Ae([])), n = /* @__PURE__ */ z(!0), a = ae(t, "onSelectAudit", 7);
|
|
2589
|
-
|
|
2629
|
+
or(async () => {
|
|
2590
2630
|
f(r, await Be.getAll(), !0);
|
|
2591
2631
|
const p = new URLSearchParams(window.location.search).get("auditId");
|
|
2592
2632
|
if (window.location.search) {
|
|
@@ -2595,37 +2635,37 @@ function Fa(e, t) {
|
|
|
2595
2635
|
}
|
|
2596
2636
|
p && a()(p), f(n, !1);
|
|
2597
2637
|
});
|
|
2598
|
-
async function i(
|
|
2599
|
-
p.stopPropagation(), confirm("Sei sicuro di voler eliminare questo audit?") && (await Be.delete(
|
|
2638
|
+
async function i(_, p) {
|
|
2639
|
+
p.stopPropagation(), confirm("Sei sicuro di voler eliminare questo audit?") && (await Be.delete(_), f(r, s(r).filter((c) => c._id !== _), !0));
|
|
2600
2640
|
}
|
|
2601
2641
|
var o = {
|
|
2602
2642
|
get onSelectAudit() {
|
|
2603
2643
|
return a();
|
|
2604
2644
|
},
|
|
2605
|
-
set onSelectAudit(
|
|
2606
|
-
a(
|
|
2645
|
+
set onSelectAudit(_) {
|
|
2646
|
+
a(_), re();
|
|
2607
2647
|
}
|
|
2608
|
-
}, l =
|
|
2648
|
+
}, l = rt(), d = Ee(l);
|
|
2609
2649
|
{
|
|
2610
|
-
var u = (
|
|
2611
|
-
var p =
|
|
2612
|
-
j(
|
|
2613
|
-
}, v = (
|
|
2614
|
-
var p =
|
|
2650
|
+
var u = (_) => {
|
|
2651
|
+
var p = zo();
|
|
2652
|
+
j(_, p);
|
|
2653
|
+
}, v = (_) => {
|
|
2654
|
+
var p = rt(), c = Ee(p);
|
|
2615
2655
|
{
|
|
2616
2656
|
var h = (g) => {
|
|
2617
|
-
var
|
|
2618
|
-
j(g,
|
|
2657
|
+
var m = Oo();
|
|
2658
|
+
j(g, m);
|
|
2619
2659
|
}, E = (g) => {
|
|
2620
|
-
var
|
|
2621
|
-
|
|
2622
|
-
var O =
|
|
2623
|
-
O.__click = [
|
|
2624
|
-
var
|
|
2625
|
-
b(w),
|
|
2626
|
-
var X = $(
|
|
2627
|
-
X.__click = [
|
|
2628
|
-
}), b(
|
|
2660
|
+
var m = Ro();
|
|
2661
|
+
kr(m, 21, () => s(r), yr, (S, A) => {
|
|
2662
|
+
var O = Do();
|
|
2663
|
+
O.__click = [Co, a, A], O.__keydown = [Po, a, A];
|
|
2664
|
+
var M = $(y(O), 2), w = y(M), N = y(w, !0);
|
|
2665
|
+
b(w), hr(2), b(M);
|
|
2666
|
+
var X = $(M, 2);
|
|
2667
|
+
X.__click = [Mo, i, A], b(O), fe(() => le(N, s(A).name)), j(S, O);
|
|
2668
|
+
}), b(m), j(g, m);
|
|
2629
2669
|
};
|
|
2630
2670
|
Y(
|
|
2631
2671
|
c,
|
|
@@ -2635,18 +2675,18 @@ function Fa(e, t) {
|
|
|
2635
2675
|
!0
|
|
2636
2676
|
);
|
|
2637
2677
|
}
|
|
2638
|
-
j(
|
|
2678
|
+
j(_, p);
|
|
2639
2679
|
};
|
|
2640
|
-
Y(d, (
|
|
2641
|
-
s(n) ?
|
|
2680
|
+
Y(d, (_) => {
|
|
2681
|
+
s(n) ? _(u) : _(v, !1);
|
|
2642
2682
|
});
|
|
2643
2683
|
}
|
|
2644
|
-
return j(e, l),
|
|
2684
|
+
return j(e, l), it(o);
|
|
2645
2685
|
}
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
var
|
|
2649
|
-
const
|
|
2686
|
+
Ft(["click", "keydown"]);
|
|
2687
|
+
xt(Va, { onSelectAudit: {} }, [], [], !0);
|
|
2688
|
+
var Fo = (e, t) => e.key === "Escape" && t()(), Uo = (e) => e.stopPropagation(), Bo = (e) => e.stopPropagation(), Ho = /* @__PURE__ */ R('<textarea rows="6" class="modal-textarea svelte-1w4pq25"></textarea>'), Vo = /* @__PURE__ */ R('<input type="text" class="modal-input svelte-1w4pq25"/>'), Jo = /* @__PURE__ */ R('<span class="spinner svelte-1w4pq25"></span> Salvataggio...', 1), Yo = /* @__PURE__ */ R('<div class="modal-overlay svelte-1w4pq25" role="button" tabindex="0"><div class="modal-content svelte-1w4pq25" role="dialog" tabindex="-1"><div class="modal-header svelte-1w4pq25"><h2 class="svelte-1w4pq25"> </h2> <button class="modal-close svelte-1w4pq25">×</button></div> <div class="modal-body svelte-1w4pq25"><!></div> <div class="modal-footer svelte-1w4pq25"><button class="btn btn-secondary svelte-1w4pq25">Annulla</button> <button class="btn btn-primary svelte-1w4pq25"><!></button></div></div></div>');
|
|
2689
|
+
const Wo = {
|
|
2650
2690
|
hash: "svelte-1w4pq25",
|
|
2651
2691
|
code: `.modal-overlay.svelte-1w4pq25 {position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;}.modal-content.svelte-1w4pq25 {background:white;border-radius:8px;box-shadow:0 4px 6px rgba(0, 0, 0, 0.1);width:90%;max-width:600px;max-height:90vh;display:flex;flex-direction:column;}.modal-header.svelte-1w4pq25 {display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid #dee2e6;}.modal-header.svelte-1w4pq25 h2:where(.svelte-1w4pq25) {margin:0;font-size:1.5rem;color:#333;}.modal-close.svelte-1w4pq25 {background:none;border:none;font-size:2rem;cursor:pointer;color:#666;padding:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.2s;}.modal-close.svelte-1w4pq25:hover {background-color:rgba(0, 0, 0, 0.1);color:#333;}.modal-body.svelte-1w4pq25 {padding:1.5rem;flex:1;overflow-y:auto;}.modal-input.svelte-1w4pq25,\r
|
|
2652
2692
|
.modal-textarea.svelte-1w4pq25 {width:100%;padding:0.75rem;border:1px solid #ced4da;border-radius:4px;font-size:1rem;font-family:inherit;transition:border-color 0.2s;}.modal-input.svelte-1w4pq25:focus,\r
|
|
@@ -2659,8 +2699,8 @@ const Ho = {
|
|
|
2659
2699
|
}\r
|
|
2660
2700
|
}.btn.svelte-1w4pq25:disabled {opacity:0.6;cursor:not-allowed;}`
|
|
2661
2701
|
};
|
|
2662
|
-
function
|
|
2663
|
-
|
|
2702
|
+
function Ja(e, t) {
|
|
2703
|
+
at(t, !0), cr(e, Wo);
|
|
2664
2704
|
let r = ae(t, "isSaving", 15), n = ae(t, "showModal", 15), a = ae(t, "closeModal", 7), i = ae(t, "modalTitle", 15), o = ae(t, "modalField", 15), l = ae(t, "modalValue", 15), d = ae(t, "saveEdit", 7);
|
|
2665
2705
|
var u = {
|
|
2666
2706
|
get isSaving() {
|
|
@@ -2705,69 +2745,69 @@ function Ua(e, t) {
|
|
|
2705
2745
|
set saveEdit(c) {
|
|
2706
2746
|
d(c), re();
|
|
2707
2747
|
}
|
|
2708
|
-
}, v =
|
|
2748
|
+
}, v = rt(), _ = Ee(v);
|
|
2709
2749
|
{
|
|
2710
2750
|
var p = (c) => {
|
|
2711
|
-
var h =
|
|
2712
|
-
h.__click = function(...
|
|
2713
|
-
a()?.apply(this,
|
|
2714
|
-
}, h.__keydown = [
|
|
2751
|
+
var h = Yo();
|
|
2752
|
+
h.__click = function(...F) {
|
|
2753
|
+
a()?.apply(this, F);
|
|
2754
|
+
}, h.__keydown = [Fo, a];
|
|
2715
2755
|
var E = y(h);
|
|
2716
|
-
E.__click = [
|
|
2717
|
-
var g = y(E),
|
|
2718
|
-
b(
|
|
2719
|
-
var A = $(
|
|
2720
|
-
A.__click = function(...
|
|
2721
|
-
a()?.apply(this,
|
|
2756
|
+
E.__click = [Uo], E.__keydown = [Bo];
|
|
2757
|
+
var g = y(E), m = y(g), S = y(m, !0);
|
|
2758
|
+
b(m);
|
|
2759
|
+
var A = $(m, 2);
|
|
2760
|
+
A.__click = function(...F) {
|
|
2761
|
+
a()?.apply(this, F);
|
|
2722
2762
|
}, b(g);
|
|
2723
|
-
var O = $(g, 2),
|
|
2763
|
+
var O = $(g, 2), M = y(O);
|
|
2724
2764
|
{
|
|
2725
|
-
var w = (
|
|
2726
|
-
var K =
|
|
2727
|
-
|
|
2728
|
-
}, N = (
|
|
2729
|
-
var K =
|
|
2730
|
-
|
|
2765
|
+
var w = (F) => {
|
|
2766
|
+
var K = Ho();
|
|
2767
|
+
Ui(K), Lr(K, l), j(F, K);
|
|
2768
|
+
}, N = (F) => {
|
|
2769
|
+
var K = Vo();
|
|
2770
|
+
sr(K), Lr(K, l), j(F, K);
|
|
2731
2771
|
};
|
|
2732
|
-
Y(
|
|
2733
|
-
o() === "explanation" || o() === "question" ?
|
|
2772
|
+
Y(M, (F) => {
|
|
2773
|
+
o() === "explanation" || o() === "question" ? F(w) : F(N, !1);
|
|
2734
2774
|
});
|
|
2735
2775
|
}
|
|
2736
2776
|
b(O);
|
|
2737
2777
|
var X = $(O, 2), D = y(X);
|
|
2738
|
-
D.__click = function(...
|
|
2739
|
-
a()?.apply(this,
|
|
2778
|
+
D.__click = function(...F) {
|
|
2779
|
+
a()?.apply(this, F);
|
|
2740
2780
|
};
|
|
2741
|
-
var
|
|
2742
|
-
|
|
2743
|
-
d()?.apply(this,
|
|
2781
|
+
var H = $(D, 2);
|
|
2782
|
+
H.__click = function(...F) {
|
|
2783
|
+
d()?.apply(this, F);
|
|
2744
2784
|
};
|
|
2745
|
-
var W = y(
|
|
2785
|
+
var W = y(H);
|
|
2746
2786
|
{
|
|
2747
|
-
var ne = (
|
|
2748
|
-
var K =
|
|
2749
|
-
|
|
2750
|
-
}, me = (
|
|
2751
|
-
var K =
|
|
2752
|
-
j(
|
|
2787
|
+
var ne = (F) => {
|
|
2788
|
+
var K = Jo();
|
|
2789
|
+
hr(), j(F, K);
|
|
2790
|
+
}, me = (F) => {
|
|
2791
|
+
var K = io("Salva");
|
|
2792
|
+
j(F, K);
|
|
2753
2793
|
};
|
|
2754
|
-
Y(W, (
|
|
2755
|
-
r() ?
|
|
2794
|
+
Y(W, (F) => {
|
|
2795
|
+
r() ? F(ne) : F(me, !1);
|
|
2756
2796
|
});
|
|
2757
2797
|
}
|
|
2758
|
-
b(
|
|
2759
|
-
le(S, i()), D.disabled = r(),
|
|
2798
|
+
b(H), b(X), b(E), b(h), fe(() => {
|
|
2799
|
+
le(S, i()), D.disabled = r(), H.disabled = r();
|
|
2760
2800
|
}), j(c, h);
|
|
2761
2801
|
};
|
|
2762
|
-
Y(
|
|
2802
|
+
Y(_, (c) => {
|
|
2763
2803
|
n() && c(p);
|
|
2764
2804
|
});
|
|
2765
2805
|
}
|
|
2766
|
-
return j(e, v),
|
|
2806
|
+
return j(e, v), it(u);
|
|
2767
2807
|
}
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2808
|
+
Ft(["click", "keydown"]);
|
|
2809
|
+
xt(
|
|
2810
|
+
Ja,
|
|
2771
2811
|
{
|
|
2772
2812
|
isSaving: {},
|
|
2773
2813
|
showModal: {},
|
|
@@ -2781,7 +2821,7 @@ bt(
|
|
|
2781
2821
|
[],
|
|
2782
2822
|
!0
|
|
2783
2823
|
);
|
|
2784
|
-
async function
|
|
2824
|
+
async function ur(e, t = 2) {
|
|
2785
2825
|
let r;
|
|
2786
2826
|
for (let n = 0; n <= t; n++)
|
|
2787
2827
|
try {
|
|
@@ -2791,14 +2831,14 @@ async function Vr(e, t = 2) {
|
|
|
2791
2831
|
}
|
|
2792
2832
|
throw r;
|
|
2793
2833
|
}
|
|
2794
|
-
const
|
|
2795
|
-
let r =
|
|
2834
|
+
const Go = async (e, t) => ur(async () => {
|
|
2835
|
+
let r = L.getEnvironmentId(), n = `https://${Ke(r)}.aksiliasuite.com/api/v1/normative`;
|
|
2796
2836
|
r == "aks_svi" && (n = "http://sviluppo.aksiliasuite.com/api/v1/normative");
|
|
2797
2837
|
const a = await fetch(n, {
|
|
2798
2838
|
method: "POST",
|
|
2799
2839
|
headers: {
|
|
2800
2840
|
"Content-Type": "application/json",
|
|
2801
|
-
"x-token":
|
|
2841
|
+
"x-token": L.getToken()
|
|
2802
2842
|
},
|
|
2803
2843
|
body: JSON.stringify({
|
|
2804
2844
|
nome: e,
|
|
@@ -2808,14 +2848,14 @@ const Vo = async (e, t) => Vr(async () => {
|
|
|
2808
2848
|
if (!a.ok)
|
|
2809
2849
|
throw new Error(`HTTP error! status: ${a.status}`);
|
|
2810
2850
|
return (await a.json()).result[0].record_id;
|
|
2811
|
-
}),
|
|
2812
|
-
let i =
|
|
2813
|
-
i == "aks_svi" && (o = "
|
|
2851
|
+
}), Ko = async (e, t, r, n, a) => ur(async () => {
|
|
2852
|
+
let i = L.getEnvironmentId(), o = `https://${Ke(i)}.aksiliasuite.com/api/v1/normative_categorie`;
|
|
2853
|
+
i == "aks_svi" && (o = "https://test.aksiliasuite.com/api/v1/normative_categorie");
|
|
2814
2854
|
const l = await fetch(o, {
|
|
2815
2855
|
method: "POST",
|
|
2816
2856
|
headers: {
|
|
2817
2857
|
"Content-Type": "application/json",
|
|
2818
|
-
"x-token":
|
|
2858
|
+
"x-token": L.getToken()
|
|
2819
2859
|
},
|
|
2820
2860
|
body: JSON.stringify({
|
|
2821
2861
|
idNormativa: e,
|
|
@@ -2829,14 +2869,31 @@ const Vo = async (e, t) => Vr(async () => {
|
|
|
2829
2869
|
if (!l.ok)
|
|
2830
2870
|
throw new Error(`HTTP error! status: ${l.status}`);
|
|
2831
2871
|
return (await l.json()).result[0].record_id;
|
|
2832
|
-
}),
|
|
2833
|
-
let r =
|
|
2834
|
-
r == "aks_svi" && (
|
|
2872
|
+
}), Xo = async (e, t) => ur(async () => {
|
|
2873
|
+
let r = L.getEnvironmentId(), n = L.getToken(), a = `https://${Ke(r)}.aksiliasuite.com/api/v1/normative_categorie_lang/${e}`;
|
|
2874
|
+
r == "aks_svi" && (a = `http://sviluppo.aksiliasuite.com/api/v1/normative_categorie_lang/${e}`);
|
|
2875
|
+
const i = await fetch(a, {
|
|
2876
|
+
method: "PUT",
|
|
2877
|
+
headers: {
|
|
2878
|
+
"Content-Type": "application/json",
|
|
2879
|
+
"x-token": n
|
|
2880
|
+
},
|
|
2881
|
+
body: JSON.stringify({
|
|
2882
|
+
cultura: "it_IT",
|
|
2883
|
+
nome: t
|
|
2884
|
+
})
|
|
2885
|
+
});
|
|
2886
|
+
if (!i.ok)
|
|
2887
|
+
throw new Error(`HTTP error! status: ${i.status}`);
|
|
2888
|
+
return (await i.json()).result[0].record_id;
|
|
2889
|
+
}), Qo = async (e, t) => ur(async () => {
|
|
2890
|
+
let r = L.getEnvironmentId(), n = `https://${Ke(r)}.aksiliasuite.com/api/v1/domande`;
|
|
2891
|
+
r == "aks_svi" && (n = "https://test.aksiliasuite.com/api/v1/domande");
|
|
2835
2892
|
const a = await fetch(n, {
|
|
2836
2893
|
method: "POST",
|
|
2837
2894
|
headers: {
|
|
2838
2895
|
"Content-Type": "application/json",
|
|
2839
|
-
"x-token":
|
|
2896
|
+
"x-token": L.getToken()
|
|
2840
2897
|
},
|
|
2841
2898
|
body: JSON.stringify({
|
|
2842
2899
|
testo: e,
|
|
@@ -2848,14 +2905,32 @@ const Vo = async (e, t) => Vr(async () => {
|
|
|
2848
2905
|
if (!a.ok)
|
|
2849
2906
|
throw new Error(`HTTP error! status: ${a.status}`);
|
|
2850
2907
|
return (await a.json()).result[0].record_id;
|
|
2851
|
-
}),
|
|
2852
|
-
let
|
|
2853
|
-
|
|
2908
|
+
}), Zo = async (e, t, r) => ur(async () => {
|
|
2909
|
+
let n = L.getEnvironmentId(), a = L.getToken(), i = `https://${Ke(n)}.aksiliasuite.com/api/v1/domande_lang/${e}`;
|
|
2910
|
+
n == "aks_svi" && (i = `http://sviluppo.aksiliasuite.com/api/v1/domande_lang/${e}`);
|
|
2911
|
+
const o = await fetch(i, {
|
|
2912
|
+
method: "PUT",
|
|
2913
|
+
headers: {
|
|
2914
|
+
"Content-Type": "application/json",
|
|
2915
|
+
"x-token": a
|
|
2916
|
+
},
|
|
2917
|
+
body: JSON.stringify({
|
|
2918
|
+
cultura: "it_IT",
|
|
2919
|
+
testo: t,
|
|
2920
|
+
spiegazione: r
|
|
2921
|
+
})
|
|
2922
|
+
});
|
|
2923
|
+
if (!o.ok)
|
|
2924
|
+
throw new Error(`HTTP error! status: ${o.status}`);
|
|
2925
|
+
return (await o.json()).result[0].record_id;
|
|
2926
|
+
}), es = async (e, t, r, n) => ur(async () => {
|
|
2927
|
+
let a = L.getEnvironmentId(), i = `https://${Ke(a)}.aksiliasuite.com/api/v1/normative_categorie_domande`;
|
|
2928
|
+
a == "aks_svi" && (i = "https://test.aksiliasuite.com/api/v1/normative_categorie_domande");
|
|
2854
2929
|
const o = await fetch(i, {
|
|
2855
2930
|
method: "POST",
|
|
2856
2931
|
headers: {
|
|
2857
2932
|
"Content-Type": "application/json",
|
|
2858
|
-
"x-token":
|
|
2933
|
+
"x-token": L.getToken()
|
|
2859
2934
|
},
|
|
2860
2935
|
body: JSON.stringify({
|
|
2861
2936
|
id_normativa: e,
|
|
@@ -2867,40 +2942,40 @@ const Vo = async (e, t) => Vr(async () => {
|
|
|
2867
2942
|
if (!o.ok)
|
|
2868
2943
|
throw new Error(`HTTP error! status: ${o.status}`);
|
|
2869
2944
|
return (await o.json()).result[0].record_id;
|
|
2870
|
-
}),
|
|
2871
|
-
let e =
|
|
2945
|
+
}), ts = async () => {
|
|
2946
|
+
let e = L.getEnvironmentId(), t = `https://${Ke(e)}.aksiliasuite.com/api/v1/dati_piano/combo`;
|
|
2872
2947
|
e == "aks_svi" && (t = "http://sviluppo.aksiliasuite.com/api/v1/dati_piano/combo");
|
|
2873
2948
|
const r = await fetch(t, {
|
|
2874
2949
|
method: "GET",
|
|
2875
2950
|
headers: {
|
|
2876
2951
|
"Content-Type": "application/json",
|
|
2877
|
-
"x-token":
|
|
2952
|
+
"x-token": L.getToken()
|
|
2878
2953
|
}
|
|
2879
2954
|
});
|
|
2880
2955
|
if (!r.ok)
|
|
2881
2956
|
throw new Error(`HTTP error! status: ${r.status}`);
|
|
2882
2957
|
return (await r.json()).result;
|
|
2883
|
-
},
|
|
2884
|
-
let t =
|
|
2958
|
+
}, rs = async (e) => {
|
|
2959
|
+
let t = L.getEnvironmentId(), r = `https://${Ke(t)}.aksiliasuite.com/api/v1/normative/${e}`;
|
|
2885
2960
|
t == "aks_svi" && (r = `http://sviluppo.aksiliasuite.com/api/v1/normative/${e}`);
|
|
2886
2961
|
const n = await fetch(r, {
|
|
2887
2962
|
method: "GET",
|
|
2888
2963
|
headers: {
|
|
2889
2964
|
"Content-Type": "application/json",
|
|
2890
|
-
"x-token":
|
|
2965
|
+
"x-token": L.getToken()
|
|
2891
2966
|
}
|
|
2892
2967
|
});
|
|
2893
2968
|
if (!n.ok)
|
|
2894
2969
|
throw new Error(`HTTP error! status: ${n.status}`);
|
|
2895
2970
|
return (await n.json()).result[0];
|
|
2896
|
-
},
|
|
2897
|
-
let n =
|
|
2971
|
+
}, ns = async (e, t, r) => {
|
|
2972
|
+
let n = L.getEnvironmentId(), a = `https://${Ke(n)}.aksiliasuite.com/api/v1/normative/${e}`;
|
|
2898
2973
|
n == "aks_svi" && (a = `http://sviluppo.aksiliasuite.com/api/v1/normative/${e}`);
|
|
2899
2974
|
const i = await fetch(a, {
|
|
2900
2975
|
method: "PUT",
|
|
2901
2976
|
headers: {
|
|
2902
2977
|
"Content-Type": "application/json",
|
|
2903
|
-
"x-token":
|
|
2978
|
+
"x-token": L.getToken()
|
|
2904
2979
|
},
|
|
2905
2980
|
body: JSON.stringify({
|
|
2906
2981
|
nome: t,
|
|
@@ -2909,16 +2984,18 @@ const Vo = async (e, t) => Vr(async () => {
|
|
|
2909
2984
|
});
|
|
2910
2985
|
if (!i.ok)
|
|
2911
2986
|
throw new Error(`HTTP error! status: ${i.status}`);
|
|
2912
|
-
},
|
|
2913
|
-
addNormativaSuite:
|
|
2914
|
-
addCategoriaSuite:
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2987
|
+
}, He = {
|
|
2988
|
+
addNormativaSuite: Go,
|
|
2989
|
+
addCategoriaSuite: Ko,
|
|
2990
|
+
addCategoriaLangSuite: Xo,
|
|
2991
|
+
addDomandaSuite: Qo,
|
|
2992
|
+
addDomandaLangSuite: Zo,
|
|
2993
|
+
addLinkDomadaCategoria: es,
|
|
2994
|
+
getDatiPiano: ts,
|
|
2995
|
+
getNormativaSuite: rs,
|
|
2996
|
+
editNormativaSuite: ns
|
|
2920
2997
|
};
|
|
2921
|
-
function
|
|
2998
|
+
function as(e) {
|
|
2922
2999
|
const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
2923
3000
|
function n(a) {
|
|
2924
3001
|
if (r.has(a.id))
|
|
@@ -2936,33 +3013,42 @@ function Qo(e) {
|
|
|
2936
3013
|
t.has(i) || t.set(i, []), t.get(i).push(a);
|
|
2937
3014
|
}), t;
|
|
2938
3015
|
}
|
|
2939
|
-
async function
|
|
3016
|
+
async function is(e, t, r) {
|
|
2940
3017
|
const n = e.ai_output.length + 1, a = { current: 0, total: n };
|
|
2941
3018
|
r && r(0, n);
|
|
2942
|
-
const i = await
|
|
3019
|
+
const i = await He.addNormativaSuite(e.name, t);
|
|
2943
3020
|
a.current++, r && r(a.current, a.total);
|
|
2944
|
-
const o =
|
|
3021
|
+
const o = as(e.ai_output), l = Math.max(...Array.from(o.keys())), d = /* @__PURE__ */ new Map();
|
|
2945
3022
|
for (let u = 0; u <= l; u++) {
|
|
2946
|
-
const v = o.get(u) || [],
|
|
2947
|
-
for (const c of
|
|
3023
|
+
const v = o.get(u) || [], _ = v.filter((c) => c.type === "category"), p = v.filter((c) => c.type === "item");
|
|
3024
|
+
for (const c of _) {
|
|
2948
3025
|
const h = e.ai_output.filter((S) => S.parent_id === c.id);
|
|
2949
3026
|
if (h.length === 0)
|
|
2950
3027
|
throw new Error(`A category with no child its not allowed. Category ID: ${c.id}`);
|
|
2951
|
-
const E = h[0].type === "item", g = c.parent_id === null ? 0 : d.get(c.parent_id) || 0,
|
|
3028
|
+
const E = h[0].type === "item", g = c.parent_id === null ? 0 : d.get(c.parent_id) || 0, m = await He.addCategoriaSuite(
|
|
2952
3029
|
i,
|
|
2953
3030
|
g,
|
|
2954
3031
|
c.category,
|
|
2955
3032
|
E,
|
|
2956
3033
|
c.punto_norma
|
|
2957
3034
|
);
|
|
2958
|
-
|
|
3035
|
+
await He.addCategoriaLangSuite(
|
|
3036
|
+
m,
|
|
3037
|
+
c.categoryIT
|
|
3038
|
+
), d.set(c.id, m), a.current++, r && r(a.current, a.total);
|
|
2959
3039
|
}
|
|
2960
3040
|
for (const c of p) {
|
|
2961
|
-
const h = await
|
|
3041
|
+
const h = await He.addDomandaSuite(
|
|
2962
3042
|
c.question,
|
|
2963
3043
|
c.spiegazione
|
|
2964
|
-
)
|
|
2965
|
-
await
|
|
3044
|
+
);
|
|
3045
|
+
await He.addDomandaLangSuite(
|
|
3046
|
+
h,
|
|
3047
|
+
c.questionIT,
|
|
3048
|
+
c.spiegazioneIT
|
|
3049
|
+
);
|
|
3050
|
+
const E = c.parent_id === null ? 0 : d.get(c.parent_id) || 0;
|
|
3051
|
+
await He.addLinkDomadaCategoria(
|
|
2966
3052
|
i,
|
|
2967
3053
|
h,
|
|
2968
3054
|
E,
|
|
@@ -2972,17 +3058,17 @@ async function Zo(e, t, r) {
|
|
|
2972
3058
|
}
|
|
2973
3059
|
return i;
|
|
2974
3060
|
}
|
|
2975
|
-
function
|
|
3061
|
+
function os(e, t, r) {
|
|
2976
3062
|
f(t, s(r).map((n) => n.record_id.toString()), !0);
|
|
2977
3063
|
}
|
|
2978
|
-
function
|
|
3064
|
+
function ss(e, t) {
|
|
2979
3065
|
f(t, [], !0);
|
|
2980
3066
|
}
|
|
2981
|
-
var
|
|
3067
|
+
var ls = /* @__PURE__ */ R('<div class="loading-container svelte-qco13a"><div class="spinner svelte-qco13a"></div> <p class="svelte-qco13a">Caricamento...</p></div>'), ds = (
|
|
2982
3068
|
// Converti l'array in stringa separata da virgole
|
|
2983
3069
|
(e, t, r) => t(s(r).record_id.toString())
|
|
2984
|
-
),
|
|
2985
|
-
const
|
|
3070
|
+
), cs = /* @__PURE__ */ R('<label class="checkbox-item svelte-qco13a"><input type="checkbox" class="svelte-qco13a"/> <span class="checkbox-label svelte-qco13a"> </span></label>'), us = /* @__PURE__ */ R('<form class="svelte-qco13a"><div class="form-group svelte-qco13a"><label for="normativa" class="svelte-qco13a">Normativa</label> <input id="normativa" type="text" readonly="" class="readonly-input svelte-qco13a"/></div> <div class="form-group svelte-qco13a"><div class="label-with-actions svelte-qco13a"><span id="dati-piano-label" class="svelte-qco13a">Seleziona Dati Piano *</span> <div class="selection-actions svelte-qco13a"><button type="button" class="action-link svelte-qco13a">Seleziona tutto</button> <span class="separator svelte-qco13a">|</span> <button type="button" class="action-link svelte-qco13a">Deseleziona tutto</button></div></div> <div id="dati-piano-list" class="checkbox-list svelte-qco13a" role="group" aria-labelledby="dati-piano-label"></div></div> <div class="modal-footer svelte-qco13a"><button type="button" class="cancel-button svelte-qco13a">Annulla</button> <button type="submit" class="submit-button svelte-qco13a"> </button></div></form>'), fs = /* @__PURE__ */ R('<div class="modal-backdrop svelte-qco13a"><div class="modal-dialog svelte-qco13a" role="dialog" aria-labelledby="modal-title"><div class="modal-content svelte-qco13a"><div class="modal-header svelte-qco13a"><h2 id="modal-title" class="svelte-qco13a">Invia a Suite</h2> <button type="button" class="close-button svelte-qco13a" aria-label="Chiudi modale"><i class="fa-solid fa-xmark svelte-qco13a"></i></button></div> <div class="modal-body svelte-qco13a"><!></div></div></div></div>');
|
|
3071
|
+
const vs = {
|
|
2986
3072
|
hash: "svelte-qco13a",
|
|
2987
3073
|
code: `.modal-backdrop.svelte-qco13a {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;backdrop-filter:blur(2px);}.modal-dialog.svelte-qco13a {width:90%;max-width:500px;max-height:90vh;overflow-y:auto;}.modal-content.svelte-qco13a {background:white;border-radius:8px;box-shadow:0 10px 30px rgba(0, 0, 0, 0.3);overflow:hidden;}.modal-header.svelte-qco13a {padding:16px 20px;border-bottom:1px solid #dee2e6;display:flex;justify-content:space-between;align-items:center;background:#f8f9fa;}.modal-header.svelte-qco13a h2:where(.svelte-qco13a) {margin:0;color:#2c3e50;font-size:1.25rem;font-weight:600;}.close-button.svelte-qco13a {background:none;border:none;font-size:24px;color:#6c757d;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color 0.2s;}.close-button.svelte-qco13a:hover {background-color:#e9ecef;color:#495057;}.modal-body.svelte-qco13a {padding:20px;}.form-group.svelte-qco13a {margin-bottom:16px;}.form-group.svelte-qco13a label:where(.svelte-qco13a) {display:block;margin-bottom:4px;font-weight:500;color:#495057;font-size:0.9rem;}.form-group.svelte-qco13a input:where(.svelte-qco13a) {width:100%;padding:8px 12px;border:1px solid #ced4da;border-radius:4px;font-size:0.95rem;transition:border-color 0.2s,\r
|
|
2988
3074
|
box-shadow 0.2s;}.form-group.svelte-qco13a input:where(.svelte-qco13a):focus {outline:none;border-color:#007bff;box-shadow:0 0 0 2px rgba(0, 123, 255, 0.25);}.readonly-input.svelte-qco13a {background-color:#e9ecef;cursor:not-allowed;}.label-with-actions.svelte-qco13a {display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}.label-with-actions.svelte-qco13a span:where(.svelte-qco13a) {margin-bottom:0;}.selection-actions.svelte-qco13a {display:flex;align-items:center;gap:6px;font-size:0.85rem;}.action-link.svelte-qco13a {background:none;border:none;color:#007bff;cursor:pointer;padding:0;font-size:0.85rem;text-decoration:none;transition:color 0.2s;}.action-link.svelte-qco13a:hover {color:#0056b3;text-decoration:underline;}.separator.svelte-qco13a {color:#6c757d;font-size:0.85rem;}.checkbox-list.svelte-qco13a {max-height:250px;overflow-y:auto;border:1px solid #ced4da;border-radius:6px;padding:8px;background-color:#f8f9fa;}.checkbox-item.svelte-qco13a {display:flex;align-items:center;padding:10px 12px;margin-bottom:4px;background-color:white;border-radius:4px;cursor:pointer;transition:background-color 0.2s,\r
|
|
@@ -3000,11 +3086,11 @@ const ss = {
|
|
|
3000
3086
|
}\r
|
|
3001
3087
|
}.loading-container.svelte-qco13a p:where(.svelte-qco13a) {margin-top:16px;color:#6c757d;font-size:0.95rem;}`
|
|
3002
3088
|
};
|
|
3003
|
-
function
|
|
3004
|
-
|
|
3089
|
+
function Ya(e, t) {
|
|
3090
|
+
at(t, !0), cr(e, vs);
|
|
3005
3091
|
let r = ae(t, "isOpen", 15), n = ae(t, "normativaName", 7), a = ae(t, "sendToSuite", 7), i = /* @__PURE__ */ z(Ae([])), o = /* @__PURE__ */ z(Ae([])), l = /* @__PURE__ */ z(!1);
|
|
3006
3092
|
function d(g) {
|
|
3007
|
-
s(o).includes(g) ? f(o, s(o).filter((
|
|
3093
|
+
s(o).includes(g) ? f(o, s(o).filter((m) => m !== g), !0) : f(o, [...s(o), g], !0);
|
|
3008
3094
|
}
|
|
3009
3095
|
async function u(g) {
|
|
3010
3096
|
if (g.preventDefault(), s(o).length === 0) {
|
|
@@ -3013,10 +3099,10 @@ function Ba(e, t) {
|
|
|
3013
3099
|
}
|
|
3014
3100
|
f(l, !0);
|
|
3015
3101
|
try {
|
|
3016
|
-
const
|
|
3017
|
-
await a()(
|
|
3018
|
-
} catch (
|
|
3019
|
-
console.error("Errore durante l'invio:",
|
|
3102
|
+
const m = s(o).join(",");
|
|
3103
|
+
await a()(m), v();
|
|
3104
|
+
} catch (m) {
|
|
3105
|
+
console.error("Errore durante l'invio:", m), alert("Errore durante l'invio");
|
|
3020
3106
|
} finally {
|
|
3021
3107
|
f(l, !1);
|
|
3022
3108
|
}
|
|
@@ -3024,9 +3110,9 @@ function Ba(e, t) {
|
|
|
3024
3110
|
function v() {
|
|
3025
3111
|
r(!1), f(o, [], !0), f(l, !1);
|
|
3026
3112
|
}
|
|
3027
|
-
let
|
|
3028
|
-
|
|
3029
|
-
f(
|
|
3113
|
+
let _ = /* @__PURE__ */ z(!1);
|
|
3114
|
+
or(async () => {
|
|
3115
|
+
f(_, !0), f(i, await He.getDatiPiano(), !0), f(_, !1);
|
|
3030
3116
|
});
|
|
3031
3117
|
var p = {
|
|
3032
3118
|
get isOpen() {
|
|
@@ -3047,70 +3133,70 @@ function Ba(e, t) {
|
|
|
3047
3133
|
set sendToSuite(g) {
|
|
3048
3134
|
a(g), re();
|
|
3049
3135
|
}
|
|
3050
|
-
}, c =
|
|
3136
|
+
}, c = rt(), h = Ee(c);
|
|
3051
3137
|
{
|
|
3052
3138
|
var E = (g) => {
|
|
3053
|
-
var
|
|
3054
|
-
|
|
3139
|
+
var m = fs(), S = y(m), A = y(S), O = y(A), M = $(y(O), 2);
|
|
3140
|
+
M.__click = v, b(O);
|
|
3055
3141
|
var w = $(O, 2), N = y(w);
|
|
3056
3142
|
{
|
|
3057
|
-
var X = (
|
|
3058
|
-
var W =
|
|
3059
|
-
j(
|
|
3060
|
-
}, D = (
|
|
3061
|
-
var W =
|
|
3062
|
-
|
|
3063
|
-
var
|
|
3064
|
-
xe.__click = [
|
|
3143
|
+
var X = (H) => {
|
|
3144
|
+
var W = ls();
|
|
3145
|
+
j(H, W);
|
|
3146
|
+
}, D = (H) => {
|
|
3147
|
+
var W = us(), ne = y(W), me = $(y(ne), 2);
|
|
3148
|
+
sr(me), b(ne);
|
|
3149
|
+
var F = $(ne, 2), K = y(F), Se = $(y(K), 2), xe = y(Se);
|
|
3150
|
+
xe.__click = [os, o, i];
|
|
3065
3151
|
var yt = $(xe, 4);
|
|
3066
|
-
yt.__click = [
|
|
3152
|
+
yt.__click = [ss, o], b(Se), b(K);
|
|
3067
3153
|
var ie = $(K, 2);
|
|
3068
|
-
|
|
3069
|
-
var
|
|
3070
|
-
|
|
3154
|
+
kr(ie, 21, () => s(i), yr, (Ce, ye) => {
|
|
3155
|
+
var Pe = cs(), pe = y(Pe);
|
|
3156
|
+
sr(pe), pe.__change = [ds, d, ye];
|
|
3071
3157
|
var k = $(pe, 2), x = y(k, !0);
|
|
3072
|
-
b(k), b(
|
|
3158
|
+
b(k), b(Pe), fe(
|
|
3073
3159
|
(I, T) => {
|
|
3074
|
-
|
|
3160
|
+
vn(pe, I), Ua(pe, T), le(x, s(ye).display_value);
|
|
3075
3161
|
},
|
|
3076
3162
|
[
|
|
3077
3163
|
() => s(ye).record_id.toString(),
|
|
3078
3164
|
() => s(o).includes(s(ye).record_id.toString())
|
|
3079
3165
|
]
|
|
3080
|
-
), j(Ce,
|
|
3081
|
-
}), b(ie), b(
|
|
3082
|
-
var ee = $(
|
|
3166
|
+
), j(Ce, Pe);
|
|
3167
|
+
}), b(ie), b(F);
|
|
3168
|
+
var ee = $(F, 2), oe = y(ee);
|
|
3083
3169
|
oe.__click = v;
|
|
3084
3170
|
var se = $(oe, 2), kt = y(se, !0);
|
|
3085
3171
|
b(se), b(ee), b(W), fe(() => {
|
|
3086
|
-
|
|
3087
|
-
}),
|
|
3172
|
+
vn(me, n()), oe.disabled = s(l), se.disabled = s(l) || s(o).length === 0, le(kt, s(l) ? "Invio..." : "Invia");
|
|
3173
|
+
}), Wt("submit", W, u), j(H, W);
|
|
3088
3174
|
};
|
|
3089
|
-
Y(N, (
|
|
3090
|
-
s(
|
|
3175
|
+
Y(N, (H) => {
|
|
3176
|
+
s(_) ? H(X) : H(D, !1);
|
|
3091
3177
|
});
|
|
3092
3178
|
}
|
|
3093
|
-
b(w), b(A), b(S), b(
|
|
3179
|
+
b(w), b(A), b(S), b(m), j(g, m);
|
|
3094
3180
|
};
|
|
3095
3181
|
Y(h, (g) => {
|
|
3096
3182
|
r() && g(E);
|
|
3097
3183
|
});
|
|
3098
3184
|
}
|
|
3099
|
-
return j(e, c),
|
|
3185
|
+
return j(e, c), it(p);
|
|
3100
3186
|
}
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
function
|
|
3187
|
+
Ft(["click", "change"]);
|
|
3188
|
+
xt(Ya, { isOpen: {}, normativaName: {}, sendToSuite: {} }, [], [], !0);
|
|
3189
|
+
function ps(e, t, r) {
|
|
3104
3190
|
f(t, s(r).map((n) => n.record_id.toString()), !0);
|
|
3105
3191
|
}
|
|
3106
|
-
function
|
|
3192
|
+
function hs(e, t) {
|
|
3107
3193
|
f(t, [], !0);
|
|
3108
3194
|
}
|
|
3109
|
-
var
|
|
3195
|
+
var gs = /* @__PURE__ */ R('<div class="loading-container svelte-xpx9jl"><div class="spinner svelte-xpx9jl"></div> <p class="svelte-xpx9jl">Caricamento...</p></div>'), ms = (
|
|
3110
3196
|
// Converti l'array in stringa separata da virgole
|
|
3111
3197
|
(e, t, r) => t(s(r).record_id.toString())
|
|
3112
|
-
),
|
|
3113
|
-
const
|
|
3198
|
+
), _s = /* @__PURE__ */ R('<label class="checkbox-item svelte-xpx9jl"><input type="checkbox" class="svelte-xpx9jl"/> <span class="checkbox-label svelte-xpx9jl"> </span></label>'), bs = /* @__PURE__ */ R('<form class="svelte-xpx9jl"><div class="form-group svelte-xpx9jl"><label for="normativa" class="svelte-xpx9jl">Normativa</label> <input id="normativa" type="text" class="svelte-xpx9jl"/></div> <div class="form-group svelte-xpx9jl"><div class="label-with-actions svelte-xpx9jl"><span id="dati-piano-label" class="svelte-xpx9jl">Seleziona Dati Piano *</span> <div class="selection-actions svelte-xpx9jl"><button type="button" class="action-link svelte-xpx9jl">Seleziona tutto</button> <span class="separator svelte-xpx9jl">|</span> <button type="button" class="action-link svelte-xpx9jl">Deseleziona tutto</button></div></div> <div id="dati-piano-list" class="checkbox-list svelte-xpx9jl" role="group" aria-labelledby="dati-piano-label"></div></div> <div class="modal-footer svelte-xpx9jl"><button type="button" class="cancel-button svelte-xpx9jl">Annulla</button> <button type="submit" class="submit-button svelte-xpx9jl"> </button></div></form>'), xs = /* @__PURE__ */ R('<div class="modal-backdrop svelte-xpx9jl"><div class="modal-dialog svelte-xpx9jl" role="dialog" aria-labelledby="modal-title"><div class="modal-content svelte-xpx9jl"><div class="modal-header svelte-xpx9jl"><h2 id="modal-title" class="svelte-xpx9jl">Invia a Suite</h2> <button type="button" class="close-button svelte-xpx9jl" aria-label="Chiudi modale"><i class="fa-solid fa-xmark svelte-xpx9jl"></i></button></div> <div class="modal-body svelte-xpx9jl"><!></div></div></div></div>');
|
|
3199
|
+
const ys = {
|
|
3114
3200
|
hash: "svelte-xpx9jl",
|
|
3115
3201
|
code: `.modal-backdrop.svelte-xpx9jl {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;backdrop-filter:blur(2px);}.modal-dialog.svelte-xpx9jl {width:90%;max-width:500px;max-height:90vh;overflow-y:auto;}.modal-content.svelte-xpx9jl {background:white;border-radius:8px;box-shadow:0 10px 30px rgba(0, 0, 0, 0.3);overflow:hidden;}.modal-header.svelte-xpx9jl {padding:16px 20px;border-bottom:1px solid #dee2e6;display:flex;justify-content:space-between;align-items:center;background:#f8f9fa;}.modal-header.svelte-xpx9jl h2:where(.svelte-xpx9jl) {margin:0;color:#2c3e50;font-size:1.25rem;font-weight:600;}.close-button.svelte-xpx9jl {background:none;border:none;font-size:24px;color:#6c757d;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color 0.2s;}.close-button.svelte-xpx9jl:hover {background-color:#e9ecef;color:#495057;}.modal-body.svelte-xpx9jl {padding:20px;}.form-group.svelte-xpx9jl {margin-bottom:16px;}.form-group.svelte-xpx9jl label:where(.svelte-xpx9jl) {display:block;margin-bottom:4px;font-weight:500;color:#495057;font-size:0.9rem;}.form-group.svelte-xpx9jl input:where(.svelte-xpx9jl) {width:100%;padding:8px 12px;border:1px solid #ced4da;border-radius:4px;font-size:0.95rem;transition:border-color 0.2s,\r
|
|
3116
3202
|
box-shadow 0.2s;}.form-group.svelte-xpx9jl input:where(.svelte-xpx9jl):focus {outline:none;border-color:#007bff;box-shadow:0 0 0 2px rgba(0, 123, 255, 0.25);}.label-with-actions.svelte-xpx9jl {display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}.label-with-actions.svelte-xpx9jl span:where(.svelte-xpx9jl) {margin-bottom:0;}.selection-actions.svelte-xpx9jl {display:flex;align-items:center;gap:6px;font-size:0.85rem;}.action-link.svelte-xpx9jl {background:none;border:none;color:#007bff;cursor:pointer;padding:0;font-size:0.85rem;text-decoration:none;transition:color 0.2s;}.action-link.svelte-xpx9jl:hover {color:#0056b3;text-decoration:underline;}.separator.svelte-xpx9jl {color:#6c757d;font-size:0.85rem;}.checkbox-list.svelte-xpx9jl {max-height:250px;overflow-y:auto;border:1px solid #ced4da;border-radius:6px;padding:8px;background-color:#f8f9fa;}.checkbox-item.svelte-xpx9jl {display:flex;align-items:center;padding:10px 12px;margin-bottom:4px;background-color:white;border-radius:4px;cursor:pointer;transition:background-color 0.2s,\r
|
|
@@ -3128,11 +3214,11 @@ const hs = {
|
|
|
3128
3214
|
}\r
|
|
3129
3215
|
}.loading-container.svelte-xpx9jl p:where(.svelte-xpx9jl) {margin-top:16px;color:#6c757d;font-size:0.95rem;}`
|
|
3130
3216
|
};
|
|
3131
|
-
function
|
|
3132
|
-
|
|
3217
|
+
function Wa(e, t) {
|
|
3218
|
+
at(t, !0), cr(e, ys);
|
|
3133
3219
|
let r = ae(t, "isOpen", 15), n = ae(t, "suiteId", 7), a = /* @__PURE__ */ z(Ae([])), i = /* @__PURE__ */ z(null), o = /* @__PURE__ */ z(Ae([])), l = /* @__PURE__ */ z(!1);
|
|
3134
3220
|
function d(g) {
|
|
3135
|
-
s(o).includes(g) ? f(o, s(o).filter((
|
|
3221
|
+
s(o).includes(g) ? f(o, s(o).filter((m) => m !== g), !0) : f(o, [...s(o), g], !0);
|
|
3136
3222
|
}
|
|
3137
3223
|
async function u(g) {
|
|
3138
3224
|
if (g.preventDefault(), s(o).length === 0) {
|
|
@@ -3141,14 +3227,14 @@ function Ha(e, t) {
|
|
|
3141
3227
|
}
|
|
3142
3228
|
f(l, !0);
|
|
3143
3229
|
try {
|
|
3144
|
-
const
|
|
3230
|
+
const m = s(o).join(",");
|
|
3145
3231
|
if (!confirm("Sei sicuro di voler inviare le modifiche a Suite?")) {
|
|
3146
3232
|
f(l, !1);
|
|
3147
3233
|
return;
|
|
3148
3234
|
}
|
|
3149
|
-
await
|
|
3150
|
-
} catch (
|
|
3151
|
-
console.error("Errore durante l'invio:",
|
|
3235
|
+
await He.editNormativaSuite(n(), s(i) ? s(i).nome : "", m), v();
|
|
3236
|
+
} catch (m) {
|
|
3237
|
+
console.error("Errore durante l'invio:", m), alert("Errore durante l'invio");
|
|
3152
3238
|
} finally {
|
|
3153
3239
|
f(l, !1);
|
|
3154
3240
|
}
|
|
@@ -3156,9 +3242,9 @@ function Ha(e, t) {
|
|
|
3156
3242
|
function v() {
|
|
3157
3243
|
r(!1), f(o, [], !0), f(l, !1);
|
|
3158
3244
|
}
|
|
3159
|
-
let
|
|
3160
|
-
|
|
3161
|
-
f(
|
|
3245
|
+
let _ = /* @__PURE__ */ z(!1);
|
|
3246
|
+
or(async () => {
|
|
3247
|
+
f(_, !0), f(a, await He.getDatiPiano(), !0), f(i, await He.getNormativaSuite(n()), !0), s(i).dati_piano.split(",").forEach((g) => s(o).push(g.trim())), f(_, !1);
|
|
3162
3248
|
});
|
|
3163
3249
|
var p = {
|
|
3164
3250
|
get isOpen() {
|
|
@@ -3173,60 +3259,60 @@ function Ha(e, t) {
|
|
|
3173
3259
|
set suiteId(g) {
|
|
3174
3260
|
n(g), re();
|
|
3175
3261
|
}
|
|
3176
|
-
}, c =
|
|
3262
|
+
}, c = rt(), h = Ee(c);
|
|
3177
3263
|
{
|
|
3178
3264
|
var E = (g) => {
|
|
3179
|
-
var
|
|
3180
|
-
|
|
3265
|
+
var m = xs(), S = y(m), A = y(S), O = y(A), M = $(y(O), 2);
|
|
3266
|
+
M.__click = v, b(O);
|
|
3181
3267
|
var w = $(O, 2), N = y(w);
|
|
3182
3268
|
{
|
|
3183
|
-
var X = (
|
|
3184
|
-
var W =
|
|
3185
|
-
j(
|
|
3186
|
-
}, D = (
|
|
3187
|
-
var W =
|
|
3188
|
-
|
|
3189
|
-
var
|
|
3190
|
-
xe.__click = [
|
|
3269
|
+
var X = (H) => {
|
|
3270
|
+
var W = gs();
|
|
3271
|
+
j(H, W);
|
|
3272
|
+
}, D = (H) => {
|
|
3273
|
+
var W = bs(), ne = y(W), me = $(y(ne), 2);
|
|
3274
|
+
sr(me), b(ne);
|
|
3275
|
+
var F = $(ne, 2), K = y(F), Se = $(y(K), 2), xe = y(Se);
|
|
3276
|
+
xe.__click = [ps, o, a];
|
|
3191
3277
|
var yt = $(xe, 4);
|
|
3192
|
-
yt.__click = [
|
|
3278
|
+
yt.__click = [hs, o], b(Se), b(K);
|
|
3193
3279
|
var ie = $(K, 2);
|
|
3194
|
-
|
|
3195
|
-
var
|
|
3196
|
-
|
|
3280
|
+
kr(ie, 21, () => s(a), yr, (Ce, ye) => {
|
|
3281
|
+
var Pe = _s(), pe = y(Pe);
|
|
3282
|
+
sr(pe), pe.__change = [ms, d, ye];
|
|
3197
3283
|
var k = $(pe, 2), x = y(k, !0);
|
|
3198
|
-
b(k), b(
|
|
3284
|
+
b(k), b(Pe), fe(
|
|
3199
3285
|
(I, T) => {
|
|
3200
|
-
|
|
3286
|
+
vn(pe, I), Ua(pe, T), le(x, s(ye).display_value);
|
|
3201
3287
|
},
|
|
3202
3288
|
[
|
|
3203
3289
|
() => s(ye).record_id.toString(),
|
|
3204
3290
|
() => s(o).includes(s(ye).record_id.toString())
|
|
3205
3291
|
]
|
|
3206
|
-
), j(Ce,
|
|
3207
|
-
}), b(ie), b(
|
|
3208
|
-
var ee = $(
|
|
3292
|
+
), j(Ce, Pe);
|
|
3293
|
+
}), b(ie), b(F);
|
|
3294
|
+
var ee = $(F, 2), oe = y(ee);
|
|
3209
3295
|
oe.__click = v;
|
|
3210
3296
|
var se = $(oe, 2), kt = y(se, !0);
|
|
3211
3297
|
b(se), b(ee), b(W), fe(() => {
|
|
3212
3298
|
oe.disabled = s(l), se.disabled = s(l) || s(o).length === 0, le(kt, s(l) ? "Invio..." : "Invia");
|
|
3213
|
-
}),
|
|
3299
|
+
}), Wt("submit", W, u), Lr(me, () => s(i).nome, (Ce) => s(i).nome = Ce), j(H, W);
|
|
3214
3300
|
};
|
|
3215
|
-
Y(N, (
|
|
3216
|
-
s(
|
|
3301
|
+
Y(N, (H) => {
|
|
3302
|
+
s(_) || !s(i) ? H(X) : H(D, !1);
|
|
3217
3303
|
});
|
|
3218
3304
|
}
|
|
3219
|
-
b(w), b(A), b(S), b(
|
|
3305
|
+
b(w), b(A), b(S), b(m), j(g, m);
|
|
3220
3306
|
};
|
|
3221
3307
|
Y(h, (g) => {
|
|
3222
3308
|
r() && g(E);
|
|
3223
3309
|
});
|
|
3224
3310
|
}
|
|
3225
|
-
return j(e, c),
|
|
3311
|
+
return j(e, c), it(p);
|
|
3226
3312
|
}
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
async function
|
|
3313
|
+
Ft(["click", "change"]);
|
|
3314
|
+
xt(Wa, { isOpen: {}, suiteId: {} }, [], [], !0);
|
|
3315
|
+
async function ks(e, t, r, n, a, i) {
|
|
3230
3316
|
if (!(!t() || s(r))) {
|
|
3231
3317
|
f(r, !0);
|
|
3232
3318
|
try {
|
|
@@ -3238,7 +3324,7 @@ async function gs(e, t, r, n, a, i) {
|
|
|
3238
3324
|
}
|
|
3239
3325
|
}
|
|
3240
3326
|
}
|
|
3241
|
-
var
|
|
3327
|
+
var ws = (
|
|
3242
3328
|
// Crea tutti i nodi
|
|
3243
3329
|
// Costruisci le relazioni parent-child
|
|
3244
3330
|
// Ordina tutti i children per ordine_categoria
|
|
@@ -3259,21 +3345,21 @@ var ms = (
|
|
|
3259
3345
|
// Aggiungi la nuova domanda all'array ai_output
|
|
3260
3346
|
// Ricostruisci l'albero e ripristina lo stato di espansione
|
|
3261
3347
|
(e, t, r) => t(r())
|
|
3262
|
-
),
|
|
3263
|
-
},
|
|
3348
|
+
), Es = () => {
|
|
3349
|
+
}, $s = /* @__PURE__ */ R('<span class="expand-icon svelte-ie6pne"> </span>'), Ss = (e, t, r, n) => {
|
|
3264
3350
|
s(t) || (e.stopPropagation(), r("puntoNorma", n().entry));
|
|
3265
|
-
},
|
|
3351
|
+
}, Ts = (e, t, r, n) => {
|
|
3266
3352
|
!s(t) && (e.key === "Enter" || e.key === " ") && (e.stopPropagation(), r("puntoNorma", n().entry));
|
|
3267
|
-
},
|
|
3353
|
+
}, qs = (e, t, r) => {
|
|
3268
3354
|
e.stopPropagation(), t("category", r().entry);
|
|
3269
|
-
},
|
|
3355
|
+
}, js = (e, t, r) => t(r().entry.id), As = /* @__PURE__ */ R('<button class="add-btn svelte-ie6pne" title="Aggiungi domanda" aria-label="Aggiungi domanda"><i class="fa-solid fa-plus svelte-ie6pne"></i></button>'), Ns = (e, t, r) => {
|
|
3270
3356
|
e.stopPropagation(), t(r());
|
|
3271
|
-
},
|
|
3357
|
+
}, Is = /* @__PURE__ */ R('<button class="edit-btn edit-btn-inline svelte-ie6pne" title="Modifica categoria" aria-label="Modifica categoria"><i class="fa-solid fa-pen-to-square svelte-ie6pne"></i></button> <!> <button class="delete-btn delete-btn-inline svelte-ie6pne" title="Elimina categoria e tutti i figli" aria-label="Elimina categoria"><i class="fa-solid fa-trash svelte-ie6pne"></i></button>', 1), zs = /* @__PURE__ */ R('<div class="category-children svelte-ie6pne"></div>'), Os = /* @__PURE__ */ R('<div class="category-node svelte-ie6pne"><div class="category-header-wrapper svelte-ie6pne"><div role="button" tabindex="0"><!> <span role="button" tabindex="0"> </span> <span class="category-name svelte-ie6pne"> </span> <!></div></div> <!></div>'), Cs = (e, t, r, n) => {
|
|
3272
3358
|
s(t) || (e.stopPropagation(), r("puntoNorma", n().entry));
|
|
3273
|
-
},
|
|
3359
|
+
}, Ps = (e, t, r, n) => {
|
|
3274
3360
|
!s(t) && (e.key === "Enter" || e.key === " ") && (e.stopPropagation(), r("puntoNorma", n().entry));
|
|
3275
|
-
},
|
|
3276
|
-
const
|
|
3361
|
+
}, Ms = (e, t, r) => t("question", r().entry), Ds = (e, t, r) => t(r().entry), Rs = /* @__PURE__ */ R('<button class="edit-btn edit-btn-question svelte-ie6pne" title="Modifica domanda" aria-label="Modifica domanda"><i class="fa-solid fa-pen-to-square"></i></button> <button class="delete-btn delete-btn-question svelte-ie6pne" title="Elimina domanda" aria-label="Elimina domanda"><i class="fa-solid fa-trash"></i></button>', 1), Ls = (e, t, r) => t("explanation", r().entry), Fs = /* @__PURE__ */ R('<button class="edit-btn edit-btn-question svelte-ie6pne" title="Modifica spiegazione" aria-label="Modifica spiegazione"><i class="fa-solid fa-pen-to-square"></i></button>'), Us = /* @__PURE__ */ R('<div class="item-node svelte-ie6pne"><div class="item-header svelte-ie6pne"><span role="button" tabindex="0"> </span> <div><!> <span class="question-label svelte-ie6pne">Domanda:</span></div> <span class="question-text svelte-ie6pne"> </span></div> <div class="item-explanation svelte-ie6pne"><div style="display: flex; align-items: center; gap: 0.5rem;"><!> <span class="explanation-label svelte-ie6pne">Spiegazione:</span></div> <p class="svelte-ie6pne"> </p></div></div>'), Bs = /* @__PURE__ */ R('<div class="tree-node svelte-ie6pne"><!></div>'), Hs = /* @__PURE__ */ R('<div class="loading svelte-ie6pne">Caricamento audit...</div>'), Vs = (e, t) => t("assessmentName"), Js = /* @__PURE__ */ R('<button class="edit-btn svelte-ie6pne" title="Modifica nome assessment" aria-label="Modifica nome assessment"><i class="fa-solid fa-pen-to-square"></i></button>'), Ys = /* @__PURE__ */ R('<span class="processing-badge svelte-ie6pne"><i class="fa-solid fa-spinner fa-spin svelte-ie6pne"></i> Elaborazione in corso</span>'), Ws = /* @__PURE__ */ R('<button class="btn btn-refresh svelte-ie6pne" title="Aggiorna audit" aria-label="Aggiorna audit"><i></i> Refresh</button>'), Gs = (e, t) => t(!1), Ks = (e, t) => f(t, !0), Xs = /* @__PURE__ */ R('<button class="btn btn-check-template svelte-ie6pne" title="Controlla se ci sono categorie vuote">Check Template</button> <button class="btn btn-send-to-suite svelte-ie6pne" title="Invia template alla Suite">Invia Template alla Suite</button>', 1), Qs = (e, t) => f(t, !0), Zs = /* @__PURE__ */ R('<button class="btn btn-send-to-suite svelte-ie6pne" title="Modifica info normativa">Modifica Info Normativa</button>'), el = /* @__PURE__ */ R('<div class="progress-modal-overlay svelte-ie6pne"><div class="progress-modal svelte-ie6pne"><h3 class="svelte-ie6pne">Invio Template alla Suite</h3> <p class="svelte-ie6pne"> </p> <div class="progress-bar-container svelte-ie6pne"><div class="progress-bar svelte-ie6pne"></div></div> <p class="progress-percentage svelte-ie6pne"> </p></div></div>'), tl = /* @__PURE__ */ R('<div class="audit-viewer svelte-ie6pne"><div class="header svelte-ie6pne"><button class="btn btn-primary">← Indietro</button> <h1 class="svelte-ie6pne"> </h1> <!> <!> <!> <!> <!></div> <!> <!> <!> <!> <div class="tree-container svelte-ie6pne"></div></div>');
|
|
3362
|
+
const rl = {
|
|
3277
3363
|
hash: "svelte-ie6pne",
|
|
3278
3364
|
code: `.audit-viewer.svelte-ie6pne {padding:2rem;max-width:1400px;margin:0 auto;}.header.svelte-ie6pne {display:flex;align-items:center;gap:1rem;margin-bottom:2rem;padding:20px;background-color:white;border-radius:10px;}h1.svelte-ie6pne {margin:0;color:#333;}.loading.svelte-ie6pne {text-align:center;padding:4rem;color:#666;font-size:1.2rem;}.tree-container.svelte-ie6pne {background:white;border-radius:8px;padding:1rem;}.tree-node.svelte-ie6pne {margin-bottom:0.5rem;}.category-node.svelte-ie6pne {margin-bottom:1rem;}.category-header-wrapper.svelte-ie6pne {display:flex;align-items:center;gap:0.5rem;margin-bottom:0.5rem;}.category-header.svelte-ie6pne {display:flex;align-items:center;gap:0.75rem;flex:1;padding:1rem;background:#f8f9fa;border:2px solid #dee2e6;border-radius:6px;cursor:pointer;transition:all 0.2s;text-align:left;}.category-header.svelte-ie6pne:hover {background:#e9ecef;}.category-header.no-children.svelte-ie6pne {background:#ffddd0;}.category-header.no-children.svelte-ie6pne:hover {background:#ffc4b2;}.expand-icon.svelte-ie6pne {color:var(--bs-primary);font-size:0.8rem;min-width:1rem;}.punto-norma.svelte-ie6pne {font-weight:bold;color:#495057;min-width:80px;}.punto-norma.editable.svelte-ie6pne {cursor:pointer;padding:0.25rem 0.5rem;border-radius:4px;transition:all 0.2s;}.punto-norma.editable.svelte-ie6pne:hover {background-color:rgba(13, 110, 253, 0.1);color:#0d6efd;}.punto-norma-item.svelte-ie6pne {font-weight:bold;color:#495057;min-width:45px;font-size:0.9rem;}.punto-norma-item.editable.svelte-ie6pne {cursor:pointer;padding:0.25rem 0.5rem;border-radius:4px;transition:all 0.2s;}.punto-norma-item.editable.svelte-ie6pne:hover {background-color:rgba(13, 110, 253, 0.1);color:#0d6efd;}.category-name.svelte-ie6pne {color:#212529;font-weight:600;}.category-children.svelte-ie6pne {margin-top:0.5rem;}.item-node.svelte-ie6pne {background:white;border:1px solid #dee2e6;border-left:4px solid var(--bs-primary);border-radius:6px;padding:1rem;margin-bottom:0.75rem;}.item-header.svelte-ie6pne {display:flex;align-items:flex-start;gap:0.5rem;margin-bottom:0.75rem;}.question-label.svelte-ie6pne {font-weight:bold;color:#495057;min-width:80px;margin-right:5px;}.question-text.svelte-ie6pne {flex:1;color:#212529;}.item-explanation.svelte-ie6pne {color:#6c757d;}.explanation-label.svelte-ie6pne {font-weight:600;color:#495057;display:block;}.item-explanation.svelte-ie6pne p:where(.svelte-ie6pne) {margin:0;line-height:1.6;}\r
|
|
3279
3365
|
\r
|
|
@@ -3303,135 +3389,135 @@ const Ks = {
|
|
|
3303
3389
|
\r
|
|
3304
3390
|
/* Progress Modal */.progress-modal-overlay.svelte-ie6pne {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;}.progress-modal.svelte-ie6pne {background:white;border-radius:8px;padding:2rem;min-width:400px;box-shadow:0 4px 6px rgba(0, 0, 0, 0.1);}.progress-modal.svelte-ie6pne h3:where(.svelte-ie6pne) {margin:0 0 1rem 0;color:#333;font-size:1.5rem;}.progress-modal.svelte-ie6pne p:where(.svelte-ie6pne) {margin:0.5rem 0;color:#666;}.progress-bar-container.svelte-ie6pne {width:100%;height:30px;background-color:#e9ecef;border-radius:15px;overflow:hidden;margin:1rem 0;}.progress-bar.svelte-ie6pne {height:100%;background:linear-gradient(90deg, #0d6efd 0%, #0b5ed7 100%);transition:width 0.3s ease;display:flex;align-items:center;justify-content:center;color:white;font-weight:bold;}.progress-percentage.svelte-ie6pne {text-align:center;font-size:1.2rem;font-weight:bold;color:#0d6efd;}`
|
|
3305
3391
|
};
|
|
3306
|
-
function
|
|
3307
|
-
|
|
3308
|
-
const r = (k, x =
|
|
3309
|
-
var de =
|
|
3392
|
+
function Ga(e, t) {
|
|
3393
|
+
at(t, !0), cr(e, rl);
|
|
3394
|
+
const r = (k, x = Ct, I = Ct, T = Ct) => {
|
|
3395
|
+
var de = rt(), he = Ee(de);
|
|
3310
3396
|
{
|
|
3311
|
-
var wt = (
|
|
3312
|
-
var
|
|
3397
|
+
var wt = (Ut) => {
|
|
3398
|
+
var st = Bs(), Gr = y(st);
|
|
3313
3399
|
{
|
|
3314
|
-
var
|
|
3315
|
-
const
|
|
3316
|
-
var Fe =
|
|
3317
|
-
Te.__click = [
|
|
3318
|
-
var
|
|
3400
|
+
var qr = (Xe) => {
|
|
3401
|
+
const Qe = /* @__PURE__ */ Pn(() => s(w).ai_output.find((P) => P.parent_id === x().entry.id) !== void 0);
|
|
3402
|
+
var Fe = Os(), ke = y(Fe), Te = y(ke);
|
|
3403
|
+
Te.__click = [ws, F, x], Te.__keydown = [Es];
|
|
3404
|
+
var Bt = y(Te);
|
|
3319
3405
|
{
|
|
3320
|
-
var Et = (
|
|
3321
|
-
var J =
|
|
3322
|
-
b(J), fe(() => le(Z, x().expanded ? "▼" : "▶")), j(
|
|
3406
|
+
var Et = (P) => {
|
|
3407
|
+
var J = $s(), Z = y(J, !0);
|
|
3408
|
+
b(J), fe(() => le(Z, x().expanded ? "▼" : "▶")), j(P, J);
|
|
3323
3409
|
};
|
|
3324
|
-
Y(
|
|
3325
|
-
s(
|
|
3410
|
+
Y(Bt, (P) => {
|
|
3411
|
+
s(Qe) && P(Et);
|
|
3326
3412
|
});
|
|
3327
3413
|
}
|
|
3328
|
-
var
|
|
3414
|
+
var Me = $(Bt, 2);
|
|
3329
3415
|
let $t;
|
|
3330
|
-
|
|
3331
|
-
var St = y(
|
|
3332
|
-
b(
|
|
3333
|
-
var Tt = $(
|
|
3416
|
+
Me.__click = [Ss, D, E, x], Me.__keydown = [Ts, D, E, x];
|
|
3417
|
+
var St = y(Me, !0);
|
|
3418
|
+
b(Me);
|
|
3419
|
+
var Tt = $(Me, 2), qt = y(Tt, !0);
|
|
3334
3420
|
b(Tt);
|
|
3335
|
-
var
|
|
3421
|
+
var lt = $(Tt, 2);
|
|
3336
3422
|
{
|
|
3337
|
-
var
|
|
3338
|
-
var J =
|
|
3339
|
-
Z.__click = [
|
|
3423
|
+
var fr = (P) => {
|
|
3424
|
+
var J = Is(), Z = Ee(J);
|
|
3425
|
+
Z.__click = [qs, E, x];
|
|
3340
3426
|
var De = $(Z, 2);
|
|
3341
3427
|
{
|
|
3342
|
-
var jt = (
|
|
3343
|
-
var
|
|
3344
|
-
|
|
3428
|
+
var jt = (Vt) => {
|
|
3429
|
+
var jr = As();
|
|
3430
|
+
jr.__click = [js, ie, x], j(Vt, jr);
|
|
3345
3431
|
};
|
|
3346
|
-
Y(De, (
|
|
3347
|
-
s(
|
|
3432
|
+
Y(De, (Vt) => {
|
|
3433
|
+
s(Qe) || Vt(jt);
|
|
3348
3434
|
});
|
|
3349
3435
|
}
|
|
3350
|
-
var
|
|
3351
|
-
|
|
3436
|
+
var Xr = $(De, 2);
|
|
3437
|
+
Xr.__click = [Ns, S, x], j(P, J);
|
|
3352
3438
|
};
|
|
3353
|
-
Y(
|
|
3354
|
-
!s(D) && s(w) &&
|
|
3439
|
+
Y(lt, (P) => {
|
|
3440
|
+
!s(D) && s(w) && P(fr);
|
|
3355
3441
|
});
|
|
3356
3442
|
}
|
|
3357
3443
|
b(Te), b(ke);
|
|
3358
|
-
var
|
|
3444
|
+
var Ht = $(ke, 2);
|
|
3359
3445
|
{
|
|
3360
|
-
var q = (
|
|
3361
|
-
var J =
|
|
3362
|
-
|
|
3446
|
+
var q = (P) => {
|
|
3447
|
+
var J = zs();
|
|
3448
|
+
kr(J, 21, () => x().children, yr, (Z, De) => {
|
|
3363
3449
|
r(Z, () => s(De), () => I() + 1, x);
|
|
3364
|
-
}), b(J), j(
|
|
3450
|
+
}), b(J), j(P, J);
|
|
3365
3451
|
};
|
|
3366
|
-
Y(
|
|
3367
|
-
x().expanded && x().children.length > 0 &&
|
|
3452
|
+
Y(Ht, (P) => {
|
|
3453
|
+
x().expanded && x().children.length > 0 && P(q);
|
|
3368
3454
|
});
|
|
3369
3455
|
}
|
|
3370
3456
|
b(Fe), fe(
|
|
3371
|
-
(
|
|
3372
|
-
|
|
3457
|
+
(P, J) => {
|
|
3458
|
+
pr(Te, 1, "category-header" + (s(Qe) ? "" : " no-children"), "svelte-ie6pne"), mr(Te, "aria-label", x().expanded ? "Comprimi categoria" : "Espandi categoria"), $t = pr(Me, 1, "punto-norma svelte-ie6pne", null, $t, P), mr(Me, "title", s(D) ? "" : "Clicca per modificare"), le(St, J), le(qt, x().entry.category);
|
|
3373
3459
|
},
|
|
3374
3460
|
[
|
|
3375
3461
|
() => ({ editable: !s(D) }),
|
|
3376
3462
|
() => W(x().entry, T())
|
|
3377
3463
|
]
|
|
3378
|
-
), j(
|
|
3379
|
-
},
|
|
3380
|
-
var
|
|
3464
|
+
), j(Xe, Fe);
|
|
3465
|
+
}, Kr = (Xe) => {
|
|
3466
|
+
var Qe = Us(), Fe = y(Qe), ke = y(Fe);
|
|
3381
3467
|
let Te;
|
|
3382
|
-
ke.__click = [
|
|
3383
|
-
var
|
|
3468
|
+
ke.__click = [Cs, D, E, x], ke.__keydown = [Ps, D, E, x];
|
|
3469
|
+
var Bt = y(ke, !0);
|
|
3384
3470
|
b(ke);
|
|
3385
|
-
var Et = $(ke, 2),
|
|
3471
|
+
var Et = $(ke, 2), Me = y(Et);
|
|
3386
3472
|
{
|
|
3387
3473
|
var $t = (J) => {
|
|
3388
|
-
var Z =
|
|
3389
|
-
De.__click = [
|
|
3474
|
+
var Z = Rs(), De = Ee(Z);
|
|
3475
|
+
De.__click = [Ms, E, x];
|
|
3390
3476
|
var jt = $(De, 2);
|
|
3391
|
-
jt.__click = [
|
|
3477
|
+
jt.__click = [Ds, A, x], j(J, Z);
|
|
3392
3478
|
};
|
|
3393
|
-
Y(
|
|
3479
|
+
Y(Me, (J) => {
|
|
3394
3480
|
s(D) || J($t);
|
|
3395
3481
|
});
|
|
3396
3482
|
}
|
|
3397
|
-
|
|
3483
|
+
hr(2), b(Et);
|
|
3398
3484
|
var St = $(Et, 2), Tt = y(St, !0);
|
|
3399
3485
|
b(St), b(Fe);
|
|
3400
|
-
var qt = $(Fe, 2),
|
|
3486
|
+
var qt = $(Fe, 2), lt = y(qt), fr = y(lt);
|
|
3401
3487
|
{
|
|
3402
|
-
var
|
|
3403
|
-
var Z =
|
|
3404
|
-
Z.__click = [
|
|
3488
|
+
var Ht = (J) => {
|
|
3489
|
+
var Z = Fs();
|
|
3490
|
+
Z.__click = [Ls, E, x], j(J, Z);
|
|
3405
3491
|
};
|
|
3406
|
-
Y(
|
|
3407
|
-
s(D) || J(
|
|
3492
|
+
Y(fr, (J) => {
|
|
3493
|
+
s(D) || J(Ht);
|
|
3408
3494
|
});
|
|
3409
3495
|
}
|
|
3410
|
-
|
|
3411
|
-
var q = $(
|
|
3412
|
-
b(q), b(qt), b(
|
|
3496
|
+
hr(2), b(lt);
|
|
3497
|
+
var q = $(lt, 2), P = y(q, !0);
|
|
3498
|
+
b(q), b(qt), b(Qe), fe(
|
|
3413
3499
|
(J, Z) => {
|
|
3414
|
-
Te =
|
|
3500
|
+
Te = pr(ke, 1, "punto-norma-item svelte-ie6pne", null, Te, J), mr(ke, "title", s(D) ? "" : "Clicca per modificare"), le(Bt, Z), le(Tt, x().entry.question), le(P, x().entry.spiegazione);
|
|
3415
3501
|
},
|
|
3416
3502
|
[
|
|
3417
3503
|
() => ({ editable: !s(D) }),
|
|
3418
3504
|
() => W(x().entry, T())
|
|
3419
3505
|
]
|
|
3420
|
-
), j(
|
|
3506
|
+
), j(Xe, Qe);
|
|
3421
3507
|
};
|
|
3422
|
-
Y(
|
|
3423
|
-
x().entry.type === "category" ?
|
|
3508
|
+
Y(Gr, (Xe) => {
|
|
3509
|
+
x().entry.type === "category" ? Xe(qr) : Xe(Kr, !1);
|
|
3424
3510
|
});
|
|
3425
3511
|
}
|
|
3426
|
-
b(
|
|
3512
|
+
b(st), fe(() => Jn(st, `margin-left: ${I() * 2}rem;`)), j(Ut, st);
|
|
3427
3513
|
};
|
|
3428
|
-
Y(he, (
|
|
3429
|
-
s(w) &&
|
|
3514
|
+
Y(he, (Ut) => {
|
|
3515
|
+
s(w) && Ut(wt);
|
|
3430
3516
|
});
|
|
3431
3517
|
}
|
|
3432
3518
|
j(k, de);
|
|
3433
3519
|
};
|
|
3434
|
-
let n = ae(t, "auditId", 15), a = ae(t, "onBack", 7), i = /* @__PURE__ */ z(!1), o = /* @__PURE__ */ z(!1), l = /* @__PURE__ */ z(""), d = /* @__PURE__ */ z(""), u = /* @__PURE__ */ z(null), v = /* @__PURE__ */ z(null),
|
|
3520
|
+
let n = ae(t, "auditId", 15), a = ae(t, "onBack", 7), i = /* @__PURE__ */ z(!1), o = /* @__PURE__ */ z(!1), l = /* @__PURE__ */ z(""), d = /* @__PURE__ */ z(""), u = /* @__PURE__ */ z(null), v = /* @__PURE__ */ z(null), _ = /* @__PURE__ */ z(!1), p = /* @__PURE__ */ z(0), c = /* @__PURE__ */ z(0), h = /* @__PURE__ */ Pn(() => s(c) > 0 ? Math.round(s(p) / s(c) * 100) : 0);
|
|
3435
3521
|
function E(k, x) {
|
|
3436
3522
|
switch (f(u, k, !0), f(v, x || null, !0), k) {
|
|
3437
3523
|
case "assessmentName":
|
|
@@ -3455,10 +3541,10 @@ function Va(e, t) {
|
|
|
3455
3541
|
function g() {
|
|
3456
3542
|
f(o, !1), f(u, null), f(v, null), f(d, "");
|
|
3457
3543
|
}
|
|
3458
|
-
function
|
|
3544
|
+
function m(k) {
|
|
3459
3545
|
const x = [k.entry.id];
|
|
3460
3546
|
for (const I of k.children)
|
|
3461
|
-
x.push(...
|
|
3547
|
+
x.push(...m(I));
|
|
3462
3548
|
return x;
|
|
3463
3549
|
}
|
|
3464
3550
|
async function S(k) {
|
|
@@ -3466,8 +3552,8 @@ function Va(e, t) {
|
|
|
3466
3552
|
const I = `Sei sicuro di voler eliminare la categoria "${k.entry.category}" e tutti i suoi elementi figlio?`;
|
|
3467
3553
|
if (confirm(I))
|
|
3468
3554
|
try {
|
|
3469
|
-
const T = ee(s(N)), de =
|
|
3470
|
-
s(w).ai_output = s(w).ai_output.filter((he) => !de.includes(he.id)), console.log(s(w).ai_output), await Be.update(s(w)), f(N,
|
|
3555
|
+
const T = ee(s(N)), de = m(k);
|
|
3556
|
+
s(w).ai_output = s(w).ai_output.filter((he) => !de.includes(he.id)), console.log(s(w).ai_output), await Be.update(s(w)), f(N, H(s(w).ai_output), !0), oe(s(N), T), console.log(`Eliminata categoria e ${de.length - 1} elementi figlio`);
|
|
3471
3557
|
} catch (T) {
|
|
3472
3558
|
console.error("Errore durante l'eliminazione:", T), alert("Errore durante l'eliminazione della categoria");
|
|
3473
3559
|
}
|
|
@@ -3476,7 +3562,7 @@ function Va(e, t) {
|
|
|
3476
3562
|
if (!(!s(w) || !confirm("Sei sicuro di voler eliminare questa domanda?")))
|
|
3477
3563
|
try {
|
|
3478
3564
|
const I = ee(s(N));
|
|
3479
|
-
s(w).ai_output = s(w).ai_output.filter((T) => T.id !== k.id), await Be.update(s(w)), f(N,
|
|
3565
|
+
s(w).ai_output = s(w).ai_output.filter((T) => T.id !== k.id), await Be.update(s(w)), f(N, H(s(w).ai_output), !0), oe(s(N), I), console.log(`Eliminata domanda con ID: ${k.id}`);
|
|
3480
3566
|
} catch (I) {
|
|
3481
3567
|
console.error("Errore durante l'eliminazione:", I), alert("Errore durante l'eliminazione della domanda");
|
|
3482
3568
|
}
|
|
@@ -3485,7 +3571,7 @@ function Va(e, t) {
|
|
|
3485
3571
|
if (!(!s(u) || !s(w))) {
|
|
3486
3572
|
switch (f(i, !0), s(u)) {
|
|
3487
3573
|
case "assessmentName":
|
|
3488
|
-
s(w).name = s(d), f(w,
|
|
3574
|
+
s(w).name = s(d), f(w, mt.fromJSON(s(
|
|
3489
3575
|
w
|
|
3490
3576
|
// Trigger reactivity
|
|
3491
3577
|
).toJSON()), !0);
|
|
@@ -3542,11 +3628,11 @@ function Va(e, t) {
|
|
|
3542
3628
|
g();
|
|
3543
3629
|
}
|
|
3544
3630
|
}
|
|
3545
|
-
let
|
|
3546
|
-
|
|
3631
|
+
let M = /* @__PURE__ */ z(!0), w = /* @__PURE__ */ z(null), N = /* @__PURE__ */ z(Ae([])), X = /* @__PURE__ */ z(!1), D = /* @__PURE__ */ z(!1);
|
|
3632
|
+
wa(() => {
|
|
3547
3633
|
f(D, s(w) !== null && s(w).status !== 2, !0);
|
|
3548
3634
|
});
|
|
3549
|
-
function
|
|
3635
|
+
function H(k) {
|
|
3550
3636
|
const x = /* @__PURE__ */ new Map(), I = [];
|
|
3551
3637
|
return k.forEach((T) => {
|
|
3552
3638
|
x.set(T.id, { entry: T, children: [], expanded: !1 });
|
|
@@ -3577,7 +3663,7 @@ function Va(e, t) {
|
|
|
3577
3663
|
if (T) return T;
|
|
3578
3664
|
}
|
|
3579
3665
|
}
|
|
3580
|
-
function
|
|
3666
|
+
function F(k) {
|
|
3581
3667
|
k.expanded = !k.expanded, f(N, [...s(
|
|
3582
3668
|
N
|
|
3583
3669
|
// Trigger reactivity
|
|
@@ -3629,18 +3715,18 @@ ${x.join(`
|
|
|
3629
3715
|
}
|
|
3630
3716
|
if (confirm("Sei sicuro di voler inviare il template di questo audit alla Suite? Una volta inviato, non potrai più modificarlo."))
|
|
3631
3717
|
try {
|
|
3632
|
-
f(
|
|
3633
|
-
let I = await
|
|
3718
|
+
f(_, !0), f(p, 0), f(c, 0);
|
|
3719
|
+
let I = await is(s(w), k, (T, de) => {
|
|
3634
3720
|
f(p, T, !0), f(c, de, !0);
|
|
3635
3721
|
});
|
|
3636
|
-
s(w).suite_id = I, s(w).status = 3, await Be.update(s(w)), f(w,
|
|
3722
|
+
s(w).suite_id = I, s(w).status = 3, await Be.update(s(w)), f(w, mt.fromJSON(s(
|
|
3637
3723
|
w
|
|
3638
3724
|
// Trigger reactivity
|
|
3639
3725
|
).toJSON()), !0), alert("Template inviato con successo alla Suite!");
|
|
3640
3726
|
} catch (I) {
|
|
3641
3727
|
console.error("Errore durante l'invio:", I), alert("Errore durante l'invio del template alla Suite");
|
|
3642
3728
|
} finally {
|
|
3643
|
-
f(
|
|
3729
|
+
f(_, !1);
|
|
3644
3730
|
}
|
|
3645
3731
|
else
|
|
3646
3732
|
return;
|
|
@@ -3658,7 +3744,7 @@ ${x.join(`
|
|
|
3658
3744
|
punto_norma: "",
|
|
3659
3745
|
status: "new"
|
|
3660
3746
|
}, I = ee(s(N));
|
|
3661
|
-
s(w).ai_output.push(x), f(N,
|
|
3747
|
+
s(w).ai_output.push(x), f(N, H(s(w).ai_output), !0), oe(s(N), I), await Be.update(s(w));
|
|
3662
3748
|
}
|
|
3663
3749
|
function ee(k) {
|
|
3664
3750
|
const x = /* @__PURE__ */ new Set();
|
|
@@ -3674,8 +3760,8 @@ ${x.join(`
|
|
|
3674
3760
|
k.forEach(I);
|
|
3675
3761
|
}
|
|
3676
3762
|
let se = /* @__PURE__ */ z(!1);
|
|
3677
|
-
|
|
3678
|
-
f(w, await Be.get(n()), !0), s(w) && f(N,
|
|
3763
|
+
or(async () => {
|
|
3764
|
+
f(w, await Be.get(n()), !0), s(w) && f(N, H(s(w).ai_output), !0), f(M, !1);
|
|
3679
3765
|
});
|
|
3680
3766
|
var kt = {
|
|
3681
3767
|
get auditId() {
|
|
@@ -3690,61 +3776,61 @@ ${x.join(`
|
|
|
3690
3776
|
set onBack(k) {
|
|
3691
3777
|
a(k), re();
|
|
3692
3778
|
}
|
|
3693
|
-
}, Ce =
|
|
3779
|
+
}, Ce = rt(), ye = Ee(Ce);
|
|
3694
3780
|
{
|
|
3695
|
-
var
|
|
3696
|
-
var x =
|
|
3781
|
+
var Pe = (k) => {
|
|
3782
|
+
var x = Hs();
|
|
3697
3783
|
j(k, x);
|
|
3698
3784
|
}, pe = (k) => {
|
|
3699
|
-
var x =
|
|
3785
|
+
var x = rt(), I = Ee(x);
|
|
3700
3786
|
{
|
|
3701
3787
|
var T = (de) => {
|
|
3702
|
-
var he =
|
|
3703
|
-
|
|
3788
|
+
var he = tl(), wt = y(he), Ut = y(wt);
|
|
3789
|
+
Ut.__click = function(...q) {
|
|
3704
3790
|
a()?.apply(this, q);
|
|
3705
3791
|
};
|
|
3706
|
-
var
|
|
3707
|
-
b(
|
|
3708
|
-
var
|
|
3792
|
+
var st = $(Ut, 2), Gr = y(st, !0);
|
|
3793
|
+
b(st);
|
|
3794
|
+
var qr = $(st, 2);
|
|
3709
3795
|
{
|
|
3710
|
-
var
|
|
3711
|
-
var
|
|
3712
|
-
|
|
3796
|
+
var Kr = (q) => {
|
|
3797
|
+
var P = Js();
|
|
3798
|
+
P.__click = [Vs, E], j(q, P);
|
|
3713
3799
|
};
|
|
3714
|
-
Y(
|
|
3715
|
-
s(D) || q(
|
|
3800
|
+
Y(qr, (q) => {
|
|
3801
|
+
s(D) || q(Kr);
|
|
3716
3802
|
});
|
|
3717
3803
|
}
|
|
3718
|
-
var
|
|
3804
|
+
var Xe = $(qr, 2);
|
|
3719
3805
|
{
|
|
3720
|
-
var
|
|
3721
|
-
var
|
|
3722
|
-
j(q,
|
|
3806
|
+
var Qe = (q) => {
|
|
3807
|
+
var P = Ys();
|
|
3808
|
+
j(q, P);
|
|
3723
3809
|
};
|
|
3724
|
-
Y(
|
|
3725
|
-
s(w).status < 2 && q(
|
|
3810
|
+
Y(Xe, (q) => {
|
|
3811
|
+
s(w).status < 2 && q(Qe);
|
|
3726
3812
|
});
|
|
3727
3813
|
}
|
|
3728
|
-
var Fe = $(
|
|
3814
|
+
var Fe = $(Xe, 2);
|
|
3729
3815
|
{
|
|
3730
3816
|
var ke = (q) => {
|
|
3731
|
-
var
|
|
3732
|
-
|
|
3733
|
-
|
|
3817
|
+
var P = Ws();
|
|
3818
|
+
P.__click = [
|
|
3819
|
+
ks,
|
|
3734
3820
|
n,
|
|
3735
3821
|
X,
|
|
3736
3822
|
w,
|
|
3737
3823
|
N,
|
|
3738
|
-
|
|
3824
|
+
H
|
|
3739
3825
|
];
|
|
3740
|
-
var J = y(
|
|
3826
|
+
var J = y(P);
|
|
3741
3827
|
let Z;
|
|
3742
|
-
|
|
3828
|
+
hr(), b(P), fe(
|
|
3743
3829
|
(De) => {
|
|
3744
|
-
|
|
3830
|
+
P.disabled = s(X), Z = pr(J, 1, "fa-solid fa-refresh svelte-ie6pne", null, Z, De);
|
|
3745
3831
|
},
|
|
3746
3832
|
[() => ({ spinning: s(X) })]
|
|
3747
|
-
), j(q,
|
|
3833
|
+
), j(q, P);
|
|
3748
3834
|
};
|
|
3749
3835
|
Y(Fe, (q) => {
|
|
3750
3836
|
s(w).status <= 2 && q(ke);
|
|
@@ -3752,29 +3838,29 @@ ${x.join(`
|
|
|
3752
3838
|
}
|
|
3753
3839
|
var Te = $(Fe, 2);
|
|
3754
3840
|
{
|
|
3755
|
-
var
|
|
3756
|
-
var
|
|
3757
|
-
J.__click = [
|
|
3841
|
+
var Bt = (q) => {
|
|
3842
|
+
var P = Xs(), J = Ee(P);
|
|
3843
|
+
J.__click = [Gs, K];
|
|
3758
3844
|
var Z = $(J, 2);
|
|
3759
|
-
Z.__click = [
|
|
3845
|
+
Z.__click = [Ks, xe], j(q, P);
|
|
3760
3846
|
};
|
|
3761
3847
|
Y(Te, (q) => {
|
|
3762
|
-
s(w).status === 2 && q(
|
|
3848
|
+
s(w).status === 2 && q(Bt);
|
|
3763
3849
|
});
|
|
3764
3850
|
}
|
|
3765
3851
|
var Et = $(Te, 2);
|
|
3766
3852
|
{
|
|
3767
|
-
var
|
|
3768
|
-
var
|
|
3769
|
-
|
|
3853
|
+
var Me = (q) => {
|
|
3854
|
+
var P = Zs();
|
|
3855
|
+
P.__click = [Qs, se], j(q, P);
|
|
3770
3856
|
};
|
|
3771
3857
|
Y(Et, (q) => {
|
|
3772
|
-
s(w).status == 3 && q(
|
|
3858
|
+
s(w).status == 3 && q(Me);
|
|
3773
3859
|
});
|
|
3774
3860
|
}
|
|
3775
3861
|
b(wt);
|
|
3776
3862
|
var $t = $(wt, 2);
|
|
3777
|
-
|
|
3863
|
+
Ya($t, {
|
|
3778
3864
|
get normativaName() {
|
|
3779
3865
|
return s(w).name;
|
|
3780
3866
|
},
|
|
@@ -3789,15 +3875,15 @@ ${x.join(`
|
|
|
3789
3875
|
var St = $($t, 2);
|
|
3790
3876
|
{
|
|
3791
3877
|
var Tt = (q) => {
|
|
3792
|
-
|
|
3878
|
+
Wa(q, {
|
|
3793
3879
|
get suiteId() {
|
|
3794
3880
|
return s(w).suite_id;
|
|
3795
3881
|
},
|
|
3796
3882
|
get isOpen() {
|
|
3797
3883
|
return s(se);
|
|
3798
3884
|
},
|
|
3799
|
-
set isOpen(
|
|
3800
|
-
f(se,
|
|
3885
|
+
set isOpen(P) {
|
|
3886
|
+
f(se, P, !0);
|
|
3801
3887
|
}
|
|
3802
3888
|
});
|
|
3803
3889
|
};
|
|
@@ -3806,7 +3892,7 @@ ${x.join(`
|
|
|
3806
3892
|
});
|
|
3807
3893
|
}
|
|
3808
3894
|
var qt = $(St, 2);
|
|
3809
|
-
|
|
3895
|
+
Ja(qt, {
|
|
3810
3896
|
saveEdit: O,
|
|
3811
3897
|
closeModal: g,
|
|
3812
3898
|
get isSaving() {
|
|
@@ -3840,27 +3926,27 @@ ${x.join(`
|
|
|
3840
3926
|
f(u, q, !0);
|
|
3841
3927
|
}
|
|
3842
3928
|
});
|
|
3843
|
-
var
|
|
3929
|
+
var lt = $(qt, 2);
|
|
3844
3930
|
{
|
|
3845
|
-
var
|
|
3846
|
-
var
|
|
3931
|
+
var fr = (q) => {
|
|
3932
|
+
var P = el(), J = y(P), Z = $(y(J), 2), De = y(Z);
|
|
3847
3933
|
b(Z);
|
|
3848
|
-
var jt = $(Z, 2),
|
|
3934
|
+
var jt = $(Z, 2), Xr = y(jt);
|
|
3849
3935
|
b(jt);
|
|
3850
|
-
var
|
|
3851
|
-
b(
|
|
3852
|
-
le(De, `Invio in corso... ${s(p) ?? ""} / ${s(c) ?? ""}`),
|
|
3853
|
-
}), j(q,
|
|
3936
|
+
var Vt = $(jt, 2), jr = y(Vt);
|
|
3937
|
+
b(Vt), b(J), b(P), fe(() => {
|
|
3938
|
+
le(De, `Invio in corso... ${s(p) ?? ""} / ${s(c) ?? ""}`), Jn(Xr, `width: ${s(h) ?? ""}%`), le(jr, `${s(h) ?? ""}%`);
|
|
3939
|
+
}), j(q, P);
|
|
3854
3940
|
};
|
|
3855
|
-
Y(
|
|
3856
|
-
s(
|
|
3941
|
+
Y(lt, (q) => {
|
|
3942
|
+
s(_) && q(fr);
|
|
3857
3943
|
});
|
|
3858
3944
|
}
|
|
3859
|
-
var
|
|
3860
|
-
|
|
3861
|
-
r(q, () => s(
|
|
3945
|
+
var Ht = $(lt, 2);
|
|
3946
|
+
kr(Ht, 21, () => s(N), yr, (q, P) => {
|
|
3947
|
+
r(q, () => s(P), () => 0, () => {
|
|
3862
3948
|
});
|
|
3863
|
-
}), b(
|
|
3949
|
+
}), b(Ht), b(he), fe(() => le(Gr, s(w).name)), j(de, he);
|
|
3864
3950
|
};
|
|
3865
3951
|
Y(
|
|
3866
3952
|
I,
|
|
@@ -3873,22 +3959,22 @@ ${x.join(`
|
|
|
3873
3959
|
j(k, x);
|
|
3874
3960
|
};
|
|
3875
3961
|
Y(ye, (k) => {
|
|
3876
|
-
s(
|
|
3962
|
+
s(M) ? k(Pe) : k(pe, !1);
|
|
3877
3963
|
});
|
|
3878
3964
|
}
|
|
3879
|
-
return j(e, Ce),
|
|
3965
|
+
return j(e, Ce), it(kt);
|
|
3880
3966
|
}
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
function
|
|
3967
|
+
Ft(["click", "keydown"]);
|
|
3968
|
+
xt(Ga, { auditId: {}, onBack: {} }, [], [], !0);
|
|
3969
|
+
function nl(e, t, r) {
|
|
3884
3970
|
const n = e.target;
|
|
3885
3971
|
n.files && n.files[0] && (f(t, n.files[0], !0), s(r).trim() === "" && f(r, s(t).name, !0));
|
|
3886
3972
|
}
|
|
3887
|
-
function
|
|
3973
|
+
function al(e, t) {
|
|
3888
3974
|
f(t, null);
|
|
3889
3975
|
}
|
|
3890
|
-
var
|
|
3891
|
-
const
|
|
3976
|
+
var il = /* @__PURE__ */ R('<div><div class="drop-zone-content svelte-r8ykeg"><div class="upload-icon svelte-r8ykeg"><i class="fa-solid fa-file-upload"></i></div> <p class="svelte-r8ykeg">Trascina il file qui o</p> <label for="fileInput" class="file-button svelte-r8ykeg">Seleziona File</label> <input id="fileInput" type="file" style="display: none;"/></div></div>'), ol = /* @__PURE__ */ R('<div class="selected-file svelte-r8ykeg"><div class="file-info svelte-r8ykeg"><span class="file-name svelte-r8ykeg"> </span> <span class="file-size svelte-r8ykeg"> </span></div> <button type="button" class="remove-file-button svelte-r8ykeg" title="Rimuovi file">✕</button></div>'), sl = /* @__PURE__ */ R('<div class="modal-backdrop svelte-r8ykeg"><div class="modal-dialog svelte-r8ykeg" role="dialog" aria-labelledby="modal-title"><div class="modal-content svelte-r8ykeg"><div class="modal-header svelte-r8ykeg"><h2 id="modal-title" class="svelte-r8ykeg">Aggiungi Template</h2> <button type="button" class="close-button svelte-r8ykeg" aria-label="Chiudi modale"><i class="fa-solid fa-xmark"></i></button></div> <div class="modal-body svelte-r8ykeg"><form><div class="form-group svelte-r8ykeg"><div class="input-with-button svelte-r8ykeg"><label for="name" class="svelte-r8ykeg">Nome *</label></div> <input id="name" type="text" required placeholder="Inserisci Nome" class="svelte-r8ykeg"/></div> <div class="form-group svelte-r8ykeg"><label for="fileInput" class="svelte-r8ykeg">File *</label> <!></div> <div class="modal-footer svelte-r8ykeg"><button type="button" class="cancel-button svelte-r8ykeg">Annulla</button> <button type="submit" class="submit-button svelte-r8ykeg"> </button></div></form></div></div></div></div>');
|
|
3977
|
+
const ll = {
|
|
3892
3978
|
hash: "svelte-r8ykeg",
|
|
3893
3979
|
code: `.modal-backdrop.svelte-r8ykeg {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;backdrop-filter:blur(2px);}.modal-dialog.svelte-r8ykeg {width:90%;max-width:500px;max-height:90vh;overflow-y:auto;}.modal-content.svelte-r8ykeg {background:white;border-radius:8px;box-shadow:0 10px 30px rgba(0, 0, 0, 0.3);overflow:hidden;}.modal-header.svelte-r8ykeg {padding:16px 20px;border-bottom:1px solid #dee2e6;display:flex;justify-content:space-between;align-items:center;background:#f8f9fa;}.modal-header.svelte-r8ykeg h2:where(.svelte-r8ykeg) {margin:0;color:#2c3e50;font-size:1.25rem;font-weight:600;}.close-button.svelte-r8ykeg {background:none;border:none;font-size:24px;color:#6c757d;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color 0.2s;}.close-button.svelte-r8ykeg:hover {background-color:#e9ecef;color:#495057;}.modal-body.svelte-r8ykeg {padding:20px;}.form-group.svelte-r8ykeg {margin-bottom:16px;}.form-group.svelte-r8ykeg label:where(.svelte-r8ykeg) {display:block;margin-bottom:4px;font-weight:500;color:#495057;font-size:0.9rem;}.input-with-button.svelte-r8ykeg {display:flex;justify-content:space-between;align-items:center;margin-bottom:4px;}.input-with-button.svelte-r8ykeg label:where(.svelte-r8ykeg) {margin-bottom:0;flex:1;}.input-with-button.svelte-r8ykeg + input:where(.svelte-r8ykeg) {width:100%;padding:8px 12px;border:1px solid #ced4da;border-radius:4px;font-size:0.95rem;transition:border-color 0.2s,\r
|
|
3894
3980
|
box-shadow 0.2s;}.input-with-button.svelte-r8ykeg + input:where(.svelte-r8ykeg):focus {outline:none;border-color:#007bff;box-shadow:0 0 0 2px rgba(0, 123, 255, 0.25);}.input-with-button.svelte-r8ykeg + input:where(.svelte-r8ykeg):disabled {background-color:#e9ecef;opacity:0.6;}.file-drop-zone.svelte-r8ykeg {border:2px dashed #ced4da;border-radius:6px;padding:24px 16px;text-align:center;transition:border-color 0.2s,\r
|
|
@@ -3897,20 +3983,20 @@ const rl = {
|
|
|
3897
3983
|
.submit-button.svelte-r8ykeg {padding:8px 16px;border:none;border-radius:4px;font-size:0.9rem;cursor:pointer;transition:background-color 0.2s;}.cancel-button.svelte-r8ykeg {background:#6c757d;color:white;}.cancel-button.svelte-r8ykeg:hover:not(:disabled) {background:#545b62;}.submit-button.svelte-r8ykeg {background:#28a745;color:white;}.submit-button.svelte-r8ykeg:hover:not(:disabled) {background:#218838;}.submit-button.svelte-r8ykeg:disabled,\r
|
|
3898
3984
|
.cancel-button.svelte-r8ykeg:disabled {opacity:0.6;cursor:not-allowed;}`
|
|
3899
3985
|
};
|
|
3900
|
-
function
|
|
3901
|
-
|
|
3986
|
+
function Ka(e, t) {
|
|
3987
|
+
at(t, !0), cr(e, ll);
|
|
3902
3988
|
let r = ae(t, "isOpen", 15), n = ae(t, "handleAuditAdded", 7), a = /* @__PURE__ */ z(""), i = /* @__PURE__ */ z(null), o = /* @__PURE__ */ z(!1), l = /* @__PURE__ */ z(!1);
|
|
3903
|
-
function d(
|
|
3904
|
-
|
|
3989
|
+
function d(m) {
|
|
3990
|
+
m.preventDefault(), f(o, !0);
|
|
3905
3991
|
}
|
|
3906
|
-
function u(
|
|
3907
|
-
|
|
3992
|
+
function u(m) {
|
|
3993
|
+
m.preventDefault(), f(o, !1);
|
|
3908
3994
|
}
|
|
3909
|
-
function v(
|
|
3910
|
-
|
|
3995
|
+
function v(m) {
|
|
3996
|
+
m.preventDefault(), f(o, !1), m.dataTransfer?.files && m.dataTransfer.files[0] && (f(i, m.dataTransfer.files[0], !0), s(a).trim() === "" && f(a, s(i).name, !0));
|
|
3911
3997
|
}
|
|
3912
|
-
async function m
|
|
3913
|
-
if (
|
|
3998
|
+
async function _(m) {
|
|
3999
|
+
if (m.preventDefault(), !s(a).trim() || !s(i)) {
|
|
3914
4000
|
alert("Compila tutti i campi richiesti e seleziona un file");
|
|
3915
4001
|
return;
|
|
3916
4002
|
}
|
|
@@ -3931,34 +4017,34 @@ function Ja(e, t) {
|
|
|
3931
4017
|
get isOpen() {
|
|
3932
4018
|
return r();
|
|
3933
4019
|
},
|
|
3934
|
-
set isOpen(
|
|
3935
|
-
r(
|
|
4020
|
+
set isOpen(m) {
|
|
4021
|
+
r(m), re();
|
|
3936
4022
|
},
|
|
3937
4023
|
get handleAuditAdded() {
|
|
3938
4024
|
return n();
|
|
3939
4025
|
},
|
|
3940
|
-
set handleAuditAdded(
|
|
3941
|
-
n(
|
|
4026
|
+
set handleAuditAdded(m) {
|
|
4027
|
+
n(m), re();
|
|
3942
4028
|
}
|
|
3943
|
-
}, h =
|
|
4029
|
+
}, h = rt(), E = Ee(h);
|
|
3944
4030
|
{
|
|
3945
|
-
var g = (
|
|
3946
|
-
var S =
|
|
3947
|
-
w.__click = p, b(
|
|
3948
|
-
var N = $(
|
|
3949
|
-
|
|
4031
|
+
var g = (m) => {
|
|
4032
|
+
var S = sl(), A = y(S), O = y(A), M = y(O), w = $(y(M), 2);
|
|
4033
|
+
w.__click = p, b(M);
|
|
4034
|
+
var N = $(M, 2), X = y(N), D = y(X), H = $(y(D), 2);
|
|
4035
|
+
sr(H), b(D);
|
|
3950
4036
|
var W = $(D, 2), ne = $(y(W), 2);
|
|
3951
4037
|
{
|
|
3952
4038
|
var me = (ie) => {
|
|
3953
|
-
var ee =
|
|
3954
|
-
se.__change = [
|
|
3955
|
-
},
|
|
3956
|
-
var ee =
|
|
4039
|
+
var ee = il(), oe = y(ee), se = $(y(oe), 6);
|
|
4040
|
+
se.__change = [nl, i, a], b(oe), b(ee), fe(() => pr(ee, 1, `file-drop-zone ${s(o) ? "dragging" : ""}`, "svelte-r8ykeg")), Wt("dragover", ee, d), Wt("dragleave", ee, u), Wt("drop", ee, v), j(ie, ee);
|
|
4041
|
+
}, F = (ie) => {
|
|
4042
|
+
var ee = ol(), oe = y(ee), se = y(oe), kt = y(se);
|
|
3957
4043
|
b(se);
|
|
3958
4044
|
var Ce = $(se, 2), ye = y(Ce);
|
|
3959
4045
|
b(Ce), b(oe);
|
|
3960
|
-
var
|
|
3961
|
-
|
|
4046
|
+
var Pe = $(oe, 2);
|
|
4047
|
+
Pe.__click = [al, i], b(ee), fe(
|
|
3962
4048
|
(pe) => {
|
|
3963
4049
|
le(kt, `📄 ${s(i).name ?? ""}`), le(ye, `(${pe ?? ""} KB)`);
|
|
3964
4050
|
},
|
|
@@ -3966,7 +4052,7 @@ function Ja(e, t) {
|
|
|
3966
4052
|
), j(ie, ee);
|
|
3967
4053
|
};
|
|
3968
4054
|
Y(ne, (ie) => {
|
|
3969
|
-
s(i) ? ie(
|
|
4055
|
+
s(i) ? ie(F, !1) : ie(me);
|
|
3970
4056
|
});
|
|
3971
4057
|
}
|
|
3972
4058
|
b(W);
|
|
@@ -3980,36 +4066,36 @@ function Ja(e, t) {
|
|
|
3980
4066
|
[
|
|
3981
4067
|
() => s(l) || !s(a).trim() || !s(i)
|
|
3982
4068
|
]
|
|
3983
|
-
),
|
|
4069
|
+
), Wt("submit", X, _), Lr(H, () => s(a), (ie) => f(a, ie)), j(m, S);
|
|
3984
4070
|
};
|
|
3985
|
-
Y(E, (
|
|
3986
|
-
r() &&
|
|
4071
|
+
Y(E, (m) => {
|
|
4072
|
+
r() && m(g);
|
|
3987
4073
|
});
|
|
3988
4074
|
}
|
|
3989
|
-
return j(e, h),
|
|
4075
|
+
return j(e, h), it(c);
|
|
3990
4076
|
}
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
var
|
|
3994
|
-
function
|
|
3995
|
-
|
|
4077
|
+
Ft(["click", "change"]);
|
|
4078
|
+
xt(Ka, { isOpen: {}, handleAuditAdded: {} }, [], [], !0);
|
|
4079
|
+
var dl = (e, t) => f(t, !0), cl = /* @__PURE__ */ R('<div class="row"><div class="col"><nav aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item active" aria-current="page">AKS Audit Handler</li></ol></nav></div> <div class="col-auto"><button class="btn aks-md-btn-rounded btn-primary" type="submit" id="akj-btn_create_assessment" data-bs-toggle="modal" data-bs-target="#aggiungiAssessmentModal"><i class="fa-solid fa-plus"></i><span class="d-none d-md-inline ps-2">Nuovo Template</span></button></div></div> <!> <!>', 1);
|
|
4080
|
+
function Xa(e, t) {
|
|
4081
|
+
at(t, !0);
|
|
3996
4082
|
let r = /* @__PURE__ */ z(0), n = /* @__PURE__ */ z(null);
|
|
3997
|
-
|
|
4083
|
+
or(() => {
|
|
3998
4084
|
new URLSearchParams(window.location.search).get("tab_selected") == "viewer" && f(r, 0);
|
|
3999
4085
|
});
|
|
4000
4086
|
let a = /* @__PURE__ */ z(0), i = /* @__PURE__ */ z(!1), o = /* @__PURE__ */ z(!1);
|
|
4001
|
-
const l = (
|
|
4002
|
-
f(n,
|
|
4087
|
+
const l = (m) => {
|
|
4088
|
+
f(n, m, !0), f(o, !1);
|
|
4003
4089
|
};
|
|
4004
|
-
|
|
4005
|
-
f(i, !0), f(a, await
|
|
4090
|
+
or(async () => {
|
|
4091
|
+
f(i, !0), f(a, await To(), !0), f(i, !1);
|
|
4006
4092
|
});
|
|
4007
|
-
var d =
|
|
4008
|
-
|
|
4093
|
+
var d = cl(), u = Ee(d), v = $(y(u), 2), _ = y(v);
|
|
4094
|
+
_.__click = [dl, o], b(v), b(u);
|
|
4009
4095
|
var p = $(u, 2);
|
|
4010
4096
|
{
|
|
4011
|
-
var c = (
|
|
4012
|
-
|
|
4097
|
+
var c = (m) => {
|
|
4098
|
+
Ga(m, {
|
|
4013
4099
|
get auditId() {
|
|
4014
4100
|
return s(n);
|
|
4015
4101
|
},
|
|
@@ -4017,17 +4103,17 @@ function Ya(e, t) {
|
|
|
4017
4103
|
f(n, null);
|
|
4018
4104
|
}
|
|
4019
4105
|
});
|
|
4020
|
-
}, h = (
|
|
4021
|
-
|
|
4106
|
+
}, h = (m) => {
|
|
4107
|
+
Va(m, { onSelectAudit: (S) => f(n, S, !0) });
|
|
4022
4108
|
};
|
|
4023
|
-
Y(p, (
|
|
4024
|
-
s(n) ?
|
|
4109
|
+
Y(p, (m) => {
|
|
4110
|
+
s(n) ? m(c) : m(h, !1);
|
|
4025
4111
|
});
|
|
4026
4112
|
}
|
|
4027
4113
|
var E = $(p, 2);
|
|
4028
4114
|
{
|
|
4029
|
-
var g = (
|
|
4030
|
-
|
|
4115
|
+
var g = (m) => {
|
|
4116
|
+
Ka(m, {
|
|
4031
4117
|
handleAuditAdded: l,
|
|
4032
4118
|
get isOpen() {
|
|
4033
4119
|
return s(o);
|
|
@@ -4037,38 +4123,36 @@ function Ya(e, t) {
|
|
|
4037
4123
|
}
|
|
4038
4124
|
});
|
|
4039
4125
|
};
|
|
4040
|
-
Y(E, (
|
|
4041
|
-
s(o) &&
|
|
4126
|
+
Y(E, (m) => {
|
|
4127
|
+
s(o) && m(g);
|
|
4042
4128
|
});
|
|
4043
4129
|
}
|
|
4044
|
-
j(e, d),
|
|
4130
|
+
j(e, d), it();
|
|
4045
4131
|
}
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
function
|
|
4049
|
-
|
|
4050
|
-
let r = ae(t, "envId",
|
|
4051
|
-
|
|
4052
|
-
});
|
|
4053
|
-
document.cookie = `akb-audit-handler-envid=${r()}`, document.cookie = `akb-audit-handler-token=${n()}`;
|
|
4132
|
+
Ft(["click"]);
|
|
4133
|
+
xt(Xa, {}, [], [], !0);
|
|
4134
|
+
function ul(e, t) {
|
|
4135
|
+
at(t, !0);
|
|
4136
|
+
let r = ae(t, "envId", 7), n = ae(t, "token", 7);
|
|
4137
|
+
In.set({ envId: r() || "", token: n() || "" });
|
|
4054
4138
|
var a = {
|
|
4055
4139
|
get envId() {
|
|
4056
4140
|
return r();
|
|
4057
4141
|
},
|
|
4058
|
-
set envId(i
|
|
4142
|
+
set envId(i) {
|
|
4059
4143
|
r(i), re();
|
|
4060
4144
|
},
|
|
4061
4145
|
get token() {
|
|
4062
4146
|
return n();
|
|
4063
4147
|
},
|
|
4064
|
-
set token(i
|
|
4148
|
+
set token(i) {
|
|
4065
4149
|
n(i), re();
|
|
4066
4150
|
}
|
|
4067
4151
|
};
|
|
4068
|
-
return
|
|
4152
|
+
return Xa(e, {}), it(a);
|
|
4069
4153
|
}
|
|
4070
|
-
customElements.define("akb-audit-handler-component",
|
|
4071
|
-
|
|
4154
|
+
customElements.define("akb-audit-handler-component", xt(
|
|
4155
|
+
ul,
|
|
4072
4156
|
{
|
|
4073
4157
|
token: { attribute: "aks-token", reflect: !0, type: "String" },
|
|
4074
4158
|
envId: { attribute: "env-id", reflect: !0, type: "String" }
|
|
@@ -4078,5 +4162,5 @@ customElements.define("akb-audit-handler-component", bt(
|
|
|
4078
4162
|
!1
|
|
4079
4163
|
));
|
|
4080
4164
|
export {
|
|
4081
|
-
|
|
4165
|
+
ul as AKBAuditHandlerComponent
|
|
4082
4166
|
};
|