@photon-ai/pho-ui 2.14.0 → 2.16.0

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.
@@ -1,228 +1,261 @@
1
1
  "use client";
2
2
  import { t as p } from "./cn-ChIgwEl3.js";
3
- import { n as Me } from "./link-provider-DXzDQ08N.js";
4
- import { FADE_ENTRANCE as rt, FADE_SWAP as it, SPRING_ENTRANCE as st, TRAVEL_LINEAR as lt, fadeThroughBlur as ee } from "../motion.js";
5
- import { a as ie, o as pe } from "./button-CdqS_t5a.js";
6
- import { t as ot } from "./error-D0yoFxCv.js";
7
- import { t as ae } from "./IconChevronLeft-CSWMKQ4C.js";
8
- import { t as ct } from "./IconChevronRight-CzoJnYNI.js";
9
- import { a as fe, i as ut, n as dt, r as pt, s as ft } from "./data-table-CHLJfGkS.js";
10
- import { t as _e } from "./IconSearch-BKAHkLyX.js";
11
- import { t as mt } from "./IconX-pZ9vrtSr.js";
12
- import { t as ht } from "./toast-iSf6NuAS.js";
13
- import { t as le } from "./input-group-fc9_jD4d.js";
14
- import { t as gt } from "./animated-height-CCO-Ocoz.js";
15
- import { n as De, t as Q } from "./scroll-area-BO-9PMM7.js";
16
- import { i as bt } from "./checkbox-CLPmblNA.js";
17
- import { t as yt } from "./form-AiHbbw4m.js";
3
+ import { n as He } from "./link-provider-DXzDQ08N.js";
4
+ import { FADE_ENTRANCE as st, FADE_SWAP as lt, SPRING_ENTRANCE as ot, TRAVEL_LINEAR as ct, fadeThroughBlur as Z } from "../motion.js";
5
+ import { a as ie, o as me } from "./button-CdqS_t5a.js";
6
+ import { t as ut } from "./error-D0yoFxCv.js";
7
+ import { t as te } from "./IconChevronLeft-CSWMKQ4C.js";
8
+ import { t as dt } from "./IconChevronRight-CzoJnYNI.js";
9
+ import { a as he, i as pt, n as ft, r as mt, s as ht } from "./data-table-CHLJfGkS.js";
10
+ import { t as Se } from "./IconSearch-BKAHkLyX.js";
11
+ import { t as gt } from "./IconX-pZ9vrtSr.js";
12
+ import { t as bt } from "./toast-iSf6NuAS.js";
13
+ import { t as oe } from "./input-group-fc9_jD4d.js";
14
+ import { t as yt } from "./animated-height-CCO-Ocoz.js";
15
+ import { n as ge, t as U } from "./scroll-area-BO-9PMM7.js";
16
+ import { i as vt } from "./checkbox-CLPmblNA.js";
17
+ import { t as xt } from "./form-AiHbbw4m.js";
18
18
  import { i as W } from "./menu-BQeprfxB.js";
19
- import { Children as Y, Fragment as vt, createContext as z, isValidElement as He, useCallback as Fe, useContext as T, useEffect as O, useId as xt, useLayoutEffect as V, useMemo as $, useRef as _, useState as w, useSyncExternalStore as me } from "react";
20
- import { Fragment as he, jsx as t, jsxs as v } from "react/jsx-runtime";
21
- import { AnimatePresence as G, motion as N, useIsPresent as wt, useReducedMotion as L } from "motion/react";
22
- import { Dialog as te } from "@base-ui/react/dialog";
23
- import { createPortal as Ee } from "react-dom";
24
- var ge = "rounded-base border border-pho-secondary bg-pho-primary", ne = "divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0", Ge = `${ge} ${ne}`, Ce = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5", Nt = "flex min-h-[4.25rem] min-w-0 flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6", At = "flex flex-col gap-3 px-5 py-4", _t = "-mx-5 -mb-4 flex items-center rounded-b-[calc(0.75rem-1px)] bg-pho-secondary py-1 pr-3 pl-5", Et = "-mx-2 -mt-1.5 flex items-center rounded-sm bg-pho-secondary px-2 py-0.5", R = st, M = rt, j = 12, Ct = 768;
25
- function kt(e) {
19
+ import { Children as J, Fragment as wt, createContext as H, isValidElement as Fe, useCallback as Ge, useContext as k, useEffect as O, useId as Nt, useLayoutEffect as V, useMemo as q, useRef as _, useState as N, useSyncExternalStore as be } from "react";
20
+ import { Fragment as ye, jsx as t, jsxs as y } from "react/jsx-runtime";
21
+ import { AnimatePresence as z, motion as A, useIsPresent as At, useReducedMotion as L } from "motion/react";
22
+ import { Dialog as ee } from "@base-ui/react/dialog";
23
+ import { createPortal as ke } from "react-dom";
24
+ var ve = "rounded-base border border-pho-secondary bg-pho-primary", ae = "divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0", ze = `${ve} ${ae}`, Te = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5", _t = "flex min-h-[4.25rem] min-w-0 flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6", Et = "flex flex-col gap-3 px-5 py-4", Ct = "-mx-5 -mb-4 flex items-center rounded-b-[calc(0.75rem-1px)] bg-pho-secondary py-1 pr-3 pl-5", St = "-mx-2 -mt-1.5 flex items-center rounded-sm bg-pho-secondary px-2 py-0.5", P = ot, B = st, j = 12, Ve = H(null), kt = 768;
25
+ function Tt(e) {
26
26
  return Math.round(Math.min(Math.max(e * 0.4, 320), 448));
27
27
  }
28
- var ze = z(null), Ve = z(null);
29
- function St(e) {
30
- const [a, n] = w(null), [r, s] = w(!1), [l, c] = w(!1), [o, i] = w(() => ({
28
+ var $e = H(null), qe = H(null);
29
+ function Rt(e) {
30
+ const [a, n] = N(null), [r, s] = N(!1), [l, o] = N(!1), [c, i] = N(() => ({
31
31
  width: typeof window > "u" ? 0 : window.innerWidth,
32
32
  height: null
33
33
  }));
34
34
  return V(() => {
35
35
  const d = e.current;
36
36
  if (!r || d == null) return;
37
- const f = we(d), u = () => {
38
- const h = d.offsetWidth, b = f?.clientHeight ?? null;
37
+ const m = Ae(d), u = () => {
38
+ const h = d.offsetWidth, b = m?.clientHeight ?? null;
39
39
  i((g) => g.width === h && g.height === b ? g : {
40
40
  width: h,
41
41
  height: b
42
42
  });
43
43
  };
44
44
  if (u(), typeof ResizeObserver > "u") return;
45
- const m = new ResizeObserver(u);
46
- return m.observe(d), f != null && m.observe(f), () => m.disconnect();
45
+ const f = new ResizeObserver(u);
46
+ return f.observe(d), m != null && f.observe(m), () => f.disconnect();
47
47
  }, [e, r]), {
48
- host: $(() => ({
48
+ host: q(() => ({
49
49
  slot: a,
50
- presentation: o.width >= Ct ? "panel" : "page",
51
- width: kt(o.width),
52
- paneHeight: o.height,
53
- setOpen: c,
50
+ presentation: c.width >= kt ? "panel" : "page",
51
+ width: Tt(c.width),
52
+ paneHeight: c.height,
53
+ setOpen: o,
54
54
  setPresent: s
55
- }), [a, o]),
55
+ }), [a, c]),
56
56
  setSlot: n,
57
57
  open: l
58
58
  };
59
59
  }
60
- function Tt(e) {
60
+ function Pt(e) {
61
61
  return e == null ? window.scrollY : e.scrollTop;
62
62
  }
63
- function ke(e, a) {
63
+ function Re(e, a) {
64
64
  e == null ? window.scrollTo({ top: a }) : e.scrollTop = a;
65
65
  }
66
- function Rt({ condense: e = !0, width: a, className: n, children: r, ref: s, ...l }) {
67
- const c = T(se)?.adopt ?? !1, o = T(Ve), [i, d] = w(!1), f = _(0), u = Fe((H) => {
68
- f.current += H ? 1 : -1, d(f.current > 0);
69
- }, []), m = a === "wide" || a == null && i, [h] = w(ft), b = _(null), [g, E] = w(null), [y, k] = w(null), x = $(() => ({
70
- setTitle: E,
71
- setTail: k
66
+ function It({ condense: e = !0, width: a, prerendered: n = !1, className: r, children: s, ref: l, ...o }) {
67
+ const c = k(se)?.adopt ?? !1, i = k(qe), [d, m] = N(!1), u = _(0), f = Ge((w) => {
68
+ u.current += w ? 1 : -1, m(u.current > 0);
69
+ }, []), h = a === "wide" || a == null && d, [b] = N(ht), g = _(null), E = q(() => ({
70
+ ref: g,
71
+ prerendered: n
72
+ }), [n]), [v, C] = N(null), [x, R] = N(null), I = q(() => ({
73
+ setTitle: C,
74
+ setTail: R
72
75
  }), []);
73
76
  O(() => {
74
- if (o != null)
75
- return o.setBack(y), () => o.setBack(null);
76
- }, [o, y]);
77
- const { host: C, setSlot: P, open: B } = St(b), I = B && C.presentation === "page", D = _(!1), q = _(0);
77
+ if (i != null)
78
+ return i.setBack(x), () => i.setBack(null);
79
+ }, [i, x]);
80
+ const { host: T, setSlot: M, open: F } = Rt(g), D = F && T.presentation === "page", Q = _(!1), Y = _(0);
78
81
  V(() => {
79
- const H = b.current;
80
- if (I === D.current || H == null) return;
81
- D.current = I;
82
- const A = we(H);
83
- I ? (q.current = Tt(A), ke(A, 0)) : ke(A, q.current);
84
- }, [I]);
85
- const U = e ? /* @__PURE__ */ t(Pt, {
86
- title: g,
87
- tail: o == null ? y : null,
88
- silent: I || o != null
89
- }) : null, J = /* @__PURE__ */ t("div", {
82
+ const w = g.current;
83
+ if (D === Q.current || w == null) return;
84
+ Q.current = D;
85
+ const $ = Ae(w);
86
+ D ? (Y.current = Pt($), Re($, 0)) : Re($, Y.current);
87
+ }, [D]);
88
+ const le = e ? /* @__PURE__ */ t(Ot, {
89
+ title: v,
90
+ tail: i == null ? x : null,
91
+ silent: D || i != null
92
+ }) : null, S = /* @__PURE__ */ t("div", {
90
93
  "data-basic-page-column": "",
91
- className: p("mx-auto flex w-full min-w-0 flex-1 flex-col px-5 pt-12 pb-12 *:min-w-0", m ? "max-w-[84rem] md:px-8" : "max-w-[44.5rem]", c || o != null ? "[&_[data-basic-page-back]]:hidden" : "has-[[data-basic-page-back]]:pt-16"),
92
- children: e ? /* @__PURE__ */ t(ye.Provider, {
93
- value: x,
94
- children: r
95
- }) : r
94
+ className: p("mx-auto flex w-full min-w-0 flex-1 flex-col px-5 pt-12 pb-12 *:min-w-0", h ? "max-w-[84rem] md:px-8" : "max-w-[44.5rem]", c || i != null ? "[&_[data-basic-page-back]]:hidden" : "has-[[data-basic-page-back]]:pt-16"),
95
+ children: e ? /* @__PURE__ */ t(we.Provider, {
96
+ value: I,
97
+ children: s
98
+ }) : s
96
99
  });
97
100
  return /* @__PURE__ */ t("div", {
98
101
  "data-basic-page-root": "",
99
- "data-basic-page-width": m ? "wide" : void 0,
100
- className: p("relative flex min-h-full w-full min-w-0 flex-row", n),
101
- ...l,
102
- ref: (H) => {
103
- b.current = H, typeof s == "function" ? s(H) : s != null && (s.current = H);
102
+ "data-basic-page-width": h ? "wide" : void 0,
103
+ "data-basic-page-prerendered": n ? "" : void 0,
104
+ className: p("relative flex min-h-full w-full min-w-0 flex-row", r),
105
+ ...o,
106
+ ref: (w) => {
107
+ g.current = w, typeof l == "function" ? l(w) : l != null && (l.current = w);
104
108
  },
105
- children: /* @__PURE__ */ t(ze.Provider, {
106
- value: C,
107
- children: /* @__PURE__ */ t(ut.Provider, {
108
- value: u,
109
- children: /* @__PURE__ */ v(fe.Provider, {
110
- value: h,
111
- children: [/* @__PURE__ */ v("div", {
112
- "data-basic-page-main": "",
113
- className: p("flex min-w-0 flex-1 flex-col", I && "hidden"),
114
- children: [U, J]
115
- }), /* @__PURE__ */ t("div", {
116
- ref: P,
117
- className: "contents"
118
- })]
109
+ children: /* @__PURE__ */ t(Ve.Provider, {
110
+ value: E,
111
+ children: /* @__PURE__ */ t($e.Provider, {
112
+ value: T,
113
+ children: /* @__PURE__ */ t(pt.Provider, {
114
+ value: f,
115
+ children: /* @__PURE__ */ y(he.Provider, {
116
+ value: b,
117
+ children: [/* @__PURE__ */ y("div", {
118
+ "data-basic-page-main": "",
119
+ className: p("flex min-w-0 flex-1 flex-col", D && "hidden"),
120
+ children: [le, S]
121
+ }), /* @__PURE__ */ t("div", {
122
+ ref: M,
123
+ className: "contents"
124
+ })]
125
+ })
119
126
  })
120
127
  })
121
128
  })
122
129
  });
123
130
  }
124
- function Pt({ title: e, tail: a, silent: n = !1 }) {
125
- const r = L(), [s, l] = w(!1), c = T(se), o = xt();
126
- O(() => {
127
- if (c != null) {
131
+ var ce = /* @__PURE__ */ new Set();
132
+ function Ot({ title: e, tail: a, silent: n = !1 }) {
133
+ const r = L(), [s, l] = N(() => !n && ce.size > 0), o = k(se), c = Nt();
134
+ V(() => {
135
+ if (!(!s || n))
136
+ return ce.add(c), () => {
137
+ ce.delete(c);
138
+ };
139
+ }, [
140
+ c,
141
+ s,
142
+ n
143
+ ]), O(() => {
144
+ if (o != null) {
128
145
  if (n) {
129
- c.store.clear(o);
146
+ o.store.clear(c);
130
147
  return;
131
148
  }
132
- c.store.set(o, {
149
+ o.store.set(c, {
133
150
  condensed: s,
134
151
  title: e?.label ?? null,
135
152
  back: a
136
153
  });
137
154
  }
138
155
  }, [
139
- c,
140
156
  o,
157
+ c,
141
158
  s,
142
159
  e,
143
160
  a,
144
161
  n
145
162
  ]), O(() => {
146
- if (c != null)
147
- return () => c.store.clear(o);
148
- }, [c, o]);
163
+ if (o != null)
164
+ return () => o.store.clear(c);
165
+ }, [o, c]);
149
166
  const i = e?.el ?? null;
150
- return O(() => {
151
- if (i == null || typeof IntersectionObserver > "u") return;
152
- const d = new IntersectionObserver(([f]) => l(f != null && !f.isIntersecting), { root: we(i) });
153
- return d.observe(i), () => d.disconnect();
154
- }, [i]), /* @__PURE__ */ t("div", {
167
+ O(() => {
168
+ if (i == null || typeof IntersectionObserver > "u") {
169
+ if (typeof requestAnimationFrame > "u") return;
170
+ const f = requestAnimationFrame(() => l(!1));
171
+ return () => cancelAnimationFrame(f);
172
+ }
173
+ const u = new IntersectionObserver(([f]) => l(f != null && !f.isIntersecting), { root: Ae(i) });
174
+ return u.observe(i), () => u.disconnect();
175
+ }, [i]);
176
+ const d = r ? 0 : -jt, m = r ? "blur(0px)" : `blur(${ge}px)`;
177
+ return /* @__PURE__ */ t("div", {
155
178
  "data-basic-page-condense": "",
156
179
  className: "sticky top-0 z-20 h-0 overflow-visible",
157
- children: /* @__PURE__ */ t(G, { children: s && !(c?.adopt ?? !1) && /* @__PURE__ */ v(N.div, {
158
- initial: {
159
- opacity: 0,
160
- y: r ? 0 : Pe
161
- },
162
- animate: {
163
- opacity: 1,
164
- y: 0
165
- },
166
- exit: {
167
- opacity: 0,
168
- y: r ? 0 : Pe
169
- },
170
- transition: {
171
- ...xe,
172
- y: Vt
173
- },
174
- className: "border-pho-secondary bg-pho-page/85 relative grid h-12 grid-cols-[1fr_minmax(0,auto)_1fr] items-center border-b px-3 backdrop-blur",
175
- children: [/* @__PURE__ */ t("div", {
176
- className: "flex min-w-0 items-center justify-start",
177
- children: a != null && /* @__PURE__ */ t(pe, {
178
- variant: "ghost",
179
- size: "sm",
180
- href: a.href,
181
- onClick: a.onClick,
182
- prefix: /* @__PURE__ */ t("span", {
183
- className: "inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0",
184
- children: /* @__PURE__ */ t(ae, {})
185
- }),
186
- className: "min-w-max",
187
- children: a.label
188
- })
189
- }), /* @__PURE__ */ t("span", {
190
- className: "text-pho-primary block max-w-full min-w-0 truncate text-center text-base font-medium",
191
- children: e?.label
192
- })]
193
- }) })
180
+ children: /* @__PURE__ */ t(z, {
181
+ initial: !1,
182
+ children: s && !(o?.adopt ?? !1) && /* @__PURE__ */ y(A.div, {
183
+ initial: { opacity: 0 },
184
+ animate: { opacity: 1 },
185
+ exit: { opacity: 0 },
186
+ transition: ne,
187
+ className: "border-pho-secondary bg-pho-page/85 relative grid h-12 grid-cols-[1fr_minmax(0,auto)_1fr] items-center border-b px-3 backdrop-blur",
188
+ children: [/* @__PURE__ */ t("div", {
189
+ className: "flex min-w-0 items-center justify-start",
190
+ children: a != null && /* @__PURE__ */ t(me, {
191
+ variant: "ghost",
192
+ size: "sm",
193
+ href: a.href,
194
+ onClick: a.onClick,
195
+ prefix: /* @__PURE__ */ t("span", {
196
+ className: "inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0",
197
+ children: /* @__PURE__ */ t(te, {})
198
+ }),
199
+ className: "min-w-max",
200
+ children: a.label
201
+ })
202
+ }), /* @__PURE__ */ t(A.span, {
203
+ initial: {
204
+ opacity: 0,
205
+ y: d,
206
+ filter: m
207
+ },
208
+ animate: {
209
+ opacity: 1,
210
+ y: 0,
211
+ filter: "blur(0px)"
212
+ },
213
+ exit: {
214
+ opacity: 0,
215
+ y: d,
216
+ filter: m
217
+ },
218
+ transition: {
219
+ ...ne,
220
+ y: qt
221
+ },
222
+ className: "text-pho-primary block max-w-full min-w-0 truncate text-center text-base font-medium",
223
+ children: e?.label
224
+ })]
225
+ })
226
+ })
194
227
  });
195
228
  }
196
- function It(e) {
229
+ function Lt(e) {
197
230
  return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
198
231
  }
199
- function Ot(e) {
232
+ function Bt(e) {
200
233
  if (!(typeof e != "string" && typeof e != "number"))
201
- return It(String(e)) || void 0;
234
+ return Lt(String(e)) || void 0;
202
235
  }
203
- function be(e, a) {
236
+ function xe(e, a) {
204
237
  if (e !== "")
205
- return e ?? Ot(a);
238
+ return e ?? Bt(a);
206
239
  }
207
- var Lt = (e) => `basic-page-morph-${e}`, Bt = { layout: R }, Se = 10, Te = {
240
+ var Mt = (e) => `basic-page-morph-${e}`, Dt = { layout: P }, Pe = 10, Ie = {
208
241
  delay: 0.2,
209
242
  duration: 0.12,
210
243
  ease: "easeOut"
211
- }, Mt = {
244
+ }, Ht = {
212
245
  duration: 0.18,
213
246
  ease: "easeOut"
214
- }, Dt = -8, Ht = {
247
+ }, Ft = -8, Gt = {
215
248
  duration: 0.16,
216
249
  ease: "easeOut"
217
- }, Ft = {
250
+ }, zt = {
218
251
  delay: 0.14,
219
252
  duration: 0.16,
220
253
  ease: "easeOut"
221
- }, $e = {
254
+ }, je = {
222
255
  duration: 0.12,
223
256
  ease: "easeOut"
224
257
  }, K = [];
225
- function Gt(e) {
258
+ function Vt(e) {
226
259
  const a = _({ labels: e });
227
260
  a.current.labels = e, V(() => {
228
261
  const n = a.current;
@@ -231,38 +264,38 @@ function Gt(e) {
231
264
  };
232
265
  }, []);
233
266
  }
234
- function je() {
235
- const [e] = w(() => {
267
+ function We() {
268
+ const [e] = N(() => {
236
269
  const a = K[K.length - 1];
237
270
  return a ? { labels: [...a.labels] } : null;
238
271
  });
239
272
  return e;
240
273
  }
241
- var ye = z(null), ue = {
274
+ var we = H(null), pe = {
242
275
  condensed: !1,
243
276
  title: null,
244
277
  back: null
245
- }, se = z(null), ve = () => () => {
246
- }, Re = () => ue;
247
- function zt({ adopt: e = !0, children: a }) {
248
- const [n] = w(() => {
249
- let s = ue, l = null;
250
- const c = /* @__PURE__ */ new Set(), o = () => {
251
- for (const i of c) i();
278
+ }, se = H(null), Ne = () => () => {
279
+ }, Oe = () => pe;
280
+ function $t({ adopt: e = !0, children: a }) {
281
+ const [n] = N(() => {
282
+ let s = pe, l = null;
283
+ const o = /* @__PURE__ */ new Set(), c = () => {
284
+ for (const i of o) i();
252
285
  };
253
286
  return {
254
287
  get: () => s,
255
288
  set(i, d) {
256
- l = i, s = d, o();
289
+ l = i, s = d, c();
257
290
  },
258
291
  clear(i) {
259
- l === i && (l = null, s = ue, o());
292
+ l === i && (l = null, s = pe, c());
260
293
  },
261
294
  subscribe(i) {
262
- return c.add(i), () => c.delete(i);
295
+ return o.add(i), () => o.delete(i);
263
296
  }
264
297
  };
265
- }), r = $(() => ({
298
+ }), r = q(() => ({
266
299
  store: n,
267
300
  adopt: e
268
301
  }), [n, e]);
@@ -271,12 +304,12 @@ function zt({ adopt: e = !0, children: a }) {
271
304
  children: a
272
305
  });
273
306
  }
274
- function dn() {
275
- const e = T(se);
276
- return me(e?.store.subscribe ?? ve, e?.store.get ?? Re, e?.store.get ?? Re);
307
+ function hn() {
308
+ const e = k(se);
309
+ return be(e?.store.subscribe ?? Ne, e?.store.get ?? Oe, e?.store.get ?? Oe);
277
310
  }
278
- var xe = it, Vt = lt, Pe = -8;
279
- function we(e) {
311
+ var ne = lt, qt = ct, jt = -8;
312
+ function Ae(e) {
280
313
  if (typeof getComputedStyle != "function") return null;
281
314
  for (let a = e.parentElement; a != null && a !== document.body; a = a.parentElement) {
282
315
  const { overflowY: n } = getComputedStyle(a);
@@ -284,40 +317,40 @@ function we(e) {
284
317
  }
285
318
  return null;
286
319
  }
287
- var oe = /* @__PURE__ */ new Map(), $t = 96;
288
- function jt(e) {
320
+ var ue = /* @__PURE__ */ new Map(), Wt = 96;
321
+ function Kt(e) {
289
322
  const a = e.closest("[data-basic-page-root]"), n = a?.querySelector("[data-basic-page-column]");
290
323
  return !a || !n ? 0 : n.getBoundingClientRect().left - a.getBoundingClientRect().left;
291
324
  }
292
- function qe(e) {
293
- const [a] = w(() => {
325
+ function Ke(e) {
326
+ const [a] = N(() => {
294
327
  if (e == null) return !1;
295
- const r = oe.get(e);
296
- return r != null && r.visible && r.el.isConnected && jt(r.el) <= $t;
328
+ const r = ue.get(e);
329
+ return r != null && r.visible && r.el.isConnected && Kt(r.el) <= Wt;
297
330
  }), n = _(null);
298
331
  return O(() => {
299
332
  if (e == null || typeof IntersectionObserver > "u") return;
300
333
  const r = n.current;
301
334
  if (!r) return;
302
335
  const s = new IntersectionObserver(([l]) => {
303
- l && oe.set(e, {
336
+ l && ue.set(e, {
304
337
  visible: l.isIntersecting,
305
338
  el: r
306
339
  });
307
340
  });
308
341
  return s.observe(r), () => {
309
- s.disconnect(), oe.delete(e);
342
+ s.disconnect(), ue.delete(e);
310
343
  };
311
344
  }, [e]), {
312
345
  fly: a,
313
346
  ref: n
314
347
  };
315
348
  }
316
- var qt = {
349
+ var Xt = {
317
350
  fade: {
318
351
  initial: { opacity: 0 },
319
352
  animate: { opacity: 1 },
320
- transition: { opacity: M }
353
+ transition: { opacity: B }
321
354
  },
322
355
  rise: {
323
356
  initial: {
@@ -329,24 +362,24 @@ var qt = {
329
362
  y: 0
330
363
  },
331
364
  transition: {
332
- y: R,
333
- opacity: M
365
+ y: P,
366
+ opacity: B
334
367
  }
335
368
  },
336
369
  slide: {
337
370
  initial: { x: "-100%" },
338
371
  animate: { x: 0 },
339
- transition: { x: Ft }
372
+ transition: { x: zt }
340
373
  }
341
374
  };
342
- function We({ morphId: e, fromClassName: a, fly: n, morphRef: r, arrival: s, className: l, children: c }) {
343
- const [o, i] = w(!1), d = !n && s != null ? qt[s] : null;
344
- return /* @__PURE__ */ v(N.span, {
375
+ function Xe({ morphId: e, fromClassName: a, fly: n, morphRef: r, arrival: s, className: l, children: o }) {
376
+ const [c, i] = N(!1), d = !n && s != null ? Xt[s] : null;
377
+ return /* @__PURE__ */ y(A.span, {
345
378
  ref: r,
346
- layoutId: Lt(e),
379
+ layoutId: Mt(e),
347
380
  initial: d?.initial,
348
381
  animate: d?.animate,
349
- transition: n ? Bt : {
382
+ transition: n ? Dt : {
350
383
  layout: { duration: 0 },
351
384
  ...d?.transition
352
385
  },
@@ -355,40 +388,40 @@ function We({ morphId: e, fromClassName: a, fly: n, morphRef: r, arrival: s, cla
355
388
  },
356
389
  onLayoutAnimationComplete: () => i(!1),
357
390
  className: p("relative inline-block", l),
358
- children: [c, o && /* @__PURE__ */ t(N.span, {
391
+ children: [o, c && /* @__PURE__ */ t(A.span, {
359
392
  "aria-hidden": !0,
360
393
  initial: { opacity: 1 },
361
394
  animate: { opacity: 0 },
362
- transition: Mt,
395
+ transition: Ht,
363
396
  onAnimationComplete: () => i(!1),
364
397
  className: p("absolute inset-0", a),
365
- children: c
398
+ children: o
366
399
  })]
367
400
  });
368
401
  }
369
- var Ie = "max-w-full min-w-0 truncate align-top";
370
- function Wt({ id: e, morphId: a, enter: n, trailing: r, className: s, children: l, ...c }) {
371
- const o = be(e, l), i = L(), d = qe(a), f = je(), u = !i && (a != null || n === !0), m = n || f != null ? "rise" : void 0, h = T(ye), b = _(null);
402
+ var Le = "max-w-full min-w-0 truncate align-top";
403
+ function Qt({ id: e, morphId: a, enter: n, trailing: r, className: s, children: l, ...o }) {
404
+ const c = xe(e, l), i = L(), d = Ee(n === !0), m = Ke(a), u = We(), f = !i && (a != null || d === !0), h = d || u != null ? "rise" : void 0, b = k(we), g = _(null);
372
405
  V(() => {
373
- if (h != null)
374
- return h.setTitle({
406
+ if (b != null)
407
+ return b.setTitle({
375
408
  label: l,
376
- el: b.current
377
- }), () => h.setTitle(null);
378
- }, [h, l]);
379
- const [g, E] = w(d.fly && f != null);
409
+ el: g.current
410
+ }), () => b.setTitle(null);
411
+ }, [b, l]);
412
+ const [E, v] = N(m.fly && u != null);
380
413
  V(() => {
381
- K.length > 0 && E(!1);
414
+ K.length > 0 && v(!1);
382
415
  }, []);
383
- const y = r != null && r !== !1, k = !i && (a != null ? d.fly || m != null : n === !0), x = a != null && !i ? /* @__PURE__ */ t(We, {
416
+ const C = r != null && r !== !1, x = !i && (a != null ? m.fly || h != null : d === !0), R = a != null && !i ? /* @__PURE__ */ t(Xe, {
384
417
  morphId: a,
385
418
  fromClassName: "text-pho-secondary",
386
- fly: d.fly,
387
- morphRef: d.ref,
388
- arrival: m,
389
- className: Ie,
419
+ fly: m.fly,
420
+ morphRef: m.ref,
421
+ arrival: h,
422
+ className: Le,
390
423
  children: l
391
- }) : n && !i ? /* @__PURE__ */ t(N.span, {
424
+ }) : d && !i ? /* @__PURE__ */ t(A.span, {
392
425
  initial: {
393
426
  opacity: 0,
394
427
  y: j
@@ -398,27 +431,28 @@ function Wt({ id: e, morphId: a, enter: n, trailing: r, className: s, children:
398
431
  y: 0
399
432
  },
400
433
  transition: {
401
- y: R,
402
- opacity: M
434
+ y: P,
435
+ opacity: B
403
436
  },
404
- className: p("inline-block", Ie),
437
+ className: p("inline-block", Le),
405
438
  children: l
406
- }) : y ? /* @__PURE__ */ t("span", {
439
+ }) : C ? /* @__PURE__ */ t("span", {
407
440
  className: "min-w-0 truncate",
408
441
  children: l
409
442
  }) : l;
410
- return /* @__PURE__ */ v("h1", {
411
- id: o,
412
- className: p("text-display-base text-pho-primary max-w-full min-w-0 scroll-mt-12 px-5 font-medium", u ? "whitespace-nowrap" : "truncate", s),
413
- ...c,
414
- ref: (C) => {
415
- b.current = C;
416
- const P = c.ref;
417
- typeof P == "function" ? P(C) : P != null && (P.current = C);
443
+ return /* @__PURE__ */ y("h1", {
444
+ id: c,
445
+ "data-basic-page-title": "",
446
+ className: p("text-display-base text-pho-primary max-w-full min-w-0 scroll-mt-12 px-5 font-medium", f ? "whitespace-nowrap" : "truncate", s),
447
+ ...o,
448
+ ref: (I) => {
449
+ g.current = I;
450
+ const T = o.ref;
451
+ typeof T == "function" ? T(I) : T != null && (T.current = I);
418
452
  },
419
- children: [y ? /* @__PURE__ */ v("span", {
453
+ children: [C ? /* @__PURE__ */ y("span", {
420
454
  className: "flex max-w-full min-w-0 items-center gap-2",
421
- children: [x, k ? /* @__PURE__ */ t(N.span, {
455
+ children: [R, x ? /* @__PURE__ */ t(A.span, {
422
456
  "data-basic-page-title-trailing": "",
423
457
  initial: {
424
458
  opacity: 0,
@@ -429,8 +463,8 @@ function Wt({ id: e, morphId: a, enter: n, trailing: r, className: s, children:
429
463
  y: 0
430
464
  },
431
465
  transition: {
432
- y: R,
433
- opacity: M
466
+ y: P,
467
+ opacity: B
434
468
  },
435
469
  className: "shrink-0",
436
470
  children: r
@@ -439,38 +473,38 @@ function Wt({ id: e, morphId: a, enter: n, trailing: r, className: s, children:
439
473
  className: "shrink-0",
440
474
  children: r
441
475
  })]
442
- }) : x, g && /* @__PURE__ */ t(N.span, {
476
+ }) : R, E && /* @__PURE__ */ t(A.span, {
443
477
  "aria-hidden": !0,
444
478
  initial: { opacity: 1 },
445
479
  animate: { opacity: 0 },
446
- transition: $e,
447
- onAnimationComplete: () => E(!1),
448
- className: p("text-pho-secondary pointer-events-none absolute inline-flex items-center", ka),
449
- children: /* @__PURE__ */ t(ae, {})
480
+ transition: je,
481
+ onAnimationComplete: () => v(!1),
482
+ className: p("text-pho-secondary pointer-events-none absolute inline-flex items-center", Pa),
483
+ children: /* @__PURE__ */ t(te, {})
450
484
  })]
451
485
  });
452
486
  }
453
- var Ke = z(!1);
454
- function Kt() {
455
- const e = T(Ke), a = L(), [n] = w(() => e && !a);
487
+ var Qe = H(!1);
488
+ function Yt() {
489
+ const e = k(Qe), a = L(), [n] = N(() => e && !a);
456
490
  return n;
457
491
  }
458
- var Xt = {
492
+ var Ut = {
459
493
  height: 0,
460
494
  opacity: 0,
461
495
  paddingTop: 0,
462
496
  paddingBottom: 0,
463
497
  borderTopWidth: 0
464
- }, Qt = {
465
- y: R,
466
- opacity: M,
467
- height: R,
468
- paddingTop: R,
469
- paddingBottom: R,
470
- borderTopWidth: R
498
+ }, Jt = {
499
+ y: P,
500
+ opacity: B,
501
+ height: P,
502
+ paddingTop: P,
503
+ paddingBottom: P,
504
+ borderTopWidth: P
471
505
  };
472
- function Ne() {
473
- const e = Kt(), a = wt(), n = L();
506
+ function _e() {
507
+ const e = Yt(), a = At(), n = L();
474
508
  return {
475
509
  initial: e ? {
476
510
  opacity: 0,
@@ -480,40 +514,53 @@ function Ne() {
480
514
  opacity: 1,
481
515
  y: 0
482
516
  },
483
- exit: Xt,
484
- transition: n ? { duration: 0 } : Qt,
517
+ exit: Ut,
518
+ transition: n ? { duration: 0 } : Jt,
485
519
  leaving: !a
486
520
  };
487
521
  }
488
- var Yt = typeof process < "u" && process.env.NODE_ENV !== "production";
489
- function Xe(e, a, n, r) {
522
+ var Zt = typeof process < "u" && process.env.NODE_ENV !== "production";
523
+ function Ye(e, a, n, r) {
490
524
  O(() => {
491
- if (!Yt || e.current == null || typeof getComputedStyle != "function") return;
492
- const s = (c) => {
493
- const o = getComputedStyle(c).rowGap;
494
- return o === "" || o === "normal" ? null : parseFloat(o);
525
+ if (!Zt || e.current == null || typeof getComputedStyle != "function") return;
526
+ const s = (o) => {
527
+ const c = getComputedStyle(o).rowGap;
528
+ return c === "" || c === "normal" ? null : parseFloat(c);
495
529
  }, l = s(e.current);
496
530
  l != null && l !== n && console.warn(`[BasicPage.${a}] spaced at ${l}px instead of ${n}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, e.current);
497
- for (const c of Array.from(e.current.children)) {
498
- const o = r(c);
499
- if (o == null || getComputedStyle(c).display === "contents") continue;
500
- const i = s(c);
501
- i != null && i !== o && console.warn(`[BasicPage.${a}] a child is spaced at ${i}px instead of ${o}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, c);
531
+ for (const o of Array.from(e.current.children)) {
532
+ const c = r(o);
533
+ if (c == null || getComputedStyle(o).display === "contents") continue;
534
+ const i = s(o);
535
+ i != null && i !== c && console.warn(`[BasicPage.${a}] a child is spaced at ${i}px instead of ${c}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, o);
502
536
  }
503
537
  });
504
538
  }
505
- function Ut({ enter: e = !0, className: a, children: n, ref: r, ...s }) {
506
- const l = L(), c = _(null);
507
- Xe(c, "Stack", 40, (u) => u.hasAttribute("data-basic-page-fields") ? 20 : 12);
508
- const o = s["aria-busy"], i = o === !0 || o === "true", d = _(i), f = d.current && !i;
539
+ function ea(e) {
540
+ return Array.from(e.querySelectorAll("[data-basic-page-stack], [data-basic-page-title], [data-basic-page-header]")).some((a) => a.closest('[aria-busy="true"]') != null);
541
+ }
542
+ function Ee(e, a = !1) {
543
+ const n = k(Ve), [r] = N(() => {
544
+ if (typeof document > "u" || !e || n?.prerendered) return !1;
545
+ if (a) return !0;
546
+ if (document.querySelector("[data-basic-page-prerendered]") != null) return !1;
547
+ const s = n ? n.ref.current : document;
548
+ return s == null || !ea(s);
549
+ });
550
+ return r;
551
+ }
552
+ function ta({ enter: e, className: a, children: n, ref: r, ...s }) {
553
+ const l = L(), o = _(null);
554
+ Ye(o, "Stack", 40, (f) => f.hasAttribute("data-basic-page-fields") ? 20 : 12);
555
+ const c = Ee(e ?? !0, e === !0), i = s["aria-busy"], d = i === !0 || i === "true", m = _(d), u = m.current && !d;
509
556
  return O(() => {
510
- d.current = i;
511
- }), /* @__PURE__ */ t(N.div, {
512
- ref: (u) => {
513
- c.current = u, typeof r == "function" ? r(u) : r != null && (r.current = u);
557
+ m.current = d;
558
+ }), /* @__PURE__ */ t(A.div, {
559
+ ref: (f) => {
560
+ o.current = f, typeof r == "function" ? r(f) : r != null && (r.current = f);
514
561
  },
515
562
  "data-basic-page-stack": "",
516
- initial: l || !e ? !1 : {
563
+ initial: l || !c ? !1 : {
517
564
  opacity: 0,
518
565
  y: j
519
566
  },
@@ -522,21 +569,21 @@ function Ut({ enter: e = !0, className: a, children: n, ref: r, ...s }) {
522
569
  y: 0
523
570
  },
524
571
  transition: {
525
- y: R,
526
- opacity: M
572
+ y: P,
573
+ opacity: B
527
574
  },
528
575
  className: p("mt-7 flex min-w-0 flex-col gap-10", "[&:has(>*:first-child:not([data-basic-page-callout])>[data-basic-page-header]:first-child)]:mt-6 [&:has(>*:first-child:not([data-basic-page-callout])>h2:first-child)]:mt-6 [&:has(>[data-basic-page-header]:first-child)]:mt-6 [&:has(>h2:first-child)]:mt-6", "*:flex *:min-w-0 *:flex-col [&>*:not([data-basic-page-fields])]:gap-3", a),
529
576
  ...s,
530
- children: /* @__PURE__ */ t(Ke.Provider, {
531
- value: f,
577
+ children: /* @__PURE__ */ t(Qe.Provider, {
578
+ value: u,
532
579
  children: n
533
580
  })
534
581
  });
535
582
  }
536
- var Oe = "@container grid min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] mb-3 [&>:not([data-basic-page-search]):not([data-basic-page-header-action])]:col-start-1 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:row-span-2 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:self-center [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):not(:nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-end [&>:not([data-basic-page-search]):not([data-basic-page-header-action]):not(:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-start [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0";
537
- function Jt({ enter: e, className: a, ...n }) {
583
+ var Be = "@container grid min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] mb-3 [&>:not([data-basic-page-search]):not([data-basic-page-header-action])]:col-start-1 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:row-span-2 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:self-center [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):not(:nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-end [&>:not([data-basic-page-search]):not([data-basic-page-header-action]):not(:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-start [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0";
584
+ function aa({ enter: e, className: a, ...n }) {
538
585
  const r = L();
539
- return e && !r ? /* @__PURE__ */ t(N.div, {
586
+ return Ee(e === !0) && !r ? /* @__PURE__ */ t(A.div, {
540
587
  initial: {
541
588
  opacity: 0,
542
589
  y: j
@@ -546,27 +593,27 @@ function Jt({ enter: e, className: a, ...n }) {
546
593
  y: 0
547
594
  },
548
595
  transition: {
549
- y: R,
550
- opacity: M
596
+ y: P,
597
+ opacity: B
551
598
  },
552
599
  "data-basic-page-header": "",
553
- className: p(Oe, a),
600
+ className: p(Be, a),
554
601
  ...n
555
602
  }) : /* @__PURE__ */ t("div", {
556
603
  "data-basic-page-header": "",
557
- className: p(Oe, a),
604
+ className: p(Be, a),
558
605
  ...n
559
606
  });
560
607
  }
561
- function Zt({ className: e, ...a }) {
608
+ function na({ className: e, ...a }) {
562
609
  return /* @__PURE__ */ t("div", {
563
610
  "data-basic-page-header-action": "",
564
611
  className: p("flex items-center gap-2", "[[data-basic-page-header]>&]:col-start-3 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:self-start [[data-basic-page-header]>&]:justify-self-end", e),
565
612
  ...a
566
613
  });
567
614
  }
568
- function ea({ id: e, className: a, children: n, ...r }) {
569
- const s = be(e, n);
615
+ function ra({ id: e, className: a, children: n, ...r }) {
616
+ const s = xe(e, n);
570
617
  return /* @__PURE__ */ t("h2", {
571
618
  id: s,
572
619
  className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate px-5 font-medium", "mb-3 [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-header]>&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0", a),
@@ -574,70 +621,70 @@ function ea({ id: e, className: a, children: n, ...r }) {
574
621
  children: n
575
622
  });
576
623
  }
577
- function Qe({ className: e, ...a }) {
624
+ function Ue({ className: e, ...a }) {
578
625
  return /* @__PURE__ */ t("p", {
579
626
  className: p("text-display-xs text-pho-description px-5 font-normal", e),
580
627
  ...a
581
628
  });
582
629
  }
583
- function ta({ one: e, other: a, ...n }) {
584
- const r = T(fe), s = me(r?.subscribe ?? ve, () => r?.get().api ?? null, () => null);
630
+ function ia({ one: e, other: a, ...n }) {
631
+ const r = k(he), s = be(r?.subscribe ?? Ne, () => r?.get().api ?? null, () => null);
585
632
  if (s == null) return null;
586
633
  const l = s.query.trim() !== "" ? `${s.matched} of ${s.total}.` : `${s.total} ${s.total === 1 ? e : a}.`;
587
- return /* @__PURE__ */ t(Qe, {
634
+ return /* @__PURE__ */ t(Ue, {
588
635
  ...n,
589
636
  children: l
590
637
  });
591
638
  }
592
- function aa({ className: e, ...a }) {
639
+ function sa({ className: e, ...a }) {
593
640
  return /* @__PURE__ */ t("p", {
594
641
  className: p("text-pho-description px-5 text-xs font-normal", "mt-3 [[data-basic-page-callout]_&]:mt-0 [[data-basic-page-stack]>*>&]:mt-0", e),
595
642
  ...a
596
643
  });
597
644
  }
598
- function na({ animateHeight: e, className: a, children: n, ...r }) {
599
- const s = /* @__PURE__ */ t(G, { children: Y.toArray(n) });
645
+ function la({ animateHeight: e, className: a, children: n, ...r }) {
646
+ const s = /* @__PURE__ */ t(z, { children: J.toArray(n) });
600
647
  return e ? /* @__PURE__ */ t("div", {
601
- className: p(ge, "min-h-0 overflow-hidden", a),
648
+ className: p(ve, "min-h-0 overflow-hidden", a),
602
649
  ...r,
603
- children: /* @__PURE__ */ t(gt, {
604
- transition: R,
605
- className: ne,
650
+ children: /* @__PURE__ */ t(yt, {
651
+ transition: P,
652
+ className: ae,
606
653
  children: s
607
654
  })
608
655
  }) : /* @__PURE__ */ t("div", {
609
- className: p(Ge, a),
656
+ className: p(ze, a),
610
657
  ...r,
611
658
  children: s
612
659
  });
613
660
  }
614
- function ra({ className: e, ...a }) {
615
- const { leaving: n, ...r } = Ne();
616
- return /* @__PURE__ */ t(N.div, {
661
+ function oa({ className: e, ...a }) {
662
+ const { leaving: n, ...r } = _e();
663
+ return /* @__PURE__ */ t(A.div, {
617
664
  ...r,
618
- className: p(At, n && "overflow-hidden", e),
665
+ className: p(Et, n && "overflow-hidden", e),
619
666
  ...a
620
667
  });
621
668
  }
622
- function ia({ divided: e = !1, className: a, ...n }) {
669
+ function ca({ divided: e = !1, className: a, ...n }) {
623
670
  return /* @__PURE__ */ t("div", {
624
- className: p(e ? Et : _t, a),
671
+ className: p(e ? St : Ct, a),
625
672
  ...n
626
673
  });
627
674
  }
628
- function sa({ className: e, icon: a, children: n, ...r }) {
675
+ function ua({ className: e, icon: a, children: n, ...r }) {
629
676
  if (a == null || a === !1 || a === !0) return /* @__PURE__ */ t("div", {
630
677
  "data-basic-page-callout": "",
631
- className: p(Ce, e),
678
+ className: p(Te, e),
632
679
  ...r,
633
680
  children: n
634
681
  });
635
- const [s, ...l] = Y.toArray(n);
636
- return /* @__PURE__ */ v("div", {
682
+ const [s, ...l] = J.toArray(n);
683
+ return /* @__PURE__ */ y("div", {
637
684
  "data-basic-page-callout": "",
638
- className: p(Ce, e),
685
+ className: p(Te, e),
639
686
  ...r,
640
- children: [/* @__PURE__ */ v("div", {
687
+ children: [/* @__PURE__ */ y("div", {
641
688
  className: "relative",
642
689
  children: [/* @__PURE__ */ t("div", {
643
690
  className: "min-w-0 pr-16",
@@ -650,8 +697,8 @@ function sa({ className: e, icon: a, children: n, ...r }) {
650
697
  }), l]
651
698
  });
652
699
  }
653
- function la({ id: e, className: a, children: n, ...r }) {
654
- const s = be(e, n);
700
+ function da({ id: e, className: a, children: n, ...r }) {
701
+ const s = xe(e, n);
655
702
  return /* @__PURE__ */ t("h2", {
656
703
  id: s,
657
704
  className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate font-medium", a),
@@ -659,83 +706,83 @@ function la({ id: e, className: a, children: n, ...r }) {
659
706
  children: n
660
707
  });
661
708
  }
662
- function oa({ className: e, ...a }) {
709
+ function pa({ className: e, ...a }) {
663
710
  return /* @__PURE__ */ t("p", {
664
711
  className: p("text-display-xs text-pho-description font-normal", e),
665
712
  ...a
666
713
  });
667
714
  }
668
- var Ye = z(null), Ue = z(!1);
669
- function ca({ className: e, children: a, ...n }) {
715
+ var Je = H(null), Ze = H(!1);
716
+ function fa({ className: e, children: a, ...n }) {
670
717
  let r = !1;
671
- const s = Y.toArray(a).map((l, c) => {
672
- if (!He(l)) return l;
673
- let o;
674
- return l.props.done ? o = "done" : r ? o = "upcoming" : (r = !0, o = l.props.working ? "working" : l.props.pending ? "pending" : "current"), /* @__PURE__ */ t(Ye.Provider, {
718
+ const s = J.toArray(a).map((l, o) => {
719
+ if (!Fe(l)) return l;
720
+ let c;
721
+ return l.props.done ? c = "done" : r ? c = "upcoming" : (r = !0, c = l.props.working ? "working" : l.props.pending ? "pending" : "current"), /* @__PURE__ */ t(Je.Provider, {
675
722
  value: {
676
- number: c + 1,
677
- state: o
723
+ number: o + 1,
724
+ state: c
678
725
  },
679
726
  children: l
680
- }, l.key ?? c);
727
+ }, l.key ?? o);
681
728
  });
682
729
  return /* @__PURE__ */ t("ol", {
683
730
  "data-basic-page-onboard": "",
684
- className: p(Ge, "m-0 list-none p-0", e),
731
+ className: p(ze, "m-0 list-none p-0", e),
685
732
  ...n,
686
733
  children: s
687
734
  });
688
735
  }
689
- var ua = "relative grid size-5 shrink-0 place-items-center rounded-full border text-xs font-medium tabular-nums transition-[background-color,border-color,color] duration-200 ease-out *:[grid-area:1/1]", da = {
736
+ var ma = "relative grid size-5 shrink-0 place-items-center rounded-full border text-xs font-medium tabular-nums transition-[background-color,border-color,color] duration-200 ease-out *:[grid-area:1/1]", ha = {
690
737
  done: "border-pho-ink text-pho-primary",
691
738
  current: "bg-pho-brand-solid text-pho-on-brand border-transparent",
692
739
  working: "border-transparent text-pho-primary",
693
740
  pending: "border-pho-ink text-pho-primary border-dashed",
694
741
  upcoming: "border-pho-primary text-pho-description"
695
- }, pa = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink opacity-30", fa = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink border-r-transparent border-b-transparent border-l-transparent animate-pho-spinner", ma = {
742
+ }, ga = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink opacity-30", ba = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink border-r-transparent border-b-transparent border-l-transparent animate-pho-spinner", ya = {
696
743
  done: "Done.",
697
744
  working: "In progress.",
698
745
  pending: "Waiting."
699
746
  };
700
- function ha({ icon: e, aside: a, title: n, description: r, done: s, working: l, pending: c, className: o, children: i, ...d }) {
701
- const f = T(Ye), u = f?.state ?? (s ? "done" : l ? "working" : c ? "pending" : "current"), m = L(), h = u === "current" || u === "working" || u === "pending", b = u === "upcoming", g = ma[u], E = i != null && i !== !1, y = e != null && e !== !1, k = a != null && a !== !1;
747
+ function va({ icon: e, aside: a, title: n, description: r, done: s, working: l, pending: o, className: c, children: i, ...d }) {
748
+ const m = k(Je), u = m?.state ?? (s ? "done" : l ? "working" : o ? "pending" : "current"), f = L(), h = u === "current" || u === "working" || u === "pending", b = u === "upcoming", g = ya[u], E = i != null && i !== !1, v = e != null && e !== !1, C = a != null && a !== !1;
702
749
  return /* @__PURE__ */ t("li", {
703
750
  "data-basic-page-step": u,
704
751
  "aria-current": h ? "step" : void 0,
705
- className: p("relative m-0 grid min-w-0 grid-cols-[auto_minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] items-center gap-x-3 px-5 py-4", "transition-[background-color] duration-200 ease-out first:rounded-t-[calc(0.75rem-1px)] last:rounded-b-[calc(0.75rem-1px)] motion-reduce:transition-none", h && "bg-pho-page", o),
752
+ className: p("relative m-0 grid min-w-0 grid-cols-[auto_minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] items-center gap-x-3 px-5 py-4", "transition-[background-color] duration-200 ease-out first:rounded-t-[calc(0.75rem-1px)] last:rounded-b-[calc(0.75rem-1px)] motion-reduce:transition-none", h && "bg-pho-page", c),
706
753
  ...d,
707
- children: /* @__PURE__ */ v(Ue.Provider, {
754
+ children: /* @__PURE__ */ y(Ze.Provider, {
708
755
  value: !0,
709
756
  children: [
710
- /* @__PURE__ */ v("span", {
757
+ /* @__PURE__ */ y("span", {
711
758
  "aria-hidden": !0,
712
- className: p(ua, da[u], "col-start-1 row-start-1"),
713
- children: [/* @__PURE__ */ t(G, {
759
+ className: p(ma, ha[u], "col-start-1 row-start-1"),
760
+ children: [/* @__PURE__ */ t(z, {
714
761
  initial: !1,
715
- children: u === "done" ? /* @__PURE__ */ t(N.span, {
716
- ...ee(m),
762
+ children: u === "done" ? /* @__PURE__ */ t(A.span, {
763
+ ...Z(f),
717
764
  className: "flex",
718
- children: /* @__PURE__ */ t(bt, { className: "size-3" })
719
- }, "check") : /* @__PURE__ */ t(N.span, {
720
- ...ee(m),
721
- children: f?.number ?? 1
765
+ children: /* @__PURE__ */ t(vt, { className: "size-3" })
766
+ }, "check") : /* @__PURE__ */ t(A.span, {
767
+ ...Z(f),
768
+ children: m?.number ?? 1
722
769
  }, "number")
723
- }), u === "working" ? /* @__PURE__ */ v(he, { children: [/* @__PURE__ */ t("span", { className: pa }), /* @__PURE__ */ t("span", { className: fa })] }) : null]
770
+ }), u === "working" ? /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ t("span", { className: ga }), /* @__PURE__ */ t("span", { className: ba })] }) : null]
724
771
  }),
725
- /* @__PURE__ */ v("div", {
772
+ /* @__PURE__ */ y("div", {
726
773
  "data-basic-page-step-title": "",
727
774
  className: p("text-display-xs col-start-2 row-start-1 min-w-0 font-medium transition-colors duration-200 ease-out", b ? "text-pho-description" : "text-pho-primary"),
728
- children: [g ? /* @__PURE__ */ v("span", {
775
+ children: [g ? /* @__PURE__ */ y("span", {
729
776
  className: "sr-only",
730
777
  children: [g, " "]
731
778
  }) : null, n]
732
779
  }),
733
- /* @__PURE__ */ t(Ae, {
780
+ /* @__PURE__ */ t(Ce, {
734
781
  show: h,
735
782
  gap: "none",
736
783
  clip: !1,
737
784
  className: "col-start-2 row-start-2 flex min-w-0 flex-col self-stretch",
738
- children: /* @__PURE__ */ v("div", {
785
+ children: /* @__PURE__ */ y("div", {
739
786
  "data-basic-page-step-body": "",
740
787
  className: "flex min-w-0 flex-1 flex-col",
741
788
  children: [r ? /* @__PURE__ */ t("div", {
@@ -750,18 +797,18 @@ function ha({ icon: e, aside: a, title: n, description: r, done: s, working: l,
750
797
  u === "done" && E ? /* @__PURE__ */ t("div", {
751
798
  className: "col-start-3 row-start-1 flex min-w-0 items-center gap-2",
752
799
  children: i
753
- }) : k ? /* @__PURE__ */ t(G, {
800
+ }) : C ? /* @__PURE__ */ t(z, {
754
801
  initial: !1,
755
- children: h ? /* @__PURE__ */ t(N.div, {
756
- ...ee(m),
802
+ children: h ? /* @__PURE__ */ t(A.div, {
803
+ ...Z(f),
757
804
  className: "col-start-3 row-span-2 row-start-1 self-start",
758
805
  children: a
759
806
  }, "aside") : null
760
- }) : y ? /* @__PURE__ */ t(G, {
807
+ }) : v ? /* @__PURE__ */ t(z, {
761
808
  initial: !1,
762
- children: h ? /* @__PURE__ */ t(N.div, {
809
+ children: h ? /* @__PURE__ */ t(A.div, {
763
810
  "aria-hidden": !0,
764
- ...ee(m),
811
+ ...Z(f),
765
812
  className: "pointer-events-none col-start-3 row-span-2 row-start-1 size-14 self-start",
766
813
  children: /* @__PURE__ */ t("div", {
767
814
  className: "text-pho-primary size-full opacity-[0.275] [&>svg]:size-full",
@@ -773,13 +820,13 @@ function ha({ icon: e, aside: a, title: n, description: r, done: s, working: l,
773
820
  })
774
821
  });
775
822
  }
776
- function ga({ label: e, description: a, htmlFor: n, stacked: r = !1, className: s, children: l, ...c }) {
777
- const { leaving: o, ...i } = Ne();
778
- return /* @__PURE__ */ v(N.div, {
823
+ function xa({ label: e, description: a, htmlFor: n, stacked: r = !1, className: s, children: l, ...o }) {
824
+ const { leaving: c, ...i } = _e();
825
+ return /* @__PURE__ */ y(A.div, {
779
826
  ...i,
780
- className: p(Nt, r && "sm:flex-col sm:items-stretch sm:justify-start sm:gap-3", o && "overflow-hidden", s),
781
- ...c,
782
- children: [/* @__PURE__ */ v("div", {
827
+ className: p(_t, r && "sm:flex-col sm:items-stretch sm:justify-start sm:gap-3", c && "overflow-hidden", s),
828
+ ...o,
829
+ children: [/* @__PURE__ */ y("div", {
783
830
  className: "min-w-0",
784
831
  children: [n ? /* @__PURE__ */ t("label", {
785
832
  htmlFor: n,
@@ -798,18 +845,18 @@ function ga({ label: e, description: a, htmlFor: n, stacked: r = !1, className:
798
845
  })]
799
846
  });
800
847
  }
801
- function ba({ className: e, ...a }) {
802
- const n = T(Ue);
848
+ function wa({ className: e, ...a }) {
849
+ const n = k(Ze);
803
850
  return /* @__PURE__ */ t("p", {
804
851
  className: p("text-pho-description max-w-full min-w-0 truncate", n ? "text-display-xs font-normal" : "text-base", e),
805
852
  ...a
806
853
  });
807
854
  }
808
- function ya({ error: e, show: a, className: n, children: r, ...s }) {
809
- const l = L(), c = T(X), o = e ?? c?.error ?? void 0;
810
- return /* @__PURE__ */ t(G, {
855
+ function Na({ error: e, show: a, className: n, children: r, ...s }) {
856
+ const l = L(), o = k(X), c = e ?? o?.error ?? void 0;
857
+ return /* @__PURE__ */ t(z, {
811
858
  initial: !1,
812
- children: (a ?? !0) && (o != null || r != null) ? /* @__PURE__ */ t(N.div, {
859
+ children: (a ?? !0) && (c != null || r != null) ? /* @__PURE__ */ t(A.div, {
813
860
  "data-basic-page-alert": "",
814
861
  className: "overflow-hidden",
815
862
  initial: {
@@ -825,11 +872,11 @@ function ya({ error: e, show: a, className: n, children: r, ...s }) {
825
872
  opacity: 0
826
873
  },
827
874
  transition: l ? { duration: 0 } : {
828
- height: R,
829
- opacity: M
875
+ height: P,
876
+ opacity: B
830
877
  },
831
- children: /* @__PURE__ */ t(ot, {
832
- error: o,
878
+ children: /* @__PURE__ */ t(ut, {
879
+ error: c,
833
880
  className: p("px-5 pb-3", n),
834
881
  ...s,
835
882
  children: r
@@ -837,114 +884,114 @@ function ya({ error: e, show: a, className: n, children: r, ...s }) {
837
884
  }) : null
838
885
  });
839
886
  }
840
- function pn() {
841
- return T(X)?.requestSave ?? null;
887
+ function gn() {
888
+ return k(X)?.requestSave ?? null;
842
889
  }
843
- var fn = 800, ce = ht.createToastManager(), X = z(null);
844
- function va({ action: e, errors: a, autoSave: n = !1, className: r, children: s, onChange: l, onBlur: c, ...o }) {
845
- const [i, d] = w(!1), [f, u] = w(!1), [m, h] = w(null), [b, g] = w(a ?? {}), [E, y] = w(null), k = _(null), x = _(null), C = _(null), P = _(!1), B = _(!1), I = _(null), D = _(async () => {
890
+ var bn = 800, de = bt.createToastManager(), X = H(null);
891
+ function Aa({ action: e, errors: a, autoSave: n = !1, className: r, children: s, onChange: l, onBlur: o, ...c }) {
892
+ const [i, d] = N(!1), [m, u] = N(!1), [f, h] = N(null), [b, g] = N(a ?? {}), [E, v] = N(null), C = _(null), x = _(null), R = _(null), I = _(!1), T = _(!1), M = _(null), F = _(async () => {
846
893
  });
847
894
  O(() => () => {
848
895
  x.current != null && clearTimeout(x.current);
849
896
  }, []);
850
- const q = async () => {
851
- const A = k.current;
852
- if (A == null || e == null) return;
853
- if (P.current) {
854
- B.current = !0;
897
+ const D = async () => {
898
+ const S = C.current;
899
+ if (S == null || e == null) return;
900
+ if (I.current) {
901
+ T.current = !0;
855
902
  return;
856
903
  }
857
- if (!A.checkValidity()) return;
858
- const S = Object.fromEntries(new FormData(A).entries()), Z = C.current;
859
- P.current = !0, y({
860
- field: Z,
904
+ if (!S.checkValidity()) return;
905
+ const w = Object.fromEntries(new FormData(S).entries()), $ = R.current;
906
+ I.current = !0, v({
907
+ field: $,
861
908
  phase: "saving"
862
909
  }), h(null);
863
910
  try {
864
- const F = (await e(S))?.errors;
865
- if (F != null && Object.keys(F).length > 0) {
866
- g(F), y(null);
911
+ const G = (await e(w))?.errors;
912
+ if (G != null && Object.keys(G).length > 0) {
913
+ g(G), v(null);
867
914
  return;
868
915
  }
869
- g({}), u(!1), y({
870
- field: Z,
916
+ g({}), u(!1), v({
917
+ field: $,
871
918
  phase: "saved"
872
- }), I.current != null && (ce.close(I.current), I.current = null);
873
- } catch (F) {
874
- y(null), h(F), I.current != null && ce.close(I.current), I.current = ce.add({
919
+ }), M.current != null && (de.close(M.current), M.current = null);
920
+ } catch (G) {
921
+ v(null), h(G), M.current != null && de.close(M.current), M.current = de.add({
875
922
  type: "error",
876
923
  title: "Couldn't save",
877
- description: F instanceof Error && F.message !== "" ? F.message : "The change is still here — try again.",
924
+ description: G instanceof Error && G.message !== "" ? G.message : "The change is still here — try again.",
878
925
  timeout: 0,
879
926
  actionProps: {
880
927
  children: "Retry",
881
928
  onClick: () => {
882
- D.current();
929
+ F.current();
883
930
  }
884
931
  }
885
932
  });
886
933
  } finally {
887
- P.current = !1, B.current && (B.current = !1, D.current());
934
+ I.current = !1, T.current && (T.current = !1, F.current());
888
935
  }
889
936
  };
890
- D.current = q;
891
- const U = () => {
937
+ F.current = D;
938
+ const Q = () => {
892
939
  x.current != null && clearTimeout(x.current), x.current = setTimeout(() => {
893
- x.current = null, D.current();
940
+ x.current = null, F.current();
894
941
  }, 800);
895
- }, J = $(() => n ? (A) => {
896
- A != null && (C.current = A), u(!0), U();
897
- } : null, [n]), H = $(() => ({
942
+ }, Y = q(() => n ? (S) => {
943
+ S != null && (R.current = S), u(!0), Q();
944
+ } : null, [n]), le = q(() => ({
898
945
  pending: i,
899
- dirty: f,
900
- error: m,
946
+ dirty: m,
947
+ error: f,
901
948
  auto: E,
902
- requestSave: J
949
+ requestSave: Y
903
950
  }), [
904
951
  i,
905
- f,
906
952
  m,
953
+ f,
907
954
  E,
908
- J
955
+ Y
909
956
  ]);
910
957
  return /* @__PURE__ */ t(X.Provider, {
911
- value: H,
912
- children: /* @__PURE__ */ t(yt, {
958
+ value: le,
959
+ children: /* @__PURE__ */ t(xt, {
913
960
  errors: b,
914
- onFormSubmit: async (A) => {
961
+ onFormSubmit: async (S) => {
915
962
  if (e != null) {
916
963
  d(!0), h(null);
917
964
  try {
918
- const S = (await e(A))?.errors;
919
- if (S != null && Object.keys(S).length > 0) {
920
- g(S);
965
+ const w = (await e(S))?.errors;
966
+ if (w != null && Object.keys(w).length > 0) {
967
+ g(w);
921
968
  return;
922
969
  }
923
970
  g({}), u(!1);
924
- } catch (S) {
925
- h(S);
971
+ } catch (w) {
972
+ h(w);
926
973
  } finally {
927
974
  d(!1);
928
975
  }
929
976
  }
930
977
  },
931
- onChange: (A) => {
978
+ onChange: (S) => {
932
979
  u(!0), h(null);
933
- const S = A.target.name;
934
- S && S in b && g((Z) => {
935
- const { [S]: F, ...nt } = Z;
936
- return nt;
937
- }), n && (S && (C.current = S), U()), l?.(A);
980
+ const w = S.target.name;
981
+ w && w in b && g(($) => {
982
+ const { [w]: G, ...it } = $;
983
+ return it;
984
+ }), n && (w && (R.current = w), Q()), l?.(S);
938
985
  },
939
- onBlur: (A) => {
940
- n && f && x.current != null && (clearTimeout(x.current), x.current = null, D.current()), c?.(A);
986
+ onBlur: (S) => {
987
+ n && m && x.current != null && (clearTimeout(x.current), x.current = null, F.current()), o?.(S);
941
988
  },
942
989
  className: p("contents [[data-basic-page-stack]>&]:flex [[data-basic-page-stack]>&]:min-w-0 [[data-basic-page-stack]>&]:flex-col", r),
943
- ...o,
944
- ref: (A) => {
945
- k.current = A;
946
- const S = o.ref;
947
- typeof S == "function" ? S(A) : S != null && (S.current = A);
990
+ ...c,
991
+ ref: (S) => {
992
+ C.current = S;
993
+ const w = c.ref;
994
+ typeof w == "function" ? w(S) : w != null && (w.current = S);
948
995
  },
949
996
  children: /* @__PURE__ */ t("fieldset", {
950
997
  disabled: i,
@@ -955,20 +1002,20 @@ function va({ action: e, errors: a, autoSave: n = !1, className: r, children: s,
955
1002
  })
956
1003
  });
957
1004
  }
958
- function xa({ name: e, className: a, ...n }) {
959
- const r = T(X), s = L(), l = r?.auto ?? null, c = l != null && (e == null || l.field === e), [o, i] = w(!1), d = c ? l.phase : null;
1005
+ function _a({ name: e, className: a, ...n }) {
1006
+ const r = k(X), s = L(), l = r?.auto ?? null, o = l != null && (e == null || l.field === e), [c, i] = N(!1), d = o ? l.phase : null;
960
1007
  O(() => {
961
1008
  if (d !== "saved") return;
962
1009
  i(!0);
963
- const m = setTimeout(() => i(!1), 1800);
964
- return () => clearTimeout(m);
1010
+ const f = setTimeout(() => i(!1), 1800);
1011
+ return () => clearTimeout(f);
965
1012
  }, [d, l]);
966
- const f = d === "saving" ? "Saving…" : d === "saved" && o ? "Saved" : null, u = s ? "blur(0px)" : `blur(${De}px)`;
1013
+ const m = d === "saving" ? "Saving…" : d === "saved" && c ? "Saved" : null, u = s ? "blur(0px)" : `blur(${ge}px)`;
967
1014
  return /* @__PURE__ */ t("span", {
968
1015
  className: "grid justify-items-end",
969
- children: /* @__PURE__ */ t(G, {
1016
+ children: /* @__PURE__ */ t(z, {
970
1017
  initial: !1,
971
- children: f != null && /* @__PURE__ */ t(N.output, {
1018
+ children: m != null && /* @__PURE__ */ t(A.output, {
972
1019
  initial: {
973
1020
  opacity: 0,
974
1021
  filter: u
@@ -981,21 +1028,21 @@ function xa({ name: e, className: a, ...n }) {
981
1028
  opacity: 0,
982
1029
  filter: u
983
1030
  },
984
- transition: xe,
1031
+ transition: ne,
985
1032
  className: p("text-pho-description pl-8 [grid-area:1/1]", a),
986
1033
  style: { background: "linear-gradient(to left, var(--background-color-pho-primary) calc(100% - 2rem), transparent)" },
987
1034
  ...n,
988
- children: f
989
- }, f)
1035
+ children: m
1036
+ }, m)
990
1037
  })
991
1038
  });
992
1039
  }
993
- var wa = "flex min-w-0 flex-col gap-5 p-5 [&>[data-basic-page-alert]]:-mx-5 [&>[data-basic-page-alert]]:-mt-2 [&>[data-basic-page-alert]]:-mb-5 [&>[data-basic-page-footer]]:pr-0 [&>[data-basic-page-reveal]]:flex [&>[data-basic-page-reveal]]:flex-col [&>[data-basic-page-reveal]]:gap-5";
994
- function Na({ className: e, ...a }) {
1040
+ var Ea = "flex min-w-0 flex-col gap-5 p-5 [&>[data-basic-page-alert]]:-mx-5 [&>[data-basic-page-alert]]:-mt-2 [&>[data-basic-page-alert]]:-mb-5 [&>[data-basic-page-footer]]:pr-0 [&>[data-basic-page-reveal]]:flex [&>[data-basic-page-reveal]]:flex-col [&>[data-basic-page-reveal]]:gap-5";
1041
+ function Ca({ className: e, ...a }) {
995
1042
  const n = _(null);
996
- return Xe(n, "Fields", 20, () => null), /* @__PURE__ */ t("div", {
1043
+ return Ye(n, "Fields", 20, () => null), /* @__PURE__ */ t("div", {
997
1044
  "data-basic-page-fields": "",
998
- className: p(ge, wa, e),
1045
+ className: p(ve, Ea, e),
999
1046
  ...a,
1000
1047
  ref: (r) => {
1001
1048
  n.current = r;
@@ -1004,14 +1051,14 @@ function Na({ className: e, ...a }) {
1004
1051
  }
1005
1052
  });
1006
1053
  }
1007
- function Aa({ className: e, ...a }) {
1054
+ function Sa({ className: e, ...a }) {
1008
1055
  return /* @__PURE__ */ t("div", {
1009
1056
  className: p("flex min-w-0 flex-col gap-5 *:min-w-0 sm:flex-row sm:gap-3 sm:*:flex-1", e),
1010
1057
  ...a
1011
1058
  });
1012
1059
  }
1013
- function _a({ children: e = "Save changes", ...a }) {
1014
- const n = T(X);
1060
+ function ka({ children: e = "Save changes", ...a }) {
1061
+ const n = k(X);
1015
1062
  return /* @__PURE__ */ t(ie, {
1016
1063
  type: "submit",
1017
1064
  variant: "effect",
@@ -1021,37 +1068,37 @@ function _a({ children: e = "Save changes", ...a }) {
1021
1068
  children: e
1022
1069
  });
1023
1070
  }
1024
- function Ea({ show: e, className: a, ...n }) {
1025
- const r = T(X), s = e === "dirty" ? r?.dirty ?? !1 : e, l = /* @__PURE__ */ t("div", {
1071
+ function Ta({ show: e, className: a, ...n }) {
1072
+ const r = k(X), s = e === "dirty" ? r?.dirty ?? !1 : e, l = /* @__PURE__ */ t("div", {
1026
1073
  "data-basic-page-footer": "",
1027
1074
  className: p("flex items-center justify-end gap-3 pr-[calc(1.25rem+2.5px)]", a),
1028
1075
  ...n
1029
1076
  });
1030
- return s === void 0 ? l : /* @__PURE__ */ t(Ae, {
1077
+ return s === void 0 ? l : /* @__PURE__ */ t(Ce, {
1031
1078
  show: s,
1032
1079
  gap: "block",
1033
1080
  clip: !1,
1034
1081
  children: l
1035
1082
  });
1036
1083
  }
1037
- var Ca = {
1084
+ var Ra = {
1038
1085
  stack: "-2.5rem",
1039
1086
  block: "-0.75rem",
1040
1087
  fields: "-1.25rem",
1041
1088
  none: "0px"
1042
1089
  };
1043
- function Ae({ show: e, clip: a = !0, gap: n = "stack", dividers: r, className: s, ...l }) {
1044
- const c = L(), o = Ca[r ? "none" : n], i = _(null), d = _(e !== !0);
1090
+ function Ce({ show: e, clip: a = !0, gap: n = "stack", dividers: r, className: s, ...l }) {
1091
+ const o = L(), c = Ra[r ? "none" : n], i = _(null), d = _(e !== !0);
1045
1092
  O(() => {
1046
1093
  d.current = !0;
1047
1094
  }, []);
1048
- const f = () => {
1095
+ const m = () => {
1049
1096
  a && i.current && (i.current.style.overflow = "hidden");
1050
1097
  }, u = () => {
1051
1098
  i.current && (i.current.style.overflow = "");
1052
1099
  };
1053
- return e === void 0 ? /* @__PURE__ */ t(N.div, {
1054
- initial: c ? !1 : {
1100
+ return e === void 0 ? /* @__PURE__ */ t(A.div, {
1101
+ initial: o ? !1 : {
1055
1102
  opacity: 0,
1056
1103
  y: j
1057
1104
  },
@@ -1060,24 +1107,24 @@ function Ae({ show: e, clip: a = !0, gap: n = "stack", dividers: r, className: s
1060
1107
  y: 0
1061
1108
  },
1062
1109
  transition: {
1063
- y: R,
1064
- opacity: M
1110
+ y: P,
1111
+ opacity: B
1065
1112
  },
1066
- className: p(r && ne, s),
1113
+ className: p(r && ae, s),
1067
1114
  ...l
1068
- }) : /* @__PURE__ */ t(G, {
1115
+ }) : /* @__PURE__ */ t(z, {
1069
1116
  initial: !1,
1070
- children: e ? /* @__PURE__ */ t(N.div, {
1117
+ children: e ? /* @__PURE__ */ t(A.div, {
1071
1118
  "data-basic-page-reveal": "",
1072
- ref: (m) => {
1073
- i.current = m, a && m && d.current && (m.style.overflow = "hidden");
1119
+ ref: (f) => {
1120
+ i.current = f, a && f && d.current && (f.style.overflow = "hidden");
1074
1121
  },
1075
- onAnimationStart: f,
1122
+ onAnimationStart: m,
1076
1123
  onAnimationComplete: u,
1077
1124
  initial: {
1078
1125
  height: 0,
1079
1126
  opacity: 0,
1080
- marginTop: o
1127
+ marginTop: c
1081
1128
  },
1082
1129
  animate: {
1083
1130
  height: "auto",
@@ -1087,27 +1134,27 @@ function Ae({ show: e, clip: a = !0, gap: n = "stack", dividers: r, className: s
1087
1134
  exit: {
1088
1135
  height: 0,
1089
1136
  opacity: 0,
1090
- marginTop: o
1137
+ marginTop: c
1091
1138
  },
1092
- transition: c ? { duration: 0 } : {
1093
- height: R,
1094
- marginTop: R,
1095
- opacity: M
1139
+ transition: o ? { duration: 0 } : {
1140
+ height: P,
1141
+ marginTop: P,
1142
+ opacity: B
1096
1143
  },
1097
- className: p(r && ne, s),
1144
+ className: p(r && ae, s),
1098
1145
  ...l
1099
1146
  }) : null
1100
1147
  });
1101
1148
  }
1102
- var ka = "top-4 left-5 h-8 text-base [&>svg]:size-[1.125em] [&>svg]:shrink-0", Sa = "(min-width: 40rem)";
1103
- function Ta() {
1104
- return typeof window < "u" && typeof window.matchMedia == "function" && !window.matchMedia(Sa).matches;
1149
+ var Pa = "top-4 left-5 h-8 text-base [&>svg]:size-[1.125em] [&>svg]:shrink-0", Ia = "(min-width: 40rem)";
1150
+ function Oa() {
1151
+ return typeof window < "u" && typeof window.matchMedia == "function" && !window.matchMedia(Ia).matches;
1105
1152
  }
1106
- var Je = z(null);
1107
- function Ze({ className: e, children: a, ...n }) {
1108
- const r = Y.toArray(a).filter(He), s = r.map((k) => k.props.children ?? null), l = je();
1109
- Gt(s);
1110
- const [c] = w(Ta), o = L(), i = r.length, d = Me(), f = !c && i >= Ra, u = T(ye), m = i > 0 ? r[i - 1]?.props : null, h = m?.children ?? "Back", b = m?.href, g = m?.onClick;
1153
+ var et = H(null);
1154
+ function tt({ className: e, children: a, ...n }) {
1155
+ const r = J.toArray(a).filter(Fe), s = r.map((C) => C.props.children ?? null), l = We();
1156
+ Vt(s);
1157
+ const [o] = N(Oa), c = L(), i = r.length, d = He(), m = !o && i >= La, u = k(we), f = i > 0 ? r[i - 1]?.props : null, h = f?.children ?? "Back", b = f?.href, g = f?.onClick;
1111
1158
  V(() => {
1112
1159
  if (!(u == null || b == null))
1113
1160
  return u.setTail({
@@ -1121,132 +1168,132 @@ function Ze({ className: e, children: a, ...n }) {
1121
1168
  b,
1122
1169
  g
1123
1170
  ]);
1124
- const [E, y] = w(!o && !c && l != null && l.labels.length > i);
1171
+ const [E, v] = N(!c && !o && l != null && l.labels.length > i);
1125
1172
  return /* @__PURE__ */ t("nav", {
1126
1173
  "aria-label": "Breadcrumb",
1127
1174
  "data-basic-page-back": "",
1128
1175
  className: p("absolute top-4 left-3 flex min-w-max items-center", e),
1129
1176
  ...n,
1130
- children: /* @__PURE__ */ v("ol", {
1177
+ children: /* @__PURE__ */ y("ol", {
1131
1178
  className: "m-0 flex list-none items-center p-0",
1132
- children: [r.map((k, x) => f && x > 0 && x < i - 2 ? null : /* @__PURE__ */ v(vt, { children: [f && x === i - 2 && /* @__PURE__ */ v("li", {
1179
+ children: [r.map((C, x) => m && x > 0 && x < i - 2 ? null : /* @__PURE__ */ y(wt, { children: [m && x === i - 2 && /* @__PURE__ */ y("li", {
1133
1180
  className: "m-0 flex items-center max-sm:hidden",
1134
1181
  children: [/* @__PURE__ */ t("span", {
1135
1182
  "aria-hidden": !0,
1136
- className: de,
1183
+ className: fe,
1137
1184
  children: re
1138
- }), /* @__PURE__ */ v(W.Root, { children: [/* @__PURE__ */ t(W.Trigger, { render: /* @__PURE__ */ t(ie, {
1185
+ }), /* @__PURE__ */ y(W.Root, { children: [/* @__PURE__ */ t(W.Trigger, { render: /* @__PURE__ */ t(ie, {
1139
1186
  variant: "ghost",
1140
1187
  size: "sm",
1141
1188
  "aria-label": "Hidden pages",
1142
1189
  className: "px-2",
1143
- children: Pa
1190
+ children: Ba
1144
1191
  }) }), /* @__PURE__ */ t(W.Portal, { children: /* @__PURE__ */ t(W.Positioner, {
1145
1192
  align: "start",
1146
1193
  sideOffset: 4,
1147
- children: /* @__PURE__ */ t(W.Popup, { children: r.slice(1, i - 2).map((C, P) => {
1148
- const B = C.props;
1194
+ children: /* @__PURE__ */ t(W.Popup, { children: r.slice(1, i - 2).map((R, I) => {
1195
+ const T = R.props;
1149
1196
  return /* @__PURE__ */ t(W.LinkItem, {
1150
1197
  render: /* @__PURE__ */ t(d, {
1151
- href: B.href,
1152
- onClick: B.onClick
1198
+ href: T.href,
1199
+ onClick: T.onClick
1153
1200
  }),
1154
- children: B.children ?? "Back"
1155
- }, C.key ?? P);
1201
+ children: T.children ?? "Back"
1202
+ }, R.key ?? I);
1156
1203
  }) })
1157
1204
  }) })] })]
1158
1205
  }), /* @__PURE__ */ t("li", {
1159
1206
  className: p("m-0 flex items-center", x < i - 1 && "max-sm:hidden"),
1160
- children: /* @__PURE__ */ t(Je.Provider, {
1207
+ children: /* @__PURE__ */ t(et.Provider, {
1161
1208
  value: {
1162
1209
  index: x,
1163
1210
  count: i,
1164
1211
  departing: l,
1165
- narrow: c
1212
+ narrow: o
1166
1213
  },
1167
- children: k
1214
+ children: C
1168
1215
  })
1169
- })] }, k.key ?? x)), E && /* @__PURE__ */ t("li", {
1216
+ })] }, C.key ?? x)), E && /* @__PURE__ */ t("li", {
1170
1217
  "aria-hidden": !0,
1171
1218
  className: "m-0 flex items-center max-sm:hidden",
1172
- children: /* @__PURE__ */ t(N.span, {
1219
+ children: /* @__PURE__ */ t(A.span, {
1173
1220
  initial: { opacity: 1 },
1174
1221
  animate: { opacity: 0 },
1175
- transition: $e,
1176
- onAnimationComplete: () => y(!1),
1177
- className: de,
1222
+ transition: je,
1223
+ onAnimationComplete: () => v(!1),
1224
+ className: fe,
1178
1225
  children: re
1179
1226
  })
1180
1227
  })]
1181
1228
  })
1182
1229
  });
1183
1230
  }
1184
- var de = "text-pho-description -mx-1 inline-flex shrink-0 text-base select-none", re = "/", Ra = 4, Pa = "…";
1185
- function et({ href: e, className: a, morphId: n, children: r = "Back", ...s }) {
1186
- const l = T(Je), c = L(), o = n != null && !c, i = qe(o ? n : void 0);
1231
+ var fe = "text-pho-description -mx-1 inline-flex shrink-0 text-base select-none", re = "/", La = 4, Ba = "…";
1232
+ function at({ href: e, className: a, morphId: n, children: r = "Back", ...s }) {
1233
+ const l = k(et), o = L(), c = n != null && !o, i = Ke(c ? n : void 0);
1187
1234
  if (l == null) throw new Error("BasicPage.Crumb must be rendered inside BasicPage.Breadcrumbs");
1188
- const { index: d, count: f, departing: u, narrow: m } = l, h = d === 0, b = d === f - 1, g = u != null && u.labels.length < f, E = u != null && u.labels.length > f, y = b && (u == null || g || m), k = h || b, x = h && b ? "" : h ? "max-sm:hidden" : "sm:hidden", C = u != null, P = b ? m ? E ? "slide" : "fade" : y ? "fade" : void 0 : void 0, [B, I] = w(o && m && i.fly && u != null && !E ? u.labels[u.labels.length - 1] : null), D = o && k && !C, q = o && !h && b && (u == null || g);
1189
- return /* @__PURE__ */ v(he, { children: [!h && /* @__PURE__ */ t("span", {
1235
+ const { index: d, count: m, departing: u, narrow: f } = l, h = d === 0, b = d === m - 1, g = u != null && u.labels.length < m, E = u != null && u.labels.length > m, v = b && (u == null || g || f), C = h || b, x = h && b ? "" : h ? "max-sm:hidden" : "sm:hidden", R = u != null, I = b ? f ? E ? "slide" : "fade" : v ? "fade" : void 0 : void 0, [T, M] = N(c && f && i.fly && u != null && !E ? u.labels[u.labels.length - 1] : null), F = c && C && !R, D = c && !h && b && (u == null || g);
1236
+ return /* @__PURE__ */ y(ye, { children: [!h && /* @__PURE__ */ t("span", {
1190
1237
  "aria-hidden": !0,
1191
- className: p(de, "max-sm:hidden"),
1192
- children: q ? /* @__PURE__ */ t(N.span, {
1238
+ className: p(fe, "max-sm:hidden"),
1239
+ children: D ? /* @__PURE__ */ t(A.span, {
1193
1240
  initial: i.fly ? {
1194
1241
  opacity: 0,
1195
- x: Se
1242
+ x: Pe
1196
1243
  } : { opacity: 0 },
1197
1244
  animate: i.fly ? {
1198
1245
  opacity: 1,
1199
1246
  x: 0
1200
1247
  } : { opacity: 1 },
1201
- transition: i.fly ? Te : M,
1248
+ transition: i.fly ? Ie : B,
1202
1249
  className: "inline-flex",
1203
1250
  children: re
1204
1251
  }) : re
1205
- }), /* @__PURE__ */ t(pe, {
1252
+ }), /* @__PURE__ */ t(me, {
1206
1253
  variant: "ghost",
1207
1254
  size: "sm",
1208
1255
  href: e,
1209
- prefix: k ? D ? /* @__PURE__ */ t(N.span, {
1256
+ prefix: C ? F ? /* @__PURE__ */ t(A.span, {
1210
1257
  initial: i.fly ? {
1211
1258
  opacity: 0,
1212
- x: Se
1259
+ x: Pe
1213
1260
  } : { opacity: 0 },
1214
1261
  animate: i.fly ? {
1215
1262
  opacity: 1,
1216
1263
  x: 0
1217
1264
  } : { opacity: 1 },
1218
- transition: i.fly ? Te : M,
1265
+ transition: i.fly ? Ie : B,
1219
1266
  className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
1220
- children: /* @__PURE__ */ t(ae, {})
1267
+ children: /* @__PURE__ */ t(te, {})
1221
1268
  }) : /* @__PURE__ */ t("span", {
1222
1269
  className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
1223
- children: /* @__PURE__ */ t(ae, {})
1270
+ children: /* @__PURE__ */ t(te, {})
1224
1271
  }) : /* @__PURE__ */ t("span", { className: "hidden" }),
1225
1272
  className: p("min-w-max", a),
1226
1273
  ...s,
1227
- children: o && n != null ? /* @__PURE__ */ v("span", {
1228
- className: p("relative block", !i.fly && P === "slide" && "overflow-hidden", !b && "max-w-40 truncate"),
1229
- children: [/* @__PURE__ */ t(We, {
1274
+ children: c && n != null ? /* @__PURE__ */ y("span", {
1275
+ className: p("relative block", !i.fly && I === "slide" && "overflow-hidden", !b && "max-w-40 truncate"),
1276
+ children: [/* @__PURE__ */ t(Xe, {
1230
1277
  morphId: n,
1231
1278
  fromClassName: "text-pho-primary",
1232
1279
  fly: i.fly,
1233
1280
  morphRef: i.ref,
1234
- arrival: P,
1281
+ arrival: I,
1235
1282
  children: r
1236
- }), B != null && /* @__PURE__ */ t(N.span, {
1283
+ }), T != null && /* @__PURE__ */ t(A.span, {
1237
1284
  "aria-hidden": !0,
1238
1285
  initial: {
1239
1286
  x: 0,
1240
1287
  opacity: 1
1241
1288
  },
1242
1289
  animate: {
1243
- x: Dt,
1290
+ x: Ft,
1244
1291
  opacity: 0
1245
1292
  },
1246
- transition: Ht,
1247
- onAnimationComplete: () => I(null),
1293
+ transition: Gt,
1294
+ onAnimationComplete: () => M(null),
1248
1295
  className: "pointer-events-none absolute inset-y-0 left-0 whitespace-nowrap",
1249
- children: B
1296
+ children: T
1250
1297
  })]
1251
1298
  }) : /* @__PURE__ */ t("span", {
1252
1299
  className: p("block", !b && "max-w-40 truncate"),
@@ -1254,22 +1301,22 @@ function et({ href: e, className: a, morphId: n, children: r = "Back", ...s }) {
1254
1301
  })
1255
1302
  })] });
1256
1303
  }
1257
- function Ia({ className: e, ...a }) {
1258
- return /* @__PURE__ */ t(Ze, {
1304
+ function Ma({ className: e, ...a }) {
1305
+ return /* @__PURE__ */ t(tt, {
1259
1306
  className: e,
1260
- children: /* @__PURE__ */ t(et, { ...a })
1307
+ children: /* @__PURE__ */ t(at, { ...a })
1261
1308
  });
1262
1309
  }
1263
- function Oa({ label: e, description: a, leading: n, href: r, className: s, children: l, ...c }) {
1264
- const o = Me(), i = $(() => N.create(o), [o]), { leaving: d, ...f } = Ne();
1265
- return /* @__PURE__ */ v(i, {
1310
+ function Da({ label: e, description: a, leading: n, href: r, className: s, children: l, ...o }) {
1311
+ const c = He(), i = q(() => A.create(c), [c]), { leaving: d, ...m } = _e();
1312
+ return /* @__PURE__ */ y(i, {
1266
1313
  href: r,
1267
- ...f,
1268
- ...c,
1314
+ ...m,
1315
+ ...o,
1269
1316
  className: p("flex min-h-[4.25rem] min-w-0 flex-row items-center justify-between gap-6 px-5 py-4", "group outline-pho-brand hover:bg-pho-primary-hover cursor-pointer transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2", "aria-[current=page]:bg-pho-primary-hover", "first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]", d && "overflow-hidden", s),
1270
- children: [/* @__PURE__ */ v("div", {
1317
+ children: [/* @__PURE__ */ y("div", {
1271
1318
  className: p("flex min-w-0 flex-1 items-center", n != null && "gap-3"),
1272
- children: [n, /* @__PURE__ */ v("div", {
1319
+ children: [n, /* @__PURE__ */ y("div", {
1273
1320
  className: "min-w-0",
1274
1321
  children: [/* @__PURE__ */ t("div", {
1275
1322
  className: "flex min-w-0 items-center gap-1",
@@ -1282,99 +1329,99 @@ function Oa({ label: e, description: a, leading: n, href: r, className: s, child
1282
1329
  children: a
1283
1330
  }) : null]
1284
1331
  })]
1285
- }), /* @__PURE__ */ v("div", {
1332
+ }), /* @__PURE__ */ y("div", {
1286
1333
  className: "flex min-w-0 items-center justify-end gap-2",
1287
1334
  children: [l != null ? /* @__PURE__ */ t("div", {
1288
1335
  className: "min-w-0",
1289
1336
  children: l
1290
- }) : null, /* @__PURE__ */ t(ct, {
1337
+ }) : null, /* @__PURE__ */ t(dt, {
1291
1338
  "aria-hidden": !0,
1292
1339
  className: "text-pho-secondary group-hover:text-pho-secondary-hover size-4 shrink-0 transition-colors"
1293
1340
  })]
1294
1341
  })]
1295
1342
  });
1296
1343
  }
1297
- function La({ open: e, variant: a = "overlay", modal: n = !1, placeholder: r, onClose: s, children: l }) {
1298
- const c = T(ze), o = e ?? Y.toArray(l).length > 0, i = c?.setOpen, d = c?.setPresent;
1344
+ function Ha({ open: e, variant: a = "overlay", modal: n = !1, placeholder: r, onClose: s, children: l }) {
1345
+ const o = k($e), c = e ?? J.toArray(l).length > 0, i = o?.setOpen, d = o?.setPresent;
1299
1346
  return V(() => {
1300
1347
  if (d != null)
1301
1348
  return d(!0), () => d(!1);
1302
1349
  }, [d]), V(() => {
1303
1350
  if (i != null)
1304
- return i(o), () => i(!1);
1305
- }, [i, o]), O(() => {
1306
- c == null && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("BasicPage.Aside: needs a `BasicPage.Root` around it.");
1307
- }, [c]), c == null || c.slot == null ? null : c.presentation === "page" ? Ee(o ? /* @__PURE__ */ t("div", {
1351
+ return i(c), () => i(!1);
1352
+ }, [i, c]), O(() => {
1353
+ o == null && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("BasicPage.Aside: needs a `BasicPage.Root` around it.");
1354
+ }, [o]), o == null || o.slot == null ? null : o.presentation === "page" ? ke(c ? /* @__PURE__ */ t("div", {
1308
1355
  "data-basic-page-aside": "page",
1309
1356
  className: "flex min-w-0 flex-1 flex-col",
1310
1357
  children: l
1311
- }) : null, c.slot) : a === "inline" ? Ee(/* @__PURE__ */ t(Ba, {
1312
- width: c.width,
1313
- paneHeight: c.paneHeight,
1358
+ }) : null, o.slot) : a === "inline" ? ke(/* @__PURE__ */ t(Fa, {
1359
+ width: o.width,
1360
+ paneHeight: o.paneHeight,
1314
1361
  onClose: s,
1315
- open: o,
1362
+ open: c,
1316
1363
  placeholder: r,
1317
1364
  children: l
1318
- }), c.slot) : /* @__PURE__ */ t(Ma, {
1319
- container: c.slot,
1320
- width: c.width,
1321
- paneHeight: c.paneHeight,
1365
+ }), o.slot) : /* @__PURE__ */ t(Ga, {
1366
+ container: o.slot,
1367
+ width: o.width,
1368
+ paneHeight: o.paneHeight,
1322
1369
  onClose: s,
1323
- open: o,
1370
+ open: c,
1324
1371
  modal: n,
1325
1372
  children: l
1326
1373
  });
1327
1374
  }
1328
- function tt() {
1329
- const [e, a] = w(null), n = $(() => ({ setBack: a }), []), r = _(null);
1375
+ function nt() {
1376
+ const [e, a] = N(null), n = q(() => ({ setBack: a }), []), r = _(null);
1330
1377
  return {
1331
1378
  back: e,
1332
1379
  panel: n,
1333
1380
  closeRef: r,
1334
- leave: Fe(() => {
1381
+ leave: Ge(() => {
1335
1382
  const s = r.current?.querySelector("a, button");
1336
1383
  return s == null ? !1 : (s.click(), !0);
1337
1384
  }, [])
1338
1385
  };
1339
1386
  }
1340
- var Le = {
1387
+ var Me = {
1341
1388
  variant: "ghost",
1342
1389
  size: "sm",
1343
1390
  svgOnly: !0,
1344
1391
  "aria-label": "Close",
1345
- children: /* @__PURE__ */ t(mt, {})
1392
+ children: /* @__PURE__ */ t(gt, {})
1346
1393
  };
1347
- function at({ back: e, onClose: a, closeRef: n, panel: r, children: s }) {
1348
- return /* @__PURE__ */ v(he, { children: [/* @__PURE__ */ t("span", {
1394
+ function rt({ back: e, onClose: a, closeRef: n, panel: r, children: s }) {
1395
+ return /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ t("span", {
1349
1396
  ref: n,
1350
1397
  className: "absolute top-2 right-2 z-30",
1351
- children: e != null ? /* @__PURE__ */ t(pe, {
1352
- ...Le,
1398
+ children: e != null ? /* @__PURE__ */ t(me, {
1399
+ ...Me,
1353
1400
  href: e.href,
1354
1401
  onClick: e.onClick
1355
1402
  }) : a != null ? /* @__PURE__ */ t(ie, {
1356
- ...Le,
1403
+ ...Me,
1357
1404
  onClick: a
1358
1405
  }) : null
1359
- }), /* @__PURE__ */ v(Q.Root, {
1406
+ }), /* @__PURE__ */ y(U.Root, {
1360
1407
  className: "min-h-0 flex-1",
1361
- children: [/* @__PURE__ */ t(Q.Viewport, { children: /* @__PURE__ */ t(Q.Content, {
1408
+ children: [/* @__PURE__ */ t(U.Viewport, { children: /* @__PURE__ */ t(U.Content, {
1362
1409
  className: "flex min-h-full flex-col",
1363
- children: /* @__PURE__ */ t(Ve.Provider, {
1410
+ children: /* @__PURE__ */ t(qe.Provider, {
1364
1411
  value: r,
1365
1412
  children: s
1366
1413
  })
1367
- }) }), /* @__PURE__ */ t(Q.Scrollbar, { children: /* @__PURE__ */ t(Q.Thumb, {}) })]
1414
+ }) }), /* @__PURE__ */ t(U.Scrollbar, { children: /* @__PURE__ */ t(U.Thumb, {}) })]
1368
1415
  })] });
1369
1416
  }
1370
- function Ba({ width: e, paneHeight: a, onClose: n, open: r, placeholder: s, children: l }) {
1371
- const c = L(), { back: o, panel: i, closeRef: d, leave: f } = tt(), u = c ? "blur(0px)" : `blur(${De}px)`, m = a ?? "100dvh";
1417
+ function Fa({ width: e, paneHeight: a, onClose: n, open: r, placeholder: s, children: l }) {
1418
+ const o = L(), { back: c, panel: i, closeRef: d, leave: m } = nt(), u = o ? "blur(0px)" : `blur(${ge}px)`, f = a ?? "100dvh";
1372
1419
  O(() => {
1373
1420
  const b = (g) => {
1374
- g.key !== "Escape" || g.defaultPrevented || f() && g.preventDefault();
1421
+ g.key !== "Escape" || g.defaultPrevented || m() && g.preventDefault();
1375
1422
  };
1376
1423
  return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
1377
- }, [f]);
1424
+ }, [m]);
1378
1425
  const h = {
1379
1426
  initial: {
1380
1427
  opacity: 0,
@@ -1388,7 +1435,7 @@ function Ba({ width: e, paneHeight: a, onClose: n, open: r, placeholder: s, chil
1388
1435
  opacity: 0,
1389
1436
  filter: u
1390
1437
  },
1391
- transition: c ? { duration: 0 } : xe
1438
+ transition: o ? { duration: 0 } : ne
1392
1439
  };
1393
1440
  return /* @__PURE__ */ t("aside", {
1394
1441
  "data-basic-page-aside": "panel",
@@ -1396,24 +1443,24 @@ function Ba({ width: e, paneHeight: a, onClose: n, open: r, placeholder: s, chil
1396
1443
  className: "relative flex shrink-0 flex-col",
1397
1444
  style: {
1398
1445
  width: e,
1399
- minHeight: m
1446
+ minHeight: f
1400
1447
  },
1401
1448
  children: /* @__PURE__ */ t("div", {
1402
1449
  className: "border-pho-secondary bg-pho-primary sticky top-0 grid border-l *:min-h-0 *:[grid-area:1/1]",
1403
- style: { height: m },
1404
- children: /* @__PURE__ */ t(G, {
1450
+ style: { height: f },
1451
+ children: /* @__PURE__ */ t(z, {
1405
1452
  initial: !1,
1406
- children: r ? /* @__PURE__ */ t(N.div, {
1453
+ children: r ? /* @__PURE__ */ t(A.div, {
1407
1454
  ...h,
1408
1455
  className: "relative flex flex-col",
1409
- children: /* @__PURE__ */ t(at, {
1410
- back: o,
1456
+ children: /* @__PURE__ */ t(rt, {
1457
+ back: c,
1411
1458
  onClose: n,
1412
1459
  closeRef: d,
1413
1460
  panel: i,
1414
1461
  children: l
1415
1462
  })
1416
- }, "page") : /* @__PURE__ */ t(N.div, {
1463
+ }, "page") : /* @__PURE__ */ t(A.div, {
1417
1464
  ...h,
1418
1465
  className: "flex flex-col",
1419
1466
  children: s
@@ -1422,23 +1469,23 @@ function Ba({ width: e, paneHeight: a, onClose: n, open: r, placeholder: s, chil
1422
1469
  })
1423
1470
  });
1424
1471
  }
1425
- function Ma({ container: e, width: a, paneHeight: n, onClose: r, open: s, modal: l, children: c }) {
1426
- const { back: o, panel: i, closeRef: d, leave: f } = tt(), u = n ?? "100dvh";
1427
- return /* @__PURE__ */ t(te.Root, {
1472
+ function Ga({ container: e, width: a, paneHeight: n, onClose: r, open: s, modal: l, children: o }) {
1473
+ const { back: c, panel: i, closeRef: d, leave: m } = nt(), u = n ?? "100dvh";
1474
+ return /* @__PURE__ */ t(ee.Root, {
1428
1475
  open: s,
1429
1476
  modal: l ? "trap-focus" : !1,
1430
1477
  disablePointerDismissal: !0,
1431
- onOpenChange: (m, h) => {
1432
- m || (h.cancel(), f());
1478
+ onOpenChange: (f, h) => {
1479
+ f || (h.cancel(), m());
1433
1480
  },
1434
- children: /* @__PURE__ */ v(te.Portal, {
1481
+ children: /* @__PURE__ */ y(ee.Portal, {
1435
1482
  container: e,
1436
1483
  className: "contents",
1437
- children: [l ? /* @__PURE__ */ t(te.Backdrop, {
1484
+ children: [l ? /* @__PURE__ */ t(ee.Backdrop, {
1438
1485
  "data-basic-page-aside-backdrop": "",
1439
1486
  className: p("bg-pho-overlay absolute inset-0 z-30 transition-opacity duration-200 ease-out motion-reduce:transition-none", "data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"),
1440
- onClick: f
1441
- }) : null, /* @__PURE__ */ t(te.Popup, {
1487
+ onClick: m
1488
+ }) : null, /* @__PURE__ */ t(ee.Popup, {
1442
1489
  "data-basic-page-aside": "panel",
1443
1490
  "data-basic-page-aside-variant": "overlay",
1444
1491
  initialFocus: l ? void 0 : !1,
@@ -1448,26 +1495,26 @@ function Ma({ container: e, width: a, paneHeight: n, onClose: r, open: s, modal:
1448
1495
  children: /* @__PURE__ */ t("div", {
1449
1496
  className: "border-pho-secondary bg-pho-primary shadow-pho-xl sticky top-0 flex flex-col border-l",
1450
1497
  style: { height: u },
1451
- children: /* @__PURE__ */ t(at, {
1452
- back: o,
1498
+ children: /* @__PURE__ */ t(rt, {
1499
+ back: c,
1453
1500
  onClose: r,
1454
1501
  closeRef: d,
1455
1502
  panel: i,
1456
- children: c
1503
+ children: o
1457
1504
  })
1458
1505
  })
1459
1506
  })]
1460
1507
  })
1461
1508
  });
1462
1509
  }
1463
- var Da = "14rem", Ha = "transition-[width] duration-[330ms] ease-pho-spring motion-reduce:transition-none", Be = "transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none";
1464
- function Fa({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r, placeholder: s, label: l, className: c, ...o }) {
1465
- const i = T(fe), d = me(i?.subscribe ?? ve, () => i?.get().api ?? null, () => null), f = n != null;
1510
+ var za = "14rem", Va = "transition-[width] duration-[330ms] ease-pho-spring motion-reduce:transition-none", De = "transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none";
1511
+ function $a({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r, placeholder: s, label: l, className: o, ...c }) {
1512
+ const i = k(he), d = be(i?.subscribe ?? Ne, () => i?.get().api ?? null, () => null), m = n != null;
1466
1513
  O(() => {
1467
- if (!(i == null || f))
1514
+ if (!(i == null || m))
1468
1515
  return i.adopt(!0), () => i.adopt(!1);
1469
- }, [i, f]);
1470
- const u = f ? {
1516
+ }, [i, m]);
1517
+ const u = m ? {
1471
1518
  query: n,
1472
1519
  setQuery: r,
1473
1520
  placeholder: s ?? "Search",
@@ -1477,27 +1524,27 @@ function Fa({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r,
1477
1524
  setQuery: d.setQuery,
1478
1525
  placeholder: d.placeholder,
1479
1526
  label: l ?? d.placeholder
1480
- }, [m, h] = w(!1), b = _(null), g = m || (u?.query ?? "") !== "";
1527
+ }, [f, h] = N(!1), b = _(null), g = f || (u?.query ?? "") !== "";
1481
1528
  if (O(() => {
1482
- if (!m) return;
1483
- let y = 0, k = 0;
1529
+ if (!f) return;
1530
+ let v = 0, C = 0;
1484
1531
  const x = () => {
1485
- const C = b.current;
1486
- C != null && (C.focus(), document.activeElement !== C && k++ < 5 && (y = requestAnimationFrame(x)));
1532
+ const R = b.current;
1533
+ R != null && (R.focus(), document.activeElement !== R && C++ < 5 && (v = requestAnimationFrame(x)));
1487
1534
  };
1488
- return y = requestAnimationFrame(x), () => cancelAnimationFrame(y);
1489
- }, [m]), e === "ghost") return /* @__PURE__ */ t("div", {
1535
+ return v = requestAnimationFrame(x), () => cancelAnimationFrame(v);
1536
+ }, [f]), e === "ghost") return /* @__PURE__ */ t("div", {
1490
1537
  "data-basic-page-search": "",
1491
1538
  "data-variant": "ghost",
1492
- className: p("flex min-w-0 flex-1", u == null && "hidden", c),
1493
- ...o,
1494
- children: u != null && /* @__PURE__ */ t(pt, {
1539
+ className: p("flex min-w-0 flex-1", u == null && "hidden", o),
1540
+ ...c,
1541
+ children: u != null && /* @__PURE__ */ t(mt, {
1495
1542
  value: u.query,
1496
1543
  onChange: u.setQuery,
1497
1544
  placeholder: u.placeholder,
1498
1545
  "aria-label": u.label,
1499
- onKeyDown: (y) => {
1500
- y.key === "Escape" && (y.preventDefault(), u.setQuery(""), y.currentTarget.blur());
1546
+ onKeyDown: (v) => {
1547
+ v.key === "Escape" && (v.preventDefault(), u.setQuery(""), v.currentTarget.blur());
1501
1548
  }
1502
1549
  })
1503
1550
  });
@@ -1505,11 +1552,11 @@ function Fa({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r,
1505
1552
  return /* @__PURE__ */ t("div", {
1506
1553
  "data-basic-page-search": "",
1507
1554
  "data-expanded": g || void 0,
1508
- className: p("grid min-w-0 content-center", "[[data-basic-page-header]>&]:col-start-2 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:justify-items-end [[data-basic-page-header]>&]:self-start", u == null && "hidden", c),
1509
- ...o,
1510
- children: u != null && /* @__PURE__ */ v("div", {
1511
- className: p("grid w-9 max-w-full justify-items-end *:[grid-area:1/1]", Ha, E && "@[36rem]:w-56"),
1512
- style: g ? { width: Da } : void 0,
1555
+ className: p("grid min-w-0 content-center", "[[data-basic-page-header]>&]:col-start-2 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:justify-items-end [[data-basic-page-header]>&]:self-start", u == null && "hidden", o),
1556
+ ...c,
1557
+ children: u != null && /* @__PURE__ */ y("div", {
1558
+ className: p("grid w-9 max-w-full justify-items-end *:[grid-area:1/1]", Va, E && "@[36rem]:w-56"),
1559
+ style: g ? { width: za } : void 0,
1513
1560
  children: [/* @__PURE__ */ t(ie, {
1514
1561
  variant: "outlined",
1515
1562
  size: "sm",
@@ -1519,24 +1566,24 @@ function Fa({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r,
1519
1566
  "aria-hidden": g || void 0,
1520
1567
  tabIndex: g ? -1 : void 0,
1521
1568
  onClick: () => h(!0),
1522
- className: p(Be, g ? "pointer-events-none invisible opacity-0" : "visible opacity-100", E && "@[36rem]:pointer-events-none @[36rem]:invisible @[36rem]:opacity-0"),
1523
- children: /* @__PURE__ */ t(_e, {})
1569
+ className: p(De, g ? "pointer-events-none invisible opacity-0" : "visible opacity-100", E && "@[36rem]:pointer-events-none @[36rem]:invisible @[36rem]:opacity-0"),
1570
+ children: /* @__PURE__ */ t(Se, {})
1524
1571
  }), /* @__PURE__ */ t("div", {
1525
1572
  inert: !E && !g,
1526
- className: p("w-full min-w-0", Be, g ? "visible opacity-100" : "pointer-events-none invisible opacity-0", E && "@[36rem]:pointer-events-auto @[36rem]:visible @[36rem]:opacity-100"),
1527
- children: /* @__PURE__ */ v(le.Root, {
1573
+ className: p("w-full min-w-0", De, g ? "visible opacity-100" : "pointer-events-none invisible opacity-0", E && "@[36rem]:pointer-events-auto @[36rem]:visible @[36rem]:opacity-100"),
1574
+ children: /* @__PURE__ */ y(oe.Root, {
1528
1575
  size: "sm",
1529
1576
  className: "w-full",
1530
- children: [/* @__PURE__ */ t(le.Addon, { children: /* @__PURE__ */ t(_e, {}) }), /* @__PURE__ */ t(le.Input, {
1577
+ children: [/* @__PURE__ */ t(oe.Addon, { children: /* @__PURE__ */ t(Se, {}) }), /* @__PURE__ */ t(oe.Input, {
1531
1578
  ref: b,
1532
1579
  type: "search",
1533
1580
  value: u.query,
1534
- onChange: (y) => u.setQuery(y.target.value),
1581
+ onChange: (v) => u.setQuery(v.target.value),
1535
1582
  onBlur: () => {
1536
1583
  u.query === "" && h(!1);
1537
1584
  },
1538
- onKeyDown: (y) => {
1539
- y.key === "Escape" && (y.preventDefault(), u.setQuery(""), h(!1), y.currentTarget.blur());
1585
+ onKeyDown: (v) => {
1586
+ v.key === "Escape" && (v.preventDefault(), u.setQuery(""), h(!1), v.currentTarget.blur());
1540
1587
  },
1541
1588
  placeholder: u.placeholder,
1542
1589
  "aria-label": u.label
@@ -1546,58 +1593,58 @@ function Fa({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r,
1546
1593
  })
1547
1594
  });
1548
1595
  }
1549
- var mn = {
1550
- Root: Rt,
1551
- Aside: La,
1552
- Search: Fa,
1553
- Table: dt,
1554
- CondenseScope: zt,
1555
- Breadcrumbs: Ze,
1556
- Crumb: et,
1557
- Back: Ia,
1558
- Title: Wt,
1559
- Stack: Ut,
1560
- Header: Jt,
1561
- HeaderAction: Zt,
1562
- SectionTitle: ea,
1563
- Description: Qe,
1564
- TableCount: ta,
1565
- SectionFooter: aa,
1566
- Card: na,
1567
- Item: ra,
1568
- ItemPanel: ia,
1569
- Callout: sa,
1570
- CalloutTitle: la,
1571
- CalloutDescription: oa,
1572
- Onboard: ca,
1573
- Step: ha,
1574
- Row: ga,
1575
- RowLink: Oa,
1576
- Value: ba,
1577
- Alert: ya,
1578
- Footer: Ea,
1579
- Form: va,
1580
- Saved: xa,
1581
- Fields: Na,
1582
- Inline: Aa,
1583
- Submit: _a,
1584
- Reveal: Ae
1596
+ var yn = {
1597
+ Root: It,
1598
+ Aside: Ha,
1599
+ Search: $a,
1600
+ Table: ft,
1601
+ CondenseScope: $t,
1602
+ Breadcrumbs: tt,
1603
+ Crumb: at,
1604
+ Back: Ma,
1605
+ Title: Qt,
1606
+ Stack: ta,
1607
+ Header: aa,
1608
+ HeaderAction: na,
1609
+ SectionTitle: ra,
1610
+ Description: Ue,
1611
+ TableCount: ia,
1612
+ SectionFooter: sa,
1613
+ Card: la,
1614
+ Item: oa,
1615
+ ItemPanel: ca,
1616
+ Callout: ua,
1617
+ CalloutTitle: da,
1618
+ CalloutDescription: pa,
1619
+ Onboard: fa,
1620
+ Step: va,
1621
+ Row: xa,
1622
+ RowLink: Da,
1623
+ Value: wa,
1624
+ Alert: Na,
1625
+ Footer: Ta,
1626
+ Form: Aa,
1627
+ Saved: _a,
1628
+ Fields: Ca,
1629
+ Inline: Sa,
1630
+ Submit: ka,
1631
+ Reveal: Ce
1585
1632
  };
1586
1633
  export {
1587
- _t as a,
1588
- mn as c,
1589
- Vt as d,
1590
- ce as f,
1591
- At as i,
1592
- xe as l,
1593
- dn as m,
1594
- Ce as n,
1595
- Et as o,
1596
- pn as p,
1597
- Ge as r,
1598
- Nt as s,
1599
- fn as t,
1600
- Pe as u
1634
+ Ct as a,
1635
+ yn as c,
1636
+ qt as d,
1637
+ de as f,
1638
+ Et as i,
1639
+ ne as l,
1640
+ hn as m,
1641
+ Te as n,
1642
+ St as o,
1643
+ gn as p,
1644
+ ze as r,
1645
+ _t as s,
1646
+ bn as t,
1647
+ jt as u
1601
1648
  };
1602
1649
 
1603
- //# sourceMappingURL=basic-page-CdmVeL_Z.js.map
1650
+ //# sourceMappingURL=basic-page-CMJuM5iA.js.map