@coolms/ui-react 0.1.0-alpha.36 → 0.1.0-alpha.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.js +433 -428
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as c, Fragment as D } from "react/jsx-runtime";
2
- import { useId as fe, useState as $, useRef as z, useEffect as ee, useCallback as Le, useMemo as yn, useContext as Nn, createContext as kn, useLayoutEffect as De, Fragment as xn } from "react";
2
+ import { useId as fe, useState as $, useRef as z, useEffect as ee, useCallback as Le, useMemo as wn, useContext as Nn, createContext as kn, useLayoutEffect as De, Fragment as xn } from "react";
3
3
  import { createPortal as je } from "react-dom";
4
4
  function Pe(n, t) {
5
5
  const l = { ...n };
@@ -9,7 +9,7 @@ function Pe(n, t) {
9
9
  }
10
10
  return l;
11
11
  }
12
- function F(...n) {
12
+ function B(...n) {
13
13
  return n.filter(Boolean).join(" ");
14
14
  }
15
15
  function ne({ name: n }) {
@@ -43,15 +43,15 @@ function Te({
43
43
  children: f,
44
44
  type: g = "button",
45
45
  title: i,
46
- ..._
46
+ ...b
47
47
  }) {
48
48
  const u = !!h || t;
49
49
  return /* @__PURE__ */ c(
50
50
  "button",
51
51
  {
52
- ..._,
52
+ ...b,
53
53
  type: g,
54
- className: F("cms-button", `cms-button--${n}`, t && "is-busy", a && "is-locked", o),
54
+ className: B("cms-button", `cms-button--${n}`, t && "is-busy", a && "is-locked", o),
55
55
  disabled: u,
56
56
  "aria-busy": t || void 0,
57
57
  title: a ? s ?? i : i,
@@ -67,7 +67,7 @@ function Te({
67
67
  );
68
68
  }
69
69
  function Ye({ id: n, label: t, help: l, error: a, pinned: s, children: r }) {
70
- return /* @__PURE__ */ c("div", { className: F("cms-field", a != null && "is-invalid"), children: [
70
+ return /* @__PURE__ */ c("div", { className: B("cms-field", a != null && "is-invalid"), children: [
71
71
  /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: t }),
72
72
  r,
73
73
  s != null ? /* @__PURE__ */ c("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
@@ -86,8 +86,8 @@ function Xe(n, t) {
86
86
  const Mn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Cn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
87
  function Sn(n, t, l) {
88
88
  const a = (r, h, o, f = 0, g = 0, i = 0) => {
89
- const _ = new Date(Date.UTC(r, h - 1, o, f, g, i));
90
- return _.setUTCFullYear(r), _.getUTCFullYear() === r && _.getUTCMonth() === h - 1 && _.getUTCDate() === o && _.getUTCHours() === f && _.getUTCMinutes() === g && _.getUTCSeconds() === i ? _ : null;
89
+ const b = new Date(Date.UTC(r, h - 1, o, f, g, i));
90
+ return b.setUTCFullYear(r), b.getUTCFullYear() === r && b.getUTCMonth() === h - 1 && b.getUTCDate() === o && b.getUTCHours() === f && b.getUTCMinutes() === g && b.getUTCSeconds() === i ? b : null;
91
91
  }, s = (r) => ({ hour: Number(r[1]), minute: Number(r[2]), second: Number(r[3] ?? 0) });
92
92
  try {
93
93
  if (n === "time") {
@@ -112,7 +112,7 @@ function Sn(n, t, l) {
112
112
  return t;
113
113
  }
114
114
  const En = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
115
- function At({ label: n, help: t, error: l, disabled: a, readOnly: s, pinned: r, value: h, onChange: o, placeholder: f, type: g = "text", name: i, locale: _, min: u, max: b, step: d, minLength: w, maxLength: x, required: M }) {
115
+ function Tt({ label: n, help: t, error: l, disabled: a, readOnly: s, pinned: r, value: h, onChange: o, placeholder: f, type: g = "text", name: i, locale: b, min: u, max: _, step: d, minLength: y, maxLength: x, required: M }) {
116
116
  const S = fe(), C = s === !0 || r != null, v = C && En.has(g), N = g === "number" && (d === "any" || typeof d == "number" && !Number.isInteger(d));
117
117
  return /* @__PURE__ */ e(Ye, { id: S, label: n, help: t, error: l, pinned: r, children: /* @__PURE__ */ e(
118
118
  "input",
@@ -121,18 +121,18 @@ function At({ label: n, help: t, error: l, disabled: a, readOnly: s, pinned: r,
121
121
  name: i,
122
122
  type: v ? "text" : g,
123
123
  className: "cms-input",
124
- value: v ? Sn(g, h, _) : h,
124
+ value: v ? Sn(g, h, b) : h,
125
125
  ...v ? { "data-value": h } : {},
126
- lang: _,
126
+ lang: b,
127
127
  placeholder: f,
128
128
  disabled: a,
129
129
  readOnly: C,
130
130
  required: M,
131
131
  "aria-required": M || void 0,
132
132
  min: v ? void 0 : u,
133
- max: v ? void 0 : b,
133
+ max: v ? void 0 : _,
134
134
  step: v ? void 0 : d,
135
- minLength: w,
135
+ minLength: y,
136
136
  maxLength: x,
137
137
  inputMode: g === "number" ? N ? "decimal" : "numeric" : void 0,
138
138
  "aria-invalid": l != null || void 0,
@@ -141,43 +141,43 @@ function At({ label: n, help: t, error: l, disabled: a, readOnly: s, pinned: r,
141
141
  }
142
142
  ) });
143
143
  }
144
- function Tt({ label: n, help: t, error: l, disabled: a, readOnly: s, pinned: r, value: h, onChange: o, placeholder: f, rows: g = 4, name: i, locale: _, minLength: u, maxLength: b, required: d }) {
145
- const w = fe();
146
- return /* @__PURE__ */ e(Ye, { id: w, label: n, help: t, error: l, pinned: r, children: /* @__PURE__ */ e(
144
+ function Lt({ label: n, help: t, error: l, disabled: a, readOnly: s, pinned: r, value: h, onChange: o, placeholder: f, rows: g = 4, name: i, locale: b, minLength: u, maxLength: _, required: d }) {
145
+ const y = fe();
146
+ return /* @__PURE__ */ e(Ye, { id: y, label: n, help: t, error: l, pinned: r, children: /* @__PURE__ */ e(
147
147
  "textarea",
148
148
  {
149
- id: w,
149
+ id: y,
150
150
  name: i,
151
151
  className: "cms-input cms-textarea",
152
152
  rows: g,
153
153
  value: h,
154
- lang: _,
154
+ lang: b,
155
155
  placeholder: f,
156
156
  disabled: a,
157
157
  readOnly: s === !0 || r != null,
158
158
  required: d,
159
159
  "aria-required": d || void 0,
160
160
  minLength: u,
161
- maxLength: b,
161
+ maxLength: _,
162
162
  "aria-invalid": l != null || void 0,
163
- "aria-describedby": Xe(w, { help: t, error: l, pinned: r }),
163
+ "aria-describedby": Xe(y, { help: t, error: l, pinned: r }),
164
164
  onChange: (x) => o == null ? void 0 : o(x.target.value)
165
165
  }
166
166
  ) });
167
167
  }
168
- function Lt({ label: n, help: t, error: l, disabled: a, readOnly: s, value: r, options: h, onChange: o, emptyText: f = "Nothing to choose from yet.", name: g }) {
169
- const i = fe(), _ = h.length === 0;
170
- return /* @__PURE__ */ e(Ye, { id: i, label: n, help: _ ? f : t, error: l, children: /* @__PURE__ */ e(
168
+ function Dt({ label: n, help: t, error: l, disabled: a, readOnly: s, value: r, options: h, onChange: o, emptyText: f = "Nothing to choose from yet.", name: g }) {
169
+ const i = fe(), b = h.length === 0;
170
+ return /* @__PURE__ */ e(Ye, { id: i, label: n, help: b ? f : t, error: l, children: /* @__PURE__ */ e(
171
171
  "select",
172
172
  {
173
173
  id: i,
174
174
  name: g,
175
175
  className: "cms-input cms-select",
176
176
  value: r,
177
- disabled: a || _,
177
+ disabled: a || b,
178
178
  "aria-readonly": s || void 0,
179
179
  "aria-invalid": l != null || void 0,
180
- "aria-describedby": Xe(i, { help: _ ? f : t, error: l }),
180
+ "aria-describedby": Xe(i, { help: b ? f : t, error: l }),
181
181
  onChange: (u) => {
182
182
  s || o == null || o(u.target.value);
183
183
  },
@@ -185,7 +185,7 @@ function Lt({ label: n, help: t, error: l, disabled: a, readOnly: s, value: r, o
185
185
  }
186
186
  ) });
187
187
  }
188
- function Dt({ label: n, checked: t, onChange: l, disabled: a, readOnly: s, help: r }) {
188
+ function $t({ label: n, checked: t, onChange: l, disabled: a, readOnly: s, help: r }) {
189
189
  const h = fe();
190
190
  return /* @__PURE__ */ c("div", { className: "cms-toggle-row", children: [
191
191
  /* @__PURE__ */ e(
@@ -194,7 +194,7 @@ function Dt({ label: n, checked: t, onChange: l, disabled: a, readOnly: s, help:
194
194
  id: h,
195
195
  type: "button",
196
196
  role: "switch",
197
- className: F("cms-toggle", t && "is-on"),
197
+ className: B("cms-toggle", t && "is-on"),
198
198
  "aria-checked": t,
199
199
  "aria-readonly": s || void 0,
200
200
  "aria-describedby": r != null ? `${h}-help` : void 0,
@@ -211,17 +211,17 @@ function Dt({ label: n, checked: t, onChange: l, disabled: a, readOnly: s, help:
211
211
  }
212
212
  const An = 150;
213
213
  function hn({ open: n, title: t, onClose: l, dirty: a = !1, onDirtyClose: s, children: r, footer: h, closeLabel: o = "Close", initialFocus: f, className: g }) {
214
- const [i, _] = $(n), [u, b] = $(!1), d = z(null), w = z(null), x = fe();
214
+ const [i, b] = $(n), [u, _] = $(!1), d = z(null), y = z(null), x = fe();
215
215
  if (ee(() => {
216
216
  if (n) {
217
- w.current = document.activeElement, _(!0), b(!1);
217
+ y.current = document.activeElement, b(!0), _(!1);
218
218
  return;
219
219
  }
220
220
  if (!i) return;
221
- b(!0);
221
+ _(!0);
222
222
  const S = window.setTimeout(() => {
223
223
  var C, v;
224
- _(!1), b(!1), (v = (C = w.current) == null ? void 0 : C.focus) == null || v.call(C);
224
+ b(!1), _(!1), (v = (C = y.current) == null ? void 0 : C.focus) == null || v.call(C);
225
225
  }, An);
226
226
  return () => window.clearTimeout(S);
227
227
  }, [n, i]), ee(() => {
@@ -235,13 +235,13 @@ function hn({ open: n, title: t, onClose: l, dirty: a = !1, onDirtyClose: s, chi
235
235
  a ? s == null || s() : l();
236
236
  };
237
237
  return je(
238
- /* @__PURE__ */ e("div", { className: F("cms-modal-scrim", u && "is-closing"), onMouseDown: (S) => {
238
+ /* @__PURE__ */ e("div", { className: B("cms-modal-scrim", u && "is-closing"), onMouseDown: (S) => {
239
239
  S.target === S.currentTarget && M();
240
240
  }, children: /* @__PURE__ */ c(
241
241
  "div",
242
242
  {
243
243
  ref: d,
244
- className: F("cms-modal", g, u && "is-closing", a && "is-dirty"),
244
+ className: B("cms-modal", g, u && "is-closing", a && "is-dirty"),
245
245
  role: "dialog",
246
246
  "aria-modal": "true",
247
247
  "aria-labelledby": x,
@@ -270,7 +270,7 @@ function hn({ open: n, title: t, onClose: l, dirty: a = !1, onDirtyClose: s, chi
270
270
  document.body
271
271
  );
272
272
  }
273
- function $t({ open: n, title: t, message: l, kind: a = "default", confirmLabel: s, cancelLabel: r, closeLabel: h, onConfirm: o, onCancel: f }) {
273
+ function It({ open: n, title: t, message: l, kind: a = "default", confirmLabel: s, cancelLabel: r, closeLabel: h, onConfirm: o, onCancel: f }) {
274
274
  const g = a === "discard-changes";
275
275
  return /* @__PURE__ */ e(
276
276
  hn,
@@ -291,8 +291,8 @@ function $t({ open: n, title: t, message: l, kind: a = "default", confirmLabel:
291
291
  }
292
292
  );
293
293
  }
294
- function It({ kind: n, message: t, action: l, onDismiss: a, dismissLabel: s = "Dismiss" }) {
295
- return /* @__PURE__ */ c("div", { className: F("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
294
+ function Bt({ kind: n, message: t, action: l, onDismiss: a, dismissLabel: s = "Dismiss" }) {
295
+ return /* @__PURE__ */ c("div", { className: B("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
296
  /* @__PURE__ */ e(ne, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
297
297
  /* @__PURE__ */ e("span", { className: "cms-toast__message", children: t }),
298
298
  l ? /* @__PURE__ */ e(Te, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
@@ -303,7 +303,7 @@ function Ft({ children: n }) {
303
303
  return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
304
304
  }
305
305
  function Tn({ what: n, layout: t = "inline" }) {
306
- return /* @__PURE__ */ c("div", { className: F("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
306
+ return /* @__PURE__ */ c("div", { className: B("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
307
307
  /* @__PURE__ */ e(ne, { name: "spinner" }),
308
308
  /* @__PURE__ */ e("span", { children: n })
309
309
  ] });
@@ -508,7 +508,7 @@ function L({ name: n, size: t = 20, label: l }) {
508
508
  }
509
509
  );
510
510
  }
511
- const Bt = Object.keys(fn), sn = {
511
+ const Ht = Object.keys(fn), sn = {
512
512
  reply: "reply",
513
513
  "reply-all": "reply",
514
514
  forward: "forward",
@@ -551,7 +551,7 @@ const Bt = Object.keys(fn), sn = {
551
551
  hash: "hash",
552
552
  funnel: "funnel"
553
553
  };
554
- function Fe(n) {
554
+ function Be(n) {
555
555
  return Object.prototype.hasOwnProperty.call(sn, n) ? sn[n] : null;
556
556
  }
557
557
  function $n() {
@@ -564,16 +564,16 @@ function $n() {
564
564
  const an = /* @__PURE__ */ new Set();
565
565
  function In({ name: n, size: t = 18 }) {
566
566
  if (n === "") return null;
567
- const l = Fe(n);
567
+ const l = Be(n);
568
568
  return l !== null ? /* @__PURE__ */ e(L, { name: l, size: t }) : (!an.has(n) && $n() && (an.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: t, height: t }, "aria-hidden": "true", "data-icon-name": n }));
569
569
  }
570
570
  const We = 300;
571
- function Fn() {
571
+ function Bn() {
572
572
  if (typeof window > "u" || typeof getComputedStyle != "function") return We;
573
573
  const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), t = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
574
574
  return Number.isFinite(t) && t >= 0 ? t : We;
575
575
  }
576
- function Bn() {
576
+ function Fn() {
577
577
  return /* @__PURE__ */ c("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
578
578
  /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
579
579
  /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
@@ -587,19 +587,19 @@ function Ae({ kind: n, title: t, description: l, action: a, placement: s = "bloc
587
587
  return;
588
588
  }
589
589
  o(!1);
590
- const f = window.setTimeout(() => o(!0), Fn());
590
+ const f = window.setTimeout(() => o(!0), Bn());
591
591
  return () => window.clearTimeout(f);
592
592
  }, [n]), /* @__PURE__ */ c(
593
593
  "div",
594
594
  {
595
- className: F("cms-state", `cms-state--${n}`, `cms-state--${s}`, !h && "is-waiting"),
595
+ className: B("cms-state", `cms-state--${n}`, `cms-state--${s}`, !h && "is-waiting"),
596
596
  role: "status",
597
597
  "aria-live": "polite",
598
598
  "data-kind": n,
599
599
  children: [
600
- n === "loading" ? /* @__PURE__ */ e(Bn, {}) : null,
600
+ n === "loading" ? /* @__PURE__ */ e(Fn, {}) : null,
601
601
  n === "error" || n === "denied" ? /* @__PURE__ */ e(ne, { name: n === "error" ? "warning" : "lock" }) : null,
602
- n === "empty" && r !== void 0 && Fe(r) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(In, { name: r, size: s === "page" ? 32 : 24 }) }) : null,
602
+ n === "empty" && r !== void 0 && Be(r) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(In, { name: r, size: s === "page" ? 32 : 24 }) }) : null,
603
603
  /* @__PURE__ */ c("span", { className: "cms-state__text", children: [
604
604
  /* @__PURE__ */ e("span", { className: "cms-state__title", children: t }),
605
605
  l !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: l }) : null
@@ -619,45 +619,45 @@ function On(n) {
619
619
  function zn(n) {
620
620
  return n.getClientRects().length > 0;
621
621
  }
622
- function Ht(n) {
623
- const { name: t, badge: l, closeLabel: a, onClose: s, actions: r = [], moreLabel: h = "More", edit: o, editing: f, state: g, siblings: i, bar: _, thumbnails: u, strip: b, onZoom: d, children: w } = n, x = z(null), M = z(null), S = fe(), [C, v] = $(!1), N = z(null);
622
+ function Rt(n) {
623
+ const { name: t, badge: l, closeLabel: a, onClose: s, actions: r = [], moreLabel: h = "More", edit: o, editing: f, state: g, siblings: i, bar: b, thumbnails: u, strip: _, onZoom: d, children: y } = n, x = z(null), M = z(null), S = fe(), [C, v] = $(!1), N = z(null);
624
624
  ee(() => {
625
625
  var G;
626
- const k = document.activeElement, B = document.body.style.overflow;
626
+ const k = document.activeElement, F = document.body.style.overflow;
627
627
  return document.body.style.overflow = "hidden", (G = M.current) == null || G.focus(), () => {
628
628
  var X;
629
- document.body.style.overflow = B, (X = k == null ? void 0 : k.focus) == null || X.call(k);
629
+ document.body.style.overflow = F, (X = k == null ? void 0 : k.focus) == null || X.call(k);
630
630
  };
631
631
  }, []);
632
632
  const T = () => {
633
633
  f != null && f.dirty ? f.onDirtyClose() : s();
634
634
  }, q = (k) => {
635
- const B = k.touches.length === 1 ? k.touches[0] : void 0;
636
- N.current = B === void 0 || f !== void 0 || On(k.target) ? null : { x: B.clientX, y: B.clientY };
635
+ const F = k.touches.length === 1 ? k.touches[0] : void 0;
636
+ N.current = F === void 0 || f !== void 0 || On(k.target) ? null : { x: F.clientX, y: F.clientY };
637
637
  }, Z = (k) => {
638
638
  var H, W;
639
- const B = N.current, G = k.changedTouches[0];
640
- if (N.current = null, B === null || G === void 0) return;
641
- const X = G.clientX - B.x;
642
- Math.abs(X) < Rn || Math.abs(X) < Math.abs(G.clientY - B.y) || (X > 0 ? (H = i == null ? void 0 : i.onPrevious) == null || H.call(i) : (W = i == null ? void 0 : i.onNext) == null || W.call(i));
639
+ const F = N.current, G = k.changedTouches[0];
640
+ if (N.current = null, F === null || G === void 0) return;
641
+ const X = G.clientX - F.x;
642
+ Math.abs(X) < Rn || Math.abs(X) < Math.abs(G.clientY - F.y) || (X > 0 ? (H = i == null ? void 0 : i.onPrevious) == null || H.call(i) : (W = i == null ? void 0 : i.onNext) == null || W.call(i));
643
643
  };
644
644
  return je(
645
645
  /* @__PURE__ */ c(
646
646
  "div",
647
647
  {
648
648
  ref: x,
649
- className: F("cms-viewer", f !== void 0 && "is-editing"),
649
+ className: B("cms-viewer", f !== void 0 && "is-editing"),
650
650
  role: "dialog",
651
651
  "aria-modal": "true",
652
652
  "aria-labelledby": S,
653
653
  tabIndex: -1,
654
654
  onKeyDown: (k) => {
655
- var B, G, X;
655
+ var F, G, X;
656
656
  if (k.key === "Escape") {
657
657
  if (f !== void 0) return;
658
658
  k.stopPropagation(), C ? v(!1) : s();
659
659
  } else if (k.key === "Tab") {
660
- const H = Array.from(((B = x.current) == null ? void 0 : B.querySelectorAll(Hn)) ?? []).filter(zn);
660
+ const H = Array.from(((F = x.current) == null ? void 0 : F.querySelectorAll(Hn)) ?? []).filter(zn);
661
661
  if (H.length === 0) return;
662
662
  const W = H[0], J = H[H.length - 1];
663
663
  k.shiftKey && document.activeElement === W ? (k.preventDefault(), J.focus()) : !k.shiftKey && document.activeElement === J && (k.preventDefault(), W.focus());
@@ -711,14 +711,14 @@ function Ht(n) {
711
711
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: f.conflict.onOverwrite, children: f.conflict.overwriteLabel }),
712
712
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: f.conflict.onKeepBoth, children: f.conflict.keepBothLabel })
713
713
  ] }) : null,
714
- g === void 0 ? w : /* @__PURE__ */ e(Un, { state: g }),
714
+ g === void 0 ? y : /* @__PURE__ */ e(Un, { state: g }),
715
715
  f === void 0 && (i != null && i.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": i.previousLabel, title: i.previousLabel, onClick: i.onPrevious, children: /* @__PURE__ */ e(ne, { name: "back" }) }) : null,
716
716
  f === void 0 && (i != null && i.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": i.nextLabel, title: i.nextLabel, onClick: i.onNext, children: /* @__PURE__ */ e(ne, { name: "back" }) }) : null,
717
- f === void 0 && i !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (k, B) => /* @__PURE__ */ e("i", { className: B === Math.min(i.index, 6) ? "is-current" : void 0 }, B)) }) : null
717
+ f === void 0 && i !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (k, F) => /* @__PURE__ */ e("i", { className: F === Math.min(i.index, 6) ? "is-current" : void 0 }, F)) }) : null
718
718
  ] })
719
719
  ] }),
720
- f === void 0 && b != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: b }) : null,
721
- _ != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: _ }) : null
720
+ f === void 0 && _ != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: _ }) : null,
721
+ b != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: b }) : null
722
722
  ]
723
723
  }
724
724
  ),
@@ -765,69 +765,69 @@ class Wn extends Error {
765
765
  }
766
766
  const Ke = (n, t) => `${n}
767
767
  ${t}`, Vn = (n, t) => n === "" ? t : `${n}/${t}`, Zn = 48;
768
- function Rt(n) {
768
+ function Pt(n) {
769
769
  var ie, Me;
770
- const { open: t, spaces: l, list: a, disabledReason: s, budget: r, formatSize: h, labels: o, onConfirm: f, onCancel: g } = n, [i, _] = $(((ie = l[0]) == null ? void 0 : ie.id) ?? ""), [u, b] = $(""), [d, w] = $({ status: "loading" }), [x, M] = $(0), [S, C] = $(/* @__PURE__ */ new Map()), [v, N] = $(0), [T, q] = $(!1), Z = z(null), k = z(!1);
770
+ const { open: t, spaces: l, list: a, disabledReason: s, budget: r, formatSize: h, labels: o, onConfirm: f, onCancel: g } = n, [i, b] = $(((ie = l[0]) == null ? void 0 : ie.id) ?? ""), [u, _] = $(""), [d, y] = $({ status: "loading" }), [x, M] = $(0), [S, C] = $(/* @__PURE__ */ new Map()), [v, N] = $(0), [T, q] = $(!1), Z = z(null), k = z(!1);
771
771
  ee(() => {
772
772
  k.current = !1;
773
773
  }, [t, i, u]);
774
- const B = fe();
774
+ const F = fe();
775
775
  ee(() => {
776
- var y;
777
- t && (_(((y = l[0]) == null ? void 0 : y.id) ?? ""), b(""), C(/* @__PURE__ */ new Map()), q(!1));
776
+ var w;
777
+ t && (b(((w = l[0]) == null ? void 0 : w.id) ?? ""), _(""), C(/* @__PURE__ */ new Map()), q(!1));
778
778
  }, [t]), ee(() => {
779
779
  if (!t || i === "") return;
780
- let y = !0;
781
- return w({ status: "loading" }), N(0), a(i, u).then(
782
- (E) => y && w({ status: "ready", entries: E.entries, next: E.next ?? null, paging: !1 }),
783
- (E) => y && w({ status: E instanceof Kn ? "denied" : "error" })
780
+ let w = !0;
781
+ return y({ status: "loading" }), N(0), a(i, u).then(
782
+ (E) => w && y({ status: "ready", entries: E.entries, next: E.next ?? null, paging: !1 }),
783
+ (E) => w && y({ status: E instanceof Kn ? "denied" : "error" })
784
784
  ), () => {
785
- y = !1;
785
+ w = !1;
786
786
  };
787
787
  }, [t, i, u, a, x]);
788
788
  const G = Le(() => {
789
789
  if (d.status !== "ready" || d.next === null || d.paging) return;
790
- const y = d.next, E = d.entries;
791
- w({ ...d, paging: !0 }), a(i, u, y).then(
790
+ const w = d.next, E = d.entries;
791
+ y({ ...d, paging: !0 }), a(i, u, w).then(
792
792
  (O) => {
793
- k.current = !1, w({ status: "ready", entries: [...E, ...O.entries], next: O.next ?? null, paging: !1 });
793
+ k.current = !1, y({ status: "ready", entries: [...E, ...O.entries], next: O.next ?? null, paging: !1 });
794
794
  },
795
795
  (O) => {
796
796
  if (!(O instanceof Wn)) {
797
- w({ status: "ready", entries: E, next: y, paging: !1 });
797
+ y({ status: "ready", entries: E, next: w, paging: !1 });
798
798
  return;
799
799
  }
800
800
  if (k.current) {
801
- w({ status: "error" });
801
+ y({ status: "error" });
802
802
  return;
803
803
  }
804
804
  k.current = !0, M((Q) => Q + 1);
805
805
  }
806
806
  );
807
- }, [d, a, i, u]), X = Le((y) => {
807
+ }, [d, a, i, u]), X = Le((w) => {
808
808
  var E;
809
- return ((E = r == null ? void 0 : r.cost) == null ? void 0 : E.call(r, y)) ?? y.size ?? 0;
810
- }, [r]), H = yn(() => [...S.values()], [S]), W = H.reduce((y, E) => y + (E.size ?? 0), 0), J = r === void 0 ? null : r.limitBytes - r.usedBytes - H.reduce((y, E) => y + X(E), 0), pe = J !== null && J < 0, se = (y) => {
811
- if (y.kind !== "file") return null;
812
- const E = s == null ? void 0 : s(y);
813
- return E || (J !== null && !S.has(Ke(i, y.id)) && X(y) > J ? o.overBudget : null);
814
- }, xe = (y) => {
815
- const E = Ke(i, y.id);
816
- !S.has(E) && se(y) !== null || C((O) => {
809
+ return ((E = r == null ? void 0 : r.cost) == null ? void 0 : E.call(r, w)) ?? w.size ?? 0;
810
+ }, [r]), H = wn(() => [...S.values()], [S]), W = H.reduce((w, E) => w + (E.size ?? 0), 0), J = r === void 0 ? null : r.limitBytes - r.usedBytes - H.reduce((w, E) => w + X(E), 0), pe = J !== null && J < 0, se = (w) => {
811
+ if (w.kind !== "file") return null;
812
+ const E = s == null ? void 0 : s(w);
813
+ return E || (J !== null && !S.has(Ke(i, w.id)) && X(w) > J ? o.overBudget : null);
814
+ }, xe = (w) => {
815
+ const E = Ke(i, w.id);
816
+ !S.has(E) && se(w) !== null || C((O) => {
817
817
  const Q = new Map(O);
818
- return Q.has(E) ? Q.delete(E) : Q.set(E, { ...y, space: i, path: u }), Q;
818
+ return Q.has(E) ? Q.delete(E) : Q.set(E, { ...w, space: i, path: u }), Q;
819
819
  });
820
- }, ye = (y) => b(Vn(u, y.name)), ae = () => b(u.includes("/") ? u.slice(0, u.lastIndexOf("/")) : ""), ge = (y) => C((E) => {
820
+ }, we = (w) => _(Vn(u, w.name)), ae = () => _(u.includes("/") ? u.slice(0, u.lastIndexOf("/")) : ""), ge = (w) => C((E) => {
821
821
  const O = new Map(E);
822
- return O.delete(y), O;
823
- }), re = d.status === "ready" ? d.entries : [], ue = (y) => {
822
+ return O.delete(w), O;
823
+ }), re = d.status === "ready" ? d.entries : [], ue = (w) => {
824
824
  const E = re[v];
825
- if (y.key === "ArrowDown" || y.key === "ArrowUp" || y.key === "Home" || y.key === "End") {
826
- y.preventDefault();
827
- const O = re.length - 1, Q = y.key === "Home" ? 0 : y.key === "End" ? O : Math.min(O, Math.max(0, v + (y.key === "ArrowDown" ? 1 : -1)));
825
+ if (w.key === "ArrowDown" || w.key === "ArrowUp" || w.key === "Home" || w.key === "End") {
826
+ w.preventDefault();
827
+ const O = re.length - 1, Q = w.key === "Home" ? 0 : w.key === "End" ? O : Math.min(O, Math.max(0, v + (w.key === "ArrowDown" ? 1 : -1)));
828
828
  N(Q), Q >= O - 1 && G();
829
- } else y.key === "Enter" && (E == null ? void 0 : E.kind) === "folder" ? (y.preventDefault(), ye(E)) : y.key === " " && (E == null ? void 0 : E.kind) === "file" ? (y.preventDefault(), xe(E)) : y.key === "Backspace" && u !== "" && (y.preventDefault(), ae());
830
- }, me = u === "" ? [] : u.split("/"), te = ((Me = l.find((y) => y.id === i)) == null ? void 0 : Me.name) ?? "", Se = (y) => `${B}-entry-${String(y)}`;
829
+ } else w.key === "Enter" && (E == null ? void 0 : E.kind) === "folder" ? (w.preventDefault(), we(E)) : w.key === " " && (E == null ? void 0 : E.kind) === "file" ? (w.preventDefault(), xe(E)) : w.key === "Backspace" && u !== "" && (w.preventDefault(), ae());
830
+ }, me = u === "" ? [] : u.split("/"), te = ((Me = l.find((w) => w.id === i)) == null ? void 0 : Me.name) ?? "", Se = (w) => `${F}-entry-${String(w)}`;
831
831
  return /* @__PURE__ */ c(
832
832
  hn,
833
833
  {
@@ -840,7 +840,7 @@ function Rt(n) {
840
840
  footer: /* @__PURE__ */ c("div", { className: "cms-file-picker__foot", children: [
841
841
  /* @__PURE__ */ c("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
842
842
  H.length > 0 ? /* @__PURE__ */ e("span", { children: o.total(H.length, h(W)) }) : null,
843
- r !== void 0 && J !== null ? /* @__PURE__ */ e("span", { className: F(pe && "is-over"), children: pe ? o.overBudget : o.left(h(Math.max(0, J)), h(r.limitBytes)) }) : null
843
+ r !== void 0 && J !== null ? /* @__PURE__ */ e("span", { className: B(pe && "is-over"), children: pe ? o.overBudget : o.left(h(Math.max(0, J)), h(r.limitBytes)) }) : null
844
844
  ] }),
845
845
  /* @__PURE__ */ c("div", { className: "cms-file-picker__actions", children: [
846
846
  /* @__PURE__ */ e(Te, { variant: "secondary", onClick: g, children: o.cancel }),
@@ -851,38 +851,38 @@ function Rt(n) {
851
851
  /* @__PURE__ */ c("div", { className: "cms-file-picker__top", children: [
852
852
  l.length > 1 ? /* @__PURE__ */ c("label", { className: "cms-file-picker__space", children: [
853
853
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: o.space }),
854
- /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: i, onChange: (y) => {
855
- _(y.target.value), b("");
856
- }, children: l.map((y) => /* @__PURE__ */ e("option", { value: y.id, children: y.name }, y.id)) })
854
+ /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: i, onChange: (w) => {
855
+ b(w.target.value), _("");
856
+ }, children: l.map((w) => /* @__PURE__ */ e("option", { value: w.id, children: w.name }, w.id)) })
857
857
  ] }) : null,
858
858
  /* @__PURE__ */ c("nav", { className: "cms-file-picker__path", "aria-label": o.path, children: [
859
859
  /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": o.up, disabled: u === "", onClick: ae, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
860
860
  /* @__PURE__ */ c("ol", { children: [
861
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": u === "" ? "location" : void 0, onClick: () => b(""), children: te }) }),
862
- me.map((y, E) => {
861
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": u === "" ? "location" : void 0, onClick: () => _(""), children: te }) }),
862
+ me.map((w, E) => {
863
863
  const O = me.slice(0, E + 1).join("/");
864
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": O === u ? "location" : void 0, onClick: () => b(O), children: y }) }, O);
864
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": O === u ? "location" : void 0, onClick: () => _(O), children: w }) }, O);
865
865
  })
866
866
  ] })
867
867
  ] }),
868
- H.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": T, onClick: () => q((y) => !y), children: o.selected(H.length) }) : null
868
+ H.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": T, onClick: () => q((w) => !w), children: o.selected(H.length) }) : null
869
869
  ] }),
870
870
  T && H.length > 0 ? /* @__PURE__ */ c("div", { className: "cms-file-picker__chosen", children: [
871
- /* @__PURE__ */ e("ul", { children: [...S.entries()].map(([y, E]) => /* @__PURE__ */ c("li", { children: [
871
+ /* @__PURE__ */ e("ul", { children: [...S.entries()].map(([w, E]) => /* @__PURE__ */ c("li", { children: [
872
872
  /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: E.name }),
873
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": o.remove(E.name), onClick: () => ge(y), children: /* @__PURE__ */ e(ne, { name: "close" }) })
874
- ] }, y)) }),
873
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": o.remove(E.name), onClick: () => ge(w), children: /* @__PURE__ */ e(ne, { name: "close" }) })
874
+ ] }, w)) }),
875
875
  /* @__PURE__ */ e(Te, { variant: "secondary", onClick: () => {
876
876
  C(/* @__PURE__ */ new Map()), q(!1);
877
877
  }, children: o.clear })
878
878
  ] }) : null,
879
- /* @__PURE__ */ c("div", { className: "cms-file-picker__list", onScroll: (y) => {
880
- const E = y.currentTarget;
879
+ /* @__PURE__ */ c("div", { className: "cms-file-picker__list", onScroll: (w) => {
880
+ const E = w.currentTarget;
881
881
  E.scrollTop + E.clientHeight >= E.scrollHeight - Zn && G();
882
882
  }, children: [
883
883
  d.status === "loading" ? /* @__PURE__ */ e(Ae, { kind: "loading", title: o.loading, placement: "block" }) : null,
884
884
  d.status === "error" ? /* @__PURE__ */ e(Ae, { kind: "error", title: o.error, placement: "block", action: { label: o.retry, onAction: () => {
885
- k.current = !1, M((y) => y + 1);
885
+ k.current = !1, M((w) => w + 1);
886
886
  } } }) : null,
887
887
  d.status === "denied" ? /* @__PURE__ */ e(Ae, { kind: "denied", title: o.denied, placement: "block" }) : null,
888
888
  d.status === "ready" && re.length === 0 ? /* @__PURE__ */ e(Ae, { kind: "empty", title: o.empty, placement: "block" }) : null,
@@ -899,30 +899,30 @@ function Rt(n) {
899
899
  hidden: d.status !== "ready" || re.length === 0,
900
900
  onKeyDown: ue,
901
901
  children: [
902
- re.map((y, E) => {
903
- const O = y.kind === "file" && S.has(Ke(i, y.id)), Q = se(y);
902
+ re.map((w, E) => {
903
+ const O = w.kind === "file" && S.has(Ke(i, w.id)), Q = se(w);
904
904
  return /* @__PURE__ */ c(
905
905
  "div",
906
906
  {
907
907
  id: Se(E),
908
908
  role: "option",
909
- "aria-selected": y.kind === "file" ? O : void 0,
909
+ "aria-selected": w.kind === "file" ? O : void 0,
910
910
  "aria-disabled": Q !== null || void 0,
911
- className: F("cms-file-picker__entry", E === v && "is-active", O && "is-ticked", Q !== null && "is-disabled"),
911
+ className: B("cms-file-picker__entry", E === v && "is-active", O && "is-ticked", Q !== null && "is-disabled"),
912
912
  onClick: () => {
913
- N(E), y.kind === "folder" ? ye(y) : xe(y);
913
+ N(E), w.kind === "folder" ? we(w) : xe(w);
914
914
  },
915
915
  children: [
916
916
  /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: O ? /* @__PURE__ */ e(L, { name: "check" }) : null }),
917
- /* @__PURE__ */ e(L, { name: y.kind === "folder" ? "folder" : "file" }),
917
+ /* @__PURE__ */ e(L, { name: w.kind === "folder" ? "folder" : "file" }),
918
918
  /* @__PURE__ */ c("span", { className: "cms-file-picker__text", children: [
919
- /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: y.name }),
919
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: w.name }),
920
920
  Q !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: Q }) : null
921
921
  ] }),
922
- y.kind === "file" && y.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: h(y.size) }) : null
922
+ w.kind === "file" && w.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: h(w.size) }) : null
923
923
  ]
924
924
  },
925
- y.id
925
+ w.id
926
926
  );
927
927
  }),
928
928
  d.status === "ready" && d.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(Ae, { kind: "loading", title: o.loading, placement: "inline" }) }) : null
@@ -948,19 +948,19 @@ function Gn(n, t) {
948
948
  const r = n.current;
949
949
  if (r === null) return;
950
950
  let h = null, o = 0;
951
- const f = (_) => {
952
- h = qn(_.target, r) && _.touches.length === 1 ? _.touches[0].clientY : null, o = 0;
953
- }, g = (_) => {
951
+ const f = (b) => {
952
+ h = qn(b.target, r) && b.touches.length === 1 ? b.touches[0].clientY : null, o = 0;
953
+ }, g = (b) => {
954
954
  if (h === null || s.current === null) return;
955
- const u = _.touches[0].clientY - h;
955
+ const u = b.touches[0].clientY - h;
956
956
  if (u <= 0) {
957
957
  h = null, a(0);
958
958
  return;
959
959
  }
960
- _.cancelable && _.preventDefault(), o = Math.min(u * 0.6, Ve * 1.5), a(o);
960
+ b.cancelable && b.preventDefault(), o = Math.min(u * 0.6, Ve * 1.5), a(o);
961
961
  }, i = () => {
962
- var _;
963
- h !== null && o >= Ve && ((_ = s.current) == null || _.call(s)), h = null, o = 0, a(0);
962
+ var b;
963
+ h !== null && o >= Ve && ((b = s.current) == null || b.call(s)), h = null, o = 0, a(0);
964
964
  };
965
965
  return r.addEventListener("touchstart", f, { passive: !0 }), r.addEventListener("touchmove", g, { passive: !1 }), r.addEventListener("touchend", i), r.addEventListener("touchcancel", i), () => {
966
966
  r.removeEventListener("touchstart", f), r.removeEventListener("touchmove", g), r.removeEventListener("touchend", i), r.removeEventListener("touchcancel", i);
@@ -971,30 +971,30 @@ const pn = kn(null);
971
971
  function jn() {
972
972
  return Nn(pn);
973
973
  }
974
- function Pt({ label: n, rows: t, error: l, onRetry: a, loadingText: s = "Loading", emptyTitle: r = "Nothing here yet", emptyHint: h, selected: o, onOpen: f, onRowMenu: g }) {
975
- const i = z([]), _ = jn();
974
+ function Ot({ label: n, rows: t, error: l, onRetry: a, loadingText: s = "Loading", emptyTitle: r = "Nothing here yet", emptyHint: h, selected: o, onOpen: f, onRowMenu: g }) {
975
+ const i = z([]), b = jn();
976
976
  if (l != null) return /* @__PURE__ */ e(Dn, { message: l, onRetry: a });
977
977
  if (t === null) return /* @__PURE__ */ e(Tn, { what: s, layout: "block" });
978
978
  if (t.length === 0) return /* @__PURE__ */ e(Ln, { title: r, hint: h });
979
- const u = (b, d, w) => {
979
+ const u = (_, d, y) => {
980
980
  var x;
981
- if (b.key === "ArrowDown" || b.key === "ArrowUp")
982
- b.preventDefault(), (x = i.current[Math.min(t.length - 1, Math.max(0, d + (b.key === "ArrowDown" ? 1 : -1)))]) == null || x.focus();
983
- else if (b.key === "Enter")
984
- f == null || f(w);
985
- else if ((b.key === "ContextMenu" || b.shiftKey && b.key === "F10") && g) {
986
- b.preventDefault();
987
- const M = b.currentTarget.getBoundingClientRect();
988
- g(w, { x: M.left + 16, y: M.bottom });
981
+ if (_.key === "ArrowDown" || _.key === "ArrowUp")
982
+ _.preventDefault(), (x = i.current[Math.min(t.length - 1, Math.max(0, d + (_.key === "ArrowDown" ? 1 : -1)))]) == null || x.focus();
983
+ else if (_.key === "Enter")
984
+ f == null || f(y);
985
+ else if ((_.key === "ContextMenu" || _.shiftKey && _.key === "F10") && g) {
986
+ _.preventDefault();
987
+ const M = _.currentTarget.getBoundingClientRect();
988
+ g(y, { x: M.left + 16, y: M.bottom });
989
989
  }
990
990
  };
991
991
  return /* @__PURE__ */ c(D, { children: [
992
- _ !== null && (_.distance > 0 || _.refreshing) ? /* @__PURE__ */ c("div", { className: "cms-list__pull", role: "status", style: { height: _.refreshing ? void 0 : _.distance }, "data-ready": _.distance >= Ve ? "" : void 0, children: [
993
- _.refreshing ? /* @__PURE__ */ e(ne, { name: "spinner" }) : null,
994
- _.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: _.text }) : null
992
+ b !== null && (b.distance > 0 || b.refreshing) ? /* @__PURE__ */ c("div", { className: "cms-list__pull", role: "status", style: { height: b.refreshing ? void 0 : b.distance }, "data-ready": b.distance >= Ve ? "" : void 0, children: [
993
+ b.refreshing ? /* @__PURE__ */ e(ne, { name: "spinner" }) : null,
994
+ b.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: b.text }) : null
995
995
  ] }) : null,
996
- /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: t.map((b, d) => {
997
- const w = b.id === o;
996
+ /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: t.map((_, d) => {
997
+ const y = _.id === o;
998
998
  return /* @__PURE__ */ c(
999
999
  "li",
1000
1000
  {
@@ -1002,43 +1002,43 @@ function Pt({ label: n, rows: t, error: l, onRetry: a, loadingText: s = "Loading
1002
1002
  i.current[d] = x;
1003
1003
  },
1004
1004
  role: "option",
1005
- "aria-selected": w,
1006
- tabIndex: w || o == null && d === 0 ? 0 : -1,
1007
- className: F("cms-list__row", w && "is-selected"),
1008
- onClick: () => f == null ? void 0 : f(b.id),
1009
- onKeyDown: (x) => u(x, d, b.id),
1005
+ "aria-selected": y,
1006
+ tabIndex: y || o == null && d === 0 ? 0 : -1,
1007
+ className: B("cms-list__row", y && "is-selected"),
1008
+ onClick: () => f == null ? void 0 : f(_.id),
1009
+ onKeyDown: (x) => u(x, d, _.id),
1010
1010
  onContextMenu: g ? (x) => {
1011
- x.preventDefault(), g(b.id, { x: x.clientX, y: x.clientY });
1011
+ x.preventDefault(), g(_.id, { x: x.clientX, y: x.clientY });
1012
1012
  } : void 0,
1013
1013
  children: [
1014
- b.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: b.lead }) : null,
1014
+ _.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: _.lead }) : null,
1015
1015
  /* @__PURE__ */ c("span", { className: "cms-list__text", children: [
1016
- /* @__PURE__ */ e("span", { className: F("cms-list__primary", b.unread === !0 && "is-unread"), children: b.primary }),
1017
- b.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: b.secondary }) : null
1016
+ /* @__PURE__ */ e("span", { className: B("cms-list__primary", _.unread === !0 && "is-unread"), children: _.primary }),
1017
+ _.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: _.secondary }) : null
1018
1018
  ] }),
1019
- b.meta != null || b.count !== void 0 ? /* @__PURE__ */ c("span", { className: "cms-list__end", children: [
1020
- b.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: b.meta }) : null,
1021
- b.count !== void 0 && b.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: b.count }) : null
1019
+ _.meta != null || _.count !== void 0 ? /* @__PURE__ */ c("span", { className: "cms-list__end", children: [
1020
+ _.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: _.meta }) : null,
1021
+ _.count !== void 0 && _.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: _.count }) : null
1022
1022
  ] }) : null
1023
1023
  ]
1024
1024
  },
1025
- b.id
1025
+ _.id
1026
1026
  );
1027
1027
  }) })
1028
1028
  ] });
1029
1029
  }
1030
- function Be({ at: n, items: t, onClose: l, label: a = "Actions", focus: s = "current" }) {
1030
+ function Fe({ at: n, items: t, onClose: l, label: a = "Actions", focus: s = "current" }) {
1031
1031
  const r = z(null), h = z(null), o = fe(), [f, g] = $(n), i = t.filter((d) => d.offer.offered);
1032
1032
  if (De(() => {
1033
1033
  if (!n) return;
1034
- const d = r.current, w = (d == null ? void 0 : d.offsetWidth) ?? 0, x = (d == null ? void 0 : d.offsetHeight) ?? 0;
1035
- g({ x: Math.max(0, Math.min(n.x, window.innerWidth - w)), y: Math.max(0, Math.min(n.y, window.innerHeight - x)) });
1034
+ const d = r.current, y = (d == null ? void 0 : d.offsetWidth) ?? 0, x = (d == null ? void 0 : d.offsetHeight) ?? 0;
1035
+ g({ x: Math.max(0, Math.min(n.x, window.innerWidth - y)), y: Math.max(0, Math.min(n.y, window.innerHeight - x)) });
1036
1036
  }, [n]), ee(() => {
1037
1037
  var M, S;
1038
1038
  if (!n) return;
1039
1039
  h.current = document.activeElement;
1040
- const d = Array.from(((M = r.current) == null ? void 0 : M.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), w = s === "current" ? d.find((C) => C.getAttribute("aria-checked") === "true") : void 0;
1041
- (S = s === "last" ? d[d.length - 1] : w ?? d[0]) == null || S.focus();
1040
+ const d = Array.from(((M = r.current) == null ? void 0 : M.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), y = s === "current" ? d.find((C) => C.getAttribute("aria-checked") === "true") : void 0;
1041
+ (S = s === "last" ? d[d.length - 1] : y ?? d[0]) == null || S.focus();
1042
1042
  const x = (C) => {
1043
1043
  var v;
1044
1044
  (v = r.current) != null && v.contains(C.target) || l();
@@ -1048,47 +1048,47 @@ function Be({ at: n, items: t, onClose: l, label: a = "Actions", focus: s = "cur
1048
1048
  document.removeEventListener("mousedown", x), (v = (C = h.current) == null ? void 0 : C.focus) == null || v.call(C);
1049
1049
  };
1050
1050
  }, [n, l, s]), !n || i.length === 0) return null;
1051
- const _ = (d) => {
1051
+ const b = (d) => {
1052
1052
  var M, S;
1053
- const w = Array.from(((M = r.current) == null ? void 0 : M.querySelectorAll('[role^="menuitem"]')) ?? []), x = w.indexOf(document.activeElement);
1053
+ const y = Array.from(((M = r.current) == null ? void 0 : M.querySelectorAll('[role^="menuitem"]')) ?? []), x = y.indexOf(document.activeElement);
1054
1054
  if (d.key === "Escape" || d.key === "Tab")
1055
1055
  d.preventDefault(), l();
1056
1056
  else if (d.key === "ArrowDown" || d.key === "ArrowUp") {
1057
1057
  d.preventDefault();
1058
1058
  const C = d.key === "ArrowDown" ? 1 : -1;
1059
- (S = w[(x + C + w.length) % w.length]) == null || S.focus();
1059
+ (S = y[(x + C + y.length) % y.length]) == null || S.focus();
1060
1060
  }
1061
1061
  }, u = (d) => {
1062
- const w = d.offer.refusal !== void 0;
1062
+ const y = d.offer.refusal !== void 0;
1063
1063
  return /* @__PURE__ */ c(
1064
1064
  "div",
1065
1065
  {
1066
1066
  role: d.checked === void 0 ? "menuitem" : "menuitemradio",
1067
1067
  "aria-checked": d.checked,
1068
1068
  tabIndex: -1,
1069
- "aria-disabled": w || void 0,
1070
- "aria-describedby": w ? `${o}-${d.id}` : void 0,
1071
- title: w ? d.offer.refusal : void 0,
1072
- className: F("cms-menu__item", d.danger && "is-danger", d.offer.locked && "is-locked", w && "is-refused"),
1069
+ "aria-disabled": y || void 0,
1070
+ "aria-describedby": y ? `${o}-${d.id}` : void 0,
1071
+ title: y ? d.offer.refusal : void 0,
1072
+ className: B("cms-menu__item", d.danger && "is-danger", d.offer.locked && "is-locked", y && "is-refused"),
1073
1073
  onClick: () => {
1074
- w || (l(), d.onSelect());
1074
+ y || (l(), d.onSelect());
1075
1075
  },
1076
1076
  onKeyDown: (x) => {
1077
- (x.key === "Enter" || x.key === " ") && !w && (x.preventDefault(), l(), d.onSelect());
1077
+ (x.key === "Enter" || x.key === " ") && !y && (x.preventDefault(), l(), d.onSelect());
1078
1078
  },
1079
1079
  children: [
1080
1080
  d.checked !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-menu__check", children: d.checked ? /* @__PURE__ */ e(ne, { name: "check" }) : null }) : null,
1081
1081
  d.offer.locked ? /* @__PURE__ */ e(ne, { name: "lock" }) : null,
1082
1082
  /* @__PURE__ */ e("span", { className: "cms-menu__label", children: d.label }),
1083
- w ? /* @__PURE__ */ e("span", { id: `${o}-${d.id}`, className: "cms-menu__refusal", children: d.offer.refusal }) : null
1083
+ y ? /* @__PURE__ */ e("span", { id: `${o}-${d.id}`, className: "cms-menu__refusal", children: d.offer.refusal }) : null
1084
1084
  ]
1085
1085
  },
1086
1086
  d.id
1087
1087
  );
1088
- }, b = [];
1088
+ }, _ = [];
1089
1089
  for (const d of i) {
1090
- const w = b[b.length - 1];
1091
- w !== void 0 && w.group === d.group ? w.items.push(d) : b.push({ group: d.group, items: [d] });
1090
+ const y = _[_.length - 1];
1091
+ y !== void 0 && y.group === d.group ? y.items.push(d) : _.push({ group: d.group, items: [d] });
1092
1092
  }
1093
1093
  return je(
1094
1094
  /* @__PURE__ */ e(
@@ -1099,29 +1099,29 @@ function Be({ at: n, items: t, onClose: l, label: a = "Actions", focus: s = "cur
1099
1099
  role: "menu",
1100
1100
  "aria-label": a,
1101
1101
  style: { left: (f ?? n).x, top: (f ?? n).y },
1102
- onKeyDown: _,
1102
+ onKeyDown: b,
1103
1103
  onContextMenu: (d) => d.preventDefault(),
1104
- children: b.map((d, w) => /* @__PURE__ */ c(xn, { children: [
1105
- w > 0 ? /* @__PURE__ */ e("div", { className: "cms-menu__separator", role: "separator" }) : null,
1104
+ children: _.map((d, y) => /* @__PURE__ */ c(xn, { children: [
1105
+ y > 0 ? /* @__PURE__ */ e("div", { className: "cms-menu__separator", role: "separator" }) : null,
1106
1106
  d.group === void 0 ? d.items.map(u) : /* @__PURE__ */ c("div", { role: "group", "aria-label": d.group, children: [
1107
1107
  /* @__PURE__ */ e("div", { className: "cms-menu__group", "aria-hidden": "true", children: d.group }),
1108
1108
  d.items.map(u)
1109
1109
  ] })
1110
- ] }, w))
1110
+ ] }, y))
1111
1111
  }
1112
1112
  ),
1113
1113
  document.body
1114
1114
  );
1115
1115
  }
1116
1116
  const rn = /* @__PURE__ */ new Set(), cn = { descriptionHidden: !1, elsewhereHidden: !1, titleCut: !1, titleFloor: 0, bare: rn, primaryBare: !1, hidden: rn, primaryHidden: !1, chipsCut: !1 }, on = (n, t) => n.size === t.size && [...n].every((l) => t.has(l)), Yn = (n, t) => n.descriptionHidden === t.descriptionHidden && n.elsewhereHidden === t.elsewhereHidden && n.titleCut === t.titleCut && n.titleFloor === t.titleFloor && on(n.bare, t.bare) && n.primaryBare === t.primaryBare && on(n.hidden, t.hidden) && n.primaryHidden === t.primaryHidden && n.chipsCut === t.chipsCut, Xn = 64, $e = "primary";
1117
- function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secondary: r, more: h = [], moreLabel: o, context: f, fullWidth: g = !1 }) {
1118
- var V, Ne, be;
1119
- const [i, _] = $(null), [u, b] = $(cn), [d, w] = $(null), x = z(null), M = z(null), S = z(null), C = fe(), v = fe(), N = [
1117
+ function zt({ title: n, icon: t, description: l, meta: a = [], primary: s, secondary: r, more: h = [], moreLabel: o, context: f, fullWidth: g = !1 }) {
1118
+ var V, Ne, _e;
1119
+ const [i, b] = $(null), [u, _] = $(cn), [d, y] = $(null), x = z(null), M = z(null), S = z(null), C = fe(), v = fe(), N = [
1120
1120
  ...(r ?? []).map((m) => ({
1121
1121
  id: m.id,
1122
1122
  label: m.label,
1123
1123
  name: m.label,
1124
- icon: m.icon === void 0 ? null : Fe(m.icon),
1124
+ icon: m.icon === void 0 ? null : Be(m.icon),
1125
1125
  overflow: m.overflow,
1126
1126
  danger: m.danger === !0,
1127
1127
  offer: m.offer ?? { offered: !0, locked: !1 },
@@ -1137,7 +1137,7 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1137
1137
  offer: m.offer,
1138
1138
  run: m.onSelect
1139
1139
  }))
1140
- ].filter((m) => m.offer.offered), T = N.filter((m) => m.overflow === 0), q = N.filter((m) => m.overflow !== 0), Z = T.length === 1 ? T[0] ?? null : null, k = Jn(q), B = q.filter((m) => m.overflow === void 0).map((m) => m.id).reverse(), G = [...k, ...B.map((m) => [m])], X = [...Z !== null ? [[Z.id]] : [], ...G], H = s !== void 0 && ((V = s.offer) == null ? void 0 : V.offered) !== !1, W = (Ne = s == null ? void 0 : s.offer) == null ? void 0 : Ne.refusal, J = s !== void 0 && (((be = s.offer) == null ? void 0 : be.offered) === !1 || W !== void 0), pe = s !== void 0 && "menu" in s ? s.menu.filter((m) => m.offer.offered) : [], se = s !== void 0 && "menu" in s && pe.length > 0 ? s : null, xe = a.filter((m) => m.elsewhere === !0), ye = JSON.stringify([
1140
+ ].filter((m) => m.offer.offered), T = N.filter((m) => m.overflow === 0), q = N.filter((m) => m.overflow !== 0), Z = T.length === 1 ? T[0] ?? null : null, k = Jn(q), F = q.filter((m) => m.overflow === void 0).map((m) => m.id).reverse(), G = [...k, ...F.map((m) => [m])], X = [...Z !== null ? [[Z.id]] : [], ...G], H = s !== void 0 && ((V = s.offer) == null ? void 0 : V.offered) !== !1, W = (Ne = s == null ? void 0 : s.offer) == null ? void 0 : Ne.refusal, J = s !== void 0 && (((_e = s.offer) == null ? void 0 : _e.offered) === !1 || W !== void 0), pe = s !== void 0 && "menu" in s ? s.menu.filter((m) => m.offer.offered) : [], se = s !== void 0 && "menu" in s && pe.length > 0 ? s : null, xe = a.filter((m) => m.elsewhere === !0), we = JSON.stringify([
1141
1141
  n,
1142
1142
  t ?? null,
1143
1143
  l ?? null,
@@ -1148,18 +1148,18 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1148
1148
  const m = x.current, U = M.current;
1149
1149
  if (m === null || U === null) return;
1150
1150
  const P = getComputedStyle(m), he = parseFloat(P.columnGap || "0") || 0, Ce = m.clientWidth - (parseFloat(P.paddingLeft) || 0) - (parseFloat(P.paddingRight) || 0), de = (Y) => {
1151
- var _e;
1152
- return ((_e = U.querySelector(Y)) == null ? void 0 : _e.getBoundingClientRect().width) ?? 0;
1151
+ var be;
1152
+ return ((be = U.querySelector(Y)) == null ? void 0 : be.getBoundingClientRect().width) ?? 0;
1153
1153
  }, ke = de('[data-measure="title"]'), He = Math.min(ke, Xn), j = (Y) => {
1154
- const _e = ge(Y), ve = [];
1154
+ const be = ge(Y), ve = [];
1155
1155
  t !== void 0 && ve.push(de('[data-measure="lead"]')), ve.push(Y.titleCut ? He : ke), l !== void 0 && !Y.descriptionHidden && ve.push(de('[data-measure="description"]'));
1156
1156
  for (const le of a) le.elsewhere === !0 && Y.elsewhereHidden || ve.push(de(`[data-measure="meta"][data-measure-id="${CSS.escape(le.id)}"]`));
1157
1157
  for (const le of N) {
1158
- if (_e.has(le.id)) continue;
1159
- const we = Y.bare.has(le.id) && le.icon !== null;
1160
- ve.push(de(`[data-measure="${we ? "icon" : "full"}"][data-measure-id="${CSS.escape(le.id)}"]`));
1158
+ if (be.has(le.id)) continue;
1159
+ const ye = Y.bare.has(le.id) && le.icon !== null;
1160
+ ve.push(de(`[data-measure="${ye ? "icon" : "full"}"][data-measure-id="${CSS.escape(le.id)}"]`));
1161
1161
  }
1162
- return H && !Y.primaryHidden && ve.push(de(`[data-measure="${Y.primaryBare ? "primary-icon" : "primary"}"]`)), _e.size > 0 && ve.push(de('[data-measure="more"]')), ve.reduce((le, we) => le + we, 0) + he * Math.max(0, ve.length - 1);
1162
+ return H && !Y.primaryHidden && ve.push(de(`[data-measure="${Y.primaryBare ? "primary-icon" : "primary"}"]`)), be.size > 0 && ve.push(de('[data-measure="more"]')), ve.reduce((le, ye) => le + ye, 0) + he * Math.max(0, ve.length - 1);
1163
1163
  };
1164
1164
  let R = { ...cn, titleFloor: He };
1165
1165
  const oe = (Y) => (R = Y, j(Y) <= Ce), Ee = (() => {
@@ -1172,17 +1172,17 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1172
1172
  }
1173
1173
  if (H && oe({ ...R, primaryBare: !0 })) return R;
1174
1174
  R = { ...R, primaryBare: H };
1175
- const _e = /* @__PURE__ */ new Set(), ve = [...G, ...H ? [[$e]] : []], le = () => _e.size + T.length >= 2, we = (Re) => ({ ...R, hidden: new Set([...Re].filter((Oe) => Oe !== $e)), primaryHidden: Re.has($e) }), tn = R;
1175
+ const be = /* @__PURE__ */ new Set(), ve = [...G, ...H ? [[$e]] : []], le = () => be.size + T.length >= 2, ye = (Re) => ({ ...R, hidden: new Set([...Re].filter((Oe) => Oe !== $e)), primaryHidden: Re.has($e) }), tn = R;
1176
1176
  for (const Re of ve) {
1177
- for (const Oe of Re) _e.add(Oe);
1178
- if (le() && oe(we(_e))) return R;
1177
+ for (const Oe of Re) be.add(Oe);
1178
+ if (le() && oe(ye(be))) return R;
1179
1179
  R = tn;
1180
1180
  }
1181
- const ln = le() ? we(_e) : tn;
1181
+ const ln = le() ? ye(be) : tn;
1182
1182
  return oe({ ...ln, titleCut: !0 }) ? R : { ...ln, titleCut: !0, chipsCut: !0 };
1183
1183
  })();
1184
- b((Y) => Yn(Y, Ee) ? Y : Ee);
1185
- }, [ye]);
1184
+ _((Y) => Yn(Y, Ee) ? Y : Ee);
1185
+ }, [we]);
1186
1186
  De(ae, [ae]), ee(() => {
1187
1187
  const m = x.current;
1188
1188
  if (m === null || typeof ResizeObserver > "u") return;
@@ -1203,13 +1203,13 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1203
1203
  const U = m.hidden.size + (m.primaryHidden ? 1 : 0);
1204
1204
  return /* @__PURE__ */ new Set([...T.filter((P) => P !== Z || U > 0).map((P) => P.id), ...m.hidden, ...m.primaryHidden ? [$e] : []]);
1205
1205
  }
1206
- const re = ge(u), ue = N.filter((m) => !re.has(m.id) && m !== Z), me = Z !== null && !re.has(Z.id) ? Z : null, te = H && !u.primaryHidden, Se = (m) => N.find((U) => U.id === m), ie = G.flat().filter((m) => u.hidden.has(m)).map(Se).filter((m) => m !== void 0), Me = (m) => ({ id: m.id, label: m.label, offer: m.offer, ...m.danger ? { danger: !0 } : {}, onSelect: m.run }), y = [
1206
+ const re = ge(u), ue = N.filter((m) => !re.has(m.id) && m !== Z), me = Z !== null && !re.has(Z.id) ? Z : null, te = H && !u.primaryHidden, Se = (m) => N.find((U) => U.id === m), ie = G.flat().filter((m) => u.hidden.has(m)).map(Se).filter((m) => m !== void 0), Me = (m) => ({ id: m.id, label: m.label, offer: m.offer, ...m.danger ? { danger: !0 } : {}, onSelect: m.run }), w = [
1207
1207
  ...H && u.primaryHidden ? [{ id: $e, label: s.label, offer: s.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
1208
1208
  J || s.onPress();
1209
1209
  } }, ...pe] : [],
1210
1210
  ...ie.map(Me),
1211
1211
  ...re.size > 0 ? T.map(Me) : []
1212
- ], E = y.length > 0, O = [
1212
+ ], E = w.length > 0, O = [
1213
1213
  ...ue.map((m) => m.id),
1214
1214
  ...me !== null ? [me.id] : [],
1215
1215
  ...te ? [$e, ...se !== null ? ["primary-menu"] : []] : [],
@@ -1217,7 +1217,7 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1217
1217
  ], Q = d !== null && O.includes(d) ? d : O[0] ?? null;
1218
1218
  ee(() => {
1219
1219
  var m, U;
1220
- d === null || O.includes(d) || !E || ((m = x.current) != null && m.contains(document.activeElement) || document.activeElement === document.body) && (w("more"), (U = S.current) == null || U.focus());
1220
+ d === null || O.includes(d) || !E || ((m = x.current) != null && m.contains(document.activeElement) || document.activeElement === document.body) && (y("more"), (U = S.current) == null || U.focus());
1221
1221
  }, [u]);
1222
1222
  const p = (m) => `${v}-${m}`, I = (m) => {
1223
1223
  var Ce;
@@ -1226,17 +1226,17 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1226
1226
  if (m.key === "ArrowRight" ? P = Math.min(O.length - 1, U + 1) : m.key === "ArrowLeft" ? P = Math.max(0, U - 1) : m.key === "Home" ? P = 0 : m.key === "End" && (P = O.length - 1), P === null) return;
1227
1227
  m.preventDefault();
1228
1228
  const he = O[P] ?? null;
1229
- w(he), he !== null && ((Ce = document.getElementById(p(he))) == null || Ce.focus());
1229
+ y(he), he !== null && ((Ce = document.getElementById(p(he))) == null || Ce.focus());
1230
1230
  }, K = (m, U) => {
1231
1231
  const P = U.getBoundingClientRect();
1232
- _((i == null ? void 0 : i.which) === m ? null : { which: m, x: P.left, y: P.bottom + 4 });
1233
- }, ce = (m) => ({ id: p(m), tabIndex: Q === m ? 0 : -1, onFocus: () => w(m) }), A = (m) => {
1232
+ b((i == null ? void 0 : i.which) === m ? null : { which: m, x: P.left, y: P.bottom + 4 });
1233
+ }, ce = (m) => ({ id: p(m), tabIndex: Q === m ? 0 : -1, onFocus: () => y(m) }), A = (m) => {
1234
1234
  const U = u.bare.has(m.id) && m.icon !== null, P = m.offer.refusal, he = `${v}-reason-${m.id}`;
1235
1235
  return /* @__PURE__ */ c(
1236
1236
  "button",
1237
1237
  {
1238
1238
  type: "button",
1239
- className: F("cms-button", "cms-button--quiet", "cms-section-header__secondary", U && "cms-section-header__secondary--bare", m.danger && "is-danger"),
1239
+ className: B("cms-button", "cms-button--quiet", "cms-section-header__secondary", U && "cms-section-header__secondary--bare", m.danger && "is-danger"),
1240
1240
  "data-action": m.id,
1241
1241
  "aria-label": U ? m.name : void 0,
1242
1242
  "aria-disabled": P !== void 0 ? "true" : void 0,
@@ -1255,8 +1255,8 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1255
1255
  m.id
1256
1256
  );
1257
1257
  };
1258
- return /* @__PURE__ */ c("header", { className: F("cms-section-header", g && "cms-section-header--full"), children: [
1259
- /* @__PURE__ */ c("div", { ref: x, className: F("cms-section-header__row", u.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1258
+ return /* @__PURE__ */ c("header", { className: B("cms-section-header", g && "cms-section-header--full"), children: [
1259
+ /* @__PURE__ */ c("div", { ref: x, className: B("cms-section-header__row", u.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1260
1260
  t !== void 0 ? /* @__PURE__ */ e(L, { name: t }) : null,
1261
1261
  /* @__PURE__ */ e(
1262
1262
  "h1",
@@ -1267,7 +1267,7 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1267
1267
  children: n
1268
1268
  }
1269
1269
  ),
1270
- l !== void 0 ? /* @__PURE__ */ e("span", { className: F("cms-section-header__description", u.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1270
+ l !== void 0 ? /* @__PURE__ */ e("span", { className: B("cms-section-header__description", u.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1271
1271
  a.map((m, U) => /* @__PURE__ */ e(
1272
1272
  "span",
1273
1273
  {
@@ -1283,12 +1283,12 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1283
1283
  /* @__PURE__ */ c("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": n, onKeyDown: I, children: [
1284
1284
  ue.map(A),
1285
1285
  me !== null ? A(me) : null,
1286
- te ? /* @__PURE__ */ c("span", { className: F("cms-section-header__primary", se !== null && "cms-section-header__primary--split"), children: [
1286
+ te ? /* @__PURE__ */ c("span", { className: B("cms-section-header__primary", se !== null && "cms-section-header__primary--split"), children: [
1287
1287
  /* @__PURE__ */ c(
1288
1288
  "button",
1289
1289
  {
1290
1290
  type: "button",
1291
- className: F("cms-button", "cms-button--primary", u.primaryBare && "cms-section-header__primary--bare"),
1291
+ className: B("cms-button", "cms-button--primary", u.primaryBare && "cms-section-header__primary--bare"),
1292
1292
  "data-action": "primary",
1293
1293
  "aria-label": u.primaryBare ? s.label : void 0,
1294
1294
  "aria-disabled": J ? "true" : void 0,
@@ -1370,8 +1370,8 @@ function Ot({ title: n, icon: t, description: l, meta: a = [], primary: s, secon
1370
1370
  ] })
1371
1371
  ] }),
1372
1372
  f != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: f }) : null,
1373
- se !== null ? /* @__PURE__ */ e(Be, { at: (i == null ? void 0 : i.which) === "primary" ? i : null, items: pe, onClose: () => _(null), label: se.menuLabel }) : null,
1374
- /* @__PURE__ */ e(Be, { at: (i == null ? void 0 : i.which) === "more" ? i : null, items: y, onClose: () => _(null), label: o })
1373
+ se !== null ? /* @__PURE__ */ e(Fe, { at: (i == null ? void 0 : i.which) === "primary" ? i : null, items: pe, onClose: () => b(null), label: se.menuLabel }) : null,
1374
+ /* @__PURE__ */ e(Fe, { at: (i == null ? void 0 : i.which) === "more" ? i : null, items: w, onClose: () => b(null), label: o })
1375
1375
  ] });
1376
1376
  }
1377
1377
  function Jn(n) {
@@ -1379,13 +1379,13 @@ function Jn(n) {
1379
1379
  for (const l of n) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
1380
1380
  return [...t.entries()].sort(([l], [a]) => l - a).map(([, l]) => l);
1381
1381
  }
1382
- function zt({ head: n, children: t, className: l, scrollRef: a, onScroll: s, bodyProps: r }) {
1383
- return /* @__PURE__ */ c("div", { className: F("cms-column", l), children: [
1382
+ function Ut({ head: n, children: t, className: l, scrollRef: a, onScroll: s, bodyProps: r }) {
1383
+ return /* @__PURE__ */ c("div", { className: B("cms-column", l), children: [
1384
1384
  n == null ? null : /* @__PURE__ */ e("div", { className: "cms-column__head", children: n }),
1385
- /* @__PURE__ */ e("div", { ...r, className: F("cms-column__body", r == null ? void 0 : r.className), ref: a, onScroll: s, children: t })
1385
+ /* @__PURE__ */ e("div", { ...r, className: B("cms-column__body", r == null ? void 0 : r.className), ref: a, onScroll: s, children: t })
1386
1386
  ] });
1387
1387
  }
1388
- function Ut({ title: n, scope: t, actions: l, backLink: a }) {
1388
+ function Kt({ title: n, scope: t, actions: l, backLink: a }) {
1389
1389
  return /* @__PURE__ */ c("header", { className: "cms-page-header", children: [
1390
1390
  a ? /* @__PURE__ */ c(
1391
1391
  "a",
@@ -1411,14 +1411,14 @@ function Ut({ title: n, scope: t, actions: l, backLink: a }) {
1411
1411
  ] })
1412
1412
  ] });
1413
1413
  }
1414
- function Kt({ tabs: n, active: t, onSelect: l, label: a }) {
1414
+ function Wt({ tabs: n, active: t, onSelect: l, label: a }) {
1415
1415
  const s = z([]), r = (h, o) => {
1416
- var _;
1416
+ var b;
1417
1417
  const f = n.length - 1, g = h.key === "ArrowRight" ? o === f ? 0 : o + 1 : h.key === "ArrowLeft" ? o === 0 ? f : o - 1 : h.key === "Home" ? 0 : h.key === "End" ? f : null;
1418
1418
  if (g === null) return;
1419
1419
  h.preventDefault();
1420
1420
  const i = n[g];
1421
- i && (l(i.id), (_ = s.current[g]) == null || _.focus());
1421
+ i && (l(i.id), (b = s.current[g]) == null || b.focus());
1422
1422
  };
1423
1423
  return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": a, children: n.map((h, o) => {
1424
1424
  const f = h.id === t;
@@ -1430,7 +1430,7 @@ function Kt({ tabs: n, active: t, onSelect: l, label: a }) {
1430
1430
  },
1431
1431
  type: "button",
1432
1432
  role: "tab",
1433
- className: F("cms-tab", f && "is-active"),
1433
+ className: B("cms-tab", f && "is-active"),
1434
1434
  "aria-selected": f,
1435
1435
  tabIndex: f ? 0 : -1,
1436
1436
  onClick: () => l(h.id),
@@ -1458,18 +1458,18 @@ function et(n) {
1458
1458
  return t % 6 + 1;
1459
1459
  }
1460
1460
  function Ue({ name: n, pictureUrl: t, presence: l, connection: a, deleted: s = !1, size: r = 32, tintSeed: h, unnamedLabel: o }) {
1461
- const f = Qn(n) || "?", g = n.trim() === "" ? (o == null ? void 0 : o.trim()) || "?" : n, i = a !== void 0 ? `is-${a.state === "offline" ? "disconnected" : a.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, _ = a !== void 0 ? `${g}, ${a.label}` : l ? `${g}, ${l}` : g;
1461
+ const f = Qn(n) || "?", g = n.trim() === "" ? (o == null ? void 0 : o.trim()) || "?" : n, i = a !== void 0 ? `is-${a.state === "offline" ? "disconnected" : a.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, b = a !== void 0 ? `${g}, ${a.label}` : l ? `${g}, ${l}` : g;
1462
1462
  return /* @__PURE__ */ c(
1463
1463
  "span",
1464
1464
  {
1465
- className: F("cms-avatar", s ? "cms-avatar--deleted" : `cms-avatar--tint-${et(h ?? n)}`),
1465
+ className: B("cms-avatar", s ? "cms-avatar--deleted" : `cms-avatar--tint-${et(h ?? n)}`),
1466
1466
  style: { width: r, height: r, fontSize: Math.round(r * 0.4) },
1467
1467
  role: "img",
1468
- "aria-label": _,
1468
+ "aria-label": b,
1469
1469
  ...a === void 0 ? {} : { title: a.label },
1470
1470
  children: [
1471
1471
  s ? /* @__PURE__ */ e(L, { name: "user", size: Math.round(r * 0.6) }) : t ? /* @__PURE__ */ e("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: f }),
1472
- i === null ? null : /* @__PURE__ */ e("span", { className: F("cms-avatar__presence", i), "aria-hidden": "true" })
1472
+ i === null ? null : /* @__PURE__ */ e("span", { className: B("cms-avatar__presence", i), "aria-hidden": "true" })
1473
1473
  ]
1474
1474
  }
1475
1475
  );
@@ -1500,25 +1500,25 @@ function lt(n) {
1500
1500
  }
1501
1501
  }
1502
1502
  function st({ storageKey: n, value: t, default: l, min: a, max: s, step: r = 16, label: h, onChange: o, className: f, style: g }) {
1503
- const i = Math.max(a, s), _ = (v) => Math.round(Math.min(Math.max(v, a), i)), [u, b] = $(() => {
1503
+ const i = Math.max(a, s), b = (v) => Math.round(Math.min(Math.max(v, a), i)), [u, _] = $(() => {
1504
1504
  const v = n === void 0 ? null : Ze(n);
1505
- return _(v ?? l);
1506
- }), d = _(t ?? u), w = z(null), [x, M] = $(!1);
1505
+ return b(v ?? l);
1506
+ }), d = b(t ?? u), y = z(null), [x, M] = $(!1);
1507
1507
  De(() => {
1508
1508
  if (n === void 0) return;
1509
1509
  const v = Ze(n);
1510
1510
  if (v === null) return;
1511
- const N = _(v);
1512
- (t === void 0 || N !== _(t)) && (b(N), o(N, !0));
1511
+ const N = b(v);
1512
+ (t === void 0 || N !== b(t)) && (_(N), o(N, !0));
1513
1513
  }, []), De(() => {
1514
- t !== void 0 && _(t) !== t && o(_(t), !0);
1514
+ t !== void 0 && b(t) !== t && o(b(t), !0);
1515
1515
  }, [t, a, i]);
1516
1516
  const S = (v, N) => {
1517
- const T = _(v);
1518
- b(T), N && tt(n, T), o(T, N);
1517
+ const T = b(v);
1518
+ _(T), N && tt(n, T), o(T, N);
1519
1519
  }, C = () => {
1520
- const v = w.current;
1521
- w.current = null, M(!1), v !== null && v.last !== v.from && S(v.last, !0);
1520
+ const v = y.current;
1521
+ y.current = null, M(!1), v !== null && v.last !== v.from && S(v.last, !0);
1522
1522
  };
1523
1523
  return /* @__PURE__ */ e(
1524
1524
  "div",
@@ -1530,25 +1530,25 @@ function st({ storageKey: n, value: t, default: l, min: a, max: s, step: r = 16,
1530
1530
  "aria-valuenow": d,
1531
1531
  "aria-valuemin": a,
1532
1532
  "aria-valuemax": i,
1533
- className: F("cms-splitter", x && "is-dragging", d <= a && "is-at-min", d >= i && "is-at-max", f),
1533
+ className: B("cms-splitter", x && "is-dragging", d <= a && "is-at-min", d >= i && "is-at-max", f),
1534
1534
  style: g,
1535
1535
  onPointerDown: (v) => {
1536
1536
  var T, q;
1537
1537
  if (v.button > 0) return;
1538
1538
  v.preventDefault(), (q = (T = v.currentTarget).setPointerCapture) == null || q.call(T, v.pointerId);
1539
1539
  const N = getComputedStyle(v.currentTarget).direction === "rtl" ? -1 : 1;
1540
- w.current = { x: v.clientX, from: d, last: d, sign: N }, M(!0);
1540
+ y.current = { x: v.clientX, from: d, last: d, sign: N }, M(!0);
1541
1541
  },
1542
1542
  onPointerMove: (v) => {
1543
- const N = w.current;
1544
- N === null || !Number.isFinite(v.clientX) || (N.last = _(N.from + N.sign * (v.clientX - N.x)), S(N.last, !1));
1543
+ const N = y.current;
1544
+ N === null || !Number.isFinite(v.clientX) || (N.last = b(N.from + N.sign * (v.clientX - N.x)), S(N.last, !1));
1545
1545
  },
1546
1546
  onPointerUp: C,
1547
1547
  onPointerCancel: C,
1548
1548
  onDoubleClick: () => {
1549
1549
  lt(n);
1550
- const v = _(l);
1551
- b(v), o(v, !0);
1550
+ const v = b(l);
1551
+ _(v), o(v, !0);
1552
1552
  },
1553
1553
  onKeyDown: (v) => {
1554
1554
  const N = v.shiftKey ? nt : r, T = getComputedStyle(v.currentTarget).direction === "rtl" ? -1 : 1, q = v.key === "ArrowLeft" ? d - T * N : v.key === "ArrowRight" ? d + T * N : v.key === "Home" ? a : v.key === "End" ? i : null;
@@ -1563,18 +1563,18 @@ function at({ count: n, label: t, max: l = 99 }) {
1563
1563
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: t })
1564
1564
  ] });
1565
1565
  }
1566
- function Wt({ product: n, mark: t, rail: l, active: a, onNavigate: s, server: r, search: h, account: o, children: f, railLabel: g = "Sections" }) {
1566
+ function Vt({ product: n, mark: t, rail: l, active: a, onNavigate: s, server: r, search: h, account: o, children: f, railLabel: g = "Sections" }) {
1567
1567
  return /* @__PURE__ */ c("div", { className: "cms-shell", children: [
1568
1568
  /* @__PURE__ */ c("nav", { className: "cms-shell__rail", "aria-label": g, children: [
1569
1569
  /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: t }),
1570
1570
  /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: l.map((i) => {
1571
- const _ = i.id === a;
1571
+ const b = i.id === a;
1572
1572
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
1573
1573
  "a",
1574
1574
  {
1575
1575
  href: i.href,
1576
- className: F("cms-shell__item", _ && "is-active"),
1577
- "aria-current": _ ? "page" : void 0,
1576
+ className: B("cms-shell__item", b && "is-active"),
1577
+ "aria-current": b ? "page" : void 0,
1578
1578
  title: i.label,
1579
1579
  onClick: (u) => {
1580
1580
  s && (u.preventDefault(), s(i.id));
@@ -1599,7 +1599,7 @@ function Wt({ product: n, mark: t, rail: l, active: a, onNavigate: s, server: r,
1599
1599
  /* @__PURE__ */ e("main", { className: "cms-shell__main", children: f })
1600
1600
  ] });
1601
1601
  }
1602
- function Vt({ label: n, placeholder: t, value: l, onChange: a, onSearch: s }) {
1602
+ function Zt({ label: n, placeholder: t, value: l, onChange: a, onSearch: s }) {
1603
1603
  return /* @__PURE__ */ c(
1604
1604
  "form",
1605
1605
  {
@@ -1634,8 +1634,8 @@ function rt(n, t, l) {
1634
1634
  }
1635
1635
  return a;
1636
1636
  }
1637
- function Zt({ panes: n, active: t, back: l, sizes: a, lastMin: s = 360, onResize: r, storageKey: h }) {
1638
- const o = Math.min(Math.max(t ?? n.length - 1, 0), n.length - 1), f = z(null), [g, i] = $(0), _ = (a ?? []).slice(0, n.length - 1), [u, b] = $(() => h === void 0 ? [] : _.map((v, N) => Ze(`${h}:${String(N)}`) ?? void 0)), [d, w] = $(!1), x = _.map((v, N) => v !== void 0 && u[N] !== void 0 ? { ...v, width: u[N] } : v), M = x.length === n.length - 1 && x.every((v) => v !== void 0);
1637
+ function qt({ panes: n, active: t, back: l, sizes: a, lastMin: s = 360, onResize: r, storageKey: h }) {
1638
+ const o = Math.min(Math.max(t ?? n.length - 1, 0), n.length - 1), f = z(null), [g, i] = $(0), b = (a ?? []).slice(0, n.length - 1), [u, _] = $(() => h === void 0 ? [] : b.map((v, N) => Ze(`${h}:${String(N)}`) ?? void 0)), [d, y] = $(!1), x = b.map((v, N) => v !== void 0 && u[N] !== void 0 ? { ...v, width: u[N] } : v), M = x.length === n.length - 1 && x.every((v) => v !== void 0);
1639
1639
  De(() => {
1640
1640
  const v = f.current;
1641
1641
  if (v === null || !M) return;
@@ -1652,7 +1652,7 @@ function Zt({ panes: n, active: t, back: l, sizes: a, lastMin: s = 360, onResize
1652
1652
  "div",
1653
1653
  {
1654
1654
  ref: f,
1655
- className: F("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", M && "cms-panes--sized", d && "is-resizing"),
1655
+ className: B("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", M && "cms-panes--sized", d && "is-resizing"),
1656
1656
  "data-active": o,
1657
1657
  style: C,
1658
1658
  children: [
@@ -1664,7 +1664,7 @@ function Zt({ panes: n, active: t, back: l, sizes: a, lastMin: s = 360, onResize
1664
1664
  v.content
1665
1665
  ] }, v.label)),
1666
1666
  M ? x.map((v, N) => {
1667
- const T = S.reduce((Z, k, B) => B === N ? Z : Z + k, 0), q = Math.max(v.min, Math.min(v.max, g > 0 ? g - T - s : v.max));
1667
+ const T = S.reduce((Z, k, F) => F === N ? Z : Z + k, 0), q = Math.max(v.min, Math.min(v.max, g > 0 ? g - T - s : v.max));
1668
1668
  return /* @__PURE__ */ e(
1669
1669
  st,
1670
1670
  {
@@ -1677,10 +1677,10 @@ function Zt({ panes: n, active: t, back: l, sizes: a, lastMin: s = 360, onResize
1677
1677
  className: "cms-panes__splitter",
1678
1678
  style: { "--split-at": `var(--split-pane-end-${String(N)})` },
1679
1679
  onChange: (Z, k) => {
1680
- h !== void 0 && b((B) => {
1681
- const G = [...B];
1680
+ h !== void 0 && _((F) => {
1681
+ const G = [...F];
1682
1682
  return G[N] = Z, G;
1683
- }), w(!k), r == null || r(N, Z, k);
1683
+ }), y(!k), r == null || r(N, Z, k);
1684
1684
  }
1685
1685
  },
1686
1686
  v.label
@@ -1691,9 +1691,9 @@ function Zt({ panes: n, active: t, back: l, sizes: a, lastMin: s = 360, onResize
1691
1691
  );
1692
1692
  }
1693
1693
  const it = { attachment: "Has an attachment", unread: "Unread" };
1694
- function qt({ from: n, subject: t, preview: l, time: a, unread: s, hasAttachment: r, selected: h, onOpen: o, check: f, selecting: g, labels: i }) {
1695
- const _ = Pe(it, i), u = /* @__PURE__ */ e(Ue, { name: n, size: 40 });
1696
- return /* @__PURE__ */ c("div", { className: F("cms-mail-row", s && "is-unread", h && "is-selected", g && "is-selecting", (f == null ? void 0 : f.checked) && "is-checked"), children: [
1694
+ function Gt({ from: n, subject: t, preview: l, time: a, unread: s, hasAttachment: r, selected: h, onOpen: o, check: f, selecting: g, labels: i }) {
1695
+ const b = Pe(it, i), u = /* @__PURE__ */ e(Ue, { name: n, size: 40 });
1696
+ return /* @__PURE__ */ c("div", { className: B("cms-mail-row", s && "is-unread", h && "is-selected", g && "is-selecting", (f == null ? void 0 : f.checked) && "is-checked"), children: [
1697
1697
  f !== void 0 ? /* @__PURE__ */ c("span", { className: "cms-mail-row__lead", children: [
1698
1698
  u,
1699
1699
  /* @__PURE__ */ e(
@@ -1708,12 +1708,12 @@ function qt({ from: n, subject: t, preview: l, time: a, unread: s, hasAttachment
1708
1708
  "aria-label": f.label,
1709
1709
  onChange: () => {
1710
1710
  },
1711
- onClick: (b) => {
1712
- if (b.stopPropagation(), f.pending) {
1713
- b.preventDefault();
1711
+ onClick: (_) => {
1712
+ if (_.stopPropagation(), f.pending) {
1713
+ _.preventDefault();
1714
1714
  return;
1715
1715
  }
1716
- f.onCheck({ shift: b.shiftKey, toggle: b.ctrlKey || b.metaKey });
1716
+ f.onCheck({ shift: _.shiftKey, toggle: _.ctrlKey || _.metaKey });
1717
1717
  }
1718
1718
  }
1719
1719
  )
@@ -1730,12 +1730,12 @@ function qt({ from: n, subject: t, preview: l, time: a, unread: s, hasAttachment
1730
1730
  /* @__PURE__ */ c("span", { className: "cms-mail-row__body", children: [
1731
1731
  /* @__PURE__ */ c("span", { className: "cms-mail-row__line", children: [
1732
1732
  /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1733
- r ? /* @__PURE__ */ e(L, { name: "paperclip", size: 16, label: _.attachment }) : null,
1733
+ r ? /* @__PURE__ */ e(L, { name: "paperclip", size: 16, label: b.attachment }) : null,
1734
1734
  /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: a })
1735
1735
  ] }),
1736
1736
  /* @__PURE__ */ c("span", { className: "cms-mail-row__line", children: [
1737
1737
  /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: t }),
1738
- s ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": _.unread }) : null
1738
+ s ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": b.unread }) : null
1739
1739
  ] }),
1740
1740
  /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: l })
1741
1741
  ] })
@@ -1744,8 +1744,8 @@ function qt({ from: n, subject: t, preview: l, time: a, unread: s, hasAttachment
1744
1744
  )
1745
1745
  ] });
1746
1746
  }
1747
- function Gt({ direction: n, children: t, time: l, read: a, readLabel: s = "Read" }) {
1748
- return /* @__PURE__ */ c("div", { className: F("cms-bubble", `cms-bubble--${n}`), children: [
1747
+ function jt({ direction: n, children: t, time: l, read: a, readLabel: s = "Read" }) {
1748
+ return /* @__PURE__ */ c("div", { className: B("cms-bubble", `cms-bubble--${n}`), children: [
1749
1749
  /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: t }),
1750
1750
  /* @__PURE__ */ c("div", { className: "cms-bubble__meta", children: [
1751
1751
  l,
@@ -1756,24 +1756,24 @@ function Gt({ direction: n, children: t, time: l, read: a, readLabel: s = "Read"
1756
1756
  ] })
1757
1757
  ] });
1758
1758
  }
1759
- function jt({ label: n, value: t, onChange: l, onSend: a, onAttach: s, placeholder: r, variant: h = "chat", sendLabel: o = "Send", attachLabel: f = "Attach a file", leading: g, canSend: i }) {
1760
- const _ = fe(), u = i ?? t.trim() !== "", b = (w) => {
1761
- w.preventDefault(), u && a();
1759
+ function Yt({ label: n, value: t, onChange: l, onSend: a, onAttach: s, placeholder: r, variant: h = "chat", sendLabel: o = "Send", attachLabel: f = "Attach a file", leading: g, canSend: i }) {
1760
+ const b = fe(), u = i ?? t.trim() !== "", _ = (y) => {
1761
+ y.preventDefault(), u && a();
1762
1762
  }, d = s ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": f, onClick: s, children: /* @__PURE__ */ e(L, { name: "paperclip" }) }) : null;
1763
- return /* @__PURE__ */ c("form", { className: F("cms-composer", `cms-composer--${h}`), onSubmit: b, children: [
1764
- /* @__PURE__ */ e("label", { htmlFor: _, className: h === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1763
+ return /* @__PURE__ */ c("form", { className: B("cms-composer", `cms-composer--${h}`), onSubmit: _, children: [
1764
+ /* @__PURE__ */ e("label", { htmlFor: b, className: h === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1765
1765
  h === "chat" ? d : null,
1766
1766
  /* @__PURE__ */ e(
1767
1767
  "textarea",
1768
1768
  {
1769
- id: _,
1769
+ id: b,
1770
1770
  className: "cms-composer__input",
1771
1771
  rows: h === "reply" ? 3 : 1,
1772
1772
  placeholder: r,
1773
1773
  value: t,
1774
- onChange: (w) => l(w.target.value),
1775
- onKeyDown: (w) => {
1776
- w.nativeEvent.isComposing || w.keyCode === 229 || h === "chat" && w.key === "Enter" && !w.shiftKey && (w.preventDefault(), u && a());
1774
+ onChange: (y) => l(y.target.value),
1775
+ onKeyDown: (y) => {
1776
+ y.nativeEvent.isComposing || y.keyCode === 229 || h === "chat" && y.key === "Enter" && !y.shiftKey && (y.preventDefault(), u && a());
1777
1777
  }
1778
1778
  }
1779
1779
  ),
@@ -1807,7 +1807,7 @@ const Qe = {
1807
1807
  onCallWith: (n) => `On a call with ${n}`,
1808
1808
  returnToCall: "Return to call"
1809
1809
  };
1810
- function Yt({ name: n, media: t, onAccept: l, onDecline: a, labels: s }) {
1810
+ function Xt({ name: n, media: t, onAccept: l, onDecline: a, labels: s }) {
1811
1811
  const r = Pe(Qe, s), h = t === "video" ? r.incomingVideo : r.incomingAudio;
1812
1812
  return /* @__PURE__ */ c("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": r.incomingFrom(h, n), children: [
1813
1813
  /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(Ue, { name: n, size: 112 }) }),
@@ -1824,7 +1824,7 @@ function Ie({ icon: n, label: t, onClick: l, tone: a = "plain", pressed: s }) {
1824
1824
  "button",
1825
1825
  {
1826
1826
  type: "button",
1827
- className: F("cms-call-button", `cms-call-button--${a}`, s && "is-pressed"),
1827
+ className: B("cms-call-button", `cms-call-button--${a}`, s && "is-pressed"),
1828
1828
  "aria-pressed": s,
1829
1829
  onClick: l,
1830
1830
  children: [
@@ -1834,8 +1834,8 @@ function Ie({ icon: n, label: t, onClick: l, tone: a = "plain", pressed: s }) {
1834
1834
  }
1835
1835
  );
1836
1836
  }
1837
- function Xt({ name: n, duration: t, connection: l, you: a, muted: s, speaker: r, onToggleMute: h, onToggleSpeaker: o, onAddPerson: f, onChat: g, onHangUp: i, labels: _ }) {
1838
- const u = Pe(Qe, _);
1837
+ function Jt({ name: n, duration: t, connection: l, you: a, muted: s, speaker: r, onToggleMute: h, onToggleSpeaker: o, onAddPerson: f, onChat: g, onHangUp: i, labels: b }) {
1838
+ const u = Pe(Qe, b);
1839
1839
  return /* @__PURE__ */ c("section", { className: "cms-call-panel", "aria-label": u.callWith(n), children: [
1840
1840
  /* @__PURE__ */ c("div", { className: "cms-call-panel__head", children: [
1841
1841
  /* @__PURE__ */ e(Ue, { name: n, size: 64 }),
@@ -1843,7 +1843,7 @@ function Xt({ name: n, duration: t, connection: l, you: a, muted: s, speaker: r,
1843
1843
  /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1844
1844
  /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": u.callTime(t), children: t })
1845
1845
  ] }),
1846
- /* @__PURE__ */ e("span", { className: F("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? u.goodConnection : u.poorConnection })
1846
+ /* @__PURE__ */ e("span", { className: B("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? u.goodConnection : u.poorConnection })
1847
1847
  ] }),
1848
1848
  /* @__PURE__ */ c("div", { className: "cms-call-panel__you", children: [
1849
1849
  /* @__PURE__ */ e(Ue, { name: a.name, size: 36 }),
@@ -1859,7 +1859,7 @@ function Xt({ name: n, duration: t, connection: l, you: a, muted: s, speaker: r,
1859
1859
  ] })
1860
1860
  ] });
1861
1861
  }
1862
- function Jt({ name: n, duration: t, muted: l, onToggleMute: a, onReturn: s, onHangUp: r, labels: h }) {
1862
+ function Qt({ name: n, duration: t, muted: l, onToggleMute: a, onReturn: s, onHangUp: r, labels: h }) {
1863
1863
  const o = Pe(Qe, h);
1864
1864
  return /* @__PURE__ */ c("section", { className: "cms-call-bar", "aria-label": o.callWith(n), children: [
1865
1865
  /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
@@ -1872,7 +1872,7 @@ function Jt({ name: n, duration: t, muted: l, onToggleMute: a, onReturn: s, onHa
1872
1872
  ] })
1873
1873
  ] });
1874
1874
  }
1875
- function Qt({ mark: n, product: t, headline: l, lead: a, features: s = [], children: r }) {
1875
+ function el({ mark: n, product: t, headline: l, lead: a, features: s = [], children: r }) {
1876
1876
  return /* @__PURE__ */ c("div", { className: "cms-signin", children: [
1877
1877
  /* @__PURE__ */ c("aside", { className: "cms-signin__brand", children: [
1878
1878
  /* @__PURE__ */ c("p", { className: "cms-signin__logo", children: [
@@ -1903,10 +1903,10 @@ const ct = {
1903
1903
  newHere: "New here?",
1904
1904
  create: "Create an account"
1905
1905
  };
1906
- function el({ server: n, onSubmit: t, forgotHref: l, createHref: a, error: s, busy: r, labels: h }) {
1907
- const o = Pe(ct, h), f = fe(), [g, i] = $(""), [_, u] = $(""), [b, d] = $(!1);
1906
+ function nl({ server: n, onSubmit: t, forgotHref: l, createHref: a, error: s, busy: r, labels: h }) {
1907
+ const o = Pe(ct, h), f = fe(), [g, i] = $(""), [b, u] = $(""), [_, d] = $(!1);
1908
1908
  return /* @__PURE__ */ c("form", { className: "cms-signin-form", onSubmit: (x) => {
1909
- x.preventDefault(), t(g, _);
1909
+ x.preventDefault(), t(g, b);
1910
1910
  }, "aria-describedby": s ? `${f}-error` : void 0, children: [
1911
1911
  /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: o.title }),
1912
1912
  /* @__PURE__ */ c("p", { className: "cms-signin-form__server", children: [
@@ -1934,14 +1934,14 @@ function el({ server: n, onSubmit: t, forgotHref: l, createHref: a, error: s, bu
1934
1934
  {
1935
1935
  id: `${f}-password`,
1936
1936
  className: "cms-signin-form__input",
1937
- type: b ? "text" : "password",
1937
+ type: _ ? "text" : "password",
1938
1938
  autoComplete: "current-password",
1939
- value: _,
1939
+ value: b,
1940
1940
  onChange: (x) => u(x.target.value),
1941
1941
  required: !0
1942
1942
  }
1943
1943
  ),
1944
- /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": b, onClick: () => d((x) => !x), children: b ? o.hide : o.show })
1944
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": _, onClick: () => d((x) => !x), children: _ ? o.hide : o.show })
1945
1945
  ] }),
1946
1946
  l ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: l, children: o.forgot }) : null,
1947
1947
  s ? /* @__PURE__ */ e("p", { id: `${f}-error`, className: "cms-signin-form__error", role: "alert", children: s }) : null,
@@ -1953,14 +1953,14 @@ function el({ server: n, onSubmit: t, forgotHref: l, createHref: a, error: s, bu
1953
1953
  ] });
1954
1954
  }
1955
1955
  const ot = { name: (n, t) => `${n}: ${t}` };
1956
- function bn(n) {
1956
+ function _n(n) {
1957
1957
  const t = en(n);
1958
1958
  return t === nn(n.options, n.defaultValue) ? null : t ?? null;
1959
1959
  }
1960
1960
  function en({ options: n, value: t, defaultValue: l }) {
1961
1961
  return n.find((a) => a.id === t) ?? nn(n, l);
1962
1962
  }
1963
- function _n(n) {
1963
+ function bn(n) {
1964
1964
  var t;
1965
1965
  return Pe(ot, n.labels).name(n.label, ((t = en(n)) == null ? void 0 : t.label) ?? "");
1966
1966
  }
@@ -1987,22 +1987,22 @@ function gn(n) {
1987
1987
  s === null ? t.current = null : t.current !== l && (t.current = l, n == null || n.onChange(s));
1988
1988
  }, [s, l]);
1989
1989
  }
1990
- function wn({ iconOnly: n = !1, onOpenChange: t, ...l }) {
1990
+ function yn({ iconOnly: n = !1, onOpenChange: t, ...l }) {
1991
1991
  return l.options.length < 2 ? null : /* @__PURE__ */ e(dt, { ...l, iconOnly: n, onOpenChange: t });
1992
1992
  }
1993
1993
  function dt({ iconOnly: n, onOpenChange: t, ...l }) {
1994
1994
  const [a, s] = $(null), r = Le(() => s(null), []), h = z(!1), o = a !== null;
1995
1995
  ee(() => (t == null || t(o), () => t == null ? void 0 : t(!1)), [o, t]);
1996
- const f = bn(l), g = f !== null && !n, i = _n(l), _ = (u, b) => {
1996
+ const f = _n(l), g = f !== null && !n, i = bn(l), b = (u, _) => {
1997
1997
  const d = u.getBoundingClientRect();
1998
- s({ x: d.left, y: d.bottom + 4, focus: b });
1998
+ s({ x: d.left, y: d.bottom + 4, focus: _ });
1999
1999
  };
2000
2000
  return /* @__PURE__ */ c(D, { children: [
2001
2001
  /* @__PURE__ */ e(
2002
2002
  "button",
2003
2003
  {
2004
2004
  type: "button",
2005
- className: F("cms-filter-menu", f !== null && "cms-filter-menu--active", g && "cms-filter-menu--named"),
2005
+ className: B("cms-filter-menu", f !== null && "cms-filter-menu--active", g && "cms-filter-menu--named"),
2006
2006
  "aria-haspopup": "menu",
2007
2007
  "aria-expanded": o,
2008
2008
  "aria-label": i,
@@ -2011,10 +2011,10 @@ function dt({ iconOnly: n, onOpenChange: t, ...l }) {
2011
2011
  h.current = o;
2012
2012
  },
2013
2013
  onClick: (u) => {
2014
- o || h.current ? r() : _(u.currentTarget, "current"), h.current = !1;
2014
+ o || h.current ? r() : b(u.currentTarget, "current"), h.current = !1;
2015
2015
  },
2016
2016
  onKeyDown: (u) => {
2017
- h.current = !1, (u.key === "ArrowDown" || u.key === "ArrowUp") && (u.preventDefault(), _(u.currentTarget, u.key === "ArrowUp" ? "last" : "current"));
2017
+ h.current = !1, (u.key === "ArrowDown" || u.key === "ArrowUp") && (u.preventDefault(), b(u.currentTarget, u.key === "ArrowUp" ? "last" : "current"));
2018
2018
  },
2019
2019
  children: g ? /* @__PURE__ */ c(D, { children: [
2020
2020
  /* @__PURE__ */ e("span", { className: "cms-filter-menu__choice", children: f.label }),
@@ -2023,7 +2023,7 @@ function dt({ iconOnly: n, onOpenChange: t, ...l }) {
2023
2023
  }
2024
2024
  ),
2025
2025
  /* @__PURE__ */ e(
2026
- Be,
2026
+ Fe,
2027
2027
  {
2028
2028
  at: a,
2029
2029
  items: vn(l),
@@ -2035,9 +2035,9 @@ function dt({ iconOnly: n, onOpenChange: t, ...l }) {
2035
2035
  ] });
2036
2036
  }
2037
2037
  function ut(n) {
2038
- return gn(n), /* @__PURE__ */ e(wn, { ...n });
2038
+ return gn(n), /* @__PURE__ */ e(yn, { ...n });
2039
2039
  }
2040
- function nl({ leading: n, name: t, filter: l }) {
2040
+ function tl({ leading: n, name: t, filter: l }) {
2041
2041
  return /* @__PURE__ */ c("div", { className: "cms-list-head", children: [
2042
2042
  n != null ? /* @__PURE__ */ e("span", { className: "cms-list-head__leading", children: n }) : null,
2043
2043
  /* @__PURE__ */ e("h2", { className: "cms-list-head__name", title: t, children: t }),
@@ -2055,18 +2055,18 @@ function ht(n) {
2055
2055
  for (const l of n) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
2056
2056
  return [...t.entries()].sort(([l], [a]) => l - a).map(([, l]) => l);
2057
2057
  }
2058
- function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leading: r }) {
2058
+ function ll({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leading: r }) {
2059
2059
  var Q;
2060
- const h = t.filter((p) => p.entries === void 0 || p.entries.length > 0), o = z(null), f = z(null), g = z(null), [i, _] = $(dn), [u, b] = $(null), [d, w] = $("first"), [x, M] = $(null), [S, C] = $(null), v = mt(h), N = v.flat(), T = ((Q = N.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : Q.id) ?? null, q = ht(h.filter((p) => p.id !== T)), Z = N.filter((p) => p.overflow === 0), k = N.filter((p) => p.overflow !== 0), B = Z.length === 1 ? Z[0] ?? null : null, G = JSON.stringify([h.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), a ?? "", r !== void 0]), X = (p) => /* @__PURE__ */ new Set([...Z.filter((I) => I !== B || p.size > 0).map((I) => I.id), ...p]), H = Le(() => {
2060
+ const h = t.filter((p) => p.entries === void 0 || p.entries.length > 0), o = z(null), f = z(null), g = z(null), [i, b] = $(dn), [u, _] = $(null), [d, y] = $("first"), [x, M] = $(null), [S, C] = $(null), v = mt(h), N = v.flat(), T = ((Q = N.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : Q.id) ?? null, q = ht(h.filter((p) => p.id !== T)), Z = N.filter((p) => p.overflow === 0), k = N.filter((p) => p.overflow !== 0), F = Z.length === 1 ? Z[0] ?? null : null, G = JSON.stringify([h.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), a ?? "", r !== void 0]), X = (p) => /* @__PURE__ */ new Set([...Z.filter((I) => I !== F || p.size > 0).map((I) => I.id), ...p]), H = Le(() => {
2061
2061
  const p = o.current, I = f.current;
2062
2062
  if (p === null || I === null) return;
2063
2063
  const K = getComputedStyle(p), ce = parseFloat(K.columnGap || "0") || 0, A = p.clientWidth - (parseFloat(K.paddingLeft) || 0) - (parseFloat(K.paddingRight) || 0), V = (j) => {
2064
2064
  var R;
2065
2065
  return ((R = I.querySelector(j)) == null ? void 0 : R.getBoundingClientRect().width) ?? 0;
2066
- }, Ne = V('[data-measure="leading"]'), be = V('[data-measure="separator"]'), m = V('[data-measure="more"]'), U = (j, R) => V(`[data-measure="${R ? "full" : "icon"}"][data-measure-action="${CSS.escape(j)}"]`), P = (j, R) => {
2067
- const oe = X(R), Ee = B !== null && !oe.has(B.id) ? B : null, Y = v.map((le) => le.filter((we) => !oe.has(we.id) && we !== Ee)).filter((le) => le.length > 0), _e = [...Y.flat(), ...Ee !== null ? [Ee] : []], ve = _e.length + (Y.length - 1) + (oe.size > 0 ? 1 : 0) + (Ne > 0 ? 1 : 0);
2068
- return Ne + _e.reduce((le, we) => le + U(we.id, !j.has(we.id)), 0) + be * Math.max(0, Y.length - 1) + (oe.size > 0 ? m : 0) + ce * Math.max(0, ve - 1);
2069
- }, he = k.filter((j) => j.id !== T && !q.some((R) => R.includes(j.id))).map((j) => j.id), Ce = [...q, ...[...he].reverse().map((j) => [j]), ...T !== null ? [[T]] : []], de = [...B !== null ? [[B.id]] : [], ...Ce];
2066
+ }, Ne = V('[data-measure="leading"]'), _e = V('[data-measure="separator"]'), m = V('[data-measure="more"]'), U = (j, R) => V(`[data-measure="${R ? "full" : "icon"}"][data-measure-action="${CSS.escape(j)}"]`), P = (j, R) => {
2067
+ const oe = X(R), Ee = F !== null && !oe.has(F.id) ? F : null, Y = v.map((le) => le.filter((ye) => !oe.has(ye.id) && ye !== Ee)).filter((le) => le.length > 0), be = [...Y.flat(), ...Ee !== null ? [Ee] : []], ve = be.length + (Y.length - 1) + (oe.size > 0 ? 1 : 0) + (Ne > 0 ? 1 : 0);
2068
+ return Ne + be.reduce((le, ye) => le + U(ye.id, !j.has(ye.id)), 0) + _e * Math.max(0, Y.length - 1) + (oe.size > 0 ? m : 0) + ce * Math.max(0, ve - 1);
2069
+ }, he = k.filter((j) => j.id !== T && !q.some((R) => R.includes(j.id))).map((j) => j.id), Ce = [...q, ...[...he].reverse().map((j) => [j]), ...T !== null ? [[T]] : []], de = [...F !== null ? [[F.id]] : [], ...Ce];
2070
2070
  let ke = null;
2071
2071
  if (P(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= A) ke = dn;
2072
2072
  else {
@@ -2088,7 +2088,7 @@ function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leadin
2088
2088
  oe() || R.clear(), ke = { bare: j, hidden: R };
2089
2089
  }
2090
2090
  const He = ke;
2091
- _((j) => un(j.bare, He.bare) && un(j.hidden, He.hidden) ? j : He);
2091
+ b((j) => un(j.bare, He.bare) && un(j.hidden, He.hidden) ? j : He);
2092
2092
  }, [G]);
2093
2093
  De(H, [H]), ee(() => {
2094
2094
  const p = o.current;
@@ -2106,9 +2106,9 @@ function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leadin
2106
2106
  I = !1, p.removeEventListener("loadingdone", K);
2107
2107
  };
2108
2108
  }, [H]);
2109
- const W = X(i.hidden), J = B !== null && !W.has(B.id) ? B : null, pe = (p) => W.has(p.id) || p === J, xe = [...v.map((p) => p.filter((I) => !pe(I))).filter((p) => p.length > 0).flat(), ...J !== null ? [J] : []], ye = (p) => N.find((I) => I.id === p), ae = [...q.flat(), ...k.filter((p) => p.id !== T && !q.some((I) => I.includes(p.id))).map((p) => p.id).reverse()], ge = [
2110
- ...T !== null && i.hidden.has(T) ? [ye(T)] : [],
2111
- ...ae.filter((p) => i.hidden.has(p)).map(ye),
2109
+ const W = X(i.hidden), J = F !== null && !W.has(F.id) ? F : null, pe = (p) => W.has(p.id) || p === J, xe = [...v.map((p) => p.filter((I) => !pe(I))).filter((p) => p.length > 0).flat(), ...J !== null ? [J] : []], we = (p) => N.find((I) => I.id === p), ae = [...q.flat(), ...k.filter((p) => p.id !== T && !q.some((I) => I.includes(p.id))).map((p) => p.id).reverse()], ge = [
2110
+ ...T !== null && i.hidden.has(T) ? [we(T)] : [],
2111
+ ...ae.filter((p) => i.hidden.has(p)).map(we),
2112
2112
  ...W.size > 0 ? Z : []
2113
2113
  ].filter((p) => p !== void 0 && W.has(p.id)), re = new Set(k.filter((p) => !q.some((I) => I.includes(p.id))).map((p) => p.id)), ue = [...xe.map((p) => p.id), ...ge.length > 0 ? ["more"] : []], me = x !== null && ue.includes(x) ? x : ue[0] ?? null, te = (p) => {
2114
2114
  var A, V;
@@ -2134,7 +2134,7 @@ function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leadin
2134
2134
  return;
2135
2135
  }
2136
2136
  const I = (K = g.current) == null ? void 0 : K.getBoundingClientRect();
2137
- w("first"), b({ which: p.id, x: (I == null ? void 0 : I.left) ?? 0, y: (I == null ? void 0 : I.bottom) ?? 0 });
2137
+ y("first"), _({ which: p.id, x: (I == null ? void 0 : I.left) ?? 0, y: (I == null ? void 0 : I.bottom) ?? 0 });
2138
2138
  }
2139
2139
  })), ie = u === null || u.which === "more" ? void 0 : N.find((p) => p.id === u.which), Me = ((ie == null ? void 0 : ie.entries) ?? []).map((p) => ({
2140
2140
  id: p.id,
@@ -2147,10 +2147,10 @@ function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leadin
2147
2147
  onSelect: () => {
2148
2148
  p.disabled || l(p.id);
2149
2149
  }
2150
- })), y = (p, I, K) => {
2150
+ })), w = (p, I, K) => {
2151
2151
  const ce = I.getBoundingClientRect();
2152
- w(K), b({ which: p, x: ce.left, y: ce.bottom });
2153
- }, E = k.length + (B !== null ? 1 : 0), O = (p) => /* @__PURE__ */ e(
2152
+ y(K), _({ which: p, x: ce.left, y: ce.bottom });
2153
+ }, E = k.length + (F !== null ? 1 : 0), O = (p) => /* @__PURE__ */ e(
2154
2154
  ft,
2155
2155
  {
2156
2156
  action: p,
@@ -2161,7 +2161,7 @@ function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leadin
2161
2161
  tipOff: S === p.id,
2162
2162
  menuOpen: (u == null ? void 0 : u.which) === p.id,
2163
2163
  onChoose: (I, K) => {
2164
- p.entries === void 0 ? l(p.id) : (u == null ? void 0 : u.which) === p.id && K === null ? b(null) : y(p.id, I, K ?? "first");
2164
+ p.entries === void 0 ? l(p.id) : (u == null ? void 0 : u.which) === p.id && K === null ? _(null) : w(p.id, I, K ?? "first");
2165
2165
  },
2166
2166
  onFocus: () => {
2167
2167
  M(p.id), C(null);
@@ -2175,7 +2175,7 @@ function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leadin
2175
2175
  ref: o,
2176
2176
  role: "toolbar",
2177
2177
  "aria-label": n,
2178
- className: F(
2178
+ className: B(
2179
2179
  "cms-pane-toolbar",
2180
2180
  E > 0 && i.bare.size >= E && "cms-pane-toolbar--labels-hidden",
2181
2181
  i.bare.size > 0 && i.bare.size < E && "cms-pane-toolbar--labels-partly-hidden"
@@ -2205,29 +2205,29 @@ function tl({ label: n, actions: t, onAction: l, status: a, moreLabel: s, leadin
2205
2205
  tabIndex: me === "more" ? 0 : -1,
2206
2206
  onFocus: () => M("more"),
2207
2207
  onClick: (p) => {
2208
- (u == null ? void 0 : u.which) === "more" ? b(null) : y("more", p.currentTarget, "first");
2208
+ (u == null ? void 0 : u.which) === "more" ? _(null) : w("more", p.currentTarget, "first");
2209
2209
  },
2210
2210
  onKeyDown: (p) => {
2211
- (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), y("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2211
+ (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), w("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2212
2212
  },
2213
2213
  children: /* @__PURE__ */ e(L, { name: "more" })
2214
2214
  }
2215
2215
  ) : null,
2216
2216
  a !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: a, children: a }) : null,
2217
- /* @__PURE__ */ e(Be, { at: (u == null ? void 0 : u.which) === "more" ? u : null, items: Se, onClose: () => b(null), label: s, focus: d }),
2218
- /* @__PURE__ */ e(Be, { at: ie !== void 0 ? u : null, items: Me, onClose: () => b(null), label: (ie == null ? void 0 : ie.label) ?? "", focus: d }),
2217
+ /* @__PURE__ */ e(Fe, { at: (u == null ? void 0 : u.which) === "more" ? u : null, items: Se, onClose: () => _(null), label: s, focus: d }),
2218
+ /* @__PURE__ */ e(Fe, { at: ie !== void 0 ? u : null, items: Me, onClose: () => _(null), label: (ie == null ? void 0 : ie.label) ?? "", focus: d }),
2219
2219
  /* @__PURE__ */ c("div", { ref: f, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2220
2220
  r !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: r }) : null,
2221
2221
  /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
2222
2222
  /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(L, { name: "more" }) }),
2223
2223
  N.map((p) => /* @__PURE__ */ c("span", { children: [
2224
- /* @__PURE__ */ c("span", { "data-measure": "full", "data-measure-action": p.id, className: F("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2224
+ /* @__PURE__ */ c("span", { "data-measure": "full", "data-measure-action": p.id, className: B("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2225
2225
  /* @__PURE__ */ e(ze, { name: p.icon }),
2226
2226
  /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2227
2227
  p.entries !== void 0 ? /* @__PURE__ */ e(qe, {}) : null
2228
2228
  ] }),
2229
- /* @__PURE__ */ c("span", { "data-measure": "icon", "data-measure-action": p.id, className: F("cms-pane-toolbar__action", Fe(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2230
- Fe(p.icon) !== null ? /* @__PURE__ */ e(ze, { name: p.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2229
+ /* @__PURE__ */ c("span", { "data-measure": "icon", "data-measure-action": p.id, className: B("cms-pane-toolbar__action", Be(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2230
+ Be(p.icon) !== null ? /* @__PURE__ */ e(ze, { name: p.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2231
2231
  p.entries !== void 0 ? /* @__PURE__ */ e(qe, {}) : null
2232
2232
  ] })
2233
2233
  ] }, p.id))
@@ -2246,12 +2246,12 @@ function ft({ action: n, labels: t, overflowed: l, pinned: a, tabbable: s, tipOf
2246
2246
  const C = setTimeout(() => i(!0), We);
2247
2247
  return () => clearTimeout(C);
2248
2248
  }, [n.busy]);
2249
- const _ = Fe(n.icon) === null, u = t || _, b = n.disabled && n.reason ? n.reason : null, d = b ?? (u ? null : n.label), w = fe(), [x, M] = $(!1), S = n.entries !== void 0;
2249
+ const b = Be(n.icon) === null, u = t || b, _ = n.disabled && n.reason ? n.reason : null, d = _ ?? (u ? null : n.label), y = fe(), [x, M] = $(!1), S = n.entries !== void 0;
2250
2250
  return /* @__PURE__ */ c(
2251
2251
  "button",
2252
2252
  {
2253
2253
  type: "button",
2254
- className: F("cms-pane-toolbar__action", !u && "cms-pane-toolbar__action--bare", _ && "cms-pane-toolbar__action--text", S && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2254
+ className: B("cms-pane-toolbar__action", !u && "cms-pane-toolbar__action--bare", b && "cms-pane-toolbar__action--text", S && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2255
2255
  "data-action": n.id,
2256
2256
  "data-stop": n.id,
2257
2257
  ...l ? { "data-overflowed": "" } : {},
@@ -2261,22 +2261,22 @@ function ft({ action: n, labels: t, overflowed: l, pinned: a, tabbable: s, tipOf
2261
2261
  "aria-disabled": n.disabled || void 0,
2262
2262
  "aria-busy": n.busy || void 0,
2263
2263
  ...S ? { "aria-haspopup": "menu", "aria-expanded": h } : {},
2264
- ...b === null ? {} : { "aria-describedby": w },
2265
- ...x && b !== null ? { "data-reason-shown": "" } : {},
2264
+ ..._ === null ? {} : { "aria-describedby": y },
2265
+ ...x && _ !== null ? { "data-reason-shown": "" } : {},
2266
2266
  tabIndex: s ? 0 : -1,
2267
2267
  onFocus: f,
2268
2268
  onBlur: () => M(!1),
2269
2269
  onKeyDown: (C) => {
2270
- C.key === "Escape" && M(!1), S && (C.key === "ArrowDown" || C.key === "ArrowUp") && (C.preventDefault(), b !== null ? M(!0) : !n.disabled && !n.busy && o(C.currentTarget, C.key === "ArrowUp" ? "last" : "first"));
2270
+ C.key === "Escape" && M(!1), S && (C.key === "ArrowDown" || C.key === "ArrowUp") && (C.preventDefault(), _ !== null ? M(!0) : !n.disabled && !n.busy && o(C.currentTarget, C.key === "ArrowUp" ? "last" : "first"));
2271
2271
  },
2272
2272
  onClick: (C) => {
2273
- b !== null ? M(!0) : !n.disabled && !n.busy && o(C.currentTarget, null);
2273
+ _ !== null ? M(!0) : !n.disabled && !n.busy && o(C.currentTarget, null);
2274
2274
  },
2275
2275
  children: [
2276
2276
  g ? /* @__PURE__ */ e(ne, { name: "spinner" }) : /* @__PURE__ */ e(ze, { name: n.icon }),
2277
2277
  u ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
2278
2278
  S ? /* @__PURE__ */ e(qe, {}) : null,
2279
- b !== null || d !== null && !r ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: w, children: d }) : null
2279
+ _ !== null || d !== null && !r ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: y, children: d }) : null
2280
2280
  ]
2281
2281
  }
2282
2282
  );
@@ -2285,17 +2285,17 @@ function qe() {
2285
2285
  return /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(L, { name: "chevron-down", size: 14 }) });
2286
2286
  }
2287
2287
  function ze({ name: n }) {
2288
- const t = Fe(n);
2288
+ const t = Be(n);
2289
2289
  return t === null ? null : /* @__PURE__ */ e(L, { name: t, size: 18 });
2290
2290
  }
2291
- function ll({ title: n, body: t = null, time: l = null, unread: a, unreadLabel: s, expandLabel: r, collapseLabel: h, action: o = null, onRead: f, leading: g }) {
2292
- const [i, _] = $(!1), u = fe(), b = () => {
2291
+ function sl({ title: n, body: t = null, time: l = null, unread: a, unreadLabel: s, expandLabel: r, collapseLabel: h, action: o = null, onRead: f, leading: g }) {
2292
+ const [i, b] = $(!1), u = fe(), _ = () => {
2293
2293
  a && f();
2294
- }, d = (o == null ? void 0 : o.presentation) === "row" && o.onAction !== void 0, w = (o == null ? void 0 : o.presentation) === "button" && o.onAction !== void 0 ? o : null, x = () => {
2294
+ }, d = (o == null ? void 0 : o.presentation) === "row" && o.onAction !== void 0, y = (o == null ? void 0 : o.presentation) === "button" && o.onAction !== void 0 ? o : null, x = () => {
2295
2295
  var M;
2296
- b(), d && ((M = o.onAction) == null || M.call(o));
2296
+ _(), d && ((M = o.onAction) == null || M.call(o));
2297
2297
  };
2298
- return /* @__PURE__ */ c("article", { className: F("cms-notification", a && "is-unread", i && "is-expanded", d && "is-row-action"), "data-state": a ? "unread" : "read", children: [
2298
+ return /* @__PURE__ */ c("article", { className: B("cms-notification", a && "is-unread", i && "is-expanded", d && "is-row-action"), "data-state": a ? "unread" : "read", children: [
2299
2299
  /* @__PURE__ */ c(
2300
2300
  "div",
2301
2301
  {
@@ -2336,21 +2336,21 @@ function ll({ title: n, body: t = null, time: l = null, unread: a, unreadLabel:
2336
2336
  "aria-label": i ? h : r,
2337
2337
  title: i ? h : r,
2338
2338
  onClick: () => {
2339
- i || b(), _((M) => !M);
2339
+ i || _(), b((M) => !M);
2340
2340
  },
2341
2341
  children: /* @__PURE__ */ e(L, { name: "chevron-down", size: 18 })
2342
2342
  }
2343
2343
  ) : null,
2344
- w !== null ? /* @__PURE__ */ e(
2344
+ y !== null ? /* @__PURE__ */ e(
2345
2345
  "button",
2346
2346
  {
2347
2347
  type: "button",
2348
2348
  className: "cms-button cms-notification__action",
2349
2349
  onClick: () => {
2350
2350
  var M;
2351
- b(), (M = w.onAction) == null || M.call(w);
2351
+ _(), (M = y.onAction) == null || M.call(y);
2352
2352
  },
2353
- children: w.label
2353
+ children: y.label
2354
2354
  }
2355
2355
  ) : null
2356
2356
  ] });
@@ -2358,7 +2358,7 @@ function ll({ title: n, body: t = null, time: l = null, unread: a, unreadLabel:
2358
2358
  function pt(n) {
2359
2359
  return n === "allowed" || n === "elevate" || n === "denied";
2360
2360
  }
2361
- function sl(n, t) {
2361
+ function al(n, t) {
2362
2362
  if (!pt(n))
2363
2363
  return t.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 };
2364
2364
  switch (n) {
@@ -2370,39 +2370,39 @@ function sl(n, t) {
2370
2370
  return t.showRefused ? { offered: !0, locked: !1, refusal: t.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
2371
2371
  }
2372
2372
  }
2373
- function bt(n, t) {
2373
+ function _t(n, t) {
2374
2374
  if (!n) return;
2375
2375
  if (typeof n.get == "function") return n.get(t) ?? void 0;
2376
2376
  const l = n, a = Object.keys(l).find((s) => s.toLowerCase() === t.toLowerCase());
2377
2377
  return a === void 0 ? void 0 : l[a];
2378
2378
  }
2379
- function _t(n) {
2379
+ function bt(n) {
2380
2380
  if (n && typeof n == "object") {
2381
2381
  const t = n;
2382
2382
  if (typeof t.detail == "string" && t.detail !== "") return t.detail;
2383
2383
  if (typeof t.title == "string" && t.title !== "") return t.title;
2384
2384
  }
2385
2385
  }
2386
- function al(n, t, l, a) {
2386
+ function rl(n, t, l, a) {
2387
2387
  if (n !== 403) return { kind: "none" };
2388
- const s = _t(l);
2389
- return bt(t, "X-Elevation-Required") !== void 0 ? a.elevates ? { kind: "elevation-required", message: s ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: s ?? "The server refused this." };
2388
+ const s = bt(l);
2389
+ return _t(t, "X-Elevation-Required") !== void 0 ? a.elevates ? { kind: "elevation-required", message: s ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: s ?? "The server refused this." };
2390
2390
  }
2391
2391
  const Ge = "coolms-kit:reread";
2392
- function rl() {
2392
+ function il() {
2393
2393
  window.dispatchEvent(new Event(Ge));
2394
2394
  }
2395
- function il(n) {
2395
+ function cl(n) {
2396
2396
  const [t, l] = $(void 0), [a, s] = $(void 0), [r, h] = $(!0), o = z(n);
2397
2397
  o.current = n;
2398
2398
  const f = z(0), g = Le(() => {
2399
2399
  const i = ++f.current;
2400
2400
  h(!0), o.current().then(
2401
- (_) => {
2402
- i === f.current && (l(_), s(void 0), h(!1));
2401
+ (b) => {
2402
+ i === f.current && (l(b), s(void 0), h(!1));
2403
2403
  },
2404
- (_) => {
2405
- i === f.current && (s(_), h(!1));
2404
+ (b) => {
2405
+ i === f.current && (s(b), h(!1));
2406
2406
  }
2407
2407
  );
2408
2408
  }, []);
@@ -2414,7 +2414,7 @@ function il(n) {
2414
2414
  };
2415
2415
  }, [g]), { value: t, error: a, loading: r, reread: g };
2416
2416
  }
2417
- function cl(n) {
2417
+ function ol(n) {
2418
2418
  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 };
2419
2419
  }
2420
2420
  const vt = "/errors/client-update-required";
@@ -2426,11 +2426,16 @@ function gt(n, t) {
2426
2426
  }
2427
2427
  return !1;
2428
2428
  }
2429
- function ol(n) {
2429
+ function dl(n) {
2430
2430
  return n.problemType !== void 0 && n.problemType.endsWith(vt) ? !0 : n.minimumVersion !== void 0 && gt(n.version, n.minimumVersion);
2431
2431
  }
2432
- const mn = 4, wt = 48, yt = 800, Nt = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2433
- function kt(n, t) {
2432
+ const mn = 4, yt = 48;
2433
+ function wt(n, t, l) {
2434
+ const a = n.querySelector(":scope > .cms-screen__bar");
2435
+ return l <= t.scrollHeight - t.clientHeight - ((a == null ? void 0 : a.offsetHeight) ?? 0);
2436
+ }
2437
+ const Nt = 800, kt = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2438
+ function xt(n, t) {
2434
2439
  const [l, a] = $(!1);
2435
2440
  return ee(() => {
2436
2441
  const s = n.current;
@@ -2443,53 +2448,53 @@ function kt(n, t) {
2443
2448
  const f = (u) => {
2444
2449
  h = performance.now(), o = u.target;
2445
2450
  }, g = (u) => {
2446
- const b = u.target;
2447
- !(b instanceof HTMLElement && (b.isContentEditable || b.closest("input, textarea, select") !== null)) && Nt.has(u.key) && f(u);
2451
+ const _ = u.target;
2452
+ !(_ instanceof HTMLElement && (_.isContentEditable || _.closest("input, textarea, select") !== null)) && kt.has(u.key) && f(u);
2448
2453
  }, i = (u) => {
2449
- const b = u.target;
2450
- if (!(b instanceof HTMLElement)) return;
2451
- const d = b.scrollTop, w = r.get(b) ?? 0;
2452
- if (r.set(b, d), d <= 0) {
2454
+ const _ = u.target;
2455
+ if (!(_ instanceof HTMLElement)) return;
2456
+ const d = _.scrollTop, y = r.get(_) ?? 0;
2457
+ if (r.set(_, d), d <= 0) {
2453
2458
  a(!1);
2454
2459
  return;
2455
2460
  }
2456
- performance.now() - h > yt || !(o === s || o === document.body || o instanceof Node && b.contains(o)) || (d < w - mn ? a(!1) : d > w + mn && d > wt && a(!0));
2457
- }, _ = [["wheel", f], ["touchmove", f], ["pointerdown", f], ["keydown", g]];
2458
- for (const [u, b] of _) s.addEventListener(u, b, { capture: !0, passive: !0 });
2461
+ performance.now() - h > Nt || !(o === s || o === document.body || o instanceof Node && _.contains(o)) || (d < y - mn ? a(!1) : d > y + mn && d > yt && wt(s, _, d) && a(!0));
2462
+ }, b = [["wheel", f], ["touchmove", f], ["pointerdown", f], ["keydown", g]];
2463
+ for (const [u, _] of b) s.addEventListener(u, _, { capture: !0, passive: !0 });
2459
2464
  return s.addEventListener("scroll", i, { capture: !0, passive: !0 }), () => {
2460
- for (const [u, b] of _) s.removeEventListener(u, b, { capture: !0 });
2465
+ for (const [u, _] of b) s.removeEventListener(u, _, { capture: !0 });
2461
2466
  s.removeEventListener("scroll", i, { capture: !0 });
2462
2467
  };
2463
2468
  }, [n, t]), [l, a];
2464
2469
  }
2465
- const xt = 64;
2466
- function Mt({ bar: n, leading: t, gap: l, icon: a, iconGap: s, search: r, more: h, globals: o, name: f, choice: g }) {
2467
- const i = [...r ? [a] : [], a, a, ...o], _ = i.reduce((b, d) => b + d, 0) + s * (i.length - 1);
2468
- return n - (t > 0 ? t + l : 0) - l - _ + 0.01 < Math.min(xt, f) + g;
2470
+ const Mt = 64;
2471
+ function Ct({ bar: n, leading: t, gap: l, icon: a, iconGap: s, search: r, more: h, globals: o, name: f, choice: g }) {
2472
+ const i = [...r ? [a] : [], a, a, ...o], b = i.reduce((_, d) => _ + d, 0) + s * (i.length - 1);
2473
+ return n - (t > 0 ? t + l : 0) - l - b + 0.01 < Math.min(Mt, f) + g;
2469
2474
  }
2470
- function dl({ title: n, back: t, navigation: l, search: a, searching: s, more: r = [], moreLabel: h = "More actions", globals: o, filter: f, primary: g, onRefresh: i, pullText: _, barHidden: u, children: b }) {
2471
- const d = g !== void 0 && "menu" in g && !g.menu.some((A) => A.offer.offered) ? void 0 : g, w = z(null), x = z(null), [M, S] = $(!1), [C, v] = $(null), [N, T] = $(null), q = Le(() => T(null), []), Z = z(!1), k = z(null), B = z(null), G = z(null), X = r.some((A) => A.offer.offered), H = N !== null && X && s === void 0;
2475
+ function ul({ title: n, back: t, navigation: l, search: a, searching: s, more: r = [], moreLabel: h = "More actions", globals: o, filter: f, primary: g, onRefresh: i, pullText: b, barHidden: u, children: _ }) {
2476
+ const d = g !== void 0 && "menu" in g && !g.menu.some((A) => A.offer.offered) ? void 0 : g, y = z(null), x = z(null), [M, S] = $(!1), [C, v] = $(null), [N, T] = $(null), q = Le(() => T(null), []), Z = z(!1), k = z(null), F = z(null), G = z(null), X = r.some((A) => A.offer.offered), H = N !== null && X && s === void 0;
2472
2477
  gn(f);
2473
- const W = f === void 0 ? null : bn(f), [J, pe] = $(!1), se = z(!1), xe = z(!1), ye = z(null), ae = f === void 0 ? void 0 : {
2478
+ const W = f === void 0 ? null : _n(f), [J, pe] = $(!1), se = z(!1), xe = z(!1), we = z(null), ae = f === void 0 ? void 0 : {
2474
2479
  ...f,
2475
2480
  onChange: (A) => {
2476
2481
  se.current = !0, f.onChange(A);
2477
2482
  }
2478
2483
  }, ge = W === null ? "" : ` · ${W.label}`, re = f !== void 0 && f.options.length >= 2, [ue, me] = $(!1), te = re && X && ue, Se = JSON.stringify([re, X, te, a !== void 0, s !== void 0, t !== void 0, n, ge]), ie = Le(() => {
2479
- const A = k.current, V = B.current, Ne = G.current;
2484
+ const A = k.current, V = F.current, Ne = G.current;
2480
2485
  if (A === null || V === null || Ne === null || !re) return null;
2481
- const be = (de) => parseFloat(de) || 0, m = getComputedStyle(A), U = A.getBoundingClientRect().width;
2486
+ const _e = (de) => parseFloat(de) || 0, m = getComputedStyle(A), U = A.getBoundingClientRect().width;
2482
2487
  if (U === 0) return null;
2483
2488
  const P = (de) => {
2484
2489
  var ke;
2485
2490
  return ((ke = A.querySelector(`.cms-screen__ruler > [data-ruler="${de}"]`)) == null ? void 0 : ke.getBoundingClientRect().width) ?? 0;
2486
2491
  }, he = A.querySelector(".cms-screen__leading"), Ce = (a !== void 0 ? 1 : 0) + (te ? 0 : 1) + 1;
2487
- return Mt({
2488
- bar: U - be(m.paddingLeft) - be(m.paddingRight),
2489
- leading: he === null || he.childNodes.length === 0 ? 0 : be(getComputedStyle(he).minWidth),
2490
- gap: be(m.columnGap),
2492
+ return Ct({
2493
+ bar: U - _e(m.paddingLeft) - _e(m.paddingRight),
2494
+ leading: he === null || he.childNodes.length === 0 ? 0 : _e(getComputedStyle(he).minWidth),
2495
+ gap: _e(m.columnGap),
2491
2496
  icon: Ne.getBoundingClientRect().width,
2492
- iconGap: be(getComputedStyle(V).columnGap),
2497
+ iconGap: _e(getComputedStyle(V).columnGap),
2493
2498
  search: a !== void 0,
2494
2499
  more: !0,
2495
2500
  globals: Array.from(V.children).slice(Ce).map((de) => de.getBoundingClientRect().width),
@@ -2506,28 +2511,28 @@ function dl({ title: n, back: t, navigation: l, search: a, searching: s, more: r
2506
2511
  const V = ie();
2507
2512
  V !== null && me(V);
2508
2513
  });
2509
- for (const V of [k.current, B.current, ...k.current.querySelectorAll(".cms-screen__ruler > span")]) V !== null && A.observe(V);
2514
+ for (const V of [k.current, F.current, ...k.current.querySelectorAll(".cms-screen__ruler > span")]) V !== null && A.observe(V);
2510
2515
  return () => A.disconnect();
2511
2516
  }, [ie]);
2512
2517
  const Me = z(te);
2513
2518
  De(() => {
2514
- var Ne, be, m;
2519
+ var Ne, _e, m;
2515
2520
  if (Me.current === te) return;
2516
2521
  Me.current = te, T(null);
2517
2522
  const A = document.activeElement;
2518
- (A === document.body && ye.current !== null && !ye.current.isConnected || xe.current && (A === document.body || ((Ne = k.current) == null ? void 0 : Ne.contains(A)) === !0)) && ((m = te ? G.current : (be = B.current) == null ? void 0 : be.querySelector(".cms-filter-menu")) == null || m.focus()), xe.current = !1;
2523
+ (A === document.body && we.current !== null && !we.current.isConnected || xe.current && (A === document.body || ((Ne = k.current) == null ? void 0 : Ne.contains(A)) === !0)) && ((m = te ? G.current : (_e = F.current) == null ? void 0 : _e.querySelector(".cms-filter-menu")) == null || m.focus()), xe.current = !1;
2519
2524
  }, [te]);
2520
- const y = te && W !== null && f !== void 0 ? `${h}, ${_n(f)}` : h, O = Gn(x, i === void 0 ? null : () => {
2525
+ const w = te && W !== null && f !== void 0 ? `${h}, ${bn(f)}` : h, O = Gn(x, i === void 0 ? null : () => {
2521
2526
  M || (S(!0), i().finally(() => S(!1)));
2522
- }), Q = i === void 0 ? null : { distance: O, refreshing: M, text: _ ?? null }, p = s !== void 0 || O > 0 || M || H || J, [I, K] = kt(w, u === void 0 && !p), ce = !p && (u ?? I);
2527
+ }), Q = i === void 0 ? null : { distance: O, refreshing: M, text: b ?? null }, p = s !== void 0 || O > 0 || M || H || J, [I, K] = xt(y, u === void 0 && !p), ce = !p && (u ?? I);
2523
2528
  return /* @__PURE__ */ c(
2524
2529
  "div",
2525
2530
  {
2526
- ref: w,
2527
- className: F("cms-screen", d !== void 0 && "cms-screen--with-primary"),
2531
+ ref: y,
2532
+ className: B("cms-screen", d !== void 0 && "cms-screen--with-primary"),
2528
2533
  "data-bar-hidden": ce ? "" : void 0,
2529
2534
  onFocus: (A) => {
2530
- ye.current = A.target, ce && A.target instanceof Element && A.target.closest(".cms-screen__bar") !== null && K(!1);
2535
+ we.current = A.target, ce && A.target instanceof Element && A.target.closest(".cms-screen__bar") !== null && K(!1);
2531
2536
  },
2532
2537
  children: [
2533
2538
  s !== void 0 ? /* @__PURE__ */ c("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
@@ -2552,20 +2557,20 @@ function dl({ title: n, back: t, navigation: l, search: a, searching: s, more: r
2552
2557
  /* @__PURE__ */ e("span", { "data-ruler": "name", children: n }),
2553
2558
  W !== null ? /* @__PURE__ */ e("span", { "data-ruler": "choice", children: ge }) : null
2554
2559
  ] }) : null,
2555
- /* @__PURE__ */ c("div", { ref: B, className: "cms-screen__trailing", children: [
2560
+ /* @__PURE__ */ c("div", { ref: F, className: "cms-screen__trailing", children: [
2556
2561
  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,
2557
- ae !== void 0 && !te ? /* @__PURE__ */ e(wn, { ...ae, iconOnly: !0, onOpenChange: pe }) : null,
2562
+ ae !== void 0 && !te ? /* @__PURE__ */ e(yn, { ...ae, iconOnly: !0, onOpenChange: pe }) : null,
2558
2563
  X ? /* @__PURE__ */ e(
2559
2564
  "button",
2560
2565
  {
2561
2566
  ref: G,
2562
2567
  type: "button",
2563
- className: F("cms-icon-button cms-screen__icon", te && W !== null && "cms-screen__icon--active"),
2568
+ className: B("cms-icon-button cms-screen__icon", te && W !== null && "cms-screen__icon--active"),
2564
2569
  "data-action": "more",
2565
2570
  "aria-haspopup": "menu",
2566
2571
  "aria-expanded": H,
2567
- "aria-label": y,
2568
- title: y,
2572
+ "aria-label": w,
2573
+ title: w,
2569
2574
  onMouseDown: () => {
2570
2575
  Z.current = H;
2571
2576
  },
@@ -2579,7 +2584,7 @@ function dl({ title: n, back: t, navigation: l, search: a, searching: s, more: r
2579
2584
  o
2580
2585
  ] })
2581
2586
  ] }),
2582
- /* @__PURE__ */ e("div", { ref: x, className: "cms-screen__content", "data-pulling": O > 0 ? "" : void 0, "data-refreshing": M ? "" : void 0, children: /* @__PURE__ */ e(pn.Provider, { value: Q, children: b }) }),
2587
+ /* @__PURE__ */ e("div", { ref: x, className: "cms-screen__content", "data-pulling": O > 0 ? "" : void 0, "data-refreshing": M ? "" : void 0, children: /* @__PURE__ */ e(pn.Provider, { value: Q, children: _ }) }),
2583
2588
  d !== void 0 ? /* @__PURE__ */ e(
2584
2589
  "button",
2585
2590
  {
@@ -2599,7 +2604,7 @@ function dl({ title: n, back: t, navigation: l, search: a, searching: s, more: r
2599
2604
  }
2600
2605
  ) : null,
2601
2606
  /* @__PURE__ */ e(
2602
- Be,
2607
+ Fe,
2603
2608
  {
2604
2609
  at: H ? N : null,
2605
2610
  items: te && ae !== void 0 ? [...r, ...vn(ae, ae.label)] : r,
@@ -2608,80 +2613,80 @@ function dl({ title: n, back: t, navigation: l, search: a, searching: s, more: r
2608
2613
  focus: "first"
2609
2614
  }
2610
2615
  ),
2611
- d !== void 0 && "menu" in d ? /* @__PURE__ */ e(Be, { at: C, items: d.menu, onClose: () => v(null), label: d.label }) : null
2616
+ d !== void 0 && "menu" in d ? /* @__PURE__ */ e(Fe, { at: C, items: d.menu, onClose: () => v(null), label: d.label }) : null
2612
2617
  ]
2613
2618
  }
2614
2619
  );
2615
2620
  }
2616
2621
  export {
2617
- Wt as AppShell,
2622
+ Vt as AppShell,
2618
2623
  Ue as Avatar,
2619
2624
  sn as BOOTSTRAP_ICONS,
2620
2625
  at as Badge,
2621
2626
  Te as Button,
2622
2627
  Qe as CALL_LABELS,
2623
2628
  vt as CLIENT_UPDATE_REQUIRED,
2624
- Jt as CallBar,
2625
- Xt as CallPanel,
2626
- Gt as ChatBubble,
2627
- zt as Column,
2628
- jt as Composer,
2629
- $t as ConfirmDialog,
2630
- Be as ContextMenu,
2629
+ Qt as CallBar,
2630
+ Jt as CallPanel,
2631
+ jt as ChatBubble,
2632
+ Ut as Column,
2633
+ Yt as Composer,
2634
+ It as ConfirmDialog,
2635
+ Fe as ContextMenu,
2631
2636
  Ln as EmptyState,
2632
2637
  Dn as ErrorBanner,
2633
2638
  ot as FILTER_MENU_LABELS,
2634
- Rt as FilePicker,
2639
+ Pt as FilePicker,
2635
2640
  Kn as FilePickerDenied,
2636
2641
  Wn as FilePickerRestart,
2637
- Ht as FileViewer,
2642
+ Rt as FileViewer,
2638
2643
  ut as FilterMenu,
2639
- Bt as ICON_NAMES,
2644
+ Ht as ICON_NAMES,
2640
2645
  L as Icon,
2641
- Yt as IncomingCall,
2642
- Pt as List,
2643
- nl as ListHead,
2646
+ Xt as IncomingCall,
2647
+ Ot as List,
2648
+ tl as ListHead,
2644
2649
  Tn as Loading,
2645
2650
  it as MAIL_ROW_LABELS,
2646
2651
  An as MODAL_CLOSE_MS,
2647
- qt as MailRow,
2652
+ Gt as MailRow,
2648
2653
  hn as Modal,
2649
2654
  In as NamedIcon,
2650
- ll as Notification,
2655
+ sl as Notification,
2651
2656
  Ve as PULL_AT,
2652
- Ut as PageHeader,
2653
- tl as PaneToolbar,
2657
+ Kt as PageHeader,
2658
+ ll as PaneToolbar,
2654
2659
  ct as SIGN_IN_LABELS,
2655
2660
  We as STATE_DELAY_MS,
2656
- dl as ScreenShell,
2657
- Vt as SearchField,
2658
- Ot as SectionHeader,
2659
- Lt as Select,
2660
- el as SignInForm,
2661
- Qt as SignInLayout,
2662
- Zt as SplitPanes,
2661
+ ul as ScreenShell,
2662
+ Zt as SearchField,
2663
+ zt as SectionHeader,
2664
+ Dt as Select,
2665
+ nl as SignInForm,
2666
+ el as SignInLayout,
2667
+ qt as SplitPanes,
2663
2668
  st as Splitter,
2664
2669
  Ae as State,
2665
- Kt as TabStrip,
2666
- Tt as TextArea,
2667
- At as TextField,
2668
- It as Toast,
2670
+ Wt as TabStrip,
2671
+ Lt as TextArea,
2672
+ Tt as TextField,
2673
+ Bt as Toast,
2669
2674
  Ft as ToastRegion,
2670
- Dt as Toggle,
2675
+ $t as Toggle,
2671
2676
  rt as fitPanes,
2672
- Fe as iconForName,
2677
+ Be as iconForName,
2673
2678
  Qn as initialsOf,
2674
2679
  pt as isCapability,
2675
- ol as needsClientUpdate,
2676
- sl as offerFor,
2677
- cl as readConflict,
2678
- al as readRefusal,
2679
- _t as refusalText,
2680
- rl as rereadAll,
2680
+ dl as needsClientUpdate,
2681
+ al as offerFor,
2682
+ ol as readConflict,
2683
+ rl as readRefusal,
2684
+ bt as refusalText,
2685
+ il as rereadAll,
2681
2686
  et as tintOf,
2682
2687
  Gn as usePull,
2683
2688
  jn as usePullState,
2684
- il as useReread,
2689
+ cl as useReread,
2685
2690
  gt as versionBelow,
2686
2691
  Sn as writtenOut
2687
2692
  };