@1urso/generic-editor 0.1.24 → 0.1.25

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.
@@ -20,6 +20,167 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
20
20
  value: n,
21
21
  enumerable: !0
22
22
  }) : E, n)), __toCommonJS = (n) => __copyProps(__defProp({}, "__esModule", { value: !0 }), n);
23
+ function _objectWithoutPropertiesLoose(n, _) {
24
+ if (n == null) return {};
25
+ var E = {}, O = Object.keys(n), A, j;
26
+ for (j = 0; j < O.length; j++) A = O[j], !(_.indexOf(A) >= 0) && (E[A] = n[A]);
27
+ return E;
28
+ }
29
+ var _excluded$T = ["color"], CheckIcon = /* @__PURE__ */ forwardRef(function(n, _) {
30
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$T);
31
+ return createElement("svg", Object.assign({
32
+ width: "15",
33
+ height: "15",
34
+ viewBox: "0 0 15 15",
35
+ fill: "none",
36
+ xmlns: "http://www.w3.org/2000/svg"
37
+ }, A, { ref: _ }), createElement("path", {
38
+ d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
39
+ fill: O,
40
+ fillRule: "evenodd",
41
+ clipRule: "evenodd"
42
+ }));
43
+ }), _excluded$Y = ["color"], ChevronRightIcon = /* @__PURE__ */ forwardRef(function(n, _) {
44
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$Y);
45
+ return createElement("svg", Object.assign({
46
+ width: "15",
47
+ height: "15",
48
+ viewBox: "0 0 15 15",
49
+ fill: "none",
50
+ xmlns: "http://www.w3.org/2000/svg"
51
+ }, A, { ref: _ }), createElement("path", {
52
+ d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",
53
+ fill: O,
54
+ fillRule: "evenodd",
55
+ clipRule: "evenodd"
56
+ }));
57
+ }), _excluded$1r = ["color"], Cross2Icon = /* @__PURE__ */ forwardRef(function(n, _) {
58
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$1r);
59
+ return createElement("svg", Object.assign({
60
+ width: "15",
61
+ height: "15",
62
+ viewBox: "0 0 15 15",
63
+ fill: "none",
64
+ xmlns: "http://www.w3.org/2000/svg"
65
+ }, A, { ref: _ }), createElement("path", {
66
+ d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
67
+ fill: O,
68
+ fillRule: "evenodd",
69
+ clipRule: "evenodd"
70
+ }));
71
+ }), _excluded$1M = ["color"], DoubleArrowLeftIcon = /* @__PURE__ */ forwardRef(function(n, _) {
72
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$1M);
73
+ return createElement("svg", Object.assign({
74
+ width: "15",
75
+ height: "15",
76
+ viewBox: "0 0 15 15",
77
+ fill: "none",
78
+ xmlns: "http://www.w3.org/2000/svg"
79
+ }, A, { ref: _ }), createElement("path", {
80
+ d: "M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",
81
+ fill: O,
82
+ fillRule: "evenodd",
83
+ clipRule: "evenodd"
84
+ }));
85
+ }), _excluded$1N = ["color"], DoubleArrowRightIcon = /* @__PURE__ */ forwardRef(function(n, _) {
86
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$1N);
87
+ return createElement("svg", Object.assign({
88
+ width: "15",
89
+ height: "15",
90
+ viewBox: "0 0 15 15",
91
+ fill: "none",
92
+ xmlns: "http://www.w3.org/2000/svg"
93
+ }, A, { ref: _ }), createElement("path", {
94
+ d: "M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",
95
+ fill: O,
96
+ fillRule: "evenodd",
97
+ clipRule: "evenodd"
98
+ }));
99
+ }), _excluded$25 = ["color"], EyeNoneIcon = /* @__PURE__ */ forwardRef(function(n, _) {
100
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$25);
101
+ return createElement("svg", Object.assign({
102
+ width: "15",
103
+ height: "15",
104
+ viewBox: "0 0 15 15",
105
+ fill: "none",
106
+ xmlns: "http://www.w3.org/2000/svg"
107
+ }, A, { ref: _ }), createElement("path", {
108
+ d: "M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z",
109
+ fill: O,
110
+ fillRule: "evenodd",
111
+ clipRule: "evenodd"
112
+ }));
113
+ }), _excluded$26 = ["color"], EyeOpenIcon = /* @__PURE__ */ forwardRef(function(n, _) {
114
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$26);
115
+ return createElement("svg", Object.assign({
116
+ width: "15",
117
+ height: "15",
118
+ viewBox: "0 0 15 15",
119
+ fill: "none",
120
+ xmlns: "http://www.w3.org/2000/svg"
121
+ }, A, { ref: _ }), createElement("path", {
122
+ d: "M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",
123
+ fill: O,
124
+ fillRule: "evenodd",
125
+ clipRule: "evenodd"
126
+ }));
127
+ }), _excluded$2l = ["color"], GearIcon = /* @__PURE__ */ forwardRef(function(n, _) {
128
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$2l);
129
+ return createElement("svg", Object.assign({
130
+ width: "15",
131
+ height: "15",
132
+ viewBox: "0 0 15 15",
133
+ fill: "none",
134
+ xmlns: "http://www.w3.org/2000/svg"
135
+ }, A, { ref: _ }), createElement("path", {
136
+ d: "M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z",
137
+ fill: O,
138
+ fillRule: "evenodd",
139
+ clipRule: "evenodd"
140
+ }));
141
+ }), _excluded$3x = ["color"], PlusIcon = /* @__PURE__ */ forwardRef(function(n, _) {
142
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$3x);
143
+ return createElement("svg", Object.assign({
144
+ width: "15",
145
+ height: "15",
146
+ viewBox: "0 0 15 15",
147
+ fill: "none",
148
+ xmlns: "http://www.w3.org/2000/svg"
149
+ }, A, { ref: _ }), createElement("path", {
150
+ d: "M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",
151
+ fill: O,
152
+ fillRule: "evenodd",
153
+ clipRule: "evenodd"
154
+ }));
155
+ }), _excluded$3V = ["color"], Share1Icon = /* @__PURE__ */ forwardRef(function(n, _) {
156
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$3V);
157
+ return createElement("svg", Object.assign({
158
+ width: "15",
159
+ height: "15",
160
+ viewBox: "0 0 15 15",
161
+ fill: "none",
162
+ xmlns: "http://www.w3.org/2000/svg"
163
+ }, A, { ref: _ }), createElement("path", {
164
+ d: "M5 7.50003C5 8.32845 4.32843 9.00003 3.5 9.00003C2.67157 9.00003 2 8.32845 2 7.50003C2 6.6716 2.67157 6.00003 3.5 6.00003C4.32843 6.00003 5 6.6716 5 7.50003ZM5.71313 8.66388C5.29445 9.45838 4.46048 10 3.5 10C2.11929 10 1 8.88074 1 7.50003C1 6.11931 2.11929 5.00003 3.5 5.00003C4.46048 5.00003 5.29445 5.54167 5.71313 6.33616L9.10424 4.21671C9.03643 3.98968 9 3.74911 9 3.50003C9 2.11932 10.1193 1.00003 11.5 1.00003C12.8807 1.00003 14 2.11932 14 3.50003C14 4.88074 12.8807 6.00003 11.5 6.00003C10.6915 6.00003 9.97264 5.61624 9.51566 5.0209L5.9853 7.22738C5.99502 7.31692 6 7.40789 6 7.50003C6 7.59216 5.99502 7.68312 5.9853 7.77267L9.51567 9.97915C9.97265 9.38382 10.6915 9.00003 11.5 9.00003C12.8807 9.00003 14 10.1193 14 11.5C14 12.8807 12.8807 14 11.5 14C10.1193 14 9 12.8807 9 11.5C9 11.2509 9.03643 11.0104 9.10425 10.7833L5.71313 8.66388ZM11.5 5.00003C12.3284 5.00003 13 4.32846 13 3.50003C13 2.6716 12.3284 2.00003 11.5 2.00003C10.6716 2.00003 10 2.6716 10 3.50003C10 4.32846 10.6716 5.00003 11.5 5.00003ZM13 11.5C13 12.3285 12.3284 13 11.5 13C10.6716 13 10 12.3285 10 11.5C10 10.6716 10.6716 10 11.5 10C12.3284 10 13 10.6716 13 11.5Z",
165
+ fill: O,
166
+ fillRule: "evenodd",
167
+ clipRule: "evenodd"
168
+ }));
169
+ }), _excluded$4G = ["color"], TrashIcon = /* @__PURE__ */ forwardRef(function(n, _) {
170
+ var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$4G);
171
+ return createElement("svg", Object.assign({
172
+ width: "15",
173
+ height: "15",
174
+ viewBox: "0 0 15 15",
175
+ fill: "none",
176
+ xmlns: "http://www.w3.org/2000/svg"
177
+ }, A, { ref: _ }), createElement("path", {
178
+ d: "M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",
179
+ fill: O,
180
+ fillRule: "evenodd",
181
+ clipRule: "evenodd"
182
+ }));
183
+ });
23
184
  function setRef(n, _) {
24
185
  if (typeof n == "function") return n(_);
25
186
  n != null && (n.current = _);
@@ -433,15 +594,15 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
433
594
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
434
595
  branches: /* @__PURE__ */ new Set()
435
596
  }), DismissableLayer = React$1.forwardRef((_, E) => {
436
- let { disableOutsidePointerEvents: O = !1, onEscapeKeyDown: A, onPointerDownOutside: j, onFocusOutside: M, onInteractOutside: N, onDismiss: P, ...z } = _, B = React$1.useContext(DismissableLayerContext), [H, U] = React$1.useState(null), W = H?.ownerDocument ?? globalThis?.document, [, G] = React$1.useState({}), Z = useComposedRefs(E, (n) => U(n)), GA = Array.from(B.layers), [KA] = [...B.layersWithOutsidePointerEventsDisabled].slice(-1), qA = GA.indexOf(KA), JA = H ? GA.indexOf(H) : -1, YA = B.layersWithOutsidePointerEventsDisabled.size > 0, XA = JA >= qA, ZA = usePointerDownOutside((n) => {
597
+ let { disableOutsidePointerEvents: O = !1, onEscapeKeyDown: A, onPointerDownOutside: j, onFocusOutside: M, onInteractOutside: N, onDismiss: P, ...z } = _, B = React$1.useContext(DismissableLayerContext), [H, U] = React$1.useState(null), W = H?.ownerDocument ?? globalThis?.document, [, G] = React$1.useState({}), Z = useComposedRefs(E, (n) => U(n)), JA = Array.from(B.layers), [YA] = [...B.layersWithOutsidePointerEventsDisabled].slice(-1), XA = JA.indexOf(YA), ZA = H ? JA.indexOf(H) : -1, QA = B.layersWithOutsidePointerEventsDisabled.size > 0, $A = ZA >= XA, ej = usePointerDownOutside((n) => {
437
598
  let _ = n.target, E = [...B.branches].some((n) => n.contains(_));
438
- !XA || E || (j?.(n), N?.(n), n.defaultPrevented || P?.());
439
- }, W), $A = useFocusOutside((n) => {
599
+ !$A || E || (j?.(n), N?.(n), n.defaultPrevented || P?.());
600
+ }, W), nj = useFocusOutside((n) => {
440
601
  let _ = n.target;
441
602
  [...B.branches].some((n) => n.contains(_)) || (M?.(n), N?.(n), n.defaultPrevented || P?.());
442
603
  }, W);
443
604
  return useEscapeKeydown((n) => {
444
- JA === B.layers.size - 1 && (A?.(n), !n.defaultPrevented && P && (n.preventDefault(), P()));
605
+ ZA === B.layers.size - 1 && (A?.(n), !n.defaultPrevented && P && (n.preventDefault(), P()));
445
606
  }, W), React$1.useEffect(() => {
446
607
  if (H) return O && (B.layersWithOutsidePointerEventsDisabled.size === 0 && (originalBodyPointerEvents = W.body.style.pointerEvents, W.body.style.pointerEvents = "none"), B.layersWithOutsidePointerEventsDisabled.add(H)), B.layers.add(H), dispatchUpdate(), () => {
447
608
  O && B.layersWithOutsidePointerEventsDisabled.size === 1 && (W.body.style.pointerEvents = originalBodyPointerEvents);
@@ -460,12 +621,12 @@ var DISMISSABLE_LAYER_NAME = "DismissableLayer", CONTEXT_UPDATE = "dismissableLa
460
621
  ...z,
461
622
  ref: Z,
462
623
  style: {
463
- pointerEvents: YA ? XA ? "auto" : "none" : void 0,
624
+ pointerEvents: QA ? $A ? "auto" : "none" : void 0,
464
625
  ..._.style
465
626
  },
466
- onFocusCapture: composeEventHandlers(_.onFocusCapture, $A.onFocusCapture),
467
- onBlurCapture: composeEventHandlers(_.onBlurCapture, $A.onBlurCapture),
468
- onPointerDownCapture: composeEventHandlers(_.onPointerDownCapture, ZA.onPointerDownCapture)
627
+ onFocusCapture: composeEventHandlers(_.onFocusCapture, nj.onFocusCapture),
628
+ onBlurCapture: composeEventHandlers(_.onBlurCapture, nj.onBlurCapture),
629
+ onPointerDownCapture: composeEventHandlers(_.onPointerDownCapture, ej.onPointerDownCapture)
469
630
  });
470
631
  });
471
632
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
@@ -824,7 +985,7 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
824
985
  onScrollCapture: nothing,
825
986
  onWheelCapture: nothing,
826
987
  onTouchMoveCapture: nothing
827
- }), j = A[0], M = A[1], N = _.forwardProps, P = _.children, z = _.className, B = _.removeScrollBar, H = _.enabled, U = _.shards, W = _.sideCar, G = _.noRelative, Z = _.noIsolation, GA = _.inert, KA = _.allowPinchZoom, qA = _.as, JA = qA === void 0 ? "div" : qA, YA = _.gapMode, XA = __rest(_, [
988
+ }), j = A[0], M = A[1], N = _.forwardProps, P = _.children, z = _.className, B = _.removeScrollBar, H = _.enabled, U = _.shards, W = _.sideCar, G = _.noRelative, Z = _.noIsolation, JA = _.inert, YA = _.allowPinchZoom, XA = _.as, ZA = XA === void 0 ? "div" : XA, QA = _.gapMode, $A = __rest(_, [
828
989
  "forwardProps",
829
990
  "children",
830
991
  "className",
@@ -838,21 +999,21 @@ var effectCar = createSidecarMedium(), nothing = function() {}, RemoveScroll = R
838
999
  "allowPinchZoom",
839
1000
  "as",
840
1001
  "gapMode"
841
- ]), ZA = W, QA = useMergeRefs([O, E]), $A = __assign$2(__assign$2({}, XA), j);
842
- return React$1.createElement(React$1.Fragment, null, H && React$1.createElement(ZA, {
1002
+ ]), ej = W, tj = useMergeRefs([O, E]), nj = __assign$2(__assign$2({}, $A), j);
1003
+ return React$1.createElement(React$1.Fragment, null, H && React$1.createElement(ej, {
843
1004
  sideCar: effectCar,
844
1005
  removeScrollBar: B,
845
1006
  shards: U,
846
1007
  noRelative: G,
847
1008
  noIsolation: Z,
848
- inert: GA,
1009
+ inert: JA,
849
1010
  setCallbacks: M,
850
- allowPinchZoom: !!KA,
1011
+ allowPinchZoom: !!YA,
851
1012
  lockRef: O,
852
- gapMode: YA
853
- }), N ? React$1.cloneElement(React$1.Children.only(P), __assign$2(__assign$2({}, $A), { ref: QA })) : React$1.createElement(JA, __assign$2({}, $A, {
1013
+ gapMode: QA
1014
+ }), N ? React$1.cloneElement(React$1.Children.only(P), __assign$2(__assign$2({}, nj), { ref: tj })) : React$1.createElement(ZA, __assign$2({}, nj, {
854
1015
  className: z,
855
- ref: QA
1016
+ ref: tj
856
1017
  }), P));
857
1018
  });
858
1019
  RemoveScroll.defaultProps = {
@@ -1042,8 +1203,8 @@ var nonPassive = passiveSupported ? { passive: !1 } : !1, alwaysContainsScroll =
1042
1203
  if (!N) break;
1043
1204
  var W = getScrollVariables(n, N), G = W[0], Z = W[1] - W[2] - j * G;
1044
1205
  (G || Z) && elementCouldBeScrolled(n, N) && (H += Z, U += G);
1045
- var GA = N.parentNode;
1046
- N = GA && GA.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? GA.host : GA;
1206
+ var JA = N.parentNode;
1207
+ N = JA && JA.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? JA.host : JA;
1047
1208
  } while (!P && N !== document.body || P && (_.contains(N) || _ === N));
1048
1209
  return (B && (A && Math.abs(H) < 1 || !A && M > H) || !B && (A && Math.abs(U) < 1 || !A && -M > U)) && (z = !0), z;
1049
1210
  }, getTouchXY = function(n) {
@@ -1590,7 +1751,7 @@ var computePosition$1 = async (n, _, E) => {
1590
1751
  strategy: A
1591
1752
  }), { x: B, y: H } = computeCoordsFromPlacement(z, O, P), U = O, W = {}, G = 0;
1592
1753
  for (let E = 0; E < N.length; E++) {
1593
- let { name: j, fn: Z } = N[E], { x: GA, y: KA, data: qA, reset: JA } = await Z({
1754
+ let { name: j, fn: Z } = N[E], { x: JA, y: YA, data: XA, reset: ZA } = await Z({
1594
1755
  x: B,
1595
1756
  y: H,
1596
1757
  initialPlacement: O,
@@ -1604,17 +1765,17 @@ var computePosition$1 = async (n, _, E) => {
1604
1765
  floating: _
1605
1766
  }
1606
1767
  });
1607
- B = GA ?? B, H = KA ?? H, W = {
1768
+ B = JA ?? B, H = YA ?? H, W = {
1608
1769
  ...W,
1609
1770
  [j]: {
1610
1771
  ...W[j],
1611
- ...qA
1772
+ ...XA
1612
1773
  }
1613
- }, JA && G <= 50 && (G++, typeof JA == "object" && (JA.placement && (U = JA.placement), JA.rects && (z = JA.rects === !0 ? await M.getElementRects({
1774
+ }, ZA && G <= 50 && (G++, typeof ZA == "object" && (ZA.placement && (U = ZA.placement), ZA.rects && (z = ZA.rects === !0 ? await M.getElementRects({
1614
1775
  reference: n,
1615
1776
  floating: _,
1616
1777
  strategy: A
1617
- }) : JA.rects), {x: B, y: H} = computeCoordsFromPlacement(z, U, P)), E = -1);
1778
+ }) : ZA.rects), {x: B, y: H} = computeCoordsFromPlacement(z, U, P)), E = -1);
1618
1779
  }
1619
1780
  return {
1620
1781
  x: B,
@@ -1631,25 +1792,25 @@ async function detectOverflow$1(n, _) {
1631
1792
  boundary: P,
1632
1793
  rootBoundary: z,
1633
1794
  strategy: N
1634
- })), GA = B === "floating" ? {
1795
+ })), JA = B === "floating" ? {
1635
1796
  x: E,
1636
1797
  y: O,
1637
1798
  width: j.floating.width,
1638
1799
  height: j.floating.height
1639
- } : j.reference, KA = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(M.floating)), qA = await (A.isElement == null ? void 0 : A.isElement(KA)) && await (A.getScale == null ? void 0 : A.getScale(KA)) || {
1800
+ } : j.reference, YA = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(M.floating)), XA = await (A.isElement == null ? void 0 : A.isElement(YA)) && await (A.getScale == null ? void 0 : A.getScale(YA)) || {
1640
1801
  x: 1,
1641
1802
  y: 1
1642
- }, JA = rectToClientRect(A.convertOffsetParentRelativeRectToViewportRelativeRect ? await A.convertOffsetParentRelativeRectToViewportRelativeRect({
1803
+ }, ZA = rectToClientRect(A.convertOffsetParentRelativeRectToViewportRelativeRect ? await A.convertOffsetParentRelativeRectToViewportRelativeRect({
1643
1804
  elements: M,
1644
- rect: GA,
1645
- offsetParent: KA,
1805
+ rect: JA,
1806
+ offsetParent: YA,
1646
1807
  strategy: N
1647
- }) : GA);
1808
+ }) : JA);
1648
1809
  return {
1649
- top: (Z.top - JA.top + W.top) / qA.y,
1650
- bottom: (JA.bottom - Z.bottom + W.bottom) / qA.y,
1651
- left: (Z.left - JA.left + W.left) / qA.x,
1652
- right: (JA.right - Z.right + W.right) / qA.x
1810
+ top: (Z.top - ZA.top + W.top) / XA.y,
1811
+ bottom: (ZA.bottom - Z.bottom + W.bottom) / XA.y,
1812
+ left: (Z.left - ZA.left + W.left) / XA.x,
1813
+ right: (ZA.right - Z.right + W.right) / XA.x
1653
1814
  };
1654
1815
  }
1655
1816
  var arrow$2 = (n) => ({
@@ -1661,17 +1822,17 @@ var arrow$2 = (n) => ({
1661
1822
  let H = getPaddingObject(B), U = {
1662
1823
  x: E,
1663
1824
  y: O
1664
- }, W = getAlignmentAxis(A), G = getAxisLength(W), Z = await M.getDimensions(z), GA = W === "y", KA = GA ? "top" : "left", qA = GA ? "bottom" : "right", JA = GA ? "clientHeight" : "clientWidth", YA = j.reference[G] + j.reference[W] - U[W] - j.floating[G], XA = U[W] - j.reference[W], ZA = await (M.getOffsetParent == null ? void 0 : M.getOffsetParent(z)), QA = ZA ? ZA[JA] : 0;
1665
- (!QA || !await (M.isElement == null ? void 0 : M.isElement(ZA))) && (QA = N.floating[JA] || j.floating[G]);
1666
- let $A = YA / 2 - XA / 2, ej = QA / 2 - Z[G] / 2 - 1, tj = min(H[KA], ej), nj = min(H[qA], ej), rj = tj, ij = QA - Z[G] - nj, aj = QA / 2 - Z[G] / 2 + $A, oj = clamp$3(rj, aj, ij), sj = !P.arrow && getAlignment(A) != null && aj !== oj && j.reference[G] / 2 - (aj < rj ? tj : nj) - Z[G] / 2 < 0, cj = sj ? aj < rj ? aj - rj : aj - ij : 0;
1825
+ }, W = getAlignmentAxis(A), G = getAxisLength(W), Z = await M.getDimensions(z), JA = W === "y", YA = JA ? "top" : "left", XA = JA ? "bottom" : "right", ZA = JA ? "clientHeight" : "clientWidth", QA = j.reference[G] + j.reference[W] - U[W] - j.floating[G], $A = U[W] - j.reference[W], ej = await (M.getOffsetParent == null ? void 0 : M.getOffsetParent(z)), tj = ej ? ej[ZA] : 0;
1826
+ (!tj || !await (M.isElement == null ? void 0 : M.isElement(ej))) && (tj = N.floating[ZA] || j.floating[G]);
1827
+ let nj = QA / 2 - $A / 2, rj = tj / 2 - Z[G] / 2 - 1, ij = min(H[YA], rj), aj = min(H[XA], rj), oj = ij, sj = tj - Z[G] - aj, cj = tj / 2 - Z[G] / 2 + nj, lj = clamp$3(oj, cj, sj), uj = !P.arrow && getAlignment(A) != null && cj !== lj && j.reference[G] / 2 - (cj < oj ? ij : aj) - Z[G] / 2 < 0, dj = uj ? cj < oj ? cj - oj : cj - sj : 0;
1667
1828
  return {
1668
- [W]: U[W] + cj,
1829
+ [W]: U[W] + dj,
1669
1830
  data: {
1670
- [W]: oj,
1671
- centerOffset: aj - oj - cj,
1672
- ...sj && { alignmentOffset: cj }
1831
+ [W]: lj,
1832
+ centerOffset: cj - lj - dj,
1833
+ ...uj && { alignmentOffset: dj }
1673
1834
  },
1674
- reset: sj
1835
+ reset: uj
1675
1836
  };
1676
1837
  }
1677
1838
  }), flip$2 = function(n) {
@@ -1682,32 +1843,32 @@ var arrow$2 = (n) => ({
1682
1843
  var E;
1683
1844
  let { placement: O, middlewareData: A, rects: j, initialPlacement: M, platform: N, elements: P } = _, { mainAxis: z = !0, crossAxis: B = !0, fallbackPlacements: H, fallbackStrategy: U = "bestFit", fallbackAxisSideDirection: W = "none", flipAlignment: G = !0, ...Z } = evaluate(n, _);
1684
1845
  if ((E = A.arrow) != null && E.alignmentOffset) return {};
1685
- let GA = getSide(O), KA = getSideAxis(M), qA = getSide(M) === M, JA = await (N.isRTL == null ? void 0 : N.isRTL(P.floating)), YA = H || (qA || !G ? [getOppositePlacement(M)] : getExpandedPlacements(M)), XA = W !== "none";
1686
- !H && XA && YA.push(...getOppositeAxisPlacements(M, G, W, JA));
1687
- let ZA = [M, ...YA], QA = await detectOverflow$1(_, Z), $A = [], ej = A.flip?.overflows || [];
1688
- if (z && $A.push(QA[GA]), B) {
1689
- let n = getAlignmentSides(O, j, JA);
1690
- $A.push(QA[n[0]], QA[n[1]]);
1846
+ let JA = getSide(O), YA = getSideAxis(M), XA = getSide(M) === M, ZA = await (N.isRTL == null ? void 0 : N.isRTL(P.floating)), QA = H || (XA || !G ? [getOppositePlacement(M)] : getExpandedPlacements(M)), $A = W !== "none";
1847
+ !H && $A && QA.push(...getOppositeAxisPlacements(M, G, W, ZA));
1848
+ let ej = [M, ...QA], tj = await detectOverflow$1(_, Z), nj = [], rj = A.flip?.overflows || [];
1849
+ if (z && nj.push(tj[JA]), B) {
1850
+ let n = getAlignmentSides(O, j, ZA);
1851
+ nj.push(tj[n[0]], tj[n[1]]);
1691
1852
  }
1692
- if (ej = [...ej, {
1853
+ if (rj = [...rj, {
1693
1854
  placement: O,
1694
- overflows: $A
1695
- }], !$A.every((n) => n <= 0)) {
1696
- let n = (A.flip?.index || 0) + 1, _ = ZA[n];
1697
- if (_ && (!(B === "alignment" && KA !== getSideAxis(_)) || ej.every((n) => getSideAxis(n.placement) === KA ? n.overflows[0] > 0 : !0))) return {
1855
+ overflows: nj
1856
+ }], !nj.every((n) => n <= 0)) {
1857
+ let n = (A.flip?.index || 0) + 1, _ = ej[n];
1858
+ if (_ && (!(B === "alignment" && YA !== getSideAxis(_)) || rj.every((n) => getSideAxis(n.placement) === YA ? n.overflows[0] > 0 : !0))) return {
1698
1859
  data: {
1699
1860
  index: n,
1700
- overflows: ej
1861
+ overflows: rj
1701
1862
  },
1702
1863
  reset: { placement: _ }
1703
1864
  };
1704
- let E = ej.filter((n) => n.overflows[0] <= 0).sort((n, _) => n.overflows[1] - _.overflows[1])[0]?.placement;
1865
+ let E = rj.filter((n) => n.overflows[0] <= 0).sort((n, _) => n.overflows[1] - _.overflows[1])[0]?.placement;
1705
1866
  if (!E) switch (U) {
1706
1867
  case "bestFit": {
1707
- let n = ej.filter((n) => {
1708
- if (XA) {
1868
+ let n = rj.filter((n) => {
1869
+ if ($A) {
1709
1870
  let _ = getSideAxis(n.placement);
1710
- return _ === KA || _ === "y";
1871
+ return _ === YA || _ === "y";
1711
1872
  }
1712
1873
  return !0;
1713
1874
  }).map((n) => [n.placement, n.overflows.filter((n) => n > 0).reduce((n, _) => n + _, 0)]).sort((n, _) => n[1] - _[1])[0]?.[0];
@@ -1850,7 +2011,7 @@ var offset$2 = function(n) {
1850
2011
  let { x: E, y: O, placement: A, rects: j, middlewareData: M } = _, { offset: N = 0, mainAxis: P = !0, crossAxis: z = !0 } = evaluate(n, _), B = {
1851
2012
  x: E,
1852
2013
  y: O
1853
- }, H = getSideAxis(A), U = getOppositeAxis(H), W = B[U], G = B[H], Z = evaluate(N, _), GA = typeof Z == "number" ? {
2014
+ }, H = getSideAxis(A), U = getOppositeAxis(H), W = B[U], G = B[H], Z = evaluate(N, _), JA = typeof Z == "number" ? {
1854
2015
  mainAxis: Z,
1855
2016
  crossAxis: 0
1856
2017
  } : {
@@ -1859,11 +2020,11 @@ var offset$2 = function(n) {
1859
2020
  ...Z
1860
2021
  };
1861
2022
  if (P) {
1862
- let n = U === "y" ? "height" : "width", _ = j.reference[U] - j.floating[n] + GA.mainAxis, E = j.reference[U] + j.reference[n] - GA.mainAxis;
2023
+ let n = U === "y" ? "height" : "width", _ = j.reference[U] - j.floating[n] + JA.mainAxis, E = j.reference[U] + j.reference[n] - JA.mainAxis;
1863
2024
  W < _ ? W = _ : W > E && (W = E);
1864
2025
  }
1865
2026
  if (z) {
1866
- let n = U === "y" ? "width" : "height", _ = originSides.has(getSide(A)), E = j.reference[H] - j.floating[n] + (_ && M.offset?.[H] || 0) + (_ ? 0 : GA.crossAxis), O = j.reference[H] + j.reference[n] + (_ ? 0 : M.offset?.[H] || 0) - (_ ? GA.crossAxis : 0);
2027
+ let n = U === "y" ? "width" : "height", _ = originSides.has(getSide(A)), E = j.reference[H] - j.floating[n] + (_ && M.offset?.[H] || 0) + (_ ? 0 : JA.crossAxis), O = j.reference[H] + j.reference[n] + (_ ? 0 : M.offset?.[H] || 0) - (_ ? JA.crossAxis : 0);
1867
2028
  G < E ? G = E : G > O && (G = O);
1868
2029
  }
1869
2030
  return {
@@ -1878,20 +2039,20 @@ var offset$2 = function(n) {
1878
2039
  options: n,
1879
2040
  async fn(_) {
1880
2041
  var E, O;
1881
- let { placement: A, rects: j, platform: M, elements: N } = _, { apply: P = () => {}, ...z } = evaluate(n, _), B = await detectOverflow$1(_, z), H = getSide(A), U = getAlignment(A), W = getSideAxis(A) === "y", { width: G, height: Z } = j.floating, GA, KA;
1882
- H === "top" || H === "bottom" ? (GA = H, KA = U === (await (M.isRTL == null ? void 0 : M.isRTL(N.floating)) ? "start" : "end") ? "left" : "right") : (KA = H, GA = U === "end" ? "top" : "bottom");
1883
- let qA = Z - B.top - B.bottom, JA = G - B.left - B.right, YA = min(Z - B[GA], qA), XA = min(G - B[KA], JA), ZA = !_.middlewareData.shift, QA = YA, $A = XA;
1884
- if ((E = _.middlewareData.shift) != null && E.enabled.x && ($A = JA), (O = _.middlewareData.shift) != null && O.enabled.y && (QA = qA), ZA && !U) {
2042
+ let { placement: A, rects: j, platform: M, elements: N } = _, { apply: P = () => {}, ...z } = evaluate(n, _), B = await detectOverflow$1(_, z), H = getSide(A), U = getAlignment(A), W = getSideAxis(A) === "y", { width: G, height: Z } = j.floating, JA, YA;
2043
+ H === "top" || H === "bottom" ? (JA = H, YA = U === (await (M.isRTL == null ? void 0 : M.isRTL(N.floating)) ? "start" : "end") ? "left" : "right") : (YA = H, JA = U === "end" ? "top" : "bottom");
2044
+ let XA = Z - B.top - B.bottom, ZA = G - B.left - B.right, QA = min(Z - B[JA], XA), $A = min(G - B[YA], ZA), ej = !_.middlewareData.shift, tj = QA, nj = $A;
2045
+ if ((E = _.middlewareData.shift) != null && E.enabled.x && (nj = ZA), (O = _.middlewareData.shift) != null && O.enabled.y && (tj = XA), ej && !U) {
1885
2046
  let n = max(B.left, 0), _ = max(B.right, 0), E = max(B.top, 0), O = max(B.bottom, 0);
1886
- W ? $A = G - 2 * (n !== 0 || _ !== 0 ? n + _ : max(B.left, B.right)) : QA = Z - 2 * (E !== 0 || O !== 0 ? E + O : max(B.top, B.bottom));
2047
+ W ? nj = G - 2 * (n !== 0 || _ !== 0 ? n + _ : max(B.left, B.right)) : tj = Z - 2 * (E !== 0 || O !== 0 ? E + O : max(B.top, B.bottom));
1887
2048
  }
1888
2049
  await P({
1889
2050
  ..._,
1890
- availableWidth: $A,
1891
- availableHeight: QA
2051
+ availableWidth: nj,
2052
+ availableHeight: tj
1892
2053
  });
1893
- let ej = await M.getDimensions(N.floating);
1894
- return G !== ej.width || Z !== ej.height ? { reset: { rects: !0 } } : {};
2054
+ let rj = await M.getDimensions(N.floating);
2055
+ return G !== rj.width || Z !== rj.height ? { reset: { rects: !0 } } : {};
1895
2056
  }
1896
2057
  };
1897
2058
  };
@@ -2275,27 +2436,27 @@ function observeMove(n, _) {
2275
2436
  N === void 0 && (N = !1), P === void 0 && (P = 1), j();
2276
2437
  let z = n.getBoundingClientRect(), { left: B, top: H, width: U, height: W } = z;
2277
2438
  if (N || _(), !U || !W) return;
2278
- let G = floor(H), Z = floor(A.clientWidth - (B + U)), GA = floor(A.clientHeight - (H + W)), KA = floor(B), qA = {
2279
- rootMargin: -G + "px " + -Z + "px " + -GA + "px " + -KA + "px",
2439
+ let G = floor(H), Z = floor(A.clientWidth - (B + U)), JA = floor(A.clientHeight - (H + W)), YA = floor(B), XA = {
2440
+ rootMargin: -G + "px " + -Z + "px " + -JA + "px " + -YA + "px",
2280
2441
  threshold: max(0, min(1, P)) || 1
2281
- }, JA = !0;
2282
- function YA(_) {
2442
+ }, ZA = !0;
2443
+ function QA(_) {
2283
2444
  let E = _[0].intersectionRatio;
2284
2445
  if (E !== P) {
2285
- if (!JA) return M();
2446
+ if (!ZA) return M();
2286
2447
  E ? M(!1, E) : O = setTimeout(() => {
2287
2448
  M(!1, 1e-7);
2288
2449
  }, 1e3);
2289
2450
  }
2290
- E === 1 && !rectsAreEqual(z, n.getBoundingClientRect()) && M(), JA = !1;
2451
+ E === 1 && !rectsAreEqual(z, n.getBoundingClientRect()) && M(), ZA = !1;
2291
2452
  }
2292
2453
  try {
2293
- E = new IntersectionObserver(YA, {
2294
- ...qA,
2454
+ E = new IntersectionObserver(QA, {
2455
+ ...XA,
2295
2456
  root: A.ownerDocument
2296
2457
  });
2297
2458
  } catch {
2298
- E = new IntersectionObserver(YA, qA);
2459
+ E = new IntersectionObserver(QA, XA);
2299
2460
  }
2300
2461
  E.observe(n);
2301
2462
  }
@@ -2316,10 +2477,10 @@ function autoUpdate(n, _, E, O) {
2316
2477
  })), E();
2317
2478
  }), z && !P && W.observe(z), W.observe(_));
2318
2479
  let G, Z = P ? getBoundingClientRect(n) : null;
2319
- P && GA();
2320
- function GA() {
2480
+ P && JA();
2481
+ function JA() {
2321
2482
  let _ = getBoundingClientRect(n);
2322
- Z && !rectsAreEqual(Z, _) && E(), Z = _, G = requestAnimationFrame(GA);
2483
+ Z && !rectsAreEqual(Z, _) && E(), Z = _, G = requestAnimationFrame(JA);
2323
2484
  }
2324
2485
  return E(), () => {
2325
2486
  var n;
@@ -2386,23 +2547,23 @@ function useFloating(_) {
2386
2547
  isPositioned: !1
2387
2548
  }), [W, G] = React$1.useState(A);
2388
2549
  deepEqual(W, A) || G(A);
2389
- let [Z, GA] = React$1.useState(null), [KA, qA] = React$1.useState(null), YA = React$1.useCallback((n) => {
2390
- n !== $A.current && ($A.current = n, GA(n));
2391
- }, []), XA = React$1.useCallback((n) => {
2392
- n !== ej.current && (ej.current = n, qA(n));
2393
- }, []), ZA = M || Z, QA = N || KA, $A = React$1.useRef(null), ej = React$1.useRef(null), tj = React$1.useRef(H), nj = z != null, rj = useLatestRef(z), ij = useLatestRef(j), aj = useLatestRef(B), oj = React$1.useCallback(() => {
2394
- if (!$A.current || !ej.current) return;
2550
+ let [Z, JA] = React$1.useState(null), [YA, XA] = React$1.useState(null), QA = React$1.useCallback((n) => {
2551
+ n !== nj.current && (nj.current = n, JA(n));
2552
+ }, []), $A = React$1.useCallback((n) => {
2553
+ n !== rj.current && (rj.current = n, XA(n));
2554
+ }, []), ej = M || Z, tj = N || YA, nj = React$1.useRef(null), rj = React$1.useRef(null), ij = React$1.useRef(H), aj = z != null, oj = useLatestRef(z), sj = useLatestRef(j), cj = useLatestRef(B), lj = React$1.useCallback(() => {
2555
+ if (!nj.current || !rj.current) return;
2395
2556
  let n = {
2396
2557
  placement: E,
2397
2558
  strategy: O,
2398
2559
  middleware: W
2399
2560
  };
2400
- ij.current && (n.platform = ij.current), computePosition($A.current, ej.current, n).then((n) => {
2561
+ sj.current && (n.platform = sj.current), computePosition(nj.current, rj.current, n).then((n) => {
2401
2562
  let _ = {
2402
2563
  ...n,
2403
- isPositioned: aj.current !== !1
2564
+ isPositioned: cj.current !== !1
2404
2565
  };
2405
- sj.current && !deepEqual(tj.current, _) && (tj.current = _, ReactDOM$1.flushSync(() => {
2566
+ uj.current && !deepEqual(ij.current, _) && (ij.current = _, ReactDOM$1.flushSync(() => {
2406
2567
  U(_);
2407
2568
  }));
2408
2569
  });
@@ -2410,50 +2571,50 @@ function useFloating(_) {
2410
2571
  W,
2411
2572
  E,
2412
2573
  O,
2413
- ij,
2414
- aj
2574
+ sj,
2575
+ cj
2415
2576
  ]);
2416
2577
  index(() => {
2417
- B === !1 && tj.current.isPositioned && (tj.current.isPositioned = !1, U((n) => ({
2578
+ B === !1 && ij.current.isPositioned && (ij.current.isPositioned = !1, U((n) => ({
2418
2579
  ...n,
2419
2580
  isPositioned: !1
2420
2581
  })));
2421
2582
  }, [B]);
2422
- let sj = React$1.useRef(!1);
2423
- index(() => (sj.current = !0, () => {
2424
- sj.current = !1;
2583
+ let uj = React$1.useRef(!1);
2584
+ index(() => (uj.current = !0, () => {
2585
+ uj.current = !1;
2425
2586
  }), []), index(() => {
2426
- if (ZA && ($A.current = ZA), QA && (ej.current = QA), ZA && QA) {
2427
- if (rj.current) return rj.current(ZA, QA, oj);
2428
- oj();
2587
+ if (ej && (nj.current = ej), tj && (rj.current = tj), ej && tj) {
2588
+ if (oj.current) return oj.current(ej, tj, lj);
2589
+ lj();
2429
2590
  }
2430
2591
  }, [
2431
- ZA,
2432
- QA,
2592
+ ej,
2593
+ tj,
2594
+ lj,
2433
2595
  oj,
2434
- rj,
2435
- nj
2596
+ aj
2436
2597
  ]);
2437
- let cj = React$1.useMemo(() => ({
2438
- reference: $A,
2439
- floating: ej,
2440
- setReference: YA,
2441
- setFloating: XA
2442
- }), [YA, XA]), lj = React$1.useMemo(() => ({
2443
- reference: ZA,
2444
- floating: QA
2445
- }), [ZA, QA]), uj = React$1.useMemo(() => {
2598
+ let dj = React$1.useMemo(() => ({
2599
+ reference: nj,
2600
+ floating: rj,
2601
+ setReference: QA,
2602
+ setFloating: $A
2603
+ }), [QA, $A]), fj = React$1.useMemo(() => ({
2604
+ reference: ej,
2605
+ floating: tj
2606
+ }), [ej, tj]), pj = React$1.useMemo(() => {
2446
2607
  let n = {
2447
2608
  position: O,
2448
2609
  left: 0,
2449
2610
  top: 0
2450
2611
  };
2451
- if (!lj.floating) return n;
2452
- let _ = roundByDPR(lj.floating, H.x), E = roundByDPR(lj.floating, H.y);
2612
+ if (!fj.floating) return n;
2613
+ let _ = roundByDPR(fj.floating, H.x), E = roundByDPR(fj.floating, H.y);
2453
2614
  return P ? {
2454
2615
  ...n,
2455
2616
  transform: "translate(" + _ + "px, " + E + "px)",
2456
- ...getDPR(lj.floating) >= 1.5 && { willChange: "transform" }
2617
+ ...getDPR(fj.floating) >= 1.5 && { willChange: "transform" }
2457
2618
  } : {
2458
2619
  position: O,
2459
2620
  left: _,
@@ -2462,22 +2623,22 @@ function useFloating(_) {
2462
2623
  }, [
2463
2624
  O,
2464
2625
  P,
2465
- lj.floating,
2626
+ fj.floating,
2466
2627
  H.x,
2467
2628
  H.y
2468
2629
  ]);
2469
2630
  return React$1.useMemo(() => ({
2470
2631
  ...H,
2471
- update: oj,
2472
- refs: cj,
2473
- elements: lj,
2474
- floatingStyles: uj
2632
+ update: lj,
2633
+ refs: dj,
2634
+ elements: fj,
2635
+ floatingStyles: pj
2475
2636
  }), [
2476
2637
  H,
2477
- oj,
2478
- cj,
2479
2638
  lj,
2480
- uj
2639
+ dj,
2640
+ fj,
2641
+ pj
2481
2642
  ]);
2482
2643
  }
2483
2644
  var arrow$1$1 = (n) => {
@@ -2554,70 +2715,70 @@ var ANCHOR_NAME$2 = "PopperAnchor", PopperAnchor = React$1.forwardRef((_, E) =>
2554
2715
  });
2555
2716
  PopperAnchor.displayName = ANCHOR_NAME$2;
2556
2717
  var CONTENT_NAME$6 = "PopperContent", [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$6), PopperContent = React$1.forwardRef((_, E) => {
2557
- let { __scopePopper: O, side: A = "bottom", sideOffset: j = 0, align: M = "center", alignOffset: N = 0, arrowPadding: P = 0, avoidCollisions: z = !0, collisionBoundary: B = [], collisionPadding: H = 0, sticky: U = "partial", hideWhenDetached: W = !1, updatePositionStrategy: G = "optimized", onPlaced: Z, ...GA } = _, KA = usePopperContext(CONTENT_NAME$6, O), [qA, JA] = React$1.useState(null), YA = useComposedRefs(E, (n) => JA(n)), [XA, ZA] = React$1.useState(null), $A = useSize(XA), ej = $A?.width ?? 0, tj = $A?.height ?? 0, nj = A + (M === "center" ? "" : "-" + M), rj = typeof H == "number" ? H : {
2718
+ let { __scopePopper: O, side: A = "bottom", sideOffset: j = 0, align: M = "center", alignOffset: N = 0, arrowPadding: P = 0, avoidCollisions: z = !0, collisionBoundary: B = [], collisionPadding: H = 0, sticky: U = "partial", hideWhenDetached: W = !1, updatePositionStrategy: G = "optimized", onPlaced: Z, ...JA } = _, YA = usePopperContext(CONTENT_NAME$6, O), [XA, ZA] = React$1.useState(null), QA = useComposedRefs(E, (n) => ZA(n)), [$A, ej] = React$1.useState(null), nj = useSize($A), rj = nj?.width ?? 0, ij = nj?.height ?? 0, aj = A + (M === "center" ? "" : "-" + M), oj = typeof H == "number" ? H : {
2558
2719
  top: 0,
2559
2720
  right: 0,
2560
2721
  bottom: 0,
2561
2722
  left: 0,
2562
2723
  ...H
2563
- }, ij = Array.isArray(B) ? B : [B], aj = ij.length > 0, oj = {
2564
- padding: rj,
2565
- boundary: ij.filter(isNotNull$2),
2566
- altBoundary: aj
2567
- }, { refs: sj, floatingStyles: cj, placement: lj, isPositioned: uj, middlewareData: dj } = useFloating({
2724
+ }, sj = Array.isArray(B) ? B : [B], cj = sj.length > 0, lj = {
2725
+ padding: oj,
2726
+ boundary: sj.filter(isNotNull$2),
2727
+ altBoundary: cj
2728
+ }, { refs: uj, floatingStyles: dj, placement: fj, isPositioned: pj, middlewareData: mj } = useFloating({
2568
2729
  strategy: "fixed",
2569
- placement: nj,
2730
+ placement: aj,
2570
2731
  whileElementsMounted: (...n) => autoUpdate(...n, { animationFrame: G === "always" }),
2571
- elements: { reference: KA.anchor },
2732
+ elements: { reference: YA.anchor },
2572
2733
  middleware: [
2573
2734
  offset({
2574
- mainAxis: j + tj,
2735
+ mainAxis: j + ij,
2575
2736
  alignmentAxis: N
2576
2737
  }),
2577
2738
  z && shift({
2578
2739
  mainAxis: !0,
2579
2740
  crossAxis: !1,
2580
2741
  limiter: U === "partial" ? limitShift() : void 0,
2581
- ...oj
2742
+ ...lj
2582
2743
  }),
2583
- z && flip({ ...oj }),
2744
+ z && flip({ ...lj }),
2584
2745
  size({
2585
- ...oj,
2746
+ ...lj,
2586
2747
  apply: ({ elements: n, rects: _, availableWidth: E, availableHeight: O }) => {
2587
2748
  let { width: A, height: j } = _.reference, M = n.floating.style;
2588
2749
  M.setProperty("--radix-popper-available-width", `${E}px`), M.setProperty("--radix-popper-available-height", `${O}px`), M.setProperty("--radix-popper-anchor-width", `${A}px`), M.setProperty("--radix-popper-anchor-height", `${j}px`);
2589
2750
  }
2590
2751
  }),
2591
- XA && arrow({
2592
- element: XA,
2752
+ $A && arrow({
2753
+ element: $A,
2593
2754
  padding: P
2594
2755
  }),
2595
2756
  transformOrigin({
2596
- arrowWidth: ej,
2597
- arrowHeight: tj
2757
+ arrowWidth: rj,
2758
+ arrowHeight: ij
2598
2759
  }),
2599
2760
  W && hide({
2600
2761
  strategy: "referenceHidden",
2601
- ...oj
2762
+ ...lj
2602
2763
  })
2603
2764
  ]
2604
- }), [fj, pj] = getSideAndAlignFromPlacement(lj), mj = useCallbackRef(Z);
2765
+ }), [hj, gj] = getSideAndAlignFromPlacement(fj), _j = useCallbackRef(Z);
2605
2766
  useLayoutEffect2(() => {
2606
- uj && mj?.();
2607
- }, [uj, mj]);
2608
- let hj = dj.arrow?.x, gj = dj.arrow?.y, _j = dj.arrow?.centerOffset !== 0, [vj, yj] = React$1.useState();
2767
+ pj && _j?.();
2768
+ }, [pj, _j]);
2769
+ let vj = mj.arrow?.x, yj = mj.arrow?.y, bj = mj.arrow?.centerOffset !== 0, [xj, Sj] = React$1.useState();
2609
2770
  return useLayoutEffect2(() => {
2610
- qA && yj(window.getComputedStyle(qA).zIndex);
2611
- }, [qA]), /* @__PURE__ */ jsx("div", {
2612
- ref: sj.setFloating,
2771
+ XA && Sj(window.getComputedStyle(XA).zIndex);
2772
+ }, [XA]), /* @__PURE__ */ jsx("div", {
2773
+ ref: uj.setFloating,
2613
2774
  "data-radix-popper-content-wrapper": "",
2614
2775
  style: {
2615
- ...cj,
2616
- transform: uj ? cj.transform : "translate(0, -200%)",
2776
+ ...dj,
2777
+ transform: pj ? dj.transform : "translate(0, -200%)",
2617
2778
  minWidth: "max-content",
2618
- zIndex: vj,
2619
- "--radix-popper-transform-origin": [dj.transformOrigin?.x, dj.transformOrigin?.y].join(" "),
2620
- ...dj.hide?.referenceHidden && {
2779
+ zIndex: xj,
2780
+ "--radix-popper-transform-origin": [mj.transformOrigin?.x, mj.transformOrigin?.y].join(" "),
2781
+ ...mj.hide?.referenceHidden && {
2621
2782
  visibility: "hidden",
2622
2783
  pointerEvents: "none"
2623
2784
  }
@@ -2625,19 +2786,19 @@ var CONTENT_NAME$6 = "PopperContent", [PopperContentProvider, useContentContext]
2625
2786
  dir: _.dir,
2626
2787
  children: /* @__PURE__ */ jsx(PopperContentProvider, {
2627
2788
  scope: O,
2628
- placedSide: fj,
2629
- onArrowChange: ZA,
2630
- arrowX: hj,
2631
- arrowY: gj,
2632
- shouldHideArrow: _j,
2789
+ placedSide: hj,
2790
+ onArrowChange: ej,
2791
+ arrowX: vj,
2792
+ arrowY: yj,
2793
+ shouldHideArrow: bj,
2633
2794
  children: /* @__PURE__ */ jsx(Primitive.div, {
2634
- "data-side": fj,
2635
- "data-align": pj,
2636
- ...GA,
2637
- ref: YA,
2795
+ "data-side": hj,
2796
+ "data-align": gj,
2797
+ ...JA,
2798
+ ref: QA,
2638
2799
  style: {
2639
- ...GA.style,
2640
- animation: uj ? void 0 : "none"
2800
+ ...JA.style,
2801
+ animation: pj ? void 0 : "none"
2641
2802
  }
2642
2803
  })
2643
2804
  })
@@ -2720,27 +2881,27 @@ var Root2$4 = Popper, Anchor = PopperAnchor, Content$1 = PopperContent, Arrow =
2720
2881
  }));
2721
2882
  RovingFocusGroup.displayName = GROUP_NAME$3;
2722
2883
  var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
2723
- let { __scopeRovingFocusGroup: O, orientation: A, loop: j = !1, dir: M, currentTabStopId: N, defaultCurrentTabStopId: P, onCurrentTabStopIdChange: z, onEntryFocus: B, preventScrollOnEntryFocus: H = !1, ...U } = _, W = React$1.useRef(null), G = useComposedRefs(E, W), Z = useDirection(M), [GA, KA] = useControllableState({
2884
+ let { __scopeRovingFocusGroup: O, orientation: A, loop: j = !1, dir: M, currentTabStopId: N, defaultCurrentTabStopId: P, onCurrentTabStopIdChange: z, onEntryFocus: B, preventScrollOnEntryFocus: H = !1, ...U } = _, W = React$1.useRef(null), G = useComposedRefs(E, W), Z = useDirection(M), [JA, YA] = useControllableState({
2724
2885
  prop: N,
2725
2886
  defaultProp: P ?? null,
2726
2887
  onChange: z,
2727
2888
  caller: GROUP_NAME$3
2728
- }), [qA, JA] = React$1.useState(!1), YA = useCallbackRef(B), XA = useCollection$1(O), ZA = React$1.useRef(!1), [$A, ej] = React$1.useState(0);
2889
+ }), [XA, ZA] = React$1.useState(!1), QA = useCallbackRef(B), $A = useCollection$1(O), ej = React$1.useRef(!1), [nj, rj] = React$1.useState(0);
2729
2890
  return React$1.useEffect(() => {
2730
2891
  let n = W.current;
2731
- if (n) return n.addEventListener(ENTRY_FOCUS, YA), () => n.removeEventListener(ENTRY_FOCUS, YA);
2732
- }, [YA]), /* @__PURE__ */ jsx(RovingFocusProvider, {
2892
+ if (n) return n.addEventListener(ENTRY_FOCUS, QA), () => n.removeEventListener(ENTRY_FOCUS, QA);
2893
+ }, [QA]), /* @__PURE__ */ jsx(RovingFocusProvider, {
2733
2894
  scope: O,
2734
2895
  orientation: A,
2735
2896
  dir: Z,
2736
2897
  loop: j,
2737
- currentTabStopId: GA,
2738
- onItemFocus: React$1.useCallback((n) => KA(n), [KA]),
2739
- onItemShiftTab: React$1.useCallback(() => JA(!0), []),
2740
- onFocusableItemAdd: React$1.useCallback(() => ej((n) => n + 1), []),
2741
- onFocusableItemRemove: React$1.useCallback(() => ej((n) => n - 1), []),
2898
+ currentTabStopId: JA,
2899
+ onItemFocus: React$1.useCallback((n) => YA(n), [YA]),
2900
+ onItemShiftTab: React$1.useCallback(() => ZA(!0), []),
2901
+ onFocusableItemAdd: React$1.useCallback(() => rj((n) => n + 1), []),
2902
+ onFocusableItemRemove: React$1.useCallback(() => rj((n) => n - 1), []),
2742
2903
  children: /* @__PURE__ */ jsx(Primitive.div, {
2743
- tabIndex: qA || $A === 0 ? -1 : 0,
2904
+ tabIndex: XA || nj === 0 ? -1 : 0,
2744
2905
  "data-orientation": A,
2745
2906
  ...U,
2746
2907
  ref: G,
@@ -2749,28 +2910,28 @@ var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
2749
2910
  ..._.style
2750
2911
  },
2751
2912
  onMouseDown: composeEventHandlers(_.onMouseDown, () => {
2752
- ZA.current = !0;
2913
+ ej.current = !0;
2753
2914
  }),
2754
2915
  onFocus: composeEventHandlers(_.onFocus, (n) => {
2755
- let _ = !ZA.current;
2756
- if (n.target === n.currentTarget && _ && !qA) {
2916
+ let _ = !ej.current;
2917
+ if (n.target === n.currentTarget && _ && !XA) {
2757
2918
  let _ = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
2758
2919
  if (n.currentTarget.dispatchEvent(_), !_.defaultPrevented) {
2759
- let n = XA().filter((n) => n.focusable);
2920
+ let n = $A().filter((n) => n.focusable);
2760
2921
  focusFirst$1([
2761
2922
  n.find((n) => n.active),
2762
- n.find((n) => n.id === GA),
2923
+ n.find((n) => n.id === JA),
2763
2924
  ...n
2764
2925
  ].filter(Boolean).map((n) => n.ref.current), H);
2765
2926
  }
2766
2927
  }
2767
- ZA.current = !1;
2928
+ ej.current = !1;
2768
2929
  }),
2769
- onBlur: composeEventHandlers(_.onBlur, () => JA(!1))
2930
+ onBlur: composeEventHandlers(_.onBlur, () => ZA(!1))
2770
2931
  })
2771
2932
  });
2772
2933
  }), ITEM_NAME$3 = "RovingFocusGroupItem", RovingFocusGroupItem = React$1.forwardRef((_, E) => {
2773
- let { __scopeRovingFocusGroup: O, focusable: A = !0, active: j = !1, tabStopId: M, children: N, ...P } = _, z = useId$1(), B = M || z, H = useRovingFocusContext(ITEM_NAME$3, O), U = H.currentTabStopId === B, W = useCollection$1(O), { onFocusableItemAdd: G, onFocusableItemRemove: Z, currentTabStopId: GA } = H;
2934
+ let { __scopeRovingFocusGroup: O, focusable: A = !0, active: j = !1, tabStopId: M, children: N, ...P } = _, z = useId$1(), B = M || z, H = useRovingFocusContext(ITEM_NAME$3, O), U = H.currentTabStopId === B, W = useCollection$1(O), { onFocusableItemAdd: G, onFocusableItemRemove: Z, currentTabStopId: JA } = H;
2774
2935
  return React$1.useEffect(() => {
2775
2936
  if (A) return G(), () => Z();
2776
2937
  }, [
@@ -2813,7 +2974,7 @@ var RovingFocusGroupImpl = React$1.forwardRef((_, E) => {
2813
2974
  }),
2814
2975
  children: typeof N == "function" ? N({
2815
2976
  isCurrentTabStop: U,
2816
- hasTabStop: GA != null
2977
+ hasTabStop: JA != null
2817
2978
  }) : N
2818
2979
  })
2819
2980
  });
@@ -2964,40 +3125,40 @@ var CONTENT_NAME$5 = "MenuContent", [MenuContentProvider, useMenuContentContext]
2964
3125
  onDismiss: () => E.onOpenChange(!1)
2965
3126
  });
2966
3127
  }), Slot$1 = /* @__PURE__ */ createSlot("MenuContent.ScrollLock"), MenuContentImpl = React$1.forwardRef((_, E) => {
2967
- let { __scopeMenu: O, loop: A = !1, trapFocus: j, onOpenAutoFocus: M, onCloseAutoFocus: N, disableOutsidePointerEvents: P, onEntryFocus: z, onEscapeKeyDown: B, onPointerDownOutside: H, onFocusOutside: U, onInteractOutside: W, onDismiss: G, disableOutsideScroll: Z, ...GA } = _, KA = useMenuContext(CONTENT_NAME$5, O), qA = useMenuRootContext(CONTENT_NAME$5, O), JA = usePopperScope$2(O), YA = useRovingFocusGroupScope$1(O), XA = useCollection(O), [ZA, $A] = React$1.useState(null), ej = React$1.useRef(null), tj = useComposedRefs(E, ej, KA.onContentChange), nj = React$1.useRef(0), rj = React$1.useRef(""), ij = React$1.useRef(0), aj = React$1.useRef(null), oj = React$1.useRef("right"), sj = React$1.useRef(0), cj = Z ? Combination_default : React$1.Fragment, lj = Z ? {
3128
+ let { __scopeMenu: O, loop: A = !1, trapFocus: j, onOpenAutoFocus: M, onCloseAutoFocus: N, disableOutsidePointerEvents: P, onEntryFocus: z, onEscapeKeyDown: B, onPointerDownOutside: H, onFocusOutside: U, onInteractOutside: W, onDismiss: G, disableOutsideScroll: Z, ...JA } = _, YA = useMenuContext(CONTENT_NAME$5, O), XA = useMenuRootContext(CONTENT_NAME$5, O), ZA = usePopperScope$2(O), QA = useRovingFocusGroupScope$1(O), $A = useCollection(O), [ej, nj] = React$1.useState(null), rj = React$1.useRef(null), ij = useComposedRefs(E, rj, YA.onContentChange), aj = React$1.useRef(0), oj = React$1.useRef(""), sj = React$1.useRef(0), cj = React$1.useRef(null), lj = React$1.useRef("right"), uj = React$1.useRef(0), dj = Z ? Combination_default : React$1.Fragment, fj = Z ? {
2968
3129
  as: Slot$1,
2969
3130
  allowPinchZoom: !0
2970
- } : void 0, uj = (n) => {
2971
- let _ = rj.current + n, E = XA().filter((n) => !n.disabled), O = document.activeElement, A = E.find((n) => n.ref.current === O)?.textValue, j = getNextMatch(E.map((n) => n.textValue), _, A), M = E.find((n) => n.textValue === j)?.ref.current;
3131
+ } : void 0, pj = (n) => {
3132
+ let _ = oj.current + n, E = $A().filter((n) => !n.disabled), O = document.activeElement, A = E.find((n) => n.ref.current === O)?.textValue, j = getNextMatch(E.map((n) => n.textValue), _, A), M = E.find((n) => n.textValue === j)?.ref.current;
2972
3133
  (function n(_) {
2973
- rj.current = _, window.clearTimeout(nj.current), _ !== "" && (nj.current = window.setTimeout(() => n(""), 1e3));
3134
+ oj.current = _, window.clearTimeout(aj.current), _ !== "" && (aj.current = window.setTimeout(() => n(""), 1e3));
2974
3135
  })(_), M && setTimeout(() => M.focus());
2975
3136
  };
2976
- React$1.useEffect(() => () => window.clearTimeout(nj.current), []), useFocusGuards();
2977
- let dj = React$1.useCallback((n) => oj.current === aj.current?.side && isPointerInGraceArea(n, aj.current?.area), []);
3137
+ React$1.useEffect(() => () => window.clearTimeout(aj.current), []), useFocusGuards();
3138
+ let mj = React$1.useCallback((n) => lj.current === cj.current?.side && isPointerInGraceArea(n, cj.current?.area), []);
2978
3139
  return /* @__PURE__ */ jsx(MenuContentProvider, {
2979
3140
  scope: O,
2980
- searchRef: rj,
3141
+ searchRef: oj,
2981
3142
  onItemEnter: React$1.useCallback((n) => {
2982
- dj(n) && n.preventDefault();
2983
- }, [dj]),
3143
+ mj(n) && n.preventDefault();
3144
+ }, [mj]),
2984
3145
  onItemLeave: React$1.useCallback((n) => {
2985
- dj(n) || (ej.current?.focus(), $A(null));
2986
- }, [dj]),
3146
+ mj(n) || (rj.current?.focus(), nj(null));
3147
+ }, [mj]),
2987
3148
  onTriggerLeave: React$1.useCallback((n) => {
2988
- dj(n) && n.preventDefault();
2989
- }, [dj]),
2990
- pointerGraceTimerRef: ij,
3149
+ mj(n) && n.preventDefault();
3150
+ }, [mj]),
3151
+ pointerGraceTimerRef: sj,
2991
3152
  onPointerGraceIntentChange: React$1.useCallback((n) => {
2992
- aj.current = n;
3153
+ cj.current = n;
2993
3154
  }, []),
2994
- children: /* @__PURE__ */ jsx(cj, {
2995
- ...lj,
3155
+ children: /* @__PURE__ */ jsx(dj, {
3156
+ ...fj,
2996
3157
  children: /* @__PURE__ */ jsx(FocusScope, {
2997
3158
  asChild: !0,
2998
3159
  trapped: j,
2999
3160
  onMountAutoFocus: composeEventHandlers(M, (n) => {
3000
- n.preventDefault(), ej.current?.focus({ preventScroll: !0 });
3161
+ n.preventDefault(), rj.current?.focus({ preventScroll: !0 });
3001
3162
  }),
3002
3163
  onUnmountAutoFocus: N,
3003
3164
  children: /* @__PURE__ */ jsx(DismissableLayer, {
@@ -3010,44 +3171,44 @@ var CONTENT_NAME$5 = "MenuContent", [MenuContentProvider, useMenuContentContext]
3010
3171
  onDismiss: G,
3011
3172
  children: /* @__PURE__ */ jsx(Root$2, {
3012
3173
  asChild: !0,
3013
- ...YA,
3014
- dir: qA.dir,
3174
+ ...QA,
3175
+ dir: XA.dir,
3015
3176
  orientation: "vertical",
3016
3177
  loop: A,
3017
- currentTabStopId: ZA,
3018
- onCurrentTabStopIdChange: $A,
3178
+ currentTabStopId: ej,
3179
+ onCurrentTabStopIdChange: nj,
3019
3180
  onEntryFocus: composeEventHandlers(z, (n) => {
3020
- qA.isUsingKeyboardRef.current || n.preventDefault();
3181
+ XA.isUsingKeyboardRef.current || n.preventDefault();
3021
3182
  }),
3022
3183
  preventScrollOnEntryFocus: !0,
3023
3184
  children: /* @__PURE__ */ jsx(Content$1, {
3024
3185
  role: "menu",
3025
3186
  "aria-orientation": "vertical",
3026
- "data-state": getOpenState(KA.open),
3187
+ "data-state": getOpenState(YA.open),
3027
3188
  "data-radix-menu-content": "",
3028
- dir: qA.dir,
3189
+ dir: XA.dir,
3190
+ ...ZA,
3029
3191
  ...JA,
3030
- ...GA,
3031
- ref: tj,
3192
+ ref: ij,
3032
3193
  style: {
3033
3194
  outline: "none",
3034
- ...GA.style
3195
+ ...JA.style
3035
3196
  },
3036
- onKeyDown: composeEventHandlers(GA.onKeyDown, (n) => {
3197
+ onKeyDown: composeEventHandlers(JA.onKeyDown, (n) => {
3037
3198
  let _ = n.target.closest("[data-radix-menu-content]") === n.currentTarget, E = n.ctrlKey || n.altKey || n.metaKey, O = n.key.length === 1;
3038
- _ && (n.key === "Tab" && n.preventDefault(), !E && O && uj(n.key));
3039
- let A = ej.current;
3199
+ _ && (n.key === "Tab" && n.preventDefault(), !E && O && pj(n.key));
3200
+ let A = rj.current;
3040
3201
  if (n.target !== A || !FIRST_LAST_KEYS.includes(n.key)) return;
3041
3202
  n.preventDefault();
3042
- let j = XA().filter((n) => !n.disabled).map((n) => n.ref.current);
3203
+ let j = $A().filter((n) => !n.disabled).map((n) => n.ref.current);
3043
3204
  LAST_KEYS.includes(n.key) && j.reverse(), focusFirst(j);
3044
3205
  }),
3045
3206
  onBlur: composeEventHandlers(_.onBlur, (n) => {
3046
- n.currentTarget.contains(n.target) || (window.clearTimeout(nj.current), rj.current = "");
3207
+ n.currentTarget.contains(n.target) || (window.clearTimeout(aj.current), oj.current = "");
3047
3208
  }),
3048
3209
  onPointerMove: composeEventHandlers(_.onPointerMove, whenMouse((n) => {
3049
- let _ = n.target, E = sj.current !== n.clientX;
3050
- n.currentTarget.contains(_) && E && (oj.current = n.clientX > sj.current ? "right" : "left", sj.current = n.clientX);
3210
+ let _ = n.target, E = uj.current !== n.clientX;
3211
+ n.currentTarget.contains(_) && E && (lj.current = n.clientX > uj.current ? "right" : "left", uj.current = n.clientX);
3051
3212
  }))
3052
3213
  })
3053
3214
  })
@@ -3598,7 +3759,7 @@ ContextMenuSubContent.displayName = SUB_CONTENT_NAME$1;
3598
3759
  function whenTouchOrPen(n) {
3599
3760
  return (_) => _.pointerType === "mouse" ? void 0 : n(_);
3600
3761
  }
3601
- var Root2$3 = ContextMenu, Trigger$3 = ContextMenuTrigger, Portal2$1 = ContextMenuPortal, Content2$2 = ContextMenuContent, Item2$1 = ContextMenuItem, Separator2$1 = ContextMenuSeparator, Sub2$1 = ContextMenuSub, SubTrigger2$1 = ContextMenuSubTrigger, SubContent2$1 = ContextMenuSubContent, DROPDOWN_MENU_NAME = "DropdownMenu", [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]), useMenuScope = createMenuScope(), [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME), DropdownMenu = (_) => {
3762
+ var Root2$3 = ContextMenu, Trigger$3 = ContextMenuTrigger, Portal2$1 = ContextMenuPortal, Content2$2 = ContextMenuContent, Item2$1 = ContextMenuItem, CheckboxItem2$1 = ContextMenuCheckboxItem, ItemIndicator2$1 = ContextMenuItemIndicator, Separator2$1 = ContextMenuSeparator, Sub2$1 = ContextMenuSub, SubTrigger2$1 = ContextMenuSubTrigger, SubContent2$1 = ContextMenuSubContent, DROPDOWN_MENU_NAME = "DropdownMenu", [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]), useMenuScope = createMenuScope(), [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME), DropdownMenu = (_) => {
3602
3763
  let { __scopeDropdownMenu: E, children: O, dir: A, open: j, defaultOpen: M, onOpenChange: N, modal: P = !0 } = _, z = useMenuScope(E), B = React$1.useRef(null), [H, U] = useControllableState({
3603
3764
  prop: j,
3604
3765
  defaultProp: M ?? !1,
@@ -3995,11 +4156,11 @@ function useStateMachine(_, E) {
3995
4156
  return React$1.useReducer((n, _) => E[n][_] ?? n, _);
3996
4157
  }
3997
4158
  var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME), [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME), ScrollArea = React$1.forwardRef((_, E) => {
3998
- let { __scopeScrollArea: O, type: A = "hover", dir: j, scrollHideDelay: M = 600, ...N } = _, [P, z] = React$1.useState(null), [B, H] = React$1.useState(null), [U, W] = React$1.useState(null), [G, Z] = React$1.useState(null), [GA, KA] = React$1.useState(null), [qA, JA] = React$1.useState(0), [YA, XA] = React$1.useState(0), [ZA, $A] = React$1.useState(!1), [ej, tj] = React$1.useState(!1), nj = useComposedRefs(E, (n) => z(n)), rj = useDirection(j);
4159
+ let { __scopeScrollArea: O, type: A = "hover", dir: j, scrollHideDelay: M = 600, ...N } = _, [P, z] = React$1.useState(null), [B, H] = React$1.useState(null), [U, W] = React$1.useState(null), [G, Z] = React$1.useState(null), [JA, YA] = React$1.useState(null), [XA, ZA] = React$1.useState(0), [QA, $A] = React$1.useState(0), [ej, nj] = React$1.useState(!1), [rj, ij] = React$1.useState(!1), aj = useComposedRefs(E, (n) => z(n)), oj = useDirection(j);
3999
4160
  return /* @__PURE__ */ jsx(ScrollAreaProvider, {
4000
4161
  scope: O,
4001
4162
  type: A,
4002
- dir: rj,
4163
+ dir: oj,
4003
4164
  scrollHideDelay: M,
4004
4165
  scrollArea: P,
4005
4166
  viewport: B,
@@ -4008,22 +4169,22 @@ var SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaS
4008
4169
  onContentChange: W,
4009
4170
  scrollbarX: G,
4010
4171
  onScrollbarXChange: Z,
4011
- scrollbarXEnabled: ZA,
4012
- onScrollbarXEnabledChange: $A,
4013
- scrollbarY: GA,
4014
- onScrollbarYChange: KA,
4015
- scrollbarYEnabled: ej,
4016
- onScrollbarYEnabledChange: tj,
4017
- onCornerWidthChange: JA,
4018
- onCornerHeightChange: XA,
4172
+ scrollbarXEnabled: ej,
4173
+ onScrollbarXEnabledChange: nj,
4174
+ scrollbarY: JA,
4175
+ onScrollbarYChange: YA,
4176
+ scrollbarYEnabled: rj,
4177
+ onScrollbarYEnabledChange: ij,
4178
+ onCornerWidthChange: ZA,
4179
+ onCornerHeightChange: $A,
4019
4180
  children: /* @__PURE__ */ jsx(Primitive.div, {
4020
- dir: rj,
4181
+ dir: oj,
4021
4182
  ...N,
4022
- ref: nj,
4183
+ ref: aj,
4023
4184
  style: {
4024
4185
  position: "relative",
4025
- "--radix-scroll-area-corner-width": qA + "px",
4026
- "--radix-scroll-area-corner-height": YA + "px",
4186
+ "--radix-scroll-area-corner-width": XA + "px",
4187
+ "--radix-scroll-area-corner-height": QA + "px",
4027
4188
  ..._.style
4028
4189
  }
4029
4190
  })
@@ -4294,46 +4455,46 @@ var ScrollAreaScrollbarHover = React$1.forwardRef((_, E) => {
4294
4455
  }
4295
4456
  });
4296
4457
  }), [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME), ScrollAreaScrollbarImpl = React$1.forwardRef((_, E) => {
4297
- let { __scopeScrollArea: O, sizes: A, hasThumb: j, onThumbChange: M, onThumbPointerUp: N, onThumbPointerDown: P, onThumbPositionChange: z, onDragScroll: B, onWheelScroll: H, onResize: U, ...W } = _, G = useScrollAreaContext(SCROLLBAR_NAME, O), [Z, GA] = React$1.useState(null), KA = useComposedRefs(E, (n) => GA(n)), qA = React$1.useRef(null), JA = React$1.useRef(""), YA = G.viewport, XA = A.content - A.viewport, ZA = useCallbackRef(H), $A = useCallbackRef(z), ej = useDebounceCallback(U, 10);
4298
- function tj(n) {
4299
- qA.current && B({
4300
- x: n.clientX - qA.current.left,
4301
- y: n.clientY - qA.current.top
4458
+ let { __scopeScrollArea: O, sizes: A, hasThumb: j, onThumbChange: M, onThumbPointerUp: N, onThumbPointerDown: P, onThumbPositionChange: z, onDragScroll: B, onWheelScroll: H, onResize: U, ...W } = _, G = useScrollAreaContext(SCROLLBAR_NAME, O), [Z, JA] = React$1.useState(null), YA = useComposedRefs(E, (n) => JA(n)), XA = React$1.useRef(null), ZA = React$1.useRef(""), QA = G.viewport, $A = A.content - A.viewport, ej = useCallbackRef(H), nj = useCallbackRef(z), rj = useDebounceCallback(U, 10);
4459
+ function ij(n) {
4460
+ XA.current && B({
4461
+ x: n.clientX - XA.current.left,
4462
+ y: n.clientY - XA.current.top
4302
4463
  });
4303
4464
  }
4304
4465
  return React$1.useEffect(() => {
4305
4466
  let n = (n) => {
4306
4467
  let _ = n.target;
4307
- Z?.contains(_) && ZA(n, XA);
4468
+ Z?.contains(_) && ej(n, $A);
4308
4469
  };
4309
4470
  return document.addEventListener("wheel", n, { passive: !1 }), () => document.removeEventListener("wheel", n, { passive: !1 });
4310
4471
  }, [
4311
- YA,
4472
+ QA,
4312
4473
  Z,
4313
- XA,
4314
- ZA
4315
- ]), React$1.useEffect($A, [A, $A]), useResizeObserver(Z, ej), useResizeObserver(G.content, ej), /* @__PURE__ */ jsx(ScrollbarProvider, {
4474
+ $A,
4475
+ ej
4476
+ ]), React$1.useEffect(nj, [A, nj]), useResizeObserver(Z, rj), useResizeObserver(G.content, rj), /* @__PURE__ */ jsx(ScrollbarProvider, {
4316
4477
  scope: O,
4317
4478
  scrollbar: Z,
4318
4479
  hasThumb: j,
4319
4480
  onThumbChange: useCallbackRef(M),
4320
4481
  onThumbPointerUp: useCallbackRef(N),
4321
- onThumbPositionChange: $A,
4482
+ onThumbPositionChange: nj,
4322
4483
  onThumbPointerDown: useCallbackRef(P),
4323
4484
  children: /* @__PURE__ */ jsx(Primitive.div, {
4324
4485
  ...W,
4325
- ref: KA,
4486
+ ref: YA,
4326
4487
  style: {
4327
4488
  position: "absolute",
4328
4489
  ...W.style
4329
4490
  },
4330
4491
  onPointerDown: composeEventHandlers(_.onPointerDown, (n) => {
4331
- n.button === 0 && (n.target.setPointerCapture(n.pointerId), qA.current = Z.getBoundingClientRect(), JA.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", G.viewport && (G.viewport.style.scrollBehavior = "auto"), tj(n));
4492
+ n.button === 0 && (n.target.setPointerCapture(n.pointerId), XA.current = Z.getBoundingClientRect(), ZA.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", G.viewport && (G.viewport.style.scrollBehavior = "auto"), ij(n));
4332
4493
  }),
4333
- onPointerMove: composeEventHandlers(_.onPointerMove, tj),
4494
+ onPointerMove: composeEventHandlers(_.onPointerMove, ij),
4334
4495
  onPointerUp: composeEventHandlers(_.onPointerUp, (n) => {
4335
4496
  let _ = n.target;
4336
- _.hasPointerCapture(n.pointerId) && _.releasePointerCapture(n.pointerId), document.body.style.webkitUserSelect = JA.current, G.viewport && (G.viewport.style.scrollBehavior = ""), qA.current = null;
4497
+ _.hasPointerCapture(n.pointerId) && _.releasePointerCapture(n.pointerId), document.body.style.webkitUserSelect = ZA.current, G.viewport && (G.viewport.style.scrollBehavior = ""), XA.current = null;
4337
4498
  })
4338
4499
  })
4339
4500
  });
@@ -4475,7 +4636,7 @@ function useResizeObserver(n, _) {
4475
4636
  }, [n, E]);
4476
4637
  }
4477
4638
  var Root$1 = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaScrollbar, Thumb$1 = ScrollAreaThumb, Corner = ScrollAreaCorner, SWITCH_NAME = "Switch", [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME), [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME), Switch = React$1.forwardRef((_, E) => {
4478
- let { __scopeSwitch: O, name: A, checked: j, defaultChecked: M, required: N, disabled: P, value: z = "on", onCheckedChange: B, form: H, ...U } = _, [W, G] = React$1.useState(null), Z = useComposedRefs(E, (n) => G(n)), GA = React$1.useRef(!1), KA = W ? H || !!W.closest("form") : !0, [qA, JA] = useControllableState({
4639
+ let { __scopeSwitch: O, name: A, checked: j, defaultChecked: M, required: N, disabled: P, value: z = "on", onCheckedChange: B, form: H, ...U } = _, [W, G] = React$1.useState(null), Z = useComposedRefs(E, (n) => G(n)), JA = React$1.useRef(!1), YA = W ? H || !!W.closest("form") : !0, [XA, ZA] = useControllableState({
4479
4640
  prop: j,
4480
4641
  defaultProp: M ?? !1,
4481
4642
  onChange: B,
@@ -4483,28 +4644,28 @@ var Root$1 = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaSc
4483
4644
  });
4484
4645
  return /* @__PURE__ */ jsxs(SwitchProvider, {
4485
4646
  scope: O,
4486
- checked: qA,
4647
+ checked: XA,
4487
4648
  disabled: P,
4488
4649
  children: [/* @__PURE__ */ jsx(Primitive.button, {
4489
4650
  type: "button",
4490
4651
  role: "switch",
4491
- "aria-checked": qA,
4652
+ "aria-checked": XA,
4492
4653
  "aria-required": N,
4493
- "data-state": getState(qA),
4654
+ "data-state": getState(XA),
4494
4655
  "data-disabled": P ? "" : void 0,
4495
4656
  disabled: P,
4496
4657
  value: z,
4497
4658
  ...U,
4498
4659
  ref: Z,
4499
4660
  onClick: composeEventHandlers(_.onClick, (n) => {
4500
- JA((n) => !n), KA && (GA.current = n.isPropagationStopped(), GA.current || n.stopPropagation());
4661
+ ZA((n) => !n), YA && (JA.current = n.isPropagationStopped(), JA.current || n.stopPropagation());
4501
4662
  })
4502
- }), KA && /* @__PURE__ */ jsx(SwitchBubbleInput, {
4663
+ }), YA && /* @__PURE__ */ jsx(SwitchBubbleInput, {
4503
4664
  control: W,
4504
- bubbles: !GA.current,
4665
+ bubbles: !JA.current,
4505
4666
  name: A,
4506
4667
  value: z,
4507
- checked: qA,
4668
+ checked: XA,
4508
4669
  required: N,
4509
4670
  disabled: P,
4510
4671
  form: H,
@@ -4688,22 +4849,22 @@ var Root2 = Tabs, List = TabsList, Trigger = TabsTrigger, Content = TabsContent,
4688
4849
  };
4689
4850
  TooltipProvider.displayName = PROVIDER_NAME;
4690
4851
  var TOOLTIP_NAME = "Tooltip", [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME), Tooltip = (_) => {
4691
- let { __scopeTooltip: E, children: O, open: A, defaultOpen: j, onOpenChange: M, disableHoverableContent: N, delayDuration: P } = _, z = useTooltipProviderContext(TOOLTIP_NAME, _.__scopeTooltip), B = usePopperScope(E), [H, U] = React$1.useState(null), W = useId$1(), G = React$1.useRef(0), Z = N ?? z.disableHoverableContent, GA = P ?? z.delayDuration, KA = React$1.useRef(!1), [qA, JA] = useControllableState({
4852
+ let { __scopeTooltip: E, children: O, open: A, defaultOpen: j, onOpenChange: M, disableHoverableContent: N, delayDuration: P } = _, z = useTooltipProviderContext(TOOLTIP_NAME, _.__scopeTooltip), B = usePopperScope(E), [H, U] = React$1.useState(null), W = useId$1(), G = React$1.useRef(0), Z = N ?? z.disableHoverableContent, JA = P ?? z.delayDuration, YA = React$1.useRef(!1), [XA, ZA] = useControllableState({
4692
4853
  prop: A,
4693
4854
  defaultProp: j ?? !1,
4694
4855
  onChange: (n) => {
4695
4856
  n ? (z.onOpen(), document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))) : z.onClose(), M?.(n);
4696
4857
  },
4697
4858
  caller: TOOLTIP_NAME
4698
- }), YA = React$1.useMemo(() => qA ? KA.current ? "delayed-open" : "instant-open" : "closed", [qA]), XA = React$1.useCallback(() => {
4699
- window.clearTimeout(G.current), G.current = 0, KA.current = !1, JA(!0);
4700
- }, [JA]), ZA = React$1.useCallback(() => {
4701
- window.clearTimeout(G.current), G.current = 0, JA(!1);
4702
- }, [JA]), $A = React$1.useCallback(() => {
4859
+ }), QA = React$1.useMemo(() => XA ? YA.current ? "delayed-open" : "instant-open" : "closed", [XA]), $A = React$1.useCallback(() => {
4860
+ window.clearTimeout(G.current), G.current = 0, YA.current = !1, ZA(!0);
4861
+ }, [ZA]), ej = React$1.useCallback(() => {
4862
+ window.clearTimeout(G.current), G.current = 0, ZA(!1);
4863
+ }, [ZA]), nj = React$1.useCallback(() => {
4703
4864
  window.clearTimeout(G.current), G.current = window.setTimeout(() => {
4704
- KA.current = !0, JA(!0), G.current = 0;
4705
- }, GA);
4706
- }, [GA, JA]);
4865
+ YA.current = !0, ZA(!0), G.current = 0;
4866
+ }, JA);
4867
+ }, [JA, ZA]);
4707
4868
  return React$1.useEffect(() => () => {
4708
4869
  G.current &&= (window.clearTimeout(G.current), 0);
4709
4870
  }, []), /* @__PURE__ */ jsx(Root2$4, {
@@ -4711,22 +4872,22 @@ var TOOLTIP_NAME = "Tooltip", [TooltipContextProvider, useTooltipContext] = crea
4711
4872
  children: /* @__PURE__ */ jsx(TooltipContextProvider, {
4712
4873
  scope: E,
4713
4874
  contentId: W,
4714
- open: qA,
4715
- stateAttribute: YA,
4875
+ open: XA,
4876
+ stateAttribute: QA,
4716
4877
  trigger: H,
4717
4878
  onTriggerChange: U,
4718
4879
  onTriggerEnter: React$1.useCallback(() => {
4719
- z.isOpenDelayedRef.current ? $A() : XA();
4880
+ z.isOpenDelayedRef.current ? nj() : $A();
4720
4881
  }, [
4721
4882
  z.isOpenDelayedRef,
4722
- $A,
4723
- XA
4883
+ nj,
4884
+ $A
4724
4885
  ]),
4725
4886
  onTriggerLeave: React$1.useCallback(() => {
4726
- Z ? ZA() : (window.clearTimeout(G.current), G.current = 0);
4727
- }, [ZA, Z]),
4728
- onOpen: XA,
4729
- onClose: ZA,
4887
+ Z ? ej() : (window.clearTimeout(G.current), G.current = 0);
4888
+ }, [ej, Z]),
4889
+ onOpen: $A,
4890
+ onClose: ej,
4730
4891
  disableHoverableContent: Z,
4731
4892
  children: O
4732
4893
  })
@@ -5539,14 +5700,14 @@ var I$3 = React$1.forwardRef((_, E) => {
5539
5700
  React$1.useEffect(() => U(O), [O]);
5540
5701
  let [W, G] = React$1.useState(A);
5541
5702
  React$1.useEffect(() => G(A), [A]);
5542
- let [Z, GA] = React$1.useState(j);
5543
- React$1.useEffect(() => GA(j), [j]);
5544
- let [KA, qA] = React$1.useState(M);
5545
- React$1.useEffect(() => qA(M), [M]);
5546
- let [JA, YA] = React$1.useState(N);
5547
- React$1.useEffect(() => YA(N), [N]);
5548
- let [XA, ZA] = React$1.useState(P);
5549
- return React$1.useEffect(() => ZA(P), [P]), React$1.createElement(A$2, {
5703
+ let [Z, JA] = React$1.useState(j);
5704
+ React$1.useEffect(() => JA(j), [j]);
5705
+ let [YA, XA] = React$1.useState(M);
5706
+ React$1.useEffect(() => XA(M), [M]);
5707
+ let [ZA, QA] = React$1.useState(N);
5708
+ React$1.useEffect(() => QA(N), [N]);
5709
+ let [$A, ej] = React$1.useState(P);
5710
+ return React$1.useEffect(() => ej(P), [P]), React$1.createElement(A$2, {
5550
5711
  ...B,
5551
5712
  ref: E,
5552
5713
  isRoot: !0,
@@ -5554,62 +5715,62 @@ var I$3 = React$1.forwardRef((_, E) => {
5554
5715
  appearance: H,
5555
5716
  accentColor: W,
5556
5717
  grayColor: Z,
5557
- panelBackground: KA,
5558
- radius: JA,
5559
- scaling: XA,
5718
+ panelBackground: YA,
5719
+ radius: ZA,
5720
+ scaling: $A,
5560
5721
  onAppearanceChange: U,
5561
5722
  onAccentColorChange: G,
5562
- onGrayColorChange: GA,
5563
- onPanelBackgroundChange: qA,
5564
- onRadiusChange: YA,
5565
- onScalingChange: ZA
5723
+ onGrayColorChange: JA,
5724
+ onPanelBackgroundChange: XA,
5725
+ onRadiusChange: QA,
5726
+ onScalingChange: ej
5566
5727
  });
5567
5728
  });
5568
5729
  I$3.displayName = "ThemeRoot";
5569
5730
  var A$2 = React$1.forwardRef((_, E) => {
5570
- let O = React$1.useContext(P$3), { asChild: A, isRoot: j, hasBackground: M, appearance: N = O?.appearance ?? s$13.appearance.default, accentColor: P = O?.accentColor ?? s$13.accentColor.default, grayColor: z = O?.resolvedGrayColor ?? s$13.grayColor.default, panelBackground: B = O?.panelBackground ?? s$13.panelBackground.default, radius: H = O?.radius ?? s$13.radius.default, scaling: U = O?.scaling ?? s$13.scaling.default, onAppearanceChange: W = d$5, onAccentColorChange: G = d$5, onGrayColorChange: Z = d$5, onPanelBackgroundChange: GA = d$5, onRadiusChange: KA = d$5, onScalingChange: qA = d$5, ...JA } = _, YA = A ? Slot$3 : "div", XA = z === "auto" ? a$12(P) : z, ZA = _.appearance === "light" || _.appearance === "dark", QA = M === void 0 ? j || ZA : M;
5731
+ let O = React$1.useContext(P$3), { asChild: A, isRoot: j, hasBackground: M, appearance: N = O?.appearance ?? s$13.appearance.default, accentColor: P = O?.accentColor ?? s$13.accentColor.default, grayColor: z = O?.resolvedGrayColor ?? s$13.grayColor.default, panelBackground: B = O?.panelBackground ?? s$13.panelBackground.default, radius: H = O?.radius ?? s$13.radius.default, scaling: U = O?.scaling ?? s$13.scaling.default, onAppearanceChange: W = d$5, onAccentColorChange: G = d$5, onGrayColorChange: Z = d$5, onPanelBackgroundChange: JA = d$5, onRadiusChange: YA = d$5, onScalingChange: XA = d$5, ...ZA } = _, QA = A ? Slot$3 : "div", $A = z === "auto" ? a$12(P) : z, ej = _.appearance === "light" || _.appearance === "dark", tj = M === void 0 ? j || ej : M;
5571
5732
  return React$1.createElement(P$3.Provider, { value: React$1.useMemo(() => ({
5572
5733
  appearance: N,
5573
5734
  accentColor: P,
5574
5735
  grayColor: z,
5575
- resolvedGrayColor: XA,
5736
+ resolvedGrayColor: $A,
5576
5737
  panelBackground: B,
5577
5738
  radius: H,
5578
5739
  scaling: U,
5579
5740
  onAppearanceChange: W,
5580
5741
  onAccentColorChange: G,
5581
5742
  onGrayColorChange: Z,
5582
- onPanelBackgroundChange: GA,
5583
- onRadiusChange: KA,
5584
- onScalingChange: qA
5743
+ onPanelBackgroundChange: JA,
5744
+ onRadiusChange: YA,
5745
+ onScalingChange: XA
5585
5746
  }), [
5586
5747
  N,
5587
5748
  P,
5588
5749
  z,
5589
- XA,
5750
+ $A,
5590
5751
  B,
5591
5752
  H,
5592
5753
  U,
5593
5754
  W,
5594
5755
  G,
5595
5756
  Z,
5596
- GA,
5597
- KA,
5598
- qA
5599
- ]) }, React$1.createElement(YA, {
5757
+ JA,
5758
+ YA,
5759
+ XA
5760
+ ]) }, React$1.createElement(QA, {
5600
5761
  "data-is-root-theme": j ? "true" : "false",
5601
5762
  "data-accent-color": P,
5602
- "data-gray-color": XA,
5603
- "data-has-background": QA ? "true" : "false",
5763
+ "data-gray-color": $A,
5764
+ "data-has-background": tj ? "true" : "false",
5604
5765
  "data-panel-background": B,
5605
5766
  "data-radius": H,
5606
5767
  "data-scaling": U,
5607
5768
  ref: E,
5608
- ...JA,
5769
+ ...ZA,
5609
5770
  className: (0, import_classnames$18.default)("radix-themes", {
5610
5771
  light: N === "light",
5611
5772
  dark: N === "dark"
5612
- }, JA.className)
5773
+ }, ZA.className)
5613
5774
  }));
5614
5775
  });
5615
5776
  A$2.displayName = "ThemeImpl";
@@ -5898,7 +6059,7 @@ var e$2 = Slot$3, s$12 = ["div", "span"], o$8 = [
5898
6059
  customProperties: ["--grid-row-end"],
5899
6060
  responsive: !0
5900
6061
  }
5901
- }, import_classnames$16 = /* @__PURE__ */ __toESM(require_classnames()), p$1 = React$1.forwardRef((_, E) => {
6062
+ }, import_classnames$16 = /* @__PURE__ */ __toESM(require_classnames()), p = React$1.forwardRef((_, E) => {
5902
6063
  let { className: O, asChild: A, as: j = "div", ...M } = v$1(_, p$12, u$3, r$1);
5903
6064
  return React$1.createElement(A ? e$2 : j, {
5904
6065
  ...M,
@@ -5906,7 +6067,7 @@ var e$2 = Slot$3, s$12 = ["div", "span"], o$8 = [
5906
6067
  className: (0, import_classnames$16.default)("rt-Box", O)
5907
6068
  });
5908
6069
  });
5909
- p$1.displayName = "Box";
6070
+ p.displayName = "Box";
5910
6071
  var t$5 = [
5911
6072
  "1",
5912
6073
  "2",
@@ -6042,7 +6203,7 @@ var t$5 = [
6042
6203
  function f$6(n) {
6043
6204
  return n === "between" ? "space-between" : n;
6044
6205
  }
6045
- var import_classnames$15 = /* @__PURE__ */ __toESM(require_classnames()), p = React$1.forwardRef((_, E) => {
6206
+ var import_classnames$15 = /* @__PURE__ */ __toESM(require_classnames()), p$1 = React$1.forwardRef((_, E) => {
6046
6207
  let { className: O, asChild: A, as: j = "div", ...M } = v$1(_, u$2, u$3, r$1);
6047
6208
  return React$1.createElement(A ? e$2 : j, {
6048
6209
  ...M,
@@ -6050,7 +6211,7 @@ var import_classnames$15 = /* @__PURE__ */ __toESM(require_classnames()), p = Re
6050
6211
  className: (0, import_classnames$15.default)("rt-Flex", O)
6051
6212
  });
6052
6213
  });
6053
- p.displayName = "Flex";
6214
+ p$1.displayName = "Flex";
6054
6215
  var s$10 = {
6055
6216
  size: {
6056
6217
  type: "enum",
@@ -6075,7 +6236,7 @@ var s$10 = {
6075
6236
  ref: E,
6076
6237
  className: (0, import_classnames$14.default)("rt-Spinner", O)
6077
6238
  }, React$1.createElement("span", { className: "rt-SpinnerLeaf" }), React$1.createElement("span", { className: "rt-SpinnerLeaf" }), React$1.createElement("span", { className: "rt-SpinnerLeaf" }), React$1.createElement("span", { className: "rt-SpinnerLeaf" }), React$1.createElement("span", { className: "rt-SpinnerLeaf" }), React$1.createElement("span", { className: "rt-SpinnerLeaf" }), React$1.createElement("span", { className: "rt-SpinnerLeaf" }), React$1.createElement("span", { className: "rt-SpinnerLeaf" }));
6078
- return A === void 0 ? N : React$1.createElement(p, {
6239
+ return A === void 0 ? N : React$1.createElement(p$1, {
6079
6240
  asChild: !0,
6080
6241
  position: "relative",
6081
6242
  align: "center",
@@ -6087,7 +6248,7 @@ var s$10 = {
6087
6248
  visibility: "hidden"
6088
6249
  },
6089
6250
  inert: void 0
6090
- }, A), React$1.createElement(p, {
6251
+ }, A), React$1.createElement(p$1, {
6091
6252
  asChild: !0,
6092
6253
  align: "center",
6093
6254
  justify: "center",
@@ -6124,7 +6285,7 @@ var import_classnames$13 = /* @__PURE__ */ __toESM(require_classnames()), n$1 =
6124
6285
  visibility: "hidden"
6125
6286
  },
6126
6287
  "aria-hidden": !0
6127
- }, j), React$1.createElement(d$4, null, j), React$1.createElement(p, {
6288
+ }, j), React$1.createElement(d$4, null, j), React$1.createElement(p$1, {
6128
6289
  asChild: !0,
6129
6290
  align: "center",
6130
6291
  justify: "center",
@@ -6381,7 +6542,7 @@ function S$2(n) {
6381
6542
  return [(0, import_classnames$10.default)(_, O, j, N, z, H, W), l$1(E, A, M, P, B, U, G)];
6382
6543
  }
6383
6544
  var import_classnames$9 = /* @__PURE__ */ __toESM(require_classnames()), c = React$1.forwardRef((_, E) => {
6384
- let { rest: O, ...A } = a$5(_), [j, M] = S$2(A), { asChild: N, children: P, className: z, style: B, type: H, scrollHideDelay: U = H === "scroll" ? void 0 : 0, dir: W, size: G = t$3.size.default, radius: Z = t$3.radius.default, scrollbars: GA = t$3.scrollbars.default, ...KA } = O;
6545
+ let { rest: O, ...A } = a$5(_), [j, M] = S$2(A), { asChild: N, children: P, className: z, style: B, type: H, scrollHideDelay: U = H === "scroll" ? void 0 : 0, dir: W, size: G = t$3.size.default, radius: Z = t$3.radius.default, scrollbars: JA = t$3.scrollbars.default, ...YA } = O;
6385
6546
  return React$1.createElement(Root$1, {
6386
6547
  type: H,
6387
6548
  scrollHideDelay: U,
@@ -6392,10 +6553,10 @@ var import_classnames$9 = /* @__PURE__ */ __toESM(require_classnames()), c = Rea
6392
6553
  asChild: N,
6393
6554
  children: P
6394
6555
  }, (_) => React$1.createElement(React$1.Fragment, null, React$1.createElement(Viewport, {
6395
- ...KA,
6556
+ ...YA,
6396
6557
  ref: E,
6397
6558
  className: "rt-ScrollAreaViewport"
6398
- }, _), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), GA === "vertical" ? null : React$1.createElement(Scrollbar, {
6559
+ }, _), React$1.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), JA === "vertical" ? null : React$1.createElement(Scrollbar, {
6399
6560
  "data-radius": Z,
6400
6561
  orientation: "horizontal",
6401
6562
  className: (0, import_classnames$9.default)("rt-ScrollAreaScrollbar", g$3({
@@ -6403,7 +6564,7 @@ var import_classnames$9 = /* @__PURE__ */ __toESM(require_classnames()), c = Rea
6403
6564
  value: G,
6404
6565
  propValues: t$3.size.values
6405
6566
  }))
6406
- }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), GA === "horizontal" ? null : React$1.createElement(Scrollbar, {
6567
+ }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), JA === "horizontal" ? null : React$1.createElement(Scrollbar, {
6407
6568
  "data-radius": Z,
6408
6569
  orientation: "vertical",
6409
6570
  className: (0, import_classnames$9.default)("rt-ScrollAreaScrollbar", g$3({
@@ -6411,7 +6572,7 @@ var import_classnames$9 = /* @__PURE__ */ __toESM(require_classnames()), c = Rea
6411
6572
  value: G,
6412
6573
  propValues: t$3.size.values
6413
6574
  }))
6414
- }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), GA === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
6575
+ }, React$1.createElement(Thumb$1, { className: "rt-ScrollAreaThumb" })), JA === "both" ? React$1.createElement(Corner, { className: "rt-ScrollAreaCorner" }) : null)));
6415
6576
  });
6416
6577
  c.displayName = "ScrollArea";
6417
6578
  var n$2 = {
@@ -7614,17 +7775,17 @@ function $e({ document: n, event: _, hitRegions: E, initialLayoutMap: O, mounted
7614
7775
  E.forEach((n) => {
7615
7776
  let { group: E, groupSize: P } = n, { disableCursor: z, orientation: B, panels: H } = E, U = 0;
7616
7777
  U = j ? B === "horizontal" ? (_.clientX - j.x) / P * 100 : (_.clientY - j.y) / P * 100 : B === "horizontal" ? _.clientX < 0 ? -100 : 100 : _.clientY < 0 ? -100 : 100;
7617
- let W = O.get(E), { defaultLayoutDeferred: G, derivedPanelConstraints: Z, layout: GA, separatorToPanels: KA } = A.get(E) ?? { defaultLayoutDeferred: !1 };
7618
- if (Z && W && GA && KA) {
7778
+ let W = O.get(E), { defaultLayoutDeferred: G, derivedPanelConstraints: Z, layout: JA, separatorToPanels: YA } = A.get(E) ?? { defaultLayoutDeferred: !1 };
7779
+ if (Z && W && JA && YA) {
7619
7780
  let _ = Z$1({
7620
7781
  delta: U,
7621
7782
  initialLayout: W,
7622
7783
  panelConstraints: Z,
7623
7784
  pivotIndices: n.panels.map((n) => H.indexOf(n)),
7624
- prevLayout: GA,
7785
+ prevLayout: JA,
7625
7786
  trigger: "mouse-or-touch"
7626
7787
  });
7627
- if (B$1(_, GA)) {
7788
+ if (B$1(_, JA)) {
7628
7789
  if (U !== 0 && !z) switch (B) {
7629
7790
  case "horizontal":
7630
7791
  M |= U < 0 ? De : Oe$1;
@@ -7638,7 +7799,7 @@ function $e({ document: n, event: _, hitRegions: E, initialLayoutMap: O, mounted
7638
7799
  defaultLayoutDeferred: G,
7639
7800
  derivedPanelConstraints: Z,
7640
7801
  layout: _,
7641
- separatorToPanels: KA
7802
+ separatorToPanels: YA
7642
7803
  });
7643
7804
  let E = n.group.panels.map(({ id: n }) => n).join(",");
7644
7805
  n.group.inMemoryLayouts[E] = _;
@@ -7850,64 +8011,64 @@ function Pt(n, _) {
7850
8011
  function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, disabled: A, elementRef: j, groupRef: M, id: N, onLayoutChange: P, orientation: z = "horizontal", style: B, ...U }) {
7851
8012
  let W = useRef({}), G = le$1((n) => {
7852
8013
  B$1(W.current, n) || (W.current = n, P?.(n));
7853
- }), Z = ae$1(N), JA = useRef(null), [YA, XA] = useState(!1), [ZA, $A] = useState(E ?? {}), [ej, tj] = wt(), nj = useRef({
8014
+ }), Z = ae$1(N), ZA = useRef(null), [QA, $A] = useState(!1), [ej, nj] = useState(E ?? {}), [rj, ij] = wt(), aj = useRef({
7854
8015
  lastExpandedPanelSizes: {},
7855
8016
  layouts: {},
7856
8017
  panels: [],
7857
8018
  separators: []
7858
- }), rj = ue$1(JA, j);
8019
+ }), oj = ue$1(ZA, j);
7859
8020
  Pt(Z, M);
7860
- let ij = useMemo(() => ({
8021
+ let sj = useMemo(() => ({
7861
8022
  id: Z,
7862
8023
  orientation: z,
7863
8024
  registerPanel: (n) => {
7864
- let _ = nj.current;
7865
- return _.panels = ie$1(z, [..._.panels, n]), tj(), () => {
7866
- _.panels = _.panels.filter((_) => _ !== n), tj();
8025
+ let _ = aj.current;
8026
+ return _.panels = ie$1(z, [..._.panels, n]), ij(), () => {
8027
+ _.panels = _.panels.filter((_) => _ !== n), ij();
7867
8028
  };
7868
8029
  },
7869
8030
  registerSeparator: (n) => {
7870
- let _ = nj.current;
7871
- return _.separators = ie$1(z, [..._.separators, n]), tj(), () => {
7872
- _.separators = _.separators.filter((_) => _ !== n), tj();
8031
+ let _ = aj.current;
8032
+ return _.separators = ie$1(z, [..._.separators, n]), ij(), () => {
8033
+ _.separators = _.separators.filter((_) => _ !== n), ij();
7873
8034
  };
7874
8035
  }
7875
8036
  }), [
7876
8037
  Z,
7877
- tj,
8038
+ ij,
7878
8039
  z
7879
- ]), aj = Lt({
8040
+ ]), cj = Lt({
7880
8041
  defaultLayout: E,
7881
8042
  disableCursor: O
7882
- }), oj = useRef(null);
8043
+ }), lj = useRef(null);
7883
8044
  A$1(() => {
7884
- let n = JA.current;
8045
+ let n = ZA.current;
7885
8046
  if (n === null) return;
7886
- let _ = nj.current, E = {
7887
- defaultLayout: aj.defaultLayout,
7888
- disableCursor: !!aj.disableCursor,
8047
+ let _ = aj.current, E = {
8048
+ defaultLayout: cj.defaultLayout,
8049
+ disableCursor: !!cj.disableCursor,
7889
8050
  disabled: !!A,
7890
8051
  element: n,
7891
8052
  id: Z,
7892
- inMemoryLastExpandedPanelSizes: nj.current.lastExpandedPanelSizes,
7893
- inMemoryLayouts: nj.current.layouts,
8053
+ inMemoryLastExpandedPanelSizes: aj.current.lastExpandedPanelSizes,
8054
+ inMemoryLayouts: aj.current.layouts,
7894
8055
  orientation: z,
7895
8056
  panels: _.panels,
7896
8057
  separators: _.separators
7897
8058
  };
7898
- oj.current = E;
8059
+ lj.current = E;
7899
8060
  let O = bt(E), j = D$1().mountedGroups.get(E);
7900
8061
  if (j) {
7901
8062
  let { defaultLayoutDeferred: n, derivedPanelConstraints: _, layout: E } = j;
7902
- !n && _.length > 0 && ($A(E), G?.(E));
8063
+ !n && _.length > 0 && (nj(E), G?.(E));
7903
8064
  }
7904
8065
  let M = T$1.addListener("interactionStateChange", (n) => {
7905
8066
  switch (n.state) {
7906
8067
  case "active":
7907
- XA(n.hitRegions.some((n) => n.group === E));
8068
+ $A(n.hitRegions.some((n) => n.group === E));
7908
8069
  break;
7909
8070
  default:
7910
- XA(!1);
8071
+ $A(!1);
7911
8072
  break;
7912
8073
  }
7913
8074
  }), N = T$1.addListener("mountedGroupsChange", (n) => {
@@ -7915,30 +8076,30 @@ function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, dis
7915
8076
  if (_) {
7916
8077
  let { defaultLayoutDeferred: n, derivedPanelConstraints: E, layout: O } = _;
7917
8078
  if (n || E.length === 0) return;
7918
- $A(O), G?.(O);
8079
+ nj(O), G?.(O);
7919
8080
  }
7920
8081
  });
7921
8082
  return () => {
7922
- oj.current = null, O(), M(), N();
8083
+ lj.current = null, O(), M(), N();
7923
8084
  };
7924
8085
  }, [
7925
8086
  A,
7926
8087
  Z,
7927
8088
  G,
7928
8089
  z,
7929
- ej,
7930
- aj
8090
+ rj,
8091
+ cj
7931
8092
  ]), useEffect(() => {
7932
- let n = oj.current;
8093
+ let n = lj.current;
7933
8094
  n && (n.defaultLayout = E, n.disableCursor = !!O);
7934
8095
  });
7935
- let sj = { [Fe]: YA ? "none" : void 0 };
7936
- for (let n in ZA) {
8096
+ let uj = { [Fe]: QA ? "none" : void 0 };
8097
+ for (let n in ej) {
7937
8098
  let _ = Ve(Z, n);
7938
- sj[_] = ZA[n];
8099
+ uj[_] = ej[n];
7939
8100
  }
7940
8101
  return /* @__PURE__ */ jsx(je.Provider, {
7941
- value: ij,
8102
+ value: sj,
7942
8103
  children: /* @__PURE__ */ jsx("div", {
7943
8104
  ...U,
7944
8105
  "aria-orientation": z,
@@ -7946,13 +8107,13 @@ function Rt({ children: n, className: _, defaultLayout: E, disableCursor: O, dis
7946
8107
  "data-group": !0,
7947
8108
  "data-testid": Z,
7948
8109
  id: Z,
7949
- ref: rj,
8110
+ ref: oj,
7950
8111
  style: {
7951
8112
  height: "100%",
7952
8113
  width: "100%",
7953
8114
  overflow: "hidden",
7954
8115
  ...B,
7955
- ...sj,
8116
+ ...uj,
7956
8117
  display: "flex",
7957
8118
  flexDirection: z === "horizontal" ? "row" : "column",
7958
8119
  flexWrap: "nowrap"
@@ -8070,12 +8231,12 @@ function It(n, _) {
8070
8231
  });
8071
8232
  }
8072
8233
  function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O = !1, defaultSize: A, elementRef: j, id: M, maxSize: N = "100%", minSize: P = "0%", onResize: z, panelRef: B, style: H, ...U }) {
8073
- let W = !!M, G = ae$1(M), Z = useRef(null), GA = ue$1(Z, j), { id: qA, registerPanel: JA } = ce$1(), YA = z !== null, XA = le$1((n, _, E) => {
8234
+ let W = !!M, G = ae$1(M), Z = useRef(null), JA = ue$1(Z, j), { id: XA, registerPanel: ZA } = ce$1(), QA = z !== null, $A = le$1((n, _, E) => {
8074
8235
  z?.(n, M, E);
8075
8236
  });
8076
8237
  A$1(() => {
8077
8238
  let n = Z.current;
8078
- if (n !== null) return JA({
8239
+ if (n !== null) return ZA({
8079
8240
  element: n,
8080
8241
  id: G,
8081
8242
  idIsStable: W,
@@ -8083,7 +8244,7 @@ function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O
8083
8244
  expandToSize: void 0,
8084
8245
  prevSize: void 0
8085
8246
  },
8086
- onResize: YA ? XA : void 0,
8247
+ onResize: QA ? $A : void 0,
8087
8248
  panelConstraints: {
8088
8249
  collapsedSize: E,
8089
8250
  collapsible: O,
@@ -8096,25 +8257,25 @@ function kt({ children: n, className: _, collapsedSize: E = "0%", collapsible: O
8096
8257
  E,
8097
8258
  O,
8098
8259
  A,
8099
- YA,
8260
+ QA,
8100
8261
  G,
8101
8262
  W,
8102
8263
  N,
8103
8264
  P,
8104
- XA,
8105
- JA
8265
+ $A,
8266
+ ZA
8106
8267
  ]), It(G, B);
8107
- let ZA = Ve(qA, G);
8268
+ let ej = Ve(XA, G);
8108
8269
  return /* @__PURE__ */ jsx("div", {
8109
8270
  ...U,
8110
8271
  "data-panel": !0,
8111
8272
  "data-testid": G,
8112
8273
  id: G,
8113
- ref: GA,
8274
+ ref: JA,
8114
8275
  style: {
8115
8276
  ...Gt,
8116
8277
  flexBasis: 0,
8117
- flexGrow: `var(${ZA}, 1)`,
8278
+ flexGrow: `var(${ej}, 1)`,
8118
8279
  flexShrink: 1,
8119
8280
  overflow: "hidden",
8120
8281
  pointerEvents: `var(${Fe})`
@@ -8177,7 +8338,7 @@ function Dt({ layout: n, panelConstraints: _, panelId: E, panelIndex: O }) {
8177
8338
  };
8178
8339
  }
8179
8340
  function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j }) {
8180
- let M = ae$1(O), [N, P] = useState({}), [z, B] = useState("inactive"), H = useRef(null), U = ue$1(H, E), { id: W, orientation: G, registerSeparator: Z } = ce$1(), GA = G === "horizontal" ? "vertical" : "horizontal";
8341
+ let M = ae$1(O), [N, P] = useState({}), [z, B] = useState("inactive"), H = useRef(null), U = ue$1(H, E), { id: W, orientation: G, registerSeparator: Z } = ce$1(), JA = G === "horizontal" ? "vertical" : "horizontal";
8181
8342
  return A$1(() => {
8182
8343
  let n = H.current;
8183
8344
  if (n !== null) {
@@ -8213,7 +8374,7 @@ function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j })
8213
8374
  ]), /* @__PURE__ */ jsx("div", {
8214
8375
  ...j,
8215
8376
  "aria-controls": N.valueControls,
8216
- "aria-orientation": GA,
8377
+ "aria-orientation": JA,
8217
8378
  "aria-valuemax": N.valueMax,
8218
8379
  "aria-valuemin": N.valueMin,
8219
8380
  "aria-valuenow": N.valueNow,
@@ -8234,167 +8395,7 @@ function Ot({ children: n, className: _, elementRef: E, id: O, style: A, ...j })
8234
8395
  });
8235
8396
  }
8236
8397
  Ot.displayName = "Separator";
8237
- function _objectWithoutPropertiesLoose(n, _) {
8238
- if (n == null) return {};
8239
- var E = {}, O = Object.keys(n), A, j;
8240
- for (j = 0; j < O.length; j++) A = O[j], !(_.indexOf(A) >= 0) && (E[A] = n[A]);
8241
- return E;
8242
- }
8243
- var _excluded$T = ["color"], CheckIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8244
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$T);
8245
- return createElement("svg", Object.assign({
8246
- width: "15",
8247
- height: "15",
8248
- viewBox: "0 0 15 15",
8249
- fill: "none",
8250
- xmlns: "http://www.w3.org/2000/svg"
8251
- }, A, { ref: _ }), createElement("path", {
8252
- d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
8253
- fill: O,
8254
- fillRule: "evenodd",
8255
- clipRule: "evenodd"
8256
- }));
8257
- }), _excluded$Y = ["color"], ChevronRightIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8258
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$Y);
8259
- return createElement("svg", Object.assign({
8260
- width: "15",
8261
- height: "15",
8262
- viewBox: "0 0 15 15",
8263
- fill: "none",
8264
- xmlns: "http://www.w3.org/2000/svg"
8265
- }, A, { ref: _ }), createElement("path", {
8266
- d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",
8267
- fill: O,
8268
- fillRule: "evenodd",
8269
- clipRule: "evenodd"
8270
- }));
8271
- }), _excluded$1r = ["color"], Cross2Icon = /* @__PURE__ */ forwardRef(function(n, _) {
8272
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$1r);
8273
- return createElement("svg", Object.assign({
8274
- width: "15",
8275
- height: "15",
8276
- viewBox: "0 0 15 15",
8277
- fill: "none",
8278
- xmlns: "http://www.w3.org/2000/svg"
8279
- }, A, { ref: _ }), createElement("path", {
8280
- d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
8281
- fill: O,
8282
- fillRule: "evenodd",
8283
- clipRule: "evenodd"
8284
- }));
8285
- }), _excluded$1M = ["color"], DoubleArrowLeftIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8286
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$1M);
8287
- return createElement("svg", Object.assign({
8288
- width: "15",
8289
- height: "15",
8290
- viewBox: "0 0 15 15",
8291
- fill: "none",
8292
- xmlns: "http://www.w3.org/2000/svg"
8293
- }, A, { ref: _ }), createElement("path", {
8294
- d: "M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",
8295
- fill: O,
8296
- fillRule: "evenodd",
8297
- clipRule: "evenodd"
8298
- }));
8299
- }), _excluded$1N = ["color"], DoubleArrowRightIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8300
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$1N);
8301
- return createElement("svg", Object.assign({
8302
- width: "15",
8303
- height: "15",
8304
- viewBox: "0 0 15 15",
8305
- fill: "none",
8306
- xmlns: "http://www.w3.org/2000/svg"
8307
- }, A, { ref: _ }), createElement("path", {
8308
- d: "M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",
8309
- fill: O,
8310
- fillRule: "evenodd",
8311
- clipRule: "evenodd"
8312
- }));
8313
- }), _excluded$25 = ["color"], EyeNoneIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8314
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$25);
8315
- return createElement("svg", Object.assign({
8316
- width: "15",
8317
- height: "15",
8318
- viewBox: "0 0 15 15",
8319
- fill: "none",
8320
- xmlns: "http://www.w3.org/2000/svg"
8321
- }, A, { ref: _ }), createElement("path", {
8322
- d: "M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z",
8323
- fill: O,
8324
- fillRule: "evenodd",
8325
- clipRule: "evenodd"
8326
- }));
8327
- }), _excluded$26 = ["color"], EyeOpenIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8328
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$26);
8329
- return createElement("svg", Object.assign({
8330
- width: "15",
8331
- height: "15",
8332
- viewBox: "0 0 15 15",
8333
- fill: "none",
8334
- xmlns: "http://www.w3.org/2000/svg"
8335
- }, A, { ref: _ }), createElement("path", {
8336
- d: "M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",
8337
- fill: O,
8338
- fillRule: "evenodd",
8339
- clipRule: "evenodd"
8340
- }));
8341
- }), _excluded$2l = ["color"], GearIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8342
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$2l);
8343
- return createElement("svg", Object.assign({
8344
- width: "15",
8345
- height: "15",
8346
- viewBox: "0 0 15 15",
8347
- fill: "none",
8348
- xmlns: "http://www.w3.org/2000/svg"
8349
- }, A, { ref: _ }), createElement("path", {
8350
- d: "M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z",
8351
- fill: O,
8352
- fillRule: "evenodd",
8353
- clipRule: "evenodd"
8354
- }));
8355
- }), _excluded$3x = ["color"], PlusIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8356
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$3x);
8357
- return createElement("svg", Object.assign({
8358
- width: "15",
8359
- height: "15",
8360
- viewBox: "0 0 15 15",
8361
- fill: "none",
8362
- xmlns: "http://www.w3.org/2000/svg"
8363
- }, A, { ref: _ }), createElement("path", {
8364
- d: "M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",
8365
- fill: O,
8366
- fillRule: "evenodd",
8367
- clipRule: "evenodd"
8368
- }));
8369
- }), _excluded$3V = ["color"], Share1Icon = /* @__PURE__ */ forwardRef(function(n, _) {
8370
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$3V);
8371
- return createElement("svg", Object.assign({
8372
- width: "15",
8373
- height: "15",
8374
- viewBox: "0 0 15 15",
8375
- fill: "none",
8376
- xmlns: "http://www.w3.org/2000/svg"
8377
- }, A, { ref: _ }), createElement("path", {
8378
- d: "M5 7.50003C5 8.32845 4.32843 9.00003 3.5 9.00003C2.67157 9.00003 2 8.32845 2 7.50003C2 6.6716 2.67157 6.00003 3.5 6.00003C4.32843 6.00003 5 6.6716 5 7.50003ZM5.71313 8.66388C5.29445 9.45838 4.46048 10 3.5 10C2.11929 10 1 8.88074 1 7.50003C1 6.11931 2.11929 5.00003 3.5 5.00003C4.46048 5.00003 5.29445 5.54167 5.71313 6.33616L9.10424 4.21671C9.03643 3.98968 9 3.74911 9 3.50003C9 2.11932 10.1193 1.00003 11.5 1.00003C12.8807 1.00003 14 2.11932 14 3.50003C14 4.88074 12.8807 6.00003 11.5 6.00003C10.6915 6.00003 9.97264 5.61624 9.51566 5.0209L5.9853 7.22738C5.99502 7.31692 6 7.40789 6 7.50003C6 7.59216 5.99502 7.68312 5.9853 7.77267L9.51567 9.97915C9.97265 9.38382 10.6915 9.00003 11.5 9.00003C12.8807 9.00003 14 10.1193 14 11.5C14 12.8807 12.8807 14 11.5 14C10.1193 14 9 12.8807 9 11.5C9 11.2509 9.03643 11.0104 9.10425 10.7833L5.71313 8.66388ZM11.5 5.00003C12.3284 5.00003 13 4.32846 13 3.50003C13 2.6716 12.3284 2.00003 11.5 2.00003C10.6716 2.00003 10 2.6716 10 3.50003C10 4.32846 10.6716 5.00003 11.5 5.00003ZM13 11.5C13 12.3285 12.3284 13 11.5 13C10.6716 13 10 12.3285 10 11.5C10 10.6716 10.6716 10 11.5 10C12.3284 10 13 10.6716 13 11.5Z",
8379
- fill: O,
8380
- fillRule: "evenodd",
8381
- clipRule: "evenodd"
8382
- }));
8383
- }), _excluded$4G = ["color"], TrashIcon = /* @__PURE__ */ forwardRef(function(n, _) {
8384
- var E = n.color, O = E === void 0 ? "currentColor" : E, A = _objectWithoutPropertiesLoose(n, _excluded$4G);
8385
- return createElement("svg", Object.assign({
8386
- width: "15",
8387
- height: "15",
8388
- viewBox: "0 0 15 15",
8389
- fill: "none",
8390
- xmlns: "http://www.w3.org/2000/svg"
8391
- }, A, { ref: _ }), createElement("path", {
8392
- d: "M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",
8393
- fill: O,
8394
- fillRule: "evenodd",
8395
- clipRule: "evenodd"
8396
- }));
8397
- }), EditorContext = createContext(void 0), SAFE_FONTS = [
8398
+ var EditorContext = createContext(void 0), SAFE_FONTS = [
8398
8399
  "Arial",
8399
8400
  "Helvetica",
8400
8401
  "Times New Roman",
@@ -8488,7 +8489,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
8488
8489
  }, []), B = React.useCallback((n) => {
8489
8490
  M((_) => ({
8490
8491
  ..._,
8491
- elements: _.elements.filter((_) => _.id !== n),
8492
+ elements: _.elements.filter((_) => _.id !== n && _.parentId !== n),
8492
8493
  selectedElementId: _.selectedElementId === n ? null : _.selectedElementId
8493
8494
  }));
8494
8495
  }, []), H = React.useCallback((n) => {
@@ -8505,13 +8506,73 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
8505
8506
  };
8506
8507
  });
8507
8508
  }, []), W = React.useCallback((n, _) => {
8508
- M((E) => ({
8509
- ...E,
8510
- elements: E.elements.map((E) => E.id === n ? {
8511
- ...E,
8509
+ M((E) => {
8510
+ let O = E.elements.findIndex((_) => _.id === n);
8511
+ if (O === -1) return E;
8512
+ let A = E.elements[O], j = [...E.elements];
8513
+ if ((_.x !== void 0 || _.y !== void 0) && !_.height && !_.width) {
8514
+ let M = _.x === void 0 ? 0 : _.x - A.x, N = _.y === void 0 ? 0 : _.y - A.y;
8515
+ if (M !== 0 || N !== 0) return j[O] = {
8516
+ ...A,
8517
+ ..._
8518
+ }, j = j.map((_) => _.parentId === n ? {
8519
+ ..._,
8520
+ x: _.x + M,
8521
+ y: _.y + N
8522
+ } : _), {
8523
+ ...E,
8524
+ elements: j
8525
+ };
8526
+ }
8527
+ if (_.height !== void 0 && Math.abs(_.height - A.height) > .5) {
8528
+ let M = _.height - A.height, N = A.y + A.height - 1, P = _.autoGrow === void 0 ? A.autoGrow : _.autoGrow;
8529
+ if (P && (j = j.map((E, A) => A === O ? {
8530
+ ...E,
8531
+ ..._
8532
+ } : E.y >= N && E.parentId !== n ? {
8533
+ ...E,
8534
+ y: E.y + M
8535
+ } : E)), A.parentId) {
8536
+ let n = {
8537
+ ...A,
8538
+ ..._
8539
+ };
8540
+ j[O] = n;
8541
+ let M = j.findIndex((n) => n.id === A.parentId);
8542
+ if (M !== -1) {
8543
+ let _ = j[M];
8544
+ if (_.autoGrowContainer) {
8545
+ let E = n.y + n.height, O = _.y + _.height;
8546
+ if (E + 10 > O) {
8547
+ let O = E + 10 - _.y, A = O - _.height, N = _.y + _.height - 1;
8548
+ j[M] = {
8549
+ ..._,
8550
+ height: O
8551
+ }, j = j.map((E) => E.id === _.id || E.id === n.id || E.parentId === _.id ? E : E.y >= N ? {
8552
+ ...E,
8553
+ y: E.y + A
8554
+ } : E);
8555
+ }
8556
+ }
8557
+ }
8558
+ return {
8559
+ ...E,
8560
+ elements: j
8561
+ };
8562
+ }
8563
+ if (P) return {
8564
+ ...E,
8565
+ elements: j
8566
+ };
8567
+ }
8568
+ return j[O] = {
8569
+ ...A,
8512
8570
  ..._
8513
- } : E)
8514
- }));
8571
+ }, {
8572
+ ...E,
8573
+ elements: j
8574
+ };
8575
+ });
8515
8576
  }, []), G = React.useCallback((n, _) => {
8516
8577
  M((E) => ({
8517
8578
  ...E,
@@ -8526,7 +8587,7 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
8526
8587
  ...n
8527
8588
  }
8528
8589
  }));
8529
- }, []), GA = React.useMemo(() => ({
8590
+ }, []), JA = React.useMemo(() => ({
8530
8591
  state: j,
8531
8592
  addElement: z,
8532
8593
  removeElement: B,
@@ -8550,13 +8611,78 @@ const EditorProvider = ({ children: n, isList: E = !1, availableProps: O = [], t
8550
8611
  P
8551
8612
  ]);
8552
8613
  return /* @__PURE__ */ jsx(EditorContext.Provider, {
8553
- value: GA,
8614
+ value: JA,
8554
8615
  children: n
8555
8616
  });
8556
8617
  }, useEditor = () => {
8557
8618
  let n = useContext(EditorContext);
8558
8619
  if (!n) throw Error("useEditor must be used within an EditorProvider");
8559
8620
  return n;
8621
+ }, CanvasContextMenu = ({ children: n }) => {
8622
+ let { state: _, updateListSettings: E } = useEditor();
8623
+ return /* @__PURE__ */ jsxs(Root2$3, { children: [/* @__PURE__ */ jsx(Trigger$3, {
8624
+ style: {
8625
+ width: "100%",
8626
+ height: "100%",
8627
+ display: "block"
8628
+ },
8629
+ children: n
8630
+ }), /* @__PURE__ */ jsxs(Content2$2, {
8631
+ className: "ContextMenuContent",
8632
+ children: [_.isList && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Sub2$1, { children: [/* @__PURE__ */ jsxs(SubTrigger2$1, {
8633
+ className: "ContextMenuItem",
8634
+ children: ["Animação de Entrada", /* @__PURE__ */ jsx("div", {
8635
+ className: "RightSlot",
8636
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
8637
+ })]
8638
+ }), /* @__PURE__ */ jsxs(SubContent2$1, {
8639
+ className: "ContextMenuContent",
8640
+ sideOffset: 2,
8641
+ alignOffset: -5,
8642
+ children: [
8643
+ /* @__PURE__ */ jsxs(CheckboxItem2$1, {
8644
+ className: "ContextMenuItem",
8645
+ checked: _.listSettings.entryAnimation === "slideIn" || !_.listSettings.entryAnimation,
8646
+ onCheckedChange: () => E({ entryAnimation: "slideIn" }),
8647
+ children: [/* @__PURE__ */ jsx(ItemIndicator2$1, {
8648
+ className: "ContextMenuItemIndicator",
8649
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
8650
+ }), "Deslizar (Slide In)"]
8651
+ }),
8652
+ /* @__PURE__ */ jsxs(CheckboxItem2$1, {
8653
+ className: "ContextMenuItem",
8654
+ checked: _.listSettings.entryAnimation === "fadeIn",
8655
+ onCheckedChange: () => E({ entryAnimation: "fadeIn" }),
8656
+ children: [/* @__PURE__ */ jsx(ItemIndicator2$1, {
8657
+ className: "ContextMenuItemIndicator",
8658
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
8659
+ }), "Aparecer (Fade In)"]
8660
+ }),
8661
+ /* @__PURE__ */ jsxs(CheckboxItem2$1, {
8662
+ className: "ContextMenuItem",
8663
+ checked: _.listSettings.entryAnimation === "scaleIn",
8664
+ onCheckedChange: () => E({ entryAnimation: "scaleIn" }),
8665
+ children: [/* @__PURE__ */ jsx(ItemIndicator2$1, {
8666
+ className: "ContextMenuItemIndicator",
8667
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
8668
+ }), "Zoom (Scale In)"]
8669
+ }),
8670
+ /* @__PURE__ */ jsxs(CheckboxItem2$1, {
8671
+ className: "ContextMenuItem",
8672
+ checked: _.listSettings.entryAnimation === "none",
8673
+ onCheckedChange: () => E({ entryAnimation: "none" }),
8674
+ children: [/* @__PURE__ */ jsx(ItemIndicator2$1, {
8675
+ className: "ContextMenuItemIndicator",
8676
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
8677
+ }), "Nenhuma"]
8678
+ })
8679
+ ]
8680
+ })] }), /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })] }), /* @__PURE__ */ jsx(Item2$1, {
8681
+ className: "ContextMenuItem",
8682
+ disabled: !0,
8683
+ children: "Configurações do Canvas..."
8684
+ })]
8685
+ })] });
8560
8686
  };
8561
8687
  var __assign$1 = function() {
8562
8688
  return __assign$1 = Object.assign || function(n) {
@@ -8843,16 +8969,16 @@ var __assign$1 = function() {
8843
8969
  maxHeight: _
8844
8970
  };
8845
8971
  }, _.prototype.calculateNewSizeFromDirection = function(n, _) {
8846
- var E = this.props.scale || 1, O = normalizeToPair(this.props.resizeRatio || 1), A = O[0], j = O[1], M = this.state, N = M.direction, P = M.original, z = this.props, B = z.lockAspectRatio, H = z.lockAspectRatioExtraHeight, U = z.lockAspectRatioExtraWidth, W = P.width, G = P.height, Z = H || 0, GA = U || 0;
8847
- return hasDirection("right", N) && (W = P.width + (n - P.x) * A / E, B && (G = (W - GA) / this.ratio + Z)), hasDirection("left", N) && (W = P.width - (n - P.x) * A / E, B && (G = (W - GA) / this.ratio + Z)), hasDirection("bottom", N) && (G = P.height + (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + GA)), hasDirection("top", N) && (G = P.height - (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + GA)), {
8972
+ var E = this.props.scale || 1, O = normalizeToPair(this.props.resizeRatio || 1), A = O[0], j = O[1], M = this.state, N = M.direction, P = M.original, z = this.props, B = z.lockAspectRatio, H = z.lockAspectRatioExtraHeight, U = z.lockAspectRatioExtraWidth, W = P.width, G = P.height, Z = H || 0, JA = U || 0;
8973
+ return hasDirection("right", N) && (W = P.width + (n - P.x) * A / E, B && (G = (W - JA) / this.ratio + Z)), hasDirection("left", N) && (W = P.width - (n - P.x) * A / E, B && (G = (W - JA) / this.ratio + Z)), hasDirection("bottom", N) && (G = P.height + (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + JA)), hasDirection("top", N) && (G = P.height - (_ - P.y) * j / E, B && (W = (G - Z) * this.ratio + JA)), {
8848
8974
  newWidth: W,
8849
8975
  newHeight: G
8850
8976
  };
8851
8977
  }, _.prototype.calculateNewSizeFromAspectRatio = function(n, _, E, O) {
8852
8978
  var A = this.props, j = A.lockAspectRatio, M = A.lockAspectRatioExtraHeight, N = A.lockAspectRatioExtraWidth, P = O.width === void 0 ? 10 : O.width, z = E.width === void 0 || E.width < 0 ? n : E.width, B = O.height === void 0 ? 10 : O.height, H = E.height === void 0 || E.height < 0 ? _ : E.height, U = M || 0, W = N || 0;
8853
8979
  if (j) {
8854
- var G = (B - U) * this.ratio + W, Z = (H - U) * this.ratio + W, GA = (P - W) / this.ratio + U, KA = (z - W) / this.ratio + U, qA = Math.max(P, G), JA = Math.min(z, Z), YA = Math.max(B, GA), XA = Math.min(H, KA);
8855
- n = clamp$1(n, qA, JA), _ = clamp$1(_, YA, XA);
8980
+ var G = (B - U) * this.ratio + W, Z = (H - U) * this.ratio + W, JA = (P - W) / this.ratio + U, YA = (z - W) / this.ratio + U, XA = Math.max(P, G), ZA = Math.min(z, Z), QA = Math.max(B, JA), $A = Math.min(H, YA);
8981
+ n = clamp$1(n, XA, ZA), _ = clamp$1(_, QA, $A);
8856
8982
  } else n = clamp$1(n, P, z), _ = clamp$1(_, B, H);
8857
8983
  return {
8858
8984
  newWidth: n,
@@ -8909,56 +9035,56 @@ var __assign$1 = function() {
8909
9035
  } catch {}
8910
9036
  var E = this.props, O = E.maxWidth, A = E.maxHeight, j = E.minWidth, M = E.minHeight, N = isTouchEvent(n) ? n.touches[0].clientX : n.clientX, P = isTouchEvent(n) ? n.touches[0].clientY : n.clientY, z = this.state, B = z.direction, H = z.original, U = z.width, W = z.height, G = this.getParentSize(), Z = calculateNewMax(G, this.window.innerWidth, this.window.innerHeight, O, A, j, M);
8911
9037
  O = Z.maxWidth, A = Z.maxHeight, j = Z.minWidth, M = Z.minHeight;
8912
- var GA = this.calculateNewSizeFromDirection(N, P), KA = GA.newHeight, qA = GA.newWidth, JA = this.calculateNewMaxFromBoundary(O, A);
8913
- this.props.snap && this.props.snap.x && (qA = findClosestSnap(qA, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (KA = findClosestSnap(KA, this.props.snap.y, this.props.snapGap));
8914
- var YA = this.calculateNewSizeFromAspectRatio(qA, KA, {
8915
- width: JA.maxWidth,
8916
- height: JA.maxHeight
9038
+ var JA = this.calculateNewSizeFromDirection(N, P), YA = JA.newHeight, XA = JA.newWidth, ZA = this.calculateNewMaxFromBoundary(O, A);
9039
+ this.props.snap && this.props.snap.x && (XA = findClosestSnap(XA, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (YA = findClosestSnap(YA, this.props.snap.y, this.props.snapGap));
9040
+ var QA = this.calculateNewSizeFromAspectRatio(XA, YA, {
9041
+ width: ZA.maxWidth,
9042
+ height: ZA.maxHeight
8917
9043
  }, {
8918
9044
  width: j,
8919
9045
  height: M
8920
9046
  });
8921
- if (qA = YA.newWidth, KA = YA.newHeight, this.props.grid) {
8922
- var ZA = snap(qA, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), QA = snap(KA, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), $A = this.props.snapGap || 0, ej = $A === 0 || Math.abs(ZA - qA) <= $A ? ZA : qA, tj = $A === 0 || Math.abs(QA - KA) <= $A ? QA : KA;
8923
- qA = ej, KA = tj;
9047
+ if (XA = QA.newWidth, YA = QA.newHeight, this.props.grid) {
9048
+ var ej = snap(XA, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), tj = snap(YA, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), nj = this.props.snapGap || 0, rj = nj === 0 || Math.abs(ej - XA) <= nj ? ej : XA, ij = nj === 0 || Math.abs(tj - YA) <= nj ? tj : YA;
9049
+ XA = rj, YA = ij;
8924
9050
  }
8925
- var nj = {
8926
- width: qA - H.width,
8927
- height: KA - H.height
9051
+ var aj = {
9052
+ width: XA - H.width,
9053
+ height: YA - H.height
8928
9054
  };
8929
- if (this.delta = nj, U && typeof U == "string") {
9055
+ if (this.delta = aj, U && typeof U == "string") {
8930
9056
  if (U.endsWith("%")) {
8931
- var rj = qA / G.width * 100;
8932
- qA = `${rj}%`;
9057
+ var oj = XA / G.width * 100;
9058
+ XA = `${oj}%`;
8933
9059
  } else if (U.endsWith("vw")) {
8934
- var ij = qA / this.window.innerWidth * 100;
8935
- qA = `${ij}vw`;
9060
+ var sj = XA / this.window.innerWidth * 100;
9061
+ XA = `${sj}vw`;
8936
9062
  } else if (U.endsWith("vh")) {
8937
- var aj = qA / this.window.innerHeight * 100;
8938
- qA = `${aj}vh`;
9063
+ var cj = XA / this.window.innerHeight * 100;
9064
+ XA = `${cj}vh`;
8939
9065
  }
8940
9066
  }
8941
9067
  if (W && typeof W == "string") {
8942
9068
  if (W.endsWith("%")) {
8943
- var rj = KA / G.height * 100;
8944
- KA = `${rj}%`;
9069
+ var oj = YA / G.height * 100;
9070
+ YA = `${oj}%`;
8945
9071
  } else if (W.endsWith("vw")) {
8946
- var ij = KA / this.window.innerWidth * 100;
8947
- KA = `${ij}vw`;
9072
+ var sj = YA / this.window.innerWidth * 100;
9073
+ YA = `${sj}vw`;
8948
9074
  } else if (W.endsWith("vh")) {
8949
- var aj = KA / this.window.innerHeight * 100;
8950
- KA = `${aj}vh`;
9075
+ var cj = YA / this.window.innerHeight * 100;
9076
+ YA = `${cj}vh`;
8951
9077
  }
8952
9078
  }
8953
- var oj = {
8954
- width: this.createSizeForCssProperty(qA, "width"),
8955
- height: this.createSizeForCssProperty(KA, "height")
9079
+ var lj = {
9080
+ width: this.createSizeForCssProperty(XA, "width"),
9081
+ height: this.createSizeForCssProperty(YA, "height")
8956
9082
  };
8957
- this.flexDir === "row" ? oj.flexBasis = oj.width : this.flexDir === "column" && (oj.flexBasis = oj.height);
8958
- var sj = this.state.width !== oj.width, cj = this.state.height !== oj.height, lj = this.state.flexBasis !== oj.flexBasis, uj = sj || cj || lj;
8959
- uj && flushSync(function() {
8960
- _.setState(oj);
8961
- }), this.props.onResize && uj && this.props.onResize(n, B, this.resizable, nj);
9083
+ this.flexDir === "row" ? lj.flexBasis = lj.width : this.flexDir === "column" && (lj.flexBasis = lj.height);
9084
+ var uj = this.state.width !== lj.width, dj = this.state.height !== lj.height, fj = this.state.flexBasis !== lj.flexBasis, pj = uj || dj || fj;
9085
+ pj && flushSync(function() {
9086
+ _.setState(lj);
9087
+ }), this.props.onResize && pj && this.props.onResize(n, B, this.resizable, aj);
8962
9088
  }
8963
9089
  }, _.prototype.onMouseUp = function(n) {
8964
9090
  var _ = this.state, E = _.isResizing, O = _.direction;
@@ -9042,6 +9168,38 @@ var __assign$1 = function() {
9042
9168
  snapGap: 0
9043
9169
  }, _;
9044
9170
  }(PureComponent);
9171
+ const formatValue = (n, _) => {
9172
+ if (n == null) return "";
9173
+ if (_.type === "boolean") return String(n) === "true" || n === !0 || typeof n == "number" && n > 0 ? _.trueLabel || "Sim" : _.falseLabel || "Não";
9174
+ if (_.type === "date") try {
9175
+ let E = new Date(n);
9176
+ if (isNaN(E.getTime())) return String(n);
9177
+ if (_.dateFormat) {
9178
+ let n = E.getDate().toString().padStart(2, "0"), O = (E.getMonth() + 1).toString().padStart(2, "0"), A = E.getFullYear(), j = E.getHours().toString().padStart(2, "0"), M = E.getMinutes().toString().padStart(2, "0"), N = E.getSeconds().toString().padStart(2, "0");
9179
+ return _.dateFormat.replace("DD", n).replace("MM", O).replace("YYYY", String(A)).replace("HH", j).replace("mm", M).replace("ss", N);
9180
+ }
9181
+ return E.toLocaleDateString();
9182
+ } catch {
9183
+ return String(n);
9184
+ }
9185
+ if (_.type === "number") {
9186
+ let E = parseFloat(String(n));
9187
+ return isNaN(E) ? String(n) : _.numberFormat === "currency" ? (_.currencySymbol || "R$") + " " + E.toFixed(_.decimalPlaces || 2) : _.numberFormat === "percent" ? E.toFixed(_.decimalPlaces || 0) + "%" : E.toFixed(_.decimalPlaces || 0);
9188
+ }
9189
+ return String(n);
9190
+ }, checkCondition = (n, _, E) => {
9191
+ let O = String(n).toLowerCase(), A = String(E).toLowerCase();
9192
+ switch (_) {
9193
+ case "equals": return O === A;
9194
+ case "notEquals": return O !== A;
9195
+ case "contains": return O.includes(A);
9196
+ case "greaterThan": return parseFloat(O) > parseFloat(A);
9197
+ case "lessThan": return parseFloat(O) < parseFloat(A);
9198
+ case "truthy": return !!n;
9199
+ case "falsy": return !n;
9200
+ default: return !1;
9201
+ }
9202
+ };
9045
9203
  function u() {
9046
9204
  return (u = Object.assign || function(n) {
9047
9205
  for (var _ = 1; _ < arguments.length; _++) {
@@ -9378,7 +9536,7 @@ var R$1, V = typeof window < "u" ? useLayoutEffect : useEffect, $ = function() {
9378
9536
  };
9379
9537
  const ColorPickerContent = ({ color: n, onChange: _ }) => {
9380
9538
  let E = n === "transparent" ? "#00000000" : n || "#000000";
9381
- return /* @__PURE__ */ jsxs(p, {
9539
+ return /* @__PURE__ */ jsxs(p$1, {
9382
9540
  direction: "column",
9383
9541
  gap: "3",
9384
9542
  style: { width: "100%" },
@@ -9386,10 +9544,10 @@ const ColorPickerContent = ({ color: n, onChange: _ }) => {
9386
9544
  color: E,
9387
9545
  onChange: _,
9388
9546
  style: { width: "100%" }
9389
- }), /* @__PURE__ */ jsxs(p, {
9547
+ }), /* @__PURE__ */ jsxs(p$1, {
9390
9548
  gap: "2",
9391
9549
  align: "center",
9392
- children: [/* @__PURE__ */ jsx(p$1, { style: {
9550
+ children: [/* @__PURE__ */ jsx(p, { style: {
9393
9551
  width: 32,
9394
9552
  height: 32,
9395
9553
  backgroundColor: E,
@@ -9413,7 +9571,7 @@ const ColorPickerContent = ({ color: n, onChange: _ }) => {
9413
9571
  padding: "0 8px",
9414
9572
  height: 32
9415
9573
  },
9416
- children: [/* @__PURE__ */ jsx(p$1, { style: {
9574
+ children: [/* @__PURE__ */ jsx(p, { style: {
9417
9575
  width: 18,
9418
9576
  height: 18,
9419
9577
  backgroundColor: n || "transparent",
@@ -9457,7 +9615,7 @@ const ColorPickerContent = ({ color: n, onChange: _ }) => {
9457
9615
  }), /* @__PURE__ */ jsx(P$1, {
9458
9616
  value: "conditional",
9459
9617
  children: "Formatação Condicional"
9460
- })] }), /* @__PURE__ */ jsxs(p$1, {
9618
+ })] }), /* @__PURE__ */ jsxs(p, {
9461
9619
  pt: "3",
9462
9620
  children: [/* @__PURE__ */ jsx(f$2, {
9463
9621
  value: "formatting",
@@ -9475,7 +9633,7 @@ const ColorPickerContent = ({ color: n, onChange: _ }) => {
9475
9633
  })]
9476
9634
  })]
9477
9635
  }),
9478
- /* @__PURE__ */ jsx(p, {
9636
+ /* @__PURE__ */ jsx(p$1, {
9479
9637
  justify: "end",
9480
9638
  mt: "4",
9481
9639
  children: /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
@@ -9495,7 +9653,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9495
9653
  ...O
9496
9654
  } });
9497
9655
  };
9498
- return /* @__PURE__ */ jsxs(p, {
9656
+ return /* @__PURE__ */ jsxs(p$1, {
9499
9657
  direction: "column",
9500
9658
  gap: "3",
9501
9659
  children: [
@@ -9504,7 +9662,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9504
9662
  color: "gray",
9505
9663
  children: "Configure como os dados serão exibidos quando substituídos."
9506
9664
  }),
9507
- n.type === "text" && /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsxs(p, {
9665
+ n.type === "text" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsxs(p$1, {
9508
9666
  align: "center",
9509
9667
  gap: "2",
9510
9668
  mb: "3",
@@ -9519,7 +9677,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9519
9677
  size: "4",
9520
9678
  mb: "3"
9521
9679
  })] }),
9522
- /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
9680
+ /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9523
9681
  size: "1",
9524
9682
  mb: "1",
9525
9683
  as: "div",
@@ -9558,7 +9716,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9558
9716
  E.type === "boolean" && /* @__PURE__ */ jsxs(o$2, {
9559
9717
  columns: "2",
9560
9718
  gap: "3",
9561
- children: [/* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
9719
+ children: [/* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9562
9720
  size: "1",
9563
9721
  mb: "1",
9564
9722
  as: "div",
@@ -9567,7 +9725,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9567
9725
  placeholder: "Ex: Sim",
9568
9726
  value: E.trueLabel || "",
9569
9727
  onChange: (n) => O({ trueLabel: n.target.value })
9570
- })] }), /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
9728
+ })] }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9571
9729
  size: "1",
9572
9730
  mb: "1",
9573
9731
  as: "div",
@@ -9578,7 +9736,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9578
9736
  onChange: (n) => O({ falseLabel: n.target.value })
9579
9737
  })] })]
9580
9738
  }),
9581
- E.type === "date" && /* @__PURE__ */ jsxs(p$1, { children: [
9739
+ E.type === "date" && /* @__PURE__ */ jsxs(p, { children: [
9582
9740
  /* @__PURE__ */ jsx(p$2, {
9583
9741
  size: "1",
9584
9742
  mb: "1",
@@ -9597,11 +9755,11 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9597
9755
  children: "Use DD, MM, YYYY, HH, mm, ss."
9598
9756
  })
9599
9757
  ] }),
9600
- E.type === "number" && /* @__PURE__ */ jsxs(p, {
9758
+ E.type === "number" && /* @__PURE__ */ jsxs(p$1, {
9601
9759
  direction: "column",
9602
9760
  gap: "3",
9603
9761
  children: [
9604
- /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
9762
+ /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9605
9763
  size: "1",
9606
9764
  mb: "1",
9607
9765
  as: "div",
@@ -9633,7 +9791,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9633
9791
  })
9634
9792
  ]
9635
9793
  })] }),
9636
- E.numberFormat === "currency" && /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
9794
+ E.numberFormat === "currency" && /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9637
9795
  size: "1",
9638
9796
  mb: "1",
9639
9797
  as: "div",
@@ -9643,7 +9801,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9643
9801
  value: E.currencySymbol || "",
9644
9802
  onChange: (n) => O({ currencySymbol: n.target.value })
9645
9803
  })] }),
9646
- /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
9804
+ /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9647
9805
  size: "1",
9648
9806
  mb: "1",
9649
9807
  as: "div",
@@ -9682,13 +9840,13 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9682
9840
  ..._
9683
9841
  } });
9684
9842
  }, B = O.find((n) => n.id === A);
9685
- return /* @__PURE__ */ jsx(p, {
9843
+ return /* @__PURE__ */ jsx(p$1, {
9686
9844
  direction: "column",
9687
9845
  gap: "3",
9688
- children: A ? /* @__PURE__ */ jsxs(p, {
9846
+ children: A ? /* @__PURE__ */ jsxs(p$1, {
9689
9847
  direction: "column",
9690
9848
  gap: "3",
9691
- children: [/* @__PURE__ */ jsxs(p, {
9849
+ children: [/* @__PURE__ */ jsxs(p$1, {
9692
9850
  justify: "between",
9693
9851
  align: "center",
9694
9852
  children: [/* @__PURE__ */ jsx(p$2, {
@@ -9700,7 +9858,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9700
9858
  children: "Voltar"
9701
9859
  })]
9702
9860
  }), B && /* @__PURE__ */ jsxs(Fragment$1, { children: [
9703
- /* @__PURE__ */ jsxs(p$1, { children: [
9861
+ /* @__PURE__ */ jsxs(p, { children: [
9704
9862
  /* @__PURE__ */ jsx(p$2, {
9705
9863
  size: "1",
9706
9864
  mb: "1",
@@ -9733,9 +9891,9 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9733
9891
  onChange: (n) => P(B.id, { property: n.target.value })
9734
9892
  })
9735
9893
  ] }),
9736
- /* @__PURE__ */ jsxs(p, {
9894
+ /* @__PURE__ */ jsxs(p$1, {
9737
9895
  gap: "2",
9738
- children: [/* @__PURE__ */ jsxs(p$1, {
9896
+ children: [/* @__PURE__ */ jsxs(p, {
9739
9897
  flexGrow: "1",
9740
9898
  children: [/* @__PURE__ */ jsx(p$2, {
9741
9899
  size: "1",
@@ -9791,7 +9949,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9791
9949
  "contains",
9792
9950
  "greaterThan",
9793
9951
  "lessThan"
9794
- ].includes(B.operator) && /* @__PURE__ */ jsxs(p$1, {
9952
+ ].includes(B.operator) && /* @__PURE__ */ jsxs(p, {
9795
9953
  flexGrow: "1",
9796
9954
  children: [/* @__PURE__ */ jsx(p$2, {
9797
9955
  size: "1",
@@ -9804,9 +9962,9 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9804
9962
  })]
9805
9963
  })]
9806
9964
  }),
9807
- /* @__PURE__ */ jsx(p, {
9965
+ /* @__PURE__ */ jsx(p$1, {
9808
9966
  gap: "2",
9809
- children: /* @__PURE__ */ jsxs(p$1, {
9967
+ children: /* @__PURE__ */ jsxs(p, {
9810
9968
  flexGrow: "1",
9811
9969
  children: [/* @__PURE__ */ jsx(p$2, {
9812
9970
  size: "1",
@@ -9850,7 +10008,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9850
10008
  /* @__PURE__ */ jsxs(o$2, {
9851
10009
  columns: "2",
9852
10010
  gap: "3",
9853
- children: [/* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
10011
+ children: [/* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9854
10012
  size: "1",
9855
10013
  mb: "1",
9856
10014
  as: "div",
@@ -9858,14 +10016,14 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9858
10016
  }), /* @__PURE__ */ jsx(ColorInput, {
9859
10017
  color: B.style.color || "#000000",
9860
10018
  onChange: (n) => z(B.id, { color: n })
9861
- })] }), /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
10019
+ })] }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
9862
10020
  size: "1",
9863
10021
  mb: "1",
9864
10022
  as: "div",
9865
10023
  children: "Cor de Fundo"
9866
- }), /* @__PURE__ */ jsxs(p, {
10024
+ }), /* @__PURE__ */ jsxs(p$1, {
9867
10025
  gap: "2",
9868
- children: [/* @__PURE__ */ jsx(p$1, {
10026
+ children: [/* @__PURE__ */ jsx(p, {
9869
10027
  flexGrow: "1",
9870
10028
  children: /* @__PURE__ */ jsx(ColorInput, {
9871
10029
  color: B.style.backgroundColor || "#ffffff",
@@ -9879,7 +10037,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9879
10037
  })]
9880
10038
  })] })]
9881
10039
  }),
9882
- /* @__PURE__ */ jsxs(p, {
10040
+ /* @__PURE__ */ jsxs(p$1, {
9883
10041
  gap: "3",
9884
10042
  mt: "2",
9885
10043
  children: [
@@ -9908,14 +10066,14 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9908
10066
  color: "gray",
9909
10067
  children: "Adicione regras para alterar o estilo baseada no valor dos dados."
9910
10068
  }),
9911
- /* @__PURE__ */ jsxs(p$1, {
10069
+ /* @__PURE__ */ jsxs(p, {
9912
10070
  style: {
9913
10071
  maxHeight: 200,
9914
10072
  overflowY: "auto",
9915
10073
  border: "1px solid var(--gray-5)",
9916
10074
  borderRadius: 4
9917
10075
  },
9918
- children: [O.length === 0 && /* @__PURE__ */ jsx(p, {
10076
+ children: [O.length === 0 && /* @__PURE__ */ jsx(p$1, {
9919
10077
  align: "center",
9920
10078
  justify: "center",
9921
10079
  p: "4",
@@ -9923,12 +10081,12 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9923
10081
  color: "gray",
9924
10082
  children: "Nenhuma regra definida."
9925
10083
  })
9926
- }), O.map((n) => /* @__PURE__ */ jsxs(p, {
10084
+ }), O.map((n) => /* @__PURE__ */ jsxs(p$1, {
9927
10085
  align: "center",
9928
10086
  justify: "between",
9929
10087
  p: "2",
9930
10088
  style: { borderBottom: "1px solid var(--gray-4)" },
9931
- children: [/* @__PURE__ */ jsxs(p$1, {
10089
+ children: [/* @__PURE__ */ jsxs(p, {
9932
10090
  onClick: () => j(n.id),
9933
10091
  style: {
9934
10092
  cursor: "pointer",
@@ -9945,7 +10103,7 @@ var FormattingSettings = ({ element: n, updateElement: _ }) => {
9945
10103
  " ",
9946
10104
  n.value
9947
10105
  ]
9948
- }), /* @__PURE__ */ jsxs(p, {
10106
+ }), /* @__PURE__ */ jsxs(p$1, {
9949
10107
  gap: "2",
9950
10108
  mt: "1",
9951
10109
  children: [n.style.color && /* @__PURE__ */ jsx("div", { style: {
@@ -9980,28 +10138,28 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
9980
10138
  open: !1,
9981
10139
  prop: "",
9982
10140
  value: ""
9983
- }), [Z, GA] = useState(_.content), [JA, YA] = useState(_.dataBinding || ""), XA = useRef(null), ej = useRef(null), tj = (n) => {
9984
- let _ = XA.current;
10141
+ }), [Z, JA] = useState(_.content), [ZA, QA] = useState(_.dataBinding || ""), $A = useRef(null), rj = useRef(null), ij = (n) => {
10142
+ let _ = $A.current;
9985
10143
  if (_) {
9986
10144
  let E = _.selectionStart, O = _.selectionEnd, A = Z;
9987
- GA(A.substring(0, E) + `{{${n}}}` + A.substring(O)), setTimeout(() => {
10145
+ JA(A.substring(0, E) + `{{${n}}}` + A.substring(O)), setTimeout(() => {
9988
10146
  _.focus();
9989
10147
  let O = E + n.length + 4;
9990
10148
  _.setSelectionRange(O, O);
9991
10149
  }, 0);
9992
- } else GA((_) => _ + `{{${n}}}`);
9993
- }, nj = (n) => {
10150
+ } else JA((_) => _ + `{{${n}}}`);
10151
+ }, aj = (n) => {
9994
10152
  E(_.id, { style: {
9995
10153
  ..._.style,
9996
10154
  ...n
9997
10155
  } });
9998
- }, rj = () => {
10156
+ }, oj = () => {
9999
10157
  let n = M.elements.findIndex((n) => n.id === _.id);
10000
10158
  n < M.elements.length - 1 && j(n, M.elements.length - 1);
10001
- }, ij = () => {
10159
+ }, sj = () => {
10002
10160
  let n = M.elements.findIndex((n) => n.id === _.id);
10003
10161
  n > 0 && j(n, 0);
10004
- }, aj = () => {
10162
+ }, cj = () => {
10005
10163
  A({
10006
10164
  type: _.type,
10007
10165
  content: _.content,
@@ -10011,7 +10169,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10011
10169
  height: _.height,
10012
10170
  style: _.style
10013
10171
  });
10014
- }, oj = [
10172
+ }, lj = [
10015
10173
  "#000000",
10016
10174
  "#FFFFFF",
10017
10175
  "#FF0000",
@@ -10021,7 +10179,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10021
10179
  "#808080",
10022
10180
  "#800080",
10023
10181
  "transparent"
10024
- ], sj = (n, _) => {
10182
+ ], uj = (n, _) => {
10025
10183
  G({
10026
10184
  open: !0,
10027
10185
  prop: n,
@@ -10034,37 +10192,37 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10034
10192
  onOpenChange: P,
10035
10193
  children: /* @__PURE__ */ jsxs(p$8, {
10036
10194
  style: { maxWidth: 450 },
10037
- children: [/* @__PURE__ */ jsx(g$2, { children: "Editar Texto" }), /* @__PURE__ */ jsxs(p, {
10195
+ children: [/* @__PURE__ */ jsx(g$2, { children: "Editar Texto" }), /* @__PURE__ */ jsxs(p$1, {
10038
10196
  direction: "column",
10039
10197
  gap: "3",
10040
10198
  children: [
10041
10199
  /* @__PURE__ */ jsx(r, {
10042
- ref: XA,
10200
+ ref: $A,
10043
10201
  value: Z,
10044
- onChange: (n) => GA(n.target.value),
10202
+ onChange: (n) => JA(n.target.value),
10045
10203
  placeholder: "Digite o novo texto...",
10046
10204
  style: { height: 100 }
10047
10205
  }),
10048
- M.availableProps && M.availableProps.length > 0 && /* @__PURE__ */ jsxs(p, {
10206
+ M.availableProps && M.availableProps.length > 0 && /* @__PURE__ */ jsxs(p$1, {
10049
10207
  direction: "column",
10050
10208
  gap: "2",
10051
10209
  children: [/* @__PURE__ */ jsx(p$2, {
10052
10210
  size: "1",
10053
10211
  color: "gray",
10054
10212
  children: "Inserir variável:"
10055
- }), /* @__PURE__ */ jsx(p, {
10213
+ }), /* @__PURE__ */ jsx(p$1, {
10056
10214
  gap: "2",
10057
10215
  wrap: "wrap",
10058
10216
  children: M.availableProps.map((n) => /* @__PURE__ */ jsx(e, {
10059
10217
  color: "blue",
10060
10218
  variant: "surface",
10061
10219
  style: { cursor: "pointer" },
10062
- onClick: () => tj(n.dataName),
10220
+ onClick: () => ij(n.dataName),
10063
10221
  children: n.name
10064
10222
  }, n.dataName))
10065
10223
  })]
10066
10224
  }),
10067
- /* @__PURE__ */ jsxs(p, {
10225
+ /* @__PURE__ */ jsxs(p$1, {
10068
10226
  gap: "3",
10069
10227
  justify: "end",
10070
10228
  children: [/* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
@@ -10087,7 +10245,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10087
10245
  onOpenChange: B,
10088
10246
  children: /* @__PURE__ */ jsxs(p$8, {
10089
10247
  style: { maxWidth: 450 },
10090
- children: [/* @__PURE__ */ jsx(g$2, { children: "Vincular Dados Manualmente" }), /* @__PURE__ */ jsxs(p, {
10248
+ children: [/* @__PURE__ */ jsx(g$2, { children: "Vincular Dados Manualmente" }), /* @__PURE__ */ jsxs(p$1, {
10091
10249
  direction: "column",
10092
10250
  gap: "3",
10093
10251
  children: [
@@ -10096,11 +10254,11 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10096
10254
  children: "Nome da propriedade (ex: titulo, preco, imagem):"
10097
10255
  }),
10098
10256
  /* @__PURE__ */ jsx(u$1, {
10099
- value: JA,
10100
- onChange: (n) => YA(n.target.value),
10257
+ value: ZA,
10258
+ onChange: (n) => QA(n.target.value),
10101
10259
  placeholder: "propriedade"
10102
10260
  }),
10103
- /* @__PURE__ */ jsxs(p, {
10261
+ /* @__PURE__ */ jsxs(p$1, {
10104
10262
  gap: "3",
10105
10263
  justify: "end",
10106
10264
  children: [/* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
@@ -10109,7 +10267,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10109
10267
  children: "Cancelar"
10110
10268
  }) }), /* @__PURE__ */ jsx(o, {
10111
10269
  onClick: () => {
10112
- let n = JA, O = { dataBinding: n };
10270
+ let n = ZA, O = { dataBinding: n };
10113
10271
  _.type === "text" && (O.content = `{{${n}}}`), E(_.id, O), B(!1);
10114
10272
  },
10115
10273
  children: "Vincular"
@@ -10136,7 +10294,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10136
10294
  value: n
10137
10295
  }))
10138
10296
  }),
10139
- /* @__PURE__ */ jsxs(p, {
10297
+ /* @__PURE__ */ jsxs(p$1, {
10140
10298
  gap: "3",
10141
10299
  justify: "end",
10142
10300
  mt: "4",
@@ -10146,7 +10304,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10146
10304
  children: "Cancelar"
10147
10305
  }) }), /* @__PURE__ */ jsx(o, {
10148
10306
  onClick: () => {
10149
- nj({ [W.prop]: W.value }), G((n) => ({
10307
+ aj({ [W.prop]: W.value }), G((n) => ({
10150
10308
  ...n,
10151
10309
  open: !1
10152
10310
  }));
@@ -10164,7 +10322,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10164
10322
  }),
10165
10323
  /* @__PURE__ */ jsx("input", {
10166
10324
  type: "file",
10167
- ref: ej,
10325
+ ref: rj,
10168
10326
  style: { display: "none" },
10169
10327
  accept: "image/*",
10170
10328
  onChange: (n) => {
@@ -10230,7 +10388,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10230
10388
  /* @__PURE__ */ jsx(Item2$1, {
10231
10389
  className: "ContextMenuItem",
10232
10390
  onSelect: () => {
10233
- YA(_.dataBinding || ""), B(!0);
10391
+ QA(_.dataBinding || ""), B(!0);
10234
10392
  },
10235
10393
  children: "Outro / Manual..."
10236
10394
  }),
@@ -10243,22 +10401,62 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10243
10401
  ]
10244
10402
  }) })] }),
10245
10403
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
10246
- _.type === "text" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Item2$1, {
10247
- className: "ContextMenuItem",
10248
- onSelect: () => {
10249
- GA(_.content), P(!0);
10250
- },
10251
- children: "Editar Texto..."
10252
- }), /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })] }),
10404
+ _.type === "text" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
10405
+ /* @__PURE__ */ jsx(Item2$1, {
10406
+ className: "ContextMenuItem",
10407
+ onSelect: () => {
10408
+ JA(_.content), P(!0);
10409
+ },
10410
+ children: "Editar Texto..."
10411
+ }),
10412
+ /* @__PURE__ */ jsxs(CheckboxItem2$1, {
10413
+ className: "ContextMenuItem",
10414
+ checked: _.autoGrow || !1,
10415
+ onCheckedChange: (n) => E(_.id, { autoGrow: !!n }),
10416
+ children: [/* @__PURE__ */ jsx(ItemIndicator2$1, {
10417
+ className: "ContextMenuItemIndicator",
10418
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
10419
+ }), "Expandir Automaticamente"]
10420
+ }),
10421
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })
10422
+ ] }),
10253
10423
  /* @__PURE__ */ jsx(Item2$1, {
10254
10424
  className: "ContextMenuItem",
10255
10425
  onSelect: () => U(!0),
10256
10426
  children: "Configurações Avançadas..."
10257
10427
  }),
10258
10428
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
10429
+ (_.type === "box" || _.type === "image") && /* @__PURE__ */ jsxs(Fragment$1, { children: [
10430
+ /* @__PURE__ */ jsx(Item2$1, {
10431
+ className: "ContextMenuItem",
10432
+ onSelect: () => {
10433
+ A({
10434
+ type: "text",
10435
+ content: "Texto Ancorado",
10436
+ x: _.x + 10,
10437
+ y: _.y + 10,
10438
+ width: 150,
10439
+ height: 30,
10440
+ parentId: _.id,
10441
+ autoGrow: !0
10442
+ }), E(_.id, { autoGrowContainer: !0 });
10443
+ },
10444
+ children: "Adicionar Texto Ancorado"
10445
+ }),
10446
+ /* @__PURE__ */ jsxs(CheckboxItem2$1, {
10447
+ className: "ContextMenuItem",
10448
+ checked: _.autoGrowContainer || !1,
10449
+ onCheckedChange: (n) => E(_.id, { autoGrowContainer: !!n }),
10450
+ children: [/* @__PURE__ */ jsx(ItemIndicator2$1, {
10451
+ className: "ContextMenuItemIndicator",
10452
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
10453
+ }), "Container Expansível"]
10454
+ }),
10455
+ /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" })
10456
+ ] }),
10259
10457
  /* @__PURE__ */ jsx(Item2$1, {
10260
10458
  className: "ContextMenuItem",
10261
- onSelect: aj,
10459
+ onSelect: cj,
10262
10460
  children: "Duplicar"
10263
10461
  }),
10264
10462
  /* @__PURE__ */ jsx(Item2$1, {
@@ -10280,7 +10478,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10280
10478
  alignOffset: -5,
10281
10479
  children: [/* @__PURE__ */ jsx(Item2$1, {
10282
10480
  className: "ContextMenuItem",
10283
- onSelect: () => ej.current?.click(),
10481
+ onSelect: () => rj.current?.click(),
10284
10482
  children: "Carregar do Computador"
10285
10483
  }), /* @__PURE__ */ jsx(Item2$1, {
10286
10484
  className: "ContextMenuItem",
@@ -10306,17 +10504,17 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10306
10504
  children: [
10307
10505
  /* @__PURE__ */ jsx(Item2$1, {
10308
10506
  className: "ContextMenuItem",
10309
- onSelect: () => nj({ objectFit: "cover" }),
10507
+ onSelect: () => aj({ objectFit: "cover" }),
10310
10508
  children: "Preencher (Cover)"
10311
10509
  }),
10312
10510
  /* @__PURE__ */ jsx(Item2$1, {
10313
10511
  className: "ContextMenuItem",
10314
- onSelect: () => nj({ objectFit: "contain" }),
10512
+ onSelect: () => aj({ objectFit: "contain" }),
10315
10513
  children: "Ajustar (Contain)"
10316
10514
  }),
10317
10515
  /* @__PURE__ */ jsx(Item2$1, {
10318
10516
  className: "ContextMenuItem",
10319
- onSelect: () => nj({ objectFit: "fill" }),
10517
+ onSelect: () => aj({ objectFit: "fill" }),
10320
10518
  children: "Esticar (Fill)"
10321
10519
  })
10322
10520
  ]
@@ -10335,11 +10533,11 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10335
10533
  alignOffset: -5,
10336
10534
  children: [/* @__PURE__ */ jsx(Item2$1, {
10337
10535
  className: "ContextMenuItem",
10338
- onSelect: rj,
10536
+ onSelect: oj,
10339
10537
  children: "Trazer para frente"
10340
10538
  }), /* @__PURE__ */ jsx(Item2$1, {
10341
10539
  className: "ContextMenuItem",
10342
- onSelect: ij,
10540
+ onSelect: sj,
10343
10541
  children: "Enviar para trás"
10344
10542
  })]
10345
10543
  }) })] }),
@@ -10357,7 +10555,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10357
10555
  alignOffset: -5,
10358
10556
  children: M.availableFonts && M.availableFonts.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
10359
10557
  className: "ContextMenuItem",
10360
- onSelect: () => nj({ fontFamily: n }),
10558
+ onSelect: () => aj({ fontFamily: n }),
10361
10559
  style: { fontFamily: n },
10362
10560
  children: [n, _.style?.fontFamily === n && /* @__PURE__ */ jsx("div", {
10363
10561
  className: "RightSlot",
@@ -10386,7 +10584,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10386
10584
  64
10387
10585
  ].map((n) => /* @__PURE__ */ jsxs(Item2$1, {
10388
10586
  className: "ContextMenuItem",
10389
- onSelect: () => nj({ fontSize: `${n}px` }),
10587
+ onSelect: () => aj({ fontSize: `${n}px` }),
10390
10588
  children: [n, "px"]
10391
10589
  }, n))
10392
10590
  }) })] }),
@@ -10401,9 +10599,9 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10401
10599
  sideOffset: 2,
10402
10600
  alignOffset: -5,
10403
10601
  children: [
10404
- oj.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
10602
+ lj.filter((n) => n !== "transparent").map((n) => /* @__PURE__ */ jsxs(Item2$1, {
10405
10603
  className: "ContextMenuItem",
10406
- onSelect: () => nj({ color: n }),
10604
+ onSelect: () => aj({ color: n }),
10407
10605
  children: [/* @__PURE__ */ jsx("div", { style: {
10408
10606
  width: 12,
10409
10607
  height: 12,
@@ -10415,7 +10613,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10415
10613
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
10416
10614
  /* @__PURE__ */ jsx(Item2$1, {
10417
10615
  className: "ContextMenuItem",
10418
- onSelect: () => sj("color", _.style?.color || "#000000"),
10616
+ onSelect: () => uj("color", _.style?.color || "#000000"),
10419
10617
  children: "Outra Cor..."
10420
10618
  })
10421
10619
  ]
@@ -10432,11 +10630,11 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10432
10630
  alignOffset: -5,
10433
10631
  children: [/* @__PURE__ */ jsx(Item2$1, {
10434
10632
  className: "ContextMenuItem",
10435
- onSelect: () => nj({ fontWeight: "normal" }),
10633
+ onSelect: () => aj({ fontWeight: "normal" }),
10436
10634
  children: "Normal"
10437
10635
  }), /* @__PURE__ */ jsx(Item2$1, {
10438
10636
  className: "ContextMenuItem",
10439
- onSelect: () => nj({ fontWeight: "bold" }),
10637
+ onSelect: () => aj({ fontWeight: "bold" }),
10440
10638
  children: "Negrito"
10441
10639
  })]
10442
10640
  }) })] }),
@@ -10453,17 +10651,17 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10453
10651
  children: [
10454
10652
  /* @__PURE__ */ jsx(Item2$1, {
10455
10653
  className: "ContextMenuItem",
10456
- onSelect: () => nj({ textAlign: "left" }),
10654
+ onSelect: () => aj({ textAlign: "left" }),
10457
10655
  children: "Esquerda"
10458
10656
  }),
10459
10657
  /* @__PURE__ */ jsx(Item2$1, {
10460
10658
  className: "ContextMenuItem",
10461
- onSelect: () => nj({ textAlign: "center" }),
10659
+ onSelect: () => aj({ textAlign: "center" }),
10462
10660
  children: "Centro"
10463
10661
  }),
10464
10662
  /* @__PURE__ */ jsx(Item2$1, {
10465
10663
  className: "ContextMenuItem",
10466
- onSelect: () => nj({ textAlign: "right" }),
10664
+ onSelect: () => aj({ textAlign: "right" }),
10467
10665
  children: "Direita"
10468
10666
  })
10469
10667
  ]
@@ -10481,7 +10679,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10481
10679
  children: [
10482
10680
  /* @__PURE__ */ jsx(Item2$1, {
10483
10681
  className: "ContextMenuItem",
10484
- onSelect: () => nj({
10682
+ onSelect: () => aj({
10485
10683
  display: "flex",
10486
10684
  flexDirection: "column",
10487
10685
  justifyContent: "flex-start"
@@ -10490,7 +10688,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10490
10688
  }),
10491
10689
  /* @__PURE__ */ jsx(Item2$1, {
10492
10690
  className: "ContextMenuItem",
10493
- onSelect: () => nj({
10691
+ onSelect: () => aj({
10494
10692
  display: "flex",
10495
10693
  flexDirection: "column",
10496
10694
  justifyContent: "center"
@@ -10499,7 +10697,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10499
10697
  }),
10500
10698
  /* @__PURE__ */ jsx(Item2$1, {
10501
10699
  className: "ContextMenuItem",
10502
- onSelect: () => nj({
10700
+ onSelect: () => aj({
10503
10701
  display: "flex",
10504
10702
  flexDirection: "column",
10505
10703
  justifyContent: "flex-end"
@@ -10520,9 +10718,9 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10520
10718
  sideOffset: 2,
10521
10719
  alignOffset: -5,
10522
10720
  children: [
10523
- oj.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
10721
+ lj.map((n) => /* @__PURE__ */ jsxs(Item2$1, {
10524
10722
  className: "ContextMenuItem",
10525
- onSelect: () => nj({ backgroundColor: n }),
10723
+ onSelect: () => aj({ backgroundColor: n }),
10526
10724
  children: [/* @__PURE__ */ jsx("div", { style: {
10527
10725
  width: 12,
10528
10726
  height: 12,
@@ -10534,7 +10732,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10534
10732
  /* @__PURE__ */ jsx(Separator2$1, { className: "ContextMenuSeparator" }),
10535
10733
  /* @__PURE__ */ jsx(Item2$1, {
10536
10734
  className: "ContextMenuItem",
10537
- onSelect: () => sj("backgroundColor", _.style?.backgroundColor || "transparent"),
10735
+ onSelect: () => uj("backgroundColor", _.style?.backgroundColor || "transparent"),
10538
10736
  children: "Outra Cor..."
10539
10737
  })
10540
10738
  ]
@@ -10559,7 +10757,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10559
10757
  "50%"
10560
10758
  ].map((n) => /* @__PURE__ */ jsx(Item2$1, {
10561
10759
  className: "ContextMenuItem",
10562
- onSelect: () => nj({ borderRadius: typeof n == "number" ? `${n}px` : n }),
10760
+ onSelect: () => aj({ borderRadius: typeof n == "number" ? `${n}px` : n }),
10563
10761
  children: n === "50%" ? "Círculo" : `${n}px`
10564
10762
  }, n))
10565
10763
  }) })] }),
@@ -10583,44 +10781,13 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10583
10781
  32
10584
10782
  ].map((n) => /* @__PURE__ */ jsxs(Item2$1, {
10585
10783
  className: "ContextMenuItem",
10586
- onSelect: () => nj({ padding: `${n}px` }),
10784
+ onSelect: () => aj({ padding: `${n}px` }),
10587
10785
  children: [n, "px"]
10588
10786
  }, n))
10589
10787
  }) })] })
10590
10788
  ]
10591
10789
  }) })] })
10592
10790
  ] });
10593
- }, formatValue = (n, _) => {
10594
- if (n == null) return "";
10595
- if (_.type === "boolean") return String(n) === "true" || n === !0 || typeof n == "number" && n > 0 ? _.trueLabel || "Sim" : _.falseLabel || "Não";
10596
- if (_.type === "date") try {
10597
- let E = new Date(n);
10598
- if (isNaN(E.getTime())) return String(n);
10599
- if (_.dateFormat) {
10600
- let n = E.getDate().toString().padStart(2, "0"), O = (E.getMonth() + 1).toString().padStart(2, "0"), A = E.getFullYear(), j = E.getHours().toString().padStart(2, "0"), M = E.getMinutes().toString().padStart(2, "0"), N = E.getSeconds().toString().padStart(2, "0");
10601
- return _.dateFormat.replace("DD", n).replace("MM", O).replace("YYYY", String(A)).replace("HH", j).replace("mm", M).replace("ss", N);
10602
- }
10603
- return E.toLocaleDateString();
10604
- } catch {
10605
- return String(n);
10606
- }
10607
- if (_.type === "number") {
10608
- let E = parseFloat(n);
10609
- return isNaN(E) ? String(n) : _.numberFormat === "currency" ? (_.currencySymbol || "R$") + " " + E.toFixed(_.decimalPlaces || 2) : _.numberFormat === "percent" ? E.toFixed(_.decimalPlaces || 0) + "%" : E.toFixed(_.decimalPlaces || 0);
10610
- }
10611
- return String(n);
10612
- }, checkCondition = (n, _, E) => {
10613
- let O = String(n).toLowerCase(), A = String(E).toLowerCase();
10614
- switch (_) {
10615
- case "equals": return O === A;
10616
- case "notEquals": return O !== A;
10617
- case "contains": return O.includes(A);
10618
- case "greaterThan": return parseFloat(O) > parseFloat(A);
10619
- case "lessThan": return parseFloat(O) < parseFloat(A);
10620
- case "truthy": return !!n;
10621
- case "falsy": return !n;
10622
- default: return !1;
10623
- }
10624
10791
  }, DraggableElement = React.memo(({ element: n, isSelected: _ }) => {
10625
10792
  let { selectElement: E, updateElement: O, state: A } = useEditor(), [j, M] = useState(!1), [N, P] = useState(!1), [z, B] = useState({
10626
10793
  x: n.x,
@@ -10628,94 +10795,101 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10628
10795
  }), [U, W] = useState(n.rotation || 0), [G, Z] = useState({
10629
10796
  width: n.width,
10630
10797
  height: n.height
10798
+ }), [JA, ZA] = useState({
10799
+ x: n.x,
10800
+ y: n.y,
10801
+ rotation: n.rotation,
10802
+ width: n.width,
10803
+ height: n.height
10631
10804
  });
10632
- useEffect(() => {
10633
- j || B({
10634
- x: n.x,
10635
- y: n.y
10636
- });
10637
- }, [
10638
- n.x,
10639
- n.y,
10640
- j
10641
- ]), useEffect(() => {
10642
- N || W(n.rotation || 0);
10643
- }, [n.rotation, N]), useEffect(() => {
10644
- Z({
10645
- width: n.width,
10646
- height: n.height
10647
- });
10648
- }, [n.width, n.height]);
10649
- let GA = useRef({
10805
+ !j && (n.x !== JA.x || n.y !== JA.y) && (ZA((_) => ({
10806
+ ..._,
10807
+ x: n.x,
10808
+ y: n.y
10809
+ })), B({
10810
+ x: n.x,
10811
+ y: n.y
10812
+ })), !N && n.rotation !== JA.rotation && (ZA((_) => ({
10813
+ ..._,
10814
+ rotation: n.rotation
10815
+ })), W(n.rotation || 0)), (n.width !== JA.width || n.height !== JA.height) && (ZA((_) => ({
10816
+ ..._,
10817
+ width: n.width,
10818
+ height: n.height
10819
+ })), Z({
10820
+ width: n.width,
10821
+ height: n.height
10822
+ }));
10823
+ let QA = useRef({
10650
10824
  x: 0,
10651
10825
  y: 0
10652
- }), JA = useRef({
10826
+ }), $A = useRef({
10653
10827
  x: 0,
10654
10828
  y: 0
10655
- }), YA = useRef(0), XA = useRef(0), ZA = useRef({
10829
+ }), ej = useRef(0), rj = useRef(0), ij = useRef({
10656
10830
  x: 0,
10657
10831
  y: 0
10658
- }), ej = A.canvasHeight || 150, tj = A.isList ? A.mockData.length > 0 ? A.mockData[0] : null : A.singleMockData, nj = n.content, rj = {};
10659
- if (tj) {
10660
- if (n.type === "text") nj = nj.replace(/\{\{(.*?)\}\}/g, (_, E) => {
10661
- let O = tj[E.trim()];
10832
+ }), aj = useRef(null), oj = A.canvasHeight || 150, sj = A.isList ? A.mockData.length > 0 ? A.mockData[0] : null : A.singleMockData, cj = n.content, lj = {};
10833
+ if (sj) {
10834
+ if (n.type === "text") cj = cj.replace(/\{\{(.*?)\}\}/g, (_, E) => {
10835
+ let O = sj[E.trim()];
10662
10836
  return O == null ? _ : n.formatting ? formatValue(O, n.formatting) : String(O);
10663
10837
  });
10664
10838
  else if (n.type === "image") if (n.dataBinding) {
10665
- let _ = tj[n.dataBinding];
10666
- _ != null && (nj = String(_));
10667
- } else nj = nj.replace(/\{\{(.*?)\}\}/g, (n, _) => {
10668
- let E = tj[_.trim()];
10839
+ let _ = sj[n.dataBinding];
10840
+ _ != null && (cj = String(_));
10841
+ } else cj = cj.replace(/\{\{(.*?)\}\}/g, (n, _) => {
10842
+ let E = sj[_.trim()];
10669
10843
  return E == null ? n : String(E);
10670
10844
  });
10671
10845
  n.conditions && n.conditions.forEach((n) => {
10672
- let _ = tj[n.property];
10673
- checkCondition(_, n.operator, n.value) && (rj = {
10674
- ...rj,
10846
+ let _ = sj[n.property];
10847
+ checkCondition(_, n.operator, n.value) && (lj = {
10848
+ ...lj,
10675
10849
  ...n.style
10676
10850
  });
10677
10851
  });
10678
10852
  }
10679
- let ij = rj.display === "none";
10680
- if (ij && _) {
10681
- let { display: n, ..._ } = rj;
10682
- rj = _;
10853
+ let uj = lj.display === "none";
10854
+ if (uj && _) {
10855
+ let { ...n } = lj;
10856
+ lj = n;
10683
10857
  }
10684
- let aj = (_) => {
10858
+ let dj = (_) => {
10685
10859
  _.stopPropagation(), E(n.id);
10686
- }, oj = (_) => {
10687
- _.button === 0 && (_.stopPropagation(), E(n.id), M(!0), GA.current = {
10860
+ }, fj = (_) => {
10861
+ _.button === 0 && (_.stopPropagation(), E(n.id), M(!0), QA.current = {
10688
10862
  x: _.clientX,
10689
10863
  y: _.clientY
10690
- }, JA.current = {
10864
+ }, $A.current = {
10691
10865
  x: z.x,
10692
10866
  y: z.y
10693
10867
  });
10694
- }, sj = (n) => {
10868
+ }, pj = (n) => {
10695
10869
  n.stopPropagation(), n.preventDefault(), P(!0);
10696
10870
  let _ = n.target.closest(".resizable-element");
10697
10871
  if (_) {
10698
10872
  let E = _.getBoundingClientRect();
10699
- ZA.current = {
10873
+ ij.current = {
10700
10874
  x: E.left + E.width / 2,
10701
10875
  y: E.top + E.height / 2
10702
10876
  };
10703
- let O = n.clientX - ZA.current.x, A = n.clientY - ZA.current.y;
10704
- YA.current = Math.atan2(A, O) * (180 / Math.PI), XA.current = U;
10877
+ let O = n.clientX - ij.current.x, A = n.clientY - ij.current.y;
10878
+ ej.current = Math.atan2(A, O) * (180 / Math.PI), rj.current = U;
10705
10879
  }
10706
10880
  };
10707
10881
  useEffect(() => {
10708
10882
  let _ = (n) => {
10709
10883
  if (j) {
10710
- let _ = n.clientX - GA.current.x, E = n.clientY - GA.current.y, O = JA.current.x + _, j = JA.current.y + E;
10711
- A.isList && (j = Math.max(0, j), j + G.height > ej && (j = Math.max(0, ej - G.height))), B({
10884
+ let _ = n.clientX - QA.current.x, E = n.clientY - QA.current.y, O = $A.current.x + _, j = $A.current.y + E;
10885
+ A.isList && (j = Math.max(0, j), j + G.height > oj && (j = Math.max(0, oj - G.height))), B({
10712
10886
  x: O,
10713
10887
  y: j
10714
10888
  });
10715
10889
  }
10716
10890
  if (N) {
10717
- let _ = n.clientX - ZA.current.x, E = n.clientY - ZA.current.y, O = Math.atan2(E, _) * (180 / Math.PI) - YA.current;
10718
- W((XA.current + O) % 360);
10891
+ let _ = n.clientX - ij.current.x, E = n.clientY - ij.current.y, O = Math.atan2(E, _) * (180 / Math.PI) - ej.current;
10892
+ W((rj.current + O) % 360);
10719
10893
  }
10720
10894
  }, E = () => {
10721
10895
  j && (M(!1), O(n.id, {
@@ -10732,13 +10906,13 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10732
10906
  n.id,
10733
10907
  O,
10734
10908
  A.isList,
10735
- ej,
10909
+ oj,
10736
10910
  G.height,
10737
10911
  z.x,
10738
10912
  z.y,
10739
10913
  U
10740
10914
  ]);
10741
- let cj = {
10915
+ let mj = {
10742
10916
  position: "absolute",
10743
10917
  left: 0,
10744
10918
  top: 0,
@@ -10755,7 +10929,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10755
10929
  wordBreak: n.autoGrow ? "break-word" : void 0,
10756
10930
  userSelect: "none",
10757
10931
  ...n.style,
10758
- ...rj
10932
+ ...lj
10759
10933
  };
10760
10934
  return /* @__PURE__ */ jsx(Resizable, {
10761
10935
  className: "resizable-element",
@@ -10763,7 +10937,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10763
10937
  width: G.width,
10764
10938
  height: n.autoGrow ? "auto" : G.height
10765
10939
  },
10766
- maxHeight: A.isList ? Math.max(10, ej - z.y) : void 0,
10940
+ maxHeight: A.isList ? Math.max(10, oj - z.y) : void 0,
10767
10941
  onResizeStop: (_, E, A, j) => {
10768
10942
  let M = G.width + j.width, N = G.height + j.height;
10769
10943
  Z({
@@ -10778,8 +10952,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10778
10952
  position: "absolute",
10779
10953
  transform: `translate(${z.x}px, ${z.y}px) rotate(${U}deg)`,
10780
10954
  height: n.autoGrow ? "auto" : void 0,
10781
- display: ij && !_ ? "none" : void 0,
10782
- opacity: ij && _ ? .4 : 1
10955
+ display: uj && !_ ? "none" : void 0,
10956
+ opacity: uj && _ ? .4 : 1
10783
10957
  },
10784
10958
  enable: _ && !n.autoGrow ? void 0 : {
10785
10959
  top: !1,
@@ -10799,10 +10973,11 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10799
10973
  height: "100%",
10800
10974
  position: "relative"
10801
10975
  },
10802
- children: [/* @__PURE__ */ jsxs(p$1, {
10803
- style: cj,
10804
- onMouseDown: oj,
10805
- onClick: aj,
10976
+ children: [/* @__PURE__ */ jsxs(p, {
10977
+ ref: aj,
10978
+ style: mj,
10979
+ onMouseDown: fj,
10980
+ onClick: dj,
10806
10981
  onMouseEnter: (n) => {
10807
10982
  _ || (n.currentTarget.style.borderColor = "var(--gray-6)");
10808
10983
  },
@@ -10815,10 +10990,10 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10815
10990
  width: "100%",
10816
10991
  height: "100%"
10817
10992
  },
10818
- children: nj
10993
+ children: cj
10819
10994
  }),
10820
- n.type === "image" && (nj ? /* @__PURE__ */ jsx("img", {
10821
- src: nj,
10995
+ n.type === "image" && (cj ? /* @__PURE__ */ jsx("img", {
10996
+ src: cj,
10822
10997
  alt: "Element",
10823
10998
  style: {
10824
10999
  width: "100%",
@@ -10827,7 +11002,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10827
11002
  display: "block",
10828
11003
  pointerEvents: "none"
10829
11004
  }
10830
- }) : /* @__PURE__ */ jsx(p$1, {
11005
+ }) : /* @__PURE__ */ jsx(p, {
10831
11006
  style: {
10832
11007
  width: "100%",
10833
11008
  height: "100%",
@@ -10841,12 +11016,38 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10841
11016
  children: "Imagem Placeholder"
10842
11017
  })
10843
11018
  })),
10844
- n.type === "box" && /* @__PURE__ */ jsx(p$1, { style: {
10845
- width: "100%",
10846
- height: "100%"
10847
- } })
11019
+ n.type === "box" && /* @__PURE__ */ jsx(p, {
11020
+ style: {
11021
+ width: "100%",
11022
+ height: "100%"
11023
+ },
11024
+ children: n.autoGrowContainer && /* @__PURE__ */ jsx("div", {
11025
+ style: {
11026
+ position: "absolute",
11027
+ bottom: 2,
11028
+ right: 2,
11029
+ fontSize: "10px",
11030
+ color: "#999",
11031
+ pointerEvents: "none"
11032
+ },
11033
+ children: "Auto-Grow"
11034
+ })
11035
+ }),
11036
+ n.parentId && /* @__PURE__ */ jsx("div", {
11037
+ style: {
11038
+ position: "absolute",
11039
+ top: -5,
11040
+ right: -5,
11041
+ width: 8,
11042
+ height: 8,
11043
+ borderRadius: "50%",
11044
+ backgroundColor: "var(--blue-9)",
11045
+ border: "1px solid white"
11046
+ },
11047
+ title: "Ancorado"
11048
+ })
10848
11049
  ]
10849
- }), _ && /* @__PURE__ */ jsx(p$1, {
11050
+ }), _ && /* @__PURE__ */ jsx(p, {
10850
11051
  style: {
10851
11052
  position: "absolute",
10852
11053
  top: -30,
@@ -10860,8 +11061,8 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10860
11061
  zIndex: 50,
10861
11062
  boxShadow: "0 0 0 2px white"
10862
11063
  },
10863
- onMouseDown: sj,
10864
- children: /* @__PURE__ */ jsx(p$1, { style: {
11064
+ onMouseDown: pj,
11065
+ children: /* @__PURE__ */ jsx(p, { style: {
10865
11066
  position: "absolute",
10866
11067
  top: 12,
10867
11068
  left: "50%",
@@ -10878,7 +11079,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10878
11079
  let { state: n, selectElement: _ } = useEditor(), E = () => {
10879
11080
  _(null);
10880
11081
  }, O = n.canvasHeight || 150;
10881
- return /* @__PURE__ */ jsxs(p$1, {
11082
+ return /* @__PURE__ */ jsx(CanvasContextMenu, { children: /* @__PURE__ */ jsxs(p, {
10882
11083
  onClick: E,
10883
11084
  style: {
10884
11085
  width: "100%",
@@ -10918,7 +11119,7 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10918
11119
  ]
10919
11120
  })
10920
11121
  }),
10921
- n.elements.length === 0 && /* @__PURE__ */ jsx(p, {
11122
+ n.elements.length === 0 && /* @__PURE__ */ jsx(p$1, {
10922
11123
  align: "center",
10923
11124
  justify: "center",
10924
11125
  style: {
@@ -10933,7 +11134,304 @@ const ElementContextMenu = ({ children: n, element: _ }) => {
10933
11134
  isSelected: n.selectedElementId === _.id
10934
11135
  }, _.id))
10935
11136
  ]
10936
- });
11137
+ }) });
11138
+ }, EditorSettings = () => {
11139
+ let { state: n, updateListSettings: _, setCanvasHeight: E } = useEditor(), [O, A] = useState(!1), [j, M] = useState(""), [N, P] = useState("asc"), [z, B] = useState("bottom"), [U, W] = useState("down"), [G, Z] = useState("slideIn"), [JA, YA] = useState("150"), [ZA, QA] = useState("");
11140
+ return useEffect(() => {
11141
+ if (!O) return;
11142
+ let _ = parseInt(JA, 10);
11143
+ !isNaN(_) && _ > 0 && n.canvasHeight !== _ && E(_);
11144
+ }, [
11145
+ JA,
11146
+ O,
11147
+ E,
11148
+ n.canvasHeight
11149
+ ]), /* @__PURE__ */ jsxs(s$4, {
11150
+ open: O,
11151
+ onOpenChange: (_) => {
11152
+ A(_), _ && (M(n.listSettings.sortProp || "__none__"), P(n.listSettings.sortOrder || "asc"), B(n.listSettings.newestPosition || "bottom"), W(n.listSettings.scrollDirection || "down"), Z(n.listSettings.entryAnimation || "slideIn"), QA(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), YA(String(n.canvasHeight || 150)));
11153
+ },
11154
+ children: [/* @__PURE__ */ jsx(n$3, { children: /* @__PURE__ */ jsxs(o, {
11155
+ variant: "soft",
11156
+ color: "gray",
11157
+ style: {
11158
+ width: "100%",
11159
+ justifyContent: "center",
11160
+ cursor: "pointer"
11161
+ },
11162
+ children: [/* @__PURE__ */ jsx(GearIcon, {}), " Configurações"]
11163
+ }) }), /* @__PURE__ */ jsxs(p$8, {
11164
+ style: { maxWidth: 600 },
11165
+ children: [
11166
+ /* @__PURE__ */ jsx(g$2, { children: "Configurações do Editor" }),
11167
+ /* @__PURE__ */ jsx(m$3, {
11168
+ size: "2",
11169
+ mb: "4",
11170
+ children: "Configure o comportamento da lista."
11171
+ }),
11172
+ /* @__PURE__ */ jsx(p, {
11173
+ pt: "3",
11174
+ children: /* @__PURE__ */ jsxs(p$1, {
11175
+ direction: "column",
11176
+ gap: "3",
11177
+ children: [
11178
+ /* @__PURE__ */ jsx(p$2, {
11179
+ size: "2",
11180
+ weight: "bold",
11181
+ children: "Ordenação"
11182
+ }),
11183
+ /* @__PURE__ */ jsxs(p$1, {
11184
+ gap: "3",
11185
+ align: "center",
11186
+ children: [/* @__PURE__ */ jsxs(p, {
11187
+ flexGrow: "1",
11188
+ children: [/* @__PURE__ */ jsx(p$2, {
11189
+ size: "1",
11190
+ mb: "1",
11191
+ as: "div",
11192
+ children: "Propriedade para Ordenar (ex: data, id)"
11193
+ }), /* @__PURE__ */ jsxs("select", {
11194
+ value: j,
11195
+ onChange: (n) => M(n.target.value),
11196
+ style: {
11197
+ width: "100%",
11198
+ padding: "8px",
11199
+ borderRadius: "4px",
11200
+ border: "1px solid var(--gray-6)",
11201
+ backgroundColor: "var(--gray-2)",
11202
+ color: "var(--gray-12)",
11203
+ fontSize: "14px",
11204
+ outline: "none"
11205
+ },
11206
+ children: [/* @__PURE__ */ jsx("option", {
11207
+ value: "__none__",
11208
+ children: "(Nenhum)"
11209
+ }), n.availableProps.map((n) => /* @__PURE__ */ jsx("option", {
11210
+ value: n.dataName,
11211
+ children: n.name
11212
+ }, n.dataName))]
11213
+ })]
11214
+ }), /* @__PURE__ */ jsxs(p, { children: [/* @__PURE__ */ jsx(p$2, {
11215
+ size: "1",
11216
+ mb: "1",
11217
+ as: "div",
11218
+ children: "Direção"
11219
+ }), /* @__PURE__ */ jsxs("select", {
11220
+ value: N,
11221
+ onChange: (n) => P(n.target.value),
11222
+ style: {
11223
+ width: "150px",
11224
+ padding: "8px",
11225
+ borderRadius: "4px",
11226
+ border: "1px solid var(--gray-6)",
11227
+ backgroundColor: "var(--gray-2)",
11228
+ color: "var(--gray-12)",
11229
+ fontSize: "14px",
11230
+ outline: "none"
11231
+ },
11232
+ children: [/* @__PURE__ */ jsx("option", {
11233
+ value: "asc",
11234
+ children: "Crescente (A-Z)"
11235
+ }), /* @__PURE__ */ jsx("option", {
11236
+ value: "desc",
11237
+ children: "Decrescente (Z-A)"
11238
+ })]
11239
+ })] })]
11240
+ }),
11241
+ /* @__PURE__ */ jsxs(p$1, {
11242
+ gap: "3",
11243
+ align: "center",
11244
+ children: [/* @__PURE__ */ jsxs(p, {
11245
+ flexGrow: "1",
11246
+ children: [/* @__PURE__ */ jsx(p$2, {
11247
+ size: "1",
11248
+ mb: "1",
11249
+ as: "div",
11250
+ children: "Posição do Recente"
11251
+ }), /* @__PURE__ */ jsxs("select", {
11252
+ value: z,
11253
+ onChange: (n) => B(n.target.value),
11254
+ style: {
11255
+ width: "100%",
11256
+ padding: "8px",
11257
+ borderRadius: "4px",
11258
+ border: "1px solid var(--gray-6)",
11259
+ backgroundColor: "var(--gray-2)",
11260
+ color: "var(--gray-12)",
11261
+ fontSize: "14px",
11262
+ outline: "none"
11263
+ },
11264
+ children: [/* @__PURE__ */ jsx("option", {
11265
+ value: "top",
11266
+ children: "Topo (Início)"
11267
+ }), /* @__PURE__ */ jsx("option", {
11268
+ value: "bottom",
11269
+ children: "Base (Final)"
11270
+ })]
11271
+ })]
11272
+ }), /* @__PURE__ */ jsxs(p, {
11273
+ flexGrow: "1",
11274
+ children: [/* @__PURE__ */ jsx(p$2, {
11275
+ size: "1",
11276
+ mb: "1",
11277
+ as: "div",
11278
+ children: "Comportamento de Rolagem"
11279
+ }), /* @__PURE__ */ jsxs("select", {
11280
+ value: U,
11281
+ onChange: (n) => W(n.target.value),
11282
+ style: {
11283
+ width: "100%",
11284
+ padding: "8px",
11285
+ borderRadius: "4px",
11286
+ border: "1px solid var(--gray-6)",
11287
+ backgroundColor: "var(--gray-2)",
11288
+ color: "var(--gray-12)",
11289
+ fontSize: "14px",
11290
+ outline: "none"
11291
+ },
11292
+ children: [/* @__PURE__ */ jsx("option", {
11293
+ value: "down",
11294
+ children: "Descer (Padrão)"
11295
+ }), /* @__PURE__ */ jsx("option", {
11296
+ value: "up",
11297
+ children: "Subir (Chat)"
11298
+ })]
11299
+ })]
11300
+ })]
11301
+ }),
11302
+ /* @__PURE__ */ jsx(p$1, {
11303
+ gap: "3",
11304
+ align: "center",
11305
+ mt: "2",
11306
+ children: /* @__PURE__ */ jsxs(p, {
11307
+ flexGrow: "1",
11308
+ children: [/* @__PURE__ */ jsx(p$2, {
11309
+ size: "1",
11310
+ mb: "1",
11311
+ as: "div",
11312
+ children: "Animação de Entrada"
11313
+ }), /* @__PURE__ */ jsxs("select", {
11314
+ value: G,
11315
+ onChange: (n) => Z(n.target.value),
11316
+ style: {
11317
+ width: "100%",
11318
+ padding: "8px",
11319
+ borderRadius: "4px",
11320
+ border: "1px solid var(--gray-6)",
11321
+ backgroundColor: "var(--gray-2)",
11322
+ color: "var(--gray-12)",
11323
+ fontSize: "14px",
11324
+ outline: "none"
11325
+ },
11326
+ children: [
11327
+ /* @__PURE__ */ jsx("option", {
11328
+ value: "slideIn",
11329
+ children: "Deslizar (Slide In)"
11330
+ }),
11331
+ /* @__PURE__ */ jsx("option", {
11332
+ value: "fadeIn",
11333
+ children: "Aparecer (Fade In)"
11334
+ }),
11335
+ /* @__PURE__ */ jsx("option", {
11336
+ value: "scaleIn",
11337
+ children: "Zoom (Scale In)"
11338
+ }),
11339
+ /* @__PURE__ */ jsx("option", {
11340
+ value: "none",
11341
+ children: "Nenhuma"
11342
+ })
11343
+ ]
11344
+ })]
11345
+ })
11346
+ }),
11347
+ /* @__PURE__ */ jsx(p$2, {
11348
+ size: "2",
11349
+ weight: "bold",
11350
+ mt: "2",
11351
+ children: "Dimensões"
11352
+ }),
11353
+ /* @__PURE__ */ jsxs(p$1, {
11354
+ gap: "3",
11355
+ align: "center",
11356
+ children: [/* @__PURE__ */ jsxs(p, {
11357
+ flexGrow: "1",
11358
+ children: [
11359
+ /* @__PURE__ */ jsx(p$2, {
11360
+ size: "1",
11361
+ mb: "1",
11362
+ as: "div",
11363
+ children: "Altura do Item (Template) (px)"
11364
+ }),
11365
+ /* @__PURE__ */ jsx(u$1, {
11366
+ type: "number",
11367
+ min: "10",
11368
+ value: JA,
11369
+ onChange: (n) => YA(n.target.value)
11370
+ }),
11371
+ /* @__PURE__ */ jsx(p$2, {
11372
+ size: "1",
11373
+ color: "gray",
11374
+ children: "Altura de cada item individual na lista."
11375
+ })
11376
+ ]
11377
+ }), /* @__PURE__ */ jsxs(p, {
11378
+ flexGrow: "1",
11379
+ children: [
11380
+ /* @__PURE__ */ jsx(p$2, {
11381
+ size: "1",
11382
+ mb: "1",
11383
+ as: "div",
11384
+ children: "Altura da Lista (Container) (px)"
11385
+ }),
11386
+ /* @__PURE__ */ jsx(u$1, {
11387
+ type: "number",
11388
+ min: "0",
11389
+ placeholder: "Auto (100%)",
11390
+ value: ZA,
11391
+ onChange: (n) => QA(n.target.value)
11392
+ }),
11393
+ /* @__PURE__ */ jsx(p$2, {
11394
+ size: "1",
11395
+ color: "gray",
11396
+ children: "Altura total da lista. Se exceder, rola. Vazio = 100%."
11397
+ })
11398
+ ]
11399
+ })]
11400
+ }),
11401
+ /* @__PURE__ */ jsx(p$2, {
11402
+ size: "1",
11403
+ color: "gray",
11404
+ children: "Essa propriedade será usada para ordenar os itens no modo lista."
11405
+ })
11406
+ ]
11407
+ })
11408
+ }),
11409
+ /* @__PURE__ */ jsxs(p$1, {
11410
+ gap: "3",
11411
+ mt: "4",
11412
+ justify: "end",
11413
+ children: [/* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
11414
+ variant: "soft",
11415
+ color: "gray",
11416
+ children: "Cancelar"
11417
+ }) }), /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
11418
+ onClick: () => {
11419
+ let n = parseInt(ZA, 10);
11420
+ _({
11421
+ sortProp: j === "__none__" ? "" : j,
11422
+ sortOrder: N,
11423
+ newestPosition: z,
11424
+ scrollDirection: U,
11425
+ entryAnimation: G,
11426
+ containerHeight: !isNaN(n) && n > 0 ? n : void 0
11427
+ }), A(!1);
11428
+ },
11429
+ children: "Salvar Alterações"
11430
+ }) })]
11431
+ })
11432
+ ]
11433
+ })]
11434
+ });
10937
11435
  };
10938
11436
  var LayoutGroupContext = createContext({});
10939
11437
  function useConstant(n) {
@@ -11081,13 +11579,13 @@ function createRenderBatcher(n, _) {
11081
11579
  }, j = () => E = !0, M = stepsOrder.reduce((n, E) => (n[E] = createRenderStep(j, _ ? E : void 0), n), {}), { setup: N, read: P, resolveKeyframes: z, preUpdate: B, update: H, preRender: U, render: W, postRender: G } = M, Z = () => {
11082
11580
  let j = MotionGlobalConfig.useManualTiming ? A.timestamp : performance.now();
11083
11581
  E = !1, MotionGlobalConfig.useManualTiming || (A.delta = O ? 1e3 / 60 : Math.max(Math.min(j - A.timestamp, maxElapsed), 1)), A.timestamp = j, A.isProcessing = !0, N.process(A), P.process(A), z.process(A), B.process(A), H.process(A), U.process(A), W.process(A), G.process(A), A.isProcessing = !1, E && _ && (O = !1, n(Z));
11084
- }, GA = () => {
11582
+ }, JA = () => {
11085
11583
  E = !0, O = !0, A.isProcessing || n(Z);
11086
11584
  };
11087
11585
  return {
11088
11586
  schedule: stepsOrder.reduce((n, _) => {
11089
11587
  let O = M[_];
11090
- return n[_] = (n, _ = !1, A = !1) => (E || GA(), O.schedule(n, _, A)), n;
11588
+ return n[_] = (n, _ = !1, A = !1) => (E || JA(), O.schedule(n, _, A)), n;
11091
11589
  }, {}),
11092
11590
  cancel: (n) => {
11093
11591
  for (let _ = 0; _ < stepsOrder.length; _++) M[stepsOrder[_]].cancel(n);
@@ -11445,40 +11943,40 @@ function spring(n = springDefaults.visualDuration, _ = springDefaults.bounce) {
11445
11943
  }, { stiffness: P, damping: z, mass: B, duration: H, velocity: U, isResolvedFromDuration: W } = getSpringOptions({
11446
11944
  ...E,
11447
11945
  velocity: -/* @__PURE__ */ millisecondsToSeconds(E.velocity || 0)
11448
- }), G = U || 0, Z = z / (2 * Math.sqrt(P * B)), GA = M - j, KA = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(P / B)), qA = Math.abs(GA) < 5;
11449
- O ||= qA ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, A ||= qA ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
11450
- let JA;
11946
+ }), G = U || 0, Z = z / (2 * Math.sqrt(P * B)), JA = M - j, YA = /* @__PURE__ */ millisecondsToSeconds(Math.sqrt(P / B)), XA = Math.abs(JA) < 5;
11947
+ O ||= XA ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, A ||= XA ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
11948
+ let ZA;
11451
11949
  if (Z < 1) {
11452
- let n = calcAngularFreq(KA, Z);
11453
- JA = (_) => M - Math.exp(-Z * KA * _) * ((G + Z * KA * GA) / n * Math.sin(n * _) + GA * Math.cos(n * _));
11454
- } else if (Z === 1) JA = (n) => M - Math.exp(-KA * n) * (GA + (G + KA * GA) * n);
11950
+ let n = calcAngularFreq(YA, Z);
11951
+ ZA = (_) => M - Math.exp(-Z * YA * _) * ((G + Z * YA * JA) / n * Math.sin(n * _) + JA * Math.cos(n * _));
11952
+ } else if (Z === 1) ZA = (n) => M - Math.exp(-YA * n) * (JA + (G + YA * JA) * n);
11455
11953
  else {
11456
- let n = KA * Math.sqrt(Z * Z - 1);
11457
- JA = (_) => {
11458
- let E = Math.exp(-Z * KA * _), O = Math.min(n * _, 300);
11459
- return M - E * ((G + Z * KA * GA) * Math.sinh(O) + n * GA * Math.cosh(O)) / n;
11954
+ let n = YA * Math.sqrt(Z * Z - 1);
11955
+ ZA = (_) => {
11956
+ let E = Math.exp(-Z * YA * _), O = Math.min(n * _, 300);
11957
+ return M - E * ((G + Z * YA * JA) * Math.sinh(O) + n * JA * Math.cosh(O)) / n;
11460
11958
  };
11461
11959
  }
11462
- let YA = {
11960
+ let QA = {
11463
11961
  calculatedDuration: W && H || null,
11464
11962
  next: (n) => {
11465
- let _ = JA(n);
11963
+ let _ = ZA(n);
11466
11964
  if (W) N.done = n >= H;
11467
11965
  else {
11468
11966
  let E = n === 0 ? G : 0;
11469
- Z < 1 && (E = n === 0 ? /* @__PURE__ */ secondsToMilliseconds(G) : calcGeneratorVelocity(JA, n, _));
11967
+ Z < 1 && (E = n === 0 ? /* @__PURE__ */ secondsToMilliseconds(G) : calcGeneratorVelocity(ZA, n, _));
11470
11968
  let j = Math.abs(E) <= O, P = Math.abs(M - _) <= A;
11471
11969
  N.done = j && P;
11472
11970
  }
11473
11971
  return N.value = N.done ? M : _, N;
11474
11972
  },
11475
11973
  toString: () => {
11476
- let n = Math.min(calcGeneratorDuration(YA), maxGeneratorDuration), _ = generateLinearEasing((_) => YA.next(n * _).value, n, 30);
11974
+ let n = Math.min(calcGeneratorDuration(QA), maxGeneratorDuration), _ = generateLinearEasing((_) => QA.next(n * _).value, n, 30);
11477
11975
  return n + "ms " + _;
11478
11976
  },
11479
11977
  toTransition: () => {}
11480
11978
  };
11481
- return YA;
11979
+ return QA;
11482
11980
  }
11483
11981
  spring.applyToOptions = (n) => {
11484
11982
  let _ = createGeneratorEasing(n, 100, spring);
@@ -11488,26 +11986,26 @@ function inertia({ keyframes: n, velocity: _ = 0, power: E = .8, timeConstant: O
11488
11986
  let H = n[0], U = {
11489
11987
  done: !1,
11490
11988
  value: H
11491
- }, W = (n) => N !== void 0 && n < N || P !== void 0 && n > P, G = (n) => N === void 0 ? P : P === void 0 || Math.abs(N - n) < Math.abs(P - n) ? N : P, Z = E * _, GA = H + Z, KA = M === void 0 ? GA : M(GA);
11492
- KA !== GA && (Z = KA - H);
11493
- let qA = (n) => -Z * Math.exp(-n / O), JA = (n) => KA + qA(n), YA = (n) => {
11494
- let _ = qA(n), E = JA(n);
11495
- U.done = Math.abs(_) <= z, U.value = U.done ? KA : E;
11496
- }, XA, ZA, QA = (n) => {
11497
- W(U.value) && (XA = n, ZA = spring({
11989
+ }, W = (n) => N !== void 0 && n < N || P !== void 0 && n > P, G = (n) => N === void 0 ? P : P === void 0 || Math.abs(N - n) < Math.abs(P - n) ? N : P, Z = E * _, JA = H + Z, YA = M === void 0 ? JA : M(JA);
11990
+ YA !== JA && (Z = YA - H);
11991
+ let XA = (n) => -Z * Math.exp(-n / O), ZA = (n) => YA + XA(n), QA = (n) => {
11992
+ let _ = XA(n), E = ZA(n);
11993
+ U.done = Math.abs(_) <= z, U.value = U.done ? YA : E;
11994
+ }, $A, ej, tj = (n) => {
11995
+ W(U.value) && ($A = n, ej = spring({
11498
11996
  keyframes: [U.value, G(U.value)],
11499
- velocity: calcGeneratorVelocity(JA, n, U.value),
11997
+ velocity: calcGeneratorVelocity(ZA, n, U.value),
11500
11998
  damping: A,
11501
11999
  stiffness: j,
11502
12000
  restDelta: z,
11503
12001
  restSpeed: B
11504
12002
  }));
11505
12003
  };
11506
- return QA(0), {
12004
+ return tj(0), {
11507
12005
  calculatedDuration: null,
11508
12006
  next: (n) => {
11509
12007
  let _ = !1;
11510
- return !ZA && XA === void 0 && (_ = !0, YA(n), QA(n)), XA !== void 0 && n >= XA ? ZA.next(n - XA) : (!_ && YA(n), U);
12008
+ return !ej && $A === void 0 && (_ = !0, QA(n), tj(n)), $A !== void 0 && n >= $A ? ej.next(n - $A) : (!_ && QA(n), U);
11511
12009
  }
11512
12010
  };
11513
12011
  }
@@ -11627,22 +12125,22 @@ var WithPromise = class {
11627
12125
  if (this.startTime === null) return E.next(0);
11628
12126
  let { delay: P = 0, keyframes: z, repeat: B, repeatType: H, repeatDelay: U, type: W, onUpdate: G, finalKeyframe: Z } = this.options;
11629
12127
  this.speed > 0 ? this.startTime = Math.min(this.startTime, n) : this.speed < 0 && (this.startTime = Math.min(n - O / this.speed, this.startTime)), _ ? this.currentTime = n : this.updateTime(n);
11630
- let GA = this.currentTime - P * (this.playbackSpeed >= 0 ? 1 : -1), KA = this.playbackSpeed >= 0 ? GA < 0 : GA > O;
11631
- this.currentTime = Math.max(GA, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = O);
11632
- let qA = this.currentTime, JA = E;
12128
+ let JA = this.currentTime - P * (this.playbackSpeed >= 0 ? 1 : -1), YA = this.playbackSpeed >= 0 ? JA < 0 : JA > O;
12129
+ this.currentTime = Math.max(JA, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = O);
12130
+ let XA = this.currentTime, ZA = E;
11633
12131
  if (B) {
11634
12132
  let n = Math.min(this.currentTime, O) / M, _ = Math.floor(n), E = n % 1;
11635
- !E && n >= 1 && (E = 1), E === 1 && _--, _ = Math.min(_, B + 1), _ % 2 && (H === "reverse" ? (E = 1 - E, U && (E -= U / M)) : H === "mirror" && (JA = j)), qA = clamp(0, 1, E) * M;
12133
+ !E && n >= 1 && (E = 1), E === 1 && _--, _ = Math.min(_, B + 1), _ % 2 && (H === "reverse" ? (E = 1 - E, U && (E -= U / M)) : H === "mirror" && (ZA = j)), XA = clamp(0, 1, E) * M;
11636
12134
  }
11637
- let YA = KA ? {
12135
+ let QA = YA ? {
11638
12136
  done: !1,
11639
12137
  value: z[0]
11640
- } : JA.next(qA);
11641
- A && (YA.value = A(YA.value));
11642
- let { done: XA } = YA;
11643
- !KA && N !== null && (XA = this.playbackSpeed >= 0 ? this.currentTime >= O : this.currentTime <= 0);
11644
- let ZA = this.holdTime === null && (this.state === "finished" || this.state === "running" && XA);
11645
- return ZA && W !== inertia && (YA.value = getFinalKeyframe$1(z, this.options, Z, this.speed)), G && G(YA.value), ZA && this.finish(), YA;
12138
+ } : ZA.next(XA);
12139
+ A && (QA.value = A(QA.value));
12140
+ let { done: $A } = QA;
12141
+ !YA && N !== null && ($A = this.playbackSpeed >= 0 ? this.currentTime >= O : this.currentTime <= 0);
12142
+ let ej = this.holdTime === null && (this.state === "finished" || this.state === "running" && $A);
12143
+ return ej && W !== inertia && (QA.value = getFinalKeyframe$1(z, this.options, Z, this.speed)), G && G(QA.value), ej && this.finish(), QA;
11646
12144
  }
11647
12145
  then(n, _) {
11648
12146
  return this.finished.then(n, _);
@@ -13013,16 +13511,16 @@ function useVisualElement(n, _, E, O, A, j) {
13013
13511
  }));
13014
13512
  let W = U.current, Z = useContext(SwitchLayoutGroupContext);
13015
13513
  W && !W.projection && A && (W.type === "html" || W.type === "svg") && createProjectionNode$1(U.current, E, A, Z);
13016
- let GA = useRef(!1);
13514
+ let JA = useRef(!1);
13017
13515
  useInsertionEffect(() => {
13018
- W && GA.current && W.update(E, P);
13516
+ W && JA.current && W.update(E, P);
13019
13517
  });
13020
- let qA = E[optimizedAppearDataAttribute], JA = useRef(!!qA && !window.MotionHandoffIsComplete?.(qA) && window.MotionHasOptimisedAnimation?.(qA));
13518
+ let XA = E[optimizedAppearDataAttribute], ZA = useRef(!!XA && !window.MotionHandoffIsComplete?.(XA) && window.MotionHasOptimisedAnimation?.(XA));
13021
13519
  return useIsomorphicLayoutEffect(() => {
13022
- W && (GA.current = !0, window.MotionIsMounted = !0, W.updateFeatures(), W.scheduleRenderMicrotask(), JA.current && W.animationState && W.animationState.animateChanges());
13520
+ W && (JA.current = !0, window.MotionIsMounted = !0, W.updateFeatures(), W.scheduleRenderMicrotask(), ZA.current && W.animationState && W.animationState.animateChanges());
13023
13521
  }), useEffect(() => {
13024
- W && (!JA.current && W.animationState && W.animationState.animateChanges(), JA.current &&= (queueMicrotask(() => {
13025
- window.MotionHandoffMarkAsComplete?.(qA);
13522
+ W && (!ZA.current && W.animationState && W.animationState.animateChanges(), ZA.current &&= (queueMicrotask(() => {
13523
+ window.MotionHandoffMarkAsComplete?.(XA);
13026
13524
  }), !1), W.enteringChildren = void 0);
13027
13525
  }), W;
13028
13526
  }
@@ -13700,34 +14198,34 @@ function createAnimationState(n) {
13700
14198
  function M(j) {
13701
14199
  let { props: M } = n, N = getVariantContext(n.parent) || {}, P = [], z = /* @__PURE__ */ new Set(), B = {}, H = Infinity;
13702
14200
  for (let _ = 0; _ < numAnimationTypes; _++) {
13703
- let U = reversePriorityOrder[_], W = E[U], G = M[U] === void 0 ? N[U] : M[U], Z = isVariantLabel(G), GA = U === j ? W.isActive : null;
13704
- GA === !1 && (H = _);
13705
- let KA = G === N[U] && G !== M[U] && Z;
13706
- if (KA && O && n.manuallyAnimateOnMount && (KA = !1), W.protectedKeys = { ...B }, !W.isActive && GA === null || !G && !W.prevProp || isAnimationControls(G) || typeof G == "boolean") continue;
13707
- let qA = checkVariantsDidChange(W.prevProp, G), JA = qA || U === j && W.isActive && !KA && Z || _ > H && Z, YA = !1, XA = Array.isArray(G) ? G : [G], ZA = XA.reduce(A(U), {});
13708
- GA === !1 && (ZA = {});
13709
- let { prevResolvedValues: QA = {} } = W, $A = {
13710
- ...QA,
13711
- ...ZA
13712
- }, ej = (_) => {
13713
- JA = !0, z.has(_) && (YA = !0, z.delete(_)), W.needsAnimating[_] = !0;
14201
+ let U = reversePriorityOrder[_], W = E[U], G = M[U] === void 0 ? N[U] : M[U], Z = isVariantLabel(G), JA = U === j ? W.isActive : null;
14202
+ JA === !1 && (H = _);
14203
+ let YA = G === N[U] && G !== M[U] && Z;
14204
+ if (YA && O && n.manuallyAnimateOnMount && (YA = !1), W.protectedKeys = { ...B }, !W.isActive && JA === null || !G && !W.prevProp || isAnimationControls(G) || typeof G == "boolean") continue;
14205
+ let XA = checkVariantsDidChange(W.prevProp, G), ZA = XA || U === j && W.isActive && !YA && Z || _ > H && Z, QA = !1, $A = Array.isArray(G) ? G : [G], ej = $A.reduce(A(U), {});
14206
+ JA === !1 && (ej = {});
14207
+ let { prevResolvedValues: tj = {} } = W, nj = {
14208
+ ...tj,
14209
+ ...ej
14210
+ }, rj = (_) => {
14211
+ ZA = !0, z.has(_) && (QA = !0, z.delete(_)), W.needsAnimating[_] = !0;
13714
14212
  let E = n.getValue(_);
13715
14213
  E && (E.liveStyle = !1);
13716
14214
  };
13717
- for (let n in $A) {
13718
- let _ = ZA[n], E = QA[n];
14215
+ for (let n in nj) {
14216
+ let _ = ej[n], E = tj[n];
13719
14217
  if (B.hasOwnProperty(n)) continue;
13720
14218
  let O = !1;
13721
- O = isKeyframesTarget(_) && isKeyframesTarget(E) ? !shallowCompare(_, E) : _ !== E, O ? _ == null ? z.add(n) : ej(n) : _ !== void 0 && z.has(n) ? ej(n) : W.protectedKeys[n] = !0;
14219
+ O = isKeyframesTarget(_) && isKeyframesTarget(E) ? !shallowCompare(_, E) : _ !== E, O ? _ == null ? z.add(n) : rj(n) : _ !== void 0 && z.has(n) ? rj(n) : W.protectedKeys[n] = !0;
13722
14220
  }
13723
- W.prevProp = G, W.prevResolvedValues = ZA, W.isActive && (B = {
14221
+ W.prevProp = G, W.prevResolvedValues = ej, W.isActive && (B = {
13724
14222
  ...B,
13725
- ...ZA
13726
- }), O && n.blockInitialAnimation && (JA = !1);
13727
- let tj = KA && qA;
13728
- JA && (!tj || YA) && P.push(...XA.map((_) => {
14223
+ ...ej
14224
+ }), O && n.blockInitialAnimation && (ZA = !1);
14225
+ let ij = YA && XA;
14226
+ ZA && (!ij || QA) && P.push(...$A.map((_) => {
13729
14227
  let E = { type: U };
13730
- if (typeof _ == "string" && O && !tj && n.manuallyAnimateOnMount && n.parent) {
14228
+ if (typeof _ == "string" && O && !ij && n.manuallyAnimateOnMount && n.parent) {
13731
14229
  let { parent: O } = n, A = resolveVariant(O, _);
13732
14230
  if (O.enteringChildren && A) {
13733
14231
  let { delayChildren: _ } = A.transition || {};
@@ -15240,16 +15738,19 @@ var gestureAnimations = {
15240
15738
  return O == null ? n : String(O);
15241
15739
  });
15242
15740
  }
15243
- return /* @__PURE__ */ jsxs(p$1, {
15741
+ return /* @__PURE__ */ jsxs(p, {
15244
15742
  style: {
15245
15743
  position: "absolute",
15246
15744
  left: 0,
15247
15745
  top: 0,
15248
15746
  width: `${n.width}px`,
15249
- height: `${n.height}px`,
15747
+ height: n.autoGrow ? "auto" : `${n.height}px`,
15748
+ minHeight: n.autoGrow ? "100%" : void 0,
15250
15749
  transform: `translate(${n.x}px, ${n.y + _}px) rotate(${n.rotation || 0}deg)`,
15251
15750
  padding: n.type === "image" || n.type === "text" ? 0 : "8px",
15252
- overflow: "hidden",
15751
+ overflow: n.autoGrow ? "visible" : "hidden",
15752
+ whiteSpace: n.autoGrow ? "pre-wrap" : void 0,
15753
+ wordBreak: n.autoGrow ? "break-word" : void 0,
15253
15754
  ...n.style
15254
15755
  },
15255
15756
  children: [
@@ -15263,7 +15764,7 @@ var gestureAnimations = {
15263
15764
  objectFit: n.style?.objectFit || "cover",
15264
15765
  display: "block"
15265
15766
  }
15266
- }) : /* @__PURE__ */ jsx(p$1, {
15767
+ }) : /* @__PURE__ */ jsx(p, {
15267
15768
  style: {
15268
15769
  width: "100%",
15269
15770
  height: "100%",
@@ -15277,44 +15778,72 @@ var gestureAnimations = {
15277
15778
  children: "Imagem"
15278
15779
  })
15279
15780
  })),
15280
- n.type === "box" && /* @__PURE__ */ jsx(p$1, { style: {
15781
+ n.type === "box" && /* @__PURE__ */ jsx(p, { style: {
15281
15782
  width: "100%",
15282
15783
  height: "100%"
15283
15784
  } })
15284
15785
  ]
15285
15786
  });
15286
- }, ListItem = ({ children: n, index: _, height: E }) => /* @__PURE__ */ jsx(motion.div, {
15287
- initial: {
15288
- opacity: 0,
15289
- y: 20,
15290
- scale: .95
15291
- },
15292
- animate: {
15293
- opacity: 1,
15294
- y: 0,
15295
- scale: 1
15296
- },
15297
- transition: {
15787
+ }, ListItem = ({ children: n, index: _, height: E, entryAnimation: O = "slideIn" }) => {
15788
+ let A = {}, j = {}, M = {
15298
15789
  duration: .4,
15299
15790
  delay: _ * .05,
15300
15791
  ease: "easeOut"
15301
- },
15302
- whileHover: {
15303
- scale: 1.02,
15304
- transition: { duration: .2 }
15305
- },
15306
- style: {
15307
- position: "relative",
15308
- height: E,
15309
- width: "100%",
15310
- marginBottom: "20px",
15311
- transformOrigin: "center center"
15312
- },
15313
- children: n
15314
- });
15792
+ };
15793
+ switch (O) {
15794
+ case "slideIn":
15795
+ A = {
15796
+ opacity: 0,
15797
+ y: 20
15798
+ }, j = {
15799
+ opacity: 1,
15800
+ y: 0
15801
+ };
15802
+ break;
15803
+ case "fadeIn":
15804
+ A = { opacity: 0 }, j = { opacity: 1 };
15805
+ break;
15806
+ case "scaleIn":
15807
+ A = {
15808
+ opacity: 0,
15809
+ scale: .8
15810
+ }, j = {
15811
+ opacity: 1,
15812
+ scale: 1
15813
+ }, M.type = "spring", M.stiffness = 260, M.damping = 20;
15814
+ break;
15815
+ case "none":
15816
+ A = {}, j = {}, M = { duration: 0 };
15817
+ break;
15818
+ default: A = {
15819
+ opacity: 0,
15820
+ y: 20
15821
+ }, j = {
15822
+ opacity: 1,
15823
+ y: 0
15824
+ };
15825
+ }
15826
+ return /* @__PURE__ */ jsx(motion.div, {
15827
+ initial: A,
15828
+ animate: j,
15829
+ transition: M,
15830
+ whileHover: {
15831
+ scale: 1.02,
15832
+ transition: { duration: .2 }
15833
+ },
15834
+ style: {
15835
+ position: "relative",
15836
+ height: E,
15837
+ width: "100%",
15838
+ marginBottom: "20px",
15839
+ transformOrigin: "center center"
15840
+ },
15841
+ children: n
15842
+ });
15843
+ };
15315
15844
  const Preview = () => {
15316
15845
  let { state: n } = useEditor(), E = React.useMemo(() => n.canvasHeight ? n.canvasHeight : n.elements.length === 0 ? 0 : Math.max(...n.elements.map((n) => n.y + n.height)), [n.elements, n.canvasHeight]);
15317
- return /* @__PURE__ */ jsx(p$1, {
15846
+ return /* @__PURE__ */ jsx(p, {
15318
15847
  style: {
15319
15848
  width: "100%",
15320
15849
  height: "100%",
@@ -15329,14 +15858,14 @@ const Preview = () => {
15329
15858
  height: "100%",
15330
15859
  width: "100%"
15331
15860
  },
15332
- children: /* @__PURE__ */ jsx(p$1, {
15861
+ children: /* @__PURE__ */ jsx(p, {
15333
15862
  style: {
15334
15863
  position: "relative",
15335
15864
  minHeight: "100%",
15336
15865
  width: "100%"
15337
15866
  },
15338
15867
  children: (() => {
15339
- if (n.elements.length === 0) return /* @__PURE__ */ jsx(p, {
15868
+ if (n.elements.length === 0) return /* @__PURE__ */ jsx(p$1, {
15340
15869
  align: "center",
15341
15870
  justify: "center",
15342
15871
  style: { height: "100%" },
@@ -15354,7 +15883,7 @@ const Preview = () => {
15354
15883
  return A < j ? -1 * O : A > j ? 1 * O : 0;
15355
15884
  });
15356
15885
  }
15357
- return n.listSettings.newestPosition === "top" && (_ = [..._].reverse()), /* @__PURE__ */ jsx(p, {
15886
+ return n.listSettings.newestPosition === "top" && (_ = [..._].reverse()), /* @__PURE__ */ jsx(p$1, {
15358
15887
  direction: "column",
15359
15888
  justify: n.listSettings.newestPosition === "top" ? "start" : "end",
15360
15889
  p: "4",
@@ -15365,6 +15894,7 @@ const Preview = () => {
15365
15894
  children: _.map((_, O) => /* @__PURE__ */ jsx(ListItem, {
15366
15895
  index: O,
15367
15896
  height: E,
15897
+ entryAnimation: n.listSettings.entryAnimation,
15368
15898
  children: n.elements.map((n) => /* @__PURE__ */ jsx(PreviewElementRenderer, {
15369
15899
  element: n,
15370
15900
  offsetY: 0,
@@ -15381,257 +15911,6 @@ const Preview = () => {
15381
15911
  })
15382
15912
  })
15383
15913
  });
15384
- }, EditorSettings = () => {
15385
- let { state: n, updateListSettings: _, setCanvasHeight: E } = useEditor(), [O, A] = useState(!1), [j, M] = useState(""), [N, P] = useState("asc"), [z, B] = useState("bottom"), [U, W] = useState("down"), [G, Z] = useState("150"), [GA, KA] = useState("");
15386
- return useEffect(() => {
15387
- O && (M(n.listSettings.sortProp || "__none__"), P(n.listSettings.sortOrder || "asc"), B(n.listSettings.newestPosition || "bottom"), W(n.listSettings.scrollDirection || "down"), KA(n.listSettings.containerHeight ? String(n.listSettings.containerHeight) : ""), Z(String(n.canvasHeight || 150)));
15388
- }, [O]), useEffect(() => {
15389
- if (!O) return;
15390
- let _ = parseInt(G, 10);
15391
- !isNaN(_) && _ > 0 && n.canvasHeight !== _ && E(_);
15392
- }, [
15393
- G,
15394
- O,
15395
- E,
15396
- n.canvasHeight
15397
- ]), /* @__PURE__ */ jsxs(s$4, {
15398
- open: O,
15399
- onOpenChange: A,
15400
- children: [/* @__PURE__ */ jsx(n$3, { children: /* @__PURE__ */ jsxs(o, {
15401
- variant: "soft",
15402
- color: "gray",
15403
- style: {
15404
- width: "100%",
15405
- justifyContent: "center",
15406
- cursor: "pointer"
15407
- },
15408
- children: [/* @__PURE__ */ jsx(GearIcon, {}), " Configurações"]
15409
- }) }), /* @__PURE__ */ jsxs(p$8, {
15410
- style: { maxWidth: 600 },
15411
- children: [
15412
- /* @__PURE__ */ jsx(g$2, { children: "Configurações do Editor" }),
15413
- /* @__PURE__ */ jsx(m$3, {
15414
- size: "2",
15415
- mb: "4",
15416
- children: "Configure o comportamento da lista."
15417
- }),
15418
- /* @__PURE__ */ jsx(p$1, {
15419
- pt: "3",
15420
- children: /* @__PURE__ */ jsxs(p, {
15421
- direction: "column",
15422
- gap: "3",
15423
- children: [
15424
- /* @__PURE__ */ jsx(p$2, {
15425
- size: "2",
15426
- weight: "bold",
15427
- children: "Ordenação"
15428
- }),
15429
- /* @__PURE__ */ jsxs(p, {
15430
- gap: "3",
15431
- align: "center",
15432
- children: [/* @__PURE__ */ jsxs(p$1, {
15433
- flexGrow: "1",
15434
- children: [/* @__PURE__ */ jsx(p$2, {
15435
- size: "1",
15436
- mb: "1",
15437
- as: "div",
15438
- children: "Propriedade para Ordenar (ex: data, id)"
15439
- }), /* @__PURE__ */ jsxs("select", {
15440
- value: j,
15441
- onChange: (n) => M(n.target.value),
15442
- style: {
15443
- width: "100%",
15444
- padding: "8px",
15445
- borderRadius: "4px",
15446
- border: "1px solid var(--gray-6)",
15447
- backgroundColor: "var(--gray-2)",
15448
- color: "var(--gray-12)",
15449
- fontSize: "14px",
15450
- outline: "none"
15451
- },
15452
- children: [/* @__PURE__ */ jsx("option", {
15453
- value: "__none__",
15454
- children: "(Nenhum)"
15455
- }), n.availableProps.map((n) => /* @__PURE__ */ jsx("option", {
15456
- value: n.dataName,
15457
- children: n.name
15458
- }, n.dataName))]
15459
- })]
15460
- }), /* @__PURE__ */ jsxs(p$1, { children: [/* @__PURE__ */ jsx(p$2, {
15461
- size: "1",
15462
- mb: "1",
15463
- as: "div",
15464
- children: "Direção"
15465
- }), /* @__PURE__ */ jsxs("select", {
15466
- value: N,
15467
- onChange: (n) => P(n.target.value),
15468
- style: {
15469
- width: "150px",
15470
- padding: "8px",
15471
- borderRadius: "4px",
15472
- border: "1px solid var(--gray-6)",
15473
- backgroundColor: "var(--gray-2)",
15474
- color: "var(--gray-12)",
15475
- fontSize: "14px",
15476
- outline: "none"
15477
- },
15478
- children: [/* @__PURE__ */ jsx("option", {
15479
- value: "asc",
15480
- children: "Crescente (A-Z)"
15481
- }), /* @__PURE__ */ jsx("option", {
15482
- value: "desc",
15483
- children: "Decrescente (Z-A)"
15484
- })]
15485
- })] })]
15486
- }),
15487
- /* @__PURE__ */ jsxs(p, {
15488
- gap: "3",
15489
- align: "center",
15490
- children: [/* @__PURE__ */ jsxs(p$1, {
15491
- flexGrow: "1",
15492
- children: [/* @__PURE__ */ jsx(p$2, {
15493
- size: "1",
15494
- mb: "1",
15495
- as: "div",
15496
- children: "Posição do Recente"
15497
- }), /* @__PURE__ */ jsxs("select", {
15498
- value: z,
15499
- onChange: (n) => B(n.target.value),
15500
- style: {
15501
- width: "100%",
15502
- padding: "8px",
15503
- borderRadius: "4px",
15504
- border: "1px solid var(--gray-6)",
15505
- backgroundColor: "var(--gray-2)",
15506
- color: "var(--gray-12)",
15507
- fontSize: "14px",
15508
- outline: "none"
15509
- },
15510
- children: [/* @__PURE__ */ jsx("option", {
15511
- value: "top",
15512
- children: "Topo (Início)"
15513
- }), /* @__PURE__ */ jsx("option", {
15514
- value: "bottom",
15515
- children: "Base (Final)"
15516
- })]
15517
- })]
15518
- }), /* @__PURE__ */ jsxs(p$1, {
15519
- flexGrow: "1",
15520
- children: [/* @__PURE__ */ jsx(p$2, {
15521
- size: "1",
15522
- mb: "1",
15523
- as: "div",
15524
- children: "Comportamento de Rolagem"
15525
- }), /* @__PURE__ */ jsxs("select", {
15526
- value: U,
15527
- onChange: (n) => W(n.target.value),
15528
- style: {
15529
- width: "100%",
15530
- padding: "8px",
15531
- borderRadius: "4px",
15532
- border: "1px solid var(--gray-6)",
15533
- backgroundColor: "var(--gray-2)",
15534
- color: "var(--gray-12)",
15535
- fontSize: "14px",
15536
- outline: "none"
15537
- },
15538
- children: [/* @__PURE__ */ jsx("option", {
15539
- value: "down",
15540
- children: "Descer (Padrão)"
15541
- }), /* @__PURE__ */ jsx("option", {
15542
- value: "up",
15543
- children: "Subir (Chat)"
15544
- })]
15545
- })]
15546
- })]
15547
- }),
15548
- /* @__PURE__ */ jsx(p$2, {
15549
- size: "2",
15550
- weight: "bold",
15551
- mt: "2",
15552
- children: "Dimensões"
15553
- }),
15554
- /* @__PURE__ */ jsxs(p, {
15555
- gap: "3",
15556
- align: "center",
15557
- children: [/* @__PURE__ */ jsxs(p$1, {
15558
- flexGrow: "1",
15559
- children: [
15560
- /* @__PURE__ */ jsx(p$2, {
15561
- size: "1",
15562
- mb: "1",
15563
- as: "div",
15564
- children: "Altura do Item (Template) (px)"
15565
- }),
15566
- /* @__PURE__ */ jsx(u$1, {
15567
- type: "number",
15568
- min: "10",
15569
- value: G,
15570
- onChange: (n) => Z(n.target.value)
15571
- }),
15572
- /* @__PURE__ */ jsx(p$2, {
15573
- size: "1",
15574
- color: "gray",
15575
- children: "Altura de cada item individual na lista."
15576
- })
15577
- ]
15578
- }), /* @__PURE__ */ jsxs(p$1, {
15579
- flexGrow: "1",
15580
- children: [
15581
- /* @__PURE__ */ jsx(p$2, {
15582
- size: "1",
15583
- mb: "1",
15584
- as: "div",
15585
- children: "Altura da Lista (Container) (px)"
15586
- }),
15587
- /* @__PURE__ */ jsx(u$1, {
15588
- type: "number",
15589
- min: "0",
15590
- placeholder: "Auto (100%)",
15591
- value: GA,
15592
- onChange: (n) => KA(n.target.value)
15593
- }),
15594
- /* @__PURE__ */ jsx(p$2, {
15595
- size: "1",
15596
- color: "gray",
15597
- children: "Altura total da lista. Se exceder, rola. Vazio = 100%."
15598
- })
15599
- ]
15600
- })]
15601
- }),
15602
- /* @__PURE__ */ jsx(p$2, {
15603
- size: "1",
15604
- color: "gray",
15605
- children: "Essa propriedade será usada para ordenar os itens no modo lista."
15606
- })
15607
- ]
15608
- })
15609
- }),
15610
- /* @__PURE__ */ jsxs(p, {
15611
- gap: "3",
15612
- mt: "4",
15613
- justify: "end",
15614
- children: [/* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
15615
- variant: "soft",
15616
- color: "gray",
15617
- children: "Cancelar"
15618
- }) }), /* @__PURE__ */ jsx(D$2, { children: /* @__PURE__ */ jsx(o, {
15619
- onClick: () => {
15620
- let n = parseInt(GA, 10);
15621
- _({
15622
- sortProp: j === "__none__" ? "" : j,
15623
- sortOrder: N,
15624
- newestPosition: z,
15625
- scrollDirection: U,
15626
- containerHeight: !isNaN(n) && n > 0 ? n : void 0
15627
- }), A(!1);
15628
- },
15629
- children: "Salvar Alterações"
15630
- }) })]
15631
- })
15632
- ]
15633
- })]
15634
- });
15635
15914
  };
15636
15915
  var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light" }) => {
15637
15916
  let [j, M] = useState(!0), [N, P] = useState(!0), { addElement: z, loadState: B, state: H } = useEditor();
@@ -15655,7 +15934,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15655
15934
  grayColor: "slate",
15656
15935
  radius: "medium",
15657
15936
  scaling: "100%",
15658
- children: /* @__PURE__ */ jsxs(p, {
15937
+ children: /* @__PURE__ */ jsxs(p$1, {
15659
15938
  direction: "row",
15660
15939
  style: {
15661
15940
  height: "100vh",
@@ -15663,7 +15942,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15663
15942
  overflow: "hidden",
15664
15943
  backgroundColor: "var(--color-background)"
15665
15944
  },
15666
- children: [N && /* @__PURE__ */ jsxs(p, {
15945
+ children: [N && /* @__PURE__ */ jsxs(p$1, {
15667
15946
  direction: "column",
15668
15947
  width: "280px",
15669
15948
  style: {
@@ -15672,16 +15951,16 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15672
15951
  flexShrink: 0,
15673
15952
  height: "100%"
15674
15953
  },
15675
- children: [/* @__PURE__ */ jsx(p$1, {
15954
+ children: [/* @__PURE__ */ jsx(p, {
15676
15955
  p: "4",
15677
15956
  style: {
15678
15957
  borderBottom: "1px solid var(--gray-5)",
15679
15958
  backgroundColor: "var(--gray-2)"
15680
15959
  },
15681
- children: /* @__PURE__ */ jsx(p, {
15960
+ children: /* @__PURE__ */ jsx(p$1, {
15682
15961
  direction: "column",
15683
15962
  gap: "3",
15684
- children: /* @__PURE__ */ jsxs(p$1, { children: [
15963
+ children: /* @__PURE__ */ jsxs(p, { children: [
15685
15964
  /* @__PURE__ */ jsx(p$2, {
15686
15965
  size: "2",
15687
15966
  weight: "bold",
@@ -15740,7 +16019,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15740
16019
  },
15741
16020
  children: [/* @__PURE__ */ jsx(Share1Icon, {}), " Salvar Alterações"]
15742
16021
  }),
15743
- /* @__PURE__ */ jsx(p$1, {
16022
+ /* @__PURE__ */ jsx(p, {
15744
16023
  mt: "2",
15745
16024
  children: /* @__PURE__ */ jsx(EditorSettings, {})
15746
16025
  })
@@ -15750,11 +16029,11 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15750
16029
  type: "auto",
15751
16030
  scrollbars: "vertical",
15752
16031
  style: { flex: 1 },
15753
- children: /* @__PURE__ */ jsx(p, {
16032
+ children: /* @__PURE__ */ jsx(p$1, {
15754
16033
  direction: "column",
15755
16034
  gap: "4",
15756
16035
  p: "4",
15757
- children: /* @__PURE__ */ jsxs(p$1, { children: [
16036
+ children: /* @__PURE__ */ jsxs(p, { children: [
15758
16037
  /* @__PURE__ */ jsx(p$2, {
15759
16038
  size: "2",
15760
16039
  weight: "bold",
@@ -15769,7 +16048,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15769
16048
  as: "div",
15770
16049
  children: "Clique para copiar ou arraste (futuramente)"
15771
16050
  }),
15772
- /* @__PURE__ */ jsxs(p, {
16051
+ /* @__PURE__ */ jsxs(p$1, {
15773
16052
  direction: "column",
15774
16053
  gap: "2",
15775
16054
  children: [n.props.map((n, _) => /* @__PURE__ */ jsxs(e, {
@@ -15799,14 +16078,14 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15799
16078
  ] })
15800
16079
  })
15801
16080
  })]
15802
- }), /* @__PURE__ */ jsxs(p$1, {
16081
+ }), /* @__PURE__ */ jsxs(p, {
15803
16082
  style: {
15804
16083
  flex: 1,
15805
16084
  position: "relative",
15806
16085
  height: "100%"
15807
16086
  },
15808
16087
  children: [
15809
- /* @__PURE__ */ jsx(p$1, {
16088
+ /* @__PURE__ */ jsx(p, {
15810
16089
  style: {
15811
16090
  position: "absolute",
15812
16091
  top: 10,
@@ -15822,7 +16101,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15822
16101
  children: jsx(N ? DoubleArrowLeftIcon : DoubleArrowRightIcon, {})
15823
16102
  })
15824
16103
  }),
15825
- /* @__PURE__ */ jsx(p, {
16104
+ /* @__PURE__ */ jsx(p$1, {
15826
16105
  style: {
15827
16106
  position: "absolute",
15828
16107
  top: 10,
@@ -15849,7 +16128,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15849
16128
  /* @__PURE__ */ jsx(kt, {
15850
16129
  defaultSize: 50,
15851
16130
  minSize: 20,
15852
- children: /* @__PURE__ */ jsx(p$1, {
16131
+ children: /* @__PURE__ */ jsx(p, {
15853
16132
  style: {
15854
16133
  height: "100%",
15855
16134
  width: "100%",
@@ -15867,7 +16146,7 @@ var EditorContent = ({ layout: n, initialState: E, onSave: O, theme: A = "light"
15867
16146
  j && /* @__PURE__ */ jsx(kt, {
15868
16147
  defaultSize: 50,
15869
16148
  minSize: 20,
15870
- children: /* @__PURE__ */ jsx(p$1, {
16149
+ children: /* @__PURE__ */ jsx(p, {
15871
16150
  style: {
15872
16151
  height: "100%",
15873
16152
  width: "100%",
@@ -15889,5 +16168,5 @@ const GenericEditor = (n) => /* @__PURE__ */ jsx(EditorProvider, {
15889
16168
  availableProps: n.layout.props,
15890
16169
  theme: n.theme,
15891
16170
  children: /* @__PURE__ */ jsx(EditorContent, { ...n })
15892
- }), generateHTML = (n, _, E = {}) => Function("elements", "data", "options", getRendererCode() + "\nreturn renderTemplate(elements, data, options);")(n, _, E), getRendererCode = () => "\n/**\n * Render Template\n * @param {Array} elements - The JSON configuration of elements\n * @param {Object|Array} data - The data object to inject (Object for single, Array for list)\n * @param {Object} options - { isList: boolean, listSettings: { sortProp: string, sortOrder: 'asc'|'desc', newestPosition: 'top'|'bottom', scrollDirection: 'up'|'down', containerHeight: number }, canvasHeight: number }\n * @returns {string} - The generated HTML string\n */\nfunction renderTemplate(elements, data, options = {}) {\n const { isList, listSettings, canvasHeight } = options;\n\n const formatValue = (value, formatting) => {\n if (!formatting || formatting.type === 'text') return value !== undefined && value !== null ? String(value) : '';\n if (value === undefined || value === null) return '';\n\n if (formatting.type === 'boolean') {\n const isTrue = String(value) === 'true' || value === true || (typeof value === 'number' && value > 0);\n return isTrue ? (formatting.trueLabel || 'Sim') : (formatting.falseLabel || 'Não');\n }\n\n if (formatting.type === 'date') {\n try {\n const date = new Date(value);\n if (isNaN(date.getTime())) return String(value);\n \n if (formatting.dateFormat) {\n const d = date.getDate().toString().padStart(2, '0');\n const m = (date.getMonth() + 1).toString().padStart(2, '0');\n const y = date.getFullYear();\n const H = date.getHours().toString().padStart(2, '0');\n const M = date.getMinutes().toString().padStart(2, '0');\n const S = date.getSeconds().toString().padStart(2, '0');\n \n return formatting.dateFormat\n .replace('DD', d)\n .replace('MM', m)\n .replace('YYYY', String(y))\n .replace('HH', H)\n .replace('mm', M)\n .replace('ss', S);\n }\n return date.toLocaleDateString();\n } catch (e) { return String(value); }\n }\n\n if (formatting.type === 'number') {\n const num = parseFloat(value);\n if (isNaN(num)) return String(value);\n \n if (formatting.numberFormat === 'currency') {\n return (formatting.currencySymbol || 'R$') + ' ' + num.toFixed(formatting.decimalPlaces || 2);\n }\n if (formatting.numberFormat === 'percent') {\n return num.toFixed(formatting.decimalPlaces || 0) + '%';\n }\n if (formatting.decimalPlaces !== undefined) {\n return num.toFixed(formatting.decimalPlaces);\n }\n return num.toFixed(formatting.decimalPlaces || 0);\n }\n \n return String(value);\n };\n\n const checkCondition = (propValue, operator, ruleValue) => {\n const val = String(propValue).toLowerCase();\n const target = String(ruleValue).toLowerCase();\n \n switch (operator) {\n case 'equals': return val === target;\n case 'notEquals': return val !== target;\n case 'contains': return val.includes(target);\n case 'greaterThan': return parseFloat(val) > parseFloat(target);\n case 'lessThan': return parseFloat(val) < parseFloat(target);\n case 'truthy': return !!propValue;\n case 'falsy': return !propValue;\n default: return false;\n }\n };\n\n const camelToKebab = (string) => {\n return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();\n };\n\n const hex8ToRgba = (hex) => {\n const m = /^#([0-9a-fA-F]{8})$/.exec(hex);\n if (!m) return hex;\n const h = m[1];\n const r = parseInt(h.slice(0, 2), 16);\n const g = parseInt(h.slice(2, 4), 16);\n const b = parseInt(h.slice(4, 6), 16);\n const a = parseInt(h.slice(6, 8), 16) / 255;\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n };\n\n const styleObjectToString = (style) => {\n if (!style) return '';\n const pxProps = ['width', 'height', 'top', 'left', 'right', 'bottom', 'fontSize', 'borderRadius', 'padding', 'margin', 'borderWidth'];\n \n return Object.entries(style)\n .map(([key, value]) => {\n if (value === undefined || value === null) return '';\n const cssKey = camelToKebab(key);\n let cssValue = (typeof value === 'number' && pxProps.includes(key)) ? value + 'px' : value;\n if (typeof cssValue === 'string') {\n if (/^#([0-9a-fA-F]{8})$/.test(cssValue)) {\n cssValue = hex8ToRgba(cssValue);\n }\n }\n return `${cssKey}: ${cssValue}`;\n })\n .filter(Boolean)\n .join('; ');\n };\n\n const renderItem = (itemData, index = 0, offsetY = 0) => {\n return elements.map(element => {\n let content = element.content;\n let imgSrc = '';\n\n // Resolve Content & Formatting\n if (element.type === 'text') {\n content = content.replace(/\\{\\{(.*?)\\}\\}/g, (match, key) => {\n const val = itemData[key.trim()];\n if (val === undefined || val === null) return match;\n if (element.formatting) {\n return formatValue(val, element.formatting);\n }\n return String(val);\n });\n } else if (element.type === 'image') {\n if (element.dataBinding) {\n const val = itemData[element.dataBinding];\n if (val !== undefined && val !== null) {\n imgSrc = String(val);\n } else {\n imgSrc = content;\n }\n } else {\n imgSrc = content.replace(/\\{\\{(.*?)\\}\\}/g, (match, key) => {\n const val = itemData[key.trim()];\n return val !== undefined && val !== null ? String(val) : match;\n });\n }\n }\n\n // Resolve Conditional Styles\n let conditionalStyles = {};\n if (element.conditions) {\n element.conditions.forEach(rule => {\n const propVal = itemData[rule.property];\n if (checkCondition(propVal, rule.operator, rule.value)) {\n conditionalStyles = { ...conditionalStyles, ...rule.style };\n }\n });\n }\n\n const baseStyle = {\n position: 'absolute',\n left: element.x,\n top: element.y + offsetY,\n width: element.width,\n height: element.autoGrow ? 'auto' : element.height,\n transform: element.rotation ? `rotate(${element.rotation}deg)` : undefined,\n overflow: element.autoGrow ? 'visible' : 'hidden',\n whiteSpace: element.autoGrow ? 'pre-wrap' : undefined,\n wordBreak: element.autoGrow ? 'break-word' : undefined,\n ...element.style,\n ...conditionalStyles\n };\n \n // Fix: remove padding if it's not explicitly set, or handle it for text\n if (element.type === 'text' && !baseStyle.padding) {\n // baseStyle.padding = '8px'; // Removed default padding to respect resize box\n }\n \n const styleString = styleObjectToString(baseStyle);\n\n if (element.type === 'text') {\n return `<div style=\"${styleString}\">${content}</div>`;\n } else if (element.type === 'image') {\n const imgStyle = styleObjectToString({\n width: '100%',\n height: '100%',\n objectFit: element.style?.objectFit || 'cover',\n display: 'block'\n });\n return `<div style=\"${styleString}\"><img src=\"${imgSrc}\" alt=\"Element\" style=\"${imgStyle}\" /></div>`;\n } else if (element.type === 'box') {\n return `<div style=\"${styleString}\"></div>`;\n }\n return '';\n }).join('\\n');\n };\n\n if (isList && Array.isArray(data)) {\n // Calculate item height\n const itemHeight = canvasHeight || Math.max(...elements.map(el => el.y + el.height));\n\n // Sort data\n let listData = [...data];\n if (listSettings && listSettings.sortProp) {\n const prop = listSettings.sortProp;\n const order = listSettings.sortOrder === 'asc' ? 1 : -1;\n listData.sort((a, b) => {\n const valA = a[prop];\n const valB = b[prop];\n if (valA < valB) return -1 * order;\n if (valA > valB) return 1 * order;\n return 0;\n });\n }\n \n // Handle newest position\n if (listSettings && listSettings.newestPosition === 'top') {\n listData.reverse();\n }\n\n // Generate HTML for all items\n const itemsHtml = listData.map((item, index) => {\n const itemHtml = renderItem(item, index, 0); \n const itemContainerStyle = styleObjectToString({\n position: 'relative',\n height: itemHeight,\n width: '100%',\n marginBottom: 0\n });\n \n return `<div class=\"list-item\" style=\"${itemContainerStyle}\">${itemHtml}</div>`;\n }).join('\\n');\n\n // Animation Styles based on settings\n const scrollDirection = (listSettings && listSettings.scrollDirection) || 'down';\n const containerHeight = (listSettings && listSettings.containerHeight) ? listSettings.containerHeight + 'px' : '100%';\n \n const justify = (listSettings && listSettings.newestPosition === 'top') ? 'flex-start' : 'flex-end';\n\n const animationCss = `\n @keyframes slideIn {\n from { opacity: 0; transform: translateY(20px); }\n to { opacity: 1; transform: translateY(0); }\n }\n .list-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: ${justify};\n height: ${containerHeight};\n width: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n box-sizing: border-box;\n padding: 10px;\n }\n .list-item {\n flex-shrink: 0;\n animation: slideIn 0.3s ease-out;\n margin-bottom: 10px;\n width: 100%;\n position: relative;\n }\n `;\n \n const scrollScript = scrollDirection === 'up' \n ? `<script>\n document.addEventListener('DOMContentLoaded', () => {\n const wrapper = document.querySelector('.list-wrapper');\n if(wrapper) wrapper.scrollTop = wrapper.scrollHeight;\n });\n <\/script>`\n : '';\n\n // Inject Smart Script for Dynamic Updates\n const injectionScript = `\n <script>\n (function() {\n try {\n const elements = ${JSON.stringify(elements)};\n const formatValue = ${formatValue.toString()};\n const checkCondition = ${checkCondition.toString()};\n const camelToKebab = ${camelToKebab.toString()};\n const hex8ToRgba = ${hex8ToRgba.toString()};\n const styleObjectToString = ${styleObjectToString.toString()};\n const renderItem = ${renderItem.toString()};\n\n const itemHeight = ${itemHeight};\n const newestPosition = \"${(listSettings && listSettings.newestPosition) || 'bottom'}\";\n const scrollDirection = \"${(listSettings && listSettings.scrollDirection) || 'down'}\";\n\n window.addItem = function(data) {\n const wrapper = document.querySelector('.list-wrapper');\n if (!wrapper) return;\n\n const itemHtml = renderItem(data, 0, 0);\n const itemContainerStyle = styleObjectToString({\n position: 'relative',\n height: itemHeight,\n width: '100%',\n marginBottom: 0\n });\n\n const div = document.createElement('div');\n div.className = 'list-item';\n div.setAttribute('style', itemContainerStyle);\n div.innerHTML = itemHtml;\n\n if (newestPosition === 'top') {\n wrapper.insertBefore(div, wrapper.firstChild);\n } else {\n wrapper.appendChild(div);\n }\n \n if (scrollDirection === 'up') {\n wrapper.scrollTop = wrapper.scrollHeight;\n }\n };\n } catch(e) { console.error(\"Smart List Init Error\", e); }\n })();\n <\/script>\n `;\n\n return `\n <style>${animationCss}</style>\n <div class=\"list-wrapper\">\n ${itemsHtml}\n </div>\n ${scrollScript}\n ${injectionScript}\n `;\n }\n\n // Single Item\n const contentHtml = renderItem(data);\n return `<div style=\"position: relative; width: 100%; height: 100%; overflow: hidden;\">${contentHtml}</div>`;\n}\n";
16171
+ }), generateHTML = (n, _, E = {}) => Function("elements", "data", "options", getRendererCode() + "\nreturn renderTemplate(elements, data, options);")(n, _, E), getRendererCode = () => "\n/**\n * Render Template\n * @param {Array} elements - The JSON configuration of elements\n * @param {Object|Array} data - The data object to inject (Object for single, Array for list)\n * @param {Object} options - { isList: boolean, listSettings: { sortProp: string, sortOrder: 'asc'|'desc', newestPosition: 'top'|'bottom', scrollDirection: 'up'|'down', containerHeight: number }, canvasHeight: number }\n * @returns {string} - The generated HTML string\n */\nfunction renderTemplate(elements, data, options = {}) {\n const { isList, listSettings, canvasHeight } = options;\n\n const formatValue = (value, formatting) => {\n if (!formatting || formatting.type === 'text') return value !== undefined && value !== null ? String(value) : '';\n if (value === undefined || value === null) return '';\n\n if (formatting.type === 'boolean') {\n const isTrue = String(value) === 'true' || value === true || (typeof value === 'number' && value > 0);\n return isTrue ? (formatting.trueLabel || 'Sim') : (formatting.falseLabel || 'Não');\n }\n\n if (formatting.type === 'date') {\n try {\n const date = new Date(value);\n if (isNaN(date.getTime())) return String(value);\n \n if (formatting.dateFormat) {\n const d = date.getDate().toString().padStart(2, '0');\n const m = (date.getMonth() + 1).toString().padStart(2, '0');\n const y = date.getFullYear();\n const H = date.getHours().toString().padStart(2, '0');\n const M = date.getMinutes().toString().padStart(2, '0');\n const S = date.getSeconds().toString().padStart(2, '0');\n \n return formatting.dateFormat\n .replace('DD', d)\n .replace('MM', m)\n .replace('YYYY', String(y))\n .replace('HH', H)\n .replace('mm', M)\n .replace('ss', S);\n }\n return date.toLocaleDateString();\n } catch (e) { return String(value); }\n }\n\n if (formatting.type === 'number') {\n const num = parseFloat(value);\n if (isNaN(num)) return String(value);\n \n if (formatting.numberFormat === 'currency') {\n return (formatting.currencySymbol || 'R$') + ' ' + num.toFixed(formatting.decimalPlaces || 2);\n }\n if (formatting.numberFormat === 'percent') {\n return num.toFixed(formatting.decimalPlaces || 0) + '%';\n }\n if (formatting.decimalPlaces !== undefined) {\n return num.toFixed(formatting.decimalPlaces);\n }\n return num.toFixed(formatting.decimalPlaces || 0);\n }\n \n return String(value);\n };\n\n const checkCondition = (propValue, operator, ruleValue) => {\n const val = String(propValue).toLowerCase();\n const target = String(ruleValue).toLowerCase();\n \n switch (operator) {\n case 'equals': return val === target;\n case 'notEquals': return val !== target;\n case 'contains': return val.includes(target);\n case 'greaterThan': return parseFloat(val) > parseFloat(target);\n case 'lessThan': return parseFloat(val) < parseFloat(target);\n case 'truthy': return !!propValue;\n case 'falsy': return !propValue;\n default: return false;\n }\n };\n\n const camelToKebab = (string) => {\n return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();\n };\n\n const hex8ToRgba = (hex) => {\n const m = /^#([0-9a-fA-F]{8})$/.exec(hex);\n if (!m) return hex;\n const h = m[1];\n const r = parseInt(h.slice(0, 2), 16);\n const g = parseInt(h.slice(2, 4), 16);\n const b = parseInt(h.slice(4, 6), 16);\n const a = parseInt(h.slice(6, 8), 16) / 255;\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n };\n\n const styleObjectToString = (style) => {\n if (!style) return '';\n const pxProps = ['width', 'height', 'top', 'left', 'right', 'bottom', 'fontSize', 'borderRadius', 'padding', 'margin', 'borderWidth'];\n \n return Object.entries(style)\n .map(([key, value]) => {\n if (value === undefined || value === null) return '';\n const cssKey = camelToKebab(key);\n let cssValue = (typeof value === 'number' && pxProps.includes(key)) ? value + 'px' : value;\n if (typeof cssValue === 'string') {\n if (/^#([0-9a-fA-F]{8})$/.test(cssValue)) {\n cssValue = hex8ToRgba(cssValue);\n }\n }\n return `${cssKey}: ${cssValue}`;\n })\n .filter(Boolean)\n .join('; ');\n };\n\n const renderItem = (itemData, index = 0, offsetY = 0) => {\n return elements.map(element => {\n let content = element.content;\n let imgSrc = '';\n\n // Resolve Content & Formatting\n if (element.type === 'text') {\n content = content.replace(/\\{\\{(.*?)\\}\\}/g, (match, key) => {\n const val = itemData[key.trim()];\n if (val === undefined || val === null) return match;\n if (element.formatting) {\n return formatValue(val, element.formatting);\n }\n return String(val);\n });\n } else if (element.type === 'image') {\n if (element.dataBinding) {\n const val = itemData[element.dataBinding];\n if (val !== undefined && val !== null) {\n imgSrc = String(val);\n } else {\n imgSrc = content;\n }\n } else {\n imgSrc = content.replace(/\\{\\{(.*?)\\}\\}/g, (match, key) => {\n const val = itemData[key.trim()];\n return val !== undefined && val !== null ? String(val) : match;\n });\n }\n }\n\n // Resolve Conditional Styles\n let conditionalStyles = {};\n if (element.conditions) {\n element.conditions.forEach(rule => {\n const propVal = itemData[rule.property];\n if (checkCondition(propVal, rule.operator, rule.value)) {\n conditionalStyles = { ...conditionalStyles, ...rule.style };\n }\n });\n }\n\n const baseStyle = {\n position: 'absolute',\n left: element.x,\n top: element.y + offsetY,\n width: element.width,\n height: element.autoGrow ? 'auto' : element.height,\n transform: element.rotation ? `rotate(${element.rotation}deg)` : undefined,\n overflow: element.autoGrow ? 'visible' : 'hidden',\n whiteSpace: element.autoGrow ? 'pre-wrap' : undefined,\n wordBreak: element.autoGrow ? 'break-word' : undefined,\n ...element.style,\n ...conditionalStyles\n };\n \n // Fix: remove padding if it's not explicitly set, or handle it for text\n if (element.type === 'text' && !baseStyle.padding) {\n // baseStyle.padding = '8px'; // Removed default padding to respect resize box\n }\n \n const styleString = styleObjectToString(baseStyle);\n const dataAttrs = `data-id=\"${element.id}\" ${element.parentId ? `data-parent-id=\"${element.parentId}\"` : ''} ${element.autoGrow ? 'data-auto-grow=\"true\"' : ''} ${element.autoGrowContainer ? 'data-auto-grow-container=\"true\"' : ''}`;\n\n if (element.type === 'text') {\n return `<div ${dataAttrs} style=\"${styleString}\">${content}</div>`;\n } else if (element.type === 'image') {\n const imgStyle = styleObjectToString({\n width: '100%',\n height: '100%',\n objectFit: element.style?.objectFit || 'cover',\n display: 'block'\n });\n return `<div ${dataAttrs} style=\"${styleString}\"><img src=\"${imgSrc}\" alt=\"Element\" style=\"${imgStyle}\" /></div>`;\n } else if (element.type === 'box') {\n return `<div ${dataAttrs} style=\"${styleString}\"></div>`;\n }\n return '';\n }).join('\\n');\n };\n\n if (isList && Array.isArray(data)) {\n // Calculate item height\n const itemHeight = canvasHeight || Math.max(...elements.map(el => el.y + el.height));\n\n // Sort data\n let listData = [...data];\n if (listSettings && listSettings.sortProp) {\n const prop = listSettings.sortProp;\n const order = listSettings.sortOrder === 'asc' ? 1 : -1;\n listData.sort((a, b) => {\n const valA = a[prop];\n const valB = b[prop];\n if (valA < valB) return -1 * order;\n if (valA > valB) return 1 * order;\n return 0;\n });\n }\n \n // Handle newest position\n if (listSettings && listSettings.newestPosition === 'top') {\n listData.reverse();\n }\n\n // Generate HTML for all items\n const itemsHtml = listData.map((item, index) => {\n const itemHtml = renderItem(item, index, 0); \n const itemContainerStyle = styleObjectToString({\n position: 'relative',\n height: itemHeight,\n width: '100%',\n marginBottom: 0\n });\n \n return `<div class=\"list-item\" style=\"${itemContainerStyle}\">${itemHtml}</div>`;\n }).join('\\n');\n\n // Animation Styles based on settings\n const scrollDirection = (listSettings && listSettings.scrollDirection) || 'down';\n const containerHeight = (listSettings && listSettings.containerHeight) ? listSettings.containerHeight + 'px' : '100%';\n \n const justify = (listSettings && listSettings.newestPosition === 'top') ? 'flex-start' : 'flex-end';\n\n const entryAnimation = (listSettings && listSettings.entryAnimation) || 'slideIn';\n \n let keyframes = '';\n let animationRule = '';\n\n if (entryAnimation === 'slideIn') {\n keyframes = `\n @keyframes entryAnim {\n from { opacity: 0; transform: translateY(20px); }\n to { opacity: 1; transform: translateY(0); }\n }\n `;\n animationRule = 'animation: entryAnim 0.3s ease-out;';\n } else if (entryAnimation === 'fadeIn') {\n keyframes = `\n @keyframes entryAnim {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n `;\n animationRule = 'animation: entryAnim 0.4s ease-out;';\n } else if (entryAnimation === 'scaleIn') {\n keyframes = `\n @keyframes entryAnim {\n from { opacity: 0; transform: scale(0.8); }\n to { opacity: 1; transform: scale(1); }\n }\n `;\n animationRule = 'animation: entryAnim 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);';\n } else {\n keyframes = '';\n animationRule = '';\n }\n\n const animationCss = `\n ${keyframes}\n .list-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: ${justify};\n height: ${containerHeight};\n width: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n box-sizing: border-box;\n padding: 10px;\n }\n .list-item {\n flex-shrink: 0;\n ${animationRule}\n margin-bottom: 10px;\n width: 100%;\n position: relative;\n }\n `;\n \n const scrollScript = scrollDirection === 'up' \n ? `<script>\n document.addEventListener('DOMContentLoaded', () => {\n const wrapper = document.querySelector('.list-wrapper');\n if(wrapper) wrapper.scrollTop = wrapper.scrollHeight;\n });\n <\/script>`\n : '';\n\n // Inject Smart Script for Dynamic Updates\n const injectionScript = `\n <script>\n (function() {\n try {\n const elements = ${JSON.stringify(elements)};\n const formatValue = ${formatValue.toString()};\n const checkCondition = ${checkCondition.toString()};\n const camelToKebab = ${camelToKebab.toString()};\n const hex8ToRgba = ${hex8ToRgba.toString()};\n const styleObjectToString = ${styleObjectToString.toString()};\n const renderItem = ${renderItem.toString()};\n\n const itemHeight = ${itemHeight};\n const newestPosition = \"${(listSettings && listSettings.newestPosition) || 'bottom'}\";\n const scrollDirection = \"${(listSettings && listSettings.scrollDirection) || 'down'}\";\n\n window.addItem = function(data) {\n const wrapper = document.querySelector('.list-wrapper');\n if (!wrapper) return;\n\n // 1. Render content to a temp container to measure size\n const tempDiv = document.createElement('div');\n tempDiv.style.position = 'absolute';\n tempDiv.style.visibility = 'hidden';\n tempDiv.style.width = '100%';\n // Assuming wrapper width is reliable\n tempDiv.innerHTML = renderItem(data, 0, 0);\n document.body.appendChild(tempDiv);\n\n // 2. Perform Layout Adjustment (Runtime)\n const children = Array.from(tempDiv.children);\n const idMap = {};\n children.forEach(el => {\n const id = el.getAttribute('data-id');\n if (id) idMap[id] = el;\n });\n\n // Helper to get numeric style\n const getNumStyle = (el, prop) => parseFloat(el.style[prop] || 0);\n\n // A. Handle Text Expansion -> Parent Expansion\n children.forEach(el => {\n if (el.getAttribute('data-auto-grow') === 'true') {\n const initialHeight = getNumStyle(el, 'height');\n // Since we set 'auto' in renderItem for autoGrow, measuring offsetHeight gives real height\n const realHeight = el.offsetHeight;\n \n // Check if parent needs expansion\n const parentId = el.getAttribute('data-parent-id');\n if (parentId && idMap[parentId]) {\n const parent = idMap[parentId];\n if (parent.getAttribute('data-auto-grow-container') === 'true') {\n const parentTop = getNumStyle(parent, 'top');\n const parentHeight = getNumStyle(parent, 'height');\n const elTop = getNumStyle(el, 'top');\n \n // Calculate absolute bottom of child relative to item container\n const childBottom = elTop + realHeight;\n const parentBottom = parentTop + parentHeight;\n const padding = 10;\n\n if (childBottom + padding > parentBottom) {\n const newParentHeight = childBottom + padding - parentTop;\n parent.style.height = newParentHeight + 'px';\n \n // Propagate push to siblings of parent\n const delta = newParentHeight - parentHeight;\n const parentBottomThreshold = parentTop + parentHeight - 1; // old threshold\n\n children.forEach(sibling => {\n if (sibling === parent || sibling.getAttribute('data-parent-id') === parentId) return;\n const sibTop = getNumStyle(sibling, 'top');\n if (sibTop >= parentBottomThreshold) {\n sibling.style.top = (sibTop + delta) + 'px';\n }\n });\n }\n }\n } else {\n // Case where autoGrow element is root level, push siblings?\n // (Not implemented in editor context yet for root level siblings push if text grows, \n // but here we can add it if needed. For now sticking to container logic)\n }\n }\n });\n\n // 3. Calculate Final Item Height\n let maxBottom = itemHeight;\n children.forEach(el => {\n const bottom = getNumStyle(el, 'top') + el.offsetHeight;\n if (bottom > maxBottom) maxBottom = bottom;\n });\n \n // Clean up temp\n const finalHtml = tempDiv.innerHTML;\n document.body.removeChild(tempDiv);\n\n const itemContainerStyle = styleObjectToString({\n position: 'relative',\n height: maxBottom, // Use dynamic height\n width: '100%',\n marginBottom: 0\n });\n\n const div = document.createElement('div');\n div.className = 'list-item';\n div.setAttribute('style', itemContainerStyle);\n div.innerHTML = finalHtml;\n\n if (newestPosition === 'top') {\n wrapper.insertBefore(div, wrapper.firstChild);\n } else {\n wrapper.appendChild(div);\n }\n \n if (scrollDirection === 'up') {\n wrapper.scrollTop = wrapper.scrollHeight;\n }\n };\n } catch(e) { console.error(\"Smart List Init Error\", e); }\n })();\n <\/script>\n `;\n\n return `\n <style>${animationCss}</style>\n <div class=\"list-wrapper\">\n ${itemsHtml}\n </div>\n ${scrollScript}\n ${injectionScript}\n `;\n }\n\n // Single Item\n const contentHtml = renderItem(data);\n return `<div style=\"position: relative; width: 100%; height: 100%; overflow: hidden;\">${contentHtml}</div>`;\n}\n";
15893
16172
  export { GenericEditor as EditorContent, generateHTML };