react-semaphor 0.1.555 → 0.1.556

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 (97) hide show
  1. package/dist/analytics-protocol/index.js +10 -10
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +438 -455
  5. package/dist/briefings/index.js +6 -6
  6. package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
  7. package/dist/chunks/{assistant-chat-8NZP6m-u.js → assistant-chat-C7Acww1T.js} +15 -15
  8. package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-7iZErWnR.js} +3 -3
  9. package/dist/chunks/comparison-window-caption-BseG5aOZ.js +1221 -0
  10. package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
  11. package/dist/chunks/{custom-visual-inputs-Gw-Ggg3O.js → custom-visual-inputs-ChuKjx27.js} +31 -33
  12. package/dist/chunks/{dashboard-Ds68ckO3.js → dashboard-BU6rE5kV.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-DlTr-VGc.js → dashboard-briefing-launcher-qrYd2zkN.js} +15 -15
  14. package/dist/chunks/{dashboard-controls-oNXJZN6x.js → dashboard-controls-BsapXI2H.js} +14 -14
  15. package/dist/chunks/{dashboard-json-CW7Q_efH.js → dashboard-json-CJqPqYnI.js} +5 -5
  16. package/dist/chunks/{document-dashboard-inputs-C21mL3ib.js → document-dashboard-inputs-BNSprf5_.js} +12 -12
  17. package/dist/chunks/{edit-dashboard-visual-BnnT_oKR.js → edit-dashboard-visual-CjAdV-WG.js} +4603 -4687
  18. package/dist/chunks/{filter-reach-copy-DlNPHbE-.js → filter-reach-copy-BTrqtFkh.js} +917 -987
  19. package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CJTJDCym.js} +4 -4
  20. package/dist/chunks/{global-date-filter-utils-7OboTgrM.js → global-date-filter-utils-CTVf3dG3.js} +2904 -3102
  21. package/dist/chunks/{index-B2k6KtUN.js → index-B_vIRa-q.js} +12 -19
  22. package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
  23. package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-Cg0ioFGQ.js} +21 -21
  24. package/dist/chunks/{matrix-card-D9bsdAye.js → matrix-card-yYibXSw1.js} +3 -3
  25. package/dist/chunks/{matrix-formatter-K2OVPJQI.js → matrix-formatter-C2kjsCDf.js} +44 -44
  26. package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-DEEauKXC.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-C1G6AJNh.js} +33 -33
  28. package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-BfcmwxM1.js} +4 -4
  29. package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
  30. package/dist/chunks/pivot-result-contract-expectations-fKBHFPfz.js +56 -0
  31. package/dist/chunks/pivot-result-identity-CWi5WrrY.js +77 -0
  32. package/dist/chunks/{raw-temporal-contract-WuXA8jBP.js → raw-temporal-contract-CjHaUIsE.js} +1 -1
  33. package/dist/chunks/{raw-temporal-presentation-CivONfcO.js → raw-temporal-presentation-DWzLIHc3.js} +8 -8
  34. package/dist/chunks/{report-preferences-dialog-D_KyuEFx.js → report-preferences-dialog-D_wrbIQt.js} +17 -17
  35. package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-BgM-iNWB.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CIm9A8_j.js → resolve-dashboard-input-context-Df8V5QHW.js} +1415 -1567
  37. package/dist/chunks/{saved-dashboard-context-akb9JfOL.js → saved-dashboard-context-VvXI6r03.js} +9 -9
  38. package/dist/chunks/{selection-reducer-yw_JgICP.js → selection-reducer-By4CSmEF.js} +1 -1
  39. package/dist/chunks/{semaphor-ready-indicator-Ba7dwP5_.js → semaphor-ready-indicator-fejZmdq9.js} +49593 -56071
  40. package/dist/chunks/{shelf-drop-preview-context-5rg3pJHW.js → shelf-drop-preview-context-BuTCXe-S.js} +7 -7
  41. package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-B46EZIzX.js} +1 -1
  42. package/dist/chunks/{switch-B-UTI6v-.js → switch-Bq92UGId.js} +3 -3
  43. package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-noKl8-en.js} +1 -1
  44. package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-PpINOzw8.js} +3 -3
  45. package/dist/chunks/{temporal-bucket-C4rqmwaQ.js → temporal-bucket-DzyadxVY.js} +53 -53
  46. package/dist/chunks/temporal-input-presentation-CJWS4d0L.js +879 -0
  47. package/dist/chunks/{token-types-DYECHYGH.js → token-types--0bgRCaO.js} +1 -1
  48. package/dist/chunks/{use-create-flow-overlay-state-BHNs0wl7.js → use-create-flow-overlay-state-Cz-ve64t.js} +7 -7
  49. package/dist/chunks/{validators-ClKLGDGZ.js → validators-CZo_H4E6.js} +305 -307
  50. package/dist/dashboard/index.js +2 -2
  51. package/dist/dashboard-authoring/index.js +60 -60
  52. package/dist/data-app-sdk/index.js +6 -6
  53. package/dist/data-app-sdk-adapters/index.js +3 -3
  54. package/dist/data-app-sdk-validation/index.js +6 -6
  55. package/dist/format-utils/index.js +207 -223
  56. package/dist/index.js +96 -97
  57. package/dist/layouts/index.js +1 -1
  58. package/dist/pdf-export-policy/index.js +9 -11
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/brand-studio/brand-studio-draft.d.ts +0 -3
  63. package/dist/types/brand-studio/index.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
  65. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
  66. package/dist/types/index.js +27 -28
  67. package/dist/types/lib/api/exports-api.d.ts +1 -1
  68. package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
  69. package/dist/types/lib/charts/types.d.ts +2 -2
  70. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
  71. package/dist/types/lib/document/document-edits.d.ts +1 -1
  72. package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
  73. package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
  74. package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
  75. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
  76. package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
  77. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
  78. package/dist/types/lib/types/common-types.d.ts +0 -7
  79. package/dist/types/lib/types/explorer-types.d.ts +1 -14
  80. package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
  81. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
  82. package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
  83. package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
  84. package/dist/types/shared/format-utils/index.d.ts +0 -2
  85. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
  86. package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
  87. package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
  88. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
  89. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
  90. package/package.json +2 -2
  91. package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
  92. package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
  93. package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
  94. package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
  95. package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
  96. package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
  97. package/dist/types/shared/format-utils/pivot-result-lifecycle.d.ts +0 -55
@@ -20,8 +20,6 @@ function bt(n) {
20
20
  }
21
21
  const gt = [
22
22
  "table",
23
- "pivotTable",
24
- "aggregateTable",
25
23
  "matrixTable",
26
24
  "detailTable"
27
25
  ], Mt = new Set(gt);
@@ -30,7 +28,7 @@ function kt(n) {
30
28
  }
31
29
  function vt(n) {
32
30
  var t, i;
33
- return ((t = n == null ? void 0 : n.cards) == null ? void 0 : t.find((e) => e.id === n.activeCardId)) ?? ((i = n == null ? void 0 : n.cards) == null ? void 0 : i[0]);
31
+ return ((t = n == null ? void 0 : n.cards) == null ? void 0 : t.find((o) => o.id === n.activeCardId)) ?? ((i = n == null ? void 0 : n.cards) == null ? void 0 : i[0]);
34
32
  }
35
33
  function K(n) {
36
34
  var i;
@@ -53,12 +51,12 @@ const L = {
53
51
  };
54
52
  function Y(n) {
55
53
  if (n <= 0) return [];
56
- const t = Math.ceil(n / 4), i = Math.floor(n / t), e = n % t;
57
- return Array.from({ length: t }, (o, r) => r < e ? i + 1 : i).flatMap(
58
- (o) => Array.from({ length: o }, () => 48 / o)
54
+ const t = Math.ceil(n / 4), i = Math.floor(n / t), o = n % t;
55
+ return Array.from({ length: t }, (e, r) => r < o ? i + 1 : i).flatMap(
56
+ (e) => Array.from({ length: e }, () => 48 / e)
59
57
  );
60
58
  }
61
- const et = {
59
+ const ot = {
62
60
  full: 48,
63
61
  half: 24,
64
62
  third: 16,
@@ -66,9 +64,9 @@ const et = {
66
64
  }, Wt = ["full", "half", "third", "quarter"];
67
65
  function _t(n) {
68
66
  let t = "full", i = 1 / 0;
69
- for (const e of Wt) {
70
- const o = Math.abs(et[e] - n);
71
- o < i && (t = e, i = o);
67
+ for (const o of Wt) {
68
+ const e = Math.abs(ot[o] - n);
69
+ e < i && (t = o, i = e);
72
70
  }
73
71
  return t;
74
72
  }
@@ -86,35 +84,35 @@ function Q(n, t) {
86
84
  function Ht(n) {
87
85
  return n.slice().sort((t, i) => t.y > i.y || t.y === i.y && t.x > i.x ? 1 : t.y === i.y && t.x === i.x ? 0 : -1);
88
86
  }
89
- function ot(n, t, i) {
87
+ function et(n, t, i) {
90
88
  t.y += 1;
91
- const e = n.findIndex((o) => o.i === t.i);
92
- for (let o = e + 1; o < n.length; o += 1) {
93
- const r = n[o];
89
+ const o = n.findIndex((e) => e.i === t.i);
90
+ for (let e = o + 1; e < n.length; e += 1) {
91
+ const r = n[e];
94
92
  if (!r.static) {
95
93
  if (r.y > t.y + t.h) break;
96
- N(t, r) && ot(n, r, i + t.h);
94
+ N(t, r) && et(n, r, i + t.h);
97
95
  }
98
96
  }
99
97
  t.y = i;
100
98
  }
101
99
  function zt(n, t, i) {
102
100
  for (t.y = Math.min(I(n), t.y); t.y > 0 && !Q(n, t); ) t.y -= 1;
103
- let e;
104
- for (; e = Q(n, t); )
105
- ot(i, t, e.y + e.h);
101
+ let o;
102
+ for (; o = Q(n, t); )
103
+ et(i, t, o.y + o.h);
106
104
  return t.y = Math.max(t.y, 0), t.x = Math.max(t.x, 0), t;
107
105
  }
108
106
  function M(n) {
109
- const t = n.map((r) => ({ ...r })), i = t.filter((r) => r.static), e = Ht(t), o = /* @__PURE__ */ new Map();
110
- for (const r of e) {
107
+ const t = n.map((r) => ({ ...r })), i = t.filter((r) => r.static), o = Ht(t), e = /* @__PURE__ */ new Map();
108
+ for (const r of o) {
111
109
  let s = { ...r };
112
- s.static || (s = zt(i, s, e), i.push(s)), o.set(r, s);
110
+ s.static || (s = zt(i, s, o), i.push(s)), e.set(r, s);
113
111
  }
114
- return t.map((r) => o.get(r));
112
+ return t.map((r) => e.get(r));
115
113
  }
116
114
  function It(n) {
117
- return M(n).every((i, e) => i.y === n[e].y && i.x === n[e].x);
115
+ return M(n).every((i, o) => i.y === n[o].y && i.x === n[o].x);
118
116
  }
119
117
  function Ot(n) {
120
118
  for (let t = 0; t < n.length; t += 1)
@@ -123,42 +121,42 @@ function Ot(n) {
123
121
  return !1;
124
122
  }
125
123
  function B(n, t) {
126
- const i = (e) => t.get(e.i) ?? Number.MAX_SAFE_INTEGER;
127
- return n.slice().sort((e, o) => e.y - o.y || e.x - o.x || i(e) - i(o));
124
+ const i = (o) => t.get(o.i) ?? Number.MAX_SAFE_INTEGER;
125
+ return n.slice().sort((o, e) => o.y - e.y || o.x - e.x || i(o) - i(e));
128
126
  }
129
127
  function R(n) {
130
128
  const t = [];
131
- let i = [], e = 0;
132
- for (const o of n) {
129
+ let i = [], o = 0;
130
+ for (const e of n) {
133
131
  const r = i[i.length - 1];
134
- if (r && o.x >= r.x + r.w && e + o.w <= g) {
135
- i.push(o), e += o.w;
132
+ if (r && e.x >= r.x + r.w && o + e.w <= g) {
133
+ i.push(e), o += e.w;
136
134
  continue;
137
135
  }
138
- i.length && t.push(i), i = [o], e = o.w;
136
+ i.length && t.push(i), i = [e], o = e.w;
139
137
  }
140
138
  return i.length && t.push(i), t;
141
139
  }
142
140
  function At(n) {
143
141
  return new Map(n.map((t, i) => [t, i]));
144
142
  }
145
- function Et(n, t, i, e) {
146
- const o = (c) => t.get(c) ?? "chart", r = B(n, i).map((c) => c.i), s = r.find((c) => o(c) === "text"), a = e ? r : [
143
+ function Et(n, t, i, o) {
144
+ const e = (c) => t.get(c) ?? "chart", r = B(n, i).map((c) => c.i), s = r.find((c) => e(c) === "text"), a = o ? r : [
147
145
  ...s ? [s] : [],
148
- ...r.filter((c) => o(c) === "kpi"),
149
- ...r.filter((c) => o(c) === "chart"),
150
- ...r.filter((c) => o(c) === "table"),
151
- ...r.filter((c) => o(c) === "text" && c !== s)
146
+ ...r.filter((c) => e(c) === "kpi"),
147
+ ...r.filter((c) => e(c) === "chart"),
148
+ ...r.filter((c) => e(c) === "table"),
149
+ ...r.filter((c) => e(c) === "text" && c !== s)
152
150
  ], f = (c) => {
153
151
  const p = a[c];
154
- if (!e) return a.filter((k) => o(k) === o(p));
152
+ if (!o) return a.filter((k) => e(k) === e(p));
155
153
  let w = c;
156
- for (; w > 0 && o(a[w - 1]) === o(p); ) w -= 1;
154
+ for (; w > 0 && e(a[w - 1]) === e(p); ) w -= 1;
157
155
  let h = c;
158
- for (; h < a.length - 1 && o(a[h + 1]) === o(p); ) h += 1;
156
+ for (; h < a.length - 1 && e(a[h + 1]) === e(p); ) h += 1;
159
157
  return a.slice(w, h + 1);
160
158
  }, x = (c) => {
161
- const p = a[c], w = o(p);
159
+ const p = a[c], w = e(p);
162
160
  if (w === "table") return g;
163
161
  if (w === "text") return p === s ? g : g / 2;
164
162
  const h = f(c);
@@ -168,7 +166,7 @@ function Et(n, t, i, e) {
168
166
  };
169
167
  let l = 0, u = 0, d = 0;
170
168
  const m = a.map((c, p) => {
171
- const w = L[o(c)], h = Math.min(x(p), g);
169
+ const w = L[e(c)], h = Math.min(x(p), g);
172
170
  l > 0 && l + h > g && (l = 0, u += d, d = 0);
173
171
  const k = { i: c, x: l, y: u, w: h, h: w.h, minW: Math.min(w.minW, g), minH: w.minH };
174
172
  return l += h, d = Math.max(d, w.h), k;
@@ -178,85 +176,85 @@ function Et(n, t, i, e) {
178
176
  function S(n) {
179
177
  return Math.floor(n + 0.5);
180
178
  }
181
- function rt(n, t, i, e, o, r) {
182
- const s = v.columns[t], a = { i: n.i, x: i, y: e, w: o, h: n.h }, f = r ?? n.minW;
183
- return f !== void 0 && (a.minW = Math.max(1, Math.min(f, o, s))), n.minH !== void 0 && (a.minH = n.minH), n.maxW !== void 0 && (a.maxW = Math.max(o, Math.min(n.maxW, s))), n.maxH !== void 0 && (a.maxH = n.maxH), n.static !== void 0 && (a.static = n.static), n.isResizable !== void 0 && (a.isResizable = n.isResizable), n.isDraggable !== void 0 && (a.isDraggable = n.isDraggable), a;
179
+ function rt(n, t, i, o, e, r) {
180
+ const s = v.columns[t], a = { i: n.i, x: i, y: o, w: e, h: n.h }, f = r ?? n.minW;
181
+ return f !== void 0 && (a.minW = Math.max(1, Math.min(f, e, s))), n.minH !== void 0 && (a.minH = n.minH), n.maxW !== void 0 && (a.maxW = Math.max(e, Math.min(n.maxW, s))), n.maxH !== void 0 && (a.maxH = n.maxH), n.static !== void 0 && (a.static = n.static), n.isResizable !== void 0 && (a.isResizable = n.isResizable), n.isDraggable !== void 0 && (a.isDraggable = n.isDraggable), a;
184
182
  }
185
183
  function st(n) {
186
184
  return M(
187
185
  n.map((t) => {
188
- let i = S(t.x * 0.75), o = S((t.x + t.w) * 0.75) - i;
189
- o === 0 && (o = 1, i === 36 && (i = 35));
190
- const r = t.minW === void 0 ? void 0 : Math.min(Math.max(1, S(t.minW * 0.75)), o);
191
- return rt(t, "md", i, t.y, o, r);
186
+ let i = S(t.x * 0.75), e = S((t.x + t.w) * 0.75) - i;
187
+ e === 0 && (e = 1, i === 36 && (i = 35));
188
+ const r = t.minW === void 0 ? void 0 : Math.min(Math.max(1, S(t.minW * 0.75)), e);
189
+ return rt(t, "md", i, t.y, e, r);
192
190
  })
193
191
  );
194
192
  }
195
193
  function St(n, t) {
196
- const i = new Map(st(n).map((r) => [r.i, r])), e = new Map(t.map((r) => [r.i, r])), o = v.columns.lg;
194
+ const i = new Map(st(n).map((r) => [r.i, r])), o = new Map(t.map((r) => [r.i, r])), e = v.columns.lg;
197
195
  return n.map((r) => {
198
- const s = e.get(r.i), a = i.get(r.i);
196
+ const s = o.get(r.i), a = i.get(r.i);
199
197
  if (!s || !a) return r;
200
198
  const f = { ...r };
201
199
  if (s.x !== a.x || s.w !== a.w) {
202
- const x = Math.min(o - 1, S(s.x * 1.3333333333333333)), l = Math.min(o, Math.max(x + 1, S((s.x + s.w) * (4 / 3))));
200
+ const x = Math.min(e - 1, S(s.x * 1.3333333333333333)), l = Math.min(e, Math.max(x + 1, S((s.x + s.w) * (4 / 3))));
203
201
  f.x = x, f.w = l - x;
204
202
  }
205
203
  return (s.y !== a.y || s.h !== a.h) && (f.y = s.y, f.h = s.h), f;
206
204
  });
207
205
  }
208
206
  function j(n, t, i) {
209
- const e = /* @__PURE__ */ new Map();
210
- let o = 0;
207
+ const o = /* @__PURE__ */ new Map();
208
+ let e = 0;
211
209
  for (const r of n) {
212
210
  let s = 0;
213
211
  for (const a of r)
214
- e.set(a.source.i, rt(a.source, t, a.x, o, a.w)), s = Math.max(s, a.source.h);
215
- o += s;
212
+ o.set(a.source.i, rt(a.source, t, a.x, e, a.w)), s = Math.max(s, a.source.h);
213
+ e += s;
216
214
  }
217
- return M(i.map((r) => e.get(r.i)));
215
+ return M(i.map((r) => o.get(r.i)));
218
216
  }
219
217
  function tt(n, t, i) {
220
- const e = [];
221
- for (const o of n) {
218
+ const o = [];
219
+ for (const e of n) {
222
220
  let r;
223
221
  const s = () => {
224
- r && e.push([{ source: r, x: 0, w: t }]), r = void 0;
222
+ r && o.push([{ source: r, x: 0, w: t }]), r = void 0;
225
223
  };
226
- for (const a of o)
227
- i(a) ? (s(), e.push([{ source: a, x: 0, w: t }])) : r ? (e.push([
224
+ for (const a of e)
225
+ i(a) ? (s(), o.push([{ source: a, x: 0, w: t }])) : r ? (o.push([
228
226
  { source: r, x: 0, w: t / 2 },
229
227
  { source: a, x: t / 2, w: t / 2 }
230
228
  ]), r = void 0) : r = a;
231
229
  s();
232
230
  }
233
- return e;
231
+ return o;
234
232
  }
235
- function at(n, t, i, e) {
233
+ function at(n, t, i, o) {
236
234
  if (n === "md") return st(t);
237
- const o = v.columns[n], r = R(B(t, e)), s = (a) => i.get(a.i) ?? "chart";
238
- return n === "sm" ? j(tt(r, o, (a) => s(a) === "table" || s(a) === "text"), "sm", t) : n === "xs" ? j(tt(r, o, (a) => s(a) !== "kpi"), "xs", t) : j(
239
- r.flatMap((a) => a.map((f) => [{ source: f, x: 0, w: o }])),
235
+ const e = v.columns[n], r = R(B(t, o)), s = (a) => i.get(a.i) ?? "chart";
236
+ return n === "sm" ? j(tt(r, e, (a) => s(a) === "table" || s(a) === "text"), "sm", t) : n === "xs" ? j(tt(r, e, (a) => s(a) !== "kpi"), "xs", t) : j(
237
+ r.flatMap((a) => a.map((f) => [{ source: f, x: 0, w: e }])),
240
238
  "xxs",
241
239
  t
242
240
  );
243
241
  }
244
242
  function H(n, t, i) {
245
- const e = L[t];
246
- return { i: n, x: 0, y: 0, w: i, h: e.h, minW: Math.min(e.minW, i), minH: e.minH };
243
+ const o = L[t];
244
+ return { i: n, x: 0, y: 0, w: i, h: o.h, minW: Math.min(o.minW, i), minH: o.minH };
247
245
  }
248
246
  function P(n, t) {
249
- return n.slice().sort((i, e) => (t.get(i.i) ?? 0) - (t.get(e.i) ?? 0));
247
+ return n.slice().sort((i, o) => (t.get(i.i) ?? 0) - (t.get(o.i) ?? 0));
250
248
  }
251
249
  function G(n, t, i) {
252
- return n.map((e) => e.y >= t ? { ...e, y: e.y + i } : e);
250
+ return n.map((o) => o.y >= t ? { ...o, y: o.y + i } : o);
253
251
  }
254
252
  function Tt(n, t, i) {
255
- const e = (f, x) => !t.some((l) => N({ ...n, i: "\0", x: f, y: x }, l)), o = n.x + n.w;
256
- if (o + n.w <= i && e(o, n.y)) return { x: o, y: n.y };
253
+ const o = (f, x) => !t.some((l) => N({ ...n, i: "\0", x: f, y: x }, l)), e = n.x + n.w;
254
+ if (e + n.w <= i && o(e, n.y)) return { x: e, y: n.y };
257
255
  const r = Math.max(i - n.w, 0), s = n.y + n.h, a = [s, ...t.map((f) => f.y + f.h).filter((f) => f > s).sort((f, x) => f - x)];
258
256
  for (const f of a)
259
- for (let x = 0; x <= r; x += 1) if (e(x, f)) return { x, y: f };
257
+ for (let x = 0; x <= r; x += 1) if (o(x, f)) return { x, y: f };
260
258
  return { x: 0, y: s };
261
259
  }
262
260
  function ft(n, t) {
@@ -269,18 +267,18 @@ function ft(n, t) {
269
267
  ...n.maxW !== void 0 ? { maxW: Math.max(i, Math.min(n.maxW, t)) } : {}
270
268
  };
271
269
  }
272
- function ct(n, t, i, e) {
273
- const o = n.find((f) => f.i === t), r = ft(o, e), { x: s, y: a } = Tt(r, n.filter((f) => f.i !== t), e);
270
+ function ct(n, t, i, o) {
271
+ const e = n.find((f) => f.i === t), r = ft(e, o), { x: s, y: a } = Tt(r, n.filter((f) => f.i !== t), o);
274
272
  return [...n, { ...r, i, x: s, y: a }];
275
273
  }
276
- function Bt(n, t, i, e, o) {
274
+ function Bt(n, t, i, o, e) {
277
275
  var u;
278
- const r = e == null ? void 0 : e.position;
276
+ const r = o == null ? void 0 : o.position;
279
277
  if (r && typeof r == "object" && "beside" in r)
280
- return M(P(ct(n, r.beside, t, g), o.frameOrder));
281
- const s = e != null && e.width ? et[e.width] : void 0;
278
+ return M(P(ct(n, r.beside, t, g), e.frameOrder));
279
+ const s = o != null && o.width ? ot[o.width] : void 0;
282
280
  let a = n.slice();
283
- const f = (d) => M(P([...a, d], o.frameOrder));
281
+ const f = (d) => M(P([...a, d], e.frameOrder));
284
282
  if (r === "top") {
285
283
  const d = H(t, i, s ?? E[i]);
286
284
  return a = G(a, 0, d.h), f(d);
@@ -288,7 +286,7 @@ function Bt(n, t, i, e, o) {
288
286
  if (r === "end" || r === void 0 && s !== void 0)
289
287
  return f({ ...H(t, i, s ?? E[i]), y: I(a) });
290
288
  if (r && typeof r == "object" && "after" in r) {
291
- const d = H(t, i, s ?? E[i]), c = R(B(a, o.frameOrder)).find((W) => W.some((b) => b.i === r.after)), p = c.find((W) => W.i === r.after), w = c[c.length - 1];
289
+ const d = H(t, i, s ?? E[i]), c = R(B(a, e.frameOrder)).find((W) => W.some((b) => b.i === r.after)), p = c.find((W) => W.i === r.after), w = c[c.length - 1];
292
290
  if (g - (w.x + w.w) >= d.w) {
293
291
  const W = new Set(c.filter((b) => b.x > p.x).map((b) => b.i));
294
292
  return a = a.map((b) => W.has(b.i) ? { ...b, x: b.x + d.w } : b), f({ ...d, x: p.x + p.w, y: p.y });
@@ -296,7 +294,7 @@ function Bt(n, t, i, e, o) {
296
294
  const k = Math.max(...c.map((W) => W.y + W.h));
297
295
  return a = G(a, k, d.h), f({ ...d, x: 0, y: k });
298
296
  }
299
- const x = (d) => o.kinds.get(d.i) ?? "chart", l = R(B(a, o.frameOrder));
297
+ const x = (d) => e.kinds.get(d.i) ?? "chart", l = R(B(a, e.frameOrder));
300
298
  if (i === "kpi") {
301
299
  const d = ((u = l[0]) == null ? void 0 : u.length) === 1 && x(l[0][0]) === "text" ? 1 : 0;
302
300
  let m = d;
@@ -313,7 +311,7 @@ function Bt(n, t, i, e, o) {
313
311
  const yt = { ...y, x: b, y: F, w: $, ...y.minW !== void 0 ? { minW: Math.min(y.minW, $) } : {} };
314
312
  return b += $, O = Math.max(O, y.h), yt;
315
313
  }), Z = F + O, xt = a.filter((y) => !p.has(y.i)).map((y) => y.y >= w && Z > h ? { ...y, y: y.y + (Z - h) } : y);
316
- return M(P([...xt, ...pt], o.frameOrder));
314
+ return M(P([...xt, ...pt], e.frameOrder));
317
315
  }
318
316
  if (i === "chart") {
319
317
  const d = l[l.length - 1], m = (d == null ? void 0 : d.length) === 1 ? d[0] : void 0;
@@ -322,8 +320,8 @@ function Bt(n, t, i, e, o) {
322
320
  return f({ ...H(t, i, g), y: I(a) });
323
321
  }
324
322
  function dt(n, t, i) {
325
- const e = Math.max(1, Math.min(i, Math.round(t.w * i / g)));
326
- return [...n, ft({ ...t, x: 0, y: I(n), w: e }, i)];
323
+ const o = Math.max(1, Math.min(i, Math.round(t.w * i / g)));
324
+ return [...n, ft({ ...t, x: 0, y: I(n), w: o }, i)];
327
325
  }
328
326
  const V = ["md", "sm", "xs", "xxs"], ut = [];
329
327
  function A(n) {
@@ -339,12 +337,12 @@ function _(n) {
339
337
  return typeof n == "number" && Number.isFinite(n) ? Math.round(n) : void 0;
340
338
  }
341
339
  function T(n, t, i) {
342
- const e = new Set(i.ids), o = /* @__PURE__ */ new Map();
343
- if (!Array.isArray(n)) return o;
340
+ const o = new Set(i.ids), e = /* @__PURE__ */ new Map();
341
+ if (!Array.isArray(n)) return e;
344
342
  for (const r of n) {
345
343
  if (!r || typeof r != "object") continue;
346
344
  const s = r, a = s.i;
347
- if (typeof a != "string" || !e.has(a) || o.has(a)) continue;
345
+ if (typeof a != "string" || !o.has(a) || e.has(a)) continue;
348
346
  const f = i.kinds.get(a) ?? "chart", x = _(s.minH), l = Math.max(1, Math.min(_(s.w) ?? Math.min(E[f], t), t)), u = Math.max(_(s.h) ?? L[f].h, x ?? 1, 1), d = {
349
347
  i: a,
350
348
  x: Math.max(0, Math.min(_(s.x) ?? 0, t - l)),
@@ -356,9 +354,9 @@ function T(n, t, i) {
356
354
  const c = _(s.maxW);
357
355
  c !== void 0 && (d.maxW = Math.max(c, l));
358
356
  const p = _(s.maxH);
359
- p !== void 0 && (d.maxH = Math.max(p, u)), typeof s.static == "boolean" && (d.static = s.static), typeof s.isResizable == "boolean" && (d.isResizable = s.isResizable), typeof s.isDraggable == "boolean" && (d.isDraggable = s.isDraggable), o.set(a, d);
357
+ p !== void 0 && (d.maxH = Math.max(p, u)), typeof s.static == "boolean" && (d.static = s.static), typeof s.isResizable == "boolean" && (d.isResizable = s.isResizable), typeof s.isDraggable == "boolean" && (d.isDraggable = s.isDraggable), e.set(a, d);
360
358
  }
361
- return o;
359
+ return e;
362
360
  }
363
361
  function Lt(n, t) {
364
362
  return t.ids.every((i) => n.has(i));
@@ -367,23 +365,23 @@ function D(n, t) {
367
365
  return t.ids.flatMap((i) => n.has(i) ? [n.get(i)] : []);
368
366
  }
369
367
  function X(n, t) {
370
- const i = M(D(n, t)), e = new Map(i.map((r) => [r.i, r]));
371
- let o = I(i);
368
+ const i = M(D(n, t)), o = new Map(i.map((r) => [r.i, r]));
369
+ let e = I(i);
372
370
  for (const r of t.ids) {
373
- if (e.has(r)) continue;
371
+ if (o.has(r)) continue;
374
372
  const s = t.kinds.get(r) ?? "chart", a = L[s], f = E[s];
375
- e.set(r, { i: r, x: 0, y: o, w: f, h: a.h, minW: Math.min(a.minW, f), minH: a.minH }), o += a.h;
373
+ o.set(r, { i: r, x: 0, y: e, w: f, h: a.h, minW: Math.min(a.minW, f), minH: a.minH }), e += a.h;
376
374
  }
377
- return M(t.ids.map((r) => e.get(r)));
375
+ return M(t.ids.map((r) => o.get(r)));
378
376
  }
379
377
  function Ct(n, t) {
380
378
  const i = g / t;
381
- return n.map((e) => {
382
- if (!e || typeof e != "object") return e;
383
- const o = e, r = _(o.x), s = _(o.w);
384
- if (r === void 0 || s === void 0) return o;
379
+ return n.map((o) => {
380
+ if (!o || typeof o != "object") return o;
381
+ const e = o, r = _(e.x), s = _(e.w);
382
+ if (r === void 0 || s === void 0) return e;
385
383
  const a = Math.round(r * i), f = Math.round((r + s) * i);
386
- return { ...o, x: a, w: Math.max(1, f - a) };
384
+ return { ...e, x: a, w: Math.max(1, f - a) };
387
385
  });
388
386
  }
389
387
  function $t(n) {
@@ -391,8 +389,8 @@ function $t(n) {
391
389
  if (Array.isArray(t.lg)) return t.lg;
392
390
  if (Array.isArray(n.layout)) return n.layout;
393
391
  for (const i of V) {
394
- const e = t[i];
395
- if (Array.isArray(e)) return Ct(e, v.columns[i]);
392
+ const o = t[i];
393
+ if (Array.isArray(o)) return Ct(o, v.columns[i]);
396
394
  }
397
395
  return [];
398
396
  }
@@ -400,27 +398,27 @@ function nt(n, t) {
400
398
  var i;
401
399
  return (i = n.layouts) == null ? void 0 : i[t];
402
400
  }
403
- function mt(n, t, i, e) {
404
- let o = M(D(n, e));
401
+ function mt(n, t, i, o) {
402
+ let e = M(D(n, o));
405
403
  for (const r of t)
406
- n.has(r.i) || (o = dt(o, r, v.columns[i]));
407
- return M(U(o, e));
404
+ n.has(r.i) || (e = dt(e, r, v.columns[i]));
405
+ return M(U(e, o));
408
406
  }
409
407
  function U(n, t) {
410
- return n.slice().sort((i, e) => (t.frameOrder.get(i.i) ?? 0) - (t.frameOrder.get(e.i) ?? 0));
408
+ return n.slice().sort((i, o) => (t.frameOrder.get(i.i) ?? 0) - (t.frameOrder.get(o.i) ?? 0));
411
409
  }
412
410
  const Rt = ["i", "x", "y", "w", "h", "minW", "minH", "maxW", "maxH", "static", "isResizable", "isDraggable"];
413
411
  function lt(n, t) {
414
- return !Array.isArray(n) || n.length !== t.length ? !1 : t.every((i, e) => {
415
- const o = n[e];
416
- return !!o && Rt.every((r) => o[r] === i[r]);
412
+ return !Array.isArray(n) || n.length !== t.length ? !1 : t.every((i, o) => {
413
+ const e = n[o];
414
+ return !!e && Rt.every((r) => e[r] === i[r]);
417
415
  });
418
416
  }
419
417
  function Dt(n, t) {
420
- const i = new Map(t.map((e) => [e.i, e]));
421
- return n.length === t.length && n.every((e) => {
422
- const o = i.get(e.i);
423
- return !!o && o.x === e.x && o.y === e.y && o.w === e.w && o.h === e.h;
418
+ const i = new Map(t.map((o) => [o.i, o]));
419
+ return n.length === t.length && n.every((o) => {
420
+ const e = i.get(o.i);
421
+ return !!e && e.x === o.x && e.y === o.y && e.w === o.w && e.h === o.h;
424
422
  });
425
423
  }
426
424
  function Nt(n, t) {
@@ -430,62 +428,62 @@ function Ft(n) {
430
428
  return v.customizable.filter((t) => n.includes(t));
431
429
  }
432
430
  function ht(n, t, i) {
433
- const e = { lg: n };
434
- for (const o of V)
435
- e[o] = i[o] ?? at(o, n, t.kinds, t.frameOrder);
436
- return e;
431
+ const o = { lg: n };
432
+ for (const e of V)
433
+ o[e] = i[e] ?? at(e, n, t.kinds, t.frameOrder);
434
+ return o;
437
435
  }
438
436
  function jt(n, t) {
439
437
  return R(B(n, t.frameOrder)).map((i) => ({
440
- tiles: i.map((e) => ({ frameId: e.i, kind: t.kinds.get(e.i) ?? "chart", width: _t(e.w) }))
438
+ tiles: i.map((o) => ({ frameId: o.i, kind: t.kinds.get(o.i) ?? "chart", width: _t(o.w) }))
441
439
  }));
442
440
  }
443
441
  function Pt(n) {
444
- const t = A(n.frames ?? ut), i = X(T($t(n), g, t), t), e = Array.isArray(n.customizedBreakpoints), o = {}, r = [];
442
+ const t = A(n.frames ?? ut), i = X(T($t(n), g, t), t), o = Array.isArray(n.customizedBreakpoints), e = {}, r = [];
445
443
  for (const f of V) {
446
444
  const x = v.columns[f], l = T(nt(n, f), x, t), u = Lt(l, t) && t.ids.length > 0;
447
445
  if (q(f)) {
448
- if (e && n.customizedBreakpoints.includes(f)) {
449
- o[f] = mt(l, i, f, t), r.push(f);
446
+ if (o && n.customizedBreakpoints.includes(f)) {
447
+ e[f] = mt(l, i, f, t), r.push(f);
450
448
  continue;
451
449
  }
452
- if (!e && u) {
450
+ if (!o && u) {
453
451
  const m = M(D(l, t));
454
- Dt(m, at(f, i, t.kinds, t.frameOrder)) || (o[f] = m, r.push(f));
452
+ Dt(m, at(f, i, t.kinds, t.frameOrder)) || (e[f] = m, r.push(f));
455
453
  }
456
454
  continue;
457
455
  }
458
- !e && u && (o[f] = M(D(l, t)));
456
+ !o && u && (e[f] = M(D(l, t)));
459
457
  }
460
- const s = ht(i, t, o), a = v.breakpoints.some((f) => !lt(nt(n, f), s[f]));
458
+ const s = ht(i, t, e), a = v.breakpoints.some((f) => !lt(nt(n, f), s[f]));
461
459
  return { layouts: s, customizedBreakpoints: r, rows: jt(i, t), repaired: a };
462
460
  }
463
461
  function z(n) {
464
462
  return { ok: !1, failure: n };
465
463
  }
466
464
  function it(n, t, i) {
467
- const e = L[i];
468
- return n.map((o) => o.i === t ? { ...o, h: e.h, minH: e.minH, minW: Math.min(e.minW, o.w) } : o);
465
+ const o = L[i];
466
+ return n.map((e) => e.i === t ? { ...e, h: o.h, minH: o.minH, minW: Math.min(o.minW, e.w) } : e);
469
467
  }
470
468
  function Gt(n, t) {
471
- const i = Pt(n), e = n.frames ?? ut;
472
- let o = e, r = i.layouts.lg, s = i.customizedBreakpoints.slice();
469
+ const i = Pt(n), o = n.frames ?? ut;
470
+ let e = o, r = i.layouts.lg, s = i.customizedBreakpoints.slice();
473
471
  const a = {};
474
472
  for (const u of s) a[u] = i.layouts[u];
475
473
  switch (t.kind) {
476
474
  case "frame_added": {
477
475
  const { frame: u, placement: d } = t;
478
- if (e.some((h) => h.id === u.id))
476
+ if (o.some((h) => h.id === u.id))
479
477
  return z({ code: "frame_already_on_sheet", frameId: u.id, message: `A frame with id ${u.id} is already on this sheet.` });
480
478
  const m = d == null ? void 0 : d.position, c = typeof m == "object" ? "after" in m ? m.after : m.beside : void 0;
481
- if (c !== void 0 && !e.some((h) => h.id === c))
479
+ if (c !== void 0 && !o.some((h) => h.id === c))
482
480
  return z({ code: "position_target_not_found", frameId: c, message: `No frame ${c} on this sheet to place the new frame next to.` });
483
- if (m === "top") o = [u, ...e];
481
+ if (m === "top") e = [u, ...o];
484
482
  else if (c !== void 0) {
485
- const h = e.findIndex((k) => k.id === c);
486
- o = [...e.slice(0, h + 1), u, ...e.slice(h + 1)];
487
- } else o = [...e, u];
488
- const p = A(o);
483
+ const h = o.findIndex((k) => k.id === c);
484
+ e = [...o.slice(0, h + 1), u, ...o.slice(h + 1)];
485
+ } else e = [...o, u];
486
+ const p = A(e);
489
487
  r = Bt(r, u.id, p.kinds.get(u.id), d, p);
490
488
  const w = r.find((h) => h.i === u.id);
491
489
  for (const h of s) {
@@ -495,23 +493,23 @@ function Gt(n, t) {
495
493
  break;
496
494
  }
497
495
  case "frame_removed": {
498
- if (!e.some((u) => u.id === t.frameId))
496
+ if (!o.some((u) => u.id === t.frameId))
499
497
  return z({ code: "frame_not_on_sheet", frameId: t.frameId, message: `No frame ${t.frameId} on this sheet.` });
500
- o = e.filter((u) => u.id !== t.frameId), r = M(r.filter((u) => u.i !== t.frameId));
498
+ e = o.filter((u) => u.id !== t.frameId), r = M(r.filter((u) => u.i !== t.frameId));
501
499
  for (const u of s)
502
500
  a[u] = M(a[u].filter((d) => d.i !== t.frameId));
503
501
  break;
504
502
  }
505
503
  case "frame_updated": {
506
- const u = e.findIndex((c) => c.id === t.frame.id);
504
+ const u = o.findIndex((c) => c.id === t.frame.id);
507
505
  if (u < 0)
508
506
  return z({ code: "frame_not_on_sheet", frameId: t.frame.id, message: `No frame ${t.frame.id} on this sheet.` });
509
- o = e.map((c, p) => p === u ? t.frame : c);
510
- const d = K(e[u]), m = K(t.frame);
507
+ e = o.map((c, p) => p === u ? t.frame : c);
508
+ const d = K(o[u]), m = K(t.frame);
511
509
  if (d === m)
512
510
  return {
513
511
  ok: !0,
514
- frames: o,
512
+ frames: e,
515
513
  layouts: i.layouts,
516
514
  customizedBreakpoints: i.customizedBreakpoints,
517
515
  changed: !0,
@@ -527,7 +525,7 @@ function Gt(n, t) {
527
525
  case "grid_edited": {
528
526
  if (!bt(t.breakpoint))
529
527
  return z({ code: "breakpoint_not_editable", breakpoint: String(t.breakpoint), message: `The ${String(t.breakpoint)} layout is derived; edit Desktop, Tablet or Phone.` });
530
- const u = A(e);
528
+ const u = A(o);
531
529
  if (t.breakpoint === "md") {
532
530
  const d = [...T(t.items, v.columns.md, u).values()];
533
531
  r = X(new Map(St(r, d).map((m) => [m.i, m])), u);
@@ -546,34 +544,34 @@ function Gt(n, t) {
546
544
  break;
547
545
  }
548
546
  case "arrange": {
549
- const u = A(e), d = Et(r, u.kinds, u.frameOrder, t.keepOrder === !0), m = new Map(e.map((c) => [c.id, c]));
550
- o = d.order.map((c) => m.get(c)), o.every((c, p) => c === e[p]) && (o = e), r = d.items, s = [];
547
+ const u = A(o), d = Et(r, u.kinds, u.frameOrder, t.keepOrder === !0), m = new Map(o.map((c) => [c.id, c]));
548
+ e = d.order.map((c) => m.get(c)), e.every((c, p) => c === o[p]) && (e = o), r = d.items, s = [];
551
549
  for (const c of v.customizable) delete a[c];
552
550
  break;
553
551
  }
554
552
  }
555
- const f = A(o);
553
+ const f = A(e);
556
554
  r = U(r, f);
557
555
  const x = ht(r, f, a), l = !Nt(x, i.layouts) || s.join() !== i.customizedBreakpoints.join();
558
- return { ok: !0, frames: o, layouts: x, customizedBreakpoints: s, changed: o !== e || l, layoutsChanged: l };
556
+ return { ok: !0, frames: e, layouts: x, customizedBreakpoints: s, changed: e !== o || l, layoutsChanged: l };
559
557
  }
560
558
  function Kt(n, t) {
561
559
  const i = [...t].sort().join("\0");
562
- for (const e of v.breakpoints) {
563
- const o = n[e], r = v.columns[e];
564
- if (!Array.isArray(o)) throw new Error(`Layout ${e} is missing.`);
565
- if (o.map((s) => s.i).sort().join("\0") !== i) throw new Error(`Layout ${e} doesn't hold exactly the sheet's frames.`);
566
- for (const s of o) {
567
- if (![s.x, s.y, s.w, s.h].every(Number.isInteger)) throw new Error(`Layout ${e}: ${s.i} has a non-integer position or size.`);
560
+ for (const o of v.breakpoints) {
561
+ const e = n[o], r = v.columns[o];
562
+ if (!Array.isArray(e)) throw new Error(`Layout ${o} is missing.`);
563
+ if (e.map((s) => s.i).sort().join("\0") !== i) throw new Error(`Layout ${o} doesn't hold exactly the sheet's frames.`);
564
+ for (const s of e) {
565
+ if (![s.x, s.y, s.w, s.h].every(Number.isInteger)) throw new Error(`Layout ${o}: ${s.i} has a non-integer position or size.`);
568
566
  if (s.x < 0 || s.y < 0 || s.w < 1 || s.w > r || s.x + s.w > r || s.h < 1)
569
- throw new Error(`Layout ${e}: ${s.i} is out of bounds.`);
570
- if (s.minW !== void 0 && (s.minW < 1 || s.minW > s.w)) throw new Error(`Layout ${e}: ${s.i} minW out of range.`);
571
- if (s.minH !== void 0 && (s.minH < 1 || s.minH > s.h)) throw new Error(`Layout ${e}: ${s.i} minH out of range.`);
572
- if (s.maxW !== void 0 && s.maxW < s.w) throw new Error(`Layout ${e}: ${s.i} maxW below w.`);
573
- if (s.maxH !== void 0 && s.maxH < s.h) throw new Error(`Layout ${e}: ${s.i} maxH below h.`);
567
+ throw new Error(`Layout ${o}: ${s.i} is out of bounds.`);
568
+ if (s.minW !== void 0 && (s.minW < 1 || s.minW > s.w)) throw new Error(`Layout ${o}: ${s.i} minW out of range.`);
569
+ if (s.minH !== void 0 && (s.minH < 1 || s.minH > s.h)) throw new Error(`Layout ${o}: ${s.i} minH out of range.`);
570
+ if (s.maxW !== void 0 && s.maxW < s.w) throw new Error(`Layout ${o}: ${s.i} maxW below w.`);
571
+ if (s.maxH !== void 0 && s.maxH < s.h) throw new Error(`Layout ${o}: ${s.i} maxH below h.`);
574
572
  }
575
- if (Ot(o)) throw new Error(`Layout ${e} has overlapping items.`);
576
- if (!It(o)) throw new Error(`Layout ${e} isn't packed.`);
573
+ if (Ot(e)) throw new Error(`Layout ${o} has overlapping items.`);
574
+ if (!It(e)) throw new Error(`Layout ${o} isn't packed.`);
577
575
  }
578
576
  }
579
577
  export {