@iamfiro/design 0.1.0 → 0.3.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 (160) hide show
  1. package/AGENTS.md +1 -0
  2. package/agents/INDEX.md +1 -0
  3. package/agents/brand-icon/AGENTS.md +2 -2
  4. package/agents/social-login-button/AGENTS.md +156 -0
  5. package/lib/components/Accordion/Accordion2.js +135 -0
  6. package/lib/components/ActionBar/ActionBar2.js +65 -0
  7. package/lib/components/Alert/Alert2.js +131 -0
  8. package/lib/components/AppShell/AppShell2.js +94 -0
  9. package/lib/components/AreaChart/AreaChart.js +59 -0
  10. package/lib/components/BarChart/BarChart2.js +243 -0
  11. package/lib/components/BarList/BarList2.js +172 -0
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +87 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +229 -0
  15. package/lib/components/Calendar/date.js +121 -0
  16. package/lib/components/Card/Card2.js +104 -0
  17. package/lib/components/CardFrame/CardFrame2.js +72 -0
  18. package/lib/components/Chart/ChartParts.js +150 -0
  19. package/lib/components/Chart/chart2.js +96 -0
  20. package/lib/components/Chart/useChartInteraction.js +94 -0
  21. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  22. package/lib/components/ChatBubble/formatChatTime.js +53 -0
  23. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  24. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  25. package/lib/components/CodeBlock/highlight.js +114 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +610 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +75 -0
  29. package/lib/components/Combobox/Combobox2.js +229 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +134 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1996 -0
  34. package/lib/components/DataGrid/GridPopover.js +154 -0
  35. package/lib/components/DataGrid/anchor.js +50 -0
  36. package/lib/components/DataGrid/model.js +558 -0
  37. package/lib/components/DataGrid/panels.js +703 -0
  38. package/lib/components/DataGrid/typeMeta.js +76 -0
  39. package/lib/components/DataGrid/types.js +54 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +118 -0
  42. package/lib/components/Dialog/Dialog2.js +109 -0
  43. package/lib/components/Dialog/modal.js +92 -0
  44. package/lib/components/Drawer/Drawer2.js +244 -0
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +144 -0
  48. package/lib/components/EmptyState/EmptyState2.js +72 -0
  49. package/lib/components/FileChip/FileChip2.js +118 -0
  50. package/lib/components/FileUpload/FileUpload.js +258 -0
  51. package/lib/components/FilterChips/FilterChips2.js +101 -0
  52. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  53. package/lib/components/FunnelChart/funnel.js +69 -0
  54. package/lib/components/Highlight/Highlight2.js +100 -0
  55. package/lib/components/HoverCard/HoverCard.js +134 -0
  56. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  57. package/lib/components/InlineDiff/diff.js +126 -0
  58. package/lib/components/InlineDiff/useDiffReview.js +109 -0
  59. package/lib/components/Kanban/Kanban2.js +691 -0
  60. package/lib/components/Kanban/KanbanCard.js +159 -0
  61. package/lib/components/Kanban/move.js +69 -0
  62. package/lib/components/LineChart/LineChart2.js +342 -0
  63. package/lib/components/List/List2.js +133 -0
  64. package/lib/components/Listbox/Listbox2.js +163 -0
  65. package/lib/components/Marker/Marker2.js +82 -0
  66. package/lib/components/Menubar/Menubar2.js +223 -0
  67. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  69. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  70. package/lib/components/NumberStepper/NumberStepper2.js +129 -0
  71. package/lib/components/OtpInput/OtpInput2.js +122 -0
  72. package/lib/components/Pagination/Pagination2.js +210 -0
  73. package/lib/components/Pagination/paginationRange.js +53 -0
  74. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  75. package/lib/components/PieChart/PieChart2.js +246 -0
  76. package/lib/components/PieChart/arc.js +66 -0
  77. package/lib/components/PieChart/useArcTween.js +94 -0
  78. package/lib/components/Popover/Popover2.js +112 -0
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  80. package/lib/components/Rating/Rating2.js +186 -0
  81. package/lib/components/Resizable/Resizable2.js +236 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +356 -0
  85. package/lib/components/ScatterChart/scatter.js +83 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +218 -0
  87. package/lib/components/Select/Select2.js +153 -0
  88. package/lib/components/Sidebar/Sidebar2.js +127 -0
  89. package/lib/components/Skeleton/Skeleton2.js +91 -0
  90. package/lib/components/Slider/Slider2.js +142 -0
  91. package/lib/components/SocialLoginButton/SocialLoginButton.js +85 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +76 -0
  94. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  95. package/lib/components/SplitView/SplitView2.js +95 -0
  96. package/lib/components/Stat/Stat2.js +164 -0
  97. package/lib/components/StepList/StepList2.js +131 -0
  98. package/lib/components/Table/Table2.js +104 -0
  99. package/lib/components/Tabs/Tabs2.js +131 -0
  100. package/lib/components/TagInput/TagInput2.js +360 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +83 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +83 -0
  105. package/lib/components/Toast/Toaster.js +212 -0
  106. package/lib/components/Toast/store.js +129 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +281 -0
  109. package/lib/components/Tracker/Tracker2.js +172 -0
  110. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  111. package/lib/components/TreeView/TreeView2.js +284 -0
  112. package/lib/hooks/timing.js +55 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +80 -0
  115. package/lib/hooks/useDigitInput.js +105 -0
  116. package/lib/hooks/useDismiss.js +71 -0
  117. package/lib/hooks/useElapsed.js +83 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +61 -0
  120. package/lib/hooks/usePresence.js +60 -0
  121. package/lib/hooks/usePressToOpen.js +69 -0
  122. package/lib/hooks/useScrollLock.js +70 -0
  123. package/lib/hooks/useSelection.js +68 -0
  124. package/lib/index.js +175 -17911
  125. package/lib/primitives/AspectRatio2.js +80 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +70 -0
  128. package/lib/primitives/CopyButton2.js +85 -0
  129. package/lib/primitives/CountBadge2.js +78 -0
  130. package/lib/primitives/Countdown2.js +65 -0
  131. package/lib/primitives/Delta2.js +67 -0
  132. package/lib/primitives/Elapsed.js +62 -0
  133. package/lib/primitives/FileIcon2.js +125 -0
  134. package/lib/primitives/Flag2.js +263 -0
  135. package/lib/primitives/IconStack2.js +85 -0
  136. package/lib/primitives/IconTile2.js +68 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +53 -0
  140. package/lib/primitives/MaskedText2.js +120 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +84 -0
  143. package/lib/primitives/SearchInput2.js +84 -0
  144. package/lib/primitives/SelectorButton2.js +97 -0
  145. package/lib/primitives/Spinner2.js +98 -0
  146. package/lib/primitives/StatusIcon2.js +126 -0
  147. package/lib/primitives/Swatch2.js +79 -0
  148. package/lib/primitives/Tooltip2.js +132 -0
  149. package/lib/primitives/Typography2.js +97 -0
  150. package/lib/primitives/formatCountdown.js +51 -0
  151. package/lib/primitives/formatElapsed.js +66 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +352 -0
  155. package/lib/primitives/maskValue.js +65 -0
  156. package/lib/style.css +1 -1
  157. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  158. package/lib/types/components/index.d.ts +2 -0
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,558 @@
1
+ "use client";
2
+ const e = d;
3
+ (function(e, t) {
4
+ let n = d, r = e();
5
+ for (;;) try {
6
+ if (parseInt(n(430)) / 1 * (-parseInt(n(425)) / 2) + -parseInt(n(436)) / 3 * (-parseInt(n(515)) / 4) + parseInt(n(510)) / 5 + parseInt(n(494)) / 6 * (-parseInt(n(512)) / 7) + parseInt(n(509)) / 8 + -parseInt(n(429)) / 9 * (parseInt(n(519)) / 10) + parseInt(n(480)) / 11 == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(V, 308166);
12
+ var t = (t) => t.type ?? e(497);
13
+ function n(t) {
14
+ let n = e;
15
+ return t == null || t === "" || Array[n(539)](t) && !t[n(537)];
16
+ }
17
+ var r = {
18
+ plain: (t, n) => n == null ? String(t) : t[e(424)](n),
19
+ comma: (t, n) => t[e(433)]("ko-KR", {
20
+ minimumFractionDigits: n ?? 0,
21
+ maximumFractionDigits: n ?? 2
22
+ }),
23
+ percent: (t, n) => (t * 100)[e(433)](e(526), { maximumFractionDigits: n ?? 1 }) + "%",
24
+ won: (t, n) => t[e(433)](e(526), { maximumFractionDigits: n ?? 0 }) + "원",
25
+ usd: (t, n) => "$" + t.toLocaleString(e(416), {
26
+ minimumFractionDigits: n ?? 2,
27
+ maximumFractionDigits: n ?? 2
28
+ })
29
+ }, i = (t, n = e(439), i) => r[n](t, i), a = (t) => String(t)[e(491)](2, "0"), o = (t) => t[e(483)]() + "-" + a(t[e(452)]() + 1) + "-" + a(t[e(440)]()), s = () => o(/* @__PURE__ */ new Date());
30
+ function c(t) {
31
+ let n = e, r = /^(\d{4})-(\d{2})-(\d{2})$/[n(514)](t);
32
+ if (!r) return t;
33
+ let [, i, a, o] = r, s = Number(a) + "월 " + Number(o) + "일";
34
+ return Number(i) === (/* @__PURE__ */ new Date())[n(483)]() ? s : i + "년 " + s;
35
+ }
36
+ function l(t) {
37
+ let n = e, r = t.trim();
38
+ if (!r) return null;
39
+ let i = /* @__PURE__ */ new Date(), a = {
40
+ 오늘: 0,
41
+ 내일: 1,
42
+ 어제: -1,
43
+ 모레: 2
44
+ };
45
+ if (r in a) return o(new Date(i[n(483)](), i[n(452)](), i[n(440)]() + a[r]));
46
+ let s = /^(\d{4})[-./]\s*(\d{1,2})[-./]\s*(\d{1,2})\.?$/[n(514)](r);
47
+ return s ? u(+s[1], +s[2], +s[3]) : (s = /^(?:(\d{4})년\s*)?(\d{1,2})월\s*(\d{1,2})일?$/[n(514)](r), s ? u(s[1] ? +s[1] : i[n(483)](), +s[2], +s[3]) : (s = /^(\d{1,2})[/.-](\d{1,2})$/[n(514)](r), s ? u(i[n(483)](), +s[1], +s[2]) : null));
48
+ }
49
+ function u(t, n, r) {
50
+ let i = e, a = new Date(t, n - 1, r);
51
+ return a[i(452)]() === n - 1 && a[i(440)]() === r ? o(a) : null;
52
+ }
53
+ function d(e, t) {
54
+ e -= 416;
55
+ let n = V(), r = n[e];
56
+ d.oyiGiL === void 0 && (d.sIFOSr = function(e) {
57
+ let t = "", n = "";
58
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
59
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
60
+ return decodeURIComponent(n);
61
+ }, d.MkBJTg = {}, d.oyiGiL = !0);
62
+ let i = n[0];
63
+ d.mAeZjs !== i && (d.MkBJTg = {}, d.mAeZjs = i);
64
+ let a = d.MkBJTg[e];
65
+ return a === void 0 ? (r = d.sIFOSr(r), d.MkBJTg[e] = r) : r = a, r;
66
+ }
67
+ function f(t) {
68
+ let n = e, r = t.trim();
69
+ if (!r) return null;
70
+ let i = r[n(503)]("%"), a = Number(r[n(470)](/[,\s₩원$%]/g, ""));
71
+ return Number.isFinite(a) ? i ? a / 100 : a : null;
72
+ }
73
+ var p = [
74
+ e(449),
75
+ "1",
76
+ "y",
77
+ "yes",
78
+ "o",
79
+ "✓",
80
+ "✔",
81
+ "예",
82
+ "네",
83
+ "체크",
84
+ "x"
85
+ ], m = (t) => p[e(418)](t[e(531)]()[e(478)]());
86
+ function h(r, i) {
87
+ let a = e;
88
+ if (n(i)) return "";
89
+ switch (t(r)) {
90
+ case a(529): return i ? "TRUE" : a(485);
91
+ case a(472): return i[a(499)](", ");
92
+ case a(528): return a(528), String(i);
93
+ default: return String(i);
94
+ }
95
+ }
96
+ function g(r, a) {
97
+ let o = e;
98
+ if (n(a)) return "";
99
+ switch (t(r)) {
100
+ case o(528): return typeof a === o(528) ? i(a, r[o(486)], r[o(466)]) : String(a);
101
+ case o(441): return c(String(a));
102
+ default: return h(r, a);
103
+ }
104
+ }
105
+ var _ = [
106
+ e(506),
107
+ e(476),
108
+ e(437),
109
+ "danger",
110
+ e(448),
111
+ e(445)
112
+ ];
113
+ function v(n, r) {
114
+ let i = e, a = r[i(531)]();
115
+ switch (t(n)) {
116
+ case "number": {
117
+ if (!a) return {
118
+ ok: !0,
119
+ value: null
120
+ };
121
+ let e = f(a);
122
+ return e == null ? {
123
+ ok: !1,
124
+ error: i(541)
125
+ } : {
126
+ ok: !0,
127
+ value: e
128
+ };
129
+ }
130
+ case i(529): return {
131
+ ok: !0,
132
+ value: m(a)
133
+ };
134
+ case "date": {
135
+ if (!a) return {
136
+ ok: !0,
137
+ value: null
138
+ };
139
+ let e = l(a);
140
+ return e ? {
141
+ ok: !0,
142
+ value: e
143
+ } : {
144
+ ok: !1,
145
+ error: "날짜 형식이 아니에요 (예: 10월 25일)"
146
+ };
147
+ }
148
+ case i(507):
149
+ case "multiSelect": {
150
+ let e = (t(n) === i(507) ? [a] : a[i(468)](/[,\n]/))[i(532)]((e) => e[i(531)]())[i(460)](Boolean), r = n[i(540)] ?? [], o = [], s = [];
151
+ for (let t of e) {
152
+ let e = r[i(501)]((e) => e[i(432)][i(478)]() === t[i(478)]()) ?? o[i(501)]((e) => e[i(432)] === t);
153
+ if (e) s.push(e.label);
154
+ else {
155
+ if (n.creatable === !1) return {
156
+ ok: !1,
157
+ error: "‘" + t + i(482)
158
+ };
159
+ o[i(446)]({
160
+ label: t,
161
+ tone: _[(r[i(537)] + o.length) % _.length]
162
+ }), s[i(446)](t);
163
+ }
164
+ }
165
+ return {
166
+ ok: !0,
167
+ value: t(n) === i(507) ? s[0] ?? null : [...new Set(s)],
168
+ newOptions: o[i(537)] ? o : void 0
169
+ };
170
+ }
171
+ default: return {
172
+ ok: !0,
173
+ value: a ? r : null
174
+ };
175
+ }
176
+ }
177
+ var y = (e = []) => _[e.length % _.length];
178
+ function b(t, r, i) {
179
+ let a = e;
180
+ if (n(i)) return r.type !== a(529) && null;
181
+ let o = v(r, h(t, i));
182
+ return o.ok ? o[a(417)] : null;
183
+ }
184
+ function x(t, n, r = []) {
185
+ let i = e, a = [...r];
186
+ for (let e of t) {
187
+ let t = e[n];
188
+ for (let e of Array.isArray(t) ? t : t == null || t === "" ? [] : [String(t)]) a[i(496)]((t) => t.label === e) || a[i(446)]({
189
+ label: e,
190
+ tone: y(a)
191
+ });
192
+ }
193
+ return a;
194
+ }
195
+ var S = {
196
+ text: [
197
+ e(464),
198
+ e(467),
199
+ "is",
200
+ e(538),
201
+ e(458),
202
+ "endsWith",
203
+ e(469),
204
+ "notEmpty"
205
+ ],
206
+ url: [
207
+ e(464),
208
+ e(467),
209
+ "is",
210
+ e(538),
211
+ e(469),
212
+ e(479)
213
+ ],
214
+ number: [
215
+ "is",
216
+ "isNot",
217
+ "gt",
218
+ "lt",
219
+ e(520),
220
+ "lte",
221
+ e(469),
222
+ "notEmpty"
223
+ ],
224
+ select: [
225
+ "is",
226
+ e(538),
227
+ e(469),
228
+ "notEmpty"
229
+ ],
230
+ multiSelect: [
231
+ e(464),
232
+ e(467),
233
+ "empty",
234
+ e(479)
235
+ ],
236
+ checkbox: [e(536), e(542)],
237
+ date: [
238
+ "is",
239
+ "before",
240
+ e(442),
241
+ e(469),
242
+ "notEmpty"
243
+ ]
244
+ }, C = {
245
+ contains: "포함",
246
+ notContains: e(500),
247
+ is: "같음",
248
+ isNot: e(502),
249
+ startsWith: "시작",
250
+ endsWith: "끝",
251
+ gt: ">",
252
+ lt: "<",
253
+ gte: "≥",
254
+ lte: "≤",
255
+ before: "이전",
256
+ after: "이후",
257
+ checked: e(524),
258
+ unchecked: e(489),
259
+ empty: e(534),
260
+ notEmpty: e(504)
261
+ }, w = (t) => ![
262
+ e(536),
263
+ e(542),
264
+ e(469),
265
+ e(479)
266
+ ][e(418)](t);
267
+ function T(r, i, a) {
268
+ let o = e, s = t(r), c = (i[o(417)] ?? "")[o(531)]();
269
+ switch (i.op) {
270
+ case "empty": return n(a);
271
+ case "notEmpty": return !n(a);
272
+ case "checked": return !!a;
273
+ case o(542): return !a;
274
+ }
275
+ if (!c) return !0;
276
+ if (s === "number") {
277
+ let e = f(c);
278
+ return e == null ? !0 : typeof a === o(528) ? {
279
+ is: a === e,
280
+ isNot: a !== e,
281
+ gt: a > e,
282
+ lt: a < e,
283
+ gte: a >= e,
284
+ lte: a <= e
285
+ }[i.op] ?? !0 : !1;
286
+ }
287
+ if (s === "date") {
288
+ let e = l(c) ?? c;
289
+ return typeof a === o(527) ? i.op === "before" ? a < e : i.op === "after" ? a > e : a === e : !1;
290
+ }
291
+ if (s === o(472)) {
292
+ let e = Array[o(539)](a) && a.includes(c);
293
+ return i.op === o(467) ? !e : e;
294
+ }
295
+ let u = h(r, a)[o(478)](), d = c[o(478)]();
296
+ switch (i.op) {
297
+ case "contains": return u.includes(d);
298
+ case o(467): return !u[o(418)](d);
299
+ case "is": return u === d;
300
+ case o(538): return u !== d;
301
+ case o(458): return u[o(458)](d);
302
+ case "endsWith": return u[o(503)](d);
303
+ default: return !0;
304
+ }
305
+ }
306
+ var E = new Intl.Collator("ko", {
307
+ numeric: !0,
308
+ sensitivity: e(523)
309
+ });
310
+ function D(n, r, i) {
311
+ let a = e;
312
+ switch (t(n)) {
313
+ case a(528): return r - i;
314
+ case a(529): return Number(!!r) - Number(!!i);
315
+ case a(507):
316
+ case "multiSelect": {
317
+ let e = (e) => {
318
+ let t = a, r = Array[t(539)](e) ? e[0] : e, i = n.options?.[t(428)]((e) => e[t(432)] === r) ?? -1;
319
+ return i < 0 ? 2 ** 53 - 1 : i;
320
+ };
321
+ return e(r) - e(i);
322
+ }
323
+ default: return E[a(457)](String(r), String(i));
324
+ }
325
+ }
326
+ function O(t, r, i) {
327
+ let a = e, o = new Map(r.map((e) => [e[a(487)], e])), s = i[a(498)].filter((e) => o[a(454)](e[a(487)])), c = i[a(435)][a(531)]()[a(478)](), l = r[a(460)]((e) => !e.hidden), u = t[a(460)]((e) => {
328
+ let t = a;
329
+ if (s[t(537)]) {
330
+ let n = s[t(532)]((n) => T(o[t(455)](n.key), n, e[n.key]));
331
+ if (i.filterMode === t(461) ? !n.every(Boolean) : !n[t(496)](Boolean)) return !1;
332
+ }
333
+ return !c || l[t(496)]((n) => g(n, e[n.key])[t(478)]()[t(418)](c));
334
+ }), d = i[a(443)].flatMap((e) => {
335
+ let t = o.get(e.key);
336
+ return t ? [{
337
+ ...e,
338
+ column: t
339
+ }] : [];
340
+ });
341
+ return d.length && (u = u[a(532)]((e, t) => ({
342
+ row: e,
343
+ i: t
344
+ }))[a(505)]((e, t) => {
345
+ let r = a;
346
+ for (let i of d) {
347
+ let a = e[r(450)][i[r(487)]], o = t.row[i[r(487)]], s = n(a) && i[r(447)][r(427)] !== "checkbox", c = n(o) && i[r(447)][r(427)] !== r(529);
348
+ if (s || c) {
349
+ if (s && c) continue;
350
+ return s ? 1 : -1;
351
+ }
352
+ let l = D(i[r(447)], a, o);
353
+ if (l) return i[r(474)] === r(481) ? l : -l;
354
+ }
355
+ return e.i - t.i;
356
+ })[a(532)]((e) => e[a(450)])), u;
357
+ }
358
+ function k(r, i) {
359
+ let a = e, o = i, s = t(o), c = /* @__PURE__ */ new Map(), l = (e, t, n, r) => {
360
+ let i = d;
361
+ return c[i(454)](e) || c[i(516)](e, {
362
+ key: e,
363
+ label: t,
364
+ value: n,
365
+ tone: r,
366
+ rows: []
367
+ }), c.get(e);
368
+ };
369
+ if (s === a(507)) for (let e of o[a(540)] ?? []) l(e[a(432)], e[a(432)], e[a(432)], e.tone ?? a(445));
370
+ s === a(529) && (l("true", "체크됨", !0), l(a(420), a(489), !1));
371
+ for (let e of r) {
372
+ let t = e[o[a(487)]];
373
+ if (s === a(529)) l(String(!!t), "", !!t)[a(473)][a(446)](e);
374
+ else if (n(t)) l("∅", o.name + a(521), null)[a(473)].push(e);
375
+ else {
376
+ let n = Array[a(539)](t) ? t[0] : t, r = String(n), i = s === "select" || s === a(472) ? o.options?.find((e) => e[a(432)] === r)?.[a(456)] ?? "neutral" : void 0;
377
+ l(r, g({
378
+ ...o,
379
+ type: s === a(472) ? a(507) : s
380
+ }, n), s === a(472) ? [n] : n, i)[a(473)].push(e);
381
+ }
382
+ }
383
+ let u = [...c.values()], f = u[a(428)]((e) => e[a(487)] === "∅");
384
+ return f >= 0 && u[a(446)](...u.splice(f, 1)), u;
385
+ }
386
+ var A = {
387
+ none: "없음",
388
+ count: e(453),
389
+ empty: e(530),
390
+ filled: e(488),
391
+ percentEmpty: e(459),
392
+ percentFilled: "값 비율",
393
+ unique: "고유 값 세기",
394
+ sum: "합계",
395
+ avg: "평균",
396
+ median: e(419),
397
+ min: e(511),
398
+ max: e(517),
399
+ range: "범위",
400
+ checked: e(524),
401
+ unchecked: e(489),
402
+ percentChecked: e(543),
403
+ earliest: e(533),
404
+ latest: e(535)
405
+ }, j = {
406
+ count: "개수",
407
+ empty: e(426),
408
+ filled: "값",
409
+ percentEmpty: e(426),
410
+ percentFilled: "값",
411
+ unique: "고유",
412
+ sum: "합계",
413
+ avg: "평균",
414
+ median: e(419),
415
+ min: "최소",
416
+ max: "최대",
417
+ range: "범위",
418
+ checked: "체크",
419
+ unchecked: "미체크",
420
+ percentChecked: "체크",
421
+ earliest: "최초",
422
+ latest: "최근"
423
+ };
424
+ function M(t) {
425
+ let n = e, r = [
426
+ n(522),
427
+ "count",
428
+ n(469),
429
+ "filled",
430
+ n(490),
431
+ n(423),
432
+ n(463)
433
+ ];
434
+ return t === "number" ? [
435
+ ...r,
436
+ n(495),
437
+ n(525),
438
+ n(462),
439
+ n(475),
440
+ "max",
441
+ n(451)
442
+ ] : t === n(529) ? [
443
+ "none",
444
+ n(492),
445
+ n(536),
446
+ n(542),
447
+ n(513)
448
+ ] : t === n(441) ? [
449
+ ...r,
450
+ n(477),
451
+ n(465),
452
+ n(451)
453
+ ] : r;
454
+ }
455
+ function N(r, a, o) {
456
+ let s = e;
457
+ if (o === s(522)) return null;
458
+ let l = a[s(532)]((e) => e[r[s(487)]]), u = l[s(460)]((e) => !n(e)), d = u.filter((e) => typeof e === s(528)).sort((e, t) => e - t), f = u.filter((e) => typeof e == "string")[s(505)](), p = (e) => (a[s(537)] ? Math[s(421)](e / a[s(537)] * 100) : 0) + "%", m = (e) => i(e, r.format, r[s(466)]), h = (e) => e.toLocaleString(s(526)), g = j[o] ?? "", _ = l[s(460)](Boolean)[s(537)], v;
459
+ switch (o) {
460
+ case s(492):
461
+ v = h(a.length);
462
+ break;
463
+ case "empty":
464
+ v = h(a[s(537)] - u[s(537)]);
465
+ break;
466
+ case s(431):
467
+ v = h(u[s(537)]);
468
+ break;
469
+ case "percentEmpty":
470
+ v = p(a[s(537)] - u[s(537)]);
471
+ break;
472
+ case s(423):
473
+ v = p(u[s(537)]);
474
+ break;
475
+ case s(463):
476
+ v = h(new Set(u[s(493)]((e) => Array[s(539)](e) ? e : [String(e)])).size);
477
+ break;
478
+ case s(495):
479
+ v = m(d[s(422)]((e, t) => e + t, 0));
480
+ break;
481
+ case s(525):
482
+ v = d.length ? m(d[s(422)]((e, t) => e + t, 0) / d[s(537)]) : "—";
483
+ break;
484
+ case s(462): {
485
+ let e = d.length >> 1;
486
+ v = d.length ? m(d.length % 2 ? d[e] : (d[e - 1] + d[e]) / 2) : "—";
487
+ break;
488
+ }
489
+ case "min":
490
+ v = d.length ? m(d[0]) : "—";
491
+ break;
492
+ case s(434):
493
+ v = d[s(537)] ? m(d[d[s(537)] - 1]) : "—";
494
+ break;
495
+ case "range":
496
+ v = t(r) === s(441) ? (f[s(537)] ? Math[s(421)]((Date[s(484)](f[f[s(537)] - 1]) - Date[s(484)](f[0])) / 864e5) : 0) + "일" : d[s(537)] ? m(d[d[s(537)] - 1] - d[0]) : "—";
497
+ break;
498
+ case s(536):
499
+ v = h(_);
500
+ break;
501
+ case s(542):
502
+ v = h(a.length - _);
503
+ break;
504
+ case s(513):
505
+ v = p(_);
506
+ break;
507
+ case s(477):
508
+ v = f.length ? c(f[0]) : "—";
509
+ break;
510
+ case s(465): v = f[s(537)] ? c(f[f.length - 1]) : "—";
511
+ }
512
+ return {
513
+ label: g,
514
+ value: v
515
+ };
516
+ }
517
+ function P(t) {
518
+ let n = e;
519
+ return t[n(532)]((e) => e[n(532)]((e) => /[\t\n"]/[n(544)](e) ? "\"" + e[n(470)](/"/g, "\"\"") + "\"" : e).join(" "))[n(499)]("\n");
520
+ }
521
+ function F(t) {
522
+ let n = e, r = [], i = [], a = "", o = !1, s = t[n(470)](/\r\n?/g, "\n")[n(470)](/\n$/, "");
523
+ for (let e = 0; e < s.length; e++) {
524
+ let t = s[e];
525
+ o ? t === "\"" && s[e + 1] === "\"" ? (a += "\"", e++) : t === "\"" ? o = !1 : a += t : t === "\"" && a === "" ? o = !0 : t === " " ? (i[n(446)](a), a = "") : t === "\n" ? (i[n(446)](a), r[n(446)](i), i = [], a = "") : a += t;
526
+ }
527
+ return i.push(a), r[n(446)](i), r;
528
+ }
529
+ function I(t, n) {
530
+ let r = e, i = (e) => /[",\n]/[r(544)](e) ? "\"" + e[r(470)](/"/g, "\"\"") + "\"" : e, a = [t[r(532)]((e) => i(e[r(438)]))[r(499)](",")];
531
+ for (let e of n) a[r(446)](t[r(532)]((t) => i(h(t, e[t.key])))[r(499)](","));
532
+ return a[r(499)]("\n");
533
+ }
534
+ function L(t, n) {
535
+ let r = e, i = t[r(444)]((e) => typeof e === r(528)) ? t : null;
536
+ if (i && i[r(537)] >= 2) {
537
+ let e = i[1] - i[0];
538
+ if (i.every((t, n) => n === 0 || Math[r(471)](t - i[n - 1] - e) < 1e-9)) {
539
+ let t = i[i[r(537)] - 1];
540
+ return Array[r(508)]({ length: n }, (n, i) => +(t + e * (i + 1))[r(424)](10));
541
+ }
542
+ }
543
+ return Array[r(508)]({ length: n }, (e, n) => {
544
+ let i = r, a = t[n % t.length];
545
+ return Array[i(539)](a) ? [...a] : a;
546
+ });
547
+ }
548
+ var R = (t, n) => {
549
+ let r = e, i = n[r(531)]()[r(478)]();
550
+ return i ? t[r(460)]((e) => e.label[r(478)]()[r(418)](i)) : t;
551
+ }, z = 0, B = (t = e(450)) => t + "-" + Date[e(518)]().toString(36) + "-" + (++z).toString(36);
552
+ function V() {
553
+ let e = /* @__PURE__ */ "67MiioY5Ua.DhLWzq.zMLUzeLUzgv4.nJeYEMfWsKTQ.mtn3wMD4CLO.zMLSBgvK.BgfIzwW.Dg9mB2nHBgvtDhjPBMC.Bwf4.C2vHCMnO.mti1mdf5whHWAui.D2fYBMLUzW.BMfTzq.y29TBwe.z2v0rgf0zq.zgf0zq.ywz0zxi.C29YDhm.zxzLCNK.BMv1DhjHBa.ChvZAa.y29SDw1U.Aw5MBW.Dhj1zq.CM93.CMfUz2u.z2v0tw9UDgG.66QO65gqioYeUoQ4Sa.AgfZ.z2v0.Dg9Uzq.y29TCgfYzq.C3rHCNrZv2L0Aa.67MiioY5UcdRUytSNkG.zMLSDgvY.yw5K.BwvKAwfU.Dw5PCxvL.y29UDgfPBNm.Bgf0zxn0.zgvJAw1HBhm.BM90q29UDgfPBNm.C3bSAxq.zw1WDhK.CMvWBgfJzq.ywjZ.BxvSDgLtzwXLy3q.CM93CW.zgLY.BwLU.C3vJy2vZCW.zwfYBgLLC3q.Dg9mB3DLCKnHC2u.BM90rw1WDhK.mti0mJa3mtz6C0nTBK8.yxnJ.4Ocz7j2akoUkLcKG7jEg64QuioYeOo2dNEYNGoYyIoYALa.z2v0rNvSBfLLyxi.CgfYC2u.rKfmu0u.zM9YBwf0.A2v5.6RcsioYeUoQ4Sa.7lk07ygSioYvIcdRKkG.CgvYy2vUDevTChr5.CgfKu3rHCNq.y291BNq.zMXHDe1HCa.ndyWohfRB1HrsG.C3vT.C29Tzq.Dgv4Da.zMLSDgvYCW.AM9PBG.7y+S7zwO7zwy7kEaioYvIUYDJa.zMLUza.6Rcz7kEaioYvIUYDJa.zw5KC1DPDgG.67Me7jA0ioYEIoYNGcdSLyRSNyW.C29YDa.ywnJzw50.C2vSzwn0.zNjVBq.mteWmdm1mNzjvKnxBW.mZq2ode1rLHTr2Dp.7lwC7iAF6Rcs.mZeWmwLSB1LpzG.CgvYy2vUDenOzwnRzwq.zxHLyW.mZe2sfrqtxry.C2v0.7lwC64Yt6Rcs.BM93.ntK1nJbWC2fMAxK.z3rL.ioYxHUYDJa.BM9Uzq.yMfZzq.7lk07ygS65cO.yxzN.A28Ts1i.C3rYAw5N.BNvTyMvY.y2HLy2TIB3G.67MiioY5UcdSHlJQUla.DhjPBq.BwfW.6Rca7j6LioYDToULUcdRGQdSP5W.67Me7jA0ioYEIoYDJa.6Rca7j6LioUkPUYDGcdRGQdSP5W.y2HLy2TLza.BgvUz3rO.AxnoB3q.AxnbCNjHEq.B3b0Aw9UCW.7iIR7j6q66w8ioYEHEUGPE2vMoYeUoYALa.Dw5JAgvJA2vK.7lk07ygSioU5HoYCQa.DgvZDa.zw4Tvvm.DMfSDwu.Aw5JBhvKzxm.7ksr7jwz6Rcs.zMfSC2u.CM91BMq.CMvKDwnL.CgvYy2vUDezPBgXLza.Dg9gAxHLza.otqXmZjfvMTcsKi".split(".");
554
+ return V = function() {
555
+ return e;
556
+ }, V();
557
+ }
558
+ export { A as AGGREGATE_LABEL, S as FILTER_OPS, C as FILTER_OP_LABEL, N as aggregate, M as aggregatesFor, b as convertValue, g as displayText, L as fillSeries, R as filterOptions, c as formatDate, i as formatNumber, k as groupRows, n as isEmptyValue, B as newId, y as nextOptionTone, w as opNeedsValue, x as optionsFromValues, m as parseBoolean, l as parseDate, f as parseNumber, F as parseTSV, v as parseValue, I as toCSV, o as toISODate, P as toTSV, s as todayISO, t as typeOf, h as valueToText, O as viewRows };