@bedrock-layout/solid 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.m.js CHANGED
@@ -1,9 +1,10 @@
1
- import rt from "open-props";
2
- import { splitProps as X, untrack as W, createRenderEffect as w, createMemo as M, sharedConfig as g, createComponent as T, mergeProps as d, createContext as ct, useContext as lt, createSignal as O, onMount as U, createEffect as q, onCleanup as Q, children as at } from "solid-js";
3
- import { init as Y, registerCallback as J } from "@bedrock-layout/register-resize-callback";
4
- const ft = [
1
+ import ce from "open-props";
2
+ import { splitProps as X, createMemo as N, createRenderEffect as A, sharedConfig as h, untrack as M, createComponent as I, mergeProps as d, useContext as ae, createContext as le, createSignal as O, onMount as q, createEffect as Q, onCleanup as Y, children as fe } from "solid-js";
3
+ import { init as J, registerCallback as Z } from "@bedrock-layout/register-resize-callback";
4
+ const ue = [
5
5
  "allowfullscreen",
6
6
  "async",
7
+ "alpha",
7
8
  "autofocus",
8
9
  "autoplay",
9
10
  "checked",
@@ -26,26 +27,55 @@ const ft = [
26
27
  "required",
27
28
  "reversed",
28
29
  "seamless",
29
- "selected"
30
- ], ut = /* @__PURE__ */ new Set([
30
+ "selected",
31
+ "adauctionheaders",
32
+ "browsingtopics",
33
+ "credentialless",
34
+ "defaultchecked",
35
+ "defaultmuted",
36
+ "defaultselected",
37
+ "defer",
38
+ "disablepictureinpicture",
39
+ "disableremoteplayback",
40
+ "preservespitch",
41
+ "shadowrootclonable",
42
+ "shadowrootcustomelementregistry",
43
+ "shadowrootdelegatesfocus",
44
+ "shadowrootserializable",
45
+ "sharedstoragewritable"
46
+ ], de = /* @__PURE__ */ new Set([
31
47
  "className",
32
48
  "value",
33
49
  "readOnly",
50
+ "noValidate",
34
51
  "formNoValidate",
35
52
  "isMap",
36
53
  "noModule",
37
54
  "playsInline",
38
- ...ft
39
- ]), dt = /* @__PURE__ */ new Set([
40
- "innerHTML",
41
- "textContent",
42
- "innerText",
43
- "children"
44
- ]), yt = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
55
+ "adAuctionHeaders",
56
+ "allowFullscreen",
57
+ "browsingTopics",
58
+ "defaultChecked",
59
+ "defaultMuted",
60
+ "defaultSelected",
61
+ "disablePictureInPicture",
62
+ "disableRemotePlayback",
63
+ "preservesPitch",
64
+ "shadowRootClonable",
65
+ "shadowRootCustomElementRegistry",
66
+ "shadowRootDelegatesFocus",
67
+ "shadowRootSerializable",
68
+ "sharedStorageWritable",
69
+ ...ue
70
+ ]), ye = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), he = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
45
71
  className: "class",
46
72
  htmlFor: "for"
47
- }), gt = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
73
+ }), ge = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
48
74
  class: "className",
75
+ novalidate: {
76
+ $: "noValidate",
77
+ FORM: 1
78
+ },
49
79
  formnovalidate: {
50
80
  $: "formNoValidate",
51
81
  BUTTON: 1,
@@ -67,36 +97,69 @@ const ft = [
67
97
  $: "readOnly",
68
98
  INPUT: 1,
69
99
  TEXTAREA: 1
100
+ },
101
+ adauctionheaders: {
102
+ $: "adAuctionHeaders",
103
+ IFRAME: 1
104
+ },
105
+ allowfullscreen: {
106
+ $: "allowFullscreen",
107
+ IFRAME: 1
108
+ },
109
+ browsingtopics: {
110
+ $: "browsingTopics",
111
+ IMG: 1
112
+ },
113
+ defaultchecked: {
114
+ $: "defaultChecked",
115
+ INPUT: 1
116
+ },
117
+ defaultmuted: {
118
+ $: "defaultMuted",
119
+ AUDIO: 1,
120
+ VIDEO: 1
121
+ },
122
+ defaultselected: {
123
+ $: "defaultSelected",
124
+ OPTION: 1
125
+ },
126
+ disablepictureinpicture: {
127
+ $: "disablePictureInPicture",
128
+ VIDEO: 1
129
+ },
130
+ disableremoteplayback: {
131
+ $: "disableRemotePlayback",
132
+ AUDIO: 1,
133
+ VIDEO: 1
134
+ },
135
+ preservespitch: {
136
+ $: "preservesPitch",
137
+ AUDIO: 1,
138
+ VIDEO: 1
139
+ },
140
+ shadowrootclonable: {
141
+ $: "shadowRootClonable",
142
+ TEMPLATE: 1
143
+ },
144
+ shadowrootdelegatesfocus: {
145
+ $: "shadowRootDelegatesFocus",
146
+ TEMPLATE: 1
147
+ },
148
+ shadowrootserializable: {
149
+ $: "shadowRootSerializable",
150
+ TEMPLATE: 1
151
+ },
152
+ sharedstoragewritable: {
153
+ $: "sharedStorageWritable",
154
+ IFRAME: 1,
155
+ IMG: 1
70
156
  }
71
157
  });
72
- function mt(t, e) {
73
- const n = gt[t];
74
- return typeof n == "object" ? n[e] ? n.$ : void 0 : n;
75
- }
76
- const ht = /* @__PURE__ */ new Set([
77
- "beforeinput",
78
- "click",
79
- "dblclick",
80
- "contextmenu",
81
- "focusin",
82
- "focusout",
83
- "input",
84
- "keydown",
85
- "keyup",
86
- "mousedown",
87
- "mousemove",
88
- "mouseout",
89
- "mouseover",
90
- "mouseup",
91
- "pointerdown",
92
- "pointermove",
93
- "pointerout",
94
- "pointerover",
95
- "pointerup",
96
- "touchend",
97
- "touchmove",
98
- "touchstart"
99
- ]), bt = /* @__PURE__ */ new Set([
158
+ function me(e, t) {
159
+ const n = ge[e];
160
+ return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
161
+ }
162
+ const be = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), $e = /* @__PURE__ */ new Set([
100
163
  "altGlyph",
101
164
  "altGlyphDef",
102
165
  "altGlyphItem",
@@ -174,357 +237,352 @@ const ht = /* @__PURE__ */ new Set([
174
237
  "use",
175
238
  "view",
176
239
  "vkern"
177
- ]), $t = {
240
+ ]), we = {
178
241
  xlink: "http://www.w3.org/1999/xlink",
179
242
  xml: "http://www.w3.org/XML/1998/namespace"
180
- };
181
- function St(t, e, n) {
182
- let i = n.length, s = e.length, o = i, c = 0, r = 0, l = e[s - 1].nextSibling, a = null;
243
+ }, B = (e) => N(() => e());
244
+ function Se(e, t, n) {
245
+ let i = n.length, s = t.length, o = i, c = 0, r = 0, a = t[s - 1].nextSibling, l = null;
183
246
  for (; c < s || r < o; ) {
184
- if (e[c] === n[r]) {
247
+ if (t[c] === n[r]) {
185
248
  c++, r++;
186
249
  continue;
187
250
  }
188
- for (; e[s - 1] === n[o - 1]; )
251
+ for (; t[s - 1] === n[o - 1]; )
189
252
  s--, o--;
190
253
  if (s === c) {
191
- const f = o < i ? r ? n[r - 1].nextSibling : n[o - r] : l;
192
- for (; r < o; ) t.insertBefore(n[r++], f);
254
+ const f = o < i ? r ? n[r - 1].nextSibling : n[o - r] : a;
255
+ for (; r < o; ) e.insertBefore(n[r++], f);
193
256
  } else if (o === r)
194
257
  for (; c < s; )
195
- (!a || !a.has(e[c])) && e[c].remove(), c++;
196
- else if (e[c] === n[o - 1] && n[r] === e[s - 1]) {
197
- const f = e[--s].nextSibling;
198
- t.insertBefore(n[r++], e[c++].nextSibling), t.insertBefore(n[--o], f), e[s] = n[o];
258
+ (!l || !l.has(t[c])) && t[c].remove(), c++;
259
+ else if (t[c] === n[o - 1] && n[r] === t[s - 1]) {
260
+ const f = t[--s].nextSibling;
261
+ e.insertBefore(n[r++], t[c++].nextSibling), e.insertBefore(n[--o], f), t[s] = n[o];
199
262
  } else {
200
- if (!a) {
201
- a = /* @__PURE__ */ new Map();
263
+ if (!l) {
264
+ l = /* @__PURE__ */ new Map();
202
265
  let y = r;
203
- for (; y < o; ) a.set(n[y], y++);
266
+ for (; y < o; ) l.set(n[y], y++);
204
267
  }
205
- const f = a.get(e[c]);
268
+ const f = l.get(t[c]);
206
269
  if (f != null)
207
270
  if (r < f && f < o) {
208
271
  let y = c, u = 1, $;
209
- for (; ++y < s && y < o && !(($ = a.get(e[y])) == null || $ !== f + u); )
272
+ for (; ++y < s && y < o && !(($ = l.get(t[y])) == null || $ !== f + u); )
210
273
  u++;
211
274
  if (u > f - r) {
212
- const C = e[c];
213
- for (; r < f; ) t.insertBefore(n[r++], C);
214
- } else t.replaceChild(n[r++], e[c++]);
275
+ const j = t[c];
276
+ for (; r < f; ) e.insertBefore(n[r++], j);
277
+ } else e.replaceChild(n[r++], t[c++]);
215
278
  } else c++;
216
- else e[c++].remove();
279
+ else t[c++].remove();
217
280
  }
218
281
  }
219
282
  }
220
- const R = "_$DX_DELEGATE";
221
- function Z(t, e, n, i) {
283
+ const F = "_$DX_DELEGATE";
284
+ function K(e, t, n, i) {
222
285
  let s;
223
286
  const o = () => {
224
287
  const r = document.createElement("template");
225
- return r.innerHTML = t, r.content.firstChild;
226
- }, c = e ? () => W(() => document.importNode(s || (s = o()), !0)) : () => (s || (s = o())).cloneNode(!0);
288
+ return r.innerHTML = e, r.content.firstChild;
289
+ }, c = t ? () => M(() => document.importNode(s || (s = o()), !0)) : () => (s || (s = o())).cloneNode(!0);
227
290
  return c.cloneNode = c, c;
228
291
  }
229
- function xt(t, e = window.document) {
230
- const n = e[R] || (e[R] = /* @__PURE__ */ new Set());
231
- for (let i = 0, s = t.length; i < s; i++) {
232
- const o = t[i];
233
- n.has(o) || (n.add(o), e.addEventListener(o, Ot));
292
+ function Ae(e, t = window.document) {
293
+ const n = t[F] || (t[F] = /* @__PURE__ */ new Set());
294
+ for (let i = 0, s = e.length; i < s; i++) {
295
+ const o = e[i];
296
+ n.has(o) || (n.add(o), t.addEventListener(o, ve));
234
297
  }
235
298
  }
236
- function N(t, e, n) {
237
- j(t) || (n == null ? t.removeAttribute(e) : t.setAttribute(e, n));
299
+ function k(e, t, n) {
300
+ x(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
238
301
  }
239
- function wt(t, e, n, i) {
240
- j(t) || (i == null ? t.removeAttributeNS(e, n) : t.setAttributeNS(e, n, i));
302
+ function xe(e, t, n, i) {
303
+ x(e) || (i == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, i));
241
304
  }
242
- function jt(t, e, n) {
243
- j(t) || (n ? t.setAttribute(e, "") : t.removeAttribute(e));
305
+ function Ce(e, t, n) {
306
+ x(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
244
307
  }
245
- function At(t, e) {
246
- j(t) || (e == null ? t.removeAttribute("class") : t.className = e);
308
+ function je(e, t) {
309
+ x(e) || (t == null ? e.removeAttribute("class") : e.className = t);
247
310
  }
248
- function Ct(t, e, n, i) {
311
+ function Ee(e, t, n, i) {
249
312
  if (i)
250
- Array.isArray(n) ? (t[`$$${e}`] = n[0], t[`$$${e}Data`] = n[1]) : t[`$$${e}`] = n;
313
+ Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
251
314
  else if (Array.isArray(n)) {
252
315
  const s = n[0];
253
- t.addEventListener(e, n[0] = (o) => s.call(t, n[1], o));
254
- } else t.addEventListener(e, n, typeof n != "function" && n);
316
+ e.addEventListener(t, n[0] = (o) => s.call(e, n[1], o));
317
+ } else e.addEventListener(t, n, typeof n != "function" && n);
255
318
  }
256
- function Et(t, e, n = {}) {
257
- const i = Object.keys(e || {}), s = Object.keys(n);
319
+ function Ie(e, t, n = {}) {
320
+ const i = Object.keys(t || {}), s = Object.keys(n);
258
321
  let o, c;
259
322
  for (o = 0, c = s.length; o < c; o++) {
260
323
  const r = s[o];
261
- !r || r === "undefined" || e[r] || (G(t, r, !1), delete n[r]);
324
+ !r || r === "undefined" || t[r] || (G(e, r, !1), delete n[r]);
262
325
  }
263
326
  for (o = 0, c = i.length; o < c; o++) {
264
- const r = i[o], l = !!e[r];
265
- !r || r === "undefined" || n[r] === l || !l || (G(t, r, !0), n[r] = l);
327
+ const r = i[o], a = !!t[r];
328
+ !r || r === "undefined" || n[r] === a || !a || (G(e, r, !0), n[r] = a);
266
329
  }
267
330
  return n;
268
331
  }
269
- function K(t, e, n) {
270
- if (!e) return n ? N(t, "style") : e;
271
- const i = t.style;
272
- if (typeof e == "string") return i.cssText = e;
273
- typeof n == "string" && (i.cssText = n = void 0), n || (n = {}), e || (e = {});
332
+ function p(e, t, n) {
333
+ if (!t) return n ? k(e, "style") : t;
334
+ const i = e.style;
335
+ if (typeof t == "string") return i.cssText = t;
336
+ typeof n == "string" && (i.cssText = n = void 0), n || (n = {}), t || (t = {});
274
337
  let s, o;
275
338
  for (o in n)
276
- e[o] == null && i.removeProperty(o), delete n[o];
277
- for (o in e)
278
- s = e[o], s !== n[o] && (i.setProperty(o, s), n[o] = s);
339
+ t[o] == null && i.removeProperty(o), delete n[o];
340
+ for (o in t)
341
+ s = t[o], s !== n[o] && (i.setProperty(o, s), n[o] = s);
279
342
  return n;
280
343
  }
281
- function Tt(t, e = {}, n, i) {
344
+ function Te(e, t = {}, n, i) {
282
345
  const s = {};
283
- return w(
284
- () => s.children = I(t, e.children, s.children)
285
- ), w(() => typeof e.ref == "function" && p(e.ref, t)), w(() => It(t, e, n, !0, s, !0)), s;
346
+ return A(() => s.children = T(e, t.children, s.children)), A(() => typeof t.ref == "function" && ee(t.ref, e)), A(() => Pe(e, t, n, !0, s, !0)), s;
286
347
  }
287
- function p(t, e, n) {
288
- return W(() => t(e, n));
348
+ function ee(e, t, n) {
349
+ return M(() => e(t, n));
289
350
  }
290
- function tt(t, e, n, i) {
291
- if (typeof e != "function") return I(t, e, i, n);
292
- w((s) => I(t, e(), s, n), i);
351
+ function te(e, t, n, i) {
352
+ if (typeof t != "function") return T(e, t, i, n);
353
+ A((s) => T(e, t(), s, n), i);
293
354
  }
294
- function It(t, e, n, i, s = {}, o = !1) {
295
- e || (e = {});
355
+ function Pe(e, t, n, i, s = {}, o = !1) {
356
+ t || (t = {});
296
357
  for (const c in s)
297
- if (!(c in e)) {
358
+ if (!(c in t)) {
298
359
  if (c === "children") continue;
299
- s[c] = H(t, c, null, s[c], n, o, e);
360
+ s[c] = H(e, c, null, s[c], n, o, t);
300
361
  }
301
- for (const c in e) {
362
+ for (const c in t) {
302
363
  if (c === "children")
303
364
  continue;
304
- const r = e[c];
305
- s[c] = H(t, c, r, s[c], n, o, e);
365
+ const r = t[c];
366
+ s[c] = H(e, c, r, s[c], n, o, t);
306
367
  }
307
368
  }
308
- function vt(t) {
309
- let e, n;
310
- return !j() || !(e = g.registry.get(n = Pt())) ? t() : (g.completed && g.completed.add(e), g.registry.delete(n), e);
369
+ function Me(e) {
370
+ let t, n;
371
+ return !x() || !(t = h.registry.get(n = ze())) ? e() : (h.completed && h.completed.add(t), h.registry.delete(n), t);
311
372
  }
312
- function j(t) {
313
- return !!g.context && !g.done && (!t || t.isConnected);
373
+ function x(e) {
374
+ return !!h.context && !h.done && (!e || e.isConnected);
314
375
  }
315
- function Mt(t) {
316
- return t.toLowerCase().replace(/-([a-z])/g, (e, n) => n.toUpperCase());
376
+ function Oe(e) {
377
+ return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
317
378
  }
318
- function G(t, e, n) {
319
- const i = e.trim().split(/\s+/);
320
- for (let s = 0, o = i.length; s < o; s++)
321
- t.classList.toggle(i[s], n);
379
+ function G(e, t, n) {
380
+ const i = t.trim().split(/\s+/);
381
+ for (let s = 0, o = i.length; s < o; s++) e.classList.toggle(i[s], n);
322
382
  }
323
- function H(t, e, n, i, s, o, c) {
324
- let r, l, a, f, y;
325
- if (e === "style") return K(t, n, i);
326
- if (e === "classList") return Et(t, n, i);
383
+ function H(e, t, n, i, s, o, c) {
384
+ let r, a, l, f, y;
385
+ if (t === "style") return p(e, n, i);
386
+ if (t === "classList") return Ie(e, n, i);
327
387
  if (n === i) return i;
328
- if (e === "ref")
329
- o || n(t);
330
- else if (e.slice(0, 3) === "on:") {
331
- const u = e.slice(3);
332
- i && t.removeEventListener(u, i, typeof i != "function" && i), n && t.addEventListener(u, n, typeof n != "function" && n);
333
- } else if (e.slice(0, 10) === "oncapture:") {
334
- const u = e.slice(10);
335
- i && t.removeEventListener(u, i, !0), n && t.addEventListener(u, n, !0);
336
- } else if (e.slice(0, 2) === "on") {
337
- const u = e.slice(2).toLowerCase(), $ = ht.has(u);
388
+ if (t === "ref")
389
+ o || n(e);
390
+ else if (t.slice(0, 3) === "on:") {
391
+ const u = t.slice(3);
392
+ i && e.removeEventListener(u, i, typeof i != "function" && i), n && e.addEventListener(u, n, typeof n != "function" && n);
393
+ } else if (t.slice(0, 10) === "oncapture:") {
394
+ const u = t.slice(10);
395
+ i && e.removeEventListener(u, i, !0), n && e.addEventListener(u, n, !0);
396
+ } else if (t.slice(0, 2) === "on") {
397
+ const u = t.slice(2).toLowerCase(), $ = be.has(u);
338
398
  if (!$ && i) {
339
- const C = Array.isArray(i) ? i[0] : i;
340
- t.removeEventListener(u, C);
399
+ const j = Array.isArray(i) ? i[0] : i;
400
+ e.removeEventListener(u, j);
341
401
  }
342
- ($ || n) && (Ct(t, u, n, $), $ && xt([u]));
343
- } else if (e.slice(0, 5) === "attr:")
344
- N(t, e.slice(5), n);
345
- else if (e.slice(0, 5) === "bool:")
346
- jt(t, e.slice(5), n);
347
- else if ((y = e.slice(0, 5) === "prop:") || (a = dt.has(e)) || !s && ((f = mt(e, t.tagName)) || (l = ut.has(e))) || (r = t.nodeName.includes("-") || "is" in c)) {
402
+ ($ || n) && (Ee(e, u, n, $), $ && Ae([u]));
403
+ } else if (t.slice(0, 5) === "attr:")
404
+ k(e, t.slice(5), n);
405
+ else if (t.slice(0, 5) === "bool:")
406
+ Ce(e, t.slice(5), n);
407
+ else if ((y = t.slice(0, 5) === "prop:") || (l = ye.has(t)) || !s && ((f = me(t, e.tagName)) || (a = de.has(t))) || (r = e.nodeName.includes("-") || "is" in c)) {
348
408
  if (y)
349
- e = e.slice(5), l = !0;
350
- else if (j(t)) return n;
351
- e === "class" || e === "className" ? At(t, n) : r && !l && !a ? t[Mt(e)] = n : t[f || e] = n;
409
+ t = t.slice(5), a = !0;
410
+ else if (x(e)) return n;
411
+ t === "class" || t === "className" ? je(e, n) : r && !a && !l ? e[Oe(t)] = n : e[f || t] = n;
352
412
  } else {
353
- const u = s && e.indexOf(":") > -1 && $t[e.split(":")[0]];
354
- u ? wt(t, u, e, n) : N(t, yt[e] || e, n);
413
+ const u = s && t.indexOf(":") > -1 && we[t.split(":")[0]];
414
+ u ? xe(e, u, t, n) : k(e, he[t] || t, n);
355
415
  }
356
416
  return n;
357
417
  }
358
- function Ot(t) {
359
- if (g.registry && g.events && g.events.find(([l, a]) => a === t))
418
+ function ve(e) {
419
+ if (h.registry && h.events && h.events.find(([a, l]) => l === e))
360
420
  return;
361
- let e = t.target;
362
- const n = `$$${t.type}`, i = t.target, s = t.currentTarget, o = (l) => Object.defineProperty(t, "target", {
421
+ let t = e.target;
422
+ const n = `$$${e.type}`, i = e.target, s = e.currentTarget, o = (a) => Object.defineProperty(e, "target", {
363
423
  configurable: !0,
364
- value: l
424
+ value: a
365
425
  }), c = () => {
366
- const l = e[n];
367
- if (l && !e.disabled) {
368
- const a = e[`${n}Data`];
369
- if (a !== void 0 ? l.call(e, a, t) : l.call(e, t), t.cancelBubble) return;
426
+ const a = t[n];
427
+ if (a && !t.disabled) {
428
+ const l = t[`${n}Data`];
429
+ if (l !== void 0 ? a.call(t, l, e) : a.call(t, e), e.cancelBubble) return;
370
430
  }
371
- return e.host && typeof e.host != "string" && !e.host._$host && e.contains(t.target) && o(e.host), !0;
431
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && o(t.host), !0;
372
432
  }, r = () => {
373
- for (; c() && (e = e._$host || e.parentNode || e.host); ) ;
433
+ for (; c() && (t = t._$host || t.parentNode || t.host); ) ;
374
434
  };
375
- if (Object.defineProperty(t, "currentTarget", {
435
+ if (Object.defineProperty(e, "currentTarget", {
376
436
  configurable: !0,
377
437
  get() {
378
- return e || document;
438
+ return t || document;
379
439
  }
380
- }), g.registry && !g.done && (g.done = _$HY.done = !0), t.composedPath) {
381
- const l = t.composedPath();
382
- o(l[0]);
383
- for (let a = 0; a < l.length - 2 && (e = l[a], !!c()); a++) {
384
- if (e._$host) {
385
- e = e._$host, r();
440
+ }), h.registry && !h.done && (h.done = _$HY.done = !0), e.composedPath) {
441
+ const a = e.composedPath();
442
+ o(a[0]);
443
+ for (let l = 0; l < a.length - 2 && (t = a[l], !!c()); l++) {
444
+ if (t._$host) {
445
+ t = t._$host, r();
386
446
  break;
387
447
  }
388
- if (e.parentNode === s)
448
+ if (t.parentNode === s)
389
449
  break;
390
450
  }
391
451
  } else r();
392
452
  o(i);
393
453
  }
394
- function I(t, e, n, i, s) {
395
- const o = j(t);
454
+ function T(e, t, n, i, s) {
455
+ const o = x(e);
396
456
  if (o) {
397
- !n && (n = [...t.childNodes]);
457
+ !n && (n = [...e.childNodes]);
398
458
  let r = [];
399
- for (let l = 0; l < n.length; l++) {
400
- const a = n[l];
401
- a.nodeType === 8 && a.data.slice(0, 2) === "!$" ? a.remove() : r.push(a);
459
+ for (let a = 0; a < n.length; a++) {
460
+ const l = n[a];
461
+ l.nodeType === 8 && l.data.slice(0, 2) === "!$" ? l.remove() : r.push(l);
402
462
  }
403
463
  n = r;
404
464
  }
405
465
  for (; typeof n == "function"; ) n = n();
406
- if (e === n) return n;
407
- const c = typeof e;
408
- if (t = t, c === "string" || c === "number") {
409
- if (o || c === "number" && (e = e.toString(), e === n))
466
+ if (t === n) return n;
467
+ const c = typeof t;
468
+ if (e = e, c === "string" || c === "number") {
469
+ if (o || c === "number" && (t = t.toString(), t === n))
410
470
  return n;
411
- n !== "" && typeof n == "string" ? n = t.firstChild.data = e : n = t.textContent = e;
412
- } else if (e == null || c === "boolean") {
471
+ n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
472
+ } else if (t == null || c === "boolean") {
413
473
  if (o) return n;
414
- n = v(t, n, i);
474
+ n = P(e, n, i);
415
475
  } else {
416
476
  if (c === "function")
417
- return w(() => {
418
- let r = e();
477
+ return A(() => {
478
+ let r = t();
419
479
  for (; typeof r == "function"; ) r = r();
420
- n = I(t, r, n, i);
480
+ n = T(e, r, n, i);
421
481
  }), () => n;
422
- if (Array.isArray(e)) {
423
- const r = [], l = n && Array.isArray(n);
424
- if (k(r, e, n, s))
425
- return w(() => n = I(t, r, n, i, !0)), () => n;
482
+ if (Array.isArray(t)) {
483
+ const r = [], a = n && Array.isArray(n);
484
+ if (L(r, t, n, s))
485
+ return A(() => n = T(e, r, n, i, !0)), () => n;
426
486
  if (o)
427
- return r.length ? n = [...t.childNodes] : n;
428
- r.length === 0 ? n = v(t, n, i) : l ? n.length === 0 ? _(t, r, i) : St(t, n, r) : (n && v(t), _(t, r)), n = r;
429
- } else if (e.nodeType) {
430
- if (o && e.parentNode) return n = e;
431
- Array.isArray(n) ? v(t, n, null, e) : n == null || n === "" || !t.firstChild ? t.appendChild(e) : t.replaceChild(e, t.firstChild), n = e;
487
+ return r.length ? n = [...e.childNodes] : n;
488
+ r.length === 0 ? n = P(e, n, i) : a ? n.length === 0 ? V(e, r, i) : Se(e, n, r) : (n && P(e), V(e, r)), n = r;
489
+ } else if (t.nodeType) {
490
+ if (o && t.parentNode) return n = t;
491
+ Array.isArray(n) ? P(e, n, null, t) : n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild), n = t;
432
492
  }
433
493
  }
434
494
  return n;
435
495
  }
436
- function k(t, e, n, i) {
496
+ function L(e, t, n, i) {
437
497
  let s = !1;
438
- for (let o = 0, c = e.length; o < c; o++) {
439
- let r = e[o], l = n && n[t.length], a;
440
- if (!(r == null || r === !0 || r === !1)) if ((a = typeof r) == "object" && r.nodeType)
441
- t.push(r);
498
+ for (let o = 0, c = t.length; o < c; o++) {
499
+ let r = t[o], a = n && n[e.length], l;
500
+ if (!(r == null || r === !0 || r === !1)) if ((l = typeof r) == "object" && r.nodeType)
501
+ e.push(r);
442
502
  else if (Array.isArray(r))
443
- s = k(t, r, l) || s;
444
- else if (a === "function")
503
+ s = L(e, r, a) || s;
504
+ else if (l === "function")
445
505
  if (i) {
446
506
  for (; typeof r == "function"; ) r = r();
447
- s = k(
448
- t,
449
- Array.isArray(r) ? r : [r],
450
- Array.isArray(l) ? l : [l]
451
- ) || s;
507
+ s = L(e, Array.isArray(r) ? r : [r], Array.isArray(a) ? a : [a]) || s;
452
508
  } else
453
- t.push(r), s = !0;
509
+ e.push(r), s = !0;
454
510
  else {
455
511
  const f = String(r);
456
- l && l.nodeType === 3 && l.data === f ? t.push(l) : t.push(document.createTextNode(f));
512
+ a && a.nodeType === 3 && a.data === f ? e.push(a) : e.push(document.createTextNode(f));
457
513
  }
458
514
  }
459
515
  return s;
460
516
  }
461
- function _(t, e, n = null) {
462
- for (let i = 0, s = e.length; i < s; i++) t.insertBefore(e[i], n);
517
+ function V(e, t, n = null) {
518
+ for (let i = 0, s = t.length; i < s; i++) e.insertBefore(t[i], n);
463
519
  }
464
- function v(t, e, n, i) {
465
- if (n === void 0) return t.textContent = "";
520
+ function P(e, t, n, i) {
521
+ if (n === void 0) return e.textContent = "";
466
522
  const s = i || document.createTextNode("");
467
- if (e.length) {
523
+ if (t.length) {
468
524
  let o = !1;
469
- for (let c = e.length - 1; c >= 0; c--) {
470
- const r = e[c];
525
+ for (let c = t.length - 1; c >= 0; c--) {
526
+ const r = t[c];
471
527
  if (s !== r) {
472
- const l = r.parentNode === t;
473
- !o && !c ? l ? t.replaceChild(s, r) : t.insertBefore(s, n) : l && r.remove();
528
+ const a = r.parentNode === e;
529
+ !o && !c ? a ? e.replaceChild(s, r) : e.insertBefore(s, n) : a && r.remove();
474
530
  } else o = !0;
475
531
  }
476
- } else t.insertBefore(s, n);
532
+ } else e.insertBefore(s, n);
477
533
  return [s];
478
534
  }
479
- function Pt() {
480
- return g.getNextContextId();
535
+ function ze() {
536
+ return h.getNextContextId();
481
537
  }
482
- const zt = "http://www.w3.org/2000/svg";
483
- function Nt(t, e = !1) {
484
- return e ? document.createElementNS(zt, t) : document.createElement(t);
538
+ const Ne = "http://www.w3.org/2000/svg";
539
+ function ke(e, t = !1, n = void 0) {
540
+ return t ? document.createElementNS(Ne, e) : document.createElement(e, {
541
+ is: n
542
+ });
485
543
  }
486
- function kt(t, e) {
487
- const n = M(t);
488
- return M(() => {
544
+ function Le(e, t) {
545
+ const n = N(e);
546
+ return N(() => {
489
547
  const i = n();
490
548
  switch (typeof i) {
491
549
  case "function":
492
- return W(() => i(e));
550
+ return M(() => i(t));
493
551
  case "string":
494
- const s = bt.has(i), o = g.context ? vt() : Nt(i, s);
495
- return Tt(o, e, s), o;
552
+ const s = $e.has(i), o = h.context ? Me() : ke(i, s, M(() => t.is));
553
+ return Te(o, t, s), o;
496
554
  }
497
555
  });
498
556
  }
499
- function Lt(t) {
500
- const [, e] = X(t, ["component"]);
501
- return kt(() => t.component, e);
557
+ function Re(e) {
558
+ const [, t] = X(e, ["component"]);
559
+ return Le(() => e.component, t);
502
560
  }
503
- function A(t) {
504
- return t ?? void 0;
561
+ function C(e) {
562
+ return e ?? void 0;
505
563
  }
506
- function m(t, e) {
507
- return Object.keys(t).filter((n) => !e.includes(n)).reduce((n, i) => Object.defineProperty({
564
+ function g(e, t) {
565
+ return Object.keys(e).filter((n) => !t.includes(n)).reduce((n, i) => Object.defineProperty({
508
566
  ...n
509
567
  }, i, {
510
568
  get() {
511
- return t[i];
569
+ return e[i];
512
570
  },
513
571
  configurable: !0,
514
572
  enumerable: !0
515
573
  }), {});
516
574
  }
517
- function h(t, e) {
518
- return T(Lt, d({
575
+ function m(e, t) {
576
+ return I(Re, d({
519
577
  get component() {
520
- return t();
578
+ return e();
521
579
  }
522
- }, e));
580
+ }, t));
523
581
  }
524
- function b(t) {
525
- return Object.values(t).every((e) => typeof e == "function") ? Object.keys(t).reduce((e, n) => {
526
- const i = t[n];
527
- return Object.defineProperty(e, n, {
582
+ function b(e) {
583
+ return Object.values(e).every((t) => typeof t == "function") ? Object.keys(e).reduce((t, n) => {
584
+ const i = e[n];
585
+ return Object.defineProperty(t, n, {
528
586
  get() {
529
587
  return i();
530
588
  },
@@ -533,185 +591,185 @@ function b(t) {
533
591
  });
534
592
  }, {}) : new Error("Please provide an object with accessor values only.");
535
593
  }
536
- const et = /^--\D{1}.{0,100}$/;
537
- function nt(t) {
538
- return et.test(t);
594
+ const ne = /^--\D{1}.{0,100}$/;
595
+ function ie(e) {
596
+ return ne.test(e);
539
597
  }
540
- function B(t) {
541
- return typeof t != "string" ? !1 : [/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/, /^var\(--\D{1}.{0,100}\)$/, et].some((e) => e.test(t));
598
+ function D(e) {
599
+ return typeof e != "string" ? !1 : [/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/, /^var\(--\D{1}.{0,100}\)$/, ne].some((t) => t.test(e));
542
600
  }
543
601
  const {
544
- sizeXxs: Wt,
545
- sizeXs: Bt,
546
- sizeSm: Dt,
547
- sizeMd: Rt,
548
- sizeLg: Gt,
549
- sizeXl: Ht,
550
- sizeXxl: _t,
551
- sizeContent1: Ft,
552
- sizeContent2: Vt,
553
- sizeContent3: Xt,
554
- sizeHeader1: Ut,
555
- sizeHeader2: qt,
556
- sizeHeader3: Qt,
557
- size000: Yt,
558
- size00: Jt,
559
- size1: Zt,
560
- size2: Kt,
561
- size3: pt,
562
- size4: te,
563
- size5: ee,
564
- size6: ne,
565
- size7: ie,
566
- size8: se,
567
- size9: oe,
568
- size10: re,
569
- size11: ce,
570
- size12: le,
571
- size13: ae,
572
- size14: fe,
573
- size15: ue
574
- } = rt, de = {
575
- size000: Yt,
576
- size00: Jt,
577
- size1: Zt,
578
- size2: Kt,
579
- size3: pt,
580
- size4: te,
581
- size5: ee,
582
- size6: ne,
583
- size7: ie,
584
- size8: se,
585
- size9: oe,
586
- size10: re,
587
- size11: ce,
588
- size12: le,
589
- size13: ae,
590
- size14: fe,
591
- size15: ue
592
- }, ye = {
593
- sizeXxs: Wt,
594
- sizeXs: Bt,
595
- sizeSm: Dt,
596
- sizeMd: Rt,
597
- sizeLg: Gt,
598
- sizeXl: Ht,
599
- sizeXxl: _t,
600
- sizeContent1: Ft,
601
- sizeContent2: Vt,
602
- sizeContent3: Xt,
603
- sizeHeader1: Ut,
604
- sizeHeader2: qt,
605
- sizeHeader3: Qt
606
- }, ge = de, me = ye;
607
- function it(t) {
608
- return t.reduce((e, [n, i]) => ({
609
- ...e,
602
+ sizeXxs: De,
603
+ sizeXs: We,
604
+ sizeSm: Be,
605
+ sizeMd: Fe,
606
+ sizeLg: Ge,
607
+ sizeXl: He,
608
+ sizeXxl: Ve,
609
+ sizeContent1: _e,
610
+ sizeContent2: Ue,
611
+ sizeContent3: Xe,
612
+ sizeHeader1: qe,
613
+ sizeHeader2: Qe,
614
+ sizeHeader3: Ye,
615
+ size000: Je,
616
+ size00: Ze,
617
+ size1: Ke,
618
+ size2: pe,
619
+ size3: et,
620
+ size4: tt,
621
+ size5: nt,
622
+ size6: it,
623
+ size7: st,
624
+ size8: ot,
625
+ size9: rt,
626
+ size10: ct,
627
+ size11: at,
628
+ size12: lt,
629
+ size13: ft,
630
+ size14: ut,
631
+ size15: dt
632
+ } = ce, yt = {
633
+ size000: Je,
634
+ size00: Ze,
635
+ size1: Ke,
636
+ size2: pe,
637
+ size3: et,
638
+ size4: tt,
639
+ size5: nt,
640
+ size6: it,
641
+ size7: st,
642
+ size8: ot,
643
+ size9: rt,
644
+ size10: ct,
645
+ size11: at,
646
+ size12: lt,
647
+ size13: ft,
648
+ size14: ut,
649
+ size15: dt
650
+ }, ht = {
651
+ sizeXxs: De,
652
+ sizeXs: We,
653
+ sizeSm: Be,
654
+ sizeMd: Fe,
655
+ sizeLg: Ge,
656
+ sizeXl: He,
657
+ sizeXxl: Ve,
658
+ sizeContent1: _e,
659
+ sizeContent2: Ue,
660
+ sizeContent3: Xe,
661
+ sizeHeader1: qe,
662
+ sizeHeader2: Qe,
663
+ sizeHeader3: Ye
664
+ }, gt = yt, mt = ht;
665
+ function se(e) {
666
+ return e.reduce((t, [n, i]) => ({
667
+ ...t,
610
668
  [n]: i
611
669
  }), {});
612
670
  }
613
- function F(t, e) {
614
- if (e !== void 0)
615
- return typeof e == "number" && e >= 0 ? `${e}px` : typeof e == "string" && B(e) ? nt(e) ? `var(${e})` : e : A(S(t, e));
671
+ function _(e, t) {
672
+ if (t !== void 0)
673
+ return typeof t == "number" && t >= 0 ? `${t}px` : typeof t == "string" && D(t) ? ie(t) ? `var(${t})` : t : C(w(e, t));
616
674
  }
617
- function S(t, e) {
618
- const n = t.space ?? ge, i = it(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
619
- return A(i[e]);
675
+ function w(e, t) {
676
+ const n = e.space ?? gt, i = se(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
677
+ return C(i[t]);
620
678
  }
621
- function P(t, e) {
622
- if (e === void 0) return;
623
- if (typeof e == "number" && e >= 0) return `${e}px`;
624
- if (typeof e == "string" && B(e)) return nt(e) ? `var(${e})` : e;
625
- const n = t.sizes ?? me, i = it(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
626
- return A(i[e]);
679
+ function v(e, t) {
680
+ if (t === void 0) return;
681
+ if (typeof t == "number" && t >= 0) return `${t}px`;
682
+ if (typeof t == "string" && D(t)) return ie(t) ? `var(${t})` : t;
683
+ const n = e.sizes ?? mt, i = se(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
684
+ return C(i[t]);
627
685
  }
628
- function he(t) {
629
- return t === void 0 ? "100%" : typeof t == "number" ? `${t}px` : t;
686
+ function bt(e) {
687
+ return e === void 0 ? "100%" : typeof e == "number" ? `${e}px` : e;
630
688
  }
631
- function Ge(t) {
632
- const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [l, a]) => r + `${l}:${a};`, ""), n = () => `--maxWidth: ${he(t.maxWidth)};`, i = () => t.centerText ? "center-text" : "", s = () => t.centerChildren ? "center-children" : "", o = () => [i(), s()].filter(Boolean).join(" "), c = () => [e(), n()].join("; ");
633
- return h(() => t.as ?? "div", d(m(t, ["as", "maxWidth", "centerText", "centerChildren"]), b({
689
+ function Gt(e) {
690
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), n = () => `--maxWidth: ${bt(e.maxWidth)};`, i = () => e.centerText ? "center-text" : "", s = () => e.centerChildren ? "center-children" : "", o = () => [i(), s()].filter(Boolean).join(" "), c = () => [t(), n()].join("; ");
691
+ return m(() => e.as ?? "div", d(g(e, ["as", "maxWidth", "centerText", "centerChildren"]), b({
634
692
  style: c,
635
693
  "data-br-center": o
636
694
  })));
637
695
  }
638
- const st = ct({});
639
- function He(t) {
640
- return T(st.Provider, {
696
+ const oe = le({});
697
+ function Ht(e) {
698
+ return I(oe.Provider, {
641
699
  get value() {
642
- return t.theme;
700
+ return e.theme;
643
701
  },
644
702
  get children() {
645
- return t.children;
703
+ return e.children;
646
704
  }
647
705
  });
648
706
  }
649
- function x() {
707
+ function S() {
650
708
  try {
651
- return lt(st);
709
+ return ae(oe);
652
710
  } catch {
653
711
  return {};
654
712
  }
655
713
  }
656
- function be(t, e) {
657
- return P(t, e);
714
+ function $t(e, t) {
715
+ return v(e, t);
658
716
  }
659
- function _e(t) {
660
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [l, a]) => r + `${l}:${a};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${be(e, t.minItemWidth)}`, o = () => t.noStretchedColumns === !0 ? "no-stretched-columns" : "", c = () => [n(), i(), s()].join("; ");
661
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "minItemWidth", "noStretchedColumns"]), b({
717
+ function Vt(e) {
718
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${$t(t, e.minItemWidth)}`, o = () => e.noStretchedColumns === !0 ? "no-stretched-columns" : "", c = () => [n(), i(), s()].join("; ");
719
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "minItemWidth", "noStretchedColumns"]), b({
662
720
  style: c,
663
721
  "data-br-column-drop": o
664
722
  })));
665
723
  }
666
- function Fe(t, e) {
724
+ function _t(e, t) {
667
725
  const [n, i] = O(!1), [s, o] = O();
668
- return U(() => {
669
- Y();
670
- }), q(() => {
671
- if (A(s()) === void 0) return;
672
- e && e(s());
673
- const c = J(s(), (r) => {
674
- var a;
675
- const l = ((a = r.borderBoxSize) == null ? void 0 : a.inlineSize) ?? r.contentRect.width;
676
- if (l > 0) {
677
- const f = l <= t;
726
+ return q(() => {
727
+ J();
728
+ }), Q(() => {
729
+ if (C(s()) === void 0) return;
730
+ t && t(s());
731
+ const c = Z(s(), (r) => {
732
+ var l;
733
+ const a = ((l = r.borderBoxSize) == null ? void 0 : l.inlineSize) ?? r.contentRect.width;
734
+ if (a > 0) {
735
+ const f = a <= e;
678
736
  i(f);
679
737
  }
680
738
  });
681
- Q(c);
739
+ Y(c);
682
740
  }), [n, o];
683
741
  }
684
- function $e(t) {
685
- return Array.isArray(t) && t.length === 2 && t.every(Number.isFinite) || typeof t == "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(t);
742
+ function wt(e) {
743
+ return Array.isArray(e) && e.length === 2 && e.every(Number.isFinite) || typeof e == "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e);
686
744
  }
687
- function Se(t) {
688
- return Array.isArray(t) ? t.join("/") : t;
745
+ function St(e) {
746
+ return Array.isArray(e) ? e.join("/") : e;
689
747
  }
690
- function xe(t) {
691
- return $e(t) ? Se(t) : void 0;
748
+ function At(e) {
749
+ return wt(e) ? St(e) : void 0;
692
750
  }
693
- function Ve(t) {
694
- const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [r, l]) => c + `${r}:${l};`, ""), n = () => xe(t.ratio), i = () => n() ? `--ratio: ${n()}` : "", s = () => typeof t.position == "string" ? `--position: ${t.position}` : "50%", o = () => [e(), i(), s()].join("; ");
695
- return h(() => t.as ?? "div", d(m(t, ["as", "ratio", "position"]), b({
751
+ function Ut(e) {
752
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), n = () => At(e.ratio), i = () => n() ? `--ratio: ${n()}` : "", s = () => typeof e.position == "string" ? `--position: ${e.position}` : "50%", o = () => [t(), i(), s()].join("; ");
753
+ return m(() => e.as ?? "div", d(g(e, ["as", "ratio", "position"]), b({
696
754
  style: o,
697
755
  "data-br-frame": () => ""
698
756
  })));
699
757
  }
700
- function we(t) {
701
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [r, l]) => c + `${r}:${l};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth ?? 0}px`};`, o = () => [n(), i(), s()].join("; ");
702
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "minItemWidth"]), b({
758
+ function xt(e) {
759
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth ?? 0}px`};`, o = () => [n(), i(), s()].join("; ");
760
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "minItemWidth"]), b({
703
761
  style: o,
704
- "data-br-grid": () => t.variant === "masonry" ? "variant:masonry" : ""
762
+ "data-br-grid": () => e.variant === "masonry" ? "variant:masonry" : ""
705
763
  })));
706
764
  }
707
765
  const E = 96;
708
- function ot(t) {
709
- const e = String(t), n = parseFloat(e), [, i] = e.match(/[\d.\-+]*\s*(.*)/) ?? ["", ""];
766
+ function re(e) {
767
+ const t = String(e), n = parseFloat(t), [, i] = t.match(/[\d.\-+]*\s*(.*)/) ?? ["", ""];
710
768
  return [n, i];
711
769
  }
712
- function D(t, e) {
713
- if (!t) return;
714
- const n = e ?? document.body, i = (t ?? "px").trim().toLowerCase();
770
+ function W(e, t) {
771
+ if (!e) return;
772
+ const n = t ?? document.body, i = (e ?? "px").trim().toLowerCase();
715
773
  switch (i) {
716
774
  case "vmin":
717
775
  case "vmax":
@@ -721,11 +779,11 @@ function D(t, e) {
721
779
  return;
722
780
  case "ch":
723
781
  case "ex":
724
- return je(i, n);
782
+ return Ct(i, n);
725
783
  case "em":
726
- return L(n, "font-size");
784
+ return R(n, "font-size");
727
785
  case "rem":
728
- return L(document.body, "font-size");
786
+ return R(document.body, "font-size");
729
787
  case "in":
730
788
  return E;
731
789
  case "cm":
@@ -739,95 +797,95 @@ function D(t, e) {
739
797
  case "px":
740
798
  return 1;
741
799
  default: {
742
- const [s, o] = ot(i);
800
+ const [s, o] = re(i);
743
801
  if (isNaN(s)) return;
744
802
  if (!o) return s;
745
- const c = D(o, e);
803
+ const c = W(o, t);
746
804
  return typeof c == "number" ? s * c : void 0;
747
805
  }
748
806
  }
749
807
  }
750
- function L(t, e) {
751
- const [n, i] = ot(
752
- getComputedStyle(t).getPropertyValue(e)
808
+ function R(e, t) {
809
+ const [n, i] = re(
810
+ getComputedStyle(e).getPropertyValue(t)
753
811
  );
754
- return n * (D(i, t) ?? 1);
812
+ return n * (W(i, e) ?? 1);
755
813
  }
756
- function je(t, e) {
814
+ function Ct(e, t) {
757
815
  const n = document.createElement("div");
758
- n.style.height = "128" + t, e.appendChild(n);
759
- const i = L(n, "height") / 128;
760
- return e.removeChild(n), i;
761
- }
762
- var Ae = /* @__PURE__ */ Z("<div>");
763
- const z = 1, Ce = typeof window == "object" && typeof document == "object" && document.nodeType === 9, Ee = (t) => {
764
- const [e, n] = O(1), [i, s] = O(), o = x();
765
- return U(() => (Y(), 0)), q(() => {
766
- const c = A(i());
816
+ n.style.height = "128" + e, t.appendChild(n);
817
+ const i = R(n, "height") / 128;
818
+ return t.removeChild(n), i;
819
+ }
820
+ var jt = /* @__PURE__ */ K("<div>");
821
+ const z = 1, Et = typeof window == "object" && typeof document == "object" && document.nodeType === 9, It = (e) => {
822
+ const [t, n] = O(1), [i, s] = O(), o = S();
823
+ return q(() => (J(), 0)), Q(() => {
824
+ const c = C(i());
767
825
  if (c === void 0) return;
768
- const r = J(c, ({
769
- target: l
826
+ const r = Z(c, ({
827
+ target: a
770
828
  }) => {
771
829
  n(1);
772
- const a = t.gutter ? S(o, t.gutter) ?? "1px" : "1px", f = Ce ? D(a, l) : void 0, y = Math.max(f ?? z, z), [u] = Array.from(l.children), $ = 1 + Math.min(l.scrollHeight, u.scrollHeight), C = Math.max(Math.ceil($ / y), z);
773
- return n(C), 0;
830
+ const l = e.gutter ? w(o, e.gutter) ?? "1px" : "1px", f = Et ? W(l, a) : void 0, y = Math.max(f ?? z, z), [u] = Array.from(a.children), $ = 1 + Math.min(a.scrollHeight, u.scrollHeight), j = Math.max(Math.ceil($ / y), z);
831
+ return n(j), 0;
774
832
  });
775
- return Q(r), 0;
833
+ return Y(r), 0;
776
834
  }), (() => {
777
- var c = Ae();
778
- return p(s, c), tt(c, () => t.children), w((r) => K(c, `grid-row: span ${e()};`, r)), c;
835
+ var c = jt();
836
+ return ee(s, c), te(c, () => e.children), A((r) => p(c, `grid-row: span ${t()};`, r)), c;
779
837
  })();
780
- }, Xe = (t) => {
781
- const e = at(() => t.children), i = [].concat(e()).filter(Boolean).map((s) => T(Ee, {
838
+ }, Xt = (e) => {
839
+ const t = fe(() => e.children), i = [].concat(t()).filter(Boolean).map((s) => I(It, {
782
840
  get gutter() {
783
- return t.gutter;
841
+ return e.gutter;
784
842
  },
785
843
  children: s
786
844
  }));
787
- return T(we, d({
845
+ return I(xt, d({
788
846
  style: "grid-template-rows: 1px;"
789
- }, t, {
847
+ }, e, {
790
848
  children: i
791
849
  }));
792
- }, Te = {
850
+ }, Tt = {
793
851
  start: "justify:start",
794
852
  end: "justify:end",
795
853
  center: "justify:center",
796
854
  "space-between": "justify:space-between",
797
855
  "space-around": "justify:space-around"
798
- }, Ie = {
856
+ }, Pt = {
799
857
  start: "align:start",
800
858
  end: "align:end",
801
859
  center: "align:center",
802
860
  stretch: "align:stretch"
803
861
  };
804
- function Ue(t) {
805
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.justify !== void 0 ? Te[t.justify] : void 0, o = () => t.align !== void 0 ? Ie[t.align] : void 0, c = () => [n(), i()].join("; "), r = () => [s(), o()].filter(Boolean).join(" ");
806
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "justify", "align"]), b({
862
+ function qt(e) {
863
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((a, [l, f]) => a + `${l}:${f};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => e.justify !== void 0 ? Tt[e.justify] : void 0, o = () => e.align !== void 0 ? Pt[e.align] : void 0, c = () => [n(), i()].join("; "), r = () => [s(), o()].filter(Boolean).join(" ");
864
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "justify", "align"]), b({
807
865
  style: c,
808
866
  "data-br-inline-cluster": r
809
867
  })));
810
868
  }
811
- const ve = {
869
+ const Mt = {
812
870
  start: "justify:start",
813
871
  end: "justify:end",
814
872
  center: "justify:center",
815
873
  "space-between": "justify:space-between",
816
874
  "space-around": "justify:space-around"
817
- }, Me = {
875
+ }, Ot = {
818
876
  start: "align:start",
819
877
  end: "align:end",
820
878
  center: "align:center",
821
879
  stretch: "align:stretch"
822
880
  };
823
- function qe(t) {
824
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((y, [u, $]) => y + `${u}:${$};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, o = () => t.switchAt ? `--switchAt: ${P(e, t.switchAt) ?? "0px"};` : "", c = () => t.justify !== void 0 ? ve[t.justify] : void 0, r = () => t.align !== void 0 ? Me[t.align] : void 0, l = () => t.stretch ? `stretch:${t.stretch}` : void 0, a = () => [n(), i(), o(), s()].join("; "), f = () => [c(), r(), l()].filter(Boolean).join(" ");
825
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), b({
826
- style: a,
881
+ function Qt(e) {
882
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((y, [u, $]) => y + `${u}:${$};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => e.minItemWidth ? `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth}px`};` : void 0, o = () => e.switchAt ? `--switchAt: ${v(t, e.switchAt) ?? "0px"};` : "", c = () => e.justify !== void 0 ? Mt[e.justify] : void 0, r = () => e.align !== void 0 ? Ot[e.align] : void 0, a = () => e.stretch ? `stretch:${e.stretch}` : void 0, l = () => [n(), i(), o(), s()].join("; "), f = () => [c(), r(), a()].filter(Boolean).join(" ");
883
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), b({
884
+ style: l,
827
885
  "data-br-inline": f
828
886
  })));
829
887
  }
830
- const Oe = (t) => ({
888
+ const vt = (e) => ({
831
889
  left: "padding-inline-start",
832
890
  right: "padding-inline-end",
833
891
  top: "padding-block-start",
@@ -836,28 +894,28 @@ const Oe = (t) => ({
836
894
  inlineEnd: "padding-inline-end",
837
895
  blockStart: "padding-block-start",
838
896
  blockEnd: "padding-block-end"
839
- })[t], Pe = (t, e) => {
840
- if (!e) return "";
841
- if (Array.isArray(e) && e.length > 4)
897
+ })[e], zt = (e, t) => {
898
+ if (!t) return "";
899
+ if (Array.isArray(t) && t.length > 4)
842
900
  throw new Error("padding arrays can only be 4 or less in length");
843
- const n = typeof e == "object" && !Array.isArray(e) ? Object.entries(e).reduce((i, [s, o]) => ({
901
+ const n = typeof t == "object" && !Array.isArray(t) ? Object.entries(t).reduce((i, [s, o]) => ({
844
902
  ...i,
845
- [Oe(s)]: F(t, o) ?? "0px"
903
+ [vt(s)]: _(e, o) ?? "0px"
846
904
  }), {}) : {
847
- padding: Array.from(Array.isArray(e) ? e : [e]).map((i) => F(t, i) ?? "0px").join(" ")
905
+ padding: Array.from(Array.isArray(t) ? t : [t]).map((i) => _(e, i) ?? "0px").join(" ")
848
906
  };
849
907
  return Object.entries(n).reduce((i, [s, o]) => i + `${s}:${o};`, "");
850
908
  };
851
- function Qe(t) {
852
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [c, r]) => o + `${c}:${r};`, ""), i = () => Pe(e, t.padding), s = () => [n(), i()].join("; ");
853
- return h(() => t.as ?? "div", d(m(t, ["as", "padding"]), b({
909
+ function Yt(e) {
910
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [c, r]) => o + `${c}:${r};`, ""), i = () => zt(t, e.padding), s = () => [n(), i()].join("; ");
911
+ return m(() => e.as ?? "div", d(g(e, ["as", "padding"]), b({
854
912
  style: s,
855
913
  "data-br-padbox": () => ""
856
914
  })));
857
915
  }
858
- function Ye(t) {
859
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [r, l]) => c + `${r}:${l};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => {
860
- switch (t.snapType) {
916
+ function Jt(e) {
917
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => {
918
+ switch (e.snapType) {
861
919
  case "none":
862
920
  return "snapType:none";
863
921
  case "proximity":
@@ -868,12 +926,12 @@ function Ye(t) {
868
926
  return "snapType:none";
869
927
  }
870
928
  }, o = () => [n(), i()].join("; ");
871
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter"]), b({
929
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter"]), b({
872
930
  style: o,
873
931
  "data-br-reel": s
874
932
  })));
875
933
  }
876
- const V = {
934
+ const U = {
877
935
  "1/4": "fraction:1/4",
878
936
  "1/3": "fraction:1/3",
879
937
  "1/2": "fraction:1/2",
@@ -882,85 +940,85 @@ const V = {
882
940
  "auto-start": "fraction:auto-start",
883
941
  "auto-end": "fraction:auto-end"
884
942
  };
885
- function Je(t) {
886
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => t.switchAt ? `--switchAt: ${P(e, t.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, o = () => V[t.fraction ?? "1/2"] ?? V["1/2"], c = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, r = () => [n(), s(), i(), c()].join("; ");
887
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "fraction"]), b({
943
+ function Zt(e) {
944
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((a, [l, f]) => a + `${l}:${f};`, ""), i = () => e.switchAt ? `--switchAt: ${v(t, e.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, o = () => U[e.fraction ?? "1/2"] ?? U["1/2"], c = () => e.minItemWidth ? `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth}px`};` : void 0, r = () => [n(), s(), i(), c()].join("; ");
945
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "fraction"]), b({
888
946
  style: r,
889
947
  "data-br-split": o
890
948
  })));
891
949
  }
892
- const ze = {
950
+ const Nt = {
893
951
  start: "align:start",
894
952
  end: "align:end",
895
953
  center: "align:center",
896
954
  stretch: "align:stretch"
897
955
  };
898
- function Ze(t) {
899
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [l, a]) => r + `${l}:${a};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => [n(), i()].join("; "), o = () => t.align !== void 0 ? ze[t.align] : void 0, c = () => [o()].filter(Boolean).join(" ");
900
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter"]), b({
956
+ function Kt(e) {
957
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => [n(), i()].join("; "), o = () => e.align !== void 0 ? Nt[e.align] : void 0, c = () => [o()].filter(Boolean).join(" ");
958
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter"]), b({
901
959
  style: s,
902
960
  "data-br-stack": c
903
961
  })));
904
962
  }
905
- var Ne = /* @__PURE__ */ Z("<div data-br-cover-centered>");
906
- function ke(t) {
907
- return typeof t == "number" ? `${t}px` : t && B(t) ? t : "100vh";
963
+ var kt = /* @__PURE__ */ K("<div data-br-cover-centered>");
964
+ function Lt(e) {
965
+ return typeof e == "number" ? `${e}px` : e && D(e) ? e : "100vh";
908
966
  }
909
- function Le(t) {
910
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [l, a]) => r + `${l}:${a};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minHeight: ${ke(t.minHeight)};`, o = () => t.variant === "stretch-content" || t.stretchContent === !0 ? "stretch-content" : "", c = () => [n(), i(), s()].join("; ");
911
- return h(() => t.as ?? "div", d(m(t, ["as", "minHeight", "stretchContent"]), b({
967
+ function Rt(e) {
968
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minHeight: ${Lt(e.minHeight)};`, o = () => e.variant === "stretch-content" || e.stretchContent === !0 ? "stretch-content" : "", c = () => [n(), i(), s()].join("; ");
969
+ return m(() => e.as ?? "div", d(g(e, ["as", "minHeight", "stretchContent"]), b({
912
970
  style: c,
913
971
  "data-br-cover": o
914
972
  })));
915
973
  }
916
- function Ke(t) {
917
- const [e, n] = X(t, ["children", "top", "bottom"]);
918
- return T(Le, d(n, {
974
+ function pt(e) {
975
+ const [t, n] = X(e, ["children", "top", "bottom"]);
976
+ return I(Rt, d(n, {
919
977
  get children() {
920
- return [M(() => e.top), (() => {
921
- var i = Ne();
922
- return tt(i, () => e.children), i;
923
- })(), M(() => e.bottom)];
978
+ return [B(() => t.top), (() => {
979
+ var i = kt();
980
+ return te(i, () => t.children), i;
981
+ })(), B(() => t.bottom)];
924
982
  }
925
983
  }));
926
984
  }
927
- function pe(t) {
928
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [l, a]) => r + `${l}:${a};`, ""), i = () => `--gutter: ${S(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--columns: ${A(Math.max(t.colCount ?? t.columns ?? 1, 1)) ?? 1};`, o = () => t.switchAt ? `--switchAt: ${P(e, t.switchAt) ?? "0px"};` : "", c = () => [n(), i(), s(), o()].filter(Boolean).join("; ");
929
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "columns", "colCount", "switchAt"]), b({
985
+ function en(e) {
986
+ const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--columns: ${C(Math.max(e.colCount ?? e.columns ?? 1, 1)) ?? 1};`, o = () => e.switchAt ? `--switchAt: ${v(t, e.switchAt) ?? "0px"};` : "", c = () => [n(), i(), s(), o()].filter(Boolean).join("; ");
987
+ return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "columns", "colCount", "switchAt"]), b({
930
988
  style: c,
931
989
  "data-br-columns": () => ""
932
990
  })));
933
991
  }
934
- const We = (t) => typeof t == "number" ? t : 1;
935
- function tn(t) {
936
- const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [r, l]) => c + `${r}:${l};`, ""), n = () => `--span: ${We(t.span)};`, i = () => t.offsetStart && t.offsetStart > 0 ? `--offsetStart: ${t.offsetStart};` : "", s = () => t.offsetEnd && t.offsetEnd > 0 ? `--offsetEnd: ${t.offsetEnd};` : "", o = () => [e(), n(), i(), s()].join("; ");
937
- return h(() => t.as ?? "div", d(m(t, ["as", "span", "offsetStart", "offsetEnd"]), b({
992
+ const Dt = (e) => typeof e == "number" ? e : 1;
993
+ function tn(e) {
994
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), n = () => `--span: ${Dt(e.span)};`, i = () => e.offsetStart && e.offsetStart > 0 ? `--offsetStart: ${e.offsetStart};` : "", s = () => e.offsetEnd && e.offsetEnd > 0 ? `--offsetEnd: ${e.offsetEnd};` : "", o = () => [t(), n(), i(), s()].join("; ");
995
+ return m(() => e.as ?? "div", d(g(e, ["as", "span", "offsetStart", "offsetEnd"]), b({
938
996
  style: o,
939
997
  "data-br-column": () => ""
940
998
  })));
941
999
  }
942
1000
  export {
943
- Ge as Center,
1001
+ Gt as Center,
944
1002
  tn as Column,
945
- _e as ColumnDrop,
946
- pe as Columns,
947
- Ke as Cover,
948
- Ve as Frame,
949
- we as Grid,
950
- qe as Inline,
951
- Ue as InlineCluster,
952
- Xe as MasonryGrid,
953
- Qe as PadBox,
954
- Ye as Reel,
955
- Je as Split,
956
- Ze as Stack,
957
- He as ThemeProvider,
958
- B as checkIsCSSLength,
959
- Fe as createContainerQuery,
960
- F as getSafeGutter,
961
- P as getSizeValue,
962
- S as getSpacingValue,
963
- me as sizes,
964
- ge as spacing,
965
- x as useTheme
1003
+ Vt as ColumnDrop,
1004
+ en as Columns,
1005
+ pt as Cover,
1006
+ Ut as Frame,
1007
+ xt as Grid,
1008
+ Qt as Inline,
1009
+ qt as InlineCluster,
1010
+ Xt as MasonryGrid,
1011
+ Yt as PadBox,
1012
+ Jt as Reel,
1013
+ Zt as Split,
1014
+ Kt as Stack,
1015
+ Ht as ThemeProvider,
1016
+ D as checkIsCSSLength,
1017
+ _t as createContainerQuery,
1018
+ _ as getSafeGutter,
1019
+ v as getSizeValue,
1020
+ w as getSpacingValue,
1021
+ mt as sizes,
1022
+ gt as spacing,
1023
+ S as useTheme
966
1024
  };