@arabold/docs-mcp-server 1.34.0 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -361,6 +361,10 @@ var theEvaluatorFunction = normalEvaluator;
361
361
  function setEvaluator(e) {
362
362
  theEvaluatorFunction = e;
363
363
  }
364
+ var theRawEvaluatorFunction;
365
+ function setRawEvaluator(e) {
366
+ theRawEvaluatorFunction = e;
367
+ }
364
368
  function normalEvaluator(e, t) {
365
369
  let n = {};
366
370
  injectMagics(n, e);
@@ -370,6 +374,10 @@ function normalEvaluator(e, t) {
370
374
  function generateEvaluatorFromFunction(e, t) {
371
375
  return (n = () => {
372
376
  }, { scope: i = {}, params: r = [], context: a } = {}) => {
377
+ if (!shouldAutoEvaluateFunctions) {
378
+ runIfTypeOfFunction(n, t, mergeProxies([i, ...e]), r);
379
+ return;
380
+ }
373
381
  let s = t.apply(mergeProxies([i, ...e]), r);
374
382
  runIfTypeOfFunction(n, s);
375
383
  };
@@ -414,6 +422,28 @@ function runIfTypeOfFunction(e, t, n, i, r) {
414
422
  a instanceof Promise ? a.then((s) => runIfTypeOfFunction(e, s, n, i)).catch((s) => handleError(s, r, t)) : e(a);
415
423
  } else typeof t == "object" && t instanceof Promise ? t.then((a) => e(a)) : e(t);
416
424
  }
425
+ function evaluateRaw(...e) {
426
+ return theRawEvaluatorFunction(...e);
427
+ }
428
+ function normalRawEvaluator(e, t, n = {}) {
429
+ let i = {};
430
+ injectMagics(i, e);
431
+ let r = [i, ...closestDataStack(e)], a = mergeProxies([n.scope ?? {}, ...r]), s = n.params ?? [];
432
+ if (t.includes("await")) {
433
+ let o = Object.getPrototypeOf(async function() {
434
+ }).constructor, l = /^[\n\s]*if.*\(.*\)/.test(t.trim()) || /^(let|const)\s/.test(t.trim()) ? `(async()=>{ ${t} })()` : t;
435
+ return new o(
436
+ ["scope"],
437
+ `with (scope) { let __result = ${l}; return __result }`
438
+ ).call(n.context, a);
439
+ } else {
440
+ let o = /^[\n\s]*if.*\(.*\)/.test(t.trim()) || /^(let|const)\s/.test(t.trim()) ? `(()=>{ ${t} })()` : t, c = new Function(
441
+ ["scope"],
442
+ `with (scope) { let __result = ${o}; return __result }`
443
+ ).call(n.context, a);
444
+ return typeof c == "function" && shouldAutoEvaluateFunctions ? c.apply(a, s) : c;
445
+ }
446
+ }
417
447
  var prefixAsString = "x-";
418
448
  function prefix(e = "") {
419
449
  return prefixAsString + e;
@@ -451,10 +481,10 @@ function directives(e, t, n) {
451
481
  function attributesOnly(e) {
452
482
  return Array.from(e).map(toTransformedAttributes()).filter((t) => !outNonAlpineAttributes(t));
453
483
  }
454
- var isDeferringHandlers = !1, directiveHandlerStacks = /* @__PURE__ */ new Map(), currentHandlerStackKey = Symbol();
484
+ var isDeferringHandlers = !1, directiveHandlerStacks = /* @__PURE__ */ new Map(), currentHandlerStackKey = /* @__PURE__ */ Symbol();
455
485
  function deferHandlingDirectives(e) {
456
486
  isDeferringHandlers = !0;
457
- let t = Symbol();
487
+ let t = /* @__PURE__ */ Symbol();
458
488
  currentHandlerStackKey = t, directiveHandlerStacks.set(t, []);
459
489
  let n = () => {
460
490
  for (; directiveHandlerStacks.get(t).length; )
@@ -594,7 +624,9 @@ function findClosest(e, t) {
594
624
  if (e) {
595
625
  if (t(e))
596
626
  return e;
597
- if (e._x_teleportBack && (e = e._x_teleportBack), !!e.parentElement)
627
+ if (e._x_teleportBack && (e = e._x_teleportBack), e.parentNode instanceof ShadowRoot)
628
+ return findClosest(e.parentNode.host, t);
629
+ if (e.parentElement)
598
630
  return findClosest(e.parentElement, t);
599
631
  }
600
632
  }
@@ -1151,7 +1183,7 @@ var Alpine = {
1151
1183
  get raw() {
1152
1184
  return raw;
1153
1185
  },
1154
- version: "3.15.2",
1186
+ version: "3.15.3",
1155
1187
  flushAndStopDeferringMutations,
1156
1188
  dontAutoEvaluateFunctions,
1157
1189
  disableEffectScheduling,
@@ -1172,7 +1204,10 @@ var Alpine = {
1172
1204
  mapAttributes,
1173
1205
  evaluateLater,
1174
1206
  interceptInit,
1207
+ initInterceptors,
1208
+ injectMagics,
1175
1209
  setEvaluator,
1210
+ setRawEvaluator,
1176
1211
  mergeProxies,
1177
1212
  extractProp,
1178
1213
  findClosest,
@@ -1191,6 +1226,7 @@ var Alpine = {
1191
1226
  throttle,
1192
1227
  debounce: debounce$1,
1193
1228
  evaluate,
1229
+ evaluateRaw,
1194
1230
  initTree,
1195
1231
  nextTick,
1196
1232
  prefixed: prefix,
@@ -1219,7 +1255,7 @@ function makeMap(e, t) {
1219
1255
  var EMPTY_OBJ = Object.freeze({}), hasOwnProperty = Object.prototype.hasOwnProperty, hasOwn = (e, t) => hasOwnProperty.call(e, t), isArray = Array.isArray, isMap = (e) => toTypeString(e) === "[object Map]", isString = (e) => typeof e == "string", isSymbol = (e) => typeof e == "symbol", isObject = (e) => e !== null && typeof e == "object", objectToString = Object.prototype.toString, toTypeString = (e) => objectToString.call(e), toRawType = (e) => toTypeString(e).slice(8, -1), isIntegerKey = (e) => isString(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, cacheStringFunction = (e) => {
1220
1256
  const t = /* @__PURE__ */ Object.create(null);
1221
1257
  return (n) => t[n] || (t[n] = e(n));
1222
- }, capitalize = cacheStringFunction((e) => e.charAt(0).toUpperCase() + e.slice(1)), hasChanged = (e, t) => e !== t && (e === e || t === t), targetMap = /* @__PURE__ */ new WeakMap(), effectStack = [], activeEffect, ITERATE_KEY = Symbol("iterate"), MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");
1258
+ }, capitalize = cacheStringFunction((e) => e.charAt(0).toUpperCase() + e.slice(1)), hasChanged = (e, t) => e !== t && (e === e || t === t), targetMap = /* @__PURE__ */ new WeakMap(), effectStack = [], activeEffect, ITERATE_KEY = /* @__PURE__ */ Symbol("iterate"), MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol("Map key iterate");
1223
1259
  function isEffect(e) {
1224
1260
  return e && e._isEffect === !0;
1225
1261
  }
@@ -2084,8 +2120,8 @@ function loop(e, t, n, i) {
2084
2120
  y._x_currentIfEl && (y = y._x_currentIfEl);
2085
2121
  let f = c[g], p = u[g], _ = document.importNode(a.content, !0).firstElementChild, w = reactive(f);
2086
2122
  addScopeToNode(_, w, a), _._x_refreshXForScope = (D) => {
2087
- Object.entries(D).forEach(([A, C]) => {
2088
- w[A] = C;
2123
+ Object.entries(D).forEach(([A, S]) => {
2124
+ w[A] = S;
2089
2125
  });
2090
2126
  }, mutateDom(() => {
2091
2127
  y.after(_), skipDuringClone(() => initTree(_))();
@@ -2168,6 +2204,7 @@ function warnMissingPluginDirective(e, t, n) {
2168
2204
  directive(t, (i) => warn(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`, i));
2169
2205
  }
2170
2206
  alpine_default.setEvaluator(normalEvaluator);
2207
+ alpine_default.setRawEvaluator(normalRawEvaluator);
2171
2208
  alpine_default.setReactivityEngine({ reactive: reactive2, effect: effect2, release: stop, raw: toRaw });
2172
2209
  var src_default = alpine_default, module_default = src_default, Events = (
2173
2210
  /** @class */
@@ -2831,14 +2868,14 @@ function mapToStyles(e) {
2831
2868
  }
2832
2869
  if (r === left || (r === top || r === bottom) && a === end) {
2833
2870
  y = right;
2834
- var C = d && _ === p && p.visualViewport ? p.visualViewport.width : (
2871
+ var S = d && _ === p && p.visualViewport ? p.visualViewport.width : (
2835
2872
  // $FlowFixMe[prop-missing]
2836
2873
  _[D]
2837
2874
  );
2838
- b -= C - i.width, b *= l ? 1 : -1;
2875
+ b -= S - i.width, b *= l ? 1 : -1;
2839
2876
  }
2840
2877
  }
2841
- var S = Object.assign({
2878
+ var C = Object.assign({
2842
2879
  position: o
2843
2880
  }, c && unsetSides), O = u === !0 ? roundOffsetsByDPR({
2844
2881
  x: b,
@@ -2849,9 +2886,9 @@ function mapToStyles(e) {
2849
2886
  };
2850
2887
  if (b = O.x, x = O.y, l) {
2851
2888
  var T;
2852
- return Object.assign({}, S, (T = {}, T[f] = g ? "0" : "", T[y] = E ? "0" : "", T.transform = (p.devicePixelRatio || 1) <= 1 ? "translate(" + b + "px, " + x + "px)" : "translate3d(" + b + "px, " + x + "px, 0)", T));
2889
+ return Object.assign({}, C, (T = {}, T[f] = g ? "0" : "", T[y] = E ? "0" : "", T.transform = (p.devicePixelRatio || 1) <= 1 ? "translate(" + b + "px, " + x + "px)" : "translate3d(" + b + "px, " + x + "px, 0)", T));
2853
2890
  }
2854
- return Object.assign({}, S, (t = {}, t[f] = g ? x + "px" : "", t[y] = E ? b + "px" : "", t.transform = "", t));
2891
+ return Object.assign({}, C, (t = {}, t[f] = g ? x + "px" : "", t[y] = E ? b + "px" : "", t.transform = "", t));
2855
2892
  }
2856
2893
  function computeStyles(e) {
2857
2894
  var t = e.state, n = e.options, i = n.gpuAcceleration, r = i === void 0 ? !0 : i, a = n.adaptive, s = a === void 0 ? !0 : a, o = n.roundOffsets, l = o === void 0 ? !0 : o, c = {
@@ -3055,20 +3092,20 @@ function detectOverflow(e, t) {
3055
3092
  reference: _,
3056
3093
  element: y,
3057
3094
  placement: r
3058
- }), D = rectToClientRect(Object.assign({}, y, w)), A = h === popper ? D : _, C = {
3095
+ }), D = rectToClientRect(Object.assign({}, y, w)), A = h === popper ? D : _, S = {
3059
3096
  top: p.top - A.top + E.top,
3060
3097
  bottom: A.bottom - p.bottom + E.bottom,
3061
3098
  left: p.left - A.left + E.left,
3062
3099
  right: A.right - p.right + E.right
3063
- }, S = e.modifiersData.offset;
3064
- if (h === popper && S) {
3065
- var O = S[r];
3066
- Object.keys(C).forEach(function(T) {
3100
+ }, C = e.modifiersData.offset;
3101
+ if (h === popper && C) {
3102
+ var O = C[r];
3103
+ Object.keys(S).forEach(function(T) {
3067
3104
  var L = [right, bottom].indexOf(T) >= 0 ? 1 : -1, R = [top, bottom].indexOf(T) >= 0 ? "y" : "x";
3068
- C[T] += O[R] * L;
3105
+ S[T] += O[R] * L;
3069
3106
  });
3070
3107
  }
3071
- return C;
3108
+ return S;
3072
3109
  }
3073
3110
  function computeAutoPlacement(e, t) {
3074
3111
  t === void 0 && (t = {});
@@ -3108,9 +3145,9 @@ function flip(e) {
3108
3145
  flipVariations: v,
3109
3146
  allowedAutoPlacements: x
3110
3147
  }) : B);
3111
- }, []), p = t.rects.reference, _ = t.rects.popper, w = /* @__PURE__ */ new Map(), D = !0, A = f[0], C = 0; C < f.length; C++) {
3112
- var S = f[C], O = getBasePlacement(S), T = getVariation(S) === start, L = [top, bottom].indexOf(O) >= 0, R = L ? "width" : "height", H = detectOverflow(t, {
3113
- placement: S,
3148
+ }, []), p = t.rects.reference, _ = t.rects.popper, w = /* @__PURE__ */ new Map(), D = !0, A = f[0], S = 0; S < f.length; S++) {
3149
+ var C = f[S], O = getBasePlacement(C), T = getVariation(C) === start, L = [top, bottom].indexOf(O) >= 0, R = L ? "width" : "height", H = detectOverflow(t, {
3150
+ placement: C,
3114
3151
  boundary: u,
3115
3152
  rootBoundary: d,
3116
3153
  altBoundary: h,
@@ -3121,10 +3158,10 @@ function flip(e) {
3121
3158
  if (a && $.push(H[O] <= 0), o && $.push(H[I] <= 0, H[W] <= 0), $.every(function(V) {
3122
3159
  return V;
3123
3160
  })) {
3124
- A = S, D = !1;
3161
+ A = C, D = !1;
3125
3162
  break;
3126
3163
  }
3127
- w.set(S, $);
3164
+ w.set(C, $);
3128
3165
  }
3129
3166
  if (D)
3130
3167
  for (var q = v ? 3 : 1, N = function(B) {
@@ -3244,13 +3281,13 @@ function preventOverflow(e) {
3244
3281
  altBoundary: u
3245
3282
  }), E = getBasePlacement(t.placement), g = getVariation(t.placement), y = !g, f = getMainAxisFromPlacement(E), p = getAltAxis(f), _ = t.modifiersData.popperOffsets, w = t.rects.reference, D = t.rects.popper, A = typeof x == "function" ? x(Object.assign({}, t.rects, {
3246
3283
  placement: t.placement
3247
- })) : x, C = typeof A == "number" ? {
3284
+ })) : x, S = typeof A == "number" ? {
3248
3285
  mainAxis: A,
3249
3286
  altAxis: A
3250
3287
  } : Object.assign({
3251
3288
  mainAxis: 0,
3252
3289
  altAxis: 0
3253
- }, A), S = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, O = {
3290
+ }, A), C = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, O = {
3254
3291
  x: 0,
3255
3292
  y: 0
3256
3293
  };
@@ -3259,11 +3296,11 @@ function preventOverflow(e) {
3259
3296
  var T, L = f === "y" ? top : left, R = f === "y" ? bottom : right, H = f === "y" ? "height" : "width", I = _[f], W = I + m[L], $ = I - m[R], q = b ? -D[H] / 2 : 0, N = g === start ? w[H] : D[H], P = g === start ? -D[H] : -w[H], j = t.elements.arrow, V = b && j ? getLayoutRect(j) : {
3260
3297
  width: 0,
3261
3298
  height: 0
3262
- }, B = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(), k = B[L], M = B[R], F = within(0, w[H], V[H]), K = y ? w[H] / 2 - q - F - k - C.mainAxis : N - F - k - C.mainAxis, ae = y ? -w[H] / 2 + q + F + M + C.mainAxis : P + F + M + C.mainAxis, Y = t.elements.arrow && getOffsetParent(t.elements.arrow), se = Y ? f === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, J = (T = S?.[f]) != null ? T : 0, oe = I + K - J - se, le = I + ae - J, G = within(b ? min(W, oe) : W, I, b ? max($, le) : $);
3299
+ }, B = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(), k = B[L], M = B[R], F = within(0, w[H], V[H]), K = y ? w[H] / 2 - q - F - k - S.mainAxis : N - F - k - S.mainAxis, ae = y ? -w[H] / 2 + q + F + M + S.mainAxis : P + F + M + S.mainAxis, Y = t.elements.arrow && getOffsetParent(t.elements.arrow), se = Y ? f === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, J = (T = C?.[f]) != null ? T : 0, oe = I + K - J - se, le = I + ae - J, G = within(b ? min(W, oe) : W, I, b ? max($, le) : $);
3263
3300
  _[f] = G, O[f] = G - I;
3264
3301
  }
3265
3302
  if (o) {
3266
- var Z, ce = f === "x" ? top : left, ue = f === "x" ? bottom : right, z = _[p], U = p === "y" ? "height" : "width", Q = z + m[ce], ee = z - m[ue], X = [top, left].indexOf(E) !== -1, te = (Z = S?.[p]) != null ? Z : 0, ne = X ? Q : z - w[U] - D[U] - te + C.altAxis, ie = X ? z + w[U] + D[U] - te - C.altAxis : ee, re = b && X ? withinMaxClamp(ne, z, ie) : within(b ? ne : Q, z, b ? ie : ee);
3303
+ var Z, ce = f === "x" ? top : left, ue = f === "x" ? bottom : right, z = _[p], U = p === "y" ? "height" : "width", Q = z + m[ce], ee = z - m[ue], X = [top, left].indexOf(E) !== -1, te = (Z = C?.[p]) != null ? Z : 0, ne = X ? Q : z - w[U] - D[U] - te + S.altAxis, ie = X ? z + w[U] + D[U] - te - S.altAxis : ee, re = b && X ? withinMaxClamp(ne, z, ie) : within(b ? ne : Q, z, b ? ie : ee);
3267
3304
  _[p] = re, O[p] = re - z;
3268
3305
  }
3269
3306
  t.modifiersData[i] = O;
@@ -3408,8 +3445,8 @@ function popperGenerator(e) {
3408
3445
  u.rects = {
3409
3446
  reference: getCompositeRect(g, getOffsetParent(y), u.options.strategy === "fixed"),
3410
3447
  popper: getLayoutRect(y)
3411
- }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(C) {
3412
- return u.modifiersData[C.name] = Object.assign({}, C.data);
3448
+ }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(S) {
3449
+ return u.modifiersData[S.name] = Object.assign({}, S.data);
3413
3450
  });
3414
3451
  for (var f = 0; f < u.orderedModifiers.length; f++) {
3415
3452
  if (u.reset === !0) {
@@ -5119,10 +5156,10 @@ function processOptions(e, t) {
5119
5156
  n.dateDelimiter && (i.dateDelimiter = String(n.dateDelimiter), delete n.dateDelimiter);
5120
5157
  var A = h;
5121
5158
  n.pickLevel !== void 0 && (A = validateViewId(n.pickLevel, 2), delete n.pickLevel), A !== h && (h = i.pickLevel = A);
5122
- var C = u;
5123
- n.maxView !== void 0 && (C = validateViewId(n.maxView, u), delete n.maxView), C = h > C ? h : C, C !== u && (u = i.maxView = C);
5124
- var S = b;
5125
- if (n.startView !== void 0 && (S = validateViewId(n.startView, S), delete n.startView), S < h ? S = h : S > u && (S = u), S !== b && (i.startView = S), n.prevArrow) {
5159
+ var S = u;
5160
+ n.maxView !== void 0 && (S = validateViewId(n.maxView, u), delete n.maxView), S = h > S ? h : S, S !== u && (u = i.maxView = S);
5161
+ var C = b;
5162
+ if (n.startView !== void 0 && (C = validateViewId(n.startView, C), delete n.startView), C < h ? C = h : C > u && (C = u), C !== b && (i.startView = C), n.prevArrow) {
5126
5163
  var O = parseHTML(n.prevArrow);
5127
5164
  O.childNodes.length > 0 && (i.prevArrow = O.childNodes), delete n.prevArrow;
5128
5165
  }
@@ -5676,8 +5713,8 @@ var Picker = /* @__PURE__ */ (function() {
5676
5713
  }, {
5677
5714
  key: "place",
5678
5715
  value: function() {
5679
- var n = this.element, i = n.classList, r = n.style, a = this.datepicker, s = a.config, o = a.inputField, l = s.container, c = this.element.getBoundingClientRect(), u = c.width, d = c.height, h = l.getBoundingClientRect(), b = h.left, v = h.top, x = h.width, m = o.getBoundingClientRect(), E = m.left, g = m.top, y = m.width, f = m.height, p = s.orientation, _ = p.x, w = p.y, D, A, C;
5680
- l === document.body ? (D = window.scrollY, A = E + window.scrollX, C = g + D) : (D = l.scrollTop, A = E - b, C = g - v + D), _ === "auto" && (A < 0 ? (_ = "left", A = 10) : A + u > x ? _ = "right" : _ = getTextDirection(o) === "rtl" ? "right" : "left"), _ === "right" && (A -= u - y), w === "auto" && (w = C - d < D ? "bottom" : "top"), w === "top" ? C -= d : C += f, i.remove("datepicker-orient-top", "datepicker-orient-bottom", "datepicker-orient-right", "datepicker-orient-left"), i.add("datepicker-orient-".concat(w), "datepicker-orient-".concat(_)), r.top = C && "".concat(C, "px"), r.left = A && "".concat(A, "px");
5716
+ var n = this.element, i = n.classList, r = n.style, a = this.datepicker, s = a.config, o = a.inputField, l = s.container, c = this.element.getBoundingClientRect(), u = c.width, d = c.height, h = l.getBoundingClientRect(), b = h.left, v = h.top, x = h.width, m = o.getBoundingClientRect(), E = m.left, g = m.top, y = m.width, f = m.height, p = s.orientation, _ = p.x, w = p.y, D, A, S;
5717
+ l === document.body ? (D = window.scrollY, A = E + window.scrollX, S = g + D) : (D = l.scrollTop, A = E - b, S = g - v + D), _ === "auto" && (A < 0 ? (_ = "left", A = 10) : A + u > x ? _ = "right" : _ = getTextDirection(o) === "rtl" ? "right" : "left"), _ === "right" && (A -= u - y), w === "auto" && (w = S - d < D ? "bottom" : "top"), w === "top" ? S -= d : S += f, i.remove("datepicker-orient-top", "datepicker-orient-bottom", "datepicker-orient-right", "datepicker-orient-left"), i.add("datepicker-orient-".concat(w), "datepicker-orient-".concat(_)), r.top = S && "".concat(S, "px"), r.left = A && "".concat(A, "px");
5681
5718
  }
5682
5719
  }, {
5683
5720
  key: "setViewSwitchLabel",
@@ -8421,9 +8458,9 @@ var htmx = (function() {
8421
8458
  e !== "get" && !usesFormData(n) && (w["Content-Type"] = "application/x-www-form-urlencoded"), r.headers && (w = mergeObjects(w, r.headers));
8422
8459
  const D = getInputValues(n, e);
8423
8460
  let A = D.errors;
8424
- const C = D.formData;
8425
- r.values && overrideFormData(C, formDataFromObject(r.values));
8426
- const S = formDataFromObject(getExpressionVars(n, i)), O = overrideFormData(C, S);
8461
+ const S = D.formData;
8462
+ r.values && overrideFormData(S, formDataFromObject(r.values));
8463
+ const C = formDataFromObject(getExpressionVars(n, i)), O = overrideFormData(S, C);
8427
8464
  let T = filterValues(O, n);
8428
8465
  htmx.config.getCacheBusterParam && e === "get" && T.set("org.htmx.cache-buster", getRawAttribute(d, "id") || "true"), (t == null || t === "") && (t = location.href);
8429
8466
  const L = getValuesForElement(n, "hx-request"), R = getInternalData(n).boosted;
@@ -8784,26 +8821,26 @@ var htmx = (function() {
8784
8821
  p instanceof HTMLTemplateElement && _ instanceof HTMLTemplateElement && (p = p.content, _ = _.content), w ||= p.firstChild;
8785
8822
  for (const A of _.childNodes) {
8786
8823
  if (w && w != D) {
8787
- const S = v(
8824
+ const C = v(
8788
8825
  f,
8789
8826
  A,
8790
8827
  w,
8791
8828
  D
8792
8829
  );
8793
- if (S) {
8794
- S !== w && m(f, w, S), s(S, A, f), w = S.nextSibling;
8830
+ if (C) {
8831
+ C !== w && m(f, w, C), s(C, A, f), w = C.nextSibling;
8795
8832
  continue;
8796
8833
  }
8797
8834
  }
8798
8835
  if (A instanceof Element) {
8799
- const S = (
8836
+ const C = (
8800
8837
  /** @type {String} */
8801
8838
  A.getAttribute("id")
8802
8839
  );
8803
- if (f.persistentIds.has(S)) {
8840
+ if (f.persistentIds.has(C)) {
8804
8841
  const O = E(
8805
8842
  p,
8806
- S,
8843
+ C,
8807
8844
  w,
8808
8845
  f
8809
8846
  );
@@ -8811,13 +8848,13 @@ var htmx = (function() {
8811
8848
  continue;
8812
8849
  }
8813
8850
  }
8814
- const C = b(
8851
+ const S = b(
8815
8852
  p,
8816
8853
  A,
8817
8854
  w,
8818
8855
  f
8819
8856
  );
8820
- C && (w = C.nextSibling);
8857
+ S && (w = S.nextSibling);
8821
8858
  }
8822
8859
  for (; w && w != D; ) {
8823
8860
  const A = w;
@@ -8838,24 +8875,24 @@ var htmx = (function() {
8838
8875
  }
8839
8876
  }
8840
8877
  const v = /* @__PURE__ */ (function() {
8841
- function f(w, D, A, C) {
8842
- let S = null, O = D.nextSibling, T = 0, L = A;
8843
- for (; L && L != C; ) {
8878
+ function f(w, D, A, S) {
8879
+ let C = null, O = D.nextSibling, T = 0, L = A;
8880
+ for (; L && L != S; ) {
8844
8881
  if (_(L, D)) {
8845
8882
  if (p(w, L, D))
8846
8883
  return L;
8847
- S === null && (w.idMap.has(L) || (S = L));
8884
+ C === null && (w.idMap.has(L) || (C = L));
8848
8885
  }
8849
- if (S === null && O && _(L, O) && (T++, O = O.nextSibling, T >= 2 && (S = void 0)), w.activeElementAndParents.includes(L)) break;
8886
+ if (C === null && O && _(L, O) && (T++, O = O.nextSibling, T >= 2 && (C = void 0)), w.activeElementAndParents.includes(L)) break;
8850
8887
  L = L.nextSibling;
8851
8888
  }
8852
- return S || null;
8889
+ return C || null;
8853
8890
  }
8854
8891
  function p(w, D, A) {
8855
- let C = w.idMap.get(D), S = w.idMap.get(A);
8856
- if (!S || !C) return !1;
8857
- for (const O of C)
8858
- if (S.has(O))
8892
+ let S = w.idMap.get(D), C = w.idMap.get(A);
8893
+ if (!C || !S) return !1;
8894
+ for (const O of S)
8895
+ if (C.has(O))
8859
8896
  return !0;
8860
8897
  return !1;
8861
8898
  }
@@ -8863,15 +8900,15 @@ var htmx = (function() {
8863
8900
  const A = (
8864
8901
  /** @type {Element} */
8865
8902
  w
8866
- ), C = (
8903
+ ), S = (
8867
8904
  /** @type {Element} */
8868
8905
  D
8869
8906
  );
8870
- return A.nodeType === C.nodeType && A.tagName === C.tagName && // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.
8907
+ return A.nodeType === S.nodeType && A.tagName === S.tagName && // If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.
8871
8908
  // We'll still match an anonymous node with an IDed newElt, though, because if it got this far,
8872
8909
  // its not persistent, and new nodes can't have any hidden state.
8873
8910
  // We can't use .id because of form input shadowing, and we can't count on .getAttribute's presence because it could be a document-fragment
8874
- (!A.getAttribute?.("id") || A.getAttribute?.("id") === C.getAttribute?.("id"));
8911
+ (!A.getAttribute?.("id") || A.getAttribute?.("id") === S.getAttribute?.("id"));
8875
8912
  }
8876
8913
  return f;
8877
8914
  })();
@@ -8943,14 +8980,14 @@ var htmx = (function() {
8943
8980
  /** @type {Element} */
8944
8981
  y
8945
8982
  ), D = _.attributes, A = w.attributes;
8946
- for (const C of A)
8947
- m(C.name, _, "update", f) || _.getAttribute(C.name) !== C.value && _.setAttribute(C.name, C.value);
8948
- for (let C = D.length - 1; 0 <= C; C--) {
8949
- const S = D[C];
8950
- if (S && !w.hasAttribute(S.name)) {
8951
- if (m(S.name, _, "remove", f))
8983
+ for (const S of A)
8984
+ m(S.name, _, "update", f) || _.getAttribute(S.name) !== S.value && _.setAttribute(S.name, S.value);
8985
+ for (let S = D.length - 1; 0 <= S; S--) {
8986
+ const C = D[S];
8987
+ if (C && !w.hasAttribute(C.name)) {
8988
+ if (m(C.name, _, "remove", f))
8952
8989
  continue;
8953
- _.removeAttribute(S.name);
8990
+ _.removeAttribute(C.name);
8954
8991
  }
8955
8992
  }
8956
8993
  E(_, f) || v(_, w, f);
@@ -9045,14 +9082,14 @@ var htmx = (function() {
9045
9082
  }
9046
9083
  const c = /* @__PURE__ */ (function() {
9047
9084
  function h(f, p, _) {
9048
- const { persistentIds: w, idMap: D } = g(f, p), A = b(_), C = A.morphStyle || "outerHTML";
9049
- if (!["innerHTML", "outerHTML"].includes(C))
9050
- throw `Do not understand how to morph style ${C}`;
9085
+ const { persistentIds: w, idMap: D } = g(f, p), A = b(_), S = A.morphStyle || "outerHTML";
9086
+ if (!["innerHTML", "outerHTML"].includes(S))
9087
+ throw `Do not understand how to morph style ${S}`;
9051
9088
  return {
9052
9089
  target: f,
9053
9090
  newContent: p,
9054
9091
  config: A,
9055
- morphStyle: C,
9092
+ morphStyle: S,
9056
9093
  ignoreActive: A.ignoreActive,
9057
9094
  ignoreActiveValue: A.ignoreActiveValue,
9058
9095
  restoreFocus: A.restoreFocus,
@@ -9094,11 +9131,11 @@ var htmx = (function() {
9094
9131
  D.getAttribute("id")
9095
9132
  );
9096
9133
  if (p.has(A)) {
9097
- let C = D;
9098
- for (; C; ) {
9099
- let S = f.get(C);
9100
- if (S == null && (S = /* @__PURE__ */ new Set(), f.set(C, S)), S.add(A), C === _) break;
9101
- C = C.parentElement;
9134
+ let S = D;
9135
+ for (; S; ) {
9136
+ let C = f.get(S);
9137
+ if (C == null && (C = /* @__PURE__ */ new Set(), f.set(S, C)), C.add(A), S === _) break;
9138
+ S = S.parentElement;
9102
9139
  }
9103
9140
  }
9104
9141
  }
@@ -9107,16 +9144,16 @@ var htmx = (function() {
9107
9144
  const _ = m(f), w = m(p), D = y(_, w);
9108
9145
  let A = /* @__PURE__ */ new Map();
9109
9146
  E(A, D, f, _);
9110
- const C = p.__idiomorphRoot || p;
9111
- return E(A, D, C, w), { persistentIds: D, idMap: A };
9147
+ const S = p.__idiomorphRoot || p;
9148
+ return E(A, D, S, w), { persistentIds: D, idMap: A };
9112
9149
  }
9113
9150
  function y(f, p) {
9114
9151
  let _ = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map();
9115
- for (const { id: A, tagName: C } of f)
9116
- w.has(A) ? _.add(A) : w.set(A, C);
9152
+ for (const { id: A, tagName: S } of f)
9153
+ w.has(A) ? _.add(A) : w.set(A, S);
9117
9154
  let D = /* @__PURE__ */ new Set();
9118
- for (const { id: A, tagName: C } of p)
9119
- D.has(A) ? _.add(A) : w.get(A) === C && D.add(A);
9155
+ for (const { id: A, tagName: S } of p)
9156
+ D.has(A) ? _.add(A) : w.get(A) === S && D.add(A);
9120
9157
  for (const A of _)
9121
9158
  D.delete(A);
9122
9159
  return D;