@coolms/ui-react 0.1.0-alpha.40 → 0.1.0-alpha.42

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 c, Fragment as $ } from "react/jsx-runtime";
2
- import { useId as fe, useState as D, useRef as P, useEffect as ee, useCallback as Ie, useMemo as Ln, useContext as Dn, createContext as In, useLayoutEffect as $e, Fragment as $n } from "react";
1
+ import { jsx as e, jsxs as o, Fragment as $ } from "react/jsx-runtime";
2
+ import { useId as fe, useState as D, useRef as P, useEffect as ee, useCallback as Ie, useMemo as Dn, useContext as In, createContext as $n, useLayoutEffect as $e, Fragment as Bn } from "react";
3
3
  import { createPortal as ln } from "react-dom";
4
4
  function qe(n, t) {
5
5
  const l = { ...n };
6
- for (const r of Object.keys(t ?? {})) {
7
- const s = t == null ? void 0 : t[r];
8
- s !== void 0 && (l[r] = s);
6
+ for (const s of Object.keys(t ?? {})) {
7
+ const a = t == null ? void 0 : t[s];
8
+ a !== void 0 && (l[s] = a);
9
9
  }
10
10
  return l;
11
11
  }
12
12
  function H(...n) {
13
13
  return n.filter(Boolean).join(" ");
14
14
  }
15
- function re({ name: n }) {
15
+ function ae({ name: n }) {
16
16
  const t = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
17
17
  switch (n) {
18
18
  case "lock":
@@ -35,170 +35,170 @@ function De({
35
35
  variant: n = "secondary",
36
36
  busy: t = !1,
37
37
  busyLabel: l,
38
- locked: r = !1,
39
- lockedReason: s,
40
- icon: a,
41
- disabled: h,
42
- className: d,
38
+ locked: s = !1,
39
+ lockedReason: a,
40
+ icon: c,
41
+ disabled: f,
42
+ className: u,
43
43
  children: m,
44
- type: b = "button",
44
+ type: _ = "button",
45
45
  title: i,
46
- ...g
46
+ ...v
47
47
  }) {
48
- const f = !!h || t;
49
- return /* @__PURE__ */ c(
48
+ const h = !!f || t;
49
+ return /* @__PURE__ */ o(
50
50
  "button",
51
51
  {
52
- ...g,
53
- type: b,
54
- className: H("cms-button", `cms-button--${n}`, t && "is-busy", r && "is-locked", d),
55
- disabled: f,
52
+ ...v,
53
+ type: _,
54
+ className: H("cms-button", `cms-button--${n}`, t && "is-busy", s && "is-locked", u),
55
+ disabled: h,
56
56
  "aria-busy": t || void 0,
57
- title: r ? s ?? i : i,
57
+ title: s ? a ?? i : i,
58
58
  children: [
59
- t ? /* @__PURE__ */ e(re, { name: "spinner" }) : r ? /* @__PURE__ */ e(re, { name: "lock" }) : a,
59
+ t ? /* @__PURE__ */ e(ae, { name: "spinner" }) : s ? /* @__PURE__ */ e(ae, { name: "lock" }) : c,
60
60
  /* @__PURE__ */ e("span", { className: "cms-button__label", children: t && l !== void 0 ? l : m }),
61
- r && s ? /* @__PURE__ */ c("span", { className: "cms-visually-hidden", children: [
61
+ s && a ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
62
62
  ", ",
63
- s
63
+ a
64
64
  ] }) : null
65
65
  ]
66
66
  }
67
67
  );
68
68
  }
69
69
  const kn = {
70
- mail: /* @__PURE__ */ c($, { children: [
70
+ mail: /* @__PURE__ */ o($, { children: [
71
71
  /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
72
72
  /* @__PURE__ */ e("path", { d: "m3 7 9 6 9-6" })
73
73
  ] }),
74
74
  // A gear: a ring with eight short teeth, the hole in its middle.
75
- settings: /* @__PURE__ */ c($, { children: [
75
+ settings: /* @__PURE__ */ o($, { children: [
76
76
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
77
77
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "7" }),
78
78
  /* @__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" })
79
79
  ] }),
80
80
  // The envelope with its flap open above it: a message read, or the message itself again.
81
- "mail-open": /* @__PURE__ */ c($, { children: [
81
+ "mail-open": /* @__PURE__ */ o($, { children: [
82
82
  /* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
83
83
  /* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
84
84
  /* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
85
85
  ] }),
86
86
  // A clipboard: copy what is shown.
87
- copy: /* @__PURE__ */ c($, { children: [
87
+ copy: /* @__PURE__ */ o($, { children: [
88
88
  /* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
89
89
  /* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
90
90
  /* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
91
91
  ] }),
92
92
  chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
93
93
  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" }),
94
- calendar: /* @__PURE__ */ c($, { children: [
94
+ calendar: /* @__PURE__ */ o($, { children: [
95
95
  /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
96
96
  /* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
97
97
  ] }),
98
- file: /* @__PURE__ */ c($, { children: [
98
+ file: /* @__PURE__ */ o($, { children: [
99
99
  /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
100
100
  /* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
101
101
  ] }),
102
102
  // The file, with code's angle brackets in place of its lines: a message's source.
103
- "file-code": /* @__PURE__ */ c($, { children: [
103
+ "file-code": /* @__PURE__ */ o($, { children: [
104
104
  /* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
105
105
  /* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
106
106
  /* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
107
107
  ] }),
108
- image: /* @__PURE__ */ c($, { children: [
108
+ image: /* @__PURE__ */ o($, { children: [
109
109
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
110
110
  /* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
111
111
  /* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
112
112
  ] }),
113
- search: /* @__PURE__ */ c($, { children: [
113
+ search: /* @__PURE__ */ o($, { children: [
114
114
  /* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
115
115
  /* @__PURE__ */ e("path", { d: "m20 20-4-4" })
116
116
  ] }),
117
- bell: /* @__PURE__ */ c($, { children: [
117
+ bell: /* @__PURE__ */ o($, { children: [
118
118
  /* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
119
119
  /* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
120
120
  ] }),
121
- pencil: /* @__PURE__ */ c($, { children: [
121
+ pencil: /* @__PURE__ */ o($, { children: [
122
122
  /* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
123
123
  /* @__PURE__ */ e("path", { d: "m13 7 4 4" })
124
124
  ] }),
125
- download: /* @__PURE__ */ c($, { children: [
125
+ download: /* @__PURE__ */ o($, { children: [
126
126
  /* @__PURE__ */ e("path", { d: "M12 4v11" }),
127
127
  /* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
128
128
  /* @__PURE__ */ e("path", { d: "M4 20h16" })
129
129
  ] }),
130
130
  // Download's arrow turned up, from the line: a file sent up.
131
- upload: /* @__PURE__ */ c($, { children: [
131
+ upload: /* @__PURE__ */ o($, { children: [
132
132
  /* @__PURE__ */ e("path", { d: "M12 20V9" }),
133
133
  /* @__PURE__ */ e("path", { d: "m7 13 5-5 5 5" }),
134
134
  /* @__PURE__ */ e("path", { d: "M4 4h16" })
135
135
  ] }),
136
- print: /* @__PURE__ */ c($, { children: [
136
+ print: /* @__PURE__ */ o($, { children: [
137
137
  /* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
138
138
  /* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
139
139
  /* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
140
140
  ] }),
141
- "open-separately": /* @__PURE__ */ c($, { children: [
141
+ "open-separately": /* @__PURE__ */ o($, { children: [
142
142
  /* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
143
143
  /* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
144
144
  /* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
145
145
  ] }),
146
146
  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" }),
147
- send: /* @__PURE__ */ c($, { children: [
147
+ send: /* @__PURE__ */ o($, { children: [
148
148
  /* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
149
149
  /* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
150
150
  ] }),
151
- inbox: /* @__PURE__ */ c($, { children: [
151
+ inbox: /* @__PURE__ */ o($, { children: [
152
152
  /* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
153
153
  /* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
154
154
  ] }),
155
- archive: /* @__PURE__ */ c($, { children: [
155
+ archive: /* @__PURE__ */ o($, { children: [
156
156
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
157
157
  /* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
158
158
  ] }),
159
- trash: /* @__PURE__ */ c($, { children: [
159
+ trash: /* @__PURE__ */ o($, { children: [
160
160
  /* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
161
161
  /* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
162
162
  ] }),
163
163
  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" }),
164
- mic: /* @__PURE__ */ c($, { children: [
164
+ mic: /* @__PURE__ */ o($, { children: [
165
165
  /* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
166
166
  /* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
167
167
  ] }),
168
- speaker: /* @__PURE__ */ c($, { children: [
168
+ speaker: /* @__PURE__ */ o($, { children: [
169
169
  /* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
170
170
  /* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
171
171
  ] }),
172
- "user-plus": /* @__PURE__ */ c($, { children: [
172
+ "user-plus": /* @__PURE__ */ o($, { children: [
173
173
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
174
174
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
175
175
  ] }),
176
176
  // A person, nothing more: one whose account is gone.
177
- user: /* @__PURE__ */ c($, { children: [
177
+ user: /* @__PURE__ */ o($, { children: [
178
178
  /* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4" }),
179
179
  /* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0" })
180
180
  ] }),
181
181
  // A person with a tick: someone allowed.
182
- "user-check": /* @__PURE__ */ c($, { children: [
182
+ "user-check": /* @__PURE__ */ o($, { children: [
183
183
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
184
184
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" })
185
185
  ] }),
186
186
  // A person with a cross: someone no longer allowed.
187
- "user-x": /* @__PURE__ */ c($, { children: [
187
+ "user-x": /* @__PURE__ */ o($, { children: [
188
188
  /* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
189
189
  /* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" })
190
190
  ] }),
191
191
  // Two people: the members of a group.
192
- users: /* @__PURE__ */ c($, { children: [
192
+ users: /* @__PURE__ */ o($, { children: [
193
193
  /* @__PURE__ */ e("circle", { cx: "9", cy: "8", r: "3.5" }),
194
194
  /* @__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" })
195
195
  ] }),
196
196
  "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" }),
197
- video: /* @__PURE__ */ c($, { children: [
197
+ video: /* @__PURE__ */ o($, { children: [
198
198
  /* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
199
199
  /* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
200
200
  ] }),
201
- info: /* @__PURE__ */ c($, { children: [
201
+ info: /* @__PURE__ */ o($, { children: [
202
202
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
203
203
  /* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
204
204
  ] }),
@@ -207,17 +207,17 @@ const kn = {
207
207
  plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
208
208
  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" }),
209
209
  // The folder with a plus inside: a new folder.
210
- "folder-plus": /* @__PURE__ */ c($, { children: [
210
+ "folder-plus": /* @__PURE__ */ o($, { children: [
211
211
  /* @__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" }),
212
212
  /* @__PURE__ */ e("path", { d: "M12 10.5v6M9 13.5h6" })
213
213
  ] }),
214
214
  // The folder with a cross inside: a folder removed.
215
- "folder-x": /* @__PURE__ */ c($, { children: [
215
+ "folder-x": /* @__PURE__ */ o($, { children: [
216
216
  /* @__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" }),
217
217
  /* @__PURE__ */ e("path", { d: "m9.5 11 5 5M14.5 11l-5 5" })
218
218
  ] }),
219
219
  check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
220
- server: /* @__PURE__ */ c($, { children: [
220
+ server: /* @__PURE__ */ o($, { children: [
221
221
  /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
222
222
  /* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
223
223
  /* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
@@ -232,11 +232,11 @@ const kn = {
232
232
  // A funnel: a list's filter.
233
233
  funnel: /* @__PURE__ */ e("path", { d: "M4 5h16l-6 8v6l-4-2v-4Z" }),
234
234
  // An eye: what is hidden is shown. Struck through: it is hidden again.
235
- eye: /* @__PURE__ */ c($, { children: [
235
+ eye: /* @__PURE__ */ o($, { children: [
236
236
  /* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
237
237
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
238
238
  ] }),
239
- "eye-off": /* @__PURE__ */ c($, { children: [
239
+ "eye-off": /* @__PURE__ */ o($, { children: [
240
240
  /* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
241
241
  /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
242
242
  /* @__PURE__ */ e("path", { d: "m4 4 16 16" })
@@ -307,61 +307,61 @@ const zt = Object.keys(kn), pn = {
307
307
  eye: "eye",
308
308
  "eye-slash": "eye-off"
309
309
  };
310
- function Ue(n) {
310
+ function Be(n) {
311
311
  return Object.prototype.hasOwnProperty.call(pn, n) ? pn[n] : null;
312
312
  }
313
- function Bn() {
313
+ function Fn() {
314
314
  try {
315
315
  return process.env.NODE_ENV !== "production";
316
316
  } catch {
317
317
  return !1;
318
318
  }
319
319
  }
320
- const bn = /* @__PURE__ */ new Set();
321
- function Fn({ name: n, size: t = 18 }) {
320
+ const _n = /* @__PURE__ */ new Set();
321
+ function xn({ name: n, size: t = 18 }) {
322
322
  if (n === "") return null;
323
- const l = Ue(n);
324
- return l !== null ? /* @__PURE__ */ e(B, { name: l, size: t }) : (!bn.has(n) && Bn() && (bn.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: t, height: t }, "aria-hidden": "true", "data-icon-name": n }));
323
+ const l = Be(n);
324
+ return l !== null ? /* @__PURE__ */ e(B, { name: l, size: t }) : (!_n.has(n) && Fn() && (_n.add(n), console.warn(`@coolms/ui-react: no icon for the server's icon name "${n}"; its space is kept empty`)), /* @__PURE__ */ e("span", { className: "cms-icon cms-icon--blank", style: { width: t, height: t }, "aria-hidden": "true", "data-icon-name": n }));
325
325
  }
326
- function sn({ id: n, label: t, help: l, error: r, pinned: s, children: a }) {
327
- return /* @__PURE__ */ c("div", { className: H("cms-field", r != null && "is-invalid"), children: [
326
+ function sn({ id: n, label: t, help: l, error: s, pinned: a, children: c }) {
327
+ return /* @__PURE__ */ o("div", { className: H("cms-field", s != null && "is-invalid"), children: [
328
328
  /* @__PURE__ */ e("label", { className: "cms-field__label", htmlFor: n, children: t }),
329
- a,
330
- s != null ? /* @__PURE__ */ c("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
331
- /* @__PURE__ */ e(re, { name: "lock" }),
329
+ c,
330
+ a != null ? /* @__PURE__ */ o("p", { className: "cms-field__pinned", id: `${n}-pinned`, children: [
331
+ /* @__PURE__ */ e(ae, { name: "lock" }),
332
332
  " ",
333
- s
333
+ a
334
334
  ] }) : null,
335
- r != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: r }) : null,
335
+ s != null ? /* @__PURE__ */ e("p", { className: "cms-field__error", id: `${n}-error`, role: "alert", children: s }) : null,
336
336
  l != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${n}-help`, children: l }) : null
337
337
  ] });
338
338
  }
339
- function rn(n, t) {
339
+ function an(n, t) {
340
340
  const l = [t.error != null && `${n}-error`, t.pinned != null && `${n}-pinned`, t.help != null && `${n}-help`].filter(Boolean).join(" ");
341
341
  return l === "" ? void 0 : l;
342
342
  }
343
343
  const Hn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Rn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
344
344
  function On(n, t, l) {
345
- const r = (a, h, d, m = 0, b = 0, i = 0) => {
346
- const g = new Date(Date.UTC(a, h - 1, d, m, b, i));
347
- return g.setUTCFullYear(a), g.getUTCFullYear() === a && g.getUTCMonth() === h - 1 && g.getUTCDate() === d && g.getUTCHours() === m && g.getUTCMinutes() === b && g.getUTCSeconds() === i ? g : null;
348
- }, s = (a) => ({ hour: Number(a[1]), minute: Number(a[2]), second: Number(a[3] ?? 0) });
345
+ const s = (c, f, u, m = 0, _ = 0, i = 0) => {
346
+ const v = new Date(Date.UTC(c, f - 1, u, m, _, i));
347
+ return v.setUTCFullYear(c), v.getUTCFullYear() === c && v.getUTCMonth() === f - 1 && v.getUTCDate() === u && v.getUTCHours() === m && v.getUTCMinutes() === _ && v.getUTCSeconds() === i ? v : null;
348
+ }, a = (c) => ({ hour: Number(c[1]), minute: Number(c[2]), second: Number(c[3] ?? 0) });
349
349
  try {
350
350
  if (n === "time") {
351
- const h = t.match(Rn);
352
- if (h === null) return t;
353
- const d = s(h), m = r(2e3, 1, 1, d.hour, d.minute, d.second);
354
- return m === null ? t : new Intl.DateTimeFormat(l, { timeStyle: h[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
351
+ const f = t.match(Rn);
352
+ if (f === null) return t;
353
+ const u = a(f), m = s(2e3, 1, 1, u.hour, u.minute, u.second);
354
+ return m === null ? t : new Intl.DateTimeFormat(l, { timeStyle: f[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(m);
355
355
  }
356
- const a = t.match(Hn);
357
- if (a === null) return t;
358
- if (n === "date" && a[4] === void 0) {
359
- const h = r(Number(a[1]), Number(a[2]), Number(a[3]));
360
- return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeZone: "UTC" }).format(h);
356
+ const c = t.match(Hn);
357
+ if (c === null) return t;
358
+ if (n === "date" && c[4] === void 0) {
359
+ const f = s(Number(c[1]), Number(c[2]), Number(c[3]));
360
+ return f === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeZone: "UTC" }).format(f);
361
361
  }
362
- if (n === "datetime-local" && a[4] !== void 0) {
363
- const h = r(Number(a[1]), Number(a[2]), Number(a[3]), Number(a[4]), Number(a[5]), Number(a[6] ?? 0));
364
- return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeStyle: a[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(h);
362
+ if (n === "datetime-local" && c[4] !== void 0) {
363
+ const f = s(Number(c[1]), Number(c[2]), Number(c[3]), Number(c[4]), Number(c[5]), Number(c[6] ?? 0));
364
+ return f === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeStyle: c[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(f);
365
365
  }
366
366
  } catch {
367
367
  return t;
@@ -369,228 +369,231 @@ function On(n, t, l) {
369
369
  return t;
370
370
  }
371
371
  const Pn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
372
- function Ut({ label: n, help: t, error: l, disabled: r, readOnly: s, pinned: a, value: h, onChange: d, placeholder: m, type: b = "text", name: i, locale: g, min: f, max: v, step: u, minLength: y, maxLength: S, required: T, autoComplete: M, reveal: E }) {
373
- const _ = fe(), [N, I] = D(!1), K = s === !0 || a != null, z = K && Pn.has(b), k = b === "number" && (u === "any" || typeof u == "number" && !Number.isInteger(u)), F = b === "password" && E !== void 0 && !K, U = /* @__PURE__ */ e(
372
+ function Ut({ label: n, help: t, error: l, disabled: s, readOnly: a, pinned: c, value: f, onChange: u, placeholder: m, type: _ = "text", name: i, locale: v, min: h, max: w, step: r, minLength: g, maxLength: T, required: x, autoComplete: M, reveal: E }) {
373
+ const b = fe(), [N, I] = D(!1), K = a === !0 || c != null, z = K && Pn.has(_), k = _ === "number" && (r === "any" || typeof r == "number" && !Number.isInteger(r)), F = _ === "password" && E !== void 0 && !K, U = /* @__PURE__ */ e(
374
374
  "input",
375
375
  {
376
- id: _,
376
+ id: b,
377
377
  name: i,
378
- type: z || F && N ? "text" : b,
378
+ type: z || F && N ? "text" : _,
379
379
  autoComplete: M,
380
380
  className: "cms-input",
381
- value: z ? On(b, h, g) : h,
382
- ...z ? { "data-value": h } : {},
383
- lang: g,
381
+ value: z ? On(_, f, v) : f,
382
+ ...z ? { "data-value": f } : {},
383
+ lang: v,
384
384
  placeholder: m,
385
- disabled: r,
385
+ disabled: s,
386
386
  readOnly: K,
387
- required: T,
388
- "aria-required": T || void 0,
389
- min: z ? void 0 : f,
390
- max: z ? void 0 : v,
391
- step: z ? void 0 : u,
392
- minLength: y,
393
- maxLength: S,
394
- inputMode: b === "number" ? k ? "decimal" : "numeric" : void 0,
387
+ required: x,
388
+ "aria-required": x || void 0,
389
+ min: z ? void 0 : h,
390
+ max: z ? void 0 : w,
391
+ step: z ? void 0 : r,
392
+ minLength: g,
393
+ maxLength: T,
394
+ inputMode: _ === "number" ? k ? "decimal" : "numeric" : void 0,
395
395
  "aria-invalid": l != null || void 0,
396
- "aria-describedby": rn(_, { help: t, error: l, pinned: a }),
397
- onChange: (Y) => d == null ? void 0 : d(Y.target.value)
396
+ "aria-describedby": an(b, { help: t, error: l, pinned: c }),
397
+ onChange: (Y) => u == null ? void 0 : u(Y.target.value)
398
398
  }
399
399
  );
400
- return /* @__PURE__ */ e(sn, { id: _, label: n, help: t, error: l, pinned: a, children: F ? /* @__PURE__ */ c("span", { className: "cms-input-reveal", children: [
400
+ return /* @__PURE__ */ e(sn, { id: b, label: n, help: t, error: l, pinned: c, children: F ? /* @__PURE__ */ o("span", { className: "cms-input-reveal", children: [
401
401
  U,
402
402
  /* @__PURE__ */ e(
403
403
  "button",
404
404
  {
405
405
  type: "button",
406
406
  className: "cms-input-reveal__button",
407
- "aria-controls": _,
407
+ "aria-controls": b,
408
408
  "aria-label": N ? E.hide : E.show,
409
409
  title: N ? E.hide : E.show,
410
- disabled: r,
410
+ disabled: s,
411
411
  onClick: () => I((Y) => !Y),
412
412
  children: /* @__PURE__ */ e(B, { name: N ? "eye-off" : "eye", size: 18 })
413
413
  }
414
414
  )
415
415
  ] }) : U });
416
416
  }
417
- function Kt({ label: n, help: t, error: l, disabled: r, readOnly: s, pinned: a, value: h, onChange: d, placeholder: m, rows: b = 4, name: i, locale: g, minLength: f, maxLength: v, required: u }) {
418
- const y = fe();
419
- return /* @__PURE__ */ e(sn, { id: y, label: n, help: t, error: l, pinned: a, children: /* @__PURE__ */ e(
417
+ function Kt({ label: n, help: t, error: l, disabled: s, readOnly: a, pinned: c, value: f, onChange: u, placeholder: m, rows: _ = 4, name: i, locale: v, minLength: h, maxLength: w, required: r }) {
418
+ const g = fe();
419
+ return /* @__PURE__ */ e(sn, { id: g, label: n, help: t, error: l, pinned: c, children: /* @__PURE__ */ e(
420
420
  "textarea",
421
421
  {
422
- id: y,
422
+ id: g,
423
423
  name: i,
424
424
  className: "cms-input cms-textarea",
425
- rows: b,
426
- value: h,
427
- lang: g,
425
+ rows: _,
426
+ value: f,
427
+ lang: v,
428
428
  placeholder: m,
429
- disabled: r,
430
- readOnly: s === !0 || a != null,
431
- required: u,
432
- "aria-required": u || void 0,
433
- minLength: f,
434
- maxLength: v,
429
+ disabled: s,
430
+ readOnly: a === !0 || c != null,
431
+ required: r,
432
+ "aria-required": r || void 0,
433
+ minLength: h,
434
+ maxLength: w,
435
435
  "aria-invalid": l != null || void 0,
436
- "aria-describedby": rn(y, { help: t, error: l, pinned: a }),
437
- onChange: (S) => d == null ? void 0 : d(S.target.value)
436
+ "aria-describedby": an(g, { help: t, error: l, pinned: c }),
437
+ onChange: (T) => u == null ? void 0 : u(T.target.value)
438
438
  }
439
439
  ) });
440
440
  }
441
- function Wt({ label: n, help: t, error: l, disabled: r, readOnly: s, value: a, options: h, onChange: d, emptyText: m = "Nothing to choose from yet.", name: b }) {
442
- const i = fe(), g = h.length === 0;
443
- return /* @__PURE__ */ e(sn, { id: i, label: n, help: g ? m : t, error: l, children: /* @__PURE__ */ e(
441
+ function Wt({ label: n, help: t, error: l, disabled: s, readOnly: a, value: c, options: f, onChange: u, emptyText: m = "Nothing to choose from yet.", name: _ }) {
442
+ const i = fe(), v = f.length === 0;
443
+ return /* @__PURE__ */ e(sn, { id: i, label: n, help: v ? m : t, error: l, children: /* @__PURE__ */ e(
444
444
  "select",
445
445
  {
446
446
  id: i,
447
- name: b,
447
+ name: _,
448
448
  className: "cms-input cms-select",
449
- value: a,
450
- disabled: r || g,
451
- "aria-readonly": s || void 0,
449
+ value: c,
450
+ disabled: s || v,
451
+ "aria-readonly": a || void 0,
452
452
  "aria-invalid": l != null || void 0,
453
- "aria-describedby": rn(i, { help: g ? m : t, error: l }),
454
- onChange: (f) => {
455
- s || d == null || d(f.target.value);
453
+ "aria-describedby": an(i, { help: v ? m : t, error: l }),
454
+ onChange: (h) => {
455
+ a || u == null || u(h.target.value);
456
456
  },
457
- children: h.map((f) => /* @__PURE__ */ e("option", { value: f.value, disabled: s && f.value !== a, children: f.label }, f.value))
457
+ children: f.map((h) => /* @__PURE__ */ e("option", { value: h.value, disabled: a && h.value !== c, children: h.label }, h.value))
458
458
  }
459
459
  ) });
460
460
  }
461
- function Zt({ label: n, checked: t, onChange: l, disabled: r, readOnly: s, help: a }) {
462
- const h = fe();
463
- return /* @__PURE__ */ c("div", { className: "cms-toggle-row", children: [
461
+ function Zt({ label: n, checked: t, onChange: l, disabled: s, readOnly: a, help: c }) {
462
+ const f = fe();
463
+ return /* @__PURE__ */ o("div", { className: "cms-toggle-row", children: [
464
464
  /* @__PURE__ */ e(
465
465
  "button",
466
466
  {
467
- id: h,
467
+ id: f,
468
468
  type: "button",
469
469
  role: "switch",
470
470
  className: H("cms-toggle", t && "is-on"),
471
471
  "aria-checked": t,
472
- "aria-readonly": s || void 0,
473
- "aria-describedby": a != null ? `${h}-help` : void 0,
474
- disabled: r,
472
+ "aria-readonly": a || void 0,
473
+ "aria-describedby": c != null ? `${f}-help` : void 0,
474
+ disabled: s,
475
475
  onClick: () => {
476
- s || l == null || l(!t);
476
+ a || l == null || l(!t);
477
477
  },
478
478
  children: /* @__PURE__ */ e("span", { className: "cms-toggle__thumb" })
479
479
  }
480
480
  ),
481
- /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: h, children: n }),
482
- a != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${h}-help`, children: a }) : null
481
+ /* @__PURE__ */ e("label", { className: "cms-toggle__label", htmlFor: f, children: n }),
482
+ c != null ? /* @__PURE__ */ e("p", { className: "cms-field__help", id: `${f}-help`, children: c }) : null
483
483
  ] });
484
484
  }
485
485
  const zn = 150;
486
- function xn({ open: n, title: t, onClose: l, dirty: r = !1, onDirtyClose: s, children: a, footer: h, closeLabel: d = "Close", initialFocus: m, className: b }) {
487
- const [i, g] = D(n), [f, v] = D(!1), u = P(null), y = P(null), S = fe();
486
+ function Mn({ open: n, title: t, onClose: l, dirty: s = !1, onDirtyClose: a, children: c, footer: f, closeLabel: u = "Close", initialFocus: m, className: _ }) {
487
+ const [i, v] = D(n), [h, w] = D(!1), r = P(null), g = P(null), T = fe();
488
488
  if (ee(() => {
489
489
  if (n) {
490
- y.current = document.activeElement, g(!0), v(!1);
490
+ g.current = document.activeElement, v(!0), w(!1);
491
491
  return;
492
492
  }
493
493
  if (!i) return;
494
- v(!0);
494
+ w(!0);
495
495
  const M = window.setTimeout(() => {
496
- var E, _;
497
- g(!1), v(!1), (_ = (E = y.current) == null ? void 0 : E.focus) == null || _.call(E);
496
+ var E, b;
497
+ v(!1), w(!1), (b = (E = g.current) == null ? void 0 : E.focus) == null || b.call(E);
498
498
  }, zn);
499
499
  return () => window.clearTimeout(M);
500
500
  }, [n, i]), ee(() => {
501
501
  var M, E;
502
502
  if (n && i) {
503
- const _ = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
504
- (E = (m == null ? void 0 : m.current) ?? ((M = u.current) == null ? void 0 : M.querySelector(`.cms-modal__body :is(${_}), .cms-modal__foot :is(${_})`)) ?? u.current) == null || E.focus();
503
+ const b = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
504
+ (E = (m == null ? void 0 : m.current) ?? ((M = r.current) == null ? void 0 : M.querySelector(`.cms-modal__body :is(${b}), .cms-modal__foot :is(${b})`)) ?? r.current) == null || E.focus();
505
505
  }
506
506
  }, [n, i, m]), !i) return null;
507
- const T = () => {
508
- r ? s == null || s() : l();
507
+ const x = () => {
508
+ s ? a == null || a() : l();
509
509
  };
510
510
  return ln(
511
- /* @__PURE__ */ e("div", { className: H("cms-modal-scrim", f && "is-closing"), onMouseDown: (M) => {
512
- M.target === M.currentTarget && T();
513
- }, children: /* @__PURE__ */ c(
511
+ /* @__PURE__ */ e("div", { className: H("cms-modal-scrim", h && "is-closing"), onMouseDown: (M) => {
512
+ M.target === M.currentTarget && x();
513
+ }, children: /* @__PURE__ */ o(
514
514
  "div",
515
515
  {
516
- ref: u,
517
- className: H("cms-modal", b, f && "is-closing", r && "is-dirty"),
516
+ ref: r,
517
+ className: H("cms-modal", _, h && "is-closing", s && "is-dirty"),
518
518
  role: "dialog",
519
519
  "aria-modal": "true",
520
- "aria-labelledby": S,
520
+ "aria-labelledby": T,
521
521
  tabIndex: -1,
522
522
  onKeyDown: (M) => {
523
523
  var E;
524
524
  if (M.key === "Escape")
525
- M.stopPropagation(), T();
525
+ M.stopPropagation(), x();
526
526
  else if (M.key === "Tab") {
527
- const _ = (E = u.current) == null ? void 0 : E.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
528
- if (!_ || _.length === 0) return;
529
- const N = _[0], I = _[_.length - 1];
527
+ const b = (E = r.current) == null ? void 0 : E.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
528
+ if (!b || b.length === 0) return;
529
+ const N = b[0], I = b[b.length - 1];
530
530
  M.shiftKey && document.activeElement === N ? (M.preventDefault(), I.focus()) : !M.shiftKey && document.activeElement === I && (M.preventDefault(), N.focus());
531
531
  }
532
532
  },
533
533
  children: [
534
- /* @__PURE__ */ c("header", { className: "cms-modal__head", children: [
535
- /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: S, children: t }),
536
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d, onClick: T, children: /* @__PURE__ */ e(re, { name: "close" }) })
534
+ /* @__PURE__ */ o("header", { className: "cms-modal__head", children: [
535
+ /* @__PURE__ */ e("h2", { className: "cms-modal__title", id: T, children: t }),
536
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": u, onClick: x, children: /* @__PURE__ */ e(ae, { name: "close" }) })
537
537
  ] }),
538
- /* @__PURE__ */ e("div", { className: "cms-modal__body", children: a }),
539
- h != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: h }) : null
538
+ /* @__PURE__ */ e("div", { className: "cms-modal__body", children: c }),
539
+ f != null ? /* @__PURE__ */ e("footer", { className: "cms-modal__foot", children: f }) : null
540
540
  ]
541
541
  }
542
542
  ) }),
543
543
  document.body
544
544
  );
545
545
  }
546
- function Vt({ open: n, title: t, message: l, kind: r = "default", confirmLabel: s, cancelLabel: a, closeLabel: h, onConfirm: d, onCancel: m }) {
547
- const b = r === "discard-changes";
546
+ function Vt({ open: n, title: t, message: l, kind: s = "default", confirmLabel: a, cancelLabel: c, closeLabel: f, onConfirm: u, onCancel: m }) {
547
+ const _ = s === "discard-changes";
548
548
  return /* @__PURE__ */ e(
549
- xn,
549
+ Mn,
550
550
  {
551
551
  open: n,
552
552
  title: t,
553
553
  onClose: m,
554
- ...h === void 0 ? {} : { closeLabel: h },
555
- footer: /* @__PURE__ */ c($, { children: [
556
- /* @__PURE__ */ e(De, { onClick: m, children: a ?? (b ? "Keep editing" : "Cancel") }),
557
- /* @__PURE__ */ e(De, { variant: r === "default" ? "primary" : "danger", onClick: d, children: s ?? (b ? "Discard changes" : "Confirm") })
554
+ ...f === void 0 ? {} : { closeLabel: f },
555
+ footer: /* @__PURE__ */ o($, { children: [
556
+ /* @__PURE__ */ e(De, { onClick: m, children: c ?? (_ ? "Keep editing" : "Cancel") }),
557
+ /* @__PURE__ */ e(De, { variant: s === "default" ? "primary" : "danger", onClick: u, children: a ?? (_ ? "Discard changes" : "Confirm") })
558
558
  ] }),
559
- children: r !== "default" ? /* @__PURE__ */ c("p", { className: "cms-confirm__warning", children: [
560
- /* @__PURE__ */ e(re, { name: "warning" }),
559
+ children: s !== "default" ? /* @__PURE__ */ o("p", { className: "cms-confirm__warning", children: [
560
+ /* @__PURE__ */ e(ae, { name: "warning" }),
561
561
  " ",
562
562
  l
563
563
  ] }) : /* @__PURE__ */ e("p", { children: l })
564
564
  }
565
565
  );
566
566
  }
567
- function qt({ kind: n, message: t, action: l, onDismiss: r, dismissLabel: s = "Dismiss" }) {
568
- return /* @__PURE__ */ c("div", { className: H("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
569
- /* @__PURE__ */ e(re, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
567
+ function qt({ kind: n, message: t, action: l, onDismiss: s, dismissLabel: a = "Dismiss" }) {
568
+ return /* @__PURE__ */ o("div", { className: H("cms-toast", `cms-toast--${n}`), role: n === "error" ? "alert" : "status", children: [
569
+ /* @__PURE__ */ e(ae, { name: n === "success" ? "check" : n === "error" ? "warning" : "info" }),
570
570
  /* @__PURE__ */ e("span", { className: "cms-toast__message", children: t }),
571
571
  l ? /* @__PURE__ */ e(De, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
572
- r ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": s, onClick: r, children: /* @__PURE__ */ e(re, { name: "close" }) }) : null
572
+ s ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: s, children: /* @__PURE__ */ e(ae, { name: "close" }) }) : null
573
573
  ] });
574
574
  }
575
575
  function Gt({ children: n }) {
576
576
  return /* @__PURE__ */ e("div", { className: "cms-toast-region", children: n });
577
577
  }
578
578
  function Un({ what: n, layout: t = "inline" }) {
579
- return /* @__PURE__ */ c("div", { className: H("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
580
- /* @__PURE__ */ e(re, { name: "spinner" }),
579
+ return /* @__PURE__ */ o("div", { className: H("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
580
+ /* @__PURE__ */ e(ae, { name: "spinner" }),
581
581
  /* @__PURE__ */ e("span", { children: n })
582
582
  ] });
583
583
  }
584
- function Kn({ title: n, hint: t, action: l }) {
585
- return /* @__PURE__ */ c("div", { className: "cms-empty", children: [
586
- /* @__PURE__ */ e("p", { className: "cms-empty__title", children: n }),
587
- t != null ? /* @__PURE__ */ e("p", { className: "cms-empty__hint", children: t }) : null,
588
- l != null ? /* @__PURE__ */ e("div", { className: "cms-empty__action", children: l }) : null
584
+ function Kn({ title: n, hint: t, action: l, icon: s }) {
585
+ return /* @__PURE__ */ o("div", { className: "cms-state cms-state--empty cms-state--page", role: "status", "aria-live": "polite", "data-kind": "empty", children: [
586
+ s !== void 0 && Be(s) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(xn, { name: s, size: 32 }) }) : null,
587
+ /* @__PURE__ */ o("span", { className: "cms-state__text", children: [
588
+ /* @__PURE__ */ e("span", { className: "cms-state__title", children: n }),
589
+ t != null ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: t }) : null
590
+ ] }),
591
+ l != null ? /* @__PURE__ */ e("div", { className: "cms-state__action", children: l }) : null
589
592
  ] });
590
593
  }
591
594
  function Wn({ message: n, onRetry: t, retryLabel: l = "Try again" }) {
592
- return /* @__PURE__ */ c("div", { className: "cms-error-banner", role: "alert", children: [
593
- /* @__PURE__ */ e(re, { name: "warning" }),
595
+ return /* @__PURE__ */ o("div", { className: "cms-error-banner", role: "alert", children: [
596
+ /* @__PURE__ */ e(ae, { name: "warning" }),
594
597
  /* @__PURE__ */ e("span", { className: "cms-error-banner__message", children: n }),
595
598
  t ? /* @__PURE__ */ e(De, { onClick: t, children: l }) : null
596
599
  ] });
@@ -602,37 +605,39 @@ function Zn() {
602
605
  return Number.isFinite(t) && t >= 0 ? t : Je;
603
606
  }
604
607
  function Vn() {
605
- return /* @__PURE__ */ c("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
608
+ return /* @__PURE__ */ o("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
606
609
  /* @__PURE__ */ e("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
607
610
  /* @__PURE__ */ e("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
608
611
  ] });
609
612
  }
610
- function Le({ kind: n, title: t, description: l, action: r, placement: s = "block", icon: a }) {
611
- const [h, d] = D(n !== "loading");
612
- return ee(() => {
613
+ function Le({ kind: n, title: t, description: l, action: s, placement: a = "page", icon: c }) {
614
+ const [f, u] = D(n !== "loading");
615
+ ee(() => {
613
616
  if (n !== "loading") {
614
- d(!0);
617
+ u(!0);
615
618
  return;
616
619
  }
617
- d(!1);
618
- const m = window.setTimeout(() => d(!0), Zn());
619
- return () => window.clearTimeout(m);
620
- }, [n]), /* @__PURE__ */ c(
620
+ u(!1);
621
+ const _ = window.setTimeout(() => u(!0), Zn());
622
+ return () => window.clearTimeout(_);
623
+ }, [n]);
624
+ const m = a === "block";
625
+ return /* @__PURE__ */ o(
621
626
  "div",
622
627
  {
623
- className: H("cms-state", `cms-state--${n}`, `cms-state--${s}`, !h && "is-waiting"),
628
+ className: H("cms-state", `cms-state--${n}`, `cms-state--${a}`, !f && "is-waiting"),
624
629
  role: "status",
625
630
  "aria-live": "polite",
626
631
  "data-kind": n,
627
632
  children: [
628
633
  n === "loading" ? /* @__PURE__ */ e(Vn, {}) : null,
629
- n === "error" || n === "denied" ? /* @__PURE__ */ e(re, { name: n === "error" ? "warning" : "lock" }) : null,
630
- n === "empty" && a !== void 0 && Ue(a) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Fn, { name: a, size: s === "page" ? 32 : 24 }) }) : null,
631
- /* @__PURE__ */ c("span", { className: "cms-state__text", children: [
634
+ (n === "error" || n === "denied") && !m ? /* @__PURE__ */ e(ae, { name: n === "error" ? "warning" : "lock" }) : null,
635
+ n === "empty" && !m && c !== void 0 && Be(c) !== null ? /* @__PURE__ */ e("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(xn, { name: c, size: a === "page" ? 32 : 24 }) }) : null,
636
+ /* @__PURE__ */ o("span", { className: "cms-state__text", children: [
632
637
  /* @__PURE__ */ e("span", { className: "cms-state__title", children: t }),
633
- l !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: l }) : null
638
+ l !== void 0 && !m ? /* @__PURE__ */ e("span", { className: "cms-state__description", children: l }) : null
634
639
  ] }),
635
- r !== void 0 && n !== "denied" ? /* @__PURE__ */ e(De, { className: "cms-state__action", onClick: r.onAction, children: r.label }) : null
640
+ s !== void 0 && n !== "denied" ? /* @__PURE__ */ e(De, { className: "cms-state__action", variant: m ? "quiet" : "secondary", onClick: s.onAction, children: s.label }) : null
636
641
  ]
637
642
  }
638
643
  );
@@ -648,17 +653,17 @@ function Xn(n) {
648
653
  return n.getClientRects().length > 0;
649
654
  }
650
655
  function jt(n) {
651
- const { name: t, badge: l, closeLabel: r, onClose: s, actions: a = [], moreLabel: h = "More", edit: d, editing: m, state: b, siblings: i, bar: g, thumbnails: f, strip: v, onZoom: u, children: y } = n, S = P(null), T = P(null), M = fe(), [E, _] = D(!1), N = P(null);
656
+ const { name: t, badge: l, closeLabel: s, onClose: a, actions: c = [], moreLabel: f = "More", edit: u, editing: m, state: _, siblings: i, bar: v, thumbnails: h, strip: w, onZoom: r, children: g } = n, T = P(null), x = P(null), M = fe(), [E, b] = D(!1), N = P(null);
652
657
  ee(() => {
653
658
  var U;
654
659
  const k = document.activeElement, F = document.body.style.overflow;
655
- return document.body.style.overflow = "hidden", (U = T.current) == null || U.focus(), () => {
660
+ return document.body.style.overflow = "hidden", (U = x.current) == null || U.focus(), () => {
656
661
  var Y;
657
662
  document.body.style.overflow = F, (Y = k == null ? void 0 : k.focus) == null || Y.call(k);
658
663
  };
659
664
  }, []);
660
665
  const I = () => {
661
- m != null && m.dirty ? m.onDirtyClose() : s();
666
+ m != null && m.dirty ? m.onDirtyClose() : a();
662
667
  }, K = (k) => {
663
668
  const F = k.touches.length === 1 ? k.touches[0] : void 0;
664
669
  N.current = F === void 0 || m !== void 0 || Yn(k.target) ? null : { x: F.clientX, y: F.clientY };
@@ -670,10 +675,10 @@ function jt(n) {
670
675
  Math.abs(Y) < Gn || Math.abs(Y) < Math.abs(U.clientY - F.y) || (Y > 0 ? (W = i == null ? void 0 : i.onPrevious) == null || W.call(i) : (j = i == null ? void 0 : i.onNext) == null || j.call(i));
671
676
  };
672
677
  return ln(
673
- /* @__PURE__ */ c(
678
+ /* @__PURE__ */ o(
674
679
  "div",
675
680
  {
676
- ref: S,
681
+ ref: T,
677
682
  className: H("cms-viewer", m !== void 0 && "is-editing"),
678
683
  role: "dialog",
679
684
  "aria-modal": "true",
@@ -683,43 +688,43 @@ function jt(n) {
683
688
  var F, U, Y;
684
689
  if (k.key === "Escape") {
685
690
  if (m !== void 0) return;
686
- k.stopPropagation(), E ? _(!1) : s();
691
+ k.stopPropagation(), E ? b(!1) : a();
687
692
  } else if (k.key === "Tab") {
688
- const W = Array.from(((F = S.current) == null ? void 0 : F.querySelectorAll(qn)) ?? []).filter(Xn);
693
+ const W = Array.from(((F = T.current) == null ? void 0 : F.querySelectorAll(qn)) ?? []).filter(Xn);
689
694
  if (W.length === 0) return;
690
695
  const j = W[0], X = W[W.length - 1];
691
696
  k.shiftKey && document.activeElement === j ? (k.preventDefault(), X.focus()) : !k.shiftKey && document.activeElement === X && (k.preventDefault(), j.focus());
692
- } else m === void 0 && !jn(k.target) && !k.ctrlKey && !k.metaKey && !k.altKey && (k.key === "ArrowLeft" ? (U = i == null ? void 0 : i.onPrevious) == null || U.call(i) : k.key === "ArrowRight" ? (Y = i == null ? void 0 : i.onNext) == null || Y.call(i) : k.key === "+" || k.key === "=" ? u == null || u("in") : k.key === "-" ? u == null || u("out") : k.key === "0" && (u == null || u("reset")));
697
+ } else m === void 0 && !jn(k.target) && !k.ctrlKey && !k.metaKey && !k.altKey && (k.key === "ArrowLeft" ? (U = i == null ? void 0 : i.onPrevious) == null || U.call(i) : k.key === "ArrowRight" ? (Y = i == null ? void 0 : i.onNext) == null || Y.call(i) : k.key === "+" || k.key === "=" ? r == null || r("in") : k.key === "-" ? r == null || r("out") : k.key === "0" && (r == null || r("reset")));
693
698
  },
694
699
  children: [
695
700
  i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-visually-hidden", role: "status", children: `${t}, ${i.position}` }) : null,
696
- /* @__PURE__ */ c("header", { className: "cms-viewer__top", children: [
697
- /* @__PURE__ */ e("button", { ref: T, type: "button", className: "cms-viewer__icon", "aria-label": r, onClick: I, children: /* @__PURE__ */ e(re, { name: "close" }) }),
701
+ /* @__PURE__ */ o("header", { className: "cms-viewer__top", children: [
702
+ /* @__PURE__ */ e("button", { ref: x, type: "button", className: "cms-viewer__icon", "aria-label": s, onClick: I, children: /* @__PURE__ */ e(ae, { name: "close" }) }),
698
703
  /* @__PURE__ */ e("span", { className: "cms-viewer__badge", children: l }),
699
704
  /* @__PURE__ */ e("h2", { className: "cms-viewer__name", id: M, title: t, children: t }),
700
705
  i !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-viewer__position", children: i.position }) : null,
701
706
  /* @__PURE__ */ e("span", { className: "cms-viewer__space" }),
702
- m !== void 0 ? /* @__PURE__ */ c($, { children: [
707
+ m !== void 0 ? /* @__PURE__ */ o($, { children: [
703
708
  /* @__PURE__ */ e("span", { className: "cms-viewer__status", role: "status", children: m.status }),
704
709
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.onDone, children: m.doneLabel })
705
- ] }) : /* @__PURE__ */ c($, { children: [
706
- /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: a.map((k) => /* @__PURE__ */ c("button", { type: "button", className: "cms-viewer__button", onClick: k.onSelect, children: [
710
+ ] }) : /* @__PURE__ */ o($, { children: [
711
+ /* @__PURE__ */ e("span", { className: "cms-viewer__actions", children: c.map((k) => /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button", onClick: k.onSelect, children: [
707
712
  k.icon,
708
713
  k.label
709
714
  ] }, k.label)) }),
710
- d !== void 0 ? /* @__PURE__ */ c("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": d.label, onClick: d.onEdit, children: [
711
- d.icon,
712
- /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: d.label })
715
+ u !== void 0 ? /* @__PURE__ */ o("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": u.label, onClick: u.onEdit, children: [
716
+ u.icon,
717
+ /* @__PURE__ */ e("span", { className: "cms-viewer__wide", children: u.label })
713
718
  ] }) : null,
714
- a.length > 0 ? /* @__PURE__ */ c("span", { className: "cms-viewer__more", children: [
715
- /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": h, "aria-expanded": E, onClick: () => _((k) => !k), children: /* @__PURE__ */ e(B, { name: "more" }) }),
716
- E ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: a.map((k) => /* @__PURE__ */ c(
719
+ c.length > 0 ? /* @__PURE__ */ o("span", { className: "cms-viewer__more", children: [
720
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__icon", "aria-label": f, "aria-expanded": E, onClick: () => b((k) => !k), children: /* @__PURE__ */ e(B, { name: "more" }) }),
721
+ E ? /* @__PURE__ */ e("span", { className: "cms-viewer__menu", children: c.map((k) => /* @__PURE__ */ o(
717
722
  "button",
718
723
  {
719
724
  type: "button",
720
725
  className: "cms-viewer__button",
721
726
  onClick: () => {
722
- _(!1), k.onSelect();
727
+ b(!1), k.onSelect();
723
728
  },
724
729
  children: [
725
730
  k.icon,
@@ -731,22 +736,22 @@ function jt(n) {
731
736
  ] }) : null
732
737
  ] })
733
738
  ] }),
734
- /* @__PURE__ */ c("div", { className: "cms-viewer__body", children: [
735
- f != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: f }) : null,
736
- /* @__PURE__ */ c("div", { className: "cms-viewer__content", onTouchStart: K, onTouchEnd: z, children: [
737
- (m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ c("div", { className: "cms-viewer__conflict", role: "alert", children: [
739
+ /* @__PURE__ */ o("div", { className: "cms-viewer__body", children: [
740
+ h != null && m === void 0 ? /* @__PURE__ */ e("nav", { className: "cms-viewer__thumbnails", children: h }) : null,
741
+ /* @__PURE__ */ o("div", { className: "cms-viewer__content", onTouchStart: K, onTouchEnd: z, children: [
742
+ (m == null ? void 0 : m.conflict) !== void 0 ? /* @__PURE__ */ o("div", { className: "cms-viewer__conflict", role: "alert", children: [
738
743
  /* @__PURE__ */ e("p", { className: "cms-viewer__conflict-text", children: m.conflict.message }),
739
744
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button", onClick: m.conflict.onOverwrite, children: m.conflict.overwriteLabel }),
740
745
  /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: m.conflict.onKeepBoth, children: m.conflict.keepBothLabel })
741
746
  ] }) : null,
742
- b === void 0 ? y : /* @__PURE__ */ e(Jn, { state: b }),
743
- m === void 0 && (i != null && i.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": i.previousLabel, title: i.previousLabel, onClick: i.onPrevious, children: /* @__PURE__ */ e(re, { name: "back" }) }) : null,
744
- m === void 0 && (i != null && i.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": i.nextLabel, title: i.nextLabel, onClick: i.onNext, children: /* @__PURE__ */ e(re, { name: "back" }) }) : null,
747
+ _ === void 0 ? g : /* @__PURE__ */ e(Jn, { state: _ }),
748
+ m === void 0 && (i != null && i.onPrevious) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": i.previousLabel, title: i.previousLabel, onClick: i.onPrevious, children: /* @__PURE__ */ e(ae, { name: "back" }) }) : null,
749
+ m === void 0 && (i != null && i.onNext) ? /* @__PURE__ */ e("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": i.nextLabel, title: i.nextLabel, onClick: i.onNext, children: /* @__PURE__ */ e(ae, { name: "back" }) }) : null,
745
750
  m === void 0 && i !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(i.total, 7) }, (k, F) => /* @__PURE__ */ e("i", { className: F === Math.min(i.index, 6) ? "is-current" : void 0 }, F)) }) : null
746
751
  ] })
747
752
  ] }),
748
- m === void 0 && v != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: v }) : null,
749
- g != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: g }) : null
753
+ m === void 0 && w != null ? /* @__PURE__ */ e("div", { className: "cms-viewer__strip", children: w }) : null,
754
+ v != null ? /* @__PURE__ */ e("footer", { className: "cms-viewer__bar", children: v }) : null
750
755
  ]
751
756
  }
752
757
  ),
@@ -795,165 +800,165 @@ const Xe = (n, t) => `${n}
795
800
  ${t}`, nt = (n, t) => n === "" ? t : `${n}/${t}`, tt = 48;
796
801
  function Yt(n) {
797
802
  var te, we;
798
- const { open: t, spaces: l, list: r, disabledReason: s, budget: a, formatSize: h, labels: d, onConfirm: m, onCancel: b } = n, [i, g] = D(((te = l[0]) == null ? void 0 : te.id) ?? ""), [f, v] = D(""), [u, y] = D({ status: "loading" }), [S, T] = D(0), [M, E] = D(/* @__PURE__ */ new Map()), [_, N] = D(0), [I, K] = D(!1), z = P(null), k = P(!1);
803
+ const { open: t, spaces: l, list: s, disabledReason: a, budget: c, formatSize: f, labels: u, onConfirm: m, onCancel: _ } = n, [i, v] = D(((te = l[0]) == null ? void 0 : te.id) ?? ""), [h, w] = D(""), [r, g] = D({ status: "loading" }), [T, x] = D(0), [M, E] = D(/* @__PURE__ */ new Map()), [b, N] = D(0), [I, K] = D(!1), z = P(null), k = P(!1);
799
804
  ee(() => {
800
805
  k.current = !1;
801
- }, [t, i, f]);
806
+ }, [t, i, h]);
802
807
  const F = fe();
803
808
  ee(() => {
804
- var w;
805
- t && (g(((w = l[0]) == null ? void 0 : w.id) ?? ""), v(""), E(/* @__PURE__ */ new Map()), K(!1));
809
+ var y;
810
+ t && (v(((y = l[0]) == null ? void 0 : y.id) ?? ""), w(""), E(/* @__PURE__ */ new Map()), K(!1));
806
811
  }, [t]), ee(() => {
807
812
  if (!t || i === "") return;
808
- let w = !0;
809
- return y({ status: "loading" }), N(0), r(i, f).then(
810
- (C) => w && y({ status: "ready", entries: C.entries, next: C.next ?? null, paging: !1 }),
811
- (C) => w && y({ status: C instanceof Qn ? "denied" : "error" })
813
+ let y = !0;
814
+ return g({ status: "loading" }), N(0), s(i, h).then(
815
+ (S) => y && g({ status: "ready", entries: S.entries, next: S.next ?? null, paging: !1 }),
816
+ (S) => y && g({ status: S instanceof Qn ? "denied" : "error" })
812
817
  ), () => {
813
- w = !1;
818
+ y = !1;
814
819
  };
815
- }, [t, i, f, r, S]);
820
+ }, [t, i, h, s, T]);
816
821
  const U = Ie(() => {
817
- if (u.status !== "ready" || u.next === null || u.paging) return;
818
- const w = u.next, C = u.entries;
819
- y({ ...u, paging: !0 }), r(i, f, w).then(
822
+ if (r.status !== "ready" || r.next === null || r.paging) return;
823
+ const y = r.next, S = r.entries;
824
+ g({ ...r, paging: !0 }), s(i, h, y).then(
820
825
  (Z) => {
821
- k.current = !1, y({ status: "ready", entries: [...C, ...Z.entries], next: Z.next ?? null, paging: !1 });
826
+ k.current = !1, g({ status: "ready", entries: [...S, ...Z.entries], next: Z.next ?? null, paging: !1 });
822
827
  },
823
828
  (Z) => {
824
829
  if (!(Z instanceof et)) {
825
- y({ status: "ready", entries: C, next: w, paging: !1 });
830
+ g({ status: "ready", entries: S, next: y, paging: !1 });
826
831
  return;
827
832
  }
828
833
  if (k.current) {
829
- y({ status: "error" });
834
+ g({ status: "error" });
830
835
  return;
831
836
  }
832
- k.current = !0, T((G) => G + 1);
837
+ k.current = !0, x((G) => G + 1);
833
838
  }
834
839
  );
835
- }, [u, r, i, f]), Y = Ie((w) => {
836
- var C;
837
- return ((C = a == null ? void 0 : a.cost) == null ? void 0 : C.call(a, w)) ?? w.size ?? 0;
838
- }, [a]), W = Ln(() => [...M.values()], [M]), j = W.reduce((w, C) => w + (C.size ?? 0), 0), X = a === void 0 ? null : a.limitBytes - a.usedBytes - W.reduce((w, C) => w + Y(C), 0), ne = X !== null && X < 0, ce = (w) => {
839
- if (w.kind !== "file") return null;
840
- const C = s == null ? void 0 : s(w);
841
- return C || (X !== null && !M.has(Xe(i, w.id)) && Y(w) > X ? d.overBudget : null);
842
- }, _e = (w) => {
843
- const C = Xe(i, w.id);
844
- !M.has(C) && ce(w) !== null || E((Z) => {
840
+ }, [r, s, i, h]), Y = Ie((y) => {
841
+ var S;
842
+ return ((S = c == null ? void 0 : c.cost) == null ? void 0 : S.call(c, y)) ?? y.size ?? 0;
843
+ }, [c]), W = Dn(() => [...M.values()], [M]), j = W.reduce((y, S) => y + (S.size ?? 0), 0), X = c === void 0 ? null : c.limitBytes - c.usedBytes - W.reduce((y, S) => y + Y(S), 0), ne = X !== null && X < 0, ce = (y) => {
844
+ if (y.kind !== "file") return null;
845
+ const S = a == null ? void 0 : a(y);
846
+ return S || (X !== null && !M.has(Xe(i, y.id)) && Y(y) > X ? u.overBudget : null);
847
+ }, be = (y) => {
848
+ const S = Xe(i, y.id);
849
+ !M.has(S) && ce(y) !== null || E((Z) => {
845
850
  const G = new Map(Z);
846
- return G.has(C) ? G.delete(C) : G.set(C, { ...w, space: i, path: f }), G;
851
+ return G.has(S) ? G.delete(S) : G.set(S, { ...y, space: i, path: h }), G;
847
852
  });
848
- }, oe = (w) => v(nt(f, w.name)), ue = () => v(f.includes("/") ? f.slice(0, f.lastIndexOf("/")) : ""), Ce = (w) => E((C) => {
849
- const Z = new Map(C);
850
- return Z.delete(w), Z;
851
- }), pe = u.status === "ready" ? u.entries : [], le = (w) => {
852
- const C = pe[_];
853
- if (w.key === "ArrowDown" || w.key === "ArrowUp" || w.key === "Home" || w.key === "End") {
854
- w.preventDefault();
855
- const Z = pe.length - 1, G = w.key === "Home" ? 0 : w.key === "End" ? Z : Math.min(Z, Math.max(0, _ + (w.key === "ArrowDown" ? 1 : -1)));
853
+ }, oe = (y) => w(nt(h, y.name)), ue = () => w(h.includes("/") ? h.slice(0, h.lastIndexOf("/")) : ""), Ce = (y) => E((S) => {
854
+ const Z = new Map(S);
855
+ return Z.delete(y), Z;
856
+ }), pe = r.status === "ready" ? r.entries : [], le = (y) => {
857
+ const S = pe[b];
858
+ if (y.key === "ArrowDown" || y.key === "ArrowUp" || y.key === "Home" || y.key === "End") {
859
+ y.preventDefault();
860
+ const Z = pe.length - 1, G = y.key === "Home" ? 0 : y.key === "End" ? Z : Math.min(Z, Math.max(0, b + (y.key === "ArrowDown" ? 1 : -1)));
856
861
  N(G), G >= Z - 1 && U();
857
- } else w.key === "Enter" && (C == null ? void 0 : C.kind) === "folder" ? (w.preventDefault(), oe(C)) : w.key === " " && (C == null ? void 0 : C.kind) === "file" ? (w.preventDefault(), _e(C)) : w.key === "Backspace" && f !== "" && (w.preventDefault(), ue());
858
- }, be = f === "" ? [] : f.split("/"), ve = ((we = l.find((w) => w.id === i)) == null ? void 0 : we.name) ?? "", ye = (w) => `${F}-entry-${String(w)}`;
859
- return /* @__PURE__ */ c(
860
- xn,
862
+ } else y.key === "Enter" && (S == null ? void 0 : S.kind) === "folder" ? (y.preventDefault(), oe(S)) : y.key === " " && (S == null ? void 0 : S.kind) === "file" ? (y.preventDefault(), be(S)) : y.key === "Backspace" && h !== "" && (y.preventDefault(), ue());
863
+ }, _e = h === "" ? [] : h.split("/"), ve = ((we = l.find((y) => y.id === i)) == null ? void 0 : we.name) ?? "", ye = (y) => `${F}-entry-${String(y)}`;
864
+ return /* @__PURE__ */ o(
865
+ Mn,
861
866
  {
862
867
  open: t,
863
- title: d.title,
864
- onClose: b,
865
- closeLabel: d.close,
868
+ title: u.title,
869
+ onClose: _,
870
+ closeLabel: u.close,
866
871
  initialFocus: z,
867
872
  className: "cms-file-picker",
868
- footer: /* @__PURE__ */ c("div", { className: "cms-file-picker__foot", children: [
869
- /* @__PURE__ */ c("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
870
- W.length > 0 ? /* @__PURE__ */ e("span", { children: d.total(W.length, h(j)) }) : null,
871
- a !== void 0 && X !== null ? /* @__PURE__ */ e("span", { className: H(ne && "is-over"), children: ne ? d.overBudget : d.left(h(Math.max(0, X)), h(a.limitBytes)) }) : null
873
+ footer: /* @__PURE__ */ o("div", { className: "cms-file-picker__foot", children: [
874
+ /* @__PURE__ */ o("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
875
+ W.length > 0 ? /* @__PURE__ */ e("span", { children: u.total(W.length, f(j)) }) : null,
876
+ c !== void 0 && X !== null ? /* @__PURE__ */ e("span", { className: H(ne && "is-over"), children: ne ? u.overBudget : u.left(f(Math.max(0, X)), f(c.limitBytes)) }) : null
872
877
  ] }),
873
- /* @__PURE__ */ c("div", { className: "cms-file-picker__actions", children: [
874
- /* @__PURE__ */ e(De, { variant: "secondary", onClick: b, children: d.cancel }),
875
- /* @__PURE__ */ e(De, { variant: "primary", disabled: W.length === 0 || ne, onClick: () => m(W), children: d.confirm(W.length) })
878
+ /* @__PURE__ */ o("div", { className: "cms-file-picker__actions", children: [
879
+ /* @__PURE__ */ e(De, { variant: "secondary", onClick: _, children: u.cancel }),
880
+ /* @__PURE__ */ e(De, { variant: "primary", disabled: W.length === 0 || ne, onClick: () => m(W), children: u.confirm(W.length) })
876
881
  ] })
877
882
  ] }),
878
883
  children: [
879
- /* @__PURE__ */ c("div", { className: "cms-file-picker__top", children: [
880
- l.length > 1 ? /* @__PURE__ */ c("label", { className: "cms-file-picker__space", children: [
881
- /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: d.space }),
882
- /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: i, onChange: (w) => {
883
- g(w.target.value), v("");
884
- }, children: l.map((w) => /* @__PURE__ */ e("option", { value: w.id, children: w.name }, w.id)) })
884
+ /* @__PURE__ */ o("div", { className: "cms-file-picker__top", children: [
885
+ l.length > 1 ? /* @__PURE__ */ o("label", { className: "cms-file-picker__space", children: [
886
+ /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: u.space }),
887
+ /* @__PURE__ */ e("select", { className: "cms-input cms-select", value: i, onChange: (y) => {
888
+ v(y.target.value), w("");
889
+ }, children: l.map((y) => /* @__PURE__ */ e("option", { value: y.id, children: y.name }, y.id)) })
885
890
  ] }) : null,
886
- /* @__PURE__ */ c("nav", { className: "cms-file-picker__path", "aria-label": d.path, children: [
887
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d.up, disabled: f === "", onClick: ue, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
888
- /* @__PURE__ */ c("ol", { children: [
889
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": f === "" ? "location" : void 0, onClick: () => v(""), children: ve }) }),
890
- be.map((w, C) => {
891
- const Z = be.slice(0, C + 1).join("/");
892
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": Z === f ? "location" : void 0, onClick: () => v(Z), children: w }) }, Z);
891
+ /* @__PURE__ */ o("nav", { className: "cms-file-picker__path", "aria-label": u.path, children: [
892
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": u.up, disabled: h === "", onClick: ue, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
893
+ /* @__PURE__ */ o("ol", { children: [
894
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": h === "" ? "location" : void 0, onClick: () => w(""), children: ve }) }),
895
+ _e.map((y, S) => {
896
+ const Z = _e.slice(0, S + 1).join("/");
897
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": Z === h ? "location" : void 0, onClick: () => w(Z), children: y }) }, Z);
893
898
  })
894
899
  ] })
895
900
  ] }),
896
- W.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": I, onClick: () => K((w) => !w), children: d.selected(W.length) }) : null
901
+ W.length > 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": I, onClick: () => K((y) => !y), children: u.selected(W.length) }) : null
897
902
  ] }),
898
- I && W.length > 0 ? /* @__PURE__ */ c("div", { className: "cms-file-picker__chosen", children: [
899
- /* @__PURE__ */ e("ul", { children: [...M.entries()].map(([w, C]) => /* @__PURE__ */ c("li", { children: [
900
- /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: C.name }),
901
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": d.remove(C.name), onClick: () => Ce(w), children: /* @__PURE__ */ e(re, { name: "close" }) })
902
- ] }, w)) }),
903
+ I && W.length > 0 ? /* @__PURE__ */ o("div", { className: "cms-file-picker__chosen", children: [
904
+ /* @__PURE__ */ e("ul", { children: [...M.entries()].map(([y, S]) => /* @__PURE__ */ o("li", { children: [
905
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: S.name }),
906
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button", "aria-label": u.remove(S.name), onClick: () => Ce(y), children: /* @__PURE__ */ e(ae, { name: "close" }) })
907
+ ] }, y)) }),
903
908
  /* @__PURE__ */ e(De, { variant: "secondary", onClick: () => {
904
909
  E(/* @__PURE__ */ new Map()), K(!1);
905
- }, children: d.clear })
910
+ }, children: u.clear })
906
911
  ] }) : null,
907
- /* @__PURE__ */ c("div", { className: "cms-file-picker__list", onScroll: (w) => {
908
- const C = w.currentTarget;
909
- C.scrollTop + C.clientHeight >= C.scrollHeight - tt && U();
912
+ /* @__PURE__ */ o("div", { className: "cms-file-picker__list", onScroll: (y) => {
913
+ const S = y.currentTarget;
914
+ S.scrollTop + S.clientHeight >= S.scrollHeight - tt && U();
910
915
  }, children: [
911
- u.status === "loading" ? /* @__PURE__ */ e(Le, { kind: "loading", title: d.loading, placement: "block" }) : null,
912
- u.status === "error" ? /* @__PURE__ */ e(Le, { kind: "error", title: d.error, placement: "block", action: { label: d.retry, onAction: () => {
913
- k.current = !1, T((w) => w + 1);
916
+ r.status === "loading" ? /* @__PURE__ */ e(Le, { kind: "loading", title: u.loading, placement: "page" }) : null,
917
+ r.status === "error" ? /* @__PURE__ */ e(Le, { kind: "error", title: u.error, placement: "page", action: { label: u.retry, onAction: () => {
918
+ k.current = !1, x((y) => y + 1);
914
919
  } } }) : null,
915
- u.status === "denied" ? /* @__PURE__ */ e(Le, { kind: "denied", title: d.denied, placement: "block" }) : null,
916
- u.status === "ready" && pe.length === 0 ? /* @__PURE__ */ e(Le, { kind: "empty", title: d.empty, placement: "block" }) : null,
917
- /* @__PURE__ */ c(
920
+ r.status === "denied" ? /* @__PURE__ */ e(Le, { kind: "denied", title: u.denied, placement: "page" }) : null,
921
+ r.status === "ready" && pe.length === 0 ? /* @__PURE__ */ e(Le, { kind: "empty", title: u.empty, placement: "page" }) : null,
922
+ /* @__PURE__ */ o(
918
923
  "div",
919
924
  {
920
925
  ref: z,
921
926
  role: "listbox",
922
927
  "aria-multiselectable": "true",
923
- "aria-label": d.files,
924
- "aria-activedescendant": pe.length > 0 ? ye(_) : void 0,
928
+ "aria-label": u.files,
929
+ "aria-activedescendant": pe.length > 0 ? ye(b) : void 0,
925
930
  tabIndex: 0,
926
931
  className: "cms-file-picker__entries",
927
- hidden: u.status !== "ready" || pe.length === 0,
932
+ hidden: r.status !== "ready" || pe.length === 0,
928
933
  onKeyDown: le,
929
934
  children: [
930
- pe.map((w, C) => {
931
- const Z = w.kind === "file" && M.has(Xe(i, w.id)), G = ce(w);
932
- return /* @__PURE__ */ c(
935
+ pe.map((y, S) => {
936
+ const Z = y.kind === "file" && M.has(Xe(i, y.id)), G = ce(y);
937
+ return /* @__PURE__ */ o(
933
938
  "div",
934
939
  {
935
- id: ye(C),
940
+ id: ye(S),
936
941
  role: "option",
937
- "aria-selected": w.kind === "file" ? Z : void 0,
942
+ "aria-selected": y.kind === "file" ? Z : void 0,
938
943
  "aria-disabled": G !== null || void 0,
939
- className: H("cms-file-picker__entry", C === _ && "is-active", Z && "is-ticked", G !== null && "is-disabled"),
944
+ className: H("cms-file-picker__entry", S === b && "is-active", Z && "is-ticked", G !== null && "is-disabled"),
940
945
  onClick: () => {
941
- N(C), w.kind === "folder" ? oe(w) : _e(w);
946
+ N(S), y.kind === "folder" ? oe(y) : be(y);
942
947
  },
943
948
  children: [
944
949
  /* @__PURE__ */ e("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: Z ? /* @__PURE__ */ e(B, { name: "check" }) : null }),
945
- /* @__PURE__ */ e(B, { name: w.kind === "folder" ? "folder" : "file" }),
946
- /* @__PURE__ */ c("span", { className: "cms-file-picker__text", children: [
947
- /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: w.name }),
950
+ /* @__PURE__ */ e(B, { name: y.kind === "folder" ? "folder" : "file" }),
951
+ /* @__PURE__ */ o("span", { className: "cms-file-picker__text", children: [
952
+ /* @__PURE__ */ e("span", { className: "cms-file-picker__name", children: y.name }),
948
953
  G !== null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__reason", children: G }) : null
949
954
  ] }),
950
- w.kind === "file" && w.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: h(w.size) }) : null
955
+ y.kind === "file" && y.size != null ? /* @__PURE__ */ e("span", { className: "cms-file-picker__size", children: f(y.size) }) : null
951
956
  ]
952
957
  },
953
- w.id
958
+ y.id
954
959
  );
955
960
  }),
956
- u.status === "ready" && u.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(Le, { kind: "loading", title: d.loading, placement: "inline" }) }) : null
961
+ r.status === "ready" && r.paging ? /* @__PURE__ */ e("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ e(Le, { kind: "loading", title: u.loading, placement: "inline" }) }) : null
957
962
  ]
958
963
  }
959
964
  )
@@ -971,250 +976,250 @@ function lt(n, t) {
971
976
  return t.scrollTop <= 0;
972
977
  }
973
978
  function st(n, t) {
974
- const [l, r] = D(0), s = P(t);
975
- return s.current = t, ee(() => {
976
- const a = n.current;
977
- if (a === null) return;
978
- let h = null, d = 0;
979
- const m = (g) => {
980
- h = lt(g.target, a) && g.touches.length === 1 ? g.touches[0].clientY : null, d = 0;
981
- }, b = (g) => {
982
- if (h === null || s.current === null) return;
983
- const f = g.touches[0].clientY - h;
984
- if (f <= 0) {
985
- h = null, r(0);
979
+ const [l, s] = D(0), a = P(t);
980
+ return a.current = t, ee(() => {
981
+ const c = n.current;
982
+ if (c === null) return;
983
+ let f = null, u = 0;
984
+ const m = (v) => {
985
+ f = lt(v.target, c) && v.touches.length === 1 ? v.touches[0].clientY : null, u = 0;
986
+ }, _ = (v) => {
987
+ if (f === null || a.current === null) return;
988
+ const h = v.touches[0].clientY - f;
989
+ if (h <= 0) {
990
+ f = null, s(0);
986
991
  return;
987
992
  }
988
- g.cancelable && g.preventDefault(), d = Math.min(f * 0.6, Qe * 1.5), r(d);
993
+ v.cancelable && v.preventDefault(), u = Math.min(h * 0.6, Qe * 1.5), s(u);
989
994
  }, i = () => {
990
- var g;
991
- h !== null && d >= Qe && ((g = s.current) == null || g.call(s)), h = null, d = 0, r(0);
995
+ var v;
996
+ f !== null && u >= Qe && ((v = a.current) == null || v.call(a)), f = null, u = 0, s(0);
992
997
  };
993
- return a.addEventListener("touchstart", m, { passive: !0 }), a.addEventListener("touchmove", b, { passive: !1 }), a.addEventListener("touchend", i), a.addEventListener("touchcancel", i), () => {
994
- a.removeEventListener("touchstart", m), a.removeEventListener("touchmove", b), a.removeEventListener("touchend", i), a.removeEventListener("touchcancel", i);
998
+ return c.addEventListener("touchstart", m, { passive: !0 }), c.addEventListener("touchmove", _, { passive: !1 }), c.addEventListener("touchend", i), c.addEventListener("touchcancel", i), () => {
999
+ c.removeEventListener("touchstart", m), c.removeEventListener("touchmove", _), c.removeEventListener("touchend", i), c.removeEventListener("touchcancel", i);
995
1000
  };
996
1001
  }, [n]), l;
997
1002
  }
998
- const Mn = In(null);
999
- function rt() {
1000
- return Dn(Mn);
1001
- }
1002
- function Xt({ label: n, rows: t, error: l, onRetry: r, loadingText: s = "Loading", emptyTitle: a = "Nothing here yet", emptyHint: h, selected: d, onOpen: m, onRowMenu: b }) {
1003
- const i = P([]), g = rt();
1004
- if (l != null) return /* @__PURE__ */ e(Wn, { message: l, onRetry: r });
1005
- if (t === null) return /* @__PURE__ */ e(Un, { what: s, layout: "block" });
1006
- if (t.length === 0) return /* @__PURE__ */ e(Kn, { title: a, hint: h });
1007
- const f = (v, u, y) => {
1008
- var S;
1009
- if (v.key === "ArrowDown" || v.key === "ArrowUp")
1010
- v.preventDefault(), (S = i.current[Math.min(t.length - 1, Math.max(0, u + (v.key === "ArrowDown" ? 1 : -1)))]) == null || S.focus();
1011
- else if (v.key === "Enter")
1012
- m == null || m(y);
1013
- else if ((v.key === "ContextMenu" || v.shiftKey && v.key === "F10") && b) {
1014
- v.preventDefault();
1015
- const T = v.currentTarget.getBoundingClientRect();
1016
- b(y, { x: T.left + 16, y: T.bottom });
1003
+ const Cn = $n(null);
1004
+ function at() {
1005
+ return In(Cn);
1006
+ }
1007
+ function Xt({ label: n, rows: t, error: l, onRetry: s, loadingText: a = "Loading", emptyTitle: c = "Nothing here yet", emptyHint: f, emptyIcon: u, selected: m, onOpen: _, onRowMenu: i }) {
1008
+ const v = P([]), h = at();
1009
+ if (l != null) return /* @__PURE__ */ e(Wn, { message: l, onRetry: s });
1010
+ if (t === null) return /* @__PURE__ */ e(Un, { what: a, layout: "block" });
1011
+ if (t.length === 0) return /* @__PURE__ */ e(Kn, { title: c, hint: f, ...u === void 0 ? {} : { icon: u } });
1012
+ const w = (r, g, T) => {
1013
+ var x;
1014
+ if (r.key === "ArrowDown" || r.key === "ArrowUp")
1015
+ r.preventDefault(), (x = v.current[Math.min(t.length - 1, Math.max(0, g + (r.key === "ArrowDown" ? 1 : -1)))]) == null || x.focus();
1016
+ else if (r.key === "Enter")
1017
+ _ == null || _(T);
1018
+ else if ((r.key === "ContextMenu" || r.shiftKey && r.key === "F10") && i) {
1019
+ r.preventDefault();
1020
+ const M = r.currentTarget.getBoundingClientRect();
1021
+ i(T, { x: M.left + 16, y: M.bottom });
1017
1022
  }
1018
1023
  };
1019
- return /* @__PURE__ */ c($, { children: [
1020
- g !== null && (g.distance > 0 || g.refreshing) ? /* @__PURE__ */ c("div", { className: "cms-list__pull", role: "status", style: { height: g.refreshing ? void 0 : g.distance }, "data-ready": g.distance >= Qe ? "" : void 0, children: [
1021
- g.refreshing ? /* @__PURE__ */ e(re, { name: "spinner" }) : null,
1022
- g.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: g.text }) : null
1024
+ return /* @__PURE__ */ o($, { children: [
1025
+ h !== null && (h.distance > 0 || h.refreshing) ? /* @__PURE__ */ o("div", { className: "cms-list__pull", role: "status", style: { height: h.refreshing ? void 0 : h.distance }, "data-ready": h.distance >= Qe ? "" : void 0, children: [
1026
+ h.refreshing ? /* @__PURE__ */ e(ae, { name: "spinner" }) : null,
1027
+ h.text != null ? /* @__PURE__ */ e("span", { className: "cms-list__pull-text", children: h.text }) : null
1023
1028
  ] }) : null,
1024
- /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: t.map((v, u) => {
1025
- const y = v.id === d;
1026
- return /* @__PURE__ */ c(
1029
+ /* @__PURE__ */ e("ul", { className: "cms-list", role: "listbox", "aria-label": n, children: t.map((r, g) => {
1030
+ const T = r.id === m;
1031
+ return /* @__PURE__ */ o(
1027
1032
  "li",
1028
1033
  {
1029
- ref: (S) => {
1030
- i.current[u] = S;
1034
+ ref: (x) => {
1035
+ v.current[g] = x;
1031
1036
  },
1032
1037
  role: "option",
1033
- "aria-selected": y,
1034
- tabIndex: y || d == null && u === 0 ? 0 : -1,
1035
- className: H("cms-list__row", y && "is-selected"),
1036
- onClick: () => m == null ? void 0 : m(v.id),
1037
- onKeyDown: (S) => f(S, u, v.id),
1038
- onContextMenu: b ? (S) => {
1039
- S.preventDefault(), b(v.id, { x: S.clientX, y: S.clientY });
1038
+ "aria-selected": T,
1039
+ tabIndex: T || m == null && g === 0 ? 0 : -1,
1040
+ className: H("cms-list__row", T && "is-selected"),
1041
+ onClick: () => _ == null ? void 0 : _(r.id),
1042
+ onKeyDown: (x) => w(x, g, r.id),
1043
+ onContextMenu: i ? (x) => {
1044
+ x.preventDefault(), i(r.id, { x: x.clientX, y: x.clientY });
1040
1045
  } : void 0,
1041
1046
  children: [
1042
- v.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: v.lead }) : null,
1043
- /* @__PURE__ */ c("span", { className: "cms-list__text", children: [
1044
- /* @__PURE__ */ e("span", { className: H("cms-list__primary", v.unread === !0 && "is-unread"), children: v.primary }),
1045
- v.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: v.secondary }) : null
1047
+ r.lead != null ? /* @__PURE__ */ e("span", { className: "cms-list__lead", children: r.lead }) : null,
1048
+ /* @__PURE__ */ o("span", { className: "cms-list__text", children: [
1049
+ /* @__PURE__ */ e("span", { className: H("cms-list__primary", r.unread === !0 && "is-unread"), children: r.primary }),
1050
+ r.secondary != null ? /* @__PURE__ */ e("span", { className: "cms-list__secondary", children: r.secondary }) : null
1046
1051
  ] }),
1047
- v.meta != null || v.count !== void 0 ? /* @__PURE__ */ c("span", { className: "cms-list__end", children: [
1048
- v.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: v.meta }) : null,
1049
- v.count !== void 0 && v.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: v.count }) : null
1052
+ r.meta != null || r.count !== void 0 ? /* @__PURE__ */ o("span", { className: "cms-list__end", children: [
1053
+ r.meta != null ? /* @__PURE__ */ e("span", { className: "cms-list__meta", children: r.meta }) : null,
1054
+ r.count !== void 0 && r.count > 0 ? /* @__PURE__ */ e("span", { className: "cms-badge cms-list__count", children: r.count }) : null
1050
1055
  ] }) : null
1051
1056
  ]
1052
1057
  },
1053
- v.id
1058
+ r.id
1054
1059
  );
1055
1060
  }) })
1056
1061
  ] });
1057
1062
  }
1058
- function Ke({ at: n, items: t, onClose: l, label: r = "Actions", focus: s = "current" }) {
1059
- const a = P(null), h = P(null), d = fe(), [m, b] = D(n), i = t.filter((u) => u.offer.offered);
1063
+ function Ke({ at: n, items: t, onClose: l, label: s = "Actions", focus: a = "current" }) {
1064
+ const c = P(null), f = P(null), u = fe(), [m, _] = D(n), i = t.filter((r) => r.offer.offered);
1060
1065
  if ($e(() => {
1061
1066
  if (!n) return;
1062
- const u = a.current, y = (u == null ? void 0 : u.offsetWidth) ?? 0, S = (u == null ? void 0 : u.offsetHeight) ?? 0;
1063
- b({ x: Math.max(0, Math.min(n.x, window.innerWidth - y)), y: Math.max(0, Math.min(n.y, window.innerHeight - S)) });
1067
+ const r = c.current, g = (r == null ? void 0 : r.offsetWidth) ?? 0, T = (r == null ? void 0 : r.offsetHeight) ?? 0;
1068
+ _({ x: Math.max(0, Math.min(n.x, window.innerWidth - g)), y: Math.max(0, Math.min(n.y, window.innerHeight - T)) });
1064
1069
  }, [n]), ee(() => {
1065
- var T, M;
1070
+ var x, M;
1066
1071
  if (!n) return;
1067
- h.current = document.activeElement;
1068
- const u = Array.from(((T = a.current) == null ? void 0 : T.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), y = s === "current" ? u.find((E) => E.getAttribute("aria-checked") === "true") : void 0;
1069
- (M = s === "last" ? u[u.length - 1] : y ?? u[0]) == null || M.focus();
1070
- const S = (E) => {
1071
- var _;
1072
- (_ = a.current) != null && _.contains(E.target) || l();
1072
+ f.current = document.activeElement;
1073
+ const r = Array.from(((x = c.current) == null ? void 0 : x.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), g = a === "current" ? r.find((E) => E.getAttribute("aria-checked") === "true") : void 0;
1074
+ (M = a === "last" ? r[r.length - 1] : g ?? r[0]) == null || M.focus();
1075
+ const T = (E) => {
1076
+ var b;
1077
+ (b = c.current) != null && b.contains(E.target) || l();
1073
1078
  };
1074
- return document.addEventListener("mousedown", S), () => {
1075
- var E, _;
1076
- document.removeEventListener("mousedown", S), (_ = (E = h.current) == null ? void 0 : E.focus) == null || _.call(E);
1079
+ return document.addEventListener("mousedown", T), () => {
1080
+ var E, b;
1081
+ document.removeEventListener("mousedown", T), (b = (E = f.current) == null ? void 0 : E.focus) == null || b.call(E);
1077
1082
  };
1078
- }, [n, l, s]), !n || i.length === 0) return null;
1079
- const g = (u) => {
1080
- var T, M;
1081
- const y = Array.from(((T = a.current) == null ? void 0 : T.querySelectorAll('[role^="menuitem"]')) ?? []), S = y.indexOf(document.activeElement);
1082
- if (u.key === "Escape" || u.key === "Tab")
1083
- u.preventDefault(), l();
1084
- else if (u.key === "ArrowDown" || u.key === "ArrowUp") {
1085
- u.preventDefault();
1086
- const E = u.key === "ArrowDown" ? 1 : -1;
1087
- (M = y[(S + E + y.length) % y.length]) == null || M.focus();
1083
+ }, [n, l, a]), !n || i.length === 0) return null;
1084
+ const v = (r) => {
1085
+ var x, M;
1086
+ const g = Array.from(((x = c.current) == null ? void 0 : x.querySelectorAll('[role^="menuitem"]')) ?? []), T = g.indexOf(document.activeElement);
1087
+ if (r.key === "Escape" || r.key === "Tab")
1088
+ r.preventDefault(), l();
1089
+ else if (r.key === "ArrowDown" || r.key === "ArrowUp") {
1090
+ r.preventDefault();
1091
+ const E = r.key === "ArrowDown" ? 1 : -1;
1092
+ (M = g[(T + E + g.length) % g.length]) == null || M.focus();
1088
1093
  }
1089
- }, f = (u) => {
1090
- const y = u.offer.refusal !== void 0;
1091
- return /* @__PURE__ */ c(
1094
+ }, h = (r) => {
1095
+ const g = r.offer.refusal !== void 0;
1096
+ return /* @__PURE__ */ o(
1092
1097
  "div",
1093
1098
  {
1094
- role: u.checked === void 0 ? "menuitem" : "menuitemradio",
1095
- "aria-checked": u.checked,
1099
+ role: r.checked === void 0 ? "menuitem" : "menuitemradio",
1100
+ "aria-checked": r.checked,
1096
1101
  tabIndex: -1,
1097
- "aria-disabled": y || void 0,
1098
- "aria-describedby": y ? `${d}-${u.id}` : void 0,
1099
- title: y ? u.offer.refusal : void 0,
1100
- className: H("cms-menu__item", u.danger && "is-danger", u.offer.locked && "is-locked", y && "is-refused"),
1102
+ "aria-disabled": g || void 0,
1103
+ "aria-describedby": g ? `${u}-${r.id}` : void 0,
1104
+ title: g ? r.offer.refusal : void 0,
1105
+ className: H("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", g && "is-refused"),
1101
1106
  onClick: () => {
1102
- y || (l(), u.onSelect());
1107
+ g || (l(), r.onSelect());
1103
1108
  },
1104
- onKeyDown: (S) => {
1105
- (S.key === "Enter" || S.key === " ") && !y && (S.preventDefault(), l(), u.onSelect());
1109
+ onKeyDown: (T) => {
1110
+ (T.key === "Enter" || T.key === " ") && !g && (T.preventDefault(), l(), r.onSelect());
1106
1111
  },
1107
1112
  children: [
1108
- u.checked !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-menu__check", children: u.checked ? /* @__PURE__ */ e(re, { name: "check" }) : null }) : null,
1109
- u.offer.locked ? /* @__PURE__ */ e(re, { name: "lock" }) : null,
1110
- /* @__PURE__ */ e("span", { className: "cms-menu__label", children: u.label }),
1111
- y ? /* @__PURE__ */ e("span", { id: `${d}-${u.id}`, className: "cms-menu__refusal", children: u.offer.refusal }) : null
1113
+ r.checked !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-menu__check", children: r.checked ? /* @__PURE__ */ e(ae, { name: "check" }) : null }) : null,
1114
+ r.offer.locked ? /* @__PURE__ */ e(ae, { name: "lock" }) : null,
1115
+ /* @__PURE__ */ e("span", { className: "cms-menu__label", children: r.label }),
1116
+ g ? /* @__PURE__ */ e("span", { id: `${u}-${r.id}`, className: "cms-menu__refusal", children: r.offer.refusal }) : null
1112
1117
  ]
1113
1118
  },
1114
- u.id
1119
+ r.id
1115
1120
  );
1116
- }, v = [];
1117
- for (const u of i) {
1118
- const y = v[v.length - 1];
1119
- y !== void 0 && y.group === u.group ? y.items.push(u) : v.push({ group: u.group, items: [u] });
1121
+ }, w = [];
1122
+ for (const r of i) {
1123
+ const g = w[w.length - 1];
1124
+ g !== void 0 && g.group === r.group ? g.items.push(r) : w.push({ group: r.group, items: [r] });
1120
1125
  }
1121
1126
  return ln(
1122
1127
  /* @__PURE__ */ e(
1123
1128
  "div",
1124
1129
  {
1125
- ref: a,
1130
+ ref: c,
1126
1131
  className: "cms-menu",
1127
1132
  role: "menu",
1128
- "aria-label": r,
1133
+ "aria-label": s,
1129
1134
  style: { left: (m ?? n).x, top: (m ?? n).y },
1130
- onKeyDown: g,
1131
- onContextMenu: (u) => u.preventDefault(),
1132
- children: v.map((u, y) => /* @__PURE__ */ c($n, { children: [
1133
- y > 0 ? /* @__PURE__ */ e("div", { className: "cms-menu__separator", role: "separator" }) : null,
1134
- u.group === void 0 ? u.items.map(f) : /* @__PURE__ */ c("div", { role: "group", "aria-label": u.group, children: [
1135
- /* @__PURE__ */ e("div", { className: "cms-menu__group", "aria-hidden": "true", children: u.group }),
1136
- u.items.map(f)
1135
+ onKeyDown: v,
1136
+ onContextMenu: (r) => r.preventDefault(),
1137
+ children: w.map((r, g) => /* @__PURE__ */ o(Bn, { children: [
1138
+ g > 0 ? /* @__PURE__ */ e("div", { className: "cms-menu__separator", role: "separator" }) : null,
1139
+ r.group === void 0 ? r.items.map(h) : /* @__PURE__ */ o("div", { role: "group", "aria-label": r.group, children: [
1140
+ /* @__PURE__ */ e("div", { className: "cms-menu__group", "aria-hidden": "true", children: r.group }),
1141
+ r.items.map(h)
1137
1142
  ] })
1138
- ] }, y))
1143
+ ] }, g))
1139
1144
  }
1140
1145
  ),
1141
1146
  document.body
1142
1147
  );
1143
1148
  }
1144
- function an() {
1145
- const [n, t] = D(/* @__PURE__ */ new Set()), [l, r] = D(null), s = P(null), a = P(null), h = (m) => t((b) => b.has(m) ? b : /* @__PURE__ */ new Set([...b, m])), d = (m) => t((b) => {
1146
- if (!b.has(m)) return b;
1147
- const i = new Set(b);
1149
+ function rn() {
1150
+ const [n, t] = D(/* @__PURE__ */ new Set()), [l, s] = D(null), a = P(null), c = P(null), f = (m) => t((_) => _.has(m) ? _ : /* @__PURE__ */ new Set([..._, m])), u = (m) => t((_) => {
1151
+ if (!_.has(m)) return _;
1152
+ const i = new Set(_);
1148
1153
  return i.delete(m), i;
1149
1154
  });
1150
1155
  return ee(() => {
1151
1156
  if (l === null) return;
1152
- const m = (b) => {
1153
- b.key === "Escape" && h(l);
1157
+ const m = (_) => {
1158
+ _.key === "Escape" && f(l);
1154
1159
  };
1155
1160
  return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
1156
1161
  }, [l]), {
1157
1162
  dismissed: (m) => n.has(m),
1158
- dismiss: h,
1159
- show: d,
1163
+ dismiss: f,
1164
+ show: u,
1160
1165
  pointerIn: (m) => {
1161
- a.current = m, r(m);
1166
+ c.current = m, s(m);
1162
1167
  },
1163
1168
  pointerOut: (m) => {
1164
- a.current === m && (a.current = null), r((b) => b === m ? null : b), s.current !== m && d(m);
1169
+ c.current === m && (c.current = null), s((_) => _ === m ? null : _), a.current !== m && u(m);
1165
1170
  },
1166
1171
  focusIn: (m) => {
1167
- s.current = m;
1172
+ a.current = m;
1168
1173
  },
1169
1174
  focusOut: (m) => {
1170
- s.current === m && (s.current = null), a.current !== m && d(m);
1175
+ a.current === m && (a.current = null), c.current !== m && u(m);
1171
1176
  }
1172
1177
  };
1173
1178
  }
1174
- function at(n, t, l) {
1179
+ function rt(n, t, l) {
1175
1180
  return Math.min(Math.max(n - l / 2, 0), Math.max(0, t - l));
1176
1181
  }
1177
- const _n = /* @__PURE__ */ new Set(), vn = { descriptionHidden: !1, elsewhereHidden: !1, titleCut: !1, titleFloor: 0, bare: _n, primaryBare: !1, hidden: _n, primaryHidden: !1, chipsCut: !1 }, gn = (n, t) => n.size === t.size && [...n].every((l) => t.has(l)), it = (n, t) => n.descriptionHidden === t.descriptionHidden && n.elsewhereHidden === t.elsewhereHidden && n.titleCut === t.titleCut && n.titleFloor === t.titleFloor && gn(n.bare, t.bare) && n.primaryBare === t.primaryBare && gn(n.hidden, t.hidden) && n.primaryHidden === t.primaryHidden && n.chipsCut === t.chipsCut, ct = 64, Ae = "primary";
1178
- function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secondary: a, more: h = [], moreLabel: d, context: m, fullWidth: b = !1 }) {
1182
+ const bn = /* @__PURE__ */ new Set(), vn = { descriptionHidden: !1, elsewhereHidden: !1, titleCut: !1, titleFloor: 0, bare: bn, primaryBare: !1, hidden: bn, primaryHidden: !1, chipsCut: !1 }, gn = (n, t) => n.size === t.size && [...n].every((l) => t.has(l)), it = (n, t) => n.descriptionHidden === t.descriptionHidden && n.elsewhereHidden === t.elsewhereHidden && n.titleCut === t.titleCut && n.titleFloor === t.titleFloor && gn(n.bare, t.bare) && n.primaryBare === t.primaryBare && gn(n.hidden, t.hidden) && n.primaryHidden === t.primaryHidden && n.chipsCut === t.chipsCut, ct = 64, Ae = "primary";
1183
+ function Jt({ title: n, icon: t, description: l, meta: s = [], primary: a, secondary: c, more: f = [], moreLabel: u, context: m, fullWidth: _ = !1 }) {
1179
1184
  var J, Ne, de;
1180
- const [i, g] = D(null), [f, v] = D(vn), [u, y] = D(null), [S, T] = D(null), M = an(), E = P(null), _ = P(null), N = P(null), I = fe(), K = fe(), z = [
1181
- ...(a ?? []).map((o) => ({
1182
- id: o.id,
1183
- label: o.label,
1184
- name: o.label,
1185
- icon: o.icon === void 0 ? null : Ue(o.icon),
1186
- overflow: o.overflow,
1187
- danger: o.danger === !0,
1188
- offer: o.offer ?? { offered: !0, locked: !1 },
1189
- run: o.onPress
1185
+ const [i, v] = D(null), [h, w] = D(vn), [r, g] = D(null), [T, x] = D(null), M = rn(), E = P(null), b = P(null), N = P(null), I = fe(), K = fe(), z = [
1186
+ ...(c ?? []).map((d) => ({
1187
+ id: d.id,
1188
+ label: d.label,
1189
+ name: d.label,
1190
+ icon: d.icon === void 0 ? null : Be(d.icon),
1191
+ overflow: d.overflow,
1192
+ danger: d.danger === !0,
1193
+ offer: d.offer ?? { offered: !0, locked: !1 },
1194
+ run: d.onPress
1190
1195
  })),
1191
- ...h.map((o) => ({
1192
- id: o.id,
1193
- label: o.label,
1194
- name: typeof o.label == "string" ? o.label : o.id,
1196
+ ...f.map((d) => ({
1197
+ id: d.id,
1198
+ label: d.label,
1199
+ name: typeof d.label == "string" ? d.label : d.id,
1195
1200
  icon: null,
1196
1201
  overflow: void 0,
1197
- danger: o.danger === !0,
1198
- offer: o.offer,
1199
- run: o.onSelect
1202
+ danger: d.danger === !0,
1203
+ offer: d.offer,
1204
+ run: d.onSelect
1200
1205
  }))
1201
- ].filter((o) => o.offer.offered), k = z.filter((o) => o.overflow === 0), F = z.filter((o) => o.overflow !== 0), U = k.length === 1 ? k[0] ?? null : null, Y = ot(F), W = F.filter((o) => o.overflow === void 0).map((o) => o.id).reverse(), j = [...Y, ...W.map((o) => [o])], X = [...U !== null ? [[U.id]] : [], ...j], ne = s !== void 0 && ((J = s.offer) == null ? void 0 : J.offered) !== !1, ce = (Ne = s == null ? void 0 : s.offer) == null ? void 0 : Ne.refusal, _e = s !== void 0 && (((de = s.offer) == null ? void 0 : de.offered) === !1 || ce !== void 0), oe = s !== void 0 && "menu" in s ? s.menu.filter((o) => o.offer.offered) : [], ue = s !== void 0 && "menu" in s && oe.length > 0 ? s : null, Ce = r.filter((o) => o.elsewhere === !0), pe = JSON.stringify([
1206
+ ].filter((d) => d.offer.offered), k = z.filter((d) => d.overflow === 0), F = z.filter((d) => d.overflow !== 0), U = k.length === 1 ? k[0] ?? null : null, Y = ot(F), W = F.filter((d) => d.overflow === void 0).map((d) => d.id).reverse(), j = [...Y, ...W.map((d) => [d])], X = [...U !== null ? [[U.id]] : [], ...j], ne = a !== void 0 && ((J = a.offer) == null ? void 0 : J.offered) !== !1, ce = (Ne = a == null ? void 0 : a.offer) == null ? void 0 : Ne.refusal, be = a !== void 0 && (((de = a.offer) == null ? void 0 : de.offered) === !1 || ce !== void 0), oe = a !== void 0 && "menu" in a ? a.menu.filter((d) => d.offer.offered) : [], ue = a !== void 0 && "menu" in a && oe.length > 0 ? a : null, Ce = s.filter((d) => d.elsewhere === !0), pe = JSON.stringify([
1202
1207
  n,
1203
1208
  t ?? null,
1204
1209
  l ?? null,
1205
- r.map((o) => [o.id, o.text, o.elsewhere === !0]),
1206
- ne ? [s.label, s.icon, ue !== null] : null,
1207
- z.map((o) => [o.id, o.name, o.icon, o.overflow ?? null])
1210
+ s.map((d) => [d.id, d.text, d.elsewhere === !0]),
1211
+ ne ? [a.label, a.icon, ue !== null] : null,
1212
+ z.map((d) => [d.id, d.name, d.icon, d.overflow ?? null])
1208
1213
  ]), le = Ie(() => {
1209
- const o = E.current, A = _.current;
1210
- if (o === null || A === null) return;
1211
- const x = getComputedStyle(o), O = parseFloat(x.columnGap || "0") || 0, se = o.clientWidth - (parseFloat(x.paddingLeft) || 0) - (parseFloat(x.paddingRight) || 0), Q = (ie) => {
1214
+ const d = E.current, A = b.current;
1215
+ if (d === null || A === null) return;
1216
+ const C = getComputedStyle(d), O = parseFloat(C.columnGap || "0") || 0, se = d.clientWidth - (parseFloat(C.paddingLeft) || 0) - (parseFloat(C.paddingRight) || 0), Q = (ie) => {
1212
1217
  var Me;
1213
1218
  return ((Me = A.querySelector(ie)) == null ? void 0 : Me.getBoundingClientRect().width) ?? 0;
1214
- }, ke = Q('[data-measure="title"]'), Fe = Math.min(ke, ct), He = (ie) => {
1215
- const Me = be(ie), xe = [];
1216
- t !== void 0 && xe.push(Q('[data-measure="lead"]')), xe.push(ie.titleCut ? Fe : ke), l !== void 0 && !ie.descriptionHidden && xe.push(Q('[data-measure="description"]'));
1217
- for (const ge of r) ge.elsewhere === !0 && ie.elsewhereHidden || xe.push(Q(`[data-measure="meta"][data-measure-id="${CSS.escape(ge.id)}"]`));
1219
+ }, ke = Q('[data-measure="title"]'), He = Math.min(ke, ct), Re = (ie) => {
1220
+ const Me = _e(ie), xe = [];
1221
+ t !== void 0 && xe.push(Q('[data-measure="lead"]')), xe.push(ie.titleCut ? He : ke), l !== void 0 && !ie.descriptionHidden && xe.push(Q('[data-measure="description"]'));
1222
+ for (const ge of s) ge.elsewhere === !0 && ie.elsewhereHidden || xe.push(Q(`[data-measure="meta"][data-measure-id="${CSS.escape(ge.id)}"]`));
1218
1223
  for (const ge of z) {
1219
1224
  if (Me.has(ge.id)) continue;
1220
1225
  const Ze = ie.bare.has(ge.id) && ge.icon !== null;
@@ -1222,183 +1227,183 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
1222
1227
  }
1223
1228
  return ne && !ie.primaryHidden && xe.push(Q(`[data-measure="${ie.primaryBare ? "primary-icon" : "primary"}"]`)), Me.size > 0 && xe.push(Q('[data-measure="more"]')), xe.reduce((ge, Ze) => ge + Ze, 0) + O * Math.max(0, xe.length - 1);
1224
1229
  };
1225
- let q = { ...vn, titleFloor: Fe };
1226
- const Re = (ie) => (q = ie, He(ie) <= se), mn = (() => {
1227
- if (Re(q) || l !== void 0 && Re({ ...q, descriptionHidden: !0 }) || (q = { ...q, descriptionHidden: !0 }, Ce.length > 0 && Re({ ...q, elsewhereHidden: !0 }))) return q;
1230
+ let q = { ...vn, titleFloor: He };
1231
+ const Oe = (ie) => (q = ie, Re(ie) <= se), mn = (() => {
1232
+ if (Oe(q) || l !== void 0 && Oe({ ...q, descriptionHidden: !0 }) || (q = { ...q, descriptionHidden: !0 }, Ce.length > 0 && Oe({ ...q, elsewhereHidden: !0 }))) return q;
1228
1233
  q = { ...q, elsewhereHidden: !0 };
1229
1234
  const ie = /* @__PURE__ */ new Set();
1230
1235
  for (const Ve of X) {
1231
1236
  for (const Ge of Ve) ie.add(Ge);
1232
- if (Re({ ...q, bare: new Set(ie) })) return q;
1237
+ if (Oe({ ...q, bare: new Set(ie) })) return q;
1233
1238
  }
1234
- if (ne && Re({ ...q, primaryBare: !0 })) return q;
1239
+ if (ne && Oe({ ...q, primaryBare: !0 })) return q;
1235
1240
  q = { ...q, primaryBare: ne };
1236
1241
  const Me = /* @__PURE__ */ new Set(), xe = [...j, ...ne ? [[Ae]] : []], ge = () => Me.size + k.length >= 2, Ze = (Ve) => ({ ...q, hidden: new Set([...Ve].filter((Ge) => Ge !== Ae)), primaryHidden: Ve.has(Ae) }), hn = q;
1237
1242
  for (const Ve of xe) {
1238
1243
  for (const Ge of Ve) Me.add(Ge);
1239
- if (ge() && Re(Ze(Me))) return q;
1244
+ if (ge() && Oe(Ze(Me))) return q;
1240
1245
  q = hn;
1241
1246
  }
1242
1247
  const fn = ge() ? Ze(Me) : hn;
1243
- return Re({ ...fn, titleCut: !0 }) ? q : { ...fn, titleCut: !0, chipsCut: !0 };
1248
+ return Oe({ ...fn, titleCut: !0 }) ? q : { ...fn, titleCut: !0, chipsCut: !0 };
1244
1249
  })();
1245
- v((ie) => it(ie, mn) ? ie : mn);
1250
+ w((ie) => it(ie, mn) ? ie : mn);
1246
1251
  }, [pe]);
1247
1252
  $e(le, [le]), ee(() => {
1248
- const o = E.current;
1249
- if (o === null || typeof ResizeObserver > "u") return;
1253
+ const d = E.current;
1254
+ if (d === null || typeof ResizeObserver > "u") return;
1250
1255
  const A = new ResizeObserver(() => le());
1251
- return A.observe(o), () => A.disconnect();
1256
+ return A.observe(d), () => A.disconnect();
1252
1257
  }, [le]), ee(() => {
1253
- const o = typeof document > "u" ? void 0 : document.fonts;
1254
- if (o === void 0) return;
1258
+ const d = typeof document > "u" ? void 0 : document.fonts;
1259
+ if (d === void 0) return;
1255
1260
  let A = !0;
1256
- const x = () => {
1261
+ const C = () => {
1257
1262
  A && le();
1258
1263
  };
1259
- return o.ready.then(x), o.addEventListener("loadingdone", x), () => {
1260
- A = !1, o.removeEventListener("loadingdone", x);
1264
+ return d.ready.then(C), d.addEventListener("loadingdone", C), () => {
1265
+ A = !1, d.removeEventListener("loadingdone", C);
1261
1266
  };
1262
1267
  }, [le]);
1263
- function be(o) {
1264
- const A = o.hidden.size + (o.primaryHidden ? 1 : 0);
1265
- return /* @__PURE__ */ new Set([...k.filter((x) => x !== U || A > 0).map((x) => x.id), ...o.hidden, ...o.primaryHidden ? [Ae] : []]);
1268
+ function _e(d) {
1269
+ const A = d.hidden.size + (d.primaryHidden ? 1 : 0);
1270
+ return /* @__PURE__ */ new Set([...k.filter((C) => C !== U || A > 0).map((C) => C.id), ...d.hidden, ...d.primaryHidden ? [Ae] : []]);
1266
1271
  }
1267
- const ve = be(f), ye = z.filter((o) => !ve.has(o.id) && o !== U), te = U !== null && !ve.has(U.id) ? U : null, we = ne && !f.primaryHidden, w = (o) => z.find((A) => A.id === o), C = j.flat().filter((o) => f.hidden.has(o)).map(w).filter((o) => o !== void 0), Z = (o) => ({ id: o.id, label: o.label, offer: o.offer, ...o.danger ? { danger: !0 } : {}, onSelect: o.run }), G = [
1268
- ...ne && f.primaryHidden ? [{ id: Ae, label: s.label, offer: s.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
1269
- _e || s.onPress();
1272
+ const ve = _e(h), ye = z.filter((d) => !ve.has(d.id) && d !== U), te = U !== null && !ve.has(U.id) ? U : null, we = ne && !h.primaryHidden, y = (d) => z.find((A) => A.id === d), S = j.flat().filter((d) => h.hidden.has(d)).map(y).filter((d) => d !== void 0), Z = (d) => ({ id: d.id, label: d.label, offer: d.offer, ...d.danger ? { danger: !0 } : {}, onSelect: d.run }), G = [
1273
+ ...ne && h.primaryHidden ? [{ id: Ae, label: a.label, offer: a.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
1274
+ be || a.onPress();
1270
1275
  } }, ...oe] : [],
1271
- ...C.map(Z),
1276
+ ...S.map(Z),
1272
1277
  ...ve.size > 0 ? k.map(Z) : []
1273
1278
  ], p = G.length > 0, L = [
1274
- ...ye.map((o) => o.id),
1279
+ ...ye.map((d) => d.id),
1275
1280
  ...te !== null ? [te.id] : [],
1276
1281
  ...we ? [Ae, ...ue !== null ? ["primary-menu"] : []] : [],
1277
1282
  ...p ? ["more"] : []
1278
- ], V = u !== null && L.includes(u) ? u : L[0] ?? null;
1283
+ ], V = r !== null && L.includes(r) ? r : L[0] ?? null;
1279
1284
  ee(() => {
1280
- var o, A;
1281
- u === null || L.includes(u) || !p || ((o = E.current) != null && o.contains(document.activeElement) || document.activeElement === document.body) && (y("more"), (A = N.current) == null || A.focus());
1282
- }, [f]);
1283
- const me = (o) => `${K}-${o}`, ae = (o) => {
1285
+ var d, A;
1286
+ r === null || L.includes(r) || !p || ((d = E.current) != null && d.contains(document.activeElement) || document.activeElement === document.body) && (g("more"), (A = N.current) == null || A.focus());
1287
+ }, [h]);
1288
+ const me = (d) => `${K}-${d}`, re = (d) => {
1284
1289
  var se;
1285
1290
  const A = L.indexOf(V ?? "");
1286
- let x = null;
1287
- if (o.key === "ArrowRight" ? x = Math.min(L.length - 1, A + 1) : o.key === "ArrowLeft" ? x = Math.max(0, A - 1) : o.key === "Home" ? x = 0 : o.key === "End" && (x = L.length - 1), x === null) return;
1288
- o.preventDefault();
1289
- const O = L[x] ?? null;
1290
- y(O), O !== null && ((se = document.getElementById(me(O))) == null || se.focus());
1291
- }, he = (o, A) => {
1292
- const x = A.getBoundingClientRect();
1293
- g((i == null ? void 0 : i.which) === o ? null : { which: o, x: x.left, y: x.bottom + 4 });
1294
- }, Se = (o) => ({ id: me(o), tabIndex: V === o ? 0 : -1, onFocus: () => y(o) }), We = (o, A, x) => A ? {
1295
- ...S === o ? { "data-reason-shown": "" } : {},
1296
- ...M.dismissed(o) ? { "data-tip-dismissed": "" } : {},
1291
+ let C = null;
1292
+ if (d.key === "ArrowRight" ? C = Math.min(L.length - 1, A + 1) : d.key === "ArrowLeft" ? C = Math.max(0, A - 1) : d.key === "Home" ? C = 0 : d.key === "End" && (C = L.length - 1), C === null) return;
1293
+ d.preventDefault();
1294
+ const O = L[C] ?? null;
1295
+ g(O), O !== null && ((se = document.getElementById(me(O))) == null || se.focus());
1296
+ }, he = (d, A) => {
1297
+ const C = A.getBoundingClientRect();
1298
+ v((i == null ? void 0 : i.which) === d ? null : { which: d, x: C.left, y: C.bottom + 4 });
1299
+ }, Se = (d) => ({ id: me(d), tabIndex: V === d ? 0 : -1, onFocus: () => g(d) }), We = (d, A, C) => A ? {
1300
+ ...T === d ? { "data-reason-shown": "" } : {},
1301
+ ...M.dismissed(d) ? { "data-tip-dismissed": "" } : {},
1297
1302
  onFocus: (O) => {
1298
- y(o), M.focusIn(o), Te(O.currentTarget, x);
1303
+ g(d), M.focusIn(d), Te(O.currentTarget, C);
1299
1304
  },
1300
1305
  onBlur: () => {
1301
- T((O) => O === o ? null : O), M.focusOut(o);
1306
+ x((O) => O === d ? null : O), M.focusOut(d);
1302
1307
  },
1303
1308
  onMouseEnter: (O) => {
1304
- M.pointerIn(o), Te(O.currentTarget, x);
1309
+ M.pointerIn(d), Te(O.currentTarget, C);
1305
1310
  },
1306
- onMouseLeave: () => M.pointerOut(o),
1311
+ onMouseLeave: () => M.pointerOut(d),
1307
1312
  onKeyDown: (O) => {
1308
- O.key === "Escape" && (T((se) => se === o ? null : se), M.dismiss(o));
1313
+ O.key === "Escape" && (x((se) => se === d ? null : se), M.dismiss(d));
1309
1314
  }
1310
- } : {}, Be = (o, A, x) => {
1311
- T(o), M.show(o), Te(A, x);
1312
- }, Te = (o, A) => {
1313
- const x = document.getElementById(A), O = E.current;
1314
- if (x === null || O === null) return;
1315
- const se = x.style.display;
1316
- x.style.display = "block";
1317
- const Q = x.offsetWidth;
1318
- x.style.display = se;
1319
- const ke = O.getBoundingClientRect(), Fe = o.getBoundingClientRect();
1320
- x.style.left = `${String(at(Fe.left + Fe.width / 2 - ke.left, ke.width, Q))}px`, x.style.right = "auto";
1321
- }, Ee = (o, A, x) => /* @__PURE__ */ c("span", { id: o, className: "cms-section-header__tip", role: "tooltip", children: [
1322
- x !== null ? /* @__PURE__ */ c("span", { "aria-hidden": "true", children: [
1323
- x,
1315
+ } : {}, Fe = (d, A, C) => {
1316
+ x(d), M.show(d), Te(A, C);
1317
+ }, Te = (d, A) => {
1318
+ const C = document.getElementById(A), O = E.current;
1319
+ if (C === null || O === null) return;
1320
+ const se = C.style.display;
1321
+ C.style.display = "block";
1322
+ const Q = C.offsetWidth;
1323
+ C.style.display = se;
1324
+ const ke = O.getBoundingClientRect(), He = d.getBoundingClientRect();
1325
+ C.style.left = `${String(rt(He.left + He.width / 2 - ke.left, ke.width, Q))}px`, C.style.right = "auto";
1326
+ }, Ee = (d, A, C) => /* @__PURE__ */ o("span", { id: d, className: "cms-section-header__tip", role: "tooltip", children: [
1327
+ C !== null ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: [
1328
+ C,
1324
1329
  ": "
1325
1330
  ] }) : null,
1326
1331
  A
1327
- ] }), R = (o) => {
1328
- const A = f.bare.has(o.id) && o.icon !== null, x = o.offer.refusal, O = `${K}-reason-${o.id}`;
1329
- return /* @__PURE__ */ c(
1332
+ ] }), R = (d) => {
1333
+ const A = h.bare.has(d.id) && d.icon !== null, C = d.offer.refusal, O = `${K}-reason-${d.id}`;
1334
+ return /* @__PURE__ */ o(
1330
1335
  "button",
1331
1336
  {
1332
1337
  type: "button",
1333
- className: H("cms-button", "cms-button--quiet", "cms-section-header__secondary", A && "cms-section-header__secondary--bare", o.danger && "is-danger"),
1334
- "data-action": o.id,
1335
- "aria-label": A || x !== void 0 ? o.name : void 0,
1336
- "aria-disabled": x !== void 0 ? "true" : void 0,
1337
- "aria-describedby": x !== void 0 ? O : void 0,
1338
- title: x === void 0 && A ? o.name : void 0,
1339
- ...Se(o.id),
1340
- ...We(o.id, x !== void 0, O),
1338
+ className: H("cms-button", "cms-button--quiet", "cms-section-header__secondary", A && "cms-section-header__secondary--bare", d.danger && "is-danger"),
1339
+ "data-action": d.id,
1340
+ "aria-label": A || C !== void 0 ? d.name : void 0,
1341
+ "aria-disabled": C !== void 0 ? "true" : void 0,
1342
+ "aria-describedby": C !== void 0 ? O : void 0,
1343
+ title: C === void 0 && A ? d.name : void 0,
1344
+ ...Se(d.id),
1345
+ ...We(d.id, C !== void 0, O),
1341
1346
  onClick: (se) => {
1342
- x === void 0 ? o.run() : Be(o.id, se.currentTarget, O);
1347
+ C === void 0 ? d.run() : Fe(d.id, se.currentTarget, O);
1343
1348
  },
1344
1349
  children: [
1345
- o.icon !== null ? /* @__PURE__ */ e(B, { name: o.icon, size: 18 }) : null,
1346
- A ? null : /* @__PURE__ */ e("span", { className: "cms-section-header__label", children: o.label }),
1347
- x !== void 0 ? Ee(O, x, A ? o.name : null) : null
1350
+ d.icon !== null ? /* @__PURE__ */ e(B, { name: d.icon, size: 18 }) : null,
1351
+ A ? null : /* @__PURE__ */ e("span", { className: "cms-section-header__label", children: d.label }),
1352
+ C !== void 0 ? Ee(O, C, A ? d.name : null) : null
1348
1353
  ]
1349
1354
  },
1350
- o.id
1355
+ d.id
1351
1356
  );
1352
1357
  };
1353
- return /* @__PURE__ */ c("header", { className: H("cms-section-header", b && "cms-section-header--full"), children: [
1354
- /* @__PURE__ */ c("div", { ref: E, className: H("cms-section-header__row", f.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1358
+ return /* @__PURE__ */ o("header", { className: H("cms-section-header", _ && "cms-section-header--full"), children: [
1359
+ /* @__PURE__ */ o("div", { ref: E, className: H("cms-section-header__row", h.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
1355
1360
  t !== void 0 ? /* @__PURE__ */ e(B, { name: t }) : null,
1356
1361
  /* @__PURE__ */ e(
1357
1362
  "h1",
1358
1363
  {
1359
1364
  className: "cms-section-header__title",
1360
1365
  title: n,
1361
- style: { minWidth: f.titleCut ? `${f.titleFloor}px` : "max-content" },
1366
+ style: { minWidth: h.titleCut ? `${h.titleFloor}px` : "max-content" },
1362
1367
  children: n
1363
1368
  }
1364
1369
  ),
1365
- l !== void 0 ? /* @__PURE__ */ e("span", { className: H("cms-section-header__description", f.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1366
- r.map((o, A) => /* @__PURE__ */ e(
1370
+ l !== void 0 ? /* @__PURE__ */ e("span", { className: H("cms-section-header__description", h.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
1371
+ s.map((d, A) => /* @__PURE__ */ e(
1367
1372
  "span",
1368
1373
  {
1369
1374
  className: "cms-section-header__meta",
1370
- "data-meta": o.id,
1371
- hidden: o.elsewhere === !0 && f.elsewhereHidden,
1372
- style: f.chipsCut && o.elsewhere !== !0 ? { flexShrink: A + 1 } : void 0,
1373
- ...f.chipsCut && o.elsewhere !== !0 ? { title: o.text, "aria-label": o.text } : {},
1374
- children: o.content
1375
+ "data-meta": d.id,
1376
+ hidden: d.elsewhere === !0 && h.elsewhereHidden,
1377
+ style: h.chipsCut && d.elsewhere !== !0 ? { flexShrink: A + 1 } : void 0,
1378
+ ...h.chipsCut && d.elsewhere !== !0 ? { title: d.text, "aria-label": d.text } : {},
1379
+ children: d.content
1375
1380
  },
1376
- o.id
1381
+ d.id
1377
1382
  )),
1378
- /* @__PURE__ */ c("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": n, onKeyDown: ae, children: [
1383
+ /* @__PURE__ */ o("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": n, onKeyDown: re, children: [
1379
1384
  ye.map(R),
1380
1385
  te !== null ? R(te) : null,
1381
- we ? /* @__PURE__ */ c("span", { className: H("cms-section-header__primary", ue !== null && "cms-section-header__primary--split"), children: [
1382
- /* @__PURE__ */ c(
1386
+ we ? /* @__PURE__ */ o("span", { className: H("cms-section-header__primary", ue !== null && "cms-section-header__primary--split"), children: [
1387
+ /* @__PURE__ */ o(
1383
1388
  "button",
1384
1389
  {
1385
1390
  type: "button",
1386
- className: H("cms-button", "cms-button--primary", f.primaryBare && "cms-section-header__primary--bare"),
1391
+ className: H("cms-button", "cms-button--primary", h.primaryBare && "cms-section-header__primary--bare"),
1387
1392
  "data-action": "primary",
1388
- "aria-label": f.primaryBare ? s.label : void 0,
1389
- "aria-disabled": _e ? "true" : void 0,
1393
+ "aria-label": h.primaryBare ? a.label : void 0,
1394
+ "aria-disabled": be ? "true" : void 0,
1390
1395
  "aria-describedby": ce !== void 0 ? I : void 0,
1391
- title: f.primaryBare && ce === void 0 ? s.label : void 0,
1396
+ title: h.primaryBare && ce === void 0 ? a.label : void 0,
1392
1397
  ...Se(Ae),
1393
1398
  ...We(Ae, ce !== void 0, I),
1394
- onClick: (o) => {
1395
- _e ? ce !== void 0 && Be(Ae, o.currentTarget, I) : s.onPress();
1399
+ onClick: (d) => {
1400
+ be ? ce !== void 0 && Fe(Ae, d.currentTarget, I) : a.onPress();
1396
1401
  },
1397
1402
  children: [
1398
- /* @__PURE__ */ e(B, { name: s.icon }),
1399
- f.primaryBare ? null : /* @__PURE__ */ c($, { children: [
1403
+ /* @__PURE__ */ e(B, { name: a.icon }),
1404
+ h.primaryBare ? null : /* @__PURE__ */ o($, { children: [
1400
1405
  " ",
1401
- /* @__PURE__ */ e("span", { children: s.label })
1406
+ /* @__PURE__ */ e("span", { children: a.label })
1402
1407
  ] })
1403
1408
  ]
1404
1409
  }
@@ -1413,11 +1418,11 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
1413
1418
  "aria-expanded": (i == null ? void 0 : i.which) === "primary",
1414
1419
  "aria-label": ue.menuLabel,
1415
1420
  ...Se("primary-menu"),
1416
- onClick: (o) => he("primary", o.currentTarget),
1421
+ onClick: (d) => he("primary", d.currentTarget),
1417
1422
  children: /* @__PURE__ */ e(B, { name: "chevron-down" })
1418
1423
  }
1419
1424
  ) : null,
1420
- ce !== void 0 ? Ee(I, ce, f.primaryBare ? s.label : null) : null
1425
+ ce !== void 0 ? Ee(I, ce, h.primaryBare ? a.label : null) : null
1421
1426
  ] }) : null,
1422
1427
  p ? /* @__PURE__ */ e(
1423
1428
  "button",
@@ -1428,37 +1433,37 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
1428
1433
  "data-action": "more",
1429
1434
  "aria-haspopup": "menu",
1430
1435
  "aria-expanded": (i == null ? void 0 : i.which) === "more",
1431
- "aria-label": d,
1432
- title: d,
1436
+ "aria-label": u,
1437
+ title: u,
1433
1438
  ...Se("more"),
1434
- onClick: (o) => he("more", o.currentTarget),
1439
+ onClick: (d) => he("more", d.currentTarget),
1435
1440
  children: /* @__PURE__ */ e(B, { name: "more" })
1436
1441
  }
1437
1442
  ) : null
1438
1443
  ] }),
1439
- /* @__PURE__ */ c("div", { ref: _, className: "cms-section-header__measure", "aria-hidden": "true", children: [
1444
+ /* @__PURE__ */ o("div", { ref: b, className: "cms-section-header__measure", "aria-hidden": "true", children: [
1440
1445
  t !== void 0 ? /* @__PURE__ */ e("span", { "data-measure": "lead", children: /* @__PURE__ */ e(B, { name: t }) }) : null,
1441
1446
  /* @__PURE__ */ e("span", { "data-measure": "title", className: "cms-section-header__title", children: n }),
1442
1447
  l !== void 0 ? /* @__PURE__ */ e("span", { "data-measure": "description", className: "cms-section-header__description", children: l }) : null,
1443
- r.map((o) => /* @__PURE__ */ e("span", { "data-measure": "meta", "data-measure-id": o.id, className: "cms-section-header__meta", children: o.content }, o.id)),
1444
- z.map((o) => /* @__PURE__ */ c("span", { children: [
1445
- /* @__PURE__ */ c("span", { "data-measure": "full", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary", children: [
1446
- o.icon !== null ? /* @__PURE__ */ e(B, { name: o.icon, size: 18 }) : null,
1447
- /* @__PURE__ */ e("span", { className: "cms-section-header__label", children: o.label })
1448
+ s.map((d) => /* @__PURE__ */ e("span", { "data-measure": "meta", "data-measure-id": d.id, className: "cms-section-header__meta", children: d.content }, d.id)),
1449
+ z.map((d) => /* @__PURE__ */ o("span", { children: [
1450
+ /* @__PURE__ */ o("span", { "data-measure": "full", "data-measure-id": d.id, className: "cms-button cms-button--quiet cms-section-header__secondary", children: [
1451
+ d.icon !== null ? /* @__PURE__ */ e(B, { name: d.icon, size: 18 }) : null,
1452
+ /* @__PURE__ */ e("span", { className: "cms-section-header__label", children: d.label })
1448
1453
  ] }),
1449
- /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary cms-section-header__secondary--bare", children: o.icon !== null ? /* @__PURE__ */ e(B, { name: o.icon, size: 18 }) : null })
1450
- ] }, o.id)),
1451
- ne ? /* @__PURE__ */ c($, { children: [
1452
- /* @__PURE__ */ c("span", { "data-measure": "primary", className: "cms-section-header__primary", children: [
1453
- /* @__PURE__ */ c("span", { className: "cms-button cms-button--primary", children: [
1454
- /* @__PURE__ */ e(B, { name: s.icon }),
1454
+ /* @__PURE__ */ e("span", { "data-measure": "icon", "data-measure-id": d.id, className: "cms-button cms-button--quiet cms-section-header__secondary cms-section-header__secondary--bare", children: d.icon !== null ? /* @__PURE__ */ e(B, { name: d.icon, size: 18 }) : null })
1455
+ ] }, d.id)),
1456
+ ne ? /* @__PURE__ */ o($, { children: [
1457
+ /* @__PURE__ */ o("span", { "data-measure": "primary", className: "cms-section-header__primary", children: [
1458
+ /* @__PURE__ */ o("span", { className: "cms-button cms-button--primary", children: [
1459
+ /* @__PURE__ */ e(B, { name: a.icon }),
1455
1460
  " ",
1456
- /* @__PURE__ */ e("span", { children: s.label })
1461
+ /* @__PURE__ */ e("span", { children: a.label })
1457
1462
  ] }),
1458
1463
  ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(B, { name: "chevron-down" }) }) : null
1459
1464
  ] }),
1460
- /* @__PURE__ */ c("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
1461
- /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ e(B, { name: s.icon }) }),
1465
+ /* @__PURE__ */ o("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
1466
+ /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ e(B, { name: a.icon }) }),
1462
1467
  ue !== null ? /* @__PURE__ */ e("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ e(B, { name: "chevron-down" }) }) : null
1463
1468
  ] })
1464
1469
  ] }) : null,
@@ -1466,40 +1471,40 @@ function Jt({ title: n, icon: t, description: l, meta: r = [], primary: s, secon
1466
1471
  ] })
1467
1472
  ] }),
1468
1473
  m != null ? /* @__PURE__ */ e("div", { className: "cms-section-header__context", "data-row": "2", children: m }) : null,
1469
- ue !== null ? /* @__PURE__ */ e(Ke, { at: (i == null ? void 0 : i.which) === "primary" ? i : null, items: oe, onClose: () => g(null), label: ue.menuLabel }) : null,
1470
- /* @__PURE__ */ e(Ke, { at: (i == null ? void 0 : i.which) === "more" ? i : null, items: G, onClose: () => g(null), label: d })
1474
+ ue !== null ? /* @__PURE__ */ e(Ke, { at: (i == null ? void 0 : i.which) === "primary" ? i : null, items: oe, onClose: () => v(null), label: ue.menuLabel }) : null,
1475
+ /* @__PURE__ */ e(Ke, { at: (i == null ? void 0 : i.which) === "more" ? i : null, items: G, onClose: () => v(null), label: u })
1471
1476
  ] });
1472
1477
  }
1473
1478
  function ot(n) {
1474
1479
  const t = /* @__PURE__ */ new Map();
1475
1480
  for (const l of n) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
1476
- return [...t.entries()].sort(([l], [r]) => l - r).map(([, l]) => l);
1481
+ return [...t.entries()].sort(([l], [s]) => l - s).map(([, l]) => l);
1477
1482
  }
1478
- function Qt({ head: n, children: t, className: l, scrollRef: r, onScroll: s, bodyProps: a }) {
1479
- return /* @__PURE__ */ c("div", { className: H("cms-column", l), children: [
1483
+ function Qt({ head: n, children: t, className: l, scrollRef: s, onScroll: a, bodyProps: c }) {
1484
+ return /* @__PURE__ */ o("div", { className: H("cms-column", l), children: [
1480
1485
  n == null ? null : /* @__PURE__ */ e("div", { className: "cms-column__head", children: n }),
1481
- /* @__PURE__ */ e("div", { ...a, className: H("cms-column__body", a == null ? void 0 : a.className), ref: r, onScroll: s, children: t })
1486
+ /* @__PURE__ */ e("div", { ...c, className: H("cms-column__body", c == null ? void 0 : c.className), ref: s, onScroll: a, children: t })
1482
1487
  ] });
1483
1488
  }
1484
- function el({ title: n, scope: t, actions: l, backLink: r }) {
1485
- return /* @__PURE__ */ c("header", { className: "cms-page-header", children: [
1486
- r ? /* @__PURE__ */ c(
1489
+ function el({ title: n, scope: t, actions: l, backLink: s }) {
1490
+ return /* @__PURE__ */ o("header", { className: "cms-page-header", children: [
1491
+ s ? /* @__PURE__ */ o(
1487
1492
  "a",
1488
1493
  {
1489
1494
  className: "cms-page-header__back",
1490
- href: r.href ?? "#",
1491
- onClick: (s) => {
1492
- r.onBack && (s.preventDefault(), r.onBack());
1495
+ href: s.href ?? "#",
1496
+ onClick: (a) => {
1497
+ s.onBack && (a.preventDefault(), s.onBack());
1493
1498
  },
1494
1499
  children: [
1495
- /* @__PURE__ */ e(re, { name: "back" }),
1500
+ /* @__PURE__ */ e(ae, { name: "back" }),
1496
1501
  " ",
1497
- r.label
1502
+ s.label
1498
1503
  ]
1499
1504
  }
1500
1505
  ) : null,
1501
- /* @__PURE__ */ c("div", { className: "cms-page-header__row", children: [
1502
- /* @__PURE__ */ c("div", { className: "cms-page-header__titles", children: [
1506
+ /* @__PURE__ */ o("div", { className: "cms-page-header__row", children: [
1507
+ /* @__PURE__ */ o("div", { className: "cms-page-header__titles", children: [
1503
1508
  /* @__PURE__ */ e("h1", { className: "cms-page-header__title", children: n }),
1504
1509
  t != null ? /* @__PURE__ */ e("p", { className: "cms-page-header__scope", children: t }) : null
1505
1510
  ] }),
@@ -1507,43 +1512,43 @@ function el({ title: n, scope: t, actions: l, backLink: r }) {
1507
1512
  ] })
1508
1513
  ] });
1509
1514
  }
1510
- function nl({ tabs: n, active: t, onSelect: l, label: r }) {
1511
- const s = P([]), a = (h, d) => {
1512
- var g;
1513
- const m = n.length - 1, b = h.key === "ArrowRight" ? d === m ? 0 : d + 1 : h.key === "ArrowLeft" ? d === 0 ? m : d - 1 : h.key === "Home" ? 0 : h.key === "End" ? m : null;
1514
- if (b === null) return;
1515
- h.preventDefault();
1516
- const i = n[b];
1517
- i && (l(i.id), (g = s.current[b]) == null || g.focus());
1515
+ function nl({ tabs: n, active: t, onSelect: l, label: s }) {
1516
+ const a = P([]), c = (f, u) => {
1517
+ var v;
1518
+ const m = n.length - 1, _ = f.key === "ArrowRight" ? u === m ? 0 : u + 1 : f.key === "ArrowLeft" ? u === 0 ? m : u - 1 : f.key === "Home" ? 0 : f.key === "End" ? m : null;
1519
+ if (_ === null) return;
1520
+ f.preventDefault();
1521
+ const i = n[_];
1522
+ i && (l(i.id), (v = a.current[_]) == null || v.focus());
1518
1523
  };
1519
- return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": r, children: n.map((h, d) => {
1520
- const m = h.id === t;
1521
- return /* @__PURE__ */ c(
1524
+ return /* @__PURE__ */ e("div", { className: "cms-tabs", role: "tablist", "aria-label": s, children: n.map((f, u) => {
1525
+ const m = f.id === t;
1526
+ return /* @__PURE__ */ o(
1522
1527
  "button",
1523
1528
  {
1524
- ref: (b) => {
1525
- s.current[d] = b;
1529
+ ref: (_) => {
1530
+ a.current[u] = _;
1526
1531
  },
1527
1532
  type: "button",
1528
1533
  role: "tab",
1529
1534
  className: H("cms-tab", m && "is-active"),
1530
1535
  "aria-selected": m,
1531
1536
  tabIndex: m ? 0 : -1,
1532
- onClick: () => l(h.id),
1533
- onKeyDown: (b) => a(b, d),
1537
+ onClick: () => l(f.id),
1538
+ onKeyDown: (_) => c(_, u),
1534
1539
  children: [
1535
- h.label,
1536
- h.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: h.count }) : null
1540
+ f.label,
1541
+ f.count !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-tab__count", children: f.count }) : null
1537
1542
  ]
1538
1543
  },
1539
- h.id
1544
+ f.id
1540
1545
  );
1541
1546
  }) });
1542
1547
  }
1543
1548
  function dt(n) {
1544
- const t = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), l = (s) => {
1545
- var a;
1546
- return (a = s == null ? void 0 : s.match(/[\p{L}\p{N}]/u)) == null ? void 0 : a[0];
1549
+ const t = n.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), l = (a) => {
1550
+ var c;
1551
+ return (c = a == null ? void 0 : a.match(/[\p{L}\p{N}]/u)) == null ? void 0 : c[0];
1547
1552
  };
1548
1553
  return (t.length > 1 ? [l(t[0]), l(t[t.length - 1])] : [l(t[0])]).filter(Boolean).join("").toUpperCase();
1549
1554
  }
@@ -1553,19 +1558,19 @@ function ut(n) {
1553
1558
  t = t * 31 + (l.codePointAt(0) ?? 0) >>> 0;
1554
1559
  return t % 6 + 1;
1555
1560
  }
1556
- function Ye({ name: n, pictureUrl: t, presence: l, connection: r, deleted: s = !1, placeholder: a = !1, size: h = 32, tintSeed: d, unnamedLabel: m }) {
1557
- const b = s || a, i = dt(n) || "?", g = n.trim() === "" ? (m == null ? void 0 : m.trim()) || "?" : n, f = r !== void 0 ? `is-${r.state === "offline" ? "disconnected" : r.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, v = r !== void 0 ? `${g}, ${r.label}` : l ? `${g}, ${l}` : g;
1558
- return /* @__PURE__ */ c(
1561
+ function Ye({ name: n, pictureUrl: t, presence: l, connection: s, deleted: a = !1, placeholder: c = !1, size: f = 32, tintSeed: u, unnamedLabel: m }) {
1562
+ const _ = a || c, i = dt(n) || "?", v = n.trim() === "" ? (m == null ? void 0 : m.trim()) || "?" : n, h = s !== void 0 ? `is-${s.state === "offline" ? "disconnected" : s.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, w = s !== void 0 ? `${v}, ${s.label}` : l ? `${v}, ${l}` : v;
1563
+ return /* @__PURE__ */ o(
1559
1564
  "span",
1560
1565
  {
1561
- className: H("cms-avatar", b ? "cms-avatar--deleted" : `cms-avatar--tint-${ut(d ?? n)}`),
1562
- style: { width: h, height: h, fontSize: Math.round(h * 0.4) },
1566
+ className: H("cms-avatar", _ ? "cms-avatar--deleted" : `cms-avatar--tint-${ut(u ?? n)}`),
1567
+ style: { width: f, height: f, fontSize: Math.round(f * 0.4) },
1563
1568
  role: "img",
1564
- "aria-label": v,
1565
- ...r === void 0 ? {} : { title: r.label },
1569
+ "aria-label": w,
1570
+ ...s === void 0 ? {} : { title: s.label },
1566
1571
  children: [
1567
- b ? /* @__PURE__ */ e(B, { name: "user", size: Math.round(h * 0.6) }) : t ? /* @__PURE__ */ e("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: i }),
1568
- f === null ? null : /* @__PURE__ */ e("span", { className: H("cms-avatar__presence", f), "aria-hidden": "true" })
1572
+ _ ? /* @__PURE__ */ e(B, { name: "user", size: Math.round(f * 0.6) }) : t ? /* @__PURE__ */ e("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: i }),
1573
+ h === null ? null : /* @__PURE__ */ e("span", { className: H("cms-avatar__presence", h), "aria-hidden": "true" })
1569
1574
  ]
1570
1575
  }
1571
1576
  );
@@ -1595,26 +1600,26 @@ function ft(n) {
1595
1600
  } catch {
1596
1601
  }
1597
1602
  }
1598
- function pt({ storageKey: n, value: t, default: l, min: r, max: s, step: a = 16, label: h, onChange: d, className: m, style: b }) {
1599
- const i = Math.max(r, s), g = (_) => Math.round(Math.min(Math.max(_, r), i)), [f, v] = D(() => {
1600
- const _ = n === void 0 ? null : en(n);
1601
- return g(_ ?? l);
1602
- }), u = g(t ?? f), y = P(null), [S, T] = D(!1);
1603
+ function pt({ storageKey: n, value: t, default: l, min: s, max: a, step: c = 16, label: f, onChange: u, className: m, style: _ }) {
1604
+ const i = Math.max(s, a), v = (b) => Math.round(Math.min(Math.max(b, s), i)), [h, w] = D(() => {
1605
+ const b = n === void 0 ? null : en(n);
1606
+ return v(b ?? l);
1607
+ }), r = v(t ?? h), g = P(null), [T, x] = D(!1);
1603
1608
  $e(() => {
1604
1609
  if (n === void 0) return;
1605
- const _ = en(n);
1606
- if (_ === null) return;
1607
- const N = g(_);
1608
- (t === void 0 || N !== g(t)) && (v(N), d(N, !0));
1610
+ const b = en(n);
1611
+ if (b === null) return;
1612
+ const N = v(b);
1613
+ (t === void 0 || N !== v(t)) && (w(N), u(N, !0));
1609
1614
  }, []), $e(() => {
1610
- t !== void 0 && g(t) !== t && d(g(t), !0);
1611
- }, [t, r, i]);
1612
- const M = (_, N) => {
1613
- const I = g(_);
1614
- v(I), N && ht(n, I), d(I, N);
1615
+ t !== void 0 && v(t) !== t && u(v(t), !0);
1616
+ }, [t, s, i]);
1617
+ const M = (b, N) => {
1618
+ const I = v(b);
1619
+ w(I), N && ht(n, I), u(I, N);
1615
1620
  }, E = () => {
1616
- const _ = y.current;
1617
- y.current = null, T(!1), _ !== null && _.last !== _.from && M(_.last, !0);
1621
+ const b = g.current;
1622
+ g.current = null, x(!1), b !== null && b.last !== b.from && M(b.last, !0);
1618
1623
  };
1619
1624
  return /* @__PURE__ */ e(
1620
1625
  "div",
@@ -1622,63 +1627,63 @@ function pt({ storageKey: n, value: t, default: l, min: r, max: s, step: a = 16,
1622
1627
  role: "separator",
1623
1628
  tabIndex: 0,
1624
1629
  "aria-orientation": "vertical",
1625
- "aria-label": h,
1626
- "aria-valuenow": u,
1627
- "aria-valuemin": r,
1630
+ "aria-label": f,
1631
+ "aria-valuenow": r,
1632
+ "aria-valuemin": s,
1628
1633
  "aria-valuemax": i,
1629
- className: H("cms-splitter", S && "is-dragging", u <= r && "is-at-min", u >= i && "is-at-max", m),
1630
- style: b,
1631
- onPointerDown: (_) => {
1634
+ className: H("cms-splitter", T && "is-dragging", r <= s && "is-at-min", r >= i && "is-at-max", m),
1635
+ style: _,
1636
+ onPointerDown: (b) => {
1632
1637
  var I, K;
1633
- if (_.button > 0) return;
1634
- _.preventDefault(), (K = (I = _.currentTarget).setPointerCapture) == null || K.call(I, _.pointerId);
1635
- const N = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1;
1636
- y.current = { x: _.clientX, from: u, last: u, sign: N }, T(!0);
1638
+ if (b.button > 0) return;
1639
+ b.preventDefault(), (K = (I = b.currentTarget).setPointerCapture) == null || K.call(I, b.pointerId);
1640
+ const N = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1;
1641
+ g.current = { x: b.clientX, from: r, last: r, sign: N }, x(!0);
1637
1642
  },
1638
- onPointerMove: (_) => {
1639
- const N = y.current;
1640
- N === null || !Number.isFinite(_.clientX) || (N.last = g(N.from + N.sign * (_.clientX - N.x)), M(N.last, !1));
1643
+ onPointerMove: (b) => {
1644
+ const N = g.current;
1645
+ N === null || !Number.isFinite(b.clientX) || (N.last = v(N.from + N.sign * (b.clientX - N.x)), M(N.last, !1));
1641
1646
  },
1642
1647
  onPointerUp: E,
1643
1648
  onPointerCancel: E,
1644
1649
  onDoubleClick: () => {
1645
1650
  ft(n);
1646
- const _ = g(l);
1647
- v(_), d(_, !0);
1651
+ const b = v(l);
1652
+ w(b), u(b, !0);
1648
1653
  },
1649
- onKeyDown: (_) => {
1650
- const N = _.shiftKey ? mt : a, I = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1, K = _.key === "ArrowLeft" ? u - I * N : _.key === "ArrowRight" ? u + I * N : _.key === "Home" ? r : _.key === "End" ? i : null;
1651
- K !== null && (_.preventDefault(), M(K, !0));
1654
+ onKeyDown: (b) => {
1655
+ const N = b.shiftKey ? mt : c, I = getComputedStyle(b.currentTarget).direction === "rtl" ? -1 : 1, K = b.key === "ArrowLeft" ? r - I * N : b.key === "ArrowRight" ? r + I * N : b.key === "Home" ? s : b.key === "End" ? i : null;
1656
+ K !== null && (b.preventDefault(), M(K, !0));
1652
1657
  }
1653
1658
  }
1654
1659
  );
1655
1660
  }
1656
- function bt({ count: n, label: t, max: l = 99 }) {
1657
- return n <= 0 ? null : /* @__PURE__ */ c("span", { className: "cms-badge", children: [
1661
+ function _t({ count: n, label: t, max: l = 99 }) {
1662
+ return n <= 0 ? null : /* @__PURE__ */ o("span", { className: "cms-badge", children: [
1658
1663
  /* @__PURE__ */ e("span", { "aria-hidden": "true", children: n > l ? `${l}+` : n }),
1659
1664
  /* @__PURE__ */ e("span", { className: "cms-visually-hidden", children: t })
1660
1665
  ] });
1661
1666
  }
1662
- function tl({ product: n, mark: t, rail: l, active: r, onNavigate: s, server: a, search: h, account: d, children: m, railLabel: b = "Sections" }) {
1663
- return /* @__PURE__ */ c("div", { className: "cms-shell", children: [
1664
- /* @__PURE__ */ c("nav", { className: "cms-shell__rail", "aria-label": b, children: [
1667
+ function tl({ product: n, mark: t, rail: l, active: s, onNavigate: a, server: c, search: f, account: u, children: m, railLabel: _ = "Sections" }) {
1668
+ return /* @__PURE__ */ o("div", { className: "cms-shell", children: [
1669
+ /* @__PURE__ */ o("nav", { className: "cms-shell__rail", "aria-label": _, children: [
1665
1670
  /* @__PURE__ */ e("span", { className: "cms-shell__mark", "aria-hidden": "true", children: t }),
1666
1671
  /* @__PURE__ */ e("ul", { className: "cms-shell__items", children: l.map((i) => {
1667
- const g = i.id === r;
1668
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
1672
+ const v = i.id === s;
1673
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
1669
1674
  "a",
1670
1675
  {
1671
1676
  href: i.href,
1672
- className: H("cms-shell__item", g && "is-active"),
1673
- "aria-current": g ? "page" : void 0,
1677
+ className: H("cms-shell__item", v && "is-active"),
1678
+ "aria-current": v ? "page" : void 0,
1674
1679
  title: i.label,
1675
- onClick: (f) => {
1676
- s && (f.preventDefault(), s(i.id));
1680
+ onClick: (h) => {
1681
+ a && (h.preventDefault(), a(i.id));
1677
1682
  },
1678
1683
  children: [
1679
- /* @__PURE__ */ c("span", { className: "cms-shell__icon", children: [
1684
+ /* @__PURE__ */ o("span", { className: "cms-shell__icon", children: [
1680
1685
  /* @__PURE__ */ e(B, { name: i.icon, size: 22 }),
1681
- i.badge ? /* @__PURE__ */ e(bt, { count: i.badge.count, label: i.badge.label }) : null
1686
+ i.badge ? /* @__PURE__ */ e(_t, { count: i.badge.count, label: i.badge.label }) : null
1682
1687
  ] }),
1683
1688
  /* @__PURE__ */ e("span", { className: "cms-shell__label", children: i.label })
1684
1689
  ]
@@ -1686,23 +1691,23 @@ function tl({ product: n, mark: t, rail: l, active: r, onNavigate: s, server: a,
1686
1691
  ) }, i.id);
1687
1692
  }) })
1688
1693
  ] }),
1689
- /* @__PURE__ */ c("header", { className: "cms-shell__top", children: [
1694
+ /* @__PURE__ */ o("header", { className: "cms-shell__top", children: [
1690
1695
  /* @__PURE__ */ e("span", { className: "cms-shell__product", children: n }),
1691
- a != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: a }) : null,
1692
- h != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: h }) : null,
1693
- d != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: d }) : null
1696
+ c != null ? /* @__PURE__ */ e("div", { className: "cms-shell__server", children: c }) : null,
1697
+ f != null ? /* @__PURE__ */ e("div", { className: "cms-shell__search", children: f }) : null,
1698
+ u != null ? /* @__PURE__ */ e("div", { className: "cms-shell__account", children: u }) : null
1694
1699
  ] }),
1695
1700
  /* @__PURE__ */ e("main", { className: "cms-shell__main", children: m })
1696
1701
  ] });
1697
1702
  }
1698
- function ll({ label: n, placeholder: t, value: l, onChange: r, onSearch: s }) {
1699
- return /* @__PURE__ */ c(
1703
+ function ll({ label: n, placeholder: t, value: l, onChange: s, onSearch: a }) {
1704
+ return /* @__PURE__ */ o(
1700
1705
  "form",
1701
1706
  {
1702
1707
  role: "search",
1703
1708
  className: "cms-search",
1704
- onSubmit: (a) => {
1705
- a.preventDefault(), s == null || s(l);
1709
+ onSubmit: (c) => {
1710
+ c.preventDefault(), a == null || a(l);
1706
1711
  },
1707
1712
  children: [
1708
1713
  /* @__PURE__ */ e(B, { name: "search", size: 18 }),
@@ -1714,72 +1719,72 @@ function ll({ label: n, placeholder: t, value: l, onChange: r, onSearch: s }) {
1714
1719
  "aria-label": n,
1715
1720
  placeholder: t,
1716
1721
  value: l,
1717
- onChange: (a) => r(a.target.value)
1722
+ onChange: (c) => s(c.target.value)
1718
1723
  }
1719
1724
  )
1720
1725
  ]
1721
1726
  }
1722
1727
  );
1723
1728
  }
1724
- function _t(n, t, l) {
1725
- const r = n.map((a) => Math.min(Math.max(a.width, a.min), a.max));
1726
- let s = r.reduce((a, h) => a + h, 0) + l - t;
1727
- for (let a = r.length - 1; a >= 0 && s > 0; a -= 1) {
1728
- const h = Math.min(s, r[a] - n[a].min);
1729
- r[a] = r[a] - h, s -= h;
1729
+ function bt(n, t, l) {
1730
+ const s = n.map((c) => Math.min(Math.max(c.width, c.min), c.max));
1731
+ let a = s.reduce((c, f) => c + f, 0) + l - t;
1732
+ for (let c = s.length - 1; c >= 0 && a > 0; c -= 1) {
1733
+ const f = Math.min(a, s[c] - n[c].min);
1734
+ s[c] = s[c] - f, a -= f;
1730
1735
  }
1731
- return r;
1736
+ return s;
1732
1737
  }
1733
- function sl({ panes: n, active: t, back: l, sizes: r, lastMin: s = 360, onResize: a, storageKey: h }) {
1734
- const d = Math.min(Math.max(t ?? n.length - 1, 0), n.length - 1), m = P(null), [b, i] = D(0), g = (r ?? []).slice(0, n.length - 1), [f, v] = D(() => h === void 0 ? [] : g.map((_, N) => en(`${h}:${String(N)}`) ?? void 0)), [u, y] = D(!1), S = g.map((_, N) => _ !== void 0 && f[N] !== void 0 ? { ..._, width: f[N] } : _), T = S.length === n.length - 1 && S.every((_) => _ !== void 0);
1738
+ function sl({ panes: n, active: t, back: l, sizes: s, lastMin: a = 360, onResize: c, storageKey: f }) {
1739
+ const u = Math.min(Math.max(t ?? n.length - 1, 0), n.length - 1), m = P(null), [_, i] = D(0), v = (s ?? []).slice(0, n.length - 1), [h, w] = D(() => f === void 0 ? [] : v.map((b, N) => en(`${f}:${String(N)}`) ?? void 0)), [r, g] = D(!1), T = v.map((b, N) => b !== void 0 && h[N] !== void 0 ? { ...b, width: h[N] } : b), x = T.length === n.length - 1 && T.every((b) => b !== void 0);
1735
1740
  $e(() => {
1736
- const _ = m.current;
1737
- if (_ === null || !T) return;
1738
- const N = () => i(_.clientWidth);
1741
+ const b = m.current;
1742
+ if (b === null || !x) return;
1743
+ const N = () => i(b.clientWidth);
1739
1744
  if (N(), typeof ResizeObserver > "u") return;
1740
1745
  const I = new ResizeObserver(N);
1741
- return I.observe(_), () => I.disconnect();
1742
- }, [T]);
1743
- const M = T ? _t(S, b > 0 ? b : Number.POSITIVE_INFINITY, s) : [], E = T ? Object.fromEntries(M.flatMap((_, N) => [
1744
- [`--split-pane-${String(N)}`, `${String(_)}px`],
1746
+ return I.observe(b), () => I.disconnect();
1747
+ }, [x]);
1748
+ const M = x ? bt(T, _ > 0 ? _ : Number.POSITIVE_INFINITY, a) : [], E = x ? Object.fromEntries(M.flatMap((b, N) => [
1749
+ [`--split-pane-${String(N)}`, `${String(b)}px`],
1745
1750
  [`--split-pane-end-${String(N)}`, `${String(M.slice(0, N + 1).reduce((I, K) => I + K, 0))}px`]
1746
1751
  ])) : void 0;
1747
- return /* @__PURE__ */ c(
1752
+ return /* @__PURE__ */ o(
1748
1753
  "div",
1749
1754
  {
1750
1755
  ref: m,
1751
- className: H("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", T && "cms-panes--sized", u && "is-resizing"),
1752
- "data-active": d,
1756
+ className: H("cms-panes", n.length === 3 ? "cms-panes--three" : "cms-panes--two", x && "cms-panes--sized", r && "is-resizing"),
1757
+ "data-active": u,
1753
1758
  style: E,
1754
1759
  children: [
1755
- n.map((_, N) => /* @__PURE__ */ c("section", { className: "cms-panes__pane", "aria-label": _.label, "data-offset": d - N, children: [
1756
- N === d && l ? /* @__PURE__ */ c("a", { className: "cms-panes__back", href: l.href, children: [
1760
+ n.map((b, N) => /* @__PURE__ */ o("section", { className: "cms-panes__pane", "aria-label": b.label, "data-offset": u - N, children: [
1761
+ N === u && l ? /* @__PURE__ */ o("a", { className: "cms-panes__back", href: l.href, children: [
1757
1762
  /* @__PURE__ */ e(B, { name: "chevron-left", size: 18 }),
1758
1763
  l.label
1759
1764
  ] }) : null,
1760
- _.content
1761
- ] }, _.label)),
1762
- T ? S.map((_, N) => {
1763
- const I = M.reduce((z, k, F) => F === N ? z : z + k, 0), K = Math.max(_.min, Math.min(_.max, b > 0 ? b - I - s : _.max));
1765
+ b.content
1766
+ ] }, b.label)),
1767
+ x ? T.map((b, N) => {
1768
+ const I = M.reduce((z, k, F) => F === N ? z : z + k, 0), K = Math.max(b.min, Math.min(b.max, _ > 0 ? _ - I - a : b.max));
1764
1769
  return /* @__PURE__ */ e(
1765
1770
  pt,
1766
1771
  {
1767
- ...h === void 0 ? {} : { storageKey: `${h}:${String(N)}` },
1772
+ ...f === void 0 ? {} : { storageKey: `${f}:${String(N)}` },
1768
1773
  value: M[N],
1769
- default: _.reset,
1770
- min: _.min,
1774
+ default: b.reset,
1775
+ min: b.min,
1771
1776
  max: K,
1772
- label: _.label,
1777
+ label: b.label,
1773
1778
  className: "cms-panes__splitter",
1774
1779
  style: { "--split-at": `var(--split-pane-end-${String(N)})` },
1775
1780
  onChange: (z, k) => {
1776
- h !== void 0 && v((F) => {
1781
+ f !== void 0 && w((F) => {
1777
1782
  const U = [...F];
1778
1783
  return U[N] = z, U;
1779
- }), y(!k), a == null || a(N, z, k);
1784
+ }), g(!k), c == null || c(N, z, k);
1780
1785
  }
1781
1786
  },
1782
- _.label
1787
+ b.label
1783
1788
  );
1784
1789
  }) : null
1785
1790
  ]
@@ -1787,96 +1792,96 @@ function sl({ panes: n, active: t, back: l, sizes: r, lastMin: s = 360, onResize
1787
1792
  );
1788
1793
  }
1789
1794
  const vt = { attachment: "Has an attachment", unread: "Unread" };
1790
- function rl({ from: n, fromPlaceholder: t = !1, subject: l, preview: r, time: s, unread: a, hasAttachment: h, selected: d, onOpen: m, check: b, selecting: i, labels: g }) {
1791
- const f = qe(vt, g), v = /* @__PURE__ */ e(Ye, { name: n, size: 40, placeholder: t });
1792
- return /* @__PURE__ */ c("div", { className: H("cms-mail-row", a && "is-unread", d && "is-selected", i && "is-selecting", (b == null ? void 0 : b.checked) && "is-checked"), children: [
1793
- b !== void 0 ? /* @__PURE__ */ c("span", { className: "cms-mail-row__lead", children: [
1794
- v,
1795
+ function al({ from: n, fromPlaceholder: t = !1, subject: l, preview: s, time: a, unread: c, hasAttachment: f, selected: u, onOpen: m, check: _, selecting: i, labels: v }) {
1796
+ const h = qe(vt, v), w = /* @__PURE__ */ e(Ye, { name: n, size: 40, placeholder: t });
1797
+ return /* @__PURE__ */ o("div", { className: H("cms-mail-row", c && "is-unread", u && "is-selected", i && "is-selecting", (_ == null ? void 0 : _.checked) && "is-checked"), children: [
1798
+ _ !== void 0 ? /* @__PURE__ */ o("span", { className: "cms-mail-row__lead", children: [
1799
+ w,
1795
1800
  /* @__PURE__ */ e(
1796
1801
  "input",
1797
1802
  {
1798
1803
  type: "checkbox",
1799
1804
  className: "cms-mail-row__check",
1800
- checked: b.checked,
1801
- disabled: b.disabled,
1802
- "aria-disabled": b.pending ? "true" : void 0,
1803
- "aria-busy": b.pending ? "true" : void 0,
1804
- "aria-label": b.label,
1805
+ checked: _.checked,
1806
+ disabled: _.disabled,
1807
+ "aria-disabled": _.pending ? "true" : void 0,
1808
+ "aria-busy": _.pending ? "true" : void 0,
1809
+ "aria-label": _.label,
1805
1810
  onChange: () => {
1806
1811
  },
1807
- onClick: (u) => {
1808
- if (u.stopPropagation(), b.pending) {
1809
- u.preventDefault();
1812
+ onClick: (r) => {
1813
+ if (r.stopPropagation(), _.pending) {
1814
+ r.preventDefault();
1810
1815
  return;
1811
1816
  }
1812
- b.onCheck({ shift: u.shiftKey, toggle: u.ctrlKey || u.metaKey });
1817
+ _.onCheck({ shift: r.shiftKey, toggle: r.ctrlKey || r.metaKey });
1813
1818
  }
1814
1819
  }
1815
1820
  )
1816
1821
  ] }) : null,
1817
- /* @__PURE__ */ c(
1822
+ /* @__PURE__ */ o(
1818
1823
  "button",
1819
1824
  {
1820
1825
  type: "button",
1821
1826
  className: "cms-mail-row__open",
1822
- "aria-current": d ? "true" : void 0,
1827
+ "aria-current": u ? "true" : void 0,
1823
1828
  onClick: m,
1824
1829
  children: [
1825
- b === void 0 ? v : null,
1826
- /* @__PURE__ */ c("span", { className: "cms-mail-row__body", children: [
1827
- /* @__PURE__ */ c("span", { className: "cms-mail-row__line", children: [
1830
+ _ === void 0 ? w : null,
1831
+ /* @__PURE__ */ o("span", { className: "cms-mail-row__body", children: [
1832
+ /* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
1828
1833
  /* @__PURE__ */ e("span", { className: "cms-mail-row__from", children: n }),
1829
- h ? /* @__PURE__ */ e(B, { name: "paperclip", size: 16, label: f.attachment }) : null,
1830
- /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: s })
1834
+ f ? /* @__PURE__ */ e(B, { name: "paperclip", size: 16, label: h.attachment }) : null,
1835
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__time", children: a })
1831
1836
  ] }),
1832
- /* @__PURE__ */ c("span", { className: "cms-mail-row__line", children: [
1837
+ /* @__PURE__ */ o("span", { className: "cms-mail-row__line", children: [
1833
1838
  /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1834
- a ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": f.unread }) : null
1839
+ c ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": h.unread }) : null
1835
1840
  ] }),
1836
- /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: r })
1841
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: s })
1837
1842
  ] })
1838
1843
  ]
1839
1844
  }
1840
1845
  )
1841
1846
  ] });
1842
1847
  }
1843
- function al({ direction: n, children: t, time: l, read: r, readLabel: s = "Read" }) {
1844
- return /* @__PURE__ */ c("div", { className: H("cms-bubble", `cms-bubble--${n}`), children: [
1848
+ function rl({ direction: n, children: t, time: l, read: s, readLabel: a = "Read" }) {
1849
+ return /* @__PURE__ */ o("div", { className: H("cms-bubble", `cms-bubble--${n}`), children: [
1845
1850
  /* @__PURE__ */ e("div", { className: "cms-bubble__text", children: t }),
1846
- /* @__PURE__ */ c("div", { className: "cms-bubble__meta", children: [
1851
+ /* @__PURE__ */ o("div", { className: "cms-bubble__meta", children: [
1847
1852
  l,
1848
- n === "out" && r ? /* @__PURE__ */ c($, { children: [
1853
+ n === "out" && s ? /* @__PURE__ */ o($, { children: [
1849
1854
  " · ",
1850
- s
1855
+ a
1851
1856
  ] }) : null
1852
1857
  ] })
1853
1858
  ] });
1854
1859
  }
1855
- function il({ label: n, value: t, onChange: l, onSend: r, onAttach: s, placeholder: a, variant: h = "chat", sendLabel: d = "Send", attachLabel: m = "Attach a file", leading: b, canSend: i }) {
1856
- const g = fe(), f = i ?? t.trim() !== "", v = (y) => {
1857
- y.preventDefault(), f && r();
1858
- }, u = s ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: s, children: /* @__PURE__ */ e(B, { name: "paperclip" }) }) : null;
1859
- return /* @__PURE__ */ c("form", { className: H("cms-composer", `cms-composer--${h}`), onSubmit: v, children: [
1860
- /* @__PURE__ */ e("label", { htmlFor: g, className: h === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1861
- h === "chat" ? u : null,
1860
+ function il({ label: n, value: t, onChange: l, onSend: s, onAttach: a, placeholder: c, variant: f = "chat", sendLabel: u = "Send", attachLabel: m = "Attach a file", leading: _, canSend: i }) {
1861
+ const v = fe(), h = i ?? t.trim() !== "", w = (g) => {
1862
+ g.preventDefault(), h && s();
1863
+ }, r = a ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": m, onClick: a, children: /* @__PURE__ */ e(B, { name: "paperclip" }) }) : null;
1864
+ return /* @__PURE__ */ o("form", { className: H("cms-composer", `cms-composer--${f}`), onSubmit: w, children: [
1865
+ /* @__PURE__ */ e("label", { htmlFor: v, className: f === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: n }),
1866
+ f === "chat" ? r : null,
1862
1867
  /* @__PURE__ */ e(
1863
1868
  "textarea",
1864
1869
  {
1865
- id: g,
1870
+ id: v,
1866
1871
  className: "cms-composer__input",
1867
- rows: h === "reply" ? 3 : 1,
1868
- placeholder: a,
1872
+ rows: f === "reply" ? 3 : 1,
1873
+ placeholder: c,
1869
1874
  value: t,
1870
- onChange: (y) => l(y.target.value),
1871
- onKeyDown: (y) => {
1872
- y.nativeEvent.isComposing || y.keyCode === 229 || h === "chat" && y.key === "Enter" && !y.shiftKey && (y.preventDefault(), f && r());
1875
+ onChange: (g) => l(g.target.value),
1876
+ onKeyDown: (g) => {
1877
+ g.nativeEvent.isComposing || g.keyCode === 229 || f === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), h && s());
1873
1878
  }
1874
1879
  }
1875
1880
  ),
1876
- h === "reply" && b !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: b }) : null,
1877
- h === "reply" ? u : null,
1878
- h === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": d, disabled: !f, children: /* @__PURE__ */ e(B, { name: "send" }) }) : /* @__PURE__ */ c("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !f, children: [
1879
- d,
1881
+ f === "reply" && _ !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-composer__leading", children: _ }) : null,
1882
+ f === "reply" ? r : null,
1883
+ f === "chat" ? /* @__PURE__ */ e("button", { type: "submit", className: "cms-composer__send-round", "aria-label": u, disabled: !h, children: /* @__PURE__ */ e(B, { name: "send" }) }) : /* @__PURE__ */ o("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !h, children: [
1884
+ u,
1880
1885
  " ",
1881
1886
  /* @__PURE__ */ e(B, { name: "send", size: 18 })
1882
1887
  ] })
@@ -1903,25 +1908,25 @@ const on = {
1903
1908
  onCallWith: (n) => `On a call with ${n}`,
1904
1909
  returnToCall: "Return to call"
1905
1910
  };
1906
- function cl({ name: n, namePlaceholder: t = !1, media: l, onAccept: r, onDecline: s, labels: a }) {
1907
- const h = qe(on, a), d = l === "video" ? h.incomingVideo : h.incomingAudio;
1908
- return /* @__PURE__ */ c("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": h.incomingFrom(d, n), children: [
1911
+ function cl({ name: n, namePlaceholder: t = !1, media: l, onAccept: s, onDecline: a, labels: c }) {
1912
+ const f = qe(on, c), u = l === "video" ? f.incomingVideo : f.incomingAudio;
1913
+ return /* @__PURE__ */ o("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": f.incomingFrom(u, n), children: [
1909
1914
  /* @__PURE__ */ e("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ e(Ye, { name: n, size: 112, placeholder: t }) }),
1910
1915
  /* @__PURE__ */ e("p", { className: "cms-call-incoming__name", children: n }),
1911
- /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: d }),
1912
- /* @__PURE__ */ c("div", { className: "cms-call-incoming__actions", children: [
1913
- /* @__PURE__ */ e(ze, { icon: "phone-off", label: h.decline, tone: "hang-up", onClick: s }),
1914
- /* @__PURE__ */ e(ze, { icon: "phone", label: h.accept, tone: "accept", onClick: r })
1916
+ /* @__PURE__ */ e("p", { className: "cms-call-incoming__what", children: u }),
1917
+ /* @__PURE__ */ o("div", { className: "cms-call-incoming__actions", children: [
1918
+ /* @__PURE__ */ e(Ue, { icon: "phone-off", label: f.decline, tone: "hang-up", onClick: a }),
1919
+ /* @__PURE__ */ e(Ue, { icon: "phone", label: f.accept, tone: "accept", onClick: s })
1915
1920
  ] })
1916
1921
  ] });
1917
1922
  }
1918
- function ze({ icon: n, label: t, onClick: l, tone: r = "plain", pressed: s }) {
1919
- return /* @__PURE__ */ c(
1923
+ function Ue({ icon: n, label: t, onClick: l, tone: s = "plain", pressed: a }) {
1924
+ return /* @__PURE__ */ o(
1920
1925
  "button",
1921
1926
  {
1922
1927
  type: "button",
1923
- className: H("cms-call-button", `cms-call-button--${r}`, s && "is-pressed"),
1924
- "aria-pressed": s,
1928
+ className: H("cms-call-button", `cms-call-button--${s}`, a && "is-pressed"),
1929
+ "aria-pressed": a,
1925
1930
  onClick: l,
1926
1931
  children: [
1927
1932
  /* @__PURE__ */ e("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ e(B, { name: n, size: 24 }) }),
@@ -1930,61 +1935,61 @@ function ze({ icon: n, label: t, onClick: l, tone: r = "plain", pressed: s }) {
1930
1935
  }
1931
1936
  );
1932
1937
  }
1933
- function ol({ name: n, duration: t, connection: l, you: r, muted: s, speaker: a, onToggleMute: h, onToggleSpeaker: d, onAddPerson: m, onChat: b, onHangUp: i, labels: g }) {
1934
- const f = qe(on, g);
1935
- return /* @__PURE__ */ c("section", { className: "cms-call-panel", "aria-label": f.callWith(n), children: [
1936
- /* @__PURE__ */ c("div", { className: "cms-call-panel__head", children: [
1938
+ function ol({ name: n, duration: t, connection: l, you: s, muted: a, speaker: c, onToggleMute: f, onToggleSpeaker: u, onAddPerson: m, onChat: _, onHangUp: i, labels: v }) {
1939
+ const h = qe(on, v);
1940
+ return /* @__PURE__ */ o("section", { className: "cms-call-panel", "aria-label": h.callWith(n), children: [
1941
+ /* @__PURE__ */ o("div", { className: "cms-call-panel__head", children: [
1937
1942
  /* @__PURE__ */ e(Ye, { name: n, size: 64 }),
1938
- /* @__PURE__ */ c("div", { className: "cms-call-panel__who", children: [
1943
+ /* @__PURE__ */ o("div", { className: "cms-call-panel__who", children: [
1939
1944
  /* @__PURE__ */ e("p", { className: "cms-call-panel__name", children: n }),
1940
- /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": f.callTime(t), children: t })
1945
+ /* @__PURE__ */ e("p", { className: "cms-call-panel__time", "aria-label": h.callTime(t), children: t })
1941
1946
  ] }),
1942
- /* @__PURE__ */ e("span", { className: H("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? f.goodConnection : f.poorConnection })
1947
+ /* @__PURE__ */ e("span", { className: H("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? h.goodConnection : h.poorConnection })
1943
1948
  ] }),
1944
- /* @__PURE__ */ c("div", { className: "cms-call-panel__you", children: [
1945
- /* @__PURE__ */ e(Ye, { name: r.name, size: 36 }),
1946
- /* @__PURE__ */ e("span", { children: f.you }),
1947
- r.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": f.speaking }) : null
1949
+ /* @__PURE__ */ o("div", { className: "cms-call-panel__you", children: [
1950
+ /* @__PURE__ */ e(Ye, { name: s.name, size: 36 }),
1951
+ /* @__PURE__ */ e("span", { children: h.you }),
1952
+ s.speaking ? /* @__PURE__ */ e("span", { className: "cms-call-panel__level", role: "img", "aria-label": h.speaking }) : null
1948
1953
  ] }),
1949
- /* @__PURE__ */ c("div", { className: "cms-call-panel__controls", children: [
1950
- /* @__PURE__ */ e(ze, { icon: "mic", label: s ? f.unmute : f.mute, pressed: s, onClick: h }),
1951
- /* @__PURE__ */ e(ze, { icon: "speaker", label: f.speaker, pressed: a, onClick: d }),
1952
- m ? /* @__PURE__ */ e(ze, { icon: "user-plus", label: f.addPerson, onClick: m }) : null,
1953
- b ? /* @__PURE__ */ e(ze, { icon: "chat", label: f.chat, onClick: b }) : null,
1954
- /* @__PURE__ */ e(ze, { icon: "phone-off", label: f.hangUp, tone: "hang-up", onClick: i })
1954
+ /* @__PURE__ */ o("div", { className: "cms-call-panel__controls", children: [
1955
+ /* @__PURE__ */ e(Ue, { icon: "mic", label: a ? h.unmute : h.mute, pressed: a, onClick: f }),
1956
+ /* @__PURE__ */ e(Ue, { icon: "speaker", label: h.speaker, pressed: c, onClick: u }),
1957
+ m ? /* @__PURE__ */ e(Ue, { icon: "user-plus", label: h.addPerson, onClick: m }) : null,
1958
+ _ ? /* @__PURE__ */ e(Ue, { icon: "chat", label: h.chat, onClick: _ }) : null,
1959
+ /* @__PURE__ */ e(Ue, { icon: "phone-off", label: h.hangUp, tone: "hang-up", onClick: i })
1955
1960
  ] })
1956
1961
  ] });
1957
1962
  }
1958
- function dl({ name: n, duration: t, muted: l, onToggleMute: r, onReturn: s, onHangUp: a, labels: h }) {
1959
- const d = qe(on, h);
1960
- return /* @__PURE__ */ c("section", { className: "cms-call-bar", "aria-label": d.callWith(n), children: [
1963
+ function dl({ name: n, duration: t, muted: l, onToggleMute: s, onReturn: a, onHangUp: c, labels: f }) {
1964
+ const u = qe(on, f);
1965
+ return /* @__PURE__ */ o("section", { className: "cms-call-bar", "aria-label": u.callWith(n), children: [
1961
1966
  /* @__PURE__ */ e("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
1962
- /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: d.onCallWith(n) }),
1967
+ /* @__PURE__ */ e("span", { className: "cms-call-bar__name", children: u.onCallWith(n) }),
1963
1968
  /* @__PURE__ */ e("span", { className: "cms-call-bar__time", children: t }),
1964
- /* @__PURE__ */ c("span", { className: "cms-call-bar__actions", children: [
1965
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? d.unmute : d.mute, "aria-pressed": l, onClick: r, children: /* @__PURE__ */ e(B, { name: "mic" }) }),
1966
- /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: s, children: d.returnToCall }),
1967
- /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": d.hangUp, onClick: a, children: /* @__PURE__ */ e(B, { name: "phone-off" }) })
1969
+ /* @__PURE__ */ o("span", { className: "cms-call-bar__actions", children: [
1970
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? u.unmute : u.mute, "aria-pressed": l, onClick: s, children: /* @__PURE__ */ e(B, { name: "mic" }) }),
1971
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-button cms-button--primary", onClick: a, children: u.returnToCall }),
1972
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": u.hangUp, onClick: c, children: /* @__PURE__ */ e(B, { name: "phone-off" }) })
1968
1973
  ] })
1969
1974
  ] });
1970
1975
  }
1971
- function ul({ mark: n, product: t, headline: l, lead: r, features: s = [], children: a }) {
1972
- return /* @__PURE__ */ c("div", { className: "cms-signin", children: [
1973
- /* @__PURE__ */ c("aside", { className: "cms-signin__brand", children: [
1974
- /* @__PURE__ */ c("p", { className: "cms-signin__logo", children: [
1976
+ function ul({ mark: n, product: t, headline: l, lead: s, features: a = [], children: c }) {
1977
+ return /* @__PURE__ */ o("div", { className: "cms-signin", children: [
1978
+ /* @__PURE__ */ o("aside", { className: "cms-signin__brand", children: [
1979
+ /* @__PURE__ */ o("p", { className: "cms-signin__logo", children: [
1975
1980
  /* @__PURE__ */ e("span", { className: "cms-signin__mark", "aria-hidden": "true", children: n }),
1976
1981
  t
1977
1982
  ] }),
1978
- /* @__PURE__ */ c("div", { className: "cms-signin__pitch", children: [
1983
+ /* @__PURE__ */ o("div", { className: "cms-signin__pitch", children: [
1979
1984
  /* @__PURE__ */ e("p", { className: "cms-signin__headline", children: l }),
1980
- /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: r }),
1981
- s.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: s.map((h) => /* @__PURE__ */ c("li", { children: [
1982
- /* @__PURE__ */ e(B, { name: h.icon, size: 18 }),
1983
- h.label
1984
- ] }, h.label)) }) : null
1985
+ /* @__PURE__ */ e("p", { className: "cms-signin__lead", children: s }),
1986
+ a.length ? /* @__PURE__ */ e("ul", { className: "cms-signin__features", children: a.map((f) => /* @__PURE__ */ o("li", { children: [
1987
+ /* @__PURE__ */ e(B, { name: f.icon, size: 18 }),
1988
+ f.label
1989
+ ] }, f.label)) }) : null
1985
1990
  ] })
1986
1991
  ] }),
1987
- /* @__PURE__ */ e("main", { className: "cms-signin__form", children: a })
1992
+ /* @__PURE__ */ e("main", { className: "cms-signin__form", children: c })
1988
1993
  ] });
1989
1994
  }
1990
1995
  const gt = {
@@ -1999,17 +2004,17 @@ const gt = {
1999
2004
  newHere: "New here?",
2000
2005
  create: "Create an account"
2001
2006
  };
2002
- function ml({ server: n, onSubmit: t, forgotHref: l, createHref: r, error: s, busy: a, labels: h }) {
2003
- const d = qe(gt, h), m = fe(), [b, i] = D(""), [g, f] = D(""), [v, u] = D(!1);
2004
- return /* @__PURE__ */ c("form", { className: "cms-signin-form", onSubmit: (S) => {
2005
- S.preventDefault(), t(b, g);
2006
- }, "aria-describedby": s ? `${m}-error` : void 0, children: [
2007
- /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: d.title }),
2008
- /* @__PURE__ */ c("p", { className: "cms-signin-form__server", children: [
2007
+ function ml({ server: n, onSubmit: t, forgotHref: l, createHref: s, error: a, busy: c, labels: f }) {
2008
+ const u = qe(gt, f), m = fe(), [_, i] = D(""), [v, h] = D(""), [w, r] = D(!1);
2009
+ return /* @__PURE__ */ o("form", { className: "cms-signin-form", onSubmit: (T) => {
2010
+ T.preventDefault(), t(_, v);
2011
+ }, "aria-describedby": a ? `${m}-error` : void 0, children: [
2012
+ /* @__PURE__ */ e("h1", { className: "cms-signin-form__title", children: u.title }),
2013
+ /* @__PURE__ */ o("p", { className: "cms-signin-form__server", children: [
2009
2014
  /* @__PURE__ */ e(B, { name: "server", size: 18 }),
2010
2015
  n
2011
2016
  ] }),
2012
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-identifier`, children: d.identifier }),
2017
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-identifier`, children: u.identifier }),
2013
2018
  /* @__PURE__ */ e(
2014
2019
  "input",
2015
2020
  {
@@ -2017,102 +2022,102 @@ function ml({ server: n, onSubmit: t, forgotHref: l, createHref: r, error: s, bu
2017
2022
  className: "cms-signin-form__input",
2018
2023
  type: "text",
2019
2024
  autoComplete: "username",
2020
- placeholder: d.identifierPlaceholder,
2021
- value: b,
2022
- onChange: (S) => i(S.target.value),
2025
+ placeholder: u.identifierPlaceholder,
2026
+ value: _,
2027
+ onChange: (T) => i(T.target.value),
2023
2028
  required: !0
2024
2029
  }
2025
2030
  ),
2026
- /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-password`, children: d.password }),
2027
- /* @__PURE__ */ c("span", { className: "cms-signin-form__password", children: [
2031
+ /* @__PURE__ */ e("label", { className: "cms-signin-form__label", htmlFor: `${m}-password`, children: u.password }),
2032
+ /* @__PURE__ */ o("span", { className: "cms-signin-form__password", children: [
2028
2033
  /* @__PURE__ */ e(
2029
2034
  "input",
2030
2035
  {
2031
2036
  id: `${m}-password`,
2032
2037
  className: "cms-signin-form__input",
2033
- type: v ? "text" : "password",
2038
+ type: w ? "text" : "password",
2034
2039
  autoComplete: "current-password",
2035
- value: g,
2036
- onChange: (S) => f(S.target.value),
2040
+ value: v,
2041
+ onChange: (T) => h(T.target.value),
2037
2042
  required: !0
2038
2043
  }
2039
2044
  ),
2040
- /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": v, onClick: () => u((S) => !S), children: v ? d.hide : d.show })
2045
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": w, onClick: () => r((T) => !T), children: w ? u.hide : u.show })
2041
2046
  ] }),
2042
- l ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: l, children: d.forgot }) : null,
2043
- s ? /* @__PURE__ */ e("p", { id: `${m}-error`, className: "cms-signin-form__error", role: "alert", children: s }) : null,
2044
- /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: a, "aria-busy": a || void 0, children: d.submit }),
2045
- r ? /* @__PURE__ */ c($, { children: [
2046
- /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: d.newHere }) }),
2047
- /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: r, children: d.create })
2047
+ l ? /* @__PURE__ */ e("a", { className: "cms-signin-form__forgot", href: l, children: u.forgot }) : null,
2048
+ a ? /* @__PURE__ */ e("p", { id: `${m}-error`, className: "cms-signin-form__error", role: "alert", children: a }) : null,
2049
+ /* @__PURE__ */ e("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: c, "aria-busy": c || void 0, children: u.submit }),
2050
+ s ? /* @__PURE__ */ o($, { children: [
2051
+ /* @__PURE__ */ e("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ e("span", { children: u.newHere }) }),
2052
+ /* @__PURE__ */ e("a", { className: "cms-button cms-signin-form__create", href: s, children: u.create })
2048
2053
  ] }) : null
2049
2054
  ] });
2050
2055
  }
2051
2056
  const yt = { name: (n, t) => `${n}: ${t}` };
2052
- function Cn(n) {
2057
+ function Sn(n) {
2053
2058
  const t = dn(n);
2054
2059
  return t === un(n.options, n.defaultValue) ? null : t ?? null;
2055
2060
  }
2056
2061
  function dn({ options: n, value: t, defaultValue: l }) {
2057
- return n.find((r) => r.id === t) ?? un(n, l);
2062
+ return n.find((s) => s.id === t) ?? un(n, l);
2058
2063
  }
2059
- function Sn(n) {
2064
+ function En(n) {
2060
2065
  var t;
2061
2066
  return qe(yt, n.labels).name(n.label, ((t = dn(n)) == null ? void 0 : t.label) ?? "");
2062
2067
  }
2063
- function En(n, t) {
2068
+ function An(n, t) {
2064
2069
  const l = dn(n);
2065
- return n.options.map((r) => ({
2066
- id: r.id,
2067
- label: r.label,
2070
+ return n.options.map((s) => ({
2071
+ id: s.id,
2072
+ label: s.label,
2068
2073
  offer: { offered: !0, locked: !1 },
2069
- checked: r === l,
2074
+ checked: s === l,
2070
2075
  ...t === void 0 ? {} : { group: t },
2071
2076
  onSelect: () => {
2072
- r !== l && n.onChange(r.id);
2077
+ s !== l && n.onChange(s.id);
2073
2078
  }
2074
2079
  }));
2075
2080
  }
2076
2081
  function un(n, t) {
2077
2082
  return n.find((l) => l.id === t) ?? n[0];
2078
2083
  }
2079
- function An(n) {
2080
- var a;
2081
- const t = P(null), l = (n == null ? void 0 : n.value) ?? null, s = n === void 0 || n.options.some((h) => h.id === n.value) ? null : ((a = un(n.options, n.defaultValue)) == null ? void 0 : a.id) ?? null;
2084
+ function Tn(n) {
2085
+ var c;
2086
+ const t = P(null), l = (n == null ? void 0 : n.value) ?? null, a = n === void 0 || n.options.some((f) => f.id === n.value) ? null : ((c = un(n.options, n.defaultValue)) == null ? void 0 : c.id) ?? null;
2082
2087
  ee(() => {
2083
- s === null ? t.current = null : t.current !== l && (t.current = l, n == null || n.onChange(s));
2084
- }, [s, l]);
2088
+ a === null ? t.current = null : t.current !== l && (t.current = l, n == null || n.onChange(a));
2089
+ }, [a, l]);
2085
2090
  }
2086
- function Tn({ iconOnly: n = !1, onOpenChange: t, ...l }) {
2091
+ function Ln({ iconOnly: n = !1, onOpenChange: t, ...l }) {
2087
2092
  return l.options.length < 2 ? null : /* @__PURE__ */ e(wt, { ...l, iconOnly: n, onOpenChange: t });
2088
2093
  }
2089
2094
  function wt({ iconOnly: n, onOpenChange: t, ...l }) {
2090
- const [r, s] = D(null), a = Ie(() => s(null), []), h = P(!1), d = r !== null;
2091
- ee(() => (t == null || t(d), () => t == null ? void 0 : t(!1)), [d, t]);
2092
- const m = Cn(l), b = m !== null && !n, i = Sn(l), g = (f, v) => {
2093
- const u = f.getBoundingClientRect();
2094
- s({ x: u.left, y: u.bottom + 4, focus: v });
2095
+ const [s, a] = D(null), c = Ie(() => a(null), []), f = P(!1), u = s !== null;
2096
+ ee(() => (t == null || t(u), () => t == null ? void 0 : t(!1)), [u, t]);
2097
+ const m = Sn(l), _ = m !== null && !n, i = En(l), v = (h, w) => {
2098
+ const r = h.getBoundingClientRect();
2099
+ a({ x: r.left, y: r.bottom + 4, focus: w });
2095
2100
  };
2096
- return /* @__PURE__ */ c($, { children: [
2101
+ return /* @__PURE__ */ o($, { children: [
2097
2102
  /* @__PURE__ */ e(
2098
2103
  "button",
2099
2104
  {
2100
2105
  type: "button",
2101
- className: H("cms-filter-menu", m !== null && "cms-filter-menu--active", b && "cms-filter-menu--named"),
2106
+ className: H("cms-filter-menu", m !== null && "cms-filter-menu--active", _ && "cms-filter-menu--named"),
2102
2107
  "aria-haspopup": "menu",
2103
- "aria-expanded": d,
2108
+ "aria-expanded": u,
2104
2109
  "aria-label": i,
2105
2110
  title: i,
2106
2111
  onMouseDown: () => {
2107
- h.current = d;
2112
+ f.current = u;
2108
2113
  },
2109
- onClick: (f) => {
2110
- d || h.current ? a() : g(f.currentTarget, "current"), h.current = !1;
2114
+ onClick: (h) => {
2115
+ u || f.current ? c() : v(h.currentTarget, "current"), f.current = !1;
2111
2116
  },
2112
- onKeyDown: (f) => {
2113
- h.current = !1, (f.key === "ArrowDown" || f.key === "ArrowUp") && (f.preventDefault(), g(f.currentTarget, f.key === "ArrowUp" ? "last" : "current"));
2117
+ onKeyDown: (h) => {
2118
+ f.current = !1, (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), v(h.currentTarget, h.key === "ArrowUp" ? "last" : "current"));
2114
2119
  },
2115
- children: b ? /* @__PURE__ */ c($, { children: [
2120
+ children: _ ? /* @__PURE__ */ o($, { children: [
2116
2121
  /* @__PURE__ */ e("span", { className: "cms-filter-menu__choice", children: m.label }),
2117
2122
  /* @__PURE__ */ e(B, { name: "chevron-down", size: 16 })
2118
2123
  ] }) : /* @__PURE__ */ e(B, { name: "funnel" })
@@ -2121,20 +2126,20 @@ function wt({ iconOnly: n, onOpenChange: t, ...l }) {
2121
2126
  /* @__PURE__ */ e(
2122
2127
  Ke,
2123
2128
  {
2124
- at: r,
2125
- items: En(l),
2126
- onClose: a,
2129
+ at: s,
2130
+ items: An(l),
2131
+ onClose: c,
2127
2132
  label: l.label,
2128
- focus: r == null ? void 0 : r.focus
2133
+ focus: s == null ? void 0 : s.focus
2129
2134
  }
2130
2135
  )
2131
2136
  ] });
2132
2137
  }
2133
2138
  function Nt(n) {
2134
- return An(n), /* @__PURE__ */ e(Tn, { ...n });
2139
+ return Tn(n), /* @__PURE__ */ e(Ln, { ...n });
2135
2140
  }
2136
2141
  function hl({ leading: n, name: t, filter: l }) {
2137
- return /* @__PURE__ */ c("div", { className: "cms-list-head", children: [
2142
+ return /* @__PURE__ */ o("div", { className: "cms-list-head", children: [
2138
2143
  n != null ? /* @__PURE__ */ e("span", { className: "cms-list-head__leading", children: n }) : null,
2139
2144
  /* @__PURE__ */ e("h2", { className: "cms-list-head__name", title: t, children: t }),
2140
2145
  l !== void 0 ? /* @__PURE__ */ e(Nt, { ...l }) : null
@@ -2149,45 +2154,45 @@ function kt(n) {
2149
2154
  function xt(n) {
2150
2155
  const t = /* @__PURE__ */ new Map();
2151
2156
  for (const l of n) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
2152
- return [...t.entries()].sort(([l], [r]) => l - r).map(([, l]) => l);
2157
+ return [...t.entries()].sort(([l], [s]) => l - s).map(([, l]) => l);
2153
2158
  }
2154
- function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leading: a }) {
2159
+ function fl({ label: n, actions: t, onAction: l, status: s, moreLabel: a, leading: c }) {
2155
2160
  var G;
2156
- const h = t.filter((p) => p.entries === void 0 || p.entries.length > 0), d = P(null), m = P(null), b = P(null), [i, g] = D(yn), [f, v] = D(null), [u, y] = D("first"), [S, T] = D(null), [M, E] = D(null), _ = kt(h), N = _.flat(), I = ((G = N.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : G.id) ?? null, K = xt(h.filter((p) => p.id !== I)), z = N.filter((p) => p.overflow === 0), k = N.filter((p) => p.overflow !== 0), F = z.length === 1 ? z[0] ?? null : null, U = JSON.stringify([h.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), r ?? "", a !== void 0]), Y = (p) => /* @__PURE__ */ new Set([...z.filter((L) => L !== F || p.size > 0).map((L) => L.id), ...p]), W = Ie(() => {
2157
- const p = d.current, L = m.current;
2161
+ const f = t.filter((p) => p.entries === void 0 || p.entries.length > 0), u = P(null), m = P(null), _ = P(null), [i, v] = D(yn), [h, w] = D(null), [r, g] = D("first"), [T, x] = D(null), [M, E] = D(null), b = kt(f), N = b.flat(), I = ((G = N.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : G.id) ?? null, K = xt(f.filter((p) => p.id !== I)), z = N.filter((p) => p.overflow === 0), k = N.filter((p) => p.overflow !== 0), F = z.length === 1 ? z[0] ?? null : null, U = JSON.stringify([f.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), s ?? "", c !== void 0]), Y = (p) => /* @__PURE__ */ new Set([...z.filter((L) => L !== F || p.size > 0).map((L) => L.id), ...p]), W = Ie(() => {
2162
+ const p = u.current, L = m.current;
2158
2163
  if (p === null || L === null) return;
2159
- const V = getComputedStyle(p), me = parseFloat(V.columnGap || "0") || 0, ae = p.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0), he = (A) => {
2160
- var x;
2161
- return ((x = L.querySelector(A)) == null ? void 0 : x.getBoundingClientRect().width) ?? 0;
2162
- }, Se = he('[data-measure="leading"]'), We = he('[data-measure="separator"]'), Be = he('[data-measure="more"]'), Te = (A, x) => he(`[data-measure="${x ? "full" : "icon"}"][data-measure-action="${CSS.escape(A)}"]`), Ee = (A, x) => {
2163
- const O = Y(x), se = F !== null && !O.has(F.id) ? F : null, Q = _.map((He) => He.filter((q) => !O.has(q.id) && q !== se)).filter((He) => He.length > 0), ke = [...Q.flat(), ...se !== null ? [se] : []], Fe = ke.length + (Q.length - 1) + (O.size > 0 ? 1 : 0) + (Se > 0 ? 1 : 0);
2164
- return Se + ke.reduce((He, q) => He + Te(q.id, !A.has(q.id)), 0) + We * Math.max(0, Q.length - 1) + (O.size > 0 ? Be : 0) + me * Math.max(0, Fe - 1);
2165
- }, R = k.filter((A) => A.id !== I && !K.some((x) => x.includes(A.id))).map((A) => A.id), J = [...K, ...[...R].reverse().map((A) => [A]), ...I !== null ? [[I]] : []], Ne = [...F !== null ? [[F.id]] : [], ...J];
2164
+ const V = getComputedStyle(p), me = parseFloat(V.columnGap || "0") || 0, re = p.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0), he = (A) => {
2165
+ var C;
2166
+ return ((C = L.querySelector(A)) == null ? void 0 : C.getBoundingClientRect().width) ?? 0;
2167
+ }, Se = he('[data-measure="leading"]'), We = he('[data-measure="separator"]'), Fe = he('[data-measure="more"]'), Te = (A, C) => he(`[data-measure="${C ? "full" : "icon"}"][data-measure-action="${CSS.escape(A)}"]`), Ee = (A, C) => {
2168
+ const O = Y(C), se = F !== null && !O.has(F.id) ? F : null, Q = b.map((Re) => Re.filter((q) => !O.has(q.id) && q !== se)).filter((Re) => Re.length > 0), ke = [...Q.flat(), ...se !== null ? [se] : []], He = ke.length + (Q.length - 1) + (O.size > 0 ? 1 : 0) + (Se > 0 ? 1 : 0);
2169
+ return Se + ke.reduce((Re, q) => Re + Te(q.id, !A.has(q.id)), 0) + We * Math.max(0, Q.length - 1) + (O.size > 0 ? Fe : 0) + me * Math.max(0, He - 1);
2170
+ }, R = k.filter((A) => A.id !== I && !K.some((C) => C.includes(A.id))).map((A) => A.id), J = [...K, ...[...R].reverse().map((A) => [A]), ...I !== null ? [[I]] : []], Ne = [...F !== null ? [[F.id]] : [], ...J];
2166
2171
  let de = null;
2167
- if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= ae) de = yn;
2172
+ if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= re) de = yn;
2168
2173
  else {
2169
2174
  const A = /* @__PURE__ */ new Set();
2170
- for (const x of Ne) {
2171
- for (const O of x) A.add(O);
2172
- if (Ee(A, /* @__PURE__ */ new Set()) <= ae) {
2175
+ for (const C of Ne) {
2176
+ for (const O of C) A.add(O);
2177
+ if (Ee(A, /* @__PURE__ */ new Set()) <= re) {
2173
2178
  de = { bare: A, hidden: /* @__PURE__ */ new Set() };
2174
2179
  break;
2175
2180
  }
2176
2181
  }
2177
2182
  }
2178
2183
  if (de === null) {
2179
- const A = new Set(Ne.flat()), x = /* @__PURE__ */ new Set(), O = () => x.size + z.length >= 2;
2184
+ const A = new Set(Ne.flat()), C = /* @__PURE__ */ new Set(), O = () => C.size + z.length >= 2;
2180
2185
  for (const se of J) {
2181
- for (const Q of se) x.add(Q);
2182
- if (O() && Ee(A, x) <= ae) break;
2186
+ for (const Q of se) C.add(Q);
2187
+ if (O() && Ee(A, C) <= re) break;
2183
2188
  }
2184
- O() || x.clear(), de = { bare: A, hidden: x };
2189
+ O() || C.clear(), de = { bare: A, hidden: C };
2185
2190
  }
2186
- const o = de;
2187
- g((A) => wn(A.bare, o.bare) && wn(A.hidden, o.hidden) ? A : o);
2191
+ const d = de;
2192
+ v((A) => wn(A.bare, d.bare) && wn(A.hidden, d.hidden) ? A : d);
2188
2193
  }, [U]);
2189
2194
  $e(W, [W]), ee(() => {
2190
- const p = d.current;
2195
+ const p = u.current;
2191
2196
  if (p === null || typeof ResizeObserver > "u") return;
2192
2197
  const L = new ResizeObserver(() => W());
2193
2198
  return L.observe(p), () => L.disconnect();
@@ -2202,21 +2207,21 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
2202
2207
  L = !1, p.removeEventListener("loadingdone", V);
2203
2208
  };
2204
2209
  }, [W]);
2205
- const j = Y(i.hidden), X = F !== null && !j.has(F.id) ? F : null, ne = (p) => j.has(p.id) || p === X, _e = [..._.map((p) => p.filter((L) => !ne(L))).filter((p) => p.length > 0).flat(), ...X !== null ? [X] : []], oe = (p) => N.find((L) => L.id === p), ue = [...K.flat(), ...k.filter((p) => p.id !== I && !K.some((L) => L.includes(p.id))).map((p) => p.id).reverse()], Ce = [
2210
+ const j = Y(i.hidden), X = F !== null && !j.has(F.id) ? F : null, ne = (p) => j.has(p.id) || p === X, be = [...b.map((p) => p.filter((L) => !ne(L))).filter((p) => p.length > 0).flat(), ...X !== null ? [X] : []], oe = (p) => N.find((L) => L.id === p), ue = [...K.flat(), ...k.filter((p) => p.id !== I && !K.some((L) => L.includes(p.id))).map((p) => p.id).reverse()], Ce = [
2206
2211
  ...I !== null && i.hidden.has(I) ? [oe(I)] : [],
2207
2212
  ...ue.filter((p) => i.hidden.has(p)).map(oe),
2208
2213
  ...j.size > 0 ? z : []
2209
- ].filter((p) => p !== void 0 && j.has(p.id)), pe = new Set(k.filter((p) => !K.some((L) => L.includes(p.id))).map((p) => p.id)), le = [..._e.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], be = S !== null && le.includes(S) ? S : le[0] ?? null, ve = (p) => {
2210
- var ae, he;
2211
- const L = le.indexOf(be ?? "");
2214
+ ].filter((p) => p !== void 0 && j.has(p.id)), pe = new Set(k.filter((p) => !K.some((L) => L.includes(p.id))).map((p) => p.id)), le = [...be.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], _e = T !== null && le.includes(T) ? T : le[0] ?? null, ve = (p) => {
2215
+ var re, he;
2216
+ const L = le.indexOf(_e ?? "");
2212
2217
  let V = null;
2213
- if (p.key === "ArrowRight" ? V = Math.min(le.length - 1, L + 1) : p.key === "ArrowLeft" ? V = Math.max(0, L - 1) : p.key === "Home" ? V = 0 : p.key === "End" ? V = le.length - 1 : p.key === "Escape" && E(be), V === null) return;
2218
+ if (p.key === "ArrowRight" ? V = Math.min(le.length - 1, L + 1) : p.key === "ArrowLeft" ? V = Math.max(0, L - 1) : p.key === "Home" ? V = 0 : p.key === "End" ? V = le.length - 1 : p.key === "Escape" && E(_e), V === null) return;
2214
2219
  p.preventDefault();
2215
2220
  const me = le[V] ?? null;
2216
- T(me), (he = (ae = d.current) == null ? void 0 : ae.querySelector(`[data-stop="${CSS.escape(me ?? "")}"]`)) == null || he.focus();
2221
+ x(me), (he = (re = u.current) == null ? void 0 : re.querySelector(`[data-stop="${CSS.escape(me ?? "")}"]`)) == null || he.focus();
2217
2222
  }, ye = Ce.map((p) => ({
2218
2223
  id: p.id,
2219
- label: /* @__PURE__ */ c($, { children: [
2224
+ label: /* @__PURE__ */ o($, { children: [
2220
2225
  /* @__PURE__ */ e(je, { name: p.icon }),
2221
2226
  p.label
2222
2227
  ] }),
@@ -2229,12 +2234,12 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
2229
2234
  l(p.id);
2230
2235
  return;
2231
2236
  }
2232
- const L = (V = b.current) == null ? void 0 : V.getBoundingClientRect();
2233
- y("first"), v({ which: p.id, x: (L == null ? void 0 : L.left) ?? 0, y: (L == null ? void 0 : L.bottom) ?? 0 });
2237
+ const L = (V = _.current) == null ? void 0 : V.getBoundingClientRect();
2238
+ g("first"), w({ which: p.id, x: (L == null ? void 0 : L.left) ?? 0, y: (L == null ? void 0 : L.bottom) ?? 0 });
2234
2239
  }
2235
- })), te = f === null || f.which === "more" ? void 0 : N.find((p) => p.id === f.which), we = ((te == null ? void 0 : te.entries) ?? []).map((p) => ({
2240
+ })), te = h === null || h.which === "more" ? void 0 : N.find((p) => p.id === h.which), we = ((te == null ? void 0 : te.entries) ?? []).map((p) => ({
2236
2241
  id: p.id,
2237
- label: /* @__PURE__ */ c($, { children: [
2242
+ label: /* @__PURE__ */ o($, { children: [
2238
2243
  p.icon !== void 0 ? /* @__PURE__ */ e(je, { name: p.icon }) : null,
2239
2244
  p.label
2240
2245
  ] }),
@@ -2243,87 +2248,87 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
2243
2248
  onSelect: () => {
2244
2249
  p.disabled || l(p.id);
2245
2250
  }
2246
- })), w = (p, L, V) => {
2251
+ })), y = (p, L, V) => {
2247
2252
  const me = L.getBoundingClientRect();
2248
- y(V), v({ which: p, x: me.left, y: me.bottom });
2249
- }, C = k.length + (F !== null ? 1 : 0), Z = (p) => /* @__PURE__ */ e(
2253
+ g(V), w({ which: p, x: me.left, y: me.bottom });
2254
+ }, S = k.length + (F !== null ? 1 : 0), Z = (p) => /* @__PURE__ */ e(
2250
2255
  Mt,
2251
2256
  {
2252
2257
  action: p,
2253
2258
  labels: !i.bare.has(p.id),
2254
2259
  overflowed: j.has(p.id),
2255
2260
  pinned: pe.has(p.id),
2256
- tabbable: be === p.id,
2261
+ tabbable: _e === p.id,
2257
2262
  tipOff: M === p.id,
2258
- menuOpen: (f == null ? void 0 : f.which) === p.id,
2263
+ menuOpen: (h == null ? void 0 : h.which) === p.id,
2259
2264
  onChoose: (L, V) => {
2260
- p.entries === void 0 ? l(p.id) : (f == null ? void 0 : f.which) === p.id && V === null ? v(null) : w(p.id, L, V ?? "first");
2265
+ p.entries === void 0 ? l(p.id) : (h == null ? void 0 : h.which) === p.id && V === null ? w(null) : y(p.id, L, V ?? "first");
2261
2266
  },
2262
2267
  onFocus: () => {
2263
- T(p.id), E(null);
2268
+ x(p.id), E(null);
2264
2269
  }
2265
2270
  },
2266
2271
  p.id
2267
2272
  );
2268
- return /* @__PURE__ */ c(
2273
+ return /* @__PURE__ */ o(
2269
2274
  "div",
2270
2275
  {
2271
- ref: d,
2276
+ ref: u,
2272
2277
  role: "toolbar",
2273
2278
  "aria-label": n,
2274
2279
  className: H(
2275
2280
  "cms-pane-toolbar",
2276
- C > 0 && i.bare.size >= C && "cms-pane-toolbar--labels-hidden",
2277
- i.bare.size > 0 && i.bare.size < C && "cms-pane-toolbar--labels-partly-hidden"
2281
+ S > 0 && i.bare.size >= S && "cms-pane-toolbar--labels-hidden",
2282
+ i.bare.size > 0 && i.bare.size < S && "cms-pane-toolbar--labels-partly-hidden"
2278
2283
  ),
2279
2284
  onKeyDown: ve,
2280
2285
  children: [
2281
- a !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: a }) : null,
2282
- _.map((p, L) => {
2283
- const V = p.filter((ae) => !ne(ae)), me = _.slice(0, L).some((ae) => ae.some((he) => !ne(he)));
2284
- return /* @__PURE__ */ c("div", { className: "cms-pane-toolbar__group-wrap", children: [
2286
+ c !== void 0 ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__leading", children: c }) : null,
2287
+ b.map((p, L) => {
2288
+ const V = p.filter((re) => !ne(re)), me = b.slice(0, L).some((re) => re.some((he) => !ne(he)));
2289
+ return /* @__PURE__ */ o("div", { className: "cms-pane-toolbar__group-wrap", children: [
2285
2290
  V.length > 0 && me ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
2286
- /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: V.length === 0, children: p.filter((ae) => ae !== X).map((ae) => Z(ae)) })
2291
+ /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group", hidden: V.length === 0, children: p.filter((re) => re !== X).map((re) => Z(re)) })
2287
2292
  ] }, L);
2288
2293
  }),
2289
2294
  X !== null ? /* @__PURE__ */ e("div", { className: "cms-pane-toolbar__group cms-pane-toolbar__lone", children: Z(X) }) : null,
2290
2295
  Ce.length > 0 ? /* @__PURE__ */ e(
2291
2296
  "button",
2292
2297
  {
2293
- ref: b,
2298
+ ref: _,
2294
2299
  type: "button",
2295
2300
  className: "cms-icon-button cms-pane-toolbar__more",
2296
2301
  "data-stop": "more",
2297
- "aria-label": s,
2298
- title: s,
2302
+ "aria-label": a,
2303
+ title: a,
2299
2304
  "aria-haspopup": "menu",
2300
- "aria-expanded": (f == null ? void 0 : f.which) === "more",
2301
- tabIndex: be === "more" ? 0 : -1,
2302
- onFocus: () => T("more"),
2305
+ "aria-expanded": (h == null ? void 0 : h.which) === "more",
2306
+ tabIndex: _e === "more" ? 0 : -1,
2307
+ onFocus: () => x("more"),
2303
2308
  onClick: (p) => {
2304
- (f == null ? void 0 : f.which) === "more" ? v(null) : w("more", p.currentTarget, "first");
2309
+ (h == null ? void 0 : h.which) === "more" ? w(null) : y("more", p.currentTarget, "first");
2305
2310
  },
2306
2311
  onKeyDown: (p) => {
2307
- (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), w("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2312
+ (p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), y("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
2308
2313
  },
2309
2314
  children: /* @__PURE__ */ e(B, { name: "more" })
2310
2315
  }
2311
2316
  ) : null,
2312
- r !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: r, children: r }) : null,
2313
- /* @__PURE__ */ e(Ke, { at: (f == null ? void 0 : f.which) === "more" ? f : null, items: ye, onClose: () => v(null), label: s, focus: u }),
2314
- /* @__PURE__ */ e(Ke, { at: te !== void 0 ? f : null, items: we, onClose: () => v(null), label: (te == null ? void 0 : te.label) ?? "", focus: u }),
2315
- /* @__PURE__ */ c("div", { ref: m, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2316
- a !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: a }) : null,
2317
+ s !== void 0 ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__status", title: s, children: s }) : null,
2318
+ /* @__PURE__ */ e(Ke, { at: (h == null ? void 0 : h.which) === "more" ? h : null, items: ye, onClose: () => w(null), label: a, focus: r }),
2319
+ /* @__PURE__ */ e(Ke, { at: te !== void 0 ? h : null, items: we, onClose: () => w(null), label: (te == null ? void 0 : te.label) ?? "", focus: r }),
2320
+ /* @__PURE__ */ o("div", { ref: m, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
2321
+ c !== void 0 ? /* @__PURE__ */ e("div", { "data-measure": "leading", children: c }) : null,
2317
2322
  /* @__PURE__ */ e("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
2318
2323
  /* @__PURE__ */ e("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ e(B, { name: "more" }) }),
2319
- N.map((p) => /* @__PURE__ */ c("span", { children: [
2320
- /* @__PURE__ */ c("span", { "data-measure": "full", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2324
+ N.map((p) => /* @__PURE__ */ o("span", { children: [
2325
+ /* @__PURE__ */ o("span", { "data-measure": "full", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2321
2326
  /* @__PURE__ */ e(je, { name: p.icon }),
2322
2327
  /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2323
2328
  p.entries !== void 0 ? /* @__PURE__ */ e(nn, {}) : null
2324
2329
  ] }),
2325
- /* @__PURE__ */ c("span", { "data-measure": "icon", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", Ue(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2326
- Ue(p.icon) !== null ? /* @__PURE__ */ e(je, { name: p.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2330
+ /* @__PURE__ */ o("span", { "data-measure": "icon", "data-measure-action": p.id, className: H("cms-pane-toolbar__action", Be(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
2331
+ Be(p.icon) !== null ? /* @__PURE__ */ e(je, { name: p.icon }) : /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", children: p.label }),
2327
2332
  p.entries !== void 0 ? /* @__PURE__ */ e(nn, {}) : null
2328
2333
  ] })
2329
2334
  ] }, p.id))
@@ -2332,55 +2337,55 @@ function fl({ label: n, actions: t, onAction: l, status: r, moreLabel: s, leadin
2332
2337
  }
2333
2338
  );
2334
2339
  }
2335
- const Oe = "tip";
2336
- function Mt({ action: n, labels: t, overflowed: l, pinned: r, tabbable: s, tipOff: a, menuOpen: h, onChoose: d, onFocus: m }) {
2337
- const [b, i] = D(!1);
2340
+ const Pe = "tip";
2341
+ function Mt({ action: n, labels: t, overflowed: l, pinned: s, tabbable: a, tipOff: c, menuOpen: f, onChoose: u, onFocus: m }) {
2342
+ const [_, i] = D(!1);
2338
2343
  ee(() => {
2339
2344
  if (!n.busy) {
2340
2345
  i(!1);
2341
2346
  return;
2342
2347
  }
2343
- const _ = setTimeout(() => i(!0), Je);
2344
- return () => clearTimeout(_);
2348
+ const b = setTimeout(() => i(!0), Je);
2349
+ return () => clearTimeout(b);
2345
2350
  }, [n.busy]);
2346
- const g = Ue(n.icon) === null, f = t || g, v = n.disabled && n.reason ? n.reason : null, u = v ?? (f ? null : n.label), y = fe(), [S, T] = D(!1), M = an(), E = n.entries !== void 0;
2347
- return /* @__PURE__ */ c(
2351
+ const v = Be(n.icon) === null, h = t || v, w = n.disabled && n.reason ? n.reason : null, r = w ?? (h ? null : n.label), g = fe(), [T, x] = D(!1), M = rn(), E = n.entries !== void 0;
2352
+ return /* @__PURE__ */ o(
2348
2353
  "button",
2349
2354
  {
2350
2355
  type: "button",
2351
- className: H("cms-pane-toolbar__action", !f && "cms-pane-toolbar__action--bare", g && "cms-pane-toolbar__action--text", E && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2356
+ className: H("cms-pane-toolbar__action", !h && "cms-pane-toolbar__action--bare", v && "cms-pane-toolbar__action--text", E && "cms-pane-toolbar__action--menu", n.danger && "is-danger"),
2352
2357
  "data-action": n.id,
2353
2358
  "data-stop": n.id,
2354
2359
  ...l ? { "data-overflowed": "" } : {},
2355
- ...r ? { "data-pinned": "" } : {},
2360
+ ...s ? { "data-pinned": "" } : {},
2356
2361
  hidden: l,
2357
2362
  "aria-label": n.label,
2358
2363
  "aria-disabled": n.disabled || void 0,
2359
2364
  "aria-busy": n.busy || void 0,
2360
- ...E ? { "aria-haspopup": "menu", "aria-expanded": h } : {},
2361
- ...v === null ? {} : { "aria-describedby": y },
2362
- ...S && v !== null ? { "data-reason-shown": "" } : {},
2363
- ...M.dismissed(Oe) ? { "data-tip-dismissed": "" } : {},
2364
- tabIndex: s ? 0 : -1,
2365
+ ...E ? { "aria-haspopup": "menu", "aria-expanded": f } : {},
2366
+ ...w === null ? {} : { "aria-describedby": g },
2367
+ ...T && w !== null ? { "data-reason-shown": "" } : {},
2368
+ ...M.dismissed(Pe) ? { "data-tip-dismissed": "" } : {},
2369
+ tabIndex: a ? 0 : -1,
2365
2370
  onFocus: () => {
2366
- m(), M.focusIn(Oe);
2371
+ m(), M.focusIn(Pe);
2367
2372
  },
2368
2373
  onBlur: () => {
2369
- T(!1), M.focusOut(Oe);
2374
+ x(!1), M.focusOut(Pe);
2370
2375
  },
2371
- onMouseEnter: () => M.pointerIn(Oe),
2372
- onMouseLeave: () => M.pointerOut(Oe),
2373
- onKeyDown: (_) => {
2374
- _.key === "Escape" && (T(!1), M.dismiss(Oe)), E && (_.key === "ArrowDown" || _.key === "ArrowUp") && (_.preventDefault(), v !== null ? T(!0) : !n.disabled && !n.busy && d(_.currentTarget, _.key === "ArrowUp" ? "last" : "first"));
2376
+ onMouseEnter: () => M.pointerIn(Pe),
2377
+ onMouseLeave: () => M.pointerOut(Pe),
2378
+ onKeyDown: (b) => {
2379
+ b.key === "Escape" && (x(!1), M.dismiss(Pe)), E && (b.key === "ArrowDown" || b.key === "ArrowUp") && (b.preventDefault(), w !== null ? x(!0) : !n.disabled && !n.busy && u(b.currentTarget, b.key === "ArrowUp" ? "last" : "first"));
2375
2380
  },
2376
- onClick: (_) => {
2377
- v !== null ? (T(!0), M.show(Oe)) : !n.disabled && !n.busy && d(_.currentTarget, null);
2381
+ onClick: (b) => {
2382
+ w !== null ? (x(!0), M.show(Pe)) : !n.disabled && !n.busy && u(b.currentTarget, null);
2378
2383
  },
2379
2384
  children: [
2380
- b ? /* @__PURE__ */ e(re, { name: "spinner" }) : /* @__PURE__ */ e(je, { name: n.icon }),
2381
- f ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
2385
+ _ ? /* @__PURE__ */ e(ae, { name: "spinner" }) : /* @__PURE__ */ e(je, { name: n.icon }),
2386
+ h ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: n.label }) : null,
2382
2387
  E ? /* @__PURE__ */ e(nn, {}) : null,
2383
- v !== null || u !== null && !a ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: y, children: u }) : null
2388
+ w !== null || r !== null && !c ? /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: g, children: r }) : null
2384
2389
  ]
2385
2390
  }
2386
2391
  );
@@ -2389,44 +2394,44 @@ function nn() {
2389
2394
  return /* @__PURE__ */ e("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(B, { name: "chevron-down", size: 14 }) });
2390
2395
  }
2391
2396
  function je({ name: n }) {
2392
- const t = Ue(n);
2397
+ const t = Be(n);
2393
2398
  return t === null ? null : /* @__PURE__ */ e(B, { name: t, size: 18 });
2394
2399
  }
2395
- function pl({ title: n, body: t = null, time: l = null, unread: r, unreadLabel: s, expandLabel: a, collapseLabel: h, action: d = null, onRead: m, leading: b }) {
2396
- const [i, g] = D(!1), f = fe(), v = () => {
2397
- r && m();
2398
- }, u = (d == null ? void 0 : d.presentation) === "row" && d.onAction !== void 0, y = (d == null ? void 0 : d.presentation) === "button" && d.onAction !== void 0 ? d : null, S = () => {
2399
- var T;
2400
- v(), u && ((T = d.onAction) == null || T.call(d));
2400
+ function pl({ title: n, body: t = null, time: l = null, unread: s, unreadLabel: a, expandLabel: c, collapseLabel: f, action: u = null, onRead: m, leading: _ }) {
2401
+ const [i, v] = D(!1), h = fe(), w = () => {
2402
+ s && m();
2403
+ }, r = (u == null ? void 0 : u.presentation) === "row" && u.onAction !== void 0, g = (u == null ? void 0 : u.presentation) === "button" && u.onAction !== void 0 ? u : null, T = () => {
2404
+ var x;
2405
+ w(), r && ((x = u.onAction) == null || x.call(u));
2401
2406
  };
2402
- return /* @__PURE__ */ c("article", { className: H("cms-notification", r && "is-unread", i && "is-expanded", u && "is-row-action"), "data-state": r ? "unread" : "read", children: [
2403
- /* @__PURE__ */ c(
2407
+ return /* @__PURE__ */ o("article", { className: H("cms-notification", s && "is-unread", i && "is-expanded", r && "is-row-action"), "data-state": s ? "unread" : "read", children: [
2408
+ /* @__PURE__ */ o(
2404
2409
  "div",
2405
2410
  {
2406
2411
  className: "cms-notification__row",
2407
2412
  role: "button",
2408
2413
  tabIndex: 0,
2409
- "aria-describedby": t === null ? void 0 : f,
2410
- onClick: S,
2411
- onKeyDown: (T) => {
2412
- T.target !== T.currentTarget || T.key !== "Enter" && T.key !== " " || (T.preventDefault(), S());
2414
+ "aria-describedby": t === null ? void 0 : h,
2415
+ onClick: T,
2416
+ onKeyDown: (x) => {
2417
+ x.target !== x.currentTarget || x.key !== "Enter" && x.key !== " " || (x.preventDefault(), T());
2413
2418
  },
2414
2419
  children: [
2415
- b != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: b }) : null,
2416
- /* @__PURE__ */ c("span", { className: "cms-notification__text", children: [
2417
- /* @__PURE__ */ c("span", { className: "cms-notification__head", children: [
2418
- /* @__PURE__ */ c("span", { className: "cms-notification__title", children: [
2419
- r ? /* @__PURE__ */ c("span", { className: "cms-visually-hidden", children: [
2420
- s,
2420
+ _ != null ? /* @__PURE__ */ e("span", { className: "cms-notification__leading", children: _ }) : null,
2421
+ /* @__PURE__ */ o("span", { className: "cms-notification__text", children: [
2422
+ /* @__PURE__ */ o("span", { className: "cms-notification__head", children: [
2423
+ /* @__PURE__ */ o("span", { className: "cms-notification__title", children: [
2424
+ s ? /* @__PURE__ */ o("span", { className: "cms-visually-hidden", children: [
2425
+ a,
2421
2426
  " "
2422
2427
  ] }) : null,
2423
2428
  n
2424
2429
  ] }),
2425
2430
  l !== null ? /* @__PURE__ */ e("span", { className: "cms-notification__time", children: l }) : null
2426
2431
  ] }),
2427
- t !== null && t !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: f, children: t }) : null
2432
+ t !== null && t !== "" ? /* @__PURE__ */ e("span", { className: "cms-notification__body", id: h, children: t }) : null
2428
2433
  ] }),
2429
- r ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2434
+ s ? /* @__PURE__ */ e("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
2430
2435
  ]
2431
2436
  }
2432
2437
  ),
@@ -2436,25 +2441,25 @@ function pl({ title: n, body: t = null, time: l = null, unread: r, unreadLabel:
2436
2441
  type: "button",
2437
2442
  className: "cms-notification__chevron",
2438
2443
  "aria-expanded": i,
2439
- "aria-controls": f,
2440
- "aria-label": i ? h : a,
2441
- title: i ? h : a,
2444
+ "aria-controls": h,
2445
+ "aria-label": i ? f : c,
2446
+ title: i ? f : c,
2442
2447
  onClick: () => {
2443
- i || v(), g((T) => !T);
2448
+ i || w(), v((x) => !x);
2444
2449
  },
2445
2450
  children: /* @__PURE__ */ e(B, { name: "chevron-down", size: 18 })
2446
2451
  }
2447
2452
  ) : null,
2448
- y !== null ? /* @__PURE__ */ e(
2453
+ g !== null ? /* @__PURE__ */ e(
2449
2454
  "button",
2450
2455
  {
2451
2456
  type: "button",
2452
2457
  className: "cms-button cms-notification__action",
2453
2458
  onClick: () => {
2454
- var T;
2455
- v(), (T = y.onAction) == null || T.call(y);
2459
+ var x;
2460
+ w(), (x = g.onAction) == null || x.call(g);
2456
2461
  },
2457
- children: y.label
2462
+ children: g.label
2458
2463
  }
2459
2464
  ) : null
2460
2465
  ] });
@@ -2462,7 +2467,7 @@ function pl({ title: n, body: t = null, time: l = null, unread: r, unreadLabel:
2462
2467
  function Ct(n) {
2463
2468
  return n === "allowed" || n === "elevate" || n === "denied";
2464
2469
  }
2465
- function bl(n, t) {
2470
+ function _l(n, t) {
2466
2471
  if (!Ct(n))
2467
2472
  return t.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
2468
2473
  switch (n) {
@@ -2477,8 +2482,8 @@ function bl(n, t) {
2477
2482
  function St(n, t) {
2478
2483
  if (!n) return;
2479
2484
  if (typeof n.get == "function") return n.get(t) ?? void 0;
2480
- const l = n, r = Object.keys(l).find((s) => s.toLowerCase() === t.toLowerCase());
2481
- return r === void 0 ? void 0 : l[r];
2485
+ const l = n, s = Object.keys(l).find((a) => a.toLowerCase() === t.toLowerCase());
2486
+ return s === void 0 ? void 0 : l[s];
2482
2487
  }
2483
2488
  function Et(n) {
2484
2489
  if (n && typeof n == "object") {
@@ -2487,197 +2492,197 @@ function Et(n) {
2487
2492
  if (typeof t.title == "string" && t.title !== "") return t.title;
2488
2493
  }
2489
2494
  }
2490
- function _l(n, t, l, r) {
2495
+ function bl(n, t, l, s) {
2491
2496
  if (n !== 403) return { kind: "none" };
2492
- const s = Et(l);
2493
- return St(t, "X-Elevation-Required") !== void 0 ? r.elevates ? { kind: "elevation-required", message: s ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: s ?? "The server refused this." };
2497
+ const a = Et(l);
2498
+ return St(t, "X-Elevation-Required") !== void 0 ? s.elevates ? { kind: "elevation-required", message: a ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: a ?? "The server refused this." };
2494
2499
  }
2495
2500
  const tn = "coolms-kit:reread";
2496
2501
  function vl() {
2497
2502
  window.dispatchEvent(new Event(tn));
2498
2503
  }
2499
2504
  function gl(n) {
2500
- const [t, l] = D(void 0), [r, s] = D(void 0), [a, h] = D(!0), d = P(n);
2501
- d.current = n;
2502
- const m = P(0), b = Ie(() => {
2505
+ const [t, l] = D(void 0), [s, a] = D(void 0), [c, f] = D(!0), u = P(n);
2506
+ u.current = n;
2507
+ const m = P(0), _ = Ie(() => {
2503
2508
  const i = ++m.current;
2504
- h(!0), d.current().then(
2505
- (g) => {
2506
- i === m.current && (l(g), s(void 0), h(!1));
2509
+ f(!0), u.current().then(
2510
+ (v) => {
2511
+ i === m.current && (l(v), a(void 0), f(!1));
2507
2512
  },
2508
- (g) => {
2509
- i === m.current && (s(g), h(!1));
2513
+ (v) => {
2514
+ i === m.current && (a(v), f(!1));
2510
2515
  }
2511
2516
  );
2512
2517
  }, []);
2513
2518
  return ee(() => {
2514
- b();
2515
- const i = () => b();
2519
+ _();
2520
+ const i = () => _();
2516
2521
  return window.addEventListener("focus", i), window.addEventListener(tn, i), () => {
2517
2522
  window.removeEventListener("focus", i), window.removeEventListener(tn, i);
2518
2523
  };
2519
- }, [b]), { value: t, error: r, loading: a, reread: b };
2524
+ }, [_]), { value: t, error: s, loading: c, reread: _ };
2520
2525
  }
2521
2526
  function yl(n) {
2522
2527
  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 };
2523
2528
  }
2524
2529
  const At = "/errors/client-update-required";
2525
2530
  function Tt(n, t) {
2526
- const l = n.split(".").map((s) => Number.parseInt(s, 10) || 0), r = t.split(".").map((s) => Number.parseInt(s, 10) || 0);
2527
- for (let s = 0; s < Math.max(l.length, r.length); s++) {
2528
- const a = l[s] ?? 0, h = r[s] ?? 0;
2529
- if (a !== h) return a < h;
2531
+ const l = n.split(".").map((a) => Number.parseInt(a, 10) || 0), s = t.split(".").map((a) => Number.parseInt(a, 10) || 0);
2532
+ for (let a = 0; a < Math.max(l.length, s.length); a++) {
2533
+ const c = l[a] ?? 0, f = s[a] ?? 0;
2534
+ if (c !== f) return c < f;
2530
2535
  }
2531
2536
  return !1;
2532
2537
  }
2533
2538
  function wl(n) {
2534
2539
  return n.problemType !== void 0 && n.problemType.endsWith(At) ? !0 : n.minimumVersion !== void 0 && Tt(n.version, n.minimumVersion);
2535
2540
  }
2536
- const Pe = "primary", Nn = 4, Lt = 48;
2541
+ const ze = "primary", Nn = 4, Lt = 48;
2537
2542
  function Dt(n, t, l) {
2538
- const r = n.querySelector(":scope > .cms-screen__bar");
2539
- return l <= t.scrollHeight - t.clientHeight - ((r == null ? void 0 : r.offsetHeight) ?? 0);
2543
+ const s = n.querySelector(":scope > .cms-screen__bar");
2544
+ return l <= t.scrollHeight - t.clientHeight - ((s == null ? void 0 : s.offsetHeight) ?? 0);
2540
2545
  }
2541
2546
  const It = 800, $t = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
2542
2547
  function Bt(n, t) {
2543
- const [l, r] = D(!1);
2548
+ const [l, s] = D(!1);
2544
2549
  return ee(() => {
2545
- const s = n.current;
2546
- if (s === null || !t) {
2547
- r(!1);
2550
+ const a = n.current;
2551
+ if (a === null || !t) {
2552
+ s(!1);
2548
2553
  return;
2549
2554
  }
2550
- const a = /* @__PURE__ */ new WeakMap();
2551
- let h = Number.NEGATIVE_INFINITY, d = null;
2552
- const m = (f) => {
2553
- h = performance.now(), d = f.target;
2554
- }, b = (f) => {
2555
- const v = f.target;
2556
- !(v instanceof HTMLElement && (v.isContentEditable || v.closest("input, textarea, select") !== null)) && $t.has(f.key) && m(f);
2557
- }, i = (f) => {
2558
- const v = f.target;
2559
- if (!(v instanceof HTMLElement)) return;
2560
- const u = v.scrollTop, y = a.get(v) ?? 0;
2561
- if (a.set(v, u), u <= 0) {
2562
- r(!1);
2555
+ const c = /* @__PURE__ */ new WeakMap();
2556
+ let f = Number.NEGATIVE_INFINITY, u = null;
2557
+ const m = (h) => {
2558
+ f = performance.now(), u = h.target;
2559
+ }, _ = (h) => {
2560
+ const w = h.target;
2561
+ !(w instanceof HTMLElement && (w.isContentEditable || w.closest("input, textarea, select") !== null)) && $t.has(h.key) && m(h);
2562
+ }, i = (h) => {
2563
+ const w = h.target;
2564
+ if (!(w instanceof HTMLElement)) return;
2565
+ const r = w.scrollTop, g = c.get(w) ?? 0;
2566
+ if (c.set(w, r), r <= 0) {
2567
+ s(!1);
2563
2568
  return;
2564
2569
  }
2565
- performance.now() - h > It || !(d === s || d === document.body || d instanceof Node && v.contains(d)) || (u < y - Nn ? r(!1) : u > y + Nn && u > Lt && Dt(s, v, u) && r(!0));
2566
- }, g = [["wheel", m], ["touchmove", m], ["pointerdown", m], ["keydown", b]];
2567
- for (const [f, v] of g) s.addEventListener(f, v, { capture: !0, passive: !0 });
2568
- return s.addEventListener("scroll", i, { capture: !0, passive: !0 }), () => {
2569
- for (const [f, v] of g) s.removeEventListener(f, v, { capture: !0 });
2570
- s.removeEventListener("scroll", i, { capture: !0 });
2570
+ performance.now() - f > It || !(u === a || u === document.body || u instanceof Node && w.contains(u)) || (r < g - Nn ? s(!1) : r > g + Nn && r > Lt && Dt(a, w, r) && s(!0));
2571
+ }, v = [["wheel", m], ["touchmove", m], ["pointerdown", m], ["keydown", _]];
2572
+ for (const [h, w] of v) a.addEventListener(h, w, { capture: !0, passive: !0 });
2573
+ return a.addEventListener("scroll", i, { capture: !0, passive: !0 }), () => {
2574
+ for (const [h, w] of v) a.removeEventListener(h, w, { capture: !0 });
2575
+ a.removeEventListener("scroll", i, { capture: !0 });
2571
2576
  };
2572
- }, [n, t]), [l, r];
2577
+ }, [n, t]), [l, s];
2573
2578
  }
2574
2579
  const Ft = 64;
2575
- function Ht({ bar: n, leading: t, gap: l, icon: r, iconGap: s, search: a, more: h, globals: d, name: m, choice: b }) {
2576
- const i = [...a ? [r] : [], r, r, ...d], g = i.reduce((v, u) => v + u, 0) + s * (i.length - 1);
2577
- return n - (t > 0 ? t + l : 0) - l - g + 0.01 < Math.min(Ft, m) + b;
2580
+ function Ht({ bar: n, leading: t, gap: l, icon: s, iconGap: a, search: c, more: f, globals: u, name: m, choice: _ }) {
2581
+ const i = [...c ? [s] : [], s, s, ...u], v = i.reduce((w, r) => w + r, 0) + a * (i.length - 1);
2582
+ return n - (t > 0 ? t + l : 0) - l - v + 0.01 < Math.min(Ft, m) + _;
2578
2583
  }
2579
- function Nl({ title: n, back: t, navigation: l, search: r, searching: s, more: a = [], moreLabel: h = "More actions", globals: d, filter: m, primary: b, onRefresh: i, pullText: g, barHidden: f, children: v }) {
2584
+ function Nl({ title: n, back: t, navigation: l, search: s, searching: a, more: c = [], moreLabel: f = "More actions", globals: u, filter: m, primary: _, onRefresh: i, pullText: v, barHidden: h, children: w }) {
2580
2585
  var Te, Ee;
2581
- const u = b === void 0 || ("menu" in b ? !b.menu.some((R) => R.offer.offered) : ((Te = b.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : b, y = u !== void 0 && !("menu" in u) ? ((Ee = u.offer) == null ? void 0 : Ee.refusal) ?? null : null, S = fe(), [T, M] = D(!1), E = an(), _ = P(null), N = P(null), [I, K] = D(!1), [z, k] = D(null), [F, U] = D(null), Y = Ie(() => U(null), []), W = P(!1), j = P(null), X = P(null), ne = P(null), ce = a.some((R) => R.offer.offered), _e = F !== null && ce && s === void 0;
2582
- An(m);
2583
- const oe = m === void 0 ? null : Cn(m), [ue, Ce] = D(!1), pe = P(!1), le = P(!1), be = P(null), ve = m === void 0 ? void 0 : {
2586
+ const r = _ === void 0 || ("menu" in _ ? !_.menu.some((R) => R.offer.offered) : ((Te = _.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : _, g = r !== void 0 && !("menu" in r) ? ((Ee = r.offer) == null ? void 0 : Ee.refusal) ?? null : null, T = fe(), [x, M] = D(!1), E = rn(), b = P(null), N = P(null), [I, K] = D(!1), [z, k] = D(null), [F, U] = D(null), Y = Ie(() => U(null), []), W = P(!1), j = P(null), X = P(null), ne = P(null), ce = c.some((R) => R.offer.offered), be = F !== null && ce && a === void 0;
2587
+ Tn(m);
2588
+ const oe = m === void 0 ? null : Sn(m), [ue, Ce] = D(!1), pe = P(!1), le = P(!1), _e = P(null), ve = m === void 0 ? void 0 : {
2584
2589
  ...m,
2585
2590
  onChange: (R) => {
2586
2591
  pe.current = !0, m.onChange(R);
2587
2592
  }
2588
- }, ye = oe === null ? "" : ` · ${oe.label}`, te = m !== void 0 && m.options.length >= 2, [we, w] = D(!1), C = te && ce && we, Z = JSON.stringify([te, ce, C, r !== void 0, s !== void 0, t !== void 0, n, ye]), G = Ie(() => {
2593
+ }, ye = oe === null ? "" : ` · ${oe.label}`, te = m !== void 0 && m.options.length >= 2, [we, y] = D(!1), S = te && ce && we, Z = JSON.stringify([te, ce, S, s !== void 0, a !== void 0, t !== void 0, n, ye]), G = Ie(() => {
2589
2594
  const R = j.current, J = X.current, Ne = ne.current;
2590
2595
  if (R === null || J === null || Ne === null || !te) return null;
2591
- const de = (Q) => parseFloat(Q) || 0, o = getComputedStyle(R), A = R.getBoundingClientRect().width;
2596
+ const de = (Q) => parseFloat(Q) || 0, d = getComputedStyle(R), A = R.getBoundingClientRect().width;
2592
2597
  if (A === 0) return null;
2593
- const x = (Q) => {
2598
+ const C = (Q) => {
2594
2599
  var ke;
2595
2600
  return ((ke = R.querySelector(`.cms-screen__ruler > [data-ruler="${Q}"]`)) == null ? void 0 : ke.getBoundingClientRect().width) ?? 0;
2596
- }, O = R.querySelector(".cms-screen__leading"), se = (r !== void 0 ? 1 : 0) + (C ? 0 : 1) + 1;
2601
+ }, O = R.querySelector(".cms-screen__leading"), se = (s !== void 0 ? 1 : 0) + (S ? 0 : 1) + 1;
2597
2602
  return Ht({
2598
- bar: A - de(o.paddingLeft) - de(o.paddingRight),
2603
+ bar: A - de(d.paddingLeft) - de(d.paddingRight),
2599
2604
  leading: O === null || O.childNodes.length === 0 ? 0 : de(getComputedStyle(O).minWidth),
2600
- gap: de(o.columnGap),
2605
+ gap: de(d.columnGap),
2601
2606
  icon: Ne.getBoundingClientRect().width,
2602
2607
  iconGap: de(getComputedStyle(J).columnGap),
2603
- search: r !== void 0,
2608
+ search: s !== void 0,
2604
2609
  more: !0,
2605
2610
  globals: Array.from(J.children).slice(se).map((Q) => Q.getBoundingClientRect().width),
2606
- name: x("name"),
2607
- choice: x("choice")
2611
+ name: C("name"),
2612
+ choice: C("choice")
2608
2613
  });
2609
2614
  }, [Z]);
2610
2615
  $e(() => {
2611
2616
  const R = G() ?? we;
2612
- R !== we && pe.current && (le.current = !0), pe.current = !1, w(R);
2617
+ R !== we && pe.current && (le.current = !0), pe.current = !1, y(R);
2613
2618
  }, [G]), ee(() => {
2614
2619
  if (j.current === null || typeof ResizeObserver > "u") return;
2615
2620
  const R = new ResizeObserver(() => {
2616
2621
  const J = G();
2617
- J !== null && w(J);
2622
+ J !== null && y(J);
2618
2623
  });
2619
2624
  for (const J of [j.current, X.current, ...j.current.querySelectorAll(".cms-screen__ruler > span")]) J !== null && R.observe(J);
2620
2625
  return () => R.disconnect();
2621
2626
  }, [G]);
2622
- const p = P(C);
2627
+ const p = P(S);
2623
2628
  $e(() => {
2624
- var Ne, de, o;
2625
- if (p.current === C) return;
2626
- p.current = C, U(null);
2629
+ var Ne, de, d;
2630
+ if (p.current === S) return;
2631
+ p.current = S, U(null);
2627
2632
  const R = document.activeElement;
2628
- (R === document.body && be.current !== null && !be.current.isConnected || le.current && (R === document.body || ((Ne = j.current) == null ? void 0 : Ne.contains(R)) === !0)) && ((o = C ? ne.current : (de = X.current) == null ? void 0 : de.querySelector(".cms-filter-menu")) == null || o.focus()), le.current = !1;
2629
- }, [C]);
2630
- const L = C && oe !== null && m !== void 0 ? `${h}, ${Sn(m)}` : h, me = st(N, i === void 0 ? null : () => {
2633
+ (R === document.body && _e.current !== null && !_e.current.isConnected || le.current && (R === document.body || ((Ne = j.current) == null ? void 0 : Ne.contains(R)) === !0)) && ((d = S ? ne.current : (de = X.current) == null ? void 0 : de.querySelector(".cms-filter-menu")) == null || d.focus()), le.current = !1;
2634
+ }, [S]);
2635
+ const L = S && oe !== null && m !== void 0 ? `${f}, ${En(m)}` : f, me = st(N, i === void 0 ? null : () => {
2631
2636
  I || (K(!0), i().finally(() => K(!1)));
2632
- }), ae = i === void 0 ? null : { distance: me, refreshing: I, text: g ?? null }, he = s !== void 0 || me > 0 || I || _e || ue, [Se, We] = Bt(_, f === void 0 && !he), Be = !he && (f ?? Se);
2633
- return /* @__PURE__ */ c(
2637
+ }), re = i === void 0 ? null : { distance: me, refreshing: I, text: v ?? null }, he = a !== void 0 || me > 0 || I || be || ue, [Se, We] = Bt(b, h === void 0 && !he), Fe = !he && (h ?? Se);
2638
+ return /* @__PURE__ */ o(
2634
2639
  "div",
2635
2640
  {
2636
- ref: _,
2637
- className: H("cms-screen", u !== void 0 && "cms-screen--with-primary"),
2638
- "data-bar-hidden": Be ? "" : void 0,
2641
+ ref: b,
2642
+ className: H("cms-screen", r !== void 0 && "cms-screen--with-primary"),
2643
+ "data-bar-hidden": Fe ? "" : void 0,
2639
2644
  onFocus: (R) => {
2640
- be.current = R.target, Be && R.target instanceof Element && R.target.closest(".cms-screen__bar") !== null && We(!1);
2645
+ _e.current = R.target, Fe && R.target instanceof Element && R.target.closest(".cms-screen__bar") !== null && We(!1);
2641
2646
  },
2642
2647
  children: [
2643
- s !== void 0 ? /* @__PURE__ */ c("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2644
- /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": s.closeLabel, title: s.closeLabel, onClick: s.onClose, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
2645
- /* @__PURE__ */ e("div", { className: "cms-screen__search", children: s.field })
2646
- ] }) : /* @__PURE__ */ c("header", { ref: j, className: "cms-screen__bar", children: [
2647
- /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: t !== void 0 ? t.href !== void 0 ? /* @__PURE__ */ c("a", { className: "cms-screen__back", href: t.href, onClick: t.onBack, children: [
2648
+ a !== void 0 ? /* @__PURE__ */ o("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
2649
+ /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": a.closeLabel, title: a.closeLabel, onClick: a.onClose, children: /* @__PURE__ */ e(B, { name: "chevron-left" }) }),
2650
+ /* @__PURE__ */ e("div", { className: "cms-screen__search", children: a.field })
2651
+ ] }) : /* @__PURE__ */ o("header", { ref: j, className: "cms-screen__bar", children: [
2652
+ /* @__PURE__ */ e("div", { className: "cms-screen__leading", children: t !== void 0 ? t.href !== void 0 ? /* @__PURE__ */ o("a", { className: "cms-screen__back", href: t.href, onClick: t.onBack, children: [
2648
2653
  /* @__PURE__ */ e(B, { name: "chevron-left" }),
2649
2654
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: t.label })
2650
- ] }) : /* @__PURE__ */ c("button", { type: "button", className: "cms-screen__back", onClick: t.onBack, children: [
2655
+ ] }) : /* @__PURE__ */ o("button", { type: "button", className: "cms-screen__back", onClick: t.onBack, children: [
2651
2656
  /* @__PURE__ */ e(B, { name: "chevron-left" }),
2652
2657
  /* @__PURE__ */ e("span", { className: "cms-screen__back-name", children: t.label })
2653
2658
  ] }) : l }),
2654
- oe === null ? /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }) : /* @__PURE__ */ c("h1", { className: "cms-screen__title cms-screen__title--filtered", title: n + ye, children: [
2655
- /* @__PURE__ */ c("span", { className: "cms-screen__title-place", children: [
2659
+ oe === null ? /* @__PURE__ */ e("h1", { className: "cms-screen__title", title: n, children: n }) : /* @__PURE__ */ o("h1", { className: "cms-screen__title cms-screen__title--filtered", title: n + ye, children: [
2660
+ /* @__PURE__ */ o("span", { className: "cms-screen__title-place", children: [
2656
2661
  /* @__PURE__ */ e("span", { className: "cms-screen__title-name", children: n }),
2657
2662
  /* @__PURE__ */ e("span", { className: "cms-screen__title-dot", children: " · " })
2658
2663
  ] }),
2659
2664
  /* @__PURE__ */ e("span", { className: "cms-screen__title-choice", children: oe.label })
2660
2665
  ] }),
2661
- te && ce ? /* @__PURE__ */ c("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
2666
+ te && ce ? /* @__PURE__ */ o("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
2662
2667
  /* @__PURE__ */ e("span", { "data-ruler": "name", children: n }),
2663
2668
  oe !== null ? /* @__PURE__ */ e("span", { "data-ruler": "choice", children: ye }) : null
2664
2669
  ] }) : null,
2665
- /* @__PURE__ */ c("div", { ref: X, className: "cms-screen__trailing", children: [
2666
- r !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": r.label, title: r.label, onClick: r.onOpen, children: /* @__PURE__ */ e(B, { name: "search" }) }) : null,
2667
- ve !== void 0 && !C ? /* @__PURE__ */ e(Tn, { ...ve, iconOnly: !0, onOpenChange: Ce }) : null,
2670
+ /* @__PURE__ */ o("div", { ref: X, className: "cms-screen__trailing", children: [
2671
+ s !== void 0 ? /* @__PURE__ */ e("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": s.label, title: s.label, onClick: s.onOpen, children: /* @__PURE__ */ e(B, { name: "search" }) }) : null,
2672
+ ve !== void 0 && !S ? /* @__PURE__ */ e(Ln, { ...ve, iconOnly: !0, onOpenChange: Ce }) : null,
2668
2673
  ce ? /* @__PURE__ */ e(
2669
2674
  "button",
2670
2675
  {
2671
2676
  ref: ne,
2672
2677
  type: "button",
2673
- className: H("cms-icon-button cms-screen__icon", C && oe !== null && "cms-screen__icon--active"),
2678
+ className: H("cms-icon-button cms-screen__icon", S && oe !== null && "cms-screen__icon--active"),
2674
2679
  "data-action": "more",
2675
2680
  "aria-haspopup": "menu",
2676
- "aria-expanded": _e,
2681
+ "aria-expanded": be,
2677
2682
  "aria-label": L,
2678
2683
  title: L,
2679
2684
  onMouseDown: () => {
2680
- W.current = _e;
2685
+ W.current = be;
2681
2686
  },
2682
2687
  onClick: (R) => {
2683
2688
  const J = R.currentTarget.getBoundingClientRect();
@@ -2686,58 +2691,58 @@ function Nl({ title: n, back: t, navigation: l, search: r, searching: s, more: a
2686
2691
  children: /* @__PURE__ */ e(B, { name: "more" })
2687
2692
  }
2688
2693
  ) : null,
2689
- d
2694
+ u
2690
2695
  ] })
2691
2696
  ] }),
2692
- /* @__PURE__ */ e("div", { ref: N, className: "cms-screen__content", "data-pulling": me > 0 ? "" : void 0, "data-refreshing": I ? "" : void 0, children: /* @__PURE__ */ e(Mn.Provider, { value: ae, children: v }) }),
2693
- u !== void 0 ? /* @__PURE__ */ c(
2697
+ /* @__PURE__ */ e("div", { ref: N, className: "cms-screen__content", "data-pulling": me > 0 ? "" : void 0, "data-refreshing": I ? "" : void 0, children: /* @__PURE__ */ e(Cn.Provider, { value: re, children: w }) }),
2698
+ r !== void 0 ? /* @__PURE__ */ o(
2694
2699
  "button",
2695
2700
  {
2696
2701
  type: "button",
2697
2702
  className: "cms-button cms-button--primary cms-screen__primary",
2698
- "aria-label": u.label,
2699
- ...y === null ? { title: u.label } : {
2703
+ "aria-label": r.label,
2704
+ ...g === null ? { title: r.label } : {
2700
2705
  "aria-disabled": !0,
2701
- "aria-describedby": S,
2702
- ...T ? { "data-reason-shown": "" } : {},
2703
- ...E.dismissed(Pe) ? { "data-tip-dismissed": "" } : {}
2706
+ "aria-describedby": T,
2707
+ ...x ? { "data-reason-shown": "" } : {},
2708
+ ...E.dismissed(ze) ? { "data-tip-dismissed": "" } : {}
2704
2709
  },
2705
- ..."menu" in u ? { "aria-haspopup": "menu", "aria-expanded": z !== null } : {},
2706
- onFocus: () => E.focusIn(Pe),
2710
+ ..."menu" in r ? { "aria-haspopup": "menu", "aria-expanded": z !== null } : {},
2711
+ onFocus: () => E.focusIn(ze),
2707
2712
  onBlur: () => {
2708
- M(!1), E.focusOut(Pe);
2713
+ M(!1), E.focusOut(ze);
2709
2714
  },
2710
- onMouseEnter: () => E.pointerIn(Pe),
2711
- onMouseLeave: () => E.pointerOut(Pe),
2715
+ onMouseEnter: () => E.pointerIn(ze),
2716
+ onMouseLeave: () => E.pointerOut(ze),
2712
2717
  onKeyDown: (R) => {
2713
- R.key === "Escape" && y !== null && (M(!1), E.dismiss(Pe));
2718
+ R.key === "Escape" && g !== null && (M(!1), E.dismiss(ze));
2714
2719
  },
2715
2720
  onClick: (R) => {
2716
- if (y !== null)
2717
- M(!0), E.show(Pe);
2718
- else if ("menu" in u) {
2721
+ if (g !== null)
2722
+ M(!0), E.show(ze);
2723
+ else if ("menu" in r) {
2719
2724
  const J = R.currentTarget.getBoundingClientRect();
2720
2725
  k(z === null ? { x: J.left, y: J.top } : null);
2721
2726
  } else
2722
- u.onPress();
2727
+ r.onPress();
2723
2728
  },
2724
2729
  children: [
2725
- /* @__PURE__ */ e(B, { name: u.icon, size: 24 }),
2726
- y !== null ? /* @__PURE__ */ e("span", { className: "cms-screen__tip", role: "tooltip", id: S, children: y }) : null
2730
+ /* @__PURE__ */ e(B, { name: r.icon, size: 24 }),
2731
+ g !== null ? /* @__PURE__ */ e("span", { className: "cms-screen__tip", role: "tooltip", id: T, children: g }) : null
2727
2732
  ]
2728
2733
  }
2729
2734
  ) : null,
2730
2735
  /* @__PURE__ */ e(
2731
2736
  Ke,
2732
2737
  {
2733
- at: _e ? F : null,
2734
- items: C && ve !== void 0 ? [...a, ...En(ve, ve.label)] : a,
2738
+ at: be ? F : null,
2739
+ items: S && ve !== void 0 ? [...c, ...An(ve, ve.label)] : c,
2735
2740
  onClose: Y,
2736
- label: h,
2741
+ label: f,
2737
2742
  focus: "first"
2738
2743
  }
2739
2744
  ),
2740
- u !== void 0 && "menu" in u ? /* @__PURE__ */ e(Ke, { at: z, items: u.menu, onClose: () => k(null), label: u.label }) : null
2745
+ r !== void 0 && "menu" in r ? /* @__PURE__ */ e(Ke, { at: z, items: r.menu, onClose: () => k(null), label: r.label }) : null
2741
2746
  ]
2742
2747
  }
2743
2748
  );
@@ -2746,13 +2751,13 @@ export {
2746
2751
  tl as AppShell,
2747
2752
  Ye as Avatar,
2748
2753
  pn as BOOTSTRAP_ICONS,
2749
- bt as Badge,
2754
+ _t as Badge,
2750
2755
  De as Button,
2751
2756
  on as CALL_LABELS,
2752
2757
  At as CLIENT_UPDATE_REQUIRED,
2753
2758
  dl as CallBar,
2754
2759
  ol as CallPanel,
2755
- al as ChatBubble,
2760
+ rl as ChatBubble,
2756
2761
  Qt as Column,
2757
2762
  il as Composer,
2758
2763
  Vt as ConfirmDialog,
@@ -2773,9 +2778,9 @@ export {
2773
2778
  Un as Loading,
2774
2779
  vt as MAIL_ROW_LABELS,
2775
2780
  zn as MODAL_CLOSE_MS,
2776
- rl as MailRow,
2777
- xn as Modal,
2778
- Fn as NamedIcon,
2781
+ al as MailRow,
2782
+ Mn as Modal,
2783
+ xn as NamedIcon,
2779
2784
  pl as Notification,
2780
2785
  Qe as PULL_AT,
2781
2786
  el as PageHeader,
@@ -2797,19 +2802,19 @@ export {
2797
2802
  qt as Toast,
2798
2803
  Gt as ToastRegion,
2799
2804
  Zt as Toggle,
2800
- _t as fitPanes,
2801
- Ue as iconForName,
2805
+ bt as fitPanes,
2806
+ Be as iconForName,
2802
2807
  dt as initialsOf,
2803
2808
  Ct as isCapability,
2804
2809
  wl as needsClientUpdate,
2805
- bl as offerFor,
2810
+ _l as offerFor,
2806
2811
  yl as readConflict,
2807
- _l as readRefusal,
2812
+ bl as readRefusal,
2808
2813
  Et as refusalText,
2809
2814
  vl as rereadAll,
2810
2815
  ut as tintOf,
2811
2816
  st as usePull,
2812
- rt as usePullState,
2817
+ at as usePullState,
2813
2818
  gl as useReread,
2814
2819
  Tt as versionBelow,
2815
2820
  On as writtenOut