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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -38,21 +38,21 @@ function le({
38
38
  locked: o = !1,
39
39
  lockedReason: i,
40
40
  icon: s,
41
- disabled: r,
41
+ disabled: c,
42
42
  className: a,
43
43
  children: m,
44
44
  type: _ = "button",
45
45
  title: d,
46
46
  ...h
47
47
  }) {
48
- const c = !!r || l;
48
+ const r = !!c || l;
49
49
  return /* @__PURE__ */ u(
50
50
  "button",
51
51
  {
52
52
  ...h,
53
53
  type: _,
54
54
  className: A("cms-button", `cms-button--${n}`, l && "is-busy", o && "is-locked", a),
55
- disabled: c,
55
+ disabled: r,
56
56
  "aria-busy": l || void 0,
57
57
  title: o ? i ?? d : d,
58
58
  children: [
@@ -85,26 +85,26 @@ function Se(n, l) {
85
85
  }
86
86
  const ze = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Ze = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
87
  function Ve(n, l, t) {
88
- const o = (s, r, a, m = 0, _ = 0, d = 0) => {
89
- const h = new Date(Date.UTC(s, r - 1, a, m, _, d));
90
- return h.setUTCFullYear(s), h.getUTCFullYear() === s && h.getUTCMonth() === r - 1 && h.getUTCDate() === a && h.getUTCHours() === m && h.getUTCMinutes() === _ && h.getUTCSeconds() === d ? h : null;
88
+ const o = (s, c, a, m = 0, _ = 0, d = 0) => {
89
+ const h = new Date(Date.UTC(s, c - 1, a, m, _, d));
90
+ return h.setUTCFullYear(s), h.getUTCFullYear() === s && h.getUTCMonth() === c - 1 && h.getUTCDate() === a && h.getUTCHours() === m && h.getUTCMinutes() === _ && h.getUTCSeconds() === d ? h : null;
91
91
  }, i = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
92
92
  try {
93
93
  if (n === "time") {
94
- const r = l.match(Ze);
95
- if (r === null) return l;
96
- const a = i(r), m = o(2e3, 1, 1, a.hour, a.minute, a.second);
97
- return m === null ? l : new Intl.DateTimeFormat(t, { timeStyle: r[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
94
+ const c = l.match(Ze);
95
+ if (c === null) return l;
96
+ const a = i(c), m = o(2e3, 1, 1, a.hour, a.minute, a.second);
97
+ return m === null ? l : new Intl.DateTimeFormat(t, { timeStyle: c[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
98
98
  }
99
99
  const s = l.match(ze);
100
100
  if (s === null) return l;
101
101
  if (n === "date" && s[4] === void 0) {
102
- const r = o(Number(s[1]), Number(s[2]), Number(s[3]));
103
- return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(r);
102
+ const c = o(Number(s[1]), Number(s[2]), Number(s[3]));
103
+ return c === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(c);
104
104
  }
105
105
  if (n === "datetime-local" && s[4] !== void 0) {
106
- const r = o(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
- return r === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(r);
106
+ const c = o(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
+ return c === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(c);
108
108
  }
109
109
  } catch {
110
110
  return l;
@@ -112,7 +112,7 @@ function Ve(n, l, t) {
112
112
  return l;
113
113
  }
114
114
  const We = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
115
- function Bn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s, value: r, onChange: a, placeholder: m, type: _ = "text", name: d, locale: h, min: c, max: f, step: p, minLength: g, maxLength: N, required: w }) {
115
+ function Fn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s, value: c, onChange: a, placeholder: m, type: _ = "text", name: d, locale: h, min: r, max: f, step: p, minLength: g, maxLength: N, required: w }) {
116
116
  const x = G(), S = i === !0 || s != null, C = S && We.has(_), F = _ === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
117
117
  return /* @__PURE__ */ e(Ce, { id: x, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
118
118
  "input",
@@ -121,15 +121,15 @@ function Bn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s,
121
121
  name: d,
122
122
  type: C ? "text" : _,
123
123
  className: "cms-input",
124
- value: C ? Ve(_, r, h) : r,
125
- ...C ? { "data-value": r } : {},
124
+ value: C ? Ve(_, c, h) : c,
125
+ ...C ? { "data-value": c } : {},
126
126
  lang: h,
127
127
  placeholder: m,
128
128
  disabled: o,
129
129
  readOnly: S,
130
130
  required: w,
131
131
  "aria-required": w || void 0,
132
- min: C ? void 0 : c,
132
+ min: C ? void 0 : r,
133
133
  max: C ? void 0 : f,
134
134
  step: C ? void 0 : p,
135
135
  minLength: g,
@@ -141,7 +141,7 @@ function Bn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s,
141
141
  }
142
142
  ) });
143
143
  }
144
- function Fn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s, value: r, onChange: a, placeholder: m, rows: _ = 4, name: d, locale: h, minLength: c, maxLength: f, required: p }) {
144
+ function Hn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s, value: c, onChange: a, placeholder: m, rows: _ = 4, name: d, locale: h, minLength: r, maxLength: f, required: p }) {
145
145
  const g = G();
146
146
  return /* @__PURE__ */ e(Ce, { id: g, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
147
147
  "textarea",
@@ -150,14 +150,14 @@ function Fn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s,
150
150
  name: d,
151
151
  className: "cms-input cms-textarea",
152
152
  rows: _,
153
- value: r,
153
+ value: c,
154
154
  lang: h,
155
155
  placeholder: m,
156
156
  disabled: o,
157
157
  readOnly: i === !0 || s != null,
158
158
  required: p,
159
159
  "aria-required": p || void 0,
160
- minLength: c,
160
+ minLength: r,
161
161
  maxLength: f,
162
162
  "aria-invalid": t != null || void 0,
163
163
  "aria-describedby": Se(g, { help: l, error: t, pinned: s }),
@@ -165,8 +165,8 @@ function Fn({ label: n, help: l, error: t, disabled: o, readOnly: i, pinned: s,
165
165
  }
166
166
  ) });
167
167
  }
168
- function Hn({ label: n, help: l, error: t, disabled: o, readOnly: i, value: s, options: r, onChange: a, emptyText: m = "Nothing to choose from yet.", name: _ }) {
169
- const d = G(), h = r.length === 0;
168
+ function Rn({ label: n, help: l, error: t, disabled: o, readOnly: i, value: s, options: c, onChange: a, emptyText: m = "Nothing to choose from yet.", name: _ }) {
169
+ const d = G(), h = c.length === 0;
170
170
  return /* @__PURE__ */ e(Ce, { id: d, label: n, help: h ? m : l, error: t, children: /* @__PURE__ */ e(
171
171
  "select",
172
172
  {
@@ -178,26 +178,26 @@ function Hn({ label: n, help: l, error: t, disabled: o, readOnly: i, value: s, o
178
178
  "aria-readonly": i || void 0,
179
179
  "aria-invalid": t != null || void 0,
180
180
  "aria-describedby": Se(d, { help: h ? m : l, error: t }),
181
- onChange: (c) => {
182
- i || a == null || a(c.target.value);
181
+ onChange: (r) => {
182
+ i || a == null || a(r.target.value);
183
183
  },
184
- children: r.map((c) => /* @__PURE__ */ e("option", { value: c.value, disabled: i && c.value !== s, children: c.label }, c.value))
184
+ children: c.map((r) => /* @__PURE__ */ e("option", { value: r.value, disabled: i && r.value !== s, children: r.label }, r.value))
185
185
  }
186
186
  ) });
187
187
  }
188
- function Rn({ label: n, checked: l, onChange: t, disabled: o, readOnly: i, help: s }) {
189
- const r = G();
188
+ function On({ label: n, checked: l, onChange: t, disabled: o, readOnly: i, help: s }) {
189
+ const c = G();
190
190
  return /* @__PURE__ */ u("div", { className: "cms-toggle-row", children: [
191
191
  /* @__PURE__ */ e(
192
192
  "button",
193
193
  {
194
- id: r,
194
+ id: c,
195
195
  type: "button",
196
196
  role: "switch",
197
197
  className: A("cms-toggle", l && "is-on"),
198
198
  "aria-checked": l,
199
199
  "aria-readonly": i || void 0,
200
- "aria-describedby": s != null ? `${r}-help` : void 0,
200
+ "aria-describedby": s != null ? `${c}-help` : void 0,
201
201
  disabled: o,
202
202
  onClick: () => {
203
203
  i || t == null || t(!l);
@@ -205,13 +205,13 @@ function Rn({ label: n, checked: l, onChange: t, disabled: o, readOnly: i, help:
205
205
  children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
206
206
  }
207
207
  ),
208
- /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: r, children: n }),
209
- s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${r}-help`, children: s }) : null
208
+ /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: c, children: n }),
209
+ s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${c}-help`, children: s }) : null
210
210
  ] });
211
211
  }
212
212
  const je = 150;
213
- function Pe({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: i, children: s, footer: r, closeLabel: a = "Close", initialFocus: m, className: _ }) {
214
- const [d, h] = E(n), [c, f] = E(!1), p = R(null), g = R(null), N = G();
213
+ function Pe({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: i, children: s, footer: c, closeLabel: a = "Close", initialFocus: m, className: _ }) {
214
+ const [d, h] = E(n), [r, f] = E(!1), p = R(null), g = R(null), N = G();
215
215
  if (Y(() => {
216
216
  if (n) {
217
217
  g.current = document.activeElement, h(!0), f(!1);
@@ -235,13 +235,13 @@ function Pe({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: i, chi
235
235
  o ? i == null || i() : t();
236
236
  };
237
237
  return Me(
238
- /* @__PURE__ */ e("div", { className: A("cms-modal-scrim", c && "is-closing"), onMouseDown: (x) => {
238
+ /* @__PURE__ */ e("div", { className: A("cms-modal-scrim", r && "is-closing"), onMouseDown: (x) => {
239
239
  x.target === x.currentTarget && w();
240
240
  }, children: /* @__PURE__ */ u(
241
241
  "div",
242
242
  {
243
243
  ref: p,
244
- className: A("cms-modal", _, c && "is-closing", o && "is-dirty"),
244
+ className: A("cms-modal", _, r && "is-closing", o && "is-dirty"),
245
245
  role: "dialog",
246
246
  "aria-modal": "true",
247
247
  "aria-labelledby": N,
@@ -263,14 +263,14 @@ function Pe({ open: n, title: l, onClose: t, dirty: o = !1, onDirtyClose: i, chi
263
263
  /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: w, children: /* @__PURE__ */ e(z, { name: "close" }) })
264
264
  ] }),
265
265
  /* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
266
- r != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: r }) : null
266
+ c != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: c }) : null
267
267
  ]
268
268
  }
269
269
  ) }),
270
270
  document.body
271
271
  );
272
272
  }
273
- function On({ open: n, title: l, message: t, kind: o = "default", confirmLabel: i, cancelLabel: s, closeLabel: r, onConfirm: a, onCancel: m }) {
273
+ function Kn({ open: n, title: l, message: t, kind: o = "default", confirmLabel: i, cancelLabel: s, closeLabel: c, onConfirm: a, onCancel: m }) {
274
274
  const _ = o === "discard-changes";
275
275
  return /* @__PURE__ */ e(
276
276
  Pe,
@@ -278,7 +278,7 @@ function On({ open: n, title: l, message: t, kind: o = "default", confirmLabel:
278
278
  open: n,
279
279
  title: l,
280
280
  onClose: m,
281
- ...r === void 0 ? {} : { closeLabel: r },
281
+ ...c === void 0 ? {} : { closeLabel: c },
282
282
  footer: /* @__PURE__ */ u(M, { children: [
283
283
  /* @__PURE__ */ e(le, { onClick: m, children: s ?? (_ ? "Keep editing" : "Cancel") }),
284
284
  /* @__PURE__ */ e(le, { variant: o === "default" ? "primary" : "danger", onClick: a, children: i ?? (_ ? "Discard changes" : "Confirm") })
@@ -291,7 +291,7 @@ function On({ open: n, title: l, message: t, kind: o = "default", confirmLabel:
291
291
  }
292
292
  );
293
293
  }
294
- function Kn({ kind: n, message: l, action: t, onDismiss: o, dismissLabel: i = "Dismiss" }) {
294
+ function Un({ kind: n, message: l, action: t, onDismiss: o, dismissLabel: i = "Dismiss" }) {
295
295
  return /* @__PURE__ */ u("div", { className: A("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
296
  /* @__PURE__ */ e(z, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
297
297
  /* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
@@ -299,7 +299,7 @@ function Kn({ kind: n, message: l, action: t, onDismiss: o, dismissLabel: i = "D
299
299
  o ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": i, onClick: o, children: /* @__PURE__ */ e(z, { name: "close" }) }) : null
300
300
  ] });
301
301
  }
302
- function Un({ children: n }) {
302
+ function zn({ children: n }) {
303
303
  return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
304
304
  }
305
305
  function qe({ what: n, layout: l = "inline" }) {
@@ -322,47 +322,6 @@ function Ge({ message: n, onRetry: l, retryLabel: t = "Try again" }) {
322
322
  l ? /* @__PURE__ */ e(le, { onClick: l, children: t }) : null
323
323
  ] });
324
324
  }
325
- const ye = 300;
326
- function Xe() {
327
- if (typeof window > "u" || typeof getComputedStyle != "function") return ye;
328
- const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), l = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
329
- return Number.isFinite(l) && l >= 0 ? l : ye;
330
- }
331
- function Je() {
332
- return /* @__PURE__ */ u("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
333
- /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
334
- /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
335
- ] });
336
- }
337
- function ne({ kind: n, title: l, description: t, action: o, placement: i = "block" }) {
338
- const [s, r] = E(n !== "loading");
339
- return Y(() => {
340
- if (n !== "loading") {
341
- r(!0);
342
- return;
343
- }
344
- r(!1);
345
- const a = window.setTimeout(() => r(!0), Xe());
346
- return () => window.clearTimeout(a);
347
- }, [n]), /* @__PURE__ */ u(
348
- "div",
349
- {
350
- className: A("cms-state", `cms-state--${n}`, `cms-state--${i}`, !s && "is-waiting"),
351
- role: "status",
352
- "aria-live": "polite",
353
- "data-kind": n,
354
- children: [
355
- n === "loading" ? /* @__PURE__ */ e(Je, {}) : null,
356
- n === "error" || n === "denied" ? /* @__PURE__ */ e(z, { name: n === "error" ? "warning" : "lock" }) : null,
357
- /* @__PURE__ */ u("span", { className: "cms-state__text", children: [
358
- /* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
359
- t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
360
- ] }),
361
- o !== void 0 && n !== "denied" ? /* @__PURE__ */ e(le, { className: "cms-state__action", onClick: o.onAction, children: o.label }) : null
362
- ]
363
- }
364
- );
365
- }
366
325
  const Be = {
367
326
  mail: /* @__PURE__ */ u(M, { children: [
368
327
  /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
@@ -539,7 +498,7 @@ function L({ name: n, size: l = 20, label: t }) {
539
498
  }
540
499
  );
541
500
  }
542
- const zn = Object.keys(Be), Ae = {
501
+ const Zn = Object.keys(Be), Ae = {
543
502
  reply: "reply",
544
503
  "reply-all": "reply",
545
504
  forward: "forward",
@@ -572,13 +531,15 @@ const zn = Object.keys(Be), Ae = {
572
531
  "file-earmark-spreadsheet": "file",
573
532
  "file-earmark-text": "file",
574
533
  folder2: "folder",
534
+ "folder2-open": "folder",
535
+ "chat-dots": "chat",
575
536
  images: "image",
576
537
  paperclip: "paperclip"
577
538
  };
578
539
  function re(n) {
579
540
  return Object.prototype.hasOwnProperty.call(Ae, n) ? Ae[n] : null;
580
541
  }
581
- function Qe() {
542
+ function Xe() {
582
543
  try {
583
544
  return process.env.NODE_ENV !== "production";
584
545
  } catch {
@@ -586,23 +547,65 @@ function Qe() {
586
547
  }
587
548
  }
588
549
  const Te = /* @__PURE__ */ new Set();
589
- function Zn({ name: n, size: l = 18 }) {
550
+ function Je({ name: n, size: l = 18 }) {
590
551
  if (n === "") return null;
591
552
  const t = re(n);
592
- return t !== null ? /* @__PURE__ */ e(L, { name: t, size: l }) : (!Te.has(n) && Qe() && (Te.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
553
+ return t !== null ? /* @__PURE__ */ e(L, { name: t, size: l }) : (!Te.has(n) && Xe() && (Te.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
593
554
  }
594
- const en = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', nn = 60;
595
- function ln(n) {
596
- return n instanceof Element && n.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
555
+ const ye = 300;
556
+ function Qe() {
557
+ if (typeof window > "u" || typeof getComputedStyle != "function") return ye;
558
+ const n = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), l = n.endsWith("ms") ? Number.parseFloat(n) : n.endsWith("s") ? Number.parseFloat(n) * 1e3 : Number.NaN;
559
+ return Number.isFinite(l) && l >= 0 ? l : ye;
597
560
  }
561
+ function en() {
562
+ return /* @__PURE__ */ u("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
563
+ /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
564
+ /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
565
+ ] });
566
+ }
567
+ function ne({ kind: n, title: l, description: t, action: o, placement: i = "block", icon: s }) {
568
+ const [c, a] = E(n !== "loading");
569
+ return Y(() => {
570
+ if (n !== "loading") {
571
+ a(!0);
572
+ return;
573
+ }
574
+ a(!1);
575
+ const m = window.setTimeout(() => a(!0), Qe());
576
+ return () => window.clearTimeout(m);
577
+ }, [n]), /* @__PURE__ */ u(
578
+ "div",
579
+ {
580
+ className: A("cms-state", `cms-state--${n}`, `cms-state--${i}`, !c && "is-waiting"),
581
+ role: "status",
582
+ "aria-live": "polite",
583
+ "data-kind": n,
584
+ children: [
585
+ n === "loading" ? /* @__PURE__ */ e(en, {}) : null,
586
+ n === "error" || n === "denied" ? /* @__PURE__ */ e(z, { name: n === "error" ? "warning" : "lock" }) : null,
587
+ n === "empty" && s !== void 0 && re(s) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Je, { name: s, size: i === "page" ? 32 : 24 }) }) : null,
588
+ /* @__PURE__ */ u("span", { className: "cms-state__text", children: [
589
+ /* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
590
+ t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
591
+ ] }),
592
+ o !== void 0 && n !== "denied" ? /* @__PURE__ */ e(le, { className: "cms-state__action", onClick: o.onAction, children: o.label }) : null
593
+ ]
594
+ }
595
+ );
596
+ }
597
+ const nn = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', ln = 60;
598
598
  function tn(n) {
599
- return n instanceof Element && n.closest("[data-viewer-gestures]") !== null;
599
+ return n instanceof Element && n.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
600
600
  }
601
601
  function an(n) {
602
+ return n instanceof Element && n.closest("[data-viewer-gestures]") !== null;
603
+ }
604
+ function sn(n) {
602
605
  return n.getClientRects().length > 0;
603
606
  }
604
607
  function Vn(n) {
605
- const { name: l, badge: t, closeLabel: o, onClose: i, actions: s = [], moreLabel: r = "More", edit: a, editing: m, state: _, siblings: d, bar: h, thumbnails: c, strip: f, onZoom: p, children: g } = n, N = R(null), w = R(null), x = G(), [S, C] = E(!1), F = R(null);
608
+ const { name: l, badge: t, closeLabel: o, onClose: i, actions: s = [], moreLabel: c = "More", edit: a, editing: m, state: _, siblings: d, bar: h, thumbnails: r, strip: f, onZoom: p, children: g } = n, N = R(null), w = R(null), x = G(), [S, C] = E(!1), F = R(null);
606
609
  Y(() => {
607
610
  var V;
608
611
  const y = document.activeElement, P = document.body.style.overflow;
@@ -615,13 +618,13 @@ function Vn(n) {
615
618
  m != null && m.dirty ? m.onDirtyClose() : i();
616
619
  }, ee = (y) => {
617
620
  const P = y.touches.length === 1 ? y.touches[0] : void 0;
618
- F.current = P === void 0 || m !== void 0 || tn(y.target) ? null : { x: P.clientX, y: P.clientY };
621
+ F.current = P === void 0 || m !== void 0 || an(y.target) ? null : { x: P.clientX, y: P.clientY };
619
622
  }, j = (y) => {
620
623
  var X, O;
621
624
  const P = F.current, V = y.changedTouches[0];
622
625
  if (F.current = null, P === null || V === void 0) return;
623
626
  const D = V.clientX - P.x;
624
- Math.abs(D) < nn || Math.abs(D) < Math.abs(V.clientY - P.y) || (D > 0 ? (X = d == null ? void 0 : d.onPrevious) == null || X.call(d) : (O = d == null ? void 0 : d.onNext) == null || O.call(d));
627
+ Math.abs(D) < ln || Math.abs(D) < Math.abs(V.clientY - P.y) || (D > 0 ? (X = d == null ? void 0 : d.onPrevious) == null || X.call(d) : (O = d == null ? void 0 : d.onNext) == null || O.call(d));
625
628
  };
626
629
  return Me(
627
630
  /* @__PURE__ */ u(
@@ -639,11 +642,11 @@ function Vn(n) {
639
642
  if (m !== void 0) return;
640
643
  y.stopPropagation(), S ? C(!1) : i();
641
644
  } else if (y.key === "Tab") {
642
- const X = Array.from(((P = N.current) == null ? void 0 : P.querySelectorAll(en)) ?? []).filter(an);
645
+ const X = Array.from(((P = N.current) == null ? void 0 : P.querySelectorAll(nn)) ?? []).filter(sn);
643
646
  if (X.length === 0) return;
644
647
  const O = X[0], J = X[X.length - 1];
645
648
  y.shiftKey && document.activeElement === O ? (y.preventDefault(), J.focus()) : !y.shiftKey && document.activeElement === J && (y.preventDefault(), O.focus());
646
- } else m === void 0 && !ln(y.target) && !y.ctrlKey && !y.metaKey && !y.altKey && (y.key === "ArrowLeft" ? (V = d == null ? void 0 : d.onPrevious) == null || V.call(d) : y.key === "ArrowRight" ? (D = d == null ? void 0 : d.onNext) == null || D.call(d) : y.key === "+" || y.key === "=" ? p == null || p("in") : y.key === "-" ? p == null || p("out") : y.key === "0" && (p == null || p("reset")));
649
+ } else m === void 0 && !tn(y.target) && !y.ctrlKey && !y.metaKey && !y.altKey && (y.key === "ArrowLeft" ? (V = d == null ? void 0 : d.onPrevious) == null || V.call(d) : y.key === "ArrowRight" ? (D = d == null ? void 0 : d.onNext) == null || D.call(d) : y.key === "+" || y.key === "=" ? p == null || p("in") : y.key === "-" ? p == null || p("out") : y.key === "0" && (p == null || p("reset")));
647
650
  },
648
651
  children: [
649
652
  d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${d.position}` }) : null,
@@ -666,7 +669,7 @@ function Vn(n) {
666
669
  /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: a.label })
667
670
  ] }) : null,
668
671
  s.length > 0 ? /* @__PURE__ */ u("span", { className: "cms-viewer__more", children: [
669
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": r, "aria-expanded": S, onClick: () => C((y) => !y), children: /* @__PURE__ */ e(L, { name: "more" }) }),
672
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": c, "aria-expanded": S, onClick: () => C((y) => !y), children: /* @__PURE__ */ e(L, { name: "more" }) }),
670
673
  S ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((y) => /* @__PURE__ */ u(
671
674
  "button",
672
675
  {
@@ -686,14 +689,14 @@ function Vn(n) {
686
689
  ] })
687
690
  ] }),
688
691
  /* @__PURE__ */ u("div", { className: "cms-viewer__body", children: [
689
- c != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: c }) : null,
692
+ r != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: r }) : null,
690
693
  /* @__PURE__ */ u("div", { className: "cms-viewer__content", onTouchStart: ee, onTouchEnd: j, children: [
691
694
  (m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ u("div", { className: "cms-viewer__conflict", role: "alert", children: [
692
695
  /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: m.conflict.message }),
693
696
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: m.conflict.onOverwrite, children: m.conflict.overwriteLabel }),
694
697
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.conflict.onKeepBoth, children: m.conflict.keepBothLabel })
695
698
  ] }) : null,
696
- _ === void 0 ? g : /* @__PURE__ */ e(sn, { state: _ }),
699
+ _ === void 0 ? g : /* @__PURE__ */ e(rn, { state: _ }),
697
700
  m === void 0 && (d != null && d.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": d.previousLabel, title: d.previousLabel, onClick: d.onPrevious, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
698
701
  m === void 0 && (d != null && d.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": d.nextLabel, title: d.nextLabel, onClick: d.onNext, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
699
702
  m === void 0 && d !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(d.total, 7) }, (y, P) => /* @__PURE__ */ e("i", { className: P === Math.min(d.index, 6) ? "is-current" : void 0 }, P)) }) : null
@@ -707,7 +710,7 @@ function Vn(n) {
707
710
  document.body
708
711
  );
709
712
  }
710
- function sn({ state: n }) {
713
+ function rn({ state: n }) {
711
714
  switch (n.kind) {
712
715
  case "loading":
713
716
  return /* @__PURE__ */ e(ne, { kind: "loading", title: n.title, placement: "page" });
@@ -735,37 +738,37 @@ function sn({ state: n }) {
735
738
  );
736
739
  }
737
740
  }
738
- class rn extends Error {
741
+ class cn extends Error {
739
742
  constructor(l = "denied") {
740
743
  super(l), this.name = "FilePickerDenied";
741
744
  }
742
745
  }
743
746
  const Ne = (n, l) => `${n}
744
- ${l}`, cn = (n, l) => n === "" ? l : `${n}/${l}`, on = 48;
747
+ ${l}`, on = (n, l) => n === "" ? l : `${n}/${l}`, dn = 48;
745
748
  function Wn(n) {
746
749
  var me, he;
747
- const { open: l, spaces: t, list: o, disabledReason: i, budget: s, formatSize: r, labels: a, onConfirm: m, onCancel: _ } = n, [d, h] = E(((me = t[0]) == null ? void 0 : me.id) ?? ""), [c, f] = E(""), [p, g] = E({ status: "loading" }), [N, w] = E(0), [x, S] = E(/* @__PURE__ */ new Map()), [C, F] = E(0), [H, ee] = E(!1), j = R(null), y = G();
750
+ const { open: l, spaces: t, list: o, disabledReason: i, budget: s, formatSize: c, labels: a, onConfirm: m, onCancel: _ } = n, [d, h] = E(((me = t[0]) == null ? void 0 : me.id) ?? ""), [r, f] = E(""), [p, g] = E({ status: "loading" }), [N, w] = E(0), [x, S] = E(/* @__PURE__ */ new Map()), [C, F] = E(0), [H, ee] = E(!1), j = R(null), y = G();
748
751
  Y(() => {
749
752
  var b;
750
753
  l && (h(((b = t[0]) == null ? void 0 : b.id) ?? ""), f(""), S(/* @__PURE__ */ new Map()), ee(!1));
751
754
  }, [l]), Y(() => {
752
755
  if (!l || d === "") return;
753
756
  let b = !0;
754
- return g({ status: "loading" }), F(0), o(d, c).then(
757
+ return g({ status: "loading" }), F(0), o(d, r).then(
755
758
  (k) => b && g({ status: "ready", entries: k.entries, next: k.next ?? null, paging: !1 }),
756
- (k) => b && g({ status: k instanceof rn ? "denied" : "error" })
759
+ (k) => b && g({ status: k instanceof cn ? "denied" : "error" })
757
760
  ), () => {
758
761
  b = !1;
759
762
  };
760
- }, [l, d, c, o, N]);
763
+ }, [l, d, r, o, N]);
761
764
  const P = be(() => {
762
765
  if (p.status !== "ready" || p.next === null || p.paging) return;
763
766
  const b = p.next, k = p.entries;
764
- g({ ...p, paging: !0 }), o(d, c, b).then(
767
+ g({ ...p, paging: !0 }), o(d, r, b).then(
765
768
  (B) => g({ status: "ready", entries: [...k, ...B.entries], next: B.next ?? null, paging: !1 }),
766
769
  () => g({ status: "ready", entries: k, next: b, paging: !1 })
767
770
  );
768
- }, [p, o, d, c]), V = be((b) => {
771
+ }, [p, o, d, r]), V = be((b) => {
769
772
  var k;
770
773
  return ((k = s == null ? void 0 : s.cost) == null ? void 0 : k.call(s, b)) ?? b.size ?? 0;
771
774
  }, [s]), D = Oe(() => [...x.values()], [x]), X = D.reduce((b, k) => b + (k.size ?? 0), 0), O = s === void 0 ? null : s.limitBytes - s.usedBytes - D.reduce((b, k) => b + V(k), 0), J = O !== null && O < 0, ie = (b) => {
@@ -776,9 +779,9 @@ function Wn(n) {
776
779
  const k = Ne(d, b.id);
777
780
  !x.has(k) && ie(b) !== null || S((B) => {
778
781
  const K = new Map(B);
779
- return K.has(k) ? K.delete(k) : K.set(k, { ...b, space: d, path: c }), K;
782
+ return K.has(k) ? K.delete(k) : K.set(k, { ...b, space: d, path: r }), K;
780
783
  });
781
- }, v = (b) => f(cn(c, b.name)), T = () => f(c.includes("/") ? c.slice(0, c.lastIndexOf("/")) : ""), Z = (b) => S((k) => {
784
+ }, v = (b) => f(on(r, b.name)), T = () => f(r.includes("/") ? r.slice(0, r.lastIndexOf("/")) : ""), Z = (b) => S((k) => {
782
785
  const B = new Map(k);
783
786
  return B.delete(b), B;
784
787
  }), W = p.status === "ready" ? p.entries : [], $ = (b) => {
@@ -787,8 +790,8 @@ function Wn(n) {
787
790
  b.preventDefault();
788
791
  const B = W.length - 1, K = b.key === "Home" ? 0 : b.key === "End" ? B : Math.min(B, Math.max(0, C + (b.key === "ArrowDown" ? 1 : -1)));
789
792
  F(K), K >= B - 1 && P();
790
- } else b.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (b.preventDefault(), v(k)) : b.key === " " && (k == null ? void 0 : k.kind) === "file" ? (b.preventDefault(), oe(k)) : b.key === "Backspace" && c !== "" && (b.preventDefault(), T());
791
- }, q = c === "" ? [] : c.split("/"), de = ((he = t.find((b) => b.id === d)) == null ? void 0 : he.name) ?? "", ue = (b) => `${y}-entry-${String(b)}`;
793
+ } else b.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (b.preventDefault(), v(k)) : b.key === " " && (k == null ? void 0 : k.kind) === "file" ? (b.preventDefault(), oe(k)) : b.key === "Backspace" && r !== "" && (b.preventDefault(), T());
794
+ }, q = r === "" ? [] : r.split("/"), de = ((he = t.find((b) => b.id === d)) == null ? void 0 : he.name) ?? "", ue = (b) => `${y}-entry-${String(b)}`;
792
795
  return /* @__PURE__ */ u(
793
796
  Pe,
794
797
  {
@@ -800,8 +803,8 @@ function Wn(n) {
800
803
  className: "cms-file-picker",
801
804
  footer: /* @__PURE__ */ u("div", { className: "cms-file-picker__foot", children: [
802
805
  /* @__PURE__ */ u("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
803
- D.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(D.length, r(X)) }) : null,
804
- s !== void 0 && O !== null ? /* @__PURE__ */ e("span", { className: A(J && "is-over"), children: J ? a.overBudget : a.left(r(Math.max(0, O)), r(s.limitBytes)) }) : null
806
+ D.length > 0 ? /* @__PURE__ */ e("span", { children: a.total(D.length, c(X)) }) : null,
807
+ s !== void 0 && O !== null ? /* @__PURE__ */ e("span", { className: A(J && "is-over"), children: J ? a.overBudget : a.left(c(Math.max(0, O)), c(s.limitBytes)) }) : null
805
808
  ] }),
806
809
  /* @__PURE__ */ u("div", { className: "cms-file-picker__actions", children: [
807
810
  /* @__PURE__ */ e(le, { variant: "secondary", onClick: _, children: a.cancel }),
@@ -817,12 +820,12 @@ function Wn(n) {
817
820
  }, children: t.map((b) => /* @__PURE__ */ e("option", { value: b.id, children: b.name }, b.id)) })
818
821
  ] }) : null,
819
822
  /* @__PURE__ */ u("nav", { className: "cms-file-picker__path", "aria-label": a.path, children: [
820
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.up, disabled: c === "", onClick: T, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
823
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a.up, disabled: r === "", onClick: T, children: /* @__PURE__ */ e(L, { name: "chevron-left" }) }),
821
824
  /* @__PURE__ */ u("ol", { children: [
822
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": c === "" ? "location" : void 0, onClick: () => f(""), children: de }) }),
825
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": r === "" ? "location" : void 0, onClick: () => f(""), children: de }) }),
823
826
  q.map((b, k) => {
824
827
  const B = q.slice(0, k + 1).join("/");
825
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": B === c ? "location" : void 0, onClick: () => f(B), children: b }) }, B);
828
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": B === r ? "location" : void 0, onClick: () => f(B), children: b }) }, B);
826
829
  })
827
830
  ] })
828
831
  ] }),
@@ -839,7 +842,7 @@ function Wn(n) {
839
842
  ] }) : null,
840
843
  /* @__PURE__ */ u("div", { className: "cms-file-picker__list", onScroll: (b) => {
841
844
  const k = b.currentTarget;
842
- k.scrollTop + k.clientHeight >= k.scrollHeight - on && P();
845
+ k.scrollTop + k.clientHeight >= k.scrollHeight - dn && P();
843
846
  }, children: [
844
847
  p.status === "loading" ? /* @__PURE__ */ e(ne, { kind: "loading", title: a.loading, placement: "block" }) : null,
845
848
  p.status === "error" ? /* @__PURE__ */ e(ne, { kind: "error", title: a.error, placement: "block", action: { label: a.retry, onAction: () => w((b) => b + 1) } }) : null,
@@ -878,7 +881,7 @@ function Wn(n) {
878
881
  /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: b.name }),
879
882
  K !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: K }) : null
880
883
  ] }),
881
- b.kind === "file" && b.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: r(b.size) }) : null
884
+ b.kind === "file" && b.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: c(b.size) }) : null
882
885
  ]
883
886
  },
884
887
  b.id
@@ -920,16 +923,16 @@ function jn({ title: n, scope: l, actions: t, backLink: o }) {
920
923
  ] });
921
924
  }
922
925
  function qn({ tabs: n, active: l, onSelect: t, label: o }) {
923
- const i = R([]), s = (r, a) => {
926
+ const i = R([]), s = (c, a) => {
924
927
  var h;
925
- const m = n.length - 1, _ = r.key === "ArrowRight" ? a === m ? 0 : a + 1 : r.key === "ArrowLeft" ? a === 0 ? m : a - 1 : r.key === "Home" ? 0 : r.key === "End" ? m : null;
928
+ const m = n.length - 1, _ = c.key === "ArrowRight" ? a === m ? 0 : a + 1 : c.key === "ArrowLeft" ? a === 0 ? m : a - 1 : c.key === "Home" ? 0 : c.key === "End" ? m : null;
926
929
  if (_ === null) return;
927
- r.preventDefault();
930
+ c.preventDefault();
928
931
  const d = n[_];
929
932
  d && (t(d.id), (h = i.current[_]) == null || h.focus());
930
933
  };
931
- return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": o, children: n.map((r, a) => {
932
- const m = r.id === l;
934
+ return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": o, children: n.map((c, a) => {
935
+ const m = c.id === l;
933
936
  return /* @__PURE__ */ u(
934
937
  "button",
935
938
  {
@@ -941,54 +944,54 @@ function qn({ tabs: n, active: l, onSelect: t, label: o }) {
941
944
  className: A("cms-tab", m && "is-active"),
942
945
  "aria-selected": m,
943
946
  tabIndex: m ? 0 : -1,
944
- onClick: () => t(r.id),
947
+ onClick: () => t(c.id),
945
948
  onKeyDown: (_) => s(_, a),
946
949
  children: [
947
- r.label,
948
- r.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: r.count }) : null
950
+ c.label,
951
+ c.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: c.count }) : null
949
952
  ]
950
953
  },
951
- r.id
954
+ c.id
952
955
  );
953
956
  }) });
954
957
  }
955
- function dn(n) {
958
+ function un(n) {
956
959
  const l = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), t = (i) => {
957
960
  var s;
958
961
  return (s = i == null ? void 0 : i.match(/[\p{L}\p{N}]/u)) == null ? void 0 : s[0];
959
962
  };
960
963
  return (l.length > 1 ? [t(l[0]), t(l[l.length - 1])] : [t(l[0])]).filter(Boolean).join("").toUpperCase();
961
964
  }
962
- function un(n) {
965
+ function mn(n) {
963
966
  let l = 0;
964
967
  for (const t of n.trim().toLowerCase())
965
968
  l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
966
969
  return l % 6 + 1;
967
970
  }
968
971
  function ve({ name: n, pictureUrl: l, presence: t, connection: o, deleted: i = !1, size: s = 32 }) {
969
- const r = o !== void 0 ? `is-${o.state === "offline" ? "disconnected" : o.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, a = o !== void 0 ? `${n}, ${o.label}` : t ? `${n}, ${t}` : n;
972
+ const c = o !== void 0 ? `is-${o.state === "offline" ? "disconnected" : o.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, a = o !== void 0 ? `${n}, ${o.label}` : t ? `${n}, ${t}` : n;
970
973
  return /* @__PURE__ */ u(
971
974
  "span",
972
975
  {
973
- className: A("cms-avatar", i ? "cms-avatar--deleted" : `cms-avatar--tint-${un(n)}`),
976
+ className: A("cms-avatar", i ? "cms-avatar--deleted" : `cms-avatar--tint-${mn(n)}`),
974
977
  style: { width: s, height: s, fontSize: Math.round(s * 0.4) },
975
978
  role: "img",
976
979
  "aria-label": a,
977
980
  ...o === void 0 ? {} : { title: o.label },
978
981
  children: [
979
- i ? /* @__PURE__ */ e(L, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: dn(n) }),
980
- r === null ? null : /* @__PURE__ */ e("span", { className: A("cms-avatar__presence", r), "aria-hidden": "true" })
982
+ i ? /* @__PURE__ */ e(L, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: un(n) }),
983
+ c === null ? null : /* @__PURE__ */ e("span", { className: A("cms-avatar__presence", c), "aria-hidden": "true" })
981
984
  ]
982
985
  }
983
986
  );
984
987
  }
985
- function mn({ count: n, label: l, max: t = 99 }) {
988
+ function hn({ count: n, label: l, max: t = 99 }) {
986
989
  return n <= 0 ? null : /* @__PURE__ */ u("span", { className: "cms-badge", children: [
987
990
  /* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > t ? `${t}+` : n }),
988
991
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
989
992
  ] });
990
993
  }
991
- function Yn({ product: n, mark: l, rail: t, active: o, onNavigate: i, server: s, search: r, account: a, children: m, railLabel: _ = "Sections" }) {
994
+ function Yn({ product: n, mark: l, rail: t, active: o, onNavigate: i, server: s, search: c, account: a, children: m, railLabel: _ = "Sections" }) {
992
995
  return /* @__PURE__ */ u("div", { className: "cms-shell", children: [
993
996
  /* @__PURE__ */ u("nav", { className: "cms-shell__rail", "aria-label": _, children: [
994
997
  /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
@@ -1001,13 +1004,13 @@ function Yn({ product: n, mark: l, rail: t, active: o, onNavigate: i, server: s,
1001
1004
  className: A("cms-shell__item", h && "is-active"),
1002
1005
  "aria-current": h ? "page" : void 0,
1003
1006
  title: d.label,
1004
- onClick: (c) => {
1005
- i && (c.preventDefault(), i(d.id));
1007
+ onClick: (r) => {
1008
+ i && (r.preventDefault(), i(d.id));
1006
1009
  },
1007
1010
  children: [
1008
1011
  /* @__PURE__ */ u("span", { className: "cms-shell__icon", children: [
1009
1012
  /* @__PURE__ */ e(L, { name: d.icon, size: 22 }),
1010
- d.badge ? /* @__PURE__ */ e(mn, { count: d.badge.count, label: d.badge.label }) : null
1013
+ d.badge ? /* @__PURE__ */ e(hn, { count: d.badge.count, label: d.badge.label }) : null
1011
1014
  ] }),
1012
1015
  /* @__PURE__ */ e("span", { className: "cms-shell__label", children: d.label })
1013
1016
  ]
@@ -1018,7 +1021,7 @@ function Yn({ product: n, mark: l, rail: t, active: o, onNavigate: i, server: s,
1018
1021
  /* @__PURE__ */ u("header", { className: "cms-shell__top", children: [
1019
1022
  /* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
1020
1023
  s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
1021
- r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: r }) : null,
1024
+ c != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: c }) : null,
1022
1025
  a != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: a }) : null
1023
1026
  ] }),
1024
1027
  /* @__PURE__ */ e("main", { className: "cms-shell__main", children: m })
@@ -1050,17 +1053,17 @@ function Gn({ label: n, placeholder: l, value: t, onChange: o, onSearch: i }) {
1050
1053
  }
1051
1054
  );
1052
1055
  }
1053
- function hn({ options: n, value: l, onChange: t, label: o }) {
1054
- const i = R([]), s = (r, a) => {
1056
+ function fn({ options: n, value: l, onChange: t, label: o }) {
1057
+ const i = R([]), s = (c, a) => {
1055
1058
  var h;
1056
- const m = n.length - 1, _ = r.key === "ArrowRight" || r.key === "ArrowDown" ? a === m ? 0 : a + 1 : r.key === "ArrowLeft" || r.key === "ArrowUp" ? a === 0 ? m : a - 1 : null;
1059
+ const m = n.length - 1, _ = c.key === "ArrowRight" || c.key === "ArrowDown" ? a === m ? 0 : a + 1 : c.key === "ArrowLeft" || c.key === "ArrowUp" ? a === 0 ? m : a - 1 : null;
1057
1060
  if (_ === null) return;
1058
- r.preventDefault();
1061
+ c.preventDefault();
1059
1062
  const d = n[_];
1060
1063
  d && (t(d.id), (h = i.current[_]) == null || h.focus());
1061
1064
  };
1062
- return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": o, children: n.map((r, a) => {
1063
- const m = r.id === l;
1065
+ return /* @__PURE__ */ e("div", { className: "cms-chips", role: "radiogroup", "aria-label": o, children: n.map((c, a) => {
1066
+ const m = c.id === l;
1064
1067
  return /* @__PURE__ */ u(
1065
1068
  "button",
1066
1069
  {
@@ -1072,29 +1075,29 @@ function hn({ options: n, value: l, onChange: t, label: o }) {
1072
1075
  "aria-checked": m,
1073
1076
  tabIndex: m ? 0 : -1,
1074
1077
  className: A("cms-chip", m && "is-on"),
1075
- onClick: () => t(r.id),
1078
+ onClick: () => t(c.id),
1076
1079
  onKeyDown: (_) => s(_, a),
1077
1080
  children: [
1078
1081
  m ? /* @__PURE__ */ e(L, { name: "check", size: 16 }) : null,
1079
- r.label
1082
+ c.label
1080
1083
  ]
1081
1084
  },
1082
- r.id
1085
+ c.id
1083
1086
  );
1084
1087
  }) });
1085
1088
  }
1086
1089
  const Le = 16;
1087
- function fn(n, l, t) {
1090
+ function pn(n, l, t) {
1088
1091
  const o = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1089
- let i = o.reduce((s, r) => s + r, 0) + t - l;
1092
+ let i = o.reduce((s, c) => s + c, 0) + t - l;
1090
1093
  for (let s = o.length - 1; s >= 0 && i > 0; s -= 1) {
1091
- const r = Math.min(i, o[s] - n[s].min);
1092
- o[s] = o[s] - r, i -= r;
1094
+ const c = Math.min(i, o[s] - n[s].min);
1095
+ o[s] = o[s] - c, i -= c;
1093
1096
  }
1094
1097
  return o;
1095
1098
  }
1096
- function pn({ index: n, size: l, shown: t, others: o, room: i, lastMin: s, onResize: r }) {
1097
- const a = Math.max(l.min, Math.min(l.max, i > 0 ? i - o - s : l.max)), m = (h) => Math.round(Math.min(Math.max(h, l.min), a)), _ = R(null), d = (h, c) => r == null ? void 0 : r(n, m(h), c);
1099
+ function _n({ index: n, size: l, shown: t, others: o, room: i, lastMin: s, onResize: c }) {
1100
+ const a = Math.max(l.min, Math.min(l.max, i > 0 ? i - o - s : l.max)), m = (h) => Math.round(Math.min(Math.max(h, l.min), a)), _ = R(null), d = (h, r) => c == null ? void 0 : c(n, m(h), r);
1098
1101
  return /* @__PURE__ */ e(
1099
1102
  "div",
1100
1103
  {
@@ -1108,33 +1111,33 @@ function pn({ index: n, size: l, shown: t, others: o, room: i, lastMin: s, onRes
1108
1111
  className: "cms-panes__splitter",
1109
1112
  style: { "--split-at": `var(--split-pane-end-${String(n)})` },
1110
1113
  onPointerDown: (h) => {
1111
- var c, f, p;
1112
- h.button > 0 || (h.preventDefault(), (f = (c = h.currentTarget).setPointerCapture) == null || f.call(c, h.pointerId), _.current = { x: h.clientX, from: t, last: t }, (p = h.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
1114
+ var r, f, p;
1115
+ h.button > 0 || (h.preventDefault(), (f = (r = h.currentTarget).setPointerCapture) == null || f.call(r, h.pointerId), _.current = { x: h.clientX, from: t, last: t }, (p = h.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
1113
1116
  },
1114
1117
  onPointerMove: (h) => {
1115
- const c = _.current;
1116
- c === null || !Number.isFinite(h.clientX) || (c.last = m(c.from + h.clientX - c.x), d(c.last, !1));
1118
+ const r = _.current;
1119
+ r === null || !Number.isFinite(h.clientX) || (r.last = m(r.from + h.clientX - r.x), d(r.last, !1));
1117
1120
  },
1118
1121
  onPointerUp: (h) => {
1119
1122
  var f;
1120
- const c = _.current;
1121
- c !== null && (_.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), d(c.last, !0));
1123
+ const r = _.current;
1124
+ r !== null && (_.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), d(r.last, !0));
1122
1125
  },
1123
1126
  onPointerCancel: (h) => {
1124
1127
  var f;
1125
- const c = _.current;
1126
- _.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), c !== null && d(c.last, !0);
1128
+ const r = _.current;
1129
+ _.current = null, (f = h.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), r !== null && d(r.last, !0);
1127
1130
  },
1128
1131
  onDoubleClick: () => d(l.reset, !0),
1129
1132
  onKeyDown: (h) => {
1130
- const c = h.key === "ArrowLeft" ? t - Le : h.key === "ArrowRight" ? t + Le : h.key === "Home" ? l.min : h.key === "End" ? a : h.key === "Enter" ? l.reset : null;
1131
- c !== null && (h.preventDefault(), d(c, !0));
1133
+ const r = h.key === "ArrowLeft" ? t - Le : h.key === "ArrowRight" ? t + Le : h.key === "Home" ? l.min : h.key === "End" ? a : h.key === "Enter" ? l.reset : null;
1134
+ r !== null && (h.preventDefault(), d(r, !0));
1132
1135
  }
1133
1136
  }
1134
1137
  );
1135
1138
  }
1136
1139
  function Xn({ panes: n, active: l, back: t, sizes: o, lastMin: i = 360, onResize: s }) {
1137
- const r = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), a = R(null), [m, _] = E(0), d = (o ?? []).slice(0, n.length - 1), h = d.length === n.length - 1 && d.every((p) => p !== void 0);
1140
+ const c = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), a = R(null), [m, _] = E(0), d = (o ?? []).slice(0, n.length - 1), h = d.length === n.length - 1 && d.every((p) => p !== void 0);
1138
1141
  xe(() => {
1139
1142
  const p = a.current;
1140
1143
  if (p === null || !h) return;
@@ -1143,32 +1146,32 @@ function Xn({ panes: n, active: l, back: t, sizes: o, lastMin: i = 360, onResize
1143
1146
  const N = new ResizeObserver(g);
1144
1147
  return N.observe(p), () => N.disconnect();
1145
1148
  }, [h]);
1146
- const c = h ? fn(d, m > 0 ? m : Number.POSITIVE_INFINITY, i) : [], f = h ? Object.fromEntries(c.flatMap((p, g) => [
1149
+ const r = h ? pn(d, m > 0 ? m : Number.POSITIVE_INFINITY, i) : [], f = h ? Object.fromEntries(r.flatMap((p, g) => [
1147
1150
  [`--split-pane-${String(g)}`, `${String(p)}px`],
1148
- [`--split-pane-end-${String(g)}`, `${String(c.slice(0, g + 1).reduce((N, w) => N + w, 0))}px`]
1151
+ [`--split-pane-end-${String(g)}`, `${String(r.slice(0, g + 1).reduce((N, w) => N + w, 0))}px`]
1149
1152
  ])) : void 0;
1150
1153
  return /* @__PURE__ */ u(
1151
1154
  "div",
1152
1155
  {
1153
1156
  ref: a,
1154
1157
  className: A("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", h && "cms-panes--sized"),
1155
- "data-active": r,
1158
+ "data-active": c,
1156
1159
  style: f,
1157
1160
  children: [
1158
- n.map((p, g) => /* @__PURE__ */ u("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": r - g, children: [
1159
- g === r && t ? /* @__PURE__ */ u("a", { className: "cms-panes__back", href: t.href, children: [
1161
+ n.map((p, g) => /* @__PURE__ */ u("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": c - g, children: [
1162
+ g === c && t ? /* @__PURE__ */ u("a", { className: "cms-panes__back", href: t.href, children: [
1160
1163
  /* @__PURE__ */ e(L, { name: "chevron-left", size: 18 }),
1161
1164
  t.label
1162
1165
  ] }) : null,
1163
1166
  p.content
1164
1167
  ] }, p.label)),
1165
1168
  h ? d.map((p, g) => /* @__PURE__ */ e(
1166
- pn,
1169
+ _n,
1167
1170
  {
1168
1171
  index: g,
1169
1172
  size: p,
1170
- shown: c[g],
1171
- others: c.reduce((N, w, x) => x === g ? N : N + w, 0),
1173
+ shown: r[g],
1174
+ others: r.reduce((N, w, x) => x === g ? N : N + w, 0),
1172
1175
  room: m,
1173
1176
  lastMin: i,
1174
1177
  onResize: s
@@ -1179,15 +1182,15 @@ function Xn({ panes: n, active: l, back: t, sizes: o, lastMin: i = 360, onResize
1179
1182
  }
1180
1183
  );
1181
1184
  }
1182
- const _n = { attachment: "Has an attachment", unread: "Unread" };
1183
- function Jn({ from: n, subject: l, preview: t, time: o, unread: i, hasAttachment: s, selected: r, onOpen: a, labels: m }) {
1184
- const _ = ce(_n, m);
1185
+ const bn = { attachment: "Has an attachment", unread: "Unread" };
1186
+ function Jn({ from: n, subject: l, preview: t, time: o, unread: i, hasAttachment: s, selected: c, onOpen: a, labels: m }) {
1187
+ const _ = ce(bn, m);
1185
1188
  return /* @__PURE__ */ u(
1186
1189
  "button",
1187
1190
  {
1188
1191
  type: "button",
1189
- className: A("cms-mail-row", i && "is-unread", r && "is-selected"),
1190
- "aria-current": r ? "true" : void 0,
1192
+ className: A("cms-mail-row", i && "is-unread", c && "is-selected"),
1193
+ "aria-current": c ? "true" : void 0,
1191
1194
  onClick: a,
1192
1195
  children: [
1193
1196
  /* @__PURE__ */ e(ve, { name: n, size: 40 }),
@@ -1199,10 +1202,9 @@ function Jn({ from: n, subject: l, preview: t, time: o, unread: i, hasAttachment
1199
1202
  ] }),
1200
1203
  /* @__PURE__ */ u("span", { className: "cms-mail-row__line", children: [
1201
1204
  /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1202
- /* @__PURE__ */ e("span", { className: "cms-mail-row__preview cms-mail-row__preview--after", children: t }),
1203
1205
  i ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": _.unread }) : null
1204
1206
  ] }),
1205
- /* @__PURE__ */ e("span", { className: "cms-mail-row__preview cms-mail-row__preview--below", children: t })
1207
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
1206
1208
  ] })
1207
1209
  ]
1208
1210
  }
@@ -1220,30 +1222,30 @@ function Qn({ direction: n, children: l, time: t, read: o, readLabel: i = "Read"
1220
1222
  ] })
1221
1223
  ] });
1222
1224
  }
1223
- function el({ label: n, value: l, onChange: t, onSend: o, onAttach: i, placeholder: s, variant: r = "chat", sendLabel: a = "Send", attachLabel: m = "Attach a file", leading: _, canSend: d }) {
1224
- const h = G(), c = d ?? l.trim() !== "", f = (g) => {
1225
- g.preventDefault(), c && o();
1225
+ function el({ label: n, value: l, onChange: t, onSend: o, onAttach: i, placeholder: s, variant: c = "chat", sendLabel: a = "Send", attachLabel: m = "Attach a file", leading: _, canSend: d }) {
1226
+ const h = G(), r = d ?? l.trim() !== "", f = (g) => {
1227
+ g.preventDefault(), r && o();
1226
1228
  }, p = i ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: i, children: /* @__PURE__ */ e(L, { name: "paperclip" }) }) : null;
1227
- return /* @__PURE__ */ u("form", { className: A("cms-composer", `cms-composer--${r}`), onSubmit: f, children: [
1228
- /* @__PURE__ */ e("label", { htmlFor: h, className: r === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1229
- r === "chat" ? p : null,
1229
+ return /* @__PURE__ */ u("form", { className: A("cms-composer", `cms-composer--${c}`), onSubmit: f, children: [
1230
+ /* @__PURE__ */ e("label", { htmlFor: h, className: c === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1231
+ c === "chat" ? p : null,
1230
1232
  /* @__PURE__ */ e(
1231
1233
  "textarea",
1232
1234
  {
1233
1235
  id: h,
1234
1236
  className: "cms-composer__input",
1235
- rows: r === "reply" ? 3 : 1,
1237
+ rows: c === "reply" ? 3 : 1,
1236
1238
  placeholder: s,
1237
1239
  value: l,
1238
1240
  onChange: (g) => t(g.target.value),
1239
1241
  onKeyDown: (g) => {
1240
- g.nativeEvent.isComposing || g.keyCode === 229 || r === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), c && o());
1242
+ g.nativeEvent.isComposing || g.keyCode === 229 || c === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), r && o());
1241
1243
  }
1242
1244
  }
1243
1245
  ),
1244
- r === "reply" && _ !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: _ }) : null,
1245
- r === "reply" ? p : null,
1246
- r === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": a, disabled: !c, children: /* @__PURE__ */ e(L, { name: "send" }) }) : /* @__PURE__ */ u("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !c, children: [
1246
+ c === "reply" && _ !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: _ }) : null,
1247
+ c === "reply" ? p : null,
1248
+ c === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": a, disabled: !r, children: /* @__PURE__ */ e(L, { name: "send" }) }) : /* @__PURE__ */ u("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !r, children: [
1247
1249
  a,
1248
1250
  " ",
1249
1251
  /* @__PURE__ */ e(L, { name: "send", size: 18 })
@@ -1272,11 +1274,11 @@ const Ee = {
1272
1274
  returnToCall: "Return to call"
1273
1275
  };
1274
1276
  function nl({ name: n, media: l, onAccept: t, onDecline: o, labels: i }) {
1275
- const s = ce(Ee, i), r = l === "video" ? s.incomingVideo : s.incomingAudio;
1276
- return /* @__PURE__ */ u("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(r, n), children: [
1277
+ const s = ce(Ee, i), c = l === "video" ? s.incomingVideo : s.incomingAudio;
1278
+ return /* @__PURE__ */ u("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(c, n), children: [
1277
1279
  /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ve, { name: n, size: 112 }) }),
1278
1280
  /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
1279
- /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: r }),
1281
+ /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: c }),
1280
1282
  /* @__PURE__ */ u("div", { className: "cms-call-incoming__actions", children: [
1281
1283
  /* @__PURE__ */ e(ae, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: o }),
1282
1284
  /* @__PURE__ */ e(ae, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
@@ -1298,33 +1300,33 @@ function ae({ icon: n, label: l, onClick: t, tone: o = "plain", pressed: i }) {
1298
1300
  }
1299
1301
  );
1300
1302
  }
1301
- function ll({ name: n, duration: l, connection: t, you: o, muted: i, speaker: s, onToggleMute: r, onToggleSpeaker: a, onAddPerson: m, onChat: _, onHangUp: d, labels: h }) {
1302
- const c = ce(Ee, h);
1303
- return /* @__PURE__ */ u("section", { className: "cms-call-panel", "aria-label": c.callWith(n), children: [
1303
+ function ll({ name: n, duration: l, connection: t, you: o, muted: i, speaker: s, onToggleMute: c, onToggleSpeaker: a, onAddPerson: m, onChat: _, onHangUp: d, labels: h }) {
1304
+ const r = ce(Ee, h);
1305
+ return /* @__PURE__ */ u("section", { className: "cms-call-panel", "aria-label": r.callWith(n), children: [
1304
1306
  /* @__PURE__ */ u("div", { className: "cms-call-panel__head", children: [
1305
1307
  /* @__PURE__ */ e(ve, { name: n, size: 64 }),
1306
1308
  /* @__PURE__ */ u("div", { className: "cms-call-panel__who", children: [
1307
1309
  /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1308
- /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": c.callTime(l), children: l })
1310
+ /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": r.callTime(l), children: l })
1309
1311
  ] }),
1310
- /* @__PURE__ */ e("span", { className: A("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? c.goodConnection : c.poorConnection })
1312
+ /* @__PURE__ */ e("span", { className: A("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? r.goodConnection : r.poorConnection })
1311
1313
  ] }),
1312
1314
  /* @__PURE__ */ u("div", { className: "cms-call-panel__you", children: [
1313
1315
  /* @__PURE__ */ e(ve, { name: o.name, size: 36 }),
1314
- /* @__PURE__ */ e("span", { children: c.you }),
1315
- o.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": c.speaking }) : null
1316
+ /* @__PURE__ */ e("span", { children: r.you }),
1317
+ o.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": r.speaking }) : null
1316
1318
  ] }),
1317
1319
  /* @__PURE__ */ u("div", { className: "cms-call-panel__controls", children: [
1318
- /* @__PURE__ */ e(ae, { icon: "mic", label: i ? c.unmute : c.mute, pressed: i, onClick: r }),
1319
- /* @__PURE__ */ e(ae, { icon: "speaker", label: c.speaker, pressed: s, onClick: a }),
1320
- m ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: c.addPerson, onClick: m }) : null,
1321
- _ ? /* @__PURE__ */ e(ae, { icon: "chat", label: c.chat, onClick: _ }) : null,
1322
- /* @__PURE__ */ e(ae, { icon: "phone-off", label: c.hangUp, tone: "hang-up", onClick: d })
1320
+ /* @__PURE__ */ e(ae, { icon: "mic", label: i ? r.unmute : r.mute, pressed: i, onClick: c }),
1321
+ /* @__PURE__ */ e(ae, { icon: "speaker", label: r.speaker, pressed: s, onClick: a }),
1322
+ m ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: r.addPerson, onClick: m }) : null,
1323
+ _ ? /* @__PURE__ */ e(ae, { icon: "chat", label: r.chat, onClick: _ }) : null,
1324
+ /* @__PURE__ */ e(ae, { icon: "phone-off", label: r.hangUp, tone: "hang-up", onClick: d })
1323
1325
  ] })
1324
1326
  ] });
1325
1327
  }
1326
- function tl({ name: n, duration: l, muted: t, onToggleMute: o, onReturn: i, onHangUp: s, labels: r }) {
1327
- const a = ce(Ee, r);
1328
+ function tl({ name: n, duration: l, muted: t, onToggleMute: o, onReturn: i, onHangUp: s, labels: c }) {
1329
+ const a = ce(Ee, c);
1328
1330
  return /* @__PURE__ */ u("section", { className: "cms-call-bar", "aria-label": a.callWith(n), children: [
1329
1331
  /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1330
1332
  /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: a.onCallWith(n) }),
@@ -1346,16 +1348,16 @@ function al({ mark: n, product: l, headline: t, lead: o, features: i = [], child
1346
1348
  /* @__PURE__ */ u("div", { className: "cms-signin__pitch", children: [
1347
1349
  /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
1348
1350
  /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: o }),
1349
- i.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: i.map((r) => /* @__PURE__ */ u("li", { children: [
1350
- /* @__PURE__ */ e(L, { name: r.icon, size: 18 }),
1351
- r.label
1352
- ] }, r.label)) }) : null
1351
+ i.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: i.map((c) => /* @__PURE__ */ u("li", { children: [
1352
+ /* @__PURE__ */ e(L, { name: c.icon, size: 18 }),
1353
+ c.label
1354
+ ] }, c.label)) }) : null
1353
1355
  ] })
1354
1356
  ] }),
1355
1357
  /* @__PURE__ */ e("main", { className: "cms-signin__form", children: s })
1356
1358
  ] });
1357
1359
  }
1358
- const bn = {
1360
+ const vn = {
1359
1361
  title: "Sign in",
1360
1362
  identifier: "Email or username",
1361
1363
  identifierPlaceholder: "name@example.com",
@@ -1367,8 +1369,8 @@ const bn = {
1367
1369
  newHere: "New here?",
1368
1370
  create: "Create an account"
1369
1371
  };
1370
- function sl({ server: n, onSubmit: l, forgotHref: t, createHref: o, error: i, busy: s, labels: r }) {
1371
- const a = ce(bn, r), m = G(), [_, d] = E(""), [h, c] = E(""), [f, p] = E(!1);
1372
+ function sl({ server: n, onSubmit: l, forgotHref: t, createHref: o, error: i, busy: s, labels: c }) {
1373
+ const a = ce(vn, c), m = G(), [_, d] = E(""), [h, r] = E(""), [f, p] = E(!1);
1372
1374
  return /* @__PURE__ */ u("form", { className: "cms-signin-form", onSubmit: (N) => {
1373
1375
  N.preventDefault(), l(_, h);
1374
1376
  }, "aria-describedby": i ? `${m}-error` : void 0, children: [
@@ -1401,7 +1403,7 @@ function sl({ server: n, onSubmit: l, forgotHref: t, createHref: o, error: i, bu
1401
1403
  type: f ? "text" : "password",
1402
1404
  autoComplete: "current-password",
1403
1405
  value: h,
1404
- onChange: (N) => c(N.target.value),
1406
+ onChange: (N) => r(N.target.value),
1405
1407
  required: !0
1406
1408
  }
1407
1409
  ),
@@ -1417,32 +1419,32 @@ function sl({ server: n, onSubmit: l, forgotHref: t, createHref: o, error: i, bu
1417
1419
  ] });
1418
1420
  }
1419
1421
  const we = 64;
1420
- function vn(n, l) {
1422
+ function gn(n, l) {
1421
1423
  for (let t = n instanceof Element ? n : null; t !== null; t = t.parentElement) {
1422
1424
  if (t instanceof HTMLElement && t.scrollTop > 0) return !1;
1423
1425
  if (t === l) return !0;
1424
1426
  }
1425
1427
  return l.scrollTop <= 0;
1426
1428
  }
1427
- function gn(n, l) {
1429
+ function Nn(n, l) {
1428
1430
  const [t, o] = E(0), i = R(l);
1429
1431
  return i.current = l, Y(() => {
1430
1432
  const s = n.current;
1431
1433
  if (s === null) return;
1432
- let r = null, a = 0;
1434
+ let c = null, a = 0;
1433
1435
  const m = (h) => {
1434
- r = vn(h.target, s) && h.touches.length === 1 ? h.touches[0].clientY : null, a = 0;
1436
+ c = gn(h.target, s) && h.touches.length === 1 ? h.touches[0].clientY : null, a = 0;
1435
1437
  }, _ = (h) => {
1436
- if (r === null || i.current === null) return;
1437
- const c = h.touches[0].clientY - r;
1438
- if (c <= 0) {
1439
- r = null, o(0);
1438
+ if (c === null || i.current === null) return;
1439
+ const r = h.touches[0].clientY - c;
1440
+ if (r <= 0) {
1441
+ c = null, o(0);
1440
1442
  return;
1441
1443
  }
1442
- h.cancelable && h.preventDefault(), a = Math.min(c * 0.6, we * 1.5), o(a);
1444
+ h.cancelable && h.preventDefault(), a = Math.min(r * 0.6, we * 1.5), o(a);
1443
1445
  }, d = () => {
1444
1446
  var h;
1445
- r !== null && a >= we && ((h = i.current) == null || h.call(i)), r = null, a = 0, o(0);
1447
+ c !== null && a >= we && ((h = i.current) == null || h.call(i)), c = null, a = 0, o(0);
1446
1448
  };
1447
1449
  return s.addEventListener("touchstart", m, { passive: !0 }), s.addEventListener("touchmove", _, { passive: !1 }), s.addEventListener("touchend", d), s.addEventListener("touchcancel", d), () => {
1448
1450
  s.removeEventListener("touchstart", m), s.removeEventListener("touchmove", _), s.removeEventListener("touchend", d), s.removeEventListener("touchcancel", d);
@@ -1450,15 +1452,15 @@ function gn(n, l) {
1450
1452
  }, [n]), t;
1451
1453
  }
1452
1454
  const Fe = Ue(null);
1453
- function Nn() {
1455
+ function yn() {
1454
1456
  return Ke(Fe);
1455
1457
  }
1456
- function rl({ label: n, rows: l, error: t, onRetry: o, loadingText: i = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: r, selected: a, onOpen: m, onRowMenu: _ }) {
1457
- const d = R([]), h = Nn();
1458
+ function rl({ label: n, rows: l, error: t, onRetry: o, loadingText: i = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: c, selected: a, onOpen: m, onRowMenu: _ }) {
1459
+ const d = R([]), h = yn();
1458
1460
  if (t != null) return /* @__PURE__ */ e(Ge, { message: t, onRetry: o });
1459
1461
  if (l === null) return /* @__PURE__ */ e(qe, { what: i, layout: "block" });
1460
- if (l.length === 0) return /* @__PURE__ */ e(Ye, { title: s, hint: r });
1461
- const c = (f, p, g) => {
1462
+ if (l.length === 0) return /* @__PURE__ */ e(Ye, { title: s, hint: c });
1463
+ const r = (f, p, g) => {
1462
1464
  var N;
1463
1465
  if (f.key === "ArrowDown" || f.key === "ArrowUp")
1464
1466
  f.preventDefault(), (N = d.current[Math.min(l.length - 1, Math.max(0, p + (f.key === "ArrowDown" ? 1 : -1)))]) == null || N.focus();
@@ -1488,7 +1490,7 @@ function rl({ label: n, rows: l, error: t, onRetry: o, loadingText: i = "Loading
1488
1490
  tabIndex: g || a == null && p === 0 ? 0 : -1,
1489
1491
  className: A("cms-list__row", g && "is-selected"),
1490
1492
  onClick: () => m == null ? void 0 : m(f.id),
1491
- onKeyDown: (N) => c(N, p, f.id),
1493
+ onKeyDown: (N) => r(N, p, f.id),
1492
1494
  onContextMenu: _ ? (N) => {
1493
1495
  N.preventDefault(), _(f.id, { x: N.clientX, y: N.clientY });
1494
1496
  } : void 0,
@@ -1510,34 +1512,34 @@ function rl({ label: n, rows: l, error: t, onRetry: o, loadingText: i = "Loading
1510
1512
  ] });
1511
1513
  }
1512
1514
  function He({ at: n, items: l, onClose: t, label: o = "Actions", focus: i = "first" }) {
1513
- const s = R(null), r = R(null), a = G(), [m, _] = E(n), d = l.filter((c) => c.offer.offered);
1515
+ const s = R(null), c = R(null), a = G(), [m, _] = E(n), d = l.filter((r) => r.offer.offered);
1514
1516
  if (xe(() => {
1515
1517
  if (!n) return;
1516
- const c = s.current, f = (c == null ? void 0 : c.offsetWidth) ?? 0, p = (c == null ? void 0 : c.offsetHeight) ?? 0;
1518
+ const r = s.current, f = (r == null ? void 0 : r.offsetWidth) ?? 0, p = (r == null ? void 0 : r.offsetHeight) ?? 0;
1517
1519
  _({ x: Math.max(0, Math.min(n.x, window.innerWidth - f)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
1518
1520
  }, [n]), Y(() => {
1519
1521
  var p, g;
1520
1522
  if (!n) return;
1521
- r.current = document.activeElement;
1522
- const c = Array.from(((p = s.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1523
- (g = i === "last" ? c[c.length - 1] : c[0]) == null || g.focus();
1523
+ c.current = document.activeElement;
1524
+ const r = Array.from(((p = s.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1525
+ (g = i === "last" ? r[r.length - 1] : r[0]) == null || g.focus();
1524
1526
  const f = (N) => {
1525
1527
  var w;
1526
1528
  (w = s.current) != null && w.contains(N.target) || t();
1527
1529
  };
1528
1530
  return document.addEventListener("mousedown", f), () => {
1529
1531
  var N, w;
1530
- document.removeEventListener("mousedown", f), (w = (N = r.current) == null ? void 0 : N.focus) == null || w.call(N);
1532
+ document.removeEventListener("mousedown", f), (w = (N = c.current) == null ? void 0 : N.focus) == null || w.call(N);
1531
1533
  };
1532
1534
  }, [n, t, i]), !n || d.length === 0) return null;
1533
- const h = (c) => {
1535
+ const h = (r) => {
1534
1536
  var g, N;
1535
1537
  const f = Array.from(((g = s.current) == null ? void 0 : g.querySelectorAll('[role="menuitem"]')) ?? []), p = f.indexOf(document.activeElement);
1536
- if (c.key === "Escape" || c.key === "Tab")
1537
- c.preventDefault(), t();
1538
- else if (c.key === "ArrowDown" || c.key === "ArrowUp") {
1539
- c.preventDefault();
1540
- const w = c.key === "ArrowDown" ? 1 : -1;
1538
+ if (r.key === "Escape" || r.key === "Tab")
1539
+ r.preventDefault(), t();
1540
+ else if (r.key === "ArrowDown" || r.key === "ArrowUp") {
1541
+ r.preventDefault();
1542
+ const w = r.key === "ArrowDown" ? 1 : -1;
1541
1543
  (N = f[(p + w + f.length) % f.length]) == null || N.focus();
1542
1544
  }
1543
1545
  };
@@ -1551,31 +1553,31 @@ function He({ at: n, items: l, onClose: t, label: o = "Actions", focus: i = "fir
1551
1553
  "aria-label": o,
1552
1554
  style: { left: (m ?? n).x, top: (m ?? n).y },
1553
1555
  onKeyDown: h,
1554
- onContextMenu: (c) => c.preventDefault(),
1555
- children: d.map((c) => {
1556
- const f = c.offer.refusal !== void 0;
1556
+ onContextMenu: (r) => r.preventDefault(),
1557
+ children: d.map((r) => {
1558
+ const f = r.offer.refusal !== void 0;
1557
1559
  return /* @__PURE__ */ u(
1558
1560
  "div",
1559
1561
  {
1560
1562
  role: "menuitem",
1561
1563
  tabIndex: -1,
1562
1564
  "aria-disabled": f || void 0,
1563
- "aria-describedby": f ? `${a}-${c.id}` : void 0,
1564
- title: f ? c.offer.refusal : void 0,
1565
- className: A("cms-menu__item", c.danger && "is-danger", c.offer.locked && "is-locked", f && "is-refused"),
1565
+ "aria-describedby": f ? `${a}-${r.id}` : void 0,
1566
+ title: f ? r.offer.refusal : void 0,
1567
+ className: A("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", f && "is-refused"),
1566
1568
  onClick: () => {
1567
- f || (t(), c.onSelect());
1569
+ f || (t(), r.onSelect());
1568
1570
  },
1569
1571
  onKeyDown: (p) => {
1570
- (p.key === "Enter" || p.key === " ") && !f && (p.preventDefault(), t(), c.onSelect());
1572
+ (p.key === "Enter" || p.key === " ") && !f && (p.preventDefault(), t(), r.onSelect());
1571
1573
  },
1572
1574
  children: [
1573
- c.offer.locked ? /* @__PURE__ */ e(z, { name: "lock" }) : null,
1574
- /* @__PURE__ */ e("span", { className: "cms-menu__label", children: c.label }),
1575
- f ? /* @__PURE__ */ e("span", { id: `${a}-${c.id}`, className: "cms-menu__refusal", children: c.offer.refusal }) : null
1575
+ r.offer.locked ? /* @__PURE__ */ e(z, { name: "lock" }) : null,
1576
+ /* @__PURE__ */ e("span", { className: "cms-menu__label", children: r.label }),
1577
+ f ? /* @__PURE__ */ e("span", { id: `${a}-${r.id}`, className: "cms-menu__refusal", children: r.offer.refusal }) : null
1576
1578
  ]
1577
1579
  },
1578
- c.id
1580
+ r.id
1579
1581
  );
1580
1582
  })
1581
1583
  }
@@ -1584,19 +1586,19 @@ function He({ at: n, items: l, onClose: t, label: o = "Actions", focus: i = "fir
1584
1586
  );
1585
1587
  }
1586
1588
  const De = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, $e = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
1587
- function yn(n) {
1589
+ function wn(n) {
1588
1590
  const l = /* @__PURE__ */ new Map();
1589
1591
  for (const t of n) l.set(t.group, [...l.get(t.group) ?? [], t]);
1590
1592
  return [...l.values()];
1591
1593
  }
1592
- function wn(n) {
1594
+ function kn(n) {
1593
1595
  const l = /* @__PURE__ */ new Map();
1594
1596
  for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
1595
1597
  return [...l.entries()].sort(([t], [o]) => t - o).map(([, t]) => t);
1596
1598
  }
1597
1599
  function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leading: s }) {
1598
- const r = R(null), a = R(null), [m, _] = E(De), [d, h] = E(null), [c, f] = E("first"), [p, g] = E(null), [N, w] = E(null), x = yn(l), S = wn(l), C = x.flat(), F = C.filter((v) => v.overflow === 0), H = C.filter((v) => v.overflow !== 0), ee = JSON.stringify([l.map((v) => [v.id, v.label, v.icon, v.group, v.overflow ?? null]), o ?? "", s !== void 0]), j = be(() => {
1599
- const v = r.current, T = a.current;
1600
+ const c = R(null), a = R(null), [m, _] = E(De), [d, h] = E(null), [r, f] = E("first"), [p, g] = E(null), [N, w] = E(null), x = wn(l), S = kn(l), C = x.flat(), F = C.filter((v) => v.overflow === 0), H = C.filter((v) => v.overflow !== 0), ee = JSON.stringify([l.map((v) => [v.id, v.label, v.icon, v.group, v.overflow ?? null]), o ?? "", s !== void 0]), j = be(() => {
1601
+ const v = c.current, T = a.current;
1600
1602
  if (v === null || T === null) return;
1601
1603
  const Z = getComputedStyle(v), W = parseFloat(Z.columnGap || "0") || 0, $ = v.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), q = (I) => {
1602
1604
  var U;
@@ -1633,7 +1635,7 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1633
1635
  _((I) => $e(I.bare, ge.bare) && $e(I.hidden, ge.hidden) ? I : ge);
1634
1636
  }, [ee]);
1635
1637
  xe(j, [j]), Y(() => {
1636
- const v = r.current;
1638
+ const v = c.current;
1637
1639
  if (v === null || typeof ResizeObserver > "u") return;
1638
1640
  const T = new ResizeObserver(() => j());
1639
1641
  return T.observe(v), () => T.disconnect();
@@ -1650,7 +1652,7 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1650
1652
  if (v.key === "ArrowRight" ? Z = Math.min(O.length - 1, T + 1) : v.key === "ArrowLeft" ? Z = Math.max(0, T - 1) : v.key === "Home" ? Z = 0 : v.key === "End" ? Z = O.length - 1 : v.key === "Escape" && w(J), Z === null) return;
1651
1653
  v.preventDefault();
1652
1654
  const W = O[Z] ?? null;
1653
- g(W), (q = ($ = r.current) == null ? void 0 : $.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || q.focus();
1655
+ g(W), (q = ($ = c.current) == null ? void 0 : $.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || q.focus();
1654
1656
  }, oe = D.map((v) => ({
1655
1657
  id: v.id,
1656
1658
  label: /* @__PURE__ */ u(M, { children: [
@@ -1666,7 +1668,7 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1666
1668
  return /* @__PURE__ */ u(
1667
1669
  "div",
1668
1670
  {
1669
- ref: r,
1671
+ ref: c,
1670
1672
  role: "toolbar",
1671
1673
  "aria-label": n,
1672
1674
  className: A(
@@ -1682,7 +1684,7 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1682
1684
  return /* @__PURE__ */ u("div", { className: "cms-pane-toolbar__group-wrap", children: [
1683
1685
  Z.length > 0 && W ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1684
1686
  /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: v.map(($) => /* @__PURE__ */ e(
1685
- kn,
1687
+ xn,
1686
1688
  {
1687
1689
  action: $,
1688
1690
  labels: !m.bare.has($.id),
@@ -1726,7 +1728,7 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1726
1728
  }
1727
1729
  ) : null,
1728
1730
  o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: o, children: o }) : null,
1729
- /* @__PURE__ */ e(He, { at: d, items: oe, onClose: () => h(null), label: i, focus: c }),
1731
+ /* @__PURE__ */ e(He, { at: d, items: oe, onClose: () => h(null), label: i, focus: r }),
1730
1732
  /* @__PURE__ */ u("div", { ref: a, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
1731
1733
  s !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: s }) : null,
1732
1734
  /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
@@ -1743,7 +1745,7 @@ function cl({ label: n, actions: l, onAction: t, status: o, moreLabel: i, leadin
1743
1745
  }
1744
1746
  );
1745
1747
  }
1746
- function kn({ action: n, labels: l, overflowed: t, pinned: o, tabbable: i, tipOff: s, onChoose: r, onFocus: a }) {
1748
+ function xn({ action: n, labels: l, overflowed: t, pinned: o, tabbable: i, tipOff: s, onChoose: c, onFocus: a }) {
1747
1749
  const [m, _] = E(!1);
1748
1750
  Y(() => {
1749
1751
  if (!n.busy) {
@@ -1753,7 +1755,7 @@ function kn({ action: n, labels: l, overflowed: t, pinned: o, tabbable: i, tipOf
1753
1755
  const w = setTimeout(() => _(!0), ye);
1754
1756
  return () => clearTimeout(w);
1755
1757
  }, [n.busy]);
1756
- const d = re(n.icon) === null, h = l || d, c = n.disabled && n.reason ? n.reason : null, f = c ?? (h ? null : n.label), p = G(), [g, N] = E(!1);
1758
+ const d = re(n.icon) === null, h = l || d, r = n.disabled && n.reason ? n.reason : null, f = r ?? (h ? null : n.label), p = G(), [g, N] = E(!1);
1757
1759
  return /* @__PURE__ */ u(
1758
1760
  "button",
1759
1761
  {
@@ -1767,8 +1769,8 @@ function kn({ action: n, labels: l, overflowed: t, pinned: o, tabbable: i, tipOf
1767
1769
  "aria-label": n.label,
1768
1770
  "aria-disabled": n.disabled || void 0,
1769
1771
  "aria-busy": n.busy || void 0,
1770
- ...c === null ? {} : { "aria-describedby": p },
1771
- ...g && c !== null ? { "data-reason-shown": "" } : {},
1772
+ ...r === null ? {} : { "aria-describedby": p },
1773
+ ...g && r !== null ? { "data-reason-shown": "" } : {},
1772
1774
  tabIndex: i ? 0 : -1,
1773
1775
  onFocus: a,
1774
1776
  onBlur: () => N(!1),
@@ -1776,12 +1778,12 @@ function kn({ action: n, labels: l, overflowed: t, pinned: o, tabbable: i, tipOf
1776
1778
  w.key === "Escape" && N(!1);
1777
1779
  },
1778
1780
  onClick: () => {
1779
- c !== null ? N(!0) : !n.disabled && !n.busy && r();
1781
+ r !== null ? N(!0) : !n.disabled && !n.busy && c();
1780
1782
  },
1781
1783
  children: [
1782
1784
  m ? /* @__PURE__ */ e(z, { name: "spinner" }) : /* @__PURE__ */ e(_e, { name: n.icon }),
1783
1785
  h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
1784
- c !== null || f !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: f }) : null
1786
+ r !== null || f !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: f }) : null
1785
1787
  ]
1786
1788
  }
1787
1789
  );
@@ -1790,8 +1792,8 @@ function _e({ name: n }) {
1790
1792
  const l = re(n);
1791
1793
  return l === null ? null : /* @__PURE__ */ e(L, { name: l, size: 18 });
1792
1794
  }
1793
- function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel: i, expandLabel: s, collapseLabel: r, action: a = null, onRead: m, leading: _ }) {
1794
- const [d, h] = E(!1), c = G(), f = () => {
1795
+ function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel: i, expandLabel: s, collapseLabel: c, action: a = null, onRead: m, leading: _ }) {
1796
+ const [d, h] = E(!1), r = G(), f = () => {
1795
1797
  o && m();
1796
1798
  }, p = (a == null ? void 0 : a.presentation) === "row" && a.onAction !== void 0, g = (a == null ? void 0 : a.presentation) === "button" && a.onAction !== void 0 ? a : null, N = () => {
1797
1799
  var w;
@@ -1804,7 +1806,7 @@ function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel:
1804
1806
  className: "cms-notification__row",
1805
1807
  role: "button",
1806
1808
  tabIndex: 0,
1807
- "aria-describedby": l === null ? void 0 : c,
1809
+ "aria-describedby": l === null ? void 0 : r,
1808
1810
  onClick: N,
1809
1811
  onKeyDown: (w) => {
1810
1812
  w.target !== w.currentTarget || w.key !== "Enter" && w.key !== " " || (w.preventDefault(), N());
@@ -1822,7 +1824,7 @@ function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel:
1822
1824
  ] }),
1823
1825
  t !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: t }) : null
1824
1826
  ] }),
1825
- l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: c, children: l }) : null
1827
+ l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: r, children: l }) : null
1826
1828
  ] }),
1827
1829
  o ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
1828
1830
  ]
@@ -1834,9 +1836,9 @@ function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel:
1834
1836
  type: "button",
1835
1837
  className: "cms-notification__chevron",
1836
1838
  "aria-expanded": d,
1837
- "aria-controls": c,
1838
- "aria-label": d ? r : s,
1839
- title: d ? r : s,
1839
+ "aria-controls": r,
1840
+ "aria-label": d ? c : s,
1841
+ title: d ? c : s,
1840
1842
  onClick: () => {
1841
1843
  d || f(), h((w) => !w);
1842
1844
  },
@@ -1857,11 +1859,11 @@ function il({ title: n, body: l = null, time: t = null, unread: o, unreadLabel:
1857
1859
  ) : null
1858
1860
  ] });
1859
1861
  }
1860
- function xn(n) {
1862
+ function Mn(n) {
1861
1863
  return n === "allowed" || n === "elevate" || n === "denied";
1862
1864
  }
1863
1865
  function ol(n, l) {
1864
- if (!xn(n))
1866
+ if (!Mn(n))
1865
1867
  return l.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
1866
1868
  switch (n) {
1867
1869
  case "allowed":
@@ -1872,13 +1874,13 @@ function ol(n, l) {
1872
1874
  return l.showRefused ? { offered: !0, locked: !1, refusal: l.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
1873
1875
  }
1874
1876
  }
1875
- function Mn(n, l) {
1877
+ function Cn(n, l) {
1876
1878
  if (!n) return;
1877
1879
  if (typeof n.get == "function") return n.get(l) ?? void 0;
1878
1880
  const t = n, o = Object.keys(t).find((i) => i.toLowerCase() === l.toLowerCase());
1879
1881
  return o === void 0 ? void 0 : t[o];
1880
1882
  }
1881
- function Cn(n) {
1883
+ function Sn(n) {
1882
1884
  if (n && typeof n == "object") {
1883
1885
  const l = n;
1884
1886
  if (typeof l.detail == "string" && l.detail !== "") return l.detail;
@@ -1887,24 +1889,24 @@ function Cn(n) {
1887
1889
  }
1888
1890
  function dl(n, l, t, o) {
1889
1891
  if (n !== 403) return { kind: "none" };
1890
- const i = Cn(t);
1891
- return Mn(l, "X-Elevation-Required") !== void 0 ? o.elevates ? { kind: "elevation-required", message: i ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: i ?? "The server refused this." };
1892
+ const i = Sn(t);
1893
+ return Cn(l, "X-Elevation-Required") !== void 0 ? o.elevates ? { kind: "elevation-required", message: i ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: i ?? "The server refused this." };
1892
1894
  }
1893
1895
  const ke = "coolms-kit:reread";
1894
1896
  function ul() {
1895
1897
  window.dispatchEvent(new Event(ke));
1896
1898
  }
1897
1899
  function ml(n) {
1898
- const [l, t] = E(void 0), [o, i] = E(void 0), [s, r] = E(!0), a = R(n);
1900
+ const [l, t] = E(void 0), [o, i] = E(void 0), [s, c] = E(!0), a = R(n);
1899
1901
  a.current = n;
1900
1902
  const m = R(0), _ = be(() => {
1901
1903
  const d = ++m.current;
1902
- r(!0), a.current().then(
1904
+ c(!0), a.current().then(
1903
1905
  (h) => {
1904
- d === m.current && (t(h), i(void 0), r(!1));
1906
+ d === m.current && (t(h), i(void 0), c(!1));
1905
1907
  },
1906
1908
  (h) => {
1907
- d === m.current && (i(h), r(!1));
1909
+ d === m.current && (i(h), c(!1));
1908
1910
  }
1909
1911
  );
1910
1912
  }, []);
@@ -1919,20 +1921,20 @@ function ml(n) {
1919
1921
  function hl(n) {
1920
1922
  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 };
1921
1923
  }
1922
- const Sn = "/errors/client-update-required";
1923
- function En(n, l) {
1924
+ const En = "/errors/client-update-required";
1925
+ function An(n, l) {
1924
1926
  const t = n.split(".").map((i) => Number.parseInt(i, 10) || 0), o = l.split(".").map((i) => Number.parseInt(i, 10) || 0);
1925
1927
  for (let i = 0; i < Math.max(t.length, o.length); i++) {
1926
- const s = t[i] ?? 0, r = o[i] ?? 0;
1927
- if (s !== r) return s < r;
1928
+ const s = t[i] ?? 0, c = o[i] ?? 0;
1929
+ if (s !== c) return s < c;
1928
1930
  }
1929
1931
  return !1;
1930
1932
  }
1931
1933
  function fl(n) {
1932
- return n.problemType !== void 0 && n.problemType.endsWith(Sn) ? !0 : n.minimumVersion !== void 0 && En(n.version, n.minimumVersion);
1934
+ return n.problemType !== void 0 && n.problemType.endsWith(En) ? !0 : n.minimumVersion !== void 0 && An(n.version, n.minimumVersion);
1933
1935
  }
1934
- const Ie = 4, An = 48, Tn = 800, Ln = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
1935
- function Dn(n, l) {
1936
+ const Ie = 4, Tn = 48, Ln = 800, Dn = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
1937
+ function $n(n, l) {
1936
1938
  const [t, o] = E(!1);
1937
1939
  return Y(() => {
1938
1940
  const i = n.current;
@@ -1941,37 +1943,37 @@ function Dn(n, l) {
1941
1943
  return;
1942
1944
  }
1943
1945
  const s = /* @__PURE__ */ new WeakMap();
1944
- let r = Number.NEGATIVE_INFINITY, a = null;
1945
- const m = (c) => {
1946
- r = performance.now(), a = c.target;
1947
- }, _ = (c) => {
1948
- const f = c.target;
1949
- !(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && Ln.has(c.key) && m(c);
1950
- }, d = (c) => {
1951
- const f = c.target;
1946
+ let c = Number.NEGATIVE_INFINITY, a = null;
1947
+ const m = (r) => {
1948
+ c = performance.now(), a = r.target;
1949
+ }, _ = (r) => {
1950
+ const f = r.target;
1951
+ !(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && Dn.has(r.key) && m(r);
1952
+ }, d = (r) => {
1953
+ const f = r.target;
1952
1954
  if (!(f instanceof HTMLElement)) return;
1953
1955
  const p = f.scrollTop, g = s.get(f) ?? 0;
1954
1956
  if (s.set(f, p), p <= 0) {
1955
1957
  o(!1);
1956
1958
  return;
1957
1959
  }
1958
- performance.now() - r > Tn || !(a === i || a === document.body || a instanceof Node && f.contains(a)) || (p < g - Ie ? o(!1) : p > g + Ie && p > An && o(!0));
1960
+ performance.now() - c > Ln || !(a === i || a === document.body || a instanceof Node && f.contains(a)) || (p < g - Ie ? o(!1) : p > g + Ie && p > Tn && o(!0));
1959
1961
  }, h = [["wheel", m], ["touchmove", m], ["pointerdown", m], ["keydown", _]];
1960
- for (const [c, f] of h) i.addEventListener(c, f, { capture: !0, passive: !0 });
1962
+ for (const [r, f] of h) i.addEventListener(r, f, { capture: !0, passive: !0 });
1961
1963
  return i.addEventListener("scroll", d, { capture: !0, passive: !0 }), () => {
1962
- for (const [c, f] of h) i.removeEventListener(c, f, { capture: !0 });
1964
+ for (const [r, f] of h) i.removeEventListener(r, f, { capture: !0 });
1963
1965
  i.removeEventListener("scroll", d, { capture: !0 });
1964
1966
  };
1965
1967
  }, [n, l]), [t, o];
1966
1968
  }
1967
- function pl({ title: n, back: l, navigation: t, search: o, searching: i, globals: s, filters: r, primary: a, onRefresh: m, pullText: _, barHidden: d, children: h }) {
1968
- const c = R(null), f = R(null), [p, g] = E(!1), [N, w] = E(null), S = gn(f, m === void 0 ? null : () => {
1969
+ function pl({ title: n, back: l, navigation: t, search: o, searching: i, globals: s, filters: c, primary: a, onRefresh: m, pullText: _, barHidden: d, children: h }) {
1970
+ const r = R(null), f = R(null), [p, g] = E(!1), [N, w] = E(null), S = Nn(f, m === void 0 ? null : () => {
1969
1971
  p || (g(!0), m().finally(() => g(!1)));
1970
- }), C = m === void 0 ? null : { distance: S, refreshing: p, text: _ ?? null }, F = i !== void 0 || S > 0 || p, [H, ee] = Dn(c, d === void 0 && !F), j = !F && (d ?? H);
1972
+ }), C = m === void 0 ? null : { distance: S, refreshing: p, text: _ ?? null }, F = i !== void 0 || S > 0 || p, [H, ee] = $n(r, d === void 0 && !F), j = !F && (d ?? H);
1971
1973
  return /* @__PURE__ */ u(
1972
1974
  "div",
1973
1975
  {
1974
- ref: c,
1976
+ ref: r,
1975
1977
  className: A("cms-screen", a !== void 0 && "cms-screen--with-primary"),
1976
1978
  "data-bar-hidden": j ? "" : void 0,
1977
1979
  onFocus: (y) => {
@@ -1995,7 +1997,7 @@ function pl({ title: n, back: l, navigation: t, search: o, searching: i, globals
1995
1997
  s
1996
1998
  ] })
1997
1999
  ] }),
1998
- r !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(hn, { label: r.label, options: r.options, value: r.selected, onChange: r.onSelect }) }) : null,
2000
+ c !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(fn, { label: c.label, options: c.options, value: c.selected, onChange: c.onSelect }) }) : null,
1999
2001
  /* @__PURE__ */ e("div", { ref: f, className: "cms-screen__content", "data-pulling": S > 0 ? "" : void 0, "data-refreshing": p ? "" : void 0, children: /* @__PURE__ */ e(Fe.Provider, { value: C, children: h }) }),
2000
2002
  a !== void 0 ? /* @__PURE__ */ e(
2001
2003
  "button",
@@ -2024,65 +2026,65 @@ export {
2024
2026
  Yn as AppShell,
2025
2027
  ve as Avatar,
2026
2028
  Ae as BOOTSTRAP_ICONS,
2027
- mn as Badge,
2029
+ hn as Badge,
2028
2030
  le as Button,
2029
2031
  Ee as CALL_LABELS,
2030
- Sn as CLIENT_UPDATE_REQUIRED,
2032
+ En as CLIENT_UPDATE_REQUIRED,
2031
2033
  tl as CallBar,
2032
2034
  ll as CallPanel,
2033
2035
  Qn as ChatBubble,
2034
2036
  el as Composer,
2035
- On as ConfirmDialog,
2037
+ Kn as ConfirmDialog,
2036
2038
  He as ContextMenu,
2037
2039
  Ye as EmptyState,
2038
2040
  Ge as ErrorBanner,
2039
2041
  Wn as FilePicker,
2040
- rn as FilePickerDenied,
2042
+ cn as FilePickerDenied,
2041
2043
  Vn as FileViewer,
2042
- hn as FilterChips,
2043
- zn as ICON_NAMES,
2044
+ fn as FilterChips,
2045
+ Zn as ICON_NAMES,
2044
2046
  L as Icon,
2045
2047
  nl as IncomingCall,
2046
2048
  rl as List,
2047
2049
  qe as Loading,
2048
- _n as MAIL_ROW_LABELS,
2050
+ bn as MAIL_ROW_LABELS,
2049
2051
  je as MODAL_CLOSE_MS,
2050
2052
  Jn as MailRow,
2051
2053
  Pe as Modal,
2052
- Zn as NamedIcon,
2054
+ Je as NamedIcon,
2053
2055
  il as Notification,
2054
2056
  we as PULL_AT,
2055
2057
  jn as PageHeader,
2056
2058
  cl as PaneToolbar,
2057
- bn as SIGN_IN_LABELS,
2059
+ vn as SIGN_IN_LABELS,
2058
2060
  ye as STATE_DELAY_MS,
2059
2061
  pl as ScreenShell,
2060
2062
  Gn as SearchField,
2061
- Hn as Select,
2063
+ Rn as Select,
2062
2064
  sl as SignInForm,
2063
2065
  al as SignInLayout,
2064
2066
  Xn as SplitPanes,
2065
2067
  ne as State,
2066
2068
  qn as TabStrip,
2067
- Fn as TextArea,
2068
- Bn as TextField,
2069
- Kn as Toast,
2070
- Un as ToastRegion,
2071
- Rn as Toggle,
2072
- fn as fitPanes,
2069
+ Hn as TextArea,
2070
+ Fn as TextField,
2071
+ Un as Toast,
2072
+ zn as ToastRegion,
2073
+ On as Toggle,
2074
+ pn as fitPanes,
2073
2075
  re as iconForName,
2074
- dn as initialsOf,
2075
- xn as isCapability,
2076
+ un as initialsOf,
2077
+ Mn as isCapability,
2076
2078
  fl as needsClientUpdate,
2077
2079
  ol as offerFor,
2078
2080
  hl as readConflict,
2079
2081
  dl as readRefusal,
2080
- Cn as refusalText,
2082
+ Sn as refusalText,
2081
2083
  ul as rereadAll,
2082
- un as tintOf,
2083
- gn as usePull,
2084
- Nn as usePullState,
2084
+ mn as tintOf,
2085
+ Nn as usePull,
2086
+ yn as usePullState,
2085
2087
  ml as useReread,
2086
- En as versionBelow,
2088
+ An as versionBelow,
2087
2089
  Ve as writtenOut
2088
2090
  };