@m4l/components 0.1.12 → 0.1.13

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 (143) hide show
  1. package/assets/Logo/index.228dcb5a.js +86 -0
  2. package/commonjs.565e6834.js +12 -0
  3. package/components/CommonActions/components/ActionCancel/index.cba1b460.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +49 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +31 -0
  6. package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +18 -0
  7. package/components/CommonActions/components/Actions/index.e8148d98.js +743 -0
  8. package/components/CompanyLogo/{index.js → index.f81c179c.js} +42 -48
  9. package/components/DataGrid/index.b688877d.js +894 -0
  10. package/components/DynamicFilter/index.82ce857e.js +1158 -0
  11. package/components/ErrorLabel/index.c8615f16.js +19 -0
  12. package/components/Icon/index.cbca79b0.js +70 -0
  13. package/components/Image/index.e790b50b.js +122 -0
  14. package/components/LanguagePopover/index.3d9611cb.js +87 -0
  15. package/components/Loadable/index.f5518558.js +15 -0
  16. package/components/ModalDialog/index.3850c053.js +168 -0
  17. package/components/NoItemSelected/{index.js → index.12f0ca67.js} +43 -50
  18. package/components/ObjectLogs/index.27ef875d.js +266 -0
  19. package/components/Page/index.6d69977e.js +35 -0
  20. package/components/Page/index.d.ts +1 -1
  21. package/components/PaperForm/index.d7c74064.js +105 -0
  22. package/components/Period/index.5e68286a.js +160 -0
  23. package/components/PropertyValue/index.ab3dd7e9.js +116 -0
  24. package/components/Resizeable/{index.js → index.45995d2b.js} +21 -19
  25. package/components/ScrollBar/index.39eeb2de.js +49 -0
  26. package/components/ScrollToTop/index.e06f98f6.js +11 -0
  27. package/components/SplitLayout/{index.js → index.4032673d.js} +35 -35
  28. package/components/animate/IconButtonAnimate/index.d.ts +1 -1
  29. package/components/animate/LoadingScreen/{index.js → index.f1cec7db.js} +29 -27
  30. package/components/animate/MotionContainer/index.8d9f9d80.js +30 -0
  31. package/components/animate/MotionLazyContainer/index.572dd012.js +15 -0
  32. package/components/animate/features.0fbf41e1.js +5 -0
  33. package/components/animate/variants/{bounce.js → bounce.784aaaaa.js} +15 -16
  34. package/components/animate/variants/container.11f82b76.js +20 -0
  35. package/components/animate/variants/fade.b561c0fc.js +59 -0
  36. package/components/animate/variants/{index.js → index.7a912140.js} +0 -0
  37. package/components/animate/variants/transition.bd46b9ce.js +15 -0
  38. package/components/formatters/BooleanFormatter/index.cca53b7f.js +42 -0
  39. package/components/formatters/DateFormatter/index.ad8d9b8e.js +57 -0
  40. package/components/formatters/index.55856d65.js +106 -0
  41. package/components/hook-form/FormProvider/index.257acd9f.js +55 -0
  42. package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +122 -0
  43. package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +153 -0
  44. package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +59 -0
  45. package/components/hook-form/RHFDateTime/index.fc5cbafe.js +68 -0
  46. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +34 -0
  47. package/components/hook-form/RHFPeriod/index.23c254e9.js +45 -0
  48. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +43 -0
  49. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +36 -0
  50. package/components/hook-form/RHFTextField/index.4c455f75.js +77 -0
  51. package/components/hook-form/RHFTextField/index.d.ts +1 -1
  52. package/components/hook-form/RHFUpload/index.ed3d739f.js +244 -0
  53. package/components/mui_extended/Accordion/index.2116e423.js +103 -0
  54. package/components/mui_extended/Avatar/index.0a2a4523.js +32 -0
  55. package/components/mui_extended/Avatar/index.d.ts +1 -1
  56. package/components/mui_extended/BoxIcon/index.e638ecc8.js +22 -0
  57. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +89 -0
  58. package/components/mui_extended/Button/index.84d8898c.js +110 -0
  59. package/components/mui_extended/IconButton/index.88f3aadb.js +98 -0
  60. package/components/mui_extended/LinkWithRoute/index.d4b263de.js +28 -0
  61. package/components/mui_extended/MenuPopover/index.488fc536.js +131 -0
  62. package/components/mui_extended/Pager/index.0576814f.js +126 -0
  63. package/components/mui_extended/Tab/index.e0653a0a.js +28 -0
  64. package/components/mui_extended/Typography/index.0c4604b3.js +22 -0
  65. package/contexts/ModalContext/index.2188b69e.js +150 -0
  66. package/hooks/useFormAddEdit/index.d4845f1a.js +26 -0
  67. package/hooks/useModal/index.6571d2d9.js +6 -0
  68. package/index.js +162 -70
  69. package/lodash.e09401f0.js +32 -0
  70. package/node_modules.168cb897.js +55 -0
  71. package/package.json +1 -1
  72. package/react-data-grid.d46d625e.js +2115 -0
  73. package/react-draggable.20e95c61.js +714 -0
  74. package/react-json-view.f56a7f8e.js +2762 -0
  75. package/react-lazy-load-image-component.45b56650.js +784 -0
  76. package/react-resizable.5277deaf.js +371 -0
  77. package/react-splitter-layout.7810ac1b.js +165 -0
  78. package/utils/index.214d9542.js +435 -0
  79. package/assets/Logo/index.js +0 -91
  80. package/commonjs.js +0 -9
  81. package/components/CommonActions/components/ActionCancel/index.js +0 -15
  82. package/components/CommonActions/components/ActionFormCancel/index.js +0 -62
  83. package/components/CommonActions/components/ActionFormIntro/index.js +0 -35
  84. package/components/CommonActions/components/ActionIntro/index.js +0 -16
  85. package/components/CommonActions/components/Actions/index.js +0 -859
  86. package/components/DataGrid/index.js +0 -1067
  87. package/components/DynamicFilter/index.js +0 -1573
  88. package/components/ErrorLabel/index.js +0 -18
  89. package/components/Icon/index.js +0 -80
  90. package/components/Image/index.js +0 -128
  91. package/components/LanguagePopover/index.js +0 -93
  92. package/components/Loadable/index.js +0 -13
  93. package/components/ModalDialog/index.js +0 -180
  94. package/components/ObjectLogs/index.js +0 -284
  95. package/components/Page/index.js +0 -36
  96. package/components/PaperForm/index.js +0 -110
  97. package/components/Period/index.js +0 -230
  98. package/components/PropertyValue/index.js +0 -142
  99. package/components/ScrollBar/index.js +0 -52
  100. package/components/ScrollToTop/index.js +0 -10
  101. package/components/animate/MotionContainer/index.js +0 -31
  102. package/components/animate/MotionLazyContainer/index.js +0 -13
  103. package/components/animate/features.js +0 -2
  104. package/components/animate/variants/container.js +0 -20
  105. package/components/animate/variants/fade.js +0 -61
  106. package/components/animate/variants/transition.js +0 -16
  107. package/components/formatters/BooleanFormatter/index.js +0 -52
  108. package/components/formatters/DateFormatter/index.js +0 -66
  109. package/components/formatters/index.js +0 -112
  110. package/components/hook-form/FormProvider/index.js +0 -61
  111. package/components/hook-form/RHFAutocomplete/index.js +0 -144
  112. package/components/hook-form/RHFAutocompleteAsync/index.js +0 -191
  113. package/components/hook-form/RHFCheckbox/index.js +0 -65
  114. package/components/hook-form/RHFDateTime/index.js +0 -79
  115. package/components/hook-form/RHFMultiCheckbox/index.js +0 -32
  116. package/components/hook-form/RHFPeriod/index.js +0 -47
  117. package/components/hook-form/RHFRadioGroup/index.js +0 -41
  118. package/components/hook-form/RHFSelect/index.js +0 -34
  119. package/components/hook-form/RHFTextField/index.js +0 -87
  120. package/components/hook-form/RHFUpload/index.js +0 -255
  121. package/components/mui_extended/Accordion/index.js +0 -105
  122. package/components/mui_extended/Avatar/index.js +0 -33
  123. package/components/mui_extended/BoxIcon/index.js +0 -20
  124. package/components/mui_extended/Breadcrumbs/index.js +0 -92
  125. package/components/mui_extended/Button/index.js +0 -131
  126. package/components/mui_extended/IconButton/index.js +0 -108
  127. package/components/mui_extended/LinkWithRoute/index.js +0 -30
  128. package/components/mui_extended/MenuPopover/index.js +0 -135
  129. package/components/mui_extended/Pager/index.js +0 -137
  130. package/components/mui_extended/Tab/index.js +0 -30
  131. package/components/mui_extended/Typography/index.js +0 -21
  132. package/contexts/ModalContext/index.js +0 -165
  133. package/hooks/useFormAddEdit/index.js +0 -42
  134. package/hooks/useModal/index.js +0 -4
  135. package/lodash.js +0 -62
  136. package/node_modules.js +0 -54
  137. package/react-data-grid.js +0 -2652
  138. package/react-draggable.js +0 -960
  139. package/react-json-view.js +0 -2764
  140. package/react-lazy-load-image-component.js +0 -792
  141. package/react-resizable.js +0 -541
  142. package/react-splitter-layout.js +0 -165
  143. package/utils/index.js +0 -572
@@ -0,0 +1,2115 @@
1
+ import { forwardRef as pt, useRef as ce, createContext as xt, useContext as ut, useState as Y, useMemo as Q, useImperativeHandle as Ho, useCallback as je, useEffect as wt, useLayoutEffect as Ko, memo as ae } from "react";
2
+ import se from "clsx";
3
+ import { jsx as I, jsxs as ne, Fragment as ze } from "react/jsx-runtime";
4
+ function G(e, t) {
5
+ t === void 0 && (t = {});
6
+ var n = t.insertAt;
7
+ if (!(!e || typeof document > "u")) {
8
+ var i = document.head || document.getElementsByTagName("head")[0], l = document.createElement("style");
9
+ l.type = "text/css", n === "top" && i.firstChild ? i.insertBefore(l, i.firstChild) : i.appendChild(l), l.styleSheet ? l.styleSheet.cssText = e : l.appendChild(document.createTextNode(e));
10
+ }
11
+ }
12
+ var _o = ".c1wupbe700-beta13{background-color:inherit;border-block-end:1px solid var(--rdg-border-color);border-inline-end:1px solid var(--rdg-border-color);contain:size style;grid-row-start:var(--rdg-grid-row-start);outline:none;overflow:hidden;overflow:clip;padding-block:0;padding-inline:8px;position:relative;text-overflow:ellipsis;white-space:nowrap}.c1wupbe700-beta13[aria-selected=true]{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}.cd0kgiy700-beta13 .c1wupbe700-beta13{contain:content}.c1730fa4700-beta13{position:sticky;z-index:1}.c9dpaye700-beta13{box-shadow:calc(2px*var(--rdg-sign)) 0 5px -2px hsla(0,0%,53%,.3)}";
13
+ G(_o, { insertAt: "top" });
14
+ const jo = "c1wupbe700-beta13", Bo = `rdg-cell ${jo}`, Go = "cd0kgiy700-beta13", Vo = "c1730fa4700-beta13", qo = `rdg-cell-frozen ${Vo}`, Uo = "c9dpaye700-beta13", Xo = `rdg-cell-frozen-last ${Uo}`;
15
+ var Yo = '.r104f42s700-beta13{--rdg-color:#000;--rdg-border-color:#ddd;--rdg-summary-border-color:#aaa;--rdg-background-color:#fff;--rdg-header-background-color:#f9f9f9;--rdg-row-hover-background-color:#f5f5f5;--rdg-row-selected-background-color:#dbecfa;--row-selected-hover-background-color:#c9e3f8;--rdg-checkbox-color:#005194;--rdg-checkbox-focus-color:#61b8ff;--rdg-checkbox-disabled-border-color:#ccc;--rdg-checkbox-disabled-background-color:#ddd;--rdg-selection-color:#66afe9;--rdg-font-size:14px;content-visibility:auto;background-color:var(--rdg-background-color);block-size:350px;border:1px solid var(--rdg-border-color);box-sizing:border-box;color:var(--rdg-color);color-scheme:var(--rdg-color-scheme,light dark);contain:strict;contain:size layout style paint;display:grid;font-size:var(--rdg-font-size);overflow:auto;user-select:none}@supports not (contain:strict){.r104f42s700-beta13{position:relative;z-index:0}}.r104f42s700-beta13 *,.r104f42s700-beta13 :after,.r104f42s700-beta13 :before{box-sizing:inherit}.r104f42s700-beta13:before{content:"";grid-column:1/-1;grid-row:1/-1}.r104f42s700-beta13.rdg-dark{--rdg-color-scheme:dark;--rdg-color:#ddd;--rdg-border-color:#444;--rdg-summary-border-color:#555;--rdg-background-color:#212121;--rdg-header-background-color:#1b1b1b;--rdg-row-hover-background-color:#171717;--rdg-row-selected-background-color:#1a73bc;--row-selected-hover-background-color:#1768ab;--rdg-checkbox-color:#94cfff;--rdg-checkbox-focus-color:#c7e6ff;--rdg-checkbox-disabled-border-color:#000;--rdg-checkbox-disabled-background-color:#333}.r104f42s700-beta13.rdg-light{--rdg-color-scheme:light}@media (prefers-color-scheme:dark){.r104f42s700-beta13:not(.rdg-light){--rdg-color:#ddd;--rdg-border-color:#444;--rdg-summary-border-color:#555;--rdg-background-color:#212121;--rdg-header-background-color:#1b1b1b;--rdg-row-hover-background-color:#171717;--rdg-row-selected-background-color:#1a73bc;--row-selected-hover-background-color:#1768ab;--rdg-checkbox-color:#94cfff;--rdg-checkbox-focus-color:#c7e6ff;--rdg-checkbox-disabled-border-color:#000;--rdg-checkbox-disabled-background-color:#333}}.v7ly7s700-beta13.r1otpg64700-beta13{cursor:move}.fc4f4zb700-beta13{grid-column:1/-1;pointer-events:none;z-index:4}';
16
+ G(Yo, { insertAt: "top" });
17
+ const Jo = "r104f42s700-beta13", Qo = `rdg ${Jo}`, Zo = "v7ly7s700-beta13", en = `rdg-viewport-dragging ${Zo}`, tn = "fc4f4zb700-beta13";
18
+ var on = '.r1otpg64700-beta13{background-color:var(--rdg-background-color);display:contents;line-height:var(--rdg-row-height)}.r1otpg64700-beta13:hover{background-color:var(--rdg-row-hover-background-color)}.r1otpg64700-beta13[aria-selected=true]{background-color:var(--rdg-row-selected-background-color)}.r1otpg64700-beta13[aria-selected=true]:hover{background-color:var(--row-selected-hover-background-color)}.rel5gk2700-beta13{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}.r1qymf1z700-beta13:before{border-inline-start:2px solid var(--rdg-selection-color);content:"";display:inline-block;height:100%;inset-inline-start:0;position:sticky}';
19
+ G(on, { insertAt: "top" });
20
+ const nn = "r1otpg64700-beta13", mt = `rdg-row ${nn}`, rn = "rel5gk2700-beta13", Ve = "rdg-row-selected", cn = "r1qymf1z700-beta13";
21
+ var sn = '.cd9l4jz700-beta13{align-items:center;cursor:pointer;display:flex;inset:0;justify-content:center;margin-inline-end:1px;position:absolute}.c1noyk41700-beta13{all:unset}.cdwjxv8700-beta13{background-color:var(--rdg-background-color);block-size:20px;border:2px solid var(--rdg-border-color);content:"";inline-size:20px}.c1noyk41700-beta13:checked+.cdwjxv8700-beta13{background-color:var(--rdg-checkbox-color);outline:4px solid var(--rdg-background-color);outline-offset:-6px}.c1noyk41700-beta13:focus+.cdwjxv8700-beta13{border-color:var(--rdg-checkbox-focus-color)}.cca4mwn700-beta13{cursor:default}.cca4mwn700-beta13 .cdwjxv8700-beta13{background-color:var(--rdg-checkbox-disabled-background-color);border-color:var(--rdg-checkbox-disabled-border-color)}';
22
+ G(sn, { insertAt: "top" });
23
+ const ln = "cd9l4jz700-beta13", dn = `rdg-checkbox-label ${ln}`, an = "c1noyk41700-beta13", un = `rdg-checkbox-input ${an}`, fn = "cdwjxv8700-beta13", gn = `rdg-checkbox ${fn}`, bn = "cca4mwn700-beta13", hn = `rdg-checkbox-label-disabled ${bn}`, pn = /* @__PURE__ */ pt(function({
24
+ onChange: t,
25
+ ...n
26
+ }, i) {
27
+ function l(c) {
28
+ t(c.target.checked, c.nativeEvent.shiftKey);
29
+ }
30
+ return /* @__PURE__ */ ne("label", {
31
+ className: se(dn, n.disabled && hn),
32
+ children: [/* @__PURE__ */ I("input", {
33
+ type: "checkbox",
34
+ ref: i,
35
+ ...n,
36
+ className: un,
37
+ onChange: l
38
+ }), /* @__PURE__ */ I("div", {
39
+ className: gn
40
+ })]
41
+ });
42
+ }), Be = typeof window > "u" ? wt : Ko;
43
+ function Ct(e) {
44
+ const t = ce(null);
45
+ return Be(() => {
46
+ !e || t.current?.focus({
47
+ preventScroll: !0
48
+ });
49
+ }, [e]), {
50
+ ref: t,
51
+ tabIndex: e ? 0 : -1
52
+ };
53
+ }
54
+ const Yt = /* @__PURE__ */ xt(void 0), xn = Yt.Provider;
55
+ function kt() {
56
+ return ut(Yt);
57
+ }
58
+ function Vr({
59
+ value: e,
60
+ isCellSelected: t,
61
+ disabled: n,
62
+ onChange: i,
63
+ "aria-label": l,
64
+ "aria-labelledby": c
65
+ }) {
66
+ const {
67
+ ref: d,
68
+ tabIndex: C
69
+ } = Ct(t), f = kt().checkboxFormatter;
70
+ return /* @__PURE__ */ I(f, {
71
+ "aria-label": l,
72
+ "aria-labelledby": c,
73
+ ref: d,
74
+ tabIndex: C,
75
+ disabled: n,
76
+ checked: e,
77
+ onChange: i
78
+ });
79
+ }
80
+ function wn(e) {
81
+ try {
82
+ return /* @__PURE__ */ I(ze, {
83
+ children: e.row[e.column.key]
84
+ });
85
+ } catch {
86
+ return null;
87
+ }
88
+ }
89
+ var mn = ".gch972y700-beta13{outline:none}.cz2qf0d700-beta13{stroke:currentColor;stroke-width:1.5px;fill:transparent;margin-inline-start:4px;vertical-align:middle}.cz2qf0d700-beta13>path{transition:d .1s}";
90
+ G(mn, { insertAt: "top" });
91
+ const Cn = "gch972y700-beta13", kn = `rdg-group-cell-content ${Cn}`, yn = "cz2qf0d700-beta13", Rn = `rdg-caret ${yn}`;
92
+ function vn({
93
+ groupKey: e,
94
+ isExpanded: t,
95
+ isCellSelected: n,
96
+ toggleGroup: i
97
+ }) {
98
+ const {
99
+ ref: l,
100
+ tabIndex: c
101
+ } = Ct(n);
102
+ function d({
103
+ key: f
104
+ }) {
105
+ f === "Enter" && i();
106
+ }
107
+ return /* @__PURE__ */ ne("span", {
108
+ ref: l,
109
+ className: kn,
110
+ tabIndex: c,
111
+ onKeyDown: d,
112
+ children: [e, /* @__PURE__ */ I("svg", {
113
+ viewBox: "0 0 14 8",
114
+ width: "14",
115
+ height: "8",
116
+ className: Rn,
117
+ "aria-hidden": !0,
118
+ children: /* @__PURE__ */ I("path", {
119
+ d: t ? "M1 1 L 7 7 L 13 1" : "M1 7 L 7 1 L 13 7"
120
+ })
121
+ })]
122
+ });
123
+ }
124
+ const Jt = /* @__PURE__ */ xt(void 0), Qt = Jt.Provider, Zt = /* @__PURE__ */ xt(void 0), In = Zt.Provider;
125
+ function qr() {
126
+ const e = ut(Jt), t = ut(Zt);
127
+ if (e === void 0 || t === void 0)
128
+ throw new Error("useRowSelection must be used within DataGrid cells");
129
+ return [e, t];
130
+ }
131
+ const ft = "select-row";
132
+ function Z(e, t, n) {
133
+ const i = typeof e.colSpan == "function" ? e.colSpan(n) : 1;
134
+ if (Number.isInteger(i) && i > 1 && (!e.frozen || e.idx + i - 1 <= t))
135
+ return i;
136
+ }
137
+ function gt(e) {
138
+ e?.scrollIntoView({
139
+ inline: "nearest",
140
+ block: "nearest"
141
+ });
142
+ }
143
+ const Sn = /* @__PURE__ */ new Set(["Unidentified", "Alt", "AltGraph", "CapsLock", "Control", "Fn", "FnLock", "Meta", "NumLock", "ScrollLock", "Shift", "Tab", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp", "End", "Home", "PageDown", "PageUp", "Insert", "ContextMenu", "Escape", "Pause", "Play", "PrintScreen", "F1", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"]);
144
+ function qt(e) {
145
+ return (e.ctrlKey || e.metaKey) && e.key !== "Control";
146
+ }
147
+ function zn(e) {
148
+ return !Sn.has(e.key);
149
+ }
150
+ function En({
151
+ key: e,
152
+ target: t
153
+ }) {
154
+ return e === "Tab" && (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) ? t.matches(".rdg-editor-container > :only-child, .rdg-editor-container > label:only-child > :only-child") : !1;
155
+ }
156
+ function Dn({
157
+ selectedPosition: e,
158
+ columns: t,
159
+ rows: n,
160
+ isGroupRow: i
161
+ }) {
162
+ const l = t[e.idx], c = n[e.rowIdx];
163
+ return !i(c) && eo(l, c);
164
+ }
165
+ function eo(e, t) {
166
+ return e.editor != null && !e.rowGroup && (typeof e.editable == "function" ? e.editable(t) : e.editable) !== !1;
167
+ }
168
+ function to({
169
+ rows: e,
170
+ summaryRows: t,
171
+ rowIdx: n,
172
+ lastFrozenColumnIndex: i,
173
+ column: l,
174
+ isGroupRow: c
175
+ }) {
176
+ if (n === -1)
177
+ return Z(l, i, {
178
+ type: "HEADER"
179
+ });
180
+ if (n >= 0 && n < e.length) {
181
+ const d = e[n];
182
+ return c(d) ? void 0 : Z(l, i, {
183
+ type: "ROW",
184
+ row: d
185
+ });
186
+ }
187
+ if (t)
188
+ return Z(l, i, {
189
+ type: "SUMMARY",
190
+ row: t[n - e.length]
191
+ });
192
+ }
193
+ function Fn({
194
+ cellNavigationMode: e,
195
+ columns: t,
196
+ colSpanColumns: n,
197
+ rows: i,
198
+ summaryRows: l,
199
+ minRowIdx: c,
200
+ maxRowIdx: d,
201
+ currentPosition: {
202
+ idx: C
203
+ },
204
+ nextPosition: f,
205
+ lastFrozenColumnIndex: k,
206
+ isCellWithinBounds: b,
207
+ isGroupRow: w
208
+ }) {
209
+ let {
210
+ idx: g,
211
+ rowIdx: s
212
+ } = f;
213
+ const v = (p) => {
214
+ if (s >= 0 && s < i.length) {
215
+ const E = i[s];
216
+ if (w(E))
217
+ return;
218
+ }
219
+ for (const E of n) {
220
+ const A = E.idx;
221
+ if (A > g)
222
+ break;
223
+ const _ = to({
224
+ rows: i,
225
+ summaryRows: l,
226
+ rowIdx: s,
227
+ lastFrozenColumnIndex: k,
228
+ column: E,
229
+ isGroupRow: w
230
+ });
231
+ if (_ && g > A && g < _ + A) {
232
+ g = A + (p ? _ : 0);
233
+ break;
234
+ }
235
+ }
236
+ };
237
+ if (b(f) && v(g - C > 0), e !== "NONE") {
238
+ const p = t.length;
239
+ g === p ? e === "CHANGE_ROW" ? s === d || (g = 0, s += 1) : g = 0 : g === -1 && (e === "CHANGE_ROW" ? s === c || (s -= 1, g = p - 1) : g = p - 1, v(!1));
240
+ }
241
+ return {
242
+ idx: g,
243
+ rowIdx: s
244
+ };
245
+ }
246
+ function $n({
247
+ cellNavigationMode: e,
248
+ maxColIdx: t,
249
+ minRowIdx: n,
250
+ maxRowIdx: i,
251
+ selectedPosition: {
252
+ rowIdx: l,
253
+ idx: c
254
+ },
255
+ shiftKey: d
256
+ }) {
257
+ return e === "NONE" || e === "CHANGE_ROW" ? d ? c === 0 && l === n : c === t && l === i : !1;
258
+ }
259
+ function qe(e, t) {
260
+ return t !== void 0 ? {
261
+ "--rdg-grid-row-start": e,
262
+ "--rdg-row-height": `${t}px`
263
+ } : {
264
+ "--rdg-grid-row-start": e
265
+ };
266
+ }
267
+ function Ee(e, t) {
268
+ return {
269
+ gridColumnStart: e.idx + 1,
270
+ gridColumnEnd: t !== void 0 ? `span ${t}` : void 0,
271
+ insetInlineStart: e.frozen ? `var(--rdg-frozen-left-${e.idx})` : void 0
272
+ };
273
+ }
274
+ function De(e, ...t) {
275
+ return se(Bo, ...t, e.frozen && qo, e.isLastFrozenColumn && Xo);
276
+ }
277
+ const {
278
+ min: Se,
279
+ max: Ge,
280
+ round: Ln,
281
+ floor: bt,
282
+ sign: An,
283
+ abs: On,
284
+ ceil: Tn
285
+ } = Math;
286
+ function dt(e) {
287
+ if (typeof e != "function")
288
+ throw new Error("Please specify the rowKeyGetter prop to use selection");
289
+ }
290
+ function ht(e, {
291
+ minWidth: t,
292
+ maxWidth: n
293
+ }) {
294
+ return e = Ge(e, t), typeof n == "number" && n >= t ? Se(e, n) : e;
295
+ }
296
+ function Nn({
297
+ rawColumns: e,
298
+ columnWidths: t,
299
+ viewportWidth: n,
300
+ scrollLeft: i,
301
+ defaultColumnOptions: l,
302
+ rawGroupBy: c,
303
+ enableVirtualization: d
304
+ }) {
305
+ const C = l?.width, f = l?.minWidth ?? 80, k = l?.maxWidth, b = l?.formatter ?? wn, w = l?.sortable ?? !1, g = l?.resizable ?? !1, {
306
+ columns: s,
307
+ colSpanColumns: v,
308
+ lastFrozenColumnIndex: p,
309
+ groupBy: E
310
+ } = Q(() => {
311
+ const O = [];
312
+ let y = -1;
313
+ const z = e.map((h) => {
314
+ const x = c?.includes(h.key) ?? !1, D = x || h.frozen || !1, m = {
315
+ ...h,
316
+ idx: 0,
317
+ frozen: D,
318
+ isLastFrozenColumn: !1,
319
+ rowGroup: x,
320
+ width: h.width ?? C,
321
+ minWidth: h.minWidth ?? f,
322
+ maxWidth: h.maxWidth ?? k,
323
+ sortable: h.sortable ?? w,
324
+ resizable: h.resizable ?? g,
325
+ formatter: h.formatter ?? b
326
+ };
327
+ return x && (m.groupFormatter ?? (m.groupFormatter = vn)), D && y++, m;
328
+ });
329
+ z.sort(({
330
+ key: h,
331
+ frozen: x
332
+ }, {
333
+ key: D,
334
+ frozen: m
335
+ }) => h === ft ? -1 : D === ft ? 1 : c?.includes(h) ? c.includes(D) ? c.indexOf(h) - c.indexOf(D) : -1 : c?.includes(D) ? 1 : x ? m ? 0 : -1 : m ? 1 : 0);
336
+ const S = [];
337
+ return z.forEach((h, x) => {
338
+ h.idx = x, h.rowGroup && O.push(h.key), h.colSpan != null && S.push(h);
339
+ }), y !== -1 && (z[y].isLastFrozenColumn = !0), {
340
+ columns: z,
341
+ colSpanColumns: S,
342
+ lastFrozenColumnIndex: y,
343
+ groupBy: O
344
+ };
345
+ }, [e, C, f, k, b, g, w, c]), {
346
+ layoutCssVars: A,
347
+ totalFrozenColumnWidth: _,
348
+ columnMetrics: H
349
+ } = Q(() => {
350
+ const O = /* @__PURE__ */ new Map();
351
+ let y = 0, z = 0, S = "", h = 0, x = 0;
352
+ for (const m of s) {
353
+ let F = Pn(m, t, n);
354
+ F === void 0 ? x++ : (F = ht(F, m), h += F, O.set(m, {
355
+ width: F,
356
+ left: 0
357
+ }));
358
+ }
359
+ for (const m of s) {
360
+ let F;
361
+ if (O.has(m)) {
362
+ const V = O.get(m);
363
+ V.left = y, {
364
+ width: F
365
+ } = V;
366
+ } else {
367
+ const V = n - h, ee = Ln(V / x);
368
+ F = ht(ee, m), h += F, x--, O.set(m, {
369
+ width: F,
370
+ left: y
371
+ });
372
+ }
373
+ y += F, S += `${F}px `;
374
+ }
375
+ if (p !== -1) {
376
+ const m = O.get(s[p]);
377
+ z = m.left + m.width;
378
+ }
379
+ const D = {
380
+ gridTemplateColumns: S
381
+ };
382
+ for (let m = 0; m <= p; m++) {
383
+ const F = s[m];
384
+ D[`--rdg-frozen-left-${F.idx}`] = `${O.get(F).left}px`;
385
+ }
386
+ return {
387
+ layoutCssVars: D,
388
+ totalFrozenColumnWidth: z,
389
+ columnMetrics: O
390
+ };
391
+ }, [t, s, n, p]), [M, T] = Q(() => {
392
+ if (!d)
393
+ return [0, s.length - 1];
394
+ const O = i + _, y = i + n, z = s.length - 1, S = Se(p + 1, z);
395
+ if (O >= y)
396
+ return [S, S];
397
+ let h = S;
398
+ for (; h < z; ) {
399
+ const {
400
+ left: F,
401
+ width: V
402
+ } = H.get(s[h]);
403
+ if (F + V > O)
404
+ break;
405
+ h++;
406
+ }
407
+ let x = h;
408
+ for (; x < z; ) {
409
+ const {
410
+ left: F,
411
+ width: V
412
+ } = H.get(s[x]);
413
+ if (F + V >= y)
414
+ break;
415
+ x++;
416
+ }
417
+ const D = Ge(S, h - 1), m = Se(z, x + 1);
418
+ return [D, m];
419
+ }, [H, s, p, i, _, n, d]);
420
+ return {
421
+ columns: s,
422
+ colSpanColumns: v,
423
+ colOverscanStartIdx: M,
424
+ colOverscanEndIdx: T,
425
+ layoutCssVars: A,
426
+ columnMetrics: H,
427
+ lastFrozenColumnIndex: p,
428
+ totalFrozenColumnWidth: _,
429
+ groupBy: E
430
+ };
431
+ }
432
+ function Pn({
433
+ key: e,
434
+ width: t
435
+ }, n, i) {
436
+ if (n.has(e))
437
+ return n.get(e);
438
+ if (typeof t == "number")
439
+ return t;
440
+ if (typeof t == "string" && /^\d+%$/.test(t))
441
+ return bt(i * parseInt(t, 10) / 100);
442
+ }
443
+ function Mn() {
444
+ const e = ce(null), [t, n] = Y(1), [i, l] = Y(1);
445
+ return Be(() => {
446
+ const {
447
+ ResizeObserver: c
448
+ } = window;
449
+ if (c == null)
450
+ return;
451
+ const {
452
+ clientWidth: d,
453
+ clientHeight: C,
454
+ offsetWidth: f,
455
+ offsetHeight: k
456
+ } = e.current, {
457
+ width: b,
458
+ height: w
459
+ } = e.current.getBoundingClientRect(), g = b - f + d, s = w - k + C;
460
+ n(Ut(g)), l(s);
461
+ const v = new c((p) => {
462
+ const E = p[0].contentBoxSize[0];
463
+ n(Ut(E.inlineSize)), l(E.blockSize);
464
+ });
465
+ return v.observe(e.current), () => {
466
+ v.disconnect();
467
+ };
468
+ }, []), [e, t, i];
469
+ }
470
+ function Ut(e) {
471
+ return e - (devicePixelRatio === 1 ? 0 : Tn(devicePixelRatio));
472
+ }
473
+ function J(e) {
474
+ const t = ce(e);
475
+ return wt(() => {
476
+ t.current = e;
477
+ }), je((...n) => {
478
+ t.current(...n);
479
+ }, []);
480
+ }
481
+ function Ue(e) {
482
+ const [t, n] = Y(!1);
483
+ t && !e && n(!1);
484
+ const i = je((d) => {
485
+ d !== null && (gt(d), !d.contains(document.activeElement) && d.focus({
486
+ preventScroll: !0
487
+ }));
488
+ }, []);
489
+ function l(d) {
490
+ d.target !== d.currentTarget && n(!0);
491
+ }
492
+ return {
493
+ ref: e ? i : void 0,
494
+ tabIndex: e && !t ? 0 : -1,
495
+ onFocus: e ? l : void 0
496
+ };
497
+ }
498
+ function Wn({
499
+ columns: e,
500
+ colSpanColumns: t,
501
+ rows: n,
502
+ summaryRows: i,
503
+ colOverscanStartIdx: l,
504
+ colOverscanEndIdx: c,
505
+ lastFrozenColumnIndex: d,
506
+ rowOverscanStartIdx: C,
507
+ rowOverscanEndIdx: f,
508
+ isGroupRow: k
509
+ }) {
510
+ const b = Q(() => {
511
+ if (l === 0)
512
+ return 0;
513
+ let w = l;
514
+ const g = (s, v) => v !== void 0 && s + v > l ? (w = s, !0) : !1;
515
+ for (const s of t) {
516
+ const v = s.idx;
517
+ if (v >= w || g(v, Z(s, d, {
518
+ type: "HEADER"
519
+ })))
520
+ break;
521
+ for (let p = C; p <= f; p++) {
522
+ const E = n[p];
523
+ if (!k(E) && g(v, Z(s, d, {
524
+ type: "ROW",
525
+ row: E
526
+ })))
527
+ break;
528
+ }
529
+ if (i != null) {
530
+ for (const p of i)
531
+ if (g(v, Z(s, d, {
532
+ type: "SUMMARY",
533
+ row: p
534
+ })))
535
+ break;
536
+ }
537
+ }
538
+ return w;
539
+ }, [C, f, n, i, l, d, t, k]);
540
+ return Q(() => {
541
+ const w = [];
542
+ for (let g = 0; g <= c; g++) {
543
+ const s = e[g];
544
+ g < b && !s.frozen || w.push(s);
545
+ }
546
+ return w;
547
+ }, [b, c, e]);
548
+ }
549
+ function Hn(e) {
550
+ return Array.isArray(e);
551
+ }
552
+ function Kn({
553
+ rawRows: e,
554
+ rowHeight: t,
555
+ clientHeight: n,
556
+ scrollTop: i,
557
+ groupBy: l,
558
+ rowGrouper: c,
559
+ expandedGroupIds: d,
560
+ enableVirtualization: C
561
+ }) {
562
+ const [f, k] = Q(() => {
563
+ if (l.length === 0 || c == null)
564
+ return [void 0, e.length];
565
+ const H = (M, [T, ...O], y) => {
566
+ let z = 0;
567
+ const S = {};
568
+ for (const [h, x] of Object.entries(c(M, T))) {
569
+ const [D, m] = O.length === 0 ? [x, x.length] : H(x, O, y + z + 1);
570
+ S[h] = {
571
+ childRows: x,
572
+ childGroups: D,
573
+ startRowIndex: y + z
574
+ }, z += m + 1;
575
+ }
576
+ return [S, z];
577
+ };
578
+ return H(e, l, 0);
579
+ }, [l, c, e]), [b, w] = Q(() => {
580
+ const H = /* @__PURE__ */ new Set();
581
+ if (!f)
582
+ return [e, O];
583
+ const M = [], T = (y, z, S) => {
584
+ if (Hn(y)) {
585
+ M.push(...y);
586
+ return;
587
+ }
588
+ Object.keys(y).forEach((h, x, D) => {
589
+ const m = z !== void 0 ? `${z}__${h}` : h, F = d?.has(m) ?? !1, {
590
+ childRows: V,
591
+ childGroups: ee,
592
+ startRowIndex: ue
593
+ } = y[h], le = {
594
+ id: m,
595
+ parentId: z,
596
+ groupKey: h,
597
+ isExpanded: F,
598
+ childRows: V,
599
+ level: S,
600
+ posInSet: x,
601
+ startRowIndex: ue,
602
+ setSize: D.length
603
+ };
604
+ M.push(le), H.add(le), F && T(ee, m, S + 1);
605
+ });
606
+ };
607
+ return T(f, void 0, 0), [M, O];
608
+ function O(y) {
609
+ return H.has(y);
610
+ }
611
+ }, [d, f, e]), {
612
+ totalRowHeight: g,
613
+ gridTemplateRows: s,
614
+ getRowTop: v,
615
+ getRowHeight: p,
616
+ findRowIdx: E
617
+ } = Q(() => {
618
+ if (typeof t == "number")
619
+ return {
620
+ totalRowHeight: t * b.length,
621
+ gridTemplateRows: ` repeat(${b.length}, ${t}px)`,
622
+ getRowTop: (y) => y * t,
623
+ getRowHeight: () => t,
624
+ findRowIdx: (y) => bt(y / t)
625
+ };
626
+ let H = 0, M = " ";
627
+ const T = b.map((y) => {
628
+ const z = w(y) ? t({
629
+ type: "GROUP",
630
+ row: y
631
+ }) : t({
632
+ type: "ROW",
633
+ row: y
634
+ }), S = {
635
+ top: H,
636
+ height: z
637
+ };
638
+ return M += `${z}px `, H += z, S;
639
+ }), O = (y) => Ge(0, Se(b.length - 1, y));
640
+ return {
641
+ totalRowHeight: H,
642
+ gridTemplateRows: M,
643
+ getRowTop: (y) => T[O(y)].top,
644
+ getRowHeight: (y) => T[O(y)].height,
645
+ findRowIdx(y) {
646
+ let z = 0, S = T.length - 1;
647
+ for (; z <= S; ) {
648
+ const h = z + bt((S - z) / 2), x = T[h].top;
649
+ if (x === y)
650
+ return h;
651
+ if (x < y ? z = h + 1 : x > y && (S = h - 1), z > S)
652
+ return S;
653
+ }
654
+ return 0;
655
+ }
656
+ };
657
+ }, [w, t, b]);
658
+ let A = 0, _ = b.length - 1;
659
+ if (C) {
660
+ const M = E(i), T = E(i + n);
661
+ A = Ge(0, M - 4), _ = Se(b.length - 1, T + 4);
662
+ }
663
+ return {
664
+ rowOverscanStartIdx: A,
665
+ rowOverscanEndIdx: _,
666
+ rows: b,
667
+ rowsCount: k,
668
+ totalRowHeight: g,
669
+ gridTemplateRows: s,
670
+ isGroupRow: w,
671
+ getRowTop: v,
672
+ getRowHeight: p,
673
+ findRowIdx: E
674
+ };
675
+ }
676
+ var _n = ".h1tr5c9i700-beta13{cursor:pointer;display:flex}.h1tr5c9i700-beta13:focus{outline:none}.h19r0msv700-beta13{flex-grow:1;overflow:hidden;overflow:clip;text-overflow:ellipsis}";
677
+ G(_n, { insertAt: "top" });
678
+ const jn = "h1tr5c9i700-beta13", Bn = `rdg-header-sort-cell ${jn}`, Gn = "h19r0msv700-beta13", Vn = `rdg-header-sort-name ${Gn}`;
679
+ function qn({
680
+ column: e,
681
+ sortDirection: t,
682
+ priority: n,
683
+ onSort: i,
684
+ isCellSelected: l
685
+ }) {
686
+ return e.sortable ? /* @__PURE__ */ I(Un, {
687
+ onSort: i,
688
+ sortDirection: t,
689
+ priority: n,
690
+ isCellSelected: l,
691
+ children: e.name
692
+ }) : /* @__PURE__ */ I(ze, {
693
+ children: e.name
694
+ });
695
+ }
696
+ function Un({
697
+ onSort: e,
698
+ sortDirection: t,
699
+ priority: n,
700
+ children: i,
701
+ isCellSelected: l
702
+ }) {
703
+ const c = kt().sortIcon, {
704
+ ref: d,
705
+ tabIndex: C
706
+ } = Ct(l);
707
+ function f(b) {
708
+ (b.key === " " || b.key === "Enter") && (b.preventDefault(), e(b.ctrlKey || b.metaKey));
709
+ }
710
+ function k(b) {
711
+ e(b.ctrlKey || b.metaKey);
712
+ }
713
+ return /* @__PURE__ */ ne("span", {
714
+ ref: d,
715
+ tabIndex: C,
716
+ className: Bn,
717
+ onClick: k,
718
+ onKeyDown: f,
719
+ children: [/* @__PURE__ */ I("span", {
720
+ className: Vn,
721
+ children: i
722
+ }), /* @__PURE__ */ ne("span", {
723
+ children: [/* @__PURE__ */ I(c, {
724
+ sortDirection: t
725
+ }), n]
726
+ })]
727
+ });
728
+ }
729
+ var Xn = '.celq7o9700-beta13{touch-action:none}.celq7o9700-beta13:after{content:"";cursor:col-resize;inline-size:10px;inset-block-end:0;inset-block-start:0;inset-inline-end:0;position:absolute}';
730
+ G(Xn, { insertAt: "top" });
731
+ const Yn = "celq7o9700-beta13", Jn = `rdg-cell-resizable ${Yn}`;
732
+ function Qn({
733
+ column: e,
734
+ colSpan: t,
735
+ isCellSelected: n,
736
+ onColumnResize: i,
737
+ allRowsSelected: l,
738
+ onAllRowsSelectionChange: c,
739
+ sortColumns: d,
740
+ onSortColumnsChange: C,
741
+ selectCell: f,
742
+ shouldFocusGrid: k,
743
+ direction: b
744
+ }) {
745
+ const w = b === "rtl", {
746
+ ref: g,
747
+ tabIndex: s,
748
+ onFocus: v
749
+ } = Ue(n), p = d?.findIndex((x) => x.columnKey === e.key), E = p !== void 0 && p > -1 ? d[p] : void 0, A = E?.direction, _ = E !== void 0 && d.length > 1 ? p + 1 : void 0, H = A && !_ ? A === "ASC" ? "ascending" : "descending" : void 0, M = De(e, e.headerCellClass, e.resizable && Jn), T = e.headerRenderer ?? qn;
750
+ function O(x) {
751
+ if (x.pointerType === "mouse" && x.buttons !== 1)
752
+ return;
753
+ const {
754
+ currentTarget: D,
755
+ pointerId: m
756
+ } = x, {
757
+ right: F,
758
+ left: V
759
+ } = D.getBoundingClientRect(), ee = w ? x.clientX - V : F - x.clientX;
760
+ if (ee > 11)
761
+ return;
762
+ function ue(Fe) {
763
+ const {
764
+ right: fe,
765
+ left: ge
766
+ } = D.getBoundingClientRect(), te = w ? fe + ee - Fe.clientX : Fe.clientX + ee - ge;
767
+ te > 0 && i(e, ht(te, e));
768
+ }
769
+ function le() {
770
+ D.removeEventListener("pointermove", ue), D.removeEventListener("lostpointercapture", le);
771
+ }
772
+ D.setPointerCapture(m), D.addEventListener("pointermove", ue), D.addEventListener("lostpointercapture", le);
773
+ }
774
+ function y(x) {
775
+ if (C == null)
776
+ return;
777
+ const {
778
+ sortDescendingFirst: D
779
+ } = e;
780
+ if (E === void 0) {
781
+ const m = {
782
+ columnKey: e.key,
783
+ direction: D ? "DESC" : "ASC"
784
+ };
785
+ C(d && x ? [...d, m] : [m]);
786
+ } else {
787
+ let m;
788
+ if ((D && A === "DESC" || !D && A === "ASC") && (m = {
789
+ columnKey: e.key,
790
+ direction: A === "ASC" ? "DESC" : "ASC"
791
+ }), x) {
792
+ const F = [...d];
793
+ m ? F[p] = m : F.splice(p, 1), C(F);
794
+ } else
795
+ C(m ? [m] : []);
796
+ }
797
+ }
798
+ function z() {
799
+ f(e.idx);
800
+ }
801
+ function S(x) {
802
+ const {
803
+ right: D,
804
+ left: m
805
+ } = x.currentTarget.getBoundingClientRect();
806
+ (w ? x.clientX - m : D - x.clientX) > 11 || i(e, "auto");
807
+ }
808
+ function h(x) {
809
+ v?.(x), k && f(0);
810
+ }
811
+ return /* @__PURE__ */ I("div", {
812
+ role: "columnheader",
813
+ "aria-colindex": e.idx + 1,
814
+ "aria-selected": n,
815
+ "aria-sort": H,
816
+ "aria-colspan": t,
817
+ ref: g,
818
+ tabIndex: k ? 0 : s,
819
+ className: M,
820
+ style: {
821
+ ...Ee(e, t),
822
+ minWidth: e.minWidth,
823
+ maxWidth: e.maxWidth ?? void 0
824
+ },
825
+ onFocus: h,
826
+ onClick: z,
827
+ onDoubleClick: e.resizable ? S : void 0,
828
+ onPointerDown: e.resizable ? O : void 0,
829
+ children: /* @__PURE__ */ I(T, {
830
+ column: e,
831
+ sortDirection: A,
832
+ priority: _,
833
+ onSort: y,
834
+ allRowsSelected: l,
835
+ onAllRowsSelectionChange: c,
836
+ isCellSelected: n
837
+ })
838
+ });
839
+ }
840
+ var Zn = ".h197vzie700-beta13{background-color:var(--rdg-header-background-color);display:contents;font-weight:700;line-height:var(--rdg-header-row-height)}.h197vzie700-beta13>.c1wupbe700-beta13{inset-block-start:0;position:sticky;z-index:2}.h197vzie700-beta13>.c1730fa4700-beta13{z-index:3}";
841
+ G(Zn, { insertAt: "top" });
842
+ const er = "h197vzie700-beta13", tr = `rdg-header-row ${er}`;
843
+ function or({
844
+ columns: e,
845
+ allRowsSelected: t,
846
+ onAllRowsSelectionChange: n,
847
+ onColumnResize: i,
848
+ sortColumns: l,
849
+ onSortColumnsChange: c,
850
+ lastFrozenColumnIndex: d,
851
+ selectedCellIdx: C,
852
+ selectCell: f,
853
+ shouldFocusGrid: k,
854
+ direction: b
855
+ }) {
856
+ const w = [];
857
+ for (let g = 0; g < e.length; g++) {
858
+ const s = e[g], v = Z(s, d, {
859
+ type: "HEADER"
860
+ });
861
+ v !== void 0 && (g += v - 1), w.push(/* @__PURE__ */ I(Qn, {
862
+ column: s,
863
+ colSpan: v,
864
+ isCellSelected: C === s.idx,
865
+ onColumnResize: i,
866
+ allRowsSelected: t,
867
+ onAllRowsSelectionChange: n,
868
+ onSortColumnsChange: c,
869
+ sortColumns: l,
870
+ selectCell: f,
871
+ shouldFocusGrid: k && g === 0,
872
+ direction: b
873
+ }, s.key));
874
+ }
875
+ return /* @__PURE__ */ I("div", {
876
+ role: "row",
877
+ "aria-rowindex": 1,
878
+ className: se(tr, C === -1 && Ve),
879
+ style: qe(1),
880
+ children: w
881
+ });
882
+ }
883
+ const nr = /* @__PURE__ */ ae(or);
884
+ var rr = ".c1bmg16t700-beta13,.ccpfvsn700-beta13{background-color:#ccf}.c1bmg16t700-beta13.ccpfvsn700-beta13{background-color:#99f}";
885
+ G(rr, { insertAt: "top" });
886
+ const ir = "ccpfvsn700-beta13", cr = `rdg-cell-copied ${ir}`, sr = "c1bmg16t700-beta13", lr = `rdg-cell-dragged-over ${sr}`;
887
+ function dr({
888
+ column: e,
889
+ colSpan: t,
890
+ isCellSelected: n,
891
+ isCopied: i,
892
+ isDraggedOver: l,
893
+ row: c,
894
+ dragHandle: d,
895
+ onRowClick: C,
896
+ onRowDoubleClick: f,
897
+ onRowChange: k,
898
+ selectCell: b,
899
+ ...w
900
+ }) {
901
+ const {
902
+ ref: g,
903
+ tabIndex: s,
904
+ onFocus: v
905
+ } = Ue(n), {
906
+ cellClass: p
907
+ } = e, E = De(e, typeof p == "function" ? p(c) : p, i && cr, l && lr);
908
+ function A(T) {
909
+ b(c, e, T);
910
+ }
911
+ function _() {
912
+ A(e.editorOptions?.editOnClick), C?.(c, e);
913
+ }
914
+ function H() {
915
+ A();
916
+ }
917
+ function M() {
918
+ A(!0), f?.(c, e);
919
+ }
920
+ return /* @__PURE__ */ I("div", {
921
+ role: "gridcell",
922
+ "aria-colindex": e.idx + 1,
923
+ "aria-selected": n,
924
+ "aria-colspan": t,
925
+ "aria-readonly": !eo(e, c) || void 0,
926
+ ref: g,
927
+ tabIndex: s,
928
+ className: E,
929
+ style: Ee(e, t),
930
+ onClick: _,
931
+ onDoubleClick: M,
932
+ onContextMenu: H,
933
+ onFocus: v,
934
+ ...w,
935
+ children: !e.rowGroup && /* @__PURE__ */ ne(ze, {
936
+ children: [/* @__PURE__ */ I(e.formatter, {
937
+ column: e,
938
+ row: c,
939
+ isCellSelected: n,
940
+ onRowChange: k
941
+ }), d]
942
+ })
943
+ });
944
+ }
945
+ const ar = /* @__PURE__ */ ae(dr);
946
+ function ur({
947
+ className: e,
948
+ rowIdx: t,
949
+ gridRowStart: n,
950
+ height: i,
951
+ selectedCellIdx: l,
952
+ isRowSelected: c,
953
+ copiedCellIdx: d,
954
+ draggedOverCellIdx: C,
955
+ lastFrozenColumnIndex: f,
956
+ row: k,
957
+ viewportColumns: b,
958
+ selectedCellEditor: w,
959
+ selectedCellDragHandle: g,
960
+ onRowClick: s,
961
+ onRowDoubleClick: v,
962
+ rowClass: p,
963
+ setDraggedOverRowIdx: E,
964
+ onMouseEnter: A,
965
+ onRowChange: _,
966
+ selectCell: H,
967
+ ...M
968
+ }, T) {
969
+ const O = J((S) => {
970
+ _(t, S);
971
+ });
972
+ function y(S) {
973
+ E?.(t), A?.(S);
974
+ }
975
+ e = se(mt, `rdg-row-${t % 2 === 0 ? "even" : "odd"}`, p?.(k), e, l === -1 && Ve);
976
+ const z = [];
977
+ for (let S = 0; S < b.length; S++) {
978
+ const h = b[S], {
979
+ idx: x
980
+ } = h, D = Z(h, f, {
981
+ type: "ROW",
982
+ row: k
983
+ });
984
+ D !== void 0 && (S += D - 1);
985
+ const m = l === x;
986
+ m && w ? z.push(w) : z.push(/* @__PURE__ */ I(ar, {
987
+ column: h,
988
+ colSpan: D,
989
+ row: k,
990
+ isCopied: d === x,
991
+ isDraggedOver: C === x,
992
+ isCellSelected: m,
993
+ dragHandle: m ? g : void 0,
994
+ onRowClick: s,
995
+ onRowDoubleClick: v,
996
+ onRowChange: O,
997
+ selectCell: H
998
+ }, h.key));
999
+ }
1000
+ return /* @__PURE__ */ I(Qt, {
1001
+ value: c,
1002
+ children: /* @__PURE__ */ I("div", {
1003
+ role: "row",
1004
+ ref: T,
1005
+ className: e,
1006
+ onMouseEnter: y,
1007
+ style: qe(n, i),
1008
+ ...M,
1009
+ children: z
1010
+ })
1011
+ });
1012
+ }
1013
+ const fr = /* @__PURE__ */ ae(/* @__PURE__ */ pt(ur));
1014
+ function gr({
1015
+ id: e,
1016
+ groupKey: t,
1017
+ childRows: n,
1018
+ isExpanded: i,
1019
+ isCellSelected: l,
1020
+ column: c,
1021
+ row: d,
1022
+ groupColumnIndex: C,
1023
+ toggleGroup: f
1024
+ }) {
1025
+ const {
1026
+ ref: k,
1027
+ tabIndex: b,
1028
+ onFocus: w
1029
+ } = Ue(l);
1030
+ function g() {
1031
+ f(e);
1032
+ }
1033
+ const s = c.rowGroup && C === c.idx;
1034
+ return /* @__PURE__ */ I("div", {
1035
+ role: "gridcell",
1036
+ "aria-colindex": c.idx + 1,
1037
+ "aria-selected": l,
1038
+ ref: k,
1039
+ tabIndex: b,
1040
+ className: De(c),
1041
+ style: {
1042
+ ...Ee(c),
1043
+ cursor: s ? "pointer" : "default"
1044
+ },
1045
+ onClick: s ? g : void 0,
1046
+ onFocus: w,
1047
+ children: (!c.rowGroup || C === c.idx) && c.groupFormatter && /* @__PURE__ */ I(c.groupFormatter, {
1048
+ groupKey: t,
1049
+ childRows: n,
1050
+ column: c,
1051
+ row: d,
1052
+ isExpanded: i,
1053
+ isCellSelected: l,
1054
+ toggleGroup: g
1055
+ })
1056
+ }, c.key);
1057
+ }
1058
+ const br = /* @__PURE__ */ ae(gr);
1059
+ var hr = ".gyxx7e9700-beta13:not([aria-selected=true]){background-color:var(--rdg-header-background-color)}.gyxx7e9700-beta13>.c1wupbe700-beta13:not(:last-child):not(.c9dpaye700-beta13){border-inline-end:none}";
1060
+ G(hr, { insertAt: "top" });
1061
+ const pr = "gyxx7e9700-beta13", xr = `rdg-group-row ${pr}`;
1062
+ function wr({
1063
+ id: e,
1064
+ groupKey: t,
1065
+ viewportColumns: n,
1066
+ childRows: i,
1067
+ rowIdx: l,
1068
+ row: c,
1069
+ gridRowStart: d,
1070
+ height: C,
1071
+ level: f,
1072
+ isExpanded: k,
1073
+ selectedCellIdx: b,
1074
+ isRowSelected: w,
1075
+ selectGroup: g,
1076
+ toggleGroup: s,
1077
+ ...v
1078
+ }) {
1079
+ const p = n[0].key === ft ? f + 1 : f;
1080
+ function E() {
1081
+ g(l);
1082
+ }
1083
+ return /* @__PURE__ */ I(Qt, {
1084
+ value: w,
1085
+ children: /* @__PURE__ */ I("div", {
1086
+ role: "row",
1087
+ "aria-level": f,
1088
+ "aria-expanded": k,
1089
+ className: se(mt, xr, `rdg-row-${l % 2 === 0 ? "even" : "odd"}`, b === -1 && Ve),
1090
+ onClick: E,
1091
+ style: qe(d, C),
1092
+ ...v,
1093
+ children: n.map((A) => /* @__PURE__ */ I(br, {
1094
+ id: e,
1095
+ groupKey: t,
1096
+ childRows: i,
1097
+ isExpanded: k,
1098
+ isCellSelected: b === A.idx,
1099
+ column: A,
1100
+ row: c,
1101
+ groupColumnIndex: p,
1102
+ toggleGroup: s
1103
+ }, A.key))
1104
+ })
1105
+ });
1106
+ }
1107
+ const mr = /* @__PURE__ */ ae(wr);
1108
+ var Cr = ".s1n3hxke700-beta13{inset-block-end:var(--rdg-summary-row-bottom);inset-block-start:var(--rdg-summary-row-top)}";
1109
+ G(Cr, { insertAt: "top" });
1110
+ const kr = "s1n3hxke700-beta13";
1111
+ function yr({
1112
+ column: e,
1113
+ colSpan: t,
1114
+ row: n,
1115
+ isCellSelected: i,
1116
+ selectCell: l
1117
+ }) {
1118
+ const {
1119
+ ref: c,
1120
+ tabIndex: d,
1121
+ onFocus: C
1122
+ } = Ue(i), {
1123
+ summaryFormatter: f,
1124
+ summaryCellClass: k
1125
+ } = e, b = De(e, kr, typeof k == "function" ? k(n) : k);
1126
+ function w() {
1127
+ l(n, e);
1128
+ }
1129
+ return /* @__PURE__ */ I("div", {
1130
+ role: "gridcell",
1131
+ "aria-colindex": e.idx + 1,
1132
+ "aria-colspan": t,
1133
+ "aria-selected": i,
1134
+ ref: c,
1135
+ tabIndex: d,
1136
+ className: b,
1137
+ style: Ee(e, t),
1138
+ onClick: w,
1139
+ onFocus: C,
1140
+ children: f && /* @__PURE__ */ I(f, {
1141
+ column: e,
1142
+ row: n,
1143
+ isCellSelected: i
1144
+ })
1145
+ });
1146
+ }
1147
+ const Rr = /* @__PURE__ */ ae(yr);
1148
+ var vr = ".snfqesz700-beta13.r1otpg64700-beta13{line-height:var(--rdg-summary-row-height)}.snfqesz700-beta13.r1otpg64700-beta13>.c1wupbe700-beta13{position:sticky}.s1jijrjz700-beta13>.c1wupbe700-beta13{border-block-start:2px solid var(--rdg-summary-border-color)}";
1149
+ G(vr, { insertAt: "top" });
1150
+ const Ir = "snfqesz700-beta13", Sr = "s1jijrjz700-beta13", zr = `rdg-summary-row ${Ir}`;
1151
+ function Er({
1152
+ rowIdx: e,
1153
+ gridRowStart: t,
1154
+ row: n,
1155
+ viewportColumns: i,
1156
+ top: l,
1157
+ bottom: c,
1158
+ lastFrozenColumnIndex: d,
1159
+ selectedCellIdx: C,
1160
+ selectCell: f,
1161
+ "aria-rowindex": k
1162
+ }) {
1163
+ const b = [];
1164
+ for (let w = 0; w < i.length; w++) {
1165
+ const g = i[w], s = Z(g, d, {
1166
+ type: "SUMMARY",
1167
+ row: n
1168
+ });
1169
+ s !== void 0 && (w += s - 1);
1170
+ const v = C === g.idx;
1171
+ b.push(/* @__PURE__ */ I(Rr, {
1172
+ column: g,
1173
+ colSpan: s,
1174
+ row: n,
1175
+ isCellSelected: v,
1176
+ selectCell: f
1177
+ }, g.key));
1178
+ }
1179
+ return /* @__PURE__ */ I("div", {
1180
+ role: "row",
1181
+ "aria-rowindex": k,
1182
+ className: se(mt, `rdg-row-${e % 2 === 0 ? "even" : "odd"}`, zr, e === 0 && Sr, C === -1 && Ve),
1183
+ style: {
1184
+ ...qe(t),
1185
+ "--rdg-summary-row-top": l !== void 0 ? `${l}px` : void 0,
1186
+ "--rdg-summary-row-bottom": c !== void 0 ? `${c}px` : void 0
1187
+ },
1188
+ children: b
1189
+ });
1190
+ }
1191
+ const Dr = /* @__PURE__ */ ae(Er);
1192
+ var Fr = ".c1tngyp1700-beta13.rdg-cell{padding:0}";
1193
+ G(Fr, { insertAt: "top" });
1194
+ const $r = "c1tngyp1700-beta13";
1195
+ function Lr({
1196
+ column: e,
1197
+ colSpan: t,
1198
+ row: n,
1199
+ onRowChange: i,
1200
+ closeEditor: l
1201
+ }) {
1202
+ const c = ce(), d = e.editorOptions?.commitOnOutsideClick !== !1, C = J(() => {
1203
+ b(!0);
1204
+ });
1205
+ wt(() => {
1206
+ if (!d)
1207
+ return;
1208
+ function s() {
1209
+ c.current = requestAnimationFrame(C);
1210
+ }
1211
+ return addEventListener("mousedown", s, {
1212
+ capture: !0
1213
+ }), () => {
1214
+ removeEventListener("mousedown", s, {
1215
+ capture: !0
1216
+ }), f();
1217
+ };
1218
+ }, [d, C]);
1219
+ function f() {
1220
+ cancelAnimationFrame(c.current);
1221
+ }
1222
+ function k(s) {
1223
+ s.key === "Escape" ? (s.stopPropagation(), b()) : s.key === "Enter" ? (s.stopPropagation(), b(!0)) : (e.editorOptions?.onNavigation ?? En)(s) || s.stopPropagation();
1224
+ }
1225
+ function b(s) {
1226
+ s ? i(n, !0) : l();
1227
+ }
1228
+ const {
1229
+ cellClass: w
1230
+ } = e, g = De(e, "rdg-editor-container", typeof w == "function" ? w(n) : w, !e.editorOptions?.renderFormatter && $r);
1231
+ return /* @__PURE__ */ I("div", {
1232
+ role: "gridcell",
1233
+ "aria-colindex": e.idx + 1,
1234
+ "aria-colspan": t,
1235
+ "aria-selected": !0,
1236
+ className: g,
1237
+ style: Ee(e, t),
1238
+ onKeyDown: k,
1239
+ onMouseDownCapture: d ? f : void 0,
1240
+ children: e.editor != null && /* @__PURE__ */ ne(ze, {
1241
+ children: [/* @__PURE__ */ I(e.editor, {
1242
+ column: e,
1243
+ row: n,
1244
+ onRowChange: i,
1245
+ onClose: b
1246
+ }), e.editorOptions?.renderFormatter && /* @__PURE__ */ I(e.formatter, {
1247
+ column: e,
1248
+ row: n,
1249
+ isCellSelected: !0,
1250
+ onRowChange: i
1251
+ })]
1252
+ })
1253
+ });
1254
+ }
1255
+ var Ar = ".cadd3bp700-beta13{background-color:var(--rdg-selection-color);block-size:8px;cursor:move;inline-size:8px;inset-block-end:0;inset-inline-end:0;position:absolute}.cadd3bp700-beta13:hover{background-color:var(--rdg-background-color);block-size:16px;border:2px solid var(--rdg-selection-color);inline-size:16px}";
1256
+ G(Ar, { insertAt: "top" });
1257
+ const Or = "cadd3bp700-beta13", Tr = `rdg-cell-drag-handle ${Or}`;
1258
+ function Nr({
1259
+ rows: e,
1260
+ columns: t,
1261
+ selectedPosition: n,
1262
+ latestDraggedOverRowIdx: i,
1263
+ isCellEditable: l,
1264
+ onRowsChange: c,
1265
+ onFill: d,
1266
+ setDragging: C,
1267
+ setDraggedOverRowIdx: f
1268
+ }) {
1269
+ function k(s) {
1270
+ if (s.buttons !== 1)
1271
+ return;
1272
+ C(!0), window.addEventListener("mouseover", v), window.addEventListener("mouseup", p);
1273
+ function v(E) {
1274
+ E.buttons !== 1 && p();
1275
+ }
1276
+ function p() {
1277
+ window.removeEventListener("mouseover", v), window.removeEventListener("mouseup", p), C(!1), b();
1278
+ }
1279
+ }
1280
+ function b() {
1281
+ const s = i.current;
1282
+ if (s === void 0)
1283
+ return;
1284
+ const {
1285
+ rowIdx: v
1286
+ } = n, p = v < s ? v + 1 : s, E = v < s ? s + 1 : v;
1287
+ g(p, E), f(void 0);
1288
+ }
1289
+ function w(s) {
1290
+ s.stopPropagation(), g(n.rowIdx + 1, e.length);
1291
+ }
1292
+ function g(s, v) {
1293
+ const {
1294
+ idx: p,
1295
+ rowIdx: E
1296
+ } = n, A = t[p], _ = e[E], H = [...e], M = [];
1297
+ for (let T = s; T < v; T++)
1298
+ if (l({
1299
+ rowIdx: T,
1300
+ idx: p
1301
+ })) {
1302
+ const O = d({
1303
+ columnKey: A.key,
1304
+ sourceRow: _,
1305
+ targetRow: e[T]
1306
+ });
1307
+ O !== e[T] && (H[T] = O, M.push(T));
1308
+ }
1309
+ M.length > 0 && c?.(H, {
1310
+ indexes: M,
1311
+ column: A
1312
+ });
1313
+ }
1314
+ return /* @__PURE__ */ I("div", {
1315
+ className: Tr,
1316
+ onMouseDown: k,
1317
+ onDoubleClick: w
1318
+ });
1319
+ }
1320
+ var Pr = ".a888944700-beta13{fill:currentColor}.a888944700-beta13>path{transition:d .1s}";
1321
+ G(Pr, { insertAt: "top" });
1322
+ const Mr = "a888944700-beta13", Wr = `rdg-sort-arrow ${Mr}`;
1323
+ function Hr({
1324
+ sortDirection: e
1325
+ }) {
1326
+ return e !== void 0 ? /* @__PURE__ */ I("svg", {
1327
+ viewBox: "0 0 12 8",
1328
+ width: "12",
1329
+ height: "8",
1330
+ className: Wr,
1331
+ "aria-hidden": !0,
1332
+ children: /* @__PURE__ */ I("path", {
1333
+ d: e === "ASC" ? "M0 8 6 0 12 8" : "M0 0 6 8 12 0"
1334
+ })
1335
+ }) : null;
1336
+ }
1337
+ const Xt = {
1338
+ idx: -1,
1339
+ rowIdx: -2,
1340
+ mode: "SELECT"
1341
+ };
1342
+ function Kr({
1343
+ columns: e,
1344
+ rows: t,
1345
+ summaryRows: n,
1346
+ rowKeyGetter: i,
1347
+ onRowsChange: l,
1348
+ rowHeight: c,
1349
+ headerRowHeight: d,
1350
+ summaryRowHeight: C,
1351
+ selectedRows: f,
1352
+ onSelectedRowsChange: k,
1353
+ sortColumns: b,
1354
+ onSortColumnsChange: w,
1355
+ defaultColumnOptions: g,
1356
+ groupBy: s,
1357
+ rowGrouper: v,
1358
+ expandedGroupIds: p,
1359
+ onExpandedGroupIdsChange: E,
1360
+ onRowClick: A,
1361
+ onRowDoubleClick: _,
1362
+ onScroll: H,
1363
+ onColumnResize: M,
1364
+ onFill: T,
1365
+ onCopy: O,
1366
+ onPaste: y,
1367
+ cellNavigationMode: z,
1368
+ enableVirtualization: S,
1369
+ components: h,
1370
+ className: x,
1371
+ style: D,
1372
+ rowClass: m,
1373
+ direction: F,
1374
+ "aria-label": V,
1375
+ "aria-labelledby": ee,
1376
+ "aria-describedby": ue,
1377
+ "data-testid": le
1378
+ }, Fe) {
1379
+ const fe = kt();
1380
+ c ?? (c = 35);
1381
+ const ge = d ?? (typeof c == "number" ? c : 35), te = C ?? (typeof c == "number" ? c : 35), oo = h?.rowRenderer ?? fe?.rowRenderer ?? fr, yt = h?.sortIcon ?? fe?.sortIcon ?? Hr, Rt = h?.checkboxFormatter ?? fe?.checkboxFormatter ?? pn, vt = h?.noRowsFallback ?? fe?.noRowsFallback, $e = z ?? "NONE";
1382
+ S ?? (S = !0), F ?? (F = "ltr");
1383
+ const [no, ro] = Y(0), [Xe, io] = Y(0), [co, It] = Y(() => /* @__PURE__ */ new Map()), [u, be] = Y(Xt), [he, St] = Y(null), [zt, so] = Y(!1), [Ce, lo] = Y(void 0), [re, Et] = Y(null), Ye = ce(u), Dt = ce(Ce), Je = ce(-1), Le = ce(null), [de, ao, Ft] = Mn(), oe = 1, pe = n?.length ?? 0, Ae = Ft - ge - pe * te, ke = f != null && k != null, uo = u.rowIdx === -1, Oe = F === "rtl", Qe = Oe ? "ArrowRight" : "ArrowLeft", $t = Oe ? "ArrowLeft" : "ArrowRight", fo = Q(() => ({
1384
+ sortIcon: yt,
1385
+ checkboxFormatter: Rt
1386
+ }), [yt, Rt]), go = Q(() => {
1387
+ const {
1388
+ length: o
1389
+ } = t;
1390
+ return o !== 0 && f != null && i != null && f.size >= o && t.every((r) => f.has(i(r)));
1391
+ }, [t, f, i]), {
1392
+ columns: B,
1393
+ colSpanColumns: Lt,
1394
+ colOverscanStartIdx: bo,
1395
+ colOverscanEndIdx: At,
1396
+ layoutCssVars: Ze,
1397
+ columnMetrics: Ot,
1398
+ lastFrozenColumnIndex: U,
1399
+ totalFrozenColumnWidth: et,
1400
+ groupBy: Tt
1401
+ } = Nn({
1402
+ rawColumns: e,
1403
+ columnWidths: co,
1404
+ scrollLeft: Xe,
1405
+ viewportWidth: ao,
1406
+ defaultColumnOptions: g,
1407
+ rawGroupBy: v ? s : void 0,
1408
+ enableVirtualization: S
1409
+ }), {
1410
+ rowOverscanStartIdx: ye,
1411
+ rowOverscanEndIdx: Re,
1412
+ rows: W,
1413
+ rowsCount: Nt,
1414
+ totalRowHeight: Pt,
1415
+ gridTemplateRows: ho,
1416
+ isGroupRow: X,
1417
+ getRowTop: tt,
1418
+ getRowHeight: ot,
1419
+ findRowIdx: Mt
1420
+ } = Kn({
1421
+ rawRows: t,
1422
+ groupBy: Tt,
1423
+ rowGrouper: v,
1424
+ rowHeight: c,
1425
+ clientHeight: Ae,
1426
+ scrollTop: no,
1427
+ expandedGroupIds: p,
1428
+ enableVirtualization: S
1429
+ }), xe = Wn({
1430
+ columns: B,
1431
+ colSpanColumns: Lt,
1432
+ colOverscanStartIdx: bo,
1433
+ colOverscanEndIdx: At,
1434
+ lastFrozenColumnIndex: U,
1435
+ rowOverscanStartIdx: ye,
1436
+ rowOverscanEndIdx: Re,
1437
+ rows: W,
1438
+ summaryRows: n,
1439
+ isGroupRow: X
1440
+ }), ie = Tt.length > 0 && typeof v == "function", po = ie ? -1 : 0, Te = B.length - 1, ve = -1, Ie = oe + W.length + pe - 2, nt = Me(u), Ne = Gt(u), xo = J(Wt), wo = J(So), mo = J(Pe), Co = J((o, r, R) => {
1441
+ const a = W.indexOf(o);
1442
+ we({
1443
+ rowIdx: a,
1444
+ idx: r.idx
1445
+ }, R);
1446
+ }), ko = J((o) => {
1447
+ we({
1448
+ rowIdx: o,
1449
+ idx: -1
1450
+ });
1451
+ }), yo = J((o) => {
1452
+ we({
1453
+ rowIdx: -1,
1454
+ idx: o
1455
+ });
1456
+ }), Ro = J((o, r) => {
1457
+ const R = n.indexOf(o) + oe + W.length - 1;
1458
+ we({
1459
+ rowIdx: R,
1460
+ idx: r.idx
1461
+ });
1462
+ }), vo = J(Ht);
1463
+ Be(() => {
1464
+ if (!nt || at(u, Ye.current)) {
1465
+ Ye.current = u;
1466
+ return;
1467
+ }
1468
+ Ye.current = u, u.idx === -1 && (Le.current.focus({
1469
+ preventScroll: !0
1470
+ }), gt(Le.current));
1471
+ }), Be(() => {
1472
+ if (re === null)
1473
+ return;
1474
+ const o = de.current.querySelector(`[aria-colindex="${re.idx + 1}"]`), {
1475
+ width: r
1476
+ } = o.getBoundingClientRect();
1477
+ It((R) => {
1478
+ const a = new Map(R);
1479
+ return a.set(re.key, r), a;
1480
+ }), Et(null), M?.(re.idx, r);
1481
+ }, [re, de, M]), Ho(Fe, () => ({
1482
+ element: de.current,
1483
+ scrollToColumn: $o,
1484
+ scrollToRow(o) {
1485
+ const {
1486
+ current: r
1487
+ } = de;
1488
+ !r || r.scrollTo({
1489
+ top: tt(o),
1490
+ behavior: "smooth"
1491
+ });
1492
+ },
1493
+ selectCell: we
1494
+ }));
1495
+ const Io = je((o, r) => {
1496
+ if (r === "auto") {
1497
+ Et(o);
1498
+ return;
1499
+ }
1500
+ It((R) => {
1501
+ const a = new Map(R);
1502
+ return a.set(o.key, r), a;
1503
+ }), M?.(o.idx, r);
1504
+ }, [M]), rt = je((o) => {
1505
+ lo(o), Dt.current = o;
1506
+ }, []);
1507
+ function Wt({
1508
+ row: o,
1509
+ checked: r,
1510
+ isShiftClick: R
1511
+ }) {
1512
+ if (!k)
1513
+ return;
1514
+ dt(i);
1515
+ const a = new Set(f);
1516
+ if (X(o)) {
1517
+ for (const $ of o.childRows) {
1518
+ const L = i($);
1519
+ r ? a.add(L) : a.delete(L);
1520
+ }
1521
+ k(a);
1522
+ return;
1523
+ }
1524
+ const N = i(o);
1525
+ if (r) {
1526
+ a.add(N);
1527
+ const $ = Je.current, L = W.indexOf(o);
1528
+ if (Je.current = L, R && $ !== -1 && $ !== L) {
1529
+ const K = An(L - $);
1530
+ for (let P = $ + K; P !== L; P += K) {
1531
+ const q = W[P];
1532
+ X(q) || a.add(i(q));
1533
+ }
1534
+ }
1535
+ } else
1536
+ a.delete(N), Je.current = -1;
1537
+ k(a);
1538
+ }
1539
+ function So(o) {
1540
+ if (!k)
1541
+ return;
1542
+ dt(i);
1543
+ const r = new Set(f);
1544
+ for (const R of t) {
1545
+ const a = i(R);
1546
+ o ? r.add(a) : r.delete(a);
1547
+ }
1548
+ k(r);
1549
+ }
1550
+ function Ht(o) {
1551
+ if (!E)
1552
+ return;
1553
+ const r = new Set(p);
1554
+ r.has(o) ? r.delete(o) : r.add(o), E(r);
1555
+ }
1556
+ function Kt(o) {
1557
+ if (!(o.target instanceof Element))
1558
+ return;
1559
+ const r = o.target.closest(".rdg-cell") !== null, R = ie && o.target === Le.current;
1560
+ if (!r && !R)
1561
+ return;
1562
+ const {
1563
+ key: a,
1564
+ keyCode: N
1565
+ } = o, {
1566
+ rowIdx: $
1567
+ } = u;
1568
+ if (Ne && (y != null || O != null) && qt(o) && !X(W[$]) && u.mode === "SELECT") {
1569
+ if (N === 67) {
1570
+ Eo();
1571
+ return;
1572
+ }
1573
+ if (N === 86) {
1574
+ Do();
1575
+ return;
1576
+ }
1577
+ }
1578
+ if (Bt($)) {
1579
+ const L = W[$];
1580
+ if (X(L) && u.idx === -1 && (a === Qe && L.isExpanded || a === $t && !L.isExpanded)) {
1581
+ o.preventDefault(), Ht(L.id);
1582
+ return;
1583
+ }
1584
+ }
1585
+ switch (o.key) {
1586
+ case "Escape":
1587
+ St(null);
1588
+ return;
1589
+ case "ArrowUp":
1590
+ case "ArrowDown":
1591
+ case "ArrowLeft":
1592
+ case "ArrowRight":
1593
+ case "Tab":
1594
+ case "Home":
1595
+ case "End":
1596
+ case "PageUp":
1597
+ case "PageDown":
1598
+ Ao(o);
1599
+ break;
1600
+ default:
1601
+ Fo(o);
1602
+ break;
1603
+ }
1604
+ }
1605
+ function zo(o) {
1606
+ const {
1607
+ scrollTop: r,
1608
+ scrollLeft: R
1609
+ } = o.currentTarget;
1610
+ ro(r), io(On(R)), H?.(o);
1611
+ }
1612
+ function it(o) {
1613
+ return ie ? t.indexOf(W[o]) : o;
1614
+ }
1615
+ function Pe(o, r) {
1616
+ if (typeof l != "function")
1617
+ return;
1618
+ const R = it(o);
1619
+ if (r === t[R])
1620
+ return;
1621
+ const a = [...t];
1622
+ a[R] = r, l(a, {
1623
+ indexes: [R],
1624
+ column: B[u.idx]
1625
+ });
1626
+ }
1627
+ function _t() {
1628
+ u.mode === "EDIT" && Pe(u.rowIdx, u.row);
1629
+ }
1630
+ function Eo() {
1631
+ const {
1632
+ idx: o,
1633
+ rowIdx: r
1634
+ } = u, R = t[it(r)], a = B[o].key;
1635
+ St({
1636
+ row: R,
1637
+ columnKey: a
1638
+ }), O?.({
1639
+ sourceRow: R,
1640
+ sourceColumnKey: a
1641
+ });
1642
+ }
1643
+ function Do() {
1644
+ if (!y || !l || he === null || !We(u))
1645
+ return;
1646
+ const {
1647
+ idx: o,
1648
+ rowIdx: r
1649
+ } = u, R = t[it(r)], a = y({
1650
+ sourceRow: he.row,
1651
+ sourceColumnKey: he.columnKey,
1652
+ targetRow: R,
1653
+ targetColumnKey: B[o].key
1654
+ });
1655
+ Pe(r, a);
1656
+ }
1657
+ function Fo(o) {
1658
+ if (!Ne)
1659
+ return;
1660
+ const r = W[u.rowIdx];
1661
+ if (X(r))
1662
+ return;
1663
+ const {
1664
+ key: R,
1665
+ shiftKey: a
1666
+ } = o;
1667
+ if (ke && a && R === " ") {
1668
+ dt(i);
1669
+ const $ = i(r);
1670
+ Wt({
1671
+ row: r,
1672
+ checked: !f.has($),
1673
+ isShiftClick: !1
1674
+ }), o.preventDefault();
1675
+ return;
1676
+ }
1677
+ B[u.idx].editorOptions?.onCellKeyDown?.(o), !o.isDefaultPrevented() && We(u) && zn(o) && be(({
1678
+ idx: $,
1679
+ rowIdx: L
1680
+ }) => ({
1681
+ idx: $,
1682
+ rowIdx: L,
1683
+ mode: "EDIT",
1684
+ row: r,
1685
+ originalRow: r
1686
+ }));
1687
+ }
1688
+ function jt(o) {
1689
+ return o >= po && o <= Te;
1690
+ }
1691
+ function Bt(o) {
1692
+ return o >= 0 && o < W.length;
1693
+ }
1694
+ function Me({
1695
+ idx: o,
1696
+ rowIdx: r
1697
+ }) {
1698
+ return r >= ve && r <= Ie && jt(o);
1699
+ }
1700
+ function Gt({
1701
+ idx: o,
1702
+ rowIdx: r
1703
+ }) {
1704
+ return Bt(r) && jt(o);
1705
+ }
1706
+ function We(o) {
1707
+ return Gt(o) && Dn({
1708
+ columns: B,
1709
+ rows: W,
1710
+ selectedPosition: o,
1711
+ isGroupRow: X
1712
+ });
1713
+ }
1714
+ function we(o, r) {
1715
+ if (!!Me(o))
1716
+ if (_t(), r && We(o)) {
1717
+ const R = W[o.rowIdx];
1718
+ be({
1719
+ ...o,
1720
+ mode: "EDIT",
1721
+ row: R,
1722
+ originalRow: R
1723
+ });
1724
+ } else
1725
+ at(u, o) ? gt(de.current?.querySelector('[tabindex="0"]')) : be({
1726
+ ...o,
1727
+ mode: "SELECT"
1728
+ });
1729
+ }
1730
+ function $o(o) {
1731
+ const {
1732
+ current: r
1733
+ } = de;
1734
+ if (!!r && o > U) {
1735
+ const {
1736
+ rowIdx: R
1737
+ } = u;
1738
+ if (!Me({
1739
+ rowIdx: R,
1740
+ idx: o
1741
+ }))
1742
+ return;
1743
+ const {
1744
+ clientWidth: a
1745
+ } = r, N = B[o], {
1746
+ left: $,
1747
+ width: L
1748
+ } = Ot.get(N);
1749
+ let K = $ + L;
1750
+ const P = to({
1751
+ rows: W,
1752
+ summaryRows: n,
1753
+ rowIdx: R,
1754
+ lastFrozenColumnIndex: U,
1755
+ column: N,
1756
+ isGroupRow: X
1757
+ });
1758
+ if (P !== void 0) {
1759
+ const {
1760
+ left: Ke,
1761
+ width: me
1762
+ } = Ot.get(B[N.idx + P - 1]);
1763
+ K = Ke + me;
1764
+ }
1765
+ const q = $ < Xe + et, He = K > a + Xe, j = Oe ? -1 : 1;
1766
+ q ? r.scrollLeft = ($ - et) * j : He && (r.scrollLeft = (K - a) * j);
1767
+ }
1768
+ }
1769
+ function Lo(o, r, R) {
1770
+ const {
1771
+ idx: a,
1772
+ rowIdx: N
1773
+ } = u, $ = W[N], L = nt && a === -1;
1774
+ if (o === Qe && L && X($) && !$.isExpanded && $.level !== 0) {
1775
+ let K = -1;
1776
+ for (let P = u.rowIdx - 1; P >= 0; P--) {
1777
+ const q = W[P];
1778
+ if (X(q) && q.id === $.parentId) {
1779
+ K = P;
1780
+ break;
1781
+ }
1782
+ }
1783
+ if (K !== -1)
1784
+ return {
1785
+ idx: a,
1786
+ rowIdx: K
1787
+ };
1788
+ }
1789
+ switch (o) {
1790
+ case "ArrowUp":
1791
+ return {
1792
+ idx: a,
1793
+ rowIdx: N - 1
1794
+ };
1795
+ case "ArrowDown":
1796
+ return {
1797
+ idx: a,
1798
+ rowIdx: N + 1
1799
+ };
1800
+ case Qe:
1801
+ return {
1802
+ idx: a - 1,
1803
+ rowIdx: N
1804
+ };
1805
+ case $t:
1806
+ return {
1807
+ idx: a + 1,
1808
+ rowIdx: N
1809
+ };
1810
+ case "Tab":
1811
+ return {
1812
+ idx: a + (R ? -1 : 1),
1813
+ rowIdx: N
1814
+ };
1815
+ case "Home":
1816
+ return L ? {
1817
+ idx: a,
1818
+ rowIdx: 0
1819
+ } : {
1820
+ idx: 0,
1821
+ rowIdx: r ? ve : N
1822
+ };
1823
+ case "End":
1824
+ return L ? {
1825
+ idx: a,
1826
+ rowIdx: W.length - 1
1827
+ } : {
1828
+ idx: Te,
1829
+ rowIdx: r ? Ie : N
1830
+ };
1831
+ case "PageUp": {
1832
+ if (u.rowIdx === ve)
1833
+ return u;
1834
+ const K = tt(N) + ot(N) - Ae;
1835
+ return {
1836
+ idx: a,
1837
+ rowIdx: K > 0 ? Mt(K) : 0
1838
+ };
1839
+ }
1840
+ case "PageDown": {
1841
+ if (u.rowIdx >= W.length)
1842
+ return u;
1843
+ const K = tt(N) + Ae;
1844
+ return {
1845
+ idx: a,
1846
+ rowIdx: K < Pt ? Mt(K) : W.length - 1
1847
+ };
1848
+ }
1849
+ default:
1850
+ return u;
1851
+ }
1852
+ }
1853
+ function Ao(o) {
1854
+ const {
1855
+ key: r,
1856
+ shiftKey: R
1857
+ } = o;
1858
+ let a = $e;
1859
+ if (r === "Tab") {
1860
+ if ($n({
1861
+ shiftKey: R,
1862
+ cellNavigationMode: $e,
1863
+ maxColIdx: Te,
1864
+ minRowIdx: ve,
1865
+ maxRowIdx: Ie,
1866
+ selectedPosition: u
1867
+ })) {
1868
+ _t();
1869
+ return;
1870
+ }
1871
+ a = $e === "NONE" ? "CHANGE_ROW" : $e;
1872
+ }
1873
+ o.preventDefault();
1874
+ const N = qt(o), $ = Lo(r, N, R);
1875
+ if (at(u, $))
1876
+ return;
1877
+ const L = Fn({
1878
+ columns: B,
1879
+ colSpanColumns: Lt,
1880
+ rows: W,
1881
+ summaryRows: n,
1882
+ minRowIdx: ve,
1883
+ maxRowIdx: Ie,
1884
+ lastFrozenColumnIndex: U,
1885
+ cellNavigationMode: a,
1886
+ currentPosition: u,
1887
+ nextPosition: $,
1888
+ isCellWithinBounds: Me,
1889
+ isGroupRow: X
1890
+ });
1891
+ we(L);
1892
+ }
1893
+ function Oo(o) {
1894
+ if (Ce === void 0)
1895
+ return;
1896
+ const {
1897
+ rowIdx: r
1898
+ } = u;
1899
+ return (r < Ce ? r < o && o <= Ce : r > o && o >= Ce) ? u.idx : void 0;
1900
+ }
1901
+ function To() {
1902
+ if (re === null)
1903
+ return Ze;
1904
+ const {
1905
+ gridTemplateColumns: o
1906
+ } = Ze, r = o.split(" ");
1907
+ return r[re.idx] = "max-content", {
1908
+ ...Ze,
1909
+ gridTemplateColumns: r.join(" ")
1910
+ };
1911
+ }
1912
+ function No(o) {
1913
+ if (!(u.rowIdx !== o || u.mode === "EDIT" || ie || T == null))
1914
+ return /* @__PURE__ */ I(Nr, {
1915
+ rows: t,
1916
+ columns: B,
1917
+ selectedPosition: u,
1918
+ isCellEditable: We,
1919
+ latestDraggedOverRowIdx: Dt,
1920
+ onRowsChange: l,
1921
+ onFill: T,
1922
+ setDragging: so,
1923
+ setDraggedOverRowIdx: rt
1924
+ });
1925
+ }
1926
+ function Po(o) {
1927
+ if (u.rowIdx !== o || u.mode === "SELECT")
1928
+ return;
1929
+ const {
1930
+ idx: r,
1931
+ row: R
1932
+ } = u, a = B[r], N = Z(a, U, {
1933
+ type: "ROW",
1934
+ row: R
1935
+ }), $ = () => {
1936
+ be(({
1937
+ idx: K,
1938
+ rowIdx: P
1939
+ }) => ({
1940
+ idx: K,
1941
+ rowIdx: P,
1942
+ mode: "SELECT"
1943
+ }));
1944
+ }, L = (K, P) => {
1945
+ P ? (Pe(u.rowIdx, K), $()) : be((q) => ({
1946
+ ...q,
1947
+ row: K
1948
+ }));
1949
+ };
1950
+ return W[u.rowIdx] !== u.originalRow && $(), /* @__PURE__ */ I(Lr, {
1951
+ column: a,
1952
+ colSpan: N,
1953
+ row: R,
1954
+ onRowChange: L,
1955
+ closeEditor: $
1956
+ }, a.key);
1957
+ }
1958
+ function ct(o) {
1959
+ const r = B[u.idx];
1960
+ return r !== void 0 && u.rowIdx === o && !xe.includes(r) ? u.idx > At ? [...xe, r] : [...xe.slice(0, U + 1), r, ...xe.slice(U + 1)] : xe;
1961
+ }
1962
+ function Mo() {
1963
+ const o = [];
1964
+ let r = 0;
1965
+ const {
1966
+ idx: R,
1967
+ rowIdx: a
1968
+ } = u, N = Ne && a < ye ? ye - 1 : ye, $ = Ne && a > Re ? Re + 1 : Re;
1969
+ for (let L = N; L <= $; L++) {
1970
+ const K = L === ye - 1 || L === Re + 1, P = K ? a : L;
1971
+ let q = xe;
1972
+ const He = B[R];
1973
+ He !== void 0 && (K ? q = [He] : q = ct(P));
1974
+ const j = W[P], Ke = oe + P + 1;
1975
+ if (X(j)) {
1976
+ ({
1977
+ startRowIndex: r
1978
+ } = j);
1979
+ const _e = ke && j.childRows.every((Wo) => f.has(i(Wo)));
1980
+ o.push(/* @__PURE__ */ I(mr, {
1981
+ "aria-level": j.level + 1,
1982
+ "aria-setsize": j.setSize,
1983
+ "aria-posinset": j.posInSet + 1,
1984
+ "aria-rowindex": oe + r + 1,
1985
+ "aria-selected": ke ? _e : void 0,
1986
+ id: j.id,
1987
+ groupKey: j.groupKey,
1988
+ viewportColumns: q,
1989
+ childRows: j.childRows,
1990
+ rowIdx: P,
1991
+ row: j,
1992
+ gridRowStart: Ke,
1993
+ height: ot(P),
1994
+ level: j.level,
1995
+ isExpanded: j.isExpanded,
1996
+ selectedCellIdx: a === P ? R : void 0,
1997
+ isRowSelected: _e,
1998
+ selectGroup: ko,
1999
+ toggleGroup: vo
2000
+ }, j.id));
2001
+ continue;
2002
+ }
2003
+ r++;
2004
+ let me, lt = !1;
2005
+ typeof i == "function" ? (me = i(j), lt = f?.has(me) ?? !1) : me = ie ? r : P, o.push(/* @__PURE__ */ I(oo, {
2006
+ "aria-rowindex": oe + (ie ? r : P) + 1,
2007
+ "aria-selected": ke ? lt : void 0,
2008
+ rowIdx: P,
2009
+ row: j,
2010
+ viewportColumns: q,
2011
+ isRowSelected: lt,
2012
+ onRowClick: A,
2013
+ onRowDoubleClick: _,
2014
+ rowClass: m,
2015
+ gridRowStart: Ke,
2016
+ height: ot(P),
2017
+ copiedCellIdx: he !== null && he.row === j ? B.findIndex((_e) => _e.key === he.columnKey) : void 0,
2018
+ selectedCellIdx: a === P ? R : void 0,
2019
+ draggedOverCellIdx: Oo(P),
2020
+ setDraggedOverRowIdx: zt ? rt : void 0,
2021
+ lastFrozenColumnIndex: U,
2022
+ onRowChange: mo,
2023
+ selectCell: Co,
2024
+ selectedCellDragHandle: No(P),
2025
+ selectedCellEditor: Po(P)
2026
+ }, me));
2027
+ }
2028
+ return o;
2029
+ }
2030
+ (u.idx > Te || u.rowIdx > Ie) && (be(Xt), rt(void 0));
2031
+ let st = `${ge}px`;
2032
+ W.length > 0 && (st += ho), pe > 0 && (st += ` repeat(${pe}, ${te}px)`);
2033
+ const Vt = u.idx === -1 && u.rowIdx !== -2;
2034
+ return /* @__PURE__ */ ne("div", {
2035
+ role: ie ? "treegrid" : "grid",
2036
+ "aria-label": V,
2037
+ "aria-labelledby": ee,
2038
+ "aria-describedby": ue,
2039
+ "aria-multiselectable": ke ? !0 : void 0,
2040
+ "aria-colcount": B.length,
2041
+ "aria-rowcount": oe + Nt + pe,
2042
+ className: se(Qo, x, zt && en, re !== null && Go),
2043
+ style: {
2044
+ ...D,
2045
+ scrollPaddingInlineStart: u.idx > U ? `${et}px` : void 0,
2046
+ scrollPaddingBlock: u.rowIdx >= 0 && u.rowIdx < W.length ? `${ge}px ${pe * te}px` : void 0,
2047
+ gridTemplateRows: st,
2048
+ "--rdg-header-row-height": `${ge}px`,
2049
+ "--rdg-summary-row-height": `${te}px`,
2050
+ "--rdg-sign": Oe ? -1 : 1,
2051
+ ...To()
2052
+ },
2053
+ dir: F,
2054
+ ref: de,
2055
+ onScroll: zo,
2056
+ onKeyDown: Kt,
2057
+ "data-testid": le,
2058
+ children: [ie && /* @__PURE__ */ I("div", {
2059
+ ref: Le,
2060
+ tabIndex: Vt ? 0 : -1,
2061
+ className: se(tn, Vt && [rn, U !== -1 && cn]),
2062
+ style: {
2063
+ gridRowStart: u.rowIdx + 2
2064
+ },
2065
+ onKeyDown: Kt
2066
+ }), /* @__PURE__ */ ne(xn, {
2067
+ value: fo,
2068
+ children: [/* @__PURE__ */ I(nr, {
2069
+ columns: ct(-1),
2070
+ onColumnResize: Io,
2071
+ allRowsSelected: go,
2072
+ onAllRowsSelectionChange: wo,
2073
+ sortColumns: b,
2074
+ onSortColumnsChange: w,
2075
+ lastFrozenColumnIndex: U,
2076
+ selectedCellIdx: uo ? u.idx : void 0,
2077
+ selectCell: yo,
2078
+ shouldFocusGrid: !nt,
2079
+ direction: F
2080
+ }), W.length === 0 && vt ? vt : /* @__PURE__ */ ne(ze, {
2081
+ children: [/* @__PURE__ */ I(In, {
2082
+ value: xo,
2083
+ children: Mo()
2084
+ }), n?.map((o, r) => {
2085
+ const R = oe + W.length + r + 1, a = oe + W.length + r - 1, N = u.rowIdx === a, $ = Ae > Pt ? Ft - te * (n.length - r) : void 0, L = $ === void 0 ? te * (n.length - 1 - r) : void 0;
2086
+ return /* @__PURE__ */ I(Dr, {
2087
+ "aria-rowindex": oe + Nt + r + 1,
2088
+ rowIdx: r,
2089
+ gridRowStart: R,
2090
+ row: o,
2091
+ top: $,
2092
+ bottom: L,
2093
+ viewportColumns: ct(a),
2094
+ lastFrozenColumnIndex: U,
2095
+ selectedCellIdx: N ? u.idx : void 0,
2096
+ selectCell: Ro
2097
+ }, r);
2098
+ })]
2099
+ })]
2100
+ })]
2101
+ });
2102
+ }
2103
+ function at(e, t) {
2104
+ return e.idx === t.idx && e.rowIdx === t.rowIdx;
2105
+ }
2106
+ const Ur = /* @__PURE__ */ pt(Kr);
2107
+ var _r = ".t16y9g8l700-beta13{appearance:none;background-color:var(--rdg-background-color);block-size:100%;border:2px solid #ccc;box-sizing:border-box;color:var(--rdg-color);font-family:inherit;font-size:var(--rdg-font-size);inline-size:100%;padding-block:0;padding-inline:6px;vertical-align:top}.t16y9g8l700-beta13:focus{border-color:var(--rdg-selection-color);outline:none}.t16y9g8l700-beta13::placeholder{color:#999;opacity:1}";
2108
+ G(_r, { insertAt: "top" });
2109
+ export {
2110
+ Ur as D,
2111
+ qn as H,
2112
+ ft as S,
2113
+ Vr as a,
2114
+ qr as u
2115
+ };