@astrato-io/visualizations 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +32 -2
  2. package/THIRD_PARTY_NOTICES.md +2 -229
  3. package/VISUALIZATION_DEFINITIONS.md +68 -114
  4. package/chunks/Button-BrGKp9Nm.js +110 -0
  5. package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
  6. package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
  7. package/chunks/{LinearProgress-B1FeWaen.js → LinearProgress-VtfFx2vJ.js} +55 -55
  8. package/chunks/MenuOption-ByRqhRdX.js +3934 -0
  9. package/chunks/Title-CO5dP1ma.js +1691 -0
  10. package/chunks/ToggleButton-KOBAimC1.js +112 -0
  11. package/chunks/{app-filter-bar.compiler-BGJ7HAbr.js → app-filter-bar.compiler-TwVTeoj5.js} +10 -10
  12. package/chunks/{bar.compiler-CT0ZbQKc.js → bar.compiler-DuQg8EUb.js} +84 -84
  13. package/chunks/builder-DEDvNq1k.js +201 -0
  14. package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
  15. package/chunks/color-settings-3VRlf_Vw.js +6 -0
  16. package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
  17. package/chunks/coloring-CncX_JRX.js +278 -0
  18. package/chunks/{definitions-D3OVqmXl.js → definitions-BPJQTx16.js} +490 -382
  19. package/chunks/{escobar-eDjtGpkC.js → escobar-DRhRMYRE.js} +6067 -4742
  20. package/chunks/event-bus-CrLB-Y8z.js +3 -0
  21. package/chunks/extend-preset-CUFNpmPe.js +4398 -0
  22. package/chunks/{filter.compiler-DBsyRBJt.js → filter.compiler-w27dlv0C.js} +12 -12
  23. package/chunks/{filtering-tqjAyJH5.js → filtering-cc7WqWpg.js} +391 -310
  24. package/chunks/{handlers-VTBfIZYZ.js → handlers-TOT-7INo.js} +3241 -3442
  25. package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
  26. package/chunks/isEqual-B8loyPsC.js +12 -0
  27. package/chunks/label-format-type-weq1XfcX.js +8 -0
  28. package/chunks/{line.compiler-CzdM5Ld0.js → line.compiler-Ct1WhN2p.js} +27 -27
  29. package/chunks/logger-DpQtYQnX.js +1163 -0
  30. package/chunks/lookup-BWllin0q.js +36 -0
  31. package/chunks/{metadata-BGElBy5Z.js → metadata-WABZrt7Y.js} +1 -1
  32. package/chunks/{number.compiler-G-R7y16P.js → number.compiler-D8TPly-4.js} +13 -13
  33. package/chunks/{operations-CTNUX6Sy.js → operations-Dh4v1Ovt.js} +9314 -9283
  34. package/chunks/{range-CiwTbMig.js → range-Bi-7zT0k.js} +2 -2
  35. package/chunks/registry-KervaxqJ.js +31 -0
  36. package/chunks/render-wrappers-OEmtaM8g.js +2 -0
  37. package/chunks/{registry-CsQQzukD.js → requirements-PAoRaJyb.js} +304 -336
  38. package/chunks/responsive.styles-DSiOGD7u.js +82 -0
  39. package/chunks/{shared-CBvcC5YV.js → shared-Bn4N5QcZ.js} +424 -424
  40. package/chunks/src-77e3mC7i.js +391 -0
  41. package/chunks/standalone-B55oyW6c.js +689 -0
  42. package/chunks/{standalone-C3gg736V.js → standalone-BDhPQtzQ.js} +375 -341
  43. package/chunks/{standalone-BMIbT1b2.js → standalone-BGkmozIb.js} +992 -837
  44. package/chunks/standalone-BMTCb10X.js +179 -0
  45. package/chunks/standalone-BXKRE_Se.js +468 -0
  46. package/chunks/standalone-Bes8srx1.js +354 -0
  47. package/chunks/standalone-BjZp0QMe.js +2 -0
  48. package/chunks/{standalone-JuLF-OoH.js → standalone-BlMIwpEe.js} +634 -519
  49. package/chunks/{standalone-C_rYnZ0N.js → standalone-C8ZAEutO.js} +43 -42
  50. package/chunks/standalone-C8qAelL4.js +2 -0
  51. package/chunks/standalone-CJvIXsQE.js +743 -0
  52. package/chunks/standalone-CLmGb7nn2.js +355 -0
  53. package/chunks/standalone-CM5XcAN5.js +52327 -0
  54. package/chunks/standalone-CXNP6-xD.js +420 -0
  55. package/chunks/{standalone-vzBY6q0I2.js → standalone-D5Q5ngsD.js} +57 -55
  56. package/chunks/standalone-DLlyRIE6.js +287 -0
  57. package/chunks/standalone-DMcI1afI.js +396 -0
  58. package/chunks/{standalone-DC-aUgXC.js → standalone-DN4S1MjT.js} +1111 -1092
  59. package/chunks/standalone-DT0wKji7.js +6 -0
  60. package/chunks/{standalone-0M4HlmDW2.js → standalone-DVTJwsTY.js} +1109 -1035
  61. package/chunks/standalone-DW6NT205.js +518 -0
  62. package/chunks/standalone-DYQIQH4c.js +2095 -0
  63. package/chunks/standalone-D__XCp-h.js +1003 -0
  64. package/chunks/standalone-XTgSsTAa.js +354 -0
  65. package/chunks/{standalone-v1oxfU20.js → standalone-XuGksArp.js} +20 -20
  66. package/chunks/{standalone-BtSHCp2U2.js → standalone-we5D5MIn.js} +173 -168
  67. package/chunks/{table.compiler-tb914oj3.js → table.compiler-DMeeHxb6.js} +29 -29
  68. package/chunks/useFieldName-Cjn9KCVp.js +7 -0
  69. package/chunks/useSlotProps-DLbQp4lc.js +166 -0
  70. package/chunks/{utils-Bg7K-t6K.js → utils-vdmi_2PK.js} +6271 -7804
  71. package/chunks/{view-Bn83C8d9.js → view-BuwQugKb.js} +2717 -3504
  72. package/chunks/{isEqual-BDxAhUo8.js → visualization-filters-Cc4KU-l-.js} +1887 -1946
  73. package/chunks/web-components-DqClFkgO.js +1185 -0
  74. package/chunks/with-html-element-D0uY2zjI.js +7328 -0
  75. package/definitions.js +2 -2
  76. package/docs/operations/astrato-app-filter-bar.md +1 -1
  77. package/docs/operations/bar.md +31 -14
  78. package/docs/operations/combo.md +1 -1
  79. package/docs/operations/date-picker.md +3 -3
  80. package/docs/operations/distribution-gauge.md +13 -13
  81. package/docs/operations/dot.md +13 -13
  82. package/docs/operations/filter.md +1 -1
  83. package/docs/operations/gauge.md +13 -13
  84. package/docs/operations/heatMap.md +13 -13
  85. package/docs/operations/histogram.md +1 -1
  86. package/docs/operations/iframe.md +1 -1
  87. package/docs/operations/image.md +1 -1
  88. package/docs/operations/index.md +3 -3
  89. package/docs/operations/line.md +7 -7
  90. package/docs/operations/number.md +1 -1
  91. package/docs/operations/pie.md +13 -13
  92. package/docs/operations/radar.md +7 -7
  93. package/docs/operations/sankey.md +13 -13
  94. package/docs/operations/scatter.md +13 -13
  95. package/docs/operations/shape.md +1 -1
  96. package/docs/operations/simpleTextObject.md +1 -1
  97. package/docs/operations/slider.md +1 -1
  98. package/docs/operations/table.md +18 -1
  99. package/docs/operations/tree.md +51 -37
  100. package/docs/operations/treemap.md +63 -49
  101. package/docs/operations/waterfall.md +1 -1
  102. package/docs/operations/word-cloud.md +13 -13
  103. package/getters.js +7 -7
  104. package/index.js +3 -1183
  105. package/metadata.js +18 -18
  106. package/operations.js +13 -13
  107. package/package.json +106 -55
  108. package/render.js +10 -0
  109. package/src/charts/bar.d.ts +1 -0
  110. package/src/charts/combo.d.ts +1 -0
  111. package/src/charts/dot.d.ts +1 -0
  112. package/src/charts/gauge-distribution.d.ts +1 -0
  113. package/src/charts/gauge.d.ts +1 -0
  114. package/src/charts/heat-map.d.ts +1 -0
  115. package/src/charts/histogram.d.ts +1 -0
  116. package/src/charts/line.d.ts +1 -0
  117. package/src/charts/pie.d.ts +1 -0
  118. package/src/charts/radar.d.ts +1 -0
  119. package/src/charts/sankey.d.ts +1 -0
  120. package/src/charts/scatter.d.ts +1 -0
  121. package/src/charts/table.d.ts +1 -0
  122. package/src/charts/tree.d.ts +1 -0
  123. package/src/charts/treemap.d.ts +1 -0
  124. package/src/charts/waterfall.d.ts +1 -0
  125. package/src/charts/word-cloud.d.ts +1 -0
  126. package/src/definitions/index.d.ts +1 -1
  127. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +53 -30
  128. package/src/definitions/model/definitions/index.d.ts +1 -1
  129. package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
  130. package/src/definitions/model/definitions/schemas/object.schema.d.ts +2 -2
  131. package/src/definitions/model/definitions/types/compilation.types.d.ts +10 -0
  132. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  133. package/src/getters/index.d.ts +3 -3
  134. package/src/index.d.ts +1 -1
  135. package/src/objects/app-filter-bar.d.ts +1 -0
  136. package/src/objects/date-picker.d.ts +1 -0
  137. package/src/objects/filter.d.ts +1 -0
  138. package/src/objects/iframe.d.ts +1 -0
  139. package/src/objects/image.d.ts +1 -0
  140. package/src/objects/number.d.ts +1 -0
  141. package/src/objects/shape.d.ts +1 -0
  142. package/src/objects/slider.d.ts +1 -0
  143. package/src/objects/text.d.ts +1 -0
  144. package/src/operations/index.d.ts +3 -3
  145. package/src/registry/create-visualization-registry.d.ts +5 -0
  146. package/src/render/index.d.ts +34 -0
  147. package/src/runtime/index.d.ts +2 -2
  148. package/src/types.d.ts +9 -4
  149. package/src/web-components/index.d.ts +3 -3
  150. package/chunks/ClickAwayListener-BbeNMAvj.js +0 -52
  151. package/chunks/builder-B6dWSIdD.js +0 -12289
  152. package/chunks/coloring-B1XAfg6b.js +0 -664
  153. package/chunks/events-WZut5Ow6.js +0 -4
  154. package/chunks/grouping-type-On4s9Thj.js +0 -3
  155. package/chunks/requirements-DYjZCFyf.js +0 -6
  156. package/chunks/standalone-0ashe9w1.js +0 -411
  157. package/chunks/standalone-B7jax8wa.js +0 -339
  158. package/chunks/standalone-BK0VYU-l.js +0 -463
  159. package/chunks/standalone-BZV5vOwA.js +0 -6
  160. package/chunks/standalone-BhDrWj4p.js +0 -1980
  161. package/chunks/standalone-BvaKdky9.js +0 -344
  162. package/chunks/standalone-BwtM31-f.js +0 -2
  163. package/chunks/standalone-CC1VUjO32.js +0 -299
  164. package/chunks/standalone-CoLrAxRV.js +0 -13198
  165. package/chunks/standalone-DCtRoTWg.js +0 -675
  166. package/chunks/standalone-DUDFTBqL.js +0 -833
  167. package/chunks/standalone-DhZkX9Td.js +0 -2
  168. package/chunks/standalone-DtLElfuM.js +0 -512
  169. package/chunks/standalone-G9Q4Uczu.js +0 -726
  170. package/chunks/standalone-_DeX21JJ.js +0 -383
  171. package/chunks/standalone-gFhKZh8m.js +0 -179
  172. package/chunks/standalone-tDNy-SFH.js +0 -281
  173. package/chunks/ui-DQWtv2iM.js +0 -63551
  174. package/chunks/useFieldName-BvdcoJRl.js +0 -7
@@ -1,8 +1,8 @@
1
- import { a as e, ec as t, ns as n, qs as r } from "./isEqual-BDxAhUo8.js";
2
- import { C as i, D as a, N as o, T as s, d as c, g as l, h as u, i as d, k as f, o as p, p as m, s as h, t as g, u as _, v, w as y, x as b, y as x } from "./shared-CBvcC5YV.js";
3
- import { Hd as S, bd as C } from "./handlers-VTBfIZYZ.js";
4
- import { p as w } from "./operations-CTNUX6Sy.js";
5
- e();
1
+ import { Ms as e, Ts as t, bo as n, r } from "./visualization-filters-Cc4KU-l-.js";
2
+ import { A as i, C as a, E as o, O as s, P as c, T as l, d as u, g as d, h as f, i as p, o as m, p as h, s as g, t as _, u as v, v as y, x as b, y as x } from "./shared-Bn4N5QcZ.js";
3
+ import { Ld as S, gd as C } from "./handlers-TOT-7INo.js";
4
+ import { p as w } from "./operations-Dh4v1Ovt.js";
5
+ r();
6
6
  var T = {
7
7
  all: n.ShowAll,
8
8
  auto: n.Auto,
@@ -117,17 +117,17 @@ var T = {
117
117
  }
118
118
  ], L = (e) => {
119
119
  if (!(!("structure" in e) || e.structure === void 0)) switch (e.structure) {
120
- case "normal": return r.Normal;
121
- case "expandable": return r.Hierarchical;
122
- case "pivot": return r.Pivot;
120
+ case "normal": return t.Normal;
121
+ case "expandable": return t.Hierarchical;
122
+ case "pivot": return t.Pivot;
123
123
  }
124
- }, R = (e, t) => u(e, t.flatMap((t) => t.role !== "dimension" || t.showNullValues === void 0 ? [] : [{
124
+ }, R = (e, t) => f(e, t.flatMap((t) => t.role !== "dimension" || t.showNullValues === void 0 ? [] : [{
125
125
  name: w.SET_COLUMN_SHOW_NULL_VALUES,
126
126
  payload: {
127
127
  ...x(e.resolvedRefs[t.ref]),
128
128
  showNullValues: t.showNullValues
129
129
  }
130
- }]), ["data"]), z = (e, n, r) => {
130
+ }]), ["data"]), z = (t, n, r) => {
131
131
  let i = [
132
132
  "formatType",
133
133
  "formatString",
@@ -135,11 +135,11 @@ var T = {
135
135
  "currencyIsPrefix",
136
136
  "negativeType"
137
137
  ];
138
- return u(e, n.flatMap((n) => {
139
- let a = e.availableFields.find((e) => e.key === n.fieldKey), o = a ? t(a) : n.fieldKey;
138
+ return f(t, n.flatMap((n) => {
139
+ let a = t.availableFields.find((e) => e.key === n.fieldKey), o = a ? e(a) : n.fieldKey;
140
140
  return i.flatMap((e) => {
141
141
  let t = n.format?.[e], i = r[e];
142
- return t !== void 0 && i ? [m(i, o, n.ref, n.path, e, t, n.role)] : [];
142
+ return t !== void 0 && i ? [h(i, o, n.ref, n.path, e, t, n.role)] : [];
143
143
  });
144
144
  }), ["data"]);
145
145
  }, B = async (e) => {
@@ -152,31 +152,31 @@ var T = {
152
152
  }],
153
153
  success: !1
154
154
  };
155
- let n = o.safeParse(e.definition);
155
+ let n = c.safeParse(e.definition);
156
156
  if (!n.success) return {
157
- issues: y(n.error, e.definition),
157
+ issues: l(n.error, e.definition),
158
158
  success: !1
159
159
  };
160
160
  let r = S.safeParse(e.baseVSpec);
161
161
  if (!r.success) return {
162
- issues: [c("invalid_structure", ["baseVSpec"], "Base table vSpec is invalid.", { details: { issues: r.error.issues } })],
162
+ issues: [u("invalid_structure", ["baseVSpec"], "Base table vSpec is invalid.", { details: { issues: r.error.issues } })],
163
163
  success: !1
164
164
  };
165
- let m = r.data;
166
- if (!v(m, [
165
+ let h = r.data;
166
+ if (!y(h, [
167
167
  "columns",
168
168
  "dimensions",
169
169
  "measures",
170
170
  "supportingMeasures",
171
171
  "sortingMeasures"
172
172
  ])) return {
173
- issues: [c("non_fresh_base_vspec", ["baseVSpec"], "Table definitions require a fresh base vSpec.")],
173
+ issues: [u("non_fresh_base_vspec", ["baseVSpec"], "Table definitions require a fresh base vSpec.")],
174
174
  success: !1
175
175
  };
176
176
  let x = n.data, T = I(x.data), E = T.flatMap((e) => e.items), D = [
177
- ...E.flatMap((t) => a(t, e.availableFields, t.path, t.role)),
178
- ...i(T),
179
- ...f(x.filterGroup, e.availableFields),
177
+ ...E.flatMap((t) => s(t, e.availableFields, t.path, t.role)),
178
+ ...a(T),
179
+ ...i(x.filterGroup, e.availableFields),
180
180
  ...b(x.sorting, E.map((e) => e.ref))
181
181
  ];
182
182
  if (D.length) return {
@@ -184,10 +184,10 @@ var T = {
184
184
  success: !1
185
185
  };
186
186
  let O = {
187
- state: _(e, m),
187
+ state: v(e, h),
188
188
  success: !0
189
189
  }, k = L(x.data);
190
- k !== void 0 && (O = await u(O.state, [{
190
+ k !== void 0 && (O = await f(O.state, [{
191
191
  name: w.SET_TABLE_DATA_STRUCTURE,
192
192
  payload: k
193
193
  }], ["data", "structure"]));
@@ -196,27 +196,27 @@ var T = {
196
196
  issues: [O.issue],
197
197
  success: !1
198
198
  };
199
- O = await g(O.state, t, t.role, w.ADD_COLUMN, t.role === "measure" ? s(t, e.availableFields, { columnType: t.role }) : {
199
+ O = await _(O.state, t, t.role, w.ADD_COLUMN, t.role === "measure" ? o(t, e.availableFields, { columnType: t.role }) : {
200
200
  columnType: t.role,
201
201
  key: t.fieldKey,
202
202
  topDimension: t.topDimension
203
203
  }, t.path);
204
204
  }
205
- return "issue" in O || (O = await R(O.state, E), "issue" in O) || (O = await h(O.state, E.filter((e) => e.role === "dimension"), w.SET_COLUMN_TEMPORAL_GROUPING, ["data"]), "issue" in O) || (O = await z(O.state, E, {
205
+ return "issue" in O || (O = await R(O.state, E), "issue" in O) || (O = await g(O.state, E.filter((e) => e.role === "dimension"), w.SET_COLUMN_TEMPORAL_GROUPING, ["data"]), "issue" in O) || (O = await z(O.state, E, {
206
206
  currency: w.SET_COLUMN_CURRENCY,
207
207
  currencyIsPrefix: w.SET_COLUMN_CURRENCY_IS_PREFIX,
208
208
  formatString: w.SET_COLUMN_FORMAT_STRING,
209
209
  formatType: w.SET_COLUMN_FORMAT_TYPE,
210
210
  negativeType: w.SET_COLUMN_NEGATIVE_TYPE
211
- }), "issue" in O) || (O = await u(O.state, N(x.presentation), ["presentation"]), "issue" in O) || (O = await d(O.state, x.filterGroup), "issue" in O) || (O = await p(O.state, x.sorting, w.CHANGE_SORT_ORDER_AND_DIRECTION, w.TOGGLE_SORTING_ITEM), "issue" in O) || (O = await u(O.state, x.limiting?.queryLimit === void 0 ? [] : [{
211
+ }), "issue" in O) || (O = await f(O.state, N(x.presentation), ["presentation"]), "issue" in O) || (O = await p(O.state, x.filterGroup), "issue" in O) || (O = await m(O.state, x.sorting, w.CHANGE_SORT_ORDER_AND_DIRECTION, w.TOGGLE_SORTING_ITEM), "issue" in O) || (O = await f(O.state, x.limiting?.queryLimit === void 0 ? [] : [{
212
212
  name: w.SET_QUERY_LIMIT,
213
213
  payload: x.limiting.queryLimit
214
214
  }], ["limiting"]), "issue" in O) ? {
215
215
  issues: [O.issue],
216
216
  success: !1
217
- } : (O = await u(O.state, P(x.totals), ["totals"]), "issue" in O ? {
217
+ } : (O = await f(O.state, P(x.totals), ["totals"]), "issue" in O ? {
218
218
  issues: [O.issue],
219
219
  success: !1
220
- } : l(O.state, S));
220
+ } : d(O.state, S));
221
221
  };
222
222
  export { B as compileTableVisualizationDefinition };
@@ -0,0 +1,7 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Ei as t, F as n } from "./utils-vdmi_2PK.js";
3
+ var r = /* @__PURE__ */ e(t()), i = (e) => {
4
+ let t = n(), i = (0, r.useMemo)(() => t.reduce((e, t) => (e[t.key] = t.name, e), {}), e ?? [t]);
5
+ return (e) => i[e];
6
+ };
7
+ export { i as t };
@@ -0,0 +1,166 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Bt as t, Ei as n, Vt as r, ln as i, rt as a, un as o } from "./utils-vdmi_2PK.js";
3
+ import { d as s } from "./DefaultPropsProvider-BsfB7QTn.js";
4
+ function c(e) {
5
+ return e && e.ownerDocument || document;
6
+ }
7
+ function l(e, t) {
8
+ typeof e == "function" ? e(t) : e && (e.current = t);
9
+ }
10
+ var u = /* @__PURE__ */ e(n());
11
+ function d({ controlled: e, default: t, name: n, state: r = "value" }) {
12
+ let { current: i } = u.useRef(e !== void 0), [a, o] = u.useState(t);
13
+ return [i ? e : a, u.useCallback((e) => {
14
+ i || o(e);
15
+ }, [])];
16
+ }
17
+ function f(e) {
18
+ let t = u.useRef(e);
19
+ return a(() => {
20
+ t.current = e;
21
+ }), u.useRef((...e) => (0, t.current)(...e)).current;
22
+ }
23
+ function p(...e) {
24
+ return u.useMemo(() => e.every((e) => e == null) ? null : (t) => {
25
+ e.forEach((e) => {
26
+ l(e, t);
27
+ });
28
+ }, e);
29
+ }
30
+ var m = {};
31
+ function h(e, t) {
32
+ let n = u.useRef(m);
33
+ return n.current === m && (n.current = e(t)), n;
34
+ }
35
+ var g = [];
36
+ function _(e) {
37
+ u.useEffect(e, g);
38
+ }
39
+ var v = class e {
40
+ constructor() {
41
+ this.currentId = null, this.clear = () => {
42
+ this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
43
+ }, this.disposeEffect = () => this.clear;
44
+ }
45
+ static create() {
46
+ return new e();
47
+ }
48
+ start(e, t) {
49
+ this.clear(), this.currentId = setTimeout(() => {
50
+ this.currentId = null, t();
51
+ }, e);
52
+ }
53
+ };
54
+ function y() {
55
+ let e = h(v.create).current;
56
+ return _(e.disposeEffect), e;
57
+ }
58
+ var b = !0, x = !1, S = new v(), C = {
59
+ text: !0,
60
+ search: !0,
61
+ url: !0,
62
+ tel: !0,
63
+ email: !0,
64
+ password: !0,
65
+ number: !0,
66
+ date: !0,
67
+ month: !0,
68
+ week: !0,
69
+ time: !0,
70
+ datetime: !0,
71
+ "datetime-local": !0
72
+ };
73
+ function w(e) {
74
+ let { type: t, tagName: n } = e;
75
+ return !!(n === "INPUT" && C[t] && !e.readOnly || n === "TEXTAREA" && !e.readOnly || e.isContentEditable);
76
+ }
77
+ function T(e) {
78
+ e.metaKey || e.altKey || e.ctrlKey || (b = !0);
79
+ }
80
+ function E() {
81
+ b = !1;
82
+ }
83
+ function D() {
84
+ this.visibilityState === "hidden" && x && (b = !0);
85
+ }
86
+ function O(e) {
87
+ e.addEventListener("keydown", T, !0), e.addEventListener("mousedown", E, !0), e.addEventListener("pointerdown", E, !0), e.addEventListener("touchstart", E, !0), e.addEventListener("visibilitychange", D, !0);
88
+ }
89
+ function k(e) {
90
+ let { target: t } = e;
91
+ try {
92
+ return t.matches(":focus-visible");
93
+ } catch {}
94
+ return b || w(t);
95
+ }
96
+ function A() {
97
+ let e = u.useCallback((e) => {
98
+ e != null && O(e.ownerDocument);
99
+ }, []), t = u.useRef(!1);
100
+ function n() {
101
+ return t.current ? (x = !0, S.start(100, () => {
102
+ x = !1;
103
+ }), t.current = !1, !0) : !1;
104
+ }
105
+ function r(e) {
106
+ return k(e) ? (t.current = !0, !0) : !1;
107
+ }
108
+ return {
109
+ isFocusVisibleRef: t,
110
+ onFocus: r,
111
+ onBlur: n,
112
+ ref: e
113
+ };
114
+ }
115
+ function j(e) {
116
+ return typeof e == "string";
117
+ }
118
+ o();
119
+ function M(e, t, n) {
120
+ return e === void 0 || j(e) ? t : i({}, t, { ownerState: i({}, t.ownerState, n) });
121
+ }
122
+ function N(e, t = []) {
123
+ if (e === void 0) return {};
124
+ let n = {};
125
+ return Object.keys(e).filter((n) => n.match(/^on[A-Z]/) && typeof e[n] == "function" && !t.includes(n)).forEach((t) => {
126
+ n[t] = e[t];
127
+ }), n;
128
+ }
129
+ function P(e) {
130
+ if (e === void 0) return {};
131
+ let t = {};
132
+ return Object.keys(e).filter((t) => !(t.match(/^on[A-Z]/) && typeof e[t] == "function")).forEach((n) => {
133
+ t[n] = e[n];
134
+ }), t;
135
+ }
136
+ o();
137
+ function F(e) {
138
+ let { getSlotProps: t, additionalProps: n, externalSlotProps: r, externalForwardedProps: a, className: o } = e;
139
+ if (!t) {
140
+ let e = s(n?.className, o, a?.className, r?.className), t = i({}, n?.style, a?.style, r?.style), c = i({}, n, a, r);
141
+ return e.length > 0 && (c.className = e), Object.keys(t).length > 0 && (c.style = t), {
142
+ props: c,
143
+ internalRef: void 0
144
+ };
145
+ }
146
+ let c = N(i({}, a, r)), l = P(r), u = P(a), d = t(c), f = s(d?.className, n?.className, o, a?.className, r?.className), p = i({}, d?.style, n?.style, a?.style, r?.style), m = i({}, d, n, u, l);
147
+ return f.length > 0 && (m.className = f), Object.keys(p).length > 0 && (m.style = p), {
148
+ props: m,
149
+ internalRef: d.ref
150
+ };
151
+ }
152
+ function I(e, t, n) {
153
+ return typeof e == "function" ? e(t, n) : e;
154
+ }
155
+ o(), r();
156
+ var L = [
157
+ "elementType",
158
+ "externalSlotProps",
159
+ "ownerState",
160
+ "skipResolvingSlotProps"
161
+ ];
162
+ function R(e) {
163
+ let { elementType: n, externalSlotProps: r, ownerState: a, skipResolvingSlotProps: o = !1 } = e, s = t(e, L), c = o ? {} : I(r, a), { props: l, internalRef: u } = F(i({}, s, { externalSlotProps: c }));
164
+ return M(n, i({}, l, { ref: p(u, c?.ref, e.additionalProps?.ref) }), a);
165
+ }
166
+ export { A as a, p as c, l as d, c as f, j as i, f as l, N as n, v as o, M as r, y as s, R as t, d as u };