@coolms/ui-react 0.1.0-alpha.27 → 0.1.0-alpha.29

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.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as u, Fragment as M } from "react/jsx-runtime";
2
- import { useId as G, useState as E, useRef as R, useEffect as Y, useCallback as be, useMemo as Oe, useLayoutEffect as xe, useContext as Ke, createContext as Ue } from "react";
2
+ import { useId as G, useState as E, useRef as F, useEffect as Y, useCallback as be, useMemo as Oe, useLayoutEffect as ge, useContext as Ke, createContext as Ue } from "react";
3
3
  import { createPortal as Me } from "react-dom";
4
4
  function ce(n, l) {
5
5
  const t = { ...n };
6
- for (const o of Object.keys(l ?? {})) {
7
- const i = l == null ? void 0 : l[o];
8
- i !== void 0 && (t[o] = i);
6
+ for (const i of Object.keys(l ?? {})) {
7
+ const c = l == null ? void 0 : l[i];
8
+ c !== void 0 && (t[i] = c);
9
9
  }
10
10
  return t;
11
11
  }
@@ -35,47 +35,47 @@ function le({
35
35
  variant: n = "secondary",
36
36
  busy: l = !1,
37
37
  busyLabel: t,
38
- locked: o = !1,
39
- lockedReason: i,
38
+ locked: i = !1,
39
+ lockedReason: c,
40
40
  icon: s,
41
- disabled: c,
42
- className: a,
43
- children: m,
41
+ disabled: d,
42
+ className: r,
43
+ children: f,
44
44
  type: _ = "button",
45
- title: d,
46
- ...h
45
+ title: o,
46
+ ...m
47
47
  }) {
48
- const r = !!c || l;
48
+ const a = !!d || l;
49
49
  return /* @__PURE__ */ u(
50
50
  "button",
51
51
  {
52
- ...h,
52
+ ...m,
53
53
  type: _,
54
- className: A("cms-button", `cms-button--${n}`, l && "is-busy", o && "is-locked", a),
55
- disabled: r,
54
+ className: A("cms-button", `cms-button--${n}`, l && "is-busy", i && "is-locked", r),
55
+ disabled: a,
56
56
  "aria-busy": l || void 0,
57
- title: o ? i ?? d : d,
57
+ title: i ? c ?? o : o,
58
58
  children: [
59
- l ? /* @__PURE__ */ e(z, { name: "spinner" }) : o ? /* @__PURE__ */ e(z, { name: "lock" }) : s,
60
- /* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : m }),
61
- o && i ? /* @__PURE__ */ u("span", { className: "cms-visually-hidden", children: [
59
+ l ? /* @__PURE__ */ e(z, { name: "spinner" }) : i ? /* @__PURE__ */ e(z, { name: "lock" }) : s,
60
+ /* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : f }),
61
+ i && c ? /* @__PURE__ */ u("span", { className: "cms-visually-hidden", children: [
62
62
  ", ",
63
- i
63
+ c
64
64
  ] }) : null
65
65
  ]
66
66
  }
67
67
  );
68
68
  }
69
- function Ce({ id: n, label: l, help: t, error: o, pinned: i, children: s }) {
70
- return /* @__PURE__ */ u("div", { className: A("cms-field", o != null && "is-invalid"), children: [
69
+ function Ce({ id: n, label: l, help: t, error: i, pinned: c, children: s }) {
70
+ return /* @__PURE__ */ u("div", { className: A("cms-field", i != null && "is-invalid"), children: [
71
71
  /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: l }),
72
72
  s,
73
- i != null ? /* @__PURE__ */ u("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
73
+ c != null ? /* @__PURE__ */ u("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
74
74
  /* @__PURE__ */ e(z, { name: "lock" }),
75
75
  " ",
76
- i
76
+ c
77
77
  ] }) : null,
78
- o != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: o }) : null,
78
+ i != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: i }) : null,
79
79
  t != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: t }) : null
80
80
  ] });
81
81
  }
@@ -83,28 +83,28 @@ function Se(n, l) {
83
83
  const t = [l.error != null && `${n}-error`, l.pinned != null && `${n}-pinned`, l.help != null && `${n}-help`].filter(Boolean).join(" ");
84
84
  return t === "" ? void 0 : t;
85
85
  }
86
- const ze = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Ze = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
- function Ve(n, l, t) {
88
- const o = (s, c, a, m = 0, _ = 0, d = 0) => {
89
- const h = new Date(Date.UTC(s, c - 1, a, m, _, d));
90
- return h.setUTCFullYear(s), h.getUTCFullYear() === s && h.getUTCMonth() === c - 1 && h.getUTCDate() === a && h.getUTCHours() === m && h.getUTCMinutes() === _ && h.getUTCSeconds() === d ? h : null;
91
- }, i = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
86
+ const ze = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Ve = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
+ function Ze(n, l, t) {
88
+ const i = (s, d, r, f = 0, _ = 0, o = 0) => {
89
+ const m = new Date(Date.UTC(s, d - 1, r, f, _, o));
90
+ return m.setUTCFullYear(s), m.getUTCFullYear() === s && m.getUTCMonth() === d - 1 && m.getUTCDate() === r && m.getUTCHours() === f && m.getUTCMinutes() === _ && m.getUTCSeconds() === o ? m : null;
91
+ }, c = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
92
92
  try {
93
93
  if (n === "time") {
94
- const c = l.match(Ze);
95
- if (c === null) return l;
96
- const a = i(c), m = o(2e3, 1, 1, a.hour, a.minute, a.second);
97
- return m === null ? l : new Intl.DateTimeFormat(t, { timeStyle: c[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
94
+ const d = l.match(Ve);
95
+ if (d === null) return l;
96
+ const r = c(d), f = i(2e3, 1, 1, r.hour, r.minute, r.second);
97
+ return f === null ? l : new Intl.DateTimeFormat(t, { timeStyle: d[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(f);
98
98
  }
99
99
  const s = l.match(ze);
100
100
  if (s === null) return l;
101
101
  if (n === "date" && s[4] === void 0) {
102
- const c = o(Number(s[1]), Number(s[2]), Number(s[3]));
103
- return c === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(c);
102
+ const d = i(Number(s[1]), Number(s[2]), Number(s[3]));
103
+ return d === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(d);
104
104
  }
105
105
  if (n === "datetime-local" && s[4] !== void 0) {
106
- const c = o(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
- return c === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(c);
106
+ const d = i(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
+ return d === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(d);
108
108
  }
109
109
  } catch {
110
110
  return l;
@@ -112,136 +112,136 @@ function Ve(n, l, t) {
112
112
  return l;
113
113
  }
114
114
  const We = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
115
- function Fn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s, value: c, onChange: a, placeholder: m, type: _ = "text", name: d, locale: h, min: r, max: f, step: p, minLength: g, maxLength: N, required: w }) {
116
- const x = G(), S = i === !0 || s != null, C = S && We.has(_), F = _ === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
115
+ function Fn({ label: n, help: l, error: t, disabled: i, readOnly: c, pinned: s, value: d, onChange: r, placeholder: f, type: _ = "text", name: o, locale: m, min: a, max: h, step: p, minLength: v, maxLength: N, required: w }) {
116
+ const x = G(), S = c === !0 || s != null, C = S && We.has(_), R = _ === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
117
117
  return /* @__PURE__ */ e(Ce, { id: x, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
118
118
  "input",
119
119
  {
120
120
  id: x,
121
- name: d,
121
+ name: o,
122
122
  type: C ? "text" : _,
123
123
  className: "cms-input",
124
- value: C ? Ve(_, c, h) : c,
125
- ...C ? { "data-value": c } : {},
126
- lang: h,
127
- placeholder: m,
128
- disabled: o,
124
+ value: C ? Ze(_, d, m) : d,
125
+ ...C ? { "data-value": d } : {},
126
+ lang: m,
127
+ placeholder: f,
128
+ disabled: i,
129
129
  readOnly: S,
130
130
  required: w,
131
131
  "aria-required": w || void 0,
132
- min: C ? void 0 : r,
133
- max: C ? void 0 : f,
132
+ min: C ? void 0 : a,
133
+ max: C ? void 0 : h,
134
134
  step: C ? void 0 : p,
135
- minLength: g,
135
+ minLength: v,
136
136
  maxLength: N,
137
- inputMode: _ === "number" ? F ? "decimal" : "numeric" : void 0,
137
+ inputMode: _ === "number" ? R ? "decimal" : "numeric" : void 0,
138
138
  "aria-invalid": t != null || void 0,
139
139
  "aria-describedby": Se(x, { help: l, error: t, pinned: s }),
140
- onChange: (H) => a == null ? void 0 : a(H.target.value)
140
+ onChange: (H) => r == null ? void 0 : r(H.target.value)
141
141
  }
142
142
  ) });
143
143
  }
144
- function Hn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s, value: c, onChange: a, placeholder: m, rows: _ = 4, name: d, locale: h, minLength: r, maxLength: f, required: p }) {
145
- const g = G();
146
- return /* @__PURE__ */ e(Ce, { id: g, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
144
+ function Rn({ label: n, help: l, error: t, disabled: i, readOnly: c, pinned: s, value: d, onChange: r, placeholder: f, rows: _ = 4, name: o, locale: m, minLength: a, maxLength: h, required: p }) {
145
+ const v = G();
146
+ return /* @__PURE__ */ e(Ce, { id: v, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
147
147
  "textarea",
148
148
  {
149
- id: g,
150
- name: d,
149
+ id: v,
150
+ name: o,
151
151
  className: "cms-input cms-textarea",
152
152
  rows: _,
153
- value: c,
154
- lang: h,
155
- placeholder: m,
156
- disabled: o,
157
- readOnly: i === !0 || s != null,
153
+ value: d,
154
+ lang: m,
155
+ placeholder: f,
156
+ disabled: i,
157
+ readOnly: c === !0 || s != null,
158
158
  required: p,
159
159
  "aria-required": p || void 0,
160
- minLength: r,
161
- maxLength: f,
160
+ minLength: a,
161
+ maxLength: h,
162
162
  "aria-invalid": t != null || void 0,
163
- "aria-describedby": Se(g, { help: l, error: t, pinned: s }),
164
- onChange: (N) => a == null ? void 0 : a(N.target.value)
163
+ "aria-describedby": Se(v, { help: l, error: t, pinned: s }),
164
+ onChange: (N) => r == null ? void 0 : r(N.target.value)
165
165
  }
166
166
  ) });
167
167
  }
168
- function Rn({ label: n, help: l, error: t, disabled: o, readOnly: i, value: s, options: c, onChange: a, emptyText: m = "Nothing to choose from yet.", name: _ }) {
169
- const d = G(), h = c.length === 0;
170
- return /* @__PURE__ */ e(Ce, { id: d, label: n, help: h ? m : l, error: t, children: /* @__PURE__ */ e(
168
+ function Hn({ label: n, help: l, error: t, disabled: i, readOnly: c, value: s, options: d, onChange: r, emptyText: f = "Nothing to choose from yet.", name: _ }) {
169
+ const o = G(), m = d.length === 0;
170
+ return /* @__PURE__ */ e(Ce, { id: o, label: n, help: m ? f : l, error: t, children: /* @__PURE__ */ e(
171
171
  "select",
172
172
  {
173
- id: d,
173
+ id: o,
174
174
  name: _,
175
175
  className: "cms-input cms-select",
176
176
  value: s,
177
- disabled: o || h,
178
- "aria-readonly": i || void 0,
177
+ disabled: i || m,
178
+ "aria-readonly": c || void 0,
179
179
  "aria-invalid": t != null || void 0,
180
- "aria-describedby": Se(d, { help: h ? m : l, error: t }),
181
- onChange: (r) => {
182
- i || a == null || a(r.target.value);
180
+ "aria-describedby": Se(o, { help: m ? f : l, error: t }),
181
+ onChange: (a) => {
182
+ c || r == null || r(a.target.value);
183
183
  },
184
- children: c.map((r) => /* @__PURE__ */ e("option", { value: r.value, disabled: i && r.value !== s, children: r.label }, r.value))
184
+ children: d.map((a) => /* @__PURE__ */ e("option", { value: a.value, disabled: c && a.value !== s, children: a.label }, a.value))
185
185
  }
186
186
  ) });
187
187
  }
188
- function On({ label: n, checked: l, onChange: t, disabled: o, readOnly: i, help: s }) {
189
- const c = G();
188
+ function On({ label: n, checked: l, onChange: t, disabled: i, readOnly: c, help: s }) {
189
+ const d = G();
190
190
  return /* @__PURE__ */ u("div", { className: "cms-toggle-row", children: [
191
191
  /* @__PURE__ */ e(
192
192
  "button",
193
193
  {
194
- id: c,
194
+ id: d,
195
195
  type: "button",
196
196
  role: "switch",
197
197
  className: A("cms-toggle", l && "is-on"),
198
198
  "aria-checked": l,
199
- "aria-readonly": i || void 0,
200
- "aria-describedby": s != null ? `${c}-help` : void 0,
201
- disabled: o,
199
+ "aria-readonly": c || void 0,
200
+ "aria-describedby": s != null ? `${d}-help` : void 0,
201
+ disabled: i,
202
202
  onClick: () => {
203
- i || t == null || t(!l);
203
+ c || t == null || t(!l);
204
204
  },
205
205
  children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
206
206
  }
207
207
  ),
208
- /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: c, children: n }),
209
- s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${c}-help`, children: s }) : null
208
+ /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: d, children: n }),
209
+ s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${d}-help`, children: s }) : null
210
210
  ] });
211
211
  }
212
212
  const je = 150;
213
- function Pe({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: i, children: s, footer: c, closeLabel: a = "Close", initialFocus: m, className: _ }) {
214
- const [d, h] = E(n), [r, f] = E(!1), p = R(null), g = R(null), N = G();
213
+ function Pe({ open: n, title: l, onClose: t, dirty: i = !1, onDirtyClose: c, children: s, footer: d, closeLabel: r = "Close", initialFocus: f, className: _ }) {
214
+ const [o, m] = E(n), [a, h] = E(!1), p = F(null), v = F(null), N = G();
215
215
  if (Y(() => {
216
216
  if (n) {
217
- g.current = document.activeElement, h(!0), f(!1);
217
+ v.current = document.activeElement, m(!0), h(!1);
218
218
  return;
219
219
  }
220
- if (!d) return;
221
- f(!0);
220
+ if (!o) return;
221
+ h(!0);
222
222
  const x = window.setTimeout(() => {
223
223
  var S, C;
224
- h(!1), f(!1), (C = (S = g.current) == null ? void 0 : S.focus) == null || C.call(S);
224
+ m(!1), h(!1), (C = (S = v.current) == null ? void 0 : S.focus) == null || C.call(S);
225
225
  }, je);
226
226
  return () => window.clearTimeout(x);
227
- }, [n, d]), Y(() => {
227
+ }, [n, o]), Y(() => {
228
228
  var x, S;
229
- if (n && d) {
229
+ if (n && o) {
230
230
  const C = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
231
- (S = (m == null ? void 0 : m.current) ?? ((x = p.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${C}), .cms-modal__foot :is(${C})`)) ?? p.current) == null || S.focus();
231
+ (S = (f == null ? void 0 : f.current) ?? ((x = p.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${C}), .cms-modal__foot :is(${C})`)) ?? p.current) == null || S.focus();
232
232
  }
233
- }, [n, d, m]), !d) return null;
233
+ }, [n, o, f]), !o) return null;
234
234
  const w = () => {
235
- o ? i == null || i() : t();
235
+ i ? c == null || c() : t();
236
236
  };
237
237
  return Me(
238
- /* @__PURE__ */ e("div", { className: A("cms-modal-scrim", r && "is-closing"), onMouseDown: (x) => {
238
+ /* @__PURE__ */ e("div", { className: A("cms-modal-scrim", a && "is-closing"), onMouseDown: (x) => {
239
239
  x.target === x.currentTarget && w();
240
240
  }, children: /* @__PURE__ */ u(
241
241
  "div",
242
242
  {
243
243
  ref: p,
244
- className: A("cms-modal", _, r && "is-closing", o && "is-dirty"),
244
+ className: A("cms-modal", _, a && "is-closing", i && "is-dirty"),
245
245
  role: "dialog",
246
246
  "aria-modal": "true",
247
247
  "aria-labelledby": N,
@@ -253,37 +253,37 @@ function Pe({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: i, chi
253
253
  else if (x.key === "Tab") {
254
254
  const C = (S = p.current) == null ? void 0 : S.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
255
255
  if (!C || C.length === 0) return;
256
- const F = C[0], H = C[C.length - 1];
257
- x.shiftKey && document.activeElement === F ? (x.preventDefault(), H.focus()) : !x.shiftKey && document.activeElement === H && (x.preventDefault(), F.focus());
256
+ const R = C[0], H = C[C.length - 1];
257
+ x.shiftKey && document.activeElement === R ? (x.preventDefault(), H.focus()) : !x.shiftKey && document.activeElement === H && (x.preventDefault(), R.focus());
258
258
  }
259
259
  },
260
260
  children: [
261
261
  /* @__PURE__ */ u("header", { className: "cms-modal__head", children: [
262
262
  /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: N, children: l }),
263
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: w, children: /* @__PURE__ */ e(z, { name: "close" }) })
263
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r, onClick: w, children: /* @__PURE__ */ e(z, { name: "close" }) })
264
264
  ] }),
265
265
  /* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
266
- c != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: c }) : null
266
+ d != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: d }) : null
267
267
  ]
268
268
  }
269
269
  ) }),
270
270
  document.body
271
271
  );
272
272
  }
273
- function Kn({ open: n, title: l, message: t, kind: o = "default", confirmLabel: i, cancelLabel: s, closeLabel: c, onConfirm: a, onCancel: m }) {
274
- const _ = o === "discard-changes";
273
+ function Kn({ open: n, title: l, message: t, kind: i = "default", confirmLabel: c, cancelLabel: s, closeLabel: d, onConfirm: r, onCancel: f }) {
274
+ const _ = i === "discard-changes";
275
275
  return /* @__PURE__ */ e(
276
276
  Pe,
277
277
  {
278
278
  open: n,
279
279
  title: l,
280
- onClose: m,
281
- ...c === void 0 ? {} : { closeLabel: c },
280
+ onClose: f,
281
+ ...d === void 0 ? {} : { closeLabel: d },
282
282
  footer: /* @__PURE__ */ u(M, { children: [
283
- /* @__PURE__ */ e(le, { onClick: m, children: s ?? (_ ? "Keep editing" : "Cancel") }),
284
- /* @__PURE__ */ e(le, { variant: o === "default" ? "primary" : "danger", onClick: a, children: i ?? (_ ? "Discard changes" : "Confirm") })
283
+ /* @__PURE__ */ e(le, { onClick: f, children: s ?? (_ ? "Keep editing" : "Cancel") }),
284
+ /* @__PURE__ */ e(le, { variant: i === "default" ? "primary" : "danger", onClick: r, children: c ?? (_ ? "Discard changes" : "Confirm") })
285
285
  ] }),
286
- children: o !== "default" ? /* @__PURE__ */ u("p", { className: "cms-confirm__warning", children: [
286
+ children: i !== "default" ? /* @__PURE__ */ u("p", { className: "cms-confirm__warning", children: [
287
287
  /* @__PURE__ */ e(z, { name: "warning" }),
288
288
  " ",
289
289
  t
@@ -291,12 +291,12 @@ function Kn({ open: n, title: l, message: t, kind: o = "default", confirmLabel:
291
291
  }
292
292
  );
293
293
  }
294
- function Un({ kind: n, message: l, action: t, onDismiss: o, dismissLabel: i = "Dismiss" }) {
294
+ function Un({ kind: n, message: l, action: t, onDismiss: i, dismissLabel: c = "Dismiss" }) {
295
295
  return /* @__PURE__ */ u("div", { className: A("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
296
  /* @__PURE__ */ e(z, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
297
297
  /* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
298
298
  t ? /* @__PURE__ */ e(le, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
299
- o ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i, onClick: o, children: /* @__PURE__ */ e(z, { name: "close" }) }) : null
299
+ i ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: i, children: /* @__PURE__ */ e(z, { name: "close" }) }) : null
300
300
  ] });
301
301
  }
302
302
  function zn({ children: n }) {
@@ -479,7 +479,7 @@ const Be = {
479
479
  more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
480
480
  important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
481
481
  };
482
- function L({ name: n, size: l = 20, label: t }) {
482
+ function T({ name: n, size: l = 20, label: t }) {
483
483
  return /* @__PURE__ */ e(
484
484
  "svg",
485
485
  {
@@ -498,7 +498,7 @@ function L({ name: n, size: l = 20, label: t }) {
498
498
  }
499
499
  );
500
500
  }
501
- const Zn = Object.keys(Be), Ae = {
501
+ const Vn = Object.keys(Be), Ae = {
502
502
  reply: "reply",
503
503
  "reply-all": "reply",
504
504
  forward: "forward",
@@ -546,17 +546,17 @@ function Xe() {
546
546
  return !1;
547
547
  }
548
548
  }
549
- const Te = /* @__PURE__ */ new Set();
549
+ const Le = /* @__PURE__ */ new Set();
550
550
  function Je({ name: n, size: l = 18 }) {
551
551
  if (n === "") return null;
552
552
  const t = re(n);
553
- return t !== null ? /* @__PURE__ */ e(L, { name: t, size: l }) : (!Te.has(n) && Xe() && (Te.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
553
+ return t !== null ? /* @__PURE__ */ e(T, { name: t, size: l }) : (!Le.has(n) && Xe() && (Le.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
554
554
  }
555
- const ye = 300;
555
+ const we = 300;
556
556
  function Qe() {
557
- if (typeof window > "u" || typeof getComputedStyle != "function") return ye;
557
+ if (typeof window > "u" || typeof getComputedStyle != "function") return we;
558
558
  const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), l = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
559
- return Number.isFinite(l) && l >= 0 ? l : ye;
559
+ return Number.isFinite(l) && l >= 0 ? l : we;
560
560
  }
561
561
  function en() {
562
562
  return /* @__PURE__ */ u("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
@@ -564,32 +564,32 @@ function en() {
564
564
  /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
565
565
  ] });
566
566
  }
567
- function ne({ kind: n, title: l, description: t, action: o, placement: i = "block", icon: s }) {
568
- const [c, a] = E(n !== "loading");
567
+ function ne({ kind: n, title: l, description: t, action: i, placement: c = "block", icon: s }) {
568
+ const [d, r] = E(n !== "loading");
569
569
  return Y(() => {
570
570
  if (n !== "loading") {
571
- a(!0);
571
+ r(!0);
572
572
  return;
573
573
  }
574
- a(!1);
575
- const m = window.setTimeout(() => a(!0), Qe());
576
- return () => window.clearTimeout(m);
574
+ r(!1);
575
+ const f = window.setTimeout(() => r(!0), Qe());
576
+ return () => window.clearTimeout(f);
577
577
  }, [n]), /* @__PURE__ */ u(
578
578
  "div",
579
579
  {
580
- className: A("cms-state", `cms-state--${n}`, `cms-state--${i}`, !c && "is-waiting"),
580
+ className: A("cms-state", `cms-state--${n}`, `cms-state--${c}`, !d && "is-waiting"),
581
581
  role: "status",
582
582
  "aria-live": "polite",
583
583
  "data-kind": n,
584
584
  children: [
585
585
  n === "loading" ? /* @__PURE__ */ e(en, {}) : null,
586
586
  n === "error" || n === "denied" ? /* @__PURE__ */ e(z, { name: n === "error" ? "warning" : "lock" }) : null,
587
- n === "empty" && s !== void 0 && re(s) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Je, { name: s, size: i === "page" ? 32 : 24 }) }) : null,
587
+ n === "empty" && s !== void 0 && re(s) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Je, { name: s, size: c === "page" ? 32 : 24 }) }) : null,
588
588
  /* @__PURE__ */ u("span", { className: "cms-state__text", children: [
589
589
  /* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
590
590
  t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
591
591
  ] }),
592
- o !== void 0 && n !== "denied" ? /* @__PURE__ */ e(le, { className: "cms-state__action", onClick: o.onAction, children: o.label }) : null
592
+ i !== void 0 && n !== "denied" ? /* @__PURE__ */ e(le, { className: "cms-state__action", onClick: i.onAction, children: i.label }) : null
593
593
  ]
594
594
  }
595
595
  );
@@ -604,72 +604,72 @@ function an(n) {
604
604
  function sn(n) {
605
605
  return n.getClientRects().length > 0;
606
606
  }
607
- function Vn(n) {
608
- const { name: l, badge: t, closeLabel: o, onClose: i, actions: s = [], moreLabel: c = "More", edit: a, editing: m, state: _, siblings: d, bar: h, thumbnails: r, strip: f, onZoom: p, children: g } = n, N = R(null), w = R(null), x = G(), [S, C] = E(!1), F = R(null);
607
+ function Zn(n) {
608
+ const { name: l, badge: t, closeLabel: i, onClose: c, actions: s = [], moreLabel: d = "More", edit: r, editing: f, state: _, siblings: o, bar: m, thumbnails: a, strip: h, onZoom: p, children: v } = n, N = F(null), w = F(null), x = G(), [S, C] = E(!1), R = F(null);
609
609
  Y(() => {
610
- var V;
610
+ var Z;
611
611
  const y = document.activeElement, P = document.body.style.overflow;
612
- return document.body.style.overflow = "hidden", (V = w.current) == null || V.focus(), () => {
612
+ return document.body.style.overflow = "hidden", (Z = w.current) == null || Z.focus(), () => {
613
613
  var D;
614
614
  document.body.style.overflow = P, (D = y == null ? void 0 : y.focus) == null || D.call(y);
615
615
  };
616
616
  }, []);
617
617
  const H = () => {
618
- m != null && m.dirty ? m.onDirtyClose() : i();
618
+ f != null && f.dirty ? f.onDirtyClose() : c();
619
619
  }, ee = (y) => {
620
620
  const P = y.touches.length === 1 ? y.touches[0] : void 0;
621
- F.current = P === void 0 || m !== void 0 || an(y.target) ? null : { x: P.clientX, y: P.clientY };
621
+ R.current = P === void 0 || f !== void 0 || an(y.target) ? null : { x: P.clientX, y: P.clientY };
622
622
  }, j = (y) => {
623
623
  var X, O;
624
- const P = F.current, V = y.changedTouches[0];
625
- if (F.current = null, P === null || V === void 0) return;
626
- const D = V.clientX - P.x;
627
- Math.abs(D) < ln || Math.abs(D) < Math.abs(V.clientY - P.y) || (D > 0 ? (X = d == null ? void 0 : d.onPrevious) == null || X.call(d) : (O = d == null ? void 0 : d.onNext) == null || O.call(d));
624
+ const P = R.current, Z = y.changedTouches[0];
625
+ if (R.current = null, P === null || Z === void 0) return;
626
+ const D = Z.clientX - P.x;
627
+ Math.abs(D) < ln || Math.abs(D) < Math.abs(Z.clientY - P.y) || (D > 0 ? (X = o == null ? void 0 : o.onPrevious) == null || X.call(o) : (O = o == null ? void 0 : o.onNext) == null || O.call(o));
628
628
  };
629
629
  return Me(
630
630
  /* @__PURE__ */ u(
631
631
  "div",
632
632
  {
633
633
  ref: N,
634
- className: A("cms-viewer", m !== void 0 && "is-editing"),
634
+ className: A("cms-viewer", f !== void 0 && "is-editing"),
635
635
  role: "dialog",
636
636
  "aria-modal": "true",
637
637
  "aria-labelledby": x,
638
638
  tabIndex: -1,
639
639
  onKeyDown: (y) => {
640
- var P, V, D;
640
+ var P, Z, D;
641
641
  if (y.key === "Escape") {
642
- if (m !== void 0) return;
643
- y.stopPropagation(), S ? C(!1) : i();
642
+ if (f !== void 0) return;
643
+ y.stopPropagation(), S ? C(!1) : c();
644
644
  } else if (y.key === "Tab") {
645
645
  const X = Array.from(((P = N.current) == null ? void 0 : P.querySelectorAll(nn)) ?? []).filter(sn);
646
646
  if (X.length === 0) return;
647
647
  const O = X[0], J = X[X.length - 1];
648
648
  y.shiftKey && document.activeElement === O ? (y.preventDefault(), J.focus()) : !y.shiftKey && document.activeElement === J && (y.preventDefault(), O.focus());
649
- } else m === void 0 && !tn(y.target) && !y.ctrlKey && !y.metaKey && !y.altKey && (y.key === "ArrowLeft" ? (V = d == null ? void 0 : d.onPrevious) == null || V.call(d) : y.key === "ArrowRight" ? (D = d == null ? void 0 : d.onNext) == null || D.call(d) : y.key === "+" || y.key === "=" ? p == null || p("in") : y.key === "-" ? p == null || p("out") : y.key === "0" && (p == null || p("reset")));
649
+ } else f === void 0 && !tn(y.target) && !y.ctrlKey && !y.metaKey && !y.altKey && (y.key === "ArrowLeft" ? (Z = o == null ? void 0 : o.onPrevious) == null || Z.call(o) : y.key === "ArrowRight" ? (D = o == null ? void 0 : o.onNext) == null || D.call(o) : y.key === "+" || y.key === "=" ? p == null || p("in") : y.key === "-" ? p == null || p("out") : y.key === "0" && (p == null || p("reset")));
650
650
  },
651
651
  children: [
652
- d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${d.position}` }) : null,
652
+ o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${o.position}` }) : null,
653
653
  /* @__PURE__ */ u("header", { className: "cms-viewer__top", children: [
654
- /* @__PURE__ */ e("button", { ref: w, type: "button", className: "cms-viewer__icon", "aria-label": o, onClick: H, children: /* @__PURE__ */ e(z, { name: "close" }) }),
654
+ /* @__PURE__ */ e("button", { ref: w, type: "button", className: "cms-viewer__icon", "aria-label": i, onClick: H, children: /* @__PURE__ */ e(z, { name: "close" }) }),
655
655
  /* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: t }),
656
656
  /* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: x, title: l, children: l }),
657
- d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: d.position }) : null,
657
+ o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: o.position }) : null,
658
658
  /* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
659
- m !== void 0 ? /* @__PURE__ */ u(M, { children: [
660
- /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: m.status }),
661
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.onDone, children: m.doneLabel })
659
+ f !== void 0 ? /* @__PURE__ */ u(M, { children: [
660
+ /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: f.status }),
661
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: f.onDone, children: f.doneLabel })
662
662
  ] }) : /* @__PURE__ */ u(M, { children: [
663
663
  /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((y) => /* @__PURE__ */ u("button", { type: "button", className: "cms-viewer__button", onClick: y.onSelect, children: [
664
664
  y.icon,
665
665
  y.label
666
666
  ] }, y.label)) }),
667
- a !== void 0 ? /* @__PURE__ */ u("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": a.label, onClick: a.onEdit, children: [
668
- a.icon,
669
- /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: a.label })
667
+ r !== void 0 ? /* @__PURE__ */ u("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": r.label, onClick: r.onEdit, children: [
668
+ r.icon,
669
+ /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: r.label })
670
670
  ] }) : null,
671
671
  s.length > 0 ? /* @__PURE__ */ u("span", { className: "cms-viewer__more", children: [
672
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": c, "aria-expanded": S, onClick: () => C((y) => !y), children: /* @__PURE__ */ e(L, { name: "more" }) }),
672
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": d, "aria-expanded": S, onClick: () => C((y) => !y), children: /* @__PURE__ */ e(T, { name: "more" }) }),
673
673
  S ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((y) => /* @__PURE__ */ u(
674
674
  "button",
675
675
  {
@@ -689,21 +689,21 @@ function Vn(n) {
689
689
  ] })
690
690
  ] }),
691
691
  /* @__PURE__ */ u("div", { className: "cms-viewer__body", children: [
692
- r != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: r }) : null,
692
+ a != null && f === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: a }) : null,
693
693
  /* @__PURE__ */ u("div", { className: "cms-viewer__content", onTouchStart: ee, onTouchEnd: j, children: [
694
- (m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ u("div", { className: "cms-viewer__conflict", role: "alert", children: [
695
- /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: m.conflict.message }),
696
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: m.conflict.onOverwrite, children: m.conflict.overwriteLabel }),
697
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.conflict.onKeepBoth, children: m.conflict.keepBothLabel })
694
+ (f == null ? void 0 : f.conflict) !== void 0 ? /* @__PURE__ */ u("div", { className: "cms-viewer__conflict", role: "alert", children: [
695
+ /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: f.conflict.message }),
696
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: f.conflict.onOverwrite, children: f.conflict.overwriteLabel }),
697
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: f.conflict.onKeepBoth, children: f.conflict.keepBothLabel })
698
698
  ] }) : null,
699
- _ === void 0 ? g : /* @__PURE__ */ e(rn, { state: _ }),
700
- m === void 0 && (d != null && d.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": d.previousLabel, title: d.previousLabel, onClick: d.onPrevious, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
701
- m === void 0 && (d != null && d.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": d.nextLabel, title: d.nextLabel, onClick: d.onNext, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
702
- m === void 0 && d !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(d.total, 7) }, (y, P) => /* @__PURE__ */ e("i", { className: P === Math.min(d.index, 6) ? "is-current" : void 0 }, P)) }) : null
699
+ _ === void 0 ? v : /* @__PURE__ */ e(rn, { state: _ }),
700
+ f === void 0 && (o != null && o.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": o.previousLabel, title: o.previousLabel, onClick: o.onPrevious, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
701
+ f === void 0 && (o != null && o.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": o.nextLabel, title: o.nextLabel, onClick: o.onNext, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
702
+ f === void 0 && o !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(o.total, 7) }, (y, P) => /* @__PURE__ */ e("i", { className: P === Math.min(o.index, 6) ? "is-current" : void 0 }, P)) }) : null
703
703
  ] })
704
704
  ] }),
705
- m === void 0 && f != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: f }) : null,
706
- h != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: h }) : null
705
+ f === void 0 && h != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: h }) : null,
706
+ m != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: m }) : null
707
707
  ]
708
708
  }
709
709
  ),
@@ -743,45 +743,45 @@ class cn extends Error {
743
743
  super(l), this.name = "FilePickerDenied";
744
744
  }
745
745
  }
746
- const Ne = (n, l) => `${n}
746
+ const ye = (n, l) => `${n}
747
747
  ${l}`, on = (n, l) => n === "" ? l : `${n}/${l}`, dn = 48;
748
748
  function Wn(n) {
749
749
  var me, he;
750
- const { open: l, spaces: t, list: o, disabledReason: i, budget: s, formatSize: c, labels: a, onConfirm: m, onCancel: _ } = n, [d, h] = E(((me = t[0]) == null ? void 0 : me.id) ?? ""), [r, f] = E(""), [p, g] = E({ status: "loading" }), [N, w] = E(0), [x, S] = E(/* @__PURE__ */ new Map()), [C, F] = E(0), [H, ee] = E(!1), j = R(null), y = G();
750
+ const { open: l, spaces: t, list: i, disabledReason: c, budget: s, formatSize: d, labels: r, onConfirm: f, onCancel: _ } = n, [o, m] = E(((me = t[0]) == null ? void 0 : me.id) ?? ""), [a, h] = E(""), [p, v] = E({ status: "loading" }), [N, w] = E(0), [x, S] = E(/* @__PURE__ */ new Map()), [C, R] = E(0), [H, ee] = E(!1), j = F(null), y = G();
751
751
  Y(() => {
752
752
  var b;
753
- l && (h(((b = t[0]) == null ? void 0 : b.id) ?? ""), f(""), S(/* @__PURE__ */ new Map()), ee(!1));
753
+ l && (m(((b = t[0]) == null ? void 0 : b.id) ?? ""), h(""), S(/* @__PURE__ */ new Map()), ee(!1));
754
754
  }, [l]), Y(() => {
755
- if (!l || d === "") return;
755
+ if (!l || o === "") return;
756
756
  let b = !0;
757
- return g({ status: "loading" }), F(0), o(d, r).then(
758
- (k) => b && g({ status: "ready", entries: k.entries, next: k.next ?? null, paging: !1 }),
759
- (k) => b && g({ status: k instanceof cn ? "denied" : "error" })
757
+ return v({ status: "loading" }), R(0), i(o, a).then(
758
+ (k) => b && v({ status: "ready", entries: k.entries, next: k.next ?? null, paging: !1 }),
759
+ (k) => b && v({ status: k instanceof cn ? "denied" : "error" })
760
760
  ), () => {
761
761
  b = !1;
762
762
  };
763
- }, [l, d, r, o, N]);
763
+ }, [l, o, a, i, N]);
764
764
  const P = be(() => {
765
765
  if (p.status !== "ready" || p.next === null || p.paging) return;
766
766
  const b = p.next, k = p.entries;
767
- g({ ...p, paging: !0 }), o(d, r, b).then(
768
- (B) => g({ status: "ready", entries: [...k, ...B.entries], next: B.next ?? null, paging: !1 }),
769
- () => g({ status: "ready", entries: k, next: b, paging: !1 })
767
+ v({ ...p, paging: !0 }), i(o, a, b).then(
768
+ (B) => v({ status: "ready", entries: [...k, ...B.entries], next: B.next ?? null, paging: !1 }),
769
+ () => v({ status: "ready", entries: k, next: b, paging: !1 })
770
770
  );
771
- }, [p, o, d, r]), V = be((b) => {
771
+ }, [p, i, o, a]), Z = be((b) => {
772
772
  var k;
773
773
  return ((k = s == null ? void 0 : s.cost) == null ? void 0 : k.call(s, b)) ?? b.size ?? 0;
774
- }, [s]), D = Oe(() => [...x.values()], [x]), X = D.reduce((b, k) => b + (k.size ?? 0), 0), O = s === void 0 ? null : s.limitBytes - s.usedBytes - D.reduce((b, k) => b + V(k), 0), J = O !== null && O < 0, ie = (b) => {
774
+ }, [s]), D = Oe(() => [...x.values()], [x]), X = D.reduce((b, k) => b + (k.size ?? 0), 0), O = s === void 0 ? null : s.limitBytes - s.usedBytes - D.reduce((b, k) => b + Z(k), 0), J = O !== null && O < 0, ie = (b) => {
775
775
  if (b.kind !== "file") return null;
776
- const k = i == null ? void 0 : i(b);
777
- return k || (O !== null && !x.has(Ne(d, b.id)) && V(b) > O ? a.overBudget : null);
776
+ const k = c == null ? void 0 : c(b);
777
+ return k || (O !== null && !x.has(ye(o, b.id)) && Z(b) > O ? r.overBudget : null);
778
778
  }, oe = (b) => {
779
- const k = Ne(d, b.id);
779
+ const k = ye(o, b.id);
780
780
  !x.has(k) && ie(b) !== null || S((B) => {
781
781
  const K = new Map(B);
782
- return K.has(k) ? K.delete(k) : K.set(k, { ...b, space: d, path: r }), K;
782
+ return K.has(k) ? K.delete(k) : K.set(k, { ...b, space: o, path: a }), K;
783
783
  });
784
- }, v = (b) => f(on(r, b.name)), T = () => f(r.includes("/") ? r.slice(0, r.lastIndexOf("/")) : ""), Z = (b) => S((k) => {
784
+ }, g = (b) => h(on(a, b.name)), L = () => h(a.includes("/") ? a.slice(0, a.lastIndexOf("/")) : ""), V = (b) => S((k) => {
785
785
  const B = new Map(k);
786
786
  return B.delete(b), B;
787
787
  }), W = p.status === "ready" ? p.entries : [], $ = (b) => {
@@ -789,72 +789,72 @@ function Wn(n) {
789
789
  if (b.key === "ArrowDown" || b.key === "ArrowUp" || b.key === "Home" || b.key === "End") {
790
790
  b.preventDefault();
791
791
  const B = W.length - 1, K = b.key === "Home" ? 0 : b.key === "End" ? B : Math.min(B, Math.max(0, C + (b.key === "ArrowDown" ? 1 : -1)));
792
- F(K), K >= B - 1 && P();
793
- } else b.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (b.preventDefault(), v(k)) : b.key === " " && (k == null ? void 0 : k.kind) === "file" ? (b.preventDefault(), oe(k)) : b.key === "Backspace" && r !== "" && (b.preventDefault(), T());
794
- }, q = r === "" ? [] : r.split("/"), de = ((he = t.find((b) => b.id === d)) == null ? void 0 : he.name) ?? "", ue = (b) => `${y}-entry-${String(b)}`;
792
+ R(K), K >= B - 1 && P();
793
+ } else b.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (b.preventDefault(), g(k)) : b.key === " " && (k == null ? void 0 : k.kind) === "file" ? (b.preventDefault(), oe(k)) : b.key === "Backspace" && a !== "" && (b.preventDefault(), L());
794
+ }, q = a === "" ? [] : a.split("/"), de = ((he = t.find((b) => b.id === o)) == null ? void 0 : he.name) ?? "", ue = (b) => `${y}-entry-${String(b)}`;
795
795
  return /* @__PURE__ */ u(
796
796
  Pe,
797
797
  {
798
798
  open: l,
799
- title: a.title,
799
+ title: r.title,
800
800
  onClose: _,
801
- closeLabel: a.close,
801
+ closeLabel: r.close,
802
802
  initialFocus: j,
803
803
  className: "cms-file-picker",
804
804
  footer: /* @__PURE__ */ u("div", { className: "cms-file-picker__foot", children: [
805
805
  /* @__PURE__ */ u("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
806
- D.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(D.length, c(X)) }) : null,
807
- s !== void 0 && O !== null ? /* @__PURE__ */ e("span", { className: A(J && "is-over"), children: J ? a.overBudget : a.left(c(Math.max(0, O)), c(s.limitBytes)) }) : null
806
+ D.length > 0 ? /* @__PURE__ */ e("span", { children: r.total(D.length, d(X)) }) : null,
807
+ s !== void 0 && O !== null ? /* @__PURE__ */ e("span", { className: A(J && "is-over"), children: J ? r.overBudget : r.left(d(Math.max(0, O)), d(s.limitBytes)) }) : null
808
808
  ] }),
809
809
  /* @__PURE__ */ u("div", { className: "cms-file-picker__actions", children: [
810
- /* @__PURE__ */ e(le, { variant: "secondary", onClick: _, children: a.cancel }),
811
- /* @__PURE__ */ e(le, { variant: "primary", disabled: D.length === 0 || J, onClick: () => m(D), children: a.confirm(D.length) })
810
+ /* @__PURE__ */ e(le, { variant: "secondary", onClick: _, children: r.cancel }),
811
+ /* @__PURE__ */ e(le, { variant: "primary", disabled: D.length === 0 || J, onClick: () => f(D), children: r.confirm(D.length) })
812
812
  ] })
813
813
  ] }),
814
814
  children: [
815
815
  /* @__PURE__ */ u("div", { className: "cms-file-picker__top", children: [
816
816
  t.length > 1 ? /* @__PURE__ */ u("label", { className: "cms-file-picker__space", children: [
817
- /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: a.space }),
818
- /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: d, onChange: (b) => {
819
- h(b.target.value), f("");
817
+ /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: r.space }),
818
+ /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: o, onChange: (b) => {
819
+ m(b.target.value), h("");
820
820
  }, children: t.map((b) => /* @__PURE__ */ e("option", { value: b.id, children: b.name }, b.id)) })
821
821
  ] }) : null,
822
- /* @__PURE__ */ u("nav", { className: "cms-file-picker__path", "aria-label": a.path, children: [
823
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.up, disabled: r === "", onClick: T, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
822
+ /* @__PURE__ */ u("nav", { className: "cms-file-picker__path", "aria-label": r.path, children: [
823
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.up, disabled: a === "", onClick: L, children: /* @__PURE__ */ e(T, { name: "chevron-left" }) }),
824
824
  /* @__PURE__ */ u("ol", { children: [
825
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": r === "" ? "location" : void 0, onClick: () => f(""), children: de }) }),
825
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": a === "" ? "location" : void 0, onClick: () => h(""), children: de }) }),
826
826
  q.map((b, k) => {
827
827
  const B = q.slice(0, k + 1).join("/");
828
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": B === r ? "location" : void 0, onClick: () => f(B), children: b }) }, B);
828
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": B === a ? "location" : void 0, onClick: () => h(B), children: b }) }, B);
829
829
  })
830
830
  ] })
831
831
  ] }),
832
- D.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": H, onClick: () => ee((b) => !b), children: a.selected(D.length) }) : null
832
+ D.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": H, onClick: () => ee((b) => !b), children: r.selected(D.length) }) : null
833
833
  ] }),
834
834
  H && D.length > 0 ? /* @__PURE__ */ u("div", { className: "cms-file-picker__chosen", children: [
835
835
  /* @__PURE__ */ e("ul", { children: [...x.entries()].map(([b, k]) => /* @__PURE__ */ u("li", { children: [
836
836
  /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: k.name }),
837
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.remove(k.name), onClick: () => Z(b), children: /* @__PURE__ */ e(z, { name: "close" }) })
837
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.remove(k.name), onClick: () => V(b), children: /* @__PURE__ */ e(z, { name: "close" }) })
838
838
  ] }, b)) }),
839
839
  /* @__PURE__ */ e(le, { variant: "secondary", onClick: () => {
840
840
  S(/* @__PURE__ */ new Map()), ee(!1);
841
- }, children: a.clear })
841
+ }, children: r.clear })
842
842
  ] }) : null,
843
843
  /* @__PURE__ */ u("div", { className: "cms-file-picker__list", onScroll: (b) => {
844
844
  const k = b.currentTarget;
845
845
  k.scrollTop + k.clientHeight >= k.scrollHeight - dn && P();
846
846
  }, children: [
847
- p.status === "loading" ? /* @__PURE__ */ e(ne, { kind: "loading", title: a.loading, placement: "block" }) : null,
848
- p.status === "error" ? /* @__PURE__ */ e(ne, { kind: "error", title: a.error, placement: "block", action: { label: a.retry, onAction: () => w((b) => b + 1) } }) : null,
849
- p.status === "denied" ? /* @__PURE__ */ e(ne, { kind: "denied", title: a.denied, placement: "block" }) : null,
850
- p.status === "ready" && W.length === 0 ? /* @__PURE__ */ e(ne, { kind: "empty", title: a.empty, placement: "block" }) : null,
847
+ p.status === "loading" ? /* @__PURE__ */ e(ne, { kind: "loading", title: r.loading, placement: "block" }) : null,
848
+ p.status === "error" ? /* @__PURE__ */ e(ne, { kind: "error", title: r.error, placement: "block", action: { label: r.retry, onAction: () => w((b) => b + 1) } }) : null,
849
+ p.status === "denied" ? /* @__PURE__ */ e(ne, { kind: "denied", title: r.denied, placement: "block" }) : null,
850
+ p.status === "ready" && W.length === 0 ? /* @__PURE__ */ e(ne, { kind: "empty", title: r.empty, placement: "block" }) : null,
851
851
  /* @__PURE__ */ u(
852
852
  "div",
853
853
  {
854
854
  ref: j,
855
855
  role: "listbox",
856
856
  "aria-multiselectable": "true",
857
- "aria-label": a.files,
857
+ "aria-label": r.files,
858
858
  "aria-activedescendant": W.length > 0 ? ue(C) : void 0,
859
859
  tabIndex: 0,
860
860
  className: "cms-file-picker__entries",
@@ -862,7 +862,7 @@ function Wn(n) {
862
862
  onKeyDown: $,
863
863
  children: [
864
864
  W.map((b, k) => {
865
- const B = b.kind === "file" && x.has(Ne(d, b.id)), K = ie(b);
865
+ const B = b.kind === "file" && x.has(ye(o, b.id)), K = ie(b);
866
866
  return /* @__PURE__ */ u(
867
867
  "div",
868
868
  {
@@ -872,22 +872,22 @@ function Wn(n) {
872
872
  "aria-disabled": K !== null || void 0,
873
873
  className: A("cms-file-picker__entry", k === C && "is-active", B && "is-ticked", K !== null && "is-disabled"),
874
874
  onClick: () => {
875
- F(k), b.kind === "folder" ? v(b) : oe(b);
875
+ R(k), b.kind === "folder" ? g(b) : oe(b);
876
876
  },
877
877
  children: [
878
- /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: B ? /* @__PURE__ */ e(L, { name: "check" }) : null }),
879
- /* @__PURE__ */ e(L, { name: b.kind === "folder" ? "folder" : "file" }),
878
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: B ? /* @__PURE__ */ e(T, { name: "check" }) : null }),
879
+ /* @__PURE__ */ e(T, { name: b.kind === "folder" ? "folder" : "file" }),
880
880
  /* @__PURE__ */ u("span", { className: "cms-file-picker__text", children: [
881
881
  /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: b.name }),
882
882
  K !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: K }) : null
883
883
  ] }),
884
- b.kind === "file" && b.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: c(b.size) }) : null
884
+ b.kind === "file" && b.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: d(b.size) }) : null
885
885
  ]
886
886
  },
887
887
  b.id
888
888
  );
889
889
  }),
890
- p.status === "ready" && p.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(ne, { kind: "loading", title: a.loading, placement: "inline" }) }) : null
890
+ p.status === "ready" && p.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(ne, { kind: "loading", title: r.loading, placement: "inline" }) }) : null
891
891
  ]
892
892
  }
893
893
  )
@@ -896,20 +896,20 @@ function Wn(n) {
896
896
  }
897
897
  );
898
898
  }
899
- function jn({ title: n, scope: l, actions: t, backLink: o }) {
899
+ function jn({ title: n, scope: l, actions: t, backLink: i }) {
900
900
  return /* @__PURE__ */ u("header", { className: "cms-page-header", children: [
901
- o ? /* @__PURE__ */ u(
901
+ i ? /* @__PURE__ */ u(
902
902
  "a",
903
903
  {
904
904
  className: "cms-page-header__back",
905
- href: o.href ?? "#",
906
- onClick: (i) => {
907
- o.onBack && (i.preventDefault(), o.onBack());
905
+ href: i.href ?? "#",
906
+ onClick: (c) => {
907
+ i.onBack && (c.preventDefault(), i.onBack());
908
908
  },
909
909
  children: [
910
910
  /* @__PURE__ */ e(z, { name: "back" }),
911
911
  " ",
912
- o.label
912
+ i.label
913
913
  ]
914
914
  }
915
915
  ) : null,
@@ -922,43 +922,43 @@ function jn({ title: n, scope: l, actions: t, backLink: o }) {
922
922
  ] })
923
923
  ] });
924
924
  }
925
- function qn({ tabs: n, active: l, onSelect: t, label: o }) {
926
- const i = R([]), s = (c, a) => {
927
- var h;
928
- const m = n.length - 1, _ = c.key === "ArrowRight" ? a === m ? 0 : a + 1 : c.key === "ArrowLeft" ? a === 0 ? m : a - 1 : c.key === "Home" ? 0 : c.key === "End" ? m : null;
925
+ function qn({ tabs: n, active: l, onSelect: t, label: i }) {
926
+ const c = F([]), s = (d, r) => {
927
+ var m;
928
+ const f = n.length - 1, _ = d.key === "ArrowRight" ? r === f ? 0 : r + 1 : d.key === "ArrowLeft" ? r === 0 ? f : r - 1 : d.key === "Home" ? 0 : d.key === "End" ? f : null;
929
929
  if (_ === null) return;
930
- c.preventDefault();
931
- const d = n[_];
932
- d && (t(d.id), (h = i.current[_]) == null || h.focus());
930
+ d.preventDefault();
931
+ const o = n[_];
932
+ o && (t(o.id), (m = c.current[_]) == null || m.focus());
933
933
  };
934
- return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": o, children: n.map((c, a) => {
935
- const m = c.id === l;
934
+ return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": i, children: n.map((d, r) => {
935
+ const f = d.id === l;
936
936
  return /* @__PURE__ */ u(
937
937
  "button",
938
938
  {
939
939
  ref: (_) => {
940
- i.current[a] = _;
940
+ c.current[r] = _;
941
941
  },
942
942
  type: "button",
943
943
  role: "tab",
944
- className: A("cms-tab", m && "is-active"),
945
- "aria-selected": m,
946
- tabIndex: m ? 0 : -1,
947
- onClick: () => t(c.id),
948
- onKeyDown: (_) => s(_, a),
944
+ className: A("cms-tab", f && "is-active"),
945
+ "aria-selected": f,
946
+ tabIndex: f ? 0 : -1,
947
+ onClick: () => t(d.id),
948
+ onKeyDown: (_) => s(_, r),
949
949
  children: [
950
- c.label,
951
- c.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: c.count }) : null
950
+ d.label,
951
+ d.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: d.count }) : null
952
952
  ]
953
953
  },
954
- c.id
954
+ d.id
955
955
  );
956
956
  }) });
957
957
  }
958
958
  function un(n) {
959
- const l = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), t = (i) => {
959
+ const l = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), t = (c) => {
960
960
  var s;
961
- return (s = i == null ? void 0 : i.match(/[\p{L}\p{N}]/u)) == null ? void 0 : s[0];
961
+ return (s = c == null ? void 0 : c.match(/[\p{L}\p{N}]/u)) == null ? void 0 : s[0];
962
962
  };
963
963
  return (l.length > 1 ? [t(l[0]), t(l[l.length - 1])] : [t(l[0])]).filter(Boolean).join("").toUpperCase();
964
964
  }
@@ -968,19 +968,19 @@ function mn(n) {
968
968
  l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
969
969
  return l % 6 + 1;
970
970
  }
971
- function ve({ name: n, pictureUrl: l, presence: t, connection: o, deleted: i = !1, size: s = 32 }) {
972
- const c = o !== void 0 ? `is-${o.state === "offline" ? "disconnected" : o.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, a = o !== void 0 ? `${n}, ${o.label}` : t ? `${n}, ${t}` : n;
971
+ function ve({ name: n, pictureUrl: l, presence: t, connection: i, deleted: c = !1, size: s = 32 }) {
972
+ const d = i !== void 0 ? `is-${i.state === "offline" ? "disconnected" : i.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, r = i !== void 0 ? `${n}, ${i.label}` : t ? `${n}, ${t}` : n;
973
973
  return /* @__PURE__ */ u(
974
974
  "span",
975
975
  {
976
- className: A("cms-avatar", i ? "cms-avatar--deleted" : `cms-avatar--tint-${mn(n)}`),
976
+ className: A("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${mn(n)}`),
977
977
  style: { width: s, height: s, fontSize: Math.round(s * 0.4) },
978
978
  role: "img",
979
- "aria-label": a,
980
- ...o === void 0 ? {} : { title: o.label },
979
+ "aria-label": r,
980
+ ...i === void 0 ? {} : { title: i.label },
981
981
  children: [
982
- i ? /* @__PURE__ */ e(L, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: un(n) }),
983
- c === null ? null : /* @__PURE__ */ e("span", { className: A("cms-avatar__presence", c), "aria-hidden": "true" })
982
+ c ? /* @__PURE__ */ e(T, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: un(n) }),
983
+ d === null ? null : /* @__PURE__ */ e("span", { className: A("cms-avatar__presence", d), "aria-hidden": "true" })
984
984
  ]
985
985
  }
986
986
  );
@@ -991,53 +991,53 @@ function hn({ count: n, label: l, max: t = 99 }) {
991
991
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
992
992
  ] });
993
993
  }
994
- function Yn({ product: n, mark: l, rail: t, active: o, onNavigate: i, server: s, search: c, account: a, children: m, railLabel: _ = "Sections" }) {
994
+ function Yn({ product: n, mark: l, rail: t, active: i, onNavigate: c, server: s, search: d, account: r, children: f, railLabel: _ = "Sections" }) {
995
995
  return /* @__PURE__ */ u("div", { className: "cms-shell", children: [
996
996
  /* @__PURE__ */ u("nav", { className: "cms-shell__rail", "aria-label": _, children: [
997
997
  /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
998
- /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((d) => {
999
- const h = d.id === o;
998
+ /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((o) => {
999
+ const m = o.id === i;
1000
1000
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ u(
1001
1001
  "a",
1002
1002
  {
1003
- href: d.href,
1004
- className: A("cms-shell__item", h && "is-active"),
1005
- "aria-current": h ? "page" : void 0,
1006
- title: d.label,
1007
- onClick: (r) => {
1008
- i && (r.preventDefault(), i(d.id));
1003
+ href: o.href,
1004
+ className: A("cms-shell__item", m && "is-active"),
1005
+ "aria-current": m ? "page" : void 0,
1006
+ title: o.label,
1007
+ onClick: (a) => {
1008
+ c && (a.preventDefault(), c(o.id));
1009
1009
  },
1010
1010
  children: [
1011
1011
  /* @__PURE__ */ u("span", { className: "cms-shell__icon", children: [
1012
- /* @__PURE__ */ e(L, { name: d.icon, size: 22 }),
1013
- d.badge ? /* @__PURE__ */ e(hn, { count: d.badge.count, label: d.badge.label }) : null
1012
+ /* @__PURE__ */ e(T, { name: o.icon, size: 22 }),
1013
+ o.badge ? /* @__PURE__ */ e(hn, { count: o.badge.count, label: o.badge.label }) : null
1014
1014
  ] }),
1015
- /* @__PURE__ */ e("span", { className: "cms-shell__label", children: d.label })
1015
+ /* @__PURE__ */ e("span", { className: "cms-shell__label", children: o.label })
1016
1016
  ]
1017
1017
  }
1018
- ) }, d.id);
1018
+ ) }, o.id);
1019
1019
  }) })
1020
1020
  ] }),
1021
1021
  /* @__PURE__ */ u("header", { className: "cms-shell__top", children: [
1022
1022
  /* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
1023
1023
  s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
1024
- c != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: c }) : null,
1025
- a != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: a }) : null
1024
+ d != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: d }) : null,
1025
+ r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: r }) : null
1026
1026
  ] }),
1027
- /* @__PURE__ */ e("main", { className: "cms-shell__main", children: m })
1027
+ /* @__PURE__ */ e("main", { className: "cms-shell__main", children: f })
1028
1028
  ] });
1029
1029
  }
1030
- function Gn({ label: n, placeholder: l, value: t, onChange: o, onSearch: i }) {
1030
+ function Gn({ label: n, placeholder: l, value: t, onChange: i, onSearch: c }) {
1031
1031
  return /* @__PURE__ */ u(
1032
1032
  "form",
1033
1033
  {
1034
1034
  role: "search",
1035
1035
  className: "cms-search",
1036
1036
  onSubmit: (s) => {
1037
- s.preventDefault(), i == null || i(t);
1037
+ s.preventDefault(), c == null || c(t);
1038
1038
  },
1039
1039
  children: [
1040
- /* @__PURE__ */ e(L, { name: "search", size: 18 }),
1040
+ /* @__PURE__ */ e(T, { name: "search", size: 18 }),
1041
1041
  /* @__PURE__ */ e(
1042
1042
  "input",
1043
1043
  {
@@ -1046,58 +1046,78 @@ function Gn({ label: n, placeholder: l, value: t, onChange: o, onSearch: i }) {
1046
1046
  "aria-label": n,
1047
1047
  placeholder: l,
1048
1048
  value: t,
1049
- onChange: (s) => o(s.target.value)
1049
+ onChange: (s) => i(s.target.value)
1050
1050
  }
1051
1051
  )
1052
1052
  ]
1053
1053
  }
1054
1054
  );
1055
1055
  }
1056
- function fn({ options: n, value: l, onChange: t, label: o }) {
1057
- const i = R([]), s = (c, a) => {
1058
- var h;
1059
- const m = n.length - 1, _ = c.key === "ArrowRight" || c.key === "ArrowDown" ? a === m ? 0 : a + 1 : c.key === "ArrowLeft" || c.key === "ArrowUp" ? a === 0 ? m : a - 1 : null;
1060
- if (_ === null) return;
1061
- c.preventDefault();
1062
- const d = n[_];
1063
- d && (t(d.id), (h = i.current[_]) == null || h.focus());
1056
+ function fn({ options: n, value: l, onChange: t, label: i }) {
1057
+ const c = F([]), s = F(null), [d, r] = E({ start: !1, end: !1 }), f = () => {
1058
+ const m = s.current;
1059
+ if (m === null) return;
1060
+ const a = Math.abs(m.scrollLeft), h = a > 1, p = a + m.clientWidth < m.scrollWidth - 1;
1061
+ r((v) => v.start === h && v.end === p ? v : { start: h, end: p });
1062
+ };
1063
+ ge(() => {
1064
+ f();
1065
+ const m = s.current;
1066
+ if (m === null || typeof ResizeObserver > "u") return;
1067
+ const a = new ResizeObserver(f);
1068
+ a.observe(m);
1069
+ for (const h of c.current) h !== null && a.observe(h);
1070
+ return () => a.disconnect();
1071
+ }, [n]);
1072
+ const _ = (m) => {
1073
+ var a, h;
1074
+ return (h = (a = c.current[m]) == null ? void 0 : a.scrollIntoView) == null ? void 0 : h.call(a, { block: "nearest", inline: "nearest" });
1075
+ }, o = (m, a) => {
1076
+ var N;
1077
+ const h = n.length - 1, p = m.key === "ArrowRight" || m.key === "ArrowDown" ? a === h ? 0 : a + 1 : m.key === "ArrowLeft" || m.key === "ArrowUp" ? a === 0 ? h : a - 1 : null;
1078
+ if (p === null) return;
1079
+ m.preventDefault();
1080
+ const v = n[p];
1081
+ v && (t(v.id), (N = c.current[p]) == null || N.focus(), _(p));
1064
1082
  };
1065
- return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": o, children: n.map((c, a) => {
1066
- const m = c.id === l;
1083
+ return /* @__PURE__ */ e("div", { ref: s, className: A("cms-chips", d.start && "is-past-start", d.end && "is-past-end"), role: "radiogroup", "aria-label": i, onScroll: f, "data-scrolls-sideways": "", children: n.map((m, a) => {
1084
+ const h = m.id === l;
1067
1085
  return /* @__PURE__ */ u(
1068
1086
  "button",
1069
1087
  {
1070
- ref: (_) => {
1071
- i.current[a] = _;
1088
+ ref: (p) => {
1089
+ c.current[a] = p;
1072
1090
  },
1073
1091
  type: "button",
1074
1092
  role: "radio",
1075
- "aria-checked": m,
1076
- tabIndex: m ? 0 : -1,
1077
- className: A("cms-chip", m && "is-on"),
1078
- onClick: () => t(c.id),
1079
- onKeyDown: (_) => s(_, a),
1093
+ "aria-checked": h,
1094
+ tabIndex: h ? 0 : -1,
1095
+ className: A("cms-chip", h && "is-on"),
1096
+ onClick: () => {
1097
+ t(m.id), _(a);
1098
+ },
1099
+ onKeyDown: (p) => o(p, a),
1080
1100
  children: [
1081
- m ? /* @__PURE__ */ e(L, { name: "check", size: 16 }) : null,
1082
- c.label
1101
+ h ? /* @__PURE__ */ e(T, { name: "check", size: 16 }) : null,
1102
+ m.label
1083
1103
  ]
1084
1104
  },
1085
- c.id
1105
+ m.id
1086
1106
  );
1087
1107
  }) });
1088
1108
  }
1089
- const Le = 16;
1109
+ const Te = 16;
1090
1110
  function pn(n, l, t) {
1091
- const o = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1092
- let i = o.reduce((s, c) => s + c, 0) + t - l;
1093
- for (let s = o.length - 1; s >= 0 && i > 0; s -= 1) {
1094
- const c = Math.min(i, o[s] - n[s].min);
1095
- o[s] = o[s] - c, i -= c;
1111
+ const i = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1112
+ let c = i.reduce((s, d) => s + d, 0) + t - l;
1113
+ for (let s = i.length - 1; s >= 0 && c > 0; s -= 1) {
1114
+ const d = Math.min(c, i[s] - n[s].min);
1115
+ i[s] = i[s] - d, c -= d;
1096
1116
  }
1097
- return o;
1117
+ return i;
1098
1118
  }
1099
- function _n({ index: n, size: l, shown: t, others: o, room: i, lastMin: s, onResize: c }) {
1100
- const a = Math.max(l.min, Math.min(l.max, i > 0 ? i - o - s : l.max)), m = (h) => Math.round(Math.min(Math.max(h, l.min), a)), _ = R(null), d = (h, r) => c == null ? void 0 : c(n, m(h), r);
1119
+ function _n({ index: n, size: l, shown: t, others: i, room: c, lastMin: s, onResize: d }) {
1120
+ const r = Math.max(l.min, Math.min(l.max, c > 0 ? c - i - s : l.max)), f = (m) => Math.round(Math.min(Math.max(m, l.min), r)), _ = F(null), o = (m, a) => d == null ? void 0 : d(n, f(m), a);
1101
1121
  return /* @__PURE__ */ e(
1102
1122
  "div",
1103
1123
  {
@@ -1107,73 +1127,73 @@ function _n({ index: n, size: l, shown: t, others: o, room: i, lastMin: s, onRes
1107
1127
  "aria-label": l.label,
1108
1128
  "aria-valuenow": t,
1109
1129
  "aria-valuemin": l.min,
1110
- "aria-valuemax": a,
1130
+ "aria-valuemax": r,
1111
1131
  className: "cms-panes__splitter",
1112
1132
  style: { "--split-at": `var(--split-pane-end-${String(n)})` },
1113
- onPointerDown: (h) => {
1114
- var r, f, p;
1115
- h.button > 0 || (h.preventDefault(), (f = (r = h.currentTarget).setPointerCapture) == null || f.call(r, h.pointerId), _.current = { x: h.clientX, from: t, last: t }, (p = h.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
1133
+ onPointerDown: (m) => {
1134
+ var a, h, p;
1135
+ m.button > 0 || (m.preventDefault(), (h = (a = m.currentTarget).setPointerCapture) == null || h.call(a, m.pointerId), _.current = { x: m.clientX, from: t, last: t }, (p = m.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
1116
1136
  },
1117
- onPointerMove: (h) => {
1118
- const r = _.current;
1119
- r === null || !Number.isFinite(h.clientX) || (r.last = m(r.from + h.clientX - r.x), d(r.last, !1));
1137
+ onPointerMove: (m) => {
1138
+ const a = _.current;
1139
+ a === null || !Number.isFinite(m.clientX) || (a.last = f(a.from + m.clientX - a.x), o(a.last, !1));
1120
1140
  },
1121
- onPointerUp: (h) => {
1122
- var f;
1123
- const r = _.current;
1124
- r !== null && (_.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), d(r.last, !0));
1141
+ onPointerUp: (m) => {
1142
+ var h;
1143
+ const a = _.current;
1144
+ a !== null && (_.current = null, (h = m.currentTarget.closest(".cms-panes")) == null || h.classList.remove("is-resizing"), o(a.last, !0));
1125
1145
  },
1126
- onPointerCancel: (h) => {
1127
- var f;
1128
- const r = _.current;
1129
- _.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), r !== null && d(r.last, !0);
1146
+ onPointerCancel: (m) => {
1147
+ var h;
1148
+ const a = _.current;
1149
+ _.current = null, (h = m.currentTarget.closest(".cms-panes")) == null || h.classList.remove("is-resizing"), a !== null && o(a.last, !0);
1130
1150
  },
1131
- onDoubleClick: () => d(l.reset, !0),
1132
- onKeyDown: (h) => {
1133
- const r = h.key === "ArrowLeft" ? t - Le : h.key === "ArrowRight" ? t + Le : h.key === "Home" ? l.min : h.key === "End" ? a : h.key === "Enter" ? l.reset : null;
1134
- r !== null && (h.preventDefault(), d(r, !0));
1151
+ onDoubleClick: () => o(l.reset, !0),
1152
+ onKeyDown: (m) => {
1153
+ const a = m.key === "ArrowLeft" ? t - Te : m.key === "ArrowRight" ? t + Te : m.key === "Home" ? l.min : m.key === "End" ? r : m.key === "Enter" ? l.reset : null;
1154
+ a !== null && (m.preventDefault(), o(a, !0));
1135
1155
  }
1136
1156
  }
1137
1157
  );
1138
1158
  }
1139
- function Xn({ panes: n, active: l, back: t, sizes: o, lastMin: i = 360, onResize: s }) {
1140
- const c = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), a = R(null), [m, _] = E(0), d = (o ?? []).slice(0, n.length - 1), h = d.length === n.length - 1 && d.every((p) => p !== void 0);
1141
- xe(() => {
1142
- const p = a.current;
1143
- if (p === null || !h) return;
1144
- const g = () => _(p.clientWidth);
1145
- if (g(), typeof ResizeObserver > "u") return;
1146
- const N = new ResizeObserver(g);
1159
+ function Xn({ panes: n, active: l, back: t, sizes: i, lastMin: c = 360, onResize: s }) {
1160
+ const d = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), r = F(null), [f, _] = E(0), o = (i ?? []).slice(0, n.length - 1), m = o.length === n.length - 1 && o.every((p) => p !== void 0);
1161
+ ge(() => {
1162
+ const p = r.current;
1163
+ if (p === null || !m) return;
1164
+ const v = () => _(p.clientWidth);
1165
+ if (v(), typeof ResizeObserver > "u") return;
1166
+ const N = new ResizeObserver(v);
1147
1167
  return N.observe(p), () => N.disconnect();
1148
- }, [h]);
1149
- const r = h ? pn(d, m > 0 ? m : Number.POSITIVE_INFINITY, i) : [], f = h ? Object.fromEntries(r.flatMap((p, g) => [
1150
- [`--split-pane-${String(g)}`, `${String(p)}px`],
1151
- [`--split-pane-end-${String(g)}`, `${String(r.slice(0, g + 1).reduce((N, w) => N + w, 0))}px`]
1168
+ }, [m]);
1169
+ const a = m ? pn(o, f > 0 ? f : Number.POSITIVE_INFINITY, c) : [], h = m ? Object.fromEntries(a.flatMap((p, v) => [
1170
+ [`--split-pane-${String(v)}`, `${String(p)}px`],
1171
+ [`--split-pane-end-${String(v)}`, `${String(a.slice(0, v + 1).reduce((N, w) => N + w, 0))}px`]
1152
1172
  ])) : void 0;
1153
1173
  return /* @__PURE__ */ u(
1154
1174
  "div",
1155
1175
  {
1156
- ref: a,
1157
- className: A("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", h && "cms-panes--sized"),
1158
- "data-active": c,
1159
- style: f,
1176
+ ref: r,
1177
+ className: A("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", m && "cms-panes--sized"),
1178
+ "data-active": d,
1179
+ style: h,
1160
1180
  children: [
1161
- n.map((p, g) => /* @__PURE__ */ u("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": c - g, children: [
1162
- g === c && t ? /* @__PURE__ */ u("a", { className: "cms-panes__back", href: t.href, children: [
1163
- /* @__PURE__ */ e(L, { name: "chevron-left", size: 18 }),
1181
+ n.map((p, v) => /* @__PURE__ */ u("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": d - v, children: [
1182
+ v === d && t ? /* @__PURE__ */ u("a", { className: "cms-panes__back", href: t.href, children: [
1183
+ /* @__PURE__ */ e(T, { name: "chevron-left", size: 18 }),
1164
1184
  t.label
1165
1185
  ] }) : null,
1166
1186
  p.content
1167
1187
  ] }, p.label)),
1168
- h ? d.map((p, g) => /* @__PURE__ */ e(
1188
+ m ? o.map((p, v) => /* @__PURE__ */ e(
1169
1189
  _n,
1170
1190
  {
1171
- index: g,
1191
+ index: v,
1172
1192
  size: p,
1173
- shown: r[g],
1174
- others: r.reduce((N, w, x) => x === g ? N : N + w, 0),
1175
- room: m,
1176
- lastMin: i,
1193
+ shown: a[v],
1194
+ others: a.reduce((N, w, x) => x === v ? N : N + w, 0),
1195
+ room: f,
1196
+ lastMin: c,
1177
1197
  onResize: s
1178
1198
  },
1179
1199
  p.label
@@ -1183,26 +1203,26 @@ function Xn({ panes: n, active: l, back: t, sizes: o, lastMin: i = 360, onResize
1183
1203
  );
1184
1204
  }
1185
1205
  const bn = { attachment: "Has an attachment", unread: "Unread" };
1186
- function Jn({ from: n, subject: l, preview: t, time: o, unread: i, hasAttachment: s, selected: c, onOpen: a, labels: m }) {
1187
- const _ = ce(bn, m);
1206
+ function Jn({ from: n, subject: l, preview: t, time: i, unread: c, hasAttachment: s, selected: d, onOpen: r, labels: f }) {
1207
+ const _ = ce(bn, f);
1188
1208
  return /* @__PURE__ */ u(
1189
1209
  "button",
1190
1210
  {
1191
1211
  type: "button",
1192
- className: A("cms-mail-row", i && "is-unread", c && "is-selected"),
1193
- "aria-current": c ? "true" : void 0,
1194
- onClick: a,
1212
+ className: A("cms-mail-row", c && "is-unread", d && "is-selected"),
1213
+ "aria-current": d ? "true" : void 0,
1214
+ onClick: r,
1195
1215
  children: [
1196
1216
  /* @__PURE__ */ e(ve, { name: n, size: 40 }),
1197
1217
  /* @__PURE__ */ u("span", { className: "cms-mail-row__body", children: [
1198
1218
  /* @__PURE__ */ u("span", { className: "cms-mail-row__line", children: [
1199
1219
  /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1200
- s ? /* @__PURE__ */ e(L, { name: "paperclip", size: 16, label: _.attachment }) : null,
1201
- /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: o })
1220
+ s ? /* @__PURE__ */ e(T, { name: "paperclip", size: 16, label: _.attachment }) : null,
1221
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: i })
1202
1222
  ] }),
1203
1223
  /* @__PURE__ */ u("span", { className: "cms-mail-row__line", children: [
1204
1224
  /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1205
- i ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": _.unread }) : null
1225
+ c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": _.unread }) : null
1206
1226
  ] }),
1207
1227
  /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
1208
1228
  ] })
@@ -1210,45 +1230,45 @@ function Jn({ from: n, subject: l, preview: t, time: o, unread: i, hasAttachment
1210
1230
  }
1211
1231
  );
1212
1232
  }
1213
- function Qn({ direction: n, children: l, time: t, read: o, readLabel: i = "Read" }) {
1233
+ function Qn({ direction: n, children: l, time: t, read: i, readLabel: c = "Read" }) {
1214
1234
  return /* @__PURE__ */ u("div", { className: A("cms-bubble", `cms-bubble--${n}`), children: [
1215
1235
  /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: l }),
1216
1236
  /* @__PURE__ */ u("div", { className: "cms-bubble__meta", children: [
1217
1237
  t,
1218
- n === "out" && o ? /* @__PURE__ */ u(M, { children: [
1238
+ n === "out" && i ? /* @__PURE__ */ u(M, { children: [
1219
1239
  " · ",
1220
- i
1240
+ c
1221
1241
  ] }) : null
1222
1242
  ] })
1223
1243
  ] });
1224
1244
  }
1225
- function el({ label: n, value: l, onChange: t, onSend: o, onAttach: i, placeholder: s, variant: c = "chat", sendLabel: a = "Send", attachLabel: m = "Attach a file", leading: _, canSend: d }) {
1226
- const h = G(), r = d ?? l.trim() !== "", f = (g) => {
1227
- g.preventDefault(), r && o();
1228
- }, p = i ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: i, children: /* @__PURE__ */ e(L, { name: "paperclip" }) }) : null;
1229
- return /* @__PURE__ */ u("form", { className: A("cms-composer", `cms-composer--${c}`), onSubmit: f, children: [
1230
- /* @__PURE__ */ e("label", { htmlFor: h, className: c === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1231
- c === "chat" ? p : null,
1245
+ function el({ label: n, value: l, onChange: t, onSend: i, onAttach: c, placeholder: s, variant: d = "chat", sendLabel: r = "Send", attachLabel: f = "Attach a file", leading: _, canSend: o }) {
1246
+ const m = G(), a = o ?? l.trim() !== "", h = (v) => {
1247
+ v.preventDefault(), a && i();
1248
+ }, p = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": f, onClick: c, children: /* @__PURE__ */ e(T, { name: "paperclip" }) }) : null;
1249
+ return /* @__PURE__ */ u("form", { className: A("cms-composer", `cms-composer--${d}`), onSubmit: h, children: [
1250
+ /* @__PURE__ */ e("label", { htmlFor: m, className: d === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1251
+ d === "chat" ? p : null,
1232
1252
  /* @__PURE__ */ e(
1233
1253
  "textarea",
1234
1254
  {
1235
- id: h,
1255
+ id: m,
1236
1256
  className: "cms-composer__input",
1237
- rows: c === "reply" ? 3 : 1,
1257
+ rows: d === "reply" ? 3 : 1,
1238
1258
  placeholder: s,
1239
1259
  value: l,
1240
- onChange: (g) => t(g.target.value),
1241
- onKeyDown: (g) => {
1242
- g.nativeEvent.isComposing || g.keyCode === 229 || c === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), r && o());
1260
+ onChange: (v) => t(v.target.value),
1261
+ onKeyDown: (v) => {
1262
+ v.nativeEvent.isComposing || v.keyCode === 229 || d === "chat" && v.key === "Enter" && !v.shiftKey && (v.preventDefault(), a && i());
1243
1263
  }
1244
1264
  }
1245
1265
  ),
1246
- c === "reply" && _ !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: _ }) : null,
1247
- c === "reply" ? p : null,
1248
- c === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": a, disabled: !r, children: /* @__PURE__ */ e(L, { name: "send" }) }) : /* @__PURE__ */ u("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !r, children: [
1249
- a,
1266
+ d === "reply" && _ !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: _ }) : null,
1267
+ d === "reply" ? p : null,
1268
+ d === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": r, disabled: !a, children: /* @__PURE__ */ e(T, { name: "send" }) }) : /* @__PURE__ */ u("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !a, children: [
1269
+ r,
1250
1270
  " ",
1251
- /* @__PURE__ */ e(L, { name: "send", size: 18 })
1271
+ /* @__PURE__ */ e(T, { name: "send", size: 18 })
1252
1272
  ] })
1253
1273
  ] });
1254
1274
  }
@@ -1273,72 +1293,72 @@ const Ee = {
1273
1293
  onCallWith: (n) => `On a call with ${n}`,
1274
1294
  returnToCall: "Return to call"
1275
1295
  };
1276
- function nl({ name: n, media: l, onAccept: t, onDecline: o, labels: i }) {
1277
- const s = ce(Ee, i), c = l === "video" ? s.incomingVideo : s.incomingAudio;
1278
- return /* @__PURE__ */ u("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(c, n), children: [
1296
+ function nl({ name: n, media: l, onAccept: t, onDecline: i, labels: c }) {
1297
+ const s = ce(Ee, c), d = l === "video" ? s.incomingVideo : s.incomingAudio;
1298
+ return /* @__PURE__ */ u("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(d, n), children: [
1279
1299
  /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ve, { name: n, size: 112 }) }),
1280
1300
  /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
1281
- /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: c }),
1301
+ /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: d }),
1282
1302
  /* @__PURE__ */ u("div", { className: "cms-call-incoming__actions", children: [
1283
- /* @__PURE__ */ e(ae, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: o }),
1303
+ /* @__PURE__ */ e(ae, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: i }),
1284
1304
  /* @__PURE__ */ e(ae, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
1285
1305
  ] })
1286
1306
  ] });
1287
1307
  }
1288
- function ae({ icon: n, label: l, onClick: t, tone: o = "plain", pressed: i }) {
1308
+ function ae({ icon: n, label: l, onClick: t, tone: i = "plain", pressed: c }) {
1289
1309
  return /* @__PURE__ */ u(
1290
1310
  "button",
1291
1311
  {
1292
1312
  type: "button",
1293
- className: A("cms-call-button", `cms-call-button--${o}`, i && "is-pressed"),
1294
- "aria-pressed": i,
1313
+ className: A("cms-call-button", `cms-call-button--${i}`, c && "is-pressed"),
1314
+ "aria-pressed": c,
1295
1315
  onClick: t,
1296
1316
  children: [
1297
- /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(L, { name: n, size: 24 }) }),
1317
+ /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(T, { name: n, size: 24 }) }),
1298
1318
  /* @__PURE__ */ e("span", { className: "cms-call-button__label", children: l })
1299
1319
  ]
1300
1320
  }
1301
1321
  );
1302
1322
  }
1303
- function ll({ name: n, duration: l, connection: t, you: o, muted: i, speaker: s, onToggleMute: c, onToggleSpeaker: a, onAddPerson: m, onChat: _, onHangUp: d, labels: h }) {
1304
- const r = ce(Ee, h);
1305
- return /* @__PURE__ */ u("section", { className: "cms-call-panel", "aria-label": r.callWith(n), children: [
1323
+ function ll({ name: n, duration: l, connection: t, you: i, muted: c, speaker: s, onToggleMute: d, onToggleSpeaker: r, onAddPerson: f, onChat: _, onHangUp: o, labels: m }) {
1324
+ const a = ce(Ee, m);
1325
+ return /* @__PURE__ */ u("section", { className: "cms-call-panel", "aria-label": a.callWith(n), children: [
1306
1326
  /* @__PURE__ */ u("div", { className: "cms-call-panel__head", children: [
1307
1327
  /* @__PURE__ */ e(ve, { name: n, size: 64 }),
1308
1328
  /* @__PURE__ */ u("div", { className: "cms-call-panel__who", children: [
1309
1329
  /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1310
- /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": r.callTime(l), children: l })
1330
+ /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": a.callTime(l), children: l })
1311
1331
  ] }),
1312
- /* @__PURE__ */ e("span", { className: A("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? r.goodConnection : r.poorConnection })
1332
+ /* @__PURE__ */ e("span", { className: A("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? a.goodConnection : a.poorConnection })
1313
1333
  ] }),
1314
1334
  /* @__PURE__ */ u("div", { className: "cms-call-panel__you", children: [
1315
- /* @__PURE__ */ e(ve, { name: o.name, size: 36 }),
1316
- /* @__PURE__ */ e("span", { children: r.you }),
1317
- o.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": r.speaking }) : null
1335
+ /* @__PURE__ */ e(ve, { name: i.name, size: 36 }),
1336
+ /* @__PURE__ */ e("span", { children: a.you }),
1337
+ i.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": a.speaking }) : null
1318
1338
  ] }),
1319
1339
  /* @__PURE__ */ u("div", { className: "cms-call-panel__controls", children: [
1320
- /* @__PURE__ */ e(ae, { icon: "mic", label: i ? r.unmute : r.mute, pressed: i, onClick: c }),
1321
- /* @__PURE__ */ e(ae, { icon: "speaker", label: r.speaker, pressed: s, onClick: a }),
1322
- m ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: r.addPerson, onClick: m }) : null,
1323
- _ ? /* @__PURE__ */ e(ae, { icon: "chat", label: r.chat, onClick: _ }) : null,
1324
- /* @__PURE__ */ e(ae, { icon: "phone-off", label: r.hangUp, tone: "hang-up", onClick: d })
1340
+ /* @__PURE__ */ e(ae, { icon: "mic", label: c ? a.unmute : a.mute, pressed: c, onClick: d }),
1341
+ /* @__PURE__ */ e(ae, { icon: "speaker", label: a.speaker, pressed: s, onClick: r }),
1342
+ f ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: a.addPerson, onClick: f }) : null,
1343
+ _ ? /* @__PURE__ */ e(ae, { icon: "chat", label: a.chat, onClick: _ }) : null,
1344
+ /* @__PURE__ */ e(ae, { icon: "phone-off", label: a.hangUp, tone: "hang-up", onClick: o })
1325
1345
  ] })
1326
1346
  ] });
1327
1347
  }
1328
- function tl({ name: n, duration: l, muted: t, onToggleMute: o, onReturn: i, onHangUp: s, labels: c }) {
1329
- const a = ce(Ee, c);
1330
- return /* @__PURE__ */ u("section", { className: "cms-call-bar", "aria-label": a.callWith(n), children: [
1348
+ function tl({ name: n, duration: l, muted: t, onToggleMute: i, onReturn: c, onHangUp: s, labels: d }) {
1349
+ const r = ce(Ee, d);
1350
+ return /* @__PURE__ */ u("section", { className: "cms-call-bar", "aria-label": r.callWith(n), children: [
1331
1351
  /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1332
- /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: a.onCallWith(n) }),
1352
+ /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: r.onCallWith(n) }),
1333
1353
  /* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: l }),
1334
1354
  /* @__PURE__ */ u("span", { className: "cms-call-bar__actions", children: [
1335
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? a.unmute : a.mute, "aria-pressed": t, onClick: o, children: /* @__PURE__ */ e(L, { name: "mic" }) }),
1336
- /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: i, children: a.returnToCall }),
1337
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": a.hangUp, onClick: s, children: /* @__PURE__ */ e(L, { name: "phone-off" }) })
1355
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? r.unmute : r.mute, "aria-pressed": t, onClick: i, children: /* @__PURE__ */ e(T, { name: "mic" }) }),
1356
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: c, children: r.returnToCall }),
1357
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": r.hangUp, onClick: s, children: /* @__PURE__ */ e(T, { name: "phone-off" }) })
1338
1358
  ] })
1339
1359
  ] });
1340
1360
  }
1341
- function al({ mark: n, product: l, headline: t, lead: o, features: i = [], children: s }) {
1361
+ function al({ mark: n, product: l, headline: t, lead: i, features: c = [], children: s }) {
1342
1362
  return /* @__PURE__ */ u("div", { className: "cms-signin", children: [
1343
1363
  /* @__PURE__ */ u("aside", { className: "cms-signin__brand", children: [
1344
1364
  /* @__PURE__ */ u("p", { className: "cms-signin__logo", children: [
@@ -1347,11 +1367,11 @@ function al({ mark: n, product: l, headline: t, lead: o, features: i = [], child
1347
1367
  ] }),
1348
1368
  /* @__PURE__ */ u("div", { className: "cms-signin__pitch", children: [
1349
1369
  /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
1350
- /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: o }),
1351
- i.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: i.map((c) => /* @__PURE__ */ u("li", { children: [
1352
- /* @__PURE__ */ e(L, { name: c.icon, size: 18 }),
1353
- c.label
1354
- ] }, c.label)) }) : null
1370
+ /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: i }),
1371
+ c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((d) => /* @__PURE__ */ u("li", { children: [
1372
+ /* @__PURE__ */ e(T, { name: d.icon, size: 18 }),
1373
+ d.label
1374
+ ] }, d.label)) }) : null
1355
1375
  ] })
1356
1376
  ] }),
1357
1377
  /* @__PURE__ */ e("main", { className: "cms-signin__form", children: s })
@@ -1369,56 +1389,56 @@ const vn = {
1369
1389
  newHere: "New here?",
1370
1390
  create: "Create an account"
1371
1391
  };
1372
- function sl({ server: n, onSubmit: l, forgotHref: t, createHref: o, error: i, busy: s, labels: c }) {
1373
- const a = ce(vn, c), m = G(), [_, d] = E(""), [h, r] = E(""), [f, p] = E(!1);
1392
+ function sl({ server: n, onSubmit: l, forgotHref: t, createHref: i, error: c, busy: s, labels: d }) {
1393
+ const r = ce(vn, d), f = G(), [_, o] = E(""), [m, a] = E(""), [h, p] = E(!1);
1374
1394
  return /* @__PURE__ */ u("form", { className: "cms-signin-form", onSubmit: (N) => {
1375
- N.preventDefault(), l(_, h);
1376
- }, "aria-describedby": i ? `${m}-error` : void 0, children: [
1377
- /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: a.title }),
1395
+ N.preventDefault(), l(_, m);
1396
+ }, "aria-describedby": c ? `${f}-error` : void 0, children: [
1397
+ /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: r.title }),
1378
1398
  /* @__PURE__ */ u("p", { className: "cms-signin-form__server", children: [
1379
- /* @__PURE__ */ e(L, { name: "server", size: 18 }),
1399
+ /* @__PURE__ */ e(T, { name: "server", size: 18 }),
1380
1400
  n
1381
1401
  ] }),
1382
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-identifier`, children: a.identifier }),
1402
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${f}-identifier`, children: r.identifier }),
1383
1403
  /* @__PURE__ */ e(
1384
1404
  "input",
1385
1405
  {
1386
- id: `${m}-identifier`,
1406
+ id: `${f}-identifier`,
1387
1407
  className: "cms-signin-form__input",
1388
1408
  type: "text",
1389
1409
  autoComplete: "username",
1390
- placeholder: a.identifierPlaceholder,
1410
+ placeholder: r.identifierPlaceholder,
1391
1411
  value: _,
1392
- onChange: (N) => d(N.target.value),
1412
+ onChange: (N) => o(N.target.value),
1393
1413
  required: !0
1394
1414
  }
1395
1415
  ),
1396
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-password`, children: a.password }),
1416
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${f}-password`, children: r.password }),
1397
1417
  /* @__PURE__ */ u("span", { className: "cms-signin-form__password", children: [
1398
1418
  /* @__PURE__ */ e(
1399
1419
  "input",
1400
1420
  {
1401
- id: `${m}-password`,
1421
+ id: `${f}-password`,
1402
1422
  className: "cms-signin-form__input",
1403
- type: f ? "text" : "password",
1423
+ type: h ? "text" : "password",
1404
1424
  autoComplete: "current-password",
1405
- value: h,
1406
- onChange: (N) => r(N.target.value),
1425
+ value: m,
1426
+ onChange: (N) => a(N.target.value),
1407
1427
  required: !0
1408
1428
  }
1409
1429
  ),
1410
- /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": f, onClick: () => p((N) => !N), children: f ? a.hide : a.show })
1430
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": h, onClick: () => p((N) => !N), children: h ? r.hide : r.show })
1411
1431
  ] }),
1412
- t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: a.forgot }) : null,
1413
- i ? /* @__PURE__ */ e("p", { id: `${m}-error`, className: "cms-signin-form__error", role: "alert", children: i }) : null,
1414
- /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children: a.submit }),
1415
- o ? /* @__PURE__ */ u(M, { children: [
1416
- /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: a.newHere }) }),
1417
- /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: o, children: a.create })
1432
+ t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: r.forgot }) : null,
1433
+ c ? /* @__PURE__ */ e("p", { id: `${f}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
1434
+ /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children: r.submit }),
1435
+ i ? /* @__PURE__ */ u(M, { children: [
1436
+ /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: r.newHere }) }),
1437
+ /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: i, children: r.create })
1418
1438
  ] }) : null
1419
1439
  ] });
1420
1440
  }
1421
- const we = 64;
1441
+ const ke = 64;
1422
1442
  function gn(n, l) {
1423
1443
  for (let t = n instanceof Element ? n : null; t !== null; t = t.parentElement) {
1424
1444
  if (t instanceof HTMLElement && t.scrollTop > 0) return !1;
@@ -1427,27 +1447,27 @@ function gn(n, l) {
1427
1447
  return l.scrollTop <= 0;
1428
1448
  }
1429
1449
  function Nn(n, l) {
1430
- const [t, o] = E(0), i = R(l);
1431
- return i.current = l, Y(() => {
1450
+ const [t, i] = E(0), c = F(l);
1451
+ return c.current = l, Y(() => {
1432
1452
  const s = n.current;
1433
1453
  if (s === null) return;
1434
- let c = null, a = 0;
1435
- const m = (h) => {
1436
- c = gn(h.target, s) && h.touches.length === 1 ? h.touches[0].clientY : null, a = 0;
1437
- }, _ = (h) => {
1438
- if (c === null || i.current === null) return;
1439
- const r = h.touches[0].clientY - c;
1440
- if (r <= 0) {
1441
- c = null, o(0);
1454
+ let d = null, r = 0;
1455
+ const f = (m) => {
1456
+ d = gn(m.target, s) && m.touches.length === 1 ? m.touches[0].clientY : null, r = 0;
1457
+ }, _ = (m) => {
1458
+ if (d === null || c.current === null) return;
1459
+ const a = m.touches[0].clientY - d;
1460
+ if (a <= 0) {
1461
+ d = null, i(0);
1442
1462
  return;
1443
1463
  }
1444
- h.cancelable && h.preventDefault(), a = Math.min(r * 0.6, we * 1.5), o(a);
1445
- }, d = () => {
1446
- var h;
1447
- c !== null && a >= we && ((h = i.current) == null || h.call(i)), c = null, a = 0, o(0);
1464
+ m.cancelable && m.preventDefault(), r = Math.min(a * 0.6, ke * 1.5), i(r);
1465
+ }, o = () => {
1466
+ var m;
1467
+ d !== null && r >= ke && ((m = c.current) == null || m.call(c)), d = null, r = 0, i(0);
1448
1468
  };
1449
- return s.addEventListener("touchstart", m, { passive: !0 }), s.addEventListener("touchmove", _, { passive: !1 }), s.addEventListener("touchend", d), s.addEventListener("touchcancel", d), () => {
1450
- s.removeEventListener("touchstart", m), s.removeEventListener("touchmove", _), s.removeEventListener("touchend", d), s.removeEventListener("touchcancel", d);
1469
+ return s.addEventListener("touchstart", f, { passive: !0 }), s.addEventListener("touchmove", _, { passive: !1 }), s.addEventListener("touchend", o), s.addEventListener("touchcancel", o), () => {
1470
+ s.removeEventListener("touchstart", f), s.removeEventListener("touchmove", _), s.removeEventListener("touchend", o), s.removeEventListener("touchcancel", o);
1451
1471
  };
1452
1472
  }, [n]), t;
1453
1473
  }
@@ -1455,92 +1475,92 @@ const Fe = Ue(null);
1455
1475
  function yn() {
1456
1476
  return Ke(Fe);
1457
1477
  }
1458
- function rl({ label: n, rows: l, error: t, onRetry: o, loadingText: i = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: c, selected: a, onOpen: m, onRowMenu: _ }) {
1459
- const d = R([]), h = yn();
1460
- if (t != null) return /* @__PURE__ */ e(Ge, { message: t, onRetry: o });
1461
- if (l === null) return /* @__PURE__ */ e(qe, { what: i, layout: "block" });
1462
- if (l.length === 0) return /* @__PURE__ */ e(Ye, { title: s, hint: c });
1463
- const r = (f, p, g) => {
1478
+ function rl({ label: n, rows: l, error: t, onRetry: i, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: d, selected: r, onOpen: f, onRowMenu: _ }) {
1479
+ const o = F([]), m = yn();
1480
+ if (t != null) return /* @__PURE__ */ e(Ge, { message: t, onRetry: i });
1481
+ if (l === null) return /* @__PURE__ */ e(qe, { what: c, layout: "block" });
1482
+ if (l.length === 0) return /* @__PURE__ */ e(Ye, { title: s, hint: d });
1483
+ const a = (h, p, v) => {
1464
1484
  var N;
1465
- if (f.key === "ArrowDown" || f.key === "ArrowUp")
1466
- f.preventDefault(), (N = d.current[Math.min(l.length - 1, Math.max(0, p + (f.key === "ArrowDown" ? 1 : -1)))]) == null || N.focus();
1467
- else if (f.key === "Enter")
1468
- m == null || m(g);
1469
- else if ((f.key === "ContextMenu" || f.shiftKey && f.key === "F10") && _) {
1470
- f.preventDefault();
1471
- const w = f.currentTarget.getBoundingClientRect();
1472
- _(g, { x: w.left + 16, y: w.bottom });
1485
+ if (h.key === "ArrowDown" || h.key === "ArrowUp")
1486
+ h.preventDefault(), (N = o.current[Math.min(l.length - 1, Math.max(0, p + (h.key === "ArrowDown" ? 1 : -1)))]) == null || N.focus();
1487
+ else if (h.key === "Enter")
1488
+ f == null || f(v);
1489
+ else if ((h.key === "ContextMenu" || h.shiftKey && h.key === "F10") && _) {
1490
+ h.preventDefault();
1491
+ const w = h.currentTarget.getBoundingClientRect();
1492
+ _(v, { x: w.left + 16, y: w.bottom });
1473
1493
  }
1474
1494
  };
1475
1495
  return /* @__PURE__ */ u(M, { children: [
1476
- h !== null && (h.distance > 0 || h.refreshing) ? /* @__PURE__ */ u("div", { className: "cms-list__pull", role: "status", style: { height: h.refreshing ? void 0 : h.distance }, "data-ready": h.distance >= we ? "" : void 0, children: [
1477
- h.refreshing ? /* @__PURE__ */ e(z, { name: "spinner" }) : null,
1478
- h.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: h.text }) : null
1496
+ m !== null && (m.distance > 0 || m.refreshing) ? /* @__PURE__ */ u("div", { className: "cms-list__pull", role: "status", style: { height: m.refreshing ? void 0 : m.distance }, "data-ready": m.distance >= ke ? "" : void 0, children: [
1497
+ m.refreshing ? /* @__PURE__ */ e(z, { name: "spinner" }) : null,
1498
+ m.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: m.text }) : null
1479
1499
  ] }) : null,
1480
- /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((f, p) => {
1481
- const g = f.id === a;
1500
+ /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((h, p) => {
1501
+ const v = h.id === r;
1482
1502
  return /* @__PURE__ */ u(
1483
1503
  "li",
1484
1504
  {
1485
1505
  ref: (N) => {
1486
- d.current[p] = N;
1506
+ o.current[p] = N;
1487
1507
  },
1488
1508
  role: "option",
1489
- "aria-selected": g,
1490
- tabIndex: g || a == null && p === 0 ? 0 : -1,
1491
- className: A("cms-list__row", g && "is-selected"),
1492
- onClick: () => m == null ? void 0 : m(f.id),
1493
- onKeyDown: (N) => r(N, p, f.id),
1509
+ "aria-selected": v,
1510
+ tabIndex: v || r == null && p === 0 ? 0 : -1,
1511
+ className: A("cms-list__row", v && "is-selected"),
1512
+ onClick: () => f == null ? void 0 : f(h.id),
1513
+ onKeyDown: (N) => a(N, p, h.id),
1494
1514
  onContextMenu: _ ? (N) => {
1495
- N.preventDefault(), _(f.id, { x: N.clientX, y: N.clientY });
1515
+ N.preventDefault(), _(h.id, { x: N.clientX, y: N.clientY });
1496
1516
  } : void 0,
1497
1517
  children: [
1498
- f.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: f.lead }) : null,
1518
+ h.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: h.lead }) : null,
1499
1519
  /* @__PURE__ */ u("span", { className: "cms-list__text", children: [
1500
- /* @__PURE__ */ e("span", { className: A("cms-list__primary", f.unread === !0 && "is-unread"), children: f.primary }),
1501
- f.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: f.secondary }) : null
1520
+ /* @__PURE__ */ e("span", { className: A("cms-list__primary", h.unread === !0 && "is-unread"), children: h.primary }),
1521
+ h.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: h.secondary }) : null
1502
1522
  ] }),
1503
- f.meta != null || f.count !== void 0 ? /* @__PURE__ */ u("span", { className: "cms-list__end", children: [
1504
- f.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: f.meta }) : null,
1505
- f.count !== void 0 && f.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: f.count }) : null
1523
+ h.meta != null || h.count !== void 0 ? /* @__PURE__ */ u("span", { className: "cms-list__end", children: [
1524
+ h.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: h.meta }) : null,
1525
+ h.count !== void 0 && h.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: h.count }) : null
1506
1526
  ] }) : null
1507
1527
  ]
1508
1528
  },
1509
- f.id
1529
+ h.id
1510
1530
  );
1511
1531
  }) })
1512
1532
  ] });
1513
1533
  }
1514
- function He({ at: n, items: l, onClose: t, label: o = "Actions", focus: i = "first" }) {
1515
- const s = R(null), c = R(null), a = G(), [m, _] = E(n), d = l.filter((r) => r.offer.offered);
1516
- if (xe(() => {
1534
+ function Re({ at: n, items: l, onClose: t, label: i = "Actions", focus: c = "first" }) {
1535
+ const s = F(null), d = F(null), r = G(), [f, _] = E(n), o = l.filter((a) => a.offer.offered);
1536
+ if (ge(() => {
1517
1537
  if (!n) return;
1518
- const r = s.current, f = (r == null ? void 0 : r.offsetWidth) ?? 0, p = (r == null ? void 0 : r.offsetHeight) ?? 0;
1519
- _({ x: Math.max(0, Math.min(n.x, window.innerWidth - f)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
1538
+ const a = s.current, h = (a == null ? void 0 : a.offsetWidth) ?? 0, p = (a == null ? void 0 : a.offsetHeight) ?? 0;
1539
+ _({ x: Math.max(0, Math.min(n.x, window.innerWidth - h)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
1520
1540
  }, [n]), Y(() => {
1521
- var p, g;
1541
+ var p, v;
1522
1542
  if (!n) return;
1523
- c.current = document.activeElement;
1524
- const r = Array.from(((p = s.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1525
- (g = i === "last" ? r[r.length - 1] : r[0]) == null || g.focus();
1526
- const f = (N) => {
1543
+ d.current = document.activeElement;
1544
+ const a = Array.from(((p = s.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1545
+ (v = c === "last" ? a[a.length - 1] : a[0]) == null || v.focus();
1546
+ const h = (N) => {
1527
1547
  var w;
1528
1548
  (w = s.current) != null && w.contains(N.target) || t();
1529
1549
  };
1530
- return document.addEventListener("mousedown", f), () => {
1550
+ return document.addEventListener("mousedown", h), () => {
1531
1551
  var N, w;
1532
- document.removeEventListener("mousedown", f), (w = (N = c.current) == null ? void 0 : N.focus) == null || w.call(N);
1552
+ document.removeEventListener("mousedown", h), (w = (N = d.current) == null ? void 0 : N.focus) == null || w.call(N);
1533
1553
  };
1534
- }, [n, t, i]), !n || d.length === 0) return null;
1535
- const h = (r) => {
1536
- var g, N;
1537
- const f = Array.from(((g = s.current) == null ? void 0 : g.querySelectorAll('[role="menuitem"]')) ?? []), p = f.indexOf(document.activeElement);
1538
- if (r.key === "Escape" || r.key === "Tab")
1539
- r.preventDefault(), t();
1540
- else if (r.key === "ArrowDown" || r.key === "ArrowUp") {
1541
- r.preventDefault();
1542
- const w = r.key === "ArrowDown" ? 1 : -1;
1543
- (N = f[(p + w + f.length) % f.length]) == null || N.focus();
1554
+ }, [n, t, c]), !n || o.length === 0) return null;
1555
+ const m = (a) => {
1556
+ var v, N;
1557
+ const h = Array.from(((v = s.current) == null ? void 0 : v.querySelectorAll('[role="menuitem"]')) ?? []), p = h.indexOf(document.activeElement);
1558
+ if (a.key === "Escape" || a.key === "Tab")
1559
+ a.preventDefault(), t();
1560
+ else if (a.key === "ArrowDown" || a.key === "ArrowUp") {
1561
+ a.preventDefault();
1562
+ const w = a.key === "ArrowDown" ? 1 : -1;
1563
+ (N = h[(p + w + h.length) % h.length]) == null || N.focus();
1544
1564
  }
1545
1565
  };
1546
1566
  return Me(
@@ -1550,34 +1570,34 @@ function He({ at: n, items: l, onClose: t, label: o = "Actions", focus: i = "fir
1550
1570
  ref: s,
1551
1571
  className: "cms-menu",
1552
1572
  role: "menu",
1553
- "aria-label": o,
1554
- style: { left: (m ?? n).x, top: (m ?? n).y },
1555
- onKeyDown: h,
1556
- onContextMenu: (r) => r.preventDefault(),
1557
- children: d.map((r) => {
1558
- const f = r.offer.refusal !== void 0;
1573
+ "aria-label": i,
1574
+ style: { left: (f ?? n).x, top: (f ?? n).y },
1575
+ onKeyDown: m,
1576
+ onContextMenu: (a) => a.preventDefault(),
1577
+ children: o.map((a) => {
1578
+ const h = a.offer.refusal !== void 0;
1559
1579
  return /* @__PURE__ */ u(
1560
1580
  "div",
1561
1581
  {
1562
1582
  role: "menuitem",
1563
1583
  tabIndex: -1,
1564
- "aria-disabled": f || void 0,
1565
- "aria-describedby": f ? `${a}-${r.id}` : void 0,
1566
- title: f ? r.offer.refusal : void 0,
1567
- className: A("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", f && "is-refused"),
1584
+ "aria-disabled": h || void 0,
1585
+ "aria-describedby": h ? `${r}-${a.id}` : void 0,
1586
+ title: h ? a.offer.refusal : void 0,
1587
+ className: A("cms-menu__item", a.danger && "is-danger", a.offer.locked && "is-locked", h && "is-refused"),
1568
1588
  onClick: () => {
1569
- f || (t(), r.onSelect());
1589
+ h || (t(), a.onSelect());
1570
1590
  },
1571
1591
  onKeyDown: (p) => {
1572
- (p.key === "Enter" || p.key === " ") && !f && (p.preventDefault(), t(), r.onSelect());
1592
+ (p.key === "Enter" || p.key === " ") && !h && (p.preventDefault(), t(), a.onSelect());
1573
1593
  },
1574
1594
  children: [
1575
- r.offer.locked ? /* @__PURE__ */ e(z, { name: "lock" }) : null,
1576
- /* @__PURE__ */ e("span", { className: "cms-menu__label", children: r.label }),
1577
- f ? /* @__PURE__ */ e("span", { id: `${a}-${r.id}`, className: "cms-menu__refusal", children: r.offer.refusal }) : null
1595
+ a.offer.locked ? /* @__PURE__ */ e(z, { name: "lock" }) : null,
1596
+ /* @__PURE__ */ e("span", { className: "cms-menu__label", children: a.label }),
1597
+ h ? /* @__PURE__ */ e("span", { id: `${r}-${a.id}`, className: "cms-menu__refusal", children: a.offer.refusal }) : null
1578
1598
  ]
1579
1599
  },
1580
- r.id
1600
+ a.id
1581
1601
  );
1582
1602
  })
1583
1603
  }
@@ -1594,18 +1614,18 @@ function wn(n) {
1594
1614
  function kn(n) {
1595
1615
  const l = /* @__PURE__ */ new Map();
1596
1616
  for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
1597
- return [...l.entries()].sort(([t], [o]) => t - o).map(([, t]) => t);
1617
+ return [...l.entries()].sort(([t], [i]) => t - i).map(([, t]) => t);
1598
1618
  }
1599
- function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leading: s }) {
1600
- const c = R(null), a = R(null), [m, _] = E(De), [d, h] = E(null), [r, f] = E("first"), [p, g] = E(null), [N, w] = E(null), x = wn(l), S = kn(l), C = x.flat(), F = C.filter((v) => v.overflow === 0), H = C.filter((v) => v.overflow !== 0), ee = JSON.stringify([l.map((v) => [v.id, v.label, v.icon, v.group, v.overflow ?? null]), o ?? "", s !== void 0]), j = be(() => {
1601
- const v = c.current, T = a.current;
1602
- if (v === null || T === null) return;
1603
- const Z = getComputedStyle(v), W = parseFloat(Z.columnGap || "0") || 0, $ = v.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), q = (I) => {
1619
+ function cl({ label: n, actions: l, onAction: t, status: i, moreLabel: c, leading: s }) {
1620
+ const d = F(null), r = F(null), [f, _] = E(De), [o, m] = E(null), [a, h] = E("first"), [p, v] = E(null), [N, w] = E(null), x = wn(l), S = kn(l), C = x.flat(), R = C.filter((g) => g.overflow === 0), H = C.filter((g) => g.overflow !== 0), ee = JSON.stringify([l.map((g) => [g.id, g.label, g.icon, g.group, g.overflow ?? null]), i ?? "", s !== void 0]), j = be(() => {
1621
+ const g = d.current, L = r.current;
1622
+ if (g === null || L === null) return;
1623
+ const V = getComputedStyle(g), W = parseFloat(V.columnGap || "0") || 0, $ = g.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0), q = (I) => {
1604
1624
  var U;
1605
- return ((U = T.querySelector(I)) == null ? void 0 : U.getBoundingClientRect().width) ?? 0;
1625
+ return ((U = L.querySelector(I)) == null ? void 0 : U.getBoundingClientRect().width) ?? 0;
1606
1626
  }, de = q('[data-measure="leading"]'), ue = q('[data-measure="separator"]'), me = q('[data-measure="more"]'), he = (I, U) => q(`[data-measure="${U ? "full" : "icon"}"][data-measure-action="${CSS.escape(I)}"]`), b = (I, U) => {
1607
- const Q = /* @__PURE__ */ new Set([...F.map((te) => te.id), ...U]), se = x.map((te) => te.filter((pe) => !Q.has(pe.id))).filter((te) => te.length > 0), fe = se.flat(), Re = fe.length + (se.length - 1) + (Q.size > 0 ? 1 : 0) + (de > 0 ? 1 : 0);
1608
- return de + fe.reduce((te, pe) => te + he(pe.id, !I.has(pe.id)), 0) + ue * Math.max(0, se.length - 1) + (Q.size > 0 ? me : 0) + W * Math.max(0, Re - 1);
1627
+ const Q = /* @__PURE__ */ new Set([...R.map((te) => te.id), ...U]), se = x.map((te) => te.filter((pe) => !Q.has(pe.id))).filter((te) => te.length > 0), fe = se.flat(), He = fe.length + (se.length - 1) + (Q.size > 0 ? 1 : 0) + (de > 0 ? 1 : 0);
1628
+ return de + fe.reduce((te, pe) => te + he(pe.id, !I.has(pe.id)), 0) + ue * Math.max(0, se.length - 1) + (Q.size > 0 ? me : 0) + W * Math.max(0, He - 1);
1609
1629
  }, k = H.filter((I) => !S.some((U) => U.includes(I.id))).map((I) => I.id), B = [...S, ...[...k].reverse().map((I) => [I])];
1610
1630
  let K = null;
1611
1631
  if (b(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= $) K = De;
@@ -1631,75 +1651,75 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1631
1651
  }
1632
1652
  K = { bare: I, hidden: U };
1633
1653
  }
1634
- const ge = K;
1635
- _((I) => $e(I.bare, ge.bare) && $e(I.hidden, ge.hidden) ? I : ge);
1654
+ const Ne = K;
1655
+ _((I) => $e(I.bare, Ne.bare) && $e(I.hidden, Ne.hidden) ? I : Ne);
1636
1656
  }, [ee]);
1637
- xe(j, [j]), Y(() => {
1638
- const v = c.current;
1639
- if (v === null || typeof ResizeObserver > "u") return;
1640
- const T = new ResizeObserver(() => j());
1641
- return T.observe(v), () => T.disconnect();
1657
+ ge(j, [j]), Y(() => {
1658
+ const g = d.current;
1659
+ if (g === null || typeof ResizeObserver > "u") return;
1660
+ const L = new ResizeObserver(() => j());
1661
+ return L.observe(g), () => L.disconnect();
1642
1662
  }, [j]);
1643
- const y = /* @__PURE__ */ new Set([...F.map((v) => v.id), ...m.hidden]), V = x.map((v) => v.filter((T) => !y.has(T.id))).filter((v) => v.length > 0).flat(), D = [
1644
- ...F,
1645
- ...S.flat().map((v) => C.find((T) => T.id === v)).filter((v) => v !== void 0 && m.hidden.has(v.id)),
1663
+ const y = /* @__PURE__ */ new Set([...R.map((g) => g.id), ...f.hidden]), Z = x.map((g) => g.filter((L) => !y.has(L.id))).filter((g) => g.length > 0).flat(), D = [
1664
+ ...R,
1665
+ ...S.flat().map((g) => C.find((L) => L.id === g)).filter((g) => g !== void 0 && f.hidden.has(g.id)),
1646
1666
  // The pinned that a row too narrow for them sent behind ..., in the row's order.
1647
- ...H.filter((v) => m.hidden.has(v.id) && !S.some((T) => T.includes(v.id)))
1648
- ], X = new Set(H.filter((v) => !S.some((T) => T.includes(v.id))).map((v) => v.id)), O = [...V.map((v) => v.id), ...D.length > 0 ? ["more"] : []], J = p !== null && O.includes(p) ? p : O[0] ?? null, ie = (v) => {
1667
+ ...H.filter((g) => f.hidden.has(g.id) && !S.some((L) => L.includes(g.id)))
1668
+ ], X = new Set(H.filter((g) => !S.some((L) => L.includes(g.id))).map((g) => g.id)), O = [...Z.map((g) => g.id), ...D.length > 0 ? ["more"] : []], J = p !== null && O.includes(p) ? p : O[0] ?? null, ie = (g) => {
1649
1669
  var $, q;
1650
- const T = O.indexOf(J ?? "");
1651
- let Z = null;
1652
- if (v.key === "ArrowRight" ? Z = Math.min(O.length - 1, T + 1) : v.key === "ArrowLeft" ? Z = Math.max(0, T - 1) : v.key === "Home" ? Z = 0 : v.key === "End" ? Z = O.length - 1 : v.key === "Escape" && w(J), Z === null) return;
1653
- v.preventDefault();
1654
- const W = O[Z] ?? null;
1655
- g(W), (q = ($ = c.current) == null ? void 0 : $.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || q.focus();
1656
- }, oe = D.map((v) => ({
1657
- id: v.id,
1670
+ const L = O.indexOf(J ?? "");
1671
+ let V = null;
1672
+ if (g.key === "ArrowRight" ? V = Math.min(O.length - 1, L + 1) : g.key === "ArrowLeft" ? V = Math.max(0, L - 1) : g.key === "Home" ? V = 0 : g.key === "End" ? V = O.length - 1 : g.key === "Escape" && w(J), V === null) return;
1673
+ g.preventDefault();
1674
+ const W = O[V] ?? null;
1675
+ v(W), (q = ($ = d.current) == null ? void 0 : $.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || q.focus();
1676
+ }, oe = D.map((g) => ({
1677
+ id: g.id,
1658
1678
  label: /* @__PURE__ */ u(M, { children: [
1659
- /* @__PURE__ */ e(_e, { name: v.icon }),
1660
- v.label
1679
+ /* @__PURE__ */ e(_e, { name: g.icon }),
1680
+ g.label
1661
1681
  ] }),
1662
- offer: v.disabled ? { offered: !0, locked: !1, refusal: v.reason ?? "" } : { offered: !0, locked: !1 },
1663
- ...v.danger ? { danger: !0 } : {},
1682
+ offer: g.disabled ? { offered: !0, locked: !1, refusal: g.reason ?? "" } : { offered: !0, locked: !1 },
1683
+ ...g.danger ? { danger: !0 } : {},
1664
1684
  onSelect: () => {
1665
- !v.disabled && !v.busy && t(v.id);
1685
+ !g.disabled && !g.busy && t(g.id);
1666
1686
  }
1667
1687
  }));
1668
1688
  return /* @__PURE__ */ u(
1669
1689
  "div",
1670
1690
  {
1671
- ref: c,
1691
+ ref: d,
1672
1692
  role: "toolbar",
1673
1693
  "aria-label": n,
1674
1694
  className: A(
1675
1695
  "cms-pane-toolbar",
1676
- H.length > 0 && m.bare.size >= H.length && "cms-pane-toolbar--labels-hidden",
1677
- m.bare.size > 0 && m.bare.size < H.length && "cms-pane-toolbar--labels-partly-hidden"
1696
+ H.length > 0 && f.bare.size >= H.length && "cms-pane-toolbar--labels-hidden",
1697
+ f.bare.size > 0 && f.bare.size < H.length && "cms-pane-toolbar--labels-partly-hidden"
1678
1698
  ),
1679
1699
  onKeyDown: ie,
1680
1700
  children: [
1681
1701
  s !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: s }) : null,
1682
- x.map((v, T) => {
1683
- const Z = v.filter(($) => !y.has($.id)), W = x.slice(0, T).some(($) => $.some((q) => !y.has(q.id)));
1702
+ x.map((g, L) => {
1703
+ const V = g.filter(($) => !y.has($.id)), W = x.slice(0, L).some(($) => $.some((q) => !y.has(q.id)));
1684
1704
  return /* @__PURE__ */ u("div", { className: "cms-pane-toolbar__group-wrap", children: [
1685
- Z.length > 0 && W ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1686
- /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: v.map(($) => /* @__PURE__ */ e(
1705
+ V.length > 0 && W ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1706
+ /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: V.length === 0, children: g.map(($) => /* @__PURE__ */ e(
1687
1707
  xn,
1688
1708
  {
1689
1709
  action: $,
1690
- labels: !m.bare.has($.id),
1710
+ labels: !f.bare.has($.id),
1691
1711
  overflowed: y.has($.id),
1692
1712
  pinned: X.has($.id),
1693
1713
  tabbable: J === $.id,
1694
1714
  tipOff: N === $.id,
1695
1715
  onChoose: () => t($.id),
1696
1716
  onFocus: () => {
1697
- g($.id), w(null);
1717
+ v($.id), w(null);
1698
1718
  }
1699
1719
  },
1700
1720
  $.id
1701
1721
  )) })
1702
- ] }, T);
1722
+ ] }, L);
1703
1723
  }),
1704
1724
  D.length > 0 ? /* @__PURE__ */ e(
1705
1725
  "button",
@@ -1707,106 +1727,106 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1707
1727
  type: "button",
1708
1728
  className: "cms-icon-button cms-pane-toolbar__more",
1709
1729
  "data-stop": "more",
1710
- "aria-label": i,
1711
- title: i,
1730
+ "aria-label": c,
1731
+ title: c,
1712
1732
  "aria-haspopup": "menu",
1713
- "aria-expanded": d !== null,
1733
+ "aria-expanded": o !== null,
1714
1734
  tabIndex: J === "more" ? 0 : -1,
1715
- onFocus: () => g("more"),
1716
- onClick: (v) => {
1717
- const T = v.currentTarget.getBoundingClientRect();
1718
- f("first"), h(d === null ? { x: T.left, y: T.bottom } : null);
1735
+ onFocus: () => v("more"),
1736
+ onClick: (g) => {
1737
+ const L = g.currentTarget.getBoundingClientRect();
1738
+ h("first"), m(o === null ? { x: L.left, y: L.bottom } : null);
1719
1739
  },
1720
- onKeyDown: (v) => {
1721
- if (v.key === "ArrowDown" || v.key === "ArrowUp") {
1722
- v.preventDefault(), v.stopPropagation();
1723
- const T = v.currentTarget.getBoundingClientRect();
1724
- f(v.key === "ArrowUp" ? "last" : "first"), h({ x: T.left, y: T.bottom });
1740
+ onKeyDown: (g) => {
1741
+ if (g.key === "ArrowDown" || g.key === "ArrowUp") {
1742
+ g.preventDefault(), g.stopPropagation();
1743
+ const L = g.currentTarget.getBoundingClientRect();
1744
+ h(g.key === "ArrowUp" ? "last" : "first"), m({ x: L.left, y: L.bottom });
1725
1745
  }
1726
1746
  },
1727
- children: /* @__PURE__ */ e(L, { name: "more" })
1747
+ children: /* @__PURE__ */ e(T, { name: "more" })
1728
1748
  }
1729
1749
  ) : null,
1730
- o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: o, children: o }) : null,
1731
- /* @__PURE__ */ e(He, { at: d, items: oe, onClose: () => h(null), label: i, focus: r }),
1732
- /* @__PURE__ */ u("div", { ref: a, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
1750
+ i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: i, children: i }) : null,
1751
+ /* @__PURE__ */ e(Re, { at: o, items: oe, onClose: () => m(null), label: c, focus: a }),
1752
+ /* @__PURE__ */ u("div", { ref: r, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
1733
1753
  s !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: s }) : null,
1734
1754
  /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
1735
- /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(L, { name: "more" }) }),
1736
- C.map((v) => /* @__PURE__ */ u("span", { children: [
1737
- /* @__PURE__ */ u("span", { "data-measure": "full", "data-measure-action": v.id, className: "cms-pane-toolbar__action", children: [
1738
- /* @__PURE__ */ e(_e, { name: v.icon }),
1739
- /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: v.label })
1755
+ /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(T, { name: "more" }) }),
1756
+ C.map((g) => /* @__PURE__ */ u("span", { children: [
1757
+ /* @__PURE__ */ u("span", { "data-measure": "full", "data-measure-action": g.id, className: "cms-pane-toolbar__action", children: [
1758
+ /* @__PURE__ */ e(_e, { name: g.icon }),
1759
+ /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: g.label })
1740
1760
  ] }),
1741
- /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": v.id, className: A("cms-pane-toolbar__action", re(v.icon) !== null && "cms-pane-toolbar__action--bare"), children: re(v.icon) !== null ? /* @__PURE__ */ e(_e, { name: v.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: v.label }) })
1742
- ] }, v.id))
1761
+ /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": g.id, className: A("cms-pane-toolbar__action", re(g.icon) !== null && "cms-pane-toolbar__action--bare"), children: re(g.icon) !== null ? /* @__PURE__ */ e(_e, { name: g.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: g.label }) })
1762
+ ] }, g.id))
1743
1763
  ] })
1744
1764
  ]
1745
1765
  }
1746
1766
  );
1747
1767
  }
1748
- function xn({ action: n, labels: l, overflowed: t, pinned: o, tabbable: i, tipOff: s, onChoose: c, onFocus: a }) {
1749
- const [m, _] = E(!1);
1768
+ function xn({ action: n, labels: l, overflowed: t, pinned: i, tabbable: c, tipOff: s, onChoose: d, onFocus: r }) {
1769
+ const [f, _] = E(!1);
1750
1770
  Y(() => {
1751
1771
  if (!n.busy) {
1752
1772
  _(!1);
1753
1773
  return;
1754
1774
  }
1755
- const w = setTimeout(() => _(!0), ye);
1775
+ const w = setTimeout(() => _(!0), we);
1756
1776
  return () => clearTimeout(w);
1757
1777
  }, [n.busy]);
1758
- const d = re(n.icon) === null, h = l || d, r = n.disabled && n.reason ? n.reason : null, f = r ?? (h ? null : n.label), p = G(), [g, N] = E(!1);
1778
+ const o = re(n.icon) === null, m = l || o, a = n.disabled && n.reason ? n.reason : null, h = a ?? (m ? null : n.label), p = G(), [v, N] = E(!1);
1759
1779
  return /* @__PURE__ */ u(
1760
1780
  "button",
1761
1781
  {
1762
1782
  type: "button",
1763
- className: A("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", d && "cms-pane-toolbar__action--text", n.danger && "is-danger"),
1783
+ className: A("cms-pane-toolbar__action", !m && "cms-pane-toolbar__action--bare", o && "cms-pane-toolbar__action--text", n.danger && "is-danger"),
1764
1784
  "data-action": n.id,
1765
1785
  "data-stop": n.id,
1766
1786
  ...t ? { "data-overflowed": "" } : {},
1767
- ...o ? { "data-pinned": "" } : {},
1787
+ ...i ? { "data-pinned": "" } : {},
1768
1788
  hidden: t,
1769
1789
  "aria-label": n.label,
1770
1790
  "aria-disabled": n.disabled || void 0,
1771
1791
  "aria-busy": n.busy || void 0,
1772
- ...r === null ? {} : { "aria-describedby": p },
1773
- ...g && r !== null ? { "data-reason-shown": "" } : {},
1774
- tabIndex: i ? 0 : -1,
1775
- onFocus: a,
1792
+ ...a === null ? {} : { "aria-describedby": p },
1793
+ ...v && a !== null ? { "data-reason-shown": "" } : {},
1794
+ tabIndex: c ? 0 : -1,
1795
+ onFocus: r,
1776
1796
  onBlur: () => N(!1),
1777
1797
  onKeyDown: (w) => {
1778
1798
  w.key === "Escape" && N(!1);
1779
1799
  },
1780
1800
  onClick: () => {
1781
- r !== null ? N(!0) : !n.disabled && !n.busy && c();
1801
+ a !== null ? N(!0) : !n.disabled && !n.busy && d();
1782
1802
  },
1783
1803
  children: [
1784
- m ? /* @__PURE__ */ e(z, { name: "spinner" }) : /* @__PURE__ */ e(_e, { name: n.icon }),
1785
- h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
1786
- r !== null || f !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: f }) : null
1804
+ f ? /* @__PURE__ */ e(z, { name: "spinner" }) : /* @__PURE__ */ e(_e, { name: n.icon }),
1805
+ m ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
1806
+ a !== null || h !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: h }) : null
1787
1807
  ]
1788
1808
  }
1789
1809
  );
1790
1810
  }
1791
1811
  function _e({ name: n }) {
1792
1812
  const l = re(n);
1793
- return l === null ? null : /* @__PURE__ */ e(L, { name: l, size: 18 });
1813
+ return l === null ? null : /* @__PURE__ */ e(T, { name: l, size: 18 });
1794
1814
  }
1795
- function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel: i, expandLabel: s, collapseLabel: c, action: a = null, onRead: m, leading: _ }) {
1796
- const [d, h] = E(!1), r = G(), f = () => {
1797
- o && m();
1798
- }, p = (a == null ? void 0 : a.presentation) === "row" && a.onAction !== void 0, g = (a == null ? void 0 : a.presentation) === "button" && a.onAction !== void 0 ? a : null, N = () => {
1815
+ function il({ title: n, body: l = null, time: t = null, unread: i, unreadLabel: c, expandLabel: s, collapseLabel: d, action: r = null, onRead: f, leading: _ }) {
1816
+ const [o, m] = E(!1), a = G(), h = () => {
1817
+ i && f();
1818
+ }, p = (r == null ? void 0 : r.presentation) === "row" && r.onAction !== void 0, v = (r == null ? void 0 : r.presentation) === "button" && r.onAction !== void 0 ? r : null, N = () => {
1799
1819
  var w;
1800
- f(), p && ((w = a.onAction) == null || w.call(a));
1820
+ h(), p && ((w = r.onAction) == null || w.call(r));
1801
1821
  };
1802
- return /* @__PURE__ */ u("article", { className: A("cms-notification", o && "is-unread", d && "is-expanded", p && "is-row-action"), "data-state": o ? "unread" : "read", children: [
1822
+ return /* @__PURE__ */ u("article", { className: A("cms-notification", i && "is-unread", o && "is-expanded", p && "is-row-action"), "data-state": i ? "unread" : "read", children: [
1803
1823
  /* @__PURE__ */ u(
1804
1824
  "div",
1805
1825
  {
1806
1826
  className: "cms-notification__row",
1807
1827
  role: "button",
1808
1828
  tabIndex: 0,
1809
- "aria-describedby": l === null ? void 0 : r,
1829
+ "aria-describedby": l === null ? void 0 : a,
1810
1830
  onClick: N,
1811
1831
  onKeyDown: (w) => {
1812
1832
  w.target !== w.currentTarget || w.key !== "Enter" && w.key !== " " || (w.preventDefault(), N());
@@ -1816,17 +1836,17 @@ function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel:
1816
1836
  /* @__PURE__ */ u("span", { className: "cms-notification__text", children: [
1817
1837
  /* @__PURE__ */ u("span", { className: "cms-notification__head", children: [
1818
1838
  /* @__PURE__ */ u("span", { className: "cms-notification__title", children: [
1819
- o ? /* @__PURE__ */ u("span", { className: "cms-visually-hidden", children: [
1820
- i,
1839
+ i ? /* @__PURE__ */ u("span", { className: "cms-visually-hidden", children: [
1840
+ c,
1821
1841
  " "
1822
1842
  ] }) : null,
1823
1843
  n
1824
1844
  ] }),
1825
1845
  t !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: t }) : null
1826
1846
  ] }),
1827
- l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: r, children: l }) : null
1847
+ l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: a, children: l }) : null
1828
1848
  ] }),
1829
- o ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
1849
+ i ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
1830
1850
  ]
1831
1851
  }
1832
1852
  ),
@@ -1835,26 +1855,26 @@ function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel:
1835
1855
  {
1836
1856
  type: "button",
1837
1857
  className: "cms-notification__chevron",
1838
- "aria-expanded": d,
1839
- "aria-controls": r,
1840
- "aria-label": d ? c : s,
1841
- title: d ? c : s,
1858
+ "aria-expanded": o,
1859
+ "aria-controls": a,
1860
+ "aria-label": o ? d : s,
1861
+ title: o ? d : s,
1842
1862
  onClick: () => {
1843
- d || f(), h((w) => !w);
1863
+ o || h(), m((w) => !w);
1844
1864
  },
1845
- children: /* @__PURE__ */ e(L, { name: "chevron-down", size: 18 })
1865
+ children: /* @__PURE__ */ e(T, { name: "chevron-down", size: 18 })
1846
1866
  }
1847
1867
  ) : null,
1848
- g !== null ? /* @__PURE__ */ e(
1868
+ v !== null ? /* @__PURE__ */ e(
1849
1869
  "button",
1850
1870
  {
1851
1871
  type: "button",
1852
1872
  className: "cms-button cms-notification__action",
1853
1873
  onClick: () => {
1854
1874
  var w;
1855
- f(), (w = g.onAction) == null || w.call(g);
1875
+ h(), (w = v.onAction) == null || w.call(v);
1856
1876
  },
1857
- children: g.label
1877
+ children: v.label
1858
1878
  }
1859
1879
  ) : null
1860
1880
  ] });
@@ -1877,8 +1897,8 @@ function ol(n, l) {
1877
1897
  function Cn(n, l) {
1878
1898
  if (!n) return;
1879
1899
  if (typeof n.get == "function") return n.get(l) ?? void 0;
1880
- const t = n, o = Object.keys(t).find((i) => i.toLowerCase() === l.toLowerCase());
1881
- return o === void 0 ? void 0 : t[o];
1900
+ const t = n, i = Object.keys(t).find((c) => c.toLowerCase() === l.toLowerCase());
1901
+ return i === void 0 ? void 0 : t[i];
1882
1902
  }
1883
1903
  function Sn(n) {
1884
1904
  if (n && typeof n == "object") {
@@ -1887,137 +1907,137 @@ function Sn(n) {
1887
1907
  if (typeof l.title == "string" && l.title !== "") return l.title;
1888
1908
  }
1889
1909
  }
1890
- function dl(n, l, t, o) {
1910
+ function dl(n, l, t, i) {
1891
1911
  if (n !== 403) return { kind: "none" };
1892
- const i = Sn(t);
1893
- return Cn(l, "X-Elevation-Required") !== void 0 ? o.elevates ? { kind: "elevation-required", message: i ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: i ?? "The server refused this." };
1912
+ const c = Sn(t);
1913
+ return Cn(l, "X-Elevation-Required") !== void 0 ? i.elevates ? { kind: "elevation-required", message: c ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: c ?? "The server refused this." };
1894
1914
  }
1895
- const ke = "coolms-kit:reread";
1915
+ const xe = "coolms-kit:reread";
1896
1916
  function ul() {
1897
- window.dispatchEvent(new Event(ke));
1917
+ window.dispatchEvent(new Event(xe));
1898
1918
  }
1899
1919
  function ml(n) {
1900
- const [l, t] = E(void 0), [o, i] = E(void 0), [s, c] = E(!0), a = R(n);
1901
- a.current = n;
1902
- const m = R(0), _ = be(() => {
1903
- const d = ++m.current;
1904
- c(!0), a.current().then(
1905
- (h) => {
1906
- d === m.current && (t(h), i(void 0), c(!1));
1920
+ const [l, t] = E(void 0), [i, c] = E(void 0), [s, d] = E(!0), r = F(n);
1921
+ r.current = n;
1922
+ const f = F(0), _ = be(() => {
1923
+ const o = ++f.current;
1924
+ d(!0), r.current().then(
1925
+ (m) => {
1926
+ o === f.current && (t(m), c(void 0), d(!1));
1907
1927
  },
1908
- (h) => {
1909
- d === m.current && (i(h), c(!1));
1928
+ (m) => {
1929
+ o === f.current && (c(m), d(!1));
1910
1930
  }
1911
1931
  );
1912
1932
  }, []);
1913
1933
  return Y(() => {
1914
1934
  _();
1915
- const d = () => _();
1916
- return window.addEventListener("focus", d), window.addEventListener(ke, d), () => {
1917
- window.removeEventListener("focus", d), window.removeEventListener(ke, d);
1935
+ const o = () => _();
1936
+ return window.addEventListener("focus", o), window.addEventListener(xe, o), () => {
1937
+ window.removeEventListener("focus", o), window.removeEventListener(xe, o);
1918
1938
  };
1919
- }, [_]), { value: l, error: o, loading: s, reread: _ };
1939
+ }, [_]), { value: l, error: i, loading: s, reread: _ };
1920
1940
  }
1921
1941
  function hl(n) {
1922
1942
  return n === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
1923
1943
  }
1924
1944
  const En = "/errors/client-update-required";
1925
1945
  function An(n, l) {
1926
- const t = n.split(".").map((i) => Number.parseInt(i, 10) || 0), o = l.split(".").map((i) => Number.parseInt(i, 10) || 0);
1927
- for (let i = 0; i < Math.max(t.length, o.length); i++) {
1928
- const s = t[i] ?? 0, c = o[i] ?? 0;
1929
- if (s !== c) return s < c;
1946
+ const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), i = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
1947
+ for (let c = 0; c < Math.max(t.length, i.length); c++) {
1948
+ const s = t[c] ?? 0, d = i[c] ?? 0;
1949
+ if (s !== d) return s < d;
1930
1950
  }
1931
1951
  return !1;
1932
1952
  }
1933
1953
  function fl(n) {
1934
1954
  return n.problemType !== void 0 && n.problemType.endsWith(En) ? !0 : n.minimumVersion !== void 0 && An(n.version, n.minimumVersion);
1935
1955
  }
1936
- const Ie = 4, Tn = 48, Ln = 800, Dn = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
1956
+ const Ie = 4, Ln = 48, Tn = 800, Dn = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
1937
1957
  function $n(n, l) {
1938
- const [t, o] = E(!1);
1958
+ const [t, i] = E(!1);
1939
1959
  return Y(() => {
1940
- const i = n.current;
1941
- if (i === null || !l) {
1942
- o(!1);
1960
+ const c = n.current;
1961
+ if (c === null || !l) {
1962
+ i(!1);
1943
1963
  return;
1944
1964
  }
1945
1965
  const s = /* @__PURE__ */ new WeakMap();
1946
- let c = Number.NEGATIVE_INFINITY, a = null;
1947
- const m = (r) => {
1948
- c = performance.now(), a = r.target;
1949
- }, _ = (r) => {
1950
- const f = r.target;
1951
- !(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && Dn.has(r.key) && m(r);
1952
- }, d = (r) => {
1953
- const f = r.target;
1954
- if (!(f instanceof HTMLElement)) return;
1955
- const p = f.scrollTop, g = s.get(f) ?? 0;
1956
- if (s.set(f, p), p <= 0) {
1957
- o(!1);
1966
+ let d = Number.NEGATIVE_INFINITY, r = null;
1967
+ const f = (a) => {
1968
+ d = performance.now(), r = a.target;
1969
+ }, _ = (a) => {
1970
+ const h = a.target;
1971
+ !(h instanceof HTMLElement && (h.isContentEditable || h.closest("input, textarea, select") !== null)) && Dn.has(a.key) && f(a);
1972
+ }, o = (a) => {
1973
+ const h = a.target;
1974
+ if (!(h instanceof HTMLElement)) return;
1975
+ const p = h.scrollTop, v = s.get(h) ?? 0;
1976
+ if (s.set(h, p), p <= 0) {
1977
+ i(!1);
1958
1978
  return;
1959
1979
  }
1960
- performance.now() - c > Ln || !(a === i || a === document.body || a instanceof Node && f.contains(a)) || (p < g - Ie ? o(!1) : p > g + Ie && p > Tn && o(!0));
1961
- }, h = [["wheel", m], ["touchmove", m], ["pointerdown", m], ["keydown", _]];
1962
- for (const [r, f] of h) i.addEventListener(r, f, { capture: !0, passive: !0 });
1963
- return i.addEventListener("scroll", d, { capture: !0, passive: !0 }), () => {
1964
- for (const [r, f] of h) i.removeEventListener(r, f, { capture: !0 });
1965
- i.removeEventListener("scroll", d, { capture: !0 });
1980
+ performance.now() - d > Tn || !(r === c || r === document.body || r instanceof Node && h.contains(r)) || (p < v - Ie ? i(!1) : p > v + Ie && p > Ln && i(!0));
1981
+ }, m = [["wheel", f], ["touchmove", f], ["pointerdown", f], ["keydown", _]];
1982
+ for (const [a, h] of m) c.addEventListener(a, h, { capture: !0, passive: !0 });
1983
+ return c.addEventListener("scroll", o, { capture: !0, passive: !0 }), () => {
1984
+ for (const [a, h] of m) c.removeEventListener(a, h, { capture: !0 });
1985
+ c.removeEventListener("scroll", o, { capture: !0 });
1966
1986
  };
1967
- }, [n, l]), [t, o];
1987
+ }, [n, l]), [t, i];
1968
1988
  }
1969
- function pl({ title: n, back: l, navigation: t, search: o, searching: i, globals: s, filters: c, primary: a, onRefresh: m, pullText: _, barHidden: d, children: h }) {
1970
- const r = R(null), f = R(null), [p, g] = E(!1), [N, w] = E(null), S = Nn(f, m === void 0 ? null : () => {
1971
- p || (g(!0), m().finally(() => g(!1)));
1972
- }), C = m === void 0 ? null : { distance: S, refreshing: p, text: _ ?? null }, F = i !== void 0 || S > 0 || p, [H, ee] = $n(r, d === void 0 && !F), j = !F && (d ?? H);
1989
+ function pl({ title: n, back: l, navigation: t, search: i, searching: c, globals: s, filters: d, primary: r, onRefresh: f, pullText: _, barHidden: o, children: m }) {
1990
+ const a = F(null), h = F(null), [p, v] = E(!1), [N, w] = E(null), S = Nn(h, f === void 0 ? null : () => {
1991
+ p || (v(!0), f().finally(() => v(!1)));
1992
+ }), C = f === void 0 ? null : { distance: S, refreshing: p, text: _ ?? null }, R = c !== void 0 || S > 0 || p, [H, ee] = $n(a, o === void 0 && !R), j = !R && (o ?? H);
1973
1993
  return /* @__PURE__ */ u(
1974
1994
  "div",
1975
1995
  {
1976
- ref: r,
1977
- className: A("cms-screen", a !== void 0 && "cms-screen--with-primary"),
1996
+ ref: a,
1997
+ className: A("cms-screen", r !== void 0 && "cms-screen--with-primary"),
1978
1998
  "data-bar-hidden": j ? "" : void 0,
1979
1999
  onFocus: (y) => {
1980
2000
  j && y.target instanceof Element && y.target.closest(".cms-screen__bar, .cms-screen__filters") !== null && ee(!1);
1981
2001
  },
1982
2002
  children: [
1983
- i !== void 0 ? /* @__PURE__ */ u("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
1984
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": i.closeLabel, title: i.closeLabel, onClick: i.onClose, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
1985
- /* @__PURE__ */ e("div", { className: "cms-screen__search", children: i.field })
2003
+ c !== void 0 ? /* @__PURE__ */ u("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2004
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": c.closeLabel, title: c.closeLabel, onClick: c.onClose, children: /* @__PURE__ */ e(T, { name: "chevron-left" }) }),
2005
+ /* @__PURE__ */ e("div", { className: "cms-screen__search", children: c.field })
1986
2006
  ] }) : /* @__PURE__ */ u("header", { className: "cms-screen__bar", children: [
1987
2007
  /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: l !== void 0 ? l.href !== void 0 ? /* @__PURE__ */ u("a", { className: "cms-screen__back", href: l.href, onClick: l.onBack, children: [
1988
- /* @__PURE__ */ e(L, { name: "chevron-left" }),
2008
+ /* @__PURE__ */ e(T, { name: "chevron-left" }),
1989
2009
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
1990
2010
  ] }) : /* @__PURE__ */ u("button", { type: "button", className: "cms-screen__back", onClick: l.onBack, children: [
1991
- /* @__PURE__ */ e(L, { name: "chevron-left" }),
2011
+ /* @__PURE__ */ e(T, { name: "chevron-left" }),
1992
2012
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
1993
2013
  ] }) : t }),
1994
2014
  /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }),
1995
2015
  /* @__PURE__ */ u("div", { className: "cms-screen__trailing", children: [
1996
- o !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": o.label, title: o.label, onClick: o.onOpen, children: /* @__PURE__ */ e(L, { name: "search" }) }) : null,
2016
+ i !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": i.label, title: i.label, onClick: i.onOpen, children: /* @__PURE__ */ e(T, { name: "search" }) }) : null,
1997
2017
  s
1998
2018
  ] })
1999
2019
  ] }),
2000
- c !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(fn, { label: c.label, options: c.options, value: c.selected, onChange: c.onSelect }) }) : null,
2001
- /* @__PURE__ */ e("div", { ref: f, className: "cms-screen__content", "data-pulling": S > 0 ? "" : void 0, "data-refreshing": p ? "" : void 0, children: /* @__PURE__ */ e(Fe.Provider, { value: C, children: h }) }),
2002
- a !== void 0 ? /* @__PURE__ */ e(
2020
+ d !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(fn, { label: d.label, options: d.options, value: d.selected, onChange: d.onSelect }) }) : null,
2021
+ /* @__PURE__ */ e("div", { ref: h, className: "cms-screen__content", "data-pulling": S > 0 ? "" : void 0, "data-refreshing": p ? "" : void 0, children: /* @__PURE__ */ e(Fe.Provider, { value: C, children: m }) }),
2022
+ r !== void 0 ? /* @__PURE__ */ e(
2003
2023
  "button",
2004
2024
  {
2005
2025
  type: "button",
2006
2026
  className: "cms-button cms-button--primary cms-screen__primary",
2007
- "aria-label": a.label,
2008
- title: a.label,
2009
- ..."menu" in a ? { "aria-haspopup": "menu", "aria-expanded": N !== null } : {},
2027
+ "aria-label": r.label,
2028
+ title: r.label,
2029
+ ..."menu" in r ? { "aria-haspopup": "menu", "aria-expanded": N !== null } : {},
2010
2030
  onClick: (y) => {
2011
- if ("menu" in a) {
2031
+ if ("menu" in r) {
2012
2032
  const P = y.currentTarget.getBoundingClientRect();
2013
2033
  w(N === null ? { x: P.left, y: P.top } : null);
2014
2034
  } else
2015
- a.onPress();
2035
+ r.onPress();
2016
2036
  },
2017
- children: /* @__PURE__ */ e(L, { name: a.icon, size: 24 })
2037
+ children: /* @__PURE__ */ e(T, { name: r.icon, size: 24 })
2018
2038
  }
2019
2039
  ) : null,
2020
- a !== void 0 && "menu" in a ? /* @__PURE__ */ e(He, { at: N, items: a.menu, onClose: () => w(null), label: a.label }) : null
2040
+ r !== void 0 && "menu" in r ? /* @__PURE__ */ e(Re, { at: N, items: r.menu, onClose: () => w(null), label: r.label }) : null
2021
2041
  ]
2022
2042
  }
2023
2043
  );
@@ -2035,15 +2055,15 @@ export {
2035
2055
  Qn as ChatBubble,
2036
2056
  el as Composer,
2037
2057
  Kn as ConfirmDialog,
2038
- He as ContextMenu,
2058
+ Re as ContextMenu,
2039
2059
  Ye as EmptyState,
2040
2060
  Ge as ErrorBanner,
2041
2061
  Wn as FilePicker,
2042
2062
  cn as FilePickerDenied,
2043
- Vn as FileViewer,
2063
+ Zn as FileViewer,
2044
2064
  fn as FilterChips,
2045
- Zn as ICON_NAMES,
2046
- L as Icon,
2065
+ Vn as ICON_NAMES,
2066
+ T as Icon,
2047
2067
  nl as IncomingCall,
2048
2068
  rl as List,
2049
2069
  qe as Loading,
@@ -2053,20 +2073,20 @@ export {
2053
2073
  Pe as Modal,
2054
2074
  Je as NamedIcon,
2055
2075
  il as Notification,
2056
- we as PULL_AT,
2076
+ ke as PULL_AT,
2057
2077
  jn as PageHeader,
2058
2078
  cl as PaneToolbar,
2059
2079
  vn as SIGN_IN_LABELS,
2060
- ye as STATE_DELAY_MS,
2080
+ we as STATE_DELAY_MS,
2061
2081
  pl as ScreenShell,
2062
2082
  Gn as SearchField,
2063
- Rn as Select,
2083
+ Hn as Select,
2064
2084
  sl as SignInForm,
2065
2085
  al as SignInLayout,
2066
2086
  Xn as SplitPanes,
2067
2087
  ne as State,
2068
2088
  qn as TabStrip,
2069
- Hn as TextArea,
2089
+ Rn as TextArea,
2070
2090
  Fn as TextField,
2071
2091
  Un as Toast,
2072
2092
  zn as ToastRegion,
@@ -2086,5 +2106,5 @@ export {
2086
2106
  yn as usePullState,
2087
2107
  ml as useReread,
2088
2108
  An as versionBelow,
2089
- Ve as writtenOut
2109
+ Ze as writtenOut
2090
2110
  };