@schema-forms-data/builder 0.3.18 → 0.3.19
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/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +752 -746
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -121,118 +121,118 @@ const Pt = [
|
|
|
121
121
|
previewTemplateId: o || "moderno"
|
|
122
122
|
}), [c, d] = le(
|
|
123
123
|
null
|
|
124
|
-
), [m, p] = le(null), f = $e([]), v = $e([]), b = (
|
|
124
|
+
), [m, p] = le(null), f = $e([]), v = $e([]), b = (A) => {
|
|
125
125
|
f.current = [
|
|
126
126
|
...f.current.slice(-49),
|
|
127
|
-
no(
|
|
127
|
+
no(A)
|
|
128
128
|
], v.current = [];
|
|
129
129
|
}, h = se(() => {
|
|
130
|
-
l((
|
|
130
|
+
l((A) => (b(A), { ...A }));
|
|
131
131
|
}, []), x = se(() => {
|
|
132
|
-
f.current.length !== 0 && l((
|
|
133
|
-
v.current = [...v.current, no(
|
|
132
|
+
f.current.length !== 0 && l((A) => {
|
|
133
|
+
v.current = [...v.current, no(A)];
|
|
134
134
|
const I = f.current.pop();
|
|
135
|
-
return { ...
|
|
135
|
+
return { ...A, containers: I.containers, configs: I.configs };
|
|
136
136
|
});
|
|
137
137
|
}, []), y = se(() => {
|
|
138
|
-
v.current.length !== 0 && l((
|
|
139
|
-
f.current = [...f.current, no(
|
|
138
|
+
v.current.length !== 0 && l((A) => {
|
|
139
|
+
f.current = [...f.current, no(A)];
|
|
140
140
|
const I = v.current.pop();
|
|
141
|
-
return { ...
|
|
141
|
+
return { ...A, containers: I.containers, configs: I.configs };
|
|
142
142
|
});
|
|
143
143
|
}, []);
|
|
144
144
|
rt(() => {
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
|
|
145
|
+
const A = (I) => {
|
|
146
|
+
const T = I.metaKey || I.ctrlKey;
|
|
147
|
+
T && I.key === "z" && !I.shiftKey && (I.preventDefault(), x()), T && I.key === "z" && I.shiftKey && (I.preventDefault(), y()), T && I.key === "y" && (I.preventDefault(), y());
|
|
148
148
|
};
|
|
149
|
-
return window.addEventListener("keydown",
|
|
149
|
+
return window.addEventListener("keydown", A), () => window.removeEventListener("keydown", A);
|
|
150
150
|
}, [x, y]);
|
|
151
151
|
const N = se(
|
|
152
|
-
(
|
|
152
|
+
(A) => i.configs[A] ?? oo(A),
|
|
153
153
|
[i.configs]
|
|
154
|
-
),
|
|
155
|
-
const
|
|
154
|
+
), S = se(() => {
|
|
155
|
+
const A = [], I = (T) => {
|
|
156
156
|
var _;
|
|
157
|
-
const
|
|
158
|
-
for (const G of
|
|
159
|
-
fe(G) === "field" ?
|
|
157
|
+
const z = ((_ = i.containers[T]) == null ? void 0 : _.children) ?? [];
|
|
158
|
+
for (const G of z)
|
|
159
|
+
fe(G) === "field" ? A.push(G) : i.containers[G] && I(G);
|
|
160
160
|
};
|
|
161
|
-
return I("root"),
|
|
162
|
-
}, [i.containers]),
|
|
163
|
-
l((I) => ({ ...I, selectedId:
|
|
164
|
-
}, []), P = se((
|
|
165
|
-
l((I) => ({ ...I, showPreview:
|
|
166
|
-
}, []), R = se((
|
|
167
|
-
l((I) => ({ ...I, previewTemplateId:
|
|
161
|
+
return I("root"), A;
|
|
162
|
+
}, [i.containers]), C = se((A) => {
|
|
163
|
+
l((I) => ({ ...I, selectedId: A }));
|
|
164
|
+
}, []), P = se((A) => {
|
|
165
|
+
l((I) => ({ ...I, showPreview: A }));
|
|
166
|
+
}, []), R = se((A) => {
|
|
167
|
+
l((I) => ({ ...I, previewTemplateId: A }));
|
|
168
168
|
}, []), E = se(
|
|
169
|
-
(
|
|
170
|
-
l((
|
|
171
|
-
...
|
|
169
|
+
(A, I) => {
|
|
170
|
+
l((T) => ({
|
|
171
|
+
...T,
|
|
172
172
|
configs: {
|
|
173
|
-
...
|
|
174
|
-
[
|
|
173
|
+
...T.configs,
|
|
174
|
+
[A]: { ...T.configs[A] ?? oo(A), ...I }
|
|
175
175
|
}
|
|
176
176
|
}));
|
|
177
177
|
},
|
|
178
178
|
[]
|
|
179
179
|
), w = se(
|
|
180
|
-
(
|
|
181
|
-
const
|
|
180
|
+
(A, I, T) => {
|
|
181
|
+
const z = `${A}-${Pe()}`, _ = fe(z);
|
|
182
182
|
return l((G) => {
|
|
183
183
|
var q;
|
|
184
184
|
b(G);
|
|
185
185
|
const ne = { ...G.containers };
|
|
186
|
-
(_ === "step" || _ === "container" ||
|
|
186
|
+
(_ === "step" || _ === "container" || A === "field_array") && (ne[z] = { children: [] });
|
|
187
187
|
const ie = [
|
|
188
188
|
...((q = ne[I]) == null ? void 0 : q.children) ?? []
|
|
189
189
|
];
|
|
190
|
-
return
|
|
190
|
+
return T !== void 0 && T >= 0 ? ie.splice(T, 0, z) : ie.push(z), ne[I] = { children: ie }, {
|
|
191
191
|
...G,
|
|
192
192
|
containers: ne,
|
|
193
193
|
configs: {
|
|
194
194
|
...G.configs,
|
|
195
|
-
[
|
|
195
|
+
[z]: oo(z, A)
|
|
196
196
|
},
|
|
197
|
-
selectedId:
|
|
197
|
+
selectedId: z
|
|
198
198
|
};
|
|
199
|
-
}),
|
|
199
|
+
}), z;
|
|
200
200
|
},
|
|
201
201
|
[]
|
|
202
|
-
),
|
|
203
|
-
(
|
|
204
|
-
const
|
|
205
|
-
return l((
|
|
202
|
+
), k = se(
|
|
203
|
+
(A, I) => {
|
|
204
|
+
const T = `container-${Pe()}`;
|
|
205
|
+
return l((z) => {
|
|
206
206
|
var q, oe, ae;
|
|
207
|
-
b(
|
|
208
|
-
const _ = { ...
|
|
209
|
-
for (const
|
|
210
|
-
const re =
|
|
207
|
+
b(z);
|
|
208
|
+
const _ = { ...z.containers }, G = { ...z.configs }, ne = [];
|
|
209
|
+
for (const $ of A.containerTemplate.campos) {
|
|
210
|
+
const re = $.locked ? $.id : `${String($.tipo).toLowerCase()}-${Pe()}`;
|
|
211
211
|
if (ne.push(re), G[re] = {
|
|
212
|
-
label:
|
|
213
|
-
name:
|
|
214
|
-
fieldType:
|
|
215
|
-
required:
|
|
216
|
-
placeholder:
|
|
217
|
-
hint:
|
|
218
|
-
tamanho:
|
|
219
|
-
inicioColuna:
|
|
220
|
-
defaultValue:
|
|
221
|
-
locked:
|
|
222
|
-
options: (q =
|
|
212
|
+
label: $.label,
|
|
213
|
+
name: $.locked ? $.id : $.nome,
|
|
214
|
+
fieldType: $.tipo,
|
|
215
|
+
required: $.obrigatorio || !1,
|
|
216
|
+
placeholder: $.placeholder,
|
|
217
|
+
hint: $.hint,
|
|
218
|
+
tamanho: $.tamanho || 6,
|
|
219
|
+
inicioColuna: $.inicioColuna,
|
|
220
|
+
defaultValue: $.defaultValue != null ? String($.defaultValue) : void 0,
|
|
221
|
+
locked: $.locked || !1,
|
|
222
|
+
options: (q = $.opcoes) == null ? void 0 : q.map((Z) => ({
|
|
223
223
|
value: Z.valor,
|
|
224
224
|
label: Z.label
|
|
225
225
|
})),
|
|
226
226
|
// field_array metadata
|
|
227
|
-
|
|
228
|
-
itemLabel:
|
|
229
|
-
minItems:
|
|
230
|
-
maxItems:
|
|
231
|
-
addLabel:
|
|
227
|
+
...$.tipo === "field_array" && {
|
|
228
|
+
itemLabel: $.itemLabel,
|
|
229
|
+
minItems: $.minItems,
|
|
230
|
+
maxItems: $.maxItems,
|
|
231
|
+
addLabel: $.addLabel
|
|
232
232
|
}
|
|
233
|
-
},
|
|
233
|
+
}, $.tipo === "field_array") {
|
|
234
234
|
const Z = [];
|
|
235
|
-
for (const K of
|
|
235
|
+
for (const K of $.subFields ?? []) {
|
|
236
236
|
const j = `${String(K.tipo).toLowerCase()}-${Pe()}`;
|
|
237
237
|
Z.push(j), G[j] = {
|
|
238
238
|
label: K.label,
|
|
@@ -252,31 +252,31 @@ const Pt = [
|
|
|
252
252
|
_[re] = { children: Z };
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
_[
|
|
256
|
-
label:
|
|
257
|
-
description:
|
|
258
|
-
icone:
|
|
259
|
-
tamanho:
|
|
260
|
-
inicioColuna:
|
|
255
|
+
_[T] = { children: ne }, G[T] = {
|
|
256
|
+
label: A.containerTemplate.titulo || A.name,
|
|
257
|
+
description: A.containerTemplate.descricao,
|
|
258
|
+
icone: A.containerTemplate.icone,
|
|
259
|
+
tamanho: A.containerTemplate.tamanho || 12,
|
|
260
|
+
inicioColuna: A.containerTemplate.inicioColuna,
|
|
261
261
|
showLabel: !0
|
|
262
262
|
};
|
|
263
263
|
const ie = [...((ae = _[I]) == null ? void 0 : ae.children) ?? []];
|
|
264
|
-
return ie.push(
|
|
265
|
-
...
|
|
264
|
+
return ie.push(T), _[I] = { children: ie }, {
|
|
265
|
+
...z,
|
|
266
266
|
containers: _,
|
|
267
267
|
configs: G,
|
|
268
|
-
selectedId:
|
|
268
|
+
selectedId: T
|
|
269
269
|
};
|
|
270
|
-
}),
|
|
270
|
+
}), T;
|
|
271
271
|
},
|
|
272
272
|
[]
|
|
273
|
-
), L = se((
|
|
273
|
+
), L = se((A) => {
|
|
274
274
|
const I = [];
|
|
275
|
-
return l((
|
|
275
|
+
return l((T) => {
|
|
276
276
|
var G, ne, ie;
|
|
277
|
-
b(
|
|
278
|
-
const
|
|
279
|
-
for (const q of
|
|
277
|
+
b(T);
|
|
278
|
+
const z = { ...T.containers }, _ = { ...T.configs };
|
|
279
|
+
for (const q of A.steps) {
|
|
280
280
|
const oe = `step-${Pe()}`;
|
|
281
281
|
I.push(oe);
|
|
282
282
|
const ae = [];
|
|
@@ -327,10 +327,10 @@ const Pt = [
|
|
|
327
327
|
}))
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
z[Q] = { children: ue };
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
z[Z] = { children: K }, _[Z] = {
|
|
334
334
|
label: re.titulo,
|
|
335
335
|
description: re.descricao,
|
|
336
336
|
icone: re.icone,
|
|
@@ -338,84 +338,84 @@ const Pt = [
|
|
|
338
338
|
showLabel: !0
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
z[oe] = { children: ae }, _[oe] = {
|
|
342
342
|
label: q.titulo,
|
|
343
343
|
description: q.descricao,
|
|
344
344
|
icone: q.icone
|
|
345
345
|
};
|
|
346
|
-
const
|
|
347
|
-
...((ie =
|
|
346
|
+
const $ = [
|
|
347
|
+
...((ie = z.root) == null ? void 0 : ie.children) ?? [],
|
|
348
348
|
oe
|
|
349
349
|
];
|
|
350
|
-
|
|
350
|
+
z.root = { children: $ };
|
|
351
351
|
}
|
|
352
352
|
return {
|
|
353
|
-
...
|
|
354
|
-
containers:
|
|
353
|
+
...T,
|
|
354
|
+
containers: z,
|
|
355
355
|
configs: _,
|
|
356
|
-
selectedId: I[0] ??
|
|
356
|
+
selectedId: I[0] ?? T.selectedId
|
|
357
357
|
};
|
|
358
358
|
}), I;
|
|
359
359
|
}, []), O = se(
|
|
360
|
-
(
|
|
360
|
+
(A, I, T, z) => {
|
|
361
361
|
l((_) => {
|
|
362
362
|
var oe, ae;
|
|
363
363
|
b(_);
|
|
364
|
-
const G = { ..._.containers }, ne = (((oe = G[I]) == null ? void 0 : oe.children) ?? []).filter((
|
|
364
|
+
const G = { ..._.containers }, ne = (((oe = G[I]) == null ? void 0 : oe.children) ?? []).filter(($) => $ !== A);
|
|
365
365
|
G[I] = { children: ne };
|
|
366
366
|
const ie = [
|
|
367
|
-
...(((ae = G[
|
|
368
|
-
(
|
|
367
|
+
...(((ae = G[T]) == null ? void 0 : ae.children) ?? []).filter(
|
|
368
|
+
($) => $ !== A
|
|
369
369
|
)
|
|
370
|
-
], q = Math.max(0, Math.min(
|
|
371
|
-
return ie.splice(q, 0,
|
|
370
|
+
], q = Math.max(0, Math.min(z, ie.length));
|
|
371
|
+
return ie.splice(q, 0, A), G[T] = { children: ie }, { ..._, containers: G };
|
|
372
372
|
});
|
|
373
373
|
},
|
|
374
374
|
[]
|
|
375
375
|
), M = se(
|
|
376
|
-
(
|
|
377
|
-
l((
|
|
378
|
-
...
|
|
376
|
+
(A, I) => {
|
|
377
|
+
l((T) => (b(T), {
|
|
378
|
+
...T,
|
|
379
379
|
containers: {
|
|
380
|
-
...
|
|
381
|
-
[
|
|
380
|
+
...T.containers,
|
|
381
|
+
[A]: { children: I }
|
|
382
382
|
}
|
|
383
383
|
}));
|
|
384
384
|
},
|
|
385
385
|
[]
|
|
386
|
-
),
|
|
386
|
+
), F = se((A) => {
|
|
387
387
|
l((I) => {
|
|
388
388
|
b(I);
|
|
389
|
-
const
|
|
389
|
+
const T = Ba(A, I.containers), z = {};
|
|
390
390
|
for (const [G, ne] of Object.entries(I.containers))
|
|
391
|
-
|
|
392
|
-
children: ne.children.filter((ie) => ie !==
|
|
391
|
+
T.includes(G) || (z[G] = {
|
|
392
|
+
children: ne.children.filter((ie) => ie !== A)
|
|
393
393
|
});
|
|
394
394
|
const _ = { ...I.configs };
|
|
395
|
-
for (const G of
|
|
395
|
+
for (const G of T) delete _[G];
|
|
396
396
|
return {
|
|
397
397
|
...I,
|
|
398
|
-
containers:
|
|
398
|
+
containers: z,
|
|
399
399
|
configs: _,
|
|
400
|
-
selectedId:
|
|
400
|
+
selectedId: T.includes(I.selectedId ?? "") ? null : I.selectedId
|
|
401
401
|
};
|
|
402
402
|
});
|
|
403
403
|
}, []), D = se(
|
|
404
|
-
(
|
|
405
|
-
l((
|
|
406
|
-
const
|
|
407
|
-
if (!
|
|
408
|
-
const _ = [...
|
|
409
|
-
return ne < 0 || ne >= _.length ?
|
|
410
|
-
...
|
|
411
|
-
containers: { ...
|
|
404
|
+
(A, I) => {
|
|
405
|
+
l((T) => {
|
|
406
|
+
const z = ld(A, T.containers);
|
|
407
|
+
if (!z) return T;
|
|
408
|
+
const _ = [...T.containers[z].children], G = _.indexOf(A), ne = I === "up" ? G - 1 : G + 1;
|
|
409
|
+
return ne < 0 || ne >= _.length ? T : ([_[G], _[ne]] = [_[ne], _[G]], {
|
|
410
|
+
...T,
|
|
411
|
+
containers: { ...T.containers, [z]: { children: _ } }
|
|
412
412
|
});
|
|
413
413
|
});
|
|
414
414
|
},
|
|
415
415
|
[]
|
|
416
|
-
),
|
|
417
|
-
(
|
|
418
|
-
h(), D(
|
|
416
|
+
), V = se(
|
|
417
|
+
(A, I) => {
|
|
418
|
+
h(), D(A, I);
|
|
419
419
|
},
|
|
420
420
|
[D, h]
|
|
421
421
|
);
|
|
@@ -436,17 +436,17 @@ const Pt = [
|
|
|
436
436
|
previewTemplateId: i.previewTemplateId,
|
|
437
437
|
setPreviewTemplateId: R,
|
|
438
438
|
getConfig: N,
|
|
439
|
-
getAllFieldIds:
|
|
440
|
-
setSelected:
|
|
439
|
+
getAllFieldIds: S,
|
|
440
|
+
setSelected: C,
|
|
441
441
|
updateConfig: E,
|
|
442
442
|
setShowPreview: P,
|
|
443
443
|
addItem: w,
|
|
444
|
-
addPresetBlock:
|
|
444
|
+
addPresetBlock: k,
|
|
445
445
|
addPresetStepBlock: L,
|
|
446
446
|
moveCanvasItem: O,
|
|
447
447
|
reorderInContainer: M,
|
|
448
|
-
removeItem:
|
|
449
|
-
moveItem:
|
|
448
|
+
removeItem: F,
|
|
449
|
+
moveItem: V,
|
|
450
450
|
moveItemNoSnapshot: D,
|
|
451
451
|
setPositionDrag: d,
|
|
452
452
|
setReorderDrag: p,
|
|
@@ -828,14 +828,14 @@ const wd = (e, t) => {
|
|
|
828
828
|
}
|
|
829
829
|
x = !1;
|
|
830
830
|
}
|
|
831
|
-
const N = f.length === 0 ? "" : f.length === 1 ? f[0] : s(f).join(":"),
|
|
832
|
-
if (i.indexOf(
|
|
831
|
+
const N = f.length === 0 ? "" : f.length === 1 ? f[0] : s(f).join(":"), S = v ? N + Co : N, C = S + y;
|
|
832
|
+
if (i.indexOf(C) > -1)
|
|
833
833
|
continue;
|
|
834
|
-
i.push(
|
|
834
|
+
i.push(C);
|
|
835
835
|
const P = n(y, x);
|
|
836
836
|
for (let R = 0; R < P.length; ++R) {
|
|
837
837
|
const E = P[R];
|
|
838
|
-
i.push(
|
|
838
|
+
i.push(S + E);
|
|
839
839
|
}
|
|
840
840
|
c = m + (c.length > 0 ? " " + c : c);
|
|
841
841
|
}
|
|
@@ -880,7 +880,7 @@ const wd = (e, t) => {
|
|
|
880
880
|
const o = Qa.exec(e);
|
|
881
881
|
return o ? o[1] ? t(o[1]) : r : !1;
|
|
882
882
|
}, ts = (e) => e === "position" || e === "percentage", rs = (e) => e === "image" || e === "url", os = (e) => e === "length" || e === "size" || e === "bg-size", ns = (e) => e === "length", iu = (e) => e === "number", as = (e) => e === "family-name", ss = (e) => e === "number" || e === "weight", is = (e) => e === "shadow", lu = () => {
|
|
883
|
-
const e = he("color"), t = he("font"), r = he("text"), o = he("font-weight"), n = he("tracking"), s = he("leading"), i = he("breakpoint"), l = he("container"), c = he("spacing"), d = he("radius"), m = he("shadow"), p = he("inset-shadow"), f = he("text-shadow"), v = he("drop-shadow"), b = he("blur"), h = he("perspective"), x = he("aspect"), y = he("ease"), N = he("animate"),
|
|
883
|
+
const e = he("color"), t = he("font"), r = he("text"), o = he("font-weight"), n = he("tracking"), s = he("leading"), i = he("breakpoint"), l = he("container"), c = he("spacing"), d = he("radius"), m = he("shadow"), p = he("inset-shadow"), f = he("text-shadow"), v = he("drop-shadow"), b = he("blur"), h = he("perspective"), x = he("aspect"), y = he("ease"), N = he("animate"), S = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], C = () => [
|
|
884
884
|
"center",
|
|
885
885
|
"top",
|
|
886
886
|
"bottom",
|
|
@@ -898,9 +898,9 @@ const wd = (e, t) => {
|
|
|
898
898
|
"bottom-left",
|
|
899
899
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
900
900
|
"left-bottom"
|
|
901
|
-
], P = () => [...
|
|
901
|
+
], P = () => [...C(), H, W], R = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], w = () => [H, W, c], k = () => [Ke, "full", "auto", ...w()], L = () => [Je, "none", "subgrid", H, W], O = () => ["auto", {
|
|
902
902
|
span: ["full", Je, H, W]
|
|
903
|
-
}, Je, H, W], M = () => [Je, "auto", H, W],
|
|
903
|
+
}, Je, H, W], M = () => [Je, "auto", H, W], F = () => ["auto", "min", "max", "fr", H, W], D = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], V = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], A = () => ["auto", ...w()], I = () => [Ke, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...w()], T = () => [Ke, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...w()], z = () => [Ke, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...w()], _ = () => [e, H, W], G = () => [...C(), Hn, Wn, {
|
|
904
904
|
position: [H, W]
|
|
905
905
|
}], ne = () => ["no-repeat", {
|
|
906
906
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -914,7 +914,7 @@ const wd = (e, t) => {
|
|
|
914
914
|
d,
|
|
915
915
|
H,
|
|
916
916
|
W
|
|
917
|
-
], ae = () => ["", ee, zt, dt],
|
|
917
|
+
], ae = () => ["", ee, zt, dt], $ = () => ["solid", "dashed", "dotted", "double"], re = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Z = () => [ee, ao, Hn, Wn], K = () => [
|
|
918
918
|
// Deprecated since Tailwind CSS v4.0.0
|
|
919
919
|
"",
|
|
920
920
|
"none",
|
|
@@ -974,14 +974,14 @@ const wd = (e, t) => {
|
|
|
974
974
|
* @see https://tailwindcss.com/docs/break-after
|
|
975
975
|
*/
|
|
976
976
|
"break-after": [{
|
|
977
|
-
"break-after":
|
|
977
|
+
"break-after": S()
|
|
978
978
|
}],
|
|
979
979
|
/**
|
|
980
980
|
* Break Before
|
|
981
981
|
* @see https://tailwindcss.com/docs/break-before
|
|
982
982
|
*/
|
|
983
983
|
"break-before": [{
|
|
984
|
-
"break-before":
|
|
984
|
+
"break-before": S()
|
|
985
985
|
}],
|
|
986
986
|
/**
|
|
987
987
|
* Break Inside
|
|
@@ -1099,21 +1099,21 @@ const wd = (e, t) => {
|
|
|
1099
1099
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1100
1100
|
*/
|
|
1101
1101
|
inset: [{
|
|
1102
|
-
inset:
|
|
1102
|
+
inset: k()
|
|
1103
1103
|
}],
|
|
1104
1104
|
/**
|
|
1105
1105
|
* Inset Inline
|
|
1106
1106
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1107
1107
|
*/
|
|
1108
1108
|
"inset-x": [{
|
|
1109
|
-
"inset-x":
|
|
1109
|
+
"inset-x": k()
|
|
1110
1110
|
}],
|
|
1111
1111
|
/**
|
|
1112
1112
|
* Inset Block
|
|
1113
1113
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1114
1114
|
*/
|
|
1115
1115
|
"inset-y": [{
|
|
1116
|
-
"inset-y":
|
|
1116
|
+
"inset-y": k()
|
|
1117
1117
|
}],
|
|
1118
1118
|
/**
|
|
1119
1119
|
* Inset Inline Start
|
|
@@ -1121,12 +1121,12 @@ const wd = (e, t) => {
|
|
|
1121
1121
|
* @todo class group will be renamed to `inset-s` in next major release
|
|
1122
1122
|
*/
|
|
1123
1123
|
start: [{
|
|
1124
|
-
"inset-s":
|
|
1124
|
+
"inset-s": k(),
|
|
1125
1125
|
/**
|
|
1126
1126
|
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
|
|
1127
1127
|
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
1128
1128
|
*/
|
|
1129
|
-
start:
|
|
1129
|
+
start: k()
|
|
1130
1130
|
}],
|
|
1131
1131
|
/**
|
|
1132
1132
|
* Inset Inline End
|
|
@@ -1134,54 +1134,54 @@ const wd = (e, t) => {
|
|
|
1134
1134
|
* @todo class group will be renamed to `inset-e` in next major release
|
|
1135
1135
|
*/
|
|
1136
1136
|
end: [{
|
|
1137
|
-
"inset-e":
|
|
1137
|
+
"inset-e": k(),
|
|
1138
1138
|
/**
|
|
1139
1139
|
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
|
|
1140
1140
|
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
1141
1141
|
*/
|
|
1142
|
-
end:
|
|
1142
|
+
end: k()
|
|
1143
1143
|
}],
|
|
1144
1144
|
/**
|
|
1145
1145
|
* Inset Block Start
|
|
1146
1146
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1147
1147
|
*/
|
|
1148
1148
|
"inset-bs": [{
|
|
1149
|
-
"inset-bs":
|
|
1149
|
+
"inset-bs": k()
|
|
1150
1150
|
}],
|
|
1151
1151
|
/**
|
|
1152
1152
|
* Inset Block End
|
|
1153
1153
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1154
1154
|
*/
|
|
1155
1155
|
"inset-be": [{
|
|
1156
|
-
"inset-be":
|
|
1156
|
+
"inset-be": k()
|
|
1157
1157
|
}],
|
|
1158
1158
|
/**
|
|
1159
1159
|
* Top
|
|
1160
1160
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1161
1161
|
*/
|
|
1162
1162
|
top: [{
|
|
1163
|
-
top:
|
|
1163
|
+
top: k()
|
|
1164
1164
|
}],
|
|
1165
1165
|
/**
|
|
1166
1166
|
* Right
|
|
1167
1167
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1168
1168
|
*/
|
|
1169
1169
|
right: [{
|
|
1170
|
-
right:
|
|
1170
|
+
right: k()
|
|
1171
1171
|
}],
|
|
1172
1172
|
/**
|
|
1173
1173
|
* Bottom
|
|
1174
1174
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1175
1175
|
*/
|
|
1176
1176
|
bottom: [{
|
|
1177
|
-
bottom:
|
|
1177
|
+
bottom: k()
|
|
1178
1178
|
}],
|
|
1179
1179
|
/**
|
|
1180
1180
|
* Left
|
|
1181
1181
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1182
1182
|
*/
|
|
1183
1183
|
left: [{
|
|
1184
|
-
left:
|
|
1184
|
+
left: k()
|
|
1185
1185
|
}],
|
|
1186
1186
|
/**
|
|
1187
1187
|
* Visibility
|
|
@@ -1315,14 +1315,14 @@ const wd = (e, t) => {
|
|
|
1315
1315
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1316
1316
|
*/
|
|
1317
1317
|
"auto-cols": [{
|
|
1318
|
-
"auto-cols":
|
|
1318
|
+
"auto-cols": F()
|
|
1319
1319
|
}],
|
|
1320
1320
|
/**
|
|
1321
1321
|
* Grid Auto Rows
|
|
1322
1322
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1323
1323
|
*/
|
|
1324
1324
|
"auto-rows": [{
|
|
1325
|
-
"auto-rows":
|
|
1325
|
+
"auto-rows": F()
|
|
1326
1326
|
}],
|
|
1327
1327
|
/**
|
|
1328
1328
|
* Gap
|
|
@@ -1357,14 +1357,14 @@ const wd = (e, t) => {
|
|
|
1357
1357
|
* @see https://tailwindcss.com/docs/justify-items
|
|
1358
1358
|
*/
|
|
1359
1359
|
"justify-items": [{
|
|
1360
|
-
"justify-items": [
|
|
1360
|
+
"justify-items": [...V(), "normal"]
|
|
1361
1361
|
}],
|
|
1362
1362
|
/**
|
|
1363
1363
|
* Justify Self
|
|
1364
1364
|
* @see https://tailwindcss.com/docs/justify-self
|
|
1365
1365
|
*/
|
|
1366
1366
|
"justify-self": [{
|
|
1367
|
-
"justify-self": ["auto",
|
|
1367
|
+
"justify-self": ["auto", ...V()]
|
|
1368
1368
|
}],
|
|
1369
1369
|
/**
|
|
1370
1370
|
* Align Content
|
|
@@ -1378,7 +1378,7 @@ const wd = (e, t) => {
|
|
|
1378
1378
|
* @see https://tailwindcss.com/docs/align-items
|
|
1379
1379
|
*/
|
|
1380
1380
|
"align-items": [{
|
|
1381
|
-
items: [
|
|
1381
|
+
items: [...V(), {
|
|
1382
1382
|
baseline: ["", "last"]
|
|
1383
1383
|
}]
|
|
1384
1384
|
}],
|
|
@@ -1387,7 +1387,7 @@ const wd = (e, t) => {
|
|
|
1387
1387
|
* @see https://tailwindcss.com/docs/align-self
|
|
1388
1388
|
*/
|
|
1389
1389
|
"align-self": [{
|
|
1390
|
-
self: ["auto",
|
|
1390
|
+
self: ["auto", ...V(), {
|
|
1391
1391
|
baseline: ["", "last"]
|
|
1392
1392
|
}]
|
|
1393
1393
|
}],
|
|
@@ -1403,14 +1403,14 @@ const wd = (e, t) => {
|
|
|
1403
1403
|
* @see https://tailwindcss.com/docs/place-items
|
|
1404
1404
|
*/
|
|
1405
1405
|
"place-items": [{
|
|
1406
|
-
"place-items": [
|
|
1406
|
+
"place-items": [...V(), "baseline"]
|
|
1407
1407
|
}],
|
|
1408
1408
|
/**
|
|
1409
1409
|
* Place Self
|
|
1410
1410
|
* @see https://tailwindcss.com/docs/place-self
|
|
1411
1411
|
*/
|
|
1412
1412
|
"place-self": [{
|
|
1413
|
-
"place-self": ["auto",
|
|
1413
|
+
"place-self": ["auto", ...V()]
|
|
1414
1414
|
}],
|
|
1415
1415
|
// Spacing
|
|
1416
1416
|
/**
|
|
@@ -1495,77 +1495,77 @@ const wd = (e, t) => {
|
|
|
1495
1495
|
* @see https://tailwindcss.com/docs/margin
|
|
1496
1496
|
*/
|
|
1497
1497
|
m: [{
|
|
1498
|
-
m:
|
|
1498
|
+
m: A()
|
|
1499
1499
|
}],
|
|
1500
1500
|
/**
|
|
1501
1501
|
* Margin Inline
|
|
1502
1502
|
* @see https://tailwindcss.com/docs/margin
|
|
1503
1503
|
*/
|
|
1504
1504
|
mx: [{
|
|
1505
|
-
mx:
|
|
1505
|
+
mx: A()
|
|
1506
1506
|
}],
|
|
1507
1507
|
/**
|
|
1508
1508
|
* Margin Block
|
|
1509
1509
|
* @see https://tailwindcss.com/docs/margin
|
|
1510
1510
|
*/
|
|
1511
1511
|
my: [{
|
|
1512
|
-
my:
|
|
1512
|
+
my: A()
|
|
1513
1513
|
}],
|
|
1514
1514
|
/**
|
|
1515
1515
|
* Margin Inline Start
|
|
1516
1516
|
* @see https://tailwindcss.com/docs/margin
|
|
1517
1517
|
*/
|
|
1518
1518
|
ms: [{
|
|
1519
|
-
ms:
|
|
1519
|
+
ms: A()
|
|
1520
1520
|
}],
|
|
1521
1521
|
/**
|
|
1522
1522
|
* Margin Inline End
|
|
1523
1523
|
* @see https://tailwindcss.com/docs/margin
|
|
1524
1524
|
*/
|
|
1525
1525
|
me: [{
|
|
1526
|
-
me:
|
|
1526
|
+
me: A()
|
|
1527
1527
|
}],
|
|
1528
1528
|
/**
|
|
1529
1529
|
* Margin Block Start
|
|
1530
1530
|
* @see https://tailwindcss.com/docs/margin
|
|
1531
1531
|
*/
|
|
1532
1532
|
mbs: [{
|
|
1533
|
-
mbs:
|
|
1533
|
+
mbs: A()
|
|
1534
1534
|
}],
|
|
1535
1535
|
/**
|
|
1536
1536
|
* Margin Block End
|
|
1537
1537
|
* @see https://tailwindcss.com/docs/margin
|
|
1538
1538
|
*/
|
|
1539
1539
|
mbe: [{
|
|
1540
|
-
mbe:
|
|
1540
|
+
mbe: A()
|
|
1541
1541
|
}],
|
|
1542
1542
|
/**
|
|
1543
1543
|
* Margin Top
|
|
1544
1544
|
* @see https://tailwindcss.com/docs/margin
|
|
1545
1545
|
*/
|
|
1546
1546
|
mt: [{
|
|
1547
|
-
mt:
|
|
1547
|
+
mt: A()
|
|
1548
1548
|
}],
|
|
1549
1549
|
/**
|
|
1550
1550
|
* Margin Right
|
|
1551
1551
|
* @see https://tailwindcss.com/docs/margin
|
|
1552
1552
|
*/
|
|
1553
1553
|
mr: [{
|
|
1554
|
-
mr:
|
|
1554
|
+
mr: A()
|
|
1555
1555
|
}],
|
|
1556
1556
|
/**
|
|
1557
1557
|
* Margin Bottom
|
|
1558
1558
|
* @see https://tailwindcss.com/docs/margin
|
|
1559
1559
|
*/
|
|
1560
1560
|
mb: [{
|
|
1561
|
-
mb:
|
|
1561
|
+
mb: A()
|
|
1562
1562
|
}],
|
|
1563
1563
|
/**
|
|
1564
1564
|
* Margin Left
|
|
1565
1565
|
* @see https://tailwindcss.com/docs/margin
|
|
1566
1566
|
*/
|
|
1567
1567
|
ml: [{
|
|
1568
|
-
ml:
|
|
1568
|
+
ml: A()
|
|
1569
1569
|
}],
|
|
1570
1570
|
/**
|
|
1571
1571
|
* Space Between X
|
|
@@ -1606,42 +1606,42 @@ const wd = (e, t) => {
|
|
|
1606
1606
|
* @see https://tailwindcss.com/docs/width
|
|
1607
1607
|
*/
|
|
1608
1608
|
"inline-size": [{
|
|
1609
|
-
inline: ["auto", ...
|
|
1609
|
+
inline: ["auto", ...T()]
|
|
1610
1610
|
}],
|
|
1611
1611
|
/**
|
|
1612
1612
|
* Min-Inline Size
|
|
1613
1613
|
* @see https://tailwindcss.com/docs/min-width
|
|
1614
1614
|
*/
|
|
1615
1615
|
"min-inline-size": [{
|
|
1616
|
-
"min-inline": ["auto", ...
|
|
1616
|
+
"min-inline": ["auto", ...T()]
|
|
1617
1617
|
}],
|
|
1618
1618
|
/**
|
|
1619
1619
|
* Max-Inline Size
|
|
1620
1620
|
* @see https://tailwindcss.com/docs/max-width
|
|
1621
1621
|
*/
|
|
1622
1622
|
"max-inline-size": [{
|
|
1623
|
-
"max-inline": ["none", ...
|
|
1623
|
+
"max-inline": ["none", ...T()]
|
|
1624
1624
|
}],
|
|
1625
1625
|
/**
|
|
1626
1626
|
* Block Size
|
|
1627
1627
|
* @see https://tailwindcss.com/docs/height
|
|
1628
1628
|
*/
|
|
1629
1629
|
"block-size": [{
|
|
1630
|
-
block: ["auto", ...
|
|
1630
|
+
block: ["auto", ...z()]
|
|
1631
1631
|
}],
|
|
1632
1632
|
/**
|
|
1633
1633
|
* Min-Block Size
|
|
1634
1634
|
* @see https://tailwindcss.com/docs/min-height
|
|
1635
1635
|
*/
|
|
1636
1636
|
"min-block-size": [{
|
|
1637
|
-
"min-block": ["auto", ...
|
|
1637
|
+
"min-block": ["auto", ...z()]
|
|
1638
1638
|
}],
|
|
1639
1639
|
/**
|
|
1640
1640
|
* Max-Block Size
|
|
1641
1641
|
* @see https://tailwindcss.com/docs/max-height
|
|
1642
1642
|
*/
|
|
1643
1643
|
"max-block-size": [{
|
|
1644
|
-
"max-block": ["none", ...
|
|
1644
|
+
"max-block": ["none", ...z()]
|
|
1645
1645
|
}],
|
|
1646
1646
|
/**
|
|
1647
1647
|
* Width
|
|
@@ -1858,7 +1858,7 @@ const wd = (e, t) => {
|
|
|
1858
1858
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1859
1859
|
*/
|
|
1860
1860
|
"text-decoration-style": [{
|
|
1861
|
-
decoration: [
|
|
1861
|
+
decoration: [...$(), "wavy"]
|
|
1862
1862
|
}],
|
|
1863
1863
|
/**
|
|
1864
1864
|
* Text Decoration Thickness
|
|
@@ -2268,14 +2268,14 @@ const wd = (e, t) => {
|
|
|
2268
2268
|
* @see https://tailwindcss.com/docs/border-style
|
|
2269
2269
|
*/
|
|
2270
2270
|
"border-style": [{
|
|
2271
|
-
border: [
|
|
2271
|
+
border: [...$(), "hidden", "none"]
|
|
2272
2272
|
}],
|
|
2273
2273
|
/**
|
|
2274
2274
|
* Divide Style
|
|
2275
2275
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
2276
2276
|
*/
|
|
2277
2277
|
"divide-style": [{
|
|
2278
|
-
divide: [
|
|
2278
|
+
divide: [...$(), "hidden", "none"]
|
|
2279
2279
|
}],
|
|
2280
2280
|
/**
|
|
2281
2281
|
* Border Color
|
|
@@ -2366,7 +2366,7 @@ const wd = (e, t) => {
|
|
|
2366
2366
|
* @see https://tailwindcss.com/docs/outline-style
|
|
2367
2367
|
*/
|
|
2368
2368
|
"outline-style": [{
|
|
2369
|
-
outline: [
|
|
2369
|
+
outline: [...$(), "none", "hidden"]
|
|
2370
2370
|
}],
|
|
2371
2371
|
/**
|
|
2372
2372
|
* Outline Offset
|
|
@@ -2645,7 +2645,7 @@ const wd = (e, t) => {
|
|
|
2645
2645
|
}]
|
|
2646
2646
|
}],
|
|
2647
2647
|
"mask-image-radial-pos": [{
|
|
2648
|
-
"mask-radial-at":
|
|
2648
|
+
"mask-radial-at": C()
|
|
2649
2649
|
}],
|
|
2650
2650
|
"mask-image-conic-pos": [{
|
|
2651
2651
|
"mask-conic": [ee]
|
|
@@ -3905,10 +3905,10 @@ function Tu(e) {
|
|
|
3905
3905
|
defaultProp: n ?? !1,
|
|
3906
3906
|
onChange: c,
|
|
3907
3907
|
caller: Tr
|
|
3908
|
-
}), [b, h] = u.useState(null), [x, y] = u.useState(null), N = u.useRef(!1),
|
|
3908
|
+
}), [b, h] = u.useState(null), [x, y] = u.useState(null), N = u.useRef(!1), S = b ? !!i || !!b.closest("form") : (
|
|
3909
3909
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
3910
3910
|
!0
|
|
3911
|
-
),
|
|
3911
|
+
), C = {
|
|
3912
3912
|
checked: f,
|
|
3913
3913
|
disabled: s,
|
|
3914
3914
|
setChecked: v,
|
|
@@ -3920,7 +3920,7 @@ function Tu(e) {
|
|
|
3920
3920
|
hasConsumerStoppedPropagationRef: N,
|
|
3921
3921
|
required: d,
|
|
3922
3922
|
defaultChecked: et(n) ? !1 : n,
|
|
3923
|
-
isFormControl:
|
|
3923
|
+
isFormControl: S,
|
|
3924
3924
|
bubbleInput: x,
|
|
3925
3925
|
setBubbleInput: y
|
|
3926
3926
|
};
|
|
@@ -3928,8 +3928,8 @@ function Tu(e) {
|
|
|
3928
3928
|
Au,
|
|
3929
3929
|
{
|
|
3930
3930
|
scope: t,
|
|
3931
|
-
...
|
|
3932
|
-
children: ku(p) ? p(
|
|
3931
|
+
...C,
|
|
3932
|
+
children: ku(p) ? p(C) : o
|
|
3933
3933
|
}
|
|
3934
3934
|
);
|
|
3935
3935
|
}
|
|
@@ -4064,8 +4064,8 @@ var hs = "CheckboxBubbleInput", gs = u.forwardRef(
|
|
|
4064
4064
|
u.useEffect(() => {
|
|
4065
4065
|
const N = f;
|
|
4066
4066
|
if (!N) return;
|
|
4067
|
-
const
|
|
4068
|
-
|
|
4067
|
+
const S = window.HTMLInputElement.prototype, P = Object.getOwnPropertyDescriptor(
|
|
4068
|
+
S,
|
|
4069
4069
|
"checked"
|
|
4070
4070
|
).set, R = !n.current;
|
|
4071
4071
|
if (h !== s && P) {
|
|
@@ -4196,7 +4196,7 @@ var on = "ScrollArea", [bs] = qe(on), [_u, Te] = bs(on), xs = u.forwardRef(
|
|
|
4196
4196
|
dir: n,
|
|
4197
4197
|
scrollHideDelay: s = 600,
|
|
4198
4198
|
...i
|
|
4199
|
-
} = e, [l, c] = u.useState(null), [d, m] = u.useState(null), [p, f] = u.useState(null), [v, b] = u.useState(null), [h, x] = u.useState(null), [y, N] = u.useState(0), [
|
|
4199
|
+
} = e, [l, c] = u.useState(null), [d, m] = u.useState(null), [p, f] = u.useState(null), [v, b] = u.useState(null), [h, x] = u.useState(null), [y, N] = u.useState(0), [S, C] = u.useState(0), [P, R] = u.useState(!1), [E, w] = u.useState(!1), k = te(t, (O) => c(O)), L = rn(n);
|
|
4200
4200
|
return /* @__PURE__ */ a(
|
|
4201
4201
|
_u,
|
|
4202
4202
|
{
|
|
@@ -4218,18 +4218,18 @@ var on = "ScrollArea", [bs] = qe(on), [_u, Te] = bs(on), xs = u.forwardRef(
|
|
|
4218
4218
|
scrollbarYEnabled: E,
|
|
4219
4219
|
onScrollbarYEnabledChange: w,
|
|
4220
4220
|
onCornerWidthChange: N,
|
|
4221
|
-
onCornerHeightChange:
|
|
4221
|
+
onCornerHeightChange: C,
|
|
4222
4222
|
children: /* @__PURE__ */ a(
|
|
4223
4223
|
J.div,
|
|
4224
4224
|
{
|
|
4225
4225
|
dir: L,
|
|
4226
4226
|
...i,
|
|
4227
|
-
ref:
|
|
4227
|
+
ref: k,
|
|
4228
4228
|
style: {
|
|
4229
4229
|
position: "relative",
|
|
4230
4230
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
4231
4231
|
"--radix-scroll-area-corner-width": y + "px",
|
|
4232
|
-
"--radix-scroll-area-corner-height":
|
|
4232
|
+
"--radix-scroll-area-corner-height": S + "px",
|
|
4233
4233
|
...e.style
|
|
4234
4234
|
}
|
|
4235
4235
|
}
|
|
@@ -4518,20 +4518,20 @@ var Mu = u.forwardRef((e, t) => {
|
|
|
4518
4518
|
onWheelScroll: m,
|
|
4519
4519
|
onResize: p,
|
|
4520
4520
|
...f
|
|
4521
|
-
} = e, v = Te(ze, r), [b, h] = u.useState(null), x = te(t, (
|
|
4522
|
-
function w(
|
|
4521
|
+
} = e, v = Te(ze, r), [b, h] = u.useState(null), x = te(t, (k) => h(k)), y = u.useRef(null), N = u.useRef(""), S = v.viewport, C = o.content - o.viewport, P = xe(m), R = xe(c), E = Ir(p, 10);
|
|
4522
|
+
function w(k) {
|
|
4523
4523
|
if (y.current) {
|
|
4524
|
-
const L =
|
|
4524
|
+
const L = k.clientX - y.current.left, O = k.clientY - y.current.top;
|
|
4525
4525
|
d({ x: L, y: O });
|
|
4526
4526
|
}
|
|
4527
4527
|
}
|
|
4528
4528
|
return u.useEffect(() => {
|
|
4529
|
-
const
|
|
4529
|
+
const k = (L) => {
|
|
4530
4530
|
const O = L.target;
|
|
4531
|
-
(b == null ? void 0 : b.contains(O)) && P(L,
|
|
4531
|
+
(b == null ? void 0 : b.contains(O)) && P(L, C);
|
|
4532
4532
|
};
|
|
4533
|
-
return document.addEventListener("wheel",
|
|
4534
|
-
}, [
|
|
4533
|
+
return document.addEventListener("wheel", k, { passive: !1 }), () => document.removeEventListener("wheel", k, { passive: !1 });
|
|
4534
|
+
}, [S, b, C, P]), u.useEffect(R, [o, R]), Tt(b, E), Tt(v.content, E), /* @__PURE__ */ a(
|
|
4535
4535
|
zu,
|
|
4536
4536
|
{
|
|
4537
4537
|
scope: r,
|
|
@@ -4547,13 +4547,13 @@ var Mu = u.forwardRef((e, t) => {
|
|
|
4547
4547
|
...f,
|
|
4548
4548
|
ref: x,
|
|
4549
4549
|
style: { position: "absolute", ...f.style },
|
|
4550
|
-
onPointerDown: Y(e.onPointerDown, (
|
|
4551
|
-
|
|
4550
|
+
onPointerDown: Y(e.onPointerDown, (k) => {
|
|
4551
|
+
k.button === 0 && (k.target.setPointerCapture(k.pointerId), y.current = b.getBoundingClientRect(), N.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", v.viewport && (v.viewport.style.scrollBehavior = "auto"), w(k));
|
|
4552
4552
|
}),
|
|
4553
4553
|
onPointerMove: Y(e.onPointerMove, w),
|
|
4554
|
-
onPointerUp: Y(e.onPointerUp, (
|
|
4555
|
-
const L =
|
|
4556
|
-
L.hasPointerCapture(
|
|
4554
|
+
onPointerUp: Y(e.onPointerUp, (k) => {
|
|
4555
|
+
const L = k.target;
|
|
4556
|
+
L.hasPointerCapture(k.pointerId) && L.releasePointerCapture(k.pointerId), document.body.style.webkitUserSelect = N.current, v.viewport && (v.viewport.style.scrollBehavior = ""), y.current = null;
|
|
4557
4557
|
})
|
|
4558
4558
|
}
|
|
4559
4559
|
)
|
|
@@ -4757,9 +4757,9 @@ var Yu = "DismissableLayer", So = "dismissableLayer.update", Zu = "dismissableLa
|
|
|
4757
4757
|
onInteractOutside: i,
|
|
4758
4758
|
onDismiss: l,
|
|
4759
4759
|
...c
|
|
4760
|
-
} = e, d = u.useContext(Ls), [m, p] = u.useState(null), f = (m == null ? void 0 : m.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = u.useState({}), b = te(t, (E) => p(E)), h = Array.from(d.layers), [x] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(x), N = m ? h.indexOf(m) : -1,
|
|
4761
|
-
const w = E.target,
|
|
4762
|
-
!
|
|
4760
|
+
} = e, d = u.useContext(Ls), [m, p] = u.useState(null), f = (m == null ? void 0 : m.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = u.useState({}), b = te(t, (E) => p(E)), h = Array.from(d.layers), [x] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(x), N = m ? h.indexOf(m) : -1, S = d.layersWithOutsidePointerEventsDisabled.size > 0, C = N >= y, P = em((E) => {
|
|
4761
|
+
const w = E.target, k = [...d.branches].some((L) => L.contains(w));
|
|
4762
|
+
!C || k || (n == null || n(E), i == null || i(E), E.defaultPrevented || l == null || l());
|
|
4763
4763
|
}, f), R = tm((E) => {
|
|
4764
4764
|
const w = E.target;
|
|
4765
4765
|
[...d.branches].some((L) => L.contains(w)) || (s == null || s(E), i == null || i(E), E.defaultPrevented || l == null || l());
|
|
@@ -4782,7 +4782,7 @@ var Yu = "DismissableLayer", So = "dismissableLayer.update", Zu = "dismissableLa
|
|
|
4782
4782
|
...c,
|
|
4783
4783
|
ref: b,
|
|
4784
4784
|
style: {
|
|
4785
|
-
pointerEvents:
|
|
4785
|
+
pointerEvents: S ? C ? "auto" : "none" : void 0,
|
|
4786
4786
|
...e.style
|
|
4787
4787
|
},
|
|
4788
4788
|
onFocusCapture: Y(e.onFocusCapture, R.onFocusCapture),
|
|
@@ -4877,17 +4877,17 @@ var so = "focusScope.autoFocusOnMount", io = "focusScope.autoFocusOnUnmount", Yn
|
|
|
4877
4877
|
}).current;
|
|
4878
4878
|
u.useEffect(() => {
|
|
4879
4879
|
if (o) {
|
|
4880
|
-
let h = function(
|
|
4880
|
+
let h = function(S) {
|
|
4881
4881
|
if (v.paused || !l) return;
|
|
4882
|
-
const
|
|
4883
|
-
l.contains(
|
|
4884
|
-
}, x = function(
|
|
4882
|
+
const C = S.target;
|
|
4883
|
+
l.contains(C) ? p.current = C : Qe(p.current, { select: !0 });
|
|
4884
|
+
}, x = function(S) {
|
|
4885
4885
|
if (v.paused || !l) return;
|
|
4886
|
-
const
|
|
4887
|
-
|
|
4888
|
-
}, y = function(
|
|
4886
|
+
const C = S.relatedTarget;
|
|
4887
|
+
C !== null && (l.contains(C) || Qe(p.current, { select: !0 }));
|
|
4888
|
+
}, y = function(S) {
|
|
4889
4889
|
if (document.activeElement === document.body)
|
|
4890
|
-
for (const P of
|
|
4890
|
+
for (const P of S)
|
|
4891
4891
|
P.removedNodes.length > 0 && Qe(l);
|
|
4892
4892
|
};
|
|
4893
4893
|
document.addEventListener("focusin", h), document.addEventListener("focusout", x);
|
|
@@ -4917,8 +4917,8 @@ var so = "focusScope.autoFocusOnMount", io = "focusScope.autoFocusOnUnmount", Yn
|
|
|
4917
4917
|
if (!r && !o || v.paused) return;
|
|
4918
4918
|
const x = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, y = document.activeElement;
|
|
4919
4919
|
if (x && y) {
|
|
4920
|
-
const N = h.currentTarget, [
|
|
4921
|
-
|
|
4920
|
+
const N = h.currentTarget, [S, C] = nm(N);
|
|
4921
|
+
S && C ? !h.shiftKey && y === C ? (h.preventDefault(), r && Qe(S, { select: !0 })) : h.shiftKey && y === S && (h.preventDefault(), r && Qe(C, { select: !0 })) : y === N && h.preventDefault();
|
|
4922
4922
|
}
|
|
4923
4923
|
},
|
|
4924
4924
|
[r, o, v.paused]
|
|
@@ -5158,11 +5158,11 @@ var $s = bm(), uo = function() {
|
|
|
5158
5158
|
onScrollCapture: uo,
|
|
5159
5159
|
onWheelCapture: uo,
|
|
5160
5160
|
onTouchMoveCapture: uo
|
|
5161
|
-
}), n = o[0], s = o[1], i = e.forwardProps, l = e.children, c = e.className, d = e.removeScrollBar, m = e.enabled, p = e.shards, f = e.sideCar, v = e.noRelative, b = e.noIsolation, h = e.inert, x = e.allowPinchZoom, y = e.as, N = y === void 0 ? "div" : y,
|
|
5161
|
+
}), n = o[0], s = o[1], i = e.forwardProps, l = e.children, c = e.className, d = e.removeScrollBar, m = e.enabled, p = e.shards, f = e.sideCar, v = e.noRelative, b = e.noIsolation, h = e.inert, x = e.allowPinchZoom, y = e.as, N = y === void 0 ? "div" : y, S = e.gapMode, C = Ms(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), P = f, R = hm([r, t]), E = _e(_e({}, C), n);
|
|
5162
5162
|
return u.createElement(
|
|
5163
5163
|
u.Fragment,
|
|
5164
5164
|
null,
|
|
5165
|
-
m && u.createElement(P, { sideCar: $s, removeScrollBar: d, shards: p, noRelative: v, noIsolation: b, inert: h, setCallbacks: s, allowPinchZoom: !!x, lockRef: r, gapMode:
|
|
5165
|
+
m && u.createElement(P, { sideCar: $s, removeScrollBar: d, shards: p, noRelative: v, noIsolation: b, inert: h, setCallbacks: s, allowPinchZoom: !!x, lockRef: r, gapMode: S }),
|
|
5166
5166
|
i ? u.cloneElement(u.Children.only(l), _e(_e({}, E), { ref: R })) : u.createElement(N, _e({}, E, { className: c, ref: R }), l)
|
|
5167
5167
|
);
|
|
5168
5168
|
});
|
|
@@ -5409,10 +5409,10 @@ function Hm(e) {
|
|
|
5409
5409
|
var l = u.useCallback(function(h, x) {
|
|
5410
5410
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
5411
5411
|
return !i.current.allowPinchZoom;
|
|
5412
|
-
var y = or(h), N = r.current,
|
|
5412
|
+
var y = or(h), N = r.current, S = "deltaX" in h ? h.deltaX : N[0] - y[0], C = "deltaY" in h ? h.deltaY : N[1] - y[1], P, R = h.target, E = Math.abs(S) > Math.abs(C) ? "h" : "v";
|
|
5413
5413
|
if ("touches" in h && E === "h" && R.type === "range")
|
|
5414
5414
|
return !1;
|
|
5415
|
-
var w = window.getSelection(),
|
|
5415
|
+
var w = window.getSelection(), k = w && w.anchorNode, L = k ? k === R || k.contains(R) : !1;
|
|
5416
5416
|
if (L)
|
|
5417
5417
|
return !1;
|
|
5418
5418
|
var O = ra(E, R);
|
|
@@ -5420,10 +5420,10 @@ function Hm(e) {
|
|
|
5420
5420
|
return !0;
|
|
5421
5421
|
if (O ? P = E : (P = E === "v" ? "h" : "v", O = ra(E, R)), !O)
|
|
5422
5422
|
return !1;
|
|
5423
|
-
if (!o.current && "changedTouches" in h && (
|
|
5423
|
+
if (!o.current && "changedTouches" in h && (S || C) && (o.current = P), !P)
|
|
5424
5424
|
return !0;
|
|
5425
5425
|
var M = o.current || P;
|
|
5426
|
-
return zm(M, x, h, M === "h" ?
|
|
5426
|
+
return zm(M, x, h, M === "h" ? S : C);
|
|
5427
5427
|
}, []), c = u.useCallback(function(h) {
|
|
5428
5428
|
var x = h;
|
|
5429
5429
|
if (!(!Nt.length || Nt[Nt.length - 1] !== s)) {
|
|
@@ -5435,17 +5435,17 @@ function Hm(e) {
|
|
|
5435
5435
|
return;
|
|
5436
5436
|
}
|
|
5437
5437
|
if (!N) {
|
|
5438
|
-
var
|
|
5438
|
+
var S = (i.current.shards || []).map(na).filter(Boolean).filter(function(P) {
|
|
5439
5439
|
return P.contains(x.target);
|
|
5440
|
-
}),
|
|
5441
|
-
|
|
5440
|
+
}), C = S.length > 0 ? l(x, S[0]) : !i.current.noIsolation;
|
|
5441
|
+
C && x.cancelable && x.preventDefault();
|
|
5442
5442
|
}
|
|
5443
5443
|
}
|
|
5444
5444
|
}, []), d = u.useCallback(function(h, x, y, N) {
|
|
5445
|
-
var
|
|
5446
|
-
t.current.push(
|
|
5447
|
-
t.current = t.current.filter(function(
|
|
5448
|
-
return
|
|
5445
|
+
var S = { name: h, delta: x, target: y, should: N, shadowParent: Um(y) };
|
|
5446
|
+
t.current.push(S), setTimeout(function() {
|
|
5447
|
+
t.current = t.current.filter(function(C) {
|
|
5448
|
+
return C !== S;
|
|
5449
5449
|
});
|
|
5450
5450
|
}, 1);
|
|
5451
5451
|
}, []), m = u.useCallback(function(h) {
|
|
@@ -6106,7 +6106,7 @@ async function yp(e, t) {
|
|
|
6106
6106
|
y: n,
|
|
6107
6107
|
width: i.floating.width,
|
|
6108
6108
|
height: i.floating.height
|
|
6109
|
-
} : i.reference,
|
|
6109
|
+
} : i.reference, S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), C = await (s.isElement == null ? void 0 : s.isElement(S)) ? await (s.getScale == null ? void 0 : s.getScale(S)) || {
|
|
6110
6110
|
x: 1,
|
|
6111
6111
|
y: 1
|
|
6112
6112
|
} : {
|
|
@@ -6115,14 +6115,14 @@ async function yp(e, t) {
|
|
|
6115
6115
|
}, P = br(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
6116
6116
|
elements: l,
|
|
6117
6117
|
rect: N,
|
|
6118
|
-
offsetParent:
|
|
6118
|
+
offsetParent: S,
|
|
6119
6119
|
strategy: c
|
|
6120
6120
|
}) : N);
|
|
6121
6121
|
return {
|
|
6122
|
-
top: (y.top - P.top + b.top) /
|
|
6123
|
-
bottom: (P.bottom - y.bottom + b.bottom) /
|
|
6124
|
-
left: (y.left - P.left + b.left) /
|
|
6125
|
-
right: (P.right - y.right + b.right) /
|
|
6122
|
+
top: (y.top - P.top + b.top) / C.y,
|
|
6123
|
+
bottom: (P.bottom - y.bottom + b.bottom) / C.y,
|
|
6124
|
+
left: (y.left - P.left + b.left) / C.x,
|
|
6125
|
+
right: (P.right - y.right + b.right) / C.x
|
|
6126
6126
|
};
|
|
6127
6127
|
}
|
|
6128
6128
|
const wp = 50, Np = async (e, t, r) => {
|
|
@@ -6152,8 +6152,8 @@ const wp = 50, Np = async (e, t, r) => {
|
|
|
6152
6152
|
name: y,
|
|
6153
6153
|
fn: N
|
|
6154
6154
|
} = x, {
|
|
6155
|
-
x:
|
|
6156
|
-
y:
|
|
6155
|
+
x: S,
|
|
6156
|
+
y: C,
|
|
6157
6157
|
data: P,
|
|
6158
6158
|
reset: R
|
|
6159
6159
|
} = await N({
|
|
@@ -6170,7 +6170,7 @@ const wp = 50, Np = async (e, t, r) => {
|
|
|
6170
6170
|
floating: t
|
|
6171
6171
|
}
|
|
6172
6172
|
});
|
|
6173
|
-
m =
|
|
6173
|
+
m = S ?? m, p = C ?? p, b[y] = {
|
|
6174
6174
|
...b[y],
|
|
6175
6175
|
...P
|
|
6176
6176
|
}, R && v < wp && (v++, typeof R == "object" && (R.placement && (f = R.placement), R.rects && (d = R.rects === !0 ? await i.getElementRects({
|
|
@@ -6210,20 +6210,20 @@ const wp = 50, Np = async (e, t, r) => {
|
|
|
6210
6210
|
const p = fi(m), f = {
|
|
6211
6211
|
x: r,
|
|
6212
6212
|
y: o
|
|
6213
|
-
}, v = hn(n), b = fn(v), h = await i.getDimensions(d), x = v === "y", y = x ? "top" : "left", N = x ? "bottom" : "right",
|
|
6214
|
-
let E = R ? R[
|
|
6215
|
-
(!E || !await (i.isElement == null ? void 0 : i.isElement(R))) && (E = l.floating[
|
|
6216
|
-
const w =
|
|
6213
|
+
}, v = hn(n), b = fn(v), h = await i.getDimensions(d), x = v === "y", y = x ? "top" : "left", N = x ? "bottom" : "right", S = x ? "clientHeight" : "clientWidth", C = s.reference[b] + s.reference[v] - f[v] - s.floating[b], P = f[v] - s.reference[v], R = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
6214
|
+
let E = R ? R[S] : 0;
|
|
6215
|
+
(!E || !await (i.isElement == null ? void 0 : i.isElement(R))) && (E = l.floating[S] || s.floating[b]);
|
|
6216
|
+
const w = C / 2 - P / 2, k = E / 2 - h[b] / 2 - 1, L = nt(p[y], k), O = nt(p[N], k), M = L, F = E - h[b] - O, D = E / 2 - h[b] / 2 + w, V = Ro(M, D, F), A = !c.arrow && Ot(n) != null && D !== V && s.reference[b] / 2 - (D < M ? L : O) - h[b] / 2 < 0, I = A ? D < M ? D - M : D - F : 0;
|
|
6217
6217
|
return {
|
|
6218
6218
|
[v]: f[v] + I,
|
|
6219
6219
|
data: {
|
|
6220
|
-
[v]:
|
|
6221
|
-
centerOffset: D -
|
|
6222
|
-
...
|
|
6220
|
+
[v]: V,
|
|
6221
|
+
centerOffset: D - V - I,
|
|
6222
|
+
...A && {
|
|
6223
6223
|
alignmentOffset: I
|
|
6224
6224
|
}
|
|
6225
6225
|
},
|
|
6226
|
-
reset:
|
|
6226
|
+
reset: A
|
|
6227
6227
|
};
|
|
6228
6228
|
}
|
|
6229
6229
|
}), Sp = function(e) {
|
|
@@ -6250,57 +6250,57 @@ const wp = 50, Np = async (e, t, r) => {
|
|
|
6250
6250
|
} = je(e, t);
|
|
6251
6251
|
if ((r = s.arrow) != null && r.alignmentOffset)
|
|
6252
6252
|
return {};
|
|
6253
|
-
const y = Ge(n), N = Me(l),
|
|
6254
|
-
!f && R && P.push(...bp(l, h, b,
|
|
6255
|
-
const E = [l, ...P], w = await c.detectOverflow(t, x),
|
|
6253
|
+
const y = Ge(n), N = Me(l), S = Ge(l) === l, C = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), P = f || (S || !h ? [vr(l)] : fp(l)), R = b !== "none";
|
|
6254
|
+
!f && R && P.push(...bp(l, h, b, C));
|
|
6255
|
+
const E = [l, ...P], w = await c.detectOverflow(t, x), k = [];
|
|
6256
6256
|
let L = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
6257
|
-
if (m &&
|
|
6258
|
-
const D = pp(n, i,
|
|
6259
|
-
|
|
6257
|
+
if (m && k.push(w[y]), p) {
|
|
6258
|
+
const D = pp(n, i, C);
|
|
6259
|
+
k.push(w[D[0]], w[D[1]]);
|
|
6260
6260
|
}
|
|
6261
6261
|
if (L = [...L, {
|
|
6262
6262
|
placement: n,
|
|
6263
|
-
overflows:
|
|
6264
|
-
}], !
|
|
6263
|
+
overflows: k
|
|
6264
|
+
}], !k.every((D) => D <= 0)) {
|
|
6265
6265
|
var O, M;
|
|
6266
|
-
const D = (((O = s.flip) == null ? void 0 : O.index) || 0) + 1,
|
|
6267
|
-
if (
|
|
6266
|
+
const D = (((O = s.flip) == null ? void 0 : O.index) || 0) + 1, V = E[D];
|
|
6267
|
+
if (V && (!(p === "alignment" ? N !== Me(V) : !1) || // We leave the current main axis only if every placement on that axis
|
|
6268
6268
|
// overflows the main axis.
|
|
6269
|
-
L.every((
|
|
6269
|
+
L.every((T) => Me(T.placement) === N ? T.overflows[0] > 0 : !0)))
|
|
6270
6270
|
return {
|
|
6271
6271
|
data: {
|
|
6272
6272
|
index: D,
|
|
6273
6273
|
overflows: L
|
|
6274
6274
|
},
|
|
6275
6275
|
reset: {
|
|
6276
|
-
placement:
|
|
6276
|
+
placement: V
|
|
6277
6277
|
}
|
|
6278
6278
|
};
|
|
6279
|
-
let
|
|
6280
|
-
if (!
|
|
6279
|
+
let A = (M = L.filter((I) => I.overflows[0] <= 0).sort((I, T) => I.overflows[1] - T.overflows[1])[0]) == null ? void 0 : M.placement;
|
|
6280
|
+
if (!A)
|
|
6281
6281
|
switch (v) {
|
|
6282
6282
|
case "bestFit": {
|
|
6283
|
-
var
|
|
6284
|
-
const I = (
|
|
6283
|
+
var F;
|
|
6284
|
+
const I = (F = L.filter((T) => {
|
|
6285
6285
|
if (R) {
|
|
6286
|
-
const
|
|
6287
|
-
return
|
|
6286
|
+
const z = Me(T.placement);
|
|
6287
|
+
return z === N || // Create a bias to the `y` side axis due to horizontal
|
|
6288
6288
|
// reading directions favoring greater width.
|
|
6289
|
-
|
|
6289
|
+
z === "y";
|
|
6290
6290
|
}
|
|
6291
6291
|
return !0;
|
|
6292
|
-
}).map((
|
|
6293
|
-
I && (
|
|
6292
|
+
}).map((T) => [T.placement, T.overflows.filter((z) => z > 0).reduce((z, _) => z + _, 0)]).sort((T, z) => T[1] - z[1])[0]) == null ? void 0 : F[0];
|
|
6293
|
+
I && (A = I);
|
|
6294
6294
|
break;
|
|
6295
6295
|
}
|
|
6296
6296
|
case "initialPlacement":
|
|
6297
|
-
|
|
6297
|
+
A = l;
|
|
6298
6298
|
break;
|
|
6299
6299
|
}
|
|
6300
|
-
if (n !==
|
|
6300
|
+
if (n !== A)
|
|
6301
6301
|
return {
|
|
6302
6302
|
reset: {
|
|
6303
|
-
placement:
|
|
6303
|
+
placement: A
|
|
6304
6304
|
}
|
|
6305
6305
|
};
|
|
6306
6306
|
}
|
|
@@ -6428,11 +6428,11 @@ const Ep = function(e) {
|
|
|
6428
6428
|
fn: (y) => {
|
|
6429
6429
|
let {
|
|
6430
6430
|
x: N,
|
|
6431
|
-
y:
|
|
6431
|
+
y: S
|
|
6432
6432
|
} = y;
|
|
6433
6433
|
return {
|
|
6434
6434
|
x: N,
|
|
6435
|
-
y:
|
|
6435
|
+
y: S
|
|
6436
6436
|
};
|
|
6437
6437
|
}
|
|
6438
6438
|
},
|
|
@@ -6443,12 +6443,12 @@ const Ep = function(e) {
|
|
|
6443
6443
|
}, p = await s.detectOverflow(t, d), f = Me(Ge(n)), v = pn(f);
|
|
6444
6444
|
let b = m[v], h = m[f];
|
|
6445
6445
|
if (i) {
|
|
6446
|
-
const y = v === "y" ? "top" : "left", N = v === "y" ? "bottom" : "right",
|
|
6447
|
-
b = Ro(
|
|
6446
|
+
const y = v === "y" ? "top" : "left", N = v === "y" ? "bottom" : "right", S = b + p[y], C = b - p[N];
|
|
6447
|
+
b = Ro(S, b, C);
|
|
6448
6448
|
}
|
|
6449
6449
|
if (l) {
|
|
6450
|
-
const y = f === "y" ? "top" : "left", N = f === "y" ? "bottom" : "right",
|
|
6451
|
-
h = Ro(
|
|
6450
|
+
const y = f === "y" ? "top" : "left", N = f === "y" ? "bottom" : "right", S = h + p[y], C = h - p[N];
|
|
6451
|
+
h = Ro(S, h, C);
|
|
6452
6452
|
}
|
|
6453
6453
|
const x = c.fn({
|
|
6454
6454
|
...t,
|
|
@@ -6496,12 +6496,12 @@ const Ep = function(e) {
|
|
|
6496
6496
|
...h
|
|
6497
6497
|
};
|
|
6498
6498
|
if (c) {
|
|
6499
|
-
const
|
|
6500
|
-
v <
|
|
6499
|
+
const S = f === "y" ? "height" : "width", C = s.reference[f] - s.floating[S] + x.mainAxis, P = s.reference[f] + s.reference[S] - x.mainAxis;
|
|
6500
|
+
v < C ? v = C : v > P && (v = P);
|
|
6501
6501
|
}
|
|
6502
6502
|
if (d) {
|
|
6503
6503
|
var y, N;
|
|
6504
|
-
const
|
|
6504
|
+
const S = f === "y" ? "width" : "height", C = hi.has(Ge(n)), P = s.reference[p] - s.floating[S] + (C && ((y = i.offset) == null ? void 0 : y[p]) || 0) + (C ? 0 : x.crossAxis), R = s.reference[p] + s.reference[S] + (C ? 0 : ((N = i.offset) == null ? void 0 : N[p]) || 0) - (C ? x.crossAxis : 0);
|
|
6505
6505
|
b < P ? b = P : b > R && (b = R);
|
|
6506
6506
|
}
|
|
6507
6507
|
return {
|
|
@@ -6531,19 +6531,19 @@ const Ep = function(e) {
|
|
|
6531
6531
|
} = s.floating;
|
|
6532
6532
|
let x, y;
|
|
6533
6533
|
p === "top" || p === "bottom" ? (x = p, y = f === (await (i.isRTL == null ? void 0 : i.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (y = p, x = f === "end" ? "top" : "bottom");
|
|
6534
|
-
const N = h - m.top - m.bottom,
|
|
6535
|
-
let E =
|
|
6536
|
-
if ((r = t.middlewareData.shift) != null && r.enabled.x && (w =
|
|
6537
|
-
const L = ye(m.left, 0), O = ye(m.right, 0), M = ye(m.top, 0),
|
|
6538
|
-
v ? w = b - 2 * (L !== 0 || O !== 0 ? L + O : ye(m.left, m.right)) : E = h - 2 * (M !== 0 ||
|
|
6534
|
+
const N = h - m.top - m.bottom, S = b - m.left - m.right, C = nt(h - m[x], N), P = nt(b - m[y], S), R = !t.middlewareData.shift;
|
|
6535
|
+
let E = C, w = P;
|
|
6536
|
+
if ((r = t.middlewareData.shift) != null && r.enabled.x && (w = S), (o = t.middlewareData.shift) != null && o.enabled.y && (E = N), R && !f) {
|
|
6537
|
+
const L = ye(m.left, 0), O = ye(m.right, 0), M = ye(m.top, 0), F = ye(m.bottom, 0);
|
|
6538
|
+
v ? w = b - 2 * (L !== 0 || O !== 0 ? L + O : ye(m.left, m.right)) : E = h - 2 * (M !== 0 || F !== 0 ? M + F : ye(m.top, m.bottom));
|
|
6539
6539
|
}
|
|
6540
6540
|
await c({
|
|
6541
6541
|
...t,
|
|
6542
6542
|
availableWidth: w,
|
|
6543
6543
|
availableHeight: E
|
|
6544
6544
|
});
|
|
6545
|
-
const
|
|
6546
|
-
return b !==
|
|
6545
|
+
const k = await i.getDimensions(l.floating);
|
|
6546
|
+
return b !== k.width || h !== k.height ? {
|
|
6547
6547
|
reset: {
|
|
6548
6548
|
rects: !0
|
|
6549
6549
|
}
|
|
@@ -6715,8 +6715,8 @@ function ft(e, t, r, o) {
|
|
|
6715
6715
|
const f = we(s), v = o && Ie(o) ? we(o) : o;
|
|
6716
6716
|
let b = f, h = Ao(b);
|
|
6717
6717
|
for (; h && o && v !== b; ) {
|
|
6718
|
-
const x = Et(h), y = h.getBoundingClientRect(), N = Le(h),
|
|
6719
|
-
c *= x.x, d *= x.y, m *= x.x, p *= x.y, c +=
|
|
6718
|
+
const x = Et(h), y = h.getBoundingClientRect(), N = Le(h), S = y.left + (h.clientLeft + parseFloat(N.paddingLeft)) * x.x, C = y.top + (h.clientTop + parseFloat(N.paddingTop)) * x.y;
|
|
6719
|
+
c *= x.x, d *= x.y, m *= x.x, p *= x.y, c += S, d += C, b = we(h), h = Ao(b);
|
|
6720
6720
|
}
|
|
6721
6721
|
}
|
|
6722
6722
|
return br({
|
|
@@ -6974,30 +6974,30 @@ function Yp(e, t) {
|
|
|
6974
6974
|
} = d;
|
|
6975
6975
|
if (l || t(), !f || !v)
|
|
6976
6976
|
return;
|
|
6977
|
-
const b = sr(p), h = sr(n.clientWidth - (m + f)), x = sr(n.clientHeight - (p + v)), y = sr(m),
|
|
6977
|
+
const b = sr(p), h = sr(n.clientWidth - (m + f)), x = sr(n.clientHeight - (p + v)), y = sr(m), S = {
|
|
6978
6978
|
rootMargin: -b + "px " + -h + "px " + -x + "px " + -y + "px",
|
|
6979
6979
|
threshold: ye(0, nt(1, c)) || 1
|
|
6980
6980
|
};
|
|
6981
|
-
let
|
|
6981
|
+
let C = !0;
|
|
6982
6982
|
function P(R) {
|
|
6983
6983
|
const E = R[0].intersectionRatio;
|
|
6984
6984
|
if (E !== c) {
|
|
6985
|
-
if (!
|
|
6985
|
+
if (!C)
|
|
6986
6986
|
return i();
|
|
6987
6987
|
E ? i(!1, E) : o = setTimeout(() => {
|
|
6988
6988
|
i(!1, 1e-7);
|
|
6989
6989
|
}, 1e3);
|
|
6990
6990
|
}
|
|
6991
|
-
E === 1 && !Ci(d, e.getBoundingClientRect()) && i(),
|
|
6991
|
+
E === 1 && !Ci(d, e.getBoundingClientRect()) && i(), C = !1;
|
|
6992
6992
|
}
|
|
6993
6993
|
try {
|
|
6994
6994
|
r = new IntersectionObserver(P, {
|
|
6995
|
-
...
|
|
6995
|
+
...S,
|
|
6996
6996
|
// Handle <iframe>s
|
|
6997
6997
|
root: n.ownerDocument
|
|
6998
6998
|
});
|
|
6999
6999
|
} catch {
|
|
7000
|
-
r = new IntersectionObserver(P,
|
|
7000
|
+
r = new IntersectionObserver(P, S);
|
|
7001
7001
|
}
|
|
7002
7002
|
r.observe(e);
|
|
7003
7003
|
}
|
|
@@ -7022,8 +7022,8 @@ function Zp(e, t, r, o) {
|
|
|
7022
7022
|
i && (v = new ResizeObserver((y) => {
|
|
7023
7023
|
let [N] = y;
|
|
7024
7024
|
N && N.target === d && v && t && (v.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
7025
|
-
var
|
|
7026
|
-
(
|
|
7025
|
+
var S;
|
|
7026
|
+
(S = v) == null || S.observe(t);
|
|
7027
7027
|
})), r();
|
|
7028
7028
|
}), d && !c && v.observe(d), t && v.observe(t));
|
|
7029
7029
|
let b, h = c ? ft(e) : null;
|
|
@@ -7120,21 +7120,21 @@ function sf(e) {
|
|
|
7120
7120
|
isPositioned: !1
|
|
7121
7121
|
}), [f, v] = u.useState(o);
|
|
7122
7122
|
xr(f, o) || v(o);
|
|
7123
|
-
const [b, h] = u.useState(null), [x, y] = u.useState(null), N = u.useCallback((
|
|
7124
|
-
|
|
7125
|
-
}, []),
|
|
7126
|
-
|
|
7127
|
-
}, []),
|
|
7123
|
+
const [b, h] = u.useState(null), [x, y] = u.useState(null), N = u.useCallback((T) => {
|
|
7124
|
+
T !== R.current && (R.current = T, h(T));
|
|
7125
|
+
}, []), S = u.useCallback((T) => {
|
|
7126
|
+
T !== E.current && (E.current = T, y(T));
|
|
7127
|
+
}, []), C = s || b, P = i || x, R = u.useRef(null), E = u.useRef(null), w = u.useRef(m), k = c != null, L = go(c), O = go(n), M = go(d), F = u.useCallback(() => {
|
|
7128
7128
|
if (!R.current || !E.current)
|
|
7129
7129
|
return;
|
|
7130
|
-
const
|
|
7130
|
+
const T = {
|
|
7131
7131
|
placement: t,
|
|
7132
7132
|
strategy: r,
|
|
7133
7133
|
middleware: f
|
|
7134
7134
|
};
|
|
7135
|
-
O.current && (
|
|
7135
|
+
O.current && (T.platform = O.current), of(R.current, E.current, T).then((z) => {
|
|
7136
7136
|
const _ = {
|
|
7137
|
-
...
|
|
7137
|
+
...z,
|
|
7138
7138
|
// The floating element's position may be recomputed while it's closed
|
|
7139
7139
|
// but still mounted (such as when transitioning out). To ensure
|
|
7140
7140
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
@@ -7147,8 +7147,8 @@ function sf(e) {
|
|
|
7147
7147
|
});
|
|
7148
7148
|
}, [f, t, r, O, M]);
|
|
7149
7149
|
cr(() => {
|
|
7150
|
-
d === !1 && w.current.isPositioned && (w.current.isPositioned = !1, p((
|
|
7151
|
-
...
|
|
7150
|
+
d === !1 && w.current.isPositioned && (w.current.isPositioned = !1, p((T) => ({
|
|
7151
|
+
...T,
|
|
7152
7152
|
isPositioned: !1
|
|
7153
7153
|
})));
|
|
7154
7154
|
}, [d]);
|
|
@@ -7156,48 +7156,48 @@ function sf(e) {
|
|
|
7156
7156
|
cr(() => (D.current = !0, () => {
|
|
7157
7157
|
D.current = !1;
|
|
7158
7158
|
}), []), cr(() => {
|
|
7159
|
-
if (
|
|
7159
|
+
if (C && (R.current = C), P && (E.current = P), C && P) {
|
|
7160
7160
|
if (L.current)
|
|
7161
|
-
return L.current(
|
|
7162
|
-
|
|
7161
|
+
return L.current(C, P, F);
|
|
7162
|
+
F();
|
|
7163
7163
|
}
|
|
7164
|
-
}, [
|
|
7165
|
-
const
|
|
7164
|
+
}, [C, P, F, L, k]);
|
|
7165
|
+
const V = u.useMemo(() => ({
|
|
7166
7166
|
reference: R,
|
|
7167
7167
|
floating: E,
|
|
7168
7168
|
setReference: N,
|
|
7169
|
-
setFloating:
|
|
7170
|
-
}), [N,
|
|
7171
|
-
reference:
|
|
7169
|
+
setFloating: S
|
|
7170
|
+
}), [N, S]), A = u.useMemo(() => ({
|
|
7171
|
+
reference: C,
|
|
7172
7172
|
floating: P
|
|
7173
|
-
}), [
|
|
7174
|
-
const
|
|
7173
|
+
}), [C, P]), I = u.useMemo(() => {
|
|
7174
|
+
const T = {
|
|
7175
7175
|
position: r,
|
|
7176
7176
|
left: 0,
|
|
7177
7177
|
top: 0
|
|
7178
7178
|
};
|
|
7179
|
-
if (!
|
|
7180
|
-
return
|
|
7181
|
-
const
|
|
7179
|
+
if (!A.floating)
|
|
7180
|
+
return T;
|
|
7181
|
+
const z = ga(A.floating, m.x), _ = ga(A.floating, m.y);
|
|
7182
7182
|
return l ? {
|
|
7183
|
-
...
|
|
7184
|
-
transform: "translate(" +
|
|
7185
|
-
...Si(
|
|
7183
|
+
...T,
|
|
7184
|
+
transform: "translate(" + z + "px, " + _ + "px)",
|
|
7185
|
+
...Si(A.floating) >= 1.5 && {
|
|
7186
7186
|
willChange: "transform"
|
|
7187
7187
|
}
|
|
7188
7188
|
} : {
|
|
7189
7189
|
position: r,
|
|
7190
|
-
left:
|
|
7190
|
+
left: z,
|
|
7191
7191
|
top: _
|
|
7192
7192
|
};
|
|
7193
|
-
}, [r, l,
|
|
7193
|
+
}, [r, l, A.floating, m.x, m.y]);
|
|
7194
7194
|
return u.useMemo(() => ({
|
|
7195
7195
|
...m,
|
|
7196
|
-
update:
|
|
7197
|
-
refs:
|
|
7198
|
-
elements:
|
|
7196
|
+
update: F,
|
|
7197
|
+
refs: V,
|
|
7198
|
+
elements: A,
|
|
7199
7199
|
floatingStyles: I
|
|
7200
|
-
}), [m,
|
|
7200
|
+
}), [m, F, V, A, I]);
|
|
7201
7201
|
}
|
|
7202
7202
|
const lf = (e) => {
|
|
7203
7203
|
function t(r) {
|
|
@@ -7299,7 +7299,7 @@ var Ti = "PopperAnchor", ki = u.forwardRef(
|
|
|
7299
7299
|
ki.displayName = Ti;
|
|
7300
7300
|
var yn = "PopperContent", [xf, yf] = Ri(yn), Ii = u.forwardRef(
|
|
7301
7301
|
(e, t) => {
|
|
7302
|
-
var
|
|
7302
|
+
var $, re, Z, K, j, Q;
|
|
7303
7303
|
const {
|
|
7304
7304
|
__scopePopper: r,
|
|
7305
7305
|
side: o = "bottom",
|
|
@@ -7315,15 +7315,15 @@ var yn = "PopperContent", [xf, yf] = Ri(yn), Ii = u.forwardRef(
|
|
|
7315
7315
|
updatePositionStrategy: v = "optimized",
|
|
7316
7316
|
onPlaced: b,
|
|
7317
7317
|
...h
|
|
7318
|
-
} = e, x = Ei(yn, r), [y, N] = u.useState(null),
|
|
7318
|
+
} = e, x = Ei(yn, r), [y, N] = u.useState(null), S = te(t, (ue) => N(ue)), [C, P] = u.useState(null), R = Qo(C), E = (R == null ? void 0 : R.width) ?? 0, w = (R == null ? void 0 : R.height) ?? 0, k = o + (s !== "center" ? "-" + s : ""), L = typeof m == "number" ? m : { top: 0, right: 0, bottom: 0, left: 0, ...m }, O = Array.isArray(d) ? d : [d], M = O.length > 0, F = {
|
|
7319
7319
|
padding: L,
|
|
7320
7320
|
boundary: O.filter(Nf),
|
|
7321
7321
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
7322
7322
|
altBoundary: M
|
|
7323
|
-
}, { refs: D, floatingStyles:
|
|
7323
|
+
}, { refs: D, floatingStyles: V, placement: A, isPositioned: I, middlewareData: T } = sf({
|
|
7324
7324
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
7325
7325
|
strategy: "fixed",
|
|
7326
|
-
placement:
|
|
7326
|
+
placement: k,
|
|
7327
7327
|
whileElementsMounted: (...ue) => Zp(...ue, {
|
|
7328
7328
|
animationFrame: v === "always"
|
|
7329
7329
|
}),
|
|
@@ -7336,25 +7336,25 @@ var yn = "PopperContent", [xf, yf] = Ri(yn), Ii = u.forwardRef(
|
|
|
7336
7336
|
mainAxis: !0,
|
|
7337
7337
|
crossAxis: !1,
|
|
7338
7338
|
limiter: p === "partial" ? uf() : void 0,
|
|
7339
|
-
...
|
|
7339
|
+
...F
|
|
7340
7340
|
}),
|
|
7341
|
-
c && mf({ ...
|
|
7341
|
+
c && mf({ ...F }),
|
|
7342
7342
|
pf({
|
|
7343
|
-
...
|
|
7343
|
+
...F,
|
|
7344
7344
|
apply: ({ elements: ue, rects: de, availableWidth: Ye, availableHeight: Ze }) => {
|
|
7345
7345
|
const { width: Ft, height: bc } = de.reference, Jt = ue.floating.style;
|
|
7346
7346
|
Jt.setProperty("--radix-popper-available-width", `${Ye}px`), Jt.setProperty("--radix-popper-available-height", `${Ze}px`), Jt.setProperty("--radix-popper-anchor-width", `${Ft}px`), Jt.setProperty("--radix-popper-anchor-height", `${bc}px`);
|
|
7347
7347
|
}
|
|
7348
7348
|
}),
|
|
7349
|
-
|
|
7349
|
+
C && hf({ element: C, padding: l }),
|
|
7350
7350
|
Cf({ arrowWidth: E, arrowHeight: w }),
|
|
7351
|
-
f && ff({ strategy: "referenceHidden", ...
|
|
7351
|
+
f && ff({ strategy: "referenceHidden", ...F })
|
|
7352
7352
|
]
|
|
7353
|
-
}), [
|
|
7353
|
+
}), [z, _] = _i(A), G = xe(b);
|
|
7354
7354
|
ge(() => {
|
|
7355
7355
|
I && (G == null || G());
|
|
7356
7356
|
}, [I, G]);
|
|
7357
|
-
const ne = (
|
|
7357
|
+
const ne = ($ = T.arrow) == null ? void 0 : $.x, ie = (re = T.arrow) == null ? void 0 : re.y, q = ((Z = T.arrow) == null ? void 0 : Z.centerOffset) !== 0, [oe, ae] = u.useState();
|
|
7358
7358
|
return ge(() => {
|
|
7359
7359
|
y && ae(window.getComputedStyle(y).zIndex);
|
|
7360
7360
|
}, [y]), /* @__PURE__ */ a(
|
|
@@ -7363,19 +7363,19 @@ var yn = "PopperContent", [xf, yf] = Ri(yn), Ii = u.forwardRef(
|
|
|
7363
7363
|
ref: D.setFloating,
|
|
7364
7364
|
"data-radix-popper-content-wrapper": "",
|
|
7365
7365
|
style: {
|
|
7366
|
-
|
|
7367
|
-
transform: I ?
|
|
7366
|
+
...V,
|
|
7367
|
+
transform: I ? V.transform : "translate(0, -200%)",
|
|
7368
7368
|
// keep off the page when measuring
|
|
7369
7369
|
minWidth: "max-content",
|
|
7370
7370
|
zIndex: oe,
|
|
7371
7371
|
"--radix-popper-transform-origin": [
|
|
7372
|
-
(K =
|
|
7373
|
-
(j =
|
|
7372
|
+
(K = T.transformOrigin) == null ? void 0 : K.x,
|
|
7373
|
+
(j = T.transformOrigin) == null ? void 0 : j.y
|
|
7374
7374
|
].join(" "),
|
|
7375
7375
|
// hide the content if using the hide middleware and should be hidden
|
|
7376
7376
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
7377
7377
|
// as if the PopperContent isn't there at all
|
|
7378
|
-
...((Q =
|
|
7378
|
+
...((Q = T.hide) == null ? void 0 : Q.referenceHidden) && {
|
|
7379
7379
|
visibility: "hidden",
|
|
7380
7380
|
pointerEvents: "none"
|
|
7381
7381
|
}
|
|
@@ -7385,7 +7385,7 @@ var yn = "PopperContent", [xf, yf] = Ri(yn), Ii = u.forwardRef(
|
|
|
7385
7385
|
xf,
|
|
7386
7386
|
{
|
|
7387
7387
|
scope: r,
|
|
7388
|
-
placedSide:
|
|
7388
|
+
placedSide: z,
|
|
7389
7389
|
onArrowChange: P,
|
|
7390
7390
|
arrowX: ne,
|
|
7391
7391
|
arrowY: ie,
|
|
@@ -7393,10 +7393,10 @@ var yn = "PopperContent", [xf, yf] = Ri(yn), Ii = u.forwardRef(
|
|
|
7393
7393
|
children: /* @__PURE__ */ a(
|
|
7394
7394
|
J.div,
|
|
7395
7395
|
{
|
|
7396
|
-
"data-side":
|
|
7396
|
+
"data-side": z,
|
|
7397
7397
|
"data-align": _,
|
|
7398
7398
|
...h,
|
|
7399
|
-
ref:
|
|
7399
|
+
ref: S,
|
|
7400
7400
|
style: {
|
|
7401
7401
|
...h.style,
|
|
7402
7402
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -7827,21 +7827,21 @@ function Gi(e) {
|
|
|
7827
7827
|
t,
|
|
7828
7828
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
7829
7829
|
), i = (h) => {
|
|
7830
|
-
const { scope: x, children: y } = h, N = We.useRef(null),
|
|
7831
|
-
return /* @__PURE__ */ a(n, { scope: x, itemMap:
|
|
7830
|
+
const { scope: x, children: y } = h, N = We.useRef(null), S = We.useRef(/* @__PURE__ */ new Map()).current;
|
|
7831
|
+
return /* @__PURE__ */ a(n, { scope: x, itemMap: S, collectionRef: N, children: y });
|
|
7832
7832
|
};
|
|
7833
7833
|
i.displayName = t;
|
|
7834
7834
|
const l = e + "CollectionSlot", c = /* @__PURE__ */ At(l), d = We.forwardRef(
|
|
7835
7835
|
(h, x) => {
|
|
7836
|
-
const { scope: y, children: N } = h,
|
|
7837
|
-
return /* @__PURE__ */ a(c, { ref:
|
|
7836
|
+
const { scope: y, children: N } = h, S = s(l, y), C = te(x, S.collectionRef);
|
|
7837
|
+
return /* @__PURE__ */ a(c, { ref: C, children: N });
|
|
7838
7838
|
}
|
|
7839
7839
|
);
|
|
7840
7840
|
d.displayName = l;
|
|
7841
7841
|
const m = e + "CollectionItemSlot", p = "data-radix-collection-item", f = /* @__PURE__ */ At(m), v = We.forwardRef(
|
|
7842
7842
|
(h, x) => {
|
|
7843
|
-
const { scope: y, children: N, ...
|
|
7844
|
-
return We.useEffect(() => (R.itemMap.set(
|
|
7843
|
+
const { scope: y, children: N, ...S } = h, C = We.useRef(null), P = te(x, C), R = s(m, y);
|
|
7844
|
+
return We.useEffect(() => (R.itemMap.set(C, { ref: C, ...S }), () => void R.itemMap.delete(C))), /* @__PURE__ */ a(f, { [p]: "", ref: P, children: N });
|
|
7845
7845
|
}
|
|
7846
7846
|
);
|
|
7847
7847
|
v.displayName = m;
|
|
@@ -7850,9 +7850,9 @@ function Gi(e) {
|
|
|
7850
7850
|
return We.useCallback(() => {
|
|
7851
7851
|
const N = x.collectionRef.current;
|
|
7852
7852
|
if (!N) return [];
|
|
7853
|
-
const
|
|
7853
|
+
const S = Array.from(N.querySelectorAll(`[${p}]`));
|
|
7854
7854
|
return Array.from(x.itemMap.values()).sort(
|
|
7855
|
-
(R, E) =>
|
|
7855
|
+
(R, E) => S.indexOf(R.ref.current) - S.indexOf(E.ref.current)
|
|
7856
7856
|
);
|
|
7857
7857
|
}, [x.collectionRef, x.itemMap]);
|
|
7858
7858
|
}
|
|
@@ -7904,17 +7904,17 @@ var zf = Xi, Vf = [" ", "Enter", "ArrowUp", "ArrowDown"], Bf = [" ", "Enter"], h
|
|
|
7904
7904
|
disabled: f,
|
|
7905
7905
|
required: v,
|
|
7906
7906
|
form: b
|
|
7907
|
-
} = e, h = Xr(t), [x, y] = u.useState(null), [N,
|
|
7907
|
+
} = e, h = Xr(t), [x, y] = u.useState(null), [N, S] = u.useState(null), [C, P] = u.useState(!1), R = rn(d), [E, w] = mt({
|
|
7908
7908
|
prop: o,
|
|
7909
7909
|
defaultProp: n ?? !1,
|
|
7910
7910
|
onChange: s,
|
|
7911
7911
|
caller: ht
|
|
7912
|
-
}), [
|
|
7912
|
+
}), [k, L] = mt({
|
|
7913
7913
|
prop: i,
|
|
7914
7914
|
defaultProp: l,
|
|
7915
7915
|
onChange: c,
|
|
7916
7916
|
caller: ht
|
|
7917
|
-
}), O = u.useRef(null), M = x ? b || !!x.closest("form") : !0, [
|
|
7917
|
+
}), O = u.useRef(null), M = x ? b || !!x.closest("form") : !0, [F, D] = u.useState(/* @__PURE__ */ new Set()), V = Array.from(F).map((A) => A.props.value).join(";");
|
|
7918
7918
|
return /* @__PURE__ */ a(wn, { ...h, children: /* @__PURE__ */ g(
|
|
7919
7919
|
Hf,
|
|
7920
7920
|
{
|
|
@@ -7923,11 +7923,11 @@ var zf = Xi, Vf = [" ", "Enter", "ArrowUp", "ArrowDown"], Bf = [" ", "Enter"], h
|
|
|
7923
7923
|
trigger: x,
|
|
7924
7924
|
onTriggerChange: y,
|
|
7925
7925
|
valueNode: N,
|
|
7926
|
-
onValueNodeChange:
|
|
7927
|
-
valueNodeHasChildren:
|
|
7926
|
+
onValueNodeChange: S,
|
|
7927
|
+
valueNodeHasChildren: C,
|
|
7928
7928
|
onValueNodeHasChildrenChange: P,
|
|
7929
7929
|
contentId: tt(),
|
|
7930
|
-
value:
|
|
7930
|
+
value: k,
|
|
7931
7931
|
onValueChange: L,
|
|
7932
7932
|
open: E,
|
|
7933
7933
|
onOpenChange: w,
|
|
@@ -7939,13 +7939,13 @@ var zf = Xi, Vf = [" ", "Enter", "ArrowUp", "ArrowDown"], Bf = [" ", "Enter"], h
|
|
|
7939
7939
|
Uf,
|
|
7940
7940
|
{
|
|
7941
7941
|
scope: e.__scopeSelect,
|
|
7942
|
-
onNativeOptionAdd: u.useCallback((
|
|
7943
|
-
D((I) => new Set(I).add(
|
|
7942
|
+
onNativeOptionAdd: u.useCallback((A) => {
|
|
7943
|
+
D((I) => new Set(I).add(A));
|
|
7944
7944
|
}, []),
|
|
7945
|
-
onNativeOptionRemove: u.useCallback((
|
|
7945
|
+
onNativeOptionRemove: u.useCallback((A) => {
|
|
7946
7946
|
D((I) => {
|
|
7947
|
-
const
|
|
7948
|
-
return
|
|
7947
|
+
const T = new Set(I);
|
|
7948
|
+
return T.delete(A), T;
|
|
7949
7949
|
});
|
|
7950
7950
|
}, []),
|
|
7951
7951
|
children: r
|
|
@@ -7959,16 +7959,16 @@ var zf = Xi, Vf = [" ", "Enter", "ArrowUp", "ArrowDown"], Bf = [" ", "Enter"], h
|
|
|
7959
7959
|
tabIndex: -1,
|
|
7960
7960
|
name: m,
|
|
7961
7961
|
autoComplete: p,
|
|
7962
|
-
value:
|
|
7963
|
-
onChange: (
|
|
7962
|
+
value: k,
|
|
7963
|
+
onChange: (A) => L(A.target.value),
|
|
7964
7964
|
disabled: f,
|
|
7965
7965
|
form: b,
|
|
7966
7966
|
children: [
|
|
7967
|
-
|
|
7968
|
-
Array.from(
|
|
7967
|
+
k === void 0 ? /* @__PURE__ */ a("option", { value: "" }) : null,
|
|
7968
|
+
Array.from(F)
|
|
7969
7969
|
]
|
|
7970
7970
|
},
|
|
7971
|
-
|
|
7971
|
+
V
|
|
7972
7972
|
) : null
|
|
7973
7973
|
]
|
|
7974
7974
|
}
|
|
@@ -7978,7 +7978,7 @@ Yi.displayName = ht;
|
|
|
7978
7978
|
var Zi = "SelectTrigger", Ki = u.forwardRef(
|
|
7979
7979
|
(e, t) => {
|
|
7980
7980
|
const { __scopeSelect: r, disabled: o = !1, ...n } = e, s = Xr(r), i = lt(Zi, r), l = i.disabled || o, c = te(t, i.onTriggerChange), d = qr(r), m = u.useRef("touch"), [p, f, v] = wl((h) => {
|
|
7981
|
-
const x = d().filter((
|
|
7981
|
+
const x = d().filter((S) => !S.disabled), y = x.find((S) => S.value === i.value), N = Nl(x, h, y);
|
|
7982
7982
|
N !== void 0 && i.onValueChange(N.value);
|
|
7983
7983
|
}), b = (h) => {
|
|
7984
7984
|
l || (i.onOpenChange(!0), v()), h && (i.triggerPointerDownPosRef.current = {
|
|
@@ -8083,62 +8083,62 @@ var ke = 10, [ol, ct] = Dt(gt), Xf = "SelectContentImpl", Yf = /* @__PURE__ */ A
|
|
|
8083
8083
|
avoidCollisions: x,
|
|
8084
8084
|
//
|
|
8085
8085
|
...y
|
|
8086
|
-
} = e, N = lt(gt, r), [
|
|
8086
|
+
} = e, N = lt(gt, r), [S, C] = u.useState(null), [P, R] = u.useState(null), E = te(t, ($) => C($)), [w, k] = u.useState(null), [L, O] = u.useState(
|
|
8087
8087
|
null
|
|
8088
|
-
), M = qr(r), [
|
|
8088
|
+
), M = qr(r), [F, D] = u.useState(!1), V = u.useRef(!1);
|
|
8089
8089
|
u.useEffect(() => {
|
|
8090
|
-
if (
|
|
8091
|
-
}, [
|
|
8092
|
-
const
|
|
8093
|
-
(
|
|
8090
|
+
if (S) return cn(S);
|
|
8091
|
+
}, [S]), ln();
|
|
8092
|
+
const A = u.useCallback(
|
|
8093
|
+
($) => {
|
|
8094
8094
|
const [re, ...Z] = M().map((Q) => Q.ref.current), [K] = Z.slice(-1), j = document.activeElement;
|
|
8095
|
-
for (const Q of
|
|
8095
|
+
for (const Q of $)
|
|
8096
8096
|
if (Q === j || (Q == null || Q.scrollIntoView({ block: "nearest" }), Q === re && P && (P.scrollTop = 0), Q === K && P && (P.scrollTop = P.scrollHeight), Q == null || Q.focus(), document.activeElement !== j)) return;
|
|
8097
8097
|
},
|
|
8098
8098
|
[M, P]
|
|
8099
8099
|
), I = u.useCallback(
|
|
8100
|
-
() =>
|
|
8101
|
-
[
|
|
8100
|
+
() => A([w, S]),
|
|
8101
|
+
[A, w, S]
|
|
8102
8102
|
);
|
|
8103
8103
|
u.useEffect(() => {
|
|
8104
|
-
|
|
8105
|
-
}, [
|
|
8106
|
-
const { onOpenChange:
|
|
8104
|
+
F && I();
|
|
8105
|
+
}, [F, I]);
|
|
8106
|
+
const { onOpenChange: T, triggerPointerDownPosRef: z } = N;
|
|
8107
8107
|
u.useEffect(() => {
|
|
8108
|
-
if (
|
|
8109
|
-
let
|
|
8108
|
+
if (S) {
|
|
8109
|
+
let $ = { x: 0, y: 0 };
|
|
8110
8110
|
const re = (K) => {
|
|
8111
8111
|
var j, Q;
|
|
8112
|
-
|
|
8113
|
-
x: Math.abs(Math.round(K.pageX) - (((j =
|
|
8114
|
-
y: Math.abs(Math.round(K.pageY) - (((Q =
|
|
8112
|
+
$ = {
|
|
8113
|
+
x: Math.abs(Math.round(K.pageX) - (((j = z.current) == null ? void 0 : j.x) ?? 0)),
|
|
8114
|
+
y: Math.abs(Math.round(K.pageY) - (((Q = z.current) == null ? void 0 : Q.y) ?? 0))
|
|
8115
8115
|
};
|
|
8116
8116
|
}, Z = (K) => {
|
|
8117
|
-
|
|
8117
|
+
$.x <= 10 && $.y <= 10 ? K.preventDefault() : S.contains(K.target) || T(!1), document.removeEventListener("pointermove", re), z.current = null;
|
|
8118
8118
|
};
|
|
8119
|
-
return
|
|
8119
|
+
return z.current !== null && (document.addEventListener("pointermove", re), document.addEventListener("pointerup", Z, { capture: !0, once: !0 })), () => {
|
|
8120
8120
|
document.removeEventListener("pointermove", re), document.removeEventListener("pointerup", Z, { capture: !0 });
|
|
8121
8121
|
};
|
|
8122
8122
|
}
|
|
8123
|
-
}, [
|
|
8124
|
-
const
|
|
8125
|
-
return window.addEventListener("blur",
|
|
8126
|
-
window.removeEventListener("blur",
|
|
8123
|
+
}, [S, T, z]), u.useEffect(() => {
|
|
8124
|
+
const $ = () => T(!1);
|
|
8125
|
+
return window.addEventListener("blur", $), window.addEventListener("resize", $), () => {
|
|
8126
|
+
window.removeEventListener("blur", $), window.removeEventListener("resize", $);
|
|
8127
8127
|
};
|
|
8128
|
-
}, [
|
|
8129
|
-
const [_, G] = wl((
|
|
8130
|
-
const re = M().filter((j) => !j.disabled), Z = re.find((j) => j.ref.current === document.activeElement), K = Nl(re,
|
|
8128
|
+
}, [T]);
|
|
8129
|
+
const [_, G] = wl(($) => {
|
|
8130
|
+
const re = M().filter((j) => !j.disabled), Z = re.find((j) => j.ref.current === document.activeElement), K = Nl(re, $, Z);
|
|
8131
8131
|
K && setTimeout(() => K.ref.current.focus());
|
|
8132
8132
|
}), ne = u.useCallback(
|
|
8133
|
-
(
|
|
8134
|
-
const K =
|
|
8135
|
-
(N.value !== void 0 && N.value === re || K) && (
|
|
8133
|
+
($, re, Z) => {
|
|
8134
|
+
const K = !V.current && !Z;
|
|
8135
|
+
(N.value !== void 0 && N.value === re || K) && (k($), K && (V.current = !0));
|
|
8136
8136
|
},
|
|
8137
8137
|
[N.value]
|
|
8138
|
-
), ie = u.useCallback(() =>
|
|
8139
|
-
(
|
|
8140
|
-
const K =
|
|
8141
|
-
(N.value !== void 0 && N.value === re || K) && O(
|
|
8138
|
+
), ie = u.useCallback(() => S == null ? void 0 : S.focus(), [S]), q = u.useCallback(
|
|
8139
|
+
($, re, Z) => {
|
|
8140
|
+
const K = !V.current && !Z;
|
|
8141
|
+
(N.value !== void 0 && N.value === re || K) && O($);
|
|
8142
8142
|
},
|
|
8143
8143
|
[N.value]
|
|
8144
8144
|
), oe = o === "popper" ? To : al, ae = oe === To ? {
|
|
@@ -8157,7 +8157,7 @@ var ke = 10, [ol, ct] = Dt(gt), Xf = "SelectContentImpl", Yf = /* @__PURE__ */ A
|
|
|
8157
8157
|
ol,
|
|
8158
8158
|
{
|
|
8159
8159
|
scope: r,
|
|
8160
|
-
content:
|
|
8160
|
+
content: S,
|
|
8161
8161
|
viewport: P,
|
|
8162
8162
|
onViewportChange: R,
|
|
8163
8163
|
itemRefCallback: ne,
|
|
@@ -8167,19 +8167,19 @@ var ke = 10, [ol, ct] = Dt(gt), Xf = "SelectContentImpl", Yf = /* @__PURE__ */ A
|
|
|
8167
8167
|
focusSelectedItem: I,
|
|
8168
8168
|
selectedItemText: L,
|
|
8169
8169
|
position: o,
|
|
8170
|
-
isPositioned:
|
|
8170
|
+
isPositioned: F,
|
|
8171
8171
|
searchRef: _,
|
|
8172
8172
|
children: /* @__PURE__ */ a(Dr, { as: Yf, allowPinchZoom: !0, children: /* @__PURE__ */ a(
|
|
8173
8173
|
Or,
|
|
8174
8174
|
{
|
|
8175
8175
|
asChild: !0,
|
|
8176
8176
|
trapped: N.open,
|
|
8177
|
-
onMountAutoFocus: (
|
|
8178
|
-
|
|
8177
|
+
onMountAutoFocus: ($) => {
|
|
8178
|
+
$.preventDefault();
|
|
8179
8179
|
},
|
|
8180
|
-
onUnmountAutoFocus: Y(n, (
|
|
8180
|
+
onUnmountAutoFocus: Y(n, ($) => {
|
|
8181
8181
|
var re;
|
|
8182
|
-
(re = N.trigger) == null || re.focus({ preventScroll: !0 }),
|
|
8182
|
+
(re = N.trigger) == null || re.focus({ preventScroll: !0 }), $.preventDefault();
|
|
8183
8183
|
}),
|
|
8184
8184
|
children: /* @__PURE__ */ a(
|
|
8185
8185
|
Xt,
|
|
@@ -8188,7 +8188,7 @@ var ke = 10, [ol, ct] = Dt(gt), Xf = "SelectContentImpl", Yf = /* @__PURE__ */ A
|
|
|
8188
8188
|
disableOutsidePointerEvents: !0,
|
|
8189
8189
|
onEscapeKeyDown: s,
|
|
8190
8190
|
onPointerDownOutside: i,
|
|
8191
|
-
onFocusOutside: (
|
|
8191
|
+
onFocusOutside: ($) => $.preventDefault(),
|
|
8192
8192
|
onDismiss: () => N.onOpenChange(!1),
|
|
8193
8193
|
children: /* @__PURE__ */ a(
|
|
8194
8194
|
oe,
|
|
@@ -8197,7 +8197,7 @@ var ke = 10, [ol, ct] = Dt(gt), Xf = "SelectContentImpl", Yf = /* @__PURE__ */ A
|
|
|
8197
8197
|
id: N.contentId,
|
|
8198
8198
|
"data-state": N.open ? "open" : "closed",
|
|
8199
8199
|
dir: N.dir,
|
|
8200
|
-
onContextMenu: (
|
|
8200
|
+
onContextMenu: ($) => $.preventDefault(),
|
|
8201
8201
|
...y,
|
|
8202
8202
|
...ae,
|
|
8203
8203
|
onPlaced: () => D(!0),
|
|
@@ -8210,15 +8210,15 @@ var ke = 10, [ol, ct] = Dt(gt), Xf = "SelectContentImpl", Yf = /* @__PURE__ */ A
|
|
|
8210
8210
|
outline: "none",
|
|
8211
8211
|
...y.style
|
|
8212
8212
|
},
|
|
8213
|
-
onKeyDown: Y(y.onKeyDown, (
|
|
8214
|
-
const re =
|
|
8215
|
-
if (
|
|
8213
|
+
onKeyDown: Y(y.onKeyDown, ($) => {
|
|
8214
|
+
const re = $.ctrlKey || $.altKey || $.metaKey;
|
|
8215
|
+
if ($.key === "Tab" && $.preventDefault(), !re && $.key.length === 1 && G($.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes($.key)) {
|
|
8216
8216
|
let K = M().filter((j) => !j.disabled).map((j) => j.ref.current);
|
|
8217
|
-
if (["ArrowUp", "End"].includes(
|
|
8218
|
-
const j =
|
|
8217
|
+
if (["ArrowUp", "End"].includes($.key) && (K = K.slice().reverse()), ["ArrowUp", "ArrowDown"].includes($.key)) {
|
|
8218
|
+
const j = $.target, Q = K.indexOf(j);
|
|
8219
8219
|
K = K.slice(Q + 1);
|
|
8220
8220
|
}
|
|
8221
|
-
setTimeout(() =>
|
|
8221
|
+
setTimeout(() => A(K)), $.preventDefault();
|
|
8222
8222
|
}
|
|
8223
8223
|
})
|
|
8224
8224
|
}
|
|
@@ -8233,11 +8233,11 @@ var ke = 10, [ol, ct] = Dt(gt), Xf = "SelectContentImpl", Yf = /* @__PURE__ */ A
|
|
|
8233
8233
|
);
|
|
8234
8234
|
nl.displayName = Xf;
|
|
8235
8235
|
var Zf = "SelectItemAlignedPosition", al = u.forwardRef((e, t) => {
|
|
8236
|
-
const { __scopeSelect: r, onPlaced: o, ...n } = e, s = lt(gt, r), i = ct(gt, r), [l, c] = u.useState(null), [d, m] = u.useState(null), p = te(t, (E) => m(E)), f = qr(r), v = u.useRef(!1), b = u.useRef(!0), { viewport: h, selectedItem: x, selectedItemText: y, focusSelectedItem: N } = i,
|
|
8236
|
+
const { __scopeSelect: r, onPlaced: o, ...n } = e, s = lt(gt, r), i = ct(gt, r), [l, c] = u.useState(null), [d, m] = u.useState(null), p = te(t, (E) => m(E)), f = qr(r), v = u.useRef(!1), b = u.useRef(!0), { viewport: h, selectedItem: x, selectedItemText: y, focusSelectedItem: N } = i, S = u.useCallback(() => {
|
|
8237
8237
|
if (s.trigger && s.valueNode && l && d && h && x && y) {
|
|
8238
|
-
const E = s.trigger.getBoundingClientRect(), w = d.getBoundingClientRect(),
|
|
8238
|
+
const E = s.trigger.getBoundingClientRect(), w = d.getBoundingClientRect(), k = s.valueNode.getBoundingClientRect(), L = y.getBoundingClientRect();
|
|
8239
8239
|
if (s.dir !== "rtl") {
|
|
8240
|
-
const j = L.left - w.left, Q =
|
|
8240
|
+
const j = L.left - w.left, Q = k.left - j, ue = E.left - Q, de = E.width + ue, Ye = Math.max(de, w.width), Ze = window.innerWidth - ke, Ft = Ut(Q, [
|
|
8241
8241
|
ke,
|
|
8242
8242
|
// Prevents the content from going off the starting edge of the
|
|
8243
8243
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -8248,13 +8248,13 @@ var Zf = "SelectItemAlignedPosition", al = u.forwardRef((e, t) => {
|
|
|
8248
8248
|
]);
|
|
8249
8249
|
l.style.minWidth = de + "px", l.style.left = Ft + "px";
|
|
8250
8250
|
} else {
|
|
8251
|
-
const j = w.right - L.right, Q = window.innerWidth -
|
|
8251
|
+
const j = w.right - L.right, Q = window.innerWidth - k.right - j, ue = window.innerWidth - E.right - Q, de = E.width + ue, Ye = Math.max(de, w.width), Ze = window.innerWidth - ke, Ft = Ut(Q, [
|
|
8252
8252
|
ke,
|
|
8253
8253
|
Math.max(ke, Ze - Ye)
|
|
8254
8254
|
]);
|
|
8255
8255
|
l.style.minWidth = de + "px", l.style.right = Ft + "px";
|
|
8256
8256
|
}
|
|
8257
|
-
const O = f(), M = window.innerHeight - ke * 2,
|
|
8257
|
+
const O = f(), M = window.innerHeight - ke * 2, F = h.scrollHeight, D = window.getComputedStyle(d), V = parseInt(D.borderTopWidth, 10), A = parseInt(D.paddingTop, 10), I = parseInt(D.borderBottomWidth, 10), T = parseInt(D.paddingBottom, 10), z = V + A + F + T + I, _ = Math.min(x.offsetHeight * 5, z), G = window.getComputedStyle(h), ne = parseInt(G.paddingTop, 10), ie = parseInt(G.paddingBottom, 10), q = E.top + E.height / 2 - ke, oe = M - q, ae = x.offsetHeight / 2, $ = x.offsetTop + ae, re = V + A + $, Z = z - re;
|
|
8258
8258
|
if (re <= q) {
|
|
8259
8259
|
const j = O.length > 0 && x === O[O.length - 1].ref.current;
|
|
8260
8260
|
l.style.bottom = "0px";
|
|
@@ -8269,7 +8269,7 @@ var Zf = "SelectItemAlignedPosition", al = u.forwardRef((e, t) => {
|
|
|
8269
8269
|
l.style.top = "0px";
|
|
8270
8270
|
const ue = Math.max(
|
|
8271
8271
|
q,
|
|
8272
|
-
|
|
8272
|
+
V + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
8273
8273
|
(j ? ne : 0) + ae
|
|
8274
8274
|
) + Z;
|
|
8275
8275
|
l.style.height = ue + "px", h.scrollTop = re - q + h.offsetTop;
|
|
@@ -8288,16 +8288,16 @@ var Zf = "SelectItemAlignedPosition", al = u.forwardRef((e, t) => {
|
|
|
8288
8288
|
s.dir,
|
|
8289
8289
|
o
|
|
8290
8290
|
]);
|
|
8291
|
-
ge(() =>
|
|
8292
|
-
const [
|
|
8291
|
+
ge(() => S(), [S]);
|
|
8292
|
+
const [C, P] = u.useState();
|
|
8293
8293
|
ge(() => {
|
|
8294
8294
|
d && P(window.getComputedStyle(d).zIndex);
|
|
8295
8295
|
}, [d]);
|
|
8296
8296
|
const R = u.useCallback(
|
|
8297
8297
|
(E) => {
|
|
8298
|
-
E && b.current === !0 && (
|
|
8298
|
+
E && b.current === !0 && (S(), N == null || N(), b.current = !1);
|
|
8299
8299
|
},
|
|
8300
|
-
[
|
|
8300
|
+
[S, N]
|
|
8301
8301
|
);
|
|
8302
8302
|
return /* @__PURE__ */ a(
|
|
8303
8303
|
Jf,
|
|
@@ -8314,7 +8314,7 @@ var Zf = "SelectItemAlignedPosition", al = u.forwardRef((e, t) => {
|
|
|
8314
8314
|
display: "flex",
|
|
8315
8315
|
flexDirection: "column",
|
|
8316
8316
|
position: "fixed",
|
|
8317
|
-
zIndex:
|
|
8317
|
+
zIndex: C
|
|
8318
8318
|
},
|
|
8319
8319
|
children: /* @__PURE__ */ a(
|
|
8320
8320
|
J.div,
|
|
@@ -8406,8 +8406,8 @@ var [Jf, Pn] = Dt(gt, {}), ko = "SelectViewport", sl = u.forwardRef(
|
|
|
8406
8406
|
if (v > 0) {
|
|
8407
8407
|
const b = window.innerHeight - ke * 2, h = parseFloat(p.style.minHeight), x = parseFloat(p.style.height), y = Math.max(h, x);
|
|
8408
8408
|
if (y < b) {
|
|
8409
|
-
const N = y + v,
|
|
8410
|
-
p.style.height =
|
|
8409
|
+
const N = y + v, S = Math.min(b, N), C = N - S;
|
|
8410
|
+
p.style.height = S + "px", p.style.bottom === "0px" && (m.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
|
|
8411
8411
|
}
|
|
8412
8412
|
}
|
|
8413
8413
|
}
|
|
@@ -8444,8 +8444,8 @@ var yr = "SelectItem", [rh, dl] = Dt(yr), ul = u.forwardRef(
|
|
|
8444
8444
|
} = e, l = lt(yr, r), c = ct(yr, r), d = l.value === o, [m, p] = u.useState(s ?? ""), [f, v] = u.useState(!1), b = te(
|
|
8445
8445
|
t,
|
|
8446
8446
|
(N) => {
|
|
8447
|
-
var
|
|
8448
|
-
return (
|
|
8447
|
+
var S;
|
|
8448
|
+
return (S = c.itemRefCallback) == null ? void 0 : S.call(c, N, o, n);
|
|
8449
8449
|
}
|
|
8450
8450
|
), h = tt(), x = u.useRef("touch"), y = () => {
|
|
8451
8451
|
n || (l.onValueChange(o), l.onOpenChange(!1));
|
|
@@ -8463,7 +8463,7 @@ var yr = "SelectItem", [rh, dl] = Dt(yr), ul = u.forwardRef(
|
|
|
8463
8463
|
textId: h,
|
|
8464
8464
|
isSelected: d,
|
|
8465
8465
|
onItemTextChange: u.useCallback((N) => {
|
|
8466
|
-
p((
|
|
8466
|
+
p((S) => S || ((N == null ? void 0 : N.textContent) ?? "").trim());
|
|
8467
8467
|
}, []),
|
|
8468
8468
|
children: /* @__PURE__ */ a(
|
|
8469
8469
|
Gr.ItemSlot,
|
|
@@ -8497,16 +8497,16 @@ var yr = "SelectItem", [rh, dl] = Dt(yr), ul = u.forwardRef(
|
|
|
8497
8497
|
x.current = N.pointerType;
|
|
8498
8498
|
}),
|
|
8499
8499
|
onPointerMove: Y(i.onPointerMove, (N) => {
|
|
8500
|
-
var
|
|
8501
|
-
x.current = N.pointerType, n ? (
|
|
8500
|
+
var S;
|
|
8501
|
+
x.current = N.pointerType, n ? (S = c.onItemLeave) == null || S.call(c) : x.current === "mouse" && N.currentTarget.focus({ preventScroll: !0 });
|
|
8502
8502
|
}),
|
|
8503
8503
|
onPointerLeave: Y(i.onPointerLeave, (N) => {
|
|
8504
|
-
var
|
|
8505
|
-
N.currentTarget === document.activeElement && ((
|
|
8504
|
+
var S;
|
|
8505
|
+
N.currentTarget === document.activeElement && ((S = c.onItemLeave) == null || S.call(c));
|
|
8506
8506
|
}),
|
|
8507
8507
|
onKeyDown: Y(i.onKeyDown, (N) => {
|
|
8508
|
-
var
|
|
8509
|
-
((
|
|
8508
|
+
var C;
|
|
8509
|
+
((C = c.searchRef) == null ? void 0 : C.current) !== "" && N.key === " " || (Bf.includes(N.key) && y(), N.key === " " && N.preventDefault());
|
|
8510
8510
|
})
|
|
8511
8511
|
}
|
|
8512
8512
|
)
|
|
@@ -8820,33 +8820,33 @@ var Ll = ["PageUp", "PageDown"], Ol = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
8820
8820
|
inverted: v = !1,
|
|
8821
8821
|
form: b,
|
|
8822
8822
|
...h
|
|
8823
|
-
} = e, x = u.useRef(/* @__PURE__ */ new Set()), y = u.useRef(0),
|
|
8823
|
+
} = e, x = u.useRef(/* @__PURE__ */ new Set()), y = u.useRef(0), S = i === "horizontal" ? xh : yh, [C = [], P] = mt({
|
|
8824
8824
|
prop: m,
|
|
8825
8825
|
defaultProp: d,
|
|
8826
8826
|
onChange: (O) => {
|
|
8827
|
-
var
|
|
8828
|
-
(
|
|
8827
|
+
var F;
|
|
8828
|
+
(F = [...x.current][y.current]) == null || F.focus(), p(O);
|
|
8829
8829
|
}
|
|
8830
|
-
}), R = u.useRef(
|
|
8830
|
+
}), R = u.useRef(C);
|
|
8831
8831
|
function E(O) {
|
|
8832
|
-
const M = Ph(
|
|
8832
|
+
const M = Ph(C, O);
|
|
8833
8833
|
L(O, M);
|
|
8834
8834
|
}
|
|
8835
8835
|
function w(O) {
|
|
8836
8836
|
L(O, y.current);
|
|
8837
8837
|
}
|
|
8838
|
-
function
|
|
8838
|
+
function k() {
|
|
8839
8839
|
const O = R.current[y.current];
|
|
8840
|
-
|
|
8840
|
+
C[y.current] !== O && f(C);
|
|
8841
8841
|
}
|
|
8842
|
-
function L(O, M, { commit:
|
|
8843
|
-
const D = Th(s),
|
|
8842
|
+
function L(O, M, { commit: F } = { commit: !1 }) {
|
|
8843
|
+
const D = Th(s), V = kh(Math.round((O - o) / s) * s + o, D), A = Ut(V, [o, n]);
|
|
8844
8844
|
P((I = []) => {
|
|
8845
|
-
const
|
|
8846
|
-
if (Ah(
|
|
8847
|
-
y.current =
|
|
8848
|
-
const
|
|
8849
|
-
return
|
|
8845
|
+
const T = Ch(I, A, M);
|
|
8846
|
+
if (Ah(T, c * s)) {
|
|
8847
|
+
y.current = T.indexOf(A);
|
|
8848
|
+
const z = String(T) !== String(I);
|
|
8849
|
+
return z && F && f(T), z ? T : I;
|
|
8850
8850
|
} else
|
|
8851
8851
|
return I;
|
|
8852
8852
|
});
|
|
@@ -8861,31 +8861,31 @@ var Ll = ["PageUp", "PageDown"], Ol = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
8861
8861
|
max: n,
|
|
8862
8862
|
valueIndexToChangeRef: y,
|
|
8863
8863
|
thumbs: x.current,
|
|
8864
|
-
values:
|
|
8864
|
+
values: C,
|
|
8865
8865
|
orientation: i,
|
|
8866
8866
|
form: b,
|
|
8867
8867
|
children: /* @__PURE__ */ a(_o.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ a(_o.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ a(
|
|
8868
|
-
|
|
8868
|
+
S,
|
|
8869
8869
|
{
|
|
8870
8870
|
"aria-disabled": l,
|
|
8871
8871
|
"data-disabled": l ? "" : void 0,
|
|
8872
8872
|
...h,
|
|
8873
8873
|
ref: t,
|
|
8874
8874
|
onPointerDown: Y(h.onPointerDown, () => {
|
|
8875
|
-
l || (R.current =
|
|
8875
|
+
l || (R.current = C);
|
|
8876
8876
|
}),
|
|
8877
8877
|
min: o,
|
|
8878
8878
|
max: n,
|
|
8879
8879
|
inverted: v,
|
|
8880
8880
|
onSlideStart: l ? void 0 : E,
|
|
8881
8881
|
onSlideMove: l ? void 0 : w,
|
|
8882
|
-
onSlideEnd: l ? void 0 :
|
|
8882
|
+
onSlideEnd: l ? void 0 : k,
|
|
8883
8883
|
onHomeKeyDown: () => !l && L(o, 0, { commit: !0 }),
|
|
8884
|
-
onEndKeyDown: () => !l && L(n,
|
|
8884
|
+
onEndKeyDown: () => !l && L(n, C.length - 1, { commit: !0 }),
|
|
8885
8885
|
onStepKeyDown: ({ event: O, direction: M }) => {
|
|
8886
8886
|
if (!l) {
|
|
8887
|
-
const
|
|
8888
|
-
L(I +
|
|
8887
|
+
const V = Ll.includes(O.key) || O.shiftKey && Ol.includes(O.key) ? 10 : 1, A = y.current, I = C[A], T = s * V * M;
|
|
8888
|
+
L(I + T, A, { commit: !0 });
|
|
8889
8889
|
}
|
|
8890
8890
|
}
|
|
8891
8891
|
}
|
|
@@ -8912,10 +8912,10 @@ var [$l, Fl] = Ml($t, {
|
|
|
8912
8912
|
onSlideEnd: c,
|
|
8913
8913
|
onStepKeyDown: d,
|
|
8914
8914
|
...m
|
|
8915
|
-
} = e, [p, f] = u.useState(null), v = te(t, (
|
|
8916
|
-
function N(
|
|
8917
|
-
const
|
|
8918
|
-
return b.current =
|
|
8915
|
+
} = e, [p, f] = u.useState(null), v = te(t, (S) => f(S)), b = u.useRef(void 0), h = rn(n), x = h === "ltr", y = x && !s || !x && s;
|
|
8916
|
+
function N(S) {
|
|
8917
|
+
const C = b.current || p.getBoundingClientRect(), P = [0, C.width], E = Rn(P, y ? [r, o] : [o, r]);
|
|
8918
|
+
return b.current = C, E(S - C.left);
|
|
8919
8919
|
}
|
|
8920
8920
|
return /* @__PURE__ */ a(
|
|
8921
8921
|
$l,
|
|
@@ -8936,20 +8936,20 @@ var [$l, Fl] = Ml($t, {
|
|
|
8936
8936
|
...m.style,
|
|
8937
8937
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
8938
8938
|
},
|
|
8939
|
-
onSlideStart: (
|
|
8940
|
-
const
|
|
8941
|
-
i == null || i(
|
|
8939
|
+
onSlideStart: (S) => {
|
|
8940
|
+
const C = N(S.clientX);
|
|
8941
|
+
i == null || i(C);
|
|
8942
8942
|
},
|
|
8943
|
-
onSlideMove: (
|
|
8944
|
-
const
|
|
8945
|
-
l == null || l(
|
|
8943
|
+
onSlideMove: (S) => {
|
|
8944
|
+
const C = N(S.clientX);
|
|
8945
|
+
l == null || l(C);
|
|
8946
8946
|
},
|
|
8947
8947
|
onSlideEnd: () => {
|
|
8948
8948
|
b.current = void 0, c == null || c();
|
|
8949
8949
|
},
|
|
8950
|
-
onStepKeyDown: (
|
|
8951
|
-
const P = _l[y ? "from-left" : "from-right"].includes(
|
|
8952
|
-
d == null || d({ event:
|
|
8950
|
+
onStepKeyDown: (S) => {
|
|
8951
|
+
const P = _l[y ? "from-left" : "from-right"].includes(S.key);
|
|
8952
|
+
d == null || d({ event: S, direction: P ? -1 : 1 });
|
|
8953
8953
|
}
|
|
8954
8954
|
}
|
|
8955
8955
|
)
|
|
@@ -8969,8 +8969,8 @@ var [$l, Fl] = Ml($t, {
|
|
|
8969
8969
|
...d
|
|
8970
8970
|
} = e, m = u.useRef(null), p = te(t, m), f = u.useRef(void 0), v = !n;
|
|
8971
8971
|
function b(h) {
|
|
8972
|
-
const x = f.current || m.current.getBoundingClientRect(), y = [0, x.height],
|
|
8973
|
-
return f.current = x,
|
|
8972
|
+
const x = f.current || m.current.getBoundingClientRect(), y = [0, x.height], S = Rn(y, v ? [o, r] : [r, o]);
|
|
8973
|
+
return f.current = x, S(h - x.top);
|
|
8974
8974
|
}
|
|
8975
8975
|
return /* @__PURE__ */ a(
|
|
8976
8976
|
$l,
|
|
@@ -9567,7 +9567,7 @@ var [Kr] = qe("Tooltip", [
|
|
|
9567
9567
|
E ? (c.onOpen(), document.dispatchEvent(new CustomEvent($o))) : c.onClose(), s == null || s(E);
|
|
9568
9568
|
},
|
|
9569
9569
|
caller: Gt
|
|
9570
|
-
}),
|
|
9570
|
+
}), S = u.useMemo(() => y ? x.current ? "delayed-open" : "instant-open" : "closed", [y]), C = u.useCallback(() => {
|
|
9571
9571
|
window.clearTimeout(v.current), v.current = 0, x.current = !1, N(!0);
|
|
9572
9572
|
}, [N]), P = u.useCallback(() => {
|
|
9573
9573
|
window.clearTimeout(v.current), v.current = 0, N(!1);
|
|
@@ -9584,16 +9584,16 @@ var [Kr] = qe("Tooltip", [
|
|
|
9584
9584
|
scope: t,
|
|
9585
9585
|
contentId: f,
|
|
9586
9586
|
open: y,
|
|
9587
|
-
stateAttribute:
|
|
9587
|
+
stateAttribute: S,
|
|
9588
9588
|
trigger: m,
|
|
9589
9589
|
onTriggerChange: p,
|
|
9590
9590
|
onTriggerEnter: u.useCallback(() => {
|
|
9591
|
-
c.isOpenDelayedRef.current ? R() :
|
|
9592
|
-
}, [c.isOpenDelayedRef, R,
|
|
9591
|
+
c.isOpenDelayedRef.current ? R() : C();
|
|
9592
|
+
}, [c.isOpenDelayedRef, R, C]),
|
|
9593
9593
|
onTriggerLeave: u.useCallback(() => {
|
|
9594
9594
|
b ? P() : (window.clearTimeout(v.current), v.current = 0);
|
|
9595
9595
|
}, [P, b]),
|
|
9596
|
-
onOpen:
|
|
9596
|
+
onOpen: C,
|
|
9597
9597
|
onClose: P,
|
|
9598
9598
|
disableHoverableContent: b,
|
|
9599
9599
|
children: r
|
|
@@ -9642,7 +9642,7 @@ var qh = "TooltipPortal", [ov, Xh] = Kr(qh, {
|
|
|
9642
9642
|
l(null), p(!1);
|
|
9643
9643
|
}, [p]), v = u.useCallback(
|
|
9644
9644
|
(b, h) => {
|
|
9645
|
-
const x = b.currentTarget, y = { x: b.clientX, y: b.clientY }, N = eg(y, x.getBoundingClientRect()),
|
|
9645
|
+
const x = b.currentTarget, y = { x: b.clientX, y: b.clientY }, N = eg(y, x.getBoundingClientRect()), S = tg(y, N), C = rg(h.getBoundingClientRect()), P = ng([...S, ...C]);
|
|
9646
9646
|
l(P), p(!0);
|
|
9647
9647
|
},
|
|
9648
9648
|
[p]
|
|
@@ -9657,8 +9657,8 @@ var qh = "TooltipPortal", [ov, Xh] = Kr(qh, {
|
|
|
9657
9657
|
}, [c, m, v, f]), u.useEffect(() => {
|
|
9658
9658
|
if (i) {
|
|
9659
9659
|
const b = (h) => {
|
|
9660
|
-
const x = h.target, y = { x: h.clientX, y: h.clientY }, N = (c == null ? void 0 : c.contains(x)) || (m == null ? void 0 : m.contains(x)),
|
|
9661
|
-
N ? f() :
|
|
9660
|
+
const x = h.target, y = { x: h.clientX, y: h.clientY }, N = (c == null ? void 0 : c.contains(x)) || (m == null ? void 0 : m.contains(x)), S = !og(y, i);
|
|
9661
|
+
N ? f() : S && (f(), d());
|
|
9662
9662
|
};
|
|
9663
9663
|
return document.addEventListener("pointermove", b), () => document.removeEventListener("pointermove", b);
|
|
9664
9664
|
}
|
|
@@ -11183,9 +11183,9 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11183
11183
|
"radio",
|
|
11184
11184
|
"checkbox_group",
|
|
11185
11185
|
"autocomplete"
|
|
11186
|
-
].includes(s), l = s === "field_array", c = e.locked === !0, d = s === "participation_type", m = s === "payment_method", p = s === "terms", f = s === "slider", v = s === "rating", b = s === "date_range", h = s === "sub_form", { schemaId: x, uploadTermsPdf: y } = Fe(), [N,
|
|
11186
|
+
].includes(s), l = s === "field_array", c = e.locked === !0, d = s === "participation_type", m = s === "payment_method", p = s === "terms", f = s === "slider", v = s === "rating", b = s === "date_range", h = s === "sub_form", { schemaId: x, uploadTermsPdf: y } = Fe(), [N, S] = le(
|
|
11187
11187
|
e.termoPdfUploadId ? "upload" : "link"
|
|
11188
|
-
), [
|
|
11188
|
+
), [C, P] = le({
|
|
11189
11189
|
status: "idle"
|
|
11190
11190
|
}), R = $e(null), E = se(
|
|
11191
11191
|
async (w) => {
|
|
@@ -11205,12 +11205,12 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11205
11205
|
}
|
|
11206
11206
|
P({ status: "uploading", fileName: w.name, progress: 0 });
|
|
11207
11207
|
try {
|
|
11208
|
-
const
|
|
11209
|
-
n({ termoPdfUploadId:
|
|
11210
|
-
} catch (
|
|
11208
|
+
const k = await y(w, x);
|
|
11209
|
+
n({ termoPdfUploadId: k, termoPdfUrl: void 0 }), P({ status: "idle" });
|
|
11210
|
+
} catch (k) {
|
|
11211
11211
|
P({
|
|
11212
11212
|
status: "error",
|
|
11213
|
-
message:
|
|
11213
|
+
message: k instanceof Error ? k.message : "Falha no upload do PDF."
|
|
11214
11214
|
});
|
|
11215
11215
|
}
|
|
11216
11216
|
},
|
|
@@ -11324,7 +11324,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11324
11324
|
"button",
|
|
11325
11325
|
{
|
|
11326
11326
|
type: "button",
|
|
11327
|
-
onClick: () =>
|
|
11327
|
+
onClick: () => S("link"),
|
|
11328
11328
|
className: `flex-1 text-[11px] py-1 rounded transition-colors ${N === "link" ? "bg-background shadow-sm font-medium" : "text-muted-foreground hover:text-foreground"}`,
|
|
11329
11329
|
children: "Link externo"
|
|
11330
11330
|
}
|
|
@@ -11333,7 +11333,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11333
11333
|
"button",
|
|
11334
11334
|
{
|
|
11335
11335
|
type: "button",
|
|
11336
|
-
onClick: () =>
|
|
11336
|
+
onClick: () => S("upload"),
|
|
11337
11337
|
className: `flex-1 text-[11px] py-1 rounded transition-colors ${N === "upload" ? "bg-background shadow-sm font-medium" : "text-muted-foreground hover:text-foreground"}`,
|
|
11338
11338
|
children: "Upload de PDF"
|
|
11339
11339
|
}
|
|
@@ -11351,7 +11351,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11351
11351
|
),
|
|
11352
11352
|
/* @__PURE__ */ a("p", { className: "text-[9px] text-muted-foreground", children: "URL pública de um PDF. Tem prioridade sobre o texto acima." })
|
|
11353
11353
|
] }) : /* @__PURE__ */ g("div", { className: "space-y-2", children: [
|
|
11354
|
-
e.termoPdfUploadId &&
|
|
11354
|
+
e.termoPdfUploadId && C.status === "idle" ? /* @__PURE__ */ g("div", { className: "flex items-center gap-2 rounded border border-green-500/40 bg-green-500/10 px-2 py-1.5", children: [
|
|
11355
11355
|
/* @__PURE__ */ a(_a, { className: "h-3.5 w-3.5 text-green-600 shrink-0" }),
|
|
11356
11356
|
/* @__PURE__ */ a("span", { className: "text-[11px] text-green-700 dark:text-green-400 flex-1", children: "PDF enviado ✓" }),
|
|
11357
11357
|
/* @__PURE__ */ a(
|
|
@@ -11368,20 +11368,20 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11368
11368
|
}
|
|
11369
11369
|
)
|
|
11370
11370
|
] }) : null,
|
|
11371
|
-
|
|
11371
|
+
C.status === "uploading" ? /* @__PURE__ */ g("div", { className: "space-y-1", children: [
|
|
11372
11372
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-2 text-[11px] text-muted-foreground", children: [
|
|
11373
11373
|
/* @__PURE__ */ a(zc, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
11374
|
-
/* @__PURE__ */ a("span", { className: "truncate", children:
|
|
11374
|
+
/* @__PURE__ */ a("span", { className: "truncate", children: C.fileName }),
|
|
11375
11375
|
/* @__PURE__ */ g("span", { className: "ml-auto", children: [
|
|
11376
|
-
|
|
11376
|
+
C.progress,
|
|
11377
11377
|
"%"
|
|
11378
11378
|
] })
|
|
11379
11379
|
] }),
|
|
11380
|
-
/* @__PURE__ */ a(ec, { value:
|
|
11380
|
+
/* @__PURE__ */ a(ec, { value: C.progress, className: "h-1" })
|
|
11381
11381
|
] }) : null,
|
|
11382
|
-
|
|
11382
|
+
C.status === "error" ? /* @__PURE__ */ g("div", { className: "flex items-center gap-2 rounded border border-destructive/40 bg-destructive/10 px-2 py-1.5", children: [
|
|
11383
11383
|
/* @__PURE__ */ a(dr, { className: "h-3.5 w-3.5 text-destructive shrink-0" }),
|
|
11384
|
-
/* @__PURE__ */ a("span", { className: "text-[11px] text-destructive", children:
|
|
11384
|
+
/* @__PURE__ */ a("span", { className: "text-[11px] text-destructive", children: C.message }),
|
|
11385
11385
|
/* @__PURE__ */ a(
|
|
11386
11386
|
ce,
|
|
11387
11387
|
{
|
|
@@ -11394,7 +11394,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11394
11394
|
}
|
|
11395
11395
|
)
|
|
11396
11396
|
] }) : null,
|
|
11397
|
-
|
|
11397
|
+
C.status !== "uploading" ? /* @__PURE__ */ g(me, { children: [
|
|
11398
11398
|
/* @__PURE__ */ a(
|
|
11399
11399
|
"input",
|
|
11400
11400
|
{
|
|
@@ -11404,8 +11404,8 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11404
11404
|
className: "hidden",
|
|
11405
11405
|
onChange: (w) => {
|
|
11406
11406
|
var L;
|
|
11407
|
-
const
|
|
11408
|
-
|
|
11407
|
+
const k = (L = w.target.files) == null ? void 0 : L[0];
|
|
11408
|
+
k && E(k), w.target.value = "";
|
|
11409
11409
|
}
|
|
11410
11410
|
}
|
|
11411
11411
|
),
|
|
@@ -11870,10 +11870,10 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
11870
11870
|
for (const v of p) {
|
|
11871
11871
|
if (fe(v) !== "container") continue;
|
|
11872
11872
|
const h = (((d = (c = e == null ? void 0 : e.containers) == null ? void 0 : c[v]) == null ? void 0 : d.children) || []).filter((x) => fe(x) === "field").map((x) => {
|
|
11873
|
-
var
|
|
11873
|
+
var S, C;
|
|
11874
11874
|
const y = t(x), N = { id: x, config: y };
|
|
11875
11875
|
if (y.fieldType === "field_array") {
|
|
11876
|
-
const P = ((
|
|
11876
|
+
const P = ((C = (S = e == null ? void 0 : e.containers) == null ? void 0 : S[x]) == null ? void 0 : C.children) ?? [];
|
|
11877
11877
|
N.subFields = P.filter((R) => fe(R) === "field").map((R) => ({ id: R, config: t(R) }));
|
|
11878
11878
|
}
|
|
11879
11879
|
return N;
|
|
@@ -12135,34 +12135,34 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12135
12135
|
const P = {};
|
|
12136
12136
|
v.forEach((R, E) => {
|
|
12137
12137
|
r.forEach((w) => {
|
|
12138
|
-
const
|
|
12139
|
-
w.config.required && !
|
|
12138
|
+
const k = R[w.id] ?? "";
|
|
12139
|
+
w.config.required && !k.trim() && (P[`${E}.${w.id}`] = "Campo obrigatório");
|
|
12140
12140
|
});
|
|
12141
12141
|
}), x(P);
|
|
12142
12142
|
}, [n, v, r]);
|
|
12143
12143
|
const y = (P) => {
|
|
12144
12144
|
if (!s) return;
|
|
12145
12145
|
const R = P.map((w) => {
|
|
12146
|
-
const
|
|
12146
|
+
const k = {};
|
|
12147
12147
|
return r.forEach((L) => {
|
|
12148
|
-
|
|
12149
|
-
}),
|
|
12148
|
+
k[L.id] = w[L.id] ?? "";
|
|
12149
|
+
}), k;
|
|
12150
12150
|
}), E = JSON.stringify(R);
|
|
12151
12151
|
p.current = E, s(E);
|
|
12152
12152
|
}, N = () => {
|
|
12153
12153
|
if (v.length >= c) return;
|
|
12154
12154
|
const P = [...v, f()];
|
|
12155
12155
|
b(P), y(P);
|
|
12156
|
-
},
|
|
12156
|
+
}, S = (P) => {
|
|
12157
12157
|
if (v.length <= l) return;
|
|
12158
12158
|
const R = v.filter((E, w) => w !== P);
|
|
12159
12159
|
b(R), y(R);
|
|
12160
|
-
},
|
|
12160
|
+
}, C = (P, R, E) => {
|
|
12161
12161
|
const w = v.map(
|
|
12162
|
-
(
|
|
12162
|
+
(k, L) => L === P ? { ...k, [R]: E } : k
|
|
12163
12163
|
);
|
|
12164
|
-
b(w), y(w), x((
|
|
12165
|
-
const L = { ...
|
|
12164
|
+
b(w), y(w), x((k) => {
|
|
12165
|
+
const L = { ...k };
|
|
12166
12166
|
return delete L[`${P}.${R}`], L;
|
|
12167
12167
|
});
|
|
12168
12168
|
};
|
|
@@ -12189,18 +12189,18 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12189
12189
|
variant: "ghost",
|
|
12190
12190
|
size: "icon",
|
|
12191
12191
|
className: "h-7 w-7 text-destructive/60 hover:text-destructive",
|
|
12192
|
-
onClick: () =>
|
|
12192
|
+
onClick: () => S(R),
|
|
12193
12193
|
children: /* @__PURE__ */ a(xt, { className: "h-4 w-4" })
|
|
12194
12194
|
}
|
|
12195
12195
|
)
|
|
12196
12196
|
] }),
|
|
12197
12197
|
r.length === 0 ? /* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground italic", children: "Sem sub-campos configurados" }) : /* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-3", children: r.map((E) => {
|
|
12198
|
-
const w = E.config.fieldType || "texto",
|
|
12198
|
+
const w = E.config.fieldType || "texto", k = E.config.tamanho || 6, L = P[E.id] ?? "", O = (F) => C(R, E.id, F), M = h[`${R}.${E.id}`];
|
|
12199
12199
|
return /* @__PURE__ */ g(
|
|
12200
12200
|
"div",
|
|
12201
12201
|
{
|
|
12202
12202
|
className: "space-y-1",
|
|
12203
|
-
style: { gridColumn: `span ${
|
|
12203
|
+
style: { gridColumn: `span ${k}` },
|
|
12204
12204
|
children: [
|
|
12205
12205
|
/* @__PURE__ */ g(B, { className: "text-xs font-medium", children: [
|
|
12206
12206
|
E.config.label,
|
|
@@ -12212,7 +12212,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12212
12212
|
placeholder: E.config.placeholder,
|
|
12213
12213
|
className: M ? "text-sm border-destructive" : "text-sm",
|
|
12214
12214
|
value: L,
|
|
12215
|
-
onChange: (
|
|
12215
|
+
onChange: (F) => O(F.target.value)
|
|
12216
12216
|
}
|
|
12217
12217
|
) : w === "select" ? /* @__PURE__ */ g(Re, { value: L, onValueChange: O, children: [
|
|
12218
12218
|
/* @__PURE__ */ a(
|
|
@@ -12227,20 +12227,20 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12227
12227
|
)
|
|
12228
12228
|
}
|
|
12229
12229
|
),
|
|
12230
|
-
/* @__PURE__ */ a(Ce, { children: (E.config.options || []).map((
|
|
12230
|
+
/* @__PURE__ */ a(Ce, { children: (E.config.options || []).map((F, D) => /* @__PURE__ */ a(
|
|
12231
12231
|
pe,
|
|
12232
12232
|
{
|
|
12233
|
-
value:
|
|
12234
|
-
children:
|
|
12233
|
+
value: F.value || `__opt_${D}`,
|
|
12234
|
+
children: F.label
|
|
12235
12235
|
},
|
|
12236
|
-
`${D}-${
|
|
12236
|
+
`${D}-${F.value}`
|
|
12237
12237
|
)) })
|
|
12238
12238
|
] }) : w === "checkbox" ? /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
12239
12239
|
/* @__PURE__ */ a(
|
|
12240
12240
|
ve,
|
|
12241
12241
|
{
|
|
12242
12242
|
checked: L === "true",
|
|
12243
|
-
onCheckedChange: (
|
|
12243
|
+
onCheckedChange: (F) => O(F ? "true" : "")
|
|
12244
12244
|
}
|
|
12245
12245
|
),
|
|
12246
12246
|
/* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: E.config.placeholder || E.config.label })
|
|
@@ -12251,7 +12251,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12251
12251
|
placeholder: E.config.placeholder,
|
|
12252
12252
|
className: M ? "text-sm border-destructive" : "text-sm",
|
|
12253
12253
|
value: L,
|
|
12254
|
-
onChange: (
|
|
12254
|
+
onChange: (F) => O(F.target.value)
|
|
12255
12255
|
}
|
|
12256
12256
|
),
|
|
12257
12257
|
M && /* @__PURE__ */ g("p", { className: "text-xs text-destructive flex items-center gap-1", children: [
|
|
@@ -12412,37 +12412,37 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12412
12412
|
`${v}-${f.value}`
|
|
12413
12413
|
)
|
|
12414
12414
|
) }) : d === "participation_type" ? (() => {
|
|
12415
|
-
const f = parseInt((l == null ? void 0 : l["evento.valor"]) ?? "0") || 0, v = parseInt((l == null ? void 0 : l["evento.valorPorDia"]) ?? "0") || 0, b = l == null ? void 0 : l["evento.vagasTotal"], h = l == null ? void 0 : l["evento.vagasPorDia"], x = l == null ? void 0 : l["evento.vagasMasculinas"], y = l == null ? void 0 : l["evento.vagasFemininas"], N = !!(x && Number(x) > 0) && !!(y && Number(y) > 0),
|
|
12416
|
-
((/* @__PURE__ */ new Date(
|
|
12415
|
+
const f = parseInt((l == null ? void 0 : l["evento.valor"]) ?? "0") || 0, v = parseInt((l == null ? void 0 : l["evento.valorPorDia"]) ?? "0") || 0, b = l == null ? void 0 : l["evento.vagasTotal"], h = l == null ? void 0 : l["evento.vagasPorDia"], x = l == null ? void 0 : l["evento.vagasMasculinas"], y = l == null ? void 0 : l["evento.vagasFemininas"], N = !!(x && Number(x) > 0) && !!(y && Number(y) > 0), S = l == null ? void 0 : l["evento.dataInicioEvento"], C = l == null ? void 0 : l["evento.dataFimEvento"], P = (T) => T ? T.slice(8, 10) + "/" + T.slice(5, 7) + "/" + T.slice(0, 4) : "—", R = S && C ? `${P(S)} a ${P(C)}` : "Período do evento", w = (S && C ? Math.round(
|
|
12416
|
+
((/* @__PURE__ */ new Date(C.slice(0, 10) + "T00:00:00Z")).getTime() - (/* @__PURE__ */ new Date(S.slice(0, 10) + "T00:00:00Z")).getTime()) / 864e5
|
|
12417
12417
|
) + 1 : 0) > 1;
|
|
12418
|
-
let
|
|
12418
|
+
let k = {};
|
|
12419
12419
|
try {
|
|
12420
|
-
|
|
12420
|
+
k = r ? JSON.parse(r) : {};
|
|
12421
12421
|
} catch {
|
|
12422
12422
|
}
|
|
12423
|
-
const L =
|
|
12423
|
+
const L = k.tipo ?? null, O = k.data ?? null, M = k.genero ?? null, F = (T) => o(
|
|
12424
12424
|
JSON.stringify({
|
|
12425
|
-
tipo:
|
|
12425
|
+
tipo: T,
|
|
12426
12426
|
data: null,
|
|
12427
12427
|
...N ? { genero: M } : {}
|
|
12428
12428
|
})
|
|
12429
|
-
), D = (
|
|
12429
|
+
), D = (T) => o(
|
|
12430
12430
|
JSON.stringify({
|
|
12431
12431
|
tipo: "por_dia",
|
|
12432
|
-
data:
|
|
12432
|
+
data: T,
|
|
12433
12433
|
...N ? { genero: M } : {}
|
|
12434
12434
|
})
|
|
12435
|
-
),
|
|
12436
|
-
JSON.stringify({ tipo: L, data: O, genero:
|
|
12437
|
-
),
|
|
12438
|
-
if (w &&
|
|
12439
|
-
const
|
|
12435
|
+
), V = (T) => o(
|
|
12436
|
+
JSON.stringify({ tipo: L, data: O, genero: T })
|
|
12437
|
+
), A = [];
|
|
12438
|
+
if (w && S && C) {
|
|
12439
|
+
const T = /* @__PURE__ */ new Date(S.slice(0, 10) + "T00:00:00Z"), z = /* @__PURE__ */ new Date(C.slice(0, 10) + "T00:00:00Z");
|
|
12440
12440
|
let _ = 0;
|
|
12441
|
-
for (;
|
|
12442
|
-
|
|
12441
|
+
for (; T <= z && _++ < 60; )
|
|
12442
|
+
A.push(T.toISOString().slice(0, 10)), T.setUTCDate(T.getUTCDate() + 1);
|
|
12443
12443
|
}
|
|
12444
|
-
const I = (
|
|
12445
|
-
const [
|
|
12444
|
+
const I = (T) => {
|
|
12445
|
+
const [z, _, G] = T.split("-").map(Number), ne = new Date(Date.UTC(z, _ - 1, G)), ie = String(G).padStart(2, "0"), q = String(_).padStart(2, "0"), oe = new Intl.DateTimeFormat("pt-BR", {
|
|
12446
12446
|
weekday: "long",
|
|
12447
12447
|
timeZone: "UTC"
|
|
12448
12448
|
}).format(ne);
|
|
@@ -12451,20 +12451,20 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12451
12451
|
return /* @__PURE__ */ g("div", { className: "space-y-2", children: [
|
|
12452
12452
|
N && /* @__PURE__ */ g("div", { className: "flex items-center gap-2 px-1", children: [
|
|
12453
12453
|
/* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground shrink-0", children: "Você é:" }),
|
|
12454
|
-
/* @__PURE__ */ a("div", { className: "flex gap-2", children: ["masculino", "feminino"].map((
|
|
12455
|
-
const
|
|
12454
|
+
/* @__PURE__ */ a("div", { className: "flex gap-2", children: ["masculino", "feminino"].map((T) => {
|
|
12455
|
+
const z = T === "masculino" ? "Masculino" : "Feminino";
|
|
12456
12456
|
return /* @__PURE__ */ a(
|
|
12457
12457
|
"button",
|
|
12458
12458
|
{
|
|
12459
12459
|
type: "button",
|
|
12460
|
-
onClick: () =>
|
|
12460
|
+
onClick: () => V(T),
|
|
12461
12461
|
className: U(
|
|
12462
12462
|
"px-3 py-1 rounded-full text-xs font-medium border transition-all",
|
|
12463
|
-
M ===
|
|
12463
|
+
M === T ? "border-primary bg-primary text-primary-foreground" : "border-border bg-card text-muted-foreground hover:border-primary/60"
|
|
12464
12464
|
),
|
|
12465
|
-
children:
|
|
12465
|
+
children: z
|
|
12466
12466
|
},
|
|
12467
|
-
|
|
12467
|
+
T
|
|
12468
12468
|
);
|
|
12469
12469
|
}) })
|
|
12470
12470
|
] }),
|
|
@@ -12472,7 +12472,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12472
12472
|
"button",
|
|
12473
12473
|
{
|
|
12474
12474
|
type: "button",
|
|
12475
|
-
onClick: () =>
|
|
12475
|
+
onClick: () => F("todos_os_dias"),
|
|
12476
12476
|
className: U(
|
|
12477
12477
|
"w-full text-left flex items-start gap-3 p-4 rounded-xl border-2 transition-all bg-card",
|
|
12478
12478
|
L === "todos_os_dias" ? "border-primary bg-primary/10" : "border-border hover:border-primary/40"
|
|
@@ -12516,7 +12516,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12516
12516
|
"button",
|
|
12517
12517
|
{
|
|
12518
12518
|
type: "button",
|
|
12519
|
-
onClick: () =>
|
|
12519
|
+
onClick: () => F("por_dia"),
|
|
12520
12520
|
className: U(
|
|
12521
12521
|
"w-full text-left flex items-start gap-3 p-4 rounded-xl border-2 transition-all bg-card",
|
|
12522
12522
|
L === "por_dia" ? "border-primary bg-primary/10" : "border-border hover:border-primary/40"
|
|
@@ -12555,7 +12555,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12555
12555
|
] })
|
|
12556
12556
|
]
|
|
12557
12557
|
}
|
|
12558
|
-
) :
|
|
12558
|
+
) : S ? /* @__PURE__ */ g("div", { className: "flex items-start gap-2 px-3 py-2.5 rounded-lg bg-muted/50 border border-border", children: [
|
|
12559
12559
|
/* @__PURE__ */ a(No, { className: "w-3.5 h-3.5 mt-0.5 shrink-0 text-muted-foreground" }),
|
|
12560
12560
|
/* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: 'Evento de 1 dia — a opção "Participar um dia" não é exibida.' })
|
|
12561
12561
|
] }) : /* @__PURE__ */ g("div", { className: "flex items-start gap-3 p-4 rounded-xl border-2 border-border bg-card opacity-40", children: [
|
|
@@ -12566,16 +12566,16 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12566
12566
|
] }),
|
|
12567
12567
|
/* @__PURE__ */ a("div", { className: "text-right shrink-0", children: /* @__PURE__ */ a("p", { className: "text-sm font-bold text-primary", children: "R$ —,—" }) })
|
|
12568
12568
|
] }),
|
|
12569
|
-
L === "por_dia" &&
|
|
12569
|
+
L === "por_dia" && A.length > 0 && /* @__PURE__ */ g("div", { className: "pl-2 space-y-2", children: [
|
|
12570
12570
|
/* @__PURE__ */ a("p", { className: "text-xs font-semibold text-primary uppercase tracking-wide", children: "Selecione o dia:" }),
|
|
12571
|
-
|
|
12571
|
+
A.map((T) => /* @__PURE__ */ g(
|
|
12572
12572
|
"button",
|
|
12573
12573
|
{
|
|
12574
12574
|
type: "button",
|
|
12575
|
-
onClick: () => D(
|
|
12575
|
+
onClick: () => D(T),
|
|
12576
12576
|
className: U(
|
|
12577
12577
|
"w-full text-left flex items-center justify-between px-4 py-3 rounded-lg border transition-all",
|
|
12578
|
-
O ===
|
|
12578
|
+
O === T ? "border-primary bg-primary/10 text-primary" : "border-border bg-card hover:border-primary/40"
|
|
12579
12579
|
),
|
|
12580
12580
|
children: [
|
|
12581
12581
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
|
|
@@ -12584,12 +12584,12 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12584
12584
|
{
|
|
12585
12585
|
className: U(
|
|
12586
12586
|
"w-4 h-4 rounded-full border-2 shrink-0 flex items-center justify-center",
|
|
12587
|
-
O ===
|
|
12587
|
+
O === T ? "border-primary bg-primary" : "border-muted-foreground"
|
|
12588
12588
|
),
|
|
12589
|
-
children: O ===
|
|
12589
|
+
children: O === T && /* @__PURE__ */ a("span", { className: "w-2 h-2 rounded-full bg-primary-foreground" })
|
|
12590
12590
|
}
|
|
12591
12591
|
),
|
|
12592
|
-
/* @__PURE__ */ a("span", { className: "text-sm", children: I(
|
|
12592
|
+
/* @__PURE__ */ a("span", { className: "text-sm", children: I(T) })
|
|
12593
12593
|
] }),
|
|
12594
12594
|
h && /* @__PURE__ */ g("span", { className: "text-xs text-emerald-500", children: [
|
|
12595
12595
|
h,
|
|
@@ -12597,7 +12597,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12597
12597
|
] })
|
|
12598
12598
|
]
|
|
12599
12599
|
},
|
|
12600
|
-
|
|
12600
|
+
T
|
|
12601
12601
|
))
|
|
12602
12602
|
] })
|
|
12603
12603
|
] });
|
|
@@ -12608,10 +12608,10 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12608
12608
|
h = b ? JSON.parse(b) : {};
|
|
12609
12609
|
} catch {
|
|
12610
12610
|
}
|
|
12611
|
-
const x = h.tipo ?? null, y = Number((l == null ? void 0 : l["evento.valor"]) ?? 0) || 0, N = Number((l == null ? void 0 : l["evento.valorPorDia"]) ?? 0) || 0,
|
|
12611
|
+
const x = h.tipo ?? null, y = Number((l == null ? void 0 : l["evento.valor"]) ?? 0) || 0, N = Number((l == null ? void 0 : l["evento.valorPorDia"]) ?? 0) || 0, S = x === "por_dia" && N > 0 ? N : y, C = x === "por_dia" ? (() => {
|
|
12612
12612
|
if (!h.data) return "Um dia";
|
|
12613
|
-
const [
|
|
12614
|
-
return `${O}/${L}/${
|
|
12613
|
+
const [k, L, O] = h.data.split("-");
|
|
12614
|
+
return `${O}/${L}/${k}`;
|
|
12615
12615
|
})() : "Todos os dias", P = x === "por_dia" ? [
|
|
12616
12616
|
{
|
|
12617
12617
|
id: "pix",
|
|
@@ -12671,22 +12671,22 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12671
12671
|
R = r ? JSON.parse(r) : {};
|
|
12672
12672
|
} catch {
|
|
12673
12673
|
}
|
|
12674
|
-
const E = R.metodo ?? null, w = (
|
|
12675
|
-
const L = Math.round(
|
|
12676
|
-
metodo:
|
|
12674
|
+
const E = R.metodo ?? null, w = (k) => {
|
|
12675
|
+
const L = Math.round(S * (1 + k.taxa) * 100) / 100, O = {
|
|
12676
|
+
metodo: k.id,
|
|
12677
12677
|
valorTotal: L
|
|
12678
12678
|
};
|
|
12679
|
-
|
|
12679
|
+
k.parcelas > 1 && (O.parcelas = k.parcelas), o(JSON.stringify(O));
|
|
12680
12680
|
};
|
|
12681
12681
|
return /* @__PURE__ */ g("div", { className: "space-y-4", children: [
|
|
12682
12682
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between rounded-xl border border-border bg-card px-4 py-3", children: [
|
|
12683
12683
|
/* @__PURE__ */ g("div", { children: [
|
|
12684
12684
|
/* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: "Tipo de participação" }),
|
|
12685
|
-
/* @__PURE__ */ a("p", { className: "font-semibold", children:
|
|
12685
|
+
/* @__PURE__ */ a("p", { className: "font-semibold", children: C })
|
|
12686
12686
|
] }),
|
|
12687
12687
|
/* @__PURE__ */ g("div", { className: "text-right", children: [
|
|
12688
12688
|
/* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: "Valor base" }),
|
|
12689
|
-
/* @__PURE__ */ a("p", { className: "text-lg font-bold text-primary", children: St(
|
|
12689
|
+
/* @__PURE__ */ a("p", { className: "text-lg font-bold text-primary", children: St(S) })
|
|
12690
12690
|
] })
|
|
12691
12691
|
] }),
|
|
12692
12692
|
/* @__PURE__ */ g("div", { className: "flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2.5", children: [
|
|
@@ -12698,13 +12698,13 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12698
12698
|
] })
|
|
12699
12699
|
] }),
|
|
12700
12700
|
/* @__PURE__ */ a("p", { className: "text-sm font-semibold text-primary", children: "Selecione a forma de pagamento:" }),
|
|
12701
|
-
/* @__PURE__ */ a("div", { className: "space-y-3", children: P.map((
|
|
12702
|
-
const L = E ===
|
|
12701
|
+
/* @__PURE__ */ a("div", { className: "space-y-3", children: P.map((k) => {
|
|
12702
|
+
const L = E === k.id, O = Math.round(S * (1 + k.taxa) * 100) / 100, M = k.parcelas > 1, F = M ? Math.round(O / k.parcelas * 100) / 100 : null;
|
|
12703
12703
|
return /* @__PURE__ */ g(
|
|
12704
12704
|
"button",
|
|
12705
12705
|
{
|
|
12706
12706
|
type: "button",
|
|
12707
|
-
onClick: () => w(
|
|
12707
|
+
onClick: () => w(k),
|
|
12708
12708
|
className: U(
|
|
12709
12709
|
"w-full text-left flex items-center gap-4 px-4 py-3 rounded-xl border-2 transition-all bg-card",
|
|
12710
12710
|
L ? "border-primary bg-primary/10" : "border-border hover:border-primary/50"
|
|
@@ -12729,27 +12729,27 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
12729
12729
|
}
|
|
12730
12730
|
),
|
|
12731
12731
|
/* @__PURE__ */ g("div", { className: "flex-1 min-w-0", children: [
|
|
12732
|
-
/* @__PURE__ */ a("p", { className: "font-semibold text-sm leading-tight", children:
|
|
12733
|
-
/* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children:
|
|
12734
|
-
|
|
12732
|
+
/* @__PURE__ */ a("p", { className: "font-semibold text-sm leading-tight", children: k.label }),
|
|
12733
|
+
/* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: k.desc }),
|
|
12734
|
+
k.taxaLabel && /* @__PURE__ */ g("p", { className: "text-xs text-amber-400 mt-0.5", children: [
|
|
12735
12735
|
"* ",
|
|
12736
|
-
|
|
12736
|
+
k.taxaLabel
|
|
12737
12737
|
] }),
|
|
12738
|
-
|
|
12738
|
+
k.taxa > 0 && /* @__PURE__ */ g("p", { className: "text-xs text-muted-foreground", children: [
|
|
12739
12739
|
"Total com taxa: ",
|
|
12740
12740
|
St(O)
|
|
12741
12741
|
] })
|
|
12742
12742
|
] }),
|
|
12743
12743
|
/* @__PURE__ */ a("div", { className: "text-right shrink-0", children: M ? /* @__PURE__ */ g(me, { children: [
|
|
12744
12744
|
/* @__PURE__ */ g("p", { className: "text-xs text-muted-foreground", children: [
|
|
12745
|
-
|
|
12745
|
+
k.parcelas,
|
|
12746
12746
|
"x de"
|
|
12747
12747
|
] }),
|
|
12748
|
-
/* @__PURE__ */ a("p", { className: "text-base font-bold text-primary", children: St(
|
|
12748
|
+
/* @__PURE__ */ a("p", { className: "text-base font-bold text-primary", children: St(F) })
|
|
12749
12749
|
] }) : /* @__PURE__ */ a("p", { className: "text-base font-bold text-primary", children: St(O) }) })
|
|
12750
12750
|
]
|
|
12751
12751
|
},
|
|
12752
|
-
|
|
12752
|
+
k.id
|
|
12753
12753
|
);
|
|
12754
12754
|
}) })
|
|
12755
12755
|
] });
|
|
@@ -13204,19 +13204,19 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13204
13204
|
}, [h, l, c]);
|
|
13205
13205
|
const x = se(
|
|
13206
13206
|
(O, M) => {
|
|
13207
|
-
var
|
|
13207
|
+
var F;
|
|
13208
13208
|
if (i((D) => ({ ...D, [O]: M })), v) {
|
|
13209
|
-
const D = (
|
|
13209
|
+
const D = (F = n[h]) == null ? void 0 : F.containers.flatMap((V) => V.fields).find((V) => V.id === O);
|
|
13210
13210
|
if (D) {
|
|
13211
|
-
const
|
|
13211
|
+
const V = Sa(
|
|
13212
13212
|
M,
|
|
13213
13213
|
D.config,
|
|
13214
13214
|
{ ...s, [O]: M },
|
|
13215
13215
|
e
|
|
13216
13216
|
);
|
|
13217
|
-
f((
|
|
13218
|
-
const I = { ...
|
|
13219
|
-
return
|
|
13217
|
+
f((A) => {
|
|
13218
|
+
const I = { ...A };
|
|
13219
|
+
return V ? I[O] = V : delete I[O], I;
|
|
13220
13220
|
});
|
|
13221
13221
|
}
|
|
13222
13222
|
}
|
|
@@ -13235,16 +13235,16 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13235
13235
|
if (!O) return !0;
|
|
13236
13236
|
const M = {};
|
|
13237
13237
|
for (const D of O.containers)
|
|
13238
|
-
for (const
|
|
13239
|
-
if (
|
|
13238
|
+
for (const V of D.fields) {
|
|
13239
|
+
if (V.config.fieldType === "field_array") {
|
|
13240
13240
|
let I = !1;
|
|
13241
13241
|
try {
|
|
13242
|
-
const
|
|
13243
|
-
if (
|
|
13244
|
-
M[
|
|
13242
|
+
const T = s[V.id], z = T ? JSON.parse(T) : [], _ = V.config.minItems ?? 1;
|
|
13243
|
+
if (z.length < _)
|
|
13244
|
+
M[V.id] = `Mínimo de ${_} item${_ !== 1 ? "s" : ""} obrigatório${_ !== 1 ? "s" : ""}`, I = !0;
|
|
13245
13245
|
else {
|
|
13246
|
-
for (const G of
|
|
13247
|
-
for (const ne of
|
|
13246
|
+
for (const G of z) {
|
|
13247
|
+
for (const ne of V.subFields ?? []) {
|
|
13248
13248
|
const ie = G[ne.id] ?? "";
|
|
13249
13249
|
if (ne.config.required && !ie.trim()) {
|
|
13250
13250
|
I = !0;
|
|
@@ -13253,24 +13253,24 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13253
13253
|
}
|
|
13254
13254
|
if (I) break;
|
|
13255
13255
|
}
|
|
13256
|
-
I && (M[
|
|
13256
|
+
I && (M[V.id] = "Preencha todos os campos obrigatórios");
|
|
13257
13257
|
}
|
|
13258
13258
|
} catch {
|
|
13259
|
-
|
|
13259
|
+
V.config.required && (M[V.id] = "Campo obrigatório");
|
|
13260
13260
|
}
|
|
13261
13261
|
continue;
|
|
13262
13262
|
}
|
|
13263
|
-
const
|
|
13264
|
-
s[
|
|
13265
|
-
|
|
13263
|
+
const A = Sa(
|
|
13264
|
+
s[V.id] || "",
|
|
13265
|
+
V.config,
|
|
13266
13266
|
s,
|
|
13267
13267
|
e
|
|
13268
13268
|
);
|
|
13269
|
-
|
|
13269
|
+
A && (M[V.id] = A);
|
|
13270
13270
|
}
|
|
13271
13271
|
f(M), b(!0);
|
|
13272
|
-
const
|
|
13273
|
-
return
|
|
13272
|
+
const F = Object.keys(M).length;
|
|
13273
|
+
return F > 0 ? (console.warn(`Corrija ${F} campo(s) destacado(s) antes de continuar`), !1) : !0;
|
|
13274
13274
|
}, [n, h, s, e, f, b]), N = se(() => {
|
|
13275
13275
|
y() && (b(!1), f({}), h >= n.length - 1 ? m(!0) : c((O) => O + 1));
|
|
13276
13276
|
}, [
|
|
@@ -13281,13 +13281,13 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13281
13281
|
f,
|
|
13282
13282
|
m,
|
|
13283
13283
|
c
|
|
13284
|
-
]),
|
|
13284
|
+
]), S = se(() => {
|
|
13285
13285
|
c((O) => O - 1), b(!1), f({});
|
|
13286
|
-
}, [c, b, f]),
|
|
13286
|
+
}, [c, b, f]), C = se(() => {
|
|
13287
13287
|
const O = {};
|
|
13288
13288
|
for (const M of n)
|
|
13289
|
-
for (const
|
|
13290
|
-
for (const D of
|
|
13289
|
+
for (const F of M.containers)
|
|
13290
|
+
for (const D of F.fields)
|
|
13291
13291
|
to(D.config.condition, s, e) && (O[D.id] = uc(D.config, D.subFields));
|
|
13292
13292
|
i((M) => ({ ...M, ...O }));
|
|
13293
13293
|
}, [n, s, e, i]), P = se(() => {
|
|
@@ -13299,9 +13299,9 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13299
13299
|
return /* @__PURE__ */ a("div", { className: "rounded-lg border border-dashed border-border/40 p-6 text-center text-xs text-muted-foreground/50", children: "Adicione steps, containers e campos para ver o preview ao vivo" });
|
|
13300
13300
|
if (d)
|
|
13301
13301
|
return /* @__PURE__ */ a(Ig, { onRestart: R });
|
|
13302
|
-
const E = n[h], w = n.length,
|
|
13302
|
+
const E = n[h], w = n.length, k = h === w - 1, L = ed(o);
|
|
13303
13303
|
return /* @__PURE__ */ g("div", { className: "space-y-3", children: [
|
|
13304
|
-
/* @__PURE__ */ a("div", { className: "px-1", children: /* @__PURE__ */ a(Sg, { onFillMock:
|
|
13304
|
+
/* @__PURE__ */ a("div", { className: "px-1", children: /* @__PURE__ */ a(Sg, { onFillMock: C, onClear: P }) }),
|
|
13305
13305
|
/* @__PURE__ */ a(
|
|
13306
13306
|
td,
|
|
13307
13307
|
{
|
|
@@ -13335,8 +13335,8 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13335
13335
|
kg,
|
|
13336
13336
|
{
|
|
13337
13337
|
currentStep: h,
|
|
13338
|
-
isLastStep:
|
|
13339
|
-
onBack:
|
|
13338
|
+
isLastStep: k,
|
|
13339
|
+
onBack: S,
|
|
13340
13340
|
onNext: N
|
|
13341
13341
|
}
|
|
13342
13342
|
)
|
|
@@ -13348,80 +13348,82 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13348
13348
|
id: e,
|
|
13349
13349
|
currentTamanho: t,
|
|
13350
13350
|
inicioColuna: r,
|
|
13351
|
-
onResize: o
|
|
13351
|
+
onResize: o,
|
|
13352
|
+
pushSnapshot: n
|
|
13352
13353
|
}) => {
|
|
13353
|
-
const
|
|
13354
|
+
const s = $e(null), [i, l] = le(!1), [c, d] = le(null), m = $e(null);
|
|
13354
13355
|
rt(() => () => {
|
|
13355
|
-
var
|
|
13356
|
-
(
|
|
13356
|
+
var f;
|
|
13357
|
+
(f = m.current) == null || f.call(m);
|
|
13357
13358
|
}, []);
|
|
13358
|
-
const
|
|
13359
|
-
|
|
13360
|
-
const
|
|
13361
|
-
if (!f) return;
|
|
13362
|
-
const v = f.parentElement;
|
|
13359
|
+
const p = se((f) => {
|
|
13360
|
+
f.preventDefault(), f.stopPropagation(), n == null || n();
|
|
13361
|
+
const v = s.current;
|
|
13363
13362
|
if (!v) return;
|
|
13364
|
-
const b = v.
|
|
13365
|
-
|
|
13366
|
-
const
|
|
13367
|
-
|
|
13368
|
-
|
|
13363
|
+
const b = v.parentElement;
|
|
13364
|
+
if (!b) return;
|
|
13365
|
+
const h = b.getBoundingClientRect().width, x = v.getBoundingClientRect().width, y = f.clientX, N = r ? 13 - r : 12;
|
|
13366
|
+
l(!0);
|
|
13367
|
+
const S = (P) => {
|
|
13368
|
+
const R = P.clientX - y, w = (x + R) / h, k = Math.max(1, Math.min(N, Math.round(w * 12)));
|
|
13369
|
+
d(k), o(k);
|
|
13369
13370
|
}, C = () => {
|
|
13370
|
-
|
|
13371
|
+
l(!1), d(null), m.current = null, window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", C);
|
|
13371
13372
|
};
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
}, window.addEventListener("mousemove",
|
|
13375
|
-
}, [r, o]);
|
|
13376
|
-
return { resizeRef:
|
|
13373
|
+
m.current = () => {
|
|
13374
|
+
l(!1), d(null), window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", C);
|
|
13375
|
+
}, window.addEventListener("mousemove", S), window.addEventListener("mouseup", C);
|
|
13376
|
+
}, [r, o, n]);
|
|
13377
|
+
return { resizeRef: s, resizing: i, resizePreview: c, handleResizeStart: p };
|
|
13377
13378
|
}, Dg = ({
|
|
13378
13379
|
id: e,
|
|
13379
13380
|
elementRef: t,
|
|
13380
13381
|
onPositionApply: r,
|
|
13381
13382
|
setPositionDrag: o,
|
|
13382
|
-
setSelected: n
|
|
13383
|
+
setSelected: n,
|
|
13384
|
+
pushSnapshot: s
|
|
13383
13385
|
}) => {
|
|
13384
|
-
const
|
|
13386
|
+
const i = $e(null);
|
|
13385
13387
|
return rt(() => () => {
|
|
13386
|
-
var
|
|
13387
|
-
(
|
|
13388
|
+
var c;
|
|
13389
|
+
(c = i.current) == null || c.call(i);
|
|
13388
13390
|
}, []), { handlePositionMouseDown: se(
|
|
13389
|
-
(
|
|
13390
|
-
|
|
13391
|
-
const
|
|
13392
|
-
if (!c) return;
|
|
13393
|
-
const d = c.parentElement;
|
|
13391
|
+
(c) => {
|
|
13392
|
+
c.preventDefault(), c.stopPropagation(), s == null || s(), n(e);
|
|
13393
|
+
const d = t.current;
|
|
13394
13394
|
if (!d) return;
|
|
13395
|
-
const m = d.
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
|
|
13395
|
+
const m = d.parentElement;
|
|
13396
|
+
if (!m) return;
|
|
13397
|
+
const p = m.getBoundingClientRect(), f = p.width / 12, v = d.getBoundingClientRect(), b = Math.max(1, Math.round(v.width / f)), h = v.left - p.left, x = c.clientX - v.left, y = (P) => {
|
|
13398
|
+
const R = P - p.left - x, E = Math.round(R / f) + 1;
|
|
13399
|
+
return Math.max(1, Math.min(13 - b, E));
|
|
13400
|
+
}, N = Math.max(
|
|
13399
13401
|
1,
|
|
13400
|
-
Math.min(12, Math.round(
|
|
13402
|
+
Math.min(12, Math.round(h / f) + 1)
|
|
13401
13403
|
);
|
|
13402
13404
|
o({
|
|
13403
13405
|
itemId: e,
|
|
13404
|
-
ghostStart:
|
|
13405
|
-
ghostSpan:
|
|
13406
|
-
cursorX:
|
|
13407
|
-
cursorY:
|
|
13406
|
+
ghostStart: N,
|
|
13407
|
+
ghostSpan: b,
|
|
13408
|
+
cursorX: c.clientX,
|
|
13409
|
+
cursorY: c.clientY
|
|
13408
13410
|
});
|
|
13409
|
-
const
|
|
13411
|
+
const S = (P) => {
|
|
13410
13412
|
o({
|
|
13411
13413
|
itemId: e,
|
|
13412
|
-
ghostStart:
|
|
13413
|
-
ghostSpan:
|
|
13414
|
-
cursorX:
|
|
13415
|
-
cursorY:
|
|
13414
|
+
ghostStart: y(P.clientX),
|
|
13415
|
+
ghostSpan: b,
|
|
13416
|
+
cursorX: P.clientX,
|
|
13417
|
+
cursorY: P.clientY
|
|
13416
13418
|
});
|
|
13417
|
-
}, C = (
|
|
13418
|
-
r(
|
|
13419
|
+
}, C = (P) => {
|
|
13420
|
+
r(y(P.clientX)), o(null), i.current = null, window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", C);
|
|
13419
13421
|
};
|
|
13420
|
-
|
|
13421
|
-
o(null), window.removeEventListener("mousemove",
|
|
13422
|
-
}, window.addEventListener("mousemove",
|
|
13422
|
+
i.current = () => {
|
|
13423
|
+
o(null), window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", C);
|
|
13424
|
+
}, window.addEventListener("mousemove", S), window.addEventListener("mouseup", C);
|
|
13423
13425
|
},
|
|
13424
|
-
[e, t, r, o, n]
|
|
13426
|
+
[e, t, r, o, n, s]
|
|
13425
13427
|
) };
|
|
13426
13428
|
}, ro = ({
|
|
13427
13429
|
id: e,
|
|
@@ -13444,50 +13446,53 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13444
13446
|
updateConfig: p,
|
|
13445
13447
|
removeItem: f,
|
|
13446
13448
|
setPositionDrag: v,
|
|
13447
|
-
positionDrag: b
|
|
13448
|
-
|
|
13449
|
+
positionDrag: b,
|
|
13450
|
+
pushSnapshot: h
|
|
13451
|
+
} = Fe(), x = m(e), y = sd(e), N = (y == null ? void 0 : y.icon) || Aa, S = c === e, C = x.tamanho || 6, P = (b == null ? void 0 : b.itemId) === e, [R, E] = le(!1), w = "var(--t-primary, hsl(var(--primary)))", k = S ? w : R ? `color-mix(in srgb, ${w} 60%, transparent)` : `color-mix(in srgb, ${w} 25%, transparent)`, L = S ? `0 0 0 2px color-mix(in srgb, ${w} 30%, transparent)` : void 0, { resizeRef: O, resizing: M, resizePreview: F, handleResizeStart: D } = pc({
|
|
13449
13452
|
id: e,
|
|
13450
13453
|
currentTamanho: C,
|
|
13451
|
-
inicioColuna:
|
|
13452
|
-
onResize: (
|
|
13453
|
-
|
|
13454
|
+
inicioColuna: x.inicioColuna,
|
|
13455
|
+
onResize: (A) => p(e, { tamanho: A }),
|
|
13456
|
+
pushSnapshot: h
|
|
13457
|
+
}), { handlePositionMouseDown: V } = Dg({
|
|
13454
13458
|
id: e,
|
|
13455
|
-
elementRef:
|
|
13456
|
-
onPositionApply: (
|
|
13459
|
+
elementRef: O,
|
|
13460
|
+
onPositionApply: (A) => p(e, { inicioColuna: A }),
|
|
13457
13461
|
setPositionDrag: v,
|
|
13458
|
-
setSelected: d
|
|
13462
|
+
setSelected: d,
|
|
13463
|
+
pushSnapshot: h
|
|
13459
13464
|
});
|
|
13460
13465
|
return /* @__PURE__ */ g(
|
|
13461
13466
|
"div",
|
|
13462
13467
|
{
|
|
13463
|
-
ref: (
|
|
13464
|
-
n(
|
|
13468
|
+
ref: (A) => {
|
|
13469
|
+
n(A), O.current = A;
|
|
13465
13470
|
},
|
|
13466
|
-
onClick: (
|
|
13467
|
-
|
|
13471
|
+
onClick: (A) => {
|
|
13472
|
+
A.stopPropagation(), d(e);
|
|
13468
13473
|
},
|
|
13469
13474
|
"data-field-id": e,
|
|
13470
|
-
onMouseEnter: () =>
|
|
13471
|
-
onMouseLeave: () =>
|
|
13475
|
+
onMouseEnter: () => E(!0),
|
|
13476
|
+
onMouseLeave: () => E(!1),
|
|
13472
13477
|
className: U(
|
|
13473
13478
|
"relative flex items-center gap-2 rounded border bg-card/80 backdrop-blur-sm px-2.5 pt-1.5 pb-3.5 cursor-pointer transition-all text-xs",
|
|
13474
|
-
|
|
13475
|
-
|
|
13479
|
+
M && "ring-2 ring-blue-400/50",
|
|
13480
|
+
P && "opacity-0 pointer-events-none"
|
|
13476
13481
|
),
|
|
13477
13482
|
style: {
|
|
13478
|
-
gridColumn:
|
|
13483
|
+
gridColumn: x.inicioColuna ? `${x.inicioColuna} / span ${C}` : `span ${C}`,
|
|
13479
13484
|
transform: qt.Transform.toString(s),
|
|
13480
13485
|
transition: i,
|
|
13481
13486
|
opacity: l ? 0 : 1,
|
|
13482
|
-
borderColor:
|
|
13483
|
-
boxShadow:
|
|
13487
|
+
borderColor: k,
|
|
13488
|
+
boxShadow: L
|
|
13484
13489
|
},
|
|
13485
13490
|
children: [
|
|
13486
13491
|
/* @__PURE__ */ a(
|
|
13487
13492
|
"div",
|
|
13488
13493
|
{
|
|
13489
|
-
onMouseDown:
|
|
13490
|
-
onClick: (
|
|
13494
|
+
onMouseDown: V,
|
|
13495
|
+
onClick: (A) => A.stopPropagation(),
|
|
13491
13496
|
className: "cursor-ew-resize shrink-0 p-0.5 rounded hover:bg-primary/20 transition-colors",
|
|
13492
13497
|
title: "Arrastar para mudar coluna",
|
|
13493
13498
|
children: /* @__PURE__ */ a(Xc, { className: "h-3 w-3 text-primary/60" })
|
|
@@ -13499,26 +13504,26 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13499
13504
|
...o,
|
|
13500
13505
|
...r,
|
|
13501
13506
|
className: "cursor-grab shrink-0",
|
|
13502
|
-
onClick: (
|
|
13507
|
+
onClick: (A) => A.stopPropagation(),
|
|
13503
13508
|
children: /* @__PURE__ */ a(bt, { className: "h-3 w-3 text-primary" })
|
|
13504
13509
|
}
|
|
13505
13510
|
),
|
|
13506
|
-
/* @__PURE__ */ a(
|
|
13507
|
-
/* @__PURE__ */ a("span", { className: "font-medium truncate flex-1", children:
|
|
13508
|
-
|
|
13509
|
-
|
|
13511
|
+
/* @__PURE__ */ a(N, { className: "h-3.5 w-3.5 text-primary shrink-0" }),
|
|
13512
|
+
/* @__PURE__ */ a("span", { className: "font-medium truncate flex-1", children: x.label }),
|
|
13513
|
+
x.condition && /* @__PURE__ */ a(Ma, { className: "h-3 w-3 text-amber-500 shrink-0" }),
|
|
13514
|
+
x.required && /* @__PURE__ */ a("span", { className: "text-destructive font-bold", children: "*" }),
|
|
13510
13515
|
/* @__PURE__ */ g("span", { className: "text-[9px] text-muted-foreground shrink-0", children: [
|
|
13511
|
-
|
|
13516
|
+
F ?? C,
|
|
13512
13517
|
"/12"
|
|
13513
13518
|
] }),
|
|
13514
13519
|
/* @__PURE__ */ a(
|
|
13515
13520
|
"button",
|
|
13516
13521
|
{
|
|
13517
|
-
onClick: (
|
|
13518
|
-
|
|
13522
|
+
onClick: (A) => {
|
|
13523
|
+
A.stopPropagation(), f(e);
|
|
13519
13524
|
},
|
|
13520
13525
|
className: "transition-opacity shrink-0 p-0.5 rounded hover:bg-destructive/10",
|
|
13521
|
-
style: { opacity:
|
|
13526
|
+
style: { opacity: R ? 1 : 0 },
|
|
13522
13527
|
children: /* @__PURE__ */ a(xt, { className: "h-3 w-3 text-destructive" })
|
|
13523
13528
|
}
|
|
13524
13529
|
),
|
|
@@ -13527,7 +13532,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13527
13532
|
"div",
|
|
13528
13533
|
{
|
|
13529
13534
|
"data-resize": !0,
|
|
13530
|
-
onMouseDown:
|
|
13535
|
+
onMouseDown: D,
|
|
13531
13536
|
className: "cursor-col-resize absolute right-0 top-0 bottom-0 w-2 hover:bg-primary/20 transition-colors flex items-center justify-center",
|
|
13532
13537
|
children: /* @__PURE__ */ a(Da, { className: "h-3 w-3 text-primary/40 rotate-90" })
|
|
13533
13538
|
}
|
|
@@ -13559,7 +13564,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13559
13564
|
removeItem: v,
|
|
13560
13565
|
moveItem: b,
|
|
13561
13566
|
containers: h
|
|
13562
|
-
} = Fe(), x = f(e), N = (((P = h[e]) == null ? void 0 : P.children) ?? []).filter((R) => fe(R) === "field"),
|
|
13567
|
+
} = Fe(), x = f(e), N = (((P = h[e]) == null ? void 0 : P.children) ?? []).filter((R) => fe(R) === "field"), S = m === e, C = x.tamanho || 12;
|
|
13563
13568
|
return /* @__PURE__ */ g(
|
|
13564
13569
|
"div",
|
|
13565
13570
|
{
|
|
@@ -13570,10 +13575,10 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13570
13575
|
className: U(
|
|
13571
13576
|
"group/fa relative rounded-lg border overflow-hidden transition-all",
|
|
13572
13577
|
l && "opacity-0 pointer-events-none",
|
|
13573
|
-
|
|
13578
|
+
S ? "border-amber-500 ring-2 ring-amber-500/20 shadow-lg" : "border-amber-500/30 hover:border-amber-500/55"
|
|
13574
13579
|
),
|
|
13575
13580
|
style: {
|
|
13576
|
-
gridColumn: x.inicioColuna ? `${x.inicioColuna} / span ${
|
|
13581
|
+
gridColumn: x.inicioColuna ? `${x.inicioColuna} / span ${C}` : `span ${C}`,
|
|
13577
13582
|
transform: qt.Transform.toString(s),
|
|
13578
13583
|
transition: i
|
|
13579
13584
|
},
|
|
@@ -13583,7 +13588,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13583
13588
|
{
|
|
13584
13589
|
className: U(
|
|
13585
13590
|
"flex items-center gap-1.5 border-b px-2 py-1.5 transition-colors",
|
|
13586
|
-
|
|
13591
|
+
S ? "bg-amber-500/15 border-amber-500/30" : "bg-amber-500/10 border-amber-500/20"
|
|
13587
13592
|
),
|
|
13588
13593
|
children: [
|
|
13589
13594
|
/* @__PURE__ */ a(
|
|
@@ -13695,73 +13700,73 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13695
13700
|
let b = !1;
|
|
13696
13701
|
const h = () => {
|
|
13697
13702
|
d.current = null, window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", y);
|
|
13698
|
-
}, x = (
|
|
13699
|
-
const P = Math.abs(
|
|
13700
|
-
P < Ra && R < Ra || (b = !0, h(), P >= R ? N(
|
|
13703
|
+
}, x = (C) => {
|
|
13704
|
+
const P = Math.abs(C.clientX - f), R = Math.abs(C.clientY - v);
|
|
13705
|
+
P < Ra && R < Ra || (b = !0, h(), P >= R ? N(C) : S(C));
|
|
13701
13706
|
}, y = () => {
|
|
13702
13707
|
b || h();
|
|
13703
13708
|
};
|
|
13704
13709
|
window.addEventListener("mousemove", x), window.addEventListener("mouseup", y), d.current = h;
|
|
13705
|
-
const N = (
|
|
13710
|
+
const N = (C) => {
|
|
13706
13711
|
const P = t.current;
|
|
13707
13712
|
if (!P) return;
|
|
13708
13713
|
const R = P.parentElement;
|
|
13709
13714
|
if (!R) return;
|
|
13710
|
-
const E = R.getBoundingClientRect(),
|
|
13715
|
+
const E = R.getBoundingClientRect(), k = E.width / 12, { tamanho: L } = c.current, O = P.getBoundingClientRect(), M = O.left - E.left, F = Math.max(
|
|
13711
13716
|
1,
|
|
13712
|
-
Math.min(12, Math.round(M /
|
|
13717
|
+
Math.min(12, Math.round(M / k) + 1)
|
|
13713
13718
|
), D = O.left;
|
|
13714
13719
|
s({
|
|
13715
13720
|
itemId: e,
|
|
13716
|
-
ghostStart:
|
|
13721
|
+
ghostStart: F,
|
|
13717
13722
|
ghostSpan: L,
|
|
13718
|
-
cursorX:
|
|
13719
|
-
cursorY:
|
|
13723
|
+
cursorX: C.clientX,
|
|
13724
|
+
cursorY: C.clientY
|
|
13720
13725
|
});
|
|
13721
|
-
const
|
|
13722
|
-
const
|
|
13726
|
+
const V = (T) => {
|
|
13727
|
+
const z = T - D, _ = Math.round(z / k) + 1;
|
|
13723
13728
|
return Math.max(1, Math.min(13 - L, _));
|
|
13724
13729
|
};
|
|
13725
13730
|
s({
|
|
13726
13731
|
itemId: e,
|
|
13727
|
-
ghostStart:
|
|
13732
|
+
ghostStart: V(C.clientX),
|
|
13728
13733
|
ghostSpan: L,
|
|
13729
|
-
cursorX:
|
|
13730
|
-
cursorY:
|
|
13734
|
+
cursorX: C.clientX,
|
|
13735
|
+
cursorY: C.clientY
|
|
13731
13736
|
});
|
|
13732
|
-
const
|
|
13737
|
+
const A = (T) => {
|
|
13733
13738
|
s({
|
|
13734
13739
|
itemId: e,
|
|
13735
|
-
ghostStart:
|
|
13740
|
+
ghostStart: V(T.clientX),
|
|
13736
13741
|
ghostSpan: L,
|
|
13737
|
-
cursorX:
|
|
13738
|
-
cursorY:
|
|
13742
|
+
cursorX: T.clientX,
|
|
13743
|
+
cursorY: T.clientY
|
|
13739
13744
|
});
|
|
13740
|
-
}, I = (
|
|
13741
|
-
n(
|
|
13745
|
+
}, I = (T) => {
|
|
13746
|
+
n(V(T.clientX)), s(null), d.current = null, window.removeEventListener("mousemove", A), window.removeEventListener("mouseup", I);
|
|
13742
13747
|
};
|
|
13743
|
-
window.addEventListener("mousemove",
|
|
13744
|
-
s(null), window.removeEventListener("mousemove",
|
|
13748
|
+
window.addEventListener("mousemove", A), window.addEventListener("mouseup", I), d.current = () => {
|
|
13749
|
+
s(null), window.removeEventListener("mousemove", A), window.removeEventListener("mouseup", I);
|
|
13745
13750
|
};
|
|
13746
|
-
},
|
|
13751
|
+
}, S = (C) => {
|
|
13747
13752
|
const P = l, R = t.current;
|
|
13748
13753
|
if (!R) return;
|
|
13749
13754
|
const E = R.parentElement;
|
|
13750
13755
|
if (!E) return;
|
|
13751
13756
|
const w = P.dataAttribute || "data-container-id";
|
|
13752
13757
|
P.pushSnapshot(), P.setReorderDrag({ draggingId: e });
|
|
13753
|
-
let
|
|
13758
|
+
let k = C.clientY;
|
|
13754
13759
|
const L = (M) => {
|
|
13755
|
-
const
|
|
13760
|
+
const F = Array.from(E.children).filter(
|
|
13756
13761
|
(D) => D !== R && D.getAttribute(w)
|
|
13757
13762
|
);
|
|
13758
|
-
for (const D of
|
|
13759
|
-
const
|
|
13760
|
-
if (M.clientY <
|
|
13761
|
-
P.moveItemNoSnapshot(e, "up"),
|
|
13763
|
+
for (const D of F) {
|
|
13764
|
+
const V = D.getBoundingClientRect(), A = V.top + V.height / 2;
|
|
13765
|
+
if (M.clientY < A && M.clientY > V.top && M.clientY < k) {
|
|
13766
|
+
P.moveItemNoSnapshot(e, "up"), k = M.clientY;
|
|
13762
13767
|
break;
|
|
13763
|
-
} else if (M.clientY >
|
|
13764
|
-
P.moveItemNoSnapshot(e, "down"),
|
|
13768
|
+
} else if (M.clientY > A && M.clientY < V.bottom && M.clientY > k) {
|
|
13769
|
+
P.moveItemNoSnapshot(e, "down"), k = M.clientY;
|
|
13765
13770
|
break;
|
|
13766
13771
|
}
|
|
13767
13772
|
}
|
|
@@ -13834,11 +13839,12 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13834
13839
|
setReorderDrag: b,
|
|
13835
13840
|
pushSnapshot: h,
|
|
13836
13841
|
containers: x
|
|
13837
|
-
} = Fe(), y = i(e), N = ((ie = x[e]) == null ? void 0 : ie.children) ?? [],
|
|
13842
|
+
} = Fe(), y = i(e), N = ((ie = x[e]) == null ? void 0 : ie.children) ?? [], S = N.filter((q) => fe(q) === "field"), C = n === e, P = y.tamanho || 12, R = (f == null ? void 0 : f.itemId) === e, E = (v == null ? void 0 : v.draggingId) === e, w = f && N.includes(f.itemId), k = n && N.includes(n) && fe(n) === "field", [L, O] = le(!1), M = "var(--t-primary, hsl(var(--primary)))", F = C ? M : L ? "rgba(59,130,246,0.55)" : "rgba(59,130,246,0.3)", D = C ? `color-mix(in srgb, ${M} 15%, transparent)` : L ? "rgba(59,130,246,0.12)" : "rgba(59,130,246,0.07)", V = C ? `color-mix(in srgb, ${M} 30%, transparent)` : L ? "rgba(59,130,246,0.28)" : "rgba(59,130,246,0.18)", A = C ? `0 0 0 3px color-mix(in srgb, ${M} 20%, transparent)` : L ? "0 0 0 2px rgba(59,130,246,0.25)" : void 0, { resizeRef: I, resizing: T, resizePreview: z, handleResizeStart: _ } = pc({
|
|
13838
13843
|
id: e,
|
|
13839
13844
|
currentTamanho: P,
|
|
13840
13845
|
inicioColuna: y.inicioColuna,
|
|
13841
|
-
onResize: (q) => l(e, { tamanho: q })
|
|
13846
|
+
onResize: (q) => l(e, { tamanho: q }),
|
|
13847
|
+
pushSnapshot: h
|
|
13842
13848
|
}), G = ot(
|
|
13843
13849
|
() => ({
|
|
13844
13850
|
kind: "custom",
|
|
@@ -13872,7 +13878,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13872
13878
|
onMouseLeave: () => O(!1),
|
|
13873
13879
|
className: U(
|
|
13874
13880
|
"relative rounded-lg border overflow-hidden transition-all",
|
|
13875
|
-
|
|
13881
|
+
T && "ring-2 ring-blue-400/50",
|
|
13876
13882
|
R && "opacity-0 pointer-events-none",
|
|
13877
13883
|
E && "opacity-50"
|
|
13878
13884
|
),
|
|
@@ -13880,8 +13886,8 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13880
13886
|
style: {
|
|
13881
13887
|
gridColumn: y.inicioColuna ? `${y.inicioColuna} / span ${P}` : `span ${P}`,
|
|
13882
13888
|
minWidth: "80px",
|
|
13883
|
-
borderColor:
|
|
13884
|
-
boxShadow:
|
|
13889
|
+
borderColor: F,
|
|
13890
|
+
boxShadow: A
|
|
13885
13891
|
},
|
|
13886
13892
|
children: [
|
|
13887
13893
|
/* @__PURE__ */ g(
|
|
@@ -13890,7 +13896,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13890
13896
|
className: "flex items-center gap-1.5 border-b px-2 py-1.5 transition-colors",
|
|
13891
13897
|
style: {
|
|
13892
13898
|
backgroundColor: D,
|
|
13893
|
-
borderColor:
|
|
13899
|
+
borderColor: V
|
|
13894
13900
|
},
|
|
13895
13901
|
children: [
|
|
13896
13902
|
/* @__PURE__ */ a(
|
|
@@ -13940,7 +13946,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13940
13946
|
y.showAsCard && /* @__PURE__ */ a(Yc, { className: "h-3 w-3 text-blue-400 shrink-0" }),
|
|
13941
13947
|
y.showLabel === !1 && /* @__PURE__ */ a(Ia, { className: "h-3 w-3 text-muted-foreground/50 shrink-0" }),
|
|
13942
13948
|
/* @__PURE__ */ g("span", { className: "text-[10px] text-muted-foreground shrink-0 bg-blue-500/10 px-1.5 rounded", children: [
|
|
13943
|
-
|
|
13949
|
+
z ?? P,
|
|
13944
13950
|
"/12"
|
|
13945
13951
|
] }),
|
|
13946
13952
|
/* @__PURE__ */ a(
|
|
@@ -13964,7 +13970,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13964
13970
|
ref: r,
|
|
13965
13971
|
className: U(
|
|
13966
13972
|
"relative p-2 min-h-[40px] gap-1.5 transition-all duration-150",
|
|
13967
|
-
o ? "bg-primary/15 ring-2 ring-inset ring-primary/50" : (w ||
|
|
13973
|
+
o ? "bg-primary/15 ring-2 ring-inset ring-primary/50" : (w || k) && "bg-muted/30"
|
|
13968
13974
|
),
|
|
13969
13975
|
style: {
|
|
13970
13976
|
display: "grid",
|
|
@@ -13975,7 +13981,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13975
13981
|
/* @__PURE__ */ a(
|
|
13976
13982
|
fc,
|
|
13977
13983
|
{
|
|
13978
|
-
showGuides: !!w || !!
|
|
13984
|
+
showGuides: !!w || !!k,
|
|
13979
13985
|
positionDrag: w ? f : null
|
|
13980
13986
|
}
|
|
13981
13987
|
),
|
|
@@ -13987,7 +13993,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
13987
13993
|
children: "Arraste campos aqui"
|
|
13988
13994
|
}
|
|
13989
13995
|
),
|
|
13990
|
-
/* @__PURE__ */ a(qo, { items:
|
|
13996
|
+
/* @__PURE__ */ a(qo, { items: S, strategy: $a, children: N.filter((q) => fe(q) === "field").map((q) => i(q).fieldType === "field_array" ? /* @__PURE__ */ a(
|
|
13991
13997
|
$g,
|
|
13992
13998
|
{
|
|
13993
13999
|
id: q,
|
|
@@ -14039,7 +14045,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
14039
14045
|
container: t,
|
|
14040
14046
|
index: r
|
|
14041
14047
|
}) => {
|
|
14042
|
-
var
|
|
14048
|
+
var F;
|
|
14043
14049
|
const {
|
|
14044
14050
|
attributes: o,
|
|
14045
14051
|
listeners: n,
|
|
@@ -14054,7 +14060,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
14054
14060
|
removeItem: b,
|
|
14055
14061
|
containers: h,
|
|
14056
14062
|
positionDrag: x
|
|
14057
|
-
} = Fe(), y = v(e), N = ((
|
|
14063
|
+
} = Fe(), y = v(e), N = ((F = h[e]) == null ? void 0 : F.children) ?? [], S = p === e, C = x && N.includes(x.itemId), [P, R] = le(!1), E = "var(--t-primary, hsl(var(--primary)))", w = S ? E : P ? `color-mix(in srgb, ${E} 60%, transparent)` : `color-mix(in srgb, ${E} 25%, transparent)`, k = S ? `color-mix(in srgb, ${E} 14%, transparent)` : P ? `color-mix(in srgb, ${E} 10%, transparent)` : `color-mix(in srgb, ${E} 6%, transparent)`, L = S ? `color-mix(in srgb, ${E} 28%, transparent)` : `color-mix(in srgb, ${E} 15%, transparent)`, O = S ? `0 0 0 3px color-mix(in srgb, ${E} 20%, transparent)` : void 0, M = {
|
|
14058
14064
|
transform: qt.Transform.toString(i),
|
|
14059
14065
|
transition: l,
|
|
14060
14066
|
opacity: c ? 0 : 1
|
|
@@ -14082,7 +14088,7 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
14082
14088
|
{
|
|
14083
14089
|
className: "flex items-center gap-2 border-b px-3 py-2",
|
|
14084
14090
|
style: {
|
|
14085
|
-
backgroundColor:
|
|
14091
|
+
backgroundColor: k,
|
|
14086
14092
|
borderColor: L
|
|
14087
14093
|
},
|
|
14088
14094
|
children: [
|
|
@@ -14137,8 +14143,8 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
14137
14143
|
/* @__PURE__ */ a(
|
|
14138
14144
|
fc,
|
|
14139
14145
|
{
|
|
14140
|
-
showGuides: !!
|
|
14141
|
-
positionDrag:
|
|
14146
|
+
showGuides: !!C,
|
|
14147
|
+
positionDrag: C ? x : null
|
|
14142
14148
|
}
|
|
14143
14149
|
),
|
|
14144
14150
|
N.length === 0 && /* @__PURE__ */ a(
|
|
@@ -14402,17 +14408,17 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
14402
14408
|
var v, b;
|
|
14403
14409
|
const m = o(c), f = (((b = (v = e == null ? void 0 : e.containers) == null ? void 0 : v[c]) == null ? void 0 : b.children) || []).filter((h) => fe(h) === "container").map((h, x) => {
|
|
14404
14410
|
var P, R;
|
|
14405
|
-
const y = o(h),
|
|
14411
|
+
const y = o(h), S = (((R = (P = e == null ? void 0 : e.containers) == null ? void 0 : P[h]) == null ? void 0 : R.children) || []).filter((E) => fe(E) === "field").map((E, w) => {
|
|
14406
14412
|
var O, M;
|
|
14407
|
-
const
|
|
14413
|
+
const k = o(E), L = Bo(k, E, w);
|
|
14408
14414
|
if (L.tipo === be.FIELD_ARRAY) {
|
|
14409
|
-
const
|
|
14410
|
-
L.subFields =
|
|
14411
|
-
(D,
|
|
14415
|
+
const F = ((M = (O = e == null ? void 0 : e.containers) == null ? void 0 : O[E]) == null ? void 0 : M.children) ?? [];
|
|
14416
|
+
L.subFields = F.filter((D) => fe(D) === "field").map(
|
|
14417
|
+
(D, V) => Bo(o(D), D, V)
|
|
14412
14418
|
);
|
|
14413
14419
|
}
|
|
14414
14420
|
return L;
|
|
14415
|
-
}),
|
|
14421
|
+
}), C = {
|
|
14416
14422
|
id: h,
|
|
14417
14423
|
titulo: y.label || "Container",
|
|
14418
14424
|
descricao: y.description,
|
|
@@ -14423,9 +14429,9 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
14423
14429
|
inicioColuna: y.inicioColuna,
|
|
14424
14430
|
showLabel: y.showLabel,
|
|
14425
14431
|
showAsCard: y.showAsCard,
|
|
14426
|
-
campos:
|
|
14432
|
+
campos: S
|
|
14427
14433
|
};
|
|
14428
|
-
return y.condition && (
|
|
14434
|
+
return y.condition && (C.condicional = gc(y.condition)), C;
|
|
14429
14435
|
});
|
|
14430
14436
|
return {
|
|
14431
14437
|
id: c,
|
|
@@ -14587,14 +14593,14 @@ const pg = ({ value: e, onChange: t }) => {
|
|
|
14587
14593
|
}
|
|
14588
14594
|
for (const y of x) {
|
|
14589
14595
|
if (fe(y) !== "container") continue;
|
|
14590
|
-
const N = n(y).label || y,
|
|
14591
|
-
for (const P of
|
|
14596
|
+
const N = n(y).label || y, S = ((f = (p = e == null ? void 0 : e.containers) == null ? void 0 : p[y]) == null ? void 0 : f.children) || [], C = /* @__PURE__ */ new Map();
|
|
14597
|
+
for (const P of S) {
|
|
14592
14598
|
if (fe(P) !== "field") continue;
|
|
14593
14599
|
i.add(P);
|
|
14594
14600
|
const R = n(P).name || P;
|
|
14595
|
-
|
|
14601
|
+
C.has(R) || C.set(R, []), C.get(R).push(P);
|
|
14596
14602
|
}
|
|
14597
|
-
for (const [P, R] of
|
|
14603
|
+
for (const [P, R] of C.entries())
|
|
14598
14604
|
R.length > 1 && r.push(
|
|
14599
14605
|
`Nome duplicado "${P}" no container "${N}" (IDs: ${R.join(", ")}).`
|
|
14600
14606
|
);
|