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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { jsx as e, jsxs as u, Fragment as M } from "react/jsx-runtime";
2
- import { useId as G, useState as E, useRef as F, useEffect as Y, useCallback as be, useMemo as Oe, useLayoutEffect as ge, useContext as Ke, createContext as Ue } from "react";
3
- import { createPortal as Me } from "react-dom";
4
- function ce(n, l) {
1
+ import { jsx as e, jsxs as i, Fragment as M } from "react/jsx-runtime";
2
+ import { useId as Y, useState as E, useRef as I, useEffect as q, useCallback as _e, useMemo as Ke, useContext as Oe, createContext as Ue, useLayoutEffect as Ne } from "react";
3
+ import { createPortal as Ce } from "react-dom";
4
+ function de(n, l) {
5
5
  const t = { ...n };
6
- for (const i of Object.keys(l ?? {})) {
7
- const c = l == null ? void 0 : l[i];
8
- c !== void 0 && (t[i] = c);
6
+ for (const d of Object.keys(l ?? {})) {
7
+ const c = l == null ? void 0 : l[d];
8
+ c !== void 0 && (t[d] = c);
9
9
  }
10
10
  return t;
11
11
  }
12
- function A(...n) {
12
+ function T(...n) {
13
13
  return n.filter(Boolean).join(" ");
14
14
  }
15
- function z({ name: n }) {
15
+ function U({ name: n }) {
16
16
  const l = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
17
17
  switch (n) {
18
18
  case "lock":
@@ -31,34 +31,34 @@ function z({ name: n }) {
31
31
  return /* @__PURE__ */ e("svg", { ...l, className: "cms-glyph", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
32
32
  }
33
33
  }
34
- function le({
34
+ function te({
35
35
  variant: n = "secondary",
36
36
  busy: l = !1,
37
37
  busyLabel: t,
38
- locked: i = !1,
38
+ locked: d = !1,
39
39
  lockedReason: c,
40
- icon: s,
41
- disabled: d,
42
- className: r,
43
- children: f,
44
- type: _ = "button",
40
+ icon: r,
41
+ disabled: m,
42
+ className: s,
43
+ children: h,
44
+ type: b = "button",
45
45
  title: o,
46
- ...m
46
+ ...u
47
47
  }) {
48
- const a = !!d || l;
49
- return /* @__PURE__ */ u(
48
+ const a = !!m || l;
49
+ return /* @__PURE__ */ i(
50
50
  "button",
51
51
  {
52
- ...m,
53
- type: _,
54
- className: A("cms-button", `cms-button--${n}`, l && "is-busy", i && "is-locked", r),
52
+ ...u,
53
+ type: b,
54
+ className: T("cms-button", `cms-button--${n}`, l && "is-busy", d && "is-locked", s),
55
55
  disabled: a,
56
56
  "aria-busy": l || void 0,
57
- title: i ? c ?? o : o,
57
+ title: d ? c ?? o : o,
58
58
  children: [
59
- l ? /* @__PURE__ */ e(z, { name: "spinner" }) : i ? /* @__PURE__ */ e(z, { name: "lock" }) : s,
60
- /* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : f }),
61
- i && c ? /* @__PURE__ */ u("span", { className: "cms-visually-hidden", children: [
59
+ l ? /* @__PURE__ */ e(U, { name: "spinner" }) : d ? /* @__PURE__ */ e(U, { name: "lock" }) : r,
60
+ /* @__PURE__ */ e("span", { className: "cms-button__label", children: l && t !== void 0 ? t : h }),
61
+ d && c ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
62
62
  ", ",
63
63
  c
64
64
  ] }) : null
@@ -66,45 +66,45 @@ function le({
66
66
  }
67
67
  );
68
68
  }
69
- function Ce({ id: n, label: l, help: t, error: i, pinned: c, children: s }) {
70
- return /* @__PURE__ */ u("div", { className: A("cms-field", i != null && "is-invalid"), children: [
69
+ function Se({ id: n, label: l, help: t, error: d, pinned: c, children: r }) {
70
+ return /* @__PURE__ */ i("div", { className: T("cms-field", d != null && "is-invalid"), children: [
71
71
  /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: l }),
72
- s,
73
- c != null ? /* @__PURE__ */ u("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
74
- /* @__PURE__ */ e(z, { name: "lock" }),
72
+ r,
73
+ c != null ? /* @__PURE__ */ i("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
74
+ /* @__PURE__ */ e(U, { name: "lock" }),
75
75
  " ",
76
76
  c
77
77
  ] }) : null,
78
- i != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: i }) : null,
78
+ d != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: d }) : null,
79
79
  t != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: t }) : null
80
80
  ] });
81
81
  }
82
- function Se(n, l) {
82
+ function Ee(n, l) {
83
83
  const t = [l.error != null && `${n}-error`, l.pinned != null && `${n}-pinned`, l.help != null && `${n}-help`].filter(Boolean).join(" ");
84
84
  return t === "" ? void 0 : t;
85
85
  }
86
86
  const ze = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Ve = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
87
87
  function Ze(n, l, t) {
88
- const i = (s, d, r, f = 0, _ = 0, o = 0) => {
89
- const m = new Date(Date.UTC(s, d - 1, r, f, _, o));
90
- return m.setUTCFullYear(s), m.getUTCFullYear() === s && m.getUTCMonth() === d - 1 && m.getUTCDate() === r && m.getUTCHours() === f && m.getUTCMinutes() === _ && m.getUTCSeconds() === o ? m : null;
91
- }, c = (s) => ({ hour: Number(s[1]), minute: Number(s[2]), second: Number(s[3] ?? 0) });
88
+ const d = (r, m, s, h = 0, b = 0, o = 0) => {
89
+ const u = new Date(Date.UTC(r, m - 1, s, h, b, o));
90
+ return u.setUTCFullYear(r), u.getUTCFullYear() === r && u.getUTCMonth() === m - 1 && u.getUTCDate() === s && u.getUTCHours() === h && u.getUTCMinutes() === b && u.getUTCSeconds() === o ? u : null;
91
+ }, c = (r) => ({ hour: Number(r[1]), minute: Number(r[2]), second: Number(r[3] ?? 0) });
92
92
  try {
93
93
  if (n === "time") {
94
- const d = l.match(Ve);
95
- if (d === null) return l;
96
- const r = c(d), f = i(2e3, 1, 1, r.hour, r.minute, r.second);
97
- return f === null ? l : new Intl.DateTimeFormat(t, { timeStyle: d[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(f);
94
+ const m = l.match(Ve);
95
+ if (m === null) return l;
96
+ const s = c(m), h = d(2e3, 1, 1, s.hour, s.minute, s.second);
97
+ return h === null ? l : new Intl.DateTimeFormat(t, { timeStyle: m[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(h);
98
98
  }
99
- const s = l.match(ze);
100
- if (s === null) return l;
101
- if (n === "date" && s[4] === void 0) {
102
- const d = i(Number(s[1]), Number(s[2]), Number(s[3]));
103
- return d === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(d);
99
+ const r = l.match(ze);
100
+ if (r === null) return l;
101
+ if (n === "date" && r[4] === void 0) {
102
+ const m = d(Number(r[1]), Number(r[2]), Number(r[3]));
103
+ return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeZone: "UTC" }).format(m);
104
104
  }
105
- if (n === "datetime-local" && s[4] !== void 0) {
106
- const d = i(Number(s[1]), Number(s[2]), Number(s[3]), Number(s[4]), Number(s[5]), Number(s[6] ?? 0));
107
- return d === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: s[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(d);
105
+ if (n === "datetime-local" && r[4] !== void 0) {
106
+ const m = d(Number(r[1]), Number(r[2]), Number(r[3]), Number(r[4]), Number(r[5]), Number(r[6] ?? 0));
107
+ return m === null ? l : new Intl.DateTimeFormat(t, { dateStyle: "medium", timeStyle: r[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
108
108
  }
109
109
  } catch {
110
110
  return l;
@@ -112,343 +112,349 @@ function Ze(n, l, t) {
112
112
  return l;
113
113
  }
114
114
  const We = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
115
- function Fn({ label: n, help: l, error: t, disabled: i, readOnly: c, pinned: s, value: d, onChange: r, placeholder: f, type: _ = "text", name: o, locale: m, min: a, max: h, step: p, minLength: v, maxLength: N, required: w }) {
116
- const x = G(), S = c === !0 || s != null, C = S && We.has(_), R = _ === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
117
- return /* @__PURE__ */ e(Ce, { id: x, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
115
+ function Rn({ label: n, help: l, error: t, disabled: d, readOnly: c, pinned: r, value: m, onChange: s, placeholder: h, type: b = "text", name: o, locale: u, min: a, max: f, step: p, minLength: _, maxLength: N, required: y }) {
116
+ const x = Y(), C = c === !0 || r != null, S = C && We.has(b), F = b === "number" && (p === "any" || typeof p == "number" && !Number.isInteger(p));
117
+ return /* @__PURE__ */ e(Se, { id: x, label: n, help: l, error: t, pinned: r, children: /* @__PURE__ */ e(
118
118
  "input",
119
119
  {
120
120
  id: x,
121
121
  name: o,
122
- type: C ? "text" : _,
122
+ type: S ? "text" : b,
123
123
  className: "cms-input",
124
- value: C ? Ze(_, d, m) : d,
125
- ...C ? { "data-value": d } : {},
126
- lang: m,
127
- placeholder: f,
128
- disabled: i,
129
- readOnly: S,
130
- required: w,
131
- "aria-required": w || void 0,
132
- min: C ? void 0 : a,
133
- max: C ? void 0 : h,
134
- step: C ? void 0 : p,
135
- minLength: v,
124
+ value: S ? Ze(b, m, u) : m,
125
+ ...S ? { "data-value": m } : {},
126
+ lang: u,
127
+ placeholder: h,
128
+ disabled: d,
129
+ readOnly: C,
130
+ required: y,
131
+ "aria-required": y || void 0,
132
+ min: S ? void 0 : a,
133
+ max: S ? void 0 : f,
134
+ step: S ? void 0 : p,
135
+ minLength: _,
136
136
  maxLength: N,
137
- inputMode: _ === "number" ? R ? "decimal" : "numeric" : void 0,
137
+ inputMode: b === "number" ? F ? "decimal" : "numeric" : void 0,
138
138
  "aria-invalid": t != null || void 0,
139
- "aria-describedby": Se(x, { help: l, error: t, pinned: s }),
140
- onChange: (H) => r == null ? void 0 : r(H.target.value)
139
+ "aria-describedby": Ee(x, { help: l, error: t, pinned: r }),
140
+ onChange: (R) => s == null ? void 0 : s(R.target.value)
141
141
  }
142
142
  ) });
143
143
  }
144
- function Rn({ label: n, help: l, error: t, disabled: i, readOnly: c, pinned: s, value: d, onChange: r, placeholder: f, rows: _ = 4, name: o, locale: m, minLength: a, maxLength: h, required: p }) {
145
- const v = G();
146
- return /* @__PURE__ */ e(Ce, { id: v, label: n, help: l, error: t, pinned: s, children: /* @__PURE__ */ e(
144
+ function Hn({ label: n, help: l, error: t, disabled: d, readOnly: c, pinned: r, value: m, onChange: s, placeholder: h, rows: b = 4, name: o, locale: u, minLength: a, maxLength: f, required: p }) {
145
+ const _ = Y();
146
+ return /* @__PURE__ */ e(Se, { id: _, label: n, help: l, error: t, pinned: r, children: /* @__PURE__ */ e(
147
147
  "textarea",
148
148
  {
149
- id: v,
149
+ id: _,
150
150
  name: o,
151
151
  className: "cms-input cms-textarea",
152
- rows: _,
153
- value: d,
154
- lang: m,
155
- placeholder: f,
156
- disabled: i,
157
- readOnly: c === !0 || s != null,
152
+ rows: b,
153
+ value: m,
154
+ lang: u,
155
+ placeholder: h,
156
+ disabled: d,
157
+ readOnly: c === !0 || r != null,
158
158
  required: p,
159
159
  "aria-required": p || void 0,
160
160
  minLength: a,
161
- maxLength: h,
161
+ maxLength: f,
162
162
  "aria-invalid": t != null || void 0,
163
- "aria-describedby": Se(v, { help: l, error: t, pinned: s }),
164
- onChange: (N) => r == null ? void 0 : r(N.target.value)
163
+ "aria-describedby": Ee(_, { help: l, error: t, pinned: r }),
164
+ onChange: (N) => s == null ? void 0 : s(N.target.value)
165
165
  }
166
166
  ) });
167
167
  }
168
- function Hn({ label: n, help: l, error: t, disabled: i, readOnly: c, value: s, options: d, onChange: r, emptyText: f = "Nothing to choose from yet.", name: _ }) {
169
- const o = G(), m = d.length === 0;
170
- return /* @__PURE__ */ e(Ce, { id: o, label: n, help: m ? f : l, error: t, children: /* @__PURE__ */ e(
168
+ function Kn({ label: n, help: l, error: t, disabled: d, readOnly: c, value: r, options: m, onChange: s, emptyText: h = "Nothing to choose from yet.", name: b }) {
169
+ const o = Y(), u = m.length === 0;
170
+ return /* @__PURE__ */ e(Se, { id: o, label: n, help: u ? h : l, error: t, children: /* @__PURE__ */ e(
171
171
  "select",
172
172
  {
173
173
  id: o,
174
- name: _,
174
+ name: b,
175
175
  className: "cms-input cms-select",
176
- value: s,
177
- disabled: i || m,
176
+ value: r,
177
+ disabled: d || u,
178
178
  "aria-readonly": c || void 0,
179
179
  "aria-invalid": t != null || void 0,
180
- "aria-describedby": Se(o, { help: m ? f : l, error: t }),
180
+ "aria-describedby": Ee(o, { help: u ? h : l, error: t }),
181
181
  onChange: (a) => {
182
- c || r == null || r(a.target.value);
182
+ c || s == null || s(a.target.value);
183
183
  },
184
- children: d.map((a) => /* @__PURE__ */ e("option", { value: a.value, disabled: c && a.value !== s, children: a.label }, a.value))
184
+ children: m.map((a) => /* @__PURE__ */ e("option", { value: a.value, disabled: c && a.value !== r, children: a.label }, a.value))
185
185
  }
186
186
  ) });
187
187
  }
188
- function On({ label: n, checked: l, onChange: t, disabled: i, readOnly: c, help: s }) {
189
- const d = G();
190
- return /* @__PURE__ */ u("div", { className: "cms-toggle-row", children: [
188
+ function On({ label: n, checked: l, onChange: t, disabled: d, readOnly: c, help: r }) {
189
+ const m = Y();
190
+ return /* @__PURE__ */ i("div", { className: "cms-toggle-row", children: [
191
191
  /* @__PURE__ */ e(
192
192
  "button",
193
193
  {
194
- id: d,
194
+ id: m,
195
195
  type: "button",
196
196
  role: "switch",
197
- className: A("cms-toggle", l && "is-on"),
197
+ className: T("cms-toggle", l && "is-on"),
198
198
  "aria-checked": l,
199
199
  "aria-readonly": c || void 0,
200
- "aria-describedby": s != null ? `${d}-help` : void 0,
201
- disabled: i,
200
+ "aria-describedby": r != null ? `${m}-help` : void 0,
201
+ disabled: d,
202
202
  onClick: () => {
203
203
  c || t == null || t(!l);
204
204
  },
205
205
  children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
206
206
  }
207
207
  ),
208
- /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: d, children: n }),
209
- s != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${d}-help`, children: s }) : null
208
+ /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: m, children: n }),
209
+ r != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${m}-help`, children: r }) : null
210
210
  ] });
211
211
  }
212
212
  const je = 150;
213
- function Pe({ open: n, title: l, onClose: t, dirty: i = !1, onDirtyClose: c, children: s, footer: d, closeLabel: r = "Close", initialFocus: f, className: _ }) {
214
- const [o, m] = E(n), [a, h] = E(!1), p = F(null), v = F(null), N = G();
215
- if (Y(() => {
213
+ function Be({ open: n, title: l, onClose: t, dirty: d = !1, onDirtyClose: c, children: r, footer: m, closeLabel: s = "Close", initialFocus: h, className: b }) {
214
+ const [o, u] = E(n), [a, f] = E(!1), p = I(null), _ = I(null), N = Y();
215
+ if (q(() => {
216
216
  if (n) {
217
- v.current = document.activeElement, m(!0), h(!1);
217
+ _.current = document.activeElement, u(!0), f(!1);
218
218
  return;
219
219
  }
220
220
  if (!o) return;
221
- h(!0);
221
+ f(!0);
222
222
  const x = window.setTimeout(() => {
223
- var S, C;
224
- m(!1), h(!1), (C = (S = v.current) == null ? void 0 : S.focus) == null || C.call(S);
223
+ var C, S;
224
+ u(!1), f(!1), (S = (C = _.current) == null ? void 0 : C.focus) == null || S.call(C);
225
225
  }, je);
226
226
  return () => window.clearTimeout(x);
227
- }, [n, o]), Y(() => {
228
- var x, S;
227
+ }, [n, o]), q(() => {
228
+ var x, C;
229
229
  if (n && o) {
230
- const C = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
231
- (S = (f == null ? void 0 : f.current) ?? ((x = p.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${C}), .cms-modal__foot :is(${C})`)) ?? p.current) == null || S.focus();
230
+ const S = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
231
+ (C = (h == null ? void 0 : h.current) ?? ((x = p.current) == null ? void 0 : x.querySelector(`.cms-modal__body :is(${S}), .cms-modal__foot :is(${S})`)) ?? p.current) == null || C.focus();
232
232
  }
233
- }, [n, o, f]), !o) return null;
234
- const w = () => {
235
- i ? c == null || c() : t();
233
+ }, [n, o, h]), !o) return null;
234
+ const y = () => {
235
+ d ? c == null || c() : t();
236
236
  };
237
- return Me(
238
- /* @__PURE__ */ e("div", { className: A("cms-modal-scrim", a && "is-closing"), onMouseDown: (x) => {
239
- x.target === x.currentTarget && w();
240
- }, children: /* @__PURE__ */ u(
237
+ return Ce(
238
+ /* @__PURE__ */ e("div", { className: T("cms-modal-scrim", a && "is-closing"), onMouseDown: (x) => {
239
+ x.target === x.currentTarget && y();
240
+ }, children: /* @__PURE__ */ i(
241
241
  "div",
242
242
  {
243
243
  ref: p,
244
- className: A("cms-modal", _, a && "is-closing", i && "is-dirty"),
244
+ className: T("cms-modal", b, a && "is-closing", d && "is-dirty"),
245
245
  role: "dialog",
246
246
  "aria-modal": "true",
247
247
  "aria-labelledby": N,
248
248
  tabIndex: -1,
249
249
  onKeyDown: (x) => {
250
- var S;
250
+ var C;
251
251
  if (x.key === "Escape")
252
- x.stopPropagation(), w();
252
+ x.stopPropagation(), y();
253
253
  else if (x.key === "Tab") {
254
- const C = (S = p.current) == null ? void 0 : S.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
255
- if (!C || C.length === 0) return;
256
- const R = C[0], H = C[C.length - 1];
257
- x.shiftKey && document.activeElement === R ? (x.preventDefault(), H.focus()) : !x.shiftKey && document.activeElement === H && (x.preventDefault(), R.focus());
254
+ const S = (C = p.current) == null ? void 0 : C.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
255
+ if (!S || S.length === 0) return;
256
+ const F = S[0], R = S[S.length - 1];
257
+ x.shiftKey && document.activeElement === F ? (x.preventDefault(), R.focus()) : !x.shiftKey && document.activeElement === R && (x.preventDefault(), F.focus());
258
258
  }
259
259
  },
260
260
  children: [
261
- /* @__PURE__ */ u("header", { className: "cms-modal__head", children: [
261
+ /* @__PURE__ */ i("header", { className: "cms-modal__head", children: [
262
262
  /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: N, children: l }),
263
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r, onClick: w, children: /* @__PURE__ */ e(z, { name: "close" }) })
263
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s, onClick: y, children: /* @__PURE__ */ e(U, { name: "close" }) })
264
264
  ] }),
265
- /* @__PURE__ */ e("div", { className: "cms-modal__body", children: s }),
266
- d != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: d }) : null
265
+ /* @__PURE__ */ e("div", { className: "cms-modal__body", children: r }),
266
+ m != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: m }) : null
267
267
  ]
268
268
  }
269
269
  ) }),
270
270
  document.body
271
271
  );
272
272
  }
273
- function Kn({ open: n, title: l, message: t, kind: i = "default", confirmLabel: c, cancelLabel: s, closeLabel: d, onConfirm: r, onCancel: f }) {
274
- const _ = i === "discard-changes";
273
+ function Un({ open: n, title: l, message: t, kind: d = "default", confirmLabel: c, cancelLabel: r, closeLabel: m, onConfirm: s, onCancel: h }) {
274
+ const b = d === "discard-changes";
275
275
  return /* @__PURE__ */ e(
276
- Pe,
276
+ Be,
277
277
  {
278
278
  open: n,
279
279
  title: l,
280
- onClose: f,
281
- ...d === void 0 ? {} : { closeLabel: d },
282
- footer: /* @__PURE__ */ u(M, { children: [
283
- /* @__PURE__ */ e(le, { onClick: f, children: s ?? (_ ? "Keep editing" : "Cancel") }),
284
- /* @__PURE__ */ e(le, { variant: i === "default" ? "primary" : "danger", onClick: r, children: c ?? (_ ? "Discard changes" : "Confirm") })
280
+ onClose: h,
281
+ ...m === void 0 ? {} : { closeLabel: m },
282
+ footer: /* @__PURE__ */ i(M, { children: [
283
+ /* @__PURE__ */ e(te, { onClick: h, children: r ?? (b ? "Keep editing" : "Cancel") }),
284
+ /* @__PURE__ */ e(te, { variant: d === "default" ? "primary" : "danger", onClick: s, children: c ?? (b ? "Discard changes" : "Confirm") })
285
285
  ] }),
286
- children: i !== "default" ? /* @__PURE__ */ u("p", { className: "cms-confirm__warning", children: [
287
- /* @__PURE__ */ e(z, { name: "warning" }),
286
+ children: d !== "default" ? /* @__PURE__ */ i("p", { className: "cms-confirm__warning", children: [
287
+ /* @__PURE__ */ e(U, { name: "warning" }),
288
288
  " ",
289
289
  t
290
290
  ] }) : /* @__PURE__ */ e("p", { children: t })
291
291
  }
292
292
  );
293
293
  }
294
- function Un({ kind: n, message: l, action: t, onDismiss: i, dismissLabel: c = "Dismiss" }) {
295
- return /* @__PURE__ */ u("div", { className: A("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
- /* @__PURE__ */ e(z, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
294
+ function zn({ kind: n, message: l, action: t, onDismiss: d, dismissLabel: c = "Dismiss" }) {
295
+ return /* @__PURE__ */ i("div", { className: T("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
296
+ /* @__PURE__ */ e(U, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
297
297
  /* @__PURE__ */ e("span", { className: "cms-toast__message", children: l }),
298
- t ? /* @__PURE__ */ e(le, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
299
- i ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: i, children: /* @__PURE__ */ e(z, { name: "close" }) }) : null
298
+ t ? /* @__PURE__ */ e(te, { className: "cms-toast__action", onClick: t.onAction, children: t.label }) : null,
299
+ d ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": c, onClick: d, children: /* @__PURE__ */ e(U, { name: "close" }) }) : null
300
300
  ] });
301
301
  }
302
- function zn({ children: n }) {
302
+ function Vn({ 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" }) {
306
- return /* @__PURE__ */ u("div", { className: A("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
307
- /* @__PURE__ */ e(z, { name: "spinner" }),
306
+ return /* @__PURE__ */ i("div", { className: T("cms-loading", `cms-loading--${l}`), role: "status", "aria-live": "polite", children: [
307
+ /* @__PURE__ */ e(U, { name: "spinner" }),
308
308
  /* @__PURE__ */ e("span", { children: n })
309
309
  ] });
310
310
  }
311
311
  function Ye({ title: n, hint: l, action: t }) {
312
- return /* @__PURE__ */ u("div", { className: "cms-empty", children: [
312
+ return /* @__PURE__ */ i("div", { className: "cms-empty", children: [
313
313
  /* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
314
314
  l != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: l }) : null,
315
315
  t != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: t }) : null
316
316
  ] });
317
317
  }
318
318
  function Ge({ message: n, onRetry: l, retryLabel: t = "Try again" }) {
319
- return /* @__PURE__ */ u("div", { className: "cms-error-banner", role: "alert", children: [
320
- /* @__PURE__ */ e(z, { name: "warning" }),
319
+ return /* @__PURE__ */ i("div", { className: "cms-error-banner", role: "alert", children: [
320
+ /* @__PURE__ */ e(U, { name: "warning" }),
321
321
  /* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
322
- l ? /* @__PURE__ */ e(le, { onClick: l, children: t }) : null
322
+ l ? /* @__PURE__ */ e(te, { onClick: l, children: t }) : null
323
323
  ] });
324
324
  }
325
- const Be = {
326
- mail: /* @__PURE__ */ u(M, { children: [
325
+ const Fe = {
326
+ mail: /* @__PURE__ */ i(M, { children: [
327
327
  /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
328
328
  /* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
329
329
  ] }),
330
+ // A gear: a ring with eight short teeth, the hole in its middle.
331
+ settings: /* @__PURE__ */ i(M, { children: [
332
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
333
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "7" }),
334
+ /* @__PURE__ */ e("path", { d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" })
335
+ ] }),
330
336
  // The envelope with its flap open above it: a message read, or the message itself again.
331
- "mail-open": /* @__PURE__ */ u(M, { children: [
337
+ "mail-open": /* @__PURE__ */ i(M, { children: [
332
338
  /* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
333
339
  /* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
334
340
  /* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
335
341
  ] }),
336
342
  // A clipboard: copy what is shown.
337
- copy: /* @__PURE__ */ u(M, { children: [
343
+ copy: /* @__PURE__ */ i(M, { children: [
338
344
  /* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
339
345
  /* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
340
346
  /* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
341
347
  ] }),
342
348
  chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
343
349
  phone: /* @__PURE__ */ e("path", { d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }),
344
- calendar: /* @__PURE__ */ u(M, { children: [
350
+ calendar: /* @__PURE__ */ i(M, { children: [
345
351
  /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
346
352
  /* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
347
353
  ] }),
348
- file: /* @__PURE__ */ u(M, { children: [
354
+ file: /* @__PURE__ */ i(M, { children: [
349
355
  /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
350
356
  /* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
351
357
  ] }),
352
358
  // The file, with code's angle brackets in place of its lines: a message's source.
353
- "file-code": /* @__PURE__ */ u(M, { children: [
359
+ "file-code": /* @__PURE__ */ i(M, { children: [
354
360
  /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
355
361
  /* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
356
362
  /* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
357
363
  ] }),
358
- image: /* @__PURE__ */ u(M, { children: [
364
+ image: /* @__PURE__ */ i(M, { children: [
359
365
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
360
366
  /* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
361
367
  /* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
362
368
  ] }),
363
- search: /* @__PURE__ */ u(M, { children: [
369
+ search: /* @__PURE__ */ i(M, { children: [
364
370
  /* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
365
371
  /* @__PURE__ */ e("path", { d: "m20 20-4-4" })
366
372
  ] }),
367
- bell: /* @__PURE__ */ u(M, { children: [
373
+ bell: /* @__PURE__ */ i(M, { children: [
368
374
  /* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
369
375
  /* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
370
376
  ] }),
371
- pencil: /* @__PURE__ */ u(M, { children: [
377
+ pencil: /* @__PURE__ */ i(M, { children: [
372
378
  /* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
373
379
  /* @__PURE__ */ e("path", { d: "m13 7 4 4" })
374
380
  ] }),
375
- download: /* @__PURE__ */ u(M, { children: [
381
+ download: /* @__PURE__ */ i(M, { children: [
376
382
  /* @__PURE__ */ e("path", { d: "M12 4v11" }),
377
383
  /* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
378
384
  /* @__PURE__ */ e("path", { d: "M4 20h16" })
379
385
  ] }),
380
386
  // Download's arrow turned up, from the line: a file sent up.
381
- upload: /* @__PURE__ */ u(M, { children: [
387
+ upload: /* @__PURE__ */ i(M, { children: [
382
388
  /* @__PURE__ */ e("path", { d: "M12 20V9" }),
383
389
  /* @__PURE__ */ e("path", { d: "m7 13 5-5 5 5" }),
384
390
  /* @__PURE__ */ e("path", { d: "M4 4h16" })
385
391
  ] }),
386
- print: /* @__PURE__ */ u(M, { children: [
392
+ print: /* @__PURE__ */ i(M, { children: [
387
393
  /* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
388
394
  /* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
389
395
  /* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
390
396
  ] }),
391
- "open-separately": /* @__PURE__ */ u(M, { children: [
397
+ "open-separately": /* @__PURE__ */ i(M, { children: [
392
398
  /* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
393
399
  /* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
394
400
  /* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
395
401
  ] }),
396
402
  star: /* @__PURE__ */ e("path", { d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }),
397
- send: /* @__PURE__ */ u(M, { children: [
403
+ send: /* @__PURE__ */ i(M, { children: [
398
404
  /* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
399
405
  /* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
400
406
  ] }),
401
- inbox: /* @__PURE__ */ u(M, { children: [
407
+ inbox: /* @__PURE__ */ i(M, { children: [
402
408
  /* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
403
409
  /* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
404
410
  ] }),
405
- archive: /* @__PURE__ */ u(M, { children: [
411
+ archive: /* @__PURE__ */ i(M, { children: [
406
412
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
407
413
  /* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
408
414
  ] }),
409
- trash: /* @__PURE__ */ u(M, { children: [
415
+ trash: /* @__PURE__ */ i(M, { children: [
410
416
  /* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
411
417
  /* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
412
418
  ] }),
413
419
  paperclip: /* @__PURE__ */ e("path", { d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }),
414
- mic: /* @__PURE__ */ u(M, { children: [
420
+ mic: /* @__PURE__ */ i(M, { children: [
415
421
  /* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
416
422
  /* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
417
423
  ] }),
418
- speaker: /* @__PURE__ */ u(M, { children: [
424
+ speaker: /* @__PURE__ */ i(M, { children: [
419
425
  /* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
420
426
  /* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
421
427
  ] }),
422
- "user-plus": /* @__PURE__ */ u(M, { children: [
428
+ "user-plus": /* @__PURE__ */ i(M, { children: [
423
429
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
424
430
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
425
431
  ] }),
426
432
  // A person, nothing more: one whose account is gone.
427
- user: /* @__PURE__ */ u(M, { children: [
433
+ user: /* @__PURE__ */ i(M, { children: [
428
434
  /* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4" }),
429
435
  /* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0" })
430
436
  ] }),
431
437
  // A person with a tick: someone allowed.
432
- "user-check": /* @__PURE__ */ u(M, { children: [
438
+ "user-check": /* @__PURE__ */ i(M, { children: [
433
439
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
434
440
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" })
435
441
  ] }),
436
442
  // A person with a cross: someone no longer allowed.
437
- "user-x": /* @__PURE__ */ u(M, { children: [
443
+ "user-x": /* @__PURE__ */ i(M, { children: [
438
444
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
439
445
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" })
440
446
  ] }),
441
447
  // Two people: the members of a group.
442
- users: /* @__PURE__ */ u(M, { children: [
448
+ users: /* @__PURE__ */ i(M, { children: [
443
449
  /* @__PURE__ */ e("circle", { cx: "9", cy: "8", r: "3.5" }),
444
450
  /* @__PURE__ */ e("path", { d: "M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" })
445
451
  ] }),
446
452
  "phone-off": /* @__PURE__ */ e("path", { d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }),
447
- video: /* @__PURE__ */ u(M, { children: [
453
+ video: /* @__PURE__ */ i(M, { children: [
448
454
  /* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
449
455
  /* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
450
456
  ] }),
451
- info: /* @__PURE__ */ u(M, { children: [
457
+ info: /* @__PURE__ */ i(M, { children: [
452
458
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
453
459
  /* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
454
460
  ] }),
@@ -457,17 +463,17 @@ const Be = {
457
463
  plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
458
464
  folder: /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
459
465
  // The folder with a plus inside: a new folder.
460
- "folder-plus": /* @__PURE__ */ u(M, { children: [
466
+ "folder-plus": /* @__PURE__ */ i(M, { children: [
461
467
  /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
462
468
  /* @__PURE__ */ e("path", { d: "M12 10.5v6M9 13.5h6" })
463
469
  ] }),
464
470
  // The folder with a cross inside: a folder removed.
465
- "folder-x": /* @__PURE__ */ u(M, { children: [
471
+ "folder-x": /* @__PURE__ */ i(M, { children: [
466
472
  /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
467
473
  /* @__PURE__ */ e("path", { d: "m9.5 11 5 5M14.5 11l-5 5" })
468
474
  ] }),
469
475
  check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
470
- server: /* @__PURE__ */ u(M, { children: [
476
+ server: /* @__PURE__ */ i(M, { children: [
471
477
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
472
478
  /* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
473
479
  /* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
@@ -479,7 +485,7 @@ const Be = {
479
485
  more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
480
486
  important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
481
487
  };
482
- function T({ name: n, size: l = 20, label: t }) {
488
+ function A({ name: n, size: l = 20, label: t }) {
483
489
  return /* @__PURE__ */ e(
484
490
  "svg",
485
491
  {
@@ -494,11 +500,11 @@ function T({ name: n, size: l = 20, label: t }) {
494
500
  strokeLinejoin: "round",
495
501
  focusable: !1,
496
502
  ...t ? { role: "img", "aria-label": t } : { "aria-hidden": !0 },
497
- children: Be[n]
503
+ children: Fe[n]
498
504
  }
499
505
  );
500
506
  }
501
- const Vn = Object.keys(Be), Ae = {
507
+ const Zn = Object.keys(Fe), Te = {
502
508
  reply: "reply",
503
509
  "reply-all": "reply",
504
510
  forward: "forward",
@@ -525,6 +531,9 @@ const Vn = Object.keys(Be), Ae = {
525
531
  "person-x": "user-x",
526
532
  "arrow-left": "chevron-left",
527
533
  "pencil-square": "pencil",
534
+ "plus-lg": "plus",
535
+ gear: "settings",
536
+ upload: "upload",
528
537
  "cloud-upload": "upload",
529
538
  people: "users",
530
539
  "file-earmark-word": "file",
@@ -536,8 +545,8 @@ const Vn = Object.keys(Be), Ae = {
536
545
  images: "image",
537
546
  paperclip: "paperclip"
538
547
  };
539
- function re(n) {
540
- return Object.prototype.hasOwnProperty.call(Ae, n) ? Ae[n] : null;
548
+ function ce(n) {
549
+ return Object.prototype.hasOwnProperty.call(Te, n) ? Te[n] : null;
541
550
  }
542
551
  function Xe() {
543
552
  try {
@@ -549,47 +558,47 @@ function Xe() {
549
558
  const Le = /* @__PURE__ */ new Set();
550
559
  function Je({ name: n, size: l = 18 }) {
551
560
  if (n === "") return null;
552
- const t = re(n);
553
- return t !== null ? /* @__PURE__ */ e(T, { name: t, size: l }) : (!Le.has(n) && Xe() && (Le.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
561
+ const t = ce(n);
562
+ return t !== null ? /* @__PURE__ */ e(A, { name: t, size: l }) : (!Le.has(n) && Xe() && (Le.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: l, height: l }, "aria-hidden": "true", "data-icon-name": n }));
554
563
  }
555
- const we = 300;
564
+ const ke = 300;
556
565
  function Qe() {
557
- if (typeof window > "u" || typeof getComputedStyle != "function") return we;
566
+ if (typeof window > "u" || typeof getComputedStyle != "function") return ke;
558
567
  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 : we;
568
+ return Number.isFinite(l) && l >= 0 ? l : ke;
560
569
  }
561
570
  function en() {
562
- return /* @__PURE__ */ u("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
571
+ return /* @__PURE__ */ i("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
563
572
  /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
564
573
  /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
565
574
  ] });
566
575
  }
567
- function ne({ kind: n, title: l, description: t, action: i, placement: c = "block", icon: s }) {
568
- const [d, r] = E(n !== "loading");
569
- return Y(() => {
576
+ function le({ kind: n, title: l, description: t, action: d, placement: c = "block", icon: r }) {
577
+ const [m, s] = E(n !== "loading");
578
+ return q(() => {
570
579
  if (n !== "loading") {
571
- r(!0);
580
+ s(!0);
572
581
  return;
573
582
  }
574
- r(!1);
575
- const f = window.setTimeout(() => r(!0), Qe());
576
- return () => window.clearTimeout(f);
577
- }, [n]), /* @__PURE__ */ u(
583
+ s(!1);
584
+ const h = window.setTimeout(() => s(!0), Qe());
585
+ return () => window.clearTimeout(h);
586
+ }, [n]), /* @__PURE__ */ i(
578
587
  "div",
579
588
  {
580
- className: A("cms-state", `cms-state--${n}`, `cms-state--${c}`, !d && "is-waiting"),
589
+ className: T("cms-state", `cms-state--${n}`, `cms-state--${c}`, !m && "is-waiting"),
581
590
  role: "status",
582
591
  "aria-live": "polite",
583
592
  "data-kind": n,
584
593
  children: [
585
594
  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: c === "page" ? 32 : 24 }) }) : null,
588
- /* @__PURE__ */ u("span", { className: "cms-state__text", children: [
595
+ n === "error" || n === "denied" ? /* @__PURE__ */ e(U, { name: n === "error" ? "warning" : "lock" }) : null,
596
+ n === "empty" && r !== void 0 && ce(r) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Je, { name: r, size: c === "page" ? 32 : 24 }) }) : null,
597
+ /* @__PURE__ */ i("span", { className: "cms-state__text", children: [
589
598
  /* @__PURE__ */ e("span", { className: "cms-state__title", children: l }),
590
599
  t !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
591
600
  ] }),
592
- i !== void 0 && n !== "denied" ? /* @__PURE__ */ e(le, { className: "cms-state__action", onClick: i.onAction, children: i.label }) : null
601
+ d !== void 0 && n !== "denied" ? /* @__PURE__ */ e(te, { className: "cms-state__action", onClick: d.onAction, children: d.label }) : null
593
602
  ]
594
603
  }
595
604
  );
@@ -604,106 +613,106 @@ function an(n) {
604
613
  function sn(n) {
605
614
  return n.getClientRects().length > 0;
606
615
  }
607
- function Zn(n) {
608
- const { name: l, badge: t, closeLabel: i, onClose: c, actions: s = [], moreLabel: d = "More", edit: r, editing: f, state: _, siblings: o, bar: m, thumbnails: a, strip: h, onZoom: p, children: v } = n, N = F(null), w = F(null), x = G(), [S, C] = E(!1), R = F(null);
609
- Y(() => {
616
+ function Wn(n) {
617
+ const { name: l, badge: t, closeLabel: d, onClose: c, actions: r = [], moreLabel: m = "More", edit: s, editing: h, state: b, siblings: o, bar: u, thumbnails: a, strip: f, onZoom: p, children: _ } = n, N = I(null), y = I(null), x = Y(), [C, S] = E(!1), F = I(null);
618
+ q(() => {
610
619
  var Z;
611
- const y = document.activeElement, P = document.body.style.overflow;
612
- return document.body.style.overflow = "hidden", (Z = w.current) == null || Z.focus(), () => {
613
- var D;
614
- document.body.style.overflow = P, (D = y == null ? void 0 : y.focus) == null || D.call(y);
620
+ const w = document.activeElement, B = document.body.style.overflow;
621
+ return document.body.style.overflow = "hidden", (Z = y.current) == null || Z.focus(), () => {
622
+ var z;
623
+ document.body.style.overflow = B, (z = w == null ? void 0 : w.focus) == null || z.call(w);
615
624
  };
616
625
  }, []);
617
- const H = () => {
618
- f != null && f.dirty ? f.onDirtyClose() : c();
619
- }, ee = (y) => {
620
- const P = y.touches.length === 1 ? y.touches[0] : void 0;
621
- R.current = P === void 0 || f !== void 0 || an(y.target) ? null : { x: P.clientX, y: P.clientY };
622
- }, j = (y) => {
623
- var X, O;
624
- const P = R.current, Z = y.changedTouches[0];
625
- if (R.current = null, P === null || Z === void 0) return;
626
- const D = Z.clientX - P.x;
627
- Math.abs(D) < ln || Math.abs(D) < Math.abs(Z.clientY - P.y) || (D > 0 ? (X = o == null ? void 0 : o.onPrevious) == null || X.call(o) : (O = o == null ? void 0 : o.onNext) == null || O.call(o));
626
+ const R = () => {
627
+ h != null && h.dirty ? h.onDirtyClose() : c();
628
+ }, Q = (w) => {
629
+ const B = w.touches.length === 1 ? w.touches[0] : void 0;
630
+ F.current = B === void 0 || h !== void 0 || an(w.target) ? null : { x: B.clientX, y: B.clientY };
631
+ }, G = (w) => {
632
+ var H, W;
633
+ const B = F.current, Z = w.changedTouches[0];
634
+ if (F.current = null, B === null || Z === void 0) return;
635
+ const z = Z.clientX - B.x;
636
+ Math.abs(z) < ln || Math.abs(z) < Math.abs(Z.clientY - B.y) || (z > 0 ? (H = o == null ? void 0 : o.onPrevious) == null || H.call(o) : (W = o == null ? void 0 : o.onNext) == null || W.call(o));
628
637
  };
629
- return Me(
630
- /* @__PURE__ */ u(
638
+ return Ce(
639
+ /* @__PURE__ */ i(
631
640
  "div",
632
641
  {
633
642
  ref: N,
634
- className: A("cms-viewer", f !== void 0 && "is-editing"),
643
+ className: T("cms-viewer", h !== void 0 && "is-editing"),
635
644
  role: "dialog",
636
645
  "aria-modal": "true",
637
646
  "aria-labelledby": x,
638
647
  tabIndex: -1,
639
- onKeyDown: (y) => {
640
- var P, Z, D;
641
- if (y.key === "Escape") {
642
- if (f !== void 0) return;
643
- y.stopPropagation(), S ? C(!1) : c();
644
- } else if (y.key === "Tab") {
645
- const X = Array.from(((P = N.current) == null ? void 0 : P.querySelectorAll(nn)) ?? []).filter(sn);
646
- if (X.length === 0) return;
647
- const O = X[0], J = X[X.length - 1];
648
- y.shiftKey && document.activeElement === O ? (y.preventDefault(), J.focus()) : !y.shiftKey && document.activeElement === J && (y.preventDefault(), O.focus());
649
- } else f === void 0 && !tn(y.target) && !y.ctrlKey && !y.metaKey && !y.altKey && (y.key === "ArrowLeft" ? (Z = o == null ? void 0 : o.onPrevious) == null || Z.call(o) : y.key === "ArrowRight" ? (D = o == null ? void 0 : o.onNext) == null || D.call(o) : y.key === "+" || y.key === "=" ? p == null || p("in") : y.key === "-" ? p == null || p("out") : y.key === "0" && (p == null || p("reset")));
648
+ onKeyDown: (w) => {
649
+ var B, Z, z;
650
+ if (w.key === "Escape") {
651
+ if (h !== void 0) return;
652
+ w.stopPropagation(), C ? S(!1) : c();
653
+ } else if (w.key === "Tab") {
654
+ const H = Array.from(((B = N.current) == null ? void 0 : B.querySelectorAll(nn)) ?? []).filter(sn);
655
+ if (H.length === 0) return;
656
+ const W = H[0], j = H[H.length - 1];
657
+ w.shiftKey && document.activeElement === W ? (w.preventDefault(), j.focus()) : !w.shiftKey && document.activeElement === j && (w.preventDefault(), W.focus());
658
+ } else h === void 0 && !tn(w.target) && !w.ctrlKey && !w.metaKey && !w.altKey && (w.key === "ArrowLeft" ? (Z = o == null ? void 0 : o.onPrevious) == null || Z.call(o) : w.key === "ArrowRight" ? (z = o == null ? void 0 : o.onNext) == null || z.call(o) : w.key === "+" || w.key === "=" ? p == null || p("in") : w.key === "-" ? p == null || p("out") : w.key === "0" && (p == null || p("reset")));
650
659
  },
651
660
  children: [
652
661
  o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${l}, ${o.position}` }) : null,
653
- /* @__PURE__ */ u("header", { className: "cms-viewer__top", children: [
654
- /* @__PURE__ */ e("button", { ref: w, type: "button", className: "cms-viewer__icon", "aria-label": i, onClick: H, children: /* @__PURE__ */ e(z, { name: "close" }) }),
662
+ /* @__PURE__ */ i("header", { className: "cms-viewer__top", children: [
663
+ /* @__PURE__ */ e("button", { ref: y, type: "button", className: "cms-viewer__icon", "aria-label": d, onClick: R, children: /* @__PURE__ */ e(U, { name: "close" }) }),
655
664
  /* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: t }),
656
665
  /* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: x, title: l, children: l }),
657
666
  o !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: o.position }) : null,
658
667
  /* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
659
- f !== void 0 ? /* @__PURE__ */ u(M, { children: [
660
- /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: f.status }),
661
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: f.onDone, children: f.doneLabel })
662
- ] }) : /* @__PURE__ */ u(M, { children: [
663
- /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: s.map((y) => /* @__PURE__ */ u("button", { type: "button", className: "cms-viewer__button", onClick: y.onSelect, children: [
664
- y.icon,
665
- y.label
666
- ] }, y.label)) }),
667
- r !== void 0 ? /* @__PURE__ */ u("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": r.label, onClick: r.onEdit, children: [
668
- r.icon,
669
- /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: r.label })
668
+ h !== void 0 ? /* @__PURE__ */ i(M, { children: [
669
+ /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: h.status }),
670
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: h.onDone, children: h.doneLabel })
671
+ ] }) : /* @__PURE__ */ i(M, { children: [
672
+ /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: r.map((w) => /* @__PURE__ */ i("button", { type: "button", className: "cms-viewer__button", onClick: w.onSelect, children: [
673
+ w.icon,
674
+ w.label
675
+ ] }, w.label)) }),
676
+ s !== void 0 ? /* @__PURE__ */ i("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": s.label, onClick: s.onEdit, children: [
677
+ s.icon,
678
+ /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: s.label })
670
679
  ] }) : null,
671
- s.length > 0 ? /* @__PURE__ */ u("span", { className: "cms-viewer__more", children: [
672
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": d, "aria-expanded": S, onClick: () => C((y) => !y), children: /* @__PURE__ */ e(T, { name: "more" }) }),
673
- S ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: s.map((y) => /* @__PURE__ */ u(
680
+ r.length > 0 ? /* @__PURE__ */ i("span", { className: "cms-viewer__more", children: [
681
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": m, "aria-expanded": C, onClick: () => S((w) => !w), children: /* @__PURE__ */ e(A, { name: "more" }) }),
682
+ C ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: r.map((w) => /* @__PURE__ */ i(
674
683
  "button",
675
684
  {
676
685
  type: "button",
677
686
  className: "cms-viewer__button",
678
687
  onClick: () => {
679
- C(!1), y.onSelect();
688
+ S(!1), w.onSelect();
680
689
  },
681
690
  children: [
682
- y.icon,
683
- y.label
691
+ w.icon,
692
+ w.label
684
693
  ]
685
694
  },
686
- y.label
695
+ w.label
687
696
  )) }) : null
688
697
  ] }) : null
689
698
  ] })
690
699
  ] }),
691
- /* @__PURE__ */ u("div", { className: "cms-viewer__body", children: [
692
- a != null && f === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: a }) : null,
693
- /* @__PURE__ */ u("div", { className: "cms-viewer__content", onTouchStart: ee, onTouchEnd: j, children: [
694
- (f == null ? void 0 : f.conflict) !== void 0 ? /* @__PURE__ */ u("div", { className: "cms-viewer__conflict", role: "alert", children: [
695
- /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: f.conflict.message }),
696
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: f.conflict.onOverwrite, children: f.conflict.overwriteLabel }),
697
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: f.conflict.onKeepBoth, children: f.conflict.keepBothLabel })
700
+ /* @__PURE__ */ i("div", { className: "cms-viewer__body", children: [
701
+ a != null && h === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: a }) : null,
702
+ /* @__PURE__ */ i("div", { className: "cms-viewer__content", onTouchStart: Q, onTouchEnd: G, children: [
703
+ (h == null ? void 0 : h.conflict) !== void 0 ? /* @__PURE__ */ i("div", { className: "cms-viewer__conflict", role: "alert", children: [
704
+ /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: h.conflict.message }),
705
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: h.conflict.onOverwrite, children: h.conflict.overwriteLabel }),
706
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: h.conflict.onKeepBoth, children: h.conflict.keepBothLabel })
698
707
  ] }) : null,
699
- _ === void 0 ? v : /* @__PURE__ */ e(rn, { state: _ }),
700
- f === void 0 && (o != null && o.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": o.previousLabel, title: o.previousLabel, onClick: o.onPrevious, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
701
- f === void 0 && (o != null && o.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": o.nextLabel, title: o.nextLabel, onClick: o.onNext, children: /* @__PURE__ */ e(z, { name: "back" }) }) : null,
702
- f === void 0 && o !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(o.total, 7) }, (y, P) => /* @__PURE__ */ e("i", { className: P === Math.min(o.index, 6) ? "is-current" : void 0 }, P)) }) : null
708
+ b === void 0 ? _ : /* @__PURE__ */ e(rn, { state: b }),
709
+ h === void 0 && (o != null && o.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": o.previousLabel, title: o.previousLabel, onClick: o.onPrevious, children: /* @__PURE__ */ e(U, { name: "back" }) }) : null,
710
+ h === void 0 && (o != null && o.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": o.nextLabel, title: o.nextLabel, onClick: o.onNext, children: /* @__PURE__ */ e(U, { name: "back" }) }) : null,
711
+ h === void 0 && o !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(o.total, 7) }, (w, B) => /* @__PURE__ */ e("i", { className: B === Math.min(o.index, 6) ? "is-current" : void 0 }, B)) }) : null
703
712
  ] })
704
713
  ] }),
705
- f === void 0 && h != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: h }) : null,
706
- m != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: m }) : null
714
+ h === void 0 && f != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: f }) : null,
715
+ u != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: u }) : null
707
716
  ]
708
717
  }
709
718
  ),
@@ -713,10 +722,10 @@ function Zn(n) {
713
722
  function rn({ state: n }) {
714
723
  switch (n.kind) {
715
724
  case "loading":
716
- return /* @__PURE__ */ e(ne, { kind: "loading", title: n.title, placement: "page" });
725
+ return /* @__PURE__ */ e(le, { kind: "loading", title: n.title, placement: "page" });
717
726
  case "error":
718
727
  return /* @__PURE__ */ e(
719
- ne,
728
+ le,
720
729
  {
721
730
  kind: "error",
722
731
  title: n.title,
@@ -727,7 +736,7 @@ function rn({ state: n }) {
727
736
  );
728
737
  case "no-preview":
729
738
  return /* @__PURE__ */ e(
730
- ne,
739
+ le,
731
740
  {
732
741
  kind: "empty",
733
742
  title: n.title,
@@ -743,151 +752,174 @@ class cn extends Error {
743
752
  super(l), this.name = "FilePickerDenied";
744
753
  }
745
754
  }
746
- const ye = (n, l) => `${n}
747
- ${l}`, on = (n, l) => n === "" ? l : `${n}/${l}`, dn = 48;
748
- function Wn(n) {
749
- var me, he;
750
- const { open: l, spaces: t, list: i, disabledReason: c, budget: s, formatSize: d, labels: r, onConfirm: f, onCancel: _ } = n, [o, m] = E(((me = t[0]) == null ? void 0 : me.id) ?? ""), [a, h] = E(""), [p, v] = E({ status: "loading" }), [N, w] = E(0), [x, S] = E(/* @__PURE__ */ new Map()), [C, R] = E(0), [H, ee] = E(!1), j = F(null), y = G();
751
- Y(() => {
752
- var b;
753
- l && (m(((b = t[0]) == null ? void 0 : b.id) ?? ""), h(""), S(/* @__PURE__ */ new Map()), ee(!1));
754
- }, [l]), Y(() => {
755
+ class on extends Error {
756
+ constructor(l = "restart") {
757
+ super(l), this.name = "FilePickerRestart";
758
+ }
759
+ }
760
+ const we = (n, l) => `${n}
761
+ ${l}`, dn = (n, l) => n === "" ? l : `${n}/${l}`, un = 48;
762
+ function jn(n) {
763
+ var he, ne;
764
+ const { open: l, spaces: t, list: d, disabledReason: c, budget: r, formatSize: m, labels: s, onConfirm: h, onCancel: b } = n, [o, u] = E(((he = t[0]) == null ? void 0 : he.id) ?? ""), [a, f] = E(""), [p, _] = E({ status: "loading" }), [N, y] = E(0), [x, C] = E(/* @__PURE__ */ new Map()), [S, F] = E(0), [R, Q] = E(!1), G = I(null), w = I(!1);
765
+ q(() => {
766
+ w.current = !1;
767
+ }, [l, o, a]);
768
+ const B = Y();
769
+ q(() => {
770
+ var v;
771
+ l && (u(((v = t[0]) == null ? void 0 : v.id) ?? ""), f(""), C(/* @__PURE__ */ new Map()), Q(!1));
772
+ }, [l]), q(() => {
755
773
  if (!l || o === "") return;
756
- let b = !0;
757
- return v({ status: "loading" }), R(0), i(o, a).then(
758
- (k) => b && v({ status: "ready", entries: k.entries, next: k.next ?? null, paging: !1 }),
759
- (k) => b && v({ status: k instanceof cn ? "denied" : "error" })
774
+ let v = !0;
775
+ return _({ status: "loading" }), F(0), d(o, a).then(
776
+ (k) => v && _({ status: "ready", entries: k.entries, next: k.next ?? null, paging: !1 }),
777
+ (k) => v && _({ status: k instanceof cn ? "denied" : "error" })
760
778
  ), () => {
761
- b = !1;
779
+ v = !1;
762
780
  };
763
- }, [l, o, a, i, N]);
764
- const P = be(() => {
781
+ }, [l, o, a, d, N]);
782
+ const Z = _e(() => {
765
783
  if (p.status !== "ready" || p.next === null || p.paging) return;
766
- const b = p.next, k = p.entries;
767
- v({ ...p, paging: !0 }), i(o, a, b).then(
768
- (B) => v({ status: "ready", entries: [...k, ...B.entries], next: B.next ?? null, paging: !1 }),
769
- () => v({ status: "ready", entries: k, next: b, paging: !1 })
784
+ const v = p.next, k = p.entries;
785
+ _({ ...p, paging: !0 }), d(o, a, v).then(
786
+ ($) => {
787
+ w.current = !1, _({ status: "ready", entries: [...k, ...$.entries], next: $.next ?? null, paging: !1 });
788
+ },
789
+ ($) => {
790
+ if (!($ instanceof on)) {
791
+ _({ status: "ready", entries: k, next: v, paging: !1 });
792
+ return;
793
+ }
794
+ if (w.current) {
795
+ _({ status: "error" });
796
+ return;
797
+ }
798
+ w.current = !0, y((K) => K + 1);
799
+ }
770
800
  );
771
- }, [p, i, o, a]), Z = be((b) => {
801
+ }, [p, d, o, a]), z = _e((v) => {
772
802
  var k;
773
- return ((k = s == null ? void 0 : s.cost) == null ? void 0 : k.call(s, b)) ?? b.size ?? 0;
774
- }, [s]), D = Oe(() => [...x.values()], [x]), X = D.reduce((b, k) => b + (k.size ?? 0), 0), O = s === void 0 ? null : s.limitBytes - s.usedBytes - D.reduce((b, k) => b + Z(k), 0), J = O !== null && O < 0, ie = (b) => {
775
- if (b.kind !== "file") return null;
776
- const k = c == null ? void 0 : c(b);
777
- return k || (O !== null && !x.has(ye(o, b.id)) && Z(b) > O ? r.overBudget : null);
778
- }, oe = (b) => {
779
- const k = ye(o, b.id);
780
- !x.has(k) && ie(b) !== null || S((B) => {
781
- const K = new Map(B);
782
- return K.has(k) ? K.delete(k) : K.set(k, { ...b, space: o, path: a }), K;
803
+ return ((k = r == null ? void 0 : r.cost) == null ? void 0 : k.call(r, v)) ?? v.size ?? 0;
804
+ }, [r]), H = Ke(() => [...x.values()], [x]), W = H.reduce((v, k) => v + (k.size ?? 0), 0), j = r === void 0 ? null : r.limitBytes - r.usedBytes - H.reduce((v, k) => v + z(k), 0), ie = j !== null && j < 0, ue = (v) => {
805
+ if (v.kind !== "file") return null;
806
+ const k = c == null ? void 0 : c(v);
807
+ return k || (j !== null && !x.has(we(o, v.id)) && z(v) > j ? s.overBudget : null);
808
+ }, g = (v) => {
809
+ const k = we(o, v.id);
810
+ !x.has(k) && ue(v) !== null || C(($) => {
811
+ const K = new Map($);
812
+ return K.has(k) ? K.delete(k) : K.set(k, { ...v, space: o, path: a }), K;
783
813
  });
784
- }, g = (b) => h(on(a, b.name)), L = () => h(a.includes("/") ? a.slice(0, a.lastIndexOf("/")) : ""), V = (b) => S((k) => {
785
- const B = new Map(k);
786
- return B.delete(b), B;
787
- }), W = p.status === "ready" ? p.entries : [], $ = (b) => {
788
- const k = W[C];
789
- if (b.key === "ArrowDown" || b.key === "ArrowUp" || b.key === "Home" || b.key === "End") {
790
- b.preventDefault();
791
- const B = W.length - 1, K = b.key === "Home" ? 0 : b.key === "End" ? B : Math.min(B, Math.max(0, C + (b.key === "ArrowDown" ? 1 : -1)));
792
- R(K), K >= B - 1 && P();
793
- } else b.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (b.preventDefault(), g(k)) : b.key === " " && (k == null ? void 0 : k.kind) === "file" ? (b.preventDefault(), oe(k)) : b.key === "Backspace" && a !== "" && (b.preventDefault(), L());
794
- }, q = a === "" ? [] : a.split("/"), de = ((he = t.find((b) => b.id === o)) == null ? void 0 : he.name) ?? "", ue = (b) => `${y}-entry-${String(b)}`;
795
- return /* @__PURE__ */ u(
796
- Pe,
814
+ }, D = (v) => f(dn(a, v.name)), V = () => f(a.includes("/") ? a.slice(0, a.lastIndexOf("/")) : ""), ee = (v) => C((k) => {
815
+ const $ = new Map(k);
816
+ return $.delete(v), $;
817
+ }), L = p.status === "ready" ? p.entries : [], X = (v) => {
818
+ const k = L[S];
819
+ if (v.key === "ArrowDown" || v.key === "ArrowUp" || v.key === "Home" || v.key === "End") {
820
+ v.preventDefault();
821
+ const $ = L.length - 1, K = v.key === "Home" ? 0 : v.key === "End" ? $ : Math.min($, Math.max(0, S + (v.key === "ArrowDown" ? 1 : -1)));
822
+ F(K), K >= $ - 1 && Z();
823
+ } else v.key === "Enter" && (k == null ? void 0 : k.kind) === "folder" ? (v.preventDefault(), D(k)) : v.key === " " && (k == null ? void 0 : k.kind) === "file" ? (v.preventDefault(), g(k)) : v.key === "Backspace" && a !== "" && (v.preventDefault(), V());
824
+ }, oe = a === "" ? [] : a.split("/"), ye = ((ne = t.find((v) => v.id === o)) == null ? void 0 : ne.name) ?? "", me = (v) => `${B}-entry-${String(v)}`;
825
+ return /* @__PURE__ */ i(
826
+ Be,
797
827
  {
798
828
  open: l,
799
- title: r.title,
800
- onClose: _,
801
- closeLabel: r.close,
802
- initialFocus: j,
829
+ title: s.title,
830
+ onClose: b,
831
+ closeLabel: s.close,
832
+ initialFocus: G,
803
833
  className: "cms-file-picker",
804
- footer: /* @__PURE__ */ u("div", { className: "cms-file-picker__foot", children: [
805
- /* @__PURE__ */ u("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
806
- D.length > 0 ? /* @__PURE__ */ e("span", { children: r.total(D.length, d(X)) }) : null,
807
- s !== void 0 && O !== null ? /* @__PURE__ */ e("span", { className: A(J && "is-over"), children: J ? r.overBudget : r.left(d(Math.max(0, O)), d(s.limitBytes)) }) : null
834
+ footer: /* @__PURE__ */ i("div", { className: "cms-file-picker__foot", children: [
835
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
836
+ H.length > 0 ? /* @__PURE__ */ e("span", { children: s.total(H.length, m(W)) }) : null,
837
+ r !== void 0 && j !== null ? /* @__PURE__ */ e("span", { className: T(ie && "is-over"), children: ie ? s.overBudget : s.left(m(Math.max(0, j)), m(r.limitBytes)) }) : null
808
838
  ] }),
809
- /* @__PURE__ */ u("div", { className: "cms-file-picker__actions", children: [
810
- /* @__PURE__ */ e(le, { variant: "secondary", onClick: _, children: r.cancel }),
811
- /* @__PURE__ */ e(le, { variant: "primary", disabled: D.length === 0 || J, onClick: () => f(D), children: r.confirm(D.length) })
839
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__actions", children: [
840
+ /* @__PURE__ */ e(te, { variant: "secondary", onClick: b, children: s.cancel }),
841
+ /* @__PURE__ */ e(te, { variant: "primary", disabled: H.length === 0 || ie, onClick: () => h(H), children: s.confirm(H.length) })
812
842
  ] })
813
843
  ] }),
814
844
  children: [
815
- /* @__PURE__ */ u("div", { className: "cms-file-picker__top", children: [
816
- t.length > 1 ? /* @__PURE__ */ u("label", { className: "cms-file-picker__space", children: [
817
- /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: r.space }),
818
- /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: o, onChange: (b) => {
819
- m(b.target.value), h("");
820
- }, children: t.map((b) => /* @__PURE__ */ e("option", { value: b.id, children: b.name }, b.id)) })
845
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__top", children: [
846
+ t.length > 1 ? /* @__PURE__ */ i("label", { className: "cms-file-picker__space", children: [
847
+ /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: s.space }),
848
+ /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: o, onChange: (v) => {
849
+ u(v.target.value), f("");
850
+ }, children: t.map((v) => /* @__PURE__ */ e("option", { value: v.id, children: v.name }, v.id)) })
821
851
  ] }) : null,
822
- /* @__PURE__ */ u("nav", { className: "cms-file-picker__path", "aria-label": r.path, children: [
823
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.up, disabled: a === "", onClick: L, children: /* @__PURE__ */ e(T, { name: "chevron-left" }) }),
824
- /* @__PURE__ */ u("ol", { children: [
825
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": a === "" ? "location" : void 0, onClick: () => h(""), children: de }) }),
826
- q.map((b, k) => {
827
- const B = q.slice(0, k + 1).join("/");
828
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": B === a ? "location" : void 0, onClick: () => h(B), children: b }) }, B);
852
+ /* @__PURE__ */ i("nav", { className: "cms-file-picker__path", "aria-label": s.path, children: [
853
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s.up, disabled: a === "", onClick: V, children: /* @__PURE__ */ e(A, { name: "chevron-left" }) }),
854
+ /* @__PURE__ */ i("ol", { children: [
855
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": a === "" ? "location" : void 0, onClick: () => f(""), children: ye }) }),
856
+ oe.map((v, k) => {
857
+ const $ = oe.slice(0, k + 1).join("/");
858
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": $ === a ? "location" : void 0, onClick: () => f($), children: v }) }, $);
829
859
  })
830
860
  ] })
831
861
  ] }),
832
- D.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": H, onClick: () => ee((b) => !b), children: r.selected(D.length) }) : null
862
+ H.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": R, onClick: () => Q((v) => !v), children: s.selected(H.length) }) : null
833
863
  ] }),
834
- H && D.length > 0 ? /* @__PURE__ */ u("div", { className: "cms-file-picker__chosen", children: [
835
- /* @__PURE__ */ e("ul", { children: [...x.entries()].map(([b, k]) => /* @__PURE__ */ u("li", { children: [
864
+ R && H.length > 0 ? /* @__PURE__ */ i("div", { className: "cms-file-picker__chosen", children: [
865
+ /* @__PURE__ */ e("ul", { children: [...x.entries()].map(([v, k]) => /* @__PURE__ */ i("li", { children: [
836
866
  /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: k.name }),
837
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": r.remove(k.name), onClick: () => V(b), children: /* @__PURE__ */ e(z, { name: "close" }) })
838
- ] }, b)) }),
839
- /* @__PURE__ */ e(le, { variant: "secondary", onClick: () => {
840
- S(/* @__PURE__ */ new Map()), ee(!1);
841
- }, children: r.clear })
867
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s.remove(k.name), onClick: () => ee(v), children: /* @__PURE__ */ e(U, { name: "close" }) })
868
+ ] }, v)) }),
869
+ /* @__PURE__ */ e(te, { variant: "secondary", onClick: () => {
870
+ C(/* @__PURE__ */ new Map()), Q(!1);
871
+ }, children: s.clear })
842
872
  ] }) : null,
843
- /* @__PURE__ */ u("div", { className: "cms-file-picker__list", onScroll: (b) => {
844
- const k = b.currentTarget;
845
- k.scrollTop + k.clientHeight >= k.scrollHeight - dn && P();
873
+ /* @__PURE__ */ i("div", { className: "cms-file-picker__list", onScroll: (v) => {
874
+ const k = v.currentTarget;
875
+ k.scrollTop + k.clientHeight >= k.scrollHeight - un && Z();
846
876
  }, children: [
847
- p.status === "loading" ? /* @__PURE__ */ e(ne, { kind: "loading", title: r.loading, placement: "block" }) : null,
848
- p.status === "error" ? /* @__PURE__ */ e(ne, { kind: "error", title: r.error, placement: "block", action: { label: r.retry, onAction: () => w((b) => b + 1) } }) : null,
849
- p.status === "denied" ? /* @__PURE__ */ e(ne, { kind: "denied", title: r.denied, placement: "block" }) : null,
850
- p.status === "ready" && W.length === 0 ? /* @__PURE__ */ e(ne, { kind: "empty", title: r.empty, placement: "block" }) : null,
851
- /* @__PURE__ */ u(
877
+ p.status === "loading" ? /* @__PURE__ */ e(le, { kind: "loading", title: s.loading, placement: "block" }) : null,
878
+ p.status === "error" ? /* @__PURE__ */ e(le, { kind: "error", title: s.error, placement: "block", action: { label: s.retry, onAction: () => {
879
+ w.current = !1, y((v) => v + 1);
880
+ } } }) : null,
881
+ p.status === "denied" ? /* @__PURE__ */ e(le, { kind: "denied", title: s.denied, placement: "block" }) : null,
882
+ p.status === "ready" && L.length === 0 ? /* @__PURE__ */ e(le, { kind: "empty", title: s.empty, placement: "block" }) : null,
883
+ /* @__PURE__ */ i(
852
884
  "div",
853
885
  {
854
- ref: j,
886
+ ref: G,
855
887
  role: "listbox",
856
888
  "aria-multiselectable": "true",
857
- "aria-label": r.files,
858
- "aria-activedescendant": W.length > 0 ? ue(C) : void 0,
889
+ "aria-label": s.files,
890
+ "aria-activedescendant": L.length > 0 ? me(S) : void 0,
859
891
  tabIndex: 0,
860
892
  className: "cms-file-picker__entries",
861
- hidden: p.status !== "ready" || W.length === 0,
862
- onKeyDown: $,
893
+ hidden: p.status !== "ready" || L.length === 0,
894
+ onKeyDown: X,
863
895
  children: [
864
- W.map((b, k) => {
865
- const B = b.kind === "file" && x.has(ye(o, b.id)), K = ie(b);
866
- return /* @__PURE__ */ u(
896
+ L.map((v, k) => {
897
+ const $ = v.kind === "file" && x.has(we(o, v.id)), K = ue(v);
898
+ return /* @__PURE__ */ i(
867
899
  "div",
868
900
  {
869
- id: ue(k),
901
+ id: me(k),
870
902
  role: "option",
871
- "aria-selected": b.kind === "file" ? B : void 0,
903
+ "aria-selected": v.kind === "file" ? $ : void 0,
872
904
  "aria-disabled": K !== null || void 0,
873
- className: A("cms-file-picker__entry", k === C && "is-active", B && "is-ticked", K !== null && "is-disabled"),
905
+ className: T("cms-file-picker__entry", k === S && "is-active", $ && "is-ticked", K !== null && "is-disabled"),
874
906
  onClick: () => {
875
- R(k), b.kind === "folder" ? g(b) : oe(b);
907
+ F(k), v.kind === "folder" ? D(v) : g(v);
876
908
  },
877
909
  children: [
878
- /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: B ? /* @__PURE__ */ e(T, { name: "check" }) : null }),
879
- /* @__PURE__ */ e(T, { name: b.kind === "folder" ? "folder" : "file" }),
880
- /* @__PURE__ */ u("span", { className: "cms-file-picker__text", children: [
881
- /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: b.name }),
910
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: $ ? /* @__PURE__ */ e(A, { name: "check" }) : null }),
911
+ /* @__PURE__ */ e(A, { name: v.kind === "folder" ? "folder" : "file" }),
912
+ /* @__PURE__ */ i("span", { className: "cms-file-picker__text", children: [
913
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: v.name }),
882
914
  K !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: K }) : null
883
915
  ] }),
884
- b.kind === "file" && b.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: d(b.size) }) : null
916
+ v.kind === "file" && v.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: m(v.size) }) : null
885
917
  ]
886
918
  },
887
- b.id
919
+ v.id
888
920
  );
889
921
  }),
890
- p.status === "ready" && p.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(ne, { kind: "loading", title: r.loading, placement: "inline" }) }) : null
922
+ p.status === "ready" && p.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(le, { kind: "loading", title: s.loading, placement: "inline" }) }) : null
891
923
  ]
892
924
  }
893
925
  )
@@ -896,25 +928,259 @@ function Wn(n) {
896
928
  }
897
929
  );
898
930
  }
899
- function jn({ title: n, scope: l, actions: t, backLink: i }) {
900
- return /* @__PURE__ */ u("header", { className: "cms-page-header", children: [
901
- i ? /* @__PURE__ */ u(
931
+ const xe = 64;
932
+ function mn(n, l) {
933
+ for (let t = n instanceof Element ? n : null; t !== null; t = t.parentElement) {
934
+ if (t instanceof HTMLElement && t.scrollTop > 0) return !1;
935
+ if (t === l) return !0;
936
+ }
937
+ return l.scrollTop <= 0;
938
+ }
939
+ function hn(n, l) {
940
+ const [t, d] = E(0), c = I(l);
941
+ return c.current = l, q(() => {
942
+ const r = n.current;
943
+ if (r === null) return;
944
+ let m = null, s = 0;
945
+ const h = (u) => {
946
+ m = mn(u.target, r) && u.touches.length === 1 ? u.touches[0].clientY : null, s = 0;
947
+ }, b = (u) => {
948
+ if (m === null || c.current === null) return;
949
+ const a = u.touches[0].clientY - m;
950
+ if (a <= 0) {
951
+ m = null, d(0);
952
+ return;
953
+ }
954
+ u.cancelable && u.preventDefault(), s = Math.min(a * 0.6, xe * 1.5), d(s);
955
+ }, o = () => {
956
+ var u;
957
+ m !== null && s >= xe && ((u = c.current) == null || u.call(c)), m = null, s = 0, d(0);
958
+ };
959
+ return r.addEventListener("touchstart", h, { passive: !0 }), r.addEventListener("touchmove", b, { passive: !1 }), r.addEventListener("touchend", o), r.addEventListener("touchcancel", o), () => {
960
+ r.removeEventListener("touchstart", h), r.removeEventListener("touchmove", b), r.removeEventListener("touchend", o), r.removeEventListener("touchcancel", o);
961
+ };
962
+ }, [n]), t;
963
+ }
964
+ const Re = Ue(null);
965
+ function fn() {
966
+ return Oe(Re);
967
+ }
968
+ function qn({ label: n, rows: l, error: t, onRetry: d, loadingText: c = "Loading", emptyTitle: r = "Nothing here yet", emptyHint: m, selected: s, onOpen: h, onRowMenu: b }) {
969
+ const o = I([]), u = fn();
970
+ if (t != null) return /* @__PURE__ */ e(Ge, { message: t, onRetry: d });
971
+ if (l === null) return /* @__PURE__ */ e(qe, { what: c, layout: "block" });
972
+ if (l.length === 0) return /* @__PURE__ */ e(Ye, { title: r, hint: m });
973
+ const a = (f, p, _) => {
974
+ var N;
975
+ if (f.key === "ArrowDown" || f.key === "ArrowUp")
976
+ f.preventDefault(), (N = o.current[Math.min(l.length - 1, Math.max(0, p + (f.key === "ArrowDown" ? 1 : -1)))]) == null || N.focus();
977
+ else if (f.key === "Enter")
978
+ h == null || h(_);
979
+ else if ((f.key === "ContextMenu" || f.shiftKey && f.key === "F10") && b) {
980
+ f.preventDefault();
981
+ const y = f.currentTarget.getBoundingClientRect();
982
+ b(_, { x: y.left + 16, y: y.bottom });
983
+ }
984
+ };
985
+ return /* @__PURE__ */ i(M, { children: [
986
+ u !== null && (u.distance > 0 || u.refreshing) ? /* @__PURE__ */ i("div", { className: "cms-list__pull", role: "status", style: { height: u.refreshing ? void 0 : u.distance }, "data-ready": u.distance >= xe ? "" : void 0, children: [
987
+ u.refreshing ? /* @__PURE__ */ e(U, { name: "spinner" }) : null,
988
+ u.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: u.text }) : null
989
+ ] }) : null,
990
+ /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((f, p) => {
991
+ const _ = f.id === s;
992
+ return /* @__PURE__ */ i(
993
+ "li",
994
+ {
995
+ ref: (N) => {
996
+ o.current[p] = N;
997
+ },
998
+ role: "option",
999
+ "aria-selected": _,
1000
+ tabIndex: _ || s == null && p === 0 ? 0 : -1,
1001
+ className: T("cms-list__row", _ && "is-selected"),
1002
+ onClick: () => h == null ? void 0 : h(f.id),
1003
+ onKeyDown: (N) => a(N, p, f.id),
1004
+ onContextMenu: b ? (N) => {
1005
+ N.preventDefault(), b(f.id, { x: N.clientX, y: N.clientY });
1006
+ } : void 0,
1007
+ children: [
1008
+ f.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: f.lead }) : null,
1009
+ /* @__PURE__ */ i("span", { className: "cms-list__text", children: [
1010
+ /* @__PURE__ */ e("span", { className: T("cms-list__primary", f.unread === !0 && "is-unread"), children: f.primary }),
1011
+ f.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: f.secondary }) : null
1012
+ ] }),
1013
+ f.meta != null || f.count !== void 0 ? /* @__PURE__ */ i("span", { className: "cms-list__end", children: [
1014
+ f.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: f.meta }) : null,
1015
+ f.count !== void 0 && f.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: f.count }) : null
1016
+ ] }) : null
1017
+ ]
1018
+ },
1019
+ f.id
1020
+ );
1021
+ }) })
1022
+ ] });
1023
+ }
1024
+ function ve({ at: n, items: l, onClose: t, label: d = "Actions", focus: c = "first" }) {
1025
+ const r = I(null), m = I(null), s = Y(), [h, b] = E(n), o = l.filter((a) => a.offer.offered);
1026
+ if (Ne(() => {
1027
+ if (!n) return;
1028
+ const a = r.current, f = (a == null ? void 0 : a.offsetWidth) ?? 0, p = (a == null ? void 0 : a.offsetHeight) ?? 0;
1029
+ b({ x: Math.max(0, Math.min(n.x, window.innerWidth - f)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
1030
+ }, [n]), q(() => {
1031
+ var p, _;
1032
+ if (!n) return;
1033
+ m.current = document.activeElement;
1034
+ const a = Array.from(((p = r.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1035
+ (_ = c === "last" ? a[a.length - 1] : a[0]) == null || _.focus();
1036
+ const f = (N) => {
1037
+ var y;
1038
+ (y = r.current) != null && y.contains(N.target) || t();
1039
+ };
1040
+ return document.addEventListener("mousedown", f), () => {
1041
+ var N, y;
1042
+ document.removeEventListener("mousedown", f), (y = (N = m.current) == null ? void 0 : N.focus) == null || y.call(N);
1043
+ };
1044
+ }, [n, t, c]), !n || o.length === 0) return null;
1045
+ const u = (a) => {
1046
+ var _, N;
1047
+ const f = Array.from(((_ = r.current) == null ? void 0 : _.querySelectorAll('[role="menuitem"]')) ?? []), p = f.indexOf(document.activeElement);
1048
+ if (a.key === "Escape" || a.key === "Tab")
1049
+ a.preventDefault(), t();
1050
+ else if (a.key === "ArrowDown" || a.key === "ArrowUp") {
1051
+ a.preventDefault();
1052
+ const y = a.key === "ArrowDown" ? 1 : -1;
1053
+ (N = f[(p + y + f.length) % f.length]) == null || N.focus();
1054
+ }
1055
+ };
1056
+ return Ce(
1057
+ /* @__PURE__ */ e(
1058
+ "div",
1059
+ {
1060
+ ref: r,
1061
+ className: "cms-menu",
1062
+ role: "menu",
1063
+ "aria-label": d,
1064
+ style: { left: (h ?? n).x, top: (h ?? n).y },
1065
+ onKeyDown: u,
1066
+ onContextMenu: (a) => a.preventDefault(),
1067
+ children: o.map((a) => {
1068
+ const f = a.offer.refusal !== void 0;
1069
+ return /* @__PURE__ */ i(
1070
+ "div",
1071
+ {
1072
+ role: "menuitem",
1073
+ tabIndex: -1,
1074
+ "aria-disabled": f || void 0,
1075
+ "aria-describedby": f ? `${s}-${a.id}` : void 0,
1076
+ title: f ? a.offer.refusal : void 0,
1077
+ className: T("cms-menu__item", a.danger && "is-danger", a.offer.locked && "is-locked", f && "is-refused"),
1078
+ onClick: () => {
1079
+ f || (t(), a.onSelect());
1080
+ },
1081
+ onKeyDown: (p) => {
1082
+ (p.key === "Enter" || p.key === " ") && !f && (p.preventDefault(), t(), a.onSelect());
1083
+ },
1084
+ children: [
1085
+ a.offer.locked ? /* @__PURE__ */ e(U, { name: "lock" }) : null,
1086
+ /* @__PURE__ */ e("span", { className: "cms-menu__label", children: a.label }),
1087
+ f ? /* @__PURE__ */ e("span", { id: `${s}-${a.id}`, className: "cms-menu__refusal", children: a.offer.refusal }) : null
1088
+ ]
1089
+ },
1090
+ a.id
1091
+ );
1092
+ })
1093
+ }
1094
+ ),
1095
+ document.body
1096
+ );
1097
+ }
1098
+ function Yn({ title: n, icon: l, primary: t, more: d = [], moreLabel: c, context: r, fullWidth: m = !1 }) {
1099
+ var p, _, N;
1100
+ const [s, h] = E(null), b = Y(), o = d.filter((y) => y.offer.offered), u = (p = t == null ? void 0 : t.offer) == null ? void 0 : p.refusal, a = t !== void 0 && (((_ = t.offer) == null ? void 0 : _.offered) === !1 || u !== void 0), f = (y, x) => {
1101
+ const C = x.getBoundingClientRect();
1102
+ h((s == null ? void 0 : s.which) === y ? null : { which: y, x: C.left, y: C.bottom + 4 });
1103
+ };
1104
+ return /* @__PURE__ */ i("header", { className: `cms-section-header${m ? " cms-section-header--full" : ""}`, children: [
1105
+ /* @__PURE__ */ i("div", { className: "cms-section-header__row", "data-row": "1", children: [
1106
+ l !== void 0 ? /* @__PURE__ */ e(A, { name: l }) : null,
1107
+ /* @__PURE__ */ e("h1", { className: "cms-section-header__title", title: n, children: n }),
1108
+ /* @__PURE__ */ i("div", { className: "cms-section-header__actions", children: [
1109
+ t !== void 0 && ((N = t.offer) == null ? void 0 : N.offered) !== !1 ? /* @__PURE__ */ i("span", { className: `cms-section-header__primary${"menu" in t ? " cms-section-header__primary--split" : ""}`, children: [
1110
+ /* @__PURE__ */ i(
1111
+ "button",
1112
+ {
1113
+ type: "button",
1114
+ className: "cms-button cms-button--primary",
1115
+ "data-action": "primary",
1116
+ "aria-disabled": a ? "true" : void 0,
1117
+ "aria-describedby": u !== void 0 ? b : void 0,
1118
+ title: u,
1119
+ onClick: () => {
1120
+ a || t.onPress();
1121
+ },
1122
+ children: [
1123
+ /* @__PURE__ */ e(A, { name: t.icon }),
1124
+ " ",
1125
+ /* @__PURE__ */ e("span", { children: t.label })
1126
+ ]
1127
+ }
1128
+ ),
1129
+ "menu" in t ? /* @__PURE__ */ e(
1130
+ "button",
1131
+ {
1132
+ type: "button",
1133
+ className: "cms-button cms-button--primary cms-section-header__split",
1134
+ "data-action": "primary-menu",
1135
+ "aria-haspopup": "menu",
1136
+ "aria-expanded": (s == null ? void 0 : s.which) === "primary",
1137
+ "aria-label": t.menuLabel,
1138
+ onClick: (y) => f("primary", y.currentTarget),
1139
+ children: /* @__PURE__ */ e(A, { name: "chevron-down" })
1140
+ }
1141
+ ) : null,
1142
+ u !== void 0 ? /* @__PURE__ */ e("span", { id: b, className: "cms-visually-hidden", children: u }) : null
1143
+ ] }) : null,
1144
+ o.length > 0 ? /* @__PURE__ */ e(
1145
+ "button",
1146
+ {
1147
+ type: "button",
1148
+ className: "cms-section-header__more",
1149
+ "data-action": "more",
1150
+ "aria-haspopup": "menu",
1151
+ "aria-expanded": (s == null ? void 0 : s.which) === "more",
1152
+ "aria-label": c,
1153
+ title: c,
1154
+ onClick: (y) => f("more", y.currentTarget),
1155
+ children: /* @__PURE__ */ e(A, { name: "more" })
1156
+ }
1157
+ ) : null
1158
+ ] })
1159
+ ] }),
1160
+ r != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: r }) : null,
1161
+ t !== void 0 && "menu" in t ? /* @__PURE__ */ e(ve, { at: (s == null ? void 0 : s.which) === "primary" ? s : null, items: t.menu, onClose: () => h(null), label: t.menuLabel }) : null,
1162
+ /* @__PURE__ */ e(ve, { at: (s == null ? void 0 : s.which) === "more" ? s : null, items: d, onClose: () => h(null), label: c })
1163
+ ] });
1164
+ }
1165
+ function Gn({ title: n, scope: l, actions: t, backLink: d }) {
1166
+ return /* @__PURE__ */ i("header", { className: "cms-page-header", children: [
1167
+ d ? /* @__PURE__ */ i(
902
1168
  "a",
903
1169
  {
904
1170
  className: "cms-page-header__back",
905
- href: i.href ?? "#",
1171
+ href: d.href ?? "#",
906
1172
  onClick: (c) => {
907
- i.onBack && (c.preventDefault(), i.onBack());
1173
+ d.onBack && (c.preventDefault(), d.onBack());
908
1174
  },
909
1175
  children: [
910
- /* @__PURE__ */ e(z, { name: "back" }),
1176
+ /* @__PURE__ */ e(U, { name: "back" }),
911
1177
  " ",
912
- i.label
1178
+ d.label
913
1179
  ]
914
1180
  }
915
1181
  ) : null,
916
- /* @__PURE__ */ u("div", { className: "cms-page-header__row", children: [
917
- /* @__PURE__ */ u("div", { className: "cms-page-header__titles", children: [
1182
+ /* @__PURE__ */ i("div", { className: "cms-page-header__row", children: [
1183
+ /* @__PURE__ */ i("div", { className: "cms-page-header__titles", children: [
918
1184
  /* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: n }),
919
1185
  l != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: l }) : null
920
1186
  ] }),
@@ -922,95 +1188,95 @@ function jn({ title: n, scope: l, actions: t, backLink: i }) {
922
1188
  ] })
923
1189
  ] });
924
1190
  }
925
- function qn({ tabs: n, active: l, onSelect: t, label: i }) {
926
- const c = F([]), s = (d, r) => {
927
- var m;
928
- const f = n.length - 1, _ = d.key === "ArrowRight" ? r === f ? 0 : r + 1 : d.key === "ArrowLeft" ? r === 0 ? f : r - 1 : d.key === "Home" ? 0 : d.key === "End" ? f : null;
929
- if (_ === null) return;
930
- d.preventDefault();
931
- const o = n[_];
932
- o && (t(o.id), (m = c.current[_]) == null || m.focus());
1191
+ function Xn({ tabs: n, active: l, onSelect: t, label: d }) {
1192
+ const c = I([]), r = (m, s) => {
1193
+ var u;
1194
+ const h = n.length - 1, b = m.key === "ArrowRight" ? s === h ? 0 : s + 1 : m.key === "ArrowLeft" ? s === 0 ? h : s - 1 : m.key === "Home" ? 0 : m.key === "End" ? h : null;
1195
+ if (b === null) return;
1196
+ m.preventDefault();
1197
+ const o = n[b];
1198
+ o && (t(o.id), (u = c.current[b]) == null || u.focus());
933
1199
  };
934
- return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": i, children: n.map((d, r) => {
935
- const f = d.id === l;
936
- return /* @__PURE__ */ u(
1200
+ return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": d, children: n.map((m, s) => {
1201
+ const h = m.id === l;
1202
+ return /* @__PURE__ */ i(
937
1203
  "button",
938
1204
  {
939
- ref: (_) => {
940
- c.current[r] = _;
1205
+ ref: (b) => {
1206
+ c.current[s] = b;
941
1207
  },
942
1208
  type: "button",
943
1209
  role: "tab",
944
- className: A("cms-tab", f && "is-active"),
945
- "aria-selected": f,
946
- tabIndex: f ? 0 : -1,
947
- onClick: () => t(d.id),
948
- onKeyDown: (_) => s(_, r),
1210
+ className: T("cms-tab", h && "is-active"),
1211
+ "aria-selected": h,
1212
+ tabIndex: h ? 0 : -1,
1213
+ onClick: () => t(m.id),
1214
+ onKeyDown: (b) => r(b, s),
949
1215
  children: [
950
- d.label,
951
- d.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: d.count }) : null
1216
+ m.label,
1217
+ m.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: m.count }) : null
952
1218
  ]
953
1219
  },
954
- d.id
1220
+ m.id
955
1221
  );
956
1222
  }) });
957
1223
  }
958
- function un(n) {
1224
+ function pn(n) {
959
1225
  const l = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), t = (c) => {
960
- var s;
961
- return (s = c == null ? void 0 : c.match(/[\p{L}\p{N}]/u)) == null ? void 0 : s[0];
1226
+ var r;
1227
+ return (r = c == null ? void 0 : c.match(/[\p{L}\p{N}]/u)) == null ? void 0 : r[0];
962
1228
  };
963
1229
  return (l.length > 1 ? [t(l[0]), t(l[l.length - 1])] : [t(l[0])]).filter(Boolean).join("").toUpperCase();
964
1230
  }
965
- function mn(n) {
1231
+ function bn(n) {
966
1232
  let l = 0;
967
1233
  for (const t of n.trim().toLowerCase())
968
1234
  l = l * 31 + (t.codePointAt(0) ?? 0) >>> 0;
969
1235
  return l % 6 + 1;
970
1236
  }
971
- function ve({ name: n, pictureUrl: l, presence: t, connection: i, deleted: c = !1, size: s = 32 }) {
972
- const d = i !== void 0 ? `is-${i.state === "offline" ? "disconnected" : i.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, r = i !== void 0 ? `${n}, ${i.label}` : t ? `${n}, ${t}` : n;
973
- return /* @__PURE__ */ u(
1237
+ function ge({ name: n, pictureUrl: l, presence: t, connection: d, deleted: c = !1, size: r = 32 }) {
1238
+ const m = d !== void 0 ? `is-${d.state === "offline" ? "disconnected" : d.state}` : t === void 0 ? null : `is-${t === "busy" ? "away" : t}`, s = d !== void 0 ? `${n}, ${d.label}` : t ? `${n}, ${t}` : n;
1239
+ return /* @__PURE__ */ i(
974
1240
  "span",
975
1241
  {
976
- className: A("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${mn(n)}`),
977
- style: { width: s, height: s, fontSize: Math.round(s * 0.4) },
1242
+ className: T("cms-avatar", c ? "cms-avatar--deleted" : `cms-avatar--tint-${bn(n)}`),
1243
+ style: { width: r, height: r, fontSize: Math.round(r * 0.4) },
978
1244
  role: "img",
979
- "aria-label": r,
980
- ...i === void 0 ? {} : { title: i.label },
1245
+ "aria-label": s,
1246
+ ...d === void 0 ? {} : { title: d.label },
981
1247
  children: [
982
- c ? /* @__PURE__ */ e(T, { name: "user", size: Math.round(s * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: un(n) }),
983
- d === null ? null : /* @__PURE__ */ e("span", { className: A("cms-avatar__presence", d), "aria-hidden": "true" })
1248
+ c ? /* @__PURE__ */ e(A, { name: "user", size: Math.round(r * 0.6) }) : l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: pn(n) }),
1249
+ m === null ? null : /* @__PURE__ */ e("span", { className: T("cms-avatar__presence", m), "aria-hidden": "true" })
984
1250
  ]
985
1251
  }
986
1252
  );
987
1253
  }
988
- function hn({ count: n, label: l, max: t = 99 }) {
989
- return n <= 0 ? null : /* @__PURE__ */ u("span", { className: "cms-badge", children: [
1254
+ function _n({ count: n, label: l, max: t = 99 }) {
1255
+ return n <= 0 ? null : /* @__PURE__ */ i("span", { className: "cms-badge", children: [
990
1256
  /* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > t ? `${t}+` : n }),
991
1257
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: l })
992
1258
  ] });
993
1259
  }
994
- function Yn({ product: n, mark: l, rail: t, active: i, onNavigate: c, server: s, search: d, account: r, children: f, railLabel: _ = "Sections" }) {
995
- return /* @__PURE__ */ u("div", { className: "cms-shell", children: [
996
- /* @__PURE__ */ u("nav", { className: "cms-shell__rail", "aria-label": _, children: [
1260
+ function Jn({ product: n, mark: l, rail: t, active: d, onNavigate: c, server: r, search: m, account: s, children: h, railLabel: b = "Sections" }) {
1261
+ return /* @__PURE__ */ i("div", { className: "cms-shell", children: [
1262
+ /* @__PURE__ */ i("nav", { className: "cms-shell__rail", "aria-label": b, children: [
997
1263
  /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: l }),
998
1264
  /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: t.map((o) => {
999
- const m = o.id === i;
1000
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ u(
1265
+ const u = o.id === d;
1266
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
1001
1267
  "a",
1002
1268
  {
1003
1269
  href: o.href,
1004
- className: A("cms-shell__item", m && "is-active"),
1005
- "aria-current": m ? "page" : void 0,
1270
+ className: T("cms-shell__item", u && "is-active"),
1271
+ "aria-current": u ? "page" : void 0,
1006
1272
  title: o.label,
1007
1273
  onClick: (a) => {
1008
1274
  c && (a.preventDefault(), c(o.id));
1009
1275
  },
1010
1276
  children: [
1011
- /* @__PURE__ */ u("span", { className: "cms-shell__icon", children: [
1012
- /* @__PURE__ */ e(T, { name: o.icon, size: 22 }),
1013
- o.badge ? /* @__PURE__ */ e(hn, { count: o.badge.count, label: o.badge.label }) : null
1277
+ /* @__PURE__ */ i("span", { className: "cms-shell__icon", children: [
1278
+ /* @__PURE__ */ e(A, { name: o.icon, size: 22 }),
1279
+ o.badge ? /* @__PURE__ */ e(_n, { count: o.badge.count, label: o.badge.label }) : null
1014
1280
  ] }),
1015
1281
  /* @__PURE__ */ e("span", { className: "cms-shell__label", children: o.label })
1016
1282
  ]
@@ -1018,26 +1284,26 @@ function Yn({ product: n, mark: l, rail: t, active: i, onNavigate: c, server: s,
1018
1284
  ) }, o.id);
1019
1285
  }) })
1020
1286
  ] }),
1021
- /* @__PURE__ */ u("header", { className: "cms-shell__top", children: [
1287
+ /* @__PURE__ */ i("header", { className: "cms-shell__top", children: [
1022
1288
  /* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
1023
- s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: s }) : null,
1024
- d != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: d }) : null,
1025
- r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: r }) : null
1289
+ r != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: r }) : null,
1290
+ m != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: m }) : null,
1291
+ s != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: s }) : null
1026
1292
  ] }),
1027
- /* @__PURE__ */ e("main", { className: "cms-shell__main", children: f })
1293
+ /* @__PURE__ */ e("main", { className: "cms-shell__main", children: h })
1028
1294
  ] });
1029
1295
  }
1030
- function Gn({ label: n, placeholder: l, value: t, onChange: i, onSearch: c }) {
1031
- return /* @__PURE__ */ u(
1296
+ function Qn({ label: n, placeholder: l, value: t, onChange: d, onSearch: c }) {
1297
+ return /* @__PURE__ */ i(
1032
1298
  "form",
1033
1299
  {
1034
1300
  role: "search",
1035
1301
  className: "cms-search",
1036
- onSubmit: (s) => {
1037
- s.preventDefault(), c == null || c(t);
1302
+ onSubmit: (r) => {
1303
+ r.preventDefault(), c == null || c(t);
1038
1304
  },
1039
1305
  children: [
1040
- /* @__PURE__ */ e(T, { name: "search", size: 18 }),
1306
+ /* @__PURE__ */ e(A, { name: "search", size: 18 }),
1041
1307
  /* @__PURE__ */ e(
1042
1308
  "input",
1043
1309
  {
@@ -1046,43 +1312,43 @@ function Gn({ label: n, placeholder: l, value: t, onChange: i, onSearch: c }) {
1046
1312
  "aria-label": n,
1047
1313
  placeholder: l,
1048
1314
  value: t,
1049
- onChange: (s) => i(s.target.value)
1315
+ onChange: (r) => d(r.target.value)
1050
1316
  }
1051
1317
  )
1052
1318
  ]
1053
1319
  }
1054
1320
  );
1055
1321
  }
1056
- function fn({ options: n, value: l, onChange: t, label: i }) {
1057
- const c = F([]), s = F(null), [d, r] = E({ start: !1, end: !1 }), f = () => {
1058
- const m = s.current;
1059
- if (m === null) return;
1060
- const a = Math.abs(m.scrollLeft), h = a > 1, p = a + m.clientWidth < m.scrollWidth - 1;
1061
- r((v) => v.start === h && v.end === p ? v : { start: h, end: p });
1322
+ function vn({ options: n, value: l, onChange: t, label: d }) {
1323
+ const c = I([]), r = I(null), [m, s] = E({ start: !1, end: !1 }), h = () => {
1324
+ const u = r.current;
1325
+ if (u === null) return;
1326
+ const a = Math.abs(u.scrollLeft), f = a > 1, p = a + u.clientWidth < u.scrollWidth - 1;
1327
+ s((_) => _.start === f && _.end === p ? _ : { start: f, end: p });
1062
1328
  };
1063
- ge(() => {
1064
- f();
1065
- const m = s.current;
1066
- if (m === null || typeof ResizeObserver > "u") return;
1067
- const a = new ResizeObserver(f);
1068
- a.observe(m);
1069
- for (const h of c.current) h !== null && a.observe(h);
1329
+ Ne(() => {
1330
+ h();
1331
+ const u = r.current;
1332
+ if (u === null || typeof ResizeObserver > "u") return;
1333
+ const a = new ResizeObserver(h);
1334
+ a.observe(u);
1335
+ for (const f of c.current) f !== null && a.observe(f);
1070
1336
  return () => a.disconnect();
1071
1337
  }, [n]);
1072
- const _ = (m) => {
1073
- var a, h;
1074
- return (h = (a = c.current[m]) == null ? void 0 : a.scrollIntoView) == null ? void 0 : h.call(a, { block: "nearest", inline: "nearest" });
1075
- }, o = (m, a) => {
1338
+ const b = (u) => {
1339
+ var a, f;
1340
+ return (f = (a = c.current[u]) == null ? void 0 : a.scrollIntoView) == null ? void 0 : f.call(a, { block: "nearest", inline: "nearest" });
1341
+ }, o = (u, a) => {
1076
1342
  var N;
1077
- const h = n.length - 1, p = m.key === "ArrowRight" || m.key === "ArrowDown" ? a === h ? 0 : a + 1 : m.key === "ArrowLeft" || m.key === "ArrowUp" ? a === 0 ? h : a - 1 : null;
1343
+ const f = n.length - 1, p = u.key === "ArrowRight" || u.key === "ArrowDown" ? a === f ? 0 : a + 1 : u.key === "ArrowLeft" || u.key === "ArrowUp" ? a === 0 ? f : a - 1 : null;
1078
1344
  if (p === null) return;
1079
- m.preventDefault();
1080
- const v = n[p];
1081
- v && (t(v.id), (N = c.current[p]) == null || N.focus(), _(p));
1345
+ u.preventDefault();
1346
+ const _ = n[p];
1347
+ _ && (t(_.id), (N = c.current[p]) == null || N.focus(), b(p));
1082
1348
  };
1083
- return /* @__PURE__ */ e("div", { ref: s, className: A("cms-chips", d.start && "is-past-start", d.end && "is-past-end"), role: "radiogroup", "aria-label": i, onScroll: f, "data-scrolls-sideways": "", children: n.map((m, a) => {
1084
- const h = m.id === l;
1085
- return /* @__PURE__ */ u(
1349
+ return /* @__PURE__ */ e("div", { ref: r, className: T("cms-chips", m.start && "is-past-start", m.end && "is-past-end"), role: "radiogroup", "aria-label": d, onScroll: h, "data-scrolls-sideways": "", children: n.map((u, a) => {
1350
+ const f = u.id === l;
1351
+ return /* @__PURE__ */ i(
1086
1352
  "button",
1087
1353
  {
1088
1354
  ref: (p) => {
@@ -1090,34 +1356,34 @@ function fn({ options: n, value: l, onChange: t, label: i }) {
1090
1356
  },
1091
1357
  type: "button",
1092
1358
  role: "radio",
1093
- "aria-checked": h,
1094
- tabIndex: h ? 0 : -1,
1095
- className: A("cms-chip", h && "is-on"),
1359
+ "aria-checked": f,
1360
+ tabIndex: f ? 0 : -1,
1361
+ className: T("cms-chip", f && "is-on"),
1096
1362
  onClick: () => {
1097
- t(m.id), _(a);
1363
+ t(u.id), b(a);
1098
1364
  },
1099
1365
  onKeyDown: (p) => o(p, a),
1100
1366
  children: [
1101
- h ? /* @__PURE__ */ e(T, { name: "check", size: 16 }) : null,
1102
- m.label
1367
+ f ? /* @__PURE__ */ e(A, { name: "check", size: 16 }) : null,
1368
+ u.label
1103
1369
  ]
1104
1370
  },
1105
- m.id
1371
+ u.id
1106
1372
  );
1107
1373
  }) });
1108
1374
  }
1109
- const Te = 16;
1110
- function pn(n, l, t) {
1111
- const i = n.map((s) => Math.min(Math.max(s.width, s.min), s.max));
1112
- let c = i.reduce((s, d) => s + d, 0) + t - l;
1113
- for (let s = i.length - 1; s >= 0 && c > 0; s -= 1) {
1114
- const d = Math.min(c, i[s] - n[s].min);
1115
- i[s] = i[s] - d, c -= d;
1375
+ const De = 16;
1376
+ function gn(n, l, t) {
1377
+ const d = n.map((r) => Math.min(Math.max(r.width, r.min), r.max));
1378
+ let c = d.reduce((r, m) => r + m, 0) + t - l;
1379
+ for (let r = d.length - 1; r >= 0 && c > 0; r -= 1) {
1380
+ const m = Math.min(c, d[r] - n[r].min);
1381
+ d[r] = d[r] - m, c -= m;
1116
1382
  }
1117
- return i;
1383
+ return d;
1118
1384
  }
1119
- function _n({ index: n, size: l, shown: t, others: i, room: c, lastMin: s, onResize: d }) {
1120
- const r = Math.max(l.min, Math.min(l.max, c > 0 ? c - i - s : l.max)), f = (m) => Math.round(Math.min(Math.max(m, l.min), r)), _ = F(null), o = (m, a) => d == null ? void 0 : d(n, f(m), a);
1385
+ function Nn({ index: n, size: l, shown: t, others: d, room: c, lastMin: r, onResize: m }) {
1386
+ const s = Math.max(l.min, Math.min(l.max, c > 0 ? c - d - r : l.max)), h = (u) => Math.round(Math.min(Math.max(u, l.min), s)), b = I(null), o = (u, a) => m == null ? void 0 : m(n, h(u), a);
1121
1387
  return /* @__PURE__ */ e(
1122
1388
  "div",
1123
1389
  {
@@ -1127,74 +1393,74 @@ function _n({ index: n, size: l, shown: t, others: i, room: c, lastMin: s, onRes
1127
1393
  "aria-label": l.label,
1128
1394
  "aria-valuenow": t,
1129
1395
  "aria-valuemin": l.min,
1130
- "aria-valuemax": r,
1396
+ "aria-valuemax": s,
1131
1397
  className: "cms-panes__splitter",
1132
1398
  style: { "--split-at": `var(--split-pane-end-${String(n)})` },
1133
- onPointerDown: (m) => {
1134
- var a, h, p;
1135
- m.button > 0 || (m.preventDefault(), (h = (a = m.currentTarget).setPointerCapture) == null || h.call(a, m.pointerId), _.current = { x: m.clientX, from: t, last: t }, (p = m.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
1399
+ onPointerDown: (u) => {
1400
+ var a, f, p;
1401
+ u.button > 0 || (u.preventDefault(), (f = (a = u.currentTarget).setPointerCapture) == null || f.call(a, u.pointerId), b.current = { x: u.clientX, from: t, last: t }, (p = u.currentTarget.closest(".cms-panes")) == null || p.classList.add("is-resizing"));
1136
1402
  },
1137
- onPointerMove: (m) => {
1138
- const a = _.current;
1139
- a === null || !Number.isFinite(m.clientX) || (a.last = f(a.from + m.clientX - a.x), o(a.last, !1));
1403
+ onPointerMove: (u) => {
1404
+ const a = b.current;
1405
+ a === null || !Number.isFinite(u.clientX) || (a.last = h(a.from + u.clientX - a.x), o(a.last, !1));
1140
1406
  },
1141
- onPointerUp: (m) => {
1142
- var h;
1143
- const a = _.current;
1144
- a !== null && (_.current = null, (h = m.currentTarget.closest(".cms-panes")) == null || h.classList.remove("is-resizing"), o(a.last, !0));
1407
+ onPointerUp: (u) => {
1408
+ var f;
1409
+ const a = b.current;
1410
+ a !== null && (b.current = null, (f = u.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), o(a.last, !0));
1145
1411
  },
1146
- onPointerCancel: (m) => {
1147
- var h;
1148
- const a = _.current;
1149
- _.current = null, (h = m.currentTarget.closest(".cms-panes")) == null || h.classList.remove("is-resizing"), a !== null && o(a.last, !0);
1412
+ onPointerCancel: (u) => {
1413
+ var f;
1414
+ const a = b.current;
1415
+ b.current = null, (f = u.currentTarget.closest(".cms-panes")) == null || f.classList.remove("is-resizing"), a !== null && o(a.last, !0);
1150
1416
  },
1151
1417
  onDoubleClick: () => o(l.reset, !0),
1152
- onKeyDown: (m) => {
1153
- const a = m.key === "ArrowLeft" ? t - Te : m.key === "ArrowRight" ? t + Te : m.key === "Home" ? l.min : m.key === "End" ? r : m.key === "Enter" ? l.reset : null;
1154
- a !== null && (m.preventDefault(), o(a, !0));
1418
+ onKeyDown: (u) => {
1419
+ const a = u.key === "ArrowLeft" ? t - De : u.key === "ArrowRight" ? t + De : u.key === "Home" ? l.min : u.key === "End" ? s : u.key === "Enter" ? l.reset : null;
1420
+ a !== null && (u.preventDefault(), o(a, !0));
1155
1421
  }
1156
1422
  }
1157
1423
  );
1158
1424
  }
1159
- function Xn({ panes: n, active: l, back: t, sizes: i, lastMin: c = 360, onResize: s }) {
1160
- const d = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), r = F(null), [f, _] = E(0), o = (i ?? []).slice(0, n.length - 1), m = o.length === n.length - 1 && o.every((p) => p !== void 0);
1161
- ge(() => {
1162
- const p = r.current;
1163
- if (p === null || !m) return;
1164
- const v = () => _(p.clientWidth);
1165
- if (v(), typeof ResizeObserver > "u") return;
1166
- const N = new ResizeObserver(v);
1425
+ function el({ panes: n, active: l, back: t, sizes: d, lastMin: c = 360, onResize: r }) {
1426
+ const m = Math.min(Math.max(l ?? n.length - 1, 0), n.length - 1), s = I(null), [h, b] = E(0), o = (d ?? []).slice(0, n.length - 1), u = o.length === n.length - 1 && o.every((p) => p !== void 0);
1427
+ Ne(() => {
1428
+ const p = s.current;
1429
+ if (p === null || !u) return;
1430
+ const _ = () => b(p.clientWidth);
1431
+ if (_(), typeof ResizeObserver > "u") return;
1432
+ const N = new ResizeObserver(_);
1167
1433
  return N.observe(p), () => N.disconnect();
1168
- }, [m]);
1169
- const a = m ? pn(o, f > 0 ? f : Number.POSITIVE_INFINITY, c) : [], h = m ? Object.fromEntries(a.flatMap((p, v) => [
1170
- [`--split-pane-${String(v)}`, `${String(p)}px`],
1171
- [`--split-pane-end-${String(v)}`, `${String(a.slice(0, v + 1).reduce((N, w) => N + w, 0))}px`]
1434
+ }, [u]);
1435
+ const a = u ? gn(o, h > 0 ? h : Number.POSITIVE_INFINITY, c) : [], f = u ? Object.fromEntries(a.flatMap((p, _) => [
1436
+ [`--split-pane-${String(_)}`, `${String(p)}px`],
1437
+ [`--split-pane-end-${String(_)}`, `${String(a.slice(0, _ + 1).reduce((N, y) => N + y, 0))}px`]
1172
1438
  ])) : void 0;
1173
- return /* @__PURE__ */ u(
1439
+ return /* @__PURE__ */ i(
1174
1440
  "div",
1175
1441
  {
1176
- ref: r,
1177
- className: A("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", m && "cms-panes--sized"),
1178
- "data-active": d,
1179
- style: h,
1442
+ ref: s,
1443
+ className: T("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", u && "cms-panes--sized"),
1444
+ "data-active": m,
1445
+ style: f,
1180
1446
  children: [
1181
- n.map((p, v) => /* @__PURE__ */ u("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": d - v, children: [
1182
- v === d && t ? /* @__PURE__ */ u("a", { className: "cms-panes__back", href: t.href, children: [
1183
- /* @__PURE__ */ e(T, { name: "chevron-left", size: 18 }),
1447
+ n.map((p, _) => /* @__PURE__ */ i("section", { className: "cms-panes__pane", "aria-label": p.label, "data-offset": m - _, children: [
1448
+ _ === m && t ? /* @__PURE__ */ i("a", { className: "cms-panes__back", href: t.href, children: [
1449
+ /* @__PURE__ */ e(A, { name: "chevron-left", size: 18 }),
1184
1450
  t.label
1185
1451
  ] }) : null,
1186
1452
  p.content
1187
1453
  ] }, p.label)),
1188
- m ? o.map((p, v) => /* @__PURE__ */ e(
1189
- _n,
1454
+ u ? o.map((p, _) => /* @__PURE__ */ e(
1455
+ Nn,
1190
1456
  {
1191
- index: v,
1457
+ index: _,
1192
1458
  size: p,
1193
- shown: a[v],
1194
- others: a.reduce((N, w, x) => x === v ? N : N + w, 0),
1195
- room: f,
1459
+ shown: a[_],
1460
+ others: a.reduce((N, y, x) => x === _ ? N : N + y, 0),
1461
+ room: h,
1196
1462
  lastMin: c,
1197
- onResize: s
1463
+ onResize: r
1198
1464
  },
1199
1465
  p.label
1200
1466
  )) : null
@@ -1202,77 +1468,103 @@ function Xn({ panes: n, active: l, back: t, sizes: i, lastMin: c = 360, onResize
1202
1468
  }
1203
1469
  );
1204
1470
  }
1205
- const bn = { attachment: "Has an attachment", unread: "Unread" };
1206
- function Jn({ from: n, subject: l, preview: t, time: i, unread: c, hasAttachment: s, selected: d, onOpen: r, labels: f }) {
1207
- const _ = ce(bn, f);
1208
- return /* @__PURE__ */ u(
1209
- "button",
1210
- {
1211
- type: "button",
1212
- className: A("cms-mail-row", c && "is-unread", d && "is-selected"),
1213
- "aria-current": d ? "true" : void 0,
1214
- onClick: r,
1215
- children: [
1216
- /* @__PURE__ */ e(ve, { name: n, size: 40 }),
1217
- /* @__PURE__ */ u("span", { className: "cms-mail-row__body", children: [
1218
- /* @__PURE__ */ u("span", { className: "cms-mail-row__line", children: [
1219
- /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1220
- s ? /* @__PURE__ */ e(T, { name: "paperclip", size: 16, label: _.attachment }) : null,
1221
- /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: i })
1222
- ] }),
1223
- /* @__PURE__ */ u("span", { className: "cms-mail-row__line", children: [
1224
- /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1225
- c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": _.unread }) : null
1226
- ] }),
1227
- /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
1228
- ] })
1229
- ]
1230
- }
1231
- );
1471
+ const yn = { attachment: "Has an attachment", unread: "Unread" };
1472
+ function nl({ from: n, subject: l, preview: t, time: d, unread: c, hasAttachment: r, selected: m, onOpen: s, check: h, selecting: b, labels: o }) {
1473
+ const u = de(yn, o), a = /* @__PURE__ */ e(ge, { name: n, size: 40 });
1474
+ return /* @__PURE__ */ i("div", { className: T("cms-mail-row", c && "is-unread", m && "is-selected", b && "is-selecting", (h == null ? void 0 : h.checked) && "is-checked"), children: [
1475
+ h !== void 0 ? /* @__PURE__ */ i("span", { className: "cms-mail-row__lead", children: [
1476
+ a,
1477
+ /* @__PURE__ */ e(
1478
+ "input",
1479
+ {
1480
+ type: "checkbox",
1481
+ className: "cms-mail-row__check",
1482
+ checked: h.checked,
1483
+ disabled: h.disabled,
1484
+ "aria-disabled": h.pending ? "true" : void 0,
1485
+ "aria-busy": h.pending ? "true" : void 0,
1486
+ "aria-label": h.label,
1487
+ onChange: () => {
1488
+ },
1489
+ onClick: (f) => {
1490
+ if (f.stopPropagation(), h.pending) {
1491
+ f.preventDefault();
1492
+ return;
1493
+ }
1494
+ h.onCheck({ shift: f.shiftKey, toggle: f.ctrlKey || f.metaKey });
1495
+ }
1496
+ }
1497
+ )
1498
+ ] }) : null,
1499
+ /* @__PURE__ */ i(
1500
+ "button",
1501
+ {
1502
+ type: "button",
1503
+ className: "cms-mail-row__open",
1504
+ "aria-current": m ? "true" : void 0,
1505
+ onClick: s,
1506
+ children: [
1507
+ h === void 0 ? a : null,
1508
+ /* @__PURE__ */ i("span", { className: "cms-mail-row__body", children: [
1509
+ /* @__PURE__ */ i("span", { className: "cms-mail-row__line", children: [
1510
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1511
+ r ? /* @__PURE__ */ e(A, { name: "paperclip", size: 16, label: u.attachment }) : null,
1512
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: d })
1513
+ ] }),
1514
+ /* @__PURE__ */ i("span", { className: "cms-mail-row__line", children: [
1515
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1516
+ c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": u.unread }) : null
1517
+ ] }),
1518
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
1519
+ ] })
1520
+ ]
1521
+ }
1522
+ )
1523
+ ] });
1232
1524
  }
1233
- function Qn({ direction: n, children: l, time: t, read: i, readLabel: c = "Read" }) {
1234
- return /* @__PURE__ */ u("div", { className: A("cms-bubble", `cms-bubble--${n}`), children: [
1525
+ function ll({ direction: n, children: l, time: t, read: d, readLabel: c = "Read" }) {
1526
+ return /* @__PURE__ */ i("div", { className: T("cms-bubble", `cms-bubble--${n}`), children: [
1235
1527
  /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: l }),
1236
- /* @__PURE__ */ u("div", { className: "cms-bubble__meta", children: [
1528
+ /* @__PURE__ */ i("div", { className: "cms-bubble__meta", children: [
1237
1529
  t,
1238
- n === "out" && i ? /* @__PURE__ */ u(M, { children: [
1530
+ n === "out" && d ? /* @__PURE__ */ i(M, { children: [
1239
1531
  " · ",
1240
1532
  c
1241
1533
  ] }) : null
1242
1534
  ] })
1243
1535
  ] });
1244
1536
  }
1245
- function el({ label: n, value: l, onChange: t, onSend: i, onAttach: c, placeholder: s, variant: d = "chat", sendLabel: r = "Send", attachLabel: f = "Attach a file", leading: _, canSend: o }) {
1246
- const m = G(), a = o ?? l.trim() !== "", h = (v) => {
1247
- v.preventDefault(), a && i();
1248
- }, p = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": f, onClick: c, children: /* @__PURE__ */ e(T, { name: "paperclip" }) }) : null;
1249
- return /* @__PURE__ */ u("form", { className: A("cms-composer", `cms-composer--${d}`), onSubmit: h, children: [
1250
- /* @__PURE__ */ e("label", { htmlFor: m, className: d === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1251
- d === "chat" ? p : null,
1537
+ function tl({ label: n, value: l, onChange: t, onSend: d, onAttach: c, placeholder: r, variant: m = "chat", sendLabel: s = "Send", attachLabel: h = "Attach a file", leading: b, canSend: o }) {
1538
+ const u = Y(), a = o ?? l.trim() !== "", f = (_) => {
1539
+ _.preventDefault(), a && d();
1540
+ }, p = c ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": h, onClick: c, children: /* @__PURE__ */ e(A, { name: "paperclip" }) }) : null;
1541
+ return /* @__PURE__ */ i("form", { className: T("cms-composer", `cms-composer--${m}`), onSubmit: f, children: [
1542
+ /* @__PURE__ */ e("label", { htmlFor: u, className: m === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1543
+ m === "chat" ? p : null,
1252
1544
  /* @__PURE__ */ e(
1253
1545
  "textarea",
1254
1546
  {
1255
- id: m,
1547
+ id: u,
1256
1548
  className: "cms-composer__input",
1257
- rows: d === "reply" ? 3 : 1,
1258
- placeholder: s,
1549
+ rows: m === "reply" ? 3 : 1,
1550
+ placeholder: r,
1259
1551
  value: l,
1260
- onChange: (v) => t(v.target.value),
1261
- onKeyDown: (v) => {
1262
- v.nativeEvent.isComposing || v.keyCode === 229 || d === "chat" && v.key === "Enter" && !v.shiftKey && (v.preventDefault(), a && i());
1552
+ onChange: (_) => t(_.target.value),
1553
+ onKeyDown: (_) => {
1554
+ _.nativeEvent.isComposing || _.keyCode === 229 || m === "chat" && _.key === "Enter" && !_.shiftKey && (_.preventDefault(), a && d());
1263
1555
  }
1264
1556
  }
1265
1557
  ),
1266
- d === "reply" && _ !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: _ }) : null,
1267
- d === "reply" ? p : null,
1268
- d === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": r, disabled: !a, children: /* @__PURE__ */ e(T, { name: "send" }) }) : /* @__PURE__ */ u("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !a, children: [
1269
- r,
1558
+ m === "reply" && b !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: b }) : null,
1559
+ m === "reply" ? p : null,
1560
+ m === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": s, disabled: !a, children: /* @__PURE__ */ e(A, { name: "send" }) }) : /* @__PURE__ */ i("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !a, children: [
1561
+ s,
1270
1562
  " ",
1271
- /* @__PURE__ */ e(T, { name: "send", size: 18 })
1563
+ /* @__PURE__ */ e(A, { name: "send", size: 18 })
1272
1564
  ] })
1273
1565
  ] });
1274
1566
  }
1275
- const Ee = {
1567
+ const Ae = {
1276
1568
  incomingAudio: "Incoming audio call",
1277
1569
  incomingVideo: "Incoming video call",
1278
1570
  incomingFrom: (n, l) => `${n} from ${l}`,
@@ -1293,91 +1585,91 @@ const Ee = {
1293
1585
  onCallWith: (n) => `On a call with ${n}`,
1294
1586
  returnToCall: "Return to call"
1295
1587
  };
1296
- function nl({ name: n, media: l, onAccept: t, onDecline: i, labels: c }) {
1297
- const s = ce(Ee, c), d = l === "video" ? s.incomingVideo : s.incomingAudio;
1298
- return /* @__PURE__ */ u("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": s.incomingFrom(d, n), children: [
1299
- /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ve, { name: n, size: 112 }) }),
1588
+ function al({ name: n, media: l, onAccept: t, onDecline: d, labels: c }) {
1589
+ const r = de(Ae, c), m = l === "video" ? r.incomingVideo : r.incomingAudio;
1590
+ return /* @__PURE__ */ i("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": r.incomingFrom(m, n), children: [
1591
+ /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(ge, { name: n, size: 112 }) }),
1300
1592
  /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
1301
- /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: d }),
1302
- /* @__PURE__ */ u("div", { className: "cms-call-incoming__actions", children: [
1303
- /* @__PURE__ */ e(ae, { icon: "phone-off", label: s.decline, tone: "hang-up", onClick: i }),
1304
- /* @__PURE__ */ e(ae, { icon: "phone", label: s.accept, tone: "accept", onClick: t })
1593
+ /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: m }),
1594
+ /* @__PURE__ */ i("div", { className: "cms-call-incoming__actions", children: [
1595
+ /* @__PURE__ */ e(se, { icon: "phone-off", label: r.decline, tone: "hang-up", onClick: d }),
1596
+ /* @__PURE__ */ e(se, { icon: "phone", label: r.accept, tone: "accept", onClick: t })
1305
1597
  ] })
1306
1598
  ] });
1307
1599
  }
1308
- function ae({ icon: n, label: l, onClick: t, tone: i = "plain", pressed: c }) {
1309
- return /* @__PURE__ */ u(
1600
+ function se({ icon: n, label: l, onClick: t, tone: d = "plain", pressed: c }) {
1601
+ return /* @__PURE__ */ i(
1310
1602
  "button",
1311
1603
  {
1312
1604
  type: "button",
1313
- className: A("cms-call-button", `cms-call-button--${i}`, c && "is-pressed"),
1605
+ className: T("cms-call-button", `cms-call-button--${d}`, c && "is-pressed"),
1314
1606
  "aria-pressed": c,
1315
1607
  onClick: t,
1316
1608
  children: [
1317
- /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(T, { name: n, size: 24 }) }),
1609
+ /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(A, { name: n, size: 24 }) }),
1318
1610
  /* @__PURE__ */ e("span", { className: "cms-call-button__label", children: l })
1319
1611
  ]
1320
1612
  }
1321
1613
  );
1322
1614
  }
1323
- function ll({ name: n, duration: l, connection: t, you: i, muted: c, speaker: s, onToggleMute: d, onToggleSpeaker: r, onAddPerson: f, onChat: _, onHangUp: o, labels: m }) {
1324
- const a = ce(Ee, m);
1325
- return /* @__PURE__ */ u("section", { className: "cms-call-panel", "aria-label": a.callWith(n), children: [
1326
- /* @__PURE__ */ u("div", { className: "cms-call-panel__head", children: [
1327
- /* @__PURE__ */ e(ve, { name: n, size: 64 }),
1328
- /* @__PURE__ */ u("div", { className: "cms-call-panel__who", children: [
1615
+ function sl({ name: n, duration: l, connection: t, you: d, muted: c, speaker: r, onToggleMute: m, onToggleSpeaker: s, onAddPerson: h, onChat: b, onHangUp: o, labels: u }) {
1616
+ const a = de(Ae, u);
1617
+ return /* @__PURE__ */ i("section", { className: "cms-call-panel", "aria-label": a.callWith(n), children: [
1618
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__head", children: [
1619
+ /* @__PURE__ */ e(ge, { name: n, size: 64 }),
1620
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__who", children: [
1329
1621
  /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1330
1622
  /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": a.callTime(l), children: l })
1331
1623
  ] }),
1332
- /* @__PURE__ */ e("span", { className: A("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? a.goodConnection : a.poorConnection })
1624
+ /* @__PURE__ */ e("span", { className: T("cms-pill", t === "good" ? "cms-pill--success" : "cms-pill--warning"), children: t === "good" ? a.goodConnection : a.poorConnection })
1333
1625
  ] }),
1334
- /* @__PURE__ */ u("div", { className: "cms-call-panel__you", children: [
1335
- /* @__PURE__ */ e(ve, { name: i.name, size: 36 }),
1626
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__you", children: [
1627
+ /* @__PURE__ */ e(ge, { name: d.name, size: 36 }),
1336
1628
  /* @__PURE__ */ e("span", { children: a.you }),
1337
- i.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": a.speaking }) : null
1629
+ d.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": a.speaking }) : null
1338
1630
  ] }),
1339
- /* @__PURE__ */ u("div", { className: "cms-call-panel__controls", children: [
1340
- /* @__PURE__ */ e(ae, { icon: "mic", label: c ? a.unmute : a.mute, pressed: c, onClick: d }),
1341
- /* @__PURE__ */ e(ae, { icon: "speaker", label: a.speaker, pressed: s, onClick: r }),
1342
- f ? /* @__PURE__ */ e(ae, { icon: "user-plus", label: a.addPerson, onClick: f }) : null,
1343
- _ ? /* @__PURE__ */ e(ae, { icon: "chat", label: a.chat, onClick: _ }) : null,
1344
- /* @__PURE__ */ e(ae, { icon: "phone-off", label: a.hangUp, tone: "hang-up", onClick: o })
1631
+ /* @__PURE__ */ i("div", { className: "cms-call-panel__controls", children: [
1632
+ /* @__PURE__ */ e(se, { icon: "mic", label: c ? a.unmute : a.mute, pressed: c, onClick: m }),
1633
+ /* @__PURE__ */ e(se, { icon: "speaker", label: a.speaker, pressed: r, onClick: s }),
1634
+ h ? /* @__PURE__ */ e(se, { icon: "user-plus", label: a.addPerson, onClick: h }) : null,
1635
+ b ? /* @__PURE__ */ e(se, { icon: "chat", label: a.chat, onClick: b }) : null,
1636
+ /* @__PURE__ */ e(se, { icon: "phone-off", label: a.hangUp, tone: "hang-up", onClick: o })
1345
1637
  ] })
1346
1638
  ] });
1347
1639
  }
1348
- function tl({ name: n, duration: l, muted: t, onToggleMute: i, onReturn: c, onHangUp: s, labels: d }) {
1349
- const r = ce(Ee, d);
1350
- return /* @__PURE__ */ u("section", { className: "cms-call-bar", "aria-label": r.callWith(n), children: [
1640
+ function rl({ name: n, duration: l, muted: t, onToggleMute: d, onReturn: c, onHangUp: r, labels: m }) {
1641
+ const s = de(Ae, m);
1642
+ return /* @__PURE__ */ i("section", { className: "cms-call-bar", "aria-label": s.callWith(n), children: [
1351
1643
  /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1352
- /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: r.onCallWith(n) }),
1644
+ /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: s.onCallWith(n) }),
1353
1645
  /* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: l }),
1354
- /* @__PURE__ */ u("span", { className: "cms-call-bar__actions", children: [
1355
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? r.unmute : r.mute, "aria-pressed": t, onClick: i, children: /* @__PURE__ */ e(T, { name: "mic" }) }),
1356
- /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: c, children: r.returnToCall }),
1357
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": r.hangUp, onClick: s, children: /* @__PURE__ */ e(T, { name: "phone-off" }) })
1646
+ /* @__PURE__ */ i("span", { className: "cms-call-bar__actions", children: [
1647
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": t ? s.unmute : s.mute, "aria-pressed": t, onClick: d, children: /* @__PURE__ */ e(A, { name: "mic" }) }),
1648
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: c, children: s.returnToCall }),
1649
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": s.hangUp, onClick: r, children: /* @__PURE__ */ e(A, { name: "phone-off" }) })
1358
1650
  ] })
1359
1651
  ] });
1360
1652
  }
1361
- function al({ mark: n, product: l, headline: t, lead: i, features: c = [], children: s }) {
1362
- return /* @__PURE__ */ u("div", { className: "cms-signin", children: [
1363
- /* @__PURE__ */ u("aside", { className: "cms-signin__brand", children: [
1364
- /* @__PURE__ */ u("p", { className: "cms-signin__logo", children: [
1653
+ function cl({ mark: n, product: l, headline: t, lead: d, features: c = [], children: r }) {
1654
+ return /* @__PURE__ */ i("div", { className: "cms-signin", children: [
1655
+ /* @__PURE__ */ i("aside", { className: "cms-signin__brand", children: [
1656
+ /* @__PURE__ */ i("p", { className: "cms-signin__logo", children: [
1365
1657
  /* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: n }),
1366
1658
  l
1367
1659
  ] }),
1368
- /* @__PURE__ */ u("div", { className: "cms-signin__pitch", children: [
1660
+ /* @__PURE__ */ i("div", { className: "cms-signin__pitch", children: [
1369
1661
  /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: t }),
1370
- /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: i }),
1371
- c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((d) => /* @__PURE__ */ u("li", { children: [
1372
- /* @__PURE__ */ e(T, { name: d.icon, size: 18 }),
1373
- d.label
1374
- ] }, d.label)) }) : null
1662
+ /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: d }),
1663
+ c.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: c.map((m) => /* @__PURE__ */ i("li", { children: [
1664
+ /* @__PURE__ */ e(A, { name: m.icon, size: 18 }),
1665
+ m.label
1666
+ ] }, m.label)) }) : null
1375
1667
  ] })
1376
1668
  ] }),
1377
- /* @__PURE__ */ e("main", { className: "cms-signin__form", children: s })
1669
+ /* @__PURE__ */ e("main", { className: "cms-signin__form", children: r })
1378
1670
  ] });
1379
1671
  }
1380
- const vn = {
1672
+ const wn = {
1381
1673
  title: "Sign in",
1382
1674
  identifier: "Email or username",
1383
1675
  identifierPlaceholder: "name@example.com",
@@ -1389,294 +1681,127 @@ const vn = {
1389
1681
  newHere: "New here?",
1390
1682
  create: "Create an account"
1391
1683
  };
1392
- function sl({ server: n, onSubmit: l, forgotHref: t, createHref: i, error: c, busy: s, labels: d }) {
1393
- const r = ce(vn, d), f = G(), [_, o] = E(""), [m, a] = E(""), [h, p] = E(!1);
1394
- return /* @__PURE__ */ u("form", { className: "cms-signin-form", onSubmit: (N) => {
1395
- N.preventDefault(), l(_, m);
1396
- }, "aria-describedby": c ? `${f}-error` : void 0, children: [
1397
- /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: r.title }),
1398
- /* @__PURE__ */ u("p", { className: "cms-signin-form__server", children: [
1399
- /* @__PURE__ */ e(T, { name: "server", size: 18 }),
1684
+ function il({ server: n, onSubmit: l, forgotHref: t, createHref: d, error: c, busy: r, labels: m }) {
1685
+ const s = de(wn, m), h = Y(), [b, o] = E(""), [u, a] = E(""), [f, p] = E(!1);
1686
+ return /* @__PURE__ */ i("form", { className: "cms-signin-form", onSubmit: (N) => {
1687
+ N.preventDefault(), l(b, u);
1688
+ }, "aria-describedby": c ? `${h}-error` : void 0, children: [
1689
+ /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: s.title }),
1690
+ /* @__PURE__ */ i("p", { className: "cms-signin-form__server", children: [
1691
+ /* @__PURE__ */ e(A, { name: "server", size: 18 }),
1400
1692
  n
1401
1693
  ] }),
1402
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${f}-identifier`, children: r.identifier }),
1694
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${h}-identifier`, children: s.identifier }),
1403
1695
  /* @__PURE__ */ e(
1404
1696
  "input",
1405
1697
  {
1406
- id: `${f}-identifier`,
1698
+ id: `${h}-identifier`,
1407
1699
  className: "cms-signin-form__input",
1408
1700
  type: "text",
1409
1701
  autoComplete: "username",
1410
- placeholder: r.identifierPlaceholder,
1411
- value: _,
1702
+ placeholder: s.identifierPlaceholder,
1703
+ value: b,
1412
1704
  onChange: (N) => o(N.target.value),
1413
1705
  required: !0
1414
1706
  }
1415
1707
  ),
1416
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${f}-password`, children: r.password }),
1417
- /* @__PURE__ */ u("span", { className: "cms-signin-form__password", children: [
1708
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${h}-password`, children: s.password }),
1709
+ /* @__PURE__ */ i("span", { className: "cms-signin-form__password", children: [
1418
1710
  /* @__PURE__ */ e(
1419
1711
  "input",
1420
1712
  {
1421
- id: `${f}-password`,
1713
+ id: `${h}-password`,
1422
1714
  className: "cms-signin-form__input",
1423
- type: h ? "text" : "password",
1715
+ type: f ? "text" : "password",
1424
1716
  autoComplete: "current-password",
1425
- value: m,
1717
+ value: u,
1426
1718
  onChange: (N) => a(N.target.value),
1427
1719
  required: !0
1428
1720
  }
1429
1721
  ),
1430
- /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": h, onClick: () => p((N) => !N), children: h ? r.hide : r.show })
1722
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": f, onClick: () => p((N) => !N), children: f ? s.hide : s.show })
1431
1723
  ] }),
1432
- t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: r.forgot }) : null,
1433
- c ? /* @__PURE__ */ e("p", { id: `${f}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
1434
- /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: s, "aria-busy": s || void 0, children: r.submit }),
1435
- i ? /* @__PURE__ */ u(M, { children: [
1436
- /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: r.newHere }) }),
1437
- /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: i, children: r.create })
1724
+ t ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: t, children: s.forgot }) : null,
1725
+ c ? /* @__PURE__ */ e("p", { id: `${h}-error`, className: "cms-signin-form__error", role: "alert", children: c }) : null,
1726
+ /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: r, "aria-busy": r || void 0, children: s.submit }),
1727
+ d ? /* @__PURE__ */ i(M, { children: [
1728
+ /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: s.newHere }) }),
1729
+ /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: d, children: s.create })
1438
1730
  ] }) : null
1439
1731
  ] });
1440
1732
  }
1441
- const ke = 64;
1442
- function gn(n, l) {
1443
- for (let t = n instanceof Element ? n : null; t !== null; t = t.parentElement) {
1444
- if (t instanceof HTMLElement && t.scrollTop > 0) return !1;
1445
- if (t === l) return !0;
1446
- }
1447
- return l.scrollTop <= 0;
1448
- }
1449
- function Nn(n, l) {
1450
- const [t, i] = E(0), c = F(l);
1451
- return c.current = l, Y(() => {
1452
- const s = n.current;
1453
- if (s === null) return;
1454
- let d = null, r = 0;
1455
- const f = (m) => {
1456
- d = gn(m.target, s) && m.touches.length === 1 ? m.touches[0].clientY : null, r = 0;
1457
- }, _ = (m) => {
1458
- if (d === null || c.current === null) return;
1459
- const a = m.touches[0].clientY - d;
1460
- if (a <= 0) {
1461
- d = null, i(0);
1462
- return;
1463
- }
1464
- m.cancelable && m.preventDefault(), r = Math.min(a * 0.6, ke * 1.5), i(r);
1465
- }, o = () => {
1466
- var m;
1467
- d !== null && r >= ke && ((m = c.current) == null || m.call(c)), d = null, r = 0, i(0);
1468
- };
1469
- return s.addEventListener("touchstart", f, { passive: !0 }), s.addEventListener("touchmove", _, { passive: !1 }), s.addEventListener("touchend", o), s.addEventListener("touchcancel", o), () => {
1470
- s.removeEventListener("touchstart", f), s.removeEventListener("touchmove", _), s.removeEventListener("touchend", o), s.removeEventListener("touchcancel", o);
1471
- };
1472
- }, [n]), t;
1473
- }
1474
- const Fe = Ue(null);
1475
- function yn() {
1476
- return Ke(Fe);
1477
- }
1478
- function rl({ label: n, rows: l, error: t, onRetry: i, loadingText: c = "Loading", emptyTitle: s = "Nothing here yet", emptyHint: d, selected: r, onOpen: f, onRowMenu: _ }) {
1479
- const o = F([]), m = yn();
1480
- if (t != null) return /* @__PURE__ */ e(Ge, { message: t, onRetry: i });
1481
- if (l === null) return /* @__PURE__ */ e(qe, { what: c, layout: "block" });
1482
- if (l.length === 0) return /* @__PURE__ */ e(Ye, { title: s, hint: d });
1483
- const a = (h, p, v) => {
1484
- var N;
1485
- if (h.key === "ArrowDown" || h.key === "ArrowUp")
1486
- h.preventDefault(), (N = o.current[Math.min(l.length - 1, Math.max(0, p + (h.key === "ArrowDown" ? 1 : -1)))]) == null || N.focus();
1487
- else if (h.key === "Enter")
1488
- f == null || f(v);
1489
- else if ((h.key === "ContextMenu" || h.shiftKey && h.key === "F10") && _) {
1490
- h.preventDefault();
1491
- const w = h.currentTarget.getBoundingClientRect();
1492
- _(v, { x: w.left + 16, y: w.bottom });
1493
- }
1494
- };
1495
- return /* @__PURE__ */ u(M, { children: [
1496
- m !== null && (m.distance > 0 || m.refreshing) ? /* @__PURE__ */ u("div", { className: "cms-list__pull", role: "status", style: { height: m.refreshing ? void 0 : m.distance }, "data-ready": m.distance >= ke ? "" : void 0, children: [
1497
- m.refreshing ? /* @__PURE__ */ e(z, { name: "spinner" }) : null,
1498
- m.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: m.text }) : null
1499
- ] }) : null,
1500
- /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: l.map((h, p) => {
1501
- const v = h.id === r;
1502
- return /* @__PURE__ */ u(
1503
- "li",
1504
- {
1505
- ref: (N) => {
1506
- o.current[p] = N;
1507
- },
1508
- role: "option",
1509
- "aria-selected": v,
1510
- tabIndex: v || r == null && p === 0 ? 0 : -1,
1511
- className: A("cms-list__row", v && "is-selected"),
1512
- onClick: () => f == null ? void 0 : f(h.id),
1513
- onKeyDown: (N) => a(N, p, h.id),
1514
- onContextMenu: _ ? (N) => {
1515
- N.preventDefault(), _(h.id, { x: N.clientX, y: N.clientY });
1516
- } : void 0,
1517
- children: [
1518
- h.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: h.lead }) : null,
1519
- /* @__PURE__ */ u("span", { className: "cms-list__text", children: [
1520
- /* @__PURE__ */ e("span", { className: A("cms-list__primary", h.unread === !0 && "is-unread"), children: h.primary }),
1521
- h.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: h.secondary }) : null
1522
- ] }),
1523
- h.meta != null || h.count !== void 0 ? /* @__PURE__ */ u("span", { className: "cms-list__end", children: [
1524
- h.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: h.meta }) : null,
1525
- h.count !== void 0 && h.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: h.count }) : null
1526
- ] }) : null
1527
- ]
1528
- },
1529
- h.id
1530
- );
1531
- }) })
1532
- ] });
1533
- }
1534
- function Re({ at: n, items: l, onClose: t, label: i = "Actions", focus: c = "first" }) {
1535
- const s = F(null), d = F(null), r = G(), [f, _] = E(n), o = l.filter((a) => a.offer.offered);
1536
- if (ge(() => {
1537
- if (!n) return;
1538
- const a = s.current, h = (a == null ? void 0 : a.offsetWidth) ?? 0, p = (a == null ? void 0 : a.offsetHeight) ?? 0;
1539
- _({ x: Math.max(0, Math.min(n.x, window.innerWidth - h)), y: Math.max(0, Math.min(n.y, window.innerHeight - p)) });
1540
- }, [n]), Y(() => {
1541
- var p, v;
1542
- if (!n) return;
1543
- d.current = document.activeElement;
1544
- const a = Array.from(((p = s.current) == null ? void 0 : p.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) ?? []);
1545
- (v = c === "last" ? a[a.length - 1] : a[0]) == null || v.focus();
1546
- const h = (N) => {
1547
- var w;
1548
- (w = s.current) != null && w.contains(N.target) || t();
1549
- };
1550
- return document.addEventListener("mousedown", h), () => {
1551
- var N, w;
1552
- document.removeEventListener("mousedown", h), (w = (N = d.current) == null ? void 0 : N.focus) == null || w.call(N);
1553
- };
1554
- }, [n, t, c]), !n || o.length === 0) return null;
1555
- const m = (a) => {
1556
- var v, N;
1557
- const h = Array.from(((v = s.current) == null ? void 0 : v.querySelectorAll('[role="menuitem"]')) ?? []), p = h.indexOf(document.activeElement);
1558
- if (a.key === "Escape" || a.key === "Tab")
1559
- a.preventDefault(), t();
1560
- else if (a.key === "ArrowDown" || a.key === "ArrowUp") {
1561
- a.preventDefault();
1562
- const w = a.key === "ArrowDown" ? 1 : -1;
1563
- (N = h[(p + w + h.length) % h.length]) == null || N.focus();
1564
- }
1565
- };
1566
- return Me(
1567
- /* @__PURE__ */ e(
1568
- "div",
1569
- {
1570
- ref: s,
1571
- className: "cms-menu",
1572
- role: "menu",
1573
- "aria-label": i,
1574
- style: { left: (f ?? n).x, top: (f ?? n).y },
1575
- onKeyDown: m,
1576
- onContextMenu: (a) => a.preventDefault(),
1577
- children: o.map((a) => {
1578
- const h = a.offer.refusal !== void 0;
1579
- return /* @__PURE__ */ u(
1580
- "div",
1581
- {
1582
- role: "menuitem",
1583
- tabIndex: -1,
1584
- "aria-disabled": h || void 0,
1585
- "aria-describedby": h ? `${r}-${a.id}` : void 0,
1586
- title: h ? a.offer.refusal : void 0,
1587
- className: A("cms-menu__item", a.danger && "is-danger", a.offer.locked && "is-locked", h && "is-refused"),
1588
- onClick: () => {
1589
- h || (t(), a.onSelect());
1590
- },
1591
- onKeyDown: (p) => {
1592
- (p.key === "Enter" || p.key === " ") && !h && (p.preventDefault(), t(), a.onSelect());
1593
- },
1594
- children: [
1595
- a.offer.locked ? /* @__PURE__ */ e(z, { name: "lock" }) : null,
1596
- /* @__PURE__ */ e("span", { className: "cms-menu__label", children: a.label }),
1597
- h ? /* @__PURE__ */ e("span", { id: `${r}-${a.id}`, className: "cms-menu__refusal", children: a.offer.refusal }) : null
1598
- ]
1599
- },
1600
- a.id
1601
- );
1602
- })
1603
- }
1604
- ),
1605
- document.body
1606
- );
1607
- }
1608
- const De = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, $e = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
1609
- function wn(n) {
1733
+ const $e = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, Pe = (n, l) => n.size === l.size && [...n].every((t) => l.has(t));
1734
+ function kn(n) {
1610
1735
  const l = /* @__PURE__ */ new Map();
1611
1736
  for (const t of n) l.set(t.group, [...l.get(t.group) ?? [], t]);
1612
1737
  return [...l.values()];
1613
1738
  }
1614
- function kn(n) {
1739
+ function xn(n) {
1615
1740
  const l = /* @__PURE__ */ new Map();
1616
1741
  for (const t of n) t.overflow !== void 0 && t.overflow !== 0 && l.set(t.overflow, [...l.get(t.overflow) ?? [], t.id]);
1617
- return [...l.entries()].sort(([t], [i]) => t - i).map(([, t]) => t);
1618
- }
1619
- function cl({ label: n, actions: l, onAction: t, status: i, moreLabel: c, leading: s }) {
1620
- const d = F(null), r = F(null), [f, _] = E(De), [o, m] = E(null), [a, h] = E("first"), [p, v] = E(null), [N, w] = E(null), x = wn(l), S = kn(l), C = x.flat(), R = C.filter((g) => g.overflow === 0), H = C.filter((g) => g.overflow !== 0), ee = JSON.stringify([l.map((g) => [g.id, g.label, g.icon, g.group, g.overflow ?? null]), i ?? "", s !== void 0]), j = be(() => {
1621
- const g = d.current, L = r.current;
1622
- if (g === null || L === null) return;
1623
- const V = getComputedStyle(g), W = parseFloat(V.columnGap || "0") || 0, $ = g.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0), q = (I) => {
1624
- var U;
1625
- return ((U = L.querySelector(I)) == null ? void 0 : U.getBoundingClientRect().width) ?? 0;
1626
- }, de = q('[data-measure="leading"]'), ue = q('[data-measure="separator"]'), me = q('[data-measure="more"]'), he = (I, U) => q(`[data-measure="${U ? "full" : "icon"}"][data-measure-action="${CSS.escape(I)}"]`), b = (I, U) => {
1627
- const Q = /* @__PURE__ */ new Set([...R.map((te) => te.id), ...U]), se = x.map((te) => te.filter((pe) => !Q.has(pe.id))).filter((te) => te.length > 0), fe = se.flat(), He = fe.length + (se.length - 1) + (Q.size > 0 ? 1 : 0) + (de > 0 ? 1 : 0);
1628
- return de + fe.reduce((te, pe) => te + he(pe.id, !I.has(pe.id)), 0) + ue * Math.max(0, se.length - 1) + (Q.size > 0 ? me : 0) + W * Math.max(0, He - 1);
1629
- }, k = H.filter((I) => !S.some((U) => U.includes(I.id))).map((I) => I.id), B = [...S, ...[...k].reverse().map((I) => [I])];
1630
- let K = null;
1631
- if (b(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= $) K = De;
1742
+ return [...l.entries()].sort(([t], [d]) => t - d).map(([, t]) => t);
1743
+ }
1744
+ function ol({ label: n, actions: l, onAction: t, status: d, moreLabel: c, leading: r }) {
1745
+ const m = I(null), s = I(null), [h, b] = E($e), [o, u] = E(null), [a, f] = E("first"), [p, _] = E(null), [N, y] = E(null), x = kn(l), C = xn(l), S = x.flat(), F = S.filter((g) => g.overflow === 0), R = S.filter((g) => g.overflow !== 0), Q = JSON.stringify([l.map((g) => [g.id, g.label, g.icon, g.group, g.overflow ?? null]), d ?? "", r !== void 0]), G = _e(() => {
1746
+ const g = m.current, D = s.current;
1747
+ if (g === null || D === null) return;
1748
+ const V = getComputedStyle(g), ee = parseFloat(V.columnGap || "0") || 0, L = g.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0), X = (P) => {
1749
+ var O;
1750
+ return ((O = D.querySelector(P)) == null ? void 0 : O.getBoundingClientRect().width) ?? 0;
1751
+ }, oe = X('[data-measure="leading"]'), ye = X('[data-measure="separator"]'), me = X('[data-measure="more"]'), he = (P, O) => X(`[data-measure="${O ? "full" : "icon"}"][data-measure-action="${CSS.escape(P)}"]`), ne = (P, O) => {
1752
+ const J = /* @__PURE__ */ new Set([...F.map((ae) => ae.id), ...O]), re = x.map((ae) => ae.filter((pe) => !J.has(pe.id))).filter((ae) => ae.length > 0), fe = re.flat(), He = fe.length + (re.length - 1) + (J.size > 0 ? 1 : 0) + (oe > 0 ? 1 : 0);
1753
+ return oe + fe.reduce((ae, pe) => ae + he(pe.id, !P.has(pe.id)), 0) + ye * Math.max(0, re.length - 1) + (J.size > 0 ? me : 0) + ee * Math.max(0, He - 1);
1754
+ }, v = R.filter((P) => !C.some((O) => O.includes(P.id))).map((P) => P.id), k = [...C, ...[...v].reverse().map((P) => [P])];
1755
+ let $ = null;
1756
+ if (ne(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= L) $ = $e;
1632
1757
  else {
1633
- const I = /* @__PURE__ */ new Set();
1634
- for (const U of B) {
1635
- for (const Q of U) I.add(Q);
1636
- if (b(I, /* @__PURE__ */ new Set()) <= $) {
1637
- K = { bare: I, hidden: /* @__PURE__ */ new Set() };
1758
+ const P = /* @__PURE__ */ new Set();
1759
+ for (const O of k) {
1760
+ for (const J of O) P.add(J);
1761
+ if (ne(P, /* @__PURE__ */ new Set()) <= L) {
1762
+ $ = { bare: P, hidden: /* @__PURE__ */ new Set() };
1638
1763
  break;
1639
1764
  }
1640
1765
  }
1641
1766
  }
1642
- if (K === null) {
1643
- const I = new Set(H.map((Q) => Q.id)), U = /* @__PURE__ */ new Set();
1644
- for (const Q of S) {
1645
- for (const se of Q) H.some((fe) => fe.id === se) && U.add(se);
1646
- if (U.size >= 2 && b(I, U) <= $) break;
1767
+ if ($ === null) {
1768
+ const P = new Set(R.map((J) => J.id)), O = /* @__PURE__ */ new Set();
1769
+ for (const J of C) {
1770
+ for (const re of J) R.some((fe) => fe.id === re) && O.add(re);
1771
+ if (O.size >= 2 && ne(P, O) <= L) break;
1647
1772
  }
1648
- if (b(I, U) > $) {
1649
- for (const Q of [...k].reverse())
1650
- if (U.add(Q), b(I, U) <= $) break;
1773
+ if (ne(P, O) > L) {
1774
+ for (const J of [...v].reverse())
1775
+ if (O.add(J), ne(P, O) <= L) break;
1651
1776
  }
1652
- K = { bare: I, hidden: U };
1777
+ $ = { bare: P, hidden: O };
1653
1778
  }
1654
- const Ne = K;
1655
- _((I) => $e(I.bare, Ne.bare) && $e(I.hidden, Ne.hidden) ? I : Ne);
1656
- }, [ee]);
1657
- ge(j, [j]), Y(() => {
1658
- const g = d.current;
1779
+ const K = $;
1780
+ b((P) => Pe(P.bare, K.bare) && Pe(P.hidden, K.hidden) ? P : K);
1781
+ }, [Q]);
1782
+ Ne(G, [G]), q(() => {
1783
+ const g = m.current;
1659
1784
  if (g === null || typeof ResizeObserver > "u") return;
1660
- const L = new ResizeObserver(() => j());
1661
- return L.observe(g), () => L.disconnect();
1662
- }, [j]);
1663
- const y = /* @__PURE__ */ new Set([...R.map((g) => g.id), ...f.hidden]), Z = x.map((g) => g.filter((L) => !y.has(L.id))).filter((g) => g.length > 0).flat(), D = [
1664
- ...R,
1665
- ...S.flat().map((g) => C.find((L) => L.id === g)).filter((g) => g !== void 0 && f.hidden.has(g.id)),
1785
+ const D = new ResizeObserver(() => G());
1786
+ return D.observe(g), () => D.disconnect();
1787
+ }, [G]);
1788
+ const w = /* @__PURE__ */ new Set([...F.map((g) => g.id), ...h.hidden]), Z = x.map((g) => g.filter((D) => !w.has(D.id))).filter((g) => g.length > 0).flat(), z = [
1789
+ ...F,
1790
+ ...C.flat().map((g) => S.find((D) => D.id === g)).filter((g) => g !== void 0 && h.hidden.has(g.id)),
1666
1791
  // The pinned that a row too narrow for them sent behind ..., in the row's order.
1667
- ...H.filter((g) => f.hidden.has(g.id) && !S.some((L) => L.includes(g.id)))
1668
- ], X = new Set(H.filter((g) => !S.some((L) => L.includes(g.id))).map((g) => g.id)), O = [...Z.map((g) => g.id), ...D.length > 0 ? ["more"] : []], J = p !== null && O.includes(p) ? p : O[0] ?? null, ie = (g) => {
1669
- var $, q;
1670
- const L = O.indexOf(J ?? "");
1792
+ ...R.filter((g) => h.hidden.has(g.id) && !C.some((D) => D.includes(g.id)))
1793
+ ], H = new Set(R.filter((g) => !C.some((D) => D.includes(g.id))).map((g) => g.id)), W = [...Z.map((g) => g.id), ...z.length > 0 ? ["more"] : []], j = p !== null && W.includes(p) ? p : W[0] ?? null, ie = (g) => {
1794
+ var L, X;
1795
+ const D = W.indexOf(j ?? "");
1671
1796
  let V = null;
1672
- if (g.key === "ArrowRight" ? V = Math.min(O.length - 1, L + 1) : g.key === "ArrowLeft" ? V = Math.max(0, L - 1) : g.key === "Home" ? V = 0 : g.key === "End" ? V = O.length - 1 : g.key === "Escape" && w(J), V === null) return;
1797
+ if (g.key === "ArrowRight" ? V = Math.min(W.length - 1, D + 1) : g.key === "ArrowLeft" ? V = Math.max(0, D - 1) : g.key === "Home" ? V = 0 : g.key === "End" ? V = W.length - 1 : g.key === "Escape" && y(j), V === null) return;
1673
1798
  g.preventDefault();
1674
- const W = O[V] ?? null;
1675
- v(W), (q = ($ = d.current) == null ? void 0 : $.querySelector(`[data-stop="${CSS.escape(W ?? "")}"]`)) == null || q.focus();
1676
- }, oe = D.map((g) => ({
1799
+ const ee = W[V] ?? null;
1800
+ _(ee), (X = (L = m.current) == null ? void 0 : L.querySelector(`[data-stop="${CSS.escape(ee ?? "")}"]`)) == null || X.focus();
1801
+ }, ue = z.map((g) => ({
1677
1802
  id: g.id,
1678
- label: /* @__PURE__ */ u(M, { children: [
1679
- /* @__PURE__ */ e(_e, { name: g.icon }),
1803
+ label: /* @__PURE__ */ i(M, { children: [
1804
+ /* @__PURE__ */ e(be, { name: g.icon }),
1680
1805
  g.label
1681
1806
  ] }),
1682
1807
  offer: g.disabled ? { offered: !0, locked: !1, refusal: g.reason ?? "" } : { offered: !0, locked: !1 },
@@ -1685,43 +1810,43 @@ function cl({ label: n, actions: l, onAction: t, status: i, moreLabel: c, leadin
1685
1810
  !g.disabled && !g.busy && t(g.id);
1686
1811
  }
1687
1812
  }));
1688
- return /* @__PURE__ */ u(
1813
+ return /* @__PURE__ */ i(
1689
1814
  "div",
1690
1815
  {
1691
- ref: d,
1816
+ ref: m,
1692
1817
  role: "toolbar",
1693
1818
  "aria-label": n,
1694
- className: A(
1819
+ className: T(
1695
1820
  "cms-pane-toolbar",
1696
- H.length > 0 && f.bare.size >= H.length && "cms-pane-toolbar--labels-hidden",
1697
- f.bare.size > 0 && f.bare.size < H.length && "cms-pane-toolbar--labels-partly-hidden"
1821
+ R.length > 0 && h.bare.size >= R.length && "cms-pane-toolbar--labels-hidden",
1822
+ h.bare.size > 0 && h.bare.size < R.length && "cms-pane-toolbar--labels-partly-hidden"
1698
1823
  ),
1699
1824
  onKeyDown: ie,
1700
1825
  children: [
1701
- s !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: s }) : null,
1702
- x.map((g, L) => {
1703
- const V = g.filter(($) => !y.has($.id)), W = x.slice(0, L).some(($) => $.some((q) => !y.has(q.id)));
1704
- return /* @__PURE__ */ u("div", { className: "cms-pane-toolbar__group-wrap", children: [
1705
- V.length > 0 && W ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1706
- /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: V.length === 0, children: g.map(($) => /* @__PURE__ */ e(
1707
- xn,
1826
+ r !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: r }) : null,
1827
+ x.map((g, D) => {
1828
+ const V = g.filter((L) => !w.has(L.id)), ee = x.slice(0, D).some((L) => L.some((X) => !w.has(X.id)));
1829
+ return /* @__PURE__ */ i("div", { className: "cms-pane-toolbar__group-wrap", children: [
1830
+ V.length > 0 && ee ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
1831
+ /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: V.length === 0, children: g.map((L) => /* @__PURE__ */ e(
1832
+ Mn,
1708
1833
  {
1709
- action: $,
1710
- labels: !f.bare.has($.id),
1711
- overflowed: y.has($.id),
1712
- pinned: X.has($.id),
1713
- tabbable: J === $.id,
1714
- tipOff: N === $.id,
1715
- onChoose: () => t($.id),
1834
+ action: L,
1835
+ labels: !h.bare.has(L.id),
1836
+ overflowed: w.has(L.id),
1837
+ pinned: H.has(L.id),
1838
+ tabbable: j === L.id,
1839
+ tipOff: N === L.id,
1840
+ onChoose: () => t(L.id),
1716
1841
  onFocus: () => {
1717
- v($.id), w(null);
1842
+ _(L.id), y(null);
1718
1843
  }
1719
1844
  },
1720
- $.id
1845
+ L.id
1721
1846
  )) })
1722
- ] }, L);
1847
+ ] }, D);
1723
1848
  }),
1724
- D.length > 0 ? /* @__PURE__ */ e(
1849
+ z.length > 0 ? /* @__PURE__ */ e(
1725
1850
  "button",
1726
1851
  {
1727
1852
  type: "button",
@@ -1731,96 +1856,96 @@ function cl({ label: n, actions: l, onAction: t, status: i, moreLabel: c, leadin
1731
1856
  title: c,
1732
1857
  "aria-haspopup": "menu",
1733
1858
  "aria-expanded": o !== null,
1734
- tabIndex: J === "more" ? 0 : -1,
1735
- onFocus: () => v("more"),
1859
+ tabIndex: j === "more" ? 0 : -1,
1860
+ onFocus: () => _("more"),
1736
1861
  onClick: (g) => {
1737
- const L = g.currentTarget.getBoundingClientRect();
1738
- h("first"), m(o === null ? { x: L.left, y: L.bottom } : null);
1862
+ const D = g.currentTarget.getBoundingClientRect();
1863
+ f("first"), u(o === null ? { x: D.left, y: D.bottom } : null);
1739
1864
  },
1740
1865
  onKeyDown: (g) => {
1741
1866
  if (g.key === "ArrowDown" || g.key === "ArrowUp") {
1742
1867
  g.preventDefault(), g.stopPropagation();
1743
- const L = g.currentTarget.getBoundingClientRect();
1744
- h(g.key === "ArrowUp" ? "last" : "first"), m({ x: L.left, y: L.bottom });
1868
+ const D = g.currentTarget.getBoundingClientRect();
1869
+ f(g.key === "ArrowUp" ? "last" : "first"), u({ x: D.left, y: D.bottom });
1745
1870
  }
1746
1871
  },
1747
- children: /* @__PURE__ */ e(T, { name: "more" })
1872
+ children: /* @__PURE__ */ e(A, { name: "more" })
1748
1873
  }
1749
1874
  ) : null,
1750
- i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: i, children: i }) : null,
1751
- /* @__PURE__ */ e(Re, { at: o, items: oe, onClose: () => m(null), label: c, focus: a }),
1752
- /* @__PURE__ */ u("div", { ref: r, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
1753
- s !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: s }) : null,
1875
+ d !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: d, children: d }) : null,
1876
+ /* @__PURE__ */ e(ve, { at: o, items: ue, onClose: () => u(null), label: c, focus: a }),
1877
+ /* @__PURE__ */ i("div", { ref: s, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
1878
+ r !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: r }) : null,
1754
1879
  /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
1755
- /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(T, { name: "more" }) }),
1756
- C.map((g) => /* @__PURE__ */ u("span", { children: [
1757
- /* @__PURE__ */ u("span", { "data-measure": "full", "data-measure-action": g.id, className: "cms-pane-toolbar__action", children: [
1758
- /* @__PURE__ */ e(_e, { name: g.icon }),
1880
+ /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(A, { name: "more" }) }),
1881
+ S.map((g) => /* @__PURE__ */ i("span", { children: [
1882
+ /* @__PURE__ */ i("span", { "data-measure": "full", "data-measure-action": g.id, className: "cms-pane-toolbar__action", children: [
1883
+ /* @__PURE__ */ e(be, { name: g.icon }),
1759
1884
  /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: g.label })
1760
1885
  ] }),
1761
- /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": g.id, className: A("cms-pane-toolbar__action", re(g.icon) !== null && "cms-pane-toolbar__action--bare"), children: re(g.icon) !== null ? /* @__PURE__ */ e(_e, { name: g.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: g.label }) })
1886
+ /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-action": g.id, className: T("cms-pane-toolbar__action", ce(g.icon) !== null && "cms-pane-toolbar__action--bare"), children: ce(g.icon) !== null ? /* @__PURE__ */ e(be, { name: g.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: g.label }) })
1762
1887
  ] }, g.id))
1763
1888
  ] })
1764
1889
  ]
1765
1890
  }
1766
1891
  );
1767
1892
  }
1768
- function xn({ action: n, labels: l, overflowed: t, pinned: i, tabbable: c, tipOff: s, onChoose: d, onFocus: r }) {
1769
- const [f, _] = E(!1);
1770
- Y(() => {
1893
+ function Mn({ action: n, labels: l, overflowed: t, pinned: d, tabbable: c, tipOff: r, onChoose: m, onFocus: s }) {
1894
+ const [h, b] = E(!1);
1895
+ q(() => {
1771
1896
  if (!n.busy) {
1772
- _(!1);
1897
+ b(!1);
1773
1898
  return;
1774
1899
  }
1775
- const w = setTimeout(() => _(!0), we);
1776
- return () => clearTimeout(w);
1900
+ const y = setTimeout(() => b(!0), ke);
1901
+ return () => clearTimeout(y);
1777
1902
  }, [n.busy]);
1778
- const o = re(n.icon) === null, m = l || o, a = n.disabled && n.reason ? n.reason : null, h = a ?? (m ? null : n.label), p = G(), [v, N] = E(!1);
1779
- return /* @__PURE__ */ u(
1903
+ const o = ce(n.icon) === null, u = l || o, a = n.disabled && n.reason ? n.reason : null, f = a ?? (u ? null : n.label), p = Y(), [_, N] = E(!1);
1904
+ return /* @__PURE__ */ i(
1780
1905
  "button",
1781
1906
  {
1782
1907
  type: "button",
1783
- className: A("cms-pane-toolbar__action", !m && "cms-pane-toolbar__action--bare", o && "cms-pane-toolbar__action--text", n.danger && "is-danger"),
1908
+ className: T("cms-pane-toolbar__action", !u && "cms-pane-toolbar__action--bare", o && "cms-pane-toolbar__action--text", n.danger && "is-danger"),
1784
1909
  "data-action": n.id,
1785
1910
  "data-stop": n.id,
1786
1911
  ...t ? { "data-overflowed": "" } : {},
1787
- ...i ? { "data-pinned": "" } : {},
1912
+ ...d ? { "data-pinned": "" } : {},
1788
1913
  hidden: t,
1789
1914
  "aria-label": n.label,
1790
1915
  "aria-disabled": n.disabled || void 0,
1791
1916
  "aria-busy": n.busy || void 0,
1792
1917
  ...a === null ? {} : { "aria-describedby": p },
1793
- ...v && a !== null ? { "data-reason-shown": "" } : {},
1918
+ ..._ && a !== null ? { "data-reason-shown": "" } : {},
1794
1919
  tabIndex: c ? 0 : -1,
1795
- onFocus: r,
1920
+ onFocus: s,
1796
1921
  onBlur: () => N(!1),
1797
- onKeyDown: (w) => {
1798
- w.key === "Escape" && N(!1);
1922
+ onKeyDown: (y) => {
1923
+ y.key === "Escape" && N(!1);
1799
1924
  },
1800
1925
  onClick: () => {
1801
- a !== null ? N(!0) : !n.disabled && !n.busy && d();
1926
+ a !== null ? N(!0) : !n.disabled && !n.busy && m();
1802
1927
  },
1803
1928
  children: [
1804
- f ? /* @__PURE__ */ e(z, { name: "spinner" }) : /* @__PURE__ */ e(_e, { name: n.icon }),
1805
- m ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
1806
- a !== null || h !== null && !s ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: h }) : null
1929
+ h ? /* @__PURE__ */ e(U, { name: "spinner" }) : /* @__PURE__ */ e(be, { name: n.icon }),
1930
+ u ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
1931
+ a !== null || f !== null && !r ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: p, children: f }) : null
1807
1932
  ]
1808
1933
  }
1809
1934
  );
1810
1935
  }
1811
- function _e({ name: n }) {
1812
- const l = re(n);
1813
- return l === null ? null : /* @__PURE__ */ e(T, { name: l, size: 18 });
1936
+ function be({ name: n }) {
1937
+ const l = ce(n);
1938
+ return l === null ? null : /* @__PURE__ */ e(A, { name: l, size: 18 });
1814
1939
  }
1815
- function il({ title: n, body: l = null, time: t = null, unread: i, unreadLabel: c, expandLabel: s, collapseLabel: d, action: r = null, onRead: f, leading: _ }) {
1816
- const [o, m] = E(!1), a = G(), h = () => {
1817
- i && f();
1818
- }, p = (r == null ? void 0 : r.presentation) === "row" && r.onAction !== void 0, v = (r == null ? void 0 : r.presentation) === "button" && r.onAction !== void 0 ? r : null, N = () => {
1819
- var w;
1820
- h(), p && ((w = r.onAction) == null || w.call(r));
1940
+ function dl({ title: n, body: l = null, time: t = null, unread: d, unreadLabel: c, expandLabel: r, collapseLabel: m, action: s = null, onRead: h, leading: b }) {
1941
+ const [o, u] = E(!1), a = Y(), f = () => {
1942
+ d && h();
1943
+ }, p = (s == null ? void 0 : s.presentation) === "row" && s.onAction !== void 0, _ = (s == null ? void 0 : s.presentation) === "button" && s.onAction !== void 0 ? s : null, N = () => {
1944
+ var y;
1945
+ f(), p && ((y = s.onAction) == null || y.call(s));
1821
1946
  };
1822
- return /* @__PURE__ */ u("article", { className: A("cms-notification", i && "is-unread", o && "is-expanded", p && "is-row-action"), "data-state": i ? "unread" : "read", children: [
1823
- /* @__PURE__ */ u(
1947
+ return /* @__PURE__ */ i("article", { className: T("cms-notification", d && "is-unread", o && "is-expanded", p && "is-row-action"), "data-state": d ? "unread" : "read", children: [
1948
+ /* @__PURE__ */ i(
1824
1949
  "div",
1825
1950
  {
1826
1951
  className: "cms-notification__row",
@@ -1828,15 +1953,15 @@ function il({ title: n, body: l = null, time: t = null, unread: i, unreadLabel:
1828
1953
  tabIndex: 0,
1829
1954
  "aria-describedby": l === null ? void 0 : a,
1830
1955
  onClick: N,
1831
- onKeyDown: (w) => {
1832
- w.target !== w.currentTarget || w.key !== "Enter" && w.key !== " " || (w.preventDefault(), N());
1956
+ onKeyDown: (y) => {
1957
+ y.target !== y.currentTarget || y.key !== "Enter" && y.key !== " " || (y.preventDefault(), N());
1833
1958
  },
1834
1959
  children: [
1835
- _ != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: _ }) : null,
1836
- /* @__PURE__ */ u("span", { className: "cms-notification__text", children: [
1837
- /* @__PURE__ */ u("span", { className: "cms-notification__head", children: [
1838
- /* @__PURE__ */ u("span", { className: "cms-notification__title", children: [
1839
- i ? /* @__PURE__ */ u("span", { className: "cms-visually-hidden", children: [
1960
+ b != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: b }) : null,
1961
+ /* @__PURE__ */ i("span", { className: "cms-notification__text", children: [
1962
+ /* @__PURE__ */ i("span", { className: "cms-notification__head", children: [
1963
+ /* @__PURE__ */ i("span", { className: "cms-notification__title", children: [
1964
+ d ? /* @__PURE__ */ i("span", { className: "cms-visually-hidden", children: [
1840
1965
  c,
1841
1966
  " "
1842
1967
  ] }) : null,
@@ -1846,7 +1971,7 @@ function il({ title: n, body: l = null, time: t = null, unread: i, unreadLabel:
1846
1971
  ] }),
1847
1972
  l !== null && l !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: a, children: l }) : null
1848
1973
  ] }),
1849
- i ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
1974
+ d ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
1850
1975
  ]
1851
1976
  }
1852
1977
  ),
@@ -1857,33 +1982,33 @@ function il({ title: n, body: l = null, time: t = null, unread: i, unreadLabel:
1857
1982
  className: "cms-notification__chevron",
1858
1983
  "aria-expanded": o,
1859
1984
  "aria-controls": a,
1860
- "aria-label": o ? d : s,
1861
- title: o ? d : s,
1985
+ "aria-label": o ? m : r,
1986
+ title: o ? m : r,
1862
1987
  onClick: () => {
1863
- o || h(), m((w) => !w);
1988
+ o || f(), u((y) => !y);
1864
1989
  },
1865
- children: /* @__PURE__ */ e(T, { name: "chevron-down", size: 18 })
1990
+ children: /* @__PURE__ */ e(A, { name: "chevron-down", size: 18 })
1866
1991
  }
1867
1992
  ) : null,
1868
- v !== null ? /* @__PURE__ */ e(
1993
+ _ !== null ? /* @__PURE__ */ e(
1869
1994
  "button",
1870
1995
  {
1871
1996
  type: "button",
1872
1997
  className: "cms-button cms-notification__action",
1873
1998
  onClick: () => {
1874
- var w;
1875
- h(), (w = v.onAction) == null || w.call(v);
1999
+ var y;
2000
+ f(), (y = _.onAction) == null || y.call(_);
1876
2001
  },
1877
- children: v.label
2002
+ children: _.label
1878
2003
  }
1879
2004
  ) : null
1880
2005
  ] });
1881
2006
  }
1882
- function Mn(n) {
2007
+ function Cn(n) {
1883
2008
  return n === "allowed" || n === "elevate" || n === "denied";
1884
2009
  }
1885
- function ol(n, l) {
1886
- if (!Mn(n))
2010
+ function ul(n, l) {
2011
+ if (!Cn(n))
1887
2012
  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 };
1888
2013
  switch (n) {
1889
2014
  case "allowed":
@@ -1894,217 +2019,219 @@ function ol(n, l) {
1894
2019
  return l.showRefused ? { offered: !0, locked: !1, refusal: l.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
1895
2020
  }
1896
2021
  }
1897
- function Cn(n, l) {
2022
+ function Sn(n, l) {
1898
2023
  if (!n) return;
1899
2024
  if (typeof n.get == "function") return n.get(l) ?? void 0;
1900
- const t = n, i = Object.keys(t).find((c) => c.toLowerCase() === l.toLowerCase());
1901
- return i === void 0 ? void 0 : t[i];
2025
+ const t = n, d = Object.keys(t).find((c) => c.toLowerCase() === l.toLowerCase());
2026
+ return d === void 0 ? void 0 : t[d];
1902
2027
  }
1903
- function Sn(n) {
2028
+ function En(n) {
1904
2029
  if (n && typeof n == "object") {
1905
2030
  const l = n;
1906
2031
  if (typeof l.detail == "string" && l.detail !== "") return l.detail;
1907
2032
  if (typeof l.title == "string" && l.title !== "") return l.title;
1908
2033
  }
1909
2034
  }
1910
- function dl(n, l, t, i) {
2035
+ function ml(n, l, t, d) {
1911
2036
  if (n !== 403) return { kind: "none" };
1912
- const c = Sn(t);
1913
- return Cn(l, "X-Elevation-Required") !== void 0 ? i.elevates ? { kind: "elevation-required", message: c ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: c ?? "The server refused this." };
1914
- }
1915
- const xe = "coolms-kit:reread";
1916
- function ul() {
1917
- window.dispatchEvent(new Event(xe));
1918
- }
1919
- function ml(n) {
1920
- const [l, t] = E(void 0), [i, c] = E(void 0), [s, d] = E(!0), r = F(n);
1921
- r.current = n;
1922
- const f = F(0), _ = be(() => {
1923
- const o = ++f.current;
1924
- d(!0), r.current().then(
1925
- (m) => {
1926
- o === f.current && (t(m), c(void 0), d(!1));
2037
+ const c = En(t);
2038
+ return Sn(l, "X-Elevation-Required") !== void 0 ? d.elevates ? { kind: "elevation-required", message: c ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: c ?? "The server refused this." };
2039
+ }
2040
+ const Me = "coolms-kit:reread";
2041
+ function hl() {
2042
+ window.dispatchEvent(new Event(Me));
2043
+ }
2044
+ function fl(n) {
2045
+ const [l, t] = E(void 0), [d, c] = E(void 0), [r, m] = E(!0), s = I(n);
2046
+ s.current = n;
2047
+ const h = I(0), b = _e(() => {
2048
+ const o = ++h.current;
2049
+ m(!0), s.current().then(
2050
+ (u) => {
2051
+ o === h.current && (t(u), c(void 0), m(!1));
1927
2052
  },
1928
- (m) => {
1929
- o === f.current && (c(m), d(!1));
2053
+ (u) => {
2054
+ o === h.current && (c(u), m(!1));
1930
2055
  }
1931
2056
  );
1932
2057
  }, []);
1933
- return Y(() => {
1934
- _();
1935
- const o = () => _();
1936
- return window.addEventListener("focus", o), window.addEventListener(xe, o), () => {
1937
- window.removeEventListener("focus", o), window.removeEventListener(xe, o);
2058
+ return q(() => {
2059
+ b();
2060
+ const o = () => b();
2061
+ return window.addEventListener("focus", o), window.addEventListener(Me, o), () => {
2062
+ window.removeEventListener("focus", o), window.removeEventListener(Me, o);
1938
2063
  };
1939
- }, [_]), { value: l, error: i, loading: s, reread: _ };
2064
+ }, [b]), { value: l, error: d, loading: r, reread: b };
1940
2065
  }
1941
- function hl(n) {
2066
+ function pl(n) {
1942
2067
  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 };
1943
2068
  }
1944
- const En = "/errors/client-update-required";
1945
- function An(n, l) {
1946
- const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), i = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
1947
- for (let c = 0; c < Math.max(t.length, i.length); c++) {
1948
- const s = t[c] ?? 0, d = i[c] ?? 0;
1949
- if (s !== d) return s < d;
2069
+ const An = "/errors/client-update-required";
2070
+ function Tn(n, l) {
2071
+ const t = n.split(".").map((c) => Number.parseInt(c, 10) || 0), d = l.split(".").map((c) => Number.parseInt(c, 10) || 0);
2072
+ for (let c = 0; c < Math.max(t.length, d.length); c++) {
2073
+ const r = t[c] ?? 0, m = d[c] ?? 0;
2074
+ if (r !== m) return r < m;
1950
2075
  }
1951
2076
  return !1;
1952
2077
  }
1953
- function fl(n) {
1954
- return n.problemType !== void 0 && n.problemType.endsWith(En) ? !0 : n.minimumVersion !== void 0 && An(n.version, n.minimumVersion);
2078
+ function bl(n) {
2079
+ return n.problemType !== void 0 && n.problemType.endsWith(An) ? !0 : n.minimumVersion !== void 0 && Tn(n.version, n.minimumVersion);
1955
2080
  }
1956
- const Ie = 4, Ln = 48, Tn = 800, Dn = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
1957
- function $n(n, l) {
1958
- const [t, i] = E(!1);
1959
- return Y(() => {
2081
+ const Ie = 4, Ln = 48, Dn = 800, $n = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2082
+ function Pn(n, l) {
2083
+ const [t, d] = E(!1);
2084
+ return q(() => {
1960
2085
  const c = n.current;
1961
2086
  if (c === null || !l) {
1962
- i(!1);
2087
+ d(!1);
1963
2088
  return;
1964
2089
  }
1965
- const s = /* @__PURE__ */ new WeakMap();
1966
- let d = Number.NEGATIVE_INFINITY, r = null;
1967
- const f = (a) => {
1968
- d = performance.now(), r = a.target;
1969
- }, _ = (a) => {
1970
- const h = a.target;
1971
- !(h instanceof HTMLElement && (h.isContentEditable || h.closest("input, textarea, select") !== null)) && Dn.has(a.key) && f(a);
2090
+ const r = /* @__PURE__ */ new WeakMap();
2091
+ let m = Number.NEGATIVE_INFINITY, s = null;
2092
+ const h = (a) => {
2093
+ m = performance.now(), s = a.target;
2094
+ }, b = (a) => {
2095
+ const f = a.target;
2096
+ !(f instanceof HTMLElement && (f.isContentEditable || f.closest("input, textarea, select") !== null)) && $n.has(a.key) && h(a);
1972
2097
  }, o = (a) => {
1973
- const h = a.target;
1974
- if (!(h instanceof HTMLElement)) return;
1975
- const p = h.scrollTop, v = s.get(h) ?? 0;
1976
- if (s.set(h, p), p <= 0) {
1977
- i(!1);
2098
+ const f = a.target;
2099
+ if (!(f instanceof HTMLElement)) return;
2100
+ const p = f.scrollTop, _ = r.get(f) ?? 0;
2101
+ if (r.set(f, p), p <= 0) {
2102
+ d(!1);
1978
2103
  return;
1979
2104
  }
1980
- performance.now() - d > Tn || !(r === c || r === document.body || r instanceof Node && h.contains(r)) || (p < v - Ie ? i(!1) : p > v + Ie && p > Ln && i(!0));
1981
- }, m = [["wheel", f], ["touchmove", f], ["pointerdown", f], ["keydown", _]];
1982
- for (const [a, h] of m) c.addEventListener(a, h, { capture: !0, passive: !0 });
2105
+ performance.now() - m > Dn || !(s === c || s === document.body || s instanceof Node && f.contains(s)) || (p < _ - Ie ? d(!1) : p > _ + Ie && p > Ln && d(!0));
2106
+ }, u = [["wheel", h], ["touchmove", h], ["pointerdown", h], ["keydown", b]];
2107
+ for (const [a, f] of u) c.addEventListener(a, f, { capture: !0, passive: !0 });
1983
2108
  return c.addEventListener("scroll", o, { capture: !0, passive: !0 }), () => {
1984
- for (const [a, h] of m) c.removeEventListener(a, h, { capture: !0 });
2109
+ for (const [a, f] of u) c.removeEventListener(a, f, { capture: !0 });
1985
2110
  c.removeEventListener("scroll", o, { capture: !0 });
1986
2111
  };
1987
- }, [n, l]), [t, i];
2112
+ }, [n, l]), [t, d];
1988
2113
  }
1989
- function pl({ title: n, back: l, navigation: t, search: i, searching: c, globals: s, filters: d, primary: r, onRefresh: f, pullText: _, barHidden: o, children: m }) {
1990
- const a = F(null), h = F(null), [p, v] = E(!1), [N, w] = E(null), S = Nn(h, f === void 0 ? null : () => {
1991
- p || (v(!0), f().finally(() => v(!1)));
1992
- }), C = f === void 0 ? null : { distance: S, refreshing: p, text: _ ?? null }, R = c !== void 0 || S > 0 || p, [H, ee] = $n(a, o === void 0 && !R), j = !R && (o ?? H);
1993
- return /* @__PURE__ */ u(
2114
+ function _l({ title: n, back: l, navigation: t, search: d, searching: c, globals: r, filters: m, primary: s, onRefresh: h, pullText: b, barHidden: o, children: u }) {
2115
+ const a = I(null), f = I(null), [p, _] = E(!1), [N, y] = E(null), C = hn(f, h === void 0 ? null : () => {
2116
+ p || (_(!0), h().finally(() => _(!1)));
2117
+ }), S = h === void 0 ? null : { distance: C, refreshing: p, text: b ?? null }, F = c !== void 0 || C > 0 || p, [R, Q] = Pn(a, o === void 0 && !F), G = !F && (o ?? R);
2118
+ return /* @__PURE__ */ i(
1994
2119
  "div",
1995
2120
  {
1996
2121
  ref: a,
1997
- className: A("cms-screen", r !== void 0 && "cms-screen--with-primary"),
1998
- "data-bar-hidden": j ? "" : void 0,
1999
- onFocus: (y) => {
2000
- j && y.target instanceof Element && y.target.closest(".cms-screen__bar, .cms-screen__filters") !== null && ee(!1);
2122
+ className: T("cms-screen", s !== void 0 && "cms-screen--with-primary"),
2123
+ "data-bar-hidden": G ? "" : void 0,
2124
+ onFocus: (w) => {
2125
+ G && w.target instanceof Element && w.target.closest(".cms-screen__bar, .cms-screen__filters") !== null && Q(!1);
2001
2126
  },
2002
2127
  children: [
2003
- c !== void 0 ? /* @__PURE__ */ u("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2004
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": c.closeLabel, title: c.closeLabel, onClick: c.onClose, children: /* @__PURE__ */ e(T, { name: "chevron-left" }) }),
2128
+ c !== void 0 ? /* @__PURE__ */ i("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2129
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": c.closeLabel, title: c.closeLabel, onClick: c.onClose, children: /* @__PURE__ */ e(A, { name: "chevron-left" }) }),
2005
2130
  /* @__PURE__ */ e("div", { className: "cms-screen__search", children: c.field })
2006
- ] }) : /* @__PURE__ */ u("header", { className: "cms-screen__bar", children: [
2007
- /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: l !== void 0 ? l.href !== void 0 ? /* @__PURE__ */ u("a", { className: "cms-screen__back", href: l.href, onClick: l.onBack, children: [
2008
- /* @__PURE__ */ e(T, { name: "chevron-left" }),
2131
+ ] }) : /* @__PURE__ */ i("header", { className: "cms-screen__bar", children: [
2132
+ /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: l !== void 0 ? l.href !== void 0 ? /* @__PURE__ */ i("a", { className: "cms-screen__back", href: l.href, onClick: l.onBack, children: [
2133
+ /* @__PURE__ */ e(A, { name: "chevron-left" }),
2009
2134
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
2010
- ] }) : /* @__PURE__ */ u("button", { type: "button", className: "cms-screen__back", onClick: l.onBack, children: [
2011
- /* @__PURE__ */ e(T, { name: "chevron-left" }),
2135
+ ] }) : /* @__PURE__ */ i("button", { type: "button", className: "cms-screen__back", onClick: l.onBack, children: [
2136
+ /* @__PURE__ */ e(A, { name: "chevron-left" }),
2012
2137
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: l.label })
2013
2138
  ] }) : t }),
2014
2139
  /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }),
2015
- /* @__PURE__ */ u("div", { className: "cms-screen__trailing", children: [
2016
- i !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": i.label, title: i.label, onClick: i.onOpen, children: /* @__PURE__ */ e(T, { name: "search" }) }) : null,
2017
- s
2140
+ /* @__PURE__ */ i("div", { className: "cms-screen__trailing", children: [
2141
+ d !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": d.label, title: d.label, onClick: d.onOpen, children: /* @__PURE__ */ e(A, { name: "search" }) }) : null,
2142
+ r
2018
2143
  ] })
2019
2144
  ] }),
2020
- d !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(fn, { label: d.label, options: d.options, value: d.selected, onChange: d.onSelect }) }) : null,
2021
- /* @__PURE__ */ e("div", { ref: h, className: "cms-screen__content", "data-pulling": S > 0 ? "" : void 0, "data-refreshing": p ? "" : void 0, children: /* @__PURE__ */ e(Fe.Provider, { value: C, children: m }) }),
2022
- r !== void 0 ? /* @__PURE__ */ e(
2145
+ m !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-screen__filters", children: /* @__PURE__ */ e(vn, { label: m.label, options: m.options, value: m.selected, onChange: m.onSelect }) }) : null,
2146
+ /* @__PURE__ */ e("div", { ref: f, className: "cms-screen__content", "data-pulling": C > 0 ? "" : void 0, "data-refreshing": p ? "" : void 0, children: /* @__PURE__ */ e(Re.Provider, { value: S, children: u }) }),
2147
+ s !== void 0 ? /* @__PURE__ */ e(
2023
2148
  "button",
2024
2149
  {
2025
2150
  type: "button",
2026
2151
  className: "cms-button cms-button--primary cms-screen__primary",
2027
- "aria-label": r.label,
2028
- title: r.label,
2029
- ..."menu" in r ? { "aria-haspopup": "menu", "aria-expanded": N !== null } : {},
2030
- onClick: (y) => {
2031
- if ("menu" in r) {
2032
- const P = y.currentTarget.getBoundingClientRect();
2033
- w(N === null ? { x: P.left, y: P.top } : null);
2152
+ "aria-label": s.label,
2153
+ title: s.label,
2154
+ ..."menu" in s ? { "aria-haspopup": "menu", "aria-expanded": N !== null } : {},
2155
+ onClick: (w) => {
2156
+ if ("menu" in s) {
2157
+ const B = w.currentTarget.getBoundingClientRect();
2158
+ y(N === null ? { x: B.left, y: B.top } : null);
2034
2159
  } else
2035
- r.onPress();
2160
+ s.onPress();
2036
2161
  },
2037
- children: /* @__PURE__ */ e(T, { name: r.icon, size: 24 })
2162
+ children: /* @__PURE__ */ e(A, { name: s.icon, size: 24 })
2038
2163
  }
2039
2164
  ) : null,
2040
- r !== void 0 && "menu" in r ? /* @__PURE__ */ e(Re, { at: N, items: r.menu, onClose: () => w(null), label: r.label }) : null
2165
+ s !== void 0 && "menu" in s ? /* @__PURE__ */ e(ve, { at: N, items: s.menu, onClose: () => y(null), label: s.label }) : null
2041
2166
  ]
2042
2167
  }
2043
2168
  );
2044
2169
  }
2045
2170
  export {
2046
- Yn as AppShell,
2047
- ve as Avatar,
2048
- Ae as BOOTSTRAP_ICONS,
2049
- hn as Badge,
2050
- le as Button,
2051
- Ee as CALL_LABELS,
2052
- En as CLIENT_UPDATE_REQUIRED,
2053
- tl as CallBar,
2054
- ll as CallPanel,
2055
- Qn as ChatBubble,
2056
- el as Composer,
2057
- Kn as ConfirmDialog,
2058
- Re as ContextMenu,
2171
+ Jn as AppShell,
2172
+ ge as Avatar,
2173
+ Te as BOOTSTRAP_ICONS,
2174
+ _n as Badge,
2175
+ te as Button,
2176
+ Ae as CALL_LABELS,
2177
+ An as CLIENT_UPDATE_REQUIRED,
2178
+ rl as CallBar,
2179
+ sl as CallPanel,
2180
+ ll as ChatBubble,
2181
+ tl as Composer,
2182
+ Un as ConfirmDialog,
2183
+ ve as ContextMenu,
2059
2184
  Ye as EmptyState,
2060
2185
  Ge as ErrorBanner,
2061
- Wn as FilePicker,
2186
+ jn as FilePicker,
2062
2187
  cn as FilePickerDenied,
2063
- Zn as FileViewer,
2064
- fn as FilterChips,
2065
- Vn as ICON_NAMES,
2066
- T as Icon,
2067
- nl as IncomingCall,
2068
- rl as List,
2188
+ on as FilePickerRestart,
2189
+ Wn as FileViewer,
2190
+ vn as FilterChips,
2191
+ Zn as ICON_NAMES,
2192
+ A as Icon,
2193
+ al as IncomingCall,
2194
+ qn as List,
2069
2195
  qe as Loading,
2070
- bn as MAIL_ROW_LABELS,
2196
+ yn as MAIL_ROW_LABELS,
2071
2197
  je as MODAL_CLOSE_MS,
2072
- Jn as MailRow,
2073
- Pe as Modal,
2198
+ nl as MailRow,
2199
+ Be as Modal,
2074
2200
  Je as NamedIcon,
2075
- il as Notification,
2076
- ke as PULL_AT,
2077
- jn as PageHeader,
2078
- cl as PaneToolbar,
2079
- vn as SIGN_IN_LABELS,
2080
- we as STATE_DELAY_MS,
2081
- pl as ScreenShell,
2082
- Gn as SearchField,
2083
- Hn as Select,
2084
- sl as SignInForm,
2085
- al as SignInLayout,
2086
- Xn as SplitPanes,
2087
- ne as State,
2088
- qn as TabStrip,
2089
- Rn as TextArea,
2090
- Fn as TextField,
2091
- Un as Toast,
2092
- zn as ToastRegion,
2201
+ dl as Notification,
2202
+ xe as PULL_AT,
2203
+ Gn as PageHeader,
2204
+ ol as PaneToolbar,
2205
+ wn as SIGN_IN_LABELS,
2206
+ ke as STATE_DELAY_MS,
2207
+ _l as ScreenShell,
2208
+ Qn as SearchField,
2209
+ Yn as SectionHeader,
2210
+ Kn as Select,
2211
+ il as SignInForm,
2212
+ cl as SignInLayout,
2213
+ el as SplitPanes,
2214
+ le as State,
2215
+ Xn as TabStrip,
2216
+ Hn as TextArea,
2217
+ Rn as TextField,
2218
+ zn as Toast,
2219
+ Vn as ToastRegion,
2093
2220
  On as Toggle,
2094
- pn as fitPanes,
2095
- re as iconForName,
2096
- un as initialsOf,
2097
- Mn as isCapability,
2098
- fl as needsClientUpdate,
2099
- ol as offerFor,
2100
- hl as readConflict,
2101
- dl as readRefusal,
2102
- Sn as refusalText,
2103
- ul as rereadAll,
2104
- mn as tintOf,
2105
- Nn as usePull,
2106
- yn as usePullState,
2107
- ml as useReread,
2108
- An as versionBelow,
2221
+ gn as fitPanes,
2222
+ ce as iconForName,
2223
+ pn as initialsOf,
2224
+ Cn as isCapability,
2225
+ bl as needsClientUpdate,
2226
+ ul as offerFor,
2227
+ pl as readConflict,
2228
+ ml as readRefusal,
2229
+ En as refusalText,
2230
+ hl as rereadAll,
2231
+ bn as tintOf,
2232
+ hn as usePull,
2233
+ fn as usePullState,
2234
+ fl as useReread,
2235
+ Tn as versionBelow,
2109
2236
  Ze as writtenOut
2110
2237
  };