[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/script-modules/interactivity/ -> index.js (source)

   1  var __defProp = Object.defineProperty;
   2  var __getOwnPropNames = Object.getOwnPropertyNames;
   3  var __esm = (fn, res) => function __init() {
   4    return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
   5  };
   6  var __export = (target, all) => {
   7    for (var name in all)
   8      __defProp(target, name, { get: all[name], enumerable: true });
   9  };
  10  
  11  // node_modules/preact/dist/preact.module.js
  12  function d(n3, l6) {
  13    for (var u5 in l6) n3[u5] = l6[u5];
  14    return n3;
  15  }
  16  function w(n3) {
  17    n3 && n3.parentNode && n3.parentNode.removeChild(n3);
  18  }
  19  function _(l6, u5, t5) {
  20    var i6, o4, r5, f5 = {};
  21    for (r5 in u5) "key" == r5 ? i6 = u5[r5] : "ref" == r5 ? o4 = u5[r5] : f5[r5] = u5[r5];
  22    if (arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t5), "function" == typeof l6 && null != l6.defaultProps) for (r5 in l6.defaultProps) void 0 === f5[r5] && (f5[r5] = l6.defaultProps[r5]);
  23    return g(l6, f5, i6, o4, null);
  24  }
  25  function g(n3, t5, i6, o4, r5) {
  26    var f5 = { type: n3, props: t5, key: i6, ref: o4, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: null == r5 ? ++u : r5, __i: -1, __u: 0 };
  27    return null == r5 && null != l.vnode && l.vnode(f5), f5;
  28  }
  29  function b(n3) {
  30    return n3.children;
  31  }
  32  function k(n3, l6) {
  33    this.props = n3, this.context = l6;
  34  }
  35  function x(n3, l6) {
  36    if (null == l6) return n3.__ ? x(n3.__, n3.__i + 1) : null;
  37    for (var u5; l6 < n3.__k.length; l6++) if (null != (u5 = n3.__k[l6]) && null != u5.__e) return u5.__e;
  38    return "function" == typeof n3.type ? x(n3) : null;
  39  }
  40  function C(n3) {
  41    var l6, u5;
  42    if (null != (n3 = n3.__) && null != n3.__c) {
  43      for (n3.__e = n3.__c.base = null, l6 = 0; l6 < n3.__k.length; l6++) if (null != (u5 = n3.__k[l6]) && null != u5.__e) {
  44        n3.__e = n3.__c.base = u5.__e;
  45        break;
  46      }
  47      return C(n3);
  48    }
  49  }
  50  function M(n3) {
  51    (!n3.__d && (n3.__d = true) && i.push(n3) && !P.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r)(P);
  52  }
  53  function P() {
  54    var n3, u5, t5, o4, r5, e4, c5, s6;
  55    for (i.sort(f); n3 = i.shift(); ) n3.__d && (u5 = i.length, o4 = void 0, e4 = (r5 = (t5 = n3).__v).__e, c5 = [], s6 = [], t5.__P && ((o4 = d({}, r5)).__v = r5.__v + 1, l.vnode && l.vnode(o4), O(t5.__P, o4, r5, t5.__n, t5.__P.namespaceURI, 32 & r5.__u ? [e4] : null, c5, null == e4 ? x(r5) : e4, !!(32 & r5.__u), s6), o4.__v = r5.__v, o4.__.__k[o4.__i] = o4, j(c5, o4, s6), o4.__e != e4 && C(o4)), i.length > u5 && i.sort(f));
  56    P.__r = 0;
  57  }
  58  function S(n3, l6, u5, t5, i6, o4, r5, f5, e4, c5, s6) {
  59    var a5, p6, y5, d6, w5, _5 = t5 && t5.__k || v, g3 = l6.length;
  60    for (u5.__d = e4, $(u5, l6, _5), e4 = u5.__d, a5 = 0; a5 < g3; a5++) null != (y5 = u5.__k[a5]) && (p6 = -1 === y5.__i ? h : _5[y5.__i] || h, y5.__i = a5, O(n3, y5, p6, i6, o4, r5, f5, e4, c5, s6), d6 = y5.__e, y5.ref && p6.ref != y5.ref && (p6.ref && N(p6.ref, null, y5), s6.push(y5.ref, y5.__c || d6, y5)), null == w5 && null != d6 && (w5 = d6), 65536 & y5.__u || p6.__k === y5.__k ? e4 = I(y5, e4, n3) : "function" == typeof y5.type && void 0 !== y5.__d ? e4 = y5.__d : d6 && (e4 = d6.nextSibling), y5.__d = void 0, y5.__u &= -196609);
  61    u5.__d = e4, u5.__e = w5;
  62  }
  63  function $(n3, l6, u5) {
  64    var t5, i6, o4, r5, f5, e4 = l6.length, c5 = u5.length, s6 = c5, a5 = 0;
  65    for (n3.__k = [], t5 = 0; t5 < e4; t5++) null != (i6 = l6[t5]) && "boolean" != typeof i6 && "function" != typeof i6 ? (r5 = t5 + a5, (i6 = n3.__k[t5] = "string" == typeof i6 || "number" == typeof i6 || "bigint" == typeof i6 || i6.constructor == String ? g(null, i6, null, null, null) : y(i6) ? g(b, { children: i6 }, null, null, null) : void 0 === i6.constructor && i6.__b > 0 ? g(i6.type, i6.props, i6.key, i6.ref ? i6.ref : null, i6.__v) : i6).__ = n3, i6.__b = n3.__b + 1, o4 = null, -1 !== (f5 = i6.__i = L(i6, u5, r5, s6)) && (s6--, (o4 = u5[f5]) && (o4.__u |= 131072)), null == o4 || null === o4.__v ? (-1 == f5 && a5--, "function" != typeof i6.type && (i6.__u |= 65536)) : f5 !== r5 && (f5 == r5 - 1 ? a5-- : f5 == r5 + 1 ? a5++ : (f5 > r5 ? a5-- : a5++, i6.__u |= 65536))) : i6 = n3.__k[t5] = null;
  66    if (s6) for (t5 = 0; t5 < c5; t5++) null != (o4 = u5[t5]) && 0 == (131072 & o4.__u) && (o4.__e == n3.__d && (n3.__d = x(o4)), V(o4, o4));
  67  }
  68  function I(n3, l6, u5) {
  69    var t5, i6;
  70    if ("function" == typeof n3.type) {
  71      for (t5 = n3.__k, i6 = 0; t5 && i6 < t5.length; i6++) t5[i6] && (t5[i6].__ = n3, l6 = I(t5[i6], l6, u5));
  72      return l6;
  73    }
  74    n3.__e != l6 && (l6 && n3.type && !u5.contains(l6) && (l6 = x(n3)), u5.insertBefore(n3.__e, l6 || null), l6 = n3.__e);
  75    do {
  76      l6 = l6 && l6.nextSibling;
  77    } while (null != l6 && 8 === l6.nodeType);
  78    return l6;
  79  }
  80  function L(n3, l6, u5, t5) {
  81    var i6 = n3.key, o4 = n3.type, r5 = u5 - 1, f5 = u5 + 1, e4 = l6[u5];
  82    if (null === e4 || e4 && i6 == e4.key && o4 === e4.type && 0 == (131072 & e4.__u)) return u5;
  83    if (t5 > (null != e4 && 0 == (131072 & e4.__u) ? 1 : 0)) for (; r5 >= 0 || f5 < l6.length; ) {
  84      if (r5 >= 0) {
  85        if ((e4 = l6[r5]) && 0 == (131072 & e4.__u) && i6 == e4.key && o4 === e4.type) return r5;
  86        r5--;
  87      }
  88      if (f5 < l6.length) {
  89        if ((e4 = l6[f5]) && 0 == (131072 & e4.__u) && i6 == e4.key && o4 === e4.type) return f5;
  90        f5++;
  91      }
  92    }
  93    return -1;
  94  }
  95  function T(n3, l6, u5) {
  96    "-" === l6[0] ? n3.setProperty(l6, null == u5 ? "" : u5) : n3[l6] = null == u5 ? "" : "number" != typeof u5 || p.test(l6) ? u5 : u5 + "px";
  97  }
  98  function A(n3, l6, u5, t5, i6) {
  99    var o4;
 100    n: if ("style" === l6) if ("string" == typeof u5) n3.style.cssText = u5;
 101    else {
 102      if ("string" == typeof t5 && (n3.style.cssText = t5 = ""), t5) for (l6 in t5) u5 && l6 in u5 || T(n3.style, l6, "");
 103      if (u5) for (l6 in u5) t5 && u5[l6] === t5[l6] || T(n3.style, l6, u5[l6]);
 104    }
 105    else if ("o" === l6[0] && "n" === l6[1]) o4 = l6 !== (l6 = l6.replace(/(PointerCapture)$|Capture$/i, "$1")), l6 = l6.toLowerCase() in n3 || "onFocusOut" === l6 || "onFocusIn" === l6 ? l6.toLowerCase().slice(2) : l6.slice(2), n3.l || (n3.l = {}), n3.l[l6 + o4] = u5, u5 ? t5 ? u5.u = t5.u : (u5.u = e, n3.addEventListener(l6, o4 ? s : c, o4)) : n3.removeEventListener(l6, o4 ? s : c, o4);
 106    else {
 107      if ("http://www.w3.org/2000/svg" == i6) l6 = l6.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
 108      else if ("width" != l6 && "height" != l6 && "href" != l6 && "list" != l6 && "form" != l6 && "tabIndex" != l6 && "download" != l6 && "rowSpan" != l6 && "colSpan" != l6 && "role" != l6 && "popover" != l6 && l6 in n3) try {
 109        n3[l6] = null == u5 ? "" : u5;
 110        break n;
 111      } catch (n4) {
 112      }
 113      "function" == typeof u5 || (null == u5 || false === u5 && "-" !== l6[4] ? n3.removeAttribute(l6) : n3.setAttribute(l6, "popover" == l6 && 1 == u5 ? "" : u5));
 114    }
 115  }
 116  function F(n3) {
 117    return function(u5) {
 118      if (this.l) {
 119        var t5 = this.l[u5.type + n3];
 120        if (null == u5.t) u5.t = e++;
 121        else if (u5.t < t5.u) return;
 122        return t5(l.event ? l.event(u5) : u5);
 123      }
 124    };
 125  }
 126  function O(n3, u5, t5, i6, o4, r5, f5, e4, c5, s6) {
 127    var a5, h5, v6, p6, w5, _5, g3, m3, x3, C3, M2, P2, $2, I2, H, L2, T3 = u5.type;
 128    if (void 0 !== u5.constructor) return null;
 129    128 & t5.__u && (c5 = !!(32 & t5.__u), r5 = [e4 = u5.__e = t5.__e]), (a5 = l.__b) && a5(u5);
 130    n: if ("function" == typeof T3) try {
 131      if (m3 = u5.props, x3 = "prototype" in T3 && T3.prototype.render, C3 = (a5 = T3.contextType) && i6[a5.__c], M2 = a5 ? C3 ? C3.props.value : a5.__ : i6, t5.__c ? g3 = (h5 = u5.__c = t5.__c).__ = h5.__E : (x3 ? u5.__c = h5 = new T3(m3, M2) : (u5.__c = h5 = new k(m3, M2), h5.constructor = T3, h5.render = q), C3 && C3.sub(h5), h5.props = m3, h5.state || (h5.state = {}), h5.context = M2, h5.__n = i6, v6 = h5.__d = true, h5.__h = [], h5._sb = []), x3 && null == h5.__s && (h5.__s = h5.state), x3 && null != T3.getDerivedStateFromProps && (h5.__s == h5.state && (h5.__s = d({}, h5.__s)), d(h5.__s, T3.getDerivedStateFromProps(m3, h5.__s))), p6 = h5.props, w5 = h5.state, h5.__v = u5, v6) x3 && null == T3.getDerivedStateFromProps && null != h5.componentWillMount && h5.componentWillMount(), x3 && null != h5.componentDidMount && h5.__h.push(h5.componentDidMount);
 132      else {
 133        if (x3 && null == T3.getDerivedStateFromProps && m3 !== p6 && null != h5.componentWillReceiveProps && h5.componentWillReceiveProps(m3, M2), !h5.__e && (null != h5.shouldComponentUpdate && false === h5.shouldComponentUpdate(m3, h5.__s, M2) || u5.__v === t5.__v)) {
 134          for (u5.__v !== t5.__v && (h5.props = m3, h5.state = h5.__s, h5.__d = false), u5.__e = t5.__e, u5.__k = t5.__k, u5.__k.some(function(n4) {
 135            n4 && (n4.__ = u5);
 136          }), P2 = 0; P2 < h5._sb.length; P2++) h5.__h.push(h5._sb[P2]);
 137          h5._sb = [], h5.__h.length && f5.push(h5);
 138          break n;
 139        }
 140        null != h5.componentWillUpdate && h5.componentWillUpdate(m3, h5.__s, M2), x3 && null != h5.componentDidUpdate && h5.__h.push(function() {
 141          h5.componentDidUpdate(p6, w5, _5);
 142        });
 143      }
 144      if (h5.context = M2, h5.props = m3, h5.__P = n3, h5.__e = false, $2 = l.__r, I2 = 0, x3) {
 145        for (h5.state = h5.__s, h5.__d = false, $2 && $2(u5), a5 = h5.render(h5.props, h5.state, h5.context), H = 0; H < h5._sb.length; H++) h5.__h.push(h5._sb[H]);
 146        h5._sb = [];
 147      } else do {
 148        h5.__d = false, $2 && $2(u5), a5 = h5.render(h5.props, h5.state, h5.context), h5.state = h5.__s;
 149      } while (h5.__d && ++I2 < 25);
 150      h5.state = h5.__s, null != h5.getChildContext && (i6 = d(d({}, i6), h5.getChildContext())), x3 && !v6 && null != h5.getSnapshotBeforeUpdate && (_5 = h5.getSnapshotBeforeUpdate(p6, w5)), S(n3, y(L2 = null != a5 && a5.type === b && null == a5.key ? a5.props.children : a5) ? L2 : [L2], u5, t5, i6, o4, r5, f5, e4, c5, s6), h5.base = u5.__e, u5.__u &= -161, h5.__h.length && f5.push(h5), g3 && (h5.__E = h5.__ = null);
 151    } catch (n4) {
 152      if (u5.__v = null, c5 || null != r5) {
 153        for (u5.__u |= c5 ? 160 : 32; e4 && 8 === e4.nodeType && e4.nextSibling; ) e4 = e4.nextSibling;
 154        r5[r5.indexOf(e4)] = null, u5.__e = e4;
 155      } else u5.__e = t5.__e, u5.__k = t5.__k;
 156      l.__e(n4, u5, t5);
 157    }
 158    else null == r5 && u5.__v === t5.__v ? (u5.__k = t5.__k, u5.__e = t5.__e) : u5.__e = z(t5.__e, u5, t5, i6, o4, r5, f5, c5, s6);
 159    (a5 = l.diffed) && a5(u5);
 160  }
 161  function j(n3, u5, t5) {
 162    u5.__d = void 0;
 163    for (var i6 = 0; i6 < t5.length; i6++) N(t5[i6], t5[++i6], t5[++i6]);
 164    l.__c && l.__c(u5, n3), n3.some(function(u6) {
 165      try {
 166        n3 = u6.__h, u6.__h = [], n3.some(function(n4) {
 167          n4.call(u6);
 168        });
 169      } catch (n4) {
 170        l.__e(n4, u6.__v);
 171      }
 172    });
 173  }
 174  function z(u5, t5, i6, o4, r5, f5, e4, c5, s6) {
 175    var a5, v6, p6, d6, _5, g3, m3, b4 = i6.props, k3 = t5.props, C3 = t5.type;
 176    if ("svg" === C3 ? r5 = "http://www.w3.org/2000/svg" : "math" === C3 ? r5 = "http://www.w3.org/1998/Math/MathML" : r5 || (r5 = "http://www.w3.org/1999/xhtml"), null != f5) {
 177      for (a5 = 0; a5 < f5.length; a5++) if ((_5 = f5[a5]) && "setAttribute" in _5 == !!C3 && (C3 ? _5.localName === C3 : 3 === _5.nodeType)) {
 178        u5 = _5, f5[a5] = null;
 179        break;
 180      }
 181    }
 182    if (null == u5) {
 183      if (null === C3) return document.createTextNode(k3);
 184      u5 = document.createElementNS(r5, C3, k3.is && k3), c5 && (l.__m && l.__m(t5, f5), c5 = false), f5 = null;
 185    }
 186    if (null === C3) b4 === k3 || c5 && u5.data === k3 || (u5.data = k3);
 187    else {
 188      if (f5 = f5 && n.call(u5.childNodes), b4 = i6.props || h, !c5 && null != f5) for (b4 = {}, a5 = 0; a5 < u5.attributes.length; a5++) b4[(_5 = u5.attributes[a5]).name] = _5.value;
 189      for (a5 in b4) if (_5 = b4[a5], "children" == a5) ;
 190      else if ("dangerouslySetInnerHTML" == a5) p6 = _5;
 191      else if (!(a5 in k3)) {
 192        if ("value" == a5 && "defaultValue" in k3 || "checked" == a5 && "defaultChecked" in k3) continue;
 193        A(u5, a5, null, _5, r5);
 194      }
 195      for (a5 in k3) _5 = k3[a5], "children" == a5 ? d6 = _5 : "dangerouslySetInnerHTML" == a5 ? v6 = _5 : "value" == a5 ? g3 = _5 : "checked" == a5 ? m3 = _5 : c5 && "function" != typeof _5 || b4[a5] === _5 || A(u5, a5, _5, b4[a5], r5);
 196      if (v6) c5 || p6 && (v6.__html === p6.__html || v6.__html === u5.innerHTML) || (u5.innerHTML = v6.__html), t5.__k = [];
 197      else if (p6 && (u5.innerHTML = ""), S(u5, y(d6) ? d6 : [d6], t5, i6, o4, "foreignObject" === C3 ? "http://www.w3.org/1999/xhtml" : r5, f5, e4, f5 ? f5[0] : i6.__k && x(i6, 0), c5, s6), null != f5) for (a5 = f5.length; a5--; ) w(f5[a5]);
 198      c5 || (a5 = "value", "progress" === C3 && null == g3 ? u5.removeAttribute("value") : void 0 !== g3 && (g3 !== u5[a5] || "progress" === C3 && !g3 || "option" === C3 && g3 !== b4[a5]) && A(u5, a5, g3, b4[a5], r5), a5 = "checked", void 0 !== m3 && m3 !== u5[a5] && A(u5, a5, m3, b4[a5], r5));
 199    }
 200    return u5;
 201  }
 202  function N(n3, u5, t5) {
 203    try {
 204      if ("function" == typeof n3) {
 205        var i6 = "function" == typeof n3.__u;
 206        i6 && n3.__u(), i6 && null == u5 || (n3.__u = n3(u5));
 207      } else n3.current = u5;
 208    } catch (n4) {
 209      l.__e(n4, t5);
 210    }
 211  }
 212  function V(n3, u5, t5) {
 213    var i6, o4;
 214    if (l.unmount && l.unmount(n3), (i6 = n3.ref) && (i6.current && i6.current !== n3.__e || N(i6, null, u5)), null != (i6 = n3.__c)) {
 215      if (i6.componentWillUnmount) try {
 216        i6.componentWillUnmount();
 217      } catch (n4) {
 218        l.__e(n4, u5);
 219      }
 220      i6.base = i6.__P = null;
 221    }
 222    if (i6 = n3.__k) for (o4 = 0; o4 < i6.length; o4++) i6[o4] && V(i6[o4], u5, t5 || "function" != typeof n3.type);
 223    t5 || w(n3.__e), n3.__c = n3.__ = n3.__e = n3.__d = void 0;
 224  }
 225  function q(n3, l6, u5) {
 226    return this.constructor(n3, u5);
 227  }
 228  function B(u5, t5, i6) {
 229    var o4, r5, f5, e4;
 230    l.__ && l.__(u5, t5), r5 = (o4 = "function" == typeof i6) ? null : i6 && i6.__k || t5.__k, f5 = [], e4 = [], O(t5, u5 = (!o4 && i6 || t5).__k = _(b, null, [u5]), r5 || h, h, t5.namespaceURI, !o4 && i6 ? [i6] : r5 ? null : t5.firstChild ? n.call(t5.childNodes) : null, f5, !o4 && i6 ? i6 : r5 ? r5.__e : t5.firstChild, o4, e4), j(f5, u5, e4);
 231  }
 232  function D(n3, l6) {
 233    B(n3, l6, D);
 234  }
 235  function E(l6, u5, t5) {
 236    var i6, o4, r5, f5, e4 = d({}, l6.props);
 237    for (r5 in l6.type && l6.type.defaultProps && (f5 = l6.type.defaultProps), u5) "key" == r5 ? i6 = u5[r5] : "ref" == r5 ? o4 = u5[r5] : e4[r5] = void 0 === u5[r5] && void 0 !== f5 ? f5[r5] : u5[r5];
 238    return arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t5), g(l6.type, e4, i6 || l6.key, o4 || l6.ref, null);
 239  }
 240  function G(n3, l6) {
 241    var u5 = { __c: l6 = "__cC" + a++, __: n3, Consumer: function(n4, l7) {
 242      return n4.children(l7);
 243    }, Provider: function(n4) {
 244      var u6, t5;
 245      return this.getChildContext || (u6 = [], (t5 = {})[l6] = this, this.getChildContext = function() {
 246        return t5;
 247      }, this.componentWillUnmount = function() {
 248        u6 = null;
 249      }, this.shouldComponentUpdate = function(n5) {
 250        this.props.value !== n5.value && u6.some(function(n6) {
 251          n6.__e = true, M(n6);
 252        });
 253      }, this.sub = function(n5) {
 254        u6.push(n5);
 255        var l7 = n5.componentWillUnmount;
 256        n5.componentWillUnmount = function() {
 257          u6 && u6.splice(u6.indexOf(n5), 1), l7 && l7.call(n5);
 258        };
 259      }), n4.children;
 260    } };
 261    return u5.Provider.__ = u5.Consumer.contextType = u5;
 262  }
 263  var n, l, u, t, i, o, r, f, e, c, s, a, h, v, p, y;
 264  var init_preact_module = __esm({
 265    "node_modules/preact/dist/preact.module.js"() {
 266      h = {};
 267      v = [];
 268      p = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
 269      y = Array.isArray;
 270      n = v.slice, l = { __e: function(n3, l6, u5, t5) {
 271        for (var i6, o4, r5; l6 = l6.__; ) if ((i6 = l6.__c) && !i6.__) try {
 272          if ((o4 = i6.constructor) && null != o4.getDerivedStateFromError && (i6.setState(o4.getDerivedStateFromError(n3)), r5 = i6.__d), null != i6.componentDidCatch && (i6.componentDidCatch(n3, t5 || {}), r5 = i6.__d), r5) return i6.__E = i6;
 273        } catch (l7) {
 274          n3 = l7;
 275        }
 276        throw n3;
 277      } }, u = 0, t = function(n3) {
 278        return null != n3 && null == n3.constructor;
 279      }, k.prototype.setState = function(n3, l6) {
 280        var u5;
 281        u5 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = d({}, this.state), "function" == typeof n3 && (n3 = n3(d({}, u5), this.props)), n3 && d(u5, n3), null != n3 && this.__v && (l6 && this._sb.push(l6), M(this));
 282      }, k.prototype.forceUpdate = function(n3) {
 283        this.__v && (this.__e = true, n3 && this.__h.push(n3), M(this));
 284      }, k.prototype.render = b, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f = function(n3, l6) {
 285        return n3.__v.__b - l6.__v.__b;
 286      }, P.__r = 0, e = 0, c = F(false), s = F(true), a = 0;
 287    }
 288  });
 289  
 290  // node_modules/preact/devtools/dist/devtools.module.js
 291  var i4;
 292  var init_devtools_module = __esm({
 293    "node_modules/preact/devtools/dist/devtools.module.js"() {
 294      init_preact_module();
 295      null != (i4 = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : void 0) && i4.__PREACT_DEVTOOLS__ && i4.__PREACT_DEVTOOLS__.attachPreact("10.24.2", l, { Fragment: b, Component: k });
 296    }
 297  });
 298  
 299  // node_modules/preact/debug/dist/debug.module.js
 300  var debug_module_exports = {};
 301  __export(debug_module_exports, {
 302    resetPropWarnings: () => r4
 303  });
 304  function r4() {
 305    t4 = {};
 306  }
 307  function a4(e4) {
 308    return e4.type === b ? "Fragment" : "function" == typeof e4.type ? e4.type.displayName || e4.type.name : "string" == typeof e4.type ? e4.type : "#text";
 309  }
 310  function c4() {
 311    return i5.length > 0 ? i5[i5.length - 1] : null;
 312  }
 313  function u4(e4) {
 314    return "function" == typeof e4.type && e4.type != b;
 315  }
 316  function f4(n3) {
 317    for (var e4 = [n3], o4 = n3; null != o4.__o; ) e4.push(o4.__o), o4 = o4.__o;
 318    return e4.reduce(function(n4, e5) {
 319      n4 += "  in " + a4(e5);
 320      var o5 = e5.__source;
 321      return o5 ? n4 += " (at " + o5.fileName + ":" + o5.lineNumber + ")" : l5 && console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."), l5 = false, n4 + "\n";
 322    }, "");
 323  }
 324  function p5(n3) {
 325    var e4 = [];
 326    return n3.__k ? (n3.__k.forEach(function(n4) {
 327      n4 && "function" == typeof n4.type ? e4.push.apply(e4, p5(n4)) : n4 && "string" == typeof n4.type && e4.push(n4.type);
 328    }), e4) : e4;
 329  }
 330  function h4(n3) {
 331    return n3 ? "function" == typeof n3.type ? null == n3.__ ? null != n3.__e && null != n3.__e.parentNode ? n3.__e.parentNode.localName : "" : h4(n3.__) : n3.type : "";
 332  }
 333  function y4(n3) {
 334    return "table" === n3 || "tfoot" === n3 || "tbody" === n3 || "thead" === n3 || "td" === n3 || "tr" === n3 || "th" === n3;
 335  }
 336  function w4(n3) {
 337    var e4 = n3.props, o4 = a4(n3), t5 = "";
 338    for (var r5 in e4) if (e4.hasOwnProperty(r5) && "children" !== r5) {
 339      var i6 = e4[r5];
 340      "function" == typeof i6 && (i6 = "function " + (i6.displayName || i6.name) + "() {}"), i6 = Object(i6) !== i6 || i6.toString ? i6 + "" : Object.prototype.toString.call(i6), t5 += " " + r5 + "=" + JSON.stringify(i6);
 341    }
 342    var s6 = e4.children;
 343    return "<" + o4 + t5 + (s6 && s6.length ? ">..</" + o4 + ">" : " />");
 344  }
 345  var t4, i5, s5, l5, d5, v5, m2, b3;
 346  var init_debug_module = __esm({
 347    "node_modules/preact/debug/dist/debug.module.js"() {
 348      init_preact_module();
 349      init_devtools_module();
 350      t4 = {};
 351      i5 = [];
 352      s5 = [];
 353      l5 = true;
 354      d5 = "function" == typeof WeakMap;
 355      v5 = k.prototype.setState;
 356      k.prototype.setState = function(n3, e4) {
 357        return null == this.__v && null == this.state && console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n' + f4(c4())), v5.call(this, n3, e4);
 358      };
 359      m2 = /^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/;
 360      b3 = k.prototype.forceUpdate;
 361      k.prototype.forceUpdate = function(n3) {
 362        return null == this.__v ? console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n' + f4(c4())) : null == this.__P && console.warn(`Can't call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
 363  
 364  ` + f4(this.__v)), b3.call(this, n3);
 365      }, l.__m = function(n3, e4) {
 366        var o4 = n3.type, t5 = e4.map(function(n4) {
 367          return n4 && n4.localName;
 368        }).filter(Boolean);
 369        console.error("Expected a DOM node of type " + o4 + " but found " + t5.join(", ") + "as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n" + f4(n3));
 370      }, (function() {
 371        !(function() {
 372          var n4 = l.__b, o5 = l.diffed, t5 = l.__, r6 = l.vnode, a5 = l.__r;
 373          l.diffed = function(n5) {
 374            u4(n5) && s5.pop(), i5.pop(), o5 && o5(n5);
 375          }, l.__b = function(e4) {
 376            u4(e4) && i5.push(e4), n4 && n4(e4);
 377          }, l.__ = function(n5, e4) {
 378            s5 = [], t5 && t5(n5, e4);
 379          }, l.vnode = function(n5) {
 380            n5.__o = s5.length > 0 ? s5[s5.length - 1] : null, r6 && r6(n5);
 381          }, l.__r = function(n5) {
 382            u4(n5) && s5.push(n5), a5 && a5(n5);
 383          };
 384        })();
 385        var n3 = false, o4 = l.__b, r5 = l.diffed, c5 = l.vnode, l6 = l.__r, v6 = l.__e, b4 = l.__, g3 = l.__h, E3 = d5 ? { useEffect: /* @__PURE__ */ new WeakMap(), useLayoutEffect: /* @__PURE__ */ new WeakMap(), lazyPropTypes: /* @__PURE__ */ new WeakMap() } : null, k3 = [];
 386        l.__e = function(n4, e4, o5, t5) {
 387          if (e4 && e4.__c && "function" == typeof n4.then) {
 388            var r6 = n4;
 389            n4 = new Error("Missing Suspense. The throwing component was: " + a4(e4));
 390            for (var i6 = e4; i6; i6 = i6.__) if (i6.__c && i6.__c.__c) {
 391              n4 = r6;
 392              break;
 393            }
 394            if (n4 instanceof Error) throw n4;
 395          }
 396          try {
 397            (t5 = t5 || {}).componentStack = f4(e4), v6(n4, e4, o5, t5), "function" != typeof n4.then && setTimeout(function() {
 398              throw n4;
 399            });
 400          } catch (n5) {
 401            throw n5;
 402          }
 403        }, l.__ = function(n4, e4) {
 404          if (!e4) throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");
 405          var o5;
 406          switch (e4.nodeType) {
 407            case 1:
 408            case 11:
 409            case 9:
 410              o5 = true;
 411              break;
 412            default:
 413              o5 = false;
 414          }
 415          if (!o5) {
 416            var t5 = a4(n4);
 417            throw new Error("Expected a valid HTML node as a second argument to render.    Received " + e4 + " instead: render(<" + t5 + " />, " + e4 + ");");
 418          }
 419          b4 && b4(n4, e4);
 420        }, l.__b = function(e4) {
 421          var r6 = e4.type;
 422          if (n3 = true, void 0 === r6) throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports" + w4(e4) + "\n\n" + f4(e4));
 423          if (null != r6 && "object" == typeof r6) {
 424            if (void 0 !== r6.__k && void 0 !== r6.__e) throw new Error("Invalid type passed to createElement(): " + r6 + "\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n  let My" + a4(e4) + " = " + w4(r6) + ";\n  let vnode = <My" + a4(e4) + " />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n" + f4(e4));
 425            throw new Error("Invalid type passed to createElement(): " + (Array.isArray(r6) ? "array" : r6));
 426          }
 427          if (void 0 !== e4.ref && "function" != typeof e4.ref && "object" != typeof e4.ref && !("$$typeof" in e4)) throw new Error(`Component's "ref" property should be a function, or an object created by createRef(), but got [` + typeof e4.ref + "] instead\n" + w4(e4) + "\n\n" + f4(e4));
 428          if ("string" == typeof e4.type) {
 429            for (var i6 in e4.props) if ("o" === i6[0] && "n" === i6[1] && "function" != typeof e4.props[i6] && null != e4.props[i6]) throw new Error(`Component's "` + i6 + '" property should be a function, but got [' + typeof e4.props[i6] + "] instead\n" + w4(e4) + "\n\n" + f4(e4));
 430          }
 431          if ("function" == typeof e4.type && e4.type.propTypes) {
 432            if ("Lazy" === e4.type.displayName && E3 && !E3.lazyPropTypes.has(e4.type)) {
 433              var s6 = "PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";
 434              try {
 435                var c6 = e4.type();
 436                E3.lazyPropTypes.set(e4.type, true), console.warn(s6 + "Component wrapped in lazy() is " + a4(c6));
 437              } catch (n4) {
 438                console.warn(s6 + "We will log the wrapped component's name once it is loaded.");
 439              }
 440            }
 441            var l7 = e4.props;
 442            e4.type.__f && delete (l7 = (function(n4, e5) {
 443              for (var o5 in e5) n4[o5] = e5[o5];
 444              return n4;
 445            })({}, l7)).ref, (function(n4, e5, o5, r7, a5) {
 446              Object.keys(n4).forEach(function(o6) {
 447                var i7;
 448                try {
 449                  i7 = n4[o6](e5, o6, r7, "prop", null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
 450                } catch (n5) {
 451                  i7 = n5;
 452                }
 453                i7 && !(i7.message in t4) && (t4[i7.message] = true, console.error("Failed prop type: " + i7.message + (a5 && "\n" + a5() || "")));
 454              });
 455            })(e4.type.propTypes, l7, 0, a4(e4), function() {
 456              return f4(e4);
 457            });
 458          }
 459          o4 && o4(e4);
 460        };
 461        var T3, _5 = 0;
 462        l.__r = function(e4) {
 463          l6 && l6(e4), n3 = true;
 464          var o5 = e4.__c;
 465          if (o5 === T3 ? _5++ : _5 = 1, _5 >= 25) throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: " + a4(e4));
 466          T3 = o5;
 467        }, l.__h = function(e4, o5, t5) {
 468          if (!e4 || !n3) throw new Error("Hook can only be invoked from render methods.");
 469          g3 && g3(e4, o5, t5);
 470        };
 471        var O2 = function(n4, e4) {
 472          return { get: function() {
 473            var o5 = "get" + n4 + e4;
 474            k3 && k3.indexOf(o5) < 0 && (k3.push(o5), console.warn("getting vnode." + n4 + " is deprecated, " + e4));
 475          }, set: function() {
 476            var o5 = "set" + n4 + e4;
 477            k3 && k3.indexOf(o5) < 0 && (k3.push(o5), console.warn("setting vnode." + n4 + " is not allowed, " + e4));
 478          } };
 479        }, I2 = { nodeName: O2("nodeName", "use vnode.type"), attributes: O2("attributes", "use vnode.props"), children: O2("children", "use vnode.props.children") }, M2 = Object.create({}, I2);
 480        l.vnode = function(n4) {
 481          var e4 = n4.props;
 482          if (null !== n4.type && null != e4 && ("__source" in e4 || "__self" in e4)) {
 483            var o5 = n4.props = {};
 484            for (var t5 in e4) {
 485              var r6 = e4[t5];
 486              "__source" === t5 ? n4.__source = r6 : "__self" === t5 ? n4.__self = r6 : o5[t5] = r6;
 487            }
 488          }
 489          n4.__proto__ = M2, c5 && c5(n4);
 490        }, l.diffed = function(e4) {
 491          var o5, t5 = e4.type, i6 = e4.__;
 492          if (e4.__k && e4.__k.forEach(function(n4) {
 493            if ("object" == typeof n4 && n4 && void 0 === n4.type) {
 494              var o6 = Object.keys(n4).join(",");
 495              throw new Error("Objects are not valid as a child. Encountered an object with the keys {" + o6 + "}.\n\n" + f4(e4));
 496            }
 497          }), e4.__c === T3 && (_5 = 0), "string" == typeof t5 && (y4(t5) || "p" === t5 || "a" === t5 || "button" === t5)) {
 498            var s6 = h4(i6);
 499            if ("" !== s6 && y4(t5)) "table" === t5 && "td" !== s6 && y4(s6) ? (console.log(s6, i6.__e), console.error("Improper nesting of table. Your <table> should not have a table-node parent." + w4(e4) + "\n\n" + f4(e4))) : "thead" !== t5 && "tfoot" !== t5 && "tbody" !== t5 || "table" === s6 ? "tr" === t5 && "thead" !== s6 && "tfoot" !== s6 && "tbody" !== s6 ? console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent." + w4(e4) + "\n\n" + f4(e4)) : "td" === t5 && "tr" !== s6 ? console.error("Improper nesting of table. Your <td> should have a <tr> parent." + w4(e4) + "\n\n" + f4(e4)) : "th" === t5 && "tr" !== s6 && console.error("Improper nesting of table. Your <th> should have a <tr>." + w4(e4) + "\n\n" + f4(e4)) : console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent." + w4(e4) + "\n\n" + f4(e4));
 500            else if ("p" === t5) {
 501              var c6 = p5(e4).filter(function(n4) {
 502                return m2.test(n4);
 503              });
 504              c6.length && console.error("Improper nesting of paragraph. Your <p> should not have " + c6.join(", ") + "as child-elements." + w4(e4) + "\n\n" + f4(e4));
 505            } else "a" !== t5 && "button" !== t5 || -1 !== p5(e4).indexOf(t5) && console.error("Improper nesting of interactive content. Your <" + t5 + "> should not have other " + ("a" === t5 ? "anchor" : "button") + " tags as child-elements." + w4(e4) + "\n\n" + f4(e4));
 506          }
 507          if (n3 = false, r5 && r5(e4), null != e4.__k) for (var l7 = [], u5 = 0; u5 < e4.__k.length; u5++) {
 508            var d6 = e4.__k[u5];
 509            if (d6 && null != d6.key) {
 510              var v7 = d6.key;
 511              if (-1 !== l7.indexOf(v7)) {
 512                console.error('Following component has two or more children with the same key attribute: "' + v7 + '". This may cause glitches and misbehavior in rendering process. Component: \n\n' + w4(e4) + "\n\n" + f4(e4));
 513                break;
 514              }
 515              l7.push(v7);
 516            }
 517          }
 518          if (null != e4.__c && null != e4.__c.__H) {
 519            var b5 = e4.__c.__H.__;
 520            if (b5) for (var g4 = 0; g4 < b5.length; g4 += 1) {
 521              var E4 = b5[g4];
 522              if (E4.__H) {
 523                for (var k4 = 0; k4 < E4.__H.length; k4++) if ((o5 = E4.__H[k4]) != o5) {
 524                  var O3 = a4(e4);
 525                  throw new Error("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index " + g4 + " in component " + O3 + " was called with NaN.");
 526                }
 527              }
 528            }
 529          }
 530        };
 531      })();
 532    }
 533  });
 534  
 535  // packages/interactivity/build-module/index.js
 536  init_preact_module();
 537  
 538  // node_modules/@preact/signals/dist/signals.module.js
 539  init_preact_module();
 540  
 541  // node_modules/preact/hooks/dist/hooks.module.js
 542  init_preact_module();
 543  var t2;
 544  var r2;
 545  var u2;
 546  var i2;
 547  var o2 = 0;
 548  var f2 = [];
 549  var c2 = l;
 550  var e2 = c2.__b;
 551  var a2 = c2.__r;
 552  var v2 = c2.diffed;
 553  var l2 = c2.__c;
 554  var m = c2.unmount;
 555  var s2 = c2.__;
 556  function d2(n3, t5) {
 557    c2.__h && c2.__h(r2, n3, o2 || t5), o2 = 0;
 558    var u5 = r2.__H || (r2.__H = { __: [], __h: [] });
 559    return n3 >= u5.__.length && u5.__.push({}), u5.__[n3];
 560  }
 561  function h2(n3) {
 562    return o2 = 1, p2(D2, n3);
 563  }
 564  function p2(n3, u5, i6) {
 565    var o4 = d2(t2++, 2);
 566    if (o4.t = n3, !o4.__c && (o4.__ = [i6 ? i6(u5) : D2(void 0, u5), function(n4) {
 567      var t5 = o4.__N ? o4.__N[0] : o4.__[0], r5 = o4.t(t5, n4);
 568      t5 !== r5 && (o4.__N = [r5, o4.__[1]], o4.__c.setState({}));
 569    }], o4.__c = r2, !r2.u)) {
 570      var f5 = function(n4, t5, r5) {
 571        if (!o4.__c.__H) return true;
 572        var u6 = o4.__c.__H.__.filter(function(n5) {
 573          return !!n5.__c;
 574        });
 575        if (u6.every(function(n5) {
 576          return !n5.__N;
 577        })) return !c5 || c5.call(this, n4, t5, r5);
 578        var i7 = false;
 579        return u6.forEach(function(n5) {
 580          if (n5.__N) {
 581            var t6 = n5.__[0];
 582            n5.__ = n5.__N, n5.__N = void 0, t6 !== n5.__[0] && (i7 = true);
 583          }
 584        }), !(!i7 && o4.__c.props === n4) && (!c5 || c5.call(this, n4, t5, r5));
 585      };
 586      r2.u = true;
 587      var c5 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
 588      r2.componentWillUpdate = function(n4, t5, r5) {
 589        if (this.__e) {
 590          var u6 = c5;
 591          c5 = void 0, f5(n4, t5, r5), c5 = u6;
 592        }
 593        e4 && e4.call(this, n4, t5, r5);
 594      }, r2.shouldComponentUpdate = f5;
 595    }
 596    return o4.__N || o4.__;
 597  }
 598  function y2(n3, u5) {
 599    var i6 = d2(t2++, 3);
 600    !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.i = u5, r2.__H.__h.push(i6));
 601  }
 602  function _2(n3, u5) {
 603    var i6 = d2(t2++, 4);
 604    !c2.__s && C2(i6.__H, u5) && (i6.__ = n3, i6.i = u5, r2.__h.push(i6));
 605  }
 606  function A2(n3) {
 607    return o2 = 5, T2(function() {
 608      return { current: n3 };
 609    }, []);
 610  }
 611  function T2(n3, r5) {
 612    var u5 = d2(t2++, 7);
 613    return C2(u5.__H, r5) && (u5.__ = n3(), u5.__H = r5, u5.__h = n3), u5.__;
 614  }
 615  function q2(n3, t5) {
 616    return o2 = 8, T2(function() {
 617      return n3;
 618    }, t5);
 619  }
 620  function x2(n3) {
 621    var u5 = r2.context[n3.__c], i6 = d2(t2++, 9);
 622    return i6.c = n3, u5 ? (null == i6.__ && (i6.__ = true, u5.sub(r2)), u5.props.value) : n3.__;
 623  }
 624  function j2() {
 625    for (var n3; n3 = f2.shift(); ) if (n3.__P && n3.__H) try {
 626      n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
 627    } catch (t5) {
 628      n3.__H.__h = [], c2.__e(t5, n3.__v);
 629    }
 630  }
 631  c2.__b = function(n3) {
 632    r2 = null, e2 && e2(n3);
 633  }, c2.__ = function(n3, t5) {
 634    n3 && t5.__k && t5.__k.__m && (n3.__m = t5.__k.__m), s2 && s2(n3, t5);
 635  }, c2.__r = function(n3) {
 636    a2 && a2(n3), t2 = 0;
 637    var i6 = (r2 = n3.__c).__H;
 638    i6 && (u2 === r2 ? (i6.__h = [], r2.__h = [], i6.__.forEach(function(n4) {
 639      n4.__N && (n4.__ = n4.__N), n4.i = n4.__N = void 0;
 640    })) : (i6.__h.forEach(z2), i6.__h.forEach(B2), i6.__h = [], t2 = 0)), u2 = r2;
 641  }, c2.diffed = function(n3) {
 642    v2 && v2(n3);
 643    var t5 = n3.__c;
 644    t5 && t5.__H && (t5.__H.__h.length && (1 !== f2.push(t5) && i2 === c2.requestAnimationFrame || ((i2 = c2.requestAnimationFrame) || w2)(j2)), t5.__H.__.forEach(function(n4) {
 645      n4.i && (n4.__H = n4.i), n4.i = void 0;
 646    })), u2 = r2 = null;
 647  }, c2.__c = function(n3, t5) {
 648    t5.some(function(n4) {
 649      try {
 650        n4.__h.forEach(z2), n4.__h = n4.__h.filter(function(n5) {
 651          return !n5.__ || B2(n5);
 652        });
 653      } catch (r5) {
 654        t5.some(function(n5) {
 655          n5.__h && (n5.__h = []);
 656        }), t5 = [], c2.__e(r5, n4.__v);
 657      }
 658    }), l2 && l2(n3, t5);
 659  }, c2.unmount = function(n3) {
 660    m && m(n3);
 661    var t5, r5 = n3.__c;
 662    r5 && r5.__H && (r5.__H.__.forEach(function(n4) {
 663      try {
 664        z2(n4);
 665      } catch (n5) {
 666        t5 = n5;
 667      }
 668    }), r5.__H = void 0, t5 && c2.__e(t5, r5.__v));
 669  };
 670  var k2 = "function" == typeof requestAnimationFrame;
 671  function w2(n3) {
 672    var t5, r5 = function() {
 673      clearTimeout(u5), k2 && cancelAnimationFrame(t5), setTimeout(n3);
 674    }, u5 = setTimeout(r5, 100);
 675    k2 && (t5 = requestAnimationFrame(r5));
 676  }
 677  function z2(n3) {
 678    var t5 = r2, u5 = n3.__c;
 679    "function" == typeof u5 && (n3.__c = void 0, u5()), r2 = t5;
 680  }
 681  function B2(n3) {
 682    var t5 = r2;
 683    n3.__c = n3.__(), r2 = t5;
 684  }
 685  function C2(n3, t5) {
 686    return !n3 || n3.length !== t5.length || t5.some(function(t6, r5) {
 687      return t6 !== n3[r5];
 688    });
 689  }
 690  function D2(n3, t5) {
 691    return "function" == typeof t5 ? t5(n3) : t5;
 692  }
 693  
 694  // node_modules/@preact/signals-core/dist/signals-core.module.js
 695  var i3 = Symbol.for("preact-signals");
 696  function t3() {
 697    if (!(s3 > 1)) {
 698      var i6, t5 = false;
 699      while (void 0 !== h3) {
 700        var r5 = h3;
 701        h3 = void 0;
 702        f3++;
 703        while (void 0 !== r5) {
 704          var o4 = r5.o;
 705          r5.o = void 0;
 706          r5.f &= -3;
 707          if (!(8 & r5.f) && c3(r5)) try {
 708            r5.c();
 709          } catch (r6) {
 710            if (!t5) {
 711              i6 = r6;
 712              t5 = true;
 713            }
 714          }
 715          r5 = o4;
 716        }
 717      }
 718      f3 = 0;
 719      s3--;
 720      if (t5) throw i6;
 721    } else s3--;
 722  }
 723  function r3(i6) {
 724    if (s3 > 0) return i6();
 725    s3++;
 726    try {
 727      return i6();
 728    } finally {
 729      t3();
 730    }
 731  }
 732  var o3 = void 0;
 733  var h3 = void 0;
 734  var s3 = 0;
 735  var f3 = 0;
 736  var v3 = 0;
 737  function e3(i6) {
 738    if (void 0 !== o3) {
 739      var t5 = i6.n;
 740      if (void 0 === t5 || t5.t !== o3) {
 741        t5 = { i: 0, S: i6, p: o3.s, n: void 0, t: o3, e: void 0, x: void 0, r: t5 };
 742        if (void 0 !== o3.s) o3.s.n = t5;
 743        o3.s = t5;
 744        i6.n = t5;
 745        if (32 & o3.f) i6.S(t5);
 746        return t5;
 747      } else if (-1 === t5.i) {
 748        t5.i = 0;
 749        if (void 0 !== t5.n) {
 750          t5.n.p = t5.p;
 751          if (void 0 !== t5.p) t5.p.n = t5.n;
 752          t5.p = o3.s;
 753          t5.n = void 0;
 754          o3.s.n = t5;
 755          o3.s = t5;
 756        }
 757        return t5;
 758      }
 759    }
 760  }
 761  function u3(i6) {
 762    this.v = i6;
 763    this.i = 0;
 764    this.n = void 0;
 765    this.t = void 0;
 766  }
 767  u3.prototype.brand = i3;
 768  u3.prototype.h = function() {
 769    return true;
 770  };
 771  u3.prototype.S = function(i6) {
 772    if (this.t !== i6 && void 0 === i6.e) {
 773      i6.x = this.t;
 774      if (void 0 !== this.t) this.t.e = i6;
 775      this.t = i6;
 776    }
 777  };
 778  u3.prototype.U = function(i6) {
 779    if (void 0 !== this.t) {
 780      var t5 = i6.e, r5 = i6.x;
 781      if (void 0 !== t5) {
 782        t5.x = r5;
 783        i6.e = void 0;
 784      }
 785      if (void 0 !== r5) {
 786        r5.e = t5;
 787        i6.x = void 0;
 788      }
 789      if (i6 === this.t) this.t = r5;
 790    }
 791  };
 792  u3.prototype.subscribe = function(i6) {
 793    var t5 = this;
 794    return E2(function() {
 795      var r5 = t5.value, n3 = o3;
 796      o3 = void 0;
 797      try {
 798        i6(r5);
 799      } finally {
 800        o3 = n3;
 801      }
 802    });
 803  };
 804  u3.prototype.valueOf = function() {
 805    return this.value;
 806  };
 807  u3.prototype.toString = function() {
 808    return this.value + "";
 809  };
 810  u3.prototype.toJSON = function() {
 811    return this.value;
 812  };
 813  u3.prototype.peek = function() {
 814    var i6 = o3;
 815    o3 = void 0;
 816    try {
 817      return this.value;
 818    } finally {
 819      o3 = i6;
 820    }
 821  };
 822  Object.defineProperty(u3.prototype, "value", { get: function() {
 823    var i6 = e3(this);
 824    if (void 0 !== i6) i6.i = this.i;
 825    return this.v;
 826  }, set: function(i6) {
 827    if (i6 !== this.v) {
 828      if (f3 > 100) throw new Error("Cycle detected");
 829      this.v = i6;
 830      this.i++;
 831      v3++;
 832      s3++;
 833      try {
 834        for (var r5 = this.t; void 0 !== r5; r5 = r5.x) r5.t.N();
 835      } finally {
 836        t3();
 837      }
 838    }
 839  } });
 840  function d3(i6) {
 841    return new u3(i6);
 842  }
 843  function c3(i6) {
 844    for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) if (t5.S.i !== t5.i || !t5.S.h() || t5.S.i !== t5.i) return true;
 845    return false;
 846  }
 847  function a3(i6) {
 848    for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) {
 849      var r5 = t5.S.n;
 850      if (void 0 !== r5) t5.r = r5;
 851      t5.S.n = t5;
 852      t5.i = -1;
 853      if (void 0 === t5.n) {
 854        i6.s = t5;
 855        break;
 856      }
 857    }
 858  }
 859  function l3(i6) {
 860    var t5 = i6.s, r5 = void 0;
 861    while (void 0 !== t5) {
 862      var o4 = t5.p;
 863      if (-1 === t5.i) {
 864        t5.S.U(t5);
 865        if (void 0 !== o4) o4.n = t5.n;
 866        if (void 0 !== t5.n) t5.n.p = o4;
 867      } else r5 = t5;
 868      t5.S.n = t5.r;
 869      if (void 0 !== t5.r) t5.r = void 0;
 870      t5 = o4;
 871    }
 872    i6.s = r5;
 873  }
 874  function y3(i6) {
 875    u3.call(this, void 0);
 876    this.x = i6;
 877    this.s = void 0;
 878    this.g = v3 - 1;
 879    this.f = 4;
 880  }
 881  (y3.prototype = new u3()).h = function() {
 882    this.f &= -3;
 883    if (1 & this.f) return false;
 884    if (32 == (36 & this.f)) return true;
 885    this.f &= -5;
 886    if (this.g === v3) return true;
 887    this.g = v3;
 888    this.f |= 1;
 889    if (this.i > 0 && !c3(this)) {
 890      this.f &= -2;
 891      return true;
 892    }
 893    var i6 = o3;
 894    try {
 895      a3(this);
 896      o3 = this;
 897      var t5 = this.x();
 898      if (16 & this.f || this.v !== t5 || 0 === this.i) {
 899        this.v = t5;
 900        this.f &= -17;
 901        this.i++;
 902      }
 903    } catch (i7) {
 904      this.v = i7;
 905      this.f |= 16;
 906      this.i++;
 907    }
 908    o3 = i6;
 909    l3(this);
 910    this.f &= -2;
 911    return true;
 912  };
 913  y3.prototype.S = function(i6) {
 914    if (void 0 === this.t) {
 915      this.f |= 36;
 916      for (var t5 = this.s; void 0 !== t5; t5 = t5.n) t5.S.S(t5);
 917    }
 918    u3.prototype.S.call(this, i6);
 919  };
 920  y3.prototype.U = function(i6) {
 921    if (void 0 !== this.t) {
 922      u3.prototype.U.call(this, i6);
 923      if (void 0 === this.t) {
 924        this.f &= -33;
 925        for (var t5 = this.s; void 0 !== t5; t5 = t5.n) t5.S.U(t5);
 926      }
 927    }
 928  };
 929  y3.prototype.N = function() {
 930    if (!(2 & this.f)) {
 931      this.f |= 6;
 932      for (var i6 = this.t; void 0 !== i6; i6 = i6.x) i6.t.N();
 933    }
 934  };
 935  Object.defineProperty(y3.prototype, "value", { get: function() {
 936    if (1 & this.f) throw new Error("Cycle detected");
 937    var i6 = e3(this);
 938    this.h();
 939    if (void 0 !== i6) i6.i = this.i;
 940    if (16 & this.f) throw this.v;
 941    return this.v;
 942  } });
 943  function w3(i6) {
 944    return new y3(i6);
 945  }
 946  function _3(i6) {
 947    var r5 = i6.u;
 948    i6.u = void 0;
 949    if ("function" == typeof r5) {
 950      s3++;
 951      var n3 = o3;
 952      o3 = void 0;
 953      try {
 954        r5();
 955      } catch (t5) {
 956        i6.f &= -2;
 957        i6.f |= 8;
 958        g2(i6);
 959        throw t5;
 960      } finally {
 961        o3 = n3;
 962        t3();
 963      }
 964    }
 965  }
 966  function g2(i6) {
 967    for (var t5 = i6.s; void 0 !== t5; t5 = t5.n) t5.S.U(t5);
 968    i6.x = void 0;
 969    i6.s = void 0;
 970    _3(i6);
 971  }
 972  function p3(i6) {
 973    if (o3 !== this) throw new Error("Out-of-order effect");
 974    l3(this);
 975    o3 = i6;
 976    this.f &= -2;
 977    if (8 & this.f) g2(this);
 978    t3();
 979  }
 980  function b2(i6) {
 981    this.x = i6;
 982    this.u = void 0;
 983    this.s = void 0;
 984    this.o = void 0;
 985    this.f = 32;
 986  }
 987  b2.prototype.c = function() {
 988    var i6 = this.S();
 989    try {
 990      if (8 & this.f) return;
 991      if (void 0 === this.x) return;
 992      var t5 = this.x();
 993      if ("function" == typeof t5) this.u = t5;
 994    } finally {
 995      i6();
 996    }
 997  };
 998  b2.prototype.S = function() {
 999    if (1 & this.f) throw new Error("Cycle detected");
1000    this.f |= 1;
1001    this.f &= -9;
1002    _3(this);
1003    a3(this);
1004    s3++;
1005    var i6 = o3;
1006    o3 = this;
1007    return p3.bind(this, i6);
1008  };
1009  b2.prototype.N = function() {
1010    if (!(2 & this.f)) {
1011      this.f |= 2;
1012      this.o = h3;
1013      h3 = this;
1014    }
1015  };
1016  b2.prototype.d = function() {
1017    this.f |= 8;
1018    if (!(1 & this.f)) g2(this);
1019  };
1020  function E2(i6) {
1021    var t5 = new b2(i6);
1022    try {
1023      t5.c();
1024    } catch (i7) {
1025      t5.d();
1026      throw i7;
1027    }
1028    return t5.d.bind(t5);
1029  }
1030  
1031  // node_modules/@preact/signals/dist/signals.module.js
1032  var v4;
1033  var s4;
1034  function l4(n3, i6) {
1035    l[n3] = i6.bind(null, l[n3] || function() {
1036    });
1037  }
1038  function d4(n3) {
1039    if (s4) s4();
1040    s4 = n3 && n3.S();
1041  }
1042  function p4(n3) {
1043    var r5 = this, f5 = n3.data, o4 = useSignal(f5);
1044    o4.value = f5;
1045    var e4 = T2(function() {
1046      var n4 = r5.__v;
1047      while (n4 = n4.__) if (n4.__c) {
1048        n4.__c.__$f |= 4;
1049        break;
1050      }
1051      r5.__$u.c = function() {
1052        var n5;
1053        if (!t(e4.peek()) && 3 === (null == (n5 = r5.base) ? void 0 : n5.nodeType)) r5.base.data = e4.peek();
1054        else {
1055          r5.__$f |= 1;
1056          r5.setState({});
1057        }
1058      };
1059      return w3(function() {
1060        var n5 = o4.value.value;
1061        return 0 === n5 ? 0 : true === n5 ? "" : n5 || "";
1062      });
1063    }, []);
1064    return e4.value;
1065  }
1066  p4.displayName = "_st";
1067  Object.defineProperties(u3.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: p4 }, props: { configurable: true, get: function() {
1068    return { data: this };
1069  } }, __b: { configurable: true, value: 1 } });
1070  l4("__b", function(n3, r5) {
1071    if ("string" == typeof r5.type) {
1072      var i6, t5 = r5.props;
1073      for (var f5 in t5) if ("children" !== f5) {
1074        var o4 = t5[f5];
1075        if (o4 instanceof u3) {
1076          if (!i6) r5.__np = i6 = {};
1077          i6[f5] = o4;
1078          t5[f5] = o4.peek();
1079        }
1080      }
1081    }
1082    n3(r5);
1083  });
1084  l4("__r", function(n3, r5) {
1085    d4();
1086    var i6, t5 = r5.__c;
1087    if (t5) {
1088      t5.__$f &= -2;
1089      if (void 0 === (i6 = t5.__$u)) t5.__$u = i6 = (function(n4) {
1090        var r6;
1091        E2(function() {
1092          r6 = this;
1093        });
1094        r6.c = function() {
1095          t5.__$f |= 1;
1096          t5.setState({});
1097        };
1098        return r6;
1099      })();
1100    }
1101    v4 = t5;
1102    d4(i6);
1103    n3(r5);
1104  });
1105  l4("__e", function(n3, r5, i6, t5) {
1106    d4();
1107    v4 = void 0;
1108    n3(r5, i6, t5);
1109  });
1110  l4("diffed", function(n3, r5) {
1111    d4();
1112    v4 = void 0;
1113    var i6;
1114    if ("string" == typeof r5.type && (i6 = r5.__e)) {
1115      var t5 = r5.__np, f5 = r5.props;
1116      if (t5) {
1117        var o4 = i6.U;
1118        if (o4) for (var e4 in o4) {
1119          var u5 = o4[e4];
1120          if (void 0 !== u5 && !(e4 in t5)) {
1121            u5.d();
1122            o4[e4] = void 0;
1123          }
1124        }
1125        else i6.U = o4 = {};
1126        for (var a5 in t5) {
1127          var c5 = o4[a5], s6 = t5[a5];
1128          if (void 0 === c5) {
1129            c5 = _4(i6, a5, s6, f5);
1130            o4[a5] = c5;
1131          } else c5.o(s6, f5);
1132        }
1133      }
1134    }
1135    n3(r5);
1136  });
1137  function _4(n3, r5, i6, t5) {
1138    var f5 = r5 in n3 && void 0 === n3.ownerSVGElement, o4 = d3(i6);
1139    return { o: function(n4, r6) {
1140      o4.value = n4;
1141      t5 = r6;
1142    }, d: E2(function() {
1143      var i7 = o4.value.value;
1144      if (t5[r5] !== i7) {
1145        t5[r5] = i7;
1146        if (f5) n3[r5] = i7;
1147        else if (i7) n3.setAttribute(r5, i7);
1148        else n3.removeAttribute(r5);
1149      }
1150    }) };
1151  }
1152  l4("unmount", function(n3, r5) {
1153    if ("string" == typeof r5.type) {
1154      var i6 = r5.__e;
1155      if (i6) {
1156        var t5 = i6.U;
1157        if (t5) {
1158          i6.U = void 0;
1159          for (var f5 in t5) {
1160            var o4 = t5[f5];
1161            if (o4) o4.d();
1162          }
1163        }
1164      }
1165    } else {
1166      var e4 = r5.__c;
1167      if (e4) {
1168        var u5 = e4.__$u;
1169        if (u5) {
1170          e4.__$u = void 0;
1171          u5.d();
1172        }
1173      }
1174    }
1175    n3(r5);
1176  });
1177  l4("__h", function(n3, r5, i6, t5) {
1178    if (t5 < 3 || 9 === t5) r5.__$f |= 2;
1179    n3(r5, i6, t5);
1180  });
1181  k.prototype.shouldComponentUpdate = function(n3, r5) {
1182    var i6 = this.__$u;
1183    if (!(i6 && void 0 !== i6.s || 4 & this.__$f)) return true;
1184    if (3 & this.__$f) return true;
1185    for (var t5 in r5) return true;
1186    for (var f5 in n3) if ("__source" !== f5 && n3[f5] !== this.props[f5]) return true;
1187    for (var o4 in this.props) if (!(o4 in n3)) return true;
1188    return false;
1189  };
1190  function useSignal(n3) {
1191    return T2(function() {
1192      return d3(n3);
1193    }, []);
1194  }
1195  
1196  // packages/interactivity/build-module/directives.js
1197  init_preact_module();
1198  
1199  // packages/interactivity/build-module/namespaces.js
1200  var namespaceStack = [];
1201  var getNamespace = () => namespaceStack.slice(-1)[0];
1202  var setNamespace = (namespace) => {
1203    namespaceStack.push(namespace);
1204  };
1205  var resetNamespace = () => {
1206    namespaceStack.pop();
1207  };
1208  
1209  // packages/interactivity/build-module/scopes.js
1210  var scopeStack = [];
1211  var getScope = () => scopeStack.slice(-1)[0];
1212  var setScope = (scope) => {
1213    scopeStack.push(scope);
1214  };
1215  var resetScope = () => {
1216    scopeStack.pop();
1217  };
1218  var throwNotInScope = (method) => {
1219    throw Error(
1220      `Cannot call \`$method}()\` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like \`setTimeout\`, please wrap the callback with \`withScope(callback)\`.`
1221    );
1222  };
1223  var getContext = (namespace) => {
1224    const scope = getScope();
1225    if (true) {
1226      if (!scope) {
1227        throwNotInScope("getContext");
1228      }
1229    }
1230    return scope.context[namespace || getNamespace()];
1231  };
1232  var getElement = () => {
1233    const scope = getScope();
1234    let deepReadOnlyOptions = {};
1235    if (true) {
1236      if (!scope) {
1237        throwNotInScope("getElement");
1238      }
1239      deepReadOnlyOptions = {
1240        errorMessage: "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead."
1241      };
1242    }
1243    const { ref, attributes } = scope;
1244    return Object.freeze({
1245      ref: ref.current,
1246      attributes: deepReadOnly(attributes, deepReadOnlyOptions)
1247    });
1248  };
1249  var navigationContextSignal = d3(0);
1250  function getServerContext(namespace) {
1251    const scope = getScope();
1252    if (true) {
1253      if (!scope) {
1254        throwNotInScope("getServerContext");
1255      }
1256    }
1257    getServerContext.subscribe = navigationContextSignal.value;
1258    return deepClone(scope.serverContext[namespace || getNamespace()]);
1259  }
1260  getServerContext.subscribe = 0;
1261  
1262  // packages/interactivity/build-module/utils.js
1263  var afterNextFrame = (callback) => {
1264    return new Promise((resolve2) => {
1265      const done = () => {
1266        clearTimeout(timeout);
1267        window.cancelAnimationFrame(raf);
1268        setTimeout(() => {
1269          callback();
1270          resolve2();
1271        });
1272      };
1273      const timeout = setTimeout(done, 100);
1274      const raf = window.requestAnimationFrame(done);
1275    });
1276  };
1277  var splitTask = typeof window.scheduler?.yield === "function" ? window.scheduler.yield.bind(window.scheduler) : () => {
1278    return new Promise((resolve2) => {
1279      setTimeout(resolve2, 0);
1280    });
1281  };
1282  function createFlusher(compute, notify) {
1283    let flush = () => void 0;
1284    const dispose = E2(function() {
1285      flush = this.c.bind(this);
1286      this.x = compute;
1287      this.c = notify;
1288      return compute();
1289    });
1290    return { flush, dispose };
1291  }
1292  function useSignalEffect(callback) {
1293    y2(() => {
1294      let eff = null;
1295      let isExecuting = false;
1296      const notify = async () => {
1297        if (eff && !isExecuting) {
1298          isExecuting = true;
1299          await afterNextFrame(eff.flush);
1300          isExecuting = false;
1301        }
1302      };
1303      eff = createFlusher(callback, notify);
1304      return eff.dispose;
1305    }, []);
1306  }
1307  function withScope(func) {
1308    const scope = getScope();
1309    const ns = getNamespace();
1310    let wrapped;
1311    if (func?.constructor?.name === "GeneratorFunction") {
1312      wrapped = async (...args) => {
1313        const gen = func(...args);
1314        let value;
1315        let it;
1316        let error;
1317        while (true) {
1318          setNamespace(ns);
1319          setScope(scope);
1320          try {
1321            it = error ? gen.throw(error) : gen.next(value);
1322            error = void 0;
1323          } catch (e4) {
1324            throw e4;
1325          } finally {
1326            resetScope();
1327            resetNamespace();
1328          }
1329          try {
1330            value = await it.value;
1331          } catch (e4) {
1332            error = e4;
1333          }
1334          if (it.done) {
1335            if (error) {
1336              throw error;
1337            } else {
1338              break;
1339            }
1340          }
1341        }
1342        return value;
1343      };
1344    } else {
1345      wrapped = (...args) => {
1346        setNamespace(ns);
1347        setScope(scope);
1348        try {
1349          return func(...args);
1350        } finally {
1351          resetNamespace();
1352          resetScope();
1353        }
1354      };
1355    }
1356    const syncAware = func;
1357    if (syncAware.sync) {
1358      const syncAwareWrapped = wrapped;
1359      syncAwareWrapped.sync = true;
1360      return syncAwareWrapped;
1361    }
1362    return wrapped;
1363  }
1364  function useWatch(callback) {
1365    useSignalEffect(withScope(callback));
1366  }
1367  function useInit(callback) {
1368    y2(withScope(callback), []);
1369  }
1370  function useEffect(callback, inputs) {
1371    y2(withScope(callback), inputs);
1372  }
1373  function useLayoutEffect(callback, inputs) {
1374    _2(withScope(callback), inputs);
1375  }
1376  function useCallback(callback, inputs) {
1377    return q2(withScope(callback), inputs);
1378  }
1379  function useMemo(factory, inputs) {
1380    return T2(withScope(factory), inputs);
1381  }
1382  var createRootFragment = (parent, replaceNode) => {
1383    replaceNode = [].concat(replaceNode);
1384    const sibling = replaceNode[replaceNode.length - 1].nextSibling;
1385    function insert(child, root) {
1386      parent.insertBefore(child, root || sibling);
1387    }
1388    return parent.__k = {
1389      nodeType: 1,
1390      parentNode: parent,
1391      firstChild: replaceNode[0],
1392      childNodes: replaceNode,
1393      insertBefore: insert,
1394      appendChild: insert,
1395      removeChild(c5) {
1396        parent.removeChild(c5);
1397      },
1398      contains(c5) {
1399        parent.contains(c5);
1400      }
1401    };
1402  };
1403  function kebabToCamelCase(str) {
1404    return str.replace(/^-+|-+$/g, "").toLowerCase().replace(/-([a-z])/g, function(_match, group1) {
1405      return group1.toUpperCase();
1406    });
1407  }
1408  var logged = /* @__PURE__ */ new Set();
1409  var warn = (message) => {
1410    if (true) {
1411      if (logged.has(message)) {
1412        return;
1413      }
1414      console.warn(message);
1415      try {
1416        throw Error(message);
1417      } catch (e4) {
1418      }
1419      logged.add(message);
1420    }
1421  };
1422  var isPlainObject = (candidate) => Boolean(
1423    candidate && typeof candidate === "object" && candidate.constructor === Object
1424  );
1425  function withSyncEvent(callback) {
1426    const syncAware = callback;
1427    syncAware.sync = true;
1428    return syncAware;
1429  }
1430  var readOnlyMap = /* @__PURE__ */ new WeakMap();
1431  var createDeepReadOnlyHandlers = (errorMessage) => {
1432    const handleError = () => {
1433      if (true) {
1434        warn(errorMessage);
1435      }
1436      return false;
1437    };
1438    return {
1439      get(target, prop) {
1440        const value = target[prop];
1441        if (value && typeof value === "object") {
1442          return deepReadOnly(value, { errorMessage });
1443        }
1444        return value;
1445      },
1446      set: handleError,
1447      deleteProperty: handleError,
1448      defineProperty: handleError
1449    };
1450  };
1451  function deepReadOnly(obj, options) {
1452    const errorMessage = options?.errorMessage ?? "Cannot modify read-only object";
1453    if (!readOnlyMap.has(obj)) {
1454      const handlers = createDeepReadOnlyHandlers(errorMessage);
1455      readOnlyMap.set(obj, new Proxy(obj, handlers));
1456    }
1457    return readOnlyMap.get(obj);
1458  }
1459  var navigationSignal = d3(0);
1460  function deepClone(source) {
1461    if (isPlainObject(source)) {
1462      return Object.fromEntries(
1463        Object.entries(source).map(([key, value]) => [
1464          key,
1465          deepClone(value)
1466        ])
1467      );
1468    }
1469    if (Array.isArray(source)) {
1470      return source.map((i6) => deepClone(i6));
1471    }
1472    return source;
1473  }
1474  
1475  // packages/interactivity/build-module/hooks.js
1476  init_preact_module();
1477  
1478  // packages/interactivity/build-module/proxies/registry.js
1479  var objToProxy = /* @__PURE__ */ new WeakMap();
1480  var proxyToObj = /* @__PURE__ */ new WeakMap();
1481  var proxyToNs = /* @__PURE__ */ new WeakMap();
1482  var supported = /* @__PURE__ */ new Set([Object, Array]);
1483  var createProxy = (namespace, obj, handlers) => {
1484    if (!shouldProxy(obj)) {
1485      throw Error("This object cannot be proxified.");
1486    }
1487    if (!objToProxy.has(obj)) {
1488      const proxy = new Proxy(obj, handlers);
1489      objToProxy.set(obj, proxy);
1490      proxyToObj.set(proxy, obj);
1491      proxyToNs.set(proxy, namespace);
1492    }
1493    return objToProxy.get(obj);
1494  };
1495  var getProxyFromObject = (obj) => objToProxy.get(obj);
1496  var getNamespaceFromProxy = (proxy) => proxyToNs.get(proxy);
1497  var shouldProxy = (candidate) => {
1498    if (typeof candidate !== "object" || candidate === null) {
1499      return false;
1500    }
1501    return !proxyToNs.has(candidate) && supported.has(candidate.constructor);
1502  };
1503  var getObjectFromProxy = (proxy) => proxyToObj.get(proxy);
1504  
1505  // packages/interactivity/build-module/proxies/signals.js
1506  var NO_SCOPE = {};
1507  var PropSignal = class {
1508    /**
1509     * Proxy that holds the property this PropSignal is associated with.
1510     */
1511    owner;
1512    /**
1513     * Relation of computeds by scope. These computeds are read-only signals
1514     * that depend on whether the property is a value or a getter and,
1515     * therefore, can return different values depending on the scope in which
1516     * the getter is accessed.
1517     */
1518    computedsByScope;
1519    /**
1520     * Signal with the value assigned to the related property.
1521     */
1522    valueSignal;
1523    /**
1524     * Signal with the getter assigned to the related property.
1525     */
1526    getterSignal;
1527    /**
1528     * Pending getter to be consolidated.
1529     */
1530    pendingGetter;
1531    /**
1532     * Structure that manages reactivity for a property in a state object, using
1533     * signals to keep track of property value or getter modifications.
1534     *
1535     * @param owner Proxy that holds the property this instance is associated
1536     *              with.
1537     */
1538    constructor(owner) {
1539      this.owner = owner;
1540      this.computedsByScope = /* @__PURE__ */ new WeakMap();
1541    }
1542    /**
1543     * Changes the internal value. If a getter was set before, it is set to
1544     * `undefined`.
1545     *
1546     * @param value New value.
1547     */
1548    setValue(value) {
1549      this.update({ value });
1550    }
1551    /**
1552     * Changes the internal getter. If a value was set before, it is set to
1553     * `undefined`.
1554     *
1555     * @param getter New getter.
1556     */
1557    setGetter(getter) {
1558      this.update({ get: getter });
1559    }
1560    /**
1561     * Changes the internal getter asynchronously.
1562     *
1563     * The update is made in a microtask, which prevents issues with getters
1564     * accessing the state, and ensures the update occurs before any render.
1565     *
1566     * @param getter New getter.
1567     */
1568    setPendingGetter(getter) {
1569      this.pendingGetter = getter;
1570      queueMicrotask(() => this.consolidateGetter());
1571    }
1572    /**
1573     * Consolidate the pending value of the getter.
1574     */
1575    consolidateGetter() {
1576      const getter = this.pendingGetter;
1577      if (getter) {
1578        this.pendingGetter = void 0;
1579        this.update({ get: getter });
1580      }
1581    }
1582    /**
1583     * Returns the computed that holds the result of evaluating the prop in the
1584     * current scope.
1585     *
1586     * These computeds are read-only signals that depend on whether the property
1587     * is a value or a getter and, therefore, can return different values
1588     * depending on the scope in which the getter is accessed.
1589     *
1590     * @return Computed that depends on the scope.
1591     */
1592    getComputed() {
1593      const scope = getScope() || NO_SCOPE;
1594      if (!this.valueSignal && !this.getterSignal) {
1595        this.update({});
1596      }
1597      if (this.pendingGetter) {
1598        this.consolidateGetter();
1599      }
1600      if (!this.computedsByScope.has(scope)) {
1601        const callback = () => {
1602          const getter = this.getterSignal?.value;
1603          return getter ? getter.call(this.owner) : this.valueSignal?.value;
1604        };
1605        setNamespace(getNamespaceFromProxy(this.owner));
1606        this.computedsByScope.set(
1607          scope,
1608          w3(withScope(callback))
1609        );
1610        resetNamespace();
1611      }
1612      return this.computedsByScope.get(scope);
1613    }
1614    /**
1615     *  Updates the internal signals for the value and the getter of the
1616     *  corresponding prop.
1617     *
1618     * @param param0
1619     * @param param0.get   New getter.
1620     * @param param0.value New value.
1621     */
1622    update({ get, value }) {
1623      if (!this.valueSignal) {
1624        this.valueSignal = d3(value);
1625        this.getterSignal = d3(get);
1626      } else if (value !== this.valueSignal.peek() || get !== this.getterSignal.peek()) {
1627        r3(() => {
1628          this.valueSignal.value = value;
1629          this.getterSignal.value = get;
1630        });
1631      }
1632    }
1633  };
1634  
1635  // packages/interactivity/build-module/proxies/state.js
1636  var wellKnownSymbols = new Set(
1637    Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter((value) => typeof value === "symbol")
1638  );
1639  var proxyToProps = /* @__PURE__ */ new WeakMap();
1640  var hasPropSignal = (proxy, key) => proxyToProps.has(proxy) && proxyToProps.get(proxy).has(key);
1641  var getPropSignal = (proxy, key, initial) => {
1642    if (!proxyToProps.has(proxy)) {
1643      proxyToProps.set(proxy, /* @__PURE__ */ new Map());
1644    }
1645    key = typeof key === "number" ? `$key}` : key;
1646    const props = proxyToProps.get(proxy);
1647    if (!props.has(key)) {
1648      const ns = getNamespaceFromProxy(proxy);
1649      const prop = new PropSignal(proxy);
1650      props.set(key, prop);
1651      if (initial) {
1652        const { get, value } = initial;
1653        if (get) {
1654          prop.setGetter(get);
1655        } else {
1656          prop.setValue(
1657            shouldProxy(value) ? proxifyState(ns, value) : value
1658          );
1659        }
1660      }
1661    }
1662    return props.get(key);
1663  };
1664  var objToIterable = /* @__PURE__ */ new WeakMap();
1665  var peeking = false;
1666  var PENDING_GETTER = Symbol("PENDING_GETTER");
1667  var stateHandlers = {
1668    get(target, key, receiver) {
1669      if (peeking || !target.hasOwnProperty(key) && key in target || typeof key === "symbol" && wellKnownSymbols.has(key)) {
1670        return Reflect.get(target, key, receiver);
1671      }
1672      const desc = Object.getOwnPropertyDescriptor(target, key);
1673      const prop = getPropSignal(receiver, key, desc);
1674      const result = prop.getComputed().value;
1675      if (result === PENDING_GETTER) {
1676        throw PENDING_GETTER;
1677      }
1678      if (typeof result === "function") {
1679        const ns = getNamespaceFromProxy(receiver);
1680        return (...args) => {
1681          setNamespace(ns);
1682          try {
1683            return result.call(receiver, ...args);
1684          } finally {
1685            resetNamespace();
1686          }
1687        };
1688      }
1689      return result;
1690    },
1691    set(target, key, value, receiver) {
1692      setNamespace(getNamespaceFromProxy(receiver));
1693      try {
1694        return Reflect.set(target, key, value, receiver);
1695      } finally {
1696        resetNamespace();
1697      }
1698    },
1699    defineProperty(target, key, desc) {
1700      const isNew = !(key in target);
1701      const result = Reflect.defineProperty(target, key, desc);
1702      if (result) {
1703        const receiver = getProxyFromObject(target);
1704        const prop = getPropSignal(receiver, key);
1705        const { get, value } = desc;
1706        if (get) {
1707          prop.setGetter(get);
1708        } else {
1709          const ns = getNamespaceFromProxy(receiver);
1710          prop.setValue(
1711            shouldProxy(value) ? proxifyState(ns, value) : value
1712          );
1713        }
1714        if (isNew && objToIterable.has(target)) {
1715          objToIterable.get(target).value++;
1716        }
1717        if (Array.isArray(target) && proxyToProps.get(receiver)?.has("length")) {
1718          const length = getPropSignal(receiver, "length");
1719          length.setValue(target.length);
1720        }
1721      }
1722      return result;
1723    },
1724    deleteProperty(target, key) {
1725      const result = Reflect.deleteProperty(target, key);
1726      if (result) {
1727        const prop = getPropSignal(getProxyFromObject(target), key);
1728        prop.setValue(void 0);
1729        if (objToIterable.has(target)) {
1730          objToIterable.get(target).value++;
1731        }
1732      }
1733      return result;
1734    },
1735    ownKeys(target) {
1736      if (!objToIterable.has(target)) {
1737        objToIterable.set(target, d3(0));
1738      }
1739      objToIterable._ = objToIterable.get(target).value;
1740      return Reflect.ownKeys(target);
1741    }
1742  };
1743  var proxifyState = (namespace, obj) => {
1744    return createProxy(namespace, obj, stateHandlers);
1745  };
1746  var peek = (obj, key) => {
1747    peeking = true;
1748    try {
1749      return obj[key];
1750    } finally {
1751      peeking = false;
1752    }
1753  };
1754  var deepMergeRecursive = (target, source, override = true) => {
1755    if (!(isPlainObject(target) && isPlainObject(source))) {
1756      return;
1757    }
1758    let hasNewKeys = false;
1759    for (const key in source) {
1760      const isNew = !(key in target);
1761      hasNewKeys = hasNewKeys || isNew;
1762      const desc = Object.getOwnPropertyDescriptor(source, key);
1763      const proxy = getProxyFromObject(target);
1764      const propSignal = !!proxy && hasPropSignal(proxy, key) && getPropSignal(proxy, key);
1765      if (typeof desc.get === "function" || typeof desc.set === "function") {
1766        if (override || isNew) {
1767          Object.defineProperty(target, key, {
1768            ...desc,
1769            configurable: true,
1770            enumerable: true
1771          });
1772          if (desc.get && propSignal) {
1773            propSignal.setPendingGetter(desc.get);
1774          }
1775        }
1776      } else if (isPlainObject(source[key])) {
1777        const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value;
1778        if (isNew || override && !isPlainObject(targetValue)) {
1779          target[key] = {};
1780          if (propSignal) {
1781            const ns = getNamespaceFromProxy(proxy);
1782            propSignal.setValue(
1783              proxifyState(ns, target[key])
1784            );
1785          }
1786          deepMergeRecursive(target[key], source[key], override);
1787        } else if (isPlainObject(targetValue)) {
1788          deepMergeRecursive(target[key], source[key], override);
1789        }
1790      } else if (override || isNew) {
1791        Object.defineProperty(target, key, desc);
1792        if (propSignal) {
1793          const { value } = desc;
1794          const ns = getNamespaceFromProxy(proxy);
1795          propSignal.setValue(
1796            shouldProxy(value) ? proxifyState(ns, value) : value
1797          );
1798        }
1799      }
1800    }
1801    if (hasNewKeys && objToIterable.has(target)) {
1802      objToIterable.get(target).value++;
1803    }
1804  };
1805  var deepMerge = (target, source, override = true) => r3(
1806    () => deepMergeRecursive(
1807      getObjectFromProxy(target) || target,
1808      source,
1809      override
1810    )
1811  );
1812  
1813  // packages/interactivity/build-module/proxies/store.js
1814  var storeRoots = /* @__PURE__ */ new WeakSet();
1815  var storeHandlers = {
1816    get: (target, key, receiver) => {
1817      const result = Reflect.get(target, key);
1818      const ns = getNamespaceFromProxy(receiver);
1819      if (typeof result === "undefined" && storeRoots.has(receiver)) {
1820        const obj = {};
1821        Reflect.set(target, key, obj);
1822        return proxifyStore(ns, obj, false);
1823      }
1824      if (typeof result === "function") {
1825        setNamespace(ns);
1826        const scoped = withScope(result);
1827        resetNamespace();
1828        return scoped;
1829      }
1830      if (isPlainObject(result) && shouldProxy(result)) {
1831        return proxifyStore(ns, result, false);
1832      }
1833      return result;
1834    }
1835  };
1836  var proxifyStore = (namespace, obj, isRoot = true) => {
1837    const proxy = createProxy(namespace, obj, storeHandlers);
1838    if (proxy && isRoot) {
1839      storeRoots.add(proxy);
1840    }
1841    return proxy;
1842  };
1843  
1844  // packages/interactivity/build-module/proxies/context.js
1845  var contextObjectToProxy = /* @__PURE__ */ new WeakMap();
1846  var contextObjectToFallback = /* @__PURE__ */ new WeakMap();
1847  var contextProxies = /* @__PURE__ */ new WeakSet();
1848  var descriptor = Reflect.getOwnPropertyDescriptor;
1849  var contextHandlers = {
1850    get: (target, key) => {
1851      const fallback = contextObjectToFallback.get(target);
1852      const currentProp = target[key];
1853      return key in target ? currentProp : fallback[key];
1854    },
1855    set: (target, key, value) => {
1856      const fallback = contextObjectToFallback.get(target);
1857      const obj = key in target || !(key in fallback) ? target : fallback;
1858      obj[key] = value;
1859      return true;
1860    },
1861    ownKeys: (target) => [
1862      .../* @__PURE__ */ new Set([
1863        ...Object.keys(contextObjectToFallback.get(target)),
1864        ...Object.keys(target)
1865      ])
1866    ],
1867    getOwnPropertyDescriptor: (target, key) => descriptor(target, key) || descriptor(contextObjectToFallback.get(target), key),
1868    has: (target, key) => Reflect.has(target, key) || Reflect.has(contextObjectToFallback.get(target), key)
1869  };
1870  var proxifyContext = (current, inherited = {}) => {
1871    if (contextProxies.has(current)) {
1872      throw Error("This object cannot be proxified.");
1873    }
1874    contextObjectToFallback.set(current, inherited);
1875    if (!contextObjectToProxy.has(current)) {
1876      const proxy = new Proxy(current, contextHandlers);
1877      contextObjectToProxy.set(current, proxy);
1878      contextProxies.add(proxy);
1879    }
1880    return contextObjectToProxy.get(current);
1881  };
1882  
1883  // packages/interactivity/build-module/store.js
1884  var stores = /* @__PURE__ */ new Map();
1885  var rawStores = /* @__PURE__ */ new Map();
1886  var storeLocks = /* @__PURE__ */ new Map();
1887  var storeConfigs = /* @__PURE__ */ new Map();
1888  var serverStates = /* @__PURE__ */ new Map();
1889  var getConfig = (namespace) => storeConfigs.get(namespace || getNamespace()) || {};
1890  function getServerState(namespace) {
1891    const ns = namespace || getNamespace();
1892    if (!serverStates.has(ns)) {
1893      serverStates.set(ns, {});
1894    }
1895    getServerState.subscribe = navigationSignal.value;
1896    return deepClone(serverStates.get(ns));
1897  }
1898  getServerState.subscribe = 0;
1899  var universalUnlock = "I acknowledge that using a private store means my plugin will inevitably break on the next store release.";
1900  function store(namespace, { state = {}, ...block } = {}, { lock = false } = {}) {
1901    if (!stores.has(namespace)) {
1902      if (lock !== universalUnlock) {
1903        storeLocks.set(namespace, lock);
1904      }
1905      const rawStore = {
1906        state: proxifyState(
1907          namespace,
1908          isPlainObject(state) ? state : {}
1909        ),
1910        ...block
1911      };
1912      const proxifiedStore = proxifyStore(namespace, rawStore);
1913      rawStores.set(namespace, rawStore);
1914      stores.set(namespace, proxifiedStore);
1915    } else {
1916      if (lock !== universalUnlock && !storeLocks.has(namespace)) {
1917        storeLocks.set(namespace, lock);
1918      } else {
1919        const storeLock = storeLocks.get(namespace);
1920        const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock;
1921        if (!isLockValid) {
1922          if (!storeLock) {
1923            throw Error("Cannot lock a public store");
1924          } else {
1925            throw Error(
1926              "Cannot unlock a private store with an invalid lock code"
1927            );
1928          }
1929        }
1930      }
1931      const target = rawStores.get(namespace);
1932      deepMerge(target, block);
1933      deepMerge(target.state, state);
1934    }
1935    return stores.get(namespace);
1936  }
1937  var parseServerData = (dom = document) => {
1938    const jsonDataScriptTag = (
1939      // Preferred Script Module data passing form
1940      dom.getElementById(
1941        "wp-script-module-data-@wordpress/interactivity"
1942      ) ?? // Legacy form
1943      dom.getElementById("wp-interactivity-data")
1944    );
1945    if (jsonDataScriptTag?.textContent) {
1946      try {
1947        return JSON.parse(jsonDataScriptTag.textContent);
1948      } catch {
1949      }
1950    }
1951    return {};
1952  };
1953  var populateServerData = (data2) => {
1954    serverStates.clear();
1955    storeConfigs.clear();
1956    if (isPlainObject(data2?.state)) {
1957      Object.entries(data2.state).forEach(([namespace, state]) => {
1958        const st = store(namespace, {}, { lock: universalUnlock });
1959        deepMerge(st.state, state, false);
1960        serverStates.set(namespace, state);
1961      });
1962    }
1963    if (isPlainObject(data2?.config)) {
1964      Object.entries(data2.config).forEach(([namespace, config]) => {
1965        storeConfigs.set(namespace, config);
1966      });
1967    }
1968    if (isPlainObject(data2?.derivedStateClosures)) {
1969      Object.entries(data2.derivedStateClosures).forEach(
1970        ([namespace, paths]) => {
1971          const st = store(
1972            namespace,
1973            {},
1974            { lock: universalUnlock }
1975          );
1976          paths.forEach((path) => {
1977            const pathParts = path.split(".");
1978            const prop = pathParts.splice(-1, 1)[0];
1979            const parent = pathParts.reduce(
1980              (prev, key) => peek(prev, key),
1981              st
1982            );
1983            const desc = Object.getOwnPropertyDescriptor(
1984              parent,
1985              prop
1986            );
1987            if (isPlainObject(desc?.value)) {
1988              parent[prop] = PENDING_GETTER;
1989            }
1990          });
1991        }
1992      );
1993    }
1994  };
1995  var data = parseServerData();
1996  populateServerData(data);
1997  
1998  // packages/interactivity/build-module/hooks.js
1999  function isNonDefaultDirectiveSuffix(entry) {
2000    return entry.suffix !== null;
2001  }
2002  function isDefaultDirectiveSuffix(entry) {
2003    return entry.suffix === null;
2004  }
2005  var context = G({ client: {}, server: {} });
2006  var directiveCallbacks = {};
2007  var directivePriorities = {};
2008  var directive = (name, callback, { priority = 10 } = {}) => {
2009    directiveCallbacks[name] = callback;
2010    directivePriorities[name] = priority;
2011  };
2012  var resolve = (path, namespace) => {
2013    if (!namespace) {
2014      warn(
2015        `Namespace missing for "$path}". The value for that path won't be resolved.`
2016      );
2017      return;
2018    }
2019    let resolvedStore = stores.get(namespace);
2020    if (typeof resolvedStore === "undefined") {
2021      resolvedStore = store(
2022        namespace,
2023        {},
2024        {
2025          lock: universalUnlock
2026        }
2027      );
2028    }
2029    const current = {
2030      ...resolvedStore,
2031      context: getScope().context[namespace]
2032    };
2033    try {
2034      const pathParts = path.split(".");
2035      return pathParts.reduce((acc, key) => acc[key], current);
2036    } catch (e4) {
2037      if (e4 === PENDING_GETTER) {
2038        return PENDING_GETTER;
2039      }
2040    }
2041  };
2042  var getEvaluate = ({ scope }) => (
2043    // TODO: When removing the temporarily remaining `value( ...args )` call below, remove the `...args` parameter too.
2044    ((entry, ...args) => {
2045      let { value: path, namespace } = entry;
2046      if (typeof path !== "string") {
2047        throw new Error("The `value` prop should be a string path");
2048      }
2049      const hasNegationOperator = path[0] === "!" && !!(path = path.slice(1));
2050      setScope(scope);
2051      const value = resolve(path, namespace);
2052      if (typeof value === "function") {
2053        if (hasNegationOperator) {
2054          warn(
2055            "Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead."
2056          );
2057          const functionResult = !value(...args);
2058          resetScope();
2059          return functionResult;
2060        }
2061        resetScope();
2062        const wrappedFunction = (...functionArgs) => {
2063          setScope(scope);
2064          const functionResult = value(...functionArgs);
2065          resetScope();
2066          return functionResult;
2067        };
2068        if (value.sync) {
2069          const syncAwareFunction = wrappedFunction;
2070          syncAwareFunction.sync = true;
2071        }
2072        return wrappedFunction;
2073      }
2074      const result = value;
2075      resetScope();
2076      return hasNegationOperator && value !== PENDING_GETTER ? !result : result;
2077    })
2078  );
2079  var getPriorityLevels = (directives) => {
2080    const byPriority = Object.keys(directives).reduce((obj, name) => {
2081      if (directiveCallbacks[name]) {
2082        const priority = directivePriorities[name];
2083        (obj[priority] = obj[priority] || []).push(name);
2084      }
2085      return obj;
2086    }, {});
2087    return Object.entries(byPriority).sort(([p1], [p22]) => parseInt(p1) - parseInt(p22)).map(([, arr]) => arr);
2088  };
2089  var Directives = ({
2090    directives,
2091    priorityLevels: [currentPriorityLevel, ...nextPriorityLevels],
2092    element,
2093    originalProps,
2094    previousScope
2095  }) => {
2096    const scope = A2({}).current;
2097    scope.evaluate = q2(getEvaluate({ scope }), []);
2098    const { client, server } = x2(context);
2099    scope.context = client;
2100    scope.serverContext = server;
2101    scope.ref = previousScope?.ref || A2(null);
2102    element = E(element, { ref: scope.ref });
2103    scope.attributes = element.props;
2104    const children = nextPriorityLevels.length > 0 ? _(Directives, {
2105      directives,
2106      priorityLevels: nextPriorityLevels,
2107      element,
2108      originalProps,
2109      previousScope: scope
2110    }) : element;
2111    const props = { ...originalProps, children };
2112    const directiveArgs = {
2113      directives,
2114      props,
2115      element,
2116      context,
2117      evaluate: scope.evaluate
2118    };
2119    setScope(scope);
2120    for (const directiveName of currentPriorityLevel) {
2121      const wrapper = directiveCallbacks[directiveName]?.(directiveArgs);
2122      if (wrapper !== void 0) {
2123        props.children = wrapper;
2124      }
2125    }
2126    resetScope();
2127    return props.children;
2128  };
2129  var old = l.vnode;
2130  l.vnode = (vnode) => {
2131    if (vnode.props.__directives) {
2132      const props = vnode.props;
2133      const directives = props.__directives;
2134      if (directives.key) {
2135        vnode.key = directives.key.find(isDefaultDirectiveSuffix).value;
2136      }
2137      delete props.__directives;
2138      const priorityLevels = getPriorityLevels(directives);
2139      if (priorityLevels.length > 0) {
2140        vnode.props = {
2141          directives,
2142          priorityLevels,
2143          originalProps: props,
2144          type: vnode.type,
2145          element: _(vnode.type, props),
2146          top: true
2147        };
2148        vnode.type = Directives;
2149      }
2150    }
2151    if (old) {
2152      old(vnode);
2153    }
2154  };
2155  
2156  // packages/interactivity/build-module/directives.js
2157  var warnUniqueIdWithTwoHyphens = (prefix, suffix, uniqueId) => {
2158    if (true) {
2159      warn(
2160        `The usage of data-wp-$prefix}--$suffix}$uniqueId ? `--$uniqueId}` : ""} (two hyphens for unique ID) is deprecated and will stop working in WordPress 7.0. Please use data-wp-$prefix}$uniqueId ? `--$suffix}---$uniqueId}` : `---$suffix}`} (three hyphens for unique ID) from now on.`
2161      );
2162    }
2163  };
2164  var warnUniqueIdNotSupported = (prefix, uniqueId) => {
2165    if (true) {
2166      warn(
2167        `Unique IDs are not supported for the data-wp-$prefix} directive. Ignoring the directive with unique ID "$uniqueId}".`
2168      );
2169    }
2170  };
2171  var warnWithSyncEvent = (wrongPrefix, rightPrefix) => {
2172    if (true) {
2173      warn(
2174        `The usage of data-wp-$wrongPrefix} is deprecated and will stop working in WordPress 7.0. Please, use data-wp-$rightPrefix} with the withSyncEvent() helper from now on.`
2175      );
2176    }
2177  };
2178  function wrapEventAsync(event) {
2179    const handler = {
2180      get(target, prop, receiver) {
2181        const value = target[prop];
2182        switch (prop) {
2183          case "currentTarget":
2184            if (true) {
2185              warn(
2186                `Accessing the synchronous event.$prop} property in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().`
2187              );
2188            }
2189            break;
2190          case "preventDefault":
2191          case "stopImmediatePropagation":
2192          case "stopPropagation":
2193            if (true) {
2194              warn(
2195                `Using the synchronous event.$prop}() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().`
2196              );
2197            }
2198            break;
2199        }
2200        if (value instanceof Function) {
2201          return function(...args) {
2202            return value.apply(
2203              this === receiver ? target : this,
2204              args
2205            );
2206          };
2207        }
2208        return value;
2209      }
2210    };
2211    return new Proxy(event, handler);
2212  }
2213  var newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g;
2214  var ruleClean = /\/\*[^]*?\*\/|  +/g;
2215  var ruleNewline = /\n+/g;
2216  var empty = " ";
2217  var cssStringToObject = (val) => {
2218    const tree = [{}];
2219    let block, left;
2220    while (block = newRule.exec(val.replace(ruleClean, ""))) {
2221      if (block[4]) {
2222        tree.shift();
2223      } else if (block[3]) {
2224        left = block[3].replace(ruleNewline, empty).trim();
2225        tree.unshift(tree[0][left] = tree[0][left] || {});
2226      } else {
2227        tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim();
2228      }
2229    }
2230    return tree[0];
2231  };
2232  var getGlobalEventDirective = (type) => {
2233    return ({ directives, evaluate }) => {
2234      directives[`on-$type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2235        const suffixParts = entry.suffix.split("--", 2);
2236        const eventName = suffixParts[0];
2237        if (true) {
2238          if (suffixParts[1]) {
2239            warnUniqueIdWithTwoHyphens(
2240              `on-$type}`,
2241              suffixParts[0],
2242              suffixParts[1]
2243            );
2244          }
2245        }
2246        useInit(() => {
2247          const cb = (event) => {
2248            const result = evaluate(entry);
2249            if (typeof result === "function") {
2250              if (!result?.sync) {
2251                event = wrapEventAsync(event);
2252              }
2253              result(event);
2254            }
2255          };
2256          const globalVar = type === "window" ? window : document;
2257          globalVar.addEventListener(eventName, cb);
2258          return () => globalVar.removeEventListener(eventName, cb);
2259        });
2260      });
2261    };
2262  };
2263  var evaluateItemKey = (inheritedValue, namespace, item, itemProp, eachKey) => {
2264    const clientContextWithItem = {
2265      ...inheritedValue.client,
2266      [namespace]: {
2267        ...inheritedValue.client[namespace],
2268        [itemProp]: item
2269      }
2270    };
2271    const scope = {
2272      ...getScope(),
2273      context: clientContextWithItem,
2274      serverContext: inheritedValue.server
2275    };
2276    return eachKey ? getEvaluate({ scope })(eachKey) : item;
2277  };
2278  var useItemContexts = function* (inheritedValue, namespace, items, itemProp, eachKey) {
2279    const { current: itemContexts } = A2(/* @__PURE__ */ new Map());
2280    for (const item of items) {
2281      const key = evaluateItemKey(
2282        inheritedValue,
2283        namespace,
2284        item,
2285        itemProp,
2286        eachKey
2287      );
2288      if (!itemContexts.has(key)) {
2289        itemContexts.set(
2290          key,
2291          proxifyContext(
2292            proxifyState(namespace, {
2293              // Inits the item prop in the context to shadow it in case
2294              // it was inherited from the parent context. The actual
2295              // value is set in the `wp-each` directive later on.
2296              [itemProp]: void 0
2297            }),
2298            inheritedValue.client[namespace]
2299          )
2300        );
2301      }
2302      yield [item, itemContexts.get(key), key];
2303    }
2304  };
2305  var getGlobalAsyncEventDirective = (type) => {
2306    return ({ directives, evaluate }) => {
2307      directives[`on-async-$type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2308        if (true) {
2309          warnWithSyncEvent(`on-async-$type}`, `on-$type}`);
2310        }
2311        const eventName = entry.suffix.split("--", 1)[0];
2312        useInit(() => {
2313          const cb = async (event) => {
2314            await splitTask();
2315            const result = evaluate(entry);
2316            if (typeof result === "function") {
2317              result(event);
2318            }
2319          };
2320          const globalVar = type === "window" ? window : document;
2321          globalVar.addEventListener(eventName, cb, {
2322            passive: true
2323          });
2324          return () => globalVar.removeEventListener(eventName, cb);
2325        });
2326      });
2327    };
2328  };
2329  var routerRegions = /* @__PURE__ */ new Map();
2330  var directives_default = () => {
2331    directive(
2332      "context",
2333      ({
2334        directives: { context: context2 },
2335        props: { children },
2336        context: inheritedContext
2337      }) => {
2338        const entries = context2.filter(isDefaultDirectiveSuffix).reverse();
2339        if (!entries.length) {
2340          if (true) {
2341            warn(
2342              "The usage of data-wp-context--unique-id (two hyphens) is not supported. To add a unique ID to the directive, please use data-wp-context---unique-id (three hyphens) instead."
2343            );
2344          }
2345          return;
2346        }
2347        const { Provider } = inheritedContext;
2348        const { client: inheritedClient, server: inheritedServer } = x2(inheritedContext);
2349        const client = A2({});
2350        const server = {};
2351        const result = {
2352          client: { ...inheritedClient },
2353          server: { ...inheritedServer }
2354        };
2355        const namespaces2 = /* @__PURE__ */ new Set();
2356        entries.forEach(({ value, namespace, uniqueId }) => {
2357          if (!isPlainObject(value)) {
2358            if (true) {
2359              warn(
2360                `The value of data-wp-context$uniqueId ? `---$uniqueId}` : ""} on the $namespace} namespace must be a valid stringified JSON object.`
2361              );
2362            }
2363            return;
2364          }
2365          if (!client.current[namespace]) {
2366            client.current[namespace] = proxifyState(namespace, {});
2367          }
2368          deepMerge(
2369            client.current[namespace],
2370            deepClone(value),
2371            false
2372          );
2373          server[namespace] = value;
2374          namespaces2.add(namespace);
2375        });
2376        namespaces2.forEach((namespace) => {
2377          result.client[namespace] = proxifyContext(
2378            client.current[namespace],
2379            inheritedClient[namespace]
2380          );
2381          result.server[namespace] = proxifyContext(
2382            server[namespace],
2383            inheritedServer[namespace]
2384          );
2385        });
2386        return _(Provider, { value: result }, children);
2387      },
2388      { priority: 5 }
2389    );
2390    directive("watch", ({ directives: { watch }, evaluate }) => {
2391      watch.forEach((entry) => {
2392        if (true) {
2393          if (entry.suffix) {
2394            warnUniqueIdWithTwoHyphens("watch", entry.suffix);
2395          }
2396        }
2397        useWatch(() => {
2398          let start;
2399          if (false) {
2400            if (true) {
2401              start = performance.now();
2402            }
2403          }
2404          let result = evaluate(entry);
2405          if (typeof result === "function") {
2406            result = result();
2407          }
2408          if (false) {
2409            if (true) {
2410              performance.measure(
2411                `interactivity api watch $entry.namespace}`,
2412                {
2413                  start,
2414                  end: performance.now(),
2415                  detail: {
2416                    devtools: {
2417                      track: `IA: watch $entry.namespace}`
2418                    }
2419                  }
2420                }
2421              );
2422            }
2423          }
2424          return result;
2425        });
2426      });
2427    });
2428    directive("init", ({ directives: { init: init2 }, evaluate }) => {
2429      init2.forEach((entry) => {
2430        if (true) {
2431          if (entry.suffix) {
2432            warnUniqueIdWithTwoHyphens("init", entry.suffix);
2433          }
2434        }
2435        useInit(() => {
2436          let start;
2437          if (false) {
2438            if (true) {
2439              start = performance.now();
2440            }
2441          }
2442          let result = evaluate(entry);
2443          if (typeof result === "function") {
2444            result = result();
2445          }
2446          if (false) {
2447            if (true) {
2448              performance.measure(
2449                `interactivity api init $entry.namespace}`,
2450                {
2451                  start,
2452                  end: performance.now(),
2453                  detail: {
2454                    devtools: {
2455                      track: `IA: init $entry.namespace}`
2456                    }
2457                  }
2458                }
2459              );
2460            }
2461          }
2462          return result;
2463        });
2464      });
2465    });
2466    directive("on", ({ directives: { on }, element, evaluate }) => {
2467      const events = /* @__PURE__ */ new Map();
2468      on.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2469        const suffixParts = entry.suffix.split("--", 2);
2470        if (true) {
2471          if (suffixParts[1]) {
2472            warnUniqueIdWithTwoHyphens(
2473              "on",
2474              suffixParts[0],
2475              suffixParts[1]
2476            );
2477          }
2478        }
2479        if (!events.has(suffixParts[0])) {
2480          events.set(suffixParts[0], /* @__PURE__ */ new Set());
2481        }
2482        events.get(suffixParts[0]).add(entry);
2483      });
2484      events.forEach((entries, eventType) => {
2485        const existingHandler = element.props[`on$eventType}`];
2486        element.props[`on$eventType}`] = (event) => {
2487          if (existingHandler) {
2488            existingHandler(event);
2489          }
2490          entries.forEach((entry) => {
2491            let start;
2492            if (false) {
2493              if (true) {
2494                start = performance.now();
2495              }
2496            }
2497            const result = evaluate(entry);
2498            if (typeof result === "function") {
2499              if (!result?.sync) {
2500                event = wrapEventAsync(event);
2501              }
2502              result(event);
2503            }
2504            if (false) {
2505              if (true) {
2506                performance.measure(
2507                  `interactivity api on $entry.namespace}`,
2508                  {
2509                    start,
2510                    end: performance.now(),
2511                    detail: {
2512                      devtools: {
2513                        track: `IA: on $entry.namespace}`
2514                      }
2515                    }
2516                  }
2517                );
2518              }
2519            }
2520          });
2521        };
2522      });
2523    });
2524    directive(
2525      "on-async",
2526      ({ directives: { "on-async": onAsync }, element, evaluate }) => {
2527        if (true) {
2528          warnWithSyncEvent("on-async", "on");
2529        }
2530        const events = /* @__PURE__ */ new Map();
2531        onAsync.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2532          const event = entry.suffix.split("--", 1)[0];
2533          if (!events.has(event)) {
2534            events.set(event, /* @__PURE__ */ new Set());
2535          }
2536          events.get(event).add(entry);
2537        });
2538        events.forEach((entries, eventType) => {
2539          const existingHandler = element.props[`on$eventType}`];
2540          element.props[`on$eventType}`] = (event) => {
2541            if (existingHandler) {
2542              existingHandler(event);
2543            }
2544            entries.forEach(async (entry) => {
2545              await splitTask();
2546              const result = evaluate(entry);
2547              if (typeof result === "function") {
2548                result(event);
2549              }
2550            });
2551          };
2552        });
2553      }
2554    );
2555    directive("on-window", getGlobalEventDirective("window"));
2556    directive("on-document", getGlobalEventDirective("document"));
2557    directive("on-async-window", getGlobalAsyncEventDirective("window"));
2558    directive(
2559      "on-async-document",
2560      getGlobalAsyncEventDirective("document")
2561    );
2562    directive(
2563      "class",
2564      ({ directives: { class: classNames }, element, evaluate }) => {
2565        classNames.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2566          const className = entry.uniqueId ? `$entry.suffix}---$entry.uniqueId}` : entry.suffix;
2567          let result = evaluate(entry);
2568          if (result === PENDING_GETTER) {
2569            return;
2570          }
2571          if (typeof result === "function") {
2572            result = result();
2573          }
2574          const currentClass = element.props.class || "";
2575          const classFinder = new RegExp(
2576            `(^|\\s)$className}(\\s|$)`,
2577            "g"
2578          );
2579          if (!result) {
2580            element.props.class = currentClass.replace(classFinder, " ").trim();
2581          } else if (!classFinder.test(currentClass)) {
2582            element.props.class = currentClass ? `$currentClass} $className}` : className;
2583          }
2584          useInit(() => {
2585            if (!result) {
2586              element.ref.current.classList.remove(className);
2587            } else {
2588              element.ref.current.classList.add(className);
2589            }
2590          });
2591        });
2592      }
2593    );
2594    directive("style", ({ directives: { style }, element, evaluate }) => {
2595      style.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2596        if (entry.uniqueId) {
2597          if (true) {
2598            warnUniqueIdNotSupported("style", entry.uniqueId);
2599          }
2600          return;
2601        }
2602        const styleProp = entry.suffix;
2603        let result = evaluate(entry);
2604        if (result === PENDING_GETTER) {
2605          return;
2606        }
2607        if (typeof result === "function") {
2608          result = result();
2609        }
2610        element.props.style = element.props.style || {};
2611        if (typeof element.props.style === "string") {
2612          element.props.style = cssStringToObject(element.props.style);
2613        }
2614        if (!result) {
2615          delete element.props.style[styleProp];
2616        } else {
2617          element.props.style[styleProp] = result;
2618        }
2619        useInit(() => {
2620          if (!result) {
2621            element.ref.current.style.removeProperty(styleProp);
2622          } else {
2623            element.ref.current.style.setProperty(styleProp, result);
2624          }
2625        });
2626      });
2627    });
2628    directive("bind", ({ directives: { bind }, element, evaluate }) => {
2629      bind.filter(isNonDefaultDirectiveSuffix).forEach((entry) => {
2630        if (entry.uniqueId) {
2631          if (true) {
2632            warnUniqueIdNotSupported("bind", entry.uniqueId);
2633          }
2634          return;
2635        }
2636        const attribute = entry.suffix;
2637        let result = evaluate(entry);
2638        if (result === PENDING_GETTER) {
2639          return;
2640        }
2641        if (typeof result === "function") {
2642          result = result();
2643        }
2644        element.props[attribute] = result;
2645        useInit(() => {
2646          const el = element.ref.current;
2647          if (attribute === "style") {
2648            if (typeof result === "string") {
2649              el.style.cssText = result;
2650            }
2651            return;
2652          } else if (attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && /*
2653          * The value for `tabindex` follows the parsing rules for an
2654          * integer. If that fails, or if the attribute isn't present, then
2655          * the browsers should "follow platform conventions to determine if
2656          * the element should be considered as a focusable area",
2657          * practically meaning that most elements get a default of `-1` (not
2658          * focusable), but several also get a default of `0` (focusable in
2659          * order after all elements with a positive `tabindex` value).
2660          *
2661          * @see https://html.spec.whatwg.org/#tabindex-value
2662          */
2663          attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute in el) {
2664            try {
2665              el[attribute] = result === null || result === void 0 ? "" : result;
2666              return;
2667            } catch (err) {
2668            }
2669          }
2670          if (result !== null && result !== void 0 && (result !== false || attribute[4] === "-")) {
2671            el.setAttribute(attribute, result);
2672          } else {
2673            el.removeAttribute(attribute);
2674          }
2675        });
2676      });
2677    });
2678    directive(
2679      "ignore",
2680      ({
2681        element: {
2682          type: Type,
2683          props: { innerHTML, ...rest }
2684        }
2685      }) => {
2686        if (true) {
2687          warn(
2688            "The data-wp-ignore directive is deprecated and will be removed in version 7.0."
2689          );
2690        }
2691        const cached = T2(() => innerHTML, []);
2692        return _(Type, {
2693          dangerouslySetInnerHTML: { __html: cached },
2694          ...rest
2695        });
2696      }
2697    );
2698    directive("text", ({ directives: { text }, element, evaluate }) => {
2699      const entries = text.filter(isDefaultDirectiveSuffix);
2700      if (!entries.length) {
2701        if (true) {
2702          warn(
2703            "The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead."
2704          );
2705        }
2706        return;
2707      }
2708      entries.forEach((entry) => {
2709        if (entry.uniqueId) {
2710          if (true) {
2711            warnUniqueIdNotSupported("text", entry.uniqueId);
2712          }
2713          return;
2714        }
2715        try {
2716          let result = evaluate(entry);
2717          if (result === PENDING_GETTER) {
2718            return;
2719          }
2720          if (typeof result === "function") {
2721            result = result();
2722          }
2723          element.props.children = typeof result === "object" ? null : result.toString();
2724        } catch (e4) {
2725          element.props.children = null;
2726        }
2727      });
2728    });
2729    directive("run", ({ directives: { run }, evaluate }) => {
2730      run.forEach((entry) => {
2731        if (true) {
2732          if (entry.suffix) {
2733            warnUniqueIdWithTwoHyphens("run", entry.suffix);
2734          }
2735        }
2736        let result = evaluate(entry);
2737        if (typeof result === "function") {
2738          result = result();
2739        }
2740        return result;
2741      });
2742    });
2743    directive(
2744      "each",
2745      ({
2746        directives: { each, "each-key": eachKey },
2747        context: inheritedContext,
2748        element,
2749        evaluate
2750      }) => {
2751        if (element.type !== "template") {
2752          if (true) {
2753            warn(
2754              "The data-wp-each directive can only be used on <template> elements."
2755            );
2756          }
2757          return;
2758        }
2759        const { Provider } = inheritedContext;
2760        const inheritedValue = x2(inheritedContext);
2761        const [entry] = each;
2762        const { namespace, suffix, uniqueId } = entry;
2763        if (each.length > 1) {
2764          if (true) {
2765            warn(
2766              "The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one."
2767            );
2768          }
2769          return;
2770        }
2771        if (uniqueId) {
2772          if (true) {
2773            warnUniqueIdNotSupported("each", uniqueId);
2774          }
2775          return;
2776        }
2777        let iterable = evaluate(entry);
2778        if (iterable === PENDING_GETTER) {
2779          return;
2780        }
2781        if (typeof iterable === "function") {
2782          iterable = iterable();
2783        }
2784        if (typeof iterable?.[Symbol.iterator] !== "function") {
2785          return;
2786        }
2787        const itemProp = suffix ? kebabToCamelCase(suffix) : "item";
2788        const result = [];
2789        const itemContexts = useItemContexts(
2790          inheritedValue,
2791          namespace,
2792          iterable,
2793          itemProp,
2794          eachKey?.[0]
2795        );
2796        for (const [item, itemContext, key] of itemContexts) {
2797          const mergedContext = {
2798            client: {
2799              ...inheritedValue.client,
2800              [namespace]: itemContext
2801            },
2802            server: { ...inheritedValue.server }
2803          };
2804          mergedContext.client[namespace][itemProp] = item;
2805          result.push(
2806            _(
2807              Provider,
2808              { value: mergedContext, key },
2809              element.props.content
2810            )
2811          );
2812        }
2813        return result;
2814      },
2815      { priority: 20 }
2816    );
2817    directive(
2818      "each-child",
2819      ({ directives: { "each-child": eachChild }, element, evaluate }) => {
2820        const entry = eachChild.find(isDefaultDirectiveSuffix);
2821        if (!entry) {
2822          return;
2823        }
2824        const iterable = evaluate(entry);
2825        return iterable === PENDING_GETTER ? element : null;
2826      },
2827      { priority: 1 }
2828    );
2829    directive(
2830      "router-region",
2831      ({ directives: { "router-region": routerRegion } }) => {
2832        const entry = routerRegion.find(isDefaultDirectiveSuffix);
2833        if (!entry) {
2834          return;
2835        }
2836        if (entry.suffix) {
2837          if (true) {
2838            warn(
2839              `Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix "$entry.suffix}".`
2840            );
2841          }
2842          return;
2843        }
2844        if (entry.uniqueId) {
2845          if (true) {
2846            warnUniqueIdNotSupported("router-region", entry.uniqueId);
2847          }
2848          return;
2849        }
2850        const regionId = typeof entry.value === "string" ? entry.value : entry.value.id;
2851        if (!routerRegions.has(regionId)) {
2852          routerRegions.set(regionId, d3());
2853        }
2854        const vdom = routerRegions.get(regionId).value;
2855        _2(() => {
2856          if (vdom && typeof vdom.type !== "string") {
2857            navigationContextSignal.value = navigationContextSignal.peek() + 1;
2858          }
2859        }, [vdom]);
2860        if (vdom && typeof vdom.type !== "string") {
2861          const previousScope = getScope();
2862          return E(vdom, { previousScope });
2863        }
2864        return vdom;
2865      },
2866      { priority: 1 }
2867    );
2868  };
2869  
2870  // packages/interactivity/build-module/init.js
2871  init_preact_module();
2872  
2873  // packages/interactivity/build-module/vdom.js
2874  init_preact_module();
2875  var directivePrefix = `data-wp-`;
2876  var namespaces = [];
2877  var currentNamespace = () => namespaces[namespaces.length - 1] ?? null;
2878  var isObject = (item) => Boolean(item && typeof item === "object" && item.constructor === Object);
2879  var invalidCharsRegex = /[^a-z0-9-_]/i;
2880  function parseDirectiveName(directiveName) {
2881    const name = directiveName.substring(8);
2882    if (invalidCharsRegex.test(name)) {
2883      return null;
2884    }
2885    const suffixIndex = name.indexOf("--");
2886    if (suffixIndex === -1) {
2887      return { prefix: name, suffix: null, uniqueId: null };
2888    }
2889    const prefix = name.substring(0, suffixIndex);
2890    const remaining = name.substring(suffixIndex);
2891    if (remaining.startsWith("---") && remaining[3] !== "-") {
2892      return {
2893        prefix,
2894        suffix: null,
2895        uniqueId: remaining.substring(3) || null
2896      };
2897    }
2898    let suffix = remaining.substring(2);
2899    const uniqueIdIndex = suffix.indexOf("---");
2900    if (uniqueIdIndex !== -1 && suffix.substring(uniqueIdIndex)[3] !== "-") {
2901      const uniqueId = suffix.substring(uniqueIdIndex + 3) || null;
2902      suffix = suffix.substring(0, uniqueIdIndex) || null;
2903      return { prefix, suffix, uniqueId };
2904    }
2905    return { prefix, suffix: suffix || null, uniqueId: null };
2906  }
2907  var nsPathRegExp = /^([\w_\/-]+)::(.+)$/;
2908  var hydratedIslands = /* @__PURE__ */ new WeakSet();
2909  function toVdom(root) {
2910    const nodesToRemove = /* @__PURE__ */ new Set();
2911    const nodesToReplace = /* @__PURE__ */ new Set();
2912    const treeWalker = document.createTreeWalker(
2913      root,
2914      205
2915      // TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT
2916    );
2917    function walk(node) {
2918      const { nodeType } = node;
2919      if (nodeType === 3) {
2920        return node.data;
2921      }
2922      if (nodeType === 4) {
2923        nodesToReplace.add(node);
2924        return node.nodeValue;
2925      }
2926      if (nodeType === 8 || nodeType === 7) {
2927        nodesToRemove.add(node);
2928        return null;
2929      }
2930      const elementNode = node;
2931      const { attributes } = elementNode;
2932      const localName = elementNode.localName;
2933      const props = {};
2934      const children = [];
2935      const directives = [];
2936      let ignore = false;
2937      let island = false;
2938      for (let i6 = 0; i6 < attributes.length; i6++) {
2939        const attributeName = attributes[i6].name;
2940        const attributeValue = attributes[i6].value;
2941        if (attributeName[directivePrefix.length] && attributeName.slice(0, directivePrefix.length) === directivePrefix) {
2942          if (attributeName === "data-wp-ignore") {
2943            ignore = true;
2944          } else {
2945            const regexResult = nsPathRegExp.exec(attributeValue);
2946            const namespace = regexResult?.[1] ?? null;
2947            let value = regexResult?.[2] ?? attributeValue;
2948            try {
2949              const parsedValue = JSON.parse(value);
2950              value = isObject(parsedValue) ? parsedValue : value;
2951            } catch {
2952            }
2953            if (attributeName === "data-wp-interactive") {
2954              island = true;
2955              const islandNamespace = (
2956                // eslint-disable-next-line no-nested-ternary
2957                typeof value === "string" ? value : typeof value?.namespace === "string" ? value.namespace : null
2958              );
2959              namespaces.push(islandNamespace);
2960            } else {
2961              directives.push([attributeName, namespace, value]);
2962            }
2963          }
2964        } else if (attributeName === "ref") {
2965          continue;
2966        }
2967        props[attributeName] = attributeValue;
2968      }
2969      if (ignore && !island) {
2970        return [
2971          _(localName, {
2972            ...props,
2973            innerHTML: elementNode.innerHTML,
2974            __directives: { ignore: true }
2975          })
2976        ];
2977      }
2978      if (island) {
2979        hydratedIslands.add(elementNode);
2980      }
2981      if (directives.length) {
2982        props.__directives = directives.reduce((obj, [name, ns, value]) => {
2983          const directiveParsed = parseDirectiveName(name);
2984          if (directiveParsed === null) {
2985            if (true) {
2986              warn(`Found malformed directive name: $name}.`);
2987            }
2988            return obj;
2989          }
2990          const { prefix, suffix, uniqueId } = directiveParsed;
2991          obj[prefix] = obj[prefix] || [];
2992          obj[prefix].push({
2993            namespace: ns ?? currentNamespace(),
2994            value,
2995            suffix,
2996            uniqueId
2997          });
2998          return obj;
2999        }, {});
3000        for (const prefix in props.__directives) {
3001          props.__directives[prefix].sort(
3002            (a5, b4) => {
3003              const aSuffix = a5.suffix ?? "";
3004              const bSuffix = b4.suffix ?? "";
3005              if (aSuffix !== bSuffix) {
3006                return aSuffix < bSuffix ? -1 : 1;
3007              }
3008              const aId = a5.uniqueId ?? "";
3009              const bId = b4.uniqueId ?? "";
3010              return +(aId > bId) - +(aId < bId);
3011            }
3012          );
3013        }
3014      }
3015      if (props.__directives?.["each-child"]) {
3016        props.dangerouslySetInnerHTML = {
3017          __html: elementNode.innerHTML
3018        };
3019      } else if (localName === "template") {
3020        props.content = [
3021          ...elementNode.content.childNodes
3022        ].map((childNode) => toVdom(childNode));
3023      } else {
3024        let child = treeWalker.firstChild();
3025        if (child) {
3026          while (child) {
3027            const vnode = walk(child);
3028            if (vnode) {
3029              children.push(vnode);
3030            }
3031            child = treeWalker.nextSibling();
3032          }
3033          treeWalker.parentNode();
3034        }
3035      }
3036      if (island) {
3037        namespaces.pop();
3038      }
3039      return _(localName, props, children);
3040    }
3041    const vdom = walk(treeWalker.currentNode);
3042    nodesToRemove.forEach(
3043      (node) => node.remove()
3044    );
3045    nodesToReplace.forEach(
3046      (node) => node.replaceWith(
3047        new window.Text(node.nodeValue ?? "")
3048      )
3049    );
3050    return vdom;
3051  }
3052  
3053  // packages/interactivity/build-module/init.js
3054  var regionRootFragments = /* @__PURE__ */ new WeakMap();
3055  var getRegionRootFragment = (regions) => {
3056    const region = Array.isArray(regions) ? regions[0] : regions;
3057    if (!region.parentElement) {
3058      throw Error("The passed region should be an element with a parent.");
3059    }
3060    if (!regionRootFragments.has(region)) {
3061      regionRootFragments.set(
3062        region,
3063        createRootFragment(region.parentElement, regions)
3064      );
3065    }
3066    return regionRootFragments.get(region);
3067  };
3068  var initialVdom = /* @__PURE__ */ new WeakMap();
3069  var init = async () => {
3070    const nodes = document.querySelectorAll(`[data-wp-interactive]`);
3071    await new Promise((resolve2) => {
3072      setTimeout(resolve2, 0);
3073    });
3074    for (const node of nodes) {
3075      if (!hydratedIslands.has(node)) {
3076        await splitTask();
3077        const fragment = getRegionRootFragment(node);
3078        const vdom = toVdom(node);
3079        initialVdom.set(node, vdom);
3080        await splitTask();
3081        D(vdom, fragment);
3082      }
3083    }
3084  };
3085  
3086  // packages/interactivity/build-module/index.js
3087  if (true) {
3088    await Promise.resolve().then(() => (init_debug_module(), debug_module_exports));
3089  }
3090  var requiredConsent = "I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.";
3091  var privateApis = (lock) => {
3092    if (lock === requiredConsent) {
3093      return {
3094        getRegionRootFragment,
3095        initialVdom,
3096        toVdom,
3097        directive,
3098        getNamespace,
3099        h: _,
3100        cloneElement: E,
3101        render: B,
3102        proxifyState,
3103        parseServerData,
3104        populateServerData,
3105        batch: r3,
3106        routerRegions,
3107        deepReadOnly,
3108        navigationSignal
3109      };
3110    }
3111    throw new Error("Forbidden access.");
3112  };
3113  directives_default();
3114  init();
3115  export {
3116    getConfig,
3117    getContext,
3118    getElement,
3119    getServerContext,
3120    getServerState,
3121    privateApis,
3122    splitTask,
3123    store,
3124    useCallback,
3125    useEffect,
3126    useInit,
3127    useLayoutEffect,
3128    useMemo,
3129    A2 as useRef,
3130    h2 as useState,
3131    useWatch,
3132    withScope,
3133    withSyncEvent
3134  };


Generated : Thu Apr 23 08:20:11 2026 Cross-referenced by PHPXref