@inertiaui/modal-react 0.5.2 → 0.5.4

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.
@@ -2,7 +2,7 @@ var Ro = Object.defineProperty;
2
2
  var Fo = (t, e, r) => e in t ? Ro(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var ye = (t, e, r) => Fo(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import * as mt from "react";
5
- import A, { createContext as ce, useState as Q, useEffect as K, useContext as ie, createElement as Pr, useMemo as J, forwardRef as Hr, useImperativeHandle as ra, useLayoutEffect as Co, useRef as j, useCallback as ve, Fragment as he, isValidElement as Io, cloneElement as Mo, useId as xt, useSyncExternalStore as _o, useReducer as Do, createRef as No } from "react";
5
+ import A, { createContext as ce, useState as Q, useEffect as K, useContext as ie, createElement as Or, useMemo as J, forwardRef as Br, useImperativeHandle as na, useLayoutEffect as Co, useRef as j, useCallback as ve, Fragment as he, isValidElement as Io, cloneElement as Mo, useId as xt, useSyncExternalStore as _o, useReducer as Do, createRef as No } from "react";
6
6
  import jt from "axios";
7
7
  import { router as yt } from "@inertiajs/react";
8
8
  import { createPortal as ko } from "react-dom";
@@ -61,8 +61,8 @@ class jo {
61
61
  return n;
62
62
  }
63
63
  }
64
- const Yt = new jo(), xc = () => Yt.reset(), Oc = (t, e) => Yt.put(t, e), na = (t) => Yt.get(t), ze = (t, e) => Yt.get(t ? `slideover.${e}` : `modal.${e}`);
65
- var Ar = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
64
+ const Yt = new jo(), xc = () => Yt.reset(), Oc = (t, e) => Yt.put(t, e), Hr = (t) => Yt.get(t), ze = (t, e) => Yt.get(t ? `slideover.${e}` : `modal.${e}`);
65
+ var Pr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
66
66
  function Lo(t) {
67
67
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
68
68
  }
@@ -85,7 +85,7 @@ function Wo(t) {
85
85
  });
86
86
  }), r;
87
87
  }
88
- var Tr = { exports: {} }, ct = {};
88
+ var Ar = { exports: {} }, ct = {};
89
89
  /**
90
90
  * @license React
91
91
  * react-jsx-runtime.production.min.js
@@ -713,8 +713,8 @@ React keys must be passed directly to JSX without using spread:
713
713
  ft.Fragment = n, ft.jsx = Po, ft.jsxs = Ao;
714
714
  }()), ft;
715
715
  }
716
- process.env.NODE_ENV === "production" ? Tr.exports = Uo() : Tr.exports = Bo();
717
- var R = Tr.exports;
716
+ process.env.NODE_ENV === "production" ? Ar.exports = Uo() : Ar.exports = Bo();
717
+ var R = Ar.exports;
718
718
  function Ho(t, e) {
719
719
  return Array.isArray(t) ? t.filter((r) => !e.includes(r)) : Object.keys(t).reduce((r, n) => (e.includes(n) || (r[n] = t[n]), r), {});
720
720
  }
@@ -1147,14 +1147,14 @@ var sa = Nt, $n = qr(), Yi = ia, Xe = Ot, Rn = sa, zi = function(e, r, n) {
1147
1147
  e[r] = n;
1148
1148
  else
1149
1149
  throw new Yi("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
1150
- }, $r = qr(), ca = function() {
1151
- return !!$r;
1150
+ }, Tr = qr(), ca = function() {
1151
+ return !!Tr;
1152
1152
  };
1153
1153
  ca.hasArrayLengthDefineBug = function() {
1154
- if (!$r)
1154
+ if (!Tr)
1155
1155
  return null;
1156
1156
  try {
1157
- return $r([], "length", { value: 1 }).length !== 1;
1157
+ return Tr([], "length", { value: 1 }).length !== 1;
1158
1158
  } catch {
1159
1159
  return !0;
1160
1160
  }
@@ -1208,7 +1208,7 @@ const nl = {}, al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
1208
1208
  __proto__: null,
1209
1209
  default: nl
1210
1210
  }, Symbol.toStringTag, { value: "Module" })), ol = /* @__PURE__ */ Wo(al);
1211
- var Gr = typeof Map == "function" && Map.prototype, yr = Object.getOwnPropertyDescriptor && Gr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Ut = Gr && yr && typeof yr.get == "function" ? yr.get : null, Mn = Gr && Map.prototype.forEach, Yr = typeof Set == "function" && Set.prototype, vr = Object.getOwnPropertyDescriptor && Yr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Bt = Yr && vr && typeof vr.get == "function" ? vr.get : null, _n = Yr && Set.prototype.forEach, il = typeof WeakMap == "function" && WeakMap.prototype, ht = il ? WeakMap.prototype.has : null, ll = typeof WeakSet == "function" && WeakSet.prototype, gt = ll ? WeakSet.prototype.has : null, ul = typeof WeakRef == "function" && WeakRef.prototype, Dn = ul ? WeakRef.prototype.deref : null, sl = Boolean.prototype.valueOf, cl = Object.prototype.toString, fl = Function.prototype.toString, dl = String.prototype.match, zr = String.prototype.slice, Re = String.prototype.replace, pl = String.prototype.toUpperCase, Nn = String.prototype.toLowerCase, pa = RegExp.prototype.test, kn = Array.prototype.concat, Ee = Array.prototype.join, yl = Array.prototype.slice, jn = Math.floor, Rr = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, mr = Object.getOwnPropertySymbols, Fr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, tt = typeof Symbol == "function" && typeof Symbol.iterator == "object", re = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === tt || !0) ? Symbol.toStringTag : null, ya = Object.prototype.propertyIsEnumerable, Ln = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
1211
+ var Gr = typeof Map == "function" && Map.prototype, yr = Object.getOwnPropertyDescriptor && Gr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Ut = Gr && yr && typeof yr.get == "function" ? yr.get : null, Mn = Gr && Map.prototype.forEach, Yr = typeof Set == "function" && Set.prototype, vr = Object.getOwnPropertyDescriptor && Yr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Bt = Yr && vr && typeof vr.get == "function" ? vr.get : null, _n = Yr && Set.prototype.forEach, il = typeof WeakMap == "function" && WeakMap.prototype, ht = il ? WeakMap.prototype.has : null, ll = typeof WeakSet == "function" && WeakSet.prototype, gt = ll ? WeakSet.prototype.has : null, ul = typeof WeakRef == "function" && WeakRef.prototype, Dn = ul ? WeakRef.prototype.deref : null, sl = Boolean.prototype.valueOf, cl = Object.prototype.toString, fl = Function.prototype.toString, dl = String.prototype.match, zr = String.prototype.slice, Re = String.prototype.replace, pl = String.prototype.toUpperCase, Nn = String.prototype.toLowerCase, pa = RegExp.prototype.test, kn = Array.prototype.concat, Ee = Array.prototype.join, yl = Array.prototype.slice, jn = Math.floor, $r = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, mr = Object.getOwnPropertySymbols, Rr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, tt = typeof Symbol == "function" && typeof Symbol.iterator == "object", re = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === tt || !0) ? Symbol.toStringTag : null, ya = Object.prototype.propertyIsEnumerable, Ln = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
1212
1212
  return t.__proto__;
1213
1213
  } : null);
1214
1214
  function Wn(t, e) {
@@ -1224,7 +1224,7 @@ function Wn(t, e) {
1224
1224
  }
1225
1225
  return Re.call(e, r, "$&_");
1226
1226
  }
1227
- var Cr = ol, Un = Cr.custom, Bn = ma(Un) ? Un : null, vl = function t(e, r, n, a) {
1227
+ var Fr = ol, Un = Fr.custom, Bn = ma(Un) ? Un : null, vl = function t(e, r, n, a) {
1228
1228
  var o = r || {};
1229
1229
  if (Te(o, "quoteStyle") && o.quoteStyle !== "single" && o.quoteStyle !== "double")
1230
1230
  throw new TypeError('option "quoteStyle" must be "single" or "double"');
@@ -1258,7 +1258,7 @@ var Cr = ol, Un = Cr.custom, Bn = ma(Un) ? Un : null, vl = function t(e, r, n, a
1258
1258
  }
1259
1259
  var s = typeof o.depth > "u" ? 5 : o.depth;
1260
1260
  if (typeof n > "u" && (n = 0), n >= s && s > 0 && typeof e == "object")
1261
- return Ir(e) ? "[Array]" : "[Object]";
1261
+ return Cr(e) ? "[Array]" : "[Object]";
1262
1262
  var h = Ml(o, n);
1263
1263
  if (typeof a > "u")
1264
1264
  a = [];
@@ -1278,7 +1278,7 @@ var Cr = ol, Un = Cr.custom, Bn = ma(Un) ? Un : null, vl = function t(e, r, n, a
1278
1278
  return "[Function" + (w ? ": " + w : " (anonymous)") + "]" + (f.length > 0 ? " { " + Ee.call(f, ", ") + " }" : "");
1279
1279
  }
1280
1280
  if (ma(e)) {
1281
- var y = tt ? Re.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Fr.call(e);
1281
+ var y = tt ? Re.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Rr.call(e);
1282
1282
  return typeof e == "object" && !tt ? dt(y) : y;
1283
1283
  }
1284
1284
  if (Fl(e)) {
@@ -1286,19 +1286,19 @@ var Cr = ol, Un = Cr.custom, Bn = ma(Un) ? Un : null, vl = function t(e, r, n, a
1286
1286
  p += " " + m[g].name + "=" + va(ml(m[g].value), "double", o);
1287
1287
  return p += ">", e.childNodes && e.childNodes.length && (p += "..."), p += "</" + Nn.call(String(e.nodeName)) + ">", p;
1288
1288
  }
1289
- if (Ir(e)) {
1289
+ if (Cr(e)) {
1290
1290
  if (e.length === 0)
1291
1291
  return "[]";
1292
1292
  var b = It(e, v);
1293
- return h && !Il(b) ? "[" + Mr(b, h) + "]" : "[ " + Ee.call(b, ", ") + " ]";
1293
+ return h && !Il(b) ? "[" + Ir(b, h) + "]" : "[ " + Ee.call(b, ", ") + " ]";
1294
1294
  }
1295
1295
  if (gl(e)) {
1296
1296
  var S = It(e, v);
1297
1297
  return !("cause" in Error.prototype) && "cause" in e && !ya.call(e, "cause") ? "{ [" + String(e) + "] " + Ee.call(kn.call("[cause]: " + v(e.cause), S), ", ") + " }" : S.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + Ee.call(S, ", ") + " }";
1298
1298
  }
1299
1299
  if (typeof e == "object" && l) {
1300
- if (Bn && typeof e[Bn] == "function" && Cr)
1301
- return Cr(e, { depth: s - n });
1300
+ if (Bn && typeof e[Bn] == "function" && Fr)
1301
+ return Fr(e, { depth: s - n });
1302
1302
  if (l !== "symbol" && typeof e.inspect == "function")
1303
1303
  return e.inspect();
1304
1304
  }
@@ -1323,18 +1323,18 @@ var Cr = ol, Un = Cr.custom, Bn = ma(Un) ? Un : null, vl = function t(e, r, n, a
1323
1323
  if (wl(e))
1324
1324
  return dt(v(Number(e)));
1325
1325
  if (Sl(e))
1326
- return dt(v(Rr.call(e)));
1326
+ return dt(v($r.call(e)));
1327
1327
  if (El(e))
1328
1328
  return dt(sl.call(e));
1329
1329
  if (bl(e))
1330
1330
  return dt(v(String(e)));
1331
1331
  if (typeof window < "u" && e === window)
1332
1332
  return "{ [object Window] }";
1333
- if (typeof globalThis < "u" && e === globalThis || typeof Ar < "u" && e === Ar)
1333
+ if (typeof globalThis < "u" && e === globalThis || typeof Pr < "u" && e === Pr)
1334
1334
  return "{ [object globalThis] }";
1335
1335
  if (!hl(e) && !Hn(e)) {
1336
1336
  var M = It(e, v), W = Ln ? Ln(e) === Object.prototype : e instanceof Object || e.constructor === Object, H = e instanceof Object ? "" : "null prototype", k = !W && re && Object(e) === e && re in e ? zr.call(Ie(e), 8, -1) : H ? "Object" : "", Y = W || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", V = Y + (k || H ? "[" + Ee.call(kn.call([], k || [], H || []), ": ") + "] " : "");
1337
- return M.length === 0 ? V + "{}" : h ? V + "{" + Mr(M, h) + "}" : V + "{ " + Ee.call(M, ", ") + " }";
1337
+ return M.length === 0 ? V + "{}" : h ? V + "{" + Ir(M, h) + "}" : V + "{ " + Ee.call(M, ", ") + " }";
1338
1338
  }
1339
1339
  return String(e);
1340
1340
  };
@@ -1345,7 +1345,7 @@ function va(t, e, r) {
1345
1345
  function ml(t) {
1346
1346
  return Re.call(String(t), /"/g, "&quot;");
1347
1347
  }
1348
- function Ir(t) {
1348
+ function Cr(t) {
1349
1349
  return Ie(t) === "[object Array]" && (!re || !(typeof t == "object" && re in t));
1350
1350
  }
1351
1351
  function hl(t) {
@@ -1371,19 +1371,19 @@ function ma(t) {
1371
1371
  return t && typeof t == "object" && t instanceof Symbol;
1372
1372
  if (typeof t == "symbol")
1373
1373
  return !0;
1374
- if (!t || typeof t != "object" || !Fr)
1374
+ if (!t || typeof t != "object" || !Rr)
1375
1375
  return !1;
1376
1376
  try {
1377
- return Fr.call(t), !0;
1377
+ return Rr.call(t), !0;
1378
1378
  } catch {
1379
1379
  }
1380
1380
  return !1;
1381
1381
  }
1382
1382
  function Sl(t) {
1383
- if (!t || typeof t != "object" || !Rr)
1383
+ if (!t || typeof t != "object" || !$r)
1384
1384
  return !1;
1385
1385
  try {
1386
- return Rr.call(t), !0;
1386
+ return $r.call(t), !0;
1387
1387
  } catch {
1388
1388
  }
1389
1389
  return !1;
@@ -1508,7 +1508,7 @@ function hr(t) {
1508
1508
  return t + " { ? }";
1509
1509
  }
1510
1510
  function Vn(t, e, r, n) {
1511
- var a = n ? Mr(r, n) : Ee.call(r, ", ");
1511
+ var a = n ? Ir(r, n) : Ee.call(r, ", ");
1512
1512
  return t + " (" + e + ") {" + a + "}";
1513
1513
  }
1514
1514
  function Il(t) {
@@ -1531,7 +1531,7 @@ function Ml(t, e) {
1531
1531
  prev: Ee.call(Array(e + 1), r)
1532
1532
  };
1533
1533
  }
1534
- function Mr(t, e) {
1534
+ function Ir(t, e) {
1535
1535
  if (t.length === 0)
1536
1536
  return "";
1537
1537
  var r = `
@@ -1540,7 +1540,7 @@ function Mr(t, e) {
1540
1540
  ` + e.prev;
1541
1541
  }
1542
1542
  function It(t, e) {
1543
- var r = Ir(t), n = [];
1543
+ var r = Cr(t), n = [];
1544
1544
  if (r) {
1545
1545
  n.length = t.length;
1546
1546
  for (var a = 0; a < t.length; a++)
@@ -1925,7 +1925,7 @@ var ba = nt, at = rl, _l = vl, Dl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
1925
1925
  }
1926
1926
  var v = l.join(n.delimiter), w = n.addQueryPrefix === !0 ? "?" : "";
1927
1927
  return n.charsetSentinel && (n.charset === "iso-8859-1" ? w += "utf8=%26%2310003%3B&" : w += "utf8=%E2%9C%93&"), v.length > 0 ? w + v : "";
1928
- }, rt = Ea, _r = Object.prototype.hasOwnProperty, du = Array.isArray, B = {
1928
+ }, rt = Ea, Mr = Object.prototype.hasOwnProperty, du = Array.isArray, B = {
1929
1929
  allowDots: !1,
1930
1930
  allowEmptyArrays: !1,
1931
1931
  allowPrototypes: !1,
@@ -1968,7 +1968,7 @@ var ba = nt, at = rl, _l = vl, Dl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
1968
1968
  return r.decoder(p, B.decoder, d, "value");
1969
1969
  }
1970
1970
  )), f && r.interpretNumericEntities && d === "iso-8859-1" && (f = pu(f)), s.indexOf("[]=") > -1 && (f = du(f) ? [f] : f);
1971
- var y = _r.call(n, w);
1971
+ var y = Mr.call(n, w);
1972
1972
  y && r.duplicates === "combine" ? n[w] = rt.combine(n[w], f) : (!y || r.duplicates === "last") && (n[w] = f);
1973
1973
  }
1974
1974
  return n;
@@ -1989,12 +1989,12 @@ var ba = nt, at = rl, _l = vl, Dl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
1989
1989
  if (e) {
1990
1990
  var o = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, l = /(\[[^[\]]*])/, u = /(\[[^[\]]*])/g, i = n.depth > 0 && l.exec(o), d = i ? o.slice(0, i.index) : o, s = [];
1991
1991
  if (d) {
1992
- if (!n.plainObjects && _r.call(Object.prototype, d) && !n.allowPrototypes)
1992
+ if (!n.plainObjects && Mr.call(Object.prototype, d) && !n.allowPrototypes)
1993
1993
  return;
1994
1994
  s.push(d);
1995
1995
  }
1996
1996
  for (var h = 0; n.depth > 0 && (i = u.exec(o)) !== null && h < n.depth; ) {
1997
- if (h += 1, !n.plainObjects && _r.call(Object.prototype, i[1].slice(1, -1)) && !n.allowPrototypes)
1997
+ if (h += 1, !n.plainObjects && Mr.call(Object.prototype, i[1].slice(1, -1)) && !n.allowPrototypes)
1998
1998
  return;
1999
1999
  s.push(i[1]);
2000
2000
  }
@@ -2062,7 +2062,7 @@ var ba = nt, at = rl, _l = vl, Dl = Ot, Mt = ba("%WeakMap%", !0), _t = ba("%Map%
2062
2062
  (function(t, e) {
2063
2063
  (function(r, n) {
2064
2064
  t.exports = n();
2065
- })(Ar, function() {
2065
+ })(Pr, function() {
2066
2066
  var r = {};
2067
2067
  r.version = "0.2.0";
2068
2068
  var n = r.settings = {
@@ -2220,7 +2220,7 @@ function Pu(t, e, r, n = "brackets") {
2220
2220
  }
2221
2221
  const zt = ce(null);
2222
2222
  zt.displayName = "ModalStackContext";
2223
- let Aa = null, Ta = null, Dr = null, Nr = null, Sr = [];
2223
+ let Aa = null, Ta = null, _r = null, Dr = null, Yn = [];
2224
2224
  const Au = ({ children: t }) => {
2225
2225
  const [e, r] = Q([]), [n, a] = Q({}), o = (y) => {
2226
2226
  r((p) => {
@@ -2234,7 +2234,7 @@ const Au = ({ children: t }) => {
2234
2234
  });
2235
2235
  };
2236
2236
  K(() => {
2237
- Sr = e;
2237
+ Yn = e;
2238
2238
  }, [e]);
2239
2239
  class l {
2240
2240
  constructor(p, m, g, b, S) {
@@ -2252,7 +2252,7 @@ const Au = ({ children: t }) => {
2252
2252
  p ? this.show() : this.close();
2253
2253
  });
2254
2254
  ye(this, "close", () => {
2255
- console.log("Closing", this.id), o(
2255
+ o(
2256
2256
  (p) => p.map((m) => {
2257
2257
  var g;
2258
2258
  return m.id === this.id && m.isOpen && (Object.keys(m.listeners).forEach((b) => {
@@ -2262,7 +2262,7 @@ const Au = ({ children: t }) => {
2262
2262
  );
2263
2263
  });
2264
2264
  ye(this, "afterLeave", () => {
2265
- console.log("After leave", this.id), !this.isOpen && o((p) => {
2265
+ this.isOpen || o((p) => {
2266
2266
  const m = p.map((g) => {
2267
2267
  var b;
2268
2268
  return g.id === this.id && !g.isOpen && (g.shouldRender = !1, (b = g.afterLeaveCallback) == null || b.call(g), g.afterLeaveCallback = null), g;
@@ -2329,7 +2329,8 @@ const Au = ({ children: t }) => {
2329
2329
  p.config ?? {},
2330
2330
  p.onClose,
2331
2331
  p.onAfterLeave,
2332
- p.queryStringArrayFormat ?? "brackets"
2332
+ p.queryStringArrayFormat ?? "brackets",
2333
+ p.navigate ?? Hr("navigate")
2333
2334
  ), h = (y, p, m = {}, g = {}, b = {}, S = null, O = null, _ = "brackets", M = !1) => new Promise((W, H) => {
2334
2335
  if (y.startsWith("#")) {
2335
2336
  W(d(y.substring(1), b, S, O));
@@ -2337,7 +2338,7 @@ const Au = ({ children: t }) => {
2337
2338
  }
2338
2339
  const [k, Y] = Pu(p, y || "", m, _);
2339
2340
  let V = M && e.length === 0;
2340
- if (e.length === 0 && (Dr = typeof window < "u" ? window.location.href : ""), g = {
2341
+ if (e.length === 0 && (_r = typeof window < "u" ? window.location.href : ""), g = {
2341
2342
  ...g,
2342
2343
  Accept: "text/html, application/xhtml+xml",
2343
2344
  "X-Requested-With": "XMLHttpRequest",
@@ -2354,7 +2355,7 @@ const Au = ({ children: t }) => {
2354
2355
  preserveState: !0,
2355
2356
  onError: H,
2356
2357
  onFinish: () => {
2357
- qo(() => Nr).then(($) => {
2358
+ qo(() => Dr).then(($) => {
2358
2359
  const T = $.onCloseCallback, D = $.afterLeaveCallback;
2359
2360
  $.update(
2360
2361
  b,
@@ -2364,7 +2365,7 @@ const Au = ({ children: t }) => {
2364
2365
  () => {
2365
2366
  O == null || O(), D == null || D();
2366
2367
  }
2367
- ), W($), Nr = null;
2368
+ ), W($), Dr = null;
2368
2369
  });
2369
2370
  }
2370
2371
  });
@@ -2382,7 +2383,7 @@ const Au = ({ children: t }) => {
2382
2383
  push: i,
2383
2384
  pushFromResponseData: u,
2384
2385
  closeAll: () => {
2385
- console.log("Closing all modals", { stack: e, localStackCopy: Sr }), Sr.reverse().forEach((y) => y.close());
2386
+ Yn.reverse().forEach((y) => y.close());
2386
2387
  },
2387
2388
  reset: () => o(() => []),
2388
2389
  visit: h,
@@ -2406,12 +2407,12 @@ const Au = ({ children: t }) => {
2406
2407
  if (t === null)
2407
2408
  throw new Error("useModalStack must be used within a ModalStackProvider");
2408
2409
  return t;
2409
- }, Yn = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Pc = (t, e) => {
2410
+ }, zn = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Pc = (t, e) => {
2410
2411
  e.initialPage && (Aa = e.initialPage.version), e.resolveComponent && (Ta = e.resolveComponent);
2411
2412
  const r = ({ Component: n, props: a, key: o }) => {
2412
2413
  const l = () => {
2413
- const u = Pr(n, { key: o, ...a });
2414
- return typeof n.layout == "function" ? n.layout(u) : Array.isArray(n.layout) ? n.layout.concat(u).reverse().reduce((d, s) => Pr(s, a, d)) : u;
2414
+ const u = Or(n, { key: o, ...a });
2415
+ return typeof n.layout == "function" ? n.layout(u) : Array.isArray(n.layout) ? n.layout.concat(u).reverse().reduce((d, s) => Or(s, a, d)) : u;
2415
2416
  };
2416
2417
  return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
2417
2418
  l(),
@@ -2429,7 +2430,7 @@ const Au = ({ children: t }) => {
2429
2430
  n && e.closeAll();
2430
2431
  return;
2431
2432
  }
2432
- n = l, Dr = l.baseUrl, e.pushFromResponseData(l, {}, () => {
2433
+ n = l, _r = l.baseUrl, e.pushFromResponseData(l, {}, () => {
2433
2434
  if (!l.baseUrl) {
2434
2435
  console.error("No base url in modal response data so cannot navigate back");
2435
2436
  return;
@@ -2439,12 +2440,12 @@ const Au = ({ children: t }) => {
2439
2440
  preserveState: !0
2440
2441
  });
2441
2442
  }).then((u) => {
2442
- Nr = u;
2443
+ Dr = u;
2443
2444
  });
2444
2445
  }),
2445
2446
  []
2446
2447
  );
2447
- const a = (o) => (o.headers["X-InertiaUI-Modal-Base-Url"] = Dr, o);
2448
+ const a = (o) => (o.headers["X-InertiaUI-Modal-Base-Url"] = _r, o);
2448
2449
  return K(() => (jt.interceptors.request.use(a), () => jt.interceptors.request.eject(a)), []), /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
2449
2450
  t,
2450
2451
  e.stack.length > 0 && /* @__PURE__ */ R.jsx($a, { index: 0 })
@@ -2465,11 +2466,11 @@ const $u = () => {
2465
2466
  onModalEvent: (...n) => r.emit(...n)
2466
2467
  }
2467
2468
  ) });
2468
- }, Ra = Hr(({ name: t, children: e, ...r }, n) => {
2469
+ }, Ra = Br(({ name: t, children: e, ...r }, n) => {
2469
2470
  const a = $u(), { stack: o, registerLocalModal: l, removeLocalModal: u } = Jr(), [i, d] = Q(null), s = J(() => t ? i : o[a], [t, i, a, o]), h = J(() => {
2470
2471
  var f;
2471
2472
  return (f = o.find((y) => y.shouldRender && y.index > (s == null ? void 0 : s.index))) == null ? void 0 : f.index;
2472
- }, [a, o]), v = J(() => (s == null ? void 0 : s.modalProps.slideover) ?? r.slideover ?? na("type") === "slideover", [r.slideover]), w = J(
2473
+ }, [a, o]), v = J(() => (s == null ? void 0 : s.modalProps.slideover) ?? r.slideover ?? Hr("type") === "slideover", [r.slideover]), w = J(
2473
2474
  () => ({
2474
2475
  slideover: v,
2475
2476
  closeButton: r.closeButton ?? ze(v, "closeButton"),
@@ -2492,7 +2493,7 @@ const $u = () => {
2492
2493
  };
2493
2494
  }
2494
2495
  return s.registerEventListenersFromProps(r);
2495
- }, [t]), ra(
2496
+ }, [t]), na(
2496
2497
  n,
2497
2498
  () => ({
2498
2499
  afterLeave: () => s.afterLeave(),
@@ -2545,10 +2546,10 @@ function Ht() {
2545
2546
  for (var t, e, r = 0, n = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (e = Fa(t)) && (n && (n += " "), n += e);
2546
2547
  return n;
2547
2548
  }
2548
- var Ru = Object.defineProperty, Fu = (t, e, r) => e in t ? Ru(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, xr = (t, e, r) => (Fu(t, typeof e != "symbol" ? e + "" : e, r), r);
2549
+ var Ru = Object.defineProperty, Fu = (t, e, r) => e in t ? Ru(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Sr = (t, e, r) => (Fu(t, typeof e != "symbol" ? e + "" : e, r), r);
2549
2550
  let Cu = class {
2550
2551
  constructor() {
2551
- xr(this, "current", this.detect()), xr(this, "handoffState", "pending"), xr(this, "currentId", 0);
2552
+ Sr(this, "current", this.detect()), Sr(this, "handoffState", "pending"), Sr(this, "currentId", 0);
2552
2553
  }
2553
2554
  set(e) {
2554
2555
  this.current !== e && (this.handoffState = "pending", this.currentId = 0, this.current = e);
@@ -2639,7 +2640,7 @@ let U = function(t) {
2639
2640
  function Mu() {
2640
2641
  return ie(Iu);
2641
2642
  }
2642
- function kr(...t) {
2643
+ function Nr(...t) {
2643
2644
  return Array.from(new Set(t.flatMap((e) => typeof e == "string" ? e.split(" ") : []))).filter(Boolean).join(" ");
2644
2645
  }
2645
2646
  function Ce(t, e, ...r) {
@@ -2675,7 +2676,7 @@ function _u({ ourProps: t, theirProps: e, slot: r, defaultTag: n, features: a, v
2675
2676
  return Dt(i, r, n, l, u);
2676
2677
  }
2677
2678
  function Dt(t, e = {}, r, n, a) {
2678
- let { as: o = r, children: l, refName: u = "ref", ...i } = Or(t, ["unmount", "static"]), d = t.ref !== void 0 ? { [u]: t.ref } : {}, s = typeof l == "function" ? l(e) : l;
2679
+ let { as: o = r, children: l, refName: u = "ref", ...i } = xr(t, ["unmount", "static"]), d = t.ref !== void 0 ? { [u]: t.ref } : {}, s = typeof l == "function" ? l(e) : l;
2679
2680
  "className" in i && i.className && typeof i.className == "function" && (i.className = i.className(e)), i["aria-labelledby"] && i["aria-labelledby"] === i.id && (i["aria-labelledby"] = void 0);
2680
2681
  let h = {};
2681
2682
  if (e) {
@@ -2692,11 +2693,11 @@ function Dt(t, e = {}, r, n, a) {
2692
2693
  `)].join(`
2693
2694
  `));
2694
2695
  } else {
2695
- let v = s.props, w = v == null ? void 0 : v.className, f = typeof w == "function" ? (...m) => kr(w(...m), i.className) : kr(w, i.className), y = f ? { className: f } : {}, p = Ca(s.props, je(Or(i, ["ref"])));
2696
+ let v = s.props, w = v == null ? void 0 : v.className, f = typeof w == "function" ? (...m) => Nr(w(...m), i.className) : Nr(w, i.className), y = f ? { className: f } : {}, p = Ca(s.props, je(xr(i, ["ref"])));
2696
2697
  for (let m in h) m in p && delete h[m];
2697
2698
  return Mo(s, Object.assign({}, p, h, d, { ref: a(s.ref, d.ref) }, y));
2698
2699
  }
2699
- return Pr(o, Object.assign({}, Or(i, ["ref"]), o !== he && d, o !== he && h), s);
2700
+ return Or(o, Object.assign({}, xr(i, ["ref"]), o !== he && d, o !== he && h), s);
2700
2701
  }
2701
2702
  function Du() {
2702
2703
  let t = j([]), e = ve((r) => {
@@ -2731,14 +2732,14 @@ function Ca(...t) {
2731
2732
  }
2732
2733
  function le(t) {
2733
2734
  var e;
2734
- return Object.assign(Hr(t), { displayName: (e = t.displayName) != null ? e : t.name });
2735
+ return Object.assign(Br(t), { displayName: (e = t.displayName) != null ? e : t.name });
2735
2736
  }
2736
2737
  function je(t) {
2737
2738
  let e = Object.assign({}, t);
2738
2739
  for (let r in e) e[r] === void 0 && delete e[r];
2739
2740
  return e;
2740
2741
  }
2741
- function Or(t, e = []) {
2742
+ function xr(t, e = []) {
2742
2743
  let r = Object.assign({}, t);
2743
2744
  for (let n of e) n in r && delete r[n];
2744
2745
  return r;
@@ -2750,7 +2751,7 @@ function ju(t, e) {
2750
2751
  let { features: n = 1, ...a } = t, o = { ref: e, "aria-hidden": (n & 2) === 2 ? !0 : (r = a["aria-hidden"]) != null ? r : void 0, hidden: (n & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } };
2751
2752
  return fe()({ ourProps: o, theirProps: a, slot: {}, defaultTag: ku, name: "Hidden" });
2752
2753
  }
2753
- let jr = le(ju), Ia = Symbol();
2754
+ let kr = le(ju), Ia = Symbol();
2754
2755
  function Lu(t, e = !0) {
2755
2756
  return Object.assign(t, { [Ia]: e });
2756
2757
  }
@@ -2837,18 +2838,18 @@ function ot(t, e) {
2837
2838
  let o = a.indexOf(n), l = a.length;
2838
2839
  return o === -1 && (o = l, l += 1), o === l - 1;
2839
2840
  }
2840
- let Lr = /* @__PURE__ */ new Map(), wt = /* @__PURE__ */ new Map();
2841
- function zn(t) {
2841
+ let jr = /* @__PURE__ */ new Map(), wt = /* @__PURE__ */ new Map();
2842
+ function Kn(t) {
2842
2843
  var e;
2843
2844
  let r = (e = wt.get(t)) != null ? e : 0;
2844
- return wt.set(t, r + 1), r !== 0 ? () => Kn(t) : (Lr.set(t, { "aria-hidden": t.getAttribute("aria-hidden"), inert: t.inert }), t.setAttribute("aria-hidden", "true"), t.inert = !0, () => Kn(t));
2845
+ return wt.set(t, r + 1), r !== 0 ? () => Xn(t) : (jr.set(t, { "aria-hidden": t.getAttribute("aria-hidden"), inert: t.inert }), t.setAttribute("aria-hidden", "true"), t.inert = !0, () => Xn(t));
2845
2846
  }
2846
- function Kn(t) {
2847
+ function Xn(t) {
2847
2848
  var e;
2848
2849
  let r = (e = wt.get(t)) != null ? e : 1;
2849
2850
  if (r === 1 ? wt.delete(t) : wt.set(t, r - 1), r !== 1) return;
2850
- let n = Lr.get(t);
2851
- n && (n["aria-hidden"] === null ? t.removeAttribute("aria-hidden") : t.setAttribute("aria-hidden", n["aria-hidden"]), t.inert = n.inert, Lr.delete(t));
2851
+ let n = jr.get(t);
2852
+ n && (n["aria-hidden"] === null ? t.removeAttribute("aria-hidden") : t.setAttribute("aria-hidden", n["aria-hidden"]), t.inert = n.inert, jr.delete(t));
2852
2853
  }
2853
2854
  function Ku(t, { allowed: e, disallowed: r } = {}) {
2854
2855
  let n = ot(t, "inert-others");
@@ -2856,7 +2857,7 @@ function Ku(t, { allowed: e, disallowed: r } = {}) {
2856
2857
  var a, o;
2857
2858
  if (!n) return;
2858
2859
  let l = Me();
2859
- for (let i of (a = r == null ? void 0 : r()) != null ? a : []) i && l.add(zn(i));
2860
+ for (let i of (a = r == null ? void 0 : r()) != null ? a : []) i && l.add(Kn(i));
2860
2861
  let u = (o = e == null ? void 0 : e()) != null ? o : [];
2861
2862
  for (let i of u) {
2862
2863
  if (!i) continue;
@@ -2864,7 +2865,7 @@ function Ku(t, { allowed: e, disallowed: r } = {}) {
2864
2865
  if (!d) continue;
2865
2866
  let s = i.parentElement;
2866
2867
  for (; s && s !== d.body; ) {
2867
- for (let h of s.children) u.some((v) => h.contains(v)) || l.add(zn(h));
2868
+ for (let h of s.children) u.some((v) => h.contains(v)) || l.add(Kn(h));
2868
2869
  s = s.parentElement;
2869
2870
  }
2870
2871
  }
@@ -2893,7 +2894,7 @@ function Xu(t, e, r) {
2893
2894
  }, [e, n, t]);
2894
2895
  }
2895
2896
  let Gt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((t) => `${t}:not([tabindex='-1'])`).join(","), Ju = ["[data-autofocus]"].map((t) => `${t}:not([tabindex='-1'])`).join(",");
2896
- var Pe = ((t) => (t[t.First = 1] = "First", t[t.Previous = 2] = "Previous", t[t.Next = 4] = "Next", t[t.Last = 8] = "Last", t[t.WrapAround = 16] = "WrapAround", t[t.NoScroll = 32] = "NoScroll", t[t.AutoFocus = 64] = "AutoFocus", t))(Pe || {}), Wr = ((t) => (t[t.Error = 0] = "Error", t[t.Overflow = 1] = "Overflow", t[t.Success = 2] = "Success", t[t.Underflow = 3] = "Underflow", t))(Wr || {}), Qu = ((t) => (t[t.Previous = -1] = "Previous", t[t.Next = 1] = "Next", t))(Qu || {});
2897
+ var Pe = ((t) => (t[t.First = 1] = "First", t[t.Previous = 2] = "Previous", t[t.Next = 4] = "Next", t[t.Last = 8] = "Last", t[t.WrapAround = 16] = "WrapAround", t[t.NoScroll = 32] = "NoScroll", t[t.AutoFocus = 64] = "AutoFocus", t))(Pe || {}), Lr = ((t) => (t[t.Error = 0] = "Error", t[t.Overflow = 1] = "Overflow", t[t.Success = 2] = "Success", t[t.Underflow = 3] = "Underflow", t))(Lr || {}), Qu = ((t) => (t[t.Previous = -1] = "Previous", t[t.Next = 1] = "Next", t))(Qu || {});
2897
2898
  function Zu(t = document.body) {
2898
2899
  return t == null ? [] : Array.from(t.querySelectorAll(Gt)).sort((e, r) => Math.sign((e.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER)));
2899
2900
  }
@@ -2991,7 +2992,7 @@ function La(t, e, r, n) {
2991
2992
  return window.addEventListener(e, o, n), () => window.removeEventListener(e, o, n);
2992
2993
  }, [t, e, n]);
2993
2994
  }
2994
- const Xn = 30;
2995
+ const Jn = 30;
2995
2996
  function us(t, e, r) {
2996
2997
  let n = ot(t, "outside-click"), a = qe(r), o = ve(function(i, d) {
2997
2998
  if (i.defaultPrevented) return;
@@ -3017,7 +3018,7 @@ function us(t, e, r) {
3017
3018
  u.current.x = i.touches[0].clientX, u.current.y = i.touches[0].clientY;
3018
3019
  }, !0), pt(n, "touchend", (i) => {
3019
3020
  let d = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY };
3020
- if (!(Math.abs(d.x - u.current.x) >= Xn || Math.abs(d.y - u.current.y) >= Xn)) return o(i, () => i.target instanceof HTMLElement ? i.target : null);
3021
+ if (!(Math.abs(d.x - u.current.x) >= Jn || Math.abs(d.y - u.current.y) >= Jn)) return o(i, () => i.target instanceof HTMLElement ? i.target : null);
3021
3022
  }, !0), La(n, "blur", (i) => o(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
3022
3023
  }
3023
3024
  function At(...t) {
@@ -3137,8 +3138,8 @@ function vs(t = 0) {
3137
3138
  let [e, r] = Q(t), n = ve((i) => r(i), [e]), a = ve((i) => r((d) => d | i), [e]), o = ve((i) => (e & i) === i, [e]), l = ve((i) => r((d) => d & ~i), [r]), u = ve((i) => r((d) => d ^ i), [r]);
3138
3139
  return { flags: e, setFlag: n, addFlag: a, hasFlag: o, removeFlag: l, toggleFlag: u };
3139
3140
  }
3140
- var Jn, Qn;
3141
- typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Jn = process == null ? void 0 : process.env) == null ? void 0 : Jn.NODE_ENV) === "test" && typeof ((Qn = Element == null ? void 0 : Element.prototype) == null ? void 0 : Qn.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
3141
+ var Qn, Zn;
3142
+ typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Qn = process == null ? void 0 : process.env) == null ? void 0 : Qn.NODE_ENV) === "test" && typeof ((Zn = Element == null ? void 0 : Element.prototype) == null ? void 0 : Zn.getAnimations) > "u" && (Element.prototype.getAnimations = function() {
3142
3143
  return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(`
3143
3144
  `)), [];
3144
3145
  });
@@ -3257,7 +3258,7 @@ let Ba = ce(!1);
3257
3258
  function As() {
3258
3259
  return ie(Ba);
3259
3260
  }
3260
- function Zn(t) {
3261
+ function ea(t) {
3261
3262
  return A.createElement(Ba.Provider, { value: t.force }, t.children);
3262
3263
  }
3263
3264
  function Ts(t) {
@@ -3283,7 +3284,7 @@ let Ha = he, $s = le(function(t, e) {
3283
3284
  }), e), o = At(n), l = Ts(n), [u] = Q(() => {
3284
3285
  var h;
3285
3286
  return Ve.isServer ? null : (h = o == null ? void 0 : o.createElement("div")) != null ? h : null;
3286
- }), i = ie(Ur), d = Tt();
3287
+ }), i = ie(Wr), d = Tt();
3287
3288
  ae(() => {
3288
3289
  !l || !u || l.contains(u) || (u.setAttribute("data-headlessui-portal", ""), l.appendChild(u));
3289
3290
  }, [l, u]), ae(() => {
@@ -3304,14 +3305,14 @@ function Cs(t, e) {
3304
3305
  let { target: r, ...n } = t, a = { ref: Se(e) }, o = fe();
3305
3306
  return A.createElement(Va.Provider, { value: r }, o({ ourProps: a, theirProps: n, defaultTag: Fs, name: "Popover.Group" }));
3306
3307
  }
3307
- let Ur = ce(null);
3308
+ let Wr = ce(null);
3308
3309
  function Is() {
3309
- let t = ie(Ur), e = j([]), r = U((o) => (e.current.push(o), t && t.register(o), () => n(o))), n = U((o) => {
3310
+ let t = ie(Wr), e = j([]), r = U((o) => (e.current.push(o), t && t.register(o), () => n(o))), n = U((o) => {
3310
3311
  let l = e.current.indexOf(o);
3311
3312
  l !== -1 && e.current.splice(l, 1), t && t.unregister(o);
3312
3313
  }), a = J(() => ({ register: r, unregister: n, portals: e }), [r, n, e]);
3313
3314
  return [e, J(() => function({ children: o }) {
3314
- return A.createElement(Ur.Provider, { value: a }, o);
3315
+ return A.createElement(Wr.Provider, { value: a }, o);
3315
3316
  }, [a])];
3316
3317
  }
3317
3318
  let Ms = le(Rs), qa = le(Cs), _s = Object.assign(Ms, { Group: qa });
@@ -3344,9 +3345,9 @@ function ks({ defaultContainers: t = [], portals: e, mainTreeNode: r } = {}) {
3344
3345
  return { resolveContainers: a, contains: U((o) => a().some((l) => l.contains(o))) };
3345
3346
  }
3346
3347
  let Ga = ce(null);
3347
- function ea({ children: t, node: e }) {
3348
+ function ta({ children: t, node: e }) {
3348
3349
  let [r, n] = Q(null), a = Ya(e ?? r);
3349
- return A.createElement(Ga.Provider, { value: a }, t, a === null && A.createElement(jr, { features: qt.Hidden, ref: (o) => {
3350
+ return A.createElement(Ga.Provider, { value: a }, t, a === null && A.createElement(kr, { features: qt.Hidden, ref: (o) => {
3350
3351
  var l, u;
3351
3352
  if (o) {
3352
3353
  for (let i of (u = (l = Kt(o)) == null ? void 0 : l.querySelectorAll("html > *, body > *")) != null ? u : []) if (i !== document.body && i !== document.head && i instanceof HTMLElement && i != null && i.contains(o)) {
@@ -3409,7 +3410,7 @@ function Ws(t, e) {
3409
3410
  let S = g.relatedTarget;
3410
3411
  S instanceof HTMLElement && S.dataset.headlessuiFocusGuard !== "true" && (Ka(b, S) || (y.current ? Et(r.current, Ce(h.current, { [vt.Forwards]: () => Pe.Next, [vt.Backwards]: () => Pe.Previous }) | Pe.WrapAround, { relativeTo: g.target }) : g.target instanceof HTMLElement && Ae(g.target)));
3411
3412
  } }, m = fe();
3412
- return A.createElement(A.Fragment, null, w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }), m({ ourProps: p, theirProps: i, defaultTag: Ls, name: "FocusTrap" }), w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }));
3413
+ return A.createElement(A.Fragment, null, w && A.createElement(kr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }), m({ ourProps: p, theirProps: i, defaultTag: Ls, name: "FocusTrap" }), w && A.createElement(kr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }));
3413
3414
  }
3414
3415
  let Us = le(Ws), Bs = Object.assign(Us, { features: We });
3415
3416
  function Hs(t = !0) {
@@ -3455,8 +3456,8 @@ function qs(t, { ownerDocument: e, container: r, initialFocus: n, initialFocusFa
3455
3456
  if (n != null && n.current) Ae(n.current);
3456
3457
  else {
3457
3458
  if (t & 16) {
3458
- if (Et(i, Pe.First | Pe.AutoFocus) !== Wr.Error) return;
3459
- } else if (Et(i, Pe.First) !== Wr.Error) return;
3459
+ if (Et(i, Pe.First | Pe.AutoFocus) !== Lr.Error) return;
3460
+ } else if (Et(i, Pe.First) !== Lr.Error) return;
3460
3461
  if (a != null && a.current && (Ae(a.current), (e == null ? void 0 : e.activeElement) === a.current)) return;
3461
3462
  console.warn("There are no focusable elements inside the <FocusTrap />");
3462
3463
  }
@@ -3564,7 +3565,7 @@ function Xs(t, e) {
3564
3565
  K(() => {
3565
3566
  S && a || (pe(M), q(M));
3566
3567
  }, [M, S, a]);
3567
- let _e = !(!a || !S || !D || ue), [, ee] = gs(_e, m, M, { start: pe, end: q }), nr = je({ ref: O, className: ((n = kr(p.className, de && d, de && s, ee.enter && d, ee.enter && ee.closed && s, ee.enter && !ee.closed && h, ee.leave && w, ee.leave && !ee.closed && f, ee.leave && ee.closed && y, !ee.transition && M && v)) == null ? void 0 : n.trim()) || void 0, ...hs(ee) }), De = 0;
3568
+ let _e = !(!a || !S || !D || ue), [, ee] = gs(_e, m, M, { start: pe, end: q }), nr = je({ ref: O, className: ((n = Nr(p.className, de && d, de && s, ee.enter && d, ee.enter && ee.closed && s, ee.enter && !ee.closed && h, ee.leave && w, ee.leave && !ee.closed && f, ee.leave && ee.closed && y, !ee.transition && M && v)) == null ? void 0 : n.trim()) || void 0, ...hs(ee) }), De = 0;
3568
3569
  k === "visible" && (De |= me.Open), k === "hidden" && (De |= me.Closed), ee.enter && (De |= me.Opening), ee.leave && (De |= me.Closing);
3569
3570
  let lt = fe();
3570
3571
  return A.createElement(er.Provider, { value: te }, A.createElement(Ss, { value: De }, lt({ ourProps: nr, theirProps: p, defaultTag: Qa, features: Za, visible: k === "visible", name: "Transition.Child" })));
@@ -3595,9 +3596,9 @@ function Js(t, e) {
3595
3596
  }
3596
3597
  function Qs(t, e) {
3597
3598
  let r = ie(Zt) !== null, n = Qt() !== null;
3598
- return A.createElement(A.Fragment, null, !r && n ? A.createElement(Br, { ref: e, ...t }) : A.createElement(eo, { ref: e, ...t }));
3599
+ return A.createElement(A.Fragment, null, !r && n ? A.createElement(Ur, { ref: e, ...t }) : A.createElement(eo, { ref: e, ...t }));
3599
3600
  }
3600
- let Br = le(Js), eo = le(Xs), it = le(Qs), to = Object.assign(Br, { Child: it, Root: Br });
3601
+ let Ur = le(Js), eo = le(Xs), it = le(Qs), to = Object.assign(Ur, { Child: it, Root: Ur });
3601
3602
  var Zs = ((t) => (t[t.Open = 0] = "Open", t[t.Closed = 1] = "Closed", t))(Zs || {}), ec = ((t) => (t[t.SetTitleId = 0] = "SetTitleId", t))(ec || {});
3602
3603
  let tc = { 0(t, e) {
3603
3604
  return t.titleId === e.id ? t : { ...t, titleId: e.id };
@@ -3614,7 +3615,7 @@ function rr(t) {
3614
3615
  function rc(t, e) {
3615
3616
  return Ce(e.type, tc, t, e);
3616
3617
  }
3617
- let ta = le(function(t, e) {
3618
+ let ra = le(function(t, e) {
3618
3619
  let r = xt(), { id: n = `headlessui-dialog-${r}`, open: a, onClose: o, initialFocus: l, role: u = "dialog", autoFocus: i = !0, __demoMode: d = !1, unmount: s = !1, ...h } = t, v = j(!1);
3619
3620
  u = function() {
3620
3621
  return u === "dialog" || u === "alertdialog" ? u : (v.current || (v.current = !0, console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
@@ -3639,7 +3640,7 @@ let ta = le(function(t, e) {
3639
3640
  let [$, T] = Wu(), D = J(() => [{ dialogState: m, close: S, setTitleId: O, unmount: s }, g], [m, g, S, O, s]), ue = J(() => ({ open: m === 0 }), [m]), de = { ref: y, id: n, role: u, tabIndex: -1, "aria-modal": d ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": g.titleId, "aria-describedby": $, unmount: s }, ge = !Ns(), te = We.None;
3640
3641
  _ && !d && (te |= We.RestoreFocus, te |= We.TabLock, i && (te |= We.AutoFocus), ge && (te |= We.InitialFocus));
3641
3642
  let pe = fe();
3642
- return A.createElement(xs, null, A.createElement(Zn, { force: !0 }, A.createElement(_s, null, A.createElement(nn.Provider, { value: D }, A.createElement(qa, { target: f }, A.createElement(Zn, { force: !1 }, A.createElement(T, { slot: ue }, A.createElement(W, null, A.createElement(Bs, { initialFocus: l, initialFocusFallback: f, containers: Y, features: te }, A.createElement(Gu, { value: S }, pe({ ourProps: de, theirProps: h, slot: ue, defaultTag: nc, features: ac, visible: m === 0, name: "Dialog" })))))))))));
3643
+ return A.createElement(xs, null, A.createElement(ea, { force: !0 }, A.createElement(_s, null, A.createElement(nn.Provider, { value: D }, A.createElement(qa, { target: f }, A.createElement(ea, { force: !1 }, A.createElement(T, { slot: ue }, A.createElement(W, null, A.createElement(Bs, { initialFocus: l, initialFocusFallback: f, containers: Y, features: te }, A.createElement(Gu, { value: S }, pe({ ourProps: de, theirProps: h, slot: ue, defaultTag: nc, features: ac, visible: m === 0, name: "Dialog" })))))))))));
3643
3644
  }), nc = "div", ac = Vt.RenderStrategy | Vt.Static;
3644
3645
  function oc(t, e) {
3645
3646
  let { transition: r = !1, open: n, ...a } = t, o = Qt(), l = t.hasOwnProperty("open") || o !== null, u = t.hasOwnProperty("onClose");
@@ -3648,7 +3649,7 @@ function oc(t, e) {
3648
3649
  if (!u) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
3649
3650
  if (!o && typeof t.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);
3650
3651
  if (typeof t.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);
3651
- return (n !== void 0 || r) && !a.static ? A.createElement(ea, null, A.createElement(to, { show: n, transition: r, unmount: a.unmount }, A.createElement(ta, { ref: e, ...a }))) : A.createElement(ea, null, A.createElement(ta, { ref: e, open: n, ...a }));
3652
+ return (n !== void 0 || r) && !a.static ? A.createElement(ta, null, A.createElement(to, { show: n, transition: r, unmount: a.unmount }, A.createElement(ra, { ref: e, ...a }))) : A.createElement(ta, null, A.createElement(ra, { ref: e, open: n, ...a }));
3652
3653
  }
3653
3654
  let ic = "div";
3654
3655
  function lc(t, e) {
@@ -3774,9 +3775,9 @@ const vc = ({ modalContext: t, modalProps: e, children: r }) => /* @__PURE__ */
3774
3775
  }
3775
3776
  )
3776
3777
  }
3777
- ) }), hc = Hr(({ name: t, children: e, ...r }, n) => {
3778
+ ) }), hc = Br(({ name: t, children: e, ...r }, n) => {
3778
3779
  const a = (l) => typeof e == "function" ? e(l) : e, o = j(null);
3779
- return ra(n, () => o.current, [o]), /* @__PURE__ */ R.jsx(
3780
+ return na(n, () => o.current, [o]), /* @__PURE__ */ R.jsx(
3780
3781
  Ra,
3781
3782
  {
3782
3783
  ref: o,
@@ -3902,9 +3903,9 @@ const $c = ({
3902
3903
  children: f,
3903
3904
  ...y
3904
3905
  }) => {
3905
- const [p, m] = Q(!1), [g, b] = Q(null), { stack: S, visit: O } = Jr(), _ = J(() => w ?? na("navigate"), [w]), M = {}, W = {};
3906
+ const [p, m] = Q(!1), [g, b] = Q(null), { stack: S, visit: O } = Jr(), _ = J(() => w ?? Hr("navigate"), [w]), M = {}, W = {};
3906
3907
  Object.keys(y).forEach((T) => {
3907
- Yn.includes(T) || (T.startsWith("on") && typeof y[T] == "function" ? T.toLowerCase() in window ? M[T] = y[T] : W[T] = y[T] : M[T] = y[T]);
3908
+ zn.includes(T) || (T.startsWith("on") && typeof y[T] == "function" ? T.toLowerCase() in window ? M[T] = y[T] : W[T] = y[T] : M[T] = y[T]);
3908
3909
  });
3909
3910
  const [H, k] = Q(!1);
3910
3911
  K(() => {
@@ -3921,7 +3922,7 @@ const $c = ({
3921
3922
  e,
3922
3923
  r,
3923
3924
  a,
3924
- Vo(aa(y, Yn)),
3925
+ Vo(aa(y, zn)),
3925
3926
  () => Y(S.length),
3926
3927
  V,
3927
3928
  o,
@@ -3950,7 +3951,7 @@ export {
3950
3951
  $c as ModalLink,
3951
3952
  Tu as ModalRoot,
3952
3953
  Au as ModalStackProvider,
3953
- na as getConfig,
3954
+ Hr as getConfig,
3954
3955
  Oc as putConfig,
3955
3956
  Pc as renderApp,
3956
3957
  xc as resetConfig,