@coolms/ui-react 0.1.0-alpha.34 → 0.1.0-alpha.35

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,15 +1,15 @@
1
1
  import { jsx as e, jsxs as i, Fragment as A } from "react/jsx-runtime";
2
2
  import { useId as se, useState as T, useRef as H, useEffect as Q, useCallback as be, useMemo as ln, useContext as tn, createContext as sn, useLayoutEffect as ve, Fragment as an } from "react";
3
- import { createPortal as Pe } from "react-dom";
3
+ import { createPortal as Fe } from "react-dom";
4
4
  function ye(n, l) {
5
5
  const t = { ...n };
6
- for (const r of Object.keys(l ?? {})) {
7
- const c = l == null ? void 0 : l[r];
8
- c !== void 0 && (t[r] = c);
6
+ for (const a of Object.keys(l ?? {})) {
7
+ const c = l == null ? void 0 : l[a];
8
+ c !== void 0 && (t[a] = c);
9
9
  }
10
10
  return t;
11
11
  }
12
- function F(...n) {
12
+ function $(...n) {
13
13
  return n.filter(Boolean).join(" ");
14
14
  }
15
15
  function G({ name: n }) {
@@ -35,11 +35,11 @@ function he({
35
35
  variant: n = "secondary",
36
36
  busy: l = !1,
37
37
  busyLabel: t,
38
- locked: r = !1,
38
+ locked: a = !1,
39
39
  lockedReason: c,
40
40
  icon: s,
41
41
  disabled: m,
42
- className: a,
42
+ className: r,
43
43
  children: u,
44
44
  type: v = "button",
45
45
  title: o,
@@ -51,14 +51,14 @@ function he({
51
51
  {
52
52
  ...p,
53
53
  type: v,
54
- className: F("cms-button", `cms-button--${n}`, l && "is-busy", r && "is-locked", a),
54
+ className: $("cms-button", `cms-button--${n}`, l && "is-busy", a && "is-locked", r),
55
55
  disabled: h,
56
56
  "aria-busy": l || void 0,
57
- title: r ? c ?? o : o,
57
+ title: a ? c ?? o : o,
58
58
  children: [
59
- l ? /* @__PURE__ */ e(G, { name: "spinner" }) : r ? /* @__PURE__ */ e(G, { name: "lock" }) : s,
59
+ l ? /* @__PURE__ */ e(G, { name: "spinner" }) : a ? /* @__PURE__ */ e(G, { name: "lock" }) : s,
60
60
  /* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : u }),
61
- r && c ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
61
+ a && c ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
62
62
  ", ",
63
63
  c
64
64
  ] }) : null
@@ -66,8 +66,8 @@ function he({
66
66
  }
67
67
  );
68
68
  }
69
- function Fe({ id: n, label: l, help: t, error: r, pinned: c, children: s }) {
70
- return /* @__PURE__ */ i("div", { className: F("cms-field", r != null && "is-invalid"), children: [
69
+ function Be({ id: n, label: l, help: t, error: a, pinned: c, children: s }) {
70
+ return /* @__PURE__ */ i("div", { className: $("cms-field", a != null && "is-invalid"), children: [
71
71
  /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: l }),
72
72
  s,
73
73
  c != null ? /* @__PURE__ */ i("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
@@ -75,35 +75,35 @@ function Fe({ id: n, label: l, help: t, error: r, pinned: c, children: s }) {
75
75
  " ",
76
76
  c
77
77
  ] }) : null,
78
- r != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: r }) : null,
78
+ a != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: a }) : null,
79
79
  t != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: t }) : null
80
80
  ] });
81
81
  }
82
- function Be(n, l) {
82
+ function Pe(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
86
  const rn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, cn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
87
  function on(n, l, t) {
88
- const r = (s, m, a, u = 0, v = 0, o = 0) => {
89
- const p = new Date(Date.UTC(s, m - 1, a, u, v, o));
90
- return p.setUTCFullYear(s), p.getUTCFullYear() === s && p.getUTCMonth() === m - 1 && p.getUTCDate() === a && p.getUTCHours() === u && p.getUTCMinutes() === v && p.getUTCSeconds() === o ? p : null;
88
+ const a = (s, m, r, u = 0, v = 0, o = 0) => {
89
+ const p = new Date(Date.UTC(s, m - 1, r, u, v, o));
90
+ return p.setUTCFullYear(s), p.getUTCFullYear() === s && p.getUTCMonth() === m - 1 && p.getUTCDate() === r && p.getUTCHours() === u && p.getUTCMinutes() === v && p.getUTCSeconds() === o ? p : null;
91
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
94
  const m = l.match(cn);
95
95
  if (m === null) return l;
96
- const a = c(m), u = r(2e3, 1, 1, a.hour, a.minute, a.second);
96
+ const r = c(m), u = a(2e3, 1, 1, r.hour, r.minute, r.second);
97
97
  return u === null ? l : new Intl.DateTimeFormat(t, { timeStyle: m[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
98
98
  }
99
99
  const s = l.match(rn);
100
100
  if (s === null) return l;
101
101
  if (n === "date" && s[4] === void 0) {
102
- const m = r(Number(s[1]), Number(s[2]), Number(s[3]));
102
+ const m = a(Number(s[1]), Number(s[2]), Number(s[3]));
103
103
  return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(m);
104
104
  }
105
105
  if (n === "datetime-local" && s[4] !== void 0) {
106
- const m = r(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
106
+ const m = a(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
107
  return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
108
108
  }
109
109
  } catch {
@@ -112,9 +112,9 @@ function on(n, l, t) {
112
112
  return l;
113
113
  }
114
114
  const dn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
115
- function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value: m, onChange: a, placeholder: u, type: v = "text", name: o, locale: p, min: h, max: f, step: d, minLength: g, maxLength: k, required: x }) {
115
+ function il({ label: n, help: l, error: t, disabled: a, readOnly: c, pinned: s, value: m, onChange: r, placeholder: u, type: v = "text", name: o, locale: p, min: h, max: f, step: d, minLength: g, maxLength: k, required: x }) {
116
116
  const C = se(), w = c === !0 || s != null, b = w && dn.has(v), y = v === "number" && (d === "any" || typeof d == "number" && !Number.isInteger(d));
117
- return /* @__PURE__ */ e(Fe, { id: C, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
117
+ return /* @__PURE__ */ e(Be, { id: C, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
118
118
  "input",
119
119
  {
120
120
  id: C,
@@ -125,7 +125,7 @@ function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s,
125
125
  ...b ? { "data-value": m } : {},
126
126
  lang: p,
127
127
  placeholder: u,
128
- disabled: r,
128
+ disabled: a,
129
129
  readOnly: w,
130
130
  required: x,
131
131
  "aria-required": x || void 0,
@@ -136,14 +136,14 @@ function il({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s,
136
136
  maxLength: k,
137
137
  inputMode: v === "number" ? y ? "decimal" : "numeric" : void 0,
138
138
  "aria-invalid": t != null || void 0,
139
- "aria-describedby": Be(C, { help: l, error: t, pinned: s }),
140
- onChange: (D) => a == null ? void 0 : a(D.target.value)
139
+ "aria-describedby": Pe(C, { help: l, error: t, pinned: s }),
140
+ onChange: (D) => r == null ? void 0 : r(D.target.value)
141
141
  }
142
142
  ) });
143
143
  }
144
- function ol({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s, value: m, onChange: a, placeholder: u, rows: v = 4, name: o, locale: p, minLength: h, maxLength: f, required: d }) {
144
+ function ol({ label: n, help: l, error: t, disabled: a, readOnly: c, pinned: s, value: m, onChange: r, placeholder: u, rows: v = 4, name: o, locale: p, minLength: h, maxLength: f, required: d }) {
145
145
  const g = se();
146
- return /* @__PURE__ */ e(Fe, { id: g, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
146
+ return /* @__PURE__ */ e(Be, { id: g, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
147
147
  "textarea",
148
148
  {
149
149
  id: g,
@@ -153,39 +153,39 @@ function ol({ label: n, help: l, error: t, disabled: r, readOnly: c, pinned: s,
153
153
  value: m,
154
154
  lang: p,
155
155
  placeholder: u,
156
- disabled: r,
156
+ disabled: a,
157
157
  readOnly: c === !0 || s != null,
158
158
  required: d,
159
159
  "aria-required": d || void 0,
160
160
  minLength: h,
161
161
  maxLength: f,
162
162
  "aria-invalid": t != null || void 0,
163
- "aria-describedby": Be(g, { help: l, error: t, pinned: s }),
164
- onChange: (k) => a == null ? void 0 : a(k.target.value)
163
+ "aria-describedby": Pe(g, { help: l, error: t, pinned: s }),
164
+ onChange: (k) => r == null ? void 0 : r(k.target.value)
165
165
  }
166
166
  ) });
167
167
  }
168
- function dl({ label: n, help: l, error: t, disabled: r, readOnly: c, value: s, options: m, onChange: a, emptyText: u = "Nothing to choose from yet.", name: v }) {
168
+ function dl({ label: n, help: l, error: t, disabled: a, readOnly: c, value: s, options: m, onChange: r, emptyText: u = "Nothing to choose from yet.", name: v }) {
169
169
  const o = se(), p = m.length === 0;
170
- return /* @__PURE__ */ e(Fe, { id: o, label: n, help: p ? u : l, error: t, children: /* @__PURE__ */ e(
170
+ return /* @__PURE__ */ e(Be, { id: o, label: n, help: p ? u : l, error: t, children: /* @__PURE__ */ e(
171
171
  "select",
172
172
  {
173
173
  id: o,
174
174
  name: v,
175
175
  className: "cms-input cms-select",
176
176
  value: s,
177
- disabled: r || p,
177
+ disabled: a || p,
178
178
  "aria-readonly": c || void 0,
179
179
  "aria-invalid": t != null || void 0,
180
- "aria-describedby": Be(o, { help: p ? u : l, error: t }),
180
+ "aria-describedby": Pe(o, { help: p ? u : l, error: t }),
181
181
  onChange: (h) => {
182
- c || a == null || a(h.target.value);
182
+ c || r == null || r(h.target.value);
183
183
  },
184
184
  children: m.map((h) => /* @__PURE__ */ e("option", { value: h.value, disabled: c && h.value !== s, children: h.label }, h.value))
185
185
  }
186
186
  ) });
187
187
  }
188
- function ul({ label: n, checked: l, onChange: t, disabled: r, readOnly: c, help: s }) {
188
+ function ul({ label: n, checked: l, onChange: t, disabled: a, readOnly: c, help: s }) {
189
189
  const m = se();
190
190
  return /* @__PURE__ */ i("div", { className: "cms-toggle-row", children: [
191
191
  /* @__PURE__ */ e(
@@ -194,11 +194,11 @@ function ul({ label: n, checked: l, onChange: t, disabled: r, readOnly: c, help:
194
194
  id: m,
195
195
  type: "button",
196
196
  role: "switch",
197
- className: F("cms-toggle", l && "is-on"),
197
+ className: $("cms-toggle", l && "is-on"),
198
198
  "aria-checked": l,
199
199
  "aria-readonly": c || void 0,
200
200
  "aria-describedby": s != null ? `${m}-help` : void 0,
201
- disabled: r,
201
+ disabled: a,
202
202
  onClick: () => {
203
203
  c || t == null || t(!l);
204
204
  },
@@ -210,7 +210,7 @@ function ul({ label: n, checked: l, onChange: t, disabled: r, readOnly: c, help:
210
210
  ] });
211
211
  }
212
212
  const un = 150;
213
- function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, children: s, footer: m, closeLabel: a = "Close", initialFocus: u, className: v }) {
213
+ function je({ open: n, title: l, onClose: t, dirty: a = !1, onDirtyClose: c, children: s, footer: m, closeLabel: r = "Close", initialFocus: u, className: v }) {
214
214
  const [o, p] = T(n), [h, f] = T(!1), d = H(null), g = H(null), k = se();
215
215
  if (Q(() => {
216
216
  if (n) {
@@ -232,16 +232,16 @@ function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, chi
232
232
  }
233
233
  }, [n, o, u]), !o) return null;
234
234
  const x = () => {
235
- r ? c == null || c() : t();
235
+ a ? c == null || c() : t();
236
236
  };
237
- return Pe(
238
- /* @__PURE__ */ e("div", { className: F("cms-modal-scrim", h && "is-closing"), onMouseDown: (C) => {
237
+ return Fe(
238
+ /* @__PURE__ */ e("div", { className: $("cms-modal-scrim", h && "is-closing"), onMouseDown: (C) => {
239
239
  C.target === C.currentTarget && x();
240
240
  }, children: /* @__PURE__ */ i(
241
241
  "div",
242
242
  {
243
243
  ref: d,
244
- className: F("cms-modal", v, h && "is-closing", r && "is-dirty"),
244
+ className: $("cms-modal", v, h && "is-closing", a && "is-dirty"),
245
245
  role: "dialog",
246
246
  "aria-modal": "true",
247
247
  "aria-labelledby": k,
@@ -260,7 +260,7 @@ function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, chi
260
260
  children: [
261
261
  /* @__PURE__ */ i("header", { className: "cms-modal__head", children: [
262
262
  /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: k, children: l }),
263
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: x, children: /* @__PURE__ */ e(G, { name: "close" }) })
263
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r, onClick: x, children: /* @__PURE__ */ e(G, { name: "close" }) })
264
264
  ] }),
265
265
  /* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
266
266
  m != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: m }) : null
@@ -270,8 +270,8 @@ function je({ open: n, title: l, onClose: t, dirty: r = !1, onDirtyClose: c, chi
270
270
  document.body
271
271
  );
272
272
  }
273
- function ml({ open: n, title: l, message: t, kind: r = "default", confirmLabel: c, cancelLabel: s, closeLabel: m, onConfirm: a, onCancel: u }) {
274
- const v = r === "discard-changes";
273
+ function ml({ open: n, title: l, message: t, kind: a = "default", confirmLabel: c, cancelLabel: s, closeLabel: m, onConfirm: r, onCancel: u }) {
274
+ const v = a === "discard-changes";
275
275
  return /* @__PURE__ */ e(
276
276
  je,
277
277
  {
@@ -281,9 +281,9 @@ function ml({ open: n, title: l, message: t, kind: r = "default", confirmLabel:
281
281
  ...m === void 0 ? {} : { closeLabel: m },
282
282
  footer: /* @__PURE__ */ i(A, { children: [
283
283
  /* @__PURE__ */ e(he, { onClick: u, children: s ?? (v ? "Keep editing" : "Cancel") }),
284
- /* @__PURE__ */ e(he, { variant: r === "default" ? "primary" : "danger", onClick: a, children: c ?? (v ? "Discard changes" : "Confirm") })
284
+ /* @__PURE__ */ e(he, { variant: a === "default" ? "primary" : "danger", onClick: r, children: c ?? (v ? "Discard changes" : "Confirm") })
285
285
  ] }),
286
- children: r !== "default" ? /* @__PURE__ */ i("p", { className: "cms-confirm__warning", children: [
286
+ children: a !== "default" ? /* @__PURE__ */ i("p", { className: "cms-confirm__warning", children: [
287
287
  /* @__PURE__ */ e(G, { name: "warning" }),
288
288
  " ",
289
289
  t
@@ -291,19 +291,19 @@ function ml({ open: n, title: l, message: t, kind: r = "default", confirmLabel:
291
291
  }
292
292
  );
293
293
  }
294
- function hl({ kind: n, message: l, action: t, onDismiss: r, dismissLabel: c = "Dismiss" }) {
295
- return /* @__PURE__ */ i("div", { className: F("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
294
+ function hl({ kind: n, message: l, action: t, onDismiss: a, dismissLabel: c = "Dismiss" }) {
295
+ return /* @__PURE__ */ i("div", { className: $("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
296
  /* @__PURE__ */ e(G, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
297
297
  /* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
298
298
  t ? /* @__PURE__ */ e(he, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
299
- r ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: r, children: /* @__PURE__ */ e(G, { name: "close" }) }) : null
299
+ a ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: a, children: /* @__PURE__ */ e(G, { name: "close" }) }) : null
300
300
  ] });
301
301
  }
302
302
  function fl({ children: n }) {
303
303
  return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
304
304
  }
305
305
  function mn({ what: n, layout: l = "inline" }) {
306
- return /* @__PURE__ */ i("div", { className: F("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
306
+ return /* @__PURE__ */ i("div", { className: $("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
307
307
  /* @__PURE__ */ e(G, { name: "spinner" }),
308
308
  /* @__PURE__ */ e("span", { children: n })
309
309
  ] });
@@ -579,20 +579,20 @@ function vn() {
579
579
  /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
580
580
  ] });
581
581
  }
582
- function me({ kind: n, title: l, description: t, action: r, placement: c = "block", icon: s }) {
583
- const [m, a] = T(n !== "loading");
582
+ function me({ kind: n, title: l, description: t, action: a, placement: c = "block", icon: s }) {
583
+ const [m, r] = T(n !== "loading");
584
584
  return Q(() => {
585
585
  if (n !== "loading") {
586
- a(!0);
586
+ r(!0);
587
587
  return;
588
588
  }
589
- a(!1);
590
- const u = window.setTimeout(() => a(!0), bn());
589
+ r(!1);
590
+ const u = window.setTimeout(() => r(!0), bn());
591
591
  return () => window.clearTimeout(u);
592
592
  }, [n]), /* @__PURE__ */ i(
593
593
  "div",
594
594
  {
595
- className: F("cms-state", `cms-state--${n}`, `cms-state--${c}`, !m && "is-waiting"),
595
+ className: $("cms-state", `cms-state--${n}`, `cms-state--${c}`, !m && "is-waiting"),
596
596
  role: "status",
597
597
  "aria-live": "polite",
598
598
  "data-kind": n,
@@ -604,7 +604,7 @@ function me({ kind: n, title: l, description: t, action: r, placement: c = "bloc
604
604
  /* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
605
605
  t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
606
606
  ] }),
607
- r !== void 0 && n !== "denied" ? /* @__PURE__ */ e(he, { className: "cms-state__action", onClick: r.onAction, children: r.label }) : null
607
+ a !== void 0 && n !== "denied" ? /* @__PURE__ */ e(he, { className: "cms-state__action", onClick: a.onAction, children: a.label }) : null
608
608
  ]
609
609
  }
610
610
  );
@@ -620,7 +620,7 @@ function kn(n) {
620
620
  return n.getClientRects().length > 0;
621
621
  }
622
622
  function _l(n) {
623
- const { name: l, badge: t, closeLabel: r, onClose: c, actions: s = [], moreLabel: m = "More", edit: a, editing: u, state: v, siblings: o, bar: p, thumbnails: h, strip: f, onZoom: d, children: g } = n, k = H(null), x = H(null), C = se(), [w, b] = T(!1), y = H(null);
623
+ const { name: l, badge: t, closeLabel: a, onClose: c, actions: s = [], moreLabel: m = "More", edit: r, editing: u, state: v, siblings: o, bar: p, thumbnails: h, strip: f, onZoom: d, children: g } = n, k = H(null), x = H(null), C = se(), [w, b] = T(!1), y = H(null);
624
624
  Q(() => {
625
625
  var z;
626
626
  const M = document.activeElement, R = document.body.style.overflow;
@@ -641,12 +641,12 @@ function _l(n) {
641
641
  const q = z.clientX - R.x;
642
642
  Math.abs(q) < Nn || Math.abs(q) < Math.abs(z.clientY - R.y) || (q > 0 ? (U = o == null ? void 0 : o.onPrevious) == null || U.call(o) : (j = o == null ? void 0 : o.onNext) == null || j.call(o));
643
643
  };
644
- return Pe(
644
+ return Fe(
645
645
  /* @__PURE__ */ i(
646
646
  "div",
647
647
  {
648
648
  ref: k,
649
- className: F("cms-viewer", u !== void 0 && "is-editing"),
649
+ className: $("cms-viewer", u !== void 0 && "is-editing"),
650
650
  role: "dialog",
651
651
  "aria-modal": "true",
652
652
  "aria-labelledby": C,
@@ -666,7 +666,7 @@ function _l(n) {
666
666
  children: [
667
667
  o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${o.position}` }) : null,
668
668
  /* @__PURE__ */ i("header", { className: "cms-viewer__top", children: [
669
- /* @__PURE__ */ e("button", { ref: x, type: "button", className: "cms-viewer__icon", "aria-label": r, onClick: D, children: /* @__PURE__ */ e(G, { name: "close" }) }),
669
+ /* @__PURE__ */ e("button", { ref: x, type: "button", className: "cms-viewer__icon", "aria-label": a, onClick: D, children: /* @__PURE__ */ e(G, { name: "close" }) }),
670
670
  /* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: t }),
671
671
  /* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: C, title: l, children: l }),
672
672
  o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: o.position }) : null,
@@ -679,9 +679,9 @@ function _l(n) {
679
679
  M.icon,
680
680
  M.label
681
681
  ] }, M.label)) }),
682
- a !== void 0 ? /* @__PURE__ */ i("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": a.label, onClick: a.onEdit, children: [
683
- a.icon,
684
- /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: a.label })
682
+ r !== void 0 ? /* @__PURE__ */ i("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": r.label, onClick: r.onEdit, children: [
683
+ r.icon,
684
+ /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: r.label })
685
685
  ] }) : null,
686
686
  s.length > 0 ? /* @__PURE__ */ i("span", { className: "cms-viewer__more", children: [
687
687
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": m, "aria-expanded": w, onClick: () => b((M) => !M), children: /* @__PURE__ */ e(L, { name: "more" }) }),
@@ -766,8 +766,8 @@ class Cn extends Error {
766
766
  const Ae = (n, l) => `${n}
767
767
  ${l}`, Sn = (n, l) => n === "" ? l : `${n}/${l}`, En = 48;
768
768
  function bl(n) {
769
- var I, X;
770
- const { open: l, spaces: t, list: r, disabledReason: c, budget: s, formatSize: m, labels: a, onConfirm: u, onCancel: v } = n, [o, p] = T(((I = t[0]) == null ? void 0 : I.id) ?? ""), [h, f] = T(""), [d, g] = T({ status: "loading" }), [k, x] = T(0), [C, w] = T(/* @__PURE__ */ new Map()), [b, y] = T(0), [D, Z] = T(!1), V = H(null), M = H(!1);
769
+ var F, X;
770
+ const { open: l, spaces: t, list: a, disabledReason: c, budget: s, formatSize: m, labels: r, onConfirm: u, onCancel: v } = n, [o, p] = T(((F = t[0]) == null ? void 0 : F.id) ?? ""), [h, f] = T(""), [d, g] = T({ status: "loading" }), [k, x] = T(0), [C, w] = T(/* @__PURE__ */ new Map()), [b, y] = T(0), [D, Z] = T(!1), V = H(null), M = H(!1);
771
771
  Q(() => {
772
772
  M.current = !1;
773
773
  }, [l, o, h]);
@@ -778,17 +778,17 @@ function bl(n) {
778
778
  }, [l]), Q(() => {
779
779
  if (!l || o === "") return;
780
780
  let N = !0;
781
- return g({ status: "loading" }), y(0), r(o, h).then(
781
+ return g({ status: "loading" }), y(0), a(o, h).then(
782
782
  (S) => N && g({ status: "ready", entries: S.entries, next: S.next ?? null, paging: !1 }),
783
783
  (S) => N && g({ status: S instanceof Mn ? "denied" : "error" })
784
784
  ), () => {
785
785
  N = !1;
786
786
  };
787
- }, [l, o, h, r, k]);
787
+ }, [l, o, h, a, k]);
788
788
  const z = be(() => {
789
789
  if (d.status !== "ready" || d.next === null || d.paging) return;
790
790
  const N = d.next, S = d.entries;
791
- g({ ...d, paging: !0 }), r(o, h, N).then(
791
+ g({ ...d, paging: !0 }), a(o, h, N).then(
792
792
  (O) => {
793
793
  M.current = !1, g({ status: "ready", entries: [...S, ...O.entries], next: O.next ?? null, paging: !1 });
794
794
  },
@@ -804,13 +804,13 @@ function bl(n) {
804
804
  M.current = !0, x((Y) => Y + 1);
805
805
  }
806
806
  );
807
- }, [d, r, o, h]), q = be((N) => {
807
+ }, [d, a, o, h]), q = be((N) => {
808
808
  var S;
809
809
  return ((S = s == null ? void 0 : s.cost) == null ? void 0 : S.call(s, N)) ?? N.size ?? 0;
810
810
  }, [s]), U = ln(() => [...C.values()], [C]), j = U.reduce((N, S) => N + (S.size ?? 0), 0), le = s === void 0 ? null : s.limitBytes - s.usedBytes - U.reduce((N, S) => N + q(S), 0), ae = le !== null && le < 0, re = (N) => {
811
811
  if (N.kind !== "file") return null;
812
812
  const S = c == null ? void 0 : c(N);
813
- return S || (le !== null && !C.has(Ae(o, N.id)) && q(N) > le ? a.overBudget : null);
813
+ return S || (le !== null && !C.has(Ae(o, N.id)) && q(N) > le ? r.overBudget : null);
814
814
  }, ie = (N) => {
815
815
  const S = Ae(o, N.id);
816
816
  !C.has(S) && re(N) !== null || w((O) => {
@@ -827,72 +827,72 @@ function bl(n) {
827
827
  const O = ee.length - 1, Y = N.key === "Home" ? 0 : N.key === "End" ? O : Math.min(O, Math.max(0, b + (N.key === "ArrowDown" ? 1 : -1)));
828
828
  y(Y), Y >= O - 1 && z();
829
829
  } else N.key === "Enter" && (S == null ? void 0 : S.kind) === "folder" ? (N.preventDefault(), oe(S)) : N.key === " " && (S == null ? void 0 : S.kind) === "file" ? (N.preventDefault(), ie(S)) : N.key === "Backspace" && h !== "" && (N.preventDefault(), J());
830
- }, $ = h === "" ? [] : h.split("/"), B = ((X = t.find((N) => N.id === o)) == null ? void 0 : X.name) ?? "", ne = (N) => `${R}-entry-${String(N)}`;
830
+ }, I = h === "" ? [] : h.split("/"), P = ((X = t.find((N) => N.id === o)) == null ? void 0 : X.name) ?? "", ne = (N) => `${R}-entry-${String(N)}`;
831
831
  return /* @__PURE__ */ i(
832
832
  je,
833
833
  {
834
834
  open: l,
835
- title: a.title,
835
+ title: r.title,
836
836
  onClose: v,
837
- closeLabel: a.close,
837
+ closeLabel: r.close,
838
838
  initialFocus: V,
839
839
  className: "cms-file-picker",
840
840
  footer: /* @__PURE__ */ i("div", { className: "cms-file-picker__foot", children: [
841
841
  /* @__PURE__ */ i("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
842
- U.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(U.length, m(j)) }) : null,
843
- s !== void 0 && le !== null ? /* @__PURE__ */ e("span", { className: F(ae && "is-over"), children: ae ? a.overBudget : a.left(m(Math.max(0, le)), m(s.limitBytes)) }) : null
842
+ U.length > 0 ? /* @__PURE__ */ e("span", { children: r.total(U.length, m(j)) }) : null,
843
+ s !== void 0 && le !== null ? /* @__PURE__ */ e("span", { className: $(ae && "is-over"), children: ae ? r.overBudget : r.left(m(Math.max(0, le)), m(s.limitBytes)) }) : null
844
844
  ] }),
845
845
  /* @__PURE__ */ i("div", { className: "cms-file-picker__actions", children: [
846
- /* @__PURE__ */ e(he, { variant: "secondary", onClick: v, children: a.cancel }),
847
- /* @__PURE__ */ e(he, { variant: "primary", disabled: U.length === 0 || ae, onClick: () => u(U), children: a.confirm(U.length) })
846
+ /* @__PURE__ */ e(he, { variant: "secondary", onClick: v, children: r.cancel }),
847
+ /* @__PURE__ */ e(he, { variant: "primary", disabled: U.length === 0 || ae, onClick: () => u(U), children: r.confirm(U.length) })
848
848
  ] })
849
849
  ] }),
850
850
  children: [
851
851
  /* @__PURE__ */ i("div", { className: "cms-file-picker__top", children: [
852
852
  t.length > 1 ? /* @__PURE__ */ i("label", { className: "cms-file-picker__space", children: [
853
- /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: a.space }),
853
+ /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: r.space }),
854
854
  /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: o, onChange: (N) => {
855
855
  p(N.target.value), f("");
856
856
  }, children: t.map((N) => /* @__PURE__ */ e("option", { value: N.id, children: N.name }, N.id)) })
857
857
  ] }) : null,
858
- /* @__PURE__ */ i("nav", { className: "cms-file-picker__path", "aria-label": a.path, children: [
859
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.up, disabled: h === "", onClick: J, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
858
+ /* @__PURE__ */ i("nav", { className: "cms-file-picker__path", "aria-label": r.path, children: [
859
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.up, disabled: h === "", onClick: J, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
860
860
  /* @__PURE__ */ i("ol", { children: [
861
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": h === "" ? "location" : void 0, onClick: () => f(""), children: B }) }),
862
- $.map((N, S) => {
863
- const O = $.slice(0, S + 1).join("/");
861
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": h === "" ? "location" : void 0, onClick: () => f(""), children: P }) }),
862
+ I.map((N, S) => {
863
+ const O = I.slice(0, S + 1).join("/");
864
864
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": O === h ? "location" : void 0, onClick: () => f(O), children: N }) }, O);
865
865
  })
866
866
  ] })
867
867
  ] }),
868
- U.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": D, onClick: () => Z((N) => !N), children: a.selected(U.length) }) : null
868
+ U.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": D, onClick: () => Z((N) => !N), children: r.selected(U.length) }) : null
869
869
  ] }),
870
870
  D && U.length > 0 ? /* @__PURE__ */ i("div", { className: "cms-file-picker__chosen", children: [
871
871
  /* @__PURE__ */ e("ul", { children: [...C.entries()].map(([N, S]) => /* @__PURE__ */ i("li", { children: [
872
872
  /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: S.name }),
873
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.remove(S.name), onClick: () => fe(N), children: /* @__PURE__ */ e(G, { name: "close" }) })
873
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.remove(S.name), onClick: () => fe(N), children: /* @__PURE__ */ e(G, { name: "close" }) })
874
874
  ] }, N)) }),
875
875
  /* @__PURE__ */ e(he, { variant: "secondary", onClick: () => {
876
876
  w(/* @__PURE__ */ new Map()), Z(!1);
877
- }, children: a.clear })
877
+ }, children: r.clear })
878
878
  ] }) : null,
879
879
  /* @__PURE__ */ i("div", { className: "cms-file-picker__list", onScroll: (N) => {
880
880
  const S = N.currentTarget;
881
881
  S.scrollTop + S.clientHeight >= S.scrollHeight - En && z();
882
882
  }, children: [
883
- d.status === "loading" ? /* @__PURE__ */ e(me, { kind: "loading", title: a.loading, placement: "block" }) : null,
884
- d.status === "error" ? /* @__PURE__ */ e(me, { kind: "error", title: a.error, placement: "block", action: { label: a.retry, onAction: () => {
883
+ d.status === "loading" ? /* @__PURE__ */ e(me, { kind: "loading", title: r.loading, placement: "block" }) : null,
884
+ d.status === "error" ? /* @__PURE__ */ e(me, { kind: "error", title: r.error, placement: "block", action: { label: r.retry, onAction: () => {
885
885
  M.current = !1, x((N) => N + 1);
886
886
  } } }) : null,
887
- d.status === "denied" ? /* @__PURE__ */ e(me, { kind: "denied", title: a.denied, placement: "block" }) : null,
888
- d.status === "ready" && ee.length === 0 ? /* @__PURE__ */ e(me, { kind: "empty", title: a.empty, placement: "block" }) : null,
887
+ d.status === "denied" ? /* @__PURE__ */ e(me, { kind: "denied", title: r.denied, placement: "block" }) : null,
888
+ d.status === "ready" && ee.length === 0 ? /* @__PURE__ */ e(me, { kind: "empty", title: r.empty, placement: "block" }) : null,
889
889
  /* @__PURE__ */ i(
890
890
  "div",
891
891
  {
892
892
  ref: V,
893
893
  role: "listbox",
894
894
  "aria-multiselectable": "true",
895
- "aria-label": a.files,
895
+ "aria-label": r.files,
896
896
  "aria-activedescendant": ee.length > 0 ? ne(b) : void 0,
897
897
  tabIndex: 0,
898
898
  className: "cms-file-picker__entries",
@@ -908,7 +908,7 @@ function bl(n) {
908
908
  role: "option",
909
909
  "aria-selected": N.kind === "file" ? O : void 0,
910
910
  "aria-disabled": Y !== null || void 0,
911
- className: F("cms-file-picker__entry", S === b && "is-active", O && "is-ticked", Y !== null && "is-disabled"),
911
+ className: $("cms-file-picker__entry", S === b && "is-active", O && "is-ticked", Y !== null && "is-disabled"),
912
912
  onClick: () => {
913
913
  y(S), N.kind === "folder" ? oe(N) : ie(N);
914
914
  },
@@ -925,7 +925,7 @@ function bl(n) {
925
925
  N.id
926
926
  );
927
927
  }),
928
- d.status === "ready" && d.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(me, { kind: "loading", title: a.loading, placement: "inline" }) }) : null
928
+ d.status === "ready" && d.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(me, { kind: "loading", title: r.loading, placement: "inline" }) }) : null
929
929
  ]
930
930
  }
931
931
  )
@@ -943,24 +943,24 @@ function An(n, l) {
943
943
  return l.scrollTop <= 0;
944
944
  }
945
945
  function Tn(n, l) {
946
- const [t, r] = T(0), c = H(l);
946
+ const [t, a] = T(0), c = H(l);
947
947
  return c.current = l, Q(() => {
948
948
  const s = n.current;
949
949
  if (s === null) return;
950
- let m = null, a = 0;
950
+ let m = null, r = 0;
951
951
  const u = (p) => {
952
- m = An(p.target, s) && p.touches.length === 1 ? p.touches[0].clientY : null, a = 0;
952
+ m = An(p.target, s) && p.touches.length === 1 ? p.touches[0].clientY : null, r = 0;
953
953
  }, v = (p) => {
954
954
  if (m === null || c.current === null) return;
955
955
  const h = p.touches[0].clientY - m;
956
956
  if (h <= 0) {
957
- m = null, r(0);
957
+ m = null, a(0);
958
958
  return;
959
959
  }
960
- p.cancelable && p.preventDefault(), a = Math.min(h * 0.6, De * 1.5), r(a);
960
+ p.cancelable && p.preventDefault(), r = Math.min(h * 0.6, De * 1.5), a(r);
961
961
  }, o = () => {
962
962
  var p;
963
- m !== null && a >= De && ((p = c.current) == null || p.call(c)), m = null, a = 0, r(0);
963
+ m !== null && r >= De && ((p = c.current) == null || p.call(c)), m = null, r = 0, a(0);
964
964
  };
965
965
  return s.addEventListener("touchstart", u, { passive: !0 }), s.addEventListener("touchmove", v, { passive: !1 }), s.addEventListener("touchend", o), s.addEventListener("touchcancel", o), () => {
966
966
  s.removeEventListener("touchstart", u), s.removeEventListener("touchmove", v), s.removeEventListener("touchend", o), s.removeEventListener("touchcancel", o);
@@ -971,9 +971,9 @@ const Ye = sn(null);
971
971
  function Dn() {
972
972
  return tn(Ye);
973
973
  }
974
- function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: m, selected: a, onOpen: u, onRowMenu: v }) {
974
+ function vl({ label: n, rows: l, error: t, onRetry: a, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: m, selected: r, onOpen: u, onRowMenu: v }) {
975
975
  const o = H([]), p = Dn();
976
- if (t != null) return /* @__PURE__ */ e(fn, { message: t, onRetry: r });
976
+ if (t != null) return /* @__PURE__ */ e(fn, { message: t, onRetry: a });
977
977
  if (l === null) return /* @__PURE__ */ e(mn, { what: c, layout: "block" });
978
978
  if (l.length === 0) return /* @__PURE__ */ e(hn, { title: s, hint: m });
979
979
  const h = (f, d, g) => {
@@ -994,7 +994,7 @@ function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading
994
994
  p.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: p.text }) : null
995
995
  ] }) : null,
996
996
  /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((f, d) => {
997
- const g = f.id === a;
997
+ const g = f.id === r;
998
998
  return /* @__PURE__ */ i(
999
999
  "li",
1000
1000
  {
@@ -1003,8 +1003,8 @@ function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading
1003
1003
  },
1004
1004
  role: "option",
1005
1005
  "aria-selected": g,
1006
- tabIndex: g || a == null && d === 0 ? 0 : -1,
1007
- className: F("cms-list__row", g && "is-selected"),
1006
+ tabIndex: g || r == null && d === 0 ? 0 : -1,
1007
+ className: $("cms-list__row", g && "is-selected"),
1008
1008
  onClick: () => u == null ? void 0 : u(f.id),
1009
1009
  onKeyDown: (k) => h(k, d, f.id),
1010
1010
  onContextMenu: v ? (k) => {
@@ -1013,7 +1013,7 @@ function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading
1013
1013
  children: [
1014
1014
  f.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: f.lead }) : null,
1015
1015
  /* @__PURE__ */ i("span", { className: "cms-list__text", children: [
1016
- /* @__PURE__ */ e("span", { className: F("cms-list__primary", f.unread === !0 && "is-unread"), children: f.primary }),
1016
+ /* @__PURE__ */ e("span", { className: $("cms-list__primary", f.unread === !0 && "is-unread"), children: f.primary }),
1017
1017
  f.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: f.secondary }) : null
1018
1018
  ] }),
1019
1019
  f.meta != null || f.count !== void 0 ? /* @__PURE__ */ i("span", { className: "cms-list__end", children: [
@@ -1027,8 +1027,8 @@ function vl({ label: n, rows: l, error: t, onRetry: r, loadingText: c = "Loading
1027
1027
  }) })
1028
1028
  ] });
1029
1029
  }
1030
- function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "current" }) {
1031
- const s = H(null), m = H(null), a = se(), [u, v] = T(n), o = l.filter((d) => d.offer.offered);
1030
+ function ge({ at: n, items: l, onClose: t, label: a = "Actions", focus: c = "current" }) {
1031
+ const s = H(null), m = H(null), r = se(), [u, v] = T(n), o = l.filter((d) => d.offer.offered);
1032
1032
  if (ve(() => {
1033
1033
  if (!n) return;
1034
1034
  const d = s.current, g = (d == null ? void 0 : d.offsetWidth) ?? 0, k = (d == null ? void 0 : d.offsetHeight) ?? 0;
@@ -1067,9 +1067,9 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
1067
1067
  "aria-checked": d.checked,
1068
1068
  tabIndex: -1,
1069
1069
  "aria-disabled": g || void 0,
1070
- "aria-describedby": g ? `${a}-${d.id}` : void 0,
1070
+ "aria-describedby": g ? `${r}-${d.id}` : void 0,
1071
1071
  title: g ? d.offer.refusal : void 0,
1072
- className: F("cms-menu__item", d.danger && "is-danger", d.offer.locked && "is-locked", g && "is-refused"),
1072
+ className: $("cms-menu__item", d.danger && "is-danger", d.offer.locked && "is-locked", g && "is-refused"),
1073
1073
  onClick: () => {
1074
1074
  g || (t(), d.onSelect());
1075
1075
  },
@@ -1080,7 +1080,7 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
1080
1080
  d.checked !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-menu__check", children: d.checked ? /* @__PURE__ */ e(G, { name: "check" }) : null }) : null,
1081
1081
  d.offer.locked ? /* @__PURE__ */ e(G, { name: "lock" }) : null,
1082
1082
  /* @__PURE__ */ e("span", { className: "cms-menu__label", children: d.label }),
1083
- g ? /* @__PURE__ */ e("span", { id: `${a}-${d.id}`, className: "cms-menu__refusal", children: d.offer.refusal }) : null
1083
+ g ? /* @__PURE__ */ e("span", { id: `${r}-${d.id}`, className: "cms-menu__refusal", children: d.offer.refusal }) : null
1084
1084
  ]
1085
1085
  },
1086
1086
  d.id
@@ -1090,14 +1090,14 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
1090
1090
  const g = f[f.length - 1];
1091
1091
  g !== void 0 && g.group === d.group ? g.items.push(d) : f.push({ group: d.group, items: [d] });
1092
1092
  }
1093
- return Pe(
1093
+ return Fe(
1094
1094
  /* @__PURE__ */ e(
1095
1095
  "div",
1096
1096
  {
1097
1097
  ref: s,
1098
1098
  className: "cms-menu",
1099
1099
  role: "menu",
1100
- "aria-label": r,
1100
+ "aria-label": a,
1101
1101
  style: { left: (u ?? n).x, top: (u ?? n).y },
1102
1102
  onKeyDown: p,
1103
1103
  onContextMenu: (d) => d.preventDefault(),
@@ -1113,11 +1113,11 @@ function ge({ at: n, items: l, onClose: t, label: r = "Actions", focus: c = "cur
1113
1113
  document.body
1114
1114
  );
1115
1115
  }
1116
- function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context: s, fullWidth: m = !1 }) {
1116
+ function gl({ title: n, icon: l, primary: t, more: a = [], moreLabel: c, context: s, fullWidth: m = !1 }) {
1117
1117
  var k, x, C;
1118
- const [a, u] = T(null), v = se(), o = r.filter((w) => w.offer.offered), p = (k = t == null ? void 0 : t.offer) == null ? void 0 : k.refusal, h = t !== void 0 && (((x = t.offer) == null ? void 0 : x.offered) === !1 || p !== void 0), f = t !== void 0 && "menu" in t ? t.menu.filter((w) => w.offer.offered) : [], d = t !== void 0 && "menu" in t && f.length > 0 ? t : null, g = (w, b) => {
1118
+ const [r, u] = T(null), v = se(), o = a.filter((w) => w.offer.offered), p = (k = t == null ? void 0 : t.offer) == null ? void 0 : k.refusal, h = t !== void 0 && (((x = t.offer) == null ? void 0 : x.offered) === !1 || p !== void 0), f = t !== void 0 && "menu" in t ? t.menu.filter((w) => w.offer.offered) : [], d = t !== void 0 && "menu" in t && f.length > 0 ? t : null, g = (w, b) => {
1119
1119
  const y = b.getBoundingClientRect();
1120
- u((a == null ? void 0 : a.which) === w ? null : { which: w, x: y.left, y: y.bottom + 4 });
1120
+ u((r == null ? void 0 : r.which) === w ? null : { which: w, x: y.left, y: y.bottom + 4 });
1121
1121
  };
1122
1122
  return /* @__PURE__ */ i("header", { className: `cms-section-header${m ? " cms-section-header--full" : ""}`, children: [
1123
1123
  /* @__PURE__ */ i("div", { className: "cms-section-header__row", "data-row": "1", children: [
@@ -1151,7 +1151,7 @@ function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context
1151
1151
  className: "cms-button cms-button--primary cms-section-header__split",
1152
1152
  "data-action": "primary-menu",
1153
1153
  "aria-haspopup": "menu",
1154
- "aria-expanded": (a == null ? void 0 : a.which) === "primary",
1154
+ "aria-expanded": (r == null ? void 0 : r.which) === "primary",
1155
1155
  "aria-label": d.menuLabel,
1156
1156
  onClick: (w) => g("primary", w.currentTarget),
1157
1157
  children: /* @__PURE__ */ e(L, { name: "chevron-down" })
@@ -1166,7 +1166,7 @@ function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context
1166
1166
  className: "cms-section-header__more",
1167
1167
  "data-action": "more",
1168
1168
  "aria-haspopup": "menu",
1169
- "aria-expanded": (a == null ? void 0 : a.which) === "more",
1169
+ "aria-expanded": (r == null ? void 0 : r.which) === "more",
1170
1170
  "aria-label": c,
1171
1171
  title: c,
1172
1172
  onClick: (w) => g("more", w.currentTarget),
@@ -1176,24 +1176,30 @@ function gl({ title: n, icon: l, primary: t, more: r = [], moreLabel: c, context
1176
1176
  ] })
1177
1177
  ] }),
1178
1178
  s != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: s }) : null,
1179
- d !== null ? /* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "primary" ? a : null, items: f, onClose: () => u(null), label: d.menuLabel }) : null,
1180
- /* @__PURE__ */ e(ge, { at: (a == null ? void 0 : a.which) === "more" ? a : null, items: r, onClose: () => u(null), label: c })
1179
+ d !== null ? /* @__PURE__ */ e(ge, { at: (r == null ? void 0 : r.which) === "primary" ? r : null, items: f, onClose: () => u(null), label: d.menuLabel }) : null,
1180
+ /* @__PURE__ */ e(ge, { at: (r == null ? void 0 : r.which) === "more" ? r : null, items: a, onClose: () => u(null), label: c })
1181
1181
  ] });
1182
1182
  }
1183
- function Nl({ title: n, scope: l, actions: t, backLink: r }) {
1183
+ function Nl({ head: n, children: l, className: t, scrollRef: a, onScroll: c, bodyProps: s }) {
1184
+ return /* @__PURE__ */ i("div", { className: $("cms-column", t), children: [
1185
+ n == null ? null : /* @__PURE__ */ e("div", { className: "cms-column__head", children: n }),
1186
+ /* @__PURE__ */ e("div", { ...s, className: $("cms-column__body", s == null ? void 0 : s.className), ref: a, onScroll: c, children: l })
1187
+ ] });
1188
+ }
1189
+ function wl({ title: n, scope: l, actions: t, backLink: a }) {
1184
1190
  return /* @__PURE__ */ i("header", { className: "cms-page-header", children: [
1185
- r ? /* @__PURE__ */ i(
1191
+ a ? /* @__PURE__ */ i(
1186
1192
  "a",
1187
1193
  {
1188
1194
  className: "cms-page-header__back",
1189
- href: r.href ?? "#",
1195
+ href: a.href ?? "#",
1190
1196
  onClick: (c) => {
1191
- r.onBack && (c.preventDefault(), r.onBack());
1197
+ a.onBack && (c.preventDefault(), a.onBack());
1192
1198
  },
1193
1199
  children: [
1194
1200
  /* @__PURE__ */ e(G, { name: "back" }),
1195
1201
  " ",
1196
- r.label
1202
+ a.label
1197
1203
  ]
1198
1204
  }
1199
1205
  ) : null,
@@ -1206,30 +1212,30 @@ function Nl({ title: n, scope: l, actions: t, backLink: r }) {
1206
1212
  ] })
1207
1213
  ] });
1208
1214
  }
1209
- function wl({ tabs: n, active: l, onSelect: t, label: r }) {
1210
- const c = H([]), s = (m, a) => {
1215
+ function yl({ tabs: n, active: l, onSelect: t, label: a }) {
1216
+ const c = H([]), s = (m, r) => {
1211
1217
  var p;
1212
- const u = n.length - 1, v = m.key === "ArrowRight" ? a === u ? 0 : a + 1 : m.key === "ArrowLeft" ? a === 0 ? u : a - 1 : m.key === "Home" ? 0 : m.key === "End" ? u : null;
1218
+ const u = n.length - 1, v = m.key === "ArrowRight" ? r === u ? 0 : r + 1 : m.key === "ArrowLeft" ? r === 0 ? u : r - 1 : m.key === "Home" ? 0 : m.key === "End" ? u : null;
1213
1219
  if (v === null) return;
1214
1220
  m.preventDefault();
1215
1221
  const o = n[v];
1216
1222
  o && (t(o.id), (p = c.current[v]) == null || p.focus());
1217
1223
  };
1218
- return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": r, children: n.map((m, a) => {
1224
+ return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": a, children: n.map((m, r) => {
1219
1225
  const u = m.id === l;
1220
1226
  return /* @__PURE__ */ i(
1221
1227
  "button",
1222
1228
  {
1223
1229
  ref: (v) => {
1224
- c.current[a] = v;
1230
+ c.current[r] = v;
1225
1231
  },
1226
1232
  type: "button",
1227
1233
  role: "tab",
1228
- className: F("cms-tab", u && "is-active"),
1234
+ className: $("cms-tab", u && "is-active"),
1229
1235
  "aria-selected": u,
1230
1236
  tabIndex: u ? 0 : -1,
1231
1237
  onClick: () => t(m.id),
1232
- onKeyDown: (v) => s(v, a),
1238
+ onKeyDown: (v) => s(v, r),
1233
1239
  children: [
1234
1240
  m.label,
1235
1241
  m.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: m.count }) : null
@@ -1252,19 +1258,19 @@ function $n(n) {
1252
1258
  l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
1253
1259
  return l % 6 + 1;
1254
1260
  }
1255
- function Se({ name: n, pictureUrl: l, presence: t, connection: r, deleted: c = !1, size: s = 32, tintSeed: m }) {
1256
- const a = Ln(n) || "?", u = n.trim() === "" ? "?" : n, v = r !== void 0 ? `is-${r.state === "offline" ? "disconnected" : r.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, o = r !== void 0 ? `${u}, ${r.label}` : t ? `${u}, ${t}` : u;
1261
+ function Se({ name: n, pictureUrl: l, presence: t, connection: a, deleted: c = !1, size: s = 32, tintSeed: m }) {
1262
+ const r = Ln(n) || "?", u = n.trim() === "" ? "?" : n, v = a !== void 0 ? `is-${a.state === "offline" ? "disconnected" : a.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, o = a !== void 0 ? `${u}, ${a.label}` : t ? `${u}, ${t}` : u;
1257
1263
  return /* @__PURE__ */ i(
1258
1264
  "span",
1259
1265
  {
1260
- className: F("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${$n(m ?? n)}`),
1266
+ className: $("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${$n(m ?? n)}`),
1261
1267
  style: { width: s, height: s, fontSize: Math.round(s * 0.4) },
1262
1268
  role: "img",
1263
1269
  "aria-label": o,
1264
- ...r === void 0 ? {} : { title: r.label },
1270
+ ...a === void 0 ? {} : { title: a.label },
1265
1271
  children: [
1266
- c ? /* @__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: a }),
1267
- v === null ? null : /* @__PURE__ */ e("span", { className: F("cms-avatar__presence", v), "aria-hidden": "true" })
1272
+ c ? /* @__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: r }),
1273
+ v === null ? null : /* @__PURE__ */ e("span", { className: $("cms-avatar__presence", v), "aria-hidden": "true" })
1268
1274
  ]
1269
1275
  }
1270
1276
  );
@@ -1280,22 +1286,22 @@ function Le(n) {
1280
1286
  return null;
1281
1287
  }
1282
1288
  }
1283
- function Pn(n, l) {
1289
+ function Fn(n, l) {
1284
1290
  if (n !== void 0)
1285
1291
  try {
1286
1292
  window.localStorage.setItem(Re + n, String(l));
1287
1293
  } catch {
1288
1294
  }
1289
1295
  }
1290
- function Fn(n) {
1296
+ function Bn(n) {
1291
1297
  if (n !== void 0)
1292
1298
  try {
1293
1299
  window.localStorage.removeItem(Re + n);
1294
1300
  } catch {
1295
1301
  }
1296
1302
  }
1297
- function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16, label: m, onChange: a, className: u, style: v }) {
1298
- const o = Math.max(r, c), p = (b) => Math.round(Math.min(Math.max(b, r), o)), [h, f] = T(() => {
1303
+ function Pn({ storageKey: n, value: l, default: t, min: a, max: c, step: s = 16, label: m, onChange: r, className: u, style: v }) {
1304
+ const o = Math.max(a, c), p = (b) => Math.round(Math.min(Math.max(b, a), o)), [h, f] = T(() => {
1299
1305
  const b = n === void 0 ? null : Le(n);
1300
1306
  return p(b ?? t);
1301
1307
  }), d = p(l ?? h), g = H(null), [k, x] = T(!1);
@@ -1304,13 +1310,13 @@ function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16,
1304
1310
  const b = Le(n);
1305
1311
  if (b === null) return;
1306
1312
  const y = p(b);
1307
- (l === void 0 || y !== p(l)) && (f(y), a(y, !0));
1313
+ (l === void 0 || y !== p(l)) && (f(y), r(y, !0));
1308
1314
  }, []), ve(() => {
1309
- l !== void 0 && p(l) !== l && a(p(l), !0);
1310
- }, [l, r, o]);
1315
+ l !== void 0 && p(l) !== l && r(p(l), !0);
1316
+ }, [l, a, o]);
1311
1317
  const C = (b, y) => {
1312
1318
  const D = p(b);
1313
- f(D), y && Pn(n, D), a(D, y);
1319
+ f(D), y && Fn(n, D), r(D, y);
1314
1320
  }, w = () => {
1315
1321
  const b = g.current;
1316
1322
  g.current = null, x(!1), b !== null && b.last !== b.from && C(b.last, !0);
@@ -1323,9 +1329,9 @@ function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16,
1323
1329
  "aria-orientation": "vertical",
1324
1330
  "aria-label": m,
1325
1331
  "aria-valuenow": d,
1326
- "aria-valuemin": r,
1332
+ "aria-valuemin": a,
1327
1333
  "aria-valuemax": o,
1328
- className: F("cms-splitter", k && "is-dragging", d <= r && "is-at-min", d >= o && "is-at-max", u),
1334
+ className: $("cms-splitter", k && "is-dragging", d <= a && "is-at-min", d >= o && "is-at-max", u),
1329
1335
  style: v,
1330
1336
  onPointerDown: (b) => {
1331
1337
  var D, Z;
@@ -1341,12 +1347,12 @@ function Bn({ storageKey: n, value: l, default: t, min: r, max: c, step: s = 16,
1341
1347
  onPointerUp: w,
1342
1348
  onPointerCancel: w,
1343
1349
  onDoubleClick: () => {
1344
- Fn(n);
1350
+ Bn(n);
1345
1351
  const b = p(t);
1346
- f(b), a(b, !0);
1352
+ f(b), r(b, !0);
1347
1353
  },
1348
1354
  onKeyDown: (b) => {
1349
- const y = b.shiftKey ? In : s, D = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1, Z = b.key === "ArrowLeft" ? d - D * y : b.key === "ArrowRight" ? d + D * y : b.key === "Home" ? r : b.key === "End" ? o : null;
1355
+ const y = b.shiftKey ? In : s, D = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1, Z = b.key === "ArrowLeft" ? d - D * y : b.key === "ArrowRight" ? d + D * y : b.key === "Home" ? a : b.key === "End" ? o : null;
1350
1356
  Z !== null && (b.preventDefault(), C(Z, !0));
1351
1357
  }
1352
1358
  }
@@ -1358,17 +1364,17 @@ function Rn({ count: n, label: l, max: t = 99 }) {
1358
1364
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
1359
1365
  ] });
1360
1366
  }
1361
- function yl({ product: n, mark: l, rail: t, active: r, onNavigate: c, server: s, search: m, account: a, children: u, railLabel: v = "Sections" }) {
1367
+ function kl({ product: n, mark: l, rail: t, active: a, onNavigate: c, server: s, search: m, account: r, children: u, railLabel: v = "Sections" }) {
1362
1368
  return /* @__PURE__ */ i("div", { className: "cms-shell", children: [
1363
1369
  /* @__PURE__ */ i("nav", { className: "cms-shell__rail", "aria-label": v, children: [
1364
1370
  /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
1365
1371
  /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((o) => {
1366
- const p = o.id === r;
1372
+ const p = o.id === a;
1367
1373
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
1368
1374
  "a",
1369
1375
  {
1370
1376
  href: o.href,
1371
- className: F("cms-shell__item", p && "is-active"),
1377
+ className: $("cms-shell__item", p && "is-active"),
1372
1378
  "aria-current": p ? "page" : void 0,
1373
1379
  title: o.label,
1374
1380
  onClick: (h) => {
@@ -1389,12 +1395,12 @@ function yl({ product: n, mark: l, rail: t, active: r, onNavigate: c, server: s,
1389
1395
  /* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
1390
1396
  s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
1391
1397
  m != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: m }) : null,
1392
- a != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: a }) : null
1398
+ r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: r }) : null
1393
1399
  ] }),
1394
1400
  /* @__PURE__ */ e("main", { className: "cms-shell__main", children: u })
1395
1401
  ] });
1396
1402
  }
1397
- function kl({ label: n, placeholder: l, value: t, onChange: r, onSearch: c }) {
1403
+ function xl({ label: n, placeholder: l, value: t, onChange: a, onSearch: c }) {
1398
1404
  return /* @__PURE__ */ i(
1399
1405
  "form",
1400
1406
  {
@@ -1413,7 +1419,7 @@ function kl({ label: n, placeholder: l, value: t, onChange: r, onSearch: c }) {
1413
1419
  "aria-label": n,
1414
1420
  placeholder: l,
1415
1421
  value: t,
1416
- onChange: (s) => r(s.target.value)
1422
+ onChange: (s) => a(s.target.value)
1417
1423
  }
1418
1424
  )
1419
1425
  ]
@@ -1421,16 +1427,16 @@ function kl({ label: n, placeholder: l, value: t, onChange: r, onSearch: c }) {
1421
1427
  );
1422
1428
  }
1423
1429
  function Hn(n, l, t) {
1424
- const r = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1425
- let c = r.reduce((s, m) => s + m, 0) + t - l;
1426
- for (let s = r.length - 1; s >= 0 && c > 0; s -= 1) {
1427
- const m = Math.min(c, r[s] - n[s].min);
1428
- r[s] = r[s] - m, c -= m;
1430
+ const a = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1431
+ let c = a.reduce((s, m) => s + m, 0) + t - l;
1432
+ for (let s = a.length - 1; s >= 0 && c > 0; s -= 1) {
1433
+ const m = Math.min(c, a[s] - n[s].min);
1434
+ a[s] = a[s] - m, c -= m;
1429
1435
  }
1430
- return r;
1436
+ return a;
1431
1437
  }
1432
- function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize: s, storageKey: m }) {
1433
- const a = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), u = H(null), [v, o] = T(0), p = (r ?? []).slice(0, n.length - 1), [h, f] = T(() => m === void 0 ? [] : p.map((b, y) => Le(`${m}:${String(y)}`) ?? void 0)), [d, g] = T(!1), k = p.map((b, y) => b !== void 0 && h[y] !== void 0 ? { ...b, width: h[y] } : b), x = k.length === n.length - 1 && k.every((b) => b !== void 0);
1438
+ function Ml({ panes: n, active: l, back: t, sizes: a, lastMin: c = 360, onResize: s, storageKey: m }) {
1439
+ const r = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), u = H(null), [v, o] = T(0), p = (a ?? []).slice(0, n.length - 1), [h, f] = T(() => m === void 0 ? [] : p.map((b, y) => Le(`${m}:${String(y)}`) ?? void 0)), [d, g] = T(!1), k = p.map((b, y) => b !== void 0 && h[y] !== void 0 ? { ...b, width: h[y] } : b), x = k.length === n.length - 1 && k.every((b) => b !== void 0);
1434
1440
  ve(() => {
1435
1441
  const b = u.current;
1436
1442
  if (b === null || !x) return;
@@ -1447,12 +1453,12 @@ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize
1447
1453
  "div",
1448
1454
  {
1449
1455
  ref: u,
1450
- className: F("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", x && "cms-panes--sized", d && "is-resizing"),
1451
- "data-active": a,
1456
+ className: $("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", x && "cms-panes--sized", d && "is-resizing"),
1457
+ "data-active": r,
1452
1458
  style: w,
1453
1459
  children: [
1454
- n.map((b, y) => /* @__PURE__ */ i("section", { className: "cms-panes__pane", "aria-label": b.label, "data-offset": a - y, children: [
1455
- y === a && t ? /* @__PURE__ */ i("a", { className: "cms-panes__back", href: t.href, children: [
1460
+ n.map((b, y) => /* @__PURE__ */ i("section", { className: "cms-panes__pane", "aria-label": b.label, "data-offset": r - y, children: [
1461
+ y === r && t ? /* @__PURE__ */ i("a", { className: "cms-panes__back", href: t.href, children: [
1456
1462
  /* @__PURE__ */ e(L, { name: "chevron-left", size: 18 }),
1457
1463
  t.label
1458
1464
  ] }) : null,
@@ -1461,7 +1467,7 @@ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize
1461
1467
  x ? k.map((b, y) => {
1462
1468
  const D = C.reduce((V, M, R) => R === y ? V : V + M, 0), Z = Math.max(b.min, Math.min(b.max, v > 0 ? v - D - c : b.max));
1463
1469
  return /* @__PURE__ */ e(
1464
- Bn,
1470
+ Pn,
1465
1471
  {
1466
1472
  ...m === void 0 ? {} : { storageKey: `${m}:${String(y)}` },
1467
1473
  value: C[y],
@@ -1486,9 +1492,9 @@ function xl({ panes: n, active: l, back: t, sizes: r, lastMin: c = 360, onResize
1486
1492
  );
1487
1493
  }
1488
1494
  const On = { attachment: "Has an attachment", unread: "Unread" };
1489
- function Ml({ from: n, subject: l, preview: t, time: r, unread: c, hasAttachment: s, selected: m, onOpen: a, check: u, selecting: v, labels: o }) {
1495
+ function Cl({ from: n, subject: l, preview: t, time: a, unread: c, hasAttachment: s, selected: m, onOpen: r, check: u, selecting: v, labels: o }) {
1490
1496
  const p = ye(On, o), h = /* @__PURE__ */ e(Se, { name: n, size: 40 });
1491
- return /* @__PURE__ */ i("div", { className: F("cms-mail-row", c && "is-unread", m && "is-selected", v && "is-selecting", (u == null ? void 0 : u.checked) && "is-checked"), children: [
1497
+ return /* @__PURE__ */ i("div", { className: $("cms-mail-row", c && "is-unread", m && "is-selected", v && "is-selecting", (u == null ? void 0 : u.checked) && "is-checked"), children: [
1492
1498
  u !== void 0 ? /* @__PURE__ */ i("span", { className: "cms-mail-row__lead", children: [
1493
1499
  h,
1494
1500
  /* @__PURE__ */ e(
@@ -1519,14 +1525,14 @@ function Ml({ from: n, subject: l, preview: t, time: r, unread: c, hasAttachment
1519
1525
  type: "button",
1520
1526
  className: "cms-mail-row__open",
1521
1527
  "aria-current": m ? "true" : void 0,
1522
- onClick: a,
1528
+ onClick: r,
1523
1529
  children: [
1524
1530
  u === void 0 ? h : null,
1525
1531
  /* @__PURE__ */ i("span", { className: "cms-mail-row__body", children: [
1526
1532
  /* @__PURE__ */ i("span", { className: "cms-mail-row__line", children: [
1527
1533
  /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1528
1534
  s ? /* @__PURE__ */ e(L, { name: "paperclip", size: 16, label: p.attachment }) : null,
1529
- /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: r })
1535
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: a })
1530
1536
  ] }),
1531
1537
  /* @__PURE__ */ i("span", { className: "cms-mail-row__line", children: [
1532
1538
  /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
@@ -1539,23 +1545,23 @@ function Ml({ from: n, subject: l, preview: t, time: r, unread: c, hasAttachment
1539
1545
  )
1540
1546
  ] });
1541
1547
  }
1542
- function Cl({ direction: n, children: l, time: t, read: r, readLabel: c = "Read" }) {
1543
- return /* @__PURE__ */ i("div", { className: F("cms-bubble", `cms-bubble--${n}`), children: [
1548
+ function Sl({ direction: n, children: l, time: t, read: a, readLabel: c = "Read" }) {
1549
+ return /* @__PURE__ */ i("div", { className: $("cms-bubble", `cms-bubble--${n}`), children: [
1544
1550
  /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: l }),
1545
1551
  /* @__PURE__ */ i("div", { className: "cms-bubble__meta", children: [
1546
1552
  t,
1547
- n === "out" && r ? /* @__PURE__ */ i(A, { children: [
1553
+ n === "out" && a ? /* @__PURE__ */ i(A, { children: [
1548
1554
  " · ",
1549
1555
  c
1550
1556
  ] }) : null
1551
1557
  ] })
1552
1558
  ] });
1553
1559
  }
1554
- function Sl({ label: n, value: l, onChange: t, onSend: r, onAttach: c, placeholder: s, variant: m = "chat", sendLabel: a = "Send", attachLabel: u = "Attach a file", leading: v, canSend: o }) {
1560
+ function El({ label: n, value: l, onChange: t, onSend: a, onAttach: c, placeholder: s, variant: m = "chat", sendLabel: r = "Send", attachLabel: u = "Attach a file", leading: v, canSend: o }) {
1555
1561
  const p = se(), h = o ?? l.trim() !== "", f = (g) => {
1556
- g.preventDefault(), h && r();
1562
+ g.preventDefault(), h && a();
1557
1563
  }, d = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": u, onClick: c, children: /* @__PURE__ */ e(L, { name: "paperclip" }) }) : null;
1558
- return /* @__PURE__ */ i("form", { className: F("cms-composer", `cms-composer--${m}`), onSubmit: f, children: [
1564
+ return /* @__PURE__ */ i("form", { className: $("cms-composer", `cms-composer--${m}`), onSubmit: f, children: [
1559
1565
  /* @__PURE__ */ e("label", { htmlFor: p, className: m === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1560
1566
  m === "chat" ? d : null,
1561
1567
  /* @__PURE__ */ e(
@@ -1568,14 +1574,14 @@ function Sl({ label: n, value: l, onChange: t, onSend: r, onAttach: c, placehold
1568
1574
  value: l,
1569
1575
  onChange: (g) => t(g.target.value),
1570
1576
  onKeyDown: (g) => {
1571
- g.nativeEvent.isComposing || g.keyCode === 229 || m === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), h && r());
1577
+ g.nativeEvent.isComposing || g.keyCode === 229 || m === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), h && a());
1572
1578
  }
1573
1579
  }
1574
1580
  ),
1575
1581
  m === "reply" && v !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: v }) : null,
1576
1582
  m === "reply" ? d : null,
1577
- m === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": a, disabled: !h, children: /* @__PURE__ */ e(L, { name: "send" }) }) : /* @__PURE__ */ i("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !h, children: [
1578
- a,
1583
+ m === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": r, disabled: !h, children: /* @__PURE__ */ e(L, { name: "send" }) }) : /* @__PURE__ */ i("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !h, children: [
1584
+ r,
1579
1585
  " ",
1580
1586
  /* @__PURE__ */ e(L, { name: "send", size: 18 })
1581
1587
  ] })
@@ -1602,24 +1608,24 @@ const He = {
1602
1608
  onCallWith: (n) => `On a call with ${n}`,
1603
1609
  returnToCall: "Return to call"
1604
1610
  };
1605
- function El({ name: n, media: l, onAccept: t, onDecline: r, labels: c }) {
1611
+ function Al({ name: n, media: l, onAccept: t, onDecline: a, labels: c }) {
1606
1612
  const s = ye(He, c), m = l === "video" ? s.incomingVideo : s.incomingAudio;
1607
1613
  return /* @__PURE__ */ i("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(m, n), children: [
1608
1614
  /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(Se, { name: n, size: 112 }) }),
1609
1615
  /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
1610
1616
  /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: m }),
1611
1617
  /* @__PURE__ */ i("div", { className: "cms-call-incoming__actions", children: [
1612
- /* @__PURE__ */ e(_e, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: r }),
1618
+ /* @__PURE__ */ e(_e, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: a }),
1613
1619
  /* @__PURE__ */ e(_e, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
1614
1620
  ] })
1615
1621
  ] });
1616
1622
  }
1617
- function _e({ icon: n, label: l, onClick: t, tone: r = "plain", pressed: c }) {
1623
+ function _e({ icon: n, label: l, onClick: t, tone: a = "plain", pressed: c }) {
1618
1624
  return /* @__PURE__ */ i(
1619
1625
  "button",
1620
1626
  {
1621
1627
  type: "button",
1622
- className: F("cms-call-button", `cms-call-button--${r}`, c && "is-pressed"),
1628
+ className: $("cms-call-button", `cms-call-button--${a}`, c && "is-pressed"),
1623
1629
  "aria-pressed": c,
1624
1630
  onClick: t,
1625
1631
  children: [
@@ -1629,7 +1635,7 @@ function _e({ icon: n, label: l, onClick: t, tone: r = "plain", pressed: c }) {
1629
1635
  }
1630
1636
  );
1631
1637
  }
1632
- function Al({ name: n, duration: l, connection: t, you: r, muted: c, speaker: s, onToggleMute: m, onToggleSpeaker: a, onAddPerson: u, onChat: v, onHangUp: o, labels: p }) {
1638
+ function Tl({ name: n, duration: l, connection: t, you: a, muted: c, speaker: s, onToggleMute: m, onToggleSpeaker: r, onAddPerson: u, onChat: v, onHangUp: o, labels: p }) {
1633
1639
  const h = ye(He, p);
1634
1640
  return /* @__PURE__ */ i("section", { className: "cms-call-panel", "aria-label": h.callWith(n), children: [
1635
1641
  /* @__PURE__ */ i("div", { className: "cms-call-panel__head", children: [
@@ -1638,36 +1644,36 @@ function Al({ name: n, duration: l, connection: t, you: r, muted: c, speaker: s,
1638
1644
  /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1639
1645
  /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": h.callTime(l), children: l })
1640
1646
  ] }),
1641
- /* @__PURE__ */ e("span", { className: F("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? h.goodConnection : h.poorConnection })
1647
+ /* @__PURE__ */ e("span", { className: $("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? h.goodConnection : h.poorConnection })
1642
1648
  ] }),
1643
1649
  /* @__PURE__ */ i("div", { className: "cms-call-panel__you", children: [
1644
- /* @__PURE__ */ e(Se, { name: r.name, size: 36 }),
1650
+ /* @__PURE__ */ e(Se, { name: a.name, size: 36 }),
1645
1651
  /* @__PURE__ */ e("span", { children: h.you }),
1646
- r.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": h.speaking }) : null
1652
+ a.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": h.speaking }) : null
1647
1653
  ] }),
1648
1654
  /* @__PURE__ */ i("div", { className: "cms-call-panel__controls", children: [
1649
1655
  /* @__PURE__ */ e(_e, { icon: "mic", label: c ? h.unmute : h.mute, pressed: c, onClick: m }),
1650
- /* @__PURE__ */ e(_e, { icon: "speaker", label: h.speaker, pressed: s, onClick: a }),
1656
+ /* @__PURE__ */ e(_e, { icon: "speaker", label: h.speaker, pressed: s, onClick: r }),
1651
1657
  u ? /* @__PURE__ */ e(_e, { icon: "user-plus", label: h.addPerson, onClick: u }) : null,
1652
1658
  v ? /* @__PURE__ */ e(_e, { icon: "chat", label: h.chat, onClick: v }) : null,
1653
1659
  /* @__PURE__ */ e(_e, { icon: "phone-off", label: h.hangUp, tone: "hang-up", onClick: o })
1654
1660
  ] })
1655
1661
  ] });
1656
1662
  }
1657
- function Tl({ name: n, duration: l, muted: t, onToggleMute: r, onReturn: c, onHangUp: s, labels: m }) {
1658
- const a = ye(He, m);
1659
- return /* @__PURE__ */ i("section", { className: "cms-call-bar", "aria-label": a.callWith(n), children: [
1663
+ function Dl({ name: n, duration: l, muted: t, onToggleMute: a, onReturn: c, onHangUp: s, labels: m }) {
1664
+ const r = ye(He, m);
1665
+ return /* @__PURE__ */ i("section", { className: "cms-call-bar", "aria-label": r.callWith(n), children: [
1660
1666
  /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1661
- /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: a.onCallWith(n) }),
1667
+ /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: r.onCallWith(n) }),
1662
1668
  /* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: l }),
1663
1669
  /* @__PURE__ */ i("span", { className: "cms-call-bar__actions", children: [
1664
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? a.unmute : a.mute, "aria-pressed": t, onClick: r, children: /* @__PURE__ */ e(L, { name: "mic" }) }),
1665
- /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: c, children: a.returnToCall }),
1666
- /* @__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" }) })
1670
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? r.unmute : r.mute, "aria-pressed": t, onClick: a, children: /* @__PURE__ */ e(L, { name: "mic" }) }),
1671
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: c, children: r.returnToCall }),
1672
+ /* @__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(L, { name: "phone-off" }) })
1667
1673
  ] })
1668
1674
  ] });
1669
1675
  }
1670
- function Dl({ mark: n, product: l, headline: t, lead: r, features: c = [], children: s }) {
1676
+ function Ll({ mark: n, product: l, headline: t, lead: a, features: c = [], children: s }) {
1671
1677
  return /* @__PURE__ */ i("div", { className: "cms-signin", children: [
1672
1678
  /* @__PURE__ */ i("aside", { className: "cms-signin__brand", children: [
1673
1679
  /* @__PURE__ */ i("p", { className: "cms-signin__logo", children: [
@@ -1676,7 +1682,7 @@ function Dl({ mark: n, product: l, headline: t, lead: r, features: c = [], child
1676
1682
  ] }),
1677
1683
  /* @__PURE__ */ i("div", { className: "cms-signin__pitch", children: [
1678
1684
  /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
1679
- /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: r }),
1685
+ /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: a }),
1680
1686
  c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((m) => /* @__PURE__ */ i("li", { children: [
1681
1687
  /* @__PURE__ */ e(L, { name: m.icon, size: 18 }),
1682
1688
  m.label
@@ -1698,17 +1704,17 @@ const Un = {
1698
1704
  newHere: "New here?",
1699
1705
  create: "Create an account"
1700
1706
  };
1701
- function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, busy: s, labels: m }) {
1702
- const a = ye(Un, m), u = se(), [v, o] = T(""), [p, h] = T(""), [f, d] = T(!1);
1707
+ function $l({ server: n, onSubmit: l, forgotHref: t, createHref: a, error: c, busy: s, labels: m }) {
1708
+ const r = ye(Un, m), u = se(), [v, o] = T(""), [p, h] = T(""), [f, d] = T(!1);
1703
1709
  return /* @__PURE__ */ i("form", { className: "cms-signin-form", onSubmit: (k) => {
1704
1710
  k.preventDefault(), l(v, p);
1705
1711
  }, "aria-describedby": c ? `${u}-error` : void 0, children: [
1706
- /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: a.title }),
1712
+ /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: r.title }),
1707
1713
  /* @__PURE__ */ i("p", { className: "cms-signin-form__server", children: [
1708
1714
  /* @__PURE__ */ e(L, { name: "server", size: 18 }),
1709
1715
  n
1710
1716
  ] }),
1711
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: a.identifier }),
1717
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: r.identifier }),
1712
1718
  /* @__PURE__ */ e(
1713
1719
  "input",
1714
1720
  {
@@ -1716,13 +1722,13 @@ function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, bu
1716
1722
  className: "cms-signin-form__input",
1717
1723
  type: "text",
1718
1724
  autoComplete: "username",
1719
- placeholder: a.identifierPlaceholder,
1725
+ placeholder: r.identifierPlaceholder,
1720
1726
  value: v,
1721
1727
  onChange: (k) => o(k.target.value),
1722
1728
  required: !0
1723
1729
  }
1724
1730
  ),
1725
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: a.password }),
1731
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: r.password }),
1726
1732
  /* @__PURE__ */ i("span", { className: "cms-signin-form__password", children: [
1727
1733
  /* @__PURE__ */ e(
1728
1734
  "input",
@@ -1736,14 +1742,14 @@ function Ll({ server: n, onSubmit: l, forgotHref: t, createHref: r, error: c, bu
1736
1742
  required: !0
1737
1743
  }
1738
1744
  ),
1739
- /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": f, onClick: () => d((k) => !k), children: f ? a.hide : a.show })
1745
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": f, onClick: () => d((k) => !k), children: f ? r.hide : r.show })
1740
1746
  ] }),
1741
- t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: a.forgot }) : null,
1747
+ t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: r.forgot }) : null,
1742
1748
  c ? /* @__PURE__ */ e("p", { id: `${u}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
1743
- /* @__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 }),
1744
- r ? /* @__PURE__ */ i(A, { children: [
1745
- /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: a.newHere }) }),
1746
- /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: r, children: a.create })
1749
+ /* @__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 }),
1750
+ a ? /* @__PURE__ */ i(A, { children: [
1751
+ /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: r.newHere }) }),
1752
+ /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: a, children: r.create })
1747
1753
  ] }) : null
1748
1754
  ] });
1749
1755
  }
@@ -1753,7 +1759,7 @@ function Xe(n) {
1753
1759
  return l === Ue(n.options, n.defaultValue) ? null : l ?? null;
1754
1760
  }
1755
1761
  function Oe({ options: n, value: l, defaultValue: t }) {
1756
- return n.find((r) => r.id === l) ?? Ue(n, t);
1762
+ return n.find((a) => a.id === l) ?? Ue(n, t);
1757
1763
  }
1758
1764
  function Je(n) {
1759
1765
  var l;
@@ -1761,14 +1767,14 @@ function Je(n) {
1761
1767
  }
1762
1768
  function Qe(n, l) {
1763
1769
  const t = Oe(n);
1764
- return n.options.map((r) => ({
1765
- id: r.id,
1766
- label: r.label,
1770
+ return n.options.map((a) => ({
1771
+ id: a.id,
1772
+ label: a.label,
1767
1773
  offer: { offered: !0, locked: !1 },
1768
- checked: r === t,
1774
+ checked: a === t,
1769
1775
  ...l === void 0 ? {} : { group: l },
1770
1776
  onSelect: () => {
1771
- r !== t && n.onChange(r.id);
1777
+ a !== t && n.onChange(a.id);
1772
1778
  }
1773
1779
  }));
1774
1780
  }
@@ -1786,8 +1792,8 @@ function nn({ iconOnly: n = !1, onOpenChange: l, ...t }) {
1786
1792
  return t.options.length < 2 ? null : /* @__PURE__ */ e(Kn, { ...t, iconOnly: n, onOpenChange: l });
1787
1793
  }
1788
1794
  function Kn({ iconOnly: n, onOpenChange: l, ...t }) {
1789
- const [r, c] = T(null), s = be(() => c(null), []), m = H(!1), a = r !== null;
1790
- Q(() => (l == null || l(a), () => l == null ? void 0 : l(!1)), [a, l]);
1795
+ const [a, c] = T(null), s = be(() => c(null), []), m = H(!1), r = a !== null;
1796
+ Q(() => (l == null || l(r), () => l == null ? void 0 : l(!1)), [r, l]);
1791
1797
  const u = Xe(t), v = u !== null && !n, o = Je(t), p = (h, f) => {
1792
1798
  const d = h.getBoundingClientRect();
1793
1799
  c({ x: d.left, y: d.bottom + 4, focus: f });
@@ -1797,16 +1803,16 @@ function Kn({ iconOnly: n, onOpenChange: l, ...t }) {
1797
1803
  "button",
1798
1804
  {
1799
1805
  type: "button",
1800
- className: F("cms-filter-menu", u !== null && "cms-filter-menu--active", v && "cms-filter-menu--named"),
1806
+ className: $("cms-filter-menu", u !== null && "cms-filter-menu--active", v && "cms-filter-menu--named"),
1801
1807
  "aria-haspopup": "menu",
1802
- "aria-expanded": a,
1808
+ "aria-expanded": r,
1803
1809
  "aria-label": o,
1804
1810
  title: o,
1805
1811
  onMouseDown: () => {
1806
- m.current = a;
1812
+ m.current = r;
1807
1813
  },
1808
1814
  onClick: (h) => {
1809
- a || m.current ? s() : p(h.currentTarget, "current"), m.current = !1;
1815
+ r || m.current ? s() : p(h.currentTarget, "current"), m.current = !1;
1810
1816
  },
1811
1817
  onKeyDown: (h) => {
1812
1818
  m.current = !1, (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), p(h.currentTarget, h.key === "ArrowUp" ? "last" : "current"));
@@ -1820,11 +1826,11 @@ function Kn({ iconOnly: n, onOpenChange: l, ...t }) {
1820
1826
  /* @__PURE__ */ e(
1821
1827
  ge,
1822
1828
  {
1823
- at: r,
1829
+ at: a,
1824
1830
  items: Qe(t),
1825
1831
  onClose: s,
1826
1832
  label: t.label,
1827
- focus: r == null ? void 0 : r.focus
1833
+ focus: a == null ? void 0 : a.focus
1828
1834
  }
1829
1835
  )
1830
1836
  ] });
@@ -1832,7 +1838,7 @@ function Kn({ iconOnly: n, onOpenChange: l, ...t }) {
1832
1838
  function Vn(n) {
1833
1839
  return en(n), /* @__PURE__ */ e(nn, { ...n });
1834
1840
  }
1835
- function $l({ leading: n, name: l, filter: t }) {
1841
+ function Il({ leading: n, name: l, filter: t }) {
1836
1842
  return /* @__PURE__ */ i("div", { className: "cms-list-head", children: [
1837
1843
  n != null ? /* @__PURE__ */ e("span", { className: "cms-list-head__leading", children: n }) : null,
1838
1844
  /* @__PURE__ */ e("h2", { className: "cms-list-head__name", title: l, children: l }),
@@ -1848,26 +1854,26 @@ function Zn(n) {
1848
1854
  function Wn(n) {
1849
1855
  const l = /* @__PURE__ */ new Map();
1850
1856
  for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
1851
- return [...l.entries()].sort(([t], [r]) => t - r).map(([, t]) => t);
1857
+ return [...l.entries()].sort(([t], [a]) => t - a).map(([, t]) => t);
1852
1858
  }
1853
- function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leading: s }) {
1854
- const m = l.filter((_) => _.entries === void 0 || _.entries.length > 0), a = H(null), u = H(null), v = H(null), [o, p] = T(Ze), [h, f] = T(null), [d, g] = T("first"), [k, x] = T(null), [C, w] = T(null), b = Zn(m), y = Wn(m), D = b.flat(), Z = D.filter((_) => _.overflow === 0), V = D.filter((_) => _.overflow !== 0), M = JSON.stringify([m.map((_) => [_.id, _.label, _.icon, _.group, _.overflow ?? null, _.entries !== void 0]), r ?? "", s !== void 0]), R = be(() => {
1855
- const _ = a.current, $ = u.current;
1856
- if (_ === null || $ === null) return;
1857
- const B = getComputedStyle(_), ne = parseFloat(B.columnGap || "0") || 0, I = _.clientWidth - (parseFloat(B.paddingLeft) || 0) - (parseFloat(B.paddingRight) || 0), X = (E) => {
1859
+ function Fl({ label: n, actions: l, onAction: t, status: a, moreLabel: c, leading: s }) {
1860
+ const m = l.filter((_) => _.entries === void 0 || _.entries.length > 0), r = H(null), u = H(null), v = H(null), [o, p] = T(Ze), [h, f] = T(null), [d, g] = T("first"), [k, x] = T(null), [C, w] = T(null), b = Zn(m), y = Wn(m), D = b.flat(), Z = D.filter((_) => _.overflow === 0), V = D.filter((_) => _.overflow !== 0), M = JSON.stringify([m.map((_) => [_.id, _.label, _.icon, _.group, _.overflow ?? null, _.entries !== void 0]), a ?? "", s !== void 0]), R = be(() => {
1861
+ const _ = r.current, I = u.current;
1862
+ if (_ === null || I === null) return;
1863
+ const P = getComputedStyle(_), ne = parseFloat(P.columnGap || "0") || 0, F = _.clientWidth - (parseFloat(P.paddingLeft) || 0) - (parseFloat(P.paddingRight) || 0), X = (E) => {
1858
1864
  var K;
1859
- return ((K = $.querySelector(E)) == null ? void 0 : K.getBoundingClientRect().width) ?? 0;
1865
+ return ((K = I.querySelector(E)) == null ? void 0 : K.getBoundingClientRect().width) ?? 0;
1860
1866
  }, N = X('[data-measure="leading"]'), S = X('[data-measure="separator"]'), O = X('[data-measure="more"]'), Y = (E, K) => X(`[data-measure="${K ? "full" : "icon"}"][data-measure-action="${CSS.escape(E)}"]`), de = (E, K) => {
1861
1867
  const W = /* @__PURE__ */ new Set([...Z.map((ce) => ce.id), ...K]), te = b.map((ce) => ce.filter((Ne) => !W.has(Ne.id))).filter((ce) => ce.length > 0), pe = te.flat(), Ce = pe.length + (te.length - 1) + (W.size > 0 ? 1 : 0) + (N > 0 ? 1 : 0);
1862
1868
  return N + pe.reduce((ce, Ne) => ce + Y(Ne.id, !E.has(Ne.id)), 0) + S * Math.max(0, te.length - 1) + (W.size > 0 ? O : 0) + ne * Math.max(0, Ce - 1);
1863
1869
  }, Me = V.filter((E) => !y.some((K) => K.includes(E.id))).map((E) => E.id), Ee = [...y, ...[...Me].reverse().map((E) => [E])];
1864
1870
  let ue = null;
1865
- if (de(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= I) ue = Ze;
1871
+ if (de(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= F) ue = Ze;
1866
1872
  else {
1867
1873
  const E = /* @__PURE__ */ new Set();
1868
1874
  for (const K of Ee) {
1869
1875
  for (const W of K) E.add(W);
1870
- if (de(E, /* @__PURE__ */ new Set()) <= I) {
1876
+ if (de(E, /* @__PURE__ */ new Set()) <= F) {
1871
1877
  ue = { bare: E, hidden: /* @__PURE__ */ new Set() };
1872
1878
  break;
1873
1879
  }
@@ -1877,36 +1883,36 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
1877
1883
  const E = new Set(V.map((W) => W.id)), K = /* @__PURE__ */ new Set();
1878
1884
  for (const W of y) {
1879
1885
  for (const te of W) V.some((pe) => pe.id === te) && K.add(te);
1880
- if (K.size >= 2 && de(E, K) <= I) break;
1886
+ if (K.size >= 2 && de(E, K) <= F) break;
1881
1887
  }
1882
- if (de(E, K) > I) {
1888
+ if (de(E, K) > F) {
1883
1889
  for (const W of [...Me].reverse())
1884
- if (K.add(W), de(E, K) <= I) break;
1890
+ if (K.add(W), de(E, K) <= F) break;
1885
1891
  }
1886
1892
  ue = { bare: E, hidden: K };
1887
1893
  }
1888
- const P = ue;
1889
- p((E) => We(E.bare, P.bare) && We(E.hidden, P.hidden) ? E : P);
1894
+ const B = ue;
1895
+ p((E) => We(E.bare, B.bare) && We(E.hidden, B.hidden) ? E : B);
1890
1896
  }, [M]);
1891
1897
  ve(R, [R]), Q(() => {
1892
- const _ = a.current;
1898
+ const _ = r.current;
1893
1899
  if (_ === null || typeof ResizeObserver > "u") return;
1894
- const $ = new ResizeObserver(() => R());
1895
- return $.observe(_), () => $.disconnect();
1900
+ const I = new ResizeObserver(() => R());
1901
+ return I.observe(_), () => I.disconnect();
1896
1902
  }, [R]);
1897
- const z = /* @__PURE__ */ new Set([...Z.map((_) => _.id), ...o.hidden]), U = b.map((_) => _.filter(($) => !z.has($.id))).filter((_) => _.length > 0).flat(), j = [
1903
+ const z = /* @__PURE__ */ new Set([...Z.map((_) => _.id), ...o.hidden]), U = b.map((_) => _.filter((I) => !z.has(I.id))).filter((_) => _.length > 0).flat(), j = [
1898
1904
  ...Z,
1899
- ...y.flat().map((_) => D.find(($) => $.id === _)).filter((_) => _ !== void 0 && o.hidden.has(_.id)),
1905
+ ...y.flat().map((_) => D.find((I) => I.id === _)).filter((_) => _ !== void 0 && o.hidden.has(_.id)),
1900
1906
  // The pinned that a row too narrow for them sent behind ..., in the row's order.
1901
- ...V.filter((_) => o.hidden.has(_.id) && !y.some(($) => $.includes(_.id)))
1902
- ], le = new Set(V.filter((_) => !y.some(($) => $.includes(_.id))).map((_) => _.id)), ae = [...U.map((_) => _.id), ...j.length > 0 ? ["more"] : []], re = k !== null && ae.includes(k) ? k : ae[0] ?? null, ie = (_) => {
1903
- var I, X;
1904
- const $ = ae.indexOf(re ?? "");
1905
- let B = null;
1906
- if (_.key === "ArrowRight" ? B = Math.min(ae.length - 1, $ + 1) : _.key === "ArrowLeft" ? B = Math.max(0, $ - 1) : _.key === "Home" ? B = 0 : _.key === "End" ? B = ae.length - 1 : _.key === "Escape" && w(re), B === null) return;
1907
+ ...V.filter((_) => o.hidden.has(_.id) && !y.some((I) => I.includes(_.id)))
1908
+ ], le = new Set(V.filter((_) => !y.some((I) => I.includes(_.id))).map((_) => _.id)), ae = [...U.map((_) => _.id), ...j.length > 0 ? ["more"] : []], re = k !== null && ae.includes(k) ? k : ae[0] ?? null, ie = (_) => {
1909
+ var F, X;
1910
+ const I = ae.indexOf(re ?? "");
1911
+ let P = null;
1912
+ if (_.key === "ArrowRight" ? P = Math.min(ae.length - 1, I + 1) : _.key === "ArrowLeft" ? P = Math.max(0, I - 1) : _.key === "Home" ? P = 0 : _.key === "End" ? P = ae.length - 1 : _.key === "Escape" && w(re), P === null) return;
1907
1913
  _.preventDefault();
1908
- const ne = ae[B] ?? null;
1909
- x(ne), (X = (I = a.current) == null ? void 0 : I.querySelector(`[data-stop="${CSS.escape(ne ?? "")}"]`)) == null || X.focus();
1914
+ const ne = ae[P] ?? null;
1915
+ x(ne), (X = (F = r.current) == null ? void 0 : F.querySelector(`[data-stop="${CSS.escape(ne ?? "")}"]`)) == null || X.focus();
1910
1916
  }, oe = j.map((_) => ({
1911
1917
  id: _.id,
1912
1918
  label: /* @__PURE__ */ i(A, { children: [
@@ -1916,14 +1922,14 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
1916
1922
  offer: _.disabled ? { offered: !0, locked: !1, refusal: _.reason ?? "" } : { offered: !0, locked: !1 },
1917
1923
  ..._.danger ? { danger: !0 } : {},
1918
1924
  onSelect: () => {
1919
- var B;
1925
+ var P;
1920
1926
  if (_.disabled || _.busy) return;
1921
1927
  if (_.entries === void 0) {
1922
1928
  t(_.id);
1923
1929
  return;
1924
1930
  }
1925
- const $ = (B = v.current) == null ? void 0 : B.getBoundingClientRect();
1926
- g("first"), f({ which: _.id, x: ($ == null ? void 0 : $.left) ?? 0, y: ($ == null ? void 0 : $.bottom) ?? 0 });
1931
+ const I = (P = v.current) == null ? void 0 : P.getBoundingClientRect();
1932
+ g("first"), f({ which: _.id, x: (I == null ? void 0 : I.left) ?? 0, y: (I == null ? void 0 : I.bottom) ?? 0 });
1927
1933
  }
1928
1934
  })), J = h === null || h.which === "more" ? void 0 : D.find((_) => _.id === h.which), fe = ((J == null ? void 0 : J.entries) ?? []).map((_) => ({
1929
1935
  id: _.id,
@@ -1936,17 +1942,17 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
1936
1942
  onSelect: () => {
1937
1943
  _.disabled || t(_.id);
1938
1944
  }
1939
- })), ee = (_, $, B) => {
1940
- const ne = $.getBoundingClientRect();
1941
- g(B), f({ which: _, x: ne.left, y: ne.bottom });
1945
+ })), ee = (_, I, P) => {
1946
+ const ne = I.getBoundingClientRect();
1947
+ g(P), f({ which: _, x: ne.left, y: ne.bottom });
1942
1948
  };
1943
1949
  return /* @__PURE__ */ i(
1944
1950
  "div",
1945
1951
  {
1946
- ref: a,
1952
+ ref: r,
1947
1953
  role: "toolbar",
1948
1954
  "aria-label": n,
1949
- className: F(
1955
+ className: $(
1950
1956
  "cms-pane-toolbar",
1951
1957
  V.length > 0 && o.bare.size >= V.length && "cms-pane-toolbar--labels-hidden",
1952
1958
  o.bare.size > 0 && o.bare.size < V.length && "cms-pane-toolbar--labels-partly-hidden"
@@ -1954,30 +1960,30 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
1954
1960
  onKeyDown: ie,
1955
1961
  children: [
1956
1962
  s !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: s }) : null,
1957
- b.map((_, $) => {
1958
- const B = _.filter((I) => !z.has(I.id)), ne = b.slice(0, $).some((I) => I.some((X) => !z.has(X.id)));
1963
+ b.map((_, I) => {
1964
+ const P = _.filter((F) => !z.has(F.id)), ne = b.slice(0, I).some((F) => F.some((X) => !z.has(X.id)));
1959
1965
  return /* @__PURE__ */ i("div", { className: "cms-pane-toolbar__group-wrap", children: [
1960
- B.length > 0 && ne ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1961
- /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: B.length === 0, children: _.map((I) => /* @__PURE__ */ e(
1966
+ P.length > 0 && ne ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1967
+ /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: P.length === 0, children: _.map((F) => /* @__PURE__ */ e(
1962
1968
  qn,
1963
1969
  {
1964
- action: I,
1965
- labels: !o.bare.has(I.id),
1966
- overflowed: z.has(I.id),
1967
- pinned: le.has(I.id),
1968
- tabbable: re === I.id,
1969
- tipOff: C === I.id,
1970
- menuOpen: (h == null ? void 0 : h.which) === I.id,
1970
+ action: F,
1971
+ labels: !o.bare.has(F.id),
1972
+ overflowed: z.has(F.id),
1973
+ pinned: le.has(F.id),
1974
+ tabbable: re === F.id,
1975
+ tipOff: C === F.id,
1976
+ menuOpen: (h == null ? void 0 : h.which) === F.id,
1971
1977
  onChoose: (X, N) => {
1972
- I.entries === void 0 ? t(I.id) : (h == null ? void 0 : h.which) === I.id && N === null ? f(null) : ee(I.id, X, N ?? "first");
1978
+ F.entries === void 0 ? t(F.id) : (h == null ? void 0 : h.which) === F.id && N === null ? f(null) : ee(F.id, X, N ?? "first");
1973
1979
  },
1974
1980
  onFocus: () => {
1975
- x(I.id), w(null);
1981
+ x(F.id), w(null);
1976
1982
  }
1977
1983
  },
1978
- I.id
1984
+ F.id
1979
1985
  )) })
1980
- ] }, $);
1986
+ ] }, I);
1981
1987
  }),
1982
1988
  j.length > 0 ? /* @__PURE__ */ e(
1983
1989
  "button",
@@ -2001,7 +2007,7 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
2001
2007
  children: /* @__PURE__ */ e(L, { name: "more" })
2002
2008
  }
2003
2009
  ) : null,
2004
- r !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: r, children: r }) : null,
2010
+ a !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: a, children: a }) : null,
2005
2011
  /* @__PURE__ */ e(ge, { at: (h == null ? void 0 : h.which) === "more" ? h : null, items: oe, onClose: () => f(null), label: c, focus: d }),
2006
2012
  /* @__PURE__ */ e(ge, { at: J !== void 0 ? h : null, items: fe, onClose: () => f(null), label: (J == null ? void 0 : J.label) ?? "", focus: d }),
2007
2013
  /* @__PURE__ */ i("div", { ref: u, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
@@ -2009,12 +2015,12 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
2009
2015
  /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
2010
2016
  /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(L, { name: "more" }) }),
2011
2017
  D.map((_) => /* @__PURE__ */ i("span", { children: [
2012
- /* @__PURE__ */ i("span", { "data-measure": "full", "data-measure-action": _.id, className: F("cms-pane-toolbar__action", _.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2018
+ /* @__PURE__ */ i("span", { "data-measure": "full", "data-measure-action": _.id, className: $("cms-pane-toolbar__action", _.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2013
2019
  /* @__PURE__ */ e(xe, { name: _.icon }),
2014
2020
  /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label }),
2015
2021
  _.entries !== void 0 ? /* @__PURE__ */ e($e, {}) : null
2016
2022
  ] }),
2017
- /* @__PURE__ */ i("span", { "data-measure": "icon", "data-measure-action": _.id, className: F("cms-pane-toolbar__action", we(_.icon) !== null && "cms-pane-toolbar__action--bare", _.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2023
+ /* @__PURE__ */ i("span", { "data-measure": "icon", "data-measure-action": _.id, className: $("cms-pane-toolbar__action", we(_.icon) !== null && "cms-pane-toolbar__action--bare", _.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2018
2024
  we(_.icon) !== null ? /* @__PURE__ */ e(xe, { name: _.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: _.label }),
2019
2025
  _.entries !== void 0 ? /* @__PURE__ */ e($e, {}) : null
2020
2026
  ] })
@@ -2024,7 +2030,7 @@ function Il({ label: n, actions: l, onAction: t, status: r, moreLabel: c, leadin
2024
2030
  }
2025
2031
  );
2026
2032
  }
2027
- function qn({ action: n, labels: l, overflowed: t, pinned: r, tabbable: c, tipOff: s, menuOpen: m, onChoose: a, onFocus: u }) {
2033
+ function qn({ action: n, labels: l, overflowed: t, pinned: a, tabbable: c, tipOff: s, menuOpen: m, onChoose: r, onFocus: u }) {
2028
2034
  const [v, o] = T(!1);
2029
2035
  Q(() => {
2030
2036
  if (!n.busy) {
@@ -2039,11 +2045,11 @@ function qn({ action: n, labels: l, overflowed: t, pinned: r, tabbable: c, tipOf
2039
2045
  "button",
2040
2046
  {
2041
2047
  type: "button",
2042
- className: F("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", p && "cms-pane-toolbar__action--text", C && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2048
+ className: $("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", p && "cms-pane-toolbar__action--text", C && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2043
2049
  "data-action": n.id,
2044
2050
  "data-stop": n.id,
2045
2051
  ...t ? { "data-overflowed": "" } : {},
2046
- ...r ? { "data-pinned": "" } : {},
2052
+ ...a ? { "data-pinned": "" } : {},
2047
2053
  hidden: t,
2048
2054
  "aria-label": n.label,
2049
2055
  "aria-disabled": n.disabled || void 0,
@@ -2055,10 +2061,10 @@ function qn({ action: n, labels: l, overflowed: t, pinned: r, tabbable: c, tipOf
2055
2061
  onFocus: u,
2056
2062
  onBlur: () => x(!1),
2057
2063
  onKeyDown: (w) => {
2058
- w.key === "Escape" && x(!1), C && (w.key === "ArrowDown" || w.key === "ArrowUp") && (w.preventDefault(), f !== null ? x(!0) : !n.disabled && !n.busy && a(w.currentTarget, w.key === "ArrowUp" ? "last" : "first"));
2064
+ w.key === "Escape" && x(!1), C && (w.key === "ArrowDown" || w.key === "ArrowUp") && (w.preventDefault(), f !== null ? x(!0) : !n.disabled && !n.busy && r(w.currentTarget, w.key === "ArrowUp" ? "last" : "first"));
2059
2065
  },
2060
2066
  onClick: (w) => {
2061
- f !== null ? x(!0) : !n.disabled && !n.busy && a(w.currentTarget, null);
2067
+ f !== null ? x(!0) : !n.disabled && !n.busy && r(w.currentTarget, null);
2062
2068
  },
2063
2069
  children: [
2064
2070
  v ? /* @__PURE__ */ e(G, { name: "spinner" }) : /* @__PURE__ */ e(xe, { name: n.icon }),
@@ -2076,14 +2082,14 @@ function xe({ name: n }) {
2076
2082
  const l = we(n);
2077
2083
  return l === null ? null : /* @__PURE__ */ e(L, { name: l, size: 18 });
2078
2084
  }
2079
- function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel: c, expandLabel: s, collapseLabel: m, action: a = null, onRead: u, leading: v }) {
2085
+ function Bl({ title: n, body: l = null, time: t = null, unread: a, unreadLabel: c, expandLabel: s, collapseLabel: m, action: r = null, onRead: u, leading: v }) {
2080
2086
  const [o, p] = T(!1), h = se(), f = () => {
2081
- r && u();
2082
- }, d = (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, k = () => {
2087
+ a && u();
2088
+ }, d = (r == null ? void 0 : r.presentation) === "row" && r.onAction !== void 0, g = (r == null ? void 0 : r.presentation) === "button" && r.onAction !== void 0 ? r : null, k = () => {
2083
2089
  var x;
2084
- f(), d && ((x = a.onAction) == null || x.call(a));
2090
+ f(), d && ((x = r.onAction) == null || x.call(r));
2085
2091
  };
2086
- return /* @__PURE__ */ i("article", { className: F("cms-notification", r && "is-unread", o && "is-expanded", d && "is-row-action"), "data-state": r ? "unread" : "read", children: [
2092
+ return /* @__PURE__ */ i("article", { className: $("cms-notification", a && "is-unread", o && "is-expanded", d && "is-row-action"), "data-state": a ? "unread" : "read", children: [
2087
2093
  /* @__PURE__ */ i(
2088
2094
  "div",
2089
2095
  {
@@ -2100,7 +2106,7 @@ function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel:
2100
2106
  /* @__PURE__ */ i("span", { className: "cms-notification__text", children: [
2101
2107
  /* @__PURE__ */ i("span", { className: "cms-notification__head", children: [
2102
2108
  /* @__PURE__ */ i("span", { className: "cms-notification__title", children: [
2103
- r ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
2109
+ a ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
2104
2110
  c,
2105
2111
  " "
2106
2112
  ] }) : null,
@@ -2110,7 +2116,7 @@ function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel:
2110
2116
  ] }),
2111
2117
  l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: h, children: l }) : null
2112
2118
  ] }),
2113
- r ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2119
+ a ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2114
2120
  ]
2115
2121
  }
2116
2122
  ),
@@ -2146,7 +2152,7 @@ function Pl({ title: n, body: l = null, time: t = null, unread: r, unreadLabel:
2146
2152
  function jn(n) {
2147
2153
  return n === "allowed" || n === "elevate" || n === "denied";
2148
2154
  }
2149
- function Fl(n, l) {
2155
+ function Pl(n, l) {
2150
2156
  if (!jn(n))
2151
2157
  return l.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
2152
2158
  switch (n) {
@@ -2161,8 +2167,8 @@ function Fl(n, l) {
2161
2167
  function Gn(n, l) {
2162
2168
  if (!n) return;
2163
2169
  if (typeof n.get == "function") return n.get(l) ?? void 0;
2164
- const t = n, r = Object.keys(t).find((c) => c.toLowerCase() === l.toLowerCase());
2165
- return r === void 0 ? void 0 : t[r];
2170
+ const t = n, a = Object.keys(t).find((c) => c.toLowerCase() === l.toLowerCase());
2171
+ return a === void 0 ? void 0 : t[a];
2166
2172
  }
2167
2173
  function Yn(n) {
2168
2174
  if (n && typeof n == "object") {
@@ -2171,21 +2177,21 @@ function Yn(n) {
2171
2177
  if (typeof l.title == "string" && l.title !== "") return l.title;
2172
2178
  }
2173
2179
  }
2174
- function Bl(n, l, t, r) {
2180
+ function Rl(n, l, t, a) {
2175
2181
  if (n !== 403) return { kind: "none" };
2176
2182
  const c = Yn(t);
2177
- return Gn(l, "X-Elevation-Required") !== void 0 ? r.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." };
2183
+ return Gn(l, "X-Elevation-Required") !== void 0 ? a.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." };
2178
2184
  }
2179
2185
  const Ie = "coolms-kit:reread";
2180
- function Rl() {
2186
+ function Hl() {
2181
2187
  window.dispatchEvent(new Event(Ie));
2182
2188
  }
2183
- function Hl(n) {
2184
- const [l, t] = T(void 0), [r, c] = T(void 0), [s, m] = T(!0), a = H(n);
2185
- a.current = n;
2189
+ function Ol(n) {
2190
+ const [l, t] = T(void 0), [a, c] = T(void 0), [s, m] = T(!0), r = H(n);
2191
+ r.current = n;
2186
2192
  const u = H(0), v = be(() => {
2187
2193
  const o = ++u.current;
2188
- m(!0), a.current().then(
2194
+ m(!0), r.current().then(
2189
2195
  (p) => {
2190
2196
  o === u.current && (t(p), c(void 0), m(!1));
2191
2197
  },
@@ -2200,36 +2206,36 @@ function Hl(n) {
2200
2206
  return window.addEventListener("focus", o), window.addEventListener(Ie, o), () => {
2201
2207
  window.removeEventListener("focus", o), window.removeEventListener(Ie, o);
2202
2208
  };
2203
- }, [v]), { value: l, error: r, loading: s, reread: v };
2209
+ }, [v]), { value: l, error: a, loading: s, reread: v };
2204
2210
  }
2205
- function Ol(n) {
2211
+ function Ul(n) {
2206
2212
  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 };
2207
2213
  }
2208
2214
  const Xn = "/errors/client-update-required";
2209
2215
  function Jn(n, l) {
2210
- const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), r = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
2211
- for (let c = 0; c < Math.max(t.length, r.length); c++) {
2212
- const s = t[c] ?? 0, m = r[c] ?? 0;
2216
+ const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), a = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
2217
+ for (let c = 0; c < Math.max(t.length, a.length); c++) {
2218
+ const s = t[c] ?? 0, m = a[c] ?? 0;
2213
2219
  if (s !== m) return s < m;
2214
2220
  }
2215
2221
  return !1;
2216
2222
  }
2217
- function Ul(n) {
2223
+ function zl(n) {
2218
2224
  return n.problemType !== void 0 && n.problemType.endsWith(Xn) ? !0 : n.minimumVersion !== void 0 && Jn(n.version, n.minimumVersion);
2219
2225
  }
2220
2226
  const qe = 4, Qn = 48, el = 800, nl = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2221
2227
  function ll(n, l) {
2222
- const [t, r] = T(!1);
2228
+ const [t, a] = T(!1);
2223
2229
  return Q(() => {
2224
2230
  const c = n.current;
2225
2231
  if (c === null || !l) {
2226
- r(!1);
2232
+ a(!1);
2227
2233
  return;
2228
2234
  }
2229
2235
  const s = /* @__PURE__ */ new WeakMap();
2230
- let m = Number.NEGATIVE_INFINITY, a = null;
2236
+ let m = Number.NEGATIVE_INFINITY, r = null;
2231
2237
  const u = (h) => {
2232
- m = performance.now(), a = h.target;
2238
+ m = performance.now(), r = h.target;
2233
2239
  }, v = (h) => {
2234
2240
  const f = h.target;
2235
2241
  !(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && nl.has(h.key) && u(h);
@@ -2238,47 +2244,47 @@ function ll(n, l) {
2238
2244
  if (!(f instanceof HTMLElement)) return;
2239
2245
  const d = f.scrollTop, g = s.get(f) ?? 0;
2240
2246
  if (s.set(f, d), d <= 0) {
2241
- r(!1);
2247
+ a(!1);
2242
2248
  return;
2243
2249
  }
2244
- performance.now() - m > el || !(a === c || a === document.body || a instanceof Node && f.contains(a)) || (d < g - qe ? r(!1) : d > g + qe && d > Qn && r(!0));
2250
+ performance.now() - m > el || !(r === c || r === document.body || r instanceof Node && f.contains(r)) || (d < g - qe ? a(!1) : d > g + qe && d > Qn && a(!0));
2245
2251
  }, p = [["wheel", u], ["touchmove", u], ["pointerdown", u], ["keydown", v]];
2246
2252
  for (const [h, f] of p) c.addEventListener(h, f, { capture: !0, passive: !0 });
2247
2253
  return c.addEventListener("scroll", o, { capture: !0, passive: !0 }), () => {
2248
2254
  for (const [h, f] of p) c.removeEventListener(h, f, { capture: !0 });
2249
2255
  c.removeEventListener("scroll", o, { capture: !0 });
2250
2256
  };
2251
- }, [n, l]), [t, r];
2257
+ }, [n, l]), [t, a];
2252
2258
  }
2253
2259
  const tl = 64;
2254
- function sl({ bar: n, leading: l, gap: t, icon: r, iconGap: c, search: s, more: m, globals: a, name: u, choice: v }) {
2255
- const o = [...s ? [r] : [], r, r, ...a], p = o.reduce((f, d) => f + d, 0) + c * (o.length - 1);
2260
+ function sl({ bar: n, leading: l, gap: t, icon: a, iconGap: c, search: s, more: m, globals: r, name: u, choice: v }) {
2261
+ const o = [...s ? [a] : [], a, a, ...r], p = o.reduce((f, d) => f + d, 0) + c * (o.length - 1);
2256
2262
  return n - (l > 0 ? l + t : 0) - t - p + 0.01 < Math.min(tl, u) + v;
2257
2263
  }
2258
- function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s = [], moreLabel: m = "More actions", globals: a, filter: u, primary: v, onRefresh: o, pullText: p, barHidden: h, children: f }) {
2259
- const d = v !== void 0 && "menu" in v && !v.menu.some((P) => P.offer.offered) ? void 0 : v, g = H(null), k = H(null), [x, C] = T(!1), [w, b] = T(null), [y, D] = T(null), Z = be(() => D(null), []), V = H(!1), M = H(null), R = H(null), z = H(null), q = s.some((P) => P.offer.offered), U = y !== null && q && c === void 0;
2264
+ function Kl({ title: n, back: l, navigation: t, search: a, searching: c, more: s = [], moreLabel: m = "More actions", globals: r, filter: u, primary: v, onRefresh: o, pullText: p, barHidden: h, children: f }) {
2265
+ const d = v !== void 0 && "menu" in v && !v.menu.some((B) => B.offer.offered) ? void 0 : v, g = H(null), k = H(null), [x, C] = T(!1), [w, b] = T(null), [y, D] = T(null), Z = be(() => D(null), []), V = H(!1), M = H(null), R = H(null), z = H(null), q = s.some((B) => B.offer.offered), U = y !== null && q && c === void 0;
2260
2266
  en(u);
2261
2267
  const j = u === void 0 ? null : Xe(u), [le, ae] = T(!1), re = H(!1), ie = H(!1), oe = H(null), J = u === void 0 ? void 0 : {
2262
2268
  ...u,
2263
- onChange: (P) => {
2264
- re.current = !0, u.onChange(P);
2269
+ onChange: (B) => {
2270
+ re.current = !0, u.onChange(B);
2265
2271
  }
2266
- }, fe = j === null ? "" : ` · ${j.label}`, ee = u !== void 0 && u.options.length >= 2, [_, $] = T(!1), B = ee && q && _, ne = JSON.stringify([ee, q, B, r !== void 0, c !== void 0, l !== void 0, n, fe]), I = be(() => {
2267
- const P = M.current, E = R.current, K = z.current;
2268
- if (P === null || E === null || K === null || !ee) return null;
2269
- const W = (ke) => parseFloat(ke) || 0, te = getComputedStyle(P), pe = P.getBoundingClientRect().width;
2272
+ }, fe = j === null ? "" : ` · ${j.label}`, ee = u !== void 0 && u.options.length >= 2, [_, I] = T(!1), P = ee && q && _, ne = JSON.stringify([ee, q, P, a !== void 0, c !== void 0, l !== void 0, n, fe]), F = be(() => {
2273
+ const B = M.current, E = R.current, K = z.current;
2274
+ if (B === null || E === null || K === null || !ee) return null;
2275
+ const W = (ke) => parseFloat(ke) || 0, te = getComputedStyle(B), pe = B.getBoundingClientRect().width;
2270
2276
  if (pe === 0) return null;
2271
2277
  const Ce = (ke) => {
2272
2278
  var ze;
2273
- return ((ze = P.querySelector(`.cms-screen__ruler > [data-ruler="${ke}"]`)) == null ? void 0 : ze.getBoundingClientRect().width) ?? 0;
2274
- }, ce = P.querySelector(".cms-screen__leading"), Ne = (r !== void 0 ? 1 : 0) + (B ? 0 : 1) + 1;
2279
+ return ((ze = B.querySelector(`.cms-screen__ruler > [data-ruler="${ke}"]`)) == null ? void 0 : ze.getBoundingClientRect().width) ?? 0;
2280
+ }, ce = B.querySelector(".cms-screen__leading"), Ne = (a !== void 0 ? 1 : 0) + (P ? 0 : 1) + 1;
2275
2281
  return sl({
2276
2282
  bar: pe - W(te.paddingLeft) - W(te.paddingRight),
2277
2283
  leading: ce === null || ce.childNodes.length === 0 ? 0 : W(getComputedStyle(ce).minWidth),
2278
2284
  gap: W(te.columnGap),
2279
2285
  icon: K.getBoundingClientRect().width,
2280
2286
  iconGap: W(getComputedStyle(E).columnGap),
2281
- search: r !== void 0,
2287
+ search: a !== void 0,
2282
2288
  more: !0,
2283
2289
  globals: Array.from(E.children).slice(Ne).map((ke) => ke.getBoundingClientRect().width),
2284
2290
  name: Ce("name"),
@@ -2286,36 +2292,36 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
2286
2292
  });
2287
2293
  }, [ne]);
2288
2294
  ve(() => {
2289
- const P = I() ?? _;
2290
- P !== _ && re.current && (ie.current = !0), re.current = !1, $(P);
2291
- }, [I]), Q(() => {
2295
+ const B = F() ?? _;
2296
+ B !== _ && re.current && (ie.current = !0), re.current = !1, I(B);
2297
+ }, [F]), Q(() => {
2292
2298
  if (M.current === null || typeof ResizeObserver > "u") return;
2293
- const P = new ResizeObserver(() => {
2294
- const E = I();
2295
- E !== null && $(E);
2299
+ const B = new ResizeObserver(() => {
2300
+ const E = F();
2301
+ E !== null && I(E);
2296
2302
  });
2297
- for (const E of [M.current, R.current, ...M.current.querySelectorAll(".cms-screen__ruler > span")]) E !== null && P.observe(E);
2298
- return () => P.disconnect();
2299
- }, [I]);
2300
- const X = H(B);
2303
+ for (const E of [M.current, R.current, ...M.current.querySelectorAll(".cms-screen__ruler > span")]) E !== null && B.observe(E);
2304
+ return () => B.disconnect();
2305
+ }, [F]);
2306
+ const X = H(P);
2301
2307
  ve(() => {
2302
2308
  var K, W, te;
2303
- if (X.current === B) return;
2304
- X.current = B, D(null);
2305
- const P = document.activeElement;
2306
- (P === document.body && oe.current !== null && !oe.current.isConnected || ie.current && (P === document.body || ((K = M.current) == null ? void 0 : K.contains(P)) === !0)) && ((te = B ? z.current : (W = R.current) == null ? void 0 : W.querySelector(".cms-filter-menu")) == null || te.focus()), ie.current = !1;
2307
- }, [B]);
2308
- const N = B && j !== null && u !== void 0 ? `${m}, ${Je(u)}` : m, O = Tn(k, o === void 0 ? null : () => {
2309
+ if (X.current === P) return;
2310
+ X.current = P, D(null);
2311
+ const B = document.activeElement;
2312
+ (B === document.body && oe.current !== null && !oe.current.isConnected || ie.current && (B === document.body || ((K = M.current) == null ? void 0 : K.contains(B)) === !0)) && ((te = P ? z.current : (W = R.current) == null ? void 0 : W.querySelector(".cms-filter-menu")) == null || te.focus()), ie.current = !1;
2313
+ }, [P]);
2314
+ const N = P && j !== null && u !== void 0 ? `${m}, ${Je(u)}` : m, O = Tn(k, o === void 0 ? null : () => {
2309
2315
  x || (C(!0), o().finally(() => C(!1)));
2310
2316
  }), Y = o === void 0 ? null : { distance: O, refreshing: x, text: p ?? null }, de = c !== void 0 || O > 0 || x || U || le, [Me, Ee] = ll(g, h === void 0 && !de), ue = !de && (h ?? Me);
2311
2317
  return /* @__PURE__ */ i(
2312
2318
  "div",
2313
2319
  {
2314
2320
  ref: g,
2315
- className: F("cms-screen", d !== void 0 && "cms-screen--with-primary"),
2321
+ className: $("cms-screen", d !== void 0 && "cms-screen--with-primary"),
2316
2322
  "data-bar-hidden": ue ? "" : void 0,
2317
- onFocus: (P) => {
2318
- oe.current = P.target, ue && P.target instanceof Element && P.target.closest(".cms-screen__bar") !== null && Ee(!1);
2323
+ onFocus: (B) => {
2324
+ oe.current = B.target, ue && B.target instanceof Element && B.target.closest(".cms-screen__bar") !== null && Ee(!1);
2319
2325
  },
2320
2326
  children: [
2321
2327
  c !== void 0 ? /* @__PURE__ */ i("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
@@ -2341,14 +2347,14 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
2341
2347
  j !== null ? /* @__PURE__ */ e("span", { "data-ruler": "choice", children: fe }) : null
2342
2348
  ] }) : null,
2343
2349
  /* @__PURE__ */ i("div", { ref: R, className: "cms-screen__trailing", children: [
2344
- r !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": r.label, title: r.label, onClick: r.onOpen, children: /* @__PURE__ */ e(L, { name: "search" }) }) : null,
2345
- J !== void 0 && !B ? /* @__PURE__ */ e(nn, { ...J, iconOnly: !0, onOpenChange: ae }) : null,
2350
+ a !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": a.label, title: a.label, onClick: a.onOpen, children: /* @__PURE__ */ e(L, { name: "search" }) }) : null,
2351
+ J !== void 0 && !P ? /* @__PURE__ */ e(nn, { ...J, iconOnly: !0, onOpenChange: ae }) : null,
2346
2352
  q ? /* @__PURE__ */ e(
2347
2353
  "button",
2348
2354
  {
2349
2355
  ref: z,
2350
2356
  type: "button",
2351
- className: F("cms-icon-button cms-screen__icon", B && j !== null && "cms-screen__icon--active"),
2357
+ className: $("cms-icon-button cms-screen__icon", P && j !== null && "cms-screen__icon--active"),
2352
2358
  "data-action": "more",
2353
2359
  "aria-haspopup": "menu",
2354
2360
  "aria-expanded": U,
@@ -2357,14 +2363,14 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
2357
2363
  onMouseDown: () => {
2358
2364
  V.current = U;
2359
2365
  },
2360
- onClick: (P) => {
2361
- const E = P.currentTarget.getBoundingClientRect();
2366
+ onClick: (B) => {
2367
+ const E = B.currentTarget.getBoundingClientRect();
2362
2368
  D(V.current ? null : { x: E.left, y: E.bottom + 4 }), V.current = !1;
2363
2369
  },
2364
2370
  children: /* @__PURE__ */ e(L, { name: "more" })
2365
2371
  }
2366
2372
  ) : null,
2367
- a
2373
+ r
2368
2374
  ] })
2369
2375
  ] }),
2370
2376
  /* @__PURE__ */ e("div", { ref: k, className: "cms-screen__content", "data-pulling": O > 0 ? "" : void 0, "data-refreshing": x ? "" : void 0, children: /* @__PURE__ */ e(Ye.Provider, { value: Y, children: f }) }),
@@ -2376,9 +2382,9 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
2376
2382
  "aria-label": d.label,
2377
2383
  title: d.label,
2378
2384
  ..."menu" in d ? { "aria-haspopup": "menu", "aria-expanded": w !== null } : {},
2379
- onClick: (P) => {
2385
+ onClick: (B) => {
2380
2386
  if ("menu" in d) {
2381
- const E = P.currentTarget.getBoundingClientRect();
2387
+ const E = B.currentTarget.getBoundingClientRect();
2382
2388
  b(w === null ? { x: E.left, y: E.top } : null);
2383
2389
  } else
2384
2390
  d.onPress();
@@ -2390,7 +2396,7 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
2390
2396
  ge,
2391
2397
  {
2392
2398
  at: U ? y : null,
2393
- items: B && J !== void 0 ? [...s, ...Qe(J, J.label)] : s,
2399
+ items: P && J !== void 0 ? [...s, ...Qe(J, J.label)] : s,
2394
2400
  onClose: Z,
2395
2401
  label: m,
2396
2402
  focus: "first"
@@ -2402,17 +2408,18 @@ function zl({ title: n, back: l, navigation: t, search: r, searching: c, more: s
2402
2408
  );
2403
2409
  }
2404
2410
  export {
2405
- yl as AppShell,
2411
+ kl as AppShell,
2406
2412
  Se as Avatar,
2407
2413
  Ke as BOOTSTRAP_ICONS,
2408
2414
  Rn as Badge,
2409
2415
  he as Button,
2410
2416
  He as CALL_LABELS,
2411
2417
  Xn as CLIENT_UPDATE_REQUIRED,
2412
- Tl as CallBar,
2413
- Al as CallPanel,
2414
- Cl as ChatBubble,
2415
- Sl as Composer,
2418
+ Dl as CallBar,
2419
+ Tl as CallPanel,
2420
+ Sl as ChatBubble,
2421
+ Nl as Column,
2422
+ El as Composer,
2416
2423
  ml as ConfirmDialog,
2417
2424
  ge as ContextMenu,
2418
2425
  hn as EmptyState,
@@ -2425,31 +2432,31 @@ export {
2425
2432
  Vn as FilterMenu,
2426
2433
  pl as ICON_NAMES,
2427
2434
  L as Icon,
2428
- El as IncomingCall,
2435
+ Al as IncomingCall,
2429
2436
  vl as List,
2430
- $l as ListHead,
2437
+ Il as ListHead,
2431
2438
  mn as Loading,
2432
2439
  On as MAIL_ROW_LABELS,
2433
2440
  un as MODAL_CLOSE_MS,
2434
- Ml as MailRow,
2441
+ Cl as MailRow,
2435
2442
  je as Modal,
2436
2443
  _n as NamedIcon,
2437
- Pl as Notification,
2444
+ Bl as Notification,
2438
2445
  De as PULL_AT,
2439
- Nl as PageHeader,
2440
- Il as PaneToolbar,
2446
+ wl as PageHeader,
2447
+ Fl as PaneToolbar,
2441
2448
  Un as SIGN_IN_LABELS,
2442
2449
  Te as STATE_DELAY_MS,
2443
- zl as ScreenShell,
2444
- kl as SearchField,
2450
+ Kl as ScreenShell,
2451
+ xl as SearchField,
2445
2452
  gl as SectionHeader,
2446
2453
  dl as Select,
2447
- Ll as SignInForm,
2448
- Dl as SignInLayout,
2449
- xl as SplitPanes,
2450
- Bn as Splitter,
2454
+ $l as SignInForm,
2455
+ Ll as SignInLayout,
2456
+ Ml as SplitPanes,
2457
+ Pn as Splitter,
2451
2458
  me as State,
2452
- wl as TabStrip,
2459
+ yl as TabStrip,
2453
2460
  ol as TextArea,
2454
2461
  il as TextField,
2455
2462
  hl as Toast,
@@ -2459,16 +2466,16 @@ export {
2459
2466
  we as iconForName,
2460
2467
  Ln as initialsOf,
2461
2468
  jn as isCapability,
2462
- Ul as needsClientUpdate,
2463
- Fl as offerFor,
2464
- Ol as readConflict,
2465
- Bl as readRefusal,
2469
+ zl as needsClientUpdate,
2470
+ Pl as offerFor,
2471
+ Ul as readConflict,
2472
+ Rl as readRefusal,
2466
2473
  Yn as refusalText,
2467
- Rl as rereadAll,
2474
+ Hl as rereadAll,
2468
2475
  $n as tintOf,
2469
2476
  Tn as usePull,
2470
2477
  Dn as usePullState,
2471
- Hl as useReread,
2478
+ Ol as useReread,
2472
2479
  Jn as versionBelow,
2473
2480
  on as writtenOut
2474
2481
  };